diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index c9cbf4e7f5..10653afb5a 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -83,7 +83,7 @@ } }, "features": { - "ghcr.io/devcontainers/features/docker-in-docker:2": { + "ghcr.io/devcontainers/features/docker-in-docker:4": { // https://github.com/devcontainers/features/issues/1466 "moby": false } diff --git a/.gitattributes b/.gitattributes index f1d1336935..e96e0676ca 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,29 +1,15 @@ -mobile/openapi/**/*.md -diff -merge -mobile/openapi/**/*.md linguist-generated=true -mobile/openapi/**/*.dart -diff -merge -mobile/openapi/**/*.dart linguist-generated=true - -mobile/lib/**/*.g.dart -diff -merge -mobile/lib/**/*.g.dart linguist-generated=true - mobile/android/**/*.g.kt -diff -merge mobile/android/**/*.g.kt linguist-generated=true mobile/ios/**/*.g.swift -diff -merge mobile/ios/**/*.g.swift linguist-generated=true -mobile/lib/**/*.drift.dart -diff -merge -mobile/lib/**/*.drift.dart linguist-generated=true - mobile/drift_schemas/main/drift_schema_*.json -diff -merge mobile/drift_schemas/main/drift_schema_*.json linguist-generated=true mobile/lib/infrastructure/repositories/db.repository.steps.dart -diff -merge mobile/lib/infrastructure/repositories/db.repository.steps.dart linguist-generated=true -mobile/test/drift/main/generated/** -diff -merge -mobile/test/drift/main/generated/** linguist-generated=true - packages/sdk/fetch-client.ts -diff -merge packages/sdk/fetch-client.ts linguist-generated=true diff --git a/.github/workflows/auto-close.yml b/.github/workflows/auto-close.yml index db34e43d98..e87e1b96c7 100644 --- a/.github/workflows/auto-close.yml +++ b/.github/workflows/auto-close.yml @@ -15,7 +15,7 @@ jobs: outputs: uses_template: ${{ steps.check.outputs.uses_template }} steps: - - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: sparse-checkout: .github/pull_request_template.md sparse-checkout-cone-mode: false diff --git a/.github/workflows/build-mobile.yml b/.github/workflows/build-mobile.yml index 71b57ecb2d..6a9a01d41d 100644 --- a/.github/workflows/build-mobile.yml +++ b/.github/workflows/build-mobile.yml @@ -12,6 +12,10 @@ on: default: 'development' type: string secrets: + PUSH_O_MATIC_APP_CLIENT_ID: + required: true + PUSH_O_MATIC_APP_KEY: + required: true KEY_JKS: required: true ALIAS: @@ -51,14 +55,15 @@ jobs: should_run: ${{ steps.check.outputs.should_run }} steps: - id: token - uses: immich-app/devtools/actions/create-workflow-token@9db058b2e6eec20e07760b0e17a0505c78ec3191 # create-workflow-token-action-v2.0.1 + uses: immich-app/devtools/actions/create-workflow-token@1af396ae134e4bc3b63d947e672bc68bf4ff9dc5 # create-workflow-token-action-v3.0.0 with: client-id: ${{ secrets.PUSH_O_MATIC_APP_CLIENT_ID }} private-key: ${{ secrets.PUSH_O_MATIC_APP_KEY }} + permission-contents: read - name: Check what should run id: check - uses: immich-app/devtools/actions/pre-job@91f342bb4477c4bc10c576ae739da875d85aa164 # pre-job-action-v2.0.4 + uses: immich-app/devtools/actions/pre-job@03514eceb4a27cd714976a866b350df5ce175720 # pre-job-action-v2.1.0 with: github-token: ${{ steps.token.outputs.token }} filters: | @@ -79,19 +84,21 @@ jobs: steps: - id: token - uses: immich-app/devtools/actions/create-workflow-token@9db058b2e6eec20e07760b0e17a0505c78ec3191 # create-workflow-token-action-v2.0.1 + uses: immich-app/devtools/actions/create-workflow-token@1af396ae134e4bc3b63d947e672bc68bf4ff9dc5 # create-workflow-token-action-v3.0.0 with: client-id: ${{ secrets.PUSH_O_MATIC_APP_CLIENT_ID }} private-key: ${{ secrets.PUSH_O_MATIC_APP_KEY }} + permission-contents: read + permission-pull-requests: write - - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: ref: ${{ inputs.ref }} persist-credentials: false token: ${{ steps.token.outputs.token }} - name: Setup Mise - uses: immich-app/devtools/actions/use-mise@3bca63ca3c15020293b36b51737a3ee2c773340b # use-mise-action-v3.1.0 + uses: immich-app/devtools/actions/use-mise@06a9ef925332c91be647d6256642b86b398592c8 # use-mise-action-v3.2.1 with: github_token: ${{ steps.token.outputs.token }} working_directory: ./mobile @@ -103,14 +110,14 @@ jobs: working-directory: ./mobile run: printf "%s" $KEY_JKS | base64 -d > android/key.jks - - uses: actions/setup-java@ad2b38190b15e4d6bdf0c97fb4fca8412226d287 # v5.3.0 + - uses: actions/setup-java@b6effb05e454b25005698d916606bdc6ffcbf961 # v5.7.0 with: distribution: 'zulu' java-version: '17' - name: Restore Gradle Cache id: cache-gradle-restore - uses: actions/cache/restore@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5 + uses: actions/cache/restore@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0 with: path: | ~/.gradle/caches @@ -124,16 +131,11 @@ jobs: with: packages: '' - - name: Get Packages - working-directory: ./mobile - run: flutter pub get + - name: Install dependencies + run: mise //mobile:install:ci - - name: Generate translation file - run: mise //mobile:codegen:translation - - - name: Generate platform APIs - run: mise //mobile:codegen:pigeon - working-directory: ./mobile + - name: Perform codegen + run: mise //mobile:codegen - name: Build Android App Bundle working-directory: ./mobile @@ -181,7 +183,7 @@ jobs: - name: Save Gradle Cache id: cache-gradle-save - uses: actions/cache/save@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5 + uses: actions/cache/save@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0 if: github.ref == 'refs/heads/main' with: path: | @@ -198,55 +200,47 @@ jobs: contents: read # Run on main branch or workflow_dispatch, or on PRs/other branches (build only, no upload) if: ${{ !github.event.pull_request.head.repo.fork && fromJSON(needs.pre-job.outputs.should_run).mobile == true }} - runs-on: macos-15 + runs-on: macos-26 steps: - id: token - uses: immich-app/devtools/actions/create-workflow-token@9db058b2e6eec20e07760b0e17a0505c78ec3191 # create-workflow-token-action-v2.0.1 + uses: immich-app/devtools/actions/create-workflow-token@1af396ae134e4bc3b63d947e672bc68bf4ff9dc5 # create-workflow-token-action-v3.0.0 with: client-id: ${{ secrets.PUSH_O_MATIC_APP_CLIENT_ID }} private-key: ${{ secrets.PUSH_O_MATIC_APP_KEY }} + permission-contents: read - name: Select Xcode 26 run: sudo xcode-select -s /Applications/Xcode_26.2.app/Contents/Developer - name: Checkout code - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: ref: ${{ inputs.ref || github.sha }} persist-credentials: false - name: Setup Mise - uses: immich-app/devtools/actions/use-mise@3bca63ca3c15020293b36b51737a3ee2c773340b # use-mise-action-v3.1.0 + uses: immich-app/devtools/actions/use-mise@06a9ef925332c91be647d6256642b86b398592c8 # use-mise-action-v3.2.1 with: github_token: ${{ steps.token.outputs.token }} working_directory: ./mobile - - name: Install Flutter dependencies - working-directory: ./mobile - run: flutter pub get - - - name: Generate translation files - run: mise //mobile:codegen:translation - - - name: Generate platform APIs - run: mise //mobile:codegen:pigeon - - - name: Resolve iOS Swift Packages - working-directory: ./mobile - run: flutter build ios --config-only --no-codesign - - name: Setup Ruby - uses: ruby/setup-ruby@89f90524b88a01fe6e0b732220432cc6142926af # v1.313.0 + uses: ruby/setup-ruby@95ef2b042f9d7a56d8268cba8559e2842e2ad01b # v1.321.0 with: ruby-version: '3.3' bundler-cache: true working-directory: ./mobile/ios - - name: Install CocoaPods dependencies - working-directory: ./mobile/ios - run: | - pod install + - name: Install dependencies + run: mise //mobile:install:ci + + - name: Perform codegen + run: mise //mobile:codegen + + - name: Resolve iOS Swift Packages + working-directory: ./mobile + run: flutter build ios --config-only --no-codesign - name: Create API Key env: diff --git a/.github/workflows/cache-cleanup.yml b/.github/workflows/cache-cleanup.yml index abbdd53976..06f61f03fa 100644 --- a/.github/workflows/cache-cleanup.yml +++ b/.github/workflows/cache-cleanup.yml @@ -19,13 +19,15 @@ jobs: actions: write steps: - id: token - uses: immich-app/devtools/actions/create-workflow-token@9db058b2e6eec20e07760b0e17a0505c78ec3191 # create-workflow-token-action-v2.0.1 + uses: immich-app/devtools/actions/create-workflow-token@1af396ae134e4bc3b63d947e672bc68bf4ff9dc5 # create-workflow-token-action-v3.0.0 with: client-id: ${{ secrets.PUSH_O_MATIC_APP_CLIENT_ID }} private-key: ${{ secrets.PUSH_O_MATIC_APP_KEY }} + permission-contents: read + permission-actions: write - name: Check out code - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: persist-credentials: false token: ${{ steps.token.outputs.token }} diff --git a/.github/workflows/check-openapi.yml b/.github/workflows/check-openapi.yml index 9a93e931d3..522444db97 100644 --- a/.github/workflows/check-openapi.yml +++ b/.github/workflows/check-openapi.yml @@ -20,12 +20,12 @@ jobs: contents: read steps: - name: Checkout - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: persist-credentials: false - name: Check for breaking API changes - uses: oasdiff/oasdiff-action/breaking@e24529087d93f837b28b50bb66ba9016380a7fcc # v0.1.2 + uses: oasdiff/oasdiff-action/breaking@b7c3adeb54330db1903d27c61db520e5661ad55b # v0.1.11 with: base: https://raw.githubusercontent.com/${{ github.repository }}/main/open-api/immich-openapi-specs.json revision: open-api/immich-openapi-specs.json @@ -38,19 +38,18 @@ jobs: contents: read steps: - name: Checkout - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: persist-credentials: false - name: Setup Mise - uses: immich-app/devtools/actions/use-mise@3bca63ca3c15020293b36b51737a3ee2c773340b # use-mise-action-v3.1.0 + uses: immich-app/devtools/actions/use-mise@06a9ef925332c91be647d6256642b86b398592c8 # use-mise-action-v3.2.1 with: github_token: ${{ github.token }} working_directory: ./mobile - - name: Get packages - working-directory: ./mobile - run: flutter pub get + - name: Install dependencies + run: mise //mobile:install:ci - name: Fetch base spec from main run: | diff --git a/.github/workflows/cli.yml b/.github/workflows/cli.yml index 821427aef5..7cfa4bbc92 100644 --- a/.github/workflows/cli.yml +++ b/.github/workflows/cli.yml @@ -31,19 +31,20 @@ jobs: working-directory: ./packages/cli steps: - id: token - uses: immich-app/devtools/actions/create-workflow-token@9db058b2e6eec20e07760b0e17a0505c78ec3191 # create-workflow-token-action-v2.0.1 + uses: immich-app/devtools/actions/create-workflow-token@1af396ae134e4bc3b63d947e672bc68bf4ff9dc5 # create-workflow-token-action-v3.0.0 with: client-id: ${{ secrets.PUSH_O_MATIC_APP_CLIENT_ID }} private-key: ${{ secrets.PUSH_O_MATIC_APP_KEY }} + permission-contents: read - name: Checkout code - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: persist-credentials: false token: ${{ steps.token.outputs.token }} - name: Setup Mise - uses: immich-app/devtools/actions/use-mise@3bca63ca3c15020293b36b51737a3ee2c773340b # use-mise-action-v3.1.0 + uses: immich-app/devtools/actions/use-mise@06a9ef925332c91be647d6256642b86b398592c8 # use-mise-action-v3.2.1 with: github_token: ${{ steps.token.outputs.token }} @@ -63,25 +64,26 @@ jobs: steps: - id: token - uses: immich-app/devtools/actions/create-workflow-token@9db058b2e6eec20e07760b0e17a0505c78ec3191 # create-workflow-token-action-v2.0.1 + uses: immich-app/devtools/actions/create-workflow-token@1af396ae134e4bc3b63d947e672bc68bf4ff9dc5 # create-workflow-token-action-v3.0.0 with: client-id: ${{ secrets.PUSH_O_MATIC_APP_CLIENT_ID }} private-key: ${{ secrets.PUSH_O_MATIC_APP_KEY }} + permission-contents: read - name: Checkout - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: persist-credentials: false token: ${{ steps.token.outputs.token }} - name: Set up QEMU - uses: docker/setup-qemu-action@06116385d9baf250c9f4dcb4858b16962ea869c3 # v4.1.0 + uses: docker/setup-qemu-action@96fe6ef7f33517b61c61be40b68a1882f3264fb8 # v4.2.0 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@d7f5e7f509e45cec5c76c4d5afdd7de93d0b3df5 # v4.1.0 + uses: docker/setup-buildx-action@bb05f3f5519dd87d3ba754cc423b652a5edd6d2c # v4.2.0 - name: Login to GitHub Container Registry - uses: docker/login-action@650006c6eb7dba73a995cc03b0b2d7f5ca915bee # v4.2.0 + uses: docker/login-action@dbcb813823bdd20940b903addbd779551569679f # v4.6.0 if: ${{ !github.event.pull_request.head.repo.fork }} with: registry: ghcr.io @@ -96,7 +98,7 @@ jobs: - name: Generate docker image tags id: metadata - uses: docker/metadata-action@80c7e94dd9b9319bd5eb7a0e0fe9291e23a2a2e9 # v6.1.0 + uses: docker/metadata-action@dc802804100637a589fabce1cb79ff13a1411302 # v6.2.0 with: flavor: | latest=false @@ -107,7 +109,7 @@ jobs: type=raw,value=latest,enable=${{ github.event_name == 'release' && !github.event.release.prerelease }} - name: Build and push image - uses: docker/build-push-action@f9f3042f7e2789586610d6e8b85c8f03e5195baf # v7.2.0 + uses: docker/build-push-action@53b7df96c91f9c12dcc8a07bcb9ccacbed38856a # v7.3.0 with: file: packages/cli/Dockerfile platforms: linux/amd64,linux/arm64 diff --git a/.github/workflows/close-duplicates.yml b/.github/workflows/close-duplicates.yml index 6694781e72..a1ec4e80c8 100644 --- a/.github/workflows/close-duplicates.yml +++ b/.github/workflows/close-duplicates.yml @@ -39,7 +39,7 @@ jobs: needs: [get_body, should_run] if: ${{ needs.should_run.outputs.should_run == 'true' }} container: - image: ghcr.io/immich-app/mdq:main@sha256:2a64c7f045cb7b580fbdf3614d7d1805f5775fec453e3d1023764180efa8c70b + image: ghcr.io/immich-app/mdq:main@sha256:74b93dfbf13f8ee73eb35d8d5195ff667f93f9bc55df5ae453dd43a461c821fa outputs: checked: ${{ steps.get_checkbox.outputs.checked }} steps: diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 856be26a35..522de204ea 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -44,20 +44,21 @@ jobs: steps: - id: token - uses: immich-app/devtools/actions/create-workflow-token@9db058b2e6eec20e07760b0e17a0505c78ec3191 # create-workflow-token-action-v2.0.1 + uses: immich-app/devtools/actions/create-workflow-token@1af396ae134e4bc3b63d947e672bc68bf4ff9dc5 # create-workflow-token-action-v3.0.0 with: client-id: ${{ secrets.PUSH_O_MATIC_APP_CLIENT_ID }} private-key: ${{ secrets.PUSH_O_MATIC_APP_KEY }} + permission-contents: read - name: Checkout repository - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: persist-credentials: false token: ${{ steps.token.outputs.token }} # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@8aad20d150bbac5944a9f9d289da16a4b0d87c1e # v4.36.2 + uses: github/codeql-action/init@5595ccaf912efad79be6eef63a5619ff05969be3 # v4.37.6 with: languages: ${{ matrix.language }} # If you wish to specify custom queries, you can do so here or in a config file. @@ -70,7 +71,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@8aad20d150bbac5944a9f9d289da16a4b0d87c1e # v4.36.2 + uses: github/codeql-action/autobuild@5595ccaf912efad79be6eef63a5619ff05969be3 # v4.37.6 # ℹ️ 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 +84,6 @@ jobs: # ./location_of_script_within_repo/buildscript.sh - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@8aad20d150bbac5944a9f9d289da16a4b0d87c1e # v4.36.2 + uses: github/codeql-action/analyze@5595ccaf912efad79be6eef63a5619ff05969be3 # v4.37.6 with: category: '/language:${{matrix.language}}' diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 9ff2a705e6..90ba3f40d6 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -14,6 +14,10 @@ concurrency: permissions: {} +env: + GHCR_NAMESPACE: ghcr.io/${{ github.repository_owner }} + DOCKERHUB_NAMESPACE: docker.io/altran1502 + jobs: pre-job: runs-on: ubuntu-latest @@ -23,14 +27,15 @@ jobs: should_run: ${{ steps.check.outputs.should_run }} steps: - id: token - uses: immich-app/devtools/actions/create-workflow-token@9db058b2e6eec20e07760b0e17a0505c78ec3191 # create-workflow-token-action-v2.0.1 + uses: immich-app/devtools/actions/create-workflow-token@1af396ae134e4bc3b63d947e672bc68bf4ff9dc5 # create-workflow-token-action-v3.0.0 with: client-id: ${{ secrets.PUSH_O_MATIC_APP_CLIENT_ID }} private-key: ${{ secrets.PUSH_O_MATIC_APP_KEY }} + permission-contents: read - name: Check what should run id: check - uses: immich-app/devtools/actions/pre-job@91f342bb4477c4bc10c576ae739da875d85aa164 # pre-job-action-v2.0.4 + uses: immich-app/devtools/actions/pre-job@03514eceb4a27cd714976a866b350df5ce175720 # pre-job-action-v2.1.0 with: github-token: ${{ steps.token.outputs.token }} filters: | @@ -43,8 +48,6 @@ jobs: - 'machine-learning/**' force-filters: | - '.github/workflows/docker.yml' - - '.github/workflows/multi-runner-build.yml' - - '.github/actions/image-build' force-events: 'workflow_dispatch,release' retag_ml: @@ -57,10 +60,33 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - suffix: ['', '-cuda', '-rocm', '-openvino', '-armnn', '-rknn'] + include: &ml-variants + - image: immich-machine-learning + device: cpu + - image: immich-machine-learning + device: cuda + suffixes: '-cuda' + platforms: linux/amd64 + - image: immich-machine-learning + device: openvino + suffixes: '-openvino' + platforms: linux/amd64 + - image: immich-machine-learning + device: armnn + suffixes: '-armnn' + platforms: linux/arm64 + - image: immich-machine-learning + device: rknn + suffixes: '-rknn' + platforms: linux/arm64 + - image: immich-machine-learning + device: rocm + suffixes: '-rocm' + platforms: linux/amd64 + runner-mapping: '{"linux/amd64": "pokedex-large"}' steps: - name: Login to GitHub Container Registry - uses: docker/login-action@650006c6eb7dba73a995cc03b0b2d7f5ca915bee # v4.2.0 + uses: docker/login-action@dbcb813823bdd20940b903addbd779551569679f # v4.6.0 with: registry: ghcr.io username: ${{ github.repository_owner }} @@ -69,10 +95,10 @@ jobs: - name: Re-tag image env: REGISTRY_NAME: 'ghcr.io' - REPOSITORY: ${{ github.repository_owner }}/immich-machine-learning - TAG_OLD: main${{ matrix.suffix }} - TAG_PR: ${{ github.event.number == 0 && github.ref_name || format('pr-{0}', github.event.number) }}${{ matrix.suffix }} - TAG_COMMIT: commit-${{ github.event_name != 'pull_request' && github.sha || github.event.pull_request.head.sha }}${{ matrix.suffix }} + REPOSITORY: ${{ github.repository_owner }}/${{ matrix.image }} + TAG_OLD: main${{ matrix.suffixes }} + TAG_PR: ${{ github.event.number == 0 && github.ref_name || format('pr-{0}', github.event.number) }}${{ matrix.suffixes }} + TAG_COMMIT: commit-${{ github.event_name != 'pull_request' && github.sha || github.event.pull_request.head.sha }}${{ matrix.suffixes }} run: | docker buildx imagetools create -t "${REGISTRY_NAME}/${REPOSITORY}:${TAG_PR}" "${REGISTRY_NAME}/${REPOSITORY}:${TAG_OLD}" docker buildx imagetools create -t "${REGISTRY_NAME}/${REPOSITORY}:${TAG_COMMIT}" "${REGISTRY_NAME}/${REPOSITORY}:${TAG_OLD}" @@ -85,12 +111,9 @@ jobs: packages: write if: ${{ fromJSON(needs.pre-job.outputs.should_run).server == false && !github.event.pull_request.head.repo.fork }} runs-on: ubuntu-latest - strategy: - matrix: - suffix: [''] steps: - name: Login to GitHub Container Registry - uses: docker/login-action@650006c6eb7dba73a995cc03b0b2d7f5ca915bee # v4.2.0 + uses: docker/login-action@dbcb813823bdd20940b903addbd779551569679f # v4.6.0 with: registry: ghcr.io username: ${{ github.repository_owner }} @@ -100,9 +123,9 @@ jobs: env: REGISTRY_NAME: 'ghcr.io' REPOSITORY: ${{ github.repository_owner }}/immich-server - TAG_OLD: main${{ matrix.suffix }} - TAG_PR: ${{ github.event.number == 0 && github.ref_name || format('pr-{0}', github.event.number) }}${{ matrix.suffix }} - TAG_COMMIT: commit-${{ github.event_name != 'pull_request' && github.sha || github.event.pull_request.head.sha }}${{ matrix.suffix }} + TAG_OLD: main + TAG_PR: ${{ github.event.number == 0 && github.ref_name || format('pr-{0}', github.event.number) }} + TAG_COMMIT: commit-${{ github.event_name != 'pull_request' && github.sha || github.event.pull_request.head.sha }} run: | docker buildx imagetools create -t "${REGISTRY_NAME}/${REPOSITORY}:${TAG_PR}" "${REGISTRY_NAME}/${REPOSITORY}:${TAG_OLD}" docker buildx imagetools create -t "${REGISTRY_NAME}/${REPOSITORY}:${TAG_COMMIT}" "${REGISTRY_NAME}/${REPOSITORY}:${TAG_OLD}" @@ -114,40 +137,27 @@ jobs: strategy: fail-fast: false matrix: - include: - - device: cpu - - device: cuda - suffixes: '-cuda' - platforms: linux/amd64 - - device: openvino - suffixes: '-openvino' - platforms: linux/amd64 - - device: armnn - suffixes: '-armnn' - platforms: linux/arm64 - - device: rknn - suffixes: '-rknn' - platforms: linux/arm64 - - device: rocm - suffixes: '-rocm' - platforms: linux/amd64 - runner-mapping: '{"linux/amd64": "pokedex-large"}' - uses: immich-app/devtools/.github/workflows/multi-runner-build.yml@50dc3a14f0606ecd8fc28d78d3a3c655115ab695 # multi-runner-build-workflow-v3.1.0 + include: *ml-variants + uses: immich-app/devtools/.github/workflows/multi-runner-build.yml@4d420cf8e5ea499f99b2c2849ff9a219d5f7b178 # multi-runner-build-workflow-v4.0.0 permissions: contents: read actions: read packages: write - secrets: - DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }} - DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }} with: - image: immich-machine-learning + image: ${{ matrix.image }} context: machine-learning dockerfile: machine-learning/Dockerfile platforms: ${{ matrix.platforms }} runner-mapping: ${{ matrix.runner-mapping }} suffixes: ${{ matrix.suffixes }} - dockerhub-push: ${{ github.event_name == 'release' && !github.event.release.prerelease }} + tags: &tag-rules | + type=ref,event=branch + type=ref,event=pr + type=sha,format=long,prefix=commit- + type=semver,pattern={{version}},prefix=v + type=semver,pattern={{major}},prefix=v + type=match,pattern=v(\d+),group=1,prefix=v,suffix=-rc,enable=${{ github.event.release.prerelease == true }} + type=raw,value=release,enable=${{ github.event_name == 'release' && github.event.release.prerelease == false }} build-args: | DEVICE=${{ matrix.device }} @@ -155,25 +165,72 @@ jobs: name: Build and Push Server needs: pre-job if: ${{ fromJSON(needs.pre-job.outputs.should_run).server == true }} - uses: immich-app/devtools/.github/workflows/multi-runner-build.yml@50dc3a14f0606ecd8fc28d78d3a3c655115ab695 # multi-runner-build-workflow-v3.1.0 + uses: immich-app/devtools/.github/workflows/multi-runner-build.yml@4d420cf8e5ea499f99b2c2849ff9a219d5f7b178 # multi-runner-build-workflow-v4.0.0 permissions: contents: read actions: read packages: write - secrets: - DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }} - DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }} with: image: immich-server context: . dockerfile: server/Dockerfile - dockerhub-push: ${{ github.event_name == 'release' && !github.event.release.prerelease }} + tags: *tag-rules build-args: | DEVICE=cpu + mirror: + name: Mirror to Docker Hub + needs: [machine-learning, server] + if: ${{ github.event_name == 'release' && github.event.release.prerelease == false }} + permissions: + packages: read + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + # Slightly hacky; we reuse the ml matrix but tack on immich-server too + image: [immich-server] + include: *ml-variants + env: + IMAGE: ${{ matrix.image }} + SUFFIX: ${{ matrix.suffixes }} + steps: + - name: Login to GitHub Container Registry + uses: docker/login-action@dbcb813823bdd20940b903addbd779551569679f # v4.6.0 + with: + registry: ghcr.io + username: ${{ github.repository_owner }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Login to Docker Hub + uses: docker/login-action@dbcb813823bdd20940b903addbd779551569679f # v4.6.0 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + + - name: Generate docker image tags + id: meta + uses: docker/metadata-action@dc802804100637a589fabce1cb79ff13a1411302 # v6.2.0 + with: + flavor: | + latest=false + images: ${{ env.GHCR_NAMESPACE }}/${{ env.IMAGE }} + tags: *tag-rules + + - name: Mirror tags to Docker Hub + env: + TAGS: ${{ steps.meta.outputs.tags }} + run: | + for tag in ${TAGS}; do + version="${tag##*:}" + docker buildx imagetools create \ + -t "${DOCKERHUB_NAMESPACE}/${IMAGE}:${version}${SUFFIX}" \ + "${GHCR_NAMESPACE}/${IMAGE}:${version}${SUFFIX}" + done + success-check-server: name: Docker Build & Push Server Success - needs: [server, retag_server] + needs: [server, retag_server, mirror] permissions: {} runs-on: ubuntu-latest if: always() @@ -184,7 +241,7 @@ jobs: success-check-ml: name: Docker Build & Push ML Success - needs: [machine-learning, retag_ml] + needs: [machine-learning, retag_ml, mirror] permissions: {} runs-on: ubuntu-latest if: always() diff --git a/.github/workflows/docs-build.yml b/.github/workflows/docs-build.yml index af5293adce..e0c5de3fab 100644 --- a/.github/workflows/docs-build.yml +++ b/.github/workflows/docs-build.yml @@ -21,14 +21,15 @@ jobs: should_run: ${{ steps.check.outputs.should_run }} steps: - id: token - uses: immich-app/devtools/actions/create-workflow-token@9db058b2e6eec20e07760b0e17a0505c78ec3191 # create-workflow-token-action-v2.0.1 + uses: immich-app/devtools/actions/create-workflow-token@1af396ae134e4bc3b63d947e672bc68bf4ff9dc5 # create-workflow-token-action-v3.0.0 with: client-id: ${{ secrets.PUSH_O_MATIC_APP_CLIENT_ID }} private-key: ${{ secrets.PUSH_O_MATIC_APP_KEY }} + permission-contents: read - name: Check what should run id: check - uses: immich-app/devtools/actions/pre-job@91f342bb4477c4bc10c576ae739da875d85aa164 # pre-job-action-v2.0.4 + uses: immich-app/devtools/actions/pre-job@03514eceb4a27cd714976a866b350df5ce175720 # pre-job-action-v2.1.0 with: github-token: ${{ steps.token.outputs.token }} filters: | @@ -54,19 +55,20 @@ jobs: steps: - id: token - uses: immich-app/devtools/actions/create-workflow-token@9db058b2e6eec20e07760b0e17a0505c78ec3191 # create-workflow-token-action-v2.0.1 + uses: immich-app/devtools/actions/create-workflow-token@1af396ae134e4bc3b63d947e672bc68bf4ff9dc5 # create-workflow-token-action-v3.0.0 with: client-id: ${{ secrets.PUSH_O_MATIC_APP_CLIENT_ID }} private-key: ${{ secrets.PUSH_O_MATIC_APP_KEY }} + permission-contents: read - name: Checkout code - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: persist-credentials: false token: ${{ steps.token.outputs.token }} - name: Setup Mise - uses: immich-app/devtools/actions/use-mise@3bca63ca3c15020293b36b51737a3ee2c773340b # use-mise-action-v3.1.0 + uses: immich-app/devtools/actions/use-mise@06a9ef925332c91be647d6256642b86b398592c8 # use-mise-action-v3.2.1 with: github_token: ${{ steps.token.outputs.token }} diff --git a/.github/workflows/docs-deploy.yml b/.github/workflows/docs-deploy.yml index 089450c9af..b88e3f56dc 100644 --- a/.github/workflows/docs-deploy.yml +++ b/.github/workflows/docs-deploy.yml @@ -20,10 +20,12 @@ jobs: artifact: ${{ steps.get-artifact.outputs.result }} steps: - id: token - uses: immich-app/devtools/actions/create-workflow-token@9db058b2e6eec20e07760b0e17a0505c78ec3191 # create-workflow-token-action-v2.0.1 + uses: immich-app/devtools/actions/create-workflow-token@1af396ae134e4bc3b63d947e672bc68bf4ff9dc5 # create-workflow-token-action-v3.0.0 with: client-id: ${{ secrets.PUSH_O_MATIC_APP_CLIENT_ID }} private-key: ${{ secrets.PUSH_O_MATIC_APP_KEY }} + permission-actions: read + permission-pull-requests: read - if: ${{ github.event.workflow_run.conclusion != 'success' }} run: echo 'The triggering workflow did not succeed' && exit 1 @@ -126,19 +128,22 @@ jobs: if: ${{ fromJson(needs.checks.outputs.artifact).found && fromJson(needs.checks.outputs.parameters).shouldDeploy }} steps: - id: token - uses: immich-app/devtools/actions/create-workflow-token@9db058b2e6eec20e07760b0e17a0505c78ec3191 # create-workflow-token-action-v2.0.1 + uses: immich-app/devtools/actions/create-workflow-token@1af396ae134e4bc3b63d947e672bc68bf4ff9dc5 # create-workflow-token-action-v3.0.0 with: client-id: ${{ secrets.PUSH_O_MATIC_APP_CLIENT_ID }} private-key: ${{ secrets.PUSH_O_MATIC_APP_KEY }} + permission-contents: read + permission-actions: read + permission-pull-requests: write - name: Checkout code - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: persist-credentials: false token: ${{ steps.token.outputs.token }} - name: Setup Mise - uses: immich-app/devtools/actions/use-mise@3bca63ca3c15020293b36b51737a3ee2c773340b # use-mise-action-v3.1.0 + uses: immich-app/devtools/actions/use-mise@06a9ef925332c91be647d6256642b86b398592c8 # use-mise-action-v3.2.1 with: github_token: ${{ steps.token.outputs.token }} diff --git a/.github/workflows/docs-destroy.yml b/.github/workflows/docs-destroy.yml index 45d8b1c73f..cdb3f83c96 100644 --- a/.github/workflows/docs-destroy.yml +++ b/.github/workflows/docs-destroy.yml @@ -17,19 +17,21 @@ jobs: pull-requests: write steps: - id: token - uses: immich-app/devtools/actions/create-workflow-token@9db058b2e6eec20e07760b0e17a0505c78ec3191 # create-workflow-token-action-v2.0.1 + uses: immich-app/devtools/actions/create-workflow-token@1af396ae134e4bc3b63d947e672bc68bf4ff9dc5 # create-workflow-token-action-v3.0.0 with: client-id: ${{ secrets.PUSH_O_MATIC_APP_CLIENT_ID }} private-key: ${{ secrets.PUSH_O_MATIC_APP_KEY }} + permission-contents: read + permission-pull-requests: write - name: Checkout code - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: persist-credentials: false token: ${{ steps.token.outputs.token }} - name: Setup Mise - uses: immich-app/devtools/actions/use-mise@3bca63ca3c15020293b36b51737a3ee2c773340b # use-mise-action-v3.1.0 + uses: immich-app/devtools/actions/use-mise@06a9ef925332c91be647d6256642b86b398592c8 # use-mise-action-v3.2.1 with: github_token: ${{ steps.token.outputs.token }} diff --git a/.github/workflows/fdroid.yml b/.github/workflows/fdroid.yml new file mode 100644 index 0000000000..8744f21294 --- /dev/null +++ b/.github/workflows/fdroid.yml @@ -0,0 +1,56 @@ +name: Update F-Droid Repo + +on: + release: + types: [published] + +permissions: {} + +jobs: + update-index: + runs-on: ubuntu-latest + if: ${{ !github.event.release.prerelease }} + permissions: + contents: read + steps: + - name: Checkout pubspec for versionCode + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + ref: ${{ github.event.release.tag_name }} + persist-credentials: false + sparse-checkout: mobile/pubspec.yaml + sparse-checkout-cone-mode: false + + - name: Update F-Droid repo + env: + GITLAB_TOKEN: ${{ secrets.FDROID_REPO_TOKEN }} + RELEASE: ${{ toJSON(github.event.release) }} + TAG: ${{ github.event.release.tag_name }} + run: | + VERSION_CODE=$(yq '.version' mobile/pubspec.yaml | cut -d+ -f2) + export VERSION_CODE + + NEW_ENTRY=$(yq -P ' + [.assets[] | select(.name == "app-release.apk")] as $matches | + with(select($matches | length == 0); error("app-release.apk not found in release assets")) | + { + "url": $matches[0].browser_download_url, + "sha256sum": ($matches[0].digest | sub("^sha256:", "")), + "date": (.published_at | split("T") | .[0]), + "version-code": env(VERSION_CODE) + } | .date tag= "!!timestamp" + ' <<< "$RELEASE") + export NEW_ENTRY + + git clone --depth 1 "https://oauth2:${GITLAB_TOKEN}@gitlab.futo.org/fdroid/repo-v2.git" fdroid-repo + cd fdroid-repo + + yq -i ' + with(select([.apks[] | select(."version-code" == env(VERSION_CODE))] | length > 0); error("version-code already in index")) | + .apks = [env(NEW_ENTRY)] + .apks + ' apps/Immich/index.yml + + git config user.name "Immich Release Bot" + git config user.email "bot@immich.app" + git commit -am "Immich: add version-code ${VERSION_CODE} (${TAG})" + git push diff --git a/.github/workflows/fix-format.yml b/.github/workflows/fix-format.yml index 4cba413aec..2638c31fca 100644 --- a/.github/workflows/fix-format.yml +++ b/.github/workflows/fix-format.yml @@ -15,20 +15,22 @@ jobs: pull-requests: write steps: - id: token - uses: immich-app/devtools/actions/create-workflow-token@9db058b2e6eec20e07760b0e17a0505c78ec3191 # create-workflow-token-action-v2.0.1 + uses: immich-app/devtools/actions/create-workflow-token@1af396ae134e4bc3b63d947e672bc68bf4ff9dc5 # create-workflow-token-action-v3.0.0 with: client-id: ${{ secrets.PUSH_O_MATIC_APP_CLIENT_ID }} private-key: ${{ secrets.PUSH_O_MATIC_APP_KEY }} + permission-contents: write + permission-pull-requests: write - name: Checkout code - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: ref: ${{ github.event.pull_request.head.ref }} persist-credentials: true token: ${{ steps.token.outputs.token }} - name: Setup Mise - uses: immich-app/devtools/actions/use-mise@3bca63ca3c15020293b36b51737a3ee2c773340b # use-mise-action-v3.1.0 + uses: immich-app/devtools/actions/use-mise@06a9ef925332c91be647d6256642b86b398592c8 # use-mise-action-v3.2.1 with: github_token: ${{ steps.token.outputs.token }} diff --git a/.github/workflows/merge-translations.yml b/.github/workflows/merge-translations.yml index ff00a16b6e..72edb0efd0 100644 --- a/.github/workflows/merge-translations.yml +++ b/.github/workflows/merge-translations.yml @@ -35,6 +35,8 @@ jobs: with: client-id: ${{ secrets.PUSH_O_MATIC_APP_CLIENT_ID }} private-key: ${{ secrets.PUSH_O_MATIC_APP_KEY }} + permission-contents: write + permission-pull-requests: write - name: Find translation PR id: find_pr diff --git a/.github/workflows/pr-label-validation.yml b/.github/workflows/pr-label-validation.yml index d99ce46d29..5820a8b284 100644 --- a/.github/workflows/pr-label-validation.yml +++ b/.github/workflows/pr-label-validation.yml @@ -14,13 +14,14 @@ jobs: pull-requests: write steps: - id: token - uses: immich-app/devtools/actions/create-workflow-token@9db058b2e6eec20e07760b0e17a0505c78ec3191 # create-workflow-token-action-v2.0.1 + uses: immich-app/devtools/actions/create-workflow-token@1af396ae134e4bc3b63d947e672bc68bf4ff9dc5 # create-workflow-token-action-v3.0.0 with: client-id: ${{ secrets.PUSH_O_MATIC_APP_CLIENT_ID }} private-key: ${{ secrets.PUSH_O_MATIC_APP_KEY }} + permission-pull-requests: write - name: Require PR to have a changelog label - uses: mheap/github-action-required-labels@0ac283b4e65c1fb28ce6079dea5546ceca98ccbe # v5.5.2 + uses: mheap/github-action-required-labels@23e10fde7e062233401931a0eece796cd9bf3177 # v5.6.0 with: token: ${{ steps.token.outputs.token }} mode: exactly diff --git a/.github/workflows/pr-labeler.yml b/.github/workflows/pr-labeler.yml index 3d1646a88d..d924c84596 100644 --- a/.github/workflows/pr-labeler.yml +++ b/.github/workflows/pr-labeler.yml @@ -12,11 +12,13 @@ jobs: runs-on: ubuntu-latest steps: - id: token - uses: immich-app/devtools/actions/create-workflow-token@9db058b2e6eec20e07760b0e17a0505c78ec3191 # create-workflow-token-action-v2.0.1 + uses: immich-app/devtools/actions/create-workflow-token@1af396ae134e4bc3b63d947e672bc68bf4ff9dc5 # create-workflow-token-action-v3.0.0 with: client-id: ${{ secrets.PUSH_O_MATIC_APP_CLIENT_ID }} private-key: ${{ secrets.PUSH_O_MATIC_APP_KEY }} + permission-contents: read + permission-pull-requests: write - - uses: actions/labeler@f27b608878404679385c85cfa523b85ccb86e213 # v6.1.0 + - uses: actions/labeler@bf12e9b00b37c5c0ca2b87b79b2daf7891dbda13 # v7.0.0 with: repo-token: ${{ steps.token.outputs.token }} diff --git a/.github/workflows/prepare-release.yml b/.github/workflows/prepare-release.yml index 35b3249855..abc84c7cdb 100644 --- a/.github/workflows/prepare-release.yml +++ b/.github/workflows/prepare-release.yml @@ -17,10 +17,6 @@ on: - prepatch - prerelease - release - mobileBump: - description: 'Bump mobile build number' - required: false - type: boolean skipTranslations: description: 'Skip translations' required: false @@ -54,32 +50,32 @@ jobs: permissions: {} # No job-level permissions are needed because it uses the app-token steps: - id: token - uses: immich-app/devtools/actions/create-workflow-token@9db058b2e6eec20e07760b0e17a0505c78ec3191 # create-workflow-token-action-v2.0.1 + uses: immich-app/devtools/actions/create-workflow-token@1af396ae134e4bc3b63d947e672bc68bf4ff9dc5 # create-workflow-token-action-v3.0.0 with: client-id: ${{ secrets.PUSH_O_MATIC_APP_CLIENT_ID }} private-key: ${{ secrets.PUSH_O_MATIC_APP_KEY }} + permission-contents: write - name: Checkout code - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: token: ${{ steps.token.outputs.token }} persist-credentials: true ref: main - name: Setup Mise - uses: immich-app/devtools/actions/use-mise@3bca63ca3c15020293b36b51737a3ee2c773340b # use-mise-action-v3.1.0 + uses: immich-app/devtools/actions/use-mise@06a9ef925332c91be647d6256642b86b398592c8 # use-mise-action-v3.2.1 with: github_token: ${{ steps.token.outputs.token }} # TODO move to mise - name: Install uv - uses: astral-sh/setup-uv@fac544c07dec837d0ccb6301d7b5580bf5edae39 # v8.2.0 + uses: astral-sh/setup-uv@c771a70e6277c0a99b617c7a806ffedaca235ff9 # v9.0.0 - name: Bump version env: RELEASE_TYPE: ${{ inputs.releaseType }} - MOBILE_BUMP: ${{ inputs.mobileBump }} - run: mise //:release --type "${RELEASE_TYPE}" --mobile "${MOBILE_BUMP}" + run: mise //:release --type "${RELEASE_TYPE}" - id: output run: | @@ -106,6 +102,8 @@ jobs: contents: read pull-requests: write secrets: + PUSH_O_MATIC_APP_CLIENT_ID: ${{ secrets.PUSH_O_MATIC_APP_CLIENT_ID }} + PUSH_O_MATIC_APP_KEY: ${{ secrets.PUSH_O_MATIC_APP_KEY }} KEY_JKS: ${{ secrets.KEY_JKS }} ALIAS: ${{ secrets.ALIAS }} ANDROID_KEY_PASSWORD: ${{ secrets.ANDROID_KEY_PASSWORD }} @@ -135,9 +133,11 @@ jobs: with: client-id: ${{ secrets.PUSH_O_MATIC_APP_CLIENT_ID }} private-key: ${{ secrets.PUSH_O_MATIC_APP_KEY }} + permission-contents: write + permission-actions: read - name: Checkout - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: token: ${{ steps.generate-token.outputs.token }} persist-credentials: false @@ -149,19 +149,23 @@ jobs: github-token: ${{ steps.generate-token.outputs.token }} - name: Create draft release - uses: softprops/action-gh-release@b4309332981a82ec1c5618f44dd2e27cc8bfbfda # v3.0.0 - with: - draft: true - prerelease: ${{ needs.bump_version.outputs.rc }} - tag_name: ${{ needs.bump_version.outputs.version }} - token: ${{ steps.generate-token.outputs.token }} - generate_release_notes: true - body_path: misc/release/notes.tmpl - files: | - docker/docker-compose.yml - docker/docker-compose.rootless.yml - docker/example.env - docker/hwaccel.ml.yml - docker/hwaccel.transcoding.yml - docker/prometheus.yml + env: + GH_TOKEN: ${{ steps.generate-token.outputs.token }} + REPO: ${{ github.repository }} + TAG: ${{ needs.bump_version.outputs.version }} + PRERELEASE: ${{ needs.bump_version.outputs.rc }} + run: | + gh release create "${TAG}" \ + --repo "${REPO}" \ + --draft \ + --verify-tag \ + --prerelease="${PRERELEASE}" \ + --notes-file misc/release/notes.tmpl \ + --generate-notes \ + docker/docker-compose.yml \ + docker/docker-compose.rootless.yml \ + docker/example.env \ + docker/hwaccel.ml.yml \ + docker/hwaccel.transcoding.yml \ + docker/prometheus.yml \ *.apk diff --git a/.github/workflows/preview-label.yaml b/.github/workflows/preview-label.yaml index 736507fee9..95be3b88e2 100644 --- a/.github/workflows/preview-label.yaml +++ b/.github/workflows/preview-label.yaml @@ -14,10 +14,11 @@ jobs: pull-requests: write steps: - id: token - uses: immich-app/devtools/actions/create-workflow-token@9db058b2e6eec20e07760b0e17a0505c78ec3191 # create-workflow-token-action-v2.0.1 + uses: immich-app/devtools/actions/create-workflow-token@1af396ae134e4bc3b63d947e672bc68bf4ff9dc5 # create-workflow-token-action-v3.0.0 with: client-id: ${{ secrets.PUSH_O_MATIC_APP_CLIENT_ID }} private-key: ${{ secrets.PUSH_O_MATIC_APP_KEY }} + permission-pull-requests: write - uses: immich-app/devtools/actions/sticky-comment@0135acd12ad9f3369b94a2aa3c0ae8c835a4e926 # sticky-comment-action-v1.0.0 with: @@ -32,10 +33,11 @@ jobs: pull-requests: write steps: - id: token - uses: immich-app/devtools/actions/create-workflow-token@9db058b2e6eec20e07760b0e17a0505c78ec3191 # create-workflow-token-action-v2.0.1 + uses: immich-app/devtools/actions/create-workflow-token@1af396ae134e4bc3b63d947e672bc68bf4ff9dc5 # create-workflow-token-action-v3.0.0 with: client-id: ${{ secrets.PUSH_O_MATIC_APP_CLIENT_ID }} private-key: ${{ secrets.PUSH_O_MATIC_APP_KEY }} + permission-pull-requests: write - uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 with: diff --git a/.github/workflows/sdk.yml b/.github/workflows/sdk.yml index 416eaf7fa7..9c6101e4e1 100644 --- a/.github/workflows/sdk.yml +++ b/.github/workflows/sdk.yml @@ -16,19 +16,20 @@ jobs: packages: write steps: - id: token - uses: immich-app/devtools/actions/create-workflow-token@9db058b2e6eec20e07760b0e17a0505c78ec3191 # create-workflow-token-action-v2.0.1 + uses: immich-app/devtools/actions/create-workflow-token@1af396ae134e4bc3b63d947e672bc68bf4ff9dc5 # create-workflow-token-action-v3.0.0 with: client-id: ${{ secrets.PUSH_O_MATIC_APP_CLIENT_ID }} private-key: ${{ secrets.PUSH_O_MATIC_APP_KEY }} + permission-contents: read - name: Checkout code - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: persist-credentials: false token: ${{ steps.token.outputs.token }} - name: Setup Mise - uses: immich-app/devtools/actions/use-mise@3bca63ca3c15020293b36b51737a3ee2c773340b # use-mise-action-v3.1.0 + uses: immich-app/devtools/actions/use-mise@06a9ef925332c91be647d6256642b86b398592c8 # use-mise-action-v3.2.1 with: github_token: ${{ steps.token.outputs.token }} diff --git a/.github/workflows/static_analysis.yml b/.github/workflows/static_analysis.yml index 008730b514..0a3c61668c 100644 --- a/.github/workflows/static_analysis.yml +++ b/.github/workflows/static_analysis.yml @@ -20,19 +20,21 @@ jobs: should_run: ${{ steps.check.outputs.should_run }} steps: - id: token - uses: immich-app/devtools/actions/create-workflow-token@9db058b2e6eec20e07760b0e17a0505c78ec3191 # create-workflow-token-action-v2.0.1 + uses: immich-app/devtools/actions/create-workflow-token@1af396ae134e4bc3b63d947e672bc68bf4ff9dc5 # create-workflow-token-action-v3.0.0 with: client-id: ${{ secrets.PUSH_O_MATIC_APP_CLIENT_ID }} private-key: ${{ secrets.PUSH_O_MATIC_APP_KEY }} + permission-contents: read - name: Check what should run id: check - uses: immich-app/devtools/actions/pre-job@91f342bb4477c4bc10c576ae739da875d85aa164 # pre-job-action-v2.0.4 + uses: immich-app/devtools/actions/pre-job@03514eceb4a27cd714976a866b350df5ce175720 # pre-job-action-v2.1.0 with: github-token: ${{ steps.token.outputs.token }} filters: | mobile: - 'mobile/**' + - 'i18n/en.json' force-filters: | - '.github/workflows/static_analysis.yml' force-events: 'workflow_dispatch,release' @@ -49,58 +51,33 @@ jobs: working-directory: ./mobile steps: - id: token - uses: immich-app/devtools/actions/create-workflow-token@9db058b2e6eec20e07760b0e17a0505c78ec3191 # create-workflow-token-action-v2.0.1 + uses: immich-app/devtools/actions/create-workflow-token@1af396ae134e4bc3b63d947e672bc68bf4ff9dc5 # create-workflow-token-action-v3.0.0 with: client-id: ${{ secrets.PUSH_O_MATIC_APP_CLIENT_ID }} private-key: ${{ secrets.PUSH_O_MATIC_APP_KEY }} + permission-contents: read - name: Checkout code - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: persist-credentials: false token: ${{ steps.token.outputs.token }} - name: Setup Mise - uses: immich-app/devtools/actions/use-mise@3bca63ca3c15020293b36b51737a3ee2c773340b # use-mise-action-v3.1.0 + uses: immich-app/devtools/actions/use-mise@06a9ef925332c91be647d6256642b86b398592c8 # use-mise-action-v3.2.1 with: github_token: ${{ steps.token.outputs.token }} working_directory: ./mobile - name: Install dependencies - run: flutter pub get + run: mise //mobile:install:ci - name: Install dependencies for UI package - run: flutter pub get + run: flutter pub get --enforce-lockfile working-directory: ./mobile/packages/ui - - name: Generate translation files - run: mise //mobile:codegen:translation - - - name: Run Build Runner - run: mise //mobile:codegen:dart - - - name: Generate platform API - run: mise //mobile:codegen:pigeon - - - name: Find file changes - uses: tj-actions/verify-changed-files@a1c6acee9df209257a246f2cc6ae8cb6581c1edf # v20.0.4 - id: verify-changed-files - with: - files: | - mobile/**/*.g.dart - mobile/**/*.gr.dart - mobile/**/*.drift.dart - mobile/**/*.g.swift - mobile/**/*.g.kt - - - name: Verify files have not changed - if: steps.verify-changed-files.outputs.files_changed == 'true' - env: - CHANGED_FILES: ${{ steps.verify-changed-files.outputs.changed_files }} - run: | - echo "ERROR: Generated files not up to date! Run 'mise //mobile:codegen:dart' and 'mise //mobile:codegen:pigeon'" - echo "Changed files: ${CHANGED_FILES}" - exit 1 + - name: Perform codegen + run: mise //mobile:codegen - name: Run analyze run: mise //mobile:analyze diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 465f18ae8b..cb3448e870 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -17,14 +17,15 @@ jobs: should_run: ${{ steps.check.outputs.should_run }} steps: - id: token - uses: immich-app/devtools/actions/create-workflow-token@9db058b2e6eec20e07760b0e17a0505c78ec3191 # create-workflow-token-action-v2.0.1 + uses: immich-app/devtools/actions/create-workflow-token@1af396ae134e4bc3b63d947e672bc68bf4ff9dc5 # create-workflow-token-action-v3.0.0 with: client-id: ${{ secrets.PUSH_O_MATIC_APP_CLIENT_ID }} private-key: ${{ secrets.PUSH_O_MATIC_APP_KEY }} + permission-contents: read - name: Check what should run id: check - uses: immich-app/devtools/actions/pre-job@91f342bb4477c4bc10c576ae739da875d85aa164 # pre-job-action-v2.0.4 + uses: immich-app/devtools/actions/pre-job@03514eceb4a27cd714976a866b350df5ce175720 # pre-job-action-v2.1.0 with: github-token: ${{ steps.token.outputs.token }} filters: | @@ -77,19 +78,20 @@ jobs: contents: read steps: - id: token - uses: immich-app/devtools/actions/create-workflow-token@9db058b2e6eec20e07760b0e17a0505c78ec3191 # create-workflow-token-action-v2.0.1 + uses: immich-app/devtools/actions/create-workflow-token@1af396ae134e4bc3b63d947e672bc68bf4ff9dc5 # create-workflow-token-action-v3.0.0 with: client-id: ${{ secrets.PUSH_O_MATIC_APP_CLIENT_ID }} private-key: ${{ secrets.PUSH_O_MATIC_APP_KEY }} + permission-contents: read - name: Checkout code - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: persist-credentials: false token: ${{ steps.token.outputs.token }} - name: Setup Mise - uses: immich-app/devtools/actions/use-mise@3bca63ca3c15020293b36b51737a3ee2c773340b # use-mise-action-v3.1.0 + uses: immich-app/devtools/actions/use-mise@06a9ef925332c91be647d6256642b86b398592c8 # use-mise-action-v3.2.1 with: github_token: ${{ steps.token.outputs.token }} @@ -105,19 +107,20 @@ jobs: contents: read steps: - id: token - uses: immich-app/devtools/actions/create-workflow-token@9db058b2e6eec20e07760b0e17a0505c78ec3191 # create-workflow-token-action-v2.0.1 + uses: immich-app/devtools/actions/create-workflow-token@1af396ae134e4bc3b63d947e672bc68bf4ff9dc5 # create-workflow-token-action-v3.0.0 with: client-id: ${{ secrets.PUSH_O_MATIC_APP_CLIENT_ID }} private-key: ${{ secrets.PUSH_O_MATIC_APP_KEY }} + permission-contents: read - name: Checkout code - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: persist-credentials: false token: ${{ steps.token.outputs.token }} - name: Setup Mise - uses: immich-app/devtools/actions/use-mise@3bca63ca3c15020293b36b51737a3ee2c773340b # use-mise-action-v3.1.0 + uses: immich-app/devtools/actions/use-mise@06a9ef925332c91be647d6256642b86b398592c8 # use-mise-action-v3.2.1 with: github_token: ${{ steps.token.outputs.token }} @@ -136,19 +139,20 @@ jobs: working-directory: ./packages/cli steps: - id: token - uses: immich-app/devtools/actions/create-workflow-token@9db058b2e6eec20e07760b0e17a0505c78ec3191 # create-workflow-token-action-v2.0.1 + uses: immich-app/devtools/actions/create-workflow-token@1af396ae134e4bc3b63d947e672bc68bf4ff9dc5 # create-workflow-token-action-v3.0.0 with: client-id: ${{ secrets.PUSH_O_MATIC_APP_CLIENT_ID }} private-key: ${{ secrets.PUSH_O_MATIC_APP_KEY }} + permission-contents: read - name: Checkout code - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: persist-credentials: false token: ${{ steps.token.outputs.token }} - name: Setup Mise - uses: immich-app/devtools/actions/use-mise@3bca63ca3c15020293b36b51737a3ee2c773340b # use-mise-action-v3.1.0 + uses: immich-app/devtools/actions/use-mise@06a9ef925332c91be647d6256642b86b398592c8 # use-mise-action-v3.2.1 with: github_token: ${{ steps.token.outputs.token }} @@ -167,19 +171,20 @@ jobs: working-directory: ./packages/cli steps: - id: token - uses: immich-app/devtools/actions/create-workflow-token@9db058b2e6eec20e07760b0e17a0505c78ec3191 # create-workflow-token-action-v2.0.1 + uses: immich-app/devtools/actions/create-workflow-token@1af396ae134e4bc3b63d947e672bc68bf4ff9dc5 # create-workflow-token-action-v3.0.0 with: client-id: ${{ secrets.PUSH_O_MATIC_APP_CLIENT_ID }} private-key: ${{ secrets.PUSH_O_MATIC_APP_KEY }} + permission-contents: read - name: Checkout code - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: persist-credentials: false token: ${{ steps.token.outputs.token }} - name: Setup Mise - uses: immich-app/devtools/actions/use-mise@3bca63ca3c15020293b36b51737a3ee2c773340b # use-mise-action-v3.1.0 + uses: immich-app/devtools/actions/use-mise@06a9ef925332c91be647d6256642b86b398592c8 # use-mise-action-v3.2.1 with: github_token: ${{ steps.token.outputs.token }} @@ -211,19 +216,20 @@ jobs: working-directory: ./web steps: - id: token - uses: immich-app/devtools/actions/create-workflow-token@9db058b2e6eec20e07760b0e17a0505c78ec3191 # create-workflow-token-action-v2.0.1 + uses: immich-app/devtools/actions/create-workflow-token@1af396ae134e4bc3b63d947e672bc68bf4ff9dc5 # create-workflow-token-action-v3.0.0 with: client-id: ${{ secrets.PUSH_O_MATIC_APP_CLIENT_ID }} private-key: ${{ secrets.PUSH_O_MATIC_APP_KEY }} + permission-contents: read - name: Checkout code - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: persist-credentials: false token: ${{ steps.token.outputs.token }} - name: Setup Mise - uses: immich-app/devtools/actions/use-mise@3bca63ca3c15020293b36b51737a3ee2c773340b # use-mise-action-v3.1.0 + uses: immich-app/devtools/actions/use-mise@06a9ef925332c91be647d6256642b86b398592c8 # use-mise-action-v3.2.1 with: github_token: ${{ steps.token.outputs.token }} @@ -249,19 +255,20 @@ jobs: working-directory: ./web steps: - id: token - uses: immich-app/devtools/actions/create-workflow-token@9db058b2e6eec20e07760b0e17a0505c78ec3191 # create-workflow-token-action-v2.0.1 + uses: immich-app/devtools/actions/create-workflow-token@1af396ae134e4bc3b63d947e672bc68bf4ff9dc5 # create-workflow-token-action-v3.0.0 with: client-id: ${{ secrets.PUSH_O_MATIC_APP_CLIENT_ID }} private-key: ${{ secrets.PUSH_O_MATIC_APP_KEY }} + permission-contents: read - name: Checkout code - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: persist-credentials: false token: ${{ steps.token.outputs.token }} - name: Setup Mise - uses: immich-app/devtools/actions/use-mise@3bca63ca3c15020293b36b51737a3ee2c773340b # use-mise-action-v3.1.0 + uses: immich-app/devtools/actions/use-mise@06a9ef925332c91be647d6256642b86b398592c8 # use-mise-action-v3.2.1 with: github_token: ${{ steps.token.outputs.token }} @@ -277,19 +284,20 @@ jobs: contents: read steps: - id: token - uses: immich-app/devtools/actions/create-workflow-token@9db058b2e6eec20e07760b0e17a0505c78ec3191 # create-workflow-token-action-v2.0.1 + uses: immich-app/devtools/actions/create-workflow-token@1af396ae134e4bc3b63d947e672bc68bf4ff9dc5 # create-workflow-token-action-v3.0.0 with: client-id: ${{ secrets.PUSH_O_MATIC_APP_CLIENT_ID }} private-key: ${{ secrets.PUSH_O_MATIC_APP_KEY }} + permission-contents: read - name: Checkout code - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: persist-credentials: false token: ${{ steps.token.outputs.token }} - name: Setup Mise - uses: immich-app/devtools/actions/use-mise@3bca63ca3c15020293b36b51737a3ee2c773340b # use-mise-action-v3.1.0 + uses: immich-app/devtools/actions/use-mise@06a9ef925332c91be647d6256642b86b398592c8 # use-mise-action-v3.2.1 with: github_token: ${{ steps.token.outputs.token }} @@ -327,19 +335,20 @@ jobs: working-directory: ./e2e steps: - id: token - uses: immich-app/devtools/actions/create-workflow-token@9db058b2e6eec20e07760b0e17a0505c78ec3191 # create-workflow-token-action-v2.0.1 + uses: immich-app/devtools/actions/create-workflow-token@1af396ae134e4bc3b63d947e672bc68bf4ff9dc5 # create-workflow-token-action-v3.0.0 with: client-id: ${{ secrets.PUSH_O_MATIC_APP_CLIENT_ID }} private-key: ${{ secrets.PUSH_O_MATIC_APP_KEY }} + permission-contents: read - name: Checkout code - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: persist-credentials: false token: ${{ steps.token.outputs.token }} - name: Setup Mise - uses: immich-app/devtools/actions/use-mise@3bca63ca3c15020293b36b51737a3ee2c773340b # use-mise-action-v3.1.0 + uses: immich-app/devtools/actions/use-mise@06a9ef925332c91be647d6256642b86b398592c8 # use-mise-action-v3.2.1 with: github_token: ${{ steps.token.outputs.token }} @@ -359,20 +368,21 @@ jobs: working-directory: ./server steps: - id: token - uses: immich-app/devtools/actions/create-workflow-token@9db058b2e6eec20e07760b0e17a0505c78ec3191 # create-workflow-token-action-v2.0.1 + uses: immich-app/devtools/actions/create-workflow-token@1af396ae134e4bc3b63d947e672bc68bf4ff9dc5 # create-workflow-token-action-v3.0.0 with: client-id: ${{ secrets.PUSH_O_MATIC_APP_CLIENT_ID }} private-key: ${{ secrets.PUSH_O_MATIC_APP_KEY }} + permission-contents: read - name: Checkout code - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: persist-credentials: false submodules: 'recursive' token: ${{ steps.token.outputs.token }} - name: Setup Mise - uses: immich-app/devtools/actions/use-mise@3bca63ca3c15020293b36b51737a3ee2c773340b # use-mise-action-v3.1.0 + uses: immich-app/devtools/actions/use-mise@06a9ef925332c91be647d6256642b86b398592c8 # use-mise-action-v3.2.1 with: github_token: ${{ steps.token.outputs.token }} @@ -395,23 +405,24 @@ jobs: runner: [ubuntu-latest, ubuntu-24.04-arm] steps: - id: token - uses: immich-app/devtools/actions/create-workflow-token@9db058b2e6eec20e07760b0e17a0505c78ec3191 # create-workflow-token-action-v2.0.1 + uses: immich-app/devtools/actions/create-workflow-token@1af396ae134e4bc3b63d947e672bc68bf4ff9dc5 # create-workflow-token-action-v3.0.0 with: client-id: ${{ secrets.PUSH_O_MATIC_APP_CLIENT_ID }} private-key: ${{ secrets.PUSH_O_MATIC_APP_KEY }} + permission-contents: read - name: Checkout code - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: persist-credentials: false submodules: 'recursive' token: ${{ steps.token.outputs.token }} - name: Setup pnpm - uses: pnpm/action-setup@0ebf47130e4866e96fce0953f49152a61190b271 # v6.0.9 + uses: pnpm/action-setup@0977fd99725f1db4007ccb2928dbb4e90d06cc86 # v6.0.10 - name: Setup Node - uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 + uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0 with: node-version-file: '.nvmrc' cache: 'pnpm' @@ -430,6 +441,7 @@ jobs: if: ${{ !cancelled() }} - name: Start Docker Compose + id: docker run: docker compose up -d --build --renew-anon-volumes --force-recreate --remove-orphans --wait --wait-timeout 300 if: ${{ !cancelled() }} @@ -437,13 +449,13 @@ jobs: env: VITEST_DISABLE_DOCKER_SETUP: true run: pnpm test - if: ${{ !cancelled() }} + if: ${{ !cancelled() && steps.docker.outcome == 'success' }} - name: Run e2e tests (maintenance) env: VITEST_DISABLE_DOCKER_SETUP: true run: pnpm test:maintenance - if: ${{ !cancelled() }} + if: ${{ !cancelled() && steps.docker.outcome == 'success' }} - name: Capture Docker logs if: always() @@ -472,23 +484,24 @@ jobs: runner: [ubuntu-latest, ubuntu-24.04-arm] steps: - id: token - uses: immich-app/devtools/actions/create-workflow-token@9db058b2e6eec20e07760b0e17a0505c78ec3191 # create-workflow-token-action-v2.0.1 + uses: immich-app/devtools/actions/create-workflow-token@1af396ae134e4bc3b63d947e672bc68bf4ff9dc5 # create-workflow-token-action-v3.0.0 with: client-id: ${{ secrets.PUSH_O_MATIC_APP_CLIENT_ID }} private-key: ${{ secrets.PUSH_O_MATIC_APP_KEY }} + permission-contents: read - name: Checkout code - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: persist-credentials: false submodules: 'recursive' token: ${{ steps.token.outputs.token }} - name: Setup pnpm - uses: pnpm/action-setup@0ebf47130e4866e96fce0953f49152a61190b271 # v6.0.9 + uses: pnpm/action-setup@0977fd99725f1db4007ccb2928dbb4e90d06cc86 # v6.0.10 - name: Setup Node - uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 + uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0 with: node-version-file: '.nvmrc' cache: 'pnpm' @@ -507,6 +520,7 @@ jobs: if: ${{ !cancelled() }} - name: Docker build + id: docker run: docker compose up -d --build --renew-anon-volumes --force-recreate --remove-orphans --wait --wait-timeout 300 if: ${{ !cancelled() }} @@ -514,7 +528,7 @@ jobs: env: PLAYWRIGHT_DISABLE_WEBSERVER: true run: pnpm test:web - if: ${{ !cancelled() }} + if: ${{ !cancelled() && steps.docker.outcome == 'success' }} - name: Archive e2e test (web) results uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 @@ -527,7 +541,7 @@ jobs: env: PLAYWRIGHT_DISABLE_WEBSERVER: true run: pnpm test:web:ui - if: ${{ !cancelled() }} + if: ${{ !cancelled() && steps.docker.outcome == 'success' }} - name: Archive ui test (web) results uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 @@ -540,7 +554,7 @@ jobs: env: PLAYWRIGHT_DISABLE_WEBSERVER: true run: pnpm test:web:maintenance - if: ${{ !cancelled() }} + if: ${{ !cancelled() && steps.docker.outcome == 'success' }} - name: Archive maintenance tests (web) results uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 @@ -580,28 +594,28 @@ jobs: contents: read steps: - id: token - uses: immich-app/devtools/actions/create-workflow-token@9db058b2e6eec20e07760b0e17a0505c78ec3191 # create-workflow-token-action-v2.0.1 + uses: immich-app/devtools/actions/create-workflow-token@1af396ae134e4bc3b63d947e672bc68bf4ff9dc5 # create-workflow-token-action-v3.0.0 with: client-id: ${{ secrets.PUSH_O_MATIC_APP_CLIENT_ID }} private-key: ${{ secrets.PUSH_O_MATIC_APP_KEY }} + permission-contents: read - - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: persist-credentials: false token: ${{ steps.token.outputs.token }} - name: Setup Mise - uses: immich-app/devtools/actions/use-mise@3bca63ca3c15020293b36b51737a3ee2c773340b # use-mise-action-v3.1.0 + uses: immich-app/devtools/actions/use-mise@06a9ef925332c91be647d6256642b86b398592c8 # use-mise-action-v3.2.1 with: github_token: ${{ steps.token.outputs.token }} working_directory: ./mobile - name: Install dependencies - run: flutter pub get - working-directory: ./mobile + run: mise //mobile:install:ci - - name: Generate translation files - run: mise //mobile:codegen:translation + - name: Perform codegen + run: mise //mobile:codegen - name: Run tests run: mise //mobile:test @@ -618,18 +632,19 @@ jobs: working-directory: ./machine-learning steps: - id: token - uses: immich-app/devtools/actions/create-workflow-token@9db058b2e6eec20e07760b0e17a0505c78ec3191 # create-workflow-token-action-v2.0.1 + uses: immich-app/devtools/actions/create-workflow-token@1af396ae134e4bc3b63d947e672bc68bf4ff9dc5 # create-workflow-token-action-v3.0.0 with: client-id: ${{ secrets.PUSH_O_MATIC_APP_CLIENT_ID }} private-key: ${{ secrets.PUSH_O_MATIC_APP_KEY }} + permission-contents: read - - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: persist-credentials: false token: ${{ steps.token.outputs.token }} - name: Setup Mise - uses: immich-app/devtools/actions/use-mise@3bca63ca3c15020293b36b51737a3ee2c773340b # use-mise-action-v3.1.0 + uses: immich-app/devtools/actions/use-mise@06a9ef925332c91be647d6256642b86b398592c8 # use-mise-action-v3.2.1 with: github_token: ${{ steps.token.outputs.token }} @@ -648,19 +663,20 @@ jobs: working-directory: ./.github steps: - id: token - uses: immich-app/devtools/actions/create-workflow-token@9db058b2e6eec20e07760b0e17a0505c78ec3191 # create-workflow-token-action-v2.0.1 + uses: immich-app/devtools/actions/create-workflow-token@1af396ae134e4bc3b63d947e672bc68bf4ff9dc5 # create-workflow-token-action-v3.0.0 with: client-id: ${{ secrets.PUSH_O_MATIC_APP_CLIENT_ID }} private-key: ${{ secrets.PUSH_O_MATIC_APP_KEY }} + permission-contents: read - name: Checkout code - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: persist-credentials: false token: ${{ steps.token.outputs.token }} - name: Setup Mise - uses: immich-app/devtools/actions/use-mise@3bca63ca3c15020293b36b51737a3ee2c773340b # use-mise-action-v3.1.0 + uses: immich-app/devtools/actions/use-mise@06a9ef925332c91be647d6256642b86b398592c8 # use-mise-action-v3.2.1 with: github_token: ${{ steps.token.outputs.token }} @@ -678,12 +694,13 @@ jobs: contents: read steps: - id: token - uses: immich-app/devtools/actions/create-workflow-token@9db058b2e6eec20e07760b0e17a0505c78ec3191 # create-workflow-token-action-v2.0.1 + uses: immich-app/devtools/actions/create-workflow-token@1af396ae134e4bc3b63d947e672bc68bf4ff9dc5 # create-workflow-token-action-v3.0.0 with: client-id: ${{ secrets.PUSH_O_MATIC_APP_CLIENT_ID }} private-key: ${{ secrets.PUSH_O_MATIC_APP_KEY }} + permission-contents: read - - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: persist-credentials: false token: ${{ steps.token.outputs.token }} @@ -699,19 +716,20 @@ jobs: contents: read steps: - id: token - uses: immich-app/devtools/actions/create-workflow-token@9db058b2e6eec20e07760b0e17a0505c78ec3191 # create-workflow-token-action-v2.0.1 + uses: immich-app/devtools/actions/create-workflow-token@1af396ae134e4bc3b63d947e672bc68bf4ff9dc5 # create-workflow-token-action-v3.0.0 with: client-id: ${{ secrets.PUSH_O_MATIC_APP_CLIENT_ID }} private-key: ${{ secrets.PUSH_O_MATIC_APP_KEY }} + permission-contents: read - name: Checkout code - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: persist-credentials: false token: ${{ steps.token.outputs.token }} - name: Setup Mise - uses: immich-app/devtools/actions/use-mise@3bca63ca3c15020293b36b51737a3ee2c773340b # use-mise-action-v3.1.0 + uses: immich-app/devtools/actions/use-mise@06a9ef925332c91be647d6256642b86b398592c8 # use-mise-action-v3.2.1 with: github_token: ${{ steps.token.outputs.token }} @@ -726,7 +744,6 @@ jobs: id: verify-changed-files with: files: | - mobile/openapi packages/sdk open-api/immich-openapi-specs.json @@ -757,19 +774,20 @@ jobs: - 5432:5432 steps: - id: token - uses: immich-app/devtools/actions/create-workflow-token@9db058b2e6eec20e07760b0e17a0505c78ec3191 # create-workflow-token-action-v2.0.1 + uses: immich-app/devtools/actions/create-workflow-token@1af396ae134e4bc3b63d947e672bc68bf4ff9dc5 # create-workflow-token-action-v3.0.0 with: client-id: ${{ secrets.PUSH_O_MATIC_APP_CLIENT_ID }} private-key: ${{ secrets.PUSH_O_MATIC_APP_KEY }} + permission-contents: read - name: Checkout code - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: persist-credentials: false token: ${{ steps.token.outputs.token }} - name: Setup Mise - uses: immich-app/devtools/actions/use-mise@3bca63ca3c15020293b36b51737a3ee2c773340b # use-mise-action-v3.1.0 + uses: immich-app/devtools/actions/use-mise@06a9ef925332c91be647d6256642b86b398592c8 # use-mise-action-v3.2.1 with: github_token: ${{ steps.token.outputs.token }} @@ -902,6 +920,6 @@ jobs: # emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none # disable-animations: true # script: | -# flutter pub get +# flutter pub get --enforce-lockfile # flutter test integration_test # attempt_limit: 3 diff --git a/.github/workflows/weblate-lock.yml b/.github/workflows/weblate-lock.yml index af321ce534..94a81f8f5d 100644 --- a/.github/workflows/weblate-lock.yml +++ b/.github/workflows/weblate-lock.yml @@ -24,14 +24,15 @@ jobs: should_run: ${{ steps.check.outputs.should_run }} steps: - id: token - uses: immich-app/devtools/actions/create-workflow-token@9db058b2e6eec20e07760b0e17a0505c78ec3191 # create-workflow-token-action-v2.0.1 + uses: immich-app/devtools/actions/create-workflow-token@1af396ae134e4bc3b63d947e672bc68bf4ff9dc5 # create-workflow-token-action-v3.0.0 with: client-id: ${{ secrets.PUSH_O_MATIC_APP_CLIENT_ID }} private-key: ${{ secrets.PUSH_O_MATIC_APP_KEY }} + permission-contents: read - name: Check what should run id: check - uses: immich-app/devtools/actions/pre-job@91f342bb4477c4bc10c576ae739da875d85aa164 # pre-job-action-v2.0.4 + uses: immich-app/devtools/actions/pre-job@03514eceb4a27cd714976a866b350df5ce175720 # pre-job-action-v2.1.0 with: github-token: ${{ steps.token.outputs.token }} filters: | @@ -47,10 +48,11 @@ jobs: if: ${{ fromJSON(needs.pre-job.outputs.should_run).i18n == true }} steps: - id: token - uses: immich-app/devtools/actions/create-workflow-token@9db058b2e6eec20e07760b0e17a0505c78ec3191 # create-workflow-token-action-v2.0.1 + uses: immich-app/devtools/actions/create-workflow-token@1af396ae134e4bc3b63d947e672bc68bf4ff9dc5 # create-workflow-token-action-v3.0.0 with: client-id: ${{ secrets.PUSH_O_MATIC_APP_CLIENT_ID }} private-key: ${{ secrets.PUSH_O_MATIC_APP_KEY }} + permission-pull-requests: read - name: Bot review status env: diff --git a/.gitignore b/.gitignore index 8beeeedfe3..9acfc8a879 100644 --- a/.gitignore +++ b/.gitignore @@ -11,13 +11,10 @@ docker/library uploads coverage +mobile/generated mobile/gradle.properties -mobile/openapi/pubspec.lock mobile/*.jks mobile/libisar.dylib -mobile/openapi/test -mobile/openapi/doc -mobile/openapi/.openapi-generator/FILES mobile/ios/build packages/**/build diff --git a/.vscode/extensions.json b/.vscode/extensions.json index 399fedae33..782e0192f6 100644 --- a/.vscode/extensions.json +++ b/.vscode/extensions.json @@ -12,6 +12,8 @@ "editorconfig.editorconfig", "foxundermoon.shell-format", "timonwong.shellcheck", - "bluebrown.yamlfmt" + "bluebrown.yamlfmt", + // TODO TS 7 while it's still in preview + "typescriptteam.native-preview" ] } diff --git a/.vscode/settings.json b/.vscode/settings.json index 4653a1123b..23d4385964 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -29,9 +29,6 @@ "editor.formatOnSave": true, "tailwindCSS.lint.suggestCanonicalClasses": "ignore" }, - "svelte.plugin.svelte.compilerWarnings": { - "state_referenced_locally": "ignore" - }, "[typescript]": { "editor.defaultFormatter": "esbenp.prettier-vscode", "editor.formatOnSave": true @@ -43,37 +40,42 @@ "eslint.useFlatConfig": true, "eslint.validate": ["javascript", "typescript", "svelte"], "eslint.workingDirectories": [ - { "directory": "cli", "changeProcessCWD": true }, - { "directory": "e2e", "changeProcessCWD": true }, - { "directory": "server", "changeProcessCWD": true }, - { "directory": "web", "changeProcessCWD": true } + { "changeProcessCWD": true, "directory": "cli" }, + { "changeProcessCWD": true, "directory": "e2e" }, + { "changeProcessCWD": true, "directory": "server" }, + { "changeProcessCWD": true, "directory": "web" } ], - "files.watcherExclude": { - "**/.jj/**": true, - "**/.git/**": true, - "**/node_modules/**": true, - "**/build/**": true, - "**/dist/**": true, - "**/.svelte-kit/**": true - }, "explorer.fileNesting.enabled": true, "explorer.fileNesting.patterns": { "*.dart": "${capture}.g.dart,${capture}.gr.dart,${capture}.drift.dart", - "*.ts": "${capture}.spec.ts,${capture}.mock.ts", "*.js": "${capture}.spec.js,${capture}.mock.js", + "*.ts": "${capture}.spec.ts,${capture}.mock.ts", "package.json": "package-lock.json, yarn.lock, pnpm-lock.yaml, bun.lockb, bun.lock, pnpm-workspace.yaml, .pnpmfile.cjs" }, + "files.watcherExclude": { + "**/.git/**": true, + "**/.jj/**": true, + "**/.svelte-kit/**": true, + "**/build/**": true, + "**/dist/**": true, + "**/node_modules/**": true + }, + // TODO remove once the ts7 extension is stable + "js/ts.experimental.useTsgo": true, + "js/ts.preferences.importModuleSpecifier": "non-relative", "search.exclude": { - "**/node_modules": true, + "**/.svelte-kit": true, "**/build": true, "**/dist": true, - "**/.svelte-kit": true, + "**/node_modules": true, "**/open-api/typescript-sdk/src": true }, "svelte.enable-ts-plugin": true, + "svelte.plugin.svelte.compilerWarnings": { + "state_referenced_locally": "ignore" + }, "tailwindCSS.experimental.configFile": { "web/src/app.css": "web/src/**" }, - "js/ts.preferences.importModuleSpecifier": "non-relative", "vitest.maximumConfigs": 10 } diff --git a/CODEOWNERS b/CODEOWNERS index 9418f76c23..b5ddc605d2 100644 --- a/CODEOWNERS +++ b/CODEOWNERS @@ -4,4 +4,4 @@ /web/ @danieldietzler /machine-learning/ @mertalev /e2e/ @danieldietzler -/mobile/ @shenlong-tanwen @santoshakil +/mobile/ @shenlong-tanwen @santoshakil @agg23 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index d04f89015e..5972872528 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -19,7 +19,13 @@ We usually do not assign issues to new contributors, since it happens often that ## Use of generative AI -We ask you not to open PRs generated with an LLM. We find that code generated like this tends to need a large amount of back-and-forth, which is a very inefficient use of our time. If we want LLM-generated code, it's much faster for us to use an LLM ourselves than to go through an intermediary via a pull request. +We ask you not to open PRs generated with an LLM. We find that code generated like this tends to need a large amount of back-and-forth, which is a very inefficient use of our time. Even a one line change can have significant impact. We cannot have any confidence in an LLM, so if it's non-trivial for us to verify it works and you don't show that you fully understand all implications of the change, reviewing the PR is not worth our time. If we want LLM-generated code, it's much faster for us to use an LLM ourselves than to go through an intermediary via a pull request. + +If you use an LLM to translate a PR description or title, that is fine. Please make sure however that you stick to the PR template and that the text is written concisely. + +LLMs must not be used to fix GitHub issues labelled good first issue. These issues are generally not urgent, and are intended to be learning opportunities for new contributors to get familiar with the codebase. Whether you are a newcomer or not, fully automating the process of fixing this issue squanders the learning opportunity and doesn’t add much value to the project. Using LLMs to fix issues labelled as “good first issue” is forbidden, and those PRs will be closed automatically. + +Misrepresenting LLM use, contribution farming (automated low-effort PRs), or repeatedly hitting auto-close rules may be grounds for a block at maintainer discretion. ## Feature freezes @@ -38,7 +44,7 @@ All our translations are done through [Weblate](https://hosted.weblate.org/proje ### Datasets -Help us improve our [Immich Datasets](https://datasets.immich.app) by submitting photos and videos taken from a variety of devices, including smartphones, DSLRs, and action cameras, as well as photos with unique features, such as panoramas, burst photos, and photo spheres. These datasets will be publically available for anyone to use, do not submit private/sensitive photos. +Help us improve our [Immich Datasets](https://datasets.immich.app) by submitting photos and videos taken from a variety of devices, including smartphones, DSLRs, and action cameras, as well as photos with unique features, such as panoramas, burst photos, and photo spheres. These datasets will be publicly available for anyone to use, do not submit private/sensitive photos. ### Community support diff --git a/Makefile b/Makefile deleted file mode 100644 index eb8bad09f3..0000000000 --- a/Makefile +++ /dev/null @@ -1,58 +0,0 @@ -dev: - @printf "This command has been removed. Please use:\n\n mise dev # or mise //:dev from another directory\n\n" >&2 && exit 1 - -dev-down: - @printf "This command has been removed. Please use:\n\n mise dev-down # or mise //:dev-down from another directory\n\n" >&2 && exit 1 - -dev-update: - @printf "This command has been removed. Please use:\n\n mise dev-update # or mise //:dev-update from another directory\n\n" >&2 && exit 1 - -dev-scale: - @printf "This command has been removed. Please use:\n\n mise dev-scale # or mise //:dev-scale from another directory\n\n" >&2 && exit 1 - -dev-docs: - npm --prefix docs run start - -.PHONY: e2e -e2e: - @printf "This command has been removed. Please use:\n\n mise e2e # or mise //:e2e from another directory\n\n" >&2 && exit 1 - -e2e-dev: - @printf "This command has been removed. Please use:\n\n mise e2e-dev # or mise //:e2e-dev from another directory\n\n" >&2 && exit 1 - -e2e-update: - @printf "This command has been removed. Please use:\n\n mise e2e-update # or mise //:e2e-update from another directory\n\n" >&2 && exit 1 - -e2e-down: - @printf "This command has been removed. Please use:\n\n mise e2e-down # or mise //:e2e-down from another directory\n\n" >&2 && exit 1 - -prod: - @printf "This command has been removed. Please use:\n\n mise prod # or mise //:prod from another directory\n\n" >&2 && exit 1 - -prod-down: - @printf "This command has been removed. Please use:\n\n mise prod-down # or mise //:prod-down from another directory\n\n" >&2 && exit 1 - -prod-scale: - @printf "This command has been removed. Please use:\n\n mise prod-scale # or mise //:prod-scale from another directory\n\n" >&2 && exit 1 - -.PHONY: open-api -open-api: - @printf "This command has been removed. Please use:\n\n mise open-api # or mise //:open-api from another directory\n\n" >&2 && exit 1 - -sql: - @printf "This command has been removed. Please use:\n\n mise sql # or mise //:sql from another directory\n\n" >&2 && exit 1 - - -renovate: - LOG_LEVEL=debug pnpm exec renovate --platform=local --repository-cache=reset - -# Include .env file if it exists --include docker/.env - -MODULES = e2e server web cli sdk docs .github - -test-e2e: - @printf "This command has been removed. Please use:\n\n mise //e2e:test # or mise //e2e:test-web for web tests, respectively\n\n" >&2 && exit 1 - -clean: - @printf "This command has been removed. Please use:\n\n mise clean # or mise //:clean from another directory\n\n" >&2 && exit 1 diff --git a/README.md b/README.md index 7e06d9de4b..02ae01857e 100644 --- a/README.md +++ b/README.md @@ -32,11 +32,13 @@ 正體中文 Українська Русский + Български Português Brasileiro Svenska العربية Tiếng Việt ภาษาไทย + മലയാളം

diff --git a/deployment/mise.lock b/deployment/mise.lock index fb7be27b99..018620a4a5 100644 --- a/deployment/mise.lock +++ b/deployment/mise.lock @@ -1,36 +1,43 @@ # @generated - this file is auto-generated by `mise lock` https://mise.en.dev/dev-tools/mise-lock.html [[tools.opentofu]] -version = "1.11.6" +version = "1.12.5" backend = "aqua:opentofu/opentofu" [tools.opentofu."platforms.linux-arm64"] -checksum = "sha256:d4f2ab15776925864b049bb329d69682851de6f5204f256e9fa86d07a0308850" -url = "https://github.com/opentofu/opentofu/releases/download/v1.11.6/tofu_1.11.6_linux_arm64.tar.gz" +checksum = "sha256:e67e9da2b1ddf5050ebee62a584cb826eafe1dfd3827d7ec20899ac62791ed1a" +url = "https://github.com/opentofu/opentofu/releases/download/v1.12.5/tofu_1.12.5_linux_arm64.tar.gz" +url_api = "https://api.github.com/repos/opentofu/opentofu/releases/assets/484602545" [tools.opentofu."platforms.linux-arm64-musl"] -checksum = "sha256:d4f2ab15776925864b049bb329d69682851de6f5204f256e9fa86d07a0308850" -url = "https://github.com/opentofu/opentofu/releases/download/v1.11.6/tofu_1.11.6_linux_arm64.tar.gz" +checksum = "sha256:e67e9da2b1ddf5050ebee62a584cb826eafe1dfd3827d7ec20899ac62791ed1a" +url = "https://github.com/opentofu/opentofu/releases/download/v1.12.5/tofu_1.12.5_linux_arm64.tar.gz" +url_api = "https://api.github.com/repos/opentofu/opentofu/releases/assets/484602545" [tools.opentofu."platforms.linux-x64"] -checksum = "sha256:02800fafa2753a9f50c38483e2fdf5bc353fd62895eb9e25eec9a5145df3a69e" -url = "https://github.com/opentofu/opentofu/releases/download/v1.11.6/tofu_1.11.6_linux_amd64.tar.gz" +checksum = "sha256:a6894d45ae7a17ce83189cce8fe04b5a65f68cefceb62455b5a6a89fa53ab38f" +url = "https://github.com/opentofu/opentofu/releases/download/v1.12.5/tofu_1.12.5_linux_amd64.tar.gz" +url_api = "https://api.github.com/repos/opentofu/opentofu/releases/assets/484602624" [tools.opentofu."platforms.linux-x64-musl"] -checksum = "sha256:02800fafa2753a9f50c38483e2fdf5bc353fd62895eb9e25eec9a5145df3a69e" -url = "https://github.com/opentofu/opentofu/releases/download/v1.11.6/tofu_1.11.6_linux_amd64.tar.gz" +checksum = "sha256:a6894d45ae7a17ce83189cce8fe04b5a65f68cefceb62455b5a6a89fa53ab38f" +url = "https://github.com/opentofu/opentofu/releases/download/v1.12.5/tofu_1.12.5_linux_amd64.tar.gz" +url_api = "https://api.github.com/repos/opentofu/opentofu/releases/assets/484602624" [tools.opentofu."platforms.macos-arm64"] -checksum = "sha256:62d7fa8539e13b444827aa0a3b90c5972da5c47e8f8882d9dcf2e430e78840c1" -url = "https://github.com/opentofu/opentofu/releases/download/v1.11.6/tofu_1.11.6_darwin_arm64.tar.gz" +checksum = "sha256:2ae38150a667f5c0bd57b318d18ad8091d08f93fcca40345f3d88998661de5a9" +url = "https://github.com/opentofu/opentofu/releases/download/v1.12.5/tofu_1.12.5_darwin_arm64.tar.gz" +url_api = "https://api.github.com/repos/opentofu/opentofu/releases/assets/484602544" [tools.opentofu."platforms.macos-x64"] -checksum = "sha256:1408cdef1c380f914565e6b4bb70794c6b163f195fcb233357f3d6c5745906b6" -url = "https://github.com/opentofu/opentofu/releases/download/v1.11.6/tofu_1.11.6_darwin_amd64.tar.gz" +checksum = "sha256:1012d8f3d4567bcbcd1f2c7d766feca39a30bced32fb8be47e1887fbbee2456d" +url = "https://github.com/opentofu/opentofu/releases/download/v1.12.5/tofu_1.12.5_darwin_amd64.tar.gz" +url_api = "https://api.github.com/repos/opentofu/opentofu/releases/assets/484602621" [tools.opentofu."platforms.windows-x64"] -checksum = "sha256:27323f70c875b8251bfd7e61a4cffc3ebff4e56ed1e611b955016f0c7077367e" -url = "https://github.com/opentofu/opentofu/releases/download/v1.11.6/tofu_1.11.6_windows_amd64.tar.gz" +checksum = "sha256:af11850b496f3720e0184084c56d8b43aa74ea92d2338978bf368d70c96473f1" +url = "https://github.com/opentofu/opentofu/releases/download/v1.12.5/tofu_1.12.5_windows_amd64.tar.gz" +url_api = "https://api.github.com/repos/opentofu/opentofu/releases/assets/484602547" [[tools.terragrunt]] version = "1.0.3" @@ -39,27 +46,34 @@ backend = "aqua:gruntwork-io/terragrunt" [tools.terragrunt."platforms.linux-arm64"] checksum = "sha256:e5b60ab05b5214db694e6bc215d8124fb626e277cdb56b86f6147ae110d510fe" url = "https://github.com/gruntwork-io/terragrunt/releases/download/v1.0.3/terragrunt_linux_arm64.tar.gz" +url_api = "https://api.github.com/repos/gruntwork-io/terragrunt/releases/assets/406654253" [tools.terragrunt."platforms.linux-arm64-musl"] checksum = "sha256:e5b60ab05b5214db694e6bc215d8124fb626e277cdb56b86f6147ae110d510fe" url = "https://github.com/gruntwork-io/terragrunt/releases/download/v1.0.3/terragrunt_linux_arm64.tar.gz" +url_api = "https://api.github.com/repos/gruntwork-io/terragrunt/releases/assets/406654253" [tools.terragrunt."platforms.linux-x64"] checksum = "sha256:6d48049baf82e0bf9c804368dc85cbfeadc10955e33777e9e8de3e020b94b073" url = "https://github.com/gruntwork-io/terragrunt/releases/download/v1.0.3/terragrunt_linux_amd64.tar.gz" +url_api = "https://api.github.com/repos/gruntwork-io/terragrunt/releases/assets/406654196" [tools.terragrunt."platforms.linux-x64-musl"] checksum = "sha256:6d48049baf82e0bf9c804368dc85cbfeadc10955e33777e9e8de3e020b94b073" url = "https://github.com/gruntwork-io/terragrunt/releases/download/v1.0.3/terragrunt_linux_amd64.tar.gz" +url_api = "https://api.github.com/repos/gruntwork-io/terragrunt/releases/assets/406654196" [tools.terragrunt."platforms.macos-arm64"] checksum = "sha256:aacb5be2ca5475300cbce246dfbd8a45eb47510fbaa70fab8561c49ef5db03aa" url = "https://github.com/gruntwork-io/terragrunt/releases/download/v1.0.3/terragrunt_darwin_arm64.tar.gz" +url_api = "https://api.github.com/repos/gruntwork-io/terragrunt/releases/assets/406654084" [tools.terragrunt."platforms.macos-x64"] checksum = "sha256:3133c2251e191aede8e3dd2a5b3aee2e91c5f08f88f117aee40eed9a24c8ef6b" url = "https://github.com/gruntwork-io/terragrunt/releases/download/v1.0.3/terragrunt_darwin_amd64.tar.gz" +url_api = "https://api.github.com/repos/gruntwork-io/terragrunt/releases/assets/406653970" [tools.terragrunt."platforms.windows-x64"] checksum = "sha256:183b2745b4e04980a6bfa4450ff81956a12596ca22d70f7aaa793980f5b036db" url = "https://github.com/gruntwork-io/terragrunt/releases/download/v1.0.3/terragrunt_windows_amd64.exe.tar.gz" +url_api = "https://api.github.com/repos/gruntwork-io/terragrunt/releases/assets/406654412" diff --git a/deployment/mise.toml b/deployment/mise.toml index fadc28dc2e..7098b79c99 100644 --- a/deployment/mise.toml +++ b/deployment/mise.toml @@ -1,6 +1,6 @@ [tools] -terragrunt = "1.0.3" -opentofu = "1.11.6" +terragrunt = "1.1.1" +opentofu = "1.12.5" [tasks."tg:fmt"] run = "terragrunt hclfmt" diff --git a/deployment/modules/cloudflare/docs-release/.terraform.lock.hcl b/deployment/modules/cloudflare/docs-release/.terraform.lock.hcl index 7fdd96847c..049d3c0fd9 100644 --- a/deployment/modules/cloudflare/docs-release/.terraform.lock.hcl +++ b/deployment/modules/cloudflare/docs-release/.terraform.lock.hcl @@ -2,37 +2,35 @@ # Manual edits may be lost in future updates. provider "registry.opentofu.org/cloudflare/cloudflare" { - version = "4.52.7" - constraints = "4.52.7" + version = "4.52.8" + constraints = "4.52.8" hashes = [ - "h1:+O72J3QYiZtYmYYZM/Eh0f4NNfl1BvjX1eju43qTQsQ=", - "h1:0oqjYIPXcXh7XiDiKI085cHDYQQ5mh8kDl9dmBtvtog=", - "h1:4b4ESb87MGv5bnadgYe7sK5rEkKMZhbkQcwPubQTsR4=", - "h1:6mTr3eA1Ddb348lLmJuyvn98z4KF+ejqaUEJ76D1rzQ=", - "h1:9/3YH+9k9HqsvFtbmBf7SO2+xqZeZrXNKzLkjNuhUEA=", - "h1:Jcq4tBWgyH4/2JsojNBSRaN0mcItVMchO+lynonrlqc=", - "h1:Y4Vv/2RdP0Q+uxqhOxzOdKxuuEMjXPDcU0vPc5bCQzI=", - "h1:a0gW8FBKsbP9Fi0HEDoy49WIbEWVHk9+BR4/iwuBdDQ=", - "h1:gElv6iqJtg8OKN77gbw+MjrkrQmJHPkkMEi1J+0xkpU=", - "h1:oslXUugD/NQ+duJgT4BhKQyfGbuFOANknMvR73fiOeM=", - "h1:pPItIWii5oymR+geZB219ROSPuSODPLTlM4S/u8xLvM=", - "h1:u67GWw8GwD9NDlDzp9Y5VRnSQGcCrE8rSpkGPaBpDl0=", - "h1:uUUa9dY0XQOycI8pxg16PFFtL0WCTi9uEJz8trTQ7pU=", - "h1:y3rV8KF2q6GEMANNlf5EkKJurlfbKlIKpjGcdxoy7pQ=", - "zh:0c904ce31a4c6c4a5b3bf7ff1560e77c0cc7e2450c8553ded8e8c90398e1418b", - "zh:36183d310c36373fe4cb936b83c595c6fd3b0a94bc7827f28e5789ccbf59752e", - "zh:556a568a6f0235e8f41647de9e4d3a1e7b1d6502df8b19b54ec441f1c653ea10", - "zh:633ebbd5b0245e75e500ef9be4d9e62288f97e8da3baaa51323892a786d90285", - "zh:6acfe60cf52a65ba8f044f748548d2119e7f4fd7f8ebcb14698960d87c68f529", + "h1:2uxVaMaGPDJljXqYzuD6xtyfOKdNudtGIgawRTkFJIs=", + "h1:34HL1GDpqYdn2iEC+85pCi+NddZf30qH3fJ8y3P6CAM=", + "h1:4Z+uD+YY/7HrqdypM7DyUK+RtWepoLBc9fqtRQYZx4I=", + "h1:8Ss6wlJL2BHvkIZU1iaHvyUntqNhPFZ0fl6mjsxhctc=", + "h1:AYeWWMTWaNg01N3hivxr/6YlG41j1RietMnft9vLjUI=", + "h1:BGRNOzo8NUgbx5RwpWkWmr38f/s3txb7mzQhqfM5blI=", + "h1:EEXRMdC8bPlpLuOU8u+dE8mFJe3BpquFdH6vXcKseY4=", + "h1:ENp29e6O6OnaHJlbtmRlyjlAmm3Wt4mGctWUpBY3d0g=", + "h1:IAtBAbGVe1npj/n1NvCIZkSYGl7qaPYT+FnVdZ2CZ00=", + "h1:QRGGKngrxLORr4CImKXLDDJL5s67zUNBDAgk6FIIFNk=", + "h1:bNql6cC+MfDbaJK3q7a8C1m3A21o7e5mrjBIGtk0RdI=", + "h1:gmNv+PEOkYDdu+c15bfpcoAE3EI7pgmov9RMf3GZLsI=", + "h1:yieZ7NWRYQcLYHUevzDDrrmDkoQICM+3ZeX4i/mw9ME=", + "zh:08b305329a680a9213b2d8e642fbce7e4d97a524b1d2cef59e190ba9d678c477", + "zh:47975bd711ee18a46e589822171fa87474a552b332bfc8dea8fd1a64504eed8d", + "zh:5640d0d226bbafff3395542456c29feb942ca9c55ac01b4245a34c0590a33363", + "zh:5b0ad839fafba938c60a95d6b4a865843643591e97573ed2b9c4af3754064f74", "zh:890df766e9b839623b1f0437355032a3c006226a6c200cd911e15ee1a9014e9f", - "zh:904acc31ebb9d6ef68c792074b30532ee61bf515f19e0a3c75b46f126cca1f13", - "zh:a1d0a81246afc8750286d3f6fe7a8fbe6460dd2662407b28dbfbabb612e5fa9d", - "zh:a41a36fe253fc365fe2b7ffc749624688b2693b4634862fda161179ab100029f", - "zh:a7ef269e77ffa8715c8945a2c14322c7ff159ea44c15f62505f3cbb2cae3b32d", - "zh:b01aa3bed30610633b762df64332b26f8844a68c3960cebcb30f04918efc67fe", - "zh:b069cc2cd18cae10757df3ae030508eac8d55de7e49eda7a5e3e11f2f7fe6455", - "zh:b2d2c6313729ebb7465dceece374049e2d08bda34473901be9ff46a8836d42b2", - "zh:db0e114edaf4bc2f3d4769958807c83022bfbc619a00bdf4c4bd17faa4ab2d8b", - "zh:ecc0aa8b9044f664fd2aaf8fa992d976578f78478980555b4b8f6148e8d1a5fe", + "zh:93a9bc1139f5c02a44fdbf51fb2ce0891e2a42033b66febb928ccf72e870408f", + "zh:977f75cdf365686aa16ae02dcc0fc1769bae6f86be6e165393756c940bfb4af0", + "zh:9afcda2660b3dc6ee6329acea532a719225bd1f6cf46f695feb2d77160847c1b", + "zh:9e3da67b1b05b03d1f0c18b8677edf3797815b5dd49629f10eb2f457dccbed30", + "zh:b8d7da230f5266367c1b6b1cf31aa39087e231a87d55b71bb9d5c854ca1fcfe6", + "zh:cc96e7cd7350456b7a11a53d1c76c73a542de8359f9750f637ff865e8e77be91", + "zh:da1f58d067def243047bb7178cb197e2b9c3a791a9eb380ad92b73290615ae29", + "zh:ed5f3e1f59a338bcdce0a2537a8a2f299cfe18c168626799b2a9c97af3d8d3cb", + "zh:f16cc31f73a58a26ffe2d93223eddb7c340623a4e2ef38c6091766fd611e3e11", ] } diff --git a/deployment/modules/cloudflare/docs-release/config.tf b/deployment/modules/cloudflare/docs-release/config.tf index 7c59cdd2e3..ea1a441a4b 100644 --- a/deployment/modules/cloudflare/docs-release/config.tf +++ b/deployment/modules/cloudflare/docs-release/config.tf @@ -5,7 +5,7 @@ terraform { required_providers { cloudflare = { source = "cloudflare/cloudflare" - version = "4.52.7" + version = "4.52.8" } } } diff --git a/deployment/modules/cloudflare/docs/.terraform.lock.hcl b/deployment/modules/cloudflare/docs/.terraform.lock.hcl index 7fdd96847c..049d3c0fd9 100644 --- a/deployment/modules/cloudflare/docs/.terraform.lock.hcl +++ b/deployment/modules/cloudflare/docs/.terraform.lock.hcl @@ -2,37 +2,35 @@ # Manual edits may be lost in future updates. provider "registry.opentofu.org/cloudflare/cloudflare" { - version = "4.52.7" - constraints = "4.52.7" + version = "4.52.8" + constraints = "4.52.8" hashes = [ - "h1:+O72J3QYiZtYmYYZM/Eh0f4NNfl1BvjX1eju43qTQsQ=", - "h1:0oqjYIPXcXh7XiDiKI085cHDYQQ5mh8kDl9dmBtvtog=", - "h1:4b4ESb87MGv5bnadgYe7sK5rEkKMZhbkQcwPubQTsR4=", - "h1:6mTr3eA1Ddb348lLmJuyvn98z4KF+ejqaUEJ76D1rzQ=", - "h1:9/3YH+9k9HqsvFtbmBf7SO2+xqZeZrXNKzLkjNuhUEA=", - "h1:Jcq4tBWgyH4/2JsojNBSRaN0mcItVMchO+lynonrlqc=", - "h1:Y4Vv/2RdP0Q+uxqhOxzOdKxuuEMjXPDcU0vPc5bCQzI=", - "h1:a0gW8FBKsbP9Fi0HEDoy49WIbEWVHk9+BR4/iwuBdDQ=", - "h1:gElv6iqJtg8OKN77gbw+MjrkrQmJHPkkMEi1J+0xkpU=", - "h1:oslXUugD/NQ+duJgT4BhKQyfGbuFOANknMvR73fiOeM=", - "h1:pPItIWii5oymR+geZB219ROSPuSODPLTlM4S/u8xLvM=", - "h1:u67GWw8GwD9NDlDzp9Y5VRnSQGcCrE8rSpkGPaBpDl0=", - "h1:uUUa9dY0XQOycI8pxg16PFFtL0WCTi9uEJz8trTQ7pU=", - "h1:y3rV8KF2q6GEMANNlf5EkKJurlfbKlIKpjGcdxoy7pQ=", - "zh:0c904ce31a4c6c4a5b3bf7ff1560e77c0cc7e2450c8553ded8e8c90398e1418b", - "zh:36183d310c36373fe4cb936b83c595c6fd3b0a94bc7827f28e5789ccbf59752e", - "zh:556a568a6f0235e8f41647de9e4d3a1e7b1d6502df8b19b54ec441f1c653ea10", - "zh:633ebbd5b0245e75e500ef9be4d9e62288f97e8da3baaa51323892a786d90285", - "zh:6acfe60cf52a65ba8f044f748548d2119e7f4fd7f8ebcb14698960d87c68f529", + "h1:2uxVaMaGPDJljXqYzuD6xtyfOKdNudtGIgawRTkFJIs=", + "h1:34HL1GDpqYdn2iEC+85pCi+NddZf30qH3fJ8y3P6CAM=", + "h1:4Z+uD+YY/7HrqdypM7DyUK+RtWepoLBc9fqtRQYZx4I=", + "h1:8Ss6wlJL2BHvkIZU1iaHvyUntqNhPFZ0fl6mjsxhctc=", + "h1:AYeWWMTWaNg01N3hivxr/6YlG41j1RietMnft9vLjUI=", + "h1:BGRNOzo8NUgbx5RwpWkWmr38f/s3txb7mzQhqfM5blI=", + "h1:EEXRMdC8bPlpLuOU8u+dE8mFJe3BpquFdH6vXcKseY4=", + "h1:ENp29e6O6OnaHJlbtmRlyjlAmm3Wt4mGctWUpBY3d0g=", + "h1:IAtBAbGVe1npj/n1NvCIZkSYGl7qaPYT+FnVdZ2CZ00=", + "h1:QRGGKngrxLORr4CImKXLDDJL5s67zUNBDAgk6FIIFNk=", + "h1:bNql6cC+MfDbaJK3q7a8C1m3A21o7e5mrjBIGtk0RdI=", + "h1:gmNv+PEOkYDdu+c15bfpcoAE3EI7pgmov9RMf3GZLsI=", + "h1:yieZ7NWRYQcLYHUevzDDrrmDkoQICM+3ZeX4i/mw9ME=", + "zh:08b305329a680a9213b2d8e642fbce7e4d97a524b1d2cef59e190ba9d678c477", + "zh:47975bd711ee18a46e589822171fa87474a552b332bfc8dea8fd1a64504eed8d", + "zh:5640d0d226bbafff3395542456c29feb942ca9c55ac01b4245a34c0590a33363", + "zh:5b0ad839fafba938c60a95d6b4a865843643591e97573ed2b9c4af3754064f74", "zh:890df766e9b839623b1f0437355032a3c006226a6c200cd911e15ee1a9014e9f", - "zh:904acc31ebb9d6ef68c792074b30532ee61bf515f19e0a3c75b46f126cca1f13", - "zh:a1d0a81246afc8750286d3f6fe7a8fbe6460dd2662407b28dbfbabb612e5fa9d", - "zh:a41a36fe253fc365fe2b7ffc749624688b2693b4634862fda161179ab100029f", - "zh:a7ef269e77ffa8715c8945a2c14322c7ff159ea44c15f62505f3cbb2cae3b32d", - "zh:b01aa3bed30610633b762df64332b26f8844a68c3960cebcb30f04918efc67fe", - "zh:b069cc2cd18cae10757df3ae030508eac8d55de7e49eda7a5e3e11f2f7fe6455", - "zh:b2d2c6313729ebb7465dceece374049e2d08bda34473901be9ff46a8836d42b2", - "zh:db0e114edaf4bc2f3d4769958807c83022bfbc619a00bdf4c4bd17faa4ab2d8b", - "zh:ecc0aa8b9044f664fd2aaf8fa992d976578f78478980555b4b8f6148e8d1a5fe", + "zh:93a9bc1139f5c02a44fdbf51fb2ce0891e2a42033b66febb928ccf72e870408f", + "zh:977f75cdf365686aa16ae02dcc0fc1769bae6f86be6e165393756c940bfb4af0", + "zh:9afcda2660b3dc6ee6329acea532a719225bd1f6cf46f695feb2d77160847c1b", + "zh:9e3da67b1b05b03d1f0c18b8677edf3797815b5dd49629f10eb2f457dccbed30", + "zh:b8d7da230f5266367c1b6b1cf31aa39087e231a87d55b71bb9d5c854ca1fcfe6", + "zh:cc96e7cd7350456b7a11a53d1c76c73a542de8359f9750f637ff865e8e77be91", + "zh:da1f58d067def243047bb7178cb197e2b9c3a791a9eb380ad92b73290615ae29", + "zh:ed5f3e1f59a338bcdce0a2537a8a2f299cfe18c168626799b2a9c97af3d8d3cb", + "zh:f16cc31f73a58a26ffe2d93223eddb7c340623a4e2ef38c6091766fd611e3e11", ] } diff --git a/deployment/modules/cloudflare/docs/config.tf b/deployment/modules/cloudflare/docs/config.tf index 7c59cdd2e3..ea1a441a4b 100644 --- a/deployment/modules/cloudflare/docs/config.tf +++ b/deployment/modules/cloudflare/docs/config.tf @@ -5,7 +5,7 @@ terraform { required_providers { cloudflare = { source = "cloudflare/cloudflare" - version = "4.52.7" + version = "4.52.8" } } } diff --git a/docker/docker-compose.dev.yml b/docker/docker-compose.dev.yml index 2398b971dd..a4a820ec70 100644 --- a/docker/docker-compose.dev.yml +++ b/docker/docker-compose.dev.yml @@ -154,7 +154,7 @@ services: redis: container_name: immich_redis - image: docker.io/valkey/valkey:9@sha256:4963247afc4cd33c7d3b2d2816b9f7f8eeebab148d29056c2ca4d7cbc966f2d9 + image: docker.io/valkey/valkey:9@sha256:3acc0687f2a2e1091fae6450d7842dd658c941338cf0a873ddd9e14b9e4ea4dd healthcheck: test: redis-cli ping || exit 1 diff --git a/docker/docker-compose.prod.yml b/docker/docker-compose.prod.yml index d682ea1e6f..b717de02f9 100644 --- a/docker/docker-compose.prod.yml +++ b/docker/docker-compose.prod.yml @@ -56,7 +56,7 @@ services: redis: container_name: immich_redis - image: docker.io/valkey/valkey:9@sha256:4963247afc4cd33c7d3b2d2816b9f7f8eeebab148d29056c2ca4d7cbc966f2d9 + image: docker.io/valkey/valkey:9@sha256:3acc0687f2a2e1091fae6450d7842dd658c941338cf0a873ddd9e14b9e4ea4dd healthcheck: test: redis-cli ping || exit 1 restart: always @@ -85,7 +85,7 @@ services: container_name: immich_prometheus ports: - 9090:9090 - image: prom/prometheus@sha256:a75c5a35bc21d7afe69551eefa3cb1e1fb1775fe759408007a66b54ec3de1f29 + image: prom/prometheus@sha256:508729e0e2d18e11fd742a5a5ca70e557b940a93948c3c95fd0123a6fd538b69 volumes: - ./prometheus.yml:/etc/prometheus/prometheus.yml - prometheus-data:/prometheus @@ -97,7 +97,7 @@ services: command: ['./run.sh', '-disable-reporting'] ports: - 3000:3000 - image: grafana/grafana:12.4.4-ubuntu@sha256:df2e7ef5f32f771794cf76bad5f2bceac227036460a2cc269a9045e5662abc58 + image: grafana/grafana:12.4.7-ubuntu@sha256:d327f509400334fbea74a282d287f20c3187222741ec99e76f253cac16c90129 volumes: - grafana-data:/var/lib/grafana diff --git a/docker/docker-compose.rootless.yml b/docker/docker-compose.rootless.yml index 33cbc4016a..65b13f2b9d 100644 --- a/docker/docker-compose.rootless.yml +++ b/docker/docker-compose.rootless.yml @@ -51,8 +51,6 @@ services: - NET_RAW volumes: - ./ml-model-cache:/cache - - ./ml-dotcache:/.cache - - ./ml-config:/.config env_file: - .env restart: always @@ -61,7 +59,7 @@ services: redis: container_name: immich_redis - image: docker.io/valkey/valkey:9@sha256:4963247afc4cd33c7d3b2d2816b9f7f8eeebab148d29056c2ca4d7cbc966f2d9 + image: docker.io/valkey/valkey:9@sha256:3acc0687f2a2e1091fae6450d7842dd658c941338cf0a873ddd9e14b9e4ea4dd user: '1000:1000' security_opt: - no-new-privileges:true diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml index 98444d8793..4bcf52ca6e 100644 --- a/docker/docker-compose.yml +++ b/docker/docker-compose.yml @@ -49,7 +49,7 @@ services: redis: container_name: immich_redis - image: docker.io/valkey/valkey:9@sha256:4963247afc4cd33c7d3b2d2816b9f7f8eeebab148d29056c2ca4d7cbc966f2d9 + image: docker.io/valkey/valkey:9@sha256:3acc0687f2a2e1091fae6450d7842dd658c941338cf0a873ddd9e14b9e4ea4dd healthcheck: test: redis-cli ping || exit 1 restart: always diff --git a/docker/example.env b/docker/example.env index 6641cceaaa..2403d69a85 100644 --- a/docker/example.env +++ b/docker/example.env @@ -10,7 +10,7 @@ DB_DATA_LOCATION=./postgres # TZ=Etc/UTC # The Immich version to use. You can pin this to a specific version like "v2.1.0" -IMMICH_VERSION=v2 +IMMICH_VERSION=v3 # Connection secret for postgres. You should change it to a random password # Please use only the characters `A-Za-z0-9`, without special characters or spaces diff --git a/docs/docs/FAQ.mdx b/docs/docs/FAQ.mdx index 1a17385132..869e84e377 100644 --- a/docs/docs/FAQ.mdx +++ b/docs/docs/FAQ.mdx @@ -409,12 +409,10 @@ To decrease Redis logs, you can add the following line to the `redis:` section o You can change the user in the container by setting the `user` argument in `docker-compose.yml` for each service. -[Example docker-compose.yml file](https://github.com/immich-app/immich/blob/main/docker/docker-compose.rootless.yml) +[Example docker-compose.rootless.yml file](https://github.com/immich-app/immich/blob/main/docker/docker-compose.rootless.yml) You may need to add mount points or docker volumes for the following internal container paths: -- `immich-machine-learning:/.config` -- `immich-machine-learning:/.cache` - `redis:/data` The non-root user/group needs read/write access to the volume mounts, including `UPLOAD_LOCATION` and `/cache` for machine-learning. diff --git a/docs/docs/administration/backup-and-restore.md b/docs/docs/administration/backup-and-restore.md index debbad7575..df34671a1b 100644 --- a/docs/docs/administration/backup-and-restore.md +++ b/docs/docs/administration/backup-and-restore.md @@ -31,7 +31,7 @@ You can trigger a database backup manually: 1. Go to **Administration > Job Queues** 2. Click **Create job** in the top right -3. Select **Create Database Backup** and click **Confirm** +3. Select **Create Database Dump** and click **Confirm** The backup will appear in `UPLOAD_LOCATION/backups` and counts toward your retention limit. diff --git a/docs/docs/administration/img/reset-admin-password.webp b/docs/docs/administration/img/reset-admin-password.webp deleted file mode 100644 index 5062d24a6b..0000000000 Binary files a/docs/docs/administration/img/reset-admin-password.webp and /dev/null differ diff --git a/docs/docs/administration/oauth.md b/docs/docs/administration/oauth.md index fea73684fd..246b1be7fe 100644 --- a/docs/docs/administration/oauth.md +++ b/docs/docs/administration/oauth.md @@ -280,7 +280,7 @@ Configuration of OAuth in Immich System Settings | ---------------------------- | ----------------------------------------------------- | | Issuer URL | `https:///realms/` | | Client ID | immich | -| Client Secret | can be optained from Clients -> immich -> Credentials | +| Client Secret | can be obtained from Clients -> immich -> Credentials | | Scope | openid email profile | | Signing Algorithm | RS256 | | Storage Label Claim | preferred_username | diff --git a/docs/docs/administration/server-commands.md b/docs/docs/administration/server-commands.md index 104c16c0a2..49bcf17700 100644 --- a/docs/docs/administration/server-commands.md +++ b/docs/docs/administration/server-commands.md @@ -35,6 +35,7 @@ Found Admin: - Email=admin@example.com - Name=Immich Admin ? Please choose a new password (optional) immich-is-cool +? Invalidate existing sessions? Yes The admin password has been updated. ``` diff --git a/docs/docs/administration/system-integrity.md b/docs/docs/administration/system-integrity.md index 2b373134a9..71d1ada88b 100644 --- a/docs/docs/administration/system-integrity.md +++ b/docs/docs/administration/system-integrity.md @@ -1,5 +1,30 @@ # System Integrity +## Integrity report + +At a [customizable interval](https://my.immich.app/admin/system-settings?isOpen=integrity-checks), Immich runs integrity checks to ensure that your library is still intact and there are no corrupt files. +There are three kind of issues Immich checks for: + +- Untracked files: the path was found in Immich's directories but it is not referenced in Immich's database +- Missing files: the path is found in the Immich internal database, but does not actually exist on disk +- Checksum mismatches: the checksum of the file stored in Immich's database does not match the actual file's checksum anymore + +All three run nightly at 3am by default. For the "Checksum files" check, there are additional time and progress limits, as those are the most taxing checks. With these additional limits, Immich can slowly check checksums of your files over the course of a couple of days. + +You can see the results of these checks on the [maintenance](https://my.immich.app/admin/maintenance) page. Here, you can also trigger a full scan (a _check_) for specific jobs, or all of them. In addition, you can also _refresh_ checks. This will only look at items that have currently been reported on, and check if those have been fixed. + +### Common causes + +Most common are untracked files. In many cases those are corrupted thumbnails or encoded videos that have been partially generated at some point and never got cleaned up properly. These are usually fine to delete, as both can always be regenerated at a later point. Other files will need to be investigated on a case-by-case basis by checking they already exist in Immich and thinking about how they might have gotten untracked. + +:::info +You might want to run the _missing_ jobs for thumbnails and encoded videos (https://my.immich.app/admin/queues) to make sure all your assets have proper thumbnails and encoded videos. Watch the server logs while running the jobs, in case there are any issues with some assets. +::: + +Missing files are files where Immich references them internally, but they don't actually exist on disk in that location. It could be that you deleted a file on disk from the internal library (don't do that, Immich doesn't support it). It could also be that there are issues with your file storage. Please carefully investigate missing files, and never hesitate to reach out on [our Discord](https://discord.immich.app) if you have any questions! + +Checksum mismatches are often indicative of file system corruption. It could also be that you previously edited a file from the internal library on the disk, which is also not supported and will cause a checksum mismatch. Again, the recommended action is to look at any reported item individually, check it out, try to remember if you changed it or some metadata on it at some point. If you edited the file, the supported resolution is to delete the mismatched asset from Immich and reupload it as a new asset. + ## Folder checks :::info @@ -40,7 +65,7 @@ The above error messages show that the server has previously (successfully) writ ### Ignoring the checks -:::warning +:::danger The checks are designed to catch common problems that we have seen users have in the past, and often indicate there's something wrong that you should solve. If you know what you're doing and you want to disable them you can set the following environment variable: ::: diff --git a/docs/docs/api.md b/docs/docs/api.md index 2e8ab5eb1b..debd75e4d4 100644 --- a/docs/docs/api.md +++ b/docs/docs/api.md @@ -10,4 +10,4 @@ OpenAPI is used to generate the client (Typescript, Dart) SDK. `openapi-generato mise open-api ``` -You can find the generated client SDK in the `packages/sdk/client` for Typescript SDK and `mobile/openapi` for Dart SDK. +You can find the generated client SDK in the `packages/sdk/client` for Typescript SDK and `mobile/generated/openapi` for Dart SDK. diff --git a/docs/docs/developer/setup.md b/docs/docs/developer/setup.md index 167fa10320..de02ab3e54 100644 --- a/docs/docs/developer/setup.md +++ b/docs/docs/developer/setup.md @@ -30,7 +30,7 @@ This environment includes the services below. Additional details are available i - Redis - PostgreSQL development database with exposed port `5432` so you can use any database client to access it -All the services are packaged to run as with single Docker Compose command. +All the services are packaged to run with a single Docker Compose command. :::tip mise [mise](https://mise.jdx.dev) is used throughout the project to manage tool versions and run tasks. [Install mise](https://mise.jdx.dev/installing-mise.html), then from the repo root run `mise trust` and `mise install` to get all required tools. Tasks for each service can be run from the repo root using `mise //namespace:task` (e.g. `mise //server:lint`). To list all available tasks, run `mise tasks ls --all`. @@ -41,7 +41,7 @@ All the services are packaged to run as with single Docker Compose command. 1. Clone the project repo. 2. Run `cp docker/example.env docker/.env`. 3. Edit `docker/.env` to provide values for the required variable `UPLOAD_LOCATION`. -4. Install dependencies - `pnpm i` +4. Install dependencies - `mise x -- pnpm i` 5. From the root directory, run: ```bash title="Start development server" @@ -52,7 +52,7 @@ mise dev All the services will be started with hot-reloading enabled for a quick feedback loop. -You can access the web from `http://your-machine-ip:3000` or `http://localhost:3000` and access the server from the mobile app at `http://your-machine-ip:3000/api` +You can access the web from `http://your-machine-ip:3000` or `http://localhost:3000` and access the server from the mobile app at `http://your-machine-ip:3000` **Notes:** @@ -99,6 +99,21 @@ To see local changes to `@immich/ui` in Immich, do the following: 2. Run `mise //mobile:translation` to generate the translation file. 3. Change to the `mobile/` directory and run `flutter run` to start the app. +##### iOS Code Signing + +The Immich Apple Team ID and bundle IDs are specified in `mobile/ios/Signing.xcconfig`. For local development, we provide an override mechanism. + +Create `mobile/ios/Signing.local.xcconfig` and populate it with the necessary values needed to build and sign Immich yourself. This local override file is gitignored. + +``` +IMMICH_TEAM_ID = ABCDE12345 +IMMICH_BUNDLE_ID_PROD = com.customuniqueid.immich +IMMICH_BUNDLE_ID_DEV = com.customuniqueid.immichdev +IMMICH_GROUP_ID = group.com.customuniqueid.immich +``` + +The environment values are used across Immich's targets and schemes to prevent redundant edits by contributors. + #### Translation To add a new translation text, enter the key-value pair in the `i18n/en.json` in the root of the immich project. Then run: diff --git a/docs/docs/features/command-line-interface.md b/docs/docs/features/command-line-interface.md index 03e96e5080..c3eab1605f 100644 --- a/docs/docs/features/command-line-interface.md +++ b/docs/docs/features/command-line-interface.md @@ -99,6 +99,7 @@ Options: -H, --include-hidden Include hidden folders (default: false, env: IMMICH_INCLUDE_HIDDEN) -a, --album Automatically create albums based on folder name (default: false, env: IMMICH_AUTO_CREATE_ALBUM) -A, --album-name Add all assets to specified album (env: IMMICH_ALBUM_NAME) + --visibility Set the visibility of uploaded assets (choices: "archive", "timeline", "hidden", "locked", env: IMMICH_VISIBILITY) -n, --dry-run Don't perform any actions, just show what will be done (default: false, env: IMMICH_DRY_RUN) -c, --concurrency Number of assets to upload at the same time (default: 4, env: IMMICH_UPLOAD_CONCURRENCY) -j, --json-output Output detailed information in json format (default: false, env: IMMICH_JSON_OUTPUT) @@ -176,6 +177,12 @@ By default, hidden files are skipped. If you want to include hidden files, use t immich upload --include-hidden --recursive directory/ ``` +You can set the visibility of uploaded assets to `archive`, `timeline`, `hidden`, or `locked` with the `--visibility` option: + +```bash +immich upload --visibility archive --recursive directory/ +``` + You can use the `--json-output` option to get a json printed which includes three keys: `newFiles`, `duplicates` and `newAssets`. Due to some logging output you will need to strip the first three lines of output to get the json. diff --git a/docs/docs/install/config-file.md b/docs/docs/install/config-file.md index c8ebeffbcd..5c34acdd9d 100644 --- a/docs/docs/install/config-file.md +++ b/docs/docs/install/config-file.md @@ -6,14 +6,18 @@ sidebar_position: 100 A config file can be provided as an alternative to the UI configuration. +:::note Interaction with the web UI +While the config file does not need to include all keys from the below example, specifying `IMMICH_CONFIG_FILE` will disable the ability to edit other properties from the Immich web UI. +::: + ### Step 1 - Create a new config file -In JSON format, create a new config file (e.g. `immich.json`) and put it in a location mounted in the container that can be accessed by Immich. +In JSON format, create a new config file (e.g. `immich-config.json`) and put it in a location mounted in the container that can be accessed by Immich. YAML-formatted config files are also supported. The default configuration looks like this:
-immich.json +immich-config.json ```json { @@ -250,6 +254,10 @@ So you can just grab it from there, paste it into a file and you're pretty much ### Step 2 - Specify the file location +:::note +If you have any `microservices` workers, they will also need to have the config file mounted to their container. +::: + In your `.env` file, set the variable `IMMICH_CONFIG_FILE` to the path of your config. For more information, refer to the [Environment Variables](/install/environment-variables.md) section. @@ -261,7 +269,7 @@ It is recommended to reuse this variable in your `docker-compose.yml`: ```yaml volumes: - - ./configuration.yml:${IMMICH_CONFIG_FILE} + - ./immich-config.json:${IMMICH_CONFIG_FILE} ``` ::: diff --git a/docs/docs/install/environment-variables.md b/docs/docs/install/environment-variables.md index 0932fa2855..c10a858ed9 100644 --- a/docs/docs/install/environment-variables.md +++ b/docs/docs/install/environment-variables.md @@ -19,7 +19,7 @@ If this does not work, try running `docker compose up -d --force-recreate`. | Variable | Description | Default | Containers | | :----------------- | :------------------------------ | :-----: | :----------------------- | -| `IMMICH_VERSION` | Image tags | `v2` | server, machine learning | +| `IMMICH_VERSION` | Image tags | `v3` | server, machine learning | | `UPLOAD_LOCATION` | Host path for uploads | | server | | `DB_DATA_LOCATION` | Host path for Postgres database | | database | @@ -45,7 +45,7 @@ These environment variables are used by the `docker-compose.yml` file and do **N | `IMMICH_PROCESS_INVALID_IMAGES` | When `true`, generate thumbnails for invalid images | | server | microservices | | `IMMICH_TRUSTED_PROXIES` | List of comma-separated IPs set as trusted proxies | | server | api | | `IMMICH_IGNORE_MOUNT_CHECK_ERRORS` | See [System Integrity](/administration/system-integrity) | | server | api, microservices | -| `IMMICH_ALLOW_SETUP` | When `false` disables the `/auth/admin-sign-up` endpoint | `true` | server | api | +| `IMMICH_ALLOW_SETUP` | When `false` disables the `/auth/admin-sign-up` and `/admin/database-backups/start-restore` endpoints | `true` | server | api | \*1: `TZ` should be set to a `TZ identifier` from [this list][tz-list]. For example, `TZ="Etc/UTC"`. `TZ` is used by `exiftool` as a fallback in case the timezone cannot be determined from the image metadata. It is also used for logfile timestamps and cron job execution. @@ -89,7 +89,7 @@ Information on the current workers can be found [here](/administration/jobs-work \*1: The values of `DB_USERNAME`, `DB_PASSWORD`, and `DB_DATABASE_NAME` are passed to the Postgres container as the variables `POSTGRES_USER`, `POSTGRES_PASSWORD`, and `POSTGRES_DB` in `docker-compose.yml`. -\*2: If not provided, the appropriate extension to use is auto-detected at startup by introspecting the database. When multiple extensions are installed, the order of preference is VectorChord, pgvecto.rs, pgvector. +\*2: If not provided, the appropriate extension to use is auto-detected at startup by inspecting the database. When multiple extensions are installed, the order of preference is VectorChord, pgvector. \*3: Uses either [`postgresql.ssd.conf`](https://github.com/immich-app/base-images/blob/main/postgres/postgresql.ssd.conf) or [`postgresql.hdd.conf`](https://github.com/immich-app/base-images/blob/main/postgres/postgresql.hdd.conf) which mainly controls the Postgres `effective_io_concurrency` setting to allow for concurrenct IO on SSDs and sequential IO on HDDs. diff --git a/docs/docs/install/synology.md b/docs/docs/install/synology.md index de96886caa..69d8abf515 100644 --- a/docs/docs/install/synology.md +++ b/docs/docs/install/synology.md @@ -7,7 +7,7 @@ sidebar_position: 85 :::note This is a community contribution and not officially supported by the Immich team, but included here for convenience. -Community support can be found in the dedicated channel on the [Discord Server](https://discord.immich.app/). +Community support should be directed to Synology-specific support platforms. ::: Immich can easily be installed on a Synology NAS using Container Manager within DSM. If you have not installed Container Manager already, you can install it in the Packages Center. Refer to the [Container Manager docs](https://kb.synology.com/en-us/DSM/help/ContainerManager/docker_desc?version=7) for more information on using Container Manager. diff --git a/docs/docs/install/unraid.md b/docs/docs/install/unraid.md index ca7263a1e8..3ce98dc2e1 100644 --- a/docs/docs/install/unraid.md +++ b/docs/docs/install/unraid.md @@ -1,13 +1,19 @@ --- -sidebar_position: 60 +sidebar_position: 70 --- -# Unraid +# Unraid [ Community ] + +:::note +This is a community contribution and not officially supported by the Immich team, but included here for convenience. + +Community support can be found in the dedicated channel on the [Discord Server](https://discord.immich.app/). +::: Immich can easily be installed and updated on Unraid via: -1. [Docker Compose Manager](https://forums.unraid.net/topic/114415-plugin-docker-compose-manager/) plugin from the Unraid Community Apps -2. Community made template on the Unraid Community Apps +1. Community made template on the Unraid Community Apps +2. [Docker Compose Manager](https://forums.unraid.net/topic/114415-plugin-docker-compose-manager/) plugin from the Unraid Community Apps ## Community Applications Template @@ -23,7 +29,7 @@ Once you have Redis and PostgreSQL running, search for Immich on the Unraid CA, For more information about setting up the community image see [here](https://github.com/imagegenius/docker-immich#application-setup) -## Docker-Compose Method (Official) +## Docker-Compose Method :::info @@ -121,7 +127,7 @@ alt="Go to Docker Tab and visit the address listed next to immich-web" width="90%" alt="Go to Docker Tab and visit the address listed next to immich-web" /> - +
:::tip diff --git a/docs/docs/install/upgrading.md b/docs/docs/install/upgrading.md index 38fc056f80..f302719c76 100644 --- a/docs/docs/install/upgrading.md +++ b/docs/docs/install/upgrading.md @@ -28,11 +28,15 @@ docker image prune ## Versioning Policy -Immich follows [semantic versioning][semver], which tags releases in the format `..`. We intend for breaking changes to be limited to major version releases. -You can configure your Docker image to point to the current major version by using a metatag, such as `:v2`. +Immich follows [semantic versioning][semver], which tags releases in the format `..`. +We intend for breaking changes, including those to the API or deployment, to be limited to major version releases. +You can configure your Docker image to point to the current major version by using a metatag, such as `:v3`. These metatags do not follow release candidates. -Currently, we have no plans to backport patches to earlier versions. We encourage all users to run the most recent release of Immich. -Switching back to an earlier version, even within the same minor release tag, is not supported. +The mobile app is typically compatible with the current and prior major version. However, the server is only compatible with the matching major version. +Thus, we recommend upgrading all mobile clients before upgrading the server to ensure compatibility. + +We do not backport patches to earlier versions. We encourage all users to run the most recent stable release of Immich. +Downgrading to an earlier version, even within the same minor version, is not supported. [semver]: https://semver.org/ diff --git a/docs/docs/partials/_mobile-app-download.md b/docs/docs/partials/_mobile-app-download.md index 31cf62bf81..08540837a1 100644 --- a/docs/docs/partials/_mobile-app-download.md +++ b/docs/docs/partials/_mobile-app-download.md @@ -1,7 +1,7 @@ The mobile app can be downloaded from the following places: -- Obtainium: You can get your Obtainium config link from the [Utilities page of your Immich server](https://my.immich.app/utilities). -- [Google Play Store](https://play.google.com/store/apps/details?id=app.alextran.immich) - [Apple App Store](https://apps.apple.com/us/app/immich/id1613945652) -- [F-Droid](https://f-droid.org/packages/app.alextran.immich) -- [GitHub Releases (apk)](https://github.com/immich-app/immich/releases) +- [Google Play Store](https://play.google.com/store/apps/details?id=app.alextran.immich) +- [GitHub Releases (APK)](https://github.com/immich-app/immich/releases) +- Obtainium: You can get your Obtainium config link from the [Utilities page of your Immich server](https://my.immich.app/utilities). +- [F-Droid](https://app.futo.org/fdroid/repo/) diff --git a/docs/docusaurus.config.js b/docs/docusaurus.config.js index 734317a302..58a07b901f 100644 --- a/docs/docusaurus.config.js +++ b/docs/docusaurus.config.js @@ -191,7 +191,7 @@ const config = { }, { label: 'Privacy Policy', - to: '/privacy-policy', + href: 'https://immich.app/privacy-policy', }, ], }, diff --git a/docs/mise.lock b/docs/mise.lock index 698d6e64c9..fe557086dd 100644 --- a/docs/mise.lock +++ b/docs/mise.lock @@ -1,7 +1,7 @@ # @generated - this file is auto-generated by `mise lock` https://mise.en.dev/dev-tools/mise-lock.html [[tools.wrangler]] -version = "4.100.0" +version = "4.110.0" backend = "npm:wrangler" [tools.wrangler.options] diff --git a/docs/mise.toml b/docs/mise.toml index 3791e7b8eb..da5d00940e 100644 --- a/docs/mise.toml +++ b/docs/mise.toml @@ -28,4 +28,4 @@ run = "prettier --write ." run = "wrangler pages deploy build --project-name=${PROJECT_NAME} --branch=${BRANCH_NAME}" [tools] -wrangler = "4.100.0" +wrangler = "4.119.0" diff --git a/docs/package.json b/docs/package.json index e1d26532db..d291c385f9 100644 --- a/docs/package.json +++ b/docs/package.json @@ -40,7 +40,8 @@ "@docusaurus/tsconfig": "^3.10.0", "@docusaurus/types": "^3.10.0", "prettier": "^3.7.4", - "typescript": "^6.0.0" + "@typescript/native": "npm:typescript@^7.0.2", + "typescript": "npm:@typescript/typescript6@^6.0.2" }, "browserslist": { "production": [ diff --git a/docs/src/components/timeline.tsx b/docs/src/components/timeline.tsx deleted file mode 100644 index 32b15edb59..0000000000 --- a/docs/src/components/timeline.tsx +++ /dev/null @@ -1,78 +0,0 @@ -import useIsBrowser from '@docusaurus/useIsBrowser'; -import { mdiCheckboxBlankCircle, mdiCheckboxMarkedCircle } from '@mdi/js'; -import Icon from '@mdi/react'; -import React from 'react'; - -export type Item = { - icon: string; - iconColor: string; - title: string; - description?: string; - link?: { url: string; text: string }; - done?: false; - getDateLabel: (language: string) => string; -}; - -interface Props { - items: Item[]; -} - -export function Timeline({ items }: Props): JSX.Element { - const isBrowser = useIsBrowser(); - - return ( -
    - {items.map((item, index) => { - const isFirst = index === 0; - const isLast = index === items.length - 1; - const done = item.done ?? true; - const dateLabel = item.getDateLabel(isBrowser ? navigator.language : 'en-US'); - const timelineIcon = done ? mdiCheckboxMarkedCircle : mdiCheckboxBlankCircle; - const cardIcon = item.icon; - - return ( -
  • -
    - {dateLabel} -
    -
    -
    -
    -
    - {} -
    -
    -
    -
    - {cardIcon === 'immich' ? ( - - ) : ( - - )} -

    - {item.title} -

    -
    -

    {item.description}

    -
    -
    - - {item.link && ( - - [{item.link.text}] - - )} - -
    {dateLabel}
    -
    -
    -
  • - ); - })} -
- ); -} diff --git a/docs/src/components/version-switcher.tsx b/docs/src/components/version-switcher.tsx index 739d7bd001..967c85c780 100644 --- a/docs/src/components/version-switcher.tsx +++ b/docs/src/components/version-switcher.tsx @@ -2,6 +2,8 @@ import { useWindowSize } from '@docusaurus/theme-common'; import DropdownNavbarItem from '@theme/NavbarItem/DropdownNavbarItem'; import React, { useEffect, useState } from 'react'; +const ARCHIVED_VERSIONS_URL = 'https://version.immich.cloud/v1/docs/versions'; + export default function VersionSwitcher(): JSX.Element { const [versions, setVersions] = useState([]); const [activeLabel, setLabel] = useState('Versions'); @@ -11,12 +13,7 @@ export default function VersionSwitcher(): JSX.Element { useEffect(() => { async function getVersions() { try { - let baseUrl = 'https://docs.immich.app'; - if (window.location.origin === 'http://localhost:3005') { - baseUrl = window.location.origin; - } - - const response = await fetch(`${baseUrl}/archived-versions.json`); + const response = await fetch(ARCHIVED_VERSIONS_URL); const archiveVersions = await response.json(); diff --git a/docs/src/pages/privacy-policy.tsx b/docs/src/pages/privacy-policy.tsx deleted file mode 100644 index 36ac76945d..0000000000 --- a/docs/src/pages/privacy-policy.tsx +++ /dev/null @@ -1,110 +0,0 @@ -import React from 'react'; -import Layout from '@theme/Layout'; -function HomepageHeader() { - return ( -
-
-
-

Privacy Policy

-

Last updated: July 31st 2024

-

- Welcome to Immich. We are committed to respecting your privacy. This Privacy Policy sets out how we collect, - use, and share information when you use our Immich app. -

-
- - {/* 1. Scope of This Policy */} -
-

1. Scope of This Policy

-

- This Privacy Policy applies to the Immich app ("we", "our", or "us") and covers our collection, use, and - disclosure of your information. This Policy does not cover any third-party websites, services, or - applications that can be accessed through our app, or third-party services you may access through Immich. -

-
- - {/* 2. Information We Collect */} -
-

2. Information We Collect

-
-

- Locally Stored Data: Immich stores all your photos, albums, settings, and locally on your - device. We do not have access to this data, nor do we transmit or store it on any of our servers. -

-
- -
-

- Purchase Information: When you make a purchase within the{' '} - https://buy.immich.app, we collect the following information for tax - calculation purposes: -

-
    -
  • Country of origin
  • -
  • Postal code (if the user is from Canada or the United States)
  • -
-
-
- - {/* 3. Use of Your Information */} -
-

3. Use of Your Information

-

- Tax Calculation: The country of origin and postal code (for users from Canada or the United - States) are collected solely for determining the applicable tax rates on your purchase. -

-
- - {/* 4. Sharing of Your Information */} -
-

4. Sharing of Your Information

-
    -
  • - Tax Authorities: The purchase information may be shared with tax authorities as required - by law. -
  • -
  • - Payment Providers: The purchase information may be shared with payment providers where - required. -
  • -
-
- - {/* 5. Changes to This Policy */} -
-

5. Changes to This Policy

-

- We may update our Privacy Policy from time to time. If we make any changes, we will notify you by revising - the "Last updated" date at the top of this policy. It's encouraged that users frequently check this page for - any changes to stay informed about how we are helping to protect the personal information we collect. -

-
- - {/* 6. Contact Us */} -
-

6. Contact Us

-

- If you have any questions about this Privacy Policy, please contact us at{' '} - immich@futo.org -

-
-
-
- ); -} - -export default function Home(): JSX.Element { - return ( - - -
-

This project is available under GNU AGPL v3 license.

-

Privacy should not be a luxury

-
-
- ); -} diff --git a/docs/static/_redirects b/docs/static/_redirects index 218bb71d69..e218124e59 100644 --- a/docs/static/_redirects +++ b/docs/static/_redirects @@ -1,3 +1,4 @@ +/archived-versions.json https://version.immich.cloud/v1/docs/versions 307 / /overview/quick-start 307 /mobile-app-beta-program /features/mobile-app 307 /contribution-guidelines /overview/support-the-project#contributing 307 @@ -36,3 +37,4 @@ /overview/welcome /overview/quick-start 307 /docs/* /:splat 307 /features/automatic-backup /features/mobile-backup 307 +/privacy-policy https://immich.app/privacy-policy 307 diff --git a/docs/static/archived-versions.json b/docs/static/archived-versions.json deleted file mode 100644 index 89a7c95d66..0000000000 --- a/docs/static/archived-versions.json +++ /dev/null @@ -1,261 +0,0 @@ -[ - { - "label": "v3.0.0-rc.3", - "url": "https://docs.v3.0.0-rc.3.archive.immich.app" - }, - { - "label": "v2.7.5", - "url": "https://docs.v2.7.5.archive.immich.app" - }, - { - "label": "v2.6.3", - "url": "https://docs.v2.6.3.archive.immich.app" - }, - { - "label": "v2.5.6", - "url": "https://docs.v2.5.6.archive.immich.app" - }, - { - "label": "v2.4.1", - "url": "https://docs.v2.4.1.archive.immich.app" - }, - { - "label": "v2.3.1", - "url": "https://docs.v2.3.1.archive.immich.app" - }, - { - "label": "v2.2.3", - "url": "https://docs.v2.2.3.archive.immich.app" - }, - { - "label": "v2.1.0", - "url": "https://docs.v2.1.0.archive.immich.app" - }, - { - "label": "v2.0.1", - "url": "https://docs.v2.0.1.archive.immich.app" - }, - { - "label": "v1.144.1", - "url": "https://docs.v1.144.1.archive.immich.app" - }, - { - "label": "v1.143.1", - "url": "https://docs.v1.143.1.archive.immich.app" - }, - { - "label": "v1.142.1", - "url": "https://v1.142.1.archive.immich.app", - "rootPath": "/docs" - }, - { - "label": "v1.141.1", - "url": "https://v1.141.1.archive.immich.app", - "rootPath": "/docs" - }, - { - "label": "v1.140.1", - "url": "https://v1.140.1.archive.immich.app", - "rootPath": "/docs" - }, - { - "label": "v1.139.4", - "url": "https://v1.139.4.archive.immich.app", - "rootPath": "/docs" - }, - { - "label": "v1.138.1", - "url": "https://v1.138.1.archive.immich.app", - "rootPath": "/docs" - }, - { - "label": "v1.137.3", - "url": "https://v1.137.3.archive.immich.app", - "rootPath": "/docs" - }, - { - "label": "v1.136.0", - "url": "https://v1.136.0.archive.immich.app", - "rootPath": "/docs" - }, - { - "label": "v1.135.3", - "url": "https://v1.135.3.archive.immich.app", - "rootPath": "/docs" - }, - { - "label": "v1.134.0", - "url": "https://v1.134.0.archive.immich.app", - "rootPath": "/docs" - }, - { - "label": "v1.133.1", - "url": "https://v1.133.1.archive.immich.app", - "rootPath": "/docs" - }, - { - "label": "v1.132.3", - "url": "https://v1.132.3.archive.immich.app", - "rootPath": "/docs" - }, - { - "label": "v1.131.3", - "url": "https://v1.131.3.archive.immich.app", - "rootPath": "/docs" - }, - { - "label": "v1.130.3", - "url": "https://v1.130.3.archive.immich.app", - "rootPath": "/docs" - }, - { - "label": "v1.129.0", - "url": "https://v1.129.0.archive.immich.app", - "rootPath": "/docs" - }, - { - "label": "v1.128.0", - "url": "https://v1.128.0.archive.immich.app", - "rootPath": "/docs" - }, - { - "label": "v1.127.0", - "url": "https://v1.127.0.archive.immich.app", - "rootPath": "/docs" - }, - { - "label": "v1.126.1", - "url": "https://v1.126.1.archive.immich.app", - "rootPath": "/docs" - }, - { - "label": "v1.125.7", - "url": "https://v1.125.7.archive.immich.app", - "rootPath": "/docs" - }, - { - "label": "v1.124.2", - "url": "https://v1.124.2.archive.immich.app", - "rootPath": "/docs" - }, - { - "label": "v1.123.0", - "url": "https://v1.123.0.archive.immich.app", - "rootPath": "/docs" - }, - { - "label": "v1.122.3", - "url": "https://v1.122.3.archive.immich.app", - "rootPath": "/docs" - }, - { - "label": "v1.121.0", - "url": "https://v1.121.0.archive.immich.app", - "rootPath": "/docs" - }, - { - "label": "v1.120.2", - "url": "https://v1.120.2.archive.immich.app", - "rootPath": "/docs" - }, - { - "label": "v1.119.1", - "url": "https://v1.119.1.archive.immich.app", - "rootPath": "/docs" - }, - { - "label": "v1.118.2", - "url": "https://v1.118.2.archive.immich.app", - "rootPath": "/docs" - }, - { - "label": "v1.117.0", - "url": "https://v1.117.0.archive.immich.app", - "rootPath": "/docs" - }, - { - "label": "v1.116.2", - "url": "https://v1.116.2.archive.immich.app", - "rootPath": "/docs" - }, - { - "label": "v1.115.0", - "url": "https://v1.115.0.archive.immich.app", - "rootPath": "/docs" - }, - { - "label": "v1.114.0", - "url": "https://v1.114.0.archive.immich.app", - "rootPath": "/docs" - }, - { - "label": "v1.113.1", - "url": "https://v1.113.1.archive.immich.app", - "rootPath": "/docs" - }, - { - "label": "v1.112.1", - "url": "https://v1.112.1.archive.immich.app", - "rootPath": "/docs" - }, - { - "label": "v1.111.0", - "url": "https://v1.111.0.archive.immich.app", - "rootPath": "/docs" - }, - { - "label": "v1.110.0", - "url": "https://v1.110.0.archive.immich.app", - "rootPath": "/docs" - }, - { - "label": "v1.109.2", - "url": "https://v1.109.2.archive.immich.app", - "rootPath": "/docs" - }, - { - "label": "v1.108.0", - "url": "https://v1.108.0.archive.immich.app", - "rootPath": "/docs" - }, - { - "label": "v1.107.2", - "url": "https://v1.107.2.archive.immich.app", - "rootPath": "/docs" - }, - { - "label": "v1.106.4", - "url": "https://v1.106.4.archive.immich.app", - "rootPath": "/docs" - }, - { - "label": "v1.105.1", - "url": "https://v1.105.1.archive.immich.app", - "rootPath": "/docs" - }, - { - "label": "v1.104.0", - "url": "https://v1.104.0.archive.immich.app", - "rootPath": "/docs" - }, - { - "label": "v1.103.1", - "url": "https://v1.103.1.archive.immich.app", - "rootPath": "/docs" - }, - { - "label": "v1.102.3", - "url": "https://v1.102.3.archive.immich.app", - "rootPath": "/docs" - }, - { - "label": "v1.101.0", - "url": "https://v1.101.0.archive.immich.app", - "rootPath": "/docs" - }, - { - "label": "v1.100.0", - "url": "https://v1.100.0.archive.immich.app", - "rootPath": "/docs" - } -] diff --git a/docs/tailwind.config.js b/docs/tailwind.config.js index 9a654487cc..95a1e4fa1b 100644 --- a/docs/tailwind.config.js +++ b/docs/tailwind.config.js @@ -11,15 +11,9 @@ module.exports = { colors: { // Light Theme 'immich-primary': '#4250af', - 'immich-bg': '#f9f8fb', - 'immich-fg': 'black', - 'immich-gray': '#F6F6F4', // Dark Theme 'immich-dark-primary': '#adcbfa', - 'immich-dark-bg': '#000000', - 'immich-dark-fg': '#e5e7eb', - 'immich-dark-gray': '#111111', }, }, }, diff --git a/e2e/docker-compose.yml b/e2e/docker-compose.yml index 43dce89962..7c03cea653 100644 --- a/e2e/docker-compose.yml +++ b/e2e/docker-compose.yml @@ -45,7 +45,7 @@ services: redis: container_name: immich-e2e-redis - image: docker.io/valkey/valkey:9@sha256:4963247afc4cd33c7d3b2d2816b9f7f8eeebab148d29056c2ca4d7cbc966f2d9 + image: docker.io/valkey/valkey:9@sha256:3acc0687f2a2e1091fae6450d7842dd658c941338cf0a873ddd9e14b9e4ea4dd healthcheck: test: redis-cli ping || exit 1 diff --git a/e2e/eslint.config.mjs b/e2e/eslint.config.mjs index f73e31e48e..3d69d1f503 100644 --- a/e2e/eslint.config.mjs +++ b/e2e/eslint.config.mjs @@ -2,13 +2,8 @@ import js from '@eslint/js'; import eslintPluginPrettierRecommended from 'eslint-plugin-prettier/recommended'; import eslintPluginUnicorn from 'eslint-plugin-unicorn'; import globals from 'globals'; -import path from 'node:path'; -import { fileURLToPath } from 'node:url'; import typescriptEslint from 'typescript-eslint'; -const __filename = fileURLToPath(import.meta.url); -const __dirname = path.dirname(__filename); - export default typescriptEslint.config([ eslintPluginUnicorn.configs.recommended, eslintPluginPrettierRecommended, @@ -29,7 +24,7 @@ export default typescriptEslint.config([ parserOptions: { project: 'tsconfig.json', - tsconfigRootDir: __dirname, + tsconfigRootDir: import.meta.dirname, }, }, @@ -41,9 +36,18 @@ export default typescriptEslint.config([ '@typescript-eslint/no-floating-promises': 'error', 'unicorn/prefer-module': 'off', 'unicorn/import-style': 'off', + 'unicorn/consistent-boolean-name': 'off', + 'unicorn/no-non-function-verb-prefix': 'off', + 'unicorn/no-unreadable-for-of-expression': 'off', + 'unicorn/max-nested-calls': 'off', + 'unicorn/prefer-uint8array-base64': 'off', + 'unicorn/isolated-functions': 'off', + 'unicorn/prefer-promise-with-resolvers': 'off', + 'unicorn/no-declarations-before-early-exit': 'off', + 'unicorn/prefer-simple-condition-first': 'off', curly: 2, 'prettier/prettier': 0, - 'unicorn/prevent-abbreviations': 'off', + 'unicorn/name-replacements': 'off', 'unicorn/filename-case': 'off', 'unicorn/no-null': 'off', 'unicorn/prefer-top-level-await': 'off', diff --git a/e2e/mise.toml b/e2e/mise.toml index b149922564..487f4ebf46 100644 --- a/e2e/mise.toml +++ b/e2e/mise.toml @@ -1,5 +1,5 @@ [tasks.install] -run = "pnpm install --filter immich-e2e --frozen-lockfile" +run = "pnpm install --filter immich-e2e... --frozen-lockfile" [tasks.build] dir = "{{ config_root }}" @@ -40,18 +40,19 @@ run = "tsc --noEmit" [tasks.ci-setup] -depends = [ - "//:sdk:install", - "//:sdk:build", - "//packages/cli:install", - "//packages/cli:build", +run = [ + { task = "//:sdk:install" }, + { task = "//:sdk:build" }, + { task = "//packages/cli:install" }, + { task = "//packages/cli:build" }, + { task = ":install" }, ] -run = { task = ":install" } [tasks.ci-unit] -depends = ["//:sdk:install", "//:sdk:build"] run = [ + { task = "//:sdk:install" }, + { task = "//:sdk:build" }, { task = ":install" }, { task = ":format" }, { task = ":lint" }, diff --git a/e2e/package.json b/e2e/package.json index eefcdd03fd..6f38758a5f 100644 --- a/e2e/package.json +++ b/e2e/package.json @@ -1,6 +1,6 @@ { "name": "immich-e2e", - "version": "3.0.0-rc.3", + "version": "3.1.0", "description": "", "main": "index.js", "type": "module", @@ -32,7 +32,7 @@ "@playwright/test": "^1.44.1", "@socket.io/component-emitter": "^3.1.2", "@types/luxon": "^3.4.2", - "@types/node": "^24.13.2", + "@types/node": "^24.13.3", "@types/pg": "^8.15.1", "@types/pngjs": "^6.0.4", "@types/supertest": "^7.0.0", @@ -40,7 +40,7 @@ "eslint": "^10.0.0", "eslint-config-prettier": "^10.1.8", "eslint-plugin-prettier": "^5.1.3", - "eslint-plugin-unicorn": "^64.0.0", + "eslint-plugin-unicorn": "^72.0.0", "exiftool-vendored": "^35.0.0", "globals": "^17.0.0", "luxon": "^3.4.4", @@ -51,7 +51,8 @@ "sharp": "^0.34.5", "socket.io-client": "^4.7.4", "supertest": "^7.0.0", - "typescript": "^6.0.0", + "@typescript/native": "npm:typescript@^7.0.2", + "typescript": "npm:@typescript/typescript6@^6.0.2", "typescript-eslint": "^8.28.0", "utimes": "^5.2.1", "vitest": "^4.0.0" diff --git a/e2e/src/api/specs/duplicate.e2e-spec.ts b/e2e/src/api/specs/duplicate.e2e-spec.ts deleted file mode 100644 index d6d0ec1394..0000000000 --- a/e2e/src/api/specs/duplicate.e2e-spec.ts +++ /dev/null @@ -1,651 +0,0 @@ -import { LoginResponseDto } from '@immich/sdk'; -import { createUserDto, uuidDto } from 'src/fixtures'; -import { errorDto } from 'src/responses'; -import { app, utils } from 'src/utils'; -import request from 'supertest'; -import { beforeAll, beforeEach, describe, expect, it } from 'vitest'; - -describe('/duplicates', () => { - let admin: LoginResponseDto; - let user1: LoginResponseDto; - let user2: LoginResponseDto; - - beforeAll(async () => { - await utils.resetDatabase(); - - admin = await utils.adminSetup(); - - [user1, user2] = await Promise.all([ - utils.userSetup(admin.accessToken, createUserDto.user1), - utils.userSetup(admin.accessToken, createUserDto.user2), - ]); - }); - - beforeEach(async () => { - // Reset assets, albums, tags, and stacks between tests to ensure clean state for repeated test runs - // Note: We don't reset users since they're set up once in beforeAll - // Stack must be reset before asset due to foreign key constraint - await utils.resetDatabase(['stack', 'asset', 'album', 'tag']); - }); - - describe('GET /duplicates', () => { - it('should return empty array when no duplicates', async () => { - const { status, body } = await request(app) - .get('/duplicates') - .set('Authorization', `Bearer ${user1.accessToken}`); - - expect(status).toBe(200); - expect(body).toEqual([]); - }); - - it('should return duplicate groups with suggestedKeepAssetIds', async () => { - // Create assets with different file sizes for duplicate detection - const [asset1, asset2] = await Promise.all([ - utils.createAsset(user1.accessToken), - utils.createAsset(user1.accessToken), - ]); - - // Manually set duplicateId on both assets to create a duplicate group - const duplicateId = '00000000-0000-4000-8000-000000000001'; - await utils.setAssetDuplicateId(user1.accessToken, asset1.id, duplicateId); - await utils.setAssetDuplicateId(user1.accessToken, asset2.id, duplicateId); - - const { status, body } = await request(app) - .get('/duplicates') - .set('Authorization', `Bearer ${user1.accessToken}`); - - expect(status).toBe(200); - expect(body).toEqual([ - { - duplicateId, - assets: expect.arrayContaining([ - expect.objectContaining({ id: asset1.id }), - expect.objectContaining({ id: asset2.id }), - ]), - suggestedKeepAssetIds: expect.any(Array), - }, - ]); - expect(body[0].suggestedKeepAssetIds.length).toBe(1); - }); - }); - - describe('POST /duplicates/resolve', () => { - it('should require authentication', async () => { - const { status, body } = await request(app) - .post('/duplicates/resolve') - .send({ - groups: [{ duplicateId: uuidDto.dummy, keepAssetIds: [], trashAssetIds: [] }], - }); - - expect(status).toBe(401); - expect(body).toEqual(errorDto.unauthorized); - }); - - it('should return failure for non-existent duplicate group', async () => { - const { status, body } = await request(app) - .post('/duplicates/resolve') - .set('Authorization', `Bearer ${user1.accessToken}`) - .send({ - groups: [{ duplicateId: uuidDto.dummy, keepAssetIds: [], trashAssetIds: [] }], - }); - - expect(status).toBe(200); - expect(body).toEqual({ - status: 'COMPLETED', - results: [ - { - duplicateId: uuidDto.dummy, - status: 'FAILED', - reason: expect.stringContaining('not found or access denied'), - }, - ], - }); - }); - - it('should resolve duplicate group with keepers', async () => { - const [asset1, asset2] = await Promise.all([ - utils.createAsset(user1.accessToken), - utils.createAsset(user1.accessToken), - ]); - - const duplicateId = '00000000-0000-4000-8000-000000000002'; - await utils.setAssetDuplicateId(user1.accessToken, asset1.id, duplicateId); - await utils.setAssetDuplicateId(user1.accessToken, asset2.id, duplicateId); - - const { status, body } = await request(app) - .post('/duplicates/resolve') - .set('Authorization', `Bearer ${user1.accessToken}`) - .send({ - groups: [{ duplicateId, keepAssetIds: [asset1.id], trashAssetIds: [asset2.id] }], - }); - - expect(status).toBe(200); - expect(body).toEqual({ - status: 'COMPLETED', - results: [ - { - duplicateId, - status: 'SUCCESS', - }, - ], - }); - - // Verify side effects: duplicateId cleared on kept asset - const keptAsset = await utils.getAssetInfo(user1.accessToken, asset1.id); - expect(keptAsset.duplicateId).toBeNull(); - - // Verify side effects: trashed asset is trashed and duplicateId cleared - const trashedAsset = await utils.getAssetInfo(user1.accessToken, asset2.id); - expect(trashedAsset.isTrashed).toBe(true); - expect(trashedAsset.duplicateId).toBeNull(); - }); - - it('should reject when keepAssetIds and trashAssetIds overlap', async () => { - const [asset1, asset2] = await Promise.all([ - utils.createAsset(user1.accessToken), - utils.createAsset(user1.accessToken), - ]); - - const duplicateId = '00000000-0000-4000-8000-000000000003'; - await utils.setAssetDuplicateId(user1.accessToken, asset1.id, duplicateId); - await utils.setAssetDuplicateId(user1.accessToken, asset2.id, duplicateId); - - const { status, body } = await request(app) - .post('/duplicates/resolve') - .set('Authorization', `Bearer ${user1.accessToken}`) - .send({ - groups: [{ duplicateId, keepAssetIds: [asset1.id], trashAssetIds: [asset1.id] }], - }); - - expect(status).toBe(200); - expect(body.results[0].status).toBe('FAILED'); - expect(body.results[0].reason).toContain('disjoint'); - }); - - it('should require keepAssetIds when partially trashing', async () => { - const [asset1, asset2] = await Promise.all([ - utils.createAsset(user1.accessToken), - utils.createAsset(user1.accessToken), - ]); - - const duplicateId = '00000000-0000-4000-8000-000000000004'; - await utils.setAssetDuplicateId(user1.accessToken, asset1.id, duplicateId); - await utils.setAssetDuplicateId(user1.accessToken, asset2.id, duplicateId); - - const { status, body } = await request(app) - .post('/duplicates/resolve') - .set('Authorization', `Bearer ${user1.accessToken}`) - .send({ - groups: [{ duplicateId, keepAssetIds: [], trashAssetIds: [asset1.id] }], - }); - - expect(status).toBe(200); - expect(body.results[0].status).toBe('FAILED'); - expect(body.results[0].reason).toContain('must cover all assets'); - }); - - it('should reject partial resolution (not all assets covered)', async () => { - const [asset1, asset2, asset3] = await Promise.all([ - utils.createAsset(user1.accessToken), - utils.createAsset(user1.accessToken), - utils.createAsset(user1.accessToken), - ]); - - const duplicateId = '00000000-0000-4000-8000-000000000010'; - await utils.setAssetDuplicateId(user1.accessToken, asset1.id, duplicateId); - await utils.setAssetDuplicateId(user1.accessToken, asset2.id, duplicateId); - await utils.setAssetDuplicateId(user1.accessToken, asset3.id, duplicateId); - - const { status, body } = await request(app) - .post('/duplicates/resolve') - .set('Authorization', `Bearer ${user1.accessToken}`) - .send({ - groups: [{ duplicateId, keepAssetIds: [asset1.id], trashAssetIds: [asset2.id] }], - }); - - expect(status).toBe(200); - expect(body.results[0].status).toBe('FAILED'); - expect(body.results[0].reason).toContain('must cover all assets'); - }); - - it('should reject asset not in duplicate group', async () => { - const [asset1, asset2, outsideAsset] = await Promise.all([ - utils.createAsset(user1.accessToken), - utils.createAsset(user1.accessToken), - utils.createAsset(user1.accessToken), - ]); - - const duplicateId = '00000000-0000-4000-8000-000000000011'; - await utils.setAssetDuplicateId(user1.accessToken, asset1.id, duplicateId); - await utils.setAssetDuplicateId(user1.accessToken, asset2.id, duplicateId); - - const { status, body } = await request(app) - .post('/duplicates/resolve') - .set('Authorization', `Bearer ${user1.accessToken}`) - .send({ - groups: [{ duplicateId, keepAssetIds: [asset1.id], trashAssetIds: [outsideAsset.id] }], - }); - - expect(status).toBe(200); - expect(body.results[0].status).toBe('FAILED'); - expect(body.results[0].reason).toContain('not a member of duplicate group'); - }); - - it('should allow trash-all without keepers', async () => { - const [asset1, asset2] = await Promise.all([ - utils.createAsset(user1.accessToken), - utils.createAsset(user1.accessToken), - ]); - - const duplicateId = '00000000-0000-4000-8000-000000000012'; - await utils.setAssetDuplicateId(user1.accessToken, asset1.id, duplicateId); - await utils.setAssetDuplicateId(user1.accessToken, asset2.id, duplicateId); - - const { status, body } = await request(app) - .post('/duplicates/resolve') - .set('Authorization', `Bearer ${user1.accessToken}`) - .send({ - groups: [{ duplicateId, keepAssetIds: [], trashAssetIds: [asset1.id, asset2.id] }], - }); - - expect(status).toBe(200); - expect(body).toEqual({ - status: 'COMPLETED', - results: [ - { - duplicateId, - status: 'SUCCESS', - }, - ], - }); - - // Verify both assets are trashed - const [asset1Info, asset2Info] = await Promise.all([ - utils.getAssetInfo(user1.accessToken, asset1.id), - utils.getAssetInfo(user1.accessToken, asset2.id), - ]); - - expect(asset1Info.isTrashed).toBe(true); - expect(asset1Info.duplicateId).toBeNull(); - expect(asset2Info.isTrashed).toBe(true); - expect(asset2Info.duplicateId).toBeNull(); - }); - - it('should reject cross-user duplicate group access', async () => { - const asset1 = await utils.createAsset(user1.accessToken); - const asset2 = await utils.createAsset(user2.accessToken); - - const duplicateId = '00000000-0000-4000-8000-000000000013'; - await utils.setAssetDuplicateId(user1.accessToken, asset1.id, duplicateId); - await utils.setAssetDuplicateId(user2.accessToken, asset2.id, duplicateId); - - // User1 tries to resolve a group containing user2's asset - const { status, body } = await request(app) - .post('/duplicates/resolve') - .set('Authorization', `Bearer ${user1.accessToken}`) - .send({ - groups: [{ duplicateId, keepAssetIds: [asset1.id], trashAssetIds: [asset2.id] }], - }); - - expect(status).toBe(200); - expect(body.results[0].status).toBe('FAILED'); - expect(body.results[0].reason).toContain('not a member of duplicate group'); - }); - - it('should synchronize favorites when enabled', async () => { - const [asset1, asset2] = await Promise.all([ - utils.createAsset(user1.accessToken), - utils.createAsset(user1.accessToken), - ]); - - // Mark one asset as favorite - await request(app) - .put('/assets') - .set('Authorization', `Bearer ${user1.accessToken}`) - .send({ ids: [asset2.id], isFavorite: true }); - - const duplicateId = '00000000-0000-4000-8000-000000000020'; - await utils.setAssetDuplicateId(user1.accessToken, asset1.id, duplicateId); - await utils.setAssetDuplicateId(user1.accessToken, asset2.id, duplicateId); - - const { status, body } = await request(app) - .post('/duplicates/resolve') - .set('Authorization', `Bearer ${user1.accessToken}`) - .send({ - groups: [{ duplicateId, keepAssetIds: [asset1.id], trashAssetIds: [asset2.id] }], - }); - - expect(status).toBe(200); - expect(body.results[0].status).toBe('SUCCESS'); - - // Verify favorite was synchronized to keeper - const keptAsset = await utils.getAssetInfo(user1.accessToken, asset1.id); - expect(keptAsset.isFavorite).toBe(true); - expect(keptAsset.duplicateId).toBeNull(); - }); - - it('should synchronize visibility when enabled', async () => { - const [asset1, asset2] = await Promise.all([ - utils.createAsset(user1.accessToken), - utils.createAsset(user1.accessToken), - ]); - - // Archive one asset - await utils.archiveAssets(user1.accessToken, [asset2.id]); - - const duplicateId = '00000000-0000-4000-8000-000000000021'; - await utils.setAssetDuplicateId(user1.accessToken, asset1.id, duplicateId); - await utils.setAssetDuplicateId(user1.accessToken, asset2.id, duplicateId); - - const { status, body } = await request(app) - .post('/duplicates/resolve') - .set('Authorization', `Bearer ${user1.accessToken}`) - .send({ - groups: [{ duplicateId, keepAssetIds: [asset1.id], trashAssetIds: [asset2.id] }], - }); - - expect(status).toBe(200); - expect(body.results[0].status).toBe('SUCCESS'); - - // Verify visibility was synchronized to keeper - const keptAsset = await utils.getAssetInfo(user1.accessToken, asset1.id); - expect(keptAsset.visibility).toBe('archive'); - expect(keptAsset.duplicateId).toBeNull(); - }); - - it('should synchronize rating when enabled', async () => { - const [asset1, asset2] = await Promise.all([ - utils.createAsset(user1.accessToken), - utils.createAsset(user1.accessToken), - ]); - - // Set rating on one asset - await request(app) - .put('/assets') - .set('Authorization', `Bearer ${user1.accessToken}`) - .send({ ids: [asset2.id], rating: 5 }); - - const duplicateId = '00000000-0000-4000-8000-000000000022'; - await utils.setAssetDuplicateId(user1.accessToken, asset1.id, duplicateId); - await utils.setAssetDuplicateId(user1.accessToken, asset2.id, duplicateId); - - const { status, body } = await request(app) - .post('/duplicates/resolve') - .set('Authorization', `Bearer ${user1.accessToken}`) - .send({ - groups: [{ duplicateId, keepAssetIds: [asset1.id], trashAssetIds: [asset2.id] }], - }); - - expect(status).toBe(200); - expect(body.results[0].status).toBe('SUCCESS'); - - // Verify rating was synchronized to keeper - const keptAsset = await utils.getAssetInfo(user1.accessToken, asset1.id); - expect(keptAsset.exifInfo?.rating).toBe(5); - expect(keptAsset.duplicateId).toBeNull(); - }); - - it('should synchronize description when enabled', async () => { - const [asset1, asset2] = await Promise.all([ - utils.createAsset(user1.accessToken), - utils.createAsset(user1.accessToken), - ]); - - // Set description on one asset - await request(app) - .put('/assets') - .set('Authorization', `Bearer ${user1.accessToken}`) - .send({ ids: [asset2.id], description: 'Test description for duplicate' }); - - const duplicateId = '00000000-0000-4000-8000-000000000023'; - await utils.setAssetDuplicateId(user1.accessToken, asset1.id, duplicateId); - await utils.setAssetDuplicateId(user1.accessToken, asset2.id, duplicateId); - - const { status, body } = await request(app) - .post('/duplicates/resolve') - .set('Authorization', `Bearer ${user1.accessToken}`) - .send({ - groups: [{ duplicateId, keepAssetIds: [asset1.id], trashAssetIds: [asset2.id] }], - }); - - expect(status).toBe(200); - expect(body.results[0].status).toBe('SUCCESS'); - - // Verify description was synchronized to keeper - const keptAsset = await utils.getAssetInfo(user1.accessToken, asset1.id); - expect(keptAsset.exifInfo?.description).toBe('Test description for duplicate'); - expect(keptAsset.duplicateId).toBeNull(); - }); - - it('should synchronize location when enabled', async () => { - const [asset1, asset2] = await Promise.all([ - utils.createAsset(user1.accessToken), - utils.createAsset(user1.accessToken), - ]); - - // Set location on one asset - await request(app) - .put('/assets') - .set('Authorization', `Bearer ${user1.accessToken}`) - .send({ ids: [asset2.id], latitude: 40.7128, longitude: -74.006 }); - - const duplicateId = '00000000-0000-4000-8000-000000000024'; - await utils.setAssetDuplicateId(user1.accessToken, asset1.id, duplicateId); - await utils.setAssetDuplicateId(user1.accessToken, asset2.id, duplicateId); - - const { status, body } = await request(app) - .post('/duplicates/resolve') - .set('Authorization', `Bearer ${user1.accessToken}`) - .send({ - groups: [{ duplicateId, keepAssetIds: [asset1.id], trashAssetIds: [asset2.id] }], - }); - - expect(status).toBe(200); - expect(body.results[0].status).toBe('SUCCESS'); - - // Verify location was synchronized to keeper - const keptAsset = await utils.getAssetInfo(user1.accessToken, asset1.id); - expect(keptAsset.exifInfo?.latitude).toBe(40.7128); - expect(keptAsset.exifInfo?.longitude).toBe(-74.006); - expect(keptAsset.duplicateId).toBeNull(); - }); - - it('should synchronize albums when enabled', async () => { - const [asset1, asset2] = await Promise.all([ - utils.createAsset(user1.accessToken), - utils.createAsset(user1.accessToken), - ]); - - // Create albums and add assets to different albums - const album1 = await utils.createAlbum(user1.accessToken, { - albumName: 'Album 1', - assetIds: [asset1.id], - }); - const album2 = await utils.createAlbum(user1.accessToken, { - albumName: 'Album 2', - assetIds: [asset2.id], - }); - - const duplicateId = '00000000-0000-4000-8000-000000000025'; - await utils.setAssetDuplicateId(user1.accessToken, asset1.id, duplicateId); - await utils.setAssetDuplicateId(user1.accessToken, asset2.id, duplicateId); - - const { status, body } = await request(app) - .post('/duplicates/resolve') - .set('Authorization', `Bearer ${user1.accessToken}`) - .send({ - groups: [{ duplicateId, keepAssetIds: [asset1.id], trashAssetIds: [asset2.id] }], - }); - - expect(status).toBe(200); - expect(body.results[0].status).toBe('SUCCESS'); - - // Verify keeper is now in both albums - const keptAsset = await utils.getAssetInfo(user1.accessToken, asset1.id); - expect(keptAsset.duplicateId).toBeNull(); - - // Check albums directly - const { status: album1Status, body: album1Body } = await request(app) - .get(`/albums/${album1.id}`) - .set('Authorization', `Bearer ${user1.accessToken}`); - const { status: album2Status, body: album2Body } = await request(app) - .get(`/albums/${album2.id}`) - .set('Authorization', `Bearer ${user1.accessToken}`); - - expect(album1Status).toBe(200); - expect(album2Status).toBe(200); - expect(album1Body.assets.map((a: any) => a.id)).toContain(asset1.id); - expect(album2Body.assets.map((a: any) => a.id)).toContain(asset1.id); - }); - - it('should synchronize tags when enabled', async () => { - const [asset1, asset2] = await Promise.all([ - utils.createAsset(user1.accessToken), - utils.createAsset(user1.accessToken), - ]); - - // Wait for metadata extraction to complete before adding tags - // Otherwise, metadata jobs will race and overwrite our tags - await utils.waitForQueueFinish(admin.accessToken, 'metadataExtraction'); - - // Create tags and tag assets differently - const tags = await utils.upsertTags(user1.accessToken, ['tag1', 'tag2']); - await utils.tagAssets(user1.accessToken, tags[0].id, [asset1.id]); - await utils.tagAssets(user1.accessToken, tags[1].id, [asset2.id]); - - const duplicateId = '00000000-0000-4000-8000-000000000026'; - await utils.setAssetDuplicateId(user1.accessToken, asset1.id, duplicateId); - await utils.setAssetDuplicateId(user1.accessToken, asset2.id, duplicateId); - - const { status, body } = await request(app) - .post('/duplicates/resolve') - .set('Authorization', `Bearer ${user1.accessToken}`) - .send({ - groups: [{ duplicateId, keepAssetIds: [asset1.id], trashAssetIds: [asset2.id] }], - }); - - expect(status).toBe(200); - expect(body.results[0].status).toBe('SUCCESS'); - - // Verify keeper has both tags - const keptAsset = await utils.getAssetInfo(user1.accessToken, asset1.id); - expect(keptAsset.duplicateId).toBeNull(); - expect(keptAsset.tags).toBeDefined(); - const tagIds = keptAsset.tags?.map((t) => t.id) || []; - expect(tagIds).toContain(tags[0].id); - expect(tagIds).toContain(tags[1].id); - }); - - it('should handle batch resolve with mixed success and failure', async () => { - // Create first group that will succeed - const [asset1, asset2] = await Promise.all([ - utils.createAsset(user1.accessToken), - utils.createAsset(user1.accessToken), - ]); - const duplicateId1 = '00000000-0000-4000-8000-000000000027'; - await utils.setAssetDuplicateId(user1.accessToken, asset1.id, duplicateId1); - await utils.setAssetDuplicateId(user1.accessToken, asset2.id, duplicateId1); - - // Create second group with non-existent duplicate ID (will fail) - const fakeId = '00000000-0000-4000-8000-000000000099'; - - const { status, body } = await request(app) - .post('/duplicates/resolve') - .set('Authorization', `Bearer ${user1.accessToken}`) - .send({ - groups: [ - { duplicateId: duplicateId1, keepAssetIds: [asset1.id], trashAssetIds: [asset2.id] }, - { duplicateId: fakeId, keepAssetIds: [], trashAssetIds: [] }, - ], - }); - - expect(status).toBe(200); - expect(body.status).toBe('COMPLETED'); - expect(body.results).toHaveLength(2); - - // First group should succeed - expect(body.results[0].duplicateId).toBe(duplicateId1); - expect(body.results[0].status).toBe('SUCCESS'); - - // Second group should fail - expect(body.results[1].duplicateId).toBe(fakeId); - expect(body.results[1].status).toBe('FAILED'); - expect(body.results[1].reason).toContain('not found or access denied'); - - // Verify first group was actually resolved despite second failure - const asset1Info = await utils.getAssetInfo(user1.accessToken, asset1.id); - expect(asset1Info.duplicateId).toBeNull(); - const asset2Info = await utils.getAssetInfo(user1.accessToken, asset2.id); - expect(asset2Info.isTrashed).toBe(true); - }); - - it('should trash assets when trash is enabled', async () => { - const [asset1, asset2] = await Promise.all([ - utils.createAsset(user1.accessToken), - utils.createAsset(user1.accessToken), - ]); - - const duplicateId = '00000000-0000-4000-8000-000000000028'; - await utils.setAssetDuplicateId(user1.accessToken, asset1.id, duplicateId); - await utils.setAssetDuplicateId(user1.accessToken, asset2.id, duplicateId); - - // Ensure trash is enabled (default) - const config = await utils.getSystemConfig(admin.accessToken); - expect(config.trash.enabled).toBe(true); - - const { status, body } = await request(app) - .post('/duplicates/resolve') - .set('Authorization', `Bearer ${user1.accessToken}`) - .send({ - groups: [{ duplicateId, keepAssetIds: [asset1.id], trashAssetIds: [asset2.id] }], - }); - - expect(status).toBe(200); - expect(body.results[0].status).toBe('SUCCESS'); - - // Verify asset is trashed (not deleted) - const trashedAsset = await utils.getAssetInfo(user1.accessToken, asset2.id); - expect(trashedAsset.isTrashed).toBe(true); - }); - - it('should delete assets when trash is disabled', async () => { - const [asset1, asset2] = await Promise.all([ - utils.createAsset(user1.accessToken), - utils.createAsset(user1.accessToken), - ]); - - const duplicateId = '00000000-0000-4000-8000-000000000029'; - await utils.setAssetDuplicateId(user1.accessToken, asset1.id, duplicateId); - await utils.setAssetDuplicateId(user1.accessToken, asset2.id, duplicateId); - - // Disable trash - await request(app) - .put('/system-config') - .set('Authorization', `Bearer ${admin.accessToken}`) - .send({ - trash: { enabled: false, days: 30 }, - }); - - const { status, body } = await request(app) - .post('/duplicates/resolve') - .set('Authorization', `Bearer ${user1.accessToken}`) - .send({ - groups: [{ duplicateId, keepAssetIds: [asset1.id], trashAssetIds: [asset2.id] }], - }); - - expect(status).toBe(200); - expect(body.results[0].status).toBe('SUCCESS'); - - // Asset should be marked as deleted (force delete) - const { status: getStatus } = await request(app) - .get(`/assets/${asset2.id}`) - .set('Authorization', `Bearer ${user1.accessToken}`); - - // Asset should still be accessible (soft deleted) but marked as deleted - expect(getStatus).toBe(200); - - // Re-enable trash for other tests - await utils.resetAdminConfig(admin.accessToken); - }); - }); -}); diff --git a/e2e/src/fixtures.ts b/e2e/src/fixtures.ts index 1e03ad6d24..a43e2c3e69 100644 --- a/e2e/src/fixtures.ts +++ b/e2e/src/fixtures.ts @@ -1,9 +1,7 @@ export const uuidDto = { - invalid: 'invalid-uuid', // valid uuid v4 notFound: '00000000-0000-4000-a000-000000000000', dummy: '00000000-0000-4000-a000-000000000001', - dummy2: '00000000-0000-4000-a000-000000000002', }; const adminLoginDto = { @@ -57,22 +55,6 @@ export const createUserDto = { }; export const userDto = { - admin: { - name: signupDto.admin.name, - email: signupDto.admin.email, - password: signupDto.admin.password, - storageLabel: 'admin', - oauthId: '', - shouldChangePassword: false, - profileImagePath: '', - createdAt: new Date('2021-01-01'), - deletedAt: null, - updatedAt: new Date('2021-01-01'), - tags: [], - assets: [], - quotaSizeInBytes: null, - quotaUsageInBytes: 0, - }, user1: { name: createUserDto.user1.name, email: createUserDto.user1.email, diff --git a/e2e/src/responses.ts b/e2e/src/responses.ts index 5fd887c44b..337d101cb4 100644 --- a/e2e/src/responses.ts +++ b/e2e/src/responses.ts @@ -38,46 +38,8 @@ export const errorDto = { incorrectLogin: { message: 'Incorrect email or password', }, - alreadyHasAdmin: { - message: 'The server already has an admin', - }, }; -export const signupResponseDto = { - admin: { - avatarColor: expect.any(String), - id: expect.any(String), - name: 'Immich Admin', - email: 'admin@immich.cloud', - storageLabel: 'admin', - profileImagePath: '', - // why? lol - shouldChangePassword: true, - isAdmin: true, - createdAt: expect.any(String), - updatedAt: expect.any(String), - deletedAt: null, - oauthId: '', - quotaUsageInBytes: 0, - quotaSizeInBytes: null, - status: 'active', - license: null, - profileChangedAt: expect.any(String), - }, -}; - -export const loginResponseDto = { - admin: { - accessToken: expect.any(String), - name: 'Immich Admin', - isAdmin: true, - isOnboarded: false, - profileImagePath: '', - shouldChangePassword: true, - userEmail: 'admin@immich.cloud', - userId: expect.any(String), - }, -}; export const deviceDto = { current: { id: expect.any(String), diff --git a/e2e/src/specs/maintenance/server/database-backups.e2e-spec.ts b/e2e/src/specs/maintenance/server/database-backups.e2e-spec.ts index e3bd98db28..e757c721d6 100644 --- a/e2e/src/specs/maintenance/server/database-backups.e2e-spec.ts +++ b/e2e/src/specs/maintenance/server/database-backups.e2e-spec.ts @@ -108,7 +108,7 @@ describe('/admin/database-backups', () => { const { status, body } = await request(app).post('/admin/database-backups/start-restore').send(); expect(status).toBe(400); - expect(body).toEqual(errorDto.badRequest('The server already has an admin')); + expect(body).toEqual(errorDto.badRequest('Admin setup is not available')); }); it.sequential('should enter maintenance mode in "database restore mode"', async () => { @@ -118,7 +118,7 @@ describe('/admin/database-backups', () => { expect(status).toBe(201); - cookie = headers['set-cookie'][0].split(';')[0]; + cookie = headers['set-cookie'][0].split(';', 1)[0]; await expect .poll( @@ -224,7 +224,7 @@ describe('/admin/database-backups', () => { }); expect(status).toBe(201); - cookie = headers['set-cookie'][0].split(';')[0]; + cookie = headers['set-cookie'][0].split(';', 1)[0]; await expect .poll( @@ -295,7 +295,7 @@ describe('/admin/database-backups', () => { }); expect(status).toBe(201); - cookie = headers['set-cookie'][0].split(';')[0]; + cookie = headers['set-cookie'][0].split(';', 1)[0]; await expect .poll( diff --git a/e2e/src/specs/maintenance/server/maintenance.e2e-spec.ts b/e2e/src/specs/maintenance/server/maintenance.e2e-spec.ts index 819a4e31f7..f3833ffc00 100644 --- a/e2e/src/specs/maintenance/server/maintenance.e2e-spec.ts +++ b/e2e/src/specs/maintenance/server/maintenance.e2e-spec.ts @@ -85,7 +85,7 @@ describe('/admin/maintenance', () => { expect(status).toBe(201); - cookie = headers['set-cookie'][0].split(';')[0]; + cookie = headers['set-cookie'][0].split(';', 1)[0]; expect(cookie).toEqual( expect.stringMatching(/^immich_maintenance_token=[A-Za-z0-9-_]*\.[A-Za-z0-9-_]*\.[A-Za-z0-9-_]*$/), ); @@ -149,7 +149,7 @@ describe('/admin/maintenance', () => { const { status, body } = await request(app) .post('/admin/maintenance/login') .send({ - token: cookie!.split('=')[1].trim(), + token: cookie!.split('=', 2)[1].trim(), }); expect(status).toBe(201); expect(body).toEqual( diff --git a/e2e/src/specs/maintenance/web/maintenance.e2e-spec.ts b/e2e/src/specs/maintenance/web/maintenance.e2e-spec.ts index 8b1631f0bf..6b58f5a425 100644 --- a/e2e/src/specs/maintenance/web/maintenance.e2e-spec.ts +++ b/e2e/src/specs/maintenance/web/maintenance.e2e-spec.ts @@ -27,7 +27,7 @@ test.describe('Maintenance', () => { test('maintenance shows no options to users until they authenticate', async ({ page }) => { const setCookie = await utils.enterMaintenance(admin.accessToken); const cookie = setCookie - ?.map((cookie) => cookie.split(';')[0].split('=')) + ?.map((cookie) => cookie.split(';', 1)[0].split('=')) ?.find(([name]) => name === 'immich_maintenance_token'); expect(cookie).toBeTruthy(); diff --git a/e2e/src/specs/server/api/album.e2e-spec.ts b/e2e/src/specs/server/api/album.e2e-spec.ts index 0aa7b7ec03..f252e5d321 100644 --- a/e2e/src/specs/server/api/album.e2e-spec.ts +++ b/e2e/src/specs/server/api/album.e2e-spec.ts @@ -120,6 +120,7 @@ describe('/albums', () => { }), ]); + // eslint-disable-next-line unicorn/no-unreadable-array-destructuring [user2Albums[0]] = await Promise.all([ getAlbumInfo({ id: user2Albums[0].id }, { headers: asBearerAuth(user2.accessToken) }), deleteUserAdmin({ id: user3.userId, userAdminDeleteDto: {} }, { headers: asBearerAuth(admin.accessToken) }), @@ -796,5 +797,22 @@ describe('/albums', () => { expect(status).toBe(400); expect(body).toEqual(errorDto.badRequest('Not found or no album.share access')); }); + + it('should not allow an editor to change the role of an owner', async () => { + const album = await utils.createAlbum(user1.accessToken, { + albumName: 'testAlbum', + albumUsers: [{ userId: user2.userId, role: AlbumUserRole.Editor }], + }); + + expect(album.albumUsers[1].role).toEqual(AlbumUserRole.Editor); + + const { status, body } = await request(app) + .put(`/albums/${album.id}/user/${user1.userId}`) + .set('Authorization', `Bearer ${user2.accessToken}`) + .send({ role: AlbumUserRole.Editor }); + + expect(status).toBe(400); + expect(body).toEqual(errorDto.badRequest('User is owner')); + }); }); }); diff --git a/e2e/src/specs/server/api/asset.e2e-spec.ts b/e2e/src/specs/server/api/asset.e2e-spec.ts index 010b096c4d..ccebd1ca77 100644 --- a/e2e/src/specs/server/api/asset.e2e-spec.ts +++ b/e2e/src/specs/server/api/asset.e2e-spec.ts @@ -781,7 +781,7 @@ describe('/asset', () => { exifImageWidth: 4032, exifImageHeight: 3024, latitude: 41.2203, - longitude: -96.071_625, + longitude: -96.071625, make: 'Apple', model: 'iPhone 7', lensModel: 'iPhone 7 back camera 3.99mm f/1.8', @@ -973,9 +973,9 @@ describe('/asset', () => { fileSizeInByte: 31_175_472, focalLength: 18.3, iso: 100, - latitude: 36.613_24, + latitude: 36.61324, lensModel: '18.3mm F2.8', - longitude: -121.897_85, + longitude: -121.89785, make: 'RICOH IMAGING COMPANY, LTD.', model: 'RICOH GR III', orientation: '1', diff --git a/e2e/src/specs/server/api/map.e2e-spec.ts b/e2e/src/specs/server/api/map.e2e-spec.ts index 2eb363eabd..c177fa740b 100644 --- a/e2e/src/specs/server/api/map.e2e-spec.ts +++ b/e2e/src/specs/server/api/map.e2e-spec.ts @@ -75,7 +75,7 @@ describe('/map', () => { country: 'United States of America', id: expect.any(String), lat: expect.closeTo(39.115), - lon: expect.closeTo(-108.400_968), + lon: expect.closeTo(-108.400968), state: 'Colorado', }, { @@ -83,7 +83,7 @@ describe('/map', () => { country: 'United States of America', id: expect.any(String), lat: expect.closeTo(41.2203), - lon: expect.closeTo(-96.071_625), + lon: expect.closeTo(-96.071625), state: 'Nebraska', }, ]); @@ -123,7 +123,7 @@ describe('/map', () => { country: 'United States of America', id: expect.any(String), lat: expect.closeTo(39.115), - lon: expect.closeTo(-108.400_968), + lon: expect.closeTo(-108.400968), state: 'Colorado', }, { @@ -131,7 +131,7 @@ describe('/map', () => { country: 'United States of America', id: expect.any(String), lat: expect.closeTo(41.2203), - lon: expect.closeTo(-96.071_625), + lon: expect.closeTo(-96.071625), state: 'Nebraska', }, ]); @@ -188,20 +188,20 @@ describe('/map', () => { const reverseGeocodeTestCases = [ { name: 'Vaucluse', - lat: -33.858_977_058_663_13, - lon: 151.278_490_730_270_48, + lat: -33.85897705866313, + lon: 151.27849073027048, results: [{ city: 'Vaucluse', state: 'New South Wales', country: 'Australia' }], }, { name: 'Ravenhall', - lat: -37.765_732_399_174_75, - lon: 144.752_453_164_883_3, + lat: -37.76573239917475, + lon: 144.7524531648833, results: [{ city: 'Ravenhall', state: 'Victoria', country: 'Australia' }], }, { name: 'Scarborough', - lat: -31.894_346_156_789_997, - lon: 115.757_617_103_904_64, + lat: -31.894346156789997, + lon: 115.75761710390464, results: [{ city: 'Scarborough', state: 'Western Australia', country: 'Australia' }], }, ]; diff --git a/e2e/src/specs/server/api/oauth.e2e-spec.ts b/e2e/src/specs/server/api/oauth.e2e-spec.ts index 4bf4f197b1..ade6475519 100644 --- a/e2e/src/specs/server/api/oauth.e2e-spec.ts +++ b/e2e/src/specs/server/api/oauth.e2e-spec.ts @@ -44,7 +44,7 @@ const loginWithOAuth = async (sub: OAuthUser | string, redirectUri?: string) => }); // login - const response1 = await redirect(url.replace(authServer.internal, authServer.external)); + const response1 = await redirect(url.replace(authServer.internal, () => authServer.external)); const response2 = await request(authServer.external + response1.location) .post('') .set('Cookie', response1.cookies) diff --git a/e2e/src/specs/server/api/partner.e2e-spec.ts b/e2e/src/specs/server/api/partner.e2e-spec.ts index 9047a97055..0eb7d6db3d 100644 --- a/e2e/src/specs/server/api/partner.e2e-spec.ts +++ b/e2e/src/specs/server/api/partner.e2e-spec.ts @@ -1,6 +1,5 @@ import { LoginResponseDto, createPartner } from '@immich/sdk'; import { createUserDto } from 'src/fixtures'; -import { errorDto } from 'src/responses'; import { app, asBearerAuth, utils } from 'src/utils'; import request from 'supertest'; import { beforeAll, describe, expect, it } from 'vitest'; @@ -29,13 +28,6 @@ describe('/partners', () => { }); describe('GET /partners', () => { - it('should require authentication', async () => { - const { status, body } = await request(app).get('/partners'); - - expect(status).toBe(401); - expect(body).toEqual(errorDto.unauthorized); - }); - it('should get all partners shared by user', async () => { const { status, body } = await request(app) .get('/partners') @@ -58,13 +50,6 @@ describe('/partners', () => { }); describe('POST /partners/:id', () => { - it('should require authentication', async () => { - const { status, body } = await request(app).post(`/partners/${user3.userId}`); - - expect(status).toBe(401); - expect(body).toEqual(errorDto.unauthorized); - }); - it('should share with new partner', async () => { const { status, body } = await request(app) .post(`/partners/${user3.userId}`) @@ -85,13 +70,6 @@ describe('/partners', () => { }); describe('PUT /partners/:id', () => { - it('should require authentication', async () => { - const { status, body } = await request(app).put(`/partners/${user2.userId}`); - - expect(status).toBe(401); - expect(body).toEqual(errorDto.unauthorized); - }); - it('should update partner', async () => { const { status, body } = await request(app) .put(`/partners/${user2.userId}`) @@ -104,13 +82,6 @@ describe('/partners', () => { }); describe('DELETE /partners/:id', () => { - it('should require authentication', async () => { - const { status, body } = await request(app).delete(`/partners/${user3.userId}`); - - expect(status).toBe(401); - expect(body).toEqual(errorDto.unauthorized); - }); - it('should delete partner', async () => { const { status } = await request(app) .delete(`/partners/${user3.userId}`) diff --git a/e2e/src/specs/server/api/search.e2e-spec.ts b/e2e/src/specs/server/api/search.e2e-spec.ts index 0b86053f78..47c88c238c 100644 --- a/e2e/src/specs/server/api/search.e2e-spec.ts +++ b/e2e/src/specs/server/api/search.e2e-spec.ts @@ -4,6 +4,7 @@ import { AssetVisibility, deleteAssets, LoginResponseDto, + SharedLinkType, updateAsset, } from '@immich/sdk'; import { DateTime } from 'luxon'; @@ -86,23 +87,23 @@ describe('/search', () => { // note: the coordinates here are not the actual coordinates of the images and are random for most of them const coordinates = [ - { latitude: 48.853_41, longitude: 2.3488 }, // paris - { latitude: 35.6895, longitude: 139.691_71 }, // tokyo - { latitude: 52.524_37, longitude: 13.410_53 }, // berlin - { latitude: 1.314_663_1, longitude: 103.845_409_3 }, // singapore - { latitude: 41.013_84, longitude: 28.949_66 }, // istanbul - { latitude: 5.556_02, longitude: -0.1969 }, // accra - { latitude: 37.544_270_6, longitude: -4.727_752_8 }, // andalusia - { latitude: 23.133_02, longitude: -82.383_04 }, // havana - { latitude: 41.694_11, longitude: 44.833_68 }, // tbilisi - { latitude: 31.222_22, longitude: 121.458_06 }, // shanghai + { latitude: 48.85341, longitude: 2.3488 }, // paris + { latitude: 35.6895, longitude: 139.69171 }, // tokyo + { latitude: 52.52437, longitude: 13.41053 }, // berlin + { latitude: 1.3146631, longitude: 103.8454093 }, // singapore + { latitude: 41.01384, longitude: 28.94966 }, // istanbul + { latitude: 5.55602, longitude: -0.1969 }, // accra + { latitude: 37.5442706, longitude: -4.7277528 }, // andalusia + { latitude: 23.13302, longitude: -82.38304 }, // havana + { latitude: 41.69411, longitude: 44.83368 }, // tbilisi + { latitude: 31.22222, longitude: 121.45806 }, // shanghai { latitude: 38.9711, longitude: -109.7137 }, // thompson springs - { latitude: 40.714_27, longitude: -74.005_97 }, // new york - { latitude: 47.040_57, longitude: 9.068_04 }, // glarus - { latitude: 32.771_52, longitude: -89.116_73 }, // philadelphia - { latitude: 31.634_16, longitude: -7.999_94 }, // marrakesh - { latitude: 38.523_735_4, longitude: -78.488_619_4 }, // tanners ridge - { latitude: 59.938_63, longitude: 30.314_13 }, // st. petersburg + { latitude: 40.71427, longitude: -74.00597 }, // new york + { latitude: 47.04057, longitude: 9.06804 }, // glarus + { latitude: 32.77152, longitude: -89.11673 }, // philadelphia + { latitude: 31.63416, longitude: -7.99994 }, // marrakesh + { latitude: 38.5237354, longitude: -78.4886194 }, // tanners ridge + { latitude: 59.93863, longitude: 30.31413 }, // st. petersburg { latitude: 0, longitude: 0 }, // null island ]; @@ -111,7 +112,7 @@ describe('/search', () => { ); await Promise.all(updates); - for (const [i] of coordinates.entries()) { + for (const i of coordinates.keys()) { await utils.waitForWebsocketEvent({ event: 'assetUpdate', id: assets[i].id }); } @@ -357,6 +358,32 @@ describe('/search', () => { expect(body.assets.items).toHaveLength(assets.length); }); } + + it('should reject shared link access without an album filter', async () => { + const album = await utils.createAlbum(admin.accessToken, { albumName: 'foo' }); + const sharedLink = await utils.createSharedLink(admin.accessToken, { + type: SharedLinkType.Album, + albumId: album.id, + }); + const { status, body } = await request(app).post(`/search/metadata?key=${sharedLink.key}`).send({}); + expect(status).toBe(400); + expect(body).toEqual({ message: 'Shared link access is only allowed in combination with an albumIds filter' }); + }); + + it('should allow shared link access for albums', async () => { + const asset = await utils.createAsset(admin.accessToken); + const album = await utils.createAlbum(admin.accessToken, { albumName: 'foo', assetIds: [asset.id] }); + const sharedLink = await utils.createSharedLink(admin.accessToken, { + type: SharedLinkType.Album, + albumId: album.id, + }); + + const { status, body } = await request(app) + .post(`/search/metadata?key=${sharedLink.key}`) + .send({ albumIds: [album.id] }); + expect(status).toBe(200); + expect(body.assets.items).toEqual([expect.objectContaining({ id: asset.id })]); + }); }); describe('POST /search/random', () => { diff --git a/e2e/src/specs/server/api/server.e2e-spec.ts b/e2e/src/specs/server/api/server.e2e-spec.ts index 46d998511d..f0eed82f7a 100644 --- a/e2e/src/specs/server/api/server.e2e-spec.ts +++ b/e2e/src/specs/server/api/server.e2e-spec.ts @@ -22,12 +22,6 @@ describe('/server', () => { }); describe('GET /server/about', () => { - it('should require authentication', async () => { - const { status, body } = await request(app).get('/server/about'); - expect(status).toBe(401); - expect(body).toEqual(errorDto.unauthorized); - }); - it('should return about information', async () => { const { status, body } = await request(app) .get('/server/about') @@ -56,12 +50,6 @@ describe('/server', () => { }); describe('GET /server/storage', () => { - it('should require authentication', async () => { - const { status, body } = await request(app).get('/server/storage'); - expect(status).toBe(401); - expect(body).toEqual(errorDto.unauthorized); - }); - it('should return the disk information', async () => { const { status, body } = await request(app) .get('/server/storage') @@ -91,12 +79,14 @@ describe('/server', () => { it('should respond with the server version', async () => { const { status, body } = await request(app).get('/server/version'); expect(status).toBe(200); - expect(body).toEqual({ - major: expect.any(Number), - minor: expect.any(Number), - patch: expect.any(Number), - prerelease: expect.anything(), - }); + expect(body).toEqual( + expect.objectContaining({ + major: expect.any(Number), + minor: expect.any(Number), + patch: expect.any(Number), + }), + ); + expect(Object.keys(body)).toEqual(expect.arrayContaining(['major', 'minor', 'patch', 'prerelease'])); }); }); @@ -147,12 +137,6 @@ describe('/server', () => { }); describe('GET /server/statistics', () => { - it('should require authentication', async () => { - const { status, body } = await request(app).get('/server/statistics'); - expect(status).toBe(401); - expect(body).toEqual(errorDto.unauthorized); - }); - it('should only work for admins', async () => { const { status, body } = await request(app) .get('/server/statistics') @@ -211,12 +195,6 @@ describe('/server', () => { }); describe('GET /server/license', () => { - it('should require authentication', async () => { - const { status, body } = await request(app).get('/server/license'); - expect(status).toBe(401); - expect(body).toEqual(errorDto.unauthorized); - }); - it('should only work for admins', async () => { const { status, body } = await request(app) .get('/server/license') @@ -239,12 +217,6 @@ describe('/server', () => { }); describe('DELETE /server/license', () => { - it('should require authentication', async () => { - const { status, body } = await request(app).delete('/server/license'); - expect(status).toBe(401); - expect(body).toEqual(errorDto.unauthorized); - }); - it('should only work for admins', async () => { const { status, body } = await request(app) .delete('/server/license') @@ -264,12 +236,6 @@ describe('/server', () => { }); describe('PUT /server/license', () => { - it('should require authentication', async () => { - const { status, body } = await request(app).put('/server/license'); - expect(status).toBe(401); - expect(body).toEqual(errorDto.unauthorized); - }); - it('should only work for admins', async () => { const { status, body } = await request(app) .put('/server/license') diff --git a/e2e/src/specs/server/api/session.e2e-spec.ts b/e2e/src/specs/server/api/session.e2e-spec.ts index 0b632f78ba..1766b732cd 100644 --- a/e2e/src/specs/server/api/session.e2e-spec.ts +++ b/e2e/src/specs/server/api/session.e2e-spec.ts @@ -15,12 +15,6 @@ describe('/sessions', () => { }); describe('GET /sessions', () => { - it('should require authentication', async () => { - const { status, body } = await request(app).get('/sessions'); - expect(status).toBe(401); - expect(body).toEqual(errorDto.unauthorized); - }); - it('should get a list of authorized devices', async () => { const { status, body } = await request(app).get('/sessions').set('Authorization', `Bearer ${admin.accessToken}`); expect(status).toBe(200); @@ -29,12 +23,6 @@ describe('/sessions', () => { }); describe('DELETE /sessions', () => { - it('should require authentication', async () => { - const { status, body } = await request(app).delete(`/sessions`); - expect(status).toBe(401); - expect(body).toEqual(errorDto.unauthorized); - }); - it('should logout all devices (except the current one)', async () => { for (let i = 0; i < 5; i++) { await login({ loginCredentialDto: loginDto.admin }); diff --git a/e2e/src/specs/server/api/shared-link.e2e-spec.ts b/e2e/src/specs/server/api/shared-link.e2e-spec.ts index 8cdf2dc03c..af189f49ac 100644 --- a/e2e/src/specs/server/api/shared-link.e2e-spec.ts +++ b/e2e/src/specs/server/api/shared-link.e2e-spec.ts @@ -137,13 +137,6 @@ describe('/shared-links', () => { }); describe('GET /shared-links', () => { - it('should require authentication', async () => { - const { status, body } = await request(app).get('/shared-links'); - - expect(status).toBe(401); - expect(body).toEqual(errorDto.unauthorized); - }); - it('should get all shared links created by user', async () => { const { status, body } = await request(app) .get('/shared-links') @@ -200,12 +193,6 @@ describe('/shared-links', () => { }); describe('GET /shared-links/me', () => { - it('should not require admin authentication', async () => { - const { status } = await request(app).get('/shared-links/me').set('Authorization', `Bearer ${admin.accessToken}`); - - expect(status).toBe(403); - }); - it('should get data for correct shared link', async () => { const { status, body } = await request(app).get('/shared-links/me').query({ key: linkWithAlbum.key }); @@ -293,13 +280,6 @@ describe('/shared-links', () => { }); describe('GET /shared-links/:id', () => { - it('should require authentication', async () => { - const { status, body } = await request(app).get(`/shared-links/${linkWithAlbum.id}`); - - expect(status).toBe(401); - expect(body).toEqual(errorDto.unauthorized); - }); - it('should get shared link by id', async () => { const { status, body } = await request(app) .get(`/shared-links/${linkWithAlbum.id}`) @@ -326,26 +306,6 @@ describe('/shared-links', () => { }); describe('POST /shared-links', () => { - it('should require authentication', async () => { - const { status, body } = await request(app) - .post('/shared-links') - .send({ type: SharedLinkType.Album, albumId: uuidDto.notFound }); - - expect(status).toBe(401); - expect(body).toEqual(errorDto.unauthorized); - }); - - it('should require a type and the correspondent asset/album id', async () => { - const { status, body } = await request(app) - .post('/shared-links') - .set('Authorization', `Bearer ${user1.accessToken}`); - - expect(status).toBe(400); - expect(body).toEqual( - errorDto.validationError([{ path: [], message: 'Invalid input: expected object, received undefined' }]), - ); - }); - it('should require an asset/album id', async () => { const { status, body } = await request(app) .post('/shared-links') @@ -353,17 +313,17 @@ describe('/shared-links', () => { .send({ type: SharedLinkType.Album }); expect(status).toBe(400); - expect(body).toEqual(expect.objectContaining({ message: 'Invalid albumId' })); + expect(body).toEqual(errorDto.validationError([{ path: [], message: 'albumId is required for type ALBUM' }])); }); it('should require a valid asset id', async () => { const { status, body } = await request(app) .post('/shared-links') .set('Authorization', `Bearer ${user1.accessToken}`) - .send({ type: SharedLinkType.Individual, assetId: uuidDto.notFound }); + .send({ type: SharedLinkType.Individual, assetIds: [uuidDto.notFound] }); expect(status).toBe(400); - expect(body).toEqual(expect.objectContaining({ message: 'Invalid assetIds' })); + expect(body).toEqual(expect.objectContaining({ message: 'Not found or no asset.share access' })); }); it('should create a shared link', async () => { @@ -383,15 +343,6 @@ describe('/shared-links', () => { }); describe('PATCH /shared-links/:id', () => { - it('should require authentication', async () => { - const { status, body } = await request(app) - .patch(`/shared-links/${linkWithAlbum.id}`) - .send({ description: 'foo' }); - - expect(status).toBe(401); - expect(body).toEqual(errorDto.unauthorized); - }); - it('should fail if invalid link', async () => { const { status, body } = await request(app) .patch(`/shared-links/${uuidDto.notFound}`) @@ -474,13 +425,6 @@ describe('/shared-links', () => { }); describe('DELETE /shared-links/:id', () => { - it('should require authentication', async () => { - const { status, body } = await request(app).delete(`/shared-links/${linkWithAlbum.id}`); - - expect(status).toBe(401); - expect(body).toEqual(errorDto.unauthorized); - }); - it('should fail if invalid link', async () => { const { status, body } = await request(app) .delete(`/shared-links/${uuidDto.notFound}`) diff --git a/e2e/src/specs/server/api/stack.e2e-spec.ts b/e2e/src/specs/server/api/stack.e2e-spec.ts index 76bf514dc8..3b8f642334 100644 --- a/e2e/src/specs/server/api/stack.e2e-spec.ts +++ b/e2e/src/specs/server/api/stack.e2e-spec.ts @@ -1,5 +1,5 @@ import { AssetMediaResponseDto, LoginResponseDto, searchStacks } from '@immich/sdk'; -import { createUserDto, uuidDto } from 'src/fixtures'; +import { createUserDto } from 'src/fixtures'; import { errorDto } from 'src/responses'; import { app, asBearerAuth, utils } from 'src/utils'; import request from 'supertest'; @@ -25,42 +25,6 @@ describe('/stacks', () => { }); describe('POST /stacks', () => { - it('should require authentication', async () => { - const { status, body } = await request(app) - .post('/stacks') - .send({ assetIds: [asset.id] }); - - expect(status).toBe(401); - expect(body).toEqual(errorDto.unauthorized); - }); - - it('should require at least two assets', async () => { - const { status, body } = await request(app) - .post('/stacks') - .set('Authorization', `Bearer ${user1.accessToken}`) - .send({ assetIds: [asset.id] }); - - expect(status).toBe(400); - expect(body).toEqual( - errorDto.validationError([{ path: ['assetIds'], message: 'Too small: expected array to have >=2 items' }]), - ); - }); - - it('should require a valid id', async () => { - const { status, body } = await request(app) - .post('/stacks') - .set('Authorization', `Bearer ${user1.accessToken}`) - .send({ assetIds: [uuidDto.invalid, uuidDto.invalid] }); - - expect(status).toBe(400); - expect(body).toEqual( - errorDto.validationError([ - { path: ['assetIds', 0], message: 'Invalid UUID' }, - { path: ['assetIds', 1], message: 'Invalid UUID' }, - ]), - ); - }); - it('should require access', async () => { const user2Asset = await utils.createAsset(user2.accessToken); const { status, body } = await request(app) diff --git a/e2e/src/specs/server/api/system-metadata.e2e-spec.ts b/e2e/src/specs/server/api/system-metadata.e2e-spec.ts index bd17bf2524..114ed2f995 100644 --- a/e2e/src/specs/server/api/system-metadata.e2e-spec.ts +++ b/e2e/src/specs/server/api/system-metadata.e2e-spec.ts @@ -16,12 +16,6 @@ describe('/server-info', () => { }); describe('POST /system-metadata/admin-onboarding', () => { - it('should require authentication', async () => { - const { status, body } = await request(app).post('/system-metadata/admin-onboarding').send({ isOnboarded: true }); - expect(status).toBe(401); - expect(body).toEqual(errorDto.unauthorized); - }); - it('should only work for admins', async () => { const { status, body } = await request(app) .post('/system-metadata/admin-onboarding') @@ -47,12 +41,6 @@ describe('/server-info', () => { }); describe('GET /system-metadata/reverse-geocoding-state', () => { - it('should require authentication', async () => { - const { status, body } = await request(app).get('/system-metadata/reverse-geocoding-state'); - expect(status).toBe(401); - expect(body).toEqual(errorDto.unauthorized); - }); - it('should only work for admins', async () => { const { status, body } = await request(app) .get('/system-metadata/reverse-geocoding-state') diff --git a/e2e/src/specs/server/api/tag.e2e-spec.ts b/e2e/src/specs/server/api/tag.e2e-spec.ts index d303a1e98d..98d66f6350 100644 --- a/e2e/src/specs/server/api/tag.e2e-spec.ts +++ b/e2e/src/specs/server/api/tag.e2e-spec.ts @@ -41,12 +41,6 @@ describe('/tags', () => { }); describe('POST /tags', () => { - it('should require authentication', async () => { - const { status, body } = await request(app).post('/tags').send({ name: 'TagA' }); - expect(status).toBe(401); - expect(body).toEqual(errorDto.unauthorized); - }); - it('should require authorization (api key)', async () => { const { secret } = await utils.createApiKey(user.accessToken, [Permission.AssetRead]); const { status, body } = await request(app).post('/tags').set('x-api-key', secret).send({ name: 'TagA' }); @@ -117,12 +111,6 @@ describe('/tags', () => { }); describe('GET /tags', () => { - it('should require authentication', async () => { - const { status, body } = await request(app).get('/tags'); - expect(status).toBe(401); - expect(body).toEqual(errorDto.unauthorized); - }); - it('should require authorization (api key)', async () => { const { secret } = await utils.createApiKey(user.accessToken, [Permission.AssetRead]); const { status, body } = await request(app).get('/tags').set('x-api-key', secret); @@ -169,12 +157,6 @@ describe('/tags', () => { }); describe('PUT /tags', () => { - it('should require authentication', async () => { - const { status, body } = await request(app).put(`/tags`).send({ name: 'TagA/TagB' }); - expect(status).toBe(401); - expect(body).toEqual(errorDto.unauthorized); - }); - it('should require authorization (api key)', async () => { const { secret } = await utils.createApiKey(user.accessToken, [Permission.AssetRead]); const { status, body } = await request(app).put('/tags').set('x-api-key', secret).send({ name: 'TagA' }); @@ -213,12 +195,6 @@ describe('/tags', () => { }); describe('PUT /tags/assets', () => { - it('should require authentication', async () => { - const { status, body } = await request(app).put(`/tags/assets`).send({ tagIds: [], assetIds: [] }); - expect(status).toBe(401); - expect(body).toEqual(errorDto.unauthorized); - }); - it('should require authorization (api key)', async () => { const { secret } = await utils.createApiKey(user.accessToken, [Permission.AssetRead]); const { status, body } = await request(app) @@ -279,12 +255,6 @@ describe('/tags', () => { }); describe('GET /tags/:id', () => { - it('should require authentication', async () => { - const { status, body } = await request(app).get(`/tags/${uuidDto.notFound}`); - expect(status).toBe(401); - expect(body).toEqual(errorDto.unauthorized); - }); - it('should require authorization', async () => { const tag = await create(user.accessToken, { name: 'TagA' }); const { status, body } = await request(app) @@ -304,14 +274,6 @@ describe('/tags', () => { expect(body).toEqual(errorDto.missingPermission('tag.read')); }); - it('should require a valid uuid', async () => { - const { status, body } = await request(app) - .get(`/tags/${uuidDto.invalid}`) - .set('Authorization', `Bearer ${admin.accessToken}`); - expect(status).toBe(400); - expect(body).toEqual(errorDto.validationError([{ path: ['id'], message: 'Invalid UUID' }])); - }); - it('should get tag details', async () => { const tag = await create(user.accessToken, { name: 'TagA' }); const { status, body } = await request(app) @@ -349,13 +311,6 @@ describe('/tags', () => { }); describe('PUT /tags/:id', () => { - it('should require authentication', async () => { - const tag = await create(user.accessToken, { name: 'TagA' }); - const { status, body } = await request(app).put(`/tags/${tag.id}`).send({ color: '#000000' }); - expect(status).toBe(401); - expect(body).toEqual(errorDto.unauthorized); - }); - it('should require authorization', async () => { const tag = await create(admin.accessToken, { name: 'tagA' }); const { status, body } = await request(app) @@ -399,12 +354,6 @@ describe('/tags', () => { }); describe('DELETE /tags/:id', () => { - it('should require authentication', async () => { - const { status, body } = await request(app).delete(`/tags/${uuidDto.notFound}`); - expect(status).toBe(401); - expect(body).toEqual(errorDto.unauthorized); - }); - it('should require authorization', async () => { const tag = await create(user.accessToken, { name: 'TagA' }); const { status, body } = await request(app) @@ -422,14 +371,6 @@ describe('/tags', () => { expect(body).toEqual(errorDto.missingPermission('tag.delete')); }); - it('should require a valid uuid', async () => { - const { status, body } = await request(app) - .delete(`/tags/${uuidDto.invalid}`) - .set('Authorization', `Bearer ${admin.accessToken}`); - expect(status).toBe(400); - expect(body).toEqual(errorDto.validationError([{ path: ['id'], message: 'Invalid UUID' }])); - }); - it('should delete a tag', async () => { const tag = await create(user.accessToken, { name: 'TagA' }); const { status } = await request(app) @@ -463,15 +404,6 @@ describe('/tags', () => { }); describe('PUT /tags/:id/assets', () => { - it('should require authentication', async () => { - const tagA = await create(user.accessToken, { name: 'TagA' }); - const { status, body } = await request(app) - .put(`/tags/${tagA.id}/assets`) - .send({ ids: [userAsset.id] }); - expect(status).toBe(401); - expect(body).toEqual(errorDto.unauthorized); - }); - it('should require authorization', async () => { const tag = await create(user.accessToken, { name: 'TagA' }); const { status, body } = await request(app) @@ -531,16 +463,6 @@ describe('/tags', () => { }); describe('DELETE /tags/:id/assets', () => { - it('should require authentication', async () => { - const tagA = await create(admin.accessToken, { name: 'TagA' }); - const { status, body } = await request(app) - .delete(`/tags/${tagA}/assets`) - .send({ ids: [userAsset.id] }); - - expect(status).toBe(401); - expect(body).toEqual(errorDto.unauthorized); - }); - it('should require authorization', async () => { const tagA = await create(user.accessToken, { name: 'TagA' }); await tagAssets( diff --git a/e2e/src/specs/server/api/user-admin.e2e-spec.ts b/e2e/src/specs/server/api/user-admin.e2e-spec.ts index df6fea84bc..160c929591 100644 --- a/e2e/src/specs/server/api/user-admin.e2e-spec.ts +++ b/e2e/src/specs/server/api/user-admin.e2e-spec.ts @@ -1,5 +1,6 @@ import { LoginResponseDto, + Permission, QueueName, createStack, deleteUserAdmin, @@ -45,12 +46,6 @@ describe('/admin/users', () => { }); describe('GET /admin/users', () => { - it('should require authentication', async () => { - const { status, body } = await request(app).get(`/admin/users`); - expect(status).toBe(401); - expect(body).toEqual(errorDto.unauthorized); - }); - it('should require authorization', async () => { const { status, body } = await request(app) .get(`/admin/users`) @@ -93,12 +88,6 @@ describe('/admin/users', () => { }); describe('POST /admin/users', () => { - it('should require authentication', async () => { - const { status, body } = await request(app).post(`/admin/users`).send(createUserDto.user1); - expect(status).toBe(401); - expect(body).toEqual(errorDto.unauthorized); - }); - it('should require authorization', async () => { const { status, body } = await request(app) .post(`/admin/users`) @@ -108,23 +97,6 @@ describe('/admin/users', () => { expect(body).toEqual(errorDto.forbidden); }); - for (const [key, message] of [ - ['password', 'Invalid input: expected string, received null'], - ['email', 'Invalid input: expected email, received object'], - ['name', 'Invalid input: expected string, received null'], - ['shouldChangePassword', 'Invalid input: expected boolean, received null'], - ['notify', 'Invalid input: expected boolean, received null'], - ] as const) { - it(`should not allow null ${key}`, async () => { - const { status, body } = await request(app) - .post(`/admin/users`) - .set('Authorization', `Bearer ${admin.accessToken}`) - .send({ ...createUserDto.user1, [key]: null }); - expect(status).toBe(400); - expect(body).toEqual(errorDto.validationError([{ path: [key], message }])); - }); - } - it('should accept `isAdmin`', async () => { const { status, body } = await request(app) .post(`/admin/users`) @@ -145,12 +117,6 @@ describe('/admin/users', () => { }); describe('PUT /admin/users/:id', () => { - it('should require authentication', async () => { - const { status, body } = await request(app).put(`/admin/users/${uuidDto.notFound}`); - expect(status).toBe(401); - expect(body).toEqual(errorDto.unauthorized); - }); - it('should require authorization', async () => { const { status, body } = await request(app) .put(`/admin/users/${uuidDto.notFound}`) @@ -159,22 +125,6 @@ describe('/admin/users', () => { expect(body).toEqual(errorDto.forbidden); }); - for (const [key, message] of [ - ['password', 'Invalid input: expected string, received null'], - ['email', 'Invalid input: expected email, received object'], - ['name', 'Invalid input: expected string, received null'], - ['shouldChangePassword', 'Invalid input: expected boolean, received null'], - ] as const) { - it(`should not allow null ${key}`, async () => { - const { status, body } = await request(app) - .put(`/admin/users/${uuidDto.notFound}`) - .set('Authorization', `Bearer ${admin.accessToken}`) - .send({ [key]: null }); - expect(status).toBe(400); - expect(body).toEqual(errorDto.validationError([{ path: [key], message }])); - }); - } - it('should allow a non-admin to become an admin', async () => { const user = await utils.userSetup(admin.accessToken, createUserDto.create('admin2')); const { status, body } = await request(app) @@ -244,12 +194,6 @@ describe('/admin/users', () => { }); describe('PUT /admin/users/:id/preferences', () => { - it('should require authentication', async () => { - const { status, body } = await request(app).put(`/admin/users/${userToDelete.userId}/preferences`); - expect(status).toBe(401); - expect(body).toEqual(errorDto.unauthorized); - }); - it('should update memories enabled', async () => { const before = await getUserPreferencesAdmin({ id: admin.userId }, { headers: asBearerAuth(admin.accessToken) }); expect(before).toMatchObject({ memories: { enabled: true } }); @@ -281,12 +225,6 @@ describe('/admin/users', () => { }); describe('DELETE /admin/users/:id', () => { - it('should require authentication', async () => { - const { status, body } = await request(app).delete(`/admin/users/${userToDelete.userId}`); - expect(status).toBe(401); - expect(body).toEqual(errorDto.unauthorized); - }); - it('should require authorization', async () => { const { status, body } = await request(app) .delete(`/admin/users/${userToDelete.userId}`) @@ -358,13 +296,26 @@ describe('/admin/users', () => { }); }); - describe('POST /admin/users/:id/restore', () => { - it('should require authentication', async () => { - const { status, body } = await request(app).post(`/admin/users/${userToDelete.userId}/restore`); - expect(status).toBe(401); - expect(body).toEqual(errorDto.unauthorized); + describe('GET /admin/users/:id/calendar-heatmap', () => { + it('should require admin permissions', async () => { + const { status, body } = await request(app) + .get(`/admin/users/${nonAdmin.userId}/calendar-heatmap`) + .set('Authorization', `Bearer ${nonAdmin.accessToken}`); + expect(status).toBe(403); + expect(body).toEqual(errorDto.forbidden); }); + it('should require the AdminUserRead permission', async () => { + const { secret } = await utils.createApiKey(admin.accessToken, [Permission.UserRead]); + const { status, body } = await request(app) + .get(`/admin/users/${nonAdmin.userId}/calendar-heatmap`) + .set('x-api-key', secret); + expect(status).toBe(403); + expect(body).toEqual(errorDto.forbidden); + }); + }); + + describe('POST /admin/users/:id/restore', () => { it('should require authorization', async () => { const { status, body } = await request(app) .post(`/admin/users/${userToDelete.userId}/restore`) diff --git a/e2e/src/specs/server/api/user.e2e-spec.ts b/e2e/src/specs/server/api/user.e2e-spec.ts index 2dc789a91b..0e62672f36 100644 --- a/e2e/src/specs/server/api/user.e2e-spec.ts +++ b/e2e/src/specs/server/api/user.e2e-spec.ts @@ -1,34 +1,18 @@ -import { LoginResponseDto, SharedLinkType, deleteUserAdmin, getMyPreferences, getMyUser, login } from '@immich/sdk'; +import { LoginResponseDto, SharedLinkType, getMyUser, login } from '@immich/sdk'; import { createUserDto } from 'src/fixtures'; import { errorDto } from 'src/responses'; import { app, asBearerAuth, utils } from 'src/utils'; import request from 'supertest'; import { beforeAll, describe, expect, it } from 'vitest'; -const userLicense = { - licenseKey: 'IMCL-FF69-TUK1-RWZU-V9Q8-QGQS-S5GC-X4R2-UFK4', - activationKey: - 'KuX8KsktrBSiXpQMAH0zLgA5SpijXVr_PDkzLdWUlAogCTMBZ0I3KCHXK0eE9EEd7harxup8_EHMeqAWeHo5VQzol6LGECpFv585U9asXD4Zc-UXt3mhJr2uhazqipBIBwJA2YhmUCDy8hiyiGsukDQNu9Rg9C77UeoKuZBWVjWUBWG0mc1iRqfvF0faVM20w53czAzlhaMxzVGc3Oimbd7xi_CAMSujF_2y8QpA3X2fOVkQkzdcH9lV0COejl7IyH27zQQ9HrlrXv3Lai5Hw67kNkaSjmunVBxC5PS0TpKoc9SfBJMaAGWnaDbjhjYUrm-8nIDQnoeEAidDXVAdPw', -}; - describe('/users', () => { let admin: LoginResponseDto; - let deletedUser: LoginResponseDto; let nonAdmin: LoginResponseDto; beforeAll(async () => { await utils.resetDatabase(); admin = await utils.adminSetup({ onboarding: false }); - - [deletedUser, nonAdmin] = await Promise.all([ - utils.userSetup(admin.accessToken, createUserDto.user1), - utils.userSetup(admin.accessToken, createUserDto.user2), - ]); - - await deleteUserAdmin( - { id: deletedUser.userId, userAdminDeleteDto: {} }, - { headers: asBearerAuth(admin.accessToken) }, - ); + nonAdmin = await utils.userSetup(admin.accessToken, createUserDto.user2); }); describe('GET /users/me', () => { @@ -42,55 +26,9 @@ describe('/users', () => { expect(status).toBe(403); expect(body).toEqual(errorDto.forbidden); }); - - it('should get my user', async () => { - const { status, body } = await request(app).get(`/users/me`).set('Authorization', `Bearer ${admin.accessToken}`); - expect(status).toBe(200); - expect(body).toMatchObject({ - id: admin.userId, - email: 'admin@immich.cloud', - quotaUsageInBytes: 0, - }); - }); - - it('should get my user with license info', async () => { - const { status: licenseStatus } = await request(app) - .put(`/users/me/license`) - .send(userLicense) - .set('Authorization', `Bearer ${nonAdmin.accessToken}`); - expect(licenseStatus).toBe(200); - const { status, body } = await request(app) - .get(`/users/me`) - .set('Authorization', `Bearer ${nonAdmin.accessToken}`); - expect(status).toBe(200); - expect(body).toMatchObject({ - id: nonAdmin.userId, - email: nonAdmin.userEmail, - quotaUsageInBytes: 0, - license: userLicense, - }); - }); }); describe('PUT /users/me', () => { - it('should update first and last name', async () => { - const before = await getMyUser({ headers: asBearerAuth(admin.accessToken) }); - - const { status, body } = await request(app) - .put(`/users/me`) - .send({ name: 'Name' }) - .set('Authorization', `Bearer ${admin.accessToken}`); - - expect(status).toBe(200); - expect(body).toEqual({ - ...before, - updatedAt: expect.any(String), - profileChangedAt: expect.any(String), - createdAt: expect.any(String), - name: 'Name', - }); - }); - /** @deprecated */ it('should allow a user to change their password (deprecated)', async () => { const user = await getMyUser({ headers: asBearerAuth(nonAdmin.accessToken) }); @@ -112,222 +50,5 @@ describe('/users', () => { expect(token.accessToken).toBeDefined(); }); - - it('should not allow user to change to a taken email', async () => { - const { status, body } = await request(app) - .put(`/users/me`) - .send({ email: 'admin@immich.cloud' }) - .set('Authorization', `Bearer ${nonAdmin.accessToken}`); - - expect(status).toBe(400); - expect(body).toMatchObject(errorDto.badRequest('Email is not available')); - }); - - it('should update my email', async () => { - const before = await getMyUser({ headers: asBearerAuth(nonAdmin.accessToken) }); - const { status, body } = await request(app) - .put(`/users/me`) - .send({ email: 'non-admin@immich.cloud' }) - .set('Authorization', `Bearer ${nonAdmin.accessToken}`); - - expect(status).toBe(200); - expect(body).toMatchObject({ - ...before, - email: 'non-admin@immich.cloud', - updatedAt: expect.anything(), - createdAt: expect.anything(), - profileChangedAt: expect.anything(), - }); - }); - - it('should update avatar color', async () => { - const { status, body } = await request(app) - .put(`/users/me`) - .send({ avatarColor: 'blue' }) - .set('Authorization', `Bearer ${admin.accessToken}`); - - expect(status).toBe(200); - expect(body).toMatchObject({ avatarColor: 'blue' }); - - const after = await getMyUser({ headers: asBearerAuth(admin.accessToken) }); - expect(after).toMatchObject({ avatarColor: 'blue' }); - }); - }); - - describe('PUT /users/me/preferences', () => { - it('should update memories enabled', async () => { - const before = await getMyPreferences({ headers: asBearerAuth(admin.accessToken) }); - expect(before).toMatchObject({ memories: { enabled: true } }); - - const { status, body } = await request(app) - .put(`/users/me/preferences`) - .send({ memories: { enabled: false } }) - .set('Authorization', `Bearer ${admin.accessToken}`); - - expect(status).toBe(200); - expect(body).toMatchObject({ memories: { enabled: false } }); - - const after = await getMyPreferences({ headers: asBearerAuth(admin.accessToken) }); - expect(after).toMatchObject({ memories: { enabled: false } }); - }); - - it('should require an integer for download archive size', async () => { - const { status, body } = await request(app) - .put(`/users/me/preferences`) - .send({ download: { archiveSize: 1_234_567.89 } }) - .set('Authorization', `Bearer ${admin.accessToken}`); - - expect(status).toBe(400); - expect(body).toEqual( - errorDto.validationError([ - { path: ['download', 'archiveSize'], message: 'Invalid input: expected int, received number' }, - ]), - ); - }); - - it('should update download archive size', async () => { - const before = await getMyPreferences({ headers: asBearerAuth(admin.accessToken) }); - expect(before).toMatchObject({ download: { archiveSize: 4 * 2 ** 30 } }); - - const { status, body } = await request(app) - .put(`/users/me/preferences`) - .send({ download: { archiveSize: 1_234_567 } }) - .set('Authorization', `Bearer ${admin.accessToken}`); - - expect(status).toBe(200); - expect(body).toMatchObject({ download: { archiveSize: 1_234_567 } }); - - const after = await getMyPreferences({ headers: asBearerAuth(admin.accessToken) }); - expect(after).toMatchObject({ download: { archiveSize: 1_234_567 } }); - }); - - it('should require a boolean for download include embedded videos', async () => { - const { status, body } = await request(app) - .put(`/users/me/preferences`) - .send({ download: { includeEmbeddedVideos: 1_234_567.89 } }) - .set('Authorization', `Bearer ${admin.accessToken}`); - - expect(status).toBe(400); - expect(body).toEqual( - errorDto.validationError([ - { path: ['download', 'includeEmbeddedVideos'], message: 'Invalid input: expected boolean, received number' }, - ]), - ); - }); - - it('should update download include embedded videos', async () => { - const before = await getMyPreferences({ headers: asBearerAuth(admin.accessToken) }); - expect(before).toMatchObject({ download: { includeEmbeddedVideos: false } }); - - const { status, body } = await request(app) - .put(`/users/me/preferences`) - .send({ download: { includeEmbeddedVideos: true } }) - .set('Authorization', `Bearer ${admin.accessToken}`); - - expect(status).toBe(200); - expect(body).toMatchObject({ download: { includeEmbeddedVideos: true } }); - - const after = await getMyPreferences({ headers: asBearerAuth(admin.accessToken) }); - expect(after).toMatchObject({ download: { includeEmbeddedVideos: true } }); - }); - - it('should update minimum face count to display people', async () => { - const before = await getMyPreferences({ headers: asBearerAuth(admin.accessToken) }); - expect(before).toMatchObject({ people: { minimumFaces: 3 } }); - - const { status, body } = await request(app) - .put('/users/me/preferences') - .send({ people: { minimumFaces: 2 } }) - .set('Authorization', `Bearer ${admin.accessToken}`); - expect(status).toBe(200); - expect(body).toMatchObject({ people: { minimumFaces: 2 } }); - - const after = await getMyPreferences({ headers: asBearerAuth(admin.accessToken) }); - expect(after).toMatchObject({ people: { minimumFaces: 2 } }); - }); - }); - - describe('GET /users/:id', () => { - it('should get the user', async () => { - const { status, body } = await request(app) - .get(`/users/${admin.userId}`) - .set('Authorization', `Bearer ${admin.accessToken}`); - expect(status).toBe(200); - expect(body).toMatchObject({ - id: admin.userId, - email: 'admin@immich.cloud', - }); - - expect(body).not.toMatchObject({ - shouldChangePassword: expect.anything(), - storageLabel: expect.anything(), - }); - }); - }); - - describe('GET /server/license', () => { - it('should return the user license', async () => { - await request(app) - .put('/users/me/license') - .set('Authorization', `Bearer ${nonAdmin.accessToken}`) - .send(userLicense); - const { status, body } = await request(app) - .get('/users/me/license') - .set('Authorization', `Bearer ${nonAdmin.accessToken}`); - expect(status).toBe(200); - expect(body).toEqual({ - ...userLicense, - activatedAt: expect.any(String), - }); - }); - }); - - describe('PUT /users/me/license', () => { - it('should set the user license', async () => { - const { status, body } = await request(app) - .put(`/users/me/license`) - .send(userLicense) - .set('Authorization', `Bearer ${nonAdmin.accessToken}`); - expect(status).toBe(200); - expect(body).toMatchObject({ ...userLicense, activatedAt: expect.any(String) }); - expect(status).toBe(200); - expect(body).toEqual({ ...userLicense, activatedAt: expect.any(String) }); - const { body: licenseBody } = await request(app) - .get('/users/me/license') - .set('Authorization', `Bearer ${nonAdmin.accessToken}`); - expect(licenseBody).toEqual({ ...userLicense, activatedAt: expect.any(String) }); - }); - - it('should reject license not starting with IMCL-', async () => { - const { status, body } = await request(app) - .put('/users/me/license') - .set('Authorization', `Bearer ${nonAdmin.accessToken}`) - .send({ licenseKey: 'IMSV-ABCD-ABCD-ABCD-ABCD-ABCD-ABCD-ABCD-ABCD', activationKey: 'activationKey' }); - expect(status).toBe(400); - expect(body.message).toBe('Invalid license key'); - }); - - it('should reject license with invalid activation key', async () => { - const { status, body } = await request(app) - .put('/users/me/license') - .set('Authorization', `Bearer ${nonAdmin.accessToken}`) - .send({ licenseKey: userLicense.licenseKey, activationKey: `invalid${userLicense.activationKey}` }); - expect(status).toBe(400); - expect(body.message).toBe('Invalid license key'); - }); - }); - - describe('DELETE /users/me/license', () => { - it('should require authentication', async () => { - const { status } = await request(app).put(`/users/me/license`); - expect(status).toEqual(401); - }); - - it('should delete the user license', async () => { - const { status } = await request(app) - .delete(`/users/me/license`) - .set('Authorization', `Bearer ${nonAdmin.accessToken}`); - expect(status).toBe(204); - }); }); }); diff --git a/e2e/src/specs/server/cli/login.e2e-spec.ts b/e2e/src/specs/server/cli/login.e2e-spec.ts index 3bc3ebc9c2..caf5550b6e 100644 --- a/e2e/src/specs/server/cli/login.e2e-spec.ts +++ b/e2e/src/specs/server/cli/login.e2e-spec.ts @@ -31,7 +31,7 @@ describe(`immich login`, () => { it('should login and save auth.yml with 600', async () => { const admin = await utils.adminSetup(); const key = await utils.createApiKey(admin.accessToken, [Permission.All]); - const { stdout, stderr, exitCode } = await immichCli(['login', app, `${key.secret}`]); + const { stdout, stderr, exitCode } = await immichCli(['login', app, key.secret]); expect(stdout.split('\n')).toEqual([ 'Logging in to http://127.0.0.1:2285/api', 'Logged in as admin@immich.cloud', @@ -48,7 +48,7 @@ describe(`immich login`, () => { it('should login without /api in the url', async () => { const admin = await utils.adminSetup(); const key = await utils.createApiKey(admin.accessToken, [Permission.All]); - const { stdout, stderr, exitCode } = await immichCli(['login', app.replaceAll('/api', ''), `${key.secret}`]); + const { stdout, stderr, exitCode } = await immichCli(['login', app.replaceAll('/api', ''), key.secret]); expect(stdout.split('\n')).toEqual([ 'Logging in to http://127.0.0.1:2285', 'Discovered API at http://127.0.0.1:2285/api', diff --git a/e2e/src/specs/server/cli/upload.e2e-spec.ts b/e2e/src/specs/server/cli/upload.e2e-spec.ts index b53b4403f8..6ed5030e83 100644 --- a/e2e/src/specs/server/cli/upload.e2e-spec.ts +++ b/e2e/src/specs/server/cli/upload.e2e-spec.ts @@ -119,7 +119,9 @@ describe(`immich upload`, () => { const baseDir = `/tmp/upload/`; const testPaths = Object.keys(files).map((filePath) => `${baseDir}/${filePath}`); - testPaths.map((filePath) => utils.createImageFile(filePath)); + for (const filePath of testPaths) { + utils.createImageFile(filePath); + } const commandLine = paths.map((argument) => `${baseDir}/${argument}`); @@ -135,7 +137,9 @@ describe(`immich upload`, () => { const assets = await getAssetStatistics({}, { headers: asKeyAuth(key) }); expect(assets.total).toBe(expectedCount); - testPaths.map((filePath) => utils.removeImageFile(filePath)); + for (const filePath of testPaths) { + utils.removeImageFile(filePath); + } }); } }); @@ -646,7 +650,7 @@ describe(`immich upload`, () => { ]); expect(stdout).toBe(''); - expect(stderr).toEqual(`error: option '-n, --dry-run' cannot be used with option '-h, --skip-hash'`); + expect(stderr).toEqual(`error: option '-n, --dry-run' cannot be used with option '--skip-hash'`); expect(exitCode).not.toBe(0); const assets = await getAssetStatistics({}, { headers: asKeyAuth(key) }); diff --git a/e2e/src/specs/server/immich-admin/immich-admin.e2e-spec.ts b/e2e/src/specs/server/immich-admin/immich-admin.e2e-spec.ts index 24699cda30..ad0e43ff14 100644 --- a/e2e/src/specs/server/immich-admin/immich-admin.e2e-spec.ts +++ b/e2e/src/specs/server/immich-admin/immich-admin.e2e-spec.ts @@ -65,6 +65,10 @@ describe(`immich-admin`, () => { child.stdout.on('data', (chunk) => { data += chunk; if (data.includes('Please choose a new password (optional)')) { + child.stdin.write('\n'); + } + + if (data.includes('Invalidate existing sessions?')) { child.stdin.end('\n'); } }); diff --git a/e2e/src/ui/generators/timeline/images.ts b/e2e/src/ui/generators/timeline/images.ts index 9330cf137d..2eb141c557 100644 --- a/e2e/src/ui/generators/timeline/images.ts +++ b/e2e/src/ui/generators/timeline/images.ts @@ -21,7 +21,7 @@ export const randomImageFromString = async ( let seedNumber = 0; for (let i = 0; i < seed.length; i++) { seedNumber = (seedNumber << 5) - seedNumber + (seed.codePointAt(i) ?? 0); - seedNumber = seedNumber & seedNumber; // Convert to 32bit integer + seedNumber &= seedNumber; // Convert to 32bit integer } return randomImage(new SeededRandom(Math.abs(seedNumber)), { width, height }); }; diff --git a/e2e/src/ui/generators/timeline/model-objects.ts b/e2e/src/ui/generators/timeline/model-objects.ts index f5654afd5e..094e5133a3 100644 --- a/e2e/src/ui/generators/timeline/model-objects.ts +++ b/e2e/src/ui/generators/timeline/model-objects.ts @@ -64,7 +64,7 @@ export function generateAsset( const asset: MockTimelineAsset = { id: assetId, ownerId, - ratio: Number.parseFloat(ratio.split(':')[0]) / Number.parseFloat(ratio.split(':')[1]), + ratio: Number(ratio.split(':', 1)[0]) / Number(ratio.split(':', 2)[1]), thumbhash: generateThumbhash(rng), localDateTime: date.toISOString(), fileCreatedAt: date.toISOString(), @@ -214,7 +214,7 @@ export function generateTimelineData(config: TimelineConfig): MockTimelineData { } // Create a mock album from random assets - const allAssets = [...buckets.values()].flat(); + const allAssets = buckets.values().toArray().flat(); // Select 10-30 random assets for the album (or all assets if less than 10) const albumSize = Math.min(allAssets.length, globalRng.nextInt(10, 31)); diff --git a/e2e/src/ui/generators/timeline/rest-response.ts b/e2e/src/ui/generators/timeline/rest-response.ts index 553ce18005..d7cf7adf0a 100644 --- a/e2e/src/ui/generators/timeline/rest-response.ts +++ b/e2e/src/ui/generators/timeline/rest-response.ts @@ -172,11 +172,7 @@ function shouldIncludeAsset( if (isArchived !== undefined && actuallyArchived !== isArchived) { return false; } - if (isFavorite !== undefined && actuallyFavorited !== isFavorite) { - return false; - } - - return true; + return isFavorite === undefined || actuallyFavorited === isFavorite; } /** * Get summary for all buckets (mimics getTimeBuckets API) @@ -361,7 +357,7 @@ export function getAsset( owner?: UserResponseDto, ): AssetResponseDto | undefined { // Search through all buckets for the asset - const buckets = [...timelineData.buckets.values()]; + const buckets = timelineData.buckets.values().toArray(); for (const assets of buckets) { const asset = assets.find((a) => a.id === assetId); if (asset) { @@ -395,7 +391,7 @@ export function getAlbum( // Get the actual asset objects from the timeline data const albumAssets: AssetResponseDto[] = []; - const allAssets = [...timelineData.buckets.values()].flat(); + const allAssets = timelineData.buckets.values().toArray().flat(); for (const assetId of album.assetIds) { const assetConfig = allAssets.find((a) => a.id === assetId); diff --git a/e2e/src/ui/generators/timeline/timeline-config.ts b/e2e/src/ui/generators/timeline/timeline-config.ts index 4dea2f4f78..5bfb2c1800 100644 --- a/e2e/src/ui/generators/timeline/timeline-config.ts +++ b/e2e/src/ui/generators/timeline/timeline-config.ts @@ -24,13 +24,6 @@ export const ASPECT_RATIO_WEIGHTS = { '3:1': 0.01, // 1% 3:1 panorama } as const; -export type AspectRatio = { - width: number; - height: number; - ratio: number; - name: string; -}; - // Mock configuration for asset generation - will be transformed to API response formats export type MockTimelineAsset = { id: string; @@ -143,7 +136,7 @@ export function validateTimelineConfig(config: TimelineConfig): void { } // Validate seed if provided - if (config.seed !== undefined && (config.seed < 0 || !Number.isInteger(config.seed))) { + if (config.seed !== undefined && (config.seed < 0 || !Number.isSafeInteger(config.seed))) { throw new Error('Seed must be a non-negative integer'); } diff --git a/e2e/src/ui/generators/timeline/utils.ts b/e2e/src/ui/generators/timeline/utils.ts index 283f56c6f0..fbb9630a3c 100644 --- a/e2e/src/ui/generators/timeline/utils.ts +++ b/e2e/src/ui/generators/timeline/utils.ts @@ -153,11 +153,8 @@ export function getMockAsset( const isInDifferentPeriod = (date1: DateTime, date2: DateTime): boolean => { if (unit === 'day') { return !date1.startOf('day').equals(date2.startOf('day')); - } else if (unit === 'month') { - return date1.year !== date2.year || date1.month !== date2.month; - } else { - return date1.year !== date2.year; } + return unit === 'month' ? date1.year !== date2.year || date1.month !== date2.month : date1.year !== date2.year; }; if (direction === 'next') { diff --git a/e2e/src/ui/mock-network/base-network.ts b/e2e/src/ui/mock-network/base-network.ts index 6680b83dd1..af8d1dbfef 100644 --- a/e2e/src/ui/mock-network/base-network.ts +++ b/e2e/src/ui/mock-network/base-network.ts @@ -82,6 +82,9 @@ export const setupBaseMockApiRoutes = async (context: BrowserContext, adminUserI cast: { gCastEnabled: false, }, + recentlyAdded: { + sidebarWeb: false, + }, }, }); }); diff --git a/e2e/src/ui/mock-network/timeline-network.ts b/e2e/src/ui/mock-network/timeline-network.ts index 6af2ebb7c1..1a745b294a 100644 --- a/e2e/src/ui/mock-network/timeline-network.ts +++ b/e2e/src/ui/mock-network/timeline-network.ts @@ -40,7 +40,8 @@ export const setupTimelineMockApiRoutes = async ( contentType: 'application/json', json: getTimeBuckets(timelineRestData, isTrashed, isArchived, isFavorite, albumId, changes), }); - } else if (pathname === '/api/timeline/bucket') { + } + if (pathname === '/api/timeline/bucket') { const timeBucket = url.searchParams.get('timeBucket'); if (!timeBucket) { return route.continue(); diff --git a/e2e/src/ui/specs/asset-viewer/asset-viewer.e2e-spec.ts b/e2e/src/ui/specs/asset-viewer/asset-viewer.e2e-spec.ts index 082ff1f7a1..85798f6be3 100644 --- a/e2e/src/ui/specs/asset-viewer/asset-viewer.e2e-spec.ts +++ b/e2e/src/ui/specs/asset-viewer/asset-viewer.e2e-spec.ts @@ -38,7 +38,7 @@ test.describe('asset-viewer', () => { assets.push(...timeBucket); } for (const yearMonth of timelineRestData.buckets.keys()) { - const [year, month] = yearMonth.split('-'); + const [year, month] = yearMonth.split('-', 2); yearMonths.push(`${year}-${Number(month)}`); } }); diff --git a/e2e/src/ui/specs/asset-viewer/utils.ts b/e2e/src/ui/specs/asset-viewer/utils.ts index adaace8a34..8cc2ad711a 100644 --- a/e2e/src/ui/specs/asset-viewer/utils.ts +++ b/e2e/src/ui/specs/asset-viewer/utils.ts @@ -110,6 +110,7 @@ export async function enableTagsPreference(context: BrowserContext) { download: { archiveSize: 4_294_967_296, includeEmbeddedVideos: false }, purchase: { showSupportBadge: true, hideBuyButtonUntil: '2100-02-12T00:00:00.000Z' }, cast: { gCastEnabled: false }, + recentlyAdded: { sidebarWeb: false }, }, }); }); diff --git a/e2e/src/ui/specs/memory/utils.ts b/e2e/src/ui/specs/memory/utils.ts index cf99033e7e..378f649cff 100644 --- a/e2e/src/ui/specs/memory/utils.ts +++ b/e2e/src/ui/specs/memory/utils.ts @@ -1,3 +1,4 @@ +/* eslint-disable unicorn/no-this-outside-of-class */ import type { AssetResponseDto } from '@immich/sdk'; import { expect, Page } from '@playwright/test'; diff --git a/e2e/src/ui/specs/timeline/timeline.e2e-spec.ts b/e2e/src/ui/specs/timeline/timeline.e2e-spec.ts index 6f986df84f..adbff0d3b8 100644 --- a/e2e/src/ui/specs/timeline/timeline.e2e-spec.ts +++ b/e2e/src/ui/specs/timeline/timeline.e2e-spec.ts @@ -49,7 +49,7 @@ test.describe('Timeline', () => { assets.push(...timeBucket); } for (const yearMonth of timelineRestData.buckets.keys()) { - const [year, month] = yearMonth.split('-'); + const [year, month] = yearMonth.split('-', 2); yearMonths.push(`${year}-${Number(month)}`); } }); diff --git a/e2e/src/ui/specs/timeline/utils.ts b/e2e/src/ui/specs/timeline/utils.ts index e67229d3c9..986f794fb6 100644 --- a/e2e/src/ui/specs/timeline/utils.ts +++ b/e2e/src/ui/specs/timeline/utils.ts @@ -1,4 +1,4 @@ -import { BrowserContext, expect, Page } from '@playwright/test'; +import { expect, Page } from '@playwright/test'; import { DateTime } from 'luxon'; import { TimelineAssetConfig } from 'src/ui/generators/timeline'; @@ -7,22 +7,10 @@ export const sleep = (ms: number) => { }; export const padYearMonth = (yearMonth: string) => { - const [year, month] = yearMonth.split('-'); + const [year, month] = yearMonth.split('-', 2); return `${year}-${month.padStart(2, '0')}`; }; -export async function throttlePage(context: BrowserContext, page: Page) { - const session = await context.newCDPSession(page); - await session.send('Network.emulateNetworkConditions', { - offline: false, - downloadThroughput: (1.5 * 1024 * 1024) / 8, - uploadThroughput: (750 * 1024) / 8, - latency: 40, - connectionType: 'cellular3g', - }); - await session.send('Emulation.setCPUThrottlingRate', { rate: 10 }); -} - export const poll = async ( page: Page, query: () => Promise, @@ -72,6 +60,7 @@ export const thumbnailUtils = { }, async queryThumbnailInViewport(page: Page, collector: (assetId: string) => boolean) { const assetIds: string[] = []; + // eslint-disable-next-line unicorn/no-this-outside-of-class for (const thumb of await this.locator(page).all()) { const box = await thumb.boundingBox(); if (box) { @@ -151,6 +140,7 @@ export const timelineUtils = { page.evaluate(() => { // eslint-disable-next-line @typescript-eslint/ban-ts-comment // @ts-ignore + return document.querySelector('#asset-grid').scrollTop; }); await expect.poll(queryTop).toBeGreaterThan(0); @@ -177,6 +167,7 @@ export const assetViewerUtils = { page.evaluate(() => { // eslint-disable-next-line @typescript-eslint/ban-ts-comment // @ts-ignore + // eslint-disable-next-line unicorn/no-optional-chaining-on-undeclared-variable return document.activeElement?.dataset?.asset; }); await expect(poll(page, activeElement, (result) => result === assetId)).resolves.toBe(assetId); @@ -220,7 +211,7 @@ export const pageUtils = { await section.locator('.w-8').click(); }, async pauseTestDebug() { - console.log('NOTE: pausing test indefinately for debug'); + console.log('NOTE: pausing test indefinitely for debug'); await new Promise(() => void 0); }, }; diff --git a/e2e/src/utils.ts b/e2e/src/utils.ts index 23b3b14306..3124dd0609 100644 --- a/e2e/src/utils.ts +++ b/e2e/src/utils.ts @@ -1,3 +1,4 @@ +/* eslint-disable unicorn/no-top-level-assignment-in-function */ import { AssetMediaCreateDto, AssetMediaResponseDto, @@ -177,7 +178,7 @@ export const utils = { resetDatabase: async (tables?: string[]) => { client = await utils.connectDatabase(); - tables = tables || [ + tables ||= [ // TODO e2e test for deleting a stack, since it is quite complex 'stack', 'library', @@ -304,7 +305,7 @@ export const utils = { }, adminSetup: async (options?: AdminSetupOptions) => { - options = options || { onboarding: true }; + options ||= { onboarding: true }; await signUpAdmin({ signUpDto: signupDto.admin }); const response = await login({ loginCredentialDto: loginDto.admin }); @@ -545,6 +546,7 @@ export const utils = { { headers: asBearerAuth(accessToken), fetch: (...args: Parameters) => + // eslint-disable-next-line unicorn/no-invalid-argument-count, unicorn/prefer-await fetch(...args).then((response) => { setCookie = response.headers.getSetCookie(); return response; @@ -674,7 +676,7 @@ export const utils = { cliLogin: async (accessToken: string) => { const key = await utils.createApiKey(accessToken, [Permission.All]); - await immichCli(['login', app, `${key.secret}`]); + await immichCli(['login', app, key.secret]); return key.secret; }, @@ -706,6 +708,7 @@ export const utils = { }, }; +// eslint-disable-next-line unicorn/no-top-level-side-effects utils.initSdk(); if (!existsSync(`${testAssetDir}/albums`)) { diff --git a/e2e/tsconfig.json b/e2e/tsconfig.json index 61eefdac07..eebe91e90c 100644 --- a/e2e/tsconfig.json +++ b/e2e/tsconfig.json @@ -10,6 +10,7 @@ "allowSyntheticDefaultImports": true, "resolveJsonModule": true, "target": "es2023", + "lib": ["dom", "ESNext"], "sourceMap": true, "outDir": "./dist", "incremental": true, diff --git a/i18n/af.json b/i18n/af.json index 630405c11a..0f104a0e64 100644 --- a/i18n/af.json +++ b/i18n/af.json @@ -23,6 +23,7 @@ "add_location": "Voeg ligging toe", "add_partner": "Voeg vennoot toe", "add_photos": "Voeg foto’s toe", + "add_step": "Voeg stap by", "add_tag": "Voeg etiket toe", "add_to": "Voeg toe tot…", "add_to_album": "Voeg toe tot album", @@ -49,6 +50,7 @@ "backup_database": "Skep Databasisstortlêer", "backup_database_enable_description": "Aktiveer databasisstortlêers", "backup_keep_last_amount": "Aantal vorige stortlêers om te hou", + "backup_onboarding_1_description": "kopie in die wolk of op 'n ander fisiese plek.", "backup_onboarding_2_description": "plaaslike kopieë op verskillende toestelle. Dit sluit die hooflêers en ’n rugsteun van daardie lêers plaaslik in.", "backup_onboarding_3_description": "totale kopieë van u data, insluitend die oorspronklike lêers. Dit sluit 1 kopie op ’n ander perseel en 2 lokale kopieë in.", "backup_onboarding_description": "’n 3-2-1-rugsteunstrategie word sterk aanbeveel om u data veilig te hou. Hou kopieë van u foto’s/video’s sowel as die Immich-databasis vir ’n volledige rugsteunoplossing.", @@ -71,6 +73,7 @@ "cron_expression_description": "Stel die skanderingsinterval in met die cron-formaat. Kyk gerus na bv. Crontab Guru vir meer inligting", "cron_expression_presets": "Cron-uitdrukking voorafinstellings", "disable_login": "Deaktiveer aantekening", + "download_csv": "Laai CSV af", "duplicate_detection_job_description": "Begin masjienleer op items om soortgelyke beelde op te spoor. Maak staat op Slimsoek", "exclusion_pattern_description": "Met uitsluitingspatrone kan u lêers en vouers ignoreer wanneer u u biblioteek skandeer. Dit is nuttig as u vouers het wat lêers bevat wat u nie wil invoer nie, soos RAW-lêers.", "export_config_as_json_description": "Laai die huidige stelselkonfigurasie af as ’n JSON‑lêer", @@ -84,12 +87,18 @@ "image_format_description": "WebP lewer kleiner lêers as JPEG, maar is stadiger om te enkodeer.", "image_fullsize_description": "Volgrootte prent met geen metadata, gebruik wanner ingezoem", "image_fullsize_enabled": "Aktiveer spek van volgrootte prent", + "image_fullsize_enabled_description": "Genereer 'n volformaat-beeld vir formate wat nie webvriendelik is nie. Wanneer \"Verkies ingebedde voorskou\" geaktiveer is, word ingebedde voorskoue direk gebruik sonder omskakeling. Dit het geen invloed op webvriendelike formate soos JPEG nie.", + "image_fullsize_quality_description": "Beeldgehalte op volle grootte van 1 tot 100. Hoër is beter, maar lewer groter lêers op.", + "image_fullsize_title": "Instellings vir volformaat-beeld", "image_prefer_embedded_preview": "Verkies ingebedde voorskou", + "image_prefer_embedded_preview_setting_description": "Gebruik ingebedde voorskoue in RAW-foto's as invoer vir beeldverwerking wanneer dit beskikbaar is. Dit kan vir sommige beelde akkurater kleure lewer, maar die gehalte van die voorskou hang van die kamera af en die beeld kan meer kompressie-artefakte vertoon.", "image_prefer_wide_gamut": "Verkies breëspektrum", "image_prefer_wide_gamut_setting_description": "Gebruik Display P3 vir duimnaels. Dit behou die lewendheid van beelde met wye kleurruimtes beter, maar beelde kan anders verskyn op ou toestelle met ’n ou blaaierweergawe. sRGB-beelde gebruik steeds sRGB om kleurverskuiwings te voorkom.", "image_preview_description": "Mediumgrootte prent met gestroopte metadata, wat gebruik word wanneer ’n enkele item bekyk word en vir masjienleer", "image_preview_quality_description": "Voorskoukwaliteit van 1-100. Hoër is beter, maar lewer groter lêers en kan die toep vertraag. Die stel van ’n lae waarde kan masjienleerkwaliteit beïnvloed.", "image_preview_title": "Voorskou-instellings", + "image_progressive": "Progresiewe", + "image_progressive_description": "Kodeer JPEG-beelde progressief vir geleidelike laai en vertoning. Dit het geen uitwerking op WebP-beelde nie.", "image_quality": "Kwaliteit", "image_resolution": "Resolusie", "image_resolution_description": "Hoër resolusies kan meer detail bewaar, maar neem langer om te enkodeer, het groter lêergroottes en kan die toep vertraag.", @@ -98,6 +107,22 @@ "image_thumbnail_description": "Klein duimnaels sonder metadata, gebruik om groepe foto’s soos die tydlyn te bekyk", "image_thumbnail_quality_description": "Duinmaelkwaliteit van 1-100. Hoër is beter, maar lewer groter lêers en kan die toep vertraag.", "image_thumbnail_title": "Duimnaelinstellings", + "import_config_from_json_description": "Voer stelselkonfigurasie in deur 'n JSON-konfigurasielêer op te laai", + "integrity_checks_checksum_files": "kontrolesomlêer", + "integrity_checks_checksum_files_description": "Konfigureer die kontrolesom-kontrole", + "integrity_checks_checksum_files_enable_description": "Aktiveer die kontrolesom-kontrolering", + "integrity_checks_checksum_files_percentage_limit": "Persentasie limiet", + "integrity_checks_checksum_files_percentage_limit_description": "Konfigureer die maksimum persentasie tussen 0.01 en 1 vir die mate waarin die kontrolesom-kontrole tydens elke interval uitgevoer moet word.", + "integrity_checks_checksum_files_time_limit": "Tyd limiet", + "integrity_checks_checksum_files_time_limit_description": "Konfigureer die maksimum duur waarvoor die kontrolesom-kontrole tydens elke interval moet loop. (ms)", + "integrity_checks_missing_files": "Ontbrekende lêers", + "integrity_checks_missing_files_description": "Konfigureer die frekwensie en aktiveer of deaktiveer die kontrole vir ontbrekende lêers", + "integrity_checks_missing_files_enable_description": "Aktiveer die kontrole vir ontbrekende lêers", + "integrity_checks_settings": "integriteitskontroles", + "integrity_checks_settings_description": "Bestuur tussenposes vir integriteitskontroles", + "integrity_checks_untracked_files": "Ongevokgde lêers", + "integrity_checks_untracked_files_description": "Konfigureer die frekwensie en aktiveer of deaktiveer die kontrole vir ongevolgde lêers", + "integrity_checks_untracked_files_enable_description": "Aktiveer die kontrole van ongevolgde lêers", "job_concurrency": "{job} gelyktydigheid", "job_created": "Taak geskep", "job_not_concurrency_safe": "Hierdie taak kan nie gelyktydig uitgevoer word nie.", diff --git a/i18n/ar.json b/i18n/ar.json index 8c109835e6..84a0628066 100644 --- a/i18n/ar.json +++ b/i18n/ar.json @@ -108,6 +108,21 @@ "image_thumbnail_quality_description": "تتراوح جودة الصورة المصغرة من 1 إلى 100. كلما كانت الجودة أعلى كان ذلك أفضل، ولكنها تنتج ملفات أكبر وقد تقلل من استجابة التطبيق.", "image_thumbnail_title": "إعدادات الصورة المصغرة", "import_config_from_json_description": "استيراد اعدادات النظام بتحميل ملف اعدادات بصيغة JSON", + "integrity_checks_checksum_files": "ملفات الجمع التحققي", + "integrity_checks_checksum_files_description": "ضبط التحقق من الجمع التحققي", + "integrity_checks_checksum_files_enable_description": "تفعيل التحقق من الجمع التحققي", + "integrity_checks_checksum_files_percentage_limit": "حد النسبه المئويه", + "integrity_checks_checksum_files_percentage_limit_description": "ضبط الحد الاعلى النسبه المئويه بين 0.01 و 1 لتحديد كم يجب ان يعمل التحقق من الجمع التحققي بكل فتره.", + "integrity_checks_checksum_files_time_limit": "الحد الزمني", + "integrity_checks_checksum_files_time_limit_description": "قم بضبط الحد الأقصى للمدة التي يجب أن تستغرقها عملية التحقق من المجموع الاختباري (checksum) في كل فاصل زمني. (بالملي ثانية)", + "integrity_checks_missing_files": "ملفات مفقودة", + "integrity_checks_missing_files_description": "ضبط وتيرة الفحص وتفعيل أو تعطيل فحص الملفات المفقودة", + "integrity_checks_missing_files_enable_description": "تفعيل فحص الملفات المفقودة", + "integrity_checks_settings": "فحوصات السلامه", + "integrity_checks_settings_description": "إدارة فترات التحقق من السلامة", + "integrity_checks_untracked_files": "ملفات غير متعقبه", + "integrity_checks_untracked_files_description": "قم بضبط التردد وتفعيل أو تعطيل فحص الملفات غير المتعقبة", + "integrity_checks_untracked_files_enable_description": "قم بتمكين فحص الملفات غير المتعقبة", "job_concurrency": "تزامن {job}", "job_created": "تم إنشاء الوظيفة", "job_not_concurrency_safe": "هذه الوظيفة غير آمنة للتشغيل المتزامن.", @@ -416,6 +431,10 @@ "transcoding_realtime_description": "يتيح إجراء تحويل الترميز في الوقت الفعلي أثناء بث الفيديو. كما يمكّن من تبديل الجودة، ولكنه قد يتسبب في زيادة زمن تأخير التشغيل وحدوث تقطيع، اعتماداً على قدرات الخادم.", "transcoding_realtime_enabled": "تفعيل تحويل الترميز في الوقت الفعلي", "transcoding_realtime_enabled_description": "في حال تعطيله، سيرفض الخادم بدء جلسات تحويل ترميز جديدة في الوقت الفعلي.", + "transcoding_realtime_resolutions": "دقق", + "transcoding_realtime_resolutions_description": "الدقة المتاحة للتحويل الفوري للترميز. قد تتسبب الدقة الأعلى في مشاكل في التشغيل إذا لم يتمكن الخادم من تحويلها بالسرعة الكافية.", + "transcoding_realtime_video_codecs": "ترميزات الفيديو", + "transcoding_realtime_video_codecs_description": "برامج ترميز الفيديو المقدمة لتحويل الترميز في الوقت الحقيقي. سيختار العملاء الخيار الأفضل الذي يدعمونه أثناء التشغيل. AV1 أكثر كفاءة من HEVC، وهو أكثر كفاءة من H.264. عند استخدام تسريع الأجهزة، حدد فقط برامج الترميز التي يمكن للمسرع تشفيرها. عند استخدام تحويل ترميز البرنامج، لاحظ أن H.264 أسرع من AV1، وهو أسرع من HEVC.", "transcoding_reference_frames": "الإطارات المرجعية", "transcoding_reference_frames_description": "عدد الإطارات التي يجب الرجوع إليها عند ضغط إطار معين. تعمل القيم الأعلى على تحسين كفاءة الضغط، ولكنها تبطئ عملية التشفير. 0 يضبط هذه القيمة تلقائيًا.", "transcoding_required_description": "فقط مقاطع الفيديو ذات التنسيق غير المقبول", @@ -578,6 +597,7 @@ "asset_viewer_settings_title": "عارض الأصول", "assets": "المحتويات", "assets_added_to_album_count": "تمت إضافة {count, plural, one {# الأصل} other {# الأصول}} إلى الألبوم", + "assets_added_to_album_partial_count": "تمت إضافة {successCount} من أصل {totalCount} {totalCount, plural, one {asset} other {assets}} إلى الألبوم", "assets_added_to_albums_count": "تمت اضافة {assetTotal, plural, one {# اصل} other {# اصول}} to {albumTotal, plural, one {# البوم} other {# البومات}}", "assets_cannot_be_added_to_album_count": "{count, plural, one {Asset} other {Assets}} لايمكن اضافته الى الالبوم", "assets_cannot_be_added_to_albums": "{count, plural, one {اصل} other {اصول}} لا يمكن إضافته إلى أي من الألبومات", @@ -733,7 +753,7 @@ "confirm_delete_face": "هل أنت متأكد من حذف وجه {name} من الأصول؟", "confirm_delete_shared_link": "هل أنت متأكد أنك تريد حذف هذا الرابط المشترك؟", "confirm_keep_this_delete_others": "سيتم حذف جميع الأصول الأخرى في المجموعة باستثناء هذا الأصل. هل أنت متأكد من أنك تريد المتابعة؟", - "confirm_new_pin_code": "ثبت رمز PIN الجديد", + "confirm_new_pin_code": "تأكيد رمز PIN الجديد", "confirm_password": "تأكيد كلمة المرور", "confirm_tag_face": "هل تريد وضع علامة على هذا الوجه {name}؟", "confirm_tag_face_unnamed": "هل تريد وضع علامة على هذا الوجه؟", @@ -794,7 +814,6 @@ "custom_date": "تاريخ مخصص", "custom_locale": "لغة مخصصة", "custom_locale_description": "تنسيق التواريخ, الأوقات والأرقام بناءً على اللغة والمنطقة المختاره", - "custom_url": "رابط مخصص", "cutoff_date_description": "احتفظ بالصور من آخر…", "cutoff_day": "{count, plural, one {يوم} other {ايام}}", "cutoff_year": "{count, plural, one {سنة} other {سنوات}}", @@ -1303,9 +1322,9 @@ "login_form_failed_login": "خطأ في تسجيل الدخول ، تحقق من عنوان URL للخادم والبريد الإلكتروني وكلمة المرور", "login_form_handshake_exception": "كان هناك استثناء مصافحة مع الخادم.تمكين دعم الشهادة الموقعة ذاتيا في الإعدادات إذا كنت تستخدم شهادة موقعة ذاتيا.", "login_form_password_hint": "كلمة المرور", - "login_form_server_empty": "أدخل عنوان URL الخادم.", - "login_form_server_error": "لا يمكن الاتصال بالخادم.", - "login_has_been_disabled": "تم تعطيل تسجيل الدخول.", + "login_form_server_empty": "أدخل عنوان URL الخادم", + "login_form_server_error": "تعذر الاتصال بالخادم", + "login_has_been_disabled": "تم تعطيل تسجيل الدخول", "login_password_changed_error": "كان هناك خطأ في تحديث كلمة المرور الخاصة بك", "login_password_changed_success": "تم تحديث كلمة السر بنجاح", "logout_all_device_confirmation": "هل أنت متأكد أنك تريد تسجيل الخروج من جميع الأجهزة؟", @@ -1356,6 +1375,7 @@ "map_location_picker_page_use_location": "استخدم هذا الموقع", "map_location_service_disabled_content": "يجب تمكين خدمة الموقع لعرض الأصول من موقعك الحالي.هل تريد تمكينه الآن؟", "map_location_service_disabled_title": "خدمة الموقع معطل", + "map_marker_for_image": "علامة على الخريطة للصورة الملتقطة في {city}, {country}", "map_marker_with_image": "علامة الخريطة مع الصورة", "map_no_location_permission_content": "هناك حاجة إلى إذن الموقع لعرض الأصول من موقعك الحالي.هل تريد السماح به الآن؟", "map_no_location_permission_title": "تم رفض إذن الموقع", @@ -1460,6 +1480,7 @@ "never": "أبداً", "new_album": "البوم جديد", "new_api_key": "مفتاح API جديد", + "new_feature": "ميزة جديدة", "new_password": "كلمة المرور الجديدة", "new_person": "شخص جديد", "new_pin_code": "رمز PIN الجديد", @@ -1503,9 +1524,13 @@ "not_available": "غير متاح", "not_in_any_album": "ليست في أي ألبوم", "not_selected": "لم يختار", + "not_set": "غير محدد", "notes": "ملاحظات", "nothing_here_yet": "لا يوجد شيء هنا بعد", "notification_backup_reliability": "فعل الإشعارات للزيادة من استقرار النسخ الاحتياطي في الخلفية", + "notification_enabled_list_tile_content": "يستخدم تطبيق Immich الإشعارات لإجراء النسخ الاحتياطي في الخلفية. يمكنك إدارتها من إعدادات جهازك.", + "notification_enabled_list_tile_open_button": "افتح الاعدادات", + "notification_enabled_list_tile_title": "تم تفعيل الاشعارات", "notification_permission_dialog_content": "لتمكين الإخطارات ، انتقل إلى الإعدادات و اختار السماح.", "notification_permission_list_tile_content": "منح إذن لتمكين الإخطارات.", "notification_permission_list_tile_enable_button": "تمكين الإخطارات", @@ -1517,6 +1542,8 @@ "obtainium_configurator": "مُهيئ Obtainium", "obtainium_configurator_instructions": "استخدم Obtainium لتثبيت تطبيق Android وتحديثه مباشرةً من صفحة إصدارات Immich على GitHub. أنشئ مفتاح API واختر الإصدار المناسب لإنشاء رابط تهيئة Obtainium الخاص بك", "ocr": "التعرف البصري على الحروف", + "ocr_body": "Immich الآن بقراءة النصوص الموجودة داخل صورك، لذا يمكنك البحث عنها من خلال ما تقوله.", + "ocr_title": "ابحث عن النص في صورك", "official_immich_resources": "الموارد الرسمية لشركة Immich", "offline": "غير متصل", "offset": "ازاحة", @@ -1535,6 +1562,8 @@ "open": "فتح", "open_calendar": "افتح الرزنامة", "open_in_browser": "فتح في متصفح", + "open_in_immich_body": "قم بتعيين Immich كمعرض الصور الخاص بك على Android لفتح الصور مباشرة من التطبيقات الأخرى.", + "open_in_immich_title": "افتح الصور في Immich", "open_in_map_view": "فتح في عرض الخريطة", "open_in_openstreetmap": "فتح في OpenStreetMap", "open_the_search_filters": "افتح مرشحات البحث", @@ -1693,7 +1722,10 @@ "recent": "حديث", "recent_searches": "عمليات البحث الأخيرة", "recently_added": "اضيف مؤخرا", + "recently_added_body": "انتقل مباشرةً إلى كل ما أضفته مؤخراً على صفحة مخصصة.", + "recently_added_description": "تصفح ممتلكاتك مرتبة حسب تاريخ تحميلها إلى Immich", "recently_added_page_title": "أضيف مؤخرا", + "recently_added_title": "إضاف مؤخراً", "recently_taken": "تم التقاطها مؤخرًا", "refresh": "تحديث", "refresh_encoded_videos": "تحديث مقاطع الفيديو المشفرة", @@ -1900,6 +1932,8 @@ "share_link": "مشاركة رابط", "share_original": "استخدام الملف الأصلي", "share_preview": "استخدام الصورة المصغرة", + "share_quality_body": "اضغط مع الاستمرار على زر المشاركة لاختيار جودة الصورة قبل مشاركتها.", + "share_quality_title": "اختر جودة المشاركة التي تناسبك", "shared": "مُشتَرك", "shared_album_activities_input_disable": "التعليق معطل", "shared_album_activity_remove_content": "هل تريد حذف هذا النشاط؟", @@ -1915,6 +1949,8 @@ "shared_link_clipboard_copied_massage": "نسخ إلى الحافظة", "shared_link_create_error": "خطأ أثناء إنشاء رابط مشترك", "shared_link_custom_url_description": "الوصول إلى هذا الرابط المشترك باستخدام عنوان URL مخصص", + "shared_link_custom_url_title": "عنوان URL مخصص", + "shared_link_custom_url_warning": "تحذير: قد لا يتصرف اسم عنوان URL المخصص الذي يحتوي على شرطة مائلة للأمام كما تتوقع.", "shared_link_edit_description_hint": "أدخل وصف المشاركة", "shared_link_edit_expire_after_option_day": "يوم 1", "shared_link_edit_expire_after_option_days": "{count} ايام", @@ -1981,16 +2017,19 @@ "sign_out": "خروج", "sign_up": "التسجيل", "size": "الحجم", + "skip": "تخطي", "skip_to_content": "تخطي إلى المحتوى", "skip_to_folders": "تخطي إلى المجلدات", "skip_to_tags": "تخطي إلى العلامات", "slideshow": "عرض الشرائح", + "slideshow_body": "استرخِ وشاهد صورك تُعرض في عرض الشرائح بملء الشاشة.", "slideshow_metadata_overlay_mode": "محتوى التراكب", "slideshow_metadata_overlay_mode_description_only": "وصف فقط", "slideshow_metadata_overlay_mode_full": "كامل", "slideshow_repeat": "اعادة عرض الشرائح", "slideshow_repeat_description": "العودة إلى البداية عند انتهاء عرض الشرائح", "slideshow_settings": "إعدادات عرض الشرائح", + "slideshow_title": "عرض الشرائح", "smart_album": "ألبوم ذكي", "some_assets_already_have_a_location_warning": "بعض الملفات المحددة تحتوي بالفعل على موقع جغرافي", "sort_albums_by": "رتب الألبومات حسب...", @@ -2118,6 +2157,7 @@ "unknown": "غير معروف", "unknown_country": "بلد غير معروف", "unknown_date": "تاريخ غير معروف", + "unknown_schema": "مخطط غير معروف", "unknown_year": "سنة غير معروفة", "unlimited": "غير محدود", "unlink_motion_video": "إلغاء ربط فيديو الحركة", @@ -2153,6 +2193,8 @@ "upload_status_errors": "الأخطاء", "upload_status_uploaded": "تم الرفع", "upload_success": "تم الرفع بنجاح، قم بتحديث الصفحة لرؤية المحتويات المرفوعة الجديدة.", + "upload_to_album_body": "بالنسبة للمستخدمين الذين لا يستخدمون ميزة التحميل اليدوي، يمكنك الآن اختيار إضافة الصور المحلية مباشرة إلى الألبوم أثناء تحميلها، ولا داعي للتحميل ثم الإضافة إلى ألبوم لاحقًا بعد الآن.", + "upload_to_album_title": "قم بالتحميل مباشرة إلى ألبوم", "upload_to_immich": "الرفع الىImmich ‎ ‏ ({count})", "uploading": "جاري الرفع", "uploading_media": "رفع الوسائط", @@ -2220,6 +2262,9 @@ "week": "أسبوع", "welcome": "مرحباً", "welcome_to_immich": "مرحباً بك في Immich", + "whats_new": "ما الجديد", + "whats_new_settings_subtitle": "تعرف على كل ما هو جديد في Immich", + "whats_new_version": "الإصدار {version}", "when": "عندما", "width": "عُرض", "wifi_name": "اسم شبكة Wi-Fi", diff --git a/i18n/az.json b/i18n/az.json index f183643b93..0cd83e01a8 100644 --- a/i18n/az.json +++ b/i18n/az.json @@ -23,6 +23,7 @@ "add_location": "Məkan əlavə et", "add_partner": "Partnyor əlavə et", "add_photos": "Şəkillər əlavə et", + "add_step": "Addım əlavə et", "add_tag": "Etiket əlavə et", "add_to": "Bura əlavə et…", "add_to_album": "Alboma əlavə et", @@ -44,7 +45,7 @@ "authentication_settings": "Səlahiyyətləndirmə parametrləri", "authentication_settings_description": "Şifrə, OAuth və digər səlahiyyətləndirmə parametrləri", "authentication_settings_disable_all": "Bütün giriş etmə metodlarını söndürmək istədiyinizdən əminsinizmi? Giriş etmə funksiyası tamamilə söndürüləcəkdir.", - "authentication_settings_reenable": "Yenidən aktiv etmək üçün Server Əmri-ni istifadə edin.", + "authentication_settings_reenable": "Yenidən aktiv etmək üçün Server Əmri istifadə edin.", "background_task_job": "Arxa plan tapşırıqları", "backup_database": "Verilənlər bazasının dump-ını yaradın", "backup_database_enable_description": "Verilənlər bazasının artıq nüsxələrini aktiv et", @@ -57,10 +58,11 @@ "backup_onboarding_parts_title": "3-2-1 ehtiyat nüsxəsinə aşağıdakılar daxildir:", "backup_onboarding_title": "Ehtiyat surətlər", "backup_settings": "Bazanın Dump Parametrləri", - "backup_settings_description": "Verilənlər bazasının ehtiyat nüsxə parametrlərini idarə et", + "backup_settings_description": "Verilənlər bazasının ehtiyat nüsxə parametrləri.", "cleared_jobs": "{job} üçün tapşırıqlar silindi", "config_set_by_file": "Konfiqurasiya hal-hazırda konfiqurasiya faylı ilə təyin olunub", "confirm_delete_library": "{library} kitabxanasını silmək istədiyinizə əminmisiniz?", + "confirm_delete_library_assets": "Bu kitabxananı silmək istədiyinizə əminsiniz? {count, plural, one {# contained asset} other {all # contained assets}} Immich-dən silinəcək və geri qaytarmaq mümkün olmayacaq. Fayllar diskdə qalacaq.", "confirm_email_below": "Təsdiqləmək üçün aşağıya {email} yazın", "confirm_reprocess_all_faces": "Bütün üzləri yenidən emal etmək istədiyinizə əminsiniz? Bu, həmçinin adlandırılmış şəxsləri siləcək.", "confirm_user_password_reset": "{user} adlı istifadəçinin şifrəsini sıfırlamaq istədiyinizdən əminmisiniz?", @@ -71,11 +73,14 @@ "cron_expression_description": "Cron formatından istifadə edərək skan intervalını təyin edin. Ətraflı məlumat üçün nümunələrə baxa bilərsiniz. Crontab Guru", "cron_expression_presets": "Cron ifadəsi ön ayarları", "disable_login": "Giriş etməni söndür", + "download_csv": "CSV endir", "duplicate_detection_job_description": "Bənzər şəkilləri tapmaq üçün maşın öyrənməsini işə salın. Bu prosses Smart Search funksiyasına əsaslanır", "exclusion_pattern_description": "İstisna nümunələri kitabxananızı skan edərkən faylları və qovluqları nəzərə almamağa imkan verir. Bu, RAW faylları kimi idxal etmək istəmədiyiniz faylları olan qovluqlarınız olduqda faydalıdır.", "export_config_as_json_description": "Cari sistem konfiqurasiyasını JSON faylı kimi endirin", "external_libraries_page_description": "Admin xarici kitabxana səhifəsi", "face_detection": "Üz tanıma", + "face_detection_description": "Maşın öyrənməsindən istifadə edərək aktivlərdəki üzləri aşkar edilsin. Videolar üçün yalnız eskiz nəzərə alınır. \"Yeniləyin\" bütün elementləri emal edir. \"Sıfırlayın\" əlavə olaraq bütün cari üz məlumatlarını silir. \"Yarımçıq\" hələ emal olunmamış aktivləri növbəyə qoyur. Aşkar edilmiş üzlər Üz Aşkarlama tamamlandıqdan sonra Üz Tanıma üçün növbəyə qoyulacaq və onları mövcud və ya yeni insanlara qruplaşdıracaq.", + "facial_recognition_job_description": "Aşkarlanmış üzləri insanlara qruplaşdırın. Bu addım Üz Aşkarlanması tamamlandıqdan sonra icra olunur. \"Sıfırla\" bütün üzləri (simaları) yenidən qruplaşdırır. \"Çatışmayan\" növbələnmiş amma şəxs təyin olmayan üzləri göstərir.", "failed_job_command": "{command} əmri {job} işi üçün uğursuz oldu", "force_delete_user_warning": "XƏBƏRDARLIQ: Bu əməliyyat istifadəçi və bütün məlumatları siləcəkdir. Bu prossesi və silinən faylları geri qaytarmaq olmaz.", "image_format": "Format", @@ -85,13 +90,39 @@ "image_fullsize_enabled_description": "Veb üçün uyğun olmayan formatlar üçün tam ölçülü şəkil yaradın. “Daxili önizləməyə üstünlük ver” aktiv olduqda, daxili önizləmələr çevrilmədən birbaşa istifadə olunur. JPEG kimi veb üçün uyğun formatlara təsir etmir.", "image_fullsize_quality_description": "Tam ölçülü şəkil keyfiyyəti (1-100). Daha yüksək dəyər daha yaxşı keyfiyyət verir, lakin daha böyük ölçülü fayl yaradır.", "image_fullsize_title": "Tam ölçülü şəkil tənzimləmələri", + "image_prefer_embedded_preview": "Yerləşdirilmiş önizləməyə üstünlük ver", + "image_prefer_embedded_preview_setting_description": "RAW fotoşəkillərində təsvir emalı üçün giriş kimi və mümkün olduqda daxil edilmiş önizləmələrdən istifadə edin. Bu, bəzi şəkillər üçün daha dəqiq rənglər yarada bilər, lakin önizləmənin keyfiyyəti kameradan asılıdır və təsvirdə daha çox sıxılma artefaktları ola bilər.", + "image_prefer_wide_gamut": "Geniş qammaya üstünlük ver", + "image_prefer_wide_gamut_setting_description": "Miniatürlər üçün Display P3 istifadə edin. Bu, geniş rəng diapazonu ilə şəkillərin canlılığını daha yaxşı qoruyur, lakin köhnə brauzer versiyası olan köhnə cihazlarda şəkillər fərqli görünə bilər. Rəng dəyişikliklərinin qarşısını almaq üçün sRGB şəkilləri sRGB olaraq saxlanılır.", + "image_preview_description": "Tək bir elementə baxarkən və maşın öyrənməsi üçün istifadə edilən, metaməlumatları silinmiş orta ölçülü şəkil", + "image_preview_quality_description": "1-100 arasında önizləmə keyfiyyəti. Daha yüksək olan daha yaxşıdır, lakin daha böyük fayllar yaradır və tətbiqin cəldliyini zəiflədə bilər. Aşağı dəyərin təyin edilməsi maşın öyrənməsinin keyfiyyətinə təsir göstərə bilər.", "image_preview_title": "Önizləmə parametrləri", + "image_progressive": "Proqressiv", + "image_progressive_description": "Tədricən yüklənmə ekranı üçün JPEG şəkillərini tədricən (proqressiv) kodlaşdırın. Bunun WebP şəkillərinə heç bir təsiri yoxdur.", "image_quality": "Keyfiyyət", "image_resolution": "Çözümlülük", "image_resolution_description": "Yüksək çözümlülükdə daha çox detallar vardır, lakin onları kodlaşdırmaq da daha çox vaxt alır, daha böyük həcmə sahib olurlar və tətbiqin işləmə sürətini yavaşladır.", "image_settings": "Şəklin parametrləri", "image_settings_description": "Hazırlanan şəkillərin keyfiyyətini və çözümlülüyünü idarə et", + "image_thumbnail_description": "Əsas zaman xətti kimi foto qruplarına baxarkən istifadə edilən, metaməlumatları silinmiş kiçik eskiz", + "image_thumbnail_quality_description": "1-100 arasında eskiz keyfiyyəti. Daha yüksək keyfiyyət daha yaxşıdır, lakin daha böyük fayllar yaradır və tətbiqin cəldliyini zəiflədə bilər.", "image_thumbnail_title": "Önizləmə parametrləri", + "import_config_from_json_description": "JSON konfiqurasiya faylını yükləməklə sistem konfiqurasiyasını idxal edin", + "integrity_checks_checksum_files": "Yoxlama cəmi (checksum) faylları", + "integrity_checks_checksum_files_description": "Yoxlama cəmi (checksum) yoxlamasını konfiqurasiya et", + "integrity_checks_checksum_files_enable_description": "Yoxlama cəmi (checksum) yoxlamasını aktivləşdir", + "integrity_checks_checksum_files_percentage_limit": "Faiz limiti", + "integrity_checks_checksum_files_percentage_limit_description": "Yoxlama cəmi (checksum) yoxlamasının hər intervalda nə qədər işləməli olduğunun maksimum faizini 0,01 ilə 1 arasında təyin edin.", + "integrity_checks_checksum_files_time_limit": "Zaman limiti", + "integrity_checks_checksum_files_time_limit_description": "Yoxlama cəmi yoxlamasının hər intervalda işləməli olduğu maksimum müddəti təyin edin. (millisaniyə)", + "integrity_checks_missing_files": "Çatışmayan fayllar", + "integrity_checks_missing_files_description": "Tezliyi təyin et və çatışmayan faylların yoxlanılmasını aktiv/deaktiv et", + "integrity_checks_missing_files_enable_description": "Çatışmayan faylların yoxlanmasını aktiv et", + "integrity_checks_settings": "Tamlıq yoxlamaları", + "integrity_checks_settings_description": "Tamlıq yoxlamalarının intervalını təyin et", + "integrity_checks_untracked_files": "İzlənməyən fayllar", + "integrity_checks_untracked_files_description": "İzlənməyən faylların axtarışını aktiv/deaktiv et və tezliyini təyin et", + "integrity_checks_untracked_files_enable_description": "İzlənməyən faylların axtarışını aktiv et", "job_concurrency": "{job}paralellik", "job_created": "Tapşırıq yaradıldı", "job_not_concurrency_safe": "Bu iş eyni vaxtda icra üçün təhlükəsiz deyil.", @@ -99,21 +130,35 @@ "job_settings_description": "Parallel şəkildə fəaliyyət göstərən tapşırıqları idarə et", "jobs_delayed": "{jobCount, plural, other {# gecikməli}}", "jobs_failed": "{jobCount, plural, other {# uğursuz}}", + "jobs_over_time": "Tapşırıqların qrafiki", "library_created": "{library} kitabxanası yaradıldı", "library_deleted": "Kitabxana silindi", + "library_details": "Kitabxana parametrləri", + "library_folder_description": "İdxal qovluğunu göstərin. Bu qovluqda, alt qovluqlarla birlikdə, şəkil və videolar axtarılacaq.", + "library_remove_exclusion_pattern_prompt": "Bu istisna şablonunu silmək istədiyinizə əminsiniz?", + "library_remove_folder_prompt": "Bu idxal qovluğunu silmək istədiyinizə əminsiniz?", "library_scanning": "Periodik skan", "library_scanning_description": "Periodik kitabxana skanını confiqurasiya et", "library_scanning_enable_description": "Periodik kitabxana skanını aktivləşdir", "library_settings": "Xarici kitabxana", "library_settings_description": "Xarici kitabxana parametrlərini idarə et", - "library_tasks_description": "Kitabxana tapşırıqlarını yerinə yetir", + "library_tasks_description": "Xarici kitabxanalarda yenilikləri yoxla", + "library_updated": "Yenilənmiş kitabxana", "library_watching_enable_description": "Fayl dəyişiklikləri üçün xarici kitabxanalara baxış keçirin", - "library_watching_settings": "Kitabxana nəzarəti (EKSPERİMENTAL)", + "library_watching_settings": "Kitabxana nəzarəti [EKSPERİMENTAL]", "library_watching_settings_description": "Dəyişdirilən faylları avtomatik olaraq yoxla", "logging_enable_description": "Jurnalı aktivləşdir", "logging_level_description": "Aktiv edildikdə hansı jurnal səviyyəsi istifadə olunur.", + "logging_settings": "Tarixçə", + "machine_learning_availability_checks": "Əlçatanlıq yoxlamaları", + "machine_learning_availability_checks_description": "Əlçatan maşın öyrənmə serverlərini avtomatik tap və təyin et", + "machine_learning_availability_checks_enabled": "Əlçatanlıq yoxlamalarını aktiv et", + "machine_learning_availability_checks_interval": "Yoxlama intervalı", + "machine_learning_availability_checks_interval_description": "Əlçatanlıq yoxlamaları arasında millisaniyələrlə interval", + "machine_learning_availability_checks_timeout": "Sorğunun bitmə müddəti", + "machine_learning_availability_checks_timeout_description": "Əlçatanlıq yoxlamaları üçün millisaniyələrlə limit", "machine_learning_clip_model": "CLIP modeli", - "machine_learning_clip_model_description": "Buradaqeyd olunan CLIP modelinin adı. Modeli dəyişdirdikdən sonra bütün şəkillər üçün 'Ağıllı Axtarış' funksiyasını yenidən işə salmalısınız.", + "machine_learning_clip_model_description": "Burada qeyd olunan CLIP modelinin adı. Modeli dəyişdirdikdən sonra bütün şəkillər üçün 'Ağıllı Axtarış' funksiyasını yenidən işə salmalısınız.", "machine_learning_duplicate_detection": "Dublikat Aşkarlama", "machine_learning_duplicate_detection_enabled": "Dublikat aşkarlamanı aktiv etmək", "machine_learning_duplicate_detection_enabled_description": "Əgər deaktiv edilibsə, birə-bir eyni fayllar yenədə silinəcək.", @@ -124,5 +169,6 @@ "machine_learning_facial_recognition_description": "Şəkillərdəki üzləri aşkarla, tanı və qruplaşdır", "machine_learning_facial_recognition_model": "Üz tanıma modeli" }, + "discord": "Discord", "timeline": "Zaman şkalası" } diff --git a/i18n/be.json b/i18n/be.json index 96b7e61a9c..95583ec646 100644 --- a/i18n/be.json +++ b/i18n/be.json @@ -33,7 +33,7 @@ "add_to_albums": "Дадаць у альбомы", "add_to_albums_count": "Дадаць у альбомы ({count})", "add_to_bottom_bar": "Дадаць у", - "add_upload_to_stack": "Запампаваць і дадаць у набор", + "add_upload_to_stack": "Дадаць запампаванае ў стос", "add_url": "Дадаць URL", "added_to_archive": "Дададзена ў архіў", "added_to_favorites": "Дададзена ў абраныя", @@ -53,11 +53,11 @@ "backup_onboarding_1_description": "зняшняя копія ў воблаку або ў іншым фізічным месцы.", "backup_onboarding_2_description": "лакальныя копіі на іншых прыладах. Гэта ўключае ў сябе асноўныя файлы і лакальную рэзервовую копію гэтых файлаў.", "backup_onboarding_3_description": "поўная колькасць копій вашых данных, у тым ліку зыходных файлаў. Гэта ўключае 1 пазаштатную копію і 2 лакальныя копіі.", - "backup_onboarding_description": "Стратэгія рэзервовых копій 3-2-1 рэкамендуецца для аховы вашых даных. Захоўвайце копіі загружаных фота/відэа, а таксама базу даных Immich для поўнага рэзервовага капіявання.", + "backup_onboarding_description": "Стратэгія рэзервовых копій 3-2-1 рэкамендуецца для аховы вашых даных. Захоўвайце копіі запампаваных фота/відэа, а таксама базу даных Immich для поўнага рэзервовага капіравання.", "backup_onboarding_footer": "Каб атрымаць дадатковую інфармацыю пра рэзервовае капіраванне Immich, звярніцеся да дакументацыі.", "backup_onboarding_parts_title": "Рэзервовая копія «3-2-1» уключае ў сябе:", "backup_onboarding_title": "Рэзервовыя копіі", - "backup_settings": "Налады рэзервовага капіявання", + "backup_settings": "Налады рэзервовага капіравання", "backup_settings_description": "Кіраванне наладамі рэзервавання базы даных.", "cleared_jobs": "Ачышчаны заданні для: {job}", "config_set_by_file": "Канфігурацыя зараз усталявана праз файл канфігурацыі", @@ -70,17 +70,17 @@ "copy_config_to_clipboard_description": "Капіраваць бягучую канфігурацыю сістэмы ў JSON у буфер абмену", "create_job": "Стварыць заданне", "cron_expression": "Выраз Cron", - "cron_expression_description": "Задайце інтэрвал сканавання, выкарыстоўваючы фармат cron. Для атрымання дадатковай інфармацыі, звярніцеся, напрыклад, да Crontab Guru", + "cron_expression_description": "Задайце інтэрвал сканіравання, выкарыстоўваючы фармат cron. Для атрымання дадатковай інфармацыі, звярніцеся, напрыклад, да Crontab Guru", "cron_expression_presets": "Прадустаноўкі выразаў Cron", "disable_login": "Адключыць уваход", "download_csv": "Спампаваць CSV", "duplicate_detection_job_description": "Запусціць машыннае навучанне на аб’ектах для выяўлення падобных відарысаў. Залежыць ад Smart Search", - "exclusion_pattern_description": "Шаблоны выключэння дазваляюць ігнараваць файлы і папкі пры сканаванні вашай бібліятэкі. Гэта карысна, калі ў вас ёсць папкі, якія змяшчаюць файлы, якія вы не хочаце імпартаваць, напрыклад, файлы RAW.", + "exclusion_pattern_description": "Шаблоны выключэння дазваляюць ігнараваць файлы і папкі пры сканіраванні бібліятэкі. Гэта карысна, калі ў вас ёсць папкі, якія змяшчаюць файлы, якія вы не хочаце імпартаваць, напрыклад, файлы RAW.", "export_config_as_json_description": "Захаваць бягучую канфігурацыю сістэмы ў файл JSON", "external_libraries_page_description": "Кіраванне знешнімі бібліятэкамі", "face_detection": "Выяўленне твараў", - "face_detection_description": "Выяўляць твары на фотаздымках і відэа з дапамогай машыннага навучання. Для відэа ўлічваецца толькі мініяцюра. \"Абнавіць\" (пера)апрацоўвае ўсе медыя. \"Скінуць\" дадаткова ачышчае ўсе бягучыя даныя пра твары. \"Адсутнічае\" ставіць у чаргу медыя, якія яшчэ не былі апрацаваныя. Выяўленыя твары будуць пастаўлены ў чаргу для распазнавання асоб пасля завяршэння выяўлення твараў, з групаваннем іх па існуючых або новых людзях.", - "facial_recognition_job_description": "Групаваць выяўленыя твары па асобах. Гэты этап выконваецца пасля завяршэння выяўлення твараў. \"Скінуць\" (паўторна) перагрупоўвае ўсе твары. \"Адсутнічае\" ставіць у чаргу твары, якія яшчэ не прыпісаныя да якой-небудзь асобы.", + "face_detection_description": "Выяўляць твары на фотаздымках і відэа з дапамогай машыннага навучання. Для відэа ўлічваецца толькі мініяцюра. \"Абнавіць\" (пера)апрацоўвае ўсе медыя. \"Скінуць\" дадаткова ачышчае ўсе бягучыя даныя пра твары. \"Адсутнічае\" ставіць у чаргу медыя, якія яшчэ не былі апрацаваныя. Выяўленыя твары будуць пастаўлены ў чаргу для распазнавання пасля завяршэння выяўлення твараў, з групаваннем іх па існуючых або новых людзях.", + "facial_recognition_job_description": "Групаваць выяўленыя твары па людзях. Гэты этап выконваецца пасля завяршэння выяўлення твараў. \"Скінуць\" (паўторна) перагрупоўвае ўсе твары. \"Адсутнічае\" ставіць у чаргу твары, якія яшчэ не прыпісаныя да якога-небудзь чалавека.", "failed_job_command": "Каманда {command} не выканалася для задання: {job}", "force_delete_user_warning": "ПАПЯРЭДЖАННЕ: Гэта дзеянне неадкладна выдаліць карыстальніка і ўсе аб'екты. Гэта дзеянне не можа быць адроблена і файлы немагчыма будзе аднавіць.", "image_format": "Фармат", @@ -91,8 +91,8 @@ "image_fullsize_quality_description": "Якасць відарыса ў поўным памеры ад 1 да 100. Больш высокае значэнне лепшае, але прыводзіць да павелічэння памеру файла.", "image_fullsize_title": "Налады відарыса ў поўным памеры", "image_prefer_embedded_preview": "Аддаваць перавагу ўбудаванай праяве", - "image_prefer_embedded_preview_setting_description": "Выкарыстоўваць убудаваныя праявы ў RAW-фотаздымках ў якасці ўваходных даных для апрацоўкі малюнкаў, калі магчыма. Гэта дазваляе атрымаць больш дакладныя колеры для некаторых відарысаў, але ж якасць праяў залежыць ад камеры, і на відарысе можа быць больш артэфактаў сціску.", - "image_prefer_wide_gamut": "Аддаць перавагу шырокай гаме", + "image_prefer_embedded_preview_setting_description": "Выкарыстоўваць убудаваныя праявы ў RAW-фотаздымках ў якасці ўваходных даных для апрацоўкі відарысаў, калі магчыма. Гэта дазваляе атрымаць больш дакладныя колеры для некаторых відарысаў, але ж якасць праяў залежыць ад камеры, і на відарысе можа быць больш артэфактаў сціску.", + "image_prefer_wide_gamut": "Аддаваць перавагу шырокай гаме", "image_prefer_wide_gamut_setting_description": "Выкарыстоўвайце Display P3 для мініяцюр. Гэта лепей захоўвае яркасць відарысаў з шырокай колеравай прасторай, але відарысы могуць выглядаць па-іншаму на старых прыладах са старай версіяй браузера. Відарысы sRGB захоўваюцца ў фармаце sRGB, што дазваляе пазбегнуць колеравых зрухаў.", "image_preview_description": "Відарыс сярэдняга памеру з выдаленымі метаданымі, выкарыстоўваецца пры праглядзе асобнага рэсурсу і для машыннага навучання", "image_preview_quality_description": "Якасць перадпрагляду ад 1 да 100. Чым вышэй, тым лепш, але файлы становяцца большымі, і гэта можа знізіць хуткасць працы праграмы. Нізкае значэнне можа паўплываць на якасць машыннага навучання.", @@ -108,6 +108,21 @@ "image_thumbnail_quality_description": "Якасць мініяцюр ад 1 да 100. Чым вышэй, тым лепш, але файлы становяцца большымі, што можа знізіць хуткасць працы праграмы.", "image_thumbnail_title": "Налады мініяцюр", "import_config_from_json_description": "Імпартаваць канфігурацыю сістэмы праз запампоўванне JSON файла настроек", + "integrity_checks_checksum_files": "Файлы кантрольных сум", + "integrity_checks_checksum_files_description": "Наладжванне праверкі кантрольнай сумы", + "integrity_checks_checksum_files_enable_description": "Уключыць праверку кантрольнай сумы", + "integrity_checks_checksum_files_percentage_limit": "Працэнтны ліміт", + "integrity_checks_checksum_files_percentage_limit_description": "Наладзьце максімальны працэнт ад 0,01 да 1, які вызначае, колькі разоў трэба правяраць кантрольную суму кожны інтэрвал.", + "integrity_checks_checksum_files_time_limit": "Абмежаванне па часе", + "integrity_checks_checksum_files_time_limit_description": "Наладжванне максімальнай працягласці, на працягу якой праверка кантрольнай сумы павінна выконвацца кожны інтэрвал. (мс)", + "integrity_checks_missing_files": "Адсутныя файлы", + "integrity_checks_missing_files_description": "Наладжванне частаты і ўключэнне або выключэнне праверкі адсутных файлаў", + "integrity_checks_missing_files_enable_description": "Уключэнне праверкі адсутных файлаў", + "integrity_checks_settings": "Праверкі цэласнасці", + "integrity_checks_settings_description": "Кіраванне інтэрваламі праверак цэласнасці", + "integrity_checks_untracked_files": "Файлы, якія не адсочваюцца", + "integrity_checks_untracked_files_description": "Наладжванне частаты і ўключэння або адключэння праверак неадсочваных файлаў", + "integrity_checks_untracked_files_enable_description": "Уключыць праверку неадсочваных файлаў", "job_concurrency": "Колькасць паралельных патокаў задання {job}", "job_created": "Заданне створана", "job_not_concurrency_safe": "Гэта заданне небяспечнае для паралельнага выканання.", @@ -119,15 +134,15 @@ "library_created": "Створана бібліятэка: {library}", "library_deleted": "Бібліятэка выдалена", "library_details": "Падрабязнасці бібліятэкі", - "library_folder_description": "Вызначце папку для імпарту. Гэта папка разам з падпапкамі будзе прасканавана на наяўнасць фота і відэа.", + "library_folder_description": "Вызначце папку для імпарту. Гэта папка разам з падпапкамі будзе прасканіравана на наяўнасць фота і відэа.", "library_remove_exclusion_pattern_prompt": "Вы упэўнены, што хочаце выдаліць гэты шаблон выключэння?", "library_remove_folder_prompt": "Вы упэўнены, што хочаце выдаліць гэту папку імпарту?", - "library_scanning": "Сканаванне па раскладзе", + "library_scanning": "Сканіраванне па раскладзе", "library_scanning_description": "Налады перыядычнага сканіравання бібліятэкі", - "library_scanning_enable_description": "Уключыць перыядычнае сканаванне бібліятэкі", + "library_scanning_enable_description": "Уключыць перыядычнае сканіраванне бібліятэкі", "library_settings": "Знешняя бібліятэка", "library_settings_description": "Кіраванне наладамі знешняй бібліятэкі", - "library_tasks_description": "Сканаваць знешнія бібліятэкі на наяўнасць новых і/або змененых рэсурсаў", + "library_tasks_description": "Сканіраваць знешнія бібліятэкі на наяўнасць новых і/або змененых рэсурсаў", "library_updated": "Бібліятэка абноўлена", "library_watching_enable_description": "Сачыць за зменамі файлаў у знешніх бібліятэках", "library_watching_settings": "[ЭКСПЕРЫМЕНТАЛЬНА] Сачыць за бібліятэкай", @@ -144,9 +159,9 @@ "machine_learning_availability_checks_timeout_description": "Час чакання ў мілісекундах для праверкі даступнасці", "machine_learning_clip_model": "CLIP мадэль", "machine_learning_clip_model_description": "Назва CLIP мадэлі паказана тут. Звярніце ўвагу, што пры змене мадэлі неабходна паўторна запусціць заданне \"Smart Search\" для ўсіх відарысаў.", - "machine_learning_duplicate_detection": "Выяўленне падобных", + "machine_learning_duplicate_detection": "Выяўленне дублікатаў", "machine_learning_duplicate_detection_enabled": "Уключыць выяўленне дублікатаў", - "machine_learning_duplicate_detection_enabled_description": "Калі адключана, абсалютна ідэнтычныя файлы ўсё роўна не будуць запампоўвацца.", + "machine_learning_duplicate_detection_enabled_description": "Калі адключана, абсалютна ідэнтычныя копіі ўсё роўна будуць выдаляцца.", "machine_learning_duplicate_detection_setting_description": "Выкарыстанне ўбудаванняў CLIP для пошуку верагодных дублікатаў", "machine_learning_enabled": "Уключыць машыннае навучанне", "machine_learning_enabled_description": "Калі адключана, усе функцыі машыннага навучання будуць адключаны незалежна ад налад ніжэй.", @@ -158,31 +173,32 @@ "machine_learning_facial_recognition_setting_description": "Калі адключана, відарысы не будуць кадавацца для распазнавання твараў, і не будзе запаўняцца раздзел \"Людзі\" на старонцы \"Агляд\".", "machine_learning_max_detection_distance": "Максімальная адлегласць выяўлення", "machine_learning_max_detection_distance_description": "Максімальная розніца паміж двума відарысамі, якія лічацца дублікатамі, складае ад 0,001 да 0,1. Больш высокія значэнні дазволяць выявіць больш дублікатаў, але могуць прывесці да няправільных выяўленняў.", - "machine_learning_max_recognition_distance": "Парог разпазнавання", - "machine_learning_max_recognition_distance_description": "Максімальнае адрозненне паміж двума асобамі, якія можна лічыць адным чалавекам (у дыяпазоне ад 0 да 2).Зніжэнне гэтага параметру можа прадухіліць распазнанне двух людзей як аднаго і таго ж чалавека, а павышэнне - як двух розных людзей. Майце на ўвазе, што прасцей аб'яднаць двух людзей, чым падзяліць аднаго чалавека на дваіх, таму па магчымасці выбірайце меншы парог.", - "machine_learning_min_detection_score": "Мінімальны парог разпазнавання", - "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_max_recognition_distance": "Парог раcпазнавання", + "machine_learning_max_recognition_distance_description": "Максімальнае адрозненне паміж двума тварамі, якія можна лічыць адным чалавекам (у дыяпазоне ад 0 да 2).Зніжэнне гэтага параметру можа прадухіліць распазнанне двух людзей як аднаго і таго ж чалавека, а павышэнне - як двух розных людзей. Майце на ўвазе, што прасцей аб'яднаць двух людзей, чым падзяліць аднаго чалавека на дваіх, таму па магчымасці выбірайце меншы парог.", + "machine_learning_min_detection_score": "Мінімальны парог выяўлення", + "machine_learning_min_detection_score_description": "Мінімальны парог для выяўлення твараў (ад 0 да 1). Ніжэйшае значэнне дазволіць знаходзіць больш твараў, але можа прывесці да хібных спрацоўванняў.", + "machine_learning_min_recognized_faces": "Мінімум раcпазнаных твараў", + "machine_learning_min_recognized_faces_description": "Мінімальная колькасць распазнаных твараў для стварэння чалавека. Павялічэнне гэтага параметра робіць распазнанне твараў больш дакладным, але пры гэтым павялічваецца верагоднасць таго, што твар не будзе прысвоены чалавеку.", + "machine_learning_ocr": "Распазнаванне тэксту (OCR)", + "machine_learning_ocr_description": "Выкарыстоўванне машыннага навучання для распазнавання тэксту на відарысах", "machine_learning_ocr_enabled": "Дадаць OCR", "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_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": "Мадэль машыннага навучання (OCR)", "machine_learning_ocr_model_description": "Серверныя мадэлі больш дакладныя, чым мабільныя, але апрацоўваюць даныя даўжэй і выкарыстоўваюць больш памяці.", "machine_learning_settings": "Налады машыннага навучання", "machine_learning_settings_description": "Кіраванне функцыямі і наладамі машыннага навучання", "machine_learning_smart_search": "Разумны пошук", - "machine_learning_smart_search_description": "Семантычны пошук малюнкаў з выкарыстаннем убудаванняў CLIP", + "machine_learning_smart_search_description": "Семантычны пошук відарысаў з выкарыстаннем убудаванняў CLIP", "machine_learning_smart_search_enabled": "Уключыць разумны пошук", "machine_learning_smart_search_enabled_description": "Калі адключана, відарысы не будуць кадзіравацца для разумнага пошуку.", "machine_learning_url_description": "URL-адрас сервера машыннага навучання. Калі пазначана больш за адзін URL-адрас, спробы падключэння да кожнага сервера будуць выконвацца па чарзе, пакуль адзін з іх не адкажа паспяхова, па парадку ад першага да апошняга. Серверы, якія не адказваюць, будуць часова ігнаравацца, пакуль яны не вернуцца ў сетку.", + "maintenance_backup_management": "Кіраванне рэзервовым капіраваннем", "maintenance_delete_backup": "Выдаліць рэзервовую копію", "maintenance_delete_backup_description": "Гэты файл будзе беззваротна выдалены.", "maintenance_delete_error": "Не атрымалася выдаліць рэзервовую копію.", @@ -196,9 +212,14 @@ "maintenance_integrity_missing_file_description": "Файлы, якія ёсць у базе даных Immich, але не існуюць у файлавай сістэме.", "maintenance_integrity_missing_file_job": "Праверка наяўнасці адсутных файлаў", "maintenance_integrity_missing_file_refresh_job": "Абнавіць справаздачы аб адсутных файлах", + "maintenance_integrity_report": "Справаздача аб цэласнасці", + "maintenance_integrity_untracked_file": "Неадсочваныя файлы", + "maintenance_integrity_untracked_file_description": "Файлы ў каталогах Immich, пра якія ў Immich няма ніякіх запісаў.", + "maintenance_integrity_untracked_file_job": "Праверыць наяўнасць неадсочваных файлаў", + "maintenance_integrity_untracked_file_refresh_job": "Абнавіць справаздачы аб неадсочваных файлах", "maintenance_restore_backup": "Аднавіць рэзервовую копію", "maintenance_restore_backup_description": "Immich будзе сцёрты і адноўлены з абранай рэзервовай копіі. Перад працягам будзе створана рэзервовая копія.", - "maintenance_restore_backup_different_version": "Гэтая рэзервовая копія была створана з для іншай версіі Immich!", + "maintenance_restore_backup_different_version": "Гэтая рэзервовая копія была створана з іншай версіі Immich!", "maintenance_restore_backup_unknown_version": "Не атрымалася вызначыць рэзервовую версію.", "maintenance_restore_database_backup": "Аднавіць рэзервовую копію базы даных", "maintenance_restore_database_backup_description": "Адкат да папярэдняга стану базы даных з выкарыстаннем файла рэзервовай копіі", @@ -224,7 +245,7 @@ "map_settings": "Карта", "map_settings_description": "Кіраванне наладамі карты", "map_style_description": "URL-адрас style.json тэмы карты", - "memory_cleanup_job": "Ачыстка памяці", + "memory_cleanup_job": "Ачыстка ўспамінаў", "memory_generate_job": "Генерацыя ўспамінаў", "metadata_extraction_job": "Выняць метаданыя", "metadata_extraction_job_description": "Выняць з файлаў метаданыя, такія як месцазнаходжанне, твары і раздзяляльнасць", @@ -234,7 +255,7 @@ "metadata_settings_description": "Кіраванне наладамі метаданых", "migration_job": "Міграцыя", "migration_job_description": "Перанас мініяцюр аб'ектаў і твараў ў актуальную структуру папак", - "nightly_tasks_cluster_faces_setting_description": "Запусціць распазнаванне асоб для нядаўна выяўленых твараў", + "nightly_tasks_cluster_faces_setting_description": "Запусціць распазнаванне людзей па нядаўна выяўленых тварах", "nightly_tasks_cluster_new_faces_setting": "Згрупаваць новыя твары", "nightly_tasks_database_cleanup_setting": "Ачыстка базы даных", "nightly_tasks_database_cleanup_setting_description": "Ачысціць старыя, пратэрмінаваныя даныя з базы даных", @@ -250,7 +271,7 @@ "nightly_tasks_sync_quota_usage_setting_description": "Абнаўляць квоту сховішча карыстальніка на аснове бягучага выкарыстання", "no_paths_added": "Не дададзена аніводнага шляху", "no_pattern_added": "Не дададзена аніводнага патэрну", - "note_apply_storage_label_previous_assets": "Заўвага: Каб ужыць Маркіроўку сховішча да раней загружаных аб'ектаў, запусціце", + "note_apply_storage_label_previous_assets": "Заўвага: Каб ужыць Маркіроўку сховішча да раней запампаваных аб'ектаў, запусціце", "note_cannot_be_changed_later": "УВАГА: Гэта нельга будзе змяніць пазней!", "notification_email_from_address": "З адрасоў", "notification_email_from_address_description": "Электронны адрас адпраўніка, для прыкладу: \"Immich Photo Server \". Пераканайцеся, што выкарыстоўваееца адрас, якому дазволена адпраўляць электронныя лісты.", @@ -297,12 +318,12 @@ "oauth_storage_quota_default_description": "Квота ў ГіБ, якая будзе выкарыстоўвацца, калі claim не пададзены.", "oauth_timeout": "Тайм-аўт запыту", "oauth_timeout_description": "Тайм-аўт запытаў у мілісекундах", - "ocr_job_description": "Выкарыстоўваць машыннае навучанне для распазнавання тэксту на відарысах", + "ocr_job_description": "Выкарыстоўванне машыннага навучання для распазнавання тэксту на відарысах", "password_enable_description": "Уваход з дапамогай электроннай пошты і пароля", "password_settings": "Уваход па паролі", "password_settings_description": "Кіраванне наладамі ўваходу па паролі", "paths_validated_successfully": "Усе шляхі паспяхова правераныя", - "person_cleanup_job": "Ачыстка данных асоб", + "person_cleanup_job": "Ачыстка даных людзей", "queue_details": "Звесткі пра чаргу", "queues": "Чэргі заданняў", "queues_page_description": "Старонка чэргаў заданняў адміністратара", @@ -310,6 +331,8 @@ "refreshing_all_libraries": "Абнаўленне ўсіх бібліятэк", "registration": "Рэгістрацыя адміністратара", "registration_description": "Вы з'яўляецеся першым карыстальнікам сістэмы, таму вы будзеце прызначаны адміністратарам. Вы будзеце адказваць за адміністрацыйныя задачы, а таксама ствараць новых карыстальнікаў.", + "release_channel_release_candidate": "Кандыдат на рэліз", + "release_channel_stable": "Стабільны", "remove_failed_jobs": "Выдаліць няўдалыя заданні", "require_password_change_on_login": "Патрабаваць змяніць пароль пры першым уваходзе ў сістэму", "reset_settings_to_default": "Скінуць налады да прадвызначаных", @@ -320,7 +343,7 @@ "server_external_domain_settings": "Знешні дамен", "server_external_domain_settings_description": "Дамен, які выкарыстоўваецца для знешніх спасылак", "server_public_users": "Публічныя карыстальнікі", - "server_public_users_description": "Усе карыстальнікі (імя і электронная пошта) паказваюцца пры даданні карыстальніка ў агульныя альбомы. Калі адключана, спіс карыстальнікаў будзе даступны толькі адміністратарам.", + "server_public_users_description": "Усе карыстальнікі (імя і электронная пошта) паказваюцца пры дадаванні карыстальніка ў абагуленыя альбомы. Калі адключана, спіс карыстальнікаў будзе даступны толькі адміністратарам.", "server_settings": "Налады сервера", "server_settings_description": "Кіраванне наладамі сервера", "server_stats_page_description": "Старонка статыстыкі сервера для адміністратара", @@ -348,7 +371,7 @@ "storage_template_user_label": "{label} - гэта пазнака сховішча карыстальніка", "system_settings": "Сістэмныя налады", "tag_cleanup_job": "Ачыстка тэгаў", - "template_email_available_tags": "Вы можаце выкарыстоўваць наступныя зменныя ў сваім шаблоне: {tags}", + "template_email_available_tags": "У шаблоне можна выкарыстоўваць наступныя пераменныя: {tags}", "template_email_if_empty": "Калі шаблон пусты, будзе выкарыстоўвацца стандартны шаблон ліста.", "template_email_invite_album": "Шаблон запрашэння ў альбом", "template_email_preview": "Перадпрагляд", @@ -361,8 +384,8 @@ "theme_custom_css_settings_description": "Каскадныя табліцы стыляў дазваляюць наладзіць аздабленне Immich.", "theme_settings": "Налады тэмы", "theme_settings_description": "Кіраванне аздабленнем вэб-інтэрфейсу Immich", - "thumbnail_generation_job": "Згенераваць мініяцюру", - "thumbnail_generation_job_description": "Генерацыя вялікіх, малых і размытых мініяцюр для кожнага аб’екта, а таксама мініяцюр для кожнай асобы", + "thumbnail_generation_job": "Генерацыя мініяцюр", + "thumbnail_generation_job_description": "Генерацыя вялікіх, малых і размытых мініяцюр для кожнага аб’екта, а таксама мініяцюр для кожнага чалавека", "transcoding_acceleration_api": "API паскарэння", "transcoding_acceleration_api_description": "API, які будзе ўзаемадзейнічаць з вашай прыладай для паскарэння транскадавання. Гэтая налада працуе «па магчымасці»: пры збоі адбудзецца адкат на праграмнае транскадаванне. VP9 можа працаваць ці не — у залежнасці ад вашага абсталявання.", "transcoding_acceleration_nvenc": "NVENC (патрабуецца відэакарта NVIDIA)", @@ -404,6 +427,9 @@ "transcoding_preferred_hardware_device_description": "Прымяняецца толькі да VAAPI і QSV. Задае dri-вузел для апаратнага транскадавання.", "transcoding_preset_preset": "Прэсет (-preset)", "transcoding_preset_preset_description": "Хуткасць сціскання. Больш павольныя прэсеты даюць меншыя файлы і павышаюць якасць пры мэтавым бітрэйце. VP9 ігнаруе хуткасці вышэйшыя за «faster».", + "transcoding_realtime": "Перакадаванне ў рэжыме рэальнага часу [EXPERIMENTAL]]", + "transcoding_realtime_resolutions": "Раздзяляльнасці", + "transcoding_realtime_video_codecs": "Відэакодэкі", "transcoding_reference_frames": "Апорныя кадры", "transcoding_reference_frames_description": "Колькасць кадраў, якія выкарыстоўваюцца як эталон пры сцісканні дадзенага кадра. Большыя значэнні паляпшаюць эфектыўнасць сціскання, але запавольваюць кадаванне. 0 выстаўляе значэнне аўтаматычна.", "transcoding_required_description": "Толькі відэа ў недапушчальным фармаце", @@ -464,11 +490,11 @@ "advanced_settings_log_level_title": "Узровень вядзення журнала: {level}", "advanced_settings_prefer_remote_subtitle": "Некаторыя прылады вельмі павольна загружаюць мініяцюры з лакальных аб’ектаў. Уключыце гэтую наладу, каб замест гэтага загружаць відарысы з сервера.", "advanced_settings_prefer_remote_title": "Аддаваць перавагу аддаленым відарысам", - "advanced_settings_proxy_headers_subtitle": "Вызначце загалоўкі проксі, якія Immich павінен дасылаць з кожным сеткавым запытам", + "advanced_settings_proxy_headers_subtitle": "Вызначце загалоўкі проксі, якія Immich павінен адпраўляць з кожным сеткавым запытам", "advanced_settings_proxy_headers_title": "[ЭКСПЕРЫМЕНТАЛЬНА] Уласныя загалоўкі проксі", "advanced_settings_readonly_mode_subtitle": "Уключае рэжым толькі для прагляду, у якім фота можна толькі праглядаць; выбар некалькіх відарысаў, абагульванне, кастынг і выдаленне адключаныя. Уключыць/выключыць рэжым толькі для прагляду можна праз аватар карыстальніка на галоўным экране", "advanced_settings_readonly_mode_title": "Рэжым толькі для чытання", - "advanced_settings_sync_remote_deletions_subtitle": "Аўтаматычна выдаляць ці аднаўляць аб’ект на гэтай прыладзе, калі такое дзеянне выконваецца ў вэбе", + "advanced_settings_sync_remote_deletions_subtitle": "Аўтаматычна выдаляць або аднаўляць аб’ект на гэтай прыладзе, калі гэта дзеянне выконваецца ў вэб-інтэрфейсе", "advanced_settings_sync_remote_deletions_title": "Сінхранізаваць аддаленыя выдаленні [ЭКСПЕРЫМЕНТАЛЬНА]", "advanced_settings_tile_subtitle": "Пашыраныя налады карыстальніка", "advanced_settings_troubleshooting_subtitle": "Уключыць дадатковыя функцыі для пошуку і выпраўлення непаладак", @@ -478,7 +504,7 @@ "age_years": "{years, plural, other {Узрост #}}", "album": "Альбом", "album_added": "Альбом дададзены", - "album_added_notification_setting_description": "Атрымліваць паведамленне на пошту, калі вас дадаюць у агульны альбом", + "album_added_notification_setting_description": "Атрымліваць паведамленне на элекронную пошту, калі вас дадаюць у абагулены альбом", "album_cover_updated": "Вокладка альбома абноўлена", "album_delete_confirmation": "Вы ўпэўнены, што хочаце выдаліць альбом {album}?", "album_delete_confirmation_description": "Калі гэты альбом абагулены, іншыя карыстальнікі больш не змогуць атрымаць да яго доступ.", @@ -489,10 +515,10 @@ "album_remove_user": "Выдаліць карыстальніка?", "album_remove_user_confirmation": "Вы ўпэўнены, што хочаце выдаліць {user}?", "album_search_not_found": "Па вашым запыце не знойдзена альбомаў", - "album_share_no_users": "Здаецца, вы падзяліліся гэтым альбомам з усімі карыстальнікамі, або ў вас няма ніводнага карыстальніка, з якім можна падзяліцца.", + "album_share_no_users": "Здаецца, вы абагулілі гэты альбом з усімі карыстальнікамі, або ў вас няма ніводнага карыстальніка, з якім можна яго абагуліць.", "album_summary": "Зводка альбома", "album_updated": "Альбом абноўлены", - "album_updated_setting_description": "Атрымліваць паведамленне на пошту, калі ў агульным альбоме з’яўляюцца новыя аб’екты", + "album_updated_setting_description": "Атрымліваць паведамленне на электронную пошту, калі ў абагуленым альбоме з’яўляюцца новыя аб’екты", "album_upload_assets": "Запампаваць аб’екты з камп’ютара і дадаць у альбом", "album_viewer_appbar_share_err_delete": "Не ўдалося выдаліць альбом", "album_viewer_page_share_add_users": "Дадаць карыстальнікаў", @@ -514,8 +540,8 @@ "allowed": "Дазволена", "alt_text_qr_code": "Відарыс QR-кода", "always_keep": "Заўсёды пакідаць", - "always_keep_photos_hint": "«Вызваліць месца» захавае ўсе фота на гэтай прыладзе.", - "always_keep_videos_hint": "«Вызваліць месца» захавае ўсе відэа на гэтай прыладзе.", + "always_keep_photos_hint": "«Вызваліць месца» пакіне ўсе фота на гэтай прыладзе.", + "always_keep_videos_hint": "«Вызваліць месца» пакіне ўсе відэа на гэтай прыладзе.", "api_key": "Ключ API", "api_key_description": "Гэта значэнне будзе паказана толькі адзін раз. Скапіруйце яго перад закрыццём акна.", "api_key_empty": "Назва ключа API не павінна быць пустой", @@ -604,7 +630,7 @@ "backup_controller_page_backup": "Рэзервовае капіраванне", "backup_controller_page_backup_selected": "Выбрана: ", "backup_controller_page_backup_sub": "Рэзервовыя копіі фота і відэа", - "backup_controller_page_excluded": "Выключана: ", + "backup_controller_page_excluded": "Выключаны: ", "backup_controller_page_none_selected": "Нічога не выбрана", "backup_controller_page_remainder": "Засталося", "backup_controller_page_remainder_sub": "Фота і відэа з выбару, якія засталіся для рэзервовага капіравання", @@ -617,11 +643,12 @@ "backup_options": "Параметры рэзервовага капіравання", "backup_settings_subtitle": "Кіраванне наладамі запампоўвання", "backward": "Назад", + "battery_optimization_backup_reliability": "Адключэнне аптымізацыі батарэі можа павысіць надзейнасць фонавага рэзервовага капіравання", "biometric_auth_enabled": "Біяметрычная аўтэнтыфікацыя ўключана", "biometric_locked_out": "У вас няма доступу да біяметрычнай аўтэнтыфікацыі", "biometric_no_options": "Біяметрычныя варыянты недаступныя", "biometric_not_available": "Біяметрычная аўтэнтыфікацыя недаступная на гэтай прыладзе", - "birthdate_set_description": "Дата нараджэння выкарыстоўваецца для вылічэння ўзросту гэтай асобы на момант фота.", + "birthdate_set_description": "Дата нараджэння выкарыстоўваецца для вылічэння ўзросту гэтага чалавека на момант фота.", "blurred_background": "Размыты фон", "browse_templates": "Праглядзець шаблоны", "bugs_and_feature_requests": "Памылкі і запыты на функцыі", @@ -632,13 +659,13 @@ "bulk_trash_duplicates_confirmation": "Сапраўды масава перамясціць у сметніцу {count, plural, one {# дубліраваны аб’ект} few {# дубліраваныя аб’екты} many {# дубліраваных аб’ектаў} other {# дубліраваных аб’ектаў}}? У кожнай групе будзе захаваны самы вялікі аб’ект, а ўсе іншыя дублікаты будуць перамешчаны ў сметніцу.", "buy": "Купіць Immich", "camera": "Камера", - "camera_brand": "Брэнд камеры", + "camera_brand": "Марка камеры", "camera_model": "Мадэль камеры", "cancel": "Скасаваць", "cancel_search": "Скасаваць пошук", "canceled": "Скасавана", "canceling": "Скасоўванне", - "cannot_merge_people": "Немагчыма аб’яднаць асоб", + "cannot_merge_people": "Немагчыма аб’яднаць людзей", "cannot_undo_this_action": "Гэта дзеянне немагчыма адрабіць!", "cannot_update_the_description": "Немагчыма абнавіць апісанне", "cast": "Кастынг", @@ -667,7 +694,7 @@ "check_logs": "Праверыць журналы", "checksum": "Кантрольная сума", "choose": "Выбраць", - "choose_matching_people_to_merge": "Выберыце сумяшчальныя асобы для аб’яднання", + "choose_matching_people_to_merge": "Выберыце людзей для аб’яднання", "city": "Горад", "cleanup_confirm_description": "Immich знайшоў {count} аб’ектаў (створаных да {date}), якія бяспечна захаваныя ў рэзерв на серверы. Выдаліць лакальныя копіі з гэтай прылады?", "cleanup_confirm_prompt_title": "Выдаліць з гэтай прылады?", @@ -675,15 +702,16 @@ "cleanup_deleting": "Перамяшчэнне ў сметніцу...", "cleanup_found_assets": "Знойдзена {count} аб’ектаў з рэзервовай копіяй", "cleanup_found_assets_with_size": "Знойдзена {count} аб’ектаў з рэзервовай копіяй ({size})", - "cleanup_icloud_shared_albums_excluded": "Агульныя альбомы iCloud выключаныя са сканавання", + "cleanup_icloud_shared_albums_excluded": "Абагуленыя альбомы iCloud выключаны са сканіравання", "cleanup_no_assets_found": "Не знойдзена аб’ектаў, якія адпавядаюць крытэрыям вышэй. «Вызваліць месца» можа выдаліць толькі аб’екты, якія ўжо ёсць у рэзервовай копіі на серверы", "cleanup_preview_title": "Аб’екты для выдалення ({count})", "cleanup_step3_description": "Сканіраваць аб’екты з рэзервовай копіяй, якія адпавядаюць вашым наладам даты і захавання.", "cleanup_step4_summary": "{count} аб’ектаў (створаных да {date}) для выдалення з вашай лакальнай прылады. Фота застануцца даступнымі ў праграме Immich.", - "cleanup_trash_hint": "Каб поўнасцю вызваліць месца ў сховішчы, адкрыйце сістэмную галерэю і ачысціце сметніцу", + "cleanup_trash_hint": "Каб цалкам вызваліць прастору сховішча, адкрыйце сістэмную галерэю і ачысціце сметніцу", "clear": "Ачысціць", "clear_all": "Ачысціць усё", - "clear_all_recent_searches": "Ачысціць усе апошнія пошукі", + "clear_all_recent_searches": "Ачысціць усе нядаўнія пошукавыя запыты", + "clear_failed_count": "Не ўдалося ачысціць ({count})", "clear_file_cache": "Ачысціць кэш файлаў", "clear_message": "Ачысціць паведамленне", "clear_value": "Ачысціць значэнне", @@ -700,14 +728,14 @@ "collapse_all": "Згарнуць усё", "color": "Колер", "command": "Каманда", - "command_palette_prompt": "Хутка знайдзіце старонкі, дзеянні або каманды", + "command_palette_prompt": "Хуткі пошук старонак, дзеянняў і каманд", "command_palette_to_close": "каб закрыць", "command_palette_to_navigate": "каб увайсці", "command_palette_to_select": "каб выбраць", "command_palette_to_show_all": "каб паказаць усё", "comment_deleted": "Каментарый выдалены", "comment_options": "Дзеянні з каментарыем", - "comments_and_likes": "Каментарыі і лайкі", + "comments_and_likes": "Каментарыі і пазнакі «мне падабаецца»", "comments_are_disabled": "Каментарыі адключаны", "common_create_new_album": "Стварыць новы альбом", "completed": "Выканана", @@ -715,8 +743,8 @@ "confirm": "Пацвердзіць", "confirm_admin_password": "Пацвердзіце пароль адміністратара", "confirm_delete_face": "Вы ўпэўнены, што хочаце выдаліць твар {name} з аб’екта?", - "confirm_delete_shared_link": "Вы ўпэўнены, што хочаце выдаліць гэтую агульную спасылку?", - "confirm_keep_this_delete_others": "Усе іншыя аб’екты ў наборы будуць выдалены, акрамя гэтага. Вы ўпэўнены, што хочаце працягнуць?", + "confirm_delete_shared_link": "Вы ўпэўнены, што хочаце выдаліць гэту абагуленую спасылку?", + "confirm_keep_this_delete_others": "Усе іншыя аб’екты ў стосе, акрамя гэтага, будуць выдалены. Вы ўпэўнены, што хочаце працягнуць?", "confirm_new_pin_code": "Пацвердзіце новы PIN-код", "confirm_password": "Пацвердзіце пароль", "confirm_tag_face": "Хочаце пазначыць гэты твар як {name}?", @@ -741,32 +769,31 @@ "copy_password": "Капіраваць пароль", "copy_to_clipboard": "Капіраваць у буфер абмену", "country": "Краіна", - "cover": "Вокладка", "covers": "Вокладкі", "create": "Стварыць", "create_album": "Стварыць альбом", "create_album_page_untitled": "Без назвы", "create_api_key": "Стварыць ключ API", - "create_first_workflow": "Стварыць першы працоўны працэс", + "create_first_workflow": "Стварыце першы сцэнарый", "create_library": "Стварыць бібліятэку", "create_link": "Стварыць спасылку", "create_link_to_share": "Стварыць спасылку для абагульвання", "create_link_to_share_description": "Дазволіць усім, хто мае спасылку, бачыць выбраныя фота", "create_new": "СТВАРЫЦЬ", - "create_new_person": "Стварыць новую асобу", - "create_new_person_hint": "Прызначыць выбраныя аб’екты новай асобе", - "create_new_user": "Стварыць новага карыстальніка", - "create_person": "Стварыць асобу", - "create_person_subtitle": "Дадайце імя да выбранага твару, каб стварыць і пазначыць новую асобу", + "create_new_person": "Стварыць новага чалавека", + "create_new_person_hint": "Прызначыць выбраныя аб’екты новаму чалавеку", + "create_new_user": "Стварэнне новага карыстальніка", + "create_person": "Стварыць чалавека", + "create_person_subtitle": "Дадайце імя да выбранага твару, каб стварыць і пазначыць новага чалавека", "create_shared_album_page_share_add_assets": "ДАДАЦЬ АБ’ЕКТЫ", "create_shared_album_page_share_select_photos": "Выбраць фота", - "create_shared_link": "Стварыць агульную спасылку", + "create_shared_link": "Стварыць абагуленую спасылку", "create_tag": "Стварыць тэг", - "create_tag_description": "Стварыць новы тэг. Для ўкладзеных тэгаў увядзіце поўны шлях тэга з касой рысай.", + "create_tag_description": "Стварэнне новага тэга. Для ўкладзеных тэгаў увядзіце поўны шлях тэга з касой рысай.", "create_user": "Стварыць карыстальніка", - "create_workflow": "Стварыць працоўны працэс", + "create_workflow": "Стварыць сцэнарый", "created": "Створаны", - "created_at": "Створана", + "created_at": "Створаны", "creating_linked_albums": "Стварэнне звязаных альбомаў…", "crop": "Абрэзка", "crop_aspect_ratio_free": "Свабодная", @@ -778,7 +805,6 @@ "custom_date": "Карыстальніцкая дата", "custom_locale": "Карыстальніцкая лакаль", "custom_locale_description": "Фармаціраванне дат, часу і лікаў паводле выбранай мовы і рэгіёна", - "custom_url": "Карыстальніцкі URL-адрас", "cutoff_date_description": "Пакінуць фота за апошнія…", "cutoff_day": "{count, plural, one {дзень} few {дні} many {дзён} other {дня}}", "cutoff_year": "{count, plural, one {год} few {гады} many {гадоў} other {года}}", @@ -793,7 +819,9 @@ "date_range": "Дыяпазон дат", "day": "Дзень", "days": "Дні", - "deduplicate_all": "Дэдупліраваць усё", + "deduplicate_all": "Выдаліць усе дублікаты", + "default_quality_subtitle": "Якасць, якая будзе выкарыстоўваецца пры націсканні на кнопку «Абагуліць». Утрымлівайце кнопку «Падзяліцца», каб выбіраць якасць кожны раз.", + "default_share_quality": "Прадвызначаная якасць пры абагульванні", "delete": "Выдаліць", "delete_action_confirmation_message": "Вы ўпэўнены, што хочаце выдаліць гэты аб’ект? Гэта дзеянне перамесціць аб’ект у сметніцу сервера і запытае, ці хочаце вы выдаліць яго лакальна", "delete_action_prompt": "{count} выдалена", @@ -814,20 +842,20 @@ "delete_others": "Выдаліць іншыя", "delete_permanently": "Выдаліць назаўжды", "delete_permanently_action_prompt": "{count} выдалена незваротна", - "delete_shared_link": "Выдаліць агульную спасылку", - "delete_shared_link_dialog_title": "Выдаліць агульную спасылку", + "delete_shared_link": "Выдаліць абагуленую спасылку", + "delete_shared_link_dialog_title": "Выдаліць абагуленую спасылку", "delete_tag": "Выдаліць тэг", "delete_tag_confirmation_prompt": "Вы ўпэўнены, што хочаце выдаліць тэг {tagName}?", "delete_user": "Выдаліць карыстальніка", - "deleted_shared_link": "Агульная спасылка выдалена", + "deleted_shared_link": "Абагуленая спасылка выдалена", "description": "Апісанне", "deselect_all": "Скасаваць выбар усіх", "details": "Падрабязнасці", "direction": "Кірунак", "disable": "Адключыць", - "disabled": "Адключана", + "disabled": "Адключаны", "discord": "Discord", - "discover": "Адкрыць", + "discover": "Выявіць", "discovered_devices": "Знойдзеныя прылады", "dismiss_all_errors": "Адхіліць усе памылкі", "display_options": "Параметры адлюстравання", @@ -841,7 +869,7 @@ "download_canceled": "Спампоўванне скасавана", "download_complete": "Спампоўванне завершана", "download_enqueue": "Спампоўванне дададзена ў чаргу", - "download_failed": "Спампоўванне не выканалася", + "download_failed": "Не ўдалося спампаваць", "download_finished": "Спампоўванне завершана", "download_include_embedded_motion_videos": "Убудаваныя відэа", "download_include_embedded_motion_videos_description": "Уключаць відэа, убудаваныя ў рухомыя фота, як асобны файл", @@ -857,6 +885,7 @@ "downloading_media": "Спампоўванне медыя", "drag_to_reorder": "Перацягніце, каб змяніць парадак", "drop_files_to_upload": "Перацягніце файлы куды заўгодна для запампоўвання", + "duplicate_workflow": "Дубляваць сцэнарый", "duplicates": "Дублікаты", "duplicates_description": "Вырашыце кожную групу, пазначыўшы, якія з’яўляюцца дублікатамі, калі такія ёсць.", "duration": "Працягласць", @@ -881,7 +910,7 @@ "edit_tag": "Рэдагаваць тэг", "edit_title": "Рэдагаваць загаловак", "edit_user": "Рэдагаваць карыстальніка", - "edit_workflow": "Рэдагаваць працоўны працэс", + "edit_workflow": "Рэдагаваць сцэнарый", "editor": "Рэдактар", "editor_discard_edits_confirm": "Адхіліць праўкі", "editor_discard_edits_prompt": "У вас ёсць незахаваныя праўкі. Вы ўпэўнены, што хочаце іх адхіліць?", @@ -895,7 +924,7 @@ "editor_orientation": "Арыентацыя", "editor_reset_all_changes": "Скінуць змяненні", "editor_rotate_left": "Павярнуць на 90° супраць гадзіннікавай стрэлкі", - "editor_rotate_right": "Павярнуць на 90° па гадзіннікавай стрэлцы", + "editor_rotate_right": "Павярнуць на 90° па ходу гадзіннікавай стрэлкі", "email": "Электронная пошта", "email_notifications": "Апавяшчэнні па электроннай пошце", "empty_folder": "Гэтая папка пустая", @@ -917,7 +946,7 @@ "error_loading_partners": "Памылка пры загрузцы партнёраў: {error}", "error_retrieving_asset_information": "Памылка пры атрыманні інфармацыі пра аб’ект", "error_saving_image": "Памылка: {error}", - "error_tag_face_bounding_box": "Памылка пазначэння твару — немагчыма атрымаць каардынаты абмежавальнай рамкі", + "error_tag_face_bounding_box": "Памылка пазначэння твару — немагчыма атрымаць каардынаты рамкі", "error_title": "Памылка — нешта пайшло не так", "error_while_navigating": "Памылка пры пераходзе да аб’екта", "errors": { @@ -933,15 +962,15 @@ "cant_search_places": "Немагчыма знайсці месцы", "error_adding_assets_to_album": "Памылка пры дадаванні аб’ектаў у альбом", "error_adding_users_to_album": "Памылка пры дадаванні карыстальнікаў у альбом", - "error_deleting_shared_user": "Памылка пры выдаленні карыстальніка з агульнага доступу", + "error_deleting_shared_user": "Памылка пры выдаленні карыстальніка з агульным доступам", "error_downloading": "Памылка пры спампоўванні {filename}", "error_hiding_buy_button": "Памылка пры схаванні кнопкі куплі", - "error_removing_assets_from_album": "Памылка пры выдаленні аб’ектаў з альбома, праверце кансоль для падрабязнасцей", + "error_removing_assets_from_album": "Памылка пры выдаленні аб’ектаў з альбома, падрабязнасці ў кансолі", "error_selecting_all_assets": "Памылка пры выбары ўсіх аб’ектаў", "exclusion_pattern_already_exists": "Гэты шаблон выключэння ўжо існуе.", "failed_to_create_album": "Не ўдалося стварыць альбом", - "failed_to_create_shared_link": "Не ўдалося стварыць агульную спасылку", - "failed_to_edit_shared_link": "Не ўдалося адрэдагаваць агульную спасылку", + "failed_to_create_shared_link": "Не ўдалося стварыць абагуленую спасылку", + "failed_to_edit_shared_link": "Не ўдалося адрэдагаваць абагуленую спасылку", "failed_to_get_people": "Не ўдалося атрымаць людзей", "failed_to_keep_this_delete_others": "Не ўдалося пакінуць гэты аб’ект і выдаліць астатнія", "failed_to_load_asset": "Не ўдалося загрузіць аб’ект", @@ -950,8 +979,9 @@ "failed_to_load_people": "Не ўдалося загрузіць людзей", "failed_to_remove_product_key": "Не ўдалося выдаліць ключ прадукту", "failed_to_reset_pin_code": "Не ўдалося скінуць PIN-код", - "failed_to_stack_assets": "Не ўдалося аб’яднаць аб’екты ў набор", - "failed_to_unstack_assets": "Не ўдалося раздзяліць набор аб’ектаў", + "failed_to_stack_assets": "Не ўдалося стварыць з аб’ектаў стос", + "failed_to_tag_assets": "Не ўдалося дадаць тэг да аб’ектаў", + "failed_to_unstack_assets": "Не ўдалося раздзяліць стос аб’ектаў", "failed_to_update_notification_status": "Не ўдалося абнавіць статус апавяшчэння", "incorrect_email_or_password": "Няправільны адрас электроннай пошты або пароль", "library_folder_already_exists": "Гэты шлях імпарту ўжо існуе.", @@ -961,7 +991,7 @@ "quota_higher_than_disk_size": "Вы задаліалі квоту, большую за памер дыска", "something_went_wrong": "Нешта пайшло не так", "unable_to_add_album_users": "Немагчыма дадаць карыстальнікаў у альбом", - "unable_to_add_assets_to_shared_link": "Немагчыма дадаць аб’екты ў агульную спасылку", + "unable_to_add_assets_to_shared_link": "Немагчыма дадаць аб’екты ў абагуленую спасылку", "unable_to_add_comment": "Немагчыма дадаць каментарый", "unable_to_add_exclusion_pattern": "Немагчыма дадаць шаблон выключэння", "unable_to_add_partners": "Немагчыма дадаць партнёраў", @@ -974,11 +1004,11 @@ "unable_to_change_favorite": "Немагчыма змяніць абранае для аб’екта", "unable_to_change_location": "Немагчыма змяніць месцазнаходжанне", "unable_to_change_password": "Немагчыма змяніць пароль", - "unable_to_change_visibility": "Немагчыма змяніць бачнасць для {count, plural, one {# асобы} few {# асоб} many {# асоб} other {# асобы}}", + "unable_to_change_visibility": "Немагчыма змяніць бачнасць для {count, plural, one {# чалавека} few {# чалавек} many {# чалавек} other {# чалавека}}", "unable_to_complete_oauth_login": "Немагчыма завяршыць уваход праз OAuth", "unable_to_connect": "Немагчыма падключыцца", "unable_to_copy_to_clipboard": "Немагчыма скапіраваць у буфер абмену, пераканайцеся, што старонка адкрыта праз https", - "unable_to_create": "Немагчыма стварыць працоўны працэс", + "unable_to_create": "Немагчыма стварыць сцэнарый", "unable_to_create_admin_account": "Немагчыма стварыць уліковы запіс адміністратара", "unable_to_create_api_key": "Немагчыма стварыць новы ключ API", "unable_to_create_library": "Немагчыма стварыць бібліятэку", @@ -987,25 +1017,25 @@ "unable_to_delete_asset": "Немагчыма выдаліць аб’ект", "unable_to_delete_assets": "Памылка пры выдаленні аб’ектаў", "unable_to_delete_exclusion_pattern": "Немагчыма выдаліць шаблон выключэння", - "unable_to_delete_shared_link": "Немагчыма выдаліць агульную спасылку", + "unable_to_delete_shared_link": "Немагчыма выдаліць абагуленую спасылку", "unable_to_delete_user": "Немагчыма выдаліць карыстальніка", - "unable_to_delete_workflow": "Немагчыма выдаліць працоўны працэс", + "unable_to_delete_workflow": "Немагчыма выдаліць сцэнарый", "unable_to_download_files": "Немагчыма спампаваць файлы", "unable_to_edit_exclusion_pattern": "Немагчыма адрэдагаваць шаблон выключэння", "unable_to_empty_trash": "Немагчыма ачысціць сметніцу", "unable_to_enter_fullscreen": "Немагчыма перайсці ў поўнаэкранны рэжым", "unable_to_exit_fullscreen": "Немагчыма выйсці з поўнаэкраннага рэжыму", "unable_to_get_comments_number": "Немагчыма атрымаць колькасць каментарыяў", - "unable_to_get_shared_link": "Не ўдалося атрымаць агульную спасылку", - "unable_to_hide_person": "Немагчыма схаваць асобу", + "unable_to_get_shared_link": "Не ўдалося атрымаць абагуленую спасылку", + "unable_to_hide_person": "Немагчыма схаваць чалавека", "unable_to_link_motion_video": "Немагчыма звязаць рухомае відэа", "unable_to_link_oauth_account": "Немагчыма звязаць уліковы запіс OAuth", "unable_to_log_out_all_devices": "Немагчыма выйсці з усіх прылад", "unable_to_log_out_device": "Немагчыма выйсці з прылады", "unable_to_login_with_oauth": "Немагчыма ўвайсці праз OAuth", "unable_to_play_video": "Немагчыма прайграць відэа", - "unable_to_reassign_assets_existing_person": "Немагчыма пераназначыць аб’екты {name, select, null {існуючай асобе} other {{name}}}", - "unable_to_reassign_assets_new_person": "Немагчыма пераназначыць аб’екты новай асобе", + "unable_to_reassign_assets_existing_person": "Немагчыма пераназначыць аб’екты {name, select, null {існуючаму чалавеку} other {{name}}}", + "unable_to_reassign_assets_new_person": "Немагчыма пераназначыць аб’екты новаму чалавеку", "unable_to_refresh_user": "Немагчыма абнавіць карыстальніка", "unable_to_remove_album_users": "Немагчыма выдаліць карыстальнікаў з альбома", "unable_to_remove_api_key": "Немагчыма выдаліць ключ API", @@ -1025,9 +1055,9 @@ "unable_to_save_name": "Немагчыма захаваць імя", "unable_to_save_profile": "Немагчыма захаваць профіль", "unable_to_save_settings": "Немагчыма захаваць налады", - "unable_to_scan_libraries": "Немагчыма прасканаваць бібліятэкі", - "unable_to_scan_library": "Немагчыма прасканаваць бібліятэку", - "unable_to_set_feature_photo": "Немагчыма задаць асноўнае фота", + "unable_to_scan_libraries": "Немагчыма прасканіраваць бібліятэкі", + "unable_to_scan_library": "Немагчыма прасканіраваць бібліятэку", + "unable_to_set_feature_photo": "Немагчыма задаць галоўнае фота", "unable_to_set_profile_picture": "Немагчыма задаць аватар профілю", "unable_to_set_rating": "Немагчыма задаць рэйтынг", "unable_to_submit_job": "Немагчыма адправіць заданне", @@ -1035,13 +1065,13 @@ "unable_to_unlink_account": "Немагчыма адвязаць уліковы запіс", "unable_to_unlink_motion_video": "Немагчыма адвязаць рухомае відэа", "unable_to_update_album_cover": "Немагчыма абнавіць вокладку альбома", - "unable_to_update_album_info": "Немагчыма абнавіць інфармацыю альбома", + "unable_to_update_album_info": "Немагчыма абнавіць інфармацыю пра альбом", "unable_to_update_library": "Немагчыма абнавіць бібліятэку", "unable_to_update_location": "Немагчыма абнавіць месцазнаходжанне", "unable_to_update_settings": "Немагчыма абнавіць налады", "unable_to_update_timeline_display_status": "Немагчыма абнавіць статус адлюстравання хронікі", "unable_to_update_user": "Немагчыма абнавіць карыстальніка", - "unable_to_update_workflow": "Немагчыма абнавіць працоўны працэс", + "unable_to_update_workflow": "Немагчыма абнавіць сцэнарый", "unable_to_upload_file": "Немагчыма запампаваць файл" }, "errors_text": "Памылкі", @@ -1057,27 +1087,30 @@ "expired": "Тэрмін мінуў", "expires_date": "Тэрмін мінае {date}", "explore": "Агляд", - "explorer": "Аглядальнік", + "explorer": "Агляд папак", "export": "Экспарт", "export_as_json": "Экспартаваць як JSON", "export_database": "Экспартаваць базу даных", "export_database_description": "Экспартаваць базу даных SQLite", + "exposure_time": "Вытрымка", "extension": "Пашырэнне", "external": "Знешні", "external_libraries": "Знешнія бібліятэкі", "external_network": "Знешняя сетка", "external_network_sheet_info": "Калі прылада не падключана да пераважнай сеткі Wi-Fi, праграма падключыцца да сервера праз першы з пералічаных ніжэй URL-адрасоў, які будзе даступны, пачынаючы зверху ўніз", + "f_number": "Дыяфрагма", "face_unassigned": "Не прызначаны", "failed": "Не выканалася", "failed_count": "Не выканалася: {count}", "failed_to_authenticate": "Не ўдалося прайсці аўтэнтыфікацыю", + "failed_to_delete_file": "Не ўдалося выдаліць файл", "failed_to_load_assets": "Не ўдалося загрузіць аб’екты", "failed_to_load_folder": "Не ўдалося загрузіць папку", "favorite": "У абраным", "favorite_action_prompt": "{count} дададзена ў абранае", "favorite_or_unfavorite_photo": "Дадаць або выдаліць фота з абранага", "favorites": "Абраныя", - "feature_photo_updated": "Асноўнае фота абноўлена", + "feature_photo_updated": "Галоўнае фота абноўлена", "features": "Магчымасці", "features_setting_description": "Кіраванне магчымасцямі праграмы", "file_name_or_extension": "Назва файла або пашырэнне", @@ -1086,12 +1119,13 @@ "filename": "Назва файла", "filetype": "Тып файла", "filter": "Фільтр", - "filter_people": "Фільтр людзей", - "filter_places": "Фільтр месцаў", - "filter_tags": "Фільтр тэгаў", + "filter_people": "Фільтр па людзях", + "filter_places": "Фільтр па месцах", + "filter_tags": "Фільтр па тэгах", "filters": "Фільтры", "first": "Першы", "fix_incorrect_match": "Выправіць няправільнае супастаўленне", + "focal_length": "Фокусная адлегласць", "folder": "Папка", "folder_not_found": "Папка не знойдзена", "folders": "Папкі", @@ -1099,16 +1133,16 @@ "forgot_pin_code_question": "Забылі PIN-код?", "forward": "Наперад", "free_up_space": "Вызваліць месца", - "free_up_space_description": "Перанясіце фота і відэа з рэзервовай копіяй у сметніцу прылады, каб вызваліць месца. Копіі на серверы застануцца ў бяспецы.", + "free_up_space_description": "Перанясіце фота і відэа, якія ёсць у рэзервовай копіі, у сметніцу прылады, каб вызваліць месца. Копіі на серверы застануцца ў бяспецы.", "free_up_space_settings_subtitle": "Вызваліць сховішча прылады", "full_path": "Поўны шлях: {path}", "full_path_or_folder": "Поўны шлях або папка", "gcast_enabled": "Google Cast", - "gcast_enabled_description": "Гэтая функцыя загружае знешнія рэсурсы ад Google, каб працаваць.", + "gcast_enabled_description": "Гэтая функцыя загружае для сваёй працы знешнія рэсурсы ад Google.", "general": "Агульныя", "geolocation_instruction_location": "Націсніце на аб’ект з GPS-каардынатамі, каб скарыстаць яго месцазнаходжанне, або выберыце месца наўпрост з карты", "get_help": "Атрымаць дапамогу", - "get_people_error": "Памылка атрымання людзей", + "get_people_error": "Памылка пры атрыманні людзей", "get_wifiname_error": "Не ўдалося атрымаць назву Wi-Fi. Пераканайцеся, што вы далі неабходныя дазволы і падключаны да сеткі Wi-Fi", "getting_started": "Пачатак працы", "go_back": "Назад", @@ -1147,7 +1181,7 @@ "host": "Хост", "hour": "Гадзіна", "hours": "Гадзіны", - "id": "ID", + "id": "Ідэнтыфікатар", "idle": "Прастой", "image": "Відарыс", "image_alt_text_date": "{isVideo, select, true {Відэа} other {Фота}} зробленае {date}", @@ -1169,11 +1203,12 @@ "in_year": "У {year}", "in_year_selector": "У", "include_archived": "Уключыць архіваваныя", - "include_shared_albums": "Уключыць агульныя альбомы", - "include_shared_partner_assets": "Уключыць агульныя аб’екты партнёра", + "include_shared_albums": "Уключыць абагуленыя альбомы", + "include_shared_partner_assets": "Уключыць абагуленыя аб’екты партнёра", "individual_share": "Асобнае абагульванне", "individual_shares": "Асобныя абагульванні", "info": "Інфармацыя", + "integrity_checks": "Праверкі цэласнасці", "interval": { "day_at_onepm": "Кожны дзень а 13-й гадзіне", "hours": "{hours, plural, one {Кожную гадзіну} few {Кожныя {hours, number} гадзіны} many {Кожныя {hours, number} гадзін} other {Кожныя {hours, number} гадзін}}", @@ -1189,15 +1224,15 @@ "jobs": "Заданні", "keep": "Пакінуць", "keep_albums": "Пакінуць альбомы", - "keep_albums_count": "Захоўваецца {count} {count, plural, one {альбом} few {альбомы} many {альбомаў} other {альбомаў}}", + "keep_albums_count": "Пакідаем {count} {count, plural, one {альбом} few {альбомы} many {альбомаў} other {альбома}}", "keep_all": "Пакінуць усе", - "keep_description": "Выберыце, што застаецца на вашай прыладзе пры вызваленні месца.", - "keep_favorites": "Пакінуць абранае", + "keep_description": "Выберыце, што застанецца на прыладзе пры вызваленні месца.", + "keep_favorites": "Пакінуць абраныя", "keep_on_device": "Пакінуць на прыладзе", "keep_on_device_hint": "Выберыце элементы, якія трэба пакінуць на гэтай прыладзе", - "keep_this_delete_others": "Пакінуць гэта, выдаліць іншыя", - "keeping": "Захоўваецца: {items}", - "kept_this_deleted_others": "Пакінуты гэты аб’ект і выдалена {count, plural, one {# аб’ект} few {# аб’екты} many {# аб’ектаў} other {# аб’ектаў}}", + "keep_this_delete_others": "Пакінуць гэты, выдаліць іншыя", + "keeping": "Пакідаем: {items}", + "kept_this_deleted_others": "Пакінуты гэты аб’ект і {count, plural, one {выдалены # аб’ект} few {выдалены # аб’екты} many {выдалена # аб’ектаў} other {выдалена # аб’екта}}", "keyboard_shortcuts": "Спалучэнні клавіш", "language": "Мова", "language_no_results_subtitle": "Паспрабуйце змяніць пошукавы запыт", @@ -1226,21 +1261,22 @@ "licenses": "Ліцэнзіі", "light": "Светлая", "light_theme": "Пераключыцца на светлую тэму", - "like": "Падабаецца", - "like_deleted": "Адзнака «падабаецца» выдалена", + "like": "Мне падабаецца", + "like_deleted": "Пазнака «мне падабаецца» выдалена", "link": "Спасылка", "link_motion_video": "Звязаць рухомае відэа", - "link_to_docs": "Для больш падрабязнай інфармацыі звярніцеся да дакументацыі.", + "link_to_docs": "Больш падрабязная інфармацыя ў дакументацыі.", "link_to_oauth": "Прывязаць да OAuth", "linked_oauth_account": "Прывязаны ўліковы запіс OAuth", "list": "Спіс", "live": "Жывое", + "load_more": "Загрузіць яшчэ", "loading": "Загрузка", "loading_search_results_failed": "Не атрымалася загрузіць вынікі пошуку", "local": "Лакальны", "local_asset_cast_failed": "Немагчыма транслiраваць аб’ект, які не запампаваны на сервер", "local_assets": "Лакальныя аб’екты", - "local_id": "Лакальны ID", + "local_id": "Лакальны ідэнтыфікатар", "local_media_summary": "Зводка лакальных медыя", "local_network": "Лакальная сетка", "local_network_sheet_info": "Праграма будзе падключацца да сервера праз гэты URL пры выкарыстанні зададзенай сеткі Wi-Fi", @@ -1249,9 +1285,9 @@ "location_permission_content": "Каб карыстацца функцыяй аўтаматычнага пераключэння, Immich патрэбны дазвол на дакладнае месцазнаходжанне, каб чытаць назву бягучай сеткі Wi-Fi", "location_picker_choose_on_map": "Выбраць на карце", "location_picker_latitude_error": "Увядзіце сапраўдную шырату", - "location_picker_latitude_hint": "Увядзіце сюды сваю шырату", + "location_picker_latitude_hint": "Увядзіце шырату", "location_picker_longitude_error": "Увядзіце сапраўдную даўгату", - "location_picker_longitude_hint": "Увядзіце сюды сваю даўгату", + "location_picker_longitude_hint": "Увядзіце даўгату", "lock": "Заблакіраваць", "locked_folder": "Заблакіраваная папка", "log_detail_title": "Падрабязнасці журнала", @@ -1260,7 +1296,7 @@ "logged_in_as": "Вы ўвайшлі як {user}", "logged_out_all_devices": "Выхад з усіх прылад выкананы", "logged_out_device": "Выхад з прылады выкананы", - "login": "Уваход", + "login": "Увайсці", "login_disabled": "Уваход быў адключаны", "login_form_api_exception": "Памылка API. Праверце URL-flhfc сервера і паспрабуйце яшчэ раз.", "login_form_email_hint": "youremail@email.com", @@ -1275,9 +1311,9 @@ "login_form_failed_login": "Памылка ўваходу, праверце URL-адрас сервера, электронную пошту і пароль", "login_form_handshake_exception": "Адбылася памылка ўзаемадзеяння з серверам. Уключыце падтрымку самападпісаных сертыфікатаў у наладах, калі вы карыстаецеся самападпісаным сертыфікатам.", "login_form_password_hint": "пароль", - "login_form_server_empty": "Увядзіце URL-адрас сервера.", - "login_form_server_error": "Не ўдалося падключыцца да сервера.", - "login_has_been_disabled": "Уваход быў адключаны.", + "login_form_server_empty": "Увядзіце URL-адрас сервера", + "login_form_server_error": "Не ўдалося падключыцца да сервера", + "login_has_been_disabled": "Уваход быў адключаны", "login_password_changed_error": "Адбылася памылка пры абнаўленні пароля", "login_password_changed_success": "Пароль паспяхова абноўлены", "logout_all_device_confirmation": "Вы ўпэўнены, што хочаце выйсці з усіх прылад?", @@ -1302,9 +1338,9 @@ "maintenance_restore_library_folder_pass": "даступная для чытання і запісу", "maintenance_restore_library_folder_read_fail": "недаступная для чытання", "maintenance_restore_library_folder_write_fail": "недаступная для запісу", - "maintenance_restore_library_hint_missing_files": "Магчыма, у вас адсутнічаюць важныя файлы", + "maintenance_restore_library_hint_missing_files": "Магчыма, адсутнічаюць важныя файлы", "maintenance_restore_library_hint_regenerate_later": "Вы можаце перастварыць іх пазней у наладах", - "maintenance_restore_library_hint_storage_template_missing_files": "Карыстаецеся шаблонам сховішча? Магчыма, у вас адсутнічаюць файлы", + "maintenance_restore_library_hint_storage_template_missing_files": "Карыстаецеся шаблонам сховішча? Магчыма, адсутнічаюць файлы", "maintenance_restore_library_loading": "Загрузка праверак цэласнасці і эўрыстык…", "maintenance_task_backup": "Стварэнне рэзервовай копіі існуючай базы даных…", "maintenance_task_migrations": "Выкананне міграцыі базы даных…", @@ -1328,6 +1364,7 @@ "map_location_picker_page_use_location": "Выкарыстаць гэта месцазнаходжанне", "map_location_service_disabled_content": "Каб паказваць аб’екты з вашага бягучага месцазнаходжання, трэба ўключыць службу геалакацыі. Жадаеце ўключыць яе зараз?", "map_location_service_disabled_title": "Служба геалакацыі адключана", + "map_marker_for_image": "Маркер на карце для фота, зробленага ў {city}, {country}", "map_marker_with_image": "Маркер на карце з відарысам", "map_no_location_permission_content": "Каб паказваць аб’екты з вашага бягучага месцазнаходжання, патрэбен дазвол на геалакацыю. Дазволіць зараз?", "map_no_location_permission_title": "Адмоўлена ў дазволе на геалакацыю", @@ -1347,12 +1384,12 @@ "matching_assets": "Аб’екты, што супадаюць", "media_chrome": { "auto": "Аўта", - "captions": "Субтытры", + "captions": "Субцітры", "captions_off": "Выкл", - "closed_captions": "схаваныя субтытры", + "closed_captions": "закрытыя субцітры", "decode_error": "Памылка дэкадавання", - "disable_captions": "Адключыць субтытры", - "enable_captions": "Уключыць субтытры", + "disable_captions": "Адключыць субцітры", + "enable_captions": "Уключыць субцітры", "enter_fullscreen_mode": "Уключыць поўнаэкранны рэжым", "exit_fullscreen_mode": "Выйсці з поўнаэкраннага рэжыму", "loop": "Цыкл", @@ -1390,19 +1427,21 @@ "merge": "Аб’яднаць", "merge_people": "Аб’яднаць людзей", "merge_people_limit": "Можна аб’яднаць не больш за 5 твараў адначасова", - "merge_people_prompt": "Жадаеце аб’яднаць гэтых людзей? Гэтае дзеянне незваротнае.", + "merge_people_prompt": "Хочаце аб’яднаць гэтых людзей? Гэтае дзеянне незваротнае.", "merge_people_successfully": "Людзі паспяхова аб’яднаныя", - "merged_people_count": "Аб’яднана {count, plural, one {# чалавек} few {# чалавекі} many {# чалавек} other {# чалавек}}", + "merged_people_count": "{count, plural, one {Аб’яднаны # чалавек} few {Аб’яднаны # чалавекі} many {Аб’яднана # чалавек} other {Аб’яднана # чалавека}}", + "minFaces": "Мінімальная колькасць твараў", + "minFaces_description": "Мінімальная колькасць распазнаных твараў, неабходная для адлюстравання чалавека", "minimize": "Згарнуць", "minute": "Хвіліна", "minutes": "Хвіліны", "missing": "Адсутныя", "mobile_app": "Мабільная праграма", - "mobile_app_download_onboarding_note": "Спампуйце суправаджальную мабільную праграму з дапамогай наступных варыянтаў", + "mobile_app_download_onboarding_note": "Спампуйце мабільную праграму з дапамогай наступных варыянтаў", "model": "Мадэль", "modify_date": "Дата змянення", "month": "Месяц", - "more": "Болей", + "more": "Больш", "motion": "Рух", "move": "Перамясціць", "move_off_locked_folder": "Перамясціць з заблакіраванай папкі", @@ -1412,7 +1451,7 @@ "move_to_locked_folder": "Перамясціць у заблакіраваную папку", "move_to_locked_folder_confirmation": "Гэтыя фота і відэа будуць выдалены з усіх альбомаў і застануцца даступнымі для прагляду толькі з заблакіраванай папкі", "moved_to_trash": "Перамешчана ў сметніцу", - "mute_memories": "Адключыць успаміны", + "mute_memories": "Адключыць гук успамінаў", "my_albums": "Мае альбомы", "my_immich_description": "Скапіраваць бягучую старонку як спасылку My Immich", "my_immich_title": "Спасылка My Immich", @@ -1430,6 +1469,7 @@ "never": "Ніколі", "new_album": "Новы альбом", "new_api_key": "Новы ключ API", + "new_feature": "Новая функцыя", "new_password": "Новы пароль", "new_person": "Новы чалавек", "new_pin_code": "Новы PIN-код", @@ -1473,9 +1513,14 @@ "not_available": "Н/Д", "not_in_any_album": "Ні ў якім альбоме", "not_selected": "Не выбрана", - "notes": "Нататкі", + "not_set": "Не зададзена", + "notes": "Заўвагі", "nothing_here_yet": "Тут пакуль нічога няма", - "notification_permission_dialog_content": "Каб уключыць апавяшчэнні, перайдзіце ў Налады і дазвольце.", + "notification_backup_reliability": "Уключыце апавяшчэнні, каб павысіць надзейнасць рэзервовага капіявання ў фонавым рэжыме", + "notification_enabled_list_tile_content": "Immich выкарыстоўвае апавяшчэнні для рэзервовага капіявання ў фонавым рэжыме. Кіруйце імі ў наладах прылады.", + "notification_enabled_list_tile_open_button": "Адкрыць налады", + "notification_enabled_list_tile_title": "Апавяшчэнні ўключаны", + "notification_permission_dialog_content": "Каб уключыць апавяшчэнні, перайдзіце ў Налады і дайце дазвол.", "notification_permission_list_tile_content": "Дайце дазвол, каб уключыць апавяшчэнні.", "notification_permission_list_tile_enable_button": "Уключыць апавяшчэнні", "notification_permission_list_tile_title": "Дазвол на апавяшчэнні", @@ -1486,6 +1531,8 @@ "obtainium_configurator": "Канфігуратар Obtainium", "obtainium_configurator_instructions": "Выкарыстоўвайце Obtainium, каб усталёўваць і абнаўляць Android-праграму непасрэдна з рэлізаў Immich на GitHub. Стварыце ключ API і абярыце варыянт, каб стварыць спасылку канфігурацыі Obtainium", "ocr": "OCR", + "ocr_body": "Цяпер Immich чытае тэкст на фота, таму вы можаце шукаць іх па тым, што там напісана.", + "ocr_title": "Пошук тэксту на фота", "official_immich_resources": "Афіцыйныя рэсурсы Immich", "offline": "Па-за сеткай", "offset": "Зрух", @@ -1495,8 +1542,8 @@ "onboarding": "Знаёмства", "onboarding_locale_description": "Выберыце прыярытэтную мову. Вы можаце змяніць яе пазней у наладах.", "onboarding_privacy_description": "Наступныя (неабавязковыя) функцыі залежаць ад знешніх сэрвісаў і могуць быць адключаны ў любы час у наладах.", - "onboarding_server_welcome_description": "Давайце наладзім ваш асобнік з некаторымі агульнымі наладамі.", - "onboarding_theme_description": "Абярыце колеравую тэму для вашага асобніка. Вы можаце змяніць яе пазней у наладах.", + "onboarding_server_welcome_description": "Давайце наладзім некаторыя агульныя параметры сервера.", + "onboarding_theme_description": "Выберыце колеравую тэму. Яе можна змяніць пазней у наладах.", "onboarding_user_welcome_description": "Давайце пачнём!", "onboarding_welcome_user": "Вітаем, {user}", "online": "У сетцы", @@ -1504,6 +1551,8 @@ "open": "Адкрыць", "open_calendar": "Адкрыць каляндар", "open_in_browser": "Адкрыць у браўзеры", + "open_in_immich_body": "Задайце Immich як галерэю на Android, каб адкрываць фота непасрэдна з іншых праграм.", + "open_in_immich_title": "Адкрываць фота ў Immich", "open_in_map_view": "Адкрыць на карце", "open_in_openstreetmap": "Адкрыць у OpenStreetMap", "open_the_search_filters": "Адкрыць фільтры пошуку", @@ -1526,7 +1575,7 @@ "partner_can_access_location": "Месцазнаходжанне, дзе былі зробленыя вашы фота", "partner_list_user_photos": "Фота карыстальніка {user}", "partner_page_empty_message": "Вашы фота яшчэ не абагуленыя ні з адным партнёрам.", - "partner_page_no_more_users": "Больш няма карыстальнікаў для дадання", + "partner_page_no_more_users": "Больш няма карыстальнікаў для дадавання", "partner_page_select_partner": "Выберыце партнёра", "partner_page_stop_sharing_content": "{partner} больш не зможа мець доступ да вашых фота.", "partner_sharing": "Абагульванне з партнёрам", @@ -1547,7 +1596,7 @@ "paused": "Прыпынена", "pending": "Чакае", "people": "Людзі", - "people_edits_count": "Адрэдагавана {count, plural, one {# чалавек} few {# чалавекі} many {# чалавек} other {# чалавек}}", + "people_edits_count": "{count, plural, one {Адрэдагаваны # чалавек} few {Адрэдагавана # чалавекі} many {Адрэдагавана # чалавек} other {Адрэдагавана # чалавека}}", "people_feature_description": "Прагляд фота і відэа, згрупаваных па людзях", "permanent_deletion_warning": "Папярэджанне аб канчатковым выдаленні", "permanent_deletion_warning_setting_description": "Паказаць папярэджанне пры канчатковым выдаленні рэсурсаў", @@ -1559,13 +1608,13 @@ "permission": "Дазвол", "permission_empty": "Дазвол не можа быць пустым", "person": "Чалавек", - "person_age_months": "узрост {months, plural, one {# месяц} few {# месяцы} many {# месяцаў} other {# месяцаў}}", - "person_age_year_months": "узрост 1 год, {months, plural, one {# месяц} few {# месяцы} many {# месяцаў} other {# месяцаў}}", - "person_age_years": "узрост {years, plural, one {# год} few {# гады} many {# гадоў} other {# гадоў}}", + "person_age_months": "Узрост {months, plural, one {# месяц} few {# месяцы} many {# месяцаў} other {# месяца}}", + "person_age_year_months": "узрост 1 год, {months, plural, one {# месяц} few {# месяцы} many {# месяцаў} other {# месяца}}", + "person_age_years": "Узрост {years, plural, one {# год} few {# гады} many {# гадоў} other {# года}}", "person_birthdate": "Дата нараджэння: {date}", "person_hidden": "{name}{hidden, select, true { (схаваны)} other {}}", "person_recognized": "Чалавек распазнаны", - "photo_shared_all_users": "Падобна, што вы ўжо абагулілі свае фота з усімі карыстальнікамі або ў вас няма карыстальнікаў для абагульвання.", + "photo_shared_all_users": "Падобна, што вы ўжо абагулілі свае фота з усімі карыстальнікамі або ў вас няма карыстальнікаў, з якімі можна абагульваць.", "photos": "Фота", "photos_and_videos": "Фота і відэа", "photos_from_previous_years": "Фота з мінулых гадоў", @@ -1655,13 +1704,15 @@ "readonly_mode_enabled": "Уключаны рэжым толькі для чытання", "ready_for_upload": "Гатова да запампоўвання", "reassign": "Перапрызначыць", - "reassigned_assets_to_existing_person": "Пераназначана {count, plural, one {# аб’ект} few {# аб’екты} many {# аб’ектаў} other {# аб’ектаў}} {name, select, null {існуючаму чалавеку} other {{name}}}", - "reassigned_assets_to_new_person": "Пераназначана {count, plural, one {# аб’ект} few {# аб’екты} many {# аб’ектаў} other {# аб’ектаў}} новаму чалавеку", - "reassing_hint": "Прыпісаць выбраныя актывы існуючай асобе", + "reassigned_assets_to_existing_person": "{count, plural, one {Пераназначаны # аб’ект} few {Пераназначаны # аб’екты} many {Пераназначана # аб’ектаў} other {Пераназначана # аб’екта}} {name, select, null {існуючаму чалавеку} other {{name}}}", + "reassigned_assets_to_new_person": "{count, plural, one {Пераназначаны # аб’ект} few {Пераназначаны # аб’екты} many {Пераназначана # аб’ектаў} other {Пераназначана # аб’екта}} новаму чалавеку", + "reassing_hint": "Прызначыць выбраныя аб’екты існуючаму чалавеку", "recent": "Нядаўні", "recent_searches": "Нядаўнія пошукі", "recently_added": "Нядаўна дададзена", + "recently_added_description": "Прагляд аб’ектаў, адсартаваны па даце іх запампоўвання ў Immich", "recently_added_page_title": "Нядаўна дададзеныя", + "recently_added_title": "Нядаўна дададзеныя", "recently_taken": "Нядаўна зробленыя", "refresh": "Абнавіць", "refresh_encoded_videos": "Абнавіць закадаваныя відэа", @@ -1757,11 +1808,11 @@ "search_by_full_path_example": "/Ян/Праекты/3D_Друк/2026-07-01 — вы можаце шукаць Праекты, 3D, Друк, 2026 і г.д.", "search_by_ocr": "Пошук па OCR", "search_by_ocr_example": "Латэ", - "search_camera_lens_model": "Пошук мадэлі аб’ектыва...", - "search_camera_make": "Пошук вытворцы камеры...", - "search_camera_model": "Пошук мадэлі камеры...", - "search_city": "Пошук горада...", - "search_country": "Пошук краіны...", + "search_camera_lens_model": "Пошук па мадэлі аб’ектыва...", + "search_camera_make": "Пошук па вытворцы камеры...", + "search_camera_model": "Пошук па мадэлі камеры...", + "search_city": "Пошук па горадзе...", + "search_country": "Пошук па краіне...", "search_filter_apply": "Прымяніць фільтр", "search_filter_camera_title": "Выберыце тып камеры", "search_filter_date": "Дата", @@ -1778,7 +1829,7 @@ "search_filter_star_rating": "Ацэнка зоркамі", "search_filter_tags_title": "Выберыце тэгі", "search_for": "Шукаць", - "search_for_existing_person": "Шукаць існуючага чалавека", + "search_for_existing_person": "Пошук існуючага чалавека", "search_no_more_result": "Больш вынікаў няма", "search_no_people": "Няма людзей", "search_no_people_named": "Няма людзей з імем «{name}»", @@ -1789,7 +1840,7 @@ "search_people": "Пошук людзей", "search_places": "Пошук месцаў", "search_rating": "Пошук па ацэнцы...", - "search_settings": "Налады пошуку", + "search_settings": "Пошук у наладах", "search_state": "Пошук рэгіёна...", "search_tags": "Пошук тэгаў...", "search_timezone": "Пошук часавага пояса...", @@ -1808,14 +1859,15 @@ "select_count": "{count, plural, one {Выбраць #} few {Выбраць #} many {Выбраць #} other {Выбраць #}}", "select_cutoff_date": "Выберыце канчатковую дату", "select_face": "Выбраць твар", - "select_featured_photo": "Выбраць адметнае фота", + "select_featured_photo": "Выбраць галоўнае фота", "select_from_computer": "Выбраць з камп’ютара", "select_keep_all": "Выбраць «пакінуць усё»", "select_new_face": "Выбраць новы твар", "select_people": "Выберыце людзей", - "select_person": "Выберыце асобу", - "select_person_to_tag": "Выберыце асобу для тэгавання", + "select_person": "Выберыце чалавека", + "select_person_to_tag": "Выберыце чалавека для пазначэння", "select_photos": "Выберыце фота", + "select_quality": "Выберыце якасць", "select_trash_all": "Выбраць усё ў сметніцы", "selected": "Выбрана", "selected_count": "{count, plural, other {# выбрана}}", @@ -1835,7 +1887,7 @@ "server_version": "Версія сервера", "set": "Задаць", "set_as_album_cover": "Зрабіць вокладкай альбома", - "set_as_featured_photo": "Зрабіць абраным фота", + "set_as_featured_photo": "Зрабіць галоўным фота", "set_as_profile_picture": "Задаць як аватар профілю", "set_date_of_birth": "Задаць дату нараджэння", "set_profile_picture": "Задаць аватар профілю", @@ -1865,7 +1917,11 @@ "share": "Абагуліць", "share_dialog_preparing": "Падрыхтоўка…", "share_link": "Абагуліць спасылку", - "shared": "Абагулена", + "share_original": "Арыгінал (вялікі памер)", + "share_preview": "Мініяцюра (маленькі памер)", + "share_quality_body": "Націсніце і ўтрымлівайце кнопку «Абагуліць», каб выбраць якасць відарыса перад адпраўкай.", + "share_quality_title": "Выберыце якасць для абагульвання", + "shared": "Абагуленыя", "shared_album_activities_input_disable": "Каментарый адключаны", "shared_album_activity_remove_content": "Вы хочаце выдаліць гэту актыўнасць?", "shared_album_activity_remove_title": "Выдаліць актыўнасць", @@ -1879,16 +1935,18 @@ "shared_link_app_bar_title": "Абагуленыя спасылкі", "shared_link_clipboard_copied_massage": "Скапіравана ў буфер абмену", "shared_link_create_error": "Памылка пры стварэнні абагуленай спасылкі", - "shared_link_custom_url_description": "Доступ да гэтай абагуленай спасылкі праз карыстальніцкі URL", + "shared_link_custom_url_description": "Доступ да гэтай абагуленай спасылкі праз уласны URL-адрас", + "shared_link_custom_url_title": "Уласны URL-адрас", + "shared_link_custom_url_warning": "Папярэджанне: уласны URL-адраса з прамой касой рысай можа паводзіць сябе не так, як вы чакаеце.", "shared_link_edit_description_hint": "Увядзіце апісанне абагульвання", "shared_link_edit_expire_after_option_day": "1 дзень", - "shared_link_edit_expire_after_option_days": "{count} дзён", + "shared_link_edit_expire_after_option_days": "{count} сут", "shared_link_edit_expire_after_option_hour": "1 гадзіна", - "shared_link_edit_expire_after_option_hours": "{count} гадзін", + "shared_link_edit_expire_after_option_hours": "{count} гадз", "shared_link_edit_expire_after_option_minute": "1 хвіліна", - "shared_link_edit_expire_after_option_minutes": "{count} хвілін", - "shared_link_edit_expire_after_option_months": "{count} месяцаў", - "shared_link_edit_expire_after_option_year": "{count} год", + "shared_link_edit_expire_after_option_minutes": "{count} хв", + "shared_link_edit_expire_after_option_months": "{count} мес.", + "shared_link_edit_expire_after_option_year": "{count} г.", "shared_link_edit_password_hint": "Увядзіце пароль абагульвання", "shared_link_edit_submit_button": "Абнавіць спасылку", "shared_link_error_server_url_fetch": "Не ўдалося атрымаць URL-адрас сервера", @@ -1898,7 +1956,7 @@ "shared_link_expires_hours": "Тэрмін дзеяння заканчваецца праз {count} гадз", "shared_link_expires_minute": "Тэрмін дзеяння заканчваецца праз {count} хвіліну", "shared_link_expires_minutes": "Тэрмін дзеяння заканчваецца праз {count} хв", - "shared_link_expires_never": "Заканчваецца ∞", + "shared_link_expires_never": "Ніколі не заканчваецца", "shared_link_expires_second": "Тэрмін дзеяння заканчваецца праз {count} секунду", "shared_link_expires_seconds": "Тэрмін дзеяння заканчваецца праз {count} с", "shared_link_individual_shared": "Асобнае абагульванне", @@ -1909,7 +1967,7 @@ "shared_links": "Абагуленыя спасылкі", "shared_links_description": "Абагульвайце фота і відэа праз спасылку", "shared_photos_and_videos_count": "{assetCount, plural, one {# абагуленае фота і відэа.} few {# абагуленыя фота і відэа.} many {# абагуленых фота і відэа.} other {# абагуленага фота і відэа.}}", - "shared_with_me": "Абагулена са мной", + "shared_with_me": "Абагуленыя са мной", "shared_with_partner": "Абагулена з {partner}", "sharing": "Абагульванне", "sharing_enter_password": "Увядзіце пароль для прагляду гэтай старонкі.", @@ -1929,7 +1987,7 @@ "show_more_fields": "{count, plural, one {Паказаць яшчэ # поле} few {Паказаць яшчэ # поля} many {Паказаць яшчэ # палёў} other {Паказаць яшчэ # поля}}", "show_or_hide_info": "Паказаць або схаваць інфармацыю", "show_password": "Паказаць пароль", - "show_person_options": "Паказаць параметры асобы", + "show_person_options": "Паказаць параметры чалавека", "show_progress_bar": "Паказваць радок прагрэсу", "show_schema": "Паказаць схему", "show_search_options": "Паказаць параметры пошуку", @@ -1946,16 +2004,19 @@ "sign_out": "Выйсці", "sign_up": "Зарэгістравацца", "size": "Памер", + "skip": "Прапусціць", "skip_to_content": "Перайсці да змесціва", "skip_to_folders": "Перайсці да папак", "skip_to_tags": "Перайсці да тэгаў", "slideshow": "Слайд-шоу", + "slideshow_body": "Сядайце зручней і атрымлівайце асалоду ад слайд-шоу на ўвесь экран.", "slideshow_metadata_overlay_mode": "Змесціва накладкі", "slideshow_metadata_overlay_mode_description_only": "Толькі апісанне", "slideshow_metadata_overlay_mode_full": "Поўнае", "slideshow_repeat": "Паўтараць слайд-шоу", "slideshow_repeat_description": "Вяртацца ў пачатак пасля заканчэння слайд-шоу", "slideshow_settings": "Налады слайд-шоу", + "slideshow_title": "Слайд-шоу", "sort_albums_by": "Сартаваць альбомы па…", "sort_created": "Даце стварэння", "sort_items": "Колькасці элементаў", @@ -1963,18 +2024,18 @@ "sort_oldest": "Найстарэйшым фота", "sort_people_by_similarity": "Сартаваць людзей па падабенстве", "sort_recent": "Самым нядаўнім фота", - "sort_title": "Загаловак", + "sort_title": "Загалоўку", "source": "Крыніца", - "stack": "Стэк", - "stack_action_prompt": "{count} складзена ў стэк", - "stack_duplicates": "Скласці дублікаты ў стэк", - "stack_selected_photos": "Скласці выбраныя фота ў стэк", - "stacked_assets_count": "Складзена ў стэк {count, plural, one {# аб’ект} few {# аб’екты} many {# аб’ектаў} other {# аб’ектаў}}", + "stack": "Стос", + "stack_action_prompt": "{count} складзена ў стос", + "stack_duplicates": "Скласці дублікаты ў стос", + "stack_selected_photos": "Скласці выбраныя фота ў стос", + "stacked_assets_count": "{count, plural, one {# аб’ект складзены} few {# аб’екты складзены} many {# аб’ектаў складзена} other {# аб’екта складзена}} ў стос", "stacktrace": "Трасіроўка стэка", "start": "Пачаць", "start_date": "Дата пачатку", "start_date_before_end_date": "Дата пачатку павінна быць ранейшай за дату заканчэння", - "state": "Вобласць", + "state": "Рэгіён", "status": "Стан", "step_delete": "Выдаліць крок", "step_delete_confirm": "Вы ўпэўнены, што хочаце выдаліць гэты крок?", @@ -1989,7 +2050,7 @@ "storage_quota": "Квота сховішча", "storage_usage": "Выкарыстана {used} з {available}", "submit": "Адправіць", - "success": "Поспех", + "success": "Гатова", "suggestions": "Прапановы", "sunrise_on_the_beach": "Світанак на пляжы", "support": "Падтрымка", @@ -2007,11 +2068,11 @@ "system_theme": "Сістэмная тэма", "system_theme_command_description": "Выкарыстоўваць сістэмную тэму ({value})", "tag": "Тэг", - "tag_assets": "Тэгаваць аб’екты", + "tag_assets": "Дадаць тэгі", "tag_created": "Створаны тэг: {tag}", - "tag_face": "Тэгаваць твар", + "tag_face": "Пазначыць твар", "tag_feature_description": "Прагляд фота і відэа, згрупаваных па лагічных тэматычных тэгах", - "tag_people": "Тэгаваць людзей", + "tag_people": "Пазначыць людзей", "tag_updated": "Абноўлены тэг: {tag}", "tagged_assets": "{count, plural, one {Пазначаны тэгам # аб’ект} few {Пазначаны тэгам # аб’екты} many {Пазначана тэгам # аб’ектаў} other {Пазначана тэгам # аб’екта}}", "tags": "Тэгі", @@ -2059,10 +2120,10 @@ "trash_page_info": "Элементы ў сметніцы будуць канчаткова выдалены праз {days} дзён", "trashed_items_will_be_permanently_deleted_after": "Элементы ў сметніцы будуць канчаткова выдалены праз {days, plural, one {# дзень} few {# дні} many {# дзён} other {# дня}}.", "trigger": "Трыгер", - "trigger_asset_uploaded": "Аб’ект запампаваны", + "trigger_asset_uploaded": "Запампаваны аб’ект", "trigger_asset_uploaded_description": "Спрацоўвае пры запампоўванні новага аб’екта", - "trigger_person_recognized": "Асоба распазнана", - "trigger_person_recognized_description": "Спрацоўвае пры выяўленні асобы", + "trigger_person_recognized": "Распазнаны чалавек", + "trigger_person_recognized_description": "Спрацоўвае пры распазнаванні чалавека", "troubleshoot": "Пошук і выпраўленне непаладак", "type": "Тып", "unable_to_change_pin_code": "Не атрымалася змяніць PIN-код", @@ -2074,10 +2135,11 @@ "undo": "Адрабіць", "unfavorite": "Выдаліць з абранага", "unfavorite_action_prompt": "{count} выдалена з абранага", - "unhide_person": "Паказаць асобу", + "unhide_person": "Паказаць чалавека", "unknown": "Невядома", "unknown_country": "Невядомая краіна", "unknown_date": "Невядомая дата", + "unknown_schema": "Невядомая схема", "unknown_year": "Невядомы год", "unlimited": "Без абмежаванняў", "unlink_motion_video": "Адвязаць рухомае відэа", @@ -2090,15 +2152,15 @@ "unsaved_change": "Незахаванае змяненне", "unselect_all": "Скасаваць выбар усіх", "unselect_all_duplicates": "Скасаваць выбар усіх дублікатаў", - "unstack": "Разабраць стэк", - "unstack_action_prompt": "{count} вынята са стэка", - "unstacked_assets_count": "Вынята са стэка {count, plural, one {# аб’ект} few {# аб’екты} many {# аб’ектаў} other {# аб’ектаў}}", + "unstack": "Раздзяліць стос", + "unstack_action_prompt": "{count} вынята са стоса", + "unstacked_assets_count": "{count, plural, one {# аб’ект выняты} few {# аб’екты выняты} many {# аб’ектаў вынята} other {# аб’екта вынята}} са стоса", "unsupported_field_type": "Тып поля не падтрымліваецца", "unsupported_file_type": "Файл {file} нельга запампаваць, бо тып файла {type} не падтрымліваецца.", "untagged": "Без тэга", "up_next": "Далей", "update_location_action_prompt": "Абнавіць месцазнаходжанне выбраных аб’ектаў ({count}) на:", - "updated_at": "Абноўлена", + "updated_at": "Абноўлены", "updated_password": "Пароль абноўлены", "upload": "Запампаваць", "upload_concurrency": "Паралельнасць запампоўвання", @@ -2113,6 +2175,8 @@ "upload_status_errors": "Памылкі", "upload_status_uploaded": "Запампавана", "upload_success": "Запампоўванне ўдалае, абнавіце старонку, каб убачыць новыя запампаваныя аб’екты.", + "upload_to_album_body": "Карыстальнікі, якія не карыстаюцца функцыяй ручнога запампоўвання, цяпер могуць дадаваць лакальныя фота непасрэдна ў альбом падчас іх запампоўвання. Больш не трэба запампоўваць іх і дадаваць у альбом пазней.", + "upload_to_album_title": "Запампоўваць адразу ў альбом", "upload_to_immich": "Запампаваць у Immich ({count})", "uploading": "Запампоўванне", "uploading_media": "Запампоўванне медыя", @@ -2147,7 +2211,7 @@ "variables": "Пераменныя", "version": "Версія", "version_announcement_closing": "Твой сябар, Алекс", - "version_announcement_message": "Вітаем! Даступная новая версія Immich. Знайдзіце час, каб прачытаць нататкі да выпуску, каб пераканацца, што ваша налада актуальная і пазбегнуць магчымых памылак канфігурацыі, асабліва калі вы карыстаецеся WatchTower або іншымі механізмамі, якія аўтаматычна абнаўляюць ваш сервер Immich.", + "version_announcement_message": "Вітаем! Даступна новая версія Immich. Прачытайце нататкі да выпуску, каб пераканацца, што вашы налады актуальныя і пазбегнуць магчымых памылак канфігурацыі, асабліва калі вы выкарыстоўваеце WatchTower або іншы механізм для аўтаматычнага абнаўлення сервера Immich.", "version_history": "Гісторыя версій", "version_history_item": "Усталявана версія {version} на {date}", "video": "Відэа", @@ -2156,7 +2220,7 @@ "video_quality": "Якасць відэа", "videos": "Відэа", "videos_count": "{count, plural, one {# відэа} other {# відэа}}", - "view": "Прагляд", + "view": "Выгляд", "view_album": "Праглядзець альбом", "view_all": "Праглядзець усё", "view_all_users": "Праглядзець усех карыстальнікаў", @@ -2169,8 +2233,8 @@ "view_previous_asset": "Праглядзець папярэдні аб'ект", "view_qr_code": "Прагляд QR-кода", "view_similar_photos": "Прагляд падобных фота", - "view_stack": "Прагляд стэка", - "viewer_remove_from_stack": "Выдаліць са стэка", + "view_stack": "Праглядзець стос", + "viewer_remove_from_stack": "Выняць са стоса", "visibility": "Бачнасць", "visibility_changed": "Бачнасць змянілася для {count, plural, one {# чалавека} other {# чалавек}}", "visual": "Візуальны", @@ -2180,28 +2244,33 @@ "week": "Тыдзень", "welcome": "Вітаем", "welcome_to_immich": "Вітаем у Immich", + "whats_new": "Што новага", + "whats_new_settings_subtitle": "Паглядзіце, што новага ў Immich", + "whats_new_version": "Версія {version}", "when": "Калі", "width": "Шырыня", "wifi_name": "Назва Wi-Fi", - "workflow_delete_prompt": "Вы ўпэўнены, што хочаце выдаліць гэты працоўны працэс?", - "workflow_deleted": "Працоўны працэс выдалены", - "workflow_description": "Апісанне працоўнага працэсу", - "workflow_info": "Інфармацыя пра працоўны працэс", - "workflow_json": "JSON працоўнага працэсу", - "workflow_json_help": "Рэдагуйце канфігурацыю працоўнага працэсу ў фармаце JSON. Змяненні сінхранізуюцца з візуальным канструктарам.", - "workflow_name": "Назва працоўнага працэсу", + "workflow": "Сцэнарый", + "workflow_delete_prompt": "Вы ўпэўнены, што хочаце выдаліць гэты сцэнарый?", + "workflow_deleted": "Сцэнарый выдалены", + "workflow_description": "Апісанне сцэнарыя", + "workflow_info": "Інфармацыя пра сцэнарый", + "workflow_json": "JSON сцэнарыя", + "workflow_json_help": "Рэдагуйце канфігурацыю сцэнарыя ў фармаце JSON. Змяненні сінхранізуюцца з візуальным канструктарам.", + "workflow_name": "Назва сцэнарыя", "workflow_navigation_prompt": "Вы ўпэўнены, што хочаце выйсці без захавання змяненняў?", - "workflow_summary": "Зводка працоўнага працэсу", - "workflow_update_success": "Працоўны працэс паспяхова абноўлены", - "workflows": "Працоўныя працэсы", - "workflows_help_text": "Працоўныя працэсы аўтаматызуюць дзеянні над вашымі аб’ектамі на падставе трыгераў і фільтраў", + "workflow_summary": "Зводка сцэнарыя", + "workflow_templates": "Шаблоны сцэнарыяў", + "workflow_update_success": "Сцэнарый паспяхова абноўлены", + "workflows": "Сцэнарыі", + "workflows_help_text": "Сцэнарыі аўтаматызуюць дзеянні над аб’ектамі на падставе трыгераў і фільтраў", "wrong_pin_code": "Няправільны PIN-код", "x_of_total": "{x}/{total}", "year": "Год", "years_ago": "{years, plural, one {# год} few {# гады} many {# гадоў} other {# гадоў}} таму", "yes": "Так", "you_dont_have_any_shared_links": "У вас няма абагуленых спасылак", - "your_wifi_name": "Імя вайшай Wi-Fi сеткі", + "your_wifi_name": "Назва сеткі Wi-Fi", "zero_to_clear_rating": "націсніце 0, каб скінуць ацэнку аб’екта", "zoom_image": "Павялічыць відарыс" } diff --git a/i18n/bg.json b/i18n/bg.json index eb571a2e17..f7336d606c 100644 --- a/i18n/bg.json +++ b/i18n/bg.json @@ -108,6 +108,21 @@ "image_thumbnail_quality_description": "Качество на миниатюрата от 1 до 100. По-високата стойност е по-добра, но води до по-големи файлове и може да намали бързодействието на приложението.", "image_thumbnail_title": "Настройки на миниатюрите", "import_config_from_json_description": "Импорт на системна конфигурация чрез качване на JSON файл", + "integrity_checks_checksum_files": "Файлове с контролни суми", + "integrity_checks_checksum_files_description": "Настройка на проверката с контролна сума", + "integrity_checks_checksum_files_enable_description": "Активиране на проверката с контролна сума", + "integrity_checks_checksum_files_percentage_limit": "Процентно ограничение", + "integrity_checks_checksum_files_percentage_limit_description": "Конфигурирайте максималния процент между 0.01 и 1 за това колко често трябва да се изпълнява проверката на контролната сума през всеки интервал.", + "integrity_checks_checksum_files_time_limit": "Ограничение на времето", + "integrity_checks_checksum_files_time_limit_description": "Конфигурирайте максималната продължителност, за която трябва да се изпълнява проверка на контролната сума за всеки интервал. (ms)", + "integrity_checks_missing_files": "Липсващи файловe", + "integrity_checks_missing_files_description": "Конфигурирайте честотата и активирайте или деактивирайте проверката за липсващи файлове", + "integrity_checks_missing_files_enable_description": "Активиране на проверката за липсващи файлове", + "integrity_checks_settings": "Проверка за цялост", + "integrity_checks_settings_description": "Управлявайте интервалите за проверка на цялост", + "integrity_checks_untracked_files": "Непроследявани файлове", + "integrity_checks_untracked_files_description": "Конфигурирайте честотата и активирайте или деактивирайте проверката за непроследявани файлове", + "integrity_checks_untracked_files_enable_description": "Активиране на проверката за непроследявани файлове", "job_concurrency": "Паралелност на {job}", "job_created": "Задачата е създадена", "job_not_concurrency_safe": "Тази задача не е безопасна за паралелно изпълнение.", @@ -416,6 +431,10 @@ "transcoding_realtime_description": "Позволява транскодиране на видео по време на възпроизвеждане. Разрешава превключване на качеството, но може да предизвика по-голямо забавяне или накъсване на възпроизвеждането според възможностите на сървъра.", "transcoding_realtime_enabled": "Включи транскодиране в реално време", "transcoding_realtime_enabled_description": "Ако е изключено, сървъра ще отказва нова сесия за транскодиране в реално време.", + "transcoding_realtime_resolutions": "Резолюции", + "transcoding_realtime_resolutions_description": "Възможните резолюции за транскодиране в реално време. Високите резолюции може да предизвикат проблеми при възпроизвеждане, ако сървъра не успява да транскодира достатъчно бързо.", + "transcoding_realtime_video_codecs": "Видео кодеци", + "transcoding_realtime_video_codecs_description": "Видео кодеци, налични за транскодиране в реално време. При възпроизвеждане клиентите ще изберат най-добрата поддържана опция. AV1 е по-производителна от HEVC, която пък е по-производителна от H.264. При употреба на хардуерно ускорение избирайте само тези, които ускорителя поддържа. При софтуерно транскодиране имайте предвид, че H.264 е по-бързо от AV1, което е по-бързо от HEVC.", "transcoding_reference_frames": "Референтни кадри", "transcoding_reference_frames_description": "Броят кадри за препратка при компресиране на даден кадър. По-високите стойности подобряват ефективността на компресията, но забавят кодирането. 0 задава тази стойност автоматично.", "transcoding_required_description": "Само видеа, които не са в приет формат", @@ -578,6 +597,7 @@ "asset_viewer_settings_title": "Преглед на изображения", "assets": "Елементи", "assets_added_to_album_count": "Добавен(и) са {count, plural, one {# актив} other {# актива}} в албума", + "assets_added_to_album_partial_count": "Добавени са {successCount} от общо {totalCount} {totalCount, plural, one {елемент} other {елемента}} към албума", "assets_added_to_albums_count": "{assetTotal, plural, one {# обект е добавен} other {# обекта са добавени}} в {albumTotal, plural, one {# албум} other {# албума}}", "assets_cannot_be_added_to_album_count": "{count, plural, one {Обекта не може да се добави} other {Обектите не може да се добавят}} в албума", "assets_cannot_be_added_to_albums": "{count, plural, one {обект не може да бъде добавен} other {обекта не могат да бъдат добавени}} в никой от албумите", @@ -588,7 +608,7 @@ "assets_restore_confirmation": "Сигурни ли сте, че искате да възстановите всички активи в кошчето? Не можете да отмените това действие! Имайте предвид, че активи, които са офлайн, не могат да бъдат възстановени по този начин.", "assets_restored_count": "Възстановен(и) са {count, plural, one {# актив} other {# актива}}", "assets_trashed": "{count} обекта са преместени в коша", - "assets_trashed_count": "Възстановен(и) са {count, plural, one {# файл} other {# файла}}", + "assets_trashed_count": "{count, plural, one {# файл е преместен в кошчето} other {# файла са преместени в кошчето}}", "assets_were_part_of_album_count": "{count, plural, one {Файлът е} other {Файловете са}} вече част от албума", "assets_were_part_of_albums_count": "{count, plural, one {обект вече е} other {обекта вече са}} част от албумите", "authorized_devices": "Удостоверени устройства", @@ -794,7 +814,6 @@ "custom_date": "Персонализирана дата", "custom_locale": "Персонализирани езикови настройки", "custom_locale_description": "Форматиране на дата, време и числа в зависимост от избрания език и регион", - "custom_url": "Персонализиран URL адрес", "cutoff_date_description": "Запазване на снимки от последните…", "cutoff_day": "{count, plural, one {ден} other {дни}}", "cutoff_year": "{count, plural, one {година} other {години}}", @@ -1461,6 +1480,7 @@ "never": "Никога", "new_album": "Нов Албум", "new_api_key": "Нов API ключ", + "new_feature": "Нова функция", "new_password": "Нова парола", "new_person": "Нов човек", "new_pin_code": "Нов PIN код", @@ -1504,9 +1524,13 @@ "not_available": "Неналично", "not_in_any_album": "Не е в никой албум", "not_selected": "Не е избрано", + "not_set": "Не е зададено", "notes": "Бележки", "nothing_here_yet": "Засега тук няма нищо", "notification_backup_reliability": "Позволете известията, за да подобрите надеждността на архивиране във фонов режим", + "notification_enabled_list_tile_content": "Immich използва механизма за известия при архивиране във фонов режим. Управлявайте ги от менюто за настройки на вашето устройство.", + "notification_enabled_list_tile_open_button": "Отвори настройки", + "notification_enabled_list_tile_title": "Известията са активирани", "notification_permission_dialog_content": "За да включиш известията, отиди в Настройки и избери Разреши.", "notification_permission_list_tile_content": "Дай разрешение за активиране на известията.", "notification_permission_list_tile_enable_button": "Разреши известията", @@ -1518,6 +1542,8 @@ "obtainium_configurator": "Конфигуратор за получаване", "obtainium_configurator_instructions": "Използвайте Obtainium за инсталация и обновяване на приложението за Android директно от GitHub на Immich. Създайте API ключ и изберете вариант за да създадете Obtainium конфигурационен линк", "ocr": "Оптично разпознаване на текст", + "ocr_body": "Сега Immich разчита текст в снимките, така че може да търсите по това, което пише.", + "ocr_title": "Търсене на текст в снимките", "official_immich_resources": "Официална информация за Immich", "offline": "Офлайн", "offset": "Отместване", @@ -1536,6 +1562,8 @@ "open": "Отвори", "open_calendar": "Отвори календар", "open_in_browser": "Отвори в браузър", + "open_in_immich_body": "Задайте Immich като галерия на Android, за да отваряте снимки директно от други приложения.", + "open_in_immich_title": "Отваряне на снимки в Immich", "open_in_map_view": "Отвори изглед на карта", "open_in_openstreetmap": "Отвори в OpenStreetMap", "open_the_search_filters": "Отвари филтрите за търсене", @@ -1593,7 +1621,7 @@ "person": "Човек", "person_age_months": "{months, plural, one {# месец} other {# месеца}}", "person_age_year_months": "1 година и {months, plural, one {# месец} other {# месеца}}", - "person_age_years": "{years, plural, other {# години}}", + "person_age_years": "{years, plural, one {# година} other {# години}}", "person_birthdate": "Дата на раждане {date}", "person_hidden": "{name}{hidden, select, true { (скрит)} other {}}", "person_recognized": "Разпознато e лице", @@ -1694,7 +1722,10 @@ "recent": "Скорошни", "recent_searches": "Скорошни търсения", "recently_added": "Наскоро добавено", + "recently_added_body": "Преминете директно към специална страница, където е всичко, което сте добавили напоследък.", + "recently_added_description": "Разглеждане на файлове, подредени по реда на добавяне в Immich", "recently_added_page_title": "Наскоро добавено", + "recently_added_title": "Добавени скоро", "recently_taken": "Наскоро снимано", "refresh": "Опресняване", "refresh_encoded_videos": "Опресни кодирани видеоклипове", @@ -1901,6 +1932,8 @@ "share_link": "Връзка за споделяне", "share_original": "Използвай оригинала (голям размер)", "share_preview": "Използвай миниатюра (намален размер)", + "share_quality_body": "Натиснете и задръжте бутона за споделяне, за да изберете качеството на изображението, преди да го споделите.", + "share_quality_title": "Изберете качеството при споделяне", "shared": "Споделено", "shared_album_activities_input_disable": "Коментарите са изключени", "shared_album_activity_remove_content": "Искате ли да изтриете тази активност?", @@ -1915,7 +1948,9 @@ "shared_link_app_bar_title": "Споделени връзки", "shared_link_clipboard_copied_massage": "Копирано в клипборда", "shared_link_create_error": "Грешка при създаване на споделена връзка", - "shared_link_custom_url_description": "Достъпете споделения линк с персонализиран URL адрес", + "shared_link_custom_url_description": "Споделете достъп чрез този персонализиран URL линк", + "shared_link_custom_url_title": "Персонализиран URL адрес", + "shared_link_custom_url_warning": "Предупреждение: Персонализирано URL име с наклонени напред може да не работи според очакванията.", "shared_link_edit_description_hint": "Въведи описание на споделеното", "shared_link_edit_expire_after_option_day": "1 ден", "shared_link_edit_expire_after_option_days": "{count} дни", @@ -1982,16 +2017,19 @@ "sign_out": "Отписване", "sign_up": "Запиши се", "size": "Размер", + "skip": "Пропусни", "skip_to_content": "Премини към съдържанието", "skip_to_folders": "Премини към папките", "skip_to_tags": "Премини към етикетите", "slideshow": "Слайдшоу", + "slideshow_body": "Отпуснете се и гледайте снимките си, възпроизвеждани в слайдшоу на цял екран.", "slideshow_metadata_overlay_mode": "Съдържание на слоя с информация", "slideshow_metadata_overlay_mode_description_only": "Само описание", "slideshow_metadata_overlay_mode_full": "Пълна", "slideshow_repeat": "Повтаряй слайдшоуто", "slideshow_repeat_description": "Започвай отново, когато слайдшоуто приключи", "slideshow_settings": "Настройки за слайдшоу", + "slideshow_title": "Слайдшоу", "smart_album": "Умен албум", "some_assets_already_have_a_location_warning": "Някои от избраните файлове вече имат местоположение", "sort_albums_by": "Сортиране на албуми по...", @@ -2119,6 +2157,7 @@ "unknown": "Неизвестно", "unknown_country": "Непозната Държава", "unknown_date": "Неизвестна дата", + "unknown_schema": "Неизвестна схема", "unknown_year": "Неизвестна година", "unlimited": "Неограничено", "unlink_motion_video": "Премахни връзката с видео", @@ -2154,6 +2193,8 @@ "upload_status_errors": "Грешки", "upload_status_uploaded": "Качено", "upload_success": "Качването е успешно, опреснете страницата, за да видите новите файлове.", + "upload_to_album_body": "За потребители, които не използват функцията за ръчно качване, вече можете да изберете да добавяте локални снимки директно в албум, докато ги качвате, вече не е необходимо да качвате и след това да добавяте към албум.", + "upload_to_album_title": "Качване директно в албум", "upload_to_immich": "Казване в Immich ({count})", "uploading": "Качваме", "uploading_media": "Качване на медийни файлове", @@ -2221,6 +2262,9 @@ "week": "Седмица", "welcome": "Добре дошли", "welcome_to_immich": "Добре дошли в Immich", + "whats_new": "Какво е новото", + "whats_new_settings_subtitle": "Вижте какво ново има в Immich", + "whats_new_version": "Версия {version}", "when": "Когато", "width": "Ширинa", "wifi_name": "Wi-Fi мрежа", diff --git a/i18n/bn.json b/i18n/bn.json index 0f615189ec..64fcee0b13 100644 --- a/i18n/bn.json +++ b/i18n/bn.json @@ -8,7 +8,7 @@ "action_description": "বাছাইকৃত সম্পদসমূহের উপর সম্পাদনযোগ্য কাজের তালিকা", "actions": "কর্ম", "active": "সচল", - "active_count": "Active: {count}", + "active_count": "সচল: {count}", "activity": "কার্যকলাপ", "add": "যোগ করুন", "add_a_description": "একটি বিবরণ যোগ করুন", @@ -56,7 +56,7 @@ "backup_onboarding_description": "আপনার ডেটা সুরক্ষিত রাখার জন্য একটি 3-2-1 ব্যাকআপ কৌশল সুপারিশ করা হয়। একটি বিস্তৃত ব্যাকআপ সমাধানের জন্য আপনার আপলোড করা ফটো/ভিডিওগুলির কপি এবং Immich ডাটাবেস রাখা উচিত।", "backup_onboarding_footer": "Immich এর ব্যাকআপ নেওয়ার বিষয়ে আরও তথ্যের জন্য, অনুগ্রহ করে ডকুমেন্টেশন দেখুন।", "backup_onboarding_parts_title": "৩-২-১ ব্যাকআপের মধ্যে রয়েছে:", - "backup_onboarding_title": "ব্যাকআপ", + "backup_onboarding_title": "ব্যাকআপসমূহ", "backup_settings": "ডাটাবেস ডাম্প সেটিংস", "backup_settings_description": "ডাটাবেস ডাম্প সেটিংস পরিচালনা করুন।", "cleared_jobs": "{job} এর জন্য jobs খালি করা হয়েছে", @@ -98,18 +98,33 @@ "image_preview_quality_description": "১-১০০ এর মধ্যে প্রিভিউ কোয়ালিটি। বেশি হলে ভালো, কিন্তু বড় ফাইল তৈরি হয় এবং অ্যাপের প্রতিক্রিয়াশীলতা কমাতে পারে। কম মান সেট করলে মেশিন লার্নিং কোয়ালিটির উপর প্রভাব পড়তে পারে।", "image_preview_title": "প্রিভিউ সেটিংস", "image_progressive": "প্রগ্রেসিভ", - "image_progressive_description": "ধীরে ধীরে লোড হওয়ার সুবিধার্থে JPEG ছবিগুলো প্রগ্রেসিভভাবে এনকোড করুন। WebP ছবির ক্ষেত্রে এটি কোনো প্রভাব ফেলবে না", + "image_progressive_description": "JPEG ছবি ক্রমান্বয়ে লোড হয়ে প্রদর্শিত হওয়ার জন্য প্রগ্রেসিভভাবে এনকোড করুন। WebP ছবির উপর এর কোনো প্রভাব নেই।", "image_quality": "গুণমান", - "image_resolution": "রেজোলিউশন", + "image_resolution": "রেজোলিউশনসমূহ", "image_resolution_description": "উচ্চ রেজোলিউশনের ক্ষেত্রে আরও বিস্তারিত তথ্য সংরক্ষণ করা সম্ভব কিন্তু এনকোড করতে বেশি সময় লাগে, ফাইলের আকার বড় হয় এবং অ্যাপের প্রতিক্রিয়াশীলতা কমাতে পারে।", - "image_settings": "চিত্র সেটিংস", + "image_settings": "ছবির সেটিংস", "image_settings_description": "তৈরি করা ছবির মান এবং রেজোলিউশন পরিচালনা করুন", "image_thumbnail_description": "মেটাডেটা বাদ দেওয়া ছোট থাম্বনেইল, মূল টাইমলাইনের মতো ছবির গ্রুপ দেখার সময় ব্যবহৃত হয়", "image_thumbnail_quality_description": "থাম্বনেইলের মান ১-১০০। বেশি হলে ভালো, কিন্তু বড় ফাইল তৈরি হয় এবং অ্যাপের প্রতিক্রিয়াশীলতা কমাতে পারে।", "image_thumbnail_title": "থাম্বনেল সেটিংস", - "import_config_from_json_description": "একটি JSON কনফিগ ফাইল আপলোড করে সিস্টেম কনফিগারেশন ইমপোর্ট করুন।", - "job_concurrency": "{job} কনকারেন্সি", - "job_created": "Job তৈরি হয়েছে", + "import_config_from_json_description": "একটি JSON কনফিগ ফাইল আপলোড করে সিস্টেম কনফিগারেশন ইমপোর্ট করুন", + "integrity_checks_checksum_files": "ফাইলের সততা-যাচাই", + "integrity_checks_checksum_files_description": "ফাইলের সততা যাচাইকরণ পদ্ধতি নির্ধারণ করুন", + "integrity_checks_checksum_files_enable_description": "ফাইলের সততা-যাচাই চালু করুন", + "integrity_checks_checksum_files_percentage_limit": "শতাংশ সীমা", + "integrity_checks_checksum_files_percentage_limit_description": "০.০১ থেকে ১-এর মধ্যে সর্বোচ্চ শতাংশ নির্ধারণ করুন, যা প্রতিটি ব্যবধানে সততা-যাচাই কতটুকু চলবে তা নির্ধারণ করে।", + "integrity_checks_checksum_files_time_limit": "সময়সীমা", + "integrity_checks_checksum_files_time_limit_description": "প্রতিটি ব্যবধানে সততা-যাচাই সর্বোচ্চ কতক্ষণ চলবে, তার স্থিতিকাল নির্ধারণ করুন। (মিলিসেকেন্ডে)", + "integrity_checks_missing_files": "অনুপস্থিত ফাইল", + "integrity_checks_missing_files_description": "অনুপস্থিত ফাইল যাচাইয়ের সময়ব্যবধান নির্ধারণ করুন এবং তা চালু বা বন্ধ নির্বাচন করুন", + "integrity_checks_missing_files_enable_description": "অনুপস্থিত ফাইল যাচাই চালু করুন", + "integrity_checks_settings": "সততা যাচাই", + "integrity_checks_settings_description": "সততা যাচাইয়ের সময়ব্যবধান পরিচালনা করুন", + "integrity_checks_untracked_files": "নথিভুক্ত না করা ফাইল", + "integrity_checks_untracked_files_description": "নথিভুক্ত না করা ফাইল যাচাইয়ের সময়ব্যবধান নির্ধারণ করুন এবং তা চালু বা বন্ধ নির্বাচন করুন", + "integrity_checks_untracked_files_enable_description": "নথিভুক্ত না করা ফাইল যাচাই চালু করুন", + "job_concurrency": "{job} সমান্তরাল সংখ্যা", + "job_created": "কাজ তৈরি হয়েছে", "job_not_concurrency_safe": "এই কাজটি সমান্তরালভাবে চালানো নিরাপদ নয়।", "job_settings": "কাজের সেটিংস", "job_settings_description": "কাজের সমান্তরালতা পরিচালনা করুন", @@ -128,7 +143,7 @@ "library_settings": "বহিরাগত লাইব্রেরি", "library_settings_description": "বহিরাগত লাইব্রেরি সেটিংস পরিচালনা করুন", "library_tasks_description": "নতুন এবং/অথবা পরিবর্তিত সম্পদের জন্য বহিরাগত লাইব্রেরি স্ক্যান করুন", - "library_updated": "আপডেটকৃত লাইব্রেরি।", + "library_updated": "লাইব্রেরি আপডেট করা হয়েছে", "library_watching_enable_description": "ফাইল পরিবর্তনের জন্য বহিরাগত লাইব্রেরিগুলি দেখুন", "library_watching_settings": "লাইব্রেরি পর্যবেক্ষণ [পরীক্ষামূলক]", "library_watching_settings_description": "পরিবর্তিত ফাইলগুলির জন্য স্বয়ংক্রিয়ভাবে নজর রাখুন", @@ -141,17 +156,17 @@ "machine_learning_availability_checks_interval": "চেক ব্যবধান", "machine_learning_availability_checks_interval_description": "প্রাপ্যতা পরীক্ষাগুলির মধ্যে ব্যবধান মিলিসেকেন্ডে", "machine_learning_availability_checks_timeout": "অনুরোধের সময়সীমা শেষ", - "machine_learning_availability_checks_timeout_description": "প্রাপ্যতার পরীক্ষার জন্য মিলিসেকেন্ডে সময়সীমা।", + "machine_learning_availability_checks_timeout_description": "প্রাপ্যতা যাচাইয়ের জন্য মিলিসেকেন্ডে টাইমআউট", "machine_learning_clip_model": "CLIP মডেল", - "machine_learning_clip_model_description": "এখানে তালিকাভুক্ত একটি CLIP মডেলের নাম। মনে রাখবেন, মডেল পরিবর্তন করলে সব ছবির জন্য 'Smart Search' জবটি পুনরায় চালাতে হবে।", + "machine_learning_clip_model_description": "CLIP মডেলের নাম তালিকাভুক্ত আছে এখানে। মনে রাখবেন, মডেল পরিবর্তন করলে সব ছবির জন্য 'Smart Search' কাজটি পুনরায় চালাতে হবে।", "machine_learning_duplicate_detection": "পুনরাবৃত্তি সনাক্তকরণ", "machine_learning_duplicate_detection_enabled": "পুনরাবৃত্তি শনাক্তকরণ চালু করুন", "machine_learning_duplicate_detection_enabled_description": "নিষ্ক্রিয় থাকলেও হুবহু একই সম্পদগুলোর ডুপ্লিকেট সরিয়ে ফেলা হবে।", - "machine_learning_duplicate_detection_setting_description": "সম্ভাব্য ডুপ্লিকেট খুঁজে বের করতে CLIP এম্বেডিং ব্যবহার করুন।", + "machine_learning_duplicate_detection_setting_description": "সম্ভাব্য ডুপ্লিকেট খুঁজে বের করতে CLIP এম্বেডিং ব্যবহার করুন", "machine_learning_enabled": "Machine Learning সক্ষম করুন", "machine_learning_enabled_description": "নিষ্ক্রিয় থাকলে নিচের সেটিংস নির্বিশেষে সমস্ত ML বৈশিষ্ট্য নিষ্ক্রিয় করা হবে।", "machine_learning_facial_recognition": "ফেসিয়াল রিকগনিশন", - "machine_learning_facial_recognition_description": "ছবিতে মুখ সনাক্ত করুন, চিনুন এবং গ্রুপ করুন।", + "machine_learning_facial_recognition_description": "ছবিতে থাকা মুখ শনাক্ত, চিহ্নিত এবং দলবদ্ধ করুন", "machine_learning_facial_recognition_model": "ফেসিয়াল রিকগনিশন মডেল", "machine_learning_facial_recognition_model_description": "মডেলগুলি আকারের অধঃক্রম অনুযায়ী তালিকাভুক্ত করা হয়েছে। বড় মডেলগুলি ধীরগতির এবং বেশি মেমরি ব্যবহার করে, তবে উন্নত ফলাফল প্রদান করে। মনে রাখবেন যে একটি মডেল পরিবর্তন করার পর আপনাকে সমস্ত ছবির জন্য ফেস ডিটেকশন (Face Detection) কাজটি পুনরায় চালাতে হবে।", "machine_learning_facial_recognition_setting": "ফেসিয়াল রিকগনিশন সক্ষম করুন", @@ -165,7 +180,7 @@ "machine_learning_min_recognized_faces": "সর্বনিম্ন স্বীকৃত মুখের সংখ্যা", "machine_learning_min_recognized_faces_description": "একজন ব্যক্তি হিসেবে তৈরি হওয়ার জন্য স্বীকৃত মুখের সর্বনিম্ন সংখ্যা। এটি বাড়ালে ফেসিয়াল রিকগনিশন আরও নিখুঁত হয়, তবে এতে কোনো মুখ কোনো ব্যক্তির সাথে সংযুক্ত না হওয়ার সম্ভাবনাও বৃদ্ধি পায়।", "machine_learning_ocr": "OCR", - "machine_learning_ocr_description": "ছবিতে টেক্সট (Text) শনাক্ত করতে মেশিন লার্নিং ব্যবহার করুন।", + "machine_learning_ocr_description": "ছবিতে থাকা লেখা শনাক্ত করতে মেশিন লার্নিং ব্যবহার করুন", "machine_learning_ocr_enabled": "OCR সক্ষম করুন", "machine_learning_ocr_enabled_description": "নিষ্ক্রিয় থাকলে, ছবিগুলোতে টেক্সট শনাক্তকরণ করা হবে না।", "machine_learning_ocr_max_resolution": "সর্বোচ্চ রেজোলিউশন(Resolution)", @@ -182,18 +197,32 @@ "machine_learning_smart_search_description": "CLIP এমবেডিং (embeddings) ব্যবহার করে ছবির বিষয়বস্তু অনুযায়ী অনুসন্ধান করুন", "machine_learning_smart_search_enabled": "স্মার্ট সার্চ সক্ষম করুন", "machine_learning_smart_search_enabled_description": "নিষ্ক্রিয় থাকলে, স্মার্ট সার্চের জন্য ছবিগুলো এনকোড (encode) করা হবে না।", - "machine_learning_url_description": "মেশিন লার্নিং সার্ভারের URL। যদি একের বেশি URL প্রদান করা হয়, তবে একটি সফলভাবে সাড়া না দেওয়া পর্যন্ত প্রতিটি সার্ভারে এক এক করে চেষ্টা করা হবে (প্রথম থেকে শেষ ক্রমানুসারে)। যে সার্ভারগুলো সাড়া দেবে না, সেগুলো পুনরায় সচল হওয়া পর্যন্ত সাময়িকভাবে উপেক্ষা করা হবে।", + "machine_learning_url_description": "মেশিন লার্নিং সার্ভারের URL। একাধিক URL দেওয়া থাকলে, প্রথম থেকে শেষ পর্যন্ত ক্রমানুসারে একটি করে সার্ভারে চেষ্টা করা হবে, যতক্ষণ না কোনোটি সফলভাবে সাড়া দেয়। যেসব সার্ভার সাড়া দেয় না, সেগুলোকে সাময়িকভাবে উপেক্ষা করা হবে, যতক্ষণ না তারা আবার সচল হয়।", "maintenance_backup_management": "ব্যাকআপ ব্যবস্থাপনা", "maintenance_delete_backup": "ব্যাকআপ (Backup)মুছুন", "maintenance_delete_backup_description": "এই ফাইলটি চিরতরে মুছে ফেলা হবে।", "maintenance_delete_error": "ব্যাকআপ মুছে ফেলতে ব্যর্থ হয়েছে।", "maintenance_integrity_check": "যাচাই", + "maintenance_integrity_check_all": "সব যাচাই করুন", + "maintenance_integrity_checksum_mismatch": "সততা-যাচাই অমিল", + "maintenance_integrity_checksum_mismatch_description": "ডিস্কে থাকা ফাইলের সততা-যাচাই মান, ইমিচের ডেটাবেসে সংরক্ষিত সততা-যাচাই মানের সাথে মিলছে না।", + "maintenance_integrity_checksum_mismatch_job": "সততা-যাচাই অমিল খুঁজুন", + "maintenance_integrity_checksum_mismatch_refresh_job": "সততা-যাচাই অমিলের প্রতিবেদন রিফ্রেশ করুন", + "maintenance_integrity_missing_file": "অনুপস্থিত ফাইল", + "maintenance_integrity_missing_file_description": "যেসব ফাইল ইমিচ ডেটাবেসে নথিভুক্ত করেছে, কিন্তু ফাইল সিস্টেমে বিদ্যমান নেই।", + "maintenance_integrity_missing_file_job": "অনুপস্থিত ফাইল খুঁজুন", + "maintenance_integrity_missing_file_refresh_job": "অনুপস্থিত ফাইলের প্রতিবেদন নতুন করে তৈরি করুন", + "maintenance_integrity_report": "সততা প্রতিবেদন", + "maintenance_integrity_untracked_file": "নথিভুক্ত না করা ফাইল", + "maintenance_integrity_untracked_file_description": "ইমিচের ডিরেক্টরিতে থাকা এমন ফাইল, যেগুলোর কোনো তথ্য ইমিচের কাছে নেই।", + "maintenance_integrity_untracked_file_job": "নথিভুক্ত না করা ফাইল খুঁজুন", + "maintenance_integrity_untracked_file_refresh_job": "নথিভুক্ত না করা ফাইলের প্রতিবেদন নতুন করে তৈরি করুন", "maintenance_restore_backup": "ব্যাকআপ পুনরুদ্ধার(Restore) করুন", "maintenance_restore_backup_description": "Immich মুছে ফেলা হবে এবং নির্বাচিত ব্যাকআপ থেকে পুনরুদ্ধার করা হবে। কার্যক্রম চালিয়ে যাওয়ার আগে একটি ব্যাকআপ তৈরি করা হবে।", "maintenance_restore_backup_different_version": "এই ব্যাকআপটি Immich-এর একটি ভিন্ন সংস্করণের মাধ্যমে তৈরি করা হয়েছিল!", "maintenance_restore_backup_unknown_version": "ব্যাকআপ সংস্করণ নির্ধারণ করা সম্ভব হয়নি।", "maintenance_restore_database_backup": "ডেটাবেস ব্যাকআপ পুনরুদ্ধার করুন", - "maintenance_restore_database_backup_description": "একটি ব্যাকআপ ফাইল ব্যবহার করে ডেটাবেসকে পূর্ববর্তী অবস্থায় ফিরিয়ে আনুন।", + "maintenance_restore_database_backup_description": "ব্যাকআপ ফাইল ব্যবহার করে ডেটাবেসকে আগের অবস্থায় ফিরিয়ে নিন", "maintenance_settings": "রক্ষণাবেক্ষণ (Maintenance)", "maintenance_settings_description": "Immich-কে রক্ষণাবেক্ষণ মোডে (maintenance mode) রাখুন।", "maintenance_start": "রক্ষণাবেক্ষণ মোডে পরিবর্তন করুন", @@ -201,15 +230,15 @@ "maintenance_upload_backup": "ডেটাবেস ব্যাকআপ ফাইল আপলোড করুন", "maintenance_upload_backup_error": "ব্যাকআপ আপলোড করা যায়নি, এটি কি কোনো .sql/.sql.gz ফাইল?", "manage_concurrency": "কনকারেন্সি পরিচালনা করুন (Manage Concurrency)", - "manage_concurrency_description": "জব কনকারেন্সি পরিচালনা করতে 'জবস' (Jobs) পাতায় যান।", + "manage_concurrency_description": "কাজের সমান্তরাল সংখ্যা পরিচালনা করতে জব পেজে যান", "manage_log_settings": "লগ সেটিংস পরিচালনা করুন", "map_dark_style": "ডার্ক স্টাইল (Dark style)", "map_enable_description": "ম্যাপ ফিচারগুলো সক্রিয় করুন (Enable map features)", "map_gps_settings": "ম্যাপ এবং জিপিএস সেটিংস (Map & GPS Settings)", "map_gps_settings_description": "ম্যাপ এবং জিপিএস (রিভার্স জিওকোডিং) সেটিংস পরিচালনা করুন (Manage Map & GPS (Reverse Geocoding) Settings)", - "map_implications": "ম্যাপ ফিচারটি একটি এক্সটার্নাল টাইল সার্ভিসের (tiles.immich.cloud) ওপর নির্ভর করে।", + "map_implications": "ম্যাপ ফিচারটি একটি বাহ্যিক টাইল সার্ভিসের (tiles.immich.cloud) উপর নির্ভর করে", "map_light_style": "লাইট স্টাইল (Light style)", - "map_manage_reverse_geocoding_settings": "রিভার্স জিওকোডিং সেটিংস পরিচালনা করুন", + "map_manage_reverse_geocoding_settings": "রিভার্স জিওকোডিং সংক্রান্ত ব্যবস্থা পরিচালনা করুন", "map_reverse_geocoding": "রিভার্স জিওকোডিং (Reverse Geocoding)", "map_reverse_geocoding_enable_description": "রিভার্স জিওকোডিং সক্রিয় করুন (Enable reverse geocoding)", "map_reverse_geocoding_settings": "রিভার্স জিওকোডিং সেটিংস (Reverse Geocoding Settings)", @@ -219,9 +248,9 @@ "memory_cleanup_job": "মেমরি ক্লিনআপ (Memory cleanup)", "memory_generate_job": "স্মৃতি তৈরি করা(Memory generation)", "metadata_extraction_job": "মেটাডেটা এক্সট্র্যাক্ট করুন (Extract metadata)", - "metadata_extraction_job_description": "প্রতিটি অ্যাসেট (Asset) থেকে মেটাডেটা তথ্য এক্সট্র্যাক্ট করুন, যেমন: জিপিএস (GPS), চেহারা (faces) এবং রেজোলিউশন (resolution)।", + "metadata_extraction_job_description": "প্রতিটি সম্পদ থেকে অবস্থান, চেহারা এবং বিভেদন ক্ষমতার মতো অধি-উপাত্ত তথ্য বের করুন", "metadata_faces_import_setting": "ফেস ইম্পোর্ট সক্রিয় করুন (Enable face import)", - "metadata_faces_import_setting_description": "ছবির EXIF ডেটা এবং সাইডকার (sidecar) ফাইল থেকে চেহারা (faces) ইম্পোর্ট করুন।", + "metadata_faces_import_setting_description": "ছবির EXIF তথ্য এবং সাইডকার ফাইল থেকে চেহারা আমদানি করুন", "metadata_settings": "মেটাডেটা সেটিংস (Metadata Settings)", "metadata_settings_description": "মেটাডেটা সেটিংস পরিচালনা করুন (Manage metadata settings)", "migration_job": "মাইগ্রেশন (Migration)", @@ -239,7 +268,7 @@ "nightly_tasks_start_time_setting": "শুরু করার সময় (Start time)", "nightly_tasks_start_time_setting_description": "সার্ভার যখন নাইটলি টাস্ক (nightly tasks) চালানো শুরু করে সেই সময়", "nightly_tasks_sync_quota_usage_setting": "কোটা ব্যবহারের তথ্য সিঙ্ক করুন (Sync quota usage)", - "nightly_tasks_sync_quota_usage_setting_description": "বর্তমান ব্যবহারের ওপর ভিত্তি করে ব্যবহারকারীর স্টোরেজ কোটা আপডেট করুন।", + "nightly_tasks_sync_quota_usage_setting_description": "বর্তমান ব্যবহারের ভিত্তিতে ব্যবহারকারীর স্টোরেজ কোটা নির্ধারণ করুন", "no_paths_added": "কোনো পাথ যোগ করা হয়নি (No paths added)", "no_pattern_added": "কোনো প্যাটার্ন যোগ করা হয়নি (No pattern added)", "note_apply_storage_label_previous_assets": "দ্রষ্টব্য: পূর্বে আপলোড করা অ্যাসেটগুলোতে স্টোরেজ লেবেল (Storage Label) প্রয়োগ করতে নিচের কমান্ডটি রান করুন—", @@ -262,16 +291,20 @@ "notification_enable_email_notifications": "ইমেল নোটিফিকেসন সক্রিয় করুন", "notification_settings": "নোটিফিকেসন সেটিংস", "notification_settings_description": "ইমেইল সহ নোটিফিকেশন সেটিংস পরিচালনা করুন", + "oauth_allow_insecure_requests": "ঝুঁকিপূর্ণ অনুরোধের অনুমতি দিন", + "oauth_allow_insecure_requests_description": "সতর্কতা: এটি OAuth অনুরোধের জন্য TLS সার্টিফিকেট ভ্যালিডেশন বন্ধ করে দেয় এবং আপনাকে MITM আক্রমণের ঝুঁকিতে ফেলতে পারে।", "oauth_auto_launch": "অটো লঞ্চ", - "oauth_auto_launch_description": "লগইন পেজে প্রবেশ করার সাথে সাথে OAuth লগইন প্রক্রিয়াটি স্বয়ংক্রিয়ভাবে শুরু করুন", + "oauth_auto_launch_description": "লগইন পেজে প্রবেশ করামাত্র OAuth লগইন প্রক্রিয়াটি স্বয়ংক্রিয়ভাবে শুরু করুন", "oauth_auto_register": "সয়ংক্রিয়ভাবে রেজিস্টার করুন", "oauth_auto_register_description": "OAuth দিয়ে সাইন ইন করার পর নতুন ব্যবহারকারীদের স্বয়ংক্রিয়ভাবে নিবন্ধন করুন", "oauth_button_text": "বাটন টেক্সট", "oauth_client_secret_description": "গোপনীয় ক্লায়েন্টের জন্য প্রয়োজন, অথবা যদি পাবলিক ক্লায়েন্টের জন্য PKCE (Proof Key for Code Exchange) সমর্থিত না হয়।", "oauth_enable_description": "OAuth-এর মাধ্যমে লগইন করুন", + "oauth_end_session_url_description": "ব্যবহারকারী লগ-আউট করার সময় তাকে এই URI-এ পুনঃনির্দেশ করুন।", "oauth_mobile_redirect_uri": "মোবাইল রিডাইরেক্ট ইউআরআই (URI)", "oauth_mobile_redirect_uri_override": "মোবাইল রিডাইরেক্ট ইউআরআই (URI) ওভাররাইড", - "oauth_mobile_redirect_uri_override_description": "যখন OAuth প্রোভাইডার মোবাইল ইউআরআই (URI) অনুমতি দেয় না, যেমন ''{callback}'', তখন এটি সক্রিয় করুন।", + "oauth_mobile_redirect_uri_override_description": "যখন OAuth প্রোভাইডার মোবাইল ইউআরআই (URI) অনুমতি দেয় না, যেমন ''{callback}'', তখন এটি সক্রিয় করুন", + "oauth_prompt_description": "প্রম্পট প্যারামিটার (যেমন: select_account, login, consent)", "oauth_role_claim": "রোল ক্লেইম (Role Claim)", "oauth_role_claim_description": "এই ক্লেইমটির উপস্থিতির ওপর ভিত্তি করে স্বয়ংক্রিয়ভাবে অ্যাডমিন অ্যাক্সেস প্রদান করুন। ক্লেইমটিতে 'user' অথবা 'admin' যেকোনো একটি থাকতে পারে।", "oauth_settings": "OAuth", @@ -298,6 +331,8 @@ "refreshing_all_libraries": "সবগুলো লাইব্রেরি রিফ্রেশ করা হচ্ছে", "registration": "অ্যাডমিন রেজিস্ট্রেশন (Admin Registration)", "registration_description": "যেহেতু আপনি এই সিস্টেমের প্রথম ব্যবহারকারী, তাই আপনাকে অ্যাডমিন (Admin) হিসেবে নিযুক্ত করা হবে। আপনি সমস্ত প্রশাসনিক কাজের জন্য দায়ী থাকবেন এবং পরবর্তী ব্যবহারকারীরা আপনার মাধ্যমেই তৈরি হবে।", + "release_channel_release_candidate": "রিলিজ ক্যান্ডিডেট", + "release_channel_stable": "স্থিতিশীল", "remove_failed_jobs": "ব্যর্থ হওয়া কাজগুলো মুছে ফেলুন (Remove failed jobs)", "require_password_change_on_login": "প্রথমবার লগইন করার সময় ব্যবহারকারীর পাসওয়ার্ড পরিবর্তন করা বাধ্যতামূলক করুন", "reset_settings_to_default": "সেটিংস রিসেট করে ডিফল্ট অবস্থায় ফিরিয়ে আনুন (Reset settings to default)", @@ -350,7 +385,7 @@ "theme_settings": "থীম সেটিংস", "theme_settings_description": "ইমিচ (Immich) ওয়েব ইন্টারফেসের কাস্টমাইজেশন ম্যানেজ করুন", "thumbnail_generation_job": "থাম্বনেইল তৈরি করুন (Generate Thumbnails)", - "thumbnail_generation_job_description": "প্রতিটি অ্যাসেটের জন্য বড়, ছোট এবং ব্লার (অস্পষ্ট) থাম্বনেইল তৈরি করুন, সেই সাথে প্রতিটি ব্যক্তির জন্যও থাম্বনেইল তৈরি করুন।", + "thumbnail_generation_job_description": "প্রতিটি সম্পদের জন্য বড়, ছোট ও ঝাপসা থাম্বনেইল তৈরি করুন, পাশাপাশি প্রতিটি ব্যক্তির জন্যও থাম্বনেইল তৈরি করুন", "transcoding_acceleration_api": "অ্যাক্সিলারেট এপিআই (Acceleration API)", "transcoding_acceleration_api_description": "ট্রানসকোডিং (transcoding) দ্রুত করার জন্য আপনার ডিভাইসের সাথে যে API ইন্টারঅ্যাক্ট করবে। এই সেটিংসটি 'সাধ্যমতো' (best effort) কাজ করবে: ব্যর্থ হলে এটি পুনরায় সফটওয়্যার ট্রানসকোডিংয়ে ফিরে আসবে। হার্ডওয়্যারের ওপর ভিত্তি করে VP9 কাজ করতেও পারে, আবার নাও করতে পারে।", "transcoding_acceleration_nvenc": "NVENC (NVIDIA GPU প্রয়োজন)", @@ -392,6 +427,14 @@ "transcoding_preferred_hardware_device_description": "শুধুমাত্র VAAPI এবং QSV-এর ক্ষেত্রে প্রযোজ্য। হার্ডওয়্যার ট্রান্সকোডিংয়ের জন্য ব্যবহৃত dri নোড নির্ধারণ করে।", "transcoding_preset_preset": "প্রিসেট (-preset)", "transcoding_preset_preset_description": "কম্প্রেশন স্পিড। ধীরগতির প্রিসেটগুলো ছোট ফাইল তৈরি করে এবং একটি নির্দিষ্ট বিটরেট লক্ষ্য করার সময় গুণমান বৃদ্ধি করে। VP9 'faster'-এর চেয়ে বেশি গতি উপেক্ষা করে।", + "transcoding_realtime": "রিয়েল-টাইম ট্রান্সকোডিং [পরীক্ষামূলক]", + "transcoding_realtime_description": "ভিডিও স্ট্রিম করার সময় রিয়েল-টাইমে ট্রান্সকোডিং করার সুযোগ দেয়। এটি কোয়ালিটি পরিবর্তনের সুবিধা দেয়, তবে সার্ভারের সক্ষমতার উপর নির্ভর করে প্লেব্যাকে বেশি লেটেন্সি এবং স্টাটারিং হতে পারে।", + "transcoding_realtime_enabled": "রিয়েল-টাইম ট্রান্সকোডিং চালু করুন", + "transcoding_realtime_enabled_description": "বন্ধ থাকলে, সার্ভার নতুন রিয়েল-টাইম ট্রান্সকোডিং সেশন শুরু করতে অস্বীকার করবে।", + "transcoding_realtime_resolutions": "রেজোলিউশন", + "transcoding_realtime_resolutions_description": "রিয়েল-টাইম ট্রান্সকোডিংয়ের জন্য প্রদত্ত রেজোলিউশনসমূহ। সার্ভার যথেষ্ট দ্রুত ট্রান্সকোড করতে না পারলে উচ্চতর রেজোলিউশনে প্লেব্যাক সমস্যা হতে পারে।", + "transcoding_realtime_video_codecs": "ভিডিও কোডেকসমূহ", + "transcoding_realtime_video_codecs_description": "রিয়েল-টাইম ট্রান্সকোডিংয়ের জন্য প্রদত্ত ভিডিও কোডেকসমূহ। প্লেব্যাকের সময় ক্লায়েন্ট তাদের সমর্থিত সেরা বিকল্পটি বেছে নেবে। AV1, HEVC-এর চেয়ে বেশি কার্যকর, এবং HEVC, H.264-এর চেয়ে বেশি কার্যকর। হার্ডওয়্যার অ্যাক্সিলারেশন ব্যবহার করার সময়, শুধুমাত্র সেই কোডেকগুলো নির্বাচন করুন যা অ্যাক্সিলারেটর এনকোড করতে পারে। সফটওয়্যার ট্রান্সকোডিং ব্যবহার করার সময়, মনে রাখবেন H.264, AV1-এর চেয়ে দ্রুত, এবং AV1, HEVC-এর চেয়ে দ্রুত।", "transcoding_reference_frames": "রেফারেন্স ফ্রেম", "transcoding_reference_frames_description": "একটি ফ্রেম কম্প্রেস করার সময় কতটি ফ্রেমকে রেফারেন্স হিসেবে নেওয়া হবে। মান যত বেশি হবে, কমপ্রেশন দক্ষতা তত ভালো হবে, তবে এনকোডিং ধীর হবে। ০ দিলে এই মান স্বয়ংক্রিয়ভাবে নির্ধারিত হবে।", "transcoding_required_description": "শুধুমাত্র অনুমোদিত ফরম্যাটে নেই এমন ভিডিও", @@ -404,7 +447,7 @@ "transcoding_threads": "থ্রেড", "transcoding_threads_description": "উচ্চ মানে এনকোডিং দ্রুত হয়, কিন্তু সার্ভার কম কাজ করতে পারে। CPU কোরের বেশি মান দেওয়া উচিত নয়। ০ দিলে সর্বাধিক ব্যবহার হবে।", "transcoding_tone_mapping": "টোন-ম্যাপিং", - "transcoding_tone_mapping_description": "এইচডিআর (HDR) ভিডিওকে এসডিআর (SDR)-এ রূপান্তর করার সময় এর বাহ্যিক রূপ অক্ষুণ্ণ রাখার চেষ্টা করা হয়। প্রতিটি অ্যালগরিদম রঙ, ডিটেইল এবং উজ্জ্বলতার জন্য ভিন্ন ভিন্ন সমন্বয় করে। হেবল ডিটেইল, মোবিয়াস রঙ এবং রাইনহার্ড উজ্জ্বলতা অক্ষুণ্ণ রাখে।", + "transcoding_tone_mapping_description": "এইচডিআর (HDR) ভিডিওকে এসডিআর (SDR)-এ রূপান্তর করার সময় এর বাহ্যিক রূপ অক্ষুণ্ণ রাখার চেষ্টা করা হয়। প্রতিটি অ্যালগরিদম রঙ, ডিটেইল এবং উজ্জ্বলতার ক্ষেত্রে ভিন্নভাবে সমন্বয় করে। হেবল ডিটেইল, মোবিয়াস রঙ এবং রাইনহার্ড উজ্জ্বলতা অক্ষুণ্ণ রাখে।", "transcoding_transcode_policy": "ট্রান্সকোড নীতি", "transcoding_transcode_policy_description": "কখন একটি ভিডিও ট্রান্সকোড করা হবে তার নীতিমালা। HDR ভিডিও এবং YUV 4:2:0 ব্যতীত অন্য পিক্সেল ফরম্যাটের ভিডিও সর্বদা ট্রান্সকোড করা হবে (যদি না ট্রান্সকোডিং বন্ধ করা থাকে)।", "transcoding_two_pass_encoding": "টু-পাস এনকোডিং", @@ -434,8 +477,11 @@ "user_settings": "ব্যবহারকারী সেটিংস", "user_settings_description": "ব্যবহারকারী সেটিংস ম্যানেজ করুন", "user_successfully_removed": "সফলভাবে ইউজার {email}-কে সরিয়ে দেওয়া হয়েছে।", + "users_page_description": "অ্যাডমিন ব্যবহারকারী পেজ", + "version_check_channel": "রিলিজ চ্যানেল", + "version_check_channel_description": "আপনি কোন রিলিজ চ্যানেলের জন্য ভার্সন ঘোষণা পেতে চান তা বেছে নিন", "version_check_enabled_description": "ভার্সন যাচাই চালু করুন", - "version_check_implications": "ভার্সন চেক ফিচারটি github.com-এর সঙ্গে নিয়মিত সংযোগের ওপর নির্ভরশীল", + "version_check_implications": "ভার্সন চেক ফিচারটি {server}-এর সঙ্গে নিয়মিত সংযোগের ওপর নির্ভরশীল", "version_check_settings": "ভার্সন যাচাই", "version_check_settings_description": "নতুন ভার্সনের নোটিফিকেশন চালু/বন্ধ করুন", "video_conversion_job": "ভিডিও ট্রান্সকোড করুন", @@ -445,67 +491,174 @@ "admin_password": "অ্যাডমিনের পাসওয়ার্ড", "administration": "অ্যাডমিন", "advanced": "অ্যাডভান্সড", + "advanced_settings_clear_image_cache": "ছবির ক্যাশ পরিষ্কার করুন", + "advanced_settings_clear_image_cache_error": "ছবির ক্যাশ পরিষ্কার করতে ব্যর্থ হয়েছে", + "advanced_settings_clear_image_cache_success": "সফলভাবে {size} পরিষ্কার করা হয়েছে", + "advanced_settings_log_level_title": "লগ লেভেল: {level}", + "advanced_settings_prefer_remote_subtitle": "কিছু ডিভাইসে লোকাল অ্যাসেট থেকে থাম্বনেইল লোড হতে অত্যন্ত ধীরগতি হয়। রিমোট ছবি লোড করার জন্য এই সেটিং চালু করুন।", + "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_sync_remote_deletions_subtitle": "ওয়েবে কোনো ফাইল মুছে ফেলা বা ফিরিয়ে আনা হলে, এই যন্ত্রেও তা স্বয়ংক্রিয়ভাবে করা হবে", + "advanced_settings_sync_remote_deletions_title": "সুদূরের মুছে ফেলাগুলো সঙ্গতিপূর্ণ করুন [পরীক্ষামূলক]", + "advanced_settings_tile_subtitle": "অভিজ্ঞ ব্যবহারকারীর সেটিংস", + "advanced_settings_troubleshooting_subtitle": "সমস্যা সমাধানের জন্য অতিরিক্ত বৈশিষ্ট্য চালু করুন", + "advanced_settings_troubleshooting_title": "ত্রুটি নিরসন", "age_months": "বয়স {months, plural, one {# month} other {# months}}", "age_year_months": "বয়স ১ বছর, {months, plural, one {# month} other {# months}}", + "age_years": "{years, plural, other {বয়স #}}", + "album": "অ্যালবাম", "album_added": "অ্যালবাম যুক্ত করা হয়েছে", "album_added_notification_setting_description": "শেয়ার করা অ্যালবামে যুক্ত হলে ইমেইল নোটিফিকেশন পান", "album_cover_updated": "অ্যালবামের কভার আপডেট হয়েছে", "album_delete_confirmation": "আপনি কি সত্যিই অ্যালবাম {album} মুছে ফেলতে চান?", "album_delete_confirmation_description": "অ্যালবামটি শেয়ার করা থাকলেও অন্য ব্যবহারকারীরা আর এটি অ্যাক্সেস করতে পারবেন না।", + "album_deleted": "অ্যালবাম মুছে ফেলা হয়েছে", "album_info_updated": "অ্যালবামের তথ্য আপডেট করা হয়েছে", "album_name": "অ্যালবামের নাম", "album_options": "অ্যালবামের অপশনসমূহ", "album_remove_user": "ব্যবহারকারী সরাতে চান?", "album_remove_user_confirmation": "আপনি কি নিশ্চিত যে আপনি {user}-কে সরাতে চান?", + "album_search_not_found": "আপনার খোঁজের সাথে মিলে যায় এমন কোনো অ্যালবাম পাওয়া যায়নি", "album_share_no_users": "এই অ্যালবামটি সব ব্যবহারকারীর সঙ্গে শেয়ার করা হয়েছে, বা শেয়ার করার জন্য কোনো ব্যবহারকারী নেই।", + "album_summary": "অ্যালবামের সারসংক্ষেপ", "album_updated": "অ্যালবাম আপডেট করা হয়েছে", "album_updated_setting_description": "নতুন অ্যাসেট যুক্ত হলে শেয়ার করা অ্যালবামের জন্য ইমেইল নোটিফিকেশন পান", + "album_upload_assets": "আপনার কম্পিউটার থেকে ফাইল আপলোড করে অ্যালবামে যুক্ত করুন", + "album_viewer_appbar_share_err_delete": "অ্যালবাম মুছে ফেলতে ব্যর্থ হয়েছে", + "album_viewer_page_share_add_users": "ব্যবহারকারী যুক্ত করুন", "album_with_link_access": "লিঙ্ক থাকা যে কেউ এই অ্যালবামের ছবি ও মানুষজনকে দেখতে পারবে।", "albums": "অ্যালবামসমূহ", + "albums_count": "{count, plural, one {{count, number}টি অ্যালবাম} other {{count, number}টি অ্যালবাম}}", + "albums_default_sort_order": "অ্যালবাম সাজানোর স্বাভাবিক ক্রম", + "albums_default_sort_order_description": "নতুন অ্যালবাম তৈরি করার সময় ফাইল সাজানোর প্রাথমিক ক্রম।", + "albums_feature_description": "একাধিক ফাইলের সংগ্রহ, যা অন্য ব্যবহারকারীদের সাথে শেয়ার করা যায়।", + "albums_on_device_count": "ডিভাইসে থাকা অ্যালবাম ({count})", "all": "সব", "all_albums": "সকল অ্যালবামসমূহ", "all_people": "সব ব্যবহারকারী", + "all_photos": "সব ছবি", "all_videos": "সব ভিডিও", "allow_dark_mode": "ডার্ক মোড চালু করুন", "allow_public_user_to_download": "সাধারণ ব্যবহারকারী ডাউনলোড করতে পারবে", "allow_public_user_to_upload": "সাধারণ ব্যবহারকারী আপলোড করতে পারবে", + "allowed": "অনুমোদিত", + "alt_text_qr_code": "QR কোড ছবি", + "always_keep": "সবসময় রাখুন", + "always_keep_photos_hint": "স্পেস খালি করার ফিচারটি এই ডিভাইসের সব ছবি রেখে দেবে।", + "always_keep_videos_hint": "স্পেস খালি করার ফিচারটি এই ডিভাইসের সব ভিডিও রেখে দেবে।", "api_key": "API কী", "api_key_description": "এই মান একবারই দেখানো হবে। উইন্ডো বন্ধ করার আগে অবশ্যই এটি কপি করুন।", "api_key_empty": "API কী-এর নাম খালি রাখা যাবে না", "api_keys": "API কী সমূহ", + "app_architecture_variant": "প্রকরণ (স্থাপত্যশৈলী)", + "app_bar_signout_dialog_content": "আপনি কি সাইন আউট করতে নিশ্চিত?", + "app_bar_signout_dialog_title": "সাইন আউট", + "app_download_links": "অ্যাপ ডাউনলোড লিংকসমূহ", "app_settings": "অ্যাপ সেটিংস", + "app_stores": "অ্যাপ ভাণ্ডার", + "app_update_available": "অ্যাপের নতুন আপডেট পাওয়া যাচ্ছে", "appears_in": "v1.106.4 থেকে, অ্যাসেট সাইডবারে ব্যবহার হয় ‘[albums]-এ উপস্থিত’ বোঝাতে", + "apply_count": "প্রয়োগ করুন ({count, number})", "archive": "আর্কাইভ", + "archive_action_prompt": "{count}টি আর্কাইভে যুক্ত করা হয়েছে", "archive_or_unarchive_photo": "ফটো আর্কাইভ অথবা আনআর্কাইভ করুন", "archive_size": "আর্কাইভ সাইজ", "archive_size_description": "ডাউনলোডের আর্কাইভ সাইজ নির্ধারণ করুন (GiB)", + "archived": "আর্কাইভ করা হয়েছে", + "archived_count": "{count, plural, other {আর্কাইভ করা হয়েছে #}}", "are_these_the_same_person": "এরা কি একই ব্যক্তি?", "are_you_sure_to_do_this": "আপনি কি নিশ্চিত যে আপনি এটি করতে চান?", "asset_added_to_album": "অ্যালবামে যুক্ত করা হয়েছে", "asset_adding_to_album": "অ্যালবামে যুক্ত করা হচ্ছে…", + "asset_created": "সম্পদ তৈরি হয়েছে", + "asset_day_count": "{date}: {count, plural, one {#টি সম্পদ} other {#টি সম্পদ}}", "asset_description_updated": "অ্যাসেটের বিবরণ আপডেট করা হয়েছে", "asset_hashing": "হ্যাশিং চলছে…", + "asset_list_group_by_sub_title": "দলভুক্ত করুন", + "asset_list_layout_settings_group_by": "সম্পদ দলভুক্ত করুন", + "asset_list_layout_settings_group_by_month_day": "মাস + দিন", + "asset_list_layout_sub_title": "বিন্যাস", + "asset_list_settings_subtitle": "ছবির গ্রিড বিন্যাস সেটিংস", + "asset_list_settings_title": "ছবির গ্রিড", + "asset_not_found_on_device_android": "ডিভাইসে সম্পদ পাওয়া যায়নি", + "asset_not_found_on_device_ios": "ডিভাইসে সম্পদ পাওয়া যায়নি। আপনি যদি iCloud ব্যবহার করে থাকেন, তাহলে iCloud-এ সংরক্ষিত ফাইলটি ত্রুটিপূর্ণ থাকার কারণে সম্পদটি অ্যাক্সেসযোগ্য নাও হতে পারে", + "asset_not_found_on_icloud": "iCloud-এ সম্পদ পাওয়া যায়নি। iCloud-এ সংরক্ষিত ফাইলটি ত্রুটিপূর্ণ থাকার কারণে সম্পদটি অ্যাক্সেসযোগ্য নাও হতে পারে", "asset_offline": "অ্যাসেট বর্তমানে অফলাইন", "asset_offline_description": "এই এক্সটার্নাল অ্যাসেটটি এখন ডিস্কে নেই। সহায়তার জন্য Immich অ্যাডমিনিস্ট্রেটরের সাথে যোগাযোগ করুন।", "asset_skipped": "এড়ানো হয়েছে", "asset_skipped_in_trash": "ট্র্যাশে", + "asset_troubleshoot": "সম্পদ ত্রুটি নিরসন", "asset_uploaded": "আপলোড সম্পন্ন", "asset_uploading": "আপলোড চলছে…", + "asset_viewer_settings_subtitle": "আপনার গ্যালারি প্রদর্শক সেটিংস পরিচালনা করুন", + "asset_viewer_settings_title": "সম্পদ প্রদর্শক", "assets": "অ্যাসেটসমূহ", "assets_added_to_album_count": "অ্যালবামে {count, plural, one {# asset} other {# assets}} যুক্ত করা হয়েছে", + "assets_added_to_album_partial_count": "অ্যালবামে {totalCount}টির মধ্যে {successCount}টি {totalCount, plural, one {সম্পদ} other {সম্পদ}} যুক্ত করা হয়েছে", + "assets_added_to_albums_count": "{albumTotal, plural, one {#টি অ্যালবামে} other {#টি অ্যালবামে}} {assetTotal, plural, one {#টি সম্পদ} other {#টি সম্পদ}} যুক্ত করা হয়েছে", + "assets_cannot_be_added_to_album_count": "{count, plural, one {সম্পদটি} other {সম্পদগুলো}} অ্যালবামে যুক্ত করা যাচ্ছে না", + "assets_cannot_be_added_to_albums": "{count, plural, one {সম্পদটি} other {সম্পদগুলো}} কোনো অ্যালবামেই যুক্ত করা যাচ্ছে না", + "assets_count": "{count, plural, one {#টি সম্পদ} other {#টি সম্পদ}}", "assets_moved_to_trash_count": "{count, plural, one {# asset} other {# assets}} ট্র্যাশে সরানো হয়েছে", "assets_permanently_deleted_count": "{count, plural, one {# asset} other {# assets}} স্থায়ীভাবে মুছে ফেলা হয়েছে", "assets_removed_count": "{count, plural, one {# asset} other {# assets}} সরানো হয়েছে", "assets_restore_confirmation": "আপনি কি সত্যিই আপনার সব ট্র্যাশ করা অ্যাসেট পুনরুদ্ধার করতে চান? এটি পূর্বাবস্থায় ফিরানো যাবে না। তবে অফলাইন অ্যাসেট এইভাবে পুনরুদ্ধার হবে না।", "assets_restored_count": "{count, plural, one {# asset} other {# assets}} পুনরুদ্ধার করা হয়েছে", + "assets_trashed": "{count}টি সম্পদ আবর্জনায় সরানো হয়েছে", "assets_trashed_count": "{count, plural, one {# asset} other {# assets}} ট্র্যাশে পাঠানো হয়েছে", "assets_were_part_of_album_count": "{count, plural, one {Asset was} other {Assets were}} আগেই অ্যালবামে যুক্ত ছিল", + "assets_were_part_of_albums_count": "{count, plural, one {সম্পদটি ইতিমধ্যে অ্যালবামের অংশ ছিল} other {সম্পদগুলো ইতিমধ্যে অ্যালবামের অংশ ছিল}}", "authorized_devices": "অনুমোদিত ডিভাইস", + "automatic_endpoint_switching_subtitle": "নির্দিষ্ট Wi-Fi উপলব্ধ থাকলে তার মাধ্যমে স্থানীয়ভাবে সংযুক্ত হন, অন্যত্র বিকল্প সংযোগ ব্যবহার করুন", + "automatic_endpoint_switching_title": "স্বয়ংক্রিয় URL পরিবর্তন", + "autoplay_slideshow": "ছবির প্রদর্শনী স্বয়ংক্রিয়ভাবে চালান", "back": "ফিরে যান", "back_close_deselect": "ফিরে যান, বন্ধ করুন বা নির্বাচন বাতিল করুন", + "background_location_permission": "ব্যাকগ্রাউন্ড লোকেশন অনুমতি", + "background_location_permission_content": "ব্যাকগ্রাউন্ডে চলার সময় নেটওয়ার্ক পরিবর্তন করতে হলে, ইমিচ-কে সবসময় সুনির্দিষ্ট লোকেশন অ্যাক্সেস দিতে হবে, যাতে অ্যাপটি Wi-Fi নেটওয়ার্কের নাম পড়তে পারে", + "background_options": "ব্যাকগ্রাউন্ড নির্বাচনী", + "backup": "ব্যাকআপ", + "backup_album_selection_page_albums_tap": "অন্তর্ভুক্ত করতে ট্যাপ করুন, বাদ দিতে ডাবল ট্যাপ করুন", + "backup_album_selection_page_assets_scatter": "সম্পদ একাধিক অ্যালবামে ছড়িয়ে থাকতে পারে। তাই ব্যাকআপ প্রক্রিয়ার সময় অ্যালবাম অন্তর্ভুক্ত বা বাদ দেওয়া যায়।", + "backup_album_selection_page_select_albums": "অ্যালবাম নির্বাচন করুন", + "backup_album_selection_page_selection_info": "নির্বাচনের তথ্য", + "backup_albums_sync": "ব্যাকআপ অ্যালবাম সমন্বয়", + "backup_background_service_complete_notification": "সম্পদ ব্যাকআপ সম্পন্ন হয়েছে", + "backup_background_service_default_notification": "নতুন সম্পদ খোঁজা হচ্ছে…", + "backup_background_service_in_progress_notification": "আপনার সম্পদ ব্যাকআপ করা হচ্ছে…", + "backup_controller_page_albums": "ব্যাকআপ অ্যালবামসমূহ", + "backup_controller_page_background_battery_info_link": "কীভাবে করব দেখান", + "backup_controller_page_background_battery_info_message": "সবচেয়ে ভালো ব্যাকগ্রাউন্ড ব্যাকআপ অভিজ্ঞতার জন্য, ইমিচ-এর ব্যাকগ্রাউন্ড কার্যক্রম সীমিত করে এমন যেকোনো ব্যাটারি অপ্টিমাইজেশন বন্ধ করুন।\n\nএটি ডিভাইস-নির্দিষ্ট বিষয় বলে, আপনার ডিভাইস প্রস্তুতকারকের জন্য প্রয়োজনীয় তথ্য খুঁজে দেখুন।", + "backup_controller_page_background_battery_info_ok": "ঠিক আছে", + "backup_controller_page_background_battery_info_title": "ব্যাটারি অপ্টিমাইজেশন", + "backup_controller_page_background_delay": "নতুন সম্পদের ব্যাকআপ বিলম্বিত করুন: {duration}", + "backup_controller_page_backup": "ব্যাকআপ", + "backup_controller_page_backup_selected": "নির্বাচিত: ", + "backup_controller_page_backup_sub": "ব্যাকআপ করা ছবি ও ভিডিও", + "backup_controller_page_excluded": "বাদ দেওয়া হয়েছে: ", + "backup_controller_page_none_selected": "কিছুই নির্বাচিত হয়নি", + "backup_controller_page_remainder": "অবশিষ্ট", + "backup_controller_page_remainder_sub": "নির্বাচন থেকে ব্যাকআপ করার বাকি থাকা ছবি ও ভিডিও", + "backup_controller_page_server_storage": "সার্ভারের সংরক্ষণাগার", + "backup_controller_page_storage_format": "{total}-এর মধ্যে {used} ব্যবহৃত হয়েছে", + "backup_controller_page_to_backup": "যেসব অ্যালবাম ব্যাকআপ করা হবে", + "backup_controller_page_total_sub": "নির্বাচিত অ্যালবামের সব অনন্য ছবি ও ভিডিও", + "backup_error_sync_failed": "সমন্বয় ব্যর্থ হয়েছে। ব্যাকআপ প্রক্রিয়া করা যাচ্ছে না।", + "backup_info_card_assets": "সম্পদসমূহ", + "backup_options": "ব্যাকআপ সংক্রান্ত ব্যবস্থা", + "backup_settings_subtitle": "আপলোড সংক্রান্ত ব্যবস্থা পরিচালনা করুন", "backward": "পিছনে", + "battery_optimization_backup_reliability": "ব্যাটারি অপ্টিমাইজেশন বন্ধ করলে ব্যাকগ্রাউন্ড ব্যাকআপের নির্ভরযোগ্যতা বাড়তে পারে", + "biometric_auth_enabled": "বায়োমেট্রিক প্রমাণীকরণ চালু করা হয়েছে", + "biometric_locked_out": "আপনি বায়োমেট্রিক প্রমাণীকরণ থেকে বাদ পড়ে গেছেন", + "biometric_no_options": "কোনো বায়োমেট্রিক বিকল্প উপলব্ধ নেই", + "biometric_not_available": "এই ডিভাইসে বায়োমেট্রিক প্রমাণীকরণ উপলব্ধ নেই", "birthdate_set_description": "একটি ছবির সময়ে ব্যক্তির বয়স গণনার জন্য জন্ম তারিখ ব্যবহার করা হয়।", "blurred_background": "ব্লারড ব্যাকগ্রাউন্ড", + "browse_templates": "টেমপ্লেট দেখুন", "bugs_and_feature_requests": "বাগ ও ফিচার রিকোয়েস্ট", "build": "বিল্ড", "build_image": "বিল্ড ইমেজ", @@ -518,45 +671,107 @@ "camera_model": "ক্যামেরা মডেল", "cancel": "বাতিল", "cancel_search": "সার্চ বন্ধ করুন", + "canceled": "বাতিল করা হয়েছে", + "canceling": "বাতিল করা হচ্ছে", "cannot_merge_people": "ব্যক্তিদের একত্র করা সম্ভব নয়", "cannot_undo_this_action": "এই কাজ পূর্বাবস্থায় ফেরানো যাবে না!", "cannot_update_the_description": "বিবরণ পরিবর্তন সম্ভব নয়", + "cast": "কাস্ট", + "cast_description": "উপলব্ধ কাস্ট গন্তব্যস্থল নির্ধারণ করুন", + "change": "পরিবর্তন", "change_date": "তারিখ পরিবর্তন", + "change_description": "বিবরণ পরিবর্তন করুন", + "change_display_order": "প্রদর্শনের ক্রম পরিবর্তন করুন", "change_location": "লোকেশন পরিবর্তন", "change_name": "নাম পরিবর্তন করুন", "change_name_successfully": "নাম সফলভাবে পরিবর্তন হয়েছে", "change_password": "পাসওয়ার্ড পরিবর্তন করুন", "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": "PIN কোড পরিবর্তন করুন", "change_your_password": "আপনার পাসওয়ার্ড পরিবর্তন করুন", "changed_visibility_successfully": "ভিসিবিলিটি সফলভাবে পরিবর্তন হয়েছে", + "charging": "চার্জ হচ্ছে", + "charging_requirement_mobile_backup": "ব্যাকগ্রাউন্ড ব্যাকআপের জন্য ডিভাইস চার্জে থাকা প্রয়োজন", "check_logs": "লগ দেখুন", + "checksum": "সততা-যাচাই", + "choose": "নির্বাচন করুন", "choose_matching_people_to_merge": "একত্র করার জন্য মিল থাকা ব্যক্তিদের নির্বাচন করুন", "city": "শহর", + "cleanup_confirm_description": "ইমিচ সার্ভারে নিরাপদে ব্যাকআপ হওয়া {count}টি সম্পদ (যেগুলো {date}-এর আগে তৈরি) খুঁজে পেয়েছে। এই ডিভাইস থেকে স্থানীয় কপিগুলো মুছে ফেলবেন?", + "cleanup_confirm_prompt_title": "এই ডিভাইস থেকে মুছে ফেলবেন?", + "cleanup_deleted_assets": "{count}টি সম্পদ ডিভাইসের ট্র্যাশে সরানো হয়েছে", + "cleanup_deleting": "ট্র্যাশে সরানো হচ্ছে..।", + "cleanup_found_assets": "{count}টি ব্যাকআপ করা সম্পদ পাওয়া গেছে", + "cleanup_found_assets_with_size": "{count}টি ব্যাকআপ করা সম্পদ পাওয়া গেছে ({size})", + "cleanup_icloud_shared_albums_excluded": "iCloud শেয়ার করা অ্যালবাম স্ক্যান থেকে বাদ রাখা হয়েছে", + "cleanup_no_assets_found": "উপরের শর্তের সাথে মিলে যায় এমন কোনো সম্পদ পাওয়া যায়নি। স্পেস খালি করার ফিচারটি শুধুমাত্র সার্ভারে ব্যাকআপ হওয়া সম্পদ মুছতে পারে", + "cleanup_preview_title": "মুছে ফেলার জন্য সম্পদ ({count})", + "cleanup_step3_description": "আপনার তারিখ ও রাখার সেটিংসের সাথে মিলে যায় এমন ব্যাকআপ করা সম্পদ খুঁজুন।", + "cleanup_step4_summary": "আপনার স্থানীয় ডিভাইস থেকে মুছে ফেলার জন্য {count}টি সম্পদ ({date}-এর আগে তৈরি)। ইমিচ অ্যাপ থেকে ছবিগুলো দেখা যাবে।", + "cleanup_trash_hint": "সম্পূর্ণভাবে স্টোরেজ স্পেস ফিরে পেতে, সিস্টেম গ্যালারি অ্যাপ খুলে ট্র্যাশ খালি করুন", "clear": "মুছুন", "clear_all": "সব মুছুন", "clear_all_recent_searches": "সাম্প্রতিক সব অনুসন্ধান পরিষ্কার করুন", + "clear_failed_count": "মুছতে ব্যর্থ হয়েছে ({count})", + "clear_file_cache": "ফাইল ক্যাশ পরিষ্কার করুন", "clear_message": "মেসেজ পরিষ্কার করুন", "clear_value": "ভ্যালু মুছুন", + "client_cert_import": "আমদানি করুন", + "client_cert_import_success_msg": "ক্লায়েন্ট সার্টিফিকেট আমদানি করা হয়েছে", + "client_cert_invalid_msg": "ভুল সার্টিফিকেট ফাইল বা ভুল পাসওয়ার্ড", + "client_cert_password_message": "এই সার্টিফিকেটের জন্য পাসওয়ার্ড দিন", + "client_cert_password_title": "সার্টিফিকেট পাসওয়ার্ড", + "client_cert_remove_msg": "ক্লায়েন্ট সার্টিফিকেট সরানো হয়েছে", + "client_cert_subtitle": "শুধুমাত্র PKCS12 (.p12, .pfx) ফরম্যাট সমর্থিত। সার্টিফিকেট আমদানি/অপসারণ শুধুমাত্র লগইনের আগে করা যাবে", + "client_cert_title": "SSL ক্লায়েন্ট সার্টিফিকেট [পরীক্ষামূলক]", "close": "বন্ধ", "collapse": "সংকুচিত করুন", "collapse_all": "সব সংকুচিত", "color": "রং", + "command": "কমান্ড", + "command_palette_prompt": "পেজ, অ্যাকশন বা কমান্ড দ্রুত খুঁজুন", + "command_palette_to_close": "বন্ধ করতে", + "command_palette_to_navigate": "প্রবেশ করতে", + "command_palette_to_select": "নির্বাচন করতে", + "command_palette_to_show_all": "সব দেখাতে", "comment_deleted": "মন্তব্য মুছে ফেলা হয়েছে", - "comment_options": "মন্তব্য অপশন", + "comment_options": "মন্তব্য সংক্রান্ত ব্যবস্থা", "comments_and_likes": "মন্তব্য ও লাইক", "comments_are_disabled": "মন্তব্য বন্ধ করা হয়েছে", + "common_create_new_album": "নতুন অ্যালবাম তৈরি করুন", + "completed": "সম্পন্ন হয়েছে", + "configuration": "গঠনবিন্যাস", "confirm": "নিশ্চিত", "confirm_admin_password": "অ্যাডমিন পাসওয়ার্ড পুনরায় লিখুন", + "confirm_delete_face": "আপনি কি নিশ্চিত যে সম্পদ থেকে {name} মুখটি মুছে ফেলতে চান?", "confirm_delete_shared_link": "আপনি কি নিশ্চিত যে আপনি এই শেয়ার করা লিঙ্কটি মুছে ফেলতে চান?", "confirm_keep_this_delete_others": "স্ট্যাকের এই অ্যাসেট ছাড়া সব অন্যান্য অ্যাসেট মুছে যাবে। আপনি কি নিশ্চিত যে আপনি চালিয়ে যেতে চান?", + "confirm_new_pin_code": "নতুন PIN কোড নিশ্চিত করুন", "confirm_password": "পাসওয়ার্ড পুনরায় লিখুন", + "confirm_tag_face": "আপনি কি এই মুখটিকে {name} হিসেবে ট্যাগ করতে চান?", + "confirm_tag_face_unnamed": "আপনি কি এই মুখটি ট্যাগ করতে চান?", + "connected_device": "সংযুক্ত ডিভাইস", + "connected_to": "সংযুক্ত আছে", "contain": "মাপমত", "context": "প্রসঙ্গ", "continue": "এগিয়ে যান", + "control_bottom_app_bar_add_tags": "ট্যাগসমূহ যুক্ত করুন", + "control_bottom_app_bar_delete_from_local": "ডিভাইস থেকে মুছুন", + "control_bottom_app_bar_edit_location": "লোকেশন পরিবর্তন করুন", + "control_bottom_app_bar_edit_time": "তারিখ ও সময় পরিবর্তন করুন", + "control_bottom_app_bar_trash_from_immich": "আবর্জনায় সরান", "copied_image_to_clipboard": "ছবি ক্লিপবোর্ডে কপি হয়েছে।", "copied_to_clipboard": "ক্লিপবোর্ডে কপি হয়েছে!", "copy_error": "Error-টি কপি করুন", "copy_image": "ছবি কপি", + "copy_json": "JSON কপি", "copy_link": "লিঙ্ক কপি", "copy_link_to_clipboard": "ক্লিপবোর্ডে লিঙ্ক কপি করুন", "copy_password": "পাসওয়ার্ড কপি করুন", @@ -566,44 +781,92 @@ "covers": "কভারস", "create": "তৈরি করুন", "create_album": "অ্যালবাম তৈরি", + "create_album_page_untitled": "শিরোনামহীন", + "create_api_key": "এপিআই কী তৈরি করুন", + "create_first_workflow": "প্রথম কর্মপ্রবাহ তৈরি করুন", "create_library": "লাইব্রেরি তৈরি", "create_link": "লিঙ্ক তৈরি", "create_link_to_share": "শেয়ার লিঙ্ক তৈরি", "create_link_to_share_description": "লিঙ্কের মাধ্যমে সবাই নির্বাচিত ছবি দেখতে পারবে", + "create_new": "নতুন তৈরি করুন", "create_new_person": "নতুন ব্যক্তি যোগ করুন", "create_new_person_hint": "নির্বাচিত অ্যাসেট নতুন ব্যক্তির সঙ্গে যুক্ত করুন", "create_new_user": "নতুন ব্যবহারকারী যোগ করুন", + "create_person": "ব্যক্তি তৈরি করুন", + "create_person_subtitle": "নির্বাচিত চেহারায় একটি নাম যুক্ত করে নতুন ব্যক্তি তৈরি ও চিহ্নিত করুন", + "create_shared_album_page_share_add_assets": "সম্পদ যুক্ত করুন", + "create_shared_album_page_share_select_photos": "ছবি নির্বাচন করুন", + "create_shared_link": "শেয়ার লিংক তৈরি করুন", "create_tag": "ট্যাগ তৈরি", "create_tag_description": "নতুন ট্যাগ তৈরি করুন। নেস্টেড ট্যাগের ক্ষেত্রে সম্পূর্ণ পাথ - ফরওয়ার্ড স্ল্যাশসহ দিন।", "create_user": "ব্যবহারকারী যোগ করুন", - "created": "যোগ করা হয়েছে", + "create_workflow": "কর্মপ্রবাহ তৈরি করুন", + "created": "তৈরি হয়েছে", + "created_at": "তৈরি হওয়ার সময়", + "creating_linked_albums": "সংযুক্ত অ্যালবাম তৈরি করা হচ্ছে..।", + "crop": "কাটছাঁট", + "crop_aspect_ratio_free": "মুক্ত", + "crop_aspect_ratio_original": "মূল", + "crop_aspect_ratio_square": "বর্গাকার", "current_device": "চলতি ডিভাইস", - "custom_locale": "কাস্টম লোকেল", + "current_pin_code": "বর্তমান PIN কোড", + "current_server_address": "বর্তমান সার্ভার ঠিকানা", + "custom_date": "স্বনির্ধারিত তারিখ", + "custom_locale": "স্বনির্ধারিত লোকেল", "custom_locale_description": "নির্বাচিত ভাষা এবং অঞ্চলের ভিত্তিতে তারিখ, সময় এবং সংখ্যা ফরম্যাট করুন", - "dark": "ডার্ক", + "cutoff_date_description": "সাম্প্রতিক এই সময়কালের ছবি রাখুন…", + "cutoff_day": "{count, plural, one {দিন} other {দিন}}", + "cutoff_year": "{count, plural, one {বছর} other {বছর}}", + "dark": "অন্ধকার", + "dark_theme": "অন্ধকার থিমে পরিবর্তন করুন", + "date": "তারিখ", "date_after": "এর পরের তারিখ", "date_and_time": "তারিখ এবং সময়", "date_before": "এর আগের তারিখ", + "date_of_birth": "জন্ম তারিখ", "date_of_birth_saved": "জন্ম তারিখ সফলভাবে সংরক্ষণ করা হয়েছে", + "date_range": "তারিখের পরিসীমা", + "date_time_original": "মূল তারিখ/সময়", + "day": "দিন", + "days": "দিন", + "deduplicate_all": "সব ডুপ্লিকেট সরান", + "default_quality_subtitle": "শেয়ার বাটনে ট্যাপ করার সময় ব্যবহৃত মান। প্রতিবার নির্বাচন করতে শেয়ার বাটনে দীর্ঘক্ষণ চাপ দিন।", + "default_share_quality": "ডিফল্ট শেয়ার মান", "delete": "মুছুন", + "delete_action_confirmation_message": "আপনি কি নিশ্চিত যে এই সম্পদটি মুছে ফেলতে চান? এই কাজটি সম্পদটিকে সার্ভারের আবর্জনায় সরিয়ে দেবে এবং স্থানীয়ভাবেও মুছে ফেলতে চান কিনা তা জিজ্ঞাসা করবে", + "delete_action_prompt": "{count}টি মুছে ফেলা হয়েছে", "delete_album": "অ্যালবাম মুছুন", "delete_api_key_prompt": "আপনি কি সত্যিই এই API key মুছে ফেলতে চান?", + "delete_dialog_alert": "এই আইটেমগুলো Immich এবং আপনার ডিভাইস থেকে স্থায়ীভাবে মুছে ফেলা হবে", + "delete_dialog_alert_local": "এই আইটেমগুলো আপনার ডিভাইস থেকে স্থায়ীভাবে সরানো হবে, তবে Immich সার্ভারে উপলব্ধ থাকবে", + "delete_dialog_alert_local_non_backed_up": "কিছু আইটেম Immich-এ ব্যাকআপ করা নেই এবং সেগুলো আপনার ডিভাইস থেকে স্থায়ীভাবে সরানো হবে", + "delete_dialog_title": "স্থায়ীভাবে মুছুন", "delete_duplicates_confirmation": "আপনি কি সত্যিই এই ডুপ্লিকেটগুলো স্থায়ীভাবে মুছতে চান?", + "delete_face": "মুখ মুছুন", "delete_key": "key মুছুন", "delete_library": "লাইব্রেরি মুছুন", "delete_link": "লিঙ্ক মুছুন", + "delete_local_action_prompt": "{count}টি স্থানীয়ভাবে মুছে ফেলা হয়েছে", + "delete_local_dialog_ok_backed_up_only": "শুধুমাত্র ব্যাকআপ করাগুলো মুছুন", + "delete_local_dialog_ok_force": "তবুও মুছুন", "delete_others": "বাকিগুলো মুছুন", + "delete_permanently": "স্থায়ীভাবে মুছুন", + "delete_permanently_action_prompt": "{count}টি স্থায়ীভাবে মুছে ফেলা হয়েছে", "delete_shared_link": "শেয়ার করা লিঙ্ক মুছুন", + "delete_shared_link_dialog_title": "শেয়ার লিংক মুছুন", "delete_tag": "ট্যাগ মুছুন", "delete_tag_confirmation_prompt": "আপনি কি নিশ্চিতভাবে {tagName} ট্যাগটি মুছতে চান?", "delete_user": "ইউজার মুছুন", "deleted_shared_link": "শেয়ার করা লিঙ্কটি মুছুন", "description": "বিবরন", + "deselect_all": "সব নির্বাচন বাতিল করুন", "details": "বিস্তারিত", "direction": "দিকনির্দেশনা", + "disable": "নিষ্ক্রিয় করুন", "disabled": "নিষ্ক্রিয়", "discord": "ডিসকর্ড", "discover": "ডিসকভার", + "discovered_devices": "শনাক্ত হওয়া ডিভাইস", "dismiss_all_errors": "সব ত্রুটি বাতিল করুন", "display_options": "ডিসপ্লে অপশন", "display_order": "ডিসপ্লে অর্ডার", @@ -613,13 +876,1416 @@ "documentation": "সহায়ক নির্দেশিকা", "done": "সম্পন্ন", "download": "ডাউনলোড", + "download_canceled": "ডাউনলোড বাতিল হয়েছে", + "download_complete": "ডাউনলোড সম্পন্ন হয়েছে", + "download_enqueue": "ডাউনলোড সারিতে যুক্ত হয়েছে", + "download_failed": "ডাউনলোড ব্যর্থ হয়েছে", + "download_finished": "ডাউনলোড শেষ হয়েছে", "download_include_embedded_motion_videos": "এমবেডেড ভিডিও", "download_include_embedded_motion_videos_description": "মোশন ফটোর (motion photos) মধ্যে থাকা ভিডিওগুলোকে আলাদা ফাইল হিসেবে অন্তর্ভুক্ত করুন", + "download_notfound": "ডাউনলোড খুঁজে পাওয়া যায়নি", + "download_original": "মূল ফাইল ডাউনলোড করুন", + "download_paused": "ডাউনলোড থামানো হয়েছে", "download_settings": "ডাউনলোড", "download_settings_description": "অ্যাসেট ডাউনলোডের সেটিংস পরিচালনা করুন", + "download_waiting_to_retry": "পুনরায় চেষ্টার জন্য অপেক্ষা করা হচ্ছে", + "downloading": "ডাউনলোড হচ্ছে", + "downloading_asset_filename": "{filename} অ্যাসেট ডাউনলোড হচ্ছে", + "downloading_from_icloud": "iCloud থেকে ডাউনলোড হচ্ছে", + "downloading_media": "মিডিয়া ডাউনলোড হচ্ছে", + "drag_to_reorder": "ক্রম পরিবর্তন করতে টেনে আনুন", + "drop_files_to_upload": "আপলোড করতে যেকোনো জায়গায় ফাইল ড্রপ করুন", + "duplicate": "ডুপ্লিকেট", + "duplicate_workflow": "ওয়ার্কফ্লো ডুপ্লিকেট করুন", + "duplicates": "ডুপ্লিকেট", + "duplicates_description": "কোনগুলো, যদি থাকে, ডুপ্লিকেট তা চিহ্নিত করে প্রতিটি গ্রুপ সমাধান করুন।", + "duration": "সময়কাল", + "edit": "সম্পাদনা", + "edit_album": "অ্যালবাম সম্পাদনা করুন", + "edit_avatar": "অ্যাভাটার সম্পাদনা করুন", + "edit_birthday": "জন্মদিন সম্পাদনা করুন", + "edit_date": "তারিখ সম্পাদনা করুন", + "edit_date_and_time": "তারিখ ও সময় সম্পাদনা করুন", + "edit_date_and_time_action_prompt": "{count}টি তারিখ ও সময় সম্পাদনা করা হয়েছে", + "edit_date_and_time_by_offset": "অফসেট অনুযায়ী তারিখ পরিবর্তন করুন", + "edit_description": "বিবরণ সম্পাদনা করুন", + "edit_exclusion_pattern": "বর্জন প্যাটার্ন সম্পাদনা করুন", + "edit_faces": "মুখ সম্পাদনা করুন", + "edit_key": "কী সম্পাদনা করুন", + "edit_link": "লিংক সম্পাদনা করুন", + "edit_location": "অবস্থান সম্পাদনা করুন", + "edit_location_action_prompt": "{count}টি অবস্থান সম্পাদনা করা হয়েছে", + "edit_location_dialog_title": "অবস্থান", + "edit_name": "নাম সম্পাদনা করুন", + "edit_people": "ব্যক্তি সম্পাদনা করুন", + "edit_tag": "ট্যাগ সম্পাদনা করুন", + "edit_title": "শিরোনাম সম্পাদনা করুন", + "edit_user": "ব্যবহারকারী সম্পাদনা করুন", + "edit_workflow": "ওয়ার্কফ্লো সম্পাদনা করুন", + "editor": "এডিটর", + "editor_discard_edits_confirm": "সম্পাদনা বাতিল করুন", + "editor_discard_edits_prompt": "আপনার কিছু সম্পাদনা সংরক্ষিত হয়নি। আপনি কি নিশ্চিত যে আপনি সেগুলো বাতিল করতে চান?", + "editor_discard_edits_title": "সম্পাদনা বাতিল করবেন?", + "editor_edits_applied_error": "সম্পাদনা প্রয়োগ করা ব্যর্থ হয়েছে", + "editor_edits_applied_success": "সম্পাদনা সফলভাবে প্রয়োগ হয়েছে", + "editor_flip_horizontal": "অনুভূমিকভাবে ফ্লিপ করুন", + "editor_flip_vertical": "উলম্বভাবে ফ্লিপ করুন", + "editor_handle_corner": "{corner, select, top_left {উপরে-বামে} top_right {উপরে-ডানে} bottom_left {নিচে-বামে} bottom_right {নিচে-ডানে} other {একটি}} কোণ হ্যান্ডেল", + "editor_handle_edge": "{edge, select, top {উপরের} bottom {নিচের} left {বামের} right {ডানের} other {একটি}} প্রান্ত হ্যান্ডেল", + "editor_orientation": "ওরিয়েন্টেশন", + "editor_reset_all_changes": "পরিবর্তন রিসেট করুন", + "editor_rotate_left": "৯০° ঘড়ির কাঁটার বিপরীতে ঘোরান", + "editor_rotate_right": "৯০° ঘড়ির কাঁটার দিকে ঘোরান", + "email": "ইমেইল", + "email_notifications": "ইমেইল নোটিফিকেশন", + "empty_folder": "এই ফোল্ডারটি খালি", + "empty_trash": "ট্র্যাশ খালি করুন", + "empty_trash_confirmation": "আপনি কি নিশ্চিত যে আপনি ট্র্যাশ খালি করতে চান? এতে ট্র্যাশে থাকা সব অ্যাসেট Immich থেকে স্থায়ীভাবে মুছে যাবে।\nএই কাজটি পূর্বাবস্থায় ফেরানো যাবে না!", + "enable": "চালু করুন", + "enable_backup": "ব্যাকআপ চালু করুন", + "enable_biometric_auth_description": "বায়োমেট্রিক প্রমাণীকরণ চালু করতে আপনার পিন কোড লিখুন", + "enabled": "চালু আছে", + "end_date": "শেষ তারিখ", + "enqueued": "সারিতে যুক্ত হয়েছে", + "enter_wifi_name": "Wi-Fi নাম লিখুন", + "enter_your_pin_code": "আপনার পিন কোড লিখুন", + "enter_your_pin_code_subtitle": "লক করা ফোল্ডার অ্যাক্সেস করতে আপনার পিন কোড লিখুন", + "error": "ত্রুটি", + "error_delete_face": "অ্যাসেট থেকে মুখ মুছতে ত্রুটি হয়েছে", + "error_loading_albums": "অ্যালবাম লোড করতে ত্রুটি হয়েছে", + "error_loading_image": "ছবি লোড করতে ত্রুটি হয়েছে", + "error_loading_partners": "পার্টনার লোড করতে ত্রুটি: {error}", + "error_retrieving_asset_information": "অ্যাসেটের তথ্য আনতে ত্রুটি হয়েছে", + "error_saving_image": "ত্রুটি: {error}", + "error_tag_face_bounding_box": "মুখ ট্যাগ করতে ত্রুটি - বাউন্ডিং বক্সের স্থানাঙ্ক পাওয়া যায়নি", + "error_title": "ত্রুটি - কিছু একটা ভুল হয়েছে", + "error_while_navigating": "অ্যাসেটে যেতে ত্রুটি হয়েছে", + "errors": { + "cannot_navigate_next_asset": "পরবর্তী অ্যাসেটে যাওয়া যায়নি", + "cannot_navigate_previous_asset": "পূর্ববর্তী অ্যাসেটে যাওয়া যায়নি", + "cant_apply_changes": "পরিবর্তন প্রয়োগ করা যায়নি", + "cant_change_activity": "কার্যকলাপ {enabled, select, true {নিষ্ক্রিয়} other {চালু}} করা যায়নি", + "cant_change_asset_favorite": "অ্যাসেটের ফেভারিট পরিবর্তন করা যায়নি", + "cant_change_metadata_assets_count": "{count, plural, one {#টি অ্যাসেট} other {#টি অ্যাসেট}}-এর মেটাডেটা পরিবর্তন করা যায়নি", + "cant_get_faces": "মুখ পাওয়া যায়নি", + "cant_get_number_of_comments": "মন্তব্যের সংখ্যা পাওয়া যায়নি", + "cant_search_people": "ব্যক্তি খুঁজে পাওয়া যায়নি", + "cant_search_places": "স্থান খুঁজে পাওয়া যায়নি", + "error_adding_assets_to_album": "অ্যালবামে অ্যাসেট যোগ করতে ত্রুটি হয়েছে", + "error_adding_users_to_album": "অ্যালবামে ব্যবহারকারী যোগ করতে ত্রুটি হয়েছে", + "error_deleting_shared_user": "শেয়ার করা ব্যবহারকারী মুছতে ত্রুটি হয়েছে", + "error_downloading": "{filename} ডাউনলোড করতে ত্রুটি হয়েছে", + "error_hiding_buy_button": "ক্রয় বাটন লুকাতে ত্রুটি হয়েছে", + "error_removing_assets_from_album": "অ্যালবাম থেকে অ্যাসেট সরাতে ত্রুটি হয়েছে, বিস্তারিত জানতে কনসোল দেখুন", + "error_selecting_all_assets": "সব অ্যাসেট নির্বাচন করতে ত্রুটি হয়েছে", + "exclusion_pattern_already_exists": "এই বর্জন প্যাটার্নটি ইতিমধ্যে বিদ্যমান।", + "failed_to_create_album": "অ্যালবাম তৈরি করা ব্যর্থ হয়েছে", + "failed_to_create_shared_link": "শেয়ার লিংক তৈরি করা ব্যর্থ হয়েছে", + "failed_to_edit_shared_link": "শেয়ার লিংক সম্পাদনা করা ব্যর্থ হয়েছে", + "failed_to_get_people": "ব্যক্তিদের তথ্য পাওয়া ব্যর্থ হয়েছে", + "failed_to_keep_this_delete_others": "এই অ্যাসেটটি রাখা এবং অন্যগুলো মুছে ফেলা ব্যর্থ হয়েছে", + "failed_to_load_asset": "অ্যাসেট লোড করা ব্যর্থ হয়েছে", + "failed_to_load_assets": "অ্যাসেটগুলো লোড করা ব্যর্থ হয়েছে", + "failed_to_load_notifications": "নোটিফিকেশন লোড করা ব্যর্থ হয়েছে", + "failed_to_load_people": "ব্যক্তিদের তথ্য লোড করা ব্যর্থ হয়েছে", + "failed_to_remove_product_key": "প্রোডাক্ট কী সরানো ব্যর্থ হয়েছে", + "failed_to_reset_pin_code": "পিন কোড রিসেট করা ব্যর্থ হয়েছে", + "failed_to_stack_assets": "অ্যাসেট স্ট্যাক করা ব্যর্থ হয়েছে", + "failed_to_tag_assets": "অ্যাসেট ট্যাগ করা ব্যর্থ হয়েছে", + "failed_to_unstack_assets": "অ্যাসেট আনস্ট্যাক করা ব্যর্থ হয়েছে", + "failed_to_update_notification_status": "নোটিফিকেশনের অবস্থা আপডেট করা ব্যর্থ হয়েছে", + "incorrect_email_or_password": "ইমেইল অথবা পাসওয়ার্ড ভুল", + "library_folder_already_exists": "এই ইমপোর্ট পাথটি ইতিমধ্যে বিদ্যমান।", + "page_not_found": "পেজ খুঁজে পাওয়া যায়নি", + "paths_validation_failed": "{paths, plural, one {#টি পাথ} other {#টি পাথ}} যাচাই ব্যর্থ হয়েছে", + "profile_picture_transparent_pixels": "প্রোফাইল ছবিতে স্বচ্ছ (transparent) পিক্সেল থাকতে পারবে না। অনুগ্রহ করে জুম করুন এবং/অথবা ছবিটি সরান।", + "quota_higher_than_disk_size": "আপনি ডিস্কের আকারের চেয়ে বেশি কোটা নির্ধারণ করেছেন", + "something_went_wrong": "কিছু একটা ভুল হয়েছে", + "unable_to_add_album_users": "অ্যালবামে ব্যবহারকারী যোগ করা যায়নি", + "unable_to_add_assets_to_shared_link": "শেয়ার লিংকে অ্যাসেট যোগ করা যায়নি", + "unable_to_add_comment": "মন্তব্য যোগ করা যায়নি", + "unable_to_add_exclusion_pattern": "বর্জন প্যাটার্ন যোগ করা যায়নি", + "unable_to_add_partners": "পার্টনার যোগ করা যায়নি", + "unable_to_add_remove_archive": "আর্কাইভ {archived, select, true {থেকে অ্যাসেট সরানো} other {তে অ্যাসেট যোগ করা}} যায়নি", + "unable_to_add_remove_favorites": "ফেভারিট {favorite, select, true {তে অ্যাসেট যোগ করা} other {থেকে অ্যাসেট সরানো}} যায়নি", + "unable_to_archive_unarchive": "{archived, select, true {আর্কাইভ করা} other {আর্কাইভ থেকে বের করা}} যায়নি", + "unable_to_change_album_user_role": "অ্যালবাম ব্যবহারকারীর ভূমিকা পরিবর্তন করা যায়নি", + "unable_to_change_date": "তারিখ পরিবর্তন করা যায়নি", + "unable_to_change_description": "বিবরণ পরিবর্তন করা যায়নি", + "unable_to_change_favorite": "অ্যাসেটের ফেভারিট পরিবর্তন করা যায়নি", + "unable_to_change_location": "অবস্থান পরিবর্তন করা যায়নি", + "unable_to_change_password": "পাসওয়ার্ড পরিবর্তন করা যায়নি", + "unable_to_change_visibility": "{count, plural, one {#জন ব্যক্তির} other {#জন ব্যক্তির}} দৃশ্যমানতা পরিবর্তন করা যায়নি", + "unable_to_complete_oauth_login": "OAuth লগইন সম্পন্ন করা যায়নি", + "unable_to_connect": "সংযোগ করা যায়নি", + "unable_to_copy_to_clipboard": "ক্লিপবোর্ডে কপি করা যায়নি, নিশ্চিত করুন যে আপনি https এর মাধ্যমে পেজটি অ্যাক্সেস করছেন", + "unable_to_create": "ওয়ার্কফ্লো তৈরি করা যায়নি", + "unable_to_create_admin_account": "অ্যাডমিন অ্যাকাউন্ট তৈরি করা যায়নি", + "unable_to_create_api_key": "নতুন API কী তৈরি করা যায়নি", + "unable_to_create_library": "লাইব্রেরি তৈরি করা যায়নি", + "unable_to_create_user": "ব্যবহারকারী তৈরি করা যায়নি", + "unable_to_delete_album": "অ্যালবাম মুছে ফেলা যায়নি", + "unable_to_delete_asset": "অ্যাসেট মুছে ফেলা যায়নি", + "unable_to_delete_assets": "অ্যাসেট মুছতে ত্রুটি হয়েছে", + "unable_to_delete_exclusion_pattern": "বর্জন প্যাটার্ন মুছে ফেলা যায়নি", + "unable_to_delete_shared_link": "শেয়ার লিংক মুছে ফেলা যায়নি", + "unable_to_delete_user": "ব্যবহারকারী মুছে ফেলা যায়নি", + "unable_to_delete_workflow": "ওয়ার্কফ্লো মুছে ফেলা যায়নি", + "unable_to_download_files": "ফাইল ডাউনলোড করা যায়নি", + "unable_to_edit_exclusion_pattern": "বর্জন প্যাটার্ন সম্পাদনা করা যায়নি", + "unable_to_empty_trash": "ট্র্যাশ খালি করা যায়নি", + "unable_to_enter_fullscreen": "ফুলস্ক্রিনে প্রবেশ করা যায়নি", + "unable_to_exit_fullscreen": "ফুলস্ক্রিন থেকে বের হওয়া যায়নি", + "unable_to_get_comments_number": "মন্তব্যের সংখ্যা পাওয়া যায়নি", + "unable_to_get_shared_link": "শেয়ার লিংক পাওয়া ব্যর্থ হয়েছে", + "unable_to_hide_person": "ব্যক্তি লুকানো যায়নি", + "unable_to_link_motion_video": "মোশন ভিডিও লিংক করা যায়নি", + "unable_to_link_oauth_account": "OAuth অ্যাকাউন্ট লিংক করা যায়নি", + "unable_to_log_out_all_devices": "সব ডিভাইস থেকে লগ আউট করা যায়নি", + "unable_to_log_out_device": "ডিভাইস থেকে লগ আউট করা যায়নি", + "unable_to_login_with_oauth": "OAuth দিয়ে লগইন করা যায়নি", + "unable_to_play_video": "ভিডিও চালানো যায়নি", + "unable_to_reassign_assets_existing_person": "{name, select, null {একজন বিদ্যমান ব্যক্তির} other {{name}-এর}} কাছে অ্যাসেট পুনরায় নির্ধারণ করা যায়নি", + "unable_to_reassign_assets_new_person": "নতুন ব্যক্তির কাছে অ্যাসেট পুনরায় নির্ধারণ করা যায়নি", + "unable_to_refresh_user": "ব্যবহারকারী রিফ্রেশ করা যায়নি", + "unable_to_remove_album_users": "অ্যালবাম থেকে ব্যবহারকারী সরানো যায়নি", + "unable_to_remove_api_key": "API কী সরানো যায়নি", + "unable_to_remove_assets_from_shared_link": "শেয়ার লিংক থেকে অ্যাসেট সরানো যায়নি", + "unable_to_remove_library": "লাইব্রেরি সরানো যায়নি", + "unable_to_remove_partner": "পার্টনার সরানো যায়নি", + "unable_to_remove_reaction": "রিঅ্যাকশন সরানো যায়নি", + "unable_to_reset_password": "পাসওয়ার্ড রিসেট করা যায়নি", + "unable_to_reset_pin_code": "পিন কোড রিসেট করা যায়নি", + "unable_to_resolve_duplicate": "ডুপ্লিকেট সমাধান করা যায়নি", + "unable_to_restore_assets": "অ্যাসেট পুনরুদ্ধার করা যায়নি", + "unable_to_restore_trash": "ট্র্যাশ পুনরুদ্ধার করা যায়নি", + "unable_to_restore_user": "ব্যবহারকারী পুনরুদ্ধার করা যায়নি", + "unable_to_save_album": "অ্যালবাম সংরক্ষণ করা যায়নি", + "unable_to_save_api_key": "API কী সংরক্ষণ করা যায়নি", + "unable_to_save_date_of_birth": "জন্ম তারিখ সংরক্ষণ করা যায়নি", + "unable_to_save_name": "নাম সংরক্ষণ করা যায়নি", + "unable_to_save_profile": "প্রোফাইল সংরক্ষণ করা যায়নি", + "unable_to_save_settings": "সেটিংস সংরক্ষণ করা যায়নি", + "unable_to_scan_libraries": "লাইব্রেরি স্ক্যান করা যায়নি", + "unable_to_scan_library": "লাইব্রেরি স্ক্যান করা যায়নি", + "unable_to_set_feature_photo": "ফিচার ছবি নির্ধারণ করা যায়নি", + "unable_to_set_profile_picture": "প্রোফাইল ছবি নির্ধারণ করা যায়নি", + "unable_to_set_rating": "রেটিং নির্ধারণ করা যায়নি", + "unable_to_submit_job": "জব জমা দেওয়া যায়নি", + "unable_to_trash_asset": "অ্যাসেট ট্র্যাশে পাঠানো যায়নি", + "unable_to_unlink_account": "অ্যাকাউন্ট আনলিংক করা যায়নি", + "unable_to_unlink_motion_video": "মোশন ভিডিও আনলিংক করা যায়নি", + "unable_to_update_album_cover": "অ্যালবাম কভার আপডেট করা যায়নি", + "unable_to_update_album_info": "অ্যালবামের তথ্য আপডেট করা যায়নি", + "unable_to_update_library": "লাইব্রেরি আপডেট করা যায়নি", + "unable_to_update_location": "অবস্থান আপডেট করা যায়নি", + "unable_to_update_settings": "সেটিংস আপডেট করা যায়নি", + "unable_to_update_timeline_display_status": "টাইমলাইন প্রদর্শনের অবস্থা আপডেট করা যায়নি", + "unable_to_update_user": "ব্যবহারকারী আপডেট করা যায়নি", + "unable_to_update_workflow": "ওয়ার্কফ্লো আপডেট করা যায়নি", + "unable_to_upload_file": "ফাইল আপলোড করা যায়নি" + }, + "errors_text": "ত্রুটিসমূহ", + "exclusion_pattern": "বর্জন প্যাটার্ন", + "exif": "Exif", + "exif_bottom_sheet_description": "বিবরণ যোগ করুন..।", + "exif_bottom_sheet_description_error": "বিবরণ আপডেট করতে ত্রুটি হয়েছে", + "exif_bottom_sheet_no_description": "কোনো বিবরণ নেই", + "exit_slideshow": "স্লাইডশো থেকে বের হন", + "expand": "সম্প্রসারণ করুন", + "expand_all": "সব সম্প্রসারণ করুন", + "expire_after": "মেয়াদ শেষ হবে", + "expired": "মেয়াদ শেষ", + "expires_date": "মেয়াদ শেষ হবে {date}", + "explore": "অন্বেষণ", + "explorer": "এক্সপ্লোরার", + "export": "এক্সপোর্ট", + "export_as_json": "JSON হিসেবে এক্সপোর্ট করুন", + "export_database": "ডেটাবেস এক্সপোর্ট করুন", + "export_database_description": "SQLite ডেটাবেস এক্সপোর্ট করুন", + "exposure_time": "এক্সপোজার সময়", + "extension": "এক্সটেনশন", + "external": "বাহ্যিক", + "external_libraries": "বাহ্যিক লাইব্রেরি", + "external_network": "বাহ্যিক নেটওয়ার্ক", + "external_network_sheet_info": "পছন্দের Wi-Fi নেটওয়ার্কে না থাকলে, অ্যাপটি নিচের URL-গুলোর মধ্যে থেকে উপরে থেকে নিচে ক্রমানুসারে প্রথম যেটিতে পৌঁছাতে পারে তার মাধ্যমে সার্ভারের সাথে সংযুক্ত হবে", + "f_number": "এফ-নাম্বার", + "face_unassigned": "অনির্ধারিত", + "failed": "ব্যর্থ", + "failed_count": "ব্যর্থ: {count}", + "failed_to_authenticate": "প্রমাণীকরণ ব্যর্থ হয়েছে", + "failed_to_delete_file": "ফাইল মুছতে ব্যর্থ হয়েছে", + "failed_to_load_assets": "অ্যাসেট লোড করতে ব্যর্থ হয়েছে", + "failed_to_load_folder": "ফোল্ডার লোড করতে ব্যর্থ হয়েছে", + "favorite": "ফেভারিট", + "favorite_action_prompt": "{count}টি ফেভারিটে যোগ করা হয়েছে", + "favorite_or_unfavorite_photo": "ছবি ফেভারিট করুন বা ফেভারিট থেকে বাদ দিন", + "favorites": "ফেভারিট", + "feature_photo_updated": "ফিচার ছবি আপডেট হয়েছে", + "features": "ফিচার", + "features_setting_description": "অ্যাপ ফিচার পরিচালনা করুন", + "file_name_or_extension": "ফাইলের নাম বা এক্সটেনশন", + "file_name_text": "ফাইলের নাম", + "file_size": "ফাইলের আকার", + "filename": "ফাইলের নাম", + "filetype": "ফাইলের ধরন", + "filter": "ফিল্টার", + "filter_people": "ব্যক্তি ফিল্টার করুন", + "filter_places": "স্থান ফিল্টার করুন", + "filter_tags": "ট্যাগ ফিল্টার করুন", + "filters": "ফিল্টার", + "first": "প্রথম", + "fix_incorrect_match": "ভুল মিল ঠিক করুন", + "focal_length": "ফোকাল লেন্থ", + "folder": "ফোল্ডার", + "folder_not_found": "ফোল্ডার পাওয়া যায়নি", + "folders": "ফোল্ডার", + "folders_feature_description": "ফাইল সিস্টেমে থাকা ছবি ও ভিডিওর জন্য ফোল্ডার ভিউ ব্রাউজ করা", + "forgot_pin_code_question": "আপনার পিন ভুলে গেছেন?", + "forward": "ফরওয়ার্ড", + "free_up_space": "স্পেস খালি করুন", + "free_up_space_description": "স্পেস খালি করতে ব্যাকআপ করা ছবি ও ভিডিও আপনার ডিভাইসের ট্র্যাশে সরান। সার্ভারে থাকা আপনার কপিগুলো নিরাপদ থাকবে।", + "free_up_space_settings_subtitle": "ডিভাইসের সংরক্ষণাগার খালি করুন", + "full_path": "সম্পূর্ণ পাথ: {path}", + "full_path_or_folder": "সম্পূর্ণ পাথ বা ফোল্ডার", + "gcast_enabled": "Google Cast", + "gcast_enabled_description": "এই ফিচারটি কাজ করার জন্য Google থেকে বাহ্যিক রিসোর্স লোড করে।", + "general": "সাধারণ", + "geolocation_instruction_location": "GPS স্থানাঙ্কযুক্ত কোনো অ্যাসেটে ক্লিক করুন এর অবস্থান ব্যবহার করতে, অথবা মানচিত্র থেকে সরাসরি একটি অবস্থান নির্বাচন করুন", + "get_help": "সহায়তা নিন", + "get_people_error": "ব্যক্তিদের তথ্য পেতে ত্রুটি হয়েছে", + "get_wifiname_error": "Wi-Fi নাম পাওয়া যায়নি। নিশ্চিত করুন যে আপনি প্রয়োজনীয় অনুমতি দিয়েছেন এবং একটি Wi-Fi নেটওয়ার্কের সাথে সংযুক্ত আছেন", + "getting_started": "শুরু করা যাক", + "go_back": "ফিরে যান", + "go_to_folder": "ফোল্ডারে যান", + "go_to_search": "অনুসন্ধানে যান", + "gps": "GPS", + "gps_missing": "GPS নেই", + "grant_permission": "অনুমতি দিন", + "group_albums_by": "অ্যালবাম গ্রুপ করুন..।", + "group_country": "দেশ অনুযায়ী গ্রুপ করুন", + "group_no": "কোনো গ্রুপিং নেই", + "group_owner": "মালিক অনুযায়ী গ্রুপ করুন", + "group_places_by": "স্থান গ্রুপ করুন..।", + "group_year": "বছর অনুযায়ী গ্রুপ করুন", + "haptic_feedback_title": "হ্যাপটিক ফিডব্যাক", + "has_quota": "কোটা আছে", + "hash_asset": "অ্যাসেট হ্যাশ করুন", + "hashed_assets": "হ্যাশ করা অ্যাসেট", + "hashing": "হ্যাশিং হচ্ছে", + "header_settings_add_header_tip": "হেডার যোগ করুন", + "header_settings_field_validator_msg": "মান খালি রাখা যাবে না", + "header_settings_header_name_input": "হেডারের নাম", + "header_settings_header_value_input": "হেডারের মান", + "headers_settings_tile_title": "কাস্টম প্রক্সি হেডার", + "height": "উচ্চতা", + "hi_user": "হাই {name} ({email})", + "hide_all_people": "সব ব্যক্তি লুকান", + "hide_gallery": "গ্যালারি লুকান", + "hide_named_person": "{name} ব্যক্তিকে লুকান", + "hide_password": "পাসওয়ার্ড লুকান", + "hide_person": "ব্যক্তি লুকান", + "hide_schema": "স্কিমা লুকান", + "hide_text_recognition": "টেক্সট রিকগনিশন লুকান", + "hide_unnamed_people": "নাম দেওয়া হয়নি এমন ব্যক্তি লুকান", + "home_page_building_timeline": "টাইমলাইন তৈরি হচ্ছে", + "host": "হোস্ট", + "hour": "ঘণ্টা", + "hours": "ঘণ্টা", + "id": "ID", + "idle": "নিষ্ক্রিয়", + "image": "ছবি", + "image_alt_text_date": "{date}-এ তোলা {isVideo, select, true {ভিডিও} other {ছবি}}", + "image_alt_text_date_1_person": "{person1}-এর সাথে {date}-এ তোলা {isVideo, select, true {ভিডিও} other {ছবি}}", + "image_alt_text_date_2_people": "{person1} এবং {person2}-এর সাথে {date}-এ তোলা {isVideo, select, true {ভিডিও} other {ছবি}}", + "image_alt_text_date_3_people": "{person1}, {person2}, এবং {person3}-এর সাথে {date}-এ তোলা {isVideo, select, true {ভিডিও} other {ছবি}}", + "image_alt_text_date_4_or_more_people": "{person1}, {person2}, এবং আরও {additionalCount, number} জনের সাথে {date}-এ তোলা {isVideo, select, true {ভিডিও} other {ছবি}}", + "image_alt_text_date_place": "{city}, {country}-এ {date} তারিখে তোলা {isVideo, select, true {ভিডিও} other {ছবি}}", + "image_alt_text_date_place_1_person": "{city}, {country}-এ {person1}-এর সাথে {date} তারিখে তোলা {isVideo, select, true {ভিডিও} other {ছবি}}", + "image_alt_text_date_place_2_people": "{city}, {country}-এ {person1} এবং {person2}-এর সাথে {date} তারিখে তোলা {isVideo, select, true {ভিডিও} other {ছবি}}", + "image_alt_text_date_place_3_people": "{city}, {country}-এ {person1}, {person2}, এবং {person3}-এর সাথে {date} তারিখে তোলা {isVideo, select, true {ভিডিও} other {ছবি}}", + "image_alt_text_date_place_4_or_more_people": "{city}, {country}-এ {person1}, {person2}, এবং আরও {additionalCount, number} জনের সাথে {date} তারিখে তোলা {isVideo, select, true {ভিডিও} other {ছবি}}", + "immich_logo": "Immich লোগো", + "immich_web_interface": "Immich ওয়েব ইন্টারফেস", + "import_from_json": "JSON থেকে ইমপোর্ট করুন", + "import_path": "ইমপোর্ট পাথ", + "in_albums": "{count, plural, one {#টি অ্যালবামে} other {#টি অ্যালবামে}}", + "in_archive": "আর্কাইভে", + "in_year": "{year}-এ", + "in_year_selector": "মধ্যে", + "include_archived": "আর্কাইভ অন্তর্ভুক্ত করুন", + "include_shared_albums": "শেয়ার করা অ্যালবাম অন্তর্ভুক্ত করুন", + "include_shared_partner_assets": "শেয়ার করা পার্টনার অ্যাসেট অন্তর্ভুক্ত করুন", + "individual_share": "ব্যক্তিগত শেয়ার", + "individual_shares": "ব্যক্তিগত শেয়ারসমূহ", + "info": "তথ্য", + "integrity_checks": "ইন্টিগ্রিটি চেক", + "interval": { + "day_at_onepm": "প্রতিদিন দুপুর ১টায়", + "hours": "প্রতি {hours, plural, one {ঘণ্টা} other {{hours, number} ঘণ্টা}}", + "night_at_midnight": "প্রতি রাতে মধ্যরাতে", + "night_at_twoam": "প্রতি রাতে ২টায়" + }, + "invalid_date": "অবৈধ তারিখ", + "invalid_date_format": "অবৈধ তারিখের ফরম্যাট", + "invite_people": "ব্যক্তিদের আমন্ত্রণ জানান", + "invite_to_album": "অ্যালবামে আমন্ত্রণ জানান", + "iso": "ISO", + "items_count": "{count, plural, one {#টি আইটেম} other {#টি আইটেম}}", + "jobs": "জব", + "keep": "রাখুন", + "keep_albums": "অ্যালবাম রাখুন", + "keep_albums_count": "{count}টি {count, plural, one {অ্যালবাম} other {অ্যালবাম}} রাখা হচ্ছে", + "keep_all": "সব রাখুন", + "keep_description": "স্পেস খালি করার সময় আপনার ডিভাইসে কী থাকবে তা নির্বাচন করুন।", + "keep_favorites": "ফেভারিট রাখুন", + "keep_on_device": "ডিভাইসে রাখুন", + "keep_on_device_hint": "এই ডিভাইসে রাখার জন্য আইটেম নির্বাচন করুন", + "keep_this_delete_others": "এটি রাখুন, বাকিগুলো মুছুন", + "keeping": "রাখা হচ্ছে: {items}", + "kept_this_deleted_others": "এই অ্যাসেটটি রাখা হয়েছে এবং {count, plural, one {#টি অ্যাসেট} other {#টি অ্যাসেট}} মুছে ফেলা হয়েছে", + "keyboard_shortcuts": "কীবোর্ড শর্টকাট", + "language": "ভাষা", + "language_no_results_subtitle": "আপনার অনুসন্ধানের শব্দটি পরিবর্তন করে দেখুন", + "language_no_results_title": "কোনো ভাষা পাওয়া যায়নি", + "language_search_hint": "ভাষা অনুসন্ধান করুন..।", + "language_setting_description": "আপনার পছন্দের ভাষা নির্বাচন করুন", + "large_files": "বড় ফাইল", + "last": "শেষ", + "last_months": "{count, plural, one {গত মাস} other {গত #মাস}}", + "last_seen": "সর্বশেষ দেখা", + "latest_version": "সর্বশেষ ভার্সন", + "latitude": "অক্ষাংশ", + "leave": "ত্যাগ করুন", + "leave_album": "অ্যালবাম ত্যাগ করুন", + "lens_model": "লেন্স মডেল", + "less": "কম", + "let_others_respond": "অন্যদের সাড়া দিতে দিন", + "level": "স্তর", + "library": "লাইব্রেরি", + "library_add_folder": "ফোল্ডার যোগ করুন", + "library_edit_folder": "ফোল্ডার সম্পাদনা করুন", + "library_page_sort_asset_count": "অ্যাসেটের সংখ্যা", + "library_page_sort_created": "তৈরির তারিখ", + "library_page_sort_last_modified": "সর্বশেষ পরিবর্তিত", + "library_page_sort_title": "অ্যালবামের শিরোনাম", + "licenses": "লাইসেন্স", + "light": "লাইট", + "light_theme": "লাইট থিমে পরিবর্তন করুন", + "like": "লাইক", + "like_deleted": "লাইক মুছে ফেলা হয়েছে", + "link": "লিংক", + "link_motion_video": "মোশন ভিডিও লিংক করুন", + "link_to_docs": "আরও তথ্যের জন্য, ডকুমেন্টেশন দেখুন।", + "link_to_oauth": "OAuth-এ লিংক করুন", + "linked_oauth_account": "লিংক করা OAuth অ্যাকাউন্ট", + "list": "তালিকা", + "live": "লাইভ", + "load_more": "আরও লোড করুন", + "loading": "লোড হচ্ছে", + "loading_search_results_failed": "অনুসন্ধানের ফলাফল লোড করা ব্যর্থ হয়েছে", + "local": "স্থানীয়", + "local_asset_cast_failed": "সার্ভারে আপলোড করা হয়নি এমন অ্যাসেট কাস্ট করা যায়নি", + "local_assets": "স্থানীয় অ্যাসেট", + "local_id": "স্থানীয় ID", + "local_media_summary": "স্থানীয় মিডিয়া সারসংক্ষেপ", + "local_network": "স্থানীয় নেটওয়ার্ক", + "local_network_sheet_info": "নির্দিষ্ট Wi-Fi নেটওয়ার্ক ব্যবহার করার সময় অ্যাপটি এই URL-এর মাধ্যমে সার্ভারের সাথে সংযুক্ত হবে", + "location": "অবস্থান", + "location_permission": "অবস্থানের অনুমতি", + "location_permission_content": "অটো-সুইচিং ফিচার ব্যবহার করার জন্য, Immich-এর নির্ভুল অবস্থানের অনুমতি প্রয়োজন যাতে এটি বর্তমান Wi-Fi নেটওয়ার্কের নাম পড়তে পারে", + "location_picker_choose_on_map": "মানচিত্রে নির্বাচন করুন", + "location_picker_latitude_error": "একটি বৈধ অক্ষাংশ লিখুন", + "location_picker_latitude_hint": "এখানে আপনার অক্ষাংশ লিখুন", + "location_picker_longitude_error": "একটি বৈধ দ্রাঘিমাংশ লিখুন", + "location_picker_longitude_hint": "এখানে আপনার দ্রাঘিমাংশ লিখুন", + "lock": "লক", + "locked_folder": "লক করা ফোল্ডার", + "log_detail_title": "লগ বিস্তারিত", + "log_out": "লগ আউট", + "log_out_all_devices": "সব ডিভাইস থেকে লগ আউট করুন", + "logged_in_as": "{user} হিসেবে লগ ইন করা আছে", + "logged_out_all_devices": "সব ডিভাইস থেকে লগ আউট করা হয়েছে", + "logged_out_device": "ডিভাইস থেকে লগ আউট করা হয়েছে", + "login": "লগইন", + "login_disabled": "লগইন নিষ্ক্রিয় করা হয়েছে", + "login_form_api_exception": "API ব্যতিক্রম ঘটেছে। অনুগ্রহ করে সার্ভার URL যাচাই করে আবার চেষ্টা করুন।", + "login_form_email_hint": "youremail@email.com", + "login_form_endpoint_hint": "http://your-server-ip:port", + "login_form_endpoint_url": "সার্ভার এন্ডপয়েন্ট URL", + "login_form_err_invalid_email": "অবৈধ ইমেইল", + "login_form_err_invalid_url": "অবৈধ URL", + "login_form_err_leading_whitespace": "শুরুতে অতিরিক্ত স্পেস", + "login_form_err_trailing_whitespace": "শেষে অতিরিক্ত স্পেস", + "login_form_failed_get_oauth_server_config": "OAuth ব্যবহার করে লগইন করতে ত্রুটি হয়েছে, সার্ভার URL যাচাই করুন", + "login_form_failed_get_oauth_server_disable": "এই সার্ভারে OAuth ফিচার উপলব্ধ নেই", + "login_form_failed_login": "লগইন করতে ত্রুটি হয়েছে, সার্ভার URL, ইমেইল এবং পাসওয়ার্ড যাচাই করুন", + "login_form_handshake_exception": "সার্ভারের সাথে একটি হ্যান্ডশেক ব্যতিক্রম ঘটেছে। আপনি সেলফ-সাইনড সার্টিফিকেট ব্যবহার করলে সেটিংসে সেলফ-সাইনড সার্টিফিকেট সাপোর্ট চালু করুন।", + "login_form_password_hint": "পাসওয়ার্ড", + "login_form_server_empty": "একটি সার্ভার URL লিখুন", + "login_form_server_error": "সার্ভারের সাথে সংযোগ করা যায়নি", + "login_has_been_disabled": "লগইন নিষ্ক্রিয় করা হয়েছে", + "login_password_changed_error": "আপনার পাসওয়ার্ড আপডেট করতে একটি ত্রুটি হয়েছে", + "login_password_changed_success": "পাসওয়ার্ড সফলভাবে আপডেট হয়েছে", + "logout_all_device_confirmation": "আপনি কি নিশ্চিত যে আপনি সব ডিভাইস থেকে লগ আউট করতে চান?", + "logout_this_device_confirmation": "আপনি কি নিশ্চিত যে আপনি এই ডিভাইস থেকে লগ আউট করতে চান?", + "logs": "লগসমূহ", + "longitude": "দ্রাঘিমাংশ", + "look": "দেখুন", + "loop_videos": "ভিডিও লুপ করুন", + "loop_videos_description": "ডিটেইল ভিউয়ারে স্বয়ংক্রিয়ভাবে ভিডিও লুপ করতে চালু করুন।", + "main_branch_warning": "আপনি একটি ডেভেলপমেন্ট ভার্সন ব্যবহার করছেন; আমরা দৃঢ়ভাবে একটি রিলিজ ভার্সন ব্যবহার করার পরামর্শ দিচ্ছি!", + "main_menu": "প্রধান মেনু", + "maintenance_action_restore": "ডেটাবেস পুনরুদ্ধার করা হচ্ছে", + "maintenance_description": "Immich-কে মেইনটেন্যান্স মোডে রাখা হয়েছে।", + "maintenance_end": "মেইনটেন্যান্স মোড শেষ করুন", + "maintenance_logged_in_as": "বর্তমানে {user} হিসেবে লগ ইন করা আছে", + "maintenance_restore_from_backup": "ব্যাকআপ থেকে পুনরুদ্ধার করুন", + "maintenance_restore_library": "আপনার লাইব্রেরি পুনরুদ্ধার করুন", + "maintenance_restore_library_confirm": "এটি সঠিক মনে হলে, ব্যাকআপ পুনরুদ্ধার চালিয়ে যান!", + "maintenance_restore_library_description": "ডেটাবেস পুনরুদ্ধার করা হচ্ছে", + "maintenance_restore_library_folder_has_files": "{folder}-এ {count}টি ফোল্ডার আছে", + "maintenance_restore_library_folder_no_files": "{folder}-এ ফাইল অনুপস্থিত!", + "maintenance_restore_library_folder_pass": "পঠনযোগ্য এবং লেখনযোগ্য", + "maintenance_restore_library_folder_read_fail": "পঠনযোগ্য নয়", + "maintenance_restore_library_folder_write_fail": "লেখনযোগ্য নয়", + "maintenance_restore_library_hint_missing_files": "আপনার গুরুত্বপূর্ণ ফাইল অনুপস্থিত থাকতে পারে", + "maintenance_restore_library_hint_regenerate_later": "আপনি পরবর্তীতে সেটিংসে গিয়ে এগুলো পুনরায় তৈরি করতে পারবেন", + "maintenance_restore_library_hint_storage_template_missing_files": "স্টোরেজ টেমপ্লেট ব্যবহার করছেন? আপনার ফাইল অনুপস্থিত থাকতে পারে", + "maintenance_restore_library_loading": "ইন্টিগ্রিটি চেক এবং হিউরিস্টিক লোড হচ্ছে…", + "maintenance_task_backup": "বিদ্যমান ডেটাবেসের একটি ব্যাকআপ তৈরি করা হচ্ছে…", + "maintenance_task_migrations": "ডেটাবেস মাইগ্রেশন চালানো হচ্ছে…", + "maintenance_task_restore": "নির্বাচিত ব্যাকআপ পুনরুদ্ধার করা হচ্ছে…", + "maintenance_task_rollback": "পুনরুদ্ধার ব্যর্থ হয়েছে, পুনরুদ্ধার পয়েন্টে ফিরিয়ে নেওয়া হচ্ছে…", + "maintenance_title": "সাময়িকভাবে অনুপলব্ধ", + "make": "নির্মাতা", + "manage_geolocation": "অবস্থান পরিচালনা করুন", + "manage_media_access_rationale": "অ্যাসেট ট্র্যাশে সরানো এবং সেখান থেকে পুনরুদ্ধার করার সঠিক ব্যবস্থাপনার জন্য এই অনুমতি প্রয়োজন।", + "manage_media_access_settings": "সেটিংস খুলুন", + "manage_media_access_subtitle": "Immich অ্যাপকে মিডিয়া ফাইল পরিচালনা ও স্থানান্তর করার অনুমতি দিন।", + "manage_media_access_title": "মিডিয়া ব্যবস্থাপনা অ্যাক্সেস", + "manage_sharing_with_partners": "পার্টনারদের সাথে শেয়ারিং পরিচালনা করুন", + "manage_the_app_settings": "অ্যাপ সেটিংস পরিচালনা করুন", + "manage_your_account": "আপনার অ্যাকাউন্ট পরিচালনা করুন", + "manage_your_api_keys": "আপনার API কী পরিচালনা করুন", + "manage_your_devices": "আপনার লগ-ইন করা ডিভাইসগুলো পরিচালনা করুন", + "manage_your_oauth_connection": "আপনার OAuth সংযোগ পরিচালনা করুন", + "map": "মানচিত্র", + "map_cannot_get_user_location": "ব্যবহারকারীর অবস্থান পাওয়া যায়নি", + "map_location_picker_page_use_location": "এই অবস্থান ব্যবহার করুন", + "map_location_service_disabled_content": "আপনার বর্তমান অবস্থান থেকে অ্যাসেট দেখাতে লোকেশন সার্ভিস চালু করা প্রয়োজন। আপনি কি এখন এটি চালু করতে চান?", + "map_location_service_disabled_title": "লোকেশন সার্ভিস নিষ্ক্রিয়", + "map_marker_for_image": "{city}, {country}-এ তোলা ছবির জন্য মানচিত্র মার্কার", + "map_marker_with_image": "ছবিসহ মানচিত্র মার্কার", + "map_no_location_permission_content": "আপনার বর্তমান অবস্থান থেকে অ্যাসেট দেখাতে অবস্থানের অনুমতি প্রয়োজন। আপনি কি এখন এটি অনুমতি দিতে চান?", + "map_no_location_permission_title": "অবস্থানের অনুমতি প্রত্যাখ্যাত", + "map_settings": "মানচিত্র সেটিংস", + "map_settings_dark_mode": "ডার্ক মোড", + "map_settings_date_range_option_day": "গত ২৪ ঘণ্টা", + "map_settings_date_range_option_days": "গত {days} দিন", + "map_settings_date_range_option_year": "গত বছর", + "map_settings_date_range_option_years": "গত {years} বছর", + "map_settings_include_show_archived": "আর্কাইভ অন্তর্ভুক্ত করুন", + "map_settings_include_show_partners": "পার্টনার অন্তর্ভুক্ত করুন", + "map_settings_only_show_favorites": "শুধুমাত্র ফেভারিট দেখান", + "map_settings_theme_settings": "মানচিত্র থিম", + "mark_all_as_read": "সব পঠিত হিসেবে চিহ্নিত করুন", + "marked_all_as_read": "সব পঠিত হিসেবে চিহ্নিত করা হয়েছে", + "matches": "মিল", + "matching_assets": "মিলে যাওয়া অ্যাসেট", + "media_chrome": { + "auto": "স্বয়ংক্রিয়", + "captions": "ক্যাপশন", + "captions_off": "বন্ধ", + "closed_captions": "ক্লোজড ক্যাপশন", + "decode_error": "ডিকোড ত্রুটি", + "disable_captions": "ক্যাপশন নিষ্ক্রিয় করুন", + "enable_captions": "ক্যাপশন চালু করুন", + "enter_fullscreen_mode": "ফুলস্ক্রিন মোডে প্রবেশ করুন", + "exit_fullscreen_mode": "ফুলস্ক্রিন মোড থেকে বের হন", + "loop": "লুপ", + "media_error_description": "একটি মিডিয়া ত্রুটির কারণে প্লেব্যাক বন্ধ হয়ে গেছে। মিডিয়াটি নষ্ট হতে পারে অথবা আপনার ব্রাউজার এই ফরম্যাট সমর্থন করে না।", + "media_loading": "মিডিয়া লোড হচ্ছে", + "mute": "মিউট", + "network_error": "নেটওয়ার্ক ত্রুটি", + "network_error_description": "একটি নেটওয়ার্ক ত্রুটির কারণে মিডিয়া ডাউনলোড ব্যর্থ হয়েছে।", + "not_supported_error": "সোর্স সমর্থিত নয়", + "playback_rate": "প্লেব্যাক রেট", + "playback_rate_current": "বর্তমান প্লেব্যাক রেট", + "playback_rate_value": "প্লেব্যাক রেট {playbackRate}", + "playback_time": "প্লেব্যাক সময়", + "quality": "মান", + "second": "সেকেন্ড", + "seconds": "সেকেন্ড", + "time_value_of_total_time": "{totalTime}-এর মধ্যে {currentTime}", + "time_value_remaining": "{time} বাকি", + "unmute": "আনমিউট", + "unsupported_error_description": "একটি অসমর্থিত ত্রুটি ঘটেছে। সার্ভার বা নেটওয়ার্ক ব্যর্থ হয়েছে, অথবা আপনার ব্রাউজার এই ফরম্যাট সমর্থন করে না।", + "video_not_loaded_unknown_time": "ভিডিও লোড হয়নি, সময় অজানা।", + "video_player": "ভিডিও প্লেয়ার", + "volume": "ভলিউম" + }, + "media_type": "মিডিয়ার ধরন", + "memories": "স্মৃতি", + "memories_all_caught_up": "সব দেখা হয়ে গেছে", + "memories_check_back_tomorrow": "আরও স্মৃতির জন্য আগামীকাল আবার দেখুন", + "memories_setting_description": "আপনার স্মৃতিতে কী দেখবেন তা পরিচালনা করুন", + "memories_start_over": "নতুন করে শুরু করুন", + "memories_swipe_to_close": "বন্ধ করতে উপরে সোয়াইপ করুন", + "memory": "স্মৃতি", + "memory_lane_title": "মেমোরি লেন {title}", + "menu": "মেনু", + "merge": "একত্র করুন", + "merge_people": "ব্যক্তিদের একত্র করুন", + "merge_people_limit": "আপনি একবারে সর্বোচ্চ ৫টি মুখ একত্র করতে পারবেন", + "merge_people_prompt": "আপনি কি এই ব্যক্তিদের একত্র করতে চান? এই কাজটি পূর্বাবস্থায় ফেরানো যাবে না।", + "merge_people_successfully": "ব্যক্তিরা সফলভাবে একত্র হয়েছে", + "merged_people_count": "{count, plural, one {#জন ব্যক্তি} other {#জন ব্যক্তি}} একত্র করা হয়েছে", + "minFaces": "সর্বনিম্ন মুখ", + "minFaces_description": "একজন ব্যক্তিকে প্রদর্শনের জন্য স্বীকৃত মুখের সর্বনিম্ন সংখ্যা", + "minimize": "ছোট করুন", + "minute": "মিনিট", + "minutes": "মিনিট", + "missing": "অনুপস্থিত", + "mobile_app": "মোবাইল অ্যাপ", + "mobile_app_download_onboarding_note": "নিচের অপশনগুলো ব্যবহার করে সহযোগী মোবাইল অ্যাপটি ডাউনলোড করুন", + "model": "মডেল", + "modify_date": "পরিবর্তনের তারিখ", + "month": "মাস", + "more": "আরও", + "motion": "মোশন", + "move": "সরান", + "move_off_locked_folder": "লক করা ফোল্ডার থেকে সরান", + "move_to": "এখানে সরান", + "move_to_device_trash": "ডিভাইসের ট্র্যাশে সরান", + "move_to_lock_folder_action_prompt": "{count}টি লক করা ফোল্ডারে যোগ করা হয়েছে", + "move_to_locked_folder": "লক করা ফোল্ডারে সরান", + "move_to_locked_folder_confirmation": "এই ছবি ও ভিডিও সব অ্যালবাম থেকে সরানো হবে এবং শুধুমাত্র লক করা ফোল্ডার থেকে দেখা যাবে", + "moved_to_trash": "ট্র্যাশে সরানো হয়েছে", + "mute_memories": "স্মৃতি মিউট করুন", + "my_albums": "আমার অ্যালবাম", + "my_immich_description": "বর্তমান পেজটি My Immich লিংক হিসেবে কপি করুন", + "my_immich_title": "My Immich লিংক", + "name": "নাম", + "name_or_nickname": "নাম বা ডাকনাম", + "name_required": "নাম আবশ্যক", + "navigate": "নেভিগেট করুন", + "navigate_to_time": "নির্দিষ্ট সময়ে যান", + "network_requirement_photos_upload": "ছবি ব্যাকআপ করতে সেলুলার ডেটা ব্যবহার করুন", + "network_requirement_videos_upload": "ভিডিও ব্যাকআপ করতে সেলুলার ডেটা ব্যবহার করুন", + "network_requirements": "নেটওয়ার্ক প্রয়োজনীয়তা", + "network_requirements_updated": "নেটওয়ার্ক প্রয়োজনীয়তা পরিবর্তিত হয়েছে, ব্যাকআপ সারি রিসেট করা হচ্ছে", + "networking_settings": "নেটওয়ার্কিং", + "networking_subtitle": "সার্ভার এন্ডপয়েন্ট সেটিংস পরিচালনা করুন", + "never": "কখনো না", + "new_album": "নতুন অ্যালবাম", + "new_api_key": "নতুন API কী", + "new_feature": "নতুন ফিচার", + "new_password": "নতুন পাসওয়ার্ড", + "new_person": "নতুন ব্যক্তি", + "new_pin_code": "নতুন পিন কোড", + "new_pin_code_subtitle": "এটি আপনার লক করা ফোল্ডারে প্রথমবার প্রবেশ। এই পেজ নিরাপদে অ্যাক্সেস করতে একটি পিন কোড তৈরি করুন", + "new_update": "নতুন আপডেট", + "new_user_created": "নতুন ব্যবহারকারী তৈরি হয়েছে", + "new_version_available": "নতুন ভার্সন উপলব্ধ", + "newest_first": "সর্বপ্রথম সাম্প্রতিক", + "next": "পরবর্তী", + "next_memory": "পরবর্তী স্মৃতি", + "no": "না", + "no_albums_found": "কোনো অ্যালবাম পাওয়া যায়নি", + "no_albums_message": "আপনার ছবি ও ভিডিও গোছাতে একটি অ্যালবাম তৈরি করুন", + "no_albums_with_name_yet": "মনে হচ্ছে আপনার এই নামে এখনো কোনো অ্যালবাম নেই।", + "no_albums_yet": "মনে হচ্ছে আপনার এখনো কোনো অ্যালবাম নেই।", + "no_archived_assets_message": "ছবি ও ভিডিও লুকাতে সেগুলো আর্কাইভ করুন যাতে সেগুলো আপনার ছবির ভিউ থেকে লুকানো থাকে", + "no_assets_message": "আপনার প্রথম ছবি আপলোড করতে ক্লিক করুন", + "no_assets_to_show": "দেখানোর মতো কোনো অ্যাসেট নেই", + "no_cast_devices_found": "কোনো কাস্ট ডিভাইস পাওয়া যায়নি", + "no_checksum_local": "কোনো চেকসাম উপলব্ধ নেই - স্থানীয় অ্যাসেট আনা যায়নি", + "no_checksum_remote": "কোনো চেকসাম উপলব্ধ নেই - দূরবর্তী অ্যাসেট আনা যায়নি", + "no_devices": "কোনো অনুমোদিত ডিভাইস নেই", + "no_duplicates_found": "কোনো ডুপ্লিকেট পাওয়া যায়নি।", + "no_exif_info_available": "কোনো Exif তথ্য উপলব্ধ নেই", + "no_explore_results_message": "আপনার সংগ্রহ অন্বেষণ করতে আরও ছবি আপলোড করুন।", + "no_favorites_message": "আপনার সেরা ছবি ও ভিডিও দ্রুত খুঁজে পেতে ফেভারিট যোগ করুন", + "no_libraries_message": "আপনার ছবি ও ভিডিও দেখতে একটি বাহ্যিক লাইব্রেরি তৈরি করুন", + "no_local_assets_found": "এই চেকসাম দিয়ে কোনো স্থানীয় অ্যাসেট পাওয়া যায়নি", + "no_locked_photos_message": "লক করা ফোল্ডারে থাকা ছবি ও ভিডিও লুকানো থাকে এবং আপনি লাইব্রেরি ব্রাউজ বা অনুসন্ধান করার সময় সেগুলো দেখা যাবে না।", + "no_name": "কোনো নাম নেই", + "no_notifications": "কোনো নোটিফিকেশন নেই", + "no_people_found": "মিলে যাওয়া কোনো ব্যক্তি পাওয়া যায়নি", + "no_places": "কোনো স্থান নেই", + "no_remote_assets_found": "এই চেকসাম দিয়ে কোনো দূরবর্তী অ্যাসেট পাওয়া যায়নি", + "no_results": "কোনো ফলাফল নেই", + "no_results_description": "একটি সমার্থক শব্দ অথবা আরও সাধারণ কিওয়ার্ড ব্যবহার করে দেখুন", + "no_shared_albums_message": "আপনার নেটওয়ার্কের মানুষের সাথে ছবি ও ভিডিও শেয়ার করতে একটি অ্যালবাম তৈরি করুন", + "no_steps": "এখনও কোনো ধাপ যোগ করা হয়নি", + "none": "কোনোটিই না", + "not_allowed": "অনুমোদিত নয়", + "not_available": "N/A", + "not_in_any_album": "কোনো অ্যালবামে নেই", + "not_selected": "নির্বাচিত নয়", + "not_set": "নির্ধারিত নয়", + "notes": "নোট", + "nothing_here_yet": "এখানে এখনো কিছু নেই", + "notification_backup_reliability": "ব্যাকগ্রাউন্ড ব্যাকআপের নির্ভরযোগ্যতা বাড়াতে নোটিফিকেশন চালু করুন", + "notification_enabled_list_tile_content": "Immich ব্যাকগ্রাউন্ড ব্যাকআপের জন্য নোটিফিকেশন ব্যবহার করে। আপনার ডিভাইসের সেটিংসে সেগুলো পরিচালনা করুন।", + "notification_enabled_list_tile_open_button": "সেটিংস খুলুন", + "notification_enabled_list_tile_title": "নোটিফিকেশন চালু আছে", + "notification_permission_dialog_content": "নোটিফিকেশন চালু করতে, সেটিংসে গিয়ে অনুমতি দিন নির্বাচন করুন।", + "notification_permission_list_tile_content": "নোটিফিকেশন চালু করতে অনুমতি দিন।", + "notification_permission_list_tile_enable_button": "নোটিফিকেশন চালু করুন", + "notification_permission_list_tile_title": "নোটিফিকেশনের অনুমতি", + "notification_toggle_setting_description": "ইমেইল নোটিফিকেশন চালু করুন", + "notifications": "নোটিফিকেশন", + "notifications_setting_description": "নোটিফিকেশন পরিচালনা করুন", + "oauth": "OAuth", + "obtainium_configurator": "Obtainium কনফিগারেটর", + "obtainium_configurator_instructions": "Immich-এর GitHub রিলিজ থেকে সরাসরি Android অ্যাপ ইনস্টল ও আপডেট করতে Obtainium ব্যবহার করুন। আপনার Obtainium কনফিগারেশন লিংক তৈরি করতে একটি API কী তৈরি করুন এবং একটি ভ্যারিয়ান্ট নির্বাচন করুন", + "ocr": "OCR", + "ocr_body": "Immich এখন আপনার ছবির ভেতরের লেখা পড়তে পারে, তাই আপনি সেগুলোর লেখা দিয়ে খুঁজতে পারবেন।", + "ocr_title": "আপনার ছবিতে লেখা অনুসন্ধান করুন", + "official_immich_resources": "Immich-এর অফিসিয়াল রিসোর্স", + "offline": "অফলাইন", + "offset": "অফসেট", + "ok": "ঠিক আছে", + "oldest_first": "সর্বপ্রথম পুরাতন", + "on_this_device": "এই ডিভাইসে", + "onboarding": "অনবোর্ডিং", + "onboarding_locale_description": "আপনার পছন্দের ভাষা নির্বাচন করুন। আপনি পরবর্তীতে সেটিংসে এটি পরিবর্তন করতে পারবেন।", + "onboarding_privacy_description": "নিচের (ঐচ্ছিক) ফিচারগুলো বাহ্যিক পরিষেবার উপর নির্ভরশীল এবং সেটিংসে যেকোনো সময় নিষ্ক্রিয় করা যায়।", + "onboarding_server_welcome_description": "চলুন কিছু সাধারণ সেটিংস দিয়ে আপনার ইনস্ট্যান্স সেটআপ করি।", + "onboarding_theme_description": "আপনার ইনস্ট্যান্সের জন্য একটি কালার থিম নির্বাচন করুন। আপনি পরবর্তীতে সেটিংসে এটি পরিবর্তন করতে পারবেন।", + "onboarding_user_welcome_description": "চলুন শুরু করা যাক!", + "onboarding_welcome_user": "স্বাগতম, {user}", + "online": "অনলাইন", + "only_favorites": "শুধুমাত্র ফেভারিট", + "open": "খুলুন", + "open_calendar": "ক্যালেন্ডার খুলুন", "open_in_browser": "ব্রাউজারে ওপেন করুন", + "open_in_immich_body": "অন্যান্য অ্যাপ থেকে সরাসরি ছবি খুলতে Android-এ Immich-কে আপনার গ্যালারি হিসেবে সেট করুন।", + "open_in_immich_title": "Immich-এ ছবি খুলুন", + "open_in_map_view": "মানচিত্র ভিউতে খুলুন", + "open_in_openstreetmap": "OpenStreetMap-এ খুলুন", + "open_the_search_filters": "অনুসন্ধান ফিল্টার খুলুন", + "options": "অপশন", + "or": "অথবা", + "organize_into_albums": "অ্যালবামে গুছিয়ে রাখুন", + "organize_into_albums_description": "বর্তমান সিঙ্ক সেটিংস ব্যবহার করে বিদ্যমান ছবিগুলো অ্যালবামে রাখুন", + "organize_your_library": "আপনার লাইব্রেরি গুছিয়ে রাখুন", + "orientation": "ওরিয়েন্টেশন", + "original": "মূল", + "other": "অন্যান্য", + "other_devices": "অন্যান্য ডিভাইস", + "other_variables": "অন্যান্য ভেরিয়েবল", + "owned": "মালিকানাধীন", + "owner": "মালিক", + "page": "পেজ", + "partner": "পার্টনার", + "partner_can_access": "{partner} অ্যাক্সেস করতে পারবে", + "partner_can_access_assets": "আর্কাইভ করা এবং মুছে ফেলা ব্যতীত আপনার সব ছবি ও ভিডিও", + "partner_can_access_location": "আপনার ছবি যেখানে তোলা হয়েছিল সেই অবস্থান", + "partner_list_user_photos": "{user}-এর ছবি", + "partner_page_empty_message": "আপনার ছবি এখনো কোনো পার্টনারের সাথে শেয়ার করা হয়নি।", + "partner_page_no_more_users": "যোগ করার মতো আর কোনো ব্যবহারকারী নেই", + "partner_page_select_partner": "পার্টনার নির্বাচন করুন", + "partner_page_stop_sharing_content": "{partner} আর আপনার ছবি অ্যাক্সেস করতে পারবে না।", + "partner_sharing": "পার্টনার শেয়ারিং", + "partners": "পার্টনার", + "password": "পাসওয়ার্ড", + "password_does_not_match": "পাসওয়ার্ড মিলছে না", + "password_required": "পাসওয়ার্ড আবশ্যক", + "password_reset_success": "পাসওয়ার্ড রিসেট সফল হয়েছে", + "past_durations": { + "days": "গত {days, plural, one {দিন} other {#দিন}}", + "hours": "গত {hours, plural, one {ঘণ্টা} other {#ঘণ্টা}}", + "years": "গত {years, plural, one {বছর} other {#বছর}}" + }, + "path": "পাথ", + "pattern": "প্যাটার্ন", + "pause": "থামান", + "pause_memories": "স্মৃতি থামান", + "paused": "থামানো হয়েছে", + "pending": "অপেক্ষমাণ", + "people": "মানুষ", + "people_edits_count": "{count, plural, one {#জন ব্যক্তি} other {#জন ব্যক্তি}} সম্পাদনা করা হয়েছে", + "people_feature_description": "ব্যক্তি অনুযায়ী গ্রুপ করা ছবি ও ভিডিও ব্রাউজ করা", + "permanent_deletion_warning": "স্থায়ী মুছে ফেলার সতর্কতা", + "permanent_deletion_warning_setting_description": "অ্যাসেট স্থায়ীভাবে মুছে ফেলার সময় একটি সতর্কতা দেখান", + "permanently_delete": "স্থায়ীভাবে মুছুন", + "permanently_delete_assets_count": "{count, plural, one {অ্যাসেট} other {অ্যাসেট}} স্থায়ীভাবে মুছুন", + "permanently_delete_assets_prompt": "আপনি কি নিশ্চিত যে আপনি {count, plural, one {এই অ্যাসেটটি} other {এই #টি অ্যাসেট}} স্থায়ীভাবে মুছে ফেলতে চান? এতে {count, plural, one {এটি এর} other {সেগুলো তাদের}} অ্যালবাম থেকেও সরানো হবে।", + "permanently_deleted_asset": "অ্যাসেট স্থায়ীভাবে মুছে ফেলা হয়েছে", + "permanently_deleted_assets_count": "{count, plural, one {#টি অ্যাসেট} other {#টি অ্যাসেট}} স্থায়ীভাবে মুছে ফেলা হয়েছে", + "permission": "অনুমতি", + "permission_empty": "আপনার অনুমতি খালি রাখা উচিত নয়", + "person": "ব্যক্তি", + "person_age_months": "{months, plural, one {#মাস} other {#মাস}} বয়স", + "person_age_year_months": "১ বছর, {months, plural, one {#মাস} other {#মাস}} বয়স", + "person_age_years": "{years, plural, one {#বছর} other {#বছর}} বয়স", + "person_birthdate": "{date}-এ জন্ম", + "person_hidden": "{name}{hidden, select, true { (লুকানো)} other {}}", + "person_recognized": "ব্যক্তি শনাক্ত হয়েছে", + "photo_shared_all_users": "মনে হচ্ছে আপনি আপনার ছবি সব ব্যবহারকারীর সাথে শেয়ার করেছেন অথবা শেয়ার করার মতো আপনার কোনো ব্যবহারকারী নেই।", + "photos": "ছবি", + "photos_and_videos": "ছবি ও ভিডিও", + "photos_from_previous_years": "পূর্ববর্তী বছরগুলোর ছবি", + "pick_a_location": "একটি অবস্থান নির্বাচন করুন", + "pick_custom_range": "কাস্টম পরিসীমা", + "pick_date_range": "একটি তারিখের পরিসীমা নির্বাচন করুন", + "pin_code_changed_successfully": "পিন কোড সফলভাবে পরিবর্তন করা হয়েছে", + "pin_code_reset_successfully": "পিন কোড সফলভাবে রিসেট করা হয়েছে", + "pin_code_setup_successfully": "পিন কোড সফলভাবে সেটআপ করা হয়েছে", + "pin_verification": "পিন কোড যাচাইকরণ", + "place": "স্থান", + "places": "স্থান", + "places_count": "{count, plural, one {{count, number}টি স্থান} other {{count, number}টি স্থান}}", + "play": "চালান", + "play_memories": "স্মৃতি চালান", + "play_motion_photo": "মোশন ফটো চালান", + "play_or_pause_video": "ভিডিও চালান বা থামান", + "play_original_video": "মূল ভিডিও চালান", + "play_original_video_setting_description": "ট্রান্সকোড করা ভিডিওর পরিবর্তে মূল ভিডিও চালাতে অগ্রাধিকার দিন। মূল অ্যাসেট সামঞ্জস্যপূর্ণ না হলে এটি সঠিকভাবে চলতে নাও পারে।", + "play_transcoded_video": "ট্রান্সকোড করা ভিডিও চালান", + "please_auth_to_access": "অ্যাক্সেস করতে অনুগ্রহ করে প্রমাণীকরণ করুন", + "plugin_method_filter_type": "ফিল্টার", + "plugin_method_filter_type_description": "এই পদ্ধতিটি ইভেন্ট ফিল্টার করতে পারে এবং শর্তসাপেক্ষে পরবর্তী ধাপগুলো চলতে বাধা দিতে পারে", + "port": "পোর্ট", + "preferences_settings_subtitle": "অ্যাপের পছন্দসমূহ পরিচালনা করুন", + "preferences_settings_title": "পছন্দসমূহ", + "preparing": "প্রস্তুত হচ্ছে", + "preset": "প্রিসেট", + "preview": "প্রিভিউ", + "previous": "পূর্ববর্তী", + "previous_memory": "পূর্ববর্তী স্মৃতি", + "previous_or_next_day": "দিন সামনে/পেছনে", + "previous_or_next_month": "মাস সামনে/পেছনে", + "previous_or_next_photo": "ছবি সামনে/পেছনে", + "previous_or_next_year": "বছর সামনে/পেছনে", + "primary": "প্রাথমিক", + "privacy": "গোপনীয়তা", + "profile": "প্রোফাইল", + "profile_drawer_app_logs": "লগসমূহ", + "profile_drawer_github": "GitHub", + "profile_drawer_readonly_mode": "রিড-অনলি মোড চালু আছে। বের হতে ব্যবহারকারীর অ্যাভাটার আইকনে দীর্ঘক্ষণ চাপ দিন।", + "profile_image_of_user": "{user}-এর প্রোফাইল ছবি", + "profile_picture_set": "প্রোফাইল ছবি সেট করা হয়েছে।", + "projection_type": "প্রজেকশন টাইপ", + "public_album": "পাবলিক অ্যালবাম", + "public_share": "পাবলিক শেয়ার", + "purchase_account_info": "সাপোর্টার", + "purchase_activated_subtitle": "Immich এবং ওপেন-সোর্স সফটওয়্যারকে সমর্থন করার জন্য ধন্যবাদ", + "purchase_activated_time": "{date}-এ সক্রিয় করা হয়েছে", + "purchase_activated_title": "আপনার কী সফলভাবে সক্রিয় করা হয়েছে", + "purchase_button_activate": "সক্রিয় করুন", + "purchase_button_buy": "কিনুন", + "purchase_button_buy_immich": "Immich কিনুন", + "purchase_button_never_show_again": "আর কখনো দেখাবেন না", + "purchase_button_reminder": "৩০ দিন পর আমাকে মনে করিয়ে দিন", + "purchase_button_remove_key": "কী সরান", + "purchase_button_select": "নির্বাচন করুন", + "purchase_failed_activation": "সক্রিয় করা ব্যর্থ হয়েছে! সঠিক প্রোডাক্ট কী-এর জন্য আপনার ইমেইল চেক করুন!", + "purchase_individual_description_1": "একজন ব্যক্তির জন্য", + "purchase_individual_description_2": "সাপোর্টার স্ট্যাটাস", + "purchase_individual_title": "ব্যক্তিগত", + "purchase_input_suggestion": "প্রোডাক্ট কী আছে? নিচে কী-টি লিখুন", + "purchase_lifetime_description": "লাইফটাইম ক্রয়", + "purchase_option_title": "ক্রয়ের অপশন", + "purchase_panel_info_1": "Immich তৈরি করতে অনেক সময় ও পরিশ্রম লাগে, এবং আমাদের পূর্ণকালীন ইঞ্জিনিয়াররা এটিকে যতটা সম্ভব ভালো করার জন্য কাজ করছেন। আমাদের লক্ষ্য হলো ওপেন-সোর্স সফটওয়্যার এবং নৈতিক ব্যবসায়িক চর্চাকে ডেভেলপারদের জন্য একটি টেকসই আয়ের উৎস করে তোলা এবং শোষণমূলক ক্লাউড পরিষেবার প্রকৃত বিকল্পসহ একটি গোপনীয়তা-সম্মানকারী ইকোসিস্টেম তৈরি করা।", + "purchase_panel_info_2": "যেহেতু আমরা পেওয়াল যোগ না করার প্রতিশ্রুতিবদ্ধ, তাই এই ক্রয় আপনাকে Immich-এ কোনো অতিরিক্ত ফিচার দেবে না। Immich-এর চলমান উন্নয়নে সমর্থন দিতে আমরা আপনার মতো ব্যবহারকারীদের উপর নির্ভরশীল।", + "purchase_panel_title": "প্রজেক্টকে সমর্থন করুন", + "purchase_per_server": "প্রতি সার্ভার", + "purchase_per_user": "প্রতি ব্যবহারকারী", + "purchase_remove_product_key": "প্রোডাক্ট কী সরান", + "purchase_remove_product_key_prompt": "আপনি কি নিশ্চিত যে আপনি প্রোডাক্ট কী সরাতে চান?", + "purchase_remove_server_product_key": "সার্ভার প্রোডাক্ট কী সরান", + "purchase_remove_server_product_key_prompt": "আপনি কি নিশ্চিত যে আপনি সার্ভার প্রোডাক্ট কী সরাতে চান?", + "purchase_server_description_1": "পুরো সার্ভারের জন্য", + "purchase_server_description_2": "সাপোর্টার স্ট্যাটাস", + "purchase_server_title": "সার্ভার", + "purchase_settings_server_activated": "সার্ভার প্রোডাক্ট কী অ্যাডমিন দ্বারা পরিচালিত হয়", + "query_asset_id": "কোয়েরি অ্যাসেট ID", + "queue_status": "সারিবদ্ধ হচ্ছে {count}/{total}", + "rate_asset": "অ্যাসেট রেট করুন", + "rating": "স্টার রেটিং", + "rating_clear": "রেটিং মুছুন", + "rating_count": "{count, plural, =0 {রেট করা হয়নি} one {#স্টার} other {#স্টার}}", + "rating_description": "তথ্য প্যানেলে EXIF রেটিং প্রদর্শন করুন", + "reaction_options": "রিঅ্যাকশন অপশন", + "read_changelog": "চেঞ্জলগ পড়ুন", + "readonly_mode_disabled": "রিড-অনলি মোড নিষ্ক্রিয়", + "readonly_mode_enabled": "রিড-অনলি মোড সক্রিয়", + "ready_for_upload": "আপলোডের জন্য প্রস্তুত", + "reassign": "পুনরায় নির্ধারণ করুন", + "reassigned_assets_to_existing_person": "{name, select, null {একজন বিদ্যমান ব্যক্তির} other {{name}-এর}} কাছে {count, plural, one {#টি অ্যাসেট} other {#টি অ্যাসেট}} পুনরায় নির্ধারণ করা হয়েছে", + "reassigned_assets_to_new_person": "নতুন ব্যক্তির কাছে {count, plural, one {#টি অ্যাসেট} other {#টি অ্যাসেট}} পুনরায় নির্ধারণ করা হয়েছে", + "reassing_hint": "নির্বাচিত অ্যাসেটগুলো একজন বিদ্যমান ব্যক্তির কাছে নির্ধারণ করুন", + "recent": "সাম্প্রতিক", + "recent_searches": "সাম্প্রতিক অনুসন্ধান", + "recently_added": "সম্প্রতি যোগ হয়েছে", + "recently_added_body": "আপনি সম্প্রতি যা যোগ করেছেন তার সবকিছুতে একটি নির্দিষ্ট পেজে সরাসরি চলে যান।", + "recently_added_description": "Immich-এ আপলোড করার সময় অনুযায়ী সাজানো আপনার অ্যাসেট ব্রাউজ করুন", + "recently_added_page_title": "সম্প্রতি যোগ হয়েছে", + "recently_added_title": "সম্প্রতি যোগ হয়েছে", + "recently_taken": "সম্প্রতি তোলা", + "refresh": "রিফ্রেশ", + "refresh_encoded_videos": "এনকোড করা ভিডিও রিফ্রেশ করুন", + "refresh_faces": "মুখ রিফ্রেশ করুন", + "refresh_metadata": "মেটাডেটা রিফ্রেশ করুন", + "refresh_thumbnails": "থাম্বনেইল রিফ্রেশ করুন", + "refreshed": "রিফ্রেশ করা হয়েছে", + "refreshing_encoded_video": "এনকোড করা ভিডিও রিফ্রেশ করা হচ্ছে", + "refreshing_faces": "মুখ রিফ্রেশ করা হচ্ছে", + "refreshing_metadata": "মেটাডেটা রিফ্রেশ করা হচ্ছে", + "regenerating_thumbnails": "থাম্বনেইল পুনরায় তৈরি করা হচ্ছে", + "remote": "দূরবর্তী", + "remote_assets": "দূরবর্তী অ্যাসেট", + "remote_media_summary": "দূরবর্তী মিডিয়া সারসংক্ষেপ", + "remove": "সরান", + "remove_assets_album_confirmation": "আপনি কি নিশ্চিত যে আপনি অ্যালবাম থেকে {count, plural, one {#টি অ্যাসেট} other {#টি অ্যাসেট}} সরাতে চান?", + "remove_assets_shared_link_confirmation": "আপনি কি নিশ্চিত যে আপনি এই শেয়ার লিংক থেকে {count, plural, one {#টি অ্যাসেট} other {#টি অ্যাসেট}} সরাতে চান?", + "remove_assets_title": "অ্যাসেট সরাবেন?", + "remove_custom_date_range": "কাস্টম তারিখের পরিসীমা সরান", + "remove_filter": "ফিল্টার সরান", + "remove_from_album": "অ্যালবাম থেকে সরান", + "remove_from_album_action_prompt": "{count}টি অ্যালবাম থেকে সরানো হয়েছে", + "remove_from_favorites": "ফেভারিট থেকে সরান", + "remove_from_lock_folder_action_prompt": "{count}টি লক করা ফোল্ডার থেকে সরানো হয়েছে", + "remove_from_locked_folder": "লক করা ফোল্ডার থেকে সরান", + "remove_from_locked_folder_confirmation": "আপনি কি নিশ্চিত যে আপনি এই ছবি ও ভিডিওগুলো লক করা ফোল্ডার থেকে সরাতে চান? সেগুলো আপনার লাইব্রেরিতে দৃশ্যমান হবে।", + "remove_from_shared_link": "শেয়ার লিংক থেকে সরান", + "remove_memory": "স্মৃতি সরান", + "remove_photo_from_memory": "এই স্মৃতি থেকে ছবি সরান", + "remove_tag": "ট্যাগ সরান", + "remove_user": "ব্যবহারকারী সরান", + "removed_api_key": "API কী সরানো হয়েছে: {name}", + "removed_from_archive": "আর্কাইভ থেকে সরানো হয়েছে", + "removed_from_favorites": "ফেভারিট থেকে সরানো হয়েছে", + "removed_from_favorites_count": "ফেভারিট থেকে {count, plural, other {#টি সরানো হয়েছে}}", + "removed_memory": "স্মৃতি সরানো হয়েছে", + "removed_tagged_assets": "{count, plural, one {#টি অ্যাসেট} other {#টি অ্যাসেট}} থেকে ট্যাগ সরানো হয়েছে", + "rename": "নাম পরিবর্তন করুন", + "repository": "রিপোজিটরি", + "require_password": "পাসওয়ার্ড আবশ্যক", + "rescan": "পুনরায় স্ক্যান করুন", + "reset": "রিসেট", + "reset_password": "পাসওয়ার্ড রিসেট করুন", + "reset_people_visibility": "ব্যক্তির দৃশ্যমানতা রিসেট করুন", + "reset_pin_code": "পিন কোড রিসেট করুন", + "reset_pin_code_description": "আপনি যদি আপনার পিন কোড ভুলে যান, তাহলে এটি রিসেট করতে সার্ভার অ্যাডমিনিস্ট্রেটরের সাথে যোগাযোগ করতে পারেন", + "reset_pin_code_with_password": "আপনি সবসময় আপনার পাসওয়ার্ড দিয়ে পিন কোড রিসেট করতে পারবেন", + "reset_sqlite": "SQLite ডেটাবেস রিসেট করুন", + "reset_sqlite_clear_app_data": "ডেটা মুছুন", + "reset_sqlite_confirmation": "আপনি কি নিশ্চিত যে আপনি অ্যাপের ডেটা মুছতে চান? এতে সব সেটিংস মুছে যাবে এবং আপনাকে সাইন আউট করে দেওয়া হবে।", + "reset_sqlite_confirmation_note": "নোট: মুছে ফেলার পর আপনাকে অ্যাপটি পুনরায় চালু করতে হবে।", + "reset_sqlite_done": "অ্যাপের ডেটা মুছে ফেলা হয়েছে। অনুগ্রহ করে Immich পুনরায় চালু করে আবার লগ ইন করুন।", + "reset_sqlite_success": "SQLite ডেটাবেস সফলভাবে রিসেট করা হয়েছে", + "reset_to_default": "ডিফল্টে রিসেট করুন", + "resolution": "রেজোলিউশন", + "resolve_duplicates": "ডুপ্লিকেট সমাধান করুন", + "resolved_all_duplicates": "সব ডুপ্লিকেট সমাধান করা হয়েছে", + "restore": "পুনরুদ্ধার করুন", + "restore_all": "সব পুনরুদ্ধার করুন", + "restore_user": "ব্যবহারকারী পুনরুদ্ধার করুন", + "restored_asset": "অ্যাসেট পুনরুদ্ধার করা হয়েছে", + "resume": "আবার শুরু করুন", + "resume_paused_jobs": "{count, plural, one {#টি থামানো জব} other {#টি থামানো জব}} আবার শুরু করুন", + "review_duplicates": "ডুপ্লিকেট পর্যালোচনা করুন", + "review_large_files": "বড় ফাইল পর্যালোচনা করুন", + "role": "ভূমিকা", + "role_editor": "এডিটর", + "role_viewer": "ভিউয়ার", + "running": "চলছে", + "save": "সংরক্ষণ করুন", + "saved": "সংরক্ষিত হয়েছে", + "saved_api_key": "API কী সংরক্ষণ করা হয়েছে", + "saved_profile": "প্রোফাইল সংরক্ষণ করা হয়েছে", + "saved_settings": "সেটিংস সংরক্ষণ করা হয়েছে", + "say_something": "কিছু বলুন", + "scaffold_body_error_occurred": "ত্রুটি ঘটেছে", + "scaffold_body_error_unrecoverable": "একটি অপুনরুদ্ধারযোগ্য ত্রুটি ঘটেছে। অনুগ্রহ করে Discord অথবা GitHub-এ ত্রুটি ও স্ট্যাক ট্রেসটি শেয়ার করুন যাতে আমরা সাহায্য করতে পারি। পরামর্শ দেওয়া হলে, আপনি নিচে অ্যাপের ডেটা মুছতে পারেন।", + "scan": "স্ক্যান করুন", + "scan_all_libraries": "সব লাইব্রেরি স্ক্যান করুন", + "scan_library": "স্ক্যান করুন", + "scanning": "স্ক্যান করা হচ্ছে", + "scanning_for_album": "অ্যালবামের জন্য স্ক্যান করা হচ্ছে..।", + "screencast_mode_description": "স্ক্রিনে কীবোর্ড ও মাউস ইভেন্ট ইন্ডিকেটর দেখান", + "screencast_mode_title": "স্ক্রিনকাস্ট মোড টগল করুন", + "search": "অনুসন্ধান", + "search_albums": "অ্যালবাম অনুসন্ধান করুন", + "search_by_context": "প্রসঙ্গ অনুযায়ী অনুসন্ধান করুন", + "search_by_description": "বিবরণ অনুযায়ী অনুসন্ধান করুন", + "search_by_description_example": "সাপায় হাইকিং দিবস", + "search_by_filename": "ফাইলের নাম বা এক্সটেনশন অনুযায়ী অনুসন্ধান করুন", + "search_by_filename_example": "যেমন IMG_1234.JPG অথবা PNG", + "search_by_full_path": "সম্পূর্ণ পাথ বা ফোল্ডার অনুযায়ী অনুসন্ধান করুন", + "search_by_full_path_example": "/John/Projects/3D_Printing/2026-07-01 - আপনি Projects, 3D, Printing, 2026 ইত্যাদি অনুসন্ধান করতে পারেন", + "search_by_ocr": "OCR অনুযায়ী অনুসন্ধান করুন", + "search_by_ocr_example": "Latte", + "search_camera_lens_model": "লেন্স মডেল অনুসন্ধান করুন..।", + "search_camera_make": "ক্যামেরা নির্মাতা অনুসন্ধান করুন..।", + "search_camera_model": "ক্যামেরা মডেল অনুসন্ধান করুন..।", + "search_city": "শহর অনুসন্ধান করুন..।", + "search_country": "দেশ অনুসন্ধান করুন..।", + "search_filter_apply": "ফিল্টার প্রয়োগ করুন", + "search_filter_camera_title": "ক্যামেরার ধরন নির্বাচন করুন", + "search_filter_date": "তারিখ", + "search_filter_date_interval": "{start} থেকে {end}", + "search_filter_date_title": "একটি তারিখের পরিসীমা নির্বাচন করুন", + "search_filter_display_option_not_in_album": "অ্যালবামে নেই", + "search_filter_display_options": "প্রদর্শন অপশন", + "search_filter_filename": "ফাইলের নাম অনুযায়ী অনুসন্ধান করুন", + "search_filter_location": "অবস্থান", + "search_filter_location_title": "অবস্থান নির্বাচন করুন", + "search_filter_media_type": "মিডিয়ার ধরন", + "search_filter_media_type_title": "মিডিয়ার ধরন নির্বাচন করুন", + "search_filter_people_title": "ব্যক্তি নির্বাচন করুন", + "search_filter_star_rating": "স্টার রেটিং", + "search_filter_tags_title": "ট্যাগ নির্বাচন করুন", + "search_for": "অনুসন্ধান করুন", + "search_for_existing_person": "বিদ্যমান ব্যক্তি অনুসন্ধান করুন", + "search_no_more_result": "আর কোনো ফলাফল নেই", + "search_no_people": "কোনো ব্যক্তি নেই", + "search_no_people_named": "\"{name}\" নামে কোনো ব্যক্তি নেই", + "search_no_result": "কোনো ফলাফল পাওয়া যায়নি, একটি ভিন্ন অনুসন্ধান শব্দ বা সমন্বয় ব্যবহার করে দেখুন", + "search_options": "অনুসন্ধান অপশন", + "search_page_search_photos_videos": "আপনার ছবি ও ভিডিও অনুসন্ধান করুন", + "search_page_view_all_button": "সব দেখুন", + "search_people": "ব্যক্তি অনুসন্ধান করুন", + "search_places": "স্থান অনুসন্ধান করুন", + "search_rating": "রেটিং অনুযায়ী অনুসন্ধান করুন..।", + "search_settings": "অনুসন্ধান সেটিংস", + "search_state": "স্টেট অনুসন্ধান করুন..।", + "search_tags": "ট্যাগ অনুসন্ধান করুন..।", + "search_timezone": "টাইমজোন অনুসন্ধান করুন..।", + "search_type": "অনুসন্ধানের ধরন", + "search_your_photos": "আপনার ছবি অনুসন্ধান করুন", + "searching_locales": "লোকেল অনুসন্ধান করা হচ্ছে..।", + "second": "সেকেন্ড", + "see_all_people": "সব ব্যক্তি দেখুন", + "select": "নির্বাচন করুন", + "select_album": "অ্যালবাম নির্বাচন করুন", + "select_album_cover": "অ্যালবাম কভার নির্বাচন করুন", + "select_albums": "অ্যালবাম নির্বাচন করুন", + "select_all": "সব নির্বাচন করুন", + "select_all_duplicates": "সব ডুপ্লিকেট নির্বাচন করুন", + "select_avatar_color": "অ্যাভাটারের রঙ নির্বাচন করুন", + "select_count": "{count, plural, one {#টি নির্বাচন করুন} other {#টি নির্বাচন করুন}}", + "select_cutoff_date": "কাটঅফ তারিখ নির্বাচন করুন", + "select_face": "মুখ নির্বাচন করুন", + "select_featured_photo": "ফিচার্ড ছবি নির্বাচন করুন", + "select_from_computer": "কম্পিউটার থেকে নির্বাচন করুন", + "select_keep_all": "সব রাখা নির্বাচন করুন", + "select_new_face": "নতুন মুখ নির্বাচন করুন", + "select_people": "ব্যক্তি নির্বাচন করুন", + "select_person": "ব্যক্তি নির্বাচন করুন", + "select_person_to_tag": "ট্যাগ করার জন্য একজন ব্যক্তি নির্বাচন করুন", + "select_photos": "ছবি নির্বাচন করুন", + "select_quality": "মান নির্বাচন করুন", + "select_trash_all": "সব ট্র্যাশ নির্বাচন করুন", + "selected": "নির্বাচিত", + "selected_count": "{count, plural, other {#টি নির্বাচিত}}", + "selected_gps_coordinates": "নির্বাচিত GPS স্থানাঙ্ক", + "send_message": "বার্তা পাঠান", + "send_welcome_email": "স্বাগতম ইমেইল পাঠান", + "server_endpoint": "সার্ভার এন্ডপয়েন্ট", + "server_info_box_app_version": "অ্যাপ ভার্সন", + "server_info_box_server_url": "সার্ভার URL", + "server_offline": "সার্ভার অফলাইন", + "server_online": "সার্ভার অনলাইন", + "server_privacy": "সার্ভার গোপনীয়তা", + "server_restarting_description": "এই পেজটি শীঘ্রই রিফ্রেশ হবে।", + "server_restarting_title": "সার্ভার পুনরায় চালু হচ্ছে", + "server_stats": "সার্ভার পরিসংখ্যান", + "server_update_available": "সার্ভার আপডেট উপলব্ধ", + "server_version": "সার্ভার ভার্সন", + "set": "সেট করুন", + "set_as_album_cover": "অ্যালবাম কভার হিসেবে সেট করুন", + "set_as_featured_photo": "ফিচার্ড ছবি হিসেবে সেট করুন", + "set_as_profile_picture": "প্রোফাইল ছবি হিসেবে সেট করুন", + "set_date_of_birth": "জন্ম তারিখ সেট করুন", + "set_profile_picture": "প্রোফাইল ছবি সেট করুন", + "set_slideshow_to_fullscreen": "স্লাইডশো ফুলস্ক্রিনে সেট করুন", + "set_stack_primary_asset": "প্রাথমিক অ্যাসেট হিসেবে সেট করুন", + "setting_image_navigation_enable_subtitle": "চালু থাকলে, আপনি স্ক্রিনের বাম/ডান প্রান্তের চতুর্থাংশে ট্যাপ করে পূর্ববর্তী/পরবর্তী ছবিতে যেতে পারবেন।", + "setting_image_navigation_enable_title": "নেভিগেট করতে ট্যাপ করুন", + "setting_image_navigation_title": "ছবি নেভিগেশন", + "setting_image_viewer_help": "ডিটেইল ভিউয়ার প্রথমে ছোট থাম্বনেইল লোড করে, তারপর মাঝারি আকারের প্রিভিউ লোড করে (চালু থাকলে), অবশেষে মূল ছবি লোড করে (চালু থাকলে)।", + "setting_image_viewer_original_subtitle": "মূল পূর্ণ-রেজোলিউশন ছবি লোড করতে চালু করুন (বড়!)। ডেটা ব্যবহার কমাতে (নেটওয়ার্ক ও ডিভাইস ক্যাশ উভয়ই) নিষ্ক্রিয় করুন।", + "setting_image_viewer_original_title": "মূল ছবি লোড করুন", + "setting_image_viewer_preview_subtitle": "মাঝারি-রেজোলিউশন ছবি লোড করতে চালু করুন। সরাসরি মূল ছবি লোড করতে বা শুধুমাত্র থাম্বনেইল ব্যবহার করতে নিষ্ক্রিয় করুন।", + "setting_image_viewer_preview_title": "প্রিভিউ ছবি লোড করুন", + "setting_languages_apply": "প্রয়োগ করুন", + "setting_languages_subtitle": "অ্যাপের ভাষা পরিবর্তন করুন", + "setting_notifications_notify_minutes": "{count} মিনিট", + "setting_notifications_notify_seconds": "{count} সেকেন্ড", + "setting_notifications_subtitle": "আপনার নোটিফিকেশন পছন্দ সামঞ্জস্য করুন", + "setting_video_viewer_auto_play_subtitle": "ভিডিও খোলার সাথে সাথে স্বয়ংক্রিয়ভাবে চালানো শুরু করুন", + "setting_video_viewer_auto_play_title": "স্বয়ংক্রিয়ভাবে ভিডিও চালান", + "setting_video_viewer_looping_title": "লুপিং", + "setting_video_viewer_original_video_subtitle": "সার্ভার থেকে ভিডিও স্ট্রিম করার সময়, ট্রান্সকোড উপলব্ধ থাকলেও মূল ভিডিও চালান। এতে বাফারিং হতে পারে। স্থানীয়ভাবে উপলব্ধ ভিডিও এই সেটিং নির্বিশেষে মূল মানে চালানো হয়।", + "setting_video_viewer_original_video_title": "মূল ভিডিও বাধ্যতামূলক করুন", + "settings": "সেটিংস", + "settings_saved": "সেটিংস সংরক্ষণ করা হয়েছে", + "setup_pin_code": "একটি পিন কোড সেটআপ করুন", + "share": "শেয়ার করুন", + "share_dialog_preparing": "প্রস্তুত করা হচ্ছে..।", + "share_link": "শেয়ার লিংক", + "share_original": "মূল ব্যবহার করুন (বড়)", + "share_preview": "থাম্বনেইল ব্যবহার করুন (ছোট)", + "share_quality_body": "শেয়ার করার আগে ছবির মান নির্বাচন করতে শেয়ার বাটনটি চেপে ধরে রাখুন।", + "share_quality_title": "আপনার শেয়ার মান নির্বাচন করুন", + "shared": "শেয়ার করা হয়েছে", + "shared_album_activities_input_disable": "মন্তব্য নিষ্ক্রিয় করা আছে", + "shared_album_activity_remove_content": "আপনি কি এই কার্যকলাপটি মুছে ফেলতে চান?", + "shared_album_activity_remove_title": "কার্যকলাপ মুছুন", + "shared_album_section_people_action_error": "অ্যালবাম থেকে ত্যাগ/সরানোর সময় ত্রুটি হয়েছে", + "shared_album_section_people_title": "ব্যক্তি", + "shared_by": "শেয়ার করেছেন", + "shared_by_user": "{user} শেয়ার করেছেন", + "shared_by_you": "আপনি শেয়ার করেছেন", + "shared_from_partner": "{partner}-এর ছবি", + "shared_intent_upload_button_progress_text": "{current} / {total} আপলোড হয়েছে", + "shared_link_app_bar_title": "শেয়ার করা লিংক", + "shared_link_clipboard_copied_massage": "ক্লিপবোর্ডে কপি করা হয়েছে", + "shared_link_create_error": "শেয়ার লিংক তৈরি করার সময় ত্রুটি হয়েছে", + "shared_link_custom_url_description": "একটি কাস্টম URL নাম দিয়ে এই শেয়ার লিংকটি অ্যাক্সেস করুন", + "shared_link_custom_url_title": "কাস্টম URL", + "shared_link_custom_url_warning": "সতর্কতা: ফরওয়ার্ড স্ল্যাশযুক্ত কাস্টম URL নাম আপনার প্রত্যাশা অনুযায়ী কাজ নাও করতে পারে।", + "shared_link_edit_description_hint": "শেয়ারের বিবরণ লিখুন", + "shared_link_edit_expire_after_option_day": "১ দিন", + "shared_link_edit_expire_after_option_days": "{count} দিন", + "shared_link_edit_expire_after_option_hour": "১ ঘণ্টা", + "shared_link_edit_expire_after_option_hours": "{count} ঘণ্টা", + "shared_link_edit_expire_after_option_minute": "১ মিনিট", + "shared_link_edit_expire_after_option_minutes": "{count} মিনিট", + "shared_link_edit_expire_after_option_months": "{count} মাস", + "shared_link_edit_expire_after_option_year": "{count} বছর", + "shared_link_edit_password_hint": "শেয়ারের পাসওয়ার্ড লিখুন", + "shared_link_edit_submit_button": "লিংক আপডেট করুন", + "shared_link_error_server_url_fetch": "সার্ভার URL আনা যায়নি", + "shared_link_expires_day": "{count} দিনে মেয়াদ শেষ হবে", + "shared_link_expires_days": "{count} দিনে মেয়াদ শেষ হবে", + "shared_link_expires_hour": "{count} ঘণ্টায় মেয়াদ শেষ হবে", + "shared_link_expires_hours": "{count} ঘণ্টায় মেয়াদ শেষ হবে", + "shared_link_expires_minute": "{count} মিনিটে মেয়াদ শেষ হবে", + "shared_link_expires_minutes": "{count} মিনিটে মেয়াদ শেষ হবে", + "shared_link_expires_never": "মেয়াদ শেষ হবে না ∞", + "shared_link_expires_second": "{count} সেকেন্ডে মেয়াদ শেষ হবে", + "shared_link_expires_seconds": "{count} সেকেন্ডে মেয়াদ শেষ হবে", + "shared_link_individual_shared": "ব্যক্তিগত শেয়ার", + "shared_link_info_chip_metadata": "EXIF", + "shared_link_manage_links": "শেয়ার করা লিংক পরিচালনা করুন", + "shared_link_options": "শেয়ার লিংক অপশন", + "shared_link_password_description": "এই শেয়ার লিংক অ্যাক্সেস করতে পাসওয়ার্ড আবশ্যক করুন", + "shared_links": "শেয়ার করা লিংক", + "shared_links_description": "একটি লিংক দিয়ে ছবি ও ভিডিও শেয়ার করুন", + "shared_photos_and_videos_count": "{assetCount, plural, other {#টি শেয়ার করা ছবি ও ভিডিও।}}", + "shared_with_me": "আমার সাথে শেয়ার করা হয়েছে", + "shared_with_partner": "{partner}-এর সাথে শেয়ার করা হয়েছে", + "sharing": "শেয়ারিং", + "sharing_enter_password": "এই পেজটি দেখতে অনুগ্রহ করে পাসওয়ার্ড লিখুন।", + "shift_to_permanent_delete": "অ্যাসেট স্থায়ীভাবে মুছতে ⇧ চাপুন", + "show_album_options": "অ্যালবাম অপশন দেখান", + "show_albums": "অ্যালবাম দেখান", + "show_all_people": "সব ব্যক্তি দেখান", + "show_and_hide_people": "ব্যক্তি দেখান ও লুকান", + "show_file_location": "ফাইলের অবস্থান দেখান", + "show_gallery": "গ্যালারি দেখান", + "show_hidden_people": "লুকানো ব্যক্তি দেখান", + "show_in_timeline": "টাইমলাইনে দেখান", + "show_in_timeline_setting_description": "এই ব্যবহারকারীর ছবি ও ভিডিও আপনার টাইমলাইনে দেখান", + "show_keyboard_shortcuts": "কীবোর্ড শর্টকাট দেখান", + "show_less": "কম দেখান", + "show_metadata": "মেটাডেটা দেখান", + "show_more_fields": "{count, plural, one {আরও #টি ফিল্ড দেখান} other {আরও #টি ফিল্ড দেখান}}", + "show_or_hide_info": "তথ্য দেখান বা লুকান", + "show_password": "পাসওয়ার্ড দেখান", + "show_person_options": "ব্যক্তির অপশন দেখান", + "show_progress_bar": "প্রগ্রেস বার দেখান", + "show_schema": "স্কিমা দেখান", + "show_search_options": "অনুসন্ধান অপশন দেখান", + "show_shared_links": "শেয়ার করা লিংক দেখান", + "show_slideshow_metadata_overlay": "ছবির তথ্য ওভারলে দেখান", + "show_slideshow_transition": "স্লাইডশো ট্রানজিশন দেখান", + "show_supporter_badge": "সাপোর্টার ব্যাজ", + "show_supporter_badge_description": "একটি সাপোর্টার ব্যাজ দেখান", + "show_text_recognition": "টেক্সট রিকগনিশন দেখান", + "show_text_search_menu": "টেক্সট অনুসন্ধান মেনু দেখান", + "shuffle": "শাফল", + "sidebar": "সাইডবার", + "sidebar_display_description": "সাইডবারে ভিউয়ের একটি লিংক প্রদর্শন করুন", + "sign_out": "সাইন আউট", + "sign_up": "সাইন আপ", + "size": "আকার", + "skip": "এড়িয়ে যান", + "skip_to_content": "কন্টেন্টে যান", + "skip_to_folders": "ফোল্ডারে যান", + "skip_to_tags": "ট্যাগে যান", + "slideshow": "স্লাইডশো", + "slideshow_body": "আরাম করে বসুন এবং আপনার ছবিগুলো ফুলস্ক্রিন স্লাইডশোতে দেখুন।", + "slideshow_metadata_overlay_mode": "ওভারলে কন্টেন্ট", + "slideshow_metadata_overlay_mode_description_only": "শুধু বিবরণ", + "slideshow_metadata_overlay_mode_full": "সম্পূর্ণ", + "slideshow_repeat": "স্লাইডশো পুনরাবৃত্তি করুন", + "slideshow_repeat_description": "স্লাইডশো শেষ হলে শুরুতে ফিরে যান", + "slideshow_settings": "স্লাইডশো সেটিংস", + "slideshow_title": "স্লাইডশো", + "smart_album": "স্মার্ট অ্যালবাম", + "some_assets_already_have_a_location_warning": "নির্বাচিত কিছু অ্যাসেটে ইতিমধ্যে একটি অবস্থান রয়েছে", + "sort_albums_by": "অ্যালবাম সাজান..।", + "sort_created": "তৈরির তারিখ", + "sort_items": "আইটেমের সংখ্যা", + "sort_modified": "পরিবর্তনের তারিখ", + "sort_oldest": "সবচেয়ে পুরাতন ছবি", + "sort_people_by_similarity": "সাদৃশ্য অনুযায়ী ব্যক্তি সাজান", + "sort_recent": "সবচেয়ে সাম্প্রতিক ছবি", + "sort_title": "শিরোনাম", + "source": "সোর্স", + "stack": "স্ট্যাক", + "stack_action_prompt": "{count}টি স্ট্যাক করা হয়েছে", + "stack_duplicates": "ডুপ্লিকেট স্ট্যাক করুন", + "stack_selected_photos": "নির্বাচিত ছবি স্ট্যাক করুন", + "stacked_assets_count": "{count, plural, one {#টি অ্যাসেট} other {#টি অ্যাসেট}} স্ট্যাক করা হয়েছে", + "stacktrace": "স্ট্যাকট্রেস", + "start": "শুরু করুন", + "start_date": "শুরুর তারিখ", + "start_date_before_end_date": "শুরুর তারিখ অবশ্যই শেষ তারিখের আগে হতে হবে", + "state": "স্টেট", + "status": "অবস্থা", + "step_delete": "ধাপ মুছুন", + "step_delete_confirm": "আপনি কি নিশ্চিত যে আপনি এই ধাপটি মুছে ফেলতে চান?", + "step_details": "ধাপের বিবরণ", + "steps": "ধাপসমূহ", + "stop_casting": "কাস্টিং বন্ধ করুন", + "stop_motion_photo": "মোশন ফটো থামান", + "stop_photo_sharing": "আপনার ছবি শেয়ার করা বন্ধ করবেন?", + "stop_photo_sharing_description": "{partner} আর আপনার ছবি অ্যাক্সেস করতে পারবে না।", + "stop_sharing_photos_with_user": "এই ব্যবহারকারীর সাথে আপনার ছবি শেয়ার করা বন্ধ করুন", + "storage": "সংরক্ষণাগার স্থান", + "storage_label": "স্টোরেজ লেবেল", + "storage_quota": "স্টোরেজ কোটা", + "storage_usage": "{available}-এর মধ্যে {used} ব্যবহৃত", + "submit": "জমা দিন", + "success": "সফল", + "suggestions": "পরামর্শ", + "sunrise_on_the_beach": "সৈকতে সূর্যোদয়", + "support": "সহায়তা", + "support_and_feedback": "সহায়তা ও মতামত", + "support_third_party_description": "আপনার Immich ইনস্টলেশনটি একটি তৃতীয় পক্ষ দ্বারা প্যাকেজ করা হয়েছিল। আপনি যে সমস্যাগুলো অনুভব করছেন তা সেই প্যাকেজের কারণে হতে পারে, তাই অনুগ্রহ করে নিচের লিংকগুলো ব্যবহার করে প্রথমে তাদের কাছে সমস্যা জানান।", + "supporter": "সাপোর্টার", + "swap_merge_direction": "একত্র করার দিক অদলবদল করুন", + "sync": "সিঙ্ক", + "sync_albums": "অ্যালবাম সিঙ্ক করুন", + "sync_local": "স্থানীয় সিঙ্ক", + "sync_remote": "দূরবর্তী সিঙ্ক", + "sync_status": "সিঙ্ক স্ট্যাটাস", + "sync_status_subtitle": "সিঙ্ক সিস্টেম দেখুন ও পরিচালনা করুন", + "sync_upload_album_setting_subtitle": "Immich-এ নির্বাচিত অ্যালবামে আপনার ছবি ও ভিডিও তৈরি করুন ও আপলোড করুন", + "system_theme": "সিস্টেম থিম", + "system_theme_command_description": "সিস্টেম থিম ব্যবহার করুন ({value})", + "tag": "ট্যাগ", + "tag_assets": "অ্যাসেট ট্যাগ করুন", + "tag_created": "ট্যাগ তৈরি হয়েছে: {tag}", + "tag_face": "মুখ ট্যাগ করুন", + "tag_feature_description": "লজিক্যাল ট্যাগ বিষয় অনুযায়ী গ্রুপ করা ছবি ও ভিডিও ব্রাউজ করা", + "tag_people": "ব্যক্তি ট্যাগ করুন", + "tag_updated": "ট্যাগ আপডেট হয়েছে: {tag}", + "tagged_assets": "{count, plural, one {#টি অ্যাসেট} other {#টি অ্যাসেট}} ট্যাগ করা হয়েছে", + "tags": "ট্যাগ", + "tap_to_run_job": "জব চালাতে ট্যাপ করুন", + "template": "টেমপ্লেট", + "text_recognition": "টেক্সট রিকগনিশন", + "theme": "থিম", + "theme_selection": "থিম নির্বাচন", + "theme_selection_description": "আপনার ব্রাউজারের সিস্টেম পছন্দ অনুযায়ী স্বয়ংক্রিয়ভাবে থিম লাইট বা ডার্ক সেট করুন", + "theme_setting_asset_list_storage_indicator_title": "অ্যাসেট টাইলে স্টোরেজ ইন্ডিকেটর দেখান", + "theme_setting_asset_list_tiles_per_row_title": "প্রতি সারিতে অ্যাসেটের সংখ্যা ({count})", + "theme_setting_colorful_interface_subtitle": "ব্যাকগ্রাউন্ড পৃষ্ঠে প্রাইমারি রঙ প্রয়োগ করুন।", + "theme_setting_colorful_interface_title": "রঙিন ইন্টারফেস", + "theme_setting_primary_color_subtitle": "প্রাইমারি অ্যাকশন ও অ্যাকসেন্টের জন্য একটি রঙ নির্বাচন করুন।", + "theme_setting_primary_color_title": "প্রাইমারি রঙ", + "theme_setting_system_primary_color_title": "সিস্টেম রঙ ব্যবহার করুন", + "theme_setting_system_theme_switch": "স্বয়ংক্রিয় (সিস্টেম সেটিং অনুসরণ করুন)", + "then": "তারপর", + "they_will_be_merged_together": "তাদের একসাথে একত্র করা হবে", + "third_party_resources": "তৃতীয়-পক্ষের রিসোর্স", + "time": "সময়", + "time_based_memories": "সময়-ভিত্তিক স্মৃতি", + "time_based_memories_duration": "প্রতিটি ছবি প্রদর্শনের সময়কাল (সেকেন্ডে)।", + "timeline": "টাইমলাইন", + "timezone": "টাইমজোন", + "to_archive": "আর্কাইভ", + "to_change_password": "পাসওয়ার্ড পরিবর্তন করুন", + "to_favorite": "ফেভারিট", + "to_login": "লগইন", + "to_multi_select": "একাধিক নির্বাচন করতে", + "to_parent": "মূল ফোল্ডারে যান", + "to_select": "নির্বাচন করতে", + "to_trash": "ট্র্যাশ", + "toggle_settings": "সেটিংস টগল করুন", + "toggle_theme_description": "থিম টগল করুন", + "total": "মোট", + "total_usage": "মোট ব্যবহার", + "trash": "ট্র্যাশ", + "trash_action_prompt": "{count}টি ট্র্যাশে সরানো হয়েছে", + "trash_all": "সব ট্র্যাশে পাঠান", + "trash_count": "ট্র্যাশ {count, number}", + "trash_delete_asset": "অ্যাসেট ট্র্যাশ/মুছুন", + "trash_no_results_message": "ট্র্যাশে থাকা ছবি ও ভিডিও এখানে দেখানো হবে।", + "trash_page_delete_all": "সব মুছুন", + "trash_page_info": "ট্র্যাশে থাকা আইটেমগুলো {days} দিন পর স্থায়ীভাবে মুছে ফেলা হবে", + "trashed_items_will_be_permanently_deleted_after": "ট্র্যাশে থাকা আইটেমগুলো {days, plural, one {#দিন} other {#দিন}} পর স্থায়ীভাবে মুছে ফেলা হবে।", + "trigger": "ট্রিগার", + "trigger_asset_metadata_extraction": "অ্যাসেট মেটাডেটা এক্সট্র্যাকশন", + "trigger_asset_metadata_extraction_description": "একটি অ্যাসেটের EXIF মেটাডেটা এক্সট্র্যাক্ট করা হলে ট্রিগার হয়", + "trigger_asset_uploaded": "অ্যাসেট আপলোড", + "trigger_asset_uploaded_description": "একটি নতুন অ্যাসেট আপলোড করা হলে ট্রিগার হয়", + "trigger_person_recognized": "ব্যক্তি শনাক্ত হয়েছে", + "trigger_person_recognized_description": "একজন ব্যক্তি শনাক্ত হলে ট্রিগার হয়", + "troubleshoot": "সমস্যা সমাধান", + "type": "ধরন", + "unable_to_change_pin_code": "পিন কোড পরিবর্তন করা যায়নি", + "unable_to_check_version": "অ্যাপ বা সার্ভার ভার্সন যাচাই করা যায়নি", + "unable_to_setup_pin_code": "পিন কোড সেটআপ করা যায়নি", + "unarchive": "আর্কাইভ থেকে বের করুন", + "unarchive_action_prompt": "{count}টি আর্কাইভ থেকে সরানো হয়েছে", + "unarchived_count": "{count, plural, other {#টি আনআর্কাইভ করা হয়েছে}}", + "undo": "পূর্বাবস্থায় ফিরুন", + "unfavorite": "ফেভারিট বাদ দিন", + "unfavorite_action_prompt": "{count}টি ফেভারিট থেকে সরানো হয়েছে", + "unhide_person": "ব্যক্তিকে দৃশ্যমান করুন", + "unknown": "অজানা", + "unknown_country": "অজানা দেশ", + "unknown_date": "অজানা তারিখ", + "unknown_schema": "অজানা স্কিমা", + "unknown_year": "অজানা বছর", + "unlimited": "সীমাহীন", + "unlink_motion_video": "মোশন ভিডিও আনলিংক করুন", + "unlink_oauth": "OAuth আনলিংক করুন", + "unlinked_oauth_account": "আনলিংক করা OAuth অ্যাকাউন্ট", + "unmute_memories": "স্মৃতি আনমিউট করুন", + "unnamed_album": "নামবিহীন অ্যালবাম", + "unnamed_album_delete_confirmation": "আপনি কি নিশ্চিত যে আপনি এই অ্যালবামটি মুছে ফেলতে চান?", + "unnamed_share": "নামবিহীন শেয়ার", + "unsaved_change": "সংরক্ষিত হয়নি এমন পরিবর্তন", + "unselect_all": "সব নির্বাচন বাতিল করুন", + "unselect_all_duplicates": "সব ডুপ্লিকেটের নির্বাচন বাতিল করুন", + "unstack": "আনস্ট্যাক করুন", + "unstack_action_prompt": "{count}টি আনস্ট্যাক করা হয়েছে", + "unstacked_assets_count": "{count, plural, one {#টি অ্যাসেট} other {#টি অ্যাসেট}} আনস্ট্যাক করা হয়েছে", + "unsupported_field_type": "অসমর্থিত ফিল্ড ধরন", + "unsupported_file_type": "{file} ফাইলটি আপলোড করা যাবে না কারণ এর ফাইলের ধরন {type} সমর্থিত নয়।", + "untagged": "ট্যাগবিহীন", + "up_next": "পরবর্তীতে", + "update_location_action_prompt": "{count}টি নির্বাচিত অ্যাসেটের অবস্থান আপডেট করুন এটি দিয়ে:", + "updated_at": "আপডেট হয়েছে", + "updated_password": "পাসওয়ার্ড আপডেট হয়েছে", + "upload": "আপলোড", + "upload_concurrency": "আপলোড কনকারেন্সি", + "upload_day_count": "{date}: {count, plural, one {#টি আপলোড} other {#টি আপলোড}}", + "upload_details": "আপলোডের বিবরণ", + "upload_error_with_count": "{count, plural, one {#টি অ্যাসেট} other {#টি অ্যাসেট}}-এর জন্য আপলোড ত্রুটি", + "upload_errors": "আপলোড {count, plural, one {#টি ত্রুটি} other {#টি ত্রুটি}} সহ সম্পন্ন হয়েছে, নতুন আপলোড করা অ্যাসেট দেখতে পেজটি রিফ্রেশ করুন।", + "upload_finished": "আপলোড শেষ হয়েছে", + "upload_progress": "বাকি {remaining, number} - প্রক্রিয়াকৃত {processed, number}/{total, number}", + "upload_skipped_duplicates": "{count, plural, one {#টি ডুপ্লিকেট অ্যাসেট} other {#টি ডুপ্লিকেট অ্যাসেট}} এড়িয়ে যাওয়া হয়েছে", + "upload_status_duplicates": "ডুপ্লিকেট", + "upload_status_errors": "ত্রুটি", + "upload_status_uploaded": "আপলোড হয়েছে", + "upload_success": "আপলোড সফল হয়েছে, নতুন আপলোড করা অ্যাসেট দেখতে পেজটি রিফ্রেশ করুন।", + "upload_to_album_body": "যেসব ব্যবহারকারী ম্যানুয়াল আপলোড ফিচার ব্যবহার করেন না, তারা এখন স্থানীয় ছবি আপলোড করার সময় সরাসরি একটি অ্যালবামে যোগ করার অপশন বেছে নিতে পারবেন, আপলোড করার পর আলাদা করে অ্যালবামে যোগ করার আর প্রয়োজন নেই।", + "upload_to_album_title": "সরাসরি একটি অ্যালবামে আপলোড করুন", + "upload_to_immich": "Immich-এ আপলোড করুন ({count})", + "uploading": "আপলোড হচ্ছে", + "uploading_media": "মিডিয়া আপলোড হচ্ছে", + "uploads": "আপলোড", + "uploads_count": "{count, plural, one {#টি আপলোড} other {#টি আপলোড}}", + "url": "URL", + "usage": "ব্যবহার", + "use_biometric": "বায়োমেট্রিক ব্যবহার করুন", + "use_browser_locale": "ব্রাউজার লোকেল ব্যবহার করুন", + "use_browser_locale_description": "আপনার ব্রাউজার লোকেল অনুযায়ী তারিখ, সময় ও সংখ্যা ফরম্যাট করুন", + "use_current_connection": "বর্তমান সংযোগ ব্যবহার করুন", + "use_custom_date_range": "পরিবর্তে কাস্টম তারিখের পরিসীমা ব্যবহার করুন", + "use_template": "টেমপ্লেট ব্যবহার করুন", + "user": "ব্যবহারকারী", + "user_has_been_deleted": "এই ব্যবহারকারী মুছে ফেলা হয়েছে।", + "user_id": "ব্যবহারকারী ID", + "user_liked": "{user} {type, select, photo {এই ছবিটি} video {এই ভিডিওটি} asset {এই অ্যাসেটটি} other {এটি}} লাইক করেছেন", + "user_pin_code_settings": "পিন কোড", + "user_pin_code_settings_description": "আপনার পিন কোড পরিচালনা করুন", + "user_privacy": "ব্যবহারকারীর গোপনীয়তা", + "user_purchase_settings": "ক্রয়", + "user_purchase_settings_description": "আপনার ক্রয় পরিচালনা করুন", + "user_usage_detail": "ব্যবহারকারীর ব্যবহারের বিবরণ", "user_usage_stats": "অ্যাকাউন্ট ব্যবহারের পরিসংখ্যান", "user_usage_stats_description": "অ্যাকাউন্ট ব্যবহারের পরিসংখ্যান দেখুন", + "username": "ইউজারনেম", + "users": "ব্যবহারকারীগণ", + "users_added_to_album_count": "অ্যালবামে {count, plural, one {#জন ব্যবহারকারী} other {#জন ব্যবহারকারী}} যোগ করা হয়েছে", + "utilities": "ইউটিলিটি", + "validate": "যাচাই করুন", + "validate_endpoint_error": "অনুগ্রহ করে একটি বৈধ URL লিখুন", + "variables": "ভেরিয়েবল", + "version": "ভার্সন", + "version_announcement_closing": "আপনার বন্ধু, Alex", + "version_announcement_message": "হ্যালো! Immich-এর একটি নতুন ভার্সন উপলব্ধ। কোনো ভুল কনফিগারেশন এড়াতে আপনার সেটআপ হালনাগাদ আছে কিনা তা নিশ্চিত করতে অনুগ্রহ করে কিছুটা সময় নিয়ে রিলিজ নোট পড়ুন, বিশেষ করে আপনি যদি WatchTower বা এমন কোনো ব্যবস্থা ব্যবহার করেন যা স্বয়ংক্রিয়ভাবে আপনার Immich ইনস্ট্যান্স আপডেট করে।", + "version_history": "ভার্সন ইতিহাস", + "version_history_item": "{date}-এ {version} ইনস্টল করা হয়েছে", + "video": "ভিডিও", + "video_hover_setting": "হোভার করলে ভিডিও থাম্বনেইল চালান", + "video_hover_setting_description": "মাউস আইটেমের উপর হোভার করলে ভিডিও থাম্বনেইল চালান। নিষ্ক্রিয় থাকলেও, প্লে আইকনের উপর হোভার করে প্লেব্যাক শুরু করা যায়।", + "video_quality": "ভিডিওর মান", + "videos": "ভিডিও", + "videos_count": "{count, plural, one {#টি ভিডিও} other {#টি ভিডিও}}", + "view": "দেখুন", + "view_album": "অ্যালবাম দেখুন", + "view_all": "সব দেখুন", + "view_all_users": "সব ব্যবহারকারী দেখুন", + "view_asset_owners": "অ্যাসেটের মালিকদের দেখুন", + "view_details": "বিবরণ দেখুন", + "view_in_timeline": "টাইমলাইনে দেখুন", + "view_link": "লিংক দেখুন", + "view_name": "ভিউ", + "view_next_asset": "পরবর্তী অ্যাসেট দেখুন", + "view_previous_asset": "পূর্ববর্তী অ্যাসেট দেখুন", + "view_qr_code": "QR কোড দেখুন", + "view_similar_photos": "একই ধরনের ছবি দেখুন", + "view_stack": "স্ট্যাক দেখুন", + "viewer_remove_from_stack": "স্ট্যাক থেকে সরান", + "visibility": "দৃশ্যমানতা", + "visibility_changed": "{count, plural, one {#জন ব্যক্তির} other {#জন ব্যক্তির}} দৃশ্যমানতা পরিবর্তন করা হয়েছে", + "visual": "ভিজ্যুয়াল", + "waiting": "অপেক্ষা করা হচ্ছে", + "waiting_count": "অপেক্ষা করা হচ্ছে: {count}", + "warning": "সতর্কতা", + "week": "সপ্তাহ", + "welcome": "স্বাগতম", + "welcome_to_immich": "Immich-এ স্বাগতম", + "whats_new": "কী নতুন", + "whats_new_settings_subtitle": "Immich-এ কী নতুন তা দেখুন", + "whats_new_version": "ভার্সন {version}", + "when": "কখন", + "width": "প্রস্থ", + "wifi_name": "Wi-Fi নাম", + "workflow": "ওয়ার্কফ্লো", + "workflow_delete_prompt": "আপনি কি নিশ্চিত যে আপনি এই ওয়ার্কফ্লোটি মুছে ফেলতে চান?", + "workflow_deleted": "ওয়ার্কফ্লো মুছে ফেলা হয়েছে", + "workflow_description": "ওয়ার্কফ্লোর বিবরণ", + "workflow_info": "ওয়ার্কফ্লোর তথ্য", + "workflow_json": "ওয়ার্কফ্লো JSON", + "workflow_json_help": "JSON ফরম্যাটে ওয়ার্কফ্লো কনফিগারেশন সম্পাদনা করুন। পরিবর্তনগুলো ভিজ্যুয়াল বিল্ডারে সিঙ্ক হবে।", + "workflow_name": "ওয়ার্কফ্লোর নাম", + "workflow_navigation_prompt": "আপনি কি নিশ্চিত যে আপনি আপনার পরিবর্তন সংরক্ষণ না করেই চলে যেতে চান?", + "workflow_summary": "ওয়ার্কফ্লো সারসংক্ষেপ", + "workflow_templates": "ওয়ার্কফ্লো টেমপ্লেট", + "workflow_update_success": "ওয়ার্কফ্লো সফলভাবে আপডেট হয়েছে", + "workflows": "ওয়ার্কফ্লো", + "workflows_help_text": "ওয়ার্কফ্লো ট্রিগার ও ফিল্টারের উপর ভিত্তি করে আপনার অ্যাসেটে অ্যাকশন স্বয়ংক্রিয় করে", + "wrong_pin_code": "ভুল পিন কোড", + "x_of_total": "{x}/{total}", + "year": "বছর", + "years_ago": "{years, plural, one {#বছর} other {#বছর}} আগে", "yes": "হ্যাঁ", "you_dont_have_any_shared_links": "আপনার কোনো শেয়ার করা লিঙ্ক নেই (You don't have any shared links)", "your_wifi_name": "আপনার ওয়াই-ফাই এর নাম (Your Wi-Fi name)", diff --git a/i18n/ca.json b/i18n/ca.json index 229e9b8fc0..c88cfd8362 100644 --- a/i18n/ca.json +++ b/i18n/ca.json @@ -2,788 +2,808 @@ "about": "Quant a", "account": "Compte", "account_settings": "Configuració del compte", - "acknowledge": "Base de coneixement", + "acknowledge": "Entesos", "action": "Acció", - "action_common_update": "Actualitzar", - "action_description": "Un conjunt d'accions a realitzar sobre els recursos filtrats", + "action_common_update": "Actualitza", + "action_description": "Un conjunt d’accions a executar sobre els recursos filtrats", "actions": "Accions", - "active": "Actiu", - "active_count": "Activat: {count}", + "active": "Actives", + "active_count": "Actives: {count}", "activity": "Activitat", - "add": "Afegir", + "add": "Afegeix", "add_a_description": "Afegiu una descripció", - "add_a_location": "Afegiu una ubicació", - "add_a_name": "Afegir un nom", - "add_a_title": "Afegir un títol", - "add_action": "Afegir acció", - "add_assets": "Afegir recursos", + "add_a_location": "Afegeix una ubicació", + "add_a_name": "Afegeix un nom", + "add_a_title": "Afegiu un títol", + "add_action": "Afegeix una acció", + "add_assets": "Afegeix recursos", "add_birthday": "Afegeix la data de naixement", - "add_endpoint": "afegir endpoint", - "add_exclusion_pattern": "Afegir un patró d'exclusió", - "add_location": "Afegir la ubicació", - "add_partner": "Afegir company/a", - "add_photos": "Afegir fotografies", - "add_step": "Afegeix pas", - "add_tag": "Afegir una etiqueta", - "add_to": "Afegir a…", - "add_to_album": "Afegir a un l'àlbum", - "add_to_album_bottom_sheet_added": "Afegit a {album}", - "add_to_album_bottom_sheet_already_exists": "Ja està a {album}", - "add_to_album_bottom_sheet_some_local_assets": "Alguns recursos locals no s'han pogut afegir a l'àlbum", - "add_to_albums": "Afegir als àlbums", - "add_to_albums_count": "Afegir als àlbums ({count})", - "add_to_bottom_bar": "Afegir a", - "add_upload_to_stack": "Afegeix la càrrega a la pila", - "add_url": "Afegir URL", - "added_to_archive": "Afegir a l'arxiu", - "added_to_favorites": "Afegit als preferits", - "added_to_favorites_count": "{count, number} afegits als preferits", + "add_endpoint": "Afegeix un endpoint", + "add_exclusion_pattern": "Afegeix un patró d’exclusió", + "add_location": "Afegeix una ubicació", + "add_partner": "Afegeix un company", + "add_photos": "Afegeix fotos", + "add_step": "Afegeix un pas", + "add_tag": "Afegeix una etiqueta", + "add_to": "Afegeix a…", + "add_to_album": "Afegeix a un àlbum", + "add_to_album_bottom_sheet_added": "S’ha afegit a {album}", + "add_to_album_bottom_sheet_already_exists": "Ja és a {album}", + "add_to_album_bottom_sheet_some_local_assets": "No s’han pogut afegir alguns recursos locals a l’àlbum", + "add_to_albums": "Afegeix a àlbums", + "add_to_albums_count": "Afegeix a {count} àlbums", + "add_to_bottom_bar": "Afegeix a", + "add_upload_to_stack": "Afegeix una pujada a la pila", + "add_url": "Afegeix un URL", + "added_to_archive": "S’ha afegit a l’arxiu", + "added_to_favorites": "S’ha afegit als preferits", + "added_to_favorites_count": "Se n’han afegit {count, number} als preferits", "admin": { - "add_exclusion_pattern_description": "Afegeix patrons d'exclusió. Es permet englobar fent ús de *, **, i ?. Per a ignorar els fitxers de qualsevol directori anomenat \"Raw\" introduïu \"**/Raw/**\". Per a ignorar els fitxers acabats en \".tif\" introduïu \"**/*.tif\". Per a ignorar una ruta absoluta, utilitzeu \"/ruta/a/ignorar/**\".", + "add_exclusion_pattern_description": "Afegiu patrons d’exclusió. S’admet englobar fent ús de *, **, i ?. Per a ignorar tots els fitxers de qualsevol directori anomenat «Raw», utilitzeu «**/Raw/**». Per a ignorar tots els fitxers acabats en «.tif», utilitzeu «**/*.tif». Per a ignorar un camí absolut, utilitzeu «/camí/a/ignorar/**».", "admin_user": "Administrador", - "asset_offline_description": "Aquest recurs de la biblioteca externa ja no es troba al disc i s'ha mogut a la paperera. Si el fitxer s'ha mogut dins de la biblioteca, comproveu la vostra línia de temps per trobar el nou recurs corresponent. Per restaurar aquest recurs, assegureu-vos que Immich pugui accedir a la ruta del fitxer següent i escanegeu la biblioteca.", - "authentication_settings": "Configuració de l'autenticació", - "authentication_settings_description": "Gestiona la contrasenya, OAuth i altres configuracions de l'autenticació", - "authentication_settings_disable_all": "Estàs segur que vols desactivar tots els mètodes d'inici de sessió? L'inici de sessió quedarà completament desactivat.", - "authentication_settings_reenable": "Per a tornar a habilitar, empra una Comanda de Servidor.", + "asset_offline_description": "Aquest recurs d’una biblioteca externa ja no es troba al disc i s’ha mogut a la paperera. Si el fitxer s’ha mogut dins de la biblioteca, cerqueu el nou recurs corresponent a la vostra cronologia. Per a restaurar aquest recurs, assegureu-vos que l’Immich pugui accedir al camí de fitxers següent i escanegeu la biblioteca.", + "authentication_settings": "Configuració de l’autenticació", + "authentication_settings_description": "Gestioneu la contrasenya, l’OAuth i altres paràmetres de l’autenticació", + "authentication_settings_disable_all": "Segur que voleu desactivar tots els mètodes d’inici de sessió? Es desactivarà completament l’inici de sessió.", + "authentication_settings_reenable": "Per a tornar-lo a activar, utilitzeu una ordre del servidor.", "background_task_job": "Tasques en segon pla", - "backup_database": "Fer un bolcat de la base de dades", - "backup_database_enable_description": "Habilitar bolcat de la base de dades", - "backup_keep_last_amount": "Quantitat de bolcats anteriors per conservar", + "backup_database": "Crea un bolcat de la base de dades", + "backup_database_enable_description": "Activa els bolcats de la base de dades", + "backup_keep_last_amount": "Quantitat de bolcats anteriors a conservar", "backup_onboarding_1_description": "còpia externa al núvol o en una altra ubicació física.", - "backup_onboarding_2_description": "còpies locals en diferents dispositius. Això inclou els fitxers principals i una còpia de seguretat d'aquests fitxers localment.", - "backup_onboarding_3_description": "còpies totals de les vostres dades, inclosos els fitxers originals. Això inclou 1 còpia externa i 2 còpies locals.", - "backup_onboarding_description": "Es recomana una estratègia de còpia de seguretat 3-2-1 per protegir les vostres dades. Hauríeu de conservar còpies de les vostres fotos/vídeos penjats, així com de la base de dades Immich per obtenir una solució de còpia de seguretat completa.", - "backup_onboarding_footer": "Per obtenir més informació sobre com fer còpies de seguretat d'Immich, consulteu la documentation.", + "backup_onboarding_2_description": "còpies locals en dispositius diferents. Això inclou els fitxers principals i una còpia de seguretat local d’aquests fitxers.", + "backup_onboarding_3_description": "còpies totals de les vostres dades, incloent-hi els fitxers originals. Això inclou 1 còpia externa i 2 còpies locals.", + "backup_onboarding_description": "És recomanable una estratègia de còpia de seguretat 3-2-1 per a protegir les vostres dades. Per a tenir una solució de còpia de seguretat completa, hauríeu de conservar còpies de les vostres fotos i vídeos penjats, i també de la base de dades de l’Immich.", + "backup_onboarding_footer": "Per a més informació sobre com fer la còpia de seguretat de l’Immich, consulteu la documentació.", "backup_onboarding_parts_title": "Una còpia de seguretat 3-2-1 inclou:", "backup_onboarding_title": "Còpies de seguretat", - "backup_settings": "Configuració dels bolcats", - "backup_settings_description": "Gestionar la configuració de bolcats de la base de dades. Nota: els treballs no es monitoritzen ni es notifiquen els errors.", - "cleared_jobs": "Tasques esborrades per a: {job}", + "backup_settings": "Configuració dels bolcats de la base de dades", + "backup_settings_description": "Gestioneu els paràmetres dels bolcats de la base de dades.", + "cleared_jobs": "S’han netejat els treballs de: {job}", "config_set_by_file": "La configuració està definida per un fitxer de configuració", - "confirm_delete_library": "Esteu segurs que voleu eliminar la llibreria {library}?", - "confirm_delete_library_assets": "Esteu segurs que voleu esborrar aquesta llibreria? Això esborrarà {count, plural, one {# contained asset} other {all # contained assets}} d'Immich i no es podrà desfer. Els fitxers romandran al disc.", - "confirm_email_below": "Per a confirmar, escriviu \"{email}\" a sota", - "confirm_reprocess_all_faces": "Esteu segurs que voleu reprocessar totes les cares? Això també esborrarà la gent que heu anomenat.", - "confirm_user_password_reset": "Esteu segur que voleu reinicialitzar la contrasenya de l'usuari {user}?", - "confirm_user_pin_code_reset": "Esteu segur que voleu restablir el codi PIN de {user}?", + "confirm_delete_library": "Segur que voleu suprimir la biblioteca {library}?", + "confirm_delete_library_assets": "Segur que voleu suprimir aquesta biblioteca? Se {count, plural, one {suprimirà # recurs} other {suprimiran tots els # recursos}} que conté de l’Immich i l’acció no es podrà desfer. Els fitxers romandran al disc.", + "confirm_email_below": "Per a confirmar-ho, escriviu «{email}» a sota", + "confirm_reprocess_all_faces": "Segur que voleu tornar a processar totes les cares? També s’esborraran totes les persones anomenades.", + "confirm_user_password_reset": "Segur que voleu restablir la contrasenya de l’usuari {user}?", + "confirm_user_pin_code_reset": "Segur que voleu restablir el codi PIN de l’usuari {user}?", "copy_config_to_clipboard_description": "Copia la configuració actual del sistema com a objecte JSON al porta-retalls", - "create_job": "Crear tasca", - "cron_expression": "Expressió Cron", - "cron_expression_description": "Estableix l'interval d'escaneig amb el format cron. Per obtenir més informació, consulteu, p.e Crontab Guru", - "cron_expression_presets": "Ajustos predefinits d'expressions Cron", - "disable_login": "Deshabiliteu l'inici de sessió", - "download_csv": "Descarregar CSV", - "duplicate_detection_job_description": "Executa l'aprenentatge automàtic en els elements per a detectar imatges semblants. Fa servir la cerca intel·ligent", - "exclusion_pattern_description": "Els patrons d'exclusió permeten ignorar fitxers i carpetes quan escanegeu una llibreria. Això és útil si teniu carpetes que contenen fitxer que no voleu importar, com els fitxers RAW.", + "create_job": "Crea una tasca", + "cron_expression": "Expressió cron", + "cron_expression_description": "Definiu l’interval d’escaneig en format cron. Per a més informació, consulteu Crontab Guru, per exemple", + "cron_expression_presets": "Expressions cron predefinides", + "disable_login": "Desactiva l’inici de sessió", + "download_csv": "Baixa un CSV", + "duplicate_detection_job_description": "Executa aprenentatge automàtic sobre els recursos per a detectar imatges semblants. Es basa en la cerca intel·ligent", + "exclusion_pattern_description": "Els patrons d’exclusió us permeten ignorar fitxers i carpetes en escanejar la biblioteca. Això és útil si teniu carpetes que contenen fitxers que no voleu importar, com ara fitxers RAW.", "export_config_as_json_description": "Baixa la configuració actual del sistema com a fitxer JSON", - "external_libraries_page_description": "Pàgina de la biblioteca externa de l'administrador", + "external_libraries_page_description": "Pàgina de la biblioteca externa de l’administrador", "face_detection": "Detecció de cares", - "face_detection_description": "Detecta les cares fent servir aprenentatge automàtic. Per a videos només és té en compte la miniatura. \"Actualitzar\" reprocessa tots els elements. \"Resetejar\" esborra tota la informació de cares actuals. \"Pendent\" afegeix a la cua els elements que encara no han estat processats. Les cares detectades s'afegiran a la cua per al Reconeixement Facial després de completar la Detecció Facial, tot agrupant-les entre noves persones o les ja existents.", - "facial_recognition_job_description": "Agrupa les cares detectades per persona. Aquest pas s'executa després de completar la detecció de cares. \"Resetejar\" reagrupa totes les cares. \"Pendent\" afegeix a la cua les cares que no tenen cap persona assignada.", - "failed_job_command": "La comanda {command} ha fallat per la tasca: {job}", - "force_delete_user_warning": "COMPTE: Aquesta acció eliminara immediatament l'usuari i els seus elements. Aquesta acció és irreversible i els fitxers no es poden recuperar.", + "face_detection_description": "Detecta cares als recursos fent servir aprenentatge automàtic. Per a vídeos, només es té en compte la miniatura. «Actualitza» torna a processar tots els recursos. «Restableix», a més a més, esborra tota la informació actual de cares. «Pendents» afegeix a la cua els recursos que encara no s’han processat. Les cares detectades s’afegiran a la cua del reconeixement facial després de completar la detecció de cares, tot agrupant-les en persones existents o noves.", + "facial_recognition_job_description": "Agrupa les cares detectades en persones. Aquest pas s’executa després de completar la detecció de cares. «Restableix» reagrupa totes les cares. «Pendents» afegeix a la cua les cares que no tenen cap persona assignada.", + "failed_job_command": "L’ordre {command} ha fallat a la tasca: {job}", + "force_delete_user_warning": "ADVERTÈNCIA: Aquesta acció suprimirà immediatament l’usuari i tots els recursos. Aquesta acció no es pot desfer i els fitxers no es podran recuperar.", "image_format": "Format", - "image_format_description": "WebP genera fitxers més petits que JPEG, però codifica més lentament.", - "image_fullsize_description": "Imatges a tamany complet sense metadades, utilitzades quan es fa zoom", - "image_fullsize_enabled": "Activa la generació d'imatges a tamany complet", - "image_fullsize_enabled_description": "Genera imatges a tamany complet per formats no compatibles amb la web. Quan \"Prefereix vista prèvia incrustada\" està activat, les vistes prèvies incrustades s'utilitzen directament sense conversió. No afecta els formats compatibles amb la web com JPEG.", - "image_fullsize_quality_description": "De 1 a 100, qualitat de l'imatge a tamany complet. Un valor més alt és millor, però resulta en fitxers de major tamany.", - "image_fullsize_title": "Configuració de les imatges a tamany complet", - "image_prefer_embedded_preview": "Prefereix vista prèvia incrustada", - "image_prefer_embedded_preview_setting_description": "Empra vista prèvia incrustada en les fotografies RAW com a entrada per al processament d'imatge, quan sigui possible. Aquesta acció pot produir colors més acurats en algunes imatges, però la qualitat de la vista prèvia depèn de la càmera i la imatge pot tenir més artefactes de compressió.", + "image_format_description": "WebP genera fitxers més petits que JPEG, però es codifica més lentament.", + "image_fullsize_description": "Imatge de mida completa amb les metadades eliminades. S’utilitza en ampliar", + "image_fullsize_enabled": "Activa la generació d’imatges de mida completa", + "image_fullsize_enabled_description": "Genera imatges de mida completa per a formats no aptes per al web. Quan s’activa «Prefereix la previsualització incrustada», s’utilitzen directament previsualitzacions incrustades sense conversió. No afecta els formats aptes per al web com JPEG.", + "image_fullsize_quality_description": "Qualitat de la imatge de mida completa de l’1 al 100. Un valor més alt és millor, però produeix fitxers més grans.", + "image_fullsize_title": "Configuració de les imatges de mida completa", + "image_prefer_embedded_preview": "Prefereix la previsualització incrustada", + "image_prefer_embedded_preview_setting_description": "Utilitzar la previsualització incrustada en les fotos RAW com a entrada per al processament d’imatges quan sigui possible. Aquesta acció pot produir colors més precisos en algunes imatges, però la qualitat de la previsualització depèn de la càmera i la imatge pot tenir més artefactes de compressió.", "image_prefer_wide_gamut": "Prefereix la gamma àmplia", - "image_prefer_wide_gamut_setting_description": "Uitlitza Display P3 per a les miniatures. Això preserva més bé la vitalitat de les imatges amb espais de color àmplis, però les imatges es poden veure diferent en aparells antics amb una versió antiga del navegador. Les imatges sRGB romandran com a sRGB per a evitar canvis de color.", - "image_preview_description": "Imatge de mida mitjana amb metadades eliminades, que s'utilitza quan es visualitza un sol recurs i per a l'aprenentatge automàtic", - "image_preview_quality_description": "Vista prèvia de la qualitat de l'1 al 100. Més alt és millor, però produeix fitxers més grans i pot reduir la capacitat de resposta de l'aplicació. Establir un valor baix pot afectar la qualitat de l'aprenentatge automàtic.", - "image_preview_title": "Paràmetres de previsualització", + "image_prefer_wide_gamut_setting_description": "Utilitza Display P3 per a les miniatures. Això conserva millor la vitalitat de les imatges amb espais de color amplis, però les imatges es poden veure diferents en dispositius antics amb una versió antiga del navegador. Les imatges sRGB romandran com a sRGB per a evitar canvis de colors.", + "image_preview_description": "Imatge de mida mitjana amb les metadades eliminades. S’utilitza quan es visualitza un sol recurs i per a l’aprenentatge automàtic", + "image_preview_quality_description": "Qualitat de la previsualització de l’1 al 100. Un valor més alt és millor, però produeix fitxers més grans i pot reduir la capacitat de resposta de l’aplicació. Establir-hi un valor baix pot afectar la qualitat de l’aprenentatge automàtic.", + "image_preview_title": "Configuració de les previsualitzacions", "image_progressive": "Progressiu", - "image_progressive_description": "Codifica les imatges JPEG progressivament per a una visualització amb càrrega gradual. Això no té cap efecte sobre les imatges WebP.", + "image_progressive_description": "Codifica les imatges JPEG en mode progressiu perquè es visualitzin amb una càrrega gradual. No té cap efecte sobre les imatges WebP.", "image_quality": "Qualitat", "image_resolution": "Resolució", - "image_resolution_description": "Les resolucions més altes poden conservar més detalls però triguen més a codificar-se, tenen mides de fitxer més grans i poden reduir la capacitat de resposta de l'aplicació.", + "image_resolution_description": "Les resolucions més altes poden conservar més detalls, però tarden més temps a codificar-se, tenen mides de fitxer més grans i poden reduir la capacitat de resposta de l’aplicació.", "image_settings": "Configuració de les imatges", - "image_settings_description": "Gestiona la qualitat i resolució de les imatges generades", - "image_thumbnail_description": "Miniatura petita amb metadades eliminades, que s'utilitza quan es visualitzen grups de fotos com la línia de temps principal", - "image_thumbnail_quality_description": "Qualitat de miniatura d'1 a 100. Més alt és millor, però produeix fitxers més grans i pot reduir la capacitat de resposta de l'aplicació.", + "image_settings_description": "Gestioneu la qualitat i la resolució de les imatges generades", + "image_thumbnail_description": "Miniatura petita amb les metadades eliminades. S’utilitza quan es visualitzen grups de fotos, com ara la cronologia principal", + "image_thumbnail_quality_description": "Qualitat de la miniatura de l’1 al 100. Un valor més alt és millor, però produeix fitxers més grans i pot reduir la capacitat de resposta de l’aplicació.", "image_thumbnail_title": "Configuració de les miniatures", "import_config_from_json_description": "Importa la configuració del sistema pujant un fitxer de configuració JSON", - "job_concurrency": "{job} simultàniament", - "job_created": "Tasca creada", - "job_not_concurrency_safe": "Aquesta tasca no és segura per a la conconcurrència.", + "integrity_checks_checksum_files": "Verifica la integritat dels fitxers", + "integrity_checks_checksum_files_description": "Configureu la verificació de la integritat", + "integrity_checks_checksum_files_enable_description": "Activa la verificació de la integritat", + "integrity_checks_checksum_files_percentage_limit": "Percentatge límit", + "integrity_checks_checksum_files_percentage_limit_description": "Configura el percentatge màxim, entre 0,01 i 1, de la durada de la comprovació de la suma de verificació en cada interval.", + "integrity_checks_checksum_files_time_limit": "Límit de temps", + "integrity_checks_checksum_files_time_limit_description": "Configura la durada màxima de la comprovació de la suma de verificació en cada interval. (ms)", + "integrity_checks_missing_files": "Fitxers absents", + "integrity_checks_missing_files_description": "Configureu la freqüència i activeu o desactiveu la verificació dels fitxers absents", + "integrity_checks_missing_files_enable_description": "Activa la verificació dels fitxers absents", + "integrity_checks_settings": "Verificacions d’integritat", + "integrity_checks_settings_description": "Gestioneu els intervals de les verificacions d’integritat", + "integrity_checks_untracked_files": "Fitxers sense seguiment", + "integrity_checks_untracked_files_description": "Configureu la freqüència i activeu o desactiveu la verificació dels fitxers sense seguiment", + "integrity_checks_untracked_files_enable_description": "Activa la verificació dels fitxers sense seguiment", + "job_concurrency": "Concurrència de la tasca {job}", + "job_created": "S’ha creat la tasca", + "job_not_concurrency_safe": "Aquesta tasca no admet concurrència de manera segura.", "job_settings": "Configuració de les tasques", - "job_settings_description": "Gestiona la concurrència de tasques", - "jobs_delayed": "{jobCount, plural, other {# posposades}}", - "jobs_failed": "{jobCount, plural, other {# fallides}}", - "jobs_over_time": "Feines al llarg del temps", - "library_created": "Bilbioteca creada: {library}", - "library_deleted": "Bilbioteca eliminada", - "library_details": "Detalls de la llibreria", - "library_folder_description": "Especifiqueu una carpeta per importar. Aquesta carpeta, incloses les subcarpetes, s'escanejarà a la recerca d'imatges i vídeos.", - "library_remove_exclusion_pattern_prompt": "Esteu segur que voleu eliminar aquest patró d'exclusió?", - "library_remove_folder_prompt": "Esteu segur que voleu eliminar aquesta carpeta d'importació?", + "job_settings_description": "Gestioneu la concurrència de les tasques", + "jobs_delayed": "{jobCount, plural, one {# d’endarrerida} other {# d’endarrerides}}", + "jobs_failed": "{jobCount, plural, one {# de fallida} other {# de fallides}}", + "jobs_over_time": "Tasques al llarg del temps", + "library_created": "S’ha creat la biblioteca: {library}", + "library_deleted": "S’ha suprimit la biblioteca", + "library_details": "Detalls de la biblioteca", + "library_folder_description": "Especifiqueu una carpeta a importar. Aquesta carpeta, incloses les subcarpetes, s’escanejarà cercant-hi imatges i vídeos.", + "library_remove_exclusion_pattern_prompt": "Segur que voleu suprimir aquest patró d’exclusió?", + "library_remove_folder_prompt": "Segur que voleu suprimir aquesta carpeta d’importació?", "library_scanning": "Escaneig periòdic", - "library_scanning_description": "Configurar l'escaneig periòdic de bilbioteques", - "library_scanning_enable_description": "Habilita l'escaneig periòdic de biblioteques", - "library_settings": "Llibreria externes", - "library_settings_description": "Gestiona la configuració de les llibreries externes", - "library_tasks_description": "Escaneja les biblioteques externes per trobar arxius nous o canviats", - "library_updated": "Llibreria actualitzada", - "library_watching_enable_description": "Consultar llibreries externes per detectar canvis en fitxers", - "library_watching_settings": "Monitoratge de la llibreria (EXPERIMENTAL)", - "library_watching_settings_description": "Monitorització automàtica de fitxers modificats", - "logging_enable_description": "Habilitar el registrament", - "logging_level_description": "Quan està habilitat, quin nivell de registre es vol emprar.", + "library_scanning_description": "Configureu l’escaneig periòdic de la biblioteca", + "library_scanning_enable_description": "Activa l’escaneig periòdic de la biblioteca", + "library_settings": "Biblioteques externes", + "library_settings_description": "Gestioneu la configuració de les biblioteques externes", + "library_tasks_description": "Escaneja les biblioteques externes cercant-hi recursos nous i/o modificats", + "library_updated": "S’ha actualitzat la biblioteca", + "library_watching_enable_description": "Monitora si hi ha canvis de fitxers a les biblioteques externes", + "library_watching_settings": "Monitoratge de biblioteques (EXPERIMENTAL)", + "library_watching_settings_description": "Monitora automàticament els fitxers modificats", + "logging_enable_description": "Activa el registre", + "logging_level_description": "Quin nivell de registre voleu utilitzar quan estigui activat.", "logging_settings": "Registre", "machine_learning_availability_checks": "Comprovacions de disponibilitat", - "machine_learning_availability_checks_description": "Detectar i preferir automàticament els servidors d'aprenentatge automàtic disponibles", - "machine_learning_availability_checks_enabled": "Habilita les comprovacions de disponibilitat", + "machine_learning_availability_checks_description": "Detecta i prefereix automàticament els servidors d’aprenentatge automàtic disponibles", + "machine_learning_availability_checks_enabled": "Activa les comprovacions de disponibilitat", "machine_learning_availability_checks_interval": "Interval de comprovació", "machine_learning_availability_checks_interval_description": "Interval en mil·lisegons entre comprovacions de disponibilitat", - "machine_learning_availability_checks_timeout": "Temps d'espera de la sol·licitud", - "machine_learning_availability_checks_timeout_description": "Temps d'espera en mil·lisegons per a les comprovacions de disponibilitat", + "machine_learning_availability_checks_timeout": "Temps d’espera de la sol·licitud", + "machine_learning_availability_checks_timeout_description": "Temps d’espera en mil·lisegons per a les comprovacions de disponibilitat", "machine_learning_clip_model": "Model CLIP", - "machine_learning_clip_model_description": "El nom d'un model CLIP que apareix a aquí. Tingues en compte que has de tornar a executar la cerca intel·ligent per a totes les imatges quan es canvia de model.", + "machine_learning_clip_model_description": "El nom d’un model CLIP que aparegui aquí. Tingueu en compte que si canvieu de model, cal que torneu a executar la tasca «Cerca intel·ligent» per a totes les imatges.", "machine_learning_duplicate_detection": "Detecció de duplicats", "machine_learning_duplicate_detection_enabled": "Activa la detecció de duplicats", "machine_learning_duplicate_detection_enabled_description": "Si està desactivada, els elements idèntics encara es desduplicaran.", - "machine_learning_duplicate_detection_setting_description": "Usa incrustacions CLIP per a trobar prossibles duplicats", - "machine_learning_enabled": "Activa l'aprenentatge automàtic", - "machine_learning_enabled_description": "Si està desactivat, totes les funcions ML es deshabilitaran sense tenir en compte la configuració següent.", + "machine_learning_duplicate_detection_setting_description": "Utilitza incrustacions CLIP per a trobar possibles duplicats", + "machine_learning_enabled": "Activa l’aprenentatge automàtic", + "machine_learning_enabled_description": "Si està desactivat, totes les funcions de ML es desactivaran, independentment de la configuració següent.", "machine_learning_facial_recognition": "Reconeixement facial", "machine_learning_facial_recognition_description": "Detecta, reconeix i agrupa cares a les imatges", "machine_learning_facial_recognition_model": "Model de reconeixement facial", - "machine_learning_facial_recognition_model_description": "Els models es llisten en ordre descent segons la mida. Els models més grans són més lents i usen més memòria però produeixen millors resultats. Tingueu en compte que després de canviar un model haureu de tornar a executar la tasca de detecció de cares per a totes les imatges.", + "machine_learning_facial_recognition_model_description": "Els models apareixen a la llista en ordre descent segons la mida. Els models més grans són més lents i utilitzen més memòria, però produeixen millors resultats. Tingueu en compte que després de canviar un model haureu de tornar a executar la tasca de detecció de cares per a totes les imatges.", "machine_learning_facial_recognition_setting": "Activa el reconeixement facial", - "machine_learning_facial_recognition_setting_description": "Si està desactivat, les imatges no es codificaran pel reconeixement facial i no s'afegiran a la secció Persones de la pàgina Explorar.", + "machine_learning_facial_recognition_setting_description": "Si està desactivat, les imatges no es codificaran per al reconeixement facial i no s’omplirà la secció Persones de la pàgina Explora.", "machine_learning_max_detection_distance": "Distància màxima de detecció", - "machine_learning_max_detection_distance_description": "Diferència màxima entre dues imatges per a considerar-les duplicades, en un rang d'entre 0.001-0.1. Com més elevat el valor més detecció de duplicats, però pot resultar en falsos positius.", - "machine_learning_max_recognition_distance": "Màxima diferència de reconeixement", - "machine_learning_max_recognition_distance_description": "La distància màxima entre dues cares per considerar-les la mateixa persona, que oscil·la entre 0-2. Reduir aquest valor pot evitar etiquetar dues persones com la mateixa, mentre que augmentar-lo pot evitar etiquetar la mateixa persona com dues diferents. Tingues en compte que és més fàcil fusionar dues persones que dividir-ne una en dues, així que, si és possible, és millor optar per un llindar més baix.", + "machine_learning_max_detection_distance_description": "Distància màxima entre dues imatges per a considerar-les duplicades, en un rang entre 0,001 i 0,1. Els valors més alts detectaran més duplicats, però podeu provocar falsos positius.", + "machine_learning_max_recognition_distance": "Distància màxima de reconeixement", + "machine_learning_max_recognition_distance_description": "Distància màxima entre dues cares per a considerar-les la mateixa persona, entre 0 i 2. Reduir aquest valor pot evitar que s’etiquetin dues persones com a la mateixa, mentre que augmentar-lo pot evitar que s’etiqueti la mateixa persona com a dues de diferents. Tingueu en compte que és més fàcil fusionar dues persones que dividir-ne una en dues, de manera que, si és possible, és millor optar per un llindar més baix.", "machine_learning_min_detection_score": "Puntuació mínima de detecció", - "machine_learning_min_detection_score_description": "La puntuació mínima de confiança per detectar una cara és de 0 a 1. Valors més baixos detectaran més cares, però poden donar lloc a falsos positius.", - "machine_learning_min_recognized_faces": "Nombre mínim de cares reconegudes", - "machine_learning_min_recognized_faces_description": "El nombre mínim de cares reconegudes per crear una persona. Augmentar aquest valor fa que el reconeixement facial sigui més precís, però augmenta la possibilitat que una cara no sigui assignada a una persona.", + "machine_learning_min_detection_score_description": "Puntuació de confiança mínima perquè es detecti una cara entre 0 i 1. Els valors més baixos detectaran més cares, però poden provocar falsos positius.", + "machine_learning_min_recognized_faces": "Mínim de cares reconegudes", + "machine_learning_min_recognized_faces_description": "Nombre mínim de cares reconegudes perquè es creï una persona. Augmentar aquest valor fa que el reconeixement facial sigui més precís, però augmenta la probabilitat que una cara no sigui assignada a una persona.", "machine_learning_ocr": "OCR", - "machine_learning_ocr_description": "Fes servir machine learning per reconèixer text a imatges", - "machine_learning_ocr_enabled": "Activar OCR", - "machine_learning_ocr_enabled_description": "Si està desactivat, les imatges no seran objecte de reconeixement de text.", - "machine_learning_ocr_max_resolution": "Màxima resolució", - "machine_learning_ocr_max_resolution_description": "Vista prèvia per sobre d'aquesta resolució serà reescalada per preservar la relació d'aspecte. Resolucions altes són més precises, però triguen més i gasten més memòria.", + "machine_learning_ocr_description": "Utilitza aprenentatge automàtic per a reconèixer text a les imatges", + "machine_learning_ocr_enabled": "Activa l’OCR", + "machine_learning_ocr_enabled_description": "Si està desactivat, les imatges no se sotmetran al reconeixement de text.", + "machine_learning_ocr_max_resolution": "Resolució màxima", + "machine_learning_ocr_max_resolution_description": "Les previsualitzacions que estiguin per sobre d’aquesta resolució es redimensionaran mantenint-ne la relació d’aspecte. Els valors més alts són més precisos, però tarden més temps a processar-se i utilitzem més memòria.", "machine_learning_ocr_min_detection_score": "Puntuació mínima de detecció", - "machine_learning_ocr_min_detection_score_description": "Puntuació de mínima confiança per la detecció del text entre 0-1. Valors baixos detectaran més text pero pot donar falsos positius.", - "machine_learning_ocr_min_recognition_score": "Puntuació mínima de reconeixement", - "machine_learning_ocr_min_score_recognition_description": "Puntuació de confiança mínima pel reconeixement del text entre 0-1. Valors baixos reconeixen més text però pot donar falsos positius.", - "machine_learning_ocr_model": "Model OCR", - "machine_learning_ocr_model_description": "Models de servidor són més precisos que els de móbil, pero triguen més a processar i usen més memòria.", - "machine_learning_settings": "Configuració d'aprenentatge automàtic", - "machine_learning_settings_description": "Gestiona funcions i configuració d'aprenentatge automàtic", + "machine_learning_ocr_min_detection_score_description": "Puntuació de confiança mínima perquè es detectiu text entre 0 i 1. Els valors baixos detectaran més text, però poden provocar falsos positius.", + "machine_learning_ocr_min_recognition_score": "Puntuació de reconeixement mínima", + "machine_learning_ocr_min_score_recognition_description": "Puntuació de confiança mínima perquè el text detectat sigui reconegut entre 0 i 1. Els valors baixos reconeixeran més text, però poden provocar falsos positius.", + "machine_learning_ocr_model": "Model d’OCR", + "machine_learning_ocr_model_description": "Els models de servidor són més precisos que els de mòbils, pero triguen més temps a processar i utilitzen més memòria.", + "machine_learning_settings": "Configuració de l’aprenentatge automàtic", + "machine_learning_settings_description": "Gestioneu les funcions i la configuració de l’aprenentatge automàtic", "machine_learning_smart_search": "Cerca intel·ligent", - "machine_learning_smart_search_description": "Cerca imatges semànticament emprant incrustacions CLIP", + "machine_learning_smart_search_description": "Cerqueu imatges semànticament utilitzant incrustacions CLIP", "machine_learning_smart_search_enabled": "Activa la cerca intel·ligent", - "machine_learning_smart_search_enabled_description": "Si està desactivada, les imatges no es codificaran per la cerca intel·ligent.", - "machine_learning_url_description": "L'URL del servidor d'aprenentatge automàtic. Si es proporciona més d'un URL, s'intentarà accedir a cada servidor en ordre fins que un d'ells respongui correctament.", + "machine_learning_smart_search_enabled_description": "Si està desactivada, les imatges no es codificaran per a la cerca intel·ligent.", + "machine_learning_url_description": "L’URL del servidor d’aprenentatge automàtic. Si proporcioneu més d’un URL, es provarà d’accedir a cada servidor en ordre fins que un respongui correctament. Els servidors que no responguin s’ignoraran temporalment fins que tornin a estar en línia.", "maintenance_backup_management": "Gestió de còpies de seguretat", - "maintenance_delete_backup": "Elimina la còpia de seguretat", - "maintenance_delete_backup_description": "Aquest fitxer s'eliminarà de forma permanent.", - "maintenance_delete_error": "No s'ha pogut suprimir la còpia de seguretat.", - "maintenance_integrity_check": "Verificació", - "maintenance_integrity_check_all": "Verificar tot", - "maintenance_integrity_checksum_mismatch": "Checksum incorrecte", - "maintenance_integrity_checksum_mismatch_description": "Fitxers els quals la suma de verificació al disc no coincideix amb la que Immich té emmagatzemada a la base de dades.", - "maintenance_integrity_checksum_mismatch_job": "Comprovar checksums", - "maintenance_integrity_checksum_mismatch_refresh_job": "Actualitzar errors de checksums", - "maintenance_integrity_missing_file": "Manquen fitxers", - "maintenance_integrity_missing_file_description": "Fitxers que l'Immich té registrats a la seva base de dades però que no existeixen al sistema de fitxers.", - "maintenance_integrity_missing_file_job": "Verificar fitxers que falten", - "maintenance_integrity_missing_file_refresh_job": "Refrescar informe de fitxers desapareguts", - "maintenance_integrity_report": "Informe Integritat", - "maintenance_integrity_untracked_file": "Arxius no rastrejats", - "maintenance_integrity_untracked_file_description": "Fitxers presents als directoris d'Immich que Immich no en té cap registre.", - "maintenance_integrity_untracked_file_job": "Consulta de fitxers no rastrejats", - "maintenance_integrity_untracked_file_refresh_job": "Actualitza els informes de fitxers no rastrejats", - "maintenance_restore_backup": "Restaura la còpia de seguretat", - "maintenance_restore_backup_description": "Immich s'esborrarà i es restaurarà des de la còpia de seguretat escollida. Es crearà una còpia de seguretat abans de continuar.", - "maintenance_restore_backup_different_version": "Aquesta còpia de seguretat s'ha creat amb una versió diferent d'Immich!", - "maintenance_restore_backup_unknown_version": "No s'ha pogut determinar la versió de la còpia de seguretat.", - "maintenance_restore_database_backup": "Restaurar la còpia de seguretat de la base de dades", - "maintenance_restore_database_backup_description": "Reverteix a un estat anterior de la base de dades mitjançant un fitxer de còpia de seguretat", - "maintenance_settings": "En manteniment", - "maintenance_settings_description": "Posar Immich en mode de manteniment.", - "maintenance_start": "Canviar al mode de manteniment", - "maintenance_start_error": "Error en iniciar el mode de manteniment.", - "maintenance_upload_backup": "Puja el fitxer de còpia de seguretat de la base de dades", - "maintenance_upload_backup_error": "No s'ha pogut carregar la còpia de seguretat, és un fitxer .sql/.sql.gz?", + "maintenance_delete_backup": "Suprimeix la còpia de seguretat", + "maintenance_delete_backup_description": "Aquest fitxer se suprimirà de manera permanent.", + "maintenance_delete_error": "No s’ha pogut suprimir la còpia de seguretat.", + "maintenance_integrity_check": "Verifica", + "maintenance_integrity_check_all": "Verifica-ho tot", + "maintenance_integrity_checksum_mismatch": "Verificació incorrecta", + "maintenance_integrity_checksum_mismatch_description": "Fitxers la suma de verificació dels quals no coincideix amb la que l’Immich té emmagatzemada a la base de dades.", + "maintenance_integrity_checksum_mismatch_job": "Comprova les incoherències de verificació", + "maintenance_integrity_checksum_mismatch_refresh_job": "Actualitza els informes de verificació incorrecta", + "maintenance_integrity_missing_file": "Fitxers absents", + "maintenance_integrity_missing_file_description": "Fitxers que l’Immich té registrats a la base de dades, però que no existeixen al sistema de fitxers.", + "maintenance_integrity_missing_file_job": "Verifica els fitxers absents", + "maintenance_integrity_missing_file_refresh_job": "Actualitza els informes de fitxers absents", + "maintenance_integrity_report": "Informe d’integritat", + "maintenance_integrity_untracked_file": "Fitxers sense seguiment", + "maintenance_integrity_untracked_file_description": "Fitxers als directoris de l’Immich dels quals l’Immich no té cap registre.", + "maintenance_integrity_untracked_file_job": "Revisa els fitxers sense seguiment", + "maintenance_integrity_untracked_file_refresh_job": "Actualitza els informes dels fitxers sense seguiment", + "maintenance_restore_backup": "Restaura una còpia de seguretat", + "maintenance_restore_backup_description": "S’esborrarà el contingut de l’Immich i es restaurarà a partir de la còpia de seguretat elegida. Abans de continuar, es crearà una còpia de seguretat.", + "maintenance_restore_backup_different_version": "Aquesta còpia de seguretat es va crear amb una versió diferent de l’Immich!", + "maintenance_restore_backup_unknown_version": "No s’ha pogut determinar la versió de la còpia de seguretat.", + "maintenance_restore_database_backup": "Restaura una còpia de seguretat de la base de dades", + "maintenance_restore_database_backup_description": "Revertiu a un estat anterior de la base de dades mitjançant un fitxer de còpia de seguretat", + "maintenance_settings": "Manteniment", + "maintenance_settings_description": "Poseu l’Immich en mode de manteniment.", + "maintenance_start": "Canvia al mode de manteniment", + "maintenance_start_error": "S’ha produït un error en iniciar el mode de manteniment.", + "maintenance_upload_backup": "Pugeu un fitxer de còpia de seguretat de la base de dades", + "maintenance_upload_backup_error": "No s’ha pogut pujar la còpia de seguretat. És un fitxer .sql/.sql.gz?", "manage_concurrency": "Gestiona la concurrència", - "manage_concurrency_description": "Ves a la pàgina de tasques per gestionar la concurrència de tasques", - "manage_log_settings": "Gestiona la configuració del registre", - "map_dark_style": "Tema fosc", - "map_enable_description": "Habilita característiques del mapa", - "map_gps_settings": "Configuració del mapa i GPS", - "map_gps_settings_description": "Gestiona la configuració del mapa i GPS (Geocodificació inversa)", - "map_implications": "La funció mapa depèn del servei extern de tesel·les (tiles.immich.cloud)", - "map_light_style": "Tema clar", - "map_manage_reverse_geocoding_settings": "Gestiona els paràmetres de geocodificació inversa", + "manage_concurrency_description": "Aneu a la pàgina de tasques per a gestionar la concurrència de tasques", + "manage_log_settings": "Gestioneu la configuració del registre", + "map_dark_style": "Estil fosc", + "map_enable_description": "Activa les funcionalitats del mapa", + "map_gps_settings": "Configuració del mapa i del GPS", + "map_gps_settings_description": "Gestioneu els paràmetres del mapa i del GPS (geocodificació inversa)", + "map_implications": "La funció del mapa depèn del servei extern de tesel·les (tiles.immich.cloud)", + "map_light_style": "Estil clar", + "map_manage_reverse_geocoding_settings": "Gestioneu els paràmetres de la geocodificació inversa", "map_reverse_geocoding": "Geocodificació inversa", - "map_reverse_geocoding_enable_description": "Habilita la geocodificació inversa", - "map_reverse_geocoding_settings": "Configuració de Geocodificació Inversa", + "map_reverse_geocoding_enable_description": "Activa la geocodificació inversa", + "map_reverse_geocoding_settings": "Configuració de la geocodificació inversa", "map_settings": "Mapa", - "map_settings_description": "Gestiona la configuració del mapa", - "map_style_description": "URL a un tema del mapa style.json", - "memory_cleanup_job": "Neteja de memòries", - "memory_generate_job": "Generació de memòries", - "metadata_extraction_job": "Extreure metadades", - "metadata_extraction_job_description": "Extreu la informació de metadades de cada element, com per exemple el GPS i la resolució", - "metadata_faces_import_setting": "Activar la importació de cares", - "metadata_faces_import_setting_description": "Importar cares des de les metadades EXIF de les imatges i arxius auxiliars", + "map_settings_description": "Gestioneu la configuració del mapa", + "map_style_description": "URL a un style.json de tema del mapa", + "memory_cleanup_job": "Neteja de records", + "memory_generate_job": "Generació de records", + "metadata_extraction_job": "Extreu les metadades", + "metadata_extraction_job_description": "Extreu la informació de les metadades de cada recurs, com ara el GPS, les cares i la resolució", + "metadata_faces_import_setting": "Activa la importació de cares", + "metadata_faces_import_setting_description": "Importa les cares de les metadades EXIF i dels fitxers auxiliars de les imatges", "metadata_settings": "Configuració de les metadades", - "metadata_settings_description": "Administrar la configuració de les metadades", + "metadata_settings_description": "Gestioneu els paràmetres de les metadades", "migration_job": "Migració", - "migration_job_description": "Migra les miniatures d'elements i cares cap a la nova estructura de carpetes", - "nightly_tasks_cluster_faces_setting_description": "Executar el reconeixement facial en cares recentment detectades", - "nightly_tasks_cluster_new_faces_setting": "Agrupa cares noves", + "migration_job_description": "Migra les miniatures dels recursos i les cares a la estructura de carpetes més recent", + "nightly_tasks_cluster_faces_setting_description": "Executa el reconeixement facial a les cares detectades recentment", + "nightly_tasks_cluster_new_faces_setting": "Agrupa les cares noves", "nightly_tasks_database_cleanup_setting": "Tasques de neteja de la base de dades", "nightly_tasks_database_cleanup_setting_description": "Netegeu les dades antigues i caducades de la base de dades", "nightly_tasks_generate_memories_setting": "Generar memòries", "nightly_tasks_generate_memories_setting_description": "Crear nous records a partir de les fotos penjades", "nightly_tasks_missing_thumbnails_setting": "Generar les miniatures restants", - "nightly_tasks_missing_thumbnails_setting_description": "Posar en cua les fotos penjades sense miniatures per a la generació de la seva miniatura", + "nightly_tasks_missing_thumbnails_setting_description": "Posa en cua els recursos sense miniatures perquè se’n generin les miniatures", "nightly_tasks_settings": "Configuració de les tasques nocturnes", - "nightly_tasks_settings_description": "Gestionar les tasques nocturnes", - "nightly_tasks_start_time_setting": "Hora d'inici", + "nightly_tasks_settings_description": "Gestioneu les tasques nocturnes", + "nightly_tasks_start_time_setting": "Hora d’inici", "nightly_tasks_start_time_setting_description": "Hora en què el servidor comença a executar les tasques nocturnes", - "nightly_tasks_sync_quota_usage_setting": "Sincronitzar l'ús de la quota", - "nightly_tasks_sync_quota_usage_setting_description": "Actualitzar la quota d'emmagatzematge de l'usuari segons l'ús actual", - "no_paths_added": "No s'ha afegit cap ruta", - "no_pattern_added": "Cap patró aplicat", - "note_apply_storage_label_previous_assets": "Nota: Per aplicar l'etiquetatge d'emmagatzematge a elements pujats prèviament, executeu la", - "note_cannot_be_changed_later": "NOTA: Això és irreversible!", - "notification_email_from_address": "Des de l'adreça", - "notification_email_from_address_description": "Adreça de correu electrònic del remitent, per exemple: \"Immich Photo Server \". Assegureu-vos d'utilitzar una adreça des de la qual tingueu permís per enviar correus electrònics.", - "notification_email_host_description": "Amfitrió del servidor de correu electrònic (p.ex. smtp.immich.app)", + "nightly_tasks_sync_quota_usage_setting": "Sincronitza la quota d’ús", + "nightly_tasks_sync_quota_usage_setting_description": "Actualitza la quota d’emmagatzematge de l’usuari segons l’ús actual", + "no_paths_added": "No s’ha afegit cap camí", + "no_pattern_added": "No s’ha afegit cap patró", + "note_apply_storage_label_previous_assets": "Nota: Per a aplicar l’etiqueta d’emmagatzematge als recursos pujats prèviament, executeu la", + "note_cannot_be_changed_later": "NOTA: Després no es podrà canviar!", + "notification_email_from_address": "De l’adreça", + "notification_email_from_address_description": "Adreça electrònica del remitent, per exemple, «Immich Photo Server ». Assegureu-vos d’utilitzar una adreça amb la qual tingueu permís per a enviar correus electrònics.", + "notification_email_host_description": "Amfitrió del servidor de correu electrònic (p. ex. smtp.immich.app)", "notification_email_ignore_certificate_errors": "Ignora els errors de certificat", "notification_email_ignore_certificate_errors_description": "Ignora els errors de validació de certificat TLS (no recomanat)", "notification_email_password_description": "Contrasenya per a autenticar-se amb el servidor de correu electrònic", - "notification_email_port_description": "Port del servidor de correu electrònic (p.ex. 25, 465 o 587)", + "notification_email_port_description": "Port del servidor de correu electrònic (p. ex. 25, 465 o 587)", "notification_email_secure": "SMTPS", - "notification_email_secure_description": "Fes servir SMTPS (SMTP sobre TLS)", - "notification_email_sent_test_email_button": "Envia correu de prova i desa", - "notification_email_setting_description": "Configuració per l'enviament de notificacions per correu electrònic", - "notification_email_test_email": "Envia correu de prova", - "notification_email_test_email_failed": "L'enviament del correu de prova ha fallat, comproveu els valors introduïts", - "notification_email_test_email_sent": "Un correu de prova ha estat enviat a {email}. Si us plau, comproveu la safata d'entrada.", - "notification_email_username_description": "Usuari a fer servir a l'autenticar-se al servidor de correu electrònic", - "notification_enable_email_notifications": "Habilita les notificacions de correu electrònic", - "notification_settings": "Configuració de notificacions", - "notification_settings_description": "Gestiona la configuració de notificacions, incloent-hi el correu electrònic", + "notification_email_secure_description": "Utilitza SMTPS (SMTP sobre TLS)", + "notification_email_sent_test_email_button": "Envia un correu electrònic de prova i desa", + "notification_email_setting_description": "Configuració per a l’enviament de notificacions per correu electrònic", + "notification_email_test_email": "Envia un correu electrònic de prova", + "notification_email_test_email_failed": "No s’ha pogut enviar el correu electrònic de prova, reviseu els valors introduïts", + "notification_email_test_email_sent": "S’ha enviat un correu electrònic de prova a {email}. Reviseu-ne la safata d’entrada.", + "notification_email_username_description": "Usuari que s’utilitzarà per a autenticar-se al servidor de correu electrònic", + "notification_enable_email_notifications": "Activa les notificacions per correu electrònic", + "notification_settings": "Configuració de les notificacions", + "notification_settings_description": "Gestioneu els paràmetres de les notificacions, incloent-hi el correu electrònic", "oauth_allow_insecure_requests": "Permet sol·licituds no segures", - "oauth_allow_insecure_requests_description": "AVÍS: Això inhabilita la validació de certificats TLS per a les sol·licituds OAuth i us pot exposar a atacs MITM.", - "oauth_auto_launch": "Execució automàtica", - "oauth_auto_launch_description": "Inicia el flux d'inici de sessió OAuth automàticament en accedir a la pàgina d'inici de sessió", - "oauth_auto_register": "Registre automàtic", - "oauth_auto_register_description": "Registra nous usuaris automàticament després d'iniciar sessió amb OAuth", + "oauth_allow_insecure_requests_description": "ADVERTÈNCIA: Això desactiva la validació de certificats TLS per a les sol·licituds d’OAuth i us pot exposar a atacs MITM.", + "oauth_auto_launch": "Executa automàticament", + "oauth_auto_launch_description": "Inicia el flux d’inici de sessió d’OAuth automàticament en accedir a la pàgina d’inici de sessió", + "oauth_auto_register": "Registra automàticament", + "oauth_auto_register_description": "Registra els nous usuaris automàticament després d’iniciar sessió amb OAuth", "oauth_button_text": "Text del botó", - "oauth_client_secret_description": "Requerit per clients confidencials, o si PKCE (Proof Key for Code Exchange) no està suportat pel client públic.", - "oauth_enable_description": "Iniciar sessió amb OAuth", - "oauth_end_session_url_description": "Redirigeix l'usuari a aquest URI quan tanqui la sessió.", + "oauth_client_secret_description": "Necessari per a clients confidencials, o si el client públic no admet PKCE (Proof Key for Code Exchange).", + "oauth_enable_description": "Inicia la sessió amb OAuth", + "oauth_end_session_url_description": "Redirigeix l’usuari a aquest URI quan tanqui la sessió.", "oauth_mobile_redirect_uri": "URI de redirecció mòbil", - "oauth_mobile_redirect_uri_override": "Sobreescriu l'URI de redirecció mòbil", - "oauth_mobile_redirect_uri_override_description": "Habilita quan el proveïdor d'OAuth no permet una URI mòbil, com ara ''{callback}''", - "oauth_prompt_description": "Paràmetre de sol·licitud (per exemple, select_account, login, consent)", + "oauth_mobile_redirect_uri_override": "Sobreescriu l’URI de redirecció mòbil", + "oauth_mobile_redirect_uri_override_description": "Activeu-ho quan el proveïdor d’OAuth no permeti una URI mòbil, com ara «{callback}»", + "oauth_prompt_description": "Paràmetre de la sol·licitud (per exemple, select_account, login, consent)", "oauth_role_claim": "Concessió de rol", - "oauth_role_claim_description": "Atorgar accés d'administrador automàticament segons la presència d'aquesta concessió. La concessió pot ser 'usuari' o 'admin'.", + "oauth_role_claim_description": "Atorga l’accés d’administrador automàticament segons la presència d’aquesta concessió. La concessió pot tenir «user» o «admin».", "oauth_settings": "OAuth", - "oauth_settings_description": "Gestiona la configuració de l'inici de sessió OAuth", + "oauth_settings_description": "Gestioneu els paràmetres de l’inici de sessió amb OAuth", "oauth_settings_more_details": "Per a més detalls sobre aquesta funcionalitat, consulteu la documentació.", - "oauth_storage_label_claim": "Petició d'etiquetatge d'emmagatzematge", - "oauth_storage_label_claim_description": "Estableix automàticament l'etiquetatge d'emmagatzematge de l'usuari a aquest valor.", - "oauth_storage_quota_claim": "Quota d'emmagatzematge reclamada", - "oauth_storage_quota_claim_description": "Estableix automàticament la quota d'emmagatzematge de l'usuari al valor d'aquest paràmetre.", - "oauth_storage_quota_default": "Quota d'emmagatzematge predeterminada (GiB)", - "oauth_storage_quota_default_description": "Quota en GiB que s'utilitzarà quan no es proporcioni cap valor específic.", - "oauth_timeout": "Solicitud caducada", - "oauth_timeout_description": "Timeout per a sol·licituds en mil·lisegons", - "ocr_job_description": "Fes servir machine learning per reconèixer text a les imatges", - "password_enable_description": "Inicia sessió amb correu electrònic i contrasenya", + "oauth_storage_label_claim": "Concessió d’etiqueta d’emmagatzematge", + "oauth_storage_label_claim_description": "Defineix automàticament l’etiqueta d’emmagatzematge de l’usuari al valor d’aquesta concessió.", + "oauth_storage_quota_claim": "Concessió de quota d’emmagatzematge", + "oauth_storage_quota_claim_description": "Defineix automàticament la quota d’emmagatzematge de l’usuari al valor d’aquesta concessió.", + "oauth_storage_quota_default": "Quota d’emmagatzematge per defecte (GiB)", + "oauth_storage_quota_default_description": "Quota en GiB que s’utilitzarà quan no es proporcioni cap concessió específica.", + "oauth_timeout": "Temps d’espera de les sol·licituds", + "oauth_timeout_description": "Temps d’espera de les sol·licituds en mil·lisegons", + "ocr_job_description": "Utilitza aprenentatge automàtica per a reconèixer text a les imatges", + "password_enable_description": "Inicia la sessió amb correu electrònic i contrasenya", "password_settings": "Inici de sessió amb contrasenya", - "password_settings_description": "Gestiona la configuració de l'inici de sessió amb contrasenya", - "paths_validated_successfully": "Totes les rutes han estat validades amb èxit", - "person_cleanup_job": "Neteja de persona", - "queue_details": "Detall de les cues", - "queues": "Cues de treball", - "queues_page_description": "Pàgina de cues de treballs d'administrador", - "quota_size_gib": "Tamany de la quota (GiB)", - "refreshing_all_libraries": "Actualitzant totes les biblioteques", - "registration": "Registre d'administrador", - "registration_description": "Com que ets el primer usuari del sistema, seràs designat com a administrador i seràs responsable de les tasques administratives. També seràs l'encarregat de crear usuaris addicionals.", - "release_channel_release_candidate": "Candidat a versió", + "password_settings_description": "Gestioneu els paràmetres de l’inici de sessió amb contrasenya", + "paths_validated_successfully": "Tots els camins s’han validat correctament", + "person_cleanup_job": "Neteja de persones", + "queue_details": "Detalls de la cua", + "queues": "Cues de tasques", + "queues_page_description": "Pàgina de cues de treballs de l’administrador", + "quota_size_gib": "Mida de la quota (GiB)", + "refreshing_all_libraries": "S’estan actualitzant totes les biblioteques", + "registration": "Registre de l’administrador", + "registration_description": "Com que sou el primer usuari del sistema, sereu designat com a administrador, sereu responsable de les tasques administratives i creareu la resta d’usuaris.", + "release_channel_release_candidate": "Versió candidata", "release_channel_stable": "Estable", - "remove_failed_jobs": "Eliminar treballs fallits", - "require_password_change_on_login": "Requerir que l'usuari canviï la contrasenya en el primer inici de sessió", - "reset_settings_to_default": "Restablir configuracions per defecte", - "reset_settings_to_recent_saved": "Restablir la configuració guardada més recent", - "scanning_library": "Escanejant biblioteca", - "search_jobs": "Cercar treballs…", - "send_welcome_email": "Enviar correu electrònic de benvinguda", + "remove_failed_jobs": "Suprimeix les tasques fallides", + "require_password_change_on_login": "Requereix que l’usuari canviï la contrasenya en el primer inici de sessió", + "reset_settings_to_default": "Restableix la configuració per defecte", + "reset_settings_to_recent_saved": "Restableix la configuració a la configuració desada més recent", + "scanning_library": "S’està escanejant la biblioteca", + "search_jobs": "Cerqueu treballs…", + "send_welcome_email": "Envia un correu electrònic de benvinguda", "server_external_domain_settings": "Domini extern", - "server_external_domain_settings_description": "Domini utilitzat per a enllaços externs", + "server_external_domain_settings_description": "Domini utilitzat per als enllaços externs", "server_public_users": "Usuaris públics", - "server_public_users_description": "Tots els usuaris (nom i correu electrònic) apareixen a la llista a l'afegir un usuari als àlbums compartits. Si es desactiva, la llista només serà disponible pels usuaris administradors.", + "server_public_users_description": "Tots els usuaris (nom i adreça electrònica) apareixen a la llista en afegir un usuari als àlbums compartits. Si es desactiva, la llista d’usuaris només serà disponible per als usuaris administradors.", "server_settings": "Configuració del servidor", - "server_settings_description": "Gestiona la configuració del servidor", - "server_stats_page_description": "Pàgina d'estadístiques del servidor de l'administrador", + "server_settings_description": "Gestioneu els paràmetres del servidor", + "server_stats_page_description": "Pàgina d’estadístiques del servidor de l’administrador", "server_welcome_message": "Missatge de benvinguda", - "server_welcome_message_description": "Missatge que es mostra a la pàgina d'inici de sessió.", - "settings_page_description": "Pàgina de configuració de l'administrador", - "sidecar_job": "Metadades auxiliars", - "sidecar_job_description": "Descobreix o sincronitza metadades auxiliars des del sistema de fitxers", - "slideshow_duration_description": "Segons per mostrar cada imatge", - "smart_search_job_description": "Executa aprenentatge automàtic sobre els elements per donar suport a la cerca intel·ligent", - "storage_template_date_time_description": "La data de creació del recurs s'utilitza per a la informació de la data i l'hora", - "storage_template_date_time_sample": "Temps d'exemple: {date}", - "storage_template_enable_description": "Habilitar el motor de plantilles d'emmagatzematge", - "storage_template_hash_verification_enabled": "Verificació de hash habilitada", - "storage_template_hash_verification_enabled_description": "Activa la verificació de hash. No la desactiveu a menys que estigueu segurs de les implicacions", - "storage_template_migration": "Migració de plantilles d'emmagatzematge", - "storage_template_migration_description": "Aplica la {template} actual als elements pujats prèviament", - "storage_template_migration_info": "Les extensions es convertiran a minúscules. Els canvis de plantilla només s'aplicaran a nous elements. Per aplicar la plantilla rectroactivament a elements pujats prèviament, executeu la {job}.", - "storage_template_migration_job": "Tasca de migració de la plantilla d'emmagatzematge", - "storage_template_more_details": "Per obtenir més detalls sobre aquesta funció, consulteu la Storage Template i les seves implications", - "storage_template_onboarding_description_v2": "Un cop habilitada, aquesta funció organitzarà automàticament els fitxers a partir d'una plantilla definida per l'usuari. Per a més informació, podeu consultar la documentació.", - "storage_template_path_length": "Límit aproximat de longitud de la ruta: {length, number}/{limit, number}", - "storage_template_settings": "Plantilla d'emmagatzematge", - "storage_template_settings_description": "Gestiona l'estructura de les carpetes i el nom del fitxers dels elements pujats", - "storage_template_user_label": "{label} és l'etiqueta d'emmagatzematge de l'usuari", + "server_welcome_message_description": "Missatge que es mostra a la pàgina d’inici de sessió.", + "settings_page_description": "Pàgina de configuració de l’administrador", + "sidecar_job": "Metadades de fitxers auxiliars", + "sidecar_job_description": "Descobreix o sincronitza metadades dels fitxers auxiliars a partir del sistema de fitxers", + "slideshow_duration_description": "Nombre de segons que es mostrarà cada imatge", + "smart_search_job_description": "Executa aprenentatge automàtic sobre els recursos per a assistir la cerca intel·ligent", + "storage_template_date_time_description": "La data i hora de creació del recurs s’utilitza per a la informació de la data i l’hora", + "storage_template_date_time_sample": "Data i hora d’exemple: {date}", + "storage_template_enable_description": "Activa el motor de plantilles d’emmagatzematge", + "storage_template_hash_verification_enabled": "Verificació de hash activada", + "storage_template_hash_verification_enabled_description": "Activa la verificació de hash. No la desactiveu llevat que n’entengueu les implicacions", + "storage_template_migration": "Migració de la plantilla d’emmagatzematge", + "storage_template_migration_description": "Aplica la {template} actual als recursos pujats anteriorment", + "storage_template_migration_info": "La plantella d’emmagatzematge convertirà totes les extensions a minúscules. Els canvis de la plantilla només s’aplicaran als nous recursos. Per a aplicar la plantilla de manera retroactiva als recursos pujats anteriorment, executeu la {job}.", + "storage_template_migration_job": "tasca de migració de la plantilla d’emmagatzematge", + "storage_template_more_details": "Per a més detalls sobre aquesta funció, consulteu la plantilla d’emmagatzematge i les seves implicacions", + "storage_template_onboarding_description_v2": "En activar aquesta funció, s’organitzaran automàticament els fitxers a partir d’una plantilla definida per l’usuari. Per a més informació, consulteu la documentació.", + "storage_template_path_length": "Límit aproximat de longitud del camí: {length, number}/{limit, number}", + "storage_template_settings": "Plantilla d’emmagatzematge", + "storage_template_settings_description": "Gestioneu l’estructura de les carpetes i el nom del fitxers dels recursos pujats", + "storage_template_user_label": "{label} és l’etiqueta d’emmagatzematge de l’usuari", "system_settings": "Configuració del sistema", - "tag_cleanup_job": "Neteja d'etiqueta", - "template_email_available_tags": "Pots fer servir les següents variables a la teva plantilla: {tags}", - "template_email_if_empty": "Si la plantilla està buida, es farà servir el correu electrònic predeterminat.", - "template_email_invite_album": "Plantilla per l'àlbum d'invitacions", - "template_email_preview": "Vista prèvia", + "tag_cleanup_job": "Neteja d’etiquetes", + "template_email_available_tags": "Podeu utilitzar les següents variables a la plantilla: {tags}", + "template_email_if_empty": "Si la plantilla és buida, es farà servir el correu electrònic per defecte.", + "template_email_invite_album": "Plantilla d’invitació a l’àlbum", + "template_email_preview": "Previsualitza", "template_email_settings": "Plantilles de correu electrònic", - "template_email_update_album": "Actualitzar la plantilla de l'àlbum", + "template_email_update_album": "Plantilla d’actualització a l’àlbum", "template_email_welcome": "Plantilla del correu de benvinguda", "template_settings": "Plantilles de notificació", - "template_settings_description": "Gestiona les plantilles personalitzades per les notificacions", + "template_settings_description": "Gestioneu les plantilles personalitzades per a les notificacions", "theme_custom_css_settings": "CSS personalitzat", - "theme_custom_css_settings_description": "Els fulls d'estil en cascada permeten personalitzar el disseny d'Immich.", + "theme_custom_css_settings_description": "Els fulls d’estil en cascada permeten personalitzar el disseny de l’Immich.", "theme_settings": "Configuració del tema", - "theme_settings_description": "Gestiona la personalització de la interfície web Immich", - "thumbnail_generation_job": "Generar miniatures", - "thumbnail_generation_job_description": "Genera miniatures grans, petites i borroses per a cada element, així com miniatures per a cada persona", - "transcoding_acceleration_api": "API d'acceleració", - "transcoding_acceleration_api_description": "L'API que interactuarà amb el vostre dispositiu per accelerar la transcodificació. Aquesta configuració és \"millor esforç\": tornarà a la transcodificació del programari en cas d'error. VP9 pot funcionar o no depenent del vostre maquinari.", - "transcoding_acceleration_nvenc": "NVENC (requereix GPU d'NVIDIA)", - "transcoding_acceleration_qsv": "Quick Sync (requereix GPU d'Intel de 7a generació o posterior)", + "theme_settings_description": "Gestioneu la personalització de la interfície web de l’Immich", + "thumbnail_generation_job": "Genera les miniatures", + "thumbnail_generation_job_description": "Genera les miniatures grans, petites i borroses per a cada element, així com miniatures per a cada persona", + "transcoding_acceleration_api": "API d’acceleració", + "transcoding_acceleration_api_description": "L’API que interactuarà amb el vostre dispositiu per a accelerar la transcodificació. Aquesta configuració és de l’estil «millor esforç»: en cas d’error, tornarà a la transcodificació per programari. El VP9 pot funcionar o no depenent del vostre maquinari.", + "transcoding_acceleration_nvenc": "NVENC (requereix GPU d’NVIDIA)", + "transcoding_acceleration_qsv": "Quick Sync (requereix GPU d’Intel de 7a generació o posterior)", "transcoding_acceleration_rkmpp": "RKMPP (requereix SoC de Rockchip)", "transcoding_acceleration_vaapi": "VAAPI", - "transcoding_accepted_audio_codecs": "Còdecs d'àudio acceptats", - "transcoding_accepted_audio_codecs_description": "Seleccioneu quins còdecs d'àudio no s'han de transcodificar. Només s'utilitza per a determinades polítiques de transcodificació.", + "transcoding_accepted_audio_codecs": "Còdecs d’àudio acceptats", + "transcoding_accepted_audio_codecs_description": "Seleccioneu quins còdecs d’àudio no s’han de transcodificar. Només s’utilitza per a determinades polítiques de transcodificació.", "transcoding_accepted_containers": "Contenidors acceptats", - "transcoding_accepted_containers_description": "Seleccioneu quins formats de contenidor no s'han de redistribuir a MP4. Només s'utilitza per a determinades polítiques de transcodificació.", + "transcoding_accepted_containers_description": "Seleccioneu quins formats de contenidor no s’han de remultiplexar a MP4. Només s’utilitza per a determinades polítiques de transcodificació.", "transcoding_accepted_video_codecs": "Còdecs de vídeo acceptats", - "transcoding_accepted_video_codecs_description": "Seleccioneu quins còdecs de vídeo no s'han de transcodificar. Només s'utilitza per a determinades polítiques de transcodificació.", + "transcoding_accepted_video_codecs_description": "Seleccioneu quins còdecs de vídeo no s’han de transcodificar. Només s’utilitza per a determinades polítiques de transcodificació.", "transcoding_advanced_options_description": "Opcions que la majoria dels usuaris no haurien de canviar", - "transcoding_audio_codec": "Còdec d'àudio", - "transcoding_audio_codec_description": "Opus és l'opció de màxima qualitat, però té menor compatibilitat amb dispositius o programari antics.", - "transcoding_bitrate_description": "Vídeos superiors a la taxa de bits màxima o que no tenen un format acceptat", - "transcoding_codecs_learn_more": "Per obtenir més informació sobre la terminologia utilitzada, consulteu la documentació de FFmpeg per al còdec H.264, còdec HEVC i còdec VP9.", + "transcoding_audio_codec": "Còdec d’àudio", + "transcoding_audio_codec_description": "Opus és l’opció de màxima qualitat, però té menys compatibilitat amb dispositius o programari antics.", + "transcoding_bitrate_description": "Vídeos amb una taxa de bits superior a la màxima o que no tenen un format acceptat", + "transcoding_codecs_learn_more": "Per a més informació sobre la terminologia utilitzada, consulteu la documentació d’FFmpeg per al còdec H.264, el còdec HEVC i el còdec VP9.", "transcoding_constant_quality_mode": "Mode de qualitat constant", - "transcoding_constant_quality_mode_description": "ICQ és millor que CQP, però alguns dispositius d'acceleració de maquinari no admeten aquest mode. Establir aquesta opció preferirà el mode especificat quan utilitzeu la codificació basada en la qualitat. Ignorat per NVENC perquè no és compatible amb ICQ.", + "transcoding_constant_quality_mode_description": "ICQ és millor que CQP, però alguns dispositius d’acceleració de maquinari no admeten aquest mode. Si configureu aquesta opció, es preferirà el mode especificat quan s’utilitzi la codificació basada en la qualitat. Ignorat per NVENC perquè no admet ICQ.", "transcoding_constant_rate_factor": "Factor de taxa constant (-crf)", - "transcoding_constant_rate_factor_description": "Nivell de qualitat del vídeo. Els valors típics són 23 per a H.264, 28 per a HEVC, 31 per a VP9 i 35 per a AV1. Més baix és millor, però produeix fitxers més grans.", - "transcoding_disabled_description": "No transcodifiqueu cap vídeo, pot interrompre la reproducció en alguns clients", + "transcoding_constant_rate_factor_description": "Nivell de qualitat del vídeo. Els valors típics són 23 per a H.264, 28 per a HEVC, 31 per a VP9 i 35 per a AV1. Un valor més baix és millor, però produeix fitxers més grans.", + "transcoding_disabled_description": "No transcodifiquis cap vídeo (pot interrompre la reproducció en alguns clients)", "transcoding_encoding_options": "Opcions de codificació", - "transcoding_encoding_options_description": "Establiu còdecs, resolució, qualitat i altres opcions per als vídeos codificats", - "transcoding_hardware_acceleration": "Acceleració de maquinari", - "transcoding_hardware_acceleration_description": "Experimental: transcodificació més ràpida però pot perdre qualitat amb la mateixa tasa de bits", - "transcoding_hardware_decoding": "Descodificació de maquinari", - "transcoding_hardware_decoding_setting_description": "Habilita l'acceleració d'extrem a extrem en lloc d'accelerar només la codificació. És possible que no funcioni en tots els vídeos.", + "transcoding_encoding_options_description": "Establiu els còdecs, la resolució, la qualitat i altres opcions per als vídeos codificats", + "transcoding_hardware_acceleration": "Acceleració per maquinari", + "transcoding_hardware_acceleration_description": "Experimental: transcodificació més ràpida, però pot reduir la qualitat amb la mateixa taxa de bits", + "transcoding_hardware_decoding": "Descodificació per maquinari", + "transcoding_hardware_decoding_setting_description": "Activa l’acceleració d’extrem a extrem en lloc d’accelerar només la codificació. És possible que no funcioni en tots els vídeos.", "transcoding_max_b_frames": "Nombre màxim de B-frames", - "transcoding_max_b_frames_description": "Els valors més alts milloren l'eficiència de la compressió, però alenteixen la codificació. És possible que no sigui compatible amb l'acceleració de maquinari en dispositius antics. 0 desactiva els B-frames, mentre que -1 estableix aquest valor automàticament.", + "transcoding_max_b_frames_description": "Els valors més alts milloren l’eficiència de la compressió, però alenteixen la codificació. És possible que no sigui compatible amb l’acceleració de maquinari en dispositius antics. 0 desactiva els B-frames, mentre que -1 estableix aquest valor automàticament.", "transcoding_max_bitrate": "Taxa de bits màxima", - "transcoding_max_bitrate_description": "Establir una taxa de bits màxima pot fer que les mides dels fitxers siguin més previsibles amb un cost menor per a la qualitat. A 720p, els valors típics són 2600 kbit/s per a VP9 o HEVC, o 4500 kbit/s per a H.264. Desactivat si s'estableix a 0. Quan no s'especifica, s'assumeix kbit/s; per tant 5000 i 5000k i 5M son equivalents.", + "transcoding_max_bitrate_description": "Establir una taxa de bits màxima pot fer que les mides dels fitxers siguin més previsibles amb un cost menor per a la qualitat. A 720p, els valors típics són 2600 kbit/s per a VP9 o HEVC, o 4500 kbit/s per a H.264. Es desactiva si s’estableix a 0. Quan no s’especifica cap unitat, s’assumeix k (per a kbit/s); per tant, 5000, 5000k i 5M (per a Mbit/s) són equivalents.", "transcoding_max_keyframe_interval": "Interval màxim de fotogrames clau", - "transcoding_max_keyframe_interval_description": "Estableix la distància màxima entre fotogrames clau. Els valors més baixos empitjoren l'eficiència de la compressió, però milloren els temps de cerca i poden millorar la qualitat en escenes amb moviment ràpid. 0 estableix aquest valor automàticament.", + "transcoding_max_keyframe_interval_description": "Estableix la distància màxima entre fotogrames clau. Els valors més baixos empitjoren l’eficiència de la compressió, però milloren els temps de cerca i poden millorar la qualitat en escenes amb moviment ràpid. 0 estableix aquest valor automàticament.", "transcoding_optimal_description": "Vídeos superiors a la resolució objectiu o que no tenen un format acceptat", "transcoding_policy": "Política de transcodificació", - "transcoding_policy_description": "Estableix quan es transcodificarà un vídeo", + "transcoding_policy_description": "Establiu quan es transcodificarà un vídeo", "transcoding_preferred_hardware_device": "Dispositiu de maquinari preferit", - "transcoding_preferred_hardware_device_description": "S'aplica només a VAAPI i QSV. Estableix el node dri utilitzat per a la transcodificació de maquinari.", - "transcoding_preset_preset": "Preestablert (-preset)", - "transcoding_preset_preset_description": "Velocitat de compressió. Els valors predefinits més lents produeixen fitxers més petits i augmenten la qualitat quan s'orienta a una taxa de bits determinada. VP9 ignora les velocitats superiors a 'més ràpides'.", + "transcoding_preferred_hardware_device_description": "S’aplica només a VAAPI i QSV. Estableix el node dri utilitzat per a la transcodificació per maquinari.", + "transcoding_preset_preset": "Configuració predefinida (-preset)", + "transcoding_preset_preset_description": "Velocitat de compressió. Les configuracions predefinides més lents produeixen fitxers més petits i augmenten la qualitat quan s’orienta a una taxa de bits determinada. El VP9 ignora les velocitats superiors a «faster» («més ràpida»).", "transcoding_realtime": "Transcodificació en temps real [EXPERIMENTAL]", - "transcoding_realtime_description": "Permet que la transcodificació es realitzi en temps real mentre es retransmet el vídeo. Habilita el canvi de qualitat, però pot causar una latència de reproducció més alta i entretallats segons les capacitats del servidor.", - "transcoding_realtime_enabled": "Activa transcodificació en temps real", + "transcoding_realtime_description": "Permet que la transcodificació es faci en temps real mentre es transmet el vídeo. Permet canvis de qualitat, però pot causar una latència de reproducció més alta i talls depenent de les capacitats del servidor.", + "transcoding_realtime_enabled": "Activa la transcodificació en temps real", "transcoding_realtime_enabled_description": "Si està desactivat, el servidor rebutjarà iniciar noves sessions de transcodificació en temps real.", + "transcoding_realtime_resolutions": "Resolucions", + "transcoding_realtime_resolutions_description": "Resolucions que s’ofereixen per a la transcodificació en temps real. Les resolucions més altes poden causar problemes de reproducció si el servidor no les pot transcodificar prou ràpidament.", + "transcoding_realtime_video_codecs": "Còdecs de vídeo", + "transcoding_realtime_video_codecs_description": "Còdecs de vídeo oferts per a la transcodificació en temps real. Els clients triaran la millor opció que admetin durant la reproducció. AV1 és més eficient que HEVC, que és més eficient que H.264. Quan utilitzeu l’acceleració per maquinari, seleccioneu només els còdecs que l’accelerador pugui codificar. Quan utilitzeu la transcodificació per programari, tingueu en compte que H.264 és més ràpid que AV1, que és més ràpid que HEVC.", "transcoding_reference_frames": "Fotogrames de referència", - "transcoding_reference_frames_description": "El nombre de fotogrames a fer referència en comprimir un fotograma determinat. Els valors més alts milloren l'eficiència de la compressió, però alenteixen la codificació. 0 estableix aquest valor automàticament.", + "transcoding_reference_frames_description": "El nombre de fotogrames a referenciar en comprimir un fotograma determinat. Els valors més alts milloren l’eficiència de la compressió, però alenteixen la codificació. 0 estableix aquest valor automàticament.", "transcoding_required_description": "Només vídeos que no tenen un format acceptat", - "transcoding_settings": "Configuració de transcodificació de vídeo", - "transcoding_settings_description": "Gestionar quins vídeos transcodificar i com processar-los", + "transcoding_settings": "Configuració de la transcodificació de vídeos", + "transcoding_settings_description": "Gestioneu quins vídeos transcodificar i com processar-los", "transcoding_target_resolution": "Resolució objectiu", - "transcoding_target_resolution_description": "Les resolucions més altes poden conservar més detalls, però triguen més temps a codificar-se, tenen mides de fitxer més grans i poden reduir la capacitat de resposta de l'aplicació.", + "transcoding_target_resolution_description": "Les resolucions més altes poden conservar més detalls, però triguen més temps a codificar-se, tenen mides de fitxer més grans i poden reduir la capacitat de resposta de l’aplicació.", "transcoding_temporal_aq": "AQ temporal", - "transcoding_temporal_aq_description": "S'aplica només a NVENC. Quantització adaptativa temporal augmenta la qualitat de les escenes de baix moviment i alt detall. És possible que no sigui compatible amb dispositius antics.", + "transcoding_temporal_aq_description": "S’aplica només a NVENC. La quantització adaptativa temporal augmenta la qualitat de les escenes de baix moviment i alt detall. És possible que no sigui compatible amb dispositius antics.", "transcoding_threads": "Fils", - "transcoding_threads_description": "Els valors més alts condueixen a una codificació més ràpida, però deixen menys espai perquè el servidor processi altres tasques mentre està actiu. Aquest valor no hauria de ser superior al nombre de nuclis de CPU. Maximitza la utilització si s'estableix a 0.", + "transcoding_threads_description": "Els valors més alts causen una codificació més ràpida, però deixen menys espai perquè el servidor processi altres tasques mentre està activa. Aquest valor no hauria de ser superior al nombre de nuclis de CPU. Maximitza la utilització si s’estableix a 0.", "transcoding_tone_mapping": "Mapeig de to", - "transcoding_tone_mapping_description": "Intenta preservar l'aspecte dels vídeos HDR quan es converteixen a SDR. Cada algorisme fa diferents compensacions pel color, el detall i la brillantor. Hable conserva els detalls, Mobius conserva el color i Reinhard conserva la brillantor.", + "transcoding_tone_mapping_description": "Mira de preservar l’aspecte dels vídeos HDR quan es converteixen a SDR. Cada algorisme fa diferents compensacions de color, detall i brillantor. Hable conserva els detalls, Mobius conserva el color i Reinhard conserva la brillantor.", "transcoding_transcode_policy": "Política de transcodificació", - "transcoding_transcode_policy_description": "Política sobre quan s'ha de transcodificar un vídeo. Els vídeos HDR i els vídeos amb un format de píxel diferent a YUV 4:2:0 sempre es transcodificaran (excepte si la transcodificació està desactivada).", - "transcoding_two_pass_encoding": "Codificació de dues passades", - "transcoding_two_pass_encoding_setting_description": "Transcodifica en dos passos per produir vídeos millor codificats. Quan la taxa de bits màxima està habilitada (necessari perquè funcioni amb H.264 i HEVC), aquest mode utilitza un interval de velocitat de bits basat en la taxa de bits màxima i ignora CRF. Per a VP9, es pot utilitzar CRF si la taxa de bits màxima està desactivada.", + "transcoding_transcode_policy_description": "Política que defineix quan s’ha de transcodificar un vídeo. Els vídeos HDR i els vídeos amb un format de píxels diferent de YUV 4:2:0 sempre es transcodificaran (excepte si la transcodificació està desactivada).", + "transcoding_two_pass_encoding": "Codificació en dues passades", + "transcoding_two_pass_encoding_setting_description": "Transcodifica en dues passades per a produir vídeos més ben codificats. Quan la taxa de bits màxima està activada (necessari perquè funcioni amb H.264 i HEVC), aquest mode utilitza un interval de taxa de bits basat en la taxa de bits màxima i ignora el CRF. Per a VP9, es pot utilitzar el CRF si la taxa de bits màxima està desactivada.", "transcoding_video_codec": "Còdec de video", - "transcoding_video_codec_description": "VP9 té una alta eficiència i compatibilitat web, però triga més a transcodificar-se. HEVC funciona de manera similar, però té una compatibilitat web inferior. H.264 és àmpliament compatible i de transcodificació ràpida, però produeix fitxers molt més grans. AV1 és el còdec més eficient, però no té suport en dispositius antics.", - "trash_enabled_description": "Activa les funcions de la paperera", + "transcoding_video_codec_description": "VP9 té una alta eficiència i compatibilitat amb web, però tarda més temps a transcodificar-se. HEVC funciona de manera similar, però té una compatibilitat amb web inferior. H.264 és àmpliament compatible i de transcodificació ràpida, però produeix fitxers molt més grans. AV1 és el còdec més eficient, però no té suport en dispositius antics.", + "trash_enabled_description": "Activa les funcionalitats de la paperera", "trash_number_of_days": "Nombre de dies", - "trash_number_of_days_description": "Nombre de dies per mantenir els recursos a la paperera abans de suprimir-los permanentment", + "trash_number_of_days_description": "Nombre de dies que es mantindran els recursos a la paperera abans de suprimir-los permanentment", "trash_settings": "Configuració de la paperera", - "trash_settings_description": "Gestiona la configuració de la paperera", - "unlink_all_oauth_accounts": "Desvincula tots els comptes d'OAuth", - "unlink_all_oauth_accounts_description": "Recorda desvincular tots els comptes d'OAuth abans de migrar a un proveïdor nou.", - "unlink_all_oauth_accounts_prompt": "Estàs segur que vols desvincular tots els comptes d'OAuth? Això restablirà l'identificador d'OAuth per a cada usuari i no es pot tornar enrere.", - "user_cleanup_job": "Neteja d'usuari", - "user_delete_delay": "El compte i els recursos de {user} es programaran per a la supressió permanent en {delay, plural, one {# dia} other {# dies}}.", + "trash_settings_description": "Gestioneu els paràmetres de la paperera", + "unlink_all_oauth_accounts": "Desenllaça tots els comptes d’OAuth", + "unlink_all_oauth_accounts_description": "Recordeu desenllaçar tots els comptes d’OAuth abans de migrar a un proveïdor nou.", + "unlink_all_oauth_accounts_prompt": "Segur que voleu desvincular tots els comptes d’OAuth? Es restablirà l’identificador d’OAuth per a cada usuari. Aquesta acció no es pot desfer.", + "user_cleanup_job": "Neteja d’usuaris", + "user_delete_delay": "El compte i els recursos de l’usuari {user} es programaran per a la supressió permanent d’aquí a {delay, plural, one {# dia} other {# dies}}.", "user_delete_delay_settings": "Retard de la supressió", - "user_delete_delay_settings_description": "Nombre de dies després de la supressió per eliminar permanentment el compte i els elements d'un usuari. El treball de supressió d'usuaris s'executa a mitjanit per comprovar si hi ha usuaris preparats per eliminar. Els canvis en aquesta configuració s'avaluaran en la propera execució.", - "user_delete_immediately": "El compte i els recursos de {user} es posaran a la cua per suprimir-los permanentment immediatament.", - "user_delete_immediately_checkbox": "Posa en cua l'usuari i els recursos per suprimir-los immediatament", - "user_details": "Detalls d'usuari", - "user_management": "Gestió d'usuaris", - "user_password_has_been_reset": "La contrasenya de l'usuari ha estat restablida:", - "user_password_reset_description": "Si us plau, proporcioneu la contrasenya temporal a l'usuari i informeu-los que haurà de canviar la contrasenya en el proper inici de sessió.", - "user_restore_description": "Es restaurarà el compte {user} .", - "user_restore_scheduled_removal": "Restaura l'usuari - eliminació programada el {date, date, long}", - "user_settings": "Configuració d'usuaris", - "user_settings_description": "Gestiona la configuració dels usuaris", - "user_successfully_removed": "L'usuari {email} s'ha eliminat correctament.", - "users_page_description": "Pàgina d'usuaris de l'administrador", + "user_delete_delay_settings_description": "Nombre de dies després de la supressió en què se suprimirà permanentment el compte i els recursos d’un usuari. La tasca de supressió d’usuaris s’executa a mitjanit i comprova si hi ha usuaris preparats per a suprimir. Els canvis en aquesta configuració s’avaluaran en la següent execució.", + "user_delete_immediately": "El compte i els recursos de l’usuari {user} es posaran a la cua per a suprimir-los permanentment immediatament.", + "user_delete_immediately_checkbox": "Posa en cua l’usuari i els recursos per a suprimir-los immediatament", + "user_details": "Detalls de l’usuari", + "user_management": "Gestió d’usuaris", + "user_password_has_been_reset": "S’ha restablert la contrasenya de l’usuari:", + "user_password_reset_description": "Proporcioneu la contrasenya temporal a l’usuari i informeu-lo que haurà de canviar-la en el següent inici de sessió.", + "user_restore_description": "Es restaurarà el compte de l’usuari {user} .", + "user_restore_scheduled_removal": "Restaura l’usuari - supressió programada el {date, date, long}", + "user_settings": "Configuració dels usuaris", + "user_settings_description": "Gestioneu els paràmetres dels usuaris", + "user_successfully_removed": "L’usuari {email} s’ha suprimit correctament.", + "users_page_description": "Pàgina d’usuaris de l’administrador", "version_check_channel": "Canal de publicació", - "version_check_channel_description": "Tria el canal de publicació del qual vols rebre avisos de noves versions", + "version_check_channel_description": "Trieu el canal de publicació del qual voleu rebre avisos de noves versions", "version_check_enabled_description": "Activa la comprovació de la versió", - "version_check_implications": "La funció de comprovació de versions depèn de comunicacions periòdiques amb {server}", - "version_check_settings": "Comprovació de versió", + "version_check_implications": "La funció de comprovació de versions funciona amb comunicacions periòdiques amb {server}", + "version_check_settings": "Comprovació de la versió", "version_check_settings_description": "Activa/desactiva la notificació de nova versió", - "video_conversion_job": "Transcodificació de vídeos", - "video_conversion_job_description": "Transcodifica vídeos per a major compatibilitat amb navegadors i dispositius" + "video_conversion_job": "Transcodifica vídeos", + "video_conversion_job_description": "Transcodifica vídeos per a una major compatibilitat amb navegadors i dispositius" }, - "admin_email": "Correu de l'administrador", - "admin_password": "Contrasenya de l'administrador", + "admin_email": "Adreça electrònica de l’administrador", + "admin_password": "Contrasenya de l’administrador", "administration": "Administració", "advanced": "Avançat", "advanced_settings_clear_image_cache": "Esborra la memòria cau de les imatges", - "advanced_settings_clear_image_cache_error": "No s'ha pogut esborrar la memòria cau de les imatges", - "advanced_settings_clear_image_cache_success": "S'ha esborrat correctament {size}", - "advanced_settings_log_level_title": "Nivell de registre: {level}", - "advanced_settings_prefer_remote_subtitle": "Alguns dispositius són molt lents en carregar miniatures dels elements locals. Activeu aquest paràmetre per carregar imatges remotes en el seu lloc.", - "advanced_settings_prefer_remote_title": "Prefereix imatges remotes", - "advanced_settings_proxy_headers_subtitle": "Definiu les capçaleres de proxy que Immich per enviar amb cada sol·licitud de xarxa", - "advanced_settings_proxy_headers_title": "Capçaleres de proxy particulars [EXPERIMENTAL]", - "advanced_settings_readonly_mode_subtitle": "Activa el mode de només lectura, en què les fotos només es poden veure. Accions com seleccionar múltiples imatges, compartir, enviar a un dispositiu o eliminar queden desactivades. Activa o desactiva el mode de només lectura des de l’avatar d’usuari de la pantalla principal", + "advanced_settings_clear_image_cache_error": "No s’ha pogut esborrar la memòria cau de les imatges", + "advanced_settings_clear_image_cache_success": "S’han esborrat correctament {size}", + "advanced_settings_log_level_title": "Nivell del registre: {level}", + "advanced_settings_prefer_remote_subtitle": "Alguns dispositius són molt lents en carregar miniatures dels elements locals. Activeu aquest paràmetre per a carregar imatges remotes en el seu lloc.", + "advanced_settings_prefer_remote_title": "Prefereix les imatges remotes", + "advanced_settings_proxy_headers_subtitle": "Definiu les capçaleres de servidor intermediari que l’Immich ha d’enviar amb cada sol·licitud de xarxa", + "advanced_settings_proxy_headers_title": "Capçaleres de servidor intermediari personalitzades [EXPERIMENTAL]", + "advanced_settings_readonly_mode_subtitle": "Activa el mode de només lectura, en què les fotos només es poden veure. Accions com ara seleccionar múltiples imatges, compartir, emetre o suprimir estan desactivades. Activeu o desactiveu el mode de només lectura a l’avatar d’usuari de la pantalla principal", "advanced_settings_readonly_mode_title": "Mode de només lectura", - "advanced_settings_sync_remote_deletions_subtitle": "Suprimeix o restaura automàticament un actiu en aquest dispositiu quan es realitzi aquesta acció al web", - "advanced_settings_sync_remote_deletions_title": "Sincronitza les eliminacions remotes", - "advanced_settings_tile_subtitle": "Configuració avançada de l'usuari", - "advanced_settings_troubleshooting_subtitle": "Habilita funcions addicionals per a la resolució de problemes", + "advanced_settings_sync_remote_deletions_subtitle": "Suprimeix o restaura automàticament un recurs en aquest dispositiu quan es faci l’acció al web", + "advanced_settings_sync_remote_deletions_title": "Sincronitza les eliminacions remotes [EXPERIMENTAL]", + "advanced_settings_tile_subtitle": "Configuració avançada de l’usuari", + "advanced_settings_troubleshooting_subtitle": "Activa funcionalitats addicionals per a la resolució de problemes", "advanced_settings_troubleshooting_title": "Resolució de problemes", "age_months": "{months, plural, one {# mes} other {# mesos}}", - "age_year_months": "Un any i {months, plural, one {# mes} other {# mesos}}", + "age_year_months": "1 any i {months, plural, one {# mes} other {# mesos}}", "age_years": "{years, plural, one {# any} other {# anys}}", "album": "Àlbum", - "album_added": "Àlbum afegit", - "album_added_notification_setting_description": "Rep una notificació per correu quan siguis afegit a un àlbum compartit", - "album_cover_updated": "Portada de l'àlbum actualitzada", - "album_delete_confirmation": "Esteu segur que voleu suprimir l'àlbum {album}?", - "album_delete_confirmation_description": "Si aquest àlbum es comparteix, els altres usuaris ja no podran accedir-hi.", - "album_deleted": "S'ha suprimit l'àlbum", - "album_info_updated": "Informació de l'àlbum actualitzada", - "album_name": "Nom de l'àlbum", - "album_options": "Opcions de l'àlbum", - "album_remove_user": "Eliminar l'usuari?", - "album_remove_user_confirmation": "Esteu segurs que voleu eliminar {user}?", - "album_search_not_found": "No s'ha trobat cap àlbum que coincideixi amb la teva cerca", - "album_share_no_users": "Sembla que has compartit aquest àlbum amb tots els usuaris o no tens cap usuari amb qui compartir-ho.", - "album_summary": "Resum de l'àlbum", + "album_added": "Afegit a un àlbum", + "album_added_notification_setting_description": "Envia una notificació per correu electrònic quan us afegeixen a un àlbum compartit", + "album_cover_updated": "Portada de l’àlbum actualitzada", + "album_delete_confirmation": "Segur que voleu suprimir l’àlbum {album}?", + "album_delete_confirmation_description": "Si aquest àlbum és compartit, els altres usuaris ja no hi podran accedir.", + "album_deleted": "S’ha suprimit l’àlbum", + "album_info_updated": "S’ha actualitzat la informació de l’àlbum", + "album_name": "Nom de l’àlbum", + "album_options": "Opcions de l’àlbum", + "album_remove_user": "Voleu eliminar l’usuari?", + "album_remove_user_confirmation": "Segur que voleu eliminar l’usuari {user}?", + "album_search_not_found": "No s’ha trobat cap àlbum que coincideixi amb la cerca", + "album_share_no_users": "Sembla que heu compartit aquest àlbum amb tots els usuaris o no teniu cap usuari amb qui compartir-lo.", + "album_summary": "Resum de l’àlbum", "album_updated": "Àlbum actualitzat", - "album_updated_setting_description": "Rep una notificació per correu electrònic quan un àlbum compartit tingui recursos nous", - "album_upload_assets": "Carrega recursos des del teu ordinador i afegeix-los a l'àlbum", - "album_viewer_appbar_share_err_delete": "Error al esborrar l'àlbum", + "album_updated_setting_description": "Envia una notificació per correu electrònic quan un àlbum compartit tingui recursos nous", + "album_upload_assets": "Pengeu recursos del vostre ordinador i afegiu-los a l’àlbum", + "album_viewer_appbar_share_err_delete": "No s’ha pogut suprimir l’àlbum", "album_viewer_page_share_add_users": "Afegeix usuaris", - "album_with_link_access": "Permet que qualsevol persona que tingui l'enllaç vegi fotos i persones d'aquest àlbum.", + "album_with_link_access": "Permet que qualsevol persona que tingui l’enllaç vegi les fotos i les persones d’aquest àlbum.", "albums": "Àlbums", - "albums_count": "{count, plural, one {{count, number} Àlbum} other {{count, number} Àlbums}}", - "albums_default_sort_order": "Ordre per defecte de l'àlbum", - "albums_default_sort_order_description": "Ordre de classificació inicial dels recursos al crear àlbums nous.", - "albums_feature_description": "Col·leccions d'actius que es poden compartir amb altres usuaris.", + "albums_count": "{count, plural, one {{count, number} àlbum} other {{count, number} àlbums}}", + "albums_default_sort_order": "Ordre per defecte dels àlbums", + "albums_default_sort_order_description": "Ordre inicial dels recursos en crear àlbums nous.", + "albums_feature_description": "Col·leccions de recursos que es poden compartir amb altres usuaris.", "albums_on_device_count": "Àlbums al dispositiu ({count})", "all": "Tots", - "all_albums": "Tots els àlbum", - "all_people": "Tota la gent", - "all_photos": "Totes les fotografies", + "all_albums": "Tots els àlbums", + "all_people": "Totes les persones", + "all_photos": "Totes les fotos", "all_videos": "Tots els vídeos", - "allow_dark_mode": "Permet el tema fosc", - "allow_public_user_to_download": "Permet que l'usuari públic pugui descarregar", - "allow_public_user_to_upload": "Permet que l'usuari públic pugui carregar", + "allow_dark_mode": "Permet el mode fosc", + "allow_public_user_to_download": "Permet que l’usuari públic pugui baixar", + "allow_public_user_to_upload": "Permet que l’usuari públic pugui pujar", "allowed": "Permès", - "alt_text_qr_code": "Codi QR", - "always_keep": "Mantenir sempre", - "always_keep_photos_hint": "Allibera espai manté totes les fotos en aquest dispositiu.", - "always_keep_videos_hint": "Allibera espai manté tots els vídeos en aquest dispositiu.", - "api_key": "Clau API", + "alt_text_qr_code": "Imatge del codi QR", + "always_keep": "Mantén sempre", + "always_keep_photos_hint": "L’alliberament d’espai mantindrà totes les fotos en aquest dispositiu.", + "always_keep_videos_hint": "L’alliberament d’espai mantindrà tots els vídeos en aquest dispositiu.", + "api_key": "Clau de l’API", "api_key_description": "Aquest valor només es mostrarà una vegada. Assegureu-vos de copiar-lo abans de tancar la finestra.", - "api_key_empty": "El nom de la clau de l'API no pot estar buit", - "api_keys": "Claus API", + "api_key_empty": "El nom de la clau de l’API no pot estar buit", + "api_keys": "Claus de l’API", "app_architecture_variant": "Variant (Arquitectura)", - "app_bar_signout_dialog_content": "Estàs segur que vols tancar la sessió?", + "app_bar_signout_dialog_content": "Segur que voleu tancar la sessió?", "app_bar_signout_dialog_title": "Tanca la sessió", - "app_download_links": "Enllaços de descàrrega de l'App", - "app_settings": "Configuració de l'app", - "app_stores": "Botiga App", - "app_update_available": "Actualització App disponible", + "app_download_links": "Enllaços de baixada de l’aplicació", + "app_settings": "Configuració de l’aplicació", + "app_stores": "Botigues d’aplicacions", + "app_update_available": "Hi ha disponible una actualització de l’aplicació", "appears_in": "Apareix a", - "apply_count": "Aplicar ({count, number})", + "apply_count": "Aplica ({count, number})", "archive": "Arxiu", - "archive_action_prompt": "{count} afegit a Arxiu", - "archive_or_unarchive_photo": "Arxivar o desarxivar fotografia", - "archive_size": "Mida de l'arxiu", - "archive_size_description": "Configureu la mida de l'arxiu de les descàrregues (en GiB)", + "archive_action_prompt": "{count, plural, one {S’ha afegit # recurs} other {S’han afegit # recursos}} a l’arxiu", + "archive_or_unarchive_photo": "Arxiva o desarxiva la foto", + "archive_size": "Mida de l’arxiu", + "archive_size_description": "Configureu la mida de l’arxiu de les baixades (en GiB)", "archived": "Arxivat", - "archived_count": "{count, plural, one {Arxivat #} other {Arxivats #}}", + "archived_count": "{count, plural, one {# arxivat} other {# arxivats}}", "are_these_the_same_person": "Són la mateixa persona?", - "are_you_sure_to_do_this": "Esteu segurs que voleu fer-ho?", - "asset_added_to_album": "Afegit a l'àlbum", - "asset_adding_to_album": "Afegint a l'àlbum…", + "are_you_sure_to_do_this": "Segur que voleu fer això?", + "asset_added_to_album": "S’ha afegit a l’àlbum", + "asset_adding_to_album": "S’està afegint a l’àlbum…", "asset_created": "Recurs creat", - "asset_day_count": "{date}: {count, plural, one {# element} other {# elements}}", - "asset_description_updated": "La descripció del recurs s'ha actualitzat", - "asset_hashing": "Hasheant…", - "asset_list_group_by_sub_title": "Agrupar per", - "asset_list_layout_settings_group_by": "Agrupa elements per", + "asset_day_count": "{date}: {count, plural, one {# recurs} other {# recursos}}", + "asset_description_updated": "La descripció del recurs s’ha actualitzat", + "asset_hashing": "S’està calculant el hash…", + "asset_list_group_by_sub_title": "Agrupa per", + "asset_list_layout_settings_group_by": "Agrupa els recursos per", "asset_list_layout_settings_group_by_month_day": "Mes + dia", "asset_list_layout_sub_title": "Disseny", "asset_list_settings_subtitle": "Configuració del disseny de la graella de fotos", "asset_list_settings_title": "Graella de fotos", - "asset_not_found_on_device_android": "No s'ha trobat l'actiu al dispositiu", - "asset_not_found_on_device_ios": "No s'ha trobat l'element al dispositiu. Si utilitzes l'iCloud, pot ser que no s'hi pugui accedir perquè el fitxer guardat a l'iCloud és corrupte", - "asset_not_found_on_icloud": "No s'ha trobat l'element a l'iCloud. Pot ser que no s'hi pugui accedir perquè el fitxer guardat a l'iCloud és corrupte", - "asset_offline": "Element fora de línia", - "asset_offline_description": "Aquest recurs extern ja no es troba al disc. Poseu-vos en contacte amb el vostre administrador d'Immich per obtenir ajuda.", - "asset_skipped": "Saltat", + "asset_not_found_on_device_android": "No s’ha trobat el recurs al dispositiu", + "asset_not_found_on_device_ios": "No s’ha trobat el recurs al dispositiu. Si utilitzeu l’iCloud, és possible que no s’hi pugui accedir perquè el fitxer desat a l’iCloud sigui corrupte", + "asset_not_found_on_icloud": "No s’ha trobat el recurs a l’iCloud. És possible que no s’hi pugui accedir perquè el fitxer desat a l’iCloud sigui corrupte", + "asset_offline": "Recurs fora de línia", + "asset_offline_description": "Aquest recurs extern ja no és al disc. Poseu-vos en contacte amb l’administrador de l’Immich per a obtenir ajuda.", + "asset_skipped": "Omès", "asset_skipped_in_trash": "A la paperera", - "asset_troubleshoot": "Diagnòstic de l'element", - "asset_uploaded": "Carregat", - "asset_uploading": "S'està carregant…", - "asset_viewer_settings_subtitle": "Gestiona la configuració del visualitzador de la galeria", - "asset_viewer_settings_title": "Visor d'arxius", - "assets": "Elements", - "assets_added_to_album_count": "{count, plural, one {Afegit un element} other {Afegits # elements}} a l'àlbum", - "assets_added_to_albums_count": "Afegits {assetTotal, plural, one {# recurs} other {# recursos}} a {albumTotal, plural, one {# album} other {# albums}}", - "assets_cannot_be_added_to_album_count": "{count, plural, one {Asset} other {Assets}} no es pot afegir a l'àlbum", - "assets_cannot_be_added_to_albums": "{count, plural, one {El recurs} other {Els recursos}} no poden ser afegits a cap dels àlbums", + "asset_troubleshoot": "Diagnòstic del recurs", + "asset_uploaded": "Pujat", + "asset_uploading": "S’està pujant…", + "asset_viewer_settings_subtitle": "Gestioneu la configuració del visualitzador de la galeria", + "asset_viewer_settings_title": "Visualitzador de recursos", + "assets": "Recursos", + "assets_added_to_album_count": "{count, plural, one {S’ha afegit # recurs} other {S’han afegit # recursos}} a l’àlbum", + "assets_added_to_album_partial_count": "S’han afegit {successCount} {totalCount, plural, one {d’# recurs} other {de # recursos}} a l’àlbum", + "assets_added_to_albums_count": "{assetTotal, plural, one {S’ha afegit # recurs} other {S’han afegit # recursos}} a {albumTotal, plural, one {# àlbum} other {# àlbums}}", + "assets_cannot_be_added_to_album_count": "{count, plural, one {El recurs no es pot} other {Els recursos no es poden}} afegir a l’àlbum", + "assets_cannot_be_added_to_albums": "{count, plural, one {El recurs} other {Els recursos}} no es poden afegir a cap dels àlbums", "assets_count": "{count, plural, one {# recurs} other {# recursos}}", - "assets_moved_to_trash_count": "{count, plural, one {# recurs mogut} other {# recursos moguts}} a la paperera", - "assets_permanently_deleted_count": "{count, plural, one {# recurs esborrat} other {# recursos esborrats}} permanentment", - "assets_removed_count": "{count, plural, one {# element eliminat} other {# elements eliminats}}", - "assets_restore_confirmation": "Esteu segurs que voleu restaurar tots els teus actius? Aquesta acció no es pot desfer! Tingueu en compte que els recursos fora de línia no es poden restaurar d'aquesta manera.", - "assets_restored_count": "{count, plural, one {# element restaurat} other {# elements restaurats}}", - "assets_trashed": "{count} element(s) enviat a la paperera", - "assets_trashed_count": "{count, plural, one {# element enviat} other {# elements enviats}} a la paperera", - "assets_were_part_of_album_count": "{count, plural, one {L'element ja és} other {Els elements ja són}} part de l'àlbum", - "assets_were_part_of_albums_count": "{count, plural, one {El recurs ja formava} other {Els recursos ja formaven}} part dels àlbums", + "assets_moved_to_trash_count": "{count, plural, one {S’ha mogut # recurs} other {S’han mogut # recursos}} a la paperera", + "assets_permanently_deleted_count": "{count, plural, one {S’ha suprimit # recurs} other {S’ha suprimit # recursos}} permanentment", + "assets_removed_count": "{count, plural, one {S’ha eliminat # recurs} other {S’han eliminat # recursos}}", + "assets_restore_confirmation": "Segur que voleu restaurar tots els recursos de la paperera? Aquesta acció no es pot desfer! Tingueu en compte que els recursos fora de línia no es poden restaurar d’aquesta manera.", + "assets_restored_count": "{count, plural, one {S’ha restaurat # recurs} other {S’han restaurat # recursos}}", + "assets_trashed": "{count, plural, one {S’ha enviat # element} other {S’ha enviat # elements}} a la paperera", + "assets_trashed_count": "{count, plural, one {S’ha enviat # recurs} other {S’han enviat # recursos}} a la paperera", + "assets_were_part_of_album_count": "{count, plural, one {El recurs ja era} other {Els recursos ja eren}} part de l’àlbum", + "assets_were_part_of_albums_count": "{count, plural, one {El recurs ja era} other {Els recursos ja eren}} part dels àlbums", "authorized_devices": "Dispositius autoritzats", - "automatic_endpoint_switching_subtitle": "Connecteu-vos localment a través de la Wi-Fi designada quan estigui disponible i utilitzeu connexions alternatives en altres llocs", - "automatic_endpoint_switching_title": "Canvi automàtic d'URL", + "automatic_endpoint_switching_subtitle": "Connecta’t localment amb la Wi-Fi designada quan estigui disponible i utilitza connexions alternatives en altres llocs", + "automatic_endpoint_switching_title": "Canvi automàtic d’URL", "autoplay_slideshow": "Reprodueix automàticament les diapositives", - "back": "Enrere", - "back_close_deselect": "Tornar, tancar o anul·lar la selecció", - "background_location_permission": "Permís d'ubicació en segon pla", - "background_location_permission_content": "Per canviar de xarxa quan s'executa en segon pla, Immich ha de *sempre* tenir accés a la ubicació precisa perquè l'aplicació pugui llegir el nom de la xarxa Wi-Fi", - "background_options": "Opcions en segon pla", - "backup": "Còpia", - "backup_album_selection_page_albums_tap": "Un toc per incloure, doble toc per excloure", - "backup_album_selection_page_assets_scatter": "Els elements poden dispersar-se en diversos àlbums. Per tant, els àlbums es poden incloure o excloure durant el procés de còpia de seguretat.", + "back": "Endarrere", + "back_close_deselect": "Endarrere, tanca o deselecciona", + "background_location_permission": "Permís d’ubicació en segon pla", + "background_location_permission_content": "Per a canviar de xarxa quan s’executa en segon pla, l’Immich *sempre* ha de tenir accés a la ubicació precisa perquè l’aplicació pugui llegir el nom de la xarxa Wi-Fi", + "background_options": "Opcions de segon pla", + "backup": "Còpia de seguretat", + "backup_album_selection_page_albums_tap": "Un toc per a incloure, doble toc per a excloure", + "backup_album_selection_page_assets_scatter": "Els recursos es poden dispersar en múltiples àlbums. Per tant, els àlbums es poden incloure o excloure durant el procés de còpia al servidor.", "backup_album_selection_page_select_albums": "Selecciona àlbums", "backup_album_selection_page_selection_info": "Informació de la selecció", - "backup_albums_sync": "Sincronització de la Còpia de Seguretat d'Àlbums", - "backup_background_service_complete_notification": "Backup completat d'actius", - "backup_background_service_default_notification": "Cercant nous elements…", - "backup_background_service_in_progress_notification": "Copiant els teus elements…", - "backup_controller_page_albums": "Copia els àlbums", - "backup_controller_page_background_battery_info_link": "Mostra'm com", - "backup_controller_page_background_battery_info_message": "Per obtenir la millor experiència de còpia de seguretat en segon pla, desactiveu qualsevol optimització de bateria que restringeixi l'activitat en segon pla per a Immich.\n\nAtès que això és específic del dispositiu, busqueu la informació necessària per al fabricant del vostre dispositiu.", - "backup_controller_page_background_battery_info_ok": "D'acord", - "backup_controller_page_background_battery_info_title": "Optimitzacions de bateria", - "backup_controller_page_background_delay": "Retard en la còpia de seguretat de nous elements: {duration}", - "backup_controller_page_backup": "Còpia", + "backup_albums_sync": "Sincronització de la còpia al servidor d’àlbums", + "backup_background_service_complete_notification": "S’ha completat la còpia dels recursos al servidor", + "backup_background_service_default_notification": "S’estan cercant recursos nous…", + "backup_background_service_in_progress_notification": "S’estan copiant els vostres recursos al servidor…", + "backup_controller_page_albums": "Còpia al servidor dels àlbums", + "backup_controller_page_background_battery_info_link": "Mostra’m com es fa", + "backup_controller_page_background_battery_info_message": "Per a obtenir la millor experiència de còpia al servidor en segon pla, desactiveu qualsevol optimització de la bateria que restringeixi l’activitat en segon pla de l’Immich.\n\nAtès que això és específic de cada dispositiu, cerqueu la informació necessària per al fabricant del vostre dispositiu.", + "backup_controller_page_background_battery_info_ok": "D’acord", + "backup_controller_page_background_battery_info_title": "Optimitzacions de la bateria", + "backup_controller_page_background_delay": "Retard en la còpia al servidor de recursos nous: {duration}", + "backup_controller_page_backup": "Còpia al servidor", "backup_controller_page_backup_selected": "Seleccionat: ", - "backup_controller_page_backup_sub": "Fotografies i vídeos copiats", - "backup_controller_page_excluded": "Exclosos: ", - "backup_controller_page_none_selected": "Cap seleccionat", - "backup_controller_page_remainder": "Restant", - "backup_controller_page_remainder_sub": "Fotografies i vídeos restants per copiar de la selecció", + "backup_controller_page_backup_sub": "Fotos i vídeos amb còpia al servidor", + "backup_controller_page_excluded": "Exclòs: ", + "backup_controller_page_none_selected": "No s’ha seleccionat res", + "backup_controller_page_remainder": "Pendents", + "backup_controller_page_remainder_sub": "Fotos i vídeos pendents de fer-ne una còpia al servidor dels seleccionats", "backup_controller_page_server_storage": "Emmagatzematge del servidor", - "backup_controller_page_storage_format": "{used} de {total} utilitzats", - "backup_controller_page_to_backup": "Àlbums a copiar", - "backup_controller_page_total_sub": "Totes les fotografies i vídeos dels àlbums seleccionats", - "backup_error_sync_failed": "Sincronització malament, No es pot fer backup.", - "backup_info_card_assets": "elements", - "backup_options": "Opcions de Còpia de Seguretat", - "backup_settings_subtitle": "Administra la configuració de pujada", - "backward": "Enrere", - "battery_optimization_backup_reliability": "Desactivar les optimitzacions de la bateria pot millorar la fiabilitat de la còpia de seguretat en segon pla", + "backup_controller_page_storage_format": "{used} de {total} en ús", + "backup_controller_page_to_backup": "Àlbums dels quals es farà còpia al servidor", + "backup_controller_page_total_sub": "Totes les fotos i vídeos únics dels àlbums seleccionats", + "backup_error_sync_failed": "No s’ha pogut completar la sincronització. No es pot processar la còpia al servidor.", + "backup_info_card_assets": "recursos", + "backup_options": "Opcions de còpia al servidor", + "backup_settings_subtitle": "Gestioneu la configuració de les pujades", + "backward": "Cap endarrere", + "battery_optimization_backup_reliability": "Si desactiveu les optimitzacions de la bateria, podeu millorar la fiabilitat de la còpia al servidor en segon pla", "biometric_auth_enabled": "Autentificació biomètrica activada", - "biometric_locked_out": "Esteu bloquejats fora de l'autenticació biomètrica", + "biometric_locked_out": "Esteu blocat de l’autenticació biomètrica", "biometric_no_options": "No hi ha opcions biomètriques disponibles", - "biometric_not_available": "L'autenticació biomètrica no està disponible en aquest dispositiu", - "birthdate_set_description": "La data de naixement s'utilitza per calcular l'edat d'aquesta persona en el moment d'una foto.", + "biometric_not_available": "L’autenticació biomètrica no està disponible en aquest dispositiu", + "birthdate_set_description": "La data de naixement s’utilitza per a calcular l’edat d’aquesta persona en el moment d’una foto.", "blurred_background": "Fons difuminat", - "browse_templates": "Explorar plantilles", + "browse_templates": "Explora les plantilles", "bugs_and_feature_requests": "Errors i sol·licituds de funcions", - "build": "Número de compilació", - "build_image": "Versió de la imatge compilada", - "bulk_delete_duplicates_confirmation": "Esteu segurs que voleu suprimir de manera massiva {count, plural, one {# recurs duplicat} other {# recursos duplicats}}? Això mantindrà el recurs més gran de cada grup i esborrarà permanentment tots els altres duplicats. No podeu desfer aquesta acció!", - "bulk_keep_duplicates_confirmation": "Esteu segur que voleu mantenir {count, plural, one {# recurs duplicat} other {# recursos duplicats}}? Això resoldrà tots els grups duplicats sense eliminar res.", - "bulk_trash_duplicates_confirmation": "Esteu segur que voleu enviar a les escombraries {count, plural, one {# recurs duplicat} other {# recursos duplicats}}? Això mantindrà el recurs més gran de cada grup i eliminarà la resta de duplicats.", - "buy": "Comprar Immich", + "build": "Compilació", + "build_image": "Imatge compilada", + "bulk_delete_duplicates_confirmation": "Segur que voleu suprimir en massa {count, plural, one {# recurs duplicat} other {# recursos duplicats}}? Es mantindrà el recurs més gran de cada grup i se suprimiran permanentment tots els altres duplicats. Aquesta acció no es pot desfer!", + "bulk_keep_duplicates_confirmation": "Segur que voleu mantenir {count, plural, one {# recurs duplicat} other {# recursos duplicats}}? Es resoldran tots els grups de duplicats sense suprimir res.", + "bulk_trash_duplicates_confirmation": "Segur que voleu enviar a la paperera en massa {count, plural, one {# recurs duplicat} other {# recursos duplicats}}? Es mantindrà el recurs més gran de cada grup i s’enviaran a la paperera la resta de duplicats.", + "buy": "Compra l’Immich", "camera": "Càmera", "camera_brand": "Marca de la càmera", - "camera_model": "Model de càmera", + "camera_model": "Model de la càmera", "cancel": "Cancel·la", "cancel_search": "Cancel·la la cerca", - "canceled": "Cancel·lat", - "canceling": "Cancel·lant", - "cannot_merge_people": "No es pot fusionar gent", + "canceled": "S’ha cancel·lat", + "canceling": "S’està cancel·lant", + "cannot_merge_people": "No s’han pogut fusionar les persones", "cannot_undo_this_action": "Aquesta acció no es pot desfer!", - "cannot_update_the_description": "No es pot actualitzar la descripció", + "cannot_update_the_description": "No s’ha pogut actualitzar la descripció", "cast": "Emet", - "cast_description": "Configurar les destinacions de transmissió disponibles", + "cast_description": "Configureu les destinacions d’emissió disponibles", "change": "Canvia", "change_date": "Canvia la data", "change_description": "Canvia la descripció", - "change_display_order": "Canvia l'ordre de visualització", + "change_display_order": "Canvia l’ordre de visualització", "change_location": "Canvia la ubicació", "change_name": "Canvia el nom", - "change_name_successfully": "Nom canviat amb èxit", + "change_name_successfully": "S’ha canviat el nom correctament", "change_password": "Canvia la contrasenya", - "change_password_description": "Aquesta és la primera vegada que inicieu la sessió al sistema o s'ha fet una sol·licitud per canviar la contrasenya. Introduïu la nova contrasenya a continuació.", - "change_password_form_confirm_password": "Confirma la contrasenya", - "change_password_form_description": "Hola {name},\n\nAquesta és la primera vegada que inicies sessió al sistema o bé s'ha sol·licitat canviar la teva contrasenya. Si us plau, introdueix la nova contrasenya a continuació.", - "change_password_form_log_out": "Fer fora de tots els altres dispositius", - "change_password_form_log_out_description": "Es recomana fer fora de tots els altres dispositius", - "change_password_form_new_password": "Nova contrasenya", + "change_password_description": "És la primera vegada que inicieu la sessió al sistema o bé s’ha fet una sol·licitud perquè canvieu la contrasenya. Introduïu la contrasenya nova a continuació.", + "change_password_form_confirm_password": "Confirmeu la contrasenya", + "change_password_form_description": "Bon dia, {name},\n\nÉs la primera vegada que inicieu la sessió al sistema o bé s’ha fet una sol·licitud perquè canvieu la contrasenya. Introduïu la contrasenya nova a continuació.", + "change_password_form_log_out": "Tanca la sessió en tots els altres dispositius", + "change_password_form_log_out_description": "És recomanable tancar la sessió en tots els altres dispositius", + "change_password_form_new_password": "Contrasenya nova", "change_password_form_password_mismatch": "Les contrasenyes no coincideixen", - "change_password_form_reenter_new_password": "Torna a introduir la nova contrasenya", - "change_pin_code": "Canviar el codi PIN", - "change_your_password": "Canvia la teva contrasenya", - "changed_visibility_successfully": "Visibilitat canviada amb èxit", - "charging": "Carregant", - "charging_requirement_mobile_backup": "La còpia de seguretat en segon pla requereix que el dispositiu estigui carregant", - "check_logs": "Comprovar els registres", - "checksum": "Suma de control", + "change_password_form_reenter_new_password": "Torneu a introduir la contrasenya nova", + "change_pin_code": "Canvieu el codi PIN", + "change_your_password": "Canvieu la contrasenya", + "changed_visibility_successfully": "S’ha canviat la visibilitat correctament", + "charging": "S’està carregant", + "charging_requirement_mobile_backup": "La còpia al servidor en segon pla requereix que el dispositiu s’estigui carregant", + "check_logs": "Comprova els registres", + "checksum": "Suma de verificació", "choose": "Tria", - "choose_matching_people_to_merge": "Trieu les persones que coincideixin per combinar-les", + "choose_matching_people_to_merge": "Trieu les persones que coincideixin per a fusionar-les", "city": "Ciutat", - "cleanup_confirm_description": "Immich ha trobat {count} recursos (creats abans del {date}) carregats adequadament al servidor. Eliminar les còpies locals d'aquest dispositiu?", - "cleanup_confirm_prompt_title": "Eliminar d'aquest dispositiu?", - "cleanup_deleted_assets": "S'han mogut {count} recursos a la paperera del dispositiu", - "cleanup_deleting": "Movent a la paperera...", - "cleanup_found_assets": "S'han trobat {count} recursos amb còpia", - "cleanup_found_assets_with_size": "S'han trobat {count} elements copiats ({size})", - "cleanup_icloud_shared_albums_excluded": "Els àlbums compartits d'iCloud s'exclouen de la cerca", - "cleanup_no_assets_found": "No s'han trobat recursos que coincideixin amb el criteri de sobre. Allibera Espai només pot esborrar elements que s'hagin copiat al servidor", + "cleanup_confirm_description": "L’Immich ha trobat {count} recursos (creats abans del {date}) dels quals s’ha fet còpia al servidor correctament. Voleu eliminar-ne les còpies locals d’aquest dispositiu?", + "cleanup_confirm_prompt_title": "Voleu eliminar-los d’aquest dispositiu?", + "cleanup_deleted_assets": "S’han mogut {count} recursos a la paperera del dispositiu", + "cleanup_deleting": "S’està movent a la paperera...", + "cleanup_found_assets": "S’han trobat {count} recursos amb còpia al servidor", + "cleanup_found_assets_with_size": "S’han trobat {count} recursos amb còpia al servidor ({size})", + "cleanup_icloud_shared_albums_excluded": "Els àlbums compartits de l’iCloud s’exclouen de l’escaneig", + "cleanup_no_assets_found": "No s’han trobat recursos que coincideixin amb els criteris anteriors. L’alliberament d’espai només pot esborrar elements dels quals s’hagi fet còpia al servidor", "cleanup_preview_title": "Recursos a eliminar ({count})", - "cleanup_step3_description": "Cerca fotos i vídeos que ja tinguin una còpia al servidor amb la data de tall i manté els filtres seleccionats.", - "cleanup_step4_summary": "{count} recursos (creats abans del {date}) esborrats del dispositiu local. Les fotografies estaran disponibles a l'aplicació Immich.", - "cleanup_trash_hint": "Per a reclamar l'espai completament, obre la galeria del dispositiu i buida la paperera", - "clear": "Buida", + "cleanup_step3_description": "Escaneja cercant recursos que ja tinguin una còpia al servidor que encaixin amb la data de tall i la configuració de manteniment.", + "cleanup_step4_summary": "S’esborraran {count} recursos (creats abans del {date}) del dispositiu local. Les fotos romandran accessibles a l’aplicació Immich.", + "cleanup_trash_hint": "Per a recuperar completament l’espai d’emmagatzematge, obriu l’aplicació de la galeria del sistema i buideu la paperera", + "clear": "Neteja", "clear_all": "Neteja-ho tot", "clear_all_recent_searches": "Esborra totes les cerques recents", - "clear_failed_count": "Buida fallades ({count})", + "clear_failed_count": "No s’han pogut netejar ({count})", "clear_file_cache": "Buida la memòria cau de fitxers", "clear_message": "Neteja el missatge", - "clear_value": "Neteja el valor", - "client_cert_import": "Importar", - "client_cert_import_success_msg": "S'ha importat el certificat del client", - "client_cert_invalid_msg": "Fitxer de certificat no vàlid o contrasenya incorrecta", - "client_cert_password_message": "Introdueix la contrasenya per a aquest certificat", + "clear_value": "Esborra el valor", + "client_cert_import": "Importa", + "client_cert_import_success_msg": "S’ha importat el certificat del client", + "client_cert_invalid_msg": "El fitxer de certificat no és vàlid o la contrasenya és incorrecta", + "client_cert_password_message": "Introduïu la contrasenya per a aquest certificat", "client_cert_password_title": "Contrasenya del certificat", - "client_cert_remove_msg": "S'ha eliminat el certificat del client", - "client_cert_subtitle": "Només admet el format PKCS12 (.p12, .pfx). La importació/eliminació de certificats només està disponible abans d'iniciar sessió", - "client_cert_title": "Certificat de client SSL", + "client_cert_remove_msg": "S’ha eliminat el certificat del client", + "client_cert_subtitle": "Només admet el format PKCS12 (.p12, .pfx). La importació/eliminació de certificats només està disponible abans d’iniciar sessió", + "client_cert_title": "Certificat de client SSL [EXPERIMENTAL]", "close": "Tanca", - "collapse": "Tanca", - "collapse_all": "Redueix-ho tot", + "collapse": "Contrau", + "collapse_all": "Contrau-ho tot", "color": "Color", "command": "Ordre", - "command_palette_prompt": "Trobar ràpidament pàgines, accions o comandes", + "command_palette_prompt": "Trobeu ràpidament pàgines, accions o ordres", "command_palette_to_close": "per a tancar", "command_palette_to_navigate": "per a introduir", "command_palette_to_select": "per a seleccionar", "command_palette_to_show_all": "per a mostrar-ho tot", - "comment_deleted": "Comentari esborrat", - "comment_options": "Opcions de comentari", + "comment_deleted": "Comentari suprimit", + "comment_options": "Opcions del comentari", "comments_and_likes": "Comentaris i agradaments", "comments_are_disabled": "Els comentaris estan desactivats", "common_create_new_album": "Crea un àlbum nou", "completed": "Completat", "configuration": "Configuració", - "confirm": "Confirmar", - "confirm_admin_password": "Confirmeu la contrasenya d'administrador", - "confirm_delete_face": "Estàs segur que vols eliminar la cara de {name} de les cares reconegudes?", - "confirm_delete_shared_link": "Esteu segurs que voleu eliminar aquest enllaç compartit?", - "confirm_keep_this_delete_others": "Excepte aquest element, tots els altres de la pila se suprimiran. Esteu segur que voleu continuar?", - "confirm_new_pin_code": "Confirma el nou codi PIN", - "confirm_password": "Confirmació de contrasenya", - "confirm_tag_face": "Vols etiquetar aquesta cara com a {name}?", - "confirm_tag_face_unnamed": "Com vols etiquetar aquesta cara?", + "confirm": "Confirma", + "confirm_admin_password": "Confirmeu la contrasenya d’administrador", + "confirm_delete_face": "Segur que voleu suprimir la cara de {name} del recurs?", + "confirm_delete_shared_link": "Segur que voleu suprimir aquest enllaç compartit?", + "confirm_keep_this_delete_others": "Excepte aquest recurs, la resta de recursos de la pila se suprimiran. Segur que voleu continuar?", + "confirm_new_pin_code": "Confirmeu el nou codi PIN", + "confirm_password": "Confirmeu la contrasenya", + "confirm_tag_face": "Voleu etiquetar aquesta cara com a {name}?", + "confirm_tag_face_unnamed": "Voleu etiquetar aquesta cara?", "connected_device": "Dispositiu connectat", "connected_to": "Connectat a", "contain": "Contingut", "context": "Context", - "continue": "Continuar", + "continue": "Continua", "control_bottom_app_bar_add_tags": "Afegeix etiquetes", "control_bottom_app_bar_delete_from_local": "Suprimeix del dispositiu", "control_bottom_app_bar_edit_location": "Edita la ubicació", - "control_bottom_app_bar_edit_time": "Edita data i hora", - "control_bottom_app_bar_trash_from_immich": "Mou a paperera", - "copied_image_to_clipboard": "Imatge copiada a porta-retalls.", - "copied_to_clipboard": "Copiada a porta-retalls!", - "copy_error": "Error de còpia", - "copy_image": "Còpia imatge", + "control_bottom_app_bar_edit_time": "Edita la data i l’hora", + "control_bottom_app_bar_trash_from_immich": "Mou a la paperera", + "copied_image_to_clipboard": "S’ha copiat la imatge al porta-retalls.", + "copied_to_clipboard": "S’ha copiat al porta-retalls!", + "copy_error": "S’ha produït un error en copiar", + "copy_image": "Copia la imatge", "copy_json": "Copia el JSON", - "copy_link": "Còpia l'enllaç", - "copy_link_to_clipboard": "Còpia l'enllaç al porta-retalls", - "copy_password": "Còpia la contrasenya", - "copy_to_clipboard": "Copiar al porta-retalls", + "copy_link": "Copia l’enllaç", + "copy_link_to_clipboard": "Copia l’enllaç al porta-retalls", + "copy_password": "Copia la contrasenya", + "copy_to_clipboard": "Copia al porta-retalls", "country": "País", "cover": "Portada", "covers": "Portades", "create": "Crea", - "create_album": "Crear un àlbum", + "create_album": "Crea un àlbum", "create_album_page_untitled": "Sense títol", - "create_api_key": "Crear clau API", - "create_first_workflow": "Crea el primer flux de treball", - "create_library": "Crea una llibreria", - "create_link": "Crear enllaç", - "create_link_to_share": "Crear enllaç per compartir", - "create_link_to_share_description": "Deixa que qualsevol persona amb l'enllaç vegi les fotos seleccionades", - "create_new": "CREAR NOU", - "create_new_person": "Crea una nova persona", - "create_new_person_hint": "Assigna els elements seleccionats a una persona nova", + "create_api_key": "Crea una clau de l’API", + "create_first_workflow": "Creeu el primer flux de treball", + "create_library": "Crea una biblioteca", + "create_link": "Crea un enllaç", + "create_link_to_share": "Crea un enllaç per a compartir", + "create_link_to_share_description": "Permet que qualsevol persona amb l’enllaç vegi les fotos seleccionades", + "create_new": "CREA’N UN DE NOU", + "create_new_person": "Crea una persona nova", + "create_new_person_hint": "Assigna els recursos seleccionats a una persona nova", "create_new_user": "Crea un usuari nou", "create_person": "Crea una persona", - "create_person_subtitle": "Afegeix un nom a la cara seleccionada per crear i etiquetar la nova persona", - "create_shared_album_page_share_add_assets": "AFEGEIX ELEMENTS", - "create_shared_album_page_share_select_photos": "Escull fotografies", + "create_person_subtitle": "Afegeix un nom a la cara seleccionada per a crear i etiquetar la persona nova", + "create_shared_album_page_share_add_assets": "AFEGEIX RECURSOS", + "create_shared_album_page_share_select_photos": "Selecciona fotos", "create_shared_link": "Crea un enllaç compartit", - "create_tag": "Crear etiqueta", - "create_tag_description": "Crear una nova etiqueta. Per les etiquetes aniuades, escriu la ruta comperta de l'etiqueta, incloses les barres diagonals.", + "create_tag": "Crear una etiqueta", + "create_tag_description": "Crear una etiqueta nova. Per a etiquetes aniuades, introduïu el camí complet de l’etiqueta, incloent-hi les barres.", "create_user": "Crea un usuari", "create_workflow": "Crea un flux de treball", "created": "Creat", "created_at": "Creat", - "creating_linked_albums": "Creant àlbums enllaçats...", + "creating_linked_albums": "S’estan creant els àlbums enllaçats...", "crop": "Retalla", "crop_aspect_ratio_free": "Lliure", "crop_aspect_ratio_original": "Original", @@ -793,54 +813,53 @@ "current_server_address": "Adreça actual del servidor", "custom_date": "Data personalitzada", "custom_locale": "Localització personalitzada", - "custom_locale_description": "Format de dates i números segons la llengua i regió seleccionades", - "custom_url": "URL personalitzada", - "cutoff_date_description": "Manté fotos des de l'últim…", + "custom_locale_description": "Formata les dates, les hores i els números en base a la llengua i la regió seleccionades", + "cutoff_date_description": "Mantén les fotos dels darrers…", "cutoff_day": "{count, plural, one {dia} other {dies}}", "cutoff_year": "{count, plural, one {any} other {anys}}", "dark": "Fosc", - "dark_theme": "Canvia a tema fosc", + "dark_theme": "Canvia al tema fosc", "date": "Data", "date_after": "Data posterior a", "date_and_time": "Data i hora", "date_before": "Data anterior a", "date_of_birth": "Data de naixement", - "date_of_birth_saved": "Data de naixement guardada amb èxit", + "date_of_birth_saved": "S’ha desat la data de naixement correctament", "date_range": "Interval de dates", - "date_time_original": "Data/Hora original", + "date_time_original": "Data/hora original", "day": "Dia", "days": "Dies", "deduplicate_all": "Desduplica-ho tot", - "default_quality_subtitle": "Qualitat utilitzada a l’hora de tocar la compartició. Premeu el botó de compartir per triar cada vegada.", - "default_share_quality": "Qualitat de comparticio per defecte", - "delete": "Esborrar", - "delete_action_confirmation_message": "Segur que vols eliminar aquest recurs? Aquesta acció el mourà a la paperera del servidor, i et preguntarà si el vols eliminar localment", - "delete_action_prompt": "{count} eliminats", - "delete_album": "Esborra l'àlbum", - "delete_api_key_prompt": "Esteu segurs que voleu eliminar aquesta clau API?", - "delete_dialog_alert": "Aquests elements seran eliminats de manera permanent d'Immich i del vostre dispositiu", - "delete_dialog_alert_local": "Aquests elements s'eliminaran permanentment del vostre dispositiu, però encara estaran disponibles al servidor Immich", - "delete_dialog_alert_local_non_backed_up": "Alguns dels elements no tenen còpia de seguretat a Immich i s'eliminaran permanentment del dispositiu", - "delete_dialog_title": "Esborra permanentment", - "delete_duplicates_confirmation": "Esteu segurs que voleu eliminar aquests duplicats permanentment?", - "delete_face": "Esborrar cara", + "default_quality_subtitle": "Qualitat utilitzada quan es prem l’opció de compartició. Mantingueu premut el botó de compartir per a triar-ho cada vegada.", + "default_share_quality": "Qualitat de compartició per defecte", + "delete": "Suprimeix", + "delete_action_confirmation_message": "Segur que voleu suprimir aquest recurs? Aquesta acció el mourà a la paperera del servidor i us preguntarà si voleu eliminar-lo localment", + "delete_action_prompt": "{count} suprimits", + "delete_album": "Suprimeix l’àlbum", + "delete_api_key_prompt": "Segur que voleu suprimir aquesta clau de l’API?", + "delete_dialog_alert": "Aquests elements se suprimiran permanentment de l’Immich i del vostre dispositiu", + "delete_dialog_alert_local": "Aquests elements se suprimiran permanentment del vostre dispositiu, però romandran disponibles al servidor de l’Immich", + "delete_dialog_alert_local_non_backed_up": "Alguns elements no tenen còpia al servidor de l’Immich i se suprimiran permanentment del dispositiu", + "delete_dialog_title": "Suprimeix permanentment", + "delete_duplicates_confirmation": "Segur que voleu suprimir permanentment aquests duplicats?", + "delete_face": "Suprimeix la cara", "delete_key": "Suprimeix la clau", - "delete_library": "Suprimeix la Llibreria", - "delete_link": "Esborra l'enllaç", - "delete_local_action_prompt": "{count} eliminats localment", - "delete_local_dialog_ok_backed_up_only": "Esborrar només les que tinguin còpia de seguretat", - "delete_local_dialog_ok_force": "Suprimeix de totes maneres", - "delete_others": "Suprimeix altres", - "delete_permanently": "Eliminar permanentment", - "delete_permanently_action_prompt": "{count} eliminats permanentment", - "delete_shared_link": "Odstranit sdílený odkaz", - "delete_shared_link_dialog_title": "Suprimeix l'enllaç compartit", - "delete_tag": "Eliminar etiqueta", - "delete_tag_confirmation_prompt": "Estàs segur que vols eliminar l'etiqueta {tagName}?", - "delete_user": "Suprimeix l'usuari", - "deleted_shared_link": "Suprimeix l'enllaç compartit", + "delete_library": "Suprimeix la biblioteca", + "delete_link": "Suprimeix l’enllaç", + "delete_local_action_prompt": "{count} suprimits localment", + "delete_local_dialog_ok_backed_up_only": "Suprimeix només els que tinguin còpia al servidor", + "delete_local_dialog_ok_force": "Suprimeix igualment", + "delete_others": "Suprimeix els altres", + "delete_permanently": "Suprimeix permanentment", + "delete_permanently_action_prompt": "{count} suprimits permanentment", + "delete_shared_link": "Suprimeix l’enllaç compartit", + "delete_shared_link_dialog_title": "Suprimeix l’enllaç compartit", + "delete_tag": "Suprimeix l’etiqueta", + "delete_tag_confirmation_prompt": "Segur que voleu suprimir l’etiqueta {tagName}?", + "delete_user": "Suprimeix l’usuari", + "deleted_shared_link": "Suprimeix l’enllaç compartit", "description": "Descripció", - "deselect_all": "Deseleccionar Tots", + "deselect_all": "Deselecciona-ho tot", "details": "Detalls", "direction": "Direcció", "disable": "Desactiva", @@ -851,1072 +870,1088 @@ "dismiss_all_errors": "Descarta tots els errors", "display_options": "Opcions de visualització", "display_order": "Ordre de visualització", - "display_original_photos": "Mostra les fotografies originals", - "display_original_photos_setting_description": "Preferiu mostrar la foto original quan visualitzeu un recurs en lloc de miniatures quan el recurs original és compatible amb el web. Això pot provocar una velocitat de visualització de fotos més lenta.", + "display_original_photos": "Mostra les fotos originals", + "display_original_photos_setting_description": "Prefereix mostrar la foto original en visualitzar un recurs en lloc de miniatures quan el recurs original és compatible amb el web. Això pot provocar una velocitat de visualització de fotos més lenta.", "do_not_show_again": "No tornis a mostrar aquest missatge", "documentation": "Documentació", "done": "Fet", - "download": "Descarregar", - "download_canceled": "Descàrrega cancel·lada", - "download_complete": "Descàrrega completada", - "download_enqueue": "Descàrrega en cua", - "download_failed": "Descàrrega ha fallat", - "download_finished": "Descàrrega acabada", + "download": "Baixa", + "download_canceled": "S’ha cancel·lat la baixada", + "download_complete": "S’ha completat la baixada", + "download_enqueue": "S’ha afegit la baixada a la cua", + "download_failed": "S’ha produït un error en la baixada", + "download_finished": "S’ha finalitzat la baixada", "download_include_embedded_motion_videos": "Vídeos incrustats", - "download_include_embedded_motion_videos_description": "Incloure vídeos incrustats en fotografies en moviment com un arxiu separat", - "download_notfound": "No s'ha trobat la descàrrega", - "download_original": "Descarregar original", - "download_paused": "Descàrrega pausada", - "download_settings": "Descarregar", - "download_settings_description": "Gestioneu la configuració relacionada amb la descàrrega de recursos", - "download_waiting_to_retry": "Esperant per tornar-ho a intentar", - "downloading": "Baixant", - "downloading_asset_filename": "Descarregant l'element {filename}", - "downloading_from_icloud": "Descarregant des d'iCloud", - "downloading_media": "Descàrrega multimèdia", - "drag_to_reorder": "Arrossegueu per reordenar", - "drop_files_to_upload": "Deixeu els fitxers a qualsevol lloc per pujar-los", + "download_include_embedded_motion_videos_description": "Inclou els vídeos incrustats en fotos en moviment com a fitxers separats", + "download_notfound": "No s’ha trobat la baixada", + "download_original": "Baixa l’original", + "download_paused": "S’ha pausat la baixada", + "download_settings": "Baixades", + "download_settings_description": "Gestioneu la configuració relacionada amb les baixades de recursos", + "download_waiting_to_retry": "S’està esperant per a tornar-ho a provar", + "downloading": "S’està baixant", + "downloading_asset_filename": "S’està baixant el recurs {filename}", + "downloading_from_icloud": "S’està baixant de l’iCloud", + "downloading_media": "S’està baixant el mitjà", + "drag_to_reorder": "Arrossegueu per a reordenar", + "drop_files_to_upload": "Deixeu anar fitxers a qualsevol lloc per a pujar-los", "duplicate": "Duplica", "duplicate_workflow": "Duplica el flux de treball", "duplicates": "Duplicats", - "duplicates_description": "Resol cada grup indicant, si n'hi ha, quins són duplicats.", + "duplicates_description": "Resoleu cada grup indicant quins són els duplicats, si n’hi ha.", "duration": "Durada", - "edit": "Editar", - "edit_album": "Edita l'àlbum", - "edit_avatar": "Edita l'avatar", - "edit_birthday": "Edita l'aniversari", + "edit": "Edita", + "edit_album": "Edita l’àlbum", + "edit_avatar": "Edita l’avatar", + "edit_birthday": "Edita la data de naixement", "edit_date": "Edita la data", - "edit_date_and_time": "Edita la data i l'hora", + "edit_date_and_time": "Edita la data i l’hora", "edit_date_and_time_action_prompt": "{count} dates i hores editades", - "edit_date_and_time_by_offset": "Canvia la data mitjançant diferència", + "edit_date_and_time_by_offset": "Canvia la data de manera relativa", "edit_description": "Edita la descripció", - "edit_exclusion_pattern": "Edita patró d'exclusió", + "edit_exclusion_pattern": "Edita el patró d’exclusió", "edit_faces": "Edita les cares", - "edit_key": "Edita clau", - "edit_link": "Edita enllaç", - "edit_location": "Edita ubicació", + "edit_key": "Edita la clau", + "edit_link": "Edita l’enllaç", + "edit_location": "Edita la ubicació", "edit_location_action_prompt": "{count} ubicacions editades", "edit_location_dialog_title": "Ubicació", "edit_name": "Edita el nom", - "edit_people": "Edita la gent", - "edit_tag": "Edita etiqueta", - "edit_title": "Edita títol", - "edit_user": "Edita l'usuari", + "edit_people": "Edita les persones", + "edit_tag": "Edita l’etiqueta", + "edit_title": "Edita el títol", + "edit_user": "Edita l’usuari", "edit_workflow": "Edita el flux de treball", "editor": "Editor", "editor_discard_edits_confirm": "Descarta les modificacions", - "editor_discard_edits_prompt": "Tens modificacions sense desar. Estàs segur que les vols descartar?", - "editor_discard_edits_title": "Vols descartar les modificacions?", - "editor_edits_applied_error": "No s'han pogut aplicar les modificacions", - "editor_edits_applied_success": "Les modificacions s'han aplicat correctament", + "editor_discard_edits_prompt": "Teniu modificacions sense desar. Segur que les voleu descartar?", + "editor_discard_edits_title": "Voleu descartar les modificacions?", + "editor_edits_applied_error": "No s’han pogut aplicar les modificacions", + "editor_edits_applied_success": "Les modificacions s’han aplicat correctament", "editor_flip_horizontal": "Capgira horitzontalment", "editor_flip_vertical": "Capgira verticalment", - "editor_handle_corner": "{corner, select, top_left {Top-left} top_right {Top-right} bottom_left {Bottom-left} bottom_right {Bottom-right} other {A}} cantó per agafar", - "editor_handle_edge": "{edge, select, top {Top} bottom {Bottom} left {Left} right {Right} other {An}} cantó per agafar", + "editor_handle_corner": "Cantó per a agafar{corner, select, top_left { superior esquerre} top_right { superior dret} bottom_left { inferior esquerre} bottom_right { inferior dret} other {}}", + "editor_handle_edge": "Vora{edge, select, top { superior} bottom { inferior} left { esquerra} right { dreta} other {}} per a agafar", "editor_orientation": "Orientació", - "editor_reset_all_changes": "Reiniciar canvis", - "editor_rotate_left": "Rota 90º al contrari de les agulles", - "editor_rotate_right": "Rota 90º en el sentit de les agulles", - "email": "Correu electrònic", - "email_notifications": "Correu electrònic de notificacions", + "editor_reset_all_changes": "Restableix els canvis", + "editor_rotate_left": "Gira 90° en sentit antihorari", + "editor_rotate_right": "Gira 90° en sentit horari", + "email": "Adreça electrònica", + "email_notifications": "Notificacions per correu electrònic", "empty_folder": "Aquesta carpeta és buida", - "empty_trash": "Buidar la paperera", - "empty_trash_confirmation": "Esteu segur que voleu buidar la paperera? Això eliminarà tots els recursos a la paperera permanentment d'Immich.\nNo podeu desfer aquesta acció!", - "enable": "Activar", - "enable_backup": "Còpia de Seguretat", - "enable_biometric_auth_description": "Introduïu el codi PIN per a habilitar l'autenticació biomètrica", + "empty_trash": "Buida la paperera", + "empty_trash_confirmation": "Segur que voleu buidar la paperera? Se suprimiran permanentment de l’Immich tots els recursos de la paperera.\nAquesta acció no es pot desfer!", + "enable": "Activa", + "enable_backup": "Activa la còpia al servidor", + "enable_biometric_auth_description": "Introduïu el codi PIN per a activar l’autenticació biomètrica", "enabled": "Activat", - "end_date": "Data final", - "enqueued": "En cua", - "enter_wifi_name": "Introdueix el nom de Wi-Fi", + "end_date": "Data de final", + "enqueued": "A la cua", + "enter_wifi_name": "Introdueix el nom de la Wi-Fi", "enter_your_pin_code": "Introduïu el codi PIN", "enter_your_pin_code_subtitle": "Introduïu el codi PIN per a accedir a la carpeta protegida", "error": "Error", - "error_delete_face": "Error esborrant cara de les cares reconegudes", - "error_loading_albums": "Error en carregar àlbums", - "error_loading_image": "Error carregant la imatge", - "error_loading_partners": "No s'han pogut carregar les parelles: {error}", - "error_retrieving_asset_information": "Error en recuperar la informació de l'actiu", - "error_saving_image": "Error: {error}", - "error_tag_face_bounding_box": "Error a l'etiquetar la cara - no s'han pogut obtenir les coordenades de l'àrea", - "error_title": "Error - Quelcom ha anat malament", - "error_while_navigating": "Error en navegar fins a l'actiu", + "error_delete_face": "S’ha produït un error en suprimir la cara del recurs", + "error_loading_albums": "S’ha produït un error en carregar els àlbums", + "error_loading_image": "S’ha produït un error en carregar la imatge", + "error_loading_partners": "S’ha produït un error en carregar els companys: {error}", + "error_retrieving_asset_information": "S’ha produït un error en obtenir la informació del recurs", + "error_saving_image": "S’ha produït un error: {error}", + "error_tag_face_bounding_box": "S’ha produït un error en etiquetar la cara: no s’han pogut obtenir les coordenades de l’àrea", + "error_title": "Error - Alguna cosa ha anat malament", + "error_while_navigating": "S’ha produït un error en navegar fins al recurs", "errors": { - "cannot_navigate_next_asset": "No es pot navegar a l'element següent", - "cannot_navigate_previous_asset": "No es pot navegar a l'element anterior", + "cannot_navigate_next_asset": "No es pot navegar al recurs següent", + "cannot_navigate_previous_asset": "No es pot navegar al recurs anterior", "cant_apply_changes": "No es poden aplicar els canvis", "cant_change_activity": "No es pot {enabled, select, true {desactivar} other {activar}} aquesta activitat", - "cant_change_asset_favorite": "No es pot canviar el favorit per a aquest recurs", - "cant_change_metadata_assets_count": "No es poden canviar les metadades {count, plural, one {de l'element} other {dels # elements}}", + "cant_change_asset_favorite": "No es pot canviar l’estat de preferit d’aquest recurs", + "cant_change_metadata_assets_count": "No es poden canviar les metadades {count, plural, one {del recurs} other {dels # recursos}}", "cant_get_faces": "No es poden obtenir les cares", "cant_get_number_of_comments": "No es pot obtenir el nombre de comentaris", "cant_search_people": "No es poden cercar persones", "cant_search_places": "No es poden cercar llocs", - "error_adding_assets_to_album": "Error afegint elements a l'àlbum", - "error_adding_users_to_album": "Error afegint usuaris a l'àlbum", - "error_deleting_shared_user": "S'ha produït un error en suprimir l'usuari compartit", - "error_downloading": "Error descarregant {filename}", - "error_hiding_buy_button": "S'ha produït un error en amagar el botó de compra", - "error_removing_assets_from_album": "Error eliminant els elements de l'àlbum, consulteu la consola per obtenir més detalls", - "error_selecting_all_assets": "Error seleccionant tots els elements", + "error_adding_assets_to_album": "S’ha produït un error en afegir els recursos a l’àlbum", + "error_adding_users_to_album": "S’ha produït un error en afegir els usuaris a l’àlbum", + "error_deleting_shared_user": "S’ha produït un error en suprimir l’usuari compartit", + "error_downloading": "S’ha produït un error en baixar {filename}", + "error_hiding_buy_button": "S’ha produït un error en amagar el botó de compra", + "error_removing_assets_from_album": "S’ha produït un error en eliminar els recursos l’àlbum; consulteu la consola per a més detalls", + "error_selecting_all_assets": "S’ha produït un error en seleccionar tots els recursos", "exclusion_pattern_already_exists": "Aquest patró d’exclusió ja existeix.", - "failed_to_create_album": "No s'ha pogut crear l'àlbum", - "failed_to_create_shared_link": "No s'ha pogut crear l'enllaç compartit", - "failed_to_edit_shared_link": "No s'ha pogut editar l'enllaç compartit", - "failed_to_get_people": "No s'han pogut aconseguir persones", - "failed_to_keep_this_delete_others": "No s'ha pogut conservar aquest element i suprimir els altres", - "failed_to_load_asset": "No s'ha pogut carregar l'element", - "failed_to_load_assets": "No s'han pogut carregar els elements", - "failed_to_load_notifications": "Error en carregar les notificacions", - "failed_to_load_people": "No s'han pogut carregar les persones", - "failed_to_remove_product_key": "No s'ha pogut eliminar la clau del producte", - "failed_to_reset_pin_code": "No s'ha pogut reiniciar el codi PIN", - "failed_to_stack_assets": "No s'han pogut apilar els elements", - "failed_to_tag_assets": "Ha fallat l'assignació d'etiquetes", - "failed_to_unstack_assets": "No s'han pogut desapilar els elements", - "failed_to_update_notification_status": "Error en actualitzar l'estat de les notificacions", - "incorrect_email_or_password": "Correu electrònic o contrasenya incorrectes", - "library_folder_already_exists": "Aquesta ruta d'importació ja existeix.", - "page_not_found": "Pàgina no trobada", - "paths_validation_failed": "{paths, plural, one {# ruta} other {# rutes}} no ha pogut validar", - "profile_picture_transparent_pixels": "Les fotos de perfil no poden tenir píxels transparents. Per favor, feu zoom in, mogueu la imatge o ambdues.", - "quota_higher_than_disk_size": "Heu establert una quota més gran que la mida de disc", + "failed_to_create_album": "No s’ha pogut crear l’àlbum", + "failed_to_create_shared_link": "No s’ha pogut crear l’enllaç compartit", + "failed_to_edit_shared_link": "No s’ha pogut editar l’enllaç compartit", + "failed_to_get_people": "No s’han pogut obtenir les persones", + "failed_to_keep_this_delete_others": "No s’ha pogut conservar aquest recurs i suprimir la resta", + "failed_to_load_asset": "No s’ha pogut carregar el recurs", + "failed_to_load_assets": "No s’han pogut carregar els recursos", + "failed_to_load_notifications": "S’ha produït un error en carregar les notificacions", + "failed_to_load_people": "No s’han pogut carregar les persones", + "failed_to_remove_product_key": "No s’ha pogut suprimir la clau del producte", + "failed_to_reset_pin_code": "No s’ha pogut restablir el codi PIN", + "failed_to_stack_assets": "No s’han pogut apilar els recursos", + "failed_to_tag_assets": "No s’han pogut etiquetar els recursos", + "failed_to_unstack_assets": "No s’han pogut desapilar els recursos", + "failed_to_update_notification_status": "No s’ha pogut actualitzar l’estat de les notificacions", + "incorrect_email_or_password": "Adreça electrònica o contrasenya incorrectes", + "library_folder_already_exists": "Aquest camí d’importació ja existeix.", + "page_not_found": "No s’ha trobat la pàgina", + "paths_validation_failed": "No {paths, plural, one {s’ha pogut validar # camí} other {s’han pogut validar # camins}}", + "profile_picture_transparent_pixels": "Les fotos de perfil no poden tenir píxels transparents. Amplieu i/o moveu la imatge.", + "quota_higher_than_disk_size": "Heu definit quota més gran que la mida del disc", "something_went_wrong": "Alguna cosa ha anat malament", - "unable_to_add_album_users": "No es poden afegir usuaris a l'àlbum", - "unable_to_add_assets_to_shared_link": "No s'han pogut afegir els elements a l'enllaç compartit", - "unable_to_add_comment": "No es pot afegir el comentari", - "unable_to_add_exclusion_pattern": "No s'ha pogut afegir el patró d’exclusió", - "unable_to_add_partners": "No es poden afegir companys", - "unable_to_add_remove_archive": "No s'ha pogut {archived, select, true {eliminar l'element de} other {afegir l'element a}} l'arxiu", - "unable_to_add_remove_favorites": "No s'ha pogut {favorite, select, true {afegir l'element als} other {eliminar l'element dels}} preferits", - "unable_to_archive_unarchive": "No es pot {archived, select, true {arxivar} other {desarxivar}}", - "unable_to_change_album_user_role": "No es pot canviar el rol d'usuari de l'àlbum", - "unable_to_change_date": "No es pot canviar la data", - "unable_to_change_description": "No s'ha pogut canviar la descripció", - "unable_to_change_favorite": "No es pot canviar el favorit per a aquest recurs", - "unable_to_change_location": "No es pot canviar la ubicació", - "unable_to_change_password": "No es pot canviar la contrasenya", - "unable_to_change_visibility": "No es pot canviar la visibilitat de {count, plural, one {# persona} other {# persones}}", - "unable_to_complete_oauth_login": "No es pot completar l'inici de sessió OAuth", - "unable_to_connect": "No pot connectar", - "unable_to_copy_to_clipboard": "No es pot copiar al porta-retalls, assegureu-vos que esteu accedint a la pàgina mitjançant https", - "unable_to_create": "No s'ha pogut crear el flux de treball", - "unable_to_create_admin_account": "No es pot crear un compte d'administrador", - "unable_to_create_api_key": "No es pot crear una clau d'API nova", - "unable_to_create_library": "No es pot crear la llibreria", - "unable_to_create_user": "No es pot crear l'usuari", - "unable_to_delete_album": "No es pot eliminar l'àlbum", - "unable_to_delete_asset": "No es pot suprimir el recurs", - "unable_to_delete_assets": "S'ha produït un error en suprimir recursos", - "unable_to_delete_exclusion_pattern": "No es pot suprimir el patró d'exclusió", - "unable_to_delete_shared_link": "No es pot suprimir l'enllaç compartit", - "unable_to_delete_user": "No es pot eliminar l'usuari", - "unable_to_delete_workflow": "No es pot suprimir el flux de treball", - "unable_to_download_files": "No es poden descarregar fitxers", - "unable_to_edit_exclusion_pattern": "No es pot editar el patró d'exclusió", - "unable_to_empty_trash": "No es pot buidar la paperera", - "unable_to_enter_fullscreen": "No es pot entrar a la pantalla completa", - "unable_to_exit_fullscreen": "No es pot sortir de la pantalla completa", - "unable_to_get_comments_number": "No es pot obtenir el nombre de comentaris", - "unable_to_get_shared_link": "No s'ha pogut obtenir l'enllaç compartit", - "unable_to_hide_person": "No es pot amagar la persona", - "unable_to_link_motion_video": "No es pot enllaçar el vídeo en moviment", - "unable_to_link_oauth_account": "No es pot enllaçar el compte OAuth", - "unable_to_log_out_all_devices": "No es poden tancar la sessió de tots els dispositius", - "unable_to_log_out_device": "No es pot tancar la sessió del dispositiu", - "unable_to_login_with_oauth": "No es pot iniciar sessió amb OAuth", - "unable_to_play_video": "No es pot reproduir el vídeo", - "unable_to_reassign_assets_existing_person": "No es poden reassignar recursos a {name, select, null {una persona existent} other {{name}}}", - "unable_to_reassign_assets_new_person": "No es poden reassignar recursos a una persona nova", - "unable_to_refresh_user": "No es pot actualitzar l'usuari", - "unable_to_remove_album_users": "No es poden eliminar usuaris de l'àlbum", - "unable_to_remove_api_key": "No es pot eliminar la clau de l'API", - "unable_to_remove_assets_from_shared_link": "No es poden eliminar recursos de l'enllaç compartit", - "unable_to_remove_library": "No es pot eliminar la biblioteca", - "unable_to_remove_partner": "No es pot eliminar company/a", - "unable_to_remove_reaction": "No es pot eliminar la reacció", - "unable_to_reset_password": "No es pot restablir la contrasenya", - "unable_to_reset_pin_code": "No es pot restablir el codi PIN", - "unable_to_resolve_duplicate": "No es pot resoldre el duplicat", - "unable_to_restore_assets": "No es poden restaurar els recursos", - "unable_to_restore_trash": "No es pot restaurar la paperera", - "unable_to_restore_user": "No es pot restaurar l'usuari", - "unable_to_save_album": "No es pot desar l'àlbum", - "unable_to_save_api_key": "No es pot desar la clau de l'API", - "unable_to_save_date_of_birth": "No es pot desar la data de naixement", - "unable_to_save_name": "No es pot desar el nom", - "unable_to_save_profile": "No es pot desar el perfil", - "unable_to_save_settings": "No es pot desar la configuració", - "unable_to_scan_libraries": "No es poden escanejar les biblioteques", - "unable_to_scan_library": "No es pot escanejar la biblioteca", - "unable_to_set_feature_photo": "No s'ha pogut configurar la foto destacada", - "unable_to_set_profile_picture": "No es pot configurar la foto de perfil", - "unable_to_set_rating": "No s'ha pogut establir la valoració", - "unable_to_submit_job": "No es pot enviar la tasca", - "unable_to_trash_asset": "No es pot eliminar el recurs a la paperera", - "unable_to_unlink_account": "No es pot desenllaçar el compte", - "unable_to_unlink_motion_video": "No es pot desvincular el vídeo en moviment", - "unable_to_update_album_cover": "No es pot actualitzar la portada de l'àlbum", - "unable_to_update_album_info": "No es pot actualitzar la informació de l'àlbum", - "unable_to_update_library": "No es pot actualitzar la biblioteca", - "unable_to_update_location": "No es pot actualitzar la ubicació", - "unable_to_update_settings": "No es pot actualitzar la configuració", - "unable_to_update_timeline_display_status": "No es pot actualitzar l'estat de visualització de la cronologia", - "unable_to_update_user": "No es pot actualitzar l'usuari", + "unable_to_add_album_users": "No s’han pogut afegir els usuaris a l’àlbum", + "unable_to_add_assets_to_shared_link": "No s’han pogut afegir els recursos a l’enllaç compartit", + "unable_to_add_comment": "No s’ha pogut afegir el comentari", + "unable_to_add_exclusion_pattern": "No s’ha pogut afegir el patró d’exclusió", + "unable_to_add_partners": "No s’han pogut afegir companys", + "unable_to_add_remove_archive": "No s’ha pogut {archived, select, true {eliminar l’element de} other {afegir l’element a}} l’arxiu", + "unable_to_add_remove_favorites": "No s’ha pogut {favorite, select, true {afegir l’element als} other {eliminar l’element dels}} preferits", + "unable_to_archive_unarchive": "No s’ha pogut {archived, select, true {arxivar} other {desarxivar}}", + "unable_to_change_album_user_role": "No s’ha pogut canviar el rol de l’usuari de l’àlbum", + "unable_to_change_date": "No s’ha pogut canviar la data", + "unable_to_change_description": "No s’ha pogut canviar la descripció", + "unable_to_change_favorite": "No s’ha pogut canviar l’estat de favorit d’aquest recurs", + "unable_to_change_location": "No s’ha pogut canviar la ubicació", + "unable_to_change_password": "No s’ha pogut canviar la contrasenya", + "unable_to_change_visibility": "No s’ha pogut canviar la visibilitat {count, plural, one {d’# persona} other {de # persones}}", + "unable_to_complete_oauth_login": "No s’ha pogut completar l’inici de sessió amb OAuth", + "unable_to_connect": "No s’ha pogut connectar", + "unable_to_copy_to_clipboard": "No s’ha pogut copiar al porta-retalls; assegureu-vos que accediu a la pàgina mitjançant https", + "unable_to_create": "No s’ha pogut crear el flux de treball", + "unable_to_create_admin_account": "No s’ha pogut crear el compte d’administrador", + "unable_to_create_api_key": "No s’ha pogut crear una clau de l’API nova", + "unable_to_create_library": "No s’ha pogut crear la biblioteca", + "unable_to_create_user": "No s’ha pogut crear l’usuari", + "unable_to_delete_album": "No s’ha pogut suprimir l’àlbum", + "unable_to_delete_asset": "No s’ha pogut suprimir el recurs", + "unable_to_delete_assets": "S’ha produït un error en suprimir els recursos", + "unable_to_delete_exclusion_pattern": "No s’ha pogut suprimir el patró d’exclusió", + "unable_to_delete_shared_link": "No s’ha pogut suprimir l’enllaç compartit", + "unable_to_delete_user": "No s’ha pogut suprimir l’usuari", + "unable_to_delete_workflow": "No s’ha pogut suprimir el flux de treball", + "unable_to_download_files": "No s’han pogut baixar els fitxers", + "unable_to_edit_exclusion_pattern": "No s’ha pogut editar el patró d’exclusió", + "unable_to_empty_trash": "No s’ha pogut buidar la paperera", + "unable_to_enter_fullscreen": "No s’ha pogut posar en pantalla completa", + "unable_to_exit_fullscreen": "No s’ha pogut sortir de la pantalla completa", + "unable_to_get_comments_number": "No s’ha pogut obtenir el nombre de comentaris", + "unable_to_get_shared_link": "No s’ha pogut obtenir l’enllaç compartit", + "unable_to_hide_person": "No s’ha pogut amagar la persona", + "unable_to_link_motion_video": "No s’ha pogut enllaçar el vídeo en moviment", + "unable_to_link_oauth_account": "No s’ha pogut enllaçar el compte d’OAuth", + "unable_to_log_out_all_devices": "No s’ha pogut tancar la sessió en tots els dispositius", + "unable_to_log_out_device": "No s’ha pogut tancar la sessió del dispositiu", + "unable_to_login_with_oauth": "No s’ha pogut iniciar sessió amb OAuth", + "unable_to_play_video": "No s’ha pogut reproduir el vídeo", + "unable_to_reassign_assets_existing_person": "No s’han pogut reassignar els recursos a {name, select, null {una persona existent} other {{name}}}", + "unable_to_reassign_assets_new_person": "No s’han pogut reassignar els recursos a una persona nova", + "unable_to_refresh_user": "No s’ha pogut actualitzar l’usuari", + "unable_to_remove_album_users": "No s’han pogut eliminar els usuaris de l’àlbum", + "unable_to_remove_api_key": "No s’ha pogut suprimir la clau de l’API", + "unable_to_remove_assets_from_shared_link": "No s’han pogut eliminar els recursos de l’enllaç compartit", + "unable_to_remove_library": "No s’ha pogut suprimir la biblioteca", + "unable_to_remove_partner": "No s’ha pogut suprimir el company", + "unable_to_remove_reaction": "No s’ha pogut suprimir la reacció", + "unable_to_reset_password": "No s’ha pogut restablir la contrasenya", + "unable_to_reset_pin_code": "No s’ha pogut restablir el codi PIN", + "unable_to_resolve_duplicate": "No s’ha pogut resoldre el duplicat", + "unable_to_restore_assets": "No s’han pogut restaurar els recursos", + "unable_to_restore_trash": "No s’ha pogut restaurar la paperera", + "unable_to_restore_user": "No s’ha pogut restaurar l’usuari", + "unable_to_save_album": "No s’ha pogut desar l’àlbum", + "unable_to_save_api_key": "No s’ha pogut desar la clau de l’API", + "unable_to_save_date_of_birth": "No s’ha pogut desar la data de naixement", + "unable_to_save_name": "No s’ha pogut desar el nom", + "unable_to_save_profile": "No s’ha pogut desar el perfil", + "unable_to_save_settings": "No s’ha pogut desar la configuració", + "unable_to_scan_libraries": "No s’han pogut escanejar les biblioteques", + "unable_to_scan_library": "No s’ha pogut escanejar la biblioteca", + "unable_to_set_feature_photo": "No s’ha pogut definir la foto destacada", + "unable_to_set_profile_picture": "No s’ha pogut definir la foto de perfil", + "unable_to_set_rating": "No s’ha pogut establir la puntuació", + "unable_to_submit_job": "No s’ha pogut enviar la tasca", + "unable_to_trash_asset": "No s’ha pogut enviar el recurs a la paperera", + "unable_to_unlink_account": "No s’ha pogut desenllaçar el compte", + "unable_to_unlink_motion_video": "No s’ha pogut desenllaçar el vídeo en moviment", + "unable_to_update_album_cover": "No s’ha pogut actualitzar la portada de l’àlbum", + "unable_to_update_album_info": "No s’ha pogut actualitzar la informació de l’àlbum", + "unable_to_update_library": "No s’ha pogut actualitzar la biblioteca", + "unable_to_update_location": "No s’ha pogut actualitzar la ubicació", + "unable_to_update_settings": "No s’ha pogut actualitzar la configuració", + "unable_to_update_timeline_display_status": "No s’ha pogut actualitzar l’estat de visualització de la cronologia", + "unable_to_update_user": "No s’ha pogut actualitzar l’usuari", "unable_to_update_workflow": "No es pot actualitzar el flux de treball", "unable_to_upload_file": "No es pot carregar el fitxer" }, "errors_text": "Errors", - "exclusion_pattern": "Patró d'exclusió", + "exclusion_pattern": "Patró d’exclusió", "exif": "Exif", - "exif_bottom_sheet_description": "Afegeix descripció...", - "exif_bottom_sheet_description_error": "No s'ha pogut actualitzar la descripció", + "exif_bottom_sheet_description": "Afegiu una descripció...", + "exif_bottom_sheet_description_error": "No s’ha pogut actualitzar la descripció", "exif_bottom_sheet_no_description": "Sense descripció", - "exit_slideshow": "Surt de la presentació de diapositives", - "expand": "Ampliar-ho", - "expand_all": "Ampliar-ho tot", + "exit_slideshow": "Surt de la presentació", + "expand": "Expandeix", + "expand_all": "Expandeix-ho tot", "expire_after": "Caduca després de", "expired": "Caducat", "expires_date": "Caduca el {date}", - "explore": "Explorar", + "explore": "Explora", "explorer": "Explorador", "export": "Exporta", - "export_as_json": "Exportar com a JSON", - "export_database": "Exportar base de dades", - "export_database_description": "Exportar la base de dades SQLite", - "exposure_time": "Temps d'exposició", + "export_as_json": "Exporta com a JSON", + "export_database": "Exporta la base de dades", + "export_database_description": "Exporta la base de dades SQLite", + "exposure_time": "Temps d’exposició", "extension": "Extensió", "external": "Extern", - "external_libraries": "Llibreries externes", + "external_libraries": "Biblioteques externes", "external_network": "Xarxa externa", - "external_network_sheet_info": "Quan no estigui a la xarxa Wi-Fi preferida, l'aplicació es connectarà al servidor mitjançant el primer dels URL següents a què pot arribar, començant de dalt a baix", + "external_network_sheet_info": "Quan no sigueu a la xarxa Wi-Fi preferida, l’aplicació es connectarà al servidor mitjançant el primer dels URL següents a què pugui arribar, començant de dalt a baix", "f_number": "Obertura", - "face_unassigned": "Sense assignar", - "failed": "Fallat", + "face_unassigned": "No assignada", + "failed": "Fallit", "failed_count": "Fallits: {count}", - "failed_to_authenticate": "No s'ha pogut autenticar", - "failed_to_delete_file": "No s'ha pogut esborrar el fitxer", - "failed_to_load_assets": "Error carregant recursos", - "failed_to_load_folder": "No s'ha pogut carregar la carpeta", + "failed_to_authenticate": "No s’ha pogut autenticar", + "failed_to_delete_file": "No s’ha pogut suprimir el fitxer", + "failed_to_load_assets": "No s’han pogut carregar els recursos", + "failed_to_load_folder": "No s’ha pogut carregar la carpeta", "favorite": "Preferit", - "favorite_action_prompt": "{count} afegit a Favorits", - "favorite_or_unfavorite_photo": "Foto preferida o no preferida", + "favorite_action_prompt": "{count} afegit a preferits", + "favorite_or_unfavorite_photo": "Afegeix o elimina la foto dels preferits", "favorites": "Preferits", - "feature_photo_updated": "Foto destacada actualitzada", - "features": "Característiques", - "features_setting_description": "Administrar les funcions de l'aplicació", - "file_name_or_extension": "Nom de l'arxiu o extensió", + "feature_photo_updated": "S’ha actualitzat la foto destacada", + "features": "Funcionalitats", + "features_setting_description": "Gestioneu les funcionalitats de l’aplicació", + "file_name_or_extension": "Nom del fitxer o extensió", "file_name_text": "Nom del fitxer", "file_size": "Mida del fitxer", "filename": "Nom del fitxer", - "filetype": "Tipus d'arxiu", - "filter": "Filtrar", + "filetype": "Tipus de fitxer", + "filter": "Filtre", "filter_people": "Filtra persones", - "filter_places": "Filtrar per llocs", - "filter_tags": "Filtrar etiquetes", + "filter_places": "Filtra llocs", + "filter_tags": "Filtra etiquetes", "filters": "Filtres", "first": "Primer", - "fix_incorrect_match": "Corregiu la coincidència incorrecta", - "focal_length": "Longitud focal", + "fix_incorrect_match": "Corregeix la coincidència incorrecta", + "focal_length": "Distància focal", "folder": "Carpeta", - "folder_not_found": "Carpeta no trobada", + "folder_not_found": "No s’ha trobat la carpeta", "folders": "Carpetes", - "folders_feature_description": "Explorar la vista de carpetes per les fotos i vídeos del sistema d'arxius", - "forgot_pin_code_question": "Has oblidat el teu PIN?", - "forward": "Endavant", - "free_up_space": "Alliberar Espai", - "free_up_space_description": "Mou fotos i videos que ja tinguen còpia al servidor a la paperera del teu dispositiu per alliberar espai. Les còpies del servidor no es modificaran.", - "free_up_space_settings_subtitle": "Alliberar espai del dispositiu", - "full_path": "Ruta completa: {path}", - "full_path_or_folder": "Camí sencer o carpeta", + "folders_feature_description": "Navegació per la vista de carpetes de les fotos i vídeos al sistema de fitxers", + "forgot_pin_code_question": "Heu oblidat el PIN?", + "forward": "Cap endavant", + "free_up_space": "Allibera espai", + "free_up_space_description": "Mou les fotos i vídeos que ja tenen còpia al servidor a la paperera del vostre dispositiu per a alliberar espai. Les còpies del servidor romandran sense canvis.", + "free_up_space_settings_subtitle": "Allibera espai del dispositiu", + "full_path": "Camí complet: {path}", + "full_path_or_folder": "Camí complet o carpeta", "gcast_enabled": "Google Cast", - "gcast_enabled_description": "Aquesta funció carrega recursos externs de Google per funcionar.", + "gcast_enabled_description": "Aquesta funcionalitat carrega recursos externs de Google per a funcionar.", "general": "General", - "geolocation_instruction_location": "Fes click en un element amb coordinades GPS per utilitzar la seva ubicació o selecciona una ubicació des del mapa", - "get_help": "Aconseguir ajuda", - "get_people_error": "S'ha produït un error en aconseguir persones", - "get_wifiname_error": "No s'ha pogut obtenir el nom de la Wi-Fi. Assegureu-vos que heu concedit els permisos necessaris i que esteu connectat a una xarxa Wi-Fi", - "getting_started": "Començant", - "go_back": "Torna", - "go_to_folder": "Anar al directori", - "go_to_search": "Vés a cercar", + "geolocation_instruction_location": "Feu clic en un recurs amb coordenades GPS per a utilitzar-ne la ubicació o seleccioneu una ubicació directament al mapa", + "get_help": "Obtén ajuda", + "get_people_error": "S’ha produït un error en obtenir les persones", + "get_wifiname_error": "No s’ha pogut obtenir el nom de la Wi-Fi. Assegureu-vos que heu concedit els permisos necessaris i que esteu connectat a una xarxa Wi-Fi", + "getting_started": "Primers passos", + "go_back": "Torna endarrere", + "go_to_folder": "Vés a la carpeta", + "go_to_search": "Vés a la cerca", "gps": "GPS", "gps_missing": "Sense GPS", - "grant_permission": "Concedir permís", - "group_albums_by": "Agrupa àlbums per...", - "group_country": "Agrupar per país", - "group_no": "Cap agrupació", - "group_owner": "Agrupar per propietari", - "group_places_by": "Agrupar llocs per...", - "group_year": "Agrupar per any", - "haptic_feedback_title": "Resposta Hàptica", - "has_quota": "Quota", - "hash_asset": "Hash del recurs", + "grant_permission": "Concediu el permís", + "group_albums_by": "Agrupa els àlbums per...", + "group_country": "Agrupa per país", + "group_no": "Sense agrupació", + "group_owner": "Agrupa per propietari", + "group_places_by": "Agrupa els llocs per...", + "group_year": "Agrupa per any", + "haptic_feedback_title": "Resposta hàptica", + "has_quota": "Té quota", + "hash_asset": "Genera el hash del recurs", "hashed_assets": "Recursos amb hash", - "hashing": "Generant el hash", - "header_settings_add_header_tip": "Afegeix Capçalera", + "hashing": "S’està generant el hash", + "header_settings_add_header_tip": "Afegeix una capçalera", "header_settings_field_validator_msg": "El valor no pot estar buit", "header_settings_header_name_input": "Nom de la capçalera", "header_settings_header_value_input": "Valor de la capçalera", - "headers_settings_tile_title": "Capçaleres proxy personalitzades", + "headers_settings_tile_title": "Capçaleres de servidor intermediari personalitzades", "height": "Alçada", - "hi_user": "Hola {name} ({email})", + "hi_user": "Bon dia, {name} ({email})", "hide_all_people": "Amaga totes les persones", "hide_gallery": "Amaga la galeria", "hide_named_person": "Amaga la persona {name}", "hide_password": "Amaga la contrasenya", "hide_person": "Amaga la persona", - "hide_schema": "Amaga l'esquema", - "hide_text_recognition": "Oculta el reconeixement de text", - "hide_unnamed_people": "Amaga persones sense nom", - "home_page_building_timeline": "Construint la línia de temps", + "hide_schema": "Amaga l’esquema", + "hide_text_recognition": "Amaga el reconeixement de text", + "hide_unnamed_people": "Amaga les persones sense nom", + "home_page_building_timeline": "S’està construint la cronologia", "host": "Amfitrió", "hour": "Hora", "hours": "Hores", - "id": "ID", - "idle": "En espera", + "id": "Identificador", + "idle": "Inactiu", "image": "Imatge", - "image_alt_text_date": "{isVideo, select, true {Video} other {Image}} presa el {date}", - "image_alt_text_date_1_person": "{isVideo, select, true {Video} other {Image}} pres/a amb {person1} el {date}", - "image_alt_text_date_2_people": "{isVideo, select, true {Video} other {Image}} pres/a {person1} amb {person2} el {date}", - "image_alt_text_date_3_people": "{isVideo, select, true {Video} other {Image}} pres/a amb {person1}, {person2}, i {person3} el {date}", - "image_alt_text_date_4_or_more_people": "{isVideo, select, true {Video} other {Image}} pres/a amb {person1}, {person2}, i {additionalCount, number} altres el {date}", - "image_alt_text_date_place": "{isVideo, select, true {Video} other {Image}} pres/a a {city}, {country} el {date}", - "image_alt_text_date_place_1_person": "{isVideo, select, true {Video} other {Image}} pres/a a {city}, {country} amb {person1} el {date}", - "image_alt_text_date_place_2_people": "{isVideo, select, true {Video} other {Image}} pres/a a {city}, {country} amb {person1} i {person2} el {date}", - "image_alt_text_date_place_3_people": "{isVideo, select, true {Video} other {Image}} pres/a a {city}, {country} amb {person1}, {person2}, i {person3} el {date}", - "image_alt_text_date_place_4_or_more_people": "{isVideo, select, true {Video} other {Image}} pres/a a {city}, {country} amb {person1}, {person2}, i {additionalCount, number} altres el {date}", - "immich_logo": "Logotip d'Immich", - "immich_web_interface": "Interfície web Immich", - "import_from_json": "Importar des de JSON", - "import_path": "Ruta d'importació", - "in_albums": "A {count, plural, one {# àlbum} other {# àlbums}}", - "in_archive": "En arxiu", - "in_year": "En {year}", - "in_year_selector": "En", - "include_archived": "Incloure arxivats", - "include_shared_albums": "Inclou àlbums compartits", - "include_shared_partner_assets": "Incloure elements dels companys", - "individual_share": "Compartit individualment", - "individual_shares": "Espais individuals", + "image_alt_text_date": "{isVideo, select, true {Vídeo enregistrat} other {Imatge capturada}} el {date}", + "image_alt_text_date_1_person": "{isVideo, select, true {Vídeo enregistrat} other {Imatge capturada}} amb {person1} el {date}", + "image_alt_text_date_2_people": "{isVideo, select, true {Vídeo enregistrat} other {Imatge capturada}} amb {person1} i {person2} el {date}", + "image_alt_text_date_3_people": "{isVideo, select, true {Vídeo enregistrat} other {Imatge capturada}} amb {person1}, {person2} i {person3} el {date}", + "image_alt_text_date_4_or_more_people": "{isVideo, select, true {Vídeo enregistrat} other {Imatge capturada}} amb {person1}, {person2} i {additionalCount, number} més el {date}", + "image_alt_text_date_place": "{isVideo, select, true {Vídeo enregistrat} other {Imatge capturada}} a {city}, {country} el {date}", + "image_alt_text_date_place_1_person": "{isVideo, select, true {Vídeo enregistrat} other {Imatge capturada}} a {city}, {country} amb {person1} el {date}", + "image_alt_text_date_place_2_people": "{isVideo, select, true {Vídeo enregistrat} other {Imatge capturada}} a {city}, {country} amb {person1} i {person2} el {date}", + "image_alt_text_date_place_3_people": "{isVideo, select, true {Vídeo enregistrat} other {Imatge capturada}} a {city}, {country} amb {person1}, {person2} i {person3} el {date}", + "image_alt_text_date_place_4_or_more_people": "{isVideo, select, true {Vídeo enregistrat} other {Imatge capturada}} a {city}, {country} amb {person1}, {person2} i {additionalCount, number} més el {date}", + "immich_logo": "Logo de l’Immich", + "immich_web_interface": "Interfície web de l’Immich", + "import_from_json": "Importa d’un JSON", + "import_path": "Camí d’importació", + "in_albums": "En {count, plural, one {# àlbum} other {# àlbums}}", + "in_archive": "A l’arxiu", + "in_year": "El {year}", + "in_year_selector": "El", + "include_archived": "Inclou els arxivats", + "include_shared_albums": "Inclou els àlbums compartits", + "include_shared_partner_assets": "Inclou els recursos compartits dels companys", + "individual_share": "Compartició individual", + "individual_shares": "Comparticions individuals", "info": "Informació", - "integrity_checks": "Verificacions d'integritat", + "integrity_checks": "Verificacions d’integritat", "interval": { - "day_at_onepm": "Cada dia a les 13h", - "hours": "Cada {hours, plural, one {hour} other {{hours, number} hours}}", - "night_at_midnight": "Cada mitjanit", - "night_at_twoam": "Cada nit a les 2 del matí" + "day_at_onepm": "Cada dia a les 13 h", + "hours": "Cada {hours, plural, one {hora} other {{hours, number} hores}}", + "night_at_midnight": "Cada nit a mitjanit", + "night_at_twoam": "Cada nit a les 2 h" }, - "invalid_date": "Data invàlida", - "invalid_date_format": "Format de data invàlid", - "invite_people": "Convida gent", - "invite_to_album": "Convida a l'àlbum", + "invalid_date": "La data no és vàlida", + "invalid_date_format": "El format de data no és vàlid", + "invite_people": "Convida persones", + "invite_to_album": "Convida a l’àlbum", "iso": "ISO", "items_count": "{count, plural, one {# element} other {# elements}}", "jobs": "Tasques", - "keep": "Mantenir", + "keep": "Conserva", "keep_albums": "Conserva els àlbums", - "keep_albums_count": "Conservant {count} {count, plural, one {àlbum} other {àlbums}}", - "keep_all": "Mantenir-ho tot", - "keep_description": "Tria què es conserva al dispositiu quan s'allibera espai.", - "keep_favorites": "Mantindre els preferits", - "keep_on_device": "Mantén al dispositiu", - "keep_on_device_hint": "Selecciona els elements que vulguis conservar en aquest dispositiu", - "keep_this_delete_others": "Conserveu-ho, suprimiu-ne els altres", - "keeping": "Mantenint: {items}", - "kept_this_deleted_others": "S'ha conservat aquest element i s'han suprimit {count, plural, one {# asset} other {# assets}}", + "keep_albums_count": "Es {count, plural, one {conservarà # àlbum} other {conservaran # àlbums}}", + "keep_all": "Conserva-ho tot", + "keep_description": "Trieu què es conserva al vostre dispositiu en alliberar espai.", + "keep_favorites": "Conserva els preferits", + "keep_on_device": "Conserva al dispositiu", + "keep_on_device_hint": "Seleccioneu els elements que vulgueu conservar en aquest dispositiu", + "keep_this_delete_others": "Conserva això, suprimeix la resta", + "keeping": "Es conservarà: {items}", + "kept_this_deleted_others": "S’ha conservat aquest recurs i se {count, plural, one {n’ha suprimit #} other {n’han suprimit #}}", "keyboard_shortcuts": "Dreceres de teclat", - "language": "Idioma", - "language_no_results_subtitle": "Prova d'ajustar el terme de cerca", - "language_no_results_title": "No s'han trobat idiomes", - "language_search_hint": "Cerca idiomes...", - "language_setting_description": "Seleccioneu el vostre idioma", - "large_files": "Fitxers Grans", - "last": "Últim", - "last_months": "{count, plural, one {Últim mes} other {Últims # mesos}}", - "last_seen": "Vist per últim cop", - "latest_version": "Última versió", + "language": "Llengua", + "language_no_results_subtitle": "Proveu d’ajustar el terme de cerca", + "language_no_results_title": "No s’ha trobat cap llengua", + "language_search_hint": "Cerqueu llengües...", + "language_setting_description": "Seleccioneu la vostra llengua preferida", + "large_files": "Fitxers grans", + "last": "Darrer", + "last_months": "{count, plural, one {Darrer mes} other {Darrers # mesos}}", + "last_seen": "Vist per darrera vegada", + "latest_version": "Darrera versió", "latitude": "Latitud", - "leave": "Marxar", - "leave_album": "Abandonar àlbum", - "lens_model": "Model de lents", + "leave": "Surt", + "leave_album": "Surt de l’àlbum", + "lens_model": "Model de l’objectiu", "less": "Menys", - "let_others_respond": "Deixa que els altres responguin", + "let_others_respond": "Permet que els altres responguin", "level": "Nivell", "library": "Bibilioteca", - "library_add_folder": "Afegir carpeta", - "library_edit_folder": "Editar carpeta", - "library_page_sort_asset_count": "Quantitat d'elements", - "library_page_sort_created": "Creat més recentment", + "library_add_folder": "Afegeix una carpeta", + "library_edit_folder": "Edita la carpeta", + "library_page_sort_asset_count": "Nombre de recursos", + "library_page_sort_created": "Data de creació", "library_page_sort_last_modified": "Darrera modificació", - "library_page_sort_title": "Títol de l'àlbum", + "library_page_sort_title": "Títol de l’àlbum", "licenses": "Llicències", - "light": "Llum", - "light_theme": "Canviar a tema clar", - "like": "M'agrada", - "like_deleted": "M'agrada suprimit", + "light": "Clar", + "light_theme": "Canvia al tema clar", + "like": "M’agrada", + "like_deleted": "S’ha suprimit l’agradament", "link": "Enllaç", - "link_motion_video": "Enllaçar vídeo en moviment", - "link_to_docs": "Per més informació, mirar la documentation.", - "link_to_oauth": "Enllaç a OAuth", - "linked_oauth_account": "Compte OAuth enllaçat", + "link_motion_video": "Enllaça un vídeo en moviment", + "link_to_docs": "Per a més informació, consulteu la documentació.", + "link_to_oauth": "Enllaça amb l’OAuth", + "linked_oauth_account": "Compte d’OAuth enllaçat", "list": "Llista", - "live": "En viu", - "load_more": "Carregar més", - "loading": "Carregant", - "loading_search_results_failed": "No s'han pogut carregar els resultats de la cerca", + "live": "En directe", + "load_more": "Carrega’n més", + "loading": "S’està carregant", + "loading_search_results_failed": "No s’han pogut carregar els resultats de la cerca", "local": "Local", - "local_asset_cast_failed": "No es pot convertir un actiu que no s'ha penjat al servidor", - "local_assets": "Recursos Locals", - "local_id": "ID local", - "local_media_summary": "Resum de Mitjans Locals", + "local_asset_cast_failed": "No es pot emetre un recurs que no s’ha penjat al servidor", + "local_assets": "Recursos locals", + "local_id": "Identificador local", + "local_media_summary": "Resum dels mitjans locals", "local_network": "Xarxa local", - "local_network_sheet_info": "L'aplicació es connectarà al servidor mitjançant aquest URL quan utilitzeu la xarxa Wi-Fi especificada", - "location": "Localització", - "location_permission": "Permís d'ubicació", - "location_permission_content": "Per utilitzar la funció de canvi automàtic, Immich necessita un permís d'ubicació precisa perquè pugui llegir el nom de la xarxa Wi-Fi actual", - "location_picker_choose_on_map": "Escollir en el mapa", - "location_picker_latitude_error": "Introdueix una latitud vàlida", - "location_picker_latitude_hint": "Introdueix aquí la latitud", - "location_picker_longitude_error": "Introdueix una longitud vàlida", - "location_picker_longitude_hint": "Introdueix aquí la longitud", - "lock": "Bloqueja", - "locked_folder": "Carpeta bloquejada", - "log_detail_title": "Detall de Registres", + "local_network_sheet_info": "L’aplicació es connectarà al servidor mitjançant aquest URL quan utilitzeu la xarxa Wi-Fi especificada", + "location": "Ubicació", + "location_permission": "Permís d’ubicació", + "location_permission_content": "Per a poder utilitzar la funció de canvi automàtic, l’Immich necessita el permís d’ubicació precisa per a poder llegir el nom de la xarxa Wi-Fi actual", + "location_picker_choose_on_map": "Tria al mapa", + "location_picker_latitude_error": "Introduïu una latitud vàlida", + "location_picker_latitude_hint": "Introduïu aquí la latitud", + "location_picker_longitude_error": "Introduïu una longitud vàlida", + "location_picker_longitude_hint": "Introduïu aquí la longitud", + "lock": "Protegeix", + "locked_folder": "Carpeta protegida", + "log_detail_title": "Detall del registre", "log_out": "Tanca la sessió", - "log_out_all_devices": "Tanqueu la sessió de tots els dispositius", + "log_out_all_devices": "Tanca la sessió en tots els dispositius", "logged_in_as": "Sessió iniciada com a {user}", - "logged_out_all_devices": "S'ha tancat la sessió de tots els dispositius", - "logged_out_device": "Dispositiu tancat", - "login": "Iniciar sessió", - "login_disabled": "S'ha desactivat l'inici de sessió", - "login_form_api_exception": "Excepció de l'API. Comproveu l'URL del servidor i torneu-ho a provar.", - "login_form_email_hint": "elteu@correu.cat", - "login_form_endpoint_hint": "http://ip-del-servidor:port", - "login_form_endpoint_url": "URL del punt final del servidor", - "login_form_err_invalid_email": "Adreça de correu electrònic no vàlida", - "login_form_err_invalid_url": "URL no vàlid", + "logged_out_all_devices": "S’ha tancat la sessió en tots els dispositius", + "logged_out_device": "Dispositiu amb la sessió tancada", + "login": "Inicia la sessió", + "login_disabled": "S’ha desactivat l’inici de sessió", + "login_form_api_exception": "Excepció de l’API. Comproveu l’URL del servidor i torneu-ho a provar.", + "login_form_email_hint": "elvostrecorreu@correu.com", + "login_form_endpoint_hint": "http://ip-del-vostre-servidor:port", + "login_form_endpoint_url": "URL de l’endpoint del servidor", + "login_form_err_invalid_email": "L’adreça electrònica no és vàlida", + "login_form_err_invalid_url": "L’URL no és vàlid", "login_form_err_leading_whitespace": "Espai en blanc al principi", "login_form_err_trailing_whitespace": "Espai en blanc al final", - "login_form_failed_get_oauth_server_config": "Error en iniciar sessió amb OAuth, comprova l'URL del servidor", - "login_form_failed_get_oauth_server_disable": "La funcionalitat OAuth no està disponible en aquest servidor", - "login_form_failed_login": "Error en iniciar sessió, comprova l'URL del servidor, el correu electrònic i la contrasenya", - "login_form_handshake_exception": "S'ha produït una excepció de handshake amb el servidor. Activa el suport per certificats autofirmats a la configuració si estàs fent servir un certificat autofirmat.", + "login_form_failed_get_oauth_server_config": "S’ha produït un error en iniciar la sessió amb OAuth, reviseu l’URL del servidor", + "login_form_failed_get_oauth_server_disable": "La funcionalitat d’OAuth no està disponible en aquest servidor", + "login_form_failed_login": "S’ha produït un error en iniciar la sessió, reviseu l’URL del servidor, l’adreça electrònica i la contrasenya", + "login_form_handshake_exception": "S’ha produït una excepció de handshake amb el servidor. Si utilitzeu un certificat autosignat, activeu el suport per a certificats autosignats a la configuració.", "login_form_password_hint": "contrasenya", - "login_form_server_empty": "Introdueix l'URL del servidor", - "login_form_server_error": "No s'ha pogut connectar al servidor", - "login_has_been_disabled": "L'inici de sessió s'ha desactivat", - "login_password_changed_error": "S'ha produït un error en actualitzar la contrasenya", - "login_password_changed_success": "La contrasenya s'ha canviat correctament", - "logout_all_device_confirmation": "Esteu segur que voleu tancar la sessió de tots els dispositius?", - "logout_this_device_confirmation": "Esteu segur que voleu tancar la sessió d'aquest dispositiu?", + "login_form_server_empty": "Introduïu l’URL del servidor", + "login_form_server_error": "No s’ha pogut connectar amb el servidor", + "login_has_been_disabled": "S’ha desactivat l’inici de sessió", + "login_password_changed_error": "S’ha produït un error en actualitzar la contrasenya", + "login_password_changed_success": "La contrasenya s’ha canviat correctament", + "logout_all_device_confirmation": "Segur que voleu tancar la sessió en tots els dispositius?", + "logout_this_device_confirmation": "Segur que voleu tancar la sessió d’aquest dispositiu?", "logs": "Registres", "longitude": "Longitud", "look": "Aspecte", "loop_videos": "Vídeos en bucle", - "loop_videos_description": "Habilita la reproducció en bucle del vídeo en els detalls.", - "main_branch_warning": "Esteu utilitzant una versió en desenvolupament; Recomanem fer servir una versió publicada!", + "loop_videos_description": "Activa la reproducció automàtica en bucle del vídeo al visualitzador dels detalls.", + "main_branch_warning": "Utilitzeu una versió en desenvolupament; és recomanable utilitzar una versió de llançament!", "main_menu": "Menú principal", - "maintenance_action_restore": "Restaurant la base de dades", - "maintenance_description": "Immich ha estat posat en mode de manteniment.", - "maintenance_end": "Finalitzar el mode de manteniment", - "maintenance_logged_in_as": "Actualment la sessió esta iniciada per {user}", - "maintenance_restore_from_backup": "Restaurar des d'una còpia de seguretat", - "maintenance_restore_library": "Restaura la teva biblioteca", - "maintenance_restore_library_confirm": "Si això sembla correcte, continua restaurant una còpia de seguretat!", - "maintenance_restore_library_description": "Restaurant la còpia de seguretat", - "maintenance_restore_library_folder_has_files": "{folder} conté {count} carpeta/es", - "maintenance_restore_library_folder_no_files": "A {folder} li falten fitxers!", + "maintenance_action_restore": "S’està restaurant la base de dades", + "maintenance_description": "L’Immich està en mode de manteniment.", + "maintenance_end": "Finalitza el mode de manteniment", + "maintenance_logged_in_as": "Sessió iniciada com a {user}", + "maintenance_restore_from_backup": "Restaura d’una còpia de seguretat", + "maintenance_restore_library": "Restaureu la vostra biblioteca", + "maintenance_restore_library_confirm": "Si tot sembla correcte, continueu restaurant una còpia de seguretat!", + "maintenance_restore_library_description": "S’està restaurant la base de dades", + "maintenance_restore_library_folder_has_files": "{folder} conté {count, plural, one {# carpeta} other {# carpetes}}", + "maintenance_restore_library_folder_no_files": "Manquen fitxers a {folder}!", "maintenance_restore_library_folder_pass": "llegible i escrivible", "maintenance_restore_library_folder_read_fail": "no llegible", "maintenance_restore_library_folder_write_fail": "no escrivible", - "maintenance_restore_library_hint_missing_files": "Potser et falten fitxers importants", - "maintenance_restore_library_hint_regenerate_later": "Pots regenerar-los més tard a la configuració", - "maintenance_restore_library_hint_storage_template_missing_files": "Fas servir una plantilla d'emmagatzematge? Potser et falten fitxers", - "maintenance_restore_library_loading": "S'estan carregant les comprovacions d'integritat i heurístiques…", - "maintenance_task_backup": "Creant una còpia de seguretat de la base de dades existent…", - "maintenance_task_migrations": "Executant migracions de bases de dades…", - "maintenance_task_restore": "Restaurant la còpia de seguretat escollida…", - "maintenance_task_rollback": "La restauració ha fallat, s'està tornant al punt de restauració…", - "maintenance_title": "Temporalment inaccessible", + "maintenance_restore_library_hint_missing_files": "És possible que us manquin fitxers importants", + "maintenance_restore_library_hint_regenerate_later": "Podeu regenerar-los més tard a la configuració", + "maintenance_restore_library_hint_storage_template_missing_files": "Utilitzeu una plantilla d’emmagatzematge? És possible que us manquin fitxers", + "maintenance_restore_library_loading": "S’estan carregant les verificacions d’integritat i les heurístiques…", + "maintenance_task_backup": "S’està creant una còpia de seguretat de la base de dades existent…", + "maintenance_task_migrations": "S’estan executant les migracions de la base de dades…", + "maintenance_task_restore": "S’està restaurant la còpia de seguretat elegida…", + "maintenance_task_rollback": "No s’ha pogut restaurar, s’està tornant al punt de restauració…", + "maintenance_title": "No disponible temporalment", "make": "Fabricant", - "manage_geolocation": "Gestioneu la vostra ubicació", - "manage_media_access_rationale": "Aquest permís es necessari per a la correcta gestió dels actius que es mouen a la paperera i es restauren d'ella.", - "manage_media_access_settings": "Configuració oberta", - "manage_media_access_subtitle": "Permet a l'Immich gestionar i moure fitxers multimèdia.", + "manage_geolocation": "Gestiona la ubicació", + "manage_media_access_rationale": "Aquest permís és necessari per a la correcta gestió dels recursos que es mouen a la paperera o se’n restauren.", + "manage_media_access_settings": "Obre la configuració", + "manage_media_access_subtitle": "Permeteu que l’Immich gestioni i mogui fitxers de mitjans.", "manage_media_access_title": "Accés a la gestió de mitjans", - "manage_sharing_with_partners": "Gestiona la compartició amb els companys", - "manage_the_app_settings": "Gestioneu la configuració de l'aplicació", - "manage_your_account": "Gestiona el teu compte", - "manage_your_api_keys": "Gestioneu les vostres claus API", + "manage_sharing_with_partners": "Gestioneu la compartició amb els companys", + "manage_the_app_settings": "Gestioneu la configuració de l’aplicació", + "manage_your_account": "Gestioneu el vostre compte", + "manage_your_api_keys": "Gestioneu les vostres claus de l’API", "manage_your_devices": "Gestioneu els vostres dispositius connectats", - "manage_your_oauth_connection": "Gestioneu la vostra connexió OAuth", + "manage_your_oauth_connection": "Gestioneu la vostra connexió amb l’OAuth", "map": "Mapa", - "map_cannot_get_user_location": "No es pot obtenir la ubicació de l'usuari", - "map_location_picker_page_use_location": "Utilitzar aquesta ubicació", - "map_location_service_disabled_content": "El servei de localització s'ha d'activar per mostrar els elements de la teva ubicació actual. Vols activar-lo ara?", - "map_location_service_disabled_title": "Servei de localització desactivat", - "map_marker_for_image": "Marcador de mapa per a imatge obtinguda a {city}, {country}", - "map_marker_with_image": "Marcador de mapa amb imatge", - "map_no_location_permission_content": "Es necessita el permís de localització per mostrar els elements de la teva ubicació actual. Vols permetre-ho ara?", - "map_no_location_permission_title": "Permís de localització denegat", - "map_settings": "Paràmetres de mapa", + "map_cannot_get_user_location": "No s’ha pogut obtenir la ubicació de l’usuari", + "map_location_picker_page_use_location": "Utilitza aquesta ubicació", + "map_location_service_disabled_content": "Cal activar el servei d’ubicació per a mostrar els recursos de la vostra ubicació actual. Voleu activar-lo ara?", + "map_location_service_disabled_title": "Servei d’ubicació desactivat", + "map_marker_for_image": "Marcador del mapa per a la imatge capturada a {city}, {country}", + "map_marker_with_image": "Marcador del mapa amb imatge", + "map_no_location_permission_content": "Cal el permís d’ubicació per a mostrar els recursos de la vostra ubicació actual. Voleu concedir-lo ara?", + "map_no_location_permission_title": "Permís d’ubicació denegat", + "map_settings": "Configuració del mapa", "map_settings_dark_mode": "Mode fosc", - "map_settings_date_range_option_day": "Últimes 24 hores", - "map_settings_date_range_option_days": "Darrers {days} dies", - "map_settings_date_range_option_year": "Any passat", - "map_settings_date_range_option_years": "Darrers {years} anys", - "map_settings_include_show_archived": "Incloure arxivats", - "map_settings_include_show_partners": "Incloure companys", - "map_settings_only_show_favorites": "Mostra només preferits", - "map_settings_theme_settings": "Tema del Mapa", - "mark_all_as_read": "Marcar-ho tot com a llegit", - "marked_all_as_read": "Marcat tot com a llegit", + "map_settings_date_range_option_day": "Les darreres 24 hores", + "map_settings_date_range_option_days": "Els darrers {days} dies", + "map_settings_date_range_option_year": "L’any passat", + "map_settings_date_range_option_years": "Els darrers {years} anys", + "map_settings_include_show_archived": "Inclou els arxivats", + "map_settings_include_show_partners": "Inclou els companys", + "map_settings_only_show_favorites": "Mostra només els preferits", + "map_settings_theme_settings": "Tema del mapa", + "mark_all_as_read": "Marca-ho tot com a llegit", + "marked_all_as_read": "S’ha marcat tot com a llegit", "matches": "Coincidències", - "matching_assets": "Recursos Coincidents", + "matching_assets": "Recursos coincidents", "media_chrome": { - "auto": "Auto", - "captions": "Llegendes", + "auto": "Automàtic", + "captions": "Subtítols", "captions_off": "Desactivat", - "closed_captions": "Llegendes tancades", - "decode_error": "Error de decodificació", - "disable_captions": "Desactivar llegendes", - "enable_captions": "Activar llegendes", - "enter_fullscreen_mode": "Activar mode pantalla sencera", - "exit_fullscreen_mode": "Desactivar mode pantalla sencera", + "closed_captions": "subtítols", + "decode_error": "S’ha produït un error de descodificació", + "disable_captions": "Desactiva els subtítols", + "enable_captions": "Activa els subtítols", + "enter_fullscreen_mode": "Activa el mode de pantalla completa", + "exit_fullscreen_mode": "Surt del mode de pantalla completa", "loop": "Bucle", - "media_error_description": "Un error dels mitjans ha provocat l'aturada de la reproducció. El mitjà pot estar corromput o el navegador no suporta el format.", - "media_loading": "carregant el mitjà", + "media_error_description": "Un error del mitjà ha provocat l’aturada de la reproducció. És possible que el mitjà estigui corromput o que el navegador no admeti aquest format.", + "media_loading": "càrrega de mitjans", "mute": "Silencia", - "network_error": "Error de xarxa", - "network_error_description": "Un error de xarxa ha provocat la fallada de la descarrega.", - "not_supported_error": "Font origen no suportada", + "network_error": "S’ha produït un error de xarxa", + "network_error_description": "Un error de xarxa ha provocat que falli la baixada del mitjà.", + "not_supported_error": "Font no admesa", "playback_rate": "Velocitat de reproducció", "playback_rate_current": "velocitat actual de reproducció", "playback_rate_value": "Velocitat de reproducció {playbackRate}", "playback_time": "temps de reproducció", - "quality": "Quallitat", + "quality": "Qualitat", "second": "segon", "seconds": "segons", "time_value_of_total_time": "{currentTime} de {totalTime}", "time_value_remaining": "{time} restant", - "unmute": "Activa so", - "unsupported_error_description": "Un error no suportat ha passat. El servidor o la xarxa han fallat, o el vostre navegador no accepta aquest format.", + "unmute": "Deixa de silenciar", + "unsupported_error_description": "S’ha produït un error no admès. El servidor o la xarxa han fallat o el vostre navegador no admet aquest format.", "video_not_loaded_unknown_time": "vídeo no carregat, temps desconegut.", "video_player": "reproductor de vídeo", "volume": "volum" }, "media_type": "Tipus de mitjà", "memories": "Records", - "memories_all_caught_up": "Posat al dia", - "memories_check_back_tomorrow": "Torna demà per veure més records", - "memories_setting_description": "Gestiona el que veus als teus records", + "memories_all_caught_up": "Esteu al dia", + "memories_check_back_tomorrow": "Torneu demà per a veure més records", + "memories_setting_description": "Gestioneu què veieu als records", "memories_start_over": "Torna a començar", - "memories_swipe_to_close": "Llisca per tancar", + "memories_swipe_to_close": "Llisqueu per a tancar", "memory": "Record", "memory_lane_title": "Línia de records {title}", "menu": "Menú", - "merge": "Combinar", - "merge_people": "Combinar persones", - "merge_people_limit": "Només pots combinar fins a 5 cares alhora", - "merge_people_prompt": "Vols combinar aquestes persones? Aquesta acció és irreversible.", - "merge_people_successfully": "Persones combinades amb èxit", - "merged_people_count": "Combinades {count, plural, one {# persona} other {# persones}}", - "minFaces": "Nombre mínim de cares", + "merge": "Fusiona", + "merge_people": "Fusiona persones", + "merge_people_limit": "Només podeu combinar fins a 5 cares alhora", + "merge_people_prompt": "Voleu combinar aquestes persones? Aquesta acció no es pot desfer.", + "merge_people_successfully": "Les persones s’han fusionat correctament", + "merged_people_count": "{count, plural, one {S’ha combinat # persona} other {S’han combinat # persones}}", + "minFaces": "Mínim de cares", "minFaces_description": "El nombre mínim de cares reconegudes perquè es mostri una persona", "minimize": "Minimitza", "minute": "Minut", "minutes": "Minuts", - "missing": "Restants", + "missing": "Pendents", "mobile_app": "Aplicació mòbil", - "mobile_app_download_onboarding_note": "Descarregar la App de mòbil fent servir les seguents opcions", + "mobile_app_download_onboarding_note": "Baixeu l’aplicació auxiliar per a mòbils utilitzant les següents opcions", "model": "Model", - "modify_date": "Canvia la data", + "modify_date": "Modifica la data", "month": "Mes", "more": "Més", "motion": "Moviment", - "move": "Moure", - "move_off_locked_folder": "Moure fora de la carpeta bloquejada", - "move_to": "Moure a", + "move": "Mou", + "move_off_locked_folder": "Treu de la carpeta protegida", + "move_to": "Mou a", "move_to_device_trash": "Mou a la paperera del dispositiu", - "move_to_lock_folder_action_prompt": "{count} afegides a la carpeta protegida", - "move_to_locked_folder": "Moure a la carpeta bloquejada", - "move_to_locked_folder_confirmation": "Aquestes fotos i vídeos seran eliminades de tots els àlbums, i només podran ser vistes des de la carpeta bloquejada", - "moved_to_trash": "S'ha mogut a la paperera", - "mute_memories": "Silenciar records", + "move_to_lock_folder_action_prompt": "{count, plural, one {# afegit} other {# afegits}} a la carpeta protegida", + "move_to_locked_folder": "Mou a la carpeta protegida", + "move_to_locked_folder_confirmation": "Aquestes fotos i vídeos s’eliminaran de tots els àlbums i només es podran veure a la carpeta protegida", + "moved_to_trash": "S’ha mogut a la paperera", + "mute_memories": "Silencia els records", "my_albums": "Els meus àlbums", - "my_immich_description": "Copia la pàgina actual com a enllaç de My Immich", - "my_immich_title": "Enllaç My Immich", + "my_immich_description": "Copia la pàgina actual com a enllaç a My Immich", + "my_immich_title": "Enllaç a My Immich", "name": "Nom", "name_or_nickname": "Nom o sobrenom", "name_required": "El nom és obligatori", - "navigate": "Navegar", - "navigate_to_time": "Navegar a un punt en el temps", - "network_requirement_photos_upload": "Fes servir dades mòbils per a còpies de seguretat de fotos", - "network_requirement_videos_upload": "Fes servir dades mòbils per a còpies de seguretat de videos", - "network_requirements": "Requeriments de Xarxa", - "network_requirements_updated": "Han canviat els requeriments de xarxa, reiniciant la cua", + "navigate": "Navega", + "navigate_to_time": "Navega a un punt en el temps", + "network_requirement_photos_upload": "Utilitza dades mòbils per a copiar les fotos al servidor", + "network_requirement_videos_upload": "Utilitza dades mòbils per a copiar els vídeos al servidor", + "network_requirements": "Requeriments de xarxa", + "network_requirements_updated": "Han canviat els requeriments de xarxa, es renicia la cua de còpia al servidor", "networking_settings": "Xarxes", - "networking_subtitle": "Gestiona la configuració del endpoint del servidor", + "networking_subtitle": "Gestioneu la configuració de l’endpoint del servidor", "never": "Mai", - "new_album": "Nou Àlbum", - "new_api_key": "Nova clau de l'API", - "new_password": "Nova contrasenya", + "new_album": "Àlbum nou", + "new_api_key": "Clau de l’API nova", + "new_feature": "Funcionalitat nova", + "new_password": "Contrasenya nova", "new_person": "Persona nova", - "new_pin_code": "Nou codi PIN", - "new_pin_code_subtitle": "Aquesta és la primera vegada que accedeixes a la carpeta bloquejada. Crea una codi PIN i accedeix de manera segura a aquesta pàgina", - "new_update": "Nova actualització", - "new_user_created": "Nou usuari creat", + "new_pin_code": "Codi PIN nou", + "new_pin_code_subtitle": "És la primera vegada que accediu a la carpeta protegida. Creeu un codi PIN per a accedir de manera segura a aquesta pàgina", + "new_update": "Actualització nova", + "new_user_created": "S’ha creat l’usuari nou", "new_version_available": "NOVA VERSIÓ DISPONIBLE", "newest_first": "El més nou primer", "next": "Següent", "next_memory": "Següent record", "no": "No", - "no_albums_found": "No s'han trobat àlbums", - "no_albums_message": "Creeu un àlbum per organitzar les vostres fotos i vídeos", - "no_albums_with_name_yet": "Sembla que encara no tens cap àlbum amb aquest nom.", - "no_albums_yet": "Sembla que encara no tens cap àlbum.", - "no_archived_assets_message": "Arxiveu fotos i vídeos per ocultar-los de Fotos", - "no_assets_message": "Fes clic per pujar la teva primera foto", - "no_assets_to_show": "No hi ha elements per mostrar", - "no_cast_devices_found": "No s'han trobat dispositius per transmetre", - "no_checksum_local": "Cap checksum disponible - no s'han pogut carregar els recursos locals", - "no_checksum_remote": "Cap checksum disponible - no s'ha pogut obtenir el recurs remot", - "no_devices": "No hi ha dispositius autoritzats", - "no_duplicates_found": "No s'han trobat duplicats.", - "no_exif_info_available": "No hi ha informació d'exif disponible", - "no_explore_results_message": "Penja més fotos per explorar la teva col·lecció.", - "no_favorites_message": "Afegiu preferits per trobar les millors fotos i vídeos a l'instant", - "no_libraries_message": "Creeu una llibreria externa per veure les vostres fotos i vídeos", - "no_local_assets_found": "No s'ha trobat cap recurs local amb aquest checksum", - "no_locked_photos_message": "Les fotos i vídeos d'aquesta carpeta estan ocultes, i no es mostraran a mesura que navegues o cerques a la teva biblioteca.", + "no_albums_found": "No s’ha trobat cap àlbum", + "no_albums_message": "Creeu un àlbum per a organitzar les vostres fotos i vídeos", + "no_albums_with_name_yet": "Sembla que encara no teniu cap àlbum amb aquest nom.", + "no_albums_yet": "Sembla que encara no teniu cap àlbum.", + "no_archived_assets_message": "Arxiveu fotos i vídeos per a amagar-los de la visualització Fotos", + "no_assets_message": "Feu clic per a pujar la vostra primera foto", + "no_assets_to_show": "No hi ha recursos a mostrar", + "no_cast_devices_found": "No s’ha trobat cap dispositiu on emetre", + "no_checksum_local": "No hi ha cap suma de verificació disponible; no s’han pogut obtenir els recursos locals", + "no_checksum_remote": "No hi ha cap suma de verificació disponible; no s’ha pogut obtenir el recurs remot", + "no_devices": "No hi ha cap dispositiu autoritzat", + "no_duplicates_found": "No s’ha trobat cap duplicat.", + "no_exif_info_available": "No hi ha informació Exif disponible", + "no_explore_results_message": "Pugeu més fotos per a explorar la vostra col·lecció.", + "no_favorites_message": "Afegiu preferits per a trobar les vostres millors fotos i vídeos ràpidament", + "no_libraries_message": "Creeu una biblioteca externa per a veure les vostres fotos i vídeos", + "no_local_assets_found": "No s’ha trobat cap recurs local amb aquesta suma de verificació", + "no_locked_photos_message": "Les fotos i vídeos de la carpeta protegida carpeta estan amagades i no es mostraran quan navegueu o cerqueu a la vostra biblioteca.", "no_name": "Sense nom", - "no_notifications": "No hi ha notificacions", - "no_people_found": "No s'han trobat coincidències de persones", - "no_places": "No hi ha llocs", - "no_remote_assets_found": "No s'ha trobat cap recurs remot amb aquest checksum", - "no_results": "Sense resultats", - "no_results_description": "Proveu un sinònim o una paraula clau més general", - "no_shared_albums_message": "Creeu un àlbum per compartir fotos i vídeos amb persones a la vostra xarxa", - "no_steps": "Encara no s'ha afegit cap pas", + "no_notifications": "No hi ha cap notificació", + "no_people_found": "No s’ha trobat cap persona coincident", + "no_places": "No hi ha cap lloc", + "no_remote_assets_found": "No s’ha trobat cap recurs remot amb aquesta suma de verificació", + "no_results": "No hi ha resultats", + "no_results_description": "Proveu amb un sinònim o una paraula clau més general", + "no_shared_albums_message": "Creeu un àlbum per a compartir fotos i vídeos amb persones de la vostra xarxa", + "no_steps": "Encara no s’ha afegit cap pas", "none": "Cap", "not_allowed": "No permès", - "not_available": "N/A", + "not_available": "N/D", "not_in_any_album": "En cap àlbum", "not_selected": "No seleccionat", + "not_set": "No definit", "notes": "Notes", - "nothing_here_yet": "No hi ha res encara", - "notification_backup_reliability": "Activa les notificacions per millorar la fiabilitat de les còpies de seguretat en segon pla", - "notification_permission_dialog_content": "Per activar les notificacions, aneu a Configuració i seleccioneu permet.", - "notification_permission_list_tile_content": "Atorga permís per a activar les notificacions.", + "nothing_here_yet": "Encara no hi ha res", + "notification_backup_reliability": "Activeu les notificacions per a millorar la fiabilitat de les còpies al servidor en segon pla", + "notification_enabled_list_tile_content": "L’Immich utilitza les notificacions per a les còpies al servidor en segon pla. Gestioneu-les a la configuració del vostre dispositiu.", + "notification_enabled_list_tile_open_button": "Obre la configuració", + "notification_enabled_list_tile_title": "Notificacions activades", + "notification_permission_dialog_content": "Per a activar les notificacions, aneu a Configuració i seleccioneu Permet.", + "notification_permission_list_tile_content": "Concediu el permís per a activar les notificacions.", "notification_permission_list_tile_enable_button": "Activa les notificacions", "notification_permission_list_tile_title": "Permís de notificacions", "notification_toggle_setting_description": "Activa les notificacions per correu electrònic", "notifications": "Notificacions", "notifications_setting_description": "Gestiona les notificacions", "oauth": "OAuth", - "obtainium_configurator": "Configurador Obtainium", - "obtainium_configurator_instructions": "Utilitza Obtainium per instal·lar una actualització a la app directament des de Github-Immich. Crear una clau API i seleccionar una variant per crear un enllaç a la configuració Obtainium", + "obtainium_configurator": "Configurador de l’Obtainium", + "obtainium_configurator_instructions": "Utilitzeu l’Obtainium per a instal·lar i actualitzar l’aplicació d’Android directament del llançament a GitHub de l’Immich. Creeu una clau de l’API i seleccioneu una variant per a crear un enllaç de configuració de l’Obtainium", "ocr": "OCR", - "official_immich_resources": "Recursos oficials d'Immich", + "ocr_body": "Ara l’Immich llegeix el text dins de les vostres fotos, de manera que podeu cercar-les pel que hi ha escrit.", + "ocr_title": "Cerqueu text dins de les vostres fotos", + "official_immich_resources": "Recursos oficials de l’Immich", "offline": "Fora de línia", "offset": "Diferència", - "ok": "D'acord", - "oldest_first": "El més vell primer", + "ok": "D’acord", + "oldest_first": "El més antic primer", "on_this_device": "En aquest dispositiu", - "onboarding": "Incorporació", - "onboarding_locale_description": "Tria el teu llenguatge preferit. Pots canviar aquesta opció mes tard a la configuració.", - "onboarding_privacy_description": "Les següents funcions (opcionals) depenen de serveis externs i poden desactivarse en qualsevol moment des de la configuració.", - "onboarding_server_welcome_description": "Configurem la instància amb alguns paràmetres comuns.", - "onboarding_theme_description": "Trieu un tema de color per a la vostra instància. Podeu canviar-ho més endavant a la vostra configuració.", + "onboarding": "Introducció", + "onboarding_locale_description": "Seleccioneu la vostra llengua preferida. Podeu canviar-la més tard a la configuració.", + "onboarding_privacy_description": "Les següents funcionalitats opcionals depenen de serveis externs i es poden desactivar en qualsevol moment a la configuració.", + "onboarding_server_welcome_description": "Configureu la vostra instància amb alguns paràmetres comuns.", + "onboarding_theme_description": "Trieu un tema de colors per a la vostra instància. Podeu canviar-lo més tard a la configuració.", "onboarding_user_welcome_description": "Comencem!", - "onboarding_welcome_user": "Benvingut, {user}", + "onboarding_welcome_user": "Us donem la benvinguda, {user}", "online": "En línia", - "only_favorites": "Només preferits", - "open": "Obrir", - "open_calendar": "Obrir el calendari", + "only_favorites": "Només els preferits", + "open": "Obre", + "open_calendar": "Obre el calendari", "open_in_browser": "Obre al navegador", - "open_in_map_view": "Obrir a la vista del mapa", - "open_in_openstreetmap": "Obre a OpenStreetMap", - "open_the_search_filters": "Obriu els filtres de cerca", + "open_in_immich_body": "Definiu l’Immich com a la vostra galeria de fotos d’Android per a obrir les fotos directament d’altres aplicacions.", + "open_in_immich_title": "Obre les fotos a l’Immich", + "open_in_map_view": "Obre a la visualització del mapa", + "open_in_openstreetmap": "Obre a l’OpenStreetMap", + "open_the_search_filters": "Obre els filtres de cerca", "options": "Opcions", "or": "o", - "organize_into_albums": "Organitzar en àlbums", - "organize_into_albums_description": "Posar fotos existents en àlbums utilitzant la configuració de sincronització actual", - "organize_your_library": "Organitzeu la llibreria", + "organize_into_albums": "Organitza en àlbums", + "organize_into_albums_description": "Posa les fotos existents en àlbums utilitzant la configuració de sincronització actual", + "organize_your_library": "Organitza la biblioteca", "orientation": "Orientació", "original": "original", "other": "Altres", "other_devices": "Altres dispositius", "other_variables": "Altres variables", - "owned": "Propi", + "owned": "Propis", "owner": "Propietari", "page": "Pàgina", - "partner": "Company/a", + "partner": "Company", "partner_can_access": "{partner} hi té accés", - "partner_can_access_assets": "Totes les vostres fotos i vídeos excepte les arxivades i eliminades", - "partner_can_access_location": "Ubicació en què s'han fet les fotos", - "partner_list_user_photos": "fotos de {user}", - "partner_page_empty_message": "Les teves fotos encara no estan compartides amb cap company.", + "partner_can_access_assets": "Totes les vostres fotos i vídeos excepte les arxivades i les suprimides", + "partner_can_access_location": "Ubicació on s’han fet les fotos", + "partner_list_user_photos": "Fotos de l’usuari {user}", + "partner_page_empty_message": "Les vostres fotos encara no s’han compartit amb cap company.", "partner_page_no_more_users": "No hi ha més usuaris a afegir", - "partner_page_select_partner": "Escull company", - "partner_page_stop_sharing_content": "{partner} ja no podrà accedir a les teves fotos.", + "partner_page_select_partner": "Selecciona un company", + "partner_page_stop_sharing_content": "{partner} ja no podrà accedir a les vostres fotos.", "partner_sharing": "Compartició amb companys", "partners": "Companys", "password": "Contrasenya", "password_does_not_match": "La contrasenya no coincideix", - "password_required": "Contrasenya requerida", - "password_reset_success": "El restabliment de la contrasenya ha estat correcte", + "password_required": "La contrasenya és obligatòria", + "password_reset_success": "S’ha restablert la contrasenya correctament", "past_durations": { - "days": "{days, plural, one {El dia anterior} other {Els # dies anteriors}}", - "hours": "{hours, plural, one {L'última hora} other {Les darreres # hours}}", - "years": "{years, plural, one {L'any passat} other {Els passats # anys}}" + "days": "{days, plural, one {El darrer dia} other {Els darrers # dies}}", + "hours": "{hours, plural, one {La darrera hora} other {Les darreres # hores}}", + "years": "{years, plural, one {L’any passat} other {Els darrers # anys}}" }, - "path": "Ruta", + "path": "Camí", "pattern": "Patró", "pause": "Pausa", "pause_memories": "Pausa els records", - "paused": "En pausa", + "paused": "Pausat", "pending": "Pendent", "people": "Persones", - "people_edits_count": "{count, plural, one {# persona editada} other {# persones editades}}", - "people_feature_description": "Explorar fotos i vídeos agrupades per persona", - "permanent_deletion_warning": "Avís d'eliminació permanent", - "permanent_deletion_warning_setting_description": "Mostrar un avís quan s'eliminin els elements permanentment", - "permanently_delete": "Eliminar permanentment", - "permanently_delete_assets_count": "Eliminar permanentment {count, plural, one {l'element} other {els elements}}", - "permanently_delete_assets_prompt": "Esteu segur que voleu suprimir permanentment {count, plural, one {aquest recurs?} other {aquests # recursos?}} Això també {count, plural, one {el} other {els}} suprimirà del seu àlbum.", - "permanently_deleted_asset": "Element eliminat permanentment", - "permanently_deleted_assets_count": "{count, plural, one {S'ha eliminat # element} other {S'han eliminat # elements}} permanentment", + "people_edits_count": "{count, plural, one {S’ha editat # persona} other {S’han editat # persones}}", + "people_feature_description": "Exploreu les fotos i els vídeos agrupats per persona", + "permanent_deletion_warning": "Advertència de supressió permanent", + "permanent_deletion_warning_setting_description": "Mostra una advertència quan se suprimeixin recursos permanentment", + "permanently_delete": "Suprimeix permanentment", + "permanently_delete_assets_count": "Suprimeix permanentment {count, plural, one {el recurs} other {els recursos}}", + "permanently_delete_assets_prompt": "Segur que voleu suprimir permanentment {count, plural, one {aquest recurs?} other {aquests # recursos?}} Això també {count, plural, one {el} other {els}} suprimirà dels àlbums.", + "permanently_deleted_asset": "S’ha suprimit el recurs permanentment", + "permanently_deleted_assets_count": "{count, plural, one {S’ha suprimit # recurs} other {S’han suprimit # recursos}} permanentment", "permission": "Permís", - "permission_empty": "El seu permís no hauria d'estar buit", + "permission_empty": "El vostre permís no hauria d’estar buit", "person": "Persona", - "person_age_months": "{months, plural, one {# mes} other {# mesos}} d'antiguitat", - "person_age_year_months": "1 any, {months, plural, one {# mes} other {# mesos}} d'antiguitat", - "person_age_years": "{years, plural, other {# anys}} d'antiguitat", - "person_birthdate": "Nascut a {date}", - "person_hidden": "{name}{hidden, select, true { (ocultat)} other {}}", + "person_age_months": "{months, plural, one {# mes} other {# mesos}}", + "person_age_year_months": "1 any i {months, plural, one {# mes} other {# mesos}}", + "person_age_years": "{years, plural, one {# any} other {# anys}}", + "person_birthdate": "Nascut el {date}", + "person_hidden": "{name}{hidden, select, true { (amagat)} other {}}", "person_recognized": "Persona reconeguda", - "photo_shared_all_users": "Sembla que has compartit les teves fotos amb tots els usuaris o no tens cap usuari amb qui compartir-les.", + "photo_shared_all_users": "Sembla que heu compartit les vostres fotos amb tots els usuaris o no teniu cap usuari amb qui compartir-les.", "photos": "Fotos", "photos_and_videos": "Fotos i vídeos", - "photos_from_previous_years": "Fotos d'anys anteriors", - "pick_a_location": "Triar una ubicació", - "pick_custom_range": "Rang personalitzat", - "pick_date_range": "Seleccioni un rang de dates", - "pin_code_changed_successfully": "Codi PIN canviat correctament", - "pin_code_reset_successfully": "S'ha restablert correctament el codi PIN", - "pin_code_setup_successfully": "S'ha configurat correctament un codi PIN", - "pin_verification": "Verificació de codi PIN", + "photos_from_previous_years": "Fotos d’anys anteriors", + "pick_a_location": "Tria una ubicació", + "pick_custom_range": "Interval personalitzat", + "pick_date_range": "Seleccioneu un interval de dates", + "pin_code_changed_successfully": "S’ha canviat el codi PIN correctament", + "pin_code_reset_successfully": "S’ha restablert el codi PIN correctament", + "pin_code_setup_successfully": "S’ha configurat el codi PIN correctament", + "pin_verification": "Verificació del codi PIN", "place": "Lloc", "places": "Llocs", - "places_count": "{count, plural, one {{count, number} Lloc} other {{count, number} Llocs}}", + "places_count": "{count, plural, one {{count, number} lloc} other {{count, number} llocs}}", "play": "Reprodueix", - "play_memories": "Reproduir records", - "play_motion_photo": "Reproduir Fotos en Moviment", - "play_or_pause_video": "Reproduir o posar en pausa el vídeo", - "play_original_video": "Veure el video original", - "play_original_video_setting_description": "Preferir la reproducció del video original sobre el video recodificat. Si el video original no es compatible potser no es reprodueixi correctament.", - "play_transcoded_video": "Veure el video recodificat", - "please_auth_to_access": "Per favor, autentica't per accedir", + "play_memories": "Reprodueix els records", + "play_motion_photo": "Reprodueix la foto en moviment", + "play_or_pause_video": "Reprodueix o pausa el vídeo", + "play_original_video": "Reprodueix el vídeo original", + "play_original_video_setting_description": "Prefereix la reproducció dels vídeos originals abans que el vídeo transcodificat. Si el recurs original no és compatible, és possible que no es reprodueixi correctament.", + "play_transcoded_video": "Reprodueix el vídeo transcodificat", + "please_auth_to_access": "Autentiqueu-vos per a accedir-hi", "plugin_method_filter_type": "Filtre", - "plugin_method_filter_type_description": "Aquest mètode pot filtrar esdeveniments i, condicionat, evitar que s'executin els passos següents", + "plugin_method_filter_type_description": "Aquest mètode pot filtrar esdeveniments i evitar condicionalment que s’executin els passos següents", "port": "Port", - "preferences_settings_subtitle": "Gestiona les preferències de l'aplicació", + "preferences_settings_subtitle": "Gestiona les preferències de l’aplicació", "preferences_settings_title": "Preferències", - "preparing": "Preparant", - "preset": "Preestablert", + "preparing": "S’està preparant", + "preset": "Predefinit", "preview": "Previsualització", "previous": "Anterior", - "previous_memory": "Memòria anterior", - "previous_or_next_day": "Dia endavant/enrere", - "previous_or_next_month": "Mes endavant/enrere", - "previous_or_next_photo": "Foto endavant/enrere", - "previous_or_next_year": "Any endavant/enrere", + "previous_memory": "Record anterior", + "previous_or_next_day": "Dia següent/anterior", + "previous_or_next_month": "Mes següent/anterior", + "previous_or_next_photo": "Foto següent/anterior", + "previous_or_next_year": "Any següent/anterior", "primary": "Primària", "privacy": "Privacitat", "profile": "Perfil", "profile_drawer_app_logs": "Registres", "profile_drawer_github": "GitHub", - "profile_drawer_readonly_mode": "Mode només lectura. Feu pulsació llarga a la icona de l'avatar d'usuari per sortir.", - "profile_image_of_user": "Imatge de perfil de {user}", - "profile_picture_set": "Imatge de perfil configurada.", - "projection_type": "Tipus de Projecció", + "profile_drawer_readonly_mode": "Mode de només lectura. Mantingueu premuda la icona de l’avatar d’usuari per a sortir-ne.", + "profile_image_of_user": "Imatge de perfil de l’usuari {user}", + "profile_picture_set": "S’ha definit la imatge de perfil.", + "projection_type": "Tipus de projecció", "public_album": "Àlbum públic", - "public_share": "Compartit públicament", - "purchase_account_info": "Contribuent", - "purchase_activated_subtitle": "Gràcies per donar suport a Immich i al programari de codi obert", + "public_share": "Compartició pública", + "purchase_account_info": "Col·laborador", + "purchase_activated_subtitle": "Gràcies per donar suport a l’Immich i al programari de codi obert", "purchase_activated_time": "Activat el {date}", - "purchase_activated_title": "La teva clau s'ha activat correctament", - "purchase_button_activate": "Activar", - "purchase_button_buy": "Comprar", - "purchase_button_buy_immich": "Compra Immich", - "purchase_button_never_show_again": "No mostrar mai més", - "purchase_button_reminder": "Recordar en 30 dies", + "purchase_activated_title": "La vostra clau s’ha activat correctament", + "purchase_button_activate": "Activa", + "purchase_button_buy": "Compra", + "purchase_button_buy_immich": "Compra l’Immich", + "purchase_button_never_show_again": "No ho tornis a mostrar", + "purchase_button_reminder": "Recorda-m’ho d’aquí a 30 dies", "purchase_button_remove_key": "Elimina la clau", - "purchase_button_select": "Seleccioneu", - "purchase_failed_activation": "No s'ha pogut activar! Si us plau, comproveu el vostre correu electrònic per trobar la clau de producte correcta!", + "purchase_button_select": "Selecciona", + "purchase_failed_activation": "No s’ha pogut activar! Reviseu el vostre correu electrònic per a obtenir la clau del producte correcta!", "purchase_individual_description_1": "Per a un particular", - "purchase_individual_description_2": "Estat de la contribució", + "purchase_individual_description_2": "Estatus de col·laborador", "purchase_individual_title": "Individual", - "purchase_input_suggestion": "Tens una clau de producte? Introduïu la clau a continuació", + "purchase_input_suggestion": "Teniu una clau del producte? Introduïu-la a continuació", "purchase_lifetime_description": "Compra de per vida", "purchase_option_title": "OPCIONS DE COMPRA", - "purchase_panel_info_1": "Crear Immich requereix molt de temps i esforç, tenim enginyers a temps complet treballant-hi per fer-ho tan bo com sigui possible. La nostra missió és que el programari de codi obert i les pràctiques empresarials ètiques es converteixin en una font d'ingressos sostenible per als desenvolupadors i creïn un ecosistema que respecti la privacitat amb alternatives reals als serveis cloud explotadors.", - "purchase_panel_info_2": "Estem compromesos a no afegir murs de pagament, aquesta compra no us otorgarà cap funció addicional a Immich. Confiem en usuaris com tu per donar suport al desenvolupament continuat d'Immich.", - "purchase_panel_title": "Donar suport al projecte", + "purchase_panel_info_1": "Desenvolupar l’Immich requereix molt de temps i esforç i tenim enginyers treballant-hi a temps complet per a fer-lo tan bo com sigui possible. La nostra missió és que el programari de codi obert i les pràctiques empresarials ètiques esdevinguin una font d’ingressos sostenible per als desenvolupadors i creïn un ecosistema que respecti la privacitat amb alternatives reals als serveis al núvol explotadors.", + "purchase_panel_info_2": "Com que estem compromesos a no afegir murs de pagament, aquesta compra no us atorgarà cap funcionalitat addicional a l’Immich. Confiem en els usuaris com vós perquè doneu suport al desenvolupament continuat de l’Immich.", + "purchase_panel_title": "Dóna suport al projecte", "purchase_per_server": "Per servidor", "purchase_per_user": "Per usuari", "purchase_remove_product_key": "Elimina la clau del producte", - "purchase_remove_product_key_prompt": "Esteu segur que voleu eliminar la clau del producte?", - "purchase_remove_server_product_key": "Elimina la clau de producte del servidor", - "purchase_remove_server_product_key_prompt": "Esteu segur que voleu eliminar la clau de producte del servidor?", + "purchase_remove_product_key_prompt": "Segur que voleu eliminar la clau del producte?", + "purchase_remove_server_product_key": "Elimina la clau del producte del servidor", + "purchase_remove_server_product_key_prompt": "Segur que voleu eliminar la clau del producte del servidor?", "purchase_server_description_1": "Per a tot el servidor", - "purchase_server_description_2": "Estat del contribuent", + "purchase_server_description_2": "Estatus de col·laborador", "purchase_server_title": "Servidor", - "purchase_settings_server_activated": "La clau de producte del servidor la gestiona l'administrador", - "query_asset_id": "Consulta d'identificació d'actius", - "queue_status": "En cua {count}/{total}", - "rate_asset": "Valorar Recurs", - "rating": "Valoració", - "rating_clear": "Esborrar valoració", - "rating_count": "{count, plural, =0 {Unrated} one {# estrella} other {# estrelles}}", - "rating_description": "Mostrar la valoració EXIF al panell d'informació", - "reaction_options": "Opcions de reacció", - "read_changelog": "Llegeix el registre de canvis", - "readonly_mode_disabled": "Mode de només lectura desactivat", - "readonly_mode_enabled": "Mode de només lectura activat", + "purchase_settings_server_activated": "La clau del producte del servidor la gestiona l’administrador", + "query_asset_id": "Consulta l’identificador del recurs", + "queue_status": "S’està afegint a la cua {count}/{total}", + "rate_asset": "Puntua el recurs", + "rating": "Puntuació en estrelles", + "rating_clear": "Esborra la puntuació", + "rating_count": "{count, plural, =0 {No puntuat} one {# estrella} other {# estrelles}}", + "rating_description": "Mostra la puntuació Exif al tauler d’informació", + "reaction_options": "Opcions de la reacció", + "read_changelog": "Mostra el registre de canvis", + "readonly_mode_disabled": "S’ha desactivat el mode de només lectura", + "readonly_mode_enabled": "S’ha activat el mode de només lectura", "ready_for_upload": "Llest per a pujar", - "reassign": "Reassignar", - "reassigned_assets_to_existing_person": "{count, plural, one {S'ha reassignat # recurs} other {S'han reassignat # recursos}} a {name, select, null {una persona existent} other {{name}}}", - "reassigned_assets_to_new_person": "{count, plural, one {S'ha reassignat # recurs} other {S'han reassignat # recursos}} a una persona nova", - "reassing_hint": "Assignar els elements seleccionats a una persona existent", - "recent": "Recent", + "reassign": "Reassigna", + "reassigned_assets_to_existing_person": "{count, plural, one {S’ha reassignat # recurs} other {S’han reassignat # recursos}} a {name, select, null {una persona existent} other {{name}}}", + "reassigned_assets_to_new_person": "{count, plural, one {S’ha reassignat # recurs} other {S’han reassignat # recursos}} a una persona nova", + "reassing_hint": "Assigna els recursos seleccionats a una persona existent", + "recent": "Recents", "recent_searches": "Cerques recents", "recently_added": "Afegit recentment", - "recently_added_page_title": "Afegit recentment", - "recently_taken": "Fet recentment", - "refresh": "Actualitzar", - "refresh_encoded_videos": "Actualitza vídeos codificats", - "refresh_faces": "Actualitzar cares", - "refresh_metadata": "Actualitzar les metadades", - "refresh_thumbnails": "Actualitzar la miniatura", - "refreshed": "Actualitzat", - "refreshing_encoded_video": "S'està actualitzant el vídeo codificat", - "refreshing_faces": "Refrescant cares", - "refreshing_metadata": "Actualitzant les metadades", - "regenerating_thumbnails": "Regenerant les miniatures", + "recently_added_body": "Accediu directament a tot el que heu afegit darrerament en una pàgina dedicada.", + "recently_added_description": "Exploreu els vostres recursos ordenats per la data de pujada a l’Immich", + "recently_added_page_title": "Afegits recentment", + "recently_added_title": "Afegits recentment", + "recently_taken": "Capturada recentment", + "refresh": "Actualitza", + "refresh_encoded_videos": "Actualitza els vídeos codificats", + "refresh_faces": "Actualitza les cares", + "refresh_metadata": "Actualitza les metadades", + "refresh_thumbnails": "Actualitza les miniatures", + "refreshed": "S’ha actualitzat", + "refreshing_encoded_video": "S’està actualitzant el vídeo codificat", + "refreshing_faces": "S’estan actualitzant les cares", + "refreshing_metadata": "S’estan actualitzant les metadades", + "regenerating_thumbnails": "S’estan regenerant les miniatures", "remote": "Remot", - "remote_assets": "Recursos Remots", - "remote_media_summary": "Resum de Mitjans Remots", - "remove": "Eliminar", - "remove_assets_album_confirmation": "Confirmes que vols eliminar {count, plural, one {# recurs} other {# recursos}} de l'àlbum?", - "remove_assets_shared_link_confirmation": "Esteu segur que voleu eliminar {count, plural, one {# recurs} other {# recursos}} d'aquest enllaç compartit?", - "remove_assets_title": "Eliminar els elements?", - "remove_custom_date_range": "Elimina l'interval de dates personalitzat", + "remote_assets": "Recursos remots", + "remote_media_summary": "Resum de mitjans remots", + "remove": "Elimina", + "remove_assets_album_confirmation": "Segur que voleu eliminar {count, plural, one {# recurs} other {# recursos}} de l’àlbum?", + "remove_assets_shared_link_confirmation": "Segur que voleu eliminar {count, plural, one {# recurs} other {# recursos}} d’aquest enllaç compartit?", + "remove_assets_title": "Voleu eliminar els recursos?", + "remove_custom_date_range": "Suprimeix l’interval de dates personalitzat", "remove_filter": "Elimina el filtre", - "remove_from_album": "Treu de l'àlbum", - "remove_from_album_action_prompt": "{count} eliminats de l'àlbum", - "remove_from_favorites": "Eliminar dels preferits", - "remove_from_lock_folder_action_prompt": "{count} eliminades de la carpeta protegida", - "remove_from_locked_folder": "Elimina de la carpeta bloquejada", - "remove_from_locked_folder_confirmation": "Segur que vols moure aquestes fotos i vídeos fora de la carpeta bloquejada? Seran visibles a la teva biblioteca.", - "remove_from_shared_link": "Eliminar de l'enllaç compartit", - "remove_memory": "Eliminar memòria", - "remove_photo_from_memory": "Traieu la foto d'aquesta memòria", - "remove_tag": "Elimina l'etiqueta", - "remove_user": "Eliminar l'usuari", - "removed_api_key": "Eliminada la clau d'API: {name}", - "removed_from_archive": "Eliminat de l'arxiu", - "removed_from_favorites": "Eliminat dels preferits", + "remove_from_album": "Elimina de l’àlbum", + "remove_from_album_action_prompt": "{count} eliminats de l’àlbum", + "remove_from_favorites": "Elimina dels preferits", + "remove_from_lock_folder_action_prompt": "{count} eliminats de la carpeta protegida", + "remove_from_locked_folder": "Elimina de la carpeta protegida", + "remove_from_locked_folder_confirmation": "Segur que voleu moure aquestes fotos i vídeos fora de la carpeta bloquejada? Seran visibles a la vostra biblioteca.", + "remove_from_shared_link": "Elimina de l’enllaç compartit", + "remove_memory": "Elimina el record", + "remove_photo_from_memory": "Elimina la foto d’aquest record", + "remove_tag": "Elimina l’etiqueta", + "remove_user": "Elimina l’usuari", + "removed_api_key": "S’ha suprimit la clau de l’API: {name}", + "removed_from_archive": "S’ha eliminat de l’arxiu", + "removed_from_favorites": "S’ha eliminat dels preferits", "removed_from_favorites_count": "{count, plural, other {# eliminats}} dels preferits", - "removed_memory": "Memòria esborrada", - "removed_tagged_assets": "Etiqueta eliminada de {count, plural, one {# actiu} other {# actius}}", - "rename": "Canviar nom", + "removed_memory": "S’ha eliminat la memòria", + "removed_tagged_assets": "S’ha eliminat l’etiqueta {count, plural, one {d’# recurs} other {de # recursos}}", + "rename": "Canvia de nom", "repository": "Repositori", "require_password": "Requereix contrasenya", - "rescan": "Tornar a escanejar", - "reset": "Restablir", - "reset_password": "Restablir contrasenya", - "reset_people_visibility": "Restablir la visibilitat de les persones", - "reset_pin_code": "Restablir el codi PIN", - "reset_pin_code_description": "Si has oblidat el teu codi PIN, pots contactar amb l'administrador del servidor per a reiniciar-lo", - "reset_pin_code_with_password": "Sempre pots reiniciar el codi PIN amb la teva contrasenya", - "reset_sqlite": "Reiniciar base de dades SQLite", - "reset_sqlite_clear_app_data": "Netejar dada", - "reset_sqlite_confirmation": "Segur que vols esborrar les dades de l'aplicació? Això eliminarà tota la configuració i tancarà la sessió.", - "reset_sqlite_confirmation_note": "Nota: Hauràs de reiniciar l'app després d'eliminar.", - "reset_sqlite_done": "Les dades de l'app s'han netejat. Si us plau, reinicia l'app Immich i inicia sessió de nou.", - "reset_sqlite_success": "S'ha reiniciat la base de dades correctament", - "reset_to_default": "Restableix els valors predeterminats", + "rescan": "Torna a escanejar", + "reset": "Restableix", + "reset_password": "Restableix la contrasenya", + "reset_people_visibility": "Restableix la visibilitat de les persones", + "reset_pin_code": "Restableix el codi PIN", + "reset_pin_code_description": "Si heu oblidat el codi PIN, podeu contactar amb l’administrador del servidor per a restablir-lo", + "reset_pin_code_with_password": "Sempre podeu restablir el codi PIN amb la vostra contrasenya", + "reset_sqlite": "Restableix la base de dades SQLite", + "reset_sqlite_clear_app_data": "Esborra les dades", + "reset_sqlite_confirmation": "Segur que voleu esborrar les dades de l’aplicació? S’eliminarà tota la configuració i es tancarà la sessió.", + "reset_sqlite_confirmation_note": "Nota: Caldrà que reinicieu l’aplicació després d’esborrar-les.", + "reset_sqlite_done": "S’han esborrat les dades de l’aplicació. Reinicieu l’Immich i torneu a iniciar la sessió.", + "reset_sqlite_success": "S’ha restablert la base de dades correctament", + "reset_to_default": "Restableix els valors per defecte", "resolution": "Resolució", - "resolve_duplicates": "Resoldre duplicats", - "resolved_all_duplicates": "Tots els duplicats resolts", - "restore": "Recupera", - "restore_all": "Restaurar-ho tot", - "restore_user": "Restaurar l'usuari", - "restored_asset": "Element restaurat", - "resume": "Reprendre", - "resume_paused_jobs": "Reprèn {count, plural, one {# treball pausat} other {# treballs pausats}}", - "review_duplicates": "Revisar duplicats", - "review_large_files": "Revisar fitxers grans", + "resolve_duplicates": "Resol els duplicats", + "resolved_all_duplicates": "S’han resolt tots els duplicats", + "restore": "Restaura", + "restore_all": "Restaura-ho tot", + "restore_user": "Restaura l’usuari", + "restored_asset": "S’ha restaurat el recurs", + "resume": "Reprèn", + "resume_paused_jobs": "Reprèn {count, plural, one {# tasca pausada} other {# tasques pausades}}", + "review_duplicates": "Revisa els duplicats", + "review_large_files": "Revisa els fitxers grans", "role": "Rol", "role_editor": "Editor", - "role_viewer": "Visor", + "role_viewer": "Visualitzador", "running": "En execució", "save": "Desa", - "saved": "Guardat", - "saved_api_key": "Clau d'API guardada", - "saved_profile": "Perfil guardat", - "saved_settings": "Configuració guardada", - "say_something": "Digues quelcom", - "scaffold_body_error_occurred": "S'ha produït un error", - "scaffold_body_error_unrecoverable": "S'ha produït un error irrecuperable. Comparteix l'error i el rastre de la pila a Discord o GitHub perquè puguem ajudar-te. Si us ho aconsella, podeu esborrar les dades de l'aplicació a continuació.", + "saved": "S’ha desat", + "saved_api_key": "S’ha desat la clau de l’API", + "saved_profile": "S’ha desat el perfil", + "saved_settings": "S’ha desat la configuració", + "say_something": "Digueu alguna cosa", + "scaffold_body_error_occurred": "S’ha produït un error", + "scaffold_body_error_unrecoverable": "S’ha produït un error irrecuperable. Compartiu l’error i la traça de la pila al Discord o al GitHub perquè us puguem ajudar. Si us ho aconsellen, podeu esborrar les dades de l’aplicació a continuació.", "scan": "Escaneja", - "scan_all_libraries": "Escanejar totes les llibreries", + "scan_all_libraries": "Escaneja totes les biblioteques", "scan_library": "Escaneja", - "scanning": "Escanejant", - "scanning_for_album": "S'està buscant l'àlbum...", - "screencast_mode_description": "Mostra els indicadors d'esdeveniments del teclat i del ratolí a la pantalla", - "screencast_mode_title": "Activa/desactiva el mode de captura de pantalla", + "scanning": "S’està escanejant", + "scanning_for_album": "S’està escanejant l’àlbum...", + "screencast_mode_description": "Mostra els indicadors d’esdeveniments del teclat i del ratolí a la pantalla", + "screencast_mode_title": "Commuta el mode de gravació", "search": "Cerca", - "search_albums": "Buscar àlbums", - "search_by_context": "Buscar per context", + "search_albums": "Cerqueu àlbums", + "search_by_context": "Cerca per context", "search_by_description": "Cercar per descripció", - "search_by_description_example": "Jornada de senderisme a Sapa", + "search_by_description_example": "Dia de senderisme a Sapa", "search_by_filename": "Cerca per nom de fitxer o extensió", - "search_by_filename_example": "per exemple IMG_1234.JPG o PNG", - "search_by_full_path": "Cerca per camí complert o carpeta", - "search_by_full_path_example": "/John/Projects/3D_Printing/2026-07-01 - pots buscar Projectes, 3D, Impressió, 2026 etc.", - "search_by_ocr": "Buscar per OCR", - "search_by_ocr_example": "Després", - "search_camera_lens_model": "Buscar model de lents....", - "search_camera_make": "Buscar per fabricant de càmara...", - "search_camera_model": "Buscar per model de càmera...", - "search_city": "Buscar per ciutat...", - "search_country": "Buscar per país...", - "search_filter_apply": "Aplicar filtre", - "search_filter_camera_title": "Selecciona el tipus de càmera", + "search_by_filename_example": "per exemple, IMG_1234.JPG o PNG", + "search_by_full_path": "Cerca per camí complet o carpeta", + "search_by_full_path_example": "/Joan/Projectes/Impressió_3D/2026-07-01: podeu cercar Projectes, 3D, Impressió, 2026, etc.", + "search_by_ocr": "Cerca per OCR", + "search_by_ocr_example": "Cafè amb llet", + "search_camera_lens_model": "Cerqueu models d’objectiu...", + "search_camera_make": "Cerqueu fabricants de càmera...", + "search_camera_model": "Cerqueu models de càmera...", + "search_city": "Cerqueu ciutats...", + "search_country": "Cerqueu països...", + "search_filter_apply": "Aplica el filtre", + "search_filter_camera_title": "Seleccioneu el tipus de càmera", "search_filter_date": "Data", - "search_filter_date_interval": "{start} a {end}", - "search_filter_date_title": "Selecciona un rang de dates", - "search_filter_display_option_not_in_album": "No en àlbum", - "search_filter_display_options": "Opcions de Visualització", - "search_filter_filename": "Cerca pel nom del fitxer", + "search_filter_date_interval": "de {start} a {end}", + "search_filter_date_title": "Seleccioneu un interval de dates", + "search_filter_display_option_not_in_album": "En cap àlbum", + "search_filter_display_options": "Opcions de visualització", + "search_filter_filename": "Cerca per nom del fitxer", "search_filter_location": "Ubicació", - "search_filter_location_title": "Selecciona l'ubicació", - "search_filter_media_type": "Tipus de multimèdia", - "search_filter_media_type_title": "Selecciona tipus de multimèdia", - "search_filter_people_title": "Selecciona persones", - "search_filter_star_rating": "Classificació per estrelles", - "search_filter_tags_title": "Seleccionar etiquetes", - "search_for": "Cercar", - "search_for_existing_person": "Busca una persona existent", - "search_no_more_result": "No més resultats", - "search_no_people": "Cap persona", - "search_no_people_named": "Cap persona anomenada \"{name}\"", - "search_no_result": "No s'han trobat resultats, proveu un terme de cerca o una combinació diferents", + "search_filter_location_title": "Seleccioneu una ubicació", + "search_filter_media_type": "Tipus de mitjà", + "search_filter_media_type_title": "Seleccioneu un tipus de mitjà", + "search_filter_people_title": "Seleccioneu persones", + "search_filter_star_rating": "Puntuació per estrelles", + "search_filter_tags_title": "Seleccioneu etiquetes", + "search_for": "Cerca", + "search_for_existing_person": "Cerca una persona existent", + "search_no_more_result": "No hi ha més resultats", + "search_no_people": "No hi ha cap persona", + "search_no_people_named": "No hi ha cap persona anomenada «{name}»", + "search_no_result": "No s’ha trobat cap resultat; proveu un terme de cerca o una combinació diferents", "search_options": "Opcions de cerca", - "search_page_search_photos_videos": "Cerca les teves fotos i vídeos", - "search_page_view_all_button": "Veure tot", - "search_people": "Buscar persones", - "search_places": "Buscar llocs", - "search_rating": "Buscar per qualificació...", - "search_settings": "Configuració de cerca", - "search_state": "Buscar per regió...", - "search_tags": "Cercant etiquetes...", - "search_timezone": "Buscar per fus horari...", - "search_type": "Buscar per tipus", - "search_your_photos": "Cerca les teves fotos", - "searching_locales": "S'estan cercant localitzacions...", + "search_page_search_photos_videos": "Cerqueu les vostres fotos i vídeos", + "search_page_view_all_button": "Mostra-ho tot", + "search_people": "Cerca persones", + "search_places": "Cerca llocs", + "search_rating": "Cerca per puntuació...", + "search_settings": "Configuració de la cerca", + "search_state": "Cerqueu regions...", + "search_tags": "Cerqueu etiquetes...", + "search_timezone": "Cerqueu zones horàries...", + "search_type": "Tipus de cerca", + "search_your_photos": "Cerqueu les vostres fotos", + "searching_locales": "S’estan cercant localitzacions...", "second": "Segon", - "see_all_people": "Veure totes les persones", + "see_all_people": "Mostra totes les persones", "select": "Selecciona", - "select_album": "Seleccionar àlbum", - "select_album_cover": "Seleccionar la portada de l'àlbum", - "select_albums": "Seleccionar àlbums", + "select_album": "Selecciona l’àlbum", + "select_album_cover": "Selecciona la portada de l’àlbum", + "select_albums": "Selecciona àlbums", "select_all": "Selecciona-ho tot", - "select_all_duplicates": "Seleccioneu tots els duplicats", - "select_avatar_color": "Tria color de l'avatar", - "select_count": "{count, plural, one {Selecciona #} other {Selecciona #}}", - "select_cutoff_date": "Seleccionar data de tall", - "select_face": "Selecciona cara", - "select_featured_photo": "Selecciona foto principal", - "select_from_computer": "Seleccionar des de l'ordinador", - "select_keep_all": "Mantén tota la selecció", - "select_new_face": "Selecciona nova cara", - "select_people": "Seleccionar persones", - "select_person": "Seleccionar persona", - "select_person_to_tag": "Selecciona una persona per etiquetar", - "select_photos": "Tria fotografies", + "select_all_duplicates": "Selecciona tots els duplicats", + "select_avatar_color": "Selecciona el color de l’avatar", + "select_count": "{count, plural, one {Selecciona’n #} other {Selecciona’n #}}", + "select_cutoff_date": "Seleccioneu la data de tall", + "select_face": "Selecciona una cara", + "select_featured_photo": "Selecciona la foto principal", + "select_from_computer": "Selecciona de l’ordinador", + "select_keep_all": "Selecciona conservar-ho tot", + "select_new_face": "Selecciona una cara nova", + "select_people": "Selecciona persones", + "select_person": "Selecciona una persona", + "select_person_to_tag": "Selecciona una persona a etiquetar", + "select_photos": "Selecciona fotos", "select_quality": "Selecciona qualitat", - "select_trash_all": "Envia la selecció a la paperera", + "select_trash_all": "Selecciona enviar-ho tot a la paperera", "selected": "Seleccionat", "selected_count": "{count, plural, one {# seleccionat} other {# seleccionats}}", - "selected_gps_coordinates": "Seleccio de coordinades GPS", - "send_message": "Envia missatge", - "send_welcome_email": "Envia correu de benvinguda", - "server_endpoint": "Endpoint de Servidor", - "server_info_box_app_version": "Versió de l'aplicació", + "selected_gps_coordinates": "Coordenades GPS seleccionades", + "send_message": "Envia el missatge", + "send_welcome_email": "Envia el correu electrònic de benvinguda", + "server_endpoint": "Endpoint del servidor", + "server_info_box_app_version": "Versió de l’aplicació", "server_info_box_server_url": "URL del servidor", "server_offline": "Servidor fora de línia", "server_online": "Servidor en línia", - "server_privacy": "Privadesa del servidor", - "server_restarting_description": "Aquesta pàgina es refrescarà momentàniament.", - "server_restarting_title": "El servidor s'està reiniciant", + "server_privacy": "Privacitat del servidor", + "server_restarting_description": "Aquesta pàgina s’actualitzarà aviat.", + "server_restarting_title": "S’està reiniciant el servidor", "server_stats": "Estadístiques del servidor", - "server_update_available": "Actualització del servidor disponible", + "server_update_available": "Hi ha disponible una actualització del servidor", "server_version": "Versió del servidor", - "set": "Establir", - "set_as_album_cover": "Establir com a portada de l'àlbum", - "set_as_featured_photo": "Estableix com a foto destacada", - "set_as_profile_picture": "Establir com a imatge de perfil", - "set_date_of_birth": "Establir data de naixement", - "set_profile_picture": "Establir imatge de perfil", - "set_slideshow_to_fullscreen": "Mostra Diapositives en pantalla completa", - "set_stack_primary_asset": "Estableix com a actiu principal", - "setting_image_navigation_enable_subtitle": "Si està activat, pots navegar a la imatge anterior/següent tocant la quarta part més esquerra/dreta de la pantalla.", - "setting_image_navigation_enable_title": "Toca per navegar", - "setting_image_navigation_title": "Navegació d'imatges", - "setting_image_viewer_help": "El visor de detalls carrega primer la miniatura petita, després carrega la vista prèvia de mida mitjana (si està habilitada), finalment carrega l'original (si està habilitada).", - "setting_image_viewer_original_subtitle": "Activa per carregar la imatge en resolució original (molt gran!). Desactiva per reduir el consum de dades (tant de xarxa com de memòria cau).", + "set": "Defineix", + "set_as_album_cover": "Defineix com a portada de l’àlbum", + "set_as_featured_photo": "Defineix com a foto destacada", + "set_as_profile_picture": "Defineix com a imatge de perfil", + "set_date_of_birth": "Defineix la data de naixement", + "set_profile_picture": "Defineix la imatge de perfil", + "set_slideshow_to_fullscreen": "Mostra les diapositives en pantalla completa", + "set_stack_primary_asset": "Defineix com a recurs principal", + "setting_image_navigation_enable_subtitle": "Si està activat, podeu navegar a la imatge anterior/següent tocant la quarta part més a l’esquerra/dreta de la pantalla.", + "setting_image_navigation_enable_title": "Toqueu per a navegar", + "setting_image_navigation_title": "Navegació per les imatges", + "setting_image_viewer_help": "El visualitzador de detalls carrega primer la miniatura petita, després carrega la previsualització de mida mitjana (si està activada), i finalment carrega l’original (si està activat).", + "setting_image_viewer_original_subtitle": "Activeu-ho per a carregar la imatge en resolució original (molt gran!). Desactiveu-ho per a reduir el consum de dades (tant de xarxa com de memòria cau del dispositiu).", "setting_image_viewer_original_title": "Carrega la imatge original", - "setting_image_viewer_preview_subtitle": "Activa per carregar una imatge de resolució mitjana. Desactiva per carregar directament la imatge original, o bé utilitzar només la miniatura.", - "setting_image_viewer_preview_title": "Carrega la imatge de vista prèvia", - "setting_languages_apply": "Aplicar", - "setting_languages_subtitle": "Canvia el llenguatge de l'aplicació", + "setting_image_viewer_preview_subtitle": "Activeu-ho per a carregar una imatge de resolució mitjana. Desactiveu-ho per carregar directament la imatge original, o bé utilitzar només la miniatura.", + "setting_image_viewer_preview_title": "Carrega la imatge de previsualització", + "setting_languages_apply": "Aplica", + "setting_languages_subtitle": "Canvia la llengua de l’aplicació", "setting_notifications_notify_minutes": "{count} minuts", "setting_notifications_notify_seconds": "{count} segons", "setting_notifications_subtitle": "Ajusta les preferències de notificació", - "setting_video_viewer_auto_play_subtitle": "Comença a veure videos quan s'obrin", - "setting_video_viewer_auto_play_title": "Veure videos automàticament", + "setting_video_viewer_auto_play_subtitle": "Comença a reproduir videos automàticament en obrir-los", + "setting_video_viewer_auto_play_title": "Reprodueix els vídeos automàticament", "setting_video_viewer_looping_title": "Bucle", - "setting_video_viewer_original_video_subtitle": "Quan reproduïu un vídeo des del servidor, reproduïu l'original encara que hi hagi una transcodificació disponible. Pot conduir a l'amortització. Els vídeos disponibles localment es reprodueixen en qualitat original independentment d'aquesta configuració.", + "setting_video_viewer_original_video_subtitle": "Quan mireu un vídeo del servidor, reprodueix l’original encara que hi hagi una transcodificació disponible. Pot provocar que la càrrega del vídeo s’alenteixi. Els vídeos disponibles localment es reprodueixen en qualitat original independentment d’aquesta configuració.", "setting_video_viewer_original_video_title": "Força el vídeo original", "settings": "Configuració", - "settings_saved": "Configuració desada", - "setup_pin_code": "Configurar un codi PIN", - "share": "Compartir", - "share_dialog_preparing": "S'està preparant...", - "share_link": "Compartir Enllaç", - "share_original": "Ús original (gran)", - "share_preview": "Ús de la miniatura (petit)", - "shared": "Compartit", + "settings_saved": "S’ha desat la configuració", + "setup_pin_code": "Configureu un codi PIN", + "share": "Comparteix", + "share_dialog_preparing": "S’està preparant...", + "share_link": "Comparteix l’enllaç", + "share_original": "Utilitza l’original (gran)", + "share_preview": "Utilitza la miniatura (petita)", + "share_quality_body": "Mantingueu premut el botó de compartició per a triar la qualitat de la imatge abans de compartir-la.", + "share_quality_title": "Trieu la qualitat de la compartició", + "shared": "Compartits", "shared_album_activities_input_disable": "Els comentaris estan desactivats", "shared_album_activity_remove_content": "Voleu eliminar aquesta activitat?", - "shared_album_activity_remove_title": "Elimina l'activitat", - "shared_album_section_people_action_error": "S'ha produït un error en retirar-se/eliminar l'àlbum", + "shared_album_activity_remove_title": "Elimina l’activitat", + "shared_album_section_people_action_error": "S’ha produït un error en retirar/eliminar de l’àlbum", "shared_album_section_people_title": "PERSONES", "shared_by": "Compartit per", "shared_by_user": "Compartit per {user}", - "shared_by_you": "Compartit per tu", + "shared_by_you": "Compartit per vós", "shared_from_partner": "Fotos de {partner}", - "shared_intent_upload_button_progress_text": "{current} / {total} Pujat", + "shared_intent_upload_button_progress_text": "{current} / {total} pujats", "shared_link_app_bar_title": "Enllaços compartits", - "shared_link_clipboard_copied_massage": "S'ha copiat al porta-retalls", - "shared_link_create_error": "S'ha produït un error en crear l'enllaç compartit", - "shared_link_custom_url_description": "Accedeix a aquest enllaç compartit amb una URL personalitzada", - "shared_link_edit_description_hint": "Introduïu la descripció de compartició", + "shared_link_clipboard_copied_massage": "S’ha copiat al porta-retalls", + "shared_link_create_error": "S’ha produït un error en crear l’enllaç compartit", + "shared_link_custom_url_description": "Accediu a aquest enllaç compartit amb un URL personalitzat", + "shared_link_custom_url_title": "URL personalitzat", + "shared_link_custom_url_warning": "Advertència: un URL personalitzat que contingui una barra pot comportar-se de manera imprevista.", + "shared_link_edit_description_hint": "Introduïu la descripció de la compartició", "shared_link_edit_expire_after_option_day": "1 dia", "shared_link_edit_expire_after_option_days": "{count} dies", "shared_link_edit_expire_after_option_hour": "1 hora", @@ -1924,327 +1959,336 @@ "shared_link_edit_expire_after_option_minute": "1 minut", "shared_link_edit_expire_after_option_minutes": "{count} minuts", "shared_link_edit_expire_after_option_months": "{count} mesos", - "shared_link_edit_expire_after_option_year": "any {count}", - "shared_link_edit_password_hint": "Introduïu la contrasenya de compartició", - "shared_link_edit_submit_button": "Actualitza l'enllaç", - "shared_link_error_server_url_fetch": "No s'ha pogut obtenir l'URL del servidor", - "shared_link_expires_day": "Caduca d'aquí a {count} dia", - "shared_link_expires_days": "Caduca d'aquí a {count} dies", - "shared_link_expires_hour": "Caduca d'aquí a {count} hora", - "shared_link_expires_hours": "Caduca d'aquí a {count} hores", - "shared_link_expires_minute": "Caduca d'aquí a {count} minut", - "shared_link_expires_minutes": "Caduca d'aquí a {count} minuts", + "shared_link_edit_expire_after_option_year": "{count} any", + "shared_link_edit_password_hint": "Introduïu la contrasenya de la compartició", + "shared_link_edit_submit_button": "Actualitza l’enllaç", + "shared_link_error_server_url_fetch": "No s’ha pogut obtenir l’URL del servidor", + "shared_link_expires_day": "Caduca d’aquí a {count} dia", + "shared_link_expires_days": "Caduca d’aquí a {count} dies", + "shared_link_expires_hour": "Caduca d’aquí a {count} hora", + "shared_link_expires_hours": "Caduca d’aquí a {count} hores", + "shared_link_expires_minute": "Caduca d’aquí a {count} minut", + "shared_link_expires_minutes": "Caduca d’aquí a {count} minuts", "shared_link_expires_never": "Caduca ∞", - "shared_link_expires_second": "Caduca d'aquí a {count} segon", - "shared_link_expires_seconds": "Caduca d'aquí a {count} segons", - "shared_link_individual_shared": "Individual compartit", + "shared_link_expires_second": "Caduca d’aquí a {count} segon", + "shared_link_expires_seconds": "Caduca d’aquí a {count} segons", + "shared_link_individual_shared": "Compartit individualment", "shared_link_info_chip_metadata": "EXIF", "shared_link_manage_links": "Gestiona els enllaços compartits", - "shared_link_options": "Opcions d'enllaços compartits", - "shared_link_password_description": "Requereix una contrasenya per accedir a aquest enllaç compartit", + "shared_link_options": "Opcions dels enllaços compartits", + "shared_link_password_description": "Requereix una contrasenya per a accedir a aquest enllaç compartit", "shared_links": "Enllaços compartits", - "shared_links_description": "Comparteix fotos i vídeos amb un enllaç", + "shared_links_description": "Compartiu fotos i vídeos amb un enllaç", "shared_photos_and_videos_count": "{assetCount, plural, other {# fotos i vídeos compartits.}}", "shared_with_me": "Compartit amb mi", "shared_with_partner": "Compartit amb {partner}", - "sharing": "Compartit", - "sharing_enter_password": "Introduïu la contrasenya per veure aquesta pàgina.", - "shift_to_permanent_delete": "premeu ⇧ per suprimir el recurs permanentment", - "show_album_options": "Mostra les opcions d'àlbum", - "show_albums": "Mostrar àlbums", - "show_all_people": "Veure totes les persones", + "sharing": "Compartits", + "sharing_enter_password": "Introduïu la contrasenya per a veure aquesta pàgina.", + "shift_to_permanent_delete": "premeu ⇧ per a suprimir el recurs permanentment", + "show_album_options": "Mostra les opcions de l’àlbum", + "show_albums": "Mostra els àlbums", + "show_all_people": "Mostra totes les persones", "show_and_hide_people": "Mostra i amaga persones", - "show_file_location": "Mostra l'ubicació del fitxer", + "show_file_location": "Mostra la ubicació del fitxer", "show_gallery": "Mostra la galeria", - "show_hidden_people": "Mostra persones ocultes", + "show_hidden_people": "Mostra les persones amagades", "show_in_timeline": "Mostra a la cronologia", - "show_in_timeline_setting_description": "Mostra fotos i vídeos d'aquest usuari a la cronologia", - "show_keyboard_shortcuts": "Mostra dreceres de teclat", - "show_less": "Mostra'n menys", - "show_metadata": "Mostra metadades", - "show_more_fields": "{count, plural, one {Veure # camp més} other {Veure # camps més}}", - "show_or_hide_info": "Mostra o amaga informació", - "show_password": "Mostra contrasenya", - "show_person_options": "Mostra opcions de la persona", - "show_progress_bar": "Mostra barra de progrés", - "show_schema": "Mostrar esquema", - "show_search_options": "Mostra opcions de cerca", + "show_in_timeline_setting_description": "Mostra les fotos i els vídeos d’aquest usuari a la cronologia", + "show_keyboard_shortcuts": "Mostra les dreceres del teclat", + "show_less": "Mostra’n menys", + "show_metadata": "Mostra les metadades", + "show_more_fields": "{count, plural, one {Mostra # camp més} other {Mostra # camps més}}", + "show_or_hide_info": "Mostra o amaga la informació", + "show_password": "Mostra la contrasenya", + "show_person_options": "Mostra les opcions de la persona", + "show_progress_bar": "Mostra la barra de progrés", + "show_schema": "Mostra l’esquema", + "show_search_options": "Mostra les opcions de cerca", "show_shared_links": "Mostra els enllaços compartits", - "show_slideshow_metadata_overlay": "Mostra informació sobre la imatge", + "show_slideshow_metadata_overlay": "Mostra la informació sobre la imatge", "show_slideshow_transition": "Mostra la transició de la presentació de diapositives", - "show_supporter_badge": "Insígnia de contribuent", - "show_supporter_badge_description": "Mostra una insígnia de contributor", + "show_supporter_badge": "Insígnia de col·laborador", + "show_supporter_badge_description": "Mostra una insígnia de col·laborador", "show_text_recognition": "Mostra el reconeixement de text", - "show_text_search_menu": "Mostra el menú de cerca amb text", - "shuffle": "Mescla", + "show_text_search_menu": "Mostra el menú de cerca per text", + "shuffle": "Mescla aleatòriament", "sidebar": "Barra lateral", "sidebar_display_description": "Mostra un enllaç a la vista a la barra lateral", - "sign_out": "Tanca sessió", - "sign_up": "Registrar-se", + "sign_out": "Tanca la sessió", + "sign_up": "Registra-m’hi", "size": "Mida", + "skip": "Omet", "skip_to_content": "Salta al contingut", - "skip_to_folders": "Anar a carpetes", - "skip_to_tags": "Anar a etiquetes", - "slideshow": "Diapositives", - "slideshow_metadata_overlay_mode": "Contingut de superposició", - "slideshow_metadata_overlay_mode_description_only": "Descripció només", + "skip_to_folders": "Vés a les carpetes", + "skip_to_tags": "Vés a les etiquetes", + "slideshow": "Presentació de diapositives", + "slideshow_body": "Relaxeu-vos i mireu com es reprodueixen les vostres fotos en una presentació de diapositives a pantalla completa.", + "slideshow_metadata_overlay_mode": "Contingut superposat", + "slideshow_metadata_overlay_mode_description_only": "Només la descripció", "slideshow_metadata_overlay_mode_full": "Tot", "slideshow_repeat": "Repeteix la presentació de diapositives", - "slideshow_repeat_description": "Torna al principi quan acaba la presentació de diapositives", - "slideshow_settings": "Configuració de diapositives", + "slideshow_repeat_description": "Torna al principi quan acabi la presentació de diapositives", + "slideshow_settings": "Configuració de la presentació de diapositives", + "slideshow_title": "Presentació de diapositives", "smart_album": "Àlbum inteŀligent", - "some_assets_already_have_a_location_warning": "Alguns dels actius seleccionats ja tenen una ubicació", - "sort_albums_by": "Ordena àlbums per...", + "some_assets_already_have_a_location_warning": "Alguns dels recursos seleccionats ja tenen una ubicació", + "sort_albums_by": "Ordena els àlbums per...", "sort_created": "Data de creació", - "sort_items": "Quantitat d'elements", + "sort_items": "Nombre d’elements", "sort_modified": "Data de modificació", "sort_oldest": "Foto més antiga", - "sort_people_by_similarity": "Ordenar personar per semblança", + "sort_people_by_similarity": "Ordena les persones per similitud", "sort_recent": "Foto més recent", "sort_title": "Títol", "source": "Font", "stack": "Apila", "stack_action_prompt": "{count} apilats", - "stack_duplicates": "Aplica duplicats", + "stack_duplicates": "Apila els duplicats", "stack_selected_photos": "Apila les fotos seleccionades", - "stacked_assets_count": "Apilats {count, plural, one {# element} other {# elements}}", - "stacktrace": "Traça de pila", + "stacked_assets_count": "{count, plural, one {S’ha apilat # recurs} other {S’han apilat # recursos}}", + "stacktrace": "Traça de la pila", "start": "Inicia", "start_date": "Data inicial", - "start_date_before_end_date": "La data d'inici ha de ser abans de la data de fi", + "start_date_before_end_date": "La data inicial ha de ser abans de la data final", "state": "Regió", "status": "Estat", - "step_delete": "Elimina el pas", - "step_delete_confirm": "Esteu segur que voleu eliminar el pas?", + "step_delete": "Suprimeix el pas", + "step_delete_confirm": "Segur que voleu suprimir aquest pas?", "step_details": "Detalls del pas", "steps": "Passos", - "stop_casting": "Atura la transmisió", - "stop_motion_photo": "Atura foto en moviment", - "stop_photo_sharing": "Deixar de compartir les teves fotos?", - "stop_photo_sharing_description": "{partner} no podrà tornar a accedir a les vostres fotos.", + "stop_casting": "Atura l’emissió", + "stop_motion_photo": "Atura la foto en moviment", + "stop_photo_sharing": "Voleu deixar de compartir les fotos?", + "stop_photo_sharing_description": "{partner} ja no podrà accedir a les vostres fotos.", "stop_sharing_photos_with_user": "Deixa de compartir les fotos amb aquest usuari", - "storage": "Emmagatzematge", - "storage_label": "Etiquetatge d'emmagatzematge", - "storage_quota": "Quota d'emmagatzematge", + "storage": "Espai d’emmagatzematge", + "storage_label": "Etiqueta d’emmagatzematge", + "storage_quota": "Quota d’emmagatzematge", "storage_usage": "{used} de {available} en ús", "submit": "Envia", - "success": "Amb èxit", + "success": "Completat", "suggestions": "Suggeriments", "sunrise_on_the_beach": "Albada a la platja", - "support": "Suport", - "support_and_feedback": "Suport i comentaris", - "support_third_party_description": "La vostra instal·lació immich la va empaquetar un tercer. Els problemes que experimenteu poden ser causats per aquest paquet així que, si us plau, plantegeu els poblemes amb ells en primer lloc mitjançant els enllaços següents.", - "supporter": "Contribuïdor", - "swap_merge_direction": "Intercanvia la direcció d'unió", + "support": "Assistència", + "support_and_feedback": "Assistència i comentaris", + "support_third_party_description": "La vostra instal·lació de l’Immich està empaquetada per un tercer. Els problemes que experimenteu poden ser causats per aquest paquet, de manera que comuniqueu els problemes en primer lloc amb ells mitjançant els enllaços següents.", + "supporter": "Col·laborador", + "swap_merge_direction": "Inverteix la direcció de la fusió", "sync": "Sincronitza", - "sync_albums": "Sincronitza àlbums", - "sync_local": "Sincronitza localment", - "sync_remote": "Sincronitza remotament", - "sync_status": "Estat de la incronització", - "sync_status_subtitle": "Observa i administra el sistema de sincronització", - "sync_upload_album_setting_subtitle": "Creeu i pugeu les seves fotos i vídeos als àlbums seleccionats a Immich", + "sync_albums": "Sincronitza els àlbums", + "sync_local": "Sincronització local", + "sync_remote": "Sincronització remota", + "sync_status": "Estat de la sincronització", + "sync_status_subtitle": "Vegeu i gestioneu el sistema de sincronització", + "sync_upload_album_setting_subtitle": "Creeu i pugeu les vostres fotos i vídeos als àlbums seleccionats a l’Immich", "system_theme": "Tema del sistema", "system_theme_command_description": "Utilitza el tema del sistema ({value})", "tag": "Etiqueta", - "tag_assets": "Etiquetar actius", - "tag_created": "Etiqueta creada: {tag}", + "tag_assets": "Etiqueta els recursos", + "tag_created": "S’ha creat l’etiqueta: {tag}", "tag_face": "Etiqueta una cara", - "tag_feature_description": "Exploreu fotos i vídeos agrupats per temes d'etiquetes lògiques", - "tag_people": "Etiquetar personas", - "tag_updated": "Etiqueta actualizada: {tag}", - "tagged_assets": "{count, plural, one {#Etiquetat} other {#Etiquetats}} {count, plural, one {# actiu} other {# actius}}", + "tag_feature_description": "Exploreu fotos i vídeos agrupats per temes d’etiquetes lògiques", + "tag_people": "Etiqueta persones", + "tag_updated": "S’ha actualitzat l’etiqueta: {tag}", + "tagged_assets": "{count, plural, one {S’ha etiquetat # recurs} other {S’han etiquetat # recursos}}", "tags": "Etiquetes", - "tap_to_run_job": "Toca per executar el treball", + "tap_to_run_job": "Toqueu per a executar la tasca", "template": "Plantilla", "text_recognition": "Reconeixement de text", "theme": "Tema", - "theme_selection": "Selecció de tema", + "theme_selection": "Selecció del tema", "theme_selection_description": "Activa automàticament el tema fosc o clar en funció de les preferències del sistema del navegador", - "theme_setting_asset_list_storage_indicator_title": "Mostra l'indicador d'emmagatzematge als títols dels elements", - "theme_setting_asset_list_tiles_per_row_title": "Nombre d'elements per fila ({count})", - "theme_setting_colorful_interface_subtitle": "Apliqueu color primari a les superfícies de fons.", - "theme_setting_colorful_interface_title": "Interfície colorida", + "theme_setting_asset_list_storage_indicator_title": "Mostra l’indicador d’emmagatzematge a les tessel·les dels recursos", + "theme_setting_asset_list_tiles_per_row_title": "Nombre de recursos per fila ({count})", + "theme_setting_colorful_interface_subtitle": "Aplica el color primari a les superfícies de fons.", + "theme_setting_colorful_interface_title": "Interfície acolorida", "theme_setting_primary_color_subtitle": "Trieu un color per a les accions i els accents principals.", "theme_setting_primary_color_title": "Color primari", - "theme_setting_system_primary_color_title": "Utilitza color de sistema", - "theme_setting_system_theme_switch": "Automàtic (Segueix la configuració del sistema)", + "theme_setting_system_primary_color_title": "Utilitza el color de sistema", + "theme_setting_system_theme_switch": "Automàtic (segueix la configuració del sistema)", "then": "Aleshores", - "they_will_be_merged_together": "Es combinaran", + "they_will_be_merged_together": "Es fusionaran", "third_party_resources": "Recursos de tercers", "time": "Temps", "time_based_memories": "Records basats en el temps", - "time_based_memories_duration": "Quants segons es mostrarà cada imatge.", + "time_based_memories_duration": "Nombre de segons que es mostrarà cada imatge.", "timeline": "Cronologia", - "timezone": "Fus horari", - "to_archive": "Arxivar", - "to_change_password": "Canviar la contrasenya", - "to_favorite": "Prefereix", - "to_login": "Iniciar sessió", - "to_multi_select": "per multi-seleccionar", - "to_parent": "Anar als pares", - "to_select": "per seleccionar", + "timezone": "Zona horària", + "to_archive": "Arxiva", + "to_change_password": "Canvia la contrasenya", + "to_favorite": "Afegeix als preferits", + "to_login": "Inicia la sessió", + "to_multi_select": "per a seleccionar-ne múltiples", + "to_parent": "Vés al pare", + "to_select": "per a seleccionar", "to_trash": "Paperera", - "toggle_settings": "Canvia configuració", + "toggle_settings": "Commuta la configuració", "toggle_theme_description": "Commuta el tema", "total": "Total", "total_usage": "Ús total", "trash": "Paperera", - "trash_action_prompt": "{count} mogudes a la brossa", - "trash_all": "Envia-ho tot a la paperera", - "trash_count": "Paperera {count, number}", - "trash_delete_asset": "Esborra/Elimina element", - "trash_no_results_message": "Les imatges i vídeos que s'enviïn a la paperera es mostraran aquí.", - "trash_page_delete_all": "Eliminar-ho tot", - "trash_page_info": "Els elements que s'enviïn a la paperera s'eliminaran permanentment després de {days} dies", - "trashed_items_will_be_permanently_deleted_after": "Els elements que s'enviïn a la paperera s'eliminaran permanentment després de {days, plural, one {# dia} other {# dies}}.", + "trash_action_prompt": "{count, plural, one {S’ha mogut # recurs} other {S’han mogut # recursos}} a la paperera", + "trash_all": "Tot a la paperera", + "trash_count": "{count, number} a la paperera", + "trash_delete_asset": "Mou a la paperera/Suprimeix el recurs", + "trash_no_results_message": "Les imatges i vídeos que es moguin a la paperera es mostraran aquí.", + "trash_page_delete_all": "Suprimeix-ho tot", + "trash_page_info": "Els elements moguts a la paperera se suprimiran permanentment després de {days} dies", + "trashed_items_will_be_permanently_deleted_after": "Els elements moguts a la paperera se suprimiran permanentment després {days, plural, one {d’# dia} other {de # dies}}.", "trigger": "Disparador", - "trigger_asset_metadata_extraction": "Extracció de metadades d'actius", - "trigger_asset_metadata_extraction_description": "Disparat quan s'extreuen les metadades EXIF d'un actiu", - "trigger_asset_uploaded": "Càrrega de Mitjans", - "trigger_asset_uploaded_description": "Es dispara quan un nou mitjà es puge al servidor", - "trigger_person_recognized": "Persona identificada", - "trigger_person_recognized_description": "Disparat quan es reconeix una persona", + "trigger_asset_metadata_extraction": "Extracció de metadades dels recursos", + "trigger_asset_metadata_extraction_description": "Es dispara quan s’extreuen les metadades EXIF d’un recurs", + "trigger_asset_uploaded": "Pujada de recursos", + "trigger_asset_uploaded_description": "Es dispara quan es puja un recurs nou", + "trigger_person_recognized": "Persona reconeguda", + "trigger_person_recognized_description": "Es dispara quan es reconeix una persona", "troubleshoot": "Solució de problemes", "type": "Tipus", - "unable_to_change_pin_code": "No es pot canviar el codi PIN", - "unable_to_check_version": "No es pot comprovar la versió de l'aplicació ni del servidor", - "unable_to_setup_pin_code": "No s'ha pogut configurar el codi PIN", - "unarchive": "Desarxivar", - "unarchive_action_prompt": "{count} eliminades de l'arxiu", - "unarchived_count": "{count, plural, other {# elements desarxivats}}", - "undo": "Desfer", - "unfavorite": "Reverteix preferit", - "unfavorite_action_prompt": "{count} eliminades de preferits", - "unhide_person": "Mostra persona", + "unable_to_change_pin_code": "No s’ha pogut canviar el codi PIN", + "unable_to_check_version": "No s’ha pogut comprovar la versió de l’aplicació ni del servidor", + "unable_to_setup_pin_code": "No s’ha pogut definir el codi PIN", + "unarchive": "Desarxiva", + "unarchive_action_prompt": "{count, plural, one {S’ha eliminat # recurs de l’arxiu} other {S’han eliminat # recursos de l’arxiu}}", + "unarchived_count": "{count, plural, one {S’ha desarxivat # recurs} other {S’han desarxivat # recursos}}", + "undo": "Desfés", + "unfavorite": "Elimina dels preferits", + "unfavorite_action_prompt": "{count, plural, one {S’ha eliminat # recurs dels preferits} other {S’han eliminat # recursos dels preferits}}", + "unhide_person": "Deixa d’amagar la persona", "unknown": "Desconegut", - "unknown_country": "País Desconegut", + "unknown_country": "País desconegut", "unknown_date": "Data desconeguda", + "unknown_schema": "Esquema desconegut", "unknown_year": "Any desconegut", - "unlimited": "Il·limitat", - "unlink_motion_video": "Desvincular vídeo en moviment", - "unlink_oauth": "Desvincula OAuth", - "unlinked_oauth_account": "Compte Oauth desvinculat", - "unmute_memories": "Activar el so dels records", + "unlimited": "Il·limitada", + "unlink_motion_video": "Desenllaça el vídeo en moviment", + "unlink_oauth": "Desenllaça l’OAuth", + "unlinked_oauth_account": "S’ha desenllaçat el compte d’Oauth", + "unmute_memories": "Deixa de silenciar els records", "unnamed_album": "Àlbum sense nom", - "unnamed_album_delete_confirmation": "Segur que voleu esborrar aquest àlbum?", - "unnamed_share": "Compartit sense nom", + "unnamed_album_delete_confirmation": "Segur que voleu suprimir aquest àlbum?", + "unnamed_share": "Compartició sense nom", "unsaved_change": "Canvi no desat", "unselect_all": "Deselecciona-ho tot", - "unselect_all_duplicates": "Desmarqueu tots els duplicats", + "unselect_all_duplicates": "Deselecciona tots els duplicats", "unstack": "Desapila", - "unstack_action_prompt": "{count} sense apilar", - "unstacked_assets_count": "No apilat {count, plural, one {# recurs} other {# recursos}}", - "unsupported_field_type": "Tipus de camp no suportat", - "unsupported_file_type": "No es pot carregar el fitxer {file} perquè el seu tipus de fitxer {type} no és compatible.", + "unstack_action_prompt": "{count, plural, one {S’ha desapilat # recurs} other {S’han desapilat # recursos}}", + "unstacked_assets_count": "{count, plural, one {S’ha desapilat # recurs} other {S’han desapilat # recursos}}", + "unsupported_field_type": "Tipus de camp no admès", + "unsupported_file_type": "No es pot carregar el fitxer {file} perquè no s’admet el seu tipus de fitxer {type}.", "untagged": "Sense etiqueta", - "up_next": "Pròxim", - "update_location_action_prompt": "Actualitza la ubicació de {count} elements seleccionats amb:", + "up_next": "A continuació", + "update_location_action_prompt": "Actualitza la ubicació dels {count} recursos seleccionats a:", "updated_at": "Actualitzat", - "updated_password": "Contrasenya actualitzada", - "upload": "Pujar", + "updated_password": "S’ha actualitzat la contrasenya", + "upload": "Puja", "upload_concurrency": "Concurrència de pujades", "upload_day_count": "{date}: {count, plural, one {# pujada} other {# pujades}}", - "upload_details": "Detalls de la Pujada", - "upload_error_with_count": "Error en la càrrega de {count, plural, one {# actiu} other {# actius}}", - "upload_errors": "Càrrega completada amb {count, plural, one {# error} other {# errors}}, actualitzeu la pàgina per veure els nous elements carregats.", - "upload_finished": "Pujada finalitzada", - "upload_progress": "Restant {remaining, number} - Processat {processed, number}/{total, number}", - "upload_skipped_duplicates": "{count, plural, one {S'ha omès # recurs duplicat} other {S'han omès # recursos duplicats}}", + "upload_details": "Detalls de la pujada", + "upload_error_with_count": "S’ha produït un error en la pujada {count, plural, one {d’# recurs} other {de # recursos}}", + "upload_errors": "S’ha completat la pujada amb {count, plural, one {# error} other {# errors}}; actualitzeu la pàgina per a veure els nous recursos pujats.", + "upload_finished": "Ha finalitzat la pujada", + "upload_progress": "Restants {remaining, number} - Processats {processed, number}/{total, number}", + "upload_skipped_duplicates": "{count, plural, one {S’ha omès # recurs duplicat} other {S’han omès # recursos duplicats}}", "upload_status_duplicates": "Duplicats", "upload_status_errors": "Errors", - "upload_status_uploaded": "Carregat", - "upload_success": "Pujada correcta, actualitza la pàgina per veure nous recursos de pujada.", - "upload_to_immich": "Puja a Immich ({count})", - "uploading": "Pujant", - "uploading_media": "Pujant mitjans", + "upload_status_uploaded": "Pujat", + "upload_success": "La pujada s’ha completat; actualitzeu la pàgina per a veure els nous recursos pujats.", + "upload_to_album_body": "Per als usuaris que no utilitzen la funció de pujada manual, ara és possible triar afegir fotos locals directament a un àlbum a l’hora de penjar-les: ja no cal penjar-les i després afegir-nes a un àlbum.", + "upload_to_album_title": "Puja directament a un àlbum", + "upload_to_immich": "Puja a l’Immich ({count})", + "uploading": "S’està pujant", + "uploading_media": "S’estan pujant els mitjans", "uploads": "Pujades", "uploads_count": "{count, plural, one {# pujada} other {# pujades}}", "url": "URL", "usage": "Ús", - "use_biometric": "Empra biometria", - "use_browser_locale": "Fer servir la localització del navegador", - "use_browser_locale_description": "Formatejar dates, hores i números segons la llengua i regió del navegador", + "use_biometric": "Utilitza la biometria", + "use_browser_locale": "Utilitza la localització del navegador", + "use_browser_locale_description": "Formata les dates, les hores i els números segons la llengua i la regió del navegador", "use_current_connection": "Utilitza la connexió actual", - "use_custom_date_range": "Fes servir un rang de dates personalitzat", + "use_custom_date_range": "Utilitza un interval de dates personalitzat", "use_template": "Utilitza la plantilla", "user": "Usuari", - "user_has_been_deleted": "Aquest usuari ha sigut eliminat.", - "user_id": "ID d'usuari", - "user_liked": "A {user} li ha agradat {type, select, photo {aquesta foto} video {aquest vídeo} asset {aquest recurs} other {}}", + "user_has_been_deleted": "Aquest usuari s’ha eliminat.", + "user_id": "Identificador d’usuari", + "user_liked": "A {user} li ha agradat {type, select, photo {aquesta foto} video {aquest vídeo} asset {aquest recurs} other {això}}", "user_pin_code_settings": "Codi PIN", - "user_pin_code_settings_description": "Gestiona el teu codi PIN", - "user_privacy": "Privadesa d'Usuari", + "user_pin_code_settings_description": "Gestioneu el vostre codi PIN", + "user_privacy": "Privacitat de l’usuari", "user_purchase_settings": "Compra", - "user_purchase_settings_description": "Gestiona la teva compra", - "user_usage_detail": "Detall d'ús d'usuari", - "user_usage_stats": "Estadístiques d'ús de del compte", - "user_usage_stats_description": "Veure les estadístiques d'ús del compte", - "username": "Nom d'usuari", + "user_purchase_settings_description": "Gestioneu la vostra compra", + "user_usage_detail": "Detall d’ús de l’usuari", + "user_usage_stats": "Estadístiques d’ús del compte", + "user_usage_stats_description": "Mostra les estadístiques d’ús del compte", + "username": "Nom d’usuari", "users": "Usuaris", - "users_added_to_album_count": "{count, plural, one {S'ha afegit # usuari} other {S'han afegit # usuaris}} a l'àlbum", + "users_added_to_album_count": "{count, plural, one {S’ha afegit # usuari} other {S’han afegit # usuaris}} a l’àlbum", "utilities": "Utilitats", "validate": "Valida", - "validate_endpoint_error": "Per favor introdueix un URL vàlid", + "validate_endpoint_error": "Introduïu un URL vàlid", "variables": "Variables", "version": "Versió", - "version_announcement_closing": "El teu amic Alex", - "version_announcement_message": "Hola! Hi ha una nova versió d'Immich, si us plau, preneu-vos una estona per llegir les notes de llançament per assegurar que la teva configuració estigui actualitzada per evitar qualsevol error de configuració, especialment si utilitzeu WatchTower o qualsevol mecanisme que gestioni l'actualització automàtica de la vostra instància Immich.", + "version_announcement_closing": "El vostre amic Alex", + "version_announcement_message": "Bon dia! Hi ha disponible una nova versió de l’Immich. Preneu-vos una estona per a llegir les notes del llançament i assegurar-vos que la vostra configuració estigui actualitzada per a evitar qualsevol error de configuració, especialment si utilitzeu WatchTower o qualsevol mecanisme que gestioni l’actualització automàtica de la vostra instància de l’Immich.", "version_history": "Historial de versions", - "version_history_item": "Instal·lat {version} el {date}", + "version_history_item": "S’ha instal·lat {version} el {date}", "video": "Vídeo", - "video_hover_setting": "Reprodueix la miniatura en passar el ratolí", - "video_hover_setting_description": "Reprodueix la miniatura quan el ratolí plana sobre l'element. Fins i tot quan estigui deshabilitat, la reproducció s'iniciarà planant sobre el botó de reproducció.", + "video_hover_setting": "Reprodueix la miniatura del vídeo en posar-s’hi", + "video_hover_setting_description": "Reprodueix la miniatura del vídeo en passar-hi el ratolí per sobre. Fins i tot quan estigui desactivat, la reproducció s’iniciarà si es passa el ratolí per sobre de la icona de reproducció.", "video_quality": "Qualitat del vídeo", "videos": "Vídeos", "videos_count": "{count, plural, one {# vídeo} other {# vídeos}}", - "view": "Veure", - "view_album": "Veure l'àlbum", - "view_all": "Veure tot", - "view_all_users": "Mostra tot els usuaris", - "view_asset_owners": "Veure els propietaris dels actius", - "view_details": "Veure Detalls", - "view_in_timeline": "Mostrar a la línia de temps", - "view_link": "Veure enllaç", - "view_name": "Veure", - "view_next_asset": "Mostra el següent element", - "view_previous_asset": "Mostra l'element anterior", - "view_qr_code": "Veure codi QR", - "view_similar_photos": "Veure fotos similars", - "view_stack": "Veure la pila", + "view": "Visualització", + "view_album": "Mostra l’àlbum", + "view_all": "Mostra-ho tot", + "view_all_users": "Mostra tots els usuaris", + "view_asset_owners": "Mostra els propietaris dels recursos", + "view_details": "Mostra els detalls", + "view_in_timeline": "Mostra a la cronologia", + "view_link": "Mostra l’enllaç", + "view_name": "Mostra", + "view_next_asset": "Mostra el recurs següent", + "view_previous_asset": "Mostra el recurs anterior", + "view_qr_code": "Mostra el codi QR", + "view_similar_photos": "Mostra les fotos similars", + "view_stack": "Mostra la pila", "viewer_remove_from_stack": "Elimina de la pila", "visibility": "Visibilitat", - "visibility_changed": "La visibilitat ha canviat per {count, plural, one {# persona} other {# persones}}", + "visibility_changed": "S’ha canviat la visibilitat {count, plural, one {d’# persona} other {de # persones}}", "visual": "Visual", - "waiting": "Esperant", - "waiting_count": "Esperant: {count}", - "warning": "Avís", + "waiting": "En espera", + "waiting_count": "En espera: {count}", + "warning": "Advertència", "week": "Setmana", - "welcome": "Benvingut", - "welcome_to_immich": "Benvingut a immich", + "welcome": "Us donem la benvinguda", + "welcome_to_immich": "Us donem la benvinguda a l’Immich", + "whats_new": "Novetats", + "whats_new_settings_subtitle": "Vegeu les novetats de l’Immich", + "whats_new_version": "Versió {version}", "when": "Quan", "width": "Amplada", - "wifi_name": "Nom Wi-Fi", + "wifi_name": "Nom de la Wi-Fi", "workflow": "Flux de treball", - "workflow_delete_prompt": "Segur que vols eliminar aquesta automatització?", - "workflow_deleted": "Automatització eliminada", - "workflow_description": "Descripció de l'automatització", - "workflow_info": "Informació de l'automatització", - "workflow_json": "JSON de l'automatització", - "workflow_json_help": "Edita la configuració de l'automatització en format JSON. Els canvis es sincronitzaran amb el constructor visual.", - "workflow_name": "Nom de l'automatització", - "workflow_navigation_prompt": "Segur que vols sortir sense desar els canvis?", - "workflow_summary": "Resum de l'automatització", + "workflow_delete_prompt": "Segur que voleu suprimir aquest flux de treball?", + "workflow_deleted": "S’ha suprimit el flux de treball", + "workflow_description": "Descripció del flux de treball", + "workflow_info": "Informació del flux de treball", + "workflow_json": "JSON del flux de treball", + "workflow_json_help": "Editeu la configuració del flux de treball en format JSON. Els canvis se sincronitzaran amb el constructor visual.", + "workflow_name": "Nom del flux de treball", + "workflow_navigation_prompt": "Segur que voleu sortir sense desar els canvis?", + "workflow_summary": "Resum del flux de treball", "workflow_templates": "Plantilles de fluxos de treball", - "workflow_update_success": "Automatització actualitzada amb èxit", - "workflows": "Automatitzacions", - "workflows_help_text": "Les automatitzacions realitzen accions automàticament sobre els teus mitjans basant-se en disparadors i filtres", - "wrong_pin_code": "Codi PIN incorrecte", + "workflow_update_success": "S’ha actualitzat el flux de treball correctament", + "workflows": "Fluxos de treball", + "workflows_help_text": "Els fluxos de treball automatitzen accions sobre els vostres recursos basant-se en disparadors i filtres", + "wrong_pin_code": "El codi PIN no és correcte", "x_of_total": "{x}/{total}", "year": "Any", "years_ago": "Fa {years, plural, one {# any} other {# anys}}", "yes": "Sí", - "you_dont_have_any_shared_links": "No tens cap enllaç compartit", - "your_wifi_name": "Nom del teu Wi-Fi", - "zero_to_clear_rating": "prem 0 per a buidar la valoració", - "zoom_image": "Ampliar Imatge" + "you_dont_have_any_shared_links": "No teniu cap enllaç compartit", + "your_wifi_name": "Nom de la vostra Wi-Fi", + "zero_to_clear_rating": "premeu 0 per a esborrar la puntuació del recurs", + "zoom_image": "Amplia la imatge" } diff --git a/i18n/cs.json b/i18n/cs.json index 10fecebc99..ccf5b931b7 100644 --- a/i18n/cs.json +++ b/i18n/cs.json @@ -108,6 +108,21 @@ "image_thumbnail_quality_description": "Kvalita miniatur od 1 do 100. Vyšší je lepší, ale vytváří větší soubory a může snížit odezvu aplikace.", "image_thumbnail_title": "Miniatury", "import_config_from_json_description": "Importujte konfiguraci systému nahráním konfiguračního JSON souboru", + "integrity_checks_checksum_files": "Kontrolní součty souborů", + "integrity_checks_checksum_files_description": "Nastavení kontroly kontrolního součtu", + "integrity_checks_checksum_files_enable_description": "Zapnout kontrolu kontrolního součtu", + "integrity_checks_checksum_files_percentage_limit": "Procentuální limit", + "integrity_checks_checksum_files_percentage_limit_description": "Nastavte maximální procentuální hodnotu v rozmezí 0.01 až 1, která určuje, jak často se má v daném intervalu provádět kontrola kontrolního součtu.", + "integrity_checks_checksum_files_time_limit": "Časový limit", + "integrity_checks_checksum_files_time_limit_description": "Nastavte maximální dobu, po kterou by měla v každém intervalu probíhat kontrola kontrolního součtu. (ms)", + "integrity_checks_missing_files": "Chybějící soubory", + "integrity_checks_missing_files_description": "Nastavte frekvenci a zapněte nebo vypněte kontrolu chybějících souborů", + "integrity_checks_missing_files_enable_description": "Zapnout kontrolu chybějících souborů", + "integrity_checks_settings": "Kontroly integrity", + "integrity_checks_settings_description": "Správa intervalů kontrol integrity", + "integrity_checks_untracked_files": "Nesledované soubory", + "integrity_checks_untracked_files_description": "Nastavte frekvenci a zapněte nebo vypněte kontrolu nesledovaných souborů", + "integrity_checks_untracked_files_enable_description": "Zapnout kontrolu nesledovaných souborů", "job_concurrency": "Souběžnost úlohy {job}", "job_created": "Úloha vytvořena", "job_not_concurrency_safe": "Tato úloha není bezpečená pro souběh.", @@ -189,7 +204,7 @@ "maintenance_delete_error": "Nepodařilo se smazat zálohu.", "maintenance_integrity_check": "Zkontrolovat", "maintenance_integrity_check_all": "Zkontrolovat vše", - "maintenance_integrity_checksum_mismatch": "Neshoda kontrolního součtu", + "maintenance_integrity_checksum_mismatch": "Neshoda kontrol. součtu", "maintenance_integrity_checksum_mismatch_description": "Soubory, u nichž se kontrolní součet na disku neshoduje s kontrolním součtem, který Immich uložil do své databáze.", "maintenance_integrity_checksum_mismatch_job": "Kontrola shod kontrolních součtů", "maintenance_integrity_checksum_mismatch_refresh_job": "Obnovit hlášení o neshodách kontrolních součtů", @@ -416,6 +431,10 @@ "transcoding_realtime_description": "Umožňuje provádět překódování v reálném čase během přenosu videa. Zpřístupní přepínání kvality, ale v závislosti na výkonu serveru může docházet k delším zpožděním při přehrávání a k trhanému přehrávání.", "transcoding_realtime_enabled": "Povolit překódování v reálném čase", "transcoding_realtime_enabled_description": "Pokud je zakázáno, server odmítne spustit nové relace překódování v reálném čase.", + "transcoding_realtime_resolutions": "Rozlišení", + "transcoding_realtime_resolutions_description": "Nabízená rozlišení pro transkódování v reálném čase. Vyšší rozlišení mohou způsobit problémy s přehráváním, pokud je server nedokáže dostatečně rychle transkódovat.", + "transcoding_realtime_video_codecs": "Videokodeky", + "transcoding_realtime_video_codecs_description": "Videokodeky nabízené pro transkódování v reálném čase. Klienti si při přehrávání vyberou nejlepší variantu, kterou podporují. AV1 je efektivnější než HEVC, který je zase efektivnější než H.264. Při použití hardwarové akcelerace vyberte pouze ty kodeky, které akcelerátor dokáže kódovat. Při použití softwarového transkódování mějte na paměti, že H.264 je rychlejší než AV1, který je zase rychlejší než HEVC.", "transcoding_reference_frames": "Referenční snímky", "transcoding_reference_frames_description": "Počet referenčních snímků při kompresi daného snímku. Vyšší hodnoty zvyšují účinnost komprese, ale zpomalují kódování. Hodnota 0 toto nastavuje automaticky.", "transcoding_required_description": "Pouze videa, která nejsou v akceptovaném formátu", @@ -578,6 +597,7 @@ "asset_viewer_settings_title": "Prohlížeč", "assets": "Položky", "assets_added_to_album_count": "Do alba {count, plural, one {byla přidána # položka} few {byly přidány # položky} other {bylo přidáno # položek}}", + "assets_added_to_album_partial_count": "Do alba bylo přidáno {successCount} z {totalCount} {totalCount, plural, one {aktiv} other {aktiv}}", "assets_added_to_albums_count": "{assetTotal, plural, one {Přidána # položka} few{Přidány # položky} other {Přidáno # položek}} do {albumTotal, plural, one {# alba} other {# alb}}", "assets_cannot_be_added_to_album_count": "{count, plural, one {Položku} other {Položky}} nelze přidat do alba", "assets_cannot_be_added_to_albums": "{count, plural, one {Položku} other {Položky}} nelze přidat do žádného z alb", @@ -794,7 +814,6 @@ "custom_date": "Vlastní datum", "custom_locale": "Vlastní lokalizace", "custom_locale_description": "Formátovat datumy, časy a čísla podle vybraného jazyka a oblasti", - "custom_url": "Vlastní URL", "cutoff_date_description": "Zanechat fotografie a videa z posledních…", "cutoff_day": "{count, plural, one {den} few {dny} other {dnů}}", "cutoff_year": "{count, plural, one {rok} few {roky} other {let}}", @@ -1461,6 +1480,7 @@ "never": "Nikdy", "new_album": "Nové album", "new_api_key": "Nový API klíč", + "new_feature": "Nová funkce", "new_password": "Nové heslo", "new_person": "Nová osoba", "new_pin_code": "Nový PIN kód", @@ -1504,6 +1524,7 @@ "not_available": "Není k dispozici", "not_in_any_album": "Bez alba", "not_selected": "Není vybráno", + "not_set": "Nenastaveno", "notes": "Poznámky", "nothing_here_yet": "Zatím zde nic není", "notification_backup_reliability": "Povolte oznámení pro zlepšení spolehlivosti zálohování na pozadí", @@ -1521,6 +1542,8 @@ "obtainium_configurator": "Konfigurátor Obtainium", "obtainium_configurator_instructions": "Pomocí aplikace Obtainium nainstalujte a aktualizujte aplikaci pro Android přímo z vydání na GitHubu Immich. Vytvořte API klíč a vyberte variantu pro vytvoření konfiguračního odkazu pro Obtainium", "ocr": "OCR", + "ocr_body": "Immich nyní rozpoznává text na vašich fotografiích, takže je můžete vyhledávat podle toho, co je na nich napsáno.", + "ocr_title": "Vyhledávání textu ve vašich fotografiích", "official_immich_resources": "Oficiální zdroje Immich", "offline": "Offline", "offset": "Posun", @@ -1539,6 +1562,8 @@ "open": "Otevřít", "open_calendar": "Otevřít kalendář", "open_in_browser": "Otevřít v prohlížeči", + "open_in_immich_body": "Nastavte si v systému Android aplikaci Immich jako svou galerii, abyste mohli otevírat fotografie přímo z jiných aplikací.", + "open_in_immich_title": "Otevřít fotografie v Immichi", "open_in_map_view": "Otevřít v zobrazení mapy", "open_in_openstreetmap": "Otevřít v OpenStreetMap", "open_the_search_filters": "Otevřít vyhledávací filtry", @@ -1596,7 +1621,7 @@ "person": "Osoba", "person_age_months": "{months, plural, one {# měsíc} few {# měsíce} other {# měsíců}}", "person_age_year_months": "1 rok a {months, plural, one {# měsíc} few {# měsíce} other {# měsíců}}", - "person_age_years": "{years, plural, one {# rok} few {# roky} other {# let}}", + "person_age_years": "{years, plural, one {# rok} other {# let}} starý/á", "person_birthdate": "Narozen(a) {date}", "person_hidden": "{name}{hidden, select, true { (skryto)} other {}}", "person_recognized": "Osoba rozpoznána", @@ -1697,7 +1722,10 @@ "recent": "Nedávné", "recent_searches": "Nedávná vyhledávání", "recently_added": "Nedávno přidané", + "recently_added_body": "Přejděte přímo na speciální stránku, kde najdete vše, co jste v poslední době přidali.", + "recently_added_description": "Prohlížejte si svá média seřazená podle data, kdy byla nahrána do Immiche", "recently_added_page_title": "Nedávno přidané", + "recently_added_title": "Nedávno přidané", "recently_taken": "Nedávno pořízené", "refresh": "Obnovit", "refresh_encoded_videos": "Obnovit kódovaná videa", @@ -1879,7 +1907,7 @@ "set_slideshow_to_fullscreen": "Nastavit prezentaci na celou obrazovku", "set_stack_primary_asset": "Nastavit jako hlavní položku", "setting_image_navigation_enable_subtitle": "Pokud je zapnuto, budete moci přejít na předchozí/další obrázek klepnutím do levé/pravé čtvrtiny obrazovky.", - "setting_image_navigation_enable_title": "Klepněte pro navigaci", + "setting_image_navigation_enable_title": "Klepnutí pro navigaci", "setting_image_navigation_title": "Navigace mezi obrázky", "setting_image_viewer_help": "V prohlížeči detailů se nejprve načte malá miniatura, poté se načte náhled střední velikosti (je-li povolen) a nakonec se načte originál (je-li povolen).", "setting_image_viewer_original_subtitle": "Umožňuje načíst původní obrázek v plném rozlišení (velký!). Zakažte pro snížení využití dat (v síti i v mezipaměti zařízení).", @@ -1904,6 +1932,8 @@ "share_link": "Sdílet odkaz", "share_original": "Použít originál (velký)", "share_preview": "Použít miniaturu (malý)", + "share_quality_body": "Při sdílení stiskněte a podržte tlačítko sdílení pro výběr kvality obrázku.", + "share_quality_title": "Vyberte si kvalitu sdílení", "shared": "Sdílené", "shared_album_activities_input_disable": "Komentář je vypnutý", "shared_album_activity_remove_content": "Chcete odstranit tuto aktivitu?", @@ -1918,7 +1948,9 @@ "shared_link_app_bar_title": "Sdílené odkazy", "shared_link_clipboard_copied_massage": "Zkopírováno do schránky", "shared_link_create_error": "Chyba při vytváření sdíleného odkazu", - "shared_link_custom_url_description": "Přístup k tomuto sdílenému odkazu pomocí vlastního URL", + "shared_link_custom_url_description": "Otevřete tento sdílený odkaz pomocí vlastního názvu URL", + "shared_link_custom_url_title": "Vlastní URL", + "shared_link_custom_url_warning": "Upozornění: vlastní název URL obsahující lomítko se nemusí chovat tak, jak očekáváte.", "shared_link_edit_description_hint": "Zadejte popis sdílení", "shared_link_edit_expire_after_option_day": "1 den", "shared_link_edit_expire_after_option_days": "{count} dní", @@ -1985,16 +2017,19 @@ "sign_out": "Odhlásit se", "sign_up": "Zaregistrovat se", "size": "Velikost", + "skip": "Přeskočit", "skip_to_content": "Přejít na obsah", "skip_to_folders": "Přeskočit na složky", "skip_to_tags": "Přeskočit na značky", "slideshow": "Prezentace", + "slideshow_body": "Posaďte se a sledujte, jak se vaše fotografie promítají v prezentaci na celé obrazovce.", "slideshow_metadata_overlay_mode": "Obsah překryvného panelu", "slideshow_metadata_overlay_mode_description_only": "Pouze popis", "slideshow_metadata_overlay_mode_full": "Úplný", "slideshow_repeat": "Opakovat prezentaci", "slideshow_repeat_description": "Po skončení prezentace se vrátit na začátek", "slideshow_settings": "Nastavení prezentace", + "slideshow_title": "Prezentace", "smart_album": "Chytré album", "some_assets_already_have_a_location_warning": "Některé z vybraných položek již mají polohu", "sort_albums_by": "Seřadit alba podle...", @@ -2070,7 +2105,7 @@ "theme_setting_primary_color_subtitle": "Zvolte barvu pro hlavní akce a zvýraznění.", "theme_setting_primary_color_title": "Hlavní barva", "theme_setting_system_primary_color_title": "Použít systémovou barvu", - "theme_setting_system_theme_switch": "Automaticky (podle systemového nastavení)", + "theme_setting_system_theme_switch": "Automaticky (podle systému)", "then": "Pak", "they_will_be_merged_together": "Budou sloučeny dohromady", "third_party_resources": "Zdroje třetích stran", @@ -2122,6 +2157,7 @@ "unknown": "Neznámý", "unknown_country": "Neznámá země", "unknown_date": "Neznámé datum", + "unknown_schema": "Neznámé schéma", "unknown_year": "Neznámý rok", "unlimited": "Neomezeně", "unlink_motion_video": "Odpojit pohyblivé video", @@ -2157,6 +2193,8 @@ "upload_status_errors": "Chyby", "upload_status_uploaded": "Nahráno", "upload_success": "Nahrání proběhlo úspěšně, obnovením stránky se zobrazí nově nahrané položky.", + "upload_to_album_body": "Uživatelé, kteří nevyužívají funkci ručního nahrávání, si nyní mohou zvolit, zda chtějí lokální fotografie přidávat přímo do alba již při jejich nahrávání, již není nutné je nejprve nahrát a teprve poté přidat do alba.", + "upload_to_album_title": "Nahrát přímo do alba", "upload_to_immich": "Nahrát do Immich ({count})", "uploading": "Nahrávání", "uploading_media": "Nahrávání médií", @@ -2224,6 +2262,9 @@ "week": "Týden", "welcome": "Vítejte", "welcome_to_immich": "Vítejte v Immichi", + "whats_new": "Co je nového", + "whats_new_settings_subtitle": "Podívejte se, co je nového v Immichi", + "whats_new_version": "Verze {version}", "when": "Kdy", "width": "Šířka", "wifi_name": "Název Wi-Fi", diff --git a/i18n/da.json b/i18n/da.json index 414ec38167..9daed30b52 100644 --- a/i18n/da.json +++ b/i18n/da.json @@ -73,6 +73,7 @@ "cron_expression_description": "Indstil skannings intervallet i cron format. For mere information se: Crontab Guru", "cron_expression_presets": "cron predefinerede indstillinger", "disable_login": "Deaktiver login", + "download_csv": "Hent CSV", "duplicate_detection_job_description": "Kør maskinlæring på mediefiler for at opdage lignende billeder. Er afhængig af Smart Søgning", "exclusion_pattern_description": "Ekskluderingsmønstre lader dig ignorere filer og mapper, når du scanner dit bibliotek. Dette er nyttigt, hvis du har mapper, der indeholder filer, du ikke vil importere, såsom RAW-filer.", "export_config_as_json_description": "Download den aktuelle systemkonfiguration som en JSON-fil", @@ -107,6 +108,21 @@ "image_thumbnail_quality_description": "Miniaturer kvaliteten indstilles fra 1 til 100. Nu højre, nu bedre kvalitet. Men giver større filer og påvirker programmets svartider.", "image_thumbnail_title": "Thumbnail-indstillinger", "import_config_from_json_description": "Importer systemkonfiguration ved at uploade en JSON-konfigurationsfil", + "integrity_checks_checksum_files": "Checksum-filer", + "integrity_checks_checksum_files_description": "Konfigurer checksum-filerne", + "integrity_checks_checksum_files_enable_description": "Aktiver checksum tjek", + "integrity_checks_checksum_files_percentage_limit": "Procent grænse", + "integrity_checks_checksum_files_percentage_limit_description": "Konfigurer den maksimano procent mellem 0.001 og 1 for hvor meget checksum tjek skal kører hver omgang.", + "integrity_checks_checksum_files_time_limit": "Tidsgrænse", + "integrity_checks_checksum_files_time_limit_description": "Konfigurer den maksimale periode for hvilken checksum tjekket skal nå på hvert interval. (ms)", + "integrity_checks_missing_files": "Mangler filer", + "integrity_checks_missing_files_description": "Konfigurer frekvensen og tædn eller sluk for manglende filer tjek", + "integrity_checks_missing_files_enable_description": "Aktivér tjekket for manglende filer", + "integrity_checks_settings": "Integritetstjek", + "integrity_checks_settings_description": "Administrer integritetstjeks intervaller", + "integrity_checks_untracked_files": "Ikke-registreret filer", + "integrity_checks_untracked_files_description": "Konfigurer hyppigheden og aktiver eller deaktiver kontrollen af ikke-registreret filer", + "integrity_checks_untracked_files_enable_description": "Aktivér kontrol af ikke-registreret filer", "job_concurrency": "{job} samtidighed", "job_created": "opgaven er skabt", "job_not_concurrency_safe": "Denne opgave er ikke sikker at køre samtidigt med andre.", @@ -182,9 +198,25 @@ "machine_learning_smart_search_enabled": "Aktiver smart søgning", "machine_learning_smart_search_enabled_description": "Hvis deaktiveret, vil billeder ikke blive kodet til smart søgning.", "machine_learning_url_description": "URL’en for maskinlæringsserveren. Hvis mere end én URL angives, vil hver server blive forsøgt én ad gangen, indtil en svarer succesfuldt, i rækkefølge fra første til sidste. Servere, der ikke svarer, vil midlertidigt blive ignoreret, indtil de kommer online igen.", + "maintenance_backup_management": "Backup administration", "maintenance_delete_backup": "Slet Backup", "maintenance_delete_backup_description": "Denne fil vil blive slettet permanent.", "maintenance_delete_error": "Sletning af backup fejlede.", + "maintenance_integrity_check": "Kontroller", + "maintenance_integrity_check_all": "Kontroller alle", + "maintenance_integrity_checksum_mismatch": "Checksum uoverensstemmelse", + "maintenance_integrity_checksum_mismatch_description": "Filer hvis checksum på disken ikke stemmer overens med den checksum, Immich har gemt i sin database.", + "maintenance_integrity_checksum_mismatch_job": "Kontroller for uoverensstemmelser i checksum", + "maintenance_integrity_checksum_mismatch_refresh_job": "Opdater rapporter om uoverensstemmelser i checksum", + "maintenance_integrity_missing_file": "Manglende filer", + "maintenance_integrity_missing_file_description": "Filer som Immich har i sin database, men som ikke findes i filsystemet.", + "maintenance_integrity_missing_file_job": "Tjek for manglende filer", + "maintenance_integrity_missing_file_refresh_job": "Opdater rapporter om manglende filer", + "maintenance_integrity_report": "Integritetsrapport", + "maintenance_integrity_untracked_file": "Ikke-registreret filer", + "maintenance_integrity_untracked_file_description": "Filer i Immichs mapper, som Immich ikke har nogen registrering af.", + "maintenance_integrity_untracked_file_job": "Tjek for ikke-registreret filer", + "maintenance_integrity_untracked_file_refresh_job": "Opdater rapporter om ikke-registreret filer", "maintenance_restore_backup": "Genskab backup", "maintenance_restore_backup_description": "Immich bliver slettet og genskabt fra den valgte backup. Der vil blive taget en backup før du fortsætter.", "maintenance_restore_backup_different_version": "Denne backup blev lavet med en anden version af Immich!", @@ -399,6 +431,10 @@ "transcoding_realtime_description": "Tillader transkodning i realtid, mens videoen streames. Muliggør kvalitetsskifte, men kan forårsage højere afspilningsforsinkelse og hakken afhængigt af serverens kapacitet.", "transcoding_realtime_enabled": "Aktiver real-time transkodning", "transcoding_realtime_enabled_description": "Hvis deaktiveret, kan serveren ikke starte nye realtids transkodningssessioner.", + "transcoding_realtime_resolutions": "Opløsninger", + "transcoding_realtime_resolutions_description": "Opløsninger tilgængelig for realtidstranskodning. Højere opløsninger kan forårsage afspilningsproblemer, hvis serveren ikke kan transkode dem hurtigt nok.", + "transcoding_realtime_video_codecs": "Video codecs", + "transcoding_realtime_video_codecs_description": "De video codecs, tilgængelig for realtidstranskodning. Klienter vælger den bedste mulighed, de understøtter under afspilning. AV1 er mere effektiv end HEVC, som er mere effektiv end H.264. Når du bruger hardwareacceleration, skal du kun vælge de codecs, som acceleratoren kan enkode. Når du bruger softwaretranskodning, skal du bemærke, at H.264 er hurtigere end AV1, som er hurtigere end HEVC.", "transcoding_reference_frames": "Referencerammer", "transcoding_reference_frames_description": "Antallet af frames, der skal refereres til, når en given frame komprimeres. Højere værdier forbedrer kompressionseffektiviteten, men gør indkodning langsommere. 0 sætter denne værdi automatisk.", "transcoding_required_description": "Kun videoer ikke i et godkendt format", @@ -561,6 +597,7 @@ "asset_viewer_settings_title": "Billedviser", "assets": "Objekter", "assets_added_to_album_count": "{count, plural, one {# mediefil} other {# mediefiler}} tilføjet til albummet", + "assets_added_to_album_partial_count": "Tilføjede {successCount} ud af {totalCount} {totalCount, plural, one {mediefil} other {mediefiler}} til albummet", "assets_added_to_albums_count": "Tilføjet {assetTotal, plural, one {# asset} other {# assets}} til {albumTotal, plural, one {# album} other {# albums}}", "assets_cannot_be_added_to_album_count": "{count, plural, one {Billed} other {Billeder}} kan ikke blive tilføjet til album", "assets_cannot_be_added_to_albums": "{count, plural, one {Asset} other {Assets}} kan ikke føjes til i nogen af albummerne", @@ -777,7 +814,6 @@ "custom_date": "Brugerdefineret dato", "custom_locale": "Brugerdefineret lokale", "custom_locale_description": "Formatér datoer, klokkeslæt og tal baseret på det valgte sprog og den valgte region", - "custom_url": "Tilpasset URL", "cutoff_date_description": "Behold fotos fra den sidste…", "cutoff_day": "{count, plural, one {dag} other {dage}}", "cutoff_year": "{count, plural, one {år} other {år}}", @@ -794,6 +830,8 @@ "day": "Dag", "days": "Dage", "deduplicate_all": "Dedubliker alle", + "default_quality_subtitle": "Kvalitet brugt ved tryk på 'del'. Tryk længe på dele-knappen for at vælge hver gang.", + "default_share_quality": "Standard delingskvalitet", "delete": "Slet", "delete_action_confirmation_message": "Er du sikker på, at du vil slette dette objekt? Denne handling vil flytte objektet til serverens papirkurv, og vil spørge dig, om du vil slette den lokalt", "delete_action_prompt": "{count} slettet", @@ -1076,6 +1114,7 @@ "failed": "Fejlet", "failed_count": "Fejlede: {count}", "failed_to_authenticate": "Kunne ikke godkendes", + "failed_to_delete_file": "Kunne ikke slette filen", "failed_to_load_assets": "Kunne ikke indlæse mediefiler", "failed_to_load_folder": "Kunne ikke indlæse mappe", "favorite": "Favorit", @@ -1156,16 +1195,16 @@ "id": "ID", "idle": "Inaktiv", "image": "Billede", - "image_alt_text_date": "{isVideo, select, true {Video} other {Image}} taget den {date}", - "image_alt_text_date_1_person": "{isVideo, select, true {Video} other {Image}} taget med {person1} den {date}", - "image_alt_text_date_2_people": "{isVideo, select, true {Video} other {Image}} taget med {person1} og {person2} den {date}", - "image_alt_text_date_3_people": "{isVideo, select, true {Video} other {Image}} taget med {person1}, {person2}, og {person3} den {date}", - "image_alt_text_date_4_or_more_people": "{isVideo, select, true {Video} other {Image}} taget med {person1}, {person2}, og {additionalCount, number} andre den {date}", - "image_alt_text_date_place": "{isVideo, select, true {Video} other {Image}} taget i {city}, {country} den {date}", - "image_alt_text_date_place_1_person": "{isVideo, select, true {Video} other {Image}} taget i {city}, {country} med {person1} den {date}", - "image_alt_text_date_place_2_people": "{isVideo, select, true {Video} other {Image}} taget i {city}, {country} med {person1} og {person2} den {date}", - "image_alt_text_date_place_3_people": "{isVideo, select, true {Video} other {Image}} taget i {city}, {country} med {person1}, {person2}, og {person3} den {date}", - "image_alt_text_date_place_4_or_more_people": "{isVideo, select, true {Video} other {Image}} taget i {city}, {country} med {person1}, {person2}, og {additionalCount, number} andre den {date}", + "image_alt_text_date": "{isVideo, select, true {Video} other {Billede}} taget den {date}", + "image_alt_text_date_1_person": "{isVideo, select, true {Video} other {Billede}} taget med {person1} den {date}", + "image_alt_text_date_2_people": "{isVideo, select, true {Video} other {Billede}} taget med {person1} og {person2} den {date}", + "image_alt_text_date_3_people": "{isVideo, select, true {Video} other {Billede}} taget med {person1}, {person2}, og {person3} den {date}", + "image_alt_text_date_4_or_more_people": "{isVideo, select, true {Video} other {Billede}} taget med {person1}, {person2}, og {additionalCount, number} andre den {date}", + "image_alt_text_date_place": "{isVideo, select, true {Video} other {Billede}} taget i {city}, {country} den {date}", + "image_alt_text_date_place_1_person": "{isVideo, select, true {Video} other {Billede}} taget i {city}, {country} med {person1} den {date}", + "image_alt_text_date_place_2_people": "{isVideo, select, true {Video} other {Billede}} taget i {city}, {country} med {person1} og {person2} den {date}", + "image_alt_text_date_place_3_people": "{isVideo, select, true {Video} other {Billede}} taget i {city}, {country} med {person1}, {person2}, og {person3} den {date}", + "image_alt_text_date_place_4_or_more_people": "{isVideo, select, true {Video} other {Billede}} taget i {city}, {country} med {person1}, {person2}, og {additionalCount, number} andre den {date}", "immich_logo": "Immich logo", "immich_web_interface": "Immich webinterface", "import_from_json": "Importér fra JSON", @@ -1180,6 +1219,7 @@ "individual_share": "Individuel andel", "individual_shares": "Individuelle delinger", "info": "Info", + "integrity_checks": "Integritetstjek", "interval": { "day_at_onepm": "Hver dag kl. 13", "hours": "Hver {hours, plural, one {time} other {{hours, number} timer}}", @@ -1241,6 +1281,7 @@ "linked_oauth_account": "Tilsluttet OAuth-konto", "list": "Liste", "live": "Live", + "load_more": "Indlæs flere", "loading": "Indlæser", "loading_search_results_failed": "Indlæsning af søgeresultater fejlede", "local": "Lokal", @@ -1281,9 +1322,9 @@ "login_form_failed_login": "Der opstod en vejl ved at logge ind. Tjek server webadressen, e-mailen og kodeordet", "login_form_handshake_exception": "Der opstod en fejl med at oprette forbindelse til serveren. Aktiver selvsignerede certifikater i indstillingerne, hvis du bruger et selv signeret certifikat.", "login_form_password_hint": "kodeord", - "login_form_server_empty": "Indtast server-URL.", - "login_form_server_error": "Kunne ikke forbinde til serveren.", - "login_has_been_disabled": "Login er blevet deaktiveret.", + "login_form_server_empty": "Indtast server-URL", + "login_form_server_error": "Kunne ikke forbinde til serveren", + "login_has_been_disabled": "Login er blevet deaktiveret", "login_password_changed_error": "Der opstod en fejl i opdateringen af dit kodeord", "login_password_changed_success": "Kodeordet blev opdateret", "logout_all_device_confirmation": "Er du sikker på, at du vil logge ud af alle enheder?", @@ -1334,6 +1375,7 @@ "map_location_picker_page_use_location": "Brug denne placering", "map_location_service_disabled_content": "Placeringstjenesten skal aktiveres for at vise elementer fra din nuværende placering. Vil du aktivere den nu?", "map_location_service_disabled_title": "Placeringstjenesten er deaktiveret", + "map_marker_for_image": "Kortmarkør for billede taget i {city}, {country}", "map_marker_with_image": "Kortmarkør med billede", "map_no_location_permission_content": "Der kræves tilladelse til placeringen for at vise elementer fra din nuværende placering. Vil du give tilladelse?", "map_no_location_permission_title": "Placeringstilladelse blev afvist", @@ -1438,6 +1480,7 @@ "never": "Aldrig", "new_album": "Nyt album", "new_api_key": "Ny API-nøgle", + "new_feature": "Ny Feature", "new_password": "Ny adgangskode", "new_person": "Ny person", "new_pin_code": "Ny PIN kode", @@ -1481,9 +1524,13 @@ "not_available": "ikke tilgængelig", "not_in_any_album": "Ikke i noget album", "not_selected": "Ikke valgt", + "not_set": "Ikke angivet", "notes": "Noter", "nothing_here_yet": "Intet her endnu", "notification_backup_reliability": "Aktivér notifikationer for at forbedre pålideligheden af backup i baggrunden", + "notification_enabled_list_tile_content": "Immich bruger notifikationer til baggrundsbackup. Administrer dem i dine enhedsindstillinger.", + "notification_enabled_list_tile_open_button": "Åbn indstillinger", + "notification_enabled_list_tile_title": "Notifikationer aktiveret", "notification_permission_dialog_content": "Gå til indstillinger for at slå notifikationer til.", "notification_permission_list_tile_content": "Tillad at bruge notifikationer.", "notification_permission_list_tile_enable_button": "Slå notifikationer til", @@ -1495,6 +1542,8 @@ "obtainium_configurator": "Obtainium-konfigurator", "obtainium_configurator_instructions": "Brug Obtainium til at installere og opdatere Android-appen direkte fra Immich-udgivelsen på GitHub. Opret en API-nøgle, og vælg en variant for at generere dit Obtainium-konfigurationslink", "ocr": "OCR", + "ocr_body": "Immich læser nu teksten i dine billeder, så du kan søge efter dem ud fra, hvad de siger.", + "ocr_title": "Søg tekst i dine fotos", "official_immich_resources": "Officielle Immich-ressourcer", "offline": "Offline", "offset": "Forskydning", @@ -1513,6 +1562,8 @@ "open": "Åben", "open_calendar": "Åbn kalender", "open_in_browser": "Åbn i browser", + "open_in_immich_body": "Sæt Immich som dit galleri på Android for at åbne billeder direkte fra andre apps.", + "open_in_immich_title": "Åbne billeder i Immich", "open_in_map_view": "Åben i kortvisning", "open_in_openstreetmap": "Åben i OpenStreetMap", "open_the_search_filters": "Åbn søgefiltre", @@ -1570,7 +1621,7 @@ "person": "Person", "person_age_months": "{months, plural, one {# month} other {# months}} gammel", "person_age_year_months": "1 år, {months, plural, one {# month} other {# months}} gammel", - "person_age_years": "{years, plural, other {# years}} gammel", + "person_age_years": "{years, plural, other {# år}} gammel", "person_birthdate": "Født den {date}", "person_hidden": "{name}{hidden, select, true { (skjult)} other {}}", "person_recognized": "Person genkendt", @@ -1671,7 +1722,10 @@ "recent": "For nylig", "recent_searches": "Seneste søgninger", "recently_added": "Senest tilføjet", + "recently_added_body": "Gå direkte til alt, hvad du for nylig har tilføjet, på en dedikeret side.", + "recently_added_description": "Gennemse dine mediefiler sorteret efter, hvornår de blev uploadet til Immich", "recently_added_page_title": "Nyligt tilføjet", + "recently_added_title": "Senest tilføjet", "recently_taken": "Taget for nylig", "refresh": "Opdatér", "refresh_encoded_videos": "Opdater kodede videoer", @@ -1826,6 +1880,7 @@ "select_person": "Vælg person", "select_person_to_tag": "Vælg en person at tagge", "select_photos": "Vælg billeder", + "select_quality": "Vælg kvalitet", "select_trash_all": "Vælg smid alle ud", "selected": "Valgt", "selected_count": "{count, plural, one {# valgt} other {# valgte}}", @@ -1875,6 +1930,10 @@ "share": "Del", "share_dialog_preparing": "Forbereder...", "share_link": "Del link", + "share_original": "Brug original (stor)", + "share_preview": "Brug miniaturebillede (lille)", + "share_quality_body": "Tryk og hold delingsknappen nede for at vælge billedkvaliteten, før du deler.", + "share_quality_title": "Vælg din delingskvalitet", "shared": "Delt", "shared_album_activities_input_disable": "Kommentarer er deaktiveret", "shared_album_activity_remove_content": "Vil du slette denne aktivitet?", @@ -1889,7 +1948,9 @@ "shared_link_app_bar_title": "Delte links", "shared_link_clipboard_copied_massage": "Kopieret til udklipsholderen", "shared_link_create_error": "Der opstod en fejl i oprettelsen af et delt link", - "shared_link_custom_url_description": "Adgang til dette delte link med en selvdefineret URL", + "shared_link_custom_url_description": "Få adgang til dette delte link med et brugerdefineret URL-navn", + "shared_link_custom_url_title": "Tilpasset URL", + "shared_link_custom_url_warning": "Advarsel: Et brugerdefineret URL-navn med en skråstreg fungerer muligvis ikke som forventet.", "shared_link_edit_description_hint": "Indtast beskrivelse", "shared_link_edit_expire_after_option_day": "1 dag", "shared_link_edit_expire_after_option_days": "{count} dage", @@ -1956,17 +2017,21 @@ "sign_out": "Log af", "sign_up": "Tilmeld", "size": "Størrelse", + "skip": "Spring over", "skip_to_content": "Spring frem til indhold", "skip_to_folders": "Spring til mapper", "skip_to_tags": "Spring til tags", "slideshow": "Diasshow", + "slideshow_body": "Læn dig tilbage, og se dine fotos afspilles i et slideshow i fuld skærm.", "slideshow_metadata_overlay_mode": "Overlay indhold", "slideshow_metadata_overlay_mode_description_only": "Kun beskrivelse", "slideshow_metadata_overlay_mode_full": "Fuld", "slideshow_repeat": "Gentag diasshow", "slideshow_repeat_description": "Hop tilbage til begyndelsen når diasshow stopper", "slideshow_settings": "Diasshowindstillinger", + "slideshow_title": "Slideshow", "smart_album": "Smart album", + "some_assets_already_have_a_location_warning": "Nogle af de valgte aktiver har allerede en placering", "sort_albums_by": "Sortér albummer efter...", "sort_created": "Dato oprettet", "sort_items": "Antal genstande", @@ -2071,10 +2136,12 @@ "trash_page_info": "Slettede elementer vil blive slettet permanent efter {days} dage", "trashed_items_will_be_permanently_deleted_after": "Mediefiler i papirkurven vil blive slettet permanent efter {days, plural, one {# dag} other {# dage}}.", "trigger": "Udløser", + "trigger_asset_metadata_extraction": "Udtrækning af metadata for mediefil", + "trigger_asset_metadata_extraction_description": "Udløses, når EXIF-metadataene for en mediefil udtrækkes", "trigger_asset_uploaded": "Mediefil upload", "trigger_asset_uploaded_description": "Udløses, når et nyt asset bliver uploaded", "trigger_person_recognized": "Peron genkendt", - "trigger_person_recognized_description": "Udløses, når en person er detekteret", + "trigger_person_recognized_description": "Udløses, når en person er genkendt", "troubleshoot": "Fejlfinding", "type": "Type", "unable_to_change_pin_code": "Kunne ikke ændre PIN kode", @@ -2090,6 +2157,7 @@ "unknown": "Ukendt", "unknown_country": "Ukendt land", "unknown_date": "Ukendt dato", + "unknown_schema": "Ukendt skema", "unknown_year": "Ukendt år", "unlimited": "Ubegrænset", "unlink_motion_video": "Fjern link til bevægelsesvideo", @@ -2125,6 +2193,8 @@ "upload_status_errors": "Fejl", "upload_status_uploaded": "Uploadet", "upload_success": "Upload gennemført. Opdater siden for at se nye uploadaktiver.", + "upload_to_album_body": "For brugere, der ikke bruger den manuelle uploadfunktion, kan du nu vælge at tilføje lokale fotos direkte til et album, når du uploader dem. Du behøver ikke længere at uploade og derefter føje dem til et album senere.", + "upload_to_album_title": "Upload direkte til et album", "upload_to_immich": "Upload til Immich ({count})", "uploading": "Uploader", "uploading_media": "Uploader media", @@ -2192,6 +2262,9 @@ "week": "Uge", "welcome": "Velkommen", "welcome_to_immich": "Velkommen til Immich", + "whats_new": "Hvad er nyt", + "whats_new_settings_subtitle": "Se, hvad der er nyt i Immich", + "whats_new_version": "Version {version}", "when": "Hvornår", "width": "Bredde", "wifi_name": "Wi-Fi navn", diff --git a/i18n/de.json b/i18n/de.json index 2e83d73e02..910166a54c 100644 --- a/i18n/de.json +++ b/i18n/de.json @@ -47,7 +47,7 @@ "authentication_settings_disable_all": "Bist du sicher, dass du alle Anmeldemethoden deaktivieren willst? Die Anmeldung wird vollständig deaktiviert.", "authentication_settings_reenable": "Nutze einen Server-Befehl zur Reaktivierung.", "background_task_job": "Hintergrundaufgaben", - "backup_database": "Datenbanksicherung erstellen", + "backup_database": "Datenbankexport erstellen", "backup_database_enable_description": "Datenbank regelmäßig sichern", "backup_keep_last_amount": "Anzahl der zu speichernden vorherigen Sicherungen", "backup_onboarding_1_description": "Offsite-Kopie in der Cloud oder an einem anderen physischen Ort.", @@ -57,7 +57,7 @@ "backup_onboarding_footer": "Weitere Informationen zum Sichern von Immich findest du in der Dokumentation.", "backup_onboarding_parts_title": "Eine 3-2-1-Sicherung umfasst:", "backup_onboarding_title": "Sicherungen", - "backup_settings": "Einstellungen zur Datenbanksicherung", + "backup_settings": "Einstellungen zum Datenbankexport", "backup_settings_description": "Einstellungen zur regelmäßigen Sicherung der Datenbank. Hinweis: Diese Jobs werden nicht überwacht und du wirst nicht über Fehler informiert.", "cleared_jobs": "Folgende Aufgaben zurückgesetzt: {job}", "config_set_by_file": "Ist derzeit in einer Konfigurationsdatei festgelegt", @@ -108,6 +108,21 @@ "image_thumbnail_quality_description": "Qualität der Miniaturansicht von 1-100. Höher ist besser, erzeugt aber größere Dateien und kann die Reaktionsfähigkeit der App beeinträchtigen.", "image_thumbnail_title": "Miniaturansicht-Einstellungen", "import_config_from_json_description": "Importieren Sie die Systemkonfiguration, indem Sie eine JSON-Konfigurationsdatei hochladen", + "integrity_checks_checksum_files": "Prüfsummendateien", + "integrity_checks_checksum_files_description": "Anpassung der Prüfsummen Tests", + "integrity_checks_checksum_files_enable_description": "Aktiviere den Prüfsummen Test", + "integrity_checks_checksum_files_percentage_limit": "Prozentuales Limit", + "integrity_checks_checksum_files_percentage_limit_description": "Setze die maximale Prozentzahl zwischen 0.01 und 1, um zu bestimmen wie viel der Prüfsummen Test jedes Intervall prüfen soll.", + "integrity_checks_checksum_files_time_limit": "Zeitlimit", + "integrity_checks_checksum_files_time_limit_description": "Setze die maximale Dauer, für die der Prüfsummen Test jedes Intervall ausgeführt werden soll. (ms)", + "integrity_checks_missing_files": "Fehlende Dateien", + "integrity_checks_missing_files_description": "Setze die Frequenz und (de)aktiviere den Test für fehlende Dateien", + "integrity_checks_missing_files_enable_description": "Aktiviere den Test für fehlende Dateien", + "integrity_checks_settings": "Integritätstests", + "integrity_checks_settings_description": "Verwalten der Intervalle für die Integritätstests", + "integrity_checks_untracked_files": "Nicht getrackte Dateien", + "integrity_checks_untracked_files_description": "Setze die Frequenz und (de)aktiviere den Test für ungetrackte Dateien", + "integrity_checks_untracked_files_enable_description": "Aktiviere den Test für ungetrackte Dateien", "job_concurrency": "{job} (Anzahl gleichzeitiger Prozesse)", "job_created": "Aufgabe erstellt", "job_not_concurrency_safe": "Diese Aufgabe ist nicht parallelisierungssicher.", @@ -147,7 +162,7 @@ "machine_learning_duplicate_detection": "Duplikaterkennung", "machine_learning_duplicate_detection_enabled": "Duplikaterkennung aktivieren", "machine_learning_duplicate_detection_enabled_description": "Falls diese Option deaktiviert ist, werden exakt identische Dateien dennoch de-dupliziert.", - "machine_learning_duplicate_detection_setting_description": "Verwendung von CLIP-Embeddings zum Erkennen möglicher Duplikate", + "machine_learning_duplicate_detection_setting_description": "Verwendung von CLIP-Einbettungen zum Erkennen möglicher Duplikate", "machine_learning_enabled": "Maschinelles Lernen aktivieren", "machine_learning_enabled_description": "Wenn diese Option deaktiviert ist, werden alle ML-Funktionen unabhängig von den unten aufgeführten Einstellungen deaktiviert.", "machine_learning_facial_recognition": "Gesichtserkennung", @@ -416,6 +431,10 @@ "transcoding_realtime_description": "Ermöglicht die Transkodierung in Echtzeit während des Videostreams. Ermöglicht einen Qualitätswechsel, kann jedoch je nach Serverkapazität zu einer höheren Wiedergabelatenz und Rucklern führen.", "transcoding_realtime_enabled": "Echtzeit-Transkodierung aktivieren", "transcoding_realtime_enabled_description": "Wenn diese Option deaktiviert ist, lehnt der Server den Start neuer Echtzeit-Transkodierungssitzungen ab.", + "transcoding_realtime_resolutions": "Auflösungen", + "transcoding_realtime_resolutions_description": "Die für das Echtzeit-Transcoding angebotenen Auflösungen. Höhere Auflösungen können zu Wiedergabeproblemen führen, wenn der Server sie nicht schnell genug transcodieren kann.", + "transcoding_realtime_video_codecs": "Video-Codecs", + "transcoding_realtime_video_codecs_description": "Die für die Echtzeit-Transkodierung angebotenen Videocodecs. Clients wählen bei der Wiedergabe die beste von ihnen unterstützte Option aus. AV1 ist effizienter als HEVC und HEVC ist effizienter als H.264. Wählen Sie bei Verwendung von Hardwarebeschleunigung nur die Codecs aus, die der Beschleuniger kodieren kann. Beachten Sie bei der Software-Transkodierung, dass H.264 schneller ist als AV1 und AV1 schneller als HEVC.", "transcoding_reference_frames": "Referenz-Frames", "transcoding_reference_frames_description": "Die Anzahl der Bilder, auf die bei der Komprimierung eines bestimmten Bildes Bezug genommen wird. Höhere Werte verbessern die Komprimierungseffizienz, verlangsamen aber die Kodierung. 0 setzt diesen Wert automatisch.", "transcoding_required_description": "Nur Videos in einem nicht akzeptierten Format", @@ -578,6 +597,7 @@ "asset_viewer_settings_title": "Fotoanzeige", "assets": "Dateien", "assets_added_to_album_count": "{count, plural, one {# Datei} other {# Dateien}} zum Album hinzugefügt", + "assets_added_to_album_partial_count": "{successCount} von {totalCount} {totalCount, plural, one {Datei} other {Dateien}} zum Album hinzugefügt", "assets_added_to_albums_count": "{assetTotal, plural, one {# Datei} other {# Dateien}} zu {albumTotal, plural, one {# Album} other {# Alben}} hinzugefügt", "assets_cannot_be_added_to_album_count": "{count, plural, one {Datei kann}other {Dateien können}} nicht zum Album hinzugefügt werden", "assets_cannot_be_added_to_albums": "{count, plural, one {Datei kann} other {Dateien können}} nicht zu den Alben hinzugefügt werden", @@ -794,7 +814,6 @@ "custom_date": "Benutzerdefiniertes Datum", "custom_locale": "Benutzerdefiniertes Gebietsschema", "custom_locale_description": "Datumsangaben, Uhrzeiten und Zahlen je nach Sprache und Land formatieren", - "custom_url": "Benutzerdefinierte URL", "cutoff_date_description": "Behalte Fotos der letzten…", "cutoff_day": "{count, plural, one {Tag} other {Tage}}", "cutoff_year": "{count, plural, one {Jahr} other {Jahre}}", @@ -905,7 +924,7 @@ "edit_workflow": "Workflow bearbeiten", "editor": "Bearbeiten", "editor_discard_edits_confirm": "Änderungen verwerfen", - "editor_discard_edits_prompt": "Es liegen ungespeicherte Änderungen vorhanden. Sicher, dass diese verworfen werden sollen?", + "editor_discard_edits_prompt": "Es sind ungespeicherte Änderungen vorhanden. Sicher, dass diese verworfen werden sollen?", "editor_discard_edits_title": "Änderungen verwerfen?", "editor_edits_applied_error": "Änderungen konnten nicht angewendet werden", "editor_edits_applied_success": "Änderungen erfolgreich angewendet", @@ -1461,6 +1480,7 @@ "never": "Niemals", "new_album": "Neues Album", "new_api_key": "Neuer API-Schlüssel", + "new_feature": "Neue Funktion", "new_password": "Neues Passwort", "new_person": "Neue Person", "new_pin_code": "Neuer PIN-Code", @@ -1504,6 +1524,7 @@ "not_available": "N/A", "not_in_any_album": "In keinem Album", "not_selected": "Nicht ausgewählt", + "not_set": "Nicht gesetzt", "notes": "Hinweise", "nothing_here_yet": "Noch nichts hier", "notification_backup_reliability": "Benachrichtigungen aktivieren, um die Zuverlässigkeit der Sicherung im Hintergrund zu verbessern", @@ -1521,6 +1542,8 @@ "obtainium_configurator": "Obtainium Konfigurator", "obtainium_configurator_instructions": "Du kannst Obtainium benutzen, um die App direkt aus den Github Releases zu installieren oder zu aktualisieren. Bitte erstelle dazu einen API-Schlüssel und wähle eine Variante aus um einen Obtainium-Konfigurationslink zu erstellen", "ocr": "OCR", + "ocr_body": "Immich liest jetzt den Text in deinen Fotos, sodass du nach ihrem Inhalt suchen kannst.", + "ocr_title": "Suche Text in deinen Fotos", "official_immich_resources": "Offizielle Immich Quellen", "offline": "Offline", "offset": "Verschiebung", @@ -1539,6 +1562,8 @@ "open": "Öffnen", "open_calendar": "Kalender öffnen", "open_in_browser": "Im Browser öffnen", + "open_in_immich_body": "Setze Immich als deine Galerie auf Android um auf Fotos von anderen Apps zugreifen zu können.", + "open_in_immich_title": "Öffne Fotos in Immich", "open_in_map_view": "In Kartenansicht öffnen", "open_in_openstreetmap": "In OpenStreetMap öffnen", "open_the_search_filters": "Die Suchfilter öffnen", @@ -1697,7 +1722,10 @@ "recent": "Neueste", "recent_searches": "Letzte Suchen", "recently_added": "Kürzlich hinzugefügt", + "recently_added_body": "Öffne direkt deine neusten Änderungen direkt auf einer Seite.", + "recently_added_description": "Durchsuche deine Medien nachdem Sie auf Immich hochgeladen wurden", "recently_added_page_title": "Zuletzt hinzugefügt", + "recently_added_title": "Zuletzt hinzugefügt", "recently_taken": "Kürzlich aufgenommen", "refresh": "Aktualisieren", "refresh_encoded_videos": "Kodierte Videos aktualisieren", @@ -1904,6 +1932,8 @@ "share_link": "Link teilen", "share_original": "Original verwenden (groß)", "share_preview": "Thumbnail verwenden (klein)", + "share_quality_body": "Halte den Teilen Button gedrückt um die Bildqualität vor dem Teilen auszuwählen.", + "share_quality_title": "Wähle deine Qualität zum Teilen aus", "shared": "Geteilt", "shared_album_activities_input_disable": "Kommentare sind deaktiviert", "shared_album_activity_remove_content": "Möchtest du diese Aktivität entfernen?", @@ -1919,6 +1949,8 @@ "shared_link_clipboard_copied_massage": "Link kopiert", "shared_link_create_error": "Fehler beim Erstellen der Linkfreigabe", "shared_link_custom_url_description": "Greife über eine benutzerdefinierte URL auf diesen Freigabelink zu", + "shared_link_custom_url_title": "Benutzerdefinierte URL", + "shared_link_custom_url_warning": "Warnung: eine benutzerdefinierte URL mit einem Schrägstrich verhält sich möglicherweise nicht wie erwartet.", "shared_link_edit_description_hint": "Beschreibung eingeben", "shared_link_edit_expire_after_option_day": "1 Tag", "shared_link_edit_expire_after_option_days": "{count} Tagen", @@ -1985,16 +2017,19 @@ "sign_out": "Abmelden", "sign_up": "Registrieren", "size": "Größe", + "skip": "Überspringen", "skip_to_content": "Zum Inhalt springen", "skip_to_folders": "Springe zu Ordnern", "skip_to_tags": "Springe zu Tags", "slideshow": "Diashow", + "slideshow_body": "Lehn' dich zurück und genieße deine Fotos in einer Vollbild Diashow.", "slideshow_metadata_overlay_mode": "Overlay Inhalt", "slideshow_metadata_overlay_mode_description_only": "Nur Beschreibung", "slideshow_metadata_overlay_mode_full": "Alles", "slideshow_repeat": "Slideshow wiederholen", "slideshow_repeat_description": "Wenn Slideshow beendet, zum Anfang zurückkehren", "slideshow_settings": "Diashow-Einstellungen", + "slideshow_title": "Diashow", "smart_album": "Smart Album", "some_assets_already_have_a_location_warning": "Einige der ausgewählten Dateien haben bereits einen Standort", "sort_albums_by": "Alben sortieren nach...", @@ -2122,6 +2157,7 @@ "unknown": "Unbekannt", "unknown_country": "Unbekanntes Land", "unknown_date": "Unbekanntes Datum", + "unknown_schema": "Unbekanntes Schema", "unknown_year": "Unbekanntes Jahr", "unlimited": "Unlimitiert", "unlink_motion_video": "Verknüpfung zum Bewegungsvideo aufheben", @@ -2157,6 +2193,8 @@ "upload_status_errors": "Fehler", "upload_status_uploaded": "Hochgeladen", "upload_success": "Hochladen erfolgreich. Aktualisiere die Seite, um neue hochgeladene Dateien zu sehen.", + "upload_to_album_body": "Für Nutzer*innen die nicht den manuellen Upload verwenden, du kannst auswählen neue lokale Fotos direkt in ein Album hinzufügen, sodass du sie nicht erst hochladen und dann zu einem Album hinzufügen musst.", + "upload_to_album_title": "Direkt in ein Album hochladen", "upload_to_immich": "Auf Immich hochladen ({count})", "uploading": "Wird hochgeladen", "uploading_media": "Medien werden hochgeladen", @@ -2224,6 +2262,9 @@ "week": "Woche", "welcome": "Willkommen", "welcome_to_immich": "Willkommen bei Immich", + "whats_new": "Neuigkeiten", + "whats_new_settings_subtitle": "Neues in Immich", + "whats_new_version": "Version {version}", "when": "Wann", "width": "Breite", "wifi_name": "WLAN-Netzwerk", diff --git a/i18n/de_CH.json b/i18n/de_CH.json index add3265d23..90bd308514 100644 --- a/i18n/de_CH.json +++ b/i18n/de_CH.json @@ -113,8 +113,8 @@ "job_not_concurrency_safe": "Diese Aufgabe kann nicht mehrmals parallel laufen gelassen werden.", "job_settings": "Aufgabeneinstellungen", "job_settings_description": "Gleichzeitige Ausführung von Aufgaben verwalten", - "jobs_delayed": "Qualität", - "jobs_failed": "{jobCount, plural, other {# failed}}", + "jobs_delayed": "{jobCount, plural, other {# verzögert}}", + "jobs_failed": "{jobCount, plural, other {# fehlgeschlagen}}", "jobs_over_time": "Jobs im Laufe der Zeit", "library_created": "Bibliothek erstellt: {library}", "library_deleted": "Bibliothek gelöscht", diff --git a/i18n/el.json b/i18n/el.json index 5cdf71367a..c3505dbabb 100644 --- a/i18n/el.json +++ b/i18n/el.json @@ -23,6 +23,7 @@ "add_location": "Προσθήκη τοποθεσίας", "add_partner": "Προσθήκη συνεργάτη", "add_photos": "Προσθήκη φωτογραφιών", + "add_step": "Προσθήκη βήματος", "add_tag": "Προσθήκη ετικέτας", "add_to": "Προσθήκη σε…", "add_to_album": "Προσθήκη σε άλμπουμ", @@ -72,6 +73,7 @@ "cron_expression_description": "Ορίστε το διάστημα σάρωσης χρησιμοποιώντας τη μορφή cron. Για περισσότερες πληροφορίες, ανατρέξτε π.χ. στο Crontab Guru", "cron_expression_presets": "Προκαθορισμένες εκφράσεις cron", "disable_login": "Απενεργοποίηση σύνδεσης", + "download_csv": "Μεταφόρτωση CSV", "duplicate_detection_job_description": "Εκτελέστε μηχανική μάθηση σε στοιχεία για να εντοπίσετε παρόμοιες εικόνες. Βασίζεται στην Έξυπνη Αναζήτηση", "exclusion_pattern_description": "Τα μοτίβα αποκλεισμού σας επιτρέπουν να αγνοείται αρχεία και φακέλους κατά τη σάρωση της βιβλιοθήκης σας. Αυτό είναι χρήσιμο εάν εχετε φακέλους που περιέχουν αρχεία που δεν θέλετε να εισάγετε, όπως αρχεία RAW.", "export_config_as_json_description": "Κατέβασε την τρέχουσα διαμόρφωση συστήματος ως αρχείο JSON", @@ -106,6 +108,21 @@ "image_thumbnail_quality_description": "Ποιότητα μικρογραφίας από 1 έως 100. Υψηλότερες τιμές είναι καλύτερες, αλλά παράγουν μεγαλύτερα αρχεία που μπορεί να μειώσουν την ταχύτητα απόκρισης της εφαρμογής.", "image_thumbnail_title": "Ρυθμίσεις Μικρογραφίας", "import_config_from_json_description": "Εισαγωγή διαμόρφωσης συστήματος με ανέβασμα αρχείου διαμόρφωσης JSON", + "integrity_checks_checksum_files": "Αρχεία ελέγχου ακεραιότητας", + "integrity_checks_checksum_files_description": "Ρύθμιση του ελέγχου ακεραιότητας", + "integrity_checks_checksum_files_enable_description": "Ενεργοποίηση του ελέγχου ακεραιότητας", + "integrity_checks_checksum_files_percentage_limit": "Όριο ποσοστού", + "integrity_checks_checksum_files_percentage_limit_description": "Ρυθμίστε το μέγιστο ποσοστό μεταξύ 0,01 και 1 για το πόσο θα εκτελείται ο έλεγχος ακεραιότητας σε κάθε διάστημα.", + "integrity_checks_checksum_files_time_limit": "Χρονικό όριο", + "integrity_checks_checksum_files_time_limit_description": "Ρυθμίστε τη μέγιστη διάρκεια για την οποία θα εκτελείται ο έλεγχος ακεραιότητας σε κάθε διάστημα. (ms)", + "integrity_checks_missing_files": "Ελλείποντα αρχεία", + "integrity_checks_missing_files_description": "Ρυθμίστε τη συχνότητα και ενεργοποιήστε ή απενεργοποιήστε τον έλεγχο για τα ελλείποντα αρχεία", + "integrity_checks_missing_files_enable_description": "Ενεργοποίηση ελέγχου για τα ελλείποντα αρχεία", + "integrity_checks_settings": "Έλεγχοι ακεραιότητας", + "integrity_checks_settings_description": "Διαχείριση διαστημάτων ελέγχων ακεραιότητας", + "integrity_checks_untracked_files": "Αρχεία χωρίς παρακολούθηση", + "integrity_checks_untracked_files_description": "Ρυθμίστε τη συχνότητα και ενεργοποιήστε ή απενεργοποιήστε τον έλεγχο για τα μη παρακολουθούμενα αρχεία", + "integrity_checks_untracked_files_enable_description": "Ενεργοποίηση του ελέγχου για τα μη παρακολουθούμενα αρχεία", "job_concurrency": "Ταυτόχρονη εκτέλεση {job}", "job_created": "Εργασία δημιουργήθηκε", "job_not_concurrency_safe": "Αυτή η εργασία δεν είναι ασφαλής για ταυτόχρονη εκτέλεση.", @@ -181,9 +198,25 @@ "machine_learning_smart_search_enabled": "Ενεργοποίηση έξυπνης αναζήτησης", "machine_learning_smart_search_enabled_description": "Αν απενεργοποιηθεί, οι εικόνες δεν θα κωδικοποιούνται για έξυπνη αναζήτηση.", "machine_learning_url_description": "Η διεύθυνση URL του διακομιστή μηχανικής μάθησης. Αν δοθούν περισσότερες από μία διευθύνσεις URL, κάθε διακομιστής θα δοκιμάζεται διαδοχικά μέχρι να ανταποκριθεί ένας με επιτυχία, με τη σειρά από την πρώτη έως την τελευταία. Οι διακομιστές που δεν ανταποκρίνονται θα αγνοούνται προσωρινά μέχρι να επανέλθουν σε λειτουργία.", + "maintenance_backup_management": "Διαχείριση αντιγράφων ασφαλείας", "maintenance_delete_backup": "Διαγραφή αντιγράφου ασφαλείας", "maintenance_delete_backup_description": "Αυτό το αρχείο θα διαγραφεί οριστικά και χωρίς δυνατότητα επαναφοράς.", "maintenance_delete_error": "Αποτυχία διαγραφής του αντιγράφου ασφαλείας.", + "maintenance_integrity_check": "Έλεγχος", + "maintenance_integrity_check_all": "Έλεγχος Όλων", + "maintenance_integrity_checksum_mismatch": "Ασυμφωνία ελέγχου ακεραιότητας", + "maintenance_integrity_checksum_mismatch_description": "Αρχεία των οποίων ο έλεγχος ακεραιότητας στο δίσκο δεν ταιριάζει με εκείνον που έχει αποθηκεύσει το Immich στη βάση δεδομένων του.", + "maintenance_integrity_checksum_mismatch_job": "Έλεγχος για ασυμφωνίες ελέγχου ακεραιότητας", + "maintenance_integrity_checksum_mismatch_refresh_job": "Ανανέωση αναφορών ασυμφωνιών ελέγχου ακεραιότητας", + "maintenance_integrity_missing_file": "Ελλείποντα Αρχεία", + "maintenance_integrity_missing_file_description": "Αρχεία που το Immich έχει καταχωρίσει στη βάση δεδομένων του αλλά δεν υπάρχουν στο σύστημα αρχείων.", + "maintenance_integrity_missing_file_job": "Έλεγχος για ελλείποντα αρχεία", + "maintenance_integrity_missing_file_refresh_job": "Ανανέωση αναφορών ελλειπόντων αρχείων", + "maintenance_integrity_report": "Αναφορά ακεραιότητας", + "maintenance_integrity_untracked_file": "Μη παρακολουθούμενα αρχεία", + "maintenance_integrity_untracked_file_description": "Αρχεία στους φακέλους του Immich για τα οποία το Immich δεν έχει καμία καταχώριση.", + "maintenance_integrity_untracked_file_job": "Έλεγχος για μη παρακολουθούμενα αρχεία", + "maintenance_integrity_untracked_file_refresh_job": "Ανανέωση αναφορών για μη παρακολουθούμενα αρχεία", "maintenance_restore_backup": "Επαναφορά αντιγράφου ασφαλείας", "maintenance_restore_backup_description": "Το Immich θα διαγραφεί πλήρως και θα επαναφερθεί από το επιλεγμένο αντίγραφο ασφαλείας. Θα δημιουργηθεί αντίγραφο ασφαλείας πριν τη συνέχεια.", "maintenance_restore_backup_different_version": "Αυτό το αντίγραφο ασφαλείας δημιουργήθηκε με διαφορετική έκδοση του Immich!", @@ -298,6 +331,8 @@ "refreshing_all_libraries": "Επαναφόρτωση όλων των βιβλιοθηκών", "registration": "Εγγραφή Διαχειριστή", "registration_description": "Δεδομένου ότι είστε ο πρώτος χρήστης στο σύστημα, θα ανατεθείτε ως Διαχειριστής και θα είστε υπεύθυνος για τις διαχειριστικές εργασίες, ενώ οι επιπλέον χρήστες θα δημιουργούνται από εσάς.", + "release_channel_release_candidate": "Υποψήφια έκδοση", + "release_channel_stable": "Σταθερή", "remove_failed_jobs": "Αφαίρεση αποτυχημένων εργασιών", "require_password_change_on_login": "Απαιτείται από τον χρήστη να αλλάξει τον κωδικό πρόσβασης κατά την πρώτη σύνδεση", "reset_settings_to_default": "Επαναφορά προεπιλεγμένων ρυθμίσεων", @@ -392,6 +427,14 @@ "transcoding_preferred_hardware_device_description": "Ισχύει μόνο για VAAPI και QSV. Ορίζει τον κόμβο DRI που χρησιμοποιείται για την επιτάχυνση υλικού κατά την κωδικοποίηση.", "transcoding_preset_preset": "Προκαθορισμένη ρύθμιση (-preset)", "transcoding_preset_preset_description": "Ταχύτητα συμπίεσης. Οι πιο αργές προκαθορισμένες ρυθμίσεις παράγουν μικρότερα αρχεία και βελτιώνουν την ποιότητα όταν στοχεύουν σε έναν συγκεκριμένο ρυθμό μετάδοσης (bitrate). Ο VP9 αγνοεί τις ταχύτητες πάνω από την 'πιο γρήγορη' (faster).", + "transcoding_realtime": "Μετατροπή σε πραγματικό χρόνο [ΠΕΙΡΑΜΑΤΙΚΟ]", + "transcoding_realtime_description": "Επιτρέπει τη επανακωδικοποίηση να εκτελείται σε πραγματικό χρόνο καθώς γίνεται η ροή του βίντεο. Ενεργοποιεί την αλλαγή ποιότητας, αλλά μπορεί να προκαλέσει μεγαλύτερη καθυστέρηση αναπαραγωγής και κολλήματα, ανάλογα με τις δυνατότητες του διακομιστή.", + "transcoding_realtime_enabled": "Ενεργοποίηση επανακωδικοποίησης σε πραγματικό χρόνο", + "transcoding_realtime_enabled_description": "Αν είναι απενεργοποιημένο, ο διακομιστής θα αρνείται την εκκίνηση νέων συνεδριών επανακωδικοποίησης σε πραγματικό χρόνο.", + "transcoding_realtime_resolutions": "Αναλύσεις", + "transcoding_realtime_resolutions_description": "Οι αναλύσεις που προσφέρονται για επανακωδικοποίηση σε πραγματικό χρόνο. Οι υψηλότερες αναλύσεις μπορεί να προκαλέσουν προβλήματα αναπαραγωγής, εάν ο διακομιστής δεν μπορεί να τις επανακωδικοποιήσει αρκετά γρήγορα.", + "transcoding_realtime_video_codecs": "Κωδικοποιητές βίντεο", + "transcoding_realtime_video_codecs_description": "Οι κωδικοποιητές βίντεο που προσφέρονται για επανακωδικοποίηση σε πραγματικό χρόνο. Οι συσκευές-πελάτες θα επιλέγουν την καλύτερη επιλογή που υποστηρίζουν κατά την αναπαραγωγή. Το AV1 είναι πιο αποδοτικό από το HEVC, το οποίο είναι πιο αποδοτικό από το H.264. Όταν χρησιμοποιείτε επιτάχυνση υλικού, επιλέξτε μόνο τους κωδικοποιητές που μπορεί να κωδικοποιήσει ο επιταχυντής. Όταν χρησιμοποιείτε επανακωδικοποίηση μέσω λογισμικού, σημειώστε ότι το H.264 είναι ταχύτερο από το AV1, το οποίο είναι ταχύτερο από το HEVC.", "transcoding_reference_frames": "Καρέ αναφοράς", "transcoding_reference_frames_description": "Ο αριθμός των καρέ που χρησιμοποιούνται ως αναφορά κατά τη συμπίεση ενός δεδομένου καρέ. Υψηλότερες τιμές βελτιώνουν την αποδοτικότητα της συμπίεσης, αλλά επιβραδύνουν την κωδικοποίηση. Η τιμή 0 ρυθμίζει αυτό τον αριθμό, αυτόματα.", "transcoding_required_description": "Μόνο βίντεο που δεν είναι σε αποδεκτή μορφή", @@ -435,6 +478,8 @@ "user_settings_description": "Διαχείριση ρυθμίσεων χρήστη", "user_successfully_removed": "Ο χρήστης {email} αφαιρέθηκε με επιτυχία.", "users_page_description": "Σελίδα χρηστών διαχειριστή", + "version_check_channel": "Κανάλι έκδοσης", + "version_check_channel_description": "Επιλέξτε το κανάλι έκδοσης για το οποίο θέλετε να λαμβάνετε ανακοινώσεις εκδόσεων", "version_check_enabled_description": "Ενεργοποίηση ελέγχου έκδοσης", "version_check_implications": "Η λειτουργία ελέγχου έκδοσης, εξαρτάται από την περιοδική επικοινωνία με το {server}", "version_check_settings": "Έλεγχος εκδοσης", @@ -529,6 +574,7 @@ "asset_added_to_album": "Προστέθηκε στο άλμπουμ", "asset_adding_to_album": "Προστίθεται στο άλμπουμ…", "asset_created": "Το στοιχείο δημιουργήθηκε", + "asset_day_count": "{date}: {count, plural, one {# στοιχείο} other {# στοιχεία}}", "asset_description_updated": "Η περιγραφή του αντικειμένου έχει ενημερωθεί", "asset_hashing": "Δημιουργία κατακερματισμού…", "asset_list_group_by_sub_title": "Ομαδοποίηση κατά", @@ -551,6 +597,7 @@ "asset_viewer_settings_title": "Προβολή Στοιχείων", "assets": "Αντικείμενα", "assets_added_to_album_count": "Προστέθηκε {count, plural, one {# αρχείο} other {# αρχεία}} στο άλμπουμ", + "assets_added_to_album_partial_count": "Προστέθηκαν {successCount} από τα {totalCount} {totalCount, plural, one {στοιχείο} other {στοιχεία}} στο άλμπουμ", "assets_added_to_albums_count": "Προστέθηκαν {assetTotal, plural, one {# αρχείο} other {# αρχεία}} σε {albumTotal, plural, one {# άλμπουμ} other {# άλμπουμ}}", "assets_cannot_be_added_to_album_count": "{count, plural, one {Στοιχείο} other {Στοιχεία}} δεν μπορούν να προστεθούν στο άλμπουμ", "assets_cannot_be_added_to_albums": "Δεν μπορεί να προστεθεί κανένα {count, plural, one {στοιχείο} other {στοιχεία}} σε κανένα από τα άλμπουμ", @@ -604,12 +651,14 @@ "backup_options": "Επιλογές αντιγράφου ασφαλείας", "backup_settings_subtitle": "Διαχείριση των ρυθμίσεων μεταφόρτωσης", "backward": "Προς τα πίσω", + "battery_optimization_backup_reliability": "Η απενεργοποίηση των βελτιστοποιήσεων μπαταρίας μπορεί να βελτιώσει την αξιοπιστία των αντιγράφων ασφαλείας στο παρασκήνιο", "biometric_auth_enabled": "Βιομετρική ταυτοποίηση ενεργοποιήθηκε", "biometric_locked_out": "Είστε κλειδωμένοι εκτός της βιομετρικής ταυτοποίησης", "biometric_no_options": "Δεν υπάρχουν διαθέσιμοι τρόποι βιομετρικής ταυτοποίησης", "biometric_not_available": "Δεν υπάρχει διαθέσιμη βιομετρική ταυτοποίηση σε αυτή τη συσκευή", "birthdate_set_description": "Η ημερομηνία γέννησης χρησιμοποιείται για τον υπολογισμό της ηλικίας αυτού του ατόμου, τη χρονική στιγμή μιας φωτογραφίας.", "blurred_background": "Θολό φόντο", + "browse_templates": "Περιήγηση σε πρότυπα", "bugs_and_feature_requests": "Σφάλματα & Αιτήματα Λειτουργιών", "build": "Κατασκευή", "build_image": "Κατασκευή Εικόνας", @@ -629,6 +678,7 @@ "cannot_update_the_description": "Αδύνατη η ενημέρωση της περιγραφής", "cast": "Προβολή", "cast_description": "Ρύθμιση των διαθέσιμων προορισμών casting", + "change": "Αλλαγή", "change_date": "Αλλαγή ημερομηνίας", "change_description": "Αλλαγή περιγραφής", "change_display_order": "Αλλαγή σειράς εμφάνισης", @@ -651,6 +701,7 @@ "charging_requirement_mobile_backup": "Η δημιουργία αντιγράφων ασφάλειας στο παρασκήνιο απαιτεί η συσκευή να φορτίζει", "check_logs": "Ελέγξτε τα αρχεία καταγραφής", "checksum": "Έλεγχος ακεραιότητας", + "choose": "Επιλογή", "choose_matching_people_to_merge": "Επιλέξτε τα αντίστοιχα άτομα για συγχώνευση", "city": "Πόλη", "cleanup_confirm_description": "Το Immich εντόπισε {count} αρχεία (δημιουργήθηκαν πριν από {date}) που έχουν ασφαλώς αντιγραφεί στον διακομιστή. Να διαγραφούν τα τοπικά αντίγραφα από αυτή τη συσκευή;", @@ -668,6 +719,7 @@ "clear": "Εκκαθάριση", "clear_all": "Εκκαθάριση όλων", "clear_all_recent_searches": "Εκκαθάριση όλων των πρόσφατων αναζητήσεων", + "clear_failed_count": "Αποτυχία εκκαθάρισης ({count})", "clear_file_cache": "Εκκαθάριση της Προσωρινής Μνήμης Αρχείων", "clear_message": "Εκκαθάριση μηνύματος", "clear_value": "Εκκαθάριση τιμής", @@ -695,6 +747,7 @@ "comments_are_disabled": "Τα σχόλια είναι απενεργοποιημένα", "common_create_new_album": "Δημιουργία νέου άλμπουμ", "completed": "Ολοκληρώθηκε", + "configuration": "Ρύθμιση", "confirm": "Επιβεβαίωση", "confirm_admin_password": "Επιβεβαίωση κωδικού Διαχειριστή", "confirm_delete_face": "Είστε σίγουροι ότι θέλετε να διαγράψετε το πρόσωπο του/της {name} από το στοιχείο;", @@ -709,6 +762,7 @@ "contain": "Περιέχει", "context": "Συμφραζόμενα", "continue": "Συνέχεια", + "control_bottom_app_bar_add_tags": "Προσθήκη Ετικετών", "control_bottom_app_bar_delete_from_local": "Διαγραφή από τη συσκευή", "control_bottom_app_bar_edit_location": "Επεξεργασία Τοποθεσίας", "control_bottom_app_bar_edit_time": "Επεξεργασία Ημερομηνίας & Ώρας", @@ -717,6 +771,7 @@ "copied_to_clipboard": "Αντιγράφηκε στο πρόχειρο!", "copy_error": "Σφάλμα αντιγραφής", "copy_image": "Αντιγραφή Εικόνας", + "copy_json": "Αντιγραφή JSON", "copy_link": "Αντιγραφή συνδέσμου", "copy_link_to_clipboard": "Αντιγραφή συνδέσμου στο πρόχειρο", "copy_password": "Αντιγραφή κωδικού", @@ -759,7 +814,6 @@ "custom_date": "Προσαρμοσμένη ημερομηνία", "custom_locale": "Προσαρμοσμένη τοπική ρύθμιση", "custom_locale_description": "Μορφοποιήστε τις ημερομηνίες, τους χρόνους και τους αριθμούς, σύμφωνα με την επιλεγμένη γλώσσα και περιοχή", - "custom_url": "Προσαρμοσμένη διεύθυνση URL", "cutoff_date_description": "Διατήρηση φωτογραφιών από τις τελευταίες…", "cutoff_day": "{count, plural, one {ημέρα} other {ημέρες}}", "cutoff_year": "{count, plural, one {έτος} other {έτη}}", @@ -769,11 +823,15 @@ "date_after": "Ημερομηνία μετά", "date_and_time": "Ημερομηνία και ώρα", "date_before": "Ημερομηνία πριν", + "date_of_birth": "Ημερομηνία γέννησης", "date_of_birth_saved": "Η ημερομηνία γέννησης αποθηκεύτηκε επιτυχώς", "date_range": "Εύρος ημερομηνιών", + "date_time_original": "Ημερομηνία/Ώρα λήψης", "day": "Ημέρα", "days": "Ημέρες", "deduplicate_all": "Αφαίρεση όλων των διπλότυπων", + "default_quality_subtitle": "Η ποιότητα που χρησιμοποιείται όταν πατάτε κοινή χρήση. Κρατήστε πατημένο το κουμπί κοινής χρήσης για να επιλέγετε κάθε φορά.", + "default_share_quality": "Προεπιλεγμένη ποιότητα διαμοιρασμού", "delete": "Διαγραφή", "delete_action_confirmation_message": "Είστε σίγουροι ότι θέλετε να διαγράψετε αυτό το αρχείο; Αυτή η ενέργεια θα το μετακινήσει στον κάδο απορριμμάτων του διακομιστή και θα εμφανιστεί μήνυμα για το αν θέλετε να το διαγράψετε και τοπικά", "delete_action_prompt": "{count} διαγράφηκαν", @@ -835,7 +893,10 @@ "downloading_asset_filename": "Λήψη στοιχείου {filename}", "downloading_from_icloud": "Λήψη από το iCloud", "downloading_media": "Λήψη πολυμέσων", + "drag_to_reorder": "Σύρετε για αναδιάταξη", "drop_files_to_upload": "Σύρετε αρχεία εδώ για να τα ανεβάσετε", + "duplicate": "Διπλότυπο", + "duplicate_workflow": "Διπλότυπη ροή εργασίας", "duplicates": "Διπλότυπα", "duplicates_description": "Επιλύστε κάθε ομάδα υποδεικνύοντας ποιες, εάν υπάρχουν, είναι διπλότυπες.", "duration": "Διάρκεια", @@ -930,6 +991,7 @@ "failed_to_remove_product_key": "Αποτυχία αφαίρεσης κλειδιού προϊόντος", "failed_to_reset_pin_code": "Αποτυχία επαναφοράς του PIN", "failed_to_stack_assets": "Αποτυχία στην συμπίεση των στοιχείων", + "failed_to_tag_assets": "Αποτυχία προσθήκης ετικετών στα στοιχεία", "failed_to_unstack_assets": "Αποτυχία στην αποσυμπίεση των στοιχείων", "failed_to_update_notification_status": "Αποτυχία ενημέρωσης της κατάστασης ειδοποίησης", "incorrect_email_or_password": "Λανθασμένο email ή κωδικός πρόσβασης", @@ -1041,15 +1103,18 @@ "export_as_json": "Εξαγωγή ως JSON", "export_database": "Εξαγωγή βάσης δεδομένων", "export_database_description": "Εξαγωγή της SQLite βάσης δεδομένων", + "exposure_time": "Χρόνος Έκθεσης", "extension": "Επέκταση", "external": "Εξωτερικός", "external_libraries": "Εξωτερικές βιβλιοθήκες", "external_network": "Εξωτερικό δίκτυο", "external_network_sheet_info": "Όταν δεν είστε συνδεδεμένοι στο προτιμώμενο δίκτυο Wi-Fi, η εφαρμογή θα συνδεθεί με τον διακομιστή μέσω του πρώτου από τα παρακάτω URLs που μπορεί να βρει διαθέσιμο, ξεκινώντας από το πάνω προς το κάτω", + "f_number": "Διάφραγμα", "face_unassigned": "Μη ανατεθειμένο", "failed": "Απέτυχε", "failed_count": "Αποτυχημένα: {count}", "failed_to_authenticate": "Αποτυχία ταυτοποίησης", + "failed_to_delete_file": "Αποτυχία διαγραφής αρχείου", "failed_to_load_assets": "Αποτυχία φόρτωσης στοιχείων", "failed_to_load_folder": "Αποτυχία φόρτωσης φακέλου", "favorite": "Αγαπημένο", @@ -1071,6 +1136,7 @@ "filters": "Φίλτρα", "first": "Αρχικά", "fix_incorrect_match": "Διόρθωση λανθασμένης αντιστοίχισης", + "focal_length": "Εστιακή Απόσταση", "folder": "Φάκελος", "folder_not_found": "Ο φάκελος δεν βρέθηκε", "folders": "Φάκελοι", @@ -1081,6 +1147,7 @@ "free_up_space_description": "Μετακινήστε τις φωτογραφίες και τα βίντεο που έχουν αντιγραφεί στον κάδο της συσκευής σας για να απελευθερώσετε χώρο. Τα αντίγραφά σας στο διακομιστή, παραμένουν ασφαλή.", "free_up_space_settings_subtitle": "Απελευθέρωση χώρου στη συσκευή", "full_path": "Πλήρης διαδρομή: {path}", + "full_path_or_folder": "Πλήρης διαδρομή ή φάκελος", "gcast_enabled": "Μετάδοση περιεχομένου Google Cast", "gcast_enabled_description": "Αυτό το χαρακτηριστικό φορτώνει εξωτερικούς πόρους από τη Google για να λειτουργήσει.", "general": "Γενικά", @@ -1152,6 +1219,7 @@ "individual_share": "Μεμονωμένος διαμοιρασμός", "individual_shares": "Μεμονωμένες κοινοποιήσεις", "info": "Πληροφορίες", + "integrity_checks": "Έλεγχοι Ακεραιότητας", "interval": { "day_at_onepm": "Κάθε μέρα στη 1μμ", "hours": "Κάθε {hours, plural, one {ώρα} other {{hours, number} ώρες}}", @@ -1162,6 +1230,7 @@ "invalid_date_format": "Μη έγκυρη μορφή ημερομηνίας", "invite_people": "Πρόσκληση Ατόμων", "invite_to_album": "Πρόσκληση σε άλμπουμ", + "iso": "ISO", "items_count": "{count, plural, one {# αντικείμενο} other {# αντικείμενα}}", "jobs": "Εργασίες", "keep": "Διατήρηση", @@ -1190,6 +1259,7 @@ "leave": "Εγκατάλειψη", "leave_album": "Αποχώρηση από το άλμπουμ", "lens_model": "Μοντέλο φακού", + "less": "Λιγότερα", "let_others_respond": "Επέτρεψε σε άλλους να απαντήσουν", "level": "Επίπεδο", "library": "Βιβλιοθήκη", @@ -1210,6 +1280,8 @@ "link_to_oauth": "Σύνδεση στον OAuth", "linked_oauth_account": "Ο OAuth λογαριασμός συνδέθηκε", "list": "Λίστα", + "live": "Ζωντανά", + "load_more": "Φόρτωση Περισσότερων", "loading": "Φόρτωση", "loading_search_results_failed": "Η φόρτωση αποτελεσμάτων αναζήτησης απέτυχε", "local": "Τοπικά", @@ -1250,9 +1322,9 @@ "login_form_failed_login": "Σφάλμα κατά τη σύνδεσή σας, ελέγξτε τη διεύθυνση URL του διακομιστή, το email και τον κωδικό πρόσβασης", "login_form_handshake_exception": "Υπήρξε σφάλμα χειραψίας με τον διακομιστή. Ενεργοποιήστε την υποστήριξη αυτο-υπογεγραμμένου πιστοποιητικού στις ρυθμίσεις εάν χρησιμοποιείτε αυτο-υπογεγραμμένο πιστοποιητικό.", "login_form_password_hint": "κωδικός πρόσβασης", - "login_form_server_empty": "Εισαγάγετε μια διεύθυνση URL διακομιστή.", - "login_form_server_error": "Δεν ήταν δυνατή η σύνδεση με τον διακομιστή.", - "login_has_been_disabled": "Η σύνδεση έχει απενεργοποιηθεί.", + "login_form_server_empty": "Εισαγάγετε μια διεύθυνση URL διακομιστή", + "login_form_server_error": "Δεν ήταν δυνατή η σύνδεση με τον διακομιστή", + "login_has_been_disabled": "Η σύνδεση έχει απενεργοποιηθεί", "login_password_changed_error": "Παρουσιάστηκε σφάλμα κατά την ενημέρωση του κωδικού πρόσβασής σας", "login_password_changed_success": "Ο κωδικός πρόσβασης ενημερώθηκε με επιτυχία", "logout_all_device_confirmation": "Είστε βέβαιοι ότι θέλετε να αποσυνδεθείτε από όλες τις συσκευές;", @@ -1303,6 +1375,7 @@ "map_location_picker_page_use_location": "Χρησιμοποιήστε αυτήν την τοποθεσία", "map_location_service_disabled_content": "Η υπηρεσία τοποθεσίας πρέπει να είναι ενεργοποιημένη για την εμφάνιση στοιχείων από την τρέχουσα τοποθεσία σας. Θέλετε να το ενεργοποιήσετε τώρα;", "map_location_service_disabled_title": "Η υπηρεσία τοποθεσίας απενεργοποιήθηκε", + "map_marker_for_image": "Σήμανση στον χάρτη για φωτογραφία που τραβήχτηκε στο {city}, {country}", "map_marker_with_image": "Χάρτης δείκτη με εικόνα", "map_no_location_permission_content": "Απαιτείται άδεια τοποθεσίας για την εμφάνιση στοιχείων από την τρέχουσα τοποθεσία σας. Θέλετε να το επιτρέψετε τώρα;", "map_no_location_permission_title": "Η άδεια τοποθεσίας απορρίφθηκε", @@ -1320,6 +1393,38 @@ "marked_all_as_read": "Όλα επισημάνθηκαν ως αναγνωσμένα", "matches": "Αντιστοιχίες", "matching_assets": "Αντιστοιχία στοιχείων", + "media_chrome": { + "auto": "Αυτόματα", + "captions": "Λεζάντες", + "captions_off": "Κλειστό", + "closed_captions": "υπότιτλοι για κωφούς/βαρήκοους", + "decode_error": "Σφάλμα αποκωδικοποίησης", + "disable_captions": "Απενεργοποίηση υπότιτλων", + "enable_captions": "Ενεργοποίηση υπότιτλων", + "enter_fullscreen_mode": "Είσοδος σε πλήρη οθόνη", + "exit_fullscreen_mode": "Έξοδος από πλήρη οθόνη", + "loop": "Επανάληψη", + "media_error_description": "Ένα σφάλμα πολυμέσων προκάλεσε τη διακοπή της αναπαραγωγής. Το αρχείο πολυμέσων μπορεί να είναι κατεστραμμένο ή το πρόγραμμα περιήγησής σας δεν υποστηρίζει αυτήν τη μορφή.", + "media_loading": "φόρτωση πολυμέσων", + "mute": "Σίγαση", + "network_error": "Σφάλμα δικτύου", + "network_error_description": "Ένα σφάλμα δικτύου προκάλεσε την αποτυχία λήψης του αρχείου πολυμέσων.", + "not_supported_error": "Η Πηγή Δεν Υποστηρίζεται", + "playback_rate": "Ταχύτητα αναπαραγωγής", + "playback_rate_current": "τρέχουσα ταχύτητα αναπαραγωγής", + "playback_rate_value": "Ταχύτητα αναπαραγωγής {playbackRate}", + "playback_time": "χρόνος αναπαραγωγής", + "quality": "Ποιότητα", + "second": "δευτερόλεπτο", + "seconds": "δευτερόλεπτα", + "time_value_of_total_time": "{currentTime} από {totalTime}", + "time_value_remaining": "{time} υπολειπόμενος χρόνος", + "unmute": "Ενεργοποίηση ήχου", + "unsupported_error_description": "Παρουσιάστηκε ένα μη υποστηριζόμενο σφάλμα. Ο διακομιστής ή το δίκτυο απέτυχαν ή ο περιηγητής σας δεν υποστηρίζει αυτήν τη μορφή.", + "video_not_loaded_unknown_time": "το βίντεο δεν φορτώθηκε, άγνωστη διάρκεια.", + "video_player": "πρόγραμμα αναπαραγωγής βίντεο", + "volume": "ένταση" + }, "media_type": "Τύπος πολυμέσου", "memories": "Αναμνήσεις", "memories_all_caught_up": "Συγχρονισμένα", @@ -1336,6 +1441,8 @@ "merge_people_prompt": "Θέλετε να συγχωνεύσετε αυτά τα άτομα; Αυτή η ενέργεια είναι μη αναστρέψιμη.", "merge_people_successfully": "Τα άτομα συγχωνεύθηκαν με επιτυχία", "merged_people_count": "Έγινε συγχώνευση {count, plural, one {# ατόμου} other {# ατόμων}}", + "minFaces": "Ελάχιστος αριθμός προσώπων", + "minFaces_description": "Ο ελάχιστος αριθμός αναγνωρισμένων προσώπων για την εμφάνιση ενός ατόμου", "minimize": "Ελαχιστοποίηση", "minute": "Λεπτό", "minutes": "Λεπτά", @@ -1343,8 +1450,10 @@ "mobile_app": "Εφαρμογή για κινητά", "mobile_app_download_onboarding_note": "Κατέβασε την συνοδευτική εφαρμογή για κινητά χρησιμοποιώντας τις παρακάτω επιλογές", "model": "Μοντέλο", + "modify_date": "Ημερομηνία Τροποποίησης", "month": "Μήνας", "more": "Περισσότερα", + "motion": "Κίνηση", "move": "Μετακίνηση", "move_off_locked_folder": "Μετακίνηση έξω από τον κλειδωμένο φάκελο", "move_to": "Μετακίνηση σε", @@ -1371,6 +1480,7 @@ "never": "Ποτέ", "new_album": "Νέο Άλμπουμ", "new_api_key": "Νέο API Key", + "new_feature": "Νέα λειτουργία", "new_password": "Νέος κωδικός πρόσβασης", "new_person": "Νέο άτομο", "new_pin_code": "Νέος κωδικός PIN", @@ -1408,6 +1518,7 @@ "no_results": "Κανένα αποτέλεσμα", "no_results_description": "Δοκιμάστε ένα συνώνυμο ή πιο γενική λέξη-κλειδί", "no_shared_albums_message": "Δημιουργήστε ένα άλμπουμ για να μοιράζεστε φωτογραφίες και βίντεο με άτομα στο δίκτυό σας", + "no_steps": "Δεν έχουν προστεθεί ακόμα βήματα", "none": "Κανένα", "not_allowed": "Δεν επιτρέπεται", "not_available": "Μ/Δ (Μη Διαθέσιμο)", @@ -1415,6 +1526,10 @@ "not_selected": "Δεν επιλέχθηκε", "notes": "Σημειώσεις", "nothing_here_yet": "Τίποτα εδώ ακόμα", + "notification_backup_reliability": "Ενεργοποιήστε τις ειδοποιήσεις για να βελτιώσετε την αξιοπιστία του αντιγράφου ασφαλείας στο παρασκήνιο", + "notification_enabled_list_tile_content": "Το Immich χρησιμοποιεί ειδοποιήσεις για την αξιόπιστη λειτουργία των αντιγράφων ασφαλείας στο παρασκήνιο. Μπορείτε να τις διαχειριστείτε από τις ρυθμίσεις της συσκευής σας.", + "notification_enabled_list_tile_open_button": "Άνοιγμα ρυθμίσεων", + "notification_enabled_list_tile_title": "Ειδοποιήσεις ενεργοποιημένες", "notification_permission_dialog_content": "Για να ενεργοποιήσετε τις ειδοποιήσεις, μεταβείτε στις Ρυθμίσεις και επιλέξτε να επιτρέπεται.", "notification_permission_list_tile_content": "Παραχωρήστε άδεια για ενεργοποίηση ειδοποιήσεων.", "notification_permission_list_tile_enable_button": "Ενεργοποίηση Ειδοποιήσεων", @@ -1426,6 +1541,8 @@ "obtainium_configurator": "Ρυθμιστής Obtainium", "obtainium_configurator_instructions": "Χρησιμοποίησε το Obtainium για να εγκαταστήσεις και να ενημερώσεις απευθείας την εφαρμογή Android από τα κυκλοφορίες του Immich στο GitHub. Δημιούργησε ένα API key και επέλεξε μια παραλλαγή για να δημιουργήσεις το σύνδεσμο ρύθμισης του Obtainium", "ocr": "OCR", + "ocr_body": "Το Immich διαβάζει πλέον το κείμενο μέσα στις φωτογραφίες σας, ώστε να μπορείτε να τις αναζητάτε με βάση το περιεχόμενό τους.", + "ocr_title": "Αναζήτηση κειμένου στις φωτογραφίες σας", "official_immich_resources": "Επίσημοι Πόροι του Immich", "offline": "Εκτός σύνδεσης", "offset": "Μετατόπιση", @@ -1444,6 +1561,8 @@ "open": "Άνοιγμα", "open_calendar": "Άνοιγμα ημερολογίου", "open_in_browser": "Άνοιγμα στο πρόγραμμα περιήγησης", + "open_in_immich_body": "Ορίστε το Immich ως εφαρμογή συλλογής στο Android, ώστε να ανοίγετε φωτογραφίες απευθείας από άλλες εφαρμογές.", + "open_in_immich_title": "Άνοιγμα φωτογραφιών στο Immich", "open_in_map_view": "Άνοιγμα σε προβολή χάρτη", "open_in_openstreetmap": "Άνοιγμα στο OpenStreetMap", "open_the_search_filters": "Ανοίξτε τα φίλτρα αναζήτησης", @@ -1452,6 +1571,7 @@ "organize_into_albums": "Οργάνωση σε άλμπουμ", "organize_into_albums_description": "Τοποθετείστε τις υπάρχουσες φωτογραφίες σε άλμπουμ χρησιμοποιώντας τις τρέχουσες ρυθμίσεις συγχρονισμού", "organize_your_library": "Οργανώστε τη βιβλιοθήκη σας", + "orientation": "Προσανατολισμός", "original": "πρωτότυπο", "other": "Άλλες", "other_devices": "Άλλες συσκευές", @@ -1500,7 +1620,7 @@ "person": "Άτομο", "person_age_months": "{months, plural, one {# μήνας} other {# μήνες}} παλιά", "person_age_year_months": "1 χρόνος, {months, plural, one {# μήνας} other {# μήνες}} παλιά", - "person_age_years": "{years, plural, other {# χρόνια}} παλιά", + "person_age_years": "{years, plural, one {# έτους} other {# ετών}}", "person_birthdate": "Γεννηθείς στις {date}", "person_hidden": "{name}{hidden, select, true { (κρυφό)} other {}}", "person_recognized": "Άτομο αναγνωρίστηκε", @@ -1526,6 +1646,8 @@ "play_original_video_setting_description": "Προτίμησε την αναπαραγωγή των αρχικών βίντεο αντί των μετακωδικοποιημένων. Αν το αρχικό αρχείο δεν είναι συμβατό, ίσως να μην αναπαραχθεί σωστά.", "play_transcoded_video": "Αναπαραγωγή μετακωδικοποιημένου βίντεο", "please_auth_to_access": "Παρακαλώ πιστοποιηθείτε για να αποκτήσετε πρόσβαση", + "plugin_method_filter_type": "Φίλτρο", + "plugin_method_filter_type_description": "Αυτή η μέθοδος μπορεί να φιλτράρει συμβάντα και, ανάλογα με τις συνθήκες, να εμποδίζει την εκτέλεση των επόμενων βημάτων", "port": "Θύρα", "preferences_settings_subtitle": "Διαχειριστείτε τις προτιμήσεις της εφαρμογής", "preferences_settings_title": "Προτιμήσεις", @@ -1546,6 +1668,7 @@ "profile_drawer_readonly_mode": "Η λειτουργία μόνο-για-ανάγνωση ενεργοποιήθηκε. Κρατήστε πατημένο το εικονίδιο του χρήστη για απενεργοποίηση.", "profile_image_of_user": "Εικόνα προφίλ του χρήστη {user}", "profile_picture_set": "Ορισμός εικόνας προφίλ.", + "projection_type": "Τύπος Προβολής", "public_album": "Δημόσιο άλμπουμ", "public_share": "Δημόσια Κοινή Χρήση", "purchase_account_info": "Υποστηρικτής", @@ -1598,7 +1721,10 @@ "recent": "Πρόσφατα", "recent_searches": "Πρόσφατες αναζητήσεις", "recently_added": "Προστέθηκαν πρόσφατα", + "recently_added_body": "Μεταβείτε απευθείας σε όλα όσα έχετε προσθέσει πρόσφατα, σε μια αποκλειστική σελίδα.", + "recently_added_description": "Περιηγηθείτε στα αρχεία σας, ταξινομημένα κατά ημερομηνία μεταφόρτωσής τους στο Immich", "recently_added_page_title": "Προστέθηκαν Πρόσφατα", + "recently_added_title": "Προστέθηκαν πρόσφατα", "recently_taken": "Λήφθηκαν πρόσφατα", "refresh": "Ανανέωση", "refresh_encoded_videos": "Ανανέωση κωδικοποιημένων βίντεο", @@ -1618,6 +1744,7 @@ "remove_assets_shared_link_confirmation": "Είστε σίγουροι ότι θέλετε να αφαιρέσετε {count, plural, one {# στοιχείο} other {# στοιχεία}} από αυτόν τον κοινόχρηστο σύνδεσμο;", "remove_assets_title": "Αφαίρεση στοιχείων;", "remove_custom_date_range": "Αφαίρεση προσαρμοσμένης χρονικής περιόδου", + "remove_filter": "Αφαίρεση φίλτρου", "remove_from_album": "Αφαίρεση από το άλμπουμ", "remove_from_album_action_prompt": "{count} αφαιρέθηκαν από το άλμπουμ", "remove_from_favorites": "Αφαίρεση από τα αγαπημένα", @@ -1689,6 +1816,8 @@ "search_by_description_example": "Ημερήσια πεζοπορία στο Πάπιγκο", "search_by_filename": "Αναζήτηση βάσει ονόματος αρχείου ή επέκτασης αρχείου", "search_by_filename_example": "π.χ. IMG_1234.JPG ή PNG", + "search_by_full_path": "Αναζήτηση με βάση την πλήρη διαδρομή ή το φάκελο", + "search_by_full_path_example": "/Γιάννης/Projects/3D_Printing/2026-07-01 — μπορείτε να κάνετε αναζήτηση για όρους όπως Projects, 3D, Printing, 2026 κ.λπ.", "search_by_ocr": "Αναζήτηση κατά OCR", "search_by_ocr_example": "Λάτε", "search_camera_lens_model": "Αναζήτηση μοντέλου φακού...", @@ -1732,7 +1861,7 @@ "searching_locales": "Αναζήτηση τοποθεσιών...", "second": "Δευτερόλεπτο", "see_all_people": "Προβολή όλων των ατόμων", - "select": "Επιλογή", + "select": "Επιλέξτε", "select_album": "Επιλογή άλμπουμ", "select_album_cover": "Επιλέξτε εξώφυλλο άλμπουμ", "select_albums": "Επιλογή πολλών άλμπουμ", @@ -1750,6 +1879,7 @@ "select_person": "Επίλεξε άτομο", "select_person_to_tag": "Επιλέξτε ένα άτομο για επισήμανση", "select_photos": "Επιλέξτε φωτογραφίες", + "select_quality": "Επιλέξτε ποιότητα", "select_trash_all": "Επιλέξτε διαγραφή όλων", "selected": "Επιλεγμένοι", "selected_count": "{count, plural, other {# επιλεγμένοι}}", @@ -1799,6 +1929,10 @@ "share": "Κοινοποίηση", "share_dialog_preparing": "Προετοιμασία...", "share_link": "Σύνδεσμος κοινοποίησης", + "share_original": "Χρήση αρχικού (μεγάλο μέγεθος)", + "share_preview": "Χρήση μικρογραφίας (μικρό μέγεθος)", + "share_quality_body": "Κρατήστε πατημένο το κουμπί κοινοποίησης για να επιλέξετε την ποιότητα της εικόνας πριν την κοινοποιήσετε.", + "share_quality_title": "Επιλέξτε την ποιότητα κοινοποίησης", "shared": "Σε κοινή χρήση", "shared_album_activities_input_disable": "Το σχόλιο είναι απενεργοποιημένο", "shared_album_activity_remove_content": "Θέλετε να διαγράψετε αυτήν τη δραστηριότητα;", @@ -1813,7 +1947,9 @@ "shared_link_app_bar_title": "Κοινόχρηστοι Σύνδεσμοι", "shared_link_clipboard_copied_massage": "Αντιγράφηκε στο πρόχειρο", "shared_link_create_error": "Σφάλμα κατά τη δημιουργία κοινόχρηστου συνδέσμου", - "shared_link_custom_url_description": "Αποκτήστε πρόσβαση σε αυτόν τον κοινόχρηστο σύνδεσμο με μια προσαρμοσμένη διεύθυνση URL", + "shared_link_custom_url_description": "Αποκτήστε πρόσβαση σε αυτόν τον κοινόχρηστο σύνδεσμο με ένα προσαρμοσμένο URL", + "shared_link_custom_url_title": "Προσαρμοσμένο URL", + "shared_link_custom_url_warning": "Προειδοποίηση: η χρήση κάθετου χαρακτήρα (/) σε προσαρμοσμένο όνομα URL ενδέχεται να προκαλέσει απρόβλεπτη συμπεριφορά.", "shared_link_edit_description_hint": "Εισαγάγετε την περιγραφή της κοινής χρήσης", "shared_link_edit_expire_after_option_day": "1 ημέρα", "shared_link_edit_expire_after_option_days": "{count} ημέρες", @@ -1858,7 +1994,9 @@ "show_in_timeline": "Εμφάνιση στο χρονολόγιο", "show_in_timeline_setting_description": "Εμφάνιση φωτογραφιών και βίντεο από αυτόν τον χρήστη στο χρονολόγιό σας", "show_keyboard_shortcuts": "Εμφάνιση συντομεύσεων πληκτρολογίου", + "show_less": "Προβολή λιγότερων", "show_metadata": "Εμφάνιση μεταδεδομένων", + "show_more_fields": "{count, plural, one {Εμφάνιση # επιπλέον πεδίου} other {Εμφάνιση # επιπλέον πεδίων}}", "show_or_hide_info": "Εμφάνιση ή απόκρυψη πληροφοριών", "show_password": "Εμφάνιση κωδικού", "show_person_options": "Εμφάνιση επιλογών ατόμου", @@ -1866,6 +2004,7 @@ "show_schema": "Εμφάνιση σχήματος", "show_search_options": "Εμφάνιση επιλογών αναζήτησης", "show_shared_links": "Εμφάνιση κοινών συνδέσμων", + "show_slideshow_metadata_overlay": "Εμφάνιση επικάλυψης πληροφοριών εικόνας", "show_slideshow_transition": "Εμφάνιση μετάβασης παρουσίασης", "show_supporter_badge": "Σήμα υποστηρικτή", "show_supporter_badge_description": "Εμφάνιση σήματος υποστηρικτή", @@ -1877,13 +2016,21 @@ "sign_out": "Αποσύνδεση", "sign_up": "Εγγραφή", "size": "Μέγεθος", + "skip": "Παράλειψη", "skip_to_content": "Μετάβαση στο περιεχόμενο", "skip_to_folders": "Παράκαμψη στους φακέλους", "skip_to_tags": "Παράκαμψη στις ετικέτες", "slideshow": "Παρουσίαση", + "slideshow_body": "Καθίστε αναπαυτικά και απολαύστε τις φωτογραφίες σας να προβάλλονται σε μια παρουσίαση πλήρους οθόνης.", + "slideshow_metadata_overlay_mode": "Περιεχόμενο επικάλυψης", + "slideshow_metadata_overlay_mode_description_only": "Μόνο περιγραφή", + "slideshow_metadata_overlay_mode_full": "Πλήρης", "slideshow_repeat": "Επανάληψη παρουσίασης", "slideshow_repeat_description": "Εκκίνηση από την αρχή όταν τελειώσει η παρουσίαση", "slideshow_settings": "Ρυθμίσεις παρουσίασης", + "slideshow_title": "Παρουσίαση φωτογραφιών", + "smart_album": "Έξυπνο άλμπουμ", + "some_assets_already_have_a_location_warning": "Ορισμένα από τα επιλεγμένα στοιχεία έχουν ήδη δεδομένα τοποθεσίας", "sort_albums_by": "Ταξινόμηση άλμπουμ κατά...", "sort_created": "Ημερομηνία Δημιουργίας", "sort_items": "Αριθμός αντικειμένων", @@ -1904,6 +2051,10 @@ "start_date_before_end_date": "Η ημερομηνία έναρξης πρέπει να είναι πριν από την ημερομηνία λήξης", "state": "Νομός", "status": "Κατάσταση", + "step_delete": "Διαγραφή βήματος", + "step_delete_confirm": "Θέλετε σίγουρα να διαγράψετε αυτό το βήμα;", + "step_details": "Λεπτομέρειες βήματος", + "steps": "Βήματα", "stop_casting": "Διακοπή μετάδοσης", "stop_motion_photo": "Διέκοψε την Φωτογραφία Κίνησης", "stop_photo_sharing": "Διακοπή κοινής χρήσης των φωτογραφιών σας;", @@ -1984,10 +2135,12 @@ "trash_page_info": "Τα στοιχεία που έχουν απορριφθεί θα διαγραφούν οριστικά μετά από {days} ημέρες", "trashed_items_will_be_permanently_deleted_after": "Τα στοιχεία που βρίσκονται στον κάδο απορριμμάτων θα διαγραφούν οριστικά μετά από {days, plural, one {# ημέρα} other {# ημέρες}}.", "trigger": "Ενεργοποιητής", - "trigger_asset_uploaded": "Το στοιχείο ανέβηκε", + "trigger_asset_metadata_extraction": "Εξαγωγή μεταδεδομένων στοιχείων", + "trigger_asset_metadata_extraction_description": "Ενεργοποιείται αυτόματα όταν εξάγονται τα μεταδεδομένα EXIF ενός αρχείου", + "trigger_asset_uploaded": "Μεταφόρτωση Στοιχείου", "trigger_asset_uploaded_description": "Ενεργοποιείται όταν ανεβαίνει ένα νέο στοιχείο", "trigger_person_recognized": "Άτομο Αναγνωρίστηκε", - "trigger_person_recognized_description": "Ενεργοποιείται όταν ανιχνεύεται άτομο", + "trigger_person_recognized_description": "Ενεργοποιείται αυτόματα όταν ανιχνεύεται ένα άτομο", "troubleshoot": "Επίλυση προβλημάτων", "type": "Τύπος", "unable_to_change_pin_code": "Αδυναμία αλλαγής κωδικού PIN", @@ -2003,6 +2156,7 @@ "unknown": "Άγνωστο", "unknown_country": "Άγνωστη Χώρα", "unknown_date": "Άγνωστη ημερομηνία", + "unknown_schema": "Άγνωστη δομή", "unknown_year": "Άγνωστο Έτος", "unlimited": "Απεριόριστο", "unlink_motion_video": "Αποσυνδέστε το βίντεο κίνησης", @@ -2027,6 +2181,7 @@ "updated_password": "Ο κωδικός πρόσβασης ενημερώθηκε", "upload": "Μεταφόρτωση", "upload_concurrency": "Ταυτόχρονη μεταφόρτωση", + "upload_day_count": "{date}: {count, plural, one {# μεταφόρτωση} other {# μεταφορτώσεις}}", "upload_details": "Λεπτομέρειες μεταφόρτωσης", "upload_error_with_count": "Σφάλμα μεταφόρτωσης για {count, plural, one {# αρχείο} other {# αρχεία}}", "upload_errors": "Η μεταφόρτωση ολοκληρώθηκε με {count, plural, one {# σφάλμα} other {# σφάλματα}}, ανανεώστε τη σελίδα για να δείτε νέα στοιχεία μεταφόρτωσης.", @@ -2037,9 +2192,13 @@ "upload_status_errors": "Σφάλματα", "upload_status_uploaded": "Μεταφορτώθηκαν", "upload_success": "Η μεταφόρτωση ολοκληρώθηκε, ανανεώστε τη σελίδα για να δείτε τα νέα αντικείμενα.", + "upload_to_album_body": "Για χρήστες που δεν χρησιμοποιούν τη χειροκίνητη μεταφόρτωση, μπορείτε πλέον να προσθέτετε απευθείας τοπικές φωτογραφίες σε ένα άλμπουμ κατά τη μεταφόρτωσή τους. Δεν χρειάζεται πια να τις ανεβάζετε πρώτα και να τις προσθέτετε σε άλμπουμ αργότερα.", + "upload_to_album_title": "Μεταφόρτωση απευθείας σε άλμπουμ", "upload_to_immich": "Μεταφόρτωση στο Immich ({count})", "uploading": "Μεταφορτώνεται", "uploading_media": "Μεταφόρτωση πολυμέσων", + "uploads": "Μεταφορτώσεις", + "uploads_count": "{count, plural, one {# μεταφόρτωση} other {# μεταφορτώσεις}}", "url": "URL", "usage": "Χρήση", "use_biometric": "Χρήση βιομετρικών στοιχείων", @@ -2047,6 +2206,7 @@ "use_browser_locale_description": "Μορφοποιήστε τις ημερομηνίες, τους χρόνους και τους αριθμούς σύμφωνα με τη γλώσσα του προγράμματος περιήγησής σας", "use_current_connection": "Χρήση τρέχουσας σύνδεσης", "use_custom_date_range": "Χρήση προσαρμοσμένου εύρους ημερομηνιών", + "use_template": "Χρήση πρότυπου", "user": "Χρήστης", "user_has_been_deleted": "Αυτός ο χρήστης έχει διεγραφεί.", "user_id": "ID Χρήστη", @@ -2074,6 +2234,7 @@ "video": "Βίντεο", "video_hover_setting": "Προεπισκόπηση βίντεο με το δείκτη του ποντικιού", "video_hover_setting_description": "Προεπισκόπηση βίντεο όταν το ποντίκι βρίσκεται πάνω από το στοιχείο. Ακόμη και όταν είναι απενεργοποιημένη, η αναπαραγωγή μπορεί να ξεκινήσει τοποθετώντας το δείκτη του ποντικιού πάνω από το εικονίδιο αναπαραγωγής.", + "video_quality": "Ποιότητα βίντεο", "videos": "Βίντεο", "videos_count": "{count, plural, one {# Βίντεο} other {# Βίντεο}}", "view": "Προβολή", @@ -2100,9 +2261,14 @@ "week": "Εβδομάδα", "welcome": "Καλωσορίσατε", "welcome_to_immich": "Καλωσορίσατε στο Ιmmich", + "whats_new": "Τι νέο υπάρχει", + "whats_new_settings_subtitle": "Δείτε τι νέο υπάρχει στο Immich", + "whats_new_version": "Έκδοση {version}", + "when": "Πότε", "width": "Πλάτος", "wifi_name": "Όνομα Wi-Fi", - "workflow_delete_prompt": "Είστε σίγουροι ότι θέλετε να διαγράψετε αυτή τη ροή εργασίας;", + "workflow": "Ροή εργασίας", + "workflow_delete_prompt": "Είστε σίγουροι ότι θέλετε να διαγράψετε αυτήω τη ροή εργασίας;", "workflow_deleted": "Η ροή εργασίας διαγράφηκε", "workflow_description": "Περιγραφή ροής εργασίας", "workflow_info": "Πληροφορίες ροής εργασίας", @@ -2111,10 +2277,12 @@ "workflow_name": "Όνομα ροής εργασίας", "workflow_navigation_prompt": "Είστε σίγουροι ότι θέλετε να φύγετε χωρίς να αποθηκεύσετε τις αλλαγές σας;", "workflow_summary": "Σύνοψη ροής εργασίας", + "workflow_templates": "Πρότυπα ροών εργασίας", "workflow_update_success": "Η ροή εργασίας ενημερώθηκε με επιτυχία", "workflows": "Ροές εργασίας", "workflows_help_text": "Οι ροές εργασίας αυτοματοποιούν ενέργειες στα στοιχεία σας με βάση ενεργοποιητές και φίλτρα", "wrong_pin_code": "Λάθος κωδικός PIN", + "x_of_total": "{x}/{total}", "year": "Έτος", "years_ago": "πριν από {years, plural, one {# χρόνο} other {# χρόνια}}", "yes": "Ναι", diff --git a/i18n/en.json b/i18n/en.json index 1587fde604..0acfe68fa3 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -30,6 +30,7 @@ "add_to_album_bottom_sheet_added": "Added to {album}", "add_to_album_bottom_sheet_already_exists": "Already in {album}", "add_to_album_bottom_sheet_some_local_assets": "Some local assets could not be added to album", + "add_to_album_item_count": "Add {count, plural, one {# item} other {# items}} to album", "add_to_albums": "Add to albums", "add_to_albums_count": "Add to albums ({count})", "add_to_bottom_bar": "Add to", @@ -108,6 +109,21 @@ "image_thumbnail_quality_description": "Thumbnail quality from 1-100. Higher is better, but produces larger files and can reduce app responsiveness.", "image_thumbnail_title": "Thumbnail Settings", "import_config_from_json_description": "Import system config by uploading a JSON config file", + "integrity_checks_checksum_files": "Checksum files", + "integrity_checks_checksum_files_description": "Configure the checksum check", + "integrity_checks_checksum_files_enable_description": "Enable the checksum check", + "integrity_checks_checksum_files_percentage_limit": "Percentage limit", + "integrity_checks_checksum_files_percentage_limit_description": "Configure the maximum percentage between 0.01 and 1 for how much the checksum check should run each interval.", + "integrity_checks_checksum_files_time_limit": "Time limit", + "integrity_checks_checksum_files_time_limit_description": "Configure the maximum duration for which the checksum check should run each interval. (ms)", + "integrity_checks_missing_files": "Missing files", + "integrity_checks_missing_files_description": "Configure the frequency and enable or disable the missing files check", + "integrity_checks_missing_files_enable_description": "Enable the missing files check", + "integrity_checks_settings": "Integrity checks", + "integrity_checks_settings_description": "Manage integrity checks intervals", + "integrity_checks_untracked_files": "Untracked files", + "integrity_checks_untracked_files_description": "Configure the frequency and enable or disable the untracked files check", + "integrity_checks_untracked_files_enable_description": "Enable the untracked files check", "job_concurrency": "{job} concurrency", "job_created": "Job created", "job_not_concurrency_safe": "This job is not concurrency-safe.", @@ -416,6 +432,10 @@ "transcoding_realtime_description": "Allows transcoding to be performed in real-time as the video is being streamed. Enables quality switching, but may cause higher playback latency and stuttering depending on server capabilities.", "transcoding_realtime_enabled": "Enable real-time transcoding", "transcoding_realtime_enabled_description": "If disabled, the server will refuse to start new real-time transcoding sessions.", + "transcoding_realtime_resolutions": "Resolutions", + "transcoding_realtime_resolutions_description": "The resolutions offered for real-time transcoding. Higher resolutions may cause playback issues if the server cannot transcode them quickly enough.", + "transcoding_realtime_video_codecs": "Video codecs", + "transcoding_realtime_video_codecs_description": "The video codecs offered for real-time transcoding. Clients will choose the best option they support during playback. AV1 is more efficient than HEVC, which is more efficient than H.264. When using hardware acceleration, only select the codecs the accelerator can encode. When using software transcoding, note that H.264 is faster than AV1, which is faster than HEVC.", "transcoding_reference_frames": "Reference frames", "transcoding_reference_frames_description": "The number of frames to reference when compressing a given frame. Higher values improve compression efficiency, but slow down encoding. 0 sets this value automatically.", "transcoding_required_description": "Only videos not in an accepted format", @@ -578,6 +598,7 @@ "asset_viewer_settings_title": "Asset Viewer", "assets": "Assets", "assets_added_to_album_count": "Added {count, plural, one {# asset} other {# assets}} to the album", + "assets_added_to_album_partial_count": "Added {successCount} out of {totalCount} {totalCount, plural, one {asset} other {assets}} to the album", "assets_added_to_albums_count": "Added {assetTotal, plural, one {# asset} other {# assets}} to {albumTotal, plural, one {# album} other {# albums}}", "assets_cannot_be_added_to_album_count": "{count, plural, one {Asset} other {Assets}} cannot be added to the album", "assets_cannot_be_added_to_albums": "{count, plural, one {Asset} other {Assets}} cannot be added to any of the albums", @@ -794,7 +815,6 @@ "custom_date": "Custom date", "custom_locale": "Custom locale", "custom_locale_description": "Format dates, times, and numbers based on the selected language and region", - "custom_url": "Custom URL", "cutoff_date_description": "Keep photos from the last…", "cutoff_day": "{count, plural, one {day} other {days}}", "cutoff_year": "{count, plural, one {year} other {years}}", @@ -1461,6 +1481,7 @@ "never": "Never", "new_album": "New Album", "new_api_key": "New API Key", + "new_feature": "New Feature", "new_password": "New password", "new_person": "New person", "new_pin_code": "New PIN code", @@ -1504,6 +1525,7 @@ "not_available": "N/A", "not_in_any_album": "Not in any album", "not_selected": "Not selected", + "not_set": "Not set", "notes": "Notes", "nothing_here_yet": "Nothing here yet", "notification_backup_reliability": "Enable notifications to improve background backup reliability", @@ -1521,6 +1543,8 @@ "obtainium_configurator": "Obtainium Configurator", "obtainium_configurator_instructions": "Use Obtainium to install and update the Android app directly from Immich GitHub's release. Create an API key and select a variant to create your Obtainium configuration link", "ocr": "OCR", + "ocr_body": "Immich now reads the text inside your photos, so you can search for them by what they say.", + "ocr_title": "Search text in your photos", "official_immich_resources": "Official Immich Resources", "offline": "Offline", "offset": "Offset", @@ -1539,6 +1563,8 @@ "open": "Open", "open_calendar": "Open calendar", "open_in_browser": "Open in browser", + "open_in_immich_body": "Set Immich as your gallery on Android to open photos straight from other apps.", + "open_in_immich_title": "Open photos in Immich", "open_in_map_view": "Open in map view", "open_in_openstreetmap": "Open in OpenStreetMap", "open_the_search_filters": "Open the search filters", @@ -1596,7 +1622,7 @@ "person": "Person", "person_age_months": "{months, plural, one {# month} other {# months}} old", "person_age_year_months": "1 year, {months, plural, one {# month} other {# months}} old", - "person_age_years": "{years, plural, other {# years}} old", + "person_age_years": "{years, plural, one {# year} other {# years}} old", "person_birthdate": "Born on {date}", "person_hidden": "{name}{hidden, select, true { (hidden)} other {}}", "person_recognized": "Person recognized", @@ -1697,7 +1723,10 @@ "recent": "Recent", "recent_searches": "Recent searches", "recently_added": "Recently added", + "recently_added_body": "Jump straight to everything you've added lately on a dedicated page.", + "recently_added_description": "Browse your assets sorted by when they were uploaded to Immich", "recently_added_page_title": "Recently Added", + "recently_added_title": "Recently added", "recently_taken": "Recently taken", "refresh": "Refresh", "refresh_encoded_videos": "Refresh encoded videos", @@ -1759,6 +1788,7 @@ "restore_all": "Restore all", "restore_user": "Restore user", "restored_asset": "Restored asset", + "result": "Result", "resume": "Resume", "resume_paused_jobs": "Resume {count, plural, one {# paused job} other {# paused jobs}}", "review_duplicates": "Review duplicates", @@ -1904,6 +1934,8 @@ "share_link": "Share Link", "share_original": "Use original (large)", "share_preview": "Use thumbnail (small)", + "share_quality_body": "Press and hold the share button to choose the image quality before you share.", + "share_quality_title": "Choose your share quality", "shared": "Shared", "shared_album_activities_input_disable": "Comment is disabled", "shared_album_activity_remove_content": "Do you want to delete this activity?", @@ -1918,7 +1950,9 @@ "shared_link_app_bar_title": "Shared Links", "shared_link_clipboard_copied_massage": "Copied to clipboard", "shared_link_create_error": "Error while creating shared link", - "shared_link_custom_url_description": "Access this shared link with a custom URL", + "shared_link_custom_url_description": "Access this shared link with a custom URL name", + "shared_link_custom_url_title": "Custom URL", + "shared_link_custom_url_warning": "Warning: a custom URL name with a forward slash may not behave as you expect.", "shared_link_edit_description_hint": "Enter the share description", "shared_link_edit_expire_after_option_day": "1 day", "shared_link_edit_expire_after_option_days": "{count} days", @@ -1985,16 +2019,19 @@ "sign_out": "Sign Out", "sign_up": "Sign up", "size": "Size", + "skip": "Skip", "skip_to_content": "Skip to content", "skip_to_folders": "Skip to folders", "skip_to_tags": "Skip to tags", "slideshow": "Slideshow", + "slideshow_body": "Sit back and watch your photos play in a full-screen slideshow.", "slideshow_metadata_overlay_mode": "Overlay content", "slideshow_metadata_overlay_mode_description_only": "Description only", "slideshow_metadata_overlay_mode_full": "Full", "slideshow_repeat": "Repeat slideshow", "slideshow_repeat_description": "Loop back to beginning when slideshow ends", "slideshow_settings": "Slideshow settings", + "slideshow_title": "Slideshow", "smart_album": "Smart album", "some_assets_already_have_a_location_warning": "Some of the selected assets already have a location", "sort_albums_by": "Sort albums by...", @@ -2103,6 +2140,8 @@ "trigger": "Trigger", "trigger_asset_metadata_extraction": "Asset Metadata Extraction", "trigger_asset_metadata_extraction_description": "Triggered when the EXIF metadata of an asset is extracted", + "trigger_asset_tagged": "Asset Tagged", + "trigger_asset_tagged_description": "Triggered when a tag is added to an asset", "trigger_asset_uploaded": "Asset Upload", "trigger_asset_uploaded_description": "Triggered when a new asset is uploaded", "trigger_person_recognized": "Person Recognized", @@ -2122,6 +2161,7 @@ "unknown": "Unknown", "unknown_country": "Unknown Country", "unknown_date": "Unknown date", + "unknown_schema": "Unknown schema", "unknown_year": "Unknown Year", "unlimited": "Unlimited", "unlink_motion_video": "Unlink motion video", @@ -2149,7 +2189,7 @@ "upload_day_count": "{date}: {count, plural, one {# upload} other {# uploads}}", "upload_details": "Upload Details", "upload_error_with_count": "Upload error for {count, plural, one {# asset} other {# assets}}", - "upload_errors": "Upload completed with {count, plural, one {# error} other {# errors}}, refresh the page to see new upload assets.", + "upload_errors": "Upload completed with {count, plural, one {# error} other {# errors}}.", "upload_finished": "Upload finished", "upload_progress": "Remaining {remaining, number} - Processed {processed, number}/{total, number}", "upload_skipped_duplicates": "Skipped {count, plural, one {# duplicate asset} other {# duplicate assets}}", @@ -2157,6 +2197,8 @@ "upload_status_errors": "Errors", "upload_status_uploaded": "Uploaded", "upload_success": "Upload success, refresh the page to see new upload assets.", + "upload_to_album_body": "For users that don't utilize the manual upload feature, you can now choose to add local photos directly into an album as you upload them, no need to upload then add to an album later anymore.", + "upload_to_album_title": "Upload straight to an album", "upload_to_immich": "Upload to Immich ({count})", "uploading": "Uploading", "uploading_media": "Uploading media", @@ -2224,6 +2266,9 @@ "week": "Week", "welcome": "Welcome", "welcome_to_immich": "Welcome to Immich", + "whats_new": "What's new", + "whats_new_settings_subtitle": "See what's new in Immich", + "whats_new_version": "Version {version}", "when": "When", "width": "Width", "wifi_name": "Wi-Fi Name", @@ -2234,6 +2279,13 @@ "workflow_info": "Workflow info", "workflow_json": "Workflow JSON", "workflow_json_help": "Edit the workflow configuration in JSON format. Changes will sync to the visual builder.", + "workflow_logging_completed": "Completed", + "workflow_logging_disable": "Disable logging", + "workflow_logging_disabled_description": "Logging is currently disabled for this workflow.", + "workflow_logging_enable": "Enable logging", + "workflow_logging_error_step": "Error on step #{step}", + "workflow_logging_halted": "Halted", + "workflow_logging_halted_step": "Halted on step #{step}", "workflow_name": "Workflow name", "workflow_navigation_prompt": "Are you sure you want to leave without saving your changes?", "workflow_summary": "Workflow summary", diff --git a/i18n/en_GB.json b/i18n/en_GB.json index e6da892a88..a077b444d3 100644 --- a/i18n/en_GB.json +++ b/i18n/en_GB.json @@ -108,6 +108,21 @@ "image_thumbnail_quality_description": "Thumbnail quality from 1-100. Higher is better, but produces larger files and can reduce app responsiveness.", "image_thumbnail_title": "Thumbnail Settings", "import_config_from_json_description": "Import system config by uploading a JSON config file", + "integrity_checks_checksum_files": "Checksum files", + "integrity_checks_checksum_files_description": "Configure the checksum check", + "integrity_checks_checksum_files_enable_description": "Enable the checksum check", + "integrity_checks_checksum_files_percentage_limit": "Percentage limit", + "integrity_checks_checksum_files_percentage_limit_description": "Configure the maximum percentage between 0.01 and 1 for how much the checksum check should run each interval.", + "integrity_checks_checksum_files_time_limit": "Time limit", + "integrity_checks_checksum_files_time_limit_description": "Configure the maximum duration for which the checksum check should run each interval. (ms)", + "integrity_checks_missing_files": "Missing files", + "integrity_checks_missing_files_description": "Configure the frequency and enable or disable the missing files check", + "integrity_checks_missing_files_enable_description": "Enable the missing files check", + "integrity_checks_settings": "Integrity checks", + "integrity_checks_settings_description": "Manage integrity checks intervals", + "integrity_checks_untracked_files": "Untracked files", + "integrity_checks_untracked_files_description": "Configure the frequency and enable or disable the untracked files check", + "integrity_checks_untracked_files_enable_description": "Enable the untracked files check", "job_concurrency": "{job} concurrency", "job_created": "Job created", "job_not_concurrency_safe": "This job is not concurrency-safe.", @@ -416,6 +431,10 @@ "transcoding_realtime_description": "Allows transcoding to be performed in real-time as the video is being streamed. Enables quality switching, but may cause higher playback latency and stuttering depending on server capabilities.", "transcoding_realtime_enabled": "Enable real-time transcoding", "transcoding_realtime_enabled_description": "If disabled, the server will refuse to start new real-time transcoding sessions.", + "transcoding_realtime_resolutions": "Resolutions", + "transcoding_realtime_resolutions_description": "The resolutions offered for real-time transcoding. Higher resolutions may cause playback issues if the server cannot transcode them quickly enough.", + "transcoding_realtime_video_codecs": "Video codecs", + "transcoding_realtime_video_codecs_description": "The video codecs offered for real-time transcoding. Clients will choose the best option they support during playback. AV1 is more efficient than HEVC, which is more efficient than H.264. When using hardware acceleration, only select the codecs the accelerator can encode. When using software transcoding, note that H.264 is faster than AV1, which is faster than HEVC.", "transcoding_reference_frames": "Reference frames", "transcoding_reference_frames_description": "The number of frames to reference when compressing a given frame. Higher values improve compression efficiency, but slow down encoding. 0 sets this value automatically.", "transcoding_required_description": "Only videos not in an accepted format", @@ -578,6 +597,7 @@ "asset_viewer_settings_title": "Asset Viewer", "assets": "Assets", "assets_added_to_album_count": "Added {count, plural, one {# asset} other {# assets}} to the album", + "assets_added_to_album_partial_count": "Added {successCount} out of {totalCount} {totalCount, plural, one {asset} other {assets}} to the album", "assets_added_to_albums_count": "Added {assetTotal, plural, one {# asset} other {# assets}} to {albumTotal, plural, one {# album} other {# albums}}", "assets_cannot_be_added_to_album_count": "{count, plural, one {Asset} other {Assets}} cannot be added to the album", "assets_cannot_be_added_to_albums": "{count, plural, one {Asset} other {Assets}} cannot be added to any of the albums", @@ -794,7 +814,6 @@ "custom_date": "Custom date", "custom_locale": "Custom locale", "custom_locale_description": "Format dates, times, and numbers based on the selected language and region", - "custom_url": "Custom URL", "cutoff_date_description": "Keep photos from the last…", "cutoff_day": "{count, plural, one {day} other {days}}", "cutoff_year": "{count, plural, one {year} other {years}}", @@ -1461,6 +1480,7 @@ "never": "Never", "new_album": "New Album", "new_api_key": "New API Key", + "new_feature": "New Feature", "new_password": "New password", "new_person": "New person", "new_pin_code": "New PIN code", @@ -1504,6 +1524,7 @@ "not_available": "N/A", "not_in_any_album": "Not in any album", "not_selected": "Not selected", + "not_set": "Not set", "notes": "Notes", "nothing_here_yet": "Nothing here yet", "notification_backup_reliability": "Enable notifications to improve background backup reliability", @@ -1521,6 +1542,8 @@ "obtainium_configurator": "Obtainium Configurator", "obtainium_configurator_instructions": "Use Obtainium to install and update the Android app directly from Immich GitHub's release. Create an API key and select a variant to create your Obtainium configuration link", "ocr": "OCR", + "ocr_body": "Immich now reads the text inside your photos, so you can search for them by what they say.", + "ocr_title": "Search text in your photos", "official_immich_resources": "Official Immich Resources", "offline": "Offline", "offset": "Offset", @@ -1539,6 +1562,8 @@ "open": "Open", "open_calendar": "Open calendar", "open_in_browser": "Open in browser", + "open_in_immich_body": "Set Immich as your gallery on Android to open photos straight from other apps.", + "open_in_immich_title": "Open photos in Immich", "open_in_map_view": "Open in map view", "open_in_openstreetmap": "Open in OpenStreetMap", "open_the_search_filters": "Open the search filters", @@ -1596,7 +1621,7 @@ "person": "Person", "person_age_months": "{months, plural, one {# month} other {# months}} old", "person_age_year_months": "1 year, {months, plural, one {# month} other {# months}} old", - "person_age_years": "{years, plural, other {# years}} old", + "person_age_years": "{years, plural, one {# year} other {# years}} old", "person_birthdate": "Born on {date}", "person_hidden": "{name}{hidden, select, true { (hidden)} other {}}", "person_recognized": "Person recognised", @@ -1697,7 +1722,10 @@ "recent": "Recent", "recent_searches": "Recent searches", "recently_added": "Recently added", + "recently_added_body": "Jump straight to everything you've added lately on a dedicated page.", + "recently_added_description": "Browse your assets sorted by when they were uploaded to Immich", "recently_added_page_title": "Recently Added", + "recently_added_title": "Recently added", "recently_taken": "Recently taken", "refresh": "Refresh", "refresh_encoded_videos": "Refresh encoded videos", @@ -1904,6 +1932,8 @@ "share_link": "Share Link", "share_original": "Use original (large)", "share_preview": "Use thumbnail (small)", + "share_quality_body": "Press and hold the share button to choose the image quality before you share.", + "share_quality_title": "Choose your share quality", "shared": "Shared", "shared_album_activities_input_disable": "Comment is disabled", "shared_album_activity_remove_content": "Do you want to delete this activity?", @@ -1918,7 +1948,9 @@ "shared_link_app_bar_title": "Shared Links", "shared_link_clipboard_copied_massage": "Copied to clipboard", "shared_link_create_error": "Error while creating shared link", - "shared_link_custom_url_description": "Access this shared link with a custom URL", + "shared_link_custom_url_description": "Access this shared link with a custom URL name", + "shared_link_custom_url_title": "Custom URL", + "shared_link_custom_url_warning": "Warning: a custom URL name with a forward slash may not behave as you expect.", "shared_link_edit_description_hint": "Enter the share description", "shared_link_edit_expire_after_option_day": "1 day", "shared_link_edit_expire_after_option_days": "{count} days", @@ -1985,16 +2017,19 @@ "sign_out": "Sign Out", "sign_up": "Sign up", "size": "Size", + "skip": "Skip", "skip_to_content": "Skip to content", "skip_to_folders": "Skip to folders", "skip_to_tags": "Skip to tags", "slideshow": "Slideshow", + "slideshow_body": "Sit back and watch your photos play in a full-screen slideshow.", "slideshow_metadata_overlay_mode": "Overlay content", "slideshow_metadata_overlay_mode_description_only": "Description only", "slideshow_metadata_overlay_mode_full": "Full", "slideshow_repeat": "Repeat slideshow", "slideshow_repeat_description": "Loop back to beginning when slideshow ends", "slideshow_settings": "Slideshow settings", + "slideshow_title": "Slideshow", "smart_album": "Smart album", "some_assets_already_have_a_location_warning": "Some of the selected assets already have a location", "sort_albums_by": "Sort albums by...", @@ -2122,6 +2157,7 @@ "unknown": "Unknown", "unknown_country": "Unknown Country", "unknown_date": "Unknown date", + "unknown_schema": "Unknown schema", "unknown_year": "Unknown Year", "unlimited": "Unlimited", "unlink_motion_video": "Unlink motion video", @@ -2157,6 +2193,8 @@ "upload_status_errors": "Errors", "upload_status_uploaded": "Uploaded", "upload_success": "Upload success, refresh the page to see new upload assets.", + "upload_to_album_body": "For users that don't use the manual upload feature, you can now choose to add local photos directly into an album as you upload them, no need to upload then add to an album later anymore.", + "upload_to_album_title": "Upload straight to an album", "upload_to_immich": "Upload to Immich ({count})", "uploading": "Uploading", "uploading_media": "Uploading media", @@ -2224,6 +2262,9 @@ "week": "Week", "welcome": "Welcome", "welcome_to_immich": "Welcome to Immich", + "whats_new": "What's new", + "whats_new_settings_subtitle": "See what's new in Immich", + "whats_new_version": "Version {version}", "when": "When", "width": "Width", "wifi_name": "Wi-Fi Name", diff --git a/i18n/eo.json b/i18n/eo.json index 6ad5ce1389..b0283449a0 100644 --- a/i18n/eo.json +++ b/i18n/eo.json @@ -108,6 +108,21 @@ "image_thumbnail_quality_description": "Kvalito de bildeto, inter 1 kaj 100. Pli alta cifero indikas pli altkvalitan bildon, sed donas pli grandajn dosierojn kaj povas malrapidigi uzadon de la apo.", "image_thumbnail_title": "Agordoj pri bildetoj", "import_config_from_json_description": "Importi sistem-agordaĵaron de JSON-dosiero", + "integrity_checks_checksum_files": "Kontrolsum-dosieroj", + "integrity_checks_checksum_files_description": "Konfiguri la kontroladon per kontrolsumo", + "integrity_checks_checksum_files_enable_description": "Ŝalti kontroladon per kontrolsumoj", + "integrity_checks_checksum_files_percentage_limit": "Elcenta limo", + "integrity_checks_checksum_files_percentage_limit_description": "Konfiguri la maksimuman elcentaĵon, inter 0.01 kaj 1, kiom estu kontrolata je ĉiu intervalo.", + "integrity_checks_checksum_files_time_limit": "Tempolimo", + "integrity_checks_checksum_files_time_limit_description": "Konfiguri la maksimuman daŭron (milisekundoj) de kontrolado je ĉiu intervalo.", + "integrity_checks_missing_files": "Mankantaj dosieroj", + "integrity_checks_missing_files_description": "Konfiguri la oftecon kaj ŝalti/malŝalti kontrolon por mankantaj dosieroj", + "integrity_checks_missing_files_enable_description": "Ŝalti kontroladon por mankantaj dosieroj", + "integrity_checks_settings": "Kontrolo de integreco", + "integrity_checks_settings_description": "Administri intervalojn inter kontroloj de integreco", + "integrity_checks_untracked_files": "Senspuraj dosieroj", + "integrity_checks_untracked_files_description": "Konfiguri la oftecon kaj ŝalti/malŝalti kontrolon por senspuraj dosieroj", + "integrity_checks_untracked_files_enable_description": "Ŝalti kontroladon por senspuraj dosieroj", "job_concurrency": "{job}: nombro de samtempaj taskoj", "job_created": "Tasko kreita", "job_not_concurrency_safe": "Estas nesekure fari tiun ĉi taskon samtempe kun aliaj.", @@ -416,6 +431,10 @@ "transcoding_realtime_description": "Ebligas transkodadon samtempe kun spektado per elsendfluo. Tio ebligas ŝanĝon de kvalito laŭvole, sed povas kaŭzi pli da atendotempo kaj interrompoj, depende de la kapacito de la servilo.", "transcoding_realtime_enabled": "Ŝalti realtempan transkodadon", "transcoding_realtime_enabled_description": "Se malŝaltita, la servilo rifuzas komenci novajn sesiojn de realtempa transkodado.", + "transcoding_realtime_resolutions": "Distingivoj", + "transcoding_realtime_resolutions_description": "La distingivoj proponitaj por realtempa transkodado. Pli altaj distingivoj povas okazigi problemojn sed la servilo ne povas sufiĉe rapide transkodigi ilin.", + "transcoding_realtime_video_codecs": "Videokodekoj", + "transcoding_realtime_video_codecs_description": "La video-kodekoj proponitaj por realtempa transkodado. Klientoj povos elekti sian plej bonan opcion dum ludado. AV1 estas pli efika ol HEVC, kiu estas pli efika ol H.264. Se vi uzas aparataran plirapidigon, uzu nur kodekojn, kiujn la akcelilo povas kodigi. Por softvara transkodado, notu ke H.264 estas pli rapida ol AV1, kiu estas pli rapida ol HEVC.", "transcoding_reference_frames": "Referencaj kadroj", "transcoding_reference_frames_description": "La nombro da apudaj kadroj uzataj dum densigo de iu kadro. Pli granda valoro rezultas je pli bona densigo, sed malpli rapida laboro. Valoro de 0 indikas aŭtomatan agordon.", "transcoding_required_description": "Nur videoj kun neakceptataj formatoj", @@ -578,6 +597,7 @@ "asset_viewer_settings_title": "Montrilo de elemento", "assets": "Elementoj", "assets_added_to_album_count": "Sukcese aldonis {count, plural, one {# elementon} other {# elementojn}} al la albumo", + "assets_added_to_album_partial_count": "Aldonis {successCount} el {totalCount} {totalCount, plural, one {elemento} other {elementoj}} al la albumo", "assets_added_to_albums_count": "Sukcese aldonis {assetTotal, plural, one {# elementon} other {# elementojn}} al {albumTotal, plural, one {# albumo} other {# albumoj}}", "assets_cannot_be_added_to_album_count": "Ne eblis aldoni {count, plural, one {tiun elementon} other {tiujn elementojn}} al la albumo", "assets_cannot_be_added_to_albums": "Ne eblis aldoni {count, plural, one {tiun elementon} other {tiujn elementojn}} al iu ajn el la albumoj", @@ -793,7 +813,6 @@ "custom_date": "Elekti propran daton", "custom_locale": "Propra lokaĵaro", "custom_locale_description": "Prezenti datojn, horojn kaj numerojn laŭ la elektita lingvo kaj regiono", - "custom_url": "Propra URL", "cutoff_date_description": "Konservi fotojn el la lastaj…", "cutoff_day": "{count, plural, one {tago} other {tagoj}}", "cutoff_year": "{count, plural, one {jaro} other {jaroj}}", @@ -1497,6 +1516,8 @@ "notes": "Notoj", "nothing_here_yet": "Ankoraŭ nenio ĉi tie", "notification_backup_reliability": "Ŝalti atentigilojn por igi pli fidinda la fonan savkopiadon", + "notification_enabled_list_tile_open_button": "Malfermi agordojn", + "notification_enabled_list_tile_title": "Atentigoj ŝaltitaj", "notification_permission_dialog_content": "Por ŝalti sciigojn, iru al Agordoj kaj elektu 'permesi'.", "notification_permission_list_tile_content": "Donu permeson por ŝalti sciigojn.", "notification_permission_list_tile_enable_button": "Ŝalti sciigojn", @@ -1508,6 +1529,8 @@ "obtainium_configurator": "Konfigurilo pri Obtainium", "obtainium_configurator_instructions": "Uzu Obtainium por instali kaj ĝisdatigi la apon por Android rekte el github. Kreu API-ŝlosilon kaj elektu variaĵon por krei ligilon por konfiguri Obtainium", "ocr": "Optika signo-rekono", + "ocr_body": "Immich nun legas tekston en viaj fotoj, do vi povas serĉi kaj trovi fotojn laŭ tio.", + "ocr_title": "Serĉi tekston en fotoj", "official_immich_resources": "Oficialaj rimedoj por Immich", "offline": "Nekonektita", "offset": "Deŝovo", @@ -1526,6 +1549,8 @@ "open": "Malfermi", "open_calendar": "Malfermi kalendaron", "open_in_browser": "Malfermi en retumilo", + "open_in_immich_body": "Agordi Immich kiel galerion en Android-aparato por ke fotoj malfermiĝu rekte de aliaj apoj en Immich.", + "open_in_immich_title": "Malfermi fotojn en Immich", "open_in_map_view": "Montri sur mapo", "open_in_openstreetmap": "Malfermi en OpenStreetMap", "open_the_search_filters": "Malfermi la serĉ-filtrilojn", @@ -1680,7 +1705,10 @@ "recent": "Lastatempa(j)", "recent_searches": "Lastatempaj serĉoj", "recently_added": "Lastatempe aldonita(j)", + "recently_added_body": "Iri rekte al ĉio, kion vi aldonis lastatempe en unu paĝo.", + "recently_added_description": "Foliumi elementojn ordigitajn laŭ dato de alŝuto al Immich", "recently_added_page_title": "Lastatempe aldonita(j)", + "recently_added_title": "Aldonitaj lastatempe", "recently_taken": "Lastatempe fotita(j)", "refresh": "Denove", "refresh_encoded_videos": "Renovigi koditajn videojn", @@ -1814,10 +1842,79 @@ "search_timezone": "Serĉi laŭ horzono...", "search_type": "Serĉi laŭ tipo", "search_your_photos": "Serĉi viajn fotojn", + "searching_locales": "Serĉado de lokaj parametroj...", + "second": "Sekundo", + "see_all_people": "Vidi ĉiujn homojn", + "select": "Elekti", + "select_album": "Elekti albumon", + "select_album_cover": "Elekti album-kovrilon", + "select_albums": "Elekti albumojn", + "select_all": "Elekti ĉiujn", + "select_all_duplicates": "Elekti ĉiujn duoblaĵojn", + "select_avatar_color": "Elekti koloron de profilbildo", + "select_count": "{count, plural, one {Elekti #} other {Elekti #}}", + "select_cutoff_date": "Elekti limdaton", + "select_face": "Elekti vizaĝon", + "select_featured_photo": "Elekti elstarigitan foton", + "select_from_computer": "Elekti el komputilo", + "select_keep_all": "Konservi ĉiujn", + "select_new_face": "Elekti novan vizaĝon", + "select_people": "Elekti homojn", + "select_person": "Elekti homon", + "select_person_to_tag": "Elekti homon por etikedi", + "select_photos": "Elekti fotojn", + "select_quality": "Elekti kvaliton", + "select_trash_all": "Forigi ĉiujn", + "selected": "Elektita", + "selected_count": "{count, plural, one {# elektita} other {# elektitaj}}", + "selected_gps_coordinates": "GPS-koordinatoj elektitaj", + "send_message": "Sendi mesaĝon", + "send_welcome_email": "Sendi bonvenan retmesaĝon", + "server_endpoint": "Finpunkto ĉe servilo", + "server_info_box_app_version": "Versio de apo", + "server_info_box_server_url": "URL-o de servilo", + "server_offline": "Servilo nedisponebla", + "server_online": "Servilo disponebla", "server_privacy": "Privateco de servilo", "server_restarting_description": "La paĝo baldaŭ reŝargiĝos.", + "server_restarting_title": "Servilo restartas", + "server_stats": "Statistikoj de servilo", + "server_update_available": "Ĝisdatigo disponeblas por la servilo", + "server_version": "Versio de servilo", + "set": "Agordi", + "set_as_album_cover": "Agordi kiel album-kovrilo", + "set_as_featured_photo": "Agordi kiel elstarigitan foton", + "set_as_profile_picture": "Elekti kiel profilbildon", + "set_date_of_birth": "Agordi naskiĝdaton", + "set_profile_picture": "Elekti profilbildon", + "set_slideshow_to_fullscreen": "Vidigi bildserion plenekrane", + "set_stack_primary_asset": "Agordi kiel unuarangan elementon", + "setting_image_navigation_enable_subtitle": "Se ŝaltita, vi povas salti al antaŭa/sekva bildo per tuŝeto en la maldekstra/dekstra kvarono de la ekrano.", + "setting_image_navigation_enable_title": "Tuŝeti por navigi", + "setting_image_navigation_title": "Navigado de bildoj", "setting_image_viewer_help": "La detala montrilo unue montras la malgrandan bildeton, poste ŝargas la mezgrandan antaŭvidon (se ŝaltita), kaj fine ŝargas la originalan (se ŝaltita).", + "setting_image_viewer_original_subtitle": "Ŝalti por ŝargi la originalan bildon (povas esti tre granda!) Malŝalti por ŝpareme uzi datumojn (de retkonekto kaj memoro en via aparato).", + "setting_image_viewer_original_title": "Ŝargi originalan bildon", + "setting_image_viewer_preview_subtitle": "Ŝalti por ŝargi mez-distingivan bildon. Malŝalti por ŝargi aŭ la originalon aŭ la bildeton.", + "setting_image_viewer_preview_title": "Ŝargi antaŭvidan bildon", + "setting_languages_apply": "Validigi", + "setting_languages_subtitle": "Ŝanĝi lingvon de la apo", + "setting_notifications_notify_minutes": "{count} minutoj", + "setting_notifications_notify_seconds": "{count} sekundoj", "setting_notifications_subtitle": "Redakti viajn preferojn pri sciigoj", + "setting_video_viewer_auto_play_subtitle": "Aŭtomate ekludi videojn tuj je malfermo", + "setting_video_viewer_auto_play_title": "Aŭtomate ludi videojn", + "setting_video_viewer_looping_title": "Ripeti", + "settings": "Agordoj", + "settings_saved": "Agordoj konservitaj", + "setup_pin_code": "Krei PIN-kodon", + "share": "Dividi", + "share_dialog_preparing": "Preparado...", + "share_link": "Dividi ligilon", + "share_original": "Uzi originalon (grandan)", + "share_preview": "Uzi bildeton (malgrandan)", + "share_quality_body": "Premteni la dividi-butonon por elekti la kvaliton de bildo dividota.", + "share_quality_title": "Elekti kvaliton dividotan", "shared": "Dividitaj", "shared_album_activities_input_disable": "Komentado estas malŝaltita", "shared_album_activity_remove_content": "Ĉu vi volas forigi tiun ĉi agon?", @@ -1833,6 +1930,8 @@ "shared_link_clipboard_copied_massage": "Kopiita al tondujo", "shared_link_create_error": "Okazis eraro dum kreo de dividita ligilo", "shared_link_custom_url_description": "Atingi la dividita ligilo per propra URL-o", + "shared_link_custom_url_title": "Propra URL", + "shared_link_custom_url_warning": "Atentu: propra URL, kiu inkluzivas suprenstrekon povus havi neatenditan rezulton.", "shared_link_edit_description_hint": "Tajpu priskribon de la dividaĵaro", "shared_link_edit_expire_after_option_day": "1 tago", "shared_link_edit_expire_after_option_days": "{count} tagoj", @@ -1854,6 +1953,7 @@ "shared_link_expires_never": "Neniam eksvalidiĝos", "shared_link_expires_second": "Eksvalidiĝos post {count} sekundo", "shared_link_expires_seconds": "Eksvalidiĝos post {count} sekundoj", + "shared_link_individual_shared": "Unuope dividita", "shared_link_info_chip_metadata": "EXIF", "shared_link_manage_links": "Administri dividitajn ligilojn", "shared_link_options": "Agordoj pri dividitaj ligiloj", @@ -1865,13 +1965,79 @@ "shared_with_partner": "Dividitaj kun {partner}", "sharing": "Dividado", "sharing_enter_password": "Bonvolu tajpi la pasvorton por vidi tiun ĉi paĝon.", + "shift_to_permanent_delete": "Tuŝu ⇧ por forigi porĉiame la elementon", + "show_album_options": "Montri opciojn de albumo", + "show_albums": "Montri albumojn", + "show_all_people": "Montri ĉiujn homojn", + "show_and_hide_people": "Montri kaj kaŝi homojn", + "show_file_location": "Montri dosier-lokon", + "show_gallery": "Montri galerion", + "show_hidden_people": "Montri kaŝitajn homojn", + "show_in_timeline": "Montri en tempolinio", + "show_in_timeline_setting_description": "Montri fotojn kaj videojn de tiu uzanto en via tempolinio", + "show_keyboard_shortcuts": "Montri fulmklavojn", + "show_less": "Montri malpli", + "show_metadata": "Montri metadatumojn", + "show_more_fields": "{count, plural, one {Montri # plian kampon} other {Montri # pliajn kampojn}}", + "show_or_hide_info": "Montri aŭ kaŝi informojn", + "show_password": "Montri pasvorton", + "show_person_options": "Montri opciojn pri homo", + "show_progress_bar": "Montri plenumskalon", + "show_schema": "Montri skemon", "show_search_options": "Montri opciojn pri serĉado", "show_shared_links": "Montri dividitajn ligilojn", + "show_slideshow_metadata_overlay": "Montri pribildajn informojn super la bildo", + "show_slideshow_transition": "Montri transpason dum bildserio", + "show_supporter_badge": "Ŝildo de subtenanto", + "show_supporter_badge_description": "Montri ŝildon de subtenanto", + "show_text_recognition": "Montri rekonadon de teksto", + "show_text_search_menu": "Montri menuon pri teksta serĉo", + "shuffle": "Hazarda vicordo", "sidebar": "Flankpanelo", "sidebar_display_description": "Montri ligilon al la vido en la flankpanelo", + "sign_out": "Elsaluti", + "sign_up": "Registriĝi", + "size": "Grandeco", + "skip": "Preterlasi", + "skip_to_content": "Salti rekte al enhavo", + "skip_to_folders": "Salti rekte al dosierujoj", + "skip_to_tags": "Salti rekte al etikedoj", + "slideshow": "Bildserio", + "slideshow_body": "Spekti viajn fotojn en plenekrana bildserio.", + "slideshow_metadata_overlay_mode": "Supermeti elementojn", + "slideshow_metadata_overlay_mode_description_only": "Nur priskribo", + "slideshow_metadata_overlay_mode_full": "Plena", + "slideshow_repeat": "Ripeti bildserion", + "slideshow_repeat_description": "Remontri ekde la komenco post fino de bildserio", + "slideshow_settings": "Agordoj pri bildserioj", + "slideshow_title": "Bildserio", + "smart_album": "Aktiva albumo", + "some_assets_already_have_a_location_warning": "Kelkaj el la elektitaj elementoj jam havas lokon", + "sort_albums_by": "Ordigi albumojn laŭ...", + "sort_created": "Dato de kreo", + "sort_items": "Nombro da elementoj", + "sort_modified": "Dato de lasta ŝanĝo", + "sort_oldest": "Plej malnova foto", + "sort_people_by_similarity": "Ordigi homojn laŭ simileco", + "sort_recent": "Plej lasta foto", + "sort_title": "Titolo", + "source": "Fonto", + "stack": "Staki", + "stack_action_prompt": "{count} stakitaj", + "stack_duplicates": "Staki duoblaĵojn", + "stack_selected_photos": "Staki elektitajn fotojn", + "stacked_assets_count": "Stakis {count, plural, one {# elementon} other {# elementojn}}", + "stacktrace": "Stak-spuro", + "start": "Komenci", "start_date": "Komenca dato", "start_date_before_end_date": "Komenca dato devas esti antaŭ fina dato", "state": "Ŝtato/Regiono", + "status": "Stato", + "step_delete": "Forigi paŝon", + "step_delete_confirm": "Ĉu vi certas, ke vi volas forigi tiun paŝon?", + "step_details": "Detaloj pri paŝo", + "steps": "Paŝoj", + "stop_casting": "Ĉesi elsendi", "stop_photo_sharing": "Ĉu ĉesi dividi viajn fotojn?", "stop_photo_sharing_description": "{partner} ne plu rajtos atingi viajn fotojn.", "stop_sharing_photos_with_user": "Ĉesi dividi fotojn kun tiu ĉi uzanto", diff --git a/i18n/es.json b/i18n/es.json index 7bc1f171e2..3d019ea36a 100644 --- a/i18n/es.json +++ b/i18n/es.json @@ -108,6 +108,21 @@ "image_thumbnail_quality_description": "Calidad de miniatura de 1 a 100. Es mejor cuanto más alto es el valor pero genera archivos más grandes y puede reducir la capacidad de respuesta de la aplicación.", "image_thumbnail_title": "Ajustes de las miniaturas", "import_config_from_json_description": "Importar la configuración del sistema subiendo un archivo JSON de configuración", + "integrity_checks_checksum_files": "Archivos de suma de comprobación", + "integrity_checks_checksum_files_description": "Configurar la comprobación de la suma de comprobación", + "integrity_checks_checksum_files_enable_description": "Activar la comprobación de la suma de comprobación", + "integrity_checks_checksum_files_percentage_limit": "Límite porcentual", + "integrity_checks_checksum_files_percentage_limit_description": "Configura el porcentaje máximo, entre 0,01 y 1, que indica la frecuencia con la que debe ejecutarse la comprobación de la suma de comprobación en cada intervalo.", + "integrity_checks_checksum_files_time_limit": "Límite de tiempo", + "integrity_checks_checksum_files_time_limit_description": "Configura la duración máxima durante la cual debe ejecutarse la comprobación de la suma de comprobación en cada intervalo. (ms)", + "integrity_checks_missing_files": "Archivos faltantes", + "integrity_checks_missing_files_description": "Configura la frecuencia y activa o desactiva la comprobación de archivos faltantes", + "integrity_checks_missing_files_enable_description": "Activar la comprobación de archivos faltantes", + "integrity_checks_settings": "Comprobaciones de integridad", + "integrity_checks_settings_description": "Gestionar los intervalos de las comprobaciones de integridad", + "integrity_checks_untracked_files": "Archivos sin seguimiento", + "integrity_checks_untracked_files_description": "Configure la frecuencia y active o desactive la comprobación de archivos sin seguimiento", + "integrity_checks_untracked_files_enable_description": "Habilitar la comprobación de archivos sin seguimiento", "job_concurrency": "{job}: Procesos simultáneos", "job_created": "Tarea creada", "job_not_concurrency_safe": "Esta tarea no es segura para la simultaneidad.", @@ -416,6 +431,10 @@ "transcoding_realtime_description": "Permite que la transcodificación se efectua en tiempo real al retransmitirse el video. Permite cambios de calidad, pero quizás causa mayor latencia de reproducción y entrecortamiento dependiendo de las capacidades del servidor.", "transcoding_realtime_enabled": "Activar transcodificación en tiempo real", "transcoding_realtime_enabled_description": "Si se desactiva, el servidor se niega a comenzar nuevas sesiones de transcodificación en tiempo real.", + "transcoding_realtime_resolutions": "Resoluciones", + "transcoding_realtime_resolutions_description": "Las resoluciones ofrecidas para el la transcodificación en tiempo real. Resoluciones altas pueden causar problemas al reproducir si el servidor no es capaz de transcodificarlas lo suficientemente rápido.", + "transcoding_realtime_video_codecs": "Códecs de video", + "transcoding_realtime_video_codecs_description": "Los códecs de video disponibles para la transcodificación en tiempo real. Durante la reproducción, los clientes elegirán la mejor opción que admitan. AV1 es más eficiente que HEVC, y HEVC es más eficiente que H.264. Al usar aceleración por hardware, selecciona únicamente los códecs que el acelerador pueda codificar. Al usar transcodificación por software, ten en cuenta que H.264 es más rápido que AV1, y AV1 es más rápido que HEVC.", "transcoding_reference_frames": "Frames de referencia", "transcoding_reference_frames_description": "El número de fotogramas a los que hacer referencia al comprimir un fotograma determinado. Los valores más altos mejoran la eficiencia de la compresión, pero ralentizan la codificación. 0 establece este valor automáticamente.", "transcoding_required_description": "Sólo vídeos que no estén en un formato soportado", @@ -578,6 +597,7 @@ "asset_viewer_settings_title": "Visor de recursos", "assets": "Recursos", "assets_added_to_album_count": "{count, plural, one {# recurso añadido} other {# recurso añadidos}} al álbum", + "assets_added_to_album_partial_count": "Agregados {successCount} de {totalCount} {totalCount, plural, one {asset} other {assets}} al album", "assets_added_to_albums_count": "{assetTotal, plural, one {# añadido} other {# añadidos}} {albumTotal, plural, one {# al álbum} other {# a los álbumes}}", "assets_cannot_be_added_to_album_count": "{count, plural, one {El recurso no se puede añadir al álbum} other {Los recursos no se pueden añadir al álbum}}", "assets_cannot_be_added_to_albums": "{count, plural, one {El recurso} other {Los recursos}} no se {count, plural, one {puede} other {pueden}} añadir a ninguno de los álbumes", @@ -794,7 +814,6 @@ "custom_date": "Fecha personalizada", "custom_locale": "Configuración regional personalizada", "custom_locale_description": "Dar formato a fechas, horas y números según el idioma y región seleccionados", - "custom_url": "URL personalizada", "cutoff_date_description": "Conserva fotos del último…", "cutoff_day": "{count, plural, one {día} other {días}}", "cutoff_year": "{count, plural, one {año} other {años}}", @@ -1303,9 +1322,9 @@ "login_form_failed_login": "Error al iniciar sesión, comprueba la URL del servidor, el correo electrónico y la contraseña", "login_form_handshake_exception": "Hubo una excepción de handshake con el servidor. Activa la compatibilidad con certificados autofirmados en la configuración si estás utilizando un certificado autofirmado.", "login_form_password_hint": "contraseña", - "login_form_server_empty": "Introduce la URL del servidor.", - "login_form_server_error": "No se pudo conectar al servidor.", - "login_has_been_disabled": "El inicio de sesión ha sido deshabilitado.", + "login_form_server_empty": "Introduce la URL del servidor", + "login_form_server_error": "No se pudo conectar al servidor", + "login_has_been_disabled": "El inicio de sesión ha sido deshabilitado", "login_password_changed_error": "Hubo un error actualizando la contraseña", "login_password_changed_success": "Contraseña cambiado con éxito", "logout_all_device_confirmation": "¿Estás seguro de que quieres cerrar sesión en todos los dispositivos?", @@ -1461,6 +1480,7 @@ "never": "Nunca", "new_album": "Nuevo álbum", "new_api_key": "Nueva clave API", + "new_feature": "Nueva característica", "new_password": "Nueva contraseña", "new_person": "Nueva persona", "new_pin_code": "Nuevo PIN", @@ -1504,9 +1524,13 @@ "not_available": "N/D", "not_in_any_album": "Sin álbum", "not_selected": "No seleccionado", + "not_set": "No establecido", "notes": "Notas", "nothing_here_yet": "Sin nada aún", "notification_backup_reliability": "Activa las notificaciones para mejorar el funcionamiento de las copias de seguridad en segundo plano", + "notification_enabled_list_tile_content": "Immich usa notificaciones para las copias de seguridad en segundo plano. Gestiónelas en los ajustes de su dispositivo.", + "notification_enabled_list_tile_open_button": "Abrir ajustes", + "notification_enabled_list_tile_title": "Notificaciones activadas", "notification_permission_dialog_content": "Para activar las notificaciones, ve a Configuración y selecciona permitir.", "notification_permission_list_tile_content": "Concede permiso para habilitar las notificaciones.", "notification_permission_list_tile_enable_button": "Permitir notificaciones", @@ -1518,6 +1542,8 @@ "obtainium_configurator": "Configurador de Obtainium", "obtainium_configurator_instructions": "Usa Obtainium para instalar y actualizar la aplicación de Android directamente desde las versiones publicadas en el GitHub de Immich. Crea una clave API y selecciona una variante para generar tu enlace de configuración de Obtainium", "ocr": "OCR", + "ocr_body": "Ahora Immich lee el texto que hay dentro de tus fotos, así podrás buscarlas por lo que dicen.", + "ocr_title": "Buscar texto en tus fotos", "official_immich_resources": "Recursos oficiales de Immich", "offline": "Desconectado", "offset": "Desviación", @@ -1536,6 +1562,8 @@ "open": "Abierto", "open_calendar": "Abrir calendario", "open_in_browser": "Abrir en el navegador", + "open_in_immich_body": "Establece Immich como tu galería en Android para abrir fotos directamente desde otras aplicaciones.", + "open_in_immich_title": "Abrir fotos en Immich", "open_in_map_view": "Abrir en la vista del mapa", "open_in_openstreetmap": "Abrir en OpenStreetMap", "open_the_search_filters": "Abre los filtros de búsqueda", @@ -1593,7 +1621,7 @@ "person": "Persona", "person_age_months": "hace {months, plural, one {# mes} other {# meses}}", "person_age_year_months": "1 año y {months, plural, one {# mes} other {# meses}}", - "person_age_years": "{years, plural, other {# años}}", + "person_age_years": "{years, plural, one {# año} other {# años}}", "person_birthdate": "Nacido el {date}", "person_hidden": "{name}{hidden, select, true { (oculto)} other {}}", "person_recognized": "Persona reconocida", @@ -1694,7 +1722,10 @@ "recent": "Reciente", "recent_searches": "Búsquedas recientes", "recently_added": "Añadidos recientemente", + "recently_added_body": "Acceda directamente a todo lo que ha añadido recientemente en una página dedicada.", + "recently_added_description": "Explora tus archivos ordenados por fecha de subida a Immich", "recently_added_page_title": "Recién añadidos", + "recently_added_title": "Añadido recientemente", "recently_taken": "Tomadas recientemente", "refresh": "Actualizar", "refresh_encoded_videos": "Recargar los vídeos codificados", @@ -1901,6 +1932,8 @@ "share_link": "Compartir enlace", "share_original": "Usar original (grande)", "share_preview": "Usar vista previa (pequeño)", + "share_quality_body": "Mantén pulsado el botón de compartir para elegir la calidad de la imagen antes de compartirla.", + "share_quality_title": "Elige la calidad de compartición", "shared": "Compartidos", "shared_album_activities_input_disable": "Los comentarios están deshabilitados", "shared_album_activity_remove_content": "¿Deseas eliminar esta actividad?", @@ -1915,7 +1948,9 @@ "shared_link_app_bar_title": "Enlaces compartidos", "shared_link_clipboard_copied_massage": "Copiado al portapapeles", "shared_link_create_error": "Error creando el enlace compartido", - "shared_link_custom_url_description": "Acceder a este enlace compartido con una URL personalizada", + "shared_link_custom_url_description": "Accede a este enlace compartido mediante una URL personalizada", + "shared_link_custom_url_title": "URL personalizada", + "shared_link_custom_url_warning": "Advertencia: un nombre de URL personalizado con una barra inclinada puede no comportarse como esperas.", "shared_link_edit_description_hint": "Introduce la descripción del enlace", "shared_link_edit_expire_after_option_day": "1 día", "shared_link_edit_expire_after_option_days": "{count} días", @@ -1962,7 +1997,7 @@ "show_keyboard_shortcuts": "Mostrar atajos del teclado", "show_less": "Mostrar menos", "show_metadata": "Mostrar metadatos", - "show_more_fields": "{count, plural, one {Muestra # más campo} other {Muestra # más campos}}", + "show_more_fields": "{count, plural, one {Muestra # campo más} other {Muestra # más campos}}", "show_or_hide_info": "Mostrar u ocultar información", "show_password": "Mostrar contraseña", "show_person_options": "Mostrar opciones de la persona", @@ -1982,16 +2017,19 @@ "sign_out": "Salir", "sign_up": "Registrarse", "size": "Tamaño", + "skip": "Saltar", "skip_to_content": "Saltar al contenido", "skip_to_folders": "Ir a las carpetas", "skip_to_tags": "Ir a las etiquetas", "slideshow": "Pase de diapositivas", + "slideshow_body": "Relájate y disfruta viendo tus fotos en una presentación de diapositivas a pantalla completa.", "slideshow_metadata_overlay_mode": "Contenido superpuesto", "slideshow_metadata_overlay_mode_description_only": "Solo descripción", "slideshow_metadata_overlay_mode_full": "Lleno", "slideshow_repeat": "Repetir presentación de diapositivas", "slideshow_repeat_description": "Volver al inicio cuando finaliza la presentación de diapositivas", "slideshow_settings": "Ajustes de diapositivas", + "slideshow_title": "Presentación de diapositivas", "smart_album": "Álbum inteligente", "some_assets_already_have_a_location_warning": "Algunos de los elementos seleccionados ya tienen una ubicación", "sort_albums_by": "Ordenar álbumes por…", @@ -2119,6 +2157,7 @@ "unknown": "Desconocido", "unknown_country": "País desconocido", "unknown_date": "Fecha desconocida", + "unknown_schema": "Esquema desconocido", "unknown_year": "Año desconocido", "unlimited": "Sin límites", "unlink_motion_video": "Desvincular vídeo en movimiento", @@ -2154,6 +2193,8 @@ "upload_status_errors": "Errores", "upload_status_uploaded": "Subido", "upload_success": "Subida realizada correctamente, actualice la página para ver los nuevos recursos de subida.", + "upload_to_album_body": "Los usuarios que no utilicen la función de subida manual ya pueden añadir fotos locales directamente a un álbum a medida que las suben, sin necesidad de subirlas primero para luego añadirlas al álbum.", + "upload_to_album_title": "Subir directamente a un álbum", "upload_to_immich": "Subir a Immich ({count})", "uploading": "Subiendo", "uploading_media": "Subiendo medios", @@ -2221,6 +2262,9 @@ "week": "Semana", "welcome": "Bienvenido/a", "welcome_to_immich": "Bienvenido/a a Immich", + "whats_new": "Novedades", + "whats_new_settings_subtitle": "Descubre las novedades de Immich", + "whats_new_version": "Versión {version}", "when": "Cuándo", "width": "Ancho", "wifi_name": "Nombre del Wi-Fi", diff --git a/i18n/et.json b/i18n/et.json index d7b2b9f8ac..8941dbbb0e 100644 --- a/i18n/et.json +++ b/i18n/et.json @@ -108,6 +108,18 @@ "image_thumbnail_quality_description": "Pisipildi kvaliteet vahemikus 1-100. Kõrgem väärtus on parem, aga tekitab suuremaid faile ning võib mõjutada rakenduse töökiirust.", "image_thumbnail_title": "Pisipildi seaded", "import_config_from_json_description": "Impordi süsteemi seadistus JSON-faili üleslaadimise teel", + "integrity_checks_checksum_files_description": "Seadista kontrollsumma kontroll", + "integrity_checks_checksum_files_enable_description": "Luba kontrollsumma kontroll", + "integrity_checks_checksum_files_percentage_limit": "Protsendi piirang", + "integrity_checks_checksum_files_percentage_limit_description": "Seadista maksimaalne protsent 0.01 ja 1 vahel, kui palju peaks kontrollsumma kontroll iga intervalli jooksul käivituma.", + "integrity_checks_checksum_files_time_limit": "Ajaline piirang", + "integrity_checks_checksum_files_time_limit_description": "Seadista maksimaalne kestus, kui kaua peaks kontrollsumma kontroll iga intervalli jooksul käivituma. (ms)", + "integrity_checks_missing_files": "Puuduvad failid", + "integrity_checks_missing_files_description": "Luba või keela puuduvate failide kontroll ning seadista selle sagedus", + "integrity_checks_missing_files_enable_description": "Luba puuduvate failide kontroll", + "integrity_checks_untracked_files": "Mittejälgitud failid", + "integrity_checks_untracked_files_description": "Luba või keela mittejälgitud failide kontroll ning seadista selle sagedus", + "integrity_checks_untracked_files_enable_description": "Luba mittejälgitud failide kontroll", "job_concurrency": "{job} samaaegsus", "job_created": "Tööde lisatud", "job_not_concurrency_safe": "Seda töödet pole ohutu samaaegselt käivitada.", @@ -414,6 +426,10 @@ "transcoding_realtime_description": "Lubab video voogedastuse ajal reaalajas transkodeerimist. Võimaldab kvaliteedi vahetamist, aga võib põhjustada taasesituse kõrgemat latentsust ja katkestusi, sõltuvalt serveri võimekusest.", "transcoding_realtime_enabled": "Luba reaalajas transkodeerimine", "transcoding_realtime_enabled_description": "Kui keelatud, keeldub server uusi reaalajas transkodeerimise sessioone alustamast.", + "transcoding_realtime_resolutions": "Resolutsioonid", + "transcoding_realtime_resolutions_description": "Reaalajas transkodeerimiseks saadaval olevad resolutsioonid. Kõrgemad resolutsioonid võivad põhjustada taasesituse probleeme, kui server ei suuda piisavalt kiiresti transkodeerida.", + "transcoding_realtime_video_codecs": "Videokoodekid", + "transcoding_realtime_video_codecs_description": "Reaalajas transkodeerimiseks saadaval olevad videkoodekid. Kliendid valivad taasesituse ajal parima toetatud variandi. AV1 on efektiivsem kui HEVC, mis on omakorda efektiivsem kui H.264. Riistvaralise kiirenduse kasutamisel vali ainult koodekid, mida kiirendi suudab kodeerida. Tarkvaralise transkodeerimise puhul pane tähele, et H.264 on kiirem kui AV1, mis on omakorda kiirem kui HEVC.", "transcoding_reference_frames": "Viitekaadrid", "transcoding_reference_frames_description": "Kaadrite arv, millele viidata jooksva kaadri pakkimisel. Suuremad väärtused parandavad pakkimise tõhusust, aga muudavad kodeerimise aeglasemaks. 0 määrab väärtuse automaatselt.", "transcoding_required_description": "Ainult mittelubatud vormingus videod", @@ -576,6 +592,7 @@ "asset_viewer_settings_title": "Üksuste vaatur", "assets": "Üksused", "assets_added_to_album_count": "{count, plural, one {# üksus} other {# üksust}} albumisse lisatud", + "assets_added_to_album_partial_count": "{successCount}/{totalCount} {totalCount, plural, one {üksus} other {üksust}} lisatud albumisse", "assets_added_to_albums_count": "{assetTotal, plural, one {# üksus} other {# üksust}} lisatud {albumTotal, plural, one {# albumisse} other {# albumisse}}", "assets_cannot_be_added_to_album_count": "{count, plural, one {Üksust} other {Üksuseid}} ei saa albumisse lisada", "assets_cannot_be_added_to_albums": "{count, plural, one {Üksust} other {Üksuseid}} ei saa lisada ühtegi albumisse", @@ -792,7 +809,6 @@ "custom_date": "Muu kuupäev", "custom_locale": "Kohandatud lokaat", "custom_locale_description": "Vorminda kuupäevad, kellaajad ja arvud vastavalt valitud keelele ja regioonile", - "custom_url": "Kohandatud URL", "cutoff_date_description": "Jäta alles fotod ja videod viimasest…", "cutoff_day": "{count, plural, one {päev} other {päeva}}", "cutoff_year": "{count, plural, one {aasta} other {aastat}}", @@ -1453,6 +1469,7 @@ "never": "Mitte kunagi", "new_album": "Uus album", "new_api_key": "Uus API võti", + "new_feature": "Uus funktsionaalsus", "new_password": "Uus parool", "new_person": "Uus isik", "new_pin_code": "Uus PIN-kood", @@ -1513,6 +1530,8 @@ "obtainium_configurator": "Obtainiumi seadistamine", "obtainium_configurator_instructions": "Androidi rakenduse otse GitHub'ist paigaldamiseks ja uuendamiseks kasuta Obtainiumit. Seadistamise lingi loomiseks lisa API võti ja vali rakenduse variant", "ocr": "OCR", + "ocr_body": "Immich loeb nüüd teksti sinu fotodel, nii et saad selle järgi neid otsida.", + "ocr_title": "Otsi teksti oma fotodel", "official_immich_resources": "Ametlikud Immich'i ressursid", "offline": "Ühendus puudub", "offset": "Nihe", @@ -1531,6 +1550,8 @@ "open": "Ava", "open_calendar": "Ava kalender", "open_in_browser": "Ava brauseris", + "open_in_immich_body": "Sea Immich oma Androidi galeriirakenduseks, et fotosid otse teistest rakendustest avada.", + "open_in_immich_title": "Ava fotod Immich'is", "open_in_map_view": "Ava kaardi vaates", "open_in_openstreetmap": "Ava OpenStreetMap", "open_the_search_filters": "Ava otsingufiltrid", @@ -1588,7 +1609,7 @@ "person": "Isik", "person_age_months": "{months, plural, one {# kuu} other {# kuud}} vana", "person_age_year_months": "1 aasta {months, plural, one {# kuu} other {# kuud}} vana", - "person_age_years": "{years, plural, other {# aastat}} vana", + "person_age_years": "{years, plural, one {# aasta} other {# aastat}} vana", "person_birthdate": "Sündinud {date}", "person_hidden": "{name}{hidden, select, true { (peidetud)} other {}}", "person_recognized": "Isik tuvastatud", @@ -1688,7 +1709,9 @@ "recent": "Hiljutine", "recent_searches": "Hiljutised otsingud", "recently_added": "Hiljuti lisatud", + "recently_added_description": "Sirvi oma üksuseid sorteerituna Immich'isse üleslaadimise järgi", "recently_added_page_title": "Hiljuti lisatud", + "recently_added_title": "Hiljuti lisatud", "recently_taken": "Hiljuti tehtud", "refresh": "Värskenda", "refresh_encoded_videos": "Värskenda kodeeritud videod", @@ -1895,6 +1918,8 @@ "share_link": "Jaga linki", "share_original": "Kasuta algset (suur)", "share_preview": "Kasuta pisipilti (väike)", + "share_quality_body": "Vajuta ja hoia jagamise nuppu, et valida enne jagamist pildifaili kvaliteet.", + "share_quality_title": "Vali jagamise kvaliteet", "shared": "Jagatud", "shared_album_activities_input_disable": "Kommentaarid on keelatud", "shared_album_activity_remove_content": "Kas soovid selle tegevuse kustutada?", @@ -1976,6 +2001,7 @@ "sign_out": "Logi välja", "sign_up": "Registreeru", "size": "Suurus", + "skip": "Jäta vahele", "skip_to_content": "Sisu juurde", "skip_to_folders": "Kaustade juurde", "skip_to_tags": "Siltide juurde", @@ -1986,6 +2012,7 @@ "slideshow_repeat": "Korda slaidiesitlust", "slideshow_repeat_description": "Mine slaidiesitluse lõppedes tagasi algusesse", "slideshow_settings": "Slaidiesitluse seaded", + "slideshow_title": "Slaidiesitlus", "smart_album": "Nutikas album", "some_assets_already_have_a_location_warning": "Osadel valitud üksustest on juba asukoht määratud", "sort_albums_by": "Järjesta albumid...", @@ -2113,6 +2140,7 @@ "unknown": "Teadmata", "unknown_country": "Tundmatu riik", "unknown_date": "Tundmatu kuupäev", + "unknown_schema": "Tundmatu skeem", "unknown_year": "Teadmata aasta", "unlimited": "Piiramatu", "unlink_motion_video": "Tühista liikuva video linkimine", @@ -2148,6 +2176,8 @@ "upload_status_errors": "Vead", "upload_status_uploaded": "Üleslaaditud", "upload_success": "Üleslaadimine õnnestus, uute üksuste nägemiseks värskenda lehte.", + "upload_to_album_body": "Kui sa ei kasuta käsitsi üleslaadimise funktsionaalsust, saad nüüd fotode üleslaadimisel need otse albumisse lisada, pole vaja kõigepealt üles laadida ja seejärel albumisse lisada.", + "upload_to_album_title": "Laadi üles otse albumisse", "upload_to_immich": "Laadi Immich'isse ({count})", "uploading": "Üleslaadimine", "uploading_media": "Üksuste üleslaadimine", @@ -2215,6 +2245,9 @@ "week": "Nädal", "welcome": "Tere tulemast", "welcome_to_immich": "Tere tulemast Immich'isse", + "whats_new": "Mis on uut", + "whats_new_settings_subtitle": "Vaata, mis on Immich'is uut", + "whats_new_version": "Versioon {version}", "width": "Laius", "wifi_name": "WiFi-võrgu nimi", "workflow": "Töövoog", diff --git a/i18n/eu.json b/i18n/eu.json index 77112d32dc..49eac5f4fa 100644 --- a/i18n/eu.json +++ b/i18n/eu.json @@ -108,6 +108,21 @@ "image_thumbnail_quality_description": "Miniaturaren kalitatea 1-100. Handia hobea da, baina fitxategi handiagoak sortzen ditu eta aplikazioen jariakortasuna murriztu dezake.", "image_thumbnail_title": "Argazki Txikien Konfigurazioa", "import_config_from_json_description": "Inportatu sistema konfigurazioa JSON konfigurazio fitxategia kargatuz", + "integrity_checks_checksum_files": "Egiaztapeneko baturen fitxategiak", + "integrity_checks_checksum_files_description": "Egiaztapeneko baturen egiaztapena kudeatu", + "integrity_checks_checksum_files_enable_description": "Egiaztapeneko baturen egiaztapena gaitu", + "integrity_checks_checksum_files_percentage_limit": "Ehunekoaren muga", + "integrity_checks_checksum_files_percentage_limit_description": "Konfiguratu gehienezko ehunekoa 0,01 eta 1 arteko egiaztapeneko baturak tarte bakoitzean zenbateraino exekutatu behar duen.", + "integrity_checks_checksum_files_time_limit": "Denbora muga", + "integrity_checks_checksum_files_time_limit_description": "Konfiguratu egiaztapeneko baturak tarte bakoitzean exekutatu behar duen gehienezko iraupena. (ms)", + "integrity_checks_missing_files": "Falta diren fitxategiak", + "integrity_checks_missing_files_description": "Konfiguratu maiztasuna eta gaitu edo desgaitu falta diren fitxategien egiaztapena", + "integrity_checks_missing_files_enable_description": "Gaitu falta diren fitxategien egiaztapena", + "integrity_checks_settings": "Osotasun egiaztapenak", + "integrity_checks_settings_description": "Kudeatu osotasuna egiaztatzeko tarteak", + "integrity_checks_untracked_files": "Jarraitu gabeko fitxategiak", + "integrity_checks_untracked_files_description": "Konfiguratu maiztasuna eta gaitu edo desgaitu jarraitu gabeko fitxategien egiaztapena", + "integrity_checks_untracked_files_enable_description": "Gaitu jarraitu gabeko fitxategien egiaztapena", "job_concurrency": "{job} konkurrentzia", "job_created": "Zeregina sortuta", "job_not_concurrency_safe": "Ataza hau ez da segurua aldiberekotasunerako.", @@ -416,6 +431,10 @@ "transcoding_realtime_description": "Bideoa erreproduzitzen ari den heinean transkodetzea denbora errealean egiteko aukera ematen du. Kalitate aldaketa gaitzen du, baina zerbitzariaren gaitasunen arabera erreprodukzio-latentzia eta toteltze handiagoak sor ditzake.", "transcoding_realtime_enabled": "Gaitu denbora errealeko transkodeketa", "transcoding_realtime_enabled_description": "Desgaituta badago, zerbitzariak uko egingo dio denbora errealeko transkodetze saio berriei.", + "transcoding_realtime_resolutions": "Bereizmenak", + "transcoding_realtime_resolutions_description": "Denbora errealean transkodetzeko eskaintzen diren bereizmenak. Bereizmen handiagoek erreprodukzio-arazoak sor ditzakete zerbitzariak ezin baditu behar bezain azkar transkodetzen.", + "transcoding_realtime_video_codecs": "Bideo kodetzaileak", + "transcoding_realtime_video_codecs_description": "Denbora errealean transkodetzeko eskaintzen diren bideo-kodetzaileak. Erreprodukzioan onartzen duten aukerarik onena aukeratuko dute bezeroek. AV1 HEVC baino eraginkorragoa da, baita H.264 baino eraginkorragoa. Hardware-azelerazioa erabiltzean, hautatu azeleragailuak kode ditzakeen kodetzaileak soilik. Software transkodeketa erabiltzean, kontuan izan H.264 AV1 baino azkarragoa dela, baita HEVC baino azkarragoa.", "transcoding_reference_frames": "Erreferentzia fotogramak", "transcoding_reference_frames_description": "Forograma jakin bat konprimitzean erreferentzia beharreko fotograma kopurua. Balio altuagoek konpresioaren eraginkortasuna hobetzen dute, baina kodeketa moteltzen dute. 0-k balio hau automatikoki ezartzen du.", "transcoding_required_description": "Onartutako formatu batean ez dauden bideoak bakarrik", @@ -543,11 +562,11 @@ "app_update_available": "Aplikazioaren eguneratzea eskuragarri dago", "appears_in": "Hemen agertzen da", "apply_count": "Ezarri ({count, number})", - "archive": "Artxibo", + "archive": "Artxibategia", "archive_action_prompt": "{count} artxibategira bidalita", "archive_or_unarchive_photo": "Argazkia artxibatu edo berrezarri", - "archive_size": "Artxibo tamaina", - "archive_size_description": "Konfiguratu artxiboaren tamaina deskargak egiteko (GiB-tan)", + "archive_size": "Fitxategi konprimatuaren tamaina", + "archive_size_description": "Konfiguratu konprimitatutako fitxategiaren tamaina deskargak egiteko (GiB-tan)", "archived": "Artxibatua", "archived_count": "{count, plural, one {artxibatu bat} other {# artxibatu}}", "are_these_the_same_person": "Pertsona bera al dira hauek?", @@ -578,6 +597,7 @@ "asset_viewer_settings_title": "Baliabide ikuslea", "assets": "Baliabideak", "assets_added_to_album_count": "{count, plural, one {Baliabide bat} other {# baliabide}} albumera gehituta", + "assets_added_to_album_partial_count": "{totalCount, number}-(e)tik baliabide {successCount, number, plural, one {bat gehitu da albumera} other {# gehitu dira albumera}}", "assets_added_to_albums_count": "Gehituta {assetTotal, plural, one {# asset} other {# assets}} to {albumTotal, plural, one {# album} other {# albums}}", "assets_cannot_be_added_to_album_count": "{count, plural, one {Baliabidea ezin izan da albumera gehitu} other {Baliabideak ezin izan dira albumera gehitu}}", "assets_cannot_be_added_to_albums": "{count, plural, one {Asset} other {Assets}} ezin izan da albumetara gehitu", @@ -794,7 +814,6 @@ "custom_date": "Data pertsonalizatua", "custom_locale": "Lokalizazio pertsonalizatua", "custom_locale_description": "Formateatu datak, orduak eta zenbakiak hautatutako hizkuntza eta eskualdearen arabera", - "custom_url": "URL pertsonalizatua", "cutoff_date_description": "Mantendu epe honetan sartzen diren argazkiak…", "cutoff_day": "{count, plural, one {egun} other {egun}}", "cutoff_year": "{count, plural, one {urte} other {urte}}", @@ -1305,7 +1324,7 @@ "login_form_password_hint": "pasahitza", "login_form_server_empty": "Zerbitzari URL bat sartu", "login_form_server_error": "Ezin izan da zerbitzarira konektatu", - "login_has_been_disabled": "Saioa hastea desgaitu da.", + "login_has_been_disabled": "Saioa hastea desgaitu da", "login_password_changed_error": "Errore bat gertatu da pasahitza eguneratzean", "login_password_changed_success": "Pasahitza arrakastaz eguneratu", "logout_all_device_confirmation": "Ziur zaude gailu guztietan saioa amaitu nahi duzula?", @@ -1461,6 +1480,7 @@ "never": "Inoiz ez", "new_album": "Album berria", "new_api_key": "API gako berria", + "new_feature": "Ezaugarri berria", "new_password": "Pasahitz berria", "new_person": "Pertsona berria", "new_pin_code": "PIN gako berria", @@ -1521,6 +1541,8 @@ "obtainium_configurator": "Obtainium kudeatzailea", "obtainium_configurator_instructions": "Erabili Obtainium Immich GitHub-en bertsiotik zuzenean Android aplikazioa instalatzeko eta eguneratzeko. Sortu API gako bat eta hautatu aldaera bat zure Obtainium konfigurazio esteka sortzeko", "ocr": "OCR", + "ocr_body": "Immichek orain zure argazkien barruan dagoen testua irakurtzen du, haiek esaten dutenaren arabera bilatu ahal izateko.", + "ocr_title": "Bilatu testua zure argazkietan", "official_immich_resources": "Immich-en baliabide ofizialak", "offline": "Lineaz kanpo", "offset": "Desbiderapena", @@ -1539,6 +1561,8 @@ "open": "Zabalik", "open_calendar": "Egutegia zabaldu", "open_in_browser": "Arakatzailean zabaldu", + "open_in_immich_body": "Ezarri Immich zure galeria gisa Android-en argazkiak zuzenean irekitzeko beste aplikazioetatik.", + "open_in_immich_title": "Ireki argazkiak Immich-en", "open_in_map_view": "Ireki maparen ikuspegian", "open_in_openstreetmap": "OpenStreetMap-en zabaldu", "open_the_search_filters": "Bilaketa-iragazkiak ireki", @@ -1594,9 +1618,9 @@ "permission": "Baimena", "permission_empty": "Zure baimenak ez du hutsik egon behar", "person": "Pertsona", - "person_age_months": "Orain dela {months, plural, one {hilabete bat} other {# hilabete}}", + "person_age_months": "Duela {months, plural, one {hilabete bat} other {# hilabete}}", "person_age_year_months": "Urte bat eta {months, plural, one {hilabete bat} other {# hilabete}}", - "person_age_years": "Adina: {years, plural, other {# urte}}", + "person_age_years": "{years, plural, one{Urte bat} other {# urte}}", "person_birthdate": "{date} -(a)n jaiota", "person_hidden": "{name}{hidden, select, true { (ezkutatuta)} other {}}", "person_recognized": "Pertsona ezagutua", @@ -1697,7 +1721,10 @@ "recent": "Berria", "recent_searches": "Duela gutxiko bilaketak", "recently_added": "Duela gutxi gehitutakoak", + "recently_added_body": "Joan zuzenean azkenaldian gehitu duzun guztiari eskainitako orrialde batean.", + "recently_added_description": "Arakatu zure fitxategiak Immich-en kargatzeko dataren arabera ordenatuta", "recently_added_page_title": "Duela gutxi gehitutakoak", + "recently_added_title": "Duela gutxi gehituta", "recently_taken": "Duela gutxi ateratakoak", "refresh": "Freskatu", "refresh_encoded_videos": "Kodetutako bideoak freskatu", @@ -1904,6 +1931,8 @@ "share_link": "Esteka partekatu", "share_original": "Jatorrizkoa erabili (handia)", "share_preview": "Miniatura erabili (txikia)", + "share_quality_body": "Eduki sakatuta partekatzeko botoia partekatu aurretik irudiaren kalitatea aukeratzeko.", + "share_quality_title": "Aukeratu zure partekatzeko kalitatea", "shared": "Partekatuta", "shared_album_activities_input_disable": "Iruzkinak desgaituta daude", "shared_album_activity_remove_content": "Jarduera hau ezabatu nahi duzu?", @@ -2113,7 +2142,7 @@ "unable_to_check_version": "Ezin da egiaztatu aplikazioaren edo zerbitzariaren bertsioa", "unable_to_setup_pin_code": "Ezin izan da PIN kodea ezarri", "unarchive": "Desartxibatu", - "unarchive_action_prompt": "{count} artxibotik kendu dira", + "unarchive_action_prompt": "{count, plural, one {Artxibotik kendu da} other {# artxibotik kendu dira}}", "unarchived_count": "{count, plural, one {Artxibatu gabeko bat} other {# artxibatu gabeko}}", "undo": "Desegin", "unfavorite": "Gogokoetatik kendu", @@ -2244,7 +2273,7 @@ "wrong_pin_code": "PIN kode okerra", "x_of_total": "{total}-(e)tik {x}", "year": "Urtea", - "years_ago": "Orain dela {years, plural, one {urte bat} other {# urte}}", + "years_ago": "Duela {years, plural, one {urte bat} other {# urte}}", "yes": "Bai", "you_dont_have_any_shared_links": "Ez duzu partekatutako estekarik", "your_wifi_name": "Zure Wi-Fi izena", diff --git a/i18n/fa.json b/i18n/fa.json index e0b6c8b056..3f2be10f4f 100644 --- a/i18n/fa.json +++ b/i18n/fa.json @@ -23,6 +23,7 @@ "add_location": "افزودن مکان", "add_partner": "افزودن شریک", "add_photos": "افزودن عکس ها", + "add_step": "افزودن گام", "add_tag": "افزودن تگ", "add_to": "افزودن به …", "add_to_album": "افزودن به آلبوم", @@ -44,7 +45,7 @@ "authentication_settings": "تنظیمات احراز هویت", "authentication_settings_description": "مدیریت رمز عبور، OAuth، و سایر تنظیمات احراز هویت", "authentication_settings_disable_all": "آیا مطمئن هستید که می‌خواهید تمام روش‌های ورود را غیرفعال کنید؟ ورود به طور کامل غیرفعال خواهد شد.", - "authentication_settings_reenable": "برای فعال سازی مجدد از دستور سرور استفاده کنید.", + "authentication_settings_reenable": "برای فعال‌سازی مجدد، از دستور سرور استفاده کنید.", "background_task_job": "وظایف پس‌زمینه", "backup_database": "اضافه کردن یک نسخه کپی از دیتابیس", "backup_database_enable_description": "فعال کردن کپی از دیتابیس", @@ -52,7 +53,7 @@ "backup_onboarding_1_description": "کپی خارجی روی فضای ابری یا یک محل فیزیکی دیگر.", "backup_onboarding_2_description": "کپی‌های محلی روی دستگاه‌های دیگر. این شامل فایل‌های اصلی و پشتیبان‌های محلی از آن فایل‌ها می‌باشد.", "backup_onboarding_3_description": "مجموع کپی‌های داده‌های شما، به همراه فایل‌های اصلی. این شامل ۱ کپی خارجی و ۲ کپی محلی می‌باشد.", - "backup_onboarding_description": "برای حفاظت از اطلاعات شما یک روش پشتیبانی ۳-۲-۱ پیشنهاد می‌شود. برای یک پشتیبانی جامع، شما باید کپی‌هایی از عکس‌ها/ویدیوهای آپلود شده خود به همراه دیتابیس Immich نگه دارید.", + "backup_onboarding_description": "برای محافظت از داده‌های شما، یک استراتژی پشتیبان‌گیری ۳-۲-۱ توصیه می‌شود. شما باید نسخه‌هایی از تصاویر/ویدیوهای آپلودشده و همچنین پایگاه داده Immich را برای یک راهکار پشتیبان‌گیری جامع نگهداری کنید.", "backup_onboarding_footer": "برای اطلاعات بیشتر درباره بک آپ گیری از Immich، لطفا به مستندات مراجعه کنید.", "backup_onboarding_parts_title": "روش پشتیبانی ۳-۲-۱ شامل:", "backup_onboarding_title": "بک آپ ها", @@ -68,15 +69,21 @@ "confirm_user_pin_code_reset": "آیا مطمئن هستید که می‌خواهید کد PIN ‏{user} را بازنشانی کنید؟", "copy_config_to_clipboard_description": "کپی کانفیگ فعلی سیستم در قالب یک آبجکت JSON در کلیپ بورد", "create_job": "ایجاد جاب", + "cron_expression": "عبارت cron", + "cron_expression_description": "فاصله اسکن را با استفاده از فرمت cron تنظیم کنید. برای اطلاعات بیشتر، لطفاً به عنوان مثال به Crontab Guru مراجعه نمایید", + "cron_expression_presets": "پیش‌تنظیم‌های عبارت cron", "disable_login": "غیرفعال کردن ورود", + "download_csv": "دانلود csv", "duplicate_detection_job_description": "اجرای یادگیری ماشین بر روی فایل‌ها برای شناسایی تصاویر مشابه. این وابسته به جستجوی هوشمند است", "exclusion_pattern_description": "الگوهای استثنا به شما امکان می‌دهد هنگام اسکن کتابخانه خود فایل‌ها و پوشه‌ها را نادیده بگیرید . این مفید است اگر پوشه‌هایی دارید که فایل‌هایی را شامل می‌شوند که نمی‌خواهید وارد کنید، مانند فایل‌های RAW.", "export_config_as_json_description": "دانلود کانفیگ فعلی سیستم در قالب یک فایل JSON", + "external_libraries_page_description": "صفحه کتابخانه خارجی بخش مدیریت", "face_detection": "تشخیص چهره", "face_detection_description": "تشخیص چهره‌ها در فایل‌ها با استفاده از یادگیری ماشین. برای ویدیوها، تنها تصویر بندانگشتی در نظر گرفته می‌شود. گزینه \"همه\" تمام فایل‌ها را (مجددا) پردازش می‌کند. گزینه \"گمشده\" فایل‌ها را در صف قرار می‌دهد که هنوز پردازش نشده‌اند. چهره‌های تشخیص داده شده پس از اتمام تشخیص چهره، برای تشخیص چهره به صورت صف انتظار قرار می‌گیرند، آن‌ها را به افراد موجود یا جدید گروه‌بندی می‌کند.", "facial_recognition_job_description": "گروه‌بندی چهره‌های تشخیص داده شده به افراد. این مرحله پس از تشخیص چهره انجام می‌شود. گزینه \"همه\" تمام چهره‌ها را (مجددا) دسته بندی می‌کند. گزینه \"گمشده\" چهره‌ها را در صف قرار می‌دهد که به هیچ فردی اختصاص داده نشده‌اند.", "failed_job_command": "دستور {command} برای کار: {job} ناموفق بود", "force_delete_user_warning": "هشدار: این عمل باعث حذف فوری کاربر و تمام فایل‌ها می‌شود. این عمل قابل بازگشت نیست و فایل‌ها قابل بازیابی نیستند.", + "image_format": "فرمت", "image_format_description": "فرمت WebP فایل‌های کوچکتری نسبت به JPEG ایجاد می‌کند، اما زمان کدگذاری آن کندتر است.", "image_fullsize_description": "تصویر با اندازه کامل و بدون فراداده، مورد استفاده هنگام بزرگ‌نمایی", "image_fullsize_enabled": "فعال‌سازی تولید تصویر با اندازه کامل", @@ -90,20 +97,45 @@ "image_preview_description": "تصویر با اندازه متوسط و بدون فراداده، مورد استفاده هنگام مشاهده یک دارایی و برای یادگیری ماشین", "image_preview_quality_description": "کیفیت پیش‌نمایش از ۱ تا ۱۰۰. هرچه بالاتر باشد، کیفیت بهتر است، اما فایل‌های بزرگ‌تری ایجاد می‌کند و ممکن است پاسخ‌گویی برنامه کاهش یابد. تنظیم مقدار پایین می‌تواند بر کیفیت یادگیری ماشین تأثیر بگذارد.", "image_preview_title": "تنظیمات پیش‌نمایش", + "image_progressive": "پیش‌رونده", + "image_progressive_description": "تصاویر JPEG را به‌صورت پیش‌رونده رمزگذاری نمایید تا در حین بارگذاری به‌تدریج نمایش داده شوند. این تنظیم بر تصاویر WebP تأثیری ندارد.", "image_quality": "کیفیت", "image_resolution": "وضوح تصویر", "image_resolution_description": "وضوح بالاتر می‌تواند جزئیات بیشتری را حفظ کند، اما تبدیل آن زمان بیشتری می‌برد، حجم فایل‌ها را افزایش می‌دهد و ممکن است پاسخ‌گویی برنامه را کاهش دهد.", "image_settings": "تنظیمات عکس", "image_settings_description": "مدیریت کیفیت و وضوح تصاویر تولید شده", + "image_thumbnail_description": "تصویر بندانگشتی کوچک و بدون اطلاعات جانبی، برای نمایش دسته‌ای عکس‌ها مانند خط زمانی اصلی", + "image_thumbnail_quality_description": "کیفیت بندانگشتی از ۱ تا ۱۰۰. مقادیر بالاتر کیفیت بهتری دارند، اما حجم فایل‌ها را افزایش داده و ممکن است سرعت پاسخگویی برنامه را کاهش دهند.", + "image_thumbnail_title": "تنظیمات تصویر بندانگشتی", "import_config_from_json_description": "وارد کردن کانفیگ سیستم با آپلود یک فایل JSON", + "integrity_checks_checksum_files": "فایل‌های checksum", + "integrity_checks_checksum_files_description": "پیکربندی بررسی checksum", + "integrity_checks_checksum_files_enable_description": "فعال‌سازی بررسی checksum", + "integrity_checks_checksum_files_percentage_limit": "محدودیت درصد", + "integrity_checks_checksum_files_percentage_limit_description": "حداکثر درصد بین ۰.۰۱ و ۱ را جهت تعیین میزان اجرای بررسی checksum در هر بازه زمانی پیکربندی نمایید.", + "integrity_checks_checksum_files_time_limit": "محدودیت زمان", + "integrity_checks_checksum_files_time_limit_description": "حداکثر مدت زمان اجرای بررسی Checksum در هر بازه را پیکربندی نمایید. (میلی‌ثانیه)", + "integrity_checks_missing_files": "فایل‌های مفقود", + "integrity_checks_missing_files_description": "تنظیم فاصله زمانی و فعال یا غیرفعال‌سازی بررسی فایل‌های مفقود", + "integrity_checks_missing_files_enable_description": "فعال‌سازی بررسی فایل‌های مفقودشده", + "integrity_checks_settings": "بررسی‌های یکپارچگی", + "integrity_checks_settings_description": "مدیریت فواصل زمانی بررسی‌های یکپارچگی", + "integrity_checks_untracked_files": "فایل‌های ردیابی‌نشده", + "integrity_checks_untracked_files_description": "تنظیم فاصله زمانی و فعال یا غیرفعال‌سازی بررسی فایل‌های ردیابی‌نشده", + "integrity_checks_untracked_files_enable_description": "فعال‌سازی بررسی فایل‌های ردیابی‌نشده", "job_concurrency": "همزمانی {job}", "job_created": "جاب ساخته شد", "job_not_concurrency_safe": "این کار ایمنی همزمانی را تضمین نمی‌کند.", "job_settings": "تنظیمات کار", "job_settings_description": "مدیریت همزمانی کار", + "jobs_delayed": "{jobCount, plural, other {# به تأخیر افتاده}}", + "jobs_failed": "{jobCount, plural, other {# ناموفق}}", + "jobs_over_time": "وظایف در طول زمان", "library_created": "کتابخانه ایجاد شده: {library}", "library_deleted": "کتابخانه حذف شد", + "library_details": "جزئیات کتابخانه", "library_folder_description": "یک پوشه برای ایمپورت مشخص کنید. این پوشه و پوشه های داخل آن، برای عکس ها و ویدیو ها اسکن می شوند.", + "library_remove_exclusion_pattern_prompt": "آیا از حذف این الگوی استثنا اطمینان دارید؟", "library_remove_folder_prompt": "آیا از حذف این پوشه ایمپورت مطمئن هستید؟", "library_scanning": "اسکن دوره ای", "library_scanning_description": "تنظیم اسکن دوره‌ای کتابخانه", @@ -147,6 +179,7 @@ "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_ocr_enabled": "فعال سازی OCR", "machine_learning_ocr_enabled_description": "اگر غیر فعال باشد، تشخیص متن روی عکس ها انجام نمی شود.", @@ -165,6 +198,37 @@ "machine_learning_smart_search_enabled": "فعال سازی جستجوی هوشمند", "machine_learning_smart_search_enabled_description": "اگر غیرفعال باشد، تصاویر برای جستجوی هوشمند رمزگذاری نخواهند شد.", "machine_learning_url_description": "آدرس سرور یادگیری ماشین. اگر بیش از یک آدرس داده شود، هر سرور بصورت یکی در لحظه امتحان می شوند تا زمانی که یکی از آنها با موفقیت پاسخ دهد، از اول به آخر. سرور هایی که پاسخ ندهند بصورت موقت نادیده گرفته می شوند تا زمانی که به وضعیت آنلاین برگردند.", + "maintenance_backup_management": "مدیریت پشتیبان‌گیری", + "maintenance_delete_backup": "حذف پشتیبان", + "maintenance_delete_backup_description": "این فایل به‌طور غیرقابل بازگشت حذف خواهد شد.", + "maintenance_delete_error": "خطا در حذف پشتیبان.", + "maintenance_integrity_check": "بررسی", + "maintenance_integrity_check_all": "بررسی همه", + "maintenance_integrity_checksum_mismatch": "عدم تطابق Checksum", + "maintenance_integrity_checksum_mismatch_description": "فایل‌هایی که Checksum آن‌ها روی دیسک با Checksum ذخیره‌شده در پایگاه داده Immich مطابقت ندارد.", + "maintenance_integrity_checksum_mismatch_job": "بررسی عدم تطابق Checksum", + "maintenance_integrity_checksum_mismatch_refresh_job": "به‌روزرسانی گزارش‌های عدم تطابق Checksum", + "maintenance_integrity_missing_file": "فایل‌های مفقودشده", + "maintenance_integrity_missing_file_description": "فایل‌هایی که Immich در پایگاه داده خود ردیابی کرده، اما در سیستم فایل وجود ندارند.", + "maintenance_integrity_missing_file_job": "بررسی فایل‌های مفقودشده", + "maintenance_integrity_missing_file_refresh_job": "به‌روزرسانی گزارش‌های فایل‌های مفقودشده", + "maintenance_integrity_report": "گزارش یکپارچگی", + "maintenance_integrity_untracked_file": "فایل‌های ردیابی‌نشده", + "maintenance_integrity_untracked_file_description": "فایل‌های موجود در پوشه‌های Immich که هیچ سوابقی از آن‌ها در Immich ثبت نشده است.", + "maintenance_integrity_untracked_file_job": "بررسی فایل‌های ردیابی‌نشده", + "maintenance_integrity_untracked_file_refresh_job": "به‌روزرسانی گزارش‌های فایل‌های ردیابی‌نشده", + "maintenance_restore_backup": "بازیابی پشتیبان", + "maintenance_restore_backup_description": "Immich پاک‌سازی شده و از نسخه پشتیبان انتخابی بازیابی می‌شود. قبل از شروع فرآیند، یک نسخه پشتیبان جدید تهیه خواهد شد.", + "maintenance_restore_backup_different_version": "این نسخه پشتیبان با نسخه متفاوتی از Immich ایجاد شده است!", + "maintenance_restore_backup_unknown_version": "امکان تشخیص نسخه این پشتیبان وجود ندارد.", + "maintenance_restore_database_backup": "بازیابی نسخه پشتیبان پایگاه داده", + "maintenance_restore_database_backup_description": "بازگردانی پایگاه داده به وضعیت قبلی با استفاده از فایل پشتیبان", + "maintenance_settings": "تعمیرات و نگهداری", + "maintenance_settings_description": "Immich را در حالت تعمیر و نگهداری قرار دهید.", + "maintenance_start": "تغییر به حالت تعمیر و نگهداری", + "maintenance_start_error": "خطا در شروع حالت تعمیر و نگهداری.", + "maintenance_upload_backup": "…بارگذاری فایل پشتیبان پایگاه داده", + "maintenance_upload_backup_error": "امکان بارگذاری پشتیبان وجود ندارد؛ آیا فایل از نوع .sql یا .sql.gz است؟", "manage_concurrency": "مدیریت همزمانی", "manage_concurrency_description": "رفتن به صفحه جاب ها برای مدیریت همزمانی جاب ها", "manage_log_settings": "مدیریت تنظیمات گزارش", @@ -174,7 +238,7 @@ "map_gps_settings_description": "تنظیمات نقشه و جی‌پی‌اس (ژئوکدینگ معکوس) را مدیریت کنید", "map_implications": "قابلیت نقشه به یک سرویس tile خارجی نیاز دارد (tiles.immich.cloud)", "map_light_style": "حالت روشن", - "map_manage_reverse_geocoding_settings": "مدیریت تنظیمات کدگذاری مکانی معکوس ", + "map_manage_reverse_geocoding_settings": "مدیریت تنظیمات معکوس‌سازی موقعیت جغرافیایی", "map_reverse_geocoding": "ژئوکدینگ معکوس", "map_reverse_geocoding_enable_description": "فعال سازی ژئوکدینگ معکوس", "map_reverse_geocoding_settings": "تنظیمات ژئوکدینگ معکوس", @@ -182,6 +246,7 @@ "map_settings_description": "مدیریت تنظیمات نقشه", "map_style_description": "آدرس اینترنتی (style.json) نوع نمایش نقشه", "memory_cleanup_job": "پاک سازی حافظه", + "memory_generate_job": "تولید خاطرات", "metadata_extraction_job": "استخراج فرا داده", "metadata_extraction_job_description": "استخراج اطلاعات ابرداده، مانند موقعیت جغرافیایی و کیفیت از هر فایل", "metadata_faces_import_setting": "فعال سازی ایمپورت صورت", @@ -189,13 +254,19 @@ "metadata_settings": "تنظیمات Metadata", "metadata_settings_description": "مدیریت تنظیمات metadata", "migration_job": "مهاجرت", + "migration_job_description": "انتقال تصاویر بندانگشتی دارایی‌ها و چهره‌ها به ساختار پوشه جدید", "nightly_tasks_cluster_faces_setting_description": "اجرای شناسایی چهره روی چهره های تازه تشخیص داده شده", "nightly_tasks_cluster_new_faces_setting": "گروه بندی چهره های جدید", "nightly_tasks_database_cleanup_setting": "تسک های پاک سازی پایگاه داده", "nightly_tasks_database_cleanup_setting_description": "پاک سازی داده های قدیمی، منقضی شده از پایگاه داده", "nightly_tasks_generate_memories_setting": "ایجاد خاطرات", "nightly_tasks_generate_memories_setting_description": "ایجاد خاطرات جدید از فایل ها", + "nightly_tasks_missing_thumbnails_setting": "ایجاد تصاویر بندانگشتی مفقودشده", + "nightly_tasks_missing_thumbnails_setting_description": "افزودن دارایی‌های فاقد تصویر بندانگشتی به صف ساخت", + "nightly_tasks_settings": "تنظیمات وظایف شبانه", + "nightly_tasks_settings_description": "مدیریت وظایف شبانه", "nightly_tasks_start_time_setting": "زمان شروع", + "nightly_tasks_start_time_setting_description": "زمانی که سرور شروع به اجرای وظایف شبانه می‌کند", "nightly_tasks_sync_quota_usage_setting": "همگام سازی میزان استفاده از سهمیه", "nightly_tasks_sync_quota_usage_setting_description": "بروزرسانی سهمیه ذخیره سازی کاربر، بر اساس استفاده فعلی", "no_paths_added": "هیچ مسیری اضافه نشده", @@ -203,12 +274,14 @@ "note_apply_storage_label_previous_assets": "توجه: برای اعمال برچسب ذخیره سازی به دارایی هایی که قبلاً بارگذاری شده اند، دستور زیر را اجرا کنید", "note_cannot_be_changed_later": "توجه: این را نمی توان بعداً تغییر داد!", "notification_email_from_address": "آدرس فرستنده", - "notification_email_from_address_description": "آدرس ایمیل فرستنده، به عنوان مثال:\"سرور عکس Immich \". مطمئن باشید از آدرسی استفاده کنید که اجازه ارسال ایمیل از آن را دارید.", + "notification_email_from_address_description": "آدرس ایمیل فرستنده، به عنوان مثال:\"سرور عکس Immich \". مطمئن باشید از آدرسی استفاده کنید که اجازه ارسال ایمیل از آن را دارید.", "notification_email_host_description": "میزبان سرور ایمیل (مثلاً smtp.immich.app)", "notification_email_ignore_certificate_errors": "خطاهای گواهی را نادیده بگیر", "notification_email_ignore_certificate_errors_description": "خطاهای اعتبارسنجی گواهی TLS را نادیده بگیر (توصیه نمی‌شود)", "notification_email_password_description": "رمز عبور برای استفاده در هنگام احراز هویت با سرور ایمیل", "notification_email_port_description": "پورت سرور ایمیل (مثلاً 25، 465 یا 587)", + "notification_email_secure": "SMTPS", + "notification_email_secure_description": "استفاده از SMTPS (SMTP بر روی TLS)", "notification_email_sent_test_email_button": "ایمیل آزمایشی بفرست و ذخیره کن", "notification_email_setting_description": "تنظیمات برای ارسال اعلان های ایمیل", "notification_email_test_email": "ارسال ایمیل آزمایشی", @@ -218,15 +291,22 @@ "notification_enable_email_notifications": "فعال کردن اعلان های ایمیل", "notification_settings": "تنظیمات اعلان", "notification_settings_description": "مدیریت تنظیمات اعلان ها، از جمله ایمیل", + "oauth_allow_insecure_requests": "اجازه درخواست‌های ناامن", + "oauth_allow_insecure_requests_description": "هشدار: این گزینه اعتبارسنجی گواهی TLS را برای درخواست‌های OAuth غیرفعال می‌کند و ممکن است شما را در معرض حملات MITM قرار دهد.", "oauth_auto_launch": "راه اندازی خودکار", "oauth_auto_launch_description": "جریان ورود به سیستم OAuth را به طور خودکار هنگام هدایت به صفحه ورود شروع کن", "oauth_auto_register": "ثبت خودکار", "oauth_auto_register_description": "کاربران جدید را پس از ورود با OAuth به طور خودکار ثبت نام کن", "oauth_button_text": "متن دکمه", + "oauth_client_secret_description": "برای کلاینت‌های محرمانه الزامی است، یا در صورتی که PKCE (کلید اثبات برای تبادل کد) توسط کلاینت عمومی پشتیبانی نشود.", "oauth_enable_description": "ورود توسط OAuth", + "oauth_end_session_url_description": "کاربر را هنگام خروج به این URI هدایت کنید.", "oauth_mobile_redirect_uri": "تغییر مسیر URI موبایل", "oauth_mobile_redirect_uri_override": "تغییر مسیر URI تلفن همراه", "oauth_mobile_redirect_uri_override_description": "زمانی که ارائه دهنده OAuth اجازه استفاده از آدرس موبایل، مانند ''{callback}'' را نمی دهد", + "oauth_prompt_description": "پارامتر Prompt (مانند select_account، login، consent)", + "oauth_role_claim": "درخواست نقش", + "oauth_role_claim_description": "اعطای خودکار دسترسی مدیر بر اساس وجود این ادعا. مقدار ادعا می‌تواند «user» یا «admin» باشد.", "oauth_settings": "OAuth", "oauth_settings_description": "مدیریت تنظیمات ورود به سیستم OAuth", "oauth_settings_more_details": "برای جزئیات بیشتر در مورد این ویژگی، به مستندات مراجعه کنید.", @@ -235,7 +315,7 @@ "oauth_storage_quota_claim": "درخواست سهمیه فضای ذخیره سازی", "oauth_storage_quota_claim_description": "تنظیم خودکار سهمیه ذخیره‌سازی کاربر به مقدار درخواست شده.", "oauth_storage_quota_default": "مقدار سهمیه ذخیره‌سازی پیش‌فرض (گیگابایت)", - "oauth_storage_quota_default_description": "سهمیه به گیگابایت هنگامی که درخواستی ارائه نشده باشد", + "oauth_storage_quota_default_description": "سهمیه به گیگابایت برای استفاده هنگامی که هیچ درخواستی ارائه نشده است.", "oauth_timeout": "تایم اوت درخواست", "oauth_timeout_description": "زمان تایم اوت برای درخواست ها بصورت میلی ثانیه", "ocr_job_description": "استفاده از یادگیری ماشین برای شناسایی متن در عکس ها", @@ -243,6 +323,7 @@ "password_settings": "گذرواژه ورود", "password_settings_description": "مدیریت تنظیمات گذرواژه ورود", "paths_validated_successfully": "تمامی مسیرها با موفقیت تأیید شدند", + "person_cleanup_job": "پاک‌سازی شخص", "queue_details": "جزئیات صف", "queues": "صف های جاب", "queues_page_description": "صفحه ادمین صف های جاب", @@ -250,18 +331,22 @@ "refreshing_all_libraries": "بروز رسانی همه کتابخانه ها", "registration": "ثبت نام مدیر", "registration_description": "از آنجایی که شما اولین کاربر در سیستم هستید، به عنوان مدیر تعیین شده‌اید و مسئولیت انجام وظایف مدیریتی بر عهده شما خواهد بود و کاربران اضافی توسط شما ایجاد خواهند شد.", + "release_channel_release_candidate": "نامزد انتشار", + "release_channel_stable": "پایدار", "remove_failed_jobs": "حذف جاب های ناموفق", "require_password_change_on_login": "الزام کاربر به تغییر گذرواژه در اولین ورود", "reset_settings_to_default": "بازنشانی تنظیمات به حالت پیش‌فرض", "reset_settings_to_recent_saved": "بازنشانی تنظیمات به آخرین تنظیمات ذخیره شده", + "scanning_library": "در حال اسکن کتابخانه", "search_jobs": "جاب های جستجو…", "send_welcome_email": "ارسال ایمیل خوش آمد گویی", "server_external_domain_settings": "دامنه خارجی", - "server_external_domain_settings_description": "دامنه برای لینک های عمومی به اشتراک گذاشته شده، شامل //:(s)http", + "server_external_domain_settings_description": "دامنه مورد استفاده برای پیوندهای خارجی", "server_public_users": "کاربران عمومی", "server_public_users_description": "تمامی کاربران (اسم و ایمیل) هنگام اضافه کردن یک کاربر به یک آلبوم مشترک لیست می شوند. وقتی غیر فعال باشد، لیست کاربران فقط برای ادمین قابل مشاهده است.", "server_settings": "تنظیمات سرور", "server_settings_description": "مدیریت تنظیمات سرور", + "server_stats_page_description": "صفحه آمار سرور مدیر", "server_welcome_message": "پیام خوش آمد گویی", "server_welcome_message_description": "پیامی که در صفحه ورود به سیستم نمایش داده می شود.", "settings_page_description": "صفحه تنظیمات ادمین", @@ -271,13 +356,15 @@ "smart_search_job_description": "اجرای یادگیری ماشینی بر روی دارایی‌ها برای پشتیبانی از جستجوی هوشمند", "storage_template_date_time_description": "زمان‌بندی ایجاد دارایی برای اطلاعات تاریخ و زمان استفاده می‌شود", "storage_template_date_time_sample": "نمونه زمان {date}", + "storage_template_enable_description": "فعال‌سازی موتور الگوی ذخیره‌سازی", "storage_template_hash_verification_enabled": "تأیید هَش فعال شد", "storage_template_hash_verification_enabled_description": "تأیید هَش را فعال می‌کند؛ این گزینه را غیرفعال نکنید مگر اینکه از عواقب آن مطمئن باشید", "storage_template_migration": "انتقال الگوی ذخیره سازی", "storage_template_migration_description": "قالب فعلی {template} را به دارایی‌های بارگذاری شده قبلی اعمال کنید", - "storage_template_migration_info": "تغییرات قالب فقط به دارایی‌های جدید اعمال خواهد شد. برای اعمال قالب به دارایی‌های بارگذاری شده قبلی، باید {job} را اجرا کنید.", + "storage_template_migration_info": "الگوی ذخیره‌سازی، تمام پسوندها را به حروف کوچک تبدیل می‌کند. تغییرات الگو تنها بر روی فایل‌های جدید اعمال خواهد شد. برای اعمال الگو بر روی فایل‌های آپلودشده قبلی، {job} را اجرا کنید.", "storage_template_migration_job": "وظیفه مهاجرت الگوی ذخیره‌سازی", "storage_template_more_details": "برای جزئیات بیشتر درباره این ویژگی، به قالب ذخیره‌سازی و مفاهیم آن مراجعه کنید", + "storage_template_onboarding_description_v2": "با فعال‌سازی این ویژگی، فایل‌ها به‌صورت خودکار بر اساس الگوی تعریف‌شده توسط کاربر سازماندهی می‌شوند. برای اطلاعات بیشتر، لطفاً مستندات را مشاهده کنید.", "storage_template_path_length": "حداکثر طول مسیر تقریبی: {length, number}/{limit, number}", "storage_template_settings": "قالب ذخیره‌سازی", "storage_template_settings_description": "مدیریت ساختار پوشه و نام فایل دارایی بارگذاری شده", @@ -286,6 +373,7 @@ "tag_cleanup_job": "پاک سازی تگ", "template_email_available_tags": "شما میتوانید از متغیر های روبرو در قالب خود استفاده کنید: {tags}", "template_email_if_empty": "اگر قالب خالی باشد، ایمیل پیشفرض استفاده خواهد شد.", + "template_email_invite_album": "الگوی آلبوم دعوت‌نامه", "template_email_preview": "پیش نمایش", "template_email_settings": "قالب های ایمیل", "template_email_update_album": "قالب بروزرسانی آلبوم", @@ -312,17 +400,20 @@ "transcoding_accepted_video_codecs_description": "انتخاب کدک‌های ویدیویی که نیازی به تبدیل (ترنسکود) ندارند. فقط برای برخی سیاست‌های رمزگشایی استفاده می‌شود.", "transcoding_advanced_options_description": "گزینه‌هایی که بیشتر کاربران نیازی به تغییر آن‌ها ندارند", "transcoding_audio_codec": "کدک صوتی", - "transcoding_audio_codec_description": "OPUS بهترین گزینه از نظر کیفیت است، اما با دستگاه‌ها یا نرم‌افزارهای قدیمی‌تر سازگاری کمتری دارد.", + "transcoding_audio_codec_description": "Opus بهترین گزینه از نظر کیفیت است، اما با دستگاه‌ها یا نرم‌افزارهای قدیمی‌تر سازگاری کمتری دارد.", "transcoding_bitrate_description": "ویدیوهایی که بالاتر از حداکثر بیت‌ریت هستند یا در فرمت پذیرفته‌ شده نیستند", - "transcoding_codecs_learn_more": "برای آشنایی بیشتر با اصطلاحات استفاده شده در اینجا، به مستندات FFmpeg برای کدک‌های H.264، HEVC و VP9 مراجعه کنید.", + "transcoding_codecs_learn_more": "برای آشنایی بیشتر با اصطلاحات به‌کاررفته، به مستندات FFmpeg برای کدک H.264، کدک HEVC و کدک VP9 مراجعه کنید.", "transcoding_constant_quality_mode": "حالت کیفیت ثابت", "transcoding_constant_quality_mode_description": "ICQ بهتر از CQP است، اما برخی از دستگاه‌های تسریع سخت‌افزاری از این حالت پشتیبانی نمی‌کنند. تنظیم این گزینه باعث می‌شود که حالت مشخص شده در هنگام استفاده از کدگذاری مبتنی بر کیفیت ترجیح داده شود. این گزینه توسط NVENC نادیده گرفته می‌شود زیرا از ICQ پشتیبانی نمی‌کند.", "transcoding_constant_rate_factor": "ضریب نرخ ثابت ( crf- )", "transcoding_constant_rate_factor_description": "سطح کیفیت ویدیو. هرچه عدد کمتر باشد، کیفیت بهتر است، اما فایل‌های بزرگ‌تری تولید می‌کند. مقادیر معمول عبارتند از: (23 <-- H.264) - (28 --> HEVC) - (31 --> VP9) - (35 --> AV1).", "transcoding_disabled_description": "هیچ ویدیویی را تبدیل فرمت نکنید، زیرا ممکن است پخش در برخی از کلاینت‌ها را مختل کند", + "transcoding_encoding_options": "گزینه‌های کدگذاری", + "transcoding_encoding_options_description": "تنظیم کدک‌ها، وضوح تصویر، کیفیت و سایر گزینه‌ها برای ویدیوهای کدگذاری‌شده", "transcoding_hardware_acceleration": "شتاب دهنده سخت افزاری", "transcoding_hardware_acceleration_description": "آزمایشی: Transcoding سریع تر اما ممکن است در bitrate یکسان کیفیت را کاهش دهد", "transcoding_hardware_decoding": "رمزگشایی سخت افزاری", + "transcoding_hardware_decoding_setting_description": "فعال‌سازی شتاب‌دهی سرتاسری به جای شتاب‌دهی تنها در مرحله کدگذاری. ممکن است روی همه ویدیوها کار نکند.", "transcoding_max_b_frames": "بیشترین B-frames", "transcoding_max_b_frames_description": "مقادیر بالاتر کارایی فشرده سازی را بهبود می‌بخشند، اما کدگذاری را کند می‌کنند. ممکن است با شتاب دهی سخت‌افزاری در دستگاه‌های قدیمی سازگار نباشد. مقدار( 0 ) B-frames را غیرفعال می‌کند، در حالی که مقدار ( 1 ) این مقدار را به صورت خودکار تنظیم می‌کند.", "transcoding_max_bitrate": "بیشترین بیت ریت", @@ -330,10 +421,20 @@ "transcoding_max_keyframe_interval": "حداکثر فاصله کلید فریم", "transcoding_max_keyframe_interval_description": "حداکثر فاصله فریم بین کلیدفریم‌ها را تنظیم می‌کند. مقادیر پایین‌تر کارایی فشرده‌سازی را کاهش می‌دهند، اما زمان جستجو را بهبود می‌بخشند و ممکن است کیفیت را در صحنه‌های با حرکت سریع بهبود دهند. مقدار 0 این مقدار را به‌طور خودکار تنظیم می‌کند.", "transcoding_optimal_description": "ویدیوهایی که از رزولوشن هدف بالاتر هستند یا در قالب پذیرفته شده نیستند", + "transcoding_policy": "سیاست تبدیل فرمت", + "transcoding_policy_description": "تعیین زمان تبدیل فرمت ویدیو", "transcoding_preferred_hardware_device": "دستگاه سخت‌افزاری ترجیحی", "transcoding_preferred_hardware_device_description": "این گزینه فقط به VAAPI و QSV اعمال می‌شود. DRI node مورد استفاده برای تبدیل فرمت سخت‌افزاری را تنظیم می‌کند.", "transcoding_preset_preset": "پیش‌تنظیم (preset-)", "transcoding_preset_preset_description": "سرعت فشرده‌سازی. پیش‌تنظیم‌های کندتر فایل‌های کوچک‌تری تولید می‌کنند و کیفیت را هنگام هدف‌گذاری بر روی یک بیت‌ریت خاص افزایش می‌دهند. VP9 سرعت‌های بالاتر از 'faster' را نادیده می‌گیرد.", + "transcoding_realtime": "تبدیل فرمت بلادرنگ [آزمایشی]", + "transcoding_realtime_description": "امکان تبدیل فرمت به‌صورت بلادرنگ در حین پخش ویدیو را فراهم می‌کند. این قابلیت تغییر کیفیت را ممکن می‌سازد، اما بسته به توان سرور، ممکن است باعث افزایش تأخیر در پخش و گیر کردن تصویر شود.", + "transcoding_realtime_enabled": "فعال‌سازی تبدیل فرمت بلادرنگ", + "transcoding_realtime_enabled_description": "در صورت غیرفعال بودن، سرور از شروع نشست‌های جدید تبدیل فرمت بلادرنگ خودداری خواهد کرد.", + "transcoding_realtime_resolutions": "وضوح‌های تصویری", + "transcoding_realtime_resolutions_description": "وضوح‌های ارائه‌شده برای تبدیل فرمت بلادرنگ. وضوح‌های بالاتر ممکن است در صورت ناتوانی سرور در تبدیل سریع آن‌ها، باعث مشکلات پخش شوند.", + "transcoding_realtime_video_codecs": "کدک‌های ویدیویی", + "transcoding_realtime_video_codecs_description": "کدک‌های ویدیویی ارائه‌شده برای تبدیل فرمت بلادرنگ. کلاینت‌ها در حین پخش، بهترین گزینه‌ای را که پشتیبانی می‌کنند انتخاب خواهند کرد. AV1 کارآمدتر از HEVC و HEVC کارآمدتر از H.264 است. هنگام استفاده از شتاب‌دهنده سخت‌افزاری، تنها کدک‌هایی را انتخاب کنید که شتاب‌دهنده توانایی رمزگذاری آن‌ها را دارد. در حالت تبدیل نرم‌افزاری، توجه داشته باشید که سرعت H.264 بیشتر از AV1 و سرعت AV1 بیشتر از HEVC است.", "transcoding_reference_frames": "فریم‌های مرجع", "transcoding_reference_frames_description": "تعداد فریم‌هایی که هنگام فشرده‌سازی یک فریم مشخص به آن‌ها ارجاع داده می‌شود. مقادیر بالاتر کارایی فشرده‌سازی را بهبود می‌بخشند، اما کدگذاری را کندتر می‌کنند. مقدار 0 این مقدار را به‌طور خودکار تنظیم می‌کند.", "transcoding_required_description": "فقط ویدیوهایی که در فرمت پذیرفته‌شده نیستند", @@ -345,9 +446,10 @@ "transcoding_temporal_aq_description": "این مورد فقط برای NVENC اعمال می شود. Temporal Adaptive Quantization کیفیت صحنه های با جزئیات بالا، تحرک کم را افزایش می دهد. ممکن است با دستگاه های قدیمی تر سازگار نباشد.", "transcoding_threads": "رشته ها ( موضوعات )", "transcoding_threads_description": "مقادیر بالاتر منجر به رمزگذاری سریع تر می شود، اما فضای کمتری برای پردازش سایر وظایف سرور در حین فعالیت باقی می گذارد. این مقدار نباید بیشتر از تعداد هسته های CPU باشد. اگر روی 0 تنظیم شود، بیشترین استفاده را خواهد داشت.", + "transcoding_tone_mapping": "تبدیل رنگ و نور (Tone-mapping)", "transcoding_tone_mapping_description": "تلاش برای حفظ ظاهر ویدیوهای HDR هنگام تبدیل به SDR. هر الگوریتم تعادل های متفاوتی را برای رنگ، جزئیات و روشنایی ایجاد می کند. Hable جزئیات را حفظ می کند، Mobius رنگ را حفظ می کند و Reinhard روشنایی را حفظ می کند.", "transcoding_transcode_policy": "سیاست رمزگذاری", - "transcoding_transcode_policy_description": "سیاست برای زمانی که ویدیویی باید مجددا تبدیل (رمزگذاری) شود. ویدیوهای HDR همیشه تبدیل (رمزگذاری) مجدد خواهند شد (مگر رمزگذاری مجدد غیرفعال باشد).", + "transcoding_transcode_policy_description": "سیاست زمان تبدیل فرمت ویدیو. ویدیوهای HDR و ویدیوهایی با فرمت پیکسلی غیر از YUV 4:2:0 همیشه تبدیل فرمت می‌شوند (مگر اینکه تبدیل فرمت غیرفعال باشد).", "transcoding_two_pass_encoding": "تبدیل (رمزگذاری) دو مرحله ای", "transcoding_two_pass_encoding_setting_description": "تبدیل (رمزگذاری) ویدیو در دو مرحله برای تولید ویدیوهای رمزگذاری شده بهتر. وقتی حداکثر نرخ بیت فعال باشد (برای کار با H.264 و HEVC لازم است)، این حالت از یک محدوده نرخ بیت بر اساس حداکثر نرخ بیت استفاده می کند و CRF را نادیده می گیرد. برای VP9، اگر حداکثر نرخ بیت غیرفعال باشد، می توان از CRF استفاده کرد.", "transcoding_video_codec": "Codec ویدیویی", @@ -364,7 +466,7 @@ "user_delete_delay": "{user}'s حساب کاربری و دارایی ها(عکس و فیلم) برای حذف دائمی در {delay, plural, one {# روز} other {# روز}} برنامه ریزی خواهند شد.", "user_delete_delay_settings": "تأخیر در حذف", "user_delete_delay_settings_description": "تعداد روزهایی که پس از حذف، حساب کاربری و دارایی های(عکس و فیلم) کاربر به طور دائمی حذف می شوند. کار حذف کاربر در نیمه شب اجرا می شود تا کاربرانی که آماده حذف هستند را بررسی کند. تغییرات در این تنظیم در اجرای بعدی ارزیابی خواهند شد.", - "user_delete_immediately": "{user}'s حساب کاربری و دارایی ها (عکس و فیلم) فوراً برای حذف دائمی در صف قرار خواهند گرفت.", + "user_delete_immediately": "{user} حساب کاربری و فایل‌هایش بلافاصله برای حذف دائمی در صف قرار خواهند گرفت.", "user_delete_immediately_checkbox": "کاربر و دارایی ها (عکس و فیلم) را برای حذف فوری در صف قرار بده", "user_details": "جزئیات کاربر", "user_management": "مدیریت کاربر", @@ -376,6 +478,8 @@ "user_settings_description": "مدیریت تنظیمات کاربر", "user_successfully_removed": "کاربر {email} با موفقیت حذف شد.", "users_page_description": "صفحه مدیریت کاربران", + "version_check_channel": "کانال انتشار", + "version_check_channel_description": "کانال انتشاری را انتخاب کنید که می‌خواهید اعلان‌های نسخه جدید را از آن دریافت نمایید", "version_check_enabled_description": "فعال‌سازی بررسی نسخه", "version_check_implications": "ویژگی بررسی نسخه به ارتباط دوره ای با {server} متکی است", "version_check_settings": "بررسی نسخه", @@ -387,25 +491,112 @@ "admin_password": "رمز عبور مدیر", "administration": "مدیریت", "advanced": "پیشرفته", + "advanced_settings_clear_image_cache": "پاک‌سازی حافظه پنهان تصاویر", + "advanced_settings_clear_image_cache_error": "خطا در پاک‌سازی حافظه پنهان تصاویر", + "advanced_settings_clear_image_cache_success": "پاک‌سازی موفقیت‌آمیز {size}", + "advanced_settings_log_level_title": "سطح گزارش‌دهی: {level}", + "advanced_settings_prefer_remote_subtitle": "برخی دستگاه‌ها در بارگذاری تصاویر بندانگشتی از منابع محلی بسیار کند عمل می‌کنند. این تنظیم را فعال کنید تا به جای آن، تصاویر از راه دور بارگذاری شوند.", + "advanced_settings_prefer_remote_title": "ترجیح تصاویر راه دور", + "advanced_settings_proxy_headers_subtitle": "هدرهای پراکسی که Immich باید با هر درخواست شبکه ارسال کند را تعریف کنید", "advanced_settings_proxy_headers_title": "هدر های پروکسی سفارشی [آزمایشی]", + "advanced_settings_readonly_mode_subtitle": "حالت فقط خواندنی را فعال می‌کند که در آن تصاویر تنها قابل مشاهده هستند و عملیاتی مانند انتخاب چندتایی، اشتراک‌گذاری، پخش روی صفحه دیگر و حذف غیرفعال می‌شوند. فعال/غیرفعال کردن این حالت از طریق آواتار کاربر در صفحه اصلی انجام می‌شود", + "advanced_settings_readonly_mode_title": "حالت فقط خواندنی", + "advanced_settings_sync_remote_deletions_subtitle": "به‌طور خودکار یک فایل را در این دستگاه حذف یا بازیابی کن، هنگامی که این عمل در نسخه وب انجام شود", + "advanced_settings_sync_remote_deletions_title": "همگام‌سازی حذف‌های راه دور [آزمایشی]", + "advanced_settings_tile_subtitle": "تنظیمات پیشرفته کاربر", + "advanced_settings_troubleshooting_subtitle": "فعال‌سازی ویژگی‌های اضافی برای عیب‌یابی", + "advanced_settings_troubleshooting_title": "عیب‌یابی", + "age_months": "سن {months, plural, one {# ماه} other {# ماه}}", + "age_year_months": "سن ۱ سال، {months, plural, one {# ماه} other {# ماه}}", + "age_years": "{years, plural, other {سن #}}", + "album": "آلبوم", "album_added": "آلبوم اضافه شد", + "album_added_notification_setting_description": "دریافت اعلان ایمیل هنگام افزوده شدن به یک آلبوم مشترک", "album_cover_updated": "جلد آلبوم به‌روزرسانی شد", + "album_delete_confirmation": "آیا از حذف آلبوم {album} اطمینان دارید؟", + "album_delete_confirmation_description": "اگر این آلبوم به اشتراک گذاشته شده باشد، سایر کاربران دیگر نمی‌توانند به آن دسترسی داشته باشند.", + "album_deleted": "آلبوم حذف شد", "album_info_updated": "اطلاعات آلبوم به‌روزرسانی شد", "album_name": "نام آلبوم", "album_options": "گزینه‌های آلبوم", + "album_remove_user": "حذف کاربر؟", + "album_remove_user_confirmation": "آیا از حذف {user} اطمینان دارید؟", + "album_search_not_found": "هیچ آلبومی مطابق با جستجوی شما یافت نشد", + "album_share_no_users": "به نظر می‌رسد این آلبوم را با همه کاربران به اشتراک گذاشته‌اید یا کاربری برای به اشتراک‌گذاری ندارید.", + "album_summary": "خلاصه آلبوم", "album_updated": "آلبوم به‌روزرسانی شد", + "album_updated_setting_description": "دریافت اعلان ایمیل هنگام افزودن فایل‌های جدید به آلبوم مشترک", + "album_upload_assets": "بارگذاری فایل‌ها از رایانه و افزودن به آلبوم", + "album_viewer_appbar_share_err_delete": "حذف آلبوم ناموفق بود", + "album_viewer_page_share_add_users": "افزودن کاربران", + "album_with_link_access": "اجازه دهید هر کسی با داشتن پیوند، تصاویر و افراد موجود در این آلبوم را مشاهده کند.", "albums": "آلبوم‌ها", + "albums_count": "{count, plural, one {{count, number} آلبوم} other {{count, number} آلبوم}}", + "albums_default_sort_order": "ترتیب پیش‌فرض مرتب‌سازی آلبوم", + "albums_default_sort_order_description": "ترتیب اولیه مرتب‌سازی فایل‌ها هنگام ایجاد آلبوم‌های جدید.", + "albums_feature_description": "مجموعه‌هایی از فایل‌ها که می‌توانند با سایر کاربران به اشتراک گذاشته شوند.", + "albums_on_device_count": "آلبوم‌های موجود در دستگاه ({count})", "all": "همه", + "all_albums": "همه آلبوم‌ها", "all_people": "همه افراد", + "all_photos": "همه تصاویر", + "all_videos": "همه ویدیوها", "allow_dark_mode": "اجازه دادن به حالت تاریک", + "allow_public_user_to_download": "اجازه دانلود به کاربر عمومی", + "allow_public_user_to_upload": "اجازه بارگذاری به کاربر عمومی", + "allowed": "مجاز", + "alt_text_qr_code": "تصویر کد QR", + "always_keep": "همیشه نگهداری شود", + "always_keep_photos_hint": "«آزادسازی فضای ذخیره‌سازی» تمام تصاویر را روی این دستگاه نگه می‌دارد.", + "always_keep_videos_hint": "«آزادسازی فضای ذخیره‌سازی» تمام ویدیوها را روی این دستگاه نگه می‌دارد.", "api_key": "کلید API", + "api_key_description": "این مقدار تنها یک بار نمایش داده می‌شود. لطفاً پیش از بستن پنجره، از کپی کردن آن اطمینان حاصل نمایید.", + "api_key_empty": "نام کلید API شما نباید خالی باشد", "api_keys": "کلیدهای API", + "app_architecture_variant": "نسخه (معماری)", + "app_bar_signout_dialog_content": "آیا از خروج اطمینان دارید؟", + "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": "بایگانی کردن یا خارج کردن تصویر از بایگانی", "archive_size": "اندازه بایگانی", + "archive_size_description": "پیکربندی حجم آرشیو برای دانلودها (بر حسب گیگابایت)", + "archived": "بایگانی‌شده", + "archived_count": "{count, plural, other {بایگانی‌شده #}}", + "are_these_the_same_person": "آیا این‌ها یک نفر هستند؟", + "are_you_sure_to_do_this": "آیا از انجام این عمل اطمینان دارید؟", + "asset_added_to_album": "به آلبوم اضافه شد", + "asset_adding_to_album": "در حال افزودن به آلبوم…", + "asset_created": "فایل ایجاد شد", + "asset_day_count": "{date}: {count, plural, one {# فایل} other {# فایل}}", + "asset_description_updated": "توضیحات فایل به‌روزرسانی شد", + "asset_hashing": "در حال هش‌سازی…", + "asset_list_group_by_sub_title": "گروه‌بندی بر اساس", + "asset_list_layout_settings_group_by": "گروه‌بندی فایل‌ها بر اساس", + "asset_list_layout_settings_group_by_month_day": "ماه + روز", + "asset_list_layout_sub_title": "طرح‌بندی", + "asset_list_settings_subtitle": "تنظیمات طرح‌بندی شبکه تصاویر", + "asset_list_settings_title": "شبکه تصاویر", + "asset_not_found_on_device_android": "فایل در دستگاه یافت نشد", + "asset_not_found_on_device_ios": "فایل در دستگاه یافت نشد. اگر از iCloud استفاده می‌کنید، ممکن است فایل به دلیل ذخیره‌سازی نادرست در iCloud غیرقابل دسترسی باشد", + "asset_not_found_on_icloud": "فایل در iCloud یافت نشد. ممکن است فایل به دلیل ذخیره‌سازی نادرست در iCloud غیرقابل دسترسی باشد", "asset_offline": "محتوا آفلاین", + "asset_offline_description": "این فایل خارجی دیگر در دیسک یافت نمی‌شود. لطفاً برای دریافت کمک با مدیر Immich خود تماس بگیرید.", + "asset_skipped": "رد شد", + "asset_skipped_in_trash": "در سطل زباله", + "asset_troubleshoot": "عیب‌یابی فایل", + "asset_uploaded": "بارگذاری شد", + "asset_uploading": "در حال بارگذاری…", + "asset_viewer_settings_subtitle": "مدیریت تنظیمات نمایشگر گالری شما", + "asset_viewer_settings_title": "نمایشگر فایل", "assets": "محتواها", + "assets_added_to_album_count": "{count, plural, one {# فایل} other {# فایل}} به آلبوم اضافه شد", "authorized_devices": "دستگاه‌های مجاز", "back": "بازگشت", "backward": "عقب", @@ -420,7 +611,7 @@ "change_date": "تغییر تاریخ", "change_location": "تغییر مکان", "change_name": "تغییر نام", - "change_name_successfully": "نام با موفقیت تغییر یافت", + "change_name_successfully": "تغییر نام با موفقیت انجام شد", "change_password": "تغییر رمز عبور", "change_password_form_password_mismatch": "رمز عبور ها مطابقت ندارند", "change_password_form_reenter_new_password": "تکرار رمز عبور جدید", @@ -573,7 +764,7 @@ "loading_search_results_failed": "بارگذاری نتایج جستجو ناموفق بود", "log_out": "خروج از سیستم", "log_out_all_devices": "خروج از همه دستگاه‌ها", - "login_has_been_disabled": "ورود غیرفعال شده است.", + "login_has_been_disabled": "ورود غیرفعال شده است", "look": "نگاه کردن", "loop_videos": "پخش مداوم ویدئوها", "main_branch_warning": "شما در حال استفاده از نسخه توسعه‌دهندگان هستید که آزمایشی و ناپایدار است. اکیداً توصیه می‌کنیم از نسخه رسمی استفاده کنید!", @@ -629,7 +820,7 @@ "next_memory": "خاطره بعدی", "no": "خیر", "no_duplicates_found": "هیچ تکراری یافت نشد.", - "no_exif_info_available": "اطلاعات EXIF موجود نیست", + "no_exif_info_available": "اطلاعات exif موجود نیست", "no_name": "بدون نام", "no_places": "مکانی یافت نشد", "no_results": "نتیجه‌ای یافت نشد", @@ -638,6 +829,7 @@ "notification_toggle_setting_description": "اعلان‌های ایمیلی را فعال کنید", "notifications": "اعلان‌ها", "notifications_setting_description": "مدیریت اعلان‌ها", + "oauth": "احراز هویت OAuth", "offline": "آفلاین", "ok": "تأیید", "oldest_first": "قدیمی‌ترین ابتدا", @@ -686,7 +878,7 @@ "preview": "پیش‌نمایش", "previous": "قبلی", "previous_memory": "خاطره قبلی", - "previous_or_next_photo": "عکس قبلی یا بعدی", + "previous_or_next_photo": "عکس بعدی/قبلی", "primary": "اصلی", "profile_picture_set": "تصویر پروفایل تنظیم شد.", "public_share": "اشتراک عمومی", @@ -823,5 +1015,6 @@ "welcome": "خوش آمدید", "year": "سال", "yes": "بله", + "zero_to_clear_rating": "برای پاک کردن امتیاز فایل، کلید ۰ را فشار دهید", "zoom_image": "بزرگنمایی تصویر" } diff --git a/i18n/fi.json b/i18n/fi.json index 95fd8fc0aa..6fcd8e5e06 100644 --- a/i18n/fi.json +++ b/i18n/fi.json @@ -767,7 +767,6 @@ "custom_date": "Mukautettu päivä", "custom_locale": "Mukautettu alueasetus", "custom_locale_description": "Muotoile päivämäärät, kellonajat ja numerot valitun kielen ja alueen mukaan", - "custom_url": "Mukautettu URL", "cutoff_date_description": "Säilytä kuvat viimeisimmältä…", "cutoff_day": "{count, plural, one {päivä} other {päivää}}", "cutoff_year": "{count, plural, one {vuosi} other {vuotta}}", diff --git a/i18n/fr.json b/i18n/fr.json index e902cbf95e..4d2be831cd 100644 --- a/i18n/fr.json +++ b/i18n/fr.json @@ -5,7 +5,7 @@ "acknowledge": "Compris", "action": "Action", "action_common_update": "Mettre à jour", - "action_description": "Un ensemble d'actions applicables sur des médias filtrés", + "action_description": "Un ensemble d'actions à exécuter sur les médias filtrés", "actions": "Actions", "active": "En cours", "active_count": "En cours : {count}", @@ -13,11 +13,11 @@ "add": "Ajouter", "add_a_description": "Ajouter une description", "add_a_location": "Ajouter une localisation", - "add_a_name": "Ajouter un nom", + "add_a_name": "Ajouter un prénom", "add_a_title": "Ajouter un titre", "add_action": "Ajouter une action", "add_assets": "Ajouter des médias", - "add_birthday": "Ajouter un anniversaire", + "add_birthday": "Ajouter la date d'anniversaire", "add_endpoint": "Ajouter une adresse", "add_exclusion_pattern": "Ajouter un schéma d'exclusion", "add_location": "Ajouter une localisation", @@ -33,7 +33,7 @@ "add_to_albums": "Ajouter aux albums", "add_to_albums_count": "Ajouter aux albums ({count})", "add_to_bottom_bar": "Ajouter à", - "add_upload_to_stack": "Ajouter les éléments téléversés à la pile", + "add_upload_to_stack": "Ajouter les éléments envoyés à la pile", "add_url": "Ajouter l'URL", "added_to_archive": "Ajouté à l'archive", "added_to_favorites": "Ajouté aux favoris", @@ -53,7 +53,7 @@ "backup_onboarding_1_description": "copie hors site dans le cloud ou sur un site distant.", "backup_onboarding_2_description": "copies locales sur différents appareils. Cela inclut les fichiers principaux ainsi qu'une sauvegarde locale de ces fichiers.", "backup_onboarding_3_description": "copies total de vos données, incluant les fichiers originaux. Cela inclut 1 copie hors site ainsi que 2 copies locales.", - "backup_onboarding_description": "Une stratégie de sauvegarde 3-2-1 est recommandée pour protéger vos données. Vous devriez conserver des copies de vos photos/vidéos téléversés ainsi que de la base de données d'Immich pour une solution de sauvegarde cohérente.", + "backup_onboarding_description": "Une stratégie de sauvegarde 3-2-1 est recommandée pour protéger vos données. Vous devriez conserver des copies de vos photos/vidéos envoyées ainsi que de la base de données d'Immich pour une solution de sauvegarde cohérente.", "backup_onboarding_footer": "Pour plus d'information sur la sauvegarde d'Immich, merci de vous référer à la documentation.", "backup_onboarding_parts_title": "Une sauvegarde 3-2-1 inclut :", "backup_onboarding_title": "Sauvegardes", @@ -108,6 +108,21 @@ "image_thumbnail_quality_description": "Qualité des miniatures : de 1 à 100. Une valeur élevée produit de meilleurs résultats, mais elle produit des fichiers plus volumineux et peut réduire la réactivité de l'application.", "image_thumbnail_title": "Paramètres des miniatures", "import_config_from_json_description": "Importer la configuration système en envoyant un fichier de configuration JSON", + "integrity_checks_checksum_files": "Vérifier l'intégrité des fichiers", + "integrity_checks_checksum_files_description": "Configurer le test d'intégrité", + "integrity_checks_checksum_files_enable_description": "Active le test d'intégrité des fichiers (checksum)", + "integrity_checks_checksum_files_percentage_limit": "Limite de pourcentage", + "integrity_checks_checksum_files_percentage_limit_description": "Configurez le pourcentage maximal du test d'intégrité qui doit être effectué à chaque interval, entre 0.01 et 1.", + "integrity_checks_checksum_files_time_limit": "Limite de temps", + "integrity_checks_checksum_files_time_limit_description": "Configurez la durée maximale en millisecondes entre deux vérifications.", + "integrity_checks_missing_files": "Fichiers manquants", + "integrity_checks_missing_files_description": "Configurez la fréquence et activez/désactivez la vérification des fichiers manquants", + "integrity_checks_missing_files_enable_description": "Activez la vérification des fichiers manquants", + "integrity_checks_settings": "Tests d'intégrité", + "integrity_checks_settings_description": "Gérez l'interval des tests d'intégrité", + "integrity_checks_untracked_files": "Fichiers non suivis", + "integrity_checks_untracked_files_description": "Configurez la fréquence et activez/désactivez la vérification des fichiers non suivis", + "integrity_checks_untracked_files_enable_description": "Activez la vérification des fichiers non suivis", "job_concurrency": "{job} : nombre de tâches simultanées", "job_created": "Tâche créée", "job_not_concurrency_safe": "Cette tâche ne peut pas être exécutée en multitâche de façon sûre.", @@ -171,7 +186,7 @@ "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", - "machine_learning_ocr_min_detection_score_description": "Score de confiance minimum pour la détection du textew entre 0 et 1. Des valeurs faibles permettront de reconnaître davantage de texte mais peuvent entraîner des faux positifs.", + "machine_learning_ocr_min_detection_score_description": "Score de confiance minimum pour la détection du texte, entre 0 et 1. Des valeurs faibles permettront de reconnaître davantage de texte mais peuvent entraîner des faux positifs.", "machine_learning_ocr_min_recognition_score": "Score de reconnaissance minimum", "machine_learning_ocr_min_score_recognition_description": "Score de confiance minimum pour la reconnaissance du texte, entre 0 et 1. Des valeurs faible permettront de reconnaître davantage de texte, mais peuvent entraîner des faux positifs.", "machine_learning_ocr_model": "Modèle de Reconnaissance Optique de Caractères OCR", @@ -214,8 +229,8 @@ "maintenance_start_error": "Échec du démarrage du mode maintenance.", "maintenance_upload_backup": "Télécharger le fichier de sauvegarde de la base de données", "maintenance_upload_backup_error": "Impossible de télécharger la sauvegarde, s'agit-il d'un fichier .sql/.sql.gz ?", - "manage_concurrency": "Gérer du multitâche", - "manage_concurrency_description": "Naviguer vers la pages des tâches pour gérer le multitâche", + "manage_concurrency": "Gestion du multitâche", + "manage_concurrency_description": "Naviguer vers la page des tâches pour gérer le multitâche", "manage_log_settings": "Gérer les paramètres de journalisation", "map_dark_style": "Thème sombre", "map_enable_description": "Activer la carte", @@ -416,6 +431,10 @@ "transcoding_realtime_description": "Permet au transcodage d'être réalisé en temps réel durant la diffusion du flux de la vidéo. Active la bascule automatique entre résolutions, mais peut entraîner une latence importante de lecture et des microcoupures en fonction des capacités du serveur.", "transcoding_realtime_enabled": "Activer la transcodification en temps réel", "transcoding_realtime_enabled_description": "Si désactivé, le serveur refusera de démarrer de nouvelles sessions de transcodifications en temps réel.", + "transcoding_realtime_resolutions": "Résolutions", + "transcoding_realtime_resolutions_description": "Les résolutions proposées pour le transcodage en temps réel. Des résolutions supérieures peuvent causer des soucis pendant la lecture si le serveur ne peut pas les transcoder suffisamment rapidement.", + "transcoding_realtime_video_codecs": "Codecs vidéo", + "transcoding_realtime_video_codecs_description": "Les codecs vidéo proposés pour le transcodage en temps réel. Les clients choisissent la meilleure option qu'ils supportent durant la lecture. AV1 est plus efficace que HEVC, qui est plus efficace que H.264. En utilisant l'accélération matérielle, sélectionnez seulement les codecs que l'accélérateur peut encoder. En utilisant le transcodage logiciel, notez que H.264 est plus rapide que AV1, qui est plus rapide que HEVC.", "transcoding_reference_frames": "Trames de référence", "transcoding_reference_frames_description": "Le nombre d'images à prendre en référence lors de la compression d'une image donnée. Des valeurs élevées améliorent l'efficacité de la compression, mais ralentissent l'encodage. 0 fixe cette valeur automatiquement.", "transcoding_required_description": "Seulement les vidéos dans un format non accepté", @@ -507,7 +526,7 @@ "album_summary": "Résumé de l'album", "album_updated": "Album mis à jour", "album_updated_setting_description": "Recevoir une notification par courriel lorsqu'un album partagé a de nouveaux médias", - "album_upload_assets": "Téléchargez des fichiers depuis votre ordinateur et ajoutez-les à l'album", + "album_upload_assets": "Envoyez des fichiers depuis votre ordinateur et ajoutez-les à l'album", "album_viewer_appbar_share_err_delete": "Échec de la suppression de l'album", "album_viewer_page_share_add_users": "Ajouter des utilisateurs", "album_with_link_access": "Permettre à n'importe qui possédant le lien de voir les photos et les personnes de cet album.", @@ -578,6 +597,7 @@ "asset_viewer_settings_title": "Visualiseur d'éléments", "assets": "Médias", "assets_added_to_album_count": "{count, plural, one {# média ajouté} other {# médias ajoutés}} à l'album", + "assets_added_to_album_partial_count": "{successCount} {totalCount, plural, one {ajouté} other {ajoutés}} parmi {totalCount} {totalCount, plural, one {média} other {médias}} à l'album", "assets_added_to_albums_count": "{assetTotal, plural, one {# média ajouté} other {# médias ajoutés}} à {albumTotal, plural, one {# album} other {# albums}}", "assets_cannot_be_added_to_album_count": "{count, plural, one {Le média ne peut pas être ajouté} other {Les médias ne peuvent pas être ajoutés}} à l'album", "assets_cannot_be_added_to_albums": "{count, plural, one {Le média ne peut être ajouté} other {Les médias ne peuvent être ajoutés}} à aucun des albums", @@ -794,7 +814,6 @@ "custom_date": "Date personnalisée", "custom_locale": "Paramètres régionaux personnalisés", "custom_locale_description": "Formater les dates, heures et nombres en fonction de la langue sélectionnée et de la région", - "custom_url": "URL personnalisée", "cutoff_date_description": "Conservez les photos depuis les derniers…", "cutoff_day": "{count, plural, one {jour} other {jours}}", "cutoff_year": "{count, plural, one {année} other {années}}", @@ -1461,6 +1480,7 @@ "never": "Jamais", "new_album": "Nouvel Album", "new_api_key": "Nouvelle clé API", + "new_feature": "Nouvelle fonctionnalité", "new_password": "Nouveau mot de passe", "new_person": "Nouvelle personne", "new_pin_code": "Nouveau code PIN", @@ -1504,6 +1524,7 @@ "not_available": "N/A", "not_in_any_album": "Dans aucun album", "not_selected": "Non sélectionné", + "not_set": "Non défini", "notes": "Notes", "nothing_here_yet": "Rien pour le moment", "notification_backup_reliability": "Activer les notifications pour améliorer la fiabilité de la sauvegarde en arrière-plan", @@ -1521,6 +1542,8 @@ "obtainium_configurator": "Configuration pour Obtainium", "obtainium_configurator_instructions": "Utilisez Obtainium pour installer et mettre à jour l'application Android directement depuis la version d'Immich sur Github. Créez une clé d'API et sélectionnez une variante pour créer votre lien de configuration pour Obtainium", "ocr": "Reconnaissance Optique de Caractères OCR", + "ocr_body": "Immich peut désormais lire le texte dans vos photos, pour que vous puissiez les chercher dans votre galerie par ce qu'elles disent.", + "ocr_title": "Cherchez le texte dans vos photos", "official_immich_resources": "Ressources Immich officielles", "offline": "Hors ligne", "offset": "Décalage", @@ -1539,6 +1562,8 @@ "open": "Ouvrir", "open_calendar": "Ouvrir le calendrier", "open_in_browser": "Ouvrir dans le navigateur", + "open_in_immich_body": "Définissez Immich comme vote application de gallerie par défaut sur Android pour ouvrir vos photos directement depuis les autres applications.", + "open_in_immich_title": "Ouvrir les photos dans Immich", "open_in_map_view": "Montrer sur la carte", "open_in_openstreetmap": "Ouvrir dans OpenStreetMap", "open_the_search_filters": "Ouvrir les filtres de recherche", @@ -1596,7 +1621,7 @@ "person": "Personne", "person_age_months": "{months, plural, one {# mois} other {# mois}}", "person_age_year_months": "1 an, {months, plural, one {# mois} other {# mois}}", - "person_age_years": "{years, plural, other {# ans}}", + "person_age_years": "{years, plural, one {# an} other {# ans}}", "person_birthdate": "Né(e) le {date}", "person_hidden": "{name}{hidden, select, true { (caché)} other {}}", "person_recognized": "Personne reconnue", @@ -1697,7 +1722,10 @@ "recent": "Récent", "recent_searches": "Recherches récentes", "recently_added": "Récemment ajouté", + "recently_added_body": "Allez directement à ce que vous avez ajouté récemment dans une page dédiée.", + "recently_added_description": "Naviguez dans vos médias, triés par date d'envoi dans Immich", "recently_added_page_title": "Récemment ajouté", + "recently_added_title": "Ajouté récemment", "recently_taken": "Récemment photographié", "refresh": "Actualiser", "refresh_encoded_videos": "Actualiser les vidéos encodées", @@ -1904,6 +1932,8 @@ "share_link": "Partager le lien", "share_original": "Utiliser l'originale (grand)", "share_preview": "Utiliser la miniature (petite)", + "share_quality_body": "Appuyez longtemps sur le bouton partager pour choisir la qualité d'image avant de partager.", + "share_quality_title": "Choisissez votre qualité d'envoi", "shared": "Partagé", "shared_album_activities_input_disable": "Les commentaires sont désactivés", "shared_album_activity_remove_content": "Souhaitez-vous supprimer cette activité ?", @@ -1918,7 +1948,9 @@ "shared_link_app_bar_title": "Liens partagés", "shared_link_clipboard_copied_massage": "Copié dans le presse-papier", "shared_link_create_error": "Erreur pendant la création du lien partagé", - "shared_link_custom_url_description": "Accéder à ce lien partagé avec une URL personnalisée", + "shared_link_custom_url_description": "Accéder à ce lien partagé avec un nom d'URL personnalisée", + "shared_link_custom_url_title": "URL personnalisée", + "shared_link_custom_url_warning": "Attention: un nom d'URL personnalisé contenant un slash (/) pourrait ne pas se comporter comme prévu.", "shared_link_edit_description_hint": "Saisir la description du partage", "shared_link_edit_expire_after_option_day": "1 jour", "shared_link_edit_expire_after_option_days": "{count} jours", @@ -1985,16 +2017,19 @@ "sign_out": "Déconnexion", "sign_up": "S'enregistrer", "size": "Taille", + "skip": "Passer", "skip_to_content": "Passer", "skip_to_folders": "Passer vers les dossiers", "skip_to_tags": "Passer vers les étiquettes", "slideshow": "Diaporama", + "slideshow_body": "Relaxez-vous et regardez vos photos dans un diaporama en plein écran.", "slideshow_metadata_overlay_mode": "Contenu en superposition", "slideshow_metadata_overlay_mode_description_only": "Seulement la description", "slideshow_metadata_overlay_mode_full": "Tout", "slideshow_repeat": "Répéter le diaporama", "slideshow_repeat_description": "Reboucler au début lorsque le diaporama se termine", "slideshow_settings": "Paramètres du diaporama", + "slideshow_title": "Diaporama", "smart_album": "Album intelligent", "some_assets_already_have_a_location_warning": "Certains médias sélectionnés ont déjà une localisation", "sort_albums_by": "Trier les albums par...", @@ -2122,6 +2157,7 @@ "unknown": "Inconnu", "unknown_country": "Pays non connu", "unknown_date": "Date inconnue", + "unknown_schema": "Schéma inconnu", "unknown_year": "Année inconnue", "unlimited": "Illimité", "unlink_motion_video": "Détacher la photo animée", @@ -2157,6 +2193,8 @@ "upload_status_errors": "Erreurs", "upload_status_uploaded": "Envoyé", "upload_success": "Envoi réussi. Rafraîchissez la page pour voir les nouveaux médias envoyés.", + "upload_to_album_body": "Pour les utilisateurs qui n'utilise pas la fonctionnalité de mise en ligne manuelle, vous pouvez maintenant ajouter vos photos locales directement dans un album, plus besoin de mettre en ligne puis de déplacer dans un album après.", + "upload_to_album_title": "Mettre en ligne directement dans un album", "upload_to_immich": "Envoyer vers Immich ({count})", "uploading": "Envoi", "uploading_media": "Envoi du média", @@ -2224,6 +2262,9 @@ "week": "Semaine", "welcome": "Bienvenue", "welcome_to_immich": "Bienvenue sur Immich", + "whats_new": "Quoi de neuf", + "whats_new_settings_subtitle": "Découvrez les nouveautés dans Immich", + "whats_new_version": "Version {version}", "when": "Quand", "width": "Largeur", "wifi_name": "Nom du réseau wifi", diff --git a/i18n/ga.json b/i18n/ga.json index c8c4bd70c4..e64ba9b16f 100644 --- a/i18n/ga.json +++ b/i18n/ga.json @@ -108,6 +108,21 @@ "image_thumbnail_quality_description": "Cáilíocht mionsamhlacha ó 1-100. Is airde an caighdeán is fearr, ach cruthaíonn sé comhaid níos mó agus d'fhéadfadh sé freagrúlacht an aip a laghdú.", "image_thumbnail_title": "Socruithe Mionsamhail", "import_config_from_json_description": "Cumraíocht chórais a allmhairiú trí chomhad cumraíochta JSON a uaslódáil", + "integrity_checks_checksum_files": "Comhaid seiceála", + "integrity_checks_checksum_files_description": "Cumraigh an tseiceáil suime seiceála", + "integrity_checks_checksum_files_enable_description": "Cumasaigh an tseiceáil suime seiceála", + "integrity_checks_checksum_files_percentage_limit": "Teorainn céatadáin", + "integrity_checks_checksum_files_percentage_limit_description": "Cumraigh an céatadán uasta idir 0.01 agus 1 do cé mhéad ba chóir don tseiceáil suime seiceála a rith gach eatramh.", + "integrity_checks_checksum_files_time_limit": "Teorainn ama", + "integrity_checks_checksum_files_time_limit_description": "Cumraigh an fad uasta ar cheart don tseiceáil suime seiceála a bheith ar siúl le gach eatramh. (ms)", + "integrity_checks_missing_files": "Comhaid ar iarraidh", + "integrity_checks_missing_files_description": "Cumraigh an minicíocht agus cumasaigh nó díchumasaigh an seiceáil comhad atá ar iarraidh", + "integrity_checks_missing_files_enable_description": "Cumasaigh an seiceáil comhad atá ar iarraidh", + "integrity_checks_settings": "Seiceálacha ionracais", + "integrity_checks_settings_description": "Bainistigh eatraimh seiceálacha sláine", + "integrity_checks_untracked_files": "Comhaid neamhrianaithe", + "integrity_checks_untracked_files_description": "Cumraigh an minicíocht agus cumasaigh nó díchumasaigh an seiceáil comhad neamhrianaithe", + "integrity_checks_untracked_files_enable_description": "Cumasaigh an seiceáil comhad neamhrianaithe", "job_concurrency": "comhthráthacht {job}", "job_created": "Post cruthaithe", "job_not_concurrency_safe": "Níl an post seo sábháilte le haghaidh comhuaineachta.", @@ -416,6 +431,10 @@ "transcoding_realtime_description": "Ceadaíonn sé traschódú a dhéanamh i bhfíor-am agus an físeán á shruthú. Cumasaíonn sé athrú cáilíochta, ach d'fhéadfadh moill athsheinm níos airde agus stad a bheith mar thoradh air ag brath ar chumais an fhreastalaí.", "transcoding_realtime_enabled": "Cumasaigh tras-chódú fíor-ama", "transcoding_realtime_enabled_description": "Mura bhfuil sé cumasaithe, diúltóidh an freastalaí seisiúin thraschódaithe fíor-ama nua a thosú.", + "transcoding_realtime_resolutions": "Rúin", + "transcoding_realtime_resolutions_description": "Na taifigh a thairgtear le haghaidh traschódú fíor-ama. D’fhéadfadh fadhbanna athsheinm a bheith mar thoradh ar taifigh níos airde mura féidir leis an bhfreastalaí iad a thraschódú go tapa go leor.", + "transcoding_realtime_video_codecs": "Cóideic físe", + "transcoding_realtime_video_codecs_description": "Na cóideiceanna físe a thairgtear le haghaidh traschódú fíor-ama. Roghnóidh cliaint an rogha is fearr a dtacaíonn siad leis le linn athsheinm. Tá AV1 níos éifeachtaí ná HEVC, atá níos éifeachtaí ná H.264. Agus luasghéarú crua-earraí in úsáid agat, roghnaigh na cóideiceanna is féidir leis an luasaire a ionchódú amháin. Agus traschódú bogearraí in úsáid agat, tabhair faoi deara go bhfuil H.264 níos tapúla ná AV1, atá níos tapúla ná HEVC.", "transcoding_reference_frames": "Frámaí tagartha", "transcoding_reference_frames_description": "Líon na bhfrámaí le tagairt dóibh agus fráma áirithe á chomhbhrú. Feabhsaíonn luachanna níos airde éifeachtúlacht an chomhbhrúite, ach moillíonn siad an ionchódú. Socraíonn 0 an luach seo go huathoibríoch.", "transcoding_required_description": "Físeáin amháin nach bhfuil i bhformáid inghlactha", @@ -578,6 +597,7 @@ "asset_viewer_settings_title": "Amharcóir Sócmhainní", "assets": "Sócmhainní", "assets_added_to_album_count": "Cuireadh {count, plural, one {# asset} other {# assets}} leis an albam", + "assets_added_to_album_partial_count": "Cuireadh {successCount} as {totalCount} {totalCount, plural, one {asset} other {assets}} leis an albam", "assets_added_to_albums_count": "Cuireadh {assetTotal, plural, one {# sócmhainn} other {# sócmhainní}} go {albumTotal, plural, one {# albam} other {# albaim}}", "assets_cannot_be_added_to_album_count": "Ní féidir {count, plural, one {Sócmhainn} other {Sócmhainní}} a chur leis an albam", "assets_cannot_be_added_to_albums": "Ní féidir {count, plural, one {Asset} other {Assets}} a chur le haon cheann de na halbaim", @@ -794,7 +814,6 @@ "custom_date": "Dáta saincheaptha", "custom_locale": "Logán saincheaptha", "custom_locale_description": "Formáidigh dátaí, amanna agus uimhreacha bunaithe ar an teanga agus an réigiún roghnaithe", - "custom_url": "URL Saincheaptha", "cutoff_date_description": "Coinnigh grianghraif ón uair dheireanach…", "cutoff_day": "{count, plural, one {lá} other {laethanta}}", "cutoff_year": "{count, plural, one {bliain} other {blianta}}", @@ -1303,9 +1322,9 @@ "login_form_failed_login": "Earráid ag logáil isteach, seiceáil URL an fhreastalaí, an ríomhphost agus an focal faire", "login_form_handshake_exception": "Bhí Eisceacht Lámh-Chroith leis an bhfreastalaí. Cumasaigh tacaíocht do theastas féinshínithe sna socruithe má tá teastas féinshínithe in úsáid agat.", "login_form_password_hint": "pasfhocal", - "login_form_server_empty": "Cuir isteach URL freastalaí.", - "login_form_server_error": "Níorbh fhéidir ceangal leis an bhfreastalaí.", - "login_has_been_disabled": "Tá logáil isteach díchumasaithe.", + "login_form_server_empty": "Cuir isteach URL freastalaí", + "login_form_server_error": "Níorbh fhéidir ceangal leis an bhfreastalaí", + "login_has_been_disabled": "Tá logáil isteach díchumasaithe", "login_password_changed_error": "Tharla earráid agus do phasfhocal á nuashonrú", "login_password_changed_success": "Nuashonraíodh an focal faire go rathúil", "logout_all_device_confirmation": "An bhfuil tú cinnte gur mian leat logáil amach as gach gléas?", @@ -1356,6 +1375,7 @@ "map_location_picker_page_use_location": "Úsáid an suíomh seo", "map_location_service_disabled_content": "Ní mór seirbhís suímh a chumasú chun sócmhainní ó do shuíomh reatha a thaispeáint. Ar mhaith leat é a chumasú anois?", "map_location_service_disabled_title": "Seirbhís Suímh díchumasaithe", + "map_marker_for_image": "Marcóir léarscáile don íomhá a tógadh i {city}, {country}", "map_marker_with_image": "Marcóir léarscáile le híomhá", "map_no_location_permission_content": "Tá cead suímh ag teastáil chun sócmhainní a thaispeáint ó do shuíomh reatha. Ar mhaith leat é a cheadú anois?", "map_no_location_permission_title": "Cead Suímh diúltaithe", @@ -1460,6 +1480,7 @@ "never": "Choíche", "new_album": "Albam Nua", "new_api_key": "Eochair API Nua", + "new_feature": "Gné Nua", "new_password": "Pasfhocal nua", "new_person": "Duine nua", "new_pin_code": "Cód PIN nua", @@ -1503,9 +1524,13 @@ "not_available": "N/B", "not_in_any_album": "Ní in aon albam", "not_selected": "Níor roghnaíodh", + "not_set": "Gan socrú", "notes": "Nótaí", "nothing_here_yet": "Níl aon rud anseo fós", "notification_backup_reliability": "Cumasaigh fógraí chun iontaofacht cúltaca cúlra a fheabhsú", + "notification_enabled_list_tile_content": "Úsáideann Immich fógraí le haghaidh cúltaca cúlra. Bainistigh iad i socruithe do ghléis.", + "notification_enabled_list_tile_open_button": "Oscail socruithe", + "notification_enabled_list_tile_title": "Fógraí cumasaithe", "notification_permission_dialog_content": "Chun fógraí a chumasú, téigh go Socruithe agus roghnaigh ceadaigh.", "notification_permission_list_tile_content": "Tabhair cead fógraí a chumasú.", "notification_permission_list_tile_enable_button": "Cumasaigh Fógraí", @@ -1517,6 +1542,8 @@ "obtainium_configurator": "Cumraitheoir Obtainium", "obtainium_configurator_instructions": "Bain úsáid as Obtainium chun an aip Android a shuiteáil agus a nuashonrú go díreach ó eisiúint Immich ar GitHub. Cruthaigh eochair API agus roghnaigh malairt chun do nasc cumraíochta Obtainium a chruthú", "ocr": "OCR", + "ocr_body": "Léann Immich an téacs taobh istigh de do ghrianghraif anois, ionas gur féidir leat iad a chuardach de réir a bhfuil iontu.", + "ocr_title": "Cuardaigh téacs i do ghrianghraif", "official_immich_resources": "Acmhainní Oifigiúla Immich", "offline": "As líne", "offset": "Fritháireamh", @@ -1535,6 +1562,8 @@ "open": "Oscail", "open_calendar": "Oscail an féilire", "open_in_browser": "Oscail sa bhrabhsálaí", + "open_in_immich_body": "Socraigh Immich mar do ghailearaí ar Android chun grianghraif a oscailt go díreach ó aipeanna eile.", + "open_in_immich_title": "Oscail grianghraif in Immich", "open_in_map_view": "Oscail i radharc léarscáile", "open_in_openstreetmap": "Oscail in OpenStreetMap", "open_the_search_filters": "Oscail na scagairí cuardaigh", @@ -1592,7 +1621,7 @@ "person": "Duine", "person_age_months": "{months, plural, one {# mí} other {# míonna}} d'aois", "person_age_year_months": "1 bhliain, {months, plural, one {# mí} other {# míonna}} d'aois", - "person_age_years": "{years, plural, other {# blianta}} d'aois", + "person_age_years": "{years, plural, one {# bliain} other {# blianta}} d'aois", "person_birthdate": "Rugadh ar {date}", "person_hidden": "{name}{hidden, select, true { (i bhfolach)} other {}}", "person_recognized": "Duine aitheanta", @@ -1693,7 +1722,10 @@ "recent": "Le déanaí", "recent_searches": "Cuardaigh le déanaí", "recently_added": "Cuireadh leis le déanaí", + "recently_added_body": "Léim díreach chuig gach rud a chuir tú leis le déanaí ar leathanach tiomnaithe.", + "recently_added_description": "Brabhsáil do shócmhainní, sórtáilte de réir cathain a uaslódáladh iad chuig Immich", "recently_added_page_title": "Curtha leis le Déanaí", + "recently_added_title": "Cuireadh leis le déanaí", "recently_taken": "Tógtha le déanaí", "refresh": "Athnuachan", "refresh_encoded_videos": "Athnuaigh físeáin ionchódaithe", @@ -1900,6 +1932,8 @@ "share_link": "Comhroinn an Nasc", "share_original": "Úsáid an bunleagan (mór)", "share_preview": "Úsáid mionsamhail (beag)", + "share_quality_body": "Brúigh agus coinnigh an cnaipe comhroinnte chun cáilíocht na híomhá a roghnú sula roinneann tú.", + "share_quality_title": "Roghnaigh do cháilíocht roinnte", "shared": "Roinnte", "shared_album_activities_input_disable": "Tá trácht díchumasaithe", "shared_album_activity_remove_content": "Ar mhaith leat an ghníomhaíocht seo a scriosadh?", @@ -1914,7 +1948,9 @@ "shared_link_app_bar_title": "Naisc Chomhroinnte", "shared_link_clipboard_copied_massage": "Cóipeáilte chuig an ghearrthaisce", "shared_link_create_error": "Earráid agus nasc comhroinnte á chruthú", - "shared_link_custom_url_description": "Rochtain a fháil ar an nasc comhroinnte seo le URL saincheaptha", + "shared_link_custom_url_description": "Rochtain a fháil ar an nasc comhroinnte seo le hainm URL saincheaptha", + "shared_link_custom_url_title": "URL Saincheaptha", + "shared_link_custom_url_warning": "Rabhadh: b’fhéidir nach n-iompróidh ainm URL saincheaptha le slais ar aghaidh mar a bheifeá ag súil leis.", "shared_link_edit_description_hint": "Cuir isteach cur síos an chomhroinnte", "shared_link_edit_expire_after_option_day": "1 lá", "shared_link_edit_expire_after_option_days": "{count} lá", @@ -1981,16 +2017,19 @@ "sign_out": "Sínigh Amach", "sign_up": "Cláraigh", "size": "Méid", + "skip": "Léim", "skip_to_content": "Léim go dtí an t-ábhar", "skip_to_folders": "Léim go dtí na fillteáin", "skip_to_tags": "Léim go dtí na clibeanna", "slideshow": "Sleamhnán", + "slideshow_body": "Suigh siar agus féach ar do ghrianghraif ag seinm i sleamhnán lánscáileáin.", "slideshow_metadata_overlay_mode": "Ábhar forleagan", "slideshow_metadata_overlay_mode_description_only": "Cur síos amháin", "slideshow_metadata_overlay_mode_full": "Lán", "slideshow_repeat": "Athdhéan an sleamhnán", "slideshow_repeat_description": "Lúb ar ais go dtí an tús nuair a chríochnaíonn an sleamhnán", "slideshow_settings": "Socruithe sleamhnán", + "slideshow_title": "Sleamhnán", "smart_album": "Albam cliste", "some_assets_already_have_a_location_warning": "Tá suíomh ag cuid de na sócmhainní roghnaithe cheana féin", "sort_albums_by": "Sórtáil albaim de réir...", @@ -2118,6 +2157,7 @@ "unknown": "Anaithnid", "unknown_country": "Tír Anaithnid", "unknown_date": "Dáta anaithnid", + "unknown_schema": "Scéim anaithnid", "unknown_year": "Bliain Anaithnid", "unlimited": "Gan teorainn", "unlink_motion_video": "Dínasc físeán gluaisne", @@ -2153,6 +2193,8 @@ "upload_status_errors": "Earráidí", "upload_status_uploaded": "Uaslódáilte", "upload_success": "Uaslódáil rathúil, athnuachan an leathanach chun sócmhainní uaslódála nua a fheiceáil.", + "upload_to_album_body": "I gcás úsáideoirí nach n-úsáideann an ghné uaslódála láimhe, is féidir leat anois grianghraif áitiúla a chur go díreach le halbam agus tú á n-uaslódáil, níl aon ghá iad a uaslódáil agus a chur le halbam níos déanaí a thuilleadh.", + "upload_to_album_title": "Uaslódáil díreach chuig albam", "upload_to_immich": "Uaslódáil chuig Immich ({count})", "uploading": "Ag uaslódáil", "uploading_media": "Ag uaslódáil meán", @@ -2220,6 +2262,9 @@ "week": "Seachtain", "welcome": "Fáilte", "welcome_to_immich": "Fáilte go hImmich", + "whats_new": "Cad atá nua", + "whats_new_settings_subtitle": "Féach cad atá nua in Immich", + "whats_new_version": "Leagan {version}", "when": "Cathain", "width": "Leithead", "wifi_name": "Ainm Wi-Fi", diff --git a/i18n/gl.json b/i18n/gl.json index 35c38f2801..9df2baa287 100644 --- a/i18n/gl.json +++ b/i18n/gl.json @@ -108,6 +108,21 @@ "image_thumbnail_quality_description": "Calidade da miniatura de 1 a 100. Canto máis alto, mellor, pero produce ficheiros máis grandes e pode reducir a capacidade de resposta da aplicación.", "image_thumbnail_title": "Configuración da miniatura", "import_config_from_json_description": "Importar a configuración do sistema subindo un arquivo de configuración JSON", + "integrity_checks_checksum_files": "Ficheiros de suma de verificación", + "integrity_checks_checksum_files_description": "Configurar a comprobación da suma de comprobación", + "integrity_checks_checksum_files_enable_description": "Activar a comprobación da suma de verificación", + "integrity_checks_checksum_files_percentage_limit": "Límite porcentual", + "integrity_checks_checksum_files_percentage_limit_description": "Configura a porcentaxe máxima entre 0,01 e 1 para a duración da comprobación da suma de verificación en cada intervalo.", + "integrity_checks_checksum_files_time_limit": "Límite de tempo", + "integrity_checks_checksum_files_time_limit_description": "Configura a duración máxima durante a que se debe executar a comprobación da suma de comprobación en cada intervalo. (ms)", + "integrity_checks_missing_files": "Arquivos que faltan", + "integrity_checks_missing_files_description": "Configura a frecuencia e activa ou desactiva a comprobación de arquivos que faltan", + "integrity_checks_missing_files_enable_description": "Activar a comprobación de arquivos que faltan", + "integrity_checks_settings": "Comprobacións de integridade", + "integrity_checks_settings_description": "Xestionar intervalos de comprobacións de integridade", + "integrity_checks_untracked_files": "Arquivos sen rastrexar", + "integrity_checks_untracked_files_description": "Configura a frecuencia e activa ou desactiva a comprobación de arquivos sen rastrexar", + "integrity_checks_untracked_files_enable_description": "Activar a comprobación de arquivos sen rastrexar", "job_concurrency": "concorrencia de {job}", "job_created": "Traballo creado", "job_not_concurrency_safe": "Este traballo non é seguro para execución concorrente.", @@ -416,6 +431,10 @@ "transcoding_realtime_description": "Permite que a transcodificación se realice en tempo real mentres se transmite o vídeo. Activar o cambio de calidade pode provocar unha maior latencia de reprodución e atraso dependendo das capacidades do servidor.", "transcoding_realtime_enabled": "Activar transcodificación en tempo real", "transcoding_realtime_enabled_description": "Se está desactivado, o servidor rexeitará iniciar novas sesións de transcodificación en tempo real.", + "transcoding_realtime_resolutions": "Resolucións", + "transcoding_realtime_resolutions_description": "As resolucións ofrecidas para a transcodificación en tempo real. As resolucións máis altas poden causar problemas de reprodución se o servidor non é capaz de transcodificalas con suficiente rapidez.", + "transcoding_realtime_video_codecs": "Códecs de vídeo", + "transcoding_realtime_video_codecs_description": "Os códecs de vídeo ofrecidos para a transcodificación en tempo real. Os clientes elixirán a mellor opción compatible durante a reprodución. O AV1 é máis eficiente ca o HEVC, e este, á súa vez, máis eficiente ca o H.264. Ao utilizar aceleración por hardware, selecciona só aqueles códecs que o acelerador poida codificar. Ao utilizar transcodificación por software, ten en conta que o H.264 é máis rápido ca o AV1, e este máis rápido ca o HEVC.", "transcoding_reference_frames": "Fotogramas de referencia", "transcoding_reference_frames_description": "O número de fotogramas aos que facer referencia ao comprimir un fotograma dado. Valores máis altos melloran a eficiencia da compresión, pero ralentizan a codificación. 0 establece este valor automaticamente.", "transcoding_required_description": "Só vídeos que non estean nun formato aceptado", @@ -578,6 +597,7 @@ "asset_viewer_settings_title": "Visor de Activos", "assets": "Activos", "assets_added_to_album_count": "Engadido {count, plural, one {# activo} other {# activos}} ao álbum", + "assets_added_to_album_partial_count": "Engadíronse {successCount} de {totalCount} {totalCount, plural, one {elemento} other {elementos}} ao álbum", "assets_added_to_albums_count": "Engadido {assetTotal, plural, one {# ficheiro} other {# ficheiros}} a {albumTotal, plural, one {# álbum} other {# álbums}}", "assets_cannot_be_added_to_album_count": "{count, plural, one {O ficheiro non se pode engadir} other {Os ficheiros non se poden engadir}} ao álbum", "assets_cannot_be_added_to_albums": "{count, plural, one {O ficheiro non se pode engadir} other {Os ficheiros non se poden engadir}} a ningún dos álbums", @@ -794,7 +814,6 @@ "custom_date": "Data personalizada", "custom_locale": "Configuración Rexional Personalizada", "custom_locale_description": "Formatar datas, tempos e números baseándose na lingua e a rexión", - "custom_url": "URL personalizada", "cutoff_date_description": "Manter fotos dos últimos…", "cutoff_day": "{count, plural, one {day} other {days}}", "cutoff_year": "{count, plural, one {day} other {days}}", @@ -1303,9 +1322,9 @@ "login_form_failed_login": "Erro ao iniciar sesión, comprobe a URL do servidor, correo electrónico e contrasinal", "login_form_handshake_exception": "Houbo unha Excepción de Handshake co servidor. Active o soporte para certificados autofirmados nas configuracións se está a usar un certificado autofirmado.", "login_form_password_hint": "contrasinal", - "login_form_server_empty": "Introduza unha URL do servidor.", - "login_form_server_error": "Non se puido conectar co servidor.", - "login_has_been_disabled": "O inicio de sesión foi desactivado.", + "login_form_server_empty": "Introduza unha URL do servidor", + "login_form_server_error": "Non se puido conectar co servidor", + "login_has_been_disabled": "O inicio de sesión foi desactivado", "login_password_changed_error": "Houbo un erro ao actualizar o seu contrasinal", "login_password_changed_success": "Contrasinal actualizado correctamente", "logout_all_device_confirmation": "Está seguro de que quere pechar sesión en todos os dispositivos?", @@ -1356,6 +1375,7 @@ "map_location_picker_page_use_location": "Usar esta localización", "map_location_service_disabled_content": "O servizo de localización debe estar activado para mostrar activos da súa localización actual. Quere activalo agora?", "map_location_service_disabled_title": "Servizo de localización deshabilitado", + "map_marker_for_image": "Marcador do mapa para a imaxe tirada en {city}, {country}", "map_marker_with_image": "Marcador de mapa con imaxe", "map_no_location_permission_content": "Necesítase permiso de localización para mostrar activos da súa localización actual. Quere permitilo agora?", "map_no_location_permission_title": "Permiso de localización denegado", @@ -1460,6 +1480,7 @@ "never": "Nunca", "new_album": "Novo Álbum", "new_api_key": "Nova Chave API", + "new_feature": "Nova función", "new_password": "Novo contrasinal", "new_person": "Nova persoa", "new_pin_code": "Novo código PIN", @@ -1506,6 +1527,9 @@ "notes": "Notas", "nothing_here_yet": "Aínda nada por aquí", "notification_backup_reliability": "Activa as notificacións para mellorar a fiabilidade da copia de seguridade en segundo plano", + "notification_enabled_list_tile_content": "Immich emprega notificacións para copias de seguridade en segundo plano. Xestióneas nos axustes do seu dispositivo.", + "notification_enabled_list_tile_open_button": "Abrir axustes", + "notification_enabled_list_tile_title": "Notificacións activadas", "notification_permission_dialog_content": "Para activar as notificacións, vaia a Axustes e seleccione permitir.", "notification_permission_list_tile_content": "Conceda permiso para activar as notificacións.", "notification_permission_list_tile_enable_button": "Activar Notificacións", @@ -1517,6 +1541,8 @@ "obtainium_configurator": "Configurador de Obtainium", "obtainium_configurator_instructions": "Emprega Obtainium para instalar e actualizar a aplicación de Android directamente desde o lanzamento do GitHub de Immich. Crea unha chave API e selecciona unha variante para xerar o teu enlace de configuración de Obtainium", "ocr": "OCR", + "ocr_body": "Agora Immich le o texto que hai dentro das túas fotos, para que poidas buscalas polo que din.", + "ocr_title": "Buscar texto nas túas fotos", "official_immich_resources": "Recursos Oficiais de Immich", "offline": "Fóra de liña", "offset": "Desprazamento", @@ -1535,6 +1561,8 @@ "open": "Abrir", "open_calendar": "Abrir calendario", "open_in_browser": "Abrir no navegador", + "open_in_immich_body": "Configura Immich como a túa galería en Android para abrir fotos directamente doutras aplicacións.", + "open_in_immich_title": "Abrir fotos en Immich", "open_in_map_view": "Abrir na vista de mapa", "open_in_openstreetmap": "Abrir en OpenStreetMap", "open_the_search_filters": "Abrir os filtros de busca", @@ -1693,7 +1721,10 @@ "recent": "Recente", "recent_searches": "Buscas recentes", "recently_added": "Engadido recentemente", + "recently_added_body": "Vaia directamente a todo o que engadiu ultimamente nunha páxina específica.", + "recently_added_description": "Explora os teus recursos ordenados por cando foron cargados en Immich", "recently_added_page_title": "Engadido Recentemente", + "recently_added_title": "Engadida recentemente", "recently_taken": "Tomado recentemente", "refresh": "Actualizar", "refresh_encoded_videos": "Actualizar vídeos codificados", @@ -1900,6 +1931,8 @@ "share_link": "Ligazón para Compartir", "share_original": "Utilizar orixinal (grande)", "share_preview": "Utilizar miniatura (pequena)", + "share_quality_body": "Mantén premido o botón de compartir para escoller a calidade da imaxe antes de compartila.", + "share_quality_title": "Escolle a calidade da compartición", "shared": "Compartido", "shared_album_activities_input_disable": "O comentario está desactivado", "shared_album_activity_remove_content": "Quere eliminar esta actividade?", @@ -1915,6 +1948,8 @@ "shared_link_clipboard_copied_massage": "Copiado ao portapapeis", "shared_link_create_error": "Erro ao crear ligazón compartida", "shared_link_custom_url_description": "Acceder a esta ligazón compartida cun URL personalizado", + "shared_link_custom_url_title": "URL Personalizado", + "shared_link_custom_url_warning": "Aviso: un nome de URL personalizado cunha barra inclinada pode causar resultados inesperados.", "shared_link_edit_description_hint": "Introduza a descrición da compartición", "shared_link_edit_expire_after_option_day": "1 día", "shared_link_edit_expire_after_option_days": "{count} días", @@ -1981,16 +2016,19 @@ "sign_out": "Pechar Sesión", "sign_up": "Rexistrarse", "size": "Tamaño", + "skip": "Saltar", "skip_to_content": "Saltar ao contido", "skip_to_folders": "Saltar a cartafoles", "skip_to_tags": "Saltar a etiquetas", "slideshow": "Presentación", + "slideshow_body": "Reláxate e mira as túas fotos reproducíndose nunha presentación de diapositivas a pantalla completa.", "slideshow_metadata_overlay_mode": "Contido superposto", "slideshow_metadata_overlay_mode_description_only": "Só descrición", "slideshow_metadata_overlay_mode_full": "Cheo", "slideshow_repeat": "Repetir presentación de diapositivas", "slideshow_repeat_description": "Volver ao principio ao rematar a presentación de diapositivas", "slideshow_settings": "Configuración da presentación", + "slideshow_title": "Presentación de diapositivas", "smart_album": "Álbume intelixente", "some_assets_already_have_a_location_warning": "Algúns dos recursos seleccionados xa teñen unha localización", "sort_albums_by": "Ordenar álbums por...", @@ -2118,6 +2156,7 @@ "unknown": "Descoñecido", "unknown_country": "País Descoñecido", "unknown_date": "Data descoñecida", + "unknown_schema": "Esquema descoñecido", "unknown_year": "Ano Descoñecido", "unlimited": "Ilimitado", "unlink_motion_video": "Desvincular vídeo en movemento", @@ -2153,6 +2192,8 @@ "upload_status_errors": "Erros", "upload_status_uploaded": "Subido", "upload_success": "Subida exitosa. Actualice a páxina para ver os novos activos subidos.", + "upload_to_album_body": "Para os usuarios que non empreguen a función de carga manual, agora poden optar por engadir fotos locais directamente a un álbum mentres as cargan, sen necesidade de cargalas e engadlas a un álbum máis tarde.", + "upload_to_album_title": "Subir directamente a un álbum", "upload_to_immich": "Subir a Immich ({count})", "uploading": "Subindo", "uploading_media": "Cargando multimedia", @@ -2220,6 +2261,9 @@ "week": "Semana", "welcome": "Benvido/a", "welcome_to_immich": "Benvido/a a Immich", + "whats_new": "O que hai de novo", + "whats_new_settings_subtitle": "Vexa as novidades de Immich", + "whats_new_version": "Versión {version}", "when": "Cando", "width": "Ancho", "wifi_name": "Nome da wifi", diff --git a/i18n/gsw.json b/i18n/gsw.json index 8572f40d5a..a5e9713869 100644 --- a/i18n/gsw.json +++ b/i18n/gsw.json @@ -39,7 +39,7 @@ "added_to_favorites": "Zu de Favoritä hiigfüegt", "added_to_favorites_count": "{count, number} zu de Favoritä hiigfüegt", "admin": { - "add_exclusion_pattern_description": "Ausschlussmuster hiifüege. Platzhalter wie *, ** und ? werde unterstützt. Um alli Datei in eme Verzeichnis mit em Name „Raw“ z ignoriere, „/Raw/“ verwände.\nUm alli Datei z ignoriere, wo uf „.tif“ änded, „/*.tif“ verwände. Um en absolute Pfad z ignoriere, „/pfad/zum/ignorieren/“ verwände.", + "add_exclusion_pattern_description": "Ausschlussmuster hiifüege. Platzhalter wie *, ** und ? werde unterstützt. Um alli Datei in eme Verzeichnis mit em Name „Raw“ z ignoriere, „/Raw/“ verwände. Um alli Datei z ignoriere, wo uf „.tif“ änded, „/*.tif“ verwände. Um en absolute Pfad z ignoriere, „/pfad/zum/ignorieren/“ verwände.", "admin_user": "Administrator", "asset_offline_description": "Die Datei vo ere externe Bibliothek isch nümme uf de Festplatte und isch i de Papirkorb verschobe worde. Falls d’Datei i dä Bibliothek verschobe worde isch, lueg i diner Ziitliiste noch de neue entsprechende Datei. Um die Datei wiederherzstelle, sorg bitte derfür, dass Immich uf de unten aagegehene Dateipfad cha zgriffe und lass d’Bibliothek neu scanne.", "authentication_settings": "Authentifizierigsiistellige", @@ -70,9 +70,10 @@ "copy_config_to_clipboard_description": "Kopier d’aktuel Systemkonfiguration als JSON-Objekt i d’Zwüscheablage", "create_job": "Ufgob erstelle", "cron_expression": "Cron-Ziitahgob", - "cron_expression_description": "Setz s’Scan-Intervall im Cron-Format. Hilf zum Format findes du zum Bispiel bi de Setz s’Scan-Intervall im Cron-Format. Hilf zum Format findes du zum Bispiel bi de Crontab Guru.Crontab Guru.", + "cron_expression_description": "Setz s’Scan-Intervall im Cron-Format. Hilf zum Format findes du zum Bispiel bi de Crontab Guru", "cron_expression_presets": "Vorlag für Cron-Ziitangab", "disable_login": "Login deaktiviiere", + "download_csv": "Als CSV abäladä", "duplicate_detection_job_description": "Die Ufgab führt s’maschinelli Lärene für jede Datei us, um Duplikat z finde. Die Ufgab basiert uf de intelligente Suechi", "exclusion_pattern_description": "Mit Usschlussmuster chönnd Datei und Ordner bim Scanne vo diner Bibliothek ignoriert werde. Das isch nöützlich, wenn du Ordner hesch, wo Datei enthalte, wo du nöd importiere wotsch – zum Bispiel RAW-Dateie.", "export_config_as_json_description": "Lad d’aktuel Systemkonfiguration als JSON-Datei ab", @@ -96,6 +97,8 @@ "image_preview_description": "Mittelgrosses Bild mit entfernte Metadate, wo bim Aaluegä vo ere einzelne Datei und fürs maschinelli Lärne bruucht wird", "image_preview_quality_description": "Vorschauqualität vo 1–100. En höcherer Wert isch besser, erzeugt aber grösseri Dateie und cha d’Reaktionsfähigkait vo dr App beeinträchtige. En tieferer Wert cha hingegen d’Qualität vom maschinelle Lärne beeinträchtige.", "image_preview_title": "Vorschauiistellige", + "image_progressive": "Progressiv", + "image_progressive_description": "JPEG progressiv enkodiärä für graduells Display-Ladeverhaltä. Hät kei Effekt für WebP Bilder.", "image_quality": "Qualität", "image_resolution": "Uuflösig", "image_resolution_description": "Höcheri Uflösige chöi meh Detail erhalte, bruuched aber meh Ziit für d’Kodierig, hei grösseri Dateigrössi und chöi d’Reaktionsfähigkait vo Applikatione beeinträchtige.", @@ -105,6 +108,10 @@ "image_thumbnail_quality_description": "Qualität vo dr Miniaturahsicht vo 1–100. Höcher isch besser, erzeugt aber grösseri Dateie und cha d’Reaktionsfähigkait vo dr App beeinträchtige.", "image_thumbnail_title": "Miniaturahsicht-Iistellige", "import_config_from_json_description": "Importier d’Systemkonfiguration, indem du e JSON-Konfigurationsdatei ufladsch", + "integrity_checks_checksum_files": "Checksum-Dateiä", + "integrity_checks_checksum_files_description": "D Cheksum Überprüäfig konfigurierä", + "integrity_checks_checksum_files_enable_description": "D Checksum Überprüäfig iischaltä", + "integrity_checks_checksum_files_percentage_limit": "Prozentuali Obergränzä", "job_concurrency": "{job} (Aazahl gliichziitig laufendi Prozäss)", "job_created": "Ufgab erstellt", "job_not_concurrency_safe": "Die Ufgab isch nöd parallelisierigssicher.", @@ -729,7 +736,6 @@ "current_server_address": "Aktuelli Serveradresse", "custom_locale": "Benutzerdefinierti Sproch", "custom_locale_description": "Datumsahgoob und Zahle je nach Sproch und Land formatiere", - "custom_url": "Benutzerdefinierti URL", "dark": "Dunkäl", "dark_theme": "Dunkli Aahsicht umschalte", "date": "Datum", diff --git a/i18n/gu.json b/i18n/gu.json index dfdd98ae99..31a5a92199 100644 --- a/i18n/gu.json +++ b/i18n/gu.json @@ -23,6 +23,7 @@ "add_location": "સ્થાન ઉમેરો", "add_partner": "સાથી ઉમેરો", "add_photos": "ફોટો ઉમેરો", + "add_step": "પગલું ઉમેરો", "add_tag": "ટેગ ઉમેરો", "add_to": "માં ઉમેરો", "add_to_album": "આલ્બમમાં ઉમેરો", @@ -72,6 +73,7 @@ "cron_expression_description": "ક્રોન ફોર્મેટનો ઉપયોગ કરીને સ્કેનિંગ ઇન્ટરવલ સેટ કરો. વધુ માહિતી માટે કૃપા કરીને Crontab Guru જુઓ.", "cron_expression_presets": "ક્રોન એક્સપ્રેશન પ્રીસેટ્સ", "disable_login": "લોગિન ડિસેબલ કરો", + "download_csv": "CSV ડાઉનલોડ કરો", "duplicate_detection_job_description": "સરખી ઈમેજો શોધવા માટે તમારા સંસાધનો પર મશીન લર્નિંગનો ઉપયોગ કરો. આ સુવિધા સ્માર્ટ સર્ચ પર આધારિત છે", "exclusion_pattern_description": "તમારા સંગ્રહને સ્કેન કરતી વખતે એક્સક્લુઝન પેટર્ન તમને ફાઇલો અને ફોલ્ડર્સને અવગણવામાં મદદ કરે છે. જો તમારી પાસે એવી ફાઇલો ધરાવતા ફોલ્ડર્સ હોય જેને તમે ઈમ્પોર્ટ કરવા નથી માંગતા, જેમ કે RAW ફાઇલો, તો આ સુવિધા ઉપયોગી છે.", "export_config_as_json_description": "વર્તમાન સિસ્ટમ કોન્ફિગને JSON ફાઇલ તરીકે ડાઉનલોડ કરો", @@ -80,6 +82,13 @@ "face_detection_description": "મશીન લર્નિંગનો ઉપયોગ કરીને સંસાધનોમાં ચહેરાની પરખ કરો. વીડિયો માટે, ફક્ત થંબનેલ જ ધ્યાનમાં લેવામાં આવે છે. \"રિફ્રેશ\" બધા સંસાધનો પર ફરીથી પ્રક્રિયા કરે છે. \"રીસેટ\" વધારામાં ચહેરાના તમામ વર્તમાન ડેટાને સાફ કરે છે. \"ખૂટતા\" તેવા સંસાધનોને કતારમાં મૂકે છે જેના પર હજુ સુધી પ્રક્રિયા કરવામાં આવી નથી. ચહેરાની પરખ પૂર્ણ થયા પછી, શોધાયેલા ચહેરાઓને 'ચહેરાની ઓળખ' માટે કતારમાં મૂકવામાં આવશે, જે તેમને હાલની અથવા નવી વ્યક્તિઓના જૂથમાં વિભાજિત કરશે.", "facial_recognition_job_description": "શોધાયેલા ચહેરાઓને વ્યક્તિઓના જૂથમાં વિભાજિત કરો. આ પગલું 'ચહેરાની પરખ' પૂર્ણ થયા પછી શરૂ થાય છે. \"રીસેટ\" બધા ચહેરાઓનું ફરીથી જૂથીકરણ કરે છે. \"ખૂટતા\" તેવા ચહેરાઓને કતારમાં મૂકે છે જેમને હજુ સુધી કોઈ વ્યક્તિ ફાળવવામાં આવી નથી.", "failed_job_command": "આ કાર્ય માટે આદેશ {command} નિષ્ફળ રહ્યો: {job}", - "force_delete_user_warning": "ચેતવણી: આ પ્રક્રિયા તરત જ વપરાશકર્તા અને તમામ સંસાધનોને દૂર કરી દેશે. આ નિર્ણય બદલી શકાશે નહીં અને ફાઇલોને ફરીથી મેળવી શકાશે નહીં." + "force_delete_user_warning": "ચેતવણી: આ પ્રક્રિયા તરત જ વપરાશકર્તા અને તમામ સંસાધનોને દૂર કરી દેશે. આ નિર્ણય બદલી શકાશે નહીં અને ફાઇલોને ફરીથી મેળવી શકાશે નહીં.", + "image_format": "ગોઠવણ", + "image_format_description": "WebP JPEG કરતા નાની ફાઇલો બનાવે છે, પરંતુ એન્કોડ કરવામાં ધીમી છે.", + "image_prefer_embedded_preview": "એમ્બેડેડ પૂર્વાવલોકન પસંદ કરો", + "image_prefer_wide_gamut": "પહોળા અંતરને પ્રાધાન્ય આપો", + "image_preview_quality_description": "પ્રીવ્યૂ ગુણવત્તા ૧-૧૦૦ સુધી. ઉચ્ચ વધુ સારું છે, પરંતુ તે મોટી ફાઇલો ઉત્પન્ન કરે છે અને એપ્લિકેશન પ્રતિભાવ ઘટાડી શકે છે. ઓછું મૂલ્ય સેટ કરવાથી મશીન લર્નિંગ ગુણવત્તા પર અસર પડી શકે છે.", + "image_preview_title": "પૂર્વાવલોકન સેટિંગ્સ", + "image_progressive": "પ્રગતિશીલ" } } diff --git a/i18n/he.json b/i18n/he.json index 0b380bce37..58bb78a9d7 100644 --- a/i18n/he.json +++ b/i18n/he.json @@ -5,7 +5,7 @@ "acknowledge": "הבנתי", "action": "פעולה", "action_common_update": "עדכון", - "action_description": "סט פעולות לביצוע על נכסים מסוננים", + "action_description": "סט פעולות לביצוע על קבצים מסוננים", "actions": "פעולות", "active": "פעיל", "active_count": "פעיל: {count}", @@ -15,14 +15,15 @@ "add_a_location": "הוספת מיקום", "add_a_name": "הוספת שם", "add_a_title": "הוספת כותרת", - "add_action": "הוסף פעולה", - "add_assets": "הוסף תמונות", + "add_action": "הוספת פעולה", + "add_assets": "הוספת תמונות", "add_birthday": "הוספת יום הולדת", "add_endpoint": "הוספת כתובת קצה", "add_exclusion_pattern": "הוספת דפוס החרגה", "add_location": "הוספת מיקום", "add_partner": "הוספת שותף", "add_photos": "הוספת תמונות", + "add_step": "הוספת שלב", "add_tag": "הוספת תג", "add_to": "הוספה ל…", "add_to_album": "הוספה לאלבום", @@ -72,6 +73,7 @@ "cron_expression_description": "הגדר את מרווח הסריקה באמצעות תבנית ה- cron. למידע נוסף נא לפנות למשל אל Crontab Guru", "cron_expression_presets": "הגדרות קבועות מראש של ביטוי cron", "disable_login": "השבת כניסה", + "download_csv": "הורדת קובץ CSV (אקסל)", "duplicate_detection_job_description": "הפעל למידת מכונה על תמונות כדי לזהות תמונות דומות. נשען על חיפוש חכם", "exclusion_pattern_description": "דפוסי החרגה מאפשרים לך להתעלם מקבצים ומתיקיות בעת סריקת הספרייה שלך. זה שימושי אם יש לך תיקיות המכילות קבצים שאינך רוצה לייבא, כגון קובצי RAW.", "export_config_as_json_description": "הורדת הגדרות המערכת הנוכחיות כקובץ JSON", @@ -106,6 +108,21 @@ "image_thumbnail_quality_description": "איכות תמונה ממוזערת מ-1 עד 100. איכות גבוהה יותר היא טובה יותר, אבל מייצרת קבצים גדולים יותר ויכולה להפחית את תגובתיות היישום.", "image_thumbnail_title": "הגדרות תמונה ממוזערת", "import_config_from_json_description": "ייבוא תצורת מערכת באמצעות קובץ תצורה JSON", + "integrity_checks_checksum_files": "קבצי סיכום ביקורת", + "integrity_checks_checksum_files_description": "הגדרת בדיקות סיכום ביקורת (checksum)", + "integrity_checks_checksum_files_enable_description": "הפעלת בדיקת סיכום ביקורת", + "integrity_checks_checksum_files_percentage_limit": "מגבלה באחוזים", + "integrity_checks_checksum_files_percentage_limit_description": "הגדרת אחוז מקסימלי בין 0.01 ו־1 לשיעור בדיקת סיכום ביקורת בכל פרק זמן.", + "integrity_checks_checksum_files_time_limit": "מגבלת זמן", + "integrity_checks_checksum_files_time_limit_description": "הגדר את משך הזמן המרבי שבו בדיקת סכומי הביקורת תתבצע בכל מרווח זמן. (אלפיות שנייה)", + "integrity_checks_missing_files": "קבצים חסרים", + "integrity_checks_missing_files_description": "הגדר את התדירות והפעל או השבת את בדיקת הקבצים החסרים", + "integrity_checks_missing_files_enable_description": "הפעל את בדיקת הקבצים החסרים", + "integrity_checks_settings": "בדיקת שלמות", + "integrity_checks_settings_description": "ניהול מרווחי הזמן של בדיקות השלמות", + "integrity_checks_untracked_files": "קבצים לא במעקב", + "integrity_checks_untracked_files_description": "הגדרת התדירות והפעלת או השבתת בדיקת הקבצים שלא במעקב", + "integrity_checks_untracked_files_enable_description": "הפעלת בדיקת קבצים בלתי נעקבים", "job_concurrency": "בו-זמניות של {job}", "job_created": "עבודה נוצרה", "job_not_concurrency_safe": "עבודה זו אינה בטוחה להרצה במקביל.", @@ -181,9 +198,25 @@ "machine_learning_smart_search_enabled": "אפשר חיפוש חכם", "machine_learning_smart_search_enabled_description": "אם מושבת, תמונות לא יקודדו לחיפוש חכם.", "machine_learning_url_description": "כתובת ה-URL של שרת למידת המכונה. אם ניתנת יותר מכתובת URL אחת, כל שרת ינוסה ניסיון אחד בכל פעם עד שאחד מהם יגיב בהצלחה, לפי הסדר מהראשון עד האחרון. שרתים שלא מגיבים יוזנחו זמנית עד שיחזרו להיות מקוונים.", + "maintenance_backup_management": "ניהול גיבוי", "maintenance_delete_backup": "מחק גיבוי", "maintenance_delete_backup_description": "קובץ זה ימחק לצמיתות.", "maintenance_delete_error": "מחיקת הגיבוי נכשלה.", + "maintenance_integrity_check": "בדיקה", + "maintenance_integrity_check_all": "בדוק הכל", + "maintenance_integrity_checksum_mismatch": "סיכום ביקורת לא תואם", + "maintenance_integrity_checksum_mismatch_description": "קבצים שסכום הביקורת שלהם בדיסק אינו תואם לסכום הביקורת ש־Immich שמר במסד הנתונים שלו.", + "maintenance_integrity_checksum_mismatch_job": "בדוק אי־התאמות בסכומי ביקורת", + "maintenance_integrity_checksum_mismatch_refresh_job": "רענן דוחות אי־התאמות בסכומי ביקורת", + "maintenance_integrity_missing_file": "קבצים חסרים", + "maintenance_integrity_missing_file_description": "קבצים ש‐Immich עקב אחריהם במסד הנתונים אך אינם קיימים במערכת הקבצים.", + "maintenance_integrity_missing_file_job": "בדוק אם יש קבצים חסרים", + "maintenance_integrity_missing_file_refresh_job": "רענון דוחות קבצים חסרים", + "maintenance_integrity_report": "דוח תקינות", + "maintenance_integrity_untracked_file": "קבצים לא במעקב", + "maintenance_integrity_untracked_file_description": "קבצים בתיקיות של Immich של-Immich אין תיעוד שלהם.", + "maintenance_integrity_untracked_file_job": "בדיקת קבצים שאינם במעקב", + "maintenance_integrity_untracked_file_refresh_job": "רענן דוחות קבצים לא במעקב", "maintenance_restore_backup": "שחזור מגיבוי", "maintenance_restore_backup_description": "Immich יימחק וישוחזר מהגיבוי שנבחר. גיבוי ייווצר לפני שתמשיך.", "maintenance_restore_backup_different_version": "גיבוי זה נוצר עם גרסה שונה של Immich!", @@ -298,6 +331,8 @@ "refreshing_all_libraries": "מרענן את כל הספריות", "registration": "רישום מנהל מערכת", "registration_description": "מכיוון שאתה המשתמש הראשון במערכת, אתה תוקצה כמנהל ואתה אחראי על משימות ניהול, ומשתמשים נוספים ייווצרו על ידך.", + "release_channel_release_candidate": "מועמד לשחרור", + "release_channel_stable": "יציב", "remove_failed_jobs": "הסרת משימות שנכשלו", "require_password_change_on_login": "דרוש מהמשתמש לשנות סיסמה בכניסה הראשונה", "reset_settings_to_default": "אפס הגדרות לברירת המחדל", @@ -392,6 +427,14 @@ "transcoding_preferred_hardware_device_description": "חל רק על VAAPI ו-QSV. מגדיר את צומת ה-dri המשמש להמרת קידוד של חומרה.", "transcoding_preset_preset": "הגדרות קבועות מראש (-preset)", "transcoding_preset_preset_description": "מהירות דחיסה. הגדרות קבועות מראש איטיות יותר מייצרות קבצים קטנים יותר, ומגבירות את האיכות כאשר מכוונים לקצב סיביות מסוים. VP9 מתעלם ממהירויות מעל 'מהיר יותר'.", + "transcoding_realtime": "קידוד בזמן אמת [ניסיוני]", + "transcoding_realtime_description": "אפשר קידוד בזמן אמת בזמן שהסרטון משודר‮. מאפשר החלפת איכות, אך עלול לגרום להשהיות וגמגומים בהתאם ליכולות השרת.", + "transcoding_realtime_enabled": "הפעל קידוד בזמן אמת", + "transcoding_realtime_enabled_description": "אם אפשרות זו מושבתת, השרת יסרב להתחיל הפעלות חדשות של המרה בזמן אמת.", + "transcoding_realtime_resolutions": "רזולוציות", + "transcoding_realtime_resolutions_description": "הרזולוציות הזמינות להמרה בזמן אמת. רזולוציות גבוהות יותר עלולות לגרום לבעיות בניגון אם השרת אינו מסוגל לבצע את ההמרה במהירות מספקת.", + "transcoding_realtime_video_codecs": "מקודדי וידאו", + "transcoding_realtime_video_codecs_description": "מקודדי הווידאו הזמינים לטרנסקודינג בזמן אמת. יישומי הקצה יבחרו במהלך ההפעלה את האפשרות הטובה ביותר שבה הם תומכים. AV1 יעיל יותר מ־HEVC, אשר יעיל יותר מ־H.264. בעת שימוש בהאצת חומרה, יש לבחור רק את המקודדים שבהם מאיץ החומרה מסוגל לבצע קידוד. בעת שימוש בטרנסקודינג באמצעות תוכנה, יש לשים לב ש־H.264 מהיר יותר מ־AV1, אשר מהיר יותר מ־HEVC.", "transcoding_reference_frames": "פריימים לייחוס", "transcoding_reference_frames_description": "מספר הפריימים לייחוס בעת דחיסה של פריים נתון. ערכים גבוהים יותר משפרים את יעילות הדחיסה, אך מאטים את הקידוד. 0 מגדיר את הערך זה באופן אוטומטי.", "transcoding_required_description": "רק סרטונים שאינם בפורמט מקובל", @@ -435,6 +478,8 @@ "user_settings_description": "ניהול הגדרות משתמש", "user_successfully_removed": "המשתמש {email} הוסר בהצלחה.", "users_page_description": "עמוד ניהול משתמשים", + "version_check_channel": "ערוץ הפצה", + "version_check_channel_description": "בחר את ערוץ ההפצה שעבורו ברצונך לקבל הודעות על גרסאות חדשות", "version_check_enabled_description": "אפשר בדיקת גרסה", "version_check_implications": "תכונת בדיקת הגרסה מסתמכת על תקשורת תקופתית עם {server}", "version_check_settings": "בדיקת גרסה", @@ -551,6 +596,7 @@ "asset_viewer_settings_title": "מציג התמונות", "assets": "תמונות וסרטונים", "assets_added_to_album_count": "{count, plural, one {נוספה תמונה #} other {נוספו # תמונות}} לאלבום", + "assets_added_to_album_partial_count": "נוספו {successCount} מתוך {totalCount} {totalCount, plural, one {תמונה} other {תמונות}} לאלבום", "assets_added_to_albums_count": "{assetTotal, plural, one {נוסף פריט #} other {נוספו # פריטים}} אל {albumTotal, plural, one {אלבום #} other {# אלבומים}}", "assets_cannot_be_added_to_album_count": "לא ניתן להוסיף את ה{count, plural, one {תמונה} other {תמונות}} לאלבום", "assets_cannot_be_added_to_albums": "לא ניתן להוסיף {count, plural, one {פריט} other {פריטים}} לאף אחד מהאלבומים", @@ -604,12 +650,14 @@ "backup_options": "אפשרויות גיבוי", "backup_settings_subtitle": "נהל הגדרות העלאה", "backward": "אחורה", + "battery_optimization_backup_reliability": "השבתת מיטוב צריכת הסוללה עשויה לשפר את האמינות של גיבוי ברקע", "biometric_auth_enabled": "אימות ביומטרי הופעל", "biometric_locked_out": "גישה לאימות הביומטרי נחסמה", "biometric_no_options": "אין אפשרויות זמינות עבור אימות ביומטרי", "biometric_not_available": "אימות ביומטרי אינו זמין במכשיר זה", "birthdate_set_description": "תאריך לידה משמש לחישוב הגיל של האדם הזה בזמן תצלום.", "blurred_background": "רקע מטושטש", + "browse_templates": "עיון בתבניות", "bugs_and_feature_requests": "באגים & בקשות לתכונות", "build": "גרסת בנייה", "build_image": "גרסת תוכנה", @@ -629,6 +677,7 @@ "cannot_update_the_description": "לא ניתן לעדכן את התיאור", "cast": "שידור למסך", "cast_description": "הגדרת התקנים זמינים לשידור", + "change": "שנה", "change_date": "שנה תאריך", "change_description": "שנה תיאור", "change_display_order": "שנה סדר תצוגה", @@ -651,6 +700,7 @@ "charging_requirement_mobile_backup": "גיבוי ברקע דורש טעינה של המכשיר", "check_logs": "בדוק יומני רישום", "checksum": "סיכום ביקורת", + "choose": "בחר", "choose_matching_people_to_merge": "בחר אנשים תואמים למיזוג", "city": "עיר", "cleanup_confirm_description": "Immich מצא {count} תמונות וסרטונים (שנוצרו לפני {date}) מגובים בבטחה לשרת. להסיר את העותקים המקומיים ממכשיר זה?", @@ -668,6 +718,7 @@ "clear": "נקה", "clear_all": "נקה הכל", "clear_all_recent_searches": "נקה את כל החיפושים האחרונים", + "clear_failed_count": "ניקוי נכשל ({count})", "clear_file_cache": "נקה קבצי מטמון", "clear_message": "נקה הודעה", "clear_value": "נקה ערך", @@ -695,6 +746,7 @@ "comments_are_disabled": "תגובות מושבתות", "common_create_new_album": "צור אלבום חדש", "completed": "הושלמו", + "configuration": "תצורה", "confirm": "אישור", "confirm_admin_password": "אישור סיסמת מנהל", "confirm_delete_face": "האם באמת ברצונך למחוק את הפנים של {name} מהתמונה?", @@ -709,6 +761,7 @@ "contain": "מכיל", "context": "הקשר", "continue": "המשך", + "control_bottom_app_bar_add_tags": "הוסף תגיות", "control_bottom_app_bar_delete_from_local": "מחק מהמכשיר", "control_bottom_app_bar_edit_location": "ערוך מיקום", "control_bottom_app_bar_edit_time": "ערוך תאריך & זמן", @@ -717,6 +770,7 @@ "copied_to_clipboard": "הועתק ללוח!", "copy_error": "שגיאת העתקה", "copy_image": "העתק תמונה", + "copy_json": "העתק JSON", "copy_link": "העתק קישור", "copy_link_to_clipboard": "העתק קישור ללוח", "copy_password": "העתק סיסמה", @@ -759,7 +813,6 @@ "custom_date": "תאריך מותאם אישית", "custom_locale": "אזור שפה מותאם אישית", "custom_locale_description": "עצב תאריכים, זמנים, ומספרים על סמך השפה והאזור שנבחרו", - "custom_url": "קישור מותאם אישית", "cutoff_date_description": "שמור תמונות מ…", "cutoff_day": "{count, plural, one {יום} other {ימים}}", "cutoff_year": "{count, plural, one {שנה} other {שנים}}", @@ -772,9 +825,12 @@ "date_of_birth": "תאריך לידה", "date_of_birth_saved": "תאריך לידה נשמר בהצלחה", "date_range": "טווח תאריכים", + "date_time_original": "תאריך/שעה מקוריים", "day": "יום", "days": "ימים", "deduplicate_all": "ביטול כל הכפילויות", + "default_quality_subtitle": "איכות איכותית בשימוש בעת לחיצה על שיתוף. לחץ לחיצה ארוכה על כפתור השיתוף כדי לבחור בכל פעם.", + "default_share_quality": "איכות שיתוף ברירת מחדל", "delete": "מחק", "delete_action_confirmation_message": "האם אתה בטוח שברצונך למחוק את התמונה הזאת? פעולה זו תעביר אותו לאשפה של השרת, ותשאל אם ברצונך למחוק אותו גם מהמכשיר המקומי", "delete_action_prompt": "{count} נמחקו", @@ -836,7 +892,10 @@ "downloading_asset_filename": "מוריד תמונה {filename}", "downloading_from_icloud": "מוריד מ-iCloud", "downloading_media": "מוריד מדיה", + "drag_to_reorder": "גרור כדי לשנות סדר", "drop_files_to_upload": "שחרר קבצים בכל מקום כדי להעלות", + "duplicate": "שכפול", + "duplicate_workflow": "שכפול זרימת עבודה", "duplicates": "כפילויות", "duplicates_description": "הפרד כל קבוצה על ידי ציון אילו, אם בכלל, הן כפילויות.", "duration": "משך זמן", @@ -931,6 +990,7 @@ "failed_to_remove_product_key": "הסרת מפתח מוצר נכשלה", "failed_to_reset_pin_code": "איפוס קוד PIN נכשל", "failed_to_stack_assets": "יצירת ערימת תמונות נכשלה", + "failed_to_tag_assets": "תיוג התמונות נכשל", "failed_to_unstack_assets": "ביטול ערימת תמונות נכשלה", "failed_to_update_notification_status": "שגיאה בעדכון ההתראה", "incorrect_email_or_password": "דוא\"ל או סיסמה שגויים", @@ -1042,15 +1102,18 @@ "export_as_json": "ייצוא כ-JSON", "export_database": "ייצא מסד נתונים", "export_database_description": "ייצא מסד נתונים SQL", + "exposure_time": "זמן חשיפה", "extension": "סיומת", "external": "חיצוני", "external_libraries": "ספריות חיצוניות", "external_network": "רשת חיצונית", "external_network_sheet_info": "אם אינך מחובר ל־Wi‑Fi מועדף, האפליקציה תנסה להתחבר לשרת לפי הסדר מהרשימה שלמטה (מלמעלה למטה)", + "f_number": "מספר F (מפתח צמצם)", "face_unassigned": "לא מוקצה", "failed": "נכשלו", "failed_count": "נכשלו: {count}", "failed_to_authenticate": "ההזדהות נכשלה", + "failed_to_delete_file": "מחיקת הקובץ נכשלה", "failed_to_load_assets": "טעינת תמונות נכשלה", "failed_to_load_folder": "טעינת תיקיה נכשלה", "favorite": "מועדף", @@ -1072,6 +1135,7 @@ "filters": "מסננים", "first": "ראשון", "fix_incorrect_match": "תקן התאמה שגויה", + "focal_length": "אורך מוקד", "folder": "תיקיה", "folder_not_found": "תיקיה לא נמצאה", "folders": "תיקיות", @@ -1154,6 +1218,7 @@ "individual_share": "שיתוף יחיד", "individual_shares": "שיתופים בודדים", "info": "מידע", + "integrity_checks": "בדיקות תקינות", "interval": { "day_at_onepm": "כל יום בשעה 13:00", "hours": "כל {hours, plural, one {שעה} other {{hours, number} שעות}}", @@ -1164,6 +1229,7 @@ "invalid_date_format": "פורמט תאריך לא תקין", "invite_people": "הזמן אנשים", "invite_to_album": "הזמן לאלבום", + "iso": "ISO", "items_count": "{count, plural, one {פריט #} other {# פריטים}}", "jobs": "משימות", "keep": "שמור", @@ -1192,6 +1258,7 @@ "leave": "לעזוב", "leave_album": "עזיבת אלבום", "lens_model": "דגם עדשה", + "less": "פחות", "let_others_respond": "אפשר לאחרים להגיב", "level": "רמה", "library": "ספרייה", @@ -1213,6 +1280,7 @@ "linked_oauth_account": "חשבון OAuth מקושר", "list": "רשימה", "live": "חי", + "load_more": "טען עוד", "loading": "טוען", "loading_search_results_failed": "טעינת תוצאות החיפוש נכשלה", "local": "מקומי", @@ -1253,9 +1321,9 @@ "login_form_failed_login": "שגיאה בכניסה למערכת, בדוק את כתובת השרת, דוא\"ל וסיסמה", "login_form_handshake_exception": "אירעה חריגה בעת ביצוע Handshake עם השרת. אפשר תמיכה בתעודה בחתימה עצמית בהגדרות אם את/ה משתמש/ת בתעודה בחתימה עצמית.", "login_form_password_hint": "סיסמה", - "login_form_server_empty": "הכנס כתובת שרת.", - "login_form_server_error": "לא היה ניתן להתחבר לשרת.", - "login_has_been_disabled": "הכניסה הושבתה.", + "login_form_server_empty": "כתובת שרת", + "login_form_server_error": "לא ניתן להתחבר לשרת", + "login_has_been_disabled": "ההתחברות לחשבון הושבתה", "login_password_changed_error": "הייתה שגיאה בעדכון הסיסמה שלך", "login_password_changed_success": "סיסמה עודכנה בהצלחה", "logout_all_device_confirmation": "האם באמת ברצונך להתנתק מכל המכשירים?", @@ -1306,7 +1374,8 @@ "map_location_picker_page_use_location": "השתמש במיקום הזה", "map_location_service_disabled_content": "שירות המיקום צריך להיות מופעל כדי להציג תמונות מהמיקום הנוכחי שלך. האם ברצונך להפעיל אותו עכשיו?", "map_location_service_disabled_title": "שירות מיקום מבוטל", - "map_marker_with_image": "סמן מפה עם תמונה", + "map_marker_for_image": "מרקר מפה לתמונה ממיקום {city}, {country}", + "map_marker_with_image": "סמן מפה מתמונה", "map_no_location_permission_content": "יש צורך בהרשאה למיקום כדי להציג תמונות מהמיקום הנוכחי שלך. האם ברצונך לאפשר זאת עכשיו?", "map_no_location_permission_title": "הרשאה למיקום נדחתה", "map_settings": "הגדרות מפה", @@ -1315,9 +1384,9 @@ "map_settings_date_range_option_days": "ב-{days} ימים אחרונים", "map_settings_date_range_option_year": "שנה אחרונה", "map_settings_date_range_option_years": "ב-{years} שנים אחרונות", - "map_settings_include_show_archived": "כלול ארכיון", - "map_settings_include_show_partners": "כלול שותפים", - "map_settings_only_show_favorites": "הצג מועדפים בלבד", + "map_settings_include_show_archived": "הכללת ארכיון", + "map_settings_include_show_partners": "הכללת שותפים", + "map_settings_only_show_favorites": "הצגת מועדפים בלבד", "map_settings_theme_settings": "ערכת נושא למפה", "mark_all_as_read": "סמן הכל כנקרא", "marked_all_as_read": "כל ההתראות סומנו כנקראו", @@ -1327,22 +1396,33 @@ "auto": "אוטומטי", "captions": "כתוביות", "captions_off": "כבוי", + "closed_captions": "כתוביות מובנות", "decode_error": "שגיאת קידוד", "disable_captions": "ביטול כתוביות", "enable_captions": "אפשר כתוביות", "enter_fullscreen_mode": "הפעלת מצב מסך מלא", "exit_fullscreen_mode": "יציאה ממסך מלא", "loop": "לולאה", + "media_error_description": "שגיאה במדיה עצדה את הניגון. המדיה אינה תקינה או שהדפדפן אינו תומך בפורמט.", "media_loading": "טעינת מדיה", "mute": "השתקה", "network_error": "שגיאת רשת", + "network_error_description": "ההורדה נכשלה בגלל שגיאת רשת.", "not_supported_error": "מקור לא נתמך", "playback_rate": "דירוג ניגון", + "playback_rate_current": "דירוג נוכחי", + "playback_rate_value": "דירוג {playbackRate}", "playback_time": "זמן ניגון", "quality": "איכות", "second": "שניה", "seconds": "שניות", - "time_value_of_total_time": "{currentTime} מתוך {totalTime}" + "time_value_of_total_time": "{currentTime} מתוך {totalTime}", + "time_value_remaining": "נשאר {time}", + "unmute": "ביטול השתקה", + "unsupported_error_description": "אירעה שגיאה שאינה נתמכת. השרת או הרשת נכשלו, או שהדפדפן שלך אינו תומך בפורמט זה.", + "video_not_loaded_unknown_time": "הווידאו לא נטען, זמן לא ידוע.", + "video_player": "נגן וידיאו", + "volume": "עוצמת קול" }, "media_type": "סוג מדיה", "memories": "זכרונות", @@ -1360,6 +1440,8 @@ "merge_people_prompt": "האם ברצונך למזג את האנשים האלה? פעולה זו היא בלתי הפיכה.", "merge_people_successfully": "מיזוג אנשים בוצע בהצלחה", "merged_people_count": "{count, plural, one {אדם # מוזג} other {# אנשים מוזגו}}", + "minFaces": "מינימום פנים", + "minFaces_description": "המספר המינימלי של פנים שזוהו עבור אדם כדי שיוצג", "minimize": "מזער", "minute": "דקה", "minutes": "דקות", @@ -1367,8 +1449,10 @@ "mobile_app": "אפליקציה לטלפון", "mobile_app_download_onboarding_note": "הורד את האפליקציה המלווה באחת מהאפשרויות הבאות", "model": "דגם", + "modify_date": "תאריך שינוי", "month": "חודש", "more": "עוד", + "motion": "תנועה", "move": "העבר", "move_off_locked_folder": "הוצאה מהתיקייה הנעולה", "move_to": "העבר ל", @@ -1395,6 +1479,7 @@ "never": "אף פעם", "new_album": "אלבום חדש", "new_api_key": "מפתח API חדש", + "new_feature": "תכונה חדשה", "new_password": "סיסמה חדשה", "new_person": "אדם חדש", "new_pin_code": "קוד PIN חדש", @@ -1432,13 +1517,19 @@ "no_results": "אין תוצאות", "no_results_description": "נסה להשתמש במילה נרדפת או במילת מפתח יותר כללית", "no_shared_albums_message": "צור אלבום כדי לשתף תמונות וסרטונים עם אנשים ברשת שלך", + "no_steps": "טרם נוספו שלבים", "none": "אף אחד", "not_allowed": "לא מורשה", "not_available": "לא רלוונטי", "not_in_any_album": "לא בשום אלבום", "not_selected": "לא נבחרו", + "not_set": "לא מוגדר", "notes": "הערות", "nothing_here_yet": "אין כאן כלום עדיין", + "notification_backup_reliability": "הפעלת התראות לשיפור אמינות הגיבוי ברקע", + "notification_enabled_list_tile_content": "Immich משתמש בהתראות לצורך גיבוי ברקע. ניתן לנהל אותן בהגדרות המכשיר.", + "notification_enabled_list_tile_open_button": "פתח הגדרות", + "notification_enabled_list_tile_title": "התראות מופעלות", "notification_permission_dialog_content": "כדי לאפשר התראות, לך להגדרות המכשיר ובחר אפשר.", "notification_permission_list_tile_content": "הענק הרשאה כדי לאפשר התראות.", "notification_permission_list_tile_enable_button": "אפשר התראות", @@ -1450,6 +1541,8 @@ "obtainium_configurator": "הגדרות Obtainium", "obtainium_configurator_instructions": "השתמש ב-Obtainium כגדי להתקין ולעדכן את אפליקציית האנדרואיד ישירות לגרסאות הגיטהאב של Immich. צור מפתח API ובחר וריאנט כדי ליצור קישור קונפיגורציה עבור Obtainium", "ocr": "OCR", + "ocr_body": "Immich קורא כעת את הטקסט שבתוך התמונות שלך, כך שתוכל לחפש אותן לפי התוכן הכתוב בהן.", + "ocr_title": "חפש טקסט בתוך התמונות שלך", "official_immich_resources": "מקורות רשמיים של Immich", "offline": "לא מקוון", "offset": "קיזוז", @@ -1468,6 +1561,8 @@ "open": "פתח", "open_calendar": "פתיחת לוח שנה", "open_in_browser": "פתיחה בדפדפן", + "open_in_immich_body": "הגדר את Immich כגלריה שלך ב־Android כדי לפתוח תמונות ישירות מאפליקציות אחרות.", + "open_in_immich_title": "פתח תמונות ב Immich", "open_in_map_view": "פתח בתצוגת מפה", "open_in_openstreetmap": "פתח ב-OpenStreetMap", "open_the_search_filters": "פתח את מסנני החיפוש", @@ -1476,6 +1571,7 @@ "organize_into_albums": "ארגן בתוך אלבומים", "organize_into_albums_description": "שים תמונות קיימות בתוך אלבומים באמצעות הגדרות הסנכרון הנוכחיות", "organize_your_library": "ארגן את הספרייה שלך", + "orientation": "כיוון", "original": "מקורי", "other": "אחר", "other_devices": "מכשירים אחרים", @@ -1524,7 +1620,7 @@ "person": "אדם", "person_age_months": "{months, plural, one {חודש #} other {# חודשים}}", "person_age_year_months": "בגיל שנה ו{months, plural, one {חודש #} other {# חודשים}}", - "person_age_years": "בגיל {years, plural, other {# שנים}}", + "person_age_years": "בגיל {years, plural,one{#שנה}, other {# שנים}}", "person_birthdate": "נולד בתאריך {date}", "person_hidden": "{name}{hidden, select, true { (מוסתר)} other {}}", "person_recognized": "זוהה אדם", @@ -1550,6 +1646,8 @@ "play_original_video_setting_description": "העדף לנגן סרטונים המקוריים על פני סרטונים משועתקים. אם הסרטון המקורי אינו תואם הוא עלול להתנגן לא נכון.", "play_transcoded_video": "נגן סרטון משועתק", "please_auth_to_access": "אנא אמת את זהותך כדי לגשת", + "plugin_method_filter_type": "מסנן", + "plugin_method_filter_type_description": "שיטה זו יכולה לסנן אירועים ולמנוע באופן מותנה את הפעלת השלבים הבאים", "port": "יציאה", "preferences_settings_subtitle": "ניהול העדפות יישום", "preferences_settings_title": "העדפות", @@ -1570,6 +1668,7 @@ "profile_drawer_readonly_mode": "מצב לקריאה בלבד מופעל. לחץ לחיצה ארוכה על סמל היצגן של המשתמש כדי לצאת.", "profile_image_of_user": "תמונת פרופיל של {user}", "profile_picture_set": "תמונת פרופיל נבחרה.", + "projection_type": "סוג הקרנה", "public_album": "אלבום ציבורי", "public_share": "שיתוף ציבורי", "purchase_account_info": "תומך", @@ -1622,7 +1721,10 @@ "recent": "חדש", "recent_searches": "חיפושים אחרונים", "recently_added": "נוסף לאחרונה", + "recently_added_body": "עבור ישירות לכל מה שהוספת לאחרונה בעמוד ייעודי.", + "recently_added_description": "עיין בתמונות שלך כשהם ממוינות לפי מועד העלאתם ל־Immich", "recently_added_page_title": "נוסף לאחרונה", + "recently_added_title": "נוספו לאחרונה", "recently_taken": "צולם לאחרונה", "refresh": "רענון", "refresh_encoded_videos": "רענון סרטונים מקודדים", @@ -1642,6 +1744,7 @@ "remove_assets_shared_link_confirmation": "האם ברצונך להסיר {count, plural, one {תמונה #} other {# תמונות}} מהקישור המשותף הזה?", "remove_assets_title": "להסיר תמונות?", "remove_custom_date_range": "הסרת טווח תאריכים מותאם", + "remove_filter": "הסר מסנן", "remove_from_album": "הסרה מאלבום", "remove_from_album_action_prompt": "{count} הוסרו מהאלבום", "remove_from_favorites": "הסרה מהמועדפים", @@ -1704,6 +1807,7 @@ "scan_library": "סרוק", "scanning": "בתהליך סריקה", "scanning_for_album": "סורק אחר אלבום...", + "screencast_mode_description": "הצג מחווני אירועי מקלדת ועכבר על המסך", "screencast_mode_title": "כבה/הפעל מצב שידור מסך", "search": "חיפוש", "search_albums": "חיפוש אלבומים", @@ -1712,6 +1816,8 @@ "search_by_description_example": "יום טיול בסאפה", "search_by_filename": "חיפוש לפי שם קובץ או סיומת", "search_by_filename_example": "לדוגמא IMG_1234.JPG או PNG", + "search_by_full_path": "חפש לפי נתיב מלא או תיקייה", + "search_by_full_path_example": "/John/Projects/3D_Printing/2026-07-01 — ניתן לחפש לפי Projects, 3D, Printing, 2026 וכו׳.", "search_by_ocr": "חיפוש לפי OCR", "search_by_ocr_example": "לאטה", "search_camera_lens_model": "חיפוש סוג עדשה...", @@ -1773,6 +1879,7 @@ "select_person": "בחירת אדם", "select_person_to_tag": "בחר אדם לתיוג", "select_photos": "בחר תמונות", + "select_quality": "בחר איכות", "select_trash_all": "בחר העבר הכל לאשפה", "selected": "נבחרו", "selected_count": "{count, plural, other {# נבחרו}}", @@ -1822,6 +1929,10 @@ "share": "שתף", "share_dialog_preparing": "מכין...", "share_link": "שתף קישור", + "share_original": "השתמש במקור (גדול)", + "share_preview": "השתמש בתמונה ממוזערת (קטנה)", + "share_quality_body": "לחץ לחיצה ארוכה על כפתור השיתוף כדי לבחור את איכות התמונה לפני השיתוף.", + "share_quality_title": "בחר את איכות השיתוף שלך", "shared": "משותף", "shared_album_activities_input_disable": "התגובה מושבתת", "shared_album_activity_remove_content": "האם ברצונך למחוק את הפעילות הזאת?", @@ -1836,7 +1947,9 @@ "shared_link_app_bar_title": "קישורים משותפים", "shared_link_clipboard_copied_massage": "הועתק ללוח", "shared_link_create_error": "שגיאה ביצירת קישור משותף", - "shared_link_custom_url_description": "גש לקישור ששותף באמצעות כתובת URL מותאמת אישית", + "shared_link_custom_url_description": "גש לקישור ששותף באמצעות שם כתובת URL מותאמת אישית", + "shared_link_custom_url_title": "URL מותאם אישית", + "shared_link_custom_url_warning": "אזהרה: URL מותאם אישית עם לוכסן קדמי עלול להתנהג שלא כמצופה.", "shared_link_edit_description_hint": "הכנס את תיאור השיתוף", "shared_link_edit_expire_after_option_day": "1 יום", "shared_link_edit_expire_after_option_days": "{count} ימים", @@ -1881,7 +1994,9 @@ "show_in_timeline": "הצג בציר הזמן", "show_in_timeline_setting_description": "הצג תמונות וסרטונים ממשתמש זה בציר הזמן שלך", "show_keyboard_shortcuts": "הצג קיצורי מקלדת", + "show_less": "הצג פחות", "show_metadata": "הצג מטא-נתונים", + "show_more_fields": "{count, plural, one {הצג עוד שדה אחד} other {הצג עוד # שדות}}", "show_or_hide_info": "הצג או הסתר מידע", "show_password": "הראה סיסמה", "show_person_options": "הצג אפשרויות אדם", @@ -1889,6 +2004,7 @@ "show_schema": "הצגת תרשים", "show_search_options": "הצג אפשרויות חיפוש", "show_shared_links": "הצג קישורים משותפים", + "show_slideshow_metadata_overlay": "הצג שכבת מידע על התמונה", "show_slideshow_transition": "הצג מעבר מצגת", "show_supporter_badge": "תג תומך", "show_supporter_badge_description": "הצג תג תומך", @@ -1900,13 +2016,21 @@ "sign_out": "יציאה מהמערכת", "sign_up": "הרשמה", "size": "גודל", + "skip": "דלג", "skip_to_content": "דלג לתוכן", "skip_to_folders": "דלג לתיקיות", "skip_to_tags": "דלג לתגים", "slideshow": "מצגת שקופיות", + "slideshow_body": "שב בנוחות וצפה בתמונות שלך מוצגות במצגת שקופיות במסך מלא.", + "slideshow_metadata_overlay_mode": "שכבת תוכן", + "slideshow_metadata_overlay_mode_description_only": "תיאור בלבד", + "slideshow_metadata_overlay_mode_full": "מלא", "slideshow_repeat": "חזרה על מצגת", "slideshow_repeat_description": "חזרה להתחלה כאשר המצגת נגמרת", "slideshow_settings": "הגדרות מצגת שקופיות", + "slideshow_title": "מצגת שקופיות", + "smart_album": "אלבום חכם", + "some_assets_already_have_a_location_warning": "לחלק מהתמונות שנבחרו כבר קיים מיקום", "sort_albums_by": "מיין אלבומים לפי...", "sort_created": "תאריך יצירה", "sort_items": "מספר פריטים", @@ -1927,6 +2051,10 @@ "start_date_before_end_date": "תאריך ההתחלה חייב להיות לפני תאריך הסיום", "state": "מדינה", "status": "מצב", + "step_delete": "מחיקת שלב", + "step_delete_confirm": "האם אתה בטוח שברצונך למחוק שלב זה?", + "step_details": "פרטי השלב", + "steps": "שלבים", "stop_casting": "הפסקת שידור", "stop_motion_photo": "עצור תמונה עם תנועה", "stop_photo_sharing": "להפסיק לשתף את התמונות שלך?", @@ -2007,10 +2135,12 @@ "trash_page_info": "פריטים באשפה ימחקו לצמיתות לאחר {days} ימים", "trashed_items_will_be_permanently_deleted_after": "פריטים באשפה ימחקו לצמיתות לאחר {days, plural, one {יום #} other {# ימים}}.", "trigger": "טריגר", - "trigger_asset_uploaded": "נכס הועלה", + "trigger_asset_metadata_extraction": "חילוץ מטא־נתונים של תמונות", + "trigger_asset_metadata_extraction_description": "מופעל כאשר מטא־נתוני EXIF של תמונות מחולצים", + "trigger_asset_uploaded": "תוכן עולה", "trigger_asset_uploaded_description": "מתעורר כאשר נכס חדש הועלה", "trigger_person_recognized": "זוהה אדם", - "trigger_person_recognized_description": "מתעורר כאשר זוהה אדם", + "trigger_person_recognized_description": "מופעל כאשר אדם זוהה", "troubleshoot": "פתור בעיות", "type": "סוג", "unable_to_change_pin_code": "לא ניתן לשנות את קוד ה PIN", @@ -2026,6 +2156,7 @@ "unknown": "לא ידוע", "unknown_country": "מדינה לא ידועה", "unknown_date": "תאריך לא ידוע", + "unknown_schema": "סכימה לא ידועה", "unknown_year": "שנה לא ידועה", "unlimited": "בלתי מוגבל", "unlink_motion_video": "בטל קישור סרטון תנועה", @@ -2050,6 +2181,7 @@ "updated_password": "סיסמה עודכנה", "upload": "העלאה", "upload_concurrency": "מספר העלאות במקביל", + "upload_day_count": "{date}: {count, plural, one {# העלאה} other {# העלאות}}", "upload_details": "פרטי העלאה", "upload_error_with_count": "שגיאת העלאה עבור {count, plural, one {נכס אחד} other {# נכסים}}", "upload_errors": "העלאה הושלמה עם {count, plural, one {שגיאה #} other {# שגיאות}}, רענן את הדף כדי לראות תמונות שהועלו.", @@ -2060,9 +2192,13 @@ "upload_status_errors": "שגיאות", "upload_status_uploaded": "הועלה", "upload_success": "ההעלאה בוצעה בהצלחה. רענן את הדף כדי לצפות בתמונות שהועלו.", + "upload_to_album_body": "עבור משתמשים שאינם משתמשים בתכונת ההעלאה הידנית, ניתן כעת לבחור להוסיף תמונות מקומיות ישירות לאלבום במהלך ההעלאה, ואין עוד צורך להעלות אותן ואז להוסיף לאלבום מאוחר יותר.", + "upload_to_album_title": "העלה ישירות לאלבום", "upload_to_immich": "העלה לשרת ({count})", "uploading": "מעלה", "uploading_media": "מעלה מדיה", + "uploads": "העלאות", + "uploads_count": "{count, plural, one {# העלאה} other {# העלאות}}", "url": "URL", "usage": "שימוש", "use_biometric": "השתמש באימות ביומטרי", @@ -2070,6 +2206,7 @@ "use_browser_locale_description": "עיצוב תאריכים, זמנים, ומספרים בהתבסס על אזור השפה של הדפדפן שלך", "use_current_connection": "שימוש בחיבור הנוכחי", "use_custom_date_range": "השתמש בטווח תאריכים מותאם במקום", + "use_template": "השתמש בתבנית", "user": "משתמש", "user_has_been_deleted": "משתמש זה נמחק.", "user_id": "מזהה משתמש", @@ -2097,6 +2234,7 @@ "video": "סרטון", "video_hover_setting": "הפעל תצוגת סרטון מקדימה בעת ריחוף", "video_hover_setting_description": "הפעל תצוגת סרטון מקדימה כאשר העכבר מרחף מעל פריט. אפילו כשהגדרה זו מושבתת, ניתן להתחיל את הניגון על ידי ריחוף מעל סמל ההפעלה.", + "video_quality": "איכות וידאו", "videos": "סרטונים", "videos_count": "{count, plural, one {סרטון #} other {# סרטונים}}", "view": "הצג", @@ -2123,8 +2261,13 @@ "week": "שבוע", "welcome": "ברוכים הבאים", "welcome_to_immich": "ברוכים הבאים אל immich", + "whats_new": "מה חדש", + "whats_new_settings_subtitle": "ראה מה חדש ב־Immich", + "whats_new_version": "גרסה {version}", + "when": "מתי", "width": "רוחב", "wifi_name": "שם הרשת האלחוטית", + "workflow": "זרימת עבודה", "workflow_delete_prompt": "האם ברצונך למחוק את זרימת העבודה הזו?", "workflow_deleted": "זרימת העבודה נמחקה", "workflow_description": "תיאור זרימת העבודה", @@ -2134,10 +2277,12 @@ "workflow_name": "שם זרימת העבודה", "workflow_navigation_prompt": "האם ברצונך לעזוב מבלי לשמור את השינויים שלך?", "workflow_summary": "סיכום זרימת העבודה", + "workflow_templates": "תבניות של זרימת עבודה", "workflow_update_success": "זרימת העבודה עודכנה בהצלחה", "workflows": "זרימות עבודה", "workflows_help_text": "זרימות עבודה מאטמטות פעולות על הנכסים שלך בהתבסס על טריגרים ומסננים", "wrong_pin_code": "קוד PIN שגוי", + "x_of_total": "{x}/{total}", "year": "שנה", "years_ago": "לפני {years, plural, one {שנה #} other {# שנים}}", "yes": "כן", diff --git a/i18n/hi.json b/i18n/hi.json index 1bddcd3b25..5fc09c0c00 100644 --- a/i18n/hi.json +++ b/i18n/hi.json @@ -72,6 +72,7 @@ "cron_expression_description": "क्रॉन प्रारूप का उपयोग करके स्कैनिंग अंतराल सेट करें। अधिक जानकारी के लिए कृपया क्रोनटैब गुरु देखें", "cron_expression_presets": "क्रॉन अभिव्यक्ति प्रीसेट", "disable_login": "लॉगिन अक्षम करें", + "download_csv": "सीएसवी डाउनलोड करें", "duplicate_detection_job_description": "समान छवियों का पता लगाने के लिए संपत्तियों पर मशीन लर्निंग चलाएं। यह कार्यक्षमता स्मार्ट खोज पर निर्भर करती है", "exclusion_pattern_description": "Exclusion पैटर्न आपको अपनी लाइब्रेरी को स्कैन करते समय फ़ाइलों और फ़ोल्डरों को अनदेखा करने देता है। यह उपयोगी है यदि आपके पास ऐसे फ़ोल्डर हैं जिनमें ऐसी फ़ाइलें हैं जिन्हें आप आयात नहीं करना चाहते हैं, जैसे RAW फ़ाइलें।", "export_config_as_json_description": "वर्तमान सिस्टम कॉन्फ़िगरेशन को JSON फ़ाइल के रूप में डाउनलोड करें", @@ -106,6 +107,7 @@ "image_thumbnail_quality_description": "थंबनेल की गुणवत्ता 1-100 तक। उच्चतर बेहतर है, लेकिन बड़ी फ़ाइलें बनाता है और ऐप की प्रतिक्रियाशीलता को कम कर सकता है।", "image_thumbnail_title": "थंबनेल सेटिंग्स", "import_config_from_json_description": "JSON कॉन्फ़िगरेशन फ़ाइल अपलोड करके सिस्टम कॉन्फ़िगरेशन इंपोर्ट करें", + "integrity_checks_checksum_files_time_limit": "समय सीमा", "job_concurrency": "{job} समरूपता", "job_created": "नौकरी बनाई गई", "job_not_concurrency_safe": "यह कार्य (जॉब) समवर्ती-सुरक्षित नहीं है।", @@ -752,7 +754,6 @@ "custom_date": "मनचाही तिथि", "custom_locale": "कस्टम लोकेल", "custom_locale_description": "भाषा और क्षेत्र के आधार पर दिनांक और संख्याएँ प्रारूपित करें", - "custom_url": "कस्टम URL", "cutoff_date_description": "पिछले कितने फ़ोटो रखें…", "cutoff_day": "{count, plural, one {दिन} other {दिन}}", "cutoff_year": "{count, plural, one {वर्ष} other {वर्ष}}", diff --git a/i18n/hr.json b/i18n/hr.json index a86d70bf2f..5af7b6790d 100644 --- a/i18n/hr.json +++ b/i18n/hr.json @@ -108,6 +108,21 @@ "image_thumbnail_quality_description": "Kvaliteta sličica od 1-100. Više je bolje, ali proizvodi veće datoteke i može smanjiti odziv aplikacije.", "image_thumbnail_title": "Postavke sličica", "import_config_from_json_description": "Učitaj konfiguraciju sustava učitavanjem JSON datoteke konfiguracije", + "integrity_checks_checksum_files": "Provjeri kontrolni broj datoteka", + "integrity_checks_checksum_files_description": "Kofiguriraj provjeru kontrolnog broja", + "integrity_checks_checksum_files_enable_description": "Omogući provjeru kontrolnog broja", + "integrity_checks_checksum_files_percentage_limit": "Postotno ograničenje", + "integrity_checks_checksum_files_percentage_limit_description": "Konfiguriraj maksimalni postotak, između 0.01 i 1, za koliko se provjera kontrolnog zbroja treba izvršavati u svakom intervalu.", + "integrity_checks_checksum_files_time_limit": "Ograničenje vremena", + "integrity_checks_checksum_files_time_limit_description": "Konfiguriraj maksimalno trajanje provjere kontrolnog broja u svakom intervala. (ms)", + "integrity_checks_missing_files": "Nedostajuće datoteke", + "integrity_checks_missing_files_description": "Konfiguriraj frekvenciju i upali/izgasi provjeru nedostajućih datoteka", + "integrity_checks_missing_files_enable_description": "Upali provjeru nedostajućih datoteka", + "integrity_checks_settings": "Provjere integriteta", + "integrity_checks_settings_description": "Upravljaj intervalima za provjeru integriteta", + "integrity_checks_untracked_files": "Nepraćene datoteke", + "integrity_checks_untracked_files_description": "Konfiguriraj frekvenciju i upali/izgasi provjeru nepraćenih datoteka", + "integrity_checks_untracked_files_enable_description": "Upali provjeru nepraćenih datoteka", "job_concurrency": "{job} istovremenost", "job_created": "Zadatak je kreiran", "job_not_concurrency_safe": "Ovaj posao nije siguran za istovremenost.", @@ -194,6 +209,14 @@ "maintenance_integrity_checksum_mismatch_job": "Provjera za nepodudaranje kontrolnih zbrojeva", "maintenance_integrity_checksum_mismatch_refresh_job": "Osvježi izvještaje nepodudaranja kontrolnih zbrojeva", "maintenance_integrity_missing_file": "Nedostaju datoteke", + "maintenance_integrity_missing_file_description": "Datoteke koje je Immich zabilježio u svojoj bazi podataka ali koje ne postoje na datotečnom sustavu.", + "maintenance_integrity_missing_file_job": "Provjeri nedostajuće datoteke", + "maintenance_integrity_missing_file_refresh_job": "Osvježi izvještaje o nedostajućim datotekama", + "maintenance_integrity_report": "Izvještaj Integriteta", + "maintenance_integrity_untracked_file": "Nepraćene Datoteke", + "maintenance_integrity_untracked_file_description": "Datoteke u Immich direktorijima koje Immich nije zabilježio.", + "maintenance_integrity_untracked_file_job": "Provjeri nepraćene datoteke", + "maintenance_integrity_untracked_file_refresh_job": "Osvježi izvještaje o nepraćenim datotekama", "maintenance_restore_backup": "Vrati sigurnosnu kopiju", "maintenance_restore_backup_description": "Immich će biti obrisan i vraćen iz odabrane sigurnosne kopije. Prije nastavka izradit će se nova sigurnosna kopija.", "maintenance_restore_backup_different_version": "Ova sigurnosna kopija izrađena je s drugom verzijom Immicha!", @@ -281,6 +304,7 @@ "oauth_mobile_redirect_uri": "Mobilnog Preusmjeravanja URI", "oauth_mobile_redirect_uri_override": "Nadjačavanje URI-preusmjeravanja za mobilne uređaje", "oauth_mobile_redirect_uri_override_description": "Omogući kada pružatelj OAuth ne dopušta mobilni URI, poput ''{callback}''", + "oauth_prompt_description": "Parametri upita (npr. select_account, login, consent)", "oauth_role_claim": "Dodjela uloge", "oauth_role_claim_description": "Automatski dodijeli administratorski pristup na temelju prisutnosti ove tvrdnje. Tvrdnja može sadržavati ili 'user' ili 'admin'.", "oauth_settings": "OAuth", @@ -307,6 +331,8 @@ "refreshing_all_libraries": "Osvježavanje svih biblioteka", "registration": "Registracija administratora", "registration_description": "Budući da ste prvi korisnik na sustavu, bit ćete dodijeljeni administratorsku ulogu i odgovorni ste za administrativne poslove, a dodatne korisnike kreirat ćete sami.", + "release_channel_release_candidate": "Kandidat za izdanje", + "release_channel_stable": "Stabilno", "remove_failed_jobs": "Makni neuspješne poslove", "require_password_change_on_login": "Zahtijevajte od korisnika promjenu lozinke pri prvoj prijavi", "reset_settings_to_default": "Vrati postavke na zadane", @@ -355,7 +381,7 @@ "template_settings": "Predložak Obavijesti", "template_settings_description": "Upravljaj prilagođenim predlošcima za obavijesti", "theme_custom_css_settings": "Prilagođeni CSS", - "theme_custom_css_settings_description": "Kaskadni stilovi (CSS) omogućavaju prilagođavanje dizajna Immich-a.", + "theme_custom_css_settings_description": "Kaskadni Stilovi (CSS) omogućavaju prilagođavanje dizajna Immich-a.", "theme_settings": "Postavke tema", "theme_settings_description": "Upravljajte prilagodbom Immich web sučelja", "thumbnail_generation_job": "Generirajte sličice", @@ -401,6 +427,14 @@ "transcoding_preferred_hardware_device_description": "Odnosi se samo na VAAPI i QSV. Postavlja dri node koji se koristi za hardversko transkodiranje.", "transcoding_preset_preset": "Preset (-preset)", "transcoding_preset_preset_description": "Brzina kompresije. Sporije postavke proizvode manje datoteke i povećavaju kvalitetu pri ciljanju određene postavke bitratea. VP9 zanemaruje brzine iznad 'brže'.", + "transcoding_realtime": "Transkodiranje u stvarnom vremenu [EKSPERIMENTALNO]", + "transcoding_realtime_description": "Omogućuje transkodiranje u stvarnom vremenu tijekom slanja videozapisa. Omogućuje promjenu kvalitete, no može uzrokovati veće kašnjenje reprodukcije i štopanje, ovisno o mogućnostima poslužitelja.", + "transcoding_realtime_enabled": "Upali transkodiranje u stvarnom vremenu", + "transcoding_realtime_enabled_description": "Ako je izgašeno, poslužitelj će početi da odbija stvaranje novih sesija transkodiranja u stvarnom vremenu.", + "transcoding_realtime_resolutions": "Rezolucije", + "transcoding_realtime_resolutions_description": "Rezolucije ponuđene za transkodiranje u stvarnom vremenu. Veće rezolucije mogu uzrokovati probleme s reprodukcijom ako ih poslužitelj ne može dovoljno brzo transkodirati.", + "transcoding_realtime_video_codecs": "Video kodeci", + "transcoding_realtime_video_codecs_description": "Video kodeci dostupni za transkodiranje u stvarnom vremenu. Klijenti će tijekom reprodukcije odabrati najbolju opciju koju podržavaju. AV1 je učinkovitiji od HEVC-a, koji je učinkovitiji od H.264. Pri korištenju hardverskog ubrzanja, odaberite samo one kodeke koje akcelerator može kodirati. Kod softverskog transkodiranja imajte na umu da je H.264 brži od AV1, koji je brži od HEVC-a.", "transcoding_reference_frames": "Referentne slike", "transcoding_reference_frames_description": "Broj slika za referencu prilikom komprimiranja određene slike. Više vrijednosti poboljšavaju učinkovitost kompresije, ali usporavaju kodiranje. 0 automatski postavlja ovu vrijednost.", "transcoding_required_description": "Samo videozapisi koji nisu u prihvaćenom formatu", @@ -444,6 +478,8 @@ "user_settings_description": "Upravljanje korisničkim postavkama", "user_successfully_removed": "Korisnik {email} je uspješno uklonjen.", "users_page_description": "Administracija korisnika stranica", + "version_check_channel": "Kanal za izdavanje", + "version_check_channel_description": "Odaberite kanal izdavanja za koji želite primati obavijesti o verzijama", "version_check_enabled_description": "Omogući provjeru verzije", "version_check_implications": "Značajka provjere verzije oslanja se na periodičnu komunikaciju s {server}", "version_check_settings": "Provjera verzije", @@ -522,6 +558,7 @@ "app_bar_signout_dialog_title": "Odjavi se", "app_download_links": "Poveznica za preuzimanje aplikacije", "app_settings": "Postavke aplikacije", + "app_stores": "Trgovine Aplikacija", "app_update_available": "Ažuriranje aplikacije je dostupno", "appears_in": "Pojavljuje se u", "apply_count": "Primijeni ({count, number})", @@ -537,6 +574,7 @@ "asset_added_to_album": "Dodano u album", "asset_adding_to_album": "Dodavanje u album…", "asset_created": "Stavka stvorena", + "asset_day_count": "{date}: {count, plural, one {# stavka} few {# stavke} other {# stavki}}", "asset_description_updated": "Opis stavke je ažuriran", "asset_hashing": "Hashiranje…", "asset_list_group_by_sub_title": "Grupiraj po", @@ -559,6 +597,7 @@ "asset_viewer_settings_title": "Preglednik stavki", "assets": "Stavke", "assets_added_to_album_count": "{count, plural, one {Dodana # stavka} few {Dodane # stavke} other {Dodano # stavki}} u album", + "assets_added_to_album_partial_count": "Dodano je {successCount} od {totalCount} {totalCount, plural, one {stavke} few {stavke} other {stavki}} u album", "assets_added_to_albums_count": "{assetTotal, plural, one {Dodana # stavka} other {Dodano # stavki}} u {albumTotal, plural, one {# album} other {# albuma}}", "assets_cannot_be_added_to_album_count": "{count, plural, one {Stavka se ne može} other {Stavke se ne mogu}} dodati u album", "assets_cannot_be_added_to_albums": "{count, plural, one {Stavka se ne može} few {Stavke se ne mogu} other {Stavki se ne može}} dodati ni u jedan album", @@ -586,7 +625,7 @@ "backup_album_selection_page_assets_scatter": "Stavke se mogu raspršiti po više albuma. Stoga se albumi mogu uključiti ili isključiti tijekom postupka sigurnosnog kopiranja.", "backup_album_selection_page_select_albums": "Odabrani albumi", "backup_album_selection_page_selection_info": "Informacije o odabiru", - "backup_albums_sync": "Sinkronizacija sigurnosnih kopija albuma", + "backup_albums_sync": "Sinkronizacija Sigurnosnih Kopija Albuma", "backup_background_service_complete_notification": "Sigurnosno kopiranje stavki dovršeno", "backup_background_service_default_notification": "Provjera novih stavki…", "backup_background_service_in_progress_notification": "Sigurnosno kopiranje vaših stavki…", @@ -612,12 +651,14 @@ "backup_options": "Opcije sigurnosne kopije", "backup_settings_subtitle": "Upravljaj postavkama slanja", "backward": "Unazad", + "battery_optimization_backup_reliability": "Onemogućivanje optimizacije baterije može poboljšati pouzdanost sigurnosnog kopiranja u pozadini", "biometric_auth_enabled": "Biometrijska autentikacija omogućena", "biometric_locked_out": "Zaključani ste iz biometrijske autentikacije", "biometric_no_options": "Nema dostupnih biometrijskih opcija", "biometric_not_available": "Biometrijska autentikacija nije dostupna na ovom uređaju", "birthdate_set_description": "Datum rođenja se koristi za izračunavanje godina ove osobe u trenutku fotografije.", "blurred_background": "Zamućena pozadina", + "browse_templates": "Pregledaj predloške", "bugs_and_feature_requests": "Bugovi i zahtjevi za značajke", "build": "Sagradi (Build)", "build_image": "Sagradi (Build) Image", @@ -637,6 +678,7 @@ "cannot_update_the_description": "Nije moguće ažurirati opis", "cast": "Prijenos na uređaj (Cast)", "cast_description": "Konfigurirajte dostupna odredišta za prijenos (cast)", + "change": "Izmijeni", "change_date": "Promjena datuma", "change_description": "Promijeni opis", "change_display_order": "Promijeni redoslijed prikaza", @@ -659,6 +701,7 @@ "charging_requirement_mobile_backup": "Za izradu sigurnosne kopije u pozadini potrebno je punjenje uređaja", "check_logs": "Provjera Zapisa", "checksum": "Kontrolni zbroj", + "choose": "Izaberi", "choose_matching_people_to_merge": "Odaberite odgovarajuće osobe za spajanje", "city": "Grad", "cleanup_confirm_description": "Immich je pronašao {count} stavki (stvorene prije {date}) sigurno spremljene na serveru. Ukloni lokalne kopije s ovog uređaja?", @@ -676,6 +719,7 @@ "clear": "Očisti", "clear_all": "Očisti sve", "clear_all_recent_searches": "Izbriši sva nedavna pretraživanja", + "clear_failed_count": "Čišćenje nije uspjelo ({count})", "clear_file_cache": "Očisti predmemoriju datoteka", "clear_message": "Jasna poruka", "clear_value": "Očisti vrijednost", @@ -703,6 +747,7 @@ "comments_are_disabled": "Komentari onemogućeni", "common_create_new_album": "Kreiraj novi album", "completed": "Dovršeno", + "configuration": "Konfiguracija", "confirm": "Potvrdi", "confirm_admin_password": "Potvrdite lozinku administratora", "confirm_delete_face": "Jeste li sigurni da želite izbrisati lice {name} iz stavke?", @@ -717,6 +762,7 @@ "contain": "Sadrži", "context": "Kontekst", "continue": "Nastavi", + "control_bottom_app_bar_add_tags": "Dodaj Oznake", "control_bottom_app_bar_delete_from_local": "Izbriši s uređaja", "control_bottom_app_bar_edit_location": "Uredi lokaciju", "control_bottom_app_bar_edit_time": "Uredi datum i vrijeme", @@ -725,6 +771,7 @@ "copied_to_clipboard": "Kopirano u međuspremnik!", "copy_error": "Greška kopiranja", "copy_image": "Kopiraj Sliku", + "copy_json": "Kopiraj JSON", "copy_link": "Kopiraj poveznicu", "copy_link_to_clipboard": "Kopiraj poveznicu u međuspremnik", "copy_password": "Kopiraj lozinku", @@ -736,6 +783,7 @@ "create_album": "Kreiraj album", "create_album_page_untitled": "Bez naslova", "create_api_key": "Izradi API ključ", + "create_first_workflow": "Napravite prvi radni proces", "create_library": "Kreiraj Biblioteku", "create_link": "Kreiraj poveznicu", "create_link_to_share": "Izradite vezu za dijeljenje", @@ -752,6 +800,7 @@ "create_tag": "Stvori oznaku", "create_tag_description": "Napravite novu oznaku. Za ugniježđene oznake unesite punu putanju oznake uključujući kose crte.", "create_user": "Stvori korisnika", + "create_workflow": "Napravite radni proces", "created": "Stvoreno", "created_at": "Kreirano", "creating_linked_albums": "Izradi povezane albume...", @@ -765,7 +814,6 @@ "custom_date": "Specifičan datum", "custom_locale": "Prilagođena lokalizacija", "custom_locale_description": "Formatiranje datuma, vremena i brojeva na temelju selektiranog jezika i regije", - "custom_url": "Prilagođena URL adresa", "cutoff_date_description": "Zadrži slike od zadnjih…", "cutoff_day": "{count, plural, one {dan} other {dana}}", "cutoff_year": "{count, plural, one {godina} other {godine}}", @@ -775,11 +823,15 @@ "date_after": "Datum nakon", "date_and_time": "Datum i Vrijeme", "date_before": "Datum prije", + "date_of_birth": "Datum rođenja", "date_of_birth_saved": "Datum rođenja uspješno spremljen", "date_range": "Razdoblje", + "date_time_original": "Datum/Vrijeme Originala", "day": "Dan", "days": "Dani", "deduplicate_all": "Dedupliciraj Sve", + "default_quality_subtitle": "Kvaliteta koja se koristi pri dijeljenju. Pritisnite i držite pritisnutim gumb za dijeljenje kako biste svaki put mogli odabrati.", + "default_share_quality": "Zadana kvaliteta dijeljenja", "delete": "Izbriši", "delete_action_confirmation_message": "Jeste li sigurni da želite izbrisati ovu stavku? Ova radnja će premjestiti stavku u smeće poslužitelja i pitati vas želite li ju izbrisati lokalno", "delete_action_prompt": "{count} izbrisano", @@ -841,7 +893,10 @@ "downloading_asset_filename": "Preuzimanje stavke {filename}", "downloading_from_icloud": "Preuzmi s iCloud", "downloading_media": "Preuzimanje medija", + "drag_to_reorder": "Povucite za promjenu redoslijeda", "drop_files_to_upload": "Ispustite datoteke bilo gdje za prijenos", + "duplicate": "Dupliciraj", + "duplicate_workflow": "Dupliciraj radni proces", "duplicates": "Duplikati", "duplicates_description": "Razriješite svaku grupu tako da naznačite koji su duplikati, ako ih ima.", "duration": "Trajanje", @@ -866,10 +921,19 @@ "edit_tag": "Uredi oznaku", "edit_title": "Uredi Naslov", "edit_user": "Uredi korisnika", + "edit_workflow": "Uredi radni proces", "editor": "Urednik", "editor_discard_edits_confirm": "Odbaci izmjene", "editor_discard_edits_prompt": "Imate nesačuvane izmjene. Jeste li sigurni da ih želite odbaciti?", "editor_discard_edits_title": "Odbaci izmjene?", + "editor_edits_applied_error": "Greška pri spremanju izmjena", + "editor_edits_applied_success": "Izmjene uspješno spremljene", + "editor_flip_horizontal": "Vodoravno zrcaljenje", + "editor_flip_vertical": "Vertikalno zrcaljenje", + "editor_handle_corner": "{corner, select, top_left {Gornja lijeva} top_right {Gornja desna} bottom_left {Donja lijeva} bottom_right {Donja desna} other {A}} kutna ručka", + "editor_handle_edge": "{edge, select, top {Gornja} bottom {Donja} left {Lijeva} right {Desna} other {Bilo koja}} rubna ručka", + "editor_orientation": "Orijentacija", + "editor_reset_all_changes": "Poništi promjene", "editor_rotate_left": "Rotiraj 90° u suprotnom smjeru kazaljke na satu", "editor_rotate_right": "Rotiraj 90° u smjeru kazaljke na satu", "email": "E-pošta", @@ -888,8 +952,10 @@ "enter_your_pin_code_subtitle": "Unesite svoj PIN kod za pristup zaključanoj mapi", "error": "Greška", "error_delete_face": "Pogreška pri brisanju lica sa stavke", + "error_loading_albums": "Greška prilikom učitavanja albuma", "error_loading_image": "Pogreška pri učitavanju slike", "error_loading_partners": "Greška prilikom učitavanja partnera:{error}", + "error_retrieving_asset_information": "Greška prilikom dobavljanja informacija o stavkama", "error_saving_image": "Pogreška: {error}", "error_tag_face_bounding_box": "Pogreška pri označavanju lica – nije moguće dohvatiti koordinate granica (bounding box)", "error_title": "Greška - Nešto je pošlo krivo", @@ -925,6 +991,7 @@ "failed_to_remove_product_key": "Uklanjanje ključa proizvoda nije uspjelo", "failed_to_reset_pin_code": "Neuspješno resetiranje PIN koda", "failed_to_stack_assets": "Slaganje stavki nije uspjelo", + "failed_to_tag_assets": "Označavanje stavki nije uspjelo", "failed_to_unstack_assets": "Razdvajanje stavki nije uspjelo", "failed_to_update_notification_status": "Neuspješno ažuriranje statusa obavijesti", "incorrect_email_or_password": "Netočna adresa e-pošte ili lozinka", @@ -952,6 +1019,7 @@ "unable_to_complete_oauth_login": "Nije moguće dovršiti OAuth prijavu", "unable_to_connect": "Povezivanje nije moguće", "unable_to_copy_to_clipboard": "Nije moguće kopirati u međuspremnik, provjerite pristupate li stranici putem https-a", + "unable_to_create": "Stvaranje radnog procesa nije uspjelo", "unable_to_create_admin_account": "Nije moguće stvoriti administratorski račun", "unable_to_create_api_key": "Nije moguće izraditi novi API ključ", "unable_to_create_library": "Nije moguće stvoriti biblioteku", @@ -962,6 +1030,7 @@ "unable_to_delete_exclusion_pattern": "Nije moguće izbrisati uzorak izuzimanja", "unable_to_delete_shared_link": "Nije moguće izbrisati dijeljenu poveznicu", "unable_to_delete_user": "Nije moguće izbrisati korisnika", + "unable_to_delete_workflow": "Brisanje radnog procesa nije uspjelo", "unable_to_download_files": "Nije moguće preuzeti datoteke", "unable_to_edit_exclusion_pattern": "Nije moguće urediti uzorak izuzimanja", "unable_to_empty_trash": "Nije moguće isprazniti otpad", @@ -1001,6 +1070,7 @@ "unable_to_scan_library": "Nije moguće skenirati knjižnicu", "unable_to_set_feature_photo": "Nije moguće postaviti istaknutu fotografiju", "unable_to_set_profile_picture": "Nije moguće postaviti profilnu sliku", + "unable_to_set_rating": "Nije moguće postaviti ocjenu", "unable_to_submit_job": "Nije moguće poslati posao", "unable_to_trash_asset": "Nije moguće premjestiti stavku u smeće", "unable_to_unlink_account": "Nije moguće prekinuti vezu računa", @@ -1012,6 +1082,7 @@ "unable_to_update_settings": "Nije moguće ažurirati postavke", "unable_to_update_timeline_display_status": "Nije moguće ažurirati status prikaza vremenske trake", "unable_to_update_user": "Nije moguće ažurirati korisnika", + "unable_to_update_workflow": "Nije moguće ažurirati radni proces", "unable_to_upload_file": "Nije moguće učitati datoteku" }, "errors_text": "Greške", @@ -1032,15 +1103,18 @@ "export_as_json": "Izvezi kao JSON", "export_database": "Izvezi bazu podataka", "export_database_description": "Izvezi SQLite bazu podataka", + "exposure_time": "Vrijeme Ekspozicije", "extension": "Proširenje (Extension)", "external": "Vanjski", "external_libraries": "Vanjske biblioteke", "external_network": "Vanjska mreža", "external_network_sheet_info": "Kada niste na željenoj Wi-Fi mreži, aplikacija će se povezati s poslužiteljem putem prve dostupne URL adrese s popisa ispod, redom od vrha prema dnu", + "f_number": "F-Broj", "face_unassigned": "Nedodijeljeno", "failed": "Neuspješno", "failed_count": "Neuspjelo:{count}", "failed_to_authenticate": "Neuspješna autentikacija", + "failed_to_delete_file": "Brisanje datoteke nije uspjelo", "failed_to_load_assets": "Učitavanje stavki nije uspjelo", "failed_to_load_folder": "Neuspjelo učitavanje mape", "favorite": "Omiljeno", @@ -1058,20 +1132,28 @@ "filter": "Filtar", "filter_people": "Filtrirajte ljude", "filter_places": "Filtriraj mjesta", + "filter_tags": "Filtriraj oznake", + "filters": "Filteri", "first": "Prvi", "fix_incorrect_match": "Ispravite netočno podudaranje", + "focal_length": "Fokalna Duljina", "folder": "Mapa", "folder_not_found": "Mapa nije pronađena", "folders": "Mape", "folders_feature_description": "Pregledavanje prikaza mape za fotografije i videozapise u sustavu datoteka", "forgot_pin_code_question": "Zaboravili ste svoj PIN?", "forward": "Naprijed", + "free_up_space": "Oslobodi Prostor", + "free_up_space_description": "Premjestite prenešene fotografije i videozapise u smeće na uređaju kako biste oslobodili prostor. Vaše kopije na poslužitelju ostaju sigurne.", + "free_up_space_settings_subtitle": "Oslobodite prostor na uređaju", "full_path": "Puna putanja:{path}", + "full_path_or_folder": "Puna putanja ili mapa", "gcast_enabled": "Google Cast", "gcast_enabled_description": "Ova značajka učitava vanjske stavke s Googlea kako bi radila.", "general": "Općenito", "geolocation_instruction_location": "Kliknite na stavku s GPS koordinatama da biste koristili njezinu lokaciju ili odaberite lokaciju izravno s karte", "get_help": "Potražite pomoć", + "get_people_error": "Greška prilikom dobavljanja ljudi", "get_wifiname_error": "Nije moguće dohvatiti naziv Wi-Fi mreže. Provjerite imate li potrebna dopuštenja i jeste li povezani na Wi-Fi mrežu", "getting_started": "Početak Rada", "go_back": "Idi natrag", @@ -1096,12 +1178,14 @@ "header_settings_header_name_input": "Naziv zaglavlja", "header_settings_header_value_input": "Vrijednost zaglavlja", "headers_settings_tile_title": "Prilagođena proxy zaglavlja", + "height": "Visina", "hi_user": "Bok {name} ({email})", "hide_all_people": "Sakrij sve ljude", "hide_gallery": "Sakrij galeriju", "hide_named_person": "Sakrij osobu {name}", "hide_password": "Sakrij lozinku", "hide_person": "Sakrij osobu", + "hide_schema": "Sakrij shemu", "hide_text_recognition": "Sakrij prepoznavanje teksta", "hide_unnamed_people": "Sakrij neimenovane osobe", "home_page_building_timeline": "Izrada vremenske crte", @@ -1127,12 +1211,15 @@ "import_path": "Putanja uvoza", "in_albums": "U {count, plural, one {# album} other {# albuma}}", "in_archive": "U arhivi", + "in_year": "Godine {year}", + "in_year_selector": "Godine", "include_archived": "Uključi arhivirano", "include_shared_albums": "Uključi dijeljene albume", "include_shared_partner_assets": "Uključi zajedničke stavke partnera", "individual_share": "Pojedinačni udio", "individual_shares": "Pojedinačna dijeljenja", "info": "Informacije", + "integrity_checks": "Provjere Integriteta", "interval": { "day_at_onepm": "Svaki dan u 13 sati", "hours": "{hours, plural, one {Svaki sat} few {Svakih {hours, number} sata} other {Svakih {hours, number} sati}}", @@ -1143,11 +1230,19 @@ "invalid_date_format": "Neispravan format datuma", "invite_people": "Pozovite ljude", "invite_to_album": "Pozovi u album", + "iso": "ISO", "items_count": "{count, plural, one {# datoteka} other {# datoteke}}", "jobs": "Poslovi", "keep": "Zadrži", + "keep_albums": "Zadrži albume", + "keep_albums_count": "Čuvam {count} {count, plural, one {album} other {albuma}}", "keep_all": "Zadrži Sve", + "keep_description": "Odaberite što ostaje na vašem uređaju prilikom oslobađanja prostora.", + "keep_favorites": "Zadrži favorite", + "keep_on_device": "Zadrži za uređaju", + "keep_on_device_hint": "Izaberite stavke koje želite zadržati na ovom uređaju", "keep_this_delete_others": "Zadrži ovo, izbriši ostale", + "keeping": "Čuvam: {items}", "kept_this_deleted_others": "Zadržana je ova stavka i {count, plural, one {izbrisana # datoteka} few {izbrisane # datoteke} other {izbrisano # datoteka}}", "keyboard_shortcuts": "Prečaci tipkovnice", "language": "Jezik", @@ -1157,34 +1252,46 @@ "language_setting_description": "Odaberite željeni jezik", "large_files": "Velike datoteke", "last": "Zadnji", + "last_months": "{count, plural, one {Prošli mjesec} few {Prošla # mjeseca} other {Prošlih # mjeseci}}", "last_seen": "Zadnji put viđen", "latest_version": "Najnovija verzija", "latitude": "Zemljopisna širina", "leave": "Izađi", "leave_album": "Napusti album", "lens_model": "Model objektiva", + "less": "Manje", "let_others_respond": "Dozvoli da drugi odgovore", "level": "Razina", "library": "Biblioteka", + "library_add_folder": "Dodaj mapu", + "library_edit_folder": "Uredi mapu", "library_page_sort_asset_count": "Broj stavki", "library_page_sort_created": "Datum kreiranja", "library_page_sort_last_modified": "Zadnja izmjena", "library_page_sort_title": "Naslov albuma", "licenses": "Licence", "light": "Svjetlo", + "light_theme": "Prebaci na svijetlu temu", "like": "Sviđa mi se", "like_deleted": "Like izbrisan", + "link": "Poveznica", "link_motion_video": "Povežite videozapis pokreta", + "link_to_docs": "Za više informacija, pogledajte dokumentaciju.", "link_to_oauth": "Veza na OAuth", "linked_oauth_account": "Povezani OAuth račun", "list": "Popis", + "live": "Uživo", + "load_more": "Učitaj Još", "loading": "Učitavanje", "loading_search_results_failed": "Učitavanje rezultata pretraživanja nije uspjelo", "local": "Lokalno", "local_asset_cast_failed": "Nije moguće emitirati stavku koja nije prenesena na poslužitelj", "local_assets": "Lokalne stavke", + "local_id": "Lokalni ID", + "local_media_summary": "Sažetak Lokalnih Medija", "local_network": "Lokalna mreža", "local_network_sheet_info": "Aplikacija će se povezati s poslužiteljem putem ovog URL-a kada koristi određenu Wi-Fi mrežu", + "location": "Lokacija", "location_permission": "Dozvola za lokaciju", "location_permission_content": "Kako bi koristio značajku automatskog prebacivanja, Immich treba dozvolu za preciznu lokaciju kako bi mogao očitati naziv trenutne Wi-Fi mreže", "location_picker_choose_on_map": "Odaberi na karti", @@ -1194,6 +1301,7 @@ "location_picker_longitude_hint": "Unesite ovdje svoju geografsku dužinu", "lock": "Zaključaj", "locked_folder": "Zaključana mapa", + "log_detail_title": "Detalji Zapisnika", "log_out": "Odjavi se", "log_out_all_devices": "Odjava sa svih uređaja", "logged_in_as": "Prijavljeni kao {user}", @@ -1214,20 +1322,48 @@ "login_form_failed_login": "Pogreška pri prijavi, provjerite URL poslužitelja, e-mail i lozinku", "login_form_handshake_exception": "Došlo je do greške u uspostavi veze s poslužiteljem. Omogućite podršku za samopotpisane certifikate u postavkama ako koristite takav certifikat.", "login_form_password_hint": "lozinka", - "login_form_server_empty": "Unesite URL poslužitelja.", - "login_form_server_error": "Nije moguće povezivanje s poslužiteljem.", - "login_has_been_disabled": "Prijava je onemogućena.", + "login_form_server_empty": "Unesite URL poslužitelja", + "login_form_server_error": "Nije moguće povezivanje s poslužiteljem", + "login_has_been_disabled": "Prijava je onemogućena", "login_password_changed_error": "Došlo je do pogreške pri ažuriranju lozinke", "login_password_changed_success": "Lozinka je uspješno ažurirana", "logout_all_device_confirmation": "Jeste li sigurni da želite odjaviti sve uređaje?", "logout_this_device_confirmation": "Jeste li sigurni da se želite odjaviti s ovog uređaja?", + "logs": "Zapisnici", "longitude": "Zemljopisna dužina", "look": "Izgled", "loop_videos": "Ponavljajte videozapise", "loop_videos_description": "Omogućite automatsko ponavljanje videozapisa u pregledniku detalja.", "main_branch_warning": "Koristite razvojnu verziju; strogo preporučamo korištenje izdane verzije!", "main_menu": "Glavni izbornik", + "maintenance_action_restore": "Vraćanje Baze Podataka", + "maintenance_description": "Immich je prebačen u način rada za održavanje.", + "maintenance_end": "Završi način održavanja", + "maintenance_logged_in_as": "Trenutno ste prijavljeni kao {user}", + "maintenance_restore_from_backup": "Vrati iz Sigurnosne Kopije", + "maintenance_restore_library": "Vratite Svoju Knjižnicu", + "maintenance_restore_library_confirm": "Ako ovo izgleda ispravno, nastavite s vraćanjem sigurnosne kopije!", + "maintenance_restore_library_description": "Vraćanje Baze Podataka", + "maintenance_restore_library_folder_has_files": "{folder} ima {count, plural, one {# mapu} few {# mape} other {# mapa}}", + "maintenance_restore_library_folder_no_files": "U mapi {folder} nedostaju datoteke!", + "maintenance_restore_library_folder_pass": "omogućeno čitanje i pisanje", + "maintenance_restore_library_folder_read_fail": "nije omogućeno čitanje", + "maintenance_restore_library_folder_write_fail": "nije omogućeno pisanje", + "maintenance_restore_library_hint_missing_files": "Možda vam nedostaju važne datoteke", + "maintenance_restore_library_hint_regenerate_later": "Možete ovo kasnije ponovno generirati u postavkama", + "maintenance_restore_library_hint_storage_template_missing_files": "Koristite predložak za pohranu? Možda vam nedostaju datoteke", + "maintenance_restore_library_loading": "Učitavanje provjera cjelovitosti i heuristike…", + "maintenance_task_backup": "Izrada sigurnosne kopije postojeće baze podataka…", + "maintenance_task_migrations": "Pokretanje migracija baze podataka…", + "maintenance_task_restore": "Vraćanje odabrane sigurnosne kopije…", + "maintenance_task_rollback": "Vraćanje nije uspjelo, povratak na prijašnju točku vraćanja…", + "maintenance_title": "Privremeno Nedostupno", "make": "Proizvođač", + "manage_geolocation": "Upravljaj Lokacijom", + "manage_media_access_rationale": "Ovo je dopuštenje potrebno za ispravno premještanje stavki u smeće i njihovo vraćanje iz njega.", + "manage_media_access_settings": "Otvori postavke", + "manage_media_access_subtitle": "Dopustite aplikaciji Immich da premješta i upravlja multimedijskim datotekama.", + "manage_media_access_title": "Pristup Upravljanju Medijima", "manage_sharing_with_partners": "Upravljajte dijeljenjem s partnerima", "manage_the_app_settings": "Upravljajte postavkama aplikacije", "manage_your_account": "Upravljajte svojim računom", @@ -1239,6 +1375,7 @@ "map_location_picker_page_use_location": "Koristi ovu lokaciju", "map_location_service_disabled_content": "Usluga lokacije mora biti omogućena za prikaz stavki s vaše trenutne lokacije. Želite li je sada omogućiti?", "map_location_service_disabled_title": "Usluga lokacije onemogućena", + "map_marker_for_image": "Oznaka na karti za sliku uslikanu u gradu {city}, {country}", "map_marker_with_image": "Oznaka karte sa slikom", "map_no_location_permission_content": "Potrebno je dopuštenje za lokaciju kako bi se prikazale stavke s vaše trenutne lokacije. Želite li ga sada omogućiti?", "map_no_location_permission_title": "Dopuštenje za lokaciju odbijeno", @@ -1256,6 +1393,38 @@ "marked_all_as_read": "Označeno sve kao pročitano", "matches": "Podudaranja", "matching_assets": "Odgovarajuće stavke", + "media_chrome": { + "auto": "Automatski", + "captions": "Titlovi", + "captions_off": "Izgašeni", + "closed_captions": "titlovi", + "decode_error": "Pogreška pri dekodiranju", + "disable_captions": "Onemogući titlove", + "enable_captions": "Omogući titlove", + "enter_fullscreen_mode": "Prijeđi na prikaz preko cijelog zaslona", + "exit_fullscreen_mode": "Izađi iz prikaza preko cijelog zaslona", + "loop": "Petlja", + "media_error_description": "Pogreška medija uzrokovala je prekid reprodukcije. Medij je možda oštećen ili vaš preglednik ne podržava ovaj format.", + "media_loading": "učitavanje medija", + "mute": "Isključi zvuk", + "network_error": "Pogreška mreže", + "network_error_description": "Pogreška u mreži uzrokovala je neuspjeh preuzimanja medijskog sadržaja.", + "not_supported_error": "Izvor Nije Podržan", + "playback_rate": "Brzina reprodukcije", + "playback_rate_current": "trenutna brzina reprodukcije", + "playback_rate_value": "Brzina reprodukcije {playbackRate}", + "playback_time": "vrijeme reprodukcije", + "quality": "Kvaliteta", + "second": "sekunda", + "seconds": "sekundi", + "time_value_of_total_time": "{currentTime} od {totalTime}", + "time_value_remaining": "{time} preostalo", + "unmute": "Uključi zvuk", + "unsupported_error_description": "Došlo je do nepoznate pogreške. Greška je na poslužitelju ili mreži, ili vaš preglednik ne podržava ovaj format.", + "video_not_loaded_unknown_time": "videozapis nije učitan, nepoznato vrijeme.", + "video_player": "videoplayer", + "volume": "jačina zvuka" + }, "media_type": "Vrsta medija", "memories": "Sjećanja", "memories_all_caught_up": "Sve ste pregledali", @@ -1272,23 +1441,36 @@ "merge_people_prompt": "Želite li spojiti ove ljude? Ova radnja je nepovratna.", "merge_people_successfully": "Uspješno spajanje osoba", "merged_people_count": "{count, plural, one {# Spojena osoba} other {# Spojene osobe}}", + "minFaces": "Minimalni broj lica", + "minFaces_description": "Minimalni broj prepoznatih lica koji je potreban da bi se osoba prikazala", "minimize": "Minimiziraj", "minute": "Minuta", "minutes": "Minute", "missing": "Nedostaje", + "mobile_app": "Mobilna Aplikacija", + "mobile_app_download_onboarding_note": "Preuzmi prateću mobilnu aplikaciju koristeći sljedeće opcije", "model": "Model", + "modify_date": "Datum Izmjene", "month": "Mjesec", "more": "Više", + "motion": "Pokret", "move": "Pomakni", "move_off_locked_folder": "Premjesti iz zaključane mape", + "move_to": "Premjesti u", + "move_to_device_trash": "Premjesti u smeće uređaja", "move_to_lock_folder_action_prompt": "{count} dodano u zaključanu mapu", "move_to_locked_folder": "Premjesti u zaključanu mapu", "move_to_locked_folder_confirmation": "Ove fotografije i videozapis bit će uklonjeni iz svih albuma i bit će vidljivi samo iz zaključane mape", "moved_to_trash": "Premješteno u smeće", "mute_memories": "Isključi uspomene", "my_albums": "Moji albumi", + "my_immich_description": "Kopiraj trenutnu stranicu kao My Immich poveznicu", + "my_immich_title": "My Immich poveznica", "name": "Ime", "name_or_nickname": "Ime ili nadimak", + "name_required": "Ime je obavezno", + "navigate": "Navigacija", + "navigate_to_time": "Idi na Vrijeme", "network_requirement_photos_upload": "Koristi mobilne podatke za sigurnosno kopiranje fotografija", "network_requirement_videos_upload": "Koristi mobilne podatke za sigurnosno kopiranje videozapisa", "network_requirements": "Mrežni zahtjevi", @@ -1298,6 +1480,7 @@ "never": "Nikada", "new_album": "Novi Album", "new_api_key": "Novi API ključ", + "new_feature": "Nova Značajka", "new_password": "Nova lozinka", "new_person": "Nova osoba", "new_pin_code": "Novi PIN kod", @@ -1309,11 +1492,12 @@ "next": "Sljedeće", "next_memory": "Sljedeće sjećanje", "no": "Ne", + "no_albums_found": "Albumi nisu pronađeni", "no_albums_message": "Izradite album za organiziranje svojih fotografija i videozapisa", "no_albums_with_name_yet": "Čini se da još nemate nijedan album s ovim imenom.", "no_albums_yet": "Čini se da još nemate nijedan album.", "no_archived_assets_message": "Arhivirajte fotografije i videozapise kako biste ih sakrili iz prikaza fotografija", - "no_assets_message": "KLIKNITE DA PRENESETE SVOJU PRVU FOTOGRAFIJU", + "no_assets_message": "Kliknite za prijenos svoje prve fotografije", "no_assets_to_show": "Nema stavki za prikaz", "no_cast_devices_found": "Nisu pronađeni uređaji za reprodukciju", "no_checksum_local": "Nema dostupnog kontrolnog zbroja - nije moguće dohvatiti lokalne stavke", @@ -1334,12 +1518,18 @@ "no_results": "Nema rezultata", "no_results_description": "Pokušajte sa sinonimom ili općenitijom ključnom riječi", "no_shared_albums_message": "Stvorite album za dijeljenje fotografija i videozapisa s osobama u svojoj mreži", + "no_steps": "Nisu još dodani koraci", + "none": "Ništa", "not_allowed": "Zabranjeno", "not_available": "N/A", "not_in_any_album": "Ni u jednom albumu", "not_selected": "Nije odabrano", "notes": "Bilješke", "nothing_here_yet": "Ovdje još nema ničega", + "notification_backup_reliability": "Omogućite obavijesti za poboljšanje pouzdanosti sigurnosne kopije u pozadini", + "notification_enabled_list_tile_content": "Immich koristi obavijesti za sigurnosno kopiranje u pozadini. Upravljajte njima u postavkama uređaja.", + "notification_enabled_list_tile_open_button": "Otvori postavke", + "notification_enabled_list_tile_title": "Obavijesti uključene", "notification_permission_dialog_content": "Da biste omogućili obavijesti, idite u Postavke i odaberite dopusti.", "notification_permission_list_tile_content": "Dodijelite dopuštenje za omogućavanje obavijesti.", "notification_permission_list_tile_enable_button": "Omogući obavijesti", @@ -1349,6 +1539,10 @@ "notifications_setting_description": "Upravljanje obavijestima", "oauth": "OAuth", "obtainium_configurator": "Obtainium konfigurator", + "obtainium_configurator_instructions": "Koristite Obtainium za instalaciju i ažuriranje Android aplikacije izravno sa Immich GitHub izdanja. Napravite API ključ i odaberite varijantu kako biste kreirali poveznicu za Obtainium konfiguraciju", + "ocr": "OCR", + "ocr_body": "Immich sada čita tekst unutar vaših fotografija, pa ih možete pretraživati prema onome što na njima piše.", + "ocr_title": "Pretražite tekst u svojim fotografijama", "official_immich_resources": "Službeni Immich resursi", "offline": "Izvan mreže", "offset": "Pomak", @@ -1365,18 +1559,26 @@ "online": "Dostupan (Online)", "only_favorites": "Samo omiljeno", "open": "Otvori", + "open_calendar": "Otvori kalendar", + "open_in_browser": "Otvori u pregledniku", + "open_in_immich_body": "Postavite Immich kao svoju Android galeriju kako biste mogli otvarali fotografije izravno iz drugih aplikacija.", + "open_in_immich_title": "Otvori fotografije u Immich", "open_in_map_view": "Otvori u prikazu karte", "open_in_openstreetmap": "Otvori u OpenStreetMap", "open_the_search_filters": "Otvorite filtre pretraživanja", "options": "Opcije", "or": "ili", + "organize_into_albums": "Organiziraj u albume", + "organize_into_albums_description": "Organiziraj postojeće fotografije u albume koristeći trenutne postavke sinkronizacije", "organize_your_library": "Organizirajte svoju knjižnicu", + "orientation": "Orijentacija", "original": "originalno", "other": "Ostalo", "other_devices": "Ostali uređaji", "other_variables": "Ostale varijable", "owned": "Vlasništvo", "owner": "Vlasnik", + "page": "Stranica", "partner": "Partner", "partner_can_access": "{partner} može pristupiti", "partner_can_access_assets": "Sve vaše fotografije i videozapisi osim onih u arhivi i smeću", @@ -1421,11 +1623,14 @@ "person_age_years": "{years, plural, few {# godine} other {# godina}} staro", "person_birthdate": "Rođen/a {date}", "person_hidden": "{name}{hidden, select, true { (skriveno)} other {}}", + "person_recognized": "Osoba prepoznata", "photo_shared_all_users": "Čini se da ste svoje fotografije podijelili sa svim korisnicima ili nemate nijednog korisnika s kojim biste ih podijelili.", "photos": "Fotografije", "photos_and_videos": "Fotografije i videozapisi", "photos_from_previous_years": "Fotografije iz prethodnih godina", "pick_a_location": "Odaberite lokaciju", + "pick_custom_range": "Prilagođeni raspon", + "pick_date_range": "Odaberite raspon datuma", "pin_code_changed_successfully": "PIN kod je uspješno promijenjen", "pin_code_reset_successfully": "PIN kod je uspješno poništen", "pin_code_setup_successfully": "PIN kod je uspješno postavljen", @@ -1437,8 +1642,12 @@ "play_memories": "Pokreni sjećanja", "play_motion_photo": "Reproduciraj Pokretnu fotografiju", "play_or_pause_video": "Reproducirajte ili pauzirajte video", + "play_original_video": "Reproduciraj izvorni videozapis", "play_original_video_setting_description": "Preferirajte reprodukciju originalnih videozapisa umjesto transkodiranih videozapisa. Ako originalna stavka nije kompatibilna, možda se neće ispravno reproducirati.", + "play_transcoded_video": "Reproduciraj transkodirani videozapis", "please_auth_to_access": "Molimo autentificirajte se za pristup", + "plugin_method_filter_type": "Filter", + "plugin_method_filter_type_description": "Ova metoda može filtrirati događaje i uvjetno spriječiti izvršavanje sljedećih koraka", "port": "Port", "preferences_settings_subtitle": "Upravljajte postavkama aplikacije", "preferences_settings_title": "Postavke", @@ -1459,6 +1668,7 @@ "profile_drawer_readonly_mode": "Omogućen je način rada samo za čitanje. Dugo pritisnite ikonu korisničkog avatara za izlaz.", "profile_image_of_user": "Profilna slika korisnika {user}", "profile_picture_set": "Profilna slika postavljena.", + "projection_type": "Vrsta Projekcije", "public_album": "Javni album", "public_share": "Javno dijeljenje", "purchase_account_info": "Podržava softver", @@ -1494,9 +1704,10 @@ "purchase_settings_server_activated": "Ključem proizvoda poslužitelja upravlja administrator", "query_asset_id": "Ispitaj ID stavke", "queue_status": "Stavljanje u red {count}/{total}", + "rate_asset": "Ocjeni Stavku", "rating": "Broj zvjezdica", "rating_clear": "Obriši ocjenu", - "rating_count": "{count, plural, one {# zvijezda} other {# zvijezde}}", + "rating_count": "{count, plural, =0 {Bez ocjene} one {# zvijezda} few {# zvijezde} other {# zvijezda}}", "rating_description": "Prikaži EXIF ocjenu na info ploči", "reaction_options": "Mogućnosti reakcije", "read_changelog": "Pročitajte Dnevnik promjena", @@ -1510,7 +1721,10 @@ "recent": "Nedavno", "recent_searches": "Nedavne pretrage", "recently_added": "Nedavno dodano", - "recently_added_page_title": "Nedavno dodano", + "recently_added_body": "Izravno pristupite svemu što ste nedavno dodali preko namjenske stranice.", + "recently_added_description": "Pregledajte svoje stavke poredane po vremenu prijenosa na Immich", + "recently_added_page_title": "Nedavno Dodano", + "recently_added_title": "Nedavno dodano", "recently_taken": "Nedavno snimljeno", "refresh": "Osvježi", "refresh_encoded_videos": "Osvježite kodirane videozapise", @@ -1524,11 +1738,13 @@ "regenerating_thumbnails": "Obnavljanje sličica", "remote": "Udaljeno", "remote_assets": "Udaljene stavke", + "remote_media_summary": "Sažetak Daljinskih Medija", "remove": "Ukloni", "remove_assets_album_confirmation": "Jeste li sigurni da želite ukloniti {count, plural, one {# stavku} few {# stavke} other {# stavki}} iz albuma?", "remove_assets_shared_link_confirmation": "Jeste li sigurni da želite ukloniti {count, plural, one {# stavku} few {# stavke} other {# stavki}} iz ove dijeljene veze?", "remove_assets_title": "Ukloniti stavke?", "remove_custom_date_range": "Ukloni prilagođeni datumski raspon", + "remove_filter": "Ukloni filter", "remove_from_album": "Ukloni iz albuma", "remove_from_album_action_prompt": "{count} uklonjeno iz albuma", "remove_from_favorites": "Ukloni iz favorita", @@ -1557,9 +1773,13 @@ "reset_pin_code_description": "Ako ste zaboravili svoj PIN kod, možete kontaktirati administratora poslužitelja da ga resetira", "reset_pin_code_with_password": "Uvijek možete resetirati svoj PIN kod pomoću svoje lozinke", "reset_sqlite": "Resetiraj SQLite bazu podataka", - "reset_sqlite_confirmation": "Jeste li sigurni da želite resetirati SQLite bazu podataka? Morat ćete se odjaviti i ponovno prijaviti kako biste ponovno sinkronizirali podatke", + "reset_sqlite_clear_app_data": "Izbriši Podatke", + "reset_sqlite_confirmation": "Jeste li sigurni da želite izbrisati podatke aplikacije? Time ćete ukloniti sve postavke i bit ćete odjavljeni.", + "reset_sqlite_confirmation_note": "Napomena: Nakon brisanja morat ćete ponovno pokrenuti aplikaciju.", + "reset_sqlite_done": "Podaci aplikacije su izbrisani. Molimo vas da ponovno pokrenete Immich i ponovno se prijavite.", "reset_sqlite_success": "SQLite baza podataka je uspješno resetirana", "reset_to_default": "Vrati na zadano", + "resolution": "Rezolucija", "resolve_duplicates": "Riješite duplikate", "resolved_all_duplicates": "Razriješi sve duplikate", "restore": "Oporavi", @@ -1567,6 +1787,7 @@ "restore_user": "Vrati korisnika", "restored_asset": "Obnovljena stavka", "resume": "Nastavi", + "resume_paused_jobs": "Nastavi {count, plural, one {# pauzirani posao} few {# pauzirana posla} other {# pauziranih poslova}}", "review_duplicates": "Pregledajte duplikate", "review_large_files": "Pregledaj velike datoteke", "role": "Uloga", @@ -1574,14 +1795,20 @@ "role_viewer": "Gledatelj", "running": "U tijeku", "save": "Spremi", + "saved": "Spremljeno", "saved_api_key": "Spremljen API ključ", "saved_profile": "Spremljen profil", "saved_settings": "Spremljene postavke", "say_something": "Reci nešto", "scaffold_body_error_occurred": "Došlo je do pogreške", + "scaffold_body_error_unrecoverable": "Došlo je do nepopravljive pogreške. Podijelite pogrešku i trag stoga na Discord ili GitHub kako bismo vam mogli pomoći. Ako vam se tako savjetuje, možete izbrisati podatke aplikacije u nastavku.", + "scan": "Skeniraj", "scan_all_libraries": "Skeniraj sve Knjižnice", "scan_library": "Skeniraj", + "scanning": "Skeniranje", "scanning_for_album": "Skeniranje albuma...", + "screencast_mode_description": "Prikaži indikatore tipkovnice i miša na zaslonu", + "screencast_mode_title": "Uključi/isključi način prikazivanja zaslona", "search": "Pretraživanje", "search_albums": "Traži albume", "search_by_context": "Pretraživanje po kontekstu", @@ -1589,6 +1816,10 @@ "search_by_description_example": "Planinarenje u Sapi", "search_by_filename": "Pretražujte prema nazivu datoteke ili ekstenziji", "search_by_filename_example": "npr. IMG_1234.JPG ili PNG", + "search_by_full_path": "Pretraži prema punoj putanji ili mapi", + "search_by_full_path_example": "/Ivan/Projekti/3D_Printanje/2026-07-01 - možete pretražiti Projekti, 3D, Printanje, 2026 itd.", + "search_by_ocr": "Pretraživanje pomoću OCR-a", + "search_by_ocr_example": "Kava", "search_camera_lens_model": "Pretraži model objektiva...", "search_camera_make": "Pretražite marku kamere...", "search_camera_model": "Pretražite model kamere...", @@ -1607,6 +1838,8 @@ "search_filter_media_type": "Vrsta medija", "search_filter_media_type_title": "Odaberi vrstu medija", "search_filter_people_title": "Odaberi osobe", + "search_filter_star_rating": "Ocjena u Zvjezdicama", + "search_filter_tags_title": "Odaberi oznake", "search_for": "Traži", "search_for_existing_person": "Potražite postojeću osobu", "search_no_more_result": "Nema više rezultata", @@ -1629,17 +1862,24 @@ "second": "Drugi", "see_all_people": "Vidi sve ljude", "select": "Odaberi", + "select_album": "Odaberi album", "select_album_cover": "Odaberite omot albuma", + "select_albums": "Odaberi albume", "select_all": "Odaberi sve", "select_all_duplicates": "Odaberi sve duplikate", "select_avatar_color": "Odaberi boju avatara", + "select_count": "{count, plural, one {Odaberi #} other {Odaberi #}}", + "select_cutoff_date": "Odaberi granični datum", "select_face": "Odaberi lice", "select_featured_photo": "Odaberi istaknutu fotografiju", "select_from_computer": "Odaberi s računala", "select_keep_all": "Odaberi zadrži sve", "select_new_face": "Odaberi novo lice", + "select_people": "Odaberi ljude", + "select_person": "Odaberi osobu", "select_person_to_tag": "Odaberite osobu za označavanje", "select_photos": "Odaberi fotografije", + "select_quality": "Odaberi kvalitetu", "select_trash_all": "Odaberi izbriši sve", "selected": "Odabrano", "selected_count": "{count, plural, =1 {# odabran} few {# odabrana} other {# odabranih}}", @@ -1665,6 +1905,9 @@ "set_profile_picture": "Postavi profilnu sliku", "set_slideshow_to_fullscreen": "Postavi prezentaciju na cijeli zaslon", "set_stack_primary_asset": "Postavi kao glavnu stavku", + "setting_image_navigation_enable_subtitle": "Ako je omogućeno, možete prijeći na prethodnu ili sljedeću sliku dodirivanjem krajnje lijeve ili krajnje desne četvrtine zaslona.", + "setting_image_navigation_enable_title": "Dodirnite za Navigiranje", + "setting_image_navigation_title": "Navigacija Slikama", "setting_image_viewer_help": "Preglednik detalja prvo učitava malu sličicu, zatim učitava pregled srednje veličine (ako je omogućen), te na kraju učitava original (ako je omogućen).", "setting_image_viewer_original_subtitle": "Omogućite za učitavanje originalne slike pune rezolucije (velika!). Onemogućite za smanjenje potrošnje podataka (i mrežne i na predmemoriji uređaja).", "setting_image_viewer_original_title": "Učitaj originalnu sliku", @@ -1686,6 +1929,10 @@ "share": "Podijeli", "share_dialog_preparing": "Priprema...", "share_link": "Podijeli Link", + "share_original": "Koristi izvornu (velika)", + "share_preview": "Koristi sličicu (malu)", + "share_quality_body": "Pritisni i drži tipku za dijeljenje kako biste odabrali kvalitetu slike prije dijeljenja.", + "share_quality_title": "Odaberi kvalitetu dijeljenja", "shared": "Podijeljeno", "shared_album_activities_input_disable": "Komentiranje je onemogućeno", "shared_album_activity_remove_content": "Želite li izbrisati ovu aktivnost?", @@ -1745,13 +1992,17 @@ "show_in_timeline": "Prikaži na vremenskoj crti", "show_in_timeline_setting_description": "Prikaži fotografije i videozapise ovog korisnika na vašoj vremenskoj crti", "show_keyboard_shortcuts": "Prikaži tipkovničke prečace", + "show_less": "Prikaži manje", "show_metadata": "Prikaži metapodatke", + "show_more_fields": "{count, plural, one {Pokaži još # polje} other {Pokaži još # polja}}", "show_or_hide_info": "Prikaži ili sakrij informacije", "show_password": "Prikaži lozinku", "show_person_options": "Prikaži opcije osobe", "show_progress_bar": "Prikaži traku napretka", + "show_schema": "Prikaži shemu", "show_search_options": "Prikaži opcije pretraživanja", "show_shared_links": "Prikaži dijeljene poveznice", + "show_slideshow_metadata_overlay": "Prikaži sloj s informacijama o slici", "show_slideshow_transition": "Prikaži prijelaz prezentacije", "show_supporter_badge": "Značka podržavatelja", "show_supporter_badge_description": "Prikaži značku podržavatelja", @@ -1763,11 +2014,21 @@ "sign_out": "Odjava", "sign_up": "Registriraj se", "size": "Veličina", + "skip": "Preskoči", "skip_to_content": "Preskoči na sadržaj", "skip_to_folders": "Preskoči na mape", "skip_to_tags": "Preskoči na oznake", "slideshow": "Prezentacija", + "slideshow_body": "Opustite se i gledajte svoje fotografije u dijaprojekciji preko cijelog zaslona.", + "slideshow_metadata_overlay_mode": "Sadržaj prekrivanja", + "slideshow_metadata_overlay_mode_description_only": "Samo opis", + "slideshow_metadata_overlay_mode_full": "Puni", + "slideshow_repeat": "Ponavljaj dijaprojekciju", + "slideshow_repeat_description": "Vrati se na početak nakon završetka dijaprojekcije", "slideshow_settings": "Postavke prezentacije", + "slideshow_title": "Dijaprojekcija", + "smart_album": "Pametni album", + "some_assets_already_have_a_location_warning": "Neke od odabranih stavki već imaju lokaciju", "sort_albums_by": "Sortiraj albume po...", "sort_created": "Datum kreiranja", "sort_items": "Broj stavki", @@ -1788,6 +2049,10 @@ "start_date_before_end_date": "Početni datum mora biti prije krajnjeg datuma", "state": "Stanje", "status": "Status", + "step_delete": "Izbriši korak", + "step_delete_confirm": "Jeste li sigurni da želite izbrisati ovaj korak?", + "step_details": "Detalji koraka", + "steps": "Koraci", "stop_casting": "Zaustavi reprodukciju", "stop_motion_photo": "Zaustavi pokretnu fotografiju", "stop_photo_sharing": "Prestati dijeliti svoje fotografije?", @@ -1804,6 +2069,7 @@ "support": "Podrška", "support_and_feedback": "Podrška i povratne informacije", "support_third_party_description": "Vaša Immich instalacija je pakirana od strane treće strane. Problemi koje doživljavate mogu biti uzrokovani tim paketom, stoga vas molimo da probleme prvo prijavite njima putem poveznica u nastavku.", + "supporter": "Podržavatelj", "swap_merge_direction": "Zamijeni smjer spajanja", "sync": "Sink.", "sync_albums": "Sinkroniziraj albume", @@ -1812,9 +2078,12 @@ "sync_status": "Status sinkronizacije", "sync_status_subtitle": "Pregledajte i upravljajte sistemom sinkronizacije", "sync_upload_album_setting_subtitle": "Kreiraj i prenesi svoje fotografije i videozapise u odabrane albume na Immichu", + "system_theme": "Tema sustava", + "system_theme_command_description": "Koristi sistemsku temu ({value})", "tag": "Oznaka", "tag_assets": "Označi stavke", "tag_created": "Kreirana oznaka: {tag}", + "tag_face": "Označi lice", "tag_feature_description": "Pregledavanje fotografija i videozapisa grupiranih po logičkim temama oznaka", "tag_people": "Označi osobe", "tag_updated": "Ažurirana oznaka: {tag}", @@ -1834,6 +2103,7 @@ "theme_setting_primary_color_title": "Primarna boja", "theme_setting_system_primary_color_title": "Koristi boju sustava", "theme_setting_system_theme_switch": "Automatski (Prati postavke sustava)", + "then": "Onda", "they_will_be_merged_together": "Oni ću biti spojeni zajedno", "third_party_resources": "Resursi trećih strana", "time": "Vrijeme", @@ -1862,6 +2132,13 @@ "trash_page_delete_all": "Izbriši sve", "trash_page_info": "Stavke u smeću bit će trajno izbrisane nakon {days} dana", "trashed_items_will_be_permanently_deleted_after": "Stavke bačene u smeće trajno će se izbrisati nakon {days, plural, one {# day} other {# days}}.", + "trigger": "Okidač", + "trigger_asset_metadata_extraction": "Ekstrakcija Metapodataka iz Stavki", + "trigger_asset_metadata_extraction_description": "Pokrene se kada se izdvoje EXIF metapodatci stavke", + "trigger_asset_uploaded": "Prijenos Stavke", + "trigger_asset_uploaded_description": "Pokrene se kada se prenese nova stavka", + "trigger_person_recognized": "Osoba Prepoznata", + "trigger_person_recognized_description": "Pokrene se kada se osoba prepozna", "troubleshoot": "Rješavanje problema", "type": "Vrsta", "unable_to_change_pin_code": "Nije moguće promijeniti PIN kod", @@ -1876,6 +2153,8 @@ "unhide_person": "Prikaži osobu", "unknown": "Nepoznato", "unknown_country": "Nepoznata država", + "unknown_date": "Nepoznat datum", + "unknown_schema": "Nepoznata shema", "unknown_year": "Nepoznata godina", "unlimited": "Neograničeno", "unlink_motion_video": "Odpoveži pokretni videozapis", @@ -1891,6 +2170,8 @@ "unstack": "Razdvoji", "unstack_action_prompt": "{count} razloženo", "unstacked_assets_count": "{count, plural, one {Razdvojena # stavka} few {Razvdvojene # stavke} other {Razdvojeno # stavki}}", + "unsupported_field_type": "Nepodržana vrsta polja", + "unsupported_file_type": "Datoteka {file} se ne može učitati jer njezina vrsta {type} nije podržana.", "untagged": "Bez oznaka", "up_next": "Sljedeće", "update_location_action_prompt": "Ažuriraj lokaciju ({count, plural, one {# odabrane stavke} few {# odabrane stavke} other {# odabranih stavki}}) s:", @@ -1898,7 +2179,9 @@ "updated_password": "Lozinka ažurirana", "upload": "Prijenos", "upload_concurrency": "Istovremeni prijenosi", + "upload_day_count": "{date}: {count, plural, one {# prijenos} other {# prijenosa}}", "upload_details": "Detalji prijenosa", + "upload_error_with_count": "Pogreška pri prijenosu za {count, plural, one {# stavku} few {# stavke} other {# stavki}}", "upload_errors": "Prijenos završen s {count, plural, one {# greškom} few {# greške} other {# grešaka}}, osvježite stranicu da biste vidjeli nove prenesene stavke.", "upload_finished": "Prijenos završen", "upload_progress": "Preostalo {remaining, number} - Obrađeno {processed, number}/{total, number}", @@ -1907,14 +2190,21 @@ "upload_status_errors": "Greške", "upload_status_uploaded": "Preneseno", "upload_success": "Prijenos uspješan, osvježite stranicu da biste vidjeli nove prenesene stavke.", + "upload_to_album_body": "Za korisnike koji ne koriste ručni prijenos: sada možete prenjeti lokalne fotografije izravno u album tijekom samog prijenosa - više nema potrebe za naknadnim organiziranjem fotografija u album nakon prijenosa.", + "upload_to_album_title": "Prenesi izravno u album", "upload_to_immich": "Prenesi na Immich ({count})", "uploading": "Prijenos u tijeku", "uploading_media": "Prijenos medija", + "uploads": "Prijenosi", + "uploads_count": "{count, plural, one {# prijenos} other {# prijenosa}}", "url": "URL", "usage": "Korištenje", "use_biometric": "Koristi biometriju", - "use_current_connection": "koristi trenutnu vezu", + "use_browser_locale": "Koristi lokalne postavke preglednika", + "use_browser_locale_description": "Oblikujte datume, vremena i brojeve prema postavkama lokalizacije vašeg preglednika", + "use_current_connection": "Koristi trenutnu vezu", "use_custom_date_range": "Koristi prilagođeni raspon datuma", + "use_template": "Koristi predložak", "user": "Korisnik", "user_has_been_deleted": "Ovaj korisnik je izbrisan.", "user_id": "ID korisnika", @@ -1942,6 +2232,7 @@ "video": "Videozapis", "video_hover_setting": "Reproduciraj sličicu videozapisa pri prelasku mišem", "video_hover_setting_description": "Reproduciraj sličicu videozapisa kada miš prelazi preko stavke. Čak i kada je onemogućeno, reprodukcija se može pokrenuti prelaskom miša preko ikone za reprodukciju.", + "video_quality": "Kvaliteta videozapisa", "videos": "Videozapisi", "videos_count": "{count, plural, =1 {# Videozapis} few {# Videozapisa} other {# Videozapisa}}", "view": "Prikaz", @@ -1961,20 +2252,40 @@ "viewer_remove_from_stack": "Ukloni iz složenih", "visibility": "Vidljivost", "visibility_changed": "Vidljivost promijenjena za {count, plural, =1 {# osobu} few {# osobe} other {# osoba}}", + "visual": "Vizualno", "waiting": "Čekanje", "waiting_count": "Čekanje:{count}", "warning": "Upozorenje", "week": "Tjedan", "welcome": "Dobrodošli", "welcome_to_immich": "Dobrodošli u Immich", + "whats_new": "Što je novo", + "whats_new_settings_subtitle": "Pogledaj što ima novo u Immichu", + "whats_new_version": "Verzija {version}", + "when": "Kada", "width": "Širina", "wifi_name": "Naziv Wi-Fi mreže", - "workflow_summary": "Sažetak tijeka rada", + "workflow": "Radni proces", + "workflow_delete_prompt": "Jeste li sigurni da želite izbrisati ovaj radni proces?", + "workflow_deleted": "Radni proces izbrisan", + "workflow_description": "Opis radnog procesa", + "workflow_info": "Informacije o radnog procesu", + "workflow_json": "JSON radnog procesa", + "workflow_json_help": "Uredite konfiguraciju radnog procesa u JSON formatu. Promjene će se sinkronizirati s vizualnim alatom za izradu.", + "workflow_name": "Naziv radnog procesa", + "workflow_navigation_prompt": "Jeste li sigurni da želite izaći bez spremanja promjena?", + "workflow_summary": "Sažetak radnog procesa", + "workflow_templates": "Predlošci za radne procese", + "workflow_update_success": "Radni proces uspješno ažuriran", + "workflows": "Radni procesi", + "workflows_help_text": "Radni procesi automatiziraju radnje nad vašim stavkama na temelju okidača i filtara", "wrong_pin_code": "Krivi PIN kod", + "x_of_total": "{x}/{total}", "year": "Godina", "years_ago": "prije {years, plural, =1 {# godinu} few {# godine} other {# godina}}", "yes": "Da", "you_dont_have_any_shared_links": "Nemate nijednu dijeljenu poveznicu", "your_wifi_name": "Naziv vaše Wi-Fi mreže", + "zero_to_clear_rating": "pritisni 0 za brisanje ocjene stavke", "zoom_image": "Povećaj sliku" } diff --git a/i18n/hu.json b/i18n/hu.json index 611fb1f57c..9ab0181f3c 100644 --- a/i18n/hu.json +++ b/i18n/hu.json @@ -108,6 +108,21 @@ "image_thumbnail_quality_description": "Bélyegkép minősége 1-100 között. A magasabb szám jobb minőséget, de nagyobb fájlméretet eredményez és belassíthatja az alkalmazást.", "image_thumbnail_title": "Bélyegkép beállítások", "import_config_from_json_description": "Rendszer konfiguráció importálása JSON fájlból", + "integrity_checks_checksum_files": "Ellenőrzőösszeg fájlok", + "integrity_checks_checksum_files_description": "Az ellenőrzőösszeg-ellenőrzés beállítása", + "integrity_checks_checksum_files_enable_description": "Ellenőrzőösszeg-ellenőrzés bekapcsolása", + "integrity_checks_checksum_files_percentage_limit": "Százalékos limit", + "integrity_checks_checksum_files_percentage_limit_description": "Állítsd be 0,01 és 1 közötti értékre azt a maximális százalékot, amely meghatározza, hogy az ellenőrzőösszeg-ellenőrzés az egyes időközökben milyen gyakorisággal fusson.", + "integrity_checks_checksum_files_time_limit": "Idő limit", + "integrity_checks_checksum_files_time_limit_description": "Állítsd be, hogy az egyes időközökben az ellenőrzőösszeg-ellenőrzés legfeljebb mennyi ideig futhasson. (ms)", + "integrity_checks_missing_files": "Hiányzó fájlok", + "integrity_checks_missing_files_description": "Gyakoriság beállítása, valamint a hiányzó fájlok ellenőrzésének engedélyezése vagy letiltása", + "integrity_checks_missing_files_enable_description": "A hiányzó fájlok ellenőrzésének engedélyezése", + "integrity_checks_settings": "Integritás ellenőrzések", + "integrity_checks_settings_description": "Integritás-ellenőrzések gyakoriságának kezelése", + "integrity_checks_untracked_files": "Nem követett fájlok", + "integrity_checks_untracked_files_description": "Gyakoriság beállítása, valamint nem követett fájlok ellenőrzésének engedélyezése vagy letiltása", + "integrity_checks_untracked_files_enable_description": "Nem követett fájlok ellenőrzésének engedélyezése", "job_concurrency": "{job} párhuzamosan", "job_created": "Feladat létrehozva", "job_not_concurrency_safe": "Ez a feladat nem párhuzamosság-biztos.", @@ -350,7 +365,7 @@ "storage_template_migration_job": "Tárhely sablon migrálása", "storage_template_more_details": "További részletekért erről a funkcióról lásd a tárhely sablon és annak következményeit a dokumentációban", "storage_template_onboarding_description_v2": "A funkció engedélyezésével automatikusan, a felhasználó által definiált sablon alapján lesznek rendezve a fájlok. Több információért lásd a dokumentációt.", - "storage_template_path_length": "Útvonal hozzávetőleges maximális hossza: {length, number}{limit, number}", + "storage_template_path_length": "Útvonal hozzávetőleges maximális hossza: {length, number}/{limit, number}", "storage_template_settings": "Tárhely sablon", "storage_template_settings_description": "A feltöltött elemek mappaszerkezetének és fájl elnevezésének kezelése", "storage_template_user_label": "A felhasználó tárhely címkéje {label}", @@ -416,6 +431,10 @@ "transcoding_realtime_description": "Engedélyezi a videó lejátszása közben a valós idejű transzkódolást. Lehetővé teszi a minőség kiválasztását, de akadozásokat és nagyobb visszajátszási késleltetést eredményezhet a szerver teljesítményétől függően.", "transcoding_realtime_enabled": "Valós idejű transzkódolás bekapcsolása", "transcoding_realtime_enabled_description": "Ha ki van kapcsolva, a szerver nem fogja elfogadni az új, valós idejű transzkódolású kéréseket.", + "transcoding_realtime_resolutions": "Felbontások", + "transcoding_realtime_resolutions_description": "A valós idejű átkódoláshoz kínált felbontások. A nagyobb felbontások lejátszási problémákhoz vezethetnek, ha a szerver nem tudja elég gyorsan feldolgozni őket.", + "transcoding_realtime_video_codecs": "Videókodekek", + "transcoding_realtime_video_codecs_description": "A valós idejű transzkódoláshoz elérhető videókodekek. Lejátszás során a kliensek a legmegfelelőbb általuk támogatott opciót választják ki. Az AV1 hatékonyabb a HEVC-nél, a HEVC pedig hatékonyabb a H.264-nél. Hardveres gyorsítás használatakor csak azokat a kodekeket válaszd ki, amelyeket a gyorsító képes kódolni. Szoftveres transzkódolás esetén vedd figyelembe, hogy a H.264 gyorsabb az AV1-nél, az AV1 pedig gyorsabb a HEVC-nél.", "transcoding_reference_frames": "Referencia képkockák", "transcoding_reference_frames_description": "A hivatkozott képkockák száma egy képkocka tömörítéséhez. Magasabb értékek növelik a tömörítési hatékonyságot, de lelassítják a kódolási folyamatot. 0 esetén a szoftver magának állítja be az értéket.", "transcoding_required_description": "Csak az el nem fogadott formátumú videókat", @@ -476,13 +495,13 @@ "advanced_settings_clear_image_cache_error": "Fényképek gyorsítótárának kiürítése sikertelen", "advanced_settings_clear_image_cache_success": "{size} sikeresen felszabadítva", "advanced_settings_log_level_title": "Naplózás szintje: {level}", - "advanced_settings_prefer_remote_subtitle": "Néhány eszköz fájdalmasan lassan tölti be az eszközön lévő indexképeket. Ez a beállítás inkább a távoli képeket (a szerverről) tölti be helyettük.", + "advanced_settings_prefer_remote_subtitle": "Néhány eszköz fájdalmasan lassan tölti be az eszközön lévő indexképeket. Aktiváld ezt a beállítást, hogy inkább a távoli (a szerveren lévő) indexképek kerüljenek betöltésre helyettük.", "advanced_settings_prefer_remote_title": "Távoli képek előnyben részesítése", "advanced_settings_proxy_headers_subtitle": "Add meg azokat a proxy fejléceket, amiket az app elküldjön minden hálózati kérésnél", "advanced_settings_proxy_headers_title": "Egyedi proxy fejlécek [KÍSÉRLETI]", - "advanced_settings_readonly_mode_subtitle": "Bekapcsol egy írásvédett módot ahol csak fotókat nézni lehetséges, egyebek, mint több kép kiválasztása, megosztás, kivetítés és törlés ki vannak kapcsolva. Ki/bekapcsolható a felhasználó ikonjáról a fő képernyőn", + "advanced_settings_readonly_mode_subtitle": "Bekapcsol egy írásvédett módot, ahol csak fotókat nézni lehetséges. Egyebek, mint például több kép kiválasztása, megosztás, kivetítés és törlés ilyenkor ki vannak kapcsolva. Be-/kikapcsolható a fő képernyőn a felhasználó profil fotóján történő hosszú érintéssel", "advanced_settings_readonly_mode_title": "Írásvédett mód", - "advanced_settings_sync_remote_deletions_subtitle": "Automatikusan törölni vagy visszaállítani egy elemet ezen az eszközön, ha az adott műveletet a weben hajtották végre", + "advanced_settings_sync_remote_deletions_subtitle": "Automatikusan töröl vagy visszaállít egy elemet ezen az eszközön, ha az adott műveletet a weben hajtották végre", "advanced_settings_sync_remote_deletions_title": "Távoli törlések szinkronizálása [KÍSÉRLETI]", "advanced_settings_tile_subtitle": "Haladó felhasználói beállítások", "advanced_settings_troubleshooting_subtitle": "További funkciók engedélyezése hibaelhárítás céljából", @@ -578,6 +597,7 @@ "asset_viewer_settings_title": "Elem megjelenítő", "assets": "Elemek", "assets_added_to_album_count": "{count, plural, other {# elem}} hozzáadva az albumhoz", + "assets_added_to_album_partial_count": "{totalCount} {totalCount, plural, one {elemből} other {elemből}} {successCount} hozzáadva az albumhoz", "assets_added_to_albums_count": "{assetTotal, plural, one {# elem} other {# elemek}} hozzáadva {albumTotal, plural, one {# albumhoz} other {# albumokhoz}}", "assets_cannot_be_added_to_album_count": "{count, plural, one {Az elem} other {Az elemek}} nem adhatóak hozzá az albumhoz", "assets_cannot_be_added_to_albums": "Az {count, plural, one {elemet} other {elemeket}} nem lehet hozzáadni egy albumhoz sem", @@ -794,7 +814,6 @@ "custom_date": "Egyéni dátum", "custom_locale": "Egyéni területi beállítás", "custom_locale_description": "Dátumok, idők és számok formázása a kiválasztott nyelv és a terület szerint", - "custom_url": "Egyéni URL", "cutoff_date_description": "Fotók megtartása az elmúlt…", "cutoff_day": "{count, plural, one {nap} other {nap}}", "cutoff_year": "{count, plural, one {év} other {év}}", @@ -1341,7 +1360,7 @@ "maintenance_title": "Átmenetileg nem elérhető", "make": "Gyártó", "manage_geolocation": "Helyadatok kezelése", - "manage_media_access_rationale": "Ez az engedély szükséges a mozgatható eszközök kukába való áthelyezéshez és onnan való visszaállításhoz.", + "manage_media_access_rationale": "Ez az engedély szükséges a mozgatható elemek kukába való áthelyezéshez és az onnan való visszaállításhoz.", "manage_media_access_settings": "Beállítások megnyitása", "manage_media_access_subtitle": "Engedélyezze az Immichnek a médiafájlok kezelését és áthelyezését.", "manage_media_access_title": "Médiakezelés hozzáférés", @@ -1461,6 +1480,7 @@ "never": "Soha", "new_album": "Új album", "new_api_key": "Új API kulcs", + "new_feature": "Új funkció", "new_password": "Új jelszó", "new_person": "Új személy", "new_pin_code": "Új PIN kód", @@ -1504,6 +1524,7 @@ "not_available": "N/A", "not_in_any_album": "Nincs albumban", "not_selected": "Nincs kiválasztva", + "not_set": "Nincs beállítva", "notes": "Megjegyzések", "nothing_here_yet": "Még semmi sincs itt", "notification_backup_reliability": "Engedélyezd az értesítéseket a háttérben futó biztonsági mentés megbízhatóságának javítása érdekében", @@ -1521,6 +1542,8 @@ "obtainium_configurator": "Obtainium konfigurátor", "obtainium_configurator_instructions": "Az Obtainium segítségével közvetlenül az Immich GitHub-os kiadásából telepítheted és frissítheted az Android-alkalmazást. Hozz létre egy API-kulcsot és válassz egy változatot az Obtainium konfigurációs hivatkozás elkészítéséhez", "ocr": "OCR", + "ocr_body": "Az Immich mostantól elolvassa a fotókon szereplő szöveget, így a szöveg alapján is kereshetsz közöttük.", + "ocr_title": "Szövegkeresés a fényképeidben", "official_immich_resources": "Hivatalos Immich források", "offline": "Nem elérhető (offline)", "offset": "Eltolás", @@ -1539,6 +1562,8 @@ "open": "Nyitva", "open_calendar": "Naptár megnyitása", "open_in_browser": "Megnyitás böngészőben", + "open_in_immich_body": "Állítsd be az Immich-et galériádként az Androidon, hogy a fényképeket közvetlenül más alkalmazásokból nyithasd meg.", + "open_in_immich_title": "Fotók megnyitása az Immich-ben", "open_in_map_view": "Megnyitás térkép nézetben", "open_in_openstreetmap": "Megnyitás OpenStreetMap-ben", "open_the_search_filters": "Keresési szűrők megnyitása", @@ -1596,7 +1621,7 @@ "person": "Személy", "person_age_months": "{months, plural, one {# hónapja} other {# hónapja}}", "person_age_year_months": "Egy év és {months, plural, one {# hónapja} other {# hónapja}}", - "person_age_years": "{years, plural, other {# éve}}", + "person_age_years": "{years, plural, one {# éves} other {# éves}}", "person_birthdate": "Született: {date}", "person_hidden": "{name}{hidden, select, true { (rejtett)} other {}}", "person_recognized": "Személy felismerve", @@ -1697,7 +1722,10 @@ "recent": "Friss", "recent_searches": "Legutóbbi keresések", "recently_added": "Nemrég hozzáadott", + "recently_added_body": "Egy külön oldalon azonnal megtekintheted az összes legutóbb hozzáadott elemet.", + "recently_added_description": "Az Immich-re való feltöltés időpontja szerint rendezve böngészheted a fájljaid", "recently_added_page_title": "Nemrég hozzáadott", + "recently_added_title": "Legutóbb hozzáadott", "recently_taken": "Nemrég készített", "refresh": "Frissítés", "refresh_encoded_videos": "Átkódolt videók frissítése", @@ -1760,7 +1788,7 @@ "restore_user": "Felhasználó visszaállítása", "restored_asset": "Visszaállított elem", "resume": "Folytatás", - "resume_paused_jobs": "Folytatás {count, plural, one {# paused job} other {# paused jobs}}", + "resume_paused_jobs": "{count, plural, one {# szüneteltetett feladat} other {# szüneteltetett feladat}} folytatása", "review_duplicates": "Duplikátumok áttekintése", "review_large_files": "Nagy fájlok áttekintése", "role": "Jogkör", @@ -1904,6 +1932,8 @@ "share_link": "Link megosztása", "share_original": "Használd az eredetit (nagy)", "share_preview": "Használd a miniatűrt (kicsi)", + "share_quality_body": "A megosztás előtt tartsd lenyomva a megosztás gombot, hogy kiválaszd a képminőséget.", + "share_quality_title": "Válaszd ki a megosztási minőséget", "shared": "Megosztva", "shared_album_activities_input_disable": "Hozzászólások kikapcsolva", "shared_album_activity_remove_content": "Törölni szeretnéd ezt a tevékenységet?", @@ -1919,6 +1949,8 @@ "shared_link_clipboard_copied_massage": "Vágólapra másolva", "shared_link_create_error": "Hiba a megosztott link létrehozásakor", "shared_link_custom_url_description": "Hozzáférés ehhez a megosztott linkhez egyedi URL címen keresztül", + "shared_link_custom_url_title": "Egyedi URL", + "shared_link_custom_url_warning": "Figyelem: a perjelet tartalmazó egyéni URL-nevek nem biztos, hogy a várt módon működnek.", "shared_link_edit_description_hint": "Add meg a megosztás leírását", "shared_link_edit_expire_after_option_day": "1 nap", "shared_link_edit_expire_after_option_days": "{count} nap", @@ -1985,16 +2017,19 @@ "sign_out": "Kijelentkezés", "sign_up": "Regisztráció", "size": "Méret", + "skip": "Kihagyás", "skip_to_content": "Ugrás a tartalomhoz", "skip_to_folders": "Ugrás a mappákhoz", "skip_to_tags": "Ugrás a címkékhez", "slideshow": "Diavetítés", + "slideshow_body": "Dőlj hátra, és nézd meg fotóidat teljes képernyős diavetítésben.", "slideshow_metadata_overlay_mode": "Képadatok tartalma", "slideshow_metadata_overlay_mode_description_only": "Csak leírás", "slideshow_metadata_overlay_mode_full": "Teljes", "slideshow_repeat": "Diavetítés ismétlése", "slideshow_repeat_description": "Ha a diavetítés véget ér, újraindul az elejétől", "slideshow_settings": "Diavetítés beállításai", + "slideshow_title": "Diavetítés", "smart_album": "Okos album", "some_assets_already_have_a_location_warning": "A kiválasztott elemek közül néhánynak már van helyszíne", "sort_albums_by": "Albumok rendezése...", @@ -2122,6 +2157,7 @@ "unknown": "Ismeretlen", "unknown_country": "Ismeretlen ország", "unknown_date": "Ismeretlen dátum", + "unknown_schema": "Ismeretlen séma", "unknown_year": "Ismeretlen Év", "unlimited": "Korlátlan", "unlink_motion_video": "Mozgókép leválasztása", @@ -2157,6 +2193,8 @@ "upload_status_errors": "Hibák", "upload_status_uploaded": "Feltöltve", "upload_success": "Feltöltés sikeres, frissítsd az oldalt az újonnan feltöltött elemek megtekintéséhez.", + "upload_to_album_body": "Azok a felhasználók, akik nem használják a kézi feltöltési funkciót, mostantól a helyi fényképeket feltöltés közben közvetlenül hozzáadhatják egy albumhoz; így már nem kell először feltölteniük a képeket, majd később hozzáadniuk őket az albumhoz.", + "upload_to_album_title": "Feltöltés közvetlenül egy albumba", "upload_to_immich": "Feltöltés Immich-be ({count})", "uploading": "Feltöltés folyamatban", "uploading_media": "Média feltöltés folyamatban", @@ -2224,6 +2262,9 @@ "week": "Hét", "welcome": "Üdvözlünk", "welcome_to_immich": "Üdvözöl az Immich", + "whats_new": "Újdonságok", + "whats_new_settings_subtitle": "Nézd meg az Immich újdonságait", + "whats_new_version": "{version} verzió", "when": "Mikor", "width": "Szélesség", "wifi_name": "Wi-Fi neve", diff --git a/i18n/id.json b/i18n/id.json index 3bf43925fe..bf5281fcb9 100644 --- a/i18n/id.json +++ b/i18n/id.json @@ -108,6 +108,21 @@ "image_thumbnail_quality_description": "Nilai kualitas gambar kecil dari 1-100. Lebih tinggi lebih baik, tetapi menghasilkan file lebih besar dan dapat mengurangi respons aplikasi.", "image_thumbnail_title": "Pengaturan Gambar Kecil", "import_config_from_json_description": "Impor konfigurasi sistem dengan mengunggah file konfigurasi JSON", + "integrity_checks_checksum_files": "File checksum", + "integrity_checks_checksum_files_description": "Konfigurasikan pemeriksaan checksum", + "integrity_checks_checksum_files_enable_description": "Aktifkan pemeriksaan checksum", + "integrity_checks_checksum_files_percentage_limit": "Batas persentase", + "integrity_checks_checksum_files_percentage_limit_description": "Konfigurasikan persentase maksimum antara 0,01 dan 1 untuk menentukan seberapa banyak pemeriksaan checksum dijalankan pada setiap interval.", + "integrity_checks_checksum_files_time_limit": "Batas waktu", + "integrity_checks_checksum_files_time_limit_description": "Konfigurasikan durasi maksimum pemeriksaan checksum pada setiap interval. (ms)", + "integrity_checks_missing_files": "File hilang", + "integrity_checks_missing_files_description": "Konfigurasikan frekuensi serta aktifkan atau nonaktifkan pemeriksaan file hilang", + "integrity_checks_missing_files_enable_description": "Aktifkan pemeriksaan file hilang", + "integrity_checks_settings": "Pemeriksaan integritas", + "integrity_checks_settings_description": "Kelola interval pemeriksaan integritas", + "integrity_checks_untracked_files": "File tidak terlacak", + "integrity_checks_untracked_files_description": "Konfigurasikan frekuensi serta aktifkan atau nonaktifkan pemeriksaan file tidak terlacak", + "integrity_checks_untracked_files_enable_description": "Aktifkan pemeriksaan file tidak terlacak", "job_concurrency": "Konkurensi {job}", "job_created": "Tugas telah dibuat", "job_not_concurrency_safe": "Tugas ini tidak aman untuk konkurensi.", @@ -416,6 +431,10 @@ "transcoding_realtime_description": "Memungkinkan transcoding dilakukan secara waktu nyata saat video sedang di-stream. Mengaktifkan pergantian kualitas, tetapi dapat menyebabkan latensi pemutaran yang lebih tinggi dan tersendat-sendat tergantung pada kemampuan server.", "transcoding_realtime_enabled": "Aktifkan transcoding waktu nyata", "transcoding_realtime_enabled_description": "Jika dinonaktifkan, server akan menolak memulai sesi transcoding waktu nyata yang baru.", + "transcoding_realtime_resolutions": "Resolusi", + "transcoding_realtime_resolutions_description": "Resolusi yang ditawarkan untuk transcoding waktu nyata. Resolusi yang lebih tinggi dapat menyebabkan masalah pemutaran jika server tidak dapat melakukan transcoding dengan cukup cepat.", + "transcoding_realtime_video_codecs": "Codec video", + "transcoding_realtime_video_codecs_description": "Codec video yang ditawarkan untuk transcoding waktu nyata. Klien akan memilih opsi terbaik yang didukung saat pemutaran. AV1 lebih efisien daripada HEVC, dan HEVC lebih efisien daripada H.264. Saat menggunakan akselerasi perangkat keras, pilih hanya codec yang dapat dienkode oleh akselerator. Saat menggunakan transcoding perangkat lunak, perlu diketahui bahwa H.264 lebih cepat daripada AV1, dan AV1 lebih cepat daripada HEVC.", "transcoding_reference_frames": "Bingkai referensi", "transcoding_reference_frames_description": "Jumlah bingkai untuk direferensikan ketika mengompres bingkai tertentu. Nilai lebih tinggi meningkatkan efisiensi kompresi, tetapi membuat pengodean lambat. 0 menetapkan nilai ini secara otomatis.", "transcoding_required_description": "Hanya video dalam format yang tidak diterima", @@ -578,6 +597,7 @@ "asset_viewer_settings_title": "Penampil Aset", "assets": "Aset", "assets_added_to_album_count": "{count, plural, one {# aset} other {# aset}} ditambahkan ke album", + "assets_added_to_album_partial_count": "Berhasil menambahkan {successCount} dari {totalCount} {totalCount, plural, one {aset} other {aset}} ke album", "assets_added_to_albums_count": "{assetTotal, plural, one {# aset} other {# aset}} ditambahkan ke {albumTotal, plural, one {# album} other {# album}}", "assets_cannot_be_added_to_album_count": "{count, plural, one {Aset} other {Aset}} tidak dapat ditambahkan ke album", "assets_cannot_be_added_to_albums": "{count, plural, one {Aset} other {Aset}} tidak dapat ditambahkan ke album mana pun", @@ -794,7 +814,6 @@ "custom_date": "Tanggal khusus", "custom_locale": "Pelokalan khusus", "custom_locale_description": "Format tanggal, waktu, dan angka berdasarkan bahasa dan wilayah yang dipilih", - "custom_url": "URL Khusus", "cutoff_date_description": "Simpan foto dari … terakhir", "cutoff_day": "{count, plural, one {hari} other {hari}}", "cutoff_year": "{count, plural, one {tahun} other {tahun}}", @@ -1303,9 +1322,9 @@ "login_form_failed_login": "Log masuk gagal, periksa URL server, email, dan sandi", "login_form_handshake_exception": "Terjadi Handshake Exception dengan server. Aktifkan dukungan sertifikat swatanda di pengaturan jika Anda menggunakan sertifikat swatanda.", "login_form_password_hint": "sandi", - "login_form_server_empty": "Masukkan URL server.", - "login_form_server_error": "Tidak dapat menghubungi server.", - "login_has_been_disabled": "Log masuk telah dinonaktifkan.", + "login_form_server_empty": "Masukkan URL server", + "login_form_server_error": "Tidak dapat terhubung ke server", + "login_has_been_disabled": "Login telah dinonaktifkan", "login_password_changed_error": "Terjadi kesalahan saat memperbarui sandi", "login_password_changed_success": "Sandi berhasil diperbarui", "logout_all_device_confirmation": "Yakin ingin keluar dari semua perangkat?", @@ -1356,6 +1375,7 @@ "map_location_picker_page_use_location": "Gunakan lokasi ini", "map_location_service_disabled_content": "Layanan lokasi perlu diaktifkan untuk menampilkan aset yang terletak di lokasi Anda saat ini. Ingin mengaktifkan layanan tersebut sekarang?", "map_location_service_disabled_title": "Layanan Lokasi nonaktif", + "map_marker_for_image": "Penanda peta untuk gambar yang diambil di {city}, {country}", "map_marker_with_image": "Penanda peta dengan gambar", "map_no_location_permission_content": "Izin lokasi diperlukan untuk menampilkan aset yang terletak di lokasi Anda. Ingin mengizinkannya sekarang?", "map_no_location_permission_title": "Izin Lokasi ditolak", @@ -1460,6 +1480,7 @@ "never": "Tidak pernah", "new_album": "Album baru", "new_api_key": "Kunci API Baru", + "new_feature": "Fitur Baru", "new_password": "Sandi baru", "new_person": "Orang baru", "new_pin_code": "Kode PIN baru", @@ -1506,6 +1527,9 @@ "notes": "Catatan", "nothing_here_yet": "Masih kosong", "notification_backup_reliability": "Aktifkan notifikasi untuk meningkatkan keandalan pencadangan latar belakang", + "notification_enabled_list_tile_content": "Immich menggunakan notifikasi untuk pencadangan di latar belakang. Kelola notifikasi tersebut di pengaturan perangkat Anda.", + "notification_enabled_list_tile_open_button": "Buka pengaturan", + "notification_enabled_list_tile_title": "Notifikasi diaktifkan", "notification_permission_dialog_content": "Untuk mengaktifkan notifikasi, buka Pengaturan lalu berikan izin.", "notification_permission_list_tile_content": "Berikan izin untuk mengaktifkan notifikasi.", "notification_permission_list_tile_enable_button": "Aktifkan Notifikasi", @@ -1517,6 +1541,8 @@ "obtainium_configurator": "Konfigurator Obtainium", "obtainium_configurator_instructions": "Gunakan Obtainium untuk menginstal dan memperbarui aplikasi Android secara langsung dari rilis GitHub Immich. Buat kunci API dan pilih varian untuk membuat tautan konfigurasi Obtainium Anda", "ocr": "OCR", + "ocr_body": "Immich kini membaca teks dalam foto Anda sehingga Anda dapat mencarinya berdasarkan teks yang tertulis di dalamnya.", + "ocr_title": "Cari teks dalam foto Anda", "official_immich_resources": "Sumber Daya Immich Resmi", "offline": "Offline", "offset": "Ofset", @@ -1535,6 +1561,8 @@ "open": "Buka", "open_calendar": "Buka kalender", "open_in_browser": "buka di browser", + "open_in_immich_body": "Atur Immich sebagai galeri Anda di Android untuk membuka foto langsung dari aplikasi lain.", + "open_in_immich_title": "Buka foto di Immich", "open_in_map_view": "Buka dalam tampilan peta", "open_in_openstreetmap": "Buka di OpenStreetMap", "open_the_search_filters": "Buka filter pencarian", @@ -1693,7 +1721,10 @@ "recent": "Terkini", "recent_searches": "Pencarian terkini", "recently_added": "Baru saja ditambahkan", + "recently_added_body": "Langsung buka semua yang baru-baru ini Anda tambahkan pada halaman khusus.", + "recently_added_description": "Telusuri aset Anda yang diurutkan berdasarkan waktu pengunggahannya ke Immich", "recently_added_page_title": "Baru Ditambahkan", + "recently_added_title": "Baru ditambahkan", "recently_taken": "Baru diambil", "refresh": "Segarkan", "refresh_encoded_videos": "Segarkan video terenkode", @@ -1900,6 +1931,8 @@ "share_link": "Bagikan Tautan", "share_original": "Gunakan versi asli (besar)", "share_preview": "Gunakan thumbnail (kecil)", + "share_quality_body": "Tekan dan tahan tombol bagikan untuk memilih kualitas gambar sebelum membagikannya.", + "share_quality_title": "Pilih kualitas untuk dibagikan", "shared": "Dibagikan", "shared_album_activities_input_disable": "Komentar dinonaktifkan", "shared_album_activity_remove_content": "Ingin menghapus aktivitas ini?", @@ -1981,16 +2014,19 @@ "sign_out": "Keluar", "sign_up": "Daftar", "size": "Ukuran", + "skip": "Lewati", "skip_to_content": "Lewati ke konten", "skip_to_folders": "Lewati ke folder", "skip_to_tags": "Lewati ke tag", "slideshow": "Salindia", + "slideshow_body": "Bersantai dan saksikan foto Anda diputar dalam slideshow layar penuh.", "slideshow_metadata_overlay_mode": "Konten overlay", "slideshow_metadata_overlay_mode_description_only": "Deskripsi saja", "slideshow_metadata_overlay_mode_full": "Penuh", "slideshow_repeat": "Ulangi salindia", "slideshow_repeat_description": "Ulangi dari awal saat salindia berakhir", "slideshow_settings": "Pengaturan salindia", + "slideshow_title": "Slideshow", "smart_album": "Album cerdas", "some_assets_already_have_a_location_warning": "Sebagian aset yang dipilih sudah memiliki lokasi", "sort_albums_by": "Urutkan album berdasarkan...", @@ -2118,6 +2154,7 @@ "unknown": "Tidak diketahui", "unknown_country": "Negara Tidak Diketahui", "unknown_date": "Tanggal tidak diketahui", + "unknown_schema": "Skema tidak dikenal", "unknown_year": "Tahun Tidak Diketahui", "unlimited": "Tidak terbatas", "unlink_motion_video": "Hapus tautan video gerak", @@ -2153,6 +2190,8 @@ "upload_status_errors": "Kesalahan", "upload_status_uploaded": "Diunggah", "upload_success": "Pengunggahan berhasil, muat ulang halaman untuk melihat aset terunggah yang baru.", + "upload_to_album_body": "Bagi pengguna yang tidak menggunakan fitur unggah manual, kini Anda dapat memilih untuk menambahkan foto lokal langsung ke album saat mengunggahnya. Tidak perlu lagi mengunggah terlebih dahulu, lalu menambahkannya ke album.", + "upload_to_album_title": "Unggah langsung ke album", "upload_to_immich": "Unggah ke Immich ({count})", "uploading": "Mengunggah", "uploading_media": "Mengunggah media", @@ -2220,6 +2259,9 @@ "week": "Pekan", "welcome": "Selamat datang", "welcome_to_immich": "Selamat datang di Immich", + "whats_new": "Yang baru", + "whats_new_settings_subtitle": "Lihat yang baru di Immich", + "whats_new_version": "Versi {version}", "when": "Saat", "width": "Lebar", "wifi_name": "Nama Wi-Fi", diff --git a/i18n/it.json b/i18n/it.json index 0be736c5a6..102d54b26d 100644 --- a/i18n/it.json +++ b/i18n/it.json @@ -108,9 +108,24 @@ "image_thumbnail_quality_description": "Qualità delle miniature da 1 a 100. Un valore più alto è migliore ma produce file più grandi e può ridurre la reattività dell'app.", "image_thumbnail_title": "Impostazioni miniature", "import_config_from_json_description": "Importa la configurazione del sistema caricando un file JSON", + "integrity_checks_checksum_files": "File di verifica", + "integrity_checks_checksum_files_description": "Configura il controllo del checksum", + "integrity_checks_checksum_files_enable_description": "Attiva il controllo del checksum", + "integrity_checks_checksum_files_percentage_limit": "Limite percentuale", + "integrity_checks_checksum_files_percentage_limit_description": "Imposta la percentuale massima, compresa tra 0,01 e 1, che indica la frequenza con cui deve essere eseguito il controllo del checksum in ciascun intervallo.", + "integrity_checks_checksum_files_time_limit": "Limite di tempo", + "integrity_checks_checksum_files_time_limit_description": "Configura la durata massima della verifica del checksum per ciascun intervallo. (ms)", + "integrity_checks_missing_files": "File mancanti", + "integrity_checks_missing_files_description": "Configurare la frequenza e attivare o disattivare il controllo dei file mancanti", + "integrity_checks_missing_files_enable_description": "Attiva il controllo dei file mancanti", + "integrity_checks_settings": "Controlli integrità", + "integrity_checks_settings_description": "Gestisci l'intervallo dei controlli di integrità", + "integrity_checks_untracked_files": "File non tracciati", + "integrity_checks_untracked_files_description": "Configurare la frequenza e attivare/disattivare il controllo dei file non tracciati", + "integrity_checks_untracked_files_enable_description": "Abilita il controllo dei file non tracciati", "job_concurrency": "Concorrenza {job}", "job_created": "Processo creato", - "job_not_concurrency_safe": "Questo processo non è eseguibile in maniera concorrente.", + "job_not_concurrency_safe": "Questa operazione non è sicura dal punto di vista della concorrenza.", "job_settings": "Impostazioni processi", "job_settings_description": "Gestisci la concorrenza dei processi", "jobs_delayed": "{jobCount, plural, one {# posticipato} other {# posticipati}}", @@ -316,7 +331,7 @@ "refreshing_all_libraries": "Aggiornando tutte le librerie", "registration": "Registrazione amministratore", "registration_description": "Poiché sei il primo utente del sistema, sarai assegnato come Amministratore e sarai responsabile delle attività amministrative, e gli utenti aggiuntivi saranno creati da te.", - "release_channel_release_candidate": "Release candidate", + "release_channel_release_candidate": "Anteprima finale", "release_channel_stable": "Stabile", "remove_failed_jobs": "Rimuovi processi non riusciti", "require_password_change_on_login": "Richiedi all'utente di cambiare password al primo accesso", @@ -416,6 +431,10 @@ "transcoding_realtime_description": "Consenti l'esecuzione della transcodifica in tempo reale, durante la riproduzione del video. Abilita la possibilità di selezionare la qualità del video, ma potrebbe causare una latenza di riproduzione più alta e scatti a seconda della potenza di calcolo del server.", "transcoding_realtime_enabled": "Abilita la transcodifica in tempo reale", "transcoding_realtime_enabled_description": "Se disabilitato, il server non avvierà nuove sessioni di transcodifica in tempo reale.", + "transcoding_realtime_resolutions": "Risoluzioni", + "transcoding_realtime_resolutions_description": "Le risoluzioni offerte per la transcodifica in tempo reale. Risoluzioni più elevate possono causare problemi di riproduzione se il server non riesce a transcodificarle abbastanza rapidamente.", + "transcoding_realtime_video_codecs": "Codec video", + "transcoding_realtime_video_codecs_description": "I codec video disponibili per la transcodifica in tempo reale. I client sceglieranno l'opzione migliore tra quelle supportate durante la riproduzione. L'AV1 è più efficiente dell'HEVC, che a sua volta è più efficiente dell'H.264. Quando si utilizza l'accelerazione hardware, selezionare solo i codec che l'acceleratore è in grado di codificare. Quando si utilizza la transcodifica software, tenere presente che l'H.264 è più veloce dell'AV1, che a sua volta è più veloce dell'HEVC.", "transcoding_reference_frames": "Frame di riferimento", "transcoding_reference_frames_description": "Il numero di frame da prendere in considerazione nel comprimere un determinato frame. Valori più alti migliorano l'efficienza di compressione, ma rallentano la codifica. 0 imposta questo valore automaticamente.", "transcoding_required_description": "Solo video che non sono in un formato accettato", @@ -578,6 +597,7 @@ "asset_viewer_settings_title": "Visualizzatore risorse", "assets": "Risorse", "assets_added_to_album_count": "{count, plural, one {# risorsa aggiunta} other {# risorse aggiunte}} all'album", + "assets_added_to_album_partial_count": "{successCount} su {totalCount} {totalCount, plural, one {risorsa aggiunta} other {risorse aggiunte}} all'album", "assets_added_to_albums_count": "{assetTotal, plural, one {# risorsa aggiunta} other {# risorse aggiunte}} a {albumTotal, plural, one {# album} other {# album}}", "assets_cannot_be_added_to_album_count": "{count, plural, one {La risorsa} other {Le risorse}} non possono essere aggiunte all'album", "assets_cannot_be_added_to_albums": "Non é stato possibile aggiungere {count, plural, one {la risorsa} other {le risorse}} a nessun album", @@ -640,7 +660,7 @@ "blurred_background": "Sfondo sfocato", "browse_templates": "Sfoglia i modelli", "bugs_and_feature_requests": "Bug e richieste di funzionalità", - "build": "Build", + "build": "Versione", "build_image": "Build dell'immagine", "bulk_delete_duplicates_confirmation": "Sei sicuro di voler eliminare in massa {count, plural, one {# risorsa duplicata} other {# risorse duplicate}}? Verrà conservata la risorsa più grande di ogni gruppo e tutti gli altri duplicati saranno eliminati definitivamente. Non potrai annullare questa azione!", "bulk_keep_duplicates_confirmation": "Sei sicuro di voler conservare {count, plural, one {# risorsa duplicata} other {# risorse duplicate}}? Questo risolverà tutti i gruppi di duplicati senza eliminare nulla.", @@ -794,7 +814,6 @@ "custom_date": "Data personalizzata", "custom_locale": "Localizzazione personalizzata", "custom_locale_description": "Formatta date, orari e numeri in base alla lingua e al paese selezionati", - "custom_url": "URL personalizzato", "cutoff_date_description": "Conserva le foto fino al…", "cutoff_day": "{count, plural, one {giorno} other {giorni}}", "cutoff_year": "{count, plural, one {anno} other {anni}}", @@ -1303,9 +1322,9 @@ "login_form_failed_login": "Errore nel login, controlla l'URL del server e le credenziali (email e password)", "login_form_handshake_exception": "Si è verificata un'eccezione di handshake con il server. Abilita il supporto del certificato self-signed nelle impostazioni se si utilizza questo tipo di certificato.", "login_form_password_hint": "password", - "login_form_server_empty": "Inserisci URL del server.", - "login_form_server_error": "Non è possibile connettersi al server.", - "login_has_been_disabled": "Il login è stato disabilitato.", + "login_form_server_empty": "Inserisci URL del server", + "login_form_server_error": "Impossibile connettersi al server", + "login_has_been_disabled": "Il login è stato disabilitato", "login_password_changed_error": "C'è stato un errore durante l'aggiornamento della password", "login_password_changed_success": "Password aggiornata con successo", "logout_all_device_confirmation": "Sei sicuro di volerti disconnettere da tutti i dispositivi?", @@ -1461,6 +1480,7 @@ "never": "Mai", "new_album": "Nuovo Album", "new_api_key": "Nuova Chiave di API", + "new_feature": "Nuova funzionalità", "new_password": "Nuova password", "new_person": "Nuova persona", "new_pin_code": "Nuovo codice PIN", @@ -1504,6 +1524,7 @@ "not_available": "N/A", "not_in_any_album": "In nessun album", "not_selected": "Non selezionato", + "not_set": "Non impostato", "notes": "Note", "nothing_here_yet": "Ancora nulla qui", "notification_backup_reliability": "Attiva le notifiche per migliorare l'affidabilità del backup in background", @@ -1521,6 +1542,8 @@ "obtainium_configurator": "Configuratore Obtainium", "obtainium_configurator_instructions": "Utilizza Obtainium per installare e aggiornare l'app Android direttamente dalla versione rilasciata su GitHub da Immich. Crea una chiave API e seleziona una variante per creare il tuo link di configurazione Obtainium", "ocr": "OCR", + "ocr_body": "Immich ora riconosce il testo contenuto nelle tue foto, così puoi cercarle in base a ciò che dicono.", + "ocr_title": "Cerca tra il testo nelle tue foto", "official_immich_resources": "Risorse Ufficiali Immich", "offline": "Offline", "offset": "Offset", @@ -1539,6 +1562,8 @@ "open": "Apri", "open_calendar": "Apri il calendario", "open_in_browser": "Apri con il browser", + "open_in_immich_body": "Imposta Immich come galleria su Android per aprire le foto direttamente da altre app.", + "open_in_immich_title": "Apri foto in Immich", "open_in_map_view": "Apri nella visualizzazione mappa", "open_in_openstreetmap": "Apri su OpenStreetMap", "open_the_search_filters": "Apri filtri di ricerca", @@ -1697,7 +1722,10 @@ "recent": "Recenti", "recent_searches": "Ricerche recenti", "recently_added": "Aggiunti recentemente", + "recently_added_body": "Vai direttamente a tutto ciò che hai aggiunto di recente su una pagina dedicata.", + "recently_added_description": "Sfoglia le tue risorse ordinate in base alla data di caricamento su Immich", "recently_added_page_title": "Aggiunti di recente", + "recently_added_title": "Aggiunto di recente", "recently_taken": "Scattate di recente", "refresh": "Ricarica", "refresh_encoded_videos": "Ricarica video codificati", @@ -1904,6 +1932,8 @@ "share_link": "Link di condivisione", "share_original": "Usa originale (grande)", "share_preview": "Usa miniatura (piccola)", + "share_quality_body": "Tieni premuto il pulsante di condivisione per scegliere la qualità dell'immagine prima di condividerla.", + "share_quality_title": "Seleziona la qualità di condivisione", "shared": "Condivisi", "shared_album_activities_input_disable": "I commenti sono disabilitati", "shared_album_activity_remove_content": "Vuoi eliminare questa attività?", @@ -1918,7 +1948,9 @@ "shared_link_app_bar_title": "Link condivisi", "shared_link_clipboard_copied_massage": "Copiato negli appunti", "shared_link_create_error": "Si è verificato un errore durante la creazione del link condiviso", - "shared_link_custom_url_description": "Accedi a questo link condiviso con un URL personalizzato", + "shared_link_custom_url_description": "Accedi a questo link condiviso con un nome URL personalizzato", + "shared_link_custom_url_title": "URL personalizzato", + "shared_link_custom_url_warning": "Attenzione: un URL personalizzato con una barra obliqua potrebbe comportarsi in modo inaspettato.", "shared_link_edit_description_hint": "Inserisci la descrizione della condivisione", "shared_link_edit_expire_after_option_day": "1 giorno", "shared_link_edit_expire_after_option_days": "{count} giorni", @@ -1985,16 +2017,19 @@ "sign_out": "Esci", "sign_up": "Registrati", "size": "Dimensione", + "skip": "Salta", "skip_to_content": "Salta al contenuto", "skip_to_folders": "Salta alle cartelle", "skip_to_tags": "Salta ai tag", "slideshow": "Presentazione", + "slideshow_body": "Rilassati e guarda le tue foto scorrere in una presentazione a schermo intero.", "slideshow_metadata_overlay_mode": "Contenuto dell'overlay", "slideshow_metadata_overlay_mode_description_only": "Solo descrizione", "slideshow_metadata_overlay_mode_full": "Completo", "slideshow_repeat": "Ripeti presentazione", "slideshow_repeat_description": "Ricomincia da capo quando la presentazione termina", "slideshow_settings": "Impostazioni presentazione", + "slideshow_title": "Presentazione", "smart_album": "Raccolta intelligente", "some_assets_already_have_a_location_warning": "Alcune delle risorse selezionate hanno già una posizione", "sort_albums_by": "Ordina album per...", @@ -2122,6 +2157,7 @@ "unknown": "Sconosciuto", "unknown_country": "Paese sconosciuto", "unknown_date": "Data sconosciuta", + "unknown_schema": "Schema sconosciuto", "unknown_year": "Anno sconosciuto", "unlimited": "Illimitato", "unlink_motion_video": "Scollega video in movimento", @@ -2157,6 +2193,8 @@ "upload_status_errors": "Errori", "upload_status_uploaded": "Caricato", "upload_success": "Caricamento completato, aggiorna la pagina per vedere le nuove risorse caricate.", + "upload_to_album_body": "Per gli utenti che non utilizzano la funzione di caricamento manuale, ora è possibile scegliere di aggiungere le foto locali direttamente a un album mentre le si carica, senza più bisogno di caricarle prima per poi aggiungerle a un album in un secondo momento.", + "upload_to_album_title": "Carica direttamente in un album", "upload_to_immich": "Carica su Immich ({count})", "uploading": "Caricamento", "uploading_media": "Caricando i media", @@ -2224,6 +2262,9 @@ "week": "Settimana", "welcome": "Benvenuto", "welcome_to_immich": "Benvenuto in Immich", + "whats_new": "Novità", + "whats_new_settings_subtitle": "Scopri le novità di Immich", + "whats_new_version": "Versione {version}", "when": "Quando", "width": "Larghezza", "wifi_name": "Nome rete Wi-Fi", diff --git a/i18n/ja.json b/i18n/ja.json index b4a622611d..15e86f4852 100644 --- a/i18n/ja.json +++ b/i18n/ja.json @@ -2,13 +2,13 @@ "about": "Immich について", "account": "アカウント", "account_settings": "アカウント設定", - "acknowledge": "了解", + "acknowledge": "わかりました", "action": "アクション", - "action_common_update": "更新", + "action_common_update": "更新する", "action_description": "抽出された写真/動画に対して行う手順", "actions": "アクション", "active": "アクティブ", - "active_count": "アクティブ: {count}", + "active_count": "アクティブ数: {count}", "activity": "アクティビティ", "add": "追加", "add_a_description": "説明を追加", @@ -18,7 +18,7 @@ "add_action": "アクションを追加", "add_assets": "項目を追加", "add_birthday": "誕生日を設定", - "add_endpoint": "エンドポイントを追加", + "add_endpoint": "終了地点を追加", "add_exclusion_pattern": "除外パターンを追加", "add_location": "場所を追加", "add_partner": "パートナーを追加", @@ -108,6 +108,21 @@ "image_thumbnail_quality_description": "サムネイルの画質を1〜100の間で設定できます。値が大きいほど良い品質ですがファイルサイズが大きくなりアプリの応答性が低下します。", "image_thumbnail_title": "サムネイル設定", "import_config_from_json_description": "システムコンフィグのJSONファイルをアップロードしインポート", + "integrity_checks_checksum_files": "検査合計ファイル", + "integrity_checks_checksum_files_description": "検査合計ファイルを設定する", + "integrity_checks_checksum_files_enable_description": "検査合計チェックを有効にする", + "integrity_checks_checksum_files_percentage_limit": "割合(%)の制限", + "integrity_checks_checksum_files_percentage_limit_description": "間隔ごとに検査合計のチェックを行う最大の割合を0.01から0.1の範囲で設定してください。", + "integrity_checks_checksum_files_time_limit": "時間制限", + "integrity_checks_checksum_files_time_limit_description": "間隔ごとに検査合計のチェックを行う最大の時間をミリ秒で設定してください。", + "integrity_checks_missing_files": "不足しているファイル", + "integrity_checks_missing_files_description": "不足ファイルのチェックを行う有無や、頻度を設定してください。", + "integrity_checks_missing_files_enable_description": "不足ファイルのチェックをオンにする", + "integrity_checks_settings": "データの整合性チェック", + "integrity_checks_settings_description": "データの整合性チェック頻度を管理する。", + "integrity_checks_untracked_files": "追跡されていないファイル", + "integrity_checks_untracked_files_description": "追跡されていないファイルのチェックを行う有無や、頻度を設定してください。", + "integrity_checks_untracked_files_enable_description": "追跡されていないファイルのチェックを行う。", "job_concurrency": "{job} の同時実行数", "job_created": "ジョブを作成しました", "job_not_concurrency_safe": "このジョブは安全に同時実行できません。", @@ -193,6 +208,15 @@ "maintenance_integrity_checksum_mismatch_description": "ディスク上のチェックサムが、Immichのデータベースに保存されているチェックサムと一致しないファイル。", "maintenance_integrity_checksum_mismatch_job": "チェックサム不一致を検出する", "maintenance_integrity_checksum_mismatch_refresh_job": "チェックサム不一致レポートを再生成", + "maintenance_integrity_missing_file": "欠落ファイル", + "maintenance_integrity_missing_file_description": "Immichがデータベースで追跡しているが、ファイルシステム上に存在しないファイル。", + "maintenance_integrity_missing_file_job": "欠落ファイルのチェック", + "maintenance_integrity_missing_file_refresh_job": "欠落ファイルレポートの更新", + "maintenance_integrity_report": "整合性レポート", + "maintenance_integrity_untracked_file": "未追跡ファイル", + "maintenance_integrity_untracked_file_description": "Immichのディレクトリ内に存在するが、Immichに記録がないファイル。", + "maintenance_integrity_untracked_file_job": "未追跡ファイルのチェック", + "maintenance_integrity_untracked_file_refresh_job": "追跡されていないファイルレポートを更新", "maintenance_restore_backup": "バックアップを復元", "maintenance_restore_backup_description": "現在のImmichは削除され、選択したバックアップから復元されます。続行前にバックアップが作成されます。", "maintenance_restore_backup_different_version": "このバックアップは異なるバージョンのImmichにより作成されたものです!", @@ -407,6 +431,10 @@ "transcoding_realtime_description": "動画のストリーミング再生中のリアルタイムトランスコードを許可。 再生品質の自動切替が有効化されますが、サーバーの性能によっては遅延や途切れが増加する可能性があります。", "transcoding_realtime_enabled": "リアルタイムトランスコードを有効化", "transcoding_realtime_enabled_description": "無効にした場合、サーバーは新たなリアルタイムトランスコードセッションの開始を拒否します。", + "transcoding_realtime_resolutions": "解像度", + "transcoding_realtime_resolutions_description": "リアルタイムで変換するための解像度。高解像度はサーバーの変換速度によっては、動画の再生に影響を及ぼす可能性があります。", + "transcoding_realtime_video_codecs": "動画のコーデック", + "transcoding_realtime_video_codecs_description": "これらの動画のコーデックはリアルタイムでの変換が可能です。セットアップ環境によっては、再生の際に適切なコーデックを選ぶことができます。AV1は、HEVCや、H.264よりもさまざまな環境に適しています。ハードウェアアクセラレーションをお使いの場合は、アクセラレーションサポートされているコーデックをお使いください。ソフトウェアで変換される場合は、変換速度においてH.264がAV1や、HEVCより速いです。", "transcoding_reference_frames": "参照フレーム", "transcoding_reference_frames_description": "特定のフレームを圧縮するときに参照するフレームの数。より高い値は圧縮効率を改善しますが、エンコードが遅くなります。\"0\" に設定すると、この値が自動的に設定されます。", "transcoding_required_description": "許容されていない動画形式のみ", @@ -546,6 +574,7 @@ "asset_added_to_album": "アルバムに追加", "asset_adding_to_album": "アルバムに追加しています…", "asset_created": "項目が作成されました", + "asset_day_count": "{date}: {count, plural, one {# アセット} other {# アセット}}", "asset_description_updated": "項目の説明文が更新されました", "asset_hashing": "ハッシュ計算中…", "asset_list_group_by_sub_title": "グループ分け", @@ -568,6 +597,7 @@ "asset_viewer_settings_title": "アセットビューアー", "assets": "アセット", "assets_added_to_album_count": "{count, plural, one {#個} other {#個}}のアセットをアルバムに追加しました", + "assets_added_to_album_partial_count": "{totalCount}{totalCount, plural, one {項目} other {項目}}中{successCount}のアセットがアルバムに追加されました", "assets_added_to_albums_count": "{assetTotal, plural, one {# 項目} other {# 項目}}を{albumTotal, plural, one {# つのアルバム} other {# つのアルバム}}に追加しました", "assets_cannot_be_added_to_album_count": "{count, plural, one {アセット} other {アセット}} はアルバムに追加できません", "assets_cannot_be_added_to_albums": "{count, plural, one {項目} other {項目}} をどのアルバムにも追加できませんでした", @@ -784,7 +814,6 @@ "custom_date": "カスタム日付", "custom_locale": "言語と地域の手動設定", "custom_locale_description": "選択した言語と地域の設定に従って、日付・時刻・数値を書式設定します", - "custom_url": "カスタムURL", "cutoff_date_description": "写真を保持する期間:", "cutoff_day": "{count, plural, one {(日)} other {(日)}}", "cutoff_year": "{count, plural, one {年} other {年}}", @@ -801,6 +830,8 @@ "day": "日", "days": "日", "deduplicate_all": "全て重複排除", + "default_quality_subtitle": "共有する際に使われる品質。共有を長押しすることで毎回選択することができます。", + "default_share_quality": "デフォルトの共有される品質", "delete": "削除", "delete_action_confirmation_message": "この項目を削除しますか?まず、この項目はサーバー上のゴミ箱へ移動されます。その後、あなたのデバイス上から削除するかを決めていただきます", "delete_action_prompt": "{count}項目を削除しました", @@ -1083,6 +1114,7 @@ "failed": "失敗", "failed_count": "失敗: {count}", "failed_to_authenticate": "認証に失敗しました", + "failed_to_delete_file": "ファイルの削除に失敗しました。", "failed_to_load_assets": "写真/動画のロードに失敗しました", "failed_to_load_folder": "フォルダーの読み込みに失敗", "favorite": "お気に入り", @@ -1187,6 +1219,7 @@ "individual_share": "1枚の共有", "individual_shares": "1枚ずつの共有", "info": "情報", + "integrity_checks": "データの整合性チェック", "interval": { "day_at_onepm": "毎日 午後1時", "hours": "{hours, plural, one {1時間} other {{hours, number}時間}}ごと", @@ -1226,6 +1259,7 @@ "leave": "退出", "leave_album": "アルバムから抜ける", "lens_model": "レンズモデル", + "less": "少ない", "let_others_respond": "他のユーザーの返信を許可する", "level": "レベル", "library": "ライブラリ", @@ -1247,6 +1281,7 @@ "linked_oauth_account": "リンクされたOAuthアカウント", "list": "リスト", "live": "ライブ", + "load_more": "さらに表示", "loading": "読み込み中", "loading_search_results_failed": "検索結果を読み込めませんでした", "local": "ローカル", @@ -1287,9 +1322,9 @@ "login_form_failed_login": "ログインエラーが発生しました。サーバーのURL・メールアドレス・パスワードを再確認してください。", "login_form_handshake_exception": "Handshake Exceptionエラーが発生しました。自己署名証明書を設定から有効にしてください。", "login_form_password_hint": "パスワード", - "login_form_server_empty": "URLを入力", + "login_form_server_empty": "URLを入力してください", "login_form_server_error": "サーバーに接続できません", - "login_has_been_disabled": "ログインは無効化されています。", + "login_has_been_disabled": "ログインは無効化されています", "login_password_changed_error": "パスワードの変更でエラーが発生しました", "login_password_changed_success": "パスワードの変更に成功", "logout_all_device_confirmation": "本当に全てのデバイスからログアウトしますか?", @@ -1340,6 +1375,7 @@ "map_location_picker_page_use_location": "この位置情報を使う", "map_location_service_disabled_content": "現在地の項目を表示するには位置情報がオンである必要があります。有効化しますか?", "map_location_service_disabled_title": "位置情報がオフです", + "map_marker_for_image": "{city}、{country}で撮影された画像の地図マーカー", "map_marker_with_image": "画像の地図マーカー", "map_no_location_permission_content": "現在地の項目を表示するには位置情報へのアクセスが必要です。許可しますか?", "map_no_location_permission_title": "位置情報へのアクセスが拒否されました", @@ -1385,6 +1421,7 @@ "time_value_remaining": "残り {time}", "unmute": "ミュート解除", "unsupported_error_description": "サポートされていないエラーが発生しました。 サーバやネットワークに異常があるか、ブラウザがこのフォーマットをサポートしていません.", + "video_not_loaded_unknown_time": "動画が読み込まれませんでした、時間不明。", "video_player": "動画プレーヤー", "volume": "音量" }, @@ -1404,6 +1441,7 @@ "merge_people_prompt": "これらの人物を統合しますか? この操作は元に戻せません。", "merge_people_successfully": "人物の統合に成功しました", "merged_people_count": "{count, plural, one {#人} other {#人}}の人物を統合しました", + "minFaces": "最小面数", "minFaces_description": "その人物が表示されるために必要な顔認識数の最小値", "minimize": "最小化", "minute": "分", @@ -1415,6 +1453,7 @@ "modify_date": "日付の修正", "month": "月", "more": "もっと表示", + "motion": "動き", "move": "移動", "move_off_locked_folder": "鍵付きフォルダーから出す", "move_to": "移動する", @@ -1425,6 +1464,8 @@ "moved_to_trash": "ゴミ箱に移動しました", "mute_memories": "メモリーのミュート", "my_albums": "私のアルバム", + "my_immich_description": "現在のページを私のImmichリンクとしてコピーする", + "my_immich_title": "私のImmichリンク", "name": "名前", "name_or_nickname": "名前またはニックネーム", "name_required": "名前は必須項目です", @@ -1439,6 +1480,7 @@ "never": "行わない", "new_album": "新たなアルバム", "new_api_key": "新しいAPI キー", + "new_feature": "新機能", "new_password": "新しいパスワード", "new_person": "新しい人物", "new_pin_code": "新しいPINコード", @@ -1476,13 +1518,19 @@ "no_results": "結果がありません", "no_results_description": "同義語やより一般的なキーワードを試してください", "no_shared_albums_message": "アルバムを作成して写真や動画を共有しましょう", + "no_steps": "まだステップが追加されていません", "none": "なし", "not_allowed": "許可されていません", "not_available": "適用なし", "not_in_any_album": "どのアルバムにも入っていない", "not_selected": "選択なし", + "not_set": "未設定", "notes": "注意", "nothing_here_yet": "まだ何も無いようです", + "notification_backup_reliability": "バックグラウンドでのバックアップが正常に行われるため、通知を許可してください。", + "notification_enabled_list_tile_content": "Immichは、バックグラウンドでバックアップを行うため、通知の権限を使用しています。これらはデバイスの設定で管理することができます。", + "notification_enabled_list_tile_open_button": "設定を開く", + "notification_enabled_list_tile_title": "通知が許可されました", "notification_permission_dialog_content": "通知を許可するには設定を開いてオンにしてください", "notification_permission_list_tile_content": "通知の許可 をオンにしてください", "notification_permission_list_tile_enable_button": "通知をオンにする", @@ -1494,6 +1542,8 @@ "obtainium_configurator": "Obtainiumの設定", "obtainium_configurator_instructions": "Obtainiumを使用すると、Immich GitHubのリリースから直接Androidアプリをインストールおよびアップデートできます。APIキーを作成し、バリアントを選択してObtainiumの設定リンクを作成してください", "ocr": "OCR", + "ocr_body": "Immichは写真に写っている文字を認識できるようになったため、画像検索がしやすくなりました。", + "ocr_title": "写真の中からテキストを探す", "official_immich_resources": "公式Immichリソース", "offline": "オフライン", "offset": "オフセット", @@ -1512,6 +1562,8 @@ "open": "開く", "open_calendar": "カレンダーを開く", "open_in_browser": "ブラウザで開く", + "open_in_immich_body": "Androidデバイスで、Immichをデフォルトの写真ギャラリーとして設定することで、ほかのアプリから写真がアクセスしやすくなります。", + "open_in_immich_title": "Immichで写真を開く", "open_in_map_view": "地図表示で見る", "open_in_openstreetmap": "OpenStreetMapで開く", "open_the_search_filters": "検索フィルタを開く", @@ -1520,6 +1572,7 @@ "organize_into_albums": "アルバムに追加して整理する", "organize_into_albums_description": "既存の写真を、現在の同期設定に基づきアルバムに追加する", "organize_your_library": "ライブラリを整理", + "orientation": "画像の向き", "original": "オリジナル", "other": "その他", "other_devices": "その他のデバイス", @@ -1594,6 +1647,8 @@ "play_original_video_setting_description": "トランスコードされた動画よりも、オリジナルの動画を優先して再生します。オリジナルのアセットが互換性がない場合、正しく再生されない可能性があります。", "play_transcoded_video": "トランスコード済みの動画を再生する", "please_auth_to_access": "アクセスするには認証が必要です", + "plugin_method_filter_type": "フィルター", + "plugin_method_filter_type_description": "この方法では、イベントをフィルタリングし、条件に応じて次のステップの実行を止めることができます。", "port": "ポートレート", "preferences_settings_subtitle": "アプリに関する設定", "preferences_settings_title": "設定", @@ -1614,6 +1669,7 @@ "profile_drawer_readonly_mode": "読み取り専用モードが有効です。ユーザーのアイコンを長押しして読み取り専用モードを解除してください。", "profile_image_of_user": "{user} のプロフィール画像", "profile_picture_set": "プロフィール画像が設定されました。", + "projection_type": "投写方式", "public_album": "公開アルバム", "public_share": "公開共有", "purchase_account_info": "サポーター", @@ -1666,7 +1722,10 @@ "recent": "最近", "recent_searches": "最近の検索", "recently_added": "最近追加された項目", + "recently_added_body": "あなたが最近追加した項目にすぐアクセスすることができるページがあります。", + "recently_added_description": "Immichにアップロードされた日時順に並べられた項目を閲覧する", "recently_added_page_title": "最近", + "recently_added_title": "最近追加された項目", "recently_taken": "最近撮られたもの", "refresh": "更新", "refresh_encoded_videos": "エンコードされた動画を更新", @@ -1686,6 +1745,7 @@ "remove_assets_shared_link_confirmation": "本当にこの共有リンクから{count, plural, one {#個} other {#個}}の写真/動画を削除しますか?", "remove_assets_title": "写真/動画を削除しますか?", "remove_custom_date_range": "カスタム日付範囲を削除", + "remove_filter": "フィルターを除く", "remove_from_album": "アルバムから削除", "remove_from_album_action_prompt": "{count}項目がアルバムから除かれました", "remove_from_favorites": "お気に入り解除", @@ -1748,6 +1808,8 @@ "scan_library": "スキャン", "scanning": "スキャン中", "scanning_for_album": "アルバムをスキャン中…", + "screencast_mode_description": "画面上にキーボードとマウスのインジケーターを表示する", + "screencast_mode_title": "スクリーンキャストの切り替え", "search": "検索", "search_albums": "アルバムを検索", "search_by_context": "写真の内容で検索", @@ -1755,6 +1817,8 @@ "search_by_description_example": "京都の桜めぐり", "search_by_filename": "ファイル名もしくは拡張子で検索", "search_by_filename_example": "例: IMG_1234.JPG もしくは PNG", + "search_by_full_path": "フルパスまたはフォルダーで検索", + "search_by_full_path_example": "/ユーザー/プロジェクト/3Dプリント/2026年7月1日 - プロジェクト、3D、プリント、2026などの語句で検索できます。", "search_by_ocr": "OCR検索", "search_by_ocr_example": "バス 時刻表", "search_camera_lens_model": "レンズモデルで検索…", @@ -1816,6 +1880,7 @@ "select_person": "人物を選択", "select_person_to_tag": "タグを付ける人物を選んでください", "select_photos": "写真を選択", + "select_quality": "品質を選択する", "select_trash_all": "全て削除", "selected": "選択済み", "selected_count": "{count, plural, other {#個選択済み}}", @@ -1865,6 +1930,10 @@ "share": "共有", "share_dialog_preparing": "準備中", "share_link": "共有リンク", + "share_original": "元の解像度(大)を使用する", + "share_preview": "サムネイル(小)を使用する", + "share_quality_body": "共有する前に、共有を長押しして画質を選択してください。", + "share_quality_title": "共有する際の画質を選択してください", "shared": "共有済み", "shared_album_activities_input_disable": "コメントはオフになってます", "shared_album_activity_remove_content": "このアクティビティを削除しますか?", @@ -1880,6 +1949,8 @@ "shared_link_clipboard_copied_massage": "クリップボードにコピーしました", "shared_link_create_error": "共有用のリンク作成時にエラーが発生しました", "shared_link_custom_url_description": "この共有リンクにカスタムURLでアクセス", + "shared_link_custom_url_title": "カスタムのURL", + "shared_link_custom_url_warning": "警告:「/」が入ったカスタムのURL名は、期待どおりに動作しない可能性があります。", "shared_link_edit_description_hint": "説明を追加", "shared_link_edit_expire_after_option_day": "1日", "shared_link_edit_expire_after_option_days": "{count}日", @@ -1924,6 +1995,7 @@ "show_in_timeline": "タイムラインに表示", "show_in_timeline_setting_description": "このユーザーの写真と動画をタイムラインに表示", "show_keyboard_shortcuts": "キーボードショートカットを表示", + "show_less": "表示数をへらす", "show_metadata": "メタデータを見る", "show_or_hide_info": "情報を表示/非表示", "show_password": "パスワードを表示", @@ -1932,6 +2004,7 @@ "show_schema": "スキーマを表示", "show_search_options": "検索オプションを表示", "show_shared_links": "共有リンクを表示", + "show_slideshow_metadata_overlay": "画像情報を表示", "show_slideshow_transition": "スライドショーのトランジションを表示", "show_supporter_badge": "サポーターバッジ", "show_supporter_badge_description": "サポーターバッジを表示", @@ -1943,13 +2016,21 @@ "sign_out": "サインアウト", "sign_up": "登録", "size": "サイズ", + "skip": "スキップする", "skip_to_content": "コンテンツへスキップ", "skip_to_folders": "フォルダへスキップ", "skip_to_tags": "タグへスキップ", "slideshow": "スライドショー", + "slideshow_body": "ゆったりとくつろぎながら、フルスクリーンのスライドショーで写真をお楽しみください。", + "slideshow_metadata_overlay_mode": "オーバーレイコンテンツ", + "slideshow_metadata_overlay_mode_description_only": "説明のみ", + "slideshow_metadata_overlay_mode_full": "フル", "slideshow_repeat": "スライドショーを繰り返す", "slideshow_repeat_description": "スライドショーが終わったら始めに戻ります", "slideshow_settings": "スライドショー設定", + "slideshow_title": "スライドショー", + "smart_album": "スマートアルバム", + "some_assets_already_have_a_location_warning": "選択された項目の一部には、すでに場所が設定されています。", "sort_albums_by": "この順序でアルバムをソート…", "sort_created": "作成日", "sort_items": "項目の数", @@ -1970,6 +2051,10 @@ "start_date_before_end_date": "開始日は終了日より前でなければなりません", "state": "都道府県", "status": "ステータス", + "step_delete": "ステップを削除する", + "step_delete_confirm": "このステップを削除してもよろしいですか?", + "step_details": "ステップの詳細", + "steps": "ステップ", "stop_casting": "キャストを停止", "stop_motion_photo": "ストップモーション写真", "stop_photo_sharing": "写真の共有を無効化しますか?", @@ -1995,6 +2080,8 @@ "sync_status": "同期の状態", "sync_status_subtitle": "同期システムを確認・管理", "sync_upload_album_setting_subtitle": "サーバー上のアルバムの内容を端末上のアルバムと同期します (サーバーにアルバムが無い場合自動で作成されます。また、アップロードされていない写真や動画は同期されません)", + "system_theme": "システムのテーマ", + "system_theme_command_description": "システムのテーマを使用する{value}", "tag": "タグ付けする", "tag_assets": "写真/動画にタグ付けする", "tag_created": "タグ: {tag} を作成しました", @@ -2048,10 +2135,12 @@ "trash_page_info": "ゴミ箱に移動したアイテムは{days}日後に削除されます", "trashed_items_will_be_permanently_deleted_after": "ゴミ箱に入れられたアイテムは{days, plural, one {#日} other {#日}}後に完全に削除されます。", "trigger": "トリガー", - "trigger_asset_uploaded": "アセットがアップロード", + "trigger_asset_metadata_extraction": "項目のメタデータの抽出", + "trigger_asset_metadata_extraction_description": "項目からEXIFメタデータが抽出された際にトリガーされる", + "trigger_asset_uploaded": "アセットをアップロード", "trigger_asset_uploaded_description": "新しい項目がアップロードされたときにトリガーされます", "trigger_person_recognized": "認識された人物", - "trigger_person_recognized_description": "人物が検知された際のトリガー", + "trigger_person_recognized_description": "人物が検知された際に実行されます", "troubleshoot": "トラブルシューティング", "type": "タイプ", "unable_to_change_pin_code": "PINコードを変更できませんでした", @@ -2067,6 +2156,7 @@ "unknown": "不明", "unknown_country": "不明な国", "unknown_date": "不明な日付", + "unknown_schema": "不明なスキーマ", "unknown_year": "不明な年", "unlimited": "無制限", "unlink_motion_video": "モーションビデオのリンクを解除", @@ -2101,9 +2191,12 @@ "upload_status_errors": "エラー", "upload_status_uploaded": "アップロード済", "upload_success": "アップロード成功、新しくアップロードされた写真/動画を見るにはページを更新してください。", + "upload_to_album_body": "手動アップロード機能を使用しない場合、ローカルの写真をアップロードする際に直接アルバムへ追加できるようになりました。アップロードした後に改めてアルバムへ追加する手間はもう必要ありません。", + "upload_to_album_title": "アルバムに直接アップロードする", "upload_to_immich": "Immichにアップロード ({count})", "uploading": "アップロード中", "uploading_media": "メディアをアップロード中", + "uploads": "アップロード", "url": "URL", "usage": "使用容量", "use_biometric": "生体認証をご利用ください", @@ -2111,6 +2204,7 @@ "use_browser_locale_description": "ブラウザの言語と地域の設定に従って、日付・時刻・数値を書式設定します", "use_current_connection": "現在の接続情報を使用", "use_custom_date_range": "代わりにカスタム日付範囲を使用", + "use_template": "テンプレートを使用", "user": "ユーザー", "user_has_been_deleted": "このユーザーは削除されました", "user_id": "ユーザーID", @@ -2138,6 +2232,7 @@ "video": "動画", "video_hover_setting": "ホバー時にサムネイルで動画を再生", "video_hover_setting_description": "マウスが項目の上にあるときに動画のサムネイルを再生します。無効時でも再生アイコンにカーソルを合わせると再生を開始できます。", + "video_quality": "画質", "videos": "ビデオ", "videos_count": "{count, plural, one {#個} other {#個}}の動画", "view": "見る", @@ -2164,8 +2259,13 @@ "week": "週", "welcome": "ようこそ", "welcome_to_immich": "Immichにようこそ", + "whats_new": "新着情報", + "whats_new_settings_subtitle": "Immichの新着情報をチェック", + "whats_new_version": "バージョン{version}", + "when": "いつ", "width": "幅", "wifi_name": "Wi-Fiの名前(SSID)", + "workflow": "ワークフロー", "workflow_delete_prompt": "このワークフローをほんとうに削除しますか?", "workflow_deleted": "ワークフロー削除完了", "workflow_description": "ワークフローの説明文", @@ -2175,10 +2275,12 @@ "workflow_name": "ワークフロー名称", "workflow_navigation_prompt": "変更内容を保存せずに終了しますか?", "workflow_summary": "ワークフローのサマリ", + "workflow_templates": "ワークフローのテンプレート", "workflow_update_success": "ワークフローの更新に成功しました", "workflows": "ワークフロー", "workflows_help_text": "ワークフローはあなたのアセットに対し、トリガーやフィルターを設定することでアクションを自動化します", "wrong_pin_code": "PINコードが間違っています", + "x_of_total": "{x}÷{total}", "year": "年", "years_ago": "{years, plural, one {#年} other {#年}}前", "yes": "はい", diff --git a/i18n/ka.json b/i18n/ka.json index 35b1802b07..0a0d4c095e 100644 --- a/i18n/ka.json +++ b/i18n/ka.json @@ -80,7 +80,6 @@ "image_format": "ფორმატი", "image_format_description": "WebP ფორმატი JPEG-ზე პატარა ფაილებს აწარმოებს, მაგრამ მის დამზადებას უფრო მეტი დრო სჭირდება.", "image_fullsize_enabled": "ჩართე სრული ზომის ფოტოების გენერაცია", - "image_fullsize_enabled_description": "დააგენერირე მთლიანი ზომის ფოტოები არა ვებ მეგობრული ფორმატებისთვის. როცა", "image_fullsize_quality_description": "მთლიანი ზომის სურათის ხარისხი 1-100მდეა. მეტი არის უკეტეთეში, მაგრამ წარმოქმნის უფრო დიდ ფაილებს.", "image_fullsize_title": "სრული ზომის გამოსახულების პარამეტრები", "image_prefer_embedded_preview": "ჩაშენებული გადახედვის უპირატესობა", @@ -135,6 +134,7 @@ "transcoding_acceleration_vaapi": "VAAPI", "transcoding_hardware_acceleration": "ჰარდვეარული ამაჩქარებელი", "transcoding_policy": "ტრანსკოდირების პოლიტიკა", + "transcoding_realtime_resolutions": "გარჩევადობები", "transcoding_threads": "ნაკადები", "transcoding_tone_mapping": "ტონების ასახვა" }, @@ -168,6 +168,8 @@ "canceling": "უქმდება", "cast": "ტრანსლაცია", "charging": "იტენება", + "checksum": "საკონტროლო ჯამი", + "choose": "არჩევა", "city": "ქალაქი", "clear": "გასუფთავება", "client_cert_import": "შემოტანა", @@ -187,6 +189,7 @@ "created": "შექმნილია", "created_at": "შეიქმნა", "crop": "ამოჭრა", + "crop_aspect_ratio_original": "ორიგინალი", "dark": "მუქი", "date": "თარიღი", "day": "დღე", @@ -203,6 +206,7 @@ "download": "გადმოწერა", "download_settings": "გადმოწერა", "downloading": "მიმდინარეობს გადმოწერა", + "duplicate": "დუბლირება", "duplicates": "დუბლიკატები", "duration": "ხანგრძლივობა", "edit": "ჩასწორება", @@ -214,6 +218,7 @@ "enqueued": "რიგში ჩასმულია", "error": "შეცდომა", "exif": "Exif", + "expand": "გამოშლა", "expired": "ვადაამოწურულია", "explore": "დათვალიერება", "explorer": "გამცილებელი", @@ -228,6 +233,7 @@ "filename": "ფაილის სახელი", "filetype": "ფაილის ტიპი", "filter": "ფილტრი", + "filters": "ფილტრები", "first": "პირველი", "folder": "საქაღალდე", "folders": "საქაღალდეები", @@ -253,6 +259,7 @@ "licenses": "ლიცენზიები", "light": "ღია", "like": "მოწონება", + "link": "ბმული", "list": "სია", "loading": "ჩატვირთვა", "local": "ლოკალური", @@ -268,6 +275,14 @@ "make": "მწარმოებელი", "map": "რუკა", "matches": "დამთხვევები", + "media_chrome": { + "auto": "ავტო", + "captions_off": "გამორთ", + "loop": "მარყუჟი", + "mute": "დადუმება", + "second": "წამი", + "unmute": "დადუმების გაუქმება" + }, "memories": "მოგონებები", "memory": "მეხსიერება", "menu": "მენიუ", @@ -279,6 +294,7 @@ "model": "მოდელი", "month": "თვე", "more": "მეტი", + "motion": "მოძრავი", "move": "გადატანა", "name": "სახელი", "navigate": "ნავიგაცია", @@ -355,6 +371,7 @@ "save": "შენახვა", "saved": "შენახულია", "scan_library": "სკანირება", + "scanning": "სკანირება", "search": "ძებნა", "search_by_ocr_example": "ლატე", "search_filter_date": "თარიღი", @@ -387,6 +404,7 @@ "success": "წარმატება", "suggestions": "რჩევები", "support": "მხარდაჭერა", + "supporter": "მხარდამჭერი", "sync": "სინქრონიზაცია", "tag": "ჭდე", "tags": "ჭდეები", @@ -430,10 +448,12 @@ "videos": "ვიდეოები", "view": "დათვალიერება", "view_name": "ხედი", + "visibility": "ხოლვადობა", "waiting": "მოლოდინი", "warning": "გაფრთხილება", "week": "კვირა", "welcome": "მოგესალმებით", + "width": "სიგანე", "year": "წელი", "yes": "დიახ" } diff --git a/i18n/kn.json b/i18n/kn.json index ea0cf47dc9..97d5aab946 100644 --- a/i18n/kn.json +++ b/i18n/kn.json @@ -23,6 +23,7 @@ "add_location": "ಸ್ಥಳ ಸೇರಿಸಿ", "add_partner": "ಪಾಲುದಾರರನ್ನು ಸೇರಿಸಿ", "add_photos": "ಫೋಟೋಗಳನ್ನು ಸೇರಿಸಿ", + "add_step": "ಹಂತ ಸೇರಿಸಿ", "add_tag": "ಟ್ಯಾಗ್ ಸೇರಿಸಿ", "add_to": "ಸೇರಿಸಿ…", "add_to_album": "ಆಲ್ಬಮ್‌ಗೆ ಸೇರಿಸಿ", @@ -71,6 +72,7 @@ "cron_expression_description": "ಕ್ರಾನ್ ಸ್ವರೂಪವನ್ನು ಬಳಸಿಕೊಂಡು ಸ್ಕ್ಯಾನಿಂಗ್ ಮಧ್ಯಂತರವನ್ನು ಹೊಂದಿಸಿ. ಹೆಚ್ಚಿನ ಮಾಹಿತಿಗಾಗಿ ದಯವಿಟ್ಟು ಉದಾ. Crontab Guru ಅನ್ನು ನೋಡಿ", "cron_expression_presets": "ಕ್ರಾನ್ ಅಭಿವ್ಯಕ್ತಿ ಪೂರ್ವನಿಗದಿಗಳು", "disable_login": "ಲಾಗಿನ್ ನಿಷ್ಕ್ರಿಯಗೊಳಿಸಿ", + "download_csv": "ಸಿಎಸ್ವಿ ಡೌನ್ ಲೋಡ್ ಮಾಡಿ", "duplicate_detection_job_description": "ಒಂದೇ ರೀತಿಯ ಚಿತ್ರಗಳನ್ನು ಪತ್ತೆಹಚ್ಚಲು ಸ್ವತ್ತುಗಳ ಮೇಲೆ ಯಂತ್ರ ಕಲಿಕೆಯನ್ನು ರನ್ ಮಾಡಿ. ಸ್ಮಾರ್ಟ್ ಹುಡುಕಾಟವನ್ನು ಅವಲಂಬಿಸಿದೆ", "exclusion_pattern_description": "ನಿಮ್ಮ ಲೈಬ್ರರಿಯನ್ನು ಸ್ಕ್ಯಾನ್ ಮಾಡುವಾಗ ಫೈಲ್‌ಗಳು ಮತ್ತು ಫೋಲ್ಡರ್‌ಗಳನ್ನು ನಿರ್ಲಕ್ಷಿಸಲು ಎಕ್ಸ್‌ಕ್ಲೂಷನ್ ಪ್ಯಾಟರ್ನ್‌ಗಳು ನಿಮಗೆ ಅವಕಾಶ ನೀಡುತ್ತವೆ. ನೀವು ಆಮದು ಮಾಡಿಕೊಳ್ಳಲು ಬಯಸದ ಫೈಲ್‌ಗಳನ್ನು ಹೊಂದಿರುವ ಫೋಲ್ಡರ್‌ಗಳನ್ನು ಹೊಂದಿದ್ದರೆ, ಉದಾಹರಣೆಗೆ RAW ಫೈಲ್‌ಗಳು.", "export_config_as_json_description": "ಪ್ರಸ್ತುತ ಸಿಸ್ಟಮ್ ಕಾನ್ಫಿಗರೇಶನ್ ಅನ್ನು JSON ಫೈಲ್ ಆಗಿ ಡೌನ್‌ಲೋಡ್ ಮಾಡಿ", @@ -105,6 +107,20 @@ "image_thumbnail_quality_description": "ಥಂಬ್‌ನೇಲ್ ಗುಣಮಟ್ಟ 1 ರಿಂದ 100 ರವರೆಗೆ. ಹೆಚ್ಚಿನದು ಉತ್ತಮ, ಆದರೆ ದೊಡ್ಡ ಫೈಲ್‌ಗಳನ್ನು ಉತ್ಪಾದಿಸುತ್ತದೆ ಮತ್ತು ಅಪ್ಲಿಕೇಶನ್ ಪ್ರತಿಕ್ರಿಯೆಯನ್ನು ಕಡಿಮೆ ಮಾಡುತ್ತದೆ.", "image_thumbnail_title": "ಥಂಬ್‌ನೇಲ್ ಸೆಟ್ಟಿಂಗ್‌ಗಳು", "import_config_from_json_description": "JSON ಕಾನ್ಫಿಗರೇಶನ್ ಫೈಲ್ ಅನ್ನು ಅಪ್‌ಲೋಡ್ ಮಾಡುವ ಮೂಲಕ ಸಿಸ್ಟಮ್ ಕಾನ್ಫಿಗರೇಶನ್ ಅನ್ನು ಆಮದು ಮಾಡಿ", + "integrity_checks_checksum_files": "ಚೆಕ್ಸಮ್ ಫೈಲ್ ಗಳು", + "integrity_checks_checksum_files_description": "ಚೆಕ್ಸಮ್ ಚೆಕ್ ಅನ್ನು ಕಾನ್ಫಿಗರ್ ಮಾಡಿ", + "integrity_checks_checksum_files_enable_description": "ಚೆಕ್ಸಮ್ ಚೆಕ್ ಅನ್ನು ಸಕ್ರಿಯಗೊಳಿಸಿ", + "integrity_checks_checksum_files_percentage_limit": "ಶೇಕಡಾವಾರು ಮಿತಿ", + "integrity_checks_checksum_files_percentage_limit_description": "ಪ್ರತಿ ಮಧ್ಯಂತರದಲ್ಲಿ ಚೆಕ್ಸಮ್ ಚೆಕ್ ಎಷ್ಟು ಚಲಾಯಿಸಬೇಕು ಎಂಬುದಕ್ಕೆ 0.01 ಮತ್ತು 1 ರ ನಡುವಿನ ಗರಿಷ್ಠ ಶೇಕಡಾವಾರು ಪ್ರಮಾಣವನ್ನು ಕಾನ್ಫಿಗರ್ ಮಾಡಿ.", + "integrity_checks_checksum_files_time_limit": "ಸಮಯ ಮಿತಿ", + "integrity_checks_checksum_files_time_limit_description": "ಚೆಕ್ಸಮ್ ಚೆಕ್ ಪ್ರತಿ ಮಧ್ಯಂತರವನ್ನು ಚಲಾಯಿಸಬೇಕಾದ ಗರಿಷ್ಠ ಅವಧಿಯನ್ನು ಕಾನ್ಫಿಗರ್ ಮಾಡಿ. (ಮೀ)", + "integrity_checks_missing_files_description": "ಆವರ್ತನವನ್ನು ಕಾನ್ಫಿಗರ್ ಮಾಡಿ ಮತ್ತು ಕಾಣೆಯಾದ ಫೈಲ್ ಗಳ ಚೆಕ್ ಅನ್ನು ಸಕ್ರಿಯಗೊಳಿಸಿ ಅಥವಾ ನಿಷ್ಕ್ರಿಯಗೊಳಿಸಿ", + "integrity_checks_missing_files_enable_description": "ಕಾಣೆಯಾದ ಫೈಲ್ ಗಳನ್ನು ಸಕ್ರಿಯಗೊಳಿಸಿ", + "integrity_checks_settings": "ಸಮಗ್ರತೆ ಪರಿಶೀಲನೆಗಳು", + "integrity_checks_settings_description": "ಸಮಗ್ರತೆಯ ಚೆಕ್ ಮಧ್ಯಂತರಗಳನ್ನು ನಿರ್ವಹಿಸಿ", + "integrity_checks_untracked_files": "ಅನ್ರ್ಯಾಕ್ ಮಾಡದ ಫೈಲ್ ಗಳು", + "integrity_checks_untracked_files_description": "ಆವರ್ತನವನ್ನು ಕಾನ್ಫಿಗರ್ ಮಾಡಿ ಮತ್ತು ಟ್ರ್ಯಾಕ್ ಮಾಡದ ಫೈಲ್ ಗಳನ್ನು ಚೆಕ್ ಅನ್ನು ಸಕ್ರಿಯಗೊಳಿಸಿ ಅಥವಾ ನಿಷ್ಕ್ರಿಯಗೊಳಿಸಿ", + "integrity_checks_untracked_files_enable_description": "ಟ್ರ್ಯಾಕ್ ಮಾಡದ ಫೈಲ್ ಗಳನ್ನು ಸಕ್ರಿಯಗೊಳಿಸಿ", "job_concurrency": "{job} ಸಹವರ್ತಿತ್ವ", "job_created": "ಕೆಲಸವನ್ನು ರಚಿಸಲಾಗಿದೆ", "job_not_concurrency_safe": "ಈ ಕೆಲಸವು ಸಹವರ್ತಿತ್ವಕ್ಕೆ ಸುರಕ್ಷಿತವಲ್ಲ.", @@ -179,9 +195,21 @@ "machine_learning_smart_search_enabled": "ಸ್ಮಾರ್ಟ್ ಹುಡುಕಾಟವನ್ನು ಸಕ್ರಿಯಗೊಳಿಸಿ", "machine_learning_smart_search_enabled_description": "ನಿಷ್ಕ್ರಿಯಗೊಳಿಸಿದರೆ, ಚಿತ್ರಗಳನ್ನು ಸ್ಮಾರ್ಟ್ ಹುಡುಕಾಟಕ್ಕಾಗಿ ಎನ್‌ಕೋಡ್ ಮಾಡಲಾಗುವುದಿಲ್ಲ.", "machine_learning_url_description": "ಯಂತ್ರ ಕಲಿಕೆ ಸರ್ವರ್‌ನ URL. ಒಂದಕ್ಕಿಂತ ಹೆಚ್ಚು URL ಗಳನ್ನು ಒದಗಿಸಿದರೆ, ಮೊದಲಿನಿಂದ ಕೊನೆಯವರೆಗೆ, ಪ್ರತಿ ಸರ್ವರ್ ಯಶಸ್ವಿಯಾಗಿ ಪ್ರತಿಕ್ರಿಯಿಸುವವರೆಗೆ ಒಂದೊಂದಾಗಿ ಪ್ರಯತ್ನಿಸಲಾಗುತ್ತದೆ. ಪ್ರತಿಕ್ರಿಯಿಸದ ಸರ್ವರ್‌ಗಳನ್ನು ಅವರು ಆನ್‌ಲೈನ್‌ಗೆ ಹಿಂತಿರುಗುವವರೆಗೆ ತಾತ್ಕಾಲಿಕವಾಗಿ ನಿರ್ಲಕ್ಷಿಸಲಾಗುತ್ತದೆ.", + "maintenance_backup_management": "ಬ್ಯಾಕಪ್ ನಿರ್ವಹಣೆ", "maintenance_delete_backup": "ಬ್ಯಾಕಪ್ ಅಳಿಸಿ", "maintenance_delete_backup_description": "ಈ ಫೈಲ್ ಅನ್ನು ಶಾಶ್ವತವಾಗಿ ಅಳಿಸಲಾಗುತ್ತದೆ.", "maintenance_delete_error": "ಬ್ಯಾಕಪ್ ಅಳಿಸಲು ವಿಫಲವಾಗಿದೆ.", + "maintenance_integrity_check": "ಪರಿಶೀಲಿಸಿ", + "maintenance_integrity_check_all": "ಎಲ್ಲವನ್ನೂ ಪರಿಶೀಲಿಸಿ", + "maintenance_integrity_checksum_mismatch": "ಚೆಕ್ಸಮ್ ಮಿಸ್ಮ್ಯಾಚ್", + "maintenance_integrity_checksum_mismatch_description": "ಆನ್-ಡಿಸ್ಕ್ ಚೆಕ್ಸಮ್ ಚೆಕ್ಸಮ್ ಅನ್ನು ತಪ್ಪಾಗಿ ಹೇಳುವ ಫೈಲ್ ಗಳು ಇಮ್ಮಿಚ್ ಅದರ ಡೇಟಾಬೇಸ್ ನಲ್ಲಿ ಸಂಗ್ರಹಿಸಿದೆ.", + "maintenance_integrity_checksum_mismatch_job": "ಚೆಕಮ್ ಮಿಸ್ಮ್ಯಾಚ್ ಗಳಿಗಾಗಿ ಪರಿಶೀಲಿಸಿ", + "maintenance_integrity_checksum_mismatch_refresh_job": "ರಿಫ್ರೆಶ್ ಚೆಕ್ಸಮ್ ಮಿಸ್ಮ್ಯಾಚ್ ವರದಿಗಳು", + "maintenance_integrity_missing_file_description": "ಅದನ್ನು ಫೈಲ್ ಮಾಡುತ್ತದೆ ಇಮ್ಮಿಚ್ ಅದರ ಡೇಟಾಬೇಸ್ ನಲ್ಲಿ ಟ್ರ್ಯಾಕ್ ಮಾಡಲಾಗಿದೆ ಆದರೆ ಫೈಲ್ ಸಿಸ್ಟಮ್ ನಲ್ಲಿ ಅಸ್ತಿತ್ವದಲ್ಲಿಲ್ಲ.", + "maintenance_integrity_missing_file_job": "ಕಾಣೆಯಾದ ಫೈಲ್ ಗಳನ್ನು ಪರಿಶೀಲಿಸಿ", + "maintenance_integrity_missing_file_refresh_job": "ಕಾಣೆಯಾದ ಫೈಲ್ ವರದಿಗಳನ್ನು ರಿಫ್ರೆಶ್ ಮಾಡಿ", + "maintenance_integrity_report": "ಸಮಗ್ರತೆ ವರದಿ", + "maintenance_integrity_untracked_file_description": "ಫೈಲ್ ಗಳು ಇಮ್ಮಿಚ್ಅದರ ಡೈರೆಕ್ಟರಿಗಳು ಇಮ್ಮಿಚ್ ಯಾವುದೇ ದಾಖಲೆಯನ್ನು ಹೊಂದಿಲ್ಲ.", "maintenance_restore_backup": "ಬ್ಯಾಕಪ್ ಅನ್ನು ಮರುಸ್ಥಾಪಿಸಿ", "maintenance_restore_backup_description": "ಆಯ್ಕೆ ಮಾಡಿದ ಬ್ಯಾಕಪ್‌ನಿಂದ ಇಮ್ಮಿಚ್ ಅನ್ನು ಅಳಿಸಿಹಾಕಲಾಗುತ್ತದೆ ಮತ್ತು ಮರುಸ್ಥಾಪಿಸಲಾಗುತ್ತದೆ. ಮುಂದುವರಿಯುವ ಮೊದಲು ಬ್ಯಾಕಪ್ ಅನ್ನು ರಚಿಸಲಾಗುತ್ತದೆ.", "maintenance_restore_backup_different_version": "ಈ ಬ್ಯಾಕಪ್ ಅನ್ನು ಇಮ್ಮಿಚ್‌ನ ವಿಭಿನ್ನ ಆವೃತ್ತಿಯೊಂದಿಗೆ ರಚಿಸಲಾಗಿದೆ!", @@ -256,6 +284,8 @@ "notification_enable_email_notifications": "ಇಮೇಲ್ ಅಧಿಸೂಚನೆಗಳನ್ನು ಸಕ್ರಿಯಗೊಳಿಸಿ", "notification_settings": "ಅಧಿಸೂಚನೆ ಸೆಟ್ಟಿಂಗ್‌ಗಳು", "notification_settings_description": "ಇಮೇಲ್ ಸೇರಿದಂತೆ ಅಧಿಸೂಚನೆ ಸೆಟ್ಟಿಂಗ್‌ಗಳನ್ನು ನಿರ್ವಹಿಸಿ", + "oauth_allow_insecure_requests": "ಅಸುರಕ್ಷಿತ ವಿನಂತಿಗಳನ್ನು ಅನುಮತಿಸಿ", + "oauth_allow_insecure_requests_description": "ಎಚ್ಚರಿಕೆ: ಇದು ಟಿಎಲ್ಎಸ್ ಪ್ರಮಾಣಪತ್ರ ಮೌಲ್ಯಮಾಪನವನ್ನು ನಿಷ್ಕ್ರಿಯಗೊಳಿಸುತ್ತದೆ OAuth ವಿನಂತಿಗಳು ಮತ್ತು ಎಂಐಟಿಎಂ ದಾಳಿಗೆ ನಿಮ್ಮನ್ನು ಬಹಿರಂಗಪಡಿಸಬಹುದು.", "oauth_auto_launch": "ಸ್ವಯಂ ಉಡಾವಣೆ", "oauth_auto_launch_description": "ಲಾಗಿನ್ ಪುಟಕ್ಕೆ ನ್ಯಾವಿಗೇಟ್ ಮಾಡಿದ ನಂತರ OAuth ಲಾಗಿನ್ ಹರಿವನ್ನು ಸ್ವಯಂಚಾಲಿತವಾಗಿ ಪ್ರಾರಂಭಿಸಿ", "oauth_auto_register": "ಸ್ವಯಂ ನೋಂದಣಿ", @@ -266,6 +296,7 @@ "oauth_mobile_redirect_uri": "ಮೊಬೈಲ್ ಮರುನಿರ್ದೇಶನ URI", "oauth_mobile_redirect_uri_override": "ಮೊಬೈಲ್ ಮರುನಿರ್ದೇಶನ URI ಅತಿಕ್ರಮಣ", "oauth_mobile_redirect_uri_override_description": "''{callback}'' ನಂತಹ ಮೊಬೈಲ್ URI ಅನ್ನು OAuth ಪೂರೈಕೆದಾರರು ಅನುಮತಿಸದಿದ್ದಾಗ ಸಕ್ರಿಯಗೊಳಿಸಿ", + "oauth_prompt_description": "ಪ್ರಾಂಪ್ಟ್ ಪ್ಯಾರಾಮೀಟರ್ (ಉದಾ. ಸೆಲೆಕ್ಟ್_ಕೌಂಟ್, ಲಾಗಿನ್, ಒಪ್ಪಿಗೆ)", "oauth_role_claim": "ಪಾತ್ರದ ಹಕ್ಕು", "oauth_role_claim_description": "ಈ ಹಕ್ಕಿನ ಉಪಸ್ಥಿತಿಯ ಆಧಾರದ ಮೇಲೆ ಸ್ವಯಂಚಾಲಿತವಾಗಿ ನಿರ್ವಾಹಕ ಪ್ರವೇಶವನ್ನು ನೀಡಿ. ಹಕ್ಕಿನಲ್ಲಿ 'ಬಳಕೆದಾರ' ಅಥವಾ 'ನಿರ್ವಾಹಕ' ಇರಬಹುದು.", "oauth_settings": "OAuth", @@ -292,6 +323,8 @@ "refreshing_all_libraries": "ಎಲ್ಲಾ ಗ್ರಂಥಾಲಯಗಳನ್ನು ರಿಫ್ರೆಶ್ ಮಾಡಲಾಗುತ್ತಿದೆ", "registration": "ನಿರ್ವಾಹಕ ನೋಂದಣಿ", "registration_description": "ನೀವು ಸಿಸ್ಟಂನಲ್ಲಿ ಮೊದಲ ಬಳಕೆದಾರರಾಗಿರುವುದರಿಂದ, ನಿಮ್ಮನ್ನು ನಿರ್ವಾಹಕರಾಗಿ ನಿಯೋಜಿಸಲಾಗುತ್ತದೆ ಮತ್ತು ಆಡಳಿತಾತ್ಮಕ ಕಾರ್ಯಗಳಿಗೆ ಜವಾಬ್ದಾರರಾಗಿರುತ್ತೀರಿ ಮತ್ತು ಹೆಚ್ಚುವರಿ ಬಳಕೆದಾರರನ್ನು ನೀವು ರಚಿಸುತ್ತೀರಿ.", + "release_channel_release_candidate": "ಬಿಡುಗಡೆ ಅಭ್ಯರ್ಥಿ", + "release_channel_stable": "ಸ್ಥಿರ", "remove_failed_jobs": "ವಿಫಲವಾದ ಕೆಲಸಗಳನ್ನು ತೆಗೆದುಹಾಕಿ", "require_password_change_on_login": "ಮೊದಲ ಲಾಗಿನ್‌ನಲ್ಲಿ ಬಳಕೆದಾರರು ಪಾಸ್‌ವರ್ಡ್ ಬದಲಾಯಿಸಬೇಕಾಗುತ್ತದೆ", "reset_settings_to_default": "ಸೆಟ್ಟಿಂಗ್‌ಗಳನ್ನು ಡೀಫಾಲ್ಟ್‌ಗೆ ಮರುಹೊಂದಿಸಿ", @@ -386,6 +419,12 @@ "transcoding_preferred_hardware_device_description": "VAAPI ಮತ್ತು QSV ಗೆ ಮಾತ್ರ ಅನ್ವಯಿಸುತ್ತದೆ. ಹಾರ್ಡ್‌ವೇರ್ ಟ್ರಾನ್ಸ್‌ಕೋಡಿಂಗ್‌ಗಾಗಿ ಬಳಸುವ dri ನೋಡ್ ಅನ್ನು ಹೊಂದಿಸುತ್ತದೆ.", "transcoding_preset_preset": "ಪೂರ್ವನಿಗದಿ (-ಪೂರ್ವನಿಗದಿ)", "transcoding_preset_preset_description": "ಸಂಕೋಚನ ವೇಗ. ನಿಧಾನವಾದ ಪೂರ್ವನಿಗದಿಗಳು ಚಿಕ್ಕ ಫೈಲ್‌ಗಳನ್ನು ಉತ್ಪಾದಿಸುತ್ತವೆ ಮತ್ತು ನಿರ್ದಿಷ್ಟ ಬಿಟ್ರೇಟ್ ಅನ್ನು ಗುರಿಯಾಗಿಸಿಕೊಂಡಾಗ ಗುಣಮಟ್ಟವನ್ನು ಹೆಚ್ಚಿಸುತ್ತವೆ. VP9 'ವೇಗ' ಕ್ಕಿಂತ ಹೆಚ್ಚಿನ ವೇಗವನ್ನು ನಿರ್ಲಕ್ಷಿಸುತ್ತದೆ.", + "transcoding_realtime_description": "ವೀಡಿಯೊವನ್ನು ಸ್ಟ್ರೀಮ್ ಆಗುತ್ತಿರುವುದರಿಂದ ಟ್ರಾನ್ಸ್ ಕೋಡಿಂಗ್ ಅನ್ನು ನೈಜ ಸಮಯದಲ್ಲಿ ನಿರ್ವಹಿಸಲು ಅನುಮತಿಸುತ್ತದೆ. ಗುಣಮಟ್ಟದ ಸ್ವಿಚಿಂಗ್ ಅನ್ನು ಸಕ್ರಿಯಗೊಳಿಸುತ್ತದೆ, ಆದರೆ ಸರ್ವರ್ ಸಾಮರ್ಥ್ಯಗಳನ್ನು ಅವಲಂಬಿಸಿ ಹೆಚ್ಚಿನ ಪ್ಲೇಬ್ಯಾಕ್ ಸುಪ್ತತೆ ಮತ್ತು ಸ್ಟಟರಿಂಗ್ ಅನ್ನು ಉಂಟುಮಾಡಬಹುದು.", + "transcoding_realtime_enabled": "ನೈಜ-ಸಮಯದ ಟ್ರಾನ್ಸ್ ಕೋಡಿಂಗ್ ಅನ್ನು ಸಕ್ರಿಯಗೊಳಿಸಿ", + "transcoding_realtime_resolutions": "ನಿರ್ಣಯಗಳು", + "transcoding_realtime_resolutions_description": "ನೈಜ-ಸಮಯದ ಟ್ರಾನ್ಸ್ ಕೋಡಿಂಗ್ ಗಾಗಿ ನೀಡಲಾದ ನಿರ್ಣಯಗಳು. ಸರ್ವರ್ ಅವುಗಳನ್ನು ತ್ವರಿತವಾಗಿ ಟ್ರಾನ್ಸ್ ಕೋಡ್ ಮಾಡಲು ಸಾಧ್ಯವಾಗದಿದ್ದರೆ ಹೆಚ್ಚಿನ ನಿರ್ಣಯಗಳು ಪ್ಲೇಬ್ಯಾಕ್ ಸಮಸ್ಯೆಗಳಿಗೆ ಕಾರಣವಾಗಬಹುದು.", + "transcoding_realtime_video_codecs": "ವೀಡಿಯೊ ಕೋಡೆಕ್ ಗಳು", + "transcoding_realtime_video_codecs_description": "ನೈಜ-ಸಮಯದ ಟ್ರಾನ್ಸ್ ಕೋಡಿಂಗ್ ಗಾಗಿ ವೀಡಿಯೊ ಕೋಡೆಕ್ ಗಳು ನೀಡಲಾಗುತ್ತದೆ. ಪ್ಲೇಬ್ಯಾಕ್ ಸಮಯದಲ್ಲಿ ಗ್ರಾಹಕರು ತಾವು ಬೆಂಬಲಿಸುವ ಅತ್ಯುತ್ತಮ ಆಯ್ಕೆಯನ್ನು ಆಯ್ಕೆ ಮಾಡುತ್ತಾರೆ. AV1 HEVC ಗಿಂತ ಹೆಚ್ಚು ಪರಿಣಾಮಕಾರಿಯಾಗಿದೆ, ಇದು H.264 ಗಿಂತ ಹೆಚ್ಚು ಪರಿಣಾಮಕಾರಿಯಾಗಿದೆ. ಹಾರ್ಡ್ ವೇರ್ ವೇಗವರ್ಧನೆಯನ್ನು ಬಳಸುವಾಗ, ವೇಗವರ್ಧಕವು ಎನ್ಕೋಡ್ ಮಾಡಬಹುದಾದ ಕೋಡೆಕ್ ಗಳನ್ನು ಮಾತ್ರ ಆರಿಸಿ. ಸಾಫ್ಟ್ ವೇರ್ ಟ್ರಾನ್ಸ್ ಕೋಡಿಂಗ್ ಬಳಸುವಾಗ, H.264 AV1 ಗಿಂತ ವೇಗವಾಗಿರುತ್ತದೆ ಎಂಬುದನ್ನು ಗಮನಿಸಿ, ಅದು HVC ಗಿಂತ ವೇಗವಾಗಿರುತ್ತದೆ.", "transcoding_reference_frames": "ಉಲ್ಲೇಖ ಚೌಕಟ್ಟುಗಳು", "transcoding_reference_frames_description": "ನಿರ್ದಿಷ್ಟ ಫ್ರೇಮ್ ಅನ್ನು ಕುಗ್ಗಿಸುವಾಗ ಉಲ್ಲೇಖಿಸಬೇಕಾದ ಫ್ರೇಮ್‌ಗಳ ಸಂಖ್ಯೆ. ಹೆಚ್ಚಿನ ಮೌಲ್ಯಗಳು ಸಂಕುಚಿತ ದಕ್ಷತೆಯನ್ನು ಸುಧಾರಿಸುತ್ತದೆ, ಆದರೆ ಎನ್‌ಕೋಡಿಂಗ್ ಅನ್ನು ನಿಧಾನಗೊಳಿಸುತ್ತದೆ. 0 ಈ ಮೌಲ್ಯವನ್ನು ಸ್ವಯಂಚಾಲಿತವಾಗಿ ಹೊಂದಿಸುತ್ತದೆ.", "transcoding_required_description": "ಸ್ವೀಕರಿಸಿದ ಸ್ವರೂಪದಲ್ಲಿಲ್ಲದ ವೀಡಿಯೊಗಳು ಮಾತ್ರ", @@ -429,6 +468,8 @@ "user_settings_description": "ಬಳಕೆದಾರ ಸೆಟ್ಟಿಂಗ್‌ಗಳನ್ನು ನಿರ್ವಹಿಸಿ", "user_successfully_removed": "ಬಳಕೆದಾರ {email} ಅವರನ್ನು ಯಶಸ್ವಿಯಾಗಿ ತೆಗೆದುಹಾಕಲಾಗಿದೆ.", "users_page_description": "ನಿರ್ವಾಹಕ ಬಳಕೆದಾರರ ಪುಟ", + "version_check_channel": "ಚಾನಲ್ ಬಿಡುಗಡೆ", + "version_check_channel_description": "ನೀವು ಆವೃತ್ತಿ ಪ್ರಕಟಣೆಗಳನ್ನು ಪಡೆಯಲು ಬಯಸುವ ಬಿಡುಗಡೆ ಚಾನಲ್ ಅನ್ನು ಆರಿಸಿ", "version_check_enabled_description": "ಆವೃತ್ತಿ ಪರಿಶೀಲನೆಯನ್ನು ಸಕ್ರಿಯಗೊಳಿಸಿ", "version_check_implications": "ಆವೃತ್ತಿ ಪರಿಶೀಲನೆ ವೈಶಿಷ್ಟ್ಯವು {server} ನೊಂದಿಗೆ ಆವರ್ತಕ ಸಂವಹನವನ್ನು ಅವಲಂಬಿಸಿದೆ", "version_check_settings": "ಆವೃತ್ತಿ ಪರಿಶೀಲನೆ", @@ -508,7 +549,9 @@ "appears_in": "ಕಾಣಿಸಿಕೊಳ್ಳುತ್ತದೆ", "archive": "ಆರ್ಕೈವ್", "archive_or_unarchive_photo": "ಫೋಟೋವನ್ನು ಆರ್ಕೈವ್ ಮಾಡಿ ಅಥವಾ ಅನ್‌ಆರ್ಕೈವ್ ಮಾಡಿ", + "archive_size": "ಆರ್ಕೈವ್ ಗಾತ್ರ", "archive_size_description": "ಡೌನ್‌ಲೋಡ್‌ಗಳಿಗಾಗಿ ಆರ್ಕೈವ್ ಗಾತ್ರವನ್ನು ಕಾನ್ಫಿಗರ್ ಮಾಡಿ (GiB ನಲ್ಲಿ)", + "archived": "ಆರ್ಕೈವ್ ಮಾಡಲಾಗಿದೆ", "are_these_the_same_person": "ಇವರು ಒಂದೇ ವ್ಯಕ್ತಿಯೇ?", "are_you_sure_to_do_this": "ನೀವು ಇದನ್ನು ಮಾಡಲು ಖಚಿತವಾಗಿ ಬಯಸುವಿರಾ?", "asset_added_to_album": "ಆಲ್ಬಮ್‌ಗೆ ಸೇರಿಸಲಾಗಿದೆ", @@ -572,6 +615,7 @@ "backup_options": "ಬ್ಯಾಕಪ್ ಆಯ್ಕೆಗಳು", "backup_settings_subtitle": "ಅಪ್‌ಲೋಡ್ ಸೆಟ್ಟಿಂಗ್‌ಗಳನ್ನು ನಿರ್ವಹಿಸಿ", "backward": "ಹಿಂದಕ್ಕೆ", + "battery_optimization_backup_reliability": "ಬ್ಯಾಟರಿ ಆಪ್ಟಿಮೈಸೇಶನ್ ಗಳನ್ನು ನಿಷ್ಕ್ರಿಯಗೊಳಿಸುವುದರಿಂದ ಹಿನ್ನೆಲೆ ಬ್ಯಾಕಪ್ ನ ವಿಶ್ವಾಸಾರ್ಹತೆಯನ್ನು ಸುಧಾರಿಸುತ್ತದೆ", "biometric_auth_enabled": "ಬಯೋಮೆಟ್ರಿಕ್ ದೃಢೀಕರಣವನ್ನು ಸಕ್ರಿಯಗೊಳಿಸಲಾಗಿದೆ", "biometric_locked_out": "ನೀವು ಬಯೋಮೆಟ್ರಿಕ್ ದೃಢೀಕರಣದಿಂದ ಹೊರಗುಳಿದಿದ್ದೀರಿ", "biometric_no_options": "ಯಾವುದೇ ಬಯೋಮೆಟ್ರಿಕ್ ಆಯ್ಕೆಗಳು ಲಭ್ಯವಿಲ್ಲ", @@ -682,6 +726,7 @@ "create_new_person": "ಹೊಸ ವ್ಯಕ್ತಿಯನ್ನು ರಚಿಸಿ", "create_new_person_hint": "ಆಯ್ಕೆಮಾಡಿದ ಸ್ವತ್ತುಗಳನ್ನು ಹೊಸ ವ್ಯಕ್ತಿಗೆ ನಿಯೋಜಿಸಿ", "create_new_user": "ಹೊಸ ಬಳಕೆದಾರರನ್ನು ರಚಿಸಿ", + "create_person_subtitle": "ಹೊಸ ವ್ಯಕ್ತಿಯನ್ನು ರಚಿಸಲು ಮತ್ತು ಟ್ಯಾಗ್ ಮಾಡಲು ಆಯ್ದ ಮುಖಕ್ಕೆ ಹೆಸರನ್ನು ಸೇರಿಸಿ", "create_shared_album_page_share_add_assets": "ಎಡಿಡಿ ಸ್ವತ್ತುಗಳು", "create_shared_album_page_share_select_photos": "ಫೋಟೋಗಳನ್ನು ಆಯ್ಕೆಮಾಡಿ", "create_shared_link": "ಹಂಚಿದ ಲಿಂಕ್ ರಚಿಸಿ", @@ -702,7 +747,6 @@ "custom_date": "ಕಸ್ಟಮ್ ದಿನಾಂಕ", "custom_locale": "ಕಸ್ಟಮ್ ಲೊಕೇಲ್", "custom_locale_description": "ಆಯ್ದ ಭಾಷೆ ಮತ್ತು ಪ್ರದೇಶವನ್ನು ಆಧರಿಸಿದ ದಿನಾಂಕಗಳು, ಸಮಯಗಳು ಮತ್ತು ಸಂಖ್ಯೆಗಳನ್ನು ಫಾರ್ಮ್ಯಾಟ್ ಮಾಡಿ", - "custom_url": "ಕಸ್ಟಮ್ URL", "cutoff_date_description": "ಹಿಂದಿನ ಫೋಟೋಗಳನ್ನು ಇರಿಸಿ…", "dark": "ಕತ್ತಲು", "dark_theme": "ಡಾರ್ಕ್ ಥೀಮ್ ಗೆ ಬದಲಾಯಿಸಿ", @@ -714,6 +758,7 @@ "day": "ದಿನ", "days": "ದಿನಗಳು", "deduplicate_all": "ಎಲ್ಲವನ್ನೂ ಸಮರ್ಪಿಸಿ", + "default_quality_subtitle": "ಪಾಲನ್ನು ಟ್ಯಾಪ್ ಮಾಡುವಾಗ ಬಳಸುವ ಗುಣಮಟ್ಟ. ಪ್ರತಿ ಬಾರಿಯೂ ಆಯ್ಕೆ ಮಾಡಲು ಪಾಲು ಬಟನ್ ಒತ್ತಿರಿ.", "delete": "ಅಳಿಸಿ", "delete_action_confirmation_message": "ನೀವು ಈ ಸ್ವತ್ತನ್ನು ಅಳಿಸಲು ಖಚಿತವಾಗಿ ಬಯಸುವಿರಾ? ಈ ಕ್ರಿಯೆಯು ಸ್ವತ್ತನ್ನು ಸರ್ವರ್‌ನ ಅನುಪಯುಕ್ತಕ್ಕೆ ಸರಿಸುತ್ತದೆ ಮತ್ತು ನೀವು ಅದನ್ನು ಸ್ಥಳೀಯವಾಗಿ ಅಳಿಸಲು ಬಯಸಿದರೆ ಕೇಳುತ್ತದೆ", "delete_album": "ಆಲ್ಬಮ್ ಅಳಿಸಿ", @@ -747,6 +792,7 @@ "edit_date_and_time": "ದಿನಾಂಕ ಮತ್ತು ಸಮಯವನ್ನು ಸಂಪಾದಿಸಿ", "edit_date_and_time_action_prompt": "{count} ದಿನಾಂಕ ಮತ್ತು ಸಮಯವನ್ನು ಸಂಪಾದಿಸಲಾಗಿದೆ", "editor": "ಸಂಪಾದಕ", + "editor_discard_edits_prompt": "ನೀವು ಸುಸಜ್ಜಿತ ಸಂಪಾದನೆಗಳನ್ನು ಹೊಂದಿದ್ದೀರಿ. ನೀವು ಅವರನ್ನು ತ್ಯಜಿಸಲು ಬಯಸುತ್ತೀರಿ ಎಂದು ನಿಮಗೆ ಖಚಿತವಾಗಿದೆಯೇ?", "email": "ಇಮೇಲ್", "empty_folder": "ಈ ಫೋಲ್ಡರ್ ಖಾಲಿಯಾಗಿದೆ", "empty_trash_confirmation": "ನೀವು ಕಸವನ್ನು ಖಾಲಿ ಮಾಡಲು ಖಚಿತವಾಗಿ ಬಯಸುವಿರಾ? ಇದು ಇಮ್ಮಿಚ್‌ನಿಂದ ಕಸದಲ್ಲಿರುವ ಎಲ್ಲಾ ಸ್ವತ್ತುಗಳನ್ನು ಶಾಶ್ವತವಾಗಿ ತೆಗೆದುಹಾಕುತ್ತದೆ.\nನೀವು ಈ ಕ್ರಿಯೆಯನ್ನು ರದ್ದುಗೊಳಿಸಲು ಸಾಧ್ಯವಿಲ್ಲ!", @@ -964,6 +1010,11 @@ "map_marker_with_image": "ಚಿತ್ರದೊಂದಿಗೆ ನಕ್ಷೆ ಮಾರ್ಕರ್", "map_no_location_permission_content": "ನಿಮ್ಮ ಪ್ರಸ್ತುತ ಸ್ಥಳದಿಂದ ಸ್ವತ್ತುಗಳನ್ನು ಪ್ರದರ್ಶಿಸಲು ಸ್ಥಳ ಅನುಮತಿ ಅಗತ್ಯವಿದೆ. ನೀವು ಈಗ ಅದನ್ನು ಅನುಮತಿಸಲು ಬಯಸುವಿರಾ?", "matches": "ಪಂದ್ಯಗಳು", + "media_chrome": { + "media_error_description": "ಮಾಧ್ಯಮ ದೋಷವು ಪ್ಲೇಬ್ಯಾಕ್ ಅನ್ನು ಸ್ಥಗಿತಗೊಳಿಸಲು ಕಾರಣವಾಯಿತು. ಮಾಧ್ಯಮಗಳು ಭ್ರಷ್ಟವಾಗಬಹುದು ಅಥವಾ ನಿಮ್ಮ ಬ್ರೌಸರ್ ಈ ಸ್ವರೂಪವನ್ನು ಬೆಂಬಲಿಸುವುದಿಲ್ಲ.", + "network_error_description": "ನೆಟ್ ವರ್ಕ್ ದೋಷವು ಮಾಧ್ಯಮ ಡೌನ್ ಲೋಡ್ ವಿಫಲಗೊಳ್ಳಲು ಕಾರಣವಾಯಿತು.", + "unsupported_error_description": "ಬೆಂಬಲಿಸದ ದೋಷ ಸಂಭವಿಸಿದೆ. ಸರ್ವರ್ ಅಥವಾ ನೆಟ್ ವರ್ಕ್ ವಿಫಲವಾಗಿದೆ, ಅಥವಾ ನಿಮ್ಮ ಬ್ರೌಸರ್ ಈ ಸ್ವರೂಪವನ್ನು ಬೆಂಬಲಿಸುವುದಿಲ್ಲ." + }, "memories": "ನೆನಪುಗಳು", "memories_check_back_tomorrow": "ಹೆಚ್ಚಿನ ನೆನಪುಗಳಿಗಾಗಿ ನಾಳೆ ಮತ್ತೆ ಪರಿಶೀಲಿಸಿ", "memories_setting_description": "ನಿಮ್ಮ ನೆನಪುಗಳಲ್ಲಿ ನೀವು ನೋಡುವುದನ್ನು ನಿರ್ವಹಿಸಿ", @@ -973,6 +1024,7 @@ "merge": "ವಿಲೀನ", "merge_people_limit": "ನೀವು ಒಮ್ಮೆಗೆ 5 ಮುಖಗಳನ್ನು ಮಾತ್ರ ವಿಲೀನಗೊಳಿಸಬಹುದು", "merge_people_prompt": "ನೀವು ಈ ಜನರನ್ನು ವಿಲೀನಗೊಳಿಸಲು ಬಯಸುವಿರಾ? ಈ ಕ್ರಿಯೆಯನ್ನು ಬದಲಾಯಿಸಲಾಗುವುದಿಲ್ಲ.", + "minFaces_description": "ವ್ಯಕ್ತಿಯನ್ನು ಪ್ರದರ್ಶಿಸಲು ಕನಿಷ್ಠ ಸಂಖ್ಯೆಯ ಮಾನ್ಯತೆ ಪಡೆದ ಮುಖಗಳು", "minimize": "ಕನಿಷ್ಠೀಕರಿಸಿ", "minute": "ನಿಮಿಷ", "missing": "ಕಾಣೆಯಾಗಿದೆ", @@ -1010,10 +1062,12 @@ "no_shared_albums_message": "ನಿಮ್ಮ ನೆಟ್‌ವರ್ಕ್‌ನಲ್ಲಿರುವ ಜನರೊಂದಿಗೆ ಫೋಟೋಗಳು ಮತ್ತು ವೀಡಿಯೊಗಳನ್ನು ಹಂಚಿಕೊಳ್ಳಲು ಆಲ್ಬಮ್ ರಚಿಸಿ", "not_in_any_album": "ಯಾವುದೇ ಆಲ್ಬಮ್‌ನಲ್ಲಿಲ್ಲ", "notes": "ಟಿಪ್ಪಣಿಗಳು", + "notification_enabled_list_tile_content": "ಇಮ್ಮಿಚ್ ಹಿನ್ನೆಲೆ ಬ್ಯಾಕಪ್ ಗಾಗಿ ಅಧಿಸೂಚನೆಗಳನ್ನು ಬಳಸುತ್ತದೆ. ನಿಮ್ಮ ಸಾಧನ ಸೆಟ್ಟಿಂಗ್ ಗಳಲ್ಲಿ ಅವುಗಳನ್ನು ನಿರ್ವಹಿಸಿ.", "notification_permission_dialog_content": "ಅಧಿಸೂಚನೆಗಳನ್ನು ಸಕ್ರಿಯಗೊಳಿಸಲು, ಸೆಟ್ಟಿಂಗ್‌ಗಳಿಗೆ ಹೋಗಿ ಮತ್ತು ಅನುಮತಿಸು ಆಯ್ಕೆಮಾಡಿ.", "notification_permission_list_tile_content": "ಅಧಿಸೂಚನೆಗಳನ್ನು ಸಕ್ರಿಯಗೊಳಿಸಲು ಅನುಮತಿ ನೀಡಿ.", "notifications": "ಅಧಿಸೂಚನೆಗಳು", "obtainium_configurator_instructions": "ಇಮ್ಮಿಚ್ ಗಿಟ್‌ಹಬ್‌ನ ಬಿಡುಗಡೆಯಿಂದ ನೇರವಾಗಿ ಆಂಡ್ರಾಯ್ಡ್ ಅಪ್ಲಿಕೇಶನ್ ಅನ್ನು ಸ್ಥಾಪಿಸಲು ಮತ್ತು ನವೀಕರಿಸಲು ಅಟೇಟಿನಿಯಮ್ ಬಳಸಿ. API ಕೀಲಿಯನ್ನು ರಚಿಸಿ ಮತ್ತು ನಿಮ್ಮ ಅಟೇಟಿನಿಯಮ್ ಕಾನ್ಫಿಗರೇಶನ್ ಲಿಂಕ್ ಅನ್ನು ರಚಿಸಲು ರೂಪಾಂತರವನ್ನು ಆಯ್ಕೆಮಾಡಿ", + "ocr_body": "ಇಮ್ಮಿಚ್ ಈಗ ನಿಮ್ಮ ಫೋಟೋಗಳೊಳಗಿನ ಪಠ್ಯವನ್ನು ಓದುತ್ತದೆ, ಆದ್ದರಿಂದ ಅವರು ಹೇಳುವ ಮೂಲಕ ನೀವು ಅವುಗಳನ್ನು ಹುಡುಕಬಹುದು.", "offline": "ಆಫ್ ಲೈನ್", "ok": "ಸರಿ", "onboarding": "ಆನ್ ಬೋರ್ಡಿಂಗ್", @@ -1022,6 +1076,7 @@ "onboarding_server_welcome_description": "ನಿಮ್ಮ ನಿದರ್ಶನವನ್ನು ಕೆಲವು ಸಾಮಾನ್ಯ ಸೆಟ್ಟಿಂಗ್‌ಗಳೊಂದಿಗೆ ಹೊಂದಿಸೋಣ.", "onboarding_theme_description": "ನಿಮ್ಮ ನಿದರ್ಶನಕ್ಕೆ ಬಣ್ಣದ ಥೀಮ್ ಆಯ್ಕೆಮಾಡಿ. ನೀವು ಇದನ್ನು ನಂತರ ನಿಮ್ಮ ಸೆಟ್ಟಿಂಗ್‌ಗಳಲ್ಲಿ ಬದಲಾಯಿಸಬಹುದು.", "online": "ಆನ್ ಲೈನ್", + "open_in_immich_body": "ಸೆಟ್ ಇಮ್ಮಿಚ್ ಇತರ ಅಪ್ಲಿಕೇಶನ್ ಗಳಿಂದ ನೇರವಾಗಿ ಫೋಟೋಗಳನ್ನು ತೆರೆಯಲು ಆಂಡ್ರಾಯ್ಡ್ ನಲ್ಲಿ ನಿಮ್ಮ ಗ್ಯಾಲರಿಯಂತೆ.", "open_in_map_view": "ನಕ್ಷೆ ವೀಕ್ಷಣೆಯಲ್ಲಿ ತೆರೆಯಿರಿ", "open_the_search_filters": "ಹುಡುಕಾಟ ಫಿಲ್ಟರ್‌ಗಳನ್ನು ತೆರೆಯಿರಿ", "options": "ಆಯ್ಕೆಗಳು", @@ -1059,6 +1114,7 @@ "play": "ಪ್ಲೇ ಮಾಡಿ", "play_or_pause_video": "ವೀಡಿಯೊ ಪ್ಲೇ ಮಾಡಿ ಅಥವಾ ವಿರಾಮಗೊಳಿಸಿ", "play_original_video_setting_description": "ಟ್ರಾನ್ಸ್‌ಕೋಡ್ ಮಾಡಿದ ವೀಡಿಯೊಗಳಿಗಿಂತ ಮೂಲ ವೀಡಿಯೊಗಳ ಪ್ಲೇಬ್ಯಾಕ್‌ಗೆ ಆದ್ಯತೆ ನೀಡಿ. ಮೂಲ ಸ್ವತ್ತು ಹೊಂದಾಣಿಕೆಯಾಗದಿದ್ದರೆ ಅದು ಸರಿಯಾಗಿ ಪ್ಲೇಬ್ಯಾಕ್ ಆಗದಿರಬಹುದು.", + "plugin_method_filter_type_description": "ಈ ವಿಧಾನವು ಘಟನೆಗಳನ್ನು ಫಿಲ್ಟರ್ ಮಾಡಬಹುದು ಮತ್ತು ನಂತರದ ಹಂತಗಳನ್ನು ಓಡಿಸುವುದನ್ನು ಷರತ್ತುಬದ್ಧವಾಗಿ ತಡೆಯಬಹುದು", "port": "ಪೋರ್ಟ್", "preferences_settings_subtitle": "ಅಪ್ಲಿಕೇಶನ್‌ನ ಆದ್ಯತೆಗಳನ್ನು ನಿರ್ವಹಿಸಿ", "preset": "ಮೊದಲೇ", @@ -1089,6 +1145,8 @@ "reassign": "ಮರುಹಂಚುವಿಕೆ", "reassigned_assets_to_existing_person": "{count, plural, one {# ಆಸ್ತಿ} other {# ಆಸ್ತಿಗಳು}} ಅನ್ನು {name, select, null {ಒಂದು ಅಸ್ತಿತ್ವದಲ್ಲಿರುವ ವ್ಯಕ್ತಿ} other {{name}}} ಗೆ ಮರು ನಿಯೋಜಿಸಲಾಗಿದೆ", "reassing_hint": "ಆಯ್ದ ಸ್ವತ್ತುಗಳನ್ನು ಅಸ್ತಿತ್ವದಲ್ಲಿರುವ ವ್ಯಕ್ತಿಗೆ ನಿಯೋಜಿಸಿ", + "recently_added_body": "ಮೀಸಲಾದ ಪುಟದಲ್ಲಿ ನೀವು ಇತ್ತೀಚೆಗೆ ಸೇರಿಸಿದ ಎಲ್ಲದಕ್ಕೂ ನೇರವಾಗಿ ಹೋಗು.", + "recently_added_description": "ನಿಮ್ಮ ಸ್ವತ್ತುಗಳನ್ನು ಅಪ್ ಲೋಡ್ ಮಾಡಿದಾಗ ಅವುಗಳನ್ನು ವಿಂಗಡಿಸಿದಾಗ ಅವುಗಳನ್ನು ಬ್ರೌಸ್ ಮಾಡಿ ಇಮ್ಮಿಚ್", "refresh": "ರಿಫ್ರೆಶ್", "refreshed": "ರಿಫ್ರೆಶ್ ಮಾಡಲಾಗಿದೆ", "remove": "ತೆಗೆದುಹಾಕಿ", @@ -1114,9 +1172,11 @@ "resume": "ಪುನರಾರಂಭ", "role": "ಪಾತ್ರ", "scaffold_body_error_unrecoverable": "ಸರಿಪಡಿಸಲಾಗದ ದೋಷ ಸಂಭವಿಸಿದೆ. ದಯವಿಟ್ಟು ದೋಷವನ್ನು ಹಂಚಿಕೊಳ್ಳಿ ಮತ್ತು ಡಿಸ್ಕಾರ್ಡ್ ಅಥವಾ ಗಿಟ್‌ಹಬ್‌ನಲ್ಲಿ ಟ್ರೇಸ್ ಅನ್ನು ಸ್ಟ್ಯಾಕ್ ಮಾಡಿ ಇದರಿಂದ ನಾವು ಸಹಾಯ ಮಾಡಬಹುದು. ಸಲಹೆ ನೀಡಿದರೆ, ನೀವು ಕೆಳಗಿನ ಅಪ್ಲಿಕೇಶನ್ ಡೇಟಾವನ್ನು ತೆರವುಗೊಳಿಸಬಹುದು.", + "screencast_mode_description": "ಪರದೆಯ ಮೇಲೆ ಕೀಬೋರ್ಡ್ ಮತ್ತು ಮೌಸ್ ಈವೆಂಟ್ ಸೂಚಕಗಳನ್ನು ತೋರಿಸಿ", "search_by_description_example": "ಸಾಪಾದಲ್ಲಿ ಪಾದಯಾತ್ರೆಯ ದಿನ", "search_by_filename": "ಫೈಲ್ ಹೆಸರು ಅಥವಾ ವಿಸ್ತರಣೆಯ ಮೂಲಕ ಹುಡುಕಿ", "search_by_filename_example": "ಅಂದರೆ IMG_1234.JPG ಅಥವಾ PNG", + "search_by_full_path": "ಪೂರ್ಣ ಮಾರ್ಗ ಅಥವಾ ಫೋಲ್ಡರ್ ಮೂಲಕ ಹುಡುಕಿ", "search_filter_date_title": "ದಿನಾಂಕ ಶ್ರೇಣಿಯನ್ನು ಆಯ್ಕೆಮಾಡಿ", "search_filter_filename": "ಫೈಲ್ ಹೆಸರಿನ ಮೂಲಕ ಹುಡುಕಿ", "search_for_existing_person": "ಅಸ್ತಿತ್ವದಲ್ಲಿರುವ ವ್ಯಕ್ತಿಯನ್ನು ಹುಡುಕಿ", @@ -1138,11 +1198,13 @@ "setting_notifications_subtitle": "ನಿಮ್ಮ ಅಧಿಸೂಚನೆ ಆದ್ಯತೆಗಳನ್ನು ಹೊಂದಿಸಿ", "setting_video_viewer_auto_play_subtitle": "ವೀಡಿಯೊಗಳು ತೆರೆದಾಗ ಸ್ವಯಂಚಾಲಿತವಾಗಿ ಪ್ಲೇ ಆಗಲು ಪ್ರಾರಂಭಿಸಿ", "setting_video_viewer_original_video_subtitle": "ಸರ್ವರ್‌ನಿಂದ ವೀಡಿಯೊವನ್ನು ಸ್ಟ್ರೀಮ್ ಮಾಡುವಾಗ, ಟ್ರಾನ್ಸ್‌ಕೋಡ್ ಲಭ್ಯವಿದ್ದರೂ ಸಹ ಮೂಲವನ್ನು ಪ್ಲೇ ಮಾಡಿ. ಬಫರಿಂಗ್‌ಗೆ ಕಾರಣವಾಗಬಹುದು. ಈ ಸೆಟ್ಟಿಂಗ್ ಅನ್ನು ಲೆಕ್ಕಿಸದೆ ಸ್ಥಳೀಯವಾಗಿ ಲಭ್ಯವಿರುವ ವೀಡಿಯೊಗಳನ್ನು ಮೂಲ ಗುಣಮಟ್ಟದಲ್ಲಿ ಪ್ಲೇ ಮಾಡಲಾಗುತ್ತದೆ.", + "share_quality_body": "ನೀವು ಹಂಚಿಕೊಳ್ಳುವ ಮೊದಲು ಚಿತ್ರದ ಗುಣಮಟ್ಟವನ್ನು ಆಯ್ಕೆ ಮಾಡಲು ಷೇರು ಗುಂಡಿಯನ್ನು ಒತ್ತಿ ಮತ್ತು ಹಿಡಿದುಕೊಳ್ಳಿ.", "shared_album_activity_remove_content": "ನೀವು ಈ ಚಟುವಟಿಕೆಯನ್ನು ಅಳಿಸಲು ಬಯಸುವಿರಾ?", "shared_album_section_people_action_error": "ಆಲ್ಬಮ್ ತೊರೆಯುವಾಗ/ತೆಗೆದುಹಾಕುವಾಗ ದೋಷ ಕಂಡುಬಂದಿದೆ", "shared_intent_upload_button_progress_text": "{current} / {total} ಅಪ್‌ಲೋಡ್ ಮಾಡಲಾಗಿದೆ", "shared_link_create_error": "ಹಂಚಿಕೊಂಡ ಲಿಂಕ್ ರಚಿಸುವಾಗ ದೋಷ ಕಂಡುಬಂದಿದೆ", "shared_link_custom_url_description": "ಕಸ್ಟಮ್ URL ನೊಂದಿಗೆ ಈ ಹಂಚಿಕೊಂಡ ಲಿಂಕ್ ಅನ್ನು ಪ್ರವೇಶಿಸಿ", + "shared_link_custom_url_warning": "ಎಚ್ಚರಿಕೆ: ಫಾರ್ವರ್ಡ್ ಸ್ಲ್ಯಾಷ್ ಹೊಂದಿರುವ ಕಸ್ಟಮ್ URL ಹೆಸರು ನೀವು ನಿರೀಕ್ಷಿಸಿದಂತೆ ವರ್ತಿಸುವುದಿಲ್ಲ.", "shared_link_edit_description_hint": "ಹಂಚಿಕೆ ವಿವರಣೆಯನ್ನು ನಮೂದಿಸಿ", "shared_link_edit_password_hint": "ಹಂಚಿಕೆ ಪಾಸ್‌ವರ್ಡ್ ನಮೂದಿಸಿ", "shared_link_error_server_url_fetch": "ಸರ್ವರ್ url ಅನ್ನು ಪಡೆಯಲು ಸಾಧ್ಯವಾಗುತ್ತಿಲ್ಲ", @@ -1163,7 +1225,9 @@ "show_or_hide_info": "ಮಾಹಿತಿಯನ್ನು ತೋರಿಸಿ ಅಥವಾ ಮರೆಮಾಡಿ", "show_supporter_badge_description": "ಬೆಂಬಲಿಗರ ಬ್ಯಾಡ್ಜ್ ತೋರಿಸಿ", "sidebar_display_description": "ಸೈಡ್‌ಬಾರ್‌ನಲ್ಲಿ ವೀಕ್ಷಣೆಗೆ ಲಿಂಕ್ ಅನ್ನು ಪ್ರದರ್ಶಿಸಿ", + "slideshow_body": "ಕುಳಿತುಕೊಳ್ಳಿ ಮತ್ತು ನಿಮ್ಮ ಫೋಟೋಗಳು ಪೂರ್ಣ-ಪರದೆಯ ಸ್ಲೈಡ್ ಶೋನಲ್ಲಿ ಆಡುವುದನ್ನು ನೋಡಿ.", "slideshow_repeat_description": "ಸ್ಲೈಡ್‌ಶೋ ಕೊನೆಗೊಂಡಾಗ ಆರಂಭಕ್ಕೆ ಹಿಂತಿರುಗಿ", + "some_assets_already_have_a_location_warning": "ಆಯ್ದ ಕೆಲವು ಸ್ವತ್ತುಗಳು ಈಗಾಗಲೇ ಸ್ಥಳವನ್ನು ಹೊಂದಿವೆ", "sort_created": "ದಿನಾಂಕ ರಚಿಸಲಾಗಿದೆ", "sort_items": "ವಸ್ತುಗಳ ಸಂಖ್ಯೆ", "sort_modified": "ದಿನಾಂಕ ಮಾರ್ಪಡಿಸಲಾಗಿದೆ", @@ -1180,6 +1244,7 @@ "start_date_before_end_date": "ಆರಂಭದ ದಿನಾಂಕವು ಅಂತಿಮ ದಿನಾಂಕಕ್ಕಿಂತ ಮೊದಲು ಇರಬೇಕು", "state": "ರಾಜ್ಯ", "status": "ಸ್ಥಿತಿ", + "step_delete_confirm": "ಈ ಹಂತವನ್ನು ಅಳಿಸಲು ನೀವು ಖಚಿತವಾಗಿ ಬಯಸುವಿರಾ?", "stop_casting": "ಬಿತ್ತರಿಸುವಿಕೆಯನ್ನು ನಿಲ್ಲಿಸಿ", "stop_motion_photo": "ಚಲನೆಯ ಫೋಟೋವನ್ನು ನಿಲ್ಲಿಸಿ", "stop_photo_sharing": "ನಿಮ್ಮ ಫೋಟೋಗಳನ್ನು ಹಂಚಿಕೊಳ್ಳುವುದನ್ನು ನಿಲ್ಲಿಸುವುದೇ?", @@ -1250,6 +1315,7 @@ "trash_page_delete_all": "ಎಲ್ಲವನ್ನೂ ಅಳಿಸಿ", "trash_page_info": "ಅನುಪಯುಕ್ತಕ್ಕೆ ಸೇರಿಸಿದ ಐಟಂಗಳನ್ನು {days} ದಿನಗಳ ನಂತರ ಶಾಶ್ವತವಾಗಿ ಅಳಿಸಲಾಗುತ್ತದೆ", "trigger": "ಟ್ರಿಗ್ಗರ್", + "trigger_asset_metadata_extraction_description": "ಯಾವಾಗ ಎಂದು ಪ್ರಚೋದಿಸಲಾಯಿತು ಎಕ್ಸಿಫ್ ಆಸ್ತಿಯ ಮೆಟಾಡೇಟಾವನ್ನು ಹೊರತೆಗೆಯಲಾಗುತ್ತದೆ", "trigger_asset_uploaded": "ಆಸ್ತಿ ಅಪ್ ಲೋಡ್ ಮಾಡಲಾಗಿದೆ", "trigger_asset_uploaded_description": "ಹೊಸ ಸ್ವತ್ತನ್ನು ಅಪ್‌ಲೋಡ್ ಮಾಡಿದಾಗ ಟ್ರಿಗರ್ ಮಾಡಲಾಗುತ್ತದೆ", "trigger_person_recognized": "ವ್ಯಕ್ತಿ ಗುರುತಿಸಲಾಗಿದೆ", @@ -1292,6 +1358,7 @@ "upload_status_errors": "ದೋಷಗಳು", "upload_status_uploaded": "ಅಪ್ ಲೋಡ್ ಮಾಡಲಾಗಿದೆ", "upload_success": "ಅಪ್‌ಲೋಡ್ ಯಶಸ್ವಿಯಾಗಿದೆ, ಹೊಸ ಅಪ್‌ಲೋಡ್ ಸ್ವತ್ತುಗಳನ್ನು ನೋಡಲು ಪುಟವನ್ನು ರಿಫ್ರೆಶ್ ಮಾಡಿ.", + "upload_to_album_body": "ಹಸ್ತಚಾಲಿತ ಅಪ್ ಲೋಡ್ ವೈಶಿಷ್ಟ್ಯವನ್ನು ಬಳಸದ ಬಳಕೆದಾರರಿಗೆ, ನೀವು ಅವುಗಳನ್ನು ಅಪ್ ಲೋಡ್ ಮಾಡುವಾಗ ಸ್ಥಳೀಯ ಫೋಟೋಗಳನ್ನು ನೇರವಾಗಿ ಆಲ್ಬಮ್ ಗೆ ಸೇರಿಸಲು ನೀವು ಈಗ ಆಯ್ಕೆ ಮಾಡಬಹುದು, ಅಪ್ ಲೋಡ್ ಮಾಡುವ ಅಗತ್ಯವಿಲ್ಲ ಮತ್ತು ನಂತರ ಆಲ್ಬಮ್ ಗೆ ಸೇರಿಸಿ.", "upload_to_immich": "ಇಮ್ಮಿಚ್ ({count}) ಗೆ ಅಪ್‌ಲೋಡ್ ಮಾಡಿ", "uploading": "ಅಪ್ ಲೋಡ್ ಆಗುತ್ತಿದೆ", "uploading_media": "ಮಾಧ್ಯಮವನ್ನು ಅಪ್ ಲೋಡ್ ಮಾಡಲಾಗುತ್ತಿದೆ", diff --git a/i18n/ko.json b/i18n/ko.json index 253a0f639e..5042134948 100644 --- a/i18n/ko.json +++ b/i18n/ko.json @@ -108,6 +108,17 @@ "image_thumbnail_quality_description": "섬네일 품질을 1~100 범위에서 설정합니다. 값이 클수록 좋지만 파일 크기가 커지고 앱 반응 속도가 느려질 수 있습니다.", "image_thumbnail_title": "섬네일 설정", "import_config_from_json_description": "JSON 파일을 업로드하여 시스템 구성을 가져옵니다.", + "integrity_checks_checksum_files": "체크섬 파일", + "integrity_checks_checksum_files_description": "체크섬 검사 설정", + "integrity_checks_checksum_files_enable_description": "체크섬 확인 활성화", + "integrity_checks_checksum_files_percentage_limit": "퍼센트 한도", + "integrity_checks_checksum_files_percentage_limit_description": "체크섬 검사가 각 간격마다 얼마나 자주 수행될지를 결정하는 최대 비율을 0.01에서 1 사이로 설정하세요.", + "integrity_checks_checksum_files_time_limit": "시간 제한", + "integrity_checks_checksum_files_time_limit_description": "각 간격마다 체크섬 검사가 수행되는 최대 시간을 설정하세요. (밀리초)", + "integrity_checks_missing_files": "누락된 파일", + "integrity_checks_missing_files_description": "주기를 설정하고, 누락된 파일을 확인하는 기능을 켜거나 끄세요", + "integrity_checks_missing_files_enable_description": "누락된 파일 확인 활성화", + "integrity_checks_settings": "무결성 검사", "job_concurrency": "{job} 동시성", "job_created": "작업이 생성되었습니다.", "job_not_concurrency_safe": "이 작업은 동시 실행에 안전하지 않습니다.", @@ -794,7 +805,6 @@ "custom_date": "날짜 선택", "custom_locale": "사용자 지정 로케일", "custom_locale_description": "언어 및 지역 선택에 따른 날짜, 시간 및 숫자 형식 지정", - "custom_url": "사용자 지정 URL", "cutoff_date_description": "선택한 기간의 사진을 유지합니다…", "cutoff_day": "{count, plural, one {일} other {일}}", "cutoff_year": "{count, plural, one {년} other {년}}", @@ -1303,9 +1313,9 @@ "login_form_failed_login": "로그인 중 오류가 발생했습니다. 서버 URL, 이메일 및 비밀번호를 확인하세요.", "login_form_handshake_exception": "서버와 통신 중 인증서 예외가 발생했습니다. 자체 서명된 인증서를 사용 중이라면, 설정에서 자체 서명된 인증서 허용을 활성화하세요.", "login_form_password_hint": "비밀번호", - "login_form_server_empty": "서버 URL을 입력하세요.", - "login_form_server_error": "서버에 연결할 수 없습니다.", - "login_has_been_disabled": "로그인이 비활성화되었습니다.", + "login_form_server_empty": "서버 URL 입력", + "login_form_server_error": "서버에 연결할 수 없음", + "login_has_been_disabled": "로그인이 비활성화됨", "login_password_changed_error": "비밀번호 변경 중 오류가 발생했습니다.", "login_password_changed_success": "비밀번호가 변경되었습니다.", "logout_all_device_confirmation": "모든 기기에서 로그아웃하시겠습니까?", diff --git a/i18n/lt.json b/i18n/lt.json index 24a59b322d..b41d751c7b 100644 --- a/i18n/lt.json +++ b/i18n/lt.json @@ -108,6 +108,21 @@ "image_thumbnail_quality_description": "Miniatiūros kokybė nuo 1-100. Aukštesnės reikšmės yra geriau, bet pagaminami didesni failai ir gali būti sulėtintas programos reagavimo greitis.", "image_thumbnail_title": "Miniatiūros nustatymai", "import_config_from_json_description": "Importuokite sistemos konfigūraciją, įkeliant JSON konfigūracijos failą", + "integrity_checks_checksum_files": "Kontrolinės sumos failai", + "integrity_checks_checksum_files_description": "Konfigūruoti kontrolinės sumos patikrą", + "integrity_checks_checksum_files_enable_description": "Įjungti kontrolinės sumos patikrą", + "integrity_checks_checksum_files_percentage_limit": "Procentinis limitas", + "integrity_checks_checksum_files_percentage_limit_description": "Nustatykite maksimalią procentinę dalį (nuo 0,01 iki 1), nurodančią, kiek kontrolinės sumos tikrinimas turėtų vykti kiekvieno intervalo metu.", + "integrity_checks_checksum_files_time_limit": "Laiko limitas", + "integrity_checks_checksum_files_time_limit_description": "Konfigūruoti maksimalią trukmę, per kurią kontrolinės sumos patikra turėtų būti atlikta kiekvieną intervalą. (ms)", + "integrity_checks_missing_files": "Trūkstami failai", + "integrity_checks_missing_files_description": "Konfigūruoti dažnumą ir įjungti arba išjungti trūkstamų failų patikrą", + "integrity_checks_missing_files_enable_description": "Įjungti trūkstamų failų patikrą", + "integrity_checks_settings": "Vientisumo patikra", + "integrity_checks_settings_description": "Tvarkyti vientisumo patikrų intervalus", + "integrity_checks_untracked_files": "Nesekami failai", + "integrity_checks_untracked_files_description": "Konfigūruoti dažnumą ir įjungti arba išjungti nesekamų failų patikrą", + "integrity_checks_untracked_files_enable_description": "Įjungti nesekamų failų patikrą", "job_concurrency": "{job} lygiagretumas", "job_created": "Užduotis sukurta", "job_not_concurrency_safe": "Ši užduotis nėra saugi apdoroti lygiagrečiai.", @@ -416,6 +431,10 @@ "transcoding_realtime_description": "Leidžia transkoduoti realiuoju laiku, kai vaizdo įrašas transliuojamas. Įgalina kokybės perjungimą, tačiau, priklausomai nuo serverio galimybių, atkūrimas gali strigti ar būti uždelstas.", "transcoding_realtime_enabled": "Įgalinti transkodavimą realiuoju laiku", "transcoding_realtime_enabled_description": "Jei išjungta, serveris atsisakys pradėti naujas transkodavimo sesijas realiuoju laiku.", + "transcoding_realtime_resolutions": "Rezoliucijos", + "transcoding_realtime_resolutions_description": "Raiškos, siūlomos transliavimui realiuoju laiku (transkodavimui). Pasirinkus didesnę raišką, gali kilti atkūrimo problemų, jei serveris nespės vaizdo įrašo transkoduoti pakankamai greitai.", + "transcoding_realtime_video_codecs": "Vaizdo įrašų kodekai", + "transcoding_realtime_video_codecs_description": "Vaizdo kodekai, siūlomi transkodavimui realiuoju laiku. Atkūrimo metu klientai (įrenginiai) pasirinks geriausią jų palaikomą variantą. AV1 yra efektyvesnis už HEVC, o šis – efektyvesnis už H.264. Naudodami aparatinį spartinimą, pasirinkite tik tuos kodekus, kuriuos spartintuvas sugeba koduoti. Naudodami programinį transkodavimą, atkreipkite dėmesį, kad H.264 yra spartesnis už AV1, o šis – spartesnis už HEVC.", "transcoding_reference_frames": "Nuorodiniai kadrai", "transcoding_reference_frames_description": "Kadrų, į kuriuos reikia remtis suspaudžiant duotą kadrą, skaičius. Aukštesnė reikšmė pagerina suspaudimo efektyvumą, bet sulėtina užkodavimą. 0 - nustato reikšmę automatiškai.", "transcoding_required_description": "Tik nepalaikomo formato vaizdo įrašai", @@ -578,6 +597,7 @@ "asset_viewer_settings_title": "Elementų peržiūra", "assets": "Elementai", "assets_added_to_album_count": "Į albumą {count, plural, one {įtrauktas # elementas} few {įtraukti # elementai} other {įtraukta # elementų}}", + "assets_added_to_album_partial_count": "Į albumą pridėta {successCount} iš {totalCount} {totalCount, plural, one {elemento} few {elementų} other {elementų}}", "assets_added_to_albums_count": "Pridėta {assetTotal, plural, one {# elementas} few {# elementai} other {# elementų}} į {albumTotal, plural, one {# albumą} few {# albumus} other {# albumų}}", "assets_cannot_be_added_to_album_count": "{count, plural, one {Elementas negali būti pridėtas} few {Elementai negali būti pridėti} other {Elementų negali būti pridėta}} į albumą", "assets_cannot_be_added_to_albums": "{count, plural, one {Elementas negali būti pridėtas} few {Elementai negali būti pridėti} other {Elementų negali būti pridėta}} į nei vieną albumą", @@ -794,7 +814,6 @@ "custom_date": "Pasirinktinė data", "custom_locale": "Pasirinktinė vietovė", "custom_locale_description": "Formatuoti datas, laiką ir skaičius pagal pasirinktą kalbą ir regioną", - "custom_url": "Pasirinktinis URL", "cutoff_date_description": "Išsaugoti nuotraukas iš paskutinės…", "cutoff_day": "{count, plural, one {diena} other {dienos}}", "cutoff_year": "{count, plural, one {metai} other {metai}}", @@ -1303,9 +1322,9 @@ "login_form_failed_login": "Klaida prisijungiant, patikrinkite serverio URL, el. paštą ir slaptažodį", "login_form_handshake_exception": "Įvyko serverio patvirtinimo išimtis. Jei naudojate savarankiškai pasirašytą sertifikatą, nustatymuose įjunkite savarankiškai pasirašyto sertifikato palaikymą.", "login_form_password_hint": "slaptažodis", - "login_form_server_empty": "Įveskite serverio URL.", - "login_form_server_error": "Nepavyko prisijungti prie serverio.", - "login_has_been_disabled": "Prisijungimas išjungtas.", + "login_form_server_empty": "Įveskite serverio URL", + "login_form_server_error": "Nepavyko prisijungti prie serverio", + "login_has_been_disabled": "Prisijungimas išjungtas", "login_password_changed_error": "Įvyko klaida atnaujinant jūsų slaptažodį", "login_password_changed_success": "Slaptažodis sėkmingai atnaujintas", "logout_all_device_confirmation": "Ar tikrai norite atsijungti iš visų įrenginių?", @@ -1461,6 +1480,7 @@ "never": "Niekada", "new_album": "Naujas albumas", "new_api_key": "Naujas API raktas", + "new_feature": "Nauja Funkcija", "new_password": "Naujas slaptažodis", "new_person": "Naujas asmuo", "new_pin_code": "Naujas PIN kodas", @@ -1504,9 +1524,13 @@ "not_available": "Nepasiekiamas", "not_in_any_album": "Nė viename albume", "not_selected": "Nepasirinkta", + "not_set": "Nenustatyta", "notes": "Pastabos", "nothing_here_yet": "Kol kas tuščia", "notification_backup_reliability": "Įjunkite pranešimus, kad pagerintumėte foninių atsarginių kopijų patikimumą", + "notification_enabled_list_tile_content": "Immich naudoja pranešimus atsarginiam kopijavimui fone. Juos galite valdyti savo įrenginio nustatymuose.", + "notification_enabled_list_tile_open_button": "Atidaryti nustatymus", + "notification_enabled_list_tile_title": "Pranešimai įjungti", "notification_permission_dialog_content": "Pranešimų įgalinimui eikite į Nustatymus ir pasirinkite Leisti.", "notification_permission_list_tile_content": "Suteikti leidimą pranešimų įgalinimui.", "notification_permission_list_tile_enable_button": "Įjungti pranešimus", @@ -1518,6 +1542,8 @@ "obtainium_configurator": "Obtainium Konfigūratorius", "obtainium_configurator_instructions": "Naudokite Obtainium, jei norite įdiegti ir atnaujinti Android programėlę tiesiai iš Immich GitHub. Sukurkite API raktą ir pasirinkite variantą, Obtainium konfigūracijos nuorodos sukūrimui", "ocr": "OCR", + "ocr_body": "Immich dabar atpažįsta tekstą jūsų nuotraukose, todėl galite jų ieškoti pagal tai, kas jose parašyta.", + "ocr_title": "Ieškokite teksto savo nuotraukose", "official_immich_resources": "Oficialūs Immich ištekliai", "offline": "Neprisijungęs", "offset": "Ofsetas", @@ -1536,6 +1562,8 @@ "open": "Atverti", "open_calendar": "Atidaryti kalendorių", "open_in_browser": "Atverti naršyklėje", + "open_in_immich_body": "Nustatykite Immich kaip numatytąją galeriją „Android“ įrenginyje, kad nuotraukas galėtumėte atidaryti tiesiai iš kitų programėlių.", + "open_in_immich_title": "Atidaryti nuotraukas per Immich", "open_in_map_view": "Atverti žemėlapyje", "open_in_openstreetmap": "Atverti per OpenStreetMap", "open_the_search_filters": "Atidaryti paieškos filtrus", @@ -1694,7 +1722,10 @@ "recent": "Naujausi", "recent_searches": "Naujausios paieškos", "recently_added": "Neseniai pridėta", + "recently_added_body": "Pasiekite visus naujausius įkėlimus viename tam skirtame puslapyje.", + "recently_added_description": "Peržiūrėkite failus, surūšiuotus pagal įkėlimo į Immich datą", "recently_added_page_title": "Neseniai pridėta", + "recently_added_title": "Neseniai pridėta", "recently_taken": "Neseniai sukurti", "refresh": "Atnaujinti", "refresh_encoded_videos": "Perkrauti apdorotus vaizdo įrašus", @@ -1901,6 +1932,8 @@ "share_link": "Bendrinti nuorodą", "share_original": "Naudoti originalą (didelį)", "share_preview": "Naudoti miniatiūrą (mažą)", + "share_quality_body": "Palaikykite nuspaudę bendrinimo mygtuką, kad pasirinktumėte vaizdo kokybę prieš siųsdami.", + "share_quality_title": "Pasirinkite bendrinimo kokybę", "shared": "Bendrinami", "shared_album_activities_input_disable": "Komentarai išjungti", "shared_album_activity_remove_content": "Ar norite ištrinti šią veiklą?", @@ -1916,6 +1949,8 @@ "shared_link_clipboard_copied_massage": "Nukopijuota į iškarpinę", "shared_link_create_error": "Klaida kuriant bendrinimo nuorodą", "shared_link_custom_url_description": "Pasiekite šią bendrinimo nuorodą naudodami tinkintą URL", + "shared_link_custom_url_title": "Pasirinktinis URL", + "shared_link_custom_url_warning": "Įspėjimas: pasirinktinis URL adresas su pasviruoju brūkšniu gali veikti ne taip, kaip tikitės.", "shared_link_edit_description_hint": "Įveskite bendrinimo aprašymą", "shared_link_edit_expire_after_option_day": "1 diena", "shared_link_edit_expire_after_option_days": "{count} dienų", @@ -1982,16 +2017,19 @@ "sign_out": "Atsijungti", "sign_up": "Užsiregistruoti", "size": "Dydis", + "skip": "Praleisti", "skip_to_content": "Pereiti prie turinio", "skip_to_folders": "Praleisti iki aplankų", "skip_to_tags": "Praleisti iki žymių", "slideshow": "Skaidrių peržiūra", + "slideshow_body": "Atsiloškite ir stebėkite savo nuotraukas per visą ekraną rodomoje skaidrių peržiūroje.", "slideshow_metadata_overlay_mode": "Info juostos turinys", "slideshow_metadata_overlay_mode_description_only": "Tik aprašymas", "slideshow_metadata_overlay_mode_full": "Pilnas", "slideshow_repeat": "Kartoti skaidres", "slideshow_repeat_description": "Pradėti iš pradžių, kai skaidrės baigiasi", "slideshow_settings": "Skaidrių peržiūros nustatymai", + "slideshow_title": "Skaidrių peržiūra", "smart_album": "Išmanus albumas", "some_assets_already_have_a_location_warning": "Kai kurie pasirinkti elementai jau turi vietovę", "sort_albums_by": "Rikiuoti albumus pagal...", @@ -2119,6 +2157,7 @@ "unknown": "Nežinoma", "unknown_country": "Nežinoma Šalis", "unknown_date": "Nežinoma data", + "unknown_schema": "Nežinoma schema", "unknown_year": "Nežinomi metai", "unlimited": "Neribota", "unlink_motion_video": "Atsieti video", @@ -2154,6 +2193,8 @@ "upload_status_errors": "Klaidos", "upload_status_uploaded": "Įkelta", "upload_success": "Įkėlimas pavyko, norėdami pamatyti naujai įkeltus elementus perkraukite puslapį.", + "upload_to_album_body": "Nenaudojantiems rankinio įkėlimo: dabar galite pridėti vietines nuotraukas tiesiai į albumą jas įkeldami. Nebereikės įkelti nuotraukų ir tik vėliau jas priskirti albumui.", + "upload_to_album_title": "Įkelti tiesiai į albumą", "upload_to_immich": "Įkelti į Immich ({count})", "uploading": "Įkeliama", "uploading_media": "Įkeliama medija", @@ -2221,6 +2262,9 @@ "week": "Savaitė", "welcome": "Sveiki atvykę", "welcome_to_immich": "Sveiki atvykę į Immich", + "whats_new": "Kas naujo", + "whats_new_settings_subtitle": "Sužinokite, kas naujo Immich", + "whats_new_version": "Versija {version}", "when": "Kada", "width": "Plotis", "wifi_name": "Wi-Fi Pavadinimas", diff --git a/i18n/lv.json b/i18n/lv.json index 3c79c76c4d..f1620c9b1b 100644 --- a/i18n/lv.json +++ b/i18n/lv.json @@ -762,7 +762,6 @@ "custom_date": "Pielāgots datums", "custom_locale": "Pielāgota lokalizācija", "custom_locale_description": "Formatēt datumus, laikus un skaitļus atbilstoši valodai un reģionam", - "custom_url": "Pielāgots URL", "cutoff_date_description": "Paturēt fotoattēlus no pēdējā…", "cutoff_day": "{count, plural, one {dienas} other {dienām}}", "cutoff_year": "{count, plural, one {gada} other {gadiem}}", diff --git a/i18n/ml.json b/i18n/ml.json index 65cc00af58..b264cda3ec 100644 --- a/i18n/ml.json +++ b/i18n/ml.json @@ -23,8 +23,9 @@ "add_location": "സ്ഥാനം ചേർക്കുക", "add_partner": "പങ്കാളിയെ ചേർക്കുക", "add_photos": "ഫോട്ടോകൾ ചേർക്കുക", + "add_step": "ഘട്ടം ചേർക്കുക", "add_tag": "ടാഗ് ചേർക്കുക", - "add_to": "...ലേക്ക് ചേർക്കുക", + "add_to": "ചേർക്കുക…", "add_to_album": "ആൽബത്തിലേക്ക് ചേർക്കുക", "add_to_album_bottom_sheet_added": "{album} എന്നതിലേക്ക് ചേർത്തു", "add_to_album_bottom_sheet_already_exists": "{album}-ൽ ഇതിനകം തന്നെയുണ്ട്", @@ -72,6 +73,7 @@ "cron_expression_description": "ക്രോൺ ഫോർമാറ്റ് ഉപയോഗിച്ച് സ്കാനിംഗ് ഇടവേള സജ്ജീകരിക്കുക. കൂടുതൽ വിവരങ്ങൾക്കായി ദയവായി ക്രോൺടാബ് ഗുരു പോലുള്ളവ പരിശോധിക്കുക", "cron_expression_presets": "ക്രോൺ എക്സ്പ്രഷൻ പ്രീസെറ്റുകൾ", "disable_login": "ലോഗിൻ പ്രവർത്തനരഹിതമാക്കുക", + "download_csv": "കോമ കൊണ്ടു വേർതിരിച്ച (CSV) ഫയലായി ഡൗൺലോഡ് ചെയ്യുക", "duplicate_detection_job_description": "സമാന ചിത്രങ്ങൾ കണ്ടെത്താൻ അസറ്റുകളിൽ മെഷീൻ ലേണിംഗ് പ്രവർത്തിപ്പിക്കുക. ഇത് സ്മാർട്ട് സെർച്ചിനെ ആശ്രയിച്ചിരിക്കുന്നു", "exclusion_pattern_description": "നിങ്ങളുടെ ലൈബ്രറി സ്കാൻ ചെയ്യുമ്പോൾ ഫയലുകളും ഫോൾഡറുകളും ഒഴിവാക്കാൻ എക്സ്ക്ലൂഷൻ പാറ്റേണുകൾ നിങ്ങളെ സഹായിക്കുന്നു. നിങ്ങൾ ഇമ്പോർട്ട് ചെയ്യാൻ ആഗ്രഹിക്കാത്ത ഫയലുകൾ അടങ്ങിയ ഫോൾഡറുകൾ (ഉദാഹരണത്തിന് RAW ഫയലുകൾ) ഉണ്ടെങ്കിൽ ഇത് ഉപയോഗപ്രദമാണ്.", "export_config_as_json_description": "നിലവിലുള്ള സിസ്റ്റം കോൺഫിഗറേഷൻ JSON ഫയലായി ഡൌൺലോഡ് ചെയ്യുക", @@ -106,6 +108,21 @@ "image_thumbnail_quality_description": "തംബ്നെയിലിന്റെ ഗുണമേന്മ 1-100 വരെ. ഉയർന്ന മൂല്യം മികച്ചതാണ്, പക്ഷേ വലിയ ഫയലുകൾ ഉണ്ടാക്കുകയും ആപ്പിന്റെ പ്രതികരണശേഷി കുറയ്ക്കുകയും ചെയ്യും.", "image_thumbnail_title": "തംബ്നെയിൽ ക്രമീകരണങ്ങൾ", "import_config_from_json_description": "ഒരു JSON കോൺഫിഗറേഷൻ ഫയൽ അപ്‌ലോഡ് ചെയ്തുകൊണ്ട് സിസ്റ്റം കോൺഫിഗറേഷൻ ഇറക്കുമതി ചെയ്യുക", + "integrity_checks_checksum_files": "ചെക്‌സം ഫയൽസ്", + "integrity_checks_checksum_files_description": "ചെക്ക്സം പരിശോധന ക്രമീകരിക്കുക", + "integrity_checks_checksum_files_enable_description": "ചെക്ക്സം പരിശോധന പ്രവർത്തനക്ഷമമാക്കുക", + "integrity_checks_checksum_files_percentage_limit": "പരിധി ശതമാനത്തിൽ", + "integrity_checks_checksum_files_percentage_limit_description": "ചെക്ക്സം ചെക്ക് ഓരോ ഇടവേളയിലും എത്രത്തോളം പ്രവർത്തിക്കണം എന്നതിന് 0.01 നും 1 നും ഇടയിലുള്ള പരമാവധി ശതമാനം കോൺഫിഗർ ചെയ്യുക.", + "integrity_checks_checksum_files_time_limit": "സമയ പരിധി", + "integrity_checks_checksum_files_time_limit_description": "ചെക്ക്സം ചെക്ക് ഓരോ ഇടവേളയിലും പ്രവർത്തിപ്പിക്കേണ്ട പരമാവധി ദൈർഘ്യം കോൺഫിഗർ ചെയ്യുക. (മില്ലിസെക്കൻഡ്)", + "integrity_checks_missing_files": "ഫയലുകൾ കാണുന്നില്ല", + "integrity_checks_missing_files_description": "ഫ്രീക്വൻസി കോൺഫിഗർ ചെയ്‌ത് നഷ്‌ടമായ ഫയലുകളുടെ പരിശോധന പ്രവർത്തനക്ഷമമാക്കുക അല്ലെങ്കിൽ പ്രവർത്തനരഹിതമാക്കുക", + "integrity_checks_missing_files_enable_description": "വിട്ടുപോയ ഫയലുകളുടെ പരിശോധന പ്രവർത്തനക്ഷമമാക്കുക", + "integrity_checks_settings": "സമഗ്രത പരിശോധിക്കുന്നു", + "integrity_checks_settings_description": "സമഗ്രത പരിശോധന ഇടവേളകൾ കൈകാര്യം ചെയ്യുക", + "integrity_checks_untracked_files": "ട്രാക്ക് ചെയ്യാത്ത ഫയലുകൾ", + "integrity_checks_untracked_files_description": "ഫ്രീക്വൻസി കോൺഫിഗർ ചെയ്‌ത് ട്രാക്ക് ചെയ്യാത്ത ഫയലുകളുടെ പരിശോധന പ്രവർത്തനക്ഷമമാക്കുകയോ പ്രവർത്തനരഹിതമാക്കുകയോ ചെയ്യുക", + "integrity_checks_untracked_files_enable_description": "ട്രാക്ക് ചെയ്യാത്ത ഫയലുകളുടെ പരിശോധന പ്രവർത്തനക്ഷമമാക്കുക", "job_concurrency": "{job} കോൺകറൻസി", "job_created": "ജോലി സൃഷ്ടിച്ചു", "job_not_concurrency_safe": "ഈ ജോലി കോൺകറൻസി-സേഫ് അല്ല.", @@ -113,6 +130,7 @@ "job_settings_description": "ജോലി കോൺകറൻസി കൈകാര്യം ചെയ്യുക", "jobs_delayed": "{jobCount, plural, one {# ജോലി വൈകി} other {# ജോലികൾ വൈകി}}", "jobs_failed": "{jobCount, plural, one {# ജോലി പരാജയപ്പെട്ടു} other {# ജോലികൾ പരാജയപ്പെട്ടു}}", + "jobs_over_time": "കാലക്രമേണ ജോലികൾ", "library_created": "{library} എന്ന ലൈബ്രറി സൃഷ്ടിച്ചു", "library_deleted": "ലൈബ്രറി ഇല്ലാതാക്കി", "library_details": "ലൈബ്രറി വിവരങ്ങൾ", @@ -180,11 +198,39 @@ "machine_learning_smart_search_enabled": "സ്മാർട്ട് സെർച്ച് പ്രവർത്തനക്ഷമമാക്കുക", "machine_learning_smart_search_enabled_description": "പ്രവർത്തനരഹിതമാക്കിയാൽ, സ്മാർട്ട് സെർച്ചിനായി ചിത്രങ്ങൾ എൻകോഡ് ചെയ്യപ്പെടില്ല.", "machine_learning_url_description": "മെഷീൻ ലേണിംഗ് സെർവറിന്റെ URL. ഒന്നിൽ കൂടുതൽ URL-കൾ നൽകിയിട്ടുണ്ടെങ്കിൽ, ഓരോ സെർവറും ഒന്നിനു പുറകെ ഒന്നായി വിജയകരമായി പ്രതികരിക്കുന്നതുവരെ ശ്രമിക്കും. പ്രതികരിക്കാത്ത സെർവറുകൾ ഓൺലൈനിൽ തിരികെ വരുന്നതുവരെ താൽക്കാലികമായി അവഗണിക്കപ്പെടും.", + "maintenance_backup_management": "ബാക്കപ്പ് മാനേജ്മെന്റ്", + "maintenance_delete_backup": "ബാക്കപ്പ് നീക്കം ചെയ്യുക", + "maintenance_delete_backup_description": "ഈ ഫയൽ തിരിച്ചെടുക്കാൻ പറ്റാത്ത രീതിയിൽ ഇല്ലാതാക്കപ്പെടും.", + "maintenance_delete_error": "ബാക്കപ്പ് നീക്കം ചെയ്യുന്നതിൽ പരാജയപ്പെട്ടു.", + "maintenance_integrity_check": "പരിശോധിക്കുക", + "maintenance_integrity_check_all": "എല്ലാം പരിശോധിക്കുക", + "maintenance_integrity_checksum_mismatch": "ചെക്ക്സം പൊരുത്തപ്പെടുന്നില്ല", + "maintenance_integrity_checksum_mismatch_description": "ഓൺ-ഡിസ്‌ക് ചെക്ക്‌സം അതിന്റെ Immich ഡാറ്റാബേസിൽ സംഭരിച്ചിരിക്കുന്ന ചെക്ക്‌സവുമായി പൊരുത്തപ്പെടാത്ത ഫയലുകൾ.", + "maintenance_integrity_checksum_mismatch_job": "ചെക്ക്സം പൊരുത്തക്കേടുകൾ പരിശോധിക്കുക", + "maintenance_integrity_checksum_mismatch_refresh_job": "ചെക്ക്സം പൊരുത്തക്കേട് റിപ്പോർട്ടുകൾ പുതുക്കുക", + "maintenance_integrity_missing_file": "ഫയലുകൾ കാണുന്നില്ല", + "maintenance_integrity_missing_file_description": "Immich അതിന്റെ ഡാറ്റാബേസിൽ ട്രാക്ക് ചെയ്‌തതും എന്നാൽ ഫയൽ സിസ്റ്റത്തിൽ നിലവിലില്ലാത്തതുമായ ഫയലുകൾ.", + "maintenance_integrity_missing_file_job": "നഷ്ടപ്പെട്ട ഫയലുകൾ പരിശോധിക്കുക", + "maintenance_integrity_missing_file_refresh_job": "നഷ്ടപ്പെട്ട ഫയൽ റിപ്പോർട്ടുകൾ പുതുക്കുക", + "maintenance_integrity_report": "സമഗ്രത റിപ്പോർട്ട്", + "maintenance_integrity_untracked_file": "ട്രാക്ക് ചെയ്യാത്ത ഫയലുകൾ", + "maintenance_integrity_untracked_file_description": "Immich-ന്റെ ഡയറക്‌ടറികളിലെ ഫയലുകളിൽ Immich -ന് ഒരു റെക്കോർഡും ഇല്ലാത്തവ.", + "maintenance_integrity_untracked_file_job": "ട്രാക്ക് ചെയ്യാത്ത ഫയലുകൾ പരിശോധിക്കുക", + "maintenance_integrity_untracked_file_refresh_job": "ട്രാക്ക് ചെയ്യാത്ത ഫയൽ റിപ്പോർട്ടുകൾ പുതുക്കുക", + "maintenance_restore_backup": "ബാക്കപ്പ് പുനഃസ്ഥാപിക്കുക", + "maintenance_restore_backup_description": "തിരഞ്ഞെടുത്ത ബാക്കപ്പിൽ നിന്ന് Immich മായ്‌ക്കുകയും പുനഃസ്ഥാപിക്കുകയും ചെയ്യും. തുടരുന്നതിന് മുമ്പ് ഒരു ബാക്കപ്പ് സൃഷ്ടിക്കപ്പെടും.", + "maintenance_restore_backup_different_version": "Immich -ന്റെ മറ്റൊരു പതിപ്പ് ഉപയോഗിച്ചാണ് ഈ ബാക്കപ്പ് സൃഷ്‌ടിച്ചത്!", + "maintenance_restore_backup_unknown_version": "ബാക്കപ്പ് പതിപ്പ് നിർണ്ണയിക്കാൻ കഴിഞ്ഞില്ല.", + "maintenance_restore_database_backup": "ഡാറ്റാബേസ് ബാക്കപ്പ് പുനഃസ്ഥാപിക്കുക", + "maintenance_restore_database_backup_description": "ഒരു ബാക്കപ്പ് ഫയൽ ഉപയോഗിച്ച് മുമ്പത്തെ ഡാറ്റാബേസ് അവസ്ഥയിലേക്ക് റോൾബാക്ക് ചെയ്യുക", "maintenance_settings": "അറ്റകുറ്റപ്പണി (Maintenance)", "maintenance_settings_description": "ഇമ്മിക്ക് മെയിന്റനൻസ് മോഡിലേക്ക് മാറ്റുക.", - "maintenance_start": "മെയിന്റനൻസ് മോഡ് ആരംഭിക്കുക", + "maintenance_start": "മെയിന്റനൻസ് മോഡിലേക്കു മാറുക", "maintenance_start_error": "മെയിന്റനൻസ് മോഡ് ആരംഭിക്കുന്നതിൽ പരാജയപ്പെട്ടു.", + "maintenance_upload_backup": "ഡാറ്റാബേസ് ബാക്കപ്പ് ഫയൽ അപ്‌ലോഡ് ചെയ്യുക", + "maintenance_upload_backup_error": "ബാക്കപ്പ് അപ്‌ലോഡ് ചെയ്യാൻ കഴിഞ്ഞില്ല, ഇതൊരു .sql/.sql.gz ഫയലാണോ?", "manage_concurrency": "കോൺകറൻസി കൈകാര്യം ചെയ്യുക", + "manage_concurrency_description": "ജോബ് കൺകറൻസി മാനേജ് ചെയ്യാൻ ജോബ് പേജിലേക്ക് നാവിഗേറ്റ് ചെയ്യുക", "manage_log_settings": "ലോഗ് ക്രമീകരണങ്ങൾ കൈകാര്യം ചെയ്യുക", "map_dark_style": "ഡാർക്ക് സ്റ്റൈൽ", "map_enable_description": "മാപ്പ് ഫീച്ചറുകൾ പ്രവർത്തനക്ഷമമാക്കുക", @@ -245,16 +291,20 @@ "notification_enable_email_notifications": "ഇമെയിൽ അറിയിപ്പുകൾ പ്രവർത്തനക്ഷമമാക്കുക", "notification_settings": "അറിയിപ്പ് ക്രമീകരണങ്ങൾ", "notification_settings_description": "ഇമെയിൽ ഉൾപ്പെടെയുള്ള അറിയിപ്പ് ക്രമീകരണങ്ങൾ കൈകാര്യം ചെയ്യുക", + "oauth_allow_insecure_requests": "സുരക്ഷിതമല്ലാത്ത അഭ്യർത്ഥനകൾ അനുവദിക്കുക", + "oauth_allow_insecure_requests_description": "മുന്നറിയിപ്പ്: ഇത് OAuth അഭ്യർത്ഥനകൾക്കായുള്ള TLS സർട്ടിഫിക്കറ്റ് മൂല്യനിർണ്ണയം പ്രവർത്തനരഹിതമാക്കുകയും നിങ്ങളെ MITM ആക്രമണങ്ങൾക്ക് വിധേയമാക്കുകയും ചെയ്തേക്കാം.", "oauth_auto_launch": "യാന്ത്രികമായി തുടങ്ങുക", "oauth_auto_launch_description": "ലോഗിൻ പേജിലേക്ക് പോകുമ്പോൾ OAuth ലോഗിൻ ഫ്ലോ യാന്ത്രികമായി ആരംഭിക്കുക", "oauth_auto_register": "യാന്ത്രികമായി രജിസ്റ്റർ ചെയ്യുക", "oauth_auto_register_description": "OAuth ഉപയോഗിച്ച് സൈൻ ഇൻ ചെയ്ത ശേഷം പുതിയ ഉപയോക്താക്കളെ യാന്ത്രികമായി രജിസ്റ്റർ ചെയ്യുക", "oauth_button_text": "ബട്ടണിലെ വാചകം", - "oauth_client_secret_description": "OAuth ദാതാവ് PKCE (പ്രൂഫ് കീ ഫോർ കോഡ് എക്സ്ചേഞ്ച്) പിന്തുണയ്ക്കുന്നില്ലെങ്കിൽ ആവശ്യമാണ്", + "oauth_client_secret_description": "സുരക്ഷിത ഉപയോക്താവിനോ, OAuth ദാതാവ് PKCE (പ്രൂഫ് കീ ഫോർ കോഡ് എക്സ്ചേഞ്ച്) പിന്തുണയ്ക്കുന്നില്ലെങ്കിലോ ഇത് ആവശ്യമാണ്", "oauth_enable_description": "OAuth ഉപയോഗിച്ച് ലോഗിൻ ചെയ്യുക", + "oauth_end_session_url_description": "ഉപയോക്താവ് ലോഗ് ഔട്ട് ചെയ്യുമ്പോൾ ഈ യുആർഐയിലേക്ക് റീഡയറക്‌ട് ചെയ്യുക.", "oauth_mobile_redirect_uri": "മൊബൈൽ റീഡയറക്ട് URI", "oauth_mobile_redirect_uri_override": "മൊബൈൽ റീഡയറക്ട് URI ഓവർറൈഡ്", "oauth_mobile_redirect_uri_override_description": "OAuth ദാതാവ് \"{callback}\" പോലുള്ള ഒരു മൊബൈൽ URI അനുവദിക്കാത്തപ്പോൾ പ്രവർത്തനക്ഷമമാക്കുക", + "oauth_prompt_description": "പ്രോംപ്റ്റ് പാരാമീറ്റർ (ഉദാ. select_account, login, consent)", "oauth_role_claim": "റോൾ ക്ലെയിം", "oauth_role_claim_description": "ഈ ക്ലെയിമിന്റെ സാന്നിധ്യത്തെ അടിസ്ഥാനമാക്കി യാന്ത്രികമായി അഡ്മിൻ ആക്സസ് നൽകുക. ക്ലെയിമിന് 'user' അല്ലെങ്കിൽ 'admin' എന്ന് ഉണ്ടാകാം.", "oauth_settings": "OAuth", @@ -274,10 +324,16 @@ "password_settings_description": "പാസ്‌വേഡ് ലോഗിൻ ക്രമീകരണങ്ങൾ കൈകാര്യം ചെയ്യുക", "paths_validated_successfully": "എല്ലാ പാത്തുകളും വിജയകരമായി സാധൂകരിച്ചു", "person_cleanup_job": "വ്യക്തി ക്ലീനപ്പ്", + "queue_details": "ക്യൂ വിശദാംശങ്ങൾ", + "queues": "ജോലി ക്യൂകൾ", + "queues_page_description": "അഡ്മിൻ ജോലി ക്യൂ പേജ്", "quota_size_gib": "ക്വാട്ട വലുപ്പം (GiB)", "refreshing_all_libraries": "എല്ലാ ലൈബ്രറികളും പുതുക്കുന്നു", "registration": "അഡ്മിൻ രജിസ്ട്രേഷൻ", "registration_description": "നിങ്ങളാണ് സിസ്റ്റത്തിലെ ആദ്യത്തെ ഉപയോക്താവ് എന്നതിനാൽ, നിങ്ങളെ അഡ്മിൻ ആയി നിയമിക്കും. ഭരണപരമായ ജോലികൾക്ക് നിങ്ങൾ ഉത്തരവാദിയായിരിക്കും, കൂടാതെ അധിക ഉപയോക്താക്കളെ സൃഷ്ടിക്കുന്നത് നിങ്ങളായിരിക്കും.", + "release_channel_release_candidate": "പുറത്തിറക്കാൻ യോജിച്ചതു", + "release_channel_stable": "സ്ഥിരതയുള്ള", + "remove_failed_jobs": "പരാജയപ്പെട്ട ജോലികൾ നീക്കം ചെയ്യുക", "require_password_change_on_login": "ആദ്യ ലോഗിൻ ചെയ്യുമ്പോൾ പാസ്‌വേഡ് മാറ്റാൻ ഉപയോക്താവിനോട് ആവശ്യപ്പെടുക", "reset_settings_to_default": "ക്രമീകരണങ്ങൾ ഡിഫോൾട്ടിലേക്ക് പുനഃസജ്ജമാക്കുക", "reset_settings_to_recent_saved": "അടുത്തിടെ സേവ് ചെയ്ത ക്രമീകരണങ്ങളിലേക്ക് പുനഃസജ്ജമാക്കുക", @@ -285,13 +341,15 @@ "search_jobs": "ജോലികൾക്കായി തിരയുക…", "send_welcome_email": "സ്വാഗത ഇമെയിൽ അയക്കുക", "server_external_domain_settings": "ബാഹ്യ ഡൊമെയ്ൻ", - "server_external_domain_settings_description": "പൊതുവായി പങ്കിട്ട ലിങ്കുകൾക്കുള്ള ഡൊമെയ്ൻ, http(s):// ഉൾപ്പെടെ", + "server_external_domain_settings_description": "പുറത്തേക്കുള്ള ലിങ്കുകളിൽ ഉപയോഗിക്കുന്ന ഡൊമൈൻ", "server_public_users": "പൊതു ഉപയോക്താക്കൾ", "server_public_users_description": "പങ്കിട്ട ആൽബങ്ങളിലേക്ക് ഒരു ഉപയോക്താവിനെ ചേർക്കുമ്പോൾ എല്ലാ ഉപയോക്താക്കളെയും (പേരും ഇമെയിലും) ലിസ്റ്റ് ചെയ്യും. പ്രവർത്തനരഹിതമാക്കുമ്പോൾ, ഉപയോക്തൃ ലിസ്റ്റ് അഡ്മിൻ ഉപയോക്താക്കൾക്ക് മാത്രമേ ലഭ്യമാകൂ.", "server_settings": "സെർവർ ക്രമീകരണങ്ങൾ", "server_settings_description": "സെർവർ ക്രമീകരണങ്ങൾ കൈകാര്യം ചെയ്യുക", + "server_stats_page_description": "അഡ്മിൻ സെർവർ സ്റ്റാറ്റിസ്റ്റിക്സ് പേജ്", "server_welcome_message": "സ്വാഗത സന്ദേശം", "server_welcome_message_description": "ലോഗിൻ പേജിൽ പ്രദർശിപ്പിക്കുന്ന ഒരു സന്ദേശം.", + "settings_page_description": "അഡ്മിൻ ക്രമീകരണ പേജ്", "sidecar_job": "സൈഡ്‌കാർ മെറ്റാഡാറ്റ", "sidecar_job_description": "ഫയൽസിസ്റ്റത്തിൽ നിന്ന് സൈഡ്‌കാർ മെറ്റാഡാറ്റ കണ്ടെത്തുകയോ സിൻക്രൊണൈസ് ചെയ്യുകയോ ചെയ്യുക", "slideshow_duration_description": "ഓരോ ചിത്രവും പ്രദർശിപ്പിക്കാനുള്ള സെക്കൻഡുകളുടെ എണ്ണം", @@ -369,6 +427,10 @@ "transcoding_preferred_hardware_device_description": "VAAPI, QSV എന്നിവയ്ക്ക് മാത്രം ബാധകം. ഹാർഡ്‌വെയർ ട്രാൻസ്‌കോഡിംഗിനായി ഉപയോഗിക്കുന്ന dri നോഡ് സജ്ജമാക്കുന്നു.", "transcoding_preset_preset": "പ്രീസെറ്റ് (-preset)", "transcoding_preset_preset_description": "കംപ്രഷൻ വേഗത. വേഗത കുറഞ്ഞ പ്രീസെറ്റുകൾ ചെറിയ ഫയലുകൾ നിർമ്മിക്കുന്നു, ഒരു നിശ്ചിത ബിറ്റ്റേറ്റ് ലക്ഷ്യമിടുമ്പോൾ ഗുണമേന്മ വർദ്ധിപ്പിക്കുന്നു. 'faster'-നേക്കാൾ ഉയർന്ന വേഗത VP9 അവഗണിക്കുന്നു.", + "transcoding_realtime": "തത്സമയ ട്രാൻസ്കോഡിംഗ് [പരീക്ഷണാത്മകം]", + "transcoding_realtime_description": "വീഡിയോ സ്ട്രീം ചെയ്യുന്നതിനാൽ തത്സമയം ട്രാൻസ്‌കോഡിംഗ് നടത്താൻ അനുവദിക്കുന്നു. ഗുണമേന്മയുള്ള സ്വിച്ചിംഗ് പ്രവർത്തനക്ഷമമാക്കുന്നു, എന്നാൽ സെർവർ കഴിവുകളെ ആശ്രയിച്ച് ഉയർന്ന പ്ലേബാക്ക് ലേറ്റൻസിക്കും ഇടർച്ചയ്ക്കും കാരണമായേക്കാം.", + "transcoding_realtime_enabled": "തത്സമയ ട്രാൻസ്കോഡിംഗ് പ്രവർത്തനക്ഷമമാക്കുക", + "transcoding_realtime_enabled_description": "പ്രവർത്തനരഹിതമാക്കിയാൽ, പുതിയ തത്സമയ ട്രാൻസ്‌കോഡിംഗ് സെഷനുകൾ ആരംഭിക്കാൻ സെർവർ വിസമ്മതിക്കും.", "transcoding_reference_frames": "റഫറൻസ് ഫ്രെയിമുകൾ", "transcoding_reference_frames_description": "നൽകിയിരിക്കുന്ന ഒരു ഫ്രെയിം കംപ്രസ് ചെയ്യുമ്പോൾ റഫറൻസ് ചെയ്യേണ്ട ഫ്രെയിമുകളുടെ എണ്ണം. ഉയർന്ന മൂല്യങ്ങൾ കംപ്രഷൻ കാര്യക്ഷമത മെച്ചപ്പെടുത്തുന്നു, പക്ഷേ എൻകോഡിംഗ് വേഗത കുറയ്ക്കുന്നു. 0 ഈ മൂല്യം യാന്ത്രികമായി സജ്ജീകരിക്കുന്നു.", "transcoding_required_description": "അംഗീകൃത ഫോർമാറ്റിൽ അല്ലാത്ത വീഡിയോകൾ മാത്രം", @@ -410,6 +472,10 @@ "user_restore_scheduled_removal": "ഉപയോക്താവിനെ പുനഃസ്ഥാപിക്കുക - {date, date, long}-ന് നീക്കംചെയ്യാൻ ഷെഡ്യൂൾ ചെയ്‌തിരിക്കുന്നു", "user_settings": "ഉപയോക്താവിന്റെ ക്രമീകരണങ്ങൾ", "user_settings_description": "ഉപയോക്തൃ ക്രമീകരണങ്ങൾ കൈകാര്യം ചെയ്യുക", + "user_successfully_removed": "{email} എന്ന ഉപയോക്താവിനെ വിജയകരമായി നീക്കം ചെയ്തു.", + "users_page_description": "അഡ്മിൻ ഉപയോക്താക്കളുടെ പേജ്", + "version_check_channel": "റിലീസ് ചാനൽ", + "version_check_channel_description": "പതിപ്പ് അറിയിപ്പുകൾ ലഭിക്കാൻ ആഗ്രഹിക്കുന്ന റിലീസ് ചാനൽ തിരഞ്ഞെടുക്കുക", "version_check_enabled_description": "പതിപ്പ് പരിശോധന പ്രവർത്തനക്ഷമമാക്കുക", "version_check_implications": "പതിപ്പ് പരിശോധന ഫീച്ചർ {server}-മായി ആനുകാലിക ആശയവിനിമയത്തെ ആശ്രയിച്ചിരിക്കുന്നു", "version_check_settings": "പതിപ്പ് പരിശോധന", @@ -421,6 +487,9 @@ "admin_password": "അഡ്മിൻ പാസ്‌വേഡ്", "administration": "അഡ്മിനിസ്ട്രേഷൻ", "advanced": "വിപുലമായത്", + "advanced_settings_clear_image_cache": "ഇമേജ് കാഷെ മായ്‌ക്കുക", + "advanced_settings_clear_image_cache_error": "ഇമേജ് കാഷെ മായ്‌ക്കുന്നതിൽ പരാജയപ്പെട്ടു", + "advanced_settings_clear_image_cache_success": "{size} വിജയകരമായി മായ്ച്ചു", "advanced_settings_log_level_title": "ലോഗ് ലെവൽ: {level}", "advanced_settings_prefer_remote_subtitle": "ചില ഉപകരണങ്ങളിൽ പ്രാദേശിക അസറ്റുകളിൽ നിന്ന് തംബ്നെയിലുകൾ ലോഡുചെയ്യാൻ വളരെ വേഗത കുറവാണ്. പകരം റിമോട്ട് ചിത്രങ്ങൾ ലോഡുചെയ്യാൻ ഈ ക്രമീകരണം സജീവമാക്കുക.", "advanced_settings_prefer_remote_title": "റിമോട്ട് ചിത്രങ്ങൾക്ക് മുൻഗണന നൽകുക", @@ -453,6 +522,7 @@ "album_summary": "ആൽബത്തിന്റെ സംഗ്രഹം", "album_updated": "ആൽബം അപ്ഡേറ്റ് ചെയ്തു", "album_updated_setting_description": "ഒരു പങ്കിട്ട ആൽബത്തിൽ പുതിയ അസറ്റുകൾ ഉണ്ടാകുമ്പോൾ ഒരു ഇമെയിൽ അറിയിപ്പ് സ്വീകരിക്കുക", + "album_upload_assets": "നിങ്ങളുടെ കമ്പ്യൂട്ടറിൽ നിന്ന് അസറ്റുകൾ അപ്‌ലോഡ് ചെയ്‌ത് ആൽബത്തിലേക്ക് ചേർക്കുക", "album_viewer_appbar_share_err_delete": "ആൽബം ഇല്ലാതാക്കുന്നതിൽ പരാജയപ്പെട്ടു", "album_viewer_page_share_add_users": "ഉപയോക്താക്കളെ ചേർക്കുക", "album_with_link_access": "ലിങ്കുള്ള ആർക്കും ഈ ആൽബത്തിലെ ഫോട്ടോകളും ആളുകളെയും കാണാൻ അനുവദിക്കുക.", @@ -465,12 +535,16 @@ "all": "എല്ലാം", "all_albums": "എല്ലാ ആൽബങ്ങളും", "all_people": "എല്ലാ ആളുകളും", + "all_photos": "എല്ലാ ഫോട്ടോകളും", "all_videos": "എല്ലാ വീഡിയോകളും", "allow_dark_mode": "ഡാർക്ക് മോഡ് അനുവദിക്കുക", "allow_public_user_to_download": "പൊതു ഉപയോക്താവിനെ ഡൗൺലോഡ് ചെയ്യാൻ അനുവദിക്കുക", "allow_public_user_to_upload": "പൊതു ഉപയോക്താവിനെ അപ്‌ലോഡ് ചെയ്യാൻ അനുവദിക്കുക", "allowed": "അനുവദിച്ചു", "alt_text_qr_code": "QR കോഡ് ചിത്രം", + "always_keep": "എപ്പോഴും സൂക്ഷിക്കുക", + "always_keep_photos_hint": "ഇടം സൃഷ്‌ടിക്കുക, ഈ ഉപകരണത്തിൽ എല്ലാ ഫോട്ടോകളും സൂക്ഷിക്കും.", + "always_keep_videos_hint": "ഇടം സൃഷ്‌ടിക്കുക, എല്ലാ വീഡിയോകളും ഈ ഉപകരണത്തിൽ സൂക്ഷിക്കും.", "api_key": "API കീ", "api_key_description": "ഈ മൂല്യം ഒരു തവണ മാത്രമേ കാണിക്കൂ. വിൻഡോ അടയ്ക്കുന്നതിന് മുമ്പ് ഇത് പകർത്തുന്നത് ഉറപ്പാക്കുക.", "api_key_empty": "നിങ്ങളുടെ API കീയുടെ പേര് ശൂന്യമാകരുത്", @@ -495,6 +569,8 @@ "are_you_sure_to_do_this": "ഇത് ചെയ്യണമെന്ന് നിങ്ങൾക്ക് ഉറപ്പാണോ?", "asset_added_to_album": "ആൽബത്തിലേക്ക് ചേർത്തു", "asset_adding_to_album": "ആൽബത്തിലേക്ക് ചേർത്തുകൊണ്ടിരിക്കുന്നു…", + "asset_created": "അസറ്റ് സൃഷ്ടിച്ചു", + "asset_day_count": "{date}: {count, plural, one {# അസറ്റ്} other {# അസറ്റുകൾ}}", "asset_description_updated": "അസറ്റിന്റെ വിവരണം അപ്ഡേറ്റ് ചെയ്തു", "asset_hashing": "ഹാഷിംഗ്…", "asset_list_group_by_sub_title": "ഇതനുസരിച്ച് ഗ്രൂപ്പ് ചെയ്യുക", @@ -503,6 +579,9 @@ "asset_list_layout_sub_title": "ലേഔട്ട്", "asset_list_settings_subtitle": "ഫോട്ടോ ഗ്രിഡ് ലേഔട്ട് ക്രമീകരണങ്ങൾ", "asset_list_settings_title": "ഫോട്ടോ ഗ്രിഡ്", + "asset_not_found_on_device_android": "ഉപകരണത്തിൽ അസറ്റ് കണ്ടെത്തിയില്ല", + "asset_not_found_on_device_ios": "ഉപകരണത്തിൽ അസറ്റ് കണ്ടെത്തിയില്ല. നിങ്ങൾ iCloud ഉപയോഗിക്കുകയാണെങ്കിൽ, iCloud-ൽ സംഭരിച്ചിരിക്കുന്ന മോശം ഫയൽ കാരണം അസറ്റ് ആക്‌സസ് ചെയ്യാൻ കഴിയില്ല", + "asset_not_found_on_icloud": "ഐക്ലൗഡിൽ അസറ്റ് കണ്ടെത്തിയില്ല. iCloud-ൽ സംഭരിച്ചിരിക്കുന്ന മോശം ഫയൽ കാരണം അസറ്റ് ആക്‌സസ്സുചെയ്യാനാകാതെ വന്നേക്കാം", "asset_offline": "അസറ്റ് ഓഫ്‌ലൈൻ", "asset_offline_description": "ഈ എക്സ്റ്റേണൽ അസറ്റ് ഇപ്പോൾ ഡിസ്കിൽ ലഭ്യമല്ല. സഹായത്തിനായി നിങ്ങളുടെ Immich അഡ്മിനിസ്ട്രേറ്ററുമായി ബന്ധപ്പെടുക.", "asset_skipped": "ഒഴിവാക്കി", @@ -567,12 +646,14 @@ "backup_options": "ബാക്കപ്പ് ഓപ്ഷനുകൾ", "backup_settings_subtitle": "അപ്‌ലോഡ് ക്രമീകരണങ്ങൾ കൈകാര്യം ചെയ്യുക", "backward": "പിന്നോട്ട്", + "battery_optimization_backup_reliability": "ബാറ്ററി ഒപ്റ്റിമൈസേഷനുകൾ പ്രവർത്തനരഹിതമാക്കുന്നത് പശ്ചാത്തല ബാക്കപ്പിൻ്റെ വിശ്വാസ്യത മെച്ചപ്പെടുത്തും", "biometric_auth_enabled": "ബയോമെട്രിക് പ്രാമാണീകരണം പ്രവർത്തനക്ഷമമാക്കി", "biometric_locked_out": "ബയോമെട്രിക് പ്രാമാണീകരണത്തിൽ നിന്ന് നിങ്ങളെ ലോക്ക് ഔട്ട് ചെയ്തിരിക്കുന്നു", "biometric_no_options": "ബയോമെട്രിക് ഓപ്ഷനുകളൊന്നും ലഭ്യമല്ല", "biometric_not_available": "ഈ ഉപകരണത്തിൽ ബയോമെട്രിക് പ്രാമാണീകരണം ലഭ്യമല്ല", "birthdate_set_description": "ഒരു ഫോട്ടോ എടുക്കുമ്പോഴുള്ള ഈ വ്യക്തിയുടെ പ്രായം കണക്കാക്കാൻ ജനനത്തീയതി ഉപയോഗിക്കുന്നു.", "blurred_background": "മങ്ങിയ പശ്ചാത്തലം", + "browse_templates": "ടെംപ്ലേറ്റുകൾ ബ്രൗസ് ചെയ്യുക", "bugs_and_feature_requests": "ബഗുകളും ഫീച്ചർ അഭ്യർത്ഥനകളും", "build": "ബിൽഡ്", "build_image": "ഇമേജ് നിർമ്മിക്കുക", @@ -592,6 +673,7 @@ "cannot_update_the_description": "വിവരണം അപ്ഡേറ്റ് ചെയ്യാൻ കഴിയില്ല", "cast": "കാസ്റ്റ്", "cast_description": "ലഭ്യമായ കാസ്റ്റ് ഡെസ്റ്റിനേഷനുകൾ കോൺഫിഗർ ചെയ്യുക", + "change": "മാറ്റുക", "change_date": "തീയതി മാറ്റുക", "change_description": "വിവരണം മാറ്റുക", "change_display_order": "പ്രദർശന ക്രമം മാറ്റുക", @@ -613,17 +695,34 @@ "charging": "ചാർജ്ജ് ചെയ്യുന്നു", "charging_requirement_mobile_backup": "പശ്ചാത്തല ബാക്കപ്പിന് ഉപകരണം ചാർജ് ചെയ്യേണ്ടതുണ്ട്", "check_logs": "ലോഗുകൾ പരിശോധിക്കുക", + "checksum": "ചെക്ക്സം", + "choose": "തിരഞ്ഞെടുക്കുക", "choose_matching_people_to_merge": "ലയിപ്പിക്കാൻ പൊരുത്തപ്പെടുന്ന ആളുകളെ തിരഞ്ഞെടുക്കുക", "city": "നഗരം", + "cleanup_confirm_description": "സെർവറിലേക്ക് സുരക്ഷിതമായി ബാക്കപ്പ് ചെയ്‌തിരിക്കുന്ന {count} അസറ്റുകൾ ({date}-ന് മുമ്പ് സൃഷ്‌ടിച്ചത്) ഇമ്മിച്ച് കണ്ടെത്തി. ഈ ഉപകരണത്തിൽ നിന്ന് പ്രാദേശിക പകർപ്പുകൾ നീക്കം ചെയ്യണോ?", + "cleanup_confirm_prompt_title": "ഈ ഉപകരണത്തിൽ നിന്ന് നീക്കം ചെയ്യണോ?", + "cleanup_deleted_assets": "ഉപകരണ ട്രാഷിലേക്ക് {count} അസറ്റുകൾ നീക്കി", + "cleanup_deleting": "ചവറ്റുകുട്ടയിലേക്ക് നീങ്ങുന്നു...", + "cleanup_found_assets": "{count} ബാക്കപ്പ് ചെയ്ത അസറ്റുകൾ കണ്ടെത്തി", + "cleanup_found_assets_with_size": "{count} ബാക്കപ്പ് ചെയ്ത അസറ്റുകൾ കണ്ടെത്തി ({size})", + "cleanup_icloud_shared_albums_excluded": "iCloud പങ്കിട്ട ആൽബങ്ങൾ സ്കാനിൽ നിന്ന് ഒഴിവാക്കിയിരിക്കുന്നു", + "cleanup_no_assets_found": "മുകളിലുള്ള മാനദണ്ഡങ്ങളുമായി പൊരുത്തപ്പെടുന്ന അസറ്റുകളൊന്നും കണ്ടെത്തിയില്ല. സെർവറിലേക്ക് ബാക്കപ്പ് ചെയ്‌ത അസറ്റുകൾ മാത്രമേ ഫ്രീ അപ്പ് സ്‌പെയ്‌സിന് നീക്കംചെയ്യാനാകൂ", + "cleanup_preview_title": "നീക്കം ചെയ്യാനുള്ള അസറ്റുകൾ ({count})", + "cleanup_step3_description": "നിങ്ങളുടെ തീയതിയുമായി പൊരുത്തപ്പെടുന്ന ബാക്കപ്പ് അസറ്റുകൾക്കായി സ്‌കാൻ ചെയ്‌ത് ക്രമീകരണങ്ങൾ സൂക്ഷിക്കുക.", + "cleanup_step4_summary": "നിങ്ങളുടെ പ്രാദേശിക ഉപകരണത്തിൽ നിന്ന് നീക്കംചെയ്യുന്നതിന് {count} അസറ്റുകൾ ({date}-ന് മുമ്പ് സൃഷ്‌ടിച്ചത്). ഇമ്മിച്ച് ആപ്പിൽ നിന്ന് ഫോട്ടോകൾ തുടർന്നും ആക്‌സസ് ചെയ്യാനാകും.", + "cleanup_trash_hint": "സംഭരണ സ്ഥലം പൂർണ്ണമായി വീണ്ടെടുക്കാൻ, സിസ്റ്റം ഗാലറി ആപ്പ് തുറന്ന് ട്രാഷ് ശൂന്യമാക്കുക", "clear": "ക്ലിയർ ചെയ്യുക", "clear_all": "എല്ലാം ക്ലിയർ ചെയ്യുക", "clear_all_recent_searches": "അടുത്തിടെ നടത്തിയ എല്ലാ തിരയലുകളും ക്ലിയർ ചെയ്യുക", + "clear_failed_count": "മായ്‌ക്കാനായില്ല ({count})", "clear_file_cache": "ഫയൽ കാഷെ ക്ലിയർ ചെയ്യുക", "clear_message": "സന്ദേശം ക്ലിയർ ചെയ്യുക", "clear_value": "മൂല്യം ക്ലിയർ ചെയ്യുക", "client_cert_import": "ഇമ്പോർട്ട് ചെയ്യുക", "client_cert_import_success_msg": "ക്ലയിന്റ് സർട്ടിഫിക്കറ്റ് ഇമ്പോർട്ടുചെയ്‌തു", "client_cert_invalid_msg": "അസാധുവായ സർട്ടിഫിക്കറ്റ് ഫയൽ അല്ലെങ്കിൽ തെറ്റായ പാസ്‌വേഡ്", + "client_cert_password_message": "ഈ സർട്ടിഫിക്കറ്റിൻ്റെ പാസ്‌വേഡ് നൽകുക", + "client_cert_password_title": "സർട്ടിഫിക്കറ്റ് പാസ്‌വേഡ്", "client_cert_remove_msg": "ക്ലയിന്റ് സർട്ടിഫിക്കറ്റ് നീക്കംചെയ്‌തു", "client_cert_subtitle": "PKCS12 (.p12, .pfx) ഫോർമാറ്റ് മാത്രം പിന്തുണയ്ക്കുന്നു. ലോഗിൻ ചെയ്യുന്നതിന് മുമ്പ് മാത്രമേ സർട്ടിഫിക്കറ്റ് ഇമ്പോർട്ട്/നീക്കംചെയ്യൽ ലഭ്യമാകൂ", "client_cert_title": "SSL ക്ലയിന്റ് സർട്ടിഫിക്കറ്റ് [പരീക്ഷണാടിസ്ഥാനത്തിൽ]", @@ -631,12 +730,19 @@ "collapse": "ചുരുക്കുക", "collapse_all": "എല്ലാം ചുരുക്കുക", "color": "നിറം", + "command": "കമാൻഡ്", + "command_palette_prompt": "പേജുകളോ പ്രവർത്തനങ്ങളോ കമാൻഡുകളോ വേഗത്തിൽ കണ്ടെത്തുക", + "command_palette_to_close": "അടയ്ക്കാൻ", + "command_palette_to_navigate": "പ്രവേശിക്കാൻ", + "command_palette_to_select": "തിരഞ്ഞെടുക്കാൻ", + "command_palette_to_show_all": "എല്ലാം കാണിക്കാൻ", "comment_deleted": "അഭിപ്രായം ഇല്ലാതാക്കി", "comment_options": "അഭിപ്രായത്തിനുള്ള ഓപ്ഷനുകൾ", "comments_and_likes": "അഭിപ്രായങ്ങളും ലൈക്കുകളും", "comments_are_disabled": "അഭിപ്രായങ്ങൾ പ്രവർത്തനരഹിതമാക്കി", "common_create_new_album": "പുതിയ ആൽബം ഉണ്ടാക്കുക", "completed": "പൂർത്തിയായി", + "configuration": "കോൺഫിഗറേഷൻ", "confirm": "സ്ഥിരീകരിക്കുക", "confirm_admin_password": "അഡ്മിൻ പാസ്‌വേഡ് സ്ഥിരീകരിക്കുക", "confirm_delete_face": "{name} എന്ന മുഖം അസറ്റിൽ നിന്ന് ഇല്ലാതാക്കണമെന്ന് നിങ്ങൾക്ക് ഉറപ്പാണോ?", @@ -651,6 +757,7 @@ "contain": "ഉൾക്കൊള്ളുക", "context": "സന്ദർഭം", "continue": "തുടരുക", + "control_bottom_app_bar_add_tags": "ടാഗുകൾ ചേർക്കുക", "control_bottom_app_bar_delete_from_local": "ഉപകരണത്തിൽ നിന്ന് ഇല്ലാതാക്കുക", "control_bottom_app_bar_edit_location": "സ്ഥാനം എഡിറ്റുചെയ്യുക", "control_bottom_app_bar_edit_time": "തീയതിയും സമയവും എഡിറ്റുചെയ്യുക", @@ -659,6 +766,7 @@ "copied_to_clipboard": "ക്ലിപ്പ്ബോർഡിലേക്ക് പകർത്തി!", "copy_error": "പകർത്തുന്നതിൽ പിശക്", "copy_image": "ചിത്രം പകർത്തുക", + "copy_json": "JSON പകർത്തുക", "copy_link": "ലിങ്ക് പകർത്തുക", "copy_link_to_clipboard": "ലിങ്ക് ക്ലിപ്പ്ബോർഡിലേക്ക് പകർത്തുക", "copy_password": "പാസ്‌വേഡ് പകർത്തുക", @@ -670,6 +778,7 @@ "create_album": "ആൽബം ഉണ്ടാക്കുക", "create_album_page_untitled": "പേരില്ലാത്തത്", "create_api_key": "എപിഐ കീ സൃഷ്ടിക്കുക", + "create_first_workflow": "ആദ്യ വർക്ക്ഫ്ലോ സൃഷ്ടിക്കുക", "create_library": "ലൈബ്രറി ഉണ്ടാക്കുക", "create_link": "ലിങ്ക് ഉണ്ടാക്കുക", "create_link_to_share": "പങ്കിടാൻ ലിങ്ക് ഉണ്ടാക്കുക", @@ -678,33 +787,46 @@ "create_new_person": "പുതിയ വ്യക്തിയെ ഉണ്ടാക്കുക", "create_new_person_hint": "തിരഞ്ഞെടുത്ത അസറ്റുകൾ ഒരു പുതിയ വ്യക്തിക്ക് നൽകുക", "create_new_user": "പുതിയ ഉപയോക്താവിനെ ഉണ്ടാക്കുക", + "create_person": "വ്യക്തിയെ സൃഷ്ടിക്കുക", + "create_person_subtitle": "പുതിയ വ്യക്തിയെ സൃഷ്‌ടിക്കാനും ടാഗുചെയ്യാനും തിരഞ്ഞെടുത്ത മുഖത്തേക്ക് ഒരു പേര് ചേർക്കുക", "create_shared_album_page_share_add_assets": "അസറ്റുകൾ ചേർക്കുക", "create_shared_album_page_share_select_photos": "ഫോട്ടോകൾ തിരഞ്ഞെടുക്കുക", "create_shared_link": "പങ്കിട്ട ലിങ്ക് ഉണ്ടാക്കുക", "create_tag": "ടാഗ് ഉണ്ടാക്കുക", "create_tag_description": "ഒരു പുതിയ ടാഗ് ഉണ്ടാക്കുക. നെസ്റ്റഡ് ടാഗുകൾക്കായി, ഫോർവേഡ് സ്ലാഷുകൾ ഉൾപ്പെടെ ടാഗിന്റെ പൂർണ്ണ പാത നൽകുക.", "create_user": "ഉപയോക്താവിനെ ഉണ്ടാക്കുക", + "create_workflow": "വർക്ക്ഫ്ലോ സൃഷ്ടിക്കുക", "created": "സൃഷ്ടിച്ചത്", "created_at": "സൃഷ്ടിച്ചത്", "creating_linked_albums": "ബന്ധിപ്പിച്ച ആൽബങ്ങൾ ഉണ്ടാക്കുന്നു...", "crop": "ക്രോപ്പ് ചെയ്യുക", + "crop_aspect_ratio_free": "സൗജന്യം", + "crop_aspect_ratio_original": "ഒറിജിനൽ", + "crop_aspect_ratio_square": "സമചതുരം", "current_device": "നിലവിലെ ഉപകരണം", "current_pin_code": "നിലവിലെ പിൻ കോഡ്", "current_server_address": "നിലവിലെ സെർവർ വിലാസം", + "custom_date": "ഇഷ്ടാനുസൃത തീയതി", "custom_locale": "കസ്റ്റം ലൊക്കേൽ", "custom_locale_description": "ഭാഷയെയും പ്രദേശത്തെയും അടിസ്ഥാനമാക്കി തീയതികളും അക്കങ്ങളും ഫോർമാറ്റ് ചെയ്യുക", - "custom_url": "കസ്റ്റം URL", + "cutoff_date_description": "അവസാനത്തെ ഫോട്ടോകൾ സൂക്ഷിക്കുക…", + "cutoff_day": "{count, plural, one {ദിവസം} other {ദിവസങ്ങൾ}}", + "cutoff_year": "{count, plural, one {വർഷം} other {വർഷങ്ങൾ}}", "dark": "ഇരുണ്ടത്", "dark_theme": "ഡാർക്ക് തീം ടോഗിൾ ചെയ്യുക", "date": "തീയതി", "date_after": "ഇതിനു ശേഷമുള്ള തീയതി", "date_and_time": "തീയതിയും സമയവും", "date_before": "ഇതിനു മുമ്പുള്ള തീയതി", + "date_of_birth": "ജനനത്തീയതി", "date_of_birth_saved": "ജനനത്തീയതി വിജയകരമായി സേവ് ചെയ്തു", "date_range": "തീയതി പരിധി", + "date_time_original": "യഥാർത്ഥ തീയതി/സമയം", "day": "ദിവസം", "days": "ദിവസങ്ങൾ", "deduplicate_all": "എല്ലാ ഡ്യൂപ്ലിക്കേറ്റുകളും ഒഴിവാക്കുക", + "default_quality_subtitle": "പങ്കിടൽ ടാപ്പുചെയ്യുമ്പോൾ ഉപയോഗിക്കുന്ന ഗുണനിലവാരം. ഓരോ തവണയും തിരഞ്ഞെടുക്കാൻ പങ്കിടൽ ബട്ടൺ ദീർഘനേരം അമർത്തുക.", + "default_share_quality": "ഡിഫോൾട്ട് ഷെയർ ക്വാളിറ്റി", "delete": "ഇല്ലാതാക്കുക", "delete_action_confirmation_message": "ഈ അസറ്റ് ഇല്ലാതാക്കണമെന്ന് നിങ്ങൾക്ക് ഉറപ്പാണോ? ഈ പ്രവർത്തനം അസറ്റിനെ സെർവറിന്റെ ട്രാഷിലേക്ക് മാറ്റും, കൂടാതെ ഇത് പ്രാദേശികമായി ഇല്ലാതാക്കണോ എന്ന് ചോദിക്കുകയും ചെയ്യും", "delete_action_prompt": "{count} എണ്ണം ഇല്ലാതാക്കി", @@ -735,6 +857,7 @@ "deselect_all": "എല്ലാം തിരഞ്ഞെടുത്തത് മാറ്റുക", "details": "വിശദാംശങ്ങൾ", "direction": "ദിശ", + "disable": "പ്രവർത്തനരഹിതമാക്കുക", "disabled": "പ്രവർത്തനരഹിതം", "discord": "ഡിസ്കോർഡ്", "discover": "കണ്ടെത്തുക", @@ -756,14 +879,19 @@ "download_include_embedded_motion_videos": "ഉൾച്ചേർത്ത വീഡിയോകൾ", "download_include_embedded_motion_videos_description": "ചലിക്കുന്ന ഫോട്ടോകളിൽ ഉൾച്ചേർത്ത വീഡിയോകൾ ഒരു പ്രത്യേക ഫയലായി ഉൾപ്പെടുത്തുക", "download_notfound": "ഡൗൺലോഡ് കണ്ടെത്തിയില്ല", + "download_original": "ഒറിജിനൽ ഡൗൺലോഡ് ചെയ്യുക", "download_paused": "ഡൗൺലോഡ് താൽക്കാലികമായി നിർത്തി", "download_settings": "ഡൗൺലോഡ് ക്രമീകരണങ്ങൾ", "download_settings_description": "അസറ്റ് ഡൗൺലോഡുമായി ബന്ധപ്പെട്ട ക്രമീകരണങ്ങൾ കൈകാര്യം ചെയ്യുക", "download_waiting_to_retry": "വീണ്ടും ശ്രമിക്കാൻ കാത്തിരിക്കുന്നു", "downloading": "ഡൗൺലോഡ് ചെയ്യുന്നു", "downloading_asset_filename": "{filename} എന്ന അസറ്റ് ഡൗൺലോഡ് ചെയ്യുന്നു", + "downloading_from_icloud": "iCloud-ൽ നിന്ന് ഡൗൺലോഡ് ചെയ്യുന്നു", "downloading_media": "മീഡിയ ഡൗൺലോഡ് ചെയ്യുന്നു", + "drag_to_reorder": "പുനഃക്രമീകരിക്കാൻ വലിച്ചിടുക", "drop_files_to_upload": "അപ്‌ലോഡ് ചെയ്യാൻ ഫയലുകൾ എവിടെയും ഡ്രോപ്പ് ചെയ്യുക", + "duplicate": "ഡ്യൂപ്ലിക്കേറ്റ്", + "duplicate_workflow": "ഡ്യൂപ്ലിക്കേറ്റ് വർക്ക്ഫ്ലോ", "duplicates": "ഡ്യൂപ്ലിക്കേറ്റുകൾ", "duplicates_description": "ഏതാണ് ഡ്യൂപ്ലിക്കേറ്റ് എന്ന് സൂചിപ്പിച്ച് ഓരോ ഗ്രൂപ്പും പരിഹരിക്കുക", "duration": "ദൈർഘ്യം", @@ -788,7 +916,21 @@ "edit_tag": "ടാഗ് എഡിറ്റുചെയ്യുക", "edit_title": "ശീർഷകം എഡിറ്റുചെയ്യുക", "edit_user": "ഉപയോക്താവിനെ എഡിറ്റുചെയ്യുക", + "edit_workflow": "വർക്ക്ഫ്ലോ എഡിറ്റ് ചെയ്യുക", "editor": "എഡിറ്റർ", + "editor_discard_edits_confirm": "എഡിറ്റുകൾ നിരസിക്കുക", + "editor_discard_edits_prompt": "നിങ്ങൾക്ക് സംരക്ഷിക്കാത്ത എഡിറ്റുകൾ ഉണ്ട്. അവ ഉപേക്ഷിക്കണമെന്ന് തീർച്ചയാണോ?", + "editor_discard_edits_title": "എഡിറ്റുകൾ നിരസിക്കണോ?", + "editor_edits_applied_error": "എഡിറ്റുകൾ പ്രയോഗിക്കുന്നതിൽ പരാജയപ്പെട്ടു", + "editor_edits_applied_success": "എഡിറ്റുകൾ വിജയകരമായി പ്രയോഗിച്ചു", + "editor_flip_horizontal": "തിരശ്ചീനമായി തിരിക്കുക", + "editor_flip_vertical": "ലംബമായി ഫ്ലിപ്പുചെയ്യുക", + "editor_handle_corner": "{corner, select, top_left {മുകളിൽ-ഇടത്} top_right {മുകളിൽ-വലത്} bottom_left {താഴെ-ഇടത്} bottom_right {താഴെ-വലത്} other {ഒരു}} കോർണർ ഹാൻഡിൽ", + "editor_handle_edge": "{edge, select, top {മുകളിൽ} bottom {താഴെ} left {ഇടത്} right {വലത്} other {ഒരു}} എഡ്ജ് ഹാൻഡിൽ", + "editor_orientation": "ഓറിയൻ്റേഷൻ", + "editor_reset_all_changes": "മാറ്റങ്ങൾ പുനഃസജ്ജമാക്കുക", + "editor_rotate_left": "എതിർ ഘടികാരദിശയിൽ 90° തിരിക്കുക", + "editor_rotate_right": "ഘടികാരദിശയിൽ 90° തിരിക്കുക", "email": "ഇമെയിൽ", "email_notifications": "ഇമെയിൽ അറിയിപ്പുകൾ", "empty_folder": "ഈ ഫോൾഡർ ശൂന്യമാണ്", @@ -805,11 +947,14 @@ "enter_your_pin_code_subtitle": "ലോക്ക് ചെയ്ത ഫോൾഡർ ആക്‌സസ് ചെയ്യാൻ നിങ്ങളുടെ പിൻ കോഡ് നൽകുക", "error": "പിശക്", "error_delete_face": "അസറ്റിൽ നിന്ന് മുഖം ഇല്ലാതാക്കുന്നതിൽ പിശക്", + "error_loading_albums": "ആൽബങ്ങൾ ലോഡുചെയ്യുന്നതിൽ പിശക്", "error_loading_image": "ചിത്രം ലോഡുചെയ്യുന്നതിൽ പിശക്", "error_loading_partners": "പങ്കാളികളെ ലോഡുചെയ്യുന്നതിൽ പിശക്: {error}", + "error_retrieving_asset_information": "അസറ്റ് വിവരങ്ങൾ വീണ്ടെടുക്കുന്നതിൽ പിശക്", "error_saving_image": "പിശക്: {error}", "error_tag_face_bounding_box": "മുഖം ടാഗ് ചെയ്യുന്നതിൽ പിശക് - ബൗണ്ടിംഗ് ബോക്സ് കോർഡിനേറ്റുകൾ ലഭിക്കുന്നില്ല", "error_title": "പിശക് - എന്തോ കുഴപ്പം സംഭവിച്ചു", + "error_while_navigating": "അസറ്റിലേക്ക് നാവിഗേറ്റ് ചെയ്യുമ്പോൾ പിശക്", "errors": { "cannot_navigate_next_asset": "അടുത്ത അസറ്റിലേക്ക് പോകാൻ കഴിയില്ല", "cannot_navigate_previous_asset": "മുമ്പത്തെ അസറ്റിലേക്ക് പോകാൻ കഴിയില്ല", @@ -841,10 +986,12 @@ "failed_to_remove_product_key": "പ്രൊഡക്റ്റ് കീ നീക്കം ചെയ്യുന്നതിൽ പരാജയപ്പെട്ടു", "failed_to_reset_pin_code": "പിൻ കോഡ് റീസെറ്റ് ചെയ്യുന്നതിൽ പരാജയപ്പെട്ടു", "failed_to_stack_assets": "അസറ്റുകൾ സ്റ്റാക്ക് ചെയ്യുന്നതിൽ പരാജയപ്പെട്ടു", + "failed_to_tag_assets": "അസറ്റുകൾ ടാഗ് ചെയ്യുന്നതിൽ പരാജയപ്പെട്ടു", "failed_to_unstack_assets": "അസറ്റുകൾ അൺ-സ്റ്റാക്ക് ചെയ്യുന്നതിൽ പരാജയപ്പെട്ടു", "failed_to_update_notification_status": "അറിയിപ്പിന്റെ നില അപ്ഡേറ്റ് ചെയ്യുന്നതിൽ പരാജയപ്പെട്ടു", "incorrect_email_or_password": "തെറ്റായ ഇമെയിൽ അല്ലെങ്കിൽ പാസ്‌വേഡ്", "library_folder_already_exists": "ഈ ഇമ്പോർട്ട് പാത്ത് നിലവിലുണ്ട്.", + "page_not_found": "പേജ് കണ്ടെത്തിയില്ല", "paths_validation_failed": "{paths, plural, one {# പാത്ത്} other {# പാത്തുകൾ}} സാധൂകരണത്തിൽ പരാജയപ്പെട്ടു", "profile_picture_transparent_pixels": "പ്രൊഫൈൽ ചിത്രങ്ങൾക്ക് സുതാര്യമായ പിക്സലുകൾ ഉണ്ടാകരുത്. ദയവായി സൂം ഇൻ ചെയ്യുക കൂടാതെ/അല്ലെങ്കിൽ ചിത്രം നീക്കുക.", "quota_higher_than_disk_size": "ഡിസ്ക് വലുപ്പത്തേക്കാൾ ഉയർന്ന ക്വാട്ട നിങ്ങൾ സജ്ജമാക്കിയിരിക്കുന്നു", @@ -867,6 +1014,7 @@ "unable_to_complete_oauth_login": "OAuth ലോഗിൻ പൂർത്തിയാക്കാൻ കഴിയില്ല", "unable_to_connect": "ബന്ധിപ്പിക്കാൻ കഴിയില്ല", "unable_to_copy_to_clipboard": "ക്ലിപ്പ്ബോർഡിലേക്ക് പകർത്താൻ കഴിയില്ല, നിങ്ങൾ https വഴിയാണ് പേജ് ആക്‌സസ് ചെയ്യുന്നതെന്ന് ഉറപ്പാക്കുക", + "unable_to_create": "വർക്ക്ഫ്ലോ സൃഷ്‌ടിക്കാനായില്ല", "unable_to_create_admin_account": "അഡ്മിൻ അക്കൗണ്ട് ഉണ്ടാക്കാൻ കഴിയില്ല", "unable_to_create_api_key": "പുതിയ API കീ ഉണ്ടാക്കാൻ കഴിയില്ല", "unable_to_create_library": "ലൈബ്രറി ഉണ്ടാക്കാൻ കഴിയില്ല", @@ -877,6 +1025,7 @@ "unable_to_delete_exclusion_pattern": "ഒഴിവാക്കൽ പാറ്റേൺ ഇല്ലാതാക്കാൻ കഴിയില്ല", "unable_to_delete_shared_link": "പങ്കിട്ട ലിങ്ക് ഇല്ലാതാക്കാൻ കഴിയില്ല", "unable_to_delete_user": "ഉപയോക്താവിനെ ഇല്ലാതാക്കാൻ കഴിയില്ല", + "unable_to_delete_workflow": "വർക്ക്ഫ്ലോ ഇല്ലാതാക്കാൻ കഴിയുന്നില്ല", "unable_to_download_files": "ഫയലുകൾ ഡൗൺലോഡ് ചെയ്യാൻ കഴിയില്ല", "unable_to_edit_exclusion_pattern": "ഒഴിവാക്കൽ പാറ്റേൺ എഡിറ്റുചെയ്യാൻ കഴിയില്ല", "unable_to_empty_trash": "ട്രാഷ് ശൂന്യമാക്കാൻ കഴിയില്ല", @@ -916,6 +1065,7 @@ "unable_to_scan_library": "ലൈബ്രറി സ്കാൻ ചെയ്യാൻ കഴിയില്ല", "unable_to_set_feature_photo": "ഫീച്ചർ ഫോട്ടോ സജ്ജമാക്കാൻ കഴിയില്ല", "unable_to_set_profile_picture": "പ്രൊഫൈൽ ചിത്രം സജ്ജമാക്കാൻ കഴിയില്ല", + "unable_to_set_rating": "റേറ്റിംഗ് സജ്ജീകരിക്കാനായില്ല", "unable_to_submit_job": "ജോലി സമർപ്പിക്കാൻ കഴിയില്ല", "unable_to_trash_asset": "അസറ്റ് ട്രാഷ് ചെയ്യാൻ കഴിയില്ല", "unable_to_unlink_account": "അക്കൗണ്ട് അൺലിങ്ക് ചെയ്യാൻ കഴിയില്ല", @@ -927,14 +1077,17 @@ "unable_to_update_settings": "ക്രമീകരണങ്ങൾ അപ്ഡേറ്റ് ചെയ്യാൻ കഴിയില്ല", "unable_to_update_timeline_display_status": "ടൈംലൈൻ പ്രദർശന നില അപ്ഡേറ്റ് ചെയ്യാൻ കഴിയില്ല", "unable_to_update_user": "ഉപയോക്താവിനെ അപ്ഡേറ്റ് ചെയ്യാൻ കഴിയില്ല", + "unable_to_update_workflow": "വർക്ക്ഫ്ലോ അപ്ഡേറ്റ് ചെയ്യാനാവുന്നില്ല", "unable_to_upload_file": "ഫയൽ അപ്‌ലോഡ് ചെയ്യാൻ കഴിയില്ല" }, + "errors_text": "പിശകുകൾ", "exclusion_pattern": "ഒഴിവാക്കൽ പാറ്റേൺ", "exif": "Exif", "exif_bottom_sheet_description": "വിവരണം ചേർക്കുക...", "exif_bottom_sheet_description_error": "വിവരണം അപ്ഡേറ്റ് ചെയ്യുന്നതിൽ പിശക്", "exif_bottom_sheet_no_description": "വിവരണമില്ല", "exit_slideshow": "സ്ലൈഡ്‌ഷോയിൽ നിന്ന് പുറത്തുകടക്കുക", + "expand": "വികസിപ്പിക്കുക", "expand_all": "എല്ലാം വികസിപ്പിക്കുക", "expire_after": "ഇതിന് ശേഷം കാലഹരണപ്പെടും", "expired": "കാലഹരണപ്പെട്ടു", @@ -945,14 +1098,18 @@ "export_as_json": "JSON ആയി കയറ്റുമതി ചെയ്യുക", "export_database": "ഡാറ്റാബേസ് കയറ്റുമതി ചെയ്യുക", "export_database_description": "SQLite ഡാറ്റാബേസ് കയറ്റുമതി ചെയ്യുക", + "exposure_time": "സമ്പർക്ക സമയം", "extension": "എക്സ്റ്റൻഷൻ", "external": "ബാഹ്യം", "external_libraries": "ബാഹ്യ ലൈബ്രറികൾ", "external_network": "ബാഹ്യ നെറ്റ്‌വർക്ക്", "external_network_sheet_info": "തിരഞ്ഞെടുത്ത വൈ-ഫൈ നെറ്റ്‌വർക്കിൽ അല്ലാത്തപ്പോൾ, താഴെ നൽകിയിട്ടുള്ള URL-കളിൽ ആദ്യം ലഭ്യമാകുന്ന ഒന്നിലൂടെ, മുകളിൽ നിന്ന് താഴേക്കുള്ള ക്രമത്തിൽ, ആപ്പ് സെർവറുമായി ബന്ധിപ്പിക്കും", + "f_number": "എഫ്-നമ്പർ", "face_unassigned": "അസൈൻ ചെയ്തിട്ടില്ല", "failed": "പരാജയപ്പെട്ടു", + "failed_count": "പരാജയപ്പെട്ടു: {count}", "failed_to_authenticate": "പ്രാമാണീകരിക്കുന്നതിൽ പരാജയപ്പെട്ടു", + "failed_to_delete_file": "ഫയൽ ഇല്ലാതാക്കുന്നതിൽ പരാജയപ്പെട്ടു", "failed_to_load_assets": "അസറ്റുകൾ ലോഡുചെയ്യുന്നതിൽ പരാജയപ്പെട്ടു", "failed_to_load_folder": "ഫോൾഡർ ലോഡുചെയ്യുന്നതിൽ പരാജയപ്പെട്ടു", "favorite": "പ്രിയം", @@ -963,26 +1120,35 @@ "features": "ഫീച്ചറുകൾ", "features_setting_description": "ആപ്പ് ഫീച്ചറുകൾ കൈകാര്യം ചെയ്യുക", "file_name_or_extension": "ഫയലിന്റെ പേര് അല്ലെങ്കിൽ എക്സ്റ്റൻഷൻ", + "file_name_text": "ഫയലിന്റെ പേര്", "file_size": "ഫയൽ വലിപ്പം", "filename": "ഫയൽനാമം", "filetype": "ഫയൽ തരം", "filter": "ഫിൽട്ടർ ചെയ്യുക", "filter_people": "ആളുകളെ ഫിൽട്ടർ ചെയ്യുക", "filter_places": "സ്ഥലങ്ങൾ ഫിൽട്ടർ ചെയ്യുക", + "filter_tags": "ടാഗുകൾ ഫിൽട്ടർ ചെയ്യുക", + "filters": "ഫിൽട്ടറുകൾ", "first": "ആദ്യം", "fix_incorrect_match": "തെറ്റായ പൊരുത്തം ശരിയാക്കുക", + "focal_length": "ഫോക്കൽ ലെങ്ത്", "folder": "ഫോൾഡർ", "folder_not_found": "ഫോൾഡർ കണ്ടെത്തിയില്ല", "folders": "ഫോൾഡറുകൾ", "folders_feature_description": "ഫയൽ സിസ്റ്റത്തിലെ ഫോട്ടോകൾക്കും വീഡിയോകൾക്കുമായി ഫോൾഡർ കാഴ്‌ച ബ്രൗസുചെയ്യുന്നു", "forgot_pin_code_question": "നിങ്ങളുടെ പിൻ മറന്നോ?", "forward": "മുന്നോട്ട്", + "free_up_space": "ഇടം ശൂന്യമാക്കുക", + "free_up_space_description": "ഇടം സൃഷ്‌ടിക്കാൻ ബാക്കപ്പ് ചെയ്‌ത ഫോട്ടോകളും വീഡിയോകളും നിങ്ങളുടെ ഉപകരണത്തിൻ്റെ ട്രാഷിലേക്ക് നീക്കുക. സെർവറിലെ നിങ്ങളുടെ പകർപ്പുകൾ സുരക്ഷിതമായി തുടരുന്നു.", + "free_up_space_settings_subtitle": "ഉപകരണ സംഭരണം ശൂന്യമാക്കുക", "full_path": "മുഴുവൻ പാത്ത്: {path}", + "full_path_or_folder": "മുഴുവൻ പാത അല്ലെങ്കിൽ ഫോൾഡർ", "gcast_enabled": "ഗൂഗിൾ കാസ്റ്റ്", "gcast_enabled_description": "പ്രവർത്തിക്കുന്നതിനായി ഈ ഫീച്ചർ ഗൂഗിളിൽ നിന്ന് ബാഹ്യ ഉറവിടങ്ങൾ ലോഡുചെയ്യുന്നു.", "general": "പൊതുവായത്", "geolocation_instruction_location": "ലൊക്കേഷൻ ഉപയോഗിക്കുന്നതിന് GPS കോർഡിനേറ്റുകളുള്ള ഒരു അസറ്റിൽ ക്ലിക്കുചെയ്യുക, അല്ലെങ്കിൽ മാപ്പിൽ നിന്ന് നേരിട്ട് ഒരു സ്ഥലം തിരഞ്ഞെടുക്കുക", "get_help": "സഹായം നേടുക", + "get_people_error": "ആളുകളെ കിട്ടുന്നതിൽ പിശക്", "get_wifiname_error": "വൈ-ഫൈയുടെ പേര് ലഭിച്ചില്ല. നിങ്ങൾ ആവശ്യമായ അനുമതികൾ നൽകിയിട്ടുണ്ടെന്നും ഒരു വൈ-ഫൈ നെറ്റ്‌വർക്കിലേക്ക് കണക്റ്റുചെയ്‌തിട്ടുണ്ടെന്നും ഉറപ്പാക്കുക", "getting_started": "ആരംഭിക്കുന്നു", "go_back": "പിന്നോട്ട് പോകുക", @@ -1007,12 +1173,14 @@ "header_settings_header_name_input": "ഹെഡറിന്റെ പേര്", "header_settings_header_value_input": "ഹെഡറിന്റെ മൂല്യം", "headers_settings_tile_title": "കസ്റ്റം പ്രോക്സി ഹെഡറുകൾ", + "height": "ഉയരം", "hi_user": "നമസ്കാരം {name} ({email})", "hide_all_people": "എല്ലാ ആളുകളെയും മറയ്ക്കുക", "hide_gallery": "ഗാലറി മറയ്ക്കുക", "hide_named_person": "{name} എന്ന വ്യക്തിയെ മറയ്ക്കുക", "hide_password": "പാസ്‌വേഡ് മറയ്ക്കുക", "hide_person": "വ്യക്തിയെ മറയ്ക്കുക", + "hide_schema": "സ്കീമ മറയ്ക്കുക", "hide_text_recognition": "ടെക്സ്റ്റ് തിരിച്ചറിയൽ മറയ്ക്കുക", "hide_unnamed_people": "പേരില്ലാത്ത ആളുകളെ മറയ്ക്കുക", "home_page_building_timeline": "ടൈംലൈൻ നിർമ്മിക്കുന്നു", @@ -1046,6 +1214,7 @@ "individual_share": "വ്യക്തിഗത പങ്കിടൽ", "individual_shares": "വ്യക്തിഗത പങ്കിടലുകൾ", "info": "വിവരങ്ങൾ", + "integrity_checks": "സമഗ്രത പരിശോധനകൾ", "interval": { "day_at_onepm": "എല്ലാ ദിവസവും ഉച്ചയ്ക്ക് 1 മണിക്ക്", "hours": "{hours, plural, one {ഓരോ മണിക്കൂറിലും} other {ഓരോ {hours, number} മണിക്കൂറിലും}}", @@ -1056,11 +1225,19 @@ "invalid_date_format": "അസാധുവായ തീയതി ഫോർമാറ്റ്", "invite_people": "ആളുകളെ ക്ഷണിക്കുക", "invite_to_album": "ആൽബത്തിലേക്ക് ക്ഷണിക്കുക", + "iso": "ഐഎസ്ഒ", "items_count": "{count, plural, one {# ഇനം} other {# ഇനങ്ങൾ}}", "jobs": "ജോലികൾ", "keep": "സൂക്ഷിക്കുക", + "keep_albums": "ആൽബങ്ങൾ സൂക്ഷിക്കുക", + "keep_albums_count": "{count} {count, plural, one {ആൽബം} other {ആൽബങ്ങൾ}} നിലനിർത്തുന്നു", "keep_all": "എല്ലാം സൂക്ഷിക്കുക", + "keep_description": "ഇടം സൃഷ്‌ടിക്കുമ്പോൾ നിങ്ങളുടെ ഉപകരണത്തിൽ എന്താണ് നിലനിൽക്കേണ്ടതെന്ന് തിരഞ്ഞെടുക്കുക.", + "keep_favorites": "പ്രിയപ്പെട്ടവ സൂക്ഷിക്കുക", + "keep_on_device": "ഉപകരണത്തിൽ സൂക്ഷിക്കുക", + "keep_on_device_hint": "ഈ ഉപകരണത്തിൽ സൂക്ഷിക്കാൻ ഇനങ്ങൾ തിരഞ്ഞെടുക്കുക", "keep_this_delete_others": "ഇത് സൂക്ഷിച്ച് മറ്റുള്ളവ ഇല്ലാതാക്കുക", + "keeping": "സൂക്ഷിക്കുന്നത്: {items}", "kept_this_deleted_others": "ഈ അസറ്റ് സൂക്ഷിക്കുകയും {count, plural, one {# അസറ്റ്} other {# അസറ്റുകൾ}} ഇല്ലാതാക്കുകയും ചെയ്തു", "keyboard_shortcuts": "കീബോർഡ് കുറുക്കുവഴികൾ", "language": "ഭാഷ", @@ -1077,6 +1254,7 @@ "leave": "വിടുക", "leave_album": "ആൽബം വിടുക", "lens_model": "ലെൻസ് മോഡൽ", + "less": "കുറവ്", "let_others_respond": "മറ്റുള്ളവരെ പ്രതികരിക്കാൻ അനുവദിക്കുക", "level": "തലം", "library": "ലൈബ്രറി", @@ -1088,17 +1266,23 @@ "library_page_sort_title": "ആൽബത്തിന്റെ ശീർഷകം", "licenses": "ലൈസൻസുകൾ", "light": "ലൈറ്റ്", + "light_theme": "ലൈറ്റ് തീമിലേക്ക് മാറുക", "like": "ഇഷ്ടപ്പെട്ടു", "like_deleted": "ഇഷ്ടം നീക്കംചെയ്തു", + "link": "ലിങ്ക്", "link_motion_video": "ചലിക്കുന്ന വീഡിയോ ലിങ്ക് ചെയ്യുക", + "link_to_docs": "കൂടുതൽ വിവരങ്ങൾക്ക്, ഡോക്യുമെൻ്റേഷൻ കാണുക.", "link_to_oauth": "OAuth-ലേക്ക് ലിങ്ക് ചെയ്യുക", "linked_oauth_account": "ലിങ്ക് ചെയ്ത OAuth അക്കൗണ്ട്", "list": "ലിസ്റ്റ്", + "live": "തത്സമയം", + "load_more": "കൂടുതൽ ലോഡ് ചെയ്യുക", "loading": "ലോഡിംഗ്", "loading_search_results_failed": "തിരയൽ ഫലങ്ങൾ ലോഡുചെയ്യുന്നതിൽ പരാജയപ്പെട്ടു", "local": "പ്രാദേശികം", "local_asset_cast_failed": "സെർവറിലേക്ക് അപ്‌ലോഡ് ചെയ്യാത്ത ഒരു അസറ്റ് കാസ്റ്റ് ചെയ്യാൻ കഴിയില്ല", "local_assets": "പ്രാദേശിക അസറ്റുകൾ", + "local_id": "പ്രാദേശിക ഐഡി", "local_media_summary": "പ്രാദേശിക മീഡിയ സംഗ്രഹം", "local_network": "പ്രാദേശിക നെറ്റ്‌വർക്ക്", "local_network_sheet_info": "നിർദ്ദിഷ്‌ട വൈ-ഫൈ നെറ്റ്‌വർക്ക് ഉപയോഗിക്കുമ്പോൾ ഈ URL വഴി ആപ്പ് സെർവറുമായി ബന്ധിപ്പിക്കും", @@ -1147,9 +1331,27 @@ "loop_videos_description": "വിശദാംശ വ്യൂവറിൽ ഒരു വീഡിയോ യാന്ത്രികമായി ലൂപ്പ് ചെയ്യാൻ പ്രവർത്തനക്ഷമമാക്കുക.", "main_branch_warning": "നിങ്ങൾ ഒരു ഡെവലപ്‌മെന്റ് പതിപ്പാണ് ഉപയോഗിക്കുന്നത്; ഒരു റിലീസ് പതിപ്പ് ഉപയോഗിക്കാൻ ഞങ്ങൾ ശക്തമായി ശുപാർശ ചെയ്യുന്നു!", "main_menu": "പ്രധാന മെനു", + "maintenance_action_restore": "ഡാറ്റാബേസ് പുനഃസ്ഥാപിക്കുന്നു", "maintenance_description": "ഇമ്മിക്ക് മെയിന്റനൻസ് മോഡിലേക്ക് മാറ്റിയിരിക്കുന്നു.", "maintenance_end": "മെയിന്റനൻസ് മോഡ് അവസാനിപ്പിക്കുക", "maintenance_logged_in_as": "നിലവിൽ {user} ആയി ലോഗിൻ ചെയ്തിരിക്കുന്നു", + "maintenance_restore_from_backup": "ബാക്കപ്പിൽ നിന്ന് പുനഃസ്ഥാപിക്കുക", + "maintenance_restore_library": "നിങ്ങളുടെ ലൈബ്രറി പുനഃസ്ഥാപിക്കുക", + "maintenance_restore_library_confirm": "ഇത് ശരിയാണെന്ന് തോന്നുന്നുവെങ്കിൽ, ഒരു ബാക്കപ്പ് പുനഃസ്ഥാപിക്കുന്നത് തുടരുക!", + "maintenance_restore_library_description": "ഡാറ്റാബേസ് പുനഃസ്ഥാപിക്കുന്നു", + "maintenance_restore_library_folder_has_files": "{folder} എന്നതിന് {count} ഫോൾഡർ(കൾ) ഉണ്ട്", + "maintenance_restore_library_folder_no_files": "{folder} ഫയലുകൾ കാണുന്നില്ല!", + "maintenance_restore_library_folder_pass": "വായിക്കാവുന്നതും എഴുതാവുന്നതുമാണ്", + "maintenance_restore_library_folder_read_fail": "വായിക്കാനാവുന്നില്ല", + "maintenance_restore_library_folder_write_fail": "എഴുതാൻ പറ്റില്ല", + "maintenance_restore_library_hint_missing_files": "നിങ്ങൾക്ക് പ്രധാനപ്പെട്ട ഫയലുകൾ നഷ്‌ടമായേക്കാം", + "maintenance_restore_library_hint_regenerate_later": "നിങ്ങൾക്ക് ഇവ പിന്നീട് ക്രമീകരണങ്ങളിൽ പുനഃസൃഷ്ടിക്കാം", + "maintenance_restore_library_hint_storage_template_missing_files": "സ്റ്റോറേജ് ടെംപ്ലേറ്റ് ഉപയോഗിക്കുന്നുണ്ടോ? നിങ്ങൾക്ക് ഫയലുകൾ നഷ്‌ടമായേക്കാം", + "maintenance_restore_library_loading": "സമഗ്രത പരിശോധനകളും ഹ്യൂറിസ്റ്റിക്സും ലോഡുചെയ്യുന്നു…", + "maintenance_task_backup": "നിലവിലുള്ള ഡാറ്റാബേസിൻ്റെ ഒരു ബാക്കപ്പ് സൃഷ്ടിക്കുന്നു…", + "maintenance_task_migrations": "ഡാറ്റാബേസ് മൈഗ്രേഷനുകൾ പ്രവർത്തിപ്പിക്കുന്നു…", + "maintenance_task_restore": "തിരഞ്ഞെടുത്ത ബാക്കപ്പ് പുനഃസ്ഥാപിക്കുന്നു…", + "maintenance_task_rollback": "പുനഃസ്ഥാപിക്കൽ പരാജയപ്പെട്ടു, പോയിൻ്റ് പുനഃസ്ഥാപിക്കുന്നതിനായി തിരികെ പോകുന്നു…", "maintenance_title": "താൽക്കാലികമായി ലഭ്യമല്ല", "make": "നിർമ്മാതാവ്", "manage_geolocation": "സ്ഥാനം കൈകാര്യം ചെയ്യുക", @@ -1168,6 +1370,7 @@ "map_location_picker_page_use_location": "ഈ സ്ഥലം ഉപയോഗിക്കുക", "map_location_service_disabled_content": "നിങ്ങളുടെ നിലവിലെ സ്ഥാനത്ത് നിന്നുള്ള അസറ്റുകൾ പ്രദർശിപ്പിക്കുന്നതിന് ലൊക്കേഷൻ സേവനം പ്രവർത്തനക്ഷമമാക്കേണ്ടതുണ്ട്. ഇപ്പോൾ പ്രവർത്തനക്ഷമമാക്കണോ?", "map_location_service_disabled_title": "ലൊക്കേഷൻ സേവനം പ്രവർത്തനരഹിതമാക്കി", + "map_marker_for_image": "{city}, {country} എന്നതിൽ എടുത്ത ചിത്രത്തിനായുള്ള മാപ്പ് മാർക്കർ", "map_marker_with_image": "ചിത്രത്തോടുകൂടിയ മാപ്പ് മാർക്കർ", "map_no_location_permission_content": "നിങ്ങളുടെ നിലവിലെ സ്ഥാനത്ത് നിന്നുള്ള അസറ്റുകൾ പ്രദർശിപ്പിക്കുന്നതിന് ലൊക്കേഷൻ അനുമതി ആവശ്യമാണ്. ഇപ്പോൾ അനുവദിക്കണോ?", "map_no_location_permission_title": "ലൊക്കേഷൻ അനുമതി നിഷേധിച്ചു", @@ -1185,6 +1388,38 @@ "marked_all_as_read": "എല്ലാം വായിച്ചതായി അടയാളപ്പെടുത്തി", "matches": "ചേർച്ചകൾ", "matching_assets": "ചേർച്ചയുള്ള അസറ്റുകൾ", + "media_chrome": { + "auto": "ഓട്ടോ", + "captions": "അടിക്കുറിപ്പുകൾ", + "captions_off": "ഓഫ്", + "closed_captions": "അടഞ്ഞ അടിക്കുറിപ്പുകൾ", + "decode_error": "ഡീകോഡ് പിശക്", + "disable_captions": "അടിക്കുറിപ്പുകൾ പ്രവർത്തനരഹിതമാക്കുക", + "enable_captions": "അടിക്കുറിപ്പുകൾ പ്രവർത്തനക്ഷമമാക്കുക", + "enter_fullscreen_mode": "ഫുൾസ്ക്രീൻ മോഡ് നൽകുക", + "exit_fullscreen_mode": "പൂർണ്ണസ്‌ക്രീൻ മോഡിൽ നിന്ന് പുറത്തുകടക്കുക", + "loop": "ലൂപ്പ്", + "media_error_description": "ഒരു മീഡിയ പിശക് പ്ലേബാക്ക് നിർത്തലാക്കുന്നതിന് കാരണമായി. മീഡിയ കേടായേക്കാം അല്ലെങ്കിൽ നിങ്ങളുടെ ബ്രൗസർ ഈ ഫോർമാറ്റിനെ പിന്തുണയ്ക്കുന്നില്ല.", + "media_loading": "മീഡിയ ലോഡിംഗ്", + "mute": "നിശബ്ദമാക്കുക", + "network_error": "നെറ്റ്‌വർക്ക് പിശക്", + "network_error_description": "നെറ്റ്‌വർക്ക് പിശക് മീഡിയ ഡൗൺലോഡ് പരാജയപ്പെടാൻ കാരണമായി.", + "not_supported_error": "ഉറവിടം പിന്തുണയ്ക്കുന്നില്ല", + "playback_rate": "പ്ലേബാക്ക് നിരക്ക്", + "playback_rate_current": "നിലവിലെ പ്ലേബാക്ക് നിരക്ക്", + "playback_rate_value": "പ്ലേബാക്ക് നിരക്ക് {playbackRate}", + "playback_time": "പ്ലേബാക്ക് സമയം", + "quality": "ഗുണനിലവാരം", + "second": "രണ്ടാമത്തേത്", + "seconds": "സെക്കൻ്റുകൾ", + "time_value_of_total_time": "{currentTime} / {totalTime}", + "time_value_remaining": "{time} ശേഷിക്കുന്നു", + "unmute": "അൺമ്യൂട്ട് ചെയ്യുക", + "unsupported_error_description": "പിന്തുണയ്‌ക്കാത്ത ഒരു പിശക് സംഭവിച്ചു. സെർവറോ നെറ്റ്‌വർക്കോ പരാജയപ്പെട്ടു, അല്ലെങ്കിൽ നിങ്ങളുടെ ബ്രൗസർ ഈ ഫോർമാറ്റിനെ പിന്തുണയ്ക്കുന്നില്ല.", + "video_not_loaded_unknown_time": "വീഡിയോ ലോഡ് ചെയ്തിട്ടില്ല, അറിയാത്ത സമയം.", + "video_player": "വീഡിയോ പ്ലെയർ", + "volume": "വോളിയം" + }, "media_type": "മീഡിയ തരം", "memories": "ഓർമ്മകൾ", "memories_all_caught_up": "എല്ലാം കണ്ടുതീർത്തു", @@ -1201,6 +1436,8 @@ "merge_people_prompt": "ഈ ആളുകളെ ലയിപ്പിക്കണോ? ഈ പ്രവർത്തനം പഴയപടിയാക്കാൻ കഴിയില്ല.", "merge_people_successfully": "ആളുകളെ വിജയകരമായി ലയിപ്പിച്ചു", "merged_people_count": "{count, plural, one {# വ്യക്തിയെ ലയിപ്പിച്ചു} other {# ആളുകളെ ലയിപ്പിച്ചു}}", + "minFaces": "ഏറ്റവും കുറഞ്ഞ മുഖങ്ങൾ", + "minFaces_description": "ഒരു വ്യക്തിക്ക് പ്രദർശിപ്പിക്കാനുള്ള അംഗീകൃത മുഖങ്ങളുടെ ഏറ്റവും കുറഞ്ഞ എണ്ണം", "minimize": "ചെറുതാക്കുക", "minute": "മിനിറ്റ്", "minutes": "മിനിറ്റുകൾ", @@ -1208,19 +1445,25 @@ "mobile_app": "മൊബൈൽ ആപ്പ്", "mobile_app_download_onboarding_note": "താഴെ പറയുന്ന ഓപ്ഷനുകൾ ഉപയോഗിച്ച് മൊബൈൽ ആപ്പ് ഡൗൺലോഡ് ചെയ്യുക", "model": "മോഡൽ", + "modify_date": "തീയതി പരിഷ്കരിക്കുക", "month": "മാസം", "more": "കൂടുതൽ", + "motion": "ചലനം", "move": "നീക്കുക", "move_off_locked_folder": "ലോക്ക് ചെയ്ത ഫോൾഡറിൽ നിന്ന് മാറ്റുക", "move_to": "ഇതിലേക്ക് മാറ്റുക", + "move_to_device_trash": "ഉപകരണ ട്രാഷിലേക്ക് നീക്കുക", "move_to_lock_folder_action_prompt": "{count} എണ്ണം ലോക്ക് ചെയ്ത ഫോൾഡറിലേക്ക് ചേർത്തു", "move_to_locked_folder": "ലോക്ക് ചെയ്ത ഫോൾഡറിലേക്ക് മാറ്റുക", "move_to_locked_folder_confirmation": "ഈ ഫോട്ടോകളും വീഡിയോയും എല്ലാ ആൽബങ്ങളിൽ നിന്നും നീക്കം ചെയ്യപ്പെടും, ലോക്ക് ചെയ്ത ഫോൾഡറിൽ നിന്ന് മാത്രമേ കാണാൻ കഴിയൂ", "moved_to_trash": "ട്രാഷിലേക്ക് മാറ്റി", "mute_memories": "ഓർമ്മകൾ നിശ്ശബ്ദമാക്കുക", "my_albums": "എന്റെ ആൽബങ്ങൾ", + "my_immich_description": "നിലവിലെ പേജ് My Immich ലിങ്കായി പകർത്തുക", + "my_immich_title": "എൻ്റെ ഇമ്മിച്ച് ലിങ്ക്", "name": "പേര്", "name_or_nickname": "പേര് അല്ലെങ്കിൽ വിളിപ്പേര്", + "name_required": "പേര് ആവശ്യമാണ്", "navigate": "നാവിഗേറ്റ് ചെയ്യുക", "navigate_to_time": "സമയത്തിലേക്ക് നാവിഗേറ്റ് ചെയ്യുക", "network_requirement_photos_upload": "ഫോട്ടോകൾ ബാക്കപ്പ് ചെയ്യാൻ സെല്ലുലാർ ഡാറ്റ ഉപയോഗിക്കുക", @@ -1232,6 +1475,7 @@ "never": "ഒരിക്കലും ഇല്ല", "new_album": "പുതിയ ആൽബം", "new_api_key": "പുതിയ API കീ", + "new_feature": "പുതിയ ഫീച്ചർ", "new_password": "പുതിയ പാസ്‌വേഡ്", "new_person": "പുതിയ വ്യക്തി", "new_pin_code": "പുതിയ പിൻ കോഡ്", @@ -1243,6 +1487,7 @@ "next": "അടുത്തത്", "next_memory": "അടുത്ത ഓർമ്മ", "no": "ഇല്ല", + "no_albums_found": "ആൽബങ്ങളൊന്നും കണ്ടെത്തിയില്ല", "no_albums_message": "നിങ്ങളുടെ ഫോട്ടോകളും വീഡിയോകളും ക്രമീകരിക്കാൻ ഒരു ആൽബം ഉണ്ടാക്കുക", "no_albums_with_name_yet": "ഈ പേരിൽ നിങ്ങൾക്ക് ഇതുവരെ ആൽബങ്ങളൊന്നും ഇല്ലെന്ന് തോന്നുന്നു.", "no_albums_yet": "നിങ്ങൾക്ക് ഇതുവരെ ആൽബങ്ങളൊന്നും ഇല്ലെന്ന് തോന്നുന്നു.", @@ -1268,12 +1513,18 @@ "no_results": "ഫലങ്ങളൊന്നുമില്ല", "no_results_description": "ഒരു പര്യായപദമോ കൂടുതൽ പൊതുവായ കീവേഡോ ഉപയോഗിച്ച് ശ്രമിക്കുക", "no_shared_albums_message": "നിങ്ങളുടെ നെറ്റ്‌വർക്കിലെ ആളുകളുമായി ഫോട്ടോകളും വീഡിയോകളും പങ്കിടാൻ ഒരു ആൽബം ഉണ്ടാക്കുക", + "no_steps": "ഇതുവരെ ഘട്ടങ്ങളൊന്നും ചേർത്തിട്ടില്ല", + "none": "ഒന്നുമില്ല", "not_allowed": "അനുവദനീയമല്ല", "not_available": "ലഭ്യമല്ല", "not_in_any_album": "ഒരു ആൽബത്തിലുമില്ല", "not_selected": "തിരഞ്ഞെടുത്തിട്ടില്ല", "notes": "കുറിപ്പുകൾ", "nothing_here_yet": "ഇവിടെ ഇതുവരെ ഒന്നുമില്ല", + "notification_backup_reliability": "പശ്ചാത്തല ബാക്കപ്പ് വിശ്വാസ്യത മെച്ചപ്പെടുത്താൻ അറിയിപ്പുകൾ പ്രവർത്തനക്ഷമമാക്കുക", + "notification_enabled_list_tile_content": "പശ്ചാത്തല ബാക്കപ്പിനായി ഇമ്മിച്ച് അറിയിപ്പുകൾ ഉപയോഗിക്കുന്നു. നിങ്ങളുടെ ഉപകരണ ക്രമീകരണങ്ങളിൽ അവ നിയന്ത്രിക്കുക.", + "notification_enabled_list_tile_open_button": "ക്രമീകരണങ്ങൾ തുറക്കുക", + "notification_enabled_list_tile_title": "അറിയിപ്പുകൾ പ്രവർത്തനക്ഷമമാക്കി", "notification_permission_dialog_content": "അറിയിപ്പുകൾ പ്രവർത്തനക്ഷമമാക്കാൻ, ക്രമീകരണങ്ങളിലേക്ക് പോയി 'അനുവദിക്കുക' തിരഞ്ഞെടുക്കുക.", "notification_permission_list_tile_content": "അറിയിപ്പുകൾ പ്രവർത്തനക്ഷമമാക്കാൻ അനുമതി നൽകുക.", "notification_permission_list_tile_enable_button": "അറിയിപ്പുകൾ പ്രവർത്തനക്ഷമമാക്കുക", @@ -1285,6 +1536,8 @@ "obtainium_configurator": "ഒബ്‌റ്റൈനിയം കോൺഫിഗറേറ്റർ", "obtainium_configurator_instructions": "ഇമ്മിക്ക് ഗിറ്റ്ഹബ് റിലീസിൽ നിന്ന് നേരിട്ട് ആൻഡ്രോയിഡ് ആപ്പ് ഇൻസ്റ്റാൾ ചെയ്യാനും അപ്‌ഡേറ്റ് ചെയ്യാനും ഒബ്‌റ്റൈനിയം ഉപയോഗിക്കുക. ഒരു എപിഐ കീ സൃഷ്ടിച്ച് നിങ്ങളുടെ ഒബ്‌റ്റൈനിയം കോൺഫിഗറേഷൻ ലിങ്ക് സൃഷ്ടിക്കാൻ ഒരു വേരിയന്റ് തിരഞ്ഞെടുക്കുക", "ocr": "ഒ.സി.ആർ (OCR)", + "ocr_body": "ഇമ്മിച്ച് ഇപ്പോൾ നിങ്ങളുടെ ഫോട്ടോകൾക്കുള്ളിലെ വാചകം വായിക്കുന്നു, അതിനാൽ അവർ പറയുന്നതനുസരിച്ച് നിങ്ങൾക്ക് അവ തിരയാനാകും.", + "ocr_title": "നിങ്ങളുടെ ഫോട്ടോകളിൽ ടെക്സ്റ്റ് തിരയുക", "official_immich_resources": "Immich-ന്റെ ഔദ്യോഗിക ഉറവിടങ്ങൾ", "offline": "ഓഫ്‌ലൈൻ", "offset": "ഓഫ്സെറ്റ്", @@ -1301,6 +1554,10 @@ "online": "ഓൺലൈൻ", "only_favorites": "പ്രിയപ്പെട്ടവ മാത്രം", "open": "തുറക്കുക", + "open_calendar": "കലണ്ടർ തുറക്കുക", + "open_in_browser": "ബ്രൗസറിൽ തുറക്കുക", + "open_in_immich_body": "മറ്റ് ആപ്പുകളിൽ നിന്ന് നേരിട്ട് ഫോട്ടോകൾ തുറക്കാൻ ആൻഡ്രോയിഡിൽ നിങ്ങളുടെ ഗാലറിയായി Immich സജ്ജീകരിക്കുക.", + "open_in_immich_title": "ഇമ്മിച്ചിൽ ഫോട്ടോകൾ തുറക്കുക", "open_in_map_view": "മാപ്പ് കാഴ്‌ചയിൽ തുറക്കുക", "open_in_openstreetmap": "OpenStreetMap-ൽ തുറക്കുക", "open_the_search_filters": "തിരയൽ ഫിൽട്ടറുകൾ തുറക്കുക", @@ -1309,12 +1566,14 @@ "organize_into_albums": "ആൽബങ്ങളായി ക്രമീകരിക്കുക", "organize_into_albums_description": "നിലവിലെ സിങ്ക് ക്രമീകരണങ്ങൾ ഉപയോഗിച്ച് നിലവിലുള്ള ഫോട്ടോകൾ ആൽബങ്ങളിലേക്ക് മാറ്റുക", "organize_your_library": "നിങ്ങളുടെ ലൈബ്രറി ക്രമീകരിക്കുക", + "orientation": "ഓറിയൻ്റേഷൻ", "original": "യഥാർത്ഥം", "other": "മറ്റുള്ളവ", "other_devices": "മറ്റ് ഉപകരണങ്ങൾ", "other_variables": "മറ്റ് വേരിയബിളുകൾ", "owned": "സ്വന്തമായുള്ളത്", "owner": "ഉടമ", + "page": "പേജ്", "partner": "പങ്കാളി", "partner_can_access": "{partner}-ക്ക് ആക്സസ് ചെയ്യാൻ കഴിയും", "partner_can_access_assets": "ആർക്കൈവുചെയ്‌തതും ഇല്ലാതാക്കിയതുമായവ ഒഴികെ നിങ്ങളുടെ എല്ലാ ഫോട്ടോകളും വീഡിയോകളും", @@ -1359,6 +1618,7 @@ "person_age_years": "{years, plural, other {# വയസ്സ്}}", "person_birthdate": "{date}-ന് ജനിച്ചു", "person_hidden": "{name}{hidden, select, true { (മറച്ചത്)} other {}}", + "person_recognized": "വ്യക്തി തിരിച്ചറിഞ്ഞു", "photo_shared_all_users": "നിങ്ങൾ എല്ലാ ഉപയോക്താക്കളുമായും ഫോട്ടോകൾ പങ്കിട്ടു, അല്ലെങ്കിൽ നിങ്ങൾക്ക് പങ്കിടാൻ ഉപയോക്താക്കളാരും ഇല്ലെന്നു തോന്നുന്നു.", "photos": "ഫോട്ടോകൾ", "photos_and_videos": "ഫോട്ടോകളും വീഡിയോകളും", @@ -1381,6 +1641,8 @@ "play_original_video_setting_description": "ട്രാൻസ്‌കോഡ് ചെയ്ത വീഡിയോകളേക്കാൾ ഒറിജിനൽ വീഡിയോകൾ പ്ലേ ചെയ്യാൻ മുൻഗണന നൽകുക. ഒറിജിനൽ ഫയൽ അനുയോജ്യമല്ലെങ്കിൽ അത് ശരിയായി പ്ലേ ചെയ്തേക്കില്ല.", "play_transcoded_video": "ട്രാൻസ്‌കോഡ് ചെയ്ത വീഡിയോ പ്ലേ ചെയ്യുക", "please_auth_to_access": "ആക്‌സസ് ചെയ്യുന്നതിന് ദയവായി പ്രാമാണീകരിക്കുക", + "plugin_method_filter_type": "ഫിൽട്ടർ ചെയ്യുക", + "plugin_method_filter_type_description": "ഈ രീതിക്ക് ഇവൻ്റുകൾ ഫിൽട്ടർ ചെയ്യാനും തുടർന്നുള്ള ഘട്ടങ്ങൾ പ്രവർത്തിപ്പിക്കുന്നതിൽ നിന്ന് സോപാധികമായി തടയാനും കഴിയും", "port": "പോർട്ട്", "preferences_settings_subtitle": "ആപ്പിന്റെ മുൻഗണനകൾ കൈകാര്യം ചെയ്യുക", "preferences_settings_title": "മുൻഗണനകൾ", @@ -1401,6 +1663,7 @@ "profile_drawer_readonly_mode": "റീഡ്-ഓൺലി മോഡ് പ്രവർത്തനക്ഷമമാക്കി. പുറത്തുകടക്കാൻ ഉപയോക്തൃ അവതാർ ഐക്കണിൽ ദീർഘനേരം അമർത്തുക.", "profile_image_of_user": "{user}-ന്റെ പ്രൊഫൈൽ ചിത്രം", "profile_picture_set": "പ്രൊഫൈൽ ചിത്രം സജ്ജീകരിച്ചു.", + "projection_type": "പ്രൊജക്ഷൻ തരം", "public_album": "പൊതു ആൽബം", "public_share": "പൊതു പങ്കിടൽ", "purchase_account_info": "സഹായി", @@ -1436,6 +1699,7 @@ "purchase_settings_server_activated": "സെർവർ പ്രൊഡക്റ്റ് കീ അഡ്മിൻ ആണ് കൈകാര്യം ചെയ്യുന്നത്", "query_asset_id": "അസറ്റ് ഐഡി അന്വേഷിക്കുക", "queue_status": "ക്യൂ ചെയ്യുന്നു {count}/{total}", + "rate_asset": "അസറ്റ് റേറ്റ് ചെയ്യുക", "rating": "സ്റ്റാർ റേറ്റിംഗ്", "rating_clear": "റേറ്റിംഗ് ക്ലിയർ ചെയ്യുക", "rating_count": "{count, plural, one {# സ്റ്റാർ} other {# സ്റ്റാറുകൾ}}", @@ -1452,7 +1716,10 @@ "recent": "സമീപകാലം", "recent_searches": "സമീപകാല തിരയലുകൾ", "recently_added": "അടുത്തിടെ ചേർത്തത്", + "recently_added_body": "ഒരു സമർപ്പിത പേജിൽ നിങ്ങൾ ഈയിടെ ചേർത്ത എല്ലാത്തിലേക്കും നേരെ പോകുക.", + "recently_added_description": "നിങ്ങളുടെ അസറ്റുകൾ ഇമ്മിച്ചിലേക്ക് അപ്‌ലോഡ് ചെയ്‌തപ്പോൾ തരംതിരിച്ച ബ്രൗസ് ചെയ്യുക", "recently_added_page_title": "അടുത്തിടെ ചേർത്തത്", + "recently_added_title": "അടുത്തിടെ ചേർത്തത്", "recently_taken": "അടുത്തിടെ എടുത്തത്", "refresh": "പുതുക്കുക", "refresh_encoded_videos": "എൻകോഡ് ചെയ്ത വീഡിയോകൾ പുതുക്കുക", @@ -1472,6 +1739,7 @@ "remove_assets_shared_link_confirmation": "ഈ പങ്കിട്ട ലിങ്കിൽ നിന്ന് {count, plural, one {# അസറ്റ്} other {# അസറ്റുകൾ}} നീക്കം ചെയ്യണമെന്ന് നിങ്ങൾക്ക് ഉറപ്പാണോ?", "remove_assets_title": "അസറ്റുകൾ നീക്കം ചെയ്യണോ?", "remove_custom_date_range": "കസ്റ്റം തീയതി പരിധി നീക്കം ചെയ്യുക", + "remove_filter": "ഫിൽട്ടർ നീക്കം ചെയ്യുക", "remove_from_album": "ആൽബത്തിൽ നിന്ന് നീക്കം ചെയ്യുക", "remove_from_album_action_prompt": "{count} എണ്ണം ആൽബത്തിൽ നിന്ന് നീക്കം ചെയ്തു", "remove_from_favorites": "പ്രിയപ്പെട്ടവയിൽ നിന്ന് നീക്കം ചെയ്യുക", @@ -1500,7 +1768,10 @@ "reset_pin_code_description": "നിങ്ങൾ പിൻ കോഡ് മറന്നെങ്കിൽ, അത് പുനഃസജ്ജമാക്കാൻ നിങ്ങൾക്ക് സെർവർ അഡ്മിനിസ്ട്രേറ്ററുമായി ബന്ധപ്പെടാം", "reset_pin_code_with_password": "നിങ്ങളുടെ പാസ്‌വേഡ് ഉപയോഗിച്ച് നിങ്ങൾക്ക് എപ്പോഴും പിൻ കോഡ് റീസെറ്റ് ചെയ്യാം", "reset_sqlite": "SQLite ഡാറ്റാബേസ് റീസെറ്റ് ചെയ്യുക", + "reset_sqlite_clear_app_data": "ഡാറ്റ മായ്ക്കുക", "reset_sqlite_confirmation": "SQLite ഡാറ്റാബേസ് റീസെറ്റ് ചെയ്യണമെന്ന് നിങ്ങൾക്ക് ഉറപ്പാണോ? ഡാറ്റ വീണ്ടും സിങ്ക് ചെയ്യുന്നതിന് നിങ്ങൾ ലോഗ് ഔട്ട് ചെയ്ത് വീണ്ടും ലോഗിൻ ചെയ്യേണ്ടിവരും", + "reset_sqlite_confirmation_note": "ശ്രദ്ധിക്കുക: മായ്‌ച്ചതിന് ശേഷം നിങ്ങൾ ആപ്പ് പുനരാരംഭിക്കേണ്ടതുണ്ട്.", + "reset_sqlite_done": "ആപ്പ് ഡാറ്റ മായ്‌ച്ചു. ദയവായി ഇമ്മിച്ച് പുനരാരംഭിച്ച് വീണ്ടും ലോഗിൻ ചെയ്യുക.", "reset_sqlite_success": "SQLite ഡാറ്റാബേസ് വിജയകരമായി റീസെറ്റ് ചെയ്തു", "reset_to_default": "ഡിഫോൾട്ടിലേക്ക് പുനഃസജ്ജമാക്കുക", "resolution": "റെസല്യൂഷൻ", @@ -1525,9 +1796,14 @@ "saved_settings": "ക്രമീകരണങ്ങൾ സേവ് ചെയ്തു", "say_something": "എന്തെങ്കിലും പറയൂ", "scaffold_body_error_occurred": "പിശക് സംഭവിച്ചു", + "scaffold_body_error_unrecoverable": "വീണ്ടെടുക്കാനാകാത്ത ഒരു പിശക് സംഭവിച്ചു. ദയവായി പിശക് പങ്കിടുകയും ഡിസ്‌കോർഡിലോ GitHub-ലോ ട്രേസ് സ്റ്റാക്ക് ചെയ്യുക, അങ്ങനെ ഞങ്ങൾക്ക് സഹായിക്കാനാകും. ഉപദേശിക്കുകയാണെങ്കിൽ, ചുവടെയുള്ള ആപ്പ് ഡാറ്റ നിങ്ങൾക്ക് മായ്ക്കാവുന്നതാണ്.", + "scan": "സ്കാൻ ചെയ്യുക", "scan_all_libraries": "എല്ലാ ലൈബ്രറികളും സ്കാൻ ചെയ്യുക", "scan_library": "സ്കാൻ ചെയ്യുക", + "scanning": "സ്കാൻ ചെയ്യുന്നു", "scanning_for_album": "ആൽബത്തിനായി സ്കാൻ ചെയ്യുന്നു...", + "screencast_mode_description": "സ്ക്രീനിൽ കീബോർഡ്, മൗസ് ഇവൻ്റ് സൂചകങ്ങൾ കാണിക്കുക", + "screencast_mode_title": "സ്‌ക്രീൻകാസ്റ്റ് മോഡ് ടോഗിൾ ചെയ്യുക", "search": "തിരയുക", "search_albums": "ആൽബങ്ങൾക്കായി തിരയുക", "search_by_context": "സന്ദർഭം അനുസരിച്ച് തിരയുക", @@ -1535,6 +1811,8 @@ "search_by_description_example": "സപ്പയിലെ ഹൈക്കിംഗ് ദിനം", "search_by_filename": "ഫയൽ നാമം അല്ലെങ്കിൽ എക്സ്റ്റൻഷൻ ഉപയോഗിച്ച് തിരയുക", "search_by_filename_example": "ഉദാ. IMG_1234.JPG അല്ലെങ്കിൽ PNG", + "search_by_full_path": "മുഴുവൻ പാതയോ ഫോൾഡറോ ഉപയോഗിച്ച് തിരയുക", + "search_by_full_path_example": "/John/Projects/3D_Printing/2026-07-01 - നിങ്ങൾക്ക് പ്രോജക്‌റ്റുകൾ, 3D, പ്രിൻ്റിംഗ്, 2026 മുതലായവ തിരയാനാകും.", "search_by_ocr": "ഒ.സി.ആർ ഉപയോഗിച്ച് തിരയുക", "search_by_ocr_example": "ലാറ്റെ (Latte)", "search_camera_lens_model": "ലെൻസ് മോഡൽ തിരയുക...", @@ -1555,6 +1833,8 @@ "search_filter_media_type": "മീഡിയ തരം", "search_filter_media_type_title": "മീഡിയ തരം തിരഞ്ഞെടുക്കുക", "search_filter_people_title": "ആളുകളെ തിരഞ്ഞെടുക്കുക", + "search_filter_star_rating": "സ്റ്റാർ റേറ്റിംഗ്", + "search_filter_tags_title": "ടാഗുകൾ തിരഞ്ഞെടുക്കുക", "search_for": "ഇതിനായി തിരയുക", "search_for_existing_person": "നിലവിലുള്ള വ്യക്തിക്കായി തിരയുക", "search_no_more_result": "കൂടുതൽ ഫലങ്ങളില്ല", @@ -1577,17 +1857,24 @@ "second": "സെക്കന്റ്", "see_all_people": "എല്ലാ ആളുകളെയും കാണുക", "select": "തിരഞ്ഞെടുക്കുക", + "select_album": "ആൽബം തിരഞ്ഞെടുക്കുക", "select_album_cover": "ആൽബം കവർ തിരഞ്ഞെടുക്കുക", + "select_albums": "ആൽബങ്ങൾ തിരഞ്ഞെടുക്കുക", "select_all": "എല്ലാം തിരഞ്ഞെടുക്കുക", "select_all_duplicates": "എല്ലാ ഡ്യൂപ്ലിക്കേറ്റുകളും തിരഞ്ഞെടുക്കുക", "select_avatar_color": "അവതാർ നിറം തിരഞ്ഞെടുക്കുക", + "select_count": "{count, plural, one {# തിരഞ്ഞെടുക്കുക} other {# തിരഞ്ഞെടുക്കുക}}", + "select_cutoff_date": "കട്ട്ഓഫ് തീയതി തിരഞ്ഞെടുക്കുക", "select_face": "മുഖം തിരഞ്ഞെടുക്കുക", "select_featured_photo": "ഫീച്ചർ ചെയ്ത ഫോട്ടോ തിരഞ്ഞെടുക്കുക", "select_from_computer": "കമ്പ്യൂട്ടറിൽ നിന്ന് തിരഞ്ഞെടുക്കുക", "select_keep_all": "എല്ലാം സൂക്ഷിക്കാൻ തിരഞ്ഞെടുക്കുക", "select_new_face": "പുതിയ മുഖം തിരഞ്ഞെടുക്കുക", + "select_people": "ആളുകളെ തിരഞ്ഞെടുക്കുക", + "select_person": "വ്യക്തിയെ തിരഞ്ഞെടുക്കുക", "select_person_to_tag": "ടാഗ് ചെയ്യാൻ ഒരു വ്യക്തിയെ തിരഞ്ഞെടുക്കുക", "select_photos": "ഫോട്ടോകൾ തിരഞ്ഞെടുക്കുക", + "select_quality": "ഗുണനിലവാരം തിരഞ്ഞെടുക്കുക", "select_trash_all": "എല്ലാം ട്രാഷ് ചെയ്യാൻ തിരഞ്ഞെടുക്കുക", "selected": "തിരഞ്ഞെടുത്തു", "selected_count": "{count, plural, other {# എണ്ണം തിരഞ്ഞെടുത്തു}}", @@ -1613,6 +1900,9 @@ "set_profile_picture": "പ്രൊഫൈൽ ചിത്രം സജ്ജമാക്കുക", "set_slideshow_to_fullscreen": "സ്ലൈഡ്‌ഷോ ഫുൾസ്ക്രീനായി സജ്ജമാക്കുക", "set_stack_primary_asset": "പ്രധാന അസറ്റായി സജ്ജമാക്കുക", + "setting_image_navigation_enable_subtitle": "പ്രവർത്തനക്ഷമമാക്കിയിട്ടുണ്ടെങ്കിൽ, സ്‌ക്രീനിൻ്റെ ഇടതുഭാഗത്ത്/വലത് ഭാഗത്ത് ടാപ്പ് ചെയ്‌ത് മുമ്പത്തെ/അടുത്ത ചിത്രത്തിലേക്ക് നാവിഗേറ്റ് ചെയ്യാം.", + "setting_image_navigation_enable_title": "നാവിഗേറ്റ് ചെയ്യാൻ ടാപ്പ് ചെയ്യുക", + "setting_image_navigation_title": "ഇമേജ് നാവിഗേഷൻ", "setting_image_viewer_help": "വിശദാംശ വ്യൂവർ ആദ്യം ചെറിയ തംബ്നെയിൽ ലോഡുചെയ്യുന്നു, തുടർന്ന് ഇടത്തരം പ്രിവ്യൂ (പ്രവർത്തനക്ഷമമാക്കിയിട്ടുണ്ടെങ്കിൽ), ഒടുവിൽ യഥാർത്ഥ ചിത്രം (പ്രവർത്തനക്ഷമമാക്കിയിട്ടുണ്ടെങ്കിൽ) ലോഡുചെയ്യുന്നു.", "setting_image_viewer_original_subtitle": "യഥാർത്ഥ പൂർണ്ണ-റെസല്യൂഷൻ ചിത്രം (വലുത്!) ലോഡുചെയ്യാൻ പ്രവർത്തനക്ഷമമാക്കുക. ഡാറ്റ ഉപയോഗം (നെറ്റ്‌വർക്കും ഉപകരണ കാഷെയും) കുറയ്ക്കാൻ പ്രവർത്തനരഹിതമാക്കുക.", "setting_image_viewer_original_title": "യഥാർത്ഥ ചിത്രം ലോഡുചെയ്യുക", @@ -1634,6 +1924,10 @@ "share": "പങ്കിടുക", "share_dialog_preparing": "തയ്യാറാക്കുന്നു...", "share_link": "ലിങ്ക് പങ്കിടുക", + "share_original": "യഥാർത്ഥ (വലുത്) ഉപയോഗിക്കുക", + "share_preview": "ലഘുചിത്രം ഉപയോഗിക്കുക (ചെറുത്)", + "share_quality_body": "നിങ്ങൾ പങ്കിടുന്നതിന് മുമ്പ് ചിത്രത്തിൻ്റെ ഗുണനിലവാരം തിരഞ്ഞെടുക്കുന്നതിന് പങ്കിടൽ ബട്ടൺ അമർത്തിപ്പിടിക്കുക.", + "share_quality_title": "നിങ്ങളുടെ ഷെയർ നിലവാരം തിരഞ്ഞെടുക്കുക", "shared": "പങ്കിട്ടത്", "shared_album_activities_input_disable": "അഭിപ്രായം പ്രവർത്തനരഹിതമാക്കി", "shared_album_activity_remove_content": "ഈ പ്രവർത്തനം ഇല്ലാതാക്കണോ?", @@ -1693,13 +1987,17 @@ "show_in_timeline": "ടൈംലൈനിൽ കാണിക്കുക", "show_in_timeline_setting_description": "ഈ ഉപയോക്താവിൽ നിന്നുള്ള ഫോട്ടോകളും വീഡിയോകളും നിങ്ങളുടെ ടൈംലൈനിൽ കാണിക്കുക", "show_keyboard_shortcuts": "കീബോർഡ് കുറുക്കുവഴികൾ കാണിക്കുക", + "show_less": "കുറവ് കാണിക്കുക", "show_metadata": "മെറ്റാഡാറ്റ കാണിക്കുക", + "show_more_fields": "{count, plural, one {# കൂടുതൽ ഫീൽഡ് കാണിക്കുക} other {# കൂടുതൽ ഫീൽഡുകൾ കാണിക്കുക}}", "show_or_hide_info": "വിവരങ്ങൾ കാണിക്കുക അല്ലെങ്കിൽ മറയ്ക്കുക", "show_password": "പാസ്‌വേഡ് കാണിക്കുക", "show_person_options": "വ്യക്തിയുടെ ഓപ്ഷനുകൾ കാണിക്കുക", "show_progress_bar": "പുരോഗതി ബാർ കാണിക്കുക", + "show_schema": "സ്കീമ കാണിക്കുക", "show_search_options": "തിരയൽ ഓപ്ഷനുകൾ കാണിക്കുക", "show_shared_links": "പങ്കിട്ട ലിങ്കുകൾ കാണിക്കുക", + "show_slideshow_metadata_overlay": "ചിത്ര വിവര ഓവർലേ കാണിക്കുക", "show_slideshow_transition": "സ്ലൈഡ്‌ഷോ സംക്രമണം കാണിക്കുക", "show_supporter_badge": "സഹായിയുടെ ബാഡ്ജ്", "show_supporter_badge_description": "ഒരു സഹായിയുടെ ബാഡ്ജ് കാണിക്കുക", @@ -1711,11 +2009,21 @@ "sign_out": "സൈൻ ഔട്ട്", "sign_up": "സൈൻ അപ്പ് ചെയ്യുക", "size": "വലിപ്പം", + "skip": "ഒഴിവാക്കുക", "skip_to_content": "ഉള്ളടക്കത്തിലേക്ക് പോകുക", "skip_to_folders": "ഫോൾഡറുകളിലേക്ക് പോകുക", "skip_to_tags": "ടാഗുകളിലേക്ക് പോകുക", "slideshow": "സ്ലൈഡ്‌ഷോ", + "slideshow_body": "ഒരു ഫുൾ സ്‌ക്രീൻ സ്ലൈഡ്‌ഷോയിൽ നിങ്ങളുടെ ഫോട്ടോകൾ പ്ലേ ചെയ്യുന്നത് കാണൂ.", + "slideshow_metadata_overlay_mode": "ഓവർലേ ഉള്ളടക്കം", + "slideshow_metadata_overlay_mode_description_only": "വിവരണം മാത്രം", + "slideshow_metadata_overlay_mode_full": "നിറഞ്ഞു", + "slideshow_repeat": "സ്ലൈഡ്ഷോ ആവർത്തിക്കുക", + "slideshow_repeat_description": "സ്ലൈഡ്‌ഷോ അവസാനിക്കുമ്പോൾ തുടക്കത്തിലേക്ക് തിരികെ ലൂപ്പ് ചെയ്യുക", "slideshow_settings": "സ്ലൈഡ്‌ഷോ ക്രമീകരണങ്ങൾ", + "slideshow_title": "സ്ലൈഡ്ഷോ", + "smart_album": "സ്മാർട്ട് ആൽബം", + "some_assets_already_have_a_location_warning": "തിരഞ്ഞെടുത്ത ചില അസറ്റുകൾക്ക് ഇതിനകം ഒരു ലൊക്കേഷൻ ഉണ്ട്", "sort_albums_by": "ആൽബങ്ങളെ ഇതനുസരിച്ച് ക്രമീകരിക്കുക...", "sort_created": "സൃഷ്ടിച്ച തീയതി", "sort_items": "ഇനങ്ങളുടെ എണ്ണം", @@ -1736,6 +2044,10 @@ "start_date_before_end_date": "ആരംഭ തീയതി അവസാന തീയതിക്ക് മുമ്പായിരിക്കണം", "state": "സംസ്ഥാനം", "status": "നില", + "step_delete": "ഘട്ടം ഇല്ലാതാക്കുക", + "step_delete_confirm": "ഈ ഘട്ടം ഇല്ലാതാക്കണമെന്ന് തീർച്ചയാണോ?", + "step_details": "ഘട്ടത്തിൻ്റെ വിശദാംശങ്ങൾ", + "steps": "പടികൾ", "stop_casting": "കാസ്റ്റിംഗ് നിർത്തുക", "stop_motion_photo": "ചലിക്കുന്ന ഫോട്ടോ നിർത്തുക", "stop_photo_sharing": "നിങ്ങളുടെ ഫോട്ടോകൾ പങ്കിടുന്നത് നിർത്തണോ?", @@ -1752,6 +2064,7 @@ "support": "പിന്തുണ", "support_and_feedback": "പിന്തുണയും അഭിപ്രായവും", "support_third_party_description": "നിങ്ങളുടെ Immich ഇൻസ്റ്റാളേഷൻ ഒരു മൂന്നാം കക്ഷി പാക്കേജ് ചെയ്തതാണ്. നിങ്ങൾ അനുഭവിക്കുന്ന പ്രശ്നങ്ങൾ ആ പാക്കേജ് കാരണമാകാം, അതിനാൽ താഴെയുള്ള ലിങ്കുകൾ ഉപയോഗിച്ച് ആദ്യം അവരുമായി പ്രശ്നങ്ങൾ ഉന്നയിക്കുക.", + "supporter": "പിന്തുണക്കാരൻ", "swap_merge_direction": "ലയിപ്പിക്കൽ ദിശ മാറ്റുക", "sync": "സിങ്ക്", "sync_albums": "ആൽബങ്ങൾ സിങ്ക് ചെയ്യുക", @@ -1760,9 +2073,12 @@ "sync_status": "സിങ്ക് നില", "sync_status_subtitle": "സിങ്ക് സിസ്റ്റം കാണുക, കൈകാര്യം ചെയ്യുക", "sync_upload_album_setting_subtitle": "നിങ്ങളുടെ ഫോട്ടോകളും വീഡിയോകളും Immich-ലെ തിരഞ്ഞെടുത്ത ആൽബങ്ങളിലേക്ക് ഉണ്ടാക്കി അപ്‌ലോഡ് ചെയ്യുക", + "system_theme": "സിസ്റ്റം തീം", + "system_theme_command_description": "സിസ്റ്റം തീം ഉപയോഗിക്കുക ({value})", "tag": "ടാഗ്", "tag_assets": "അസറ്റുകൾ ടാഗ് ചെയ്യുക", "tag_created": "{tag} എന്ന ടാഗ് ഉണ്ടാക്കി", + "tag_face": "മുഖം ടാഗ് ചെയ്യുക", "tag_feature_description": "യുക്തിസഹമായ ടാഗ് വിഷയങ്ങൾ അനുസരിച്ച് ഗ്രൂപ്പ് ചെയ്ത ഫോട്ടോകളും വീഡിയോകളും ബ്രൗസുചെയ്യുന്നു", "tag_people": "ആളുകളെ ടാഗ് ചെയ്യുക", "tag_updated": "{tag} എന്ന ടാഗ് അപ്ഡേറ്റ് ചെയ്തു", @@ -1782,6 +2098,7 @@ "theme_setting_primary_color_title": "പ്രധാന നിറം", "theme_setting_system_primary_color_title": "സിസ്റ്റം നിറം ഉപയോഗിക്കുക", "theme_setting_system_theme_switch": "യാന്ത്രികം (സിസ്റ്റം ക്രമീകരണം പിന്തുടരുക)", + "then": "പിന്നെ", "they_will_be_merged_together": "അവയെ ഒരുമിച്ച് ലയിപ്പിക്കും", "third_party_resources": "മൂന്നാം കക്ഷി ഉറവിടങ്ങൾ", "time": "സമയം", @@ -1798,6 +2115,7 @@ "to_select": "തിരഞ്ഞെടുക്കാൻ", "to_trash": "ട്രാഷ് ചെയ്യുക", "toggle_settings": "ക്രമീകരണങ്ങൾ ടോഗിൾ ചെയ്യുക", + "toggle_theme_description": "തീം ടോഗിൾ ചെയ്യുക", "total": "ആകെ", "total_usage": "ആകെ ഉപയോഗം", "trash": "ട്രാഷ്", @@ -1809,6 +2127,13 @@ "trash_page_delete_all": "എല്ലാം ഇല്ലാതാക്കുക", "trash_page_info": "ട്രാഷ് ചെയ്ത ഇനങ്ങൾ {days} ദിവസങ്ങൾക്ക് ശേഷം ശാശ്വതമായി ഇല്ലാതാക്കപ്പെടും", "trashed_items_will_be_permanently_deleted_after": "ട്രാഷ് ചെയ്ത ഇനങ്ങൾ {days, plural, one {# ദിവസത്തിന്} other {# ദിവസങ്ങൾക്ക്}} ശേഷം ശാശ്വതമായി ഇല്ലാതാക്കപ്പെടും.", + "trigger": "ട്രിഗർ", + "trigger_asset_metadata_extraction": "അസറ്റ് മെറ്റാഡാറ്റ എക്‌സ്‌ട്രാക്ഷൻ", + "trigger_asset_metadata_extraction_description": "ഒരു അസറ്റിൻ്റെ EXIF മെറ്റാഡാറ്റ എക്‌സ്‌ട്രാക്‌റ്റ് ചെയ്യുമ്പോൾ ട്രിഗർ ചെയ്‌തു", + "trigger_asset_uploaded": "അസറ്റ് അപ്‌ലോഡ്", + "trigger_asset_uploaded_description": "ഒരു പുതിയ അസറ്റ് അപ്‌ലോഡ് ചെയ്യുമ്പോൾ ട്രിഗർ ചെയ്തു", + "trigger_person_recognized": "വ്യക്തി തിരിച്ചറിഞ്ഞു", + "trigger_person_recognized_description": "ഒരു വ്യക്തിയെ തിരിച്ചറിയുമ്പോൾ ട്രിഗർ ചെയ്യുന്നു", "troubleshoot": "ട്രബിൾഷൂട്ട്", "type": "തരം", "unable_to_change_pin_code": "പിൻ കോഡ് മാറ്റാൻ കഴിയില്ല", @@ -1823,6 +2148,7 @@ "unhide_person": "വ്യക്തിയെ മറവിൽനിന്ന് മാറ്റുക", "unknown": "അജ്ഞാതം", "unknown_country": "അജ്ഞാത രാജ്യം", + "unknown_date": "അജ്ഞാത തീയതി", "unknown_year": "അജ്ഞാത വർഷം", "unlimited": "പരിധിയില്ലാത്തത്", "unlink_motion_video": "ചലിക്കുന്ന വീഡിയോ അൺലിങ്ക് ചെയ്യുക", @@ -1838,6 +2164,8 @@ "unstack": "അൺ-സ്റ്റാക്ക് ചെയ്യുക", "unstack_action_prompt": "{count} എണ്ണം അൺ-സ്റ്റാക്ക് ചെയ്തു", "unstacked_assets_count": "{count, plural, one {# അസറ്റ്} other {# അസറ്റുകൾ}} അൺ-സ്റ്റാക്ക് ചെയ്തു", + "unsupported_field_type": "പിന്തുണയ്ക്കാത്ത ഫീൽഡ് തരം", + "unsupported_file_type": "{file} ഫയൽ അപ്‌ലോഡ് ചെയ്യാൻ കഴിയില്ല കാരണം അതിൻ്റെ ഫയൽ തരം {type} പിന്തുണയ്ക്കുന്നില്ല.", "untagged": "ടാഗ് ചെയ്തിട്ടില്ല", "up_next": "അടുത്തത്", "update_location_action_prompt": "തിരഞ്ഞെടുത്ത {count} അസറ്റുകളുടെ സ്ഥാനം ഇതുപയോഗിച്ച് അപ്ഡേറ്റ് ചെയ്യുക:", @@ -1845,7 +2173,9 @@ "updated_password": "പാസ്‌വേഡ് അപ്ഡേറ്റ് ചെയ്തു", "upload": "അപ്‌ലോഡ്", "upload_concurrency": "അപ്‌ലോഡ് കോൺകറൻസി", + "upload_day_count": "{date}: {count, plural, one {# അപ്‌ലോഡ്} other {# അപ്‌ലോഡുകൾ}}", "upload_details": "അപ്‌ലോഡ് വിശദാംശങ്ങൾ", + "upload_error_with_count": "{count, plural, one {# അസറ്റ്} other {# അസറ്റുകൾ}} എന്നതിനായുള്ള അപ്‌ലോഡ് പിശക്", "upload_errors": "അപ്‌ലോഡ് {count, plural, one {# പിശകോടെ} other {# പിശകുകളോടെ}} പൂർത്തിയായി, പുതിയ അപ്‌ലോഡ് അസറ്റുകൾ കാണുന്നതിന് പേജ് പുതുക്കുക.", "upload_finished": "അപ്‌ലോഡ് കഴിഞ്ഞു", "upload_progress": "ശേഷിക്കുന്നത് {remaining, number} - പ്രോസസ്സ് ചെയ്തത് {processed, number}/{total, number}", @@ -1854,14 +2184,21 @@ "upload_status_errors": "പിശകുകൾ", "upload_status_uploaded": "അപ്‌ലോഡ് ചെയ്തു", "upload_success": "അപ്‌ലോഡ് വിജയിച്ചു, പുതിയ അപ്‌ലോഡ് അസറ്റുകൾ കാണുന്നതിന് പേജ് പുതുക്കുക.", + "upload_to_album_body": "മാനുവൽ അപ്‌ലോഡ് ഫീച്ചർ ഉപയോഗിക്കാത്ത ഉപയോക്താക്കൾക്കായി, നിങ്ങൾ അപ്‌ലോഡ് ചെയ്യുമ്പോൾ പ്രാദേശിക ഫോട്ടോകൾ നേരിട്ട് ആൽബത്തിലേക്ക് ചേർക്കാൻ നിങ്ങൾക്ക് ഇപ്പോൾ തിരഞ്ഞെടുക്കാം, അപ്‌ലോഡ് ചെയ്യേണ്ടതില്ല, പിന്നീട് ഒരു ആൽബത്തിലേക്ക് ചേർക്കുക.", + "upload_to_album_title": "ഒരു ആൽബത്തിലേക്ക് നേരിട്ട് അപ്‌ലോഡ് ചെയ്യുക", "upload_to_immich": "Immich-ലേക്ക് അപ്‌ലോഡ് ചെയ്യുക ({count})", "uploading": "അപ്‌ലോഡ് ചെയ്യുന്നു", "uploading_media": "മീഡിയ അപ്‌ലോഡ് ചെയ്യുന്നു", + "uploads": "അപ്‌ലോഡുകൾ", + "uploads_count": "{count, plural, one {# അപ്‌ലോഡ്} other {# അപ്‌ലോഡുകൾ}}", "url": "യുആർഎൽ", "usage": "ഉപയോഗം", "use_biometric": "ബയോമെട്രിക് ഉപയോഗിക്കുക", + "use_browser_locale": "ബ്രൗസർ ലൊക്കേൽ ഉപയോഗിക്കുക", + "use_browser_locale_description": "നിങ്ങളുടെ ബ്രൗസർ ലൊക്കേലിനെ അടിസ്ഥാനമാക്കി തീയതികളും സമയങ്ങളും നമ്പറുകളും ഫോർമാറ്റ് ചെയ്യുക", "use_current_connection": "നിലവിലെ കണക്ഷൻ ഉപയോഗിക്കുക", "use_custom_date_range": "പകരം കസ്റ്റം തീയതി പരിധി ഉപയോഗിക്കുക", + "use_template": "ടെംപ്ലേറ്റ് ഉപയോഗിക്കുക", "user": "ഉപയോക്താവ്", "user_has_been_deleted": "ഈ ഉപയോക്താവിനെ ഇല്ലാതാക്കി.", "user_id": "ഉപയോക്തൃ ഐഡി", @@ -1889,12 +2226,14 @@ "video": "വീഡിയോ", "video_hover_setting": "ഹോവർ ചെയ്യുമ്പോൾ വീഡിയോ തംബ്നെയിൽ പ്ലേ ചെയ്യുക", "video_hover_setting_description": "മൗസ് ഒരു ഇനത്തിന് മുകളിലൂടെ ഹോവർ ചെയ്യുമ്പോൾ വീഡിയോ തംബ്നെയിൽ പ്ലേ ചെയ്യുക. പ്രവർത്തനരഹിതമാക്കിയാലും, പ്ലേ ഐക്കണിന് മുകളിലൂടെ ഹോവർ ചെയ്ത് പ്ലേബാക്ക് ആരംഭിക്കാൻ കഴിയും.", + "video_quality": "വീഡിയോ നിലവാരം", "videos": "വീഡിയോകൾ", "videos_count": "{count, plural, one {# വീഡിയോ} other {# വീഡിയോകൾ}}", "view": "കാണുക", "view_album": "ആൽബം കാണുക", "view_all": "എല്ലാം കാണുക", "view_all_users": "എല്ലാ ഉപയോക്താക്കളെയും കാണുക", + "view_asset_owners": "അസറ്റ് ഉടമകളെ കാണുക", "view_details": "വിശദാംശങ്ങൾ കാണുക", "view_in_timeline": "ടൈംലൈനിൽ കാണുക", "view_link": "ലിങ്ക് കാണുക", @@ -1905,18 +2244,42 @@ "view_similar_photos": "സമാനമായ ഫോട്ടോകൾ കാണുക", "view_stack": "സ്റ്റാക്ക് കാണുക", "viewer_remove_from_stack": "സ്റ്റാക്കിൽ നിന്ന് നീക്കം ചെയ്യുക", + "visibility": "ദൃശ്യപരത", "visibility_changed": "{count, plural, one {# വ്യക്തിയുടെ} other {# ആളുകളുടെ}} ദൃശ്യത മാറ്റി", + "visual": "വിഷ്വൽ", "waiting": "കാത്തിരിക്കുന്നു", + "waiting_count": "കാത്തിരിക്കുന്നു: {count}", "warning": "മുന്നറിയിപ്പ്", "week": "ആഴ്ച", "welcome": "സ്വാഗതം", "welcome_to_immich": "Immich-ലേക്ക് സ്വാഗതം", + "whats_new": "പുതിയതെന്താണ്", + "whats_new_settings_subtitle": "ഇമ്മിച്ചിൽ എന്താണ് പുതിയതെന്ന് കാണുക", + "whats_new_version": "പതിപ്പ് {version}", + "when": "എപ്പോൾ", + "width": "വീതി", "wifi_name": "വൈ-ഫൈയുടെ പേര്", + "workflow": "വർക്ക്ഫ്ലോ", + "workflow_delete_prompt": "ഈ വർക്ക്ഫ്ലോ ഇല്ലാതാക്കണമെന്ന് തീർച്ചയാണോ?", + "workflow_deleted": "വർക്ക്ഫ്ലോ ഇല്ലാതാക്കി", + "workflow_description": "വർക്ക്ഫ്ലോ വിവരണം", + "workflow_info": "വർക്ക്ഫ്ലോ വിവരം", + "workflow_json": "വർക്ക്ഫ്ലോ JSON", + "workflow_json_help": "JSON ഫോർമാറ്റിൽ വർക്ക്ഫ്ലോ കോൺഫിഗറേഷൻ എഡിറ്റ് ചെയ്യുക. മാറ്റങ്ങൾ വിഷ്വൽ ബിൽഡറുമായി സമന്വയിപ്പിക്കും.", + "workflow_name": "വർക്ക്ഫ്ലോ പേര്", + "workflow_navigation_prompt": "നിങ്ങളുടെ മാറ്റങ്ങൾ സംരക്ഷിക്കാതെ പോകണമെന്ന് തീർച്ചയാണോ?", + "workflow_summary": "വർക്ക്ഫ്ലോ സംഗ്രഹം", + "workflow_templates": "വർക്ക്ഫ്ലോ ടെംപ്ലേറ്റുകൾ", + "workflow_update_success": "വർക്ക്ഫ്ലോ വിജയകരമായി അപ്ഡേറ്റ് ചെയ്തു", + "workflows": "വർക്ക്ഫ്ലോകൾ", + "workflows_help_text": "ട്രിഗറുകളും ഫിൽട്ടറുകളും അടിസ്ഥാനമാക്കി വർക്ക്ഫ്ലോകൾ നിങ്ങളുടെ അസറ്റുകളിലെ പ്രവർത്തനങ്ങൾ ഓട്ടോമേറ്റ് ചെയ്യുന്നു", "wrong_pin_code": "തെറ്റായ പിൻ കോഡ്", + "x_of_total": "{x}/{total}", "year": "വർഷം", "years_ago": "{years, plural, one {# വർഷം} other {# വർഷങ്ങൾ}} മുമ്പ്", "yes": "അതെ", "you_dont_have_any_shared_links": "നിങ്ങൾക്ക് പങ്കിട്ട ലിങ്കുകളൊന്നുമില്ല", "your_wifi_name": "നിങ്ങളുടെ വൈ-ഫൈയുടെ പേര്", + "zero_to_clear_rating": "അസറ്റ് റേറ്റിംഗ് മായ്‌ക്കാൻ 0 അമർത്തുക", "zoom_image": "ചിത്രം വലുതാക്കുക" } diff --git a/i18n/mr.json b/i18n/mr.json index 021d962701..29b1da18e6 100644 --- a/i18n/mr.json +++ b/i18n/mr.json @@ -4,29 +4,29 @@ "account_settings": "खाते व्यवस्था", "acknowledge": "मान्यता", "action": "कृती", - "action_common_update": "अद्ययावत", + "action_common_update": "अद्यतन", "action_description": "फिल्टर केलेल्या माध्यमांवर करायच्या क्रियांचा संच", "actions": "कृत्ये", "active": "सक्रिय", - "active_count": "कृती: {count}", + "active_count": "कृती: {संख्या}", "activity": "गतिविधि", "add": "जोडा", "add_a_description": "वर्णन करा", - "add_a_location": "एक स्थळ टाका", - "add_a_name": "नाव टाका", - "add_a_title": "शीर्षक टाका", + "add_a_location": "एक स्थळ जोडा", + "add_a_name": "नाव जोडा", + "add_a_title": "शीर्षक जोडा", "add_action": "कृती जोडा", "add_assets": "माध्यमे जोडा", "add_birthday": "जन्मदिवस नोंदवा", "add_endpoint": "एंडपॉइंट जोडा", "add_exclusion_pattern": "अपवाद नमुना जोडा", - "add_location": "स्थळ टाका", + "add_location": "स्थळ जोडा", "add_partner": "भागीदार जोडा", "add_photos": "छायाचित्रे जोडा", - "add_step": "पायरी जोडा", + "add_step": "टप्पा जोडा", "add_tag": "टॅग जोडा", "add_to": "त्या मध्ये जोडा…", - "add_to_album": "संग्रहात टाका", + "add_to_album": "संग्रहात जोडा", "add_to_album_bottom_sheet_added": "{album} मध्ये जोडले गेले", "add_to_album_bottom_sheet_already_exists": "आधीच {album} मध्ये आहे", "add_to_album_bottom_sheet_some_local_assets": "काही स्थानिक माध्यमे अल्बममध्ये जोडणे शक्य झाले नाही", @@ -37,7 +37,7 @@ "add_url": "URL प्रविष्ट करा", "added_to_archive": "संग्रहित केले", "added_to_favorites": "आवडत्या संग्रहात जोडले", - "added_to_favorites_count": "आवडत्यात {count, number} टाकले", + "added_to_favorites_count": "आवडत्यात {count, number} जोडले", "admin": { "add_exclusion_pattern_description": "अपवाद अनुकूलन जोडा. ** आणि ? या उपयोगात ग्लोबिंग समर्थित आहे. कोणत्याही \"Raw\" नावाच्या निर्देशिकेमधील सर्व खतावण्या दुर्लक्षीत करण्यासाठी \"/Raw/\" वापरा. \".tif\" या सामान्य पथावर समाप्त असलेल्या सर्व खतावण्या दुर्लक्षीत करण्यासाठी \"**/.tif\" वापरा. विशिष्ट पथ दुर्लक्ष करण्यासाठी \"/path/to/ignore/**\" वापरा.", "admin_user": "प्रशासन वापरकर्ता", @@ -67,13 +67,17 @@ "confirm_reprocess_all_faces": "तुम्हाला खात्री आहे का की तुम्हाला सर्व चेहऱ्यांवर पुन्हा प्रक्रिया करायची आहे? यामुळे नाव दिलेले लोकही साफ होतील.", "confirm_user_password_reset": "तुम्हाला नक्की {user} चा परवलीचा शब्द बदलायचा आहे का?", "confirm_user_pin_code_reset": "तुम्हाला नक्की {user} चा पिन कोड रीसेट करायचा आहे का?", + "copy_config_to_clipboard_description": "चालू सिस्टम कॉन्फिगरेशन JSON ऑब्जेक्ट म्हणून क्लिपबोर्डवर कॉपी करा", "create_job": "कार्य बनवा", "cron_expression": "वेळापत्रक सूत्र", "cron_expression_description": "चाळन्याचे वेळापत्रक क्रॉन पद्धती ने करा. अधिक माहिती साठी पहा: क्रॉन गुरु", "cron_expression_presets": "पूर्वनिर्धारित वेळापत्रक सूत्रे", "disable_login": "प्रवेशाधिकर वर्ज्य करा", + "download_csv": "CSV डाउनलोड करा", "duplicate_detection_job_description": "सारख्या छायाचित्रांचा शोध घेण्यासाठी यांत्रिकी प्रशिक्षण द्या. ही कार्यक्षमता चतुर शोधप्रणालीवर अवलंबून आहे", "exclusion_pattern_description": "आपले संग्रहालय चाळताना अपवाद नमुने आपल्याला खतावण्या आणि र्निर्देशिकेला दुर्लक्षीत करू देतात. आपल्याकडे कच्च्या खतावण्या सारख्या आयात करू इच्छित नसलेल्या असंपादित (RAW) खतावण्या असलेल्या निर्देशिका असल्यास हे उपयुक्त आहे.", + "export_config_as_json_description": "चालू सिस्टम कॉन्फिगरेशन JSON फाईल म्हणून डाउनलोड करा", + "external_libraries_page_description": "बाह्य ग्रंथालयाच्या पृष्ठाचे व्यवस्थापन", "face_detection": "मुख संशोधन", "face_detection_description": "मशीन लर्निंग वापरून मालमत्तांमधील चेहरे शोधा. व्हिडिओंसाठी, फक्त थंबनेलचा विचार केला जातो. \"रिफ्रेश\" (पुन्हा) सर्व मालमत्तांवर प्रक्रिया करते. \"रीसेट\" याव्यतिरिक्त सर्व वर्तमान चेहरा डेटा साफ करते. \"गहाळ\" मालमत्तांवर अद्याप प्रक्रिया न केलेल्या रांगेत ठेवते. शोधलेले चेहरे फेस डिटेक्शन पूर्ण झाल्यानंतर फेशियल रेकग्निशनसाठी रांगेत ठेवले जातील, त्यांना विद्यमान किंवा नवीन लोकांमध्ये गटबद्ध केले जाईल.", "facial_recognition_job_description": "शोधलेले चेहरे लोकांमध्ये गटबद्ध करा. हे चरण चेहरा शोधणे पूर्ण झाल्यानंतर चालते. \"रीसेट करा\" (पुन्हा) सर्व चेहरे क्लस्टर कर. \"गहाळ\" चेहरे रांगेत समाविष्ट करते ज्यांना नियुक्त केलेली व्यक्ती नाही.", @@ -93,6 +97,8 @@ "image_preview_description": "एकच मालमत्ता पाहताना आणि मशीन लर्निंगसाठी वापरली जाणारी, मेटाडेटा काढून दिलेली मध्यम आकाराची प्रतिमा", "image_preview_quality_description": "पूर्वावलोकन गुणवत्ता 1–100: जितकी उच्च, तितकी चांगली; फाइल आकार वाढतो आणि ॲपची प्रतिसादक्षमता कमी होऊ शकते. कमी मूल्य सेट केल्यास मशीन लर्निंग गुणवत्ता प्रभावित होऊ शकते.", "image_preview_title": "पूर्वावलोकन विन्यास", + "image_progressive": "प्रगतीशील", + "image_progressive_description": "JPEG प्रतिमा हळूहळू लोड होऊन प्रदर्शित होण्यासाठी क्रमाक्रमानुसार एन्कोड करा. याचा WebP प्रतिमांवर कोणताही परिणाम होत नाही.", "image_quality": "गुणवत्ता", "image_resolution": "प्रतिमेची स्पष्टता", "image_resolution_description": "उच्च रिझोल्यूशन अधिक तपशील जतन करतात, परंतु त्यांचे एन्कोडिंग जास्त वेळ घेतं, फाइल साईज मोठी होते आणि अ‍ॅपची प्रतिसादक्षमता कमी होऊ शकते.", @@ -101,6 +107,22 @@ "image_thumbnail_description": "फोटो समूह पाहताना मेटाडेटा काढून दाखवलेले लहान थंबनेल", "image_thumbnail_quality_description": "थंबनेल गुणवत्ता (1–100): जितकी जास्त, तितकी चांगली; परंतु फाइल आकार वाढतो आणि ॲपची प्रतिसादक्षमता कमी होऊ शकते.", "image_thumbnail_title": "लघुरूप विन्यास", + "import_config_from_json_description": "JSON कॉन्फिग फाइल अपलोड करून सिस्टम कॉन्फिग आयात करा", + "integrity_checks_checksum_files": "चेकसम फाइल्स", + "integrity_checks_checksum_files_description": "चेकसम तपासणी कॉन्फिगर करा", + "integrity_checks_checksum_files_enable_description": "चेकसम तपासणी सक्षम करा", + "integrity_checks_checksum_files_percentage_limit": "टक्केवारी मर्यादा", + "integrity_checks_checksum_files_percentage_limit_description": "प्रत्येक अंतरालमध्ये चेकसम तपासणी किती टक्केपर्यंत चालवायची ते 0.01 ते 1 या श्रेणीत सेट करा.", + "integrity_checks_checksum_files_time_limit": "वेळेची मर्यादा", + "integrity_checks_checksum_files_time_limit_description": "प्रत्येक अंतरालानंतर चेकसम तपासणी किती काळ चालवायची ते कमाल कालावधी कॉन्फिगर करा. (मिलीसेकंद)", + "integrity_checks_missing_files": "गहाळ फाइल्स", + "integrity_checks_missing_files_description": "वारंवारता कॉन्फिगर करा आणि गहाळ फाइल्स तपासणी सक्षम किंवा अक्षम करा", + "integrity_checks_missing_files_enable_description": "गहाळ फाइल्स तपासणी सक्षम करा", + "integrity_checks_settings": "अखंडता तपासण्या", + "integrity_checks_settings_description": "अखंडता तपासणी अंतरांचे व्यवस्थापन करा", + "integrity_checks_untracked_files": "अनट्रॅक्ड फाइल्स", + "integrity_checks_untracked_files_description": "वारंवारता कॉन्फिगर करा आणि ट्रॅक न केलेल्या फाइल्सची तपासणी सक्षम किंवा अक्षम करा", + "integrity_checks_untracked_files_enable_description": "अनट्रॅक्ड फाइल्सची तपासणी सक्षम करा", "job_concurrency": "{job} एकरूपता", "job_created": "कार्य तयार झाले", "job_not_concurrency_safe": "हे कार्य समांतरपणे चालवण्यासाठी सुरक्षित नाही.", @@ -175,10 +197,15 @@ "machine_learning_smart_search_enabled": "स्मार्ट सर्च सक्षम करा", "machine_learning_smart_search_enabled_description": "अक्षम केल्यास, प्रतिमा स्मार्ट सर्चसाठी एन्कोड केल्या जाणार नाहीत.", "machine_learning_url_description": "मशीन लर्निंग सर्व्हरची URL. एकाहून अधिक URL दिल्यास, प्रथम ते दिलेल्या क्रमाने प्रत्येक सर्व्हरवर एक-एक करून प्रयत्न केले जातील, जोपर्यंत कोणीतरी यशस्वी प्रतिसाद देत नाही तोपर्यंत. जे सर्व्हर प्रतिसाद देत नाहीत, त्यांना ते परत ऑनलाइन येईपर्यंत तात्पुरते दुर्लक्षित केले जाईल.", + "maintenance_restore_backup_unknown_version": "बॅकअप आवृत्ती निश्चित करता आली नाही.", + "maintenance_restore_database_backup": "डेटाबेस बॅकअप पुनर्संचयित करा", + "maintenance_restore_database_backup_description": "बॅकअप फाइल वापरून डेटाबेसच्या पूर्वीच्या स्थितीत परत करा", "maintenance_settings": "देखभाल", "maintenance_settings_description": "Immich ला देखभाल मोडमध्ये ठेवा.", "maintenance_start": "देखभाल मोड सुरू करा", "maintenance_start_error": "देखभाल मोड सुरू करण्यात अयशस्वी.", + "maintenance_upload_backup": "डेटाबेस बॅकअप फाइल अपलोड करा", + "maintenance_upload_backup_error": "बॅकअप अपलोड करता आला नाही, हे .sql/.sql.gz फाइल आहे का?", "manage_concurrency": "समांतरता व्यवस्थापित करा", "manage_log_settings": "लॉग सेटिंग्ज नियंत्रण करा", "map_dark_style": "गडद शैली", @@ -245,7 +272,7 @@ "oauth_auto_register": "स्वयंचलित नोंदणी करा", "oauth_auto_register_description": "OAuth सह साइन इन केल्यावर नवीन वापरकर्त्यांची आपोआप नोंदणी करा", "oauth_button_text": "बटण मजकूर", - "oauth_client_secret_description": "PKCE (प्रूफ की फॉर कोड एक्सचेंज) OAuth प्रदात्याद्वारे समर्थित नसल्यास आवश्यक", + "oauth_client_secret_description": "PKCE (प्रूफ की फॉर कोड एक्सचेंज) OAuth प्रदात्याद्वारे समर्थित नसल्यास आवश्यक.", "oauth_enable_description": "OAuth सह लॉगिन करा", "oauth_mobile_redirect_uri": "मोबाइल रीडायरेक्ट URI", "oauth_mobile_redirect_uri_override": "मोबाईल रीडायरेक्ट URI अधिलेखन", @@ -273,6 +300,9 @@ "refreshing_all_libraries": "सर्व लायब्ररी रीफ्रेश करीत आहे", "registration": "प्रशासक नोंदणी", "registration_description": "आपण प्रणालीवरील पहिले वापरकर्ता आहात, म्हणून आपल्याला प्रशासक म्हणून नियुक्त केले जाईल आणि प्रशासकीय कार्ये आपल्याद्वारे हाताळली जातील; तसेच इतर वापरकर्ते आपण तयार कराल.", + "release_channel_release_candidate": "रिलीज कॅंडिडेट", + "release_channel_stable": "स्थिर", + "remove_failed_jobs": "अपयशी झालेल्या कामांना काढून टाका", "require_password_change_on_login": "पहिल्या लॉगिनवर वापरकर्त्यास पासवर्ड बदलण्याची आवश्यकता असेल", "reset_settings_to_default": "सेटिंग्ज डीफॉल्टवर रीसेट करा", "reset_settings_to_recent_saved": "सेटिंग्ज अलीकडील जतन केलेल्या सेटिंग्जवर रीसेट करा", @@ -285,8 +315,10 @@ "server_public_users_description": "सार्वजनिक अल्बममध्ये वापरकर्ता जोडताना सर्व वापरकर्त्यांची (नाव व ईमेल) यादी दर्शवली जाते. अक्षम केल्यास, ही यादी फक्त प्रशासकांसाठीच उपलब्ध असेल.", "server_settings": "सर्व्हर सेटिंग्ज", "server_settings_description": "सर्व्हर सेटिंग्ज व्यवस्थापित करा", + "server_stats_page_description": "प्रशासकीय सर्व्हर सांख्यिकी पृष्ठ", "server_welcome_message": "स्वागत संदेश", "server_welcome_message_description": "लॉगिन पृष्ठावर दर्शविण्यात येणारा संदेश।", + "settings_page_description": "प्रशासकीय सेटिंग्ज पृष्ठ", "sidecar_job": "साइडकार मेटाडेटा", "sidecar_job_description": "फाईल सिस्टममधून साइडकार मेटाडेटा शोधा किंवा समक्रमित करा", "slideshow_duration_description": "प्रत्येक प्रतिमा किती सेकंद प्रदर्शित करायची", @@ -364,6 +396,10 @@ "transcoding_preferred_hardware_device_description": "केवळ VAAPI आणि QSV साठी लागू. हार्डवेअर ट्रान्सकोडिंग साठी वापरला जाणारा DRI नोड सेट करा.", "transcoding_preset_preset": "प्रीसेट (–preset)", "transcoding_preset_preset_description": "संकुचन गती. किंचित मंद प्रीसेट्स लहान फाइल तयार करतात आणि ठराविक बिटरेटसाठी गुणवत्ता वाढवतात. VP9 ‘faster’ पेक्षा जास्त गती लक्षात घेत नाही.", + "transcoding_realtime": "रिअल-टाइम ट्रान्सकोडिंग [प्रयोगात्मक]", + "transcoding_realtime_description": "व्हिडिओ प्रक्षेपित होत असताना रिअल-टाइममध्ये ट्रान्सकोडिंग करण्याची परवानगी देते. गुणवत्ता स्विचिंग सक्षम करते, परंतु सर्व्हरच्या क्षमतेवर अवलंबून प्लेबॅकमध्ये अधिक विलंब आणि अडथळे येऊ शकतात.", + "transcoding_realtime_enabled": "रिअल-टाइम ट्रान्सकोडिंग सक्षम करा", + "transcoding_realtime_enabled_description": "अक्षम केल्यास, सर्व्हर नवीन रिअल-टाइम ट्रान्सकोडिंग सत्रे सुरू करण्यास नकार देईल.", "transcoding_reference_frames": "संदर्भ फ्रेम्स", "transcoding_reference_frames_description": "दिलेल्या फ्रेमचे संकुचन करताना किती फ्रेम्स संदर्भित कराव्यात हे ठरवते. जास्त मूल्ये संकुचन कार्यक्षमतेत सुधारणा करतात, परंतु एन्कोडिंग मंद करतात. 0 ठेवल्यास हे स्वयंचलितपणे सेट होते.", "transcoding_required_description": "फक्त मान्य प्रारूपात नसलेले व्हिडिओ", @@ -405,6 +441,10 @@ "user_restore_scheduled_removal": "वापरकर्ता पुनर्संचयित करा – नियोजित हटविण्याची तारीख {date, date, long}", "user_settings": "वापरकर्ता सेटिंग्ज", "user_settings_description": "वापरकर्ता सेटिंग्ज व्यवस्थापित करा", + "user_successfully_removed": "वापरकर्ता {email} यशस्वीरित्या काढून टाकण्यात आला आहे.", + "users_page_description": "प्रशासक वापरकर्त्यांचे पृष्ठ", + "version_check_channel": "विमोचन मार्ग", + "version_check_channel_description": "आपल्याला आवृत्ती घोषणा मिळवायच्या असलेल्या प्रकाशन चॅनेलची निवड करा", "version_check_enabled_description": "आवृत्ती तपासणी सक्षम करा", "version_check_implications": "आवृत्ती तपासणी वैशिष्ट्य {server} सोबत आवर्ती संवादावर अवलंबून आहे", "version_check_settings": "आवृत्ती तपासणी", @@ -416,6 +456,9 @@ "admin_password": "प्रशासक पासवर्ड", "administration": "प्रशासन", "advanced": "प्रगत", + "advanced_settings_clear_image_cache": "प्रतिमा कॅश हटवा", + "advanced_settings_clear_image_cache_error": "प्रतिमा कॅश साफ करण्यात अयशस्वी", + "advanced_settings_clear_image_cache_success": "यशस्वीरित्या {size} पार केले", "advanced_settings_log_level_title": "लॉग पातळी: {level}", "advanced_settings_prefer_remote_subtitle": "काही उपकरणे स्थानिक अॅसेटमधून थंबनेल लोड करण्यात खूप मंद आहेत. त्याऐवजी रिमोट प्रतिमा लोड करण्यासाठी हा सेटिंग सक्षम करा.", "advanced_settings_prefer_remote_title": "रिमोट प्रतिमा पसंत करा", @@ -448,6 +491,7 @@ "album_summary": "अल्बम सारांश", "album_updated": "अल्बम अद्यतनित", "album_updated_setting_description": "शेअर केलेल्या अल्बममध्ये नवीन फाईल्स आल्यास ईमेल सूचनार्थ प्राप्त करा", + "album_upload_assets": "आपल्या संगणकातून फाइल्स अपलोड करा आणि अल्बममध्ये जोडा", "album_viewer_appbar_share_err_delete": "अल्बम हटवण्यात अयशस्वी", "album_viewer_page_share_add_users": "वापरकर्ते जोडा", "album_with_link_access": "लिंक असलेल्या कोणत्याही व्यक्तीस या अल्बममधील फोटो आणि लोक पाहता येतील.", @@ -460,12 +504,16 @@ "all": "सर्व", "all_albums": "सर्व अल्बम्स", "all_people": "सर्व लोक", + "all_photos": "सर्व फोटो", "all_videos": "सर्व व्हिडिओ", "allow_dark_mode": "डार्क मोडला परवानगी द्या", "allow_public_user_to_download": "सार्वजनिक वापरकर्त्यांना डाउनलोड करण्याची परवानगी द्या", "allow_public_user_to_upload": "सार्वजनिक वापरकर्त्यांना अपलोड करण्याची परवानगी द्या", "allowed": "परवानगी आहे", "alt_text_qr_code": "QR कोड प्रतिमा", + "always_keep": "नेहमी ठेवा", + "always_keep_photos_hint": "Free Up Space या डिव्हाइसवरील सर्व फोटो जपून ठेवेल.", + "always_keep_videos_hint": "Free Up Space या डिव्हाइसवरील सर्व व्हिडिओ जपून ठेवेल.", "api_key": "एपीआई की", "api_key_description": "हा मूल्य एकदाच दाखविला जाईल. कृपया विंडो बंद करण्यापूर्वी ते कॉपी करायला विसरू नका.", "api_key_empty": "आपले API की नाव रिक्त असू नये", @@ -490,6 +538,8 @@ "are_you_sure_to_do_this": "तुम्हाला हे खरंच करायचे आहे का?", "asset_added_to_album": "अल्बममध्ये जोडले गेले", "asset_adding_to_album": "अल्बममध्ये जोडत आहे…", + "asset_created": "अ‍ॅसेट तयार करण्यात आला", + "asset_day_count": "{date}: {count, plural, एक {# asset} इतर {# assets}}", "asset_description_updated": "साधनाचे वर्णन अद्यावत केले गेले आहे", "asset_hashing": "हॅशिंग…", "asset_list_group_by_sub_title": "गटानुसार गटबद्ध करा", @@ -498,6 +548,9 @@ "asset_list_layout_sub_title": "लेआउट", "asset_list_settings_subtitle": "फोटो ग्रिड लेआउट सेटिंग्ज", "asset_list_settings_title": "फोटो ग्रिड", + "asset_not_found_on_device_android": "उपकरणावर अ‍ॅसेट सापडली नाही", + "asset_not_found_on_device_ios": "डिव्हाइसवर अ‍ॅसेट सापडला नाही. जर आपण iCloud वापरत असाल, तर iCloud मध्ये संग्रहित खराब फाइलमुळे तो अ‍ॅसेट उपलब्ध नसेल", + "asset_not_found_on_icloud": "iCloud वर अ‍ॅसेट सापडला नाही. iCloud मध्ये संग्रहित खराब फाइलमुळे हा अ‍ॅसेट उपलब्ध नसू शकतो", "asset_offline": "साधन ऑफलाइन आहे", "asset_offline_description": "हे बाह्य साधन आता डिस्कवर सापडत नाही. मदतीसाठी आपल्या Immich प्रशासकाशी संपर्क करा.", "asset_skipped": "वगळले", @@ -562,12 +615,14 @@ "backup_options": "बॅकअप पर्याय", "backup_settings_subtitle": "अपलोड सेटिंग्ज व्यवस्थापित करा", "backward": "मागासलेले", + "battery_optimization_backup_reliability": "बॅटरी ऑप्टिमायझेशन अक्षम केल्याने पार्श्वभूमी बॅकअपची विश्वसनीयता सुधारू शकते", "biometric_auth_enabled": "बायोमेट्रिक प्रमाणीकरण चालू आहे", "biometric_locked_out": "आपण बायोमेट्रिक प्रमाणीकरणापासून लॉक आहात", "biometric_no_options": "कोणतेही बायोमेट्रिक पर्याय उपलब्ध नाहीत", "biometric_not_available": "या डिव्हाइसवर बायोमेट्रिक प्रमाणीकरण उपलब्ध नाही", "birthdate_set_description": "फोटोच्या वेळी या व्यक्तीचे वय मोजण्यासाठी जन्मतारीख वापरली जाते.", "blurred_background": "पार्श्वभूमी धुसळलेली", + "browse_templates": "टॅम्पलेट्स ब्राउझ करा", "bugs_and_feature_requests": "बग्ज & फिचर विनंत्या", "build": "तयार करा", "build_image": "इमेज तयार करा", @@ -587,6 +642,7 @@ "cannot_update_the_description": "वर्णन अद्यतनित करता येणार नाही", "cast": "कास्ट", "cast_description": "उपलब्ध कास्ट गंतव्ये कॉन्फिगर करा", + "change": "बदल", "change_date": "तारीख बदला", "change_description": "वर्णन बदला", "change_display_order": "प्रदर्शन क्रम बदला", @@ -608,17 +664,34 @@ "charging": "चार्जिंग", "charging_requirement_mobile_backup": "बॅकग्राउंड बॅकअपसाठी उपकरण चार्ज होत असणे आवश्यक आहे", "check_logs": "लॉग्ज तपासा", + "checksum": "चेकसम", + "choose": "निवडा", "choose_matching_people_to_merge": "विलीन करण्यासाठी जुळणारे लोक निवडा", "city": "शहर", + "cleanup_confirm_description": "Immich ने {count} अ‍ॅसेट({date} पूर्वी तयार केलेल्या) सर्व्हरवर सुरक्षितपणे बॅकअप केल्या आढळल्या. या डिव्हाइसमधील स्थानिक प्रती काढून टाकाव्यात का?", + "cleanup_confirm_prompt_title": "या उपकरणातून काढून टाकायचे?", + "cleanup_deleted_assets": "{count} मालमत्ता डिव्हाइसच्या कचऱ्यात हलवल्या", + "cleanup_deleting": "कचऱ्यात हलवत आहे...", + "cleanup_found_assets": "{count} बॅकअप केलेल्या मालमत्ता आढळल्या", + "cleanup_found_assets_with_size": "{count} बॅकअप केलेल्या मालमत्ता आढळल्या ({size})", + "cleanup_icloud_shared_albums_excluded": "iCloud सामायिक अल्बम्स स्कॅनमधून वगळले जातात", + "cleanup_no_assets_found": "वरील निकषांनुसार कोणतीही मालमत्ता सापडली नाही. फ्री अप स्पेस फक्त ती मालमत्ता हटवू शकते ज्याचे सर्व्हरवर बॅकअप घेतले गेले आहेत", + "cleanup_preview_title": "काढून टाकण्यासाठीची अ‍ॅसेट({count})", + "cleanup_step3_description": "तुमच्या तारखेनुसार बॅकअप झालेल्या अ‍ॅसेट स्कॅन करा आणि सेटिंग्ज जतन करा.", + "cleanup_step4_summary": "{count} अ‍ॅसेट({date} पूर्वी तयार केलेली) आपल्या स्थानिक उपकरणातून काढण्यासाठी. फोटो Immich अॅपमधून उपलब्ध राहतील.", + "cleanup_trash_hint": "साठवणुकीची जागा पूर्णपणे परत मिळवण्यासाठी, सिस्टम गॅलरी अॅप उघडा आणि कचरा रिकामी करा", "clear": "साफ करा", "clear_all": "सर्व साफ करा", "clear_all_recent_searches": "सर्व शोध इतिहास मिटवा", + "clear_failed_count": "हटवणे अयशस्वी झाले ({count})", "clear_file_cache": "फाईल कॅश मिटवा", "clear_message": "संदेश मिटवा", "clear_value": "मूल्य मिटवा", "client_cert_import": "आयात करा", "client_cert_import_success_msg": "क्लायंट प्रमाणपत्र आयात झाले", "client_cert_invalid_msg": "अवैध प्रमाणपत्र फाईल किंवा चुकीचा संकेतशब्द", + "client_cert_password_message": "या प्रमाणपत्रासाठी पासवर्ड प्रविष्ट करा", + "client_cert_password_title": "प्रमाणपत्र संकेतशब्द", "client_cert_remove_msg": "क्लायंट प्रमाणपत्र काढून टाकले", "client_cert_subtitle": "फक्त PKCS12 (.p12, .pfx) फॉरमॅटला समर्थन आहे. सर्टिफिकेट आयात/काढणे फक्त लॉगिनपूर्वी उपलब्ध आहे", "client_cert_title": "SSL क्लायंट प्रमाणपत्र [प्रायोगिक]", @@ -626,12 +699,19 @@ "collapse": "संकुचित करा", "collapse_all": "सर्व संकुचित करा", "color": "रंग", + "command": "आदेश", + "command_palette_prompt": "पृष्ठे, क्रिया किंवा आदेश पटकन शोधा", + "command_palette_to_close": "बंद करण्यासाठी", + "command_palette_to_navigate": "प्रवेश करण्यासाठी", + "command_palette_to_select": "निवडण्यासाठी", + "command_palette_to_show_all": "सर्व दाखवण्यासाठी", "comment_deleted": "टिप्पणी हटवली", "comment_options": "टिप्पणी पर्याय", "comments_and_likes": "टिप्पण्या & लाईक्स", "comments_are_disabled": "टिप्पण्या अक्षम आहेत", "common_create_new_album": "नवीन अल्बम तयार करा", "completed": "पूर्ण झाले", + "configuration": "संरचना", "confirm": "पुष्टी करा", "confirm_admin_password": "ऍडमिन संकेतशब्द पुष्टी करा", "confirm_delete_face": "तुम्हाला {name} चे चेहरा या फाईलमधून हटवायचे आहे का?", @@ -646,6 +726,7 @@ "contain": "समाविष्ट करा", "context": "संदर्भ", "continue": "पुढे", + "control_bottom_app_bar_add_tags": "टॅग जोडा", "control_bottom_app_bar_delete_from_local": "उपकरणातून हटवा", "control_bottom_app_bar_edit_location": "स्थान संपादित करा", "control_bottom_app_bar_edit_time": "तारीख व वेळ संपादित करा", @@ -654,6 +735,7 @@ "copied_to_clipboard": "क्लिपबोर्डवर कॉपी झाले!", "copy_error": "कॉपी करताना त्रुटी", "copy_image": "प्रतिमा कॉपी करा", + "copy_json": "JSON कॉपी करा", "copy_link": "लिंक कॉपी करा", "copy_link_to_clipboard": "लिंक क्लिपबोर्डवर कॉपी करा", "copy_password": "संकेतशब्द कॉपी करा", @@ -665,6 +747,7 @@ "create_album": "अल्बम तयार करा", "create_album_page_untitled": "शीर्षकेतर", "create_api_key": "API की तयार करा", + "create_first_workflow": "पहिला वर्कफ्लो तयार करा", "create_library": "लायब्ररी तयार करा", "create_link": "लिंक तयार करा", "create_link_to_share": "शेअर करण्यासाठी लिंक तयार करा", @@ -673,33 +756,46 @@ "create_new_person": "नवीन व्यक्ती तयार करा", "create_new_person_hint": "निवडलेल्या फाईल्स नवीन व्यक्तीशी जोडा", "create_new_user": "नवीन वापरकर्ता तयार करा", + "create_person": "व्यक्ती तयार करा", + "create_person_subtitle": "नवीन व्यक्ती तयार करण्यासाठी आणि टॅग करण्यासाठी निवडलेल्या चेहऱ्यावर नाव जोडा", "create_shared_album_page_share_add_assets": "फाईल्स जोडा", "create_shared_album_page_share_select_photos": "फोटो निवडा", "create_shared_link": "शेअर लिंक तयार करा", "create_tag": "टॅग तयार करा", "create_tag_description": "नवीन टॅग तयार करा. सबटॅगसाठी पूर्ण पाथसहित नाव टाका।", "create_user": "वापरकर्ता तयार करा", + "create_workflow": "कार्यप्रवाह तयार करा", "created": "तयार केले", "created_at": "निर्मिती तारीख", "creating_linked_albums": "लिंक केलेले अल्बम तयार करत आहे...", "crop": "छाटणी करा", + "crop_aspect_ratio_free": "रिक्त", + "crop_aspect_ratio_original": "मूळ", + "crop_aspect_ratio_square": "चौरस", "current_device": "वर्तमान उपकरण", "current_pin_code": "चालू PIN कोड", "current_server_address": "सर्व्हर पत्ता", + "custom_date": "सानुकूल तारीख", "custom_locale": "भाषा व क्षेत्र", "custom_locale_description": "दिनांक व संख्या भाषेनुसार व क्षेत्रानुसार format करा", - "custom_url": "सानुकूल URL", + "cutoff_date_description": "शेवटच्या… पासूनचे फोटो ठेवा…", + "cutoff_day": "{count, plural, one {दिवस} other {दिवस}}", + "cutoff_year": "{count, plural, one {वर्ष} other {वर्ष}}", "dark": "डार्क", "dark_theme": "डार्क थीम बदल", "date": "तारीख", "date_after": "नंतरची तारीख", "date_and_time": "दिनांक व वेळ", "date_before": "पूर्वची तारीख", + "date_of_birth": "जन्म तारीख", "date_of_birth_saved": "जन्मतारीख जतन झाली", "date_range": "तारीख श्रेणी", + "date_time_original": "मूळ तारीख/वेळ", "day": "दिवस", "days": "अनेक दिवस", "deduplicate_all": "सर्व डुप्लिकेट काढा", + "default_quality_subtitle": "शेअर टॅप करताना वापरली जाणारी गुणवत्ता. प्रत्येक वेळी निवडण्यासाठी शेअर बटण दीर्घकाळ दाबा.", + "default_share_quality": "डीफॉल्ट शेअर गुणवत्ता", "delete": "हटवा", "delete_action_confirmation_message": "तुम्हाला ही फाईल हटवायची आहे का? ही क्रिया सर्व्हरच्या ट्रॅशमध्ये हलवेल आणि स्थानिकपणे हटवायचे का ते विचारेल", "delete_action_prompt": "{count} हटवले", @@ -730,6 +826,7 @@ "deselect_all": "सर्व निवड रद्द करा", "details": "तपशील", "direction": "दिशा", + "disable": "अक्षम करा", "disabled": "अक्षम", "discord": "डिस्कॉर्ड", "discover": "शोधा", @@ -751,16 +848,21 @@ "download_include_embedded_motion_videos": "एम्बेड केलेली व्हिडिओ", "download_include_embedded_motion_videos_description": "मोशन फोटोमधील एम्बेड केलेली व्हिडिओ स्वतंत्र फाईल म्हणून समाविष्ट करा", "download_notfound": "डाउनलोड आढळला नाही", + "download_original": "मूळ डाउनलोड करा", "download_paused": "डाउनलोड थांबवला", "download_settings": "डाउनलोड सेटिंग्ज", "download_settings_description": "फाईल डाउनलोड संबंधित सेटिंग्ज व्यवस्थापित करा", "download_waiting_to_retry": "पुन्हा प्रयत्न करण्याची प्रतीक्षा", "downloading": "डाउनलोड करत आहे", "downloading_asset_filename": "{filename} डाउनलोड करत आहे", + "downloading_from_icloud": "iCloud वरून डाउनलोड करत आहे", "downloading_media": "मीडिया डाउनलोड करत आहे", + "drag_to_reorder": "पुनर्क्रम करण्यासाठी ओढा", "drop_files_to_upload": "अपलोडसाठी फाईल्स इथे ड्रॉप करा", + "duplicate": "प्रतिलिपी", + "duplicate_workflow": "प्रतिलिपी कार्यप्रवाह", "duplicates": "डुप्लिकेट्स", - "duplicates_description": "प्रत्येक गटातले डुप्लिकेट फाईल्स निवडा", + "duplicates_description": "प्रत्येक गटातले डुप्लिकेट फाईल्स निवडा.", "duration": "कालावधी", "edit": "संपादित करा", "edit_album": "अल्बम संपादित करा", @@ -783,7 +885,15 @@ "edit_tag": "टॅग संपादित करा", "edit_title": "शीर्षक संपादित करा", "edit_user": "वापरकर्ता संपादित करा", + "edit_workflow": "कार्यप्रवाह संपादित करा", "editor": "एडिटर", + "editor_discard_edits_confirm": "संपादन रद्द करा", + "editor_discard_edits_prompt": "आपल्याकडे जतन न केलेल्या संपादना आहेत. आपण त्या टाकून द्यायच्या आहात का?", + "editor_discard_edits_title": "बदल रद्द करायचे का?", + "editor_edits_applied_error": "बदल लागू करण्यात अयशस्वी", + "editor_edits_applied_success": "बदल लागू करण्यात यशस्वी", + "editor_flip_horizontal": "आडवे पलटवा", + "editor_flip_vertical": "उभे पलटवा", "email": "ईमेल", "email_notifications": "ईमेल सूचना", "empty_folder": "हा फोल्डर रिकामा आहे", @@ -1128,9 +1238,9 @@ "login_form_failed_login": "लॉगिन करताना त्रुटी, सर्व्हर URL, ईमेल आणि पासवर्ड तपासा", "login_form_handshake_exception": "सर्व्हरसह handshake exception आली. तुम्ही self-signed प्रमाणपत्र वापरत असाल तर सेटिंग्जमध्ये self-signed प्रमाणपत्र समर्थन सक्षम करा.", "login_form_password_hint": "पासवर्ड", - "login_form_server_empty": "सर्व्हर URL भरा.", - "login_form_server_error": "सर्व्हरशी जोडता आले नाही.", - "login_has_been_disabled": "लॉगिन बंद केले आहे.", + "login_form_server_empty": "सर्व्हर URL भरा", + "login_form_server_error": "सर्व्हरशी जोडता आले नाही", + "login_has_been_disabled": "लॉगिन बंद केले आहे", "login_password_changed_error": "पासवर्ड अपडेट करताना त्रुटी आली", "login_password_changed_success": "पासवर्ड यशस्वीपणे अपडेट झाला", "logout_all_device_confirmation": "तुम्हाला नक्की सर्व डिव्हाइसवरून लॉग आऊट करायचे आहे का?", @@ -1495,7 +1605,7 @@ "reset_pin_code_description": "तुमचा PIN विसरला असल्यास, तो रीसेट करण्यासाठी सर्व्हर प्रशासकाशी संपर्क साधा", "reset_pin_code_with_password": "पासवर्डने तुम्ही नेहमी PIN कोड रीसेट करू शकता", "reset_sqlite": "SQLite डेटाबेस रीसेट करा", - "reset_sqlite_confirmation": "तुम्हाला नक्की SQLite डेटाबेस रीसेट करायचा आहे का? डेटा पुन्हा समक्रमित करण्यासाठी तुम्हाला लॉगआउट करून पुन्हा लॉगइन करावे लागेल", + "reset_sqlite_confirmation": "तुम्हाला नक्की SQLite डेटाबेस रीसेट करायचा आहे का? डेटा पुन्हा समक्रमित करण्यासाठी तुम्हाला लॉगआउट करून पुन्हा लॉगइन करावे लागेल.", "reset_sqlite_success": "SQLite डेटाबेस यशस्वीरीत्या रीसेट केला", "reset_to_default": "डीफॉल्टवर रीसेट करा", "resolution": "रेझोल्यूशन", diff --git a/i18n/ms.json b/i18n/ms.json index adbe98e86e..2190b115f1 100644 --- a/i18n/ms.json +++ b/i18n/ms.json @@ -72,6 +72,7 @@ "cron_expression_description": "Tetapkan selang imbasan menggunakan format cron. Untuk maklumat lanjut, sila rujuk ke sebagai contoh Crontab Guru", "cron_expression_presets": "Pratetap-pratetap ungkapan Cron", "disable_login": "Lumpuhkan fungsi log masuk", + "download_csv": "Muat turun CSV", "duplicate_detection_job_description": "Jalankan pembelajaran mesin pada aset untuk mengesan imej yang serupa. Bergantung pada Carian Pintar", "exclusion_pattern_description": "Corak pengecualian membolehkan anda mengabaikan fail dan folder semasa mengimbas pustaka anda. Ini berguna jika anda mempunyai folder yang mengandungi fail yang anda tidak mahu import, seperti fail RAW.", "export_config_as_json_description": "Muat turun konfigurasi sistem semasa sebagai fail JSON", @@ -104,6 +105,9 @@ "image_thumbnail_quality_description": "Kualiti lakaran kenit daripada 1-100. Lebih tinggi adalah lebih baik, tetapi menghasilkan fail yang lebih besar dan boleh mengurangkan responsif apl.", "image_thumbnail_title": "Tetapan Lakaran Kenit", "import_config_from_json_description": "Import konfigurasi sistem melalui muat naik fail JSON", + "integrity_checks_checksum_files_time_limit": "Had masa", + "integrity_checks_missing_files": "Fail hilang", + "integrity_checks_missing_files_description": "Tetapkan pengaktifan dan kekerapan penyemak fail hilang", "job_concurrency": "Konkurensi {job}", "job_created": "Tugas yang dicipta", "job_not_concurrency_safe": "Konkurensi tugas ini tidak selamat.", @@ -131,6 +135,7 @@ "logging_enable_description": "Dayakan pengelogan", "logging_level_description": "Apabila didayakan, tahap log yang hendak digunakan.", "logging_settings": "Log", + "machine_learning_availability_checks_description": "Kesan dan pilih pelayan kecerdasan buatan secara automatik", "machine_learning_clip_model": "Model CLIP", "machine_learning_clip_model_description": "Nama model CLIP disenaraikan di sini. Ambil perhatian bahawa anda mesti menjalankan semula tugas 'Carian Pintar' untuk semua imej selepas menukar model.", "machine_learning_duplicate_detection": "Pengesanan Pendua", @@ -153,11 +158,14 @@ "machine_learning_min_detection_score_description": "Skor keyakinan minimum untuk wajah dikesan dari 0-1. Nilai yang lebih rendah akan mengesan lebih banyak muka tetapi mungkin menghasilkan positif palsu.", "machine_learning_min_recognized_faces": "Minimum mengenali wajah", "machine_learning_min_recognized_faces_description": "Bilangan minima wajah yang dikenali untuk seseorang dicipta. Peningkatan ini menjadikan Pengecaman Wajah lebih tepat atas kos meningkatkan peluang wajah tidak diberikan kepada seseorang.", + "machine_learning_ocr": "OCR", + "machine_learning_ocr_description": "Gunakan kecerdasan buatan untuk mengesan tulisan dalam gambar", "machine_learning_ocr_enabled": "Dayakan OCR", "machine_learning_ocr_enabled_description": "Jika dinyahdayakan, imej tidak akan melalui pengecaman teks.", - "machine_learning_ocr_max_resolution": "Resolusi Maksimum", + "machine_learning_ocr_max_resolution": "Resolusi maksimum", "machine_learning_ocr_max_resolution_description": "Pratonton yang melebihi resolusi ini akan diubah saiz sambil mengekalkan nisbah aspek. Nilai yang lebih tinggi adalah lebih tepat, tetapi mengambil masa pemprosesan yang lebih lama dan menggunakan lebih banyak memori.", "machine_learning_ocr_model": "Model OCR", + "machine_learning_ocr_model_description": "Model \"server\" lebih tepat berbanding model \"mobile\", tetapi proses lebih panjang dan menggunakan lebih memori.", "machine_learning_settings": "Tetapan Pembelajaran Mesin", "machine_learning_settings_description": "Urus ciri dan tetapan pembelajaran mesin", "machine_learning_smart_search": "Carian Pintar", @@ -165,6 +173,12 @@ "machine_learning_smart_search_enabled": "Dayakan carian pintar", "machine_learning_smart_search_enabled_description": "Jika ditutup, gambar-gambar tidak akan dikodkan untuk carian pintar.", "machine_learning_url_description": "URL pelayan pembelajaran mesin. Jika lebih daripada satu URL disediakan, setiap pelayan akan dicuba satu demi satu mengikut turutan, dari yang pertama hingga yang terakhir, sehingga salah satu memberi maklum balas yang berjaya. Pelayan yang tidak memberi maklum balas akan diabaikan sementara sehingga ia kembali dalam talian.", + "maintenance_integrity_checksum_mismatch": "Checksum Tidak Sepadan", + "maintenance_integrity_missing_file": "Fail-fail Hilang", + "maintenance_integrity_missing_file_description": "Fail yang dikesan Immich didalam pangkalan data, tetapi tidak wujud didalam sistem.", + "maintenance_integrity_missing_file_job": "Periksa fail yang hilang", + "maintenance_integrity_missing_file_refresh_job": "Kemaskini laporan fail-fail hilang", + "maintenance_integrity_report": "Laporan integriti", "maintenance_settings": "Penyelenggaraan", "maintenance_settings_description": "Letak Immich ke dalam mod penyelenggaraan", "maintenance_start": "Mulakan mod penyelenggaraan", @@ -219,6 +233,8 @@ "notification_email_ignore_certificate_errors_description": "Abaikan ralat pengesahan sijil TLS (tidak disyorkan)", "notification_email_password_description": "Kata laluan untuk digunakan semasa membuat pengesahan dengan pelayan e-mel", "notification_email_port_description": "Port pelayan e-mel (cth 25, 465 atau 587)", + "notification_email_secure": "SMTPS", + "notification_email_secure_description": "Gunakan SMTPS (SMTP diatas TLS)", "notification_email_sent_test_email_button": "Hantar e-mel ujian dan simpan", "notification_email_setting_description": "Tetapan-tetapan untuk menghantar notifikasi e-mel", "notification_email_test_email": "Hantar e-mel ujian", @@ -235,6 +251,7 @@ "oauth_button_text": "Teks butang", "oauth_client_secret_description": "Diperlukan jika PKCE (Proof Key for Code Exchange) tidak disokong oleh penyedia OAuth", "oauth_enable_description": "Log masuk dengan OAuth", + "oauth_end_session_url_description": "Alihkan pengguna ke URI ini apabila mereka log keluar.", "oauth_mobile_redirect_uri": "URI ubah hala mudah alih", "oauth_mobile_redirect_uri_override": "Penggantian URI ubah hala mudah alih", "oauth_mobile_redirect_uri_override_description": "Aktifkan apabila pembekal OAuth tidak membenarkan URI mudah alih, seperti ''{callback}''", @@ -251,6 +268,7 @@ "oauth_storage_quota_default_description": "Kuota dalam GiB yang akan digunakan jika tiada tuntutan disediakan.", "oauth_timeout": "Had Masa Permintaan", "oauth_timeout_description": "Had masa untuk permintaan dalam milisaat", + "ocr_job_description": "Gunakan kecerdasan buatan untuk mengesan teks didalam gambar", "password_enable_description": "Log masuk dengan e-mel dan kata laluan", "password_settings": "Kata Laluan Log Masuk", "password_settings_description": "Urus tetapan-tetapan kata laluan log masuk", @@ -260,6 +278,7 @@ "refreshing_all_libraries": "Menyegarkan semua perpustakaan", "registration": "Pendaftaran Pentadbir", "registration_description": "Memandangkan anda adalah pengguna pertama pada sistem, anda akan ditugaskan sebagai Pentadbir dan bertanggungjawab untuk tugas pentadbiran, serta pengguna tambahan yang akan anda tambah.", + "release_channel_release_candidate": "Release candidate", "require_password_change_on_login": "Perlukan pengguna menukar kata laluan ketika log masuk pertama", "reset_settings_to_default": "Tetapkan semula tetapan kepada lalai", "reset_settings_to_recent_saved": "Tetapkan semula tetapan kepada tetapan yang disimpan baru-baru ini", @@ -351,6 +370,14 @@ "transcoding_preferred_hardware_device_description": "Terpakai hanya untuk VAAPI dan QSV. Menetapkan nod dri yang digunakan untuk transkod perkakasan.", "transcoding_preset_preset": "Pratetap (-preset)", "transcoding_preset_preset_description": "Kelajuan mampatan. Pratetap yang lebih perlahan menghasilkan fail yang lebih kecil dan meningkatkan kualiti apabila pada kadar bit tertentu. VP9 mengabaikan kelajuan di atas 'lebih cepat'.", + "transcoding_realtime": "Transkod Masa Nyata [PERCUBAAN]", + "transcoding_realtime_description": "Benarkan transkod dibuat pada masa nyata semasa video sedang ditonton. Membolehkan kualiti ditukar, tetapi video mungkin lambat dimainkan dan tersangkut-sangkut bergantung kepada keupayaan pelayan.", + "transcoding_realtime_enabled": "Aktifkan transkod masa nyata", + "transcoding_realtime_enabled_description": "Jika dinyahaktifkan, pelayan akan enggan memulakan sesi transkod masa nyata.", + "transcoding_realtime_resolutions": "Resolusi", + "transcoding_realtime_resolutions_description": "Resolusi yang ditawarkan untuk transkod masa nyata. Resolusi tinggi mungkin akan menjadi isu jika pelayan tidak cukup berupaya.", + "transcoding_realtime_video_codecs": "Kodek video", + "transcoding_realtime_video_codecs_description": "Kodek video yang ditawarkan untuk transkod masa nyata. Pemain video akan menggunakan kodek terbaik yang disokong. AV1 lebih cekap berbanding HEVC, HEVC lebih cekap berbanding H.264. Bila gunakan pecutan perkakasan, hanya pilih kodek yang disokong pemecut. Bila transkod gunakan pecutan perisian, maklum bahawa H.264 lebih pantas berbanding AV1, yang lebih pantas berbanding HEVC.", "transcoding_reference_frames": "Bingkai rujukan", "transcoding_reference_frames_description": "Bilangan bingkai untuk dirujuk semasa memampatkan bingkai yang diberikan. Nilai yang lebih tinggi meningkatkan kecekapan mampatan, tetapi memperlahankan pengekodan. 0 menetapkan nilai ini secara automatik.", "transcoding_required_description": "Hanya untuk video yang tidak dalam format yang diterima", @@ -365,7 +392,7 @@ "transcoding_tone_mapping": "Pemetaan nada", "transcoding_tone_mapping_description": "Percubaan untuk mengekalkan penampilan video HDR apabila ditukar kepada SDR. Setiap algoritma membuat pertukaran yang berbeza untuk warna, perincian dan kecerahan. Hable mengekalkan perincian, Mobius mengekalkan warna, dan Reinhard mengekalkan kecerahan.", "transcoding_transcode_policy": "Dasar transkod", - "transcoding_transcode_policy_description": "Dasar untuk bila video perlu ditranskod. Video HDR akan sentiasa ditranskod (kecuali jika pengekodan semula dinyahdayakan).", + "transcoding_transcode_policy_description": "Dasar untuk bila video perlu ditranskod. Video HDR serta video dengan format selain YUV 4:2:0 akan sentiasa ditranskod (kecuali jika transkod dinyahdayakan).", "transcoding_two_pass_encoding": "Pengekodan dua lelaran", "transcoding_two_pass_encoding_setting_description": "Transkod dalam dua lelaran untuk menghasilkan video yang ditranskod dengan kualiti lebih baik. Apabila kadar bit maksimum diaktifkan (diperlukan untuk berfungsi dengan H.264 dan HEVC), mod ini akan menggunakan julat kadar bit berdasarkan kadar bit maksimum dan mengabaikan CRF. Untuk VP9, CRF boleh digunakan jika kadar bit maksimum dinyahdayakan.", "transcoding_video_codec": "Kodek video", @@ -389,6 +416,9 @@ "user_restore_scheduled_removal": "Pulihkan pengguna – pemadaman dijadualkan pada {date, date, long}", "user_settings": "Tetapan Pengguna", "user_settings_description": "Urus tetapan pengguna", + "user_successfully_removed": "Pengguna {email} berjaya dihapuskan.", + "version_check_channel": "Saluran pelepasan", + "version_check_channel_description": "Pilih saluran pelepasan perisian yang anda mahu untuk menerima pengumuman versi", "version_check_enabled_description": "Dayakan semakan versi", "version_check_implications": "Ciri semakan versi bergantung kepada komunikasi berkala dengan {server}", "version_check_settings": "Semakan Versi", @@ -400,6 +430,9 @@ "admin_password": "Kata laluan Pentadbir", "administration": "Pentadbiran", "advanced": "Lanjutan", + "advanced_settings_clear_image_cache": "Bersihkan Cache Gambar", + "advanced_settings_clear_image_cache_error": "Gagal bersihkan cache gambar", + "advanced_settings_clear_image_cache_success": "Berjaya bersihkan {size}", "advanced_settings_log_level_title": "Tahap log: {level}", "advanced_settings_prefer_remote_subtitle": "Sesetengah peranti sangat perlahan untuk memuatkan imej kecil daripada aset lokal. Aktifkan tetapan ini untuk memuatkan imej dari jauh sebagai gantinya.", "advanced_settings_prefer_remote_title": "Utamakan imej jauh", @@ -412,19 +445,203 @@ "advanced_settings_troubleshooting_title": "Menyelesaikan masalah", "age_months": "Umur {bulan, plural, satu {# bulan} lain {# bulan}}", "age_year_months": "Umur 1 tahun, {bulan, plural, satu {# bulan} lain {# bulan}}", + "album": "Album", "album_added": "Album telah ditambah", "album_added_notification_setting_description": "Terima pemberitahuan e-mel apabila anda ditambah ke album perkongsian", "album_cover_updated": "Album dikemas kini", + "album_delete_confirmation": "Anda pasti untuk hapuskan album {album}?", + "album_delete_confirmation_description": "Jika album ini pernah dikongsi, pengguna lain tidak boleh mengaksesnya lagi.", + "album_deleted": "Album dihapuskan", + "album_info_updated": "Maklumat album dikemas kini", "album_name": "Nama Album", "album_remove_user": "Buang pengguna?", "album_remove_user_confirmation": "Adakah anda pasti mahu membuang {user}?", + "album_search_not_found": "Tiada album yang sepadan dengan carian", "album_share_no_users": "Nampaknya anda telah berkongsi album ini dengan semua pengguna atau anda tidak mempunyai mana-mana pengguna untuk dikongsi.", + "album_summary": "Ringkasan album", "album_updated": "Album dikemas kini", "album_updated_setting_description": "Terima pemberitahuan e-mel apabila album perkongsian mempunyai aset baharu", + "album_upload_assets": "Muat naik aset daripada komputer anda dan tambahkan kedalam album", + "album_viewer_appbar_share_err_delete": "Gagal menghapuskan album", + "album_viewer_page_share_add_users": "Tambah pengguna", "album_with_link_access": "Benarkan sesiapa yang mempunyai pautan melihat foto dan individu dalam album ini.", + "albums": "Album-album", + "albums_default_sort_order": "Susunan lalai album", + "albums_default_sort_order_description": "Susunan lalai aset apabila membuat album baru.", + "albums_feature_description": "Koleksi aset yang boleh dikongsi dengan pengguna lain.", + "albums_on_device_count": "Album pada peranti ({count})", + "all": "Semua", + "all_albums": "Semua album", + "all_photos": "Semua gambar", + "all_videos": "Semua video", + "allow_dark_mode": "Benarkan mod gelap", + "allow_public_user_to_download": "Benarkan pengguna awam untuk muat turun", + "allow_public_user_to_upload": "Benarkan pengguna awam untuk muat naik", + "allowed": "Dibenarkan", + "alt_text_qr_code": "Gambar QR kod", + "api_key": "Kunci API", + "api_key_description": "Kunci ini hanya ditunjukkan sekali sahaja. Pastikan anda simpan sebelum tutup tetingkap ini.", + "api_key_empty": "Nama bagi Kekunci API perlu diisi", + "api_keys": "Kekunci API", + "app_bar_signout_dialog_content": "Adakah anda pasti untuk log keluar?", + "app_bar_signout_dialog_title": "Log keluar", + "app_download_links": "Pautan Muat Turun Aplikasi", + "app_settings": "Tetapan App", + "app_update_available": "Kemaskini aplikasi tersedia", + "archive": "Arkib", + "archive_action_prompt": "{count} ditambah ke Arkib", + "archive_or_unarchive_photo": "Arkibkan atau nyaharkib gambar", + "archive_size": "Saiz Arkib", + "archive_size_description": "Tetapkan saiz arkib untuk muat turun (GiB)", + "archived": "Diarkibkan", + "are_these_the_same_person": "Adakah ini orang yang sama?", + "are_you_sure_to_do_this": "Anda pasti?", + "asset_added_to_album": "Ditambah ke album", + "asset_adding_to_album": "Menambahkan ke album…", + "asset_created": "Aset dicipta", + "asset_description_updated": "Penerangan aset dikemaskini", + "asset_list_layout_settings_group_by_month_day": "Bulan + hari", + "asset_list_layout_sub_title": "Susun atur", + "asset_not_found_on_device_android": "Aset tidak ditemui pada peranti", + "asset_not_found_on_device_ios": "Aset tidak ditemui pada peranti. Jika anda gunakan iCloud, aset mungkin tidak boleh diakses disebabkan oleh fail bermasalah yang disimpan di iCloud", + "asset_not_found_on_icloud": "Aset tidak ditemui pada iCloud, yang mungkin disebabkan oleh fail bermasalah yang disimpan di iCloud", + "asset_offline": "Aset Diluar Talian", + "asset_offline_description": "Aset luar tidak lagi dijumpai pada cakera. Hubungi admin Immich anda untuk bantuan.", + "asset_uploaded": "Telah dimuat naik", + "asset_uploading": "Dimuat naik…", + "assets": "Aset-aset", + "automatic_endpoint_switching_subtitle": "Sambung ke pelayan secara lokal melalui Wi-Fi yang ditetapkan dan gunakan sambungan alternatif selainnya", + "automatic_endpoint_switching_title": "Penukaran URL automatik", + "autoplay_slideshow": "Mainkan tayangan slaid", + "back": "Kembali", + "backup": "Sandaran", + "backup_album_selection_page_assets_scatter": "Aset mungkin tersebar pada banyak album. Oleh itu, album boleh dipilih atau dikecualikan semasa proses sandaran.", + "backup_album_selection_page_select_albums": "Pilih album", + "backup_album_selection_page_selection_info": "Maklumat pilihan", + "backup_background_service_complete_notification": "Sandaran aset selesai", + "backup_background_service_default_notification": "Sedang memeriksa aset baharu…", + "backup_background_service_in_progress_notification": "Sedang membuat sandaran aset anda…", + "backup_controller_page_albums": "Buat Sandaran Album", + "backup_controller_page_background_battery_info_link": "Tunjuk saya caranya", + "backup_controller_page_background_battery_info_ok": "OK", + "backup_controller_page_backup": "Sandaran", + "backup_controller_page_backup_selected": "Pilihan: ", + "backup_controller_page_excluded": "Pengecualian: ", + "backup_controller_page_none_selected": "Tiada yang dipilih", + "backup_controller_page_remainder": "Peringatan", + "backup_controller_page_remainder_sub": "Baki gambar dan video untuk sandaran daripada pilihan", + "backup_controller_page_server_storage": "Ruang Simpanan Pelayan", + "backup_controller_page_to_backup": "Album yang hendak disandarkan", + "backup_info_card_assets": "aset", + "backup_options": "Tetapan Sandaran", + "backup_settings_subtitle": "Tetapan muat naik", + "biometric_auth_enabled": "Pengesahan biometrik diaktifkan", + "biometric_not_available": "Pengesahan biometrik tidak tersedia pada peranti ini", + "birthdate_set_description": "Tarikh lahir digunakan untuk mengira umur beliau pada masa gambar ini diambil.", + "bugs_and_feature_requests": "Pepijat & Permintaan", + "buy": "Beli Immich", + "camera": "Kamera", + "camera_brand": "Jenama kamera", + "camera_model": "Model kamera", + "cancel": "Batal", + "cancel_search": "Batalkan carian", + "canceled": "Dibatalkan", + "canceling": "Sedang membatalkan", + "cannot_merge_people": "Tidak boleh gabung orang", + "cannot_undo_this_action": "Tindakan ini tidak boleh dibatalkan!", + "cannot_update_the_description": "Gagal kemaskini penerangan", + "change": "Ubah", + "change_date": "Ubah tarikh", + "change_description": "Ubah penerangan", + "change_display_order": "Ubah susunan paparan", + "change_location": "Ubah lokasi", + "change_name": "Ubah nama", + "change_name_successfully": "Nama telah ditukar", + "change_password": "Tukar Kata Laluan", + "change_password_description": "Katalaluan baru diperlukan kerana ini adalah kali pertama anda log masuk atau pemohonan kata laluan diubah pernah dibuat. Letakkan katalaluan baru dibawah.", + "change_password_form_confirm_password": "Sahkan Katalaluan", + "change_password_form_description": "Hi {name},\n\nKatalaluan perlu diubah kerana ini mungkin kali pertama anda log masuk atau permohonan untuk tukar katalaluan telah dibuat. Sila masukkan katalaluan baru dibawah.", + "change_password_form_log_out": "Log keluar kesemua peranti lain", + "change_password_form_log_out_description": "Disyorkan untuk log keluar kesemua peranti lain", + "change_password_form_new_password": "Katalaluan baru", + "change_password_form_password_mismatch": "Katalaluan tidak sepadan", + "change_password_form_reenter_new_password": "Masukkan semula Katalaluan", + "change_pin_code": "Tukar kod PIN", + "change_your_password": "Tukar Katalaluan", + "check_logs": "Periksa Log", + "choose": "Pilih", + "choose_matching_people_to_merge": "Pilih orang yang sepadan untuk digabungkan", + "city": "Bandar", + "cleanup_confirm_description": "Immich menemui{count} aset (dicipta sebelum {date}) yang selamat disimpan didalam pelayan. Buang salinan daripada peranti ini?", + "cleanup_confirm_prompt_title": "Buang daripada peranti ini?", + "cleanup_preview_title": "Aset untuk dibuang ({count})", + "clear": "Bersihkan", + "clear_all": "Bersihkan semua", + "clear_all_recent_searches": "Bersihkan semua carian terkini", + "clear_failed_count": "Gagal dibersihkan ({count})", + "clear_file_cache": "Bersihkan Cache Fail", + "clear_message": "Padam mesej", + "clear_value": "Padam nilai", + "client_cert_import": "Import", + "client_cert_password_message": "Masukkan katalaluan bagi sijil ini", + "client_cert_password_title": "Katalaluan Sijil", + "client_cert_subtitle": "Menyokong format PKCS12 (.p12, .pfx) sahaja. Import/hapus sijil hanya tersedia sebelum log masuk", + "client_cert_title": "Sijil SSL [PERCUBAAN]", + "close": "Tutup", + "color": "Warna", + "command": "Arahan", + "comment_deleted": "Arahan dipadam", + "comment_options": "Tetapan komen", + "comments_and_likes": "Komen & suka", + "comments_are_disabled": "Komen tidak diaktifkan", + "common_create_new_album": "Cipta album baru", + "completed": "Selesai", + "configuration": "Tetapan", + "confirm": "Pasti", + "confirm_delete_face": "Anda pasti untuk padam wajah {name} daripada aset?", + "confirm_delete_shared_link": "Anda pasti untuk menghapuskan pautan awam ini?", + "confirm_new_pin_code": "Sahkan PIN kod baru", + "confirm_password": "Sahkan katalaluan", + "confirm_tag_face": "Anda mahu tandakan wajah ini sebagai {name}?", + "confirm_tag_face_unnamed": "Adakah anda mahu tandakan wajah ini?", + "connected_device": "Peranti yang terhubung", + "context": "Konteks", + "control_bottom_app_bar_add_tags": "Tambah Tag", + "control_bottom_app_bar_delete_from_local": "Buang daripada peranti", + "control_bottom_app_bar_edit_location": "Ubah Lokasi", + "control_bottom_app_bar_edit_time": "Ubah Tarikh & Masa", + "control_bottom_app_bar_trash_from_immich": "Buang ke tong sampah", + "copy_image": "Salin Gambar", + "copy_json": "Salin JSON", + "copy_link": "Salin pautan", + "copy_password": "Salin katalaluan", + "country": "Negara", + "create": "Cipta", + "create_album": "Cipta album", + "create_api_key": "Cipta kunci API", + "create_first_workflow": "Bina aliran kerja", + "create_link": "Cipta pautan", + "create_link_to_share": "Cipta pautan untuk kongsi", + "create_link_to_share_description": "Semua yang mempunyai pautan boleh lihat gambar yang dipilih", + "create_new_person": "Tambah orang baru", + "create_new_user": "Tambah pengguna baru", + "create_person": "Tambah orang", + "create_person_subtitle": "Isikan nama pada wajah yang dipilih untuk tambah pada orang baru", + "create_shared_album_page_share_select_photos": "Pilih Gambar", + "create_shared_link": "Cipta pautan kongsi", + "crop_aspect_ratio_original": "Asal", + "current_device": "Peranti semasa", + "current_pin_code": "Kod PIN semasa", + "current_server_address": "Alamat pelayan semasa", + "dark": "Gelap", + "dark_theme": "Tukar ke tema gelap", + "date": "Tarikh", + "date_and_time": "Tarikh dan Masa", + "date_before": "Tarikh sebelum", "date_of_birth": "Tarikh lahir", "date_of_birth_saved": "Tarikh lahir berjaya disimpan", "date_range": "Julat tarikh", + "date_time_original": "Tarikh/Masa Asli", "day": "Hari", "days": "Hari-hari", "delete": "Padam", @@ -433,22 +650,28 @@ "delete_api_key_prompt": "Adakah anda pasti mahu memadam kunci API ini?", "delete_dialog_alert": "Item berikut akan dipadam selama-lamanya dari Immich dan peranti anda", "delete_dialog_alert_local": "Item berikut akan dipadam selama-lamanya dari peranti anda, tetapi masih akan ada di pelayan Immich", + "delete_dialog_alert_local_non_backed_up": "Sebahagian item tiada sandaran di Immich dan akan dihapuskan secara kekal daripada peranti anda", + "delete_dialog_title": "Hapuskan Terus", "delete_duplicates_confirmation": "Adakah anda pasti mahu memadam pendua ini secara kekal?", + "delete_face": "Hapuskan wajah", "delete_key": "Padam kunci", "delete_library": "Padam Pustaka", "delete_link": "Padam pautan", "delete_others": "Padam yang lain", "delete_shared_link": "Padam pautan yang dikongsi", + "delete_shared_link_dialog_title": "Hapuskan pautan kongsi", "delete_tag": "Padam tag", "delete_tag_confirmation_prompt": "Adakah anda pasti mahu memadam tag {tagName}?", "delete_user": "Padam pengguna", "deleted_shared_link": "Pautan kongsi yang dipadamkan", "description": "Penerangan", + "deselect_all": "Nyahpilih semua", "details": "Butiran", "direction": "Arah", "disabled": "Dilumpuhkan", "discord": "Perselisihan", "discover": "Terokai", + "discovered_devices": "Peranti yang ditemui", "dismiss_all_errors": "Tolak semua ralat", "display_options": "Pilihan paparan", "display_order": "Tertib paparan", @@ -458,9 +681,102 @@ "documentation": "Dokumentasi", "done": "Selesai", "download": "Muat Turun", + "download_canceled": "Muat turun dibatalkan", + "download_complete": "Muat turun selesai", + "download_failed": "Muat turun gagal", + "download_finished": "Muat turun selesai", + "download_notfound": "Muat turun tidak ditemui", + "download_original": "Muat turun asli", "download_settings": "Muat Turun", "download_settings_description": "Urus tetapan yang berkaitan dengan muat turun aset", + "download_waiting_to_retry": "Tunggu untuk cubaan seterusnya", "downloading": "Memuat turun", + "downloading_asset_filename": "Sedang memuat turun aset {filename}", + "downloading_from_icloud": "Sedang memuat turun daripada iCloud", + "downloading_media": "Sedang memuat turun media", + "duration": "Tempoh", + "edit_location_dialog_title": "Lokasi", + "edit_name": "Ubah nama", + "edit_people": "Ubah orang", + "edit_tag": "Ubah tag", + "edit_title": "Ubah tajuk", + "editor": "Penyunting", + "editor_discard_edits_confirm": "Buang suntingan", + "editor_discard_edits_prompt": "Suntingan anda belum disimpan. Anda mahu membuangnya?", + "editor_discard_edits_title": "Buang suntingan?", + "editor_edits_applied_error": "Gagal simpan suntingan", + "editor_edits_applied_success": "Suntingan berjaya disimpan", + "editor_flip_horizontal": "Terbalikkan secara horizontal", + "editor_flip_vertical": "Terbalikkan secara vertikal", + "editor_reset_all_changes": "Tetapan semula", + "editor_rotate_left": "Pusing 90° lawan jam", + "editor_rotate_right": "Pusing 90° arah jam", + "email": "Emel", + "empty_folder": "Folder ini kosong", + "empty_trash": "Bersihkan tong sampah", + "empty_trash_confirmation": "Anda pasti mahu bersihkan tong sampah? Ia akan menghapuskan aset secara kekal daripada Immich.\nTindakan ini tidak boleh dibatalkan!", + "enable": "Aktifkan", + "enable_backup": "Aktifkan Sandaran", + "enable_biometric_auth_description": "Masukkan PIN kod anda untuk aktifkan pengesahan biometrik", + "enabled": "Diaktifkan", + "enter_wifi_name": "Masukkan nama Wi-Fi", + "enter_your_pin_code": "Masukkan PIN kod anda", + "enter_your_pin_code_subtitle": "Masukkan PIN kod untuk mengakses folder berkunci", + "error": "Ralat", + "error_delete_face": "Ralat hapuskan wajah daripada aset", + "error_loading_albums": "Ralat semasa memuat album", + "error_loading_image": "Ralat semasa memuat gambar", + "error_retrieving_asset_information": "Ralat memuat maklumat aset", + "error_saving_image": "Ralat: {error}", + "error_tag_face_bounding_box": "Ralat menanda wajah - gagal mendapatkan koordinat petak sempadan", + "error_title": "Ralat - Sesuatu tidak kena", + "error_while_navigating": "Ralat semasa navigasi ke aset", + "errors": { + "cannot_navigate_next_asset": "Tidak boleh navigasi ke aset berikutnya", + "cannot_navigate_previous_asset": "Tidak boleh navigasi ke aset sebelumnya", + "cant_apply_changes": "Tidak boleh membuat perubahan", + "cant_get_faces": "Gagal mendapakan wajah", + "cant_get_number_of_comments": "Gagal mendapatkan bilangan komen", + "error_adding_assets_to_album": "Ralat menambah aset kedalam album", + "error_adding_users_to_album": "Ralat menambah pengguna album", + "error_downloading": "Ralat memuat turun {filename}", + "error_hiding_buy_button": "Ralat menyorokkan butang beli", + "error_removing_assets_from_album": "Ralat membuang aset daripada album, lihat konsol untuk maklumat lanjut", + "error_selecting_all_assets": "Ralat memilih semua aset", + "exclusion_pattern_already_exists": "Corak pengecualian ini telah wujud.", + "failed_to_create_album": "Gagal membuat album baru", + "failed_to_create_shared_link": "Gagal mencipta pautan kongsi", + "failed_to_edit_shared_link": "Gagal menyunting pautan kongsi", + "failed_to_get_people": "Gagal mendapatkan maklumat orang", + "failed_to_load_asset": "Gagal memuat aset", + "failed_to_load_assets": "Gagal memuat aset-aset", + "failed_to_remove_product_key": "Gagal membuang kunci produk", + "failed_to_reset_pin_code": "Gagal menetapkan semula PIN kod", + "incorrect_email_or_password": "Emel atau katalaluan salah", + "page_not_found": "Halaman tidak ditemui" + }, + "language": "Bahasa", + "language_search_hint": "Cari bahasa…", + "last": "Akhir", + "latest_version": "Versi Terkini", + "latitude": "Latitud", + "leave": "Tinggalkan", + "leave_album": "Tinggalkan album", + "lens_model": "Model lensa", + "less": "Kurang", + "library_add_folder": "Tambah folder", + "library_edit_folder": "Sunting folder", + "library_page_sort_asset_count": "Bilangan aset", + "library_page_sort_title": "Tajuk album", + "light": "Cerah", + "light_theme": "Tukar ke tema cerah", + "like": "Suka", + "link": "Pautan", + "link_to_docs": "Untuk maklumat lanjut, rujuk dokumentasi.", + "link_to_oauth": "Pautkan dengan OAuth", + "linked_oauth_account": "Akaun OAuth yang terpaut", + "list": "Senarai", + "loading": "Sedang memuatkan", "search_by_description": "Carian secara huraian", "search_by_description_example": "Hari mendaki di Sapa", "some_assets_already_have_a_location_warning": "Beberapa aset yang dipilih telah memiliki lokasi", diff --git a/i18n/nb_NO.json b/i18n/nb_NO.json index ebb9f05aee..b699f0e43a 100644 --- a/i18n/nb_NO.json +++ b/i18n/nb_NO.json @@ -5,26 +5,26 @@ "acknowledge": "Bekreft", "action": "Handling", "action_common_update": "Oppdater", - "action_description": "Ett sett handlinger som skal utføres på de filtrerte mediefilene", + "action_description": "Et sett med handlinger som skal utføres på de filtrerte mediefilene", "actions": "Handlinger", "active": "Aktiv", "active_count": "Aktiv: {count}", "activity": "Aktivitet", "add": "Legg til", "add_a_description": "Legg til beskrivelse", - "add_a_location": "Legg til sted", + "add_a_location": "Legg til plassering", "add_a_name": "Legg til navn", "add_a_title": "Legg til tittel", - "add_action": "Legg til hendelse", + "add_action": "Legg til handling", "add_assets": "Legg til mediefiler", "add_birthday": "Legg til bursdag", "add_endpoint": "Legg til endepunkt", "add_exclusion_pattern": "Legg til ekskluderingsmønster", - "add_location": "Legg til sted", + "add_location": "Legg til plassering", "add_partner": "Legg til partner", "add_photos": "Legg til bilder", "add_step": "Legg til steg", - "add_tag": "Legg til merkelapp", + "add_tag": "Legg til merke", "add_to": "Legg til i…", "add_to_album": "Legg til album", "add_to_album_bottom_sheet_added": "Lagt til i {album}", @@ -33,7 +33,7 @@ "add_to_albums": "Legg til i album", "add_to_albums_count": "Legg til i album ({count})", "add_to_bottom_bar": "Legg til i", - "add_upload_to_stack": "Legg til opplasting i stakken", + "add_upload_to_stack": "Legg opplastingen til i stabel", "add_url": "Legg til URL", "added_to_archive": "Lagt til i arkivet", "added_to_favorites": "Lagt til favoritter", @@ -42,49 +42,49 @@ "add_exclusion_pattern_description": "Legg til ekskluderingsmønstre. Globbing med *, ** og ? støttes. For å ignorere alle filer i en hvilken som helst mappe som heter \"Raw\", bruk \"**/Raw/**\". For å ignorere alle filer som slutter på \".tif\", bruk \"**/*.tif\". For å ignorere en absolutt filplassering, bruk \"/filsti/til/ignorer/**\".", "admin_user": "Administrasjonsbruker", "asset_offline_description": "Dette eksterne bibliotekselementet finnes ikke lenger på disk og har blitt flyttet til papirkurven. Hvis filen ble flyttet innad i biblioteket, se etter det tilsvarende elementet i tidslinjen din. For å gjenopprette elementet, vennligst sørg for at filstien under er tilgjengelig for Immich og skann biblioteket.", - "authentication_settings": "Godkjenings Instillinger", - "authentication_settings_description": "Administrer passord, OAuth, og andre innstillinger for autentiserings Instilinger", + "authentication_settings": "Autentiseringsinnstillinger", + "authentication_settings_description": "Administrer passord, OAuth, og andre autentiseringsinnstillinger", "authentication_settings_disable_all": "Er du sikker på at du ønsker å deaktivere alle innloggingsmetoder? Innlogging vil bli fullstendig deaktivert.", "authentication_settings_reenable": "For å aktivere på nytt, bruk en Server Command.", - "background_task_job": "Bakgrunnsjobber", + "background_task_job": "Bakgrunnsoppgaver", "backup_database": "Opprett database-dump", "backup_database_enable_description": "Aktiver database-dump", "backup_keep_last_amount": "Antall database-dumps å beholde", "backup_onboarding_1_description": "ekstern kopi i skyen eller på et annet fysisk sted.", "backup_onboarding_2_description": "lokale kopier på forskjellige enheter. Dette inkluderer hovedfilene og en lokal sikkerhetskopi av disse filene.", - "backup_onboarding_3_description": "totale kopier av dataene dine, inkludert originalfilene. Dette inkluderer én ekstern kopi og to lokale kopier.", + "backup_onboarding_3_description": "komplette kopier av dataene dine, inkludert originalfilene. Dette inkluderer én ekstern kopi og to lokale kopier.", "backup_onboarding_description": "En 3-2-1 sikkerhetskopieringsstrategi anbefales for å beskytte dataene dine. Du bør beholde kopier av opplastede bilder/videoer samt Immich-databasen for en omfattende sikkerhetskopieringsløsning.", "backup_onboarding_footer": "For mer informasjon om sikkerhetskopiering av Immich, se dokumentasjonen.", "backup_onboarding_parts_title": "En 3-2-1 sikkerhetskopi inkluderer:", "backup_onboarding_title": "Sikkerhetskopier", - "backup_settings": "Database-dump", - "backup_settings_description": "Håndter innstillinger for database-dump.", - "cleared_jobs": "Ryddet opp jobber for: {job}", + "backup_settings": "Database-dump innstillinger", + "backup_settings_description": "Administrér innstillinger for database-dump.", + "cleared_jobs": "Ryddet opp oppgaver for: {job}", "config_set_by_file": "Konfigurasjonen er for øyeblikket satt av en konfigurasjonsfil", "confirm_delete_library": "Vil du virkelig slette biblioteket {library}?", - "confirm_delete_library_assets": "Vil du virkelig slette dette biblioteket? Dette vil slette alt innhold ({count, plural, one {# element} other {# elementer}}) og tilhørende eiendeler fra Immich og kan ikke angres. Filene vil forbli på disken.", + "confirm_delete_library_assets": "Vil du virkelig slette dette biblioteket? Dette vil slette alt innhold ({count, plural, one {# element} other {alle # elementer}}) og tilhørende eiendeler fra Immich og kan ikke angres. Filene vil forbli på disken.", "confirm_email_below": "For å bekrefte, skriv inn \"{email}\" nedenfor", "confirm_reprocess_all_faces": "Vil du virkelig behandle alle ansikter på nytt? Dette vil også fjerne navngitte personer.", "confirm_user_password_reset": "Vil du virkelig tilbakestille passordet til {user}?", "confirm_user_pin_code_reset": "Vil du virkelig tilbakestille PIN-koden til {user} ?", - "copy_config_to_clipboard_description": "Kopier nåværende systemkonfigurasjon som ett JSON objekt til utklippsmenyen", - "create_job": "Lag jobb", - "cron_expression": "Cron uttrykk", + "copy_config_to_clipboard_description": "Kopiér nåværende systemkonfigurasjon som et JSON objekt til utklippsmenyen", + "create_job": "Opprett oppgave", + "cron_expression": "Cron-uttrykk", "cron_expression_description": "Still inn skanneintervallet med cron-formatet. For mer informasjon henvises til f.eks. Crontab Guru", "cron_expression_presets": "Forhåndsinnstillinger for Cron-uttrykk", "disable_login": "Deaktiver innlogging", "download_csv": "Last ned CSV", "duplicate_detection_job_description": "Kjør maskinlæring på filer for å oppdage lignende bilder. Krever bruk av smartsøk", - "exclusion_pattern_description": "Ekskluderingsmønstre lar deg ignorere filer og mapper når du skanner biblioteket ditt. Dette er nyttig hvis du har mapper som inneholder filer du ikke vil importere, for eksempel RAW-filer.", + "exclusion_pattern_description": "Ekskluderingsmønstre lar deg ignorere filer og mapper når du skanner biblioteket ditt. Dette er nyttig hvis du har mapper som inneholder filer du ikke ønsker å importere, som for eksempel RAW-filer.", "export_config_as_json_description": "Last ned nåværende systemkonfigurasjon som en JSON fil", "external_libraries_page_description": "Administrering for eksterne bibliotek", "face_detection": "Ansiktsgjenkjennelse", - "face_detection_description": "Finn ansikter i bilder ved hjelp av maskinlæring. For videoer brukes bare miniatyrbildet. \"Alle\" går gjennom alle bilder (igjen). \"Tilbakestill\" fjerner all gjeldende ansiktsdata. \"Mangler\" legger til filer som ikke har blitt behandlet enda i køen. Oppdagede ansikter vil blir sendt til ansiktsgjenkjenning, og koblet til eksisterende eller nye personer.", - "facial_recognition_job_description": "Kobler oppdagede ansikt til personer. Dette utføres etter at ansiktssøk er fullført. \"Tilbakestill\" (om-)grupperer alle ansikt på nytt. \"Mangler\" stiller opp ansikt som ikke har blitt tilordnet en person ennå.", - "failed_job_command": "Kommandoen {command} feilet for jobb: {job}", + "face_detection_description": "Oppdag ansikter i bilder ved hjelp av maskinlæring. For videoer vurderes bare miniatyrbildet. \"Oppdater\" behandler alle mediefiler på nytt. \"Tilbakestill\" fjerner i tillegg all gjeldende ansiktsdata. \"Mangler\" legger i kø filer som ikke har blitt behandlet enda. Oppdagede ansikter vil bli sendt til Ansiktsgjenkjenning etter at Ansiktsoppdagelse er ferdig, som vil gruppere dem til eksisterende eller nyer personer.", + "facial_recognition_job_description": "Kobler oppdagede ansikt til personer. Dette utføres etter at Ansiktsoppdagelse er fullført. \"Tilbakestill\" (om-)grupperer alle ansikt på nytt. \"Mangler\" køer ansikter som ikke har blitt tilordnet en person ennå.", + "failed_job_command": "Kommandoen {command} feilet for oppgave: {job}", "force_delete_user_warning": "ADVARSEL: Dette vil umiddelbart fjerne brukeren og alle data. Dette kan ikke angres, og filene kan ikke gjenopprettes.", "image_format": "Format", - "image_format_description": "WebP gir mindre filer enn JPEG, men er tregere å lage.", + "image_format_description": "WebP produserer mindre filer enn JPEG, men kodes langsommere.", "image_fullsize_description": "Bilde i full størrelse med strippet metadata, brukt når du zoomer inn", "image_fullsize_enabled": "Aktiver generering av bilder i full størrelse", "image_fullsize_enabled_description": "Generer bilder i full størrelse for ikke-nettvennlige formater. Når \"Foretrekk innebygd forhåndsvisning\" er aktivert, brukes innebygde forhåndsvisninger direkte uten konvertering. Påvirker ikke nettvennlige formater som JPEG.", @@ -108,6 +108,21 @@ "image_thumbnail_quality_description": "Miniatyrbildekvalitet fra 1-100. Høyere er bedre, men produserer større filer og kan redusere appens respons.", "image_thumbnail_title": "Miniatyrbilde oppsett", "import_config_from_json_description": "Importer systemkonfigurasjon ved å laste opp en JSON konfigurasjonsfil", + "integrity_checks_checksum_files": "Sjekksumfiler", + "integrity_checks_checksum_files_description": "Konfigurer sjekksumkontrollen", + "integrity_checks_checksum_files_enable_description": "Aktiver sjekksumkontrollen", + "integrity_checks_checksum_files_percentage_limit": "Prosentgrense", + "integrity_checks_checksum_files_percentage_limit_description": "Konfigurer den maksimale prosentsatsen mellom 0,01 og 1 for hvor mye sjekksumkontrollen skal kjøre hvert intervall.", + "integrity_checks_checksum_files_time_limit": "Tidsgrense", + "integrity_checks_checksum_files_time_limit_description": "Konfigurer den maksimale varigheten som sjekksumkontrollen skal kjøre hvert intervall. (ms)", + "integrity_checks_missing_files": "Manglende filer", + "integrity_checks_missing_files_description": "Konfigurer frekvensen og aktiver eller deaktiver kontrollen av manglende filer", + "integrity_checks_missing_files_enable_description": "Aktiver kontrollen for manglende filer", + "integrity_checks_settings": "Integritetskontroller", + "integrity_checks_settings_description": "Administrer intervaller for integritetskontroller", + "integrity_checks_untracked_files": "Usporede filer", + "integrity_checks_untracked_files_description": "Konfigurer frekvensen og aktiver eller deaktiver sjekken for usporede filer", + "integrity_checks_untracked_files_enable_description": "Aktiver kontrollen av usporede filer", "job_concurrency": "{job} samtidighet", "job_created": "Oppgave laget", "job_not_concurrency_safe": "Denne jobben er ikke samtidlighet sikker.", @@ -187,7 +202,7 @@ "maintenance_delete_backup": "Slett sikkerhetskopi", "maintenance_delete_backup_description": "Denne filen vil bli permanent slettet.", "maintenance_delete_error": "Feilet ved sletting av sikkerhetskopi.", - "maintenance_integrity_check": "Sjekk", + "maintenance_integrity_check": "Kontroll", "maintenance_integrity_check_all": "Velg alle", "maintenance_integrity_checksum_mismatch": "Sjekksum er feil", "maintenance_integrity_checksum_mismatch_description": "Filer med en sjekksum på disken som ikke stemmer overens med sjekksummen Immich har lagret i databasen sin.", @@ -322,8 +337,8 @@ "require_password_change_on_login": "Krev at brukeren endrer passord ved første pålogging", "reset_settings_to_default": "Tilbakestill innstillinger til standard", "reset_settings_to_recent_saved": "Tilbakestill innstillingene til de nylig lagrede innstillingene", - "scanning_library": "Søk biblioteket", - "search_jobs": "Søk etter jobber…", + "scanning_library": "Bibliotekskanning", + "search_jobs": "Søkeprosesser…", "send_welcome_email": "Send velkomst-e-post", "server_external_domain_settings": "Eksternt domene", "server_external_domain_settings_description": "Domene brukt for eksterne lenker", @@ -416,6 +431,10 @@ "transcoding_realtime_description": "Tillater transkoding i sanntid mens videoen strømmes. Muliggjør kvalitetsbytte, men kan forårsake høyere avspillingsforsinkelse og hakking avhengig av serverkapasitet.", "transcoding_realtime_enabled": "Aktiver sanntid-transcoding", "transcoding_realtime_enabled_description": "Hvis deaktivert så vil serveren nekte å starte nye transkodingsøkter i sanntid.", + "transcoding_realtime_resolutions": "Oppløsninger", + "transcoding_realtime_resolutions_description": "Oppløsningene som tilbys for sanntidstranskoding. Høyere oppløsninger kan føre til problemer med avspillingen dersom serveren ikke klarer å transkode dem raskt nok.", + "transcoding_realtime_video_codecs": "Videokodeker", + "transcoding_realtime_video_codecs_description": "De tilgjengelige videokodekene for sanntidstranskoding. Klienter vil velge det beste alternativet de støtter under avspilling. AV1 er mer effektiv enn HEVC, som igjen er mer effektiv enn H.264. Ved bruk av maskinvareakselerasjon velger du kun kodeker som maskinvaren kan kode. Ved bruk av programvarebasert transkoding bør du være oppmerksom på at H.264 er raskere enn AV1, som igjen er raskere enn HEVC.", "transcoding_reference_frames": "Referansebilder", "transcoding_reference_frames_description": "Antall bilder som skal refereres til når en gitt ramme komprimeres. Høyere verdier forbedrer komprimeringseffektiviteten, men senker ned kodingen. 0 setter denne verdien automatisk.", "transcoding_required_description": "Bare videoer som ikke er i et akseptert format", @@ -568,7 +587,7 @@ "asset_not_found_on_device_ios": "Elementet ble ikke funnet på enheten. Hvis du bruker iCloud, kan elementet være utilgjengelig på grunn av en feilaktig fil er lagret i iCloud", "asset_not_found_on_icloud": "Elementet ble ikke funnet på iCloud. Elementet kan være utilgjengelig fordi det ligger en feilaktig fil i iCloud", "asset_offline": "Fil utilgjengelig", - "asset_offline_description": "Dette elementet er offline. Immich kan ikke finne dets possisjon. Vennligst påse at elementet er tilgjengelig og skann så biblioteket på nytt.", + "asset_offline_description": "Dette eksterne elementet finnes ikke lenger på disken. Vennligst kontakt din Immich-administrator for hjelp.", "asset_skipped": "Hoppet over", "asset_skipped_in_trash": "I papirkurven", "asset_troubleshoot": "Feilsøk element", @@ -578,6 +597,7 @@ "asset_viewer_settings_title": "Objektviser", "assets": "Filer", "assets_added_to_album_count": "Lagt til {count, plural, one {# elementer} other {# element}} i album", + "assets_added_to_album_partial_count": "La til {successCount} av {totalCount} {totalCount, plural, one {element} other {elementer}} i albumet", "assets_added_to_albums_count": "Lagt til {assetTotal, plural, one {# asset} other {# assets}} til {albumTotal, plural, one {# album} other {# albums}}", "assets_cannot_be_added_to_album_count": "{count, plural, one {Objektet} other {Objektene}} kan ikke legges til i albumet", "assets_cannot_be_added_to_albums": "{count, plural, one {Asset} other {Assets}} kan ikke legges til i noen av albumene", @@ -641,7 +661,7 @@ "browse_templates": "Bla gjennom maler", "bugs_and_feature_requests": "Feil og funksjonsforespørsler", "build": "Bygg", - "build_image": "Lag Bilde", + "build_image": "Byggbilde", "bulk_delete_duplicates_confirmation": "Vil du virkelig slette {count, plural, one {# duplisert fil} other {# dupliserte filer}}? Dette vil beholde største filen fra hver gruppe og vil permanent slette alle andre duplikater. Du kan ikke angre denne handlingen!", "bulk_keep_duplicates_confirmation": "Vil du virkelig beholde {count, plural, one {# duplikat} other {# duplikater}}? Dette vil løse alle duplikatgrupper uten å slette noe.", "bulk_trash_duplicates_confirmation": "Vil du virkelig å slette {count, plural, one {# duplisert element} other {# dupliserte elementer}}? Dette vil beholde største filen fra hver gruppe, samt slette alle andre duplikater.", @@ -693,7 +713,7 @@ "cleanup_icloud_shared_albums_excluded": "iCloud delte albumer er ekskludert fra skanningen", "cleanup_no_assets_found": "Ingen opplastede mediefiler funnet som treffer dine søkekriterier. Frigjør plass kan kun fjerne objekter som har blitt sikkerhetskopiert", "cleanup_preview_title": "Mediefiler å fjerne ({count})", - "cleanup_step3_description": "Skann etter bilder og videoer ved å velge sluttdato og filter i søkeinnstillinger.", + "cleanup_step3_description": "Søk etter bilder og videoer ved å velge sluttdato og filter i søkeinnstillinger.", "cleanup_step4_summary": "{count} mediefiler (opprettet før {date}= er plassert i kø for fjerning fra enheten. Bildene vil være tilgjengelige fra Immich appen.", "cleanup_trash_hint": "For å frigjøre lagringsplassen helt, åpne systemgalleri-appen og tøm papirkurven", "clear": "Tøm", @@ -777,7 +797,7 @@ "create_shared_album_page_share_add_assets": "LEGG TIL OBJEKTER", "create_shared_album_page_share_select_photos": "Velg bilder", "create_shared_link": "Opprett delt lenke", - "create_tag": "Lag merkelapp", + "create_tag": "Lag merke", "create_tag_description": "Lag en ny tag. For undertag, vennligst fullfør hele stien til taggen, inkludert forovervendt skråstrek.", "create_user": "Opprett Bruker", "create_workflow": "Opprett arbeidsflyt", @@ -794,7 +814,6 @@ "custom_date": "Egendefinert dato", "custom_locale": "Tilpasset lokalisering", "custom_locale_description": "Formater datoer, tid og tall basert på det valgte språket og regionen", - "custom_url": "Tilpasset URL", "cutoff_date_description": "Fjern bilder som er eldre enn…", "cutoff_day": "{count, plural, one {dag} other {dager}}", "cutoff_year": "{count, plural, one {år} other {år}}", @@ -1303,9 +1322,9 @@ "login_form_failed_login": "Feil ved innlogging, sjekk serverens URL, e-post og passord", "login_form_handshake_exception": "Det var et unntak for handshake med serveren. Aktiver støtte for selvsignerte sertifikater i innstillingene hvis du bruker et selvsignert sertifikat.", "login_form_password_hint": "passord", - "login_form_server_empty": "Skriv inn en server-URL.", - "login_form_server_error": "Kunne ikke koble til server.", - "login_has_been_disabled": "Innlogging har blitt deaktivert.", + "login_form_server_empty": "Skriv inn en server-URL", + "login_form_server_error": "Kunne ikke koble til server", + "login_has_been_disabled": "Innlogging har blitt deaktivert", "login_password_changed_error": "Det skjedde en feil ved oppdatering av passordet", "login_password_changed_success": "Passord oppdatert", "logout_all_device_confirmation": "Vil du virkelig logge ut av alle enheter?", @@ -1356,6 +1375,7 @@ "map_location_picker_page_use_location": "Bruk dette stedet", "map_location_service_disabled_content": "Lokasjonstjeneste må være aktivert for å vise elementer fra din nåværende lokasjon. Vil du aktivere det nå?", "map_location_service_disabled_title": "Lokasjonstjeneste deaktivert", + "map_marker_for_image": "Kartmarkør for bilde tatt i {city}, {country}", "map_marker_with_image": "Kartmarkør med bilde", "map_no_location_permission_content": "Lokasjonstilgang er påkrevet for å vise elementer fra din nåværende lokasjon. Vil du tillate det nå?", "map_no_location_permission_title": "Lokasjonstilgang avvist", @@ -1460,6 +1480,7 @@ "never": "aldri", "new_album": "Nytt Album", "new_api_key": "Ny API-nøkkel", + "new_feature": "Ny funksjon", "new_password": "Nytt passord", "new_person": "Ny person", "new_pin_code": "Ny PIN-kode", @@ -1501,11 +1522,15 @@ "none": "Ingen", "not_allowed": "Ikke tillatt", "not_available": "Ikke tilgjengelig", - "not_in_any_album": "Ikke i noe album", + "not_in_any_album": "Ikke i album", "not_selected": "Ikke valgt", + "not_set": "Ikke angitt", "notes": "Notater", "nothing_here_yet": "Ingenting her enda", "notification_backup_reliability": "Slå på notifikasjoner for mer stabil sikkerhetskopiering i bakgrunnen", + "notification_enabled_list_tile_content": "Immich bruker varsler for sikkerhetskopiering i bakgrunnen. Du kan administrere disse i enhetsinnstillingene dine.", + "notification_enabled_list_tile_open_button": "Åpne innstillinger", + "notification_enabled_list_tile_title": "Varsler aktivert", "notification_permission_dialog_content": "For å aktivere notifikasjoner, gå til Innstillinger og velg tillat.", "notification_permission_list_tile_content": "Gi tilgang for å aktivere notifikasjoner.", "notification_permission_list_tile_enable_button": "Aktiver notifikasjoner", @@ -1517,6 +1542,8 @@ "obtainium_configurator": "Obtainium konfigurator", "obtainium_configurator_instructions": "Bruk Obtainium for å installere og oppdatere Android appen direkte fra Immich sin Github utgivelse. Opprett en API nøkkel og velg en variant for å lage din Obtainium konfigurasjonslink", "ocr": "Tekstgjenkjenning", + "ocr_body": "Immich leser nå teksten i bildene dine, slik at du kan søke etter dem basert på hva det står i dem.", + "ocr_title": "Søk etter tekst i bildene dine", "official_immich_resources": "Offisielle Immich-ressurser", "offline": "Frakoblet", "offset": "Forskyving", @@ -1535,6 +1562,8 @@ "open": "Åpne", "open_calendar": "Åpne kalender", "open_in_browser": "Åpne i nettleser", + "open_in_immich_body": "Angi Immich som galleri-app på Android for å åpne bilder rett fra andre apper.", + "open_in_immich_title": "Åpner bilder i Immich", "open_in_map_view": "Åpne i kartvisning", "open_in_openstreetmap": "Åpne i OpenStreetMap", "open_the_search_filters": "Åpne søkefiltrene", @@ -1592,7 +1621,7 @@ "person": "Person", "person_age_months": "{months, plural, one {# måned} other {# måneder}} gammel", "person_age_year_months": "1 år, {months, plural, one {# måned} other {# måneder}} gammel", - "person_age_years": "{years, plural, other {# år}} gammel", + "person_age_years": "{years, plural, one {# år} other {# år}} gammel", "person_birthdate": "Født den {date}", "person_hidden": "{name}{hidden, select, true { (skjult)} other {}}", "person_recognized": "Person gjenkjent", @@ -1693,7 +1722,10 @@ "recent": "Nylig", "recent_searches": "Nylige søk", "recently_added": "Nylig lagt til", + "recently_added_body": "Se alt det nyeste innholdet ditt samlet på én egen side.", + "recently_added_description": "Utforsk bildene og videoene dine sortert etter når de ble lastet opp til Immich", "recently_added_page_title": "Nylig oppført", + "recently_added_title": "Nylig lagt til", "recently_taken": "Nylig tatt", "refresh": "Oppdater", "refresh_encoded_videos": "Oppdater kodete videoer", @@ -1815,7 +1847,7 @@ "search_no_people": "Ingen personer", "search_no_people_named": "Ingen personer med navnet \"{name}\"", "search_no_result": "Ingen resultater funnet, prøv ett annet søkeord eller kombinasjon", - "search_options": "Søke alternativer", + "search_options": "Søkealternativer", "search_page_search_photos_videos": "Søk etter dine bilder og videoer", "search_page_view_all_button": "Vis alle", "search_people": "Søk personer", @@ -1823,11 +1855,11 @@ "search_rating": "Søk etter vurdering...", "search_settings": "Søke instillinger", "search_state": "Søk etter fylke...", - "search_tags": "Søk tags...", + "search_tags": "Søk merker...", "search_timezone": "Søk etter tidssone....", "search_type": "Søk etter type", "search_your_photos": "Søk i dine bilder", - "searching_locales": "Søker lokaler...", + "searching_locales": "Søker regionalinnstillinger...", "second": "Sekund", "see_all_people": "Vis alle mennesker", "select": "Velg", @@ -1900,6 +1932,8 @@ "share_link": "Del link", "share_original": "Bruk original (stor)", "share_preview": "Bruk miniatyrbilde (lite)", + "share_quality_body": "Trykk og hold på deleknappen for å velge bildekvalitet før du deler.", + "share_quality_title": "Velg kvalitet for deling", "shared": "Delt", "shared_album_activities_input_disable": "Kommenterer er deaktivert", "shared_album_activity_remove_content": "Vil du slette denne aktiviteten?", @@ -1914,7 +1948,9 @@ "shared_link_app_bar_title": "Delte linker", "shared_link_clipboard_copied_massage": "Kopiert til utklippslisten", "shared_link_create_error": "Feil ved oppretting av delbar link", - "shared_link_custom_url_description": "Få tilgang til denne delte lenken med en egendefinert URL", + "shared_link_custom_url_description": "Gi denne dele-lenken en brukerdefinert URL", + "shared_link_custom_url_title": "Egendefinert URL", + "shared_link_custom_url_warning": "Advarsel: Et egendefinert URL-navn med en skråstrek oppfører seg kanskje ikke som forventet.", "shared_link_edit_description_hint": "Endre delebeskrivelse", "shared_link_edit_expire_after_option_day": "1 dag", "shared_link_edit_expire_after_option_days": "{count} dager", @@ -1981,16 +2017,19 @@ "sign_out": "Logg ut", "sign_up": "Registrer deg", "size": "Størrelse", + "skip": "Hopp over", "skip_to_content": "Gå til innhold", "skip_to_folders": "Hopp til mapper", "skip_to_tags": "Hopp til tagger", "slideshow": "Lysbildefremvisning", + "slideshow_body": "Len deg tilbake og se bildene dine som lysbildefremvisning i fullskjerm.", "slideshow_metadata_overlay_mode": "Overleggsinnhold", "slideshow_metadata_overlay_mode_description_only": "Bare beskrivelse", "slideshow_metadata_overlay_mode_full": "Full", "slideshow_repeat": "Gjenta lysbildefremvisning", "slideshow_repeat_description": "Gå tilbake til begynnelsen når lysbildeserien er slutt", "slideshow_settings": "Lysbildefremvisning innstillinger", + "slideshow_title": "Lysbildevisning", "smart_album": "Smartalbum", "some_assets_already_have_a_location_warning": "Noen av de valgte objektene har allerede en lokasjon", "sort_albums_by": "Sorter album etter...", @@ -2002,11 +2041,11 @@ "sort_recent": "Nyeste bilde", "sort_title": "Tittel", "source": "Kilde", - "stack": "Stable", - "stack_action_prompt": "{count} stakket", + "stack": "Stabel", + "stack_action_prompt": "{count} stablet", "stack_duplicates": "Stable duplikater", "stack_selected_photos": "Stable valgte bilder", - "stacked_assets_count": "Stable {count, plural, one {# element} other {# elementer}}", + "stacked_assets_count": "Stablet {count, plural, one {# element} other {# elementer}}", "stacktrace": "Stakkspor", "start": "Start", "start_date": "Startdato", @@ -2118,6 +2157,7 @@ "unknown": "Ukjent", "unknown_country": "Ukjent Land", "unknown_date": "Ukjent dato", + "unknown_schema": "Ukjent skjema", "unknown_year": "Ukjent år", "unlimited": "Ubegrenset", "unlink_motion_video": "Koble fra bevegelsesvideo", @@ -2130,9 +2170,9 @@ "unsaved_change": "Ulagrede endringer", "unselect_all": "Fjern alle valg", "unselect_all_duplicates": "Fjern markeringen av alle duplikater", - "unstack": "avstable", + "unstack": "Avstable", "unstack_action_prompt": "{count} ustakket", - "unstacked_assets_count": "Ikke stablet {count, plural, one {# element} other {# elementer}}", + "unstacked_assets_count": "Avstablet {count, plural, one {# element} other {# elementer}}", "unsupported_field_type": "Ustøttede felttyper", "unsupported_file_type": "Filen {file} kan ikke lastes opp fordi filtypen {type} ikke støttes.", "untagged": "Umerket", @@ -2153,6 +2193,8 @@ "upload_status_errors": "Feil", "upload_status_uploaded": "Opplastet", "upload_success": "Opplasting vellykket, oppdater siden for å se nye opplastninger.", + "upload_to_album_body": "For brukere som ikke benytter manuell opplasting, kan du nå velge å legge til lokale bilder direkte i et album samtidig som du laster dem opp. Du slipper dermed å laste dem opp først for så å legge dem til i et album etterpå.", + "upload_to_album_title": "Last opp direkte til et album", "upload_to_immich": "Last opp til Immich ({count})", "uploading": "Laster opp", "uploading_media": "Laster opp media", @@ -2161,7 +2203,7 @@ "url": "URL", "usage": "Bruk", "use_biometric": "Bruk biometri", - "use_browser_locale": "Bruk nettleser lokale", + "use_browser_locale": "Bruk nettleserens regionalinnstillinger", "use_browser_locale_description": "Formater datoer, klokkeslett, og tall basert på nettleserens lokale", "use_current_connection": "Bruk nåværende tilkobling", "use_custom_date_range": "Bruk egendefinert datoperiode i stedet", @@ -2189,7 +2231,7 @@ "version_announcement_closing": "Din venn, Alex", "version_announcement_message": "Hei! En ny versjon av Immich er tilgjengelig. Vennligst ta deg tid til å lese utgivelsesnotatene for å sikre at oppsettet ditt er oppdatert for å forhindre feilkonfigurasjoner, spesielt hvis du bruker WatchTower eller en annen mekanisme som håndterer oppdatering av Immich-forekomsten din automatisk.", "version_history": "Versjonshistorikk", - "version_history_item": "Installert {version} den {date}", + "version_history_item": "Installerte {version} den {date}", "video": "Video", "video_hover_setting": "Spill av forhåndsvisining mens du holder over musepekeren", "video_hover_setting_description": "Spill av forhåndsvisning mens en musepeker er over elementet. Selv når den er deaktivert, kan avspilling startes ved å holde musepekeren over avspillingsikonet.", @@ -2210,7 +2252,7 @@ "view_qr_code": "Vis QR-kode", "view_similar_photos": "Vis lignende bilder", "view_stack": "Vis stabel", - "viewer_remove_from_stack": "Fjern fra stabling", + "viewer_remove_from_stack": "Fjern fra stabel", "visibility": "Synlighet", "visibility_changed": "Synlighet endret for {count, plural, one {# person} other {# people}}", "visual": "Visuell", @@ -2220,6 +2262,9 @@ "week": "Uke", "welcome": "Velkommen", "welcome_to_immich": "Velkommen til Immich", + "whats_new": "Hva er nytt", + "whats_new_settings_subtitle": "Se hva som er nytt i Immich", + "whats_new_version": "Versjon {version}", "when": "Når", "width": "Bredde", "wifi_name": "Wi-Fi-navn", diff --git a/i18n/ne.json b/i18n/ne.json index 1a374a3a4f..d528718015 100644 --- a/i18n/ne.json +++ b/i18n/ne.json @@ -5,6 +5,9 @@ "acknowledge": "स्वीकार", "action": "कार्य", "action_description": "छानियेको चिजमा सामुहिक कार्य", + "active": "कार्यहरू", + "activity": "गतिविधि", + "add": "थप्नुहोस्", "add_a_description": "थप विवरण", "add_a_location": "स्थान थप्नुहोस्", "add_a_name": "नाम हाल्नुहोस्", @@ -12,5 +15,9 @@ "add_action": "कार्य थप्नुहोस्", "add_assets": "फोटोहरू थप्नुहोस्", "add_birthday": "जन्मदिन हाल्नुहोस", - "add_endpoint": "अन्तिम बिन्दु थप्नुहोस्" + "add_endpoint": "अन्तिम बिन्दु थप्नुहोस्", + "add_exclusion_pattern": "बहिष्करण ढाँचा थप्नुहोस्", + "add_location": "स्थान थप्नुहोस्", + "add_partner": "साझेदार थप्नुहोस्", + "add_step": "चरण थप्नुहोस्" } diff --git a/i18n/nl.json b/i18n/nl.json index 8d8f581889..8907985ad1 100644 --- a/i18n/nl.json +++ b/i18n/nl.json @@ -2,7 +2,7 @@ "about": "Over", "account": "Account", "account_settings": "Accountinstellingen", - "acknowledge": "Bevestigen", + "acknowledge": "Begrepen", "action": "Actie", "action_common_update": "Bijwerken", "action_description": "Een groep acties om uit te voeren op de gefilterde items", @@ -12,7 +12,7 @@ "activity": "Activiteit", "add": "Toevoegen", "add_a_description": "Beschrijving toevoegen", - "add_a_location": "Een locatie toevoegen", + "add_a_location": "Locatie toevoegen", "add_a_name": "Naam toevoegen", "add_a_title": "Titel toevoegen", "add_action": "Actie toevoegen", @@ -108,6 +108,21 @@ "image_thumbnail_quality_description": "Thumbnail kwaliteit van 1-100. Hoger is beter, maar produceert grotere bestanden en kan de app vertragen.", "image_thumbnail_title": "Thumbnailinstellingen", "import_config_from_json_description": "Importeer de systeem­configuratie door een JSON-configuratie­bestand te uploaden", + "integrity_checks_checksum_files": "Controlegetalbestanden", + "integrity_checks_checksum_files_description": "Configureer de check van controlegetallen", + "integrity_checks_checksum_files_enable_description": "Schakel de check van controlegetallen in", + "integrity_checks_checksum_files_percentage_limit": "Percentage limiet", + "integrity_checks_checksum_files_percentage_limit_description": "Stel het maximale percentage in tussen 0.01 en 1 voor hoe vaak de check van controlegetallen per interval moet worden uitgevoerd.", + "integrity_checks_checksum_files_time_limit": "Tijdslimiet", + "integrity_checks_checksum_files_time_limit_description": "Stel de maximale duur in waarin de check van controlegetallen per interval moet worden uitgevoerd. (ms)", + "integrity_checks_missing_files": "Ontbrekende bestanden", + "integrity_checks_missing_files_description": "Configureer de frequentie en schakel de controle op ontbrekende bestanden in of uit", + "integrity_checks_missing_files_enable_description": "Schakel de controle op ontbrekende bestanden in", + "integrity_checks_settings": "Integriteitscontroles", + "integrity_checks_settings_description": "Beheer de intervallen voor integriteitscontroles", + "integrity_checks_untracked_files": "Niet getraceerde bestanden", + "integrity_checks_untracked_files_description": "Configureer de frequentie en schakel de controle op niet getraceerde bestanden in of uit", + "integrity_checks_untracked_files_enable_description": "Schakel de controle op niet getraceerde bestanden in", "job_concurrency": "{job} gelijktijdigheid", "job_created": "Taak aangemaakt", "job_not_concurrency_safe": "Deze taak kan niet parallel worden uitgevoerd.", @@ -416,6 +431,10 @@ "transcoding_realtime_description": "Maakt het mogelijk om transcodering in realtime uit te voeren terwijl de video wordt gestreamd. Maakt het wisselen van kwaliteit mogelijk, maar kan een hogere afspeelvertraging en haperingen veroorzaken, afhankelijk van de capaciteiten van de server.", "transcoding_realtime_enabled": "Realtime transcodering inschakelen", "transcoding_realtime_enabled_description": "Indien uitgeschakeld, weigert de server om nieuwe realtime transcodeersessies te starten.", + "transcoding_realtime_resolutions": "Resoluties", + "transcoding_realtime_resolutions_description": "De resoluties die beschikbaar zijn voor realtime transcodering. Hogere resoluties kunnen afspeelproblemen veroorzaken als de server deze niet snel genoeg kan transcoderen.", + "transcoding_realtime_video_codecs": "Videocodecs", + "transcoding_realtime_video_codecs_description": "De videocodecs die beschikbaar zijn voor realtime transcodering. Clients kiezen tijdens het afspelen automatisch de beste codec die zij ondersteunen. AV1 is efficiënter dan HEVC, en HEVC is efficiënter dan H.264. Bij gebruik van hardwareversnelling selecteer je alleen de codecs die door de hardwareversneller kunnen worden gecodeerd. Bij softwarematige transcodering geldt dat H.264 sneller is dan AV1, en AV1 sneller is dan HEVC.", "transcoding_reference_frames": "Referentie frames", "transcoding_reference_frames_description": "Het aantal frames om naar te verwijzen bij het comprimeren van een bepaald frame. Hogere waarden verbeteren de compressie-efficiëntie, maar vertragen de codering. Bij 0 wordt deze waarde automatisch ingesteld.", "transcoding_required_description": "Alleen video's die geen geaccepteerd formaat hebben", @@ -578,6 +597,7 @@ "asset_viewer_settings_title": "Fotoweergave", "assets": "Items", "assets_added_to_album_count": "{count, plural, one {# item} other {# items}} aan het album toegevoegd", + "assets_added_to_album_partial_count": "{successCount} van de {totalCount} {totalCount, plural, one {asset} other {assets}} toegevoegd aan het album", "assets_added_to_albums_count": "{assetTotal, plural, one {# asset} other {# assets}} toegevoegd aan {albumTotal, plural, one {# album} other {#albums}}", "assets_cannot_be_added_to_album_count": "{count, plural, one {# item} other {# items}} konden niet aan album toegevoegd worden", "assets_cannot_be_added_to_albums": "{count, plural, one {Item kan} other {Items kunnen}} niet toegevoegd worden aan de albums", @@ -794,7 +814,6 @@ "custom_date": "Aangepaste datum", "custom_locale": "Aangepaste landinstelling", "custom_locale_description": "Formatteer datums, tijden, en getallen op basis van de geselecteerde taal en regio", - "custom_url": "Aangepaste URL", "cutoff_date_description": "Bewaar foto's van de laatste…", "cutoff_day": "{count, plural, one {dag} other {dagen}}", "cutoff_year": "{count, plural, one {jaar} other {jaren}}", @@ -1461,6 +1480,7 @@ "never": "Nooit", "new_album": "Nieuw album", "new_api_key": "Nieuwe API-sleutel", + "new_feature": "Nieuwe functie", "new_password": "Nieuw wachtwoord", "new_person": "Nieuw persoon", "new_pin_code": "Nieuwe pincode", @@ -1480,21 +1500,21 @@ "no_assets_message": "Klik hier om je eerste foto te uploaden", "no_assets_to_show": "Geen foto's om te laten zien", "no_cast_devices_found": "Geen cast-apparaten gevonden", - "no_checksum_local": "Geen checksum beschikbaar - kan lokale assets niet ophalen", - "no_checksum_remote": "Geen checksum beschikbaar - kan online assets niet ophalen", + "no_checksum_local": "Geen controlegetal beschikbaar - kan lokale assets niet ophalen", + "no_checksum_remote": "Geen controlegetal beschikbaar - kan online assets niet ophalen", "no_devices": "Geen geautoriseerde apparaten", "no_duplicates_found": "Er zijn geen duplicaten gevonden.", "no_exif_info_available": "Geen exif info beschikbaar", "no_explore_results_message": "Upload meer foto's om je verzameling te verkennen.", "no_favorites_message": "Voeg favorieten toe om snel je beste foto's en video's te vinden", "no_libraries_message": "Maak een externe bibliotheek om je foto's en video's te bekijken", - "no_local_assets_found": "Geen lokale assets gevonden met deze checksum", + "no_local_assets_found": "Geen lokale assets gevonden met dit controlegetal", "no_locked_photos_message": "Foto’s en video’s in de vergrendelde map zijn verborgen en worden niet weergegeven wanneer je door je bibliotheek bladert of zoekt.", "no_name": "Geen naam", "no_notifications": "Geen meldingen", "no_people_found": "Geen mensen gevonden", "no_places": "Geen plaatsen", - "no_remote_assets_found": "Geen online assets gevonden met deze checksum", + "no_remote_assets_found": "Geen online assets gevonden met dit controlegetal", "no_results": "Geen resultaten", "no_results_description": "Probeer een synoniem of een algemener zoekwoord", "no_shared_albums_message": "Maak een album om foto's en video's te delen met mensen in je netwerk", @@ -1504,6 +1524,7 @@ "not_available": "n.v.t.", "not_in_any_album": "Niet in een album", "not_selected": "Niet geselecteerd", + "not_set": "Nog niet ingesteld", "notes": "Opmerkingen", "nothing_here_yet": "Hier staan nog geen items", "notification_backup_reliability": "Schakel meldingen in om de betrouwbaarheid van back-ups op de achtergrond te verbeteren", @@ -1521,6 +1542,8 @@ "obtainium_configurator": "Obtainium instellen", "obtainium_configurator_instructions": "Gebruik Obtainium om de Android-app recht­streeks vanuit Immich's GitHub-releases te installeren en bij te werken. Maak een API-sleutel aan en selecteer een variant om je Obtainium-configuratielink te maken", "ocr": "OCR", + "ocr_body": "Immich leest nu de tekst in je foto's, zodat je ze kunt zoeken op basis van de inhoud.", + "ocr_title": "Zoek tekst in je foto's", "official_immich_resources": "Officiële Immich bronnen", "offline": "Offline", "offset": "Verrekening", @@ -1539,6 +1562,8 @@ "open": "Openen", "open_calendar": "Open kalender", "open_in_browser": "Openen in browser", + "open_in_immich_body": "Stel Immich in als je galerij op Android om foto's rechtstreeks vanuit andere apps te openen.", + "open_in_immich_title": "Open foto's in Immich", "open_in_map_view": "Openen in kaartweergave", "open_in_openstreetmap": "Openen in OpenStreetMap", "open_the_search_filters": "Open de zoekfilters", @@ -1697,7 +1722,10 @@ "recent": "Recent", "recent_searches": "Recente zoekopdrachten", "recently_added": "Onlangs toegevoegd", + "recently_added_body": "Ga direct naar een aparte pagina met al je recent toegevoegde items.", + "recently_added_description": "Blader door je items, op volgorde van wanneer ze zijn toegevoegd aan Immich", "recently_added_page_title": "Recent toegevoegd", + "recently_added_title": "Recent toegevoegd", "recently_taken": "Recent genomen", "refresh": "Vernieuwen", "refresh_encoded_videos": "Vernieuw gecodeerde video's", @@ -1904,6 +1932,8 @@ "share_link": "Link delen", "share_original": "Origineel gebruiken (groot)", "share_preview": "Voorbeeldafbeelding gebruiken (klein)", + "share_quality_body": "Houd de deelknop ingedrukt om de beeldkwaliteit te kiezen voordat je deelt.", + "share_quality_title": "Kies de gewenste deel kwaliteit", "shared": "Gedeeld", "shared_album_activities_input_disable": "Reactie is uitgeschakeld", "shared_album_activity_remove_content": "Wil je deze activiteit verwijderen?", @@ -1918,7 +1948,9 @@ "shared_link_app_bar_title": "Gedeelde links", "shared_link_clipboard_copied_massage": "Gekopieerd naar klembord", "shared_link_create_error": "Fout bij het maken van een gedeelde link", - "shared_link_custom_url_description": "Krijg toegang tot deze gedeelde link met een aangepaste URL", + "shared_link_custom_url_description": "Krijg toegang tot deze gedeelde link met een aangepaste URL-naam", + "shared_link_custom_url_title": "Aangepaste URL", + "shared_link_custom_url_warning": "Waarschuwing: een aangepaste URL naam met een voorwaartse slash kan zich anders gedragen dan verwacht.", "shared_link_edit_description_hint": "Voer beschrijving voor de gedeelde link in", "shared_link_edit_expire_after_option_day": "1 dag", "shared_link_edit_expire_after_option_days": "{count} dagen", @@ -1985,16 +2017,19 @@ "sign_out": "Uitloggen", "sign_up": "Registreren", "size": "Grootte", + "skip": "Overslaan", "skip_to_content": "Doorgaan naar inhoud", "skip_to_folders": "Doorgaan naar mappen", "skip_to_tags": "Doorgaan naar tags", "slideshow": "Diavoorstelling", + "slideshow_body": "Leun achterover en bekijk hoe je foto's in een diavoorstelling op volledig scherm worden afgespeeld.", "slideshow_metadata_overlay_mode": "Metadata bijschrift", "slideshow_metadata_overlay_mode_description_only": "Enkel beschrijving", "slideshow_metadata_overlay_mode_full": "Volledig", "slideshow_repeat": "Herhaal diavoorstelling", "slideshow_repeat_description": "Keer terug naar het begin wanneer de diavoorstelling eindigt", "slideshow_settings": "Diavoorstelling instellingen", + "slideshow_title": "Diavoorstelling", "smart_album": "Slim album", "some_assets_already_have_a_location_warning": "Sommige geselecteerde items hebben al een locatie", "sort_albums_by": "Sorteer albums op...", @@ -2122,6 +2157,7 @@ "unknown": "Onbekend", "unknown_country": "Onbekend Land", "unknown_date": "Onbekende datum", + "unknown_schema": "Onbekend schema", "unknown_year": "Onbekend jaar", "unlimited": "Onbeperkt", "unlink_motion_video": "Ontkoppel bewegende video", @@ -2157,6 +2193,8 @@ "upload_status_errors": "Fouten", "upload_status_uploaded": "Geüpload", "upload_success": "Uploaden gelukt, vernieuw de pagina om de nieuwe items te zien.", + "upload_to_album_body": "Voor gebruikers die de handmatige uploadfunctie niet gebruiken is het nu mogelijk om lokale foto's direct aan een album toe te voegen tijdens het uploaden. Het is dus niet meer nodig om foto's eerst te uploaden en ze later aan een album toe te voegen.", + "upload_to_album_title": "Upload direct naar een album", "upload_to_immich": "Uploaden naar Immich ({count})", "uploading": "Aan het uploaden", "uploading_media": "Media wordt geüpload", @@ -2224,6 +2262,9 @@ "week": "Week", "welcome": "Welkom", "welcome_to_immich": "Welkom bij Immich", + "whats_new": "Wat is er nieuw", + "whats_new_settings_subtitle": "Ontdek wat er nieuw is in Immich", + "whats_new_version": "Versie {version}", "when": "Wanneer", "width": "Breedte", "wifi_name": "Wifinetwerk", diff --git a/i18n/nn.json b/i18n/nn.json index e68a3b9a8e..dc44e5f417 100644 --- a/i18n/nn.json +++ b/i18n/nn.json @@ -23,6 +23,7 @@ "add_location": "Legg til stad", "add_partner": "Legg til partnar", "add_photos": "Legg til bilete", + "add_step": "Legg til steg", "add_tag": "Legg til tagg", "add_to": "Legg til…", "add_to_album": "Legg til i album", diff --git a/i18n/pa.json b/i18n/pa.json index b027fe6f34..ccdd6e4847 100644 --- a/i18n/pa.json +++ b/i18n/pa.json @@ -2,18 +2,30 @@ "about": "ਐਪ ਬਾਰੇ", "account": "ਖ਼ਾਤਾ", "account_settings": "ਖ਼ਾਤਾ ਸੈਟਿੰਗਾਂ", + "acknowledge": "ਸਵੀਕਾਰ", "action": "ਕਾਰਵਾਈ", "action_common_update": "ਅੱਪਡੇਟ", + "action_description": "ਚੋਣ ਕੀਤੀਆਂ ਜਾਇਦਾਦਾਂ 'ਤੇ ਕਰਨ ਲਈ ਕਾਰਵਾਈਆਂ ਦਾ ਇੱਕ ਸੈੱਟ", "actions": "ਕਾਰਵਾਈਆਂ", "active": "ਕਿਰਿਆਸ਼ੀਲ", + "active_count": "ਚਾਲੂ: {count}", "activity": "ਗਤੀਵਿਧੀ", "add": "ਸ਼ਾਮਲ ਕਰੋ", "add_a_description": "ਵੇਰਵਾ ਸ਼ਾਮਲ ਕਰੋ", "add_a_location": "ਇੱਕ ਸਥਾਨ ਸ਼ਾਮਲ ਕਰੋ", "add_a_name": "ਨਾਮ ਸ਼ਾਮਲ ਕਰੋ", "add_a_title": "ਸਿਰਲੇਖ ਸ਼ਾਮਲ ਕਰੋ", + "add_action": "ਕ੍ਰਿਆ ਜੋੜੋ", "add_birthday": "ਜਨਮਦਿਨ ਸ਼ਾਮਲ ਕਰੋ", "add_endpoint": "ਐਂਡਪੁਆਇੰਟ ਸ਼ਾਮਲ ਕਰੋ", "add_exclusion_pattern": "ਅਲਹਿਦਗੀ ਪੈਟਰਨ ਸ਼ਾਮਲ ਕਰੋ", - "add_location": "ਸਥਾਨ ਸ਼ਾਮਲ ਕਰੋ" + "add_location": "ਸਥਾਨ ਸ਼ਾਮਲ ਕਰੋ", + "add_partner": "ਸਾਥੀ ਜੋੜੋ", + "add_photos": "ਫੋਟੋਆਂ ਜੋੜੋ", + "add_step": "ਕਦਮ ਜੋੜੋ", + "add_tag": "ਟੈਗ ਜੋੜੋ", + "add_to": "…ਵਿਚ ਜੋੜੋ", + "add_to_album": "ਐਲਬਮ ਵਿੱਚ ਜੋੜੋ", + "add_to_album_bottom_sheet_added": "{album} ਵਿਚ ਸ਼ਾਮਿਲ ਕੀਤਾ", + "add_to_album_bottom_sheet_already_exists": "ਪਹਿਲਾਂ ਹੀ {album} ਵਿੱਚ" } diff --git a/i18n/pl.json b/i18n/pl.json index 9dc02cc4e8..54a9da4194 100644 --- a/i18n/pl.json +++ b/i18n/pl.json @@ -108,6 +108,21 @@ "image_thumbnail_quality_description": "Jakość miniatur od 1 do 100. Wyższa jest lepsza, ale tworzy większe pliki i może spowolnić reakcję aplikacji.", "image_thumbnail_title": "Ustawienia miniatur", "import_config_from_json_description": "Zaimportuj konfigurację systemu poprzez wczytanie pliku konfiguracyjnego JSON", + "integrity_checks_checksum_files": "Weryfikacja sum kontrolnych", + "integrity_checks_checksum_files_description": "Skonfiguruj weryfikację sumy kontrolnej plików", + "integrity_checks_checksum_files_enable_description": "Włącz weryfikację sum kontrolnych", + "integrity_checks_checksum_files_percentage_limit": "Ograniczenie procentowe", + "integrity_checks_checksum_files_percentage_limit_description": "Ustaw maksymalną wartość procentową w przedziale od 0,01 do 1, określającą, jaka część weryfikacji sumy kontrolnej ma być przeprowadzana w każdym przedziale czasowym.", + "integrity_checks_checksum_files_time_limit": "Ograniczenie czasowe", + "integrity_checks_checksum_files_time_limit_description": "Skonfiguruj maksymalny czas trwania weryfikacji sumy kontrolnej w każdym przedziale czasowym. (ms)", + "integrity_checks_missing_files": "Brakujące pliki", + "integrity_checks_missing_files_description": "Skonfiguruj częstotliwość oraz włącz lub wyłącz sprawdzanie brakujących plików", + "integrity_checks_missing_files_enable_description": "Włącz sprawdzanie brakujących plików", + "integrity_checks_settings": "Kontrole integralności", + "integrity_checks_settings_description": "Zarządzanie częstotliwością kontroli integralności", + "integrity_checks_untracked_files": "Pliki nieśledzone", + "integrity_checks_untracked_files_description": "Skonfiguruj częstotliwość i włącz lub wyłącz sprawdzanie plików nieśledzonych", + "integrity_checks_untracked_files_enable_description": "Włącz sprawdzanie plików nieśledzonych", "job_concurrency": "{job} współbieżność", "job_created": "Zadanie utworzone", "job_not_concurrency_safe": "To zadanie nie może zostać wykonane w wielu wątkach.", @@ -416,6 +431,10 @@ "transcoding_realtime_description": "Umożliwia transkodowanie w czasie rzeczywistym podczas strumieniowego przesyłania wideo. Pozwala na zmianę jakości, ale w zależności od możliwości serwera może powodować większe opóźnienia w odtwarzaniu i zacinanie się obrazu.", "transcoding_realtime_enabled": "Włącz transkodowanie w czasie rzeczywistym", "transcoding_realtime_enabled_description": "Gdy wyłączone, serwer odmówi uruchamiania nowych sesji transkodowania w czasie rzeczywistym.", + "transcoding_realtime_resolutions": "Rozdzielczości", + "transcoding_realtime_resolutions_description": "Rozdzielczości dostępne dla transkodowania w czasie rzeczywistym. Wyższe rozdzielczości mogą powodować problemy z odtwarzaniem jeśli serwer nie będzie w stanie ich transkodować odpowiednio szybko.", + "transcoding_realtime_video_codecs": "Kodeki Wideo", + "transcoding_realtime_video_codecs_description": "Kodeki wideo dostępne dla transkodowania w czasie rzeczywistym. Aplikacje klienckie wybiorą najlepszą opcję wspierane przez system w trakcie odtwarzania. AVI jest wydajniejsze niż HEVC, który jest wydajniejszy niż H.264. Mając aktywne przyspieszenie sprzętowe wybierz tylko te kodeki, które są wspierane przez twoje urządzenie. Transkodując programowo pamiętaj, że H.264 jest szybsze niż AVI, a HEVC jest od niego wolniejszy.", "transcoding_reference_frames": "Ramki referencyjne", "transcoding_reference_frames_description": "Liczba klatek używana do odnoszenia się podczas kompresowania danej klatki. Wyższe wartości poprawiają efektywność kompresji, ale spowalniają kodowanie. 0 ustawia tą wartość automatycznie.", "transcoding_required_description": "Tylko filmy w nieakceptowanym formacie", @@ -578,6 +597,7 @@ "asset_viewer_settings_title": "Przeglądarka zasobów", "assets": "Zasoby", "assets_added_to_album_count": "Dodano {count, plural, one {# zasób} few {# zasoby} other {# zasobów}} do albumu", + "assets_added_to_album_partial_count": "Dodano {successCount} z {totalCount, plural, one {# zasób} few {# zasoby} other {# zasobów}} do albumu", "assets_added_to_albums_count": "Dodano {assetTotal, plural, one {# zasób} few {# zasoby} other {# zasobów}} do {albumTotal, plural, one {# albumu} other {# albumów}}", "assets_cannot_be_added_to_album_count": "{count, plural, one {Zasób nie może zostać dodany} other {Zasoby nie mogą zostać dodane}} do albumu", "assets_cannot_be_added_to_albums": "{count, plural, one {Zasób nie może być dodany} other {Zasoby nie mogą być dodane}} do żadnego z albumów", @@ -794,7 +814,6 @@ "custom_date": "Data niestandardowa", "custom_locale": "Niestandardowe ustawienia regionalne", "custom_locale_description": "Formatuj daty, godziny i liczby zgodnie z wybranym językiem i regionem", - "custom_url": "Niestandardowy URL", "cutoff_date_description": "Zachowaj zdjęcia z ostatnich…", "cutoff_day": "{count, plural, one {dzień} other {dni}}", "cutoff_year": "{count, plural, one {rok} few {lata} other {lat}}", @@ -1461,6 +1480,7 @@ "never": "Nigdy", "new_album": "Nowy album", "new_api_key": "Nowy Klucz API", + "new_feature": "Nowa funkcjonalność", "new_password": "Nowe hasło", "new_person": "Nowa osoba", "new_pin_code": "Nowy kod PIN", @@ -1504,6 +1524,7 @@ "not_available": "Nie dotyczy", "not_in_any_album": "Bez albumu", "not_selected": "Nie wybrano", + "not_set": "Nie ustawiono", "notes": "Uwagi", "nothing_here_yet": "Nic tu jeszcze nie ma", "notification_backup_reliability": "Włącz powiadomienia, aby zwiększyć niezawodność tworzenia kopii zapasowych w tle", @@ -1521,6 +1542,8 @@ "obtainium_configurator": "Konfigurator Obtainium", "obtainium_configurator_instructions": "Użyj Obtainium, aby zainstalować i aktualizować aplikację na Androida bezpośrednio z wydania GitHuba Immich. Utwórz klucz API i wybierz wariant, aby utworzyć link konfiguracyjny Obtainium", "ocr": "OCR", + "ocr_body": "Immich odczytuje teraz tekst znajdujący się na twoich zdjęciach, dzięki czemu możesz je wyszukiwać na podstawie treści.", + "ocr_title": "Wyszukaj tekst na twoich zdjęciach", "official_immich_resources": "Oficjalne zasoby Immicha", "offline": "Offline", "offset": "Przesunięcie", @@ -1539,6 +1562,8 @@ "open": "Otwórz", "open_calendar": "Otwórz kalendarz", "open_in_browser": "Otwórz w przeglądarce", + "open_in_immich_body": "Ustaw Immich jako domyślną galerię w systemie Android, aby otwierać zdjęcia bezpośrednio z innych aplikacji.", + "open_in_immich_title": "Otwórz zdjęcia w Immich", "open_in_map_view": "Otwórz w widoku mapy", "open_in_openstreetmap": "Otwórz w OpenStreetMap", "open_the_search_filters": "Otwórz filtry wyszukiwania", @@ -1596,7 +1621,7 @@ "person": "Osoba", "person_age_months": "{months, plural, one {# miesiąc} few {# miesiące} many {# miesięcy} other {# miesięcy}}", "person_age_year_months": "1 rok, {months, plural, one {# miesiąc} few {# miesiące} many {# miesięcy} other {# miesięcy}}", - "person_age_years": "{years, plural, one {# rok} few {# lata} many {# lat} other {# lat}}", + "person_age_years": "{years, plural, one {# rok} few {# lata} other {# lat}}", "person_birthdate": "Urodzony {date}", "person_hidden": "{name}{hidden, select, true { (ukryty)} other {}}", "person_recognized": "Osoba rozpoznana", @@ -1697,7 +1722,10 @@ "recent": "Ostatnie", "recent_searches": "Ostatnie wyszukiwania", "recently_added": "Ostatnio dodane", + "recently_added_body": "Przejdź od razu do wszystkich elementów, które ostatnio dodałeś, na specjalnej stronie.", + "recently_added_description": "Przeglądaj swoje zasoby posortowane według daty przesłania ich do Immich", "recently_added_page_title": "Ostatnio Dodane", + "recently_added_title": "Ostatnio dodane", "recently_taken": "Ostatnio wykonane", "refresh": "Odśwież", "refresh_encoded_videos": "Odśwież enkodowane wideo", @@ -1904,6 +1932,8 @@ "share_link": "Udostępnij link", "share_original": "Użyj orginału (duży)", "share_preview": "Użyj miniatury (mała)", + "share_quality_body": "Naciśnij i przytrzymaj przycisk udostępniania, aby wybrać jakość obrazu przed udostępnieniem.", + "share_quality_title": "Wybierz jakość udostępnianych zasobów", "shared": "Udostępnione", "shared_album_activities_input_disable": "Komentarz jest wyłączony", "shared_album_activity_remove_content": "Czy chcesz usunąć tę aktywność?", @@ -1919,6 +1949,8 @@ "shared_link_clipboard_copied_massage": "Skopiowane do schowka", "shared_link_create_error": "Błąd podczas tworzenia linka do udostępnienia", "shared_link_custom_url_description": "Otwórz udostępniony link z niestandardowym adresem URL", + "shared_link_custom_url_title": "Niestandardowy adres URL", + "shared_link_custom_url_warning": "Ostrzeżenie: niestandardowy adres URL z prawym ukośnikiem może nie działać zgodnie z oczekiwaniami.", "shared_link_edit_description_hint": "Wprowadź opis udostępnienia", "shared_link_edit_expire_after_option_day": "1 dniu", "shared_link_edit_expire_after_option_days": "{count} dniach", @@ -1985,16 +2017,19 @@ "sign_out": "Wyloguj się", "sign_up": "Zarejestruj się", "size": "Rozmiar", + "skip": "Pomiń", "skip_to_content": "Przejdź do treści", "skip_to_folders": "Przejdź do folderów", "skip_to_tags": "Przejdź do tagów", "slideshow": "Pokaz slajdów", + "slideshow_body": "Usiądź wygodnie i obejrzyj swoje zdjęcia w formie pokazu slajdów na pełnym ekranie.", "slideshow_metadata_overlay_mode": "Treść nakładki", "slideshow_metadata_overlay_mode_description_only": "Tylko opis", "slideshow_metadata_overlay_mode_full": "Pełna", "slideshow_repeat": "Powtórz pokaz slajdów", "slideshow_repeat_description": "Zapętl pokaz slajdów", "slideshow_settings": "Ustawienia pokazu slajdów", + "slideshow_title": "Pokaz slajdów", "smart_album": "Album inteligentny", "some_assets_already_have_a_location_warning": "Niektóre z wybranych zasobów mają już lokalizację", "sort_albums_by": "Sortuj albumy według...", @@ -2122,6 +2157,7 @@ "unknown": "Nieznany", "unknown_country": "Nieznane państwo", "unknown_date": "Nieznana data", + "unknown_schema": "Nieznany schemat", "unknown_year": "Rok nieznany", "unlimited": "Nieograniczony", "unlink_motion_video": "Rozłącz ruchome wideo", @@ -2157,6 +2193,8 @@ "upload_status_errors": "Błędy", "upload_status_uploaded": "Przesłano", "upload_success": "Przesyłanie powiodło się, odśwież stronę, aby zobaczyć nowo przesłane zasoby.", + "upload_to_album_body": "Użytkownicy, którzy nie korzystają z funkcji ręcznego przesyłania, mogą teraz dodawać lokalne zdjęcia bezpośrednio do albumu podczas przesyłania. Nie ma już potrzeby przesyłania i późniejszego dodawania zdjęć do albumu.", + "upload_to_album_title": "Prześlij bezpośrednio do albumu", "upload_to_immich": "Prześlij do Immich ({count})", "uploading": "Przesyłanie", "uploading_media": "Przesyłanie multimediów", @@ -2224,6 +2262,9 @@ "week": "Tydzień", "welcome": "Witaj", "welcome_to_immich": "Witamy w immich", + "whats_new": "Co nowego", + "whats_new_settings_subtitle": "Zobacz, co nowego w Immich", + "whats_new_version": "Wersja {version}", "when": "Kiedy", "width": "Szerokość", "wifi_name": "Nazwa Wi-Fi", diff --git a/i18n/pt.json b/i18n/pt.json index 2973d40d32..43981a6fd2 100644 --- a/i18n/pt.json +++ b/i18n/pt.json @@ -62,9 +62,9 @@ "cleared_jobs": "Eliminadas as tarefas de: {job}", "config_set_by_file": "A configuração está atualmente definida por um ficheiro de configuração", "confirm_delete_library": "Tem a certeza de que deseja eliminar a biblioteca {library} ?", - "confirm_delete_library_assets": "Tem a certeza de que deseja eliminar esta biblioteca? Isto eliminará {count, plural, one {# ficheiro incluído} other {todos os # ficheiros incluídos}} do Immich e esta ação não pode ser anulada. Os ficheiros permanecerão no disco.", + "confirm_delete_library_assets": "Tem a certeza de que deseja eliminar esta biblioteca? Irá eliminar {count, plural, one {# ficheiro incluído} other {todos os # ficheiros incluídos}} nesta do Immich e esta ação não pode ser anulada. Os ficheiros permanecerão no disco.", "confirm_email_below": "Para confirmar, escreva \"{email}\" abaixo", - "confirm_reprocess_all_faces": "Tem a certeza de que deseja reprocessar todos os rostos? Isto também limpará os nomes das pessoas.", + "confirm_reprocess_all_faces": "Tem a certeza de que deseja reprocessar todos os rostos? Também irá limpar os nomes das pessoas.", "confirm_user_password_reset": "Tem a certeza de que deseja redefinir a palavra-passe de {user}?", "confirm_user_pin_code_reset": "Tem a certeza de que quer repor o código PIN de {user}?", "copy_config_to_clipboard_description": "Copiar a configuração atual do sistema como um objeto JSON para a área de transferência", @@ -74,15 +74,15 @@ "cron_expression_presets": "Predefinições das expressões Cron", "disable_login": "Desativar inicio de sessão", "download_csv": "Descarregar CSV", - "duplicate_detection_job_description": "Executa a aprendizagem de máquina em ficheiros para detetar imagens semelhantes. Depende da Pesquisa Inteligente", - "exclusion_pattern_description": "Os padrões de exclusão permitem ignorar ficheiros e pastas ao analisar a sua biblioteca. Isto é útil se tiver pastas que contenham ficheiros que não deseja importar, como ficheiros RAW.", + "duplicate_detection_job_description": "Executa a aprendizagem de máquina nos ficheiros para detetar imagens semelhantes. Depende da Pesquisa Inteligente", + "exclusion_pattern_description": "Os padrões de exclusão permitem ignorar ficheiros e pastas ao analisar a sua biblioteca. É útil se tiver pastas que contenham ficheiros que não deseja importar, como ficheiros RAW.", "export_config_as_json_description": "Descarregar a configuração atual do sistema como um ficheiro JSON", "external_libraries_page_description": "Página de administrador de bibliotecas externas", "face_detection": "Deteção de Rostos", "face_detection_description": "Deteta rostos em ficheiros utilizando aprendizagem automática. Para vídeos, apenas a miniatura é considerada. \"Atualizar\" (re)processa todos os ficheiros, enquanto \"Redefinir\" elimina todos os dados de rostos. \"Em falta\" coloca em fila ficheiros que ainda não foram processados. Os rostos detetados serão colocados em fila para Reconhecimento Facial após a conclusão da Deteção de Rostos, agrupando-os em pessoas novas ou já existentes.", "facial_recognition_job_description": "Agrupa rostos detetadas em pessoas. Esta etapa é executada após a conclusão da Deteção de Rostos. \"Redefinir\" (re)agrupa todos os rostos. \"Em falta\" coloca em fila rostos que ainda não têm uma pessoa atribuída.", "failed_job_command": "Ocorreu um erro no comando {command} para a tarefa: {job}", - "force_delete_user_warning": "AVISO: Isto removerá imediatamente o utilizador e todos os ficheiros. Esta ação não pode ser anulada e os ficheiros não poderão ser recuperados.", + "force_delete_user_warning": "AVISO: Esta ação irá remover imediatamente o utilizador e todos os ficheiros. Esta ação não pode ser anulada e os ficheiros não poderão ser recuperados.", "image_format": "Formato", "image_format_description": "WebP produz ficheiros mais pequenos do que JPEG, mas é mais lento para codificar.", "image_fullsize_description": "Imagem de tamanho inteiro sem meta dados, utilizada quando esta for ampliada", @@ -91,9 +91,9 @@ "image_fullsize_quality_description": "Qualidade da imagem de tamanho inteiro de 1 a 100. Valores mais altos são melhores, mas produzem ficheiros maiores.", "image_fullsize_title": "Definições de imagem de tamanho inteiro", "image_prefer_embedded_preview": "Preferir visualização incorporada", - "image_prefer_embedded_preview_setting_description": "Utilizar visualizações incorporadas em fotos RAW como entrada para processamento de imagem e quando disponível. Isto pode produzir cores mais precisas para algumas imagens, mas a qualidade da visualização depende da câmara e a imagem pode ter mais artefatos de compressão.", + "image_prefer_embedded_preview_setting_description": "Utilizar visualizações incorporadas em fotos RAW como entrada para processamento de imagem e quando disponível. Poderá produzir cores mais precisas para algumas imagens, mas a qualidade da visualização depende da câmara e a imagem pode ter mais artefactos de compressão.", "image_prefer_wide_gamut": "Prefira ampla gama", - "image_prefer_wide_gamut_setting_description": "Utilizar Display P3 para miniaturas. Isto preserva melhor a vibrância das imagens com espaços de cores amplos, mas as imagens podem aparecer de maneira diferente em dispositivos antigos com uma versão antiga do navegador. As imagens sRGB são mantidas como sRGB para evitar mudanças de cores.", + "image_prefer_wide_gamut_setting_description": "Utilizar Display P3 para miniaturas. Irá preservar melhor a vibrância das imagens com espaços de cores amplos, mas as imagens podem aparecer de maneira diferente em dispositivos antigos com uma versão antiga do navegador. As imagens sRGB são mantidas como sRGB para evitar mudanças de cores.", "image_preview_description": "Imagem de tamanho médio sem metadados, utilizada ao visualizar um único ficheiro e pela aprendizagem de máquina", "image_preview_quality_description": "Qualidade de pré-visualização de 1 a 100. Maior é melhor, mas produz ficheiros maiores e pode reduzir a capacidade de resposta da aplicação. Definir um valor demasiado baixo pode afetar a qualidade da aprendizagem de máquina.", "image_preview_title": "Definições de Pré-visualização", @@ -108,7 +108,22 @@ "image_thumbnail_quality_description": "Qualidade das miniaturas de 1 a 100. Maior é melhor, mas produz tamanhos de ficheiro maiores e podem reduzir a capacidade de resposta da aplicação.", "image_thumbnail_title": "Definições de Miniaturas", "import_config_from_json_description": "Importar configuração do sistema ao carregar um ficheiro JSON", - "job_concurrency": "{job} em simultâneo", + "integrity_checks_checksum_files": "Checksum de ficheiros", + "integrity_checks_checksum_files_description": "Configurar a verificação de checksum", + "integrity_checks_checksum_files_enable_description": "Ativar a verificação de checksum", + "integrity_checks_checksum_files_percentage_limit": "Limite percentual", + "integrity_checks_checksum_files_percentage_limit_description": "Configurar a percentagem máxima entre 0.01 e 1 para o quanto da verificação checksum deve ser executada a cada intervalo.", + "integrity_checks_checksum_files_time_limit": "Tempo limite", + "integrity_checks_checksum_files_time_limit_description": "Configurar a duração máxima que cada verificação de checksum deve executar para cada intervalo. (ms)", + "integrity_checks_missing_files": "Ficheiros em falta", + "integrity_checks_missing_files_description": "Configurar a frequência e ativar ou desativar a verificação de ficheiros em falta", + "integrity_checks_missing_files_enable_description": "Ativar a verificação de ficheiros em falta", + "integrity_checks_settings": "Verificações de integridade", + "integrity_checks_settings_description": "Gerir os intervalos das verificações de integridade", + "integrity_checks_untracked_files": "Ficheiros não monitorizados", + "integrity_checks_untracked_files_description": "Configurar a frequência e ativar ou desativar a verificação de ficheiros não monitorizados", + "integrity_checks_untracked_files_enable_description": "Ativar a verificação de ficheiros não monitorizados", + "job_concurrency": "\"{job}\" em simultâneo", "job_created": "Tarefa criada", "job_not_concurrency_safe": "Esta tarefa não pode ser executada em simultâneo.", "job_settings": "Definições de Tarefas", @@ -163,7 +178,7 @@ "machine_learning_min_detection_score": "Pontuação mínima de deteção", "machine_learning_min_detection_score_description": "Pontuação mínima de confiança para um rosto ser detetado, de 0 a 1. Valores mais baixos detetam mais rostos, mas poderão resultar em falsos positivos.", "machine_learning_min_recognized_faces": "Mínimo de rostos reconhecidos", - "machine_learning_min_recognized_faces_description": "O número mínimo de faces reconhecidas para uma pessoa ser criada na lista. Aumentar isto torna o Reconhecimento Facial mais preciso, no entanto aumenta a probabilidade de um rosto não ser atribuído a uma pessoa.", + "machine_learning_min_recognized_faces_description": "O número mínimo de faces reconhecidas para uma pessoa ser criada na lista. Aumentá-lo torna o Reconhecimento Facial mais preciso, no entanto aumenta a probabilidade de um rosto não ser atribuído a uma pessoa.", "machine_learning_ocr": "Reconhecimento Ótico de Caracteres (OCR)", "machine_learning_ocr_description": "Utilizar aprendizagem de máquina para reconhecer texto dentro de imagens", "machine_learning_ocr_enabled": "Ativar OCR", @@ -175,7 +190,7 @@ "machine_learning_ocr_min_recognition_score": "Pontuação mínima de reconhecimento", "machine_learning_ocr_min_score_recognition_description": "Pontuação mínima de confiança para o texto ser reconhecido de 0 a 1. Valores mais baixos vão reconhecer mais texto mas podem resultar em falsos positivos.", "machine_learning_ocr_model": "Modelo de OCR", - "machine_learning_ocr_model_description": "Modelos do servidor têm mais precisão do que modelos móveis, mas demoram mais tempo a processar e utilizam mais memória.", + "machine_learning_ocr_model_description": "Os modelos de servidor têm mais precisão do que os modelos de dispositivos móveis, mas demoram mais tempo a processar e utilizam mais memória.", "machine_learning_settings": "Definições de aprendizagem de máquina (Machine Learning)", "machine_learning_settings_description": "Gerir funcionalidades e definições de aprendizagem de máquina", "machine_learning_smart_search": "Pesquisa Inteligente", @@ -257,7 +272,7 @@ "no_paths_added": "Nenhum caminho adicionado", "no_pattern_added": "Nenhum padrão adicionado", "note_apply_storage_label_previous_assets": "Observação: Para aplicar o Rótulo de Armazenamento a ficheiros carregados anteriormente, execute a", - "note_cannot_be_changed_later": "NOTA: Isto não pode ser alterado posteriormente!", + "note_cannot_be_changed_later": "NOTA: Isto não poderá ser alterado posteriormente!", "notification_email_from_address": "A partir do endereço", "notification_email_from_address_description": "Endereço de e-mail do remetente, por exemplo: \"Servidor de Fotos Immich \". Certifique-se de que utiliza um endereço através do qual pode enviar e-mails.", "notification_email_host_description": "Host do servidor de e-mail (por exemplo, smtp.immich.app)", @@ -277,7 +292,7 @@ "notification_settings": "Definições de notificações", "notification_settings_description": "Gerir definições de notificações, incluindo e-mail", "oauth_allow_insecure_requests": "Permitir pedidos inseguros", - "oauth_allow_insecure_requests_description": "AVISO: Isto irá desativar a validação de certificados TLS para pedidos OAuth e poderá ficar exposto a ataques MITM (\"Man-in-the-middle\").", + "oauth_allow_insecure_requests_description": "AVISO: Irá desativar a validação de certificados TLS para pedidos OAuth e poderá ficar exposto a ataques MITM (\"Man-in-the-middle\").", "oauth_auto_launch": "Arranque automático", "oauth_auto_launch_description": "Iniciar o fluxo de sessão por OAuth automaticamente ao navegar até a página de inicio de sessão", "oauth_auto_register": "Registo automático", @@ -303,7 +318,7 @@ "oauth_storage_quota_default_description": "Quota em GiB a ser usada quando nenhuma reivindicação for fornecida.", "oauth_timeout": "Tempo Limite de Requisição", "oauth_timeout_description": "Tempo limite para requisições, em milissegundos", - "ocr_job_description": "Utilizar aprendizagem de máquina para reconhecer texto em imagens", + "ocr_job_description": "Utiliza a aprendizagem de máquina para reconhecer texto em imagens", "password_enable_description": "Iniciar sessão com e-mail e palavra-passe", "password_settings": "Palavra-passe de acesso", "password_settings_description": "Gerir definições de inicio de sessão e palavra-passe", @@ -336,9 +351,9 @@ "server_welcome_message_description": "Uma mensagem que é exibida na página de inicio de sessão.", "settings_page_description": "Página de administrador das definições", "sidecar_job": "Metadados secundários", - "sidecar_job_description": "Descobrir ou sincronizar metadados secundários a partir do sistema de ficheiros", + "sidecar_job_description": "Descobre ou sincroniza metadados secundários a partir do sistema de ficheiros", "slideshow_duration_description": "Tempo em segundos para exibir cada imagem", - "smart_search_job_description": "Execute a aprendizagem automática em ficheiros para oferecer apoio à Pesquisa Inteligente", + "smart_search_job_description": "Executa a aprendizagem de máquina nos ficheiros para oferecer apoio à Pesquisa Inteligente", "storage_template_date_time_description": "O registo de data e hora de criação do ficheiro é utilizado para preencher estas informações", "storage_template_date_time_sample": "Exemplo de data/hora {date}", "storage_template_enable_description": "Ativar mecanismo de modelo de armazenamento", @@ -346,11 +361,11 @@ "storage_template_hash_verification_enabled_description": "Ativa a verificação de hash, não desative esta opção a menos que tenha a certeza das implicações", "storage_template_migration": "Migração de modelo de armazenamento", "storage_template_migration_description": "Aplica o {template} atual para ficheiros previamente carregados", - "storage_template_migration_info": "O modelo de armazenamento irá converter todas as extensões para letra minúscula. As mudanças do modelo apenas se aplicarão a novos ficheiros. Para aplicar o modelo retroativamente para os ficheiros carregados anteriormente, execute o {job}.", + "storage_template_migration_info": "O modelo de armazenamento irá converter todas as extensões para letra minúscula. As mudanças do modelo apenas se aplicarão a novos ficheiros. Para aplicar o modelo retroativamente para todos os ficheiros carregados anteriormente, execute a {job}.", "storage_template_migration_job": "Tarefa de Migração do Modelo de Armazenamento", "storage_template_more_details": "Para mais informações sobre esta funcionalidade, dirija-se a Modelo de Armazenamento e às suas implicações", "storage_template_onboarding_description_v2": "Quando ativada, está função irá automaticamente organizar ficheiros com base num modelo definido pelo utilizador. Para mais informações, consulte a documentação.", - "storage_template_path_length": "Limite aproximado do tamanho do caminho: {length, number}{limit, number}", + "storage_template_path_length": "Limite aproximado do tamanho do caminho: {length, number}/{limit, number}", "storage_template_settings": "Modelo de Armazenamento", "storage_template_settings_description": "Gerir a estrutura de pastas e o nome do ficheiro carregado", "storage_template_user_label": "{label} é o Rótulo do Armazenamento do utilizador", @@ -383,7 +398,7 @@ "transcoding_accepted_containers_description": "Selecione os formatos de contentores que não precisam de ser remisturados para MP4. Usado apenas para algumas políticas de transcodificação.", "transcoding_accepted_video_codecs": "Codecs de vídeo aceitos", "transcoding_accepted_video_codecs_description": "Selecione quais os codecs de vídeo que não precisam de ser transcodificados. Usado apenas para determinadas políticas de transcodificação.", - "transcoding_advanced_options_description": "Opções que a maioria dos utilizadores não deverá precisar de alterar", + "transcoding_advanced_options_description": "Opções que a maioria dos utilizadores não deverão precisar de alterar", "transcoding_audio_codec": "Codec de áudio", "transcoding_audio_codec_description": "Opus é a opção de mais alta qualidade, mas tem menor compatibilidade com dispositivos ou software antigos.", "transcoding_bitrate_description": "Vídeos com taxa de bits superior à máxima ou que não estão num formato aceite", @@ -411,11 +426,15 @@ "transcoding_preferred_hardware_device": "Dispositivo de hardware preferido", "transcoding_preferred_hardware_device_description": "Aplica-se apenas a VAAPI e QSV. Define o nó dri usado para transcodificação de hardware.", "transcoding_preset_preset": "Predefinição (-preset)", - "transcoding_preset_preset_description": "Velocidade de compressão. Predefinições mais lentas produzem ficheiros menores e aumentam a qualidade ao atingir uma determinada taxa de bits. VP9 ignora velocidades acima de \"mais rápido\".", + "transcoding_preset_preset_description": "Velocidade de compressão. Predefinições mais lentas produzem ficheiros menores e aumentam a qualidade ao atingir uma determinada taxa de bits. VP9 ignora velocidades acima de \"faster\".", "transcoding_realtime": "Transcodificação em Tempo Real [EXPERIMENTAL]", "transcoding_realtime_description": "Permite que a transcodificação seja efetuada em tempo real enquanto o vídeo a está a ser transmitido. Permite a alteração de qualidade, mas pode causar um maior atraso na reprodução e lentidão dependendo da capacidade do servidor.", "transcoding_realtime_enabled": "Ativar transcodificação em tempo real", "transcoding_realtime_enabled_description": "Se estiver desativado, o servidor irá recusar o início de novas sessões de transcodificação em tempo real.", + "transcoding_realtime_resolutions": "Resoluções", + "transcoding_realtime_resolutions_description": "As resoluções que são disponibilizadas para transcodificação em tempo real. Resoluções mais altas podem causar problemas de reprodução se o servidor não conseguir transcodificá-las com rapidez suficiente.", + "transcoding_realtime_video_codecs": "Codecs de vídeo", + "transcoding_realtime_video_codecs_description": "Os codecs de vídeo que são disponibilizados para transcodificação em tempo real. Os clientes vão escolher a melhor opção que suportam durante a reprodução. AV1 é mais eficiente do que HEVC, que por sua vez é mais eficiente do que H.264. Ao utilizar aceleração por hardware, selecione apenas os codecs que o acelerador consegue codificar. Ao utilizar transcodificação por software, observe que H.264 é mais rápido do que AV1, que por sua vez é mais rápido do que HEVC.", "transcoding_reference_frames": "Quadros de referência", "transcoding_reference_frames_description": "O número de quadros a serem referenciados ao comprimir um determinado quadro. Valores mais altos melhoram a eficiência da compressão, mas tornam a codificação mais lenta. 0 define esse valor automaticamente.", "transcoding_required_description": "Apenas vídeos que não estejam num formato aceite", @@ -442,7 +461,7 @@ "trash_settings_description": "Gerir definições da reciclagem", "unlink_all_oauth_accounts": "Desvincular todas as contas OAuth", "unlink_all_oauth_accounts_description": "Lembre-se de desvincular todas as contas OAuth antes de migrar para um novo provedor.", - "unlink_all_oauth_accounts_prompt": "Tem a certeza de que deseja desvincular todas as contas OAuth? Isto irá redefinir o ID OAuth de cada utilizador e não poderá ser anulado.", + "unlink_all_oauth_accounts_prompt": "Tem a certeza de que deseja desvincular todas as contas OAuth? Irá redefinir o ID OAuth de cada utilizador e não poderá ser anulado.", "user_cleanup_job": "Limpeza de utilizadores", "user_delete_delay": "A conta e os ficheiros de {user} serão agendados para eliminação permanente dentro de {delay, plural, one {# dia} other {# dias}}.", "user_delete_delay_settings": "Atraso de eliminação", @@ -562,7 +581,7 @@ "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_subtitle": "Definições de disposição da grade de fotos", "asset_list_settings_title": "Grade de fotos", "asset_not_found_on_device_android": "Ficheiro não encontrado no dispositivo", "asset_not_found_on_device_ios": "Ficheiro não encontrado no dispositivo. Se estiver a utilizar o iCloud, o ficheiro pode estar inacessível devido a um ficheiro corrompido armazenado no iCloud", @@ -574,10 +593,11 @@ "asset_troubleshoot": "Resolução de problemas com conteúdos", "asset_uploaded": "Enviado", "asset_uploading": "A enviar…", - "asset_viewer_settings_subtitle": "Gerenciar as configurações do visualizador da galeria", + "asset_viewer_settings_subtitle": "Gerir as definições do visualizador da galeria", "asset_viewer_settings_title": "Visualizador", "assets": "Ficheiros", "assets_added_to_album_count": "{count, plural, one {# ficheiro adicionado} other {# ficheiros adicionados}} ao álbum", + "assets_added_to_album_partial_count": "{totalCount, plural, one {Foi adicionado} other {Foram adicionados}} {successCount} de {totalCount} {totalCount, plural, one {ficheiro} other {ficheiros}} ao álbum", "assets_added_to_albums_count": "{assetTotal, plural, one {Foi adicionado # ficheiro} other {Foram adiciondos # ficheiros}} a {albumTotal, plural, one {# álbum} other {# albuns}}", "assets_cannot_be_added_to_album_count": "Não foi possível adicionar {count, plural, one {ficheiro} other {ficheiros}} ao álbum", "assets_cannot_be_added_to_albums": "{count, plural, one {Ficheiro não pode ser adicionado} other {Ficheiros não podem ser adiciondos}} a nenhum dos álbuns", @@ -624,7 +644,7 @@ "backup_controller_page_remainder_sub": "Fotos e vídeos selecionados restantes para fazer backup", "backup_controller_page_server_storage": "Armazenamento no servidor", "backup_controller_page_storage_format": "{used} de {total} utilizado", - "backup_controller_page_to_backup": "Álbuns para fazer backup", + "backup_controller_page_to_backup": "Escolha os álbuns para fazer cópia de segurança", "backup_controller_page_total_sub": "Todas as fotos e vídeos dos álbuns selecionados", "backup_error_sync_failed": "A sincronização falhou. Não é possível fazer a cópia de segurança.", "backup_info_card_assets": "ficheiros", @@ -794,7 +814,6 @@ "custom_date": "Data personalizada", "custom_locale": "Localização personalizada", "custom_locale_description": "Formatar datas, horas e números baseados na língua e região selecionadas", - "custom_url": "URL personalizado", "cutoff_date_description": "Manter fotos dos últimos…", "cutoff_day": "{count, plural, one {dia} other {dias}}", "cutoff_year": "{count, plural, one {ano} other {anos}}", @@ -1125,7 +1144,7 @@ "forgot_pin_code_question": "Esqueceu-se do seu PIN?", "forward": "Para a frente", "free_up_space": "Libertar Espaço", - "free_up_space_description": "Mover fotos e vídeos que tenham sido copiados para o servidor para a reciclagem do seu dispositivo para libertar espaço. As cópias no servidor mantêm-se seguras.", + "free_up_space_description": "Mover fotos e vídeos que já tenham sido copiados para o servidor para a reciclagem do seu dispositivo para libertar espaço. As cópias no servidor mantêm-se seguras.", "free_up_space_settings_subtitle": "Libertar espaço no dispositivo", "full_path": "Caminho completo: {path}", "full_path_or_folder": "Caminho completo ou nome da pasta", @@ -1301,11 +1320,11 @@ "login_form_failed_get_oauth_server_config": "Ocorreu um erro ao iniciar sessão com o OAuth, verifique o URL do servidor", "login_form_failed_get_oauth_server_disable": "A função OAuth não está disponível neste servidor", "login_form_failed_login": "Ocorreu um erro ao iniciar sessão, verifique o URL do servidor, o e-mail e a palavra-passe", - "login_form_handshake_exception": "Erro ao conectar com o servidor. Ative o suporte para certificados auto-assinados nas configurações se estiver utilizando um certificado auto-assinado.", + "login_form_handshake_exception": "Ocorreu um erro ao autenticar com o servidor. Ative o suporte para certificados auto-assinados nas definições se estiver a utilizar um certificado auto-assinado.", "login_form_password_hint": "Palavra-passe", - "login_form_server_empty": "Insira a URL do servidor.", - "login_form_server_error": "Não foi possível ligar ao servidor.", - "login_has_been_disabled": "O início de sessão foi desativado.", + "login_form_server_empty": "Insira a URL do servidor", + "login_form_server_error": "Não foi possível ligar ao servidor", + "login_has_been_disabled": "O início de sessão foi desativado", "login_password_changed_error": "Ocorreu um erro ao atualizar a sua palavra-passe", "login_password_changed_success": "Palavra-passe atualizada com sucesso", "logout_all_device_confirmation": "Tem a certeza de que deseja terminar a sessão em todos os dispositivos?", @@ -1356,6 +1375,7 @@ "map_location_picker_page_use_location": "Utilizar esta localização", "map_location_service_disabled_content": "Serviço de localização precisa de estar ativado para mostrar recursos da localização atual. Deseja ativar agora?", "map_location_service_disabled_title": "Serviço de localização desativado", + "map_marker_for_image": "Marcador do mapa para a foto tirada em {city}, {country}", "map_marker_with_image": "Marcador de mapa com imagem", "map_no_location_permission_content": "A permissão da localização é necessária para mostrar recursos da localização atual. Deseja conceder a permissão agora?", "map_no_location_permission_title": "Permissão de localização foi negada", @@ -1460,6 +1480,7 @@ "never": "Nunca", "new_album": "Novo Álbum", "new_api_key": "Nova Chave de API", + "new_feature": "Nova Funcionalidade", "new_password": "Nova palavra-passe", "new_person": "Nova Pessoa", "new_pin_code": "Novo código PIN", @@ -1485,7 +1506,7 @@ "no_duplicates_found": "Nenhum item duplicado foi encontrado.", "no_exif_info_available": "Sem informações exif disponíveis", "no_explore_results_message": "Carregue mais fotos para explorar a sua coleção.", - "no_favorites_message": "Adicione aos favoritos para encontrar as suas melhores fotos e vídeos rapidamente", + "no_favorites_message": "Adicione aos favoritos para encontrar as suas melhores fotos e vídeos de forma rápida", "no_libraries_message": "Crie uma biblioteca externa para ver as suas fotos e vídeos", "no_local_assets_found": "Sem cálculo de verificação disponível", "no_locked_photos_message": "Fotos e vídeos na pasta trancada estão ocultos e não serão exibidos enquanto explora ou pesquisa na biblioteca.", @@ -1506,7 +1527,10 @@ "notes": "Notas", "nothing_here_yet": "Ainda não existe nada aqui", "notification_backup_reliability": "Ativar notificações para melhorar a fiabilidade da cópia de segurança em segundo plano", - "notification_permission_dialog_content": "Para ativar as notificações, vá em Configurações e selecione permitir.", + "notification_enabled_list_tile_content": "O Immich utiliza notificações para cópias de segurança em segundo plano. Faça a gestão destas nas definições do seu dispositivo.", + "notification_enabled_list_tile_open_button": "Abrir Definições", + "notification_enabled_list_tile_title": "Notificações ativadas", + "notification_permission_dialog_content": "Para ativar as notificações, aceda às Definições e selecione permitir.", "notification_permission_list_tile_content": "Conceder permissões para ativar notificações.", "notification_permission_list_tile_enable_button": "Ativar notificações", "notification_permission_list_tile_title": "Permissão de notificações", @@ -1517,6 +1541,8 @@ "obtainium_configurator": "Configurador Obtainium", "obtainium_configurator_instructions": "Utilize o Obtainium para instalar e atualizar a aplicação Android diretamente a partir do lançamento do Immich no Github. Crie uma chave API e selecione uma variante para criar a sua ligação de configuração do Obtainium", "ocr": "Reconhecimento Ótico de Caracteres (OCR)", + "ocr_body": "O Immich agora lê o texto dentro das suas fotos, para que possa pesquisá-las pelo que está escrito nelas.", + "ocr_title": "Pesquisar por texto nas suas fotos", "official_immich_resources": "Recursos oficiais do Immich", "offline": "Offline", "offset": "Desvio", @@ -1535,6 +1561,8 @@ "open": "Abrir", "open_calendar": "Abrir calendário", "open_in_browser": "Abrir no navegador", + "open_in_immich_body": "Defina o Immich como a sua aplicação de galeria no Android para poder abrir fotos diretamente de outras aplicações.", + "open_in_immich_title": "Abrir fotos no Immich", "open_in_map_view": "Abrir na visualização de mapa", "open_in_openstreetmap": "Abrir no OpenStreetMap", "open_the_search_filters": "Abrir os filtros de pesquisa", @@ -1548,7 +1576,7 @@ "other": "Outro", "other_devices": "Outros dispositivos", "other_variables": "Outras variáveis", - "owned": "Seus", + "owned": "Seu", "owner": "Dono", "page": "Página", "partner": "Parceiro", @@ -1584,7 +1612,7 @@ "permanent_deletion_warning_setting_description": "Exibir um aviso ao eliminar ficheiros de forma permanente", "permanently_delete": "Eliminar permanentemente", "permanently_delete_assets_count": "Eliminar permanentemente {count, plural, one {ficheiro} other {ficheiros}}", - "permanently_delete_assets_prompt": "Tem a certeza de que deseja eliminar permanentemente {count, plural, one {este ficheiro?} other {estes # ficheiros?}} Esta ação também removerá {count, plural, one {isto do álbum} other {isto dos álbuns}}.", + "permanently_delete_assets_prompt": "Tem a certeza de que deseja eliminar permanentemente {count, plural, one {este ficheiro?} other {estes # ficheiros?}} Esta ação também irá {count, plural, one {removê-lo do álbum} other {removê-los dos álbuns}}.", "permanently_deleted_asset": "Ficheiro eliminado permanentemente", "permanently_deleted_assets_count": "{count, plural, one {# Ficheiro eliminado} other {# Ficheiros eliminados}} permanentemente", "permission": "Permissão", @@ -1592,7 +1620,7 @@ "person": "Pessoa", "person_age_months": "{months, plural, one {# month} other {# months}} de idade", "person_age_year_months": "1 ano, {months, plural, one {# month} other {# months}} de idade", - "person_age_years": "{years, plural, other {# anos}} de idade", + "person_age_years": "{years, plural, one {# ano} other {# anos}} de idade", "person_birthdate": "Nasceu a {date}", "person_hidden": "{name}{hidden, select, true { (oculto)} other {}}", "person_recognized": "Pessoa reconhecida", @@ -1692,9 +1720,12 @@ "reassing_hint": "Atribuir ficheiros selecionados a uma pessoa existente", "recent": "Recentes", "recent_searches": "Pesquisas recentes", - "recently_added": "Adicionados Recentemente", + "recently_added": "Adicionadas Recentemente", + "recently_added_body": "Aceda diretamente a tudo o que adicionou recentemente numa página dedicada.", + "recently_added_description": "Navegue pelos seus ficheiros ordenados pela data em que foram carregados para o Immich", "recently_added_page_title": "Adicionado recentemente", - "recently_taken": "Tirada recentemente", + "recently_added_title": "Adicionado recentemente", + "recently_taken": "Tiradas recentemente", "refresh": "Atualizar", "refresh_encoded_videos": "Atualizar vídeos codificados", "refresh_faces": "Atualizar rostos", @@ -1816,7 +1847,7 @@ "search_no_people_named": "Nenhuma pessoa chamada \"{name}\"", "search_no_result": "Nenhum resultado encontrado, tente pesquisar por algo diferente", "search_options": "Opções de pesquisa", - "search_page_search_photos_videos": "Pesquise suas fotos e vídeos", + "search_page_search_photos_videos": "Pesquise pelas suas fotos e vídeos", "search_page_view_all_button": "Ver tudo", "search_people": "Pesquisar pessoas", "search_places": "Pesquisar lugares", @@ -1856,7 +1887,7 @@ "send_message": "Enviar mensagem", "send_welcome_email": "Enviar E-mail de boas vindas", "server_endpoint": "URL do servidor", - "server_info_box_app_version": "Versão do app", + "server_info_box_app_version": "Versão da aplicação", "server_info_box_server_url": "URL do servidor", "server_offline": "Servidor Offline", "server_online": "Servidor Online", @@ -1900,6 +1931,8 @@ "share_link": "Partilhar ligação", "share_original": "Utilizar original (grande)", "share_preview": "Utilizar miniatura (pequeno)", + "share_quality_body": "Toque e segure no botão de partilha para escolher a qualidade da imagem antes de a partilhar.", + "share_quality_title": "Escolha a qualidade de partilha", "shared": "Partilhado", "shared_album_activities_input_disable": "Comentários desativados", "shared_album_activity_remove_content": "Deseja apagar esta atividade?", @@ -1914,7 +1947,9 @@ "shared_link_app_bar_title": "Links compartilhados", "shared_link_clipboard_copied_massage": "Copiado para a área de transferência", "shared_link_create_error": "Erro ao criar o link compartilhado", - "shared_link_custom_url_description": "Aceda a este link partilhado com um URL personalizado", + "shared_link_custom_url_description": "Aceda a este link partilhado com um nome de URL personalizado", + "shared_link_custom_url_title": "URL Personalizado", + "shared_link_custom_url_warning": "Aviso: Um nome de URL personalizado com uma barra oblíqua pode causar resultados inesperados.", "shared_link_edit_description_hint": "Digite a descrição do compartilhamento", "shared_link_edit_expire_after_option_day": "1 dia", "shared_link_edit_expire_after_option_days": "{count} dias", @@ -1938,7 +1973,7 @@ "shared_link_expires_seconds": "Expira {count} segundos", "shared_link_individual_shared": "Compartilhamento único", "shared_link_info_chip_metadata": "EXIF", - "shared_link_manage_links": "Gerenciar links compartilhados", + "shared_link_manage_links": "Gerir links partilhados", "shared_link_options": "Opções de link partilhado", "shared_link_password_description": "Exigir uma palavra-passe para aceder a este link partilhado", "shared_links": "Links partilhados", @@ -1981,16 +2016,19 @@ "sign_out": "Terminar sessão", "sign_up": "Criar conta", "size": "Tamanho", + "skip": "Saltar", "skip_to_content": "Saltar para o conteúdo", "skip_to_folders": "Saltar para pastas", "skip_to_tags": "Saltar para as etiquetas", "slideshow": "Apresentação", + "slideshow_body": "Descontraia e veja as suas fotos a serem reproduzidas numa apresentação em ecrã inteiro.", "slideshow_metadata_overlay_mode": "Sobrepor conteúdo", "slideshow_metadata_overlay_mode_description_only": "Apenas descrição", "slideshow_metadata_overlay_mode_full": "Completo", "slideshow_repeat": "Repetir apresentação de diapositivos", "slideshow_repeat_description": "Repetir do inicio quando a apresentação acabar", "slideshow_settings": "Definições de apresentação", + "slideshow_title": "Apresentação de diapositivos", "smart_album": "Álbum inteligente", "some_assets_already_have_a_location_warning": "Alguns dos ficheiros selecionados já possuem localização", "sort_albums_by": "Ordenar álbuns por...", @@ -2083,7 +2121,7 @@ "to_parent": "Subir um nível", "to_select": "seleccionar", "to_trash": "Reciclagem", - "toggle_settings": "Alternar configurações", + "toggle_settings": "Alternar definições", "toggle_theme_description": "Alternar tema", "total": "Total", "total_usage": "Total utilizado", @@ -2118,6 +2156,7 @@ "unknown": "Desconhecido", "unknown_country": "País desconhecido", "unknown_date": "Data desconhecida", + "unknown_schema": "Esquema desconhecido", "unknown_year": "Ano desconhecido", "unlimited": "Ilimitado", "unlink_motion_video": "Remover relação com video animado", @@ -2134,7 +2173,7 @@ "unstack_action_prompt": "{count} desempilhados", "unstacked_assets_count": "Desempilhados {count, plural, one {# ficheiro} other {# ficheiros}}", "unsupported_field_type": "Tipo de campo não suportado", - "unsupported_file_type": "O ficheiro {file} não pôde ser carregado porque o seu tipo de ficheiro {type} não é suportado.", + "unsupported_file_type": "O ficheiro {file} não pôde ser carregado porque o tipo de ficheiro {type} não é suportado.", "untagged": "Sem etiqueta", "up_next": "A seguir", "update_location_action_prompt": "Atualize a localização de {count} ficheiros selecionados com:", @@ -2152,7 +2191,9 @@ "upload_status_duplicates": "Duplicados", "upload_status_errors": "Erros", "upload_status_uploaded": "Enviado", - "upload_success": "Carregamento realizado com sucesso, atualize a página para ver os novos ficheiros carregados.", + "upload_success": "Carregamento realizado com sucesso, atualize a página para ver os novos ficheiros.", + "upload_to_album_body": "Para os utilizadores que não utilizam a funcionalidade de carregamento manual, podem agora adicionar fotos guardadas localmente diretamente a um álbum enquanto as carrega, já não é necessário carregá-las primeiro para depois adicionar ao álbum.", + "upload_to_album_title": "Carregue diretamente para um álbum", "upload_to_immich": "Enviar para o Immich ({count})", "uploading": "Enviando", "uploading_media": "A carregar media", @@ -2187,9 +2228,9 @@ "variables": "Variáveis", "version": "Versão", "version_announcement_closing": "O seu amigo, Alex", - "version_announcement_message": "Olá! Está disponível uma nova versão do Immich. Por favor leia as notas de lançamento para garantir que as suas configurações estão atualizadas e para evitar quaisquer erros, especialmente se usar o WatchTower ou qualquer mecanismo que lide com a atualização automática do Immich.", + "version_announcement_message": "Olá! Está disponível uma nova versão do Immich. Por favor leia as notas de lançamento para garantir que as suas definições estão atualizadas e para evitar quaisquer erros, especialmente se usar o WatchTower ou qualquer mecanismo que faça atualização automática do Immich.", "version_history": "Histórico de versões", - "version_history_item": "Instalado {version} em {date}", + "version_history_item": "Versão {version} instalada em {date}", "video": "Vídeo", "video_hover_setting": "Reproduzir vídeo em miniatura quando passar com o cursor por cima", "video_hover_setting_description": "Reproduzir vídeo em miniatura quando o cursor está sobre o item. Mesmo quando está desativado, a reprodução ainda pode ser iniciada passando sobre o ícone de reproduzir.", @@ -2220,6 +2261,9 @@ "week": "Semana", "welcome": "Bem-vindo(a)", "welcome_to_immich": "Bem-vindo(a) ao Immich", + "whats_new": "O que há de novo", + "whats_new_settings_subtitle": "Veja o que há de novo no Immich", + "whats_new_version": "Versão {version}", "when": "Quando", "width": "Largura", "wifi_name": "Nome da rede Wi-Fi", diff --git a/i18n/pt_BR.json b/i18n/pt_BR.json index 3d4681a950..86e97d5db4 100644 --- a/i18n/pt_BR.json +++ b/i18n/pt_BR.json @@ -108,6 +108,21 @@ "image_thumbnail_quality_description": "Qualidade da miniatura, de 1 a 100. Maior é melhor, mas produz arquivos maiores e pode reduzir a velocidade do aplicativo.", "image_thumbnail_title": "Configurações de Miniaturas", "import_config_from_json_description": "Importar configuração do sistema enviando um arquivo JSON de configuração", + "integrity_checks_checksum_files": "Arquivos de checksum", + "integrity_checks_checksum_files_description": "Configure a verificação de checksum", + "integrity_checks_checksum_files_enable_description": "Ative a verificação de checksum", + "integrity_checks_checksum_files_percentage_limit": "Limite percentual", + "integrity_checks_checksum_files_percentage_limit_description": "Configure a porcentagem máxima entre 0,01 e 1 para a proporção da verificação de checksum a ser executada em cada intervalo.", + "integrity_checks_checksum_files_time_limit": "Tempo limite", + "integrity_checks_checksum_files_time_limit_description": "Configure a duração máxima pela qual a verificação de checksum deve ser executada em cada intervalo. (ms)", + "integrity_checks_missing_files": "Arquivos ausentes", + "integrity_checks_missing_files_description": "Configure a frequência e habilite ou desabilite a verificação de arquivos ausentes", + "integrity_checks_missing_files_enable_description": "Ativar a verificação de arquivos ausentes", + "integrity_checks_settings": "Verificações de integridade", + "integrity_checks_settings_description": "Gerenciar intervalos de verificações de integridade", + "integrity_checks_untracked_files": "Arquivos não rastreados", + "integrity_checks_untracked_files_description": "Configure a frequência e habilite ou desabilite a verificação de arquivos não rastreados", + "integrity_checks_untracked_files_enable_description": "Habilitar a verificação de arquivos não rastreados", "job_concurrency": "{job} simultâneo", "job_created": "Tarefa criada", "job_not_concurrency_safe": "Esta tarefa não é compatível com simultaneidade.", @@ -416,6 +431,10 @@ "transcoding_realtime_description": "Permite que a transcodificação seja realizada em tempo real enquanto o vídeo está sendo transmitido. Permite a mudança de qualidade, mas pode causar maior latência e artefatos visuais durante a reprodução, dependendo dos recursos de processamento e renderização do servidor.", "transcoding_realtime_enabled": "Ativar transcodificação em tempo real", "transcoding_realtime_enabled_description": "Se desativada, a opção fará com que o servidor se recuse a iniciar novas sessões de transcodificação em tempo real.", + "transcoding_realtime_resolutions": "Resoluções", + "transcoding_realtime_resolutions_description": "As resoluções oferecidas para transcodificação em tempo real. Resoluções mais altas podem causar problemas de reprodução se o servidor não conseguir transcodificá-las com rapidez suficiente.", + "transcoding_realtime_video_codecs": "Codecs de vídeo", + "transcoding_realtime_video_codecs_description": "Os codecs de vídeo oferecidos para transcodificação em tempo real. Os clientes escolherão a melhor opção suportada por eles durante a reprodução. O AV1 é mais eficiente que o HEVC, que é mais eficiente que o H.264. Ao utilizar aceleração de hardware, selecione apenas os codecs que o acelerador consegue codificar. Ao utilizar transcodificação via software, observe que o H.264 é mais rápido que o AV1, que é mais rápido que o HEVC.", "transcoding_reference_frames": "Quadros de referência", "transcoding_reference_frames_description": "O número de quadros a serem referenciados ao compactar um determinado quadro. Valores mais altos melhoram a eficiência da compactação, mas retardam a codificação. 0 define esse valor automaticamente.", "transcoding_required_description": "Somente vídeos que não estejam em um formato aceito", @@ -578,6 +597,7 @@ "asset_viewer_settings_title": "Visualizador de Mídia", "assets": "Arquivos", "assets_added_to_album_count": "{count, plural, one {# arquivo adicionado} other {# arquivos adicionados}} ao álbum", + "assets_added_to_album_partial_count": "Adcionado {successCount} de {totalCount} {totalCount, plural, one {mídia} other {mídias}} ao álbum", "assets_added_to_albums_count": "{assetTotal, plural, one {# Arquivo adicionado} other {# Arquivos adicionados}} {albumTotal, plural, one {# ao álbum} other {# aos álbuns}}", "assets_cannot_be_added_to_album_count": "Não foi possível adicionar {count, plural, one {o arquivo} other {os arquivos}} ao álbum", "assets_cannot_be_added_to_albums": "{count, plural, one {Arquivo não pode ser adicionado} other {Arquivos não podem ser adicionados}} a nenhum álbum", @@ -794,7 +814,6 @@ "custom_date": "Data específica", "custom_locale": "Localidade customizada", "custom_locale_description": "Formata as datas, horas e números baseado no idioma e região selecionada", - "custom_url": "URL personalizada", "cutoff_date_description": "Remover arquivos mais velhos que…", "cutoff_day": "{count, plural, one {dia} other {dias}}", "cutoff_year": "{count, plural, one {ano} other {anos}}", @@ -1200,7 +1219,7 @@ "individual_share": "Compartilhamento único", "individual_shares": "Compartilhamentos individuais", "info": "Informações", - "integrity_checks": "Verificações de integridade", + "integrity_checks": "Verificações de Integridade", "interval": { "day_at_onepm": "Todo dia, 1pm", "hours": "A cada {hours, plural, one {hora} other {{hours, number} horas}}", @@ -1303,9 +1322,9 @@ "login_form_failed_login": "Erro ao fazer login, verifique a URL do servidor, e-mail e senha", "login_form_handshake_exception": "Houve um erro de autorização com o servidor. Se estiver utilizando um certificado auto assinado, ative o suporte a isso nas configurações.", "login_form_password_hint": "senha", - "login_form_server_empty": "Digite a URL do servidor.", - "login_form_server_error": "Não foi possível conectar ao servidor.", - "login_has_been_disabled": "Login foi desativado.", + "login_form_server_empty": "Digite a URL do servido", + "login_form_server_error": "Não foi possível conectar ao servidor", + "login_has_been_disabled": "Login foi desativado", "login_password_changed_error": "Erro ao atualizar a sua senha", "login_password_changed_success": "Senha atualizada com sucesso", "logout_all_device_confirmation": "Tem certeza de que deseja sair de todos os dispositivos?", @@ -1461,6 +1480,7 @@ "never": "Nunca", "new_album": "Novo Álbum", "new_api_key": "Nova Chave de API", + "new_feature": "Recurso novo", "new_password": "Nova senha", "new_person": "Nova Pessoa", "new_pin_code": "Novo código PIN", @@ -1504,9 +1524,13 @@ "not_available": "N/A", "not_in_any_album": "Fora de álbum", "not_selected": "Não selecionado", + "not_set": "Não definido", "notes": "Notas", "nothing_here_yet": "Ainda não existe nada aqui", "notification_backup_reliability": "Ative as notificações para evitar problemas durante o backup em segundo plano", + "notification_enabled_list_tile_content": "O Immich utiliza notificações para o backup em segundo plano. Gerencie-as nas configurações do seu dispositivo.", + "notification_enabled_list_tile_open_button": "Abrir configurações", + "notification_enabled_list_tile_title": "Notificações ativadas", "notification_permission_dialog_content": "Para ativar as notificações, vá em Configurações e selecione permitir.", "notification_permission_list_tile_content": "Conceda permissão para ativar notificações.", "notification_permission_list_tile_enable_button": "Ativar notificações", @@ -1518,6 +1542,8 @@ "obtainium_configurator": "Configurador Obtainium", "obtainium_configurator_instructions": "Use o Obtainium para instalar e atualizar o aplicativo Android diretamente do lançamento do Immich no GitHub. Crie uma chave API e selecione a variante para criar o seu link de configuração Obtainium", "ocr": "OCR", + "ocr_body": "O Immich agora lê o texto dentro das suas fotos, para que você possa pesquisá-las pelo que está escrito nelas.", + "ocr_title": "Pesquise texto em suas fotos", "official_immich_resources": "Recursos oficiais do Immich", "offline": "Desconectado", "offset": "Deslocamento", @@ -1536,6 +1562,8 @@ "open": "Abrir", "open_calendar": "Abrir calendário", "open_in_browser": "Abrir no navegador", + "open_in_immich_body": "Defina o Immich como sua galeria no Android para abrir fotos diretamente de outros aplicativos.", + "open_in_immich_title": "Abrir fotos no Immich", "open_in_map_view": "Mostrar no mapa", "open_in_openstreetmap": "Abrir no OpenStreetMap", "open_the_search_filters": "Abre os filtros de pesquisa", @@ -1593,7 +1621,7 @@ "person": "Pessoa", "person_age_months": "{months, plural, one {# mês} other {# meses}} de idade", "person_age_year_months": "1 ano, {months, plural, one {# mês} other {# meses}} de idade", - "person_age_years": "{years, plural, other {# anos}}", + "person_age_years": "{years, plural, one {# ano} other {# anos}} de idade", "person_birthdate": "Nasceu em {date}", "person_hidden": "{name}{hidden, select, true { (oculto)} other {}}", "person_recognized": "Pessoa reconhecida", @@ -1694,7 +1722,10 @@ "recent": "Recente", "recent_searches": "Pesquisas recentes", "recently_added": "Adicionado recentemente", + "recently_added_body": "Acesse diretamente tudo o que você adicionou recentemente em uma página dedicada.", + "recently_added_description": "Navegue pelas suas mídias ordenadas pela data de upload para o Immich", "recently_added_page_title": "Adicionados recentemente", + "recently_added_title": "Adicionado recentemente", "recently_taken": "Tirada recentemente", "refresh": "Atualizar", "refresh_encoded_videos": "Atualizar vídeos codificados", @@ -1901,6 +1932,8 @@ "share_link": "Criar Link", "share_original": "Original (grande)", "share_preview": "Miniatura (pequeno)", + "share_quality_body": "Pressione e segure o botão de compartilhamento para escolher a qualidade da imagem antes de compartilhar.", + "share_quality_title": "Escolha a qualidade do compartilhamento", "shared": "Compartilhado", "shared_album_activities_input_disable": "Comentários desativados", "shared_album_activity_remove_content": "Deseja excluir esta atividade?", @@ -1916,6 +1949,8 @@ "shared_link_clipboard_copied_massage": "Copiado para a área de transferência", "shared_link_create_error": "Erro ao criar o link compartilhado", "shared_link_custom_url_description": "Acessar este link com uma URL personalizada", + "shared_link_custom_url_title": "URL customizada", + "shared_link_custom_url_warning": "Atenção: A URL customizada com uma barra pode não se comportar como você espera.", "shared_link_edit_description_hint": "Digite a descrição do compartilhamento", "shared_link_edit_expire_after_option_day": "1 dia", "shared_link_edit_expire_after_option_days": "{count} dias", @@ -1982,16 +2017,19 @@ "sign_out": "Sair", "sign_up": "Registrar", "size": "Tamanho", + "skip": "Pular", "skip_to_content": "Ir para o conteúdo", "skip_to_folders": "Ir para pastas", "skip_to_tags": "Ir para os marcadores", "slideshow": "Apresentação", + "slideshow_body": "Relaxe e assista às suas fotos em uma apresentação de slides em tela cheia.", "slideshow_metadata_overlay_mode": "Conteúdo exibido", "slideshow_metadata_overlay_mode_description_only": "Apenas a descrição", "slideshow_metadata_overlay_mode_full": "Tudo", "slideshow_repeat": "Repetir apresentação de slides", "slideshow_repeat_description": "Voltar para o início quando a apresentação terminar", "slideshow_settings": "Opções de apresentação", + "slideshow_title": "Apresentação de slides", "smart_album": "Álbum inteligente", "some_assets_already_have_a_location_warning": "Alguns dos arquivos selecionados já tem uma localização", "sort_albums_by": "Ordenar álbuns por...", @@ -2119,6 +2157,7 @@ "unknown": "Desconhecido", "unknown_country": "País desconhecido", "unknown_date": "Data desconhecida", + "unknown_schema": "Esquema desconhecido", "unknown_year": "Ano desconhecido", "unlimited": "Ilimitado", "unlink_motion_video": "Remover relação com video animado", @@ -2154,6 +2193,8 @@ "upload_status_errors": "Erros", "upload_status_uploaded": "Enviado", "upload_success": "Enviado com sucesso, atualize a página para ver os novos arquivos.", + "upload_to_album_body": "Para os usuários que não utilizam o recurso de upload manual, agora é possível adicionar fotos locais diretamente a um álbum durante o upload; não é mais necessário fazer o upload para depois adicioná-las a um álbum.", + "upload_to_album_title": "Faça o upload diretamente para um álbum", "upload_to_immich": "Enviar para o Immich ({count})", "uploading": "Enviando", "uploading_media": "Enviando mídia", @@ -2201,7 +2242,7 @@ "view_album": "Ver álbum", "view_all": "Ver tudo", "view_all_users": "Ver todos os usuários", - "view_asset_owners": "Vizualizar donos do arquivo", + "view_asset_owners": "Visualizar donos do arquivo", "view_details": "Ver Detalhes", "view_in_timeline": "Ver na linha do tempo", "view_link": "Ver link", @@ -2221,6 +2262,9 @@ "week": "Semana", "welcome": "Bem-vindo(a)", "welcome_to_immich": "Bem-vindo(a) ao Immich", + "whats_new": "O que há de novo", + "whats_new_settings_subtitle": "Veja as novidades do Immich", + "whats_new_version": "Versão {version}", "when": "Quando", "width": "Largura", "wifi_name": "Nome do Wi-Fi", diff --git a/i18n/ro.json b/i18n/ro.json index 3f8e1e08eb..e17aded3dc 100644 --- a/i18n/ro.json +++ b/i18n/ro.json @@ -73,6 +73,7 @@ "cron_expression_description": "Setați intervalul de scanare folosind formatul cron. Pentru mai multe informații, consultați de ex. Crontab Guru", "cron_expression_presets": "Presetări de expresie cron", "disable_login": "Dezactivați autentificarea", + "download_csv": "Descarcă CSV", "duplicate_detection_job_description": "Rulați învățarea automată pe materiale pentru a detecta imagini similare. Se bazează pe Căutare Inteligentă", "exclusion_pattern_description": "Modelele de excludere vă permit să ignorați fișierele și folderele atunci când vă scanați biblioteca. Acest lucru este util dacă aveți foldere care conțin fișiere pe care nu doriți să le importați, cum ar fi fișierele RAW.", "export_config_as_json_description": "Descărcați configurația actuală a sistemului ca fișier JSON", @@ -107,6 +108,21 @@ "image_thumbnail_quality_description": "Calitatea miniaturii de la 1 la 100. O valoare mai mare oferă o calitate mai bună, dar produce fișiere mai mari și poate reduce receptivitatea aplicației.", "image_thumbnail_title": "Setari miniaturi", "import_config_from_json_description": "Importați configurația sistemului încărcând un fișier de configurare JSON", + "integrity_checks_checksum_files": "Fișiere sumă de control", + "integrity_checks_checksum_files_description": "Configurează verificarea sumei de control", + "integrity_checks_checksum_files_enable_description": "Activează verificarea sumei de control", + "integrity_checks_checksum_files_percentage_limit": "Limită procentuală", + "integrity_checks_checksum_files_percentage_limit_description": "Configurează procentajul maxim, cuprins între 0,01 și 1, care indică frecvența cu care trebuie să se efectueze verificarea sumei de control la fiecare interval.", + "integrity_checks_checksum_files_time_limit": "Timp limită", + "integrity_checks_checksum_files_time_limit_description": "Configurează durata maximă pentru care verificarea sumei de control ar trebui să ruleze la fiecare interval. (ms)", + "integrity_checks_missing_files": "Fișiere lipsă", + "integrity_checks_missing_files_description": "Configurează frecvența și activează sau dezactivează verificarea fișierelor lipsă", + "integrity_checks_missing_files_enable_description": "Activează verificarea fișierelor lipsă", + "integrity_checks_settings": "Verificări de integritate", + "integrity_checks_settings_description": "Gestionează intervalele de verificare a integrității", + "integrity_checks_untracked_files": "Fișiere neurmărite", + "integrity_checks_untracked_files_description": "Configurează frecvența și activează sau dezactivează verificarea fișierelor neurmărite", + "integrity_checks_untracked_files_enable_description": "Activează verificarea fișierelor neurmărite", "job_concurrency": "Concurență {job}", "job_created": "Sarcină creată", "job_not_concurrency_safe": "Această sarcină nu este sigură pentru a rula în concurență.", @@ -182,9 +198,25 @@ "machine_learning_smart_search_enabled": "Activează căutarea inteligentă", "machine_learning_smart_search_enabled_description": "Dacă este dezactivată, imaginile nu vor fi codificate pentru căutarea inteligentă.", "machine_learning_url_description": "URL-ul serverului de învățare automată. Dacă sunt furnizate mai multe URL-uri, fiecare server va fi încercat pe rând, până când unul răspunde cu succes, în ordine de la primul până la ultimul. Serverele care nu răspund vor fi ignorate temporar până revin online.", + "maintenance_backup_management": "Gestionare backup", "maintenance_delete_backup": "Sterge Backup", "maintenance_delete_backup_description": "Acest fisier va fi sters permanent.", "maintenance_delete_error": "Stergerea backup-ului nu a reusit.", + "maintenance_integrity_check": "Verifică", + "maintenance_integrity_check_all": "Verifică tot", + "maintenance_integrity_checksum_mismatch": "Neconcordanță sumă de control", + "maintenance_integrity_checksum_mismatch_description": "Fișiere a căror sumă de control de pe disc nu se potrivește cu suma de control stocată de Immich în baza sa de date.", + "maintenance_integrity_checksum_mismatch_job": "Verificați neconcordanțele sumelor de control", + "maintenance_integrity_checksum_mismatch_refresh_job": "Reîmprospătarea rapoartelor privind neconcordanța sumelor de control", + "maintenance_integrity_missing_file": "Fișiere lipsă", + "maintenance_integrity_missing_file_description": "Fișiere pe care Immich le-a urmărit în baza sa de date, dar care nu există în sistemul de fișiere.", + "maintenance_integrity_missing_file_job": "Verifică dacă există fișiere lipsă", + "maintenance_integrity_missing_file_refresh_job": "Reîmprospătați rapoartele privind fișierele lipsă", + "maintenance_integrity_report": "Raport de integritate", + "maintenance_integrity_untracked_file": "Fișiere neurmărite", + "maintenance_integrity_untracked_file_description": "Fișiere din directoarele lui Immich despre care Immich nu are nicio înregistrare.", + "maintenance_integrity_untracked_file_job": "Verifică dacă există fișiere neurmărite", + "maintenance_integrity_untracked_file_refresh_job": "Reîmprospătează rapoartele fișierelor neurmărite", "maintenance_restore_backup": "Restaureaza Backup", "maintenance_restore_backup_description": "Immich va fi șters si restaurat din backup-ul ales. Va fi creat un nou backup înainte de a continua.", "maintenance_restore_backup_different_version": "Acest backup a fost creat folosind o versiune diferita de Immich!", @@ -288,7 +320,7 @@ "oauth_timeout_description": "Timp de expirare pentru solicitări în milisecunde", "ocr_job_description": "Folosește învățarea automată pentru recunoașterea textului din imagini", "password_enable_description": "Autentificare cu email și parolǎ", - "password_settings": "Autentificare cu Parolǎ", + "password_settings": "Autentificare cu parolǎ", "password_settings_description": "Gestioneazǎ setǎrile de autentificare cu parola", "paths_validated_successfully": "Toate cǎile au fost validate cu succes", "person_cleanup_job": "Ștergere persoane", @@ -297,7 +329,7 @@ "queues_page_description": "Pagina cu cozi de sarcini administrative", "quota_size_gib": "Spațiu de stocare alocat (GiB)", "refreshing_all_libraries": "Bibliotecile sunt în curs de reîmprospǎtare", - "registration": "Înregistrare Administratori", + "registration": "Înregistrare administratori", "registration_description": "Deoarece sunteți primul utilizator de pe sistem, veți fi desemnat ca administrator și sunteți responsabil pentru sarcinile administrative, iar utilizatorii suplimentari vor fi creați de dumneavoastră.", "release_channel_release_candidate": "Candidat pentru lansare", "release_channel_stable": "Stabil", @@ -312,7 +344,7 @@ "server_external_domain_settings_description": "Domeniu utilizat pentru link-uri externe", "server_public_users": "Utilizatori publici", "server_public_users_description": "Toți utilizatorii (nume și e-mail) sunt listați atunci când adăugați un utilizator la albumele partajate. Când este dezactivată, lista de utilizatori va fi disponibilă numai pentru utilizatorii admin.", - "server_settings": "Setǎri Server", + "server_settings": "Setǎri server", "server_settings_description": "Gestioneazǎ setǎrile serverului", "server_stats_page_description": "Pagina cu statistici ale serverului de administrare", "server_welcome_message": "Mesaj de bun-venit", @@ -399,6 +431,10 @@ "transcoding_realtime_description": "Permite transcodarea în timp real în timpul redării videoclipului. Activează schimbarea calității, dar poate cauza latență mai mare și sacadări, în funcție de capacitățile serverului.", "transcoding_realtime_enabled": "Activează transcodarea în timp real", "transcoding_realtime_enabled_description": "Dacă este dezactivat, serverul nu va iniția noi sesiuni de transcodare în timp real.", + "transcoding_realtime_resolutions": "Rezoluții", + "transcoding_realtime_resolutions_description": "Rezoluțiile disponibile pentru transcodare în timp real. Rezoluțiile mai mari pot cauza probleme la redare dacă serverul nu le poate transcoda suficient de repede.", + "transcoding_realtime_video_codecs": "Codecuri video", + "transcoding_realtime_video_codecs_description": "Codecurile video oferite pentru transcodare în timp real. Clienții vor alege cea mai bună opțiune pe care o acceptă în timpul redării. AV1 este mai eficient decât HEVC, care este mai eficient decât H.264. Când utilizezi accelerarea hardware, selectează doar codecurile pe care acceleratorul le poate codifica. Când utilizezi transcodare software, reține că H.264 este mai rapid decât AV1, care este mai rapid decât HEVC.", "transcoding_reference_frames": "Cadre de referință", "transcoding_reference_frames_description": "Numărul de cadre de referință atunci când se comprimă un cadru dat. Valorile mai mari îmbunătățesc eficiența compresiei, dar încetinesc codarea. 0 setează această valoare automat.", "transcoding_required_description": "Numai videoclipuri care nu sunt într-un format acceptat", @@ -538,6 +574,7 @@ "asset_added_to_album": "Adăugat la album", "asset_adding_to_album": "Se adaugă la album…", "asset_created": "Resurse create", + "asset_day_count": "{date}: {count, plural, one {# resursă} few {# resurse} other {# de resurse}}", "asset_description_updated": "Descrierea resursei a fost actualizată", "asset_hashing": "Calculare amprentă digitală…", "asset_list_group_by_sub_title": "Grupare după", @@ -560,6 +597,7 @@ "asset_viewer_settings_title": "Vizualizator resurse", "assets": "Resurse", "assets_added_to_album_count": "Am adăugat {count, plural, one {# resursă} other {# resurse}} în album", + "assets_added_to_album_partial_count": "Am adăugat {successCount} din {totalCount} {totalCount, plural, one {resursă} few {resurse} other {de resurse}} în album", "assets_added_to_albums_count": "Au fost adăugate {assetTotal, plural, one {# element} other {# elemente}} la {albumTotal, plural, one {# album} other {# albume}}", "assets_cannot_be_added_to_album_count": "{count, plural, one {Asset} other {Assets}} nu pot fi adăugate în album", "assets_cannot_be_added_to_albums": "{count, plural, one {Elementul} other {Elementele}} nu poate fi adăugat la niciunul dintre albume", @@ -776,7 +814,6 @@ "custom_date": "Data personalizată", "custom_locale": "Setare regională personalizată", "custom_locale_description": "Formatați datele, timpul și numerele în funcție de limbă și regiune", - "custom_url": "URL personalizat", "cutoff_date_description": "Păstrează fotografiile din ultimele…", "cutoff_day": "{count, plural, one {# zi} few {# zile} other {# de zile}}", "cutoff_year": "{count, plural, =0 {0 ani} one {# an} few {# ani} other {# de ani}}", @@ -793,6 +830,8 @@ "day": "Zi", "days": "Zile", "deduplicate_all": "Deduplicați Toate", + "default_quality_subtitle": "Calitatea utilizată la accesarea opțiunii de partajare. Apasă lung butonul de partajare pentru a alege de fiecare dată.", + "default_share_quality": "Calitatea implicită a partajării", "delete": "Ștergere", "delete_action_confirmation_message": "Sigur vrei să ștergi acest element? Această acțiune va muta elementul în coșul de gunoi al serverului și te va întreba dacă vrei să-l ștergi local", "delete_action_prompt": "{count} șterse", @@ -1070,10 +1109,12 @@ "external_libraries": "Biblioteci externe", "external_network": "Rețea externă", "external_network_sheet_info": "Când nu se află în rețeaua Wi-Fi preferată, aplicația se va conecta la server prin prima dintre adresele URL de mai jos pe care o poate accesa, începând de sus în jos", + "f_number": "Număr F", "face_unassigned": "Nealocat", "failed": "Eșuat", "failed_count": "Eșuat: {count}", "failed_to_authenticate": "Autentificarea nu a reușit", + "failed_to_delete_file": "Nu s-a putut șterge fișierul", "failed_to_load_assets": "Nu s-au încărcat activele", "failed_to_load_folder": "Nu s-a putut încărca folderul", "favorite": "Favorit", @@ -1178,6 +1219,7 @@ "individual_share": "Cota individuală", "individual_shares": "Partajări individuale", "info": "Informație", + "integrity_checks": "Verificări de integritate", "interval": { "day_at_onepm": "În fiecare zi la ora 13.00", "hours": "La fiecare {hours, plural, one {oră} other {{hours, number} ore}}", @@ -1238,6 +1280,8 @@ "link_to_oauth": "Link către OAuth", "linked_oauth_account": "Cont OAuth conectat", "list": "Listă", + "live": "În direct", + "load_more": "Afișează mai multe", "loading": "Încărcare", "loading_search_results_failed": "Încărcarea rezultatelor căutării nu a reușit", "local": "Local", @@ -1278,9 +1322,9 @@ "login_form_failed_login": "Eroare la autentificare, verifică URL-ul server-ului, adresa de email și parola", "login_form_handshake_exception": "A apărut o excepție Handshake cu server-ul. Activează suportul pentru certificate auto-semnate în setări dacă folosești un certificat auto-semnat.", "login_form_password_hint": "parolă", - "login_form_server_empty": "Introdu URL-ul server-ului.", - "login_form_server_error": "Nu s-a putut realiza conexiunea la server.", - "login_has_been_disabled": "Conectarea a fost dezactivată.", + "login_form_server_empty": "Introdu adresa URL a unui server", + "login_form_server_error": "Nu s-a putut realiza conexiunea la server", + "login_has_been_disabled": "Conectarea a fost dezactivată", "login_password_changed_error": "A intervenit o eroare la actualizarea parolei", "login_password_changed_success": "Parola a fost actualizată cu succes", "logout_all_device_confirmation": "Sigur doriți să deconectați toate dispozitivele?", @@ -1331,6 +1375,7 @@ "map_location_picker_page_use_location": "Folosește această locație", "map_location_service_disabled_content": "Serviciul de localizare trebuie să fie activat pentru a afișa resursele din locația actuală. Dorești să o activezi acum?", "map_location_service_disabled_title": "Serviciul de localizare este dezactivat", + "map_marker_for_image": "Marcaj pe hartă pentru o fotografie realizată în {city}, {country}", "map_marker_with_image": "Marcator de hartă cu imagine", "map_no_location_permission_content": "Permisiunea de localizare este necesară pentru a afișa resursele din locația actuală. Dorești să o activezi acum?", "map_no_location_permission_title": "Permisiunea de localizare este dezactivată", @@ -1350,25 +1395,35 @@ "matching_assets": "Resurse similare", "media_chrome": { "auto": "Automat", + "captions": "Subtitrări", "captions_off": "Oprit", "closed_captions": "subtitrări pentru persoane cu deficiențe de auz", "decode_error": "Eroare de decodare", + "disable_captions": "Dezactivează subtitrările", + "enable_captions": "Activează subtitrările", "enter_fullscreen_mode": "Intră în modul ecran complet", "exit_fullscreen_mode": "Ieși din modul ecran complet", "loop": "Buclǎ", "media_error_description": "Redarea a fost întreruptă din cauza unei erori media. Fișierul poate fi corupt sau browserul nu acceptă acest format.", + "media_loading": "încărcare media", "mute": "Dezactivează sunetul", "network_error": "Eroare de rețea", "network_error_description": "Descărcarea fișierului media a eșuat din cauza unei erori de rețea.", "not_supported_error": "Sursa nu este suportatǎ", "playback_rate": "Ratǎ de redare", "playback_rate_current": "ratǎ de redare actualǎ", + "playback_rate_value": "Viteza de redare {playbackRate}", "playback_time": "timp de redare", "quality": "Calitate", "second": "secundǎ", "seconds": "secunde", "time_value_of_total_time": "{currentTime} din {totalTime}", - "unmute": "Activează sunetul" + "time_value_remaining": "{time} rămas", + "unmute": "Activează sunetul", + "unsupported_error_description": "A apărut o eroare neprevăzută. Serverul sau rețeaua au eșuat sau browserul tău nu acceptă acest format.", + "video_not_loaded_unknown_time": "videoclipul nu s-a încărcat, durată necunoscută.", + "video_player": "player video", + "volume": "volum" }, "media_type": "Tip media", "memories": "Amintiri", @@ -1395,8 +1450,10 @@ "mobile_app": "Aplicație Mobilă", "mobile_app_download_onboarding_note": "Descarcă aplicația mobilă folosind următoarele opțiuni", "model": "Model", + "modify_date": "Data modificării", "month": "Lună", "more": "Mai mult", + "motion": "Mişcare", "move": "Mută", "move_off_locked_folder": "Mutați din dosarul blocat", "move_to": "Mutare la", @@ -1423,6 +1480,7 @@ "never": "Niciodată", "new_album": "Album Nou", "new_api_key": "Cheie API nouǎ", + "new_feature": "Funcție nouă", "new_password": "Parolă nouă", "new_person": "Persoanǎ nouǎ", "new_pin_code": "Cod PIN nou", @@ -1460,6 +1518,7 @@ "no_results": "Fără rezultate", "no_results_description": "Încercați un sinonim sau un cuvânt cheie mai general", "no_shared_albums_message": "Creați un album pentru a partaja fotografii și videoclipuri cu persoanele din rețeaua dvs", + "no_steps": "Niciun pas adăugat încă", "none": "Niciunul", "not_allowed": "Nu este permis", "not_available": "N/A", @@ -1468,6 +1527,9 @@ "notes": "Note", "nothing_here_yet": "Nimic aici încă", "notification_backup_reliability": "Activează notificările pentru a îmbunătăți fiabilitatea copierii de rezervă în fundal", + "notification_enabled_list_tile_content": "Immich utilizează notificări pentru efectuarea copiilor de siguranță în fundal. Le poți gestiona din setările dispozitivului.", + "notification_enabled_list_tile_open_button": "Deschide setările", + "notification_enabled_list_tile_title": "Notificările sunt activate", "notification_permission_dialog_content": "Pentru a activa notificările, mergi în Setări > Immich și selectează permite.", "notification_permission_list_tile_content": "Acordă permisiunea pentru a activa notificările.", "notification_permission_list_tile_enable_button": "Activează notificările", @@ -1479,6 +1541,8 @@ "obtainium_configurator": "Configurator Obtainium", "obtainium_configurator_instructions": "Folosește Obtainium pentru a instala și actualiza aplicația Android direct din release-urile Immich de pe GitHub. Creează o cheie API și selectează o variantă pentru a genera linkul de configurare Obtainium", "ocr": "OCR", + "ocr_body": "Immich citește acum textul din fotografiile tale, astfel încât să le poți căuta după ceea ce scrie în ele.", + "ocr_title": "Caută text în fotografiile tale", "official_immich_resources": "Resurse Oficiale Immich", "offline": "Offline", "offset": "Decalaj", @@ -1497,6 +1561,8 @@ "open": "Deschide", "open_calendar": "Deschide calendarul", "open_in_browser": "Deschide în browser", + "open_in_immich_body": "Setează Immich ca galerie pe Android pentru a deschide fotografiile direct din alte aplicații.", + "open_in_immich_title": "Deschide fotografiile în Immich", "open_in_map_view": "Deschideți în vizualizarea hărții", "open_in_openstreetmap": "Deschideți în OpenStreetMap", "open_the_search_filters": "Deschideți filtrele de căutare", @@ -1564,28 +1630,29 @@ "photos_from_previous_years": "Fotografii din anii anteriori", "pick_a_location": "Alegeți o locație", "pick_custom_range": "Interval personalizat", - "pick_date_range": "Selectați un interval de date", + "pick_date_range": "Selectați un interval de dată", "pin_code_changed_successfully": "Codul PIN a fost modificat cu succes", "pin_code_reset_successfully": "Codul PIN a fost resetat cu succes", - "pin_code_setup_successfully": "Configurarea cu succes a unui cod PIN", + "pin_code_setup_successfully": "Codul PIN a fost configurat cu succes", "pin_verification": "Verificarea codului PIN", "place": "Loc", - "places": "Locații", + "places": "Locuri", "places_count": "{count, plural, one {{count, number} Loc} other {{count, number} Locuri}}", "play": "Redare", - "play_memories": "Redare amintiri", - "play_motion_photo": "Redare Fotografie în Mișcare", + "play_memories": "Redă amintiri", + "play_motion_photo": "Redă fotografie în mișcare", "play_or_pause_video": "Redați sau întrerupeți videoclipul", "play_original_video": "Redă video original", - "play_original_video_setting_description": "Se preferă redarea videoclipurilor originale în locul celor transcodate. Dacă fișierul original nu este compatibil, redarea s-ar putea să nu fie corectă.", + "play_original_video_setting_description": "Se preferă redarea videoclipurilor originale în locul celor transcodate. Dacă fișierul original nu este compatibil, redarea s-ar putea să nu fie în regula.", "play_transcoded_video": "Redă video transcodificat", "please_auth_to_access": "Vă rugăm să vă autentificați pentru a accesa", "plugin_method_filter_type": "Filtru", + "plugin_method_filter_type_description": "Această metodă poate filtra evenimentele și poate împiedica condiționat rularea pașilor următori", "port": "Port", "preferences_settings_subtitle": "Gestionați preferințele aplicației", "preferences_settings_title": "Preferințe", "preparing": "Se prepară", - "preset": "Presetat", + "preset": "Presetare", "preview": "Previzualizare", "previous": "Anterior", "previous_memory": "Memoria anterioară", @@ -1601,6 +1668,7 @@ "profile_drawer_readonly_mode": "Mod doar citire activat. Ține apăsat pe pictograma avatarului utilizatorului pentru a ieși.", "profile_image_of_user": "Imagine de profil a lui {user}", "profile_picture_set": "Poză de profil setată.", + "projection_type": "Tipul proiecției", "public_album": "Album public", "public_share": "Distribuire Publică", "purchase_account_info": "Suporter", @@ -1653,7 +1721,10 @@ "recent": "Recent", "recent_searches": "Căutări recente", "recently_added": "Adăugate recent", + "recently_added_body": "Accesează direct tot ce ai adăugat recent pe o pagină dedicată.", + "recently_added_description": "Răsfoiește resursele sortate după momentul în care au fost încărcate în Immich", "recently_added_page_title": "Adăugate recent", + "recently_added_title": "Adăugate recent", "recently_taken": "Recent realizate", "refresh": "Reîmprospătare", "refresh_encoded_videos": "Actualizează videoclipurile encodate", @@ -1746,6 +1817,7 @@ "search_by_filename": "Căutați după numele fișierului sau extensie", "search_by_filename_example": "i.e. IMG_1234.JPG sau PNG", "search_by_full_path": "Caută după calea completă sau dosar", + "search_by_full_path_example": "/John/Projects/3D_Printing/2026-07-01 - poți căuta după Proiecte, 3D, Imprimare, 2026 etc.", "search_by_ocr": "Caută folosind OCR", "search_by_ocr_example": "Factură", "search_camera_lens_model": "Caută modelul lentilei...", @@ -1807,6 +1879,7 @@ "select_person": "Selectează persoana", "select_person_to_tag": "Selectați o persoană pentru a o eticheta", "select_photos": "Selectați fotografii", + "select_quality": "Selectează calitatea", "select_trash_all": "Selectați tot pentru ștergere", "selected": "Selectat", "selected_count": "{count, plural, other {# selectat}}", @@ -1856,6 +1929,10 @@ "share": "Distribuiți", "share_dialog_preparing": "Se pregătește...", "share_link": "Partajați linkul", + "share_original": "Folosește varianta originală (mare)", + "share_preview": "Utilizează miniatura (mică)", + "share_quality_body": "Ține apăsat butonul de partajare pentru a alege calitatea imaginii înainte de a o partaja.", + "share_quality_title": "Alege calitatea partajării", "shared": "Partajat", "shared_album_activities_input_disable": "Cometariile sunt dezactivate", "shared_album_activity_remove_content": "Dorești să ștergi această activitate?", @@ -1871,6 +1948,8 @@ "shared_link_clipboard_copied_massage": "Copiat în clipboard", "shared_link_create_error": "Eroare în timpul creării linkului de distribuire", "shared_link_custom_url_description": "Accesează acest link partajat cu un URL personalizat", + "shared_link_custom_url_title": "URL personalizat", + "shared_link_custom_url_warning": "Avertisment: un nume URL personalizat cu o bară înainte poate să nu se comporte așa cum vă așteptați.", "shared_link_edit_description_hint": "Introdu descrierea distribuirii", "shared_link_edit_expire_after_option_day": "1 zi", "shared_link_edit_expire_after_option_days": "{count} zile", @@ -1917,6 +1996,7 @@ "show_keyboard_shortcuts": "Afișați comenzile rapide de la tastatură", "show_less": "Aratǎ mai puțin", "show_metadata": "Arătați metadatele", + "show_more_fields": "{count, plural, one {Afișează încă # câmp} few {Afișează încă # câmpuri} other {Afișează încă # de câmpuri}}", "show_or_hide_info": "Afișați sau ascundeți informații", "show_password": "Afișați parola", "show_person_options": "Afișați opțiunile persoanelor", @@ -1936,16 +2016,21 @@ "sign_out": "Deconectare", "sign_up": "Vă înregistrați", "size": "Dimensiune", + "skip": "Sari peste", "skip_to_content": "Treceți la conținut", "skip_to_folders": "Treceți la foldere", "skip_to_tags": "Treceți la etichete", "slideshow": "Prezentare de diapozitive", + "slideshow_body": "Relaxează-te și urmărește-ți fotografiile într-o prezentare de diapozitive pe tot ecranul.", "slideshow_metadata_overlay_mode": "Conținut suprapus", "slideshow_metadata_overlay_mode_description_only": "Doar descrierea", + "slideshow_metadata_overlay_mode_full": "Complet", "slideshow_repeat": "Repetă prezentarea", "slideshow_repeat_description": "Reîntoarce-te la început cand prezentarea se încheie", "slideshow_settings": "Setări pentru prezentarea de diapozitive", + "slideshow_title": "Prezentare de diapozitive", "smart_album": "Album inteligent", + "some_assets_already_have_a_location_warning": "Unele dintre resursele selectate au deja o locație", "sort_albums_by": "Sortați albumele după...", "sort_created": "Data creării", "sort_items": "Numărul de articole", @@ -2050,6 +2135,8 @@ "trash_page_info": "Resursele din coș vor fi șterse permanent după {days} zile", "trashed_items_will_be_permanently_deleted_after": "Elementele din coșul de gunoi vor fi șterse definitiv după {days, plural, one {# zi} other {# zile}}.", "trigger": "Declanșator", + "trigger_asset_metadata_extraction": "Extragerea metadatelor resurselor", + "trigger_asset_metadata_extraction_description": "Se declanșează atunci când metadatele EXIF ale unui resurse sunt extrase", "trigger_asset_uploaded": "Fișier încărcat", "trigger_asset_uploaded_description": "Declanșează cand un fișier este încarcat", "trigger_person_recognized": "Persoană Recunoscută", @@ -2069,6 +2156,7 @@ "unknown": "Necunoscut", "unknown_country": "Țară necunoscută", "unknown_date": "Dată necunoscută", + "unknown_schema": "Schemă necunoscută", "unknown_year": "An Necunoscut", "unlimited": "Nelimitat", "unlink_motion_video": "Deconectați videoclipul în mișcare", @@ -2093,6 +2181,7 @@ "updated_password": "Parolă actualizată", "upload": "Încărcați", "upload_concurrency": "Încărcați simultan", + "upload_day_count": "{date}: {count, plural, one {# încărcare} few {# încărcări} other {# de încărcări}}", "upload_details": "Detalii încărcare", "upload_error_with_count": "Eroare la încărcare pentru {count, plural, one {# fișier} other {# fișiere}}", "upload_errors": "Încărcare finalizată cu {count, plural, one {# eroare} other {# erori}}, reîmprospătați pagina pentru a reîncărca noile resurse.", @@ -2103,10 +2192,13 @@ "upload_status_errors": "Erori", "upload_status_uploaded": "Încărcat", "upload_success": "Încărcare reușită, reîmprospătați pagina pentru a vedea resursele noi încărcate.", + "upload_to_album_body": "Pentru utilizatorii care nu utilizează funcția de încărcare manuală, acum poți alege să adaugi fotografii locale direct într-un album pe măsură ce le încarci, nemaifiind nevoie să le încarci și să le adaugi ulterior într-un album.", + "upload_to_album_title": "Încarcă direct într-un album", "upload_to_immich": "Încărcați pe Immich ({count})", "uploading": "Se încarcă", "uploading_media": "Se încarcă fișierele media", "uploads": "Încărcări", + "uploads_count": "{count, plural, one {# încărcare} few {# încărcări} other {# de încărcări}}", "url": "URL", "usage": "Utilizare", "use_biometric": "Folosește biometrice", @@ -2169,6 +2261,9 @@ "week": "Sǎptǎmânǎ", "welcome": "Bun venit", "welcome_to_immich": "Bun venit la Immich", + "whats_new": "Ce este nou", + "whats_new_settings_subtitle": "Descoperă noutățile din Immich", + "whats_new_version": "Versiunea {version}", "when": "Când", "width": "Lățime", "wifi_name": "Nume Wi-Fi", diff --git a/i18n/ru.json b/i18n/ru.json index a34d2521f0..6946b308cc 100644 --- a/i18n/ru.json +++ b/i18n/ru.json @@ -108,6 +108,21 @@ "image_thumbnail_quality_description": "Качество миниатюр от 1 до 100. Чем выше качество, тем лучше, но при этом создаются файлы большего размера и может снизиться скорость отклика приложения.", "image_thumbnail_title": "Настройки миниатюр", "import_config_from_json_description": "Импортировать конфигурацию системы, загрузив JSON файл настроек", + "integrity_checks_checksum_files": "Контрольные суммы файлов", + "integrity_checks_checksum_files_description": "Настройка проверки контрольных сумм", + "integrity_checks_checksum_files_enable_description": "Включить проверку контрольных сумм", + "integrity_checks_checksum_files_percentage_limit": "Процентный лимит", + "integrity_checks_checksum_files_percentage_limit_description": "Максимальное количество объектов в процентах от 0,01 до 1, обрабатываемых за раз при проверке контрольных сумм.", + "integrity_checks_checksum_files_time_limit": "Временной лимит", + "integrity_checks_checksum_files_time_limit_description": "Максимальная продолжительность выполнения итерации по проверке контрольных сумм (мс)", + "integrity_checks_missing_files": "Отсутствующие файлы", + "integrity_checks_missing_files_description": "Настройка частоты и включение/отключение функции поиска отсутствующих файлов", + "integrity_checks_missing_files_enable_description": "Включить функцию поиска отсутствующих файлов", + "integrity_checks_settings": "Проверка целостности", + "integrity_checks_settings_description": "Управление интервалами функции проверки целостности", + "integrity_checks_untracked_files": "Неотслеживаемые файлы", + "integrity_checks_untracked_files_description": "Настройка частоты и включение/отключение функции поиска неотслеживаемых файлов", + "integrity_checks_untracked_files_enable_description": "Включение функции поиска неотслеживаемых файлов", "job_concurrency": "Число параллельных потоков задачи {job}", "job_created": "Задача создана", "job_not_concurrency_safe": "Эта задача не обеспечивает безопасность параллельности выполнения.", @@ -377,48 +392,52 @@ "transcoding_acceleration_qsv": "Quick Sync (требуется процессор Intel 7-го поколения или новее)", "transcoding_acceleration_rkmpp": "RKMPP (только для SOC Rockchip)", "transcoding_acceleration_vaapi": "VAAPI", - "transcoding_accepted_audio_codecs": "Поддерживаемые аудиокодеки", - "transcoding_accepted_audio_codecs_description": "Выберите аудиокодеки, которые не нужно перекодировать. Используется только для определенных политик перекодирования.", - "transcoding_accepted_containers": "Поддерживаемые контейнеры", + "transcoding_accepted_audio_codecs": "Допустимые аудиокодеки", + "transcoding_accepted_audio_codecs_description": "Выберите аудиокодеки, видео с которыми не нужно перекодировать. Используется только для определенных политик перекодирования.", + "transcoding_accepted_containers": "Допустимые контейнеры", "transcoding_accepted_containers_description": "Выберите, какие форматы контейнеров не нужно преобразовывать в MP4. Используется только для определенных политик перекодирования.", - "transcoding_accepted_video_codecs": "Поддерживаемые видеокодеки", - "transcoding_accepted_video_codecs_description": "Выберите видеокодеки, которые не нужно перекодировать. Используется только для определенных политик перекодирования.", - "transcoding_advanced_options_description": "Параметры, которые большинству пользователей не следует менять", + "transcoding_accepted_video_codecs": "Допустимые видеокодеки", + "transcoding_accepted_video_codecs_description": "Выберите видеокодеки, видео с которыми не нужно перекодировать. Используется только для определенных политик перекодирования.", + "transcoding_advanced_options_description": "Параметры, которые большинству пользователей не следует изменять", "transcoding_audio_codec": "Аудиокодек", "transcoding_audio_codec_description": "Opus — вариант самого высокого качества, но имеет меньшую совместимость со старыми устройствами или программным обеспечением.", - "transcoding_bitrate_description": "Видео с битрейтом выше максимального или в неподходящем формате может вызвать проблемы", + "transcoding_bitrate_description": "Видео с битрейтом выше максимального или в недопустимом формате", "transcoding_codecs_learn_more": "Для понимания используемой терминологии обратитесь к документации FFmpeg по кодекам H.264, HEVC и VP9.", "transcoding_constant_quality_mode": "Режим постоянного качества", "transcoding_constant_quality_mode_description": "Режим ICQ лучше, чем CQP, но некоторые устройства аппаратного ускорения его не поддерживают. Установка этой опции будет отдавать предпочтение указанному режиму при использовании кодирования на основе качества. NVENC не поддерживает режим ICQ.", - "transcoding_constant_rate_factor": "Коэффициент постоянной скорости (-crf)", + "transcoding_constant_rate_factor": "Постоянный коэффициент скорости (-crf)", "transcoding_constant_rate_factor_description": "Уровень качества видео. Типичные значения: 23 для H.264, 28 для HEVC, 31 для VP9 и 35 для AV1. Чем ниже, тем лучше, но при этом создаются файлы большего размера.", - "transcoding_disabled_description": "Не перекодировать видео, это может привести к сбою воспроизведения на некоторых клиентах", + "transcoding_disabled_description": "Не перекодировать никакие видео, может привести к проблемам воспроизведения на некоторых клиентах", "transcoding_encoding_options": "Параметры кодирования", - "transcoding_encoding_options_description": "Установите кодеки, разрешение, качество и другие параметры для кодированного видео", + "transcoding_encoding_options_description": "Кодеки, разрешение, качество и другие параметры для перекодирования видео", "transcoding_hardware_acceleration": "Аппаратное ускорение", "transcoding_hardware_acceleration_description": "Экспериментально: более быстрое транскодирование, но с возможным ухудшением качества при том же битрейте", "transcoding_hardware_decoding": "Аппаратное декодирование", "transcoding_hardware_decoding_setting_description": "Дополнительно ускоряет декодирование, а не только кодирование. Может работать не со всеми видео.", - "transcoding_max_b_frames": "Максимально промежуточных кадров", - "transcoding_max_b_frames_description": "Более высокие значения повышают эффективность сжатия, но замедляют кодирование. Может быть несовместимо с аппаратным ускорением на старых устройствах. 0 отключает B-кадры, а -1 устанавливает это значение автоматически.", + "transcoding_max_b_frames": "Максимальное количество промежуточных кадров", + "transcoding_max_b_frames_description": "Более высокие значения повышают эффективность сжатия, но замедляют кодирование. Может быть несовместимо с аппаратным ускорением на старых устройствах. Значение 0 полностью отключает создание промежуточных B-кадров, а -1 - устанавливает автоматическое определение их количества.", "transcoding_max_bitrate": "Максимальный битрейт", "transcoding_max_bitrate_description": "Ограничение битрейта может сделать размер файла более предсказуемым при незначительном снижении качества. При разрешении 720p типичными значениями являются 2600 кбит/с для кодеков VP9 или HEVC и 4500 кбит/с для H.264. Ограничение отключено, если задано значение 0. Когда единица измерения не указана, предполагается k (кбит/с); поэтому значения 5000, 5000k и 5M (для Мбит/с) эквивалентны.", "transcoding_max_keyframe_interval": "Максимальный интервал ключевых кадров", - "transcoding_max_keyframe_interval_description": "Устанавливает максимальное расстояние между ключевыми кадрами. Более низкие значения ухудшают эффективность сжатия, но сокращают время поиска и могут улучшить качество в сценах с быстрым движением. 0 устанавливает это значение автоматически.", - "transcoding_optimal_description": "Видео с разрешением выше целевого или не в принятом формате", - "transcoding_policy": "Политика перекодировки", - "transcoding_policy_description": "Установите, когда видео будет перекодировано", + "transcoding_max_keyframe_interval_description": "Устанавливает максимальное расстояние между ключевыми кадрами. Более низкие значения ухудшают эффективность сжатия, но сокращают время поиска и могут улучшить качество в сценах с быстрым движением. Значение 0 устанавливает автоматическое определение.", + "transcoding_optimal_description": "Видео с разрешениями выше целевого или в недопустимом формате", + "transcoding_policy": "Политика перекодирования", + "transcoding_policy_description": "Какие видео должны подвергаться перекодированию", "transcoding_preferred_hardware_device": "Предпочитаемое аппаратное устройство", "transcoding_preferred_hardware_device_description": "Применяется только к VAAPI и QSV. Устанавливает dri-узел, используемый для аппаратного транскодирования.", - "transcoding_preset_preset": "Предустановка", - "transcoding_preset_preset_description": "Скорость сжатия. Медленные настройки создают более маленькие файлы и повышают качество при достижении определенного битрейта. VP9 игнорирует скорости выше “faster”.", - "transcoding_realtime": "[ЭКСПЕРИМЕНТАЛЬНО] Перекодирование в реальном времени", - "transcoding_realtime_description": "Позволяет перекодировать видео в режиме реального времени во время воспроизведения. Поддерживает переключение качества, но может вызывать более высокие задержки воспроизведения и подтормаживания в зависимости от производительности сервера.", - "transcoding_realtime_enabled": "Включить перекодирование в реальном времени", - "transcoding_realtime_enabled_description": "Отключение параметра приведёт к недоступности запуска перекодирования в реальном времени.", + "transcoding_preset_preset": "Профиль кодирования (-preset)", + "transcoding_preset_preset_description": "Определяют скорость сжатия. Более медленные профили приводят к созданию файлов меньшего размера и повышают качество при установке достаточного битрейта. VP9 игнорирует профили выше “faster”.", + "transcoding_realtime": "[ЭКСПЕРИМЕНТАЛЬНО] Транскодирование в реальном времени", + "transcoding_realtime_description": "Позволяет транскодировать видео в режиме реального времени во время воспроизведения. Поддерживает переключение качества, но может вызывать задержки воспроизведения и подтормаживания в случае недостаточной производительности сервера.", + "transcoding_realtime_enabled": "Включить транскодирование в реальном времени", + "transcoding_realtime_enabled_description": "Отключение приведёт к недоступности транскодирования в реальном времени.", + "transcoding_realtime_resolutions": "Разрешения", + "transcoding_realtime_resolutions_description": "Доступные разрешения для транскодирования в реальном времени. Высокие разрешения могут вызвать проблемы с воспроизведением, если возможностей сервера будет недостаточно.", + "transcoding_realtime_video_codecs": "Видеокодеки", + "transcoding_realtime_video_codecs_description": "Доступные видеокодеки для транскодирования в реальном времени. Клиенты будут выбирать наиболее подходящий кодек во время воспроизведения. AV1 эффективнее, чем HEVC, который, в свою очередь, эффективнее, чем H.264. При использовании аппаратного ускорения выбирайте только те кодеки, которые поддерживает ускоритель. При использовании программного перекодирования обратите внимание, что H.264 быстрее, чем AV1, который, в свою очередь, быстрее, чем HEVC.", "transcoding_reference_frames": "Опорные кадры", - "transcoding_reference_frames_description": "Количество кадров, на которые следует ссылаться при сжатии данного кадра. Более высокие значения повышают эффективность сжатия, но замедляют кодирование. 0 устанавливает это значение автоматически.", - "transcoding_required_description": "Только видео в нестандартном формате", + "transcoding_reference_frames_description": "Количество кадров, на которые следует ссылаться при сжатии текущего кадра. Более высокие значения повышают эффективность сжатия, но замедляют кодирование. Значение 0 устанавливает автоматическое определение их количества.", + "transcoding_required_description": "Только видео в недопустимом формате", "transcoding_settings": "Настройки транскодирования видео", "transcoding_settings_description": "Управляйте тем, какие видео нужно перекодировать и как их обрабатывать", "transcoding_target_resolution": "Целевое разрешение", @@ -426,15 +445,15 @@ "transcoding_temporal_aq": "Temporal Adaptive Quantization (временное адаптивное квантование)", "transcoding_temporal_aq_description": "Применимо только к NVENC (NVIDIA Encoder). Технология повышает качество высокодетализированных нединамичных сцен. Может быть несовместима со старыми устройствами.", "transcoding_threads": "Потоки", - "transcoding_threads_description": "Более высокие значения приводят к более быстрому кодированию, но оставляют серверу меньше места для обработки других задач во время активности. Это значение не должно превышать количество ядер процессора. Максимизирует использование, если установлено значение 0.", + "transcoding_threads_description": "Более высокие значения приводят к более быстрому перекодированию, но отнимают больше ресурсов у сервера для выполнения других задач. Значение не должно превышать количество ядер процессора. Значение 0 максимизирует использование ресурсов.", "transcoding_tone_mapping": "Отображение тонов", - "transcoding_tone_mapping_description": "Пытается сохранить внешний вид HDR-видео при преобразовании в SDR. Каждый алгоритм делает разные компромиссы между цветом, детализацией и яркостью. Hable сохраняет детали, Mobius сохраняет цвет, а Reinhard сохраняет яркость.", + "transcoding_tone_mapping_description": "Технология сохранения отображения HDR-видео при преобразовании в SDR. Каждый алгоритм предлагает разные компромиссы между цветом, детализацией и яркостью. Hable сохраняет детали, Mobius сохраняет цвет, а Reinhard сохраняет яркость.", "transcoding_transcode_policy": "Политика перекодирования", - "transcoding_transcode_policy_description": "Правила, определяющие, какие видео должны быть перекодированы. HDR-видео и видео с форматом пикселей, отличным от YUV 4:2:0, всегда будут перекодироваться (за исключением случаев, когда перекодирование отключено).", + "transcoding_transcode_policy_description": "Определяет какие видео должны быть перекодированы. HDR-видео и видео с форматом пикселей, отличным от YUV 4:2:0, всегда будут перекодироваться (за исключением случаев, когда перекодирование отключено).", "transcoding_two_pass_encoding": "Двухпроходное кодирование", - "transcoding_two_pass_encoding_setting_description": "Перекодируйте за два прохода, чтобы получить более качественное кодирование видео. Когда включен максимальный битрейт (необходим для работы с H.264 и HEVC), в этом режиме используется диапазон битрейта, основанный на максимальном битрейте, и игнорируется CRF. Для VP9 можно использовать CRF, если отключен максимальный битрейт.", + "transcoding_two_pass_encoding_setting_description": "Перекодирование в два прохода для получения более качественного видео. Когда включён максимальный битрейт (требуется для работы с H.264 и HEVC), этот режим использует диапазон битрейта, опираясь на значение максимального битрейта, и игнорирует CRF (постоянный коэффициент скорости). Для VP9 CRF может использоваться только если отключён максимальный битрейт.", "transcoding_video_codec": "Видеокодек", - "transcoding_video_codec_description": "VP9 обладает высокой эффективностью и веб-совместимостью, но перекодирование занимает больше времени. HEVC работает аналогично, но имеет меньшую веб-совместимость. H.264 широко совместим и быстро перекодируется, но создает файлы гораздо большего размера. AV1 — наиболее эффективный кодек, но он не поддерживается на старых устройствах.", + "transcoding_video_codec_description": "VP9 обладает высокой эффективностью и веб-совместимостью, но перекодирование занимает больше времени. HEVC работает аналогично, но имеет меньшую веб-совместимость. H.264 широко совместим и быстро кодируется, но создаёт файлы гораздо большего размера. AV1 — наиболее эффективный кодек, но он не поддерживается старыми устройствами.", "trash_enabled_description": "Включить корзину", "trash_number_of_days": "Срок хранения", "trash_number_of_days_description": "Количество дней, в течение которых файлы будут храниться в корзине до окончательного удаления", @@ -460,7 +479,7 @@ "user_successfully_removed": "Пользователь {email} успешно удален.", "users_page_description": "Управление пользователями системы", "version_check_channel": "Канал обновлений", - "version_check_channel_description": "Выберите канал по которым получать уведомления о новых версиях", + "version_check_channel_description": "Выберите канал по которому получать уведомления о новых версиях", "version_check_enabled_description": "Включить проверку наличия новых версий", "version_check_implications": "Функция проверки версии периодически обращается к сайту {server}", "version_check_settings": "Проверка версии", @@ -578,6 +597,7 @@ "asset_viewer_settings_title": "Просмотр объектов", "assets": "Объекты", "assets_added_to_album_count": "В альбом {count, plural, one {добавлен # объект} many {добавлено # объектов} other {добавлено # объекта}}", + "assets_added_to_album_partial_count": "{successCount} из {totalCount, plural, one {# объекта} other {# объектов}} добавлено в альбом", "assets_added_to_albums_count": "{assetTotal, plural, one {# объект добавлен} many {# объектов добавлены} other {# объекта добавлены}} в {albumTotal, plural, one {# альбом} many {# альбомов} other {# альбома}}", "assets_cannot_be_added_to_album_count": "{count, plural, one {Объект не может быть добавлен} other {Объекты не могут быть добавлены}} в альбом", "assets_cannot_be_added_to_albums": "{count, plural, one {# объект} many {# объектов} other {# объекта}} не могут быть добавлены ни в один альбом", @@ -763,7 +783,7 @@ "create_album": "Создать альбом", "create_album_page_untitled": "Без названия", "create_api_key": "Создать API ключ", - "create_first_workflow": "Создать первый сценарий", + "create_first_workflow": "Нажмите для создания первого сценария", "create_library": "Создать библиотеку", "create_link": "Создать ссылку", "create_link_to_share": "Создать ссылку общего доступа", @@ -794,7 +814,6 @@ "custom_date": "Произвольная дата", "custom_locale": "Пользовательские языковые настройки", "custom_locale_description": "Форматирование дат, времени и чисел на основании выбранного языка и региона", - "custom_url": "Свой URL", "cutoff_date_description": "Оставить фото за последние…", "cutoff_day": "{count, plural, one {день} many {дней} other {дня}}", "cutoff_year": "{count, plural, one {год} many {лет} other {года}}", @@ -1461,6 +1480,7 @@ "never": "никогда", "new_album": "Новый альбом", "new_api_key": "Новый API ключ", + "new_feature": "Новая функциональность", "new_password": "Новый пароль", "new_person": "Новый человек", "new_pin_code": "Новый PIN-код", @@ -1504,6 +1524,7 @@ "not_available": "Нет данных", "not_in_any_album": "Ни в одном альбоме", "not_selected": "Не выбрано", + "not_set": "Не задано", "notes": "Примечание", "nothing_here_yet": "Здесь пока ничего нет", "notification_backup_reliability": "Включите уведомления для повышения надежности фоновой синхронизации с сервером", @@ -1521,6 +1542,8 @@ "obtainium_configurator": "Настройка Obtainium", "obtainium_configurator_instructions": "Для установки и обновления Android приложения Immich напрямую из источников на GitHub (минуя магазины приложений) можно использовать Obtainium. Создайте новый API ключ и укажите архитектуру приложения для формирования ссылки для Obtainium.", "ocr": "Текст (OCR)", + "ocr_body": "Immich научился распознавать текст на изображениях, теперь поиск возможен и по этому содержимому.", + "ocr_title": "Поиск текста на фотографиях", "official_immich_resources": "Официальные ресурсы Immich", "offline": "Недоступен", "offset": "Смещение", @@ -1539,6 +1562,8 @@ "open": "Открыть", "open_calendar": "Открыть календарь", "open_in_browser": "Открыть в браузере", + "open_in_immich_body": "Установите Immich в качестве галереи по умолчанию на Android, чтобы открывать фотографии в Immich из других приложений.", + "open_in_immich_title": "Открывать фотографии в Immich", "open_in_map_view": "Открыть в режиме просмотра карты", "open_in_openstreetmap": "Открыть в OpenStreetMap", "open_the_search_filters": "Открыть фильтры поиска", @@ -1697,10 +1722,13 @@ "recent": "Недавние", "recent_searches": "Недавние поисковые запросы", "recently_added": "Недавно добавленные", + "recently_added_body": "Переход к отдельной странице с недавно добавленными объектами.", + "recently_added_description": "Просмотр объектов, отсортированных по дате их загрузки в Immich", "recently_added_page_title": "Недавно добавленные", + "recently_added_title": "Недавно добавленные", "recently_taken": "Недавно снято", "refresh": "Обновить", - "refresh_encoded_videos": "Обновить закодированные видео", + "refresh_encoded_videos": "Обновить перекодированные видео", "refresh_faces": "Обновить лица", "refresh_metadata": "Обновить метаданные", "refresh_thumbnails": "Обновить миниатюры", @@ -1904,6 +1932,8 @@ "share_link": "Создать ссылку", "share_original": "Оригинал (большой размер)", "share_preview": "Миниатюра (маленький размер)", + "share_quality_body": "Нажмите и удерживайте кнопку «Поделиться», чтобы выбрать качество изображения перед отправкой.", + "share_quality_title": "Выберите качество для функции \"Поделиться\"", "shared": "Общиe", "shared_album_activities_input_disable": "Комментарии отключены", "shared_album_activity_remove_content": "Удалить сообщение?", @@ -1918,7 +1948,9 @@ "shared_link_app_bar_title": "Публичные ссылки", "shared_link_clipboard_copied_massage": "Скопировано в буфер обмена", "shared_link_create_error": "Ошибка при создании публичной ссылки", - "shared_link_custom_url_description": "Пользовательский URL-адрес общего доступа", + "shared_link_custom_url_description": "Ввести свой URL-адрес для общей ссылки", + "shared_link_custom_url_title": "Свой URL-адрес", + "shared_link_custom_url_warning": "Внимание: при указании URL-адреса, содержащего косую черту, ссылка может работать не так, как ожидается.", "shared_link_edit_description_hint": "Введите описание", "shared_link_edit_expire_after_option_day": "1 день", "shared_link_edit_expire_after_option_days": "{count} дней", @@ -1985,16 +2017,19 @@ "sign_out": "Выход", "sign_up": "Зарегистрироваться", "size": "Размер", + "skip": "Пропустить", "skip_to_content": "Перейти к содержанию", "skip_to_folders": "Перейти к папкам", "skip_to_tags": "Перейти к тегам", "slideshow": "Слайд-шоу", + "slideshow_body": "Устройтесь поудобнее и наслаждайтесь полноэкранным просмотром фотографий в режиме слайд-шоу.", "slideshow_metadata_overlay_mode": "Вид информации", "slideshow_metadata_overlay_mode_description_only": "Только описание", "slideshow_metadata_overlay_mode_full": "Полный", "slideshow_repeat": "Зациклить слайд-шоу", "slideshow_repeat_description": "Повторять слайд-шоу после его окончания", "slideshow_settings": "Настройки слайд-шоу", + "slideshow_title": "Слайдшоу", "smart_album": "Смарт-альбом", "some_assets_already_have_a_location_warning": "Некоторые из выбранных объектов уже содержат данные о местоположении", "sort_albums_by": "Сортировать альбомы по...", @@ -2122,6 +2157,7 @@ "unknown": "Неизвестно", "unknown_country": "Неизвестная страна", "unknown_date": "Дата неизвестна", + "unknown_schema": "Неизвестная схема", "unknown_year": "Неизвестный Год", "unlimited": "Не ограничено", "unlink_motion_video": "Отсоединить движущееся видео", @@ -2157,6 +2193,8 @@ "upload_status_errors": "Ошибки", "upload_status_uploaded": "Загружено", "upload_success": "Загрузка прошла успешно. Обновите страницу, чтобы увидеть новые объекты.", + "upload_to_album_body": "Для пользователей, которые не используют функцию ручной загрузки, теперь можно добавлять фотографии с устройства сразу в нужный альбом по мере их загрузки. Больше не нужно сначала загружать их, а затем добавлять в альбом.", + "upload_to_album_title": "Загружать сразу в альбом", "upload_to_immich": "Загрузка в Immich ({count})", "uploading": "Загружается", "uploading_media": "Выполняется загрузка", @@ -2224,6 +2262,9 @@ "week": "Неделя", "welcome": "Добро пожаловать", "welcome_to_immich": "Добро пожаловать в Immich", + "whats_new": "Что нового", + "whats_new_settings_subtitle": "Узнайте об нововведениях в Immich", + "whats_new_version": "Версия {version}", "when": "Когда", "width": "Ширина", "wifi_name": "Имя сети", diff --git a/i18n/sk.json b/i18n/sk.json index 5c633d3722..c40dfa7e0b 100644 --- a/i18n/sk.json +++ b/i18n/sk.json @@ -108,6 +108,21 @@ "image_thumbnail_quality_description": "Kvalita miniatúry v stupnici od 1 do 100. Vyššia hodnota znamená lepšiu kvalitu, ale produkuje väčšie súbory a môže znížiť odozvu aplikácie.", "image_thumbnail_title": "Miniatúry", "import_config_from_json_description": "Importovať konfiguráciu systému nahraním konfiguračného súboru JSON", + "integrity_checks_checksum_files": "Súbory s kontrolnými súčtami", + "integrity_checks_checksum_files_description": "Nastaviť kontroly kontrolných súčtov", + "integrity_checks_checksum_files_enable_description": "Zapnúť kontrolu kontrolných súčtov", + "integrity_checks_checksum_files_percentage_limit": "Percentuálny limit", + "integrity_checks_checksum_files_percentage_limit_description": "Nastavte maximálnu percentuálnu hodnotu v rozsahu 0.01 až 1. Tá určí ako často sa má kontrolovať kontrolný súčet v každom intervale.", + "integrity_checks_checksum_files_time_limit": "Časový limit", + "integrity_checks_checksum_files_time_limit_description": "Nastavte maximálnu dobu ako dlho môže prebiehať kontrola kontrolného súčtu v každom intervale. (ms)", + "integrity_checks_missing_files": "Chýbajúce súbory", + "integrity_checks_missing_files_description": "Nastavte frekvenciu a zapnite alebo vypnite kontrolu chýbajúcich súborov", + "integrity_checks_missing_files_enable_description": "Zapnúť kontrolu chýbajúcich súborov", + "integrity_checks_settings": "Kontroly integrity", + "integrity_checks_settings_description": "Spravovanie intervalov kontrol integrity", + "integrity_checks_untracked_files": "Nesledované súbory", + "integrity_checks_untracked_files_description": "Nastavte frekvenciu a zapnite alebo vypnite kontrolu nesledovaných súborov", + "integrity_checks_untracked_files_enable_description": "Zapnúť kontrolu nesledovaných súborov", "job_concurrency": "Súbežné úlohy - {job}", "job_created": "Úloha bola vytvorená", "job_not_concurrency_safe": "Táto úloha nie je bezpečná pre súbežné spracovanie.", @@ -416,6 +431,10 @@ "transcoding_realtime_description": "Umožňuje transkódovanie v reálnom čase počas streamovania videa. Umožňuje zmenu kvality, avšak v závislosti od výkonnosti servera môže spôsobiť vyššiu latenciu prehrávania a trhané prehrávanie.", "transcoding_realtime_enabled": "Zapnúť prekódovanie v reálnom čase", "transcoding_realtime_enabled_description": "Ak je táto funkcia vypnutá, server odmietne spustiť nové relácie transkódovania v reálnom čase.", + "transcoding_realtime_resolutions": "Rozlíšenia", + "transcoding_realtime_resolutions_description": "Rozlíšenia ponúkané pre transkódovanie v reálnom čase. Vyššie rozlíšenia môžu spôsobiť problémy s prehrávaním, ak ich server nedokáže transkódovať dostatočne rýchlo.", + "transcoding_realtime_video_codecs": "Video kodeky", + "transcoding_realtime_video_codecs_description": "Video kodeky ponúkané na transkódovanie v reálnom čase. Klienti si počas prehrávania vyberú najlepšiu možnosť, ktorú podporujú. AV1 je efektívnejší ako HEVC, ktorý je zase efektívnejší ako H.264. Pri použití hardvérovej akcelerácie vyberte len tie kodeky, ktoré akcelerátor dokáže kódovať. Pri použití softvérového transkódovania majte na pamäti, že H.264 je rýchlejší ako AV1, ktorý je zase rýchlejší ako HEVC.", "transcoding_reference_frames": "Referenčné snímky", "transcoding_reference_frames_description": "Počet snímok, na ktoré sa má odkazovať pri kompresii daného snímku. Vyššie hodnoty zvyšujú účinnosť kompresie, ale spomaľujú kódovanie. Hodnota 0 sa nastavuje automaticky.", "transcoding_required_description": "Iba videá, ktoré nie sú v prijateľnom formáte", @@ -578,6 +597,7 @@ "asset_viewer_settings_title": "Prehliadač médií", "assets": "Položky", "assets_added_to_album_count": "Do albumu {count, plural, one {bola pridaná # položka} few {boli pridané # položky} other {bolo pridaných # položiek}}", + "assets_added_to_album_partial_count": "Do albumu bolo pridaných {successCount} z {totalCount} {totalCount, plural, one {položky} other {položiek}}", "assets_added_to_albums_count": "{assetTotal, plural, one {Pridaná # položka} few {Pridané # položky} other {Pridaných # položiek}} do {albumTotal, plural, one {# albumu} other {# albumov}}", "assets_cannot_be_added_to_album_count": "{count, plural, one {položku} other {položiek}} nie je možné pridať do albumu", "assets_cannot_be_added_to_albums": "{count, plural, one {položka} few {položky} other {položiek}} nie je možné pridať do žiadneho albumu", @@ -794,7 +814,6 @@ "custom_date": "Vlastný dátum", "custom_locale": "Vlastné nastavenie jazyka", "custom_locale_description": "Formátovať dátumy, časy a čísla podľa vybraného jazyka a regiónu", - "custom_url": "Vlastná URL adresa", "cutoff_date_description": "Ponechať fotografie z posledného obdobia…", "cutoff_day": "{count, plural, one {deň} few {dni} other {dní}}", "cutoff_year": "{count, plural, one {rok} few {roky} other {rokov}}", @@ -1461,6 +1480,7 @@ "never": "nikdy", "new_album": "Nový album", "new_api_key": "Nový API kľúč", + "new_feature": "Nová funkcia", "new_password": "Nové heslo", "new_person": "Nová osoba", "new_pin_code": "Nový PIN kód", @@ -1504,6 +1524,7 @@ "not_available": "Nedostupné", "not_in_any_album": "Nie je v žiadnom albume", "not_selected": "Nevybrané", + "not_set": "Nenastavené", "notes": "Poznámky", "nothing_here_yet": "Zatiaľ tu nič nie je", "notification_backup_reliability": "Zapnúť upozornenia na zlepšenie spoľahlivosti zálohovania na pozadí", @@ -1521,6 +1542,8 @@ "obtainium_configurator": "Konfigurátor Obtainium", "obtainium_configurator_instructions": "Použite Obtainium na inštaláciu a aktualizáciu aplikácie pre Android priamo z verzie Immich v službe GitHub. Vytvorte kľúč API a vyberte variantu, aby ste vytvorili konfiguračný odkaz Obtainium", "ocr": "OCR", + "ocr_body": "Immich teraz detekuje text vo Vašich fotkách, takže môžete vyhľadávať aj v týchto textoch.", + "ocr_title": "Vyhľadávať text vo Vašich fotkách", "official_immich_resources": "Oficiálne Immich zdroje", "offline": "Offline", "offset": "Posun", @@ -1539,6 +1562,8 @@ "open": "Otvoriť", "open_calendar": "Otvoriť kalendár", "open_in_browser": "Otvoriť v prehliadači", + "open_in_immich_body": "Nastavte vo svojom Androide aplikáciu Immich ako svoju galériu, aby ste mohli otvárat fotografie priamo z iných aplikácií.", + "open_in_immich_title": "Otvoriť fotografie v Immich", "open_in_map_view": "Otvoriť v mape", "open_in_openstreetmap": "Otvoriť v OpenStreetMap", "open_the_search_filters": "Otvoriť vyhľadávacie filtre", @@ -1697,7 +1722,10 @@ "recent": "Nedávne", "recent_searches": "Posledné vyhľadávania", "recently_added": "Nedávno pridané", + "recently_added_body": "Prejdite priamo na stránku, kde nájdete naposledy pridané fotky.", + "recently_added_description": "Prezerať fotky zoradené podľa dátumu pridania do Immich", "recently_added_page_title": "Nedávno pridané", + "recently_added_title": "Naposledy pridané", "recently_taken": "Nedávno nasnímané", "refresh": "Aktualizovať", "refresh_encoded_videos": "Obnoviť enkódované videá", @@ -1904,6 +1932,8 @@ "share_link": "Zdieľať odkaz", "share_original": "Použiť originál (veľký)", "share_preview": "Použiť miniatúru (malý)", + "share_quality_body": "Stlačte a podržte tlačidlo zdieľať pre výber kvality obrázka.", + "share_quality_title": "Vyberte kvalitu obrázka na zdieľanie", "shared": "Zdieľané", "shared_album_activities_input_disable": "Komentár je zakázaný", "shared_album_activity_remove_content": "Chcete vymazať túto aktivitu?", @@ -1918,7 +1948,9 @@ "shared_link_app_bar_title": "Zdieľané odkazy", "shared_link_clipboard_copied_massage": "Skopírované do schránky", "shared_link_create_error": "Vyskytla sa chyba behom vytvárania zdieľaného odkazu", - "shared_link_custom_url_description": "Prístup k tomuto zdieľanému odkazu pomocou vlastnej URL adresy", + "shared_link_custom_url_description": "Prístup k tomuto zdieľanému odkazu pomocou vlastného názvu URL adresy", + "shared_link_custom_url_title": "Vlastná URL adresa", + "shared_link_custom_url_warning": "Upozornenie: vlastný názov URL s lomítkom sa nemusí správať tak, ako očakávate.", "shared_link_edit_description_hint": "Zadajte popis zdieľania", "shared_link_edit_expire_after_option_day": "1 deň", "shared_link_edit_expire_after_option_days": "{count} dní", @@ -1985,16 +2017,19 @@ "sign_out": "Odhlásiť sa", "sign_up": "Registrovať", "size": "Veľkosť", + "skip": "Preskočiť", "skip_to_content": "Preskočiť na obsah", "skip_to_folders": "Preskočiť do priečinkov", "skip_to_tags": "Preskočiť ku štítkom", "slideshow": "Prezentácia", + "slideshow_body": "Sledujte ako sa Vaše fotografie premietajú v prezentácii na celej obrazovke.", "slideshow_metadata_overlay_mode": "Obsah prekrytia obrázku", "slideshow_metadata_overlay_mode_description_only": "Iba popis", "slideshow_metadata_overlay_mode_full": "Úplný", "slideshow_repeat": "Opakovať prezentáciu", "slideshow_repeat_description": "Po skončení prezentácie sa vrátiť späť na začiatok", "slideshow_settings": "Nastavenia prezentácie", + "slideshow_title": "Prezentácia", "smart_album": "Inteligentný album", "some_assets_already_have_a_location_warning": "Niektoré z vybraných objektov už majú určenú polohu", "sort_albums_by": "Zoradiť albumy podľa...", @@ -2122,6 +2157,7 @@ "unknown": "Neznáme", "unknown_country": "Neznáma krajina", "unknown_date": "Neznámy dátum", + "unknown_schema": "Neznáma schéma", "unknown_year": "Neznámy rok", "unlimited": "Neobmedzené", "unlink_motion_video": "Odpojiť pohyblivé video", @@ -2157,6 +2193,8 @@ "upload_status_errors": "Chyby", "upload_status_uploaded": "Nahrané", "upload_success": "Nahrávanie úspešné, pridané súbory sa zobrazia po obnovení stránky.", + "upload_to_album_body": "Užívatelia, ktorí nevyužívajú ručné pridávanie obrázkov, si môžu zvoliť, či chcú lokálne fotografie pridávať priamo do albumu už pri ich pridávaní. Už nie je potrebné ich najprv pridať do Immich a až potom pridať do albumu.", + "upload_to_album_title": "Nahrať priamo do albumu", "upload_to_immich": "Nahrať na Immich ({count})", "uploading": "Nahrávanie", "uploading_media": "Nahrávanie médií", @@ -2224,6 +2262,9 @@ "week": "Týždeň", "welcome": "Vitajte", "welcome_to_immich": "Vitajte v Immich", + "whats_new": "Čo je nové", + "whats_new_settings_subtitle": "Čo je nové v Immich", + "whats_new_version": "Verzia {version}", "when": "Kedy", "width": "Šírka", "wifi_name": "Názov Wi-Fi", diff --git a/i18n/sl.json b/i18n/sl.json index 344308f773..c2100294ce 100644 --- a/i18n/sl.json +++ b/i18n/sl.json @@ -108,6 +108,21 @@ "image_thumbnail_quality_description": "Kakovost sličic od 1-100. Višje je boljše, vendar ustvarja večje datoteke in lahko zmanjša odzivnost aplikacije.", "image_thumbnail_title": "Nastavitve sličic", "import_config_from_json_description": "Uvozite sistemsko konfiguracijo z nalaganjem konfiguracijske datoteke JSON", + "integrity_checks_checksum_files": "Datoteke kontrolnih vsot", + "integrity_checks_checksum_files_description": "Konfigurirajte preverjanje kontrolne vsote", + "integrity_checks_checksum_files_enable_description": "Omogočite preverjanje kontrolne vsote", + "integrity_checks_checksum_files_percentage_limit": "Odstotna omejitev", + "integrity_checks_checksum_files_percentage_limit_description": "Konfigurirajte največji odstotek med 0,01 in 1 za to, kolikokrat naj se preverjanje kontrolne vsote izvaja v vsakem intervalu.", + "integrity_checks_checksum_files_time_limit": "Časovna omejitev", + "integrity_checks_checksum_files_time_limit_description": "Konfigurirajte najdaljše trajanje preverjanja kontrolne vsote v vsakem intervalu. (ms)", + "integrity_checks_missing_files": "Manjkajoče datoteke", + "integrity_checks_missing_files_description": "Konfigurirajte pogostost in omogočite ali onemogočite preverjanje manjkajočih datotek", + "integrity_checks_missing_files_enable_description": "Omogočite preverjanje manjkajočih datotek", + "integrity_checks_settings": "Preverjanja integritete", + "integrity_checks_settings_description": "Upravljanje intervalov preverjanj integritete", + "integrity_checks_untracked_files": "Nesledljive datoteke", + "integrity_checks_untracked_files_description": "Konfigurirajte pogostost in omogočite ali onemogočite preverjanje nesledljivih datotek", + "integrity_checks_untracked_files_enable_description": "Omogoči preverjanje nesledljivih datotek", "job_concurrency": "{job} sočasnost", "job_created": "Opravilo ustvarjeno", "job_not_concurrency_safe": "To delo ni varno za sočasnost.", @@ -416,6 +431,10 @@ "transcoding_realtime_description": "Omogoča prekodiranje v realnem času med pretakanjem videa. Omogoča preklapljanje kakovosti, vendar lahko povzroči večjo zakasnitev predvajanja in zatikanje, odvisno od zmogljivosti strežnika.", "transcoding_realtime_enabled": "Omogoči prekodiranje v realnem času", "transcoding_realtime_enabled_description": "Če je onemogočeno, bo strežnik zavrnil začetek novih sej prekodiranja v realnem času.", + "transcoding_realtime_resolutions": "Ločljivosti", + "transcoding_realtime_resolutions_description": "Ločljivosti, ki so na voljo za transkodiranje v realnem času. Višje ločljivosti lahko povzročijo težave s predvajanjem, če jih strežnik ne more dovolj hitro transkodirati.", + "transcoding_realtime_video_codecs": "Video kodeki", + "transcoding_realtime_video_codecs_description": "Video kodeki, ki so na voljo za transkodiranje v realnem času. Stranke bodo med predvajanjem izbrale najboljšo možnost, ki jo podpirajo. AV1 je učinkovitejši od HEVC, ki je učinkovitejši od H.264. Pri uporabi strojnega pospeševanja izberite samo kodeke, ki jih pospeševalnik lahko kodira. Pri uporabi programskega transkodiranja upoštevajte, da je H.264 hitrejši od AV1, ki je hitrejši od HEVC.", "transcoding_reference_frames": "Referenčni okvirji", "transcoding_reference_frames_description": "Število okvirjev, na katere se sklicujete pri stiskanju danega okvira. Višje vrednosti izboljšajo učinkovitost stiskanja, vendar upočasnijo kodiranje. 0 samodejno nastavi to vrednost.", "transcoding_required_description": "Samo videoposnetki, ki niso v sprejemljivi obliki", @@ -578,6 +597,7 @@ "asset_viewer_settings_title": "Pregledovalnik sredstev", "assets": "Sredstva", "assets_added_to_album_count": "Dodano {count, plural, one {# sredstvo} two {# sredstvi} few {# sredstva} other {# sredstev}} v album", + "assets_added_to_album_partial_count": "V album je bilo dodanih {successCount} od {totalCount} {totalCount, plural, one {sredstva} other {sredstev}}", "assets_added_to_albums_count": "Dodano {assetTotal, plural, one {# sredstvo} two {# sredstvi} few {# sredstva} other {# sredstev}} v {albumTotal, plural, one {# album} two {# albuma} few {# albume} other {# albumov}}", "assets_cannot_be_added_to_album_count": "{count, plural, one {Sredstvo} two {Sredstvi} few {Sredstva} other {Sredstev}} ni mogoče dodati v album", "assets_cannot_be_added_to_albums": "{count, plural, one {Sredstvo} two {Sredstvi} few {Sredstva} other {Sredstev}} ni mogoče dodati v noben album", @@ -794,7 +814,6 @@ "custom_date": "Datum po meri", "custom_locale": "Jezik po meri", "custom_locale_description": "Oblikovanje datuma, časa in številk glede na izbrani jezik in regijo", - "custom_url": "URL po meri", "cutoff_date_description": "Shranite fotografije iz zadnjega…", "cutoff_day": "{count, plural, one {dan} other {dni}}", "cutoff_year": "{count, plural, one {leto} two {leti} few {leta} other {let}}", @@ -1461,6 +1480,7 @@ "never": "nikoli", "new_album": "Nov album", "new_api_key": "Nov API ključ", + "new_feature": "Nova funkcija", "new_password": "Novo geslo", "new_person": "Nova oseba", "new_pin_code": "Nova PIN koda", @@ -1504,6 +1524,7 @@ "not_available": "Ni na voljo", "not_in_any_album": "Ni v nobenem albumu", "not_selected": "Ni izbrano", + "not_set": "Ni nastavljeno", "notes": "Opombe", "nothing_here_yet": "Tukaj še ni ničesar", "notification_backup_reliability": "Omogočite obvestila za izboljšanje zanesljivosti varnostnega kopiranja v ozadju", @@ -1521,6 +1542,8 @@ "obtainium_configurator": "Konfigurator Obtainium", "obtainium_configurator_instructions": "Z Obtainium namestite in posodobite aplikacijo za Android neposredno iz izdaje Immich GitHub. Ustvarite ključ API in izberite različico, da ustvarite svojo konfiguracijsko povezavo Obtainium", "ocr": "Optično prepoznavanje znakov (OCR)", + "ocr_body": "Immich zdaj bere besedilo v vaših fotografijah, tako da jih lahko iščete po tem, kaj pišejo.", + "ocr_title": "Iskanje besedila na fotografijah", "official_immich_resources": "Immich uradni viri", "offline": "Brez povezave", "offset": "Odmik", @@ -1539,6 +1562,8 @@ "open": "Odpri", "open_calendar": "Odpri koledar", "open_in_browser": "Odpri v brskalniku", + "open_in_immich_body": "Nastavite Immich kot galerijo v sistemu Android, da boste lahko fotografije odpirali neposredno iz drugih aplikacij.", + "open_in_immich_title": "Odpri fotografije v Immichu", "open_in_map_view": "Odpri v pogledu zemljevida", "open_in_openstreetmap": "Odpri v OpenStreetMap", "open_the_search_filters": "Odpri iskalne filtre", @@ -1596,7 +1621,7 @@ "person": "Oseba", "person_age_months": "{months, plural, one {# mesec} two {# meseca} few {# mesece} other {# mesecev}} star/a", "person_age_year_months": "1 leto, {months, plural, one {# mesec} two {# meseca} few {# mesece} other {# mesecev}} star/a", - "person_age_years": "{years, plural, two {# leti} few {# leta} other {# let}} star/a", + "person_age_years": "{years, plural, one {# leto} two {# leti} few {# leta} other {# let}} star/a", "person_birthdate": "Rojen dne {date}", "person_hidden": "{name}{hidden, select, true { (skrita)} other {}}", "person_recognized": "Oseba prepoznana", @@ -1697,7 +1722,10 @@ "recent": "Nedavno", "recent_searches": "Nedavna iskanja", "recently_added": "Nedavno dodano", + "recently_added_body": "Skočite neposredno na vse, kar ste nedavno dodali, na namenski strani.", + "recently_added_description": "Brskajte po svojih sredstvih, razvrščenih po času nalaganja v Immich", "recently_added_page_title": "Nedavno dodano", + "recently_added_title": "Nedavno dodano", "recently_taken": "Nedavno posneto", "refresh": "Osveži", "refresh_encoded_videos": "Osveži kodirane videoposnetke", @@ -1904,6 +1932,8 @@ "share_link": "Deli povezavo", "share_original": "Uporabi izvirno (veliko)", "share_preview": "Uporabi sličico (majhno)", + "share_quality_body": "Pritisnite in držite gumb za deljenje, da izberete kakovost slike, preden jo delite.", + "share_quality_title": "Izberite kakovost delitve", "shared": "V skupni rabi", "shared_album_activities_input_disable": "Komentiranje je onemogočeno", "shared_album_activity_remove_content": "Ali želite izbrisati to dejavnost?", @@ -1918,7 +1948,9 @@ "shared_link_app_bar_title": "Povezave v skupni rabi", "shared_link_clipboard_copied_massage": "Kopirano v odložišče", "shared_link_create_error": "Napaka pri ustvarjanju povezave skupne rabe", - "shared_link_custom_url_description": "Dostop do te deljene povezave z URL-jem po meri", + "shared_link_custom_url_description": "Dostop do te deljene povezave z imenom URL-ja po meri", + "shared_link_custom_url_title": "URL po meri", + "shared_link_custom_url_warning": "Opozorilo: ime URL-ja po meri s poševnico naprej morda ne bo delovalo po pričakovanjih.", "shared_link_edit_description_hint": "Vnesi opis skupne rabe", "shared_link_edit_expire_after_option_day": "1 dan", "shared_link_edit_expire_after_option_days": "{count} dni", @@ -1985,16 +2017,19 @@ "sign_out": "Odjavi se", "sign_up": "Prijavi se", "size": "Velikost", + "skip": "Preskoči", "skip_to_content": "Preskoči na vsebino", "skip_to_folders": "Preskoči na mape", "skip_to_tags": "Preskoči na oznake", "slideshow": "Diaprojekcija", + "slideshow_body": "Udobno se namestite in si oglejte svoje fotografije v celozaslonskem prikazu diaprojekcije.", "slideshow_metadata_overlay_mode": "Prekrivna vsebina", "slideshow_metadata_overlay_mode_description_only": "Samo opis", "slideshow_metadata_overlay_mode_full": "Polno", "slideshow_repeat": "Ponavljanje diaprojekcije", "slideshow_repeat_description": "Po koncu diaprojekcije se zanka vrne na začetek", "slideshow_settings": "Nastavitve diaprojekcije", + "slideshow_title": "Diaprojekcija", "smart_album": "Pametni album", "some_assets_already_have_a_location_warning": "Nekatera izbrana sredstva že imajo lokacijo", "sort_albums_by": "Razvrsti albume po...", @@ -2122,6 +2157,7 @@ "unknown": "Neznano", "unknown_country": "Neznana država", "unknown_date": "Neznan datum", + "unknown_schema": "Neznana shema", "unknown_year": "Neznano leto", "unlimited": "Neomejeno", "unlink_motion_video": "Prekini povezavo videoposnetka gibanja", @@ -2157,6 +2193,8 @@ "upload_status_errors": "Napake", "upload_status_uploaded": "Naloženo", "upload_success": "Nalaganje je uspelo, osvežite stran, da vidite nova sredstva za nalaganje.", + "upload_to_album_body": "Uporabniki, ki ne uporabljajo funkcije ročnega nalaganja, lahko zdaj dodajo lokalne fotografije neposredno v album med nalaganjem, tako da jih ni več treba nalagati in nato dodajati v album pozneje.", + "upload_to_album_title": "Naloži neposredno v album", "upload_to_immich": "Naloži v Immich ({count})", "uploading": "Nalagam", "uploading_media": "Nalaganje medijev", @@ -2224,6 +2262,9 @@ "week": "Teden", "welcome": "Dobrodošli", "welcome_to_immich": "Dobrodošli v Immich", + "whats_new": "Kaj je novega", + "whats_new_settings_subtitle": "Oglejte si novosti v Immichu", + "whats_new_version": "Različica {version}", "when": "Ko", "width": "Širina", "wifi_name": "Wi-Fi ime", diff --git a/i18n/sq.json b/i18n/sq.json index d374a07552..39ff274665 100644 --- a/i18n/sq.json +++ b/i18n/sq.json @@ -6,7 +6,7 @@ "action": "Aksion", "action_common_update": "Përditëso", "action_description": "Një grup veprimesh për t'u kryer në asetet e filtruara", - "actions": "Aksione", + "actions": "Veprime", "active": "Aktiv", "active_count": "Aktive: {count}", "activity": "Aktivitet", @@ -108,6 +108,21 @@ "image_thumbnail_quality_description": "Cilësia e miniaturave nga 1-100. Sa më e lartë të jetë aq më mirë, por prodhon skedarë më të mëdhenj dhe mund të zvogëlojë reagimin e aplikacionit.", "image_thumbnail_title": "Cilësimet e miniaturës", "import_config_from_json_description": "Importo konfigurimin e sistemit duke ngarkuar një skedar konfigurimi JSON", + "integrity_checks_checksum_files": "Skedarë checksum", + "integrity_checks_checksum_files_description": "Konfiguro kontrollin e checksum-it", + "integrity_checks_checksum_files_enable_description": "Aktivizo kontrollin e checksum-it", + "integrity_checks_checksum_files_percentage_limit": "Kufi përqindjeje", + "integrity_checks_checksum_files_percentage_limit_description": "Konfiguro përqindjen maksimale midis 0.01 dhe 1 për sa duhet të ekzekutohet kontrolli i checksum-it në çdo interval.", + "integrity_checks_checksum_files_time_limit": "Kufi kohor", + "integrity_checks_checksum_files_time_limit_description": "Konfiguro kohëzgjatjen maksimale për të cilën duhet të ekzekutohet kontrolli i checksum-it në çdo interval. (ms)", + "integrity_checks_missing_files": "Skedarë që mungojnë", + "integrity_checks_missing_files_description": "Konfiguro shpeshtësinë dhe aktivizo ose çaktivizo kontrollin e skedarëve që mungojnë", + "integrity_checks_missing_files_enable_description": "Aktivizo kontrollin e skedarëve që mungojnë", + "integrity_checks_settings": "Kontrolle integriteti", + "integrity_checks_settings_description": "Menaxho intervalet e kontrolleve të integritetit", + "integrity_checks_untracked_files": "Skedarë të pandjekur", + "integrity_checks_untracked_files_description": "Konfiguro shpeshtësinë dhe aktivizo ose çaktivizo kontrollin e skedarëve të pandjekur", + "integrity_checks_untracked_files_enable_description": "Aktivizo kontrollin e skedarëve të pandjekur", "job_concurrency": "{job} paralele", "job_created": "Puna u krijua", "job_not_concurrency_safe": "Kjo punë nuk është e sigurt për paralelizmin.", @@ -183,18 +198,23 @@ "machine_learning_smart_search_enabled": "Aktivizo kërkimin inteligjent", "machine_learning_smart_search_enabled_description": "Nëse çaktivizohet, imazhet nuk do të kodohen për kërkim inteligjent.", "machine_learning_url_description": "URL-ja e serverit të të mësuarit automatik. Nëse jepet më shumë se një URL, secili server do të provohet një nga një derisa njëri të përgjigjet me sukses, në rend nga i pari tek i fundit. Serverët që nuk përgjigjen do të injorohen përkohësisht derisa të kthehen në linjë.", + "maintenance_backup_management": "Menaxhimi i kopjeve rezervë", "maintenance_delete_backup": "Fshi kopjen rezervë", "maintenance_delete_backup_description": "Ky skedar do të fshihet në mënyrë të pakthyeshme.", "maintenance_delete_error": "Fshirja e kopjes rezervë dështoi.", + "maintenance_integrity_check": "Kontrollo", "maintenance_integrity_check_all": "Kontrollo të gjitha", "maintenance_integrity_checksum_mismatch": "Mospërputhje e shumës së kontrollit", + "maintenance_integrity_checksum_mismatch_description": "Skedarët për të cilët checksumi në disk nuk përputhet me checksumin që Immich ka ruajtur në bazën e të dhënave të tij.", "maintenance_integrity_checksum_mismatch_job": "Kontrolloni për mospërputhje të shumës së kontrollit", "maintenance_integrity_checksum_mismatch_refresh_job": "Rifresko raportet e mospërputhjes së shumës së kontrollit", "maintenance_integrity_missing_file": "Skedarët që mungojnë", + "maintenance_integrity_missing_file_description": "Skedarët që Immich i ka gjurmuar në bazën e të dhënave të tij, por që nuk ekzistojnë në sistemin e skedarëve.", "maintenance_integrity_missing_file_job": "Kontrolloni për skedarë që mungojnë", "maintenance_integrity_missing_file_refresh_job": "Rifresko raportet e skedarëve që mungojnë", "maintenance_integrity_report": "Raporti i Integritetit", "maintenance_integrity_untracked_file": "Skedarët e Pagjurmuar", + "maintenance_integrity_untracked_file_description": "Skedarët në direktoritë e Immich-it për të cilët Immich nuk ka asnjë regjistër.", "maintenance_integrity_untracked_file_job": "Kontrolloni për skedarë të pagjurmuar", "maintenance_integrity_untracked_file_refresh_job": "Rifresko raportet e skedarëve të pagjurmuar", "maintenance_restore_backup": "Rivendos rezervën", @@ -318,16 +338,980 @@ "reset_settings_to_default": "Rivendos cilësimet në ato të parazgjedhura", "reset_settings_to_recent_saved": "Rivendos cilësimet në cilësimet e ruajtura së fundmi", "scanning_library": "Duke skanuar bibliotekën", - "search_jobs": "Kërko punë…" + "search_jobs": "Kërko punë…", + "send_welcome_email": "Dërgo email mirëseardhjeje", + "server_external_domain_settings": "Domeni i jashtëm", + "server_external_domain_settings_description": "Domeni i përdorur për lidhjet e jashtme", + "server_public_users": "Përdoruesit publikë", + "server_public_users_description": "Të gjithë përdoruesit (emri dhe emaili) shfaqen kur shtohet një përdorues në albumet e përbashkëta. Kur është çaktivizuar, lista e përdoruesve do të jetë e disponueshme vetëm për përdoruesit admin.", + "server_settings": "Caktimet e serverit", + "server_settings_description": "Menaxho cilësimet e serverit", + "server_stats_page_description": "Faqja e statistikave të serverit administrativ", + "server_welcome_message": "Mesazh mirëseardhjeje", + "server_welcome_message_description": "Një mesazh që shfaqet në faqen e hyrjes.", + "settings_page_description": "Faqja e cilësimeve të administrimit", + "sidecar_job": "Metadata sidecar", + "sidecar_job_description": "Zbulo ose sinkronizo metadatat sidecar nga sistemi i skedarëve", + "slideshow_duration_description": "Numri i sekondave për me shfaqë çdo imazh", + "smart_search_job_description": "Ekzekuto mësim makine mbi asetet për me mbështetë kërkimin inteligjent", + "storage_template_date_time_description": "Markatimpi i krijimit të asetit përdoret për informacionin e datës dhe orës", + "storage_template_date_time_sample": "Koha e mostrës {date}", + "storage_template_enable_description": "Aktivizo motorin e shabllonit të ruajtjes", + "storage_template_hash_verification_enabled": "Verifikimi i hash-it asht aktivizuar", + "storage_template_hash_verification_enabled_description": "Aktivizon verifikimin e hash-it, mos e çaktivizo këtë nëse nuk je i sigurt për implikacionet", + "storage_template_migration": "Migrimi i shabllonit të ruajtjes", + "storage_template_migration_description": "Apliko {template} aktual te asetet e ngarkuara ma parë", + "storage_template_migration_info": "Shablloni i ruajtjes do t'i konvertojë të gjitha shtesat në shkronja të vogla. Ndryshimet e shabllonit do të aplikohen vetëm për asetet e reja. Për t'i aplikuar retroaktivisht te asetet e ngarkuara ma parë, ekzekuto {job}.", + "storage_template_migration_job": "Puna e migrimit të shabllonit të ruajtjes", + "storage_template_more_details": "Për ma shumë detaje rreth kësaj veçorie, referoju Shabllonit të Ruajtjes dhe implikacioneve të tij", + "storage_template_onboarding_description_v2": "Kur aktivizohet, kjo veçori do t'i organizojë automatikisht skedarët bazuar në një shabllon të definuar nga përdoruesi. Për ma shumë informacion, shih dokumentacionin.", + "storage_template_path_length": "Kufiri afërsisht i gjatësisë së shtegut: {length, number}/{limit, number}", + "storage_template_settings": "Shablloni i ruajtjes", + "storage_template_settings_description": "Menaxho strukturën e dosjeve dhe emrin e skedarit të asetit të ngarkuar", + "storage_template_user_label": "{label} asht Etiketa e Ruajtjes e përdoruesit", + "system_settings": "Cilësimet e sistemit", + "tag_cleanup_job": "Pastrimi i etiketave", + "template_email_available_tags": "Mund të përdorësh variablat e mëposhtme në shabllonin tënd: {tags}", + "template_email_if_empty": "Nëse shablloni asht bosh, do të përdoret emaili i parazgjedhur.", + "template_email_invite_album": "Shablloni i ftesës në album", + "template_email_preview": "Pamja paraprake", + "template_email_settings": "Shabllonet e emailit", + "template_email_update_album": "Shablloni i përditësimit të albumit", + "template_email_welcome": "Shablloni i emailit të mirëseardhjes", + "template_settings": "Shablonet e njoftimeve", + "template_settings_description": "Menaxho shablonet e personalizuara për njoftimet", + "theme_custom_css_settings": "CSS i personalizuar", + "theme_custom_css_settings_description": "Cascading Style Sheets lejojnë personalizimin e dizajnit të Immich.", + "theme_settings": "Cilësimet e temës", + "theme_settings_description": "Menaxho personalizimin e ndërfaqes web të Immich", + "thumbnail_generation_job": "Gjenero miniatura", + "thumbnail_generation_job_description": "Gjenero miniatura të mëdha, të vogla dhe të turbullta për çdo aset, si dhe miniatura për çdo person", + "transcoding_acceleration_api": "API-ja e përshpejtimit", + "transcoding_acceleration_api_description": "API-ja që do të ndërveprojë me pajisjen tënde për me përshpejtuar transkodimin. Ky cilësim asht 'best effort': do të kthehet te transkodimi softuerik nëse dështon. VP9 mund të funksionojë ose jo varësisht nga hardueri yt.", + "transcoding_acceleration_nvenc": "NVENC (kërkon GPU NVIDIA)", + "transcoding_acceleration_qsv": "Quick Sync (kërkon CPU Intel brez 7 ose ma të ri)", + "transcoding_acceleration_rkmpp": "RKMPP (vetëm në SOC-et Rockchip)", + "transcoding_acceleration_vaapi": "VAAPI", + "transcoding_accepted_audio_codecs": "Kodeckët e audios të pranuara", + "transcoding_accepted_audio_codecs_description": "Zgjidh cilët kodeckë audio nuk kanë nevojë të transkodihen. Përdoret vetëm për politika të caktuara transkodimi.", + "transcoding_accepted_containers": "Kontejnerët e pranuar", + "transcoding_accepted_containers_description": "Zgjidh cilët formate kontejneri nuk kanë nevojë të ripakohen në MP4. Përdoret vetëm për politika të caktuara transkodimi.", + "transcoding_accepted_video_codecs": "Kodeckët e videos të pranuara", + "transcoding_accepted_video_codecs_description": "Zgjidh cilët kodeckë video nuk kanë nevojë të transkodihen. Përdoret vetëm për politika të caktuara transkodimi.", + "transcoding_advanced_options_description": "Opsione që shumica e përdoruesve nuk kanë nevojë t'i ndryshojnë", + "transcoding_audio_codec": "Kodeku i audios", + "transcoding_audio_codec_description": "Opus asht opsioni me cilësi ma të lartë, por ka përputhshmëri ma të ulët me pajisje ose softuer të vjetër.", + "transcoding_bitrate_description": "Videot ma të larta se bitrate maksimal ose jo në format të pranuar", + "transcoding_codecs_learn_more": "Për me mësu ma shumë rreth terminologjisë këtu, referoju dokumentacionit FFmpeg për kodekun H.264, kodekun HEVC dhe kodekun VP9.", + "transcoding_constant_quality_mode": "Mënyra e cilësisë konstante", + "transcoding_constant_quality_mode_description": "ICQ asht ma e mirë se CQP, por disa pajisje të përshpejtimit harduerik nuk e mbështesin këtë mënyrë. Ky opsion do të preferojë mënyrën e specifikuar kur përdor kodim bazuar në cilësi. Injorohet nga NVENC pasi nuk mbështet ICQ.", + "transcoding_constant_rate_factor": "Faktori i normës konstante (-crf)", + "transcoding_constant_rate_factor_description": "Niveli i cilësisë së videos. Vlerat tipike janë 23 për H.264, 28 për HEVC, 31 për VP9 dhe 35 për AV1. Vlera ma e ulët asht ma e mirë, por prodhon skedarë ma të mëdhenj.", + "transcoding_disabled_description": "Mos transkodo asnjë video, mund të prish luajtjen në disa klientë", + "transcoding_encoding_options": "Opsionet e kodimit", + "transcoding_encoding_options_description": "Vendos kodeckë, rezolucion, cilësi dhe opsione të tjera për videot e koduara", + "transcoding_hardware_acceleration": "Përshpejtimi harduerik", + "transcoding_hardware_acceleration_description": "Eksperimental: transkodim ma i shpejtë por mund të ulë cilësinë me të njëjtin bitrate", + "transcoding_hardware_decoding": "Dekodimi harduerik", + "transcoding_hardware_decoding_setting_description": "Aktivizon përshpejtimin nga fillimi në fund në vend se të përshpejtojë vetëm kodimin. Mund të mos funksionojë me të gjitha videot.", + "transcoding_max_b_frames": "B-frames maksimale", + "transcoding_max_b_frames_description": "Vlerat ma të larta përmirësojnë efikasitetin e kompresimit, por ngadalësojnë kodimin. Mund të mos jetë i përputhshëm me përshpejtimin harduerik në pajisje të vjetra. 0 çaktivizonte B-frames, ndërsa -1 e vendos këtë vlerë automatikisht.", + "transcoding_max_bitrate": "Bitrate maksimal", + "transcoding_max_bitrate_description": "Vendosja e bitrate-it maksimal mund t'i bëjë madhësitë e skedarëve ma të parashikueshme me kosto të vogël në cilësi. Në 720p, vlerat tipike janë 2600 kbit/s për VP9 ose HEVC, ose 4500 kbit/s për H.264. Çaktivizohet nëse vendoset në 0. Kur nuk specifikohet njësia, supozohet k (kbit/s).", + "transcoding_max_keyframe_interval": "Intervali maksimal i keyframe", + "transcoding_max_keyframe_interval_description": "Vendos distancën maksimale të kornizave ndërmjet keyframe-ve. Vlerat ma të ulëta përkeqësojnë efikasitetin e kompresimit, por përmirësojnë kohët e kërkimit dhe mund të përmirësojnë cilësinë në skenat me lëvizje të shpejtë. 0 e vendos këtë vlerë automatikisht.", + "transcoding_optimal_description": "Videot ma të larta se rezolucioni i synuar ose jo në format të pranuar", + "transcoding_policy": "Politika e transkodimit", + "transcoding_policy_description": "Vendos kur do të transkodihet një video", + "transcoding_preferred_hardware_device": "Pajisja harduerike e preferuar", + "transcoding_preferred_hardware_device_description": "Aplikohet vetëm për VAAPI dhe QSV. Vendos nyjen dri të përdorur për transkodim harduerik.", + "transcoding_preset_preset": "Paravendosja (-preset)", + "transcoding_preset_preset_description": "Shpejtësia e kompresimit. Paravendosjet ma të ngadalta prodhojnë skedarë ma të vegjël dhe rrisin cilësinë kur synon një bitrate të caktuar. VP9 injoron shpejtësi mbi 'faster'.", + "transcoding_realtime": "Transkodimi në kohë reale [EKSPERIMENTAL]", + "transcoding_realtime_description": "Lejon transkodimin të kryhet në kohë reale ndërsa videoja transmetohet. Aktivizon ndërrimin e cilësisë, por mund të shkaktojë vonesë ma të lartë luajtjeje dhe ngecje varësisht nga kapacitetet e serverit.", + "transcoding_realtime_enabled": "Aktivizo transkodimin në kohë reale", + "transcoding_realtime_enabled_description": "Nëse çaktivizohet, serveri do të refuzojë me fillu sesione të reja transkodimi në kohë reale.", + "transcoding_realtime_resolutions": "Rezolucionet", + "transcoding_realtime_resolutions_description": "Rezolucionet e ofruara për transkodimin në kohë reale. Një variant ofrohet vetëm kur rezolucioni i tij nuk është më i madh se burimi. Rezolucionet më të larta mund të shkaktojnë probleme në riprodhim nëse serveri nuk arrin t'i transkodojë mjaftueshëm shpejt.", + "transcoding_realtime_video_codecs": "Kodekë videoje", + "transcoding_realtime_video_codecs_description": "Kodekët e videos të ofruar për transkodimin në kohë reale. Klientët do të zgjedhin opsionin më të mirë që mbështesin gjatë riprodhimit. AV1 është më efikas se HEVC, i cili është më efikas se H.264. Kur përdorni përshpejtimin harduerik, zgjidhni vetëm kodekët që përshpejtuesi mund të kodojë. Kur përdorni transkodimin softuerik, vini re se H.264 është më i shpejtë se AV1, i cili është më i shpejtë se HEVC.", + "transcoding_reference_frames": "Kornizat referencë", + "transcoding_reference_frames_description": "Numri i kornizave për t'u referuar kur kompresohet një kornizë e dhënë. Vlerat ma të larta përmirësojnë efikasitetin e kompresimit, por ngadalësojnë kodimin. 0 e vendos këtë vlerë automatikisht.", + "transcoding_required_description": "Vetëm videot jo në format të pranuar", + "transcoding_settings": "Cilësimet e transkodimit të videos", + "transcoding_settings_description": "Menaxho cilat video të transkodihen dhe si t'i procesosh ato", + "transcoding_target_resolution": "Rezolucioni i synuar", + "transcoding_target_resolution_description": "Rezolucionet ma të larta mund të ruajnë ma shumë detaje por marrin ma shumë kohë për t'u koduar, kanë madhësi skedarësh ma të mëdha dhe mund të reduktojnë reagimin e aplikacionit.", + "transcoding_temporal_aq": "Temporal AQ", + "transcoding_temporal_aq_description": "Aplikohet vetëm për NVENC. Kuantizimi adaptiv temporal rrit cilësinë e skenave me shumë detaje dhe lëvizje të ulët. Mund të mos jetë i përputhshëm me pajisje të vjetra.", + "transcoding_threads": "Threads", + "transcoding_threads_description": "Vlerat ma të larta çojnë në kodim ma të shpejtë, por lënë ma pak hapësirë për serverin me procesuar detyra të tjera ndërsa asht aktiv. Kjo vlerë nuk duhet të jetë ma e madhe se numri i bërthamave CPU. Maksimizon përdorimin nëse vendoset në 0.", + "transcoding_tone_mapping": "Tone-mapping", + "transcoding_tone_mapping_description": "Përpiqet të ruajë pamjen e videove HDR kur konvertohen në SDR. Çdo algoritëm bën kompromise të ndryshme për ngjyrën, detajet dhe ndriçimin. Hable ruan detajet, Mobius ruan ngjyrën dhe Reinhard ruan ndriçimin.", + "transcoding_transcode_policy": "Politika e transkodimit", + "transcoding_transcode_policy_description": "Politika për kur duhet të transkodihet një video. Videot HDR dhe videot me format pikselësh tjetër se YUV 4:2:0 do të transkodihen gjithmonë (përveç nëse transkodimi asht çaktivizuar).", + "transcoding_two_pass_encoding": "Kodim me dy kalime", + "transcoding_two_pass_encoding_setting_description": "Transkodo në dy kalime për me prodhuar video ma mirë të koduara. Kur bitrate maksimal asht aktivizuar (i nevojshëm për të punuar me H.264 dhe HEVC), kjo mënyrë përdor një gamë bitrate bazuar në bitrate maksimal dhe injoron CRF. Për VP9, CRF mund të përdoret nëse bitrate maksimal asht çaktivizuar.", + "transcoding_video_codec": "Kodeku i videos", + "transcoding_video_codec_description": "VP9 ka efikasitet të lartë dhe përputhshmëri web, por merr ma shumë kohë për t'u transkoduar. HEVC funksionon ngjashëm, por ka përputhshmëri ma të ulët web. H.264 asht i përputhshëm gjerësisht dhe i shpejtë për t'u transkoduar, por prodhon skedarë shumë ma të mëdhenj. AV1 asht kodeku ma efikas por mungon mbështetja në pajisje të vjetra.", + "trash_enabled_description": "Aktivizo veçoritë e koshit", + "trash_number_of_days": "Numri i ditëve", + "trash_number_of_days_description": "Numri i ditëve për të mbajtur asetet në kosh para fshirjes përgjithmonë", + "trash_settings": "Cilësimet e koshit", + "trash_settings_description": "Menaxho cilësimet e koshit", + "unlink_all_oauth_accounts": "Shkyç të gjitha llogaritë OAuth", + "unlink_all_oauth_accounts_description": "Mos harro me shkyçë të gjitha llogaritë OAuth para migrimit te një ofrues i ri.", + "unlink_all_oauth_accounts_prompt": "A je i sigurt që dëshiron të shkyçësh të gjitha llogaritë OAuth? Kjo do të rivendosë OAuth ID-në për çdo përdorues dhe nuk mund të zhbëhet.", + "user_cleanup_job": "Pastrimi i përdoruesve", + "user_delete_delay": "Llogaria dhe asetet e {user} do të planifikohen për fshirje të përhershme pas {delay, plural, one {# ditë} other {# ditësh}}.", + "user_delete_delay_settings": "Vonesa e fshirjes", + "user_delete_delay_settings_description": "Numri i ditëve pas heqjes për me fshirë përgjithmonë llogarinë dhe asetet e një përdoruesi. Puna e fshirjes së përdoruesit ekzekutohet në mesnatë për të kontrolluar përdoruesit gati për fshirje. Ndryshimet e këtij cilësimi do të vlerësohen në ekzekutimin tjetër.", + "user_delete_immediately": "Llogaria dhe asetet e {user} do të radhiten për fshirje të përhershme menjëherë.", + "user_delete_immediately_checkbox": "Radho përdoruesin dhe asetet për fshirje të menjëhershme", + "user_details": "Detajet e përdoruesit", + "user_management": "Menaxhimi i përdoruesve", + "user_password_has_been_reset": "Fjalëkalimi i përdoruesit asht rivendosur:", + "user_password_reset_description": "Ju lutem jepja përdoruesit fjalëkalimin e përkohshëm dhe informoje se do të duhet ta ndryshojë fjalëkalimin në hyrjen e tij të ardhshme.", + "user_restore_description": "Llogaria e {user} do të restaurohet.", + "user_restore_scheduled_removal": "Restauro përdoruesin - heqja e planifikuar më {date, date, long}", + "user_settings": "Cilësimet e përdoruesit", + "user_settings_description": "Menaxho cilësimet e përdoruesit", + "user_successfully_removed": "Përdoruesi {email} u hoq me sukses.", + "users_page_description": "Faqja e administratorit për përdoruesit", + "version_check_channel": "Kanali i lëshimit", + "version_check_channel_description": "Zgjidh kanalin e lëshimit për të cilin dëshiron të marrësh njoftime versioni", + "version_check_enabled_description": "Aktivizo kontrollin e versionit", + "version_check_implications": "Veçoria e kontrollit të versionit mbështetet në komunikim periodik me {server}", + "version_check_settings": "Kontrolli i versionit", + "version_check_settings_description": "Aktivizo/çaktivizo njoftimin e versionit të ri", + "video_conversion_job": "Transkodo videot", + "video_conversion_job_description": "Transkodo videot për përputhshmëri ma të gjerë me shfletuesit dhe pajisjet" }, + "admin_email": "Email i administratorit", + "admin_password": "Fjalëkalimi i administratorit", + "administration": "Administrimi", + "advanced": "Të avancuara", + "advanced_settings_clear_image_cache": "Pastro cache-in e imazheve", + "advanced_settings_clear_image_cache_error": "Dështoi pastrimi i cache-it të imazheve", + "advanced_settings_clear_image_cache_success": "U pastrua me sukses {size}", + "advanced_settings_log_level_title": "Niveli i regjistrit: {level}", + "advanced_settings_prefer_remote_subtitle": "Disa pajisje janë shumë të ngadalta për të ngarkuar miniatura nga asetet lokale. Aktivizo këtë cilësim për të ngarkuar imazhe nga distanca.", + "advanced_settings_prefer_remote_title": "Prefero imazhe nga distanca", + "advanced_settings_proxy_headers_subtitle": "Defino header-at proxy që Immich duhet t'i dërgojë me çdo kërkesë rrjeti", + "advanced_settings_proxy_headers_title": "Header-at e personalizuara proxy [EKSPERIMENTAL]", + "advanced_settings_readonly_mode_subtitle": "Aktivizon mënyrën vetëm-lexim ku fotot mund të shikohen vetëm, gjëra si zgjedhja e imazheve të shumta, ndarja, transmetimi, fshirja janë të çaktivizuara. Aktivizo/çaktivizo vetëm-lexim nëpërmjet avatarit të përdoruesit nga ekrani kryesor", + "advanced_settings_readonly_mode_title": "Mënyra vetëm-lexim", + "advanced_settings_sync_remote_deletions_subtitle": "Fshi ose restauro automatikisht një aset në këtë pajisje kur kjo veprim kryhet në web", + "advanced_settings_sync_remote_deletions_title": "Sinkronizo fshirjet nga distanca [EKSPERIMENTAL]", + "advanced_settings_tile_subtitle": "Cilësimet e avancuara të përdoruesit", + "advanced_settings_troubleshooting_subtitle": "Aktivizo veçori shtesë për zgjidhjen e problemeve", + "advanced_settings_troubleshooting_title": "Zgjidhja e problemeve", + "age_months": "Mosha {months, plural, one {# muaj} other {# muaj}}", + "age_year_months": "Mosha 1 vit, {months, plural, one {# muaj} other {# muaj}}", + "age_years": "{years, plural, other {Mosha #}}", + "album": "Album", + "album_added": "Albumi u shtua", + "album_added_notification_setting_description": "Merr njoftim me email kur shtohet në një album të ndarë", + "album_cover_updated": "Kopertina e albumit u përditësua", + "album_delete_confirmation": "A je i sigurt që dëshiron të fshish albumin {album}?", + "album_delete_confirmation_description": "Nëse ky album asht i ndarë, përdoruesit e tjerë nuk do të mund ta aksesojnë ma.", + "album_deleted": "Albumi u fshi", + "album_info_updated": "Informacioni i albumit u përditësua", + "album_name": "Emri i albumit", + "album_options": "Opsionet e albumit", + "album_remove_user": "Hiq përdoruesin?", + "album_remove_user_confirmation": "A je i sigurt që dëshiron të heqësh {user}?", + "album_search_not_found": "Nuk u gjet asnjë album që përputhet me kërkimin tënd", + "album_share_no_users": "Duket se e ke ndarë këtë album me të gjithë përdoruesit ose nuk ke asnjë përdorues me të cilin të ndash.", + "album_summary": "Përmbledhja e albumit", + "album_updated": "Albumi u përditësua", + "album_updated_setting_description": "Merr njoftim me email kur një album i ndarë ka asete të reja", + "album_upload_assets": "Ngarko asete nga kompjuteri yt dhe shto në album", + "album_viewer_appbar_share_err_delete": "Dështoi fshirja e albumit", + "album_viewer_page_share_add_users": "Shto përdorues", + "album_with_link_access": "Lejo këdo me lidhjen të shohë fotot dhe njerëzit në këtë album.", + "albums": "Albumet", + "albums_count": "{count, plural, one {{count, number} Album} other {{count, number} Albume}}", + "albums_default_sort_order": "Rendi i parazgjedhur i albumeve", + "albums_default_sort_order_description": "Rendi fillestar i aseteve kur krijohen albume të reja.", + "albums_feature_description": "Koleksione asetesh që mund të ndahen me përdoruesit e tjerë.", + "albums_on_device_count": "Albumet në pajisje ({count})", + "all": "Të gjithë", + "all_albums": "Të gjitha albumet", + "all_people": "Të gjithë njerëzit", + "all_photos": "Të gjitha fotot", + "all_videos": "Të gjitha videot", + "allow_dark_mode": "Lejo mënyrën e errët", + "allow_public_user_to_download": "Lejo përdoruesin publik të shkarkojë", + "allow_public_user_to_upload": "Lejo përdoruesin publik të ngarkojë", + "allowed": "I lejuar", + "alt_text_qr_code": "Imazh i kodit QR", + "always_keep": "Mbaj gjithmonë", + "always_keep_photos_hint": "Lirimi i hapësirës do t'i mbajë të gjitha fotot në këtë pajisje.", + "always_keep_videos_hint": "Lirimi i hapësirës do t'i mbajë të gjitha videot në këtë pajisje.", + "api_key": "Çelësi API", + "api_key_description": "Kjo vlerë do të tregohet vetëm një herë. Sigurohu me e kopjuar para se të mbyllësh dritaren.", + "api_key_empty": "Emri i çelësit API nuk duhet të jetë bosh", + "api_keys": "Çelësat API", + "app_architecture_variant": "Varianta (Arkitektura)", + "app_bar_signout_dialog_content": "A je i sigurt që dëshiron të dalësh?", + "app_bar_signout_dialog_title": "Dil", + "app_download_links": "Lidhje shkarkimi të aplikacionit", + "app_settings": "Cilësimet e aplikacionit", + "app_stores": "Dyqanet e aplikacioneve", + "app_update_available": "Ka një përditësim të aplikacionit", + "appears_in": "Shfaqet në", + "apply_count": "Zbato ({count, number})", + "archive": "Arkiv", + "archive_action_prompt": "{count} u shtua në Arkiv", + "archive_or_unarchive_photo": "Arkivo ose çarkivo foton", + "archive_size": "Madhësia e arkivit", + "archive_size_description": "Konfiguro madhësinë e arkivit për shkarkimet (në GiB)", + "archived": "Arkivuar", + "archived_count": "{count, plural, other {Arkivuar #}}", + "are_these_the_same_person": "A janë këta i njëjti person?", + "are_you_sure_to_do_this": "Je i sigurt që dëshiron ta bësh këtë?", + "asset_added_to_album": "U shtua në album", + "asset_adding_to_album": "Po shtohet në album…", + "asset_created": "Aseti u krijua", + "asset_day_count": "{date}: {count, plural, one {# aset} other {# asete}}", + "asset_description_updated": "Përshkrimi i asetit u përditësua", + "asset_hashing": "Po llogaritet hash-i…", + "asset_list_group_by_sub_title": "Grupo sipas", + "asset_list_layout_settings_group_by": "Grupo asetet sipas", + "asset_list_layout_settings_group_by_month_day": "Muaj + ditë", + "asset_list_layout_sub_title": "Struktura", + "asset_list_settings_subtitle": "Cilësimet e strukturës së rrjetës së fotove", + "asset_list_settings_title": "Rrjetë fotosh", + "asset_not_found_on_device_android": "Aseti nuk u gjet në pajisje", + "asset_not_found_on_device_ios": "Aseti nuk u gjet në pajisje. Nëse po përdor iCloud, aseti mund të jetë i paarritshëm për shkak të një skedari të dëmtuar të ruajtur në iCloud", + "asset_not_found_on_icloud": "Aseti nuk u gjet në iCloud. Aseti mund të jetë i paarritshëm për shkak të një skedari të dëmtuar të ruajtur në iCloud", + "asset_offline": "Aseti është jashtë linje", + "asset_offline_description": "Ky aset i jashtëm nuk gjendet më në disk. Të lutem kontakto administratorin tënd të Immich për ndihmë.", + "asset_skipped": "U anashkalua", + "asset_skipped_in_trash": "Në kosh", + "asset_troubleshoot": "Zgjidhja e problemeve të asetit", + "asset_uploaded": "Ngarkuar", + "asset_uploading": "Po ngarkohet…", + "asset_viewer_settings_subtitle": "Menaxho cilësimet e shikuesit të galerisë tënde", + "asset_viewer_settings_title": "Shikuesi i asetit", + "assets": "Asete", + "assets_added_to_album_count": "U shtuan {count, plural, one {# aset} other {# asete}} në album", + "assets_added_to_album_partial_count": "U shtuan {successCount} nga {totalCount} {totalCount, plural, one {aset} other {asete}} në album", + "assets_added_to_albums_count": "U shtuan {assetTotal, plural, one {# aset} other {# asete}} në {albumTotal, plural, one {# album} other {# albume}}", + "assets_cannot_be_added_to_album_count": "{count, plural, one {Aseti} other {Asetet}} nuk mund të shtohen në album", + "assets_cannot_be_added_to_albums": "{count, plural, one {Aseti} other {Asetet}} nuk mund të shtohen në asnjë nga albumet", + "assets_count": "{count, plural, one {# aset} other {# asete}}", + "assets_moved_to_trash_count": "U zhvendosën {count, plural, one {# aset} other {# asete}} në kosh", + "assets_permanently_deleted_count": "U fshinë përgjithmonë {count, plural, one {# aset} other {# asete}}", + "assets_removed_count": "U hoqën {count, plural, one {# aset} other {# asete}}", + "assets_restore_confirmation": "Je i sigurt që dëshiron t'i rikthesh të gjitha asetet e koshit? Nuk mund ta zhbësh këtë veprim! Vini re se asetet jashtë linje nuk mund të rikthehen në këtë mënyrë.", + "assets_restored_count": "U rikthyen {count, plural, one {# aset} other {# asete}}", + "assets_trashed": "{count} aset(e) u hodhën në kosh", + "assets_trashed_count": "U hodhën në kosh {count, plural, one {# aset} other {# asete}}", + "assets_were_part_of_album_count": "{count, plural, one {Aseti ishte tashmë} other {Asetet ishin tashmë}} pjesë e albumit", + "assets_were_part_of_albums_count": "{count, plural, one {Aseti ishte tashmë} other {Asetet ishin tashmë}} pjesë e albumeve", + "authorized_devices": "Pajisje të autorizuara", + "automatic_endpoint_switching_subtitle": "Lidhu në rrjet lokal përmes Wi-Fi-t të caktuar kur është i disponueshëm dhe përdor lidhje alternative gjetkë", + "automatic_endpoint_switching_title": "Ndërrim automatik i URL-së", + "autoplay_slideshow": "Riprodho automatikisht shfaqjen e diapozitivave", + "back": "Mbrapa", + "back_close_deselect": "Kthehu, mbyll ose çzgjidh", + "background_location_permission": "Leje vendndodhjeje në sfond", + "background_location_permission_content": "Për të ndërruar rrjete kur ekzekutohet në sfond, Immich duhet *gjithmonë* të ketë qasje të saktë në vendndodhje që aplikacioni të mund të lexojë emrin e rrjetit Wi-Fi", + "background_options": "Opsionet e sfondit", + "backup": "Kopje rezervë", + "backup_album_selection_page_albums_tap": "Trokit për të përfshirë, trokit dy herë për të përjashtuar", + "backup_album_selection_page_assets_scatter": "Asetet mund të shpërndahen nëpër shumë albume. Kështu, albumet mund të përfshihen ose përjashtohen gjatë procesit të kopjimit rezervë.", + "backup_album_selection_page_select_albums": "Zgjidh albume", + "backup_album_selection_page_selection_info": "Informacioni i përzgjedhjes", + "backup_albums_sync": "Sinkronizimi i albumeve të kopjimit rezervë", + "backup_background_service_complete_notification": "Kopja rezervë e asetit u përfundua", + "backup_background_service_default_notification": "Po kontrollohet për asete të reja…", + "backup_background_service_in_progress_notification": "Po bëhet kopja rezervë e aseteve të tua…", + "backup_controller_page_albums": "Albume të kopjimit rezervë", + "backup_controller_page_background_battery_info_link": "Më trego si", + "backup_controller_page_background_battery_info_message": "Për përvojën më të mirë të kopjimit rezervë në sfond, të lutem çaktivizo çdo optimizim baterie që kufizon aktivitetin në sfond për Immich.\n\nMeqenëse kjo varet nga pajisja, të lutem kërko informacionin e nevojshëm për prodhuesin e pajisjes tënde.", + "backup_controller_page_background_battery_info_ok": "Në rregull", + "backup_controller_page_background_battery_info_title": "Optimizime baterie", + "backup_controller_page_background_delay": "Vono kopjimin rezervë të aseteve të reja: {duration}", + "backup_controller_page_backup": "Kopje rezervë", + "backup_controller_page_backup_selected": "Përzgjedhur: ", + "backup_controller_page_backup_sub": "Fotot dhe videot me kopje rezervë", + "backup_controller_page_excluded": "Përjashtuar: ", + "backup_controller_page_none_selected": "Asnjë i përzgjedhur", + "backup_controller_page_remainder": "Pjesa e mbetur", + "backup_controller_page_remainder_sub": "Fotot dhe videot e mbetura për t'u kopjuar nga përzgjedhja", + "backup_controller_page_server_storage": "Ruajtja e serverit", + "backup_controller_page_storage_format": "{used} nga {total} të përdorura", + "backup_controller_page_to_backup": "Albumet që do të kopjohen rezervë", + "backup_controller_page_total_sub": "Të gjitha fotot dhe videot unike nga albumet e përzgjedhura", + "backup_error_sync_failed": "Sinkronizimi dështoi. Nuk mund të përpunohet kopja rezervë.", + "backup_info_card_assets": "asete", + "backup_options": "Opsionet e kopjimit rezervë", + "backup_settings_subtitle": "Menaxho cilësimet e ngarkimit", + "backward": "Mbrapa", + "battery_optimization_backup_reliability": "Çaktivizimi i optimizimeve të baterisë mund të përmirësojë besueshmërinë e kopjimit rezervë në sfond", + "biometric_auth_enabled": "Vërtetimi biometrik u aktivizua", + "biometric_locked_out": "Je bllokuar nga vërtetimi biometrik", + "biometric_no_options": "Nuk ka opsione biometrike të disponueshme", + "biometric_not_available": "Vërtetimi biometrik nuk është i disponueshëm në këtë pajisje", + "birthdate_set_description": "Data e lindjes përdoret për të llogaritur moshën e këtij personi në kohën e një fotoje.", + "blurred_background": "Sfond i turbullt", + "browse_templates": "Shfleto shabllonet", + "bugs_and_feature_requests": "Defekte & kërkesa për veçori", + "build": "Ndërto", + "build_image": "Ndërto imazhin", + "bulk_delete_duplicates_confirmation": "Je i sigurt që dëshiron të fshish në grup {count, plural, one {# aset duplikat} other {# asete duplikate}}? Kjo do të mbajë asetin më të madh të çdo grupi dhe do të fshijë përgjithmonë të gjithë duplikatët e tjerë. Nuk mund ta zhbësh këtë veprim!", + "bulk_keep_duplicates_confirmation": "Je i sigurt që dëshiron të mbash {count, plural, one {# aset duplikat} other {# asete duplikate}}? Kjo do të zgjidhë të gjitha grupet e duplikatëve pa fshirë asgjë.", + "bulk_trash_duplicates_confirmation": "Je i sigurt që dëshiron të hedhësh në kosh në grup {count, plural, one {# aset duplikat} other {# asete duplikate}}? Kjo do të mbajë asetin më të madh të çdo grupi dhe do të hedhë në kosh të gjithë duplikatët e tjerë.", + "buy": "Bli Immich", + "camera": "Kamera", + "camera_brand": "Marka e kamerës", + "camera_model": "Modeli i kamerës", + "cancel": "Anulo", + "cancel_search": "Anulo kërkimin", + "canceled": "U anulua", + "canceling": "Po anulohet", + "cannot_merge_people": "Nuk mund të bashkohen personat", + "cannot_undo_this_action": "Nuk mund ta zhbësh këtë veprim!", + "cannot_update_the_description": "Nuk mund të përditësohet përshkrimi", + "cast": "Transmeto", + "cast_description": "Konfiguro destinacionet e disponueshme të transmetimit", + "change": "Ndrysho", + "change_date": "Ndrysho datën", + "change_description": "Ndrysho përshkrimin", + "change_display_order": "Ndrysho renditjen e shfaqjes", + "change_location": "Ndrysho vendndodhjen", + "change_name": "Ndrysho emrin", + "change_name_successfully": "Emri u ndryshua me sukses", + "change_password": "Ndrysho fjalëkalimin", + "change_password_description": "Kjo është ose hera e parë që hyn në sistem ose është bërë një kërkesë për të ndryshuar fjalëkalimin tënd. Të lutem vendos fjalëkalimin e ri më poshtë.", + "change_password_form_confirm_password": "Konfirmo fjalëkalimin", + "change_password_form_description": "Përshëndetje {name},\n\nKjo është ose hera e parë që hyn në sistem ose është bërë një kërkesë për të ndryshuar fjalëkalimin tënd. Të lutem vendos fjalëkalimin e ri më poshtë.", + "change_password_form_log_out": "Dil nga të gjitha pajisjet e tjera", + "change_password_form_log_out_description": "Rekomandohet të dalësh nga të gjitha pajisjet e tjera", + "change_password_form_new_password": "Fjalëkalim i ri", + "change_password_form_password_mismatch": "Fjalëkalimet nuk përputhen", + "change_password_form_reenter_new_password": "Rivendos fjalëkalimin e ri", + "change_pin_code": "Ndrysho kodin PIN", + "change_your_password": "Ndrysho fjalëkalimin tënd", + "changed_visibility_successfully": "Dukshmëria u ndryshua me sukses", + "charging": "Po karikohet", + "charging_requirement_mobile_backup": "Kopjimi rezervë në sfond kërkon që pajisja të jetë duke u karikuar", + "check_logs": "Kontrollo regjistrat", + "checksum": "Checksum", + "choose": "Zgjidh", + "choose_matching_people_to_merge": "Zgjidh personat përputhës për t'i bashkuar", + "city": "Qyteti", + "cleanup_confirm_description": "Immich gjeti {count} asete (të krijuara para {date}) të ruajtura në mënyrë të sigurt me kopje rezervë në server. Të hiqen kopjet lokale nga kjo pajisje?", + "cleanup_confirm_prompt_title": "Të hiqet nga kjo pajisje?", + "cleanup_deleted_assets": "U zhvendosën {count} asete në koshin e pajisjes", + "cleanup_deleting": "Po zhvendoset në kosh...", + "cleanup_found_assets": "U gjetën {count} asete me kopje rezervë", + "cleanup_found_assets_with_size": "U gjetën {count} asete me kopje rezervë ({size})", + "cleanup_icloud_shared_albums_excluded": "Albumet e ndara të iCloud përjashtohen nga skanimi", + "cleanup_no_assets_found": "Nuk u gjetën asete që përputhen me kriteret e mësipërme. Lirimi i hapësirës mund të heqë vetëm asetet që janë ruajtur me kopje rezervë në server", + "cleanup_preview_title": "Asete për t'u hequr ({count})", + "cleanup_step3_description": "Skano për asete me kopje rezervë që përputhen me cilësimet e tua të datës dhe mbajtjes.", + "cleanup_step4_summary": "{count} asete (të krijuara para {date}) për t'u hequr nga pajisja jote lokale. Fotot do të mbeten të arritshme nga aplikacioni Immich.", + "cleanup_trash_hint": "Për të rikuperuar plotësisht hapësirën e ruajtjes, hap aplikacionin e galerisë së sistemit dhe zbraz koshin", + "clear": "Pastro", + "clear_all": "Pastro të gjitha", + "clear_all_recent_searches": "Pastro të gjitha kërkimet e fundit", + "clear_failed_count": "Pastro të dështuarat ({count})", + "clear_file_cache": "Pastro memorien e skedarëve", + "clear_message": "Pastro mesazhin", + "clear_value": "Pastro vlerën", + "client_cert_import": "Importo", + "client_cert_import_success_msg": "Certifikata e klientit u importua", + "client_cert_invalid_msg": "Skedar certifikate i pavlefshëm ose fjalëkalim i gabuar", + "client_cert_password_message": "Vendos fjalëkalimin për këtë certifikatë", + "client_cert_password_title": "Fjalëkalimi i certifikatës", + "client_cert_remove_msg": "Certifikata e klientit u hoq", + "client_cert_subtitle": "Mbështet vetëm formatin PKCS12 (.p12, .pfx). Importimi/heqja e certifikatës është e disponueshme vetëm para hyrjes", + "client_cert_title": "Certifikatë klienti SSL [EKSPERIMENTALE]", + "close": "Mbyll", + "collapse": "Palos", + "collapse_all": "Palos të gjitha", + "color": "Ngjyra", + "command": "Komandë", + "command_palette_prompt": "Gjej shpejt faqe, veprime ose komanda", + "command_palette_to_close": "për të mbyllur", + "command_palette_to_navigate": "për të hyrë", + "command_palette_to_select": "për të zgjedhur", + "command_palette_to_show_all": "për të shfaqur të gjitha", + "comment_deleted": "Komenti u fshi", + "comment_options": "Opsionet e komentit", + "comments_and_likes": "Komente & pëlqime", + "comments_are_disabled": "Komentet janë të çaktivizuara", + "common_create_new_album": "Krijo album të ri", + "completed": "U përfundua", + "configuration": "Konfigurimi", + "confirm": "Konfirmo", + "confirm_admin_password": "Konfirmo fjalëkalimin e administratorit", + "confirm_delete_face": "Je i sigurt që dëshiron të fshish fytyrën {name} nga aseti?", + "confirm_delete_shared_link": "Je i sigurt që dëshiron të fshish këtë lidhje të ndarë?", + "confirm_keep_this_delete_others": "Të gjitha asetet e tjera në pirg do të fshihen përveç këtij aseti. Je i sigurt që dëshiron të vazhdosh?", + "confirm_new_pin_code": "Konfirmo kodin e ri PIN", + "confirm_password": "Konfirmo fjalëkalimin", + "confirm_tag_face": "Dëshiron ta etiketosh këtë fytyrë si {name}?", + "confirm_tag_face_unnamed": "Dëshiron ta etiketosh këtë fytyrë?", + "connected_device": "Pajisje e lidhur", + "connected_to": "Lidhur me", + "contain": "Përmbaj", + "context": "Konteksti", + "continue": "Vazhdo", + "control_bottom_app_bar_add_tags": "Shto etiketa", + "control_bottom_app_bar_delete_from_local": "Fshi nga pajisja", + "control_bottom_app_bar_edit_location": "Modifiko vendndodhjen", + "control_bottom_app_bar_edit_time": "Modifiko datën & orën", + "control_bottom_app_bar_trash_from_immich": "Zhvendos në kosh", + "copied_image_to_clipboard": "Imazhi u kopjua në kujtesën e fragmenteve.", + "copied_to_clipboard": "U kopjua në kujtesën e fragmenteve!", + "copy_error": "Gabim kopjimi", + "copy_image": "Kopjo imazhin", + "copy_json": "Kopjo JSON-in", + "copy_link": "Kopjo lidhjen", + "copy_link_to_clipboard": "Kopjo lidhjen në kujtesën e fragmenteve", + "copy_password": "Kopjo fjalëkalimin", + "copy_to_clipboard": "Kopjo në kujtesën e fragmenteve", + "country": "Shteti", + "cover": "Kopertina", + "covers": "Kopertinat", + "create": "Krijo", + "create_album": "Krijo album", + "create_album_page_untitled": "Pa titull", + "create_api_key": "Krijo çelës API", + "create_first_workflow": "Krijo rrjedhën e parë të punës", + "create_library": "Krijo bibliotekë", + "create_link": "Krijo lidhje", + "create_link_to_share": "Krijo lidhje për të ndarë", + "create_link_to_share_description": "Lejo këdo që ka lidhjen të shohë foton(t) e përzgjedhura", + "create_new": "KRIJO TË RE", + "create_new_person": "Krijo person të ri", + "create_new_person_hint": "Cakto asetet e përzgjedhura te një person i ri", + "create_new_user": "Krijo përdorues të ri", + "create_person": "Krijo person", + "create_person_subtitle": "Shto një emër te fytyra e përzgjedhur për të krijuar dhe etiketuar personin e ri", + "create_shared_album_page_share_add_assets": "SHTO ASETE", + "create_shared_album_page_share_select_photos": "Zgjidh foto", + "create_shared_link": "Krijo lidhje të ndarë", + "create_tag": "Krijo etiketë", + "create_tag_description": "Krijo një etiketë të re. Për etiketa të ndërthurura, të lutem vendos shtegun e plotë të etiketës duke përfshirë vijat e pjerrëta.", + "create_user": "Krijo përdorues", + "create_workflow": "Krijo rrjedhë pune", + "created": "Krijuar", + "created_at": "Krijuar", + "creating_linked_albums": "Po krijohen albume të lidhura...", + "crop": "Prit", + "crop_aspect_ratio_free": "I lirë", + "crop_aspect_ratio_original": "Origjinal", + "crop_aspect_ratio_square": "Katror", + "current_device": "Pajisja aktuale", + "current_pin_code": "Kodi aktual PIN", + "current_server_address": "Adresa aktuale e serverit", + "custom_date": "Datë e personalizuar", + "custom_locale": "Lokale e personalizuar", + "custom_locale_description": "Formato datat, orët dhe numrat bazuar në gjuhën dhe rajonin e përzgjedhur", + "cutoff_date_description": "Mbaj fotot nga…", + "cutoff_day": "{count, plural, one {ditë} other {ditë}}", + "cutoff_year": "{count, plural, one {vit} other {vjet}}", + "dark": "E errët", + "dark_theme": "Kalo në temën e errët", + "date": "Data", + "date_after": "Data pas", + "date_and_time": "Data dhe ora", + "date_before": "Data para", + "date_of_birth": "Data e lindjes", + "date_of_birth_saved": "Data e lindjes u ruajt me sukses", + "date_range": "Intervali i datave", + "date_time_original": "Data/Ora origjinale", + "day": "Ditë", + "days": "Ditë", + "deduplicate_all": "Deduplikoji të gjitha", + "default_quality_subtitle": "Cilësia e përdorur kur trokitet te ndarja. Shtyp gjatë butonin e ndarjes për të zgjedhur çdo herë.", + "default_share_quality": "Cilësia e paracaktuar e ndarjes", + "delete": "Fshi", + "delete_action_confirmation_message": "Je i sigurt që dëshiron të fshish këtë aset? Ky veprim do ta zhvendosë asetin në koshin e serverit dhe do të të pyesë nëse dëshiron ta fshish edhe në mënyrë lokale", + "delete_action_prompt": "{count} u fshinë", + "delete_album": "Fshi albumin", + "delete_api_key_prompt": "Je i sigurt që dëshiron të fshish këtë çelës API?", + "delete_dialog_alert": "Këto artikuj do të fshihen përgjithmonë nga Immich dhe nga pajisja jote", + "delete_dialog_alert_local": "Këto artikuj do të hiqen përgjithmonë nga pajisja jote, por do të mbeten të disponueshëm në serverin Immich", + "delete_dialog_alert_local_non_backed_up": "Disa nga artikujt nuk janë ruajtur me kopje rezervë në Immich dhe do të hiqen përgjithmonë nga pajisja jote", + "delete_dialog_title": "Fshi përgjithmonë", + "delete_duplicates_confirmation": "Je i sigurt që dëshiron t'i fshish përgjithmonë këta duplikatë?", + "delete_face": "Fshi fytyrën", + "delete_key": "Fshi çelësin", + "delete_library": "Fshi bibliotekën", + "delete_link": "Fshi lidhjen", + "delete_local_action_prompt": "{count} u fshinë në mënyrë lokale", + "delete_local_dialog_ok_backed_up_only": "Fshi vetëm ato me kopje rezervë", + "delete_local_dialog_ok_force": "Fshi gjithsesi", + "delete_others": "Fshi të tjerat", + "delete_permanently": "Fshi përgjithmonë", + "delete_permanently_action_prompt": "{count} u fshinë përgjithmonë", + "delete_shared_link": "Fshi lidhjen e ndarë", + "delete_shared_link_dialog_title": "Fshi lidhjen e ndarë", + "delete_tag": "Fshi etiketën", + "delete_tag_confirmation_prompt": "Je i sigurt që dëshiron të fshish etiketën {tagName}?", + "delete_user": "Fshi përdoruesin", + "deleted_shared_link": "Lidhja e ndarë u fshi", + "description": "Përshkrimi", + "deselect_all": "Çzgjidh të gjitha", + "details": "Detajet", + "direction": "Drejtimi", + "disable": "Çaktivizo", + "disabled": "I çaktivizuar", + "discord": "Discord", + "discover": "Zbulo", + "discovered_devices": "Pajisjet e zbuluara", + "dismiss_all_errors": "Hiqi të gjitha gabimet", + "display_options": "Opsionet e shfaqjes", + "display_order": "Renditja e shfaqjes", + "display_original_photos": "Shfaq fotot origjinale", + "display_original_photos_setting_description": "Preferohet të shfaqet fotoja origjinale gjatë shikimit të një aseti në vend të miniaturave kur aseti origjinal është i pajtueshëm me ueb-in. Kjo mund të rezultojë në shpejtësi më të ngadalta të shfaqjes së fotove.", + "do_not_show_again": "Mos e shfaq më këtë mesazh", + "documentation": "Dokumentimi", + "done": "U krye", + "download": "Shkarko", + "download_canceled": "Shkarkimi u anulua", + "download_complete": "Shkarkimi u përfundua", + "download_enqueue": "Shkarkimi u vendos në radhë", + "download_failed": "Shkarkimi dështoi", + "download_finished": "Shkarkimi përfundoi", + "download_include_embedded_motion_videos": "Video të inkorporuara", + "download_include_embedded_motion_videos_description": "Përfshi videot e inkorporuara në fotot me lëvizje si një skedar të veçantë", + "download_notfound": "Shkarkimi nuk u gjet", "download_original": "Shkarko origjinalin", "download_paused": "Shkarkimi u pezullua", "download_settings": "Shkarko", + "download_settings_description": "Menaxho cilësimet që lidhen me shkarkimin e aseteve", "download_waiting_to_retry": "Duke pritur për ta provuar përsëri", "downloading": "Duke u shkarkuar", "downloading_asset_filename": "Duke shkarkuar asetin {filename}", "downloading_from_icloud": "Duke shkarkuar nga iCloud", "downloading_media": "Duke shkarkuar median", + "drag_to_reorder": "Tërhiq për të rirenditur", + "drop_files_to_upload": "Lësho skedarët kudo për t'i ngarkuar", + "duplicate": "Duplikat", + "duplicate_workflow": "Dupliko rrjedhën e punës", + "duplicates": "Duplikatë", + "duplicates_description": "Zgjidh çdo grup duke treguar cilët, nëse ka, janë duplikatë.", + "duration": "Kohëzgjatja", + "edit": "Modifiko", + "edit_album": "Modifiko albumin", + "edit_avatar": "Modifiko avatarin", + "edit_birthday": "Modifiko ditëlindjen", + "edit_date": "Modifiko datën", + "edit_date_and_time": "Modifiko datën dhe orën", + "edit_date_and_time_action_prompt": "{count} data dhe ora u modifikuan", + "edit_date_and_time_by_offset": "Ndrysho datën sipas kompensimit", + "edit_description": "Modifiko përshkrimin", + "edit_exclusion_pattern": "Modifiko modelin e përjashtimit", + "edit_faces": "Modifiko fytyrat", + "edit_key": "Modifiko çelësin", + "edit_link": "Modifiko lidhjen", + "edit_location": "Modifiko vendndodhjen", + "edit_location_action_prompt": "{count} vendndodhje u modifikua", + "edit_location_dialog_title": "Vendndodhja", + "edit_name": "Modifiko emrin", + "edit_people": "Modifiko personat", + "edit_tag": "Modifiko etiketën", + "edit_title": "Modifiko titullin", + "edit_user": "Modifiko përdoruesin", + "edit_workflow": "Modifiko rrjedhën e punës", + "editor": "Modifikuesi", + "editor_discard_edits_confirm": "Hidhi modifikimet", + "editor_discard_edits_prompt": "Ke modifikime të paruajtura. Je i sigurt që dëshiron t'i hedhësh?", + "editor_discard_edits_title": "Të hidhen modifikimet?", + "editor_edits_applied_error": "Zbatimi i modifikimeve dështoi", + "editor_edits_applied_success": "Modifikimet u zbatuan me sukses", + "editor_flip_horizontal": "Kthe horizontalisht", + "editor_flip_vertical": "Kthe vertikalisht", + "editor_handle_corner": "Doreza e cepit {corner, select, top_left {sipër-majtas} top_right {sipër-djathtas} bottom_left {poshtë-majtas} bottom_right {poshtë-djathtas} other {A}}", + "editor_handle_edge": "Doreza e skajit {edge, select, top {sipër} bottom {poshtë} left {majtas} right {djathtas} other {An}}", + "editor_orientation": "Orientimi", + "editor_reset_all_changes": "Rivendos ndryshimet", + "editor_rotate_left": "Rrotullo 90° në drejtim kundërorar", + "editor_rotate_right": "Rrotullo 90° në drejtim orar", + "email": "Email", + "email_notifications": "Njoftime me email", + "empty_folder": "Kjo dosje është bosh", + "empty_trash": "Zbraz koshin", + "empty_trash_confirmation": "Je i sigurt që dëshiron ta zbrazësh koshin? Kjo do të heqë përgjithmonë të gjitha asetet në kosh nga Immich.\nNuk mund ta zhbësh këtë veprim!", + "enable": "Aktivizo", + "enable_backup": "Aktivizo kopjimin rezervë", + "enable_biometric_auth_description": "Vendos kodin tënd PIN për të aktivizuar vërtetimin biometrik", + "enabled": "Aktivizuar", + "end_date": "Data e mbarimit", + "enqueued": "Në radhë", + "enter_wifi_name": "Vendos emrin e Wi-Fi-t", + "enter_your_pin_code": "Vendos kodin tënd PIN", + "enter_your_pin_code_subtitle": "Vendos kodin tënd PIN për të hyrë te dosja e kyçur", + "error": "Gabim", + "error_delete_face": "Gabim gjatë fshirjes së fytyrës nga aseti", + "error_loading_albums": "Gabim gjatë ngarkimit të albumeve", + "error_loading_image": "Gabim gjatë ngarkimit të imazhit", + "error_loading_partners": "Gabim gjatë ngarkimit të partnerëve: {error}", + "error_retrieving_asset_information": "Gabim gjatë marrjes së informacionit të asetit", + "error_saving_image": "Gabim: {error}", + "error_tag_face_bounding_box": "Gabim gjatë etiketimit të fytyrës — nuk merren dot koordinatat e kutisë kufizuese", + "error_title": "Gabim — Diçka shkoi keq", + "error_while_navigating": "Gabim gjatë navigimit te aseti", + "errors": { + "cannot_navigate_next_asset": "Nuk mund të navigohet te aseti tjetër", + "cannot_navigate_previous_asset": "Nuk mund të navigohet te aseti i mëparshëm", + "cant_apply_changes": "Nuk mund të zbatohen ndryshimet", + "cant_change_activity": "Nuk mund të {enabled, select, true {çaktivizohet} other {aktivizohet}} aktiviteti", + "cant_change_asset_favorite": "Nuk mund të ndryshohet i preferuari për asetin", + "cant_change_metadata_assets_count": "Nuk mund të ndryshohen meta të dhënat e {count, plural, one {# aseti} other {# aseteve}}", + "cant_get_faces": "Nuk mund të merren fytyrat", + "cant_get_number_of_comments": "Nuk mund të merret numri i komenteve", + "cant_search_people": "Nuk mund të kërkohen persona", + "cant_search_places": "Nuk mund të kërkohen vende", + "error_adding_assets_to_album": "Gabim gjatë shtimit të aseteve në album", + "error_adding_users_to_album": "Gabim gjatë shtimit të përdoruesve në album", + "error_deleting_shared_user": "Gabim gjatë fshirjes së përdoruesit të ndarë", + "error_downloading": "Gabim gjatë shkarkimit të {filename}", + "error_hiding_buy_button": "Gabim gjatë fshehjes së butonit të blerjes", + "error_removing_assets_from_album": "Gabim gjatë heqjes së aseteve nga albumi, kontrollo konsolën për më shumë detaje", + "error_selecting_all_assets": "Gabim gjatë përzgjedhjes së të gjitha aseteve", + "exclusion_pattern_already_exists": "Ky model përjashtimi ekziston tashmë.", + "failed_to_create_album": "Krijimi i albumit dështoi", + "failed_to_create_shared_link": "Krijimi i lidhjes së ndarë dështoi", + "failed_to_edit_shared_link": "Modifikimi i lidhjes së ndarë dështoi", + "failed_to_get_people": "Marrja e personave dështoi", + "failed_to_keep_this_delete_others": "Ruajtja e këtij aseti dhe fshirja e aseteve të tjera dështoi", + "failed_to_load_asset": "Ngarkimi i asetit dështoi", + "failed_to_load_assets": "Ngarkimi i aseteve dështoi", + "failed_to_load_notifications": "Ngarkimi i njoftimeve dështoi", + "failed_to_load_people": "Ngarkimi i personave dështoi", + "failed_to_remove_product_key": "Heqja e çelësit të produktit dështoi", + "failed_to_reset_pin_code": "Rivendosja e kodit PIN dështoi", + "failed_to_stack_assets": "Stivosja e aseteve dështoi", + "failed_to_tag_assets": "Etiketimi i aseteve dështoi", + "failed_to_unstack_assets": "Çstivosja e aseteve dështoi", + "failed_to_update_notification_status": "Përditësimi i statusit të njoftimit dështoi", + "incorrect_email_or_password": "Email ose fjalëkalim i pasaktë", + "library_folder_already_exists": "Ky shteg importimi ekziston tashmë.", + "page_not_found": "Faqja nuk u gjet", + "paths_validation_failed": "{paths, plural, one {# shteg dështoi} other {# shtigje dështuan}} në vlerësim", + "profile_picture_transparent_pixels": "Fotot e profilit nuk mund të kenë piksele transparente. Të lutem zmadho dhe/ose zhvendos imazhin.", + "quota_higher_than_disk_size": "Vendose një kuotë më të lartë se madhësia e diskut", + "something_went_wrong": "Diçka shkoi keq", + "unable_to_add_album_users": "Nuk arrihet të shtohen përdorues në album", + "unable_to_add_assets_to_shared_link": "Nuk arrihet të shtohen asete te lidhja e ndarë", + "unable_to_add_comment": "Nuk arrihet të shtohet koment", + "unable_to_add_exclusion_pattern": "Nuk arrihet të shtohet model përjashtimi", + "unable_to_add_partners": "Nuk arrihet të shtohen partnerë", + "unable_to_add_remove_archive": "Nuk arrihet të {archived, select, true {hiqet aseti nga} other {shtohet aseti te}} arkivi", + "unable_to_add_remove_favorites": "Nuk arrihet të {favorite, select, true {shtohet aseti te} other {hiqet aseti nga}} të preferuarat", + "unable_to_archive_unarchive": "Nuk arrihet të {archived, select, true {arkivohet} other {çarkivohet}}", + "unable_to_change_album_user_role": "Nuk arrihet të ndryshohet roli i përdoruesit të albumit", + "unable_to_change_date": "Nuk arrihet të ndryshohet data", + "unable_to_change_description": "Nuk arrihet të ndryshohet përshkrimi", + "unable_to_change_favorite": "Nuk arrihet të ndryshohet i preferuari për asetin", + "unable_to_change_location": "Nuk arrihet të ndryshohet vendndodhja", + "unable_to_change_password": "Nuk arrihet të ndryshohet fjalëkalimi", + "unable_to_change_visibility": "Nuk arrihet të ndryshohet dukshmëria për {count, plural, one {# person} other {# persona}}", + "unable_to_complete_oauth_login": "Nuk arrihet të përfundohet hyrja me OAuth", + "unable_to_connect": "Nuk arrihet lidhja", + "unable_to_copy_to_clipboard": "Nuk mund të kopjohet në kujtesën e fragmenteve, sigurohu që po e akseson faqen përmes https", + "unable_to_create": "Nuk arrihet të krijohet rrjedha e punës", + "unable_to_create_admin_account": "Nuk arrihet të krijohet llogaria e administratorit", + "unable_to_create_api_key": "Nuk arrihet të krijohet një çelës i ri API", + "unable_to_create_library": "Nuk arrihet të krijohet biblioteka", + "unable_to_create_user": "Nuk arrihet të krijohet përdoruesi", + "unable_to_delete_album": "Nuk arrihet të fshihet albumi", + "unable_to_delete_asset": "Nuk arrihet të fshihet aseti", + "unable_to_delete_assets": "Gabim gjatë fshirjes së aseteve", + "unable_to_delete_exclusion_pattern": "Nuk arrihet të fshihet modeli i përjashtimit", + "unable_to_delete_shared_link": "Nuk arrihet të fshihet lidhja e ndarë", + "unable_to_delete_user": "Nuk arrihet të fshihet përdoruesi", + "unable_to_delete_workflow": "Nuk arrihet të fshihet rrjedha e punës", + "unable_to_download_files": "Nuk arrihet të shkarkohen skedarët", + "unable_to_edit_exclusion_pattern": "Nuk arrihet të modifikohet modeli i përjashtimit", + "unable_to_empty_trash": "Nuk arrihet të zbrazet koshi", + "unable_to_enter_fullscreen": "Nuk arrihet të hyhet në ekran të plotë", + "unable_to_exit_fullscreen": "Nuk arrihet të dilet nga ekrani i plotë", + "unable_to_get_comments_number": "Nuk arrihet të merret numri i komenteve", + "unable_to_get_shared_link": "Marrja e lidhjes së ndarë dështoi", + "unable_to_hide_person": "Nuk arrihet të fshihet personi", + "unable_to_link_motion_video": "Nuk arrihet të lidhet videoja me lëvizje", + "unable_to_link_oauth_account": "Nuk arrihet të lidhet llogaria OAuth", + "unable_to_log_out_all_devices": "Nuk arrihet të dilet nga të gjitha pajisjet", + "unable_to_log_out_device": "Nuk arrihet të dilet nga pajisja", + "unable_to_login_with_oauth": "Nuk arrihet të hyhet me OAuth", + "unable_to_play_video": "Nuk arrihet të luhet videoja", + "unable_to_reassign_assets_existing_person": "Nuk arrihet të ricaktohen asetet te {name, select, null {një person ekzistues} other {{name}}}", + "unable_to_reassign_assets_new_person": "Nuk arrihet të ricaktohen asetet te një person i ri", + "unable_to_refresh_user": "Nuk arrihet të rifreskohet përdoruesi", + "unable_to_remove_album_users": "Nuk arrihet të hiqen përdoruesit nga albumi", + "unable_to_remove_api_key": "Nuk arrihet të hiqet çelësi API", + "unable_to_remove_assets_from_shared_link": "Nuk arrihet të hiqen asetet nga lidhja e ndarë", + "unable_to_remove_library": "Nuk arrihet të hiqet biblioteka", + "unable_to_remove_partner": "Nuk arrihet të hiqet partneri", + "unable_to_remove_reaction": "Nuk arrihet të hiqet reagimi", + "unable_to_reset_password": "Nuk arrihet të rivendoset fjalëkalimi", + "unable_to_reset_pin_code": "Nuk arrihet të rivendoset kodi PIN", + "unable_to_resolve_duplicate": "Nuk arrihet të zgjidhet duplikati", + "unable_to_restore_assets": "Nuk arrihet të rikthehen asetet", + "unable_to_restore_trash": "Nuk arrihet të rikthehet koshi", + "unable_to_restore_user": "Nuk arrihet të rikthehet përdoruesi", + "unable_to_save_album": "Nuk arrihet të ruhet albumi", + "unable_to_save_api_key": "Nuk arrihet të ruhet çelësi API", + "unable_to_save_date_of_birth": "Nuk arrihet të ruhet data e lindjes", + "unable_to_save_name": "Nuk arrihet të ruhet emri", + "unable_to_save_profile": "Nuk arrihet të ruhet profili", + "unable_to_save_settings": "Nuk arrihet të ruhen cilësimet", + "unable_to_scan_libraries": "Nuk arrihet të skanohen bibliotekat", + "unable_to_scan_library": "Nuk arrihet të skanohet biblioteka", + "unable_to_set_feature_photo": "Nuk arrihet të caktohet fotoja e veçorisë", + "unable_to_set_profile_picture": "Nuk arrihet të caktohet fotoja e profilit", + "unable_to_set_rating": "Nuk arrihet të caktohet vlerësimi", + "unable_to_submit_job": "Nuk arrihet të dorëzohet puna", + "unable_to_trash_asset": "Nuk arrihet të hidhet aseti në kosh", + "unable_to_unlink_account": "Nuk arrihet të shkëputet llogaria", + "unable_to_unlink_motion_video": "Nuk arrihet të shkëputet videoja me lëvizje", + "unable_to_update_album_cover": "Nuk arrihet të përditësohet kopertina e albumit", + "unable_to_update_album_info": "Nuk arrihet të përditësohet informacioni i albumit", + "unable_to_update_library": "Nuk arrihet të përditësohet biblioteka", + "unable_to_update_location": "Nuk arrihet të përditësohet vendndodhja", + "unable_to_update_settings": "Nuk arrihet të përditësohen cilësimet", + "unable_to_update_timeline_display_status": "Nuk arrihet të përditësohet statusi i shfaqjes së kronologjisë", + "unable_to_update_user": "Nuk arrihet të përditësohet përdoruesi", + "unable_to_update_workflow": "Nuk arrihet të përditësohet rrjedha e punës", + "unable_to_upload_file": "Nuk arrihet të ngarkohet skedari" + }, + "errors_text": "Gabime", + "exclusion_pattern": "Modeli i përjashtimit", + "exif": "Exif", + "exif_bottom_sheet_description": "Shto përshkrim...", + "exif_bottom_sheet_description_error": "Gabim gjatë përditësimit të përshkrimit", + "exif_bottom_sheet_no_description": "Pa përshkrim", + "exit_slideshow": "Dil nga shfaqja e diapozitivave", + "expand": "Zgjero", + "expand_all": "Zgjero të gjitha", + "expire_after": "Skadon pas", + "expired": "Skaduar", + "expires_date": "Skadon më {date}", + "explore": "Eksploro", + "explorer": "Eksploruesi", + "export": "Eksporto", + "export_as_json": "Eksporto si JSON", + "export_database": "Eksporto bazën e të dhënave", + "export_database_description": "Eksporto bazën e të dhënave SQLite", + "exposure_time": "Koha e ekspozimit", + "extension": "Zgjatimi", + "external": "I jashtëm", + "external_libraries": "Biblioteka të jashtme", + "external_network": "Rrjet i jashtëm", + "external_network_sheet_info": "Kur nuk je në rrjetin Wi-Fi të preferuar, aplikacioni do të lidhet me serverin përmes URL-së së parë më poshtë që arrin të kontaktojë, duke filluar nga lart poshtë", + "f_number": "Numri-F", + "face_unassigned": "I pacaktuar", + "failed": "Dështoi", + "failed_count": "Dështoi: {count}", + "failed_to_authenticate": "Vërtetimi dështoi", + "failed_to_delete_file": "Fshirja e skedarit dështoi", + "failed_to_load_assets": "Ngarkimi i aseteve dështoi", + "failed_to_load_folder": "Ngarkimi i dosjes dështoi", + "favorite": "I preferuar", + "favorite_action_prompt": "{count} u shtua te të preferuarat", + "favorite_or_unfavorite_photo": "Shto ose hiq foton nga të preferuarat", + "favorites": "Të preferuarat", + "feature_photo_updated": "Fotoja e veçorisë u përditësua", + "features": "Veçoritë", + "features_setting_description": "Menaxho veçoritë e aplikacionit", + "file_name_or_extension": "Emri i skedarit ose zgjatimi", + "file_name_text": "Emri i skedarit", + "file_size": "Madhësia e skedarit", + "filename": "Emri i skedarit", + "filetype": "Lloji i skedarit", + "filter": "Filtro", + "filter_people": "Filtro personat", + "filter_places": "Filtro vendet", + "filter_tags": "Filtro etiketat", + "filters": "Filtra", + "first": "I pari", + "fix_incorrect_match": "Rregullo përputhjen e pasaktë", + "focal_length": "Gjatësia fokale", + "folder": "Dosje", + "folder_not_found": "Dosja nuk u gjet", + "folders": "Dosje", + "folders_feature_description": "Shfletimi i pamjes së dosjeve për fotot dhe videot në sistemin e skedarëve", + "forgot_pin_code_question": "Harrove PIN-in?", + "forward": "Përcill", + "free_up_space": "Liro hapësirë", + "free_up_space_description": "Zhvendos fotot dhe videot me kopje rezervë te koshi i pajisjes për të liruar hapësirë. Kopjet e tua në server mbeten të sigurta.", + "free_up_space_settings_subtitle": "Liro hapësirën e pajisjes", + "full_path": "Shtegu i plotë: {path}", + "full_path_or_folder": "Shtegu i plotë ose dosja", + "gcast_enabled": "Google Cast", + "gcast_enabled_description": "Kjo veçori ngarkon burime të jashtme nga Google për të funksionuar.", + "general": "Të përgjithshme", + "geolocation_instruction_location": "Kliko mbi një aset me koordinata GPS për të përdorur vendndodhjen e tij, ose zgjidh një vendndodhje drejtpërdrejt nga harta", + "get_help": "Merr ndihmë", + "get_people_error": "Gabim gjatë marrjes së personave", + "get_wifiname_error": "Nuk u mor dot emri i Wi-Fi-t. Sigurohu që ke dhënë lejet e nevojshme dhe je i lidhur me një rrjet Wi-Fi", + "getting_started": "Fillimi", + "go_back": "Kthehu", + "go_to_folder": "Shko te dosja", + "go_to_search": "Shko te kërkimi", + "gps": "GPS", + "gps_missing": "Pa GPS", + "grant_permission": "Jep leje", + "group_albums_by": "Grupo albumet sipas...", + "group_country": "Grupo sipas vendit", + "group_no": "Pa grupim", + "group_owner": "Grupo sipas pronarit", + "group_places_by": "Grupo vendet sipas...", + "group_year": "Grupo sipas vitit", + "haptic_feedback_title": "Reagim haptik", + "has_quota": "Ka kuotë", + "hash_asset": "Bëj hash asetin", + "hashed_assets": "Asete të hashuara", + "hashing": "Po bëhet hashimi", + "header_settings_add_header_tip": "Shto header", + "header_settings_field_validator_msg": "Vlera nuk mund të jetë bosh", + "header_settings_header_name_input": "Emri i header-it", + "header_settings_header_value_input": "Vlera e header-it", + "headers_settings_tile_title": "Header-a të personalizuar proxy", + "height": "Lartësia", + "hi_user": "Përshëndetje {name} ({email})", + "hide_all_people": "Fshih të gjithë personat", + "hide_gallery": "Fshih galerinë", + "hide_named_person": "Fshih personin {name}", + "hide_password": "Fshih fjalëkalimin", + "hide_person": "Fshih personin", + "hide_schema": "Fshih skemën", + "hide_text_recognition": "Fshih njohjen e tekstit", + "hide_unnamed_people": "Fshih personat pa emër", + "home_page_building_timeline": "Po ndërtohet kronologjia", + "host": "Host", + "hour": "Ora", + "hours": "Orë", + "id": "ID", + "idle": "Joaktiv", + "image": "Imazhi", + "image_alt_text_date": "{isVideo, select, true {Video} other {Imazh}} i realizuar më {date}", + "image_alt_text_date_1_person": "{isVideo, select, true {Video} other {Imazh}} i realizuar me {person1} më {date}", + "image_alt_text_date_2_people": "{isVideo, select, true {Video} other {Imazh}} i realizuar me {person1} dhe {person2} më {date}", + "image_alt_text_date_3_people": "{isVideo, select, true {Video} other {Imazh}} i realizuar me {person1}, {person2} dhe {person3} më {date}", + "image_alt_text_date_4_or_more_people": "{isVideo, select, true {Video} other {Imazh}} i realizuar me {person1}, {person2} dhe {additionalCount, number} të tjerë më {date}", + "image_alt_text_date_place": "{isVideo, select, true {Video} other {Imazh}} i realizuar në {city}, {country} më {date}", + "image_alt_text_date_place_1_person": "{isVideo, select, true {Video} other {Imazh}} i realizuar në {city}, {country} me {person1} më {date}", + "image_alt_text_date_place_2_people": "{isVideo, select, true {Video} other {Imazh}} i realizuar në {city}, {country} me {person1} dhe {person2} më {date}", + "image_alt_text_date_place_3_people": "{isVideo, select, true {Video} other {Imazh}} i realizuar në {city}, {country} me {person1}, {person2} dhe {person3} më {date}", + "image_alt_text_date_place_4_or_more_people": "{isVideo, select, true {Video} other {Imazh}} i realizuar në {city}, {country} me {person1}, {person2} dhe {additionalCount, number} të tjerë më {date}", + "immich_logo": "Logoja e Immich", + "immich_web_interface": "Ndërfaqja Web e Immich", + "import_from_json": "Importo nga JSON", + "import_path": "Shtegu i importimit", + "in_albums": "Në {count, plural, one {# album} other {# albume}}", + "in_archive": "Në arkiv", + "in_year": "Në {year}", + "in_year_selector": "Në", + "include_archived": "Përfshi të arkivuarat", + "include_shared_albums": "Përfshi albumet e ndara", + "include_shared_partner_assets": "Përfshi asetet e ndara të partnerit", + "individual_share": "Ndarje individuale", + "individual_shares": "Ndarje individuale", + "info": "Info", + "integrity_checks": "Kontrolle integriteti", + "interval": { + "day_at_onepm": "Çdo ditë në orën 13:00", + "hours": "Çdo {hours, plural, one {orë} other {{hours, number} orë}}", + "night_at_midnight": "Çdo natë në mesnatë", + "night_at_twoam": "Çdo natë në orën 2:00" + }, + "invalid_date": "Datë e pavlefshme", + "invalid_date_format": "Format date i pavlefshëm", + "invite_people": "Fto persona", + "invite_to_album": "Fto në album", + "iso": "ISO", + "items_count": "{count, plural, one {# artikull} other {# artikuj}}", + "jobs": "Punët", + "keep": "Mbaj", + "keep_albums": "Mbaj albumet", + "keep_albums_count": "Po mbahen {count} {count, plural, one {album} other {albume}}", + "keep_all": "Mbaji të gjitha", + "keep_description": "Zgjidh çfarë mbetet në pajisjen tënde kur liron hapësirë.", + "keep_favorites": "Mbaj të preferuarat", + "keep_on_device": "Mbaj në pajisje", + "keep_on_device_hint": "Zgjidh artikujt për të mbajtur në këtë pajisje", + "keep_this_delete_others": "Mbaj këtë, fshi të tjerat", + "keeping": "Po mbahen: {items}", + "kept_this_deleted_others": "U mbajt ky aset dhe u fshinë {count, plural, one {# aset} other {# asete}}", + "keyboard_shortcuts": "Shkurtore tastiere", + "language": "Gjuha", + "language_no_results_subtitle": "Provo të rregullosh termin tënd të kërkimit", + "language_no_results_title": "Nuk u gjet asnjë gjuhë", + "language_search_hint": "Kërko gjuhë...", + "language_setting_description": "Zgjidh gjuhën tënde të preferuar", + "large_files": "Skedarë të mëdhenj", + "last": "I fundit", + "last_months": "{count, plural, one {Muajin e kaluar} other {# muajt e kaluar}}", + "last_seen": "Parë së fundmi", + "latest_version": "Versioni më i fundit", + "latitude": "Gjerësia gjeografike", + "leave": "Largohu", + "leave_album": "Largohu nga albumi", + "lens_model": "Modeli i objektivit", + "less": "Më pak", + "let_others_respond": "Lejo të tjerët të përgjigjen", + "level": "Niveli", + "library": "Biblioteka", + "library_add_folder": "Shto dosje", + "library_edit_folder": "Modifiko dosjen", + "library_page_sort_asset_count": "Numri i aseteve", + "library_page_sort_created": "Data e krijimit", + "library_page_sort_last_modified": "Modifikuar së fundmi", + "library_page_sort_title": "Titulli i albumit", + "licenses": "Licencat", + "light": "E çelët", + "light_theme": "Kalo në temën e çelët", + "like": "Pëlqe", + "like_deleted": "Pëlqimi u fshi", + "link": "Lidhje", + "link_motion_video": "Lidh videon me lëvizje", + "link_to_docs": "Për më shumë informacion, referoju dokumentacionit.", + "link_to_oauth": "Lidh me OAuth", + "linked_oauth_account": "Llogaria OAuth e lidhur", + "list": "Listë", + "live": "Drejtpërdrejt", + "location": "Vendndodhja", + "model": "Modeli", + "name": "Emri", + "none": "Asnjë", + "offline": "Jashtë linje", + "ok": "Në rregull", + "online": "Online", + "orientation": "Orientimi", + "path": "Shtegu", + "permanently_deleted_assets_count": "U fshinë përgjithmonë {count, plural, one {# aset} other {# asete}}", + "refresh": "Rifresko", + "rename": "Riemërto", + "role_editor": "Modifikuesi", + "search": "Kërko", + "search_filter_date": "Data", + "search_filter_location": "Vendndodhja", + "select_albums": "Zgjidh albume", + "settings": "Cilësimet", + "shared_link_custom_url_title": "URL e personalizuar", + "size": "Madhësia", + "status": "Statusi", + "to_archive": "Arkiv", + "to_select": "për të zgjedhur", + "type": "Lloji", + "unknown": "E panjohur", + "upload_finished": "Ngarkimi përfundoi", + "upload_status_duplicates": "Duplikatë", + "upload_status_errors": "Gabime", + "upload_status_uploaded": "Ngarkuar", + "username": "Emri i përdoruesit", + "version": "Versioni", "you_dont_have_any_shared_links": "Nuk keni asnjë link të shpërndarë", "your_wifi_name": "Emri i Wi-Fi tuaj", "zoom_image": "Zmadho imazhin" diff --git a/i18n/sr_Cyrl.json b/i18n/sr_Cyrl.json index 616619e801..fdb5e16bc2 100644 --- a/i18n/sr_Cyrl.json +++ b/i18n/sr_Cyrl.json @@ -542,12 +542,12 @@ "check_logs": "Проверите дневнике (логс)", "choose_matching_people_to_merge": "Изаберите одговарајуће особе за спајање", "city": "Град", - "clear": "Јасно", + "clear": "Очисти", "clear_all": "Избриши све", "clear_all_recent_searches": "Обришите све недавне претраге", "clear_message": "Обриши поруку", - "clear_value": "Јасна вредност", - "client_cert_import": "Импорт", + "clear_value": "Очисти вредност", + "client_cert_import": "Увези", "client_cert_import_success_msg": "Сертификат клијента је увезен", "client_cert_invalid_msg": "Неважећа датотека сертификата или погрешна лозинка", "client_cert_remove_msg": "Сертификат клијента је уклоњен", diff --git a/i18n/sr_Latn.json b/i18n/sr_Latn.json index e07befb1c7..4979e5f137 100644 --- a/i18n/sr_Latn.json +++ b/i18n/sr_Latn.json @@ -73,6 +73,7 @@ "cron_expression_description": "Podesite interval skeniranja koristeći cron format. Za više informacija pogledajte npr. Crontab Guru", "cron_expression_presets": "Predefinisana podešavanja Cron izraza (expression)", "disable_login": "Onemogući prijavu", + "download_csv": "Preuzmite CSV", "duplicate_detection_job_description": "Pokrenite mašinsko učenje na sredstvima da biste otkrili slične slike. Oslanja se na pametnu pretragu", "exclusion_pattern_description": "Obrasci izuzimanja vam omogućavaju da ignorišete datoteke i fascikle kada skenirate biblioteku. Ovo je korisno ako imate fascikle koje sadrže datoteke koje ne želite da uvezete, kao što su RAW datoteke.", "export_config_as_json_description": "Skini trenutnu sistemsku konfiguraciju kao JSON fajl", @@ -756,7 +757,6 @@ "custom_date": "Odabir datuma", "custom_locale": "Prilagođeni lokalitet", "custom_locale_description": "Formatirajte datume, vreme i brojeve na osnovu izabranog jezika i regiona", - "custom_url": "Odabir URL", "cutoff_date_description": "Sačuvaj slike od prethodnih…", "dark": "Tamno", "dark_theme": "Primeni tamnu temu", diff --git a/i18n/sv.json b/i18n/sv.json index ac9ae35eb1..596411673a 100644 --- a/i18n/sv.json +++ b/i18n/sv.json @@ -39,59 +39,59 @@ "added_to_favorites": "Tillagd till favoriter", "added_to_favorites_count": "{count, number} tillagda till favoriter", "admin": { - "add_exclusion_pattern_description": "Lägg till exkluderande mönster. Matchning med jokertecken *, ** samt ? stödjs. För att ignorera alla filer i samtliga mappar som heter \"Raw\", använd \"**/Raw/**\". För att ignorera alla filer som slutar med \".tif\", använd \"**/*.tif\". För att ignorera en absolut sökväg, använd \"/sökväg/att/ignorera/**\".", + "add_exclusion_pattern_description": "Lägg till uteslutningsmönster. Jokertecknen *, ** och ? stöds. Använd \"**/Raw/**\" för att ignorera alla filer i alla kataloger med namnet \"Raw\". Använd \"**/*.tif\" för att ignorera alla filer som slutar med \".tif\". Använd \"/path/to/ignore/**\" för att ignorera en absolut sökväg.", "admin_user": "Adminanvändare", "asset_offline_description": "Detta externa biblioteksobjekt finns inte längre på disken och har flyttats till papperskorgen. Om filen flyttades inom biblioteket, kontrollera din tidslinje för det nya motsvarande objektet. För att återställa detta objekt, se till att filsökvägen nedan kan nås av Immich och skanna biblioteket.", "authentication_settings": "Autentiseringsinställningar", - "authentication_settings_description": "Hantera lösenord, OAuth, och andra autentiseringsinställningar", - "authentication_settings_disable_all": "Är du säker på att du vill inaktivera alla inloggningsmetoder? Inloggning kommer att helt inaktiveras.", - "authentication_settings_reenable": "För att återaktivera, använd Server Command.", - "background_task_job": "Bakgrundsaktiviteter", - "backup_database": "Skapa Databasdump", - "backup_database_enable_description": "Aktivera dumpning av databas", + "authentication_settings_description": "Hantera lösenord, OAuth och andra autentiseringsinställningar", + "authentication_settings_disable_all": "Är du säker på att du vill inaktivera alla inloggningsmetoder? Inloggningen inaktiveras helt.", + "authentication_settings_reenable": "Använd ett serverkommando för att aktivera dem igen.", + "background_task_job": "Bakgrundsuppgifter", + "backup_database": "Skapa databasdump", + "backup_database_enable_description": "Aktivera databasdumpar", "backup_keep_last_amount": "Antal databasdumpar att behålla", - "backup_onboarding_1_description": "extern kopia i molnet eller på en annan fysisk plats.", - "backup_onboarding_2_description": "lokala kopior på olika enheter. Detta inkluderar huvudfilerna och en lokal säkerhetskopia av dessa filer.", - "backup_onboarding_3_description": "totala kopior av dina data, inklusive originalfilerna. Detta inkluderar 1 extern kopia och 2 lokala kopior.", - "backup_onboarding_description": "En 3-2-1 säkerhetskopieringsstrategi rekommenderas för att skydda din data. Du bör även spara kopior av dina uppladdade foton/videor samt Immich-databasen för en heltäckande säkerhetskopieringslösning.", + "backup_onboarding_1_description": "extern säkerhetskopia i molnet eller på en annan fysisk plats.", + "backup_onboarding_2_description": "lokala kopior på olika enheter. Detta omfattar huvudfilerna och en lokal säkerhetskopia av dem.", + "backup_onboarding_3_description": "kopior av dina data totalt, inklusive originalfilerna. Detta omfattar en extern kopia och två lokala kopior.", + "backup_onboarding_description": "En 3-2-1-strategi för säkerhetskopiering rekommenderas för att skydda dina data. För en heltäckande säkerhetskopiering bör du behålla kopior av uppladdade foton och videor samt av Immich-databasen.", "backup_onboarding_footer": "För mer information om säkerhetskopiering av Immich, se dokumentationen.", - "backup_onboarding_parts_title": "En 3-2-1 säkerhetskopiering inkluderar:", + "backup_onboarding_parts_title": "En 3-2-1-säkerhetskopiering omfattar:", "backup_onboarding_title": "Säkerhetskopior", - "backup_settings": "Inställningar databasdump", + "backup_settings": "Inställningar för databasdump", "backup_settings_description": "Hantera inställningar för databasdumpning.", - "cleared_jobs": "Rensade jobben för: {job}", - "config_set_by_file": "Konfigurationen är satt av en konfigurationsfil", - "confirm_delete_library": "Är du säker på att du vill radera {library} album?", - "confirm_delete_library_assets": "Är du säker på att du vill radera detta album? {count, plural, one {# objekt} other {Samtliga # objekt}} kommer att tas bort från Immich och åtgärden kan inte ångras. Filerna kommer att behållas på hårddisken.", + "cleared_jobs": "Rensade jobb för: {job}", + "config_set_by_file": "Konfigurationen anges för närvarande i en konfigurationsfil", + "confirm_delete_library": "Är du säker på att du vill ta bort biblioteket {library}?", + "confirm_delete_library_assets": "Är du säker på att du vill ta bort det här biblioteket? Då tas {count, plural, one {# objekt i biblioteket} other {alla # objekt i biblioteket}} bort från Immich. Åtgärden kan inte ångras. Filerna ligger kvar på disken.", "confirm_email_below": "För att bekräfta, skriv ”{email}” nedan", - "confirm_reprocess_all_faces": "Är du säker på att du vill återprocessa alla ansikten? Detta kommer också rensa namngivna personer.", + "confirm_reprocess_all_faces": "Är du säker på att du vill bearbeta alla ansikten igen? Namnen på personer rensas också.", "confirm_user_password_reset": "Är du säker på att du vill återställa lösenordet för {user}?", "confirm_user_pin_code_reset": "Är du säker på att du vill återställa PIN-koden för {user}?", - "copy_config_to_clipboard_description": "Kopiera den aktuella systemkonfigurationen som ett JSON-objekt till urklipp", + "copy_config_to_clipboard_description": "Kopiera den aktuella systemkonfigurationen som ett JSON-objekt till urklippet", "create_job": "Skapa jobb", "cron_expression": "Cron-uttryck", - "cron_expression_description": "Sätt skanningsintervallet genom att använda cron-format. För mer information se Crontab Guru", - "cron_expression_presets": "Cron-uttryck förinställningar", + "cron_expression_description": "Ange skanningsintervallet i cron-format. Mer information finns exempelvis på Crontab Guru", + "cron_expression_presets": "Förval för cron-uttryck", "disable_login": "Inaktivera inloggning", "download_csv": "Ladda ner CSV", - "duplicate_detection_job_description": "Kör maskininlärning på objekt för att upptäcka liknande bilder. Bygger på Smart Search", - "exclusion_pattern_description": "Exkluderingsmönster tillåter dig att ignorera filer och mappar när skanning görs av ditt album. Detta är användbart om du har mappar som innehåller filer som du inte vill importera, t.ex. RAW-filer.", + "duplicate_detection_job_description": "Kör maskininlärning på objekt för att hitta liknande bilder. Bygger på smart sökning", + "exclusion_pattern_description": "Med uteslutningsmönster kan du ignorera filer och mappar när biblioteket skannas. Det är användbart för mappar som innehåller filer som inte ska importeras, exempelvis RAW-filer.", "export_config_as_json_description": "Ladda ner den aktuella systemkonfigurationen som en JSON-fil", - "external_libraries_page_description": "Administratörs externa bibliotekssida", + "external_libraries_page_description": "Administrationssida för externa bibliotek", "face_detection": "Ansiktsdetektering", - "face_detection_description": "Identifiera ansikten i foton med hjälp av maskininlärning. För videor används endast miniatyrbilden. \"Ladda om\" gör om sökningen för alla objekt. \"Återställ\" rensar all gällande ansikts-data. \"Saknade\" letar i de objekt som ännu inte sökts igenom. Alla identifierade ansikten läggs sedan i jobbkön för ansiktsigenkänning där de mappas till nya eller befintliga personer.", - "facial_recognition_job_description": "Gruppera upptäckta ansikten till personer. Det här steget körs efter att ansiktsdetektering är klar. \"Återställ\" (åter-)grupperar alla ansikten. \"Saknade\" köar ansikten som inte har en person tilldelad.", - "failed_job_command": "Kommando {command} misslyckades för jobb: {job}", - "force_delete_user_warning": "VARNING: Detta tar omedelbart bort användaren och alla mediafiler. Detta kan inte ångras och filerna kan inte återställas.", + "face_detection_description": "Detektera ansikten i objekt med hjälp av maskininlärning. För videor används endast miniatyrbilden. ”Uppdatera” bearbetar alla objekt igen. ”Återställ” rensar dessutom alla befintliga ansiktsdata. ”Saknade” köplacerar objekt som ännu inte har bearbetats. När ansiktsdetekteringen är klar köplaceras de detekterade ansiktena för ansiktsigenkänning och grupperas som befintliga eller nya personer.", + "facial_recognition_job_description": "Gruppera detekterade ansikten efter person. Steget körs efter att ansiktsdetekteringen är klar. ”Återställ” grupperar om alla ansikten. ”Saknade” köplacerar ansikten som ännu inte har tilldelats en person.", + "failed_job_command": "Kommandot {command} misslyckades för jobbet {job}", + "force_delete_user_warning": "VARNING: Användaren och alla objekt tas bort omedelbart. Åtgärden kan inte ångras och filerna kan inte återställas.", "image_format": "Format", "image_format_description": "WebP producerar mindre filer än JPEG, men kodas långsammare.", - "image_fullsize_description": "Fullstor bild med borttagen metadata, används vid inzoomning", - "image_fullsize_enabled": "Använd fullstor bildgenerering", - "image_fullsize_enabled_description": "Generera fullstor bild för icke webbvänliga format. När \"Använd inbäddade förhandsvisningar\" är aktiverat används inbäddad förhandsvisning utan konvertering. Påverkar inte webbvänliga format som JPEG.", - "image_fullsize_quality_description": "Bildkvalitet för fullstora bilder 1-100. Högre värde ger bättre kvalitet men större filer.", + "image_fullsize_description": "Bild i full storlek utan metadata, används vid inzoomning", + "image_fullsize_enabled": "Aktivera generering av bilder i full storlek", + "image_fullsize_enabled_description": "Generera bilder i full storlek för format som inte är webbvänliga. När \"Föredra inbäddad förhandsvisning\" är aktiverat används inbäddade förhandsvisningar direkt utan konvertering. Webbvänliga format som JPEG påverkas inte.", + "image_fullsize_quality_description": "Kvalitet för bilder i full storlek, från 1 till 100. Högre värden ger bättre kvalitet men större filer.", "image_fullsize_title": "Inställningar för fullstora bilder", "image_prefer_embedded_preview": "Föredra inbäddad förhandsgranskning", - "image_prefer_embedded_preview_setting_description": "Använd inbäddade förhandsvisningar i RAW-foton som indata till bildbehandling och när det är tillgängligt. Detta kan ge mer exakta färger för vissa bilder, men kvaliteten på förhandsgranskningen är kameraberoende och bilden kan ha fler komprimeringsartefakter.", + "image_prefer_embedded_preview_setting_description": "Använd inbäddade förhandsvisningar i RAW-foton som underlag för bildbehandling när de finns. Det kan ge mer korrekta färger i vissa bilder, men förhandsvisningens kvalitet beror på kameran och bilden kan innehålla fler komprimeringsartefakter.", "image_prefer_wide_gamut": "Föredra brett färgomfång", "image_prefer_wide_gamut_setting_description": "Använd Display P3 för miniatyrer. Detta bevarar livfullheten bättre hos bilder med bred färgrymd, men bilder kan se annorlunda ut på gamla enheter med en gammal webbläsarversion. sRGB-bilder behålls som sRGB för att undvika färgskiftningar.", "image_preview_description": "Mellanstor bild med avskalad metadata, används vid visning av ett enskilt objekt och för maskininlärning", @@ -108,62 +108,77 @@ "image_thumbnail_quality_description": "Miniatyrkvalitet från 1-100. Högre är bättre, men ger större filer och kan minska appens följsamhet.", "image_thumbnail_title": "Miniatyrbildsinställningar", "import_config_from_json_description": "Importera systemkonfiguration genom att ladda upp en JSON-konfigurationsfil", + "integrity_checks_checksum_files": "Kontrollsummor för filer", + "integrity_checks_checksum_files_description": "Konfigurera kontrollen av filers kontrollsummor", + "integrity_checks_checksum_files_enable_description": "Aktivera kontroll av filers kontrollsummor", + "integrity_checks_checksum_files_percentage_limit": "Procentuell gräns", + "integrity_checks_checksum_files_percentage_limit_description": "Ange den högsta andelen, mellan 0,01 och 1, som kontrollsummekontrollen får bearbeta vid varje intervall.", + "integrity_checks_checksum_files_time_limit": "Tidsgräns", + "integrity_checks_checksum_files_time_limit_description": "Ange hur länge kontrollsummekontrollen högst får köras vid varje intervall. (ms)", + "integrity_checks_missing_files": "Saknade filer", + "integrity_checks_missing_files_description": "Konfigurera frekvensen och aktivera eller inaktivera kontrollen av saknade filer", + "integrity_checks_missing_files_enable_description": "Aktivera kontroll av saknade filer", + "integrity_checks_settings": "Integritetskontroller", + "integrity_checks_settings_description": "Hantera intervall för integritetskontroller", + "integrity_checks_untracked_files": "Ospårade filer", + "integrity_checks_untracked_files_description": "Konfigurera frekvensen och aktivera eller inaktivera kontrollen av ospårade filer", + "integrity_checks_untracked_files_enable_description": "Aktivera kontroll av ospårade filer", "job_concurrency": "{job} samtidighet", "job_created": "Jobb skapat", "job_not_concurrency_safe": "Det här jobbet är inte samtidighetssäkert.", "job_settings": "Jobbinställningar", "job_settings_description": "Hantera samtidiga jobb", "jobs_delayed": "{jobCount, plural, one{# försenad} other {# försenade}}", - "jobs_failed": "{jobCount, plural, other {# misslyckades}}", + "jobs_failed": "{jobCount, plural, other {# misslyckade}}", "jobs_over_time": "Jobb över tid", - "library_created": "Skapat bibliotek: {library}", + "library_created": "Bibliotek skapat: {library}", "library_deleted": "Biblioteket har tagits bort", "library_details": "Biblioteksdetaljer", - "library_folder_description": "Välj en mapp att importera. Denna mapp, inklusive undermappar, kommer sökas igenom efter bilder och videor.", + "library_folder_description": "Ange en mapp som ska importeras. Mappen och dess undermappar skannas efter bilder och videor.", "library_remove_exclusion_pattern_prompt": "Är du säker på att du vill ta bort detta exkluderingsmönster?", "library_remove_folder_prompt": "Är du säker på att du vill ta bort denna importmapp?", "library_scanning": "Periodisk skanning", - "library_scanning_description": "Konfigurera periodisk biblioteksskanning", - "library_scanning_enable_description": "Aktivera periodisk biblioteksskanning", + "library_scanning_description": "Konfigurera periodisk skanning av bibliotek", + "library_scanning_enable_description": "Aktivera periodisk skanning av bibliotek", "library_settings": "Externa bibliotek", "library_settings_description": "Hantera inställningar för externa bibliotek", - "library_tasks_description": "Sök igenom externa bibliotek efter nya och/eller förändrade objekt", + "library_tasks_description": "Skanna externa bibliotek efter nya och ändrade objekt", "library_updated": "Bibliotek uppdaterat", - "library_watching_enable_description": "Bevaka externa bibliotek för filändringar", - "library_watching_settings": "Bevaka bibliotek [EXPERIMENTELLT]", - "library_watching_settings_description": "Bevaka automatiskt filförändringar", + "library_watching_enable_description": "Bevaka filändringar i externa bibliotek", + "library_watching_settings": "Biblioteksbevakning [EXPERIMENTELLT]", + "library_watching_settings_description": "Bevaka ändrade filer automatiskt", "logging_enable_description": "Aktivera loggning", - "logging_level_description": "Vilken loggnivå som ska användas vid aktivering.", + "logging_level_description": "Ange vilken loggnivå som ska användas när loggning är aktiverad.", "logging_settings": "Loggning", "machine_learning_availability_checks": "Tillgänglighetskontroller", - "machine_learning_availability_checks_description": "Upptäck och föredrar automatiskt tillgängliga maskininlärningsservrar", + "machine_learning_availability_checks_description": "Identifiera automatiskt tillgängliga maskininlärningsservrar och använd dem i första hand", "machine_learning_availability_checks_enabled": "Aktivera tillgänglighetskontroller", - "machine_learning_availability_checks_interval": "Kontrollera intervall", + "machine_learning_availability_checks_interval": "Kontrollintervall", "machine_learning_availability_checks_interval_description": "Intervall i millisekunder mellan tillgänglighetskontroller", - "machine_learning_availability_checks_timeout": "Begär timeout", - "machine_learning_availability_checks_timeout_description": "Timeout i millisekunder för tillgänglighetskontroller", + "machine_learning_availability_checks_timeout": "Tidsgräns för begäran", + "machine_learning_availability_checks_timeout_description": "Tidsgräns i millisekunder för tillgänglighetskontroller", "machine_learning_clip_model": "CLIP-modell", - "machine_learning_clip_model_description": "Namnet på en CLIP-modell listad här. Observera att du måste köra ett \"Smart Sökning\" jobb för alla bilder när du ändrar modell.", + "machine_learning_clip_model_description": "Namnet på en CLIP-modell som anges här. När modellen ändras måste jobbet ”Smart sökning” köras igen för alla bilder.", "machine_learning_duplicate_detection": "Dubblettdetektering", "machine_learning_duplicate_detection_enabled": "Aktivera dubblettdetektering", - "machine_learning_duplicate_detection_enabled_description": "Om inaktiverad, kommer identiska objekt fortfarande att vara deduplicerade.", + "machine_learning_duplicate_detection_enabled_description": "Även om funktionen är inaktiverad dedupliceras exakt identiska objekt.", "machine_learning_duplicate_detection_setting_description": "Använd CLIP-inbäddningar för att hitta troliga dubbletter", "machine_learning_enabled": "Aktivera maskininlärning", "machine_learning_enabled_description": "Om det är inaktiverat kommer alla ML-funktioner att inaktiveras oavsett inställningarna nedan.", "machine_learning_facial_recognition": "Ansiktsigenkänning", - "machine_learning_facial_recognition_description": "Upptäck, känna igen och gruppera ansikten i bilder", + "machine_learning_facial_recognition_description": "Upptäck, känn igen och gruppera ansikten i bilder", "machine_learning_facial_recognition_model": "Ansiktsigenkänningsmodell", - "machine_learning_facial_recognition_model_description": "Modeller är listade i fallande storleksordning. Större modeller är långsammare och använder mer minne, men ger bättre resultat. Observera att du måste köra Face Detection-jobbet för alla bilder när du ändrar en modell.", + "machine_learning_facial_recognition_model_description": "Modellerna anges i fallande storleksordning. Större modeller är långsammare och använder mer minne men ger bättre resultat. När modellen ändras måste ansiktsdetekteringsjobbet köras igen för alla bilder.", "machine_learning_facial_recognition_setting": "Aktivera ansiktsigenkänning", - "machine_learning_facial_recognition_setting_description": "Om avmarkerad kommer bilder inte att kodas till ansiktsigenkänningen vilket innebär att bilder inte kommer att läggas till i listan av igenkända personer på sidan Utforska.", - "machine_learning_max_detection_distance": "Maximal detektions avstånd", - "machine_learning_max_detection_distance_description": "Maximalt avstånd mellan två bilder för att överväga dem dubbletter, från 0,001-0,1. Högre värden kommer att upptäcka fler dubbletter, men kan leda till falsk positivt.", + "machine_learning_facial_recognition_setting_description": "När funktionen är inaktiverad kodas bilder inte för ansiktsigenkänning och visas därför inte under Personer på sidan Utforska.", + "machine_learning_max_detection_distance": "Största detekteringsavstånd", + "machine_learning_max_detection_distance_description": "Största avstånd mellan två bilder för att de ska betraktas som dubbletter, från 0,001 till 0,1. Högre värden hittar fler dubbletter men kan ge falska positiva resultat.", "machine_learning_max_recognition_distance": "Maximalt igenkänningsavstånd", - "machine_learning_max_recognition_distance_description": "Det maximala avståndet mellan två ansikten för att anses som samma person, från 0-2. Sänkning av denna kan medföra märkning av två personer som samma person, samtidigt som det kan förhindra att märkning av samma person som två olika personer. Observera att det är lättare att slå samman två personer än att dela en person i två, så ligg hellre närmare den lägre tröskel om det är möjligt.", - "machine_learning_min_detection_score": "Minsta detektions poäng", - "machine_learning_min_detection_score_description": "Lägsta självsäkerhetsnivå för att en sida ska upptäckas mellan 0-1. Lägre värden upptäcker fler sidor men kan resultera i falska positiv.", - "machine_learning_min_recognized_faces": "Minsta identifierade ansikten", - "machine_learning_min_recognized_faces_description": "Minsta antal identifierade ansikten för att en person ska kunna skapas. Om detta ökas blir ansiktsigenkänningen mer exakt, men risken för att ett ansikte inte kopplas till en person ökar.", + "machine_learning_max_recognition_distance_description": "Största avstånd mellan två ansikten för att de ska betraktas som samma person, från 0 till 2. Ett lägre värde minskar risken att två personer behandlas som samma person, medan ett högre värde minskar risken att samma person behandlas som två personer. Det är enklare att slå samman två personer än att dela en person i två, så välj helst ett lägre tröskelvärde.", + "machine_learning_min_detection_score": "Lägsta detekteringspoäng", + "machine_learning_min_detection_score_description": "Lägsta konfidenspoäng, från 0 till 1, för att ett ansikte ska detekteras. Lägre värden hittar fler ansikten men kan ge falska positiva resultat.", + "machine_learning_min_recognized_faces": "Minsta antal igenkända ansikten", + "machine_learning_min_recognized_faces_description": "Minsta antal igenkända ansikten som krävs för att skapa en person. Ett högre värde gör ansiktsigenkänningen mer exakt men ökar risken att ett ansikte inte tilldelas en person.", "machine_learning_ocr": "OCR", "machine_learning_ocr_description": "Använd maskininlärning för att känna igen text i bilder", "machine_learning_ocr_enabled": "Aktivera OCR", @@ -171,47 +186,47 @@ "machine_learning_ocr_max_resolution": "Maximal upplösning", "machine_learning_ocr_max_resolution_description": "Förhandsvisningar över denna upplösning kommer att ändras i storlek samtidigt som bildförhållandet behålls. Högre värden är mer exakta, men tar längre tid att bearbeta och använder mer minne.", "machine_learning_ocr_min_detection_score": "Lägsta detektionspoäng", - "machine_learning_ocr_min_detection_score_description": "Lägsta konfidenspoäng för att text ska kunna detekteras är mellan 0 och 1. Lägre värden kommer att detektera mer text men kan resultera i falska positiva resultat.", + "machine_learning_ocr_min_detection_score_description": "Lägsta konfidenspoäng, från 0 till 1, för att text ska detekteras. Lägre värden hittar mer text men kan ge falska positiva resultat.", "machine_learning_ocr_min_recognition_score": "Lägsta igenkänningspoäng", - "machine_learning_ocr_min_score_recognition_description": "Lägsta konfidenspoäng för att detekterad text ska kunna identifieras är 0–1. Lägre värden identifierar mer text men kan resultera i falska positiva resultat.", + "machine_learning_ocr_min_score_recognition_description": "Lägsta konfidenspoäng, från 0 till 1, för att detekterad text ska kännas igen. Lägre värden känner igen mer text men kan ge falska positiva resultat.", "machine_learning_ocr_model": "OCR-modell", "machine_learning_ocr_model_description": "Servermodeller är mer exakta än mobilmodeller men tar längre tid att bearbeta och använder mer minne.", - "machine_learning_settings": "Inställningar För Maskininlärning", + "machine_learning_settings": "Inställningar för maskininlärning", "machine_learning_settings_description": "Hantera funktioner och inställningar för maskininlärning", - "machine_learning_smart_search": "Smart Sökning", + "machine_learning_smart_search": "Smart sökning", "machine_learning_smart_search_description": "Sök semantiskt efter bilder med hjälp av CLIP-inbäddningar", "machine_learning_smart_search_enabled": "Aktivera smart sökning", "machine_learning_smart_search_enabled_description": "Om inaktiverat kommer bilder inte att kodas för smart sökning.", - "machine_learning_url_description": "Maskininlärningsserverns URL. Om det är mer än en URL tillagd så kommer ett försök per URL att utföras tills någon av dom svarar, försöken görs i kronologisk ordning. Servrar som inte svarar kommer tillfälligt ignoreras tills de är nåbara igen.", + "machine_learning_url_description": "Maskininlärningsserverns URL. Om flera URL:er anges provas servrarna en i taget i angiven ordning tills en svarar. Servrar som inte svarar ignoreras tillfälligt tills de är tillgängliga igen.", "maintenance_backup_management": "Hantering av säkerhetskopior", "maintenance_delete_backup": "Ta bort säkerhetskopia", - "maintenance_delete_backup_description": "Den här filen kommer att raderas oåterkalleligt.", + "maintenance_delete_backup_description": "Filen tas bort oåterkalleligen.", "maintenance_delete_error": "Det gick inte att ta bort säkerhetskopian.", "maintenance_integrity_check": "Kontrollera", "maintenance_integrity_check_all": "Kontrollera alla", "maintenance_integrity_checksum_mismatch": "Kontrollsummeavvikelse", "maintenance_integrity_checksum_mismatch_description": "Filer vars kontrollsumma på disken inte stämmer överens med den kontrollsumma som Immich har lagrat i sin databas.", - "maintenance_integrity_checksum_mismatch_job": "Kolla efter kontrollsummor som inte matchar", - "maintenance_integrity_checksum_mismatch_refresh_job": "Uppdatera rapporter om kontrollsummor som inte matchar", + "maintenance_integrity_checksum_mismatch_job": "Kontrollera avvikande kontrollsummor", + "maintenance_integrity_checksum_mismatch_refresh_job": "Uppdatera rapporter om avvikande kontrollsummor", "maintenance_integrity_missing_file": "Filer saknas", "maintenance_integrity_missing_file_description": "Filer som har registrerats i Immichs databas men som saknas i filsystemet.", - "maintenance_integrity_missing_file_job": "Kolla efter saknade filer", + "maintenance_integrity_missing_file_job": "Kontrollera om filer saknas", "maintenance_integrity_missing_file_refresh_job": "Uppdatera rapporter om saknade filer", "maintenance_integrity_report": "Integritetsrapport", "maintenance_integrity_untracked_file": "Ospårade filer", - "maintenance_integrity_untracked_file_description": "Okända filer i Immichs kataloger.", - "maintenance_integrity_untracked_file_job": "Kolla efter okända filer", - "maintenance_integrity_untracked_file_refresh_job": "Uppdatera rapporter om okända filer", + "maintenance_integrity_untracked_file_description": "Filer i Immichs kataloger som saknar en post i Immichs databas.", + "maintenance_integrity_untracked_file_job": "Kontrollera ospårade filer", + "maintenance_integrity_untracked_file_refresh_job": "Uppdatera rapporter om ospårade filer", "maintenance_restore_backup": "Återställ säkerhetskopia", - "maintenance_restore_backup_description": "Immich kommer att återställas från den valda säkerhetskopian. En ny säkerhetskopia kommer att skapas innan du fortsätter.", + "maintenance_restore_backup_description": "Immich rensas och återställs från den valda säkerhetskopian. En ny säkerhetskopia skapas innan återställningen fortsätter.", "maintenance_restore_backup_different_version": "Denna säkerhetskopia skapades med en annan version av Immich!", - "maintenance_restore_backup_unknown_version": "Kunde inte fastställa säkerhetskopians verison.", + "maintenance_restore_backup_unknown_version": "Det gick inte att fastställa säkerhetskopians version.", "maintenance_restore_database_backup": "Återställ databasens säkerhetskopia", "maintenance_restore_database_backup_description": "Återställ till ett tidigare databasläge med hjälp av en säkerhetskopia", "maintenance_settings": "Underhåll", "maintenance_settings_description": "Försätt Immich i underhållsläge.", "maintenance_start": "Växla till underhållsläge", - "maintenance_start_error": "Misslyckades att starta underhållsläget.", + "maintenance_start_error": "Det gick inte att starta underhållsläget.", "maintenance_upload_backup": "Ladda upp en säkerhetskopia av databasen", "maintenance_upload_backup_error": "Det gick inte att ladda upp säkerhetskopian. Är det en .sql/.sql.gz-fil?", "manage_concurrency": "Hantera samtidighet", @@ -219,31 +234,31 @@ "manage_log_settings": "Hantera logginställningar", "map_dark_style": "Mörk stil", "map_enable_description": "Aktivera kartfunktioner", - "map_gps_settings": "Karta & GPS Inställningar", - "map_gps_settings_description": "Ändra kartor & GPS (Omvänd geokodning) inställningar", + "map_gps_settings": "Inställningar för karta och GPS", + "map_gps_settings_description": "Hantera inställningar för karta, GPS och omvänd geokodning", "map_implications": "Kartfunktionen är beroende av en extern kartbitstjänst (tiles.immich.cloud)", "map_light_style": "Ljus stil", - "map_manage_reverse_geocoding_settings": "Hantera inställningar för Omvänd geokodning", - "map_reverse_geocoding": "Omvänd Geokodning", + "map_manage_reverse_geocoding_settings": "Hantera inställningar för omvänd geokodning", + "map_reverse_geocoding": "Omvänd geokodning", "map_reverse_geocoding_enable_description": "Aktivera omvänd geokodning", "map_reverse_geocoding_settings": "Inställningar för omvänd geokodning", "map_settings": "Karta", "map_settings_description": "Hantera kartinställningar", - "map_style_description": "URL till en style.json-karto tema", + "map_style_description": "URL till ett karttema i formatet style.json", "memory_cleanup_job": "Rensa minnen", "memory_generate_job": "Generera minnen", "metadata_extraction_job": "Extrahera metadata", "metadata_extraction_job_description": "Läs in metadata (t.ex. GPS, ansikten och upplösning) för varje objekt", "metadata_faces_import_setting": "Aktivera import av ansikten", - "metadata_faces_import_setting_description": "Importera ansikten från bildens EXIF-data och sidecar-fil", - "metadata_settings": "Metadata-inställningar", - "metadata_settings_description": "Hantera metadata-inställningar", + "metadata_faces_import_setting_description": "Importera ansikten från bildens Exif-data och sidofiler", + "metadata_settings": "Metadatainställningar", + "metadata_settings_description": "Hantera metadatainställningar", "migration_job": "Migrering", "migration_job_description": "Migrera miniatyrbilder för objekt och ansikten till den senaste mappstrukturen", "nightly_tasks_cluster_faces_setting_description": "Kör ansiktsigenkänning på nyligen upptäckta ansikten", - "nightly_tasks_cluster_new_faces_setting": "Kluster nya ansikten", - "nightly_tasks_database_cleanup_setting": "Uppgifter för databassanering", - "nightly_tasks_database_cleanup_setting_description": "Rensa bort gammal, utgången data från databasen", + "nightly_tasks_cluster_new_faces_setting": "Gruppera nya ansikten", + "nightly_tasks_database_cleanup_setting": "Databasrensning", + "nightly_tasks_database_cleanup_setting_description": "Rensa gamla och utgångna data från databasen", "nightly_tasks_generate_memories_setting": "Generera minnen", "nightly_tasks_generate_memories_setting_description": "Skapa nya minnen från objekt", "nightly_tasks_missing_thumbnails_setting": "Generera saknade miniatyrbilder", @@ -252,63 +267,63 @@ "nightly_tasks_settings_description": "Hantera nattliga uppgifter", "nightly_tasks_start_time_setting": "Starttid", "nightly_tasks_start_time_setting_description": "Tidpunkten då servern börjar köra de nattliga uppgifterna", - "nightly_tasks_sync_quota_usage_setting": "Synkroniseringskvotanvändning", - "nightly_tasks_sync_quota_usage_setting_description": "Uppdatera användarlagringskvot baserat på aktuell användning", - "no_paths_added": "Inga vägar tillagda", - "no_pattern_added": "Inga mönster tillagda", + "nightly_tasks_sync_quota_usage_setting": "Synkronisera kvotanvändning", + "nightly_tasks_sync_quota_usage_setting_description": "Uppdatera användarens lagringskvot utifrån den aktuella användningen", + "no_paths_added": "Inga sökvägar har lagts till", + "no_pattern_added": "Inga mönster har lagts till", "note_apply_storage_label_previous_assets": "Obs: Om du vill använda lagringsetiketten på tidigare uppladdade objekt, kör du", "note_cannot_be_changed_later": "OBS: Detta kan inte ändras i efterhand!", - "notification_email_from_address": "Från adress", - "notification_email_from_address_description": "Avsändarens e-post, till exempel: \"Immich Fotoserver \". Säkerställ att du använder en adress som du har tillåtelse att skicka e-post från.", - "notification_email_host_description": "Värd för epostservern (t.ex. smtp.immich.app)", + "notification_email_from_address": "Avsändaradress", + "notification_email_from_address_description": "Avsändarens e-postadress, exempelvis \"Immich Photo Server \". Använd en adress som du har rätt att skicka e-post från.", + "notification_email_host_description": "E-postserverns värdnamn (t.ex. smtp.immich.app)", "notification_email_ignore_certificate_errors": "Ignorera certifikatfel", - "notification_email_ignore_certificate_errors_description": "Ignorera valideringsfel för TLS-certifikat (rekommenderas ej)", - "notification_email_password_description": "Lösenord att använda för att verifiera identitet med epostservern", - "notification_email_port_description": "Port på epostservern (t.ex. 25, 465 eller 587)", + "notification_email_ignore_certificate_errors_description": "Ignorera valideringsfel för TLS-certifikat (rekommenderas inte)", + "notification_email_password_description": "Lösenord som används vid autentisering mot e-postservern", + "notification_email_port_description": "E-postserverns port (t.ex. 25, 465 eller 587)", "notification_email_secure": "SMTPS", "notification_email_secure_description": "Använd SMTPS (SMTP över TLS)", - "notification_email_sent_test_email_button": "Skicka test-epost och spara", - "notification_email_setting_description": "Inställningar för att skicka epostnotiser", - "notification_email_test_email": "Skicka test-epost", - "notification_email_test_email_failed": "Misslyckades med att skicka test-epost, undersök dina värden", - "notification_email_test_email_sent": "Ett testmail har skickats till {email}. Kontrollera din inkorg.", - "notification_email_username_description": "Användarnamn att använda vid autentisering med epost-servern", - "notification_enable_email_notifications": "Aktivera epost-notiser", - "notification_settings": "Notisinställningar", - "notification_settings_description": "Hantera notisinställingar, inklusive epost", + "notification_email_sent_test_email_button": "Skicka testmeddelande och spara", + "notification_email_setting_description": "Inställningar för att skicka e-postaviseringar", + "notification_email_test_email": "Skicka testmeddelande", + "notification_email_test_email_failed": "Det gick inte att skicka testmeddelandet. Kontrollera värdena", + "notification_email_test_email_sent": "Ett testmeddelande har skickats till {email}. Kontrollera inkorgen.", + "notification_email_username_description": "Användarnamn som används vid autentisering mot e-postservern", + "notification_enable_email_notifications": "Aktivera e-postaviseringar", + "notification_settings": "Aviseringsinställningar", + "notification_settings_description": "Hantera aviseringsinställningar, inklusive e-post", "oauth_allow_insecure_requests": "Tillåt osäkra förfrågningar", "oauth_allow_insecure_requests_description": "VARNING: Detta inaktiverar TLS-certifikatvalidering för OAuth-förfrågningar och kan utsätta dig för MITM-attacker.", - "oauth_auto_launch": "Autostart", - "oauth_auto_launch_description": "Starta OAuth-loginflödet automatiskt vid navigering till loginsidan", - "oauth_auto_register": "Autoregistrera", + "oauth_auto_launch": "Starta automatiskt", + "oauth_auto_launch_description": "Starta OAuth-inloggningen automatiskt när inloggningssidan öppnas", + "oauth_auto_register": "Registrera automatiskt", "oauth_auto_register_description": "Registrera nya användare automatiskt efter inloggning med OAuth", "oauth_button_text": "Knapptext", "oauth_client_secret_description": "Krävs för konfidentiell klient, eller om PKCE (Proof Key for Code Exchange) inte stöds för publik klient.", "oauth_enable_description": "Logga in med OAuth", - "oauth_end_session_url_description": "Omdirigera användaren till denna URI när de loggar ut.", - "oauth_mobile_redirect_uri": "Telefonomdirigernings-URI", - "oauth_mobile_redirect_uri_override": "Telefonomdirigerings-URI överrskridning", - "oauth_mobile_redirect_uri_override_description": "Aktivera om OAuth-leverantören inte tillåter mobila URI:er, så som ''{callback}''", + "oauth_end_session_url_description": "Omdirigera användaren till denna URI vid utloggning.", + "oauth_mobile_redirect_uri": "Omdirigerings-URI för mobil", + "oauth_mobile_redirect_uri_override": "Åsidosättning av omdirigerings-URI för mobil", + "oauth_mobile_redirect_uri_override_description": "Aktivera när OAuth-leverantören inte tillåter en mobil URI, exempelvis ''{callback}''", "oauth_prompt_description": "Promptparameter (t.ex. select_account, login, consent)", "oauth_role_claim": "Rollanspråk", - "oauth_role_claim_description": "Bevilja administratörsåtkomst automatiskt baserat på förekomsten av detta påstående. Påståendet kan innehålla antingen 'user' eller 'admin'.", + "oauth_role_claim_description": "Bevilja automatiskt administratörsåtkomst utifrån detta anspråk. Anspråket kan ha värdet 'user' eller 'admin'.", "oauth_settings": "OAuth", - "oauth_settings_description": "Hantera OAuth-logininställningar", + "oauth_settings_description": "Hantera inställningar för OAuth-inloggning", "oauth_settings_more_details": "För ytterligare detaljer om denna funktion, se dokumentationen.", - "oauth_storage_label_claim": "Användaranknuten lagringsetikett", - "oauth_storage_label_claim_description": "Sätter automatiskt angiven användares lagringsetikett.", - "oauth_storage_quota_claim": "Användaranknuten lagringskvot", - "oauth_storage_quota_claim_description": "Sätter automatiskt angiven användares lagringskvot.", + "oauth_storage_label_claim": "Anspråk för lagringsetikett", + "oauth_storage_label_claim_description": "Ange automatiskt användarens lagringsetikett till värdet i detta anspråk.", + "oauth_storage_quota_claim": "Anspråk för lagringskvot", + "oauth_storage_quota_claim_description": "Ange automatiskt användarens lagringskvot till värdet i detta anspråk.", "oauth_storage_quota_default": "Standardlagringskvot (GiB)", - "oauth_storage_quota_default_description": "Kvot i GiB som används när ingen fordran angetts.", - "oauth_timeout": "Begäran tog för lång tid", - "oauth_timeout_description": "Timeout för förfrågningar i millisekunder", + "oauth_storage_quota_default_description": "Kvot i GiB som används när inget anspråk anges.", + "oauth_timeout": "Tidsgräns för begäran", + "oauth_timeout_description": "Tidsgräns för begäranden i millisekunder", "ocr_job_description": "Använd maskininlärning för att känna igen text i bilder", - "password_enable_description": "Logga in med epost och lösenord", + "password_enable_description": "Logga in med e-postadress och lösenord", "password_settings": "Lösenordsinloggning", - "password_settings_description": "Hantera inställningar för lösenords-inloggning", + "password_settings_description": "Hantera inställningar för lösenordsinloggning", "paths_validated_successfully": "Samtliga sökvägar kunde bekräftas", - "person_cleanup_job": "Person rensning", + "person_cleanup_job": "Personrensning", "queue_details": "Köinformation", "queues": "Jobbköer", "queues_page_description": "Sida för administratörsjobbköer", @@ -327,8 +342,8 @@ "send_welcome_email": "Skicka välkomstmail", "server_external_domain_settings": "Extern domän", "server_external_domain_settings_description": "Domän som används för externa länkar", - "server_public_users": "Vanlig användare", - "server_public_users_description": "Alla användare (namn och e-post) är listade när man lägger till en användare till ett delat album. Om inaktiverat, kommer användarlistan endast vara synlig för administratörer.", + "server_public_users": "Offentliga användare", + "server_public_users_description": "Alla användare, med namn och e-postadress, visas när en användare läggs till i ett delat album. När funktionen är inaktiverad är användarlistan endast tillgänglig för administratörer.", "server_settings": "Serverinställningar", "server_settings_description": "Hantera serverinställningar", "server_stats_page_description": "Statistiksida för administratörsservern", @@ -341,50 +356,50 @@ "smart_search_job_description": "Kör maskininlärning på objekt för att stödja smart sökning", "storage_template_date_time_description": "Tidsstämpel för objektets skapande används för datum och tidsinformation", "storage_template_date_time_sample": "Exempeltid {date}", - "storage_template_enable_description": "Aktivera mallmotor för lagring", - "storage_template_hash_verification_enabled": "Hash-verifiering aktiverat", - "storage_template_hash_verification_enabled_description": "Aktiverar hash-verifiering, deaktiviera inte om du inte är säker på implikationerna", - "storage_template_migration": "Migrering av Lagringsmallar", - "storage_template_migration_description": "Applicera aktiv {template} till tidigare uppladdade objekt", - "storage_template_migration_info": "Lagringsmallen kommer att konvertera alla filändelser till gemener. Ändringar gäller endast för nya objekt. För att retoaktivt tillämpa mallen på befintliga objekt, kör {job}.", - "storage_template_migration_job": "Lagringsmall migreringsjobb", - "storage_template_more_details": "För mer information om den här funktionen se Lagringsmall och dess konsekvenser", - "storage_template_onboarding_description_v2": "Denna funktion kommer när den är aktiverad att auto-organisera filer baserat på en användardefinierad mall. För mer information se dokumentationen.", - "storage_template_path_length": "Uppskattad längdbegränsning på sökväg: {length, number}/{limit, number}", + "storage_template_enable_description": "Aktivera motorn för lagringsmallar", + "storage_template_hash_verification_enabled": "Hashverifiering aktiverad", + "storage_template_hash_verification_enabled_description": "Aktiverar hashverifiering. Inaktivera inte funktionen om du inte är säker på konsekvenserna", + "storage_template_migration": "Migrering av lagringsmall", + "storage_template_migration_description": "Tillämpa den aktuella {template} på tidigare uppladdade objekt", + "storage_template_migration_info": "Lagringsmallen konverterar alla filändelser till gemener. Malländringar gäller endast nya objekt. Kör {job} för att tillämpa mallen retroaktivt på tidigare uppladdade objekt.", + "storage_template_migration_job": "Migreringsjobb för lagringsmall", + "storage_template_more_details": "Mer information om den här funktionen finns under Lagringsmall och konsekvenser", + "storage_template_onboarding_description_v2": "När funktionen är aktiverad ordnas filer automatiskt utifrån en användardefinierad mall. Mer information finns i dokumentationen.", + "storage_template_path_length": "Ungefärlig gräns för sökvägens längd: {length, number}/{limit, number}", "storage_template_settings": "Lagringsmall", "storage_template_settings_description": "Hantera mappstruktur och filnamn för uppladdade objekt", - "storage_template_user_label": "{label} är användarens lagringsmärkning", + "storage_template_user_label": "{label} är användarens lagringsetikett", "system_settings": "Systeminställningar", - "tag_cleanup_job": "Markera för rensning", + "tag_cleanup_job": "Taggrensning", "template_email_available_tags": "Du kan använda följande variablar i din mall: {tags}", - "template_email_if_empty": "Om mallen är tom, kommer standard e-post att användas.", - "template_email_invite_album": "Inbjudan Album Mall", + "template_email_if_empty": "Om mallen är tom används standardmeddelandet.", + "template_email_invite_album": "Mall för albuminbjudan", "template_email_preview": "Förhandsgranskning", - "template_email_settings": "E-post mall", - "template_email_update_album": "Uppdatera Album Mall", - "template_email_welcome": "Välkommen e-post mall", - "template_settings": "Notifikations Mall", - "template_settings_description": "Hantera anpassade mallar för notifikationer", + "template_email_settings": "E-postmallar", + "template_email_update_album": "Mall för albumuppdatering", + "template_email_welcome": "Mall för välkomstmeddelande", + "template_settings": "Aviseringsmallar", + "template_settings_description": "Hantera anpassade aviseringsmallar", "theme_custom_css_settings": "Anpassad CSS", - "theme_custom_css_settings_description": "Cascading Style Sheets möjliggör designanpassningar av Immich.", + "theme_custom_css_settings_description": "Med CSS-formatmallar kan Immichs utseende anpassas.", "theme_settings": "Temainställningar", "theme_settings_description": "Hantera anpassningar av webbgränssnittet för Immich", "thumbnail_generation_job": "Generera Miniatyrer", "thumbnail_generation_job_description": "Generera stora, små och suddiga miniatyrer för varje objekt, samt för varje person", "transcoding_acceleration_api": "Accelerations-API", - "transcoding_acceleration_api_description": "API som kommer att interagera med din enhet för att accelerera omkodning. Inställning är 'best effort': vid fel kommer den att återgå till mjukvarubaserad omkodning. VP9 kan fungera eller inte, beroende på din hårdvara.", + "transcoding_acceleration_api_description": "Det API som kommunicerar med enheten för att accelerera omkodning. Inställningen används efter bästa förmåga och faller tillbaka på programvarubaserad omkodning vid fel. Om VP9 fungerar beror på maskinvaran.", "transcoding_acceleration_nvenc": "NVENC (kräver NVIDIA GPU)", - "transcoding_acceleration_qsv": "Quick Sync (kräver 7 generationens Intel CPU eller senare)", - "transcoding_acceleration_rkmpp": "RKMPP (bara med Rockchip SOCs)", + "transcoding_acceleration_qsv": "Quick Sync (kräver en Intel-processor av sjunde generationen eller senare)", + "transcoding_acceleration_rkmpp": "RKMPP (endast för Rockchip-SoC:er)", "transcoding_acceleration_vaapi": "VAAPI", "transcoding_accepted_audio_codecs": "Accepterade ljud-codecs", "transcoding_accepted_audio_codecs_description": "Välj vilka ljud-codecs som inte behöver omkodas. Används endast för vissa omkodningspolicyer.", "transcoding_accepted_containers": "Accepterade behållare", - "transcoding_accepted_containers_description": "Välj vilka kontainerformat som inte behöver remuxas till MP4. Endast används för vissa transcoding-politischer.", + "transcoding_accepted_containers_description": "Välj vilka containerformat som inte behöver muxas om till MP4. Används endast för vissa omkodningsprinciper.", "transcoding_accepted_video_codecs": "Accepterade video-codecs", "transcoding_accepted_video_codecs_description": "Välj vilka video-codecs som inte behöver omkodas. Används endast för vissa omkodningspolicyer.", "transcoding_advanced_options_description": "Val som de flesta användare inte bör behöva ändra", - "transcoding_audio_codec": "Ljud-codec", + "transcoding_audio_codec": "Ljudkodek", "transcoding_audio_codec_description": "Opus är bästa kvalitetsvalet, men är inte lika kompatibelt med äldre enheter eller mjukvara.", "transcoding_bitrate_description": "Videor som är i högre än max bithastighet eller inte i ett accepterat format", "transcoding_codecs_learn_more": "För att läsa mer om terminologin här se FFmpeg-dokumentationen för H.264 kodek, HEVC kodek och VP9 kodek.", @@ -394,15 +409,15 @@ "transcoding_constant_rate_factor_description": "Nivå på videokvalitet. Typiska värden är 23 för H.264, 28 för HEVC, 31 för VP9 och 35 för AV1. Lägre är bättre, men producerar större filer.", "transcoding_disabled_description": "Omkoda inte videofiler, detta kan störa uppspelning på vissa klienter", "transcoding_encoding_options": "Kodningsval", - "transcoding_encoding_options_description": "Välj codec, upplösning, kvalitet och andra val för kodade videor", + "transcoding_encoding_options_description": "Ange kodekar, upplösning, kvalitet och andra alternativ för kodade videor", "transcoding_hardware_acceleration": "Hårdvaruacceleration", "transcoding_hardware_acceleration_description": "Experimentell: snabbare transkodning men kan minska kvaliteten vid samma bithastighet", "transcoding_hardware_decoding": "Hårdvaruavkodning", - "transcoding_hardware_decoding_setting_description": "Aktiverar end-to-end accelerering i stället för endast kodningsacceleration. Fungerar inte med alla videor.", + "transcoding_hardware_decoding_setting_description": "Aktiverar acceleration i hela bearbetningskedjan i stället för att endast accelerera kodningen. Fungerar kanske inte med alla videor.", "transcoding_max_b_frames": "Max B-ramar", - "transcoding_max_b_frames_description": "Högre värden förbättrar kompressionseffektiviteten, men saktar ner kodningen. Kan vara inkompatibel med hårdvaruacceleration på äldre enheter. 0 avaktiverar B-frames, medan -1 anger detta värde automatiskt.", + "transcoding_max_b_frames_description": "Högre värden förbättrar komprimeringseffektiviteten men gör kodningen långsammare. Kan vara inkompatibelt med maskinvaruacceleration på äldre enheter. Värdet 0 inaktiverar B-bildrutor och -1 anger värdet automatiskt.", "transcoding_max_bitrate": "Max bithastighet", - "transcoding_max_bitrate_description": "En maximal bitrate kan göra filstorlekar mer förutsägbara till en liten kostnad på kvalitet. Vid 720p är typiska värden 2600 kbit/s för VP9 eller HEVC, eller 4500 kbit/s för H.264. Inaktiverad om satt till 0. När ingen enhet anges så kommer k (för kbit/s) användas; därför är 5000, 5000k och 5M (för Mbit/s) likvärdiga.", + "transcoding_max_bitrate_description": "En högsta bithastighet gör filstorlekarna mer förutsägbara till priset av en liten kvalitetsförlust. Vid 720p är typiska värden 2600 kbit/s för VP9 eller HEVC och 4500 kbit/s för H.264. Funktionen inaktiveras med värdet 0. Om ingen enhet anges antas kbit/s, så 5000, 5000k och 5M är likvärdiga.", "transcoding_max_keyframe_interval": "Max nyckelbildruteintervall", "transcoding_max_keyframe_interval_description": "Sätter det maximala bildruteavståndet mellan nyckelbildrutor. Lägre värden försämrar kompressionseffektiviteten, men förbättrar söktiderna och kan förbättra kvaliteten i scener med snabb rörelse. 0 ställer in detta värde automatiskt.", "transcoding_optimal_description": "Videor som är högre än mållösning eller inte i ett accepterat format", @@ -410,31 +425,35 @@ "transcoding_policy_description": "Välj när en video ska omkodas", "transcoding_preferred_hardware_device": "Föredragen hårdvaruenhet", "transcoding_preferred_hardware_device_description": "Gäller enbart VAAPI och QSV. Ställer in dri-läget som används för hårdvaruomkodning.", - "transcoding_preset_preset": "Förinställning (-preset)", - "transcoding_preset_preset_description": "Kompressionshastighet. Långsammare preset ger mindre filer och högre kvalitet för en given bitrate. VP9 ignorerar hastigheter högre än 'faster'.", + "transcoding_preset_preset": "Förval (-preset)", + "transcoding_preset_preset_description": "Komprimeringshastighet. Långsammare förval ger mindre filer och högre kvalitet vid en viss bithastighet. VP9 ignorerar hastigheter över 'faster'.", "transcoding_realtime": "Realtidskodning [EXPERIMENTELL]", "transcoding_realtime_description": "Tillåter omkodning i realtid medan videon streamas. Möjliggör kvalitetsväxling, men kan orsaka högre uppspelningsfördröjning och hackning beroende på serverns kapacitet.", "transcoding_realtime_enabled": "Aktivera realtidsomkodning", "transcoding_realtime_enabled_description": "Om den är inaktiverad vägrar servern att starta nya realtidsomkodning sessioner i realtid.", + "transcoding_realtime_resolutions": "Upplösningar", + "transcoding_realtime_resolutions_description": "De upplösningar som erbjuds för realtidstranskodning. Högre upplösningar kan orsaka uppspelningsproblem om servern inte kan transkoda dem tillräckligt snabbt.", + "transcoding_realtime_video_codecs": "Videokodekar", + "transcoding_realtime_video_codecs_description": "De videokodekar som erbjuds för realtidstranskodning. Klienter väljer det bästa alternativet de stödjer under uppspelning. AV1 är effektivare än HEVC, som är effektivare än H.264. Vid hårdvaruacceleration ska du endast välja de kodekar som acceleratorn kan koda. Vid mjukvarutranskodning bör du tänka på att H.264 är snabbare än AV1, som är snabbare än HEVC.", "transcoding_reference_frames": "Referensbildrutor", "transcoding_reference_frames_description": "Antalet bildrutor som tas i beaktande när en given bildruta ska komprimeras. Högre värden ger effektivare kompression på bekostnad av långsammare kodning. 0 ställer in detta värde automatiskt.", - "transcoding_required_description": "Enbart videos som inte är ett accepterat format", + "transcoding_required_description": "Endast videor som inte har ett godkänt format", "transcoding_settings": "Inställningar för omkodning av video", "transcoding_settings_description": "Hantera vilka videor som ska omkodas och hur de ska behandlas", "transcoding_target_resolution": "Förväntad upplösning", "transcoding_target_resolution_description": "En högre upplösning kan bevara fler detaljer men kan ta längre tid at koda, ha större fil storlek och kan försämra appens svarstid.", "transcoding_temporal_aq": "Temporär AQ", - "transcoding_temporal_aq_description": "Gäller endast NVENC. Temporal adaptiv kvantisering ökar kvaliteten på scener med hög detaljrikedom och låg rörelse. Kan vara inkompatibel med äldre enheter.", + "transcoding_temporal_aq_description": "Gäller endast NVENC. Tidsadaptiv kvantisering förbättrar kvaliteten i detaljrika scener med lite rörelse. Kan vara inkompatibel med äldre enheter.", "transcoding_threads": "Trådar", "transcoding_threads_description": "Högre värden leder till snabbare kodning, men lämnar mindre utrymme för servern att bearbeta andra uppgifter medan den är aktiv. Detta värde bör inte vara mer än antalet CPU-kärnor. Maximerar användningen om den är inställd på 0.", "transcoding_tone_mapping": "Ton mappning", "transcoding_tone_mapping_description": "Försöker att bevara utseendet på HDR-videor när de konverteras till SDR. Varje algoritm gör olika avvägningar för färg, detaljer och ljusstyrka. Hable bevarar detaljer, Mobius bevarar färg och Reinhard bevarar ljusstyrkan.", "transcoding_transcode_policy": "Omkodningspolicy", - "transcoding_transcode_policy_description": "Policy för när en video ska omkodas. HDR-videor och videor med ett annat pixelformat än YUV 4:2:0 kommer alltid att omkodas (förutom om omkodning är inaktiverad).", + "transcoding_transcode_policy_description": "Princip för när en video ska kodas om. HDR-videor och videor med ett annat pixelformat än YUV 4:2:0 kodas alltid om, utom när omkodning är inaktiverad.", "transcoding_two_pass_encoding": "Två-pass kodning", - "transcoding_two_pass_encoding_setting_description": "Koda om i två omgångar för att producera bättre kodade videor. När max bitrate är aktiverat (krävs för att det ska fungera med H.264 och HEVC), använder det här läget ett bithastighetsområde baserat på max bitrate och ignorerar CRF. För VP9 kan CRF användas om max bitrate är inaktiverat.", - "transcoding_video_codec": "Video codec", - "transcoding_video_codec_description": "VP9 har hög effektivitet och webbkompatibilitet, men tar längre tid att omkoda. HEVC fungerar på liknande sätt, men har lägre webbkompatibilitet. H.264 är allmänt kompatibel och snabb att omkoda, men producerar mycket större filer. AV1 är den mest effektiva codec men saknar stöd på äldre enheter.", + "transcoding_two_pass_encoding_setting_description": "Koda om i två pass för att skapa bättre kodade videor. När högsta bithastighet är aktiverad, vilket krävs för H.264 och HEVC, använder läget ett bithastighetsintervall baserat på den högsta bithastigheten och ignorerar CRF. För VP9 kan CRF användas när högsta bithastighet är inaktiverad.", + "transcoding_video_codec": "Videokodek", + "transcoding_video_codec_description": "VP9 är effektivt och har god webbkompatibilitet men tar längre tid att koda om. HEVC fungerar på liknande sätt men har sämre webbkompatibilitet. H.264 har bred kompatibilitet och kodas om snabbt men ger betydligt större filer. AV1 är den effektivaste kodeken men stöds inte av alla äldre enheter.", "trash_enabled_description": "Aktivera papperskorgen", "trash_number_of_days": "Antal dagar", "trash_number_of_days_description": "Antal dagar att förvara objekten i papperskorgen innan de tas bort permanent", @@ -444,10 +463,10 @@ "unlink_all_oauth_accounts_description": "Kom ihåg att ta bort länken till alla OAuth-konton innan du migrerar till en ny leverantör.", "unlink_all_oauth_accounts_prompt": "Är du säker på att du vill ta bort länken till alla OAuth-konton? Detta återställer OAuth-ID:t för varje användare och kan inte ångras.", "user_cleanup_job": "Användarrensning", - "user_delete_delay": "{user}'s konto och objekt kommer att schemaläggas för permanent radering om {delay, plural, one {# dag} other {# dagar}}.", + "user_delete_delay": "{user}s konto och objekt schemaläggs för permanent borttagning om {delay, plural, one {# day} other {# days}}.", "user_delete_delay_settings": "Borttagningsfördröjning", "user_delete_delay_settings_description": "Antal dagar efter borttagning för att permanent radera en användares konto och objekt. Arbetet med borttagning av användare körs vid midnatt för att söka efter användare som är redo för radering. Ändringar av denna inställning kommer att utvärderas vid nästa körning.", - "user_delete_immediately": "{user}'s konto och objekt kommer att stå i kö för omedelbar permanent radering.", + "user_delete_immediately": "{user}s konto och objekt köplaceras för omedelbar permanent borttagning.", "user_delete_immediately_checkbox": "Köa användare och objekt för omedelbar radering", "user_details": "Användardetaljer", "user_management": "Användarhantering", @@ -464,12 +483,12 @@ "version_check_enabled_description": "Aktivera versionskontroll", "version_check_implications": "Funktionen för versionskontroll är beroende av periodisk kommunikation med {server}", "version_check_settings": "Versionskontroll", - "version_check_settings_description": "Aktivera/inaktivera notis om ny version", + "version_check_settings_description": "Aktivera eller inaktivera aviseringar om nya versioner", "video_conversion_job": "Omkoda videor", "video_conversion_job_description": "Koda om videor för bredare kompatibilitet med webbläsare och enheter" }, "admin_email": "E-postadress för administratör", - "admin_password": "Admin Lösenord", + "admin_password": "Administratörslösenord", "administration": "Administration", "advanced": "Avancerat", "advanced_settings_clear_image_cache": "Rensa bild-cache", @@ -530,10 +549,10 @@ "always_keep": "Behåll alltid", "always_keep_photos_hint": "Frigör utrymme behåller alla foton på den här enheten.", "always_keep_videos_hint": "Frigör utrymme behåller alla videor på den här enheten.", - "api_key": "API Nyckel", + "api_key": "API-nyckel", "api_key_description": "Detta värde kommer bara att visas en gång. Se till att kopiera det innan du stänger fönstret.", "api_key_empty": "Ditt API-nyckelnamn ska inte vara tomt", - "api_keys": "API-Nycklar", + "api_keys": "API-nycklar", "app_architecture_variant": "Variant (Arkitektur)", "app_bar_signout_dialog_content": "Är du säker på att du vill logga ut?", "app_bar_signout_dialog_title": "Logga ut", @@ -578,17 +597,18 @@ "asset_viewer_settings_title": "Objektvisare", "assets": "Objekt", "assets_added_to_album_count": "Lade till {count, plural, one {# objekt} other {# objekt}} i albumet", - "assets_added_to_albums_count": "Lade till {assetTotal, plural, one {# objekt} other {# objekt}} till {albumTotal, plural, one {# album} other {# album}}", - "assets_cannot_be_added_to_album_count": "{count, plural, one {Objekt} other {Objekt}} kan inte läggas till i albumet", - "assets_cannot_be_added_to_albums": "{count, plural, one {Objekt} other {Objekt}} kan inte läggas till i något av albumen", + "assets_added_to_album_partial_count": "Lade till {successCount} av {totalCount} {totalCount, plural, one {objekt} other {objekt}} i albumet", + "assets_added_to_albums_count": "Lade till {assetTotal, plural, one {# objekt} other {# objekt}} i {albumTotal, plural, one {# album} other {# album}}", + "assets_cannot_be_added_to_album_count": "{count, plural, one {Objektet} other {Objekten}} kan inte läggas till i albumet", + "assets_cannot_be_added_to_albums": "{count, plural, one {Objektet} other {Objekten}} kan inte läggas till i något av albumen", "assets_count": "{count, plural, one {# objekt} other {# objekt}}", "assets_moved_to_trash_count": "Flyttade {count, plural, one {# objekt} other {# objekt}} till papperskorgen", - "assets_permanently_deleted_count": "{count, plural, one {# objekt} other {# objekt}} permanent raderade", + "assets_permanently_deleted_count": "Tog bort {count, plural, one {# objekt} other {# objekt}} permanent", "assets_removed_count": "Tog bort {count, plural, one {# objekt} other {# objekt}}", "assets_restore_confirmation": "Är du säker på att du vill återställa alla dina slängda objekt? Du kan inte ångra den här åtgärden! Observera att offlineobjekt inte kan återställas på detta sätt.", "assets_restored_count": "Återställde {count, plural, one {# objekt} other {# objekt}}", - "assets_trashed": "{count, plural, one {# objekt} other {# objekt}} {count, plural, one {flyttad} other {flyttade}} till papperskorgen", - "assets_trashed_count": "{count, plural, one {# objekt} other {# objekt}} {count, plural, one {flyttad} other {flyttade}} till papperskorgen", + "assets_trashed": "{count} objekt flyttades till papperskorgen", + "assets_trashed_count": "{count, plural, one {# objekt flyttades} other {# objekt flyttades}} till papperskorgen", "assets_were_part_of_album_count": "{count, plural, one {Objektet} other {Objekten}} tillhör redan albumet", "assets_were_part_of_albums_count": "{count, plural, one {Objektet} other {Objekten}} tillhör redan albumen", "authorized_devices": "Auktoriserade enheter", @@ -686,9 +706,9 @@ "city": "Stad", "cleanup_confirm_description": "Immich hittade {count} objekt (skapade före {date}) som säkerhetskopierats säkert till servern. Ta bort de lokala kopiorna från den här enheten?", "cleanup_confirm_prompt_title": "Ta bort från den här enheten?", - "cleanup_deleted_assets": "Flyttade {count, plural, one {# objekt} other {# objekt}} till enhetens papperskorg", + "cleanup_deleted_assets": "Flyttade {count} objekt till enhetens papperskorg", "cleanup_deleting": "Flyttar till papperskorg...", - "cleanup_found_assets": "Hittade {count} {count, plural, one {säkerhetskopierat objekt} other {säkerhetskopierade objekt}}", + "cleanup_found_assets": "Hittade {count} säkerhetskopierade objekt", "cleanup_found_assets_with_size": "Hittade {count} säkerhetskopierade objekt ({size})", "cleanup_icloud_shared_albums_excluded": "iCloud delade album exkluderas från skanningen", "cleanup_no_assets_found": "Inga objekt hittades som matchar kriterierna ovan. Frigör Utrymme kan bara ta bort objekt som har säkerhetskopierats till servern", @@ -723,7 +743,7 @@ "command_palette_to_show_all": "för att visa alla", "comment_deleted": "Kommentar raderad", "comment_options": "Kommentarsalternativ", - "comments_and_likes": "Kommentarer & likes", + "comments_and_likes": "Kommentarer och gillamarkeringar", "comments_are_disabled": "Kommentarer är avstängda", "common_create_new_album": "Skapa ett nytt album", "completed": "Klar", @@ -794,7 +814,6 @@ "custom_date": "Anpassat datum", "custom_locale": "Anpassad språkinställning", "custom_locale_description": "Formatera datum, tider och siffror baserat på valt språk och region", - "custom_url": "Anpassad URL", "cutoff_date_description": "Behåll bilder från…", "cutoff_day": "{count, plural, one {dag} other {dagar}}", "cutoff_year": "{count, plural, one {år} other {år}}", @@ -911,13 +930,13 @@ "editor_edits_applied_success": "Redigeringarna har tillämpats framgångsrikt", "editor_flip_horizontal": "Vänd horisontellt", "editor_flip_vertical": "Vänd vertikalt", - "editor_handle_corner": "{corner, select, top_left {Övre vänstra} top_right {Övre högra} bottom_left {Nedre vänstra} bottom_right {Nedre högra} other {A}} hörn handtag", - "editor_handle_edge": "{edge, select, top {Övre} bottom {Nedre} left {Vänster} right {Höger} other {En}} hörnhandtag", + "editor_handle_corner": "{corner, select, top_left {Övre vänstra} top_right {Övre högra} bottom_left {Nedre vänstra} bottom_right {Nedre högra} other {Ett}} hörnhandtag", + "editor_handle_edge": "{edge, select, top {Övre} bottom {Nedre} left {Vänster} right {Höger} other {Ett}} kanthandtag", "editor_orientation": "Orientering", "editor_reset_all_changes": "Återställ ändringar", "editor_rotate_left": "Rotera 90° moturs", "editor_rotate_right": "Rotera 90° medurs", - "email": "Epost", + "email": "E-post", "email_notifications": "E-postaviseringar", "empty_folder": "Mappen är tom", "empty_trash": "Töm papperskorg", @@ -967,7 +986,7 @@ "failed_to_keep_this_delete_others": "Misslyckades att behålla detta objekt och radera övriga objekt", "failed_to_load_asset": "Det gick inte att ladda objekt", "failed_to_load_assets": "Det gick inte att ladda objekten", - "failed_to_load_notifications": "Misslyckades med att ladda notifikationer", + "failed_to_load_notifications": "Det gick inte att läsa in aviseringar", "failed_to_load_people": "Det gick inte att ladda personer", "failed_to_remove_product_key": "Det gick inte att ta bort produktnyckeln", "failed_to_reset_pin_code": "Misslyckades med att återställa PIN-koden", @@ -988,15 +1007,15 @@ "unable_to_add_exclusion_pattern": "Det gick inte att lägga till uteslutningsmönster", "unable_to_add_partners": "Kunde inte lägga till partners", "unable_to_add_remove_archive": "Det går inte att {archived, select, true {ta bort objekt från} other {lägga till objekt till}} arkiv", - "unable_to_add_remove_favorites": "Det går inte att {favorite, select, true {add asset to} other {remove asset from}} favoriter", - "unable_to_archive_unarchive": "Det går inte att {archived, select, true {archive} other {archive}}", + "unable_to_add_remove_favorites": "Det går inte att {favorite, select, true {lägga till objektet i} other {ta bort objektet från}} favoriter", + "unable_to_archive_unarchive": "Det går inte att {archived, select, true {arkivera} other {ta bort från arkivet}}", "unable_to_change_album_user_role": "Kunde inte ändra albumanvändarens roll", "unable_to_change_date": "Kunde inte ändra datum", "unable_to_change_description": "Kunde inte ändra beskrivning", "unable_to_change_favorite": "Det går inte att ändra favorit för objekt", "unable_to_change_location": "Kunde inte ändra plats", "unable_to_change_password": "Det går inte att ändra lösenord", - "unable_to_change_visibility": "Det gick inte att ändra synligheten för {count, plural, one {# person} other {# people}}", + "unable_to_change_visibility": "Det gick inte att ändra synligheten för {count, plural, one {# person} other {# personer}}", "unable_to_complete_oauth_login": "Det gick inte att slutföra OAuth-inloggning", "unable_to_connect": "Det går inte att ansluta", "unable_to_copy_to_clipboard": "Kan inte kopiera till urklipp, se till att du kommer åt sidan via https", @@ -1026,11 +1045,11 @@ "unable_to_log_out_device": "Det gick inte att logga ut enheten", "unable_to_login_with_oauth": "Det gick inte att logga in med OAuth", "unable_to_play_video": "Kunde inte spela upp video", - "unable_to_reassign_assets_existing_person": "Det går inte att tilldela objekt till {name, select, null {an existing person} other {{name}}}", + "unable_to_reassign_assets_existing_person": "Det går inte att tilldela objekten till {name, select, null {en befintlig person} other {{name}}}", "unable_to_reassign_assets_new_person": "Kunde inte tilldela objekt till en annan person", "unable_to_refresh_user": "Kunde inte ladda om användaren", "unable_to_remove_album_users": "Kunde inte ta bort personen från albumet", - "unable_to_remove_api_key": "Det gick inte att ta bort API Keyet", + "unable_to_remove_api_key": "Det gick inte att ta bort API-nyckeln", "unable_to_remove_assets_from_shared_link": "Kunde inte ta bort objekt från delade länkar", "unable_to_remove_library": "Kunde inte ta bort bibliotek", "unable_to_remove_partner": "Kunde inte ta bort partner", @@ -1042,7 +1061,7 @@ "unable_to_restore_trash": "Det gick inte att återställa papperskorgen", "unable_to_restore_user": "Kunde inte återställa användare", "unable_to_save_album": "Kunde inte spara album", - "unable_to_save_api_key": "Det går inte att spara API Nyckel", + "unable_to_save_api_key": "Det gick inte att spara API-nyckeln", "unable_to_save_date_of_birth": "Det går inte att spara födelsedatum", "unable_to_save_name": "Kunde inte spara namn", "unable_to_save_profile": "Kunde inte spara profil", @@ -1149,12 +1168,12 @@ "group_owner": "Grupper efter ägare", "group_places_by": "Gruppera platser efter…", "group_year": "Gruppera efter årtal", - "haptic_feedback_title": "Haptisk Feedback", + "haptic_feedback_title": "Haptisk återkoppling", "has_quota": "Har kvot", "hash_asset": "Hash-objekt", "hashed_assets": "Hashade-objekt", "hashing": "Hashning", - "header_settings_add_header_tip": "Lägg till header", + "header_settings_add_header_tip": "Lägg till rubrik", "header_settings_field_validator_msg": "Värdet kan inte vara tomt", "header_settings_header_name_input": "Header-namn", "header_settings_header_value_input": "Header-värde", @@ -1176,21 +1195,21 @@ "id": "ID", "idle": "Inaktiv", "image": "Bild", - "image_alt_text_date": "{isVideo, select, true {Video} other {Bild}} tagen {date}", - "image_alt_text_date_1_person": "{isVideo, select, true {Video} other {Image}} tagen med {person1} den {date}", - "image_alt_text_date_2_people": "{isVideo, select, true {Video} other {Image}} tagen med {person1} och {person2} den {date}", - "image_alt_text_date_3_people": "{isVideo, select, true {Video} other {Image}} tagen med {person1}, {person2}, och {person3} den {date}", - "image_alt_text_date_4_or_more_people": "{isVideo, select, true {Video} other {Image}} tagen med {person1}, {person2}, och {additionalCount, number} andra den {date}", - "image_alt_text_date_place": "{isVideo, select, true {Video} other {Image}} tagen i {city}, {country} den {date}", - "image_alt_text_date_place_1_person": "{isVideo, select, true {Video} other {Image}} tagen i {city}, {country} med {person1} den {date}", - "image_alt_text_date_place_2_people": "{isVideo, select, true {Video} other {Image}} tagen i {city}, {country} med {person1} och {person2} den {date}", - "image_alt_text_date_place_3_people": "{isVideo, select, true {Video} other {Image}} tagen i {city}, {country} med {person1}, {person2}, och {person3} den {date}", - "image_alt_text_date_place_4_or_more_people": "{isVideo, select, true {Video} other {Image}} tagen i {city}, {country} med {person1}, {person2}, och {additionalCount, number} andre den {date}", + "image_alt_text_date": "{isVideo, select, true {Video} other {Bild}} tagen den {date}", + "image_alt_text_date_1_person": "{isVideo, select, true {Video} other {Bild}} tagen med {person1} den {date}", + "image_alt_text_date_2_people": "{isVideo, select, true {Video} other {Bild}} tagen med {person1} och {person2} den {date}", + "image_alt_text_date_3_people": "{isVideo, select, true {Video} other {Bild}} tagen med {person1}, {person2} och {person3} den {date}", + "image_alt_text_date_4_or_more_people": "{isVideo, select, true {Video} other {Bild}} tagen med {person1}, {person2} och {additionalCount, number} andra den {date}", + "image_alt_text_date_place": "{isVideo, select, true {Video} other {Bild}} tagen i {city}, {country} den {date}", + "image_alt_text_date_place_1_person": "{isVideo, select, true {Video} other {Bild}} tagen i {city}, {country} med {person1} den {date}", + "image_alt_text_date_place_2_people": "{isVideo, select, true {Video} other {Bild}} tagen i {city}, {country} med {person1} och {person2} den {date}", + "image_alt_text_date_place_3_people": "{isVideo, select, true {Video} other {Bild}} tagen i {city}, {country} med {person1}, {person2} och {person3} den {date}", + "image_alt_text_date_place_4_or_more_people": "{isVideo, select, true {Video} other {Bild}} tagen i {city}, {country} med {person1}, {person2} och {additionalCount, number} andra den {date}", "immich_logo": "Immich-logga", "immich_web_interface": "Immich Web gränssnitt", "import_from_json": "Importera från JSON", "import_path": "Importsökväg", - "in_albums": "I {count, plural, one {# album} other {# albums}}", + "in_albums": "I {count, plural, one {# album} other {# album}}", "in_archive": "I arkivet", "in_year": "I {year}", "in_year_selector": "In", @@ -1224,7 +1243,7 @@ "keep_on_device_hint": "Välj objekt som ska behållas på denna enhet", "keep_this_delete_others": "Behåll denna, radera övriga", "keeping": "Behåller: {items}", - "kept_this_deleted_others": "Behåll detta objekt och borttagna {count, plural, one {# objekt} other {# objekt}}", + "kept_this_deleted_others": "Behöll det här objektet och tog bort {count, plural, one {# objekt} other {# objekt}}", "keyboard_shortcuts": "Kortkommandon", "language": "Språk", "language_no_results_subtitle": "Försök att justera ditt sökord", @@ -1294,18 +1313,18 @@ "login_form_email_hint": "din.email@email.com", "login_form_endpoint_hint": "http://din-server-ip:port", "login_form_endpoint_url": "Slutpunkt-URL för server", - "login_form_err_invalid_email": "Ogiltig email", + "login_form_err_invalid_email": "Ogiltig e-postadress", "login_form_err_invalid_url": "Ogiltig webbadress", "login_form_err_leading_whitespace": "Mellanrum före", "login_form_err_trailing_whitespace": "Mellanrum efter", "login_form_failed_get_oauth_server_config": "Kunde inte logga in med OAuth. Kontrollera serverns webbadress", "login_form_failed_get_oauth_server_disable": "OAuth är inte tillgänglig på den här servern", - "login_form_failed_login": "Kunde inte logga in. Kontrollera serverns webbadress, email och lösenord", + "login_form_failed_login": "Det gick inte att logga in. Kontrollera serverns URL, e-postadress och lösenord", "login_form_handshake_exception": "Ett Undantag vid Handskakning med servern har skett. Aktivera stöd för självsignerade certifikat i inställningar om du använder ett självsignerat certifikat.", "login_form_password_hint": "lösenord", - "login_form_server_empty": "Ange en server-URL.", - "login_form_server_error": "Kunde inte ansluta till servern.", - "login_has_been_disabled": "Inloggning har blivit inaktiverat.", + "login_form_server_empty": "Ange en server-URL", + "login_form_server_error": "Kunde inte ansluta till servern", + "login_has_been_disabled": "Inloggning har blivit inaktiverat", "login_password_changed_error": "Ett fel uppstod vid uppdatering av ditt lösenord", "login_password_changed_success": "Uppdatering av lösenord lyckades", "logout_all_device_confirmation": "Är du säker på att du vill logga ut från alla enheter?", @@ -1367,7 +1386,7 @@ "map_settings_date_range_option_year": "Senaste året", "map_settings_date_range_option_years": "Senaste {years} åren", "map_settings_include_show_archived": "Inkludera Arkiverade", - "map_settings_include_show_partners": "Inkludera Partners", + "map_settings_include_show_partners": "Inkludera partner", "map_settings_only_show_favorites": "Visa Endast Favoriter", "map_settings_theme_settings": "Kart-tema", "mark_all_as_read": "Markera alla som lästa", @@ -1386,7 +1405,7 @@ "exit_fullscreen_mode": "Avsluta helskärmsläge", "loop": "Slinga", "media_error_description": "Ett mediefel orsakade att uppspelningen avbröts. Mediet kan vara skadat eller så stöder inte din webbläsare det här formatet.", - "media_loading": "media laddar", + "media_loading": "Media läses in", "mute": "Tysta", "network_error": "Nätverksfel", "network_error_description": "Ett nätverksfel orsakade att medianedladdningen misslyckades.", @@ -1419,9 +1438,9 @@ "merge": "Sammanfoga", "merge_people": "Sammanfoga personer", "merge_people_limit": "Du kan maximalt sammanfoga 5 ansikten på samma gång", - "merge_people_prompt": "Vill du sammanfoga dessa personer? Denna handling är oåterkallelig.", - "merge_people_successfully": "Personer sammanfogades framgångsrikt", - "merged_people_count": "Sammanfogat {count, plural, one {# person} other {# people}}", + "merge_people_prompt": "Vill du sammanfoga de här personerna? Åtgärden kan inte ångras.", + "merge_people_successfully": "Personerna har sammanfogats", + "merged_people_count": "Sammanfogade {count, plural, one {# person} other {# personer}}", "minFaces": "Minimiantal ansikten", "minFaces_description": "Minimiantal erkända ansikten för att en person ska visas", "minimize": "Minimera", @@ -1461,6 +1480,7 @@ "never": "aldrig", "new_album": "Nytt album", "new_api_key": "Ny API-nyckel", + "new_feature": "Ny funktion", "new_password": "Nytt lösenord", "new_person": "Ny person", "new_pin_code": "Ny PIN-kod", @@ -1484,7 +1504,7 @@ "no_checksum_remote": "Ingen kontrollsumma tillgänglig - kan inte hämta fjärrobjekt", "no_devices": "Inga auktoriserade enheter", "no_duplicates_found": "Inga dubbletter hittades.", - "no_exif_info_available": "Exif-information ej tillgänglig", + "no_exif_info_available": "Ingen Exif-information tillgänglig", "no_explore_results_message": "Ladda upp fler bilder för att utforska din samling.", "no_favorites_message": "Lägg till favoriter för att snabbt hitta dina bästa bilder och videor", "no_libraries_message": "Skapa ett externt bibliotek för att se dina bilder och videor", @@ -1492,7 +1512,7 @@ "no_locked_photos_message": "Foton och videor i den låsta mappen är dolda och visas inte när du bläddrar eller söker i ditt bibliotek.", "no_name": "Inget namn", "no_notifications": "Inga aviseringar", - "no_people_found": "Inga matchande personer hittade", + "no_people_found": "Inga matchande personer hittades", "no_places": "Inga platser", "no_remote_assets_found": "Inga fjärrobjekt hittades med denna kontrollsumma", "no_results": "Inga resultat", @@ -1503,21 +1523,27 @@ "not_allowed": "Inte tillåten", "not_available": "N/A", "not_in_any_album": "Inte i något album", - "not_selected": "Ej vald", + "not_selected": "Inte vald", + "not_set": "Inte angiven", "notes": "Notera", "nothing_here_yet": "Inget här ännu", "notification_backup_reliability": "Aktivera aviseringar för att förbättra säkerhetskopieringen i bakgrunden", - "notification_permission_dialog_content": "För att aktivera notiser, gå till Inställningar och välj tillåt.", - "notification_permission_list_tile_content": "Tillåt rättighet för att slå på notiser.", - "notification_permission_list_tile_enable_button": "Aktivera Notiser", - "notification_permission_list_tile_title": "Notisrättighet", + "notification_enabled_list_tile_content": "Immich använder aviseringar för säkerhetskopiering i bakgrunden. Hantera dem i enhetens inställningar.", + "notification_enabled_list_tile_open_button": "Öppna inställningar", + "notification_enabled_list_tile_title": "Aviseringar aktiverade", + "notification_permission_dialog_content": "Gå till Inställningar och tillåt aviseringar för att aktivera dem.", + "notification_permission_list_tile_content": "Ge behörighet att visa aviseringar.", + "notification_permission_list_tile_enable_button": "Aktivera aviseringar", + "notification_permission_list_tile_title": "Behörighet för aviseringar", "notification_toggle_setting_description": "Aktivera e-postaviseringar", - "notifications": "Notifikationer", + "notifications": "Aviseringar", "notifications_setting_description": "Hantera aviseringar", "oauth": "OAuth", "obtainium_configurator": "Obtainium-konfigurator", "obtainium_configurator_instructions": "Använd Obtainium för att installera och uppdatera Android-appen direkt från Immichs GitHub-version. Skapa en API-nyckel och välj en variant för att skapa din Obtainium-konfigurationslänk", "ocr": "OCR", + "ocr_body": "Immich läser nu text inuti dina foton, så att du kan söka efter dem utifrån vad de säger.", + "ocr_title": "Sök text i dina foton", "official_immich_resources": "Officiella Immich-resurser", "offline": "Frånkopplad", "offset": "Förskjutning", @@ -1536,8 +1562,10 @@ "open": "Öppen", "open_calendar": "Öppna kalender", "open_in_browser": "Öppna i webbläsare", + "open_in_immich_body": "Ställ in Immich som ditt galleri på Android för att öppna foton direkt från andra appar.", + "open_in_immich_title": "Öppna foton i Immich", "open_in_map_view": "Öppna kartvy", - "open_in_openstreetmap": "Öppna med OpenStreetMap", + "open_in_openstreetmap": "Öppna i OpenStreetMap", "open_the_search_filters": "Öppna sökfilter", "options": "Val", "or": "eller", @@ -1568,32 +1596,32 @@ "password_required": "Lösenord krävs", "password_reset_success": "Lösenord återställt", "past_durations": { - "days": "Senaste {days, plural, one {day} other {# days}}", - "hours": "Senaste {hours, plural, one {hour} other {# hours}}", - "years": "Senaste {years, plural, one {year} other {# years}}" + "days": "Senaste {days, plural, one {dagen} other {# dagarna}}", + "hours": "Senaste {hours, plural, one {timmen} other {# timmarna}}", + "years": "Senaste {years, plural, one {året} other {# åren}}" }, "path": "Sökväg", "pattern": "Mönster", - "pause": "Pause", + "pause": "Pausa", "pause_memories": "Pausa minnen", "paused": "Pausad", "pending": "Väntande", "people": "Personer", - "people_edits_count": "Redigerad {count, plural, one {# person} other {# personer}}", + "people_edits_count": "Redigerade {count, plural, one {# person} other {# personer}}", "people_feature_description": "Visar foton och videor grupperade efter personer", "permanent_deletion_warning": "Varning om permanent radering", "permanent_deletion_warning_setting_description": "Visa en varning när objekt raderas permanent", "permanently_delete": "Radera permanent", - "permanently_delete_assets_count": "Radera {count, plural, one {asset} other {assets}} permanent", - "permanently_delete_assets_prompt": "Är du säker på att du permanent vill ta bort {count, plural, one {denna fil?} other{these # filer?}} Detta kommer också ta bort {count, plural, one {dem från } other{them from their}} album.", + "permanently_delete_assets_count": "Ta bort {count, plural, one {objektet} other {objekten}} permanent", + "permanently_delete_assets_prompt": "Är du säker på att du vill ta bort {count, plural, one {det här objektet permanent?} other {de här # objekten permanent?}} Då tas {count, plural, one {det även bort från sitt} other {de även bort från sina}} album.", "permanently_deleted_asset": "Permanent raderat objekt", - "permanently_deleted_assets_count": "Permanent borttagning av {count, plural, one {# asset} other {# assets}}", + "permanently_deleted_assets_count": "Tog bort {count, plural, one {# objekt} other {# objekt}} permanent", "permission": "Behörigheter", "permission_empty": "Dina behörighet kan inte vara blankt", "person": "Person", "person_age_months": "{months, plural, one {# månad} other {# månader}} gammal", "person_age_year_months": "1 år, {months, plural, one {# månad} other {# månader}} gammal", - "person_age_years": "{years, plural, other {# år}} gammal", + "person_age_years": "{years, plural, one {# år gammal} other {# år gammal}}", "person_birthdate": "Född {date}", "person_hidden": "{name}{hidden, select, true { (dold)} other {}}", "person_recognized": "Person igenkänd", @@ -1680,21 +1708,24 @@ "rate_asset": "Betygsätt materialet", "rating": "Antal stjärnor", "rating_clear": "Ta bort betyg", - "rating_count": "{count, plural, =0 {Ej betygsatt} one {# stjärna} other {# stjärnor}}", - "rating_description": "Visa EXIF betyget i informationspanelen", + "rating_count": "{count, plural, =0 {Inte betygsatt} one {# stjärna} other {# stjärnor}}", + "rating_description": "Visa Exif-betyget i informationspanelen", "reaction_options": "Alternativ för reaktion", "read_changelog": "Läs ändringslogg", "readonly_mode_disabled": "Skrivskyddat läge inaktiverat", "readonly_mode_enabled": "Skrivskyddat läge aktiverat", "ready_for_upload": "Redo för uppladdning", "reassign": "Omfördela", - "reassigned_assets_to_existing_person": "Tilldelade om {count, plural, one {# objekt} other {# objekt}} till {name, select, null {an existing person} other {{name}}}", - "reassigned_assets_to_new_person": "Tilldelade om {count, plural, one {# objekt} other {# objekt}} till en ny persson", + "reassigned_assets_to_existing_person": "Tilldelade om {count, plural, one {# objekt} other {# objekt}} till {name, select, null {en befintlig person} other {{name}}}", + "reassigned_assets_to_new_person": "Tilldelade om {count, plural, one {# objekt} other {# objekt}} till en ny person", "reassing_hint": "Tilldela valda objekt till en befintlig person", "recent": "Nyligen", "recent_searches": "Senaste sökningar", "recently_added": "Nyligen tillagda", + "recently_added_body": "Hoppa direkt till allt du har lagt till nyligen på en dedikerad sida.", + "recently_added_description": "Bläddra bland dina objekt sorterade efter när de laddades upp till Immich", "recently_added_page_title": "Nyligen tillagda", + "recently_added_title": "Nyligen tillagda", "recently_taken": "Nyligen tagna", "refresh": "Ladda om", "refresh_encoded_videos": "Ladda om kodade videor", @@ -1710,8 +1741,8 @@ "remote_assets": "Fjärrobjekt", "remote_media_summary": "Sammanfattning av fjärrmedia", "remove": "Ta bort", - "remove_assets_album_confirmation": "Är du säker på att du vill ta bort {count, plural, one {# asset} other {# assets}} från albumet?", - "remove_assets_shared_link_confirmation": "Är du säker på att du vill ta bort {count, plural, one {# asset} other {# assets}} från denna delade länk?", + "remove_assets_album_confirmation": "Är du säker på att du vill ta bort {count, plural, one {# objekt} other {# objekt}} från albumet?", + "remove_assets_shared_link_confirmation": "Är du säker på att du vill ta bort {count, plural, one {# objekt} other {# objekt}} från den här delade länken?", "remove_assets_title": "Ta bort filer?", "remove_custom_date_range": "Ta bort anpassat datumintervall", "remove_filter": "Ta bort filter", @@ -1726,7 +1757,7 @@ "remove_photo_from_memory": "Ta bort fotot från detta minnet", "remove_tag": "Ta bort taggen", "remove_user": "Ta bort användare", - "removed_api_key": "Tog bort API nyckel: {name}", + "removed_api_key": "Tog bort API-nyckeln: {name}", "removed_from_archive": "Borttagen från arkivet", "removed_from_favorites": "Borttagen från favoriter", "removed_from_favorites_count": "{count, plural, other {Tog bort #}} från favoriter", @@ -1800,7 +1831,7 @@ "search_filter_date": "Datum", "search_filter_date_interval": "{start} till {end}", "search_filter_date_title": "Välj datumintervall", - "search_filter_display_option_not_in_album": "Ej i album", + "search_filter_display_option_not_in_album": "Inte i något album", "search_filter_display_options": "Visningsalternativ", "search_filter_filename": "Sök på filnamn", "search_filter_location": "Plats", @@ -1834,7 +1865,7 @@ "select": "Välj", "select_album": "Välj album", "select_album_cover": "Välj albumomslag", - "select_albums": "Välj albums", + "select_albums": "Välj album", "select_all": "Välj alla", "select_all_duplicates": "Välj alla dubletter", "select_avatar_color": "Välj färg för avatar", @@ -1887,7 +1918,7 @@ "setting_languages_subtitle": "Ändra appens språk", "setting_notifications_notify_minutes": "{count} minuter", "setting_notifications_notify_seconds": "{count} sekunder", - "setting_notifications_subtitle": "Anpassa dina notisinställningar", + "setting_notifications_subtitle": "Anpassa aviseringsinställningarna", "setting_video_viewer_auto_play_subtitle": "Börja automatiskt spela upp videor när de öppnas", "setting_video_viewer_auto_play_title": "Automatisk uppspelning av video", "setting_video_viewer_looping_title": "Loopar", @@ -1901,6 +1932,8 @@ "share_link": "Dela Länk", "share_original": "Använd original (stor)", "share_preview": "Använd miniatyrbild (liten)", + "share_quality_body": "Tryck och håll ned delningsknappen för att välja bildkvalitet innan du delar.", + "share_quality_title": "Välj din delningskvalitet", "shared": "Delad", "shared_album_activities_input_disable": "Kommentar är inaktiverad", "shared_album_activity_remove_content": "Vill du ta bort den här aktiviteten?", @@ -1915,7 +1948,9 @@ "shared_link_app_bar_title": "Delade Länkar", "shared_link_clipboard_copied_massage": "Kopierad till urklipp", "shared_link_create_error": "Fel vid skapande av delad länk", - "shared_link_custom_url_description": "Få åtkomst till den här delade länken med en anpassad URL", + "shared_link_custom_url_description": "Få åtkomst till den här delade länken med ett anpassat URL namn", + "shared_link_custom_url_title": "anpassad URL", + "shared_link_custom_url_warning": "Varning: ett anpassat URL-namn med ett snedstreck kanske inte fungerar som förväntat.", "shared_link_edit_description_hint": "Lägg till delnings-beskrivningen", "shared_link_edit_expire_after_option_day": "1 dag", "shared_link_edit_expire_after_option_days": "{count} dagar", @@ -1962,7 +1997,7 @@ "show_keyboard_shortcuts": "Visa kortkommandon", "show_less": "Visa mindre", "show_metadata": "Visa metadata", - "show_more_fields": "{count, plural, one {Visa # mer fält} other {Visa # mera fält}}", + "show_more_fields": "{count, plural, one {Visa ytterligare # fält} other {Visa ytterligare # fält}}", "show_or_hide_info": "Visa eller göm information", "show_password": "Visa lösenord", "show_person_options": "Visa alternativ för person", @@ -1982,16 +2017,19 @@ "sign_out": "Logga ut", "sign_up": "Registrera dig", "size": "Storlek", + "skip": "Hoppa över", "skip_to_content": "Hoppa till innehåll", "skip_to_folders": "Hoppa till mapp", "skip_to_tags": "Hoppa till taggar", "slideshow": "Bildspel", + "slideshow_body": "Luta dig tillbaka och titta på dina foton som spelas upp i ett helskärms bildspel.", "slideshow_metadata_overlay_mode": "Överläggsinnehåll", "slideshow_metadata_overlay_mode_description_only": "Endast beskrivning", "slideshow_metadata_overlay_mode_full": "Fullständig", "slideshow_repeat": "Upprepa bildspel", "slideshow_repeat_description": "Gå tillbaka till början när bildspelet slutar", "slideshow_settings": "Bildspelsinställningar", + "slideshow_title": "Bildspel", "smart_album": "Smart album", "some_assets_already_have_a_location_warning": "Vissa av de valda objekten har redan platsdata", "sort_albums_by": "Sortera album efter...", @@ -2007,7 +2045,7 @@ "stack_action_prompt": "{count} staplade", "stack_duplicates": "Stapla dubletter", "stack_selected_photos": "Stapla valda foton", - "stacked_assets_count": "Staplade {count, plural, one {# asset} other {# assets}}", + "stacked_assets_count": "Staplade {count, plural, one {# objekt} other {# objekt}}", "stacktrace": "Stapelspårning", "start": "Starta", "start_date": "Startdatum", @@ -2016,15 +2054,15 @@ "status": "Status", "step_delete": "Ta bort steg", "step_delete_confirm": "Är du säker på att du vill ta bort det här steget?", - "step_details": "Steg detaljer", + "step_details": "Stegdetaljer", "steps": "Steg", "stop_casting": "Sluta casta", "stop_motion_photo": "Stanna rörligt foto", "stop_photo_sharing": "Sluta dela dina foton?", - "stop_photo_sharing_description": "{partner} kommer inte länga ha tillgång till dina foton.", - "stop_sharing_photos_with_user": "Sluta dela dina bilder med denna användaren", + "stop_photo_sharing_description": "{partner} kommer inte längre att ha tillgång till dina foton.", + "stop_sharing_photos_with_user": "Sluta dela dina bilder med den här användaren", "storage": "Lagring", - "storage_label": "Förvaringsetikett", + "storage_label": "Lagringsetikett", "storage_quota": "Lagringskvot", "storage_usage": "{used} av {available} används", "submit": "Skicka", @@ -2032,7 +2070,7 @@ "suggestions": "Förslag", "sunrise_on_the_beach": "Exempel: Soluppgång på stranden", "support": "Support", - "support_and_feedback": "Support och Feedback", + "support_and_feedback": "Support och återkoppling", "support_third_party_description": "Din Immich-installation paketerades av en tredje part. Problem som du upplever kan orsakas av det paketet, så vänligen ta upp problem med dem i första hand med hjälp av länkarna nedan.", "supporter": "Stödjare", "swap_merge_direction": "Byt sammanfogningsriktning", @@ -2050,7 +2088,7 @@ "tag_created": "Skapade tagg: {tag}", "tag_face": "Tagga ansikte", "tag_feature_description": "Bläddra bland foton och videor grupperade efter logiska taggar", - "tag_people": "Tagga Personer", + "tag_people": "Tagga personer", "tag_updated": "Uppdaterade tagg: {tag}", "tagged_assets": "Taggade {count, plural, one {# objekt} other {# objekt}}", "tags": "Taggar", @@ -2062,7 +2100,7 @@ "theme_selection_description": "Ställ in temat automatiskt till ljust eller mörkt baserat på din webbläsares inställningar", "theme_setting_asset_list_storage_indicator_title": "Visa lagringsindikator på filer", "theme_setting_asset_list_tiles_per_row_title": "Antal bilder och videor per rad ({count})", - "theme_setting_colorful_interface_subtitle": "Applicera primärfärgen på bakgrundsytor.", + "theme_setting_colorful_interface_subtitle": "Tillämpa primärfärgen på bakgrundsytor.", "theme_setting_colorful_interface_title": "Färgglatt gränssnitt", "theme_setting_primary_color_subtitle": "Välj en färg för primära åtgärder och accenter.", "theme_setting_primary_color_title": "Primärfärg", @@ -2111,7 +2149,7 @@ "unable_to_setup_pin_code": "Kunde inte konfigurera PIN-kod:en", "unarchive": "Ångra arkivering", "unarchive_action_prompt": "{count} borttagen från arkivet", - "unarchived_count": "{count, plural, one {# borttagen från arkiv} other {# borttagna från arkiv}}", + "unarchived_count": "{count, plural, other {Tog bort # från arkivet}}", "undo": "Ångra", "unfavorite": "Avfavorisera", "unfavorite_action_prompt": "{count} borttagen från Favoriter", @@ -2119,6 +2157,7 @@ "unknown": "Okänd", "unknown_country": "Okänt Land", "unknown_date": "Okänt datum", + "unknown_schema": "Okänt schema", "unknown_year": "Okänt år", "unlimited": "Obegränsat", "unlink_motion_video": "Ta bort länken till rörlig video", @@ -2133,7 +2172,7 @@ "unselect_all_duplicates": "Avmarkera alla dubletter", "unstack": "Stapla Av", "unstack_action_prompt": "{count} ostaplade", - "unstacked_assets_count": "Avstaplade {count, plural, one {# asset} other {# assets}}", + "unstacked_assets_count": "Tog bort {count, plural, one {# objekt} other {# objekt}} från stapeln", "unsupported_field_type": "Fälttyp som inte stöds", "unsupported_file_type": "Fil {file} kan inte laddas upp eftersom dess filtyp {type} inte stöds.", "untagged": "Otaggad", @@ -2145,7 +2184,7 @@ "upload_concurrency": "Uppladdning samtidighet", "upload_day_count": "{date}: {count, plural, one {# uppladdning} other {# uppladdningar}}", "upload_details": "Uppladdningsdetaljer", - "upload_error_with_count": "Uppladdningsfel för {count, plural, one {# asset} other {# assets}}", + "upload_error_with_count": "Uppladdningsfel för {count, plural, one {# objekt} other {# objekt}}", "upload_errors": "Uppladdning klar med {count, plural, one {# fel} other {# fel}}, ladda om sidan för att se nya objekt.", "upload_finished": "Uppladdningen är klar", "upload_progress": "Återstående {remaining, number} - Bearbetade {processed, number}/{total, number}", @@ -2154,6 +2193,8 @@ "upload_status_errors": "Fel", "upload_status_uploaded": "Uppladdad", "upload_success": "Uppladdning lyckades, ladda om sidan för att se nya objekt.", + "upload_to_album_body": "För användare som inte använder funktionen för manuell uppladdning kan ni nu välja att lägga till lokala foton direkt i ett album när ni laddar upp dem. Ni behöver inte längre ladda upp dem och lägga till dem i ett album senare.", + "upload_to_album_title": "Ladda upp direkt till ett album", "upload_to_immich": "Ladda upp till Immich ({count})", "uploading": "Laddar upp", "uploading_media": "Uppladdning av media", @@ -2170,7 +2211,7 @@ "user": "Användare", "user_has_been_deleted": "Den här användaren har raderats.", "user_id": "Användar-ID", - "user_liked": "{user} gillade {type, select, photo {detta fotot} video {denna filmen} asset {detta objekt} other {detta}}", + "user_liked": "{user} gillade {type, select, photo {det här fotot} video {den här videon} asset {det här objektet} other {det}}", "user_pin_code_settings": "PIN-kod", "user_pin_code_settings_description": "Hantera PIN-kod", "user_privacy": "Användarsekretess", @@ -2181,19 +2222,19 @@ "user_usage_stats_description": "Se statistik - kontoanvändande", "username": "Användarnamn", "users": "Användare", - "users_added_to_album_count": "Lade till {count, plural, one {# user} other {# users}} i albumet", + "users_added_to_album_count": "Lade till {count, plural, one {# användare} other {# användare}} i albumet", "utilities": "Verktyg", "validate": "Validera", "validate_endpoint_error": "Ange en giltig URL", "variables": "Variabler", "version": "Version", "version_announcement_closing": "Din vän, Alex", - "version_announcement_message": "Hej där! En ny version av Immich är tillgänglig. Ta dig tid att läsa versionsfakta för att säkerställa att dina inställningar är uppdaterade för att förhindra eventuella felkonfigurationer, särskilt om du använder WatchTower eller någon mekanism som hanterar uppdatering av din Immich instans automatiskt.", + "version_announcement_message": "Hej! En ny version av Immich är tillgänglig. Läs versionsinformationen så att installationen är uppdaterad och felkonfigurationer undviks, särskilt om du använder WatchTower eller någon annan mekanism som uppdaterar Immich-instansen automatiskt.", "version_history": "Versionshistorik", "version_history_item": "Version {version} installerad {date}", "video": "Video", "video_hover_setting": "Spela upp videotumnagel när muspekaren är över den", - "video_hover_setting_description": "Spela upp videotumnagel när muspekaren är över den. Även när den är deaktiverad kan uppspelning startas när muspekaren är över play-ikonen.", + "video_hover_setting_description": "Spela upp videominiatyren när muspekaren hålls över den. Även när funktionen är inaktiverad kan uppspelningen startas genom att hålla muspekaren över uppspelningsikonen.", "video_quality": "Videokvalitet", "videos": "Videor", "videos_count": "{count, plural, one {# Video} other {# Videor}}", @@ -2210,10 +2251,10 @@ "view_previous_asset": "Visa föregående objekt", "view_qr_code": "Visa QR-kod", "view_similar_photos": "Visa liknande foton", - "view_stack": "Visa Stapel", - "viewer_remove_from_stack": "Ta bort från Stapeln", + "view_stack": "Visa stapel", + "viewer_remove_from_stack": "Ta bort från stapeln", "visibility": "Synlighet", - "visibility_changed": "Synlighet ändrad för {count, plural, one {# person} other {# personer}}", + "visibility_changed": "Ändrade synligheten för {count, plural, one {# person} other {# personer}}", "visual": "Visuellt", "waiting": "Väntar", "waiting_count": "Väntande: {count}", @@ -2221,6 +2262,9 @@ "week": "Vecka", "welcome": "Välkommen", "welcome_to_immich": "Välkommen till Immich", + "whats_new": "Vad är nytt", + "whats_new_settings_subtitle": "Se vad som är nytt i Immich", + "whats_new_version": "Version {version}", "when": "När", "width": "Bredd", "wifi_name": "Wi-Fi-namn", diff --git a/i18n/ta.json b/i18n/ta.json index 2be1f13204..d48b7c9429 100644 --- a/i18n/ta.json +++ b/i18n/ta.json @@ -764,7 +764,6 @@ "custom_date": "விருப்ப தேதி", "custom_locale": "தனிப்பயன் மொழி", "custom_locale_description": "தேர்ந்தெடுக்கப்பட்ட மொழி மற்றும் பிராந்தியத்தின் அடிப்படையில் தேதிகள், நேரம் மற்றும் எண்களை வடிவமைக்கவும்", - "custom_url": "தனிப்பயன் முகவரி", "cutoff_date_description": "கடைசி புகைப்படங்களை வைத்திருங்கள்…", "cutoff_day": "{count, plural, one {நாள்} other {நாள்கள்}}", "cutoff_year": "{count, plural, one {ஆண்டு} other {ஆண்டுகள்}}", diff --git a/i18n/te.json b/i18n/te.json index 5e70a1cc0b..15921d7dcc 100644 --- a/i18n/te.json +++ b/i18n/te.json @@ -15,12 +15,14 @@ "add_a_location": "స్థానాన్ని జోడించండి", "add_a_name": "పేరును జోడించండి", "add_a_title": "శీర్షికను జోడించండి", + "add_action": "కొత్త చర్యను జోడించండి", "add_birthday": "పుట్టినరోజును జోడించండి", "add_endpoint": "ముగింపు బిందువును జోడించండి", "add_exclusion_pattern": "మినహాయింపు నమూనాను జోడించండి", "add_location": "స్థానాన్ని జోడించండి", "add_partner": "భాగస్వామిని జోడించండి", "add_photos": "ఫోటోలను జోడించండి", + "add_step": "కొత్త దశను జోడించండి", "add_tag": "ట్యాగ్ జోడించండి", "add_to": "జోడించండి…", "add_to_album": "ఆల్బమ్‌కు జోడించండి", @@ -45,17 +47,17 @@ "authentication_settings_reenable": "మళ్లీ ప్రారంబించటానికి, Server Commandని ఉపయోగించండి.", "background_task_job": "నేపథ్య పనులు", "backup_database": "డేటాబేస్ డంప్ సృష్టించు", - "backup_database_enable_description": "డేటాబేస్ పడవెయ్యడాన్నీ ప్రారంభించండి", - "backup_keep_last_amount": "ఉంచుకోవాల్సిన మునుపటి పడవెయ్యడాల్లా మొత్తం", + "backup_database_enable_description": "డేటాబేస్ డంప్‌లను ప్రారంభించండి", + "backup_keep_last_amount": "ఉంచాల్సిన మునుపటి డంప్‌ల సంఖ్య", "backup_onboarding_1_description": "క్లౌడ్‌లో లేదా మరో భౌతిక ప్రదేశంలో ఆఫ్సైట్ కాపీ", - "backup_onboarding_2_description": "వేరువేరు పరికరాల్లో లోకల్ కాపీలు. ఇందులో ప్రధాన ఫైళ్ళు మరియు వాటికి సంబంధించిన లోకల్ బ్యాకప్ కూడా ఉంటాయి", + "backup_onboarding_2_description": "వేర్వేరు పరికరాల్లో నిల్వ చేసిన స్థానిక కాపీలు. ఇందులో అసలు ఫైల్‌లు మరియు వాటి స్థానిక బ్యాకప్ కూడా ఉంటాయి.", "backup_onboarding_3_description": "మీ డేటాకు మొత్తం కాపీలు, అసలు ఫైళ్ళు సహా. ఇందులో 1 ఆఫ్సైట్ కాపీ మరియు 2 లోకల్ కాపీలు ఉంటాయి.", "backup_onboarding_description": "మీ డేటాను రక్షించడానికి 3-2-1 బ్యాకప్ వ్యూహం సిఫార్సు చేయబడింది. పూర్తి స్థాయి బ్యాకప్ పరిష్కారం కోసం మీరు అప్లోడ్ చేసిన ఫోటోలు/వీడియోల కాపీలు మరియు Immich డేటాబేస్ కాపీని ఉంచాలి.", "backup_onboarding_footer": "Immich బ్యాకప్‌పై మరిన్ని వివరాలకు డాక్యుమెంటేషన్ చూడండి.", "backup_onboarding_parts_title": "3-2-1 బ్యాకప్‌లో:", "backup_onboarding_title": "బ్యాకప్లు", - "backup_settings": "డేటాబేస్ పడవెసే సెట్టింగ్‌లు", - "backup_settings_description": "డేటాబేస్ పడవెసే సెట్టింగ్‌లను నిర్వహించండి", + "backup_settings": "డేటాబేస్ డంప్ సెట్టింగ్‌లు", + "backup_settings_description": "డేటాబేస్ డంప్ సెట్టింగ్‌లను నిర్వహించండి.", "cleared_jobs": "దీని కోసం ఉద్యోగాలు క్లియర్ చేయబడ్డాయి: {job}", "config_set_by_file": "కాన్ఫిగరేషన్ ప్రస్తుతం కాన్ఫిగరేషన్ ఫైల్ ద్వారా సెట్ చేయబడింది", "confirm_delete_library": "మీరు ఖచ్చితంగా {library} లైబ్రరీని తొలగించాలనుకుంటున్నారా?", @@ -63,15 +65,19 @@ "confirm_email_below": "నిర్ధారించడానికి, క్రింద \"{email}\" టైప్ చేయండి", "confirm_reprocess_all_faces": "మీరు ఖచ్చితంగా అన్ని ముఖాలను రీప్రాసెస్ చేయాలనుకుంటున్నారా? ఇది పేరున్న వ్యక్తులను కూడా క్లియర్ చేస్తుంది.", "confirm_user_password_reset": "మీరు ఖచ్చితంగా {user} పాస్‌వర్డ్‌ని రీసెట్ చేయాలనుకుంటున్నారా?", - "confirm_user_pin_code_reset": "మీరు ఖచ్చితంగా {user} యొక్క పిన్ కోడ్ నీ రీసెట్ చేద్దామనిఅనుకుంటున్నారా?", + "confirm_user_pin_code_reset": "మీరు ఖచ్చితంగా {user} యొక్క PIN కోడ్‌ను రీసెట్ చేయాలనుకుంటున్నారా?", + "copy_config_to_clipboard_description": "ప్రస్తుత సిస్టమ్ కాన్ఫిగరేషన్‌ను JSON ఆబ్జెక్ట్‌గా క్లిప్‌బోర్డ్‌లోకి కాపీ చేయండి", "create_job": "పనిని సృష్టించండి", "cron_expression": "క్రాన్ వ్యక్తీకరణ", "cron_expression_description": "క్రాన్ ఫార్మాట్ ఉపయోగించి స్కానింగ్ విరామాన్ని సెట్ చేయండి. మరిన్ని వివరాల కోసం దయచేసి ఉదా. క్రోంటాబ్ గురు చూడండి", "cron_expression_presets": "ముందేచేసిన క్రాన్ వ్యక్తీకరణలు", "disable_login": "లాగిన్‌ను నిలిపివేయండి", + "download_csv": "CSV ఫైల్‌ను డౌన్‌లోడ్ చేయండి", "duplicate_detection_job_description": "సారూప్య చిత్రాలను గుర్తించడానికి ఆస్తులపై యంత్ర అభ్యాసాన్ని అమలు చేయండి. స్మార్ట్ శోధనపై ఆధారపడుతుంది", "exclusion_pattern_description": "మినహాయింపు నమూనాలు మీ లైబ్రరీని స్కాన్ చేస్తున్నప్పుడు ఫైల్‌లు మరియు ఫోల్డర్‌లను విస్మరించడానికి మిమ్మల్ని అనుమతిస్తాయి. మీరు దిగుమతి చేయకూడదనుకునే RAW ఫైల్‌లు వంటి ఫోల్డర్‌లను కలిగి ఉన్నట్లయితే ఇది ఉపయోగకరంగా ఉంటుంది.", - "face_detection": "ముఖ గమనింపు", + "export_config_as_json_description": "ప్రస్తుత సిస్టమ్ కాన్ఫిగరేషన్‌ను JSON ఫైల్‌గా డౌన్‌లోడ్ చేయండి", + "external_libraries_page_description": "నిర్వాహకుడు - ఎక్స్‌టర్నల్ లైబ్రరీ పేజీ", + "face_detection": "ముఖాల గుర్తింపు", "face_detection_description": "మెషిన్ లెర్నింగ్ ఉపయోగించి ఆస్తులలో ముఖాలను గుర్తించండి. వీడియోల కోసం, సూక్ష్మచిత్రం మాత్రమే పరిగణించబడుతుంది. \"అన్నీ\" (పునః) అన్ని ఆస్తులను ప్రాసెస్ చేస్తుంది. ఇంకా ప్రాసెస్ చేయని ఆస్తులను \"మిస్సింగ్\" క్యూలు చేస్తుంది. గుర్తించబడిన ముఖాలు ఇప్పటికే ఉన్న లేదా కొత్త వ్యక్తులతో సమూహపరచడం పూర్తయిన తర్వాత ముఖ గుర్తింపు కోసం క్యూలో ఉంచబడతాయి.", "facial_recognition_job_description": "సమూహం వ్యక్తుల ముఖాలను గుర్తించింది. ఫేస్ డిటెక్షన్ పూర్తయిన తర్వాత ఈ దశ అమలవుతుంది. \"అన్ని\" (పునః) అన్ని ముఖాలను క్లస్టర్‌లు చేస్తుంది. \"తప్పిపోయిన\" వ్యక్తిని కేటాయించని ముఖాలను క్యూలో ఉంచుతుంది.", "failed_job_command": "ఉద్యోగం కోసం కమాండ్ {command} విఫలమైంది: {job}", @@ -81,6 +87,7 @@ "image_fullsize_description": "జూమ్ చేసినప్పుడు ఉపయోగించే, మెటాడేటా తీసిన పూర్తి పరిమాణ చిత్రము", "image_fullsize_enabled": "ఫుల్-సైజ్ చిత్రం తయారీని ప్రారంభించు", "image_fullsize_enabled_description": "వెబ్‌కు అనుకూలం కాని ఫార్మాట్ల కోసం ఫుల్-సైజ్ చిత్రాన్ని సృష్టించు. \"ఎంబెడ్డెడ్ ప్రీవ్యూ ప్రిఫర్\" ప్రారంభించినప్పుడు, ఎంబెడ్డెడ్ ప్రీవ్యూలను మార్పిడిలేకుండా నేరుగా ఉపయోగిస్తారు. JPEG వంటి వెబ్-ఫ్రెండ్లీ ఫార్మాట్లపై ఇది ప్రభావం చూపదు.", + "image_fullsize_title": "పూర్తి పరిమాణ చిత్ర సెట్టింగ్‌లు", "image_prefer_embedded_preview": "పొందుపరిచిన పరిదృశ్యానికి ప్రాధాన్యత ఇవ్వండి", "image_prefer_embedded_preview_setting_description": "అందుబాటులో ఉన్నప్పుడు మరియు ఇమేజ్ ప్రాసెసింగ్‌కు ఇన్‌పుట్‌గా RAW ఫోటోలలో ఎంబెడెడ్ ప్రివ్యూలను ఉపయోగించండి. ఇది కొన్ని చిత్రాలకు మరింత ఖచ్చితమైన రంగులను ఉత్పత్తి చేయగలదు, అయితే ప్రివ్యూ నాణ్యత కెమెరాపై ఆధారపడి ఉంటుంది మరియు చిత్రం మరిన్ని కుదింపు కళాఖండాలను కలిగి ఉండవచ్చు.", "image_prefer_wide_gamut": "విస్తృత స్వరసప్తకానికి ప్రాధాన్యత ఇవ్వండి", @@ -88,6 +95,8 @@ "image_preview_description": "ఒకే ఆస్తిని వీక్షించేటప్పుడు మరియు యంత్ర అభ్యాసం కోసం మెటాడేటా లేని మధ్యస్థ-పరిమాణ చిత్రం ఉపయోగించబడుతుంది", "image_preview_quality_description": "1-100 వరకు ప్రివ్యూ నాణ్యత. ఎక్కువ ఉంటే మంచిది, కానీ పెద్ద ఫైళ్లను ఉత్పత్తి చేస్తుంది మరియు యాప్ ప్రతిస్పందనను తగ్గిస్తుంది. తక్కువ విలువను సెట్ చేయడం వల్ల మెషిన్ లెర్నింగ్ నాణ్యత ప్రభావితం కావచ్చు.", "image_preview_title": "అమరికల ప్రివ్యూ", + "image_progressive": "ప్రోగ్రెసివ్", + "image_progressive_description": "క్రమంగా లోడ్ అవుతూ ప్రదర్శించబడేలా JPEG చిత్రాలను ప్రోగ్రెసివ్‌గా ఎన్‌కోడ్ చేయండి. ఇది WebP చిత్రాలపై ఎలాంటి ప్రభావం చూపదు.", "image_quality": "నాణ్యత", "image_resolution": "రిజల్యూషన్", "image_resolution_description": "అధిక రిజల్యూషన్‌లు మరింత వివరాలను భద్రపరచగలవు కానీ ఎన్‌కోడ్ చేయడానికి ఎక్కువ సమయం పడుతుంది, పెద్ద ఫైల్ పరిమాణాలను కలిగి ఉంటాయి మరియు యాప్ ప్రతిస్పందనను తగ్గించవచ్చు.", @@ -96,6 +105,8 @@ "image_thumbnail_description": "తీసివేసిన మెటాడేటాతో కూడిన చిన్న సూక్ష్మచిత్రం, ప్రధాన టైమ్‌లైన్ వంటి ఫోటోల సమూహాలను వీక్షిస్తున్నప్పుడు ఉపయోగించబడుతుంది", "image_thumbnail_quality_description": "థంబ్‌నెయిల్ నాణ్యత 1-100 నుండి. అధికమైనది ఉత్తమం, కానీ పెద్ద ఫైల్‌లను ఉత్పత్తి చేస్తుంది మరియు యాప్ ప్రతిస్పందనను తగ్గిస్తుంది.", "image_thumbnail_title": "థంబ్‌నెయిల్ సెట్టింగ్‌లు", + "import_config_from_json_description": "JSON కాన్ఫిగరేషన్ ఫైల్‌ను అప్‌లోడ్ చేసి సిస్టమ్ కాన్ఫిగరేషన్‌ను దిగుమతి చేయండి", + "integrity_checks_checksum_files_time_limit": "సమయ పరిమితి", "job_concurrency": "{job} సమ్మతి", "job_created": "పని సృష్టించబడింది", "job_not_concurrency_safe": "ఈ ఉద్యోగం సమ్మతి-సురక్షితమైనది కాదు.", @@ -1099,31 +1110,71 @@ "upload_status_errors": "లోపాలు", "upload_status_uploaded": "అప్‌లోడ్ చేయబడింది", "upload_success": "అప్‌లోడ్ విజయవంతమైంది, కొత్త అప్‌లోడ్ ఆస్తులను చూడటానికి పేజీని రిఫ్రెష్ చేయండి.", + "upload_to_album_title": "నేరుగా ఒక ఆల్బమ్‌లోకి అప్‌లోడ్ చేయండి", + "upload_to_immich": "Immichలోకి అప్‌లోడ్ చేయండి ({count})", + "uploading": "అప్‌లోడ్ అవుతోంది", + "uploading_media": "మీడియా అప్‌లోడ్ అవుతోంది", + "uploads": "అప్‌లోడ్‌లు", + "uploads_count": "{count, plural, one {# అప్‌లోడ్} other {# అప్‌లోడ్‌లు}}", + "url": "URL", "usage": "వాడుక", + "use_biometric": "బయోమెట్రిక్‌ను ఉపయోగించండి", + "use_browser_locale": "బ్రౌజర్ భాషా సెట్టింగ్‌ను ఉపయోగించండి", + "use_browser_locale_description": "మీ బ్రౌజర్ భాషా సెట్టింగ్‌ల ఆధారంగా తేదీలు, సమయాలు మరియు సంఖ్యలను చూపిస్తుంది.", + "use_current_connection": "ప్రస్తుత కనెక్షన్‌ను ఉపయోగించండి", "use_custom_date_range": "బదులుగా అనుకూల తేదీ పరిధిని ఉపయోగించండి", + "use_template": "టెంప్లేట్‌ను ఉపయోగించండి", "user": "విన్యోగధారి", + "user_has_been_deleted": "ఈ యూజర్ తొలగించబడ్డారు.", "user_id": "విన్యోగధారి గుర్తింపు", + "user_pin_code_settings": "పిన్ కోడ్", "user_purchase_settings": "కొనుగోలు", "user_purchase_settings_description": "మీ కొనుగోలును నిర్వహించండి", "user_usage_detail": "వినియోగదారు వినియోగ వివరాలు", + "user_usage_stats": "అకౌంట్ వినియోగ గణాంకాలు", + "user_usage_stats_description": "అకౌంట్ వినియోగ గణాంకాలను చూడండి", "username": "వినియోగదారి పేరు", "users": "వినియోగదారులు", "utilities": "యుటిలిటీస్", "validate": "ధృవీకరించండి", + "validate_endpoint_error": "దయచేసి సరైన URLను నమోదు చేయండి", "variables": "వేరియబుల్స్", + "version": "వెర్షన్", + "version_announcement_closing": "మీ స్నేహితుడు, Alex", + "version_announcement_message": "హాయ్! Immich యొక్క కొత్త వెర్షన్ అందుబాటులో ఉంది. కొత్త మార్పుల గురించి తెలుసుకోవడానికి విడుదల గమనికలను చదవండి. ముఖ్యంగా, మీరు WatchTower లేదా Immichను స్వయంచాలకంగా అప్‌డేట్ చేసే విధానాన్ని ఉపయోగిస్తుంటే, మీ సెటప్ సరిగ్గా పనిచేయడానికి ఇది ఉపయోగపడుతుంది.", + "version_history": "వెర్షన్ చరిత్ర", + "version_history_item": "{date}న {version} ఇన్‌స్టాల్ చేయబడింది", "video": "వీడియో", "video_hover_setting": "థంబ్‌నెయిల్ పైనా హోవర్ చేయగానే వీడియో ప్లే చెయ్", "video_hover_setting_description": "థంబ్‌నెయిల్ పైనా హోవర్ చేయగానే చిహ్నం ప్లే చేయు. నిలిపివేయబడినప్పటికీ, ప్లే చిహ్నంపై హోవర్ చేయడం ద్వారా ప్లేబ్యాక్ ప్రారంభించబడుతుంది.", + "video_quality": "వీడియో నాణ్యత", "videos": "వీడియోలు", "view": "చూడండి", "view_album": "ఆల్బమ్‌ని వీక్షించండి", "view_all": "అన్నీ వీక్షించండి", "view_all_users": "వినియోగదారులందరినీ వీక్షించండి", + "view_details": "వివరాలను చూడండి", + "view_in_timeline": "టైమ్‌లైన్‌లో చూడండి", + "view_link": "లింక్‌ను చూడండి", "view_next_asset": "తదుపరి ఆస్తిని వీక్షించండి", "view_previous_asset": "మునుపటి ఆస్తిని వీక్షించండి", + "view_qr_code": "QR కోడ్‌ను చూడండి", + "view_similar_photos": "ఇలాంటి ఫోటోలను చూడండి", "view_stack": "స్టాక్ చూడండి", + "viewer_remove_from_stack": "స్టాక్‌లో నుండి తొలగించండి", + "visibility": "దృశ్యమానత", "waiting": "వేచి ఉంది", + "waiting_count": "వేచి ఉన్నవి: {count}", "warning": "హెచ్చరిక", "week": "వారం", - "welcome": "స్వాగతం" + "welcome": "స్వాగతం", + "welcome_to_immich": "Immichకు స్వాగతం", + "whats_new": "కొత్త విశేషాలు", + "whats_new_settings_subtitle": "Immich లోని కొత్త విశేషాలను చూడండి", + "whats_new_version": "వెర్షన్ {version}", + "wifi_name": "Wi-Fi పేరు", + "workflow_delete_prompt": "మీరు ఖచ్చితంగా ఈ వర్క్‌ఫ్లోను తొలగించాలనుకుంటున్నారా?", + "you_dont_have_any_shared_links": "మీకు షేర్ చేసిన లింక్‌లు ఏవీ లేవు", + "your_wifi_name": "మీ Wi-Fi నెట్‌వర్క్ పేరు", + "zoom_image": "చిత్రాన్ని జూమ్ చేయండి" } diff --git a/i18n/th.json b/i18n/th.json index ab1e5c8a09..0284d08a25 100644 --- a/i18n/th.json +++ b/i18n/th.json @@ -1,12 +1,12 @@ { "about": "เกี่ยวกับ", - "account": "บัญชีผู้ใช้", + "account": "บัญชี", "account_settings": "การตั้งค่าบัญชี", "acknowledge": "รับทราบ", - "action": "ดำเนินการ", + "action": "การกระทำ", "action_common_update": "อัปเดต", - "action_description": "ชุดการดำเนินการที่จะปฏิบัติกับรายการที่ผ่านการกรอง", - "actions": "การดำเนินการ", + "action_description": "ชุดการดำเนินการที่จะทำกับรายการที่ผ่านการกรอง", + "actions": "การกระทำ", "active": "กำลังทำงาน", "active_count": "กำลังทำงาน: {count}", "activity": "กิจกรรม", @@ -15,7 +15,7 @@ "add_a_location": "เพิ่มตำแหน่ง", "add_a_name": "เพิ่มชื่อ", "add_a_title": "เพิ่มหัวข้อ", - "add_action": "เพิ่มการดำเนินการ", + "add_action": "เพิ่มการกระทำ", "add_assets": "เพิ่มสื่อ", "add_birthday": "เพิ่มวันเกิด", "add_endpoint": "เพิ่มปลายทาง", @@ -30,20 +30,20 @@ "add_to_album_bottom_sheet_added": "เพิ่มไปยัง {album} แล้ว", "add_to_album_bottom_sheet_already_exists": "อยู่ใน {album} อยู่แล้ว", "add_to_album_bottom_sheet_some_local_assets": "สื่อในเครื่องบางส่วนไม่สามารถเพิ่มไปยังอัลบั้มได้", - "add_to_albums": "เพิ่มเข้าในอัลบั้ม", + "add_to_albums": "เพิ่มไปยังอัลบั้ม", "add_to_albums_count": "เพิ่มไปยังอัลบั้ม ({count})", "add_to_bottom_bar": "เพิ่มไปยัง", - "add_upload_to_stack": "เพิ่มที่อัปโหลดเข้า stack", + "add_upload_to_stack": "เพิ่มที่อัปโหลดเข้า Stack", "add_url": "เพิ่ม URL", "added_to_archive": "เพิ่มไปยังที่จัดเก็บถาวร", "added_to_favorites": "เพิ่มเข้ารายการโปรดแล้ว", - "added_to_favorites_count": "เพิ่ม {count, number} รูปเข้ารายการโปรดแล้ว", + "added_to_favorites_count": "เพิ่ม {count, number} รายการเข้ารายการโปรดแล้ว", "admin": { - "add_exclusion_pattern_description": "เพิ่มรูปแบบข้อยกเว้น รองรับการใช้ *, ** และ ? หากต้องการละเว้นไฟล์ทั้งหมดในไดเร็กทอรีที่ชื่อว่า \"Raw\" ให้ใช้ \"**/Raw/**\" ถ้าต้องการละเว้นไฟล์ทั้งหมดที่ลงท้ายด้วย \".tif\" ให้ใช้ \"**/*.tif\" ถ้าต้องการละเว้นพาธที่เริ่มจากไดเรกทอรีบนสุดให้ใช้ \"/พาธ/ที่ต้องการ/ละเว้น/**\"", + "add_exclusion_pattern_description": "เพิ่มรูปแบบข้อยกเว้น สามารถรองรับการใช้ *, ** และ ? ในรูปแบบได้ หากต้องการละเว้นไฟล์ทั้งหมดในไดเร็กทอรีที่ชื่อว่า \"Raw\" ให้ใช้ \"**/Raw/**\" ถ้าต้องการละเว้นไฟล์ทั้งหมดที่ลงท้ายด้วย \".tif\" ให้ใช้ \"**/*.tif\" ถ้าต้องการละเว้นพาธที่เริ่มจากไดเรกทอรีบนสุดให้ใช้ \"/พาธ/ที่ต้องการ/ละเว้น/**\"", "admin_user": "ผู้ดูแล", - "asset_offline_description": "ไม่พบไฟล์สื่อของไลบรารีภายนอกนี้ในดิสก์ และถูกย้ายไปที่ถังขยะแล้ว หากไฟล์ถูกย้ายภายในไลบรารี โปรดตรวจสอบไทม์ไลน์ของคุณเพื่อหาสื่อที่เกี่ยวข้องใหม่ หากต้องการกู้คืนสื่อนี้ โปรดตรวจสอบว่า Immich สามารถเข้าถึงไฟล์ด้านล่างได้ และทำการสแกนไลบรารีอีกครั้ง", - "authentication_settings": "การตั้งค่าการเข้าถึง", - "authentication_settings_description": "จัดการรหัสผ่าน, OAuth, และตั้งค่าการเข้าถึงอื่นๆ", + "asset_offline_description": "ไม่พบไฟล์สื่อของไลบรารีภายนอกนี้ในดิสก์ และถูกย้ายไปที่ถังขยะแล้ว หากไฟล์ถูกย้ายภายในไลบรารี โปรดตรวจสอบไทม์ไลน์ของคุณเพื่อหาสื่อที่เกี่ยวข้องใหม่ หากต้องการกู้คืนสื่อนี้ โปรดตรวจสอบว่า Immich สามารถเข้าถึงไฟล์ ณ ตำแหน่งด้านล่างได้ และทำการสแกนไลบรารีอีกครั้ง", + "authentication_settings": "การตั้งค่าการยืนยันตัวตน", + "authentication_settings_description": "จัดการรหัสผ่าน, OAuth, และตั้งค่าการยึนยันตัวตนอื่นๆ", "authentication_settings_disable_all": "คุณแน่ใจว่าต้องการปิดวิธีการล็อกอินทั้งหมดหรือไม่? ล็อกอินจะถูกปิดทั้งหมด", "authentication_settings_reenable": "เพื่อเปิดใหม่ ให้ใช้คำสั่งเซิร์ฟเวอร์", "background_task_job": "งานเบื้องหลัง", @@ -53,16 +53,16 @@ "backup_onboarding_1_description": "สำเนานอกสถานที่บนคลาวด์หรือที่ตั้งอื่น", "backup_onboarding_2_description": "สำเนาที่อยู่บนอุปกรณ์ที่ต่างกัน ซึ่งรวมถึงไฟล์หลักและไฟล์สำรองบนเครื่อง", "backup_onboarding_3_description": "จำนวนชุดของข้อมูลทั้งหมด รวมถึงไฟล์เดิม ซึ่งรวมถึง 1 ชุดที่ตั้งอยู่คนละถิ่น และสำเนาบนเครื่อง 2 ชุด", - "backup_onboarding_description": "แนะนำให้ใช้ การสำรองข้อมูลแบบ 3-2-1เพื่อปกป้องข้อมูล ควรเก็บสำเนาของรูปภาพ/วิดีโอที่อัปโหลดและฐานข้อมูลของ Immich เพื่อสำรองข้อมูลได้อย่างทั่วถึง", + "backup_onboarding_description": "แนะนำให้ใช้การสำรองข้อมูลแบบ 3-2-1 เพื่อปกป้องข้อมูล ควรเก็บสำเนาของรูปภาพ/วิดีโอที่อัปโหลดและฐานข้อมูลของ Immich เพื่อสำรองข้อมูลได้อย่างทั่วถึง", "backup_onboarding_footer": "สำหรับข้อมูลเพิ่มเติมเกี่ยวกับการสำรองข้อมูล Immich โปรดดูเอกสารประกอบ", "backup_onboarding_parts_title": "การสำรองข้อมูลแบบ 3-2-1 ประกอบไปด้วย:", "backup_onboarding_title": "สำรองข้อมูล", "backup_settings": "ตั้งค่าการสำรองข้อมูล", "backup_settings_description": "จัดการการตั้งค่าการสำรองฐานข้อมูล", "cleared_jobs": "เคลียร์งานสำหรับ: {job}", - "config_set_by_file": "การตั้งค่าคอนฟิกกำลังถูกกำหนดโดยไฟล์คอนฟิก", + "config_set_by_file": "การตั้งค่ากำลังถูกกำหนดโดยไฟล์การตั้งค่า", "confirm_delete_library": "คุณแน่ใจว่าอยากลบคลังภาพ {library} หรือไม่?", - "confirm_delete_library_assets": "คุณแน่ใจว่าต้องการลบคลังภาพนี้หรือไม่? สี่อ{count, plural, one { # รายการ} other {ทั้งหมด # รายการ}}ในคลังจะถูกลบออกจาก Immich โดยถาวร ไฟล์จะยังคงอยู่บนดิสก์", + "confirm_delete_library_assets": "คุณแน่ใจว่าต้องการลบคลังภาพนี้หรือไม่? สี่อ{count, plural, one { # รายการ} other {ทั้งหมด # รายการ}}ในคลังจะถูกลบออกจาก Immich โดยถาวร โดยไฟล์จะยังคงอยู่บนดิสก์อยู่", "confirm_email_below": "โปรดยืนยัน โดยการพิมพ์ \"{email}\" ข้างล่าง", "confirm_reprocess_all_faces": "คุณแน่ใจว่าคุณต้องการประมวลผลใบหน้าทั้งหมดใหม่? ชื่อคนจะถูกลบไปด้วย", "confirm_user_password_reset": "คุณแน่ใจว่าต้องการรีเซ็ตรหัสผ่านของ {user} หรือไม่?", @@ -71,13 +71,13 @@ "create_job": "สร้างงาน", "cron_expression": "รูปแบบ cron", "cron_expression_description": "ตั้งช่วงเวลาในการสแกนโดยใช้รูปแบบ cron สำหรับข้อมูลเพิ่มเติมกรุณาอิง Crontab Guru", - "cron_expression_presets": "พรีเซ็ตรูปแบบ cron", + "cron_expression_presets": "ตัวอย่างรูปแบบ cron", "disable_login": "ปิดการล็อกอิน", "download_csv": "ดาวน์โหลด CSV", "duplicate_detection_job_description": "ใช้ machine learning กับสี่อเพื่อตรวจจับรูปภาพที่คล้ายกัน โดยใช้การค้นหาอัจฉริยะ", "exclusion_pattern_description": "ข้อยกเว้นสามารถละเว้นไฟล์และโฟลเดอร์ขณะสแกนคลังภาพของคุณ มีประโยชน์เมื่อโฟลเดอร์มีไฟล์ที่ไม่อยากนำเข้า เช่นไฟล์ RAW", "export_config_as_json_description": "ดาวน์โหลดการตั้งค่าระบบปัจจุบันไปยังไฟล์ในรูปแบบ JSON", - "external_libraries_page_description": "หน้าต่างคลังแอดมินภายนอก", + "external_libraries_page_description": "หน้าคลังแอดมินภายนอก", "face_detection": "การตรวจจับใบหน้า", "face_detection_description": "ตรวจจับใบหน้าในสี่อโดยใช้ machine learning วิดีโอจะใช้ภาพตัวอย่างจากวิดีโอเท่านั้น \"ทั้งหมด\" จะประมวลผลสี่อทั้งหมด \"ขาดหาย\" จะประมวลผลสี่อที่ยังไม่ได้ประมวลผล ใบหน้าที่ถูกตรวจจับแล้วจะถูกเข้าคิวประมวลผลการจดจำใบหน้า เพิ่มเข้าไปในกลุ่มที่มีอยู่แล้วหรือคนใหม่", "facial_recognition_job_description": "นำใบหน้าที่ตรวจจับได้ไปจับกลุ่มตามผู้คน ขั้นตอนนี้ทำงานหลังจากตรวจจับใบหน้าสำเร็จ \"ทั้งหมด\" จะจำกลุ่มใบหน้าทั้งหมดใหม่ \"ขาดหาย\" จะจัดคิวใบหน้าที่ยังไม่ได้ระบุคน", @@ -90,25 +90,40 @@ "image_fullsize_enabled_description": "สร้างรูปภาพเต็มขนาดสำหรับรูปแบบที่ไม่เข้ากันกับเว็บ เมื่อเปิดใช้งาน \"ถ้าต้องการดูตัวอย่าง\" ตัวอย่างแบบฝังจะถูกใช้โดยตรงโดยตรง และไม่ส่งผลต่อรูปแบบไม่เข้ากันกับเว็บ เช่น JPEG", "image_fullsize_quality_description": "คุณภาพรูปภาพขนาดเต็มจาก 1-100 ค่ายิ่งสูงคุณภาพยิ่งสูง แต่แลกมาด้วยขนาดไฟล์ที่ใหญ่ขึ้น", "image_fullsize_title": "ตั้งค่ารูปภาพขนาดเต็ม", - "image_prefer_embedded_preview": "ใช้พรีวิวแบบฝังตัว", - "image_prefer_embedded_preview_setting_description": "ใช้การแสดงภาพแบบฝังตัวในรูปภาพ RAW ในการวิเคราะห์รูปภาพหากสามารถใช้ได้ สิ่งนี้จะช่วยให้รูปภาพมีสีสันที่ถูกต้องมากยิ่งขึ้น แต่อย่างไรก็ตาม คุณภาพรูปภาพขึ้นอยู่กับกล้องถ่ายรูป และอาจจะเกิดร่องรอย ลาย ที่ไม่พึงประสงค์บนรูปภาพ จากการย่อขนาดไฟล์", + "image_prefer_embedded_preview": "ใช้ตัวอย่างแบบฝังตัว", + "image_prefer_embedded_preview_setting_description": "ใช้ตัวอย่างแบบฝังตัวในรูปภาพ RAW ในการวิเคราะห์รูปภาพหากสามารถใช้ได้ สิ่งนี้จะช่วยให้รูปภาพมีสีสันที่ถูกต้องมากยิ่งขึ้น แต่อย่างไรก็ตาม คุณภาพรูปภาพขึ้นอยู่กับกล้องถ่ายรูป และอาจจะเกิดร่องรอย ลาย ที่ไม่พึงประสงค์บนรูปภาพ จากการย่อขนาดไฟล์", "image_prefer_wide_gamut": "ใช้ช่วงสีกว้าง", "image_prefer_wide_gamut_setting_description": "ใช้ Display P3 สำหรับภาพตัวอย่าง (thumbnails) เพื่อรักษาความสดใสของภาพที่มีช่วงสีที่กว้างขึ้น อย่างไรก็ตาม ภาพอาจแสดงผลแตกต่างกันบนอุปกรณ์เก่าที่ใช้เว็บเบราว์เซอร์เวอร์ชันเก่า สำหรับภาพที่อยู่ใน sRGB จะยังคงใช้ sRGB ต่อไปเพื่อหลีกเลี่ยงการเปลี่ยนแปลงของสี", "image_preview_description": "ภาพขนาดปานกลางที่ถูกลบข้อมูลเมตา ใช้สำหรับการดูแอสเซ็ตเดี่ยวและสำหรับการเรียนรู้ของเครื่อง (Machine Learning)", "image_preview_quality_description": "คุณภาพการแสดงตัวอย่างตั้งแต่ 1-100 ยิ่งสูงยิ่งดี แต่จะทำให้ไฟล์มีขนาดใหญ่ขึ้นและอาจทำให้แอปตอบสนองช้าลง การตั้งค่าต่ำอาจส่งผลต่อคุณภาพ Machine Learning", "image_preview_title": "ตั้งค่าพรีวิว", "image_progressive": "รูปภาพแบบโปรเกรสซีฟ", - "image_progressive_description": "เข้ารหัสรูปภาพ JPEG แบบโปรเกรสซีฟเพื่อให้แสดงผลแบบค่อยๆ ชัดขึ้นขณะโหลด ทั้งนี้จะไม่มีผลกับรูปภาพ WebP", + "image_progressive_description": "เขียนภาพ JPEG เพื่อให้สามารถแสดงผลแบบค่อยๆ ชัดขึ้นขณะโหลด ทั้งนี้จะไม่มีผลกับรูปภาพ WebP", "image_quality": "คุณภาพ", "image_resolution": "ความละเอียด", - "image_resolution_description": "ความละเอียดสูกว่าสามารถเก็บรายละเอียดได้มากกว่าแต่ใช้เวลา encode นานกว่า ไฟล์ใหญ่กว่า และลดความตอบสนองของแอป", + "image_resolution_description": "ความละเอียดสูงกว่าสามารถเก็บรายละเอียดได้มากกว่าแต่ใช้เวลา encode นานกว่า มีไฟล์ใหญ่กว่า และสามารถลดความตอบสนองของแอปลงได้", "image_settings": "การตั้งค่ารูปภาพ", "image_settings_description": "จัดการคุณภาพและความคมชัดของภาพที่สร้างขึ้น", - "image_thumbnail_description": "รูปขนาดย่อที่มีการลบข้อมูลเมตาด้าต้า ใช้เมื่อดูภาพถ่ายในกลุ่ม เช่น ในไทม์ไลน์หลัก", + "image_thumbnail_description": "รูปขนาดย่อที่มีการลบข้อมูลเมตาดาต้า ใช้เมื่อดูภาพถ่ายในกลุ่ม เช่น ในไทม์ไลน์หลัก", "image_thumbnail_quality_description": "คุณภาพของภาพขนาดย่อตั้งแต่ 1-100 ยิ่งสูงยิ่งดี แต่จะทำให้ไฟล์มีขนาดใหญ่ขึ้นและอาจทำให้แอปตอบสนองช้าลง", "image_thumbnail_title": "ตั้งค่า Thumbnail", "import_config_from_json_description": "นำเข้าการตั้งค่าระบบโดยการอัปโหลดไฟล์คอนฟิก JSON", - "job_concurrency": "{job} งานพร้อมกัน", + "integrity_checks_checksum_files": "ไฟล์ Checksum", + "integrity_checks_checksum_files_description": "กำหนดค่าการตรวจสอบ Checksum", + "integrity_checks_checksum_files_enable_description": "เปิดใช้งานการตรวจสอบ Checksum", + "integrity_checks_checksum_files_percentage_limit": "ขีดจำกัดร้อยละ", + "integrity_checks_checksum_files_percentage_limit_description": "กำหนดค่าร้อยละสูงสุดระหว่าง 0.01 ถึง 1 สำหรับการตรวจสอบ Checksum ในแต่ละรอบ", + "integrity_checks_checksum_files_time_limit": "จำกัดเวลา", + "integrity_checks_checksum_files_time_limit_description": "กำหนดระยะเวลาสูงสุดที่ควรใช้สำหรับการตรวจสอบ Checksum ในแต่ละรอบการทำงาน (ms)", + "integrity_checks_missing_files": "ไฟล์ที่ขาดหายไป", + "integrity_checks_missing_files_description": "กำหนดความถี่และเปิดหรือปิดการตรวจสอบไฟล์ที่ขาดหายไป", + "integrity_checks_missing_files_enable_description": "เปิดการตรวจสอบไฟล์ที่ขาดหายไป", + "integrity_checks_settings": "การตรวจสอบความถูกต้องสมบูรณ์", + "integrity_checks_settings_description": "จัดการรอบการตรวจสอบความถูกต้องสมบูรณ์", + "integrity_checks_untracked_files": "ไฟล์ที่ไม่ถูกติดตาม", + "integrity_checks_untracked_files_description": "กำหนดความถี่และเปิดหรือปิดการตรวจสอบไฟล์ที่ไม่ถูกติดตาม", + "integrity_checks_untracked_files_enable_description": "เปิดการตรวจสอบไฟล์ที่ไม่ถูกติดตาม", + "job_concurrency": "{job} ที่ทำงานพร้อมกัน", "job_created": "สร้างงานเรียบร้อย", "job_not_concurrency_safe": "งานนี้ทำงานพร้อมกันแบบปลอดภัยไม่ได้", "job_settings": "การตั้งค่างาน", @@ -227,7 +242,7 @@ "map_reverse_geocoding": "ประมวลผลชื่อทางภูมิศาสตร์", "map_reverse_geocoding_enable_description": "เปิดใช้งานประมวลผลชื่อทางภูมิศาสตร์", "map_reverse_geocoding_settings": "การตั้งค่าประมวลผลชื่อทางภูมิศาสตร์", - "map_settings": "การตั้งค่าแผนที่และ GPS", + "map_settings": "แผนที่", "map_settings_description": "จัดการการตั้งค่าแผนที่", "map_style_description": "URL ไปยังธีมแผนที่ style.json", "memory_cleanup_job": "ล้างความทรงจำ", @@ -289,6 +304,9 @@ "oauth_mobile_redirect_uri": "URI เปลี่ยนเส้นทางบนโทรศัพท์", "oauth_mobile_redirect_uri_override": "แทนที่ URI เปลี่ยนเส้นทางบนโทรศัพท์", "oauth_mobile_redirect_uri_override_description": "เปิดเมื่อผู้ให้บริการ OAuth ไม่อนุญาต URI เช่น \"{callback}\"", + "oauth_prompt_description": "พารามิเตอร์ prompt (เช่น select_account, login, consent)", + "oauth_role_claim": "สิทธ์บทบาท", + "oauth_role_claim_description": "มอบสิทธิ์ผู้ดูแลระบบโดยอัตโนมัติหากพบ Claim นี้ โดยค่าของ Claim อาจเป็น 'user' หรือ 'admin'", "oauth_settings": "OAuth", "oauth_settings_description": "จัดการการตั้งค่าล็อกอินผ่าน OAuth", "oauth_settings_more_details": "สำหรับรายละเอียดเพิ่มเติม ให้อ้างถึงเอกสาร", @@ -313,6 +331,8 @@ "refreshing_all_libraries": "รีเฟรชคลังภาพทั้งหมด", "registration": "ลงทะเบียนผู้จัดการ", "registration_description": "เนื่องจากคุณเป็นผู้ใช้งานแรกของระบบ คุณจะถูกแต่งตั้งเป็นผู้จัดการและรับผิดชอบงานบริหาร ผู้ใช้งานเพิ่มเติมจะถูกสร้างโดยคุณ", + "release_channel_release_candidate": "เวอร์ชัน Release Candidate", + "release_channel_stable": "เสถียร", "remove_failed_jobs": "ลบงานที่ไม่สำเร็จ", "require_password_change_on_login": "บังคับผู้ใช้งานให้เปลี่ยนรหัสผ่านเมื่อเข้าสู่ระบบครั้งแรก", "reset_settings_to_default": "ตั้งค่าการตั้งค่าเป็นค่าเริ่มต้น", @@ -407,6 +427,14 @@ "transcoding_preferred_hardware_device_description": "ใช้ได้กับ VAAPI และ QSV เท่านั้น ตั้งค่าโหนด dri ที่ใช้สำหรับทรานส์โค้ดฮาร์ดแวร์", "transcoding_preset_preset": "พรีเซ็ต (-preset)", "transcoding_preset_preset_description": "ความเร็วในการบีบอัด พรีเซ็ตที่ช้ากว่าจะสร้างไฟล์ที่มีขนาดเล็กลงและเพิ่มคุณภาพเมื่อกำหนดเป้าหมายที่อัตราบิตเรตที่กำหนด VP9 จะไม่สนใจความเร็วที่สูงกว่า 'faster'", + "transcoding_realtime": "ทรานส์โค้ดแบบเรียลไทม์ [EXPERIMENTAL]", + "transcoding_realtime_description": "เปิดการทรานส์โค้ดแบบเรียลไทม์ขณะที่วิดีโอกำลังสตรีม ช่วยให้เปลี่ยนคุณภาพวิดีโอได้ แต่อาจทำให้เกิดความหน่วงในการเล่นสูงขึ้นและกระตุก ขึ้นอยู่กับความสามารถของเซิร์ฟเวอร์", + "transcoding_realtime_enabled": "เปิดการทรานส์โค้ดแบบเรียลไทม์", + "transcoding_realtime_enabled_description": "หากปิด เซิร์ฟเวอร์จะไม่ยอมให้เปิดเซสชันทรานส์โค้ดแบบเรียลไทม์ใหม่", + "transcoding_realtime_resolutions": "ความละเอียด", + "transcoding_realtime_resolutions_description": "ความละเอียดที่มีให้เลือกสำหรับการทรานส์โค้ดแบบเรียลไทม์ การใช้ความละเอียดสูงอาจทำให้เกิดปัญหาในการเล่นวิดีโอ หากเซิร์ฟเวอร์ไม่สามารถทรานส์โค้ดได้เร็วพอ", + "transcoding_realtime_video_codecs": "โคเดกวิดีโอ", + "transcoding_realtime_video_codecs_description": "โคเดกวิดีโอที่มีให้เลือกสำหรับการทรานส์โค้ดแบบเรียลไทม์ โดยไคลเอนต์จะเลือกตัวเลือกที่ดีที่สุดที่รองรับในระหว่างการเล่น ทั้งนี้ AV1 มีประสิทธิภาพมากกว่า HEVC ซึ่งมีประสิทธิภาพมากกว่า H.264 เมื่อใช้งานการเร่งความเร็วด้วยฮาร์ดแวร์ ให้เลือกเฉพาะโคเดกที่ตัวเร่งความเร็วสามารถเข้ารหัสได้เท่านั้น แต่หากใช้งานการทรานส์โค้ดด้วยซอฟต์แวร์ H.264 จะทำงานได้เร็วกว่า AV1 ซึ่งเร็วกว่า HEVC", "transcoding_reference_frames": "frames อ้างอิง", "transcoding_reference_frames_description": "จำนวนเฟรมที่จะอ้างอิงเมื่อบีบอัดเฟรมที่กำหนด ค่าที่สูงขึ้นจะช่วยเพิ่มประสิทธิภาพในการบีบอัด แต่จะทำให้การเข้ารหัสช้าลง ค่า 0 จะตั้งค่านี้โดยอัตโนมัติ", "transcoding_required_description": "เฉพาะวิดีโอที่ไม่อยู่ในรูปแบบที่ยอมรับเท่านั้น", @@ -418,13 +446,13 @@ "transcoding_temporal_aq_description": "เฉพาะ NVENC เท่านั้น Temporal Adaptive Quantization จะเพิ่มคุณภาพของฉากที่มีรายละเอียดสูงและการเคลื่อนไหวต่ำ อาจไม่รองรับอุปกรณ์ที่เก่ากว่า", "transcoding_threads": "เธรด", "transcoding_threads_description": "ค่ายิ่งเยอะจะแปลงไฟล์เร็วกว่า แต่จะเหลือพื้นที่ให้เซิร์ฟเวอร์ประมวลผลงานอื่นน้อยลงเมื่อทํางานนี้ ค่านี้ไม่ควรมากกว่าจํานวน CPU core จะประมวลผลเต็มที่เมื่อตั้งเป็น 0", - "transcoding_tone_mapping": "การฉายโทนสี", + "transcoding_tone_mapping": "การทำ Tone-mapping", "transcoding_tone_mapping_description": "พยายามรักษารูปแบบวิดีโอ HDR เมื่อแปลงเป็น SDR อัลกอริทึมแต่ละตัวจะปรับสี,รายละเอียด และความสว่างแตกต่างกัน Hable จะรักษารายละเอียด Mobius จะรักษาสี และ Reinhard จะรักษาความสว่าง", "transcoding_transcode_policy": "กฎการแปลงไฟล์", "transcoding_transcode_policy_description": "นโยบายเกี่ยวกับเวลาที่วิดีโอจะต้องได้รับการแปลงรหัส วิดีโอ HDR และวิดีโอที่มีรูปแบบพิกเซลอื่นนอกจาก YUV 4:2:0 จะได้รับการแปลงรหัสเสมอ (ยกเว้นในกรณีที่ปิดใช้งานการแปลงรหัส)", - "transcoding_two_pass_encoding": "การแปลงไฟล์สองรอบ", + "transcoding_two_pass_encoding": "การเข้ารหัสแบบ Two-pass", "transcoding_two_pass_encoding_setting_description": "การแปลงไฟล์สองรอบจะช่วยให้ได้วิดีโอที่ดีขึ้น เมื่อเปิดใช้งาน bitrate สูงสุด (จำเป็นสำหรับไฟล์ H.264 และ HEVC) โหมดนี้จะใช้ช่วง bitrate ที่ขึ้นอยู่กับค่า bitrate สูงสุดและไม่สนใจ CRF สำหรับ VP9 สามารถใช้ค่า CRF ได้ถ้าปิดใช้งาน bitrate สูงสุด", - "transcoding_video_codec": "แบบไฟล์วิดีโอ", + "transcoding_video_codec": "โคเดกวิดีโอ", "transcoding_video_codec_description": "VP9 มีประสิทธิภาพสูงและเข้ากันกับเว็บได้ดี แต่ใช้เวลาแปลงไฟล์นานกว่า HEVC มีประสิทธิภาพคล้ายกัน แต่เข้ากันกับเว็บได้น้อยกว่า H.264 เข้ากันกับทุกอุปกรณ์ และแปลงไฟล์เร็ว แต่ได้ไฟล์ที่ใหญ่ขึ้น AV1 เป็นไฟล์ที่มีประสิทธิภาพมากที่สุด แต่ไม่เข้ากันกับอุปกรณ์เก่า", "trash_enabled_description": "เปิดใช้งานถังขยะ", "trash_number_of_days": "จํานวนวัน", @@ -432,6 +460,8 @@ "trash_settings": "การตั้งค่าถังขยะ", "trash_settings_description": "จัดการการตั้งค่าถังขยะ", "unlink_all_oauth_accounts": "เลิกลิงก์บัญชี OAuth ทั้งหมด", + "unlink_all_oauth_accounts_description": "อย่าลืมปลดการเชื่อมต่อบัญชี OAuth ทั้งหมดก่อนย้ายไปผู้ให้บริการใหม่", + "unlink_all_oauth_accounts_prompt": "คุณแน่ใจว่าต้องการปลดการเชื่อมต่อบัญชี OAuth ทั้งหมด? การดำเนินการต่อจะรีเซ็ต OAuth ID ของผู้ใช้แต่ละราย และไม่สามารถย้อนกลับได้", "user_cleanup_job": "ล้างผู้ใช้", "user_delete_delay": "บัญชีและสื่อของ {user} จะถูกตั้งเวลาสำหรับการลบถาวรใน {delay, plural, one {# วัน} other {# วัน}}", "user_delete_delay_settings": "ลบการถ่วงเวลา", @@ -448,6 +478,8 @@ "user_settings_description": "จัดการการตั้งค่าผู้ใช้", "user_successfully_removed": "ลบผู้ใช้ {email} เสร็จสมบูรณ์แล้ว", "users_page_description": "หน้าผู้ใช้ผู้ดูแล", + "version_check_channel": "ช่องทางออกรุ่นใหม่", + "version_check_channel_description": "เลือกช่องทางที่คุณต้องการได้รับการประกาศเวอร์ชั่นใหม่", "version_check_enabled_description": "เช็ค GitHub เป็นระยะ ๆ เพื่อตรวจสอบรุ่นใหม่", "version_check_implications": "การตรวจสอบเวอร์ชันใหม่จะต้องติดต่อกับ {server} เป็นระยะ", "version_check_settings": "ตรวจสอบรุ่น", @@ -463,14 +495,14 @@ "advanced_settings_clear_image_cache_error": "ไม่สามารถล้างแคชรูปภาพ", "advanced_settings_clear_image_cache_success": "เคลียร์พื้นที่ {size} สำเร็จ", "advanced_settings_log_level_title": "ระดับการ Log: {level}", - "advanced_settings_prefer_remote_subtitle": "อุปกรณ์บางเครื่องโหลดภาพขนาดย่อจากสื่อที่อยู่ในเครื่องช้ามาก เปิดการตั้งค่านี้เพื่อโหลดรูปภาพทางไกลแทน", - "advanced_settings_prefer_remote_title": "ให้ความสำคัญกับรูปภาพรีโมท", + "advanced_settings_prefer_remote_subtitle": "อุปกรณ์บางเครื่องโหลดภาพขนาดย่อจากสื่อที่อยู่ในเครื่องช้ามาก เปิดการตั้งค่านี้เพื่อโหลดรูปภาพจากเซิร์ฟเวอร์แทน", + "advanced_settings_prefer_remote_title": "เลือกภาพจากเซิร์ฟเวอร์เป็นหลัก", "advanced_settings_proxy_headers_subtitle": "กำหนด proxy headers ที่ Immich ควรส่งพร้อมกับแต่ละคำขอเครือข่าย", "advanced_settings_proxy_headers_title": "ส่วนหัวพร็อกซีกำหนดเอง [คุณสมบัติทดลอง]", "advanced_settings_readonly_mode_subtitle": "เปิดใช้งานโหมดอ่านเท่านั้น ซึ่งจะทำให้สามารถดูรูปภาพได้อย่างเดียว แต่ไม่สามารถเลือกหลายภาพ, แชร์, แคสต์, ลบภาพได้ เปิดหรือปิดใช้งานโหมดอ่านเท่านั้นได้จากภาพโปรไฟล์บนหน้าจอหลัก", "advanced_settings_readonly_mode_title": "โหมดอ่านเท่านั้น", "advanced_settings_sync_remote_deletions_subtitle": "ลบหรือกู้คืนไฟล์บนอุปกรณ์นี้โดยอัตโนมัติเมื่อดำเนินการดังกล่าวผ่านเว็บ", - "advanced_settings_sync_remote_deletions_title": "ซิงก์การลบจากระยะไกล [คุณสมบัติทดลอง]", + "advanced_settings_sync_remote_deletions_title": "ซิงก์การลบจากบนเซิร์ฟเวอร์ [ทดลองใช้]", "advanced_settings_tile_subtitle": "ตั้งค่าผู้ใช้งานขั้นสูง", "advanced_settings_troubleshooting_subtitle": "เปิดฟีเจอร์เพิ่มเติมเพื่อแก้ไขปัญหา", "advanced_settings_troubleshooting_title": "แก้ไขปัญหา", @@ -542,6 +574,7 @@ "asset_added_to_album": "เพิ่มไปยังอัลบั้มแล้ว", "asset_adding_to_album": "กำลังเพิ่มไปยังอัลบั้ม…", "asset_created": "สร้างสื่อแล้ว", + "asset_day_count": "{date}: สื่อ {count, plural, one {# รายการ} other {# รายการ}}", "asset_description_updated": "อัปเดตรายละเอียดสำเร็จ", "asset_hashing": "กำลังแฮช…", "asset_list_group_by_sub_title": "กลุ่มโดย", @@ -564,6 +597,7 @@ "asset_viewer_settings_title": "ตัวดูทรัพยากร", "assets": "สื่อ", "assets_added_to_album_count": "เพิ่ม {count, plural, one {# asset} other {# assets}} ไปยังอัลบั้ม", + "assets_added_to_album_partial_count": "เพิ่มสื่อ {successCount} จากทั้งหมด {totalCount} {totalCount, plural, one {รายการ} other {รายการ}} ไปยังอัลบั้มแล้ว", "assets_added_to_albums_count": "เพิ่มสื่อ {assetTotal, plural, one {# รายการ} other {# รายการ}} ไปยังอัลบั้ม {albumTotal, plural, one {# รายการ} other {# รายการ}}แล้ว", "assets_cannot_be_added_to_album_count": "ไม่สามารถเพิ่ม {count, plural, one {สื่อ} other {สื่อ}} ไปยังอัลบั้ม", "assets_cannot_be_added_to_albums": "ไม่สามารถเพิ่ม{count, plural, one {สื่อ} other {สื่อ}}ไปยังอัลบั้มใด ๆ ได้", @@ -571,14 +605,14 @@ "assets_moved_to_trash_count": "ย้าย {count, plural, one {# asset} other {# assets}} ไปยังถังขยะแล้ว", "assets_permanently_deleted_count": "ลบ {count, plural, one {# asset} other {# assets}} ทิ้งถาวร", "assets_removed_count": "{count, plural, one {# asset} other {# assets}} ถูกลบแล้ว", - "assets_restore_confirmation": "คุณแน่ใจหรือไม่ว่าต้องการกู้คืนสื่อที่ทิ้งทั้งหมด? คุณไม่สามารถย้อนกลับการดำเนินการนี้ได้! โปรดทราบว่าสื่อออฟไลน์ใดๆ ไม่สามารถกู้คืนได้ด้วยวิธีนี้", + "assets_restore_confirmation": "คุณแน่ใจหรือไม่ว่าต้องการกู้คืนสื่อที่ทิ้งไปทั้งหมด? คุณจะไม่สามารถย้อนการดำเนินการนี้กลับได้ โปรดทราบว่าสื่อออฟไลน์ใดๆ ไม่สามารถกู้คืนได้ด้วยวิธีนี้", "assets_restored_count": "{count, plural, one {# asset} other {# assets}} คืนค่า", "assets_trashed": "ย้าย {count} สื่อไปยังถังขยะ", "assets_trashed_count": "{count, plural, one {# asset} other {# assets}} ถูกลบ", "assets_were_part_of_album_count": "{count, plural, one {Asset was} other {Assets were}} อยู่ในอัลบั้มอยู่แล้ว", "assets_were_part_of_albums_count": "{count, plural, one {สื่อ} other {สื่อ}}เป็นส่วนหนึ่งของอัลบั้มอยู่แล้ว", "authorized_devices": "อุปกรณ์ที่ได้รับอนุญาต", - "automatic_endpoint_switching_subtitle": "เชื่อมต่อด้วย LAN ภายในวง Wi-Fi ที่ระบุไว้ และเชื่อมต่อด้วยวิธีอื่นเมื่ออยู่นอก Wi-Fi ที่ระบุไว้", + "automatic_endpoint_switching_subtitle": "เชื่อมต่อโดยตรงพ่านวง Wi-Fi ที่ระบุไว้ และเชื่อมต่อด้วยวิธีอื่นเมื่ออยู่นอก Wi-Fi ที่ระบุไว้", "automatic_endpoint_switching_title": "สลับ URL อัตโนมัติ", "autoplay_slideshow": "เล่นสไลด์โชว์", "back": "กลับ", @@ -617,17 +651,19 @@ "backup_options": "ตัวเลือกการสำรองข้อมูล", "backup_settings_subtitle": "จัดการการตั้งค่าอัปโหลด", "backward": "กลับหลัง", + "battery_optimization_backup_reliability": "การปิดการประหยัดแบตเตอรี่สามารถทำให้การสำรองข้อมูลในพื้นหลังไปได้อย่างราบรื่นขึ้นได้", "biometric_auth_enabled": "การพิสูจน์อัตลักษณ์เพื่อยืนยันตัวบุคคลถูกเปิด", "biometric_locked_out": "การพิสูจน์อัตลักษณ์เพื่อยืนยันตัวบุคคลถูกล็อค", "biometric_no_options": "ไม่มีตัวเลือกการพิสูจน์อัตลักษณ์เพื่อยืนยันตัวบุคคล", "biometric_not_available": "ไม่สามารถใช้งานการพิสูจน์อัตลักษณ์เพื่อยืนยันตัวบุคคลได้บนอุปกรณ์นี้", "birthdate_set_description": "วันเกิดจะใช้เพื่อคำนวณอายุของบุคคลนี้ในขณะที่ถ่ายรูป", "blurred_background": "พื้นหลังแบบเบลอ", + "browse_templates": "ค้นหาเท็มเพลต", "bugs_and_feature_requests": "รายงานข้อผิดพลาดและข้อเสนอแนะ", "build": "สร้าง", "build_image": "สร้าง Image", - "bulk_delete_duplicates_confirmation": "คุณแน่ใจหรือไม่ว่าต้องการลบ {count, plural, one {# duplicate asset} other {# duplicate asset}} เป็นกลุ่ม การดำเนินการนี้จะเก็บสื่อที่ใหญ่ที่สุดของแต่ละกลุ่มและลบสื่อที่ซ้ำกันทั้งหมดอย่างถาวร คุณไม่สามารถย้อนกลับการดำเนินการนี้ได้!", - "bulk_keep_duplicates_confirmation": "คุณแน่ใจหรือไม่ว่าต้องการเก็บ {count, plural, one {# duplicate asset} other {# duplicate asset}} ไว้ การดำเนินการนี้จะแก้ไขกลุ่มที่ซ้ำกันทั้งหมดโดยไม่ต้องลบสิ่งใดเลย", + "bulk_delete_duplicates_confirmation": "คุณแน่ใจหรือไม่ว่าต้องการลบ {count, plural, one {# สื่อที่ซ้ำกัน} other {# สื่อที่ซ้ำกัน}}เป็นกลุ่ม การดำเนินการนี้จะเก็บสื่อที่ใหญ่ที่สุดของแต่ละกลุ่มและลบสื่อที่ซ้ำกันทั้งหมดอย่างถาวร คุณไม่สามารถย้อนกลับการดำเนินการนี้ได้!", + "bulk_keep_duplicates_confirmation": "คุณต้องการที่จะเก็บ {count, plural, one {# สื่อที่ซ้ำกัน} other {# สื่อที่ซ้ำกัน}} ไว้หรือไม่ การดำเนินการนี้จะแก้ไขกลุ่มที่ซ้ำกันทั้งหมดโดยไม่มีการลบสิ่งใดเลย", "bulk_trash_duplicates_confirmation": "คุณแน่ใจหรือไม่ว่าต้องการลบข้อมูลจำนวนมาก {count, plural, one {# duplicate asset} other {# duplicate asset}} การทำเช่นนี้จะเก็บสื่อที่ใหญ่ที่สุดของแต่ละกลุ่มและลบข้อมูลซ้ำอื่น ๆ ทั้งหมด", "buy": "ซื้อ Immich", "camera": "กล้อง", @@ -639,9 +675,10 @@ "canceling": "กำลังยกเลิก", "cannot_merge_people": "ไม่สามารถรวมกลุ่มคนได้", "cannot_undo_this_action": "การกระทำนี้ไม่สามารถย้อนกลับได้!", - "cannot_update_the_description": "ไม่สามารถอัพเดทรายละเอียดได้", + "cannot_update_the_description": "ไม่สามารถอัปเดทรายละเอียดได้", "cast": "แคสต์", "cast_description": "ตั้งค่าปลายทางแคสต์", + "change": "เปลี่ยน", "change_date": "เปลี่ยนวันที่", "change_description": "แก้ไขคำอธิบาย", "change_display_order": "เปลี่ยนลำดับการแสดงผล", @@ -663,6 +700,7 @@ "charging": "กำลังชาร์จ", "charging_requirement_mobile_backup": "การสำรองข้อมูลในเบื้องหลังจะทำงานเฉพาะเมื่ออุปกรณ์กำลังชาร์จอยู่", "check_logs": "ตรวจสอบบันทึก", + "checksum": "Checksum", "choose": "เลือก", "choose_matching_people_to_merge": "เลือกคนที่ตรงกันเพื่อรวมเข้าด้วยกัน", "city": "เมือง", @@ -714,7 +752,7 @@ "confirm_admin_password": "ยืนยันรหัสผ่านผู้ดูแลระบบ", "confirm_delete_face": "คุณแน่ใจว่าต้องการลบใบหน้า{name}ออกหรือไม่?", "confirm_delete_shared_link": "คุณต้องการที่จะลบลิงก์ที่แชร์ใช่หรือไม่ ?", - "confirm_keep_this_delete_others": "จะลบทั้งหมดในรายการ และยกเว้นสื่อนี้หรือไม่ คุณแน่ใจใช่ไหมที่ต้องการดำเนินการต่อ?", + "confirm_keep_this_delete_others": "จะลบสื่อทั้งหมดใน Stack ยกเว้นสื่อนี้ คุณต้องการที่จะดำเนินการต่อหรือไม่", "confirm_new_pin_code": "ยืนยันรหัสประจำตัว (PIN)", "confirm_password": "ยืนยันรหัสผ่าน", "confirm_tag_face": "คุณต้องการแท็กใบหน้านี้ด้วยชื่อ {name} หรือไม่", @@ -724,6 +762,7 @@ "contain": "มีอยู่", "context": "บริบท", "continue": "ต่อไป", + "control_bottom_app_bar_add_tags": "เพิ่มแท็ก", "control_bottom_app_bar_delete_from_local": "ลบจากเครื่อง", "control_bottom_app_bar_edit_location": "แก้ไขตำแหน่ง", "control_bottom_app_bar_edit_time": "แก้ไขวันและเวลา", @@ -732,6 +771,7 @@ "copied_to_clipboard": "คัดลอกไปยังคลิปบอร์ดแล้ว!", "copy_error": "คัดลอกข้อผิดพลาด", "copy_image": "คัดลอกภาพ", + "copy_json": "คัดลอก JSON", "copy_link": "คัดลอกลิงก์", "copy_link_to_clipboard": "คัดลอกลิงก์ไปยังคลิปบอร์ด", "copy_password": "คัดลอกรหัสผ่าน", @@ -743,6 +783,7 @@ "create_album": "สร้างอัลบั้ม", "create_album_page_untitled": "ไม่มีชื่อ", "create_api_key": "สร้างคีย์ API", + "create_first_workflow": "สร้าง Workflow อันใหม่", "create_library": "สร้างคลังภาพ", "create_link": "สร้างลิงก์", "create_link_to_share": "สร้างลิงก์เพื่อแชร์", @@ -752,14 +793,17 @@ "create_new_person_hint": "กำหนดสื่อที่เลือกให้กับคนใหม่", "create_new_user": "สร้างผู้ใช้งานใหม่", "create_person": "สร้างบุคคล", + "create_person_subtitle": "เพิ่มชื่อให้กับใบหน้าที่เลือกเพื่อสร้างและแท็กบุคคลคนใหม่", "create_shared_album_page_share_add_assets": "เพิ่มทรัพยากร", "create_shared_album_page_share_select_photos": "เลือกรูปภาพ", "create_shared_link": "สร้างลิงก์ที่แชร์", "create_tag": "สร้างแท็กใหม่", "create_tag_description": "สร้างแท็กใหม่ สำหรับแท็กที่ซ้อนกัน โปรดป้อนเส้นทางทั้งหมดของแท็ก รวมถึงเครื่องหมายทับ", "create_user": "สร้างผู้ใช้", + "create_workflow": "สร้าง Workflow", "created": "สร้างแล้ว", "created_at": "สร้างเมื่อ", + "creating_linked_albums": "กำลังสร้างอัลบั้มที่เชื่อมกัน…", "crop": "ครอป", "crop_aspect_ratio_free": "อิสระ", "crop_aspect_ratio_original": "ต้นฉบับ", @@ -770,7 +814,6 @@ "custom_date": "กำหนดวันที่เอง", "custom_locale": "กำหนดภาษาท้องถิ่นเอง", "custom_locale_description": "ใช้รูปแบบวันที่ เวลา และตัวเลขจากภาษาและภูมิภาคที่เลือก", - "custom_url": "URL กำหนดเอง", "cutoff_date_description": "เก็บรูปภาพจากช่วงเวลา…", "cutoff_day": "{count, plural, one {วัน} other {วัน}}", "cutoff_year": "{count, plural, one {ปี} other {ปี}}", @@ -787,7 +830,10 @@ "day": "วัน", "days": "วัน", "deduplicate_all": "รวมเข้าด้วยกันทั้งหมด", + "default_quality_subtitle": "คุณภาพของภาพที่จะใช้เมื่อแตะปุ่มแชร์ กดค้างที่ปุ่มแชร์เพื่อเลือกคุณภาพในแต่ละครั้ง", + "default_share_quality": "ค่าเริ่มต้นคุณภาพการแชร์", "delete": "ลบออก", + "delete_action_confirmation_message": "ต้องการที่ลบสื่อนี้หรือไม่ การลบจะย้ายสื่อนี้ไปยังถังขยะของเซรฟเวอร์และจะถามคุณถ้าคุณอยากลบสื่อนี้ออกจากเครื่องของคุณ", "delete_action_prompt": "ลบ {count} รายการแล้ว", "delete_album": "ลบอัลบั้ม", "delete_api_key_prompt": "คุณต้องการลบคีย์ API นี้หรือไม่?", @@ -847,7 +893,10 @@ "downloading_asset_filename": "กำลังดาวน์โหลด {filename}", "downloading_from_icloud": "กำลังดาวน์โหลดจากไอคลาว", "downloading_media": "กำลังดาวน์โหลดสื่อ", + "drag_to_reorder": "ลากเพื่อจัดลำดับ", "drop_files_to_upload": "วางไฟล์ในช่องอัปโหลด", + "duplicate": "ทำสำเนา", + "duplicate_workflow": "ทำสำเนา Workflow", "duplicates": "รายการที่ซ้ำกัน", "duplicates_description": "แก้ไขแต่ละกลุ่มโดยระบุว่ากลุ่มใดซ้ำกันหากมี", "duration": "ระยะเวลา", @@ -858,6 +907,7 @@ "edit_date": "แก้ไขวันที่", "edit_date_and_time": "แก้ไขวันที่และเวลา", "edit_date_and_time_action_prompt": "แก้ไขวันที่และเวลา {count} รายการแล้ว", + "edit_date_and_time_by_offset": "ย้ายวันที่ไปตามปริมาณ", "edit_description": "แก้ไขคำอธิบาย", "edit_exclusion_pattern": "แก้ไขข้อยกเว้น", "edit_faces": "แก้ไขหน้า", @@ -880,6 +930,8 @@ "editor_edits_applied_success": "การแก้ไขถูกบันทึกสำเร็จแล้ว", "editor_flip_horizontal": "กลับด้านทางแนวนอน", "editor_flip_vertical": "กลับด้านทางแนวตั้ง", + "editor_handle_corner": "ที่จับตรงมุม{corner, select, top_left {บนซ้าย} top_right {บนขวา} bottom_left {ล่างซ้าย} bottom_right {ล่างขวา} other {}}", + "editor_handle_edge": "ที่จับตรงขอบ{edge, select, top {บน} bottom {ล่าง} left {ซ้าย} right {ขวา} other {}}", "editor_orientation": "การวางแนว", "editor_reset_all_changes": "ยกเลิกการแก้ไข", "editor_rotate_left": "หมุน 90 องศาทวนเข็มนาฬิกา", @@ -888,7 +940,7 @@ "email_notifications": "แจ้งเตือนผ่านอีเมล", "empty_folder": "โฟลเดอร์นี้ว่างเปล่า", "empty_trash": "ทิ้งจากถังขยะ", - "empty_trash_confirmation": "คุณแน่ใจหรือไม่ว่าต้องการล้างถังขยะ การดำเนินการนี้จะลบทรัพยากรทั้งหมดในถังขยะออกจาก Immich อย่างถาวร\nคุณไม่สามารถย้อนกลับการดำเนินการนี้ได้!", + "empty_trash_confirmation": "คุณต้องการที่จะล้างถังขยะหรือไม่ การดำเนินการนี้จะลบสื่อทั้งหมดในถังขยะออกจาก Immich อย่างถาวร\nคุณไม่สามารถย้อนกลับการดำเนินการนี้ได้!", "enable": "เปิดใช้งาน", "enable_backup": "เปิดการสำรองข้อมูล", "enable_biometric_auth_description": "ใส่พินเพื่อเปิดการพิสูจน์อัตลักษณ์เพื่อยืนยันตัวบุคคล", @@ -912,7 +964,7 @@ "cannot_navigate_next_asset": "ไม่สามารถเปลี่ยนเส้นทางได้", "cannot_navigate_previous_asset": "ไม่สามารถเปลี่ยนเส้นทางก่อนหน้าได้", "cant_apply_changes": "เกิดข้อผิดพลาดในการเปลี่ยนแปลง", - "cant_change_activity": "Can't {enabled, select, true {disable} other {enable}} activity", + "cant_change_activity": "ไม่สามารถ{enabled, select, true {ปิด} other {เปิด}}กิจกรรมได้", "cant_change_asset_favorite": "ไม่สามารถเปลี่ยนสื่อที่ชื่นชอบได้", "cant_change_metadata_assets_count": "ไม่สามารถแก้ไขข้อมูล metadata ของ {count, plural, one {# สื่อ} other {# สื่อ}}", "cant_get_faces": "เกิดข้อผิดพลาดในการเรียกดูใบหน้า", @@ -938,10 +990,12 @@ "failed_to_load_people": "ไม่สามารถโหลดบุคคลได้", "failed_to_remove_product_key": "ไม่สามารถลบ product key ได้", "failed_to_reset_pin_code": "ไม่สามารถรีเซ็ตรหัส PIN", - "failed_to_stack_assets": "Failed to stack assets", - "failed_to_unstack_assets": "Failed to un-stack assets", - "failed_to_update_notification_status": "อัพเดทสถานะการแจ้งเตือนไม่สำเร็จ", + "failed_to_stack_assets": "ไม่สามารถทำสื่อให้เป็น Stack ได้", + "failed_to_tag_assets": "การแท็กสื่อล้มเหลว", + "failed_to_unstack_assets": "ไม่สามารถแตกสื่อออกจาก Stack ได้", + "failed_to_update_notification_status": "อัปเดทสถานะการแจ้งเตือนไม่สำเร็จ", "incorrect_email_or_password": "อีเมลหรือรหัสผ่านไม่ถูกต้อง", + "library_folder_already_exists": "มีพาธที่ชี้ไปไลบรารี่นี้อยู่แล้ว", "page_not_found": "ไม่พบหน้า", "paths_validation_failed": "การตรวจสอบ {paths, plural, one {# path} other {# paths}} ล้มเหลว", "profile_picture_transparent_pixels": "รูปโปรไฟล์ไม่สามารถมีพิกเซลโปร่งใสได้ โปรดซูมเข้าและ/หรือย้ายรูปภาพ", @@ -965,6 +1019,7 @@ "unable_to_complete_oauth_login": "ไม่สามารถทำการเข้าสู่ระบบ OAuth ให้เสร็จสมบูรณ์ได้", "unable_to_connect": "ไม่สามารถเชื่อมต่อได้", "unable_to_copy_to_clipboard": "ไม่สามารถคัดลอกไปยังคลิปบอร์ดได้ ตรวจสอบให้แน่ใจว่าคุณเข้าถึงหน้าผ่านทาง https", + "unable_to_create": "ไม่สามารถสร้าง Workflow นี้ได้", "unable_to_create_admin_account": "ไม่สามารถสร้างบัญชีผู้ดูแลระบบได้", "unable_to_create_api_key": "ไม่สามารถสร้างคีย์ API", "unable_to_create_library": "ไม่สามารถสร้างคลังภาพได้", @@ -975,6 +1030,7 @@ "unable_to_delete_exclusion_pattern": "ไม่สามารถลบรูปแบบที่ยกเว้น", "unable_to_delete_shared_link": "ไม่สามารถลบลิงก์ที่แชร์ได้", "unable_to_delete_user": "ไม่สามารถลบผู้ใช้ได้", + "unable_to_delete_workflow": "ไม่สามารถลบ Workflow นี้ได้", "unable_to_download_files": "ไม่สามารถดาวน์โหลดไฟล์ได้", "unable_to_edit_exclusion_pattern": "ไม่สามารถแก้ไขรูปแบบยกเว้นได้", "unable_to_empty_trash": "ไม่สามารถลบถังขยะได้", @@ -1014,6 +1070,7 @@ "unable_to_scan_library": "ไม่สามารถสแกนคลังภาพได้", "unable_to_set_feature_photo": "ไม่สามารถตั้งรูปภาพเป็น Feature ได้", "unable_to_set_profile_picture": "ไม่สามารถตั้งภาพโปรไฟล์ได้", + "unable_to_set_rating": "ไม่สามารถให้คะแนนได้", "unable_to_submit_job": "ไม่สามารถส่งงานได้", "unable_to_trash_asset": "ไม่สามารถทิ้งสื่อได้", "unable_to_unlink_account": "ไม่สามารถยกเลิกการเชื่อมโยงบัญชีผู้ใช้ได้", @@ -1025,9 +1082,11 @@ "unable_to_update_settings": "ไม่สามารถอัปเดตการตั้งค่าได้", "unable_to_update_timeline_display_status": "ไม่สามารถแก้ไขสถานะการแสดงลำดับเวลาได้", "unable_to_update_user": "ไม่สามารถอัปเดตผู้ใช้ได้", + "unable_to_update_workflow": "ไม่สามารถแก้ไข Workflow นี้ได้", "unable_to_upload_file": "ไม่สามารถอัปโหลดได้" }, "errors_text": "ข้อผิดพลาด", + "exclusion_pattern": "รูปแบบการตัดออก", "exif": "Exif", "exif_bottom_sheet_description": "เพิ่มคำอธิบาย", "exif_bottom_sheet_description_error": "ข้อผิดพลาดขณะอัปเดตคำอธิบาย", @@ -1044,15 +1103,18 @@ "export_as_json": "ส่งออกเป็นไฟล์ JSON", "export_database": "ส่งออกฐานข้อมูล", "export_database_description": "ส่งออกฐานข้อมูล SQLite", + "exposure_time": "เวลาเปิดรับแสง", "extension": "ส่วนต่อขยาย", "external": "ภายนอก", "external_libraries": "คลังภาพภายนอก", "external_network": "การเชื่อมต่อภายนอก", "external_network_sheet_info": "เมื่อไม่ได้เชื่อมต่อเครือข่าย Wi-Fi ที่เลือกไว้ แอปจะเชื่อมต่อเซิร์ฟเวอร์ผ่าน URL ด้านล่างที่สามารถเข้าถึงได้ตามลำดับจากบนลงล่าง", + "f_number": "เลข F", "face_unassigned": "ไม่กำหนดมอบหมาย", "failed": "ล้มเหลว", "failed_count": "ไม่สำเร็จ: {count}", "failed_to_authenticate": "การยืนยันตัวตนไม่สำเร็จ", + "failed_to_delete_file": "ไม่สามารถลบไฟล์ได้", "failed_to_load_assets": "เกิดข้อผิดพลาดในการโหลดสื่อ", "failed_to_load_folder": "โหลดโฟลเดอร์ไม่สำเร็จ", "favorite": "รายการโปรด", @@ -1070,9 +1132,11 @@ "filter": "ตัวกรอง", "filter_people": "กรองผู้คน", "filter_places": "กรองสถานที่", + "filter_tags": "ตัวกรองแท็ก", "filters": "ตัวกรอง", "first": "แรกสุด", "fix_incorrect_match": "แก้ไขการจับคู่ที่ไม่ถูกต้อง", + "focal_length": "ระยะโฟกัส", "folder": "โฟลเดอร์", "folder_not_found": "ไม่พบโฟลเดอร์", "folders": "โฟล์เดอร์", @@ -1083,6 +1147,7 @@ "free_up_space_description": "เพิ่มพื้นที่ว่างโดยการย้ายรูปภาพและวิดีโอที่สำรองข้อมูลแล้วไปยังถังขยะของอุปกรณ์ของคุณ สำเนาที่อยู่บนเซิร์ฟเวอร์ยังคงอยู่อย่างปลอดภัย", "free_up_space_settings_subtitle": "เพิ่มพื้นที่จัดเก็บอุปกรณ์", "full_path": "พาธเต็ม: {path}", + "full_path_or_folder": "พาธเต็มหรือโฟลเดอร์", "gcast_enabled": "Google Cast", "gcast_enabled_description": "ฟีเจอร์นี้ต้องโหลดทรัพยากรจาก Google เพื่อทำงาน", "general": "ทั่วไป", @@ -1105,6 +1170,9 @@ "group_year": "จัดกลุ่มตามปี", "haptic_feedback_title": "การตอบสนองแบบสัมผัส", "has_quota": "เหลือพื้นที่", + "hash_asset": "สื่อ Hash", + "hashed_assets": "สือที่ Hash แล้ว", + "hashing": "การ Hash", "header_settings_add_header_tip": "เพิ่มส่วนหัว", "header_settings_field_validator_msg": "ค่าต้องไม่ว่างเปล่า", "header_settings_header_name_input": "ชื่อ Header", @@ -1117,6 +1185,7 @@ "hide_named_person": "ซ่อน {name}", "hide_password": "ซ่อนรหัสผ่าน", "hide_person": "ซ่อนบุคคล", + "hide_schema": "ซ่อน Schema", "hide_text_recognition": "ซ่อนการตรวจจับข้อความ", "hide_unnamed_people": "ซ่อนบุคคลที่ไม่ได้ระบุชื่อ", "home_page_building_timeline": "กำลังสร้าง timeline", @@ -1150,6 +1219,7 @@ "individual_share": "แชร์ส่วนตัว", "individual_shares": "การแชร์เดี่ยว", "info": "ข้อมูล", + "integrity_checks": "การตรวจสอบความสมบูรณ์", "interval": { "day_at_onepm": "ทุกวันเวลาบ่ายโมง", "hours": "ทุก ๆ {hours, plural, one {hour} other {{hours, number} hours}}", @@ -1160,6 +1230,7 @@ "invalid_date_format": "รูปแบบวันที่ไม่ถูกต้อง", "invite_people": "เชิญผู้คน", "invite_to_album": "เชิญเข้าอัลบั้ม", + "iso": "ISO", "items_count": "{count, plural, one {# รายการ} other {# รายการ}}", "jobs": "งาน", "keep": "เก็บ", @@ -1188,6 +1259,7 @@ "leave": "ทิ้ง", "leave_album": "ออกจากอัลบั้ม", "lens_model": "รุ่นเลนส์", + "less": "น้อยลง", "let_others_respond": "ให้คนอื่นตอบ", "level": "ระดับ", "library": "คลังภาพ", @@ -1209,10 +1281,11 @@ "linked_oauth_account": "ลิงก์บัญชีผู้ใช้ OAuth", "list": "รายการ", "live": "Live", + "load_more": "โหลดเพิ่ม", "loading": "กำลังโหลด", "loading_search_results_failed": "โหลดผลการค้นหาล้มเหลว", "local": "ในเครื่อง", - "local_asset_cast_failed": "ไม่สามารถแคสสื่อที่ไม่ถูกอัพโหลดไปยังเซิร์ฟเวอร์", + "local_asset_cast_failed": "ไม่สามารถแคสสื่อที่ไม่ได้อัปโหลดไปยังเซิร์ฟเวอร์", "local_assets": "สื่อในเครื่อง", "local_id": "ID ในเครื่อง", "local_media_summary": "สรุปสื่อในเครื่อง", @@ -1228,6 +1301,7 @@ "location_picker_longitude_hint": "เพิ่มลองจิจูตตรงนี้", "lock": "ล็อค", "locked_folder": "โฟลเดอร์ล็อค", + "log_detail_title": "รายละเอียดล็อก", "log_out": "ออกจากระบบ", "log_out_all_devices": "ออกจากระบบทุกอุปกรณ์", "logged_in_as": "{user} กำลังล็อคอิน", @@ -1249,12 +1323,13 @@ "login_form_handshake_exception": "เกิดข้อผิดพลาดกระบวนการ Handshake กับเซิร์ฟเวอร์ ถ้ากำลังใช้ใบรับบรองแบบ self-signed กรุณาตั้งค่าอนุญาตใบรับรองแบบ self-signed", "login_form_password_hint": "รหัสผ่าน", "login_form_server_empty": "กรอก URL เซิร์ฟเวอร์", - "login_form_server_error": "ไม่สามารถติดต่อกับเซิร์ฟเวอร์", - "login_has_been_disabled": "ปิดการใช้งานการเข้าสู่ระบบแล้ว", + "login_form_server_error": "ไม่สามารถเชื่อมต่อเซิร์ฟเวอร์", + "login_has_been_disabled": "ปิดใช้งานการเข้าสู่ระบบแล้ว", "login_password_changed_error": "เกิดข้อผิดพลาดขณะเปลี่ยนรหัสผ่าน", "login_password_changed_success": "เปลี่ยนรหัสผ่านสำเร็จ", "logout_all_device_confirmation": "คุณต้องการออกจากระบบทุกอุปกรณ์ ใช่หรือไม่ ?", "logout_this_device_confirmation": "คุณต้องการออกจากระบบบนอุปกรณ์นี้หรือไม่?", + "logs": "ล็อก", "longitude": "ลองจิจูด", "look": "ดู", "loop_videos": "วนวิดีโอ", @@ -1277,6 +1352,7 @@ "maintenance_restore_library_hint_missing_files": "ไฟล์สำคัญของคุณอาจขาดหายไป", "maintenance_restore_library_hint_regenerate_later": "คุณสามารถสร้างใหม่ได้ในการตั้งค่า", "maintenance_restore_library_hint_storage_template_missing_files": "หากคุณใช้เทมเพลตที่เก็บข้อมูล ไฟล์ของคุณอาจจะขาดหายไป", + "maintenance_restore_library_loading": "กำลังโหลดระบบตรวจสอบและฮิวริสติก…", "maintenance_task_backup": "กำลังสร้างไฟล์สำรองของฐานข้อมูลเดิม…", "maintenance_task_migrations": "กำลังดำเนินการย้ายฐานข้อมูล…", "maintenance_task_restore": "กำลังกู้คืนการสำรองข้อมูลที่เลือก…", @@ -1299,6 +1375,7 @@ "map_location_picker_page_use_location": "ใช้ตำแหน่งนี้", "map_location_service_disabled_content": "ต้องเปิดตำแหน่งเพื่อแสดงทรัพยากรจากตำแหน่งปัจจุบัน เปิดตอนนี้?", "map_location_service_disabled_title": "บริการตำแหน่งถูกปิด", + "map_marker_for_image": "เครื่องหมายแผนที่ของภาพที่ถ่ายในเมือง{city}, {country}", "map_marker_with_image": "หมุดแผนที่กับรูปถ่าย", "map_no_location_permission_content": "จำเป็นต้องมีสิทธิ์เข้าถึงตำแหน่งเพื่อแสดงทรัพยากรจากตำแหน่งปัจจุบัน อนุญาตตอนนี้?", "map_no_location_permission_title": "สิทธิ์เข้าถึงตำแหน่งถูกปฏิเสธ", @@ -1327,10 +1404,15 @@ "enter_fullscreen_mode": "เข้าสู่โหมดเต็มหน้าจอ", "exit_fullscreen_mode": "ออกจากโหมดเต็มหน้าจอ", "loop": "วนซ้ำ", + "media_error_description": "เกิดปัญหาที่ทำให้เล่นสื่อนี้ต่อไม่ได้ อาจจะเป็นเพราะสื่อนี้เสีย หรือเบราว์เซอร์ของคุณไม่สามารถเล่นสื่อชนิดนี้ได้เอง", "media_loading": "กำลังโหลดสื่อ", "mute": "ปิดเสียง", "network_error": "ข้อผิดพลาดเครือข่าย", + "network_error_description": "เกิดปัญหาเครือข่ายทำให้ไม่สามารถดาวน์โหลดต่อได้", "not_supported_error": "ไม่รองรับต้นทาง", + "playback_rate": "ความเร็วการเล่น", + "playback_rate_current": "ความเร็วการเล่นตอนนี้", + "playback_rate_value": "ความเร็ว {playbackRate}", "playback_time": "เวลาเล่น", "quality": "คุณภาพ", "second": "วินาที", @@ -1359,6 +1441,8 @@ "merge_people_prompt": "คุณต้องการรวมบุคคลเหล่านี้หรือไม่ การกระทำนี้ไม่สามารถย้อนกลับได้", "merge_people_successfully": "รวมผู้คนเรียบร้อยแล้ว", "merged_people_count": "รวม {count, plural, one {# คน} other {# คน}}เข้าด้วยกันแล้ว", + "minFaces": "จำนวนใบหน้าขั้นต่ำ", + "minFaces_description": "จำนวนใบหน้าที่จะต้องเห็นก่อนที่บุคคลจะถูกแสดง", "minimize": "ย่อลง", "minute": "นาที", "minutes": "นาที", @@ -1396,6 +1480,7 @@ "never": "ไม่เคย", "new_album": "อัลบั้มใหม่", "new_api_key": "สร้างคีย์ API ใหม่", + "new_feature": "คุณสมบัติใหม่", "new_password": "รหัสผ่านใหม่", "new_person": "คนใหม่", "new_pin_code": "รหัส PIN ใหม่", @@ -1415,26 +1500,37 @@ "no_assets_message": "คลิกเพื่ออัปโหลดภาพแรกของคุณ", "no_assets_to_show": "ไม่มีทรัพยากรให้แสดง", "no_cast_devices_found": "ไม่พบอุปกรณ์แคสต์", + "no_checksum_local": "ไม่มี Checksum ‐ ไม่สามารถดึงสื่อบนเครื่องได้", + "no_checksum_remote": "ไม่มี Checksum - ไม่สามารถดึงสื่อจากเซิร์ฟเวอร์ได้", "no_devices": "ไม่มีอุปกรณ์ที่ได้รับอนุญาต", "no_duplicates_found": "ไม่พบรายการที่ซ้ำกัน", "no_exif_info_available": "ไม่มีข้อมูล exif", "no_explore_results_message": "อัปโหลดรูปภาพเพิ่มเพื่อสำรวจคอลเลกชันของคุณ", "no_favorites_message": "เพิ่มรายการโปรดเพื่อค้นหาภาพและวิดีโอที่ดีที่สุดของคุณอย่างรวดเร็ว", "no_libraries_message": "สร้างคลังภาพภายนอกเพื่อดูภาพถ่ายและวิดีโอต่าง ๆ ของคุณ", + "no_local_assets_found": "ไม่พบสื่อในเครื่องที่มี Checksum นี้", "no_locked_photos_message": "รูปภาพและวิดีโอในโฟลเดอร์ล็อกจะถูกซ่อนไว้ และไม่แสดงระหว่างดูหรือค้นหาคลังภาพของคุณ", "no_name": "ไม่มีชื่อ", "no_notifications": "ไม่มีการแจ้งเตือน", "no_people_found": "ไม่พบบุคคลที่ตรงกัน", "no_places": "ไม่มีสถานที่", + "no_remote_assets_found": "ไม่พบสื่อบนเซิร์ฟเวอร์ที่มี Checksum นี้", "no_results": "ไม่มีผลลัพธ์", "no_results_description": "ลองใช้คำพ้องหรือคำหลักที่กว้างกว่านี้", "no_shared_albums_message": "สร้างอัลบั้มเพื่อแชร์รูปภาพและวิดีโอกับคนในเครือข่ายของคุณ", + "no_steps": "ยังไม่ได้เพิ่มขั้นตอน", "none": "ไม่มี", "not_allowed": "ไม่อนุญาต", + "not_available": "ไม่มี", "not_in_any_album": "ไม่อยู่ในอัลบั้มใด ๆ", "not_selected": "ไม่ได้เลือก", + "not_set": "ไม่ได้ตั้ง", "notes": "หมายเหตุ", "nothing_here_yet": "ตรงนี้ยังไม่มีอะไร", + "notification_backup_reliability": "เปิดการแจ้งเตือนเพื่อให้การสำรองข้อมูลในพื้นหลังราบรื่นขึ้น", + "notification_enabled_list_tile_content": "Immich ใช้การแจ้งเตือนเพื่อจัดการการสำรองข้อมูลในพื่นหลัง จัดการการแจ้งเตือนได้ในการตั้งค่าของเครื่อง", + "notification_enabled_list_tile_open_button": "เปิดการตั้งค่า", + "notification_enabled_list_tile_title": "เปิดการแจ้งเตือนแล้ว", "notification_permission_dialog_content": "เพื่อเปิดการแจ้งเตือน เข้าไปที่การตั้งค่าแล้วกด อนุญาต", "notification_permission_list_tile_content": "ให้สิทธิ์เพื่อเปิดการแจ้งเตือน", "notification_permission_list_tile_enable_button": "เปิดการแจ้งเดือน", @@ -1446,8 +1542,11 @@ "obtainium_configurator": "ตัวกำหนดค่า Obtainium", "obtainium_configurator_instructions": "ใช้ Obtainium เพื่อติดตั้งและอัปเดตแอป Android โดยตรงจาก Github ของ Immich สร้างคีย์ API และเลือกรูปแบบเพื่อสร้างลิงก์กำหนดค่า Obtainium ของคุณ", "ocr": "OCR", + "ocr_body": "Immich สามารถอ่านตัวอักษรในภาพได้แล้ว คุณสามารถค้นหาภาพได้ตามคำที่ปรากฎในภาพ", + "ocr_title": "ค้นหาข้อความที่อยู่ในรูปภาพ", "official_immich_resources": "แหล่งข้อมูล Immich อย่างเป็นทางการ", "offline": "ออฟไลน์", + "offset": "ระยะห่าง", "ok": "ตกลง", "oldest_first": "เรียงเก่าสุดก่อน", "on_this_device": "บนอุปกรณ์นี้", @@ -1463,6 +1562,8 @@ "open": "เปิด", "open_calendar": "เปิดปฏิทิน", "open_in_browser": "เปิดในเบราว์เซอร์", + "open_in_immich_body": "ตั้ง Immich เป็นแอพรูปภาพใน Android เพื่อเปิดรูปจากแอพอื่นใน Immich", + "open_in_immich_title": "เปิดรูปภาพใน Immich", "open_in_map_view": "เปิดดูในแผนที่", "open_in_openstreetmap": "เปิดใน OpenStreetMap", "open_the_search_filters": "เปิดตัวกรองการค้นหา", @@ -1471,6 +1572,7 @@ "organize_into_albums": "จัดระเบียบใส่อัลบั้ม", "organize_into_albums_description": "นำรูปภาพที่มีอยู่แล้วเข้าไปยังอัลบั้มโดยใช้การตั้งค่าการซิงก์ปัจจุบัน", "organize_your_library": "จัดเรียงคลังภาพของคุณ", + "orientation": "แนว", "original": "ต้นฉบับ", "other": "อื่น ๆ", "other_devices": "เครื่องอื่น", @@ -1511,7 +1613,7 @@ "permanent_deletion_warning_setting_description": "เตือนเมื่อจะลบสื่อถาวร", "permanently_delete": "ลบถาวร", "permanently_delete_assets_count": "ลบ {count, plural, one {asset} other {assets}} ทิ้งถาวร", - "permanently_delete_assets_prompt": "คุณแน่ใจหรือไม่ว่าต้องการลบ {count, plural, one {this asset?} other {these # asset?}}อย่างถาวร การดำเนินการนี้จะลบ {count, plural, one {it from its} other {them from their}} อัลบั้มด้วย", + "permanently_delete_assets_prompt": "คุณต้องการที่จะลบ{count, plural, one {สื่อนี้} other { # สื่อเหล่านี้}}อย่างถาวรหรือไม่ การดำเนินการนี้จะลบ{count, plural, one {สื่อนี้} other {สื่อเหล่านี้}}ออกจากอัลบั้มด้วย", "permanently_deleted_asset": "ลบสื่อถาวรแล้ว", "permanently_deleted_assets_count": "ลบ {count, plural, one {# asset} other {# assets}} เรียบร้อยแล้ว", "permission": "สิทธิ์", @@ -1519,9 +1621,10 @@ "person": "บุคคล", "person_age_months": "อายุ {months, plural, one {# เดือน} other {# เดือน}}", "person_age_year_months": "อายุ 1 ปี {months, plural, one {# เดือน} other {# เดือน}}", - "person_age_years": "อายุ {years, plural, other {# ปี}}", + "person_age_years": "อายุ {years, plural, one {# ปี} other {# ปี}}", "person_birthdate": "เกิดเมื่อ {date}", "person_hidden": "{name}{hidden, select, true { (ซ่อนอยู่)} other {}}", + "person_recognized": "เห็นบุคคลแล้ว", "photo_shared_all_users": "ดูเหมือนว่าคุณได้แชร์รูปภาพของคุณกับผู้ใช้ทั้งหมด หรือคุณไม่มีผู้ใช้ใดที่จะแชร์ด้วย", "photos": "รูปภาพ", "photos_and_videos": "รูปภาพ และ วิดีโอ", @@ -1544,6 +1647,8 @@ "play_original_video_setting_description": "เน้นเล่นวิดีโอต้นฉบับแทนวิดีโอที่แปลงไฟล์แล้ว หากสื่อต้นฉบับไม่รองรับอาจไม่สามารถเล่นได้อย่างถูกต้อง", "play_transcoded_video": "เล่นวิดีโอที่แปลงแล้ว", "please_auth_to_access": "โปรดยืนยันตัวตนเพื่อเข้าถึง", + "plugin_method_filter_type": "ตัวกรอง", + "plugin_method_filter_type_description": "วิธีนี้สามารถกรองตามอีเวนท์และตั้งให้กันขั้นตอนถัดๆไปไม่ให้ทำต่อได้", "port": "พอร์ต", "preferences_settings_subtitle": "จัดการการกำหนดค่าของแอป", "preferences_settings_title": "การตั้งค่า", @@ -1561,8 +1666,10 @@ "profile": "โปรไฟล์", "profile_drawer_app_logs": "การบันทึก", "profile_drawer_github": "GitHub", + "profile_drawer_readonly_mode": "อยู่ในโหมดอ่านอย่างเดียวอยู่ กดภาพผู้ใช้ค้างเพื่อออก", "profile_image_of_user": "รูปภาพโปรไฟล์ของ {user}", "profile_picture_set": "ตั้งภาพโปรไฟล์แล้ว", + "projection_type": "วิธีการฉายภาพ", "public_album": "อัลบั้มสาธารณะ", "public_share": "แชร์แบบสาธารณะ", "purchase_account_info": "ผู้สนับสนุน", @@ -1596,6 +1703,7 @@ "purchase_server_description_2": "สถานะผู้สนับสนุน", "purchase_server_title": "เซิร์ฟเวอร์", "purchase_settings_server_activated": "รหัสผลิตภัณฑ์เซิร์ฟเวอร์ได้รับการจัดการโดยผู้ดูแลระบบ", + "query_asset_id": "ค้นหา ID ของสื่อ", "queue_status": "จำนวนคิว {count}/{total}", "rate_asset": "ให้คะแนนสื่อ", "rating": "การให้คะแนน", @@ -1614,7 +1722,10 @@ "recent": "ล่าสุด", "recent_searches": "การค้นหาล่าสุด", "recently_added": "เพิ่มล่าสุด", + "recently_added_body": "ไปหน้าที่มีทุกอย่างที่คุณเพื่งเพิ่มมา", + "recently_added_description": "ดูสื่อทั้งหมดใน Immich เรียงจากเวลาที่สื่อนั้น ๆ ถูกอัปโหลดมา", "recently_added_page_title": "เพิ่มล่าสุด", + "recently_added_title": "เพิ่มล่าสุด", "recently_taken": "ถ่ายล่าสุด", "refresh": "รีเฟรช", "refresh_encoded_videos": "โหลดการ encoded วิดีโอใหม่", @@ -1626,16 +1737,25 @@ "refreshing_faces": "กำลังรีเฟรชใบหน้า", "refreshing_metadata": "กำลังรีเฟรชข้อมูลเมตาดาต้า", "regenerating_thumbnails": "กำลังสร้างรูป thumbnails ใหม่", + "remote": "ข้างนอก", + "remote_assets": "สื่อบนเซิร์ฟเวอร์", + "remote_media_summary": "ภาพรวมสื่อบนเซรฟ์เวอร์", "remove": "ลบ", "remove_assets_album_confirmation": "คุณแน่ใจที่จะลบ {count, plural, one {# สื่อ} other {# สื่อ}} ออกจากอัลบั้ม ?", "remove_assets_shared_link_confirmation": "คุณแน่ใจที่จะลบสื่อ {count, plural, one {# รายการ} other {# รายการ}} ออกจากลิงก์ที่แชร์นี้หรือไม่?", "remove_assets_title": "ลบสื่อใช่ไหม ?", "remove_custom_date_range": "ลบการปรับช่วงเวลา", + "remove_filter": "ลบตัวกรอง", "remove_from_album": "ลบออกจากอัลบั้ม", + "remove_from_album_action_prompt": "ลบ {count} ภาพจากอัลบั้มแล้ว", "remove_from_favorites": "เอาออกจากรายการโปรด", + "remove_from_lock_folder_action_prompt": "ลบ {count} จากโฟลเดอร์ล็อกแล้ว", + "remove_from_locked_folder": "ลบจากโฟลเดอร์ล็อก", + "remove_from_locked_folder_confirmation": "ต้องการที่จะนำภาพและวิดิโอออกจากโฟลเดอร์ล็อกหรือไม่ สื่อจะไปปรากฏในไลบรารี่", "remove_from_shared_link": "ลบออกจากลิงก์ที่แชร์", "remove_memory": "ลบความทรงจำ", "remove_photo_from_memory": "ลบรูปออกจากความทรงจำนี้", + "remove_tag": "ลบแท็ก", "remove_user": "ลบผู้ใช้", "removed_api_key": "ลบคีย์ API แล้ว: {name}", "removed_from_archive": "ลบจากเก็บถาวรแล้ว", @@ -1644,6 +1764,7 @@ "removed_memory": "ความทรงจำที่ถูกลบ", "removed_tagged_assets": "ลบแท็กจาก {count, plural, one {# สื่อ} other {# สื่อ}}", "rename": "เปลี่ยนชื่อ", + "repository": "คลังเก็บข้อมูล", "require_password": "ต้องการรหัสผ่าน", "rescan": "สแกนใหม่", "reset": "รีเซ็ต", @@ -1681,12 +1802,14 @@ "saved_settings": "บันทึกการตั้งค่าสำเร็จ", "say_something": "พูดอะไรสักอย่าง", "scaffold_body_error_occurred": "เกิดข้อผิดพลาด", - "scaffold_body_error_unrecoverable": "เกิดข้อผิดพลาดที่ไม่สามารถกู้คืนได้ โปรดแชร์ข้อผิดพลาดและ stack trace ไปยัง Discord หรือ GitHub เพื่อให้เราช่วยเหลือ หากได้รับคำแนะนำ คุณสามารถล้างข้อมูลแอปได้ด้านล่าง", + "scaffold_body_error_unrecoverable": "เกิดข้อผิดพลาดที่ไม่สามารถกู้คืนได้ โปรดแชร์ข้อผิดพลาดและ Stack trace ไปยัง Discord หรือ GitHub เพื่อให้เราช่วยเหลือ หากได้รับคำแนะนำ คุณสามารถล้างข้อมูลแอปได้ด้านล่าง", "scan": "สแกน", "scan_all_libraries": "สแกนคลังภาพทั้งหมด", "scan_library": "สแกน", "scanning": "กำลังสแกน", "scanning_for_album": "กำลังสแกนอัลบั้ม...", + "screencast_mode_description": "ให้แสดงการใช้คีย์บอร์ดกับเมาส์ขึ้นบนจอ", + "screencast_mode_title": "เปิด/ปิดโหมดการแชร์หน้าจอ", "search": "ค้นหา", "search_albums": "ค้นหาอัลบั้ม", "search_by_context": "ค้นหาตามบริบท", @@ -1694,6 +1817,8 @@ "search_by_description_example": "วันปีนเขาในซาปา", "search_by_filename": "ค้นหาตามชื่อไฟล์หรือนามสกุลไฟล์", "search_by_filename_example": "ตัวอย่าง. IMG_1234.JPG หรือ PNG", + "search_by_full_path": "ค้นหาจากพาธเต็มหรือโฟลเดอร์", + "search_by_full_path_example": "/สมชาย/งาน/ปริ้น3มิติ/2569-07-01 ‐ ค้นหาคำว่า “งาน” “3มิติ” “ปริ้น” “2569” และอื่นๆ ได้", "search_by_ocr": "ค้นหาด้วย OCR", "search_by_ocr_example": "ลาเต้", "search_camera_lens_model": "ค้นหารุ่นเลนส์...", @@ -1715,6 +1840,7 @@ "search_filter_media_type_title": "เลือกประเภทสื่อ", "search_filter_people_title": "เลือกผู้คน", "search_filter_star_rating": "คะแนนดาว", + "search_filter_tags_title": "เลือกแท็ก", "search_for": "การค้นหาสำหรับ", "search_for_existing_person": "ค้นหาบุคคลที่มีอยู่", "search_no_more_result": "ไม่มีผลลัพธ์เพิ่มเติม", @@ -1754,9 +1880,11 @@ "select_person": "เลือกบุคคล", "select_person_to_tag": "เลือกบุคคล", "select_photos": "เลือกรูปภาพ", + "select_quality": "เลือกคุณภาพ", "select_trash_all": "เลือกในถังขยะทั้งหมด", "selected": "เลือก", "selected_count": "{count, plural, other {# เลือกแล้ว}}", + "selected_gps_coordinates": "ตำแหน่ง GPS ที่เลือก", "send_message": "ส่งข้อความ", "send_welcome_email": "ส่งอีเมลต้อนรับ", "server_endpoint": "ปลายทางเซิร์ฟเวอร์", @@ -1778,6 +1906,7 @@ "set_profile_picture": "ตั้งรูปโปรไฟล์", "set_slideshow_to_fullscreen": "ตั้งค่าการนำเสนอเต็มจอ", "set_stack_primary_asset": "ตั้งเป็นสื่อหลัก", + "setting_image_navigation_enable_subtitle": "ถ้าเปิด คุณสามารถไปยังภาพก่อนหน้าหรือภาพถัดไปได้ด้วยการแตะฝั่งซ้ายสุด/ขวาสุดของจอ", "setting_image_navigation_enable_title": "แตะเพื่อนำทาง", "setting_image_navigation_title": "การนำทางรูปภาพ", "setting_image_viewer_help": "ตัวดูรายละเอียดโหลดรูปย่อก่อน แล้วจะโหลดพรีวิวขนาดกลาง (ถ้าเปิด) แล้วค่อยโหลดรูปต้นฉบับ (ถ้าเปิด)", @@ -1793,6 +1922,7 @@ "setting_video_viewer_auto_play_subtitle": "เริ่มเล่นวิดีโออัตโนมัติหลังเปิดแล้ว", "setting_video_viewer_auto_play_title": "เล่นวิดีโออัตโนมัติ", "setting_video_viewer_looping_title": "วนลูป", + "setting_video_viewer_original_video_subtitle": "เมื่อสตรีมวิดิโอจากเซรฟเวอร์ ให้เล่นวิดิโอต้นฉบับถึงแม้จะสามารถแปลงวิดิโอได้แต่อาจทำให้เกิดการกระตุก วิดิโอที่มีอยู่บนเครื่องจะเล่นจากต้นฉบับตลอดโดยไม่เปลี่ยนตามการตั้งค่านี้", "setting_video_viewer_original_video_title": "บังคับวิดีโอต้นฉบับ", "settings": "ตั้งค่า", "settings_saved": "บันทึกการตั้งค่าแล้ว", @@ -1800,6 +1930,10 @@ "share": "แชร์", "share_dialog_preparing": "กำลังเตรียม...", "share_link": "แชร์ลิงก์", + "share_original": "ใช้ต้นฉบับ (ใหญ่)", + "share_preview": "ใช้ภาพขนาดย่อ (เล็ก)", + "share_quality_body": "กดที่ปุ่มแชร์ค้างไว้เพื่อเลือกคุณภาพของภาพก่อนที่จะแชร์", + "share_quality_title": "เลือกคุณภาพการแชร์", "shared": "แชร์", "shared_album_activities_input_disable": "คอมเมนต์ถูกปิด", "shared_album_activity_remove_content": "ุคุณต้องการลบกิจกรรมนี้หรือไม่?", @@ -1814,7 +1948,9 @@ "shared_link_app_bar_title": "ลิงก์ที่แชร์", "shared_link_clipboard_copied_massage": "คัดลอกไปยังคลิปบอร์ดแล้ว", "shared_link_create_error": "เกิดข้อผิดพลาดขณะสร้างลิงก์แชร์", - "shared_link_custom_url_description": "เข้าถึงลิงก์ที่แชร์นี้ด้วย URL ที่กำหนดเอง", + "shared_link_custom_url_description": "เข้าถึงลิงก์ที่แชร์นี้ด้วย URL และชื่อที่กำหนดเอง", + "shared_link_custom_url_title": "URL ชื่อกำหนดเอง", + "shared_link_custom_url_warning": "เตือน: ชื่อ URL กำหนดเองที่มีเครื่องหมาย “/” อาจไม่ทำงานในแบบที่คุณคาดคิด", "shared_link_edit_description_hint": "เพิ่มรายละเอียดการแชร์", "shared_link_edit_expire_after_option_day": "1 วัน", "shared_link_edit_expire_after_option_days": "{count} วัน", @@ -1861,12 +1997,15 @@ "show_keyboard_shortcuts": "แสดงปุ่มลัดแป้นพิมพ์", "show_less": "แสดงน้อยลง", "show_metadata": "แสดง metadata", + "show_more_fields": "{count, plural, one {แสดงช่องข้อมูลเพิ่ม # ช่อง} other {แสดงช่องข้อมูลเพิ่ม # ช่อง}}", "show_or_hide_info": "แสดงหรือซ่อนข้อมูล", "show_password": "แสดงรหัสผ่าน", "show_person_options": "แสดงตัวเลือกของตัวบุคคล", "show_progress_bar": "แสดงความคืบหน้า แถบ", + "show_schema": "แสดง Schema", "show_search_options": "แสดงตัวเลือกการค้นหา", "show_shared_links": "แสดงลิงก์ที่แชร์", + "show_slideshow_metadata_overlay": "แสดงข้อมูลภาพในหน้าต่างลอย", "show_slideshow_transition": "แสดงสไลค์โชว์", "show_supporter_badge": "เครื่องหมายผู้สนับสนุน", "show_supporter_badge_description": "แสดงเครื่องหมายผู้สนับสนุน", @@ -1878,13 +2017,21 @@ "sign_out": "ออกจากระบบ", "sign_up": "ลงทะเบียน", "size": "ขนาด", + "skip": "ข้าม", "skip_to_content": "ข้ามไปยังเนื้อหา", "skip_to_folders": "ข้ามโฟล์เดอร์", "skip_to_tags": "ข้ามแท็ก", "slideshow": "สไลด์", + "slideshow_body": "นั่งพักผ่อนแล้วชมภาพถ่ายของคุณเล่นในรูปแบบสไลด์โชว์เต็มหน้าจอ", + "slideshow_metadata_overlay_mode": "เนื้อหาในหน้าต่างลอย", "slideshow_metadata_overlay_mode_description_only": "เฉพาะคำอธิบาย", "slideshow_metadata_overlay_mode_full": "เต็ม", + "slideshow_repeat": "เล่นสไลด์โชว์ซำ้", + "slideshow_repeat_description": "กลับไปเริ่มต้นใหม่หลังแสดงสไลด์โชว์จบ", "slideshow_settings": "ตั้งค่าสไลด์", + "slideshow_title": "สไลด์โชว์", + "smart_album": "สมาร์ตอัลบั้ม", + "some_assets_already_have_a_location_warning": "สื่อที่เลือกอยู่บางอันมีตำแหน่งแล้ว", "sort_albums_by": "จัดเรียงอัลบั้มโดย...", "sort_created": "จัดเรียงตามวันที่สร้าง", "sort_items": "จัดเรียงรายการ", @@ -1894,16 +2041,19 @@ "sort_recent": "จัดเรียงใหม่ล่าสุด", "sort_title": "ไตเติ้ล", "source": "แหล่ง", - "stack": "ซ้อน", - "stack_action_prompt": "ซ้อนทับ {count} รายการแล้ว", - "stack_duplicates": "นำสิ่งที่ซ้ำมาซ้อนอยู่ด้วยกัน", - "stack_selected_photos": "ซ้อนรูปที่ถูกเลือก", - "stacked_assets_count": "ซ้อนทับสื่อ {count, plural, one {# รายการ} other {# รายการ}}แล้ว", + "stack": "Stack", + "stack_action_prompt": "นำ {count} รายการเข้า Stack แล้ว", + "stack_duplicates": "นำสิ่งที่ซ้ำมาอยู่ใน Stack ด้วยกัน", + "stack_selected_photos": "นำรูปที่เลือกทำเป็น Stack", + "stacked_assets_count": "นำสื่อ{count, plural, one {# รายการ} other {# รายการ}}เข้า Stack แล้ว", + "stacktrace": "Stacktrace", "start": "เริ่มต้น", "start_date": "วันที่เริ่ม", "start_date_before_end_date": "วันที่เริ่มต้นต้องมาก่อนวันที่สิ้นสุด", "state": "รัฐ", "status": "สถานะ", + "step_delete": "ลบขั้นตอน", + "step_delete_confirm": "ต้องการลบขั้นตอนนี้หรือไม่", "step_details": "รายละเอียดขั้นตอน", "steps": "ขั้นตอน", "stop_casting": "หยุดแคสต์", @@ -1926,27 +2076,33 @@ "swap_merge_direction": "สลับด้านรวม", "sync": "ซิงค์", "sync_albums": "ซิงก์อัลบั้ม", + "sync_local": "ซิ้งค์กับบนเครื่อง", + "sync_remote": "ซิงก์สื่อไปบนเซิร์ฟเวอร์", "sync_status": "สถานะซิงก์", "sync_status_subtitle": "ดูและจัดการระบบซิงก์", "sync_upload_album_setting_subtitle": "สร้างและอัปโหลดรูปภาพและวิดีโอของคุณไปยังอัลบั้มที่เลือกบน Immich", "system_theme": "ธีมสีของระบบ", "system_theme_command_description": "ใช้ธีมสีของระบบ ({value})", "tag": "แท็ก", + "tag_assets": "ติดแท็กให้สื่อ", "tag_created": "สร้างแท็ก: {tag}", "tag_face": "แท็กใบหน้า", "tag_feature_description": "ดูรูปถ่ายและวีดีโอที่สร้างกลุ่มตามหัวข้อแท็ก", "tag_people": "แท็กผู้คน", - "tag_updated": "แท็กที่ถูกอัพเดต: {tag}", - "tagged_assets": "ที่ถูกแท็ก", + "tag_updated": "แท็กที่ถูกอัปเดต: {tag}", + "tagged_assets": "{count, plural, one {สื่อ} other {สื่อ 5 สื่อ}}ถูกติดแท็กแล้ว", "tags": "แท็ก", "tap_to_run_job": "แตะเพื่อรันงาน", "template": "เท็มเพลต", + "text_recognition": "การตรวจหาตัวอักษร", "theme": "ธีม", "theme_selection": "การเลือกธีม", "theme_selection_description": "ตั้งค่าธีมให้สว่างหรือมืดโดยอัตโนมัติ อิงจากค่าของเบราว์เซอร์ของคุณ", "theme_setting_asset_list_storage_indicator_title": "แสดงตัวพื้นที่จัดเก็บบนตารางทรัพยากร", "theme_setting_asset_list_tiles_per_row_title": "จำนวนทรัพยากรต่อแถว ({count})", + "theme_setting_colorful_interface_subtitle": "ใส่สีหลักให้พื้นหลัง", "theme_setting_colorful_interface_title": "อินเตอร์เฟซมีสีสัน", + "theme_setting_primary_color_subtitle": "เลือกสีเพื่อใช้เน้นการกระทำต่างๆ", "theme_setting_primary_color_title": "สีหลัก", "theme_setting_system_primary_color_title": "ใช้สีของระบบ", "theme_setting_system_theme_switch": "อัตโนมัติ (การตั้งค่าระบบ)", @@ -1979,7 +2135,13 @@ "trash_page_delete_all": "ลบทั้งหมด", "trash_page_info": "ทรัพยากรที่ทิ้งจะถูกลบถาวรหลัง {days} วัน", "trashed_items_will_be_permanently_deleted_after": "รายการที่อยู่ในถังขยะจะถูกลบอย่างถาวรหลังผ่านไป {days, plural, one {# วัน} other {# วัน}}", + "trigger": "ทริกเกอร์", + "trigger_asset_metadata_extraction": "การดึงข้อมูลเมตาจากสื่อ", + "trigger_asset_metadata_extraction_description": "ทริกเกอร์ตอนที่ข้อมูลเมตา EXIF ถูกดึงออกมาจากสื่อแล้ว", "trigger_asset_uploaded": "อัปโหลดสื่อ", + "trigger_asset_uploaded_description": "ทริกเกอร์ตอนที่สื่อถูกอัปโหลด", + "trigger_person_recognized": "รู้จักบุคคลแล้ว", + "trigger_person_recognized_description": "ทริกเกอร์ตอนที่เห็นเป็นบุคคล", "troubleshoot": "การแก้ปัญหา", "type": "ประเภท", "unable_to_change_pin_code": "ไม่สามารถเปลี่ยนรหัสประจำตัว (PIN)", @@ -1987,6 +2149,7 @@ "unable_to_setup_pin_code": "ไม่สามารถตั้งรหัสประจำตัว (PIN)", "unarchive": "นำออกจากที่เก็บถาวร", "unarchive_action_prompt": "{count} ถูกนำออกจากที่เก็บถาวร", + "unarchived_count": "{count, plural, other {เก็บถาวรแล้ว #}}", "undo": "เลิกทำ", "unfavorite": "นำออกจากรายการโปรด", "unfavorite_action_prompt": "{count} ถูกนำออกจากรายการโปรด", @@ -1994,8 +2157,10 @@ "unknown": "ไม่ทราบ", "unknown_country": "ไม่ทราบประเทศ", "unknown_date": "ไม่ทราบวัน", + "unknown_schema": "Schema ที่ไม่รู้จัก", "unknown_year": "ไม่ทราบปี", "unlimited": "ไม่จำกัด", + "unlink_motion_video": "ลบการเชื่อมต่อ Motion video", "unlink_oauth": "ยกเลิกเชื่อมต่อ OAuth", "unlinked_oauth_account": "ยกเลิกการเชื่อมต่อ OAuth", "unmute_memories": "เลิกปิดเสียงความทรงจำ", @@ -2005,15 +2170,19 @@ "unsaved_change": "ยังไม่ได้บันทึก", "unselect_all": "ยกเลิกการเลือกทั้งหมด", "unselect_all_duplicates": "ยกเลิกเลือกรายการซ้ำทั้งหมด", - "unstack": "หยุดซ้อน", - "unstack_action_prompt": "เลิกซ้อนทับ {count} รายการแล้ว", - "unstacked_assets_count": "เลิกซ้อนทับ {count, plural, one {# รายการ} other {# รายการ}}แล้ว", + "unstack": "แตก Stack", + "unstack_action_prompt": "แตก {count} รายการออกจาก Stack แล้ว", + "unstacked_assets_count": "แตกสื่อ {count, plural, one {# รายการ} other {# รายการ}}ออกจาก Stack แล้ว", + "unsupported_field_type": "ชนิดข้อมูลที่ไม่รับรอง", "unsupported_file_type": "ไม่สามารถอัปโหลดไฟล์ {file} เนื่องจากระบบไม่รองรับประเภทไฟล์ {type} ที่ไฟล์นั้นใช้", + "untagged": "ไม่มีแท็ก", "up_next": "ต่อไป", + "update_location_action_prompt": "เปลี่ยนตำแหน่งของรูปภาพ {count} รูปเป็น:", "updated_at": "อัปเดตเมื่อ", "updated_password": "รหัสผ่านเปลี่ยนแล้ว", "upload": "อัปโหลด", "upload_concurrency": "อัปโหลดพร้อมกัน", + "upload_day_count": "{date}: อัปโหลด {count, plural, one {# รายการ} other {# รายการ}}", "upload_details": "รายละเอียดการอัปโหลด", "upload_error_with_count": "อัปโหลดผิดพลาดสำหรับสื่อ {count, plural, one {# รายการ} other {# รายการ}}", "upload_errors": "อัปโหลดเสร็จสิ้นโดยมีข้อผิดพลาด {count, plural, one {# รายการ} other {# รายการ}} รีเฟรชหน้าเพื่อดูสื่อที่อัปโหลดใหม่", @@ -2024,14 +2193,21 @@ "upload_status_errors": "ข้อผิดพลาด", "upload_status_uploaded": "อัปโหลดแล้ว", "upload_success": "อัปโหลดสำเร็จ รีเฟรชหน้าเพื่อดูสื่อที่อัปโหลดใหม่", + "upload_to_album_body": "สำหรับผู้ใช้ที่ไม่ได้ใช้คุณสมบัติอัปโหลดด้วยตนเอง ตอนนี้สามารถอัปโหลดรูปจากเครื่องเข้าอัลบั้มได้โดยตรงแล้ว ไม่จำเป็นต้องอัปโหลดก่อนแล้วนำเข้าอัลบั้มทีหลังอีกต่อไป", + "upload_to_album_title": "อัปโหลดตรงไปยังอัลบั้ม", "upload_to_immich": "อัปโหลดไปยัง Immich ({count})", "uploading": "กำลังอัปโหลด", "uploading_media": "กำลังอัปโหลดสื่อ", + "uploads": "การอัปโหลด", + "uploads_count": "{count, plural, one {# อัปโหลด} other {# อัปโหลด}}", "url": "URL", "usage": "การใช้งาน", "use_biometric": "ใช้การพิสูจน์อัตลักษณ์", + "use_browser_locale": "ใช้การตั้งค่าภาษาและพื้นที่ของเบราเซอร์", + "use_browser_locale_description": "จัดรูปวัน, เวลา และตัวเลขตามการตั้งค่าในเบราว์เซอร์", "use_current_connection": "ใช้การเชื่อมต่อปัจจุบัน", "use_custom_date_range": "ใช้การปรับแต่งช่วงเวลา", + "use_template": "ใช้เท็มเพลต", "user": "ผู้ใช้", "user_has_been_deleted": "ผู้ใช้รายนี้ถูกลบไปแล้ว", "user_id": "ไอดีผู้ใช้", @@ -2046,6 +2222,7 @@ "user_usage_stats_description": "ดูสถิติการใช้งานบัญชี", "username": "ชื่อผู้ใช้", "users": "ผู้ใช้", + "users_added_to_album_count": "เพื่มผู้ใช้ {count, plural, one {# คน} other {# คน}}ให้อัลบั้มแล้ว", "utilities": "เครื่องมือ", "validate": "ตรวจสอบ", "validate_endpoint_error": "กรุณาระบุ URL ที่ถูกต้อง", @@ -2058,6 +2235,7 @@ "video": "วิดีโอ", "video_hover_setting": "เล่นวิดีโอแบบย่อเมื่อเลื่อนเมาส์อยู่บน", "video_hover_setting_description": "เล่นวิดีโอตัวอย่างเมื่อเมาส์จ่อข้างบน เมื่อปิดใช้งาน วิดีโอตัวอย่างยังสามารถเล่นได้โดยกดปุ่มเล่น", + "video_quality": "คุณภาพวิดิโอ", "videos": "วิดีโอ", "videos_count": "{count, plural, one {# วิดีโอ} other {# วิดีโอ}}", "view": "ดู", @@ -2073,7 +2251,9 @@ "view_previous_asset": "ดูสื่อก่อนหน้า", "view_qr_code": "ดูคิวอาร์โค้ด", "view_similar_photos": "ดูรูปที่คล้ายกัน", - "viewer_remove_from_stack": "เอาออกจากที่ซ้อน", + "view_stack": "ดู Stack", + "viewer_remove_from_stack": "เอาออกจาก Stack", + "visibility": "การมองเห็น", "visibility_changed": "เปลี่ยนแปลงการมองเห็นสำหรับ {count, plural, one {# บุคคล} other {# บุคคล}}", "visual": "เห็นภาพ", "waiting": "กำลังรอ", @@ -2082,9 +2262,26 @@ "week": "สัปดาห์", "welcome": "ยินดีต้อนรับ", "welcome_to_immich": "ยินดีต้อนรับสู่ immich", + "whats_new": "มีอะไรใหม่", + "whats_new_settings_subtitle": "ดูว่ามีอะไรใหม่ใน Immich", + "whats_new_version": "เวอร์ชัน {version}", + "when": "เมื่อ", "width": "ความกว้าง", "wifi_name": "ชื่อ Wi-Fi", + "workflow": "Workflow", + "workflow_delete_prompt": "ต้องการที่จะลบ Workflow นี้หรือไม่", + "workflow_deleted": "ลบ Workflow แล้ว", + "workflow_description": "คำอธิบาย Workflow", + "workflow_info": "ข้อมูล Workflow", + "workflow_json": "Workflow ในรูป JSON", + "workflow_json_help": "แก้ไข Workflow ในรูปแบบ JSON โดยการเปลี่ยนแปลงในนี้จะไปปรากฏในตัวแก้ไขแบบภาพ", + "workflow_name": "ชื่อ Workflow", "workflow_navigation_prompt": "คุณต้องการออกโดยที่ยังไม่บันทึกการเปลี่ยนแปลงหรือไม่?", + "workflow_summary": "ภาพรวมของ Workflow", + "workflow_templates": "เท็มเพลต Workflow", + "workflow_update_success": "Workflow ได้ถูกแก้ไขเรียบร้อย", + "workflows": "Workflows", + "workflows_help_text": "Workflow สามารถทำการกระทำบนสื่อของคุณตามทริกเกอร์และตัวกรองอย่างอัตโนมัติได้", "wrong_pin_code": "รหัส PIN ไม่ถูกต้อง", "x_of_total": "{x}/{total}", "year": "ปี", @@ -2092,5 +2289,6 @@ "yes": "ใช่", "you_dont_have_any_shared_links": "คุณไม่ได้มีลิงก์ที่แชร์", "your_wifi_name": "ชื่อ Wi-Fi", + "zero_to_clear_rating": "กด 0 เพื่อล้างคะแนนบนสื่อนี้", "zoom_image": "ซูมรูปภาพ" } diff --git a/i18n/tr.json b/i18n/tr.json index 34ec3d20ec..2390d6e380 100644 --- a/i18n/tr.json +++ b/i18n/tr.json @@ -16,7 +16,7 @@ "add_a_name": "Ad ekle", "add_a_title": "Bir başlık ekleyin", "add_action": "Eylem ekle", - "add_assets": "Varlık ekle", + "add_assets": "Öğe ekle", "add_birthday": "Doğum günü ekle", "add_endpoint": "Uç nokta ekle", "add_exclusion_pattern": "Hariç tutma deseni ekle", @@ -108,6 +108,21 @@ "image_thumbnail_quality_description": "Küçük resim kalitesi 1-100 arasında. Daha yüksek değerler daha iyidir, ancak daha büyük dosyalar üretir ve uygulamanın yanıt hızını azaltabilir.", "image_thumbnail_title": "Küçük Fotoğraf Ayarları", "import_config_from_json_description": "JSON yapılandırma dosyası yükleyerek sistem yapılandırmasını içe aktar", + "integrity_checks_checksum_files": "Doğrulama dosyaları", + "integrity_checks_checksum_files_description": "Doğrulama kontrolünü yapılandır", + "integrity_checks_checksum_files_enable_description": "Doğrulama kontrolünü etkinleştirin", + "integrity_checks_checksum_files_percentage_limit": "Yüzdelik sınır", + "integrity_checks_checksum_files_percentage_limit_description": "Her aralıkta çalışacak doğrulama kontrolü için maksimum yüzde sınırını 0.01 ile 1 arasında yapılandırın.", + "integrity_checks_checksum_files_time_limit": "Zaman limiti", + "integrity_checks_checksum_files_time_limit_description": "Doğrulama kontrolünün her aralıkta çalışacağı maksimum süreyi yapılandırın. (ms)", + "integrity_checks_missing_files": "Eksik dosyalar", + "integrity_checks_missing_files_description": "Eksik dosya kontrolünün sıklığını yapılandırın ve etkinleştirin veya devre dışı bırakın", + "integrity_checks_missing_files_enable_description": "Eksik dosya kontrolünü etkinleştirin", + "integrity_checks_settings": "Bütünlüğü doğrula", + "integrity_checks_settings_description": "Bütünlük kontrol aralıklarını yönetin", + "integrity_checks_untracked_files": "İzlenmeyen dosyalar", + "integrity_checks_untracked_files_description": "İzlenmeyen dosya kontrolü sıklığını yapılandırın ve özelliği açın veya kapatın", + "integrity_checks_untracked_files_enable_description": "İzlenmeyen dosyalar kontrolünü etkinleştirin", "job_concurrency": "{job} eşzamanlılık", "job_created": "Görev oluşturuldu", "job_not_concurrency_safe": "Bu işlem eşzamanlılık açısından güvenli değil.", @@ -189,8 +204,10 @@ "maintenance_delete_error": "Yedek silinemedi.", "maintenance_integrity_check": "Kontrol et", "maintenance_integrity_check_all": "Hepsini kontrol et", + "maintenance_integrity_checksum_mismatch": "Doğrulama Uyuşmazlığı", "maintenance_integrity_checksum_mismatch_description": "Disk üzerindeki sağlama toplamı, Immich'in veritabanında sakladığı sağlama toplamıyla uyuşmayan dosyalar.", "maintenance_integrity_checksum_mismatch_job": "Sağlama toplamı uyuşmazlıklarını kontrol et", + "maintenance_integrity_checksum_mismatch_refresh_job": "Doğrulama uyuşmazlığı raporlarını yenile", "maintenance_integrity_missing_file": "Eksik Dosyalar", "maintenance_integrity_missing_file_description": "Immich'in veritabanında izlediği ancak dosya sisteminde bulunmayan dosyalar.", "maintenance_integrity_missing_file_job": "Eksik dosyaları kontrol et", @@ -408,11 +425,16 @@ "transcoding_policy_description": "Bir videonun ne zaman kod dönüştürüleceğini ayarlama", "transcoding_preferred_hardware_device": "Tercih edilen donanım cihazı", "transcoding_preferred_hardware_device_description": "Sadece VAAPI ve QSV için uygulanır. Donanım kod çevrimi için DRI Node ayarlar.", - "transcoding_preset_preset": "Ön ayar (-ön)", + "transcoding_preset_preset": "Ön ayar (-preset)", "transcoding_preset_preset_description": "Sıkıştırma hızı. Daha yavaş olan ayarlar belirli bitrate ayarları için daha küçük ve daha kaliteli dosya üretir. VP9 ayarı 'daha hızlı' ayarının üstündeki ayarları görmezden gelir.", "transcoding_realtime": "Gerçek Zamanlı Kod Dönüştürme [DENEYSEL]", + "transcoding_realtime_description": "Videonun akışı sırasında kod dönüştürme işleminin gerçek zamanlı olarak yapılmasını sağlar. Kalite değiştirmeye olanak tanır, ancak sunucu yeteneklerine bağlı olarak daha yüksek oynatma gecikmesine ve takılmalara neden olabilir.", "transcoding_realtime_enabled": "Gerçek zamanlı kod dönüştürmeyi etkinleştirin", "transcoding_realtime_enabled_description": "Devre dışı bırakılırsa, sunucu yeni gerçek zamanlı kod dönüştürme oturumları başlatmayı reddedecektir.", + "transcoding_realtime_resolutions": "Çözüm", + "transcoding_realtime_resolutions_description": "Gerçek zamanlı dönüştürme (transcoding) için sunulan çözünürlükler. Sunucu veriyi yeterince hızlı dönüştüremezse, yüksek çözünürlükler oynatma sorunlarına yol açabilir.", + "transcoding_realtime_video_codecs": "Video kodekleri", + "transcoding_realtime_video_codecs_description": "Anlık kod dönüştürme için sunulan video kodekleri. Cihazlar, oynatma esnasında destekledikleri en iyi kodeği seçecektir. Verimlilik sıralaması AV1 > HEVC > H.264 şeklindedir. Donanım hızlandırma aktifken sadece ekran kartınızın desteklediği kodekleri seçiniz. Yazılımsal dönüştürmede ise hız sıralaması H.264 > AV1 > HEVC şeklindedir.", "transcoding_reference_frames": "Referans kareler", "transcoding_reference_frames_description": "Belirli bir kareyi sıkıştırırken referans alınacak kare sayısı. Daha yüksek değerler sıkıştırma verimliliğini artırır, ancak kodlamayı yavaşlatır. 0 bu değeri otomatik olarak ayarlar.", "transcoding_required_description": "Yalnızca kabul edilen formatta olmayan videolar", @@ -552,6 +574,7 @@ "asset_added_to_album": "Albüme eklendi", "asset_adding_to_album": "Albüme ekleniyor…", "asset_created": "Öğe oluşturuldu", + "asset_day_count": "{date}: {count, plural, one {# dosya} other {# dosya}}", "asset_description_updated": "Öğe açıklaması güncellendi", "asset_hashing": "Karma (hashleme) oluşturuluyor…", "asset_list_group_by_sub_title": "Grupla", @@ -573,7 +596,8 @@ "asset_viewer_settings_subtitle": "Galeri görüntüleyici ayarlarını düzenle", "asset_viewer_settings_title": "İçerik Görüntüleyici", "assets": "Öğeler", - "assets_added_to_album_count": "Albüme {count, plural, one {# asset} other {# assets}} eklendi", + "assets_added_to_album_count": "Albüme {count, plural, one {# öge} other {# öge}} eklendi", + "assets_added_to_album_partial_count": "Albüme {successCount} içerisinden {totalCount} {totalCount, plural, one {ögeden} other {ögeden}} tane eklendi", "assets_added_to_albums_count": "Eklendi {assetTotal, plural, one {# asset} other {# assets}} buraya {albumTotal, plural, one {# album} other {# albums}}", "assets_cannot_be_added_to_album_count": "{count, plural, one {Asset} other {Assets}} albüme eklenemiyor", "assets_cannot_be_added_to_albums": "{count, plural, one {Asset} other {Assets}} hiçbir albüme eklenemez", @@ -790,7 +814,6 @@ "custom_date": "Özel tarih", "custom_locale": "Özel yerel ayar", "custom_locale_description": "Tarih, saat ve sayılar seçilen dil ve bölgeye göre biçimlendirilsin", - "custom_url": "Özel URL", "cutoff_date_description": "Son döneme ait fotoğrafları tut …", "cutoff_day": "{count, plural, one {gün} other {gün}}", "cutoff_year": "{count, plural, one {yıl} other {yıl}}", @@ -807,6 +830,7 @@ "day": "Gün", "days": "Günler", "deduplicate_all": "Tüm kopyaları kaldır", + "default_quality_subtitle": "Paylaş düğmesine dokunulduğunda kullanılacak kalite. Her seferinde seçim yapmak için paylaş düğmesine uzun süre basın.", "default_share_quality": "Varsayılan paylaşım kalitesi", "delete": "Sil", "delete_action_confirmation_message": "Bu öğeyi silmek istediğinizden emin misiniz? Bu işlem, öğeyi sunucunun çöp kutusuna taşıyacak ve yerel olarak silmek isteyip istemediğinizi soracaktır", @@ -1079,6 +1103,7 @@ "export_as_json": "JSON olarak Dışa Aktar", "export_database": "Veritabanını Dışa Aktar", "export_database_description": "SQLite veritabanını dışa aktarın", + "exposure_time": "Poz Süresi", "extension": "Uzantı", "external": "Harici", "external_libraries": "Harici kütüphaneler", @@ -1297,9 +1322,9 @@ "login_form_failed_login": "Giriş yaparken hata oluştu, sunucu URL'sini, e-postayı ve şifreyi kontrol edin", "login_form_handshake_exception": "Sunucuda bir El Sıkışma İstisnası vardı. Kendi kendine imzalanmış bir sertifika kullanıyorsanız, ayarlar menüsünden kendi kendine imzalanmış sertifikalara izin verin.", "login_form_password_hint": "şifre", - "login_form_server_empty": "Sunucu URL'si girin.", - "login_form_server_error": "Sunucuya bağlanılamadı.", - "login_has_been_disabled": "Giriş devre dışı bırakıldı.", + "login_form_server_empty": "Sunucu URL'si girin", + "login_form_server_error": "Sunucuya bağlanılamadı", + "login_has_been_disabled": "Giriş devre dışı bırakıldı", "login_password_changed_error": "Şifreniz güncellenirken bir hata oluştu", "login_password_changed_success": "Şifre başarıyla güncellendi", "logout_all_device_confirmation": "Tüm cihazlarda oturum kapatmak istediğinizden emin misiniz?", @@ -1350,6 +1375,7 @@ "map_location_picker_page_use_location": "Bu konumu kullan", "map_location_service_disabled_content": "Mevcut konumunuzdan öğeleri görüntülemek için konum hizmetinin etkinleştirilmesi gerekiyor. Şimdi etkinleştirmek istiyor musunuz?", "map_location_service_disabled_title": "Konum hizmeti devre dışı bırakıldı", + "map_marker_for_image": "{city}, {country} konumunda çekilen fotoğraf için harita işareti", "map_marker_with_image": "Resimli harita işaretleyicisi", "map_no_location_permission_content": "Mevcut konumunuzdan öğeleri görüntülemek için konum iznine ihtiyaç var. Şimdi izin vermek istiyor musunuz?", "map_no_location_permission_title": "Konum izni reddedildi", @@ -1454,6 +1480,7 @@ "never": "Asla", "new_album": "Yeni albüm", "new_api_key": "Yeni API Anahtarı", + "new_feature": "Yeni Özellik", "new_password": "Yeni şifre", "new_person": "Yeni kişi", "new_pin_code": "Yeni PIN kodu", @@ -1497,9 +1524,13 @@ "not_available": "U/D", "not_in_any_album": "Hiçbir albümde değil", "not_selected": "Seçilmedi", + "not_set": "Ayarlanmadı", "notes": "Notlar", "nothing_here_yet": "Burada henüz bir şey yok", "notification_backup_reliability": "Arka plan yedeklemelerinin güvenirliğini iyileştirmek için bildirimlere izin verin", + "notification_enabled_list_tile_content": "Immich, arka plan yedeklemesi için bildirimleri kullanır. Bunu cihaz ayarlarınızdan yönetebilirsiniz.", + "notification_enabled_list_tile_open_button": "Ayarları aç", + "notification_enabled_list_tile_title": "Bildirimler etkin", "notification_permission_dialog_content": "Bildirimleri etkinleştirmek için cihaz ayarlarına gidin ve izin verin.", "notification_permission_list_tile_content": "Bildirimleri etkinleştirmek için izin verin.", "notification_permission_list_tile_enable_button": "Bildirimleri Etkinleştir", @@ -1511,6 +1542,8 @@ "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", + "ocr_body": "Immich artık fotoğraflarınızın içindeki metinleri okuyabiliyor, böylece metinde yazanlara göre arama yapabilirsiniz.", + "ocr_title": "Fotoğraflarda metin ara", "official_immich_resources": "Resmi Immich Kaynakları", "offline": "Çevrim dışı", "offset": "Ofset", @@ -1529,6 +1562,8 @@ "open": "Aç", "open_calendar": "Takvimi aç", "open_in_browser": "Tarayıcıda aç", + "open_in_immich_body": "Immich'i Android'de galeri olarak ayarlayarak diğer uygulamalardan fotoğrafları doğrudan açabilirsiniz.", + "open_in_immich_title": "Fotoğrafları Immich ile aç", "open_in_map_view": "Harita görünümünde aç", "open_in_openstreetmap": "OpenStreetMap'te Aç", "open_the_search_filters": "Arama filtrelerini aç", @@ -1537,6 +1572,7 @@ "organize_into_albums": "Albümler halinde düzenle", "organize_into_albums_description": "Mevcut fotoğrafları geçerli eşitleme ayarlarını kullanarak albümlere yerleştirin", "organize_your_library": "Kütüphanenizi düzenleyin", + "orientation": "Yönlendirme", "original": "orijinal", "other": "Diğer", "other_devices": "Diğer cihazlar", @@ -1547,7 +1583,7 @@ "partner": "Ortak", "partner_can_access": "{partner} erişebilir", "partner_can_access_assets": "Arşivlenenler ve Silinenler dışındaki tüm fotoğraf ve videolarınız", - "partner_can_access_location": "Fotoğraf ve videolarınızın çekildiği konum", + "partner_can_access_location": "Fotoğraflarınızın çekildiği konum", "partner_list_user_photos": "{user} fotoğrafları", "partner_page_empty_message": "Fotoğraflarınız henüz hiçbir ortakla paylaşılmadı.", "partner_page_no_more_users": "Eklenecek başka kullanıcı yok", @@ -1585,7 +1621,7 @@ "person": "Kişi", "person_age_months": "{months, plural, one {# aylık} other {# aylık}}", "person_age_year_months": "1 yıl, {months, plural, one {# aylık} other {# aylık}}", - "person_age_years": "{years, plural, other {# yaşında}}", + "person_age_years": "{years, plural, one {# yıl} other {# yıl}} yaşında", "person_birthdate": "{date} tarihinde doğdu", "person_hidden": "{name}{hidden, select, true { (gizli)} other {}}", "person_recognized": "Tanınan kişi", @@ -1686,7 +1722,10 @@ "recent": "Son", "recent_searches": "Son aramalar", "recently_added": "Son eklenenler", + "recently_added_body": "Son zamanlarda eklediğiniz her şeye özel bir sayfadan doğrudan göz atın.", + "recently_added_description": "Ögelerinize Immich'e yüklemeye göre sıralanmış olarak göz atın", "recently_added_page_title": "Son Eklenenler", + "recently_added_title": "Son eklenenler", "recently_taken": "Son çekilenler", "refresh": "Yenile", "refresh_encoded_videos": "Kodlanmış videoları yenile", @@ -1893,6 +1932,8 @@ "share_link": "Bağlantıyı Paylaş", "share_original": "Orijinal (büyük) olanı kullanın", "share_preview": "Küçük resmi kullan", + "share_quality_body": "Paylaşmadan önce görüntü kalitesini seçmek için paylaş düğmesine basılı tutun.", + "share_quality_title": "Paylaşma kalitesini seçin", "shared": "Paylaşılan", "shared_album_activities_input_disable": "Yoruma kapalı", "shared_album_activity_remove_content": "Bu etkinliği silmek istiyor musunuz?", @@ -1907,7 +1948,9 @@ "shared_link_app_bar_title": "Paylaşılan Bağlantılar", "shared_link_clipboard_copied_massage": "Panoya kopyalandı", "shared_link_create_error": "Paylaşım bağlantısı oluşturulurken hata oluştu", - "shared_link_custom_url_description": "Özel bir URL ile bu paylaşılan bağlantıya erişin", + "shared_link_custom_url_description": "Bu paylaşılan bağlantıya özel bir URL adıyla erişin", + "shared_link_custom_url_title": "Özel URL", + "shared_link_custom_url_warning": "Uyarı: İleri eğik çizgi içeren özel bir URL adı beklediğiniz gibi çalışmayabilir.", "shared_link_edit_description_hint": "Açıklama yazın", "shared_link_edit_expire_after_option_day": "1 gün", "shared_link_edit_expire_after_option_days": "{count} gün", @@ -1954,6 +1997,7 @@ "show_keyboard_shortcuts": "Klavye kısayollarını göster", "show_less": "Daha az göster", "show_metadata": "Meta verileri göster", + "show_more_fields": "{count, plural, one {Show # alan daha göster} other {Show # alan daha göster}}", "show_or_hide_info": "Bilgileri göster veya gizle", "show_password": "Şifreyi göster", "show_person_options": "Kişi seçeneklerini göster", @@ -1973,16 +2017,19 @@ "sign_out": "Oturumu Kapat", "sign_up": "Kaydol", "size": "Boyut", + "skip": "Atla", "skip_to_content": "İçeriğe atla", "skip_to_folders": "Klasörlere atla", "skip_to_tags": "Etiketlere atla", "slideshow": "Slayt gösterisi", + "slideshow_body": "Arkanıza yaslanın ve fotoğraflarınızın tam ekran slayt gösterisinde akışını izleyin.", "slideshow_metadata_overlay_mode": "Yer paylaşımı içeriği", "slideshow_metadata_overlay_mode_description_only": "Sadece açıklama", "slideshow_metadata_overlay_mode_full": "Dolu", "slideshow_repeat": "Slayt gösterisini tekrarla", "slideshow_repeat_description": "Slayt gösterisi bittiğinde başa dön", "slideshow_settings": "Slayt gösterisi ayarları", + "slideshow_title": "Slayt gösterisi", "smart_album": "Akıllı albüm", "some_assets_already_have_a_location_warning": "Seçilen varlıkların bazılarının zaten bir konumu mevcut", "sort_albums_by": "Albümleri sırala...", @@ -2110,6 +2157,7 @@ "unknown": "Bilinmeyen", "unknown_country": "Bilinmeyen Ülke", "unknown_date": "Bilinmeyen tarih", + "unknown_schema": "Bilinmeyen şema", "unknown_year": "Bilinmeyen Yıl", "unlimited": "Sınırsız", "unlink_motion_video": "Hareketli video bağlantısını kaldır", @@ -2134,7 +2182,7 @@ "updated_password": "Güncellenen şifre", "upload": "Yükle", "upload_concurrency": "Yükleme eşzamanlılığı", - "upload_day_count": "{tarih}: {sayı, çoğul, bir {# yükleme} diğer {# yüklemeler}}", + "upload_day_count": "{date}: {count, plural, one {# yükleme} other {# yükleme}}", "upload_details": "Yükleme Ayrıntıları", "upload_error_with_count": "{count, plural, one {# öğe} other {# öğeler}} için yükleme hatası", "upload_errors": "{count, plural, one {# hata} other {# hatayla}} yükleme tamamlandı, yeni yüklenen öğeleri görmek için sayfayı güncelleyin.", @@ -2145,10 +2193,13 @@ "upload_status_errors": "Hatalar", "upload_status_uploaded": "Yüklendi", "upload_success": "Yükleme başarılı, yüklenen yeni öğeleri görebilmek için sayfayı yenileyin.", + "upload_to_album_body": "Manuel yükleme özelliğini kullanmayan kullanıcılar için, artık fotoğrafları yüklerken bunları doğrudan bir albüme ekleme seçeneğiniz var; artık önce fotoğrafları yükleyip daha sonra albüme eklemenize gerek yok.", + "upload_to_album_title": "Doğrudan bir albüme yükle", "upload_to_immich": "Immich'e Yükle ({count})", "uploading": "Yükleniyor", "uploading_media": "Medya yükleme", "uploads": "Yüklemeler", + "uploads_count": "{count, plural, one {# yükleme} other {# yüklemeler}}", "url": "URL", "usage": "Kullanım", "use_biometric": "Biyometri kullan", @@ -2211,6 +2262,9 @@ "week": "Hafta", "welcome": "Hoş geldiniz", "welcome_to_immich": "Immich'e hoş geldiniz", + "whats_new": "Yenilikler", + "whats_new_settings_subtitle": "Immich'te yeni neler olduğuna bak", + "whats_new_version": "Versiyon {version}", "when": "Ne zaman", "width": "Genişlik", "wifi_name": "Wi-Fi Adı", diff --git a/i18n/uk.json b/i18n/uk.json index 3a0e49503b..3c5ebb7b04 100644 --- a/i18n/uk.json +++ b/i18n/uk.json @@ -108,6 +108,21 @@ "image_thumbnail_quality_description": "Якість мініатюри від 1 до 100. Вище значення означає кращу якість, але створює більші файли та може зменшити швидкість роботи застосунку.", "image_thumbnail_title": "Налаштування мініатюр", "import_config_from_json_description": "Імпортувати конфігурацію системи, вивантаживши файл конфігурації JSON", + "integrity_checks_checksum_files": "Файли контрольних сум", + "integrity_checks_checksum_files_description": "Налаштувати перевірку контрольних сум", + "integrity_checks_checksum_files_enable_description": "Увімкнути перевірку контрольних сум", + "integrity_checks_checksum_files_percentage_limit": "Відсотковий ліміт", + "integrity_checks_checksum_files_percentage_limit_description": "Налаштуйте максимальний відсоток між 0.01 та 1 для того наскільки перевірка контрольних сум повинна виконуватись кожний інтервал.", + "integrity_checks_checksum_files_time_limit": "Ліміт часу", + "integrity_checks_checksum_files_time_limit_description": "Налаштуйте максимальну тривалість для якої перевірка контрольних сум повинна виконуватись кожний інтервал. (мс)", + "integrity_checks_missing_files": "Відсутні файли", + "integrity_checks_missing_files_description": "Налаштуйте частоту та увімкніть або вимкніть перевірку на відсутні файли", + "integrity_checks_missing_files_enable_description": "Увімкнути перевірку на відсутні файли", + "integrity_checks_settings": "Перевірки цілісності", + "integrity_checks_settings_description": "Керуйте інтервалами перевірок на цілісність", + "integrity_checks_untracked_files": "Невідстежувані файли", + "integrity_checks_untracked_files_description": "Налаштувати частоту та увімкнути або вимкнути перевірку на невідстежені файли", + "integrity_checks_untracked_files_enable_description": "Увімкнути перевірку на невідстежувані файли", "job_concurrency": "Паралельність {job}", "job_created": "Завдання створено", "job_not_concurrency_safe": "Це завдання не є безпечним для одночасного виконання.", @@ -198,7 +213,7 @@ "maintenance_integrity_missing_file_job": "Перевірка відсутніх файлів", "maintenance_integrity_missing_file_refresh_job": "Оновити звіт про відсутні файли", "maintenance_integrity_report": "Звіт про цілісність", - "maintenance_integrity_untracked_file": "Невідстежувані файли", + "maintenance_integrity_untracked_file": "Невідстежувані Файли", "maintenance_integrity_untracked_file_description": "Файли в папках Immich, про які Immich не має жодних записів.", "maintenance_integrity_untracked_file_job": "Перевірка невідстежуваних файлів", "maintenance_integrity_untracked_file_refresh_job": "Оновити звіт про невідстежувані файли", @@ -416,6 +431,10 @@ "transcoding_realtime_description": "Дозволяє виконувати перекодування в режимі реального часу під час потокової передачі відео. Забезпечує перемикання якості, але може спричиняти більшу затримку відтворення та заїкання залежно від можливостей сервера.", "transcoding_realtime_enabled": "Увімкнути перекодування в реальному часі", "transcoding_realtime_enabled_description": "Якщо вимкнено, сервер не буде запускати нові сеанси транскодування в реальному часі.", + "transcoding_realtime_resolutions": "Роздільні здатності", + "transcoding_realtime_resolutions_description": "Роздільні здатності пропонуються для транскодування в реальному-часі. Високі роздільні здатності можуть спричинити помилки відтворення якщо сервер не зможе їх швидко транскодувати.", + "transcoding_realtime_video_codecs": "Відео кодеки", + "transcoding_realtime_video_codecs_description": "Відео кодеки пропонують транскодування в реальному часі. Клієнти оберуть найкращу опцію яку вони підтримують на протязі відтворення. AV1 є ефективнішим чим HEVC, який є ефективнішим чим H.264. Коли використовується апаратне прискорення, обирайте тільки кодеки які прискорювач може кодувати. Під час використання програмного транскодування, зауважте, що H.264 є швидшим за AV1, котрий є швидшим за HEVC.", "transcoding_reference_frames": "Опорні кадри", "transcoding_reference_frames_description": "Кількість кадрів, на які посилається під час стиснення певного кадру. Вищі значення покращують ефективність стиснення, але збільшують час кодування. Значення 0 визначає цей параметр автоматично.", "transcoding_required_description": "Лише відео, що не мають прийнятного формату", @@ -578,6 +597,7 @@ "asset_viewer_settings_title": "Переглядач елементів", "assets": "елементи", "assets_added_to_album_count": "Додано {count, plural, one {# елемент} few {# елементи} many {# елементів} other {# елементів}} до альбому", + "assets_added_to_album_partial_count": "Додано {successCount} з {totalCount} {totalCount, plural, one {asset} other {assets}} до альбому", "assets_added_to_albums_count": "Додано {assetTotal, plural, one {# елемент} few {# елементи} many {# елементів} other {# елементів}} до {albumTotal, plural, one {# альбому} few {# альбомів} many {# альбомів} other {# альбомів}}", "assets_cannot_be_added_to_album_count": "{count, plural, one {Елемент} few {Елементи} many {Елементів} other {Елементів}} не вдається додати до альбому", "assets_cannot_be_added_to_albums": "{count, plural, one {Елемент} few {Елементи} many {Елементів} other {Елементів}} не вдається додати до жодного з альбомів", @@ -794,7 +814,6 @@ "custom_date": "Довільна дата", "custom_locale": "Довільні регіональні налаштування", "custom_locale_description": "Форматувати дату, час та числа з урахуванням вибраної мови та регіону", - "custom_url": "Довільна URL-адреса", "cutoff_date_description": "Зберігати фото за останні…", "cutoff_day": "{count, plural, one {день} few {дні} many {днів} other {днів}}", "cutoff_year": "{count, plural, one {рік} few {роки} many {років} other {років}}", @@ -1200,7 +1219,7 @@ "individual_share": "Окремий доступ", "individual_shares": "Окремі доступи", "info": "Інформація", - "integrity_checks": "Перевірки цілісності", + "integrity_checks": "Перевірки Цілісності", "interval": { "day_at_onepm": "Щодня о 13:00", "hours": "Кожну {hours, plural, one {# годину} few {# години} many {# годин} other {# годин}}", @@ -1303,9 +1322,9 @@ "login_form_failed_login": "Не вдалося ввійти, перевірте URL-адресу сервера, електронну пошту та пароль", "login_form_handshake_exception": "Не вдалося установити з'єднання із сервером. Увімкніть підтримку самопідписаного сертифіката в налаштуваннях, якщо ви використовуєте самопідписаний сертифікат.", "login_form_password_hint": "пароль", - "login_form_server_empty": "Введіть URL-адресу сервера.", - "login_form_server_error": "Не вдалося з'єднатися із сервером.", - "login_has_been_disabled": "Вхід було вимкнено.", + "login_form_server_empty": "Введіть URL-адресу сервера", + "login_form_server_error": "Не вдалося з'єднатися із сервером", + "login_has_been_disabled": "Вхід було вимкнено", "login_password_changed_error": "Не вдалося оновити пароль", "login_password_changed_success": "Пароль оновлено", "logout_all_device_confirmation": "Ви впевнені, що хочете вийти з усіх пристроїв?", @@ -1461,6 +1480,7 @@ "never": "Ніколи", "new_album": "Новий альбом", "new_api_key": "Новий ключ API", + "new_feature": "Нова Функція", "new_password": "Новий пароль", "new_person": "Нова людина", "new_pin_code": "Новий PIN-код", @@ -1521,6 +1541,8 @@ "obtainium_configurator": "Конфігуратор Obtainium", "obtainium_configurator_instructions": "Використовуйте Obtainium для установлення та оновлення застосунку Android безпосередньо з релізу Immich на GitHub. Створіть ключ API та виберіть варіант, щоб створити посилання на конфігурацію Obtainium", "ocr": "OCR", + "ocr_body": "Immich тепер читає текст всередині ваших фото, щоб ви могли шукати їх по тому, що там написано.", + "ocr_title": "Пошуковий текст у ваших фотографіях", "official_immich_resources": "Офіційні ресурси Immich", "offline": "Недоступний", "offset": "Зсув", @@ -1539,6 +1561,8 @@ "open": "Відкрити", "open_calendar": "Відкрити календар", "open_in_browser": "Відкрити в браузері", + "open_in_immich_body": "Встановити Immich як вашу галерею в Android щоб відкривати фото зразу з додатку.", + "open_in_immich_title": "Відкрити фото в Immich", "open_in_map_view": "Відкрити на мапі", "open_in_openstreetmap": "Відкрити в OpenStreetMap", "open_the_search_filters": "Відкрити фільтри пошуку", @@ -1697,7 +1721,10 @@ "recent": "Нещодавно", "recent_searches": "Нещодавні пошукові запити", "recently_added": "Нещодавно додані", + "recently_added_body": "Стрибніть зразу до всього що ви додали останнім часом на виділеній сторінці.", + "recently_added_description": "Переглядайте ваші активи сортованими за тим коли вони були завантажені в Immich", "recently_added_page_title": "Нещодавно додані", + "recently_added_title": "Додані останнім часом", "recently_taken": "Нещодавно зняті", "refresh": "Оновити", "refresh_encoded_videos": "Оновити закодовані відео", @@ -1888,8 +1915,8 @@ "setting_image_viewer_preview_title": "Завантажувати мініатюри", "setting_languages_apply": "Застосувати", "setting_languages_subtitle": "Змінити мову застосунку", - "setting_notifications_notify_minutes": "{count, plural, one {# хвилина} few {# хвилини} many {# хвилин} other {# хвилин}}", - "setting_notifications_notify_seconds": "{count, plural, one {# секунда} few {# секунди} many {# секунд} other {# секунд}}", + "setting_notifications_notify_minutes": "{count} хвилин", + "setting_notifications_notify_seconds": "{count} секунд", "setting_notifications_subtitle": "Налаштуйте уподобання сповіщень", "setting_video_viewer_auto_play_subtitle": "Автоматично починати відтворення відео під час їх відкриття", "setting_video_viewer_auto_play_title": "Автоматичне відтворення відео", @@ -1904,6 +1931,8 @@ "share_link": "Поділитися посиланням", "share_original": "Використати оригінал (великий)", "share_preview": "Використати мініатюру (малу)", + "share_quality_body": "Натисніть та тримайте кнопку поділитися щоб обрати якість зображення перед тим як поділитись.", + "share_quality_title": "Оберіть вашу якість для поширення", "shared": "Спільні", "shared_album_activities_input_disable": "Коментування вимкнено", "shared_album_activity_remove_content": "Ви хочете видалити цей запис?", @@ -1925,7 +1954,7 @@ "shared_link_edit_expire_after_option_hour": "1 годину", "shared_link_edit_expire_after_option_hours": "{count, plural, one {# годину} few {# години} many {# годин} other {# годин}}", "shared_link_edit_expire_after_option_minute": "1 хвилину", - "shared_link_edit_expire_after_option_minutes": "{count, plural, one {# хвилину} few {# хвилини} many {# хвилин} other {# хвилин}}", + "shared_link_edit_expire_after_option_minutes": "{count} хвилин", "shared_link_edit_expire_after_option_months": "{count, plural, one {# місяць} few {# місяці} many {# місяців} other {# місяців}}", "shared_link_edit_expire_after_option_year": "{count, plural, one {# рік} few {# роки} many {# років} other {# років}}", "shared_link_edit_password_hint": "Введіть пароль для спільного доступу", @@ -1935,11 +1964,11 @@ "shared_link_expires_days": "Закінчується через {count, plural, one {# день} few {# дні} many {# днів} other {# днів}}", "shared_link_expires_hour": "Закінчується через {count, plural, one {# годину} few {# години} many {# годин} other {# годин}}", "shared_link_expires_hours": "Закінчується через {count, plural, one {# годину} few {# години} many {# годин} other {# годин}}", - "shared_link_expires_minute": "Закінчується через {count, plural, one {# хвилину} few {# хвилини} many {# хвилин} other {# хвилин}}", - "shared_link_expires_minutes": "Закінчується через {count, plural, one {# хвилину} few {# хвилини} many {# хвилин} other {# хвилин}}", + "shared_link_expires_minute": "Закінчується через {count} хвилину", + "shared_link_expires_minutes": "Закінчується через {count} хвилин", "shared_link_expires_never": "Закінчується ∞", - "shared_link_expires_second": "Закінчується через {count, plural, one {# секунду} few {# секунди} many {# секунд} other {# секунд}}", - "shared_link_expires_seconds": "Закінчується через {count, plural, one {# секунду} few {# секунди} many {# секунд} other {# секунд}}", + "shared_link_expires_second": "Закінчується через {count} секунду", + "shared_link_expires_seconds": "Закінчується через {count} секунд", "shared_link_individual_shared": "Індивідуальний спільний доступ", "shared_link_info_chip_metadata": "Exif", "shared_link_manage_links": "Керування спільними посиланнями", @@ -1985,16 +2014,19 @@ "sign_out": "Вийти", "sign_up": "Зареєструватися", "size": "Розмір", + "skip": "Пропустити", "skip_to_content": "Перейти до вмісту", "skip_to_folders": "Перейти до папок", "skip_to_tags": "Перейти до тегів", "slideshow": "Слайд-шоу", + "slideshow_body": "Сядьте зручніше та подивіться як ваші фотографії програються в повноекранному слайд-шоу.", "slideshow_metadata_overlay_mode": "Вміст оверлею", "slideshow_metadata_overlay_mode_description_only": "Лише опис", "slideshow_metadata_overlay_mode_full": "Повний", "slideshow_repeat": "Повторювати слайд-шоу", "slideshow_repeat_description": "Повернення до початку після завершення слайд-шоу", "slideshow_settings": "Налаштування слайд-шоу", + "slideshow_title": "Слайд-шоу", "smart_album": "Розумний альбом", "some_assets_already_have_a_location_warning": "Для деяких вибраних елементів вже вказано місце", "sort_albums_by": "Сортувати альбоми за…", @@ -2122,6 +2154,7 @@ "unknown": "Невідомо", "unknown_country": "Невідома країна", "unknown_date": "Невідома дата", + "unknown_schema": "Невідома схема", "unknown_year": "Невідомий рік", "unlimited": "Без обмежень", "unlink_motion_video": "Від'єднати рухоме відео", @@ -2157,6 +2190,8 @@ "upload_status_errors": "Помилки", "upload_status_uploaded": "Вивантажено", "upload_success": "Вивантажено. Оновіть сторінку, щоб побачити нові елементи.", + "upload_to_album_body": "Для користувачів які повноцінно не використовують функцію ручного завантаження, тепер ви можете обрати, щоб додати локальні фото напряму до альбому коли ви їх завантажуєте, більше не треба завантажувати та потім додавати до альбому пізніше.", + "upload_to_album_title": "Завантажити напряму до альбому", "upload_to_immich": "Вивантажити в Immich ({count})", "uploading": "Вивантаження", "uploading_media": "Вивантаження медіа", @@ -2224,6 +2259,9 @@ "week": "Тиждень", "welcome": "Ласкаво просимо", "welcome_to_immich": "Ласкаво просимо до Immich", + "whats_new": "Що нового", + "whats_new_settings_subtitle": "Дивіться, що є нового в Immich", + "whats_new_version": "Версія {version}", "when": "Коли", "width": "Ширина", "wifi_name": "Назва Wi-Fi", diff --git a/i18n/vi.json b/i18n/vi.json index aaa7e5ebc6..308537d627 100644 --- a/i18n/vi.json +++ b/i18n/vi.json @@ -108,6 +108,21 @@ "image_thumbnail_quality_description": "Chất lượng ảnh thu nhỏ từ 1-100. Càng cao càng tốt, nhưng sẽ tạo ra các tệp lớn hơn có thể làm giảm khả năng phản hồi của app.", "image_thumbnail_title": "Cài đặt Ảnh thu nhỏ", "import_config_from_json_description": "Nhập cấu hình hệ thống bằng cách tải lên tệp cấu hình JSON", + "integrity_checks_checksum_files": "Các tệp checksum", + "integrity_checks_checksum_files_description": "Thiết lập kiểm tra checksum", + "integrity_checks_checksum_files_enable_description": "Bật kiểm tra checksum", + "integrity_checks_checksum_files_percentage_limit": "Giới hạn tỷ lệ phần trăm", + "integrity_checks_checksum_files_percentage_limit_description": "Thiết lập tỷ lệ phần trăm tối đa (trong khoảng từ 0.01 đến 1) cho tần suất thực hiện kiểm tra checksum trong mỗi khoảng thời gian.", + "integrity_checks_checksum_files_time_limit": "Giới hạn thời gian", + "integrity_checks_checksum_files_time_limit_description": "Thiết lập thời lượng tối đa để thực hiện kiểm tra checksum trong mỗi khoảng thời gian. (ms)", + "integrity_checks_missing_files": "Những tệp bị thiếu", + "integrity_checks_missing_files_description": "Thiết lập tần suất và bật/tắt tính năng kiểm tra tệp bị thiếu", + "integrity_checks_missing_files_enable_description": "Bật tính năng kiểm tra tệp bị thiếu", + "integrity_checks_settings": "Kiểm tra tính toàn vẹn", + "integrity_checks_settings_description": "Quản lý khoảng thời gian kiểm tra tính toàn vẹn", + "integrity_checks_untracked_files": "Những tệp chưa được theo dõi", + "integrity_checks_untracked_files_description": "Thiết lập tần suất và bật/tắt việc kiểm tra các tệp chưa được theo dõi", + "integrity_checks_untracked_files_enable_description": "Bật tính năng kiểm tra các tệp chưa được theo dõi", "job_concurrency": "{job} chạy đồng thời", "job_created": "Tác vụ đã được tạo", "job_not_concurrency_safe": "Tác vụ này không an toàn để chạy đồng thời.", @@ -123,7 +138,7 @@ "library_remove_exclusion_pattern_prompt": "Bạn có chắc muốn xóa mẫu loại trừ này?", "library_remove_folder_prompt": "Bạn có chắc muốn gỡ thư mục nhập này?", "library_scanning": "Quét định kỳ", - "library_scanning_description": "Cấu hình quét thư viện định kỳ", + "library_scanning_description": "Thiết lập quét thư viện định kỳ", "library_scanning_enable_description": "Bật quét thư viện định kỳ", "library_settings": "Thư viện ngoài", "library_settings_description": "Quản lý cài đặt thư viện ngoài", @@ -337,7 +352,7 @@ "settings_page_description": "Trang cài đặt quản trị", "sidecar_job": "Siêu dữ liệu đi kèm", "sidecar_job_description": "Tìm hoặc đồng bộ các tệp siêu dữ liệu đi kèm từ hệ thống", - "slideshow_duration_description": "Số giây hiển thị từng ảnh", + "slideshow_duration_description": "Số giây hiển thị mỗi ảnh", "smart_search_job_description": "Chạy học máy trên toàn bộ tài nguyên để hỗ trợ tìm kiếm thông minh", "storage_template_date_time_description": "Mốc thời gian tạo tài nguyên được dùng làm thông tin ngày giờ", "storage_template_date_time_sample": "Thời gian mẫu {date}", @@ -416,6 +431,10 @@ "transcoding_realtime_description": "Cho phép chuyển mã video theo thời gian thực khi video đang được phát trực tuyến. Cho phép chuyển đổi chất lượng, nhưng có thể gây ra độ trễ phát lại cao hơn và hiện tượng giật hình tùy thuộc vào khả năng của máy chủ.", "transcoding_realtime_enabled": "Cho phép chuyển mã thời gian thực", "transcoding_realtime_enabled_description": "Nếu tắt, máy chủ sẽ từ chối bắt đầu các phiên chuyển mã thời gian thực mới.", + "transcoding_realtime_resolutions": "Độ Phân Giải", + "transcoding_realtime_resolutions_description": "Các độ phân giải được cung cấp cho quá trình chuyển mã thời gian thực. Các độ phân giải cao hơn có thể gây ra sự cố khi phát lại nếu máy chủ không thể chuyển mã chúng đủ nhanh.", + "transcoding_realtime_video_codecs": "Bộ giải mã video", + "transcoding_realtime_video_codecs_description": "Các codec video được cung cấp cho quá trình chuyển mã thời gian thực. Máy khách sẽ chọn tùy chọn tốt nhất mà chúng hỗ trợ trong quá trình phát lại. AV1 có hiệu suất cao hơn HEVC, và HEVC lại có hiệu suất cao hơn H.264. Khi sử dụng tính năng tăng tốc phần cứng, chỉ nên chọn các codec mà bộ tăng tốc có khả năng mã hóa. Khi thực hiện chuyển mã bằng phần mềm, cần lưu ý rằng H.264 có tốc độ xử lý nhanh hơn AV1, và AV1 nhanh hơn HEVC.", "transcoding_reference_frames": "Khung hình tham chiếu", "transcoding_reference_frames_description": "Số lượng khung hình tham chiếu khi nén một khung hình nhất định. Giá trị cao hơn cải thiện hiệu suất nén nhưng làm chậm quá trình mã hóa. Giá trị 0 để tự động thiết lập giá trị này.", "transcoding_required_description": "Chỉ video không ở định dạng được chấp nhận", @@ -476,16 +495,16 @@ "advanced_settings_clear_image_cache_error": "Lỗi khi xóa bộ nhớ đệm", "advanced_settings_clear_image_cache_success": "Đã giải phóng thành công {size}", "advanced_settings_log_level_title": "Phân loại log: {level}", - "advanced_settings_prefer_remote_subtitle": "Việc tải ảnh thu nhỏ từ tài nguyên trên một số thiết bị có thể diễn ra chậm. Kích hoạt cài đặt này để tải ảnh từ máy chủ.", + "advanced_settings_prefer_remote_subtitle": "Một số thiết bị nạp ảnh thu nhỏ từ tài nguyên thiết bị rất chậm. Bật để nạp ảnh từ máy chủ.", "advanced_settings_prefer_remote_title": "Ưu tiên ảnh từ máy chủ", - "advanced_settings_proxy_headers_subtitle": "Xác định các tiêu đề proxy Immich sẽ gửi kèm mỗi yêu cầu mạng", - "advanced_settings_proxy_headers_title": "Tùy chỉnh tiêu đề proxy [THỬ NGHIỆM]", - "advanced_settings_readonly_mode_subtitle": "Chế độ chỉ-xem chỉ cho phép xem ảnh, các tính năng như chọn nhiều ảnh, chia sẻ, phát, xóa đều bị vô hiệu hóa. Bật/Tắt chế độ chỉ-xem thông qua ảnh đại diện người dùng từ màn hình chính", + "advanced_settings_proxy_headers_subtitle": "Xác định các proxy header Immich sẽ gửi kèm mỗi yêu cầu mạng", + "advanced_settings_proxy_headers_title": "Tùy chỉnh proxy header [THỬ NGHIỆM]", + "advanced_settings_readonly_mode_subtitle": "Chỉ dùng ứng dụng để xem ảnh - các tính năng khác như chọn nhiều mục, chia sẻ, phát, xóa đều bị vô hiệu hóa. Nhấn giữ ảnh đại diện người dùng từ màn hình chính để bật/tắt chế độ.", "advanced_settings_readonly_mode_title": "Chế độ chỉ-xem", "advanced_settings_sync_remote_deletions_subtitle": "Tự động xóa hoặc khôi phục tài nguyên trên thiết bị này khi bạn thao tác trên web", "advanced_settings_sync_remote_deletions_title": "Đồng bộ việc xóa từ thiết bị khác [THỬ NGHIỆM]", "advanced_settings_tile_subtitle": "Dành cho người dùng nâng cao", - "advanced_settings_troubleshooting_subtitle": "Bật các tính năng bổ sung để xử lý sự cố", + "advanced_settings_troubleshooting_subtitle": "Bật tính năng bổ sung để xử lý sự cố", "advanced_settings_troubleshooting_title": "Xử lý sự cố", "age_months": "{months, plural, one {# tháng} other {# tháng}} tuổi", "age_year_months": "1 tuổi, {months, plural, one {# tháng} other {# tháng}}", @@ -544,16 +563,16 @@ "appears_in": "Xuất hiện trong", "apply_count": "Áp dụng ({count, number})", "archive": "Lưu trữ", - "archive_action_prompt": "{count} đã được thêm vào Lưu trữ", + "archive_action_prompt": "Đã thêm ({count}) vào Lưu trữ", "archive_or_unarchive_photo": "Lưu trữ hoặc bỏ lưu trữ ảnh", "archive_size": "Dung lượng tệp nén", - "archive_size_description": "Cấu hình dung lượng tệp nén để tải xuống (đơn vị GiB)", + "archive_size_description": "Thiết lập dung lượng tệp nén tải xuống (đơn vị GiB)", "archived": "Lưu trữ", "archived_count": "{count, plural, other {Đã lưu trữ # mục}}", "are_these_the_same_person": "Đây có phải cùng một người không?", "are_you_sure_to_do_this": "Bạn có chắc muốn thực hiện điều này?", "asset_added_to_album": "Đã thêm vào album", - "asset_adding_to_album": "Đang thêm vào album…", + "asset_adding_to_album": "Thêm vào album…", "asset_created": "Đã tạo tài nguyên", "asset_day_count": "{date}: {count, plural, one {# tài nguyên} other {# tài nguyên}}", "asset_description_updated": "Mô tả tài nguyên đã được cập nhật", @@ -578,6 +597,7 @@ "asset_viewer_settings_title": "Duyệt tài nguyên", "assets": "Tài nguyên", "assets_added_to_album_count": "Đã thêm {count, plural, one {# tài nguyên} other {# tài nguyên}} vào album", + "assets_added_to_album_partial_count": "Đã thêm {successCount} trong tổng số {totalCount} {totalCount, plural, one {tài nguyên} other {tài nguyên}} vào album", "assets_added_to_albums_count": "Đã thêm {assetTotal, plural, one {# tài nguyên} other {# tài nguyên}} vào {albumTotal, plural, one {# album} other {# album}}", "assets_cannot_be_added_to_album_count": "{count, plural, one {Tài nguyên} other {Tài nguyên}} không thể thêm vào album", "assets_cannot_be_added_to_albums": "{count, plural, one {Tài nguyên} other {Tài nguyên}} không thể thêm vào bất kỳ album nào", @@ -629,13 +649,13 @@ "backup_error_sync_failed": "Đồng bộ thất bại. Không thể tiến hành sao lưu.", "backup_info_card_assets": "tài nguyên", "backup_options": "Tùy chọn sao lưu", - "backup_settings_subtitle": "Cài đặt việc tải lên", - "backward": "Lùi lại", + "backup_settings_subtitle": "Thiết lập việc tải lên", + "backward": "Lùi", "battery_optimization_backup_reliability": "Tắt tính năng tiết kiệm pin để đảm bảo quá trình sao lưu nền", - "biometric_auth_enabled": "Đã bật xác thực sinh trắc học", - "biometric_locked_out": "Bạn đã bị khóa xác thực bằng sinh trắc học", - "biometric_no_options": "Không có tùy chọn bằng sinh trắc học", - "biometric_not_available": "Xác thực sinh trắc học không khả dụng trên thiết bị này", + "biometric_auth_enabled": "Đã bật xác thực vân tay", + "biometric_locked_out": "Bạn đã bị khóa xác thực bằng vân tay", + "biometric_no_options": "Tùy chọn vân tay không khả dụng", + "biometric_not_available": "Xác thực vân tay không khả dụng trên thiết bị này", "birthdate_set_description": "Sinh nhật được sử dụng để tính tuổi của người này tại thời điểm chụp ảnh.", "blurred_background": "Nền mờ", "browse_templates": "Xem mẫu có sẵn", @@ -657,7 +677,7 @@ "cannot_undo_this_action": "Bạn không thể hoàn tác hành động này!", "cannot_update_the_description": "Không thể cập nhật mô tả", "cast": "Chiếu", - "cast_description": "Cấu hình các thiết bị chiếu khả dụng", + "cast_description": "Thiết lập thiết bị chiếu khả dụng", "change": "Thay đổi", "change_date": "Thay đổi ngày", "change_description": "Thay đổi mô tả", @@ -684,11 +704,11 @@ "choose": "Chọn", "choose_matching_people_to_merge": "Chọn những người trùng khớp để hợp nhất", "city": "Thành phố", - "cleanup_confirm_description": "Immich phát hiện {count} tài nguyên (được tạo ra trước {date}) được sao lưu trên máy chủ. Bạn có muốn xóa bản sao được lưu trên thiết bị này không?", + "cleanup_confirm_description": "Immich tìm thấy {count} tài nguyên (được tạo ra trước {date}) được sao lưu trên máy chủ. Bạn có muốn xóa phiên bản của chúng lưu trên thiết bị này không?", "cleanup_confirm_prompt_title": "Xóa khỏi thiết bị này?", "cleanup_deleted_assets": "Đã chuyển {count} tài nguyên vào thùng rác", "cleanup_deleting": "Đang chuyển vào thùng rác...", - "cleanup_found_assets": "Phát hiện {count} tài nguyên được sao lưu", + "cleanup_found_assets": "Tìm thấy {count} tài nguyên đã sao lưu", "cleanup_found_assets_with_size": "Phát hiện {count} tài nguyên đã sao lưu ({size})", "cleanup_icloud_shared_albums_excluded": "Những album được chia sẻ trên iCloud không nằm trong phạm vi quét", "cleanup_no_assets_found": "Không tìm thấy tài nguyên nào phù hợp với điều kiện trên. Tính năng Giải phóng dung lượng chỉ có thể xóa các tài nguyên đã được sao lưu lên máy chủ", @@ -744,9 +764,9 @@ "continue": "Tiếp tục", "control_bottom_app_bar_add_tags": "Thêm thẻ", "control_bottom_app_bar_delete_from_local": "Xóa khỏi thiết bị", - "control_bottom_app_bar_edit_location": "Chỉnh sửa vị trí", - "control_bottom_app_bar_edit_time": "Chỉnh sửa Ngày và Giờ", - "control_bottom_app_bar_trash_from_immich": "Di chuyển vào Thùng rác", + "control_bottom_app_bar_edit_location": "Sửa địa điểm", + "control_bottom_app_bar_edit_time": "Sửa ngày", + "control_bottom_app_bar_trash_from_immich": "Xóa", "copied_image_to_clipboard": "Đã sao chép ảnh vào clipboard.", "copied_to_clipboard": "Đã sao chép vào clipboard!", "copy_error": "Sao chép lỗi", @@ -766,7 +786,7 @@ "create_first_workflow": "Tạo workflow đầu tiên", "create_library": "Tạo thư viện", "create_link": "Tạo link", - "create_link_to_share": "Tạo liên kết để chia sẻ", + "create_link_to_share": "Tạo link để chia sẻ", "create_link_to_share_description": "Ai có link sẽ xem được các ảnh đã chọn", "create_new": "TẠO MỚI", "create_new_person": "Tạo người mới", @@ -791,11 +811,10 @@ "current_device": "Thiết bị hiện tại", "current_pin_code": "Mã PIN hiện tại", "current_server_address": "Địa chủ máy chủ hiện tại", - "custom_date": "Thiết lập ngày tùy chỉnh", + "custom_date": "Tùy chỉnh mốc", "custom_locale": "Khu vực tùy chỉnh", "custom_locale_description": "Định dạng ngày, thời gian và số dựa trên ngôn ngữ và khu vực đã chọn", - "custom_url": "URL tùy chỉnh", - "cutoff_date_description": "Giữ lại ảnh trong vòng…", + "cutoff_date_description": "Giữ lại các ảnh từ…", "cutoff_day": "{count, plural, one {ngày} other {ngày}}", "cutoff_year": "{count, plural, one {năm} other {năm}}", "dark": "Tối", @@ -815,7 +834,7 @@ "default_share_quality": "Chất lượng chia sẻ mặc định", "delete": "Xóa", "delete_action_confirmation_message": "Bạn có chắc muốn xóa tài nguyên này? Tài nguyên sẽ được chuyển vào thùng rác của máy chủ và sẽ hỏi bạn có muốn xóa nó trên đó không", - "delete_action_prompt": "{count} đã xóa", + "delete_action_prompt": "Đã xóa ({count})", "delete_album": "Xóa album", "delete_api_key_prompt": "Bạn có chắc muốn xóa khóa API này?", "delete_dialog_alert": "Những mục này sẽ bị xóa vĩnh viễn khỏi Immich và thiết bị của bạn", @@ -827,12 +846,12 @@ "delete_key": "Xóa khóa", "delete_library": "Xóa Thư viện", "delete_link": "Xóa link", - "delete_local_action_prompt": "{count} đã xóa trên thiết bị", + "delete_local_action_prompt": "Đã xóa ({count}) trên thiết bị", "delete_local_dialog_ok_backed_up_only": "Xóa ảnh đã sao lưu", "delete_local_dialog_ok_force": "Vẫn xóa", "delete_others": "Xóa ảnh còn lại", "delete_permanently": "Xóa vĩnh viễn", - "delete_permanently_action_prompt": "{count} đã xóa vĩnh viễn", + "delete_permanently_action_prompt": "Đã xóa vĩnh viễn ({count})", "delete_shared_link": "Xóa link đã chia sẻ", "delete_shared_link_dialog_title": "Xóa link đã chia sẻ", "delete_tag": "Xóa thẻ", @@ -842,7 +861,7 @@ "description": "Mô tả", "deselect_all": "Bỏ chọn tất cả", "details": "Chi tiết", - "direction": "Hướng", + "direction": "Điều hướng", "disable": "Vô hiệu hóa", "disabled": "Đã tắt", "discord": "Discord", @@ -887,7 +906,7 @@ "edit_birthday": "Sửa ngày sinh", "edit_date": "Chỉnh sửa ngày", "edit_date_and_time": "Chỉnh sửa ngày và giờ", - "edit_date_and_time_action_prompt": "{count} đã sửa ngày và giờ", + "edit_date_and_time_action_prompt": "Đã sửa ngày và giờ ({count})", "edit_date_and_time_by_offset": "Thay đổi ngày theo độ lệch", "edit_description": "Chỉnh sửa mô tả", "edit_exclusion_pattern": "Chỉnh sửa quy tắc loại trừ", @@ -895,7 +914,7 @@ "edit_key": "Chỉnh sửa khóa", "edit_link": "Chỉnh sửa link", "edit_location": "Chỉnh sửa vị trí", - "edit_location_action_prompt": "{count} đã sửa vị trí", + "edit_location_action_prompt": "Đã sửa địa điểm ({count})", "edit_location_dialog_title": "Vị trí", "edit_name": "Chỉnh sửa tên", "edit_people": "Chỉnh sửa người", @@ -924,13 +943,13 @@ "empty_trash_confirmation": "Bạn có chắc muốn dọn sạch thùng rác? Điều này sẽ xóa vĩnh viễn tất cả các tài nguyên trong thùng rác khỏi Immich.\nBạn không thể hoàn tác hành động này!", "enable": "Bật", "enable_backup": "Bật sao lưu", - "enable_biometric_auth_description": "Nhập mã PIN của bạn để bật xác thực sinh trắc học", + "enable_biometric_auth_description": "Nhập mã PIN của bạn để bật xác thực vân tay", "enabled": "Đã bật", "end_date": "Ngày kết thúc", "enqueued": "Đã xếp hàng", "enter_wifi_name": "Nhập tên Wi-Fi", "enter_your_pin_code": "Nhập mã PIN của bạn", - "enter_your_pin_code_subtitle": "Nhập mã PIN của bạn để truy cập thư mục Khóa", + "enter_your_pin_code_subtitle": "Nhập mã PIN của bạn để truy cập thư mục Bí mật", "error": "Lỗi", "error_delete_face": "Lỗi khi xóa khuôn mặt khỏi tài nguyên", "error_loading_albums": "Xảy ra lỗi khi tải các album", @@ -1099,7 +1118,7 @@ "failed_to_load_assets": "Không tải được tài nguyên", "failed_to_load_folder": "Không tải được thư mục", "favorite": "Thích", - "favorite_action_prompt": "{count} đã thêm vào Yêu thích", + "favorite_action_prompt": "Đã thêm ({count}) vào Yêu thích", "favorite_or_unfavorite_photo": "Thích hoặc bỏ thích ảnh", "favorites": "Yêu thích", "feature_photo_updated": "Đã cập nhật ảnh nổi bật", @@ -1123,14 +1142,14 @@ "folders": "Thư mục", "folders_feature_description": "Duyệt ảnh và video theo thư mục trên hệ thống tệp", "forgot_pin_code_question": "Quên mã PIN?", - "forward": "Tiến tới", + "forward": "Tiến", "free_up_space": "Giải phóng dung lượng", - "free_up_space_description": "Chuyển hình ảnh và video đã được sao lưu vào thùng rác của thiết bị để giải phóng dung lượng. Bản sao lưu trên máy chủ không bị ảnh hưởng.", - "free_up_space_settings_subtitle": "Tiết kiệm dung lượng bộ nhớ thiết bị", + "free_up_space_description": "Chuyển các hình ảnh và video đã được sao lưu vào thùng rác thiết bị. Bản sao lưu trên máy chủ không bị ảnh hưởng.", + "free_up_space_settings_subtitle": "Tiết kiệm bộ nhớ thiết bị", "full_path": "Đường dẫn đầy đủ: {path}", "full_path_or_folder": "Đường dẫn đầy đủ hoặc thư mục", "gcast_enabled": "Google Cast", - "gcast_enabled_description": "Tính năng này tải các tài nguyên từ Google để hoạt động.", + "gcast_enabled_description": "Tính năng này tải các tài nguyên từ Google để hoạt động", "general": "Chung", "geolocation_instruction_location": "Nhấn vào một tài nguyên có tọa độ GPS để sử dụng vị trí của nó hoặc chọn vị trí trực tiếp từ bản đồ", "get_help": "Nhận trợ giúp", @@ -1158,7 +1177,7 @@ "header_settings_field_validator_msg": "Không được để trống", "header_settings_header_name_input": "Tên Header", "header_settings_header_value_input": "Giá trị Header", - "headers_settings_tile_title": "Tiêu đề proxy tùy chỉnh", + "headers_settings_tile_title": "Tùy chỉnh proxy header", "height": "Chiều cao", "hi_user": "Chào {name} ({email})", "hide_all_people": "Ẩn tất cả mọi người", @@ -1215,13 +1234,13 @@ "items_count": "{count, plural, one {# mục} other {# mục}}", "jobs": "Tác vụ", "keep": "Giữ", - "keep_albums": "Giữ lại các tập ảnh", + "keep_albums": "Giữ lại các album", "keep_albums_count": "Giữ lại {count} {count, plural, one {album} other {album}}", "keep_all": "Giữ tất cả", "keep_description": "Chọn giữ lại những gì trên thiết bị khi giải phóng dung lượng.", "keep_favorites": "Giữ lại các mục yêu thích", "keep_on_device": "Giữ lại trên thiết bị", - "keep_on_device_hint": "Chọn các tệp sẽ được giữ lại trên thiết bị", + "keep_on_device_hint": "Chọn các mục sẽ không xóa", "keep_this_delete_others": "Giữ tệp này, xóa các tệp khác", "keeping": "Giữ lại: {items}", "kept_this_deleted_others": "Đã giữ lại tài nguyên này và xóa {count, plural, one {# tài nguyên} other {# tài nguyên}}", @@ -1281,7 +1300,7 @@ "location_picker_longitude_error": "Nhập kinh độ hợp lệ", "location_picker_longitude_hint": "Nhập kinh độ của bạn", "lock": "Khóa", - "locked_folder": "Khóa", + "locked_folder": "Bí mật", "log_detail_title": "Chi tiết log", "log_out": "Đăng xuất", "log_out_all_devices": "Đăng xuất tất cả thiết bị", @@ -1312,7 +1331,7 @@ "logout_this_device_confirmation": "Bạn có chắc muốn đăng xuất thiết bị này?", "logs": "Log", "longitude": "Kinh độ", - "look": "Xem", + "look": "Hiển thị", "loop_videos": "Lặp video", "loop_videos_description": "Bật để video tự động lặp lại trong trình xem chi tiết.", "main_branch_warning": "Bạn đang dùng phiên bản đang phát triển; chúng tôi khuyên bạn nên dùng phiên bản phát hành!", @@ -1344,7 +1363,7 @@ "manage_media_access_rationale": "Để có thể di chuyển tài nguyên vào thùng rác và khôi phục chúng từ đó.", "manage_media_access_settings": "Mở cài đặt", "manage_media_access_subtitle": "Cho phép ứng dụng [Immich] quản lý và di chuyển tệp.", - "manage_media_access_title": "Quản lý phương tiện", + "manage_media_access_title": "Quản lý media", "manage_sharing_with_partners": "Quản lý chia sẻ với người thân", "manage_the_app_settings": "Quản lý cài đặt ứng dụng", "manage_your_account": "Quản lý tài khoản của bạn", @@ -1436,12 +1455,12 @@ "more": "Thêm", "motion": "Hoạt ảnh", "move": "Di chuyển", - "move_off_locked_folder": "Di chuyển ra khỏi thư mục Khóa", + "move_off_locked_folder": "Chuyển ra khỏi thư mục Bí mật", "move_to": "Di chuyển đến", "move_to_device_trash": "Chuyển vào thùng rác thiết bị", - "move_to_lock_folder_action_prompt": "{count} đã được thêm vào thư mục Khóa", - "move_to_locked_folder": "Di chuyển đến thư mục Khóa", - "move_to_locked_folder_confirmation": "Ảnh và video này sẽ bị xóa khỏi các album, chỉ có thể xem được trong thư mục Khóa", + "move_to_lock_folder_action_prompt": "Đã thêm {count} vào thư mục Bí mật", + "move_to_locked_folder": "Chuyển đến Bí mật", + "move_to_locked_folder_confirmation": "Ảnh và video này sẽ bị xóa khỏi mọi album và chỉ có thể xem được trong thư mục Bí mật", "moved_to_trash": "Đã chuyển vào thùng rác", "mute_memories": "Tắt tiếng Kỷ niệm", "my_albums": "Album của tôi", @@ -1461,10 +1480,11 @@ "never": "Không bao giờ", "new_album": "Album mới", "new_api_key": "Khóa API mới", + "new_feature": "Tính năng mới", "new_password": "Mật khẩu mới", "new_person": "Người mới", "new_pin_code": "Mã PIN mới", - "new_pin_code_subtitle": "Đây là lần đầu bạn vào thư mục Khóa. Hãy tạo mã PIN để truy cập an toàn", + "new_pin_code_subtitle": "Đây là lần đầu bạn vào thư mục Bí mật. Hãy tạo mã PIN để truy cập an toàn", "new_update": "Cập nhật mới", "new_user_created": "Người dùng mới đã được tạo", "new_version_available": "CÓ PHIÊN BẢN MỚI", @@ -1489,7 +1509,7 @@ "no_favorites_message": "Thêm ảnh yêu thích để nhanh chóng tìm thấy những bức ảnh và video đẹp nhất của bạn", "no_libraries_message": "Tạo một thư viện ngoài để xem ảnh và video của bạn", "no_local_assets_found": "Không tìm thấy tài nguyên trên thiết bị nào với checksum này", - "no_locked_photos_message": "Ảnh và video trong thư mục Khóa sẽ được ẩn đi và không hiển thị khi bạn duyệt hay tìm kiếm trong thư viện.", + "no_locked_photos_message": "Ảnh và video trong thư mục Bí mật sẽ được ẩn đi và không hiển thị khi bạn duyệt hay tìm kiếm trong thư viện.", "no_name": "Không có tên", "no_notifications": "Không có thông báo", "no_people_found": "Không có người nào khớp với tìm kiếm", @@ -1504,6 +1524,7 @@ "not_available": "Thiếu", "not_in_any_album": "Không thuộc album nào", "not_selected": "Không được chọn", + "not_set": "Chưa đặt", "notes": "Lưu ý", "nothing_here_yet": "Chưa có nội dung nào", "notification_backup_reliability": "Bật thông báo để đảm bảo quá trình sao lưu nền", @@ -1521,6 +1542,8 @@ "obtainium_configurator": "Cấu hình Obtainium", "obtainium_configurator_instructions": "Sử dụng Obtainium để cài đặt và cập nhật ứng dụng Android trực tiếp từ bản phát hành GitHub của Immich. Tạo khóa API và chọn một biến thể để tạo liên kết cấu hình Obtainium của bạn", "ocr": "OCR", + "ocr_body": "Immich hiện có thể đọc văn bản trong ảnh của bạn, nhờ đó bạn có thể tìm kiếm ảnh dựa trên nội dung văn bản đó.", + "ocr_title": "Tìm kiếm văn bản trong ảnh của bạn", "official_immich_resources": "Tài nguyên chính thức của Immich", "offline": "Ngoại tuyến", "offset": "Độ lệch", @@ -1539,6 +1562,8 @@ "open": "Mở", "open_calendar": "Mở lịch", "open_in_browser": "Mở trong trình duyệt", + "open_in_immich_body": "Hãy đặt Immich làm ứng dụng thư viện ảnh trên Android để mở ảnh trực tiếp từ các ứng dụng khác.", + "open_in_immich_title": "Mở ảnh trong Immich", "open_in_map_view": "Mở trong bản đồ", "open_in_openstreetmap": "Mở trong OpenStreetMap", "open_the_search_filters": "Mở bộ lọc tìm kiếm", @@ -1557,7 +1582,7 @@ "page": "Trang", "partner": "Người thân", "partner_can_access": "{partner} có thể truy cập", - "partner_can_access_assets": "Tất cả ảnh và video của bạn ngoại trừ những ảnh và video trong mục Đã lưu trữ và Đã xóa", + "partner_can_access_assets": "Tất cả ảnh và video của bạn, ngoại trừ mục Đã lưu trữ và Đã xóa", "partner_can_access_location": "Vị trí nơi ảnh của bạn được chụp", "partner_list_user_photos": "Ảnh của {user}", "partner_page_empty_message": "Ảnh của bạn chưa được chia sẻ với người thân nào.", @@ -1596,7 +1621,7 @@ "person": "Mọi người", "person_age_months": "{months, plural, one {# tháng} other {# tháng}} tuổi", "person_age_year_months": "1 năm, {months, plural, one {# tháng} other {# tháng}} tuổi", - "person_age_years": "{years, plural, other {# năm}} tuổi", + "person_age_years": "{years, plural, one {# tuổi} other {# tuổi}}", "person_birthdate": "Sinh vào {date}", "person_hidden": "{name}{hidden, select, true { (đã ẩn)} other {}}", "person_recognized": "Người được nhận diện", @@ -1696,8 +1721,11 @@ "reassing_hint": "Gán các tài nguyên đã chọn cho một người hiện có", "recent": "Gần đây", "recent_searches": "Tìm kiếm gần đây", - "recently_added": "Được thêm gần đây", - "recently_added_page_title": "Được thêm gần đây", + "recently_added": "Thêm gần đây", + "recently_added_body": "Truy cập ngay vào tất cả những gì bạn đã thêm gần đây trên một trang dành riêng.", + "recently_added_description": "Tìm kiếm các tài nguyên của bạn được sắp xếp theo thời gian tải lên Immich", + "recently_added_page_title": "Thêm gần đây", + "recently_added_title": "Thêm gần đây", "recently_taken": "Chụp gần đây", "refresh": "Làm mới", "refresh_encoded_videos": "Làm mới video đã mã hóa", @@ -1719,11 +1747,11 @@ "remove_custom_date_range": "Bỏ chọn khoảng ngày tùy chỉnh", "remove_filter": "Xóa bộ lọc", "remove_from_album": "Xóa khỏi album", - "remove_from_album_action_prompt": "{count} đã gỡ khỏi album", + "remove_from_album_action_prompt": "Đã gỡ ({count}) khỏi album", "remove_from_favorites": "Xóa khỏi mục Yêu thích", - "remove_from_lock_folder_action_prompt": "{count} đã được xóa khỏi thư mục Khóa", - "remove_from_locked_folder": "Xóa khỏi thư mục Khóa", - "remove_from_locked_folder_confirmation": "Bạn có chắc muốn di chuyển ảnh và video này khỏi thư mục Khóa? Chúng sẽ hiện trong thư viện của bạn.", + "remove_from_lock_folder_action_prompt": "Đã xóa {count} khỏi thư mục Bí mật", + "remove_from_locked_folder": "Xóa khỏi thư mục Bí mật", + "remove_from_locked_folder_confirmation": "Bạn có chắc muốn di chuyển ảnh và video này khỏi thư mục Bí mật? Chúng sẽ hiện trong thư viện của bạn.", "remove_from_shared_link": "Xóa khỏi link chia sẻ", "remove_memory": "Xóa kỷ niệm", "remove_photo_from_memory": "Xóa ảnh khỏi kỷ niệm này", @@ -1842,7 +1870,7 @@ "select_all_duplicates": "Chọn tất cả các bản trùng lặp", "select_avatar_color": "Chọn màu ảnh đại diện", "select_count": "{count, plural, one {Chọn #} other {Chọn #}}", - "select_cutoff_date": "Chọn giới hạn thời gian", + "select_cutoff_date": "Chọn mốc thời gian", "select_face": "Chọn khuôn mặt", "select_featured_photo": "Chọn ảnh nổi bật", "select_from_computer": "Chọn từ máy tính", @@ -1890,7 +1918,7 @@ "setting_languages_subtitle": "Thay đổi ngôn ngữ ứng dụng", "setting_notifications_notify_minutes": "{count} phút", "setting_notifications_notify_seconds": "{count} giây", - "setting_notifications_subtitle": "Các loại thông báo", + "setting_notifications_subtitle": "Thiết lập thông báo", "setting_video_viewer_auto_play_subtitle": "Khi mở video", "setting_video_viewer_auto_play_title": "Tự động phát video", "setting_video_viewer_looping_title": "Lặp lại", @@ -1901,9 +1929,11 @@ "setup_pin_code": "Thiết lập mã PIN", "share": "Chia sẻ", "share_dialog_preparing": "Đang xử lý...", - "share_link": "Link chia sẻ", + "share_link": "Chia sẻ link", "share_original": "Chất lượng gốc (lớn)", "share_preview": "Dùng ảnh thu nhỏ (nhỏ)", + "share_quality_body": "Nhấn giữ nút chia sẻ để chọn chất lượng hình ảnh trước khi chia sẻ.", + "share_quality_title": "Chọn chất lượng chia sẻ", "shared": "Đã chia sẻ", "shared_album_activities_input_disable": "Nhận xét hiện đã tắt", "shared_album_activity_remove_content": "Bạn có muốn xóa hoạt động này?", @@ -1915,10 +1945,12 @@ "shared_by_you": "Được chia sẻ bởi bạn", "shared_from_partner": "Ảnh từ {partner}", "shared_intent_upload_button_progress_text": "{current} / {total} Đã tải lên", - "shared_link_app_bar_title": "Liên kết đã chia sẻ", + "shared_link_app_bar_title": "Những link đã chia sẻ", "shared_link_clipboard_copied_massage": "Đã sao chép vào clipboard", "shared_link_create_error": "Tạo liên kết chia sẻ không thành công", "shared_link_custom_url_description": "Truy cập link đã chia sẻ với một URL tùy chỉnh", + "shared_link_custom_url_title": "URL tùy chỉnh", + "shared_link_custom_url_warning": "Cảnh báo: dùng dấu gạch chéo trong URL tùy chỉnh có thể gây ra lỗi.", "shared_link_edit_description_hint": "Nhập mô tả chia sẻ", "shared_link_edit_expire_after_option_day": "1 ngày", "shared_link_edit_expire_after_option_days": "{count} ngày", @@ -1929,7 +1961,7 @@ "shared_link_edit_expire_after_option_months": "{count} tháng", "shared_link_edit_expire_after_option_year": "{count} năm", "shared_link_edit_password_hint": "Nhập mật khẩu chia sẻ", - "shared_link_edit_submit_button": "Cập nhật liên kết", + "shared_link_edit_submit_button": "Cập nhật link", "shared_link_error_server_url_fetch": "Không thể kết nối địa chỉ máy chủ", "shared_link_expires_day": "Hết hạn sau {count} ngày", "shared_link_expires_days": "Hết hạn sau {count} ngày", @@ -1945,7 +1977,7 @@ "shared_link_manage_links": "Quản lý các link đã chia sẻ", "shared_link_options": "Tùy chọn chia sẻ link", "shared_link_password_description": "Bắt buộc để truy cập link chia sẻ này", - "shared_links": "Chia sẻ link", + "shared_links": "Đã chia sẻ", "shared_links_description": "Chia sẻ ảnh và video bằng link", "shared_photos_and_videos_count": "{assetCount, plural, other {# ảnh & video đã chia sẻ.}}", "shared_with_me": "Chia sẻ với tôi", @@ -1961,7 +1993,7 @@ "show_gallery": "Hiển thị thư viện ảnh", "show_hidden_people": "Hiển thị người bị ẩn", "show_in_timeline": "Hiển thị trên dòng thời gian", - "show_in_timeline_setting_description": "Hiển thị ảnh và video từ người dùng này trong dòng thời gian của bạn", + "show_in_timeline_setting_description": "Hiển thị ảnh và video từ người dùng này trên dòng thời gian của bạn", "show_keyboard_shortcuts": "Hiện phím tắt", "show_less": "Hiện ít hơn", "show_metadata": "Hiển thị metadata", @@ -1985,16 +2017,19 @@ "sign_out": "Đăng xuất", "sign_up": "Đăng ký", "size": "Kích thước", + "skip": "Bỏ qua", "skip_to_content": "Chuyển đến nội dung", "skip_to_folders": "Chuyển đến thư mục", "skip_to_tags": "Chuyển đến thẻ", "slideshow": "Trình chiếu", + "slideshow_body": "Hãy thư giãn và xem các bức ảnh của bạn trình chiếu ở chế độ toàn màn hình.", "slideshow_metadata_overlay_mode": "Lớp phủ nội dung", "slideshow_metadata_overlay_mode_description_only": "Chỉ mô tả", "slideshow_metadata_overlay_mode_full": "Đầy đủ", - "slideshow_repeat": "Trình chiếu lại", + "slideshow_repeat": "Lặp lại trình chiếu", "slideshow_repeat_description": "Phát lại từ đầu khi trình chiếu kết thúc", "slideshow_settings": "Cài đặt trình chiếu", + "slideshow_title": "Slideshow", "smart_album": "Album thông minh", "some_assets_already_have_a_location_warning": "Một số tài nguyên được lựa chọn đã có vị trí", "sort_albums_by": "Sắp xếp album theo...", @@ -2007,7 +2042,7 @@ "sort_title": "Tiêu đề", "source": "Mã nguồn", "stack": "Nhóm ảnh", - "stack_action_prompt": "{count} đã được nhóm", + "stack_action_prompt": "Đã nhóm ({count}) tương tự", "stack_duplicates": "Nhóm mục trùng lặp", "stack_selected_photos": "Nhóm các ảnh đã chọn", "stacked_assets_count": "Đã nhóm {count, plural, one {# tài nguyên} other {# tài nguyên}}", @@ -2092,7 +2127,7 @@ "total": "Tổng cộng", "total_usage": "Dung lượng đã dùng", "trash": "Thùng rác", - "trash_action_prompt": "{count} đã chuyển vào thùng rác", + "trash_action_prompt": "Đã chuyển ({count}) vào thùng rác", "trash_all": "Xóa hết", "trash_count": "Xóa {count, number} mục", "trash_delete_asset": "Chuyển vào thùng rác/Xóa tài nguyên", @@ -2113,15 +2148,16 @@ "unable_to_check_version": "Không thể kiểm tra phiên bản ứng dụng hoặc máy chủ", "unable_to_setup_pin_code": "Thiết lập mã PIN thất bại", "unarchive": "Bỏ lưu trữ", - "unarchive_action_prompt": "{count} đã bỏ khỏi Lưu trữ", + "unarchive_action_prompt": "Đã bỏ lưu trữ ({count})", "unarchived_count": "{count, plural, other {Đã bỏ lưu trữ # mục}}", "undo": "Hoàn tác", "unfavorite": "Bỏ thích", - "unfavorite_action_prompt": "{count} đã bỏ khỏi Yêu thích", + "unfavorite_action_prompt": "Đã bỏ yêu thích ({count})", "unhide_person": "Hiện người", "unknown": "Không xác định", "unknown_country": "Quốc gia chưa rõ", "unknown_date": "Dữ liệu không xác định", + "unknown_schema": "Lược đồ không xác định", "unknown_year": "Năm không rõ", "unlimited": "Không giới hạn", "unlink_motion_video": "Hủy liên kết video chuyển động", @@ -2135,7 +2171,7 @@ "unselect_all": "Bỏ chọn tất cả", "unselect_all_duplicates": "Bỏ chọn tất cả các bản trùng lặp", "unstack": "Hủy xếp nhóm", - "unstack_action_prompt": "{count} đã bỏ nhóm", + "unstack_action_prompt": "Đã bỏ tương tự ({count})", "unstacked_assets_count": "Đã hủy xếp nhóm {count, plural, one {# tài nguyên} other {# tài nguyên}}", "unsupported_field_type": "Loại trường không được hỗ trợ", "unsupported_file_type": "Tệp {file} không thể được tải lên vì loại tệp {type} không được hỗ trợ.", @@ -2151,12 +2187,14 @@ "upload_error_with_count": "Không thể tải lên {count, plural, one {# tài nguyên} other {# tài nguyên}}", "upload_errors": "Đã hoàn tất tải lên với {count, plural, one {# lỗi} other {# lỗi}}, làm mới trang để xem các tài nguyên mới tải lên.", "upload_finished": "Đã hoàn tất tải lên", - "upload_progress": "Còn lại {remaining, number} - Đã xử lý {processed, number}/{total, number}", + "upload_progress": "Còn {remaining, number} - Đã xử lý {processed, number}/{total, number}", "upload_skipped_duplicates": "Đã bỏ qua {count, plural, one {# tài nguyên trùng lặp} other {# tài nguyên trùng lặp}}", "upload_status_duplicates": "Trùng lặp", "upload_status_errors": "Lỗi", "upload_status_uploaded": "Đã tải lên", "upload_success": "Tải lên thành công, làm mới trang để xem các tài nguyên mới tải lên.", + "upload_to_album_body": "Đối với những người dùng không sử dụng tính năng tải lên thủ công, giờ đây bạn có thể chọn thêm ảnh từ thiết bị trực tiếp vào album ngay khi tải lên, thay vì phải tải lên rồi mới thêm vào album sau như trước đây.", + "upload_to_album_title": "Tải lên trực tiếp vào album", "upload_to_immich": "Tải lên Immich ({count})", "uploading": "Đang tải lên", "uploading_media": "Đang tải lên phương tiện", @@ -2164,7 +2202,7 @@ "uploads_count": "{count, plural, one {# tải lên} other {# tải lên}}", "url": "URL", "usage": "Sử dụng", - "use_biometric": "Dùng sinh trắc học", + "use_biometric": "Dùng vân tay", "use_browser_locale": "Dùng ngôn ngữ trình duyệt", "use_browser_locale_description": "Định dạng ngày, thời gian và số dựa trên ngôn ngữ trình duyệt", "use_current_connection": "Dùng kết nối hiện tại", @@ -2206,7 +2244,7 @@ "view_all_users": "Xem tất cả người dùng", "view_asset_owners": "Xem chủ sở hữu tài nguyên", "view_details": "Xem thông tin chi tiết", - "view_in_timeline": "Xem trong dòng thời gian", + "view_in_timeline": "Xem trên dòng thời gian", "view_link": "Xem liên kết", "view_name": "Giao diện", "view_next_asset": "Xem tài nguyên tiếp theo", @@ -2224,6 +2262,9 @@ "week": "Tuần", "welcome": "Chào mừng", "welcome_to_immich": "Chào mừng đến với Immich", + "whats_new": "Những điều mới", + "whats_new_settings_subtitle": "Xem Immich có gì mới", + "whats_new_version": "Phiên bản {version}", "when": "Khi nào", "width": "Chiều rộng", "wifi_name": "Tên Wi-Fi", diff --git a/i18n/yue_Hant.json b/i18n/yue_Hant.json index eae47fb625..0d79c8a89a 100644 --- a/i18n/yue_Hant.json +++ b/i18n/yue_Hant.json @@ -45,7 +45,7 @@ "authentication_settings": "驗證設定", "authentication_settings_description": "管理密碼、OAuth 同其他驗證設定", "authentication_settings_disable_all": "你確定你要停用所有登入嘅方式嗎?你會完全冇辦法登入。", - "authentication_settings_reenable": "如果你要重新啟用嘅話,請使用伺服器指令。", + "authentication_settings_reenable": "如果你要重新啟用嘅話,請使用 伺服器指令。", "background_task_job": "背景操作", "backup_database": "建立資料庫備份", "backup_database_enable_description": "啟用資料庫備份", @@ -53,8 +53,8 @@ "backup_onboarding_1_description": "係雲端或者其他實體地方建立嘅備份副本。", "backup_onboarding_2_description": "儲存係唔同裝置嘅本地副本。包含主要嘅檔案同埋喺本機嘅備份。", "backup_onboarding_3_description": "資料包含原始文件,總共備份嘅次數。呢個包括1份異地嘅備份同埋2份本機副本。", - "backup_onboarding_description": "我哋建議你使用嘅3-2-1備份嚟保障你嘅資料。為咗可以全方位地備份你嘅資料,你應該保留已經上傳嘅相/影片嘅副本,同埋Immich嘅資料庫,。", - "backup_onboarding_footer": "有關其他Immich備份嘅資料,請參考說明文件。", + "backup_onboarding_description": "建議你使用 3-2-1備份原則 嚟保護你嘅數據。你應該備份已經上傳嘅相,影片同埋 Immich 嘅數據庫令到你嘅資料更加被保障。", + "backup_onboarding_footer": "有關其他Immich備份嘅資料,請參考 說明文件。", "backup_onboarding_parts_title": "一個3-2-1備份包括:", "backup_onboarding_title": "備份", "backup_settings": "資料庫備份嘅設定", @@ -108,6 +108,21 @@ "image_thumbnail_quality_description": "縮圖品質(1-100)。數值越高畫質越好,但係檔案更加大,而且可能降低應用嘅回應速度。", "image_thumbnail_title": "縮圖設定", "import_config_from_json_description": "透過上傳 JSON 設定嚟導入系統設定", + "integrity_checks_checksum_files": "校驗檔案", + "integrity_checks_checksum_files_description": "設定校驗同檢查", + "integrity_checks_checksum_files_enable_description": "啟用校驗同埋檢查", + "integrity_checks_checksum_files_percentage_limit": "百分比限制", + "integrity_checks_checksum_files_percentage_limit_description": "設定每個檢查檢驗所執行,從 0.01 到 1 之間嘅最大百分比。", + "integrity_checks_checksum_files_time_limit": "時間限制", + "integrity_checks_checksum_files_time_limit_description": "設定每個檢查中,檢查嘅最長執行時間。(毫秒)", + "integrity_checks_missing_files": "遺失嘅檔案", + "integrity_checks_missing_files_description": "設定執行頻率同埋啟用或者停用遺失檔案檢查", + "integrity_checks_missing_files_enable_description": "啟用遺失檔案檢查", + "integrity_checks_settings": "完整性檢查", + "integrity_checks_settings_description": "管理完整性檢查嘅間隔", + "integrity_checks_untracked_files": "未追蹤嘅檔案", + "integrity_checks_untracked_files_description": "設定頻率,並且啟用或者停用未追蹤嘅檔案檢查", + "integrity_checks_untracked_files_enable_description": "啟用未追蹤檔案嘅檢查", "job_concurrency": "{job} 並行數", "job_created": "建立咗任務", "job_not_concurrency_safe": "呢個任務唔支援並行執行。", @@ -366,7 +381,7 @@ "template_settings": "通知範本", "template_settings_description": "管理通知個自訂範本", "theme_custom_css_settings": "自訂 CSS", - "theme_custom_css_settings_description": "透過階層式樣式表 (CSS) 可以自訂 Immich 嘅外觀設計。", + "theme_custom_css_settings_description": "透過階層式樣式表 () 可以自訂 Immich 嘅外觀設計。", "theme_settings": "主題設定", "theme_settings_description": "自訂 Immich 網頁介面", "thumbnail_generation_job": "產生縮圖", @@ -416,6 +431,10 @@ "transcoding_realtime_description": "允許喺影片串流播放嘅同時即時進行轉碼。呢個功能支援動態切換畫質,但係可能會因為伺服器嘅效能而導致較高嘅播放延遲或斷斷續續嘅畫面。", "transcoding_realtime_enabled": "啟用即時轉碼", "transcoding_realtime_enabled_description": "如果停用,伺服器將會拒絕啟動新嘅即時轉碼工作階段。", + "transcoding_realtime_resolutions": "解像度", + "transcoding_realtime_resolutions_description": "實時轉碼所提供嘅解像度選項。更加高嘅解像度喺伺服器轉碼轉唔切嘅情況下可能會導致播放問題。", + "transcoding_realtime_video_codecs": "影片編解碼器", + "transcoding_realtime_video_codecs_description": "呢個係用喺實時轉碼嘅影片解碼器選項。用戶端會喺播放嘅時候選擇佢支持嘅最佳選項。AV1 嘅效率會高過 HEVC,而 HEVC 嘅效率又會高過 H.264。 喺使用硬體加速嘅時候淨係要選擇加速器支援嘅解碼器。使用軟件解碼嘅時候,H.264 嘅速度會快過 AV1, 而 AV1 嘅速度會快過 HEVC。", "transcoding_reference_frames": "參考幀", "transcoding_reference_frames_description": "喺壓縮特定幀嘅時候所參考嘅幀數量。數值越高可以提升壓縮嘅效率,但係會降低編碼嘅速度。設為 0 則自動決定此數值。", "transcoding_required_description": "只係限於格式唔被接受嘅影片", @@ -446,6 +465,20 @@ "user_cleanup_job": "清理用戶", "user_delete_delay": "{user} 嘅帳號同埋佢所有資料會喺 {delay, plural, one {# 日} other {# 🌞}} 後永久刪除。", "user_delete_delay_settings": "延遲刪除", + "user_delete_delay_settings_description": "移除後永久刪除用戶帳號同埋文件嘅日數。用戶刪除嘅工作會喺午夜檢查需要刪除嘅帳號。呢個設定嘅任何更改會喺下次執行嘅時候生效。", + "user_delete_immediately": "{user} 嘅帳號同埋資料將會 立即 永久刪除。", + "user_delete_immediately_checkbox": "立即將用戶同埋佢嘅文件加入立即刪除嘅隊伍", + "user_details": "用戶詳情", + "user_management": "用户管理", + "user_password_has_been_reset": "用戶嘅密碼已重設:", + "user_password_reset_description": "請將臨時密碼比嗰個使用者,同埋同佢哋講喺下次登入嘅時候需要更改密碼。", + "user_restore_description": "{user} 嘅帳號將會被還原。", + "user_restore_scheduled_removal": "還原使用者 - 取消預定喺 {date, date, long} 嘅移除計畫", + "user_settings": "用户設定", + "user_settings_description": "管理用户設定", + "user_successfully_removed": "用戶 {email}已成功刪除。", + "users_page_description": "管理用户頁面", + "version_check_channel": "更新發佈渠道", "version_check_channel_description": "揀選你接收版本更新公告嘅發布渠道", "version_check_enabled_description": "啟用版本檢查", "version_check_implications": "版本檢查功能依賴同 {server} 嘅定期通訊", @@ -515,87 +548,1097 @@ "alt_text_qr_code": "QR code 圖片", "always_keep": "一律保留", "always_keep_photos_hint": "「釋放空間」功能會將所有相片保留喺呢個裝置上。", + "always_keep_videos_hint": "「釋放空間」功能會將所有影片保留喺呢個裝置上面。", + "api_key": "API 密匙", + "api_key_description": "呢個密匙只係會顯示一次。關閉視窗前唔該一定要先複製密匙。", + "api_key_empty": "API 密匙個名唔可以空白", + "api_keys": "API 密匙", + "app_architecture_variant": "變體(架構)", + "app_bar_signout_dialog_content": "你係唔係確定要登出?", + "app_bar_signout_dialog_title": "登出", + "app_download_links": "App 下載連結", + "app_settings": "應用程式設定", + "app_stores": "應用程式商店", + "app_update_available": "已有應用程式更新", + "appears_in": "出現喺", + "apply_count": "套用 ({count, number})", + "archive": "封存", + "archive_action_prompt": "已將 {count} 個項目封存", + "archive_or_unarchive_photo": "封存或者取消封存相片", + "archive_size": "封存大細", + "archive_size_description": "設定封存下載嘅檔案大細(GiB)", "archived": "已封存", + "archived_count": "{count, plural, other {封存咗#件}}", + "are_these_the_same_person": "呢幾個係唔係同一個人?", + "are_you_sure_to_do_this": "你係唔係確定要咁做?", + "asset_added_to_album": "已經加咗落相簿度", + "asset_adding_to_album": "加緊落相簿度…", + "asset_created": "已創立項目", + "asset_day_count": "{date}: {count, plural, one {# 個項目} other {# 個項目}}", + "asset_description_updated": "項目嘅描述更新咗啦", "asset_hashing": "正在計算雜湊…", + "asset_list_group_by_sub_title": "點樣分類", + "asset_list_layout_settings_group_by": "項目點樣分類", + "asset_list_layout_settings_group_by_month_day": "月份 + 日期", "asset_list_layout_sub_title": "版面", + "asset_list_settings_subtitle": "相片網格版面設定", + "asset_list_settings_title": "相片網格", + "asset_not_found_on_device_android": "裝置上面搵唔到項目", + "asset_not_found_on_device_ios": "裝置上面搵唔到呢個項目。如果你用緊 iCloud,可能喺因為 iCloud 入面擺咗損毀咗嘅文件而導致項目存取唔到", + "asset_not_found_on_icloud": "iCloud入面搵唔到呢個項目。可能喺因為iCloud入面擺咗損毀嘅文件導致項目冇辦法存取", + "asset_offline": "項目唔在線", + "asset_offline_description": "硬碟上面搵唔到呢個外部文件。唔該聯絡你個 Immich 管理員叫佢幫手。", "asset_skipped": "已跳過", + "asset_skipped_in_trash": "喺垃圾桶入面", + "asset_troubleshoot": "文件診斷", "asset_uploaded": "已上傳", "asset_uploading": "上傳中…", + "asset_viewer_settings_subtitle": "管理您嘅媒體庫檢視器設定", + "asset_viewer_settings_title": "文件查閱器", "assets": "項目", + "assets_added_to_album_count": "加咗 {count, plural, one {# 件項目} other {# 件項目}} 入去呢個相簿入面", + "assets_added_to_album_partial_count": "已經成功將 {totalCount}{totalCount, plural, one {件項目} other {件項目}}入面嘅 {successCount} 件加入相簿", + "assets_added_to_albums_count": "加咗 {assetTotal, plural, one {# 件項目} other {# 件項目}} 入 {albumTotal, plural, one {# 個相簿} other {# 個相簿}} 入面", + "assets_cannot_be_added_to_album_count": "加唔到 {count, plural, one {件項目} other {件項目}} 入相簿入面", + "assets_cannot_be_added_to_albums": "冇辦法加 {count, plural, one {件項目} other {件項目}} 入去任何嘅相簿入面", + "assets_count": "{count, plural, one {#件項目} other {#件項目}}", + "assets_moved_to_trash_count": "揼咗 {count, plural, one {# 件項目} other {# 件項目}} 入垃圾桶入面", + "assets_permanently_deleted_count": "永久刪除咗 {count, plural, one {# 件項目} other {# 件項目}}", + "assets_removed_count": "移除咗 {count, plural, one {# 件項目} other {# 件項目}}", + "assets_restore_confirmation": "你係唔係要恢復垃圾桶入面嘅所有項目?呢個動作喺冇得收返嘅!任何離線嘅項目唔可以咁樣恢復。", + "assets_restored_count": "恢復咗 {count, plural, one {# 件項目} other {# 件項目}}", + "assets_trashed": "{count}件項目揼咗落垃圾桶", + "assets_trashed_count": "揼咗 {count, plural, one {# 件項目} other {# 件項目}} 入垃圾桶入面", + "assets_were_part_of_album_count": "{count, plural, one {件項目} other {件項目}}已經喺嗰個相簿入面", + "assets_were_part_of_albums_count": "{count, plural, one {件項目} other {件項目}} 已經喺相簿入面", + "authorized_devices": "已授權嘅裝置", + "automatic_endpoint_switching_subtitle": "喺用到嘅時候透過指定嘅 Wi-Fi 本地連接,喺其他地方用其他替代嘅網絡", + "automatic_endpoint_switching_title": "自動切換 URL", + "autoplay_slideshow": "自動播放圖片", "back": "上一頁", + "back_close_deselect": "返回,關閉或者取消選擇", + "background_location_permission": "後台定位嘅權限", + "background_location_permission_content": "為咗可以喺後台行緊嗰陣時換網絡,Immich喺任何時間都一定要有精確位置嘅權限,咁個程式先可以讀取你用緊 Wi-Fi 個名", + "background_options": "後台選項", "backup": "備份", + "backup_album_selection_page_albums_tap": "一撳包括,雙撳排除", + "backup_album_selection_page_assets_scatter": "項目可以分散喺幾個相簿入面。所以喺備份個過程入面可以包含或者排除某啲相簿。", + "backup_album_selection_page_select_albums": "揀相簿", + "backup_album_selection_page_selection_info": "選擇資料", + "backup_albums_sync": "備份相簿同步", + "backup_background_service_complete_notification": "項目備份完成", + "backup_background_service_default_notification": "搵緊新項目…", + "backup_background_service_in_progress_notification": "備份緊您嘅項目…", + "backup_controller_page_albums": "備份相簿", + "backup_controller_page_background_battery_info_link": "話我知點做", + "backup_controller_page_background_battery_info_message": "為獲得最好嘅背景備份體驗,請停用任何會限制 Immich 背景活動嘅電池最佳化設定。\n\n由於佢同裝置型號相關,請查詢您裝置製造商嘅相關說明。", "backup_controller_page_background_battery_info_ok": "OK", + "backup_controller_page_background_battery_info_title": "電池最佳化", + "backup_controller_page_background_delay": "新項目備份延遲:{duration}", "backup_controller_page_backup": "備份", "backup_controller_page_backup_selected": "已選取: ", + "backup_controller_page_backup_sub": "備份咗嘅相片同影片", "backup_controller_page_excluded": "已排除: ", + "backup_controller_page_none_selected": "未選取任何項目", "backup_controller_page_remainder": "剩餘", + "backup_controller_page_remainder_sub": "選取項目中未備份嘅相片同影片", + "backup_controller_page_server_storage": "伺服器儲存空間", + "backup_controller_page_storage_format": "用咗 {used} / {total}", + "backup_controller_page_to_backup": "要備份嘅相簿", + "backup_controller_page_total_sub": "你揀嘅相簿入面所有獨特嘅相片同埋影片", + "backup_error_sync_failed": "同步失敗。處理唔到備份。", "backup_info_card_assets": "個項目", + "backup_options": "備份選項", + "backup_settings_subtitle": "管理上傳嘅設定", "backward": "由舊至新", + "battery_optimization_backup_reliability": "閂咗電池最佳化可以提高後台備份嘅可靠性", + "biometric_auth_enabled": "生物識別已啟用", + "biometric_locked_out": "你被鎖定無法使用生物識別", + "biometric_no_options": "無可以用到嘅生物識別選項", + "biometric_not_available": "呢個裝置唔支持生物識別", + "birthdate_set_description": "出生日期喺攞嚟計喺影呢張相嗰陣時呢個人個歲數。", + "blurred_background": "背景模糊化", + "browse_templates": "瀏覽樣板", + "bugs_and_feature_requests": "問題同功能建議", "build": "建置編號", + "build_image": "映像版本", + "bulk_delete_duplicates_confirmation": "你係唔係確定要一次過刪除呢{count, plural, one {#個} other {#個}}重複嘅項目?呢個會保留每組入面體積最大嘅項目,同埋永久刪除其他所有重複嘅項目。刪除咗之後喺冇得撤回嘅!", + "bulk_keep_duplicates_confirmation": "你係唔係確定要保留{count}個重複項目?呢個動作將會標記所有嘅重複項目為已解決,而且唔會刪除任何嘅項目。", + "bulk_trash_duplicates_confirmation": "你係唔係確定要將呢一批{count}個重複嘅項目移到垃圾桶?呢個動作會保留每組入面體積最大嘅項目,並且將其他所有重複嘅項目搬到垃圾桶。", + "buy": "購買 Immich", "camera": "相機", + "camera_brand": "相機品牌", + "camera_model": "相機型號", "cancel": "取消", + "cancel_search": "取消搜尋", "canceled": "已取消", "canceling": "取消中", + "cannot_merge_people": "合併唔到人物", + "cannot_undo_this_action": "呢個動作冇辦法撤回!", + "cannot_update_the_description": "更新唔到描述", "cast": "投放", + "cast_description": "設定可用嘅投影裝置", + "change": "更改", + "change_date": "更改日期", + "change_description": "更改描述", + "change_display_order": "更改顯示次序", + "change_location": "更改位置", + "change_name": "更改名稱", + "change_name_successfully": "成功更改名稱", + "change_password": "更改密碼", + "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": "改 PIN 碼", + "change_your_password": "更改您嘅密碼", + "changed_visibility_successfully": "已成功變更咗可見性", "charging": "叉緊電", + "charging_requirement_mobile_backup": "背景備份需要裝置充著電", + "check_logs": "檢查紀錄", + "checksum": "校驗碼", + "choose": "揀", + "choose_matching_people_to_merge": "選擇要合併嘅相符人物", "city": "城市", + "cleanup_confirm_description": "Immich 發現有 {count} 個項目(建立於 {date} 之前)已安全備份咗至伺服器。係咪要從此裝置中刪除本機副本?", + "cleanup_confirm_prompt_title": "從此裝置刪除?", + "cleanup_deleted_assets": "已將 {count} 個項目移到裝置嘅垃圾桶", + "cleanup_deleting": "正在移動到垃圾桶...", + "cleanup_found_assets": "找到 {count} 件已上傳嘅項目", + "cleanup_found_assets_with_size": "找到 {count} 件,總共 ({size}) 已上傳嘅項目", + "cleanup_icloud_shared_albums_excluded": "iCloud 共享相簿被排除於搜尋之外", + "cleanup_no_assets_found": "搵唔到符合上述條件嘅項目。釋放空間功能只能移除已備份至伺服器嘅項目", + "cleanup_preview_title": "{count} 項需要移除嘅項目", + "cleanup_step3_description": "掃描符合日期與儲存設定嘅已備份項目。", + "cleanup_step4_summary": "將從此裝置移除 {count} 個建立於 {date} 之前嘅項目。您仍可透過 Immich 應用程式存取呢啲相片。", + "cleanup_trash_hint": "若要徹底釋放儲存空間,請開啟系統相簿 App 清空垃圾桶", "clear": "清空", + "clear_all": "全部清除", + "clear_all_recent_searches": "清除所有最近嘅搜尋", + "clear_failed_count": "清除失敗 ({count})", + "clear_file_cache": "清除檔案快取", + "clear_message": "清除訊息", + "clear_value": "清除值", "client_cert_import": "導入", + "client_cert_import_success_msg": "匯入咗用戶端憑證", + "client_cert_invalid_msg": "無效嘅憑證檔案或密碼錯誤", + "client_cert_password_message": "請輸入此憑證嘅密碼", + "client_cert_password_title": "憑證密碼", + "client_cert_remove_msg": "移除咗用戶端憑證", + "client_cert_subtitle": "淨係支援 PKCS12 (.p12, .pfx) 格式。可以係登入前匯入或移除憑證", + "client_cert_title": "SSL 用戶端憑證 [實驗性]", "close": "閂", "collapse": "收埋", + "collapse_all": "全部折疊", "color": "顏色", + "command": "命令", + "command_palette_prompt": "快速搵頁面、動作或指令", + "command_palette_to_close": "關閉", + "command_palette_to_navigate": "輸入", + "command_palette_to_select": "選擇", + "command_palette_to_show_all": "全部顯示", + "comment_deleted": "留言已刪除", + "comment_options": "留言選項", + "comments_and_likes": "留言及喜歡", + "comments_are_disabled": "留言已停用", + "common_create_new_album": "建立新相簿", "completed": "搞掂", + "configuration": "設定", "confirm": "確認", + "confirm_admin_password": "確認管理員密碼", + "confirm_delete_face": "您係咪確定要從該項目中刪除 {name} 嘅面孔?", + "confirm_delete_shared_link": "您係咪確定要刪除此分享連結?", + "confirm_keep_this_delete_others": "除此項目外,堆疊中嘅其他項目都將會被刪除。您係咪確定要繼續?", + "confirm_new_pin_code": "確認新 PIN 碼", + "confirm_password": "確認密碼", + "confirm_tag_face": "您係咪想將呢塊面孔標籤為 {name} ?", + "confirm_tag_face_unnamed": "您係咪想標籤呢塊面孔?", + "connected_device": "已連線裝置", + "connected_to": "已連線至", "contain": "等比內縮", + "context": "脈絡", "continue": "繼續", + "control_bottom_app_bar_add_tags": "新增標籤", + "control_bottom_app_bar_delete_from_local": "從裝置中刪除", + "control_bottom_app_bar_edit_location": "編輯位置資料", + "control_bottom_app_bar_edit_time": "編輯日期與時間", + "control_bottom_app_bar_trash_from_immich": "移到垃圾桶", + "copied_image_to_clipboard": "已將圖片複製到剪貼簿。", + "copied_to_clipboard": "已複製到剪貼簿!", + "copy_error": "複製錯誤", + "copy_image": "複製圖片", + "copy_json": "複製 JSON", + "copy_link": "複製連結", + "copy_link_to_clipboard": "複製連結到剪貼簿", + "copy_password": "複製密碼", + "copy_to_clipboard": "複製到剪貼簿", "country": "國家", "cover": "填滿", "covers": "封面", "create": "建立", + "create_album": "建立相簿", "create_album_page_untitled": "未命名", + "create_api_key": "建立 API 金鑰", + "create_first_workflow": "建立第一個工作流程", + "create_library": "建立媒體庫", + "create_link": "建立連結", + "create_link_to_share": "建立共享連結", + "create_link_to_share_description": "比任何有連結嘅人查閱所揀嘅相", + "create_new": "新增", + "create_new_person": "建立新嘅人物", + "create_new_person_hint": "將選取嘅項目指派俾新嘅人物", + "create_new_user": "建立新使用者", + "create_person": "建立人物", + "create_person_subtitle": "為所選嘅面孔命名以新增同標記新人物", + "create_shared_album_page_share_add_assets": "新增項目", + "create_shared_album_page_share_select_photos": "選取相片", + "create_shared_link": "建立分享連結", + "create_tag": "建立標籤", + "create_tag_description": "建立新標籤。如果要建立巢狀標籤,請輸入包含正斜線嘅完整標籤路徑。", + "create_user": "建立使用者", + "create_workflow": "建立工作流程", + "created": "建立於", + "created_at": "建立於", + "creating_linked_albums": "建立連結相簿 ...", + "crop": "裁剪", + "crop_aspect_ratio_free": "自由比例", + "crop_aspect_ratio_original": "原檔", + "crop_aspect_ratio_square": "方形", + "current_device": "目前裝置", + "current_pin_code": "目前 PIN 碼", + "current_server_address": "目前嘅伺服器位址", + "custom_date": "另揀日期", + "custom_locale": "自訂地區設定", + "custom_locale_description": "根據選定語言同地區格式化日期、時間與數字", + "cutoff_date_description": "保留最近幾多日嘅相片…", + "cutoff_day": "{count, plural, one {日} other {日}}", + "cutoff_year": "{count, plural, one {年} other {年}}", + "dark": "深色", + "dark_theme": "切換至深色主題", + "date": "日期", + "date_after": "開始日期", + "date_and_time": "日期與時間", + "date_before": "結束日期", + "date_of_birth": "出生日期", + "date_of_birth_saved": "出生日期成功保存", + "date_range": "日期範圍", + "date_time_original": "原始日期/時間", + "day": "日", + "days": "日", + "deduplicate_all": "刪除所有嘅重複項目", + "default_quality_subtitle": "分享嗰陣用嘅畫質。長㩒分享掣可以每次手動自己揀。", + "default_share_quality": "預設分享畫質", "delete": "刪除", + "delete_action_confirmation_message": "你係唔係確定要刪除呢個項目?呢個動作會將呢個項目揼落伺服器嘅垃圾桶,並且會問你係唔係要係本地裝置上面刪除", + "delete_action_prompt": "已經刪除 {count} 項", + "delete_album": "刪除相簿", + "delete_api_key_prompt": "你係唔係確定要移除呢個 API 密匙?", + "delete_dialog_alert": "呢啲項目會喺 Immich 伺服器同埋你嘅裝置上面永久刪除", + "delete_dialog_alert_local": "呢啲項目將會喺你嘅裝置上面永久咁刪除,但係依然會保留喺 Immich 伺服器上面", + "delete_dialog_alert_local_non_backed_up": "部分嘅項目仲未備份到 Immich 嗰度,喺裝置上面刪除後將會永久消失", + "delete_dialog_title": "永久刪除", + "delete_duplicates_confirmation": "你係唔係確定要永久刪除呢啲重複嘅項目?", + "delete_face": "刪除嗰塊面", + "delete_key": "刪除密匙", + "delete_library": "刪除資料庫", + "delete_link": "刪除連結", + "delete_local_action_prompt": "已喺本機刪除咗 {count} 個項目", + "delete_local_dialog_ok_backed_up_only": "刪除淨係備份咗嘅項目", + "delete_local_dialog_ok_force": "確認刪除", + "delete_others": "刪除其他", + "delete_permanently": "永久刪除", + "delete_permanently_action_prompt": "永久刪除咗 {count} 個項目", + "delete_shared_link": "刪除分享連結", + "delete_shared_link_dialog_title": "刪除分享連結", + "delete_tag": "刪除標籤", + "delete_tag_confirmation_prompt": "您係咪確定要刪除「{tagName}」標籤?", + "delete_user": "刪除使用者", + "deleted_shared_link": "已刪除咗共享連結", "description": "描述", + "deselect_all": "取消全選", + "details": "詳細資料", + "direction": "方向", + "disable": "停用", + "disabled": "停用咗", + "discord": "Discord", + "discover": "探索", + "discovered_devices": "已發現嘅裝置", + "dismiss_all_errors": "忽略所有錯誤", + "display_options": "顯示選項", + "display_order": "顯示順序", + "display_original_photos": "顯示原始相片", + "display_original_photos_setting_description": "檢視時如果原始檔案支援網頁格式,優先顯示原圖而非縮圖。呢個選項可能會降低載入嘅速度。", + "do_not_show_again": "唔好再顯示呢個訊息", + "documentation": "說明文件", + "done": "完成", + "download": "下載", + "download_canceled": "下載取消咗", + "download_complete": "下載咗", + "download_enqueue": "已加入下載", + "download_failed": "下載唔到", + "download_finished": "下載咗", + "download_include_embedded_motion_videos": "嵌入影片", + "download_include_embedded_motion_videos_description": "將動態相片裏面內嵌嘅影片儲存為獨立檔案", + "download_notfound": "搵唔到下載項目", + "download_original": "下載原始項目", + "download_paused": "下載已經暫停", + "download_settings": "下載", + "download_settings_description": "管理同項目下載相關嘅設定", + "download_waiting_to_retry": "等待重試", + "downloading": "下載緊", + "downloading_asset_filename": "下載緊 {filename}", + "downloading_from_icloud": "從 iCloud 嗰度下載", + "downloading_media": "下載緊媒體", + "drag_to_reorder": "拖動嚟重新排列", + "drop_files_to_upload": "求其拖放文件嚟上傳", + "duplicate": "複製", + "duplicate_workflow": "複製工作流程", + "duplicates": "重複項目", + "duplicates_description": "請逐一標示每組入面嘅重複項目。", + "duration": "時長", + "edit": "編輯", + "edit_album": "編輯相簿", + "edit_avatar": "編輯頭像", + "edit_birthday": "編輯生日", + "edit_date": "編輯日期", + "edit_date_and_time": "編輯日期同埋時間", + "edit_date_and_time_action_prompt": "已編輯 {count} 樣日期時間", + "edit_date_and_time_by_offset": "按偏移嚟調整日期", + "edit_description": "修改描述", + "edit_exclusion_pattern": "編輯排除模式", + "edit_faces": "編輯人面", + "edit_key": "編輯 API 密匙", + "edit_link": "編輯連結", + "edit_location": "編輯位置", + "edit_location_action_prompt": "已編輯 {count} 個位置", + "edit_location_dialog_title": "位置", + "edit_name": "編輯名", + "edit_people": "編輯人物", + "edit_tag": "編輯標籤", + "edit_title": "編輯標題", + "edit_user": "編輯用戶", + "edit_workflow": "編輯工作流程", + "editor": "編輯器", + "editor_discard_edits_confirm": "放棄編輯", + "editor_discard_edits_prompt": "你有未保存嘅修改,你係唔係確定要揼咗佢?", + "editor_discard_edits_title": "係唔係確定放棄修改?", + "editor_edits_applied_error": "加唔到你嘅修改", + "editor_edits_applied_success": "已成功修改", + "editor_flip_horizontal": "水平翻轉", + "editor_flip_vertical": "垂直翻轉", + "editor_handle_corner": "{corner, select, top_left {左上角} top_right {右上角} bottom_left {左下角} bottom_right {右下角} other {其中一個}}角落的控制手柄", + "editor_handle_edge": "{edge, select, top {頂部} bottom {底部} left {左側} right {右側} other {其中一個}} 邊緣的控制手柄", + "editor_orientation": "方向", + "editor_reset_all_changes": "重設變更", + "editor_rotate_left": "逆時針旋轉 90 度", + "editor_rotate_right": "順時針旋轉 90 度", + "email": "電郵", + "email_notifications": "電郵通知", + "empty_folder": "呢個文件夾係空嘅", + "empty_trash": "清空垃圾桶", + "empty_trash_confirmation": "您係咪確定要清空垃圾桶?將會從 Immich 永久移除垃圾桶裡面所有嘅項目。\n無得還原呢個動作!", + "enable": "啟用", + "enable_backup": "啟用備份", + "enable_biometric_auth_description": "輸入您的 PIN 碼以啟用生物辨識驗證", "enabled": "已啟用", + "end_date": "結束日期", "enqueued": "已排入隊列", + "enter_wifi_name": "輸入 Wi-Fi 名", + "enter_your_pin_code": "輸入您嘅 PIN 碼", + "enter_your_pin_code_subtitle": "輸入您嘅 PIN 碼存取已上鎖嘅資料夾", "error": "錯誤", + "error_delete_face": "從項目刪除面孔時出錯", + "error_loading_albums": "載入相簿時出錯", + "error_loading_image": "圖片載入出錯", + "error_loading_partners": "載入親友時出錯:{error}", + "error_retrieving_asset_information": "攞唔到項目資料", + "error_saving_image": "錯誤:{error}", + "error_tag_face_bounding_box": "標記面孔出錯 - 無法取得邊界框坐標", + "error_title": "出錯 - 有問題", + "error_while_navigating": "瀏覽唔到去項目", + "errors": { + "cannot_navigate_next_asset": "瀏覽唔到至下一個項目", + "cannot_navigate_previous_asset": "瀏覽唔到去上個項目", + "cant_apply_changes": "套用唔到變更", + "cant_change_activity": "{enabled, select, true {停用} other {啟用}}唔到活動", + "cant_change_asset_favorite": "改唔到項目嘅收藏狀態", + "cant_change_metadata_assets_count": "改唔到 {count, plural, other {# 個項目}} 嘅詮釋資料", + "cant_get_faces": "攞唔到面孔", + "cant_get_number_of_comments": "攞唔到留言數量", + "cant_search_people": "搵唔到人物", + "cant_search_places": "搵唔到地方", + "error_adding_assets_to_album": "將項目加入相簿時出錯", + "error_adding_users_to_album": "將使用者加入相簿時出錯", + "error_deleting_shared_user": "刪除共享使用者時出錯", + "error_downloading": "下載 {filename} 時出錯", + "error_hiding_buy_button": "隱藏購買按鈕時出錯", + "error_removing_assets_from_album": "喺相簿移除項目時出錯,請檢查主控台去了解詳細資訊", + "error_selecting_all_assets": "選取所有檔案時出錯", + "exclusion_pattern_already_exists": "呢個排除模式已存在。", + "failed_to_create_album": "建立唔到相簿", + "failed_to_create_shared_link": "建立唔到分享連結", + "failed_to_edit_shared_link": "編輯唔到分享連結", + "failed_to_get_people": "攞唔到人物", + "failed_to_keep_this_delete_others": "保留唔到呢個項目同刪除唔到其他項目", + "failed_to_load_asset": "載入唔到項目", + "failed_to_load_assets": "載入唔到項目", + "failed_to_load_notifications": "載入唔到通知", + "failed_to_load_people": "載入唔到人物", + "failed_to_remove_product_key": "移除唔到產品金鑰", + "failed_to_reset_pin_code": "重設唔到 PIN 碼", + "failed_to_stack_assets": "堆疊唔到項目", + "failed_to_tag_assets": "標記唔到資源", + "failed_to_unstack_assets": "解除唔到項目堆疊", + "failed_to_update_notification_status": "更新唔到通知狀態", + "incorrect_email_or_password": "電子郵件或密碼唔岩", + "library_folder_already_exists": "呢個匯入路徑已存在。", + "page_not_found": "搵唔到到頁面", + "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": "新增唔到留言", + "unable_to_add_exclusion_pattern": "新增唔到排除模式", + "unable_to_add_partners": "新增唔到親友", + "unable_to_add_remove_archive": "項目{archived, select, true {移唔走} other {加唔到入}}封存", + "unable_to_add_remove_favorites": "喺收藏入面{favorite, select, true {加唔到} other {刪除唔到}}個項目", + "unable_to_archive_unarchive": "{archived, select, true {封存} other {封存取消}}唔到", + "unable_to_change_album_user_role": "改唔到相簿用戶嘅角色", + "unable_to_change_date": "改唔到日期", + "unable_to_change_description": "改唔到描述", + "unable_to_change_favorite": "改唔到項目嘅收藏狀態", + "unable_to_change_location": "改唔到位置", + "unable_to_change_password": "改唔到密碼", + "unable_to_change_visibility": "改唔到 {count} 個人嘅可見性", + "unable_to_complete_oauth_login": "完成唔到 OAuth 登入", + "unable_to_connect": "無法連線", + "unable_to_delete_user": "刪除唔到用戶", + "unable_to_delete_workflow": "刪除唔到工作流程", + "unable_to_download_files": "下載唔到文件" + }, + "errors_text": "錯誤", + "exclusion_pattern": "排除模式", "exif": "Exif", + "exif_bottom_sheet_description": "加描述...", + "exif_bottom_sheet_no_description": "冇描述", + "exit_slideshow": "離開幻燈片", + "expand": "展開", + "expand_all": "展開晒", + "expire_after": "幾時失效", "expired": "過咗期", + "expires_date": "喺 {date} 過期", "explore": "探索", "explorer": "總覽", "export": "匯出", + "export_database": "匯出資料庫", + "exposure_time": "曝光時間", "extension": "副檔名", "external": "外部", + "external_libraries": "外部媒體庫", + "external_network": "外部網絡", + "f_number": "光圈", "face_unassigned": "未指派", "failed": "失敗", + "failed_count": "失敗咗 {count} 次", "favorite": "收藏", "favorites": "收藏夾", "features": "功能", + "file_name_text": "檔案名", + "file_size": "檔案大細", "filename": "檔案名", "filetype": "檔案類型", + "filter": "篩選", + "filter_people": "篩選人物", + "filter_places": "篩選地點", + "filter_tags": "篩選標籤", + "filters": "篩選器", + "first": "第一個", + "focal_length": "焦距", + "folder": "資料夾", + "folders": "資料夾", + "forward": "由新到舊", + "gcast_enabled": "Google Cast", + "general": "一般", + "get_help": "搵幫手", + "getting_started": "開始使用", + "go_back": "返去", + "gps": "GPS", + "gps_missing": "冇 GPS", + "grant_permission": "授權", + "group_no": "唔分組", + "haptic_feedback_title": "震動回應", + "has_quota": "設定配額", + "hash_asset": "雜湊項目", + "hashed_assets": "雜湊咗嘅項目", + "hashing": "計緊雜湊值", + "header_settings_add_header_tip": "加標頭", + "header_settings_header_name_input": "標頭名", + "header_settings_header_value_input": "標頭值", + "height": "高度", + "hide_gallery": "隱藏相簿", + "hide_password": "遮住密碼", + "hide_person": "隱藏人物", + "hide_schema": "隱藏架構", + "host": "主機", + "hour": "鐘頭", + "hours": "鐘頭", + "id": "ID", + "idle": "閒置", + "image": "相", + "immich_logo": "Immich Logo", + "import_path": "導入路徑", + "in_archive": "封存咗", + "in_year": "{year}年", + "in_year_selector": "喺", + "include_archived": "包含封存咗嘅", + "individual_share": "單獨分享", + "individual_shares": "單獨分享", + "info": "資料", + "integrity_checks": "完整性檢查", + "invalid_date": "無效嘅日期", + "invite_people": "邀請人", + "iso": "ISO", + "jobs": "任務", + "keep": "保留", + "keep_albums": "保留相簿", + "keep_all": "留曬", + "keep_favorites": "保留收藏", + "keeping": "保留:{items}", + "keyboard_shortcuts": "鍵盤嘅快捷鍵", + "language": "語言", + "language_search_hint": "搵語言...", + "large_files": "大件檔案", + "last": "最後一個", + "last_seen": "最後在線", + "latest_version": "最新版本", + "latitude": "緯度", + "leave": "離開", + "leave_album": "離開相簿", + "lens_model": "鏡頭型號", + "less": "收埋", + "level": "等級", + "library": "媒體庫", + "library_add_folder": "新加個資料夾", + "library_edit_folder": "編輯資料夾", + "library_page_sort_created": "建立嘅日期", + "library_page_sort_last_modified": "上次修改", + "library_page_sort_title": "相簿標題", + "licenses": "授權", + "light": "淺色", + "like": "鍾意", + "like_deleted": "取消中意", + "link": "連結", + "list": "清單", + "live": "在線", + "load_more": "載入更多", + "loading": "載入緊", + "local": "本機", + "local_assets": "本機項目", + "local_id": "本地 ID", + "local_network": "本機網絡", + "location": "位置", + "location_permission": "位置權限", + "lock": "鎖定", + "locked_folder": "鎖定咗資料夾", + "log_detail_title": "記錄詳細資料", + "log_out": "登出", + "login": "登入", + "login_form_email_hint": "電郵地址", + "login_form_endpoint_hint": "http://你嘅伺服器地址:連接埠", + "login_form_err_invalid_email": "電郵無效", + "login_form_err_invalid_url": "無效嘅 URL", + "login_form_err_leading_whitespace": "開頭唔可以有空格", + "login_form_err_trailing_whitespace": "結尾唔可以有空格", + "login_form_password_hint": "密碼", + "logs": "紀錄", + "longitude": "經度", + "look": "樣貌", + "loop_videos": "循環播放條片", "main_menu": "主選單", "maintenance_action_restore": "還原緊數據庫", + "maintenance_restore_library_description": "還原緊資料庫", + "maintenance_restore_library_folder_read_fail": "讀取唔到", + "maintenance_restore_library_folder_write_fail": "寫唔到", + "maintenance_title": "暫時用唔到", + "make": "牌子", + "manage_geolocation": "管理位置", + "manage_media_access_settings": "打開設定", + "map": "地圖", + "map_settings": "地圖設定", + "map_settings_dark_mode": "深色模式", + "map_settings_date_range_option_year": "1年前", + "map_settings_include_show_archived": "包含封存咗嘅項目", + "map_settings_include_show_partners": "包含親友", + "map_settings_theme_settings": "地圖主題", + "matches": "相符", + "matching_assets": "符合嘅項目", + "media_chrome": { + "auto": "自動", + "captions": "字幕", + "captions_off": "閂咗", + "closed_captions": "隱藏字幕", + "disable_captions": "閂字幕", + "enable_captions": "開字幕", + "loop": "重複播放", + "media_loading": "媒體載入緊", + "mute": "靜音", + "network_error": "網絡錯誤", + "playback_rate": "播放速度", + "playback_time": "播放時間", + "quality": "畫質", + "second": "秒", + "seconds": "秒", + "time_value_remaining": "剩返 {time}", + "unmute": "開返聲", + "video_player": "影片播放器", + "volume": "音量" + }, + "media_type": "媒體類型", + "memories": "回憶", + "memories_start_over": "重新開始", + "memory": "回憶", + "menu": "選單", + "merge": "合併", + "merge_people": "合併人物", + "minFaces": "最少人面數量", + "minimize": "縮細", + "minute": "分鐘", + "minutes": "分鐘", + "missing": "缺失", + "mobile_app": "手機程式", + "model": "型號", + "modify_date": "修改日期", + "month": "月", + "more": "更多", + "motion": "動作", + "move": "移動", + "move_to": "搬去", + "mute_memories": "回憶靜音", + "my_albums": "我嘅相簿", + "name": "名", + "navigate": "導航", + "network_requirements": "網絡要求", + "networking_settings": "網絡設定", + "never": "永唔失效", + "new_album": "新相簿", + "new_feature": "新功能", + "new_password": "新密碼", + "new_person": "新嘅人物", + "new_update": "新更新", + "newest_first": "由新到舊", + "next": "下一步", + "next_memory": "下個回顧", + "no": "否", + "no_name": "冇名", + "no_notifications": "冇通知", + "no_places": "冇地方", + "no_results": "冇結果", + "none": "冇", + "not_allowed": "唔得", + "not_available": "唔適用", + "not_selected": "未揀", + "notes": "提示", + "notification_backup_reliability": "啟動通知嚟提升後台備份嘅可靠性", + "notification_enabled_list_tile_open_button": "打開設定", + "notification_enabled_list_tile_title": "啟用咗通知", + "notification_permission_list_tile_enable_button": "啓用通知", + "notification_permission_list_tile_title": "通知權限", + "notifications": "通知", + "notifications_setting_description": "管理通知", + "oauth": "OAuth", + "obtainium_configurator": "Obtainium 設定工具", + "ocr": "OCR", + "offline": "離線", + "offset": "偏移", + "ok": "確定", + "oldest_first": "由舊至新", + "onboarding": "新手指南", "onboarding_user_welcome_description": "我哋而家開始喇!", "onboarding_welcome_user": "歡迎,{user}", "online": "已上線", "only_favorites": "淨係顯示最愛", "open": "開", + "open_calendar": "打開日曆", "open_in_map_view": "用地圖開", "open_in_openstreetmap": "用 OpenStreetMap 開", "open_the_search_filters": "開搜尋過濾器", "options": "選項", "or": "或者", "organize_into_albums": "執成相簿", + "orientation": "方向", + "original": "原圖", + "other": "其他", + "other_devices": "其他裝置", + "other_variables": "其他變數", + "owned": "擁有", + "owner": "擁有者", + "page": "頁", + "partner": "親友", + "partner_list_user_photos": "{user} 啲相", + "partner_page_select_partner": "選擇親友", + "partner_sharing": "親友共享", + "partners": "親友", + "password": "密碼", + "password_required": "要密碼", + "path": "路徑", + "pattern": "模式", + "pause": "停咗", + "pause_memories": "暫停回憶", + "paused": "停咗", + "pending": "待處理", + "people": "人物", + "permanently_delete": "永久刪除", + "permission": "權限", + "person": "人物", + "person_recognized": "識別到人物", + "photos": "相", + "pick_custom_range": "自己揀範圍", + "place": "地點", + "places": "地點", + "play": "播放", + "play_memories": "播放回憶", + "plugin_method_filter_type": "篩選", + "port": "連接埠", + "preferences_settings_title": "偏好", + "preparing": "準備緊", + "preset": "預設", + "preview": "預覽", + "previous": "上一張", + "previous_memory": "上一張回憶", + "previous_or_next_day": "琴日/聽日", + "previous_or_next_month": "上個月/下個月", + "previous_or_next_photo": "上張相/下張相", + "previous_or_next_year": "上年/下年", + "primary": "首要", + "privacy": "私隱", + "profile": "用戶詳情", + "profile_drawer_app_logs": "紀錄", + "profile_drawer_github": "GitHub", + "public_album": "公開相簿", + "public_share": "公開分享", + "purchase_account_info": "支持者", + "purchase_button_activate": "啟用", + "purchase_button_buy": "買", + "purchase_button_buy_immich": "買 Immich", + "purchase_button_remove_key": "移除密匙", + "purchase_button_select": "揀", + "purchase_individual_description_2": "支持者狀態", + "purchase_individual_title": "個人", + "purchase_lifetime_description": "終身授權", + "purchase_option_title": "購買選項", "purchase_panel_info_1": "Immich 嘅持續開發需要好多嘅時間同埋精力,背後亦都有全職工程師精益求精嘅改善同發展。我哋嘅使命喺推動開源軟件同良心企業實踐,為開發者提供可持續嘅收入,建立一個尊重私隱嘅生態環境,提供可以真正代替剝削性雲端服務嘅選擇。", + "purchase_per_server": "每部伺服器", + "purchase_per_user": "每個用戶", + "purchase_server_description_2": "支持者狀態", + "purchase_server_title": "伺服器", + "queue_status": "處理緊 {count}/{total}", + "rate_asset": "項目評分", + "rating": "星級", + "rating_clear": "清除評分", + "reaction_options": "反映選項", + "read_changelog": "睇更新紀錄", + "reassign": "重新編配", + "recent": "最近", + "recent_searches": "最近搵緊嘅項目", + "recently_added": "近期加入嘅", + "recently_added_page_title": "近期加入嘅", + "recently_added_title": "最近新加嘅", + "recently_taken": "近期影嘅", + "refresh": "重新整理", + "refresh_faces": "重新整理人面", + "refresh_metadata": "重新整理元數據", + "refresh_thumbnails": "重新整理縮圖", + "refreshed": "整理完", + "refreshing_faces": "整理緊人面", + "refreshing_metadata": "整理緊元數據", + "regenerating_thumbnails": "重新生成緊縮圖", + "remote": "遙距", + "remote_assets": "遠端項目", + "remove": "移除", + "remove_assets_title": "移除項目?", + "remove_filter": "移除篩選", + "remove_memory": "移除記憶", + "remove_tag": "移除標籤", + "remove_user": "移除用户", + "removed_memory": "移除咗記憶", + "rename": "重新命名", + "repository": "儲存庫", + "require_password": "要密碼", + "rescan": "重新掃描", + "reset": "重設", + "reset_password": "重設密碼", + "reset_sqlite_clear_app_data": "清除資料", + "resolution": "解像度", + "resolve_duplicates": "解決重複項", + "restore": "還原", + "restore_all": "全部復原", + "restore_user": "還原用戶", + "restored_asset": "還原咗檔案", + "resume": "繼續", + "review_duplicates": "檢查重複項目", + "role": "角色", + "role_editor": "編輯", + "role_viewer": "齋睇", + "running": "運行緊", + "save": "儲存", + "saved": "已儲存", + "saved_profile": "儲存咗個人資料", + "saved_settings": "保存曬設定", + "say_something": "講下嘢", + "scaffold_body_error_occurred": "發生錯誤", + "scan": "掃描", + "scan_library": "掃描", + "scanning": "掃描緊", + "search": "搜尋", + "search_albums": "搵相簿", + "search_by_ocr_example": "咖啡", + "search_city": "搵城市...", + "search_country": "搵國家...", + "search_filter_apply": "使用篩選", + "search_filter_date": "日期", + "search_filter_display_options": "顯示選項", + "search_filter_location": "位置", + "search_filter_location_title": "選擇位置", + "search_filter_media_type": "媒體類型", + "search_filter_people_title": "選擇人物", + "search_filter_star_rating": "評分", + "search_filter_tags_title": "揀標籤", + "search_for": "搜尋", + "search_no_people": "搵唔到人", + "search_options": "搜尋選項", + "search_page_view_all_button": "睇曬", + "search_people": "搵人物", + "search_places": "搵地點", + "search_settings": "搜尋設定", + "search_state": "搜尋地區...", + "search_tags": "搵標籤...", + "search_timezone": "搵時區...", + "search_type": "搵類型", + "searching_locales": "搵地區...", + "second": "秒", + "select": "選擇", + "select_album": "揀相簿", + "select_albums": "揀相簿", + "select_all": "揀曬", + "select_face": "揀人面", + "select_people": "揀人", + "select_photos": "揀相", + "select_quality": "揀畫質", + "selected": "揀咗", + "send_message": "傳訊息", + "server_endpoint": "伺服器端點", + "server_info_box_app_version": "App 版本", + "server_info_box_server_url": "伺服器網址", + "server_offline": "伺服器離咗線", + "server_online": "伺服器在線", + "server_privacy": "伺服器私隱", + "server_stats": "伺服器統計", + "server_version": "宜家嘅版本", + "set": "設定", + "setting_image_navigation_title": "圖片引導", + "setting_languages_apply": "套用", + "setting_notifications_notify_minutes": "{count} 分鐘", "setting_notifications_notify_seconds": "{count} 秒", + "setting_video_viewer_looping_title": "重複播放", + "settings": "設定", + "settings_saved": "保存曬設定", + "share": "分享", + "share_dialog_preparing": "準備緊...", + "share_link": "分享連結", + "shared": "共享", + "shared_album_activity_remove_title": "刪除活動", + "shared_album_section_people_title": "人物", + "shared_by": "共享自", + "shared_link_app_bar_title": "分享連結", + "shared_link_custom_url_title": "自定 URL", + "shared_link_edit_expire_after_option_day": "1日", + "shared_link_edit_expire_after_option_days": "{count}日", + "shared_link_edit_expire_after_option_hour": "1 個鐘", + "shared_link_edit_expire_after_option_hours": "{count} 粒鐘", + "shared_link_edit_expire_after_option_minute": "1 分鐘", + "shared_link_edit_expire_after_option_minutes": "{count} 分鐘", + "shared_link_edit_expire_after_option_months": "{count} 個月", + "shared_link_edit_expire_after_option_year": "{count} 年", + "shared_link_edit_submit_button": "更新連結", + "shared_link_expires_never": "永不過期", + "shared_link_individual_shared": "個人共享", + "shared_link_info_chip_metadata": "Exif", + "shared_links": "分享連結", + "sharing": "共享", + "show_albums": "顯示相簿", + "show_gallery": "顯示媒體庫", + "show_metadata": "顯示元數據", + "show_password": "顯示密碼", + "show_schema": "顯示架構", + "show_supporter_badge": "支持者徽章", + "show_supporter_badge_description": "展示支持者徽章", + "shuffle": "隨機排列", + "sidebar": "側欄", + "sign_out": "登出", + "sign_up": "註冊", + "size": "大細", + "skip": "跳過", + "slideshow": "幻燈片", + "slideshow_metadata_overlay_mode": "覆蓋內容", + "slideshow_metadata_overlay_mode_description_only": "淨係描述", + "slideshow_metadata_overlay_mode_full": "完整", + "slideshow_repeat": "重複投影片", + "slideshow_settings": "幻燈片設定", + "slideshow_title": "幻燈片", + "smart_album": "智能相簿", + "sort_created": "建立日期", + "sort_modified": "修改嘅日期", + "sort_oldest": "最舊嘅相片", + "sort_title": "標題", + "source": "來源", + "stack": "堆疊", + "stack_action_prompt": "堆疊咗 {count} 個項目", + "stack_duplicates": "堆疊重複項目", + "stacktrace": "堆疊追蹤", + "start": "開始", + "start_date": "開始日期", + "state": "地區", + "status": "狀態", + "step_delete": "刪除步驟", + "step_details": "步驟詳情", + "steps": "步驟", + "stop_casting": "停止投放", + "storage": "儲存空間", + "storage_label": "儲存標籤", + "storage_quota": "儲存空間配額", + "submit": "提交", + "success": "成功", + "suggestions": "建議", + "support": "支持", + "supporter": "支持者", + "sync": "同步", + "sync_albums": "同步相簿", + "sync_local": "同步本機", + "sync_remote": "同步遠端", + "sync_status": "同步狀態", + "tag": "標籤", + "tag_assets": "標記項目", + "tag_face": "標記臉孔", + "tag_people": "標籤人物", + "tags": "標籤", + "template": "模板", + "text_recognition": "文字識別", + "theme": "主題", + "theme_selection": "主題選項", + "theme_setting_colorful_interface_title": "彩色界面", + "theme_setting_primary_color_title": "主色調", + "then": "之後", + "third_party_resources": "第三方資源", + "time": "時間", + "time_based_memories": "依時間回憶", + "timeline": "時間線", + "timezone": "時區", + "to_archive": "封存", + "to_change_password": "改密碼", + "to_favorite": "最愛", + "to_login": "登入", + "to_multi_select": "多選", + "to_select": "揀", + "to_trash": "垃圾桶", + "toggle_settings": "切換設定", + "toggle_theme_description": "切換主題", + "total": "總共", + "total_usage": "總用量", + "trash": "垃圾桶", + "trash_all": "掉曬", + "trash_delete_asset": "揼個項目落垃圾桶/刪除咗佢", + "trash_page_delete_all": "刪除曬", + "trigger": "觸發條件", + "trigger_person_recognized": "辨識到人物", + "troubleshoot": "疑難排解", + "type": "類型", + "unarchive": "取消封存", + "undo": "還原", + "unfavorite": "取消收藏", + "unhide_person": "取消隱藏人物", + "unknown": "唔知", + "unknown_country": "未知國家", + "unknown_date": "未知嘅日期", + "unknown_schema": "未知嘅架構", + "unknown_year": "未知嘅年份", + "unlimited": "無限制", + "unlink_oauth": "解除同 OAuth 嘅連結", + "unmute_memories": "取消靜音回憶", + "unnamed_album": "未命名相簿", + "unnamed_share": "未命名分享", + "unsaved_change": "變更未儲存", + "unselect_all": "取消全選", + "unstack": "取消堆疊", + "unstack_action_prompt": "{count} 個取消堆疊", + "untagged": "未標籤", + "up_next": "下個", + "updated_at": "最後更新嘅時間", + "updated_password": "更新咗密碼", + "upload": "上傳", + "upload_concurrency": "同時間嘅上傳數", + "upload_details": "上傳詳細資訊", + "upload_finished": "上傳咗", "upload_status_duplicates": "重複項目", + "upload_status_errors": "錯誤", + "upload_status_uploaded": "上傳咗", + "uploading": "上傳緊", + "uploading_media": "項目上傳緊", + "uploads": "上傳", + "url": "網址", + "usage": "用量", + "use_biometric": "使用生物識別", + "use_template": "使用模板", + "user": "用戶", + "user_id": "用戶 ID", + "user_pin_code_settings": "PIN", + "user_privacy": "用戶私隱", + "user_purchase_settings": "買", + "username": "用戶名稱", + "users": "用戶", + "utilities": "工具", + "validate": "驗證", + "variables": "變數", + "version": "版本", "version_announcement_message": "早晨!Immich 有新版本喇。唔該讀一讀 發表說明 並確保你嘅設定喺更新好嘅,以避免任何嘅設定錯誤,尤其喺你用緊 WatchTower 或者任何其他自動更新 Immich 嘅軟件。", + "version_history": "版本紀錄", + "video": "影片", + "video_quality": "影片畫質", + "videos": "影片", + "view": "檢視", + "view_album": "睇相簿", + "view_all": "睇曬", + "view_details": "檢視詳細資訊", + "view_link": "檢視連結", + "view_name": "睇", + "view_stack": "睇下堆疊", + "visibility": "能見度", + "visual": "視覺化", + "waiting": "等緊處理", + "waiting_count": "等緊 {count}", "warning": "警告", "week": "星期", "welcome": "歡迎", "welcome_to_immich": "歡迎使用 Immich", + "whats_new": "有咩新野", + "whats_new_version": "{version} 版", + "when": "喺", "width": "寬", "wifi_name": "Wi-Fi 名", + "workflow": "工作流程", + "workflow_info": "工作流程詳細資訊", + "workflow_json": "工作流程 JSON", + "workflow_name": "工作流程名", + "workflow_summary": "工作流程簡要", + "workflow_templates": "工作流程範本", + "workflows": "工作流程", "wrong_pin_code": "PIN 碼唔啱", + "x_of_total": "{x} / {total}", "year": "年", "years_ago": "{years, plural, one {#年} other {#年}}前", "yes": "係", diff --git a/i18n/zh_Hans.json b/i18n/zh_Hans.json index ce04377a96..fbbbc497f9 100644 --- a/i18n/zh_Hans.json +++ b/i18n/zh_Hans.json @@ -1,14 +1,14 @@ { "about": "关于", - "account": "账号", - "account_settings": "账号设置", - "acknowledge": "已知悉", + "account": "账户", + "account_settings": "账户设置", + "acknowledge": "好", "action": "操作", "action_common_update": "更新", - "action_description": "对筛选出的照片/视频执行的一组操作", + "action_description": "对筛选出的项目执行的一组操作", "actions": "操作", "active": "进行中", - "active_count": "活动: {count}", + "active_count": "进行中:{count}", "activity": "活动", "add": "添加", "add_a_description": "添加描述", @@ -43,97 +43,112 @@ "admin_user": "管理员用户", "asset_offline_description": "未找到该外部资源库文件,已将其移至回收站。如果文件是在资源库内被移动,请在时间线中查找对应的新文件。如需恢复此文件,请确保 Immich 可访问下方的文件路径,并重新扫描该资源库。", "authentication_settings": "认证设置", - "authentication_settings_description": "管理密码、OAuth 和其他认证设置", - "authentication_settings_disable_all": "您确定要禁用所有登录方式吗?登录功能将完全失效。", - "authentication_settings_reenable": "如需重新启用,请使用 服务器命令。", + "authentication_settings_description": "管理密码、OAuth与其他认证设置", + "authentication_settings_disable_all": "确定要禁用所有登录方式吗?登录功能将完全失效。", + "authentication_settings_reenable": "如果要重新启用,请使用 服务器命令。", "background_task_job": "后台任务", "backup_database": "创建数据库备份", "backup_database_enable_description": "启用数据库备份", - "backup_keep_last_amount": "保留的历史备份数量", - "backup_onboarding_1_description": "异地备份,例如存储在云端或另一个物理位置。", - "backup_onboarding_2_description": "本地多设备副本。即在不同设备上保存主文件及其本地备份。", - "backup_onboarding_3_description": "数据的总副本数,包含原始文件。例如:1 份异地备份和 2 份本地副本。", - "backup_onboarding_description": "建议采用 3-2-1 备份策略 来保护你的数据。为了实现全面的备份方案,你应该同时保存已上传的照片/视频副本以及 Immich 的数据库。", - "backup_onboarding_footer": "有关备份 Immich 的更多信息,请参阅 文档。", - "backup_onboarding_parts_title": "3-2-1备份原则包括:", + "backup_keep_last_amount": "保留备份数量", + "backup_onboarding_1_description": "备份到云端或其他物理位置。", + "backup_onboarding_2_description": "不同设备上的本地备份。包含主文件与本地文件的备份。", + "backup_onboarding_3_description": "所有数据(包含1份异地备份和2份本地备份)的备份。", + "backup_onboarding_description": "建议遵循 3-2-1备份原则 来保护你的数据。通过备份照片/视频与Immich数据库使你的数据更加安全。", + "backup_onboarding_footer": "有关备份Immich的更多信息,请参阅 文档。", + "backup_onboarding_parts_title": "3-2-1备份原则:", "backup_onboarding_title": "备份", "backup_settings": "数据库备份设置", "backup_settings_description": "管理数据库备份设置。", - "cleared_jobs": "已清除 {job} 的任务", + "cleared_jobs": "已停止任务:{job}", "config_set_by_file": "当前配置由配置文件设定", - "confirm_delete_library": "确定要删除资源库 \"{library}\" 吗?", - "confirm_delete_library_assets": "确定要删除此资源库吗?此操作将从 Immich 中删除 {count, plural, one {# 个关联项目} other {共 # 个关联项目}},且无法撤销。注意:文件仍将保留在磁盘上。", - "confirm_email_below": "为确认操作,请在下方输入“{email}”", - "confirm_reprocess_all_faces": "确定要重新处理所有人脸吗?此操作将清除已命名的人物。", - "confirm_user_password_reset": "确定要重置 {user} 的密码吗?", - "confirm_user_pin_code_reset": "确定要重置 {user} 的 PIN 码吗?", - "copy_config_to_clipboard_description": "将当前系统配置作为 JSON 对象复制到剪贴板", + "confirm_delete_library": "确定要删除资源库“{library}”吗?", + "confirm_delete_library_assets": "确定要删除此资源库吗?此操作将从Immich中删除{count, plural, one {# 个关联项目} other {# 个关联项目}},且无法撤销。文件仍将保留在磁盘上。", + "confirm_email_below": "请输入“{email}”来确认操作", + "confirm_reprocess_all_faces": "确定要重新识别所有人脸吗?此操作将清除已命名的人物。", + "confirm_user_password_reset": "确定要重置{user}的密码吗?", + "confirm_user_pin_code_reset": "确定要重置{user}的PIN码吗?", + "copy_config_to_clipboard_description": "将当前系统配置拷贝为JSON对象到剪贴板", "create_job": "创建任务", "cron_expression": "Cron表达式", - "cron_expression_description": "使用Cron格式设置扫描间隔。更多信息请参考 Crontab Guru 等网站", + "cron_expression_description": "使用Cron格式设置扫描间隔。更多信息请参考Crontab Guru等网站", "cron_expression_presets": "Cron表达式预设", "disable_login": "禁用登录", "download_csv": "下载CSV文件", - "duplicate_detection_job_description": "运行机器学习来检测相似图像,此功能依赖于智能搜索", - "exclusion_pattern_description": "排除规则允许您在扫描资源库时忽略特定的文件和文件夹。如果您有某些包含不希望导入的文件(例如 RAW 格式文件)的文件夹,此功能将非常有用。", - "export_config_as_json_description": "将当前系统配置下载为 JSON 文件", + "duplicate_detection_job_description": "通过机器学习来检测相似照片/视频。(功能依赖于智能搜索)", + "exclusion_pattern_description": "排除规则可以在扫描资源库时忽略指定的文件与文件夹。如果你有一些不希望导入的文件(如RAW格式文件)或文件夹,此功能将非常有用。", + "export_config_as_json_description": "将当前系统配置下载为JSON文件", "external_libraries_page_description": "管理外部资源库", "face_detection": "人脸检测", - "face_detection_description": "使用机器学习检测影像中的人脸,对于视频仅处理其缩略图。“刷新”会重新处理所有影像;“重置”会清除当前所有人脸数据;“缺失”则仅将未曾处理过的影像加入队列。当“人脸检测”完成后,系统会将新检测到的人脸放入“人脸识别”队列,以将其归类到现有或新建的人物分组中。", - "facial_recognition_job_description": "将检测到的人脸归类为不同的人物,此步骤需在“人脸检测”完成后运行。“重置”会(重新)聚类所有人脸。“缺失”则将尚未确定是谁的人脸加入归类队列。", - "failed_job_command": "命令 {command} 在执行任务 {job} 时失败", - "force_delete_user_warning": "警告:此操作将立即删除该用户及其所有文件。此操作不可撤销,且文件无法恢复。", + "face_detection_description": "通过机器学习识别照片/视频中的人脸,对于视频仅处理其缩略图。“刷新”会重新识别所有照片/视频;“重置”会清除当前所有人脸数据;“缺失”会将未曾处理过的照片/视频加入队列。当“人脸检测”完成后,系统会将新识别到的人脸放入“人脸识别”队列,以将其归类到现有或新建的人物分组中。", + "facial_recognition_job_description": "将检测到的人脸归类为不同的人物,此步骤在“人脸检测”完成后进行。“重置”会(重新)聚类所有人脸;“缺失”会将尚未归类的人脸加入队列。", + "failed_job_command": "执行命令{command}失败,任务:{job}", + "force_delete_user_warning": "警告:此操作将立即删除此用户与其所有项目。此操作不可撤销,且文件无法恢复。", "image_format": "格式", "image_format_description": "WebP格式的文件体积比JPEG更小,但编码速度较慢。", "image_fullsize_description": "已剥离元数据的全尺寸图像,放大查看时使用", "image_fullsize_enabled": "启用全尺寸图像生成", - "image_fullsize_enabled_description": "为非网页友好格式生成全尺寸图像。启用“优先使用嵌入式预览”后,将直接使用嵌入式预览而无需转换。此设置不影响JPEG等网页友好格式。", - "image_fullsize_quality_description": "全尺寸图像质量(1-100)。数值越高画质越好,但生成的文件也越大。", + "image_fullsize_enabled_description": "为非网页友好格式生成全尺寸图像。启用“优先使用嵌入式预览”则不进行转换。此设置不影响JPEG等网页友好格式。", + "image_fullsize_quality_description": "全尺寸图像质量(1-100)。数值越高质量越好,但文件体积也越大。", "image_fullsize_title": "全尺寸图像设置", "image_prefer_embedded_preview": "优先使用嵌入式预览", - "image_prefer_embedded_preview_setting_description": "使用 RAW 文件内嵌入的预览图像(如有)作为后续处理的基础。这能为部分图像生成更准确的色彩,但嵌入式预览图像的质量取决于相机型号,且可能因有损压缩包含更多的伪影。", + "image_prefer_embedded_preview_setting_description": "使用RAW照片内嵌的预览图像(如有)作为后续处理的基础。这能使部分图像生成的色彩更准确,但嵌入式预览图像的质量将取决于相机型号,且可能因有损压缩而包含更多的伪影。", "image_prefer_wide_gamut": "优先使用广色域", - "image_prefer_wide_gamut_setting_description": "缩略图使用 Display P3 色彩空间。这能更好地保留广色域图像的色彩鲜艳度,但在使用旧版浏览器的老旧设备上,可能导致色差。sRGB 图像将保持为 sRGB,以避免色彩偏移。", - "image_preview_description": "已剥离元数据的中等尺寸图像,用于单幅影像展示及机器学习", - "image_preview_quality_description": "预览图质量(1-100)。数值越高画质越好,但生成的文件越大,且可能降低应用响应速度。设置过低的数值可能影响机器学习(识别)的准确度。", + "image_prefer_wide_gamut_setting_description": "缩略图使用Display P3色彩空间。这能更好地保留广色域图像的色彩鲜艳度,但在使用旧版浏览器的老旧设备上可能产生色差。sRGB图像将保持sRGB色彩空间以避免色彩偏移。", + "image_preview_description": "已剥离元数据的中等尺寸图像,用于单幅影像展示与机器学习", + "image_preview_quality_description": "预览图质量(1-100)。数值越高质量越好,但文件体积也越大,且可能降低App响应速度。过低的数值可能影响机器学习的准确度。", "image_preview_title": "预览图设置", "image_progressive": "渐进式编码", - "image_progressive_description": "对 JPEG 图像进行渐进式编码,以提升图片加载体验。此开关对 WebP 无效。", + "image_progressive_description": "对JPEG图像进行渐进式编码以提升图片加载体验。此设置不影响WebP图像。", "image_quality": "质量", "image_resolution": "分辨率", - "image_resolution_description": "较高的分辨率能保留更多图像细节,但编码时间更长、生成的文件更大,且可能导致应用响应变慢。", + "image_resolution_description": "较高的分辨率能保留更多细节,但编码时间更长、文件体积更大,且可能降低App响应速度。", "image_settings": "图像设置", "image_settings_description": "管理生成图像的质量和分辨率", - "image_thumbnail_description": "已剥离元数据的小型缩略图,用于列表展示多张照片,例如主时间线", - "image_thumbnail_quality_description": "缩略图质量(1-100)。数值越高画质越好,但生成的文件越大,且可能降低应用响应速度。", + "image_thumbnail_description": "已剥离元数据的小型缩略图,用于列表展示多张照片,如主时间线", + "image_thumbnail_quality_description": "缩略图质量(1-100)。数值越高画质越好,但文件体积也越大,且可能降低App响应速度。", "image_thumbnail_title": "缩略图设置", - "import_config_from_json_description": "通过上传 JSON 配置文件导入系统配置", + "import_config_from_json_description": "通过上传JSON配置文件导入系统配置", + "integrity_checks_checksum_files": "文件校验和", + "integrity_checks_checksum_files_description": "配置校验与检查", + "integrity_checks_checksum_files_enable_description": "启用校验与检查", + "integrity_checks_checksum_files_percentage_limit": "百分比限制", + "integrity_checks_checksum_files_percentage_limit_description": "设置每个检查周期执行校验和检查的最大比例(0.01–1)。", + "integrity_checks_checksum_files_time_limit": "时间限制", + "integrity_checks_checksum_files_time_limit_description": "设置每个检查周期内,校验和(Checksum)检查允许运行的最长时间(毫秒)。", + "integrity_checks_missing_files": "缺失文件", + "integrity_checks_missing_files_description": "设置执行频率并启用或禁用缺失文件检查", + "integrity_checks_missing_files_enable_description": "启用缺失文件检查", + "integrity_checks_settings": "完整性检查", + "integrity_checks_settings_description": "管理完整性检查频率", + "integrity_checks_untracked_files": "未追踪的文件", + "integrity_checks_untracked_files_description": "设置执行频率并启用或禁用未追踪文件检查。", + "integrity_checks_untracked_files_enable_description": "启用未追踪文件检查", "job_concurrency": "{job}并发数", "job_created": "任务已创建", - "job_not_concurrency_safe": "该任务不支持并发操作。", + "job_not_concurrency_safe": "此任务不支持并发操作。", "job_settings": "任务设置", "job_settings_description": "管理任务并发数", "jobs_delayed": "{jobCount, plural, other {#个延迟}}", - "jobs_failed": "{jobCount, plural, other {# 个失败}}", + "jobs_failed": "{jobCount, plural, other {#个失败}}", "jobs_over_time": "任务动态", "library_created": "已创建资源库:{library}", "library_deleted": "资源库已删除", "library_details": "资源库详情", - "library_folder_description": "指定一个导入文件夹。系统将扫描该文件夹及其所有子文件夹中的图片和视频。", + "library_folder_description": "指定要导入的文件夹。系统将扫描此文件夹(包括子文件夹)中的照片与视频。", "library_remove_exclusion_pattern_prompt": "确定要移除此排除规则吗?", "library_remove_folder_prompt": "确定要移除此导入文件夹吗?", "library_scanning": "定期扫描", - "library_scanning_description": "配置定期扫描", - "library_scanning_enable_description": "开启定期扫描", + "library_scanning_description": "设置定期扫描", + "library_scanning_enable_description": "启用定期扫描", "library_settings": "外部资源库", "library_settings_description": "管理外部资源库设置", - "library_tasks_description": "扫描外部资源库以查找新增和变更的文件", + "library_tasks_description": "扫描并查找外部资源库中新增或变更的项目", "library_updated": "资源库已更新", "library_watching_enable_description": "监控外部资源库的文件变更", "library_watching_settings": "资源库监控 [实验性功能]", "library_watching_settings_description": "自动监控文件变更", - "logging_enable_description": "启用日志记录", - "logging_level_description": "启用后,所采用的日志级别。", + "logging_enable_description": "启用日志", + "logging_level_description": "启用时使用的日志级别。", "logging_settings": "日志", "machine_learning_availability_checks": "可用性检查", "machine_learning_availability_checks_description": "自动检测并优先选择可用的机器学习服务器", @@ -143,45 +158,45 @@ "machine_learning_availability_checks_timeout": "请求超时时间", "machine_learning_availability_checks_timeout_description": "可用性检查的请求超时时间(毫秒)", "machine_learning_clip_model": "CLIP模型", - "machine_learning_clip_model_description": "在 此处 列出的 CLIP 模型名称。请注意,更改模型后,必须重新运行所有图片的“智能搜索”任务。", - "machine_learning_duplicate_detection": "重复项检测", - "machine_learning_duplicate_detection_enabled": "启用重复项检测", - "machine_learning_duplicate_detection_enabled_description": "若关闭此功能,完全相同的文件仍会被去重处理。", - "machine_learning_duplicate_detection_setting_description": "利用 CLIP 嵌入向量识别潜在的重复项", + "machine_learning_clip_model_description": "在此处列出的CLIP模型名称。注意:更改模型后必须对所有照片重新执行“智能搜索”任务。", + "machine_learning_duplicate_detection": "重复项目检测", + "machine_learning_duplicate_detection_enabled": "启用重复项目检测", + "machine_learning_duplicate_detection_enabled_description": "禁用后完全相同的项目仍会进行去重处理。", + "machine_learning_duplicate_detection_setting_description": "通过CLIP嵌入向量识别潜在的重复项目", "machine_learning_enabled": "启用机器学习", - "machine_learning_enabled_description": "若关闭此处总开关,所有机器学习相关特性将全部停用,下方具体设置无效。", + "machine_learning_enabled_description": "禁用后与机器学习的相关设置将失效。", "machine_learning_facial_recognition": "人脸识别", "machine_learning_facial_recognition_description": "检测、识别并自动归类图片中的人脸", "machine_learning_facial_recognition_model": "人脸识别模型", - "machine_learning_facial_recognition_model_description": "模型按尺寸降序排列。较大的模型运行速度较慢且占用更多内存,但效果更好。请注意,更换模型后,必须重新运行所有图片的“人脸检测”任务。", + "machine_learning_facial_recognition_model_description": "模型按文件体积降序排列。更大的模型运行速度更慢且占用更多内存,但效果更好。注意:更换模型后,必须对所有照片重新执行“人脸检测”任务。", "machine_learning_facial_recognition_setting": "启用人脸识别", - "machine_learning_facial_recognition_setting_description": "若关闭此功能,图片将不会进行人脸识别编码,且“探索”页面的“人物”板块将无法显示内容。", - "machine_learning_max_detection_distance": "最大检测距离", - "machine_learning_max_detection_distance_description": "两张图片被视为重复项的最大距离,取值范围为 0.001 - 0.1。数值越高,检测出的重复项越多,但可能出现误判(例如将不同的人识别为同一人)。", - "machine_learning_max_recognition_distance": "最大识别距离", - "machine_learning_max_recognition_distance_description": "两张人脸被视为同一个人的最大距离,取值范围为 0 - 2。调低该值可避免将两个人误标为同一人,调高则可避免将同一个人误标为两个人。请注意,事后合并两个人物比拆分一个人物更容易,因此在可能的情况下,建议优先设置较低的阈值。", - "machine_learning_min_detection_score": "最低检测阈值", - "machine_learning_min_detection_score_description": "人脸检测的最低置信度分数,取值范围为 0-1。数值越低,检测到的人脸越多,但可能出现误判(例如将非人脸区域识别为人脸)。", + "machine_learning_facial_recognition_setting_description": "禁用后将不会对照片进行人脸识别编码,且“探索”页面的“人物”部分将不会显示内容。", + "machine_learning_max_detection_distance": "最大检测阈值", + "machine_learning_max_detection_distance_description": "两张图片被视为重复项目的阈值,范围为0.001~0.1。更高的阈值能检测出更多重复项目,但误判的可能性也越高。", + "machine_learning_max_recognition_distance": "最大识别阈值", + "machine_learning_max_recognition_distance_description": "两张人脸被视为同一个人的阈值,范围为0~2。更低的阈值能避免将两个人误判为同一人;更高的阈值能避免将同一个人误判为两个人。注意:合并两个人物比拆分一个人物更容易,建议尽可能优先设置较低的阈值。", + "machine_learning_min_detection_score": "最小检测阈值", + "machine_learning_min_detection_score_description": "人脸检测的最低置信度分数,范围为0~1。更低的数值能检测到更多人脸,但误判的可能性也越高。", "machine_learning_min_recognized_faces": "最小识别数量", - "machine_learning_min_recognized_faces_description": "创建人物所需的最少人脸数量。调高此值可提升人脸识别的精准度,但会增加人脸无法被分配给人物的风险。", + "machine_learning_min_recognized_faces_description": "创建人物所需的最小人脸数量。更高的数值能提升人脸识别的精确度,但会增加人脸无法归类为任何人物的风险。", "machine_learning_ocr": "文字识别(OCR)", - "machine_learning_ocr_description": "利用机器学习技术识别图片中的文本内容", + "machine_learning_ocr_description": "通过机器学习识别照片中的文本内容", "machine_learning_ocr_enabled": "启用文字识别(OCR)", - "machine_learning_ocr_enabled_description": "若禁用,将不会尝试识别图片中的文字。", + "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": "OCR模型", + "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": "文字识别(OCR)模型", "machine_learning_ocr_model_description": "服务器端模型比移动端模型更精准,但处理耗时更长且更占用内存。", "machine_learning_settings": "机器学习设置", "machine_learning_settings_description": "管理机器学习功能及相关设置", "machine_learning_smart_search": "智能搜索", "machine_learning_smart_search_description": "使用CLIP嵌入向量进行语义化图片搜索", "machine_learning_smart_search_enabled": "启用智能搜索", - "machine_learning_smart_search_enabled_description": "若禁用,图片将不会被编码以用于智能搜索。", + "machine_learning_smart_search_enabled_description": "禁用后照片将不会执行智能搜索编码。", "machine_learning_url_description": "机器学习服务器的 URL。若提供多个 URL,系统将按从前往后的顺序逐个尝试连接,直至有服务器成功响应为止。未能响应的服务器将被暂时忽略,直至其恢复在线。", "maintenance_backup_management": "备份管理", "maintenance_delete_backup": "删除备份", @@ -328,7 +343,7 @@ "server_external_domain_settings": "外部域名", "server_external_domain_settings_description": "公开分享链接的域名,需包含 http(s)://", "server_public_users": "用户公开", - "server_public_users_description": "在将用户添加至共享相册时,会列出所有用户(包括姓名和邮箱)。若禁用此选项,则仅管理员可见用户列表。", + "server_public_users_description": "在将用户添加至共享相册时,会列出所有用户(包括姓名和邮箱)。禁用后仅管理员可见用户列表。", "server_settings": "服务器设置", "server_settings_description": "管理服务器设置", "server_stats_page_description": "管理服务器统计页面", @@ -416,6 +431,10 @@ "transcoding_realtime_description": "允许在视频流式传输(播放)的同时实时进行转码。该功能支持动态切换画质,但根据服务器性能的不同,可能会导致较高的播放延迟或画面卡顿。", "transcoding_realtime_enabled": "启用实时转码", "transcoding_realtime_enabled_description": "如果禁用,服务器将拒绝启动新的实时转码会话。", + "transcoding_realtime_resolutions": "分辨率", + "transcoding_realtime_resolutions_description": "这是实时转码所提供的分辨率选项。如果服务器无法以足够快的速度进行转码,使用更高分辨率可能会导致播放问题。", + "transcoding_realtime_video_codecs": "视频编解码器", + "transcoding_realtime_video_codecs_description": "这是用于实时转码的视频编解码器选项。客户端会在播放时选择其支持的最佳方案。AV1 的效率高于 HEVC,而 HEVC 的效率又高于 H.264。使用硬件加速时,请仅选择加速器支持编码的编解码器。使用软件转码时,请注意 H.264 的速度快于 AV1,而 AV1 的速度快于 HEVC。", "transcoding_reference_frames": "参考帧", "transcoding_reference_frames_description": "在压缩指定帧时,所参考的帧数量。数值越高,压缩效率越高,但会降低编码速度。0 表示由系统自动设置。", "transcoding_required_description": "仅非标准格式的视频", @@ -578,7 +597,8 @@ "asset_viewer_settings_title": "文件查看器", "assets": "资源", "assets_added_to_album_count": "已向相册添加{count, plural, one {#个资源} other {#个资源}}", - "assets_added_to_albums_count": "已向 {albumTotal, plural, one {# 个相册} other {# 个相册}}添加 {assetTotal, plural, one {# 个资源} other {# 个医院}}", + "assets_added_to_album_partial_count": "已成功将 {totalCount}{totalCount, plural, one {asset} other {assets}}个项目中的 {successCount} 个添加到相册", + "assets_added_to_albums_count": "已向 {albumTotal, plural, one {# 个相册} other {# 个相册}}添加 {assetTotal, plural, one {# 个资源} other {# 个资源}}", "assets_cannot_be_added_to_album_count": "无法向相册添加{count, plural, one {个资源} other {个资源}}", "assets_cannot_be_added_to_albums": "无法向任何一个相册添加 {count, plural, one {个资源} other {个资源}}", "assets_count": "{count, plural, one {#个项目} other {#个项目}}", @@ -589,8 +609,8 @@ "assets_restored_count": "已恢复{count, plural, one {#个文件} other {#个文件}}", "assets_trashed": "{count}个文件移至回收站", "assets_trashed_count": "已将{count, plural, one {#个文件} other {#个文件}}移至回收站", - "assets_were_part_of_album_count": "{count, plural, one {个医院} other {个资源}}已在该相册中", - "assets_were_part_of_albums_count": "{count, plural, one {个项目} other {个项目}}已存在于这些相簿中", + "assets_were_part_of_album_count": "{count, plural, one {个资源} other {个资源}}已在该相册中", + "assets_were_part_of_albums_count": "{count, plural, one {个资源} other {个资源}} 已存在于这些相册中", "authorized_devices": "已授权设备", "automatic_endpoint_switching_subtitle": "在可用时通过指定的 Wi-Fi 进行本地连接,其他位置则使用替代网络连接", "automatic_endpoint_switching_title": "自动切换 URL", @@ -603,13 +623,13 @@ "backup": "备份", "backup_album_selection_page_albums_tap": "单击包含,双击排除", "backup_album_selection_page_assets_scatter": "资源可以分散在多个相册中。因此,在备份过程中,可以包含或排除某些相册。", - "backup_album_selection_page_select_albums": "选择相簿", + "backup_album_selection_page_select_albums": "选择相册", "backup_album_selection_page_selection_info": "选择信息", - "backup_albums_sync": "备份相簿同步", + "backup_albums_sync": "备份相册同步", "backup_background_service_complete_notification": "文件备份完成", "backup_background_service_default_notification": "正在检查新文件…", "backup_background_service_in_progress_notification": "正在备份您的文件…", - "backup_controller_page_albums": "备份相簿", + "backup_controller_page_albums": "备份相册", "backup_controller_page_background_battery_info_link": "展示操作步骤", "backup_controller_page_background_battery_info_message": "为获得最佳的后台备份体验,请在系统设置中禁用针对Immich的任何电池优化限制。\n\n由于该设置因设备而异,请查询您设备制造商的具体要求。", "backup_controller_page_background_battery_info_ok": "我知道了", @@ -624,8 +644,8 @@ "backup_controller_page_remainder_sub": "已选项中尚未备份的照片和视频", "backup_controller_page_server_storage": "服务器存储", "backup_controller_page_storage_format": "已用 {used}(共 {total})", - "backup_controller_page_to_backup": "待备份的相簿", - "backup_controller_page_total_sub": "包含所选相簿内全部唯一的照片和视频", + "backup_controller_page_to_backup": "待备份的相册", + "backup_controller_page_total_sub": "包含所选相册内全部唯一的照片和视频", "backup_error_sync_failed": "同步失败。无法处理备份。", "backup_info_card_assets": "照片和视频", "backup_options": "备份选项", @@ -690,7 +710,7 @@ "cleanup_deleting": "正在移至回收站...", "cleanup_found_assets": "已找到{count}个已备份的文件", "cleanup_found_assets_with_size": "已找到{count}个已备份的文件({size})", - "cleanup_icloud_shared_albums_excluded": "iCloud共享相簿已排除在扫描范围之外", + "cleanup_icloud_shared_albums_excluded": "iCloud 共享相册已排除在扫描范围之外", "cleanup_no_assets_found": "未找到符合上述条件的文件。“释放空间”仅能移除已备份至服务器的文件", "cleanup_preview_title": "待移除的照片/视频({count})", "cleanup_step3_description": "扫描符合日期及保留设置的已备份照片/视频。", @@ -725,7 +745,7 @@ "comment_options": "更多", "comments_and_likes": "评论 & 点赞", "comments_are_disabled": "评论已关闭", - "common_create_new_album": "创建新相簿", + "common_create_new_album": "创建新相册", "completed": "已完成", "configuration": "配置", "confirm": "确认", @@ -760,7 +780,7 @@ "cover": "填充", "covers": "封面", "create": "创建", - "create_album": "创建相簿", + "create_album": "创建相册", "create_album_page_untitled": "未命名", "create_api_key": "创建 API 密钥", "create_first_workflow": "创建首个工作流", @@ -783,7 +803,7 @@ "create_workflow": "新建工作流", "created": "已创建", "created_at": "创建时间", - "creating_linked_albums": "正在创建相簿链接…", + "creating_linked_albums": "正在创建相册链接…", "crop": "裁剪", "crop_aspect_ratio_free": "自由比例", "crop_aspect_ratio_original": "原始比例", @@ -794,7 +814,6 @@ "custom_date": "自定义日期", "custom_locale": "自定义区域", "custom_locale_description": "根据所选的语言和地区来格式化日期、时间和数字", - "custom_url": "自定义 URL", "cutoff_date_description": "保留最近的照片…", "cutoff_day": "{count, plural, one {天} other {天}}", "cutoff_year": "{count, plural, one {年} other {年}}", @@ -816,7 +835,7 @@ "delete": "删除", "delete_action_confirmation_message": "您确定要删除此素材吗?此操作会将该素材移至服务器的回收站,并提示您是否将其在本地设备上删除", "delete_action_prompt": "已删除 {count} 项", - "delete_album": "删除相簿", + "delete_album": "删除相册", "delete_api_key_prompt": "您确定要删除此 API 密钥吗?", "delete_dialog_alert": "这些项目将从 Immich 服务器以及你的设备上被永久删除", "delete_dialog_alert_local": "这些项目将从你的设备上被永久移除,但依然会保留在 Immich 服务器上", @@ -882,7 +901,7 @@ "duplicates_description": "请逐一标记每组中的重复文件。", "duration": "时长", "edit": "编辑", - "edit_album": "编辑相簿", + "edit_album": "编辑相册", "edit_avatar": "编辑头像", "edit_birthday": "编辑生日", "edit_date": "编辑日期", @@ -933,7 +952,7 @@ "enter_your_pin_code_subtitle": "输入你的 PIN 码以访问锁定的文件夹", "error": "错误", "error_delete_face": "删除该照片/视频中的人脸时出错", - "error_loading_albums": "加载相簿时出错", + "error_loading_albums": "加载相册时出错", "error_loading_image": "加载图片时出错", "error_loading_partners": "加载协作者时出错:{error}", "error_retrieving_asset_information": "获取项目信息时出错", @@ -952,15 +971,15 @@ "cant_get_number_of_comments": "无法获取评论数量", "cant_search_people": "无法搜索人物", "cant_search_places": "无法搜索地点", - "error_adding_assets_to_album": "添加照片/视频到相簿时出错", - "error_adding_users_to_album": "添加用户到相簿时出错", + "error_adding_assets_to_album": "添加资源到相册时出错", + "error_adding_users_to_album": "添加用户到相册时出错", "error_deleting_shared_user": "删除共享用户时出错", "error_downloading": "下载{filename}时出错", "error_hiding_buy_button": "隐藏购买按钮时出错", - "error_removing_assets_from_album": "从相簿中移除照片/视频时出错,请检查控制台以获取更多详情", + "error_removing_assets_from_album": "移除相册资源时出错,请检查控制台以获取更多详情", "error_selecting_all_assets": "全选照片/视频时出错", "exclusion_pattern_already_exists": "此排除模式已存在。", - "failed_to_create_album": "创建相簿失败", + "failed_to_create_album": "创建相册失败", "failed_to_create_shared_link": "创建共享链接失败", "failed_to_edit_shared_link": "编辑共享链接失败", "failed_to_get_people": "获取人物列表失败", @@ -982,7 +1001,7 @@ "profile_picture_transparent_pixels": "头像不支持透明背景,请放大或移动图片。", "quota_higher_than_disk_size": "你设置的配额超过了磁盘总大小", "something_went_wrong": "出错了", - "unable_to_add_album_users": "无法向相簿添加用户", + "unable_to_add_album_users": "无法向相册添加用户", "unable_to_add_assets_to_shared_link": "无法向分享链接添加照片/视频", "unable_to_add_comment": "无法添加评论", "unable_to_add_exclusion_pattern": "无法添加排除规则", @@ -990,7 +1009,7 @@ "unable_to_add_remove_archive": "无法{archived, select, true {从归档中移除} other {添加照片/视频到归档}}", "unable_to_add_remove_favorites": "无法{favorite, select, true {添加照片/视频到收藏} other {从收藏中移除}}", "unable_to_archive_unarchive": "无法{archived, select, true {归档} other {取消归档}}", - "unable_to_change_album_user_role": "无法更改相簿用户的角色", + "unable_to_change_album_user_role": "无法更改相册用户的角色", "unable_to_change_date": "无法更改日期", "unable_to_change_description": "无法修改描述", "unable_to_change_favorite": "无法更改照片/视频的收藏状态", @@ -1005,7 +1024,7 @@ "unable_to_create_api_key": "无法创建新的 API 密钥", "unable_to_create_library": "无法创建库", "unable_to_create_user": "无法创建用户", - "unable_to_delete_album": "无法删除相簿", + "unable_to_delete_album": "无法删除相册", "unable_to_delete_asset": "无法删除照片/视频", "unable_to_delete_assets": "删除照片/视频时出错", "unable_to_delete_exclusion_pattern": "无法删除排除规则", @@ -1029,7 +1048,7 @@ "unable_to_reassign_assets_existing_person": "无法将项目重新分配给{name, select, null {已存在的人物} other {{name}}}", "unable_to_reassign_assets_new_person": "无法重新分配照片/视频给新的人物", "unable_to_refresh_user": "无法刷新用户", - "unable_to_remove_album_users": "无法从相簿中移除用户", + "unable_to_remove_album_users": "无法从相册中移除用户", "unable_to_remove_api_key": "无法移除 API 密钥", "unable_to_remove_assets_from_shared_link": "无法从共享链接中移除照片/视频", "unable_to_remove_library": "无法移除库", @@ -1041,7 +1060,7 @@ "unable_to_restore_assets": "无法恢复照片/视频", "unable_to_restore_trash": "无法还原回收站", "unable_to_restore_user": "无法恢复用户", - "unable_to_save_album": "无法保存相簿", + "unable_to_save_album": "无法保存相册", "unable_to_save_api_key": "无法保存 API 密钥", "unable_to_save_date_of_birth": "无法保存出生日期", "unable_to_save_name": "无法更新人物名称", @@ -1056,8 +1075,8 @@ "unable_to_trash_asset": "无法移至回收站", "unable_to_unlink_account": "无法解除账号关联", "unable_to_unlink_motion_video": "无法解除实况视频关联", - "unable_to_update_album_cover": "无法更改相簿封面", - "unable_to_update_album_info": "无法更改相簿信息", + "unable_to_update_album_cover": "无法更新相册封面", + "unable_to_update_album_info": "无法更新相册信息", "unable_to_update_library": "无法更新图库", "unable_to_update_location": "无法更新位置信息", "unable_to_update_settings": "无法更新设置", @@ -1143,7 +1162,7 @@ "gps": "有GPS信息", "gps_missing": "无GPS信息", "grant_permission": "授权权限", - "group_albums_by": "相簿分组依据...", + "group_albums_by": "相册分组依据...", "group_country": "按国家分组", "group_no": "不分组", "group_owner": "按所有者分组", @@ -1162,7 +1181,7 @@ "height": "高度", "hi_user": "您好,{name}({email})", "hide_all_people": "隐藏所有人物", - "hide_gallery": "隐藏相簿", + "hide_gallery": "隐藏相册", "hide_named_person": "隐藏人物:{name}", "hide_password": "隐藏密码", "hide_person": "隐藏人物", @@ -1190,12 +1209,12 @@ "immich_web_interface": "Immich网页界面", "import_from_json": "从JSON导入", "import_path": "导入路径", - "in_albums": "在{count, plural, one {# 个相簿} other {# 个相簿}}中", + "in_albums": "在{count, plural, one {# 个相册} other {# 个相册}}中", "in_archive": "已归档", "in_year": "{year}年", "in_year_selector": "在", "include_archived": "包括已归档", - "include_shared_albums": "包括共享相簿", + "include_shared_albums": "包括共享相册", "include_shared_partner_assets": "包括协作者共享照片/视频", "individual_share": "单独分享", "individual_shares": "单独分享", @@ -1210,13 +1229,13 @@ "invalid_date": "无效的日期", "invalid_date_format": "无效的日期格式", "invite_people": "邀请人员", - "invite_to_album": "邀请加入相簿", + "invite_to_album": "邀请加入相册", "iso": "ISO", "items_count": "{count, plural, one {#个} other {#个}}项目", "jobs": "任务", "keep": "保留", - "keep_albums": "保留相簿", - "keep_albums_count": "保留 {count} {count, plural, one {个相簿} other {个相簿}}", + "keep_albums": "保留相册", + "keep_albums_count": "保留 {count} {count, plural, one {个相册} other {个相册}}", "keep_all": "全部保留", "keep_description": "选择释放空间时保留在设备上的内容。", "keep_favorites": "保留收藏", @@ -1238,9 +1257,9 @@ "latest_version": "最新版本", "latitude": "纬度", "leave": "离开", - "leave_album": "离开相簿", + "leave_album": "离开相册", "lens_model": "镜头型号", - "less": "收起", + "less": "更少", "let_others_respond": "允许他人回复", "level": "等级", "library": "资源库", @@ -1249,7 +1268,7 @@ "library_page_sort_asset_count": "项目数量", "library_page_sort_created": "创建日期", "library_page_sort_last_modified": "上次修改", - "library_page_sort_title": "相簿标题", + "library_page_sort_title": "相册标题", "licenses": "许可证", "light": "浅色", "light_theme": "切换到浅色主题", @@ -1303,9 +1322,9 @@ "login_form_failed_login": "登录失败,请检查服务器地址、邮箱和密码", "login_form_handshake_exception": "与服务器的握手异常。如果您使用的是自签名证书,请在设置中开启对自签名证书的支持。", "login_form_password_hint": "密码", - "login_form_server_empty": "请输入服务器 URL。", - "login_form_server_error": "无法连接到服务器。", - "login_has_been_disabled": "登录功能已禁用。", + "login_form_server_empty": "请输入服务器URL", + "login_form_server_error": "无法连接到服务器", + "login_has_been_disabled": "登录功能已禁用", "login_password_changed_error": "更新密码时出错", "login_password_changed_success": "密码更新成功", "logout_all_device_confirmation": "确定要退出所有设备的登录吗?", @@ -1356,6 +1375,7 @@ "map_location_picker_page_use_location": "使用此位置", "map_location_service_disabled_content": "需要启用定位服务才能显示您当前位置的媒体文件。是否现在启用它?", "map_location_service_disabled_title": "定位服务已禁用", + "map_marker_for_image": "在 {city}, {country} 拍摄的地图标记", "map_marker_with_image": "带预览图的地图标记", "map_no_location_permission_content": "需要位置权限才能显示您当前位置的照片/视频。现在要允许吗?", "map_no_location_permission_title": "位置权限被拒绝", @@ -1440,13 +1460,13 @@ "move_to_device_trash": "移至设备回收站", "move_to_lock_folder_action_prompt": "已将 {count} 项添加到锁定文件夹", "move_to_locked_folder": "移至锁定文件夹", - "move_to_locked_folder_confirmation": "这些照片和视频将从所有相簿中移除,仅可在锁定文件夹内查看", + "move_to_locked_folder_confirmation": "这些照片和视频将从所有相册中移除,仅可在锁定文件夹内查看", "moved_to_trash": "已移至回收站", "mute_memories": "静音回忆", - "my_albums": "我的相簿", + "my_albums": "我的相册", "my_immich_description": "将当前页面复制为我的Immich链接", "my_immich_title": "我的Immich链接", - "name": "用户名", + "name": "名字", "name_or_nickname": "名称或昵称", "name_required": "名称是必填项", "navigate": "导航", @@ -1458,8 +1478,9 @@ "networking_settings": "网络设置", "networking_subtitle": "管理服务器端点设置", "never": "永不过期", - "new_album": "新建相簿", + "new_album": "新建相册", "new_api_key": "新增 API 密钥", + "new_feature": "新功能", "new_password": "新密码", "new_person": "新人物", "new_pin_code": "新的PIN码", @@ -1471,10 +1492,10 @@ "next": "下一个", "next_memory": "下一个回忆", "no": "否", - "no_albums_found": "未找到相簿", - "no_albums_message": "创建相簿以整理您的照片和视频", - "no_albums_with_name_yet": "没有同名的相簿。", - "no_albums_yet": "您还没有创建任何相簿。", + "no_albums_found": "未找到相册", + "no_albums_message": "创建相册以整理您的照片和视频", + "no_albums_with_name_yet": "没有同名的相册。", + "no_albums_yet": "您还没有创建任何相册。", "no_archived_assets_message": "归档照片和视频,将其从“照片”视图中隐藏", "no_assets_message": "点击上传你的第一张照片", "no_assets_to_show": "暂无内容可显示", @@ -1496,16 +1517,20 @@ "no_remote_assets_found": "未找到具有此校验和的远程项目", "no_results": "未找到任何匹配项", "no_results_description": "请尝试使用同义词或更宽泛的关键词", - "no_shared_albums_message": "创建相簿,与社交圈内的好友共享照片和视频", + "no_shared_albums_message": "创建相册,与社交圈内的好友共享照片和视频", "no_steps": "尚未添加任何步骤", "none": "无", "not_allowed": "不允许", "not_available": "不适用", - "not_in_any_album": "未收录于任何相簿", + "not_in_any_album": "未收录于任何相册", "not_selected": "未选择", + "not_set": "未设置", "notes": "备注", "nothing_here_yet": "暂无内容", "notification_backup_reliability": "启用通知以提高后台备份的可靠性", + "notification_enabled_list_tile_content": "Immich 使用通知功能进行后台备份。您可以在设备设置中管理这些通知。", + "notification_enabled_list_tile_open_button": "打开设置", + "notification_enabled_list_tile_title": "已启用通知", "notification_permission_dialog_content": "要想开启通知功能,需要去“设置”里手动允许。", "notification_permission_list_tile_content": "请授予(相关)权限,以开启通知功能。", "notification_permission_list_tile_enable_button": "启用通知", @@ -1517,6 +1542,8 @@ "obtainium_configurator": "Obtainium 配置器", "obtainium_configurator_instructions": "使用 Obtainium 直接从 Immich 的 GitHub 发布页安装和更新 Android 应用。请创建一个 API 密钥并选择一个版本,以生成你的 Obtainium 配置链接", "ocr": "OCR", + "ocr_body": "Immich 现在可以读取照片中的文字,因此你可以根据照片里的内容来搜索它们。", + "ocr_title": "搜索照片中的文字", "official_immich_resources": "Immich官方资源", "offline": "离线", "offset": "偏移量", @@ -1535,13 +1562,15 @@ "open": "打开", "open_calendar": "打开日历", "open_in_browser": "在浏览器中打开", + "open_in_immich_body": "在 Android 上将 Immich 设为图库应用,即可直接从其他应用打开照片。", + "open_in_immich_title": "在 Immich 中打开照片", "open_in_map_view": "在地图视图中打开", "open_in_openstreetmap": "在 OpenStreetMap 中打开", "open_the_search_filters": "打开搜索筛选", "options": "选项", "or": "或", - "organize_into_albums": "整理到相簿中", - "organize_into_albums_description": "使用当前的同步设置,将现有照片归入相簿", + "organize_into_albums": "整理到相册中", + "organize_into_albums_description": "使用当前的同步设置,将现有照片归入相册", "organize_your_library": "整理您的资源库", "orientation": "方向", "original": "原始的", @@ -1584,7 +1613,7 @@ "permanent_deletion_warning_setting_description": "永久删除照片/视频时显示警告", "permanently_delete": "永久删除", "permanently_delete_assets_count": "永久删除{count, plural, one {个项目} other {个项目}}", - "permanently_delete_assets_prompt": "确定要永久删除 {count, plural, one {此项目吗?} other {这 # 个项目吗?}}这也会将{count, plural, one {其} other {它们}}从所属相簿中移除。", + "permanently_delete_assets_prompt": "确定要永久删除 {count, plural, one {此项目吗?} other {这 # 个项目吗?}}这也会将{count, plural, one {其} other {它们}}从所属相册中移除。", "permanently_deleted_asset": "永久删除的项目", "permanently_deleted_assets_count": "已永久删除{count, plural, one {#个项目} other {#个项目}}", "permission": "权限", @@ -1592,7 +1621,7 @@ "person": "人物", "person_age_months": "{months, plural, one {#个月} other {#个月}}大", "person_age_year_months": "1 岁{months, plural, one {# 个月} other {# 个月}}大", - "person_age_years": "{years, plural, other {#岁}}", + "person_age_years": "{years, plural, one {# } other {# }} 岁", "person_birthdate": "出生于{date}", "person_hidden": "{name}{hidden, select, true {(隐藏)} other {}}", "person_recognized": "已识别人物", @@ -1641,7 +1670,7 @@ "profile_image_of_user": "{user}的个人资料图片", "profile_picture_set": "个人资料图片已设置。", "projection_type": "投影类型", - "public_album": "公开相簿", + "public_album": "公开相册", "public_share": "公开共享", "purchase_account_info": "支持者", "purchase_activated_subtitle": "感谢您对 Immich 和开源软件的支持", @@ -1693,7 +1722,10 @@ "recent": "最近", "recent_searches": "最近搜索", "recently_added": "近期添加", + "recently_added_body": "在专属页面上,直接查看您近期添加的所有内容。", + "recently_added_description": "浏览您的媒体,并按上传到 Immich 的时间排序。", "recently_added_page_title": "最近添加", + "recently_added_title": "最近添加", "recently_taken": "近期拍摄", "refresh": "刷新", "refresh_encoded_videos": "刷新已编码的视频", @@ -1714,8 +1746,8 @@ "remove_assets_title": "移除项目?", "remove_custom_date_range": "取消自定义日期范围", "remove_filter": "移除过滤", - "remove_from_album": "从相簿中移除", - "remove_from_album_action_prompt": "从相簿中移除了 {count} 项", + "remove_from_album": "从相册中移除", + "remove_from_album_action_prompt": "从相册中移除了 {count} 项", "remove_from_favorites": "从收藏移除", "remove_from_lock_folder_action_prompt": "已从锁定的文件夹中移除 {count} 项", "remove_from_locked_folder": "从锁定文件夹中移除", @@ -1775,11 +1807,11 @@ "scan_all_libraries": "扫描所有图库", "scan_library": "扫描", "scanning": "扫描中", - "scanning_for_album": "扫描相簿中...", + "scanning_for_album": "扫描相册中...", "screencast_mode_description": "在屏幕上显示键盘和鼠标事件指示器", "screencast_mode_title": "切换屏幕录制模式", "search": "搜索", - "search_albums": "搜索相簿", + "search_albums": "搜索相册", "search_by_context": "通过描述的场景查找", "search_by_description": "通过描述查找", "search_by_description_example": "在沙巴徒步的日子", @@ -1799,7 +1831,7 @@ "search_filter_date": "日期", "search_filter_date_interval": "从{start}到{end}", "search_filter_date_title": "选择日期范围", - "search_filter_display_option_not_in_album": "不在相簿中", + "search_filter_display_option_not_in_album": "不在相册中", "search_filter_display_options": "显示选项", "search_filter_filename": "通过文件名搜索", "search_filter_location": "位置", @@ -1831,9 +1863,9 @@ "second": "秒", "see_all_people": "查看所有人物", "select": "选择", - "select_album": "选择相簿", - "select_album_cover": "选择相簿封面", - "select_albums": "选择多个相簿", + "select_album": "选择相册", + "select_album_cover": "选择相册封面", + "select_albums": "选择相册", "select_all": "全选", "select_all_duplicates": "选择所有重复项", "select_avatar_color": "选择头像颜色", @@ -1867,7 +1899,7 @@ "server_update_available": "服务器更新可用", "server_version": "服务器版本", "set": "设置", - "set_as_album_cover": "设为相簿封面", + "set_as_album_cover": "设为相册封面", "set_as_featured_photo": "设置为特色照片", "set_as_profile_picture": "设为个人资料图片", "set_date_of_birth": "设置出生日期", @@ -1900,11 +1932,13 @@ "share_link": "分享链接", "share_original": "使用原图(大)", "share_preview": "使用缩略图(小)", + "share_quality_body": "在分享之前,长按分享按钮以选择图像质量。", + "share_quality_title": "选择分享画质", "shared": "共享", "shared_album_activities_input_disable": "评论已禁用", "shared_album_activity_remove_content": "是否删除此活动?", "shared_album_activity_remove_title": "删除活动", - "shared_album_section_people_action_error": "退出/删除相簿失败", + "shared_album_section_people_action_error": "退出/删除相册失败", "shared_album_section_people_title": "人物", "shared_by": "共享自", "shared_by_user": "由“{user}”共享", @@ -1915,6 +1949,8 @@ "shared_link_clipboard_copied_massage": "复制到剪贴板", "shared_link_create_error": "创建共享链接出错", "shared_link_custom_url_description": "使用自定义URL访问此共享链接", + "shared_link_custom_url_title": "自定义 URL", + "shared_link_custom_url_warning": "注意:带有正斜杠的自定义URL名称可能不会像您预期的那样运行。", "shared_link_edit_description_hint": "编辑共享描述", "shared_link_edit_expire_after_option_day": "1天", "shared_link_edit_expire_after_option_days": "{count}天", @@ -1949,8 +1985,8 @@ "sharing": "共享", "sharing_enter_password": "请输入密码后查看此页面。", "shift_to_permanent_delete": "按住 ⇧ Shift 键永久删除项目", - "show_album_options": "显示相簿选项", - "show_albums": "显示相簿", + "show_album_options": "显示相册选项", + "show_albums": "显示相册", "show_all_people": "显示所有人物", "show_and_hide_people": "显示和隐藏人物", "show_file_location": "显示文件位置", @@ -1981,19 +2017,22 @@ "sign_out": "退出登录", "sign_up": "注册", "size": "大小", + "skip": "跳过", "skip_to_content": "跳转到内容", "skip_to_folders": "跳转到文件夹", "skip_to_tags": "跳转到标签", "slideshow": "幻灯片放映", + "slideshow_body": "坐下来,以全屏幻灯片形式欣赏您的照片。", "slideshow_metadata_overlay_mode": "叠加内容显示", "slideshow_metadata_overlay_mode_description_only": "仅描述", "slideshow_metadata_overlay_mode_full": "完整信息", "slideshow_repeat": "重复幻灯片", "slideshow_repeat_description": "幻灯片结束后循环播放", "slideshow_settings": "放映设置", + "slideshow_title": "幻灯片放映", "smart_album": "智能相册", "some_assets_already_have_a_location_warning": "部分所选项目已有位置信息", - "sort_albums_by": "相簿排序...", + "sort_albums_by": "相册排序...", "sort_created": "创建日期", "sort_items": "项目数量", "sort_modified": "修改日期", @@ -2036,12 +2075,12 @@ "supporter": "赞助者", "swap_merge_direction": "互换合并方向", "sync": "同步", - "sync_albums": "同步相簿", + "sync_albums": "同步相册", "sync_local": "同步本地", "sync_remote": "同步远程", "sync_status": "同步状态", "sync_status_subtitle": "查看和管理同步系统", - "sync_upload_album_setting_subtitle": "创建照片和视频并上传到 Immich 上选定的相簿", + "sync_upload_album_setting_subtitle": "创建照片和视频并上传到 Immich 上选定的相册", "system_theme": "系统主题", "system_theme_command_description": "使用系统主题({value})", "tag": "标签", @@ -2118,14 +2157,15 @@ "unknown": "未知", "unknown_country": "未知的国家", "unknown_date": "未知日期", + "unknown_schema": "未知架构", "unknown_year": "未知年份", "unlimited": "无限制", "unlink_motion_video": "取消链接动态视频", "unlink_oauth": "解绑 OAuth", "unlinked_oauth_account": "解绑 OAuth 账户", "unmute_memories": "取消静音回忆", - "unnamed_album": "未命名相簿", - "unnamed_album_delete_confirmation": "您确定要删除该相簿吗?", + "unnamed_album": "未命名相册", + "unnamed_album_delete_confirmation": "您确定要删除该相册吗?", "unnamed_share": "未命名共享", "unsaved_change": "修改未保存", "unselect_all": "取消全选", @@ -2153,6 +2193,8 @@ "upload_status_errors": "错误", "upload_status_uploaded": "已上传", "upload_success": "上传成功,刷新页面查看新上传的项目。", + "upload_to_album_body": "对于不使用手动上传功能的用户,现在您可以选择在上传本地照片的同时直接将其添加到相册中,无需再先上传后添加。", + "upload_to_album_title": "直接上传至相册", "upload_to_immich": "上传至Immich({count})", "uploading": "正在上传", "uploading_media": "文件上传中", @@ -2180,7 +2222,7 @@ "user_usage_stats_description": "查看帐户使用统计信息", "username": "用户名", "users": "用户", - "users_added_to_album_count": "已将 {count, plural, one {# 个用户} other {# 个用户}} 添加到相簿", + "users_added_to_album_count": "已将 {count, plural, one {# 个用户} other {# 个用户}} 添加到相册", "utilities": "实用工具", "validate": "验证", "validate_endpoint_error": "请输入有效的 URL", @@ -2197,7 +2239,7 @@ "videos": "视频", "videos_count": "{count, plural, one {#个视频} other {#个视频}}", "view": "查看", - "view_album": "查看相簿", + "view_album": "查看相册", "view_all": "查看全部", "view_all_users": "查看全部用户", "view_asset_owners": "查看项目所有者", @@ -2220,6 +2262,9 @@ "week": "周", "welcome": "欢迎", "welcome_to_immich": "欢迎使用 Immich", + "whats_new": "新功能", + "whats_new_settings_subtitle": "看看Immich有什么新变化", + "whats_new_version": "版本:{version}", "when": "当", "width": "宽度", "wifi_name": "Wi-Fi名称", diff --git a/i18n/zh_Hant.json b/i18n/zh_Hant.json index e5f273dd21..ec133e09a4 100644 --- a/i18n/zh_Hant.json +++ b/i18n/zh_Hant.json @@ -23,7 +23,7 @@ "add_location": "新增地點", "add_partner": "新增親友", "add_photos": "加入相片", - "add_step": "添加步驟", + "add_step": "新增步驟", "add_tag": "新增標籤", "add_to": "加入至…", "add_to_album": "加入到相簿", @@ -73,7 +73,7 @@ "cron_expression_description": "使用 Cron 格式設定掃描間隔。更多資訊請參閱 Crontab Guru", "cron_expression_presets": "Cron 表達式預設值", "disable_login": "停用登入", - "download_csv": "下載CSV檔案", + "download_csv": "下載 CSV 檔案", "duplicate_detection_job_description": "針對資產執行機器學習以偵測相似圖片。需依賴「智慧搜尋」功能", "exclusion_pattern_description": "排除模式可讓您在掃描媒體庫時忽略特定檔案與資料夾。若某些資料夾包含您不想匯入的檔案(例如 RAW 檔),此功能將非常有用。", "export_config_as_json_description": "將目前系統設定下載為 JSON 檔案", @@ -108,6 +108,21 @@ "image_thumbnail_quality_description": "縮圖品質範圍為 1 到 100。數值越高品質越好,但檔案也會更大,並可能降低應用程式的回應速度。", "image_thumbnail_title": "縮圖設定", "import_config_from_json_description": "透過上傳 JSON 設定檔匯入系統設定", + "integrity_checks_checksum_files": "校驗檔案", + "integrity_checks_checksum_files_description": "設定校驗和檢查", + "integrity_checks_checksum_files_enable_description": "啟用校驗和檢查", + "integrity_checks_checksum_files_percentage_limit": "百分比限制", + "integrity_checks_checksum_files_percentage_limit_description": "設定每個區間內,校驗和檢驗所能執行的最大百分比,數值範圍介於 0.01 到 1 之間。", + "integrity_checks_checksum_files_time_limit": "時間限制", + "integrity_checks_checksum_files_time_limit_description": "設定每個週期中,校驗和檢查的最長執行時間。(毫秒)", + "integrity_checks_missing_files": "遺失的檔案", + "integrity_checks_missing_files_description": "設定執行頻率,並啟用或停用遺失檔案檢查", + "integrity_checks_missing_files_enable_description": "啟用遺失檔案檢查", + "integrity_checks_settings": "完整性檢查", + "integrity_checks_settings_description": "管理完整性檢查間隔", + "integrity_checks_untracked_files": "未追蹤的檔案", + "integrity_checks_untracked_files_description": "設定頻率,並啟用或停用未追蹤檔案檢查", + "integrity_checks_untracked_files_enable_description": "啟用未追蹤檔案檢查", "job_concurrency": "{job} 並行數", "job_created": "已建立任務", "job_not_concurrency_safe": "此任務不支援並行執行。", @@ -130,7 +145,7 @@ "library_tasks_description": "掃描外部媒體庫以尋找新增或變更的項目", "library_updated": "更新媒體庫", "library_watching_enable_description": "監控外部媒體庫的檔案變化", - "library_watching_settings": "媒體庫監控[實驗性]", + "library_watching_settings": "媒體庫監控 [實驗性]", "library_watching_settings_description": "自動監控檔案的變化", "logging_enable_description": "啟用紀錄功能", "logging_level_description": "啟用時的紀錄層級。", @@ -159,7 +174,7 @@ "machine_learning_max_detection_distance": "偵測距離上限", "machine_learning_max_detection_distance_description": "若兩張影像間的距離小於此將被判斷為相同,範圍為 0.001-0.1。數值越高能偵測到越多重複,但也更有可能誤判。", "machine_learning_max_recognition_distance": "辨識距離上限", - "machine_learning_max_recognition_distance_description": "兩張臉孔被視為同一人物的最大距離,範圍為 0 至 2。降低此數值可避免將不同人物標記為同一人;提高此數值則可避免將同一人物標記為兩個不同的人。請注意,合併人物比拆分人物更容易,因此建議在可能的情況下將此門檻值設定得較低。", + "machine_learning_max_recognition_distance_description": "兩張臉孔被視為同一人物的最大距離,範圍為 0 至 2。降低此數值可避免將不同人物標記為同一人;提高此數值則可避免將同一人物標記為兩個不同的人。請注意,合併人物比拆開人物更容易,因此建議在可能的情況下將此門檻值設定得較低。", "machine_learning_min_detection_score": "最低偵測分數", "machine_learning_min_detection_score_description": "臉孔偵測的最低信心分數,範圍為 0 - 1。較低的數值會偵測到更多臉孔,但可能導致誤判。", "machine_learning_min_recognized_faces": "最低臉部辨識數量", @@ -192,16 +207,16 @@ "maintenance_integrity_checksum_mismatch": "檢查碼不符", "maintenance_integrity_checksum_mismatch_description": "檔案的總和檢查碼與資料庫的不符。", "maintenance_integrity_checksum_mismatch_job": "檢查有否檢查碼不符", - "maintenance_integrity_checksum_mismatch_refresh_job": "刷新檢查碼不符報告", + "maintenance_integrity_checksum_mismatch_refresh_job": "重新整理檢查碼不符報告", "maintenance_integrity_missing_file": "缺失檔案", "maintenance_integrity_missing_file_description": "已在資料庫中追蹤,但檔案系統中並不存在的檔案。", "maintenance_integrity_missing_file_job": "檢查缺失檔案", - "maintenance_integrity_missing_file_refresh_job": "刷新缺失檔案報告", + "maintenance_integrity_missing_file_refresh_job": "重新整理缺失檔案報告", "maintenance_integrity_report": "完整性報告", "maintenance_integrity_untracked_file": "未追蹤檔案", "maintenance_integrity_untracked_file_description": "在 Immich 的目錄中,但沒有任何紀錄的檔案。", "maintenance_integrity_untracked_file_job": "檢查未追蹤檔案", - "maintenance_integrity_untracked_file_refresh_job": "刷新未追蹤檔案報告", + "maintenance_integrity_untracked_file_refresh_job": "重新整理未追蹤檔案報告", "maintenance_restore_backup": "還原備份", "maintenance_restore_backup_description": "Immich 的資料將被清除,並從選取的備份還原。在繼續操作前,系統會先建立目前的資料備份。", "maintenance_restore_backup_different_version": "此備份是由不同版本的 Immich 所建立!", @@ -283,9 +298,9 @@ "oauth_auto_register": "自動註冊", "oauth_auto_register_description": "使用 OAuth 登入後自動註冊新使用者", "oauth_button_text": "按鈕文字", - "oauth_client_secret_description": "機密用戶端的必填項目;若公開用戶端不支援 PKCE (代碼交換的驗證金鑰),亦須填寫。", + "oauth_client_secret_description": "機密用戶端的必填項目;若公開用戶端不支援 PKCE(代碼交換的驗證金鑰),亦須填寫。", "oauth_enable_description": "使用 OAuth 登入", - "oauth_end_session_url_description": "用戶登出時將其導向到此URL。", + "oauth_end_session_url_description": "使用者登出時將其重新導向到此 URL。", "oauth_mobile_redirect_uri": "行動端重新導向 URI", "oauth_mobile_redirect_uri_override": "覆寫行動端重新導向 URI", "oauth_mobile_redirect_uri_override_description": "當 OAuth 提供者不允許使用行動端 URI(例如 ''{callback}'')時啟用", @@ -317,7 +332,7 @@ "registration": "管理者註冊", "registration_description": "由於您是系統上的第一位使用者,您將被指派為系統管理員,並負責管理相關事務,後續的其他使用者也將由您建立。", "release_channel_release_candidate": "候選發布版", - "release_channel_stable": "稳定版", + "release_channel_stable": "穩定版", "remove_failed_jobs": "移除失敗任務", "require_password_change_on_login": "要求使用者在首次登入時變更密碼", "reset_settings_to_default": "將設定重設為預設值", @@ -402,7 +417,7 @@ "transcoding_max_b_frames": "最大 B 幀數", "transcoding_max_b_frames_description": "較高的數值可提升壓縮效率,但會降低編碼速度。在較舊的裝置上,可能與硬體加速不相容。0 代表停用 B 幀,而 -1 則會自動設定此數值。", "transcoding_max_bitrate": "最大位元速率", - "transcoding_max_bitrate_description": "設定最大位元率能讓檔案大小更穩定,但會稍微犧牲品質。720p 下的典型值為:VP9 或 HEVC 為 2600 kbit/s,H.264 為 4500 kbit/s。設為 0 則停用。若未指定單位,系統將預設為 k (即 kbit/s);因此 5000、5000k 與 5M (即 Mbit/s) 是等效的。", + "transcoding_max_bitrate_description": "設定最大位元率能讓檔案大小更穩定,但會稍微犧牲品質。720p 下的典型值為:VP9 或 HEVC 為 2600 kbit/s,H.264 為 4500 kbit/s。設為 0 則停用。若未指定單位,系統將預設為 k(即 kbit/s);因此 5000、5000k 與 5M(即 Mbit/s)是等效的。", "transcoding_max_keyframe_interval": "最大關鍵幀間隔", "transcoding_max_keyframe_interval_description": "設定關鍵幀之間的最大幀距。較低的數值會降低壓縮效率,但可改善跳轉搜尋時間並提升高動態場景品質。0 為自動設定。", "transcoding_optimal_description": "高於目標解析度或格式不在可接受範圍的影片", @@ -412,10 +427,14 @@ "transcoding_preferred_hardware_device_description": "僅適用於 VAAPI 和 QSV。設定用於硬體轉碼的 dri 節點。", "transcoding_preset_preset": "預設值(-preset)", "transcoding_preset_preset_description": "壓縮速度。較慢的預設值可產生體積較小的檔案,並在指定位元率時提升品質。VP9 會忽略高於「faster」的設定。", - "transcoding_realtime": "即時轉碼 [實驗性功能]", + "transcoding_realtime": "即時轉碼 [實驗性]", "transcoding_realtime_description": "允許在影片串流傳輸(播放)的同時即時進行轉碼。此功能支援動態切換畫質,但根據伺服器效能的不同,可能會導致較高的播放延遲或畫面卡頓。", "transcoding_realtime_enabled": "啟用即時轉碼", "transcoding_realtime_enabled_description": "如果停用,伺服器將拒絕啟動新的即時轉碼工作階段。", + "transcoding_realtime_resolutions": "解析度", + "transcoding_realtime_resolutions_description": "即時轉碼所提供的解析度。如果伺服器無法以足夠快的速度進行轉碼,使用更高的解析度可能會導致播放問題。", + "transcoding_realtime_video_codecs": "影片編碼器", + "transcoding_realtime_video_codecs_description": "用於即時轉碼的影片編碼器選項。用戶端會在播放的時候選擇支援的最佳方案。AV1 的效率高於 HEVC,而 HEVC 的效率又高於 H.264。使用硬體加速時,請只選擇加速器支援編碼的編碼器。使用軟體轉碼時,H.264 的速度快於 AV1,而 AV1 的速度快於 HEVC。", "transcoding_reference_frames": "參考幀", "transcoding_reference_frames_description": "在壓縮特定幀時所參考的幀數量。數值越高可提升壓縮效率,但會降低編碼速度。設為 0 則自動決定此數值。", "transcoding_required_description": "僅限格式不被接受的影片", @@ -474,12 +493,12 @@ "advanced": "進階", "advanced_settings_clear_image_cache": "清除圖片快取", "advanced_settings_clear_image_cache_error": "清除圖片快取失敗", - "advanced_settings_clear_image_cache_success": "成功清除{size}", + "advanced_settings_clear_image_cache_success": "成功清除 {size}", "advanced_settings_log_level_title": "紀錄等級:{level}", "advanced_settings_prefer_remote_subtitle": "部分裝置從本機項目載入縮圖的速度非常慢。啟用此設定可改為載入遠端圖片。", "advanced_settings_prefer_remote_title": "偏好遠端影像", "advanced_settings_proxy_headers_subtitle": "定義 Immich 在每次網路請求時應該傳送的代理標頭", - "advanced_settings_proxy_headers_title": "自訂代理標頭[實驗性]", + "advanced_settings_proxy_headers_title": "自訂代理標頭 [實驗性]", "advanced_settings_readonly_mode_subtitle": "啟用唯讀模式後僅能瀏覽相片,將停用多選、分享、投放及刪除等功能。可透過主畫面上的使用者個人圖示啟用或停用唯讀模式", "advanced_settings_readonly_mode_title": "唯讀模式", "advanced_settings_sync_remote_deletions_subtitle": "當在網頁端執行刪除或還原操作時,自動在此裝置上刪除或還原該項目", @@ -547,7 +566,7 @@ "archive_action_prompt": "已將 {count} 個項目加入封存", "archive_or_unarchive_photo": "封存或取消封存相片", "archive_size": "封存大小", - "archive_size_description": "設定要下載的封存檔案大小 (單位:GiB)", + "archive_size_description": "設定要下載的封存檔案大小(單位:GiB)", "archived": "已封存", "archived_count": "{count, plural, other {已封存 # 個項目}}", "are_these_the_same_person": "同一位人物?", @@ -578,6 +597,7 @@ "asset_viewer_settings_title": "項目檢視器", "assets": "項目", "assets_added_to_album_count": "已將 {count, plural, one {# 個項目} other {# 個項目}}加入至相簿", + "assets_added_to_album_partial_count": "已從 {totalCount} {totalCount, plural, one {件} other {件}} 項目中成功新增 {successCount} 件項目到相簿中", "assets_added_to_albums_count": "已將 {assetTotal, plural, other {# 個項目}} 新增至 {albumTotal, plural, other {# 本相簿}}", "assets_cannot_be_added_to_album_count": "無法將 {count, plural, one {項目} other {項目}} 加入至相簿", "assets_cannot_be_added_to_albums": "無法將 {count, plural, one {項目} other {項目}} 加入任何相簿", @@ -715,7 +735,7 @@ "collapse": "折疊", "collapse_all": "全部折疊", "color": "顏色", - "command": "命令", + "command": "指令", "command_palette_prompt": "快速搜尋頁面、動作或指令", "command_palette_to_close": "關閉", "command_palette_to_navigate": "輸入", @@ -794,7 +814,6 @@ "custom_date": "另選日期", "custom_locale": "自訂地區設定", "custom_locale_description": "根據選定語言與地區格式化日期、時間與數字", - "custom_url": "自訂 URL", "cutoff_date_description": "保留最近多少天的相片…", "cutoff_day": "{count, plural, one {天} other {天}}", "cutoff_year": "{count, plural, one {年} other {年}}", @@ -906,7 +925,7 @@ "editor": "編輯器", "editor_discard_edits_confirm": "放棄編輯", "editor_discard_edits_prompt": "您有尚未儲存的編輯內容。確定要捨棄嗎?", - "editor_discard_edits_title": "確認放棄編輯嗎?", + "editor_discard_edits_title": "要捨棄編輯嗎?", "editor_edits_applied_error": "無法套用編輯", "editor_edits_applied_success": "已成功套用編輯", "editor_flip_horizontal": "水平翻轉", @@ -1068,7 +1087,7 @@ }, "errors_text": "錯誤", "exclusion_pattern": "排除模式", - "exif": "EXIF", + "exif": "Exif 資訊", "exif_bottom_sheet_description": "新增描述...", "exif_bottom_sheet_description_error": "更新描述時發生錯誤", "exif_bottom_sheet_no_description": "無描述", @@ -1094,7 +1113,7 @@ "face_unassigned": "未指派", "failed": "失敗", "failed_count": "失敗:{count}", - "failed_to_authenticate": "身份驗證失敗", + "failed_to_authenticate": "身分驗證失敗", "failed_to_delete_file": "無法刪除檔案", "failed_to_load_assets": "項目載入失敗", "failed_to_load_folder": "無法載入資料夾", @@ -1192,7 +1211,7 @@ "import_path": "匯入路徑", "in_albums": "在 {count, plural, one {# 本相簿} other {# 本相簿}}中", "in_archive": "在封存中", - "in_year": "{year}年", + "in_year": "{year} 年", "in_year_selector": "在", "include_archived": "包含已封存", "include_shared_albums": "包含共享相簿", @@ -1216,14 +1235,14 @@ "jobs": "任務", "keep": "保留", "keep_albums": "保留相簿", - "keep_albums_count": "保留{count} {count, plural, one {本相簿} other {本相簿}}", + "keep_albums_count": "保留 {count} {count, plural, one {本相簿} other {本相簿}}", "keep_all": "全部保留", "keep_description": "選擇執行釋放空間時要保留在裝置上的項目。", "keep_favorites": "保留最愛的相片", "keep_on_device": "保留在裝置上", "keep_on_device_hint": "選擇保留在裝置上的相片", "keep_this_delete_others": "保留這個,刪除其他", - "keeping": "保留:{items}", + "keeping": "保留:{items}", "kept_this_deleted_others": "保留這個項目並刪除{count, plural, one {# 個項目} other {# 個項目}}", "keyboard_shortcuts": "鍵盤快捷鍵", "language": "語言", @@ -1268,7 +1287,7 @@ "local": "本機", "local_asset_cast_failed": "無法投放未上傳至伺服器的項目", "local_assets": "本機項目", - "local_id": "本地 ID", + "local_id": "本機 ID", "local_media_summary": "本機媒體摘要", "local_network": "本機網路", "local_network_sheet_info": "當使用指定的 Wi-Fi 網路時,應用程式將透過此網址連線至伺服器", @@ -1281,11 +1300,11 @@ "location_picker_longitude_error": "輸入有效的經度值", "location_picker_longitude_hint": "請在此處輸入您的經度值", "lock": "鎖定", - "locked_folder": "已鎖定資料夾", + "locked_folder": "已上鎖的資料夾", "log_detail_title": "紀錄詳細資訊", "log_out": "登出", "log_out_all_devices": "登出所有裝置", - "logged_in_as": "以{user}身分登入", + "logged_in_as": "以 {user} 身分登入", "logged_out_all_devices": "已登出所有裝置", "logged_out_device": "已登出裝置", "login": "登入", @@ -1342,7 +1361,7 @@ "make": "製造商", "manage_geolocation": "管理位置資訊", "manage_media_access_rationale": "需要此權限才能處理項目移至垃圾桶與還原的操作。", - "manage_media_access_settings": "打開設定", + "manage_media_access_settings": "開啟設定", "manage_media_access_subtitle": "允許 Immich App 管理與移動媒體檔案。", "manage_media_access_title": "媒體管理存取權限", "manage_sharing_with_partners": "管理親友共享設定", @@ -1445,7 +1464,7 @@ "moved_to_trash": "已丟進垃圾桶", "mute_memories": "靜音回憶", "my_albums": "我的相簿", - "my_immich_description": "複製當前頁面為 My Immich 連結", + "my_immich_description": "複製目前頁面為 My Immich 連結", "my_immich_title": "My Immich 連結", "name": "名稱", "name_or_nickname": "名稱或暱稱", @@ -1461,6 +1480,7 @@ "never": "永不失效", "new_album": "新相簿", "new_api_key": "新的 API 金鑰", + "new_feature": "新功能", "new_password": "新密碼", "new_person": "新的人物", "new_pin_code": "新 PIN 碼", @@ -1498,17 +1518,18 @@ "no_results": "沒有結果", "no_results_description": "試試同義詞或更通用的關鍵字吧", "no_shared_albums_message": "建立共享相簿以分享相片與影片", - "no_steps": "未添加任何步驟", + "no_steps": "未新增任何步驟", "none": "無", "not_allowed": "不允許", "not_available": "不適用", "not_in_any_album": "不在任何相簿中", "not_selected": "未選取", + "not_set": "未設定", "notes": "提示", "nothing_here_yet": "暫無訊息", "notification_backup_reliability": "啟用通知可提高背景備份的可靠性", "notification_enabled_list_tile_content": "Immich 會使用通知以完成背景備份。請在系統設定中管理通知。", - "notification_enabled_list_tile_open_button": "打開設定", + "notification_enabled_list_tile_open_button": "開啟設定", "notification_enabled_list_tile_title": "啟用通知", "notification_permission_dialog_content": "開啟通知,請前往「設定」,並選擇「允許」。", "notification_permission_list_tile_content": "開啟通知權限。", @@ -1521,6 +1542,8 @@ "obtainium_configurator": "Obtainium 設定工具", "obtainium_configurator_instructions": "使用 Obtainium 直接從 Immich GitHub 的發行版本安裝並更新 Android App。建立 API 金鑰並選取版本類型以產生您的 Obtainium 設定連結", "ocr": "OCR", + "ocr_body": "Immich 可以辨識你照片裡的文字,所以你可以透過照片裡的文字來搜尋照片。", + "ocr_title": "在您的照片中搜尋文字", "official_immich_resources": "官方 Immich 資源", "offline": "離線", "offset": "移動", @@ -1537,8 +1560,10 @@ "online": "線上", "only_favorites": "僅顯示己收藏", "open": "開啟", - "open_calendar": "打開日曆", + "open_calendar": "開啟日曆", "open_in_browser": "在瀏覽器中開啟", + "open_in_immich_body": "在 Android 裝置上將 Immich 設定為媒體庫,即可直接從其他應用程式開啟照片。", + "open_in_immich_title": "在 Immich 裡面開啟照片", "open_in_map_view": "開啟地圖檢視", "open_in_openstreetmap": "用 OpenStreetMap 開啟", "open_the_search_filters": "開啟搜尋篩選器", @@ -1596,7 +1621,7 @@ "person": "人物", "person_age_months": "{months, plural, one {# 個月} other {# 個月}}", "person_age_year_months": "1 年 {months, plural, one {# 個月} other {# 個月}}", - "person_age_years": "{years, plural, other {# 歲}}", + "person_age_years": "{years, plural, one {# 歲} other {# 歲}}", "person_birthdate": "出生於 {date}", "person_hidden": "{name}{hidden, select, true {(隱藏)} other {}}", "person_recognized": "已辨識人物", @@ -1621,7 +1646,7 @@ "play_original_video": "播放原始影片", "play_original_video_setting_description": "優先播放原始影片而非轉碼後的影片。若原始項目不相容,可能無法正常播放。", "play_transcoded_video": "播放轉碼影片", - "please_auth_to_access": "請進行身份驗證才能存取", + "please_auth_to_access": "請進行身分驗證才能存取", "plugin_method_filter_type": "篩選", "plugin_method_filter_type_description": "此方法可篩選事件,並有條件地阻止後續步驟執行", "port": "連接埠", @@ -1697,7 +1722,10 @@ "recent": "最近", "recent_searches": "最近搜尋項目", "recently_added": "最近新增", + "recently_added_body": "前往專屬頁面,直接查看您最近新增的所有內容。", + "recently_added_description": "瀏覽您的項目,並按上傳到 Immich 的時間排序", "recently_added_page_title": "最近新增", + "recently_added_title": "最近新增", "recently_taken": "最近拍攝", "refresh": "重新整理", "refresh_encoded_videos": "重新整理已編碼的影片", @@ -1760,7 +1788,7 @@ "restore_user": "還原使用者", "restored_asset": "已還原檔案", "resume": "繼續", - "resume_paused_jobs": "恢復 {count, plural, one {# 暫停的任務} other {# 暫停的任務}}", + "resume_paused_jobs": "復原 {count, plural, one {# 暫停的任務} other {# 暫停的任務}}", "review_duplicates": "檢查重複內容", "review_large_files": "檢查大型檔案", "role": "角色", @@ -1774,7 +1802,7 @@ "saved_settings": "已儲存設定", "say_something": "說說您的想法吧", "scaffold_body_error_occurred": "發生錯誤", - "scaffold_body_error_unrecoverable": "發生無法恢復的錯誤。請在 Discord 或 Github 上分享錯誤資訊及堆疊追蹤,以便我們提供協助。在被建議的情況下你可以在下方嘗試清除程式資料。", + "scaffold_body_error_unrecoverable": "發生無法復原的錯誤。請在 Discord 或 Github 上分享錯誤資訊及堆疊追蹤,以便我們提供協助。在被建議的情況下你可以在下方嘗試清除程式資料。", "scan": "掃描", "scan_all_libraries": "掃描所有相簿", "scan_library": "掃描", @@ -1790,7 +1818,7 @@ "search_by_filename": "依檔名或副檔名搜尋", "search_by_filename_example": "如 IMG_1234.JPG 或 PNG", "search_by_full_path": "依完整路徑或資料夾搜尋", - "search_by_full_path_example": "/John/Projects/3D_Printing/2026-07-01 - 您可以搜尋 Projects、3D、Printing、2026 等", + "search_by_full_path_example": "/John/Projects/3D_Printing/2026-07-01 - 您可以搜尋 Projects、3D、Printing、2026 等。", "search_by_ocr": "透過 OCR 搜尋", "search_by_ocr_example": "拿鐵", "search_camera_lens_model": "搜尋鏡頭型號...", @@ -1851,7 +1879,7 @@ "select_people": "選擇人物", "select_person": "選取人物", "select_person_to_tag": "選擇要標記的人物", - "select_photos": "選相片", + "select_photos": "選取相片", "select_quality": "選擇畫質", "select_trash_all": "全部刪除", "selected": "已選取", @@ -1902,8 +1930,10 @@ "share": "分享", "share_dialog_preparing": "正在準備...", "share_link": "分享連結", - "share_original": "使用原圖 (大)", + "share_original": "使用原圖(大)", "share_preview": "使用縮圖(小)", + "share_quality_body": "長按分享按鈕即可在分享之前選擇圖片品質。", + "share_quality_title": "選擇您的分享品質", "shared": "共享", "shared_album_activities_input_disable": "留言功能已停用", "shared_album_activity_remove_content": "您確定要刪除此活動嗎?", @@ -1918,7 +1948,9 @@ "shared_link_app_bar_title": "分享連結", "shared_link_clipboard_copied_massage": "已複製到剪貼簿", "shared_link_create_error": "建立分享連結時發生錯誤", - "shared_link_custom_url_description": "使用自訂 URL", + "shared_link_custom_url_description": "使用自訂 URL 名稱來使用共享連結", + "shared_link_custom_url_title": "自訂 URL", + "shared_link_custom_url_warning": "警告:使用正斜杠的自訂 URL 名稱未必會與你所預期的一樣運行。", "shared_link_edit_description_hint": "編輯共享描述", "shared_link_edit_expire_after_option_day": "1 天", "shared_link_edit_expire_after_option_days": "{count} 天", @@ -1985,17 +2017,20 @@ "sign_out": "登出", "sign_up": "註冊", "size": "用量", + "skip": "跳過", "skip_to_content": "跳至內容", "skip_to_folders": "跳到資料夾", "skip_to_tags": "跳轉到標籤", "slideshow": "幻燈片", + "slideshow_body": "請放鬆觀看,您的照片會以全螢幕幻燈片形式播放。", "slideshow_metadata_overlay_mode": "覆蓋內容", "slideshow_metadata_overlay_mode_description_only": "僅描述", "slideshow_metadata_overlay_mode_full": "完整", "slideshow_repeat": "重複投影片", "slideshow_repeat_description": "循環播放", "slideshow_settings": "幻燈片設定", - "smart_album": "智能相簿", + "slideshow_title": "幻燈片", + "smart_album": "智慧相簿", "some_assets_already_have_a_location_warning": "部分所選項目已有位置資訊", "sort_albums_by": "相簿排序依據...", "sort_created": "建立日期", @@ -2029,7 +2064,7 @@ "storage": "儲存空間", "storage_label": "儲存標籤", "storage_quota": "儲存空間", - "storage_usage": "已使用 {used} ,共 {available}", + "storage_usage": "已使用 {used},共 {available}", "submit": "提交", "success": "成功", "suggestions": "建議", @@ -2122,6 +2157,7 @@ "unknown": "未知", "unknown_country": "未知國家", "unknown_date": "未知的日期", + "unknown_schema": "未知的架構", "unknown_year": "未知年份", "unlimited": "不限制", "unlink_motion_video": "解除連結動態影片", @@ -2157,6 +2193,8 @@ "upload_status_errors": "錯誤", "upload_status_uploaded": "已上傳", "upload_success": "上傳成功,要檢視新上傳的檔案請重新整理頁面。", + "upload_to_album_body": "對於不使用手動上傳功能的使用者,現在可以選擇在上傳照片的同時直接將其新增至相簿,無需先上傳後才新增至相簿。", + "upload_to_album_title": "直接上傳到相簿", "upload_to_immich": "上傳至 Immich ({count})", "uploading": "上傳中", "uploading_media": "項目上傳中", @@ -2224,6 +2262,9 @@ "week": "週", "welcome": "歡迎", "welcome_to_immich": "歡迎使用 Immich", + "whats_new": "有什麼新東西", + "whats_new_settings_subtitle": "看看 Immich 裡有什麼新東西", + "whats_new_version": "版本:{version}", "when": "當", "width": "寬度", "wifi_name": "Wi-Fi 名稱", diff --git a/machine-learning/Dockerfile b/machine-learning/Dockerfile index 283d1f24d4..c8191e307b 100644 --- a/machine-learning/Dockerfile +++ b/machine-learning/Dockerfile @@ -160,6 +160,9 @@ ENV IMMICH_SOURCE_REF=${BUILD_SOURCE_REF} ENV IMMICH_SOURCE_COMMIT=${BUILD_SOURCE_COMMIT} ENV IMMICH_SOURCE_URL=https://github.com/immich-app/immich/commit/${BUILD_SOURCE_COMMIT} +# store huggingface in /cache subfolder to enable rootless deployment with a single volume +ENV HF_HOME=/cache/hf-cache + ENTRYPOINT ["tini", "--"] CMD ["python", "-m", "immich_ml"] diff --git a/machine-learning/conftest.py b/machine-learning/conftest.py index 57741f3807..a5acc059d1 100644 --- a/machine-learning/conftest.py +++ b/machine-learning/conftest.py @@ -1,11 +1,10 @@ import json -from typing import Any, Iterator +from types import SimpleNamespace +from typing import Any, Callable, Iterator from unittest import mock -import numpy as np import pytest from fastapi.testclient import TestClient -from numpy.typing import NDArray from PIL import Image from immich_ml.config import log @@ -17,11 +16,6 @@ def pil_image() -> Image.Image: return Image.new("RGB", (600, 800)) -@pytest.fixture -def cv_image(pil_image: Image.Image) -> NDArray[np.float32]: - return np.asarray(pil_image)[:, :, ::-1] # PIL uses RGB while cv2 uses BGR - - @pytest.fixture def mock_get_model() -> Iterator[mock.Mock]: with mock.patch("immich_ml.models.cache.from_model_type", autospec=True) as mocked: @@ -129,6 +123,18 @@ def ort_session() -> Iterator[mock.Mock]: yield mocked +@pytest.fixture(scope="function") +def stub_session() -> Callable[..., mock.Mock]: + def _make(shape: tuple[Any, ...], outputs: Any = None, name: str = "input.1") -> mock.Mock: + session = mock.Mock() + session.get_inputs.return_value = [SimpleNamespace(name=name, shape=shape)] + if outputs is not None: + session.run.return_value = outputs + return session + + return _make + + @pytest.fixture(scope="function") def ann_session() -> Iterator[mock.Mock]: with mock.patch("immich_ml.sessions.ann.Ann") as mocked: diff --git a/machine-learning/immich_ml/models/base.py b/machine-learning/immich_ml/models/base.py index 00790ce744..5c40b21f32 100644 --- a/machine-learning/immich_ml/models/base.py +++ b/machine-learning/immich_ml/models/base.py @@ -57,7 +57,7 @@ class InferenceModel(ABC): self.load() if model_kwargs: self.configure(**model_kwargs) - return self._predict(*inputs) + return self._predict(*inputs, **model_kwargs) @abstractmethod def _predict(self, *inputs: Any, **model_kwargs: Any) -> Any: ... diff --git a/machine-learning/immich_ml/models/facial_recognition/_ops.py b/machine-learning/immich_ml/models/facial_recognition/_ops.py new file mode 100644 index 0000000000..6bdf5f5c3c --- /dev/null +++ b/machine-learning/immich_ml/models/facial_recognition/_ops.py @@ -0,0 +1,74 @@ +""" +Host-side geometry for the fused face models. + +The decode, NMS and Umeyama similarity are ports of insightface (Apache-2.0, https://github.com/deepinsight/insightface) +""" + +from functools import lru_cache + +import cv2 +import numpy as np +from numpy.typing import NDArray + +from immich_ml.models.transforms import ensure_dims + +DET_SIZE = 640 +ALIGNED_SIZE = 112 + +# the FPN levels for which the fused detector emits a (scores, boxes, kps) triple, +# and the anchors each feature-map cell carries, laid out anchor-major +DET_STRIDES = (8, 16, 32) +ANCHORS_PER_CELL = 2 + +# canonical ArcFace 5-point template for a 112x112 crop +ARCFACE_DST = np.array( + [[38.2946, 51.6963], [73.5318, 51.5014], [56.0252, 71.7366], [41.5493, 92.3655], [70.7299, 92.2041]], + dtype=np.float32, +) + + +@lru_cache(maxsize=len(DET_STRIDES)) +def _anchor_centers(size: int, stride: int) -> NDArray[np.float32]: + ys, xs = np.mgrid[: size // stride, : size // stride] + centers = np.stack([xs, ys], axis=-1, dtype=np.float32).reshape(-1, 2) * stride + return np.repeat(centers, ANCHORS_PER_CELL, axis=0) + + +def decode_scrfd( + heads: list[NDArray[np.float32]], size: int = DET_SIZE +) -> tuple[NDArray[np.float32], NDArray[np.float32], NDArray[np.float32]]: + heads = [ensure_dims(head, 4) for head in heads] + scores, boxes, kps = [], [], [] + for level, stride in enumerate(DET_STRIDES): + centers = _anchor_centers(size, stride) + distance = heads[level + len(DET_STRIDES)][0] * stride + offsets = heads[level + 2 * len(DET_STRIDES)][0] * stride + scores.append(heads[level][0].squeeze(-1)) + boxes.append(np.concatenate([centers[None] - distance[:, :, :2], centers[None] + distance[:, :, 2:]], axis=2)) + kps.append(np.tile(centers, offsets.shape[2] // 2) + offsets) + + return np.concatenate(scores, axis=1), np.concatenate(boxes, axis=1), np.concatenate(kps, axis=1) + + +def nms(boxes: NDArray[np.float32], scores: NDArray[np.float32], threshold: float = 0.4) -> NDArray[np.intp]: + wh = np.column_stack([boxes[:, 0], boxes[:, 1], boxes[:, 2] - boxes[:, 0], boxes[:, 3] - boxes[:, 1]]) + keep = cv2.dnn.NMSBoxes(wh.tolist(), scores.tolist(), 0.0, threshold) # NMSBoxes treats the inputs as Sequences + return np.asarray(keep, dtype=np.intp).reshape(-1) + + +def umeyama(src: NDArray[np.float32], dst: NDArray[np.float32]) -> NDArray[np.float32]: + src_mean, dst_mean = src.mean(0), dst.mean(0) + src_c, dst_c = src - src_mean, dst - dst_mean + cov = dst_c.T @ src_c / len(src) + u, s, vt = np.linalg.svd(cov) + d = np.sign(np.linalg.det(u @ vt)) + diag = np.diag([1.0, d]) + rotation = u @ diag @ vt + scale = np.trace(np.diag(s) @ diag) / (src_c**2).sum() * len(src) + translation = dst_mean - scale * rotation @ src_mean + return np.hstack([scale * rotation, translation[:, None]], dtype=np.float32) + + +def align_face(image: NDArray[np.uint8], kps: NDArray[np.float32]) -> NDArray[np.float32]: + matrix = umeyama(kps, ARCFACE_DST) + return cv2.warpAffine(image, matrix, (ALIGNED_SIZE, ALIGNED_SIZE)).astype(np.float32) diff --git a/machine-learning/immich_ml/models/facial_recognition/detection.py b/machine-learning/immich_ml/models/facial_recognition/detection.py index 26c9208e48..a113755201 100644 --- a/machine-learning/immich_ml/models/facial_recognition/detection.py +++ b/machine-learning/immich_ml/models/facial_recognition/detection.py @@ -1,41 +1,31 @@ -from typing import Any - import numpy as np -from insightface.model_zoo import RetinaFace from numpy.typing import NDArray from immich_ml.models.base import InferenceModel -from immich_ml.models.transforms import decode_cv2 -from immich_ml.schemas import FaceDetectionOutput, ModelSession, ModelTask, ModelType +from immich_ml.models.transforms import decode_pil, letterbox, normalize +from immich_ml.schemas import FaceDetectionOutput, ModelTask, ModelType + +from ._ops import DET_SIZE, decode_scrfd, nms class FaceDetector(InferenceModel): depends = [] identity = (ModelType.DETECTION, ModelTask.FACIAL_RECOGNITION) - def __init__(self, model_name: str, min_score: float = 0.7, **model_kwargs: Any) -> None: - self.min_score = model_kwargs.pop("minScore", min_score) - super().__init__(model_name, **model_kwargs) + def _predict(self, inputs: NDArray[np.uint8] | bytes, minScore: float) -> FaceDetectionOutput: + canvas, scale = letterbox(decode_pil(inputs), DET_SIZE) + blob = normalize(canvas.astype(np.float32), mean=127.5, std=128).transpose(2, 0, 1)[None] - def _load(self) -> ModelSession: - session = self._make_session(self.model_path) - self.model = RetinaFace(session=session) - self.model.prepare(ctx_id=0, det_thresh=self.min_score, input_size=(640, 640)) + input_name = self.session.get_inputs()[0].name + heads = self.session.run(None, {input_name: blob}) + scores, boxes, kps = decode_scrfd(heads, DET_SIZE) - return session + candidates = scores >= minScore + scores, boxes, kps = scores[candidates], boxes[candidates] / scale, kps[candidates] / scale + keep = nms(boxes, scores) - def _predict(self, inputs: NDArray[np.uint8] | bytes) -> FaceDetectionOutput: - inputs = decode_cv2(inputs) - - bboxes, landmarks = self._detect(inputs) return { - "boxes": bboxes[:, :4].round(), - "scores": bboxes[:, 4], - "landmarks": landmarks, + "boxes": boxes[keep].round(), + "scores": scores[keep], + "landmarks": kps[keep].reshape(-1, 5, 2), } - - def _detect(self, inputs: NDArray[np.uint8] | bytes) -> tuple[NDArray[np.float32], NDArray[np.float32]]: - return self.model.detect(inputs) # type: ignore - - def configure(self, **kwargs: Any) -> None: - self.model.det_thresh = kwargs.pop("minScore", self.model.det_thresh) diff --git a/machine-learning/immich_ml/models/facial_recognition/recognition.py b/machine-learning/immich_ml/models/facial_recognition/recognition.py index c144bd3eaa..2b0575ec38 100644 --- a/machine-learning/immich_ml/models/facial_recognition/recognition.py +++ b/machine-learning/immich_ml/models/facial_recognition/recognition.py @@ -4,15 +4,13 @@ from typing import Any import numpy as np import onnx import onnxruntime as ort -from insightface.model_zoo import ArcFaceONNX -from insightface.utils.face_align import norm_crop from numpy.typing import NDArray from onnx.tools.update_model_dims import update_inputs_outputs_dims from PIL import Image from immich_ml.config import log, settings from immich_ml.models.base import InferenceModel -from immich_ml.models.transforms import decode_cv2, serialize_np_array +from immich_ml.models.transforms import decode_pil, normalize, serialize_np_array from immich_ml.schemas import ( FaceDetectionOutput, FacialRecognitionOutput, @@ -22,6 +20,8 @@ from immich_ml.schemas import ( ModelType, ) +from ._ops import align_face + class FaceRecognizer(InferenceModel): depends = [(ModelType.DETECTION, ModelTask.FACIAL_RECOGNITION)] @@ -37,10 +37,6 @@ class FaceRecognizer(InferenceModel): if (not self.batch_size or self.batch_size > 1) and str(session.get_inputs()[0].shape[0]) != "batch": self._add_batch_axis(self.model_path) session = self._make_session(self.model_path) - self.model = ArcFaceONNX( - self.model_path_for_format(ModelFormat.ONNX).as_posix(), - session=session, - ) return session def _predict( @@ -48,20 +44,21 @@ class FaceRecognizer(InferenceModel): ) -> FacialRecognitionOutput: if faces["boxes"].shape[0] == 0: return [] - inputs = decode_cv2(inputs) - cropped_faces = self._crop(inputs, faces) - embeddings = self._predict_batch(cropped_faces) + image = np.asarray(decode_pil(inputs), dtype=np.uint8) + crops = np.stack([align_face(image, kps).transpose(2, 0, 1) for kps in faces["landmarks"]]) + embeddings = self._predict_batch(normalize(crops, mean=127.5, std=127.5)) return self.postprocess(faces, embeddings) - def _predict_batch(self, cropped_faces: list[NDArray[np.uint8]]) -> NDArray[np.float32]: - if not self.batch_size or len(cropped_faces) <= self.batch_size: - embeddings: NDArray[np.float32] = self.model.get_feat(cropped_faces) - return embeddings + def _predict_batch(self, crops: NDArray[np.float32]) -> NDArray[np.float32]: + input_name = self.session.get_inputs()[0].name + if not self.batch_size or crops.shape[0] <= self.batch_size: + return self.session.run(None, {input_name: crops})[0] - batch_embeddings: list[NDArray[np.float32]] = [] - for i in range(0, len(cropped_faces), self.batch_size): - batch_embeddings.append(self.model.get_feat(cropped_faces[i : i + self.batch_size])) - return np.concatenate(batch_embeddings, axis=0) + batches = [ + self.session.run(None, {input_name: crops[i : i + self.batch_size]})[0] + for i in range(0, crops.shape[0], self.batch_size) + ] + return np.concatenate(batches, axis=0) def postprocess(self, faces: FaceDetectionOutput, embeddings: NDArray[np.float32]) -> FacialRecognitionOutput: return [ @@ -73,9 +70,6 @@ class FaceRecognizer(InferenceModel): for (x1, y1, x2, y2), embedding, score in zip(faces["boxes"], embeddings, faces["scores"]) ] - def _crop(self, image: NDArray[np.uint8], faces: FaceDetectionOutput) -> list[NDArray[np.uint8]]: - return [norm_crop(image, landmark) for landmark in faces["landmarks"]] - def _add_batch_axis(self, model_path: Path) -> None: log.debug(f"Adding batch axis to model {model_path}") proto = onnx.load(model_path) diff --git a/machine-learning/immich_ml/models/ocr/detection.py b/machine-learning/immich_ml/models/ocr/detection.py index 0a2cb8ad91..48dd87854b 100644 --- a/machine-learning/immich_ml/models/ocr/detection.py +++ b/machine-learning/immich_ml/models/ocr/detection.py @@ -63,7 +63,8 @@ class TextDetector(InferenceModel): return OrtSession(self.model_path) # partly adapted from RapidOCR - def _predict(self, inputs: Image.Image) -> TextDetectionOutput: + # TODO: take the options as parameters instead of applying them through `configure` + def _predict(self, inputs: Image.Image, **kwargs: Any) -> TextDetectionOutput: w, h = inputs.size if w < 32 or h < 32: return self._empty diff --git a/machine-learning/immich_ml/models/ocr/recognition.py b/machine-learning/immich_ml/models/ocr/recognition.py index 94f40c9285..ea7ff565d1 100644 --- a/machine-learning/immich_ml/models/ocr/recognition.py +++ b/machine-learning/immich_ml/models/ocr/recognition.py @@ -69,7 +69,8 @@ class TextRecognizer(InferenceModel): ) return session - def _predict(self, img: Image.Image, texts: TextDetectionOutput) -> TextRecognitionOutput: + # TODO: take the options as parameters instead of applying them through `configure` + def _predict(self, img: Image.Image, texts: TextDetectionOutput, **kwargs: Any) -> TextRecognitionOutput: boxes, box_scores = texts["boxes"], texts["scores"] if boxes.shape[0] == 0: return self._empty diff --git a/machine-learning/immich_ml/models/transforms.py b/machine-learning/immich_ml/models/transforms.py index 3f9d93bed3..ac220a3812 100644 --- a/machine-learning/immich_ml/models/transforms.py +++ b/machine-learning/immich_ml/models/transforms.py @@ -1,6 +1,5 @@ import string from io import BytesIO -from typing import IO import cv2 import numpy as np @@ -12,11 +11,10 @@ _PIL_RESAMPLING_METHODS = {resampling.name.lower(): resampling for resampling in _PUNCTUATION_TRANS = str.maketrans("", "", string.punctuation) -def resize_pil(img: Image.Image, size: int) -> Image.Image: +def resize_pil(img: Image.Image, size: int, resample: Image.Resampling = Image.Resampling.BICUBIC) -> Image.Image: if img.width < img.height: - return img.resize((size, int((img.height / img.width) * size)), resample=Image.Resampling.BICUBIC) - else: - return img.resize((int((img.width / img.height) * size), size), resample=Image.Resampling.BICUBIC) + return img.resize((size, int((img.height / img.width) * size)), resample=resample) + return img.resize((int((img.width / img.height) * size), size), resample=resample) # https://stackoverflow.com/a/60883103 @@ -36,7 +34,9 @@ def to_numpy(img: Image.Image) -> NDArray[np.float32]: def normalize( img: NDArray[np.float32], mean: float | NDArray[np.float32], std: float | NDArray[np.float32] ) -> NDArray[np.float32]: - return (img - mean) / std + img *= 1.0 / std + img -= mean / std + return img def get_pil_resampling(resample: str) -> Image.Resampling: @@ -47,26 +47,21 @@ def pil_to_cv2(image: Image.Image) -> NDArray[np.uint8]: return cv2.cvtColor(np.array(image), cv2.COLOR_RGB2BGR) # type: ignore -def decode_pil(image_bytes: bytes | IO[bytes] | Image.Image) -> Image.Image: - if isinstance(image_bytes, Image.Image): - return image_bytes - image: Image.Image = Image.open(BytesIO(image_bytes) if isinstance(image_bytes, bytes) else image_bytes) +def decode_pil(image_bytes: bytes | Image.Image | NDArray[np.uint8]) -> Image.Image: + image: Image.Image + match image_bytes: + case Image.Image(): + image = image_bytes + case np.ndarray(): + image = Image.fromarray(image_bytes) + case bytes(): + image = Image.open(BytesIO(image_bytes)) image.load() if not image.mode == "RGB": image = image.convert("RGB") return image -def decode_cv2(image_bytes: NDArray[np.uint8] | bytes | Image.Image) -> NDArray[np.uint8]: - match image_bytes: - case bytes() | memoryview() | bytearray(): - return pil_to_cv2(decode_pil(image_bytes)) # pillow is much faster than cv2 - case Image.Image(): - return pil_to_cv2(image_bytes) - case _: - return image_bytes - - def clean_text(text: str, canonicalize: bool = False) -> str: text = " ".join(text.split()) if canonicalize: @@ -78,3 +73,21 @@ def clean_text(text: str, canonicalize: bool = False) -> str: # TODO: use this in a less invasive way def serialize_np_array(arr: NDArray[np.float32]) -> str: return orjson.dumps(arr, option=orjson.OPT_SERIALIZE_NUMPY).decode() + + +def letterbox(image: NDArray[np.uint8] | Image.Image, size: int) -> tuple[NDArray[np.uint8], float]: + if isinstance(image, Image.Image): + image = np.asarray(image) + height, width = image.shape[:2] + if height > width: + new_height, new_width = size, int(size * width / height) + else: + new_width, new_height = size, int(size * height / width) + + canvas = np.zeros((size, size, 3), dtype=np.uint8) + cv2.resize(image, (new_width, new_height), dst=canvas[:new_height, :new_width]) + return canvas, new_height / height + + +def ensure_dims(array: NDArray[np.float32], ndim: int) -> NDArray[np.float32]: + return array if array.ndim >= ndim else np.expand_dims(array, axis=tuple(range(ndim - array.ndim))) diff --git a/machine-learning/immich_ml/schemas.py b/machine-learning/immich_ml/schemas.py index d5304cf763..d5695f5eb3 100644 --- a/machine-learning/immich_ml/schemas.py +++ b/machine-learning/immich_ml/schemas.py @@ -14,10 +14,7 @@ class ORJSONResponse(JSONResponse): class StrEnum(str, Enum): - value: str - - def __str__(self) -> str: - return self.value + __str__ = str.__str__ class BoundingBox(TypedDict): @@ -63,7 +60,7 @@ ModelIdentity = tuple[ModelType, ModelTask] class SessionNode(Protocol): @property - def name(self) -> str | None: ... + def name(self) -> str: ... @property def shape(self) -> tuple[int, ...]: ... diff --git a/machine-learning/immich_ml/sessions/ann/__init__.py b/machine-learning/immich_ml/sessions/ann/__init__.py index 6f36f675f6..d3279f9a17 100644 --- a/machine-learning/immich_ml/sessions/ann/__init__.py +++ b/machine-learning/immich_ml/sessions/ann/__init__.py @@ -37,11 +37,11 @@ class AnnSession: def get_inputs(self) -> list[SessionNode]: shapes = self.ann.input_shapes[self.model] - return [AnnNode(None, s) for s in shapes] + return [AnnNode(f"input.{i + 1}", s) for i, s in enumerate(shapes)] def get_outputs(self) -> list[SessionNode]: shapes = self.ann.output_shapes[self.model] - return [AnnNode(None, s) for s in shapes] + return [AnnNode(f"output.{i + 1}", s) for i, s in enumerate(shapes)] def run( self, @@ -54,5 +54,5 @@ class AnnSession: class AnnNode(NamedTuple): - name: str | None + name: str shape: tuple[int, ...] diff --git a/machine-learning/immich_ml/sessions/rknn/__init__.py b/machine-learning/immich_ml/sessions/rknn/__init__.py index e388e4febc..90f2e63ed3 100644 --- a/machine-learning/immich_ml/sessions/rknn/__init__.py +++ b/machine-learning/immich_ml/sessions/rknn/__init__.py @@ -69,7 +69,7 @@ class RknnSession: class RknnNode(NamedTuple): - name: str | None + name: str shape: tuple[int, ...] diff --git a/machine-learning/mise.lock b/machine-learning/mise.lock index e366eaa4be..560a5bcbd3 100644 --- a/machine-learning/mise.lock +++ b/machine-learning/mise.lock @@ -5,38 +5,38 @@ version = "3.11.15" backend = "core:python" [tools.python."platforms.linux-arm64"] -checksum = "sha256:cbce0660e88cd9c56be7aaf2a2df92bea51f359388a521838b6b01817d728df0" -url = "https://github.com/astral-sh/python-build-standalone/releases/download/20260610/cpython-3.11.15+20260610-aarch64-unknown-linux-gnu-install_only_stripped.tar.gz" +checksum = "sha256:9ac18c9a761e91e6c6452bc0ef0082922a00a3fdec734555635d57c3169309b7" +url = "https://github.com/astral-sh/python-build-standalone/releases/download/20260623/cpython-3.11.15+20260623-aarch64-unknown-linux-gnu-install_only_stripped.tar.gz" provenance = "github-attestations" [tools.python."platforms.linux-arm64-musl"] -checksum = "sha256:a55ea44225ee3741d4157c383f3d5c3e8eee5f9665e2ea069233486b4275d928" -url = "https://github.com/astral-sh/python-build-standalone/releases/download/20260610/cpython-3.11.15+20260610-aarch64-unknown-linux-musl-install_only_stripped.tar.gz" +checksum = "sha256:bcd414f2e9d8cc5d4ac7fab2c8f912e30379c150fa6b94da19d64daf85cfc5d4" +url = "https://github.com/astral-sh/python-build-standalone/releases/download/20260623/cpython-3.11.15+20260623-aarch64-unknown-linux-musl-install_only_stripped.tar.gz" provenance = "github-attestations" [tools.python."platforms.linux-x64"] -checksum = "sha256:67a5b22f796e96f4d7fa628f95866d5fd1d524d0588f74e4601facd82b66792b" -url = "https://github.com/astral-sh/python-build-standalone/releases/download/20260610/cpython-3.11.15+20260610-x86_64-unknown-linux-gnu-install_only_stripped.tar.gz" +checksum = "sha256:0604cd029b142dc223e131f17f5941c0c8d2d5074997c8178b515b19eea2a6c2" +url = "https://github.com/astral-sh/python-build-standalone/releases/download/20260623/cpython-3.11.15+20260623-x86_64-unknown-linux-gnu-install_only_stripped.tar.gz" provenance = "github-attestations" [tools.python."platforms.linux-x64-musl"] -checksum = "sha256:5a8544aa4303da3ca4b7505c98dd8453b671157039d25cd551e55abea0f83a60" -url = "https://github.com/astral-sh/python-build-standalone/releases/download/20260610/cpython-3.11.15+20260610-x86_64-unknown-linux-musl-install_only_stripped.tar.gz" +checksum = "sha256:45bffdb320cf4a2c2dbf183b634aeb7e28f9cb0646f715b2f4117c11084d839a" +url = "https://github.com/astral-sh/python-build-standalone/releases/download/20260623/cpython-3.11.15+20260623-x86_64-unknown-linux-musl-install_only_stripped.tar.gz" provenance = "github-attestations" [tools.python."platforms.macos-arm64"] -checksum = "sha256:8c56f1f59142e0f9f8861ad897bdfd97fd84403afa7b3d8b0f33b208ec471355" -url = "https://github.com/astral-sh/python-build-standalone/releases/download/20260610/cpython-3.11.15+20260610-aarch64-apple-darwin-install_only_stripped.tar.gz" +checksum = "sha256:2318799eaf104f8a29bc09a93b0851b05dbbcb4ce9a5f045ddea169c0c7ff3a5" +url = "https://github.com/astral-sh/python-build-standalone/releases/download/20260623/cpython-3.11.15+20260623-aarch64-apple-darwin-install_only_stripped.tar.gz" provenance = "github-attestations" [tools.python."platforms.macos-x64"] -checksum = "sha256:8cd3878c656ba1698314cbcb65f78df4c37b7c8eabff958558115c6db11adb3d" -url = "https://github.com/astral-sh/python-build-standalone/releases/download/20260610/cpython-3.11.15+20260610-x86_64-apple-darwin-install_only_stripped.tar.gz" +checksum = "sha256:4925e5aaa9bc77c85302d350b36c1d9def2002996a6bcfa55c88ba6eb318de29" +url = "https://github.com/astral-sh/python-build-standalone/releases/download/20260623/cpython-3.11.15+20260623-x86_64-apple-darwin-install_only_stripped.tar.gz" provenance = "github-attestations" [tools.python."platforms.windows-x64"] -checksum = "sha256:f081a733b4e7ba0e5e5e12d533b3c795dbef3ecbebf92f0b4202e5329bf7c8ab" -url = "https://github.com/astral-sh/python-build-standalone/releases/download/20260610/cpython-3.11.15+20260610-x86_64-pc-windows-msvc-install_only_stripped.tar.gz" +checksum = "sha256:6589ca6d63f520bec4096d62b3ab91da3d0a80b16b594c99a6b677e335814683" +url = "https://github.com/astral-sh/python-build-standalone/releases/download/20260623/cpython-3.11.15+20260623-x86_64-pc-windows-msvc-install_only_stripped.tar.gz" provenance = "github-attestations" [[tools.uv]] @@ -46,27 +46,34 @@ backend = "aqua:astral-sh/uv" [tools.uv."platforms.linux-arm64"] checksum = "sha256:23ea21a05c62c4c307ce691f29bff2f15c94c4f07f2b83d9b356f0664bc8b3a2" url = "https://github.com/astral-sh/uv/releases/download/0.8.15/uv-aarch64-unknown-linux-musl.tar.gz" +url_api = "https://api.github.com/repos/astral-sh/uv/releases/assets/289235419" [tools.uv."platforms.linux-arm64-musl"] checksum = "sha256:23ea21a05c62c4c307ce691f29bff2f15c94c4f07f2b83d9b356f0664bc8b3a2" url = "https://github.com/astral-sh/uv/releases/download/0.8.15/uv-aarch64-unknown-linux-musl.tar.gz" +url_api = "https://api.github.com/repos/astral-sh/uv/releases/assets/289235419" [tools.uv."platforms.linux-x64"] checksum = "sha256:d0fec58f3124e05e0a1af0f6541abfce4333253cdaf23c7b6bb2e6128bf138ea" url = "https://github.com/astral-sh/uv/releases/download/0.8.15/uv-x86_64-unknown-linux-musl.tar.gz" +url_api = "https://api.github.com/repos/astral-sh/uv/releases/assets/289235475" [tools.uv."platforms.linux-x64-musl"] checksum = "sha256:d0fec58f3124e05e0a1af0f6541abfce4333253cdaf23c7b6bb2e6128bf138ea" url = "https://github.com/astral-sh/uv/releases/download/0.8.15/uv-x86_64-unknown-linux-musl.tar.gz" +url_api = "https://api.github.com/repos/astral-sh/uv/releases/assets/289235475" [tools.uv."platforms.macos-arm64"] checksum = "sha256:103367962c5cb00bf7370d84cbaa3fec5a9807be9cc833ea9d8eea400c119fa2" url = "https://github.com/astral-sh/uv/releases/download/0.8.15/uv-aarch64-apple-darwin.tar.gz" +url_api = "https://api.github.com/repos/astral-sh/uv/releases/assets/289235412" [tools.uv."platforms.macos-x64"] checksum = "sha256:2bbef70982e97dfc36454de173f35ec1a5e83ae11e3885df6a50db3fd76171cb" url = "https://github.com/astral-sh/uv/releases/download/0.8.15/uv-x86_64-apple-darwin.tar.gz" +url_api = "https://api.github.com/repos/astral-sh/uv/releases/assets/289235464" [tools.uv."platforms.windows-x64"] checksum = "sha256:459d95892a5cc5c21779532f4f41b9238594b79e312a5142da2148ecfa10e705" url = "https://github.com/astral-sh/uv/releases/download/0.8.15/uv-x86_64-pc-windows-msvc.zip" +url_api = "https://api.github.com/repos/astral-sh/uv/releases/assets/289235467" diff --git a/machine-learning/pyproject.toml b/machine-learning/pyproject.toml index 761d4b6134..e95ef7afef 100644 --- a/machine-learning/pyproject.toml +++ b/machine-learning/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "immich-ml" -version = "3.0.0rc3" +version = "3.1.0" description = "" authors = [{ name = "Hau Tran", email = "alex.tran1502@gmail.com" }] requires-python = ">=3.11,<4.0" @@ -10,8 +10,8 @@ dependencies = [ "fastapi>=0.95.2,<1.0", "gunicorn>=21.1.0", "huggingface-hub>=1.0,<2.0", - "insightface>=0.7.3,<2.0", "numpy>=2.4.0,<3.0", + "onnx>=1.22.0", "opencv-python-headless>=4.7.0.72,<5.0", "orjson>=3.9.5", "pillow>=12.2,<13", diff --git a/machine-learning/test_main.py b/machine-learning/test_main.py index be574c6397..567c6ab176 100644 --- a/machine-learning/test_main.py +++ b/machine-learning/test_main.py @@ -7,7 +7,6 @@ from types import SimpleNamespace from typing import Any, Callable from unittest import mock -import cv2 import numpy as np import onnxruntime as ort import orjson @@ -516,7 +515,7 @@ class TestAnnSession: inputs = session.get_inputs() assert len(inputs) == 1 - assert inputs[0].name is None + assert inputs[0].name == "input.1" assert inputs[0].shape == (1, 3, 224, 224) def test_get_outputs(self, ann_session: mock.Mock) -> None: @@ -527,7 +526,7 @@ class TestAnnSession: outputs = session.get_outputs() assert len(outputs) == 1 - assert outputs[0].name is None + assert outputs[0].name == "output.1" assert outputs[0].shape == (1, 3, 224, 224) def test_run(self, ann_session: mock.Mock, mocker: MockerFixture) -> None: @@ -781,89 +780,189 @@ class TestCLIP: assert np.allclose(tokens["attention_mask"], np.array([mock_attention_mask], dtype=np.int32), atol=0) +def make_scrfd_heads(detections: list[tuple[int, int, float]]) -> list[np.ndarray]: + """Build the 9 head tensors a SCRFD keypoint model emits at 640x640. + + `detections` is a list of (cell_x, cell_y, score) placed on the stride-8 level. + Distances and keypoint offsets are fixed so the decoded geometry is known by + hand rather than derived from the code under test: + box = [cx - 1*8, cy - 2*8, cx + 3*8, cy + 4*8] + kps = [cx, cy] + [0, 1, 2, ... 9] * 8, reshaped to 5 points + """ + heads: list[np.ndarray] = [] + counts = [(640 // stride) ** 2 * 2 for stride in (8, 16, 32)] + for channels in (1, 4, 10): + for n in counts: + heads.append(np.zeros((n, channels), dtype=np.float32)) + for cell_x, cell_y, score in detections: + i = 2 * (cell_y * 80 + cell_x) # anchor-major, 2 anchors per cell + heads[0][i] = score + heads[3][i] = [1, 2, 3, 4] + heads[6][i] = np.arange(10) + return heads + + +def expected_box(cell_x: int, cell_y: int) -> list[float]: + cx, cy = cell_x * 8, cell_y * 8 + return [cx - 8, cy - 16, cx + 24, cy + 32] + + +def expected_landmarks(cell_x: int, cell_y: int) -> np.ndarray: + cx, cy = cell_x * 8, cell_y * 8 + return (np.tile([cx, cy], 5) + np.arange(10) * 8).reshape(5, 2).astype(np.float32) + + +@pytest.fixture +def batch_axis(mocker: MockerFixture) -> SimpleNamespace: + """Patches for the `_add_batch_axis` path: the onnx module it rewrites the model + through, and the download it would otherwise trigger on load.""" + mocker.patch("immich_ml.models.base.InferenceModel.download") + return SimpleNamespace( + onnx=mocker.patch("immich_ml.models.facial_recognition.recognition.onnx", autospec=True), + update_dims=mocker.patch( + "immich_ml.models.facial_recognition.recognition.update_inputs_outputs_dims", autospec=True + ), + ) + + class TestFaceRecognition: - def test_set_min_score(self, snapshot_download: mock.Mock, ort_session: mock.Mock, path: mock.Mock) -> None: - path.return_value.__truediv__.return_value.__truediv__.return_value.suffix = ".onnx" - - face_detector = FaceDetector("buffalo_s", min_score=0.5, cache_dir="test_cache") - face_detector.load() - - assert face_detector.min_score == 0.5 - assert face_detector.model.det_thresh == 0.5 - - def test_detection(self, cv_image: cv2.Mat, mocker: MockerFixture) -> None: + def test_detection(self, stub_session: Callable[..., mock.Mock], mocker: MockerFixture) -> None: mocker.patch.object(FaceDetector, "load") - face_detector = FaceDetector("buffalo_s", min_score=0.0, cache_dir="test_cache") + face_detector = FaceDetector("buffalo_s", cache_dir="test_cache") - det_model = mock.Mock() - num_faces = 2 - bbox = np.random.rand(num_faces, 4).astype(np.float32) - scores = np.array([[0.67]] * num_faces).astype(np.float32) - kpss = np.random.rand(num_faces, 5, 2).astype(np.float32) - det_model.detect.return_value = (np.concatenate([bbox, scores], axis=-1), kpss) - face_detector.model = det_model + session = stub_session((1, 3, 640, 640), outputs=make_scrfd_heads([(10, 10, 0.9), (50, 50, 0.8)])) + face_detector.session = session - faces = face_detector.predict(cv_image) + faces = face_detector.predict(Image.new("RGB", (640, 640)), minScore=0.7) assert isinstance(faces, dict) - assert isinstance(faces.get("boxes", None), np.ndarray) - assert isinstance(faces.get("landmarks", None), np.ndarray) - assert isinstance(faces.get("scores", None), np.ndarray) - assert np.equal(faces["boxes"], bbox.round()).all() - assert np.equal(faces["landmarks"], kpss).all() - assert np.equal(faces["scores"], scores).all() - det_model.detect.assert_called_once() + assert set(faces) == {"boxes", "scores", "landmarks"} + # NMS returns highest score first + assert faces["boxes"].tolist() == [expected_box(10, 10), expected_box(50, 50)] + assert np.allclose(faces["scores"], [0.9, 0.8]) + assert faces["landmarks"].shape == (2, 5, 2) + assert np.allclose(faces["landmarks"][0], expected_landmarks(10, 10)) + assert np.allclose(faces["landmarks"][1], expected_landmarks(50, 50)) - def test_recognition(self, cv_image: cv2.Mat, mocker: MockerFixture) -> None: + def test_detection_applies_min_score_per_request( + self, stub_session: Callable[..., mock.Mock], mocker: MockerFixture + ) -> None: + mocker.patch.object(FaceDetector, "load") + face_detector = FaceDetector("buffalo_s", cache_dir="test_cache") + + session = stub_session((1, 3, 640, 640), outputs=make_scrfd_heads([(10, 10, 0.9), (50, 50, 0.5)])) + face_detector.session = session + + # the threshold is a request parameter, so the same loaded model must honour both + assert face_detector.predict(Image.new("RGB", (640, 640)), minScore=0.7)["boxes"].shape[0] == 1 + assert face_detector.predict(Image.new("RGB", (640, 640)), minScore=0.4)["boxes"].shape[0] == 2 + + def test_detection_scales_boxes_back_to_the_original_image( + self, stub_session: Callable[..., mock.Mock], mocker: MockerFixture + ) -> None: + mocker.patch.object(FaceDetector, "load") + face_detector = FaceDetector("buffalo_s", cache_dir="test_cache") + + session = stub_session((1, 3, 640, 640), outputs=make_scrfd_heads([(10, 10, 0.9)])) + face_detector.session = session + + # a 320x320 image is letterboxed up to 640, so coordinates come back halved + faces = face_detector.predict(Image.new("RGB", (320, 320)), minScore=0.7) + + assert faces["boxes"].tolist() == [[v / 2 for v in expected_box(10, 10)]] + assert np.allclose(faces["landmarks"][0], expected_landmarks(10, 10) / 2) + + def test_recognition(self, stub_session: Callable[..., mock.Mock], mocker: MockerFixture) -> None: mocker.patch.object(FaceRecognizer, "load") mocker.patch( "immich_ml.models.facial_recognition.recognition.ort.get_available_providers", return_value=["CPUExecutionProvider"], ) - face_recognizer = FaceRecognizer("buffalo_s", min_score=0.0, cache_dir="test_cache") + face_recognizer = FaceRecognizer("buffalo_s", cache_dir="test_cache") + # a uniform grey image whose crops land wholly inside it, so every sampled + # pixel is 128 and the normalised value the session receives is exact + image = Image.new("RGB", (600, 800), (128, 128, 128)) num_faces = 2 + arcface_dst = np.array( + [[38.2946, 51.6963], [73.5318, 51.5014], [56.0252, 71.7366], [41.5493, 92.3655], [70.7299, 92.2041]], + dtype=np.float32, + ) + kpss = np.stack([arcface_dst * 2 + [200, 300], arcface_dst * 2 + [220, 320]]).astype(np.float32) bbox = np.random.rand(num_faces, 4).astype(np.float32) scores = np.array([0.67] * num_faces).astype(np.float32) - kpss = np.random.rand(num_faces, 5, 2).astype(np.float32) - faces = {"boxes": bbox, "landmarks": kpss, "scores": scores} + embeddings = np.random.rand(num_faces, 512).astype(np.float32) - rec_model = mock.Mock() - embedding = np.random.rand(num_faces, 512).astype(np.float32) - rec_model.get_feat.return_value = embedding - face_recognizer.model = rec_model + session = stub_session(("batch", 3, 112, 112), outputs=[embeddings]) + face_recognizer.session = session - faces = face_recognizer.predict(cv_image, faces) + faces = face_recognizer.predict(image, {"boxes": bbox, "landmarks": kpss, "scores": scores}) assert isinstance(faces, list) assert len(faces) == num_faces for face in faces: - assert isinstance(face.get("boundingBox"), dict) assert set(face["boundingBox"]) == {"x1", "y1", "x2", "y2"} assert all(isinstance(val, np.float32) for val in face["boundingBox"].values()) - embedding_str = face.get("embedding") - assert isinstance(embedding_str, str) - embedding = orjson.loads(embedding_str) + embedding = orjson.loads(face["embedding"]) assert isinstance(embedding, list) assert len(embedding) == 512 assert isinstance(face.get("score", None), np.float32) - rec_model.get_feat.assert_called_once() - call_args = rec_model.get_feat.call_args_list[0].args - assert len(call_args) == 1 - assert isinstance(call_args[0], list) - assert isinstance(call_args[0][0], np.ndarray) - assert call_args[0][0].shape == (112, 112, 3) + session.run.assert_called_once() + crops = session.run.call_args.args[1]["input.1"] + assert crops.shape == (num_faces, 3, 112, 112) + assert crops.dtype == np.float32 + # mean/std 127.5, not raw 0-255. atol is loose enough for the float32 cancellation + # in normalize's scale-then-subtract, but still rejects a wrong mean or std + assert np.allclose(crops, (128 - 127.5) / 127.5, atol=1e-6) + + def test_recognition_returns_early_without_faces(self, pil_image: Image.Image, mocker: MockerFixture) -> None: + mocker.patch.object(FaceRecognizer, "load") + mocker.patch( + "immich_ml.models.facial_recognition.recognition.ort.get_available_providers", + return_value=["CPUExecutionProvider"], + ) + face_recognizer = FaceRecognizer("buffalo_s", cache_dir="test_cache") + session = mock.Mock() + face_recognizer.session = session + + empty = { + "boxes": np.empty((0, 4), dtype=np.float32), + "landmarks": np.empty((0, 5, 2), dtype=np.float32), + "scores": np.empty(0, dtype=np.float32), + } + + assert face_recognizer.predict(pil_image, empty) == [] + session.run.assert_not_called() + + def test_recognition_batches_when_batch_size_is_set( + self, pil_image: Image.Image, stub_session: Callable[..., mock.Mock], mocker: MockerFixture + ) -> None: + mocker.patch.object(FaceRecognizer, "load") + mocker.patch( + "immich_ml.models.facial_recognition.recognition.ort.get_available_providers", + return_value=["CPUExecutionProvider"], + ) + face_recognizer = FaceRecognizer("buffalo_s", cache_dir="test_cache") + face_recognizer.batch_size = 2 + + num_faces = 5 + session = stub_session((1, 3, 112, 112)) + session.run.side_effect = lambda _, feed: [np.zeros((feed["input.1"].shape[0], 512), dtype=np.float32)] + face_recognizer.session = session + + faces = { + "boxes": np.random.rand(num_faces, 4).astype(np.float32), + "landmarks": (np.random.rand(num_faces, 5, 2) * 100).astype(np.float32), + "scores": np.array([0.67] * num_faces, dtype=np.float32), + } + assert len(face_recognizer.predict(pil_image, faces)) == num_faces + assert session.run.call_count == 3 # 2 + 2 + 1 + assert [c.args[1]["input.1"].shape[0] for c in session.run.call_args_list] == [2, 2, 1] def test_recognition_adds_batch_axis_for_ort( - self, ort_session: mock.Mock, path: mock.Mock, mocker: MockerFixture + self, batch_axis: SimpleNamespace, ort_session: mock.Mock, path: mock.Mock, mocker: MockerFixture ) -> None: - onnx = mocker.patch("immich_ml.models.facial_recognition.recognition.onnx", autospec=True) - update_dims = mocker.patch( - "immich_ml.models.facial_recognition.recognition.update_inputs_outputs_dims", autospec=True - ) - mocker.patch("immich_ml.models.base.InferenceModel.download") - mocker.patch("immich_ml.models.facial_recognition.recognition.ArcFaceONNX") mocker.patch( "immich_ml.models.facial_recognition.recognition.ort.get_available_providers", return_value=["CPUExecutionProvider"], @@ -884,24 +983,20 @@ class TestFaceRecognition: output_dims.type.tensor_type.shape.dim = [SimpleNamespace(dim_value=size) for size in [1, 800]] proto.graph.output = [output_dims] - onnx.load.return_value = proto + batch_axis.onnx.load.return_value = proto face_recognizer = FaceRecognizer("buffalo_s", cache_dir=path) face_recognizer.load() assert face_recognizer.batch_size is None - update_dims.assert_called_once_with(proto, {"input.1": ["batch", 3, 224, 224]}, {"output.1": ["batch", 800]}) - onnx.save.assert_called_once_with(update_dims.return_value, face_recognizer.model_path) + batch_axis.update_dims.assert_called_once_with( + proto, {"input.1": ["batch", 3, 224, 224]}, {"output.1": ["batch", 800]} + ) + batch_axis.onnx.save.assert_called_once_with(batch_axis.update_dims.return_value, face_recognizer.model_path) def test_recognition_does_not_add_batch_axis_if_exists( - self, ort_session: mock.Mock, path: mock.Mock, mocker: MockerFixture + self, batch_axis: SimpleNamespace, ort_session: mock.Mock, path: mock.Mock, mocker: MockerFixture ) -> None: - onnx = mocker.patch("immich_ml.models.facial_recognition.recognition.onnx", autospec=True) - update_dims = mocker.patch( - "immich_ml.models.facial_recognition.recognition.update_inputs_outputs_dims", autospec=True - ) - mocker.patch("immich_ml.models.base.InferenceModel.download") - mocker.patch("immich_ml.models.facial_recognition.recognition.ArcFaceONNX") mocker.patch( "immich_ml.models.facial_recognition.recognition.ort.get_available_providers", return_value=["CPUExecutionProvider"], @@ -916,88 +1011,53 @@ class TestFaceRecognition: face_recognizer = FaceRecognizer("buffalo_s", cache_dir=path) face_recognizer.load() + # batching is available here, so the axis is only skipped because it already exists assert face_recognizer.batch_size is None - update_dims.assert_not_called() - onnx.load.assert_not_called() - onnx.save.assert_not_called() + batch_axis.update_dims.assert_not_called() + batch_axis.onnx.load.assert_not_called() + batch_axis.onnx.save.assert_not_called() - def test_recognition_does_not_add_batch_axis_for_armnn( - self, ann_session: mock.Mock, path: mock.Mock, mocker: MockerFixture + @pytest.mark.parametrize( + ("session_fixture", "suffix", "model_kwargs", "available_providers"), + [ + pytest.param("ann_session", ".armnn", {"model_format": ModelFormat.ARMNN}, None, id="armnn"), + pytest.param( + "ort_session", ".onnx", {}, ["OpenVINOExecutionProvider", "CPUExecutionProvider"], id="openvino" + ), + pytest.param( + "ort_session", ".onnx", {}, ["MIGraphXExecutionProvider", "CPUExecutionProvider"], id="migraphx" + ), + ], + ) + def test_recognition_does_not_add_batch_axis_when_batching_is_unsupported( + self, + request: pytest.FixtureRequest, + batch_axis: SimpleNamespace, + path: mock.Mock, + ort_pybind: mock.Mock, + mocker: MockerFixture, + session_fixture: str, + suffix: str, + model_kwargs: dict[str, Any], + available_providers: list[str] | None, ) -> None: - onnx = mocker.patch("immich_ml.models.facial_recognition.recognition.onnx", autospec=True) - update_dims = mocker.patch( - "immich_ml.models.facial_recognition.recognition.update_inputs_outputs_dims", autospec=True - ) - mocker.patch("immich_ml.models.base.InferenceModel.download") - mocker.patch("immich_ml.models.facial_recognition.recognition.ArcFaceONNX") - path.return_value.__truediv__.return_value.__truediv__.return_value.suffix = ".armnn" - - inputs = [SimpleNamespace(name="input.1", shape=("batch", 3, 224, 224))] - outputs = [SimpleNamespace(name="output.1", shape=("batch", 800))] - ann_session.return_value.get_inputs.return_value = inputs - ann_session.return_value.get_outputs.return_value = outputs - - face_recognizer = FaceRecognizer("buffalo_s", model_format=ModelFormat.ARMNN, cache_dir=path) - face_recognizer.load() - - assert face_recognizer.batch_size == 1 - update_dims.assert_not_called() - onnx.load.assert_not_called() - onnx.save.assert_not_called() - - def test_recognition_does_not_add_batch_axis_for_openvino( - self, ort_session: mock.Mock, path: mock.Mock, mocker: MockerFixture - ) -> None: - onnx = mocker.patch("immich_ml.models.facial_recognition.recognition.onnx", autospec=True) - update_dims = mocker.patch( - "immich_ml.models.facial_recognition.recognition.update_inputs_outputs_dims", autospec=True - ) - mocker.patch("immich_ml.models.base.InferenceModel.download") - mocker.patch("immich_ml.models.facial_recognition.recognition.ArcFaceONNX") - path.return_value.__truediv__.return_value.__truediv__.return_value.suffix = ".onnx" - - inputs = [SimpleNamespace(name="input.1", shape=("batch", 3, 224, 224))] - outputs = [SimpleNamespace(name="output.1", shape=("batch", 800))] - ort_session.return_value.get_inputs.return_value = inputs - ort_session.return_value.get_outputs.return_value = outputs - - face_recognizer = FaceRecognizer( - "buffalo_s", model_format=ModelFormat.ARMNN, cache_dir=path, providers=["OpenVINOExecutionProvider"] - ) - face_recognizer.load() - - assert face_recognizer.batch_size == 1 - update_dims.assert_not_called() - onnx.load.assert_not_called() - onnx.save.assert_not_called() - - def test_recognition_does_not_add_batch_axis_for_migraphx( - self, ort_session: mock.Mock, path: mock.Mock, mocker: MockerFixture - ) -> None: - onnx = mocker.patch("immich_ml.models.facial_recognition.recognition.onnx", autospec=True) - update_dims = mocker.patch( - "immich_ml.models.facial_recognition.recognition.update_inputs_outputs_dims", autospec=True - ) - mocker.patch("immich_ml.models.base.InferenceModel.download") - mocker.patch("immich_ml.models.facial_recognition.recognition.ArcFaceONNX") + session = request.getfixturevalue(session_fixture) + ort_pybind.get_available_openvino_device_ids.return_value = ["CPU"] mocker.patch( "immich_ml.models.facial_recognition.recognition.ort.get_available_providers", - return_value=["MIGraphXExecutionProvider", "CPUExecutionProvider"], + return_value=available_providers, ) - path.return_value.__truediv__.return_value.__truediv__.return_value.suffix = ".onnx" + path.return_value.__truediv__.return_value.__truediv__.return_value.suffix = suffix + session.return_value.get_inputs.return_value = [SimpleNamespace(name="input.1", shape=(1, 3, 224, 224))] + session.return_value.get_outputs.return_value = [SimpleNamespace(name="output.1", shape=(1, 800))] - inputs = [SimpleNamespace(name="input.1", shape=(1, 3, 224, 224))] - outputs = [SimpleNamespace(name="output.1", shape=(1, 800))] - ort_session.return_value.get_inputs.return_value = inputs - ort_session.return_value.get_outputs.return_value = outputs - - face_recognizer = FaceRecognizer("buffalo_s", cache_dir=path) + face_recognizer = FaceRecognizer("buffalo_s", cache_dir=path, **model_kwargs) face_recognizer.load() assert face_recognizer.batch_size == 1 - update_dims.assert_not_called() - onnx.load.assert_not_called() - onnx.save.assert_not_called() + batch_axis.update_dims.assert_not_called() + batch_axis.onnx.load.assert_not_called() + batch_axis.onnx.save.assert_not_called() def test_set_custom_max_batch_size(self, mocker: MockerFixture) -> None: mocker.patch.object(settings, "max_batch_size", MaxBatchSize(facial_recognition=2)) @@ -1045,10 +1105,10 @@ class TestOcr: rapid_recognizer.assert_called_once_with( OcrOptions( - session=ort_session.return_value, - rec_batch_num=6, - rec_img_shape=(3, 48, 320), - model_root_dir=text_recognizer.cache_dir, + session=ort_session.return_value, + rec_batch_num=6, + rec_img_shape=(3, 48, 320), + model_root_dir=text_recognizer.cache_dir, ) ) @@ -1063,10 +1123,10 @@ class TestOcr: rapid_recognizer.assert_called_once_with( OcrOptions( - session=ort_session.return_value, - rec_batch_num=4, - rec_img_shape=(3, 48, 320), - model_root_dir=text_recognizer.cache_dir, + session=ort_session.return_value, + rec_batch_num=4, + rec_img_shape=(3, 48, 320), + model_root_dir=text_recognizer.cache_dir, ) ) @@ -1083,10 +1143,10 @@ class TestOcr: rapid_recognizer.assert_called_once_with( OcrOptions( - session=ort_session.return_value, - rec_batch_num=6, - rec_img_shape=(3, 48, 320), - model_root_dir=text_recognizer.cache_dir, + session=ort_session.return_value, + rec_batch_num=6, + rec_img_shape=(3, 48, 320), + model_root_dir=text_recognizer.cache_dir, ) ) diff --git a/machine-learning/uv.lock b/machine-learning/uv.lock index 03a582839f..fa92147445 100644 --- a/machine-learning/uv.lock +++ b/machine-learning/uv.lock @@ -25,23 +25,6 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/37/d7/15d67e05b235d1ed8c3ce61688fe4d84130e72af1657acadfaac3479f4cf/aiocache-0.12.3-py2.py3-none-any.whl", hash = "sha256:889086fc24710f431937b87ad3720a289f7fc31c4fd8b68e9f918b9bacd8270d", size = 28199, upload-time = "2024-09-25T13:20:22.688Z" }, ] -[[package]] -name = "albumentations" -version = "1.3.1" -source = { registry = "https://pypi.org/simple" } -dependencies = [ - { name = "numpy" }, - { name = "opencv-python-headless" }, - { name = "pyyaml" }, - { name = "qudida" }, - { name = "scikit-image" }, - { name = "scipy" }, -] -sdist = { url = "https://files.pythonhosted.org/packages/14/d6/8dd5b690d28a332a0b2c3179a345808b5d4c7ad5ddc079b7e116098dff35/albumentations-1.3.1.tar.gz", hash = "sha256:a6a38388fe546c568071e8c82f414498e86c9ed03c08b58e7a88b31cf7a244c6", size = 176371, upload-time = "2023-06-10T07:44:32.36Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/9b/f6/c486cedb4f75147232f32ec4c97026714cfef7c7e247a1f0427bc5489f66/albumentations-1.3.1-py3-none-any.whl", hash = "sha256:6b641d13733181d9ecdc29550e6ad580d1bfa9d25e2213a66940062f25e291bd", size = 125706, upload-time = "2023-06-10T07:44:30.373Z" }, -] - [[package]] name = "annotated-doc" version = "0.0.4" @@ -326,88 +309,6 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/31/28/d28211d29bcc3620b1fece85a65ce5bb22f18670a03cd28ea4b75ede270c/configargparse-1.7.1-py3-none-any.whl", hash = "sha256:8b586a31f9d873abd1ca527ffbe58863c99f36d896e2829779803125e83be4b6", size = 25607, upload-time = "2025-05-23T14:26:15.923Z" }, ] -[[package]] -name = "contourpy" -version = "1.3.3" -source = { registry = "https://pypi.org/simple" } -dependencies = [ - { name = "numpy" }, -] -sdist = { url = "https://files.pythonhosted.org/packages/58/01/1253e6698a07380cd31a736d248a3f2a50a7c88779a1813da27503cadc2a/contourpy-1.3.3.tar.gz", hash = "sha256:083e12155b210502d0bca491432bb04d56dc3432f95a979b429f2848c3dbe880", size = 13466174, upload-time = "2025-07-26T12:03:12.549Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/91/2e/c4390a31919d8a78b90e8ecf87cd4b4c4f05a5b48d05ec17db8e5404c6f4/contourpy-1.3.3-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:709a48ef9a690e1343202916450bc48b9e51c049b089c7f79a267b46cffcdaa1", size = 288773, upload-time = "2025-07-26T12:01:02.277Z" }, - { url = "https://files.pythonhosted.org/packages/0d/44/c4b0b6095fef4dc9c420e041799591e3b63e9619e3044f7f4f6c21c0ab24/contourpy-1.3.3-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:23416f38bfd74d5d28ab8429cc4d63fa67d5068bd711a85edb1c3fb0c3e2f381", size = 270149, upload-time = "2025-07-26T12:01:04.072Z" }, - { url = "https://files.pythonhosted.org/packages/30/2e/dd4ced42fefac8470661d7cb7e264808425e6c5d56d175291e93890cce09/contourpy-1.3.3-cp311-cp311-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:929ddf8c4c7f348e4c0a5a3a714b5c8542ffaa8c22954862a46ca1813b667ee7", size = 329222, upload-time = "2025-07-26T12:01:05.688Z" }, - { url = "https://files.pythonhosted.org/packages/f2/74/cc6ec2548e3d276c71389ea4802a774b7aa3558223b7bade3f25787fafc2/contourpy-1.3.3-cp311-cp311-manylinux_2_26_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:9e999574eddae35f1312c2b4b717b7885d4edd6cb46700e04f7f02db454e67c1", size = 377234, upload-time = "2025-07-26T12:01:07.054Z" }, - { url = "https://files.pythonhosted.org/packages/03/b3/64ef723029f917410f75c09da54254c5f9ea90ef89b143ccadb09df14c15/contourpy-1.3.3-cp311-cp311-manylinux_2_26_s390x.manylinux_2_28_s390x.whl", hash = "sha256:0bf67e0e3f482cb69779dd3061b534eb35ac9b17f163d851e2a547d56dba0a3a", size = 380555, upload-time = "2025-07-26T12:01:08.801Z" }, - { url = "https://files.pythonhosted.org/packages/5f/4b/6157f24ca425b89fe2eb7e7be642375711ab671135be21e6faa100f7448c/contourpy-1.3.3-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:51e79c1f7470158e838808d4a996fa9bac72c498e93d8ebe5119bc1e6becb0db", size = 355238, upload-time = "2025-07-26T12:01:10.319Z" }, - { url = "https://files.pythonhosted.org/packages/98/56/f914f0dd678480708a04cfd2206e7c382533249bc5001eb9f58aa693e200/contourpy-1.3.3-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:598c3aaece21c503615fd59c92a3598b428b2f01bfb4b8ca9c4edeecc2438620", size = 1326218, upload-time = "2025-07-26T12:01:12.659Z" }, - { url = "https://files.pythonhosted.org/packages/fb/d7/4a972334a0c971acd5172389671113ae82aa7527073980c38d5868ff1161/contourpy-1.3.3-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:322ab1c99b008dad206d406bb61d014cf0174df491ae9d9d0fac6a6fda4f977f", size = 1392867, upload-time = "2025-07-26T12:01:15.533Z" }, - { url = "https://files.pythonhosted.org/packages/75/3e/f2cc6cd56dc8cff46b1a56232eabc6feea52720083ea71ab15523daab796/contourpy-1.3.3-cp311-cp311-win32.whl", hash = "sha256:fd907ae12cd483cd83e414b12941c632a969171bf90fc937d0c9f268a31cafff", size = 183677, upload-time = "2025-07-26T12:01:17.088Z" }, - { url = "https://files.pythonhosted.org/packages/98/4b/9bd370b004b5c9d8045c6c33cf65bae018b27aca550a3f657cdc99acdbd8/contourpy-1.3.3-cp311-cp311-win_amd64.whl", hash = "sha256:3519428f6be58431c56581f1694ba8e50626f2dd550af225f82fb5f5814d2a42", size = 225234, upload-time = "2025-07-26T12:01:18.256Z" }, - { url = "https://files.pythonhosted.org/packages/d9/b6/71771e02c2e004450c12b1120a5f488cad2e4d5b590b1af8bad060360fe4/contourpy-1.3.3-cp311-cp311-win_arm64.whl", hash = "sha256:15ff10bfada4bf92ec8b31c62bf7c1834c244019b4a33095a68000d7075df470", size = 193123, upload-time = "2025-07-26T12:01:19.848Z" }, - { url = "https://files.pythonhosted.org/packages/be/45/adfee365d9ea3d853550b2e735f9d66366701c65db7855cd07621732ccfc/contourpy-1.3.3-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:b08a32ea2f8e42cf1d4be3169a98dd4be32bafe4f22b6c4cb4ba810fa9e5d2cb", size = 293419, upload-time = "2025-07-26T12:01:21.16Z" }, - { url = "https://files.pythonhosted.org/packages/53/3e/405b59cfa13021a56bba395a6b3aca8cec012b45bf177b0eaf7a202cde2c/contourpy-1.3.3-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:556dba8fb6f5d8742f2923fe9457dbdd51e1049c4a43fd3986a0b14a1d815fc6", size = 273979, upload-time = "2025-07-26T12:01:22.448Z" }, - { url = "https://files.pythonhosted.org/packages/d4/1c/a12359b9b2ca3a845e8f7f9ac08bdf776114eb931392fcad91743e2ea17b/contourpy-1.3.3-cp312-cp312-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:92d9abc807cf7d0e047b95ca5d957cf4792fcd04e920ca70d48add15c1a90ea7", size = 332653, upload-time = "2025-07-26T12:01:24.155Z" }, - { url = "https://files.pythonhosted.org/packages/63/12/897aeebfb475b7748ea67b61e045accdfcf0d971f8a588b67108ed7f5512/contourpy-1.3.3-cp312-cp312-manylinux_2_26_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:b2e8faa0ed68cb29af51edd8e24798bb661eac3bd9f65420c1887b6ca89987c8", size = 379536, upload-time = "2025-07-26T12:01:25.91Z" }, - { url = "https://files.pythonhosted.org/packages/43/8a/a8c584b82deb248930ce069e71576fc09bd7174bbd35183b7943fb1064fd/contourpy-1.3.3-cp312-cp312-manylinux_2_26_s390x.manylinux_2_28_s390x.whl", hash = "sha256:626d60935cf668e70a5ce6ff184fd713e9683fb458898e4249b63be9e28286ea", size = 384397, upload-time = "2025-07-26T12:01:27.152Z" }, - { url = "https://files.pythonhosted.org/packages/cc/8f/ec6289987824b29529d0dfda0d74a07cec60e54b9c92f3c9da4c0ac732de/contourpy-1.3.3-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:4d00e655fcef08aba35ec9610536bfe90267d7ab5ba944f7032549c55a146da1", size = 362601, upload-time = "2025-07-26T12:01:28.808Z" }, - { url = "https://files.pythonhosted.org/packages/05/0a/a3fe3be3ee2dceb3e615ebb4df97ae6f3828aa915d3e10549ce016302bd1/contourpy-1.3.3-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:451e71b5a7d597379ef572de31eeb909a87246974d960049a9848c3bc6c41bf7", size = 1331288, upload-time = "2025-07-26T12:01:31.198Z" }, - { url = "https://files.pythonhosted.org/packages/33/1d/acad9bd4e97f13f3e2b18a3977fe1b4a37ecf3d38d815333980c6c72e963/contourpy-1.3.3-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:459c1f020cd59fcfe6650180678a9993932d80d44ccde1fa1868977438f0b411", size = 1403386, upload-time = "2025-07-26T12:01:33.947Z" }, - { url = "https://files.pythonhosted.org/packages/cf/8f/5847f44a7fddf859704217a99a23a4f6417b10e5ab1256a179264561540e/contourpy-1.3.3-cp312-cp312-win32.whl", hash = "sha256:023b44101dfe49d7d53932be418477dba359649246075c996866106da069af69", size = 185018, upload-time = "2025-07-26T12:01:35.64Z" }, - { url = "https://files.pythonhosted.org/packages/19/e8/6026ed58a64563186a9ee3f29f41261fd1828f527dd93d33b60feca63352/contourpy-1.3.3-cp312-cp312-win_amd64.whl", hash = "sha256:8153b8bfc11e1e4d75bcb0bff1db232f9e10b274e0929de9d608027e0d34ff8b", size = 226567, upload-time = "2025-07-26T12:01:36.804Z" }, - { url = "https://files.pythonhosted.org/packages/d1/e2/f05240d2c39a1ed228d8328a78b6f44cd695f7ef47beb3e684cf93604f86/contourpy-1.3.3-cp312-cp312-win_arm64.whl", hash = "sha256:07ce5ed73ecdc4a03ffe3e1b3e3c1166db35ae7584be76f65dbbe28a7791b0cc", size = 193655, upload-time = "2025-07-26T12:01:37.999Z" }, - { url = "https://files.pythonhosted.org/packages/68/35/0167aad910bbdb9599272bd96d01a9ec6852f36b9455cf2ca67bd4cc2d23/contourpy-1.3.3-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:177fb367556747a686509d6fef71d221a4b198a3905fe824430e5ea0fda54eb5", size = 293257, upload-time = "2025-07-26T12:01:39.367Z" }, - { url = "https://files.pythonhosted.org/packages/96/e4/7adcd9c8362745b2210728f209bfbcf7d91ba868a2c5f40d8b58f54c509b/contourpy-1.3.3-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:d002b6f00d73d69333dac9d0b8d5e84d9724ff9ef044fd63c5986e62b7c9e1b1", size = 274034, upload-time = "2025-07-26T12:01:40.645Z" }, - { url = "https://files.pythonhosted.org/packages/73/23/90e31ceeed1de63058a02cb04b12f2de4b40e3bef5e082a7c18d9c8ae281/contourpy-1.3.3-cp313-cp313-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:348ac1f5d4f1d66d3322420f01d42e43122f43616e0f194fc1c9f5d830c5b286", size = 334672, upload-time = "2025-07-26T12:01:41.942Z" }, - { url = "https://files.pythonhosted.org/packages/ed/93/b43d8acbe67392e659e1d984700e79eb67e2acb2bd7f62012b583a7f1b55/contourpy-1.3.3-cp313-cp313-manylinux_2_26_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:655456777ff65c2c548b7c454af9c6f33f16c8884f11083244b5819cc214f1b5", size = 381234, upload-time = "2025-07-26T12:01:43.499Z" }, - { url = "https://files.pythonhosted.org/packages/46/3b/bec82a3ea06f66711520f75a40c8fc0b113b2a75edb36aa633eb11c4f50f/contourpy-1.3.3-cp313-cp313-manylinux_2_26_s390x.manylinux_2_28_s390x.whl", hash = "sha256:644a6853d15b2512d67881586bd03f462c7ab755db95f16f14d7e238f2852c67", size = 385169, upload-time = "2025-07-26T12:01:45.219Z" }, - { url = "https://files.pythonhosted.org/packages/4b/32/e0f13a1c5b0f8572d0ec6ae2f6c677b7991fafd95da523159c19eff0696a/contourpy-1.3.3-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:4debd64f124ca62069f313a9cb86656ff087786016d76927ae2cf37846b006c9", size = 362859, upload-time = "2025-07-26T12:01:46.519Z" }, - { url = "https://files.pythonhosted.org/packages/33/71/e2a7945b7de4e58af42d708a219f3b2f4cff7386e6b6ab0a0fa0033c49a9/contourpy-1.3.3-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:a15459b0f4615b00bbd1e91f1b9e19b7e63aea7483d03d804186f278c0af2659", size = 1332062, upload-time = "2025-07-26T12:01:48.964Z" }, - { url = "https://files.pythonhosted.org/packages/12/fc/4e87ac754220ccc0e807284f88e943d6d43b43843614f0a8afa469801db0/contourpy-1.3.3-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:ca0fdcd73925568ca027e0b17ab07aad764be4706d0a925b89227e447d9737b7", size = 1403932, upload-time = "2025-07-26T12:01:51.979Z" }, - { url = "https://files.pythonhosted.org/packages/a6/2e/adc197a37443f934594112222ac1aa7dc9a98faf9c3842884df9a9d8751d/contourpy-1.3.3-cp313-cp313-win32.whl", hash = "sha256:b20c7c9a3bf701366556e1b1984ed2d0cedf999903c51311417cf5f591d8c78d", size = 185024, upload-time = "2025-07-26T12:01:53.245Z" }, - { url = "https://files.pythonhosted.org/packages/18/0b/0098c214843213759692cc638fce7de5c289200a830e5035d1791d7a2338/contourpy-1.3.3-cp313-cp313-win_amd64.whl", hash = "sha256:1cadd8b8969f060ba45ed7c1b714fe69185812ab43bd6b86a9123fe8f99c3263", size = 226578, upload-time = "2025-07-26T12:01:54.422Z" }, - { url = "https://files.pythonhosted.org/packages/8a/9a/2f6024a0c5995243cd63afdeb3651c984f0d2bc727fd98066d40e141ad73/contourpy-1.3.3-cp313-cp313-win_arm64.whl", hash = "sha256:fd914713266421b7536de2bfa8181aa8c699432b6763a0ea64195ebe28bff6a9", size = 193524, upload-time = "2025-07-26T12:01:55.73Z" }, - { url = "https://files.pythonhosted.org/packages/c0/b3/f8a1a86bd3298513f500e5b1f5fd92b69896449f6cab6a146a5d52715479/contourpy-1.3.3-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:88df9880d507169449d434c293467418b9f6cbe82edd19284aa0409e7fdb933d", size = 306730, upload-time = "2025-07-26T12:01:57.051Z" }, - { url = "https://files.pythonhosted.org/packages/3f/11/4780db94ae62fc0c2053909b65dc3246bd7cecfc4f8a20d957ad43aa4ad8/contourpy-1.3.3-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:d06bb1f751ba5d417047db62bca3c8fde202b8c11fb50742ab3ab962c81e8216", size = 287897, upload-time = "2025-07-26T12:01:58.663Z" }, - { url = "https://files.pythonhosted.org/packages/ae/15/e59f5f3ffdd6f3d4daa3e47114c53daabcb18574a26c21f03dc9e4e42ff0/contourpy-1.3.3-cp313-cp313t-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:e4e6b05a45525357e382909a4c1600444e2a45b4795163d3b22669285591c1ae", size = 326751, upload-time = "2025-07-26T12:02:00.343Z" }, - { url = "https://files.pythonhosted.org/packages/0f/81/03b45cfad088e4770b1dcf72ea78d3802d04200009fb364d18a493857210/contourpy-1.3.3-cp313-cp313t-manylinux_2_26_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:ab3074b48c4e2cf1a960e6bbeb7f04566bf36b1861d5c9d4d8ac04b82e38ba20", size = 375486, upload-time = "2025-07-26T12:02:02.128Z" }, - { url = "https://files.pythonhosted.org/packages/0c/ba/49923366492ffbdd4486e970d421b289a670ae8cf539c1ea9a09822b371a/contourpy-1.3.3-cp313-cp313t-manylinux_2_26_s390x.manylinux_2_28_s390x.whl", hash = "sha256:6c3d53c796f8647d6deb1abe867daeb66dcc8a97e8455efa729516b997b8ed99", size = 388106, upload-time = "2025-07-26T12:02:03.615Z" }, - { url = "https://files.pythonhosted.org/packages/9f/52/5b00ea89525f8f143651f9f03a0df371d3cbd2fccd21ca9b768c7a6500c2/contourpy-1.3.3-cp313-cp313t-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:50ed930df7289ff2a8d7afeb9603f8289e5704755c7e5c3bbd929c90c817164b", size = 352548, upload-time = "2025-07-26T12:02:05.165Z" }, - { url = "https://files.pythonhosted.org/packages/32/1d/a209ec1a3a3452d490f6b14dd92e72280c99ae3d1e73da74f8277d4ee08f/contourpy-1.3.3-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:4feffb6537d64b84877da813a5c30f1422ea5739566abf0bd18065ac040e120a", size = 1322297, upload-time = "2025-07-26T12:02:07.379Z" }, - { url = "https://files.pythonhosted.org/packages/bc/9e/46f0e8ebdd884ca0e8877e46a3f4e633f6c9c8c4f3f6e72be3fe075994aa/contourpy-1.3.3-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:2b7e9480ffe2b0cd2e787e4df64270e3a0440d9db8dc823312e2c940c167df7e", size = 1391023, upload-time = "2025-07-26T12:02:10.171Z" }, - { url = "https://files.pythonhosted.org/packages/b9/70/f308384a3ae9cd2209e0849f33c913f658d3326900d0ff5d378d6a1422d2/contourpy-1.3.3-cp313-cp313t-win32.whl", hash = "sha256:283edd842a01e3dcd435b1c5116798d661378d83d36d337b8dde1d16a5fc9ba3", size = 196157, upload-time = "2025-07-26T12:02:11.488Z" }, - { url = "https://files.pythonhosted.org/packages/b2/dd/880f890a6663b84d9e34a6f88cded89d78f0091e0045a284427cb6b18521/contourpy-1.3.3-cp313-cp313t-win_amd64.whl", hash = "sha256:87acf5963fc2b34825e5b6b048f40e3635dd547f590b04d2ab317c2619ef7ae8", size = 240570, upload-time = "2025-07-26T12:02:12.754Z" }, - { url = "https://files.pythonhosted.org/packages/80/99/2adc7d8ffead633234817ef8e9a87115c8a11927a94478f6bb3d3f4d4f7d/contourpy-1.3.3-cp313-cp313t-win_arm64.whl", hash = "sha256:3c30273eb2a55024ff31ba7d052dde990d7d8e5450f4bbb6e913558b3d6c2301", size = 199713, upload-time = "2025-07-26T12:02:14.4Z" }, - { url = "https://files.pythonhosted.org/packages/72/8b/4546f3ab60f78c514ffb7d01a0bd743f90de36f0019d1be84d0a708a580a/contourpy-1.3.3-cp314-cp314-macosx_10_13_x86_64.whl", hash = "sha256:fde6c716d51c04b1c25d0b90364d0be954624a0ee9d60e23e850e8d48353d07a", size = 292189, upload-time = "2025-07-26T12:02:16.095Z" }, - { url = "https://files.pythonhosted.org/packages/fd/e1/3542a9cb596cadd76fcef413f19c79216e002623158befe6daa03dbfa88c/contourpy-1.3.3-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:cbedb772ed74ff5be440fa8eee9bd49f64f6e3fc09436d9c7d8f1c287b121d77", size = 273251, upload-time = "2025-07-26T12:02:17.524Z" }, - { url = "https://files.pythonhosted.org/packages/b1/71/f93e1e9471d189f79d0ce2497007731c1e6bf9ef6d1d61b911430c3db4e5/contourpy-1.3.3-cp314-cp314-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:22e9b1bd7a9b1d652cd77388465dc358dafcd2e217d35552424aa4f996f524f5", size = 335810, upload-time = "2025-07-26T12:02:18.9Z" }, - { url = "https://files.pythonhosted.org/packages/91/f9/e35f4c1c93f9275d4e38681a80506b5510e9327350c51f8d4a5a724d178c/contourpy-1.3.3-cp314-cp314-manylinux_2_26_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:a22738912262aa3e254e4f3cb079a95a67132fc5a063890e224393596902f5a4", size = 382871, upload-time = "2025-07-26T12:02:20.418Z" }, - { url = "https://files.pythonhosted.org/packages/b5/71/47b512f936f66a0a900d81c396a7e60d73419868fba959c61efed7a8ab46/contourpy-1.3.3-cp314-cp314-manylinux_2_26_s390x.manylinux_2_28_s390x.whl", hash = "sha256:afe5a512f31ee6bd7d0dda52ec9864c984ca3d66664444f2d72e0dc4eb832e36", size = 386264, upload-time = "2025-07-26T12:02:21.916Z" }, - { url = "https://files.pythonhosted.org/packages/04/5f/9ff93450ba96b09c7c2b3f81c94de31c89f92292f1380261bd7195bea4ea/contourpy-1.3.3-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:f64836de09927cba6f79dcd00fdd7d5329f3fccc633468507079c829ca4db4e3", size = 363819, upload-time = "2025-07-26T12:02:23.759Z" }, - { url = "https://files.pythonhosted.org/packages/3e/a6/0b185d4cc480ee494945cde102cb0149ae830b5fa17bf855b95f2e70ad13/contourpy-1.3.3-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:1fd43c3be4c8e5fd6e4f2baeae35ae18176cf2e5cced681cca908addf1cdd53b", size = 1333650, upload-time = "2025-07-26T12:02:26.181Z" }, - { url = "https://files.pythonhosted.org/packages/43/d7/afdc95580ca56f30fbcd3060250f66cedbde69b4547028863abd8aa3b47e/contourpy-1.3.3-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:6afc576f7b33cf00996e5c1102dc2a8f7cc89e39c0b55df93a0b78c1bd992b36", size = 1404833, upload-time = "2025-07-26T12:02:28.782Z" }, - { url = "https://files.pythonhosted.org/packages/e2/e2/366af18a6d386f41132a48f033cbd2102e9b0cf6345d35ff0826cd984566/contourpy-1.3.3-cp314-cp314-win32.whl", hash = "sha256:66c8a43a4f7b8df8b71ee1840e4211a3c8d93b214b213f590e18a1beca458f7d", size = 189692, upload-time = "2025-07-26T12:02:30.128Z" }, - { url = "https://files.pythonhosted.org/packages/7d/c2/57f54b03d0f22d4044b8afb9ca0e184f8b1afd57b4f735c2fa70883dc601/contourpy-1.3.3-cp314-cp314-win_amd64.whl", hash = "sha256:cf9022ef053f2694e31d630feaacb21ea24224be1c3ad0520b13d844274614fd", size = 232424, upload-time = "2025-07-26T12:02:31.395Z" }, - { url = "https://files.pythonhosted.org/packages/18/79/a9416650df9b525737ab521aa181ccc42d56016d2123ddcb7b58e926a42c/contourpy-1.3.3-cp314-cp314-win_arm64.whl", hash = "sha256:95b181891b4c71de4bb404c6621e7e2390745f887f2a026b2d99e92c17892339", size = 198300, upload-time = "2025-07-26T12:02:32.956Z" }, - { url = "https://files.pythonhosted.org/packages/1f/42/38c159a7d0f2b7b9c04c64ab317042bb6952b713ba875c1681529a2932fe/contourpy-1.3.3-cp314-cp314t-macosx_10_13_x86_64.whl", hash = "sha256:33c82d0138c0a062380332c861387650c82e4cf1747aaa6938b9b6516762e772", size = 306769, upload-time = "2025-07-26T12:02:34.2Z" }, - { url = "https://files.pythonhosted.org/packages/c3/6c/26a8205f24bca10974e77460de68d3d7c63e282e23782f1239f226fcae6f/contourpy-1.3.3-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:ea37e7b45949df430fe649e5de8351c423430046a2af20b1c1961cae3afcda77", size = 287892, upload-time = "2025-07-26T12:02:35.807Z" }, - { url = "https://files.pythonhosted.org/packages/66/06/8a475c8ab718ebfd7925661747dbb3c3ee9c82ac834ccb3570be49d129f4/contourpy-1.3.3-cp314-cp314t-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:d304906ecc71672e9c89e87c4675dc5c2645e1f4269a5063b99b0bb29f232d13", size = 326748, upload-time = "2025-07-26T12:02:37.193Z" }, - { url = "https://files.pythonhosted.org/packages/b4/a3/c5ca9f010a44c223f098fccd8b158bb1cb287378a31ac141f04730dc49be/contourpy-1.3.3-cp314-cp314t-manylinux_2_26_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:ca658cd1a680a5c9ea96dc61cdbae1e85c8f25849843aa799dfd3cb370ad4fbe", size = 375554, upload-time = "2025-07-26T12:02:38.894Z" }, - { url = "https://files.pythonhosted.org/packages/80/5b/68bd33ae63fac658a4145088c1e894405e07584a316738710b636c6d0333/contourpy-1.3.3-cp314-cp314t-manylinux_2_26_s390x.manylinux_2_28_s390x.whl", hash = "sha256:ab2fd90904c503739a75b7c8c5c01160130ba67944a7b77bbf36ef8054576e7f", size = 388118, upload-time = "2025-07-26T12:02:40.642Z" }, - { url = "https://files.pythonhosted.org/packages/40/52/4c285a6435940ae25d7410a6c36bda5145839bc3f0beb20c707cda18b9d2/contourpy-1.3.3-cp314-cp314t-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:b7301b89040075c30e5768810bc96a8e8d78085b47d8be6e4c3f5a0b4ed478a0", size = 352555, upload-time = "2025-07-26T12:02:42.25Z" }, - { url = "https://files.pythonhosted.org/packages/24/ee/3e81e1dd174f5c7fefe50e85d0892de05ca4e26ef1c9a59c2a57e43b865a/contourpy-1.3.3-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:2a2a8b627d5cc6b7c41a4beff6c5ad5eb848c88255fda4a8745f7e901b32d8e4", size = 1322295, upload-time = "2025-07-26T12:02:44.668Z" }, - { url = "https://files.pythonhosted.org/packages/3c/b2/6d913d4d04e14379de429057cd169e5e00f6c2af3bb13e1710bcbdb5da12/contourpy-1.3.3-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:fd6ec6be509c787f1caf6b247f0b1ca598bef13f4ddeaa126b7658215529ba0f", size = 1391027, upload-time = "2025-07-26T12:02:47.09Z" }, - { url = "https://files.pythonhosted.org/packages/93/8a/68a4ec5c55a2971213d29a9374913f7e9f18581945a7a31d1a39b5d2dfe5/contourpy-1.3.3-cp314-cp314t-win32.whl", hash = "sha256:e74a9a0f5e3fff48fb5a7f2fd2b9b70a3fe014a67522f79b7cca4c0c7e43c9ae", size = 202428, upload-time = "2025-07-26T12:02:48.691Z" }, - { url = "https://files.pythonhosted.org/packages/fa/96/fd9f641ffedc4fa3ace923af73b9d07e869496c9cc7a459103e6e978992f/contourpy-1.3.3-cp314-cp314t-win_amd64.whl", hash = "sha256:13b68d6a62db8eafaebb8039218921399baf6e47bf85006fd8529f2a08ef33fc", size = 250331, upload-time = "2025-07-26T12:02:50.137Z" }, - { url = "https://files.pythonhosted.org/packages/ae/8c/469afb6465b853afff216f9528ffda78a915ff880ed58813ba4faf4ba0b6/contourpy-1.3.3-cp314-cp314t-win_arm64.whl", hash = "sha256:b7448cb5a725bb1e35ce88771b86fba35ef418952474492cf7c764059933ff8b", size = 203831, upload-time = "2025-07-26T12:02:51.449Z" }, - { url = "https://files.pythonhosted.org/packages/a5/29/8dcfe16f0107943fa92388c23f6e05cff0ba58058c4c95b00280d4c75a14/contourpy-1.3.3-pp311-pypy311_pp73-macosx_10_15_x86_64.whl", hash = "sha256:cd5dfcaeb10f7b7f9dc8941717c6c2ade08f587be2226222c12b25f0483ed497", size = 278809, upload-time = "2025-07-26T12:02:52.74Z" }, - { url = "https://files.pythonhosted.org/packages/85/a9/8b37ef4f7dafeb335daee3c8254645ef5725be4d9c6aa70b50ec46ef2f7e/contourpy-1.3.3-pp311-pypy311_pp73-macosx_11_0_arm64.whl", hash = "sha256:0c1fc238306b35f246d61a1d416a627348b5cf0648648a031e14bb8705fcdfe8", size = 261593, upload-time = "2025-07-26T12:02:54.037Z" }, - { url = "https://files.pythonhosted.org/packages/0a/59/ebfb8c677c75605cc27f7122c90313fd2f375ff3c8d19a1694bda74aaa63/contourpy-1.3.3-pp311-pypy311_pp73-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:70f9aad7de812d6541d29d2bbf8feb22ff7e1c299523db288004e3157ff4674e", size = 302202, upload-time = "2025-07-26T12:02:55.947Z" }, - { url = "https://files.pythonhosted.org/packages/3c/37/21972a15834d90bfbfb009b9d004779bd5a07a0ec0234e5ba8f64d5736f4/contourpy-1.3.3-pp311-pypy311_pp73-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:5ed3657edf08512fc3fe81b510e35c2012fbd3081d2e26160f27ca28affec989", size = 329207, upload-time = "2025-07-26T12:02:57.468Z" }, - { url = "https://files.pythonhosted.org/packages/0c/58/bd257695f39d05594ca4ad60df5bcb7e32247f9951fd09a9b8edb82d1daa/contourpy-1.3.3-pp311-pypy311_pp73-win_amd64.whl", hash = "sha256:3d1a3799d62d45c18bafd41c5fa05120b96a28079f2393af559b843d1a966a77", size = 225315, upload-time = "2025-07-26T12:02:58.801Z" }, -] - [[package]] name = "coverage" version = "7.13.4" @@ -512,46 +413,6 @@ toml = [ { name = "tomli", marker = "python_full_version <= '3.11'" }, ] -[[package]] -name = "cycler" -version = "0.12.1" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/a9/95/a3dbbb5028f35eafb79008e7522a75244477d2838f38cbb722248dabc2a8/cycler-0.12.1.tar.gz", hash = "sha256:88bb128f02ba341da8ef447245a9e138fae777f6a23943da4540077d3601eb1c", size = 7615, upload-time = "2023-10-07T05:32:18.335Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/e7/05/c19819d5e3d95294a6f5947fb9b9629efb316b96de511b418c53d245aae6/cycler-0.12.1-py3-none-any.whl", hash = "sha256:85cef7cff222d8644161529808465972e51340599459b8ac3ccbac5a854e0d30", size = 8321, upload-time = "2023-10-07T05:32:16.783Z" }, -] - -[[package]] -name = "cython" -version = "3.0.8" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/68/09/ffb61f29b8e3d207c444032b21328327d753e274ea081bc74e009827cc81/Cython-3.0.8.tar.gz", hash = "sha256:8333423d8fd5765e7cceea3a9985dd1e0a5dfeb2734629e1a2ed2d6233d39de6", size = 2744096, upload-time = "2024-01-10T11:01:02.155Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/db/a7/f4a0bc9a80e23b380daa2ebb4879bf434aaa0b3b91f7ad8a7f9762b4bd1b/Cython-3.0.8-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:aae26f9663e50caf9657148403d9874eea41770ecdd6caf381d177c2b1bb82ba", size = 3113615, upload-time = "2024-01-10T11:34:05.899Z" }, - { url = "https://files.pythonhosted.org/packages/e9/e9/e9295df74246c165b91253a473bfa179debf739c9bee961cbb3ae56c2b79/Cython-3.0.8-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:547eb3cdb2f8c6f48e6865d5a741d9dd051c25b3ce076fbca571727977b28ac3", size = 3436320, upload-time = "2024-01-10T11:02:08.689Z" }, - { url = "https://files.pythonhosted.org/packages/26/2c/6a887c957aa53e44f928119dea628a5dfacc8e875424034f5fecac9daba4/Cython-3.0.8-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:5a567d4b9ba70b26db89d75b243529de9e649a2f56384287533cf91512705bee", size = 3591755, upload-time = "2024-01-10T11:02:11.773Z" }, - { url = "https://files.pythonhosted.org/packages/ba/b8/f9c97bae6281da50b3ecb1f7fef0f7f7851eae084609b364717a2b366bf1/Cython-3.0.8-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:51d1426263b0e82fb22bda8ea60dc77a428581cc19e97741011b938445d383f1", size = 3636099, upload-time = "2024-01-10T11:02:15.191Z" }, - { url = "https://files.pythonhosted.org/packages/17/ae/cd055c2c081c67a6fcad1d8d17d82bd6395b14c6741e3a938f40318c8bc5/Cython-3.0.8-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:c26daaeccda072459b48d211415fd1e5507c06bcd976fa0d5b8b9f1063467d7b", size = 3458119, upload-time = "2024-01-10T11:02:19.103Z" }, - { url = "https://files.pythonhosted.org/packages/72/ab/ac6f5548d6194f4bb2fc8c6c996aa7369f0fa1403e4d4de787d9e9309b27/Cython-3.0.8-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:289ce7838208211cd166e975865fd73b0649bf118170b6cebaedfbdaf4a37795", size = 3614418, upload-time = "2024-01-10T11:02:22.732Z" }, - { url = "https://files.pythonhosted.org/packages/70/e2/3e3e448b7a94887bec3235bcb71957b6681dc42b4536459f8f54d46fa936/Cython-3.0.8-cp311-cp311-win32.whl", hash = "sha256:c8aa05f5e17f8042a3be052c24f2edc013fb8af874b0bf76907d16c51b4e7871", size = 2572819, upload-time = "2024-01-10T11:02:25.976Z" }, - { url = "https://files.pythonhosted.org/packages/85/7d/58635941dfbb5b4e197adb88080b9cbfb230dc3b75683698a530a1989bdb/Cython-3.0.8-cp311-cp311-win_amd64.whl", hash = "sha256:000dc9e135d0eec6ecb2b40a5b02d0868a2f8d2e027a41b0fe16a908a9e6de02", size = 2784167, upload-time = "2024-01-10T11:02:28.808Z" }, - { url = "https://files.pythonhosted.org/packages/3d/8e/28f8c6109990eef7317ab7e43644092b49a88a39f9373dcd19318946df09/Cython-3.0.8-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:90d3fe31db55685d8cb97d43b0ec39ef614fcf660f83c77ed06aa670cb0e164f", size = 3135638, upload-time = "2024-01-10T11:34:22.889Z" }, - { url = "https://files.pythonhosted.org/packages/83/1f/4720cb682b8ed1ab9749dea35351a66dd29b6a022628cce038415660c384/Cython-3.0.8-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e24791ddae2324e88e3c902a765595c738f19ae34ee66bfb1a6dac54b1833419", size = 3340052, upload-time = "2024-01-10T11:02:32.471Z" }, - { url = "https://files.pythonhosted.org/packages/8a/47/ec3fceb9e8f7d6fa130216b8740038e1df7c8e5f215bba363fcf1272a6c1/Cython-3.0.8-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2f020fa1c0552052e0660790b8153b79e3fc9a15dbd8f1d0b841fe5d204a6ae6", size = 3510079, upload-time = "2024-01-10T11:02:35.312Z" }, - { url = "https://files.pythonhosted.org/packages/71/31/b458127851e248effb909e2791b55870914863cde7c60b94db5ee65d7867/Cython-3.0.8-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:18bfa387d7a7f77d7b2526af69a65dbd0b731b8d941aaff5becff8e21f6d7717", size = 3573972, upload-time = "2024-01-10T11:02:39.044Z" }, - { url = "https://files.pythonhosted.org/packages/6b/d5/ca6513844d0634abd05ba12304053a454bb70441a9520afa9897d4300156/Cython-3.0.8-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:fe81b339cffd87c0069c6049b4d33e28bdd1874625ee515785bf42c9fdff3658", size = 3356158, upload-time = "2024-01-10T11:02:42.125Z" }, - { url = "https://files.pythonhosted.org/packages/33/59/98a87b6264f4ad45c820db13c4ec657567476efde020c49443cc842a86af/Cython-3.0.8-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:80fd94c076e1e1b1ee40a309be03080b75f413e8997cddcf401a118879863388", size = 3522312, upload-time = "2024-01-10T11:02:45.056Z" }, - { url = "https://files.pythonhosted.org/packages/2b/cb/132115d07a0b9d4f075e0741db70a5416b424dcd875b2bb0dd805e818222/Cython-3.0.8-cp312-cp312-win32.whl", hash = "sha256:85077915a93e359a9b920280d214dc0cf8a62773e1f3d7d30fab8ea4daed670c", size = 2602579, upload-time = "2024-01-10T11:02:48.368Z" }, - { url = "https://files.pythonhosted.org/packages/b4/69/cb4620287cd9ef461103e122c0a2ae7f7ecf183e02510676fb5a15c95b05/Cython-3.0.8-cp312-cp312-win_amd64.whl", hash = "sha256:0cb2dcc565c7851f75d496f724a384a790fab12d1b82461b663e66605bec429a", size = 2791268, upload-time = "2024-01-10T11:02:51.483Z" }, - { url = "https://files.pythonhosted.org/packages/e3/7f/f584f5d15323feb897d42ef0e9d910649e2150d7a30cf7e7a8cc1d236e6f/Cython-3.0.8-py2.py3-none-any.whl", hash = "sha256:171b27051253d3f9108e9759e504ba59ff06e7f7ba944457f94deaf9c21bf0b6", size = 1168213, upload-time = "2024-01-10T11:00:56.857Z" }, -] - -[[package]] -name = "easydict" -version = "1.11" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/0a/d2/deb3296d08097fedd622d423c0ec8b68b78c1704b3f1545326f6ce05c75c/easydict-1.11.tar.gz", hash = "sha256:dcb1d2ed28eb300c8e46cd371340373abc62f7c14d6dea74fdfc6f1069061c78", size = 6644, upload-time = "2023-10-23T23:01:37.686Z" } - [[package]] name = "fastapi" version = "0.136.3" @@ -627,55 +488,6 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/6f/12/d5c79ee252793ffe845d58a913197bfa02ae9a0b5c9bc3dc4b58d477b9e7/flatbuffers-23.5.26-py2.py3-none-any.whl", hash = "sha256:c0ff356da363087b915fde4b8b45bdda73432fc17cddb3c8157472eab1422ad1", size = 26744, upload-time = "2023-05-26T17:35:14.269Z" }, ] -[[package]] -name = "fonttools" -version = "4.61.1" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/ec/ca/cf17b88a8df95691275a3d77dc0a5ad9907f328ae53acbe6795da1b2f5ed/fonttools-4.61.1.tar.gz", hash = "sha256:6675329885c44657f826ef01d9e4fb33b9158e9d93c537d84ad8399539bc6f69", size = 3565756, upload-time = "2025-12-12T17:31:24.246Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/69/12/bf9f4eaa2fad039356cc627587e30ed008c03f1cebd3034376b5ee8d1d44/fonttools-4.61.1-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:c6604b735bb12fef8e0efd5578c9fb5d3d8532d5001ea13a19cddf295673ee09", size = 2852213, upload-time = "2025-12-12T17:29:46.675Z" }, - { url = "https://files.pythonhosted.org/packages/ac/49/4138d1acb6261499bedde1c07f8c2605d1d8f9d77a151e5507fd3ef084b6/fonttools-4.61.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:5ce02f38a754f207f2f06557523cd39a06438ba3aafc0639c477ac409fc64e37", size = 2401689, upload-time = "2025-12-12T17:29:48.769Z" }, - { url = "https://files.pythonhosted.org/packages/e5/fe/e6ce0fe20a40e03aef906af60aa87668696f9e4802fa283627d0b5ed777f/fonttools-4.61.1-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:77efb033d8d7ff233385f30c62c7c79271c8885d5c9657d967ede124671bbdfb", size = 5058809, upload-time = "2025-12-12T17:29:51.701Z" }, - { url = "https://files.pythonhosted.org/packages/79/61/1ca198af22f7dd22c17ab86e9024ed3c06299cfdb08170640e9996d501a0/fonttools-4.61.1-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:75c1a6dfac6abd407634420c93864a1e274ebc1c7531346d9254c0d8f6ca00f9", size = 5036039, upload-time = "2025-12-12T17:29:53.659Z" }, - { url = "https://files.pythonhosted.org/packages/99/cc/fa1801e408586b5fce4da9f5455af8d770f4fc57391cd5da7256bb364d38/fonttools-4.61.1-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:0de30bfe7745c0d1ffa2b0b7048fb7123ad0d71107e10ee090fa0b16b9452e87", size = 5034714, upload-time = "2025-12-12T17:29:55.592Z" }, - { url = "https://files.pythonhosted.org/packages/bf/aa/b7aeafe65adb1b0a925f8f25725e09f078c635bc22754f3fecb7456955b0/fonttools-4.61.1-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:58b0ee0ab5b1fc9921eccfe11d1435added19d6494dde14e323f25ad2bc30c56", size = 5158648, upload-time = "2025-12-12T17:29:57.861Z" }, - { url = "https://files.pythonhosted.org/packages/99/f9/08ea7a38663328881384c6e7777bbefc46fd7d282adfd87a7d2b84ec9d50/fonttools-4.61.1-cp311-cp311-win32.whl", hash = "sha256:f79b168428351d11e10c5aeb61a74e1851ec221081299f4cf56036a95431c43a", size = 2280681, upload-time = "2025-12-12T17:29:59.943Z" }, - { url = "https://files.pythonhosted.org/packages/07/ad/37dd1ae5fa6e01612a1fbb954f0927681f282925a86e86198ccd7b15d515/fonttools-4.61.1-cp311-cp311-win_amd64.whl", hash = "sha256:fe2efccb324948a11dd09d22136fe2ac8a97d6c1347cf0b58a911dcd529f66b7", size = 2331951, upload-time = "2025-12-12T17:30:02.254Z" }, - { url = "https://files.pythonhosted.org/packages/6f/16/7decaa24a1bd3a70c607b2e29f0adc6159f36a7e40eaba59846414765fd4/fonttools-4.61.1-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:f3cb4a569029b9f291f88aafc927dd53683757e640081ca8c412781ea144565e", size = 2851593, upload-time = "2025-12-12T17:30:04.225Z" }, - { url = "https://files.pythonhosted.org/packages/94/98/3c4cb97c64713a8cf499b3245c3bf9a2b8fd16a3e375feff2aed78f96259/fonttools-4.61.1-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:41a7170d042e8c0024703ed13b71893519a1a6d6e18e933e3ec7507a2c26a4b2", size = 2400231, upload-time = "2025-12-12T17:30:06.47Z" }, - { url = "https://files.pythonhosted.org/packages/b7/37/82dbef0f6342eb01f54bca073ac1498433d6ce71e50c3c3282b655733b31/fonttools-4.61.1-cp312-cp312-manylinux1_x86_64.manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:10d88e55330e092940584774ee5e8a6971b01fc2f4d3466a1d6c158230880796", size = 4954103, upload-time = "2025-12-12T17:30:08.432Z" }, - { url = "https://files.pythonhosted.org/packages/6c/44/f3aeac0fa98e7ad527f479e161aca6c3a1e47bb6996b053d45226fe37bf2/fonttools-4.61.1-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:15acc09befd16a0fb8a8f62bc147e1a82817542d72184acca9ce6e0aeda9fa6d", size = 5004295, upload-time = "2025-12-12T17:30:10.56Z" }, - { url = "https://files.pythonhosted.org/packages/14/e8/7424ced75473983b964d09f6747fa09f054a6d656f60e9ac9324cf40c743/fonttools-4.61.1-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:e6bcdf33aec38d16508ce61fd81838f24c83c90a1d1b8c68982857038673d6b8", size = 4944109, upload-time = "2025-12-12T17:30:12.874Z" }, - { url = "https://files.pythonhosted.org/packages/c8/8b/6391b257fa3d0b553d73e778f953a2f0154292a7a7a085e2374b111e5410/fonttools-4.61.1-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:5fade934607a523614726119164ff621e8c30e8fa1ffffbbd358662056ba69f0", size = 5093598, upload-time = "2025-12-12T17:30:15.79Z" }, - { url = "https://files.pythonhosted.org/packages/d9/71/fd2ea96cdc512d92da5678a1c98c267ddd4d8c5130b76d0f7a80f9a9fde8/fonttools-4.61.1-cp312-cp312-win32.whl", hash = "sha256:75da8f28eff26defba42c52986de97b22106cb8f26515b7c22443ebc9c2d3261", size = 2269060, upload-time = "2025-12-12T17:30:18.058Z" }, - { url = "https://files.pythonhosted.org/packages/80/3b/a3e81b71aed5a688e89dfe0e2694b26b78c7d7f39a5ffd8a7d75f54a12a8/fonttools-4.61.1-cp312-cp312-win_amd64.whl", hash = "sha256:497c31ce314219888c0e2fce5ad9178ca83fe5230b01a5006726cdf3ac9f24d9", size = 2319078, upload-time = "2025-12-12T17:30:22.862Z" }, - { url = "https://files.pythonhosted.org/packages/4b/cf/00ba28b0990982530addb8dc3e9e6f2fa9cb5c20df2abdda7baa755e8fe1/fonttools-4.61.1-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:8c56c488ab471628ff3bfa80964372fc13504ece601e0d97a78ee74126b2045c", size = 2846454, upload-time = "2025-12-12T17:30:24.938Z" }, - { url = "https://files.pythonhosted.org/packages/5a/ca/468c9a8446a2103ae645d14fee3f610567b7042aba85031c1c65e3ef7471/fonttools-4.61.1-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:dc492779501fa723b04d0ab1f5be046797fee17d27700476edc7ee9ae535a61e", size = 2398191, upload-time = "2025-12-12T17:30:27.343Z" }, - { url = "https://files.pythonhosted.org/packages/a3/4b/d67eedaed19def5967fade3297fed8161b25ba94699efc124b14fb68cdbc/fonttools-4.61.1-cp313-cp313-manylinux1_x86_64.manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:64102ca87e84261419c3747a0d20f396eb024bdbeb04c2bfb37e2891f5fadcb5", size = 4928410, upload-time = "2025-12-12T17:30:29.771Z" }, - { url = "https://files.pythonhosted.org/packages/b0/8d/6fb3494dfe61a46258cd93d979cf4725ded4eb46c2a4ca35e4490d84daea/fonttools-4.61.1-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:4c1b526c8d3f615a7b1867f38a9410849c8f4aef078535742198e942fba0e9bd", size = 4984460, upload-time = "2025-12-12T17:30:32.073Z" }, - { url = "https://files.pythonhosted.org/packages/f7/f1/a47f1d30b3dc00d75e7af762652d4cbc3dff5c2697a0dbd5203c81afd9c3/fonttools-4.61.1-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:41ed4b5ec103bd306bb68f81dc166e77409e5209443e5773cb4ed837bcc9b0d3", size = 4925800, upload-time = "2025-12-12T17:30:34.339Z" }, - { url = "https://files.pythonhosted.org/packages/a7/01/e6ae64a0981076e8a66906fab01539799546181e32a37a0257b77e4aa88b/fonttools-4.61.1-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:b501c862d4901792adaec7c25b1ecc749e2662543f68bb194c42ba18d6eec98d", size = 5067859, upload-time = "2025-12-12T17:30:36.593Z" }, - { url = "https://files.pythonhosted.org/packages/73/aa/28e40b8d6809a9b5075350a86779163f074d2b617c15d22343fce81918db/fonttools-4.61.1-cp313-cp313-win32.whl", hash = "sha256:4d7092bb38c53bbc78e9255a59158b150bcdc115a1e3b3ce0b5f267dc35dd63c", size = 2267821, upload-time = "2025-12-12T17:30:38.478Z" }, - { url = "https://files.pythonhosted.org/packages/1a/59/453c06d1d83dc0951b69ef692d6b9f1846680342927df54e9a1ca91c6f90/fonttools-4.61.1-cp313-cp313-win_amd64.whl", hash = "sha256:21e7c8d76f62ab13c9472ccf74515ca5b9a761d1bde3265152a6dc58700d895b", size = 2318169, upload-time = "2025-12-12T17:30:40.951Z" }, - { url = "https://files.pythonhosted.org/packages/32/8f/4e7bf82c0cbb738d3c2206c920ca34ca74ef9dabde779030145d28665104/fonttools-4.61.1-cp314-cp314-macosx_10_15_universal2.whl", hash = "sha256:fff4f534200a04b4a36e7ae3cb74493afe807b517a09e99cb4faa89a34ed6ecd", size = 2846094, upload-time = "2025-12-12T17:30:43.511Z" }, - { url = "https://files.pythonhosted.org/packages/71/09/d44e45d0a4f3a651f23a1e9d42de43bc643cce2971b19e784cc67d823676/fonttools-4.61.1-cp314-cp314-macosx_10_15_x86_64.whl", hash = "sha256:d9203500f7c63545b4ce3799319fe4d9feb1a1b89b28d3cb5abd11b9dd64147e", size = 2396589, upload-time = "2025-12-12T17:30:45.681Z" }, - { url = "https://files.pythonhosted.org/packages/89/18/58c64cafcf8eb677a99ef593121f719e6dcbdb7d1c594ae5a10d4997ca8a/fonttools-4.61.1-cp314-cp314-manylinux1_x86_64.manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:fa646ecec9528bef693415c79a86e733c70a4965dd938e9a226b0fc64c9d2e6c", size = 4877892, upload-time = "2025-12-12T17:30:47.709Z" }, - { url = "https://files.pythonhosted.org/packages/8a/ec/9e6b38c7ba1e09eb51db849d5450f4c05b7e78481f662c3b79dbde6f3d04/fonttools-4.61.1-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:11f35ad7805edba3aac1a3710d104592df59f4b957e30108ae0ba6c10b11dd75", size = 4972884, upload-time = "2025-12-12T17:30:49.656Z" }, - { url = "https://files.pythonhosted.org/packages/5e/87/b5339da8e0256734ba0dbbf5b6cdebb1dd79b01dc8c270989b7bcd465541/fonttools-4.61.1-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:b931ae8f62db78861b0ff1ac017851764602288575d65b8e8ff1963fed419063", size = 4924405, upload-time = "2025-12-12T17:30:51.735Z" }, - { url = "https://files.pythonhosted.org/packages/0b/47/e3409f1e1e69c073a3a6fd8cb886eb18c0bae0ee13db2c8d5e7f8495e8b7/fonttools-4.61.1-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:b148b56f5de675ee16d45e769e69f87623a4944f7443850bf9a9376e628a89d2", size = 5035553, upload-time = "2025-12-12T17:30:54.823Z" }, - { url = "https://files.pythonhosted.org/packages/bf/b6/1f6600161b1073a984294c6c031e1a56ebf95b6164249eecf30012bb2e38/fonttools-4.61.1-cp314-cp314-win32.whl", hash = "sha256:9b666a475a65f4e839d3d10473fad6d47e0a9db14a2f4a224029c5bfde58ad2c", size = 2271915, upload-time = "2025-12-12T17:30:57.913Z" }, - { url = "https://files.pythonhosted.org/packages/52/7b/91e7b01e37cc8eb0e1f770d08305b3655e4f002fc160fb82b3390eabacf5/fonttools-4.61.1-cp314-cp314-win_amd64.whl", hash = "sha256:4f5686e1fe5fce75d82d93c47a438a25bf0d1319d2843a926f741140b2b16e0c", size = 2323487, upload-time = "2025-12-12T17:30:59.804Z" }, - { url = "https://files.pythonhosted.org/packages/39/5c/908ad78e46c61c3e3ed70c3b58ff82ab48437faf84ec84f109592cabbd9f/fonttools-4.61.1-cp314-cp314t-macosx_10_15_universal2.whl", hash = "sha256:e76ce097e3c57c4bcb67c5aa24a0ecdbd9f74ea9219997a707a4061fbe2707aa", size = 2929571, upload-time = "2025-12-12T17:31:02.574Z" }, - { url = "https://files.pythonhosted.org/packages/bd/41/975804132c6dea64cdbfbaa59f3518a21c137a10cccf962805b301ac6ab2/fonttools-4.61.1-cp314-cp314t-macosx_10_15_x86_64.whl", hash = "sha256:9cfef3ab326780c04d6646f68d4b4742aae222e8b8ea1d627c74e38afcbc9d91", size = 2435317, upload-time = "2025-12-12T17:31:04.974Z" }, - { url = "https://files.pythonhosted.org/packages/b0/5a/aef2a0a8daf1ebaae4cfd83f84186d4a72ee08fd6a8451289fcd03ffa8a4/fonttools-4.61.1-cp314-cp314t-manylinux1_x86_64.manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:a75c301f96db737e1c5ed5fd7d77d9c34466de16095a266509e13da09751bd19", size = 4882124, upload-time = "2025-12-12T17:31:07.456Z" }, - { url = "https://files.pythonhosted.org/packages/80/33/d6db3485b645b81cea538c9d1c9219d5805f0877fda18777add4671c5240/fonttools-4.61.1-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:91669ccac46bbc1d09e9273546181919064e8df73488ea087dcac3e2968df9ba", size = 5100391, upload-time = "2025-12-12T17:31:09.732Z" }, - { url = "https://files.pythonhosted.org/packages/6c/d6/675ba631454043c75fcf76f0ca5463eac8eb0666ea1d7badae5fea001155/fonttools-4.61.1-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:c33ab3ca9d3ccd581d58e989d67554e42d8d4ded94ab3ade3508455fe70e65f7", size = 4978800, upload-time = "2025-12-12T17:31:11.681Z" }, - { url = "https://files.pythonhosted.org/packages/7f/33/d3ec753d547a8d2bdaedd390d4a814e8d5b45a093d558f025c6b990b554c/fonttools-4.61.1-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:664c5a68ec406f6b1547946683008576ef8b38275608e1cee6c061828171c118", size = 5006426, upload-time = "2025-12-12T17:31:13.764Z" }, - { url = "https://files.pythonhosted.org/packages/b4/40/cc11f378b561a67bea850ab50063366a0d1dd3f6d0a30ce0f874b0ad5664/fonttools-4.61.1-cp314-cp314t-win32.whl", hash = "sha256:aed04cabe26f30c1647ef0e8fbb207516fd40fe9472e9439695f5c6998e60ac5", size = 2335377, upload-time = "2025-12-12T17:31:16.49Z" }, - { url = "https://files.pythonhosted.org/packages/e4/ff/c9a2b66b39f8628531ea58b320d66d951267c98c6a38684daa8f50fb02f8/fonttools-4.61.1-cp314-cp314t-win_amd64.whl", hash = "sha256:2180f14c141d2f0f3da43f3a81bc8aa4684860f6b0e6f9e165a4831f24e6a23b", size = 2400613, upload-time = "2025-12-12T17:31:18.769Z" }, - { url = "https://files.pythonhosted.org/packages/c7/4e/ce75a57ff3aebf6fc1f4e9d508b8e5810618a33d900ad6c19eb30b290b97/fonttools-4.61.1-py3-none-any.whl", hash = "sha256:17d2bf5d541add43822bcf0c43d7d847b160c9bb01d15d5007d84e2217aaa371", size = 1148996, upload-time = "2025-12-12T17:31:21.03Z" }, -] - [[package]] name = "fsspec" version = "2023.12.2" @@ -959,30 +771,17 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/0e/61/66938bbb5fc52dbdf84594873d5b51fb1f7c7794e9c0f5bd885f30bc507b/idna-3.11-py3-none-any.whl", hash = "sha256:771a87f49d9defaf64091e6e6fe9c18d4833f140bd19464795bc32d966ca37ea", size = 71008, upload-time = "2025-10-12T14:55:18.883Z" }, ] -[[package]] -name = "imageio" -version = "2.33.1" -source = { registry = "https://pypi.org/simple" } -dependencies = [ - { name = "numpy" }, - { name = "pillow" }, -] -sdist = { url = "https://files.pythonhosted.org/packages/25/38/f4c568318c656352d211eec6954460dc3af0b7583a6682308f8a66e4c19b/imageio-2.33.1.tar.gz", hash = "sha256:78722d40b137bd98f5ec7312119f8aea9ad2049f76f434748eb306b6937cc1ce", size = 387374, upload-time = "2023-12-11T02:26:44.715Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/c0/69/3aaa69cb0748e33e644fda114c9abd3186ce369edd4fca11107e9f39c6a7/imageio-2.33.1-py3-none-any.whl", hash = "sha256:c5094c48ccf6b2e6da8b4061cd95e1209380afafcbeae4a4e280938cce227e1d", size = 313345, upload-time = "2023-12-11T02:26:42.724Z" }, -] - [[package]] name = "immich-ml" -version = "3.0.0rc3" +version = "3.1.0" source = { editable = "." } dependencies = [ { name = "aiocache" }, { name = "fastapi" }, { name = "gunicorn" }, { name = "huggingface-hub" }, - { name = "insightface" }, { name = "numpy" }, + { name = "onnx" }, { name = "opencv-python-headless" }, { name = "orjson" }, { name = "pillow" }, @@ -1062,8 +861,8 @@ requires-dist = [ { name = "fastapi", specifier = ">=0.95.2,<1.0" }, { name = "gunicorn", specifier = ">=21.1.0" }, { name = "huggingface-hub", specifier = ">=1.0,<2.0" }, - { name = "insightface", specifier = ">=0.7.3,<2.0" }, { name = "numpy", specifier = ">=2.4.0,<3.0" }, + { name = "onnx", specifier = ">=1.22.0" }, { name = "onnxruntime", marker = "extra == 'armnn'", specifier = ">=1.23.2,<2" }, { name = "onnxruntime", marker = "extra == 'cpu'", specifier = ">=1.23.2,<2" }, { name = "onnxruntime", marker = "extra == 'rknn'", specifier = ">=1.23.2,<2" }, @@ -1133,27 +932,6 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/ef/a6/62565a6e1cf69e10f5727360368e451d4b7f58beeac6173dc9db836a5b46/iniconfig-2.0.0-py3-none-any.whl", hash = "sha256:b6a85871a79d2e3b22d2d1b94ac2824226a63c6b741c88f7ae975f18b6778374", size = 5892, upload-time = "2023-01-07T11:08:09.864Z" }, ] -[[package]] -name = "insightface" -version = "0.7.3" -source = { registry = "https://pypi.org/simple" } -dependencies = [ - { name = "albumentations" }, - { name = "cython" }, - { name = "easydict" }, - { name = "matplotlib" }, - { name = "numpy" }, - { name = "onnx" }, - { name = "pillow" }, - { name = "prettytable" }, - { name = "requests" }, - { name = "scikit-image" }, - { name = "scikit-learn" }, - { name = "scipy" }, - { name = "tqdm" }, -] -sdist = { url = "https://files.pythonhosted.org/packages/0b/8d/0f4af90999ca96cf8cb846eb5ae27c5ef5b390f9c090dd19e4fa76364c13/insightface-0.7.3.tar.gz", hash = "sha256:f191f719612ebb37018f41936814500544cd0f86e6fcd676c023f354c668ddf7", size = 439490, upload-time = "2023-04-02T08:01:54.541Z" } - [[package]] name = "itsdangerous" version = "2.1.2" @@ -1175,65 +953,6 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/31/80/3a54838c3fb461f6fec263ebf3a3a41771bd05190238de3486aae8540c36/jinja2-3.1.4-py3-none-any.whl", hash = "sha256:bc5dd2abb727a5319567b7a813e6a2e7318c39f4f487cfe6c89c6f9c7d25197d", size = 133271, upload-time = "2024-05-05T23:41:59.928Z" }, ] -[[package]] -name = "joblib" -version = "1.3.2" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/15/0f/d3b33b9f106dddef461f6df1872b7881321b247f3d255b87f61a7636f7fe/joblib-1.3.2.tar.gz", hash = "sha256:92f865e621e17784e7955080b6d042489e3b8e294949cc44c6eac304f59772b1", size = 1987720, upload-time = "2023-08-09T09:23:40.503Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/10/40/d551139c85db202f1f384ba8bcf96aca2f329440a844f924c8a0040b6d02/joblib-1.3.2-py3-none-any.whl", hash = "sha256:ef4331c65f239985f3f2220ecc87db222f08fd22097a3dd5698f693875f8cbb9", size = 302207, upload-time = "2023-08-09T09:23:34.583Z" }, -] - -[[package]] -name = "kiwisolver" -version = "1.4.5" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/b9/2d/226779e405724344fc678fcc025b812587617ea1a48b9442628b688e85ea/kiwisolver-1.4.5.tar.gz", hash = "sha256:e57e563a57fb22a142da34f38acc2fc1a5c864bc29ca1517a88abc963e60d6ec", size = 97552, upload-time = "2023-08-24T09:30:39.861Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/2a/eb/9e099ad7c47c279995d2d20474e1821100a5f10f847739bd65b1c1f02442/kiwisolver-1.4.5-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:11863aa14a51fd6ec28688d76f1735f8f69ab1fabf388851a595d0721af042f5", size = 127403, upload-time = "2023-08-24T09:28:39.3Z" }, - { url = "https://files.pythonhosted.org/packages/a6/94/695922e71288855fc7cace3bdb52edda9d7e50edba77abb0c9d7abb51e96/kiwisolver-1.4.5-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:8ab3919a9997ab7ef2fbbed0cc99bb28d3c13e6d4b1ad36e97e482558a91be90", size = 68156, upload-time = "2023-08-24T09:28:40.301Z" }, - { url = "https://files.pythonhosted.org/packages/4a/fe/23d7fa78f7c66086d196406beb1fb2eaf629dd7adc01c3453033303d17fa/kiwisolver-1.4.5-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:fcc700eadbbccbf6bc1bcb9dbe0786b4b1cb91ca0dcda336eef5c2beed37b797", size = 66166, upload-time = "2023-08-24T09:28:41.235Z" }, - { url = "https://files.pythonhosted.org/packages/f1/68/f472bf16c9141bb1bea5c0b8c66c68fc1ccb048efdbd8f0872b92125724e/kiwisolver-1.4.5-cp311-cp311-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:dfdd7c0b105af050eb3d64997809dc21da247cf44e63dc73ff0fd20b96be55a9", size = 1334300, upload-time = "2023-08-24T09:28:42.409Z" }, - { url = "https://files.pythonhosted.org/packages/8d/26/b4569d1f29751fca22ee915b4ebfef5974f4ef239b3335fc072882bd62d9/kiwisolver-1.4.5-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:76c6a5964640638cdeaa0c359382e5703e9293030fe730018ca06bc2010c4437", size = 1426579, upload-time = "2023-08-24T09:28:43.677Z" }, - { url = "https://files.pythonhosted.org/packages/f3/a3/804fc7c8bf233806ec0321c9da35971578620f2ab4fafe67d76100b3ce52/kiwisolver-1.4.5-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:bbea0db94288e29afcc4c28afbf3a7ccaf2d7e027489c449cf7e8f83c6346eb9", size = 1541360, upload-time = "2023-08-24T09:28:45.939Z" }, - { url = "https://files.pythonhosted.org/packages/07/ef/286e1d26524854f6fbd6540e8364d67a8857d61038ac743e11edc42fe217/kiwisolver-1.4.5-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:ceec1a6bc6cab1d6ff5d06592a91a692f90ec7505d6463a88a52cc0eb58545da", size = 1470091, upload-time = "2023-08-24T09:28:47.959Z" }, - { url = "https://files.pythonhosted.org/packages/17/ba/17a706b232308e65f57deeccae503c268292e6a091313f6ce833a23093ea/kiwisolver-1.4.5-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:040c1aebeda72197ef477a906782b5ab0d387642e93bda547336b8957c61022e", size = 1426259, upload-time = "2023-08-24T09:28:49.224Z" }, - { url = "https://files.pythonhosted.org/packages/d0/f3/a0925611c9d6c2f37c5935a39203cadec6883aa914e013b46c84c4c2e641/kiwisolver-1.4.5-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:f91de7223d4c7b793867797bacd1ee53bfe7359bd70d27b7b58a04efbb9436c8", size = 1847516, upload-time = "2023-08-24T09:28:50.979Z" }, - { url = "https://files.pythonhosted.org/packages/da/85/82d59bb8f7c4c9bb2785138b72462cb1b161668f8230c58bbb28c0403cd5/kiwisolver-1.4.5-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:faae4860798c31530dd184046a900e652c95513796ef51a12bc086710c2eec4d", size = 1946228, upload-time = "2023-08-24T09:28:52.812Z" }, - { url = "https://files.pythonhosted.org/packages/34/3c/6a37f444c0233993881e5db3a6a1775925d4d9d2f2609bb325bb1348ed94/kiwisolver-1.4.5-cp311-cp311-musllinux_1_1_ppc64le.whl", hash = "sha256:b0157420efcb803e71d1b28e2c287518b8808b7cf1ab8af36718fd0a2c453eb0", size = 1901716, upload-time = "2023-08-24T09:28:54.115Z" }, - { url = "https://files.pythonhosted.org/packages/cd/7e/180425790efc00adfd47db14e1e341cb4826516982334129012b971121a6/kiwisolver-1.4.5-cp311-cp311-musllinux_1_1_s390x.whl", hash = "sha256:06f54715b7737c2fecdbf140d1afb11a33d59508a47bf11bb38ecf21dc9ab79f", size = 1852871, upload-time = "2023-08-24T09:28:55.433Z" }, - { url = "https://files.pythonhosted.org/packages/1b/9a/13c68b2edb1fa74321e60893a9a5829788e135138e68060cf44e2d92d2c3/kiwisolver-1.4.5-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:fdb7adb641a0d13bdcd4ef48e062363d8a9ad4a182ac7647ec88f695e719ae9f", size = 1870265, upload-time = "2023-08-24T09:28:56.855Z" }, - { url = "https://files.pythonhosted.org/packages/9f/0a/fa56a0fdee5da2b4c79899c0f6bd1aefb29d9438c2d66430e78793571c6b/kiwisolver-1.4.5-cp311-cp311-win32.whl", hash = "sha256:bb86433b1cfe686da83ce32a9d3a8dd308e85c76b60896d58f082136f10bffac", size = 46649, upload-time = "2023-08-24T09:28:58.021Z" }, - { url = "https://files.pythonhosted.org/packages/1e/37/d3c2d4ba2719059a0f12730947bbe1ad5ee8bff89e8c35319dcb2c9ddb4c/kiwisolver-1.4.5-cp311-cp311-win_amd64.whl", hash = "sha256:6c08e1312a9cf1074d17b17728d3dfce2a5125b2d791527f33ffbe805200a355", size = 56116, upload-time = "2023-08-24T09:28:58.994Z" }, - { url = "https://files.pythonhosted.org/packages/f3/7a/debbce859be1a2711eb8437818107137192007b88d17b5cfdb556f457b42/kiwisolver-1.4.5-cp312-cp312-macosx_10_9_universal2.whl", hash = "sha256:32d5cf40c4f7c7b3ca500f8985eb3fb3a7dfc023215e876f207956b5ea26632a", size = 125484, upload-time = "2023-08-24T09:28:59.975Z" }, - { url = "https://files.pythonhosted.org/packages/2d/e0/bf8df75ba93b9e035cc6757dd5dcaf63084fdc1c846ae134e818bd7e0f03/kiwisolver-1.4.5-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:f846c260f483d1fd217fe5ed7c173fb109efa6b1fc8381c8b7552c5781756192", size = 67332, upload-time = "2023-08-24T09:29:01.733Z" }, - { url = "https://files.pythonhosted.org/packages/26/61/58bb691f6880588be3a4801d199bd776032ece07203faf3e4a8b377f7d9b/kiwisolver-1.4.5-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:5ff5cf3571589b6d13bfbfd6bcd7a3f659e42f96b5fd1c4830c4cf21d4f5ef45", size = 64987, upload-time = "2023-08-24T09:29:02.789Z" }, - { url = "https://files.pythonhosted.org/packages/8e/a3/96ac5413068b237c006f54dd8d70114e8756d70e3da7613c5aef20627e22/kiwisolver-1.4.5-cp312-cp312-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:7269d9e5f1084a653d575c7ec012ff57f0c042258bf5db0954bf551c158466e7", size = 1370613, upload-time = "2023-08-24T09:29:03.912Z" }, - { url = "https://files.pythonhosted.org/packages/4d/12/f48539e6e17068b59c7f12f4d6214b973431b8e3ac83af525cafd27cebec/kiwisolver-1.4.5-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:da802a19d6e15dffe4b0c24b38b3af68e6c1a68e6e1d8f30148c83864f3881db", size = 1463183, upload-time = "2023-08-24T09:29:05.244Z" }, - { url = "https://files.pythonhosted.org/packages/f3/70/26c99be8eb034cc8e3f62e0760af1fbdc97a842a7cbc252f7978507d41c2/kiwisolver-1.4.5-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:3aba7311af82e335dd1e36ffff68aaca609ca6290c2cb6d821a39aa075d8e3ff", size = 1581248, upload-time = "2023-08-24T09:29:06.531Z" }, - { url = "https://files.pythonhosted.org/packages/17/f6/f75f20e543639b09b2de7fc864274a5a9b96cda167a6210a1d9d19306b9d/kiwisolver-1.4.5-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:763773d53f07244148ccac5b084da5adb90bfaee39c197554f01b286cf869228", size = 1508815, upload-time = "2023-08-24T09:29:07.867Z" }, - { url = "https://files.pythonhosted.org/packages/e3/d5/bc0f22ac108743062ab703f8d6d71c9c7b077b8839fa358700bfb81770b8/kiwisolver-1.4.5-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2270953c0d8cdab5d422bee7d2007f043473f9d2999631c86a223c9db56cbd16", size = 1466042, upload-time = "2023-08-24T09:29:09.403Z" }, - { url = "https://files.pythonhosted.org/packages/75/18/98142500f21d6838bcab49ec919414a1f0c6d049d21ddadf139124db6a70/kiwisolver-1.4.5-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:d099e745a512f7e3bbe7249ca835f4d357c586d78d79ae8f1dcd4d8adeb9bda9", size = 1885159, upload-time = "2023-08-24T09:29:10.66Z" }, - { url = "https://files.pythonhosted.org/packages/21/49/a241eff9e0ee013368c1d17957f9d345b0957493c3a43d82ebb558c90b0a/kiwisolver-1.4.5-cp312-cp312-musllinux_1_1_i686.whl", hash = "sha256:74db36e14a7d1ce0986fa104f7d5637aea5c82ca6326ed0ec5694280942d1162", size = 1981694, upload-time = "2023-08-24T09:29:12.469Z" }, - { url = "https://files.pythonhosted.org/packages/90/90/9490c3de4788123041b1d600d64434f1eed809a2ce9f688075a22166b289/kiwisolver-1.4.5-cp312-cp312-musllinux_1_1_ppc64le.whl", hash = "sha256:7e5bab140c309cb3a6ce373a9e71eb7e4873c70c2dda01df6820474f9889d6d4", size = 1941579, upload-time = "2023-08-24T09:29:13.743Z" }, - { url = "https://files.pythonhosted.org/packages/b7/bb/a0cc488ef2aa92d7d304318c8549d3ec8dfe6dd3c2c67a44e3922b77bc4f/kiwisolver-1.4.5-cp312-cp312-musllinux_1_1_s390x.whl", hash = "sha256:0f114aa76dc1b8f636d077979c0ac22e7cd8f3493abbab152f20eb8d3cda71f3", size = 1888168, upload-time = "2023-08-24T09:29:15.097Z" }, - { url = "https://files.pythonhosted.org/packages/4f/e9/9c0de8e45fef3d63f85eed3b1757f9aa511065942866331ef8b99421f433/kiwisolver-1.4.5-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:88a2df29d4724b9237fc0c6eaf2a1adae0cdc0b3e9f4d8e7dc54b16812d2d81a", size = 1908464, upload-time = "2023-08-24T09:29:16.539Z" }, - { url = "https://files.pythonhosted.org/packages/a3/60/4f0fd50b08f5be536ea0cef518ac7255d9dab43ca40f3b93b60e3ddf80dd/kiwisolver-1.4.5-cp312-cp312-win32.whl", hash = "sha256:72d40b33e834371fd330fb1472ca19d9b8327acb79a5821d4008391db8e29f20", size = 46473, upload-time = "2023-08-24T09:29:17.956Z" }, - { url = "https://files.pythonhosted.org/packages/63/50/2746566bdf4a6a842d117367d05c90cfb87ac04e9e2845aa1fa21f071362/kiwisolver-1.4.5-cp312-cp312-win_amd64.whl", hash = "sha256:2c5674c4e74d939b9d91dda0fae10597ac7521768fec9e399c70a1f27e2ea2d9", size = 56004, upload-time = "2023-08-24T09:29:19.329Z" }, -] - -[[package]] -name = "lazy-loader" -version = "0.4" -source = { registry = "https://pypi.org/simple" } -dependencies = [ - { name = "packaging" }, -] -sdist = { url = "https://files.pythonhosted.org/packages/6f/6b/c875b30a1ba490860c93da4cabf479e03f584eba06fe5963f6f6644653d8/lazy_loader-0.4.tar.gz", hash = "sha256:47c75182589b91a4e1a85a136c074285a5ad4d9f39c63e0d7fb76391c4574cd1", size = 15431, upload-time = "2024-04-05T13:03:12.261Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/83/60/d497a310bde3f01cb805196ac61b7ad6dc5dcf8dce66634dc34364b20b4f/lazy_loader-0.4-py3-none-any.whl", hash = "sha256:342aa8e14d543a154047afb4ba8ef17f5563baad3fc610d7b15b213b0f119efc", size = 12097, upload-time = "2024-04-05T13:03:10.514Z" }, -] - [[package]] name = "librt" version = "0.11.0" @@ -1374,70 +1093,6 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/44/44/dbaf65876e258facd65f586dde158387ab89963e7f2235551afc9c2e24c2/MarkupSafe-2.1.3-cp312-cp312-win_amd64.whl", hash = "sha256:1b8dd8c3fd14349433c79fa8abeb573a55fc0fdd769133baac1f5e07abf54aeb", size = 16979, upload-time = "2023-09-07T16:00:57.77Z" }, ] -[[package]] -name = "matplotlib" -version = "3.10.5" -source = { registry = "https://pypi.org/simple" } -dependencies = [ - { name = "contourpy" }, - { name = "cycler" }, - { name = "fonttools" }, - { name = "kiwisolver" }, - { name = "numpy" }, - { name = "packaging" }, - { name = "pillow" }, - { name = "pyparsing" }, - { name = "python-dateutil" }, -] -sdist = { url = "https://files.pythonhosted.org/packages/43/91/f2939bb60b7ebf12478b030e0d7f340247390f402b3b189616aad790c366/matplotlib-3.10.5.tar.gz", hash = "sha256:352ed6ccfb7998a00881692f38b4ca083c691d3e275b4145423704c34c909076", size = 34804044, upload-time = "2025-07-31T18:09:33.805Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/aa/c7/1f2db90a1d43710478bb1e9b57b162852f79234d28e4f48a28cc415aa583/matplotlib-3.10.5-cp311-cp311-macosx_10_12_x86_64.whl", hash = "sha256:dcfc39c452c6a9f9028d3e44d2d721484f665304857188124b505b2c95e1eecf", size = 8239216, upload-time = "2025-07-31T18:07:51.947Z" }, - { url = "https://files.pythonhosted.org/packages/82/6d/ca6844c77a4f89b1c9e4d481c412e1d1dbabf2aae2cbc5aa2da4a1d6683e/matplotlib-3.10.5-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:903352681b59f3efbf4546985142a9686ea1d616bb054b09a537a06e4b892ccf", size = 8102130, upload-time = "2025-07-31T18:07:53.65Z" }, - { url = "https://files.pythonhosted.org/packages/1d/1e/5e187a30cc673a3e384f3723e5f3c416033c1d8d5da414f82e4e731128ea/matplotlib-3.10.5-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:080c3676a56b8ee1c762bcf8fca3fe709daa1ee23e6ef06ad9f3fc17332f2d2a", size = 8666471, upload-time = "2025-07-31T18:07:55.304Z" }, - { url = "https://files.pythonhosted.org/packages/03/c0/95540d584d7d645324db99a845ac194e915ef75011a0d5e19e1b5cee7e69/matplotlib-3.10.5-cp311-cp311-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:4b4984d5064a35b6f66d2c11d668565f4389b1119cc64db7a4c1725bc11adffc", size = 9500518, upload-time = "2025-07-31T18:07:57.199Z" }, - { url = "https://files.pythonhosted.org/packages/ba/2e/e019352099ea58b4169adb9c6e1a2ad0c568c6377c2b677ee1f06de2adc7/matplotlib-3.10.5-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:3967424121d3a46705c9fa9bdb0931de3228f13f73d7bb03c999c88343a89d89", size = 9552372, upload-time = "2025-07-31T18:07:59.41Z" }, - { url = "https://files.pythonhosted.org/packages/b7/81/3200b792a5e8b354f31f4101ad7834743ad07b6d620259f2059317b25e4d/matplotlib-3.10.5-cp311-cp311-win_amd64.whl", hash = "sha256:33775bbeb75528555a15ac29396940128ef5613cf9a2d31fb1bfd18b3c0c0903", size = 8100634, upload-time = "2025-07-31T18:08:01.801Z" }, - { url = "https://files.pythonhosted.org/packages/52/46/a944f6f0c1f5476a0adfa501969d229ce5ae60cf9a663be0e70361381f89/matplotlib-3.10.5-cp311-cp311-win_arm64.whl", hash = "sha256:c61333a8e5e6240e73769d5826b9a31d8b22df76c0778f8480baf1b4b01c9420", size = 7978880, upload-time = "2025-07-31T18:08:03.407Z" }, - { url = "https://files.pythonhosted.org/packages/66/1e/c6f6bcd882d589410b475ca1fc22e34e34c82adff519caf18f3e6dd9d682/matplotlib-3.10.5-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:00b6feadc28a08bd3c65b2894f56cf3c94fc8f7adcbc6ab4516ae1e8ed8f62e2", size = 8253056, upload-time = "2025-07-31T18:08:05.385Z" }, - { url = "https://files.pythonhosted.org/packages/53/e6/d6f7d1b59413f233793dda14419776f5f443bcccb2dfc84b09f09fe05dbe/matplotlib-3.10.5-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:ee98a5c5344dc7f48dc261b6ba5d9900c008fc12beb3fa6ebda81273602cc389", size = 8110131, upload-time = "2025-07-31T18:08:07.293Z" }, - { url = "https://files.pythonhosted.org/packages/66/2b/bed8a45e74957549197a2ac2e1259671cd80b55ed9e1fe2b5c94d88a9202/matplotlib-3.10.5-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:a17e57e33de901d221a07af32c08870ed4528db0b6059dce7d7e65c1122d4bea", size = 8669603, upload-time = "2025-07-31T18:08:09.064Z" }, - { url = "https://files.pythonhosted.org/packages/7e/a7/315e9435b10d057f5e52dfc603cd353167ae28bb1a4e033d41540c0067a4/matplotlib-3.10.5-cp312-cp312-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:97b9d6443419085950ee4a5b1ee08c363e5c43d7176e55513479e53669e88468", size = 9508127, upload-time = "2025-07-31T18:08:10.845Z" }, - { url = "https://files.pythonhosted.org/packages/7f/d9/edcbb1f02ca99165365d2768d517898c22c6040187e2ae2ce7294437c413/matplotlib-3.10.5-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:ceefe5d40807d29a66ae916c6a3915d60ef9f028ce1927b84e727be91d884369", size = 9566926, upload-time = "2025-07-31T18:08:13.186Z" }, - { url = "https://files.pythonhosted.org/packages/3b/d9/6dd924ad5616c97b7308e6320cf392c466237a82a2040381163b7500510a/matplotlib-3.10.5-cp312-cp312-win_amd64.whl", hash = "sha256:c04cba0f93d40e45b3c187c6c52c17f24535b27d545f757a2fffebc06c12b98b", size = 8107599, upload-time = "2025-07-31T18:08:15.116Z" }, - { url = "https://files.pythonhosted.org/packages/0e/f3/522dc319a50f7b0279fbe74f86f7a3506ce414bc23172098e8d2bdf21894/matplotlib-3.10.5-cp312-cp312-win_arm64.whl", hash = "sha256:a41bcb6e2c8e79dc99c5511ae6f7787d2fb52efd3d805fff06d5d4f667db16b2", size = 7978173, upload-time = "2025-07-31T18:08:21.518Z" }, - { url = "https://files.pythonhosted.org/packages/8d/05/4f3c1f396075f108515e45cb8d334aff011a922350e502a7472e24c52d77/matplotlib-3.10.5-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:354204db3f7d5caaa10e5de74549ef6a05a4550fdd1c8f831ab9bca81efd39ed", size = 8253586, upload-time = "2025-07-31T18:08:23.107Z" }, - { url = "https://files.pythonhosted.org/packages/2f/2c/e084415775aac7016c3719fe7006cdb462582c6c99ac142f27303c56e243/matplotlib-3.10.5-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:b072aac0c3ad563a2b3318124756cb6112157017f7431626600ecbe890df57a1", size = 8110715, upload-time = "2025-07-31T18:08:24.675Z" }, - { url = "https://files.pythonhosted.org/packages/52/1b/233e3094b749df16e3e6cd5a44849fd33852e692ad009cf7de00cf58ddf6/matplotlib-3.10.5-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:d52fd5b684d541b5a51fb276b2b97b010c75bee9aa392f96b4a07aeb491e33c7", size = 8669397, upload-time = "2025-07-31T18:08:26.778Z" }, - { url = "https://files.pythonhosted.org/packages/e8/ec/03f9e003a798f907d9f772eed9b7c6a9775d5bd00648b643ebfb88e25414/matplotlib-3.10.5-cp313-cp313-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:ee7a09ae2f4676276f5a65bd9f2bd91b4f9fbaedf49f40267ce3f9b448de501f", size = 9508646, upload-time = "2025-07-31T18:08:28.848Z" }, - { url = "https://files.pythonhosted.org/packages/91/e7/c051a7a386680c28487bca27d23b02d84f63e3d2a9b4d2fc478e6a42e37e/matplotlib-3.10.5-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:ba6c3c9c067b83481d647af88b4e441d532acdb5ef22178a14935b0b881188f4", size = 9567424, upload-time = "2025-07-31T18:08:30.726Z" }, - { url = "https://files.pythonhosted.org/packages/36/c2/24302e93ff431b8f4173ee1dd88976c8d80483cadbc5d3d777cef47b3a1c/matplotlib-3.10.5-cp313-cp313-win_amd64.whl", hash = "sha256:07442d2692c9bd1cceaa4afb4bbe5b57b98a7599de4dabfcca92d3eea70f9ebe", size = 8107809, upload-time = "2025-07-31T18:08:33.928Z" }, - { url = "https://files.pythonhosted.org/packages/0b/33/423ec6a668d375dad825197557ed8fbdb74d62b432c1ed8235465945475f/matplotlib-3.10.5-cp313-cp313-win_arm64.whl", hash = "sha256:48fe6d47380b68a37ccfcc94f009530e84d41f71f5dae7eda7c4a5a84aa0a674", size = 7978078, upload-time = "2025-07-31T18:08:36.764Z" }, - { url = "https://files.pythonhosted.org/packages/51/17/521fc16ec766455c7bb52cc046550cf7652f6765ca8650ff120aa2d197b6/matplotlib-3.10.5-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:3b80eb8621331449fc519541a7461987f10afa4f9cfd91afcd2276ebe19bd56c", size = 8295590, upload-time = "2025-07-31T18:08:38.521Z" }, - { url = "https://files.pythonhosted.org/packages/f8/12/23c28b2c21114c63999bae129fce7fd34515641c517ae48ce7b7dcd33458/matplotlib-3.10.5-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:47a388908e469d6ca2a6015858fa924e0e8a2345a37125948d8e93a91c47933e", size = 8158518, upload-time = "2025-07-31T18:08:40.195Z" }, - { url = "https://files.pythonhosted.org/packages/81/f8/aae4eb25e8e7190759f3cb91cbeaa344128159ac92bb6b409e24f8711f78/matplotlib-3.10.5-cp313-cp313t-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:8b6b49167d208358983ce26e43aa4196073b4702858670f2eb111f9a10652b4b", size = 8691815, upload-time = "2025-07-31T18:08:42.238Z" }, - { url = "https://files.pythonhosted.org/packages/d0/ba/450c39ebdd486bd33a359fc17365ade46c6a96bf637bbb0df7824de2886c/matplotlib-3.10.5-cp313-cp313t-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:8a8da0453a7fd8e3da114234ba70c5ba9ef0e98f190309ddfde0f089accd46ea", size = 9522814, upload-time = "2025-07-31T18:08:44.914Z" }, - { url = "https://files.pythonhosted.org/packages/89/11/9c66f6a990e27bb9aa023f7988d2d5809cb98aa39c09cbf20fba75a542ef/matplotlib-3.10.5-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:52c6573dfcb7726a9907b482cd5b92e6b5499b284ffacb04ffbfe06b3e568124", size = 9573917, upload-time = "2025-07-31T18:08:47.038Z" }, - { url = "https://files.pythonhosted.org/packages/b3/69/8b49394de92569419e5e05e82e83df9b749a0ff550d07631ea96ed2eb35a/matplotlib-3.10.5-cp313-cp313t-win_amd64.whl", hash = "sha256:a23193db2e9d64ece69cac0c8231849db7dd77ce59c7b89948cf9d0ce655a3ce", size = 8181034, upload-time = "2025-07-31T18:08:48.943Z" }, - { url = "https://files.pythonhosted.org/packages/47/23/82dc435bb98a2fc5c20dffcac8f0b083935ac28286413ed8835df40d0baa/matplotlib-3.10.5-cp313-cp313t-win_arm64.whl", hash = "sha256:56da3b102cf6da2776fef3e71cd96fcf22103a13594a18ac9a9b31314e0be154", size = 8023337, upload-time = "2025-07-31T18:08:50.791Z" }, - { url = "https://files.pythonhosted.org/packages/ac/e0/26b6cfde31f5383503ee45dcb7e691d45dadf0b3f54639332b59316a97f8/matplotlib-3.10.5-cp314-cp314-macosx_10_13_x86_64.whl", hash = "sha256:96ef8f5a3696f20f55597ffa91c28e2e73088df25c555f8d4754931515512715", size = 8253591, upload-time = "2025-07-31T18:08:53.254Z" }, - { url = "https://files.pythonhosted.org/packages/c1/89/98488c7ef7ea20ea659af7499628c240a608b337af4be2066d644cfd0a0f/matplotlib-3.10.5-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:77fab633e94b9da60512d4fa0213daeb76d5a7b05156840c4fd0399b4b818837", size = 8112566, upload-time = "2025-07-31T18:08:55.116Z" }, - { url = "https://files.pythonhosted.org/packages/52/67/42294dfedc82aea55e1a767daf3263aacfb5a125f44ba189e685bab41b6f/matplotlib-3.10.5-cp314-cp314-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:27f52634315e96b1debbfdc5c416592edcd9c4221bc2f520fd39c33db5d9f202", size = 9513281, upload-time = "2025-07-31T18:08:56.885Z" }, - { url = "https://files.pythonhosted.org/packages/e7/68/f258239e0cf34c2cbc816781c7ab6fca768452e6bf1119aedd2bd4a882a3/matplotlib-3.10.5-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:525f6e28c485c769d1f07935b660c864de41c37fd716bfa64158ea646f7084bb", size = 9780873, upload-time = "2025-07-31T18:08:59.241Z" }, - { url = "https://files.pythonhosted.org/packages/89/64/f4881554006bd12e4558bd66778bdd15d47b00a1f6c6e8b50f6208eda4b3/matplotlib-3.10.5-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:1f5f3ec4c191253c5f2b7c07096a142c6a1c024d9f738247bfc8e3f9643fc975", size = 9568954, upload-time = "2025-07-31T18:09:01.244Z" }, - { url = "https://files.pythonhosted.org/packages/06/f8/42779d39c3f757e1f012f2dda3319a89fb602bd2ef98ce8faf0281f4febd/matplotlib-3.10.5-cp314-cp314-win_amd64.whl", hash = "sha256:707f9c292c4cd4716f19ab8a1f93f26598222cd931e0cd98fbbb1c5994bf7667", size = 8237465, upload-time = "2025-07-31T18:09:03.206Z" }, - { url = "https://files.pythonhosted.org/packages/cf/f8/153fd06b5160f0cd27c8b9dd797fcc9fb56ac6a0ebf3c1f765b6b68d3c8a/matplotlib-3.10.5-cp314-cp314-win_arm64.whl", hash = "sha256:21a95b9bf408178d372814de7baacd61c712a62cae560b5e6f35d791776f6516", size = 8108898, upload-time = "2025-07-31T18:09:05.231Z" }, - { url = "https://files.pythonhosted.org/packages/9a/ee/c4b082a382a225fe0d2a73f1f57cf6f6f132308805b493a54c8641006238/matplotlib-3.10.5-cp314-cp314t-macosx_10_13_x86_64.whl", hash = "sha256:a6b310f95e1102a8c7c817ef17b60ee5d1851b8c71b63d9286b66b177963039e", size = 8295636, upload-time = "2025-07-31T18:09:07.306Z" }, - { url = "https://files.pythonhosted.org/packages/30/73/2195fa2099718b21a20da82dfc753bf2af58d596b51aefe93e359dd5915a/matplotlib-3.10.5-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:94986a242747a0605cb3ff1cb98691c736f28a59f8ffe5175acaeb7397c49a5a", size = 8158575, upload-time = "2025-07-31T18:09:09.083Z" }, - { url = "https://files.pythonhosted.org/packages/f6/e9/a08cdb34618a91fa08f75e6738541da5cacde7c307cea18ff10f0d03fcff/matplotlib-3.10.5-cp314-cp314t-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:1ff10ea43288f0c8bab608a305dc6c918cc729d429c31dcbbecde3b9f4d5b569", size = 9522815, upload-time = "2025-07-31T18:09:11.191Z" }, - { url = "https://files.pythonhosted.org/packages/4e/bb/34d8b7e0d1bb6d06ef45db01dfa560d5a67b1c40c0b998ce9ccde934bb09/matplotlib-3.10.5-cp314-cp314t-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:f6adb644c9d040ffb0d3434e440490a66cf73dbfa118a6f79cd7568431f7a012", size = 9783514, upload-time = "2025-07-31T18:09:13.307Z" }, - { url = "https://files.pythonhosted.org/packages/12/09/d330d1e55dcca2e11b4d304cc5227f52e2512e46828d6249b88e0694176e/matplotlib-3.10.5-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:4fa40a8f98428f789a9dcacd625f59b7bc4e3ef6c8c7c80187a7a709475cf592", size = 9573932, upload-time = "2025-07-31T18:09:15.335Z" }, - { url = "https://files.pythonhosted.org/packages/eb/3b/f70258ac729aa004aca673800a53a2b0a26d49ca1df2eaa03289a1c40f81/matplotlib-3.10.5-cp314-cp314t-win_amd64.whl", hash = "sha256:95672a5d628b44207aab91ec20bf59c26da99de12b88f7e0b1fb0a84a86ff959", size = 8322003, upload-time = "2025-07-31T18:09:17.416Z" }, - { url = "https://files.pythonhosted.org/packages/5b/60/3601f8ce6d76a7c81c7f25a0e15fde0d6b66226dd187aa6d2838e6374161/matplotlib-3.10.5-cp314-cp314t-win_arm64.whl", hash = "sha256:2efaf97d72629e74252e0b5e3c46813e9eeaa94e011ecf8084a971a31a97f40b", size = 8153849, upload-time = "2025-07-31T18:09:19.673Z" }, - { url = "https://files.pythonhosted.org/packages/dc/d6/e921be4e1a5f7aca5194e1f016cb67ec294548e530013251f630713e456d/matplotlib-3.10.5-pp311-pypy311_pp73-macosx_10_15_x86_64.whl", hash = "sha256:160e125da27a749481eaddc0627962990f6029811dbeae23881833a011a0907f", size = 8233224, upload-time = "2025-07-31T18:09:27.512Z" }, - { url = "https://files.pythonhosted.org/packages/ec/74/a2b9b04824b9c349c8f1b2d21d5af43fa7010039427f2b133a034cb09e59/matplotlib-3.10.5-pp311-pypy311_pp73-macosx_11_0_arm64.whl", hash = "sha256:ac3d50760394d78a3c9be6b28318fe22b494c4fcf6407e8fd4794b538251899b", size = 8098539, upload-time = "2025-07-31T18:09:29.629Z" }, - { url = "https://files.pythonhosted.org/packages/fc/66/cd29ebc7f6c0d2a15d216fb572573e8fc38bd5d6dec3bd9d7d904c0949f7/matplotlib-3.10.5-pp311-pypy311_pp73-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:6c49465bf689c4d59d174d0c7795fb42a21d4244d11d70e52b8011987367ac61", size = 8672192, upload-time = "2025-07-31T18:09:31.407Z" }, -] - [[package]] name = "mdurl" version = "0.1.2" @@ -1449,39 +1104,43 @@ wheels = [ [[package]] name = "ml-dtypes" -version = "0.5.3" +version = "0.5.4" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "numpy" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/78/a7/aad060393123cfb383956dca68402aff3db1e1caffd5764887ed5153f41b/ml_dtypes-0.5.3.tar.gz", hash = "sha256:95ce33057ba4d05df50b1f3cfefab22e351868a843b3b15a46c65836283670c9", size = 692316, upload-time = "2025-07-29T18:39:19.454Z" } +sdist = { url = "https://files.pythonhosted.org/packages/0e/4a/c27b42ed9b1c7d13d9ba8b6905dece787d6259152f2309338aed29b2447b/ml_dtypes-0.5.4.tar.gz", hash = "sha256:8ab06a50fb9bf9666dd0fe5dfb4676fa2b0ac0f31ecff72a6c3af8e22c063453", size = 692314, upload-time = "2025-11-17T22:32:31.031Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/af/f1/720cb1409b5d0c05cff9040c0e9fba73fa4c67897d33babf905d5d46a070/ml_dtypes-0.5.3-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:4a177b882667c69422402df6ed5c3428ce07ac2c1f844d8a1314944651439458", size = 667412, upload-time = "2025-07-29T18:38:25.275Z" }, - { url = "https://files.pythonhosted.org/packages/6a/d5/05861ede5d299f6599f86e6bc1291714e2116d96df003cfe23cc54bcc568/ml_dtypes-0.5.3-cp311-cp311-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:9849ce7267444c0a717c80c6900997de4f36e2815ce34ac560a3edb2d9a64cd2", size = 4964606, upload-time = "2025-07-29T18:38:27.045Z" }, - { url = "https://files.pythonhosted.org/packages/db/dc/72992b68de367741bfab8df3b3fe7c29f982b7279d341aa5bf3e7ef737ea/ml_dtypes-0.5.3-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:c3f5ae0309d9f888fd825c2e9d0241102fadaca81d888f26f845bc8c13c1e4ee", size = 4938435, upload-time = "2025-07-29T18:38:29.193Z" }, - { url = "https://files.pythonhosted.org/packages/81/1c/d27a930bca31fb07d975a2d7eaf3404f9388114463b9f15032813c98f893/ml_dtypes-0.5.3-cp311-cp311-win_amd64.whl", hash = "sha256:58e39349d820b5702bb6f94ea0cb2dc8ec62ee81c0267d9622067d8333596a46", size = 206334, upload-time = "2025-07-29T18:38:30.687Z" }, - { url = "https://files.pythonhosted.org/packages/1a/d8/6922499effa616012cb8dc445280f66d100a7ff39b35c864cfca019b3f89/ml_dtypes-0.5.3-cp311-cp311-win_arm64.whl", hash = "sha256:66c2756ae6cfd7f5224e355c893cfd617fa2f747b8bbd8996152cbdebad9a184", size = 157584, upload-time = "2025-07-29T18:38:32.187Z" }, - { url = "https://files.pythonhosted.org/packages/0d/eb/bc07c88a6ab002b4635e44585d80fa0b350603f11a2097c9d1bfacc03357/ml_dtypes-0.5.3-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:156418abeeda48ea4797db6776db3c5bdab9ac7be197c1233771e0880c304057", size = 663864, upload-time = "2025-07-29T18:38:33.777Z" }, - { url = "https://files.pythonhosted.org/packages/cf/89/11af9b0f21b99e6386b6581ab40fb38d03225f9de5f55cf52097047e2826/ml_dtypes-0.5.3-cp312-cp312-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:1db60c154989af253f6c4a34e8a540c2c9dce4d770784d426945e09908fbb177", size = 4951313, upload-time = "2025-07-29T18:38:36.45Z" }, - { url = "https://files.pythonhosted.org/packages/d8/a9/b98b86426c24900b0c754aad006dce2863df7ce0bb2bcc2c02f9cc7e8489/ml_dtypes-0.5.3-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:1b255acada256d1fa8c35ed07b5f6d18bc21d1556f842fbc2d5718aea2cd9e55", size = 4928805, upload-time = "2025-07-29T18:38:38.29Z" }, - { url = "https://files.pythonhosted.org/packages/50/c1/85e6be4fc09c6175f36fb05a45917837f30af9a5146a5151cb3a3f0f9e09/ml_dtypes-0.5.3-cp312-cp312-win_amd64.whl", hash = "sha256:da65e5fd3eea434ccb8984c3624bc234ddcc0d9f4c81864af611aaebcc08a50e", size = 208182, upload-time = "2025-07-29T18:38:39.72Z" }, - { url = "https://files.pythonhosted.org/packages/9e/17/cf5326d6867be057f232d0610de1458f70a8ce7b6290e4b4a277ea62b4cd/ml_dtypes-0.5.3-cp312-cp312-win_arm64.whl", hash = "sha256:8bb9cd1ce63096567f5f42851f5843b5a0ea11511e50039a7649619abfb4ba6d", size = 161560, upload-time = "2025-07-29T18:38:41.072Z" }, - { url = "https://files.pythonhosted.org/packages/2d/87/1bcc98a66de7b2455dfb292f271452cac9edc4e870796e0d87033524d790/ml_dtypes-0.5.3-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:5103856a225465371fe119f2fef737402b705b810bd95ad5f348e6e1a6ae21af", size = 663781, upload-time = "2025-07-29T18:38:42.984Z" }, - { url = "https://files.pythonhosted.org/packages/fd/2c/bd2a79ba7c759ee192b5601b675b180a3fd6ccf48ffa27fe1782d280f1a7/ml_dtypes-0.5.3-cp313-cp313-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:4cae435a68861660af81fa3c5af16b70ca11a17275c5b662d9c6f58294e0f113", size = 4956217, upload-time = "2025-07-29T18:38:44.65Z" }, - { url = "https://files.pythonhosted.org/packages/14/f3/091ba84e5395d7fe5b30c081a44dec881cd84b408db1763ee50768b2ab63/ml_dtypes-0.5.3-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:6936283b56d74fbec431ca57ce58a90a908fdbd14d4e2d22eea6d72bb208a7b7", size = 4933109, upload-time = "2025-07-29T18:38:46.405Z" }, - { url = "https://files.pythonhosted.org/packages/bc/24/054036dbe32c43295382c90a1363241684c4d6aaa1ecc3df26bd0c8d5053/ml_dtypes-0.5.3-cp313-cp313-win_amd64.whl", hash = "sha256:d0f730a17cf4f343b2c7ad50cee3bd19e969e793d2be6ed911f43086460096e4", size = 208187, upload-time = "2025-07-29T18:38:48.24Z" }, - { url = "https://files.pythonhosted.org/packages/a6/3d/7dc3ec6794a4a9004c765e0c341e32355840b698f73fd2daff46f128afc1/ml_dtypes-0.5.3-cp313-cp313-win_arm64.whl", hash = "sha256:2db74788fc01914a3c7f7da0763427280adfc9cd377e9604b6b64eb8097284bd", size = 161559, upload-time = "2025-07-29T18:38:50.493Z" }, - { url = "https://files.pythonhosted.org/packages/12/91/e6c7a0d67a152b9330445f9f0cf8ae6eee9b83f990b8c57fe74631e42a90/ml_dtypes-0.5.3-cp313-cp313t-macosx_10_13_universal2.whl", hash = "sha256:93c36a08a6d158db44f2eb9ce3258e53f24a9a4a695325a689494f0fdbc71770", size = 689321, upload-time = "2025-07-29T18:38:52.03Z" }, - { url = "https://files.pythonhosted.org/packages/9e/6c/b7b94b84a104a5be1883305b87d4c6bd6ae781504474b4cca067cb2340ec/ml_dtypes-0.5.3-cp313-cp313t-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:0e44a3761f64bc009d71ddb6d6c71008ba21b53ab6ee588dadab65e2fa79eafc", size = 5274495, upload-time = "2025-07-29T18:38:53.797Z" }, - { url = "https://files.pythonhosted.org/packages/5b/38/6266604dffb43378055394ea110570cf261a49876fc48f548dfe876f34cc/ml_dtypes-0.5.3-cp313-cp313t-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:bdf40d2aaabd3913dec11840f0d0ebb1b93134f99af6a0a4fd88ffe924928ab4", size = 5285422, upload-time = "2025-07-29T18:38:56.603Z" }, - { url = "https://files.pythonhosted.org/packages/7c/88/8612ff177d043a474b9408f0382605d881eeb4125ba89d4d4b3286573a83/ml_dtypes-0.5.3-cp314-cp314-macosx_10_13_universal2.whl", hash = "sha256:aec640bd94c4c85c0d11e2733bd13cbb10438fb004852996ec0efbc6cacdaf70", size = 661182, upload-time = "2025-07-29T18:38:58.414Z" }, - { url = "https://files.pythonhosted.org/packages/6f/2b/0569a5e88b29240d373e835107c94ae9256fb2191d3156b43b2601859eff/ml_dtypes-0.5.3-cp314-cp314-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:bda32ce212baa724e03c68771e5c69f39e584ea426bfe1a701cb01508ffc7035", size = 4956187, upload-time = "2025-07-29T18:39:00.611Z" }, - { url = "https://files.pythonhosted.org/packages/51/66/273c2a06ae44562b104b61e6b14444da00061fd87652506579d7eb2c40b1/ml_dtypes-0.5.3-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:c205cac07d24a29840c163d6469f61069ce4b065518519216297fc2f261f8db9", size = 4930911, upload-time = "2025-07-29T18:39:02.405Z" }, - { url = "https://files.pythonhosted.org/packages/93/ab/606be3e87dc0821bd360c8c1ee46108025c31a4f96942b63907bb441b87d/ml_dtypes-0.5.3-cp314-cp314-win_amd64.whl", hash = "sha256:cd7c0bb22d4ff86d65ad61b5dd246812e8993fbc95b558553624c33e8b6903ea", size = 216664, upload-time = "2025-07-29T18:39:03.927Z" }, - { url = "https://files.pythonhosted.org/packages/30/a2/e900690ca47d01dffffd66375c5de8c4f8ced0f1ef809ccd3b25b3e6b8fa/ml_dtypes-0.5.3-cp314-cp314-win_arm64.whl", hash = "sha256:9d55ea7f7baf2aed61bf1872116cefc9d0c3693b45cae3916897ee27ef4b835e", size = 160203, upload-time = "2025-07-29T18:39:05.671Z" }, - { url = "https://files.pythonhosted.org/packages/53/21/783dfb51f40d2660afeb9bccf3612b99f6a803d980d2a09132b0f9d216ab/ml_dtypes-0.5.3-cp314-cp314t-macosx_10_13_universal2.whl", hash = "sha256:e12e29764a0e66a7a31e9b8bf1de5cc0423ea72979f45909acd4292de834ccd3", size = 689324, upload-time = "2025-07-29T18:39:07.567Z" }, - { url = "https://files.pythonhosted.org/packages/09/f7/a82d249c711abf411ac027b7163f285487f5e615c3e0716c61033ce996ab/ml_dtypes-0.5.3-cp314-cp314t-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:19f6c3a4f635c2fc9e2aa7d91416bd7a3d649b48350c51f7f715a09370a90d93", size = 5275917, upload-time = "2025-07-29T18:39:09.339Z" }, - { url = "https://files.pythonhosted.org/packages/7f/3c/541c4b30815ab90ebfbb51df15d0b4254f2f9f1e2b4907ab229300d5e6f2/ml_dtypes-0.5.3-cp314-cp314t-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:5ab039ffb40f3dc0aeeeba84fd6c3452781b5e15bef72e2d10bcb33e4bbffc39", size = 5285284, upload-time = "2025-07-29T18:39:11.532Z" }, + { url = "https://files.pythonhosted.org/packages/c6/5e/712092cfe7e5eb667b8ad9ca7c54442f21ed7ca8979745f1000e24cf8737/ml_dtypes-0.5.4-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:6c7ecb74c4bd71db68a6bea1edf8da8c34f3d9fe218f038814fd1d310ac76c90", size = 679734, upload-time = "2025-11-17T22:31:39.223Z" }, + { url = "https://files.pythonhosted.org/packages/4f/cf/912146dfd4b5c0eea956836c01dcd2fce6c9c844b2691f5152aca196ce4f/ml_dtypes-0.5.4-cp311-cp311-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:bc11d7e8c44a65115d05e2ab9989d1e045125d7be8e05a071a48bc76eb6d6040", size = 5056165, upload-time = "2025-11-17T22:31:41.071Z" }, + { url = "https://files.pythonhosted.org/packages/a9/80/19189ea605017473660e43762dc853d2797984b3c7bf30ce656099add30c/ml_dtypes-0.5.4-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:19b9a53598f21e453ea2fbda8aa783c20faff8e1eeb0d7ab899309a0053f1483", size = 5034975, upload-time = "2025-11-17T22:31:42.758Z" }, + { url = "https://files.pythonhosted.org/packages/b4/24/70bd59276883fdd91600ca20040b41efd4902a923283c4d6edcb1de128d2/ml_dtypes-0.5.4-cp311-cp311-win_amd64.whl", hash = "sha256:7c23c54a00ae43edf48d44066a7ec31e05fdc2eee0be2b8b50dd1903a1db94bb", size = 210742, upload-time = "2025-11-17T22:31:44.068Z" }, + { url = "https://files.pythonhosted.org/packages/a0/c9/64230ef14e40aa3f1cb254ef623bf812735e6bec7772848d19131111ac0d/ml_dtypes-0.5.4-cp311-cp311-win_arm64.whl", hash = "sha256:557a31a390b7e9439056644cb80ed0735a6e3e3bb09d67fd5687e4b04238d1de", size = 160709, upload-time = "2025-11-17T22:31:46.557Z" }, + { url = "https://files.pythonhosted.org/packages/a8/b8/3c70881695e056f8a32f8b941126cf78775d9a4d7feba8abcb52cb7b04f2/ml_dtypes-0.5.4-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:a174837a64f5b16cab6f368171a1a03a27936b31699d167684073ff1c4237dac", size = 676927, upload-time = "2025-11-17T22:31:48.182Z" }, + { url = "https://files.pythonhosted.org/packages/54/0f/428ef6881782e5ebb7eca459689448c0394fa0a80bea3aa9262cba5445ea/ml_dtypes-0.5.4-cp312-cp312-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:a7f7c643e8b1320fd958bf098aa7ecf70623a42ec5154e3be3be673f4c34d900", size = 5028464, upload-time = "2025-11-17T22:31:50.135Z" }, + { url = "https://files.pythonhosted.org/packages/3a/cb/28ce52eb94390dda42599c98ea0204d74799e4d8047a0eb559b6fd648056/ml_dtypes-0.5.4-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:9ad459e99793fa6e13bd5b7e6792c8f9190b4e5a1b45c63aba14a4d0a7f1d5ff", size = 5009002, upload-time = "2025-11-17T22:31:52.001Z" }, + { url = "https://files.pythonhosted.org/packages/f5/f0/0cfadd537c5470378b1b32bd859cf2824972174b51b873c9d95cfd7475a5/ml_dtypes-0.5.4-cp312-cp312-win_amd64.whl", hash = "sha256:c1a953995cccb9e25a4ae19e34316671e4e2edaebe4cf538229b1fc7109087b7", size = 212222, upload-time = "2025-11-17T22:31:53.742Z" }, + { url = "https://files.pythonhosted.org/packages/16/2e/9acc86985bfad8f2c2d30291b27cd2bb4c74cea08695bd540906ed744249/ml_dtypes-0.5.4-cp312-cp312-win_arm64.whl", hash = "sha256:9bad06436568442575beb2d03389aa7456c690a5b05892c471215bfd8cf39460", size = 160793, upload-time = "2025-11-17T22:31:55.358Z" }, + { url = "https://files.pythonhosted.org/packages/d9/a1/4008f14bbc616cfb1ac5b39ea485f9c63031c4634ab3f4cf72e7541f816a/ml_dtypes-0.5.4-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:8c760d85a2f82e2bed75867079188c9d18dae2ee77c25a54d60e9cc79be1bc48", size = 676888, upload-time = "2025-11-17T22:31:56.907Z" }, + { url = "https://files.pythonhosted.org/packages/d3/b7/dff378afc2b0d5a7d6cd9d3209b60474d9819d1189d347521e1688a60a53/ml_dtypes-0.5.4-cp313-cp313-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:ce756d3a10d0c4067172804c9cc276ba9cc0ff47af9078ad439b075d1abdc29b", size = 5036993, upload-time = "2025-11-17T22:31:58.497Z" }, + { url = "https://files.pythonhosted.org/packages/eb/33/40cd74219417e78b97c47802037cf2d87b91973e18bb968a7da48a96ea44/ml_dtypes-0.5.4-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:533ce891ba774eabf607172254f2e7260ba5f57bdd64030c9a4fcfbd99815d0d", size = 5010956, upload-time = "2025-11-17T22:31:59.931Z" }, + { url = "https://files.pythonhosted.org/packages/e1/8b/200088c6859d8221454825959df35b5244fa9bdf263fd0249ac5fb75e281/ml_dtypes-0.5.4-cp313-cp313-win_amd64.whl", hash = "sha256:f21c9219ef48ca5ee78402d5cc831bd58ea27ce89beda894428bc67a52da5328", size = 212224, upload-time = "2025-11-17T22:32:01.349Z" }, + { url = "https://files.pythonhosted.org/packages/8f/75/dfc3775cb36367816e678f69a7843f6f03bd4e2bcd79941e01ea960a068e/ml_dtypes-0.5.4-cp313-cp313-win_arm64.whl", hash = "sha256:35f29491a3e478407f7047b8a4834e4640a77d2737e0b294d049746507af5175", size = 160798, upload-time = "2025-11-17T22:32:02.864Z" }, + { url = "https://files.pythonhosted.org/packages/4f/74/e9ddb35fd1dd43b1106c20ced3f53c2e8e7fc7598c15638e9f80677f81d4/ml_dtypes-0.5.4-cp313-cp313t-macosx_10_13_universal2.whl", hash = "sha256:304ad47faa395415b9ccbcc06a0350800bc50eda70f0e45326796e27c62f18b6", size = 702083, upload-time = "2025-11-17T22:32:04.08Z" }, + { url = "https://files.pythonhosted.org/packages/74/f5/667060b0aed1aa63166b22897fdf16dca9eb704e6b4bbf86848d5a181aa7/ml_dtypes-0.5.4-cp313-cp313t-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:6a0df4223b514d799b8a1629c65ddc351b3efa833ccf7f8ea0cf654a61d1e35d", size = 5354111, upload-time = "2025-11-17T22:32:05.546Z" }, + { url = "https://files.pythonhosted.org/packages/40/49/0f8c498a28c0efa5f5c95a9e374c83ec1385ca41d0e85e7cf40e5d519a21/ml_dtypes-0.5.4-cp313-cp313t-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:531eff30e4d368cb6255bc2328d070e35836aa4f282a0fb5f3a0cd7260257298", size = 5366453, upload-time = "2025-11-17T22:32:07.115Z" }, + { url = "https://files.pythonhosted.org/packages/8c/27/12607423d0a9c6bbbcc780ad19f1f6baa2b68b18ce4bddcdc122c4c68dc9/ml_dtypes-0.5.4-cp313-cp313t-win_amd64.whl", hash = "sha256:cb73dccfc991691c444acc8c0012bee8f2470da826a92e3a20bb333b1a7894e6", size = 225612, upload-time = "2025-11-17T22:32:08.615Z" }, + { url = "https://files.pythonhosted.org/packages/e5/80/5a5929e92c72936d5b19872c5fb8fc09327c1da67b3b68c6a13139e77e20/ml_dtypes-0.5.4-cp313-cp313t-win_arm64.whl", hash = "sha256:3bbbe120b915090d9dd1375e4684dd17a20a2491ef25d640a908281da85e73f1", size = 164145, upload-time = "2025-11-17T22:32:09.782Z" }, + { url = "https://files.pythonhosted.org/packages/72/4e/1339dc6e2557a344f5ba5590872e80346f76f6cb2ac3dd16e4666e88818c/ml_dtypes-0.5.4-cp314-cp314-macosx_10_13_universal2.whl", hash = "sha256:2b857d3af6ac0d39db1de7c706e69c7f9791627209c3d6dedbfca8c7e5faec22", size = 673781, upload-time = "2025-11-17T22:32:11.364Z" }, + { url = "https://files.pythonhosted.org/packages/04/f9/067b84365c7e83bda15bba2b06c6ca250ce27b20630b1128c435fb7a09aa/ml_dtypes-0.5.4-cp314-cp314-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:805cef3a38f4eafae3a5bf9ebdcdb741d0bcfd9e1bd90eb54abd24f928cd2465", size = 5036145, upload-time = "2025-11-17T22:32:12.783Z" }, + { url = "https://files.pythonhosted.org/packages/c6/bb/82c7dcf38070b46172a517e2334e665c5bf374a262f99a283ea454bece7c/ml_dtypes-0.5.4-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:14a4fd3228af936461db66faccef6e4f41c1d82fcc30e9f8d58a08916b1d811f", size = 5010230, upload-time = "2025-11-17T22:32:14.38Z" }, + { url = "https://files.pythonhosted.org/packages/e9/93/2bfed22d2498c468f6bcd0d9f56b033eaa19f33320389314c19ef6766413/ml_dtypes-0.5.4-cp314-cp314-win_amd64.whl", hash = "sha256:8c6a2dcebd6f3903e05d51960a8058d6e131fe69f952a5397e5dbabc841b6d56", size = 221032, upload-time = "2025-11-17T22:32:15.763Z" }, + { url = "https://files.pythonhosted.org/packages/76/a3/9c912fe6ea747bb10fe2f8f54d027eb265db05dfb0c6335e3e063e74e6e8/ml_dtypes-0.5.4-cp314-cp314-win_arm64.whl", hash = "sha256:5a0f68ca8fd8d16583dfa7793973feb86f2fbb56ce3966daf9c9f748f52a2049", size = 163353, upload-time = "2025-11-17T22:32:16.932Z" }, + { url = "https://files.pythonhosted.org/packages/cd/02/48aa7d84cc30ab4ee37624a2fd98c56c02326785750cd212bc0826c2f15b/ml_dtypes-0.5.4-cp314-cp314t-macosx_10_13_universal2.whl", hash = "sha256:bfc534409c5d4b0bf945af29e5d0ab075eae9eecbb549ff8a29280db822f34f9", size = 702085, upload-time = "2025-11-17T22:32:18.175Z" }, + { url = "https://files.pythonhosted.org/packages/5a/e7/85cb99fe80a7a5513253ec7faa88a65306be071163485e9a626fce1b6e84/ml_dtypes-0.5.4-cp314-cp314t-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:2314892cdc3fcf05e373d76d72aaa15fda9fb98625effa73c1d646f331fcecb7", size = 5355358, upload-time = "2025-11-17T22:32:19.7Z" }, + { url = "https://files.pythonhosted.org/packages/79/2b/a826ba18d2179a56e144aef69e57fb2ab7c464ef0b2111940ee8a3a223a2/ml_dtypes-0.5.4-cp314-cp314t-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:0d2ffd05a2575b1519dc928c0b93c06339eb67173ff53acb00724502cda231cf", size = 5366332, upload-time = "2025-11-17T22:32:21.193Z" }, + { url = "https://files.pythonhosted.org/packages/84/44/f4d18446eacb20ea11e82f133ea8f86e2bf2891785b67d9da8d0ab0ef525/ml_dtypes-0.5.4-cp314-cp314t-win_amd64.whl", hash = "sha256:4381fe2f2452a2d7589689693d3162e876b3ddb0a832cde7a414f8e1adf7eab1", size = 236612, upload-time = "2025-11-17T22:32:22.579Z" }, + { url = "https://files.pythonhosted.org/packages/ad/3f/3d42e9a78fe5edf792a83c074b13b9b770092a4fbf3462872f4303135f09/ml_dtypes-0.5.4-cp314-cp314t-win_arm64.whl", hash = "sha256:11942cbf2cf92157db91e5022633c0d9474d4dfd813a909383bd23ce828a4b7d", size = 168825, upload-time = "2025-11-17T22:32:23.766Z" }, ] [[package]] @@ -1606,15 +1265,6 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/2a/e2/5d3f6ada4297caebe1a2add3b126fe800c96f56dbe5d1988a2cbe0b267aa/mypy_extensions-1.0.0-py3-none-any.whl", hash = "sha256:4392f6c0eb8a5668a69e23d168ffa70f0be9ccfd32b5cc2d26a34ae5b844552d", size = 4695, upload-time = "2023-02-04T12:11:25.002Z" }, ] -[[package]] -name = "networkx" -version = "3.2.1" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/c4/80/a84676339aaae2f1cfdf9f418701dd634aef9cc76f708ef55c36ff39c3ca/networkx-3.2.1.tar.gz", hash = "sha256:9f1bb5cf3409bf324e0a722c20bdb4c20ee39bf1c30ce8ae499c8502b0b5e0c6", size = 2073928, upload-time = "2023-10-28T08:41:39.364Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/d5/f0/8fbc882ca80cf077f1b246c0e3c3465f7f415439bdea6b899f6b19f61f70/networkx-3.2.1-py3-none-any.whl", hash = "sha256:f18c69adc97877c42332c170849c96cefa91881c99a7cb3e95b7c659ebdc1ec2", size = 1647772, upload-time = "2023-10-28T08:41:36.945Z" }, -] - [[package]] name = "numpy" version = "2.4.6" @@ -1709,7 +1359,7 @@ wheels = [ [[package]] name = "onnx" -version = "1.19.1" +version = "1.22.0" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "ml-dtypes" }, @@ -1717,31 +1367,26 @@ dependencies = [ { name = "protobuf" }, { name = "typing-extensions" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/27/2f/c619eb65769357e9b6de9212c9a821ab39cd484448e5d6b3fb5fb0a64c6d/onnx-1.19.1.tar.gz", hash = "sha256:737524d6eb3907d3499ea459c6f01c5a96278bb3a0f2ff8ae04786fb5d7f1ed5", size = 12033525, upload-time = "2025-10-10T04:01:34.342Z" } +sdist = { url = "https://files.pythonhosted.org/packages/04/19/8ea73a64b368b75fe339771a20a02bc61ea1f551484c9e3d9d0bfbd0450f/onnx-1.22.0.tar.gz", hash = "sha256:ef40c0aaf0b643857ea9306fc7eddce17eaf9fb0407e4801f1fc5758443a38e0", size = 12024721, upload-time = "2026-06-15T12:50:05.354Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/36/07/0019c72924909e4f64b9199770630ab7b8d7914b912b03230e68f5eda7ae/onnx-1.19.1-cp311-cp311-macosx_12_0_universal2.whl", hash = "sha256:17aaf5832126de0a5197a5864e4f09a764dd7681d3035135547959b4b6b77a09", size = 18320936, upload-time = "2025-10-10T04:00:04.235Z" }, - { url = "https://files.pythonhosted.org/packages/af/2f/5c47acf740dc35f0decc640844260fbbdc0efa0565657c93fd7ff30f13f3/onnx-1.19.1-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:01b292a4d0b197c45d8184545bbc8ae1df83466341b604187c1b05902cb9c920", size = 18044269, upload-time = "2025-10-10T04:00:07.449Z" }, - { url = "https://files.pythonhosted.org/packages/d5/61/6c457ee8c3a62a3cad0a4bfa4c5436bb3ac4df90c3551d40bee1224b5b51/onnx-1.19.1-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:1839af08ab4a909e4af936b8149c27f8c64b96138981024e251906e0539d8bf9", size = 18218092, upload-time = "2025-10-10T04:00:11.135Z" }, - { url = "https://files.pythonhosted.org/packages/54/d5/ab832e1369505e67926a70e9a102061f89ad01f91aa296c4b1277cb81b25/onnx-1.19.1-cp311-cp311-win32.whl", hash = "sha256:0bdbb676e3722bd32f9227c465d552689f49086f986a696419d865cb4e70b989", size = 16344809, upload-time = "2025-10-10T04:00:14.634Z" }, - { url = "https://files.pythonhosted.org/packages/8b/b5/6eb4611d24b85002f878ba8476b4cecbe6f9784c0236a3c5eff85236cc0a/onnx-1.19.1-cp311-cp311-win_amd64.whl", hash = "sha256:1346853df5c1e3ebedb2e794cf2a51e0f33759affd655524864ccbcddad7035b", size = 16464319, upload-time = "2025-10-10T04:00:18.235Z" }, - { url = "https://files.pythonhosted.org/packages/0c/ff/f0e1f06420c70e20d497fec7c94a864d069943b6312bedd4224c0ab946f8/onnx-1.19.1-cp311-cp311-win_arm64.whl", hash = "sha256:2d69c280c0e665b7f923f499243b9bb84fe97970b7a4668afa0032045de602c8", size = 16437503, upload-time = "2025-10-10T04:00:21.247Z" }, - { url = "https://files.pythonhosted.org/packages/50/07/f6c5b2cffef8c29e739616d1415aea22f7b7ef1f19c17f02b7cff71f5498/onnx-1.19.1-cp312-cp312-macosx_12_0_universal2.whl", hash = "sha256:3612193a89ddbce5c4e86150869b9258780a82fb8c4ca197723a4460178a6ce9", size = 18327840, upload-time = "2025-10-10T04:00:24.259Z" }, - { url = "https://files.pythonhosted.org/packages/93/20/0568ebd52730287ae80cac8ac893a7301c793ea1630984e2519ee92b02a9/onnx-1.19.1-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:6c2fd2f744e7a3880ad0c262efa2edf6d965d0bd02b8f327ec516ad4cb0f2f15", size = 18042539, upload-time = "2025-10-10T04:00:27.693Z" }, - { url = "https://files.pythonhosted.org/packages/14/fd/cd7a0fd10a04f8cc5ae436b63e0022e236fe51b9dbb8ee6317fd48568c72/onnx-1.19.1-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:485d3674d50d789e0ee72fa6f6e174ab81cb14c772d594f992141bd744729d8a", size = 18218271, upload-time = "2025-10-10T04:00:30.495Z" }, - { url = "https://files.pythonhosted.org/packages/65/68/cc8b8c05469fe08384b446304ad7e6256131ca0463bf6962366eebec98c0/onnx-1.19.1-cp312-cp312-win32.whl", hash = "sha256:638bc56ff1a5718f7441e887aeb4e450f37a81c6eac482040381b140bd9ba601", size = 16345111, upload-time = "2025-10-10T04:00:34.982Z" }, - { url = "https://files.pythonhosted.org/packages/c7/5e/d1cb16693598a512c2cf9ffe0841d8d8fd2c83ae8e889efd554f5aa427cf/onnx-1.19.1-cp312-cp312-win_amd64.whl", hash = "sha256:bc7e2e4e163e679721e547958b5a7db875bf822cad371b7c1304aa4401a7c7a4", size = 16465621, upload-time = "2025-10-10T04:00:39.107Z" }, - { url = "https://files.pythonhosted.org/packages/90/32/da116cc61fdef334782aa7f87a1738431dd1af1a5d1a44bd95d6d51ad260/onnx-1.19.1-cp312-cp312-win_arm64.whl", hash = "sha256:17c215b1c0f20fe93b4cbe62668247c1d2294b9bc7f6be0ca9ced28e980c07b7", size = 16437505, upload-time = "2025-10-10T04:00:42.255Z" }, - { url = "https://files.pythonhosted.org/packages/b4/b8/ab1fdfe2e8502f4dc4289fc893db35816bd20d080d8370f86e74dda5f598/onnx-1.19.1-cp313-cp313-macosx_12_0_universal2.whl", hash = "sha256:4e5f938c68c4dffd3e19e4fd76eb98d298174eb5ebc09319cdd0ec5fe50050dc", size = 18327815, upload-time = "2025-10-10T04:00:45.682Z" }, - { url = "https://files.pythonhosted.org/packages/04/40/eb875745a4b92aea10e5e32aa2830f409c4d7b6f7b48ca1c4eaad96636c5/onnx-1.19.1-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:86e20a5984b017feeef2dbf4ceff1c7c161ab9423254968dd77d3696c38691d0", size = 18041464, upload-time = "2025-10-10T04:00:48.557Z" }, - { url = "https://files.pythonhosted.org/packages/cf/8e/8586135f40dbe4989cec4d413164bc8fc5c73d37c566f33f5ea3a7f2b6f6/onnx-1.19.1-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:c8d9c467f0f29993c12f330736af87972f30adb8329b515f39d63a0db929cb2c", size = 18218244, upload-time = "2025-10-10T04:00:51.891Z" }, - { url = "https://files.pythonhosted.org/packages/51/b5/4201254b8683129db5da3fb55aa1f7e56d0a8d45c66ce875dec21ca1ff25/onnx-1.19.1-cp313-cp313-win32.whl", hash = "sha256:65eee353a51b4e4ca3e797784661e5376e2b209f17557e04921eac9166a8752e", size = 16345330, upload-time = "2025-10-10T04:00:54.858Z" }, - { url = "https://files.pythonhosted.org/packages/69/67/c6d239afbcdbeb6805432969b908b5c9f700c96d332b34e3f99518d76caf/onnx-1.19.1-cp313-cp313-win_amd64.whl", hash = "sha256:c3bc87e38b53554b1fc9ef7b275c81c6f5c93c90a91935bb0aa8d4d498a6d48e", size = 16465567, upload-time = "2025-10-10T04:00:57.893Z" }, - { url = "https://files.pythonhosted.org/packages/99/fe/89f1e40f5bc54595ff0dcf5391ce19e578b528973ccc74dd99800196d30d/onnx-1.19.1-cp313-cp313-win_arm64.whl", hash = "sha256:e41496f400afb980ec643d80d5164753a88a85234fa5c06afdeebc8b7d1ec252", size = 16437562, upload-time = "2025-10-10T04:01:00.703Z" }, - { url = "https://files.pythonhosted.org/packages/86/43/b186ccbc8fe7e93643a6a6d40bbf2bb6ce4fb9469bbd3453c77e270c50ad/onnx-1.19.1-cp313-cp313t-macosx_12_0_universal2.whl", hash = "sha256:5f6274abf0fd74e80e78ecbb44bd44509409634525c89a9b38276c8af47dc0a2", size = 18355703, upload-time = "2025-10-10T04:01:03.735Z" }, - { url = "https://files.pythonhosted.org/packages/60/f1/22ee4d8b8f9fa4cb1d1b9579da3b4b5187ddab33846ec5ac744af02c0e2b/onnx-1.19.1-cp313-cp313t-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:07dcd4d83584eb4bf8f21ac04c82643712e5e93ac2a0ed10121ec123cb127e1e", size = 18047830, upload-time = "2025-10-10T04:01:06.552Z" }, - { url = "https://files.pythonhosted.org/packages/8e/a4/8f3d51e3a095d42cdf2039a590cff06d024f2a10efbd0b1a2a6b3825f019/onnx-1.19.1-cp313-cp313t-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:1975860c3e720db25d37f1619976582828264bdcc64fa7511c321ac4fc01add3", size = 18221126, upload-time = "2025-10-10T04:01:09.77Z" }, - { url = "https://files.pythonhosted.org/packages/4f/0d/f9d6c2237083f1aac14b37f0b03b0d81f1147a8e2af0c3828165e0a6a67b/onnx-1.19.1-cp313-cp313t-win_amd64.whl", hash = "sha256:9807d0e181f6070ee3a6276166acdc571575d1bd522fc7e89dba16fd6e7ffed9", size = 16465560, upload-time = "2025-10-10T04:01:13.212Z" }, - { url = "https://files.pythonhosted.org/packages/36/70/8418a58faa7d606d6a92cab69ae8d361b3b3969bf7e7e9a65a86d5d1b674/onnx-1.19.1-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:b6ee83e6929d75005482d9f304c502ac7c9b8d6db153aa6b484dae74d0f28570", size = 18042812, upload-time = "2025-10-10T04:01:15.919Z" }, + { url = "https://files.pythonhosted.org/packages/0c/55/30825c02c92a0380ce84c3feeeec95d329fa77548ba58cb10ad4bbfd83c6/onnx-1.22.0-cp311-cp311-macosx_12_0_universal2.whl", hash = "sha256:2d8f229a553fa440fe623ed7b36fca5e7762da3af871c3f8f8ce451df73e2914", size = 20167891, upload-time = "2026-06-15T12:49:14.212Z" }, + { url = "https://files.pythonhosted.org/packages/4b/24/cd4ab52ecaf41c3fbed674772ccbfe39041cb257b8471a47a37e48bff3f8/onnx-1.22.0-cp311-cp311-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:a1a89a7cb9ba13d78f009bdec448ec82a98972589734f157022a2bff7a5973a6", size = 18892720, upload-time = "2026-06-15T12:49:16.904Z" }, + { url = "https://files.pythonhosted.org/packages/2b/a0/c9d9d56ceadb1c0a90a7cbec5a0510520ab6538938944fa84548e4b5b054/onnx-1.22.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:1d0a2bdb15eb2b3cb65c438f3423d9620d14fdce32f92380e6bb1b2e09568ef5", size = 19110720, upload-time = "2026-06-15T12:49:19.812Z" }, + { url = "https://files.pythonhosted.org/packages/0a/6e/e43e5a68d9cadde55df75310027f87127333a77e5ddcea14c73e96a10cac/onnx-1.22.0-cp311-cp311-win32.whl", hash = "sha256:239958534464612fbcb6ed23d5228aaa925b39b8773f58726809ffdccb4edd1c", size = 17083746, upload-time = "2026-06-15T12:49:22.935Z" }, + { url = "https://files.pythonhosted.org/packages/54/57/cc0a9f2cf4522e42829d089927b4b75924d32f50dca237482e7b741df003/onnx-1.22.0-cp311-cp311-win_amd64.whl", hash = "sha256:8561a2c00041c07e08db0c228593b5b4694100398685f348532af7dbb84189da", size = 17215684, upload-time = "2026-06-15T12:49:26.084Z" }, + { url = "https://files.pythonhosted.org/packages/c9/99/0f049f9eaa06c8383060c5f0a338e3a6caac8822e6e326c9162f05abf95a/onnx-1.22.0-cp311-cp311-win_arm64.whl", hash = "sha256:8907b9b9389893bc0dc6314cc00ee1e3a69844e48d689eacc6a0340411a7da58", size = 17210398, upload-time = "2026-06-15T12:49:29.091Z" }, + { url = "https://files.pythonhosted.org/packages/ee/6a/481561f1093834376ed493e4ca42a73e5be0d50031f2969c86593bdc7c96/onnx-1.22.0-cp312-abi3-macosx_12_0_universal2.whl", hash = "sha256:596fbf0490947533c1c1045ba860851dc9fb77471023dac9a71ba5b42ceab103", size = 20167081, upload-time = "2026-06-15T12:49:32.078Z" }, + { url = "https://files.pythonhosted.org/packages/84/55/b34fc2aa30aa54b4a775402d24c4082242c720283a274fe976ac8eb94480/onnx-1.22.0-cp312-abi3-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:ae5a563f281cd9d2845622cecf6c092a57e4ee1b138f66fdbbdd4200567a5e16", size = 18889249, upload-time = "2026-06-15T12:49:34.7Z" }, + { url = "https://files.pythonhosted.org/packages/09/a6/bd32357e6cc1ecb473afd78193d7231724f284435d2db25696ecfaaa1503/onnx-1.22.0-cp312-abi3-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:955e02e1f6d385b53d52f9cd7b9cdf5caf417c300bcfe3c64c6d542be763845b", size = 19106514, upload-time = "2026-06-15T12:49:37.424Z" }, + { url = "https://files.pythonhosted.org/packages/5a/9d/3af461ac6c714b8b369cb71499659932f4f12cfb066250b62f7567c3d530/onnx-1.22.0-cp312-abi3-pyemscripten_2025_0_wasm32.whl", hash = "sha256:82e9f27fc1223cb06d68a56bed6f9d3caf3d0dad1b61bce45006d529b15bd94c", size = 16966387, upload-time = "2026-06-15T12:49:40.918Z" }, + { url = "https://files.pythonhosted.org/packages/d0/f0/68195b5e5a53e333faf2660f5352ee43738d0e42fc5216cc6b1871a9fbfb/onnx-1.22.0-cp312-abi3-win32.whl", hash = "sha256:cc8b66b312f8f03a53e268afb67180a2d97dd12cc79e2b61361c6c0073448016", size = 17081568, upload-time = "2026-06-15T12:49:43.398Z" }, + { url = "https://files.pythonhosted.org/packages/13/a8/734725bb703c5fabb687f79c79e51249475212b3eb37771ac4a4ac9b487f/onnx-1.22.0-cp312-abi3-win_amd64.whl", hash = "sha256:72ccebab3bac07215c204ce8848d42e78eaaa666badbf72d25cd359b9f269e3a", size = 17213290, upload-time = "2026-06-15T12:49:45.933Z" }, + { url = "https://files.pythonhosted.org/packages/bd/2a/8ce48d8ae26a8761ad4e5dc771961b155c5c3c7c8540ec7f2f2d71b69af0/onnx-1.22.0-cp312-abi3-win_arm64.whl", hash = "sha256:f3c120dcdb70ad738f3c061b32798f408ea299eb69f84dd69ab4a6bf3c2ec01f", size = 17207030, upload-time = "2026-06-15T12:49:48.635Z" }, + { url = "https://files.pythonhosted.org/packages/f3/13/47323b97846387848efb1044ded11bb94b83526f3d1fbdb37c6480d4520f/onnx-1.22.0-cp314-cp314t-macosx_12_0_universal2.whl", hash = "sha256:19e45e4af88e3fe3261458d4b8cc461957ae2782a358a3560503569bf3b23b72", size = 20176465, upload-time = "2026-06-15T12:49:51.311Z" }, + { url = "https://files.pythonhosted.org/packages/13/0c/d3b8a7e7eee123938586c608bb9894b5723f2342b9450c0eec59fbec7099/onnx-1.22.0-cp314-cp314t-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:c21a0e59fd967a95b358e4a6e756d1f1eec2d304a83480f329f66e30d2bf0223", size = 18894028, upload-time = "2026-06-15T12:49:54.451Z" }, + { url = "https://files.pythonhosted.org/packages/b8/8a/da2a97ab46fe6e0cd9beb3ac14603a22f5be492f9ca347faf8233a07bb33/onnx-1.22.0-cp314-cp314t-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:2632406b8f523ef2e2873c363f90b20a3d88c0fbcfac757d3addffccf8f452c2", size = 19110420, upload-time = "2026-06-15T12:49:57.665Z" }, + { url = "https://files.pythonhosted.org/packages/b9/a3/ce984063017518307ebfaa545782fc400e593dc2d7fdf4f23ce4be1ed197/onnx-1.22.0-cp314-cp314t-win_amd64.whl", hash = "sha256:a3a39fc4643867aecb33417fdddb11e308ee79d2d4a584b9d50cc7aec2091b13", size = 17237547, upload-time = "2026-06-15T12:50:00.382Z" }, + { url = "https://files.pythonhosted.org/packages/00/50/257a880384a1dd502d543b0067945074d63cd17d0840e958355bc8197da8/onnx-1.22.0-cp314-cp314t-win_arm64.whl", hash = "sha256:8e268cdc0547e3949799ffd4a44451dc2b9080b57d0824a2db680b6ec65506f0", size = 17231391, upload-time = "2026-06-15T12:50:03.047Z" }, ] [[package]] @@ -2058,18 +1703,6 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/88/5f/e351af9a41f866ac3f1fac4ca0613908d9a41741cfcf2228f4ad853b697d/pluggy-1.5.0-py3-none-any.whl", hash = "sha256:44e1ad92c8ca002de6377e165f3e0f1be63266ab4d554740532335b9d75ea669", size = 20556, upload-time = "2024-04-20T21:34:40.434Z" }, ] -[[package]] -name = "prettytable" -version = "3.9.0" -source = { registry = "https://pypi.org/simple" } -dependencies = [ - { name = "wcwidth" }, -] -sdist = { url = "https://files.pythonhosted.org/packages/e1/c0/5e9c4d2a643a00a6f67578ef35485173de273a4567279e4f0c200c01386b/prettytable-3.9.0.tar.gz", hash = "sha256:f4ed94803c23073a90620b201965e5dc0bccf1760b7a7eaf3158cab8aaffdf34", size = 47874, upload-time = "2023-09-11T14:04:14.548Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/4d/81/316b6a55a0d1f327d04cc7b0ba9d04058cb62de6c3a4d4b0df280cbe3b0b/prettytable-3.9.0-py3-none-any.whl", hash = "sha256:a71292ab7769a5de274b146b276ce938786f56c31cf7cea88b6f3775d82fe8c8", size = 27772, upload-time = "2023-09-11T14:03:45.582Z" }, -] - [[package]] name = "protobuf" version = "6.33.2" @@ -2274,15 +1907,6 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/97/9c/372fef8377a6e340b1704768d20daaded98bf13282b5327beb2e2fe2c7ef/pygments-2.17.2-py3-none-any.whl", hash = "sha256:b27c2826c47d0f3219f29554824c30c5e8945175d888647acd804ddd04af846c", size = 1179756, upload-time = "2023-11-21T20:43:49.423Z" }, ] -[[package]] -name = "pyparsing" -version = "3.1.1" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/37/fe/65c989f70bd630b589adfbbcd6ed238af22319e90f059946c26b4835e44b/pyparsing-3.1.1.tar.gz", hash = "sha256:ede28a1a32462f5a9705e07aea48001a08f7cf81a021585011deba701581a0db", size = 884814, upload-time = "2023-07-30T15:07:02.617Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/39/92/8486ede85fcc088f1b3dba4ce92dd29d126fd96b0008ea213167940a2475/pyparsing-3.1.1-py3-none-any.whl", hash = "sha256:32c7c0b711493c72ff18a981d24f28aaf9c1fb7ed5e9667c9e84e3db623bdbfb", size = 103139, upload-time = "2023-07-30T15:06:59.829Z" }, -] - [[package]] name = "pytest" version = "9.0.3" @@ -2338,18 +1962,6 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/5a/cc/06253936f4a7fa2e0f48dfe6d851d9c56df896a9ab09ac019d70b760619c/pytest_mock-3.15.1-py3-none-any.whl", hash = "sha256:0a25e2eb88fe5168d535041d09a4529a188176ae608a6d249ee65abc0949630d", size = 10095, upload-time = "2025-09-16T16:37:25.734Z" }, ] -[[package]] -name = "python-dateutil" -version = "2.8.2" -source = { registry = "https://pypi.org/simple" } -dependencies = [ - { name = "six" }, -] -sdist = { url = "https://files.pythonhosted.org/packages/4c/c4/13b4776ea2d76c115c1d1b84579f3764ee6d57204f6be27119f13a61d0a9/python-dateutil-2.8.2.tar.gz", hash = "sha256:0123cacc1627ae19ddf3c27a5de5bd67ee4586fbdd6440d9748f8abb483d3e86", size = 357324, upload-time = "2021-07-14T08:19:19.783Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/36/7a/87837f39d0296e723bb9b62bbb257d0355c7f6128853c78955f57342a56d/python_dateutil-2.8.2-py2.py3-none-any.whl", hash = "sha256:961d03dc3453ebbc59dbdea9e4e11c5651520a876d0f4db161e8674aae935da9", size = 247702, upload-time = "2021-07-14T08:19:18.161Z" }, -] - [[package]] name = "python-dotenv" version = "1.0.0" @@ -2511,21 +2123,6 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/01/1b/5dbe84eefc86f48473947e2f41711aded97eecef1231f4558f1f02713c12/pyzmq-27.1.0-pp311-pypy311_pp73-win_amd64.whl", hash = "sha256:c9f7f6e13dff2e44a6afeaf2cf54cee5929ad64afaf4d40b50f93c58fc687355", size = 544862, upload-time = "2025-09-08T23:09:56.509Z" }, ] -[[package]] -name = "qudida" -version = "0.0.4" -source = { registry = "https://pypi.org/simple" } -dependencies = [ - { name = "numpy" }, - { name = "opencv-python-headless" }, - { name = "scikit-learn" }, - { name = "typing-extensions" }, -] -sdist = { url = "https://files.pythonhosted.org/packages/3e/2d/bab8babd9dc9a9e4df6eb115540cee4322c1a74078fb6f3b3ebc452a22b3/qudida-0.0.4.tar.gz", hash = "sha256:db198e2887ab0c9aa0023e565afbff41dfb76b361f85fd5e13f780d75ba18cc8", size = 3100, upload-time = "2021-08-09T16:47:55.807Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/f0/a1/a5f4bebaa31d109003909809d88aeb0d4b201463a9ea29308d9e4f9e7655/qudida-0.0.4-py3-none-any.whl", hash = "sha256:4519714c40cd0f2e6c51e1735edae8f8b19f4efe1f33be13e9d644ca5f736dd6", size = 3478, upload-time = "2021-08-09T16:47:54.637Z" }, -] - [[package]] name = "rapidocr" version = "3.8.1" @@ -2661,139 +2258,6 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/15/19/016553f86f207450aebebc2b2b5088d086b901cc8186c02ac4284db3bd88/ruff-0.15.16-py3-none-win_arm64.whl", hash = "sha256:8cd61783afb39638a7133ef0d2dfb1e91277593962f81b5a8423eb0b888a6121", size = 11134555, upload-time = "2026-06-04T16:33:00.136Z" }, ] -[[package]] -name = "scikit-image" -version = "0.25.2" -source = { registry = "https://pypi.org/simple" } -dependencies = [ - { name = "imageio" }, - { name = "lazy-loader" }, - { name = "networkx" }, - { name = "numpy" }, - { name = "packaging" }, - { name = "pillow" }, - { name = "scipy" }, - { name = "tifffile" }, -] -sdist = { url = "https://files.pythonhosted.org/packages/c7/a8/3c0f256012b93dd2cb6fda9245e9f4bff7dc0486880b248005f15ea2255e/scikit_image-0.25.2.tar.gz", hash = "sha256:e5a37e6cd4d0c018a7a55b9d601357e3382826d3888c10d0213fc63bff977dde", size = 22693594, upload-time = "2025-02-18T18:05:24.538Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/c4/97/3051c68b782ee3f1fb7f8f5bb7d535cf8cb92e8aae18fa9c1cdf7e15150d/scikit_image-0.25.2-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:f4bac9196fb80d37567316581c6060763b0f4893d3aca34a9ede3825bc035b17", size = 14003057, upload-time = "2025-02-18T18:04:30.395Z" }, - { url = "https://files.pythonhosted.org/packages/19/23/257fc696c562639826065514d551b7b9b969520bd902c3a8e2fcff5b9e17/scikit_image-0.25.2-cp311-cp311-macosx_12_0_arm64.whl", hash = "sha256:d989d64ff92e0c6c0f2018c7495a5b20e2451839299a018e0e5108b2680f71e0", size = 13180335, upload-time = "2025-02-18T18:04:33.449Z" }, - { url = "https://files.pythonhosted.org/packages/ef/14/0c4a02cb27ca8b1e836886b9ec7c9149de03053650e9e2ed0625f248dd92/scikit_image-0.25.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b2cfc96b27afe9a05bc92f8c6235321d3a66499995675b27415e0d0c76625173", size = 14144783, upload-time = "2025-02-18T18:04:36.594Z" }, - { url = "https://files.pythonhosted.org/packages/dd/9b/9fb556463a34d9842491d72a421942c8baff4281025859c84fcdb5e7e602/scikit_image-0.25.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:24cc986e1f4187a12aa319f777b36008764e856e5013666a4a83f8df083c2641", size = 14785376, upload-time = "2025-02-18T18:04:39.856Z" }, - { url = "https://files.pythonhosted.org/packages/de/ec/b57c500ee85885df5f2188f8bb70398481393a69de44a00d6f1d055f103c/scikit_image-0.25.2-cp311-cp311-win_amd64.whl", hash = "sha256:b4f6b61fc2db6340696afe3db6b26e0356911529f5f6aee8c322aa5157490c9b", size = 12791698, upload-time = "2025-02-18T18:04:42.868Z" }, - { url = "https://files.pythonhosted.org/packages/35/8c/5df82881284459f6eec796a5ac2a0a304bb3384eec2e73f35cfdfcfbf20c/scikit_image-0.25.2-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:8db8dd03663112783221bf01ccfc9512d1cc50ac9b5b0fe8f4023967564719fb", size = 13986000, upload-time = "2025-02-18T18:04:47.156Z" }, - { url = "https://files.pythonhosted.org/packages/ce/e6/93bebe1abcdce9513ffec01d8af02528b4c41fb3c1e46336d70b9ed4ef0d/scikit_image-0.25.2-cp312-cp312-macosx_12_0_arm64.whl", hash = "sha256:483bd8cc10c3d8a7a37fae36dfa5b21e239bd4ee121d91cad1f81bba10cfb0ed", size = 13235893, upload-time = "2025-02-18T18:04:51.049Z" }, - { url = "https://files.pythonhosted.org/packages/53/4b/eda616e33f67129e5979a9eb33c710013caa3aa8a921991e6cc0b22cea33/scikit_image-0.25.2-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:9d1e80107bcf2bf1291acfc0bf0425dceb8890abe9f38d8e94e23497cbf7ee0d", size = 14178389, upload-time = "2025-02-18T18:04:54.245Z" }, - { url = "https://files.pythonhosted.org/packages/6b/b5/b75527c0f9532dd8a93e8e7cd8e62e547b9f207d4c11e24f0006e8646b36/scikit_image-0.25.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a17e17eb8562660cc0d31bb55643a4da996a81944b82c54805c91b3fe66f4824", size = 15003435, upload-time = "2025-02-18T18:04:57.586Z" }, - { url = "https://files.pythonhosted.org/packages/34/e3/49beb08ebccda3c21e871b607c1cb2f258c3fa0d2f609fed0a5ba741b92d/scikit_image-0.25.2-cp312-cp312-win_amd64.whl", hash = "sha256:bdd2b8c1de0849964dbc54037f36b4e9420157e67e45a8709a80d727f52c7da2", size = 12899474, upload-time = "2025-02-18T18:05:01.166Z" }, - { url = "https://files.pythonhosted.org/packages/e6/7c/9814dd1c637f7a0e44342985a76f95a55dd04be60154247679fd96c7169f/scikit_image-0.25.2-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:7efa888130f6c548ec0439b1a7ed7295bc10105458a421e9bf739b457730b6da", size = 13921841, upload-time = "2025-02-18T18:05:03.963Z" }, - { url = "https://files.pythonhosted.org/packages/84/06/66a2e7661d6f526740c309e9717d3bd07b473661d5cdddef4dd978edab25/scikit_image-0.25.2-cp313-cp313-macosx_12_0_arm64.whl", hash = "sha256:dd8011efe69c3641920614d550f5505f83658fe33581e49bed86feab43a180fc", size = 13196862, upload-time = "2025-02-18T18:05:06.986Z" }, - { url = "https://files.pythonhosted.org/packages/4e/63/3368902ed79305f74c2ca8c297dfeb4307269cbe6402412668e322837143/scikit_image-0.25.2-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:28182a9d3e2ce3c2e251383bdda68f8d88d9fff1a3ebe1eb61206595c9773341", size = 14117785, upload-time = "2025-02-18T18:05:10.69Z" }, - { url = "https://files.pythonhosted.org/packages/cd/9b/c3da56a145f52cd61a68b8465d6a29d9503bc45bc993bb45e84371c97d94/scikit_image-0.25.2-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b8abd3c805ce6944b941cfed0406d88faeb19bab3ed3d4b50187af55cf24d147", size = 14977119, upload-time = "2025-02-18T18:05:13.871Z" }, - { url = "https://files.pythonhosted.org/packages/8a/97/5fcf332e1753831abb99a2525180d3fb0d70918d461ebda9873f66dcc12f/scikit_image-0.25.2-cp313-cp313-win_amd64.whl", hash = "sha256:64785a8acefee460ec49a354706db0b09d1f325674107d7fa3eadb663fb56d6f", size = 12885116, upload-time = "2025-02-18T18:05:17.844Z" }, - { url = "https://files.pythonhosted.org/packages/10/cc/75e9f17e3670b5ed93c32456fda823333c6279b144cd93e2c03aa06aa472/scikit_image-0.25.2-cp313-cp313t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:330d061bd107d12f8d68f1d611ae27b3b813b8cdb0300a71d07b1379178dd4cd", size = 13862801, upload-time = "2025-02-18T18:05:20.783Z" }, -] - -[[package]] -name = "scikit-learn" -version = "1.7.1" -source = { registry = "https://pypi.org/simple" } -dependencies = [ - { name = "joblib" }, - { name = "numpy" }, - { name = "scipy" }, - { name = "threadpoolctl" }, -] -sdist = { url = "https://files.pythonhosted.org/packages/41/84/5f4af978fff619706b8961accac84780a6d298d82a8873446f72edb4ead0/scikit_learn-1.7.1.tar.gz", hash = "sha256:24b3f1e976a4665aa74ee0fcaac2b8fccc6ae77c8e07ab25da3ba6d3292b9802", size = 7190445, upload-time = "2025-07-18T08:01:54.5Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/b4/bd/a23177930abd81b96daffa30ef9c54ddbf544d3226b8788ce4c3ef1067b4/scikit_learn-1.7.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:90c8494ea23e24c0fb371afc474618c1019dc152ce4a10e4607e62196113851b", size = 9334838, upload-time = "2025-07-18T08:01:11.239Z" }, - { url = "https://files.pythonhosted.org/packages/8d/a1/d3a7628630a711e2ac0d1a482910da174b629f44e7dd8cfcd6924a4ef81a/scikit_learn-1.7.1-cp311-cp311-macosx_12_0_arm64.whl", hash = "sha256:bb870c0daf3bf3be145ec51df8ac84720d9972170786601039f024bf6d61a518", size = 8651241, upload-time = "2025-07-18T08:01:13.234Z" }, - { url = "https://files.pythonhosted.org/packages/26/92/85ec172418f39474c1cd0221d611345d4f433fc4ee2fc68e01f524ccc4e4/scikit_learn-1.7.1-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:40daccd1b5623f39e8943ab39735cadf0bdce80e67cdca2adcb5426e987320a8", size = 9718677, upload-time = "2025-07-18T08:01:15.649Z" }, - { url = "https://files.pythonhosted.org/packages/df/ce/abdb1dcbb1d2b66168ec43b23ee0cee356b4cc4100ddee3943934ebf1480/scikit_learn-1.7.1-cp311-cp311-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:30d1f413cfc0aa5a99132a554f1d80517563c34a9d3e7c118fde2d273c6fe0f7", size = 9511189, upload-time = "2025-07-18T08:01:18.013Z" }, - { url = "https://files.pythonhosted.org/packages/b2/3b/47b5eaee01ef2b5a80ba3f7f6ecf79587cb458690857d4777bfd77371c6f/scikit_learn-1.7.1-cp311-cp311-win_amd64.whl", hash = "sha256:c711d652829a1805a95d7fe96654604a8f16eab5a9e9ad87b3e60173415cb650", size = 8914794, upload-time = "2025-07-18T08:01:20.357Z" }, - { url = "https://files.pythonhosted.org/packages/cb/16/57f176585b35ed865f51b04117947fe20f130f78940c6477b6d66279c9c2/scikit_learn-1.7.1-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:3cee419b49b5bbae8796ecd690f97aa412ef1674410c23fc3257c6b8b85b8087", size = 9260431, upload-time = "2025-07-18T08:01:22.77Z" }, - { url = "https://files.pythonhosted.org/packages/67/4e/899317092f5efcab0e9bc929e3391341cec8fb0e816c4789686770024580/scikit_learn-1.7.1-cp312-cp312-macosx_12_0_arm64.whl", hash = "sha256:2fd8b8d35817b0d9ebf0b576f7d5ffbbabdb55536b0655a8aaae629d7ffd2e1f", size = 8637191, upload-time = "2025-07-18T08:01:24.731Z" }, - { url = "https://files.pythonhosted.org/packages/f3/1b/998312db6d361ded1dd56b457ada371a8d8d77ca2195a7d18fd8a1736f21/scikit_learn-1.7.1-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:588410fa19a96a69763202f1d6b7b91d5d7a5d73be36e189bc6396bfb355bd87", size = 9486346, upload-time = "2025-07-18T08:01:26.713Z" }, - { url = "https://files.pythonhosted.org/packages/ad/09/a2aa0b4e644e5c4ede7006748f24e72863ba2ae71897fecfd832afea01b4/scikit_learn-1.7.1-cp312-cp312-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:e3142f0abe1ad1d1c31a2ae987621e41f6b578144a911ff4ac94781a583adad7", size = 9290988, upload-time = "2025-07-18T08:01:28.938Z" }, - { url = "https://files.pythonhosted.org/packages/15/fa/c61a787e35f05f17fc10523f567677ec4eeee5f95aa4798dbbbcd9625617/scikit_learn-1.7.1-cp312-cp312-win_amd64.whl", hash = "sha256:3ddd9092c1bd469acab337d87930067c87eac6bd544f8d5027430983f1e1ae88", size = 8735568, upload-time = "2025-07-18T08:01:30.936Z" }, - { url = "https://files.pythonhosted.org/packages/52/f8/e0533303f318a0f37b88300d21f79b6ac067188d4824f1047a37214ab718/scikit_learn-1.7.1-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:b7839687fa46d02e01035ad775982f2470be2668e13ddd151f0f55a5bf123bae", size = 9213143, upload-time = "2025-07-18T08:01:32.942Z" }, - { url = "https://files.pythonhosted.org/packages/71/f3/f1df377d1bdfc3e3e2adc9c119c238b182293e6740df4cbeac6de2cc3e23/scikit_learn-1.7.1-cp313-cp313-macosx_12_0_arm64.whl", hash = "sha256:a10f276639195a96c86aa572ee0698ad64ee939a7b042060b98bd1930c261d10", size = 8591977, upload-time = "2025-07-18T08:01:34.967Z" }, - { url = "https://files.pythonhosted.org/packages/99/72/c86a4cd867816350fe8dee13f30222340b9cd6b96173955819a5561810c5/scikit_learn-1.7.1-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:13679981fdaebc10cc4c13c43344416a86fcbc61449cb3e6517e1df9d12c8309", size = 9436142, upload-time = "2025-07-18T08:01:37.397Z" }, - { url = "https://files.pythonhosted.org/packages/e8/66/277967b29bd297538dc7a6ecfb1a7dce751beabd0d7f7a2233be7a4f7832/scikit_learn-1.7.1-cp313-cp313-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:4f1262883c6a63f067a980a8cdd2d2e7f2513dddcef6a9eaada6416a7a7cbe43", size = 9282996, upload-time = "2025-07-18T08:01:39.721Z" }, - { url = "https://files.pythonhosted.org/packages/e2/47/9291cfa1db1dae9880420d1e07dbc7e8dd4a7cdbc42eaba22512e6bde958/scikit_learn-1.7.1-cp313-cp313-win_amd64.whl", hash = "sha256:ca6d31fb10e04d50bfd2b50d66744729dbb512d4efd0223b864e2fdbfc4cee11", size = 8707418, upload-time = "2025-07-18T08:01:42.124Z" }, - { url = "https://files.pythonhosted.org/packages/61/95/45726819beccdaa34d3362ea9b2ff9f2b5d3b8bf721bd632675870308ceb/scikit_learn-1.7.1-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:781674d096303cfe3d351ae6963ff7c958db61cde3421cd490e3a5a58f2a94ae", size = 9561466, upload-time = "2025-07-18T08:01:44.195Z" }, - { url = "https://files.pythonhosted.org/packages/ee/1c/6f4b3344805de783d20a51eb24d4c9ad4b11a7f75c1801e6ec6d777361fd/scikit_learn-1.7.1-cp313-cp313t-macosx_12_0_arm64.whl", hash = "sha256:10679f7f125fe7ecd5fad37dd1aa2daae7e3ad8df7f3eefa08901b8254b3e12c", size = 9040467, upload-time = "2025-07-18T08:01:46.671Z" }, - { url = "https://files.pythonhosted.org/packages/6f/80/abe18fe471af9f1d181904203d62697998b27d9b62124cd281d740ded2f9/scikit_learn-1.7.1-cp313-cp313t-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:1f812729e38c8cb37f760dce71a9b83ccfb04f59b3dca7c6079dcdc60544fa9e", size = 9532052, upload-time = "2025-07-18T08:01:48.676Z" }, - { url = "https://files.pythonhosted.org/packages/14/82/b21aa1e0c4cee7e74864d3a5a721ab8fcae5ca55033cb6263dca297ed35b/scikit_learn-1.7.1-cp313-cp313t-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:88e1a20131cf741b84b89567e1717f27a2ced228e0f29103426102bc2e3b8ef7", size = 9361575, upload-time = "2025-07-18T08:01:50.639Z" }, - { url = "https://files.pythonhosted.org/packages/f2/20/f4777fcd5627dc6695fa6b92179d0edb7a3ac1b91bcd9a1c7f64fa7ade23/scikit_learn-1.7.1-cp313-cp313t-win_amd64.whl", hash = "sha256:b1bd1d919210b6a10b7554b717c9000b5485aa95a1d0f177ae0d7ee8ec750da5", size = 9277310, upload-time = "2025-07-18T08:01:52.547Z" }, -] - -[[package]] -name = "scipy" -version = "1.16.1" -source = { registry = "https://pypi.org/simple" } -dependencies = [ - { name = "numpy" }, -] -sdist = { url = "https://files.pythonhosted.org/packages/f5/4a/b927028464795439faec8eaf0b03b011005c487bb2d07409f28bf30879c4/scipy-1.16.1.tar.gz", hash = "sha256:44c76f9e8b6e8e488a586190ab38016e4ed2f8a038af7cd3defa903c0a2238b3", size = 30580861, upload-time = "2025-07-27T16:33:30.834Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/da/91/812adc6f74409b461e3a5fa97f4f74c769016919203138a3bf6fc24ba4c5/scipy-1.16.1-cp311-cp311-macosx_10_14_x86_64.whl", hash = "sha256:c033fa32bab91dc98ca59d0cf23bb876454e2bb02cbe592d5023138778f70030", size = 36552519, upload-time = "2025-07-27T16:26:29.658Z" }, - { url = "https://files.pythonhosted.org/packages/47/18/8e355edcf3b71418d9e9f9acd2708cc3a6c27e8f98fde0ac34b8a0b45407/scipy-1.16.1-cp311-cp311-macosx_12_0_arm64.whl", hash = "sha256:6e5c2f74e5df33479b5cd4e97a9104c511518fbd979aa9b8f6aec18b2e9ecae7", size = 28638010, upload-time = "2025-07-27T16:26:38.196Z" }, - { url = "https://files.pythonhosted.org/packages/d9/eb/e931853058607bdfbc11b86df19ae7a08686121c203483f62f1ecae5989c/scipy-1.16.1-cp311-cp311-macosx_14_0_arm64.whl", hash = "sha256:0a55ffe0ba0f59666e90951971a884d1ff6f4ec3275a48f472cfb64175570f77", size = 20909790, upload-time = "2025-07-27T16:26:43.93Z" }, - { url = "https://files.pythonhosted.org/packages/45/0c/be83a271d6e96750cd0be2e000f35ff18880a46f05ce8b5d3465dc0f7a2a/scipy-1.16.1-cp311-cp311-macosx_14_0_x86_64.whl", hash = "sha256:f8a5d6cd147acecc2603fbd382fed6c46f474cccfcf69ea32582e033fb54dcfe", size = 23513352, upload-time = "2025-07-27T16:26:50.017Z" }, - { url = "https://files.pythonhosted.org/packages/7c/bf/fe6eb47e74f762f933cca962db7f2c7183acfdc4483bd1c3813cfe83e538/scipy-1.16.1-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:cb18899127278058bcc09e7b9966d41a5a43740b5bb8dcba401bd983f82e885b", size = 33534643, upload-time = "2025-07-27T16:26:57.503Z" }, - { url = "https://files.pythonhosted.org/packages/bb/ba/63f402e74875486b87ec6506a4f93f6d8a0d94d10467280f3d9d7837ce3a/scipy-1.16.1-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:adccd93a2fa937a27aae826d33e3bfa5edf9aa672376a4852d23a7cd67a2e5b7", size = 35376776, upload-time = "2025-07-27T16:27:06.639Z" }, - { url = "https://files.pythonhosted.org/packages/c3/b4/04eb9d39ec26a1b939689102da23d505ea16cdae3dbb18ffc53d1f831044/scipy-1.16.1-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:18aca1646a29ee9a0625a1be5637fa798d4d81fdf426481f06d69af828f16958", size = 35698906, upload-time = "2025-07-27T16:27:14.943Z" }, - { url = "https://files.pythonhosted.org/packages/04/d6/bb5468da53321baeb001f6e4e0d9049eadd175a4a497709939128556e3ec/scipy-1.16.1-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:d85495cef541729a70cdddbbf3e6b903421bc1af3e8e3a9a72a06751f33b7c39", size = 38129275, upload-time = "2025-07-27T16:27:23.873Z" }, - { url = "https://files.pythonhosted.org/packages/c4/94/994369978509f227cba7dfb9e623254d0d5559506fe994aef4bea3ed469c/scipy-1.16.1-cp311-cp311-win_amd64.whl", hash = "sha256:226652fca853008119c03a8ce71ffe1b3f6d2844cc1686e8f9806edafae68596", size = 38644572, upload-time = "2025-07-27T16:27:32.637Z" }, - { url = "https://files.pythonhosted.org/packages/f8/d9/ec4864f5896232133f51382b54a08de91a9d1af7a76dfa372894026dfee2/scipy-1.16.1-cp312-cp312-macosx_10_14_x86_64.whl", hash = "sha256:81b433bbeaf35728dad619afc002db9b189e45eebe2cd676effe1fb93fef2b9c", size = 36575194, upload-time = "2025-07-27T16:27:41.321Z" }, - { url = "https://files.pythonhosted.org/packages/5c/6d/40e81ecfb688e9d25d34a847dca361982a6addf8e31f0957b1a54fbfa994/scipy-1.16.1-cp312-cp312-macosx_12_0_arm64.whl", hash = "sha256:886cc81fdb4c6903a3bb0464047c25a6d1016fef77bb97949817d0c0d79f9e04", size = 28594590, upload-time = "2025-07-27T16:27:49.204Z" }, - { url = "https://files.pythonhosted.org/packages/0e/37/9f65178edfcc629377ce9a64fc09baebea18c80a9e57ae09a52edf84880b/scipy-1.16.1-cp312-cp312-macosx_14_0_arm64.whl", hash = "sha256:15240c3aac087a522b4eaedb09f0ad061753c5eebf1ea430859e5bf8640d5919", size = 20866458, upload-time = "2025-07-27T16:27:54.98Z" }, - { url = "https://files.pythonhosted.org/packages/2c/7b/749a66766871ea4cb1d1ea10f27004db63023074c22abed51f22f09770e0/scipy-1.16.1-cp312-cp312-macosx_14_0_x86_64.whl", hash = "sha256:65f81a25805f3659b48126b5053d9e823d3215e4a63730b5e1671852a1705921", size = 23539318, upload-time = "2025-07-27T16:28:01.604Z" }, - { url = "https://files.pythonhosted.org/packages/c4/db/8d4afec60eb833a666434d4541a3151eedbf2494ea6d4d468cbe877f00cd/scipy-1.16.1-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:6c62eea7f607f122069b9bad3f99489ddca1a5173bef8a0c75555d7488b6f725", size = 33292899, upload-time = "2025-07-27T16:28:09.147Z" }, - { url = "https://files.pythonhosted.org/packages/51/1e/79023ca3bbb13a015d7d2757ecca3b81293c663694c35d6541b4dca53e98/scipy-1.16.1-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:f965bbf3235b01c776115ab18f092a95aa74c271a52577bcb0563e85738fd618", size = 35162637, upload-time = "2025-07-27T16:28:17.535Z" }, - { url = "https://files.pythonhosted.org/packages/b6/49/0648665f9c29fdaca4c679182eb972935b3b4f5ace41d323c32352f29816/scipy-1.16.1-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:f006e323874ffd0b0b816d8c6a8e7f9a73d55ab3b8c3f72b752b226d0e3ac83d", size = 35490507, upload-time = "2025-07-27T16:28:25.705Z" }, - { url = "https://files.pythonhosted.org/packages/62/8f/66cbb9d6bbb18d8c658f774904f42a92078707a7c71e5347e8bf2f52bb89/scipy-1.16.1-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:e8fd15fc5085ab4cca74cb91fe0a4263b1f32e4420761ddae531ad60934c2119", size = 37923998, upload-time = "2025-07-27T16:28:34.339Z" }, - { url = "https://files.pythonhosted.org/packages/14/c3/61f273ae550fbf1667675701112e380881905e28448c080b23b5a181df7c/scipy-1.16.1-cp312-cp312-win_amd64.whl", hash = "sha256:f7b8013c6c066609577d910d1a2a077021727af07b6fab0ee22c2f901f22352a", size = 38508060, upload-time = "2025-07-27T16:28:43.242Z" }, - { url = "https://files.pythonhosted.org/packages/93/0b/b5c99382b839854a71ca9482c684e3472badc62620287cbbdab499b75ce6/scipy-1.16.1-cp313-cp313-macosx_10_14_x86_64.whl", hash = "sha256:5451606823a5e73dfa621a89948096c6528e2896e40b39248295d3a0138d594f", size = 36533717, upload-time = "2025-07-27T16:28:51.706Z" }, - { url = "https://files.pythonhosted.org/packages/eb/e5/69ab2771062c91e23e07c12e7d5033a6b9b80b0903ee709c3c36b3eb520c/scipy-1.16.1-cp313-cp313-macosx_12_0_arm64.whl", hash = "sha256:89728678c5ca5abd610aee148c199ac1afb16e19844401ca97d43dc548a354eb", size = 28570009, upload-time = "2025-07-27T16:28:57.017Z" }, - { url = "https://files.pythonhosted.org/packages/f4/69/bd75dbfdd3cf524f4d753484d723594aed62cfaac510123e91a6686d520b/scipy-1.16.1-cp313-cp313-macosx_14_0_arm64.whl", hash = "sha256:e756d688cb03fd07de0fffad475649b03cb89bee696c98ce508b17c11a03f95c", size = 20841942, upload-time = "2025-07-27T16:29:01.152Z" }, - { url = "https://files.pythonhosted.org/packages/ea/74/add181c87663f178ba7d6144b370243a87af8476664d5435e57d599e6874/scipy-1.16.1-cp313-cp313-macosx_14_0_x86_64.whl", hash = "sha256:5aa2687b9935da3ed89c5dbed5234576589dd28d0bf7cd237501ccfbdf1ad608", size = 23498507, upload-time = "2025-07-27T16:29:05.202Z" }, - { url = "https://files.pythonhosted.org/packages/1d/74/ece2e582a0d9550cee33e2e416cc96737dce423a994d12bbe59716f47ff1/scipy-1.16.1-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:0851f6a1e537fe9399f35986897e395a1aa61c574b178c0d456be5b1a0f5ca1f", size = 33286040, upload-time = "2025-07-27T16:29:10.201Z" }, - { url = "https://files.pythonhosted.org/packages/e4/82/08e4076df538fb56caa1d489588d880ec7c52d8273a606bb54d660528f7c/scipy-1.16.1-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:fedc2cbd1baed37474b1924c331b97bdff611d762c196fac1a9b71e67b813b1b", size = 35176096, upload-time = "2025-07-27T16:29:17.091Z" }, - { url = "https://files.pythonhosted.org/packages/fa/79/cd710aab8c921375711a8321c6be696e705a120e3011a643efbbcdeeabcc/scipy-1.16.1-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:2ef500e72f9623a6735769e4b93e9dcb158d40752cdbb077f305487e3e2d1f45", size = 35490328, upload-time = "2025-07-27T16:29:22.928Z" }, - { url = "https://files.pythonhosted.org/packages/71/73/e9cc3d35ee4526d784520d4494a3e1ca969b071fb5ae5910c036a375ceec/scipy-1.16.1-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:978d8311674b05a8f7ff2ea6c6bce5d8b45a0cb09d4c5793e0318f448613ea65", size = 37939921, upload-time = "2025-07-27T16:29:29.108Z" }, - { url = "https://files.pythonhosted.org/packages/21/12/c0efd2941f01940119b5305c375ae5c0fcb7ec193f806bd8f158b73a1782/scipy-1.16.1-cp313-cp313-win_amd64.whl", hash = "sha256:81929ed0fa7a5713fcdd8b2e6f73697d3b4c4816d090dd34ff937c20fa90e8ab", size = 38479462, upload-time = "2025-07-27T16:30:24.078Z" }, - { url = "https://files.pythonhosted.org/packages/7a/19/c3d08b675260046a991040e1ea5d65f91f40c7df1045fffff412dcfc6765/scipy-1.16.1-cp313-cp313t-macosx_10_14_x86_64.whl", hash = "sha256:bcc12db731858abda693cecdb3bdc9e6d4bd200213f49d224fe22df82687bdd6", size = 36938832, upload-time = "2025-07-27T16:29:35.057Z" }, - { url = "https://files.pythonhosted.org/packages/81/f2/ce53db652c033a414a5b34598dba6b95f3d38153a2417c5a3883da429029/scipy-1.16.1-cp313-cp313t-macosx_12_0_arm64.whl", hash = "sha256:744d977daa4becb9fc59135e75c069f8d301a87d64f88f1e602a9ecf51e77b27", size = 29093084, upload-time = "2025-07-27T16:29:40.201Z" }, - { url = "https://files.pythonhosted.org/packages/a9/ae/7a10ff04a7dc15f9057d05b33737ade244e4bd195caa3f7cc04d77b9e214/scipy-1.16.1-cp313-cp313t-macosx_14_0_arm64.whl", hash = "sha256:dc54f76ac18073bcecffb98d93f03ed6b81a92ef91b5d3b135dcc81d55a724c7", size = 21365098, upload-time = "2025-07-27T16:29:44.295Z" }, - { url = "https://files.pythonhosted.org/packages/36/ac/029ff710959932ad3c2a98721b20b405f05f752f07344622fd61a47c5197/scipy-1.16.1-cp313-cp313t-macosx_14_0_x86_64.whl", hash = "sha256:367d567ee9fc1e9e2047d31f39d9d6a7a04e0710c86e701e053f237d14a9b4f6", size = 23896858, upload-time = "2025-07-27T16:29:48.784Z" }, - { url = "https://files.pythonhosted.org/packages/71/13/d1ef77b6bd7898720e1f0b6b3743cb945f6c3cafa7718eaac8841035ab60/scipy-1.16.1-cp313-cp313t-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:4cf5785e44e19dcd32a0e4807555e1e9a9b8d475c6afff3d21c3c543a6aa84f4", size = 33438311, upload-time = "2025-07-27T16:29:54.164Z" }, - { url = "https://files.pythonhosted.org/packages/2d/e0/e64a6821ffbb00b4c5b05169f1c1fddb4800e9307efe3db3788995a82a2c/scipy-1.16.1-cp313-cp313t-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:3d0b80fb26d3e13a794c71d4b837e2a589d839fd574a6bbb4ee1288c213ad4a3", size = 35279542, upload-time = "2025-07-27T16:30:00.249Z" }, - { url = "https://files.pythonhosted.org/packages/57/59/0dc3c8b43e118f1e4ee2b798dcc96ac21bb20014e5f1f7a8e85cc0653bdb/scipy-1.16.1-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:8503517c44c18d1030d666cb70aaac1cc8913608816e06742498833b128488b7", size = 35667665, upload-time = "2025-07-27T16:30:05.916Z" }, - { url = "https://files.pythonhosted.org/packages/45/5f/844ee26e34e2f3f9f8febb9343748e72daeaec64fe0c70e9bf1ff84ec955/scipy-1.16.1-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:30cc4bb81c41831ecfd6dc450baf48ffd80ef5aed0f5cf3ea775740e80f16ecc", size = 38045210, upload-time = "2025-07-27T16:30:11.655Z" }, - { url = "https://files.pythonhosted.org/packages/8d/d7/210f2b45290f444f1de64bc7353aa598ece9f0e90c384b4a156f9b1a5063/scipy-1.16.1-cp313-cp313t-win_amd64.whl", hash = "sha256:c24fa02f7ed23ae514460a22c57eca8f530dbfa50b1cfdbf4f37c05b5309cc39", size = 38593661, upload-time = "2025-07-27T16:30:17.825Z" }, - { url = "https://files.pythonhosted.org/packages/81/ea/84d481a5237ed223bd3d32d6e82d7a6a96e34756492666c260cef16011d1/scipy-1.16.1-cp314-cp314-macosx_10_14_x86_64.whl", hash = "sha256:796a5a9ad36fa3a782375db8f4241ab02a091308eb079746bc0f874c9b998318", size = 36525921, upload-time = "2025-07-27T16:30:30.081Z" }, - { url = "https://files.pythonhosted.org/packages/4e/9f/d9edbdeff9f3a664807ae3aea383e10afaa247e8e6255e6d2aa4515e8863/scipy-1.16.1-cp314-cp314-macosx_12_0_arm64.whl", hash = "sha256:3ea0733a2ff73fd6fdc5fecca54ee9b459f4d74f00b99aced7d9a3adb43fb1cc", size = 28564152, upload-time = "2025-07-27T16:30:35.336Z" }, - { url = "https://files.pythonhosted.org/packages/3b/95/8125bcb1fe04bc267d103e76516243e8d5e11229e6b306bda1024a5423d1/scipy-1.16.1-cp314-cp314-macosx_14_0_arm64.whl", hash = "sha256:85764fb15a2ad994e708258bb4ed8290d1305c62a4e1ef07c414356a24fcfbf8", size = 20836028, upload-time = "2025-07-27T16:30:39.421Z" }, - { url = "https://files.pythonhosted.org/packages/77/9c/bf92e215701fc70bbcd3d14d86337cf56a9b912a804b9c776a269524a9e9/scipy-1.16.1-cp314-cp314-macosx_14_0_x86_64.whl", hash = "sha256:ca66d980469cb623b1759bdd6e9fd97d4e33a9fad5b33771ced24d0cb24df67e", size = 23489666, upload-time = "2025-07-27T16:30:43.663Z" }, - { url = "https://files.pythonhosted.org/packages/5e/00/5e941d397d9adac41b02839011594620d54d99488d1be5be755c00cde9ee/scipy-1.16.1-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:e7cc1ffcc230f568549fc56670bcf3df1884c30bd652c5da8138199c8c76dae0", size = 33358318, upload-time = "2025-07-27T16:30:48.982Z" }, - { url = "https://files.pythonhosted.org/packages/0e/87/8db3aa10dde6e3e8e7eb0133f24baa011377d543f5b19c71469cf2648026/scipy-1.16.1-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:3ddfb1e8d0b540cb4ee9c53fc3dea3186f97711248fb94b4142a1b27178d8b4b", size = 35185724, upload-time = "2025-07-27T16:30:54.26Z" }, - { url = "https://files.pythonhosted.org/packages/89/b4/6ab9ae443216807622bcff02690262d8184078ea467efee2f8c93288a3b1/scipy-1.16.1-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:4dc0e7be79e95d8ba3435d193e0d8ce372f47f774cffd882f88ea4e1e1ddc731", size = 35554335, upload-time = "2025-07-27T16:30:59.765Z" }, - { url = "https://files.pythonhosted.org/packages/9c/9a/d0e9dc03c5269a1afb60661118296a32ed5d2c24298af61b676c11e05e56/scipy-1.16.1-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:f23634f9e5adb51b2a77766dac217063e764337fbc816aa8ad9aaebcd4397fd3", size = 37960310, upload-time = "2025-07-27T16:31:06.151Z" }, - { url = "https://files.pythonhosted.org/packages/5e/00/c8f3130a50521a7977874817ca89e0599b1b4ee8e938bad8ae798a0e1f0d/scipy-1.16.1-cp314-cp314-win_amd64.whl", hash = "sha256:57d75524cb1c5a374958a2eae3d84e1929bb971204cc9d52213fb8589183fc19", size = 39319239, upload-time = "2025-07-27T16:31:59.942Z" }, - { url = "https://files.pythonhosted.org/packages/f2/f2/1ca3eda54c3a7e4c92f6acef7db7b3a057deb135540d23aa6343ef8ad333/scipy-1.16.1-cp314-cp314t-macosx_10_14_x86_64.whl", hash = "sha256:d8da7c3dd67bcd93f15618938f43ed0995982eb38973023d46d4646c4283ad65", size = 36939460, upload-time = "2025-07-27T16:31:11.865Z" }, - { url = "https://files.pythonhosted.org/packages/80/30/98c2840b293a132400c0940bb9e140171dcb8189588619048f42b2ce7b4f/scipy-1.16.1-cp314-cp314t-macosx_12_0_arm64.whl", hash = "sha256:cc1d2f2fd48ba1e0620554fe5bc44d3e8f5d4185c8c109c7fbdf5af2792cfad2", size = 29093322, upload-time = "2025-07-27T16:31:17.045Z" }, - { url = "https://files.pythonhosted.org/packages/c1/e6/1e6e006e850622cf2a039b62d1a6ddc4497d4851e58b68008526f04a9a00/scipy-1.16.1-cp314-cp314t-macosx_14_0_arm64.whl", hash = "sha256:21a611ced9275cb861bacadbada0b8c0623bc00b05b09eb97f23b370fc2ae56d", size = 21365329, upload-time = "2025-07-27T16:31:21.188Z" }, - { url = "https://files.pythonhosted.org/packages/8e/02/72a5aa5b820589dda9a25e329ca752842bfbbaf635e36bc7065a9b42216e/scipy-1.16.1-cp314-cp314t-macosx_14_0_x86_64.whl", hash = "sha256:8dfbb25dffc4c3dd9371d8ab456ca81beeaf6f9e1c2119f179392f0dc1ab7695", size = 23897544, upload-time = "2025-07-27T16:31:25.408Z" }, - { url = "https://files.pythonhosted.org/packages/2b/dc/7122d806a6f9eb8a33532982234bed91f90272e990f414f2830cfe656e0b/scipy-1.16.1-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:f0ebb7204f063fad87fc0a0e4ff4a2ff40b2a226e4ba1b7e34bf4b79bf97cd86", size = 33442112, upload-time = "2025-07-27T16:31:30.62Z" }, - { url = "https://files.pythonhosted.org/packages/24/39/e383af23564daa1021a5b3afbe0d8d6a68ec639b943661841f44ac92de85/scipy-1.16.1-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:f1b9e5962656f2734c2b285a8745358ecb4e4efbadd00208c80a389227ec61ff", size = 35286594, upload-time = "2025-07-27T16:31:36.112Z" }, - { url = "https://files.pythonhosted.org/packages/95/47/1a0b0aff40c3056d955f38b0df5d178350c3d74734ec54f9c68d23910be5/scipy-1.16.1-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:5e1a106f8c023d57a2a903e771228bf5c5b27b5d692088f457acacd3b54511e4", size = 35665080, upload-time = "2025-07-27T16:31:42.025Z" }, - { url = "https://files.pythonhosted.org/packages/64/df/ce88803e9ed6e27fe9b9abefa157cf2c80e4fa527cf17ee14be41f790ad4/scipy-1.16.1-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:709559a1db68a9abc3b2c8672c4badf1614f3b440b3ab326d86a5c0491eafae3", size = 38050306, upload-time = "2025-07-27T16:31:48.109Z" }, - { url = "https://files.pythonhosted.org/packages/6e/6c/a76329897a7cae4937d403e623aa6aaea616a0bb5b36588f0b9d1c9a3739/scipy-1.16.1-cp314-cp314t-win_amd64.whl", hash = "sha256:c0c804d60492a0aad7f5b2bb1862f4548b990049e27e828391ff2bf6f7199998", size = 39427705, upload-time = "2025-07-27T16:31:53.96Z" }, -] - [[package]] name = "setuptools" version = "80.9.0" @@ -2910,27 +2374,6 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/d2/05/e6600db80270777c4a64238a98d442f0fd07cc8915be2a1c16da7f2b9e74/sympy-1.12-py3-none-any.whl", hash = "sha256:c3588cd4295d0c0f603d0f2ae780587e64e2efeedb3521e46b9bb1d08d184fa5", size = 5742435, upload-time = "2023-05-10T18:22:14.76Z" }, ] -[[package]] -name = "threadpoolctl" -version = "3.2.0" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/47/8a/c05f7831beb32aff70f808766224f11c650f7edfd49b27a8fc6666107006/threadpoolctl-3.2.0.tar.gz", hash = "sha256:c96a0ba3bdddeaca37dc4cc7344aafad41cdb8c313f74fdfe387a867bba93355", size = 36266, upload-time = "2023-07-13T14:53:53.299Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/81/12/fd4dea011af9d69e1cad05c75f3f7202cdcbeac9b712eea58ca779a72865/threadpoolctl-3.2.0-py3-none-any.whl", hash = "sha256:2b7818516e423bdaebb97c723f86a7c6b0a83d3f3b0970328d66f4d9104dc032", size = 15539, upload-time = "2023-07-13T14:53:39.336Z" }, -] - -[[package]] -name = "tifffile" -version = "2023.12.9" -source = { registry = "https://pypi.org/simple" } -dependencies = [ - { name = "numpy" }, -] -sdist = { url = "https://files.pythonhosted.org/packages/f8/a4/6c0eadea1ccfcda27e6cce400c366098b5b082138a073f4252fe399f4148/tifffile-2023.12.9.tar.gz", hash = "sha256:9dd1da91180a6453018a241ff219e1905f169384355cd89c9ef4034c1b46cdb8", size = 353467, upload-time = "2023-12-09T20:46:29.203Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/54/a4/569fc717831969cf48bced350bdaf070cdeab06918d179429899e144358d/tifffile-2023.12.9-py3-none-any.whl", hash = "sha256:9b066e4b1a900891ea42ffd33dab8ba34c537935618b9893ddef42d7d422692f", size = 223627, upload-time = "2023-12-09T20:46:26.569Z" }, -] - [[package]] name = "tokenizers" version = "0.23.1" @@ -3211,15 +2654,6 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/5a/a5/7aba9435beb863c2490bae3173a45f42044ac7a48155d3dd42ab49cfae45/watchfiles-0.21.0-cp312-none-win_arm64.whl", hash = "sha256:a3b9bec9579a15fb3ca2d9878deae789df72f2b0fdaf90ad49ee389cad5edab6", size = 268026, upload-time = "2023-10-13T13:05:38.591Z" }, ] -[[package]] -name = "wcwidth" -version = "0.2.13" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/6c/63/53559446a878410fc5a5974feb13d31d78d752eb18aeba59c7fef1af7598/wcwidth-0.2.13.tar.gz", hash = "sha256:72ea0c06399eb286d978fdedb6923a9eb47e1c486ce63e9b4e64fc18303972b5", size = 101301, upload-time = "2024-01-06T02:10:57.829Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/fd/84/fd2ba7aafacbad3c4201d395674fc6348826569da3c0937e75505ead3528/wcwidth-0.2.13-py2.py3-none-any.whl", hash = "sha256:3da69048e4540d84af32131829ff948f1e022c1c6bdb8d6102117aac784f6859", size = 34166, upload-time = "2024-01-06T02:10:55.763Z" }, -] - [[package]] name = "websocket-client" version = "1.8.0" diff --git a/mise.lock b/mise.lock index 44ecd6fdbe..836712e0fd 100644 --- a/mise.lock +++ b/mise.lock @@ -82,6 +82,15 @@ url_api = "https://api.github.com/repos/extism/js-pdk/releases/assets/353224133" version = "7.1.3-6" backend = "github:jellyfin/jellyfin-ffmpeg" +[tools."github:jellyfin/jellyfin-ffmpeg"."platforms.windows-x64"] +checksum = "sha256:7b7168149689610296f3a187c717056ce0786cc125a31caf28056737e9ba1cc1" +url = "https://github.com/jellyfin/jellyfin-ffmpeg/releases/download/v7.1.3-6/jellyfin-ffmpeg_7.1.3-6_portable_win64-clang-gpl.zip" +url_api = "https://api.github.com/repos/jellyfin/jellyfin-ffmpeg/releases/assets/409036094" + +[[tools."github:jellyfin/jellyfin-ffmpeg"]] +version = "7.1.3-6" +backend = "github:jellyfin/jellyfin-ffmpeg" + [tools."github:jellyfin/jellyfin-ffmpeg".options] asset_pattern = "jellyfin-ffmpeg_*_portable_macarm64-gpl.tar.xz" @@ -111,6 +120,18 @@ url_api = "https://api.github.com/repos/jellyfin/jellyfin-ffmpeg/releases/assets version = "7.1.3-6" backend = "github:jellyfin/jellyfin-ffmpeg" +[tools."github:jellyfin/jellyfin-ffmpeg".options] +asset_pattern = "jellyfin-ffmpeg_*_portable_mac64-gpl.tar.xz" + +[tools."github:jellyfin/jellyfin-ffmpeg"."platforms.macos-x64"] +checksum = "sha256:066ede9774aaae97a18098aaeea8b7e0d286653eb8618f640476e99c59a536c2" +url = "https://github.com/jellyfin/jellyfin-ffmpeg/releases/download/v7.1.3-6/jellyfin-ffmpeg_7.1.3-6_portable_mac64-gpl.tar.xz" +url_api = "https://api.github.com/repos/jellyfin/jellyfin-ffmpeg/releases/assets/408995889" + +[[tools."github:jellyfin/jellyfin-ffmpeg"]] +version = "7.1.3-6" +backend = "github:jellyfin/jellyfin-ffmpeg" + [tools."github:jellyfin/jellyfin-ffmpeg".options] asset_pattern = "jellyfin-ffmpeg_*_portable_linuxarm64-gpl.tar.xz" @@ -124,27 +145,6 @@ checksum = "sha256:bea03c670e8cc5bfe9edc0c5d624d4735421610cef5e808db93e7d8596952 url = "https://github.com/jellyfin/jellyfin-ffmpeg/releases/download/v7.1.3-6/jellyfin-ffmpeg_7.1.3-6_portable_linuxarm64-gpl.tar.xz" url_api = "https://api.github.com/repos/jellyfin/jellyfin-ffmpeg/releases/assets/409048876" -[[tools."github:jellyfin/jellyfin-ffmpeg"]] -version = "7.1.3-6" -backend = "github:jellyfin/jellyfin-ffmpeg" - -[tools."github:jellyfin/jellyfin-ffmpeg"."platforms.windows-x64"] -checksum = "sha256:7b7168149689610296f3a187c717056ce0786cc125a31caf28056737e9ba1cc1" -url = "https://github.com/jellyfin/jellyfin-ffmpeg/releases/download/v7.1.3-6/jellyfin-ffmpeg_7.1.3-6_portable_win64-clang-gpl.zip" -url_api = "https://api.github.com/repos/jellyfin/jellyfin-ffmpeg/releases/assets/409036094" - -[[tools."github:jellyfin/jellyfin-ffmpeg"]] -version = "7.1.3-6" -backend = "github:jellyfin/jellyfin-ffmpeg" - -[tools."github:jellyfin/jellyfin-ffmpeg".options] -asset_pattern = "jellyfin-ffmpeg_*_portable_mac64-gpl.tar.xz" - -[tools."github:jellyfin/jellyfin-ffmpeg"."platforms.macos-x64"] -checksum = "sha256:066ede9774aaae97a18098aaeea8b7e0d286653eb8618f640476e99c59a536c2" -url = "https://github.com/jellyfin/jellyfin-ffmpeg/releases/download/v7.1.3-6/jellyfin-ffmpeg_7.1.3-6_portable_mac64-gpl.tar.xz" -url_api = "https://api.github.com/repos/jellyfin/jellyfin-ffmpeg/releases/assets/408995889" - [[tools."github:webassembly/binaryen"]] version = "version_124" backend = "github:webassembly/binaryen" @@ -243,104 +243,128 @@ url = "https://nodejs.org/dist/v24.15.0/node-v24.15.0-darwin-x64.tar.gz" checksum = "sha256:cc5149eabd53779ce1e7bdc5401643622d0c7e6800ade18928a767e940bb0e62" url = "https://nodejs.org/dist/v24.15.0/node-v24.15.0-win-x64.zip" +[[tools."npm:@openapitools/openapi-generator-cli"]] +version = "2.40.1" +backend = "npm:@openapitools/openapi-generator-cli" + [[tools."npm:oazapfts"]] version = "7.5.0" backend = "npm:oazapfts" [[tools.opentofu]] -version = "1.11.6" +version = "1.12.5" backend = "aqua:opentofu/opentofu" [tools.opentofu."platforms.linux-arm64"] -checksum = "sha256:d4f2ab15776925864b049bb329d69682851de6f5204f256e9fa86d07a0308850" -url = "https://github.com/opentofu/opentofu/releases/download/v1.11.6/tofu_1.11.6_linux_arm64.tar.gz" +checksum = "sha256:e67e9da2b1ddf5050ebee62a584cb826eafe1dfd3827d7ec20899ac62791ed1a" +url = "https://github.com/opentofu/opentofu/releases/download/v1.12.5/tofu_1.12.5_linux_arm64.tar.gz" +url_api = "https://api.github.com/repos/opentofu/opentofu/releases/assets/484602545" [tools.opentofu."platforms.linux-arm64-musl"] -checksum = "sha256:d4f2ab15776925864b049bb329d69682851de6f5204f256e9fa86d07a0308850" -url = "https://github.com/opentofu/opentofu/releases/download/v1.11.6/tofu_1.11.6_linux_arm64.tar.gz" +checksum = "sha256:e67e9da2b1ddf5050ebee62a584cb826eafe1dfd3827d7ec20899ac62791ed1a" +url = "https://github.com/opentofu/opentofu/releases/download/v1.12.5/tofu_1.12.5_linux_arm64.tar.gz" +url_api = "https://api.github.com/repos/opentofu/opentofu/releases/assets/484602545" [tools.opentofu."platforms.linux-x64"] -checksum = "sha256:02800fafa2753a9f50c38483e2fdf5bc353fd62895eb9e25eec9a5145df3a69e" -url = "https://github.com/opentofu/opentofu/releases/download/v1.11.6/tofu_1.11.6_linux_amd64.tar.gz" +checksum = "sha256:a6894d45ae7a17ce83189cce8fe04b5a65f68cefceb62455b5a6a89fa53ab38f" +url = "https://github.com/opentofu/opentofu/releases/download/v1.12.5/tofu_1.12.5_linux_amd64.tar.gz" +url_api = "https://api.github.com/repos/opentofu/opentofu/releases/assets/484602624" [tools.opentofu."platforms.linux-x64-musl"] -checksum = "sha256:02800fafa2753a9f50c38483e2fdf5bc353fd62895eb9e25eec9a5145df3a69e" -url = "https://github.com/opentofu/opentofu/releases/download/v1.11.6/tofu_1.11.6_linux_amd64.tar.gz" +checksum = "sha256:a6894d45ae7a17ce83189cce8fe04b5a65f68cefceb62455b5a6a89fa53ab38f" +url = "https://github.com/opentofu/opentofu/releases/download/v1.12.5/tofu_1.12.5_linux_amd64.tar.gz" +url_api = "https://api.github.com/repos/opentofu/opentofu/releases/assets/484602624" [tools.opentofu."platforms.macos-arm64"] -checksum = "sha256:62d7fa8539e13b444827aa0a3b90c5972da5c47e8f8882d9dcf2e430e78840c1" -url = "https://github.com/opentofu/opentofu/releases/download/v1.11.6/tofu_1.11.6_darwin_arm64.tar.gz" +checksum = "sha256:2ae38150a667f5c0bd57b318d18ad8091d08f93fcca40345f3d88998661de5a9" +url = "https://github.com/opentofu/opentofu/releases/download/v1.12.5/tofu_1.12.5_darwin_arm64.tar.gz" +url_api = "https://api.github.com/repos/opentofu/opentofu/releases/assets/484602544" [tools.opentofu."platforms.macos-x64"] -checksum = "sha256:1408cdef1c380f914565e6b4bb70794c6b163f195fcb233357f3d6c5745906b6" -url = "https://github.com/opentofu/opentofu/releases/download/v1.11.6/tofu_1.11.6_darwin_amd64.tar.gz" +checksum = "sha256:1012d8f3d4567bcbcd1f2c7d766feca39a30bced32fb8be47e1887fbbee2456d" +url = "https://github.com/opentofu/opentofu/releases/download/v1.12.5/tofu_1.12.5_darwin_amd64.tar.gz" +url_api = "https://api.github.com/repos/opentofu/opentofu/releases/assets/484602621" [tools.opentofu."platforms.windows-x64"] -checksum = "sha256:27323f70c875b8251bfd7e61a4cffc3ebff4e56ed1e611b955016f0c7077367e" -url = "https://github.com/opentofu/opentofu/releases/download/v1.11.6/tofu_1.11.6_windows_amd64.tar.gz" +checksum = "sha256:af11850b496f3720e0184084c56d8b43aa74ea92d2338978bf368d70c96473f1" +url = "https://github.com/opentofu/opentofu/releases/download/v1.12.5/tofu_1.12.5_windows_amd64.tar.gz" +url_api = "https://api.github.com/repos/opentofu/opentofu/releases/assets/484602547" [[tools.pnpm]] -version = "11.6.0" +version = "11.20.0" backend = "aqua:pnpm/pnpm" [tools.pnpm."platforms.linux-arm64"] -checksum = "sha256:2fec653ff6dadab340d1c3d2214688a7451cc471f39710839440b293ca7c53b0" -url = "https://github.com/pnpm/pnpm/releases/download/v11.6.0/pnpm-linux-arm64.tar.gz" +checksum = "sha256:f00fc2041bb41742b7943bf2bb24183ad20320e8384824a8031eb94edf2f57a5" +url = "https://github.com/pnpm/pnpm/releases/download/v11.20.0/pnpm-linux-arm64.tar.gz" +url_api = "https://api.github.com/repos/pnpm/pnpm/releases/assets/500142378" provenance = "github-attestations" [tools.pnpm."platforms.linux-arm64-musl"] -checksum = "sha256:56a78c08cf22adf29e7dacb6f7f100139731693863d20fb94a7883463a62169e" -url = "https://github.com/pnpm/pnpm/releases/download/v11.6.0/pnpm-linux-arm64-musl.tar.gz" +checksum = "sha256:2a21235d3f0fbfbcb9e530b9a98f2c64dcee95d1d5d1c2d04428255c7b85f32c" +url = "https://github.com/pnpm/pnpm/releases/download/v11.20.0/pnpm-linux-arm64-musl.tar.gz" +url_api = "https://api.github.com/repos/pnpm/pnpm/releases/assets/500142372" provenance = "github-attestations" [tools.pnpm."platforms.linux-x64"] -checksum = "sha256:74d64c1646385fb21691f32f0ab6aca1a9f5c829ba54d3cda3a24838a228e68c" -url = "https://github.com/pnpm/pnpm/releases/download/v11.6.0/pnpm-linux-x64.tar.gz" +checksum = "sha256:b4ad6ad2b21db2f8cd50af416c3aa148ba704c31c84893f465a770a01c2c4572" +url = "https://github.com/pnpm/pnpm/releases/download/v11.20.0/pnpm-linux-x64.tar.gz" +url_api = "https://api.github.com/repos/pnpm/pnpm/releases/assets/500142376" provenance = "github-attestations" [tools.pnpm."platforms.linux-x64-musl"] -checksum = "sha256:7a0c463a09d912fba6b7d9eca0a946bc228ea50f3015a05c09a29e7e85a932d7" -url = "https://github.com/pnpm/pnpm/releases/download/v11.6.0/pnpm-linux-x64-musl.tar.gz" +checksum = "sha256:db046881c027f1a2d69e9a530a21a62c2bced4ba8ff437e7300426ae56951fe4" +url = "https://github.com/pnpm/pnpm/releases/download/v11.20.0/pnpm-linux-x64-musl.tar.gz" +url_api = "https://api.github.com/repos/pnpm/pnpm/releases/assets/500142377" provenance = "github-attestations" [tools.pnpm."platforms.macos-arm64"] -checksum = "sha256:87c901635a14481fb30566a3749041134ffd4317bc6fe866c345b69fdf9b6b85" -url = "https://github.com/pnpm/pnpm/releases/download/v11.6.0/pnpm-darwin-arm64.tar.gz" +checksum = "sha256:4bc97fea72e5c92eec1fefc8d410c35d01e0d0d52f3160c59f38c32db58b5cd2" +url = "https://github.com/pnpm/pnpm/releases/download/v11.20.0/pnpm-darwin-arm64.tar.gz" +url_api = "https://api.github.com/repos/pnpm/pnpm/releases/assets/500142373" provenance = "github-attestations" [tools.pnpm."platforms.windows-x64"] -checksum = "sha256:91c753435542b04859c689304fae0dd64eba6b40937cfa426a48485b712e4e9c" -url = "https://github.com/pnpm/pnpm/releases/download/v11.6.0/pnpm-win32-x64.zip" +checksum = "sha256:ea2528bdc3d96a1ff3c35587dc48ca692b39d77f08f26df4adeaaa9eb427024e" +url = "https://github.com/pnpm/pnpm/releases/download/v11.20.0/pnpm-win32-x64.zip" +url_api = "https://api.github.com/repos/pnpm/pnpm/releases/assets/500142371" provenance = "github-attestations" [[tools.terragrunt]] -version = "1.0.3" +version = "1.1.1" backend = "aqua:gruntwork-io/terragrunt" [tools.terragrunt."platforms.linux-arm64"] -checksum = "sha256:e5b60ab05b5214db694e6bc215d8124fb626e277cdb56b86f6147ae110d510fe" -url = "https://github.com/gruntwork-io/terragrunt/releases/download/v1.0.3/terragrunt_linux_arm64.tar.gz" +checksum = "sha256:a374a7993ff3d99665a7e014007d3647ec7f0465c9d55c85e9f94c932e73cea2" +url = "https://github.com/gruntwork-io/terragrunt/releases/download/v1.1.1/terragrunt_linux_arm64.tar.gz" +url_api = "https://api.github.com/repos/gruntwork-io/terragrunt/releases/assets/476786148" [tools.terragrunt."platforms.linux-arm64-musl"] -checksum = "sha256:e5b60ab05b5214db694e6bc215d8124fb626e277cdb56b86f6147ae110d510fe" -url = "https://github.com/gruntwork-io/terragrunt/releases/download/v1.0.3/terragrunt_linux_arm64.tar.gz" +checksum = "sha256:a374a7993ff3d99665a7e014007d3647ec7f0465c9d55c85e9f94c932e73cea2" +url = "https://github.com/gruntwork-io/terragrunt/releases/download/v1.1.1/terragrunt_linux_arm64.tar.gz" +url_api = "https://api.github.com/repos/gruntwork-io/terragrunt/releases/assets/476786148" [tools.terragrunt."platforms.linux-x64"] -checksum = "sha256:6d48049baf82e0bf9c804368dc85cbfeadc10955e33777e9e8de3e020b94b073" -url = "https://github.com/gruntwork-io/terragrunt/releases/download/v1.0.3/terragrunt_linux_amd64.tar.gz" +checksum = "sha256:ce90077ac31ef17a2ba10d11d45f36c6501997a8f4f79d703bb7daba37032f53" +url = "https://github.com/gruntwork-io/terragrunt/releases/download/v1.1.1/terragrunt_linux_amd64.tar.gz" +url_api = "https://api.github.com/repos/gruntwork-io/terragrunt/releases/assets/476785968" [tools.terragrunt."platforms.linux-x64-musl"] -checksum = "sha256:6d48049baf82e0bf9c804368dc85cbfeadc10955e33777e9e8de3e020b94b073" -url = "https://github.com/gruntwork-io/terragrunt/releases/download/v1.0.3/terragrunt_linux_amd64.tar.gz" +checksum = "sha256:ce90077ac31ef17a2ba10d11d45f36c6501997a8f4f79d703bb7daba37032f53" +url = "https://github.com/gruntwork-io/terragrunt/releases/download/v1.1.1/terragrunt_linux_amd64.tar.gz" +url_api = "https://api.github.com/repos/gruntwork-io/terragrunt/releases/assets/476785968" [tools.terragrunt."platforms.macos-arm64"] -checksum = "sha256:aacb5be2ca5475300cbce246dfbd8a45eb47510fbaa70fab8561c49ef5db03aa" -url = "https://github.com/gruntwork-io/terragrunt/releases/download/v1.0.3/terragrunt_darwin_arm64.tar.gz" +checksum = "sha256:9ec8f678b9ae6c81d5d9d77b94cbf6349ce639d5938694b4adc9dea73e416794" +url = "https://github.com/gruntwork-io/terragrunt/releases/download/v1.1.1/terragrunt_darwin_arm64.tar.gz" +url_api = "https://api.github.com/repos/gruntwork-io/terragrunt/releases/assets/476785628" [tools.terragrunt."platforms.macos-x64"] -checksum = "sha256:3133c2251e191aede8e3dd2a5b3aee2e91c5f08f88f117aee40eed9a24c8ef6b" -url = "https://github.com/gruntwork-io/terragrunt/releases/download/v1.0.3/terragrunt_darwin_amd64.tar.gz" +checksum = "sha256:73e768a69fa44a60f9d9174f54aaf179327e08706f633c9c79d5f5c9622c91c2" +url = "https://github.com/gruntwork-io/terragrunt/releases/download/v1.1.1/terragrunt_darwin_amd64.tar.gz" +url_api = "https://api.github.com/repos/gruntwork-io/terragrunt/releases/assets/476785520" [tools.terragrunt."platforms.windows-x64"] -checksum = "sha256:183b2745b4e04980a6bfa4450ff81956a12596ca22d70f7aaa793980f5b036db" -url = "https://github.com/gruntwork-io/terragrunt/releases/download/v1.0.3/terragrunt_windows_amd64.exe.tar.gz" +checksum = "sha256:dd50a324691e072a3ac879e9ec43d6310e2936c929fda658eb2811fefcc75115" +url = "https://github.com/gruntwork-io/terragrunt/releases/download/v1.1.1/terragrunt_windows_amd64.exe.tar.gz" +url_api = "https://api.github.com/repos/gruntwork-io/terragrunt/releases/assets/476786421" diff --git a/mise.toml b/mise.toml index 38e413aef5..0039dbac2d 100644 --- a/mise.toml +++ b/mise.toml @@ -1,4 +1,4 @@ -experimental_monorepo_root = true +monorepo_root = true [monorepo] config_roots = [ @@ -16,9 +16,10 @@ config_roots = [ [tools] node = "24.15.0" -pnpm = "11.6.0" -terragrunt = "1.0.3" -opentofu = "1.11.6" +pnpm = "11.20.0" +terragrunt = "1.1.1" +opentofu = "1.12.5" +"npm:@openapitools/openapi-generator-cli" = "2.40.1" "npm:oazapfts" = "7.5.0" "github:extism/cli" = "1.6.3" "github:webassembly/binaryen" = "version_124" @@ -35,7 +36,6 @@ macos-x64 = { asset_pattern = "jellyfin-ffmpeg_*_portable_mac64-gpl.tar.xz" } macos-arm64 = { asset_pattern = "jellyfin-ffmpeg_*_portable_macarm64-gpl.tar.xz" } [settings] -experimental = true pin = true lockfile = true @@ -62,6 +62,14 @@ run = [ [tasks.open-api-dart] dir = "open-api" +sources = [ + "immich-openapi-specs.json", + "openapitools.json", + "templates/**/*", + "patch/*", + "bin/generate-dart-sdk.sh", +] +outputs = ["../mobile/generated/openapi/"] run = "bash ./bin/generate-dart-sdk.sh" [tasks.open-api] diff --git a/mobile/.gitignore b/mobile/.gitignore index 04eb74fddd..c426d46ec3 100644 --- a/mobile/.gitignore +++ b/mobile/.gitignore @@ -31,6 +31,15 @@ .pub-cache/ .pub/ /build/ +lib/**/*.drift.dart +lib/**/*.freezed.dart +lib/routing/router.gr.dart +test/drift/main/generated/ + +# Pigeon related +/lib/platform/*.g.dart +/ios/**/*.g.swift +/android/**/*.g.kt # Web related lib/generated_plugin_registrant.dart diff --git a/mobile/analysis_options.yaml b/mobile/analysis_options.yaml index 7c49052fc2..065b3d56d8 100644 --- a/mobile/analysis_options.yaml +++ b/mobile/analysis_options.yaml @@ -26,40 +26,75 @@ linter: # producing the lint. rules: - # avoid_print: false # Uncomment to disable the `avoid_print` rule - # prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule + # Correctness + always_declare_return_types: true + avoid_type_to_string: true + avoid_unused_constructor_parameters: true + avoid_void_async: true + cancel_subscriptions: true + cast_nullable_to_non_nullable: true + close_sinks: true + collection_methods_unrelated_type: true + deprecated_consistency: true + discarded_futures: true + no_adjacent_strings_in_list: true + no_self_assignments: true + noop_primitive_operations: true + only_throw_errors: true + parameter_assignments: true + throw_in_finally: true + tighten_type_of_initializing_formals: true unawaited_futures: true - use_build_context_synchronously: false - require_trailing_commas: true + unnecessary_ignore: true + unnecessary_null_checks: true + unnecessary_statements: true unrelated_type_equality_checks: true + + # Performance + avoid_slow_async_io: true prefer_const_constructors: true - always_use_package_imports: true + prefer_const_declarations: true + prefer_const_literals_to_create_immutables: true + + # Flutter specific + avoid_unnecessary_containers: true + sized_box_for_whitespace: true + use_build_context_synchronously: true + use_colored_box: true + use_decorated_box: true + use_full_hex_values_for_flutter_colors: true + + # Style always_put_control_body_on_new_line: true + always_use_package_imports: true + avoid_multiple_declarations_per_line: true + avoid_print: true + combinators_ordering: true + directives_ordering: true + no_leading_underscores_for_local_identifiers: true + prefer_final_locals: true + require_trailing_commas: true + unnecessary_breaks: true + unnecessary_parenthesis: true + use_named_constants: true + use_super_parameters: true # Additional information about this file can be found at # https://dart.dev/guides/language/analysis-options analyzer: exclude: - - openapi/** + - generated/openapi/** - build/** - lib/generated_plugin_registrant.dart - lib/**/*.g.dart - lib/**/*.drift.dart - # TODO: Re-enable after upgrading custom_lint - # plugins: - # - custom_lint + # NOTE: We explicitly do not use riverpod_lint as there are analyzer version conflicts between + # our Flutter version and the required old riverpod_lint 2.x errors: unawaited_futures: warning always_put_control_body_on_new_line: warning -custom_lint: - rules: - - avoid_build_context_in_providers: false - - avoid_public_notifier_properties: false - - avoid_manual_providers_as_generated_provider_dependency: false - - unsupported_provider_value: false - dart_code_metrics: rules: - banned-usage: @@ -69,6 +104,18 @@ dart_code_metrics: exclude-paths: - 'lib/utils/debug_print.dart' severity: perf + - name: tr + description: 'Use context.t. or StaticTranslations.instance. instead of tr().' + - type: String + entries: + - name: tr + description: 'Use context.t. or StaticTranslations.instance. instead of String.tr().' + - name: plural + description: 'Use the generated plural accessor instead of String.plural().' + - type: Text + entries: + - name: tr + description: 'Use Text(context.t.) instead of Text().tr().' # All rules from "recommended" preset # Show potential errors # - avoid-cascade-after-if-null @@ -82,3 +129,17 @@ dart_code_metrics: - prefer-const-border-radius - prefer-declaring-const-constructor - prefer-switch-expression + + # Riverpod + - avoid-calling-notifier-members-inside-build + - avoid-notifier-constructors + - avoid-nullable-async-value-pattern + - avoid-public-notifier-properties + - avoid-ref-inside-state-dispose + - avoid-ref-read-inside-build + - avoid-ref-watch-outside-build + - avoid-unnecessary-consumer-widgets + - dispose-provided-instances + - prefer-immutable-provider-arguments + - use-ref-and-state-synchronously + - use-ref-read-synchronously diff --git a/mobile/android/app/CMakeLists.txt b/mobile/android/app/CMakeLists.txt index 133bde4fc0..9cad7b915a 100644 --- a/mobile/android/app/CMakeLists.txt +++ b/mobile/android/app/CMakeLists.txt @@ -7,6 +7,7 @@ project(native_buffer LANGUAGES C) add_library(native_buffer SHARED src/main/cpp/native_buffer.c + src/main/cpp/native_image.c ) target_link_libraries(native_buffer jnigraphics) diff --git a/mobile/android/app/build.gradle b/mobile/android/app/build.gradle index 1f22eeaf52..7e3d67fa81 100644 --- a/mobile/android/app/build.gradle +++ b/mobile/android/app/build.gradle @@ -89,13 +89,6 @@ flutter { } dependencies { - constraints { - implementation("androidx.glance:glance-appwidget") { - version { strictly libs.versions.glance.get() } - because 'home_widget requests 1.+ which can resolve to pre-releases incompatible with our compileSdk/AGP' - } - } - implementation libs.okhttp implementation libs.cronet.embedded implementation libs.media3.datasource.okhttp diff --git a/mobile/android/app/src/main/AndroidManifest.xml b/mobile/android/app/src/main/AndroidManifest.xml index 1b8d2a97fb..5f4de8284a 100644 --- a/mobile/android/app/src/main/AndroidManifest.xml +++ b/mobile/android/app/src/main/AndroidManifest.xml @@ -152,12 +152,6 @@ This is used by the Flutter tool to generate GeneratedPluginRegistrant.java --> - - - +#include +#include +#include + +// Cache-friendly block size for the tiled rotation (in pixels). 32x32 uint32 = 4KB, fits L1. +#define TILE 32 + +// EXIF orientation values (androidx.exifinterface.media.ExifInterface.ORIENTATION_*). +enum { + ORIENTATION_FLIP_HORIZONTAL = 2, + ORIENTATION_ROTATE_180 = 3, + ORIENTATION_FLIP_VERTICAL = 4, + ORIENTATION_TRANSPOSE = 5, + ORIENTATION_ROTATE_90 = 6, + ORIENTATION_TRANSVERSE = 7, + ORIENTATION_ROTATE_270 = 8, +}; + +// The orientations that swap width and height. Must stay in sync with affine_for's dim usage. +static int swaps_dims(int o) { + return o == ORIENTATION_ROTATE_90 || o == ORIENTATION_ROTATE_270 || + o == ORIENTATION_TRANSPOSE || o == ORIENTATION_TRANSVERSE; +} + +// A source pixel (sx, sy) maps to destination index base + sx*stepX + sy*stepY, where dw is the +// destination width. This affine form covers all 8 EXIF orientations and matches the pixel layout +// of Bitmap.createBitmap(src, matrixForExifOrientation(o)). int64_t so it stays correct on +// armeabi-v7a (32-bit long) regardless of how large MAX_RAW_DECODE_PIXELS grows. +static void affine_for(int o, int sw, int sh, int dw, int64_t *base, int64_t *stepX, int64_t *stepY) { + switch (o) { + case ORIENTATION_ROTATE_90: *base = sh - 1; *stepX = dw; *stepY = -1; break; + case ORIENTATION_ROTATE_270: *base = (int64_t) (sw - 1) * dw; *stepX = -dw; *stepY = 1; break; + case ORIENTATION_ROTATE_180: *base = (int64_t) (sh - 1) * dw + (sw - 1); *stepX = -1; *stepY = -dw; break; + case ORIENTATION_FLIP_HORIZONTAL: *base = sw - 1; *stepX = -1; *stepY = dw; break; + case ORIENTATION_FLIP_VERTICAL: *base = (int64_t) (sh - 1) * dw; *stepX = 1; *stepY = -dw; break; + case ORIENTATION_TRANSPOSE: *base = 0; *stepX = dw; *stepY = 1; break; + case ORIENTATION_TRANSVERSE: *base = (int64_t) (sw - 1) * dw + (sh - 1); *stepX = -dw; *stepY = -1; break; + default: *base = 0; *stepX = 1; *stepY = dw; break; + } +} + +// Copy each source pixel (whole uint32, so channel order/premult is irrelevant) to its rotated +// destination, walking TILE x TILE blocks so the scattered writes of a 90/270 transpose stay +// cache-resident. dst is densely packed (rowBytes == dw*4, no padding), which the affine math relies on. +static void rotate_tiled(const uint8_t *src, int srcStride, uint32_t *dst, + int sw, int sh, int64_t base, int64_t stepX, int64_t stepY) { + for (int ty = 0; ty < sh; ty += TILE) { + int yEnd = ty + TILE < sh ? ty + TILE : sh; + for (int tx = 0; tx < sw; tx += TILE) { + int xEnd = tx + TILE < sw ? tx + TILE : sw; + for (int sy = ty; sy < yEnd; sy++) { + const uint32_t *srcRow = (const uint32_t *) (src + (size_t) sy * srcStride); + int64_t idx = base + (int64_t) sy * stepY + (int64_t) tx * stepX; + for (int sx = tx; sx < xEnd; sx++) { + dst[idx] = srcRow[sx]; + idx += stepX; + } + } + } + } +} + +// Rotates an RGBA_8888 bitmap to the given EXIF orientation into a freshly malloc'd buffer (free it +// via NativeBuffer.free). Fills outInfo with {width, height, rowBytes} and returns the buffer +// address, or 0 if the bitmap can't be handled (e.g. a non-8888 format) so the caller can fall back. +JNIEXPORT jlong JNICALL +Java_app_alextran_immich_NativeImage_rotate( + JNIEnv *env, jclass clazz, jobject bitmap, jint orientation, jintArray outInfo) { + AndroidBitmapInfo info; + if (AndroidBitmap_getInfo(env, bitmap, &info) != ANDROID_BITMAP_RESULT_SUCCESS) { + return 0; + } + if (info.format != ANDROID_BITMAP_FORMAT_RGBA_8888) { + return 0; + } + + int sw = (int) info.width; + int sh = (int) info.height; + int dw = swaps_dims(orientation) ? sh : sw; + int dh = swaps_dims(orientation) ? sw : sh; + + uint32_t *dst = (uint32_t *) malloc((size_t) dw * dh * 4); + if (dst == NULL) { + return 0; + } + + void *srcPixels = NULL; + if (AndroidBitmap_lockPixels(env, bitmap, &srcPixels) != ANDROID_BITMAP_RESULT_SUCCESS) { + free(dst); + return 0; + } + + int64_t base, stepX, stepY; + affine_for(orientation, sw, sh, dw, &base, &stepX, &stepY); + rotate_tiled((const uint8_t *) srcPixels, (int) info.stride, dst, sw, sh, base, stepX, stepY); + + AndroidBitmap_unlockPixels(env, bitmap); + + jint dims[3] = {dw, dh, dw * 4}; + (*env)->SetIntArrayRegion(env, outInfo, 0, 3, dims); + // Keep ownership in C until the buffer is safely handed back: if outInfo was somehow too small, + // SetIntArrayRegion left a pending exception and Kotlin will never receive (or free) dst. + if ((*env)->ExceptionCheck(env)) { + free(dst); + return 0; + } + return (jlong) dst; +} + +// Convert an RGBA_1010102 buffer to densely-packed RGBA_8888, matching Skia's +// Bitmap.copy(ARGB_8888) byte-for-byte so it's a drop-in for the intermediate 8888 bitmap. +// Each source pixel is a native (little-endian on every Android ABI) u32 with R in bits 0-9, +// G in 10-19, B in 20-29, A in 30-31 (standard RGB10_A2). Each 10-bit channel maps to 8-bit via +// round(v*255/1023). The 2-bit alpha maps to a*85. Both are kept as plain arithmetic as the whole +// loop auto-vectorizes to NEON and measures faster than a LUT on-device. Output is R,G,B,A bytes +// per pixel, i.e. Android ARGB_8888 memory == Dart PixelFormat.rgba8888. +static void convert_1010102(const uint8_t *src, int srcStride, uint32_t *dst, int w, int h) { + for (int y = 0; y < h; y++) { + const uint32_t *srcRow = (const uint32_t *) (src + (size_t) y * srcStride); + uint32_t *dstRow = dst + (size_t) y * w; + for (int x = 0; x < w; x++) { + uint32_t px = srcRow[x]; + uint32_t r = ((px & 0x3FF) * 16336u + 32768u) >> 16; + uint32_t g = (((px >> 10) & 0x3FF) * 16336u + 32768u) >> 16; + uint32_t b = (((px >> 20) & 0x3FF) * 16336u + 32768u) >> 16; + uint32_t a = ((px >> 30) & 0x3) * 85u; + dstRow[x] = r | (g << 8) | (b << 16) | (a << 24); + } + } +} + +// Converts an RGBA_1010102 bitmap (what a 10-bit HEIC/AVIF decodes to on API 33+) into a freshly +// malloc'd RGBA_8888 buffer. Fills outInfo with {width, height, rowBytes} and returns the buffer +// address, or 0 (so the caller falls back to a Skia copy) if the bitmap isn't 1010102 or can't be +// locked. Same ownership contract as rotate: free the returned buffer via NativeBuffer.free. +JNIEXPORT jlong JNICALL +Java_app_alextran_immich_NativeImage_convert1010102( + JNIEnv *env, jclass clazz, jobject bitmap, jintArray outInfo) { + AndroidBitmapInfo info; + if (AndroidBitmap_getInfo(env, bitmap, &info) != ANDROID_BITMAP_RESULT_SUCCESS) { + return 0; + } + if (info.format != ANDROID_BITMAP_FORMAT_RGBA_1010102) { + return 0; + } + + int w = (int) info.width; + int h = (int) info.height; + + uint32_t *dst = (uint32_t *) malloc((size_t) w * h * 4); + if (dst == NULL) { + return 0; + } + + void *srcPixels = NULL; + if (AndroidBitmap_lockPixels(env, bitmap, &srcPixels) != ANDROID_BITMAP_RESULT_SUCCESS) { + free(dst); + return 0; + } + + convert_1010102((const uint8_t *) srcPixels, (int) info.stride, dst, w, h); + + AndroidBitmap_unlockPixels(env, bitmap); + + jint dims[3] = {w, h, w * 4}; + (*env)->SetIntArrayRegion(env, outInfo, 0, 3, dims); + if ((*env)->ExceptionCheck(env)) { + free(dst); + return 0; + } + return (jlong) dst; +} diff --git a/mobile/android/app/src/main/kotlin/app/alextran/immich/ImmichApp.kt b/mobile/android/app/src/main/kotlin/app/alextran/immich/ImmichApp.kt index 37a325e896..65249ec901 100644 --- a/mobile/android/app/src/main/kotlin/app/alextran/immich/ImmichApp.kt +++ b/mobile/android/app/src/main/kotlin/app/alextran/immich/ImmichApp.kt @@ -3,17 +3,12 @@ package app.alextran.immich import android.app.Application import android.os.Handler import android.os.Looper -import androidx.work.Configuration -import androidx.work.WorkManager import app.alextran.immich.background.BackgroundEngineLock import app.alextran.immich.background.BackgroundWorkerApiImpl class ImmichApp : Application() { override fun onCreate() { super.onCreate() - val config = Configuration.Builder().build() - WorkManager.initialize(this, config) - // always start BackupWorker after WorkManager init; this fixes the following bug: // After the process is killed (by user or system), the first trigger (taking a new picture) is lost. // Thus, the BackupWorker is not started. If the system kills the process after each initialization // (because of low memory etc.), the backup is never performed. @@ -23,6 +18,6 @@ class ImmichApp : Application() { // as the previous start might have been killed without unlocking. if (BackgroundEngineLock.connectEngines > 0) return@postDelayed BackgroundWorkerApiImpl.enqueueBackgroundWorker(this) - }, 5000) + }, 15000) } } diff --git a/mobile/android/app/src/main/kotlin/app/alextran/immich/NativeImage.kt b/mobile/android/app/src/main/kotlin/app/alextran/immich/NativeImage.kt new file mode 100644 index 0000000000..68feaa2d14 --- /dev/null +++ b/mobile/android/app/src/main/kotlin/app/alextran/immich/NativeImage.kt @@ -0,0 +1,29 @@ +package app.alextran.immich + +import android.graphics.Bitmap + +object NativeImage { + init { + // rotate() is compiled into the native_buffer shared lib (which already links jnigraphics). + System.loadLibrary("native_buffer") + } + + /** + * Rotates an RGBA_8888 [bitmap] to the given EXIF [orientation], writing the result into a freshly + * malloc'd native buffer. Returns the buffer address (free it with [NativeBuffer.free]) and fills + * [outInfo] with {width, height, rowBytes}. Returns 0 when the bitmap can't be handled (e.g. a + * non-8888 config) so the caller can fall back. + */ + @JvmStatic + external fun rotate(bitmap: Bitmap, orientation: Int, outInfo: IntArray): Long + + /** + * Converts an RGBA_1010102 [bitmap] (what a 10-bit HEIC/AVIF decodes to on API 33+) to RGBA_8888, + * writing the result into a freshly malloc'd native buffer in one pass, with no intermediate + * ARGB_8888 bitmap. Returns the buffer address (free it with [NativeBuffer.free]) and fills + * [outInfo] with {width, height, rowBytes}. Returns 0 when the bitmap isn't RGBA_1010102 so the + * caller can fall back to a Skia copy. + */ + @JvmStatic + external fun convert1010102(bitmap: Bitmap, outInfo: IntArray): Long +} diff --git a/mobile/android/app/src/main/kotlin/app/alextran/immich/background/BackgroundWorker.g.kt b/mobile/android/app/src/main/kotlin/app/alextran/immich/background/BackgroundWorker.g.kt deleted file mode 100644 index 3fcaed34bc..0000000000 --- a/mobile/android/app/src/main/kotlin/app/alextran/immich/background/BackgroundWorker.g.kt +++ /dev/null @@ -1,453 +0,0 @@ -// Autogenerated from Pigeon (v26.3.4), do not edit directly. -// See also: https://pub.dev/packages/pigeon -@file:Suppress("UNCHECKED_CAST", "ArrayInDataClass") - -package app.alextran.immich.background - -import android.util.Log -import io.flutter.plugin.common.BasicMessageChannel -import io.flutter.plugin.common.BinaryMessenger -import io.flutter.plugin.common.EventChannel -import io.flutter.plugin.common.MessageCodec -import io.flutter.plugin.common.StandardMethodCodec -import io.flutter.plugin.common.StandardMessageCodec -import java.io.ByteArrayOutputStream -import java.nio.ByteBuffer -private object BackgroundWorkerPigeonUtils { - - fun createConnectionError(channelName: String): FlutterError { - return FlutterError("channel-error", "Unable to establish connection on channel: '$channelName'.", "") } - - fun wrapResult(result: Any?): List { - return listOf(result) - } - - fun wrapError(exception: Throwable): List { - return if (exception is FlutterError) { - listOf( - exception.code, - exception.message, - exception.details - ) - } else { - listOf( - exception.javaClass.simpleName, - exception.toString(), - "Cause: " + exception.cause + ", Stacktrace: " + Log.getStackTraceString(exception) - ) - } - } - fun doubleEquals(a: Double, b: Double): Boolean { - // Normalize -0.0 to 0.0 and handle NaN equality. - return (if (a == 0.0) 0.0 else a) == (if (b == 0.0) 0.0 else b) || (a.isNaN() && b.isNaN()) - } - - fun floatEquals(a: Float, b: Float): Boolean { - // Normalize -0.0 to 0.0 and handle NaN equality. - return (if (a == 0.0f) 0.0f else a) == (if (b == 0.0f) 0.0f else b) || (a.isNaN() && b.isNaN()) - } - - fun doubleHash(d: Double): Int { - // Normalize -0.0 to 0.0 and handle NaN to ensure consistent hash codes. - val normalized = if (d == 0.0) 0.0 else d - val bits = java.lang.Double.doubleToLongBits(normalized) - return (bits xor (bits ushr 32)).toInt() - } - - fun floatHash(f: Float): Int { - // Normalize -0.0 to 0.0 and handle NaN to ensure consistent hash codes. - val normalized = if (f == 0.0f) 0.0f else f - return java.lang.Float.floatToIntBits(normalized) - } - - fun deepEquals(a: Any?, b: Any?): Boolean { - if (a === b) { - return true - } - if (a == null || b == null) { - return false - } - if (a is ByteArray && b is ByteArray) { - return a.contentEquals(b) - } - if (a is IntArray && b is IntArray) { - return a.contentEquals(b) - } - if (a is LongArray && b is LongArray) { - return a.contentEquals(b) - } - if (a is DoubleArray && b is DoubleArray) { - if (a.size != b.size) return false - for (i in a.indices) { - if (!doubleEquals(a[i], b[i])) return false - } - return true - } - if (a is FloatArray && b is FloatArray) { - if (a.size != b.size) return false - for (i in a.indices) { - if (!floatEquals(a[i], b[i])) return false - } - return true - } - if (a is Array<*> && b is Array<*>) { - if (a.size != b.size) return false - for (i in a.indices) { - if (!deepEquals(a[i], b[i])) return false - } - return true - } - if (a is List<*> && b is List<*>) { - if (a.size != b.size) return false - val iterA = a.iterator() - val iterB = b.iterator() - while (iterA.hasNext() && iterB.hasNext()) { - if (!deepEquals(iterA.next(), iterB.next())) return false - } - return true - } - if (a is Map<*, *> && b is Map<*, *>) { - if (a.size != b.size) return false - for (entry in a) { - val key = entry.key - var found = false - for (bEntry in b) { - if (deepEquals(key, bEntry.key)) { - if (deepEquals(entry.value, bEntry.value)) { - found = true - break - } else { - return false - } - } - } - if (!found) return false - } - return true - } - if (a is Double && b is Double) { - return doubleEquals(a, b) - } - if (a is Float && b is Float) { - return floatEquals(a, b) - } - return a == b - } - - fun deepHash(value: Any?): Int { - return when (value) { - null -> 0 - is ByteArray -> value.contentHashCode() - is IntArray -> value.contentHashCode() - is LongArray -> value.contentHashCode() - is DoubleArray -> { - var result = 1 - for (item in value) { - result = 31 * result + doubleHash(item) - } - result - } - is FloatArray -> { - var result = 1 - for (item in value) { - result = 31 * result + floatHash(item) - } - result - } - is Array<*> -> { - var result = 1 - for (item in value) { - result = 31 * result + deepHash(item) - } - result - } - is List<*> -> { - var result = 1 - for (item in value) { - result = 31 * result + deepHash(item) - } - result - } - is Map<*, *> -> { - var result = 0 - for (entry in value) { - result += ((deepHash(entry.key) * 31) xor deepHash(entry.value)) - } - result - } - is Double -> doubleHash(value) - is Float -> floatHash(value) - else -> value.hashCode() - } - } - -} - -/** - * Error class for passing custom error details to Flutter via a thrown PlatformException. - * @property code The error code. - * @property message The error message. - * @property details The error details. Must be a datatype supported by the api codec. - */ -class FlutterError ( - val code: String, - override val message: String? = null, - val details: Any? = null -) : RuntimeException() - -/** Generated class from Pigeon that represents data sent in messages. */ -data class BackgroundWorkerSettings ( - val requiresCharging: Boolean, - val minimumDelaySeconds: Long -) - { - companion object { - fun fromList(pigeonVar_list: List): BackgroundWorkerSettings { - val requiresCharging = pigeonVar_list[0] as Boolean - val minimumDelaySeconds = pigeonVar_list[1] as Long - return BackgroundWorkerSettings(requiresCharging, minimumDelaySeconds) - } - } - fun toList(): List { - return listOf( - requiresCharging, - minimumDelaySeconds, - ) - } - override fun equals(other: Any?): Boolean { - if (other == null || other.javaClass != javaClass) { - return false - } - if (this === other) { - return true - } - val other = other as BackgroundWorkerSettings - return BackgroundWorkerPigeonUtils.deepEquals(this.requiresCharging, other.requiresCharging) && BackgroundWorkerPigeonUtils.deepEquals(this.minimumDelaySeconds, other.minimumDelaySeconds) - } - - override fun hashCode(): Int { - var result = javaClass.hashCode() - result = 31 * result + BackgroundWorkerPigeonUtils.deepHash(this.requiresCharging) - result = 31 * result + BackgroundWorkerPigeonUtils.deepHash(this.minimumDelaySeconds) - return result - } -} -private open class BackgroundWorkerPigeonCodec : StandardMessageCodec() { - override fun readValueOfType(type: Byte, buffer: ByteBuffer): Any? { - return when (type) { - 129.toByte() -> { - return (readValue(buffer) as? List)?.let { - BackgroundWorkerSettings.fromList(it) - } - } - else -> super.readValueOfType(type, buffer) - } - } - override fun writeValue(stream: ByteArrayOutputStream, value: Any?) { - when (value) { - is BackgroundWorkerSettings -> { - stream.write(129) - writeValue(stream, value.toList()) - } - else -> super.writeValue(stream, value) - } - } -} - -/** Generated interface from Pigeon that represents a handler of messages from Flutter. */ -interface BackgroundWorkerFgHostApi { - fun enable() - fun saveNotificationMessage(title: String, body: String) - fun configure(settings: BackgroundWorkerSettings) - fun disable() - - companion object { - /** The codec used by BackgroundWorkerFgHostApi. */ - val codec: MessageCodec by lazy { - BackgroundWorkerPigeonCodec() - } - /** Sets up an instance of `BackgroundWorkerFgHostApi` to handle messages through the `binaryMessenger`. */ - @JvmOverloads - fun setUp(binaryMessenger: BinaryMessenger, api: BackgroundWorkerFgHostApi?, messageChannelSuffix: String = "") { - val separatedMessageChannelSuffix = if (messageChannelSuffix.isNotEmpty()) ".$messageChannelSuffix" else "" - run { - val channel = BasicMessageChannel(binaryMessenger, "dev.flutter.pigeon.immich_mobile.BackgroundWorkerFgHostApi.enable$separatedMessageChannelSuffix", codec) - if (api != null) { - channel.setMessageHandler { _, reply -> - val wrapped: List = try { - api.enable() - listOf(null) - } catch (exception: Throwable) { - BackgroundWorkerPigeonUtils.wrapError(exception) - } - reply.reply(wrapped) - } - } else { - channel.setMessageHandler(null) - } - } - run { - val channel = BasicMessageChannel(binaryMessenger, "dev.flutter.pigeon.immich_mobile.BackgroundWorkerFgHostApi.saveNotificationMessage$separatedMessageChannelSuffix", codec) - if (api != null) { - channel.setMessageHandler { message, reply -> - val args = message as List - val titleArg = args[0] as String - val bodyArg = args[1] as String - val wrapped: List = try { - api.saveNotificationMessage(titleArg, bodyArg) - listOf(null) - } catch (exception: Throwable) { - BackgroundWorkerPigeonUtils.wrapError(exception) - } - reply.reply(wrapped) - } - } else { - channel.setMessageHandler(null) - } - } - run { - val channel = BasicMessageChannel(binaryMessenger, "dev.flutter.pigeon.immich_mobile.BackgroundWorkerFgHostApi.configure$separatedMessageChannelSuffix", codec) - if (api != null) { - channel.setMessageHandler { message, reply -> - val args = message as List - val settingsArg = args[0] as BackgroundWorkerSettings - val wrapped: List = try { - api.configure(settingsArg) - listOf(null) - } catch (exception: Throwable) { - BackgroundWorkerPigeonUtils.wrapError(exception) - } - reply.reply(wrapped) - } - } else { - channel.setMessageHandler(null) - } - } - run { - val channel = BasicMessageChannel(binaryMessenger, "dev.flutter.pigeon.immich_mobile.BackgroundWorkerFgHostApi.disable$separatedMessageChannelSuffix", codec) - if (api != null) { - channel.setMessageHandler { _, reply -> - val wrapped: List = try { - api.disable() - listOf(null) - } catch (exception: Throwable) { - BackgroundWorkerPigeonUtils.wrapError(exception) - } - reply.reply(wrapped) - } - } else { - channel.setMessageHandler(null) - } - } - } - } -} -/** Generated interface from Pigeon that represents a handler of messages from Flutter. */ -interface BackgroundWorkerBgHostApi { - fun onInitialized() - fun close() - - companion object { - /** The codec used by BackgroundWorkerBgHostApi. */ - val codec: MessageCodec by lazy { - BackgroundWorkerPigeonCodec() - } - /** Sets up an instance of `BackgroundWorkerBgHostApi` to handle messages through the `binaryMessenger`. */ - @JvmOverloads - fun setUp(binaryMessenger: BinaryMessenger, api: BackgroundWorkerBgHostApi?, messageChannelSuffix: String = "") { - val separatedMessageChannelSuffix = if (messageChannelSuffix.isNotEmpty()) ".$messageChannelSuffix" else "" - run { - val channel = BasicMessageChannel(binaryMessenger, "dev.flutter.pigeon.immich_mobile.BackgroundWorkerBgHostApi.onInitialized$separatedMessageChannelSuffix", codec) - if (api != null) { - channel.setMessageHandler { _, reply -> - val wrapped: List = try { - api.onInitialized() - listOf(null) - } catch (exception: Throwable) { - BackgroundWorkerPigeonUtils.wrapError(exception) - } - reply.reply(wrapped) - } - } else { - channel.setMessageHandler(null) - } - } - run { - val channel = BasicMessageChannel(binaryMessenger, "dev.flutter.pigeon.immich_mobile.BackgroundWorkerBgHostApi.close$separatedMessageChannelSuffix", codec) - if (api != null) { - channel.setMessageHandler { _, reply -> - val wrapped: List = try { - api.close() - listOf(null) - } catch (exception: Throwable) { - BackgroundWorkerPigeonUtils.wrapError(exception) - } - reply.reply(wrapped) - } - } else { - channel.setMessageHandler(null) - } - } - } - } -} -/** Generated class from Pigeon that represents Flutter messages that can be called from Kotlin. */ -class BackgroundWorkerFlutterApi(private val binaryMessenger: BinaryMessenger, private val messageChannelSuffix: String = "") { - companion object { - /** The codec used by BackgroundWorkerFlutterApi. */ - val codec: MessageCodec by lazy { - BackgroundWorkerPigeonCodec() - } - } - fun onIosUpload(isRefreshArg: Boolean, maxSecondsArg: Long?, callback: (Result) -> Unit) -{ - val separatedMessageChannelSuffix = if (messageChannelSuffix.isNotEmpty()) ".$messageChannelSuffix" else "" - val channelName = "dev.flutter.pigeon.immich_mobile.BackgroundWorkerFlutterApi.onIosUpload$separatedMessageChannelSuffix" - val channel = BasicMessageChannel(binaryMessenger, channelName, codec) - channel.send(listOf(isRefreshArg, maxSecondsArg)) { - if (it is List<*>) { - if (it.size > 1) { - callback(Result.failure(FlutterError(it[0] as String, it[1] as String, it[2] as String?))) - } else { - callback(Result.success(Unit)) - } - } else { - callback(Result.failure(BackgroundWorkerPigeonUtils.createConnectionError(channelName))) - } - } - } - fun onAndroidUpload(maxMinutesArg: Long?, callback: (Result) -> Unit) -{ - val separatedMessageChannelSuffix = if (messageChannelSuffix.isNotEmpty()) ".$messageChannelSuffix" else "" - val channelName = "dev.flutter.pigeon.immich_mobile.BackgroundWorkerFlutterApi.onAndroidUpload$separatedMessageChannelSuffix" - val channel = BasicMessageChannel(binaryMessenger, channelName, codec) - channel.send(listOf(maxMinutesArg)) { - if (it is List<*>) { - if (it.size > 1) { - callback(Result.failure(FlutterError(it[0] as String, it[1] as String, it[2] as String?))) - } else { - callback(Result.success(Unit)) - } - } else { - callback(Result.failure(BackgroundWorkerPigeonUtils.createConnectionError(channelName))) - } - } - } - fun cancel(callback: (Result) -> Unit) -{ - val separatedMessageChannelSuffix = if (messageChannelSuffix.isNotEmpty()) ".$messageChannelSuffix" else "" - val channelName = "dev.flutter.pigeon.immich_mobile.BackgroundWorkerFlutterApi.cancel$separatedMessageChannelSuffix" - val channel = BasicMessageChannel(binaryMessenger, channelName, codec) - channel.send(null) { - if (it is List<*>) { - if (it.size > 1) { - callback(Result.failure(FlutterError(it[0] as String, it[1] as String, it[2] as String?))) - } else { - callback(Result.success(Unit)) - } - } else { - callback(Result.failure(BackgroundWorkerPigeonUtils.createConnectionError(channelName))) - } - } - } -} diff --git a/mobile/android/app/src/main/kotlin/app/alextran/immich/background/BackgroundWorker.kt b/mobile/android/app/src/main/kotlin/app/alextran/immich/background/BackgroundWorker.kt index ce2de60c38..60387f434a 100644 --- a/mobile/android/app/src/main/kotlin/app/alextran/immich/background/BackgroundWorker.kt +++ b/mobile/android/app/src/main/kotlin/app/alextran/immich/background/BackgroundWorker.kt @@ -15,6 +15,7 @@ import androidx.work.ListenableWorker import androidx.work.WorkerParameters import app.alextran.immich.MainActivity import app.alextran.immich.R +import com.google.common.util.concurrent.Futures import com.google.common.util.concurrent.ListenableFuture import com.google.common.util.concurrent.SettableFuture import io.flutter.FlutterInjector @@ -61,6 +62,11 @@ class BackgroundWorker(context: Context, params: WorkerParameters) : } override fun startWork(): ListenableFuture { + if (BackgroundWorkerPreferences(ctx).isLocked() && BackgroundEngineLock.connectEngines > 0) { + Log.i(TAG, "Foreground engine active, skipping background worker") + return Futures.immediateFuture(Result.success()) + } + Log.i(TAG, "Starting background upload worker") if (!loader.initialized()) { @@ -77,6 +83,10 @@ class BackgroundWorker(context: Context, params: WorkerParameters) : showNotification(notificationConfig.first, notificationConfig.second) loader.ensureInitializationCompleteAsync(ctx, null, Handler(Looper.getMainLooper())) { + if (isStopped || isComplete) { + return@ensureInitializationCompleteAsync + } + engine = FlutterEngine(ctx) FlutterEngineCache.getInstance().put(BackgroundWorkerApiImpl.ENGINE_CACHE_KEY, engine!!) @@ -143,11 +153,17 @@ class BackgroundWorker(context: Context, params: WorkerParameters) : return } + val api = flutterApi + if (api == null) { + Handler(Looper.getMainLooper()).postAtFrontOfQueue { + complete(Result.failure()) + } + return + } + Handler(Looper.getMainLooper()).postAtFrontOfQueue { - if (flutterApi != null) { - flutterApi?.cancel { - complete(Result.failure()) - } + api.cancel { + complete(Result.failure()) } } diff --git a/mobile/android/app/src/main/kotlin/app/alextran/immich/background/BackgroundWorkerLock.g.kt b/mobile/android/app/src/main/kotlin/app/alextran/immich/background/BackgroundWorkerLock.g.kt deleted file mode 100644 index 4e2e382c2b..0000000000 --- a/mobile/android/app/src/main/kotlin/app/alextran/immich/background/BackgroundWorkerLock.g.kt +++ /dev/null @@ -1,95 +0,0 @@ -// Autogenerated from Pigeon (v26.3.4), do not edit directly. -// See also: https://pub.dev/packages/pigeon -@file:Suppress("UNCHECKED_CAST", "ArrayInDataClass") - -package app.alextran.immich.background - -import android.util.Log -import io.flutter.plugin.common.BasicMessageChannel -import io.flutter.plugin.common.BinaryMessenger -import io.flutter.plugin.common.EventChannel -import io.flutter.plugin.common.MessageCodec -import io.flutter.plugin.common.StandardMethodCodec -import io.flutter.plugin.common.StandardMessageCodec -import java.io.ByteArrayOutputStream -import java.nio.ByteBuffer -private object BackgroundWorkerLockPigeonUtils { - - fun wrapResult(result: Any?): List { - return listOf(result) - } - - fun wrapError(exception: Throwable): List { - return if (exception is FlutterError) { - listOf( - exception.code, - exception.message, - exception.details - ) - } else { - listOf( - exception.javaClass.simpleName, - exception.toString(), - "Cause: " + exception.cause + ", Stacktrace: " + Log.getStackTraceString(exception) - ) - } - } -} -private open class BackgroundWorkerLockPigeonCodec : StandardMessageCodec() { - override fun readValueOfType(type: Byte, buffer: ByteBuffer): Any? { - return super.readValueOfType(type, buffer) - } - override fun writeValue(stream: ByteArrayOutputStream, value: Any?) { - super.writeValue(stream, value) - } -} - -/** Generated interface from Pigeon that represents a handler of messages from Flutter. */ -interface BackgroundWorkerLockApi { - fun lock() - fun unlock() - - companion object { - /** The codec used by BackgroundWorkerLockApi. */ - val codec: MessageCodec by lazy { - BackgroundWorkerLockPigeonCodec() - } - /** Sets up an instance of `BackgroundWorkerLockApi` to handle messages through the `binaryMessenger`. */ - @JvmOverloads - fun setUp(binaryMessenger: BinaryMessenger, api: BackgroundWorkerLockApi?, messageChannelSuffix: String = "") { - val separatedMessageChannelSuffix = if (messageChannelSuffix.isNotEmpty()) ".$messageChannelSuffix" else "" - run { - val channel = BasicMessageChannel(binaryMessenger, "dev.flutter.pigeon.immich_mobile.BackgroundWorkerLockApi.lock$separatedMessageChannelSuffix", codec) - if (api != null) { - channel.setMessageHandler { _, reply -> - val wrapped: List = try { - api.lock() - listOf(null) - } catch (exception: Throwable) { - BackgroundWorkerLockPigeonUtils.wrapError(exception) - } - reply.reply(wrapped) - } - } else { - channel.setMessageHandler(null) - } - } - run { - val channel = BasicMessageChannel(binaryMessenger, "dev.flutter.pigeon.immich_mobile.BackgroundWorkerLockApi.unlock$separatedMessageChannelSuffix", codec) - if (api != null) { - channel.setMessageHandler { _, reply -> - val wrapped: List = try { - api.unlock() - listOf(null) - } catch (exception: Throwable) { - BackgroundWorkerLockPigeonUtils.wrapError(exception) - } - reply.reply(wrapped) - } - } else { - channel.setMessageHandler(null) - } - } - } - } -} diff --git a/mobile/android/app/src/main/kotlin/app/alextran/immich/connectivity/Connectivity.g.kt b/mobile/android/app/src/main/kotlin/app/alextran/immich/connectivity/Connectivity.g.kt deleted file mode 100644 index aec1f06164..0000000000 --- a/mobile/android/app/src/main/kotlin/app/alextran/immich/connectivity/Connectivity.g.kt +++ /dev/null @@ -1,116 +0,0 @@ -// Autogenerated from Pigeon (v26.3.4), do not edit directly. -// See also: https://pub.dev/packages/pigeon -@file:Suppress("UNCHECKED_CAST", "ArrayInDataClass") - -package app.alextran.immich.connectivity - -import android.util.Log -import io.flutter.plugin.common.BasicMessageChannel -import io.flutter.plugin.common.BinaryMessenger -import io.flutter.plugin.common.EventChannel -import io.flutter.plugin.common.MessageCodec -import io.flutter.plugin.common.StandardMethodCodec -import io.flutter.plugin.common.StandardMessageCodec -import java.io.ByteArrayOutputStream -import java.nio.ByteBuffer -private object ConnectivityPigeonUtils { - - fun wrapResult(result: Any?): List { - return listOf(result) - } - - fun wrapError(exception: Throwable): List { - return if (exception is FlutterError) { - listOf( - exception.code, - exception.message, - exception.details - ) - } else { - listOf( - exception.javaClass.simpleName, - exception.toString(), - "Cause: " + exception.cause + ", Stacktrace: " + Log.getStackTraceString(exception) - ) - } - } -} - -/** - * Error class for passing custom error details to Flutter via a thrown PlatformException. - * @property code The error code. - * @property message The error message. - * @property details The error details. Must be a datatype supported by the api codec. - */ -class FlutterError ( - val code: String, - override val message: String? = null, - val details: Any? = null -) : RuntimeException() - -enum class NetworkCapability(val raw: Int) { - CELLULAR(0), - WIFI(1), - VPN(2), - UNMETERED(3); - - companion object { - fun ofRaw(raw: Int): NetworkCapability? { - return values().firstOrNull { it.raw == raw } - } - } -} -private open class ConnectivityPigeonCodec : StandardMessageCodec() { - override fun readValueOfType(type: Byte, buffer: ByteBuffer): Any? { - return when (type) { - 129.toByte() -> { - return (readValue(buffer) as Long?)?.let { - NetworkCapability.ofRaw(it.toInt()) - } - } - else -> super.readValueOfType(type, buffer) - } - } - override fun writeValue(stream: ByteArrayOutputStream, value: Any?) { - when (value) { - is NetworkCapability -> { - stream.write(129) - writeValue(stream, value.raw.toLong()) - } - else -> super.writeValue(stream, value) - } - } -} - -/** Generated interface from Pigeon that represents a handler of messages from Flutter. */ -interface ConnectivityApi { - fun getCapabilities(): List - - companion object { - /** The codec used by ConnectivityApi. */ - val codec: MessageCodec by lazy { - ConnectivityPigeonCodec() - } - /** Sets up an instance of `ConnectivityApi` to handle messages through the `binaryMessenger`. */ - @JvmOverloads - fun setUp(binaryMessenger: BinaryMessenger, api: ConnectivityApi?, messageChannelSuffix: String = "") { - val separatedMessageChannelSuffix = if (messageChannelSuffix.isNotEmpty()) ".$messageChannelSuffix" else "" - val taskQueue = binaryMessenger.makeBackgroundTaskQueue() - run { - val channel = BasicMessageChannel(binaryMessenger, "dev.flutter.pigeon.immich_mobile.ConnectivityApi.getCapabilities$separatedMessageChannelSuffix", codec, taskQueue) - if (api != null) { - channel.setMessageHandler { _, reply -> - val wrapped: List = try { - listOf(api.getCapabilities()) - } catch (exception: Throwable) { - ConnectivityPigeonUtils.wrapError(exception) - } - reply.reply(wrapped) - } - } else { - channel.setMessageHandler(null) - } - } - } - } -} diff --git a/mobile/android/app/src/main/kotlin/app/alextran/immich/core/Network.g.kt b/mobile/android/app/src/main/kotlin/app/alextran/immich/core/Network.g.kt deleted file mode 100644 index c380a0a6a5..0000000000 --- a/mobile/android/app/src/main/kotlin/app/alextran/immich/core/Network.g.kt +++ /dev/null @@ -1,451 +0,0 @@ -// Autogenerated from Pigeon (v26.3.4), do not edit directly. -// See also: https://pub.dev/packages/pigeon -@file:Suppress("UNCHECKED_CAST", "ArrayInDataClass") - -package app.alextran.immich.core - -import android.util.Log -import io.flutter.plugin.common.BasicMessageChannel -import io.flutter.plugin.common.BinaryMessenger -import io.flutter.plugin.common.EventChannel -import io.flutter.plugin.common.MessageCodec -import io.flutter.plugin.common.StandardMethodCodec -import io.flutter.plugin.common.StandardMessageCodec -import java.io.ByteArrayOutputStream -import java.nio.ByteBuffer -private object NetworkPigeonUtils { - - fun wrapResult(result: Any?): List { - return listOf(result) - } - - fun wrapError(exception: Throwable): List { - return if (exception is FlutterError) { - listOf( - exception.code, - exception.message, - exception.details - ) - } else { - listOf( - exception.javaClass.simpleName, - exception.toString(), - "Cause: " + exception.cause + ", Stacktrace: " + Log.getStackTraceString(exception) - ) - } - } - fun doubleEquals(a: Double, b: Double): Boolean { - // Normalize -0.0 to 0.0 and handle NaN equality. - return (if (a == 0.0) 0.0 else a) == (if (b == 0.0) 0.0 else b) || (a.isNaN() && b.isNaN()) - } - - fun floatEquals(a: Float, b: Float): Boolean { - // Normalize -0.0 to 0.0 and handle NaN equality. - return (if (a == 0.0f) 0.0f else a) == (if (b == 0.0f) 0.0f else b) || (a.isNaN() && b.isNaN()) - } - - fun doubleHash(d: Double): Int { - // Normalize -0.0 to 0.0 and handle NaN to ensure consistent hash codes. - val normalized = if (d == 0.0) 0.0 else d - val bits = java.lang.Double.doubleToLongBits(normalized) - return (bits xor (bits ushr 32)).toInt() - } - - fun floatHash(f: Float): Int { - // Normalize -0.0 to 0.0 and handle NaN to ensure consistent hash codes. - val normalized = if (f == 0.0f) 0.0f else f - return java.lang.Float.floatToIntBits(normalized) - } - - fun deepEquals(a: Any?, b: Any?): Boolean { - if (a === b) { - return true - } - if (a == null || b == null) { - return false - } - if (a is ByteArray && b is ByteArray) { - return a.contentEquals(b) - } - if (a is IntArray && b is IntArray) { - return a.contentEquals(b) - } - if (a is LongArray && b is LongArray) { - return a.contentEquals(b) - } - if (a is DoubleArray && b is DoubleArray) { - if (a.size != b.size) return false - for (i in a.indices) { - if (!doubleEquals(a[i], b[i])) return false - } - return true - } - if (a is FloatArray && b is FloatArray) { - if (a.size != b.size) return false - for (i in a.indices) { - if (!floatEquals(a[i], b[i])) return false - } - return true - } - if (a is Array<*> && b is Array<*>) { - if (a.size != b.size) return false - for (i in a.indices) { - if (!deepEquals(a[i], b[i])) return false - } - return true - } - if (a is List<*> && b is List<*>) { - if (a.size != b.size) return false - val iterA = a.iterator() - val iterB = b.iterator() - while (iterA.hasNext() && iterB.hasNext()) { - if (!deepEquals(iterA.next(), iterB.next())) return false - } - return true - } - if (a is Map<*, *> && b is Map<*, *>) { - if (a.size != b.size) return false - for (entry in a) { - val key = entry.key - var found = false - for (bEntry in b) { - if (deepEquals(key, bEntry.key)) { - if (deepEquals(entry.value, bEntry.value)) { - found = true - break - } else { - return false - } - } - } - if (!found) return false - } - return true - } - if (a is Double && b is Double) { - return doubleEquals(a, b) - } - if (a is Float && b is Float) { - return floatEquals(a, b) - } - return a == b - } - - fun deepHash(value: Any?): Int { - return when (value) { - null -> 0 - is ByteArray -> value.contentHashCode() - is IntArray -> value.contentHashCode() - is LongArray -> value.contentHashCode() - is DoubleArray -> { - var result = 1 - for (item in value) { - result = 31 * result + doubleHash(item) - } - result - } - is FloatArray -> { - var result = 1 - for (item in value) { - result = 31 * result + floatHash(item) - } - result - } - is Array<*> -> { - var result = 1 - for (item in value) { - result = 31 * result + deepHash(item) - } - result - } - is List<*> -> { - var result = 1 - for (item in value) { - result = 31 * result + deepHash(item) - } - result - } - is Map<*, *> -> { - var result = 0 - for (entry in value) { - result += ((deepHash(entry.key) * 31) xor deepHash(entry.value)) - } - result - } - is Double -> doubleHash(value) - is Float -> floatHash(value) - else -> value.hashCode() - } - } - -} - -/** - * Error class for passing custom error details to Flutter via a thrown PlatformException. - * @property code The error code. - * @property message The error message. - * @property details The error details. Must be a datatype supported by the api codec. - */ -class FlutterError ( - val code: String, - override val message: String? = null, - val details: Any? = null -) : RuntimeException() - -/** Generated class from Pigeon that represents data sent in messages. */ -data class ClientCertData ( - val data: ByteArray, - val password: String -) - { - companion object { - fun fromList(pigeonVar_list: List): ClientCertData { - val data = pigeonVar_list[0] as ByteArray - val password = pigeonVar_list[1] as String - return ClientCertData(data, password) - } - } - fun toList(): List { - return listOf( - data, - password, - ) - } - override fun equals(other: Any?): Boolean { - if (other == null || other.javaClass != javaClass) { - return false - } - if (this === other) { - return true - } - val other = other as ClientCertData - return NetworkPigeonUtils.deepEquals(this.data, other.data) && NetworkPigeonUtils.deepEquals(this.password, other.password) - } - - override fun hashCode(): Int { - var result = javaClass.hashCode() - result = 31 * result + NetworkPigeonUtils.deepHash(this.data) - result = 31 * result + NetworkPigeonUtils.deepHash(this.password) - return result - } -} - -/** Generated class from Pigeon that represents data sent in messages. */ -data class ClientCertPrompt ( - val title: String, - val message: String, - val cancel: String, - val confirm: String -) - { - companion object { - fun fromList(pigeonVar_list: List): ClientCertPrompt { - val title = pigeonVar_list[0] as String - val message = pigeonVar_list[1] as String - val cancel = pigeonVar_list[2] as String - val confirm = pigeonVar_list[3] as String - return ClientCertPrompt(title, message, cancel, confirm) - } - } - fun toList(): List { - return listOf( - title, - message, - cancel, - confirm, - ) - } - override fun equals(other: Any?): Boolean { - if (other == null || other.javaClass != javaClass) { - return false - } - if (this === other) { - return true - } - val other = other as ClientCertPrompt - return NetworkPigeonUtils.deepEquals(this.title, other.title) && NetworkPigeonUtils.deepEquals(this.message, other.message) && NetworkPigeonUtils.deepEquals(this.cancel, other.cancel) && NetworkPigeonUtils.deepEquals(this.confirm, other.confirm) - } - - override fun hashCode(): Int { - var result = javaClass.hashCode() - result = 31 * result + NetworkPigeonUtils.deepHash(this.title) - result = 31 * result + NetworkPigeonUtils.deepHash(this.message) - result = 31 * result + NetworkPigeonUtils.deepHash(this.cancel) - result = 31 * result + NetworkPigeonUtils.deepHash(this.confirm) - return result - } -} -private open class NetworkPigeonCodec : StandardMessageCodec() { - override fun readValueOfType(type: Byte, buffer: ByteBuffer): Any? { - return when (type) { - 129.toByte() -> { - return (readValue(buffer) as? List)?.let { - ClientCertData.fromList(it) - } - } - 130.toByte() -> { - return (readValue(buffer) as? List)?.let { - ClientCertPrompt.fromList(it) - } - } - else -> super.readValueOfType(type, buffer) - } - } - override fun writeValue(stream: ByteArrayOutputStream, value: Any?) { - when (value) { - is ClientCertData -> { - stream.write(129) - writeValue(stream, value.toList()) - } - is ClientCertPrompt -> { - stream.write(130) - writeValue(stream, value.toList()) - } - else -> super.writeValue(stream, value) - } - } -} - - -/** Generated interface from Pigeon that represents a handler of messages from Flutter. */ -interface NetworkApi { - fun addCertificate(clientData: ClientCertData, callback: (Result) -> Unit) - fun selectCertificate(promptText: ClientCertPrompt, callback: (Result) -> Unit) - fun removeCertificate(callback: (Result) -> Unit) - fun hasCertificate(): Boolean - fun getClientPointer(): Long - fun setRequestHeaders(headers: Map, serverUrls: List, token: String?) - fun getAppGroupId(): String - - companion object { - /** The codec used by NetworkApi. */ - val codec: MessageCodec by lazy { - NetworkPigeonCodec() - } - /** Sets up an instance of `NetworkApi` to handle messages through the `binaryMessenger`. */ - @JvmOverloads - fun setUp(binaryMessenger: BinaryMessenger, api: NetworkApi?, messageChannelSuffix: String = "") { - val separatedMessageChannelSuffix = if (messageChannelSuffix.isNotEmpty()) ".$messageChannelSuffix" else "" - run { - val channel = BasicMessageChannel(binaryMessenger, "dev.flutter.pigeon.immich_mobile.NetworkApi.addCertificate$separatedMessageChannelSuffix", codec) - if (api != null) { - channel.setMessageHandler { message, reply -> - val args = message as List - val clientDataArg = args[0] as ClientCertData - api.addCertificate(clientDataArg) { result: Result -> - val error = result.exceptionOrNull() - if (error != null) { - reply.reply(NetworkPigeonUtils.wrapError(error)) - } else { - reply.reply(NetworkPigeonUtils.wrapResult(null)) - } - } - } - } else { - channel.setMessageHandler(null) - } - } - run { - val channel = BasicMessageChannel(binaryMessenger, "dev.flutter.pigeon.immich_mobile.NetworkApi.selectCertificate$separatedMessageChannelSuffix", codec) - if (api != null) { - channel.setMessageHandler { message, reply -> - val args = message as List - val promptTextArg = args[0] as ClientCertPrompt - api.selectCertificate(promptTextArg) { result: Result -> - val error = result.exceptionOrNull() - if (error != null) { - reply.reply(NetworkPigeonUtils.wrapError(error)) - } else { - reply.reply(NetworkPigeonUtils.wrapResult(null)) - } - } - } - } else { - channel.setMessageHandler(null) - } - } - run { - val channel = BasicMessageChannel(binaryMessenger, "dev.flutter.pigeon.immich_mobile.NetworkApi.removeCertificate$separatedMessageChannelSuffix", codec) - if (api != null) { - channel.setMessageHandler { _, reply -> - api.removeCertificate{ result: Result -> - val error = result.exceptionOrNull() - if (error != null) { - reply.reply(NetworkPigeonUtils.wrapError(error)) - } else { - reply.reply(NetworkPigeonUtils.wrapResult(null)) - } - } - } - } else { - channel.setMessageHandler(null) - } - } - run { - val channel = BasicMessageChannel(binaryMessenger, "dev.flutter.pigeon.immich_mobile.NetworkApi.hasCertificate$separatedMessageChannelSuffix", codec) - if (api != null) { - channel.setMessageHandler { _, reply -> - val wrapped: List = try { - listOf(api.hasCertificate()) - } catch (exception: Throwable) { - NetworkPigeonUtils.wrapError(exception) - } - reply.reply(wrapped) - } - } else { - channel.setMessageHandler(null) - } - } - run { - val channel = BasicMessageChannel(binaryMessenger, "dev.flutter.pigeon.immich_mobile.NetworkApi.getClientPointer$separatedMessageChannelSuffix", codec) - if (api != null) { - channel.setMessageHandler { _, reply -> - val wrapped: List = try { - listOf(api.getClientPointer()) - } catch (exception: Throwable) { - NetworkPigeonUtils.wrapError(exception) - } - reply.reply(wrapped) - } - } else { - channel.setMessageHandler(null) - } - } - run { - val channel = BasicMessageChannel(binaryMessenger, "dev.flutter.pigeon.immich_mobile.NetworkApi.setRequestHeaders$separatedMessageChannelSuffix", codec) - if (api != null) { - channel.setMessageHandler { message, reply -> - val args = message as List - val headersArg = args[0] as Map - val serverUrlsArg = args[1] as List - val tokenArg = args[2] as String? - val wrapped: List = try { - api.setRequestHeaders(headersArg, serverUrlsArg, tokenArg) - listOf(null) - } catch (exception: Throwable) { - NetworkPigeonUtils.wrapError(exception) - } - reply.reply(wrapped) - } - } else { - channel.setMessageHandler(null) - } - } - run { - val channel = BasicMessageChannel(binaryMessenger, "dev.flutter.pigeon.immich_mobile.NetworkApi.getAppGroupId$separatedMessageChannelSuffix", codec) - if (api != null) { - channel.setMessageHandler { _, reply -> - val wrapped: List = try { - listOf(api.getAppGroupId()) - } catch (exception: Throwable) { - NetworkPigeonUtils.wrapError(exception) - } - reply.reply(wrapped) - } - } else { - channel.setMessageHandler(null) - } - } - } - } -} diff --git a/mobile/android/app/src/main/kotlin/app/alextran/immich/images/LocalImages.g.kt b/mobile/android/app/src/main/kotlin/app/alextran/immich/images/LocalImages.g.kt deleted file mode 100644 index e741ce07e9..0000000000 --- a/mobile/android/app/src/main/kotlin/app/alextran/immich/images/LocalImages.g.kt +++ /dev/null @@ -1,140 +0,0 @@ -// Autogenerated from Pigeon (v26.3.4), do not edit directly. -// See also: https://pub.dev/packages/pigeon -@file:Suppress("UNCHECKED_CAST", "ArrayInDataClass") - -package app.alextran.immich.images - -import android.util.Log -import io.flutter.plugin.common.BasicMessageChannel -import io.flutter.plugin.common.BinaryMessenger -import io.flutter.plugin.common.EventChannel -import io.flutter.plugin.common.MessageCodec -import io.flutter.plugin.common.StandardMethodCodec -import io.flutter.plugin.common.StandardMessageCodec -import java.io.ByteArrayOutputStream -import java.nio.ByteBuffer -private object LocalImagesPigeonUtils { - - fun wrapResult(result: Any?): List { - return listOf(result) - } - - fun wrapError(exception: Throwable): List { - return if (exception is FlutterError) { - listOf( - exception.code, - exception.message, - exception.details - ) - } else { - listOf( - exception.javaClass.simpleName, - exception.toString(), - "Cause: " + exception.cause + ", Stacktrace: " + Log.getStackTraceString(exception) - ) - } - } -} - -/** - * Error class for passing custom error details to Flutter via a thrown PlatformException. - * @property code The error code. - * @property message The error message. - * @property details The error details. Must be a datatype supported by the api codec. - */ -class FlutterError ( - val code: String, - override val message: String? = null, - val details: Any? = null -) : RuntimeException() -private open class LocalImagesPigeonCodec : StandardMessageCodec() { - override fun readValueOfType(type: Byte, buffer: ByteBuffer): Any? { - return super.readValueOfType(type, buffer) - } - override fun writeValue(stream: ByteArrayOutputStream, value: Any?) { - super.writeValue(stream, value) - } -} - - -/** Generated interface from Pigeon that represents a handler of messages from Flutter. */ -interface LocalImageApi { - fun requestImage(assetId: String, requestId: Long, width: Long, height: Long, isVideo: Boolean, preferEncoded: Boolean, callback: (Result?>) -> Unit) - fun cancelRequest(requestId: Long) - fun getThumbhash(thumbhash: String, callback: (Result>) -> Unit) - - companion object { - /** The codec used by LocalImageApi. */ - val codec: MessageCodec by lazy { - LocalImagesPigeonCodec() - } - /** Sets up an instance of `LocalImageApi` to handle messages through the `binaryMessenger`. */ - @JvmOverloads - fun setUp(binaryMessenger: BinaryMessenger, api: LocalImageApi?, messageChannelSuffix: String = "") { - val separatedMessageChannelSuffix = if (messageChannelSuffix.isNotEmpty()) ".$messageChannelSuffix" else "" - run { - val channel = BasicMessageChannel(binaryMessenger, "dev.flutter.pigeon.immich_mobile.LocalImageApi.requestImage$separatedMessageChannelSuffix", codec) - if (api != null) { - channel.setMessageHandler { message, reply -> - val args = message as List - val assetIdArg = args[0] as String - val requestIdArg = args[1] as Long - val widthArg = args[2] as Long - val heightArg = args[3] as Long - val isVideoArg = args[4] as Boolean - val preferEncodedArg = args[5] as Boolean - api.requestImage(assetIdArg, requestIdArg, widthArg, heightArg, isVideoArg, preferEncodedArg) { result: Result?> -> - val error = result.exceptionOrNull() - if (error != null) { - reply.reply(LocalImagesPigeonUtils.wrapError(error)) - } else { - val data = result.getOrNull() - reply.reply(LocalImagesPigeonUtils.wrapResult(data)) - } - } - } - } else { - channel.setMessageHandler(null) - } - } - run { - val channel = BasicMessageChannel(binaryMessenger, "dev.flutter.pigeon.immich_mobile.LocalImageApi.cancelRequest$separatedMessageChannelSuffix", codec) - if (api != null) { - channel.setMessageHandler { message, reply -> - val args = message as List - val requestIdArg = args[0] as Long - val wrapped: List = try { - api.cancelRequest(requestIdArg) - listOf(null) - } catch (exception: Throwable) { - LocalImagesPigeonUtils.wrapError(exception) - } - reply.reply(wrapped) - } - } else { - channel.setMessageHandler(null) - } - } - run { - val channel = BasicMessageChannel(binaryMessenger, "dev.flutter.pigeon.immich_mobile.LocalImageApi.getThumbhash$separatedMessageChannelSuffix", codec) - if (api != null) { - channel.setMessageHandler { message, reply -> - val args = message as List - val thumbhashArg = args[0] as String - api.getThumbhash(thumbhashArg) { result: Result> -> - val error = result.exceptionOrNull() - if (error != null) { - reply.reply(LocalImagesPigeonUtils.wrapError(error)) - } else { - val data = result.getOrNull() - reply.reply(LocalImagesPigeonUtils.wrapResult(data)) - } - } - } - } else { - channel.setMessageHandler(null) - } - } - } - } -} diff --git a/mobile/android/app/src/main/kotlin/app/alextran/immich/images/LocalImagesImpl.kt b/mobile/android/app/src/main/kotlin/app/alextran/immich/images/LocalImagesImpl.kt index 3babad2e37..af953612cf 100644 --- a/mobile/android/app/src/main/kotlin/app/alextran/immich/images/LocalImagesImpl.kt +++ b/mobile/android/app/src/main/kotlin/app/alextran/immich/images/LocalImagesImpl.kt @@ -12,7 +12,9 @@ import android.provider.MediaStore.Images import android.provider.MediaStore.Video import android.util.Size import androidx.annotation.RequiresApi +import androidx.exifinterface.media.ExifInterface import app.alextran.immich.NativeBuffer +import app.alextran.immich.NativeImage import kotlin.math.* import java.io.IOException import java.util.concurrent.Executors @@ -31,12 +33,28 @@ data class Request( val callback: (Result?>) -> Unit ) +/** Set [exactSize] to decode at the smallest size that covers [target] without upscaling. */ @RequiresApi(Build.VERSION_CODES.Q) -inline fun ImageDecoder.Source.decodeBitmap(target: Size = Size(0, 0)): Bitmap { +inline fun ImageDecoder.Source.decodeBitmap(target: Size = Size(0, 0), exactSize: Boolean = false): Bitmap { return ImageDecoder.decodeBitmap(this) { decoder, info, _ -> if (target.width > 0 && target.height > 0) { - val sample = max(1, min(info.size.width / target.width, info.size.height / target.height)) - decoder.setTargetSampleSize(sample) + if (exactSize) { + val fillScale = max( + target.width.toDouble() / info.size.width, + target.height.toDouble() / info.size.height + ) + val scale = min(1.0, fillScale) + if (scale < 1) { + val width = ceil(info.size.width * scale).toInt() + val height = ceil(info.size.height * scale).toInt() + if (width > 0 && height > 0) { + decoder.setTargetSize(width, height) + } + } + } else { + val sample = max(1, min(info.size.width / target.width, info.size.height / target.height)) + decoder.setTargetSampleSize(sample) + } } decoder.allocator = ImageDecoder.ALLOCATOR_SOFTWARE decoder.setTargetColorSpace(ColorSpace.get(ColorSpace.Named.SRGB)) @@ -44,22 +62,41 @@ inline fun ImageDecoder.Source.decodeBitmap(target: Size = Size(0, 0)): Bitmap { } fun Bitmap.toNativeBuffer(): Map { - val size = width * height * 4 + // Dart reads the buffer as rgba8888, but 10-bit sources decode to RGBA_1010102, which garbles + // colors when copied verbatim. Convert those straight into the output buffer in native code - + // one pass, no intermediate ARGB_8888 bitmap. + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU && config == Bitmap.Config.RGBA_1010102) { + val info = IntArray(3) + val pointer = NativeImage.convert1010102(this, info) + if (pointer != 0L) { + recycle() + return mapOf( + "pointer" to pointer, + "width" to info[0].toLong(), + "height" to info[1].toLong(), + "rowBytes" to info[2].toLong() + ) + } + // native convert declined (OOM/lock) -> fall through to the Skia copy path below. + } + // Other non-8888 configs (e.g. HDR F16) still need Skia's convert; 8-bit is copied as-is. + val bitmap = toArgb8888() + val size = bitmap.width * bitmap.height * 4 val pointer = NativeBuffer.allocate(size) try { val buffer = NativeBuffer.wrap(pointer, size) - copyPixelsToBuffer(buffer) + bitmap.copyPixelsToBuffer(buffer) return mapOf( "pointer" to pointer, - "width" to width.toLong(), - "height" to height.toLong(), - "rowBytes" to (width * 4).toLong() + "width" to bitmap.width.toLong(), + "height" to bitmap.height.toLong(), + "rowBytes" to (bitmap.width * 4).toLong() ) - } catch (e: Exception) { + } catch (e: Throwable) { NativeBuffer.free(pointer) throw e } finally { - recycle() + bitmap.recycle() } } @@ -181,35 +218,56 @@ class LocalImagesImpl(context: Context) : LocalImageApi { val id = assetId.toLong() signal.throwIfCanceled() - val bitmap = if (isVideo) { - decodeVideoThumbnail(id, size, signal) - } else { - decodeImage(id, size, signal) - } - try { - signal.throwIfCanceled() - val res = bitmap.toNativeBuffer() - signal.throwIfCanceled() + val res = if (isVideo) { + decodeVideoThumbnail(id, size, signal).toNativeBuffer() + } else { + val (bitmap, orientation) = decodeImage(id, size, signal) + signal.throwIfCanceled() + if (orientation == ExifInterface.ORIENTATION_NORMAL || orientation == ExifInterface.ORIENTATION_UNDEFINED) { + bitmap.toNativeBuffer() + } else { + rotateToNativeBuffer(bitmap, orientation) + } + } + // Don't re-check cancellation here: res owns a malloc'd buffer, and bailing to CANCELLED would + // orphan it. Deliver it; Dart frees the buffer itself if the request was cancelled meanwhile. callback(Result.success(res)) } catch (e: Exception) { callback(if (e is OperationCanceledException) CANCELLED else Result.failure(e)) } } - private fun decodeImage(id: Long, size: Size, signal: CancellationSignal): Bitmap { + // Returns the decoded bitmap plus the EXIF orientation that still needs applying. Only Q+ raw + // decodes come back unrotated (ImageDecoder / loadThumbnail skip EXIF for raw like DNG); every + // other path already orients itself, so it reports ORIENTATION_NORMAL. + private fun decodeImage(id: Long, size: Size, signal: CancellationSignal): Pair { signal.throwIfCanceled() val uri = ContentUris.withAppendedId(Images.Media.EXTERNAL_CONTENT_URI, id) + val handleRaw = Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q && isRawMime(uri) + val orientation = if (handleRaw) rawOrientation(uri) else ExifInterface.ORIENTATION_NORMAL + if (size.width <= 0 || size.height <= 0 || size.width > 768 || size.height > 768) { - return decodeSource(uri, size, signal) + // A "load original" request is unsized -> a full-res decode (a sized > 768 just samples to target). + return decodeSource(uri, size, signal) to orientation } - return if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) { + val bitmap = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) { resolver.loadThumbnail(uri, size, signal) } else { signal.setOnCancelListener { Images.Thumbnails.cancelThumbnailRequest(resolver, id) } Images.Thumbnails.getThumbnail(resolver, id, Images.Thumbnails.MINI_KIND, OPTIONS) } + return bitmap to orientation + } + + private fun isRawMime(uri: Uri): Boolean { + val mime = resolver.getType(uri) ?: return false + return mime.startsWith("image/x-") || mime == "image/dng" + } + + private fun rawOrientation(uri: Uri): Int { + return resolver.openInputStream(uri)?.use { readOrientation(it) } ?: ExifInterface.ORIENTATION_NORMAL } private fun decodeVideoThumbnail(id: Long, target: Size, signal: CancellationSignal): Bitmap { diff --git a/mobile/android/app/src/main/kotlin/app/alextran/immich/images/RawOrientation.kt b/mobile/android/app/src/main/kotlin/app/alextran/immich/images/RawOrientation.kt new file mode 100644 index 0000000000..e91ff871b3 --- /dev/null +++ b/mobile/android/app/src/main/kotlin/app/alextran/immich/images/RawOrientation.kt @@ -0,0 +1,68 @@ +package app.alextran.immich.images + +import android.graphics.Bitmap +import androidx.exifinterface.media.ExifInterface +import app.alextran.immich.NativeImage +import java.io.IOException +import java.io.InputStream +import java.nio.ByteBuffer +import java.nio.ByteOrder + +fun readOrientation(input: InputStream): Int = + ExifInterface(input).getAttributeInt(ExifInterface.TAG_ORIENTATION, ExifInterface.ORIENTATION_NORMAL) + +// Reads the EXIF orientation (TIFF tag 0x0112) from a raw file's IFD0. +fun readRawOrientation(buffer: ByteBuffer, len: Int): Int { + try { + if (len < 8) return ExifInterface.ORIENTATION_NORMAL + buffer.order( + when (buffer.get(0).toInt() and 0xFF) { + 0x49 -> ByteOrder.LITTLE_ENDIAN + 0x4D -> ByteOrder.BIG_ENDIAN + else -> return ExifInterface.ORIENTATION_NORMAL + } + ) + val ifd0 = buffer.getInt(4).toLong() and 0xFFFFFFFFL + if (ifd0 < 8 || ifd0 + 2 > len) return ExifInterface.ORIENTATION_NORMAL + val start = ifd0.toInt() + val entries = buffer.getShort(start).toInt() and 0xFFFF + if (entries <= 0 || entries > 512) return ExifInterface.ORIENTATION_NORMAL + // Each IFD entry is 12 bytes: tag(2) type(2) count(4) value(4); orientation is a SHORT in value. + for (i in 0 until entries) { + val p = start + 2 + i * 12 + if (p + 12 > len) return ExifInterface.ORIENTATION_NORMAL + if ((buffer.getShort(p).toInt() and 0xFFFF) == 0x0112) { + val value = buffer.getShort(p + 8).toInt() and 0xFFFF + return if (value in 1..8) value else ExifInterface.ORIENTATION_NORMAL + } + } + return ExifInterface.ORIENTATION_NORMAL + } catch (_: Exception) { + return ExifInterface.ORIENTATION_NORMAL + } +} + +fun Bitmap.toArgb8888(): Bitmap { + if (config == Bitmap.Config.ARGB_8888) return this + val converted = copy(Bitmap.Config.ARGB_8888, false) + recycle() + return converted ?: throw IOException("could not convert bitmap to ARGB_8888") +} + +// Force ARGB_8888 first: the native rotate needs a lockable 8888 buffer and allocates w*h*4. +fun rotateToNativeBuffer(bitmap: Bitmap, orientation: Int): Map { + val src = bitmap.toArgb8888() + try { + val info = IntArray(3) + val pointer = NativeImage.rotate(src, orientation, info) + if (pointer == 0L) throw IOException("native rotate failed for orientation $orientation") + return mapOf( + "pointer" to pointer, + "width" to info[0].toLong(), + "height" to info[1].toLong(), + "rowBytes" to info[2].toLong() + ) + } finally { + if (!src.isRecycled) src.recycle() + } +} diff --git a/mobile/android/app/src/main/kotlin/app/alextran/immich/images/RemoteImages.g.kt b/mobile/android/app/src/main/kotlin/app/alextran/immich/images/RemoteImages.g.kt deleted file mode 100644 index 2b5f4d2f57..0000000000 --- a/mobile/android/app/src/main/kotlin/app/alextran/immich/images/RemoteImages.g.kt +++ /dev/null @@ -1,123 +0,0 @@ -// Autogenerated from Pigeon (v26.3.4), do not edit directly. -// See also: https://pub.dev/packages/pigeon -@file:Suppress("UNCHECKED_CAST", "ArrayInDataClass") - -package app.alextran.immich.images - -import android.util.Log -import io.flutter.plugin.common.BasicMessageChannel -import io.flutter.plugin.common.BinaryMessenger -import io.flutter.plugin.common.EventChannel -import io.flutter.plugin.common.MessageCodec -import io.flutter.plugin.common.StandardMethodCodec -import io.flutter.plugin.common.StandardMessageCodec -import java.io.ByteArrayOutputStream -import java.nio.ByteBuffer -private object RemoteImagesPigeonUtils { - - fun wrapResult(result: Any?): List { - return listOf(result) - } - - fun wrapError(exception: Throwable): List { - return if (exception is FlutterError) { - listOf( - exception.code, - exception.message, - exception.details - ) - } else { - listOf( - exception.javaClass.simpleName, - exception.toString(), - "Cause: " + exception.cause + ", Stacktrace: " + Log.getStackTraceString(exception) - ) - } - } -} -private open class RemoteImagesPigeonCodec : StandardMessageCodec() { - override fun readValueOfType(type: Byte, buffer: ByteBuffer): Any? { - return super.readValueOfType(type, buffer) - } - override fun writeValue(stream: ByteArrayOutputStream, value: Any?) { - super.writeValue(stream, value) - } -} - - -/** Generated interface from Pigeon that represents a handler of messages from Flutter. */ -interface RemoteImageApi { - fun requestImage(url: String, requestId: Long, preferEncoded: Boolean, callback: (Result?>) -> Unit) - fun cancelRequest(requestId: Long) - fun clearCache(callback: (Result) -> Unit) - - companion object { - /** The codec used by RemoteImageApi. */ - val codec: MessageCodec by lazy { - RemoteImagesPigeonCodec() - } - /** Sets up an instance of `RemoteImageApi` to handle messages through the `binaryMessenger`. */ - @JvmOverloads - fun setUp(binaryMessenger: BinaryMessenger, api: RemoteImageApi?, messageChannelSuffix: String = "") { - val separatedMessageChannelSuffix = if (messageChannelSuffix.isNotEmpty()) ".$messageChannelSuffix" else "" - run { - val channel = BasicMessageChannel(binaryMessenger, "dev.flutter.pigeon.immich_mobile.RemoteImageApi.requestImage$separatedMessageChannelSuffix", codec) - if (api != null) { - channel.setMessageHandler { message, reply -> - val args = message as List - val urlArg = args[0] as String - val requestIdArg = args[1] as Long - val preferEncodedArg = args[2] as Boolean - api.requestImage(urlArg, requestIdArg, preferEncodedArg) { result: Result?> -> - val error = result.exceptionOrNull() - if (error != null) { - reply.reply(RemoteImagesPigeonUtils.wrapError(error)) - } else { - val data = result.getOrNull() - reply.reply(RemoteImagesPigeonUtils.wrapResult(data)) - } - } - } - } else { - channel.setMessageHandler(null) - } - } - run { - val channel = BasicMessageChannel(binaryMessenger, "dev.flutter.pigeon.immich_mobile.RemoteImageApi.cancelRequest$separatedMessageChannelSuffix", codec) - if (api != null) { - channel.setMessageHandler { message, reply -> - val args = message as List - val requestIdArg = args[0] as Long - val wrapped: List = try { - api.cancelRequest(requestIdArg) - listOf(null) - } catch (exception: Throwable) { - RemoteImagesPigeonUtils.wrapError(exception) - } - reply.reply(wrapped) - } - } else { - channel.setMessageHandler(null) - } - } - run { - val channel = BasicMessageChannel(binaryMessenger, "dev.flutter.pigeon.immich_mobile.RemoteImageApi.clearCache$separatedMessageChannelSuffix", codec) - if (api != null) { - channel.setMessageHandler { _, reply -> - api.clearCache{ result: Result -> - val error = result.exceptionOrNull() - if (error != null) { - reply.reply(RemoteImagesPigeonUtils.wrapError(error)) - } else { - val data = result.getOrNull() - reply.reply(RemoteImagesPigeonUtils.wrapResult(data)) - } - } - } - } else { - channel.setMessageHandler(null) - } - } - } - } -} diff --git a/mobile/android/app/src/main/kotlin/app/alextran/immich/images/RemoteImagesImpl.kt b/mobile/android/app/src/main/kotlin/app/alextran/immich/images/RemoteImagesImpl.kt index f7ebc349f6..cdc82c871c 100644 --- a/mobile/android/app/src/main/kotlin/app/alextran/immich/images/RemoteImagesImpl.kt +++ b/mobile/android/app/src/main/kotlin/app/alextran/immich/images/RemoteImagesImpl.kt @@ -1,8 +1,12 @@ package app.alextran.immich.images import android.content.Context +import android.graphics.ImageDecoder +import android.os.Build import android.os.CancellationSignal import android.os.OperationCanceledException +import android.util.Size +import androidx.exifinterface.media.ExifInterface import app.alextran.immich.INITIAL_BUFFER_SIZE import app.alextran.immich.NativeBuffer import app.alextran.immich.NativeByteBuffer @@ -22,11 +26,41 @@ import java.io.File import java.io.IOException import java.nio.ByteBuffer import java.util.concurrent.ConcurrentHashMap +import java.util.concurrent.Executors private const val MAX_PREALLOC_BYTES = 128 * 1024 * 1024 private class RemoteRequest(val cancellationSignal: CancellationSignal) +// The full mimeTypes.raw set the server can serve (short + vendor forms). +private val RAW_MIME_TYPES = setOf( + "image/3fr", "image/ari", "image/arw", + "image/cap", "image/cin", "image/cr2", + "image/cr3", "image/crw", "image/dcr", + "image/dng", "image/erf", "image/fff", + "image/iiq", "image/k25", "image/kdc", + "image/mrw", "image/nef", "image/nrw", + "image/orf", "image/ori", "image/pef", + "image/psd", "image/raf", "image/raw", + "image/rw2", "image/rwl", "image/sr2", + "image/srf", "image/srw", "image/vnd.adobe.photoshop", + "image/x-adobe-dng", "image/x-arriflex-ari", "image/x-canon-cr2", + "image/x-canon-cr3", "image/x-canon-crw", "image/x-epson-erf", + "image/x-fuji-raf", "image/x-hasselblad-3fr", "image/x-hasselblad-fff", + "image/x-kodak-dcr", "image/x-kodak-k25", "image/x-kodak-kdc", + "image/x-leica-rwl", "image/x-minolta-mrw", "image/x-nikon-nef", + "image/x-nikon-nrw", "image/x-olympus-orf", "image/x-olympus-ori", + "image/x-panasonic-raw", "image/x-panasonic-rw2", "image/x-pentax-pef", + "image/x-phantom-cin", "image/x-phaseone-cap", "image/x-phaseone-iiq", + "image/x-samsung-srw", "image/x-sigma-x3f", "image/x-sony-arw", + "image/x-sony-sr2", "image/x-sony-srf", "image/x3f", +) + +private fun isRawMime(contentType: String?): Boolean { + val mime = contentType?.substringBefore(';')?.trim()?.lowercase() ?: return false + return mime in RAW_MIME_TYPES +} + class RemoteImagesImpl(context: Context) : RemoteImageApi { private val requestMap = ConcurrentHashMap() @@ -36,12 +70,18 @@ class RemoteImagesImpl(context: Context) : RemoteImageApi { companion object { val CANCELLED = Result.success?>(null) + + // Shared, process-lifetime pool: RemoteImagesImpl is re-created per FlutterEngine, so a + // per-instance pool would leak threads across engine restarts. + private val decodeExecutor = Executors.newFixedThreadPool(2) } override fun requestImage( url: String, requestId: Long, - @Suppress("UNUSED_PARAMETER") preferEncoded: Boolean, // always returns encoded; setting has no effect on Android + preferEncoded: Boolean, + width: Long?, + height: Long?, callback: (Result?>) -> Unit ) { val signal = CancellationSignal() @@ -50,13 +90,70 @@ class RemoteImagesImpl(context: Context) : RemoteImageApi { ImageFetcherManager.fetch( url, signal, - onSuccess = { buffer -> - requestMap.remove(requestId) + onSuccess = { buffer, contentType -> if (signal.isCanceled) { - NativeBuffer.free(buffer.pointer) + requestMap.remove(requestId) + buffer.free() return@fetch callback(CANCELLED) } + // Decode natively when the caller wants pixels: Flutter's fallback decoder copies + // 10-bit bitmaps (RGBA_1010102) as if they were rgba8888, garbling colors. Decode on a + // dedicated pool - the fetch callback threads are shared with video streaming. On any + // decode failure (including OOM on huge originals), hand Flutter the encoded bytes as + // before. + if (!preferEncoded && Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) { + decodeExecutor.execute { + val res = if (signal.isCanceled) null else try { + // The embedded preview a raw decodes to has no orientation, so read the container's. + val orientation = if (isRawMime(contentType)) { + readRawOrientation(NativeBuffer.wrap(buffer.pointer, buffer.offset), buffer.offset) + } else { + ExifInterface.ORIENTATION_NORMAL + } + val target = when (orientation) { + ExifInterface.ORIENTATION_TRANSPOSE, + ExifInterface.ORIENTATION_ROTATE_90, + ExifInterface.ORIENTATION_TRANSVERSE, + ExifInterface.ORIENTATION_ROTATE_270 -> Size(height?.toInt() ?: 0, width?.toInt() ?: 0) + else -> Size(width?.toInt() ?: 0, height?.toInt() ?: 0) + } + val source = ImageDecoder.createSource(NativeBuffer.wrap(buffer.pointer, buffer.offset)) + val bitmap = source.decodeBitmap(target, exactSize = true) + if (orientation == ExifInterface.ORIENTATION_NORMAL || orientation == ExifInterface.ORIENTATION_UNDEFINED) { + bitmap.toNativeBuffer() + } else { + rotateToNativeBuffer(bitmap, orientation) + } + } catch (_: Throwable) { + null + } + requestMap.remove(requestId) + when { + // Deliver even if the request was cancelled meanwhile: re-checking here would orphan + // res's malloc, and Dart frees the buffer itself when it sees the cancel. + res != null -> { + buffer.free() + callback(Result.success(res)) + } + signal.isCanceled -> { + buffer.free() + callback(CANCELLED) + } + else -> callback( + Result.success( + mapOf( + "pointer" to buffer.pointer, + "length" to buffer.offset.toLong() + ) + ) + ) + } + } + return@fetch + } + + requestMap.remove(requestId) callback( Result.success( mapOf( @@ -108,7 +205,7 @@ private object ImageFetcherManager { fun fetch( url: String, signal: CancellationSignal, - onSuccess: (NativeByteBuffer) -> Unit, + onSuccess: (NativeByteBuffer, String?) -> Unit, onFailure: (Exception) -> Unit, ) { fetcher.fetch(url, signal, onSuccess, onFailure) @@ -139,7 +236,7 @@ private sealed interface ImageFetcher { fun fetch( url: String, signal: CancellationSignal, - onSuccess: (NativeByteBuffer) -> Unit, + onSuccess: (NativeByteBuffer, String?) -> Unit, onFailure: (Exception) -> Unit, ) @@ -157,7 +254,7 @@ private class CronetImageFetcher : ImageFetcher { override fun fetch( url: String, signal: CancellationSignal, - onSuccess: (NativeByteBuffer) -> Unit, + onSuccess: (NativeByteBuffer, String?) -> Unit, onFailure: (Exception) -> Unit, ) { synchronized(stateLock) { @@ -225,7 +322,7 @@ private class CronetImageFetcher : ImageFetcher { } private class FetchCallback( - private val onSuccess: (NativeByteBuffer) -> Unit, + private val onSuccess: (NativeByteBuffer, String?) -> Unit, private val onFailure: (Exception) -> Unit, private val onComplete: () -> Unit, ) : UrlRequest.Callback() { @@ -282,7 +379,9 @@ private class CronetImageFetcher : ImageFetcher { } override fun onSucceeded(request: UrlRequest, info: UrlResponseInfo) { - onSuccess(buffer!!) + val contentType = info.allHeaders.entries + .firstOrNull { it.key.equals("content-type", ignoreCase = true) }?.value?.firstOrNull() + onSuccess(buffer!!, contentType) onComplete() } @@ -333,7 +432,7 @@ private class OkHttpImageFetcher private constructor( override fun fetch( url: String, signal: CancellationSignal, - onSuccess: (NativeByteBuffer) -> Unit, + onSuccess: (NativeByteBuffer, String?) -> Unit, onFailure: (Exception) -> Unit, ) { synchronized(stateLock) { @@ -387,7 +486,7 @@ private class OkHttpImageFetcher private constructor( buffer.ensureHeadroom() } } - onSuccess(buffer) + onSuccess(buffer, response.header("Content-Type")) } catch (e: Exception) { buffer.free() onFailure(e) diff --git a/mobile/android/app/src/main/kotlin/app/alextran/immich/permission/PermissionApi.g.kt b/mobile/android/app/src/main/kotlin/app/alextran/immich/permission/PermissionApi.g.kt deleted file mode 100644 index 5f7bf806b4..0000000000 --- a/mobile/android/app/src/main/kotlin/app/alextran/immich/permission/PermissionApi.g.kt +++ /dev/null @@ -1,169 +0,0 @@ -// Autogenerated from Pigeon (v26.3.4), do not edit directly. -// See also: https://pub.dev/packages/pigeon -@file:Suppress("UNCHECKED_CAST", "ArrayInDataClass") - -package app.alextran.immich.permission - -import android.util.Log -import io.flutter.plugin.common.BasicMessageChannel -import io.flutter.plugin.common.BinaryMessenger -import io.flutter.plugin.common.EventChannel -import io.flutter.plugin.common.MessageCodec -import io.flutter.plugin.common.StandardMethodCodec -import io.flutter.plugin.common.StandardMessageCodec -import java.io.ByteArrayOutputStream -import java.nio.ByteBuffer -private object PermissionApiPigeonUtils { - - fun wrapResult(result: Any?): List { - return listOf(result) - } - - fun wrapError(exception: Throwable): List { - return if (exception is FlutterError) { - listOf( - exception.code, - exception.message, - exception.details - ) - } else { - listOf( - exception.javaClass.simpleName, - exception.toString(), - "Cause: " + exception.cause + ", Stacktrace: " + Log.getStackTraceString(exception) - ) - } - } -} - -/** - * Error class for passing custom error details to Flutter via a thrown PlatformException. - * @property code The error code. - * @property message The error message. - * @property details The error details. Must be a datatype supported by the api codec. - */ -class FlutterError ( - val code: String, - override val message: String? = null, - val details: Any? = null -) : RuntimeException() - -enum class PermissionStatus(val raw: Int) { - GRANTED(0), - DENIED(1), - PERMANENTLY_DENIED(2); - - companion object { - fun ofRaw(raw: Int): PermissionStatus? { - return values().firstOrNull { it.raw == raw } - } - } -} -private open class PermissionApiPigeonCodec : StandardMessageCodec() { - override fun readValueOfType(type: Byte, buffer: ByteBuffer): Any? { - return when (type) { - 129.toByte() -> { - return (readValue(buffer) as Long?)?.let { - PermissionStatus.ofRaw(it.toInt()) - } - } - else -> super.readValueOfType(type, buffer) - } - } - override fun writeValue(stream: ByteArrayOutputStream, value: Any?) { - when (value) { - is PermissionStatus -> { - stream.write(129) - writeValue(stream, value.raw.toLong()) - } - else -> super.writeValue(stream, value) - } - } -} - - -/** Generated interface from Pigeon that represents a handler of messages from Flutter. */ -interface PermissionApi { - fun isIgnoringBatteryOptimizations(): PermissionStatus - fun hasManageMediaPermission(): Boolean - fun requestManageMediaPermission(callback: (Result) -> Unit) - fun manageMediaPermission(callback: (Result) -> Unit) - - companion object { - /** The codec used by PermissionApi. */ - val codec: MessageCodec by lazy { - PermissionApiPigeonCodec() - } - /** Sets up an instance of `PermissionApi` to handle messages through the `binaryMessenger`. */ - @JvmOverloads - fun setUp(binaryMessenger: BinaryMessenger, api: PermissionApi?, messageChannelSuffix: String = "") { - val separatedMessageChannelSuffix = if (messageChannelSuffix.isNotEmpty()) ".$messageChannelSuffix" else "" - run { - val channel = BasicMessageChannel(binaryMessenger, "dev.flutter.pigeon.immich_mobile.PermissionApi.isIgnoringBatteryOptimizations$separatedMessageChannelSuffix", codec) - if (api != null) { - channel.setMessageHandler { _, reply -> - val wrapped: List = try { - listOf(api.isIgnoringBatteryOptimizations()) - } catch (exception: Throwable) { - PermissionApiPigeonUtils.wrapError(exception) - } - reply.reply(wrapped) - } - } else { - channel.setMessageHandler(null) - } - } - run { - val channel = BasicMessageChannel(binaryMessenger, "dev.flutter.pigeon.immich_mobile.PermissionApi.hasManageMediaPermission$separatedMessageChannelSuffix", codec) - if (api != null) { - channel.setMessageHandler { _, reply -> - val wrapped: List = try { - listOf(api.hasManageMediaPermission()) - } catch (exception: Throwable) { - PermissionApiPigeonUtils.wrapError(exception) - } - reply.reply(wrapped) - } - } else { - channel.setMessageHandler(null) - } - } - run { - val channel = BasicMessageChannel(binaryMessenger, "dev.flutter.pigeon.immich_mobile.PermissionApi.requestManageMediaPermission$separatedMessageChannelSuffix", codec) - if (api != null) { - channel.setMessageHandler { _, reply -> - api.requestManageMediaPermission{ result: Result -> - val error = result.exceptionOrNull() - if (error != null) { - reply.reply(PermissionApiPigeonUtils.wrapError(error)) - } else { - val data = result.getOrNull() - reply.reply(PermissionApiPigeonUtils.wrapResult(data)) - } - } - } - } else { - channel.setMessageHandler(null) - } - } - run { - val channel = BasicMessageChannel(binaryMessenger, "dev.flutter.pigeon.immich_mobile.PermissionApi.manageMediaPermission$separatedMessageChannelSuffix", codec) - if (api != null) { - channel.setMessageHandler { _, reply -> - api.manageMediaPermission{ result: Result -> - val error = result.exceptionOrNull() - if (error != null) { - reply.reply(PermissionApiPigeonUtils.wrapError(error)) - } else { - val data = result.getOrNull() - reply.reply(PermissionApiPigeonUtils.wrapResult(data)) - } - } - } - } else { - channel.setMessageHandler(null) - } - } - } - } -} 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 deleted file mode 100644 index 02f1cb237d..0000000000 --- a/mobile/android/app/src/main/kotlin/app/alextran/immich/sync/Messages.g.kt +++ /dev/null @@ -1,823 +0,0 @@ -// Autogenerated from Pigeon (v26.3.4), do not edit directly. -// See also: https://pub.dev/packages/pigeon -@file:Suppress("UNCHECKED_CAST", "ArrayInDataClass") - -package app.alextran.immich.sync - -import android.util.Log -import io.flutter.plugin.common.BasicMessageChannel -import io.flutter.plugin.common.BinaryMessenger -import io.flutter.plugin.common.EventChannel -import io.flutter.plugin.common.MessageCodec -import io.flutter.plugin.common.StandardMethodCodec -import io.flutter.plugin.common.StandardMessageCodec -import java.io.ByteArrayOutputStream -import java.nio.ByteBuffer -private object MessagesPigeonUtils { - - fun wrapResult(result: Any?): List { - return listOf(result) - } - - fun wrapError(exception: Throwable): List { - return if (exception is FlutterError) { - listOf( - exception.code, - exception.message, - exception.details - ) - } else { - listOf( - exception.javaClass.simpleName, - exception.toString(), - "Cause: " + exception.cause + ", Stacktrace: " + Log.getStackTraceString(exception) - ) - } - } - fun doubleEquals(a: Double, b: Double): Boolean { - // Normalize -0.0 to 0.0 and handle NaN equality. - return (if (a == 0.0) 0.0 else a) == (if (b == 0.0) 0.0 else b) || (a.isNaN() && b.isNaN()) - } - - fun floatEquals(a: Float, b: Float): Boolean { - // Normalize -0.0 to 0.0 and handle NaN equality. - return (if (a == 0.0f) 0.0f else a) == (if (b == 0.0f) 0.0f else b) || (a.isNaN() && b.isNaN()) - } - - fun doubleHash(d: Double): Int { - // Normalize -0.0 to 0.0 and handle NaN to ensure consistent hash codes. - val normalized = if (d == 0.0) 0.0 else d - val bits = java.lang.Double.doubleToLongBits(normalized) - return (bits xor (bits ushr 32)).toInt() - } - - fun floatHash(f: Float): Int { - // Normalize -0.0 to 0.0 and handle NaN to ensure consistent hash codes. - val normalized = if (f == 0.0f) 0.0f else f - return java.lang.Float.floatToIntBits(normalized) - } - - fun deepEquals(a: Any?, b: Any?): Boolean { - if (a === b) { - return true - } - if (a == null || b == null) { - return false - } - if (a is ByteArray && b is ByteArray) { - return a.contentEquals(b) - } - if (a is IntArray && b is IntArray) { - return a.contentEquals(b) - } - if (a is LongArray && b is LongArray) { - return a.contentEquals(b) - } - if (a is DoubleArray && b is DoubleArray) { - if (a.size != b.size) return false - for (i in a.indices) { - if (!doubleEquals(a[i], b[i])) return false - } - return true - } - if (a is FloatArray && b is FloatArray) { - if (a.size != b.size) return false - for (i in a.indices) { - if (!floatEquals(a[i], b[i])) return false - } - return true - } - if (a is Array<*> && b is Array<*>) { - if (a.size != b.size) return false - for (i in a.indices) { - if (!deepEquals(a[i], b[i])) return false - } - return true - } - if (a is List<*> && b is List<*>) { - if (a.size != b.size) return false - val iterA = a.iterator() - val iterB = b.iterator() - while (iterA.hasNext() && iterB.hasNext()) { - if (!deepEquals(iterA.next(), iterB.next())) return false - } - return true - } - if (a is Map<*, *> && b is Map<*, *>) { - if (a.size != b.size) return false - for (entry in a) { - val key = entry.key - var found = false - for (bEntry in b) { - if (deepEquals(key, bEntry.key)) { - if (deepEquals(entry.value, bEntry.value)) { - found = true - break - } else { - return false - } - } - } - if (!found) return false - } - return true - } - if (a is Double && b is Double) { - return doubleEquals(a, b) - } - if (a is Float && b is Float) { - return floatEquals(a, b) - } - return a == b - } - - fun deepHash(value: Any?): Int { - return when (value) { - null -> 0 - is ByteArray -> value.contentHashCode() - is IntArray -> value.contentHashCode() - is LongArray -> value.contentHashCode() - is DoubleArray -> { - var result = 1 - for (item in value) { - result = 31 * result + doubleHash(item) - } - result - } - is FloatArray -> { - var result = 1 - for (item in value) { - result = 31 * result + floatHash(item) - } - result - } - is Array<*> -> { - var result = 1 - for (item in value) { - result = 31 * result + deepHash(item) - } - result - } - is List<*> -> { - var result = 1 - for (item in value) { - result = 31 * result + deepHash(item) - } - result - } - is Map<*, *> -> { - var result = 0 - for (entry in value) { - result += ((deepHash(entry.key) * 31) xor deepHash(entry.value)) - } - result - } - is Double -> doubleHash(value) - is Float -> floatHash(value) - else -> value.hashCode() - } - } - -} - -/** - * Error class for passing custom error details to Flutter via a thrown PlatformException. - * @property code The error code. - * @property message The error message. - * @property details The error details. Must be a datatype supported by the api codec. - */ -class FlutterError ( - val code: String, - override val message: String? = null, - val details: Any? = null -) : RuntimeException() - -enum class PlatformAssetPlaybackStyle(val raw: Int) { - UNKNOWN(0), - IMAGE(1), - VIDEO(2), - IMAGE_ANIMATED(3), - LIVE_PHOTO(4), - VIDEO_LOOPING(5); - - companion object { - fun ofRaw(raw: Int): PlatformAssetPlaybackStyle? { - return values().firstOrNull { it.raw == raw } - } - } -} - -/** Generated class from Pigeon that represents data sent in messages. */ -data class PlatformAsset ( - val id: String, - val name: String, - val type: Long, - val createdAt: Long? = null, - val updatedAt: Long? = null, - val width: Long? = null, - val height: Long? = null, - val durationMs: Long, - val orientation: Long, - val isFavorite: Boolean, - val adjustmentTime: Long? = null, - val latitude: Double? = null, - val longitude: Double? = null, - val playbackStyle: PlatformAssetPlaybackStyle -) - { - companion object { - fun fromList(pigeonVar_list: List): PlatformAsset { - val id = pigeonVar_list[0] as String - val name = pigeonVar_list[1] as String - val type = pigeonVar_list[2] as Long - val createdAt = pigeonVar_list[3] as Long? - val updatedAt = pigeonVar_list[4] as Long? - val width = pigeonVar_list[5] as Long? - val height = pigeonVar_list[6] as Long? - val durationMs = pigeonVar_list[7] as Long - val orientation = pigeonVar_list[8] as Long - val isFavorite = pigeonVar_list[9] as Boolean - val adjustmentTime = pigeonVar_list[10] as Long? - val latitude = pigeonVar_list[11] as Double? - val longitude = pigeonVar_list[12] as Double? - val playbackStyle = pigeonVar_list[13] as PlatformAssetPlaybackStyle - return PlatformAsset(id, name, type, createdAt, updatedAt, width, height, durationMs, orientation, isFavorite, adjustmentTime, latitude, longitude, playbackStyle) - } - } - fun toList(): List { - return listOf( - id, - name, - type, - createdAt, - updatedAt, - width, - height, - durationMs, - orientation, - isFavorite, - adjustmentTime, - latitude, - longitude, - playbackStyle, - ) - } - override fun equals(other: Any?): Boolean { - if (other == null || other.javaClass != javaClass) { - return false - } - if (this === other) { - return true - } - val other = other as PlatformAsset - return MessagesPigeonUtils.deepEquals(this.id, other.id) && MessagesPigeonUtils.deepEquals(this.name, other.name) && MessagesPigeonUtils.deepEquals(this.type, other.type) && MessagesPigeonUtils.deepEquals(this.createdAt, other.createdAt) && MessagesPigeonUtils.deepEquals(this.updatedAt, other.updatedAt) && MessagesPigeonUtils.deepEquals(this.width, other.width) && MessagesPigeonUtils.deepEquals(this.height, other.height) && MessagesPigeonUtils.deepEquals(this.durationMs, other.durationMs) && MessagesPigeonUtils.deepEquals(this.orientation, other.orientation) && MessagesPigeonUtils.deepEquals(this.isFavorite, other.isFavorite) && MessagesPigeonUtils.deepEquals(this.adjustmentTime, other.adjustmentTime) && MessagesPigeonUtils.deepEquals(this.latitude, other.latitude) && MessagesPigeonUtils.deepEquals(this.longitude, other.longitude) && MessagesPigeonUtils.deepEquals(this.playbackStyle, other.playbackStyle) - } - - override fun hashCode(): Int { - var result = javaClass.hashCode() - result = 31 * result + MessagesPigeonUtils.deepHash(this.id) - result = 31 * result + MessagesPigeonUtils.deepHash(this.name) - result = 31 * result + MessagesPigeonUtils.deepHash(this.type) - result = 31 * result + MessagesPigeonUtils.deepHash(this.createdAt) - result = 31 * result + MessagesPigeonUtils.deepHash(this.updatedAt) - result = 31 * result + MessagesPigeonUtils.deepHash(this.width) - result = 31 * result + MessagesPigeonUtils.deepHash(this.height) - result = 31 * result + MessagesPigeonUtils.deepHash(this.durationMs) - result = 31 * result + MessagesPigeonUtils.deepHash(this.orientation) - result = 31 * result + MessagesPigeonUtils.deepHash(this.isFavorite) - result = 31 * result + MessagesPigeonUtils.deepHash(this.adjustmentTime) - result = 31 * result + MessagesPigeonUtils.deepHash(this.latitude) - result = 31 * result + MessagesPigeonUtils.deepHash(this.longitude) - result = 31 * result + MessagesPigeonUtils.deepHash(this.playbackStyle) - return result - } -} - -/** Generated class from Pigeon that represents data sent in messages. */ -data class PlatformAlbum ( - val id: String, - val name: String, - val updatedAt: Long? = null, - val isCloud: Boolean, - val assetCount: Long -) - { - companion object { - fun fromList(pigeonVar_list: List): PlatformAlbum { - val id = pigeonVar_list[0] as String - val name = pigeonVar_list[1] as String - val updatedAt = pigeonVar_list[2] as Long? - val isCloud = pigeonVar_list[3] as Boolean - val assetCount = pigeonVar_list[4] as Long - return PlatformAlbum(id, name, updatedAt, isCloud, assetCount) - } - } - fun toList(): List { - return listOf( - id, - name, - updatedAt, - isCloud, - assetCount, - ) - } - override fun equals(other: Any?): Boolean { - if (other == null || other.javaClass != javaClass) { - return false - } - if (this === other) { - return true - } - val other = other as PlatformAlbum - return MessagesPigeonUtils.deepEquals(this.id, other.id) && MessagesPigeonUtils.deepEquals(this.name, other.name) && MessagesPigeonUtils.deepEquals(this.updatedAt, other.updatedAt) && MessagesPigeonUtils.deepEquals(this.isCloud, other.isCloud) && MessagesPigeonUtils.deepEquals(this.assetCount, other.assetCount) - } - - override fun hashCode(): Int { - var result = javaClass.hashCode() - result = 31 * result + MessagesPigeonUtils.deepHash(this.id) - result = 31 * result + MessagesPigeonUtils.deepHash(this.name) - result = 31 * result + MessagesPigeonUtils.deepHash(this.updatedAt) - result = 31 * result + MessagesPigeonUtils.deepHash(this.isCloud) - result = 31 * result + MessagesPigeonUtils.deepHash(this.assetCount) - return result - } -} - -/** Generated class from Pigeon that represents data sent in messages. */ -data class SyncDelta ( - val hasChanges: Boolean, - val updates: List, - val deletes: List, - val assetAlbums: Map> -) - { - companion object { - fun fromList(pigeonVar_list: List): SyncDelta { - val hasChanges = pigeonVar_list[0] as Boolean - val updates = pigeonVar_list[1] as List - val deletes = pigeonVar_list[2] as List - val assetAlbums = pigeonVar_list[3] as Map> - return SyncDelta(hasChanges, updates, deletes, assetAlbums) - } - } - fun toList(): List { - return listOf( - hasChanges, - updates, - deletes, - assetAlbums, - ) - } - override fun equals(other: Any?): Boolean { - if (other == null || other.javaClass != javaClass) { - return false - } - if (this === other) { - return true - } - val other = other as SyncDelta - return MessagesPigeonUtils.deepEquals(this.hasChanges, other.hasChanges) && MessagesPigeonUtils.deepEquals(this.updates, other.updates) && MessagesPigeonUtils.deepEquals(this.deletes, other.deletes) && MessagesPigeonUtils.deepEquals(this.assetAlbums, other.assetAlbums) - } - - override fun hashCode(): Int { - var result = javaClass.hashCode() - result = 31 * result + MessagesPigeonUtils.deepHash(this.hasChanges) - result = 31 * result + MessagesPigeonUtils.deepHash(this.updates) - result = 31 * result + MessagesPigeonUtils.deepHash(this.deletes) - result = 31 * result + MessagesPigeonUtils.deepHash(this.assetAlbums) - return result - } -} - -/** Generated class from Pigeon that represents data sent in messages. */ -data class HashResult ( - val assetId: String, - val error: String? = null, - val hash: String? = null -) - { - companion object { - fun fromList(pigeonVar_list: List): HashResult { - val assetId = pigeonVar_list[0] as String - val error = pigeonVar_list[1] as String? - val hash = pigeonVar_list[2] as String? - return HashResult(assetId, error, hash) - } - } - fun toList(): List { - return listOf( - assetId, - error, - hash, - ) - } - override fun equals(other: Any?): Boolean { - if (other == null || other.javaClass != javaClass) { - return false - } - if (this === other) { - return true - } - val other = other as HashResult - return MessagesPigeonUtils.deepEquals(this.assetId, other.assetId) && MessagesPigeonUtils.deepEquals(this.error, other.error) && MessagesPigeonUtils.deepEquals(this.hash, other.hash) - } - - override fun hashCode(): Int { - var result = javaClass.hashCode() - result = 31 * result + MessagesPigeonUtils.deepHash(this.assetId) - result = 31 * result + MessagesPigeonUtils.deepHash(this.error) - result = 31 * result + MessagesPigeonUtils.deepHash(this.hash) - return result - } -} - -/** Generated class from Pigeon that represents data sent in messages. */ -data class CloudIdResult ( - val assetId: String, - val error: String? = null, - val cloudId: String? = null -) - { - companion object { - fun fromList(pigeonVar_list: List): CloudIdResult { - val assetId = pigeonVar_list[0] as String - val error = pigeonVar_list[1] as String? - val cloudId = pigeonVar_list[2] as String? - return CloudIdResult(assetId, error, cloudId) - } - } - fun toList(): List { - return listOf( - assetId, - error, - cloudId, - ) - } - override fun equals(other: Any?): Boolean { - if (other == null || other.javaClass != javaClass) { - return false - } - if (this === other) { - return true - } - val other = other as CloudIdResult - return MessagesPigeonUtils.deepEquals(this.assetId, other.assetId) && MessagesPigeonUtils.deepEquals(this.error, other.error) && MessagesPigeonUtils.deepEquals(this.cloudId, other.cloudId) - } - - override fun hashCode(): Int { - var result = javaClass.hashCode() - result = 31 * result + MessagesPigeonUtils.deepHash(this.assetId) - result = 31 * result + MessagesPigeonUtils.deepHash(this.error) - result = 31 * result + MessagesPigeonUtils.deepHash(this.cloudId) - return result - } -} -private open class MessagesPigeonCodec : StandardMessageCodec() { - override fun readValueOfType(type: Byte, buffer: ByteBuffer): Any? { - return when (type) { - 129.toByte() -> { - return (readValue(buffer) as Long?)?.let { - PlatformAssetPlaybackStyle.ofRaw(it.toInt()) - } - } - 130.toByte() -> { - return (readValue(buffer) as? List)?.let { - PlatformAsset.fromList(it) - } - } - 131.toByte() -> { - return (readValue(buffer) as? List)?.let { - PlatformAlbum.fromList(it) - } - } - 132.toByte() -> { - return (readValue(buffer) as? List)?.let { - SyncDelta.fromList(it) - } - } - 133.toByte() -> { - return (readValue(buffer) as? List)?.let { - HashResult.fromList(it) - } - } - 134.toByte() -> { - return (readValue(buffer) as? List)?.let { - CloudIdResult.fromList(it) - } - } - else -> super.readValueOfType(type, buffer) - } - } - override fun writeValue(stream: ByteArrayOutputStream, value: Any?) { - when (value) { - is PlatformAssetPlaybackStyle -> { - stream.write(129) - writeValue(stream, value.raw.toLong()) - } - is PlatformAsset -> { - stream.write(130) - writeValue(stream, value.toList()) - } - is PlatformAlbum -> { - stream.write(131) - writeValue(stream, value.toList()) - } - is SyncDelta -> { - stream.write(132) - writeValue(stream, value.toList()) - } - is HashResult -> { - stream.write(133) - writeValue(stream, value.toList()) - } - is CloudIdResult -> { - stream.write(134) - writeValue(stream, value.toList()) - } - else -> super.writeValue(stream, value) - } - } -} - - -/** Generated interface from Pigeon that represents a handler of messages from Flutter. */ -interface NativeSyncApi { - fun shouldFullSync(callback: (Result) -> Unit) - fun getMediaChanges(callback: (Result) -> Unit) - fun checkpointSync() - fun clearSyncCheckpoint() - fun getAssetIdsForAlbum(albumId: String, callback: (Result>) -> Unit) - fun getAlbums(callback: (Result>) -> Unit) - fun getAssetsCountSince(albumId: String, timestamp: Long): Long - fun getAssetsForAlbum(albumId: String, updatedTimeCond: Long?, callback: (Result>) -> Unit) - fun hashAssets(assetIds: List, allowNetworkAccess: Boolean, callback: (Result>) -> Unit) - fun cancelHashing() - fun cancelSync() - fun getTrashedAssets(): Map> - fun restoreFromTrashById(mediaId: String, type: Long, callback: (Result) -> Unit) - fun getCloudIdForAssetIds(assetIds: List): List - - companion object { - /** The codec used by NativeSyncApi. */ - val codec: MessageCodec by lazy { - MessagesPigeonCodec() - } - /** Sets up an instance of `NativeSyncApi` to handle messages through the `binaryMessenger`. */ - @JvmOverloads - fun setUp(binaryMessenger: BinaryMessenger, api: NativeSyncApi?, messageChannelSuffix: String = "") { - val separatedMessageChannelSuffix = if (messageChannelSuffix.isNotEmpty()) ".$messageChannelSuffix" else "" - val taskQueue = binaryMessenger.makeBackgroundTaskQueue() - run { - val channel = BasicMessageChannel(binaryMessenger, "dev.flutter.pigeon.immich_mobile.NativeSyncApi.shouldFullSync$separatedMessageChannelSuffix", codec) - if (api != null) { - channel.setMessageHandler { _, reply -> - api.shouldFullSync{ result: Result -> - val error = result.exceptionOrNull() - if (error != null) { - reply.reply(MessagesPigeonUtils.wrapError(error)) - } else { - val data = result.getOrNull() - reply.reply(MessagesPigeonUtils.wrapResult(data)) - } - } - } - } else { - channel.setMessageHandler(null) - } - } - run { - val channel = BasicMessageChannel(binaryMessenger, "dev.flutter.pigeon.immich_mobile.NativeSyncApi.getMediaChanges$separatedMessageChannelSuffix", codec) - if (api != null) { - channel.setMessageHandler { _, reply -> - api.getMediaChanges{ result: Result -> - val error = result.exceptionOrNull() - if (error != null) { - reply.reply(MessagesPigeonUtils.wrapError(error)) - } else { - val data = result.getOrNull() - reply.reply(MessagesPigeonUtils.wrapResult(data)) - } - } - } - } else { - channel.setMessageHandler(null) - } - } - run { - val channel = BasicMessageChannel(binaryMessenger, "dev.flutter.pigeon.immich_mobile.NativeSyncApi.checkpointSync$separatedMessageChannelSuffix", codec) - if (api != null) { - channel.setMessageHandler { _, reply -> - val wrapped: List = try { - api.checkpointSync() - listOf(null) - } catch (exception: Throwable) { - MessagesPigeonUtils.wrapError(exception) - } - reply.reply(wrapped) - } - } else { - channel.setMessageHandler(null) - } - } - run { - val channel = BasicMessageChannel(binaryMessenger, "dev.flutter.pigeon.immich_mobile.NativeSyncApi.clearSyncCheckpoint$separatedMessageChannelSuffix", codec) - if (api != null) { - channel.setMessageHandler { _, reply -> - val wrapped: List = try { - api.clearSyncCheckpoint() - listOf(null) - } catch (exception: Throwable) { - MessagesPigeonUtils.wrapError(exception) - } - reply.reply(wrapped) - } - } else { - channel.setMessageHandler(null) - } - } - run { - val channel = BasicMessageChannel(binaryMessenger, "dev.flutter.pigeon.immich_mobile.NativeSyncApi.getAssetIdsForAlbum$separatedMessageChannelSuffix", codec) - if (api != null) { - channel.setMessageHandler { message, reply -> - val args = message as List - val albumIdArg = args[0] as String - api.getAssetIdsForAlbum(albumIdArg) { result: Result> -> - val error = result.exceptionOrNull() - if (error != null) { - reply.reply(MessagesPigeonUtils.wrapError(error)) - } else { - val data = result.getOrNull() - reply.reply(MessagesPigeonUtils.wrapResult(data)) - } - } - } - } else { - channel.setMessageHandler(null) - } - } - run { - val channel = BasicMessageChannel(binaryMessenger, "dev.flutter.pigeon.immich_mobile.NativeSyncApi.getAlbums$separatedMessageChannelSuffix", codec) - if (api != null) { - channel.setMessageHandler { _, reply -> - api.getAlbums{ result: Result> -> - val error = result.exceptionOrNull() - if (error != null) { - reply.reply(MessagesPigeonUtils.wrapError(error)) - } else { - val data = result.getOrNull() - reply.reply(MessagesPigeonUtils.wrapResult(data)) - } - } - } - } else { - channel.setMessageHandler(null) - } - } - run { - val channel = BasicMessageChannel(binaryMessenger, "dev.flutter.pigeon.immich_mobile.NativeSyncApi.getAssetsCountSince$separatedMessageChannelSuffix", codec, taskQueue) - if (api != null) { - channel.setMessageHandler { message, reply -> - val args = message as List - val albumIdArg = args[0] as String - val timestampArg = args[1] as Long - val wrapped: List = try { - listOf(api.getAssetsCountSince(albumIdArg, timestampArg)) - } catch (exception: Throwable) { - MessagesPigeonUtils.wrapError(exception) - } - reply.reply(wrapped) - } - } else { - channel.setMessageHandler(null) - } - } - run { - val channel = BasicMessageChannel(binaryMessenger, "dev.flutter.pigeon.immich_mobile.NativeSyncApi.getAssetsForAlbum$separatedMessageChannelSuffix", codec) - if (api != null) { - channel.setMessageHandler { message, reply -> - val args = message as List - val albumIdArg = args[0] as String - val updatedTimeCondArg = args[1] as Long? - api.getAssetsForAlbum(albumIdArg, updatedTimeCondArg) { result: Result> -> - val error = result.exceptionOrNull() - if (error != null) { - reply.reply(MessagesPigeonUtils.wrapError(error)) - } else { - val data = result.getOrNull() - reply.reply(MessagesPigeonUtils.wrapResult(data)) - } - } - } - } else { - channel.setMessageHandler(null) - } - } - run { - val channel = BasicMessageChannel(binaryMessenger, "dev.flutter.pigeon.immich_mobile.NativeSyncApi.hashAssets$separatedMessageChannelSuffix", codec, taskQueue) - if (api != null) { - channel.setMessageHandler { message, reply -> - val args = message as List - val assetIdsArg = args[0] as List - val allowNetworkAccessArg = args[1] as Boolean - api.hashAssets(assetIdsArg, allowNetworkAccessArg) { result: Result> -> - val error = result.exceptionOrNull() - if (error != null) { - reply.reply(MessagesPigeonUtils.wrapError(error)) - } else { - val data = result.getOrNull() - reply.reply(MessagesPigeonUtils.wrapResult(data)) - } - } - } - } else { - channel.setMessageHandler(null) - } - } - run { - val channel = BasicMessageChannel(binaryMessenger, "dev.flutter.pigeon.immich_mobile.NativeSyncApi.cancelHashing$separatedMessageChannelSuffix", codec) - if (api != null) { - channel.setMessageHandler { _, reply -> - val wrapped: List = try { - api.cancelHashing() - listOf(null) - } catch (exception: Throwable) { - MessagesPigeonUtils.wrapError(exception) - } - reply.reply(wrapped) - } - } else { - channel.setMessageHandler(null) - } - } - run { - val channel = BasicMessageChannel(binaryMessenger, "dev.flutter.pigeon.immich_mobile.NativeSyncApi.cancelSync$separatedMessageChannelSuffix", codec) - if (api != null) { - channel.setMessageHandler { _, reply -> - val wrapped: List = try { - api.cancelSync() - listOf(null) - } catch (exception: Throwable) { - MessagesPigeonUtils.wrapError(exception) - } - reply.reply(wrapped) - } - } else { - 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) - } - } - run { - val channel = BasicMessageChannel(binaryMessenger, "dev.flutter.pigeon.immich_mobile.NativeSyncApi.restoreFromTrashById$separatedMessageChannelSuffix", codec) - if (api != null) { - channel.setMessageHandler { message, reply -> - val args = message as List - val mediaIdArg = args[0] as String - val typeArg = args[1] as Long - api.restoreFromTrashById(mediaIdArg, typeArg) { result: Result -> - val error = result.exceptionOrNull() - if (error != null) { - reply.reply(MessagesPigeonUtils.wrapError(error)) - } else { - val data = result.getOrNull() - reply.reply(MessagesPigeonUtils.wrapResult(data)) - } - } - } - } else { - channel.setMessageHandler(null) - } - } - run { - val channel = BasicMessageChannel(binaryMessenger, "dev.flutter.pigeon.immich_mobile.NativeSyncApi.getCloudIdForAssetIds$separatedMessageChannelSuffix", codec, taskQueue) - if (api != null) { - channel.setMessageHandler { message, reply -> - val args = message as List - val assetIdsArg = args[0] as List - val wrapped: List = try { - listOf(api.getCloudIdForAssetIds(assetIdsArg)) - } 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/MessagesImplBase.kt b/mobile/android/app/src/main/kotlin/app/alextran/immich/sync/MessagesImplBase.kt index 18b771a613..25a849ad3a 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,7 +4,6 @@ import android.annotation.SuppressLint import android.content.ContentUris import android.content.Context import android.database.Cursor -import androidx.exifinterface.media.ExifInterface import android.os.Build import android.os.Bundle import android.os.ext.SdkExtensions @@ -30,6 +29,8 @@ import kotlinx.coroutines.launch import kotlinx.coroutines.sync.Semaphore import kotlinx.coroutines.sync.withPermit import java.io.File +import java.io.IOException +import java.io.InputStream import java.security.MessageDigest import kotlin.coroutines.cancellation.CancellationException @@ -377,7 +378,11 @@ open class NativeSyncApiImplBase(context: Context) : ImmichPlugin(), ActivityAwa )?.use { cursor -> cursor.count.toLong() } ?: 0L - fun getAssetsForAlbum(albumId: String, updatedTimeCond: Long?, callback: (Result>) -> Unit) { + fun getAssetsForAlbum( + albumId: String, + updatedTimeCond: Long?, + callback: (Result>) -> Unit + ) { runSync(callback) { getAssetsForAlbum(albumId, updatedTimeCond) } } @@ -419,7 +424,7 @@ open class NativeSyncApiImplBase(context: Context) : ImmichPlugin(), ActivityAwa }.awaitAll() completeWhenActive(callback, Result.success(results)) - } catch (e: CancellationException) { + } catch (_: CancellationException) { completeWhenActive( callback, Result.failure( FlutterError( @@ -437,23 +442,20 @@ open class NativeSyncApiImplBase(context: Context) : ImmichPlugin(), ActivityAwa private suspend fun hashAsset(assetId: String): HashResult { return try { - val assetUri = ContentUris.withAppendedId( - MediaStore.Files.getContentUri(MediaStore.VOLUME_EXTERNAL), - assetId.toLong() - ) - val digest = MessageDigest.getInstance("SHA-1") - ctx.contentResolver.openInputStream(assetUri)?.use { inputStream -> - var bytesRead: Int + openOriginalStream(assetId).use { inputStream -> val buffer = ByteArray(HASH_BUFFER_SIZE) - while (inputStream.read(buffer).also { bytesRead = it } > 0) { + while (true) { + val bytesRead = inputStream.read(buffer) + if (bytesRead == -1) break currentCoroutineContext().ensureActive() digest.update(buffer, 0, bytesRead) } - } ?: return HashResult(assetId, "Cannot open input stream for asset", null) + } - val hashString = Base64.encodeToString(digest.digest(), Base64.NO_WRAP) - HashResult(assetId, null, hashString) + HashResult(assetId, null, Base64.encodeToString(digest.digest(), Base64.NO_WRAP)) + } catch (e: CancellationException) { + throw e } catch (e: SecurityException) { HashResult(assetId, "Permission denied accessing asset: ${e.message}", null) } catch (e: Exception) { @@ -461,6 +463,37 @@ open class NativeSyncApiImplBase(context: Context) : ImmichPlugin(), ActivityAwa } } + private fun openOriginalStream(assetId: String): InputStream { + val id = assetId.toLong() + val collection = when (getMediaType(id)) { + MediaStore.Files.FileColumns.MEDIA_TYPE_VIDEO -> MediaStore.Video.Media.EXTERNAL_CONTENT_URI + else -> MediaStore.Images.Media.EXTERNAL_CONTENT_URI + } + val uri = ContentUris.withAppendedId(collection, id) + val original = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) { + MediaStore.setRequireOriginal(uri) + } else { + uri + } + + return ctx.contentResolver.openInputStream(original) + ?: throw IOException("Cannot open original stream for asset $assetId") + } + + private fun getMediaType(id: Long): Int = + getCursor( + MediaStore.VOLUME_EXTERNAL, + "${MediaStore.MediaColumns._ID} = ?", + arrayOf(id.toString()), + arrayOf(MediaStore.Files.FileColumns.MEDIA_TYPE) + )?.use { cursor -> + if (cursor.moveToFirst()) { + cursor.getInt(cursor.getColumnIndexOrThrow(MediaStore.Files.FileColumns.MEDIA_TYPE)) + } else { + MediaStore.Files.FileColumns.MEDIA_TYPE_IMAGE + } + } ?: MediaStore.Files.FileColumns.MEDIA_TYPE_IMAGE + fun cancelHashing() { hashTask?.cancel() hashTask = null @@ -476,8 +509,11 @@ open class NativeSyncApiImplBase(context: Context) : ImmichPlugin(), ActivityAwa syncJob = CoroutineScope(Dispatchers.IO).launch { try { completeWhenActive(callback, Result.success(work())) - } catch (e: CancellationException) { - completeWhenActive(callback, Result.failure(FlutterError(SYNC_CANCELLED_CODE, "Sync cancelled", null))) + } catch (_: CancellationException) { + completeWhenActive( + callback, + Result.failure(FlutterError(SYNC_CANCELLED_CODE, "Sync cancelled", null)) + ) } catch (e: Exception) { completeWhenActive(callback, Result.failure(e)) } diff --git a/mobile/android/app/src/main/kotlin/app/alextran/immich/viewintent/ViewIntent.g.kt b/mobile/android/app/src/main/kotlin/app/alextran/immich/viewintent/ViewIntent.g.kt deleted file mode 100644 index 1d5af15cb4..0000000000 --- a/mobile/android/app/src/main/kotlin/app/alextran/immich/viewintent/ViewIntent.g.kt +++ /dev/null @@ -1,292 +0,0 @@ -// Autogenerated from Pigeon (v26.3.4), do not edit directly. -// See also: https://pub.dev/packages/pigeon -@file:Suppress("UNCHECKED_CAST", "ArrayInDataClass") - -package app.alextran.immich.viewintent - -import android.util.Log -import io.flutter.plugin.common.BasicMessageChannel -import io.flutter.plugin.common.BinaryMessenger -import io.flutter.plugin.common.EventChannel -import io.flutter.plugin.common.MessageCodec -import io.flutter.plugin.common.StandardMethodCodec -import io.flutter.plugin.common.StandardMessageCodec -import java.io.ByteArrayOutputStream -import java.nio.ByteBuffer -private object ViewIntentPigeonUtils { - - fun wrapResult(result: Any?): List { - return listOf(result) - } - - fun wrapError(exception: Throwable): List { - return if (exception is FlutterError) { - listOf( - exception.code, - exception.message, - exception.details - ) - } else { - listOf( - exception.javaClass.simpleName, - exception.toString(), - "Cause: " + exception.cause + ", Stacktrace: " + Log.getStackTraceString(exception) - ) - } - } - fun doubleEquals(a: Double, b: Double): Boolean { - // Normalize -0.0 to 0.0 and handle NaN equality. - return (if (a == 0.0) 0.0 else a) == (if (b == 0.0) 0.0 else b) || (a.isNaN() && b.isNaN()) - } - - fun floatEquals(a: Float, b: Float): Boolean { - // Normalize -0.0 to 0.0 and handle NaN equality. - return (if (a == 0.0f) 0.0f else a) == (if (b == 0.0f) 0.0f else b) || (a.isNaN() && b.isNaN()) - } - - fun doubleHash(d: Double): Int { - // Normalize -0.0 to 0.0 and handle NaN to ensure consistent hash codes. - val normalized = if (d == 0.0) 0.0 else d - val bits = java.lang.Double.doubleToLongBits(normalized) - return (bits xor (bits ushr 32)).toInt() - } - - fun floatHash(f: Float): Int { - // Normalize -0.0 to 0.0 and handle NaN to ensure consistent hash codes. - val normalized = if (f == 0.0f) 0.0f else f - return java.lang.Float.floatToIntBits(normalized) - } - - fun deepEquals(a: Any?, b: Any?): Boolean { - if (a === b) { - return true - } - if (a == null || b == null) { - return false - } - if (a is ByteArray && b is ByteArray) { - return a.contentEquals(b) - } - if (a is IntArray && b is IntArray) { - return a.contentEquals(b) - } - if (a is LongArray && b is LongArray) { - return a.contentEquals(b) - } - if (a is DoubleArray && b is DoubleArray) { - if (a.size != b.size) return false - for (i in a.indices) { - if (!doubleEquals(a[i], b[i])) return false - } - return true - } - if (a is FloatArray && b is FloatArray) { - if (a.size != b.size) return false - for (i in a.indices) { - if (!floatEquals(a[i], b[i])) return false - } - return true - } - if (a is Array<*> && b is Array<*>) { - if (a.size != b.size) return false - for (i in a.indices) { - if (!deepEquals(a[i], b[i])) return false - } - return true - } - if (a is List<*> && b is List<*>) { - if (a.size != b.size) return false - val iterA = a.iterator() - val iterB = b.iterator() - while (iterA.hasNext() && iterB.hasNext()) { - if (!deepEquals(iterA.next(), iterB.next())) return false - } - return true - } - if (a is Map<*, *> && b is Map<*, *>) { - if (a.size != b.size) return false - for (entry in a) { - val key = entry.key - var found = false - for (bEntry in b) { - if (deepEquals(key, bEntry.key)) { - if (deepEquals(entry.value, bEntry.value)) { - found = true - break - } else { - return false - } - } - } - if (!found) return false - } - return true - } - if (a is Double && b is Double) { - return doubleEquals(a, b) - } - if (a is Float && b is Float) { - return floatEquals(a, b) - } - return a == b - } - - fun deepHash(value: Any?): Int { - return when (value) { - null -> 0 - is ByteArray -> value.contentHashCode() - is IntArray -> value.contentHashCode() - is LongArray -> value.contentHashCode() - is DoubleArray -> { - var result = 1 - for (item in value) { - result = 31 * result + doubleHash(item) - } - result - } - is FloatArray -> { - var result = 1 - for (item in value) { - result = 31 * result + floatHash(item) - } - result - } - is Array<*> -> { - var result = 1 - for (item in value) { - result = 31 * result + deepHash(item) - } - result - } - is List<*> -> { - var result = 1 - for (item in value) { - result = 31 * result + deepHash(item) - } - result - } - is Map<*, *> -> { - var result = 0 - for (entry in value) { - result += ((deepHash(entry.key) * 31) xor deepHash(entry.value)) - } - result - } - is Double -> doubleHash(value) - is Float -> floatHash(value) - else -> value.hashCode() - } - } - -} - -/** - * Error class for passing custom error details to Flutter via a thrown PlatformException. - * @property code The error code. - * @property message The error message. - * @property details The error details. Must be a datatype supported by the api codec. - */ -class FlutterError ( - val code: String, - override val message: String? = null, - val details: Any? = null -) : RuntimeException() - -/** Generated class from Pigeon that represents data sent in messages. */ -data class ViewIntentPayload ( - val path: String? = null, - val mimeType: String, - val localAssetId: String? = null -) - { - companion object { - fun fromList(pigeonVar_list: List): ViewIntentPayload { - val path = pigeonVar_list[0] as String? - val mimeType = pigeonVar_list[1] as String - val localAssetId = pigeonVar_list[2] as String? - return ViewIntentPayload(path, mimeType, localAssetId) - } - } - fun toList(): List { - return listOf( - path, - mimeType, - localAssetId, - ) - } - override fun equals(other: Any?): Boolean { - if (other == null || other.javaClass != javaClass) { - return false - } - if (this === other) { - return true - } - val other = other as ViewIntentPayload - return ViewIntentPigeonUtils.deepEquals(this.path, other.path) && ViewIntentPigeonUtils.deepEquals(this.mimeType, other.mimeType) && ViewIntentPigeonUtils.deepEquals(this.localAssetId, other.localAssetId) - } - - override fun hashCode(): Int { - var result = javaClass.hashCode() - result = 31 * result + ViewIntentPigeonUtils.deepHash(this.path) - result = 31 * result + ViewIntentPigeonUtils.deepHash(this.mimeType) - result = 31 * result + ViewIntentPigeonUtils.deepHash(this.localAssetId) - return result - } -} -private open class ViewIntentPigeonCodec : StandardMessageCodec() { - override fun readValueOfType(type: Byte, buffer: ByteBuffer): Any? { - return when (type) { - 129.toByte() -> { - return (readValue(buffer) as? List)?.let { - ViewIntentPayload.fromList(it) - } - } - else -> super.readValueOfType(type, buffer) - } - } - override fun writeValue(stream: ByteArrayOutputStream, value: Any?) { - when (value) { - is ViewIntentPayload -> { - stream.write(129) - writeValue(stream, value.toList()) - } - else -> super.writeValue(stream, value) - } - } -} - - -/** Generated interface from Pigeon that represents a handler of messages from Flutter. */ -interface ViewIntentHostApi { - fun consumeViewIntent(callback: (Result) -> Unit) - - companion object { - /** The codec used by ViewIntentHostApi. */ - val codec: MessageCodec by lazy { - ViewIntentPigeonCodec() - } - /** Sets up an instance of `ViewIntentHostApi` to handle messages through the `binaryMessenger`. */ - @JvmOverloads - fun setUp(binaryMessenger: BinaryMessenger, api: ViewIntentHostApi?, messageChannelSuffix: String = "") { - val separatedMessageChannelSuffix = if (messageChannelSuffix.isNotEmpty()) ".$messageChannelSuffix" else "" - run { - val channel = BasicMessageChannel(binaryMessenger, "dev.flutter.pigeon.immich_mobile.ViewIntentHostApi.consumeViewIntent$separatedMessageChannelSuffix", codec) - if (api != null) { - channel.setMessageHandler { _, reply -> - api.consumeViewIntent{ result: Result -> - val error = result.exceptionOrNull() - if (error != null) { - reply.reply(ViewIntentPigeonUtils.wrapError(error)) - } else { - val data = result.getOrNull() - reply.reply(ViewIntentPigeonUtils.wrapResult(data)) - } - } - } - } else { - channel.setMessageHandler(null) - } - } - } - } -} diff --git a/mobile/android/fastlane/Fastfile b/mobile/android/fastlane/Fastfile index 9fc319742d..d41a0c8d89 100644 --- a/mobile/android/fastlane/Fastfile +++ b/mobile/android/fastlane/Fastfile @@ -22,8 +22,8 @@ platform :android do task: 'bundle', build_type: 'Release', properties: { - "android.injected.version.code" => 3051, - "android.injected.version.name" => "3.0.0-rc.3", + "android.injected.version.code" => 3057, + "android.injected.version.name" => "3.1.0", } ) 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', track: 'beta') @@ -35,8 +35,8 @@ platform :android do task: 'bundle', build_type: 'Release', properties: { - "android.injected.version.code" => 3051, - "android.injected.version.name" => "3.0.0-rc.3", + "android.injected.version.code" => 3057, + "android.injected.version.name" => "3.1.0", } ) 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/assets/feature_message/ocr.webp b/mobile/assets/feature_message/ocr.webp new file mode 100644 index 0000000000..5465c4e06a Binary files /dev/null and b/mobile/assets/feature_message/ocr.webp differ diff --git a/mobile/assets/feature_message/open_in_immich.webp b/mobile/assets/feature_message/open_in_immich.webp new file mode 100644 index 0000000000..910bb9e397 Binary files /dev/null and b/mobile/assets/feature_message/open_in_immich.webp differ diff --git a/mobile/assets/feature_message/recently_added.webp b/mobile/assets/feature_message/recently_added.webp new file mode 100644 index 0000000000..f530e42802 Binary files /dev/null and b/mobile/assets/feature_message/recently_added.webp differ diff --git a/mobile/assets/feature_message/share_quality.webp b/mobile/assets/feature_message/share_quality.webp new file mode 100644 index 0000000000..8e78cfcbfe Binary files /dev/null and b/mobile/assets/feature_message/share_quality.webp differ diff --git a/mobile/assets/feature_message/slideshow.webp b/mobile/assets/feature_message/slideshow.webp new file mode 100644 index 0000000000..91a9a29667 Binary files /dev/null and b/mobile/assets/feature_message/slideshow.webp differ diff --git a/mobile/bin/generate_keys.dart b/mobile/bin/generate_keys.dart index a4cf562bcb..160f2c5b5c 100644 --- a/mobile/bin/generate_keys.dart +++ b/mobile/bin/generate_keys.dart @@ -1,4 +1,4 @@ -// ignore_for_file: avoid_print +// ignore_for_file: avoid_slow_async_io, avoid_print import 'dart:convert'; import 'dart:io'; @@ -97,6 +97,15 @@ const _kIntParamNames = [ 'quantity', ]; +const _kParamTypeOverrides = { + 'advanced_settings_clear_image_cache_success.size': 'String', + 'backup_controller_page_storage_format.total': 'String', + 'backup_controller_page_storage_format.used': 'String', + 'cleanup_found_assets_with_size.size': 'String', +}; + +final _usedParamTypeOverrides = {}; + void main() async { final sourceFile = File('../i18n/en.json'); if (!await sourceFile.exists()) { @@ -143,6 +152,11 @@ class TranslationParam { Future _generateTranslations(Map translations, File output) async { final root = _buildTranslationTree('', translations); + final staleOverrides = _kParamTypeOverrides.keys.toSet().difference(_usedParamTypeOverrides); + if (staleOverrides.isNotEmpty) { + throw StateError('_kParamTypeOverrides has entries matching no plain {placeholder}: ${staleOverrides.join(', ')}'); + } + final buffer = StringBuffer(''' // DO NOT EDIT. This is code generated via generate_keys.dart @@ -194,21 +208,22 @@ class Translations extends _BaseTranslations { await output.writeAsString(buffer.toString()); } -TranslationNode _buildTranslationTree(String key, dynamic value) { +TranslationNode _buildTranslationTree(String key, dynamic value, [String parentKey = '']) { + final fullKey = parentKey.isEmpty ? key : '$parentKey.$key'; if (value is Map) { final children = {}; for (final entry in value.entries) { - children[entry.key] = _buildTranslationTree(entry.key, entry.value); + children[entry.key] = _buildTranslationTree(entry.key, entry.value, fullKey); } return TranslationNode(key: key, children: children); } else { final stringValue = value.toString(); - final params = _extractParams(stringValue); + final params = _extractParams(stringValue, fullKey); return TranslationNode(key: key, value: stringValue, params: params); } } -List _extractParams(String value) { +List _extractParams(String value, String fullKey) { final params = {}; final icuRegex = RegExp(r'\{(\w+),\s*(plural|select|number|date|time)([^}]*(?:\{[^}]*\}[^}]*)*)\}'); @@ -264,8 +279,11 @@ List _extractParams(String value) { continue; } - String type; - if (_kIntParamNames.contains(name.toLowerCase())) { + final String type; + if (_kParamTypeOverrides['$fullKey.$name'] case final override?) { + type = override; + _usedParamTypeOverrides.add('$fullKey.$name'); + } else if (_kIntParamNames.contains(name.toLowerCase())) { type = 'int'; } else { type = 'Object'; diff --git a/mobile/drift_schemas/main/drift_schema_v31.json b/mobile/drift_schemas/main/drift_schema_v31.json new file mode 100644 index 0000000000..aff31af3f5 --- /dev/null +++ b/mobile/drift_schemas/main/drift_schema_v31.json @@ -0,0 +1,3626 @@ +{ + "_meta": { + "description": "This file contains a serialized version of schema entities for drift.", + "version": "1.3.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_ms", + "getter_name": "durationMs", + "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": [ + { + "foreign_key": { + "to": { + "table": "user_entity", + "column": "id" + }, + "initially_deferred": false, + "on_update": null, + "on_delete": "cascade" + } + } + ] + }, + { + "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": "uploaded_at", + "getter_name": "uploadedAt", + "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": [] + }, + { + "name": "is_edited", + "getter_name": "isEdited", + "moor_type": "bool", + "nullable": false, + "customConstraints": null, + "defaultConstraints": "CHECK (\"is_edited\" IN (0, 1))", + "dialectAwareDefaultConstraints": { + "sqlite": "CHECK (\"is_edited\" 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": [ + "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": [ + { + "foreign_key": { + "to": { + "table": "user_entity", + "column": "id" + }, + "initially_deferred": false, + "on_update": null, + "on_delete": "cascade" + } + } + ] + }, + { + "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_ms", + "getter_name": "durationMs", + "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": [] + }, + { + "name": "i_cloud_id", + "getter_name": "iCloudId", + "moor_type": "string", + "nullable": true, + "customConstraints": null, + "default_dart": null, + "default_client_dart": null, + "dsl_features": [] + }, + { + "name": "adjustment_time", + "getter_name": "adjustmentTime", + "moor_type": "dateTime", + "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": "playback_style", + "getter_name": "playbackStyle", + "moor_type": "int", + "nullable": false, + "customConstraints": null, + "default_dart": "const CustomExpression('0')", + "default_client_dart": null, + "dsl_features": [], + "type_converter": { + "dart_expr": "const EnumIndexConverter(AssetPlaybackStyle.values)", + "dart_type_name": "AssetPlaybackStyle" + } + } + ], + "is_virtual": false, + "without_rowid": true, + "constraints": [], + "strict": true, + "explicit_pk": [ + "id" + ] + } + }, + { + "id": 4, + "references": [ + 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": "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": [ + { + "foreign_key": { + "to": { + "table": "remote_asset_entity", + "column": "id" + }, + "initially_deferred": false, + "on_update": null, + "on_delete": "setNull" + } + } + ] + }, + { + "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": [ + { + "foreign_key": { + "to": { + "table": "remote_album_entity", + "column": "id" + }, + "initially_deferred": false, + "on_update": null, + "on_delete": "setNull" + } + } + ] + }, + { + "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": [ + { + "foreign_key": { + "to": { + "table": "local_asset_entity", + "column": "id" + }, + "initially_deferred": false, + "on_update": null, + "on_delete": "cascade" + } + } + ] + }, + { + "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": [ + { + "foreign_key": { + "to": { + "table": "local_album_entity", + "column": "id" + }, + "initially_deferred": false, + "on_update": null, + "on_delete": "cascade" + } + } + ] + }, + { + "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": [ + 6 + ], + "type": "index", + "data": { + "on": 6, + "name": "idx_local_album_asset_album_asset", + "sql": "CREATE INDEX IF NOT EXISTS idx_local_album_asset_album_asset ON local_album_asset_entity (album_id, asset_id)", + "unique": false, + "columns": [] + } + }, + { + "id": 8, + "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": 9, + "references": [ + 3 + ], + "type": "index", + "data": { + "on": 3, + "name": "idx_local_asset_cloud_id", + "sql": "CREATE INDEX IF NOT EXISTS idx_local_asset_cloud_id ON local_asset_entity (i_cloud_id)", + "unique": false, + "columns": [] + } + }, + { + "id": 10, + "references": [ + 3 + ], + "type": "index", + "data": { + "on": 3, + "name": "idx_local_asset_created_at", + "sql": "CREATE INDEX IF NOT EXISTS idx_local_asset_created_at ON local_asset_entity (created_at)", + "unique": false, + "columns": [] + } + }, + { + "id": 11, + "references": [ + 2 + ], + "type": "index", + "data": { + "on": 2, + "name": "idx_stack_primary_asset_id", + "sql": "CREATE INDEX IF NOT EXISTS idx_stack_primary_asset_id ON stack_entity (primary_asset_id)", + "unique": false, + "columns": [] + } + }, + { + "id": 12, + "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": 13, + "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": 14, + "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": 15, + "references": [ + 1 + ], + "type": "index", + "data": { + "on": 1, + "name": "idx_remote_asset_stack_id", + "sql": "CREATE INDEX IF NOT EXISTS idx_remote_asset_stack_id ON remote_asset_entity (stack_id)", + "unique": false, + "columns": [] + } + }, + { + "id": 16, + "references": [ + 1 + ], + "type": "index", + "data": { + "on": 1, + "name": "idx_remote_asset_owner_visibility_deleted_created", + "sql": "CREATE INDEX IF NOT EXISTS idx_remote_asset_owner_visibility_deleted_created\nON remote_asset_entity (owner_id, visibility, deleted_at, created_at DESC)\n", + "unique": false, + "columns": [] + } + }, + { + "id": 17, + "references": [ + 1 + ], + "type": "index", + "data": { + "on": 1, + "name": "idx_remote_asset_uploaded", + "sql": "CREATE INDEX IF NOT EXISTS idx_remote_asset_uploaded ON remote_asset_entity (uploaded_at)", + "unique": false, + "columns": [] + } + }, + { + "id": 18, + "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": 19, + "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": [ + { + "foreign_key": { + "to": { + "table": "user_entity", + "column": "id" + }, + "initially_deferred": false, + "on_update": null, + "on_delete": "cascade" + } + } + ] + }, + { + "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": 20, + "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": [ + { + "foreign_key": { + "to": { + "table": "user_entity", + "column": "id" + }, + "initially_deferred": false, + "on_update": null, + "on_delete": "cascade" + } + } + ] + }, + { + "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": [ + { + "foreign_key": { + "to": { + "table": "user_entity", + "column": "id" + }, + "initially_deferred": false, + "on_update": null, + "on_delete": "cascade" + } + } + ] + }, + { + "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": 21, + "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": [ + { + "foreign_key": { + "to": { + "table": "remote_asset_entity", + "column": "id" + }, + "initially_deferred": false, + "on_update": null, + "on_delete": "cascade" + } + } + ] + }, + { + "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": 22, + "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": [ + { + "foreign_key": { + "to": { + "table": "remote_asset_entity", + "column": "id" + }, + "initially_deferred": false, + "on_update": null, + "on_delete": "cascade" + } + } + ] + }, + { + "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": [ + { + "foreign_key": { + "to": { + "table": "remote_album_entity", + "column": "id" + }, + "initially_deferred": false, + "on_update": null, + "on_delete": "cascade" + } + } + ] + } + ], + "is_virtual": false, + "without_rowid": true, + "constraints": [], + "strict": true, + "explicit_pk": [ + "asset_id", + "album_id" + ] + } + }, + { + "id": 23, + "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": [ + { + "foreign_key": { + "to": { + "table": "remote_album_entity", + "column": "id" + }, + "initially_deferred": false, + "on_update": null, + "on_delete": "cascade" + } + } + ] + }, + { + "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": [ + { + "foreign_key": { + "to": { + "table": "user_entity", + "column": "id" + }, + "initially_deferred": false, + "on_update": null, + "on_delete": "cascade" + } + } + ] + }, + { + "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": 24, + "references": [ + 1 + ], + "type": "table", + "data": { + "name": "remote_asset_cloud_id_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": [ + { + "foreign_key": { + "to": { + "table": "remote_asset_entity", + "column": "id" + }, + "initially_deferred": false, + "on_update": null, + "on_delete": "cascade" + } + } + ] + }, + { + "name": "cloud_id", + "getter_name": "cloudId", + "moor_type": "string", + "nullable": true, + "customConstraints": null, + "default_dart": null, + "default_client_dart": null, + "dsl_features": [] + }, + { + "name": "created_at", + "getter_name": "createdAt", + "moor_type": "dateTime", + "nullable": true, + "customConstraints": null, + "default_dart": null, + "default_client_dart": null, + "dsl_features": [] + }, + { + "name": "adjustment_time", + "getter_name": "adjustmentTime", + "moor_type": "dateTime", + "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": [] + } + ], + "is_virtual": false, + "without_rowid": true, + "constraints": [], + "strict": true, + "explicit_pk": [ + "asset_id" + ] + } + }, + { + "id": 25, + "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": [ + { + "foreign_key": { + "to": { + "table": "user_entity", + "column": "id" + }, + "initially_deferred": false, + "on_update": null, + "on_delete": "cascade" + } + } + ] + }, + { + "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": 26, + "references": [ + 1, + 25 + ], + "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": [ + { + "foreign_key": { + "to": { + "table": "remote_asset_entity", + "column": "id" + }, + "initially_deferred": false, + "on_update": null, + "on_delete": "cascade" + } + } + ] + }, + { + "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": [ + { + "foreign_key": { + "to": { + "table": "memory_entity", + "column": "id" + }, + "initially_deferred": false, + "on_update": null, + "on_delete": "cascade" + } + } + ] + } + ], + "is_virtual": false, + "without_rowid": true, + "constraints": [], + "strict": true, + "explicit_pk": [ + "asset_id", + "memory_id" + ] + } + }, + { + "id": 27, + "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": [ + { + "foreign_key": { + "to": { + "table": "user_entity", + "column": "id" + }, + "initially_deferred": false, + "on_update": null, + "on_delete": "cascade" + } + } + ] + }, + { + "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": 28, + "references": [ + 1, + 27 + ], + "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": [ + { + "foreign_key": { + "to": { + "table": "remote_asset_entity", + "column": "id" + }, + "initially_deferred": false, + "on_update": null, + "on_delete": "cascade" + } + } + ] + }, + { + "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": [ + { + "foreign_key": { + "to": { + "table": "person_entity", + "column": "id" + }, + "initially_deferred": false, + "on_update": null, + "on_delete": "setNull" + } + } + ] + }, + { + "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": [] + }, + { + "name": "is_visible", + "getter_name": "isVisible", + "moor_type": "bool", + "nullable": false, + "customConstraints": null, + "defaultConstraints": "CHECK (\"is_visible\" IN (0, 1))", + "dialectAwareDefaultConstraints": { + "sqlite": "CHECK (\"is_visible\" IN (0, 1))" + }, + "default_dart": "const CustomExpression('1')", + "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": [] + } + ], + "is_virtual": false, + "without_rowid": true, + "constraints": [], + "strict": true, + "explicit_pk": [ + "id" + ] + } + }, + { + "id": 29, + "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": 30, + "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_ms", + "getter_name": "durationMs", + "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": [] + }, + { + "name": "source", + "getter_name": "source", + "moor_type": "int", + "nullable": false, + "customConstraints": null, + "default_dart": null, + "default_client_dart": null, + "dsl_features": [], + "type_converter": { + "dart_expr": "const EnumIndexConverter(TrashOrigin.values)", + "dart_type_name": "TrashOrigin" + } + }, + { + "name": "playback_style", + "getter_name": "playbackStyle", + "moor_type": "int", + "nullable": false, + "customConstraints": null, + "default_dart": "const CustomExpression('0')", + "default_client_dart": null, + "dsl_features": [], + "type_converter": { + "dart_expr": "const EnumIndexConverter(AssetPlaybackStyle.values)", + "dart_type_name": "AssetPlaybackStyle" + } + } + ], + "is_virtual": false, + "without_rowid": true, + "constraints": [], + "strict": true, + "explicit_pk": [ + "id", + "album_id" + ] + } + }, + { + "id": 31, + "references": [ + 1 + ], + "type": "table", + "data": { + "name": "asset_edit_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": [ + { + "foreign_key": { + "to": { + "table": "remote_asset_entity", + "column": "id" + }, + "initially_deferred": false, + "on_update": null, + "on_delete": "cascade" + } + } + ] + }, + { + "name": "action", + "getter_name": "action", + "moor_type": "int", + "nullable": false, + "customConstraints": null, + "default_dart": null, + "default_client_dart": null, + "dsl_features": [], + "type_converter": { + "dart_expr": "const EnumIndexConverter(AssetEditAction.values)", + "dart_type_name": "AssetEditAction" + } + }, + { + "name": "parameters", + "getter_name": "parameters", + "moor_type": "blob", + "nullable": false, + "customConstraints": null, + "default_dart": null, + "default_client_dart": null, + "dsl_features": [], + "type_converter": { + "dart_expr": "editParameterConverter", + "dart_type_name": "Map" + } + }, + { + "name": "sequence", + "getter_name": "sequence", + "moor_type": "int", + "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": 32, + "references": [], + "type": "table", + "data": { + "name": "settings", + "was_declared_in_moor": false, + "columns": [ + { + "name": "key", + "getter_name": "key", + "moor_type": "string", + "nullable": false, + "customConstraints": null, + "default_dart": null, + "default_client_dart": null, + "dsl_features": [] + }, + { + "name": "value", + "getter_name": "value", + "moor_type": "string", + "nullable": true, + "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": [] + } + ], + "is_virtual": false, + "without_rowid": true, + "constraints": [], + "strict": true, + "explicit_pk": [ + "key" + ] + } + }, + { + "id": 33, + "references": [ + 1 + ], + "type": "table", + "data": { + "name": "asset_ocr_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": [ + { + "foreign_key": { + "to": { + "table": "remote_asset_entity", + "column": "id" + }, + "initially_deferred": false, + "on_update": null, + "on_delete": "cascade" + } + } + ] + }, + { + "name": "x1", + "getter_name": "x1", + "moor_type": "double", + "nullable": false, + "customConstraints": null, + "default_dart": null, + "default_client_dart": null, + "dsl_features": [] + }, + { + "name": "y1", + "getter_name": "y1", + "moor_type": "double", + "nullable": false, + "customConstraints": null, + "default_dart": null, + "default_client_dart": null, + "dsl_features": [] + }, + { + "name": "x2", + "getter_name": "x2", + "moor_type": "double", + "nullable": false, + "customConstraints": null, + "default_dart": null, + "default_client_dart": null, + "dsl_features": [] + }, + { + "name": "y2", + "getter_name": "y2", + "moor_type": "double", + "nullable": false, + "customConstraints": null, + "default_dart": null, + "default_client_dart": null, + "dsl_features": [] + }, + { + "name": "x3", + "getter_name": "x3", + "moor_type": "double", + "nullable": false, + "customConstraints": null, + "default_dart": null, + "default_client_dart": null, + "dsl_features": [] + }, + { + "name": "y3", + "getter_name": "y3", + "moor_type": "double", + "nullable": false, + "customConstraints": null, + "default_dart": null, + "default_client_dart": null, + "dsl_features": [] + }, + { + "name": "x4", + "getter_name": "x4", + "moor_type": "double", + "nullable": false, + "customConstraints": null, + "default_dart": null, + "default_client_dart": null, + "dsl_features": [] + }, + { + "name": "y4", + "getter_name": "y4", + "moor_type": "double", + "nullable": false, + "customConstraints": null, + "default_dart": null, + "default_client_dart": null, + "dsl_features": [] + }, + { + "name": "box_score", + "getter_name": "boxScore", + "moor_type": "double", + "nullable": false, + "customConstraints": null, + "default_dart": null, + "default_client_dart": null, + "dsl_features": [] + }, + { + "name": "text_score", + "getter_name": "textScore", + "moor_type": "double", + "nullable": false, + "customConstraints": null, + "default_dart": null, + "default_client_dart": null, + "dsl_features": [] + }, + { + "name": "recognized_text", + "getter_name": "recognizedText", + "moor_type": "string", + "nullable": false, + "customConstraints": null, + "default_dart": null, + "default_client_dart": null, + "dsl_features": [] + }, + { + "name": "is_visible", + "getter_name": "isVisible", + "moor_type": "bool", + "nullable": false, + "customConstraints": null, + "defaultConstraints": "CHECK (\"is_visible\" IN (0, 1))", + "dialectAwareDefaultConstraints": { + "sqlite": "CHECK (\"is_visible\" IN (0, 1))" + }, + "default_dart": "const CustomExpression('1')", + "default_client_dart": null, + "dsl_features": [] + } + ], + "is_virtual": false, + "without_rowid": true, + "constraints": [], + "strict": true, + "explicit_pk": [ + "id" + ] + } + }, + { + "id": 34, + "references": [ + 20 + ], + "type": "index", + "data": { + "on": 20, + "name": "idx_partner_shared_with_id", + "sql": "CREATE INDEX IF NOT EXISTS idx_partner_shared_with_id ON partner_entity (shared_with_id)", + "unique": false, + "columns": [] + } + }, + { + "id": 35, + "references": [ + 21 + ], + "type": "index", + "data": { + "on": 21, + "name": "idx_lat_lng", + "sql": "CREATE INDEX IF NOT EXISTS idx_lat_lng ON remote_exif_entity (latitude, longitude)", + "unique": false, + "columns": [] + } + }, + { + "id": 36, + "references": [ + 21 + ], + "type": "index", + "data": { + "on": 21, + "name": "idx_remote_exif_city", + "sql": "CREATE INDEX IF NOT EXISTS idx_remote_exif_city\nON remote_exif_entity (city) WHERE city IS NOT NULL\n", + "unique": false, + "columns": [] + } + }, + { + "id": 37, + "references": [ + 22 + ], + "type": "index", + "data": { + "on": 22, + "name": "idx_remote_album_asset_album_asset", + "sql": "CREATE INDEX IF NOT EXISTS idx_remote_album_asset_album_asset ON remote_album_asset_entity (album_id, asset_id)", + "unique": false, + "columns": [] + } + }, + { + "id": 38, + "references": [ + 24 + ], + "type": "index", + "data": { + "on": 24, + "name": "idx_remote_asset_cloud_id", + "sql": "CREATE INDEX IF NOT EXISTS idx_remote_asset_cloud_id ON remote_asset_cloud_id_entity (cloud_id)", + "unique": false, + "columns": [] + } + }, + { + "id": 39, + "references": [ + 27 + ], + "type": "index", + "data": { + "on": 27, + "name": "idx_person_owner_id", + "sql": "CREATE INDEX IF NOT EXISTS idx_person_owner_id ON person_entity (owner_id)", + "unique": false, + "columns": [] + } + }, + { + "id": 40, + "references": [ + 28 + ], + "type": "index", + "data": { + "on": 28, + "name": "idx_asset_face_person_id", + "sql": "CREATE INDEX IF NOT EXISTS idx_asset_face_person_id ON asset_face_entity (person_id)", + "unique": false, + "columns": [] + } + }, + { + "id": 41, + "references": [ + 28 + ], + "type": "index", + "data": { + "on": 28, + "name": "idx_asset_face_asset_id", + "sql": "CREATE INDEX IF NOT EXISTS idx_asset_face_asset_id ON asset_face_entity (asset_id)", + "unique": false, + "columns": [] + } + }, + { + "id": 42, + "references": [ + 28 + ], + "type": "index", + "data": { + "on": 28, + "name": "idx_asset_face_visible_person", + "sql": "CREATE INDEX IF NOT EXISTS idx_asset_face_visible_person\nON asset_face_entity (person_id, asset_id)\nWHERE is_visible = 1 AND deleted_at IS NULL\n", + "unique": false, + "columns": [] + } + }, + { + "id": 43, + "references": [ + 30 + ], + "type": "index", + "data": { + "on": 30, + "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": 44, + "references": [ + 30 + ], + "type": "index", + "data": { + "on": 30, + "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": [] + } + }, + { + "id": 45, + "references": [ + 31 + ], + "type": "index", + "data": { + "on": 31, + "name": "idx_asset_edit_asset_id", + "sql": "CREATE INDEX IF NOT EXISTS idx_asset_edit_asset_id ON asset_edit_entity (asset_id)", + "unique": false, + "columns": [] + } + }, + { + "id": 46, + "references": [ + 33 + ], + "type": "index", + "data": { + "on": 33, + "name": "idx_asset_ocr_asset_id", + "sql": "CREATE INDEX IF NOT EXISTS idx_asset_ocr_asset_id ON asset_ocr_entity (asset_id)", + "unique": false, + "columns": [] + } + } + ], + "fixed_sql": [ + { + "name": "user_entity", + "sql": [ + { + "dialect": "sqlite", + "sql": "CREATE TABLE IF NOT EXISTS \"user_entity\" (\"id\" TEXT NOT NULL, \"name\" TEXT NOT NULL, \"email\" TEXT NOT NULL, \"has_profile_image\" INTEGER NOT NULL DEFAULT 0 CHECK (\"has_profile_image\" IN (0, 1)), \"profile_changed_at\" TEXT NOT NULL DEFAULT (CURRENT_TIMESTAMP), \"avatar_color\" INTEGER NOT NULL DEFAULT 0, PRIMARY KEY (\"id\")) WITHOUT ROWID, STRICT;" + } + ] + }, + { + "name": "remote_asset_entity", + "sql": [ + { + "dialect": "sqlite", + "sql": "CREATE TABLE IF NOT EXISTS \"remote_asset_entity\" (\"name\" TEXT NOT NULL, \"type\" INTEGER NOT NULL, \"created_at\" TEXT NOT NULL DEFAULT (CURRENT_TIMESTAMP), \"updated_at\" TEXT NOT NULL DEFAULT (CURRENT_TIMESTAMP), \"width\" INTEGER NULL, \"height\" INTEGER NULL, \"duration_ms\" INTEGER NULL, \"id\" TEXT NOT NULL, \"checksum\" TEXT NOT NULL, \"is_favorite\" INTEGER NOT NULL DEFAULT 0 CHECK (\"is_favorite\" IN (0, 1)), \"owner_id\" TEXT NOT NULL REFERENCES user_entity (id) ON DELETE CASCADE, \"local_date_time\" TEXT NULL, \"thumb_hash\" TEXT NULL, \"deleted_at\" TEXT NULL, \"uploaded_at\" TEXT NULL, \"live_photo_video_id\" TEXT NULL, \"visibility\" INTEGER NOT NULL, \"stack_id\" TEXT NULL, \"library_id\" TEXT NULL, \"is_edited\" INTEGER NOT NULL DEFAULT 0 CHECK (\"is_edited\" IN (0, 1)), PRIMARY KEY (\"id\")) WITHOUT ROWID, STRICT;" + } + ] + }, + { + "name": "stack_entity", + "sql": [ + { + "dialect": "sqlite", + "sql": "CREATE TABLE IF NOT EXISTS \"stack_entity\" (\"id\" TEXT NOT NULL, \"created_at\" TEXT NOT NULL DEFAULT (CURRENT_TIMESTAMP), \"updated_at\" TEXT NOT NULL DEFAULT (CURRENT_TIMESTAMP), \"owner_id\" TEXT NOT NULL REFERENCES user_entity (id) ON DELETE CASCADE, \"primary_asset_id\" TEXT NOT NULL, PRIMARY KEY (\"id\")) WITHOUT ROWID, STRICT;" + } + ] + }, + { + "name": "local_asset_entity", + "sql": [ + { + "dialect": "sqlite", + "sql": "CREATE TABLE IF NOT EXISTS \"local_asset_entity\" (\"name\" TEXT NOT NULL, \"type\" INTEGER NOT NULL, \"created_at\" TEXT NOT NULL DEFAULT (CURRENT_TIMESTAMP), \"updated_at\" TEXT NOT NULL DEFAULT (CURRENT_TIMESTAMP), \"width\" INTEGER NULL, \"height\" INTEGER NULL, \"duration_ms\" INTEGER NULL, \"id\" TEXT NOT NULL, \"checksum\" TEXT NULL, \"is_favorite\" INTEGER NOT NULL DEFAULT 0 CHECK (\"is_favorite\" IN (0, 1)), \"orientation\" INTEGER NOT NULL DEFAULT 0, \"i_cloud_id\" TEXT NULL, \"adjustment_time\" TEXT NULL, \"latitude\" REAL NULL, \"longitude\" REAL NULL, \"playback_style\" INTEGER NOT NULL DEFAULT 0, PRIMARY KEY (\"id\")) WITHOUT ROWID, STRICT;" + } + ] + }, + { + "name": "remote_album_entity", + "sql": [ + { + "dialect": "sqlite", + "sql": "CREATE TABLE IF NOT EXISTS \"remote_album_entity\" (\"id\" TEXT NOT NULL, \"name\" TEXT NOT NULL, \"description\" TEXT NOT NULL DEFAULT '', \"created_at\" TEXT NOT NULL DEFAULT (CURRENT_TIMESTAMP), \"updated_at\" TEXT NOT NULL DEFAULT (CURRENT_TIMESTAMP), \"thumbnail_asset_id\" TEXT NULL REFERENCES remote_asset_entity (id) ON DELETE SET NULL, \"is_activity_enabled\" INTEGER NOT NULL DEFAULT 1 CHECK (\"is_activity_enabled\" IN (0, 1)), \"order\" INTEGER NOT NULL, PRIMARY KEY (\"id\")) WITHOUT ROWID, STRICT;" + } + ] + }, + { + "name": "local_album_entity", + "sql": [ + { + "dialect": "sqlite", + "sql": "CREATE TABLE IF NOT EXISTS \"local_album_entity\" (\"id\" TEXT NOT NULL, \"name\" TEXT NOT NULL, \"updated_at\" TEXT NOT NULL DEFAULT (CURRENT_TIMESTAMP), \"backup_selection\" INTEGER NOT NULL, \"is_ios_shared_album\" INTEGER NOT NULL DEFAULT 0 CHECK (\"is_ios_shared_album\" IN (0, 1)), \"linked_remote_album_id\" TEXT NULL REFERENCES remote_album_entity (id) ON DELETE SET NULL, \"marker\" INTEGER NULL CHECK (\"marker\" IN (0, 1)), PRIMARY KEY (\"id\")) WITHOUT ROWID, STRICT;" + } + ] + }, + { + "name": "local_album_asset_entity", + "sql": [ + { + "dialect": "sqlite", + "sql": "CREATE TABLE IF NOT EXISTS \"local_album_asset_entity\" (\"asset_id\" TEXT NOT NULL REFERENCES local_asset_entity (id) ON DELETE CASCADE, \"album_id\" TEXT NOT NULL REFERENCES local_album_entity (id) ON DELETE CASCADE, \"marker\" INTEGER NULL CHECK (\"marker\" IN (0, 1)), PRIMARY KEY (\"asset_id\", \"album_id\")) WITHOUT ROWID, STRICT;" + } + ] + }, + { + "name": "idx_local_album_asset_album_asset", + "sql": [ + { + "dialect": "sqlite", + "sql": "CREATE INDEX IF NOT EXISTS idx_local_album_asset_album_asset ON local_album_asset_entity (album_id, asset_id)" + } + ] + }, + { + "name": "idx_local_asset_checksum", + "sql": [ + { + "dialect": "sqlite", + "sql": "CREATE INDEX IF NOT EXISTS idx_local_asset_checksum ON local_asset_entity (checksum)" + } + ] + }, + { + "name": "idx_local_asset_cloud_id", + "sql": [ + { + "dialect": "sqlite", + "sql": "CREATE INDEX IF NOT EXISTS idx_local_asset_cloud_id ON local_asset_entity (i_cloud_id)" + } + ] + }, + { + "name": "idx_local_asset_created_at", + "sql": [ + { + "dialect": "sqlite", + "sql": "CREATE INDEX IF NOT EXISTS idx_local_asset_created_at ON local_asset_entity (created_at)" + } + ] + }, + { + "name": "idx_stack_primary_asset_id", + "sql": [ + { + "dialect": "sqlite", + "sql": "CREATE INDEX IF NOT EXISTS idx_stack_primary_asset_id ON stack_entity (primary_asset_id)" + } + ] + }, + { + "name": "UQ_remote_assets_owner_checksum", + "sql": [ + { + "dialect": "sqlite", + "sql": "CREATE UNIQUE INDEX IF NOT EXISTS UQ_remote_assets_owner_checksum ON remote_asset_entity (owner_id, checksum) WHERE(library_id IS NULL)" + } + ] + }, + { + "name": "UQ_remote_assets_owner_library_checksum", + "sql": [ + { + "dialect": "sqlite", + "sql": "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)" + } + ] + }, + { + "name": "idx_remote_asset_checksum", + "sql": [ + { + "dialect": "sqlite", + "sql": "CREATE INDEX IF NOT EXISTS idx_remote_asset_checksum ON remote_asset_entity (checksum)" + } + ] + }, + { + "name": "idx_remote_asset_stack_id", + "sql": [ + { + "dialect": "sqlite", + "sql": "CREATE INDEX IF NOT EXISTS idx_remote_asset_stack_id ON remote_asset_entity (stack_id)" + } + ] + }, + { + "name": "idx_remote_asset_owner_visibility_deleted_created", + "sql": [ + { + "dialect": "sqlite", + "sql": "CREATE INDEX IF NOT EXISTS idx_remote_asset_owner_visibility_deleted_created ON remote_asset_entity (owner_id, visibility, deleted_at, created_at DESC)" + } + ] + }, + { + "name": "idx_remote_asset_uploaded", + "sql": [ + { + "dialect": "sqlite", + "sql": "CREATE INDEX IF NOT EXISTS idx_remote_asset_uploaded ON remote_asset_entity (uploaded_at)" + } + ] + }, + { + "name": "auth_user_entity", + "sql": [ + { + "dialect": "sqlite", + "sql": "CREATE TABLE IF NOT EXISTS \"auth_user_entity\" (\"id\" TEXT NOT NULL, \"name\" TEXT NOT NULL, \"email\" TEXT NOT NULL, \"is_admin\" INTEGER NOT NULL DEFAULT 0 CHECK (\"is_admin\" IN (0, 1)), \"has_profile_image\" INTEGER NOT NULL DEFAULT 0 CHECK (\"has_profile_image\" IN (0, 1)), \"profile_changed_at\" TEXT NOT NULL DEFAULT (CURRENT_TIMESTAMP), \"avatar_color\" INTEGER NOT NULL, \"quota_size_in_bytes\" INTEGER NOT NULL DEFAULT 0, \"quota_usage_in_bytes\" INTEGER NOT NULL DEFAULT 0, \"pin_code\" TEXT NULL, PRIMARY KEY (\"id\")) WITHOUT ROWID, STRICT;" + } + ] + }, + { + "name": "user_metadata_entity", + "sql": [ + { + "dialect": "sqlite", + "sql": "CREATE TABLE IF NOT EXISTS \"user_metadata_entity\" (\"user_id\" TEXT NOT NULL REFERENCES user_entity (id) ON DELETE CASCADE, \"key\" INTEGER NOT NULL, \"value\" BLOB NOT NULL, PRIMARY KEY (\"user_id\", \"key\")) WITHOUT ROWID, STRICT;" + } + ] + }, + { + "name": "partner_entity", + "sql": [ + { + "dialect": "sqlite", + "sql": "CREATE TABLE IF NOT EXISTS \"partner_entity\" (\"shared_by_id\" TEXT NOT NULL REFERENCES user_entity (id) ON DELETE CASCADE, \"shared_with_id\" TEXT NOT NULL REFERENCES user_entity (id) ON DELETE CASCADE, \"in_timeline\" INTEGER NOT NULL DEFAULT 0 CHECK (\"in_timeline\" IN (0, 1)), PRIMARY KEY (\"shared_by_id\", \"shared_with_id\")) WITHOUT ROWID, STRICT;" + } + ] + }, + { + "name": "remote_exif_entity", + "sql": [ + { + "dialect": "sqlite", + "sql": "CREATE TABLE IF NOT EXISTS \"remote_exif_entity\" (\"asset_id\" TEXT NOT NULL REFERENCES remote_asset_entity (id) ON DELETE CASCADE, \"city\" TEXT NULL, \"state\" TEXT NULL, \"country\" TEXT NULL, \"date_time_original\" TEXT NULL, \"description\" TEXT NULL, \"height\" INTEGER NULL, \"width\" INTEGER NULL, \"exposure_time\" TEXT NULL, \"f_number\" REAL NULL, \"file_size\" INTEGER NULL, \"focal_length\" REAL NULL, \"latitude\" REAL NULL, \"longitude\" REAL NULL, \"iso\" INTEGER NULL, \"make\" TEXT NULL, \"model\" TEXT NULL, \"lens\" TEXT NULL, \"orientation\" TEXT NULL, \"time_zone\" TEXT NULL, \"rating\" INTEGER NULL, \"projection_type\" TEXT NULL, PRIMARY KEY (\"asset_id\")) WITHOUT ROWID, STRICT;" + } + ] + }, + { + "name": "remote_album_asset_entity", + "sql": [ + { + "dialect": "sqlite", + "sql": "CREATE TABLE IF NOT EXISTS \"remote_album_asset_entity\" (\"asset_id\" TEXT NOT NULL REFERENCES remote_asset_entity (id) ON DELETE CASCADE, \"album_id\" TEXT NOT NULL REFERENCES remote_album_entity (id) ON DELETE CASCADE, PRIMARY KEY (\"asset_id\", \"album_id\")) WITHOUT ROWID, STRICT;" + } + ] + }, + { + "name": "remote_album_user_entity", + "sql": [ + { + "dialect": "sqlite", + "sql": "CREATE TABLE IF NOT EXISTS \"remote_album_user_entity\" (\"album_id\" TEXT NOT NULL REFERENCES remote_album_entity (id) ON DELETE CASCADE, \"user_id\" TEXT NOT NULL REFERENCES user_entity (id) ON DELETE CASCADE, \"role\" INTEGER NOT NULL, PRIMARY KEY (\"album_id\", \"user_id\")) WITHOUT ROWID, STRICT;" + } + ] + }, + { + "name": "remote_asset_cloud_id_entity", + "sql": [ + { + "dialect": "sqlite", + "sql": "CREATE TABLE IF NOT EXISTS \"remote_asset_cloud_id_entity\" (\"asset_id\" TEXT NOT NULL REFERENCES remote_asset_entity (id) ON DELETE CASCADE, \"cloud_id\" TEXT NULL, \"created_at\" TEXT NULL, \"adjustment_time\" TEXT NULL, \"latitude\" REAL NULL, \"longitude\" REAL NULL, PRIMARY KEY (\"asset_id\")) WITHOUT ROWID, STRICT;" + } + ] + }, + { + "name": "memory_entity", + "sql": [ + { + "dialect": "sqlite", + "sql": "CREATE TABLE IF NOT EXISTS \"memory_entity\" (\"id\" TEXT NOT NULL, \"created_at\" TEXT NOT NULL DEFAULT (CURRENT_TIMESTAMP), \"updated_at\" TEXT NOT NULL DEFAULT (CURRENT_TIMESTAMP), \"deleted_at\" TEXT NULL, \"owner_id\" TEXT NOT NULL REFERENCES user_entity (id) ON DELETE CASCADE, \"type\" INTEGER NOT NULL, \"data\" TEXT NOT NULL, \"is_saved\" INTEGER NOT NULL DEFAULT 0 CHECK (\"is_saved\" IN (0, 1)), \"memory_at\" TEXT NOT NULL, \"seen_at\" TEXT NULL, \"show_at\" TEXT NULL, \"hide_at\" TEXT NULL, PRIMARY KEY (\"id\")) WITHOUT ROWID, STRICT;" + } + ] + }, + { + "name": "memory_asset_entity", + "sql": [ + { + "dialect": "sqlite", + "sql": "CREATE TABLE IF NOT EXISTS \"memory_asset_entity\" (\"asset_id\" TEXT NOT NULL REFERENCES remote_asset_entity (id) ON DELETE CASCADE, \"memory_id\" TEXT NOT NULL REFERENCES memory_entity (id) ON DELETE CASCADE, PRIMARY KEY (\"asset_id\", \"memory_id\")) WITHOUT ROWID, STRICT;" + } + ] + }, + { + "name": "person_entity", + "sql": [ + { + "dialect": "sqlite", + "sql": "CREATE TABLE IF NOT EXISTS \"person_entity\" (\"id\" TEXT NOT NULL, \"created_at\" TEXT NOT NULL DEFAULT (CURRENT_TIMESTAMP), \"updated_at\" TEXT NOT NULL DEFAULT (CURRENT_TIMESTAMP), \"owner_id\" TEXT NOT NULL REFERENCES user_entity (id) ON DELETE CASCADE, \"name\" TEXT NOT NULL, \"face_asset_id\" TEXT NULL, \"is_favorite\" INTEGER NOT NULL CHECK (\"is_favorite\" IN (0, 1)), \"is_hidden\" INTEGER NOT NULL CHECK (\"is_hidden\" IN (0, 1)), \"color\" TEXT NULL, \"birth_date\" TEXT NULL, PRIMARY KEY (\"id\")) WITHOUT ROWID, STRICT;" + } + ] + }, + { + "name": "asset_face_entity", + "sql": [ + { + "dialect": "sqlite", + "sql": "CREATE TABLE IF NOT EXISTS \"asset_face_entity\" (\"id\" TEXT NOT NULL, \"asset_id\" TEXT NOT NULL REFERENCES remote_asset_entity (id) ON DELETE CASCADE, \"person_id\" TEXT NULL REFERENCES person_entity (id) ON DELETE SET NULL, \"image_width\" INTEGER NOT NULL, \"image_height\" INTEGER NOT NULL, \"bounding_box_x1\" INTEGER NOT NULL, \"bounding_box_y1\" INTEGER NOT NULL, \"bounding_box_x2\" INTEGER NOT NULL, \"bounding_box_y2\" INTEGER NOT NULL, \"source_type\" TEXT NOT NULL, \"is_visible\" INTEGER NOT NULL DEFAULT 1 CHECK (\"is_visible\" IN (0, 1)), \"deleted_at\" TEXT NULL, PRIMARY KEY (\"id\")) WITHOUT ROWID, STRICT;" + } + ] + }, + { + "name": "store_entity", + "sql": [ + { + "dialect": "sqlite", + "sql": "CREATE TABLE IF NOT EXISTS \"store_entity\" (\"id\" INTEGER NOT NULL, \"string_value\" TEXT NULL, \"int_value\" INTEGER NULL, PRIMARY KEY (\"id\")) WITHOUT ROWID, STRICT;" + } + ] + }, + { + "name": "trashed_local_asset_entity", + "sql": [ + { + "dialect": "sqlite", + "sql": "CREATE TABLE IF NOT EXISTS \"trashed_local_asset_entity\" (\"name\" TEXT NOT NULL, \"type\" INTEGER NOT NULL, \"created_at\" TEXT NOT NULL DEFAULT (CURRENT_TIMESTAMP), \"updated_at\" TEXT NOT NULL DEFAULT (CURRENT_TIMESTAMP), \"width\" INTEGER NULL, \"height\" INTEGER NULL, \"duration_ms\" INTEGER NULL, \"id\" TEXT NOT NULL, \"album_id\" TEXT NOT NULL, \"checksum\" TEXT NULL, \"is_favorite\" INTEGER NOT NULL DEFAULT 0 CHECK (\"is_favorite\" IN (0, 1)), \"orientation\" INTEGER NOT NULL DEFAULT 0, \"source\" INTEGER NOT NULL, \"playback_style\" INTEGER NOT NULL DEFAULT 0, PRIMARY KEY (\"id\", \"album_id\")) WITHOUT ROWID, STRICT;" + } + ] + }, + { + "name": "asset_edit_entity", + "sql": [ + { + "dialect": "sqlite", + "sql": "CREATE TABLE IF NOT EXISTS \"asset_edit_entity\" (\"id\" TEXT NOT NULL, \"asset_id\" TEXT NOT NULL REFERENCES remote_asset_entity (id) ON DELETE CASCADE, \"action\" INTEGER NOT NULL, \"parameters\" BLOB NOT NULL, \"sequence\" INTEGER NOT NULL, PRIMARY KEY (\"id\")) WITHOUT ROWID, STRICT;" + } + ] + }, + { + "name": "settings", + "sql": [ + { + "dialect": "sqlite", + "sql": "CREATE TABLE IF NOT EXISTS \"settings\" (\"key\" TEXT NOT NULL, \"value\" TEXT NULL, \"updated_at\" TEXT NOT NULL DEFAULT (CURRENT_TIMESTAMP), PRIMARY KEY (\"key\")) WITHOUT ROWID, STRICT;" + } + ] + }, + { + "name": "asset_ocr_entity", + "sql": [ + { + "dialect": "sqlite", + "sql": "CREATE TABLE IF NOT EXISTS \"asset_ocr_entity\" (\"id\" TEXT NOT NULL, \"asset_id\" TEXT NOT NULL REFERENCES remote_asset_entity (id) ON DELETE CASCADE, \"x1\" REAL NOT NULL, \"y1\" REAL NOT NULL, \"x2\" REAL NOT NULL, \"y2\" REAL NOT NULL, \"x3\" REAL NOT NULL, \"y3\" REAL NOT NULL, \"x4\" REAL NOT NULL, \"y4\" REAL NOT NULL, \"box_score\" REAL NOT NULL, \"text_score\" REAL NOT NULL, \"recognized_text\" TEXT NOT NULL, \"is_visible\" INTEGER NOT NULL DEFAULT 1 CHECK (\"is_visible\" IN (0, 1)), PRIMARY KEY (\"id\")) WITHOUT ROWID, STRICT;" + } + ] + }, + { + "name": "idx_partner_shared_with_id", + "sql": [ + { + "dialect": "sqlite", + "sql": "CREATE INDEX IF NOT EXISTS idx_partner_shared_with_id ON partner_entity (shared_with_id)" + } + ] + }, + { + "name": "idx_lat_lng", + "sql": [ + { + "dialect": "sqlite", + "sql": "CREATE INDEX IF NOT EXISTS idx_lat_lng ON remote_exif_entity (latitude, longitude)" + } + ] + }, + { + "name": "idx_remote_exif_city", + "sql": [ + { + "dialect": "sqlite", + "sql": "CREATE INDEX IF NOT EXISTS idx_remote_exif_city ON remote_exif_entity (city) WHERE city IS NOT NULL" + } + ] + }, + { + "name": "idx_remote_album_asset_album_asset", + "sql": [ + { + "dialect": "sqlite", + "sql": "CREATE INDEX IF NOT EXISTS idx_remote_album_asset_album_asset ON remote_album_asset_entity (album_id, asset_id)" + } + ] + }, + { + "name": "idx_remote_asset_cloud_id", + "sql": [ + { + "dialect": "sqlite", + "sql": "CREATE INDEX IF NOT EXISTS idx_remote_asset_cloud_id ON remote_asset_cloud_id_entity (cloud_id)" + } + ] + }, + { + "name": "idx_person_owner_id", + "sql": [ + { + "dialect": "sqlite", + "sql": "CREATE INDEX IF NOT EXISTS idx_person_owner_id ON person_entity (owner_id)" + } + ] + }, + { + "name": "idx_asset_face_person_id", + "sql": [ + { + "dialect": "sqlite", + "sql": "CREATE INDEX IF NOT EXISTS idx_asset_face_person_id ON asset_face_entity (person_id)" + } + ] + }, + { + "name": "idx_asset_face_asset_id", + "sql": [ + { + "dialect": "sqlite", + "sql": "CREATE INDEX IF NOT EXISTS idx_asset_face_asset_id ON asset_face_entity (asset_id)" + } + ] + }, + { + "name": "idx_asset_face_visible_person", + "sql": [ + { + "dialect": "sqlite", + "sql": "CREATE INDEX IF NOT EXISTS idx_asset_face_visible_person ON asset_face_entity (person_id, asset_id) WHERE is_visible = 1 AND deleted_at IS NULL" + } + ] + }, + { + "name": "idx_trashed_local_asset_checksum", + "sql": [ + { + "dialect": "sqlite", + "sql": "CREATE INDEX IF NOT EXISTS idx_trashed_local_asset_checksum ON trashed_local_asset_entity (checksum)" + } + ] + }, + { + "name": "idx_trashed_local_asset_album", + "sql": [ + { + "dialect": "sqlite", + "sql": "CREATE INDEX IF NOT EXISTS idx_trashed_local_asset_album ON trashed_local_asset_entity (album_id)" + } + ] + }, + { + "name": "idx_asset_edit_asset_id", + "sql": [ + { + "dialect": "sqlite", + "sql": "CREATE INDEX IF NOT EXISTS idx_asset_edit_asset_id ON asset_edit_entity (asset_id)" + } + ] + }, + { + "name": "idx_asset_ocr_asset_id", + "sql": [ + { + "dialect": "sqlite", + "sql": "CREATE INDEX IF NOT EXISTS idx_asset_ocr_asset_id ON asset_ocr_entity (asset_id)" + } + ] + } + ] +} \ No newline at end of file diff --git a/mobile/integration_test/background_sync_teardown_test.dart b/mobile/integration_test/background_sync_teardown_test.dart index 0f125b7fcc..3e88109c82 100644 --- a/mobile/integration_test/background_sync_teardown_test.dart +++ b/mobile/integration_test/background_sync_teardown_test.dart @@ -46,7 +46,7 @@ void main() { void sendUser(SyncStream stream, String id, String name) { stream.send( - type: SyncEntityType.userV1.value, + type: SyncEntityType.userV1.toString(), data: SyncUserV1( id: id, name: name, diff --git a/mobile/integration_test/failed_sync_resume_e2e_test.dart b/mobile/integration_test/failed_sync_resume_e2e_test.dart new file mode 100644 index 0000000000..255074df93 --- /dev/null +++ b/mobile/integration_test/failed_sync_resume_e2e_test.dart @@ -0,0 +1,101 @@ +import 'dart:async'; +import 'dart:io'; +import 'dart:math'; + +import 'package:flutter_test/flutter_test.dart'; +import 'package:hooks_riverpod/hooks_riverpod.dart'; +import 'package:immich_mobile/domain/services/background_worker.service.dart'; +import 'package:immich_mobile/domain/utils/background_sync.dart'; +import 'package:immich_mobile/infrastructure/repositories/db.repository.dart'; +import 'package:immich_mobile/main.dart' as app; +import 'package:immich_mobile/platform/background_worker_api.g.dart'; +import 'package:immich_mobile/providers/app_life_cycle.provider.dart'; +import 'package:immich_mobile/providers/background_sync.provider.dart'; +import 'package:immich_mobile/providers/infrastructure/db.provider.dart'; +import 'package:immich_mobile/services/api.service.dart'; +import 'package:immich_mobile/utils/bootstrap.dart'; +import 'package:immich_mobile/wm_executor.dart'; +import 'package:integration_test/integration_test.dart'; + +import 'test_utils/fake_immich_server.dart'; + +// Issue #28082 end-to-end: a resume after a sync froze mid-flight starts a fresh sync. +// Kept in its own file on purpose: run after the failed_sync_resume tests in one process, +// the resume sync starves past its window - a cross-test interaction that survived pool, +// sqlite and bg-worker audits unnamed. One file per process is device-proven green. +void main() { + final binding = IntegrationTestWidgetsFlutterBinding.ensureInitialized(); + binding.framePolicy = LiveTestWidgetsFlutterBindingFramePolicy.fullyLive; + + late Drift drift; + late FakeImmichServer server; + + // main()'s formula with a higher floor: a wedged frozen worker plus a full local + // sync must not starve the fresh resume sync out of its 25s window on 4 cores. + final poolSize = max(Platform.numberOfProcessors - 1, 8); + + setUpAll(() async { + await app.initApp(); + (drift, _) = await Bootstrap.initDomain(); + // A background-worker schedule persisted by real app use on this device can + // launch a second engine mid-file (own isolate pool + full sync) and starve + // these tests on a small device. Unregister it for the whole run. + await BackgroundWorkerFgService(BackgroundWorkerFgHostApi()).disable(); + }); + + setUp(() async { + // A task completing while dispose tears the pool down re-warms it (_schedule + // on the cleared pool re-creates workers), and init on a warm pool is silently + // ignored - poolSize would never apply. Reset first, then verify it took. + await workerManagerPatch.dispose(); + await workerManagerPatch.init(dynamicSpawning: true, isolatesCount: poolSize); + expect( + workerManagerPatch.pool.length, + poolSize, + reason: 'init was ignored: a straggler from the previous test re-warmed the pool', + ); + server = await FakeImmichServer.start(); + await ApiService().resolveAndSetEndpoint(server.endpoint); + await drift.delete(drift.userEntity).go(); + }); + + tearDown(() async { + // Close the server first so any held-open sync stream ends and its isolate unwinds, + // then drain the pool - otherwise dispose waits on the frozen read. + await server.close(); + await workerManagerPatch.dispose(); + }); + + testWidgets('a resume after a sync froze mid-flight starts a fresh sync', (tester) async { + final manager = BackgroundSyncManager(); + // Not disposed on purpose: driftOverride closes the drift on dispose, and that + // drift belongs to setUpAll. The container only holds the shared drift and a + // fire-and-forget resume; the frozen isolates + server are drained by tearDown. + final container = ProviderContainer( + overrides: [driftProvider.overrideWith(driftOverride(drift)), backgroundSyncProvider.overrideWithValue(manager)], + ); + + // A first sync opens /sync/stream and never finishes - the frozen state a + // suspended sync isolate is left in. Holding the stream open keeps + // _syncTask non-null, exactly as it is across an iOS process suspension. + unawaited(manager.syncRemote()); + await server + .streamOpenedNth(1) + .timeout(const Duration(seconds: 30), onTimeout: () => fail('first sync isolate never opened /sync/stream')); + + // The lifecycle then goes background -> foreground. handleAppResume runs the + // resume sync exactly once. On the buggy build it hangs on the stale task's + // future, so it is not awaited here. + final notifier = container.read(appStateProvider.notifier); + await notifier.handleAppPause(); + unawaited(notifier.handleAppResume()); + + await server + .streamOpenedNth(2) + .timeout( + const Duration(seconds: 25), + onTimeout: () => fail('resume did not start a fresh remote sync - the stale frozen sync blocked it (#28082)'), + ); + expect(server.streamOpenCount, greaterThanOrEqualTo(2)); + }); +} diff --git a/mobile/integration_test/failed_sync_resume_test.dart b/mobile/integration_test/failed_sync_resume_test.dart new file mode 100644 index 0000000000..c23319dffe --- /dev/null +++ b/mobile/integration_test/failed_sync_resume_test.dart @@ -0,0 +1,133 @@ +import 'dart:async'; +import 'dart:io'; +import 'dart:math'; + +import 'package:flutter_test/flutter_test.dart'; +import 'package:immich_mobile/domain/services/background_worker.service.dart'; +import 'package:immich_mobile/domain/utils/background_sync.dart'; +import 'package:immich_mobile/infrastructure/repositories/db.repository.dart'; +import 'package:immich_mobile/main.dart' as app; +import 'package:immich_mobile/platform/background_worker_api.g.dart'; +import 'package:immich_mobile/services/api.service.dart'; +import 'package:immich_mobile/utils/bootstrap.dart'; +import 'package:immich_mobile/wm_executor.dart'; +import 'package:integration_test/integration_test.dart'; + +import 'test_utils/fake_immich_server.dart'; + +// Issue #28082: a remote sync in-flight when the app is backgrounded stays referenced +// but frozen across the suspension. On resume the app drops the stale task +// (cancelResumeSyncs) and starts a fresh sync. +// +// Device/emulator tests: real worker isolates + a real drift db + a loopback fake server +// (same pattern as background_sync_teardown_test). The mobile integration-test CI job is +// disabled in test.yml, so like Mert's teardown test this is a local/on-device guard. +// +// The end-to-end resume test lives in failed_sync_resume_e2e_test.dart - one process +// per file keeps it clear of the cross-test interaction described there. +void main() { + final binding = IntegrationTestWidgetsFlutterBinding.ensureInitialized(); + binding.framePolicy = LiveTestWidgetsFlutterBindingFramePolicy.fullyLive; + + late Drift drift; + late FakeImmichServer server; + + // main()'s formula with a higher floor: a wedged frozen worker plus a full local + // sync must not starve the fresh resume sync out of its 25s window on 4 cores. + final poolSize = max(Platform.numberOfProcessors - 1, 8); + + setUpAll(() async { + await app.initApp(); + (drift, _) = await Bootstrap.initDomain(); + // A background-worker schedule persisted by real app use on this device can + // launch a second engine mid-file (own isolate pool + full sync) and starve + // these tests on a small device. Unregister it for the whole run. + await BackgroundWorkerFgService(BackgroundWorkerFgHostApi()).disable(); + }); + + setUp(() async { + // A task completing while dispose tears the pool down re-warms it (_schedule + // on the cleared pool re-creates workers), and init on a warm pool is silently + // ignored - poolSize would never apply. Reset first, then verify it took. + await workerManagerPatch.dispose(); + await workerManagerPatch.init(dynamicSpawning: true, isolatesCount: poolSize); + expect( + workerManagerPatch.pool.length, + poolSize, + reason: 'init was ignored: a straggler from the previous test re-warmed the pool', + ); + server = await FakeImmichServer.start(); + await ApiService().resolveAndSetEndpoint(server.endpoint); + await drift.delete(drift.userEntity).go(); + }); + + tearDown(() async { + // Close the server first so any held-open sync stream ends and its isolate unwinds, + // then drain the pool - otherwise dispose waits on the frozen read. + await server.close(); + await workerManagerPatch.dispose(); + }); + + // Self-contained (bare manager, no fire-and-forget resume), so it runs first: its + // frozen syncs are fully drained by tearDown. + testWidgets('a cancelled sync task does not clear the slot of the fresh task that superseded it', (tester) async { + final manager = BackgroundSyncManager(); + + // First sync opens /sync/stream and is held open - the frozen suspended state. + unawaited(manager.syncRemote()); + await server + .streamOpenedNth(1) + .timeout(const Duration(seconds: 30), onTimeout: () => fail('first sync isolate never opened /sync/stream')); + + // Resume drops the stale task then immediately starts a fresh one, exactly as + // _handleBetaTimelineResume does. cancelResumeSyncs cancels the first task; its + // completion chain then fires and must NOT null the fresh task's slot. + unawaited(manager.cancelResumeSyncs()); + unawaited(manager.syncRemote()); + await server + .streamOpenedNth(2) + .timeout(const Duration(seconds: 30), onTimeout: () => fail('fresh sync isolate never opened /sync/stream')); + + // A third sync stream only opens if the cancelled task cleared the fresh slot, + // letting the dedupe guard start a redundant sync. + var thirdOpened = false; + unawaited(server.streamOpenedNth(3).then((_) => thirdOpened = true)); + + // Let the cancelled task's completion chain settle, then ask to sync again. + await Future.delayed(const Duration(milliseconds: 200)); + unawaited(manager.syncRemote()); + await Future.delayed(const Duration(seconds: 3)); + + expect( + thirdOpened, + isFalse, + reason: 'the cancelled task cleared the fresh task slot, so a redundant third sync started (#28082 clobber)', + ); + expect(server.streamOpenCount, 2); + }); + + // The false-error-flash fix: a task cancelled by cancelResumeSyncs completes with a + // CanceledError, which is not a sync failure and must not reach onRemoteSyncError. + // Before the filter the stale task reported an error right after the fresh sync + // started, so the status UI showed a failure for the whole healthy run. + testWidgets('a cancelled sync does not report a false error to the status callbacks', (tester) async { + final errors = []; + final manager = BackgroundSyncManager(onRemoteSyncError: errors.add); + + // Hold the stream open so the task is genuinely in-flight when it is cancelled. + unawaited(manager.syncRemote()); + await server + .streamOpenedNth(1) + .timeout(const Duration(seconds: 30), onTimeout: () => fail('sync isolate never opened /sync/stream')); + + await manager.cancelResumeSyncs(); + // Let the cancelled task's completion chain run before checking the callbacks. + await Future.delayed(const Duration(milliseconds: 100)); + + expect( + errors, + isEmpty, + reason: 'a cancelled task is not a real error; its CanceledError must not fire onRemoteSyncError', + ); + }); +} diff --git a/mobile/integration_test/module_login/login_input_validation_test.dart b/mobile/integration_test/module_login/login_input_validation_test.dart index 1b47b6d8cc..504940f643 100644 --- a/mobile/integration_test/module_login/login_input_validation_test.dart +++ b/mobile/integration_test/module_login/login_input_validation_test.dart @@ -1,5 +1,5 @@ -import 'package:easy_localization/easy_localization.dart'; import 'package:flutter_test/flutter_test.dart'; +import 'package:immich_mobile/generated/translations.g.dart'; import '../test_utils/general_helper.dart'; @@ -7,45 +7,32 @@ void main() async { await ImmichTestHelper.initialize(); group("Login input validation test", () { - immichWidgetTest("Test leading/trailing whitespace", - (tester, helper) async { + immichWidgetTest("Test leading/trailing whitespace", (tester, helper) async { await helper.loginHelper.waitForLoginScreen(); await helper.loginHelper.acknowledgeNewServerVersion(); - await helper.loginHelper.enterCredentials( - email: " demo@immich.app", - ); + await helper.loginHelper.enterCredentials(email: " demo@immich.app"); await tester.pump(const Duration(milliseconds: 300)); - expect( - find.text("login_form_err_leading_whitespace".tr()), - findsOneWidget, - ); + expect(find.text(StaticTranslations.instance.login_form_err_leading_whitespace), findsOneWidget); - await helper.loginHelper.enterCredentials( - email: "demo@immich.app ", - ); + await helper.loginHelper.enterCredentials(email: "demo@immich.app "); await tester.pump(const Duration(milliseconds: 300)); - expect( - find.text("login_form_err_trailing_whitespace".tr()), - findsOneWidget, - ); + expect(find.text(StaticTranslations.instance.login_form_err_trailing_whitespace), findsOneWidget); }); immichWidgetTest("Test invalid email", (tester, helper) async { await helper.loginHelper.waitForLoginScreen(); await helper.loginHelper.acknowledgeNewServerVersion(); - await helper.loginHelper.enterCredentials( - email: "demo.immich.app", - ); + await helper.loginHelper.enterCredentials(email: "demo.immich.app"); await tester.pump(const Duration(milliseconds: 300)); - expect(find.text("login_form_err_invalid_email".tr()), findsOneWidget); + expect(find.text(StaticTranslations.instance.login_form_err_invalid_email), findsOneWidget); }); }); } diff --git a/mobile/integration_test/test_utils/fake_immich_server.dart b/mobile/integration_test/test_utils/fake_immich_server.dart index c434f83bc5..7c63098c52 100644 --- a/mobile/integration_test/test_utils/fake_immich_server.dart +++ b/mobile/integration_test/test_utils/fake_immich_server.dart @@ -10,6 +10,8 @@ class FakeImmichServer { final (int, int, int) version; final Completer _streamOpened = Completer(); + final List _streamOpens = []; + final Map> _openWaiters = {}; int ackRequests = 0; @@ -18,6 +20,17 @@ class FakeImmichServer { /// Resolves when the sync isolate opens `POST /sync/stream`. Future get streamOpened => _streamOpened.future; + /// How many `/sync/stream` requests have opened so far. + int get streamOpenCount => _streamOpens.length; + + /// Resolves when the [n]-th (1-indexed) `/sync/stream` opens. + Future streamOpenedNth(int n) { + if (_streamOpens.length >= n) { + return Future.value(_streamOpens[n - 1]); + } + return (_openWaiters[n] ??= Completer()).future; + } + static Future start({(int, int, int) version = (3, 0, 0)}) async { final server = await HttpServer.bind(InternetAddress.loopbackIPv4, 0); final fake = FakeImmichServer._(server, version); @@ -58,13 +71,17 @@ class FakeImmichServer { request.response ..statusCode = HttpStatus.ok ..headers.contentType = ContentType('application', 'jsonlines+json') - ..contentLength = -1 // chunked: stays open to stream incrementally + ..contentLength = + -1 // chunked: stays open to stream incrementally ..bufferOutput = false; // Flush headers so the client's send() resolves and enters its read loop. await request.response.flush(); + final stream = SyncStream._(request.response); + _streamOpens.add(stream); if (!_streamOpened.isCompleted) { - _streamOpened.complete(SyncStream._(request.response)); + _streamOpened.complete(stream); } + _openWaiters.remove(_streamOpens.length)?.complete(stream); } Future _respondJson(HttpRequest request, Object body) async { @@ -83,8 +100,8 @@ class FakeImmichServer { } Future close() async { - if (_streamOpened.isCompleted) { - await (await _streamOpened.future).close(); + for (final stream in _streamOpens) { + await stream.close(); } await _server.close(force: true); } diff --git a/mobile/integration_test/test_utils/login_helper.dart b/mobile/integration_test/test_utils/login_helper.dart index cfbc5a9214..ad61b77a53 100644 --- a/mobile/integration_test/test_utils/login_helper.dart +++ b/mobile/integration_test/test_utils/login_helper.dart @@ -1,6 +1,6 @@ -import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; +import 'package:immich_mobile/generated/translations.g.dart'; import 'general_helper.dart'; @@ -23,11 +23,7 @@ class ImmichTestLoginHelper { return true; } - Future enterCredentials({ - String server = "", - String email = "", - String password = "", - }) async { + Future enterCredentials({String server = "", String email = "", String password = ""}) async { final loginForms = find.byType(TextFormField); await tester.enterText(loginForms.at(0), email); @@ -44,49 +40,30 @@ class ImmichTestLoginHelper { } Future enterCredentialsOf(LoginCredentials credentials) async { - await enterCredentials( - server: credentials.server, - email: credentials.email, - password: credentials.password, - ); + await enterCredentials(server: credentials.server, email: credentials.email, password: credentials.password); } Future pressLoginButton() async { - await pumpUntilFound( - tester, - find.textContaining("login_form_button_text".tr()), - ); - final button = find.textContaining("login_form_button_text".tr()); + await pumpUntilFound(tester, find.textContaining(StaticTranslations.instance.login)); + final button = find.textContaining(StaticTranslations.instance.login); await tester.tap(button); } Future assertLoginSuccess() async { - await pumpUntilFound(tester, find.text("home_page_building_timeline".tr())); + await pumpUntilFound(tester, find.text(StaticTranslations.instance.home_page_building_timeline)); } Future assertLoginFailed() async { - await pumpUntilFound(tester, find.text("login_form_failed_login".tr())); + await pumpUntilFound(tester, find.text(StaticTranslations.instance.login_form_failed_login)); } } enum LoginCredentials { - testInstance( - "https://flutter-int-test.preview.immich.app", - "demo@immich.app", - "demo", - ), + testInstance("https://flutter-int-test.preview.immich.app", "demo@immich.app", "demo"), - testInstanceButWithWrongPassword( - "https://flutter-int-test.preview.immich.app", - "demo@immich.app", - "wrong", - ), + testInstanceButWithWrongPassword("https://flutter-int-test.preview.immich.app", "demo@immich.app", "wrong"), - wrongInstanceUrl( - "https://does-not-exist.preview.immich.app", - "demo@immich.app", - "demo", - ); + wrongInstanceUrl("https://does-not-exist.preview.immich.app", "demo@immich.app", "demo"); const LoginCredentials(this.server, this.email, this.password); diff --git a/mobile/ios/.gitignore b/mobile/ios/.gitignore index 63e84080df..8c827d90e9 100644 --- a/mobile/ios/.gitignore +++ b/mobile/ios/.gitignore @@ -26,6 +26,9 @@ Flutter/flutter_export_environment.sh ServiceDefinitions.json Runner/GeneratedPluginRegistrant.* +# Local signing overrides. +Signing.local.xcconfig + # Exceptions to above rules. !default.mode1v3 !default.mode2v3 diff --git a/mobile/ios/Podfile b/mobile/ios/Podfile index a236b027f5..f697d17411 100644 --- a/mobile/ios/Podfile +++ b/mobile/ios/Podfile @@ -1,5 +1,5 @@ # Uncomment this line to define a global platform for your project -platform :ios, '14.0' +platform :ios, '15.0' # CocoaPods analytics sends network stats synchronously affecting flutter build latency. ENV['COCOAPODS_DISABLE_STATS'] = 'true' @@ -45,7 +45,7 @@ post_install do |installer| installer.generated_projects.each do |project| project.targets.each do |target| target.build_configurations.each do |config| - config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '14.0' + config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '15.0' end end end diff --git a/mobile/ios/Podfile.lock b/mobile/ios/Podfile.lock index 5d966e0033..75eda67ce1 100644 --- a/mobile/ios/Podfile.lock +++ b/mobile/ios/Podfile.lock @@ -12,12 +12,8 @@ PODS: - Flutter - fluttertoast (0.0.2): - Flutter - - home_widget (0.0.1): - - Flutter - native_video_player (1.0.0): - Flutter - - permission_handler_apple (9.3.0): - - Flutter - share_handler_ios (0.0.14): - Flutter - share_handler_ios/share_handler_ios_models (= 0.0.14) @@ -34,9 +30,7 @@ DEPENDENCIES: - flutter_local_notifications (from `.symlinks/plugins/flutter_local_notifications/ios`) - flutter_secure_storage (from `.symlinks/plugins/flutter_secure_storage/ios`) - fluttertoast (from `.symlinks/plugins/fluttertoast/ios`) - - home_widget (from `.symlinks/plugins/home_widget/ios`) - native_video_player (from `.symlinks/plugins/native_video_player/ios`) - - permission_handler_apple (from `.symlinks/plugins/permission_handler_apple/ios`) - share_handler_ios (from `.symlinks/plugins/share_handler_ios/ios`) - share_handler_ios_models (from `.symlinks/plugins/share_handler_ios/ios/Models`) @@ -53,12 +47,8 @@ EXTERNAL SOURCES: :path: ".symlinks/plugins/flutter_secure_storage/ios" fluttertoast: :path: ".symlinks/plugins/fluttertoast/ios" - home_widget: - :path: ".symlinks/plugins/home_widget/ios" native_video_player: :path: ".symlinks/plugins/native_video_player/ios" - permission_handler_apple: - :path: ".symlinks/plugins/permission_handler_apple/ios" share_handler_ios: :path: ".symlinks/plugins/share_handler_ios/ios" share_handler_ios_models: @@ -71,12 +61,10 @@ SPEC CHECKSUMS: flutter_local_notifications: ad39620c743ea4c15127860f4b5641649a988100 flutter_secure_storage: 1ed9476fba7e7a782b22888f956cce43e2c62f13 fluttertoast: 2c67e14dce98bbdb200df9e1acf610d7a6264ea1 - home_widget: f169fc41fd807b4d46ab6615dc44d62adbf9f64f native_video_player: b65c58951ede2f93d103a25366bdebca95081265 - permission_handler_apple: 4ed2196e43d0651e8ff7ca3483a069d469701f2d share_handler_ios: e2244e990f826b2c8eaa291ac3831569438ba0fb share_handler_ios_models: fc638c9b4330dc7f082586c92aee9dfa0b87b871 -PODFILE CHECKSUM: 938abbae4114b9c2140c550a2a0d8f7c674f5dfe +PODFILE CHECKSUM: 3c43a700a4bffb4120bf696cad263aefd4bb3c8c COCOAPODS: 1.16.2 diff --git a/mobile/ios/Runner.xcodeproj/project.pbxproj b/mobile/ios/Runner.xcodeproj/project.pbxproj index 96d304f3d7..b569693971 100644 --- a/mobile/ios/Runner.xcodeproj/project.pbxproj +++ b/mobile/ios/Runner.xcodeproj/project.pbxproj @@ -3,7 +3,7 @@ archiveVersion = 1; classes = { }; - objectVersion = 77; + objectVersion = 54; objects = { /* Begin PBXBuildFile section */ @@ -89,6 +89,7 @@ 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; }; 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; + 51516E0F2A0000000000C0F1 /* Signing.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Signing.xcconfig; sourceTree = ""; }; 614A7F5DC5DB09E89E4FCBE8 /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = ""; }; 681FBA560D5D2ADDE4F0B59E /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = ""; }; 6D160F04A389B9FFBC557803 /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = ""; }; @@ -153,11 +154,15 @@ /* Begin PBXFileSystemSynchronizedRootGroup section */ B231F52D2E93A44A00BC45D1 /* Core */ = { isa = PBXFileSystemSynchronizedRootGroup; + exceptions = ( + ); path = Core; sourceTree = ""; }; B2CF7F8C2DDE4EBB00744BF6 /* Sync */ = { isa = PBXFileSystemSynchronizedRootGroup; + exceptions = ( + ); path = Sync; sourceTree = ""; }; @@ -179,6 +184,8 @@ }; FEE084F22EC172080045228E /* Schemas */ = { isa = PBXFileSystemSynchronizedRootGroup; + exceptions = ( + ); path = Schemas; sourceTree = ""; }; @@ -256,6 +263,7 @@ 97C146E51CF9000F007C117D = { isa = PBXGroup; children = ( + 51516E0F2A0000000000C0F1 /* Signing.xcconfig */, 9740EEB11CF90186004384FC /* Flutter */, 97C146F01CF9000F007C117D /* Runner */, FAC6F8B62D287F120078CB2F /* ShareExtension */, @@ -370,7 +378,6 @@ FAC6F89A2D287C890078CB2F /* Embed Foundation Extensions */, 3B06AD1E1E4923F5004D2608 /* Thin Binary */, 513DA7292DED6106813332F4 /* [CP] Embed Pods Frameworks */, - 2FA39DEC809D6D7C4A01EFCB /* [CP] Copy Pods Resources */, ); buildRules = ( ); @@ -464,7 +471,7 @@ ); mainGroup = 97C146E51CF9000F007C117D; packageReferences = ( - 781AD8BC2B33823900A9FFBB /* XCLocalSwiftPackageReference "Flutter/ephemeral/Packages/FlutterGeneratedPluginSwiftPackage" */, + 781AD8BC2B33823900A9FFBB /* XCLocalSwiftPackageReference "FlutterGeneratedPluginSwiftPackage" */, FEE084F62EC172460045228E /* XCRemoteSwiftPackageReference "sqlite-data" */, FEE084F92EC1725A0045228E /* XCRemoteSwiftPackageReference "swift-http-structured-headers" */, ); @@ -511,27 +518,6 @@ /* End PBXResourcesBuildPhase section */ /* Begin PBXShellScriptBuildPhase section */ - 2FA39DEC809D6D7C4A01EFCB /* [CP] Copy Pods Resources */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources-${CONFIGURATION}-input-files.xcfilelist", - ); - inputPaths = ( - ); - name = "[CP] Copy Pods Resources"; - outputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources-${CONFIGURATION}-output-files.xcfilelist", - ); - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources.sh\"\n"; - showEnvVarsInLog = 0; - }; 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { isa = PBXShellScriptBuildPhase; alwaysOutOfDate = 1; @@ -556,14 +542,10 @@ inputFileListPaths = ( "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist", ); - inputPaths = ( - ); name = "[CP] Embed Pods Frameworks"; outputFileListPaths = ( "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist", ); - outputPaths = ( - ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n"; @@ -604,7 +586,7 @@ ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build\n"; + shellScript = "/bin/bash \"$SRCROOT/scripts/xcode_flutter_build.sh\"\n"; }; BAEA01ACA3F5C9CD3D732370 /* [CP] Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; @@ -714,6 +696,7 @@ /* Begin XCBuildConfiguration section */ 249021D3217E4FDB00AE95B9 /* Profile */ = { isa = XCBuildConfiguration; + baseConfigurationReference = 51516E0F2A0000000000C0F1 /* Signing.xcconfig */; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; @@ -744,7 +727,7 @@ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; COPY_PHASE_STRIP = NO; - CUSTOM_GROUP_ID = group.app.immich.share.profile; + CUSTOM_GROUP_ID = "$(IMMICH_GROUP_ID).profile"; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; ENABLE_NS_ASSERTIONS = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; @@ -757,7 +740,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 14.0; + IPHONEOS_DEPLOYMENT_TARGET = 15.0; MTL_ENABLE_DEBUG_INFO = NO; NEW_SETTING = ""; SDKROOT = iphoneos; @@ -777,16 +760,16 @@ CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 4; - DEVELOPMENT_TEAM = 2W7AC6T8T5; + DEVELOPMENT_TEAM = "$(IMMICH_TEAM_ID)"; ENABLE_BITCODE = NO; INFOPLIST_FILE = Runner/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 14.0; + IPHONEOS_DEPLOYMENT_TARGET = 15.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", ); MARKETING_VERSION = 3.0.0; - PRODUCT_BUNDLE_IDENTIFIER = app.futo.immich.profile; + PRODUCT_BUNDLE_IDENTIFIER = "$(IMMICH_BUNDLE_ID_DEV).profile"; PRODUCT_NAME = "Immich-Profile"; PROVISIONING_PROFILE_SPECIFIER = ""; SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; @@ -797,6 +780,7 @@ }; 97C147031CF9000F007C117D /* Debug */ = { isa = XCBuildConfiguration; + baseConfigurationReference = 51516E0F2A0000000000C0F1 /* Signing.xcconfig */; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = AppIcon; @@ -827,7 +811,7 @@ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; COPY_PHASE_STRIP = NO; - CUSTOM_GROUP_ID = group.app.immich.share.debug; + CUSTOM_GROUP_ID = "$(IMMICH_GROUP_ID).debug"; DEBUG_INFORMATION_FORMAT = dwarf; ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; @@ -846,7 +830,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 14.0; + IPHONEOS_DEPLOYMENT_TARGET = 15.0; MTL_ENABLE_DEBUG_INFO = YES; NEW_SETTING = ""; ONLY_ACTIVE_ARCH = YES; @@ -857,6 +841,7 @@ }; 97C147041CF9000F007C117D /* Release */ = { isa = XCBuildConfiguration; + baseConfigurationReference = 51516E0F2A0000000000C0F1 /* Signing.xcconfig */; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = AppIcon; @@ -887,7 +872,7 @@ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; COPY_PHASE_STRIP = NO; - CUSTOM_GROUP_ID = group.app.immich.share; + CUSTOM_GROUP_ID = "$(IMMICH_GROUP_ID)"; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; ENABLE_NS_ASSERTIONS = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; @@ -900,7 +885,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 14.0; + IPHONEOS_DEPLOYMENT_TARGET = 15.0; MTL_ENABLE_DEBUG_INFO = NO; NEW_SETTING = ""; SDKROOT = iphoneos; @@ -922,16 +907,16 @@ CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 4; - DEVELOPMENT_TEAM = 2W7AC6T8T5; + DEVELOPMENT_TEAM = "$(IMMICH_TEAM_ID)"; ENABLE_BITCODE = NO; INFOPLIST_FILE = Runner/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 14.0; + IPHONEOS_DEPLOYMENT_TARGET = 15.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", ); MARKETING_VERSION = 3.0.0; - PRODUCT_BUNDLE_IDENTIFIER = app.futo.immich.debug; + PRODUCT_BUNDLE_IDENTIFIER = "$(IMMICH_BUNDLE_ID_DEV).debug"; PRODUCT_NAME = "Immich-Debug"; PROVISIONING_PROFILE_SPECIFIER = ""; SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; @@ -951,16 +936,16 @@ CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 4; - DEVELOPMENT_TEAM = 2W7AC6T8T5; + DEVELOPMENT_TEAM = "$(IMMICH_TEAM_ID)"; ENABLE_BITCODE = NO; INFOPLIST_FILE = Runner/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 14.0; + IPHONEOS_DEPLOYMENT_TARGET = 15.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", ); MARKETING_VERSION = 3.0.0; - PRODUCT_BUNDLE_IDENTIFIER = app.alextran.immich; + PRODUCT_BUNDLE_IDENTIFIER = "$(IMMICH_BUNDLE_ID_PROD)"; PRODUCT_NAME = Immich; PROVISIONING_PROFILE_SPECIFIER = ""; SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; @@ -984,7 +969,7 @@ CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 240; - DEVELOPMENT_TEAM = 2W7AC6T8T5; + DEVELOPMENT_TEAM = "$(IMMICH_TEAM_ID)"; ENABLE_USER_SCRIPT_SANDBOXING = YES; GCC_C_LANGUAGE_STANDARD = gnu17; GENERATE_INFOPLIST_FILE = YES; @@ -1001,7 +986,7 @@ MARKETING_VERSION = 1.0; MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; MTL_FAST_MATH = YES; - PRODUCT_BUNDLE_IDENTIFIER = app.futo.immich.debug.Widget; + PRODUCT_BUNDLE_IDENTIFIER = "$(IMMICH_BUNDLE_ID_DEV).debug.Widget"; PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; SWIFT_ACTIVE_COMPILATION_CONDITIONS = "DEBUG $(inherited)"; @@ -1027,7 +1012,7 @@ CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 240; - DEVELOPMENT_TEAM = 2W7AC6T8T5; + DEVELOPMENT_TEAM = "$(IMMICH_TEAM_ID)"; ENABLE_USER_SCRIPT_SANDBOXING = YES; GCC_C_LANGUAGE_STANDARD = gnu17; GENERATE_INFOPLIST_FILE = YES; @@ -1043,7 +1028,7 @@ LOCALIZATION_PREFERS_STRING_CATALOGS = YES; MARKETING_VERSION = 1.0; MTL_FAST_MATH = YES; - PRODUCT_BUNDLE_IDENTIFIER = app.alextran.immich.Widget; + PRODUCT_BUNDLE_IDENTIFIER = "$(IMMICH_BUNDLE_ID_PROD).Widget"; PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; SWIFT_EMIT_LOC_STRINGS = YES; @@ -1067,7 +1052,7 @@ CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 240; - DEVELOPMENT_TEAM = 2W7AC6T8T5; + DEVELOPMENT_TEAM = "$(IMMICH_TEAM_ID)"; ENABLE_USER_SCRIPT_SANDBOXING = YES; GCC_C_LANGUAGE_STANDARD = gnu17; GENERATE_INFOPLIST_FILE = YES; @@ -1083,7 +1068,7 @@ LOCALIZATION_PREFERS_STRING_CATALOGS = YES; MARKETING_VERSION = 1.0; MTL_FAST_MATH = YES; - PRODUCT_BUNDLE_IDENTIFIER = app.futo.immich.profile.Widget; + PRODUCT_BUNDLE_IDENTIFIER = "$(IMMICH_BUNDLE_ID_DEV).profile.Widget"; PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; SWIFT_EMIT_LOC_STRINGS = YES; @@ -1106,7 +1091,7 @@ CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 240; - DEVELOPMENT_TEAM = 2W7AC6T8T5; + DEVELOPMENT_TEAM = "$(IMMICH_TEAM_ID)"; ENABLE_USER_SCRIPT_SANDBOXING = YES; GCC_C_LANGUAGE_STANDARD = gnu17; GENERATE_INFOPLIST_FILE = YES; @@ -1123,7 +1108,7 @@ MARKETING_VERSION = 1.0; MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; MTL_FAST_MATH = YES; - PRODUCT_BUNDLE_IDENTIFIER = app.futo.immich.debug.ShareExtension; + PRODUCT_BUNDLE_IDENTIFIER = "$(IMMICH_BUNDLE_ID_DEV).debug.ShareExtension"; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; SKIP_INSTALL = YES; @@ -1149,7 +1134,7 @@ CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 240; - DEVELOPMENT_TEAM = 2W7AC6T8T5; + DEVELOPMENT_TEAM = "$(IMMICH_TEAM_ID)"; ENABLE_USER_SCRIPT_SANDBOXING = YES; GCC_C_LANGUAGE_STANDARD = gnu17; GENERATE_INFOPLIST_FILE = YES; @@ -1165,7 +1150,7 @@ LOCALIZATION_PREFERS_STRING_CATALOGS = YES; MARKETING_VERSION = 1.0; MTL_FAST_MATH = YES; - PRODUCT_BUNDLE_IDENTIFIER = app.alextran.immich.ShareExtension; + PRODUCT_BUNDLE_IDENTIFIER = "$(IMMICH_BUNDLE_ID_PROD).ShareExtension"; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; SKIP_INSTALL = YES; @@ -1189,7 +1174,7 @@ CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 240; - DEVELOPMENT_TEAM = 2W7AC6T8T5; + DEVELOPMENT_TEAM = "$(IMMICH_TEAM_ID)"; ENABLE_USER_SCRIPT_SANDBOXING = YES; GCC_C_LANGUAGE_STANDARD = gnu17; GENERATE_INFOPLIST_FILE = YES; @@ -1205,7 +1190,7 @@ LOCALIZATION_PREFERS_STRING_CATALOGS = YES; MARKETING_VERSION = 1.0; MTL_FAST_MATH = YES; - PRODUCT_BUNDLE_IDENTIFIER = app.futo.immich.profile.ShareExtension; + PRODUCT_BUNDLE_IDENTIFIER = "$(IMMICH_BUNDLE_ID_DEV).profile.ShareExtension"; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; SKIP_INSTALL = YES; @@ -1261,7 +1246,7 @@ /* End XCConfigurationList section */ /* Begin XCLocalSwiftPackageReference section */ - 781AD8BC2B33823900A9FFBB /* XCLocalSwiftPackageReference "Flutter/ephemeral/Packages/FlutterGeneratedPluginSwiftPackage" */ = { + 781AD8BC2B33823900A9FFBB /* XCLocalSwiftPackageReference "FlutterGeneratedPluginSwiftPackage" */ = { isa = XCLocalSwiftPackageReference; relativePath = Flutter/ephemeral/Packages/FlutterGeneratedPluginSwiftPackage; }; diff --git a/mobile/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/mobile/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved index a9381e541a..e1c39435fa 100644 --- a/mobile/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/mobile/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -32,8 +32,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/maplibre/maplibre-gl-native-distribution.git", "state" : { - "revision" : "60d9bb85c94ce6e7fc4406cd32529fd12bdb7809", - "version" : "6.14.0" + "revision" : "84a79bc375a301169390ac110c868f06c857b83f", + "version" : "6.27.0" } }, { diff --git a/mobile/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/mobile/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme index f8dd8b0b9f..72c577d41e 100644 --- a/mobile/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme +++ b/mobile/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme @@ -70,7 +70,8 @@ debugDocumentVersioning = "YES" debugServiceExtension = "internal" enableGPUValidationMode = "1" - allowLocationSimulation = "YES"> + allowLocationSimulation = "YES" + queueDebuggingEnabled = "NO"> [Any?] { - return [result] -} - -private func wrapError(_ error: Any) -> [Any?] { - if let pigeonError = error as? PigeonError { - return [ - pigeonError.code, - pigeonError.message, - pigeonError.details, - ] - } - if let flutterError = error as? FlutterError { - return [ - flutterError.code, - flutterError.message, - flutterError.details, - ] - } - return [ - "\(error)", - "\(Swift.type(of: error))", - "Stacktrace: \(Thread.callStackSymbols)", - ] -} - -private func createConnectionError(withChannelName channelName: String) -> PigeonError { - return PigeonError(code: "channel-error", message: "Unable to establish connection on channel: '\(channelName)'.", details: "") -} - -private func isNullish(_ value: Any?) -> Bool { - return value is NSNull || value == nil -} - -private func nilOrValue(_ value: Any?) -> T? { - if value is NSNull { return nil } - return value as! T? -} - -private func doubleEqualsBackgroundWorker(_ lhs: Double, _ rhs: Double) -> Bool { - return (lhs.isNaN && rhs.isNaN) || lhs == rhs -} - -private func doubleHashBackgroundWorker(_ value: Double, _ hasher: inout Hasher) { - if value.isNaN { - hasher.combine(0x7FF8000000000000) - } else { - // Normalize -0.0 to 0.0 - hasher.combine(value == 0 ? 0 : value) - } -} - -func deepEqualsBackgroundWorker(_ lhs: Any?, _ rhs: Any?) -> Bool { - let cleanLhs = nilOrValue(lhs) as Any? - let cleanRhs = nilOrValue(rhs) as Any? - switch (cleanLhs, cleanRhs) { - case (nil, nil): - return true - - case (nil, _), (_, nil): - return false - - case (let lhs as AnyObject, let rhs as AnyObject) where lhs === rhs: - return true - - case is (Void, Void): - return true - - case (let lhsArray, let rhsArray) as ([Any?], [Any?]): - guard lhsArray.count == rhsArray.count else { return false } - for (index, element) in lhsArray.enumerated() { - if !deepEqualsBackgroundWorker(element, rhsArray[index]) { - return false - } - } - return true - - case (let lhsArray, let rhsArray) as ([Double], [Double]): - guard lhsArray.count == rhsArray.count else { return false } - for (index, element) in lhsArray.enumerated() { - if !doubleEqualsBackgroundWorker(element, rhsArray[index]) { - return false - } - } - return true - - case (let lhsDictionary, let rhsDictionary) as ([AnyHashable: Any?], [AnyHashable: Any?]): - guard lhsDictionary.count == rhsDictionary.count else { return false } - for (lhsKey, lhsValue) in lhsDictionary { - var found = false - for (rhsKey, rhsValue) in rhsDictionary { - if deepEqualsBackgroundWorker(lhsKey, rhsKey) { - if deepEqualsBackgroundWorker(lhsValue, rhsValue) { - found = true - break - } else { - return false - } - } - } - if !found { return false } - } - return true - - case (let lhs as Double, let rhs as Double): - return doubleEqualsBackgroundWorker(lhs, rhs) - - case (let lhsHashable, let rhsHashable) as (AnyHashable, AnyHashable): - return lhsHashable == rhsHashable - - default: - return false - } -} - -func deepHashBackgroundWorker(value: Any?, hasher: inout Hasher) { - let cleanValue = nilOrValue(value) as Any? - if let cleanValue = cleanValue { - if let doubleValue = cleanValue as? Double { - doubleHashBackgroundWorker(doubleValue, &hasher) - } else if let valueList = cleanValue as? [Any?] { - for item in valueList { - deepHashBackgroundWorker(value: item, hasher: &hasher) - } - } else if let valueList = cleanValue as? [Double] { - for item in valueList { - doubleHashBackgroundWorker(item, &hasher) - } - } else if let valueDict = cleanValue as? [AnyHashable: Any?] { - var result = 0 - for (key, value) in valueDict { - var entryKeyHasher = Hasher() - deepHashBackgroundWorker(value: key, hasher: &entryKeyHasher) - var entryValueHasher = Hasher() - deepHashBackgroundWorker(value: value, hasher: &entryValueHasher) - result = result &+ ((entryKeyHasher.finalize() &* 31) ^ entryValueHasher.finalize()) - } - hasher.combine(result) - } else if let hashableValue = cleanValue as? AnyHashable { - hasher.combine(hashableValue) - } else { - hasher.combine(String(describing: cleanValue)) - } - } else { - hasher.combine(0) - } -} - - -/// Generated class from Pigeon that represents data sent in messages. -struct BackgroundWorkerSettings: Hashable { - var requiresCharging: Bool - var minimumDelaySeconds: Int64 - - - // swift-format-ignore: AlwaysUseLowerCamelCase - static func fromList(_ pigeonVar_list: [Any?]) -> BackgroundWorkerSettings? { - let requiresCharging = pigeonVar_list[0] as! Bool - let minimumDelaySeconds = pigeonVar_list[1] as! Int64 - - return BackgroundWorkerSettings( - requiresCharging: requiresCharging, - minimumDelaySeconds: minimumDelaySeconds - ) - } - func toList() -> [Any?] { - return [ - requiresCharging, - minimumDelaySeconds, - ] - } - static func == (lhs: BackgroundWorkerSettings, rhs: BackgroundWorkerSettings) -> Bool { - if Swift.type(of: lhs) != Swift.type(of: rhs) { - return false - } - return deepEqualsBackgroundWorker(lhs.requiresCharging, rhs.requiresCharging) && deepEqualsBackgroundWorker(lhs.minimumDelaySeconds, rhs.minimumDelaySeconds) - } - - func hash(into hasher: inout Hasher) { - hasher.combine("BackgroundWorkerSettings") - deepHashBackgroundWorker(value: requiresCharging, hasher: &hasher) - deepHashBackgroundWorker(value: minimumDelaySeconds, hasher: &hasher) - } -} - -private class BackgroundWorkerPigeonCodecReader: FlutterStandardReader { - override func readValue(ofType type: UInt8) -> Any? { - switch type { - case 129: - return BackgroundWorkerSettings.fromList(self.readValue() as! [Any?]) - default: - return super.readValue(ofType: type) - } - } -} - -private class BackgroundWorkerPigeonCodecWriter: FlutterStandardWriter { - override func writeValue(_ value: Any) { - if let value = value as? BackgroundWorkerSettings { - super.writeByte(129) - super.writeValue(value.toList()) - } else { - super.writeValue(value) - } - } -} - -private class BackgroundWorkerPigeonCodecReaderWriter: FlutterStandardReaderWriter { - override func reader(with data: Data) -> FlutterStandardReader { - return BackgroundWorkerPigeonCodecReader(data: data) - } - - override func writer(with data: NSMutableData) -> FlutterStandardWriter { - return BackgroundWorkerPigeonCodecWriter(data: data) - } -} - -class BackgroundWorkerPigeonCodec: FlutterStandardMessageCodec, @unchecked Sendable { - static let shared = BackgroundWorkerPigeonCodec(readerWriter: BackgroundWorkerPigeonCodecReaderWriter()) -} - -/// Generated protocol from Pigeon that represents a handler of messages from Flutter. -protocol BackgroundWorkerFgHostApi { - func enable() throws - func saveNotificationMessage(title: String, body: String) throws - func configure(settings: BackgroundWorkerSettings) throws - func disable() throws -} - -/// Generated setup class from Pigeon to handle messages through the `binaryMessenger`. -class BackgroundWorkerFgHostApiSetup { - static var codec: FlutterStandardMessageCodec { BackgroundWorkerPigeonCodec.shared } - /// Sets up an instance of `BackgroundWorkerFgHostApi` to handle messages through the `binaryMessenger`. - static func setUp(binaryMessenger: FlutterBinaryMessenger, api: BackgroundWorkerFgHostApi?, messageChannelSuffix: String = "") { - let channelSuffix = messageChannelSuffix.count > 0 ? ".\(messageChannelSuffix)" : "" - let enableChannel = FlutterBasicMessageChannel(name: "dev.flutter.pigeon.immich_mobile.BackgroundWorkerFgHostApi.enable\(channelSuffix)", binaryMessenger: binaryMessenger, codec: codec) - if let api = api { - enableChannel.setMessageHandler { _, reply in - do { - try api.enable() - reply(wrapResult(nil)) - } catch { - reply(wrapError(error)) - } - } - } else { - enableChannel.setMessageHandler(nil) - } - let saveNotificationMessageChannel = FlutterBasicMessageChannel(name: "dev.flutter.pigeon.immich_mobile.BackgroundWorkerFgHostApi.saveNotificationMessage\(channelSuffix)", binaryMessenger: binaryMessenger, codec: codec) - if let api = api { - saveNotificationMessageChannel.setMessageHandler { message, reply in - let args = message as! [Any?] - let titleArg = args[0] as! String - let bodyArg = args[1] as! String - do { - try api.saveNotificationMessage(title: titleArg, body: bodyArg) - reply(wrapResult(nil)) - } catch { - reply(wrapError(error)) - } - } - } else { - saveNotificationMessageChannel.setMessageHandler(nil) - } - let configureChannel = FlutterBasicMessageChannel(name: "dev.flutter.pigeon.immich_mobile.BackgroundWorkerFgHostApi.configure\(channelSuffix)", binaryMessenger: binaryMessenger, codec: codec) - if let api = api { - configureChannel.setMessageHandler { message, reply in - let args = message as! [Any?] - let settingsArg = args[0] as! BackgroundWorkerSettings - do { - try api.configure(settings: settingsArg) - reply(wrapResult(nil)) - } catch { - reply(wrapError(error)) - } - } - } else { - configureChannel.setMessageHandler(nil) - } - let disableChannel = FlutterBasicMessageChannel(name: "dev.flutter.pigeon.immich_mobile.BackgroundWorkerFgHostApi.disable\(channelSuffix)", binaryMessenger: binaryMessenger, codec: codec) - if let api = api { - disableChannel.setMessageHandler { _, reply in - do { - try api.disable() - reply(wrapResult(nil)) - } catch { - reply(wrapError(error)) - } - } - } else { - disableChannel.setMessageHandler(nil) - } - } -} -/// Generated protocol from Pigeon that represents a handler of messages from Flutter. -protocol BackgroundWorkerBgHostApi { - func onInitialized() throws - func close() throws -} - -/// Generated setup class from Pigeon to handle messages through the `binaryMessenger`. -class BackgroundWorkerBgHostApiSetup { - static var codec: FlutterStandardMessageCodec { BackgroundWorkerPigeonCodec.shared } - /// Sets up an instance of `BackgroundWorkerBgHostApi` to handle messages through the `binaryMessenger`. - static func setUp(binaryMessenger: FlutterBinaryMessenger, api: BackgroundWorkerBgHostApi?, messageChannelSuffix: String = "") { - let channelSuffix = messageChannelSuffix.count > 0 ? ".\(messageChannelSuffix)" : "" - let onInitializedChannel = FlutterBasicMessageChannel(name: "dev.flutter.pigeon.immich_mobile.BackgroundWorkerBgHostApi.onInitialized\(channelSuffix)", binaryMessenger: binaryMessenger, codec: codec) - if let api = api { - onInitializedChannel.setMessageHandler { _, reply in - do { - try api.onInitialized() - reply(wrapResult(nil)) - } catch { - reply(wrapError(error)) - } - } - } else { - onInitializedChannel.setMessageHandler(nil) - } - let closeChannel = FlutterBasicMessageChannel(name: "dev.flutter.pigeon.immich_mobile.BackgroundWorkerBgHostApi.close\(channelSuffix)", binaryMessenger: binaryMessenger, codec: codec) - if let api = api { - closeChannel.setMessageHandler { _, reply in - do { - try api.close() - reply(wrapResult(nil)) - } catch { - reply(wrapError(error)) - } - } - } else { - closeChannel.setMessageHandler(nil) - } - } -} -/// Generated protocol from Pigeon that represents Flutter messages that can be called from Swift. -protocol BackgroundWorkerFlutterApiProtocol { - func onIosUpload(isRefresh isRefreshArg: Bool, maxSeconds maxSecondsArg: Int64?, completion: @escaping (Result) -> Void) - func onAndroidUpload(maxMinutes maxMinutesArg: Int64?, completion: @escaping (Result) -> Void) - func cancel(completion: @escaping (Result) -> Void) -} -class BackgroundWorkerFlutterApi: BackgroundWorkerFlutterApiProtocol { - private let binaryMessenger: FlutterBinaryMessenger - private let messageChannelSuffix: String - init(binaryMessenger: FlutterBinaryMessenger, messageChannelSuffix: String = "") { - self.binaryMessenger = binaryMessenger - self.messageChannelSuffix = messageChannelSuffix.count > 0 ? ".\(messageChannelSuffix)" : "" - } - var codec: BackgroundWorkerPigeonCodec { - return BackgroundWorkerPigeonCodec.shared - } - func onIosUpload(isRefresh isRefreshArg: Bool, maxSeconds maxSecondsArg: Int64?, completion: @escaping (Result) -> Void) { - let channelName: String = "dev.flutter.pigeon.immich_mobile.BackgroundWorkerFlutterApi.onIosUpload\(messageChannelSuffix)" - let channel = FlutterBasicMessageChannel(name: channelName, binaryMessenger: binaryMessenger, codec: codec) - channel.sendMessage([isRefreshArg, maxSecondsArg] as [Any?]) { response in - guard let listResponse = response as? [Any?] else { - completion(.failure(createConnectionError(withChannelName: channelName))) - return - } - if listResponse.count > 1 { - let code: String = listResponse[0] as! String - let message: String? = nilOrValue(listResponse[1]) - let details: String? = nilOrValue(listResponse[2]) - completion(.failure(PigeonError(code: code, message: message, details: details))) - } else { - completion(.success(())) - } - } - } - func onAndroidUpload(maxMinutes maxMinutesArg: Int64?, completion: @escaping (Result) -> Void) { - let channelName: String = "dev.flutter.pigeon.immich_mobile.BackgroundWorkerFlutterApi.onAndroidUpload\(messageChannelSuffix)" - let channel = FlutterBasicMessageChannel(name: channelName, binaryMessenger: binaryMessenger, codec: codec) - channel.sendMessage([maxMinutesArg] as [Any?]) { response in - guard let listResponse = response as? [Any?] else { - completion(.failure(createConnectionError(withChannelName: channelName))) - return - } - if listResponse.count > 1 { - let code: String = listResponse[0] as! String - let message: String? = nilOrValue(listResponse[1]) - let details: String? = nilOrValue(listResponse[2]) - completion(.failure(PigeonError(code: code, message: message, details: details))) - } else { - completion(.success(())) - } - } - } - func cancel(completion: @escaping (Result) -> Void) { - let channelName: String = "dev.flutter.pigeon.immich_mobile.BackgroundWorkerFlutterApi.cancel\(messageChannelSuffix)" - let channel = FlutterBasicMessageChannel(name: channelName, binaryMessenger: binaryMessenger, codec: codec) - channel.sendMessage(nil) { response in - guard let listResponse = response as? [Any?] else { - completion(.failure(createConnectionError(withChannelName: channelName))) - return - } - if listResponse.count > 1 { - let code: String = listResponse[0] as! String - let message: String? = nilOrValue(listResponse[1]) - let details: String? = nilOrValue(listResponse[2]) - completion(.failure(PigeonError(code: code, message: message, details: details))) - } else { - completion(.success(())) - } - } - } -} diff --git a/mobile/ios/Runner/Connectivity/Connectivity.g.swift b/mobile/ios/Runner/Connectivity/Connectivity.g.swift deleted file mode 100644 index c7aff63e10..0000000000 --- a/mobile/ios/Runner/Connectivity/Connectivity.g.swift +++ /dev/null @@ -1,129 +0,0 @@ -// Autogenerated from Pigeon (v26.3.4), do not edit directly. -// See also: https://pub.dev/packages/pigeon - -import Foundation - -#if os(iOS) - import Flutter -#elseif os(macOS) - import FlutterMacOS -#else - #error("Unsupported platform.") -#endif - -private func wrapResult(_ result: Any?) -> [Any?] { - return [result] -} - -private func wrapError(_ error: Any) -> [Any?] { - if let pigeonError = error as? PigeonError { - return [ - pigeonError.code, - pigeonError.message, - pigeonError.details, - ] - } - if let flutterError = error as? FlutterError { - return [ - flutterError.code, - flutterError.message, - flutterError.details, - ] - } - return [ - "\(error)", - "\(Swift.type(of: error))", - "Stacktrace: \(Thread.callStackSymbols)", - ] -} - -private func isNullish(_ value: Any?) -> Bool { - return value is NSNull || value == nil -} - -private func nilOrValue(_ value: Any?) -> T? { - if value is NSNull { return nil } - return value as! T? -} - - -enum NetworkCapability: Int { - case cellular = 0 - case wifi = 1 - case vpn = 2 - case unmetered = 3 -} - -private class ConnectivityPigeonCodecReader: FlutterStandardReader { - override func readValue(ofType type: UInt8) -> Any? { - switch type { - case 129: - let enumResultAsInt: Int? = nilOrValue(self.readValue() as! Int?) - if let enumResultAsInt = enumResultAsInt { - return NetworkCapability(rawValue: enumResultAsInt) - } - return nil - default: - return super.readValue(ofType: type) - } - } -} - -private class ConnectivityPigeonCodecWriter: FlutterStandardWriter { - override func writeValue(_ value: Any) { - if let value = value as? NetworkCapability { - super.writeByte(129) - super.writeValue(value.rawValue) - } else { - super.writeValue(value) - } - } -} - -private class ConnectivityPigeonCodecReaderWriter: FlutterStandardReaderWriter { - override func reader(with data: Data) -> FlutterStandardReader { - return ConnectivityPigeonCodecReader(data: data) - } - - override func writer(with data: NSMutableData) -> FlutterStandardWriter { - return ConnectivityPigeonCodecWriter(data: data) - } -} - -class ConnectivityPigeonCodec: FlutterStandardMessageCodec, @unchecked Sendable { - static let shared = ConnectivityPigeonCodec(readerWriter: ConnectivityPigeonCodecReaderWriter()) -} - -/// Generated protocol from Pigeon that represents a handler of messages from Flutter. -protocol ConnectivityApi { - func getCapabilities() throws -> [NetworkCapability] -} - -/// Generated setup class from Pigeon to handle messages through the `binaryMessenger`. -class ConnectivityApiSetup { - static var codec: FlutterStandardMessageCodec { ConnectivityPigeonCodec.shared } - /// Sets up an instance of `ConnectivityApi` to handle messages through the `binaryMessenger`. - static func setUp(binaryMessenger: FlutterBinaryMessenger, api: ConnectivityApi?, messageChannelSuffix: String = "") { - let channelSuffix = messageChannelSuffix.count > 0 ? ".\(messageChannelSuffix)" : "" - #if os(iOS) - let taskQueue = binaryMessenger.makeBackgroundTaskQueue?() - #else - let taskQueue: FlutterTaskQueue? = nil - #endif - let getCapabilitiesChannel = taskQueue == nil - ? FlutterBasicMessageChannel(name: "dev.flutter.pigeon.immich_mobile.ConnectivityApi.getCapabilities\(channelSuffix)", binaryMessenger: binaryMessenger, codec: codec) - : FlutterBasicMessageChannel(name: "dev.flutter.pigeon.immich_mobile.ConnectivityApi.getCapabilities\(channelSuffix)", binaryMessenger: binaryMessenger, codec: codec, taskQueue: taskQueue) - if let api = api { - getCapabilitiesChannel.setMessageHandler { _, reply in - do { - let result = try api.getCapabilities() - reply(wrapResult(result)) - } catch { - reply(wrapError(error)) - } - } - } else { - getCapabilitiesChannel.setMessageHandler(nil) - } - } -} diff --git a/mobile/ios/Runner/Connectivity/ConnectivityApiImpl.swift b/mobile/ios/Runner/Connectivity/ConnectivityApiImpl.swift index f104314fae..e88b7a0fd6 100644 --- a/mobile/ios/Runner/Connectivity/ConnectivityApiImpl.swift +++ b/mobile/ios/Runner/Connectivity/ConnectivityApiImpl.swift @@ -43,15 +43,16 @@ class ConnectivityApiImpl: ConnectivityApi { capabilities.append(.vpn) } - // Determine if connection is unmetered: - // - Must be on WiFi (not cellular) - // - Must not be expensive (rules out personal hotspot) - // - Must not be constrained (Low Data Mode) - // Note: VPN over cellular should still be considered metered + // Determine if connection is unmetered from the OS metered flags rather than + // the interface type, so wired ethernet (iPhone USB adapters, Apple Silicon + // Macs) is treated as unmetered like Wi-Fi: + // - Not on cellular + // - Not expensive (also rules out cellular and personal hotspot) + // - Not constrained (Low Data Mode) + // Note: VPN over cellular stays metered because the path is still expensive. let isOnCellular = path.usesInterfaceType(.cellular) - let isOnWifi = path.usesInterfaceType(.wifi) - - if isOnWifi && !isOnCellular && !path.isExpensive && !path.isConstrained { + + if !isOnCellular && !path.isExpensive && !path.isConstrained { capabilities.append(.unmetered) } diff --git a/mobile/ios/Runner/Core/Network.g.swift b/mobile/ios/Runner/Core/Network.g.swift deleted file mode 100644 index 265923d165..0000000000 --- a/mobile/ios/Runner/Core/Network.g.swift +++ /dev/null @@ -1,406 +0,0 @@ -// Autogenerated from Pigeon (v26.3.4), do not edit directly. -// See also: https://pub.dev/packages/pigeon - -import Foundation - -#if os(iOS) - import Flutter -#elseif os(macOS) - import FlutterMacOS -#else - #error("Unsupported platform.") -#endif - -private func wrapResult(_ result: Any?) -> [Any?] { - return [result] -} - -private func wrapError(_ error: Any) -> [Any?] { - if let pigeonError = error as? PigeonError { - return [ - pigeonError.code, - pigeonError.message, - pigeonError.details, - ] - } - if let flutterError = error as? FlutterError { - return [ - flutterError.code, - flutterError.message, - flutterError.details, - ] - } - return [ - "\(error)", - "\(Swift.type(of: error))", - "Stacktrace: \(Thread.callStackSymbols)", - ] -} - -private func isNullish(_ value: Any?) -> Bool { - return value is NSNull || value == nil -} - -private func nilOrValue(_ value: Any?) -> T? { - if value is NSNull { return nil } - return value as! T? -} - -private func doubleEqualsNetwork(_ lhs: Double, _ rhs: Double) -> Bool { - return (lhs.isNaN && rhs.isNaN) || lhs == rhs -} - -private func doubleHashNetwork(_ value: Double, _ hasher: inout Hasher) { - if value.isNaN { - hasher.combine(0x7FF8000000000000) - } else { - // Normalize -0.0 to 0.0 - hasher.combine(value == 0 ? 0 : value) - } -} - -func deepEqualsNetwork(_ lhs: Any?, _ rhs: Any?) -> Bool { - let cleanLhs = nilOrValue(lhs) as Any? - let cleanRhs = nilOrValue(rhs) as Any? - switch (cleanLhs, cleanRhs) { - case (nil, nil): - return true - - case (nil, _), (_, nil): - return false - - case (let lhs as AnyObject, let rhs as AnyObject) where lhs === rhs: - return true - - case is (Void, Void): - return true - - case (let lhsArray, let rhsArray) as ([Any?], [Any?]): - guard lhsArray.count == rhsArray.count else { return false } - for (index, element) in lhsArray.enumerated() { - if !deepEqualsNetwork(element, rhsArray[index]) { - return false - } - } - return true - - case (let lhsArray, let rhsArray) as ([Double], [Double]): - guard lhsArray.count == rhsArray.count else { return false } - for (index, element) in lhsArray.enumerated() { - if !doubleEqualsNetwork(element, rhsArray[index]) { - return false - } - } - return true - - case (let lhsDictionary, let rhsDictionary) as ([AnyHashable: Any?], [AnyHashable: Any?]): - guard lhsDictionary.count == rhsDictionary.count else { return false } - for (lhsKey, lhsValue) in lhsDictionary { - var found = false - for (rhsKey, rhsValue) in rhsDictionary { - if deepEqualsNetwork(lhsKey, rhsKey) { - if deepEqualsNetwork(lhsValue, rhsValue) { - found = true - break - } else { - return false - } - } - } - if !found { return false } - } - return true - - case (let lhs as Double, let rhs as Double): - return doubleEqualsNetwork(lhs, rhs) - - case (let lhsHashable, let rhsHashable) as (AnyHashable, AnyHashable): - return lhsHashable == rhsHashable - - default: - return false - } -} - -func deepHashNetwork(value: Any?, hasher: inout Hasher) { - let cleanValue = nilOrValue(value) as Any? - if let cleanValue = cleanValue { - if let doubleValue = cleanValue as? Double { - doubleHashNetwork(doubleValue, &hasher) - } else if let valueList = cleanValue as? [Any?] { - for item in valueList { - deepHashNetwork(value: item, hasher: &hasher) - } - } else if let valueList = cleanValue as? [Double] { - for item in valueList { - doubleHashNetwork(item, &hasher) - } - } else if let valueDict = cleanValue as? [AnyHashable: Any?] { - var result = 0 - for (key, value) in valueDict { - var entryKeyHasher = Hasher() - deepHashNetwork(value: key, hasher: &entryKeyHasher) - var entryValueHasher = Hasher() - deepHashNetwork(value: value, hasher: &entryValueHasher) - result = result &+ ((entryKeyHasher.finalize() &* 31) ^ entryValueHasher.finalize()) - } - hasher.combine(result) - } else if let hashableValue = cleanValue as? AnyHashable { - hasher.combine(hashableValue) - } else { - hasher.combine(String(describing: cleanValue)) - } - } else { - hasher.combine(0) - } -} - - -/// Generated class from Pigeon that represents data sent in messages. -struct ClientCertData: Hashable { - var data: FlutterStandardTypedData - var password: String - - - // swift-format-ignore: AlwaysUseLowerCamelCase - static func fromList(_ pigeonVar_list: [Any?]) -> ClientCertData? { - let data = pigeonVar_list[0] as! FlutterStandardTypedData - let password = pigeonVar_list[1] as! String - - return ClientCertData( - data: data, - password: password - ) - } - func toList() -> [Any?] { - return [ - data, - password, - ] - } - static func == (lhs: ClientCertData, rhs: ClientCertData) -> Bool { - if Swift.type(of: lhs) != Swift.type(of: rhs) { - return false - } - return deepEqualsNetwork(lhs.data, rhs.data) && deepEqualsNetwork(lhs.password, rhs.password) - } - - func hash(into hasher: inout Hasher) { - hasher.combine("ClientCertData") - deepHashNetwork(value: data, hasher: &hasher) - deepHashNetwork(value: password, hasher: &hasher) - } -} - -/// Generated class from Pigeon that represents data sent in messages. -struct ClientCertPrompt: Hashable { - var title: String - var message: String - var cancel: String - var confirm: String - - - // swift-format-ignore: AlwaysUseLowerCamelCase - static func fromList(_ pigeonVar_list: [Any?]) -> ClientCertPrompt? { - let title = pigeonVar_list[0] as! String - let message = pigeonVar_list[1] as! String - let cancel = pigeonVar_list[2] as! String - let confirm = pigeonVar_list[3] as! String - - return ClientCertPrompt( - title: title, - message: message, - cancel: cancel, - confirm: confirm - ) - } - func toList() -> [Any?] { - return [ - title, - message, - cancel, - confirm, - ] - } - static func == (lhs: ClientCertPrompt, rhs: ClientCertPrompt) -> Bool { - if Swift.type(of: lhs) != Swift.type(of: rhs) { - return false - } - return deepEqualsNetwork(lhs.title, rhs.title) && deepEqualsNetwork(lhs.message, rhs.message) && deepEqualsNetwork(lhs.cancel, rhs.cancel) && deepEqualsNetwork(lhs.confirm, rhs.confirm) - } - - func hash(into hasher: inout Hasher) { - hasher.combine("ClientCertPrompt") - deepHashNetwork(value: title, hasher: &hasher) - deepHashNetwork(value: message, hasher: &hasher) - deepHashNetwork(value: cancel, hasher: &hasher) - deepHashNetwork(value: confirm, hasher: &hasher) - } -} - -private class NetworkPigeonCodecReader: FlutterStandardReader { - override func readValue(ofType type: UInt8) -> Any? { - switch type { - case 129: - return ClientCertData.fromList(self.readValue() as! [Any?]) - case 130: - return ClientCertPrompt.fromList(self.readValue() as! [Any?]) - default: - return super.readValue(ofType: type) - } - } -} - -private class NetworkPigeonCodecWriter: FlutterStandardWriter { - override func writeValue(_ value: Any) { - if let value = value as? ClientCertData { - super.writeByte(129) - super.writeValue(value.toList()) - } else if let value = value as? ClientCertPrompt { - super.writeByte(130) - super.writeValue(value.toList()) - } else { - super.writeValue(value) - } - } -} - -private class NetworkPigeonCodecReaderWriter: FlutterStandardReaderWriter { - override func reader(with data: Data) -> FlutterStandardReader { - return NetworkPigeonCodecReader(data: data) - } - - override func writer(with data: NSMutableData) -> FlutterStandardWriter { - return NetworkPigeonCodecWriter(data: data) - } -} - -class NetworkPigeonCodec: FlutterStandardMessageCodec, @unchecked Sendable { - static let shared = NetworkPigeonCodec(readerWriter: NetworkPigeonCodecReaderWriter()) -} - - -/// Generated protocol from Pigeon that represents a handler of messages from Flutter. -protocol NetworkApi { - func addCertificate(clientData: ClientCertData, completion: @escaping (Result) -> Void) - func selectCertificate(promptText: ClientCertPrompt, completion: @escaping (Result) -> Void) - func removeCertificate(completion: @escaping (Result) -> Void) - func hasCertificate() throws -> Bool - func getClientPointer() throws -> Int64 - func setRequestHeaders(headers: [String: String], serverUrls: [String], token: String?) throws - func getAppGroupId() throws -> String -} - -/// Generated setup class from Pigeon to handle messages through the `binaryMessenger`. -class NetworkApiSetup { - static var codec: FlutterStandardMessageCodec { NetworkPigeonCodec.shared } - /// Sets up an instance of `NetworkApi` to handle messages through the `binaryMessenger`. - static func setUp(binaryMessenger: FlutterBinaryMessenger, api: NetworkApi?, messageChannelSuffix: String = "") { - let channelSuffix = messageChannelSuffix.count > 0 ? ".\(messageChannelSuffix)" : "" - let addCertificateChannel = FlutterBasicMessageChannel(name: "dev.flutter.pigeon.immich_mobile.NetworkApi.addCertificate\(channelSuffix)", binaryMessenger: binaryMessenger, codec: codec) - if let api = api { - addCertificateChannel.setMessageHandler { message, reply in - let args = message as! [Any?] - let clientDataArg = args[0] as! ClientCertData - api.addCertificate(clientData: clientDataArg) { result in - switch result { - case .success: - reply(wrapResult(nil)) - case .failure(let error): - reply(wrapError(error)) - } - } - } - } else { - addCertificateChannel.setMessageHandler(nil) - } - let selectCertificateChannel = FlutterBasicMessageChannel(name: "dev.flutter.pigeon.immich_mobile.NetworkApi.selectCertificate\(channelSuffix)", binaryMessenger: binaryMessenger, codec: codec) - if let api = api { - selectCertificateChannel.setMessageHandler { message, reply in - let args = message as! [Any?] - let promptTextArg = args[0] as! ClientCertPrompt - api.selectCertificate(promptText: promptTextArg) { result in - switch result { - case .success: - reply(wrapResult(nil)) - case .failure(let error): - reply(wrapError(error)) - } - } - } - } else { - selectCertificateChannel.setMessageHandler(nil) - } - let removeCertificateChannel = FlutterBasicMessageChannel(name: "dev.flutter.pigeon.immich_mobile.NetworkApi.removeCertificate\(channelSuffix)", binaryMessenger: binaryMessenger, codec: codec) - if let api = api { - removeCertificateChannel.setMessageHandler { _, reply in - api.removeCertificate { result in - switch result { - case .success: - reply(wrapResult(nil)) - case .failure(let error): - reply(wrapError(error)) - } - } - } - } else { - removeCertificateChannel.setMessageHandler(nil) - } - let hasCertificateChannel = FlutterBasicMessageChannel(name: "dev.flutter.pigeon.immich_mobile.NetworkApi.hasCertificate\(channelSuffix)", binaryMessenger: binaryMessenger, codec: codec) - if let api = api { - hasCertificateChannel.setMessageHandler { _, reply in - do { - let result = try api.hasCertificate() - reply(wrapResult(result)) - } catch { - reply(wrapError(error)) - } - } - } else { - hasCertificateChannel.setMessageHandler(nil) - } - let getClientPointerChannel = FlutterBasicMessageChannel(name: "dev.flutter.pigeon.immich_mobile.NetworkApi.getClientPointer\(channelSuffix)", binaryMessenger: binaryMessenger, codec: codec) - if let api = api { - getClientPointerChannel.setMessageHandler { _, reply in - do { - let result = try api.getClientPointer() - reply(wrapResult(result)) - } catch { - reply(wrapError(error)) - } - } - } else { - getClientPointerChannel.setMessageHandler(nil) - } - let setRequestHeadersChannel = FlutterBasicMessageChannel(name: "dev.flutter.pigeon.immich_mobile.NetworkApi.setRequestHeaders\(channelSuffix)", binaryMessenger: binaryMessenger, codec: codec) - if let api = api { - setRequestHeadersChannel.setMessageHandler { message, reply in - let args = message as! [Any?] - let headersArg = args[0] as! [String: String] - let serverUrlsArg = args[1] as! [String] - let tokenArg: String? = nilOrValue(args[2]) - do { - try api.setRequestHeaders(headers: headersArg, serverUrls: serverUrlsArg, token: tokenArg) - reply(wrapResult(nil)) - } catch { - reply(wrapError(error)) - } - } - } else { - setRequestHeadersChannel.setMessageHandler(nil) - } - let getAppGroupIdChannel = FlutterBasicMessageChannel(name: "dev.flutter.pigeon.immich_mobile.NetworkApi.getAppGroupId\(channelSuffix)", binaryMessenger: binaryMessenger, codec: codec) - if let api = api { - getAppGroupIdChannel.setMessageHandler { _, reply in - do { - let result = try api.getAppGroupId() - reply(wrapResult(result)) - } catch { - reply(wrapError(error)) - } - } - } else { - getAppGroupIdChannel.setMessageHandler(nil) - } - } -} diff --git a/mobile/ios/Runner/Images/LocalImages.g.swift b/mobile/ios/Runner/Images/LocalImages.g.swift deleted file mode 100644 index b9324260be..0000000000 --- a/mobile/ios/Runner/Images/LocalImages.g.swift +++ /dev/null @@ -1,139 +0,0 @@ -// Autogenerated from Pigeon (v26.3.4), do not edit directly. -// See also: https://pub.dev/packages/pigeon - -import Foundation - -#if os(iOS) - import Flutter -#elseif os(macOS) - import FlutterMacOS -#else - #error("Unsupported platform.") -#endif - -private func wrapResult(_ result: Any?) -> [Any?] { - return [result] -} - -private func wrapError(_ error: Any) -> [Any?] { - if let pigeonError = error as? PigeonError { - return [ - pigeonError.code, - pigeonError.message, - pigeonError.details, - ] - } - if let flutterError = error as? FlutterError { - return [ - flutterError.code, - flutterError.message, - flutterError.details, - ] - } - return [ - "\(error)", - "\(Swift.type(of: error))", - "Stacktrace: \(Thread.callStackSymbols)", - ] -} - -private func isNullish(_ value: Any?) -> Bool { - return value is NSNull || value == nil -} - -private func nilOrValue(_ value: Any?) -> T? { - if value is NSNull { return nil } - return value as! T? -} - - -private class LocalImagesPigeonCodecReader: FlutterStandardReader { -} - -private class LocalImagesPigeonCodecWriter: FlutterStandardWriter { -} - -private class LocalImagesPigeonCodecReaderWriter: FlutterStandardReaderWriter { - override func reader(with data: Data) -> FlutterStandardReader { - return LocalImagesPigeonCodecReader(data: data) - } - - override func writer(with data: NSMutableData) -> FlutterStandardWriter { - return LocalImagesPigeonCodecWriter(data: data) - } -} - -class LocalImagesPigeonCodec: FlutterStandardMessageCodec, @unchecked Sendable { - static let shared = LocalImagesPigeonCodec(readerWriter: LocalImagesPigeonCodecReaderWriter()) -} - - -/// Generated protocol from Pigeon that represents a handler of messages from Flutter. -protocol LocalImageApi { - func requestImage(assetId: String, requestId: Int64, width: Int64, height: Int64, isVideo: Bool, preferEncoded: Bool, completion: @escaping (Result<[String: Int64]?, Error>) -> Void) - func cancelRequest(requestId: Int64) throws - func getThumbhash(thumbhash: String, completion: @escaping (Result<[String: Int64], Error>) -> Void) -} - -/// Generated setup class from Pigeon to handle messages through the `binaryMessenger`. -class LocalImageApiSetup { - static var codec: FlutterStandardMessageCodec { LocalImagesPigeonCodec.shared } - /// Sets up an instance of `LocalImageApi` to handle messages through the `binaryMessenger`. - static func setUp(binaryMessenger: FlutterBinaryMessenger, api: LocalImageApi?, messageChannelSuffix: String = "") { - let channelSuffix = messageChannelSuffix.count > 0 ? ".\(messageChannelSuffix)" : "" - let requestImageChannel = FlutterBasicMessageChannel(name: "dev.flutter.pigeon.immich_mobile.LocalImageApi.requestImage\(channelSuffix)", binaryMessenger: binaryMessenger, codec: codec) - if let api = api { - requestImageChannel.setMessageHandler { message, reply in - let args = message as! [Any?] - let assetIdArg = args[0] as! String - let requestIdArg = args[1] as! Int64 - let widthArg = args[2] as! Int64 - let heightArg = args[3] as! Int64 - let isVideoArg = args[4] as! Bool - let preferEncodedArg = args[5] as! Bool - api.requestImage(assetId: assetIdArg, requestId: requestIdArg, width: widthArg, height: heightArg, isVideo: isVideoArg, preferEncoded: preferEncodedArg) { result in - switch result { - case .success(let res): - reply(wrapResult(res)) - case .failure(let error): - reply(wrapError(error)) - } - } - } - } else { - requestImageChannel.setMessageHandler(nil) - } - let cancelRequestChannel = FlutterBasicMessageChannel(name: "dev.flutter.pigeon.immich_mobile.LocalImageApi.cancelRequest\(channelSuffix)", binaryMessenger: binaryMessenger, codec: codec) - if let api = api { - cancelRequestChannel.setMessageHandler { message, reply in - let args = message as! [Any?] - let requestIdArg = args[0] as! Int64 - do { - try api.cancelRequest(requestId: requestIdArg) - reply(wrapResult(nil)) - } catch { - reply(wrapError(error)) - } - } - } else { - cancelRequestChannel.setMessageHandler(nil) - } - let getThumbhashChannel = FlutterBasicMessageChannel(name: "dev.flutter.pigeon.immich_mobile.LocalImageApi.getThumbhash\(channelSuffix)", binaryMessenger: binaryMessenger, codec: codec) - if let api = api { - getThumbhashChannel.setMessageHandler { message, reply in - let args = message as! [Any?] - let thumbhashArg = args[0] as! String - api.getThumbhash(thumbhash: thumbhashArg) { result in - switch result { - case .success(let res): - reply(wrapResult(res)) - case .failure(let error): - reply(wrapError(error)) - } - } - } - } else { - getThumbhashChannel.setMessageHandler(nil) - } - } -} diff --git a/mobile/ios/Runner/Images/LocalImagesImpl.swift b/mobile/ios/Runner/Images/LocalImagesImpl.swift index 9c142da054..0d023ad466 100644 --- a/mobile/ios/Runner/Images/LocalImagesImpl.swift +++ b/mobile/ios/Runner/Images/LocalImagesImpl.swift @@ -20,6 +20,7 @@ class LocalImageApiImpl: LocalImageApi { requestOptions.version = .current return requestOptions }() + private static let maxPixelSize: CGFloat = 16384 private static let registry = RequestRegistry() @@ -108,11 +109,16 @@ class LocalImageApiImpl: LocalImageApi { ])) } + let isOriginal = !(width > 0 && height > 0) + let targetSize = isOriginal + ? CGSize(width: Self.maxPixelSize, height: Self.maxPixelSize) + : CGSize(width: Double(width), height: Double(height)) + let contentMode: PHImageContentMode = isOriginal ? .aspectFit : .aspectFill var image: UIImage? Self.imageManager.requestImage( for: asset, - targetSize: width > 0 && height > 0 ? CGSize(width: Double(width), height: Double(height)) : PHImageManagerMaximumSize, - contentMode: .aspectFill, + targetSize: targetSize, + contentMode: contentMode, options: Self.requestOptions, resultHandler: { (_image, info) -> Void in image = _image @@ -123,12 +129,38 @@ class LocalImageApiImpl: LocalImageApi { return request.completion(ImageProcessing.cancelledResult) } - guard let image = image, - let cgImage = image.cgImage else { + guard let fastImage = image, + var cgImage = fastImage.cgImage else { Self.registry.remove(requestId: requestId) return request.completion(.failure(PigeonError(code: "", message: "Could not get pixel data for \(assetId)", details: nil))) } + // .fast can return larger than the target, so retry with .exact to guarantee the bound. + if max(cgImage.width, cgImage.height) > Int(Self.maxPixelSize) { + let exactOptions = Self.requestOptions.copy() as! PHImageRequestOptions + exactOptions.resizeMode = .exact + image = nil + Self.imageManager.requestImage( + for: asset, + targetSize: targetSize, + contentMode: contentMode, + options: exactOptions, + resultHandler: { (_image, info) -> Void in + image = _image + } + ) + + if request.isCancelled { + return request.completion(ImageProcessing.cancelledResult) + } + + guard let exactImage = image?.cgImage else { + Self.registry.remove(requestId: requestId) + return request.completion(.failure(PigeonError(code: "", message: "Could not resize image for \(assetId)", details: nil))) + } + cgImage = exactImage + } + if request.isCancelled { return request.completion(ImageProcessing.cancelledResult) } diff --git a/mobile/ios/Runner/Images/RemoteImages.g.swift b/mobile/ios/Runner/Images/RemoteImages.g.swift deleted file mode 100644 index 12eaaeec60..0000000000 --- a/mobile/ios/Runner/Images/RemoteImages.g.swift +++ /dev/null @@ -1,134 +0,0 @@ -// Autogenerated from Pigeon (v26.3.4), do not edit directly. -// See also: https://pub.dev/packages/pigeon - -import Foundation - -#if os(iOS) - import Flutter -#elseif os(macOS) - import FlutterMacOS -#else - #error("Unsupported platform.") -#endif - -private func wrapResult(_ result: Any?) -> [Any?] { - return [result] -} - -private func wrapError(_ error: Any) -> [Any?] { - if let pigeonError = error as? PigeonError { - return [ - pigeonError.code, - pigeonError.message, - pigeonError.details, - ] - } - if let flutterError = error as? FlutterError { - return [ - flutterError.code, - flutterError.message, - flutterError.details, - ] - } - return [ - "\(error)", - "\(Swift.type(of: error))", - "Stacktrace: \(Thread.callStackSymbols)", - ] -} - -private func isNullish(_ value: Any?) -> Bool { - return value is NSNull || value == nil -} - -private func nilOrValue(_ value: Any?) -> T? { - if value is NSNull { return nil } - return value as! T? -} - - -private class RemoteImagesPigeonCodecReader: FlutterStandardReader { -} - -private class RemoteImagesPigeonCodecWriter: FlutterStandardWriter { -} - -private class RemoteImagesPigeonCodecReaderWriter: FlutterStandardReaderWriter { - override func reader(with data: Data) -> FlutterStandardReader { - return RemoteImagesPigeonCodecReader(data: data) - } - - override func writer(with data: NSMutableData) -> FlutterStandardWriter { - return RemoteImagesPigeonCodecWriter(data: data) - } -} - -class RemoteImagesPigeonCodec: FlutterStandardMessageCodec, @unchecked Sendable { - static let shared = RemoteImagesPigeonCodec(readerWriter: RemoteImagesPigeonCodecReaderWriter()) -} - - -/// Generated protocol from Pigeon that represents a handler of messages from Flutter. -protocol RemoteImageApi { - func requestImage(url: String, requestId: Int64, preferEncoded: Bool, completion: @escaping (Result<[String: Int64]?, Error>) -> Void) - func cancelRequest(requestId: Int64) throws - func clearCache(completion: @escaping (Result) -> Void) -} - -/// Generated setup class from Pigeon to handle messages through the `binaryMessenger`. -class RemoteImageApiSetup { - static var codec: FlutterStandardMessageCodec { RemoteImagesPigeonCodec.shared } - /// Sets up an instance of `RemoteImageApi` to handle messages through the `binaryMessenger`. - static func setUp(binaryMessenger: FlutterBinaryMessenger, api: RemoteImageApi?, messageChannelSuffix: String = "") { - let channelSuffix = messageChannelSuffix.count > 0 ? ".\(messageChannelSuffix)" : "" - let requestImageChannel = FlutterBasicMessageChannel(name: "dev.flutter.pigeon.immich_mobile.RemoteImageApi.requestImage\(channelSuffix)", binaryMessenger: binaryMessenger, codec: codec) - if let api = api { - requestImageChannel.setMessageHandler { message, reply in - let args = message as! [Any?] - let urlArg = args[0] as! String - let requestIdArg = args[1] as! Int64 - let preferEncodedArg = args[2] as! Bool - api.requestImage(url: urlArg, requestId: requestIdArg, preferEncoded: preferEncodedArg) { result in - switch result { - case .success(let res): - reply(wrapResult(res)) - case .failure(let error): - reply(wrapError(error)) - } - } - } - } else { - requestImageChannel.setMessageHandler(nil) - } - let cancelRequestChannel = FlutterBasicMessageChannel(name: "dev.flutter.pigeon.immich_mobile.RemoteImageApi.cancelRequest\(channelSuffix)", binaryMessenger: binaryMessenger, codec: codec) - if let api = api { - cancelRequestChannel.setMessageHandler { message, reply in - let args = message as! [Any?] - let requestIdArg = args[0] as! Int64 - do { - try api.cancelRequest(requestId: requestIdArg) - reply(wrapResult(nil)) - } catch { - reply(wrapError(error)) - } - } - } else { - cancelRequestChannel.setMessageHandler(nil) - } - let clearCacheChannel = FlutterBasicMessageChannel(name: "dev.flutter.pigeon.immich_mobile.RemoteImageApi.clearCache\(channelSuffix)", binaryMessenger: binaryMessenger, codec: codec) - if let api = api { - clearCacheChannel.setMessageHandler { _, reply in - api.clearCache { result in - switch result { - case .success(let res): - reply(wrapResult(res)) - case .failure(let error): - reply(wrapError(error)) - } - } - } - } else { - clearCacheChannel.setMessageHandler(nil) - } - } -} diff --git a/mobile/ios/Runner/Images/RemoteImagesImpl.swift b/mobile/ios/Runner/Images/RemoteImagesImpl.swift index de1f6dec89..b4b70f0b30 100644 --- a/mobile/ios/Runner/Images/RemoteImagesImpl.swift +++ b/mobile/ios/Runner/Images/RemoteImagesImpl.swift @@ -1,5 +1,6 @@ import Accelerate import Flutter +import ImageIO import MobileCoreServices import Photos @@ -27,21 +28,21 @@ class RemoteImageApiImpl: NSObject, RemoteImageApi { bitmapInfo: CGBitmapInfo(rawValue: CGImageAlphaInfo.premultipliedLast.rawValue), renderingIntent: .perceptual )! - private static let decodeOptions = [ + private static let decodeOptions: [NSString: Bool] = [ kCGImageSourceShouldCache: false, kCGImageSourceShouldCacheImmediately: true, kCGImageSourceCreateThumbnailWithTransform: true, kCGImageSourceCreateThumbnailFromImageAlways: true - ] as CFDictionary + ] - func requestImage(url: String, requestId: Int64, preferEncoded: Bool, completion: @escaping (Result<[String : Int64]?, any Error>) -> Void) { + func requestImage(url: String, requestId: Int64, preferEncoded: Bool, width: Int64?, height: Int64?, completion: @escaping (Result<[String : Int64]?, any Error>) -> Void) { var urlRequest = URLRequest(url: URL(string: url)!) urlRequest.cachePolicy = .returnCacheDataElseLoad let request = RemoteImageRequest(id: requestId, completion: completion) let task = URLSessionManager.shared.session.dataTask(with: urlRequest) { data, response, error in - Self.handleCompletion(request: request, encoded: preferEncoded, data: data, response: response, error: error) + Self.handleCompletion(request: request, encoded: preferEncoded, width: width, height: height, data: data, response: response, error: error) } request.task = task @@ -49,7 +50,7 @@ class RemoteImageApiImpl: NSObject, RemoteImageApi { task.resume() } - private static func handleCompletion(request: RemoteImageRequest, encoded: Bool, data: Data?, response: URLResponse?, error: Error?) { + private static func handleCompletion(request: RemoteImageRequest, encoded: Bool, width: Int64?, height: Int64?, data: Data?, response: URLResponse?, error: Error?) { if request.isCancelled { return request.completion(ImageProcessing.cancelledResult) } @@ -87,8 +88,17 @@ class RemoteImageApiImpl: NSObject, RemoteImageApi { return request.completion(ImageProcessing.cancelledResult) } - guard let imageSource = CGImageSourceCreateWithData(data as CFData, nil), - let cgImage = CGImageSourceCreateThumbnailAtIndex(imageSource, 0, decodeOptions) else { + guard let imageSource = CGImageSourceCreateWithData(data as CFData, nil) else { + registry.remove(requestId: request.id) + return request.completion(.failure(PigeonError(code: "", message: "Failed to decode image for request", details: nil))) + } + + var options: [NSString: Any] = decodeOptions + if let maxPixelSize = targetThumbnailRenderSize(imageSource: imageSource, width: width, height: height) { + options[kCGImageSourceThumbnailMaxPixelSize] = maxPixelSize + } + + guard let cgImage = CGImageSourceCreateThumbnailAtIndex(imageSource, 0, options as CFDictionary) else { registry.remove(requestId: request.id) return request.completion(.failure(PigeonError(code: "", message: "Failed to decode image for request", details: nil))) } @@ -120,6 +130,34 @@ class RemoteImageApiImpl: NSObject, RemoteImageApi { } } + /// Returns the longest rendered edge needed to cover the requested size. + private static func targetThumbnailRenderSize(imageSource: CGImageSource, width: Int64?, height: Int64?) -> Int? { + guard let width, + let height, + width > 0, + height > 0, + let properties = CGImageSourceCopyPropertiesAtIndex(imageSource, 0, nil) as? [CFString: Any], + let pixelWidth = properties[kCGImagePropertyPixelWidth] as? NSNumber, + let pixelHeight = properties[kCGImagePropertyPixelHeight] as? NSNumber else { + return nil + } + + let orientation = (properties[kCGImagePropertyOrientation] as? NSNumber) + .flatMap { CGImagePropertyOrientation(rawValue: $0.uint32Value) } ?? .up + let swapsDimensions: Bool + switch orientation { + case .leftMirrored, .right, .rightMirrored, .left: + swapsDimensions = true + default: + swapsDimensions = false + } + let sourceWidth = swapsDimensions ? pixelHeight.doubleValue : pixelWidth.doubleValue + let sourceHeight = swapsDimensions ? pixelWidth.doubleValue : pixelHeight.doubleValue + let fillScale = max(Double(width) / sourceWidth, Double(height) / sourceHeight) + let scale = min(1, fillScale) + return scale < 1 ? Int(ceil(max(sourceWidth * scale, sourceHeight * scale))) : nil + } + func cancelRequest(requestId: Int64) { Self.registry.remove(requestId: requestId)?.cancel() } diff --git a/mobile/ios/Runner/Info.plist b/mobile/ios/Runner/Info.plist index 0ff269bf41..31feda2e11 100644 --- a/mobile/ios/Runner/Info.plist +++ b/mobile/ios/Runner/Info.plist @@ -78,7 +78,7 @@ CFBundlePackageType APPL CFBundleShortVersionString - 3.0.0 + 3.1.0 CFBundleSignature ???? CFBundleURLTypes diff --git a/mobile/ios/Runner/Permission/PermissionApi.g.swift b/mobile/ios/Runner/Permission/PermissionApi.g.swift deleted file mode 100644 index b9c116f0c5..0000000000 --- a/mobile/ios/Runner/Permission/PermissionApi.g.swift +++ /dev/null @@ -1,168 +0,0 @@ -// Autogenerated from Pigeon (v26.3.4), do not edit directly. -// See also: https://pub.dev/packages/pigeon - -import Foundation - -#if os(iOS) - import Flutter -#elseif os(macOS) - import FlutterMacOS -#else - #error("Unsupported platform.") -#endif - -private func wrapResult(_ result: Any?) -> [Any?] { - return [result] -} - -private func wrapError(_ error: Any) -> [Any?] { - if let pigeonError = error as? PigeonError { - return [ - pigeonError.code, - pigeonError.message, - pigeonError.details, - ] - } - if let flutterError = error as? FlutterError { - return [ - flutterError.code, - flutterError.message, - flutterError.details, - ] - } - return [ - "\(error)", - "\(Swift.type(of: error))", - "Stacktrace: \(Thread.callStackSymbols)", - ] -} - -private func isNullish(_ value: Any?) -> Bool { - return value is NSNull || value == nil -} - -private func nilOrValue(_ value: Any?) -> T? { - if value is NSNull { return nil } - return value as! T? -} - - -enum PermissionStatus: Int { - case granted = 0 - case denied = 1 - case permanentlyDenied = 2 -} - -private class PermissionApiPigeonCodecReader: FlutterStandardReader { - override func readValue(ofType type: UInt8) -> Any? { - switch type { - case 129: - let enumResultAsInt: Int? = nilOrValue(self.readValue() as! Int?) - if let enumResultAsInt = enumResultAsInt { - return PermissionStatus(rawValue: enumResultAsInt) - } - return nil - default: - return super.readValue(ofType: type) - } - } -} - -private class PermissionApiPigeonCodecWriter: FlutterStandardWriter { - override func writeValue(_ value: Any) { - if let value = value as? PermissionStatus { - super.writeByte(129) - super.writeValue(value.rawValue) - } else { - super.writeValue(value) - } - } -} - -private class PermissionApiPigeonCodecReaderWriter: FlutterStandardReaderWriter { - override func reader(with data: Data) -> FlutterStandardReader { - return PermissionApiPigeonCodecReader(data: data) - } - - override func writer(with data: NSMutableData) -> FlutterStandardWriter { - return PermissionApiPigeonCodecWriter(data: data) - } -} - -class PermissionApiPigeonCodec: FlutterStandardMessageCodec, @unchecked Sendable { - static let shared = PermissionApiPigeonCodec(readerWriter: PermissionApiPigeonCodecReaderWriter()) -} - - -/// Generated protocol from Pigeon that represents a handler of messages from Flutter. -protocol PermissionApi { - func isIgnoringBatteryOptimizations() throws -> PermissionStatus - func hasManageMediaPermission() throws -> Bool - func requestManageMediaPermission(completion: @escaping (Result) -> Void) - func manageMediaPermission(completion: @escaping (Result) -> Void) -} - -/// Generated setup class from Pigeon to handle messages through the `binaryMessenger`. -class PermissionApiSetup { - static var codec: FlutterStandardMessageCodec { PermissionApiPigeonCodec.shared } - /// Sets up an instance of `PermissionApi` to handle messages through the `binaryMessenger`. - static func setUp(binaryMessenger: FlutterBinaryMessenger, api: PermissionApi?, messageChannelSuffix: String = "") { - let channelSuffix = messageChannelSuffix.count > 0 ? ".\(messageChannelSuffix)" : "" - let isIgnoringBatteryOptimizationsChannel = FlutterBasicMessageChannel(name: "dev.flutter.pigeon.immich_mobile.PermissionApi.isIgnoringBatteryOptimizations\(channelSuffix)", binaryMessenger: binaryMessenger, codec: codec) - if let api = api { - isIgnoringBatteryOptimizationsChannel.setMessageHandler { _, reply in - do { - let result = try api.isIgnoringBatteryOptimizations() - reply(wrapResult(result)) - } catch { - reply(wrapError(error)) - } - } - } else { - isIgnoringBatteryOptimizationsChannel.setMessageHandler(nil) - } - let hasManageMediaPermissionChannel = FlutterBasicMessageChannel(name: "dev.flutter.pigeon.immich_mobile.PermissionApi.hasManageMediaPermission\(channelSuffix)", binaryMessenger: binaryMessenger, codec: codec) - if let api = api { - hasManageMediaPermissionChannel.setMessageHandler { _, reply in - do { - let result = try api.hasManageMediaPermission() - reply(wrapResult(result)) - } catch { - reply(wrapError(error)) - } - } - } else { - hasManageMediaPermissionChannel.setMessageHandler(nil) - } - let requestManageMediaPermissionChannel = FlutterBasicMessageChannel(name: "dev.flutter.pigeon.immich_mobile.PermissionApi.requestManageMediaPermission\(channelSuffix)", binaryMessenger: binaryMessenger, codec: codec) - if let api = api { - requestManageMediaPermissionChannel.setMessageHandler { _, reply in - api.requestManageMediaPermission { result in - switch result { - case .success(let res): - reply(wrapResult(res)) - case .failure(let error): - reply(wrapError(error)) - } - } - } - } else { - requestManageMediaPermissionChannel.setMessageHandler(nil) - } - let manageMediaPermissionChannel = FlutterBasicMessageChannel(name: "dev.flutter.pigeon.immich_mobile.PermissionApi.manageMediaPermission\(channelSuffix)", binaryMessenger: binaryMessenger, codec: codec) - if let api = api { - manageMediaPermissionChannel.setMessageHandler { _, reply in - api.manageMediaPermission { result in - switch result { - case .success(let res): - reply(wrapResult(res)) - case .failure(let error): - reply(wrapError(error)) - } - } - } - } else { - manageMediaPermissionChannel.setMessageHandler(nil) - } - } -} diff --git a/mobile/ios/Runner/Sync/Messages.g.swift b/mobile/ios/Runner/Sync/Messages.g.swift deleted file mode 100644 index a752785c5b..0000000000 --- a/mobile/ios/Runner/Sync/Messages.g.swift +++ /dev/null @@ -1,777 +0,0 @@ -// Autogenerated from Pigeon (v26.3.4), do not edit directly. -// See also: https://pub.dev/packages/pigeon - -import Foundation - -#if os(iOS) - import Flutter -#elseif os(macOS) - import FlutterMacOS -#else - #error("Unsupported platform.") -#endif - -/// Error class for passing custom error details to Dart side. -final class PigeonError: Error { - let code: String - let message: String? - let details: Sendable? - - init(code: String, message: String?, details: Sendable?) { - self.code = code - self.message = message - self.details = details - } - - var localizedDescription: String { - return - "PigeonError(code: \(code), message: \(message ?? ""), details: \(details ?? "")" - } -} - -private func wrapResult(_ result: Any?) -> [Any?] { - return [result] -} - -private func wrapError(_ error: Any) -> [Any?] { - if let pigeonError = error as? PigeonError { - return [ - pigeonError.code, - pigeonError.message, - pigeonError.details, - ] - } - if let flutterError = error as? FlutterError { - return [ - flutterError.code, - flutterError.message, - flutterError.details, - ] - } - return [ - "\(error)", - "\(Swift.type(of: error))", - "Stacktrace: \(Thread.callStackSymbols)", - ] -} - -private func isNullish(_ value: Any?) -> Bool { - return value is NSNull || value == nil -} - -private func nilOrValue(_ value: Any?) -> T? { - if value is NSNull { return nil } - return value as! T? -} - -private func doubleEqualsMessages(_ lhs: Double, _ rhs: Double) -> Bool { - return (lhs.isNaN && rhs.isNaN) || lhs == rhs -} - -private func doubleHashMessages(_ value: Double, _ hasher: inout Hasher) { - if value.isNaN { - hasher.combine(0x7FF8000000000000) - } else { - // Normalize -0.0 to 0.0 - hasher.combine(value == 0 ? 0 : value) - } -} - -func deepEqualsMessages(_ lhs: Any?, _ rhs: Any?) -> Bool { - let cleanLhs = nilOrValue(lhs) as Any? - let cleanRhs = nilOrValue(rhs) as Any? - switch (cleanLhs, cleanRhs) { - case (nil, nil): - return true - - case (nil, _), (_, nil): - return false - - case (let lhs as AnyObject, let rhs as AnyObject) where lhs === rhs: - return true - - case is (Void, Void): - return true - - case (let lhsArray, let rhsArray) as ([Any?], [Any?]): - guard lhsArray.count == rhsArray.count else { return false } - for (index, element) in lhsArray.enumerated() { - if !deepEqualsMessages(element, rhsArray[index]) { - return false - } - } - return true - - case (let lhsArray, let rhsArray) as ([Double], [Double]): - guard lhsArray.count == rhsArray.count else { return false } - for (index, element) in lhsArray.enumerated() { - if !doubleEqualsMessages(element, rhsArray[index]) { - return false - } - } - return true - - case (let lhsDictionary, let rhsDictionary) as ([AnyHashable: Any?], [AnyHashable: Any?]): - guard lhsDictionary.count == rhsDictionary.count else { return false } - for (lhsKey, lhsValue) in lhsDictionary { - var found = false - for (rhsKey, rhsValue) in rhsDictionary { - if deepEqualsMessages(lhsKey, rhsKey) { - if deepEqualsMessages(lhsValue, rhsValue) { - found = true - break - } else { - return false - } - } - } - if !found { return false } - } - return true - - case (let lhs as Double, let rhs as Double): - return doubleEqualsMessages(lhs, rhs) - - case (let lhsHashable, let rhsHashable) as (AnyHashable, AnyHashable): - return lhsHashable == rhsHashable - - default: - return false - } -} - -func deepHashMessages(value: Any?, hasher: inout Hasher) { - let cleanValue = nilOrValue(value) as Any? - if let cleanValue = cleanValue { - if let doubleValue = cleanValue as? Double { - doubleHashMessages(doubleValue, &hasher) - } else if let valueList = cleanValue as? [Any?] { - for item in valueList { - deepHashMessages(value: item, hasher: &hasher) - } - } else if let valueList = cleanValue as? [Double] { - for item in valueList { - doubleHashMessages(item, &hasher) - } - } else if let valueDict = cleanValue as? [AnyHashable: Any?] { - var result = 0 - for (key, value) in valueDict { - var entryKeyHasher = Hasher() - deepHashMessages(value: key, hasher: &entryKeyHasher) - var entryValueHasher = Hasher() - deepHashMessages(value: value, hasher: &entryValueHasher) - result = result &+ ((entryKeyHasher.finalize() &* 31) ^ entryValueHasher.finalize()) - } - hasher.combine(result) - } else if let hashableValue = cleanValue as? AnyHashable { - hasher.combine(hashableValue) - } else { - hasher.combine(String(describing: cleanValue)) - } - } else { - hasher.combine(0) - } -} - - -enum PlatformAssetPlaybackStyle: Int { - case unknown = 0 - case image = 1 - case video = 2 - case imageAnimated = 3 - case livePhoto = 4 - case videoLooping = 5 -} - -/// Generated class from Pigeon that represents data sent in messages. -struct PlatformAsset: Hashable { - var id: String - var name: String - var type: Int64 - var createdAt: Int64? = nil - var updatedAt: Int64? = nil - var width: Int64? = nil - var height: Int64? = nil - var durationMs: Int64 - var orientation: Int64 - var isFavorite: Bool - var adjustmentTime: Int64? = nil - var latitude: Double? = nil - var longitude: Double? = nil - var playbackStyle: PlatformAssetPlaybackStyle - - - // swift-format-ignore: AlwaysUseLowerCamelCase - static func fromList(_ pigeonVar_list: [Any?]) -> PlatformAsset? { - let id = pigeonVar_list[0] as! String - let name = pigeonVar_list[1] as! String - let type = pigeonVar_list[2] as! Int64 - let createdAt: Int64? = nilOrValue(pigeonVar_list[3]) - let updatedAt: Int64? = nilOrValue(pigeonVar_list[4]) - let width: Int64? = nilOrValue(pigeonVar_list[5]) - let height: Int64? = nilOrValue(pigeonVar_list[6]) - let durationMs = pigeonVar_list[7] as! Int64 - let orientation = pigeonVar_list[8] as! Int64 - let isFavorite = pigeonVar_list[9] as! Bool - let adjustmentTime: Int64? = nilOrValue(pigeonVar_list[10]) - let latitude: Double? = nilOrValue(pigeonVar_list[11]) - let longitude: Double? = nilOrValue(pigeonVar_list[12]) - let playbackStyle = pigeonVar_list[13] as! PlatformAssetPlaybackStyle - - return PlatformAsset( - id: id, - name: name, - type: type, - createdAt: createdAt, - updatedAt: updatedAt, - width: width, - height: height, - durationMs: durationMs, - orientation: orientation, - isFavorite: isFavorite, - adjustmentTime: adjustmentTime, - latitude: latitude, - longitude: longitude, - playbackStyle: playbackStyle - ) - } - func toList() -> [Any?] { - return [ - id, - name, - type, - createdAt, - updatedAt, - width, - height, - durationMs, - orientation, - isFavorite, - adjustmentTime, - latitude, - longitude, - playbackStyle, - ] - } - static func == (lhs: PlatformAsset, rhs: PlatformAsset) -> Bool { - if Swift.type(of: lhs) != Swift.type(of: rhs) { - return false - } - return deepEqualsMessages(lhs.id, rhs.id) && deepEqualsMessages(lhs.name, rhs.name) && deepEqualsMessages(lhs.type, rhs.type) && deepEqualsMessages(lhs.createdAt, rhs.createdAt) && deepEqualsMessages(lhs.updatedAt, rhs.updatedAt) && deepEqualsMessages(lhs.width, rhs.width) && deepEqualsMessages(lhs.height, rhs.height) && deepEqualsMessages(lhs.durationMs, rhs.durationMs) && deepEqualsMessages(lhs.orientation, rhs.orientation) && deepEqualsMessages(lhs.isFavorite, rhs.isFavorite) && deepEqualsMessages(lhs.adjustmentTime, rhs.adjustmentTime) && deepEqualsMessages(lhs.latitude, rhs.latitude) && deepEqualsMessages(lhs.longitude, rhs.longitude) && deepEqualsMessages(lhs.playbackStyle, rhs.playbackStyle) - } - - func hash(into hasher: inout Hasher) { - hasher.combine("PlatformAsset") - deepHashMessages(value: id, hasher: &hasher) - deepHashMessages(value: name, hasher: &hasher) - deepHashMessages(value: type, hasher: &hasher) - deepHashMessages(value: createdAt, hasher: &hasher) - deepHashMessages(value: updatedAt, hasher: &hasher) - deepHashMessages(value: width, hasher: &hasher) - deepHashMessages(value: height, hasher: &hasher) - deepHashMessages(value: durationMs, hasher: &hasher) - deepHashMessages(value: orientation, hasher: &hasher) - deepHashMessages(value: isFavorite, hasher: &hasher) - deepHashMessages(value: adjustmentTime, hasher: &hasher) - deepHashMessages(value: latitude, hasher: &hasher) - deepHashMessages(value: longitude, hasher: &hasher) - deepHashMessages(value: playbackStyle, hasher: &hasher) - } -} - -/// Generated class from Pigeon that represents data sent in messages. -struct PlatformAlbum: Hashable { - var id: String - var name: String - var updatedAt: Int64? = nil - var isCloud: Bool - var assetCount: Int64 - - - // swift-format-ignore: AlwaysUseLowerCamelCase - static func fromList(_ pigeonVar_list: [Any?]) -> PlatformAlbum? { - let id = pigeonVar_list[0] as! String - let name = pigeonVar_list[1] as! String - let updatedAt: Int64? = nilOrValue(pigeonVar_list[2]) - let isCloud = pigeonVar_list[3] as! Bool - let assetCount = pigeonVar_list[4] as! Int64 - - return PlatformAlbum( - id: id, - name: name, - updatedAt: updatedAt, - isCloud: isCloud, - assetCount: assetCount - ) - } - func toList() -> [Any?] { - return [ - id, - name, - updatedAt, - isCloud, - assetCount, - ] - } - static func == (lhs: PlatformAlbum, rhs: PlatformAlbum) -> Bool { - if Swift.type(of: lhs) != Swift.type(of: rhs) { - return false - } - return deepEqualsMessages(lhs.id, rhs.id) && deepEqualsMessages(lhs.name, rhs.name) && deepEqualsMessages(lhs.updatedAt, rhs.updatedAt) && deepEqualsMessages(lhs.isCloud, rhs.isCloud) && deepEqualsMessages(lhs.assetCount, rhs.assetCount) - } - - func hash(into hasher: inout Hasher) { - hasher.combine("PlatformAlbum") - deepHashMessages(value: id, hasher: &hasher) - deepHashMessages(value: name, hasher: &hasher) - deepHashMessages(value: updatedAt, hasher: &hasher) - deepHashMessages(value: isCloud, hasher: &hasher) - deepHashMessages(value: assetCount, hasher: &hasher) - } -} - -/// Generated class from Pigeon that represents data sent in messages. -struct SyncDelta: Hashable { - var hasChanges: Bool - var updates: [PlatformAsset] - var deletes: [String] - var assetAlbums: [String: [String]] - - - // swift-format-ignore: AlwaysUseLowerCamelCase - static func fromList(_ pigeonVar_list: [Any?]) -> SyncDelta? { - let hasChanges = pigeonVar_list[0] as! Bool - let updates = pigeonVar_list[1] as! [PlatformAsset] - let deletes = pigeonVar_list[2] as! [String] - let assetAlbums = pigeonVar_list[3] as! [String: [String]] - - return SyncDelta( - hasChanges: hasChanges, - updates: updates, - deletes: deletes, - assetAlbums: assetAlbums - ) - } - func toList() -> [Any?] { - return [ - hasChanges, - updates, - deletes, - assetAlbums, - ] - } - static func == (lhs: SyncDelta, rhs: SyncDelta) -> Bool { - if Swift.type(of: lhs) != Swift.type(of: rhs) { - return false - } - return deepEqualsMessages(lhs.hasChanges, rhs.hasChanges) && deepEqualsMessages(lhs.updates, rhs.updates) && deepEqualsMessages(lhs.deletes, rhs.deletes) && deepEqualsMessages(lhs.assetAlbums, rhs.assetAlbums) - } - - func hash(into hasher: inout Hasher) { - hasher.combine("SyncDelta") - deepHashMessages(value: hasChanges, hasher: &hasher) - deepHashMessages(value: updates, hasher: &hasher) - deepHashMessages(value: deletes, hasher: &hasher) - deepHashMessages(value: assetAlbums, hasher: &hasher) - } -} - -/// Generated class from Pigeon that represents data sent in messages. -struct HashResult: Hashable { - var assetId: String - var error: String? = nil - var hash: String? = nil - - - // swift-format-ignore: AlwaysUseLowerCamelCase - static func fromList(_ pigeonVar_list: [Any?]) -> HashResult? { - let assetId = pigeonVar_list[0] as! String - let error: String? = nilOrValue(pigeonVar_list[1]) - let hash: String? = nilOrValue(pigeonVar_list[2]) - - return HashResult( - assetId: assetId, - error: error, - hash: hash - ) - } - func toList() -> [Any?] { - return [ - assetId, - error, - hash, - ] - } - static func == (lhs: HashResult, rhs: HashResult) -> Bool { - if Swift.type(of: lhs) != Swift.type(of: rhs) { - return false - } - return deepEqualsMessages(lhs.assetId, rhs.assetId) && deepEqualsMessages(lhs.error, rhs.error) && deepEqualsMessages(lhs.hash, rhs.hash) - } - - func hash(into hasher: inout Hasher) { - hasher.combine("HashResult") - deepHashMessages(value: assetId, hasher: &hasher) - deepHashMessages(value: error, hasher: &hasher) - deepHashMessages(value: hash, hasher: &hasher) - } -} - -/// Generated class from Pigeon that represents data sent in messages. -struct CloudIdResult: Hashable { - var assetId: String - var error: String? = nil - var cloudId: String? = nil - - - // swift-format-ignore: AlwaysUseLowerCamelCase - static func fromList(_ pigeonVar_list: [Any?]) -> CloudIdResult? { - let assetId = pigeonVar_list[0] as! String - let error: String? = nilOrValue(pigeonVar_list[1]) - let cloudId: String? = nilOrValue(pigeonVar_list[2]) - - return CloudIdResult( - assetId: assetId, - error: error, - cloudId: cloudId - ) - } - func toList() -> [Any?] { - return [ - assetId, - error, - cloudId, - ] - } - static func == (lhs: CloudIdResult, rhs: CloudIdResult) -> Bool { - if Swift.type(of: lhs) != Swift.type(of: rhs) { - return false - } - return deepEqualsMessages(lhs.assetId, rhs.assetId) && deepEqualsMessages(lhs.error, rhs.error) && deepEqualsMessages(lhs.cloudId, rhs.cloudId) - } - - func hash(into hasher: inout Hasher) { - hasher.combine("CloudIdResult") - deepHashMessages(value: assetId, hasher: &hasher) - deepHashMessages(value: error, hasher: &hasher) - deepHashMessages(value: cloudId, hasher: &hasher) - } -} - -private class MessagesPigeonCodecReader: FlutterStandardReader { - override func readValue(ofType type: UInt8) -> Any? { - switch type { - case 129: - let enumResultAsInt: Int? = nilOrValue(self.readValue() as! Int?) - if let enumResultAsInt = enumResultAsInt { - return PlatformAssetPlaybackStyle(rawValue: enumResultAsInt) - } - return nil - case 130: - return PlatformAsset.fromList(self.readValue() as! [Any?]) - case 131: - return PlatformAlbum.fromList(self.readValue() as! [Any?]) - case 132: - return SyncDelta.fromList(self.readValue() as! [Any?]) - case 133: - return HashResult.fromList(self.readValue() as! [Any?]) - case 134: - return CloudIdResult.fromList(self.readValue() as! [Any?]) - default: - return super.readValue(ofType: type) - } - } -} - -private class MessagesPigeonCodecWriter: FlutterStandardWriter { - override func writeValue(_ value: Any) { - if let value = value as? PlatformAssetPlaybackStyle { - super.writeByte(129) - super.writeValue(value.rawValue) - } else if let value = value as? PlatformAsset { - super.writeByte(130) - super.writeValue(value.toList()) - } else if let value = value as? PlatformAlbum { - super.writeByte(131) - super.writeValue(value.toList()) - } else if let value = value as? SyncDelta { - super.writeByte(132) - super.writeValue(value.toList()) - } else if let value = value as? HashResult { - super.writeByte(133) - super.writeValue(value.toList()) - } else if let value = value as? CloudIdResult { - super.writeByte(134) - super.writeValue(value.toList()) - } else { - super.writeValue(value) - } - } -} - -private class MessagesPigeonCodecReaderWriter: FlutterStandardReaderWriter { - override func reader(with data: Data) -> FlutterStandardReader { - return MessagesPigeonCodecReader(data: data) - } - - override func writer(with data: NSMutableData) -> FlutterStandardWriter { - return MessagesPigeonCodecWriter(data: data) - } -} - -class MessagesPigeonCodec: FlutterStandardMessageCodec, @unchecked Sendable { - static let shared = MessagesPigeonCodec(readerWriter: MessagesPigeonCodecReaderWriter()) -} - - -/// Generated protocol from Pigeon that represents a handler of messages from Flutter. -protocol NativeSyncApi { - func shouldFullSync(completion: @escaping (Result) -> Void) - func getMediaChanges(completion: @escaping (Result) -> Void) - func checkpointSync() throws - func clearSyncCheckpoint() throws - func getAssetIdsForAlbum(albumId: String, completion: @escaping (Result<[String], Error>) -> Void) - func getAlbums(completion: @escaping (Result<[PlatformAlbum], Error>) -> Void) - func getAssetsCountSince(albumId: String, timestamp: Int64) throws -> Int64 - func getAssetsForAlbum(albumId: String, updatedTimeCond: Int64?, completion: @escaping (Result<[PlatformAsset], Error>) -> Void) - func hashAssets(assetIds: [String], allowNetworkAccess: Bool, completion: @escaping (Result<[HashResult], Error>) -> Void) - func cancelHashing() throws - func cancelSync() throws - func getTrashedAssets() throws -> [String: [PlatformAsset]] - func restoreFromTrashById(mediaId: String, type: Int64, completion: @escaping (Result) -> Void) - func getCloudIdForAssetIds(assetIds: [String]) throws -> [CloudIdResult] -} - -/// Generated setup class from Pigeon to handle messages through the `binaryMessenger`. -class NativeSyncApiSetup { - static var codec: FlutterStandardMessageCodec { MessagesPigeonCodec.shared } - /// Sets up an instance of `NativeSyncApi` to handle messages through the `binaryMessenger`. - static func setUp(binaryMessenger: FlutterBinaryMessenger, api: NativeSyncApi?, messageChannelSuffix: String = "") { - let channelSuffix = messageChannelSuffix.count > 0 ? ".\(messageChannelSuffix)" : "" - #if os(iOS) - let taskQueue = binaryMessenger.makeBackgroundTaskQueue?() - #else - let taskQueue: FlutterTaskQueue? = nil - #endif - let shouldFullSyncChannel = FlutterBasicMessageChannel(name: "dev.flutter.pigeon.immich_mobile.NativeSyncApi.shouldFullSync\(channelSuffix)", binaryMessenger: binaryMessenger, codec: codec) - if let api = api { - shouldFullSyncChannel.setMessageHandler { _, reply in - api.shouldFullSync { result in - switch result { - case .success(let res): - reply(wrapResult(res)) - case .failure(let error): - reply(wrapError(error)) - } - } - } - } else { - shouldFullSyncChannel.setMessageHandler(nil) - } - let getMediaChangesChannel = FlutterBasicMessageChannel(name: "dev.flutter.pigeon.immich_mobile.NativeSyncApi.getMediaChanges\(channelSuffix)", binaryMessenger: binaryMessenger, codec: codec) - if let api = api { - getMediaChangesChannel.setMessageHandler { _, reply in - api.getMediaChanges { result in - switch result { - case .success(let res): - reply(wrapResult(res)) - case .failure(let error): - reply(wrapError(error)) - } - } - } - } else { - getMediaChangesChannel.setMessageHandler(nil) - } - let checkpointSyncChannel = FlutterBasicMessageChannel(name: "dev.flutter.pigeon.immich_mobile.NativeSyncApi.checkpointSync\(channelSuffix)", binaryMessenger: binaryMessenger, codec: codec) - if let api = api { - checkpointSyncChannel.setMessageHandler { _, reply in - do { - try api.checkpointSync() - reply(wrapResult(nil)) - } catch { - reply(wrapError(error)) - } - } - } else { - checkpointSyncChannel.setMessageHandler(nil) - } - let clearSyncCheckpointChannel = FlutterBasicMessageChannel(name: "dev.flutter.pigeon.immich_mobile.NativeSyncApi.clearSyncCheckpoint\(channelSuffix)", binaryMessenger: binaryMessenger, codec: codec) - if let api = api { - clearSyncCheckpointChannel.setMessageHandler { _, reply in - do { - try api.clearSyncCheckpoint() - reply(wrapResult(nil)) - } catch { - reply(wrapError(error)) - } - } - } else { - clearSyncCheckpointChannel.setMessageHandler(nil) - } - let getAssetIdsForAlbumChannel = FlutterBasicMessageChannel(name: "dev.flutter.pigeon.immich_mobile.NativeSyncApi.getAssetIdsForAlbum\(channelSuffix)", binaryMessenger: binaryMessenger, codec: codec) - if let api = api { - getAssetIdsForAlbumChannel.setMessageHandler { message, reply in - let args = message as! [Any?] - let albumIdArg = args[0] as! String - api.getAssetIdsForAlbum(albumId: albumIdArg) { result in - switch result { - case .success(let res): - reply(wrapResult(res)) - case .failure(let error): - reply(wrapError(error)) - } - } - } - } else { - getAssetIdsForAlbumChannel.setMessageHandler(nil) - } - let getAlbumsChannel = FlutterBasicMessageChannel(name: "dev.flutter.pigeon.immich_mobile.NativeSyncApi.getAlbums\(channelSuffix)", binaryMessenger: binaryMessenger, codec: codec) - if let api = api { - getAlbumsChannel.setMessageHandler { _, reply in - api.getAlbums { result in - switch result { - case .success(let res): - reply(wrapResult(res)) - case .failure(let error): - reply(wrapError(error)) - } - } - } - } else { - getAlbumsChannel.setMessageHandler(nil) - } - let getAssetsCountSinceChannel = taskQueue == nil - ? FlutterBasicMessageChannel(name: "dev.flutter.pigeon.immich_mobile.NativeSyncApi.getAssetsCountSince\(channelSuffix)", binaryMessenger: binaryMessenger, codec: codec) - : FlutterBasicMessageChannel(name: "dev.flutter.pigeon.immich_mobile.NativeSyncApi.getAssetsCountSince\(channelSuffix)", binaryMessenger: binaryMessenger, codec: codec, taskQueue: taskQueue) - if let api = api { - getAssetsCountSinceChannel.setMessageHandler { message, reply in - let args = message as! [Any?] - let albumIdArg = args[0] as! String - let timestampArg = args[1] as! Int64 - do { - let result = try api.getAssetsCountSince(albumId: albumIdArg, timestamp: timestampArg) - reply(wrapResult(result)) - } catch { - reply(wrapError(error)) - } - } - } else { - getAssetsCountSinceChannel.setMessageHandler(nil) - } - let getAssetsForAlbumChannel = FlutterBasicMessageChannel(name: "dev.flutter.pigeon.immich_mobile.NativeSyncApi.getAssetsForAlbum\(channelSuffix)", binaryMessenger: binaryMessenger, codec: codec) - if let api = api { - getAssetsForAlbumChannel.setMessageHandler { message, reply in - let args = message as! [Any?] - let albumIdArg = args[0] as! String - let updatedTimeCondArg: Int64? = nilOrValue(args[1]) - api.getAssetsForAlbum(albumId: albumIdArg, updatedTimeCond: updatedTimeCondArg) { result in - switch result { - case .success(let res): - reply(wrapResult(res)) - case .failure(let error): - reply(wrapError(error)) - } - } - } - } else { - getAssetsForAlbumChannel.setMessageHandler(nil) - } - let hashAssetsChannel = taskQueue == nil - ? FlutterBasicMessageChannel(name: "dev.flutter.pigeon.immich_mobile.NativeSyncApi.hashAssets\(channelSuffix)", binaryMessenger: binaryMessenger, codec: codec) - : FlutterBasicMessageChannel(name: "dev.flutter.pigeon.immich_mobile.NativeSyncApi.hashAssets\(channelSuffix)", binaryMessenger: binaryMessenger, codec: codec, taskQueue: taskQueue) - if let api = api { - hashAssetsChannel.setMessageHandler { message, reply in - let args = message as! [Any?] - let assetIdsArg = args[0] as! [String] - let allowNetworkAccessArg = args[1] as! Bool - api.hashAssets(assetIds: assetIdsArg, allowNetworkAccess: allowNetworkAccessArg) { result in - switch result { - case .success(let res): - reply(wrapResult(res)) - case .failure(let error): - reply(wrapError(error)) - } - } - } - } else { - hashAssetsChannel.setMessageHandler(nil) - } - let cancelHashingChannel = FlutterBasicMessageChannel(name: "dev.flutter.pigeon.immich_mobile.NativeSyncApi.cancelHashing\(channelSuffix)", binaryMessenger: binaryMessenger, codec: codec) - if let api = api { - cancelHashingChannel.setMessageHandler { _, reply in - do { - try api.cancelHashing() - reply(wrapResult(nil)) - } catch { - reply(wrapError(error)) - } - } - } else { - cancelHashingChannel.setMessageHandler(nil) - } - let cancelSyncChannel = FlutterBasicMessageChannel(name: "dev.flutter.pigeon.immich_mobile.NativeSyncApi.cancelSync\(channelSuffix)", binaryMessenger: binaryMessenger, codec: codec) - if let api = api { - cancelSyncChannel.setMessageHandler { _, reply in - do { - try api.cancelSync() - reply(wrapResult(nil)) - } catch { - reply(wrapError(error)) - } - } - } else { - cancelSyncChannel.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) - } - let restoreFromTrashByIdChannel = FlutterBasicMessageChannel(name: "dev.flutter.pigeon.immich_mobile.NativeSyncApi.restoreFromTrashById\(channelSuffix)", binaryMessenger: binaryMessenger, codec: codec) - if let api = api { - restoreFromTrashByIdChannel.setMessageHandler { message, reply in - let args = message as! [Any?] - let mediaIdArg = args[0] as! String - let typeArg = args[1] as! Int64 - api.restoreFromTrashById(mediaId: mediaIdArg, type: typeArg) { result in - switch result { - case .success(let res): - reply(wrapResult(res)) - case .failure(let error): - reply(wrapError(error)) - } - } - } - } else { - restoreFromTrashByIdChannel.setMessageHandler(nil) - } - let getCloudIdForAssetIdsChannel = taskQueue == nil - ? FlutterBasicMessageChannel(name: "dev.flutter.pigeon.immich_mobile.NativeSyncApi.getCloudIdForAssetIds\(channelSuffix)", binaryMessenger: binaryMessenger, codec: codec) - : FlutterBasicMessageChannel(name: "dev.flutter.pigeon.immich_mobile.NativeSyncApi.getCloudIdForAssetIds\(channelSuffix)", binaryMessenger: binaryMessenger, codec: codec, taskQueue: taskQueue) - if let api = api { - getCloudIdForAssetIdsChannel.setMessageHandler { message, reply in - let args = message as! [Any?] - let assetIdsArg = args[0] as! [String] - do { - let result = try api.getCloudIdForAssetIds(assetIds: assetIdsArg) - reply(wrapResult(result)) - } catch { - reply(wrapError(error)) - } - } - } else { - getCloudIdForAssetIdsChannel.setMessageHandler(nil) - } - } -} diff --git a/mobile/ios/Signing.xcconfig b/mobile/ios/Signing.xcconfig new file mode 100644 index 0000000000..bd6b270772 --- /dev/null +++ b/mobile/ios/Signing.xcconfig @@ -0,0 +1,29 @@ +// Xcode Signing Constants +// +// These are integrated into the Xcode project at build time to allow for dynamic signing configs +// across our many targets. +// +// Create `Signing.local.xcconfig` overriding each variable to provide your own personal signing +// overrides during local development: +// IMMICH_TEAM_ID = ABCDE12345 +// IMMICH_BUNDLE_ID_PROD = com.customuniqueid.immich +// IMMICH_BUNDLE_ID_DEV = com.customuniqueid.immichdev +// IMMICH_GROUP_ID = group.com.customuniqueid.immich + +// Apple Developer Team ID used for automatically provisioning signing credentials +IMMICH_TEAM_ID = 2W7AC6T8T5 + +// Root bundle identifier for the Release configuration. +// Extension suffixes (`.ShareExtension`/`.Widget`) will be appended +IMMICH_BUNDLE_ID_PROD = app.alextran.immich + +// Root bundle identifier for the Debug and Profile configurations. +// Build scheme suffixes (`.debug`/`.profile`) will be appended +IMMICH_BUNDLE_ID_DEV = app.futo.immich + +// Root App Group identifier. +// Build scheme suffixes (`.debug`/`.profile`) will be appended +IMMICH_GROUP_ID = group.app.immich.share + +// Optional per-developer configuration override +#include? "Signing.local.xcconfig" diff --git a/mobile/ios/WidgetExtension/ImageEntry.swift b/mobile/ios/WidgetExtension/ImageEntry.swift index ee371703a8..58f89339ac 100644 --- a/mobile/ios/WidgetExtension/ImageEntry.swift +++ b/mobile/ios/WidgetExtension/ImageEntry.swift @@ -12,13 +12,15 @@ struct ImageEntry: TimelineEntry { var subtitle: String? = nil var error: WidgetError? = nil var deepLink: URL? = nil + var forceFullColor: Bool = true } static func build( api: ImmichAPI, asset: Asset, dateOffset: Int, - subtitle: String? = nil + subtitle: String? = nil, + forceFullColor: Bool = true ) async throws -> Self { @@ -34,7 +36,8 @@ struct ImageEntry: TimelineEntry { image: image, metadata: EntryMetadata( subtitle: subtitle, - deepLink: asset.deepLink + deepLink: asset.deepLink, + forceFullColor: forceFullColor ) ) } @@ -111,12 +114,26 @@ struct ImageEntry: TimelineEntry { } +// Required so that we can decode older versions of the metadata +extension ImageEntry.Metadata { + init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + subtitle = try container.decodeIfPresent(String.self, forKey: .subtitle) + error = try container.decodeIfPresent(WidgetError.self, forKey: .error) + deepLink = try container.decodeIfPresent(URL.self, forKey: .deepLink) + + forceFullColor = + try container.decodeIfPresent(Bool.self, forKey: .forceFullColor) ?? true + } +} + func generateRandomEntries( api: ImmichAPI, now: Date, count: Int, filter: SearchFilter = Album.NONE.filter, - subtitle: String? = nil + subtitle: String? = nil, + forceFullColor: Bool = true ) async throws -> [ImageEntry] { @@ -132,7 +149,8 @@ func generateRandomEntries( api: api, asset: asset, dateOffset: dateOffset, - subtitle: subtitle + subtitle: subtitle, + forceFullColor: forceFullColor ) } } diff --git a/mobile/ios/WidgetExtension/ImageWidgetView.swift b/mobile/ios/WidgetExtension/ImageWidgetView.swift index 8e810b051e..2e3a816d92 100644 --- a/mobile/ios/WidgetExtension/ImageWidgetView.swift +++ b/mobile/ios/WidgetExtension/ImageWidgetView.swift @@ -3,10 +3,10 @@ import WidgetKit extension Image { @ViewBuilder - func tintedWidgetImageModifier() -> some View { + func tintedWidgetImageModifier(forceFullColor: Bool) -> some View { if #available(iOS 18.0, *) { self - .widgetAccentedRenderingMode(.accentedDesaturated) + .widgetAccentedRenderingMode(forceFullColor ? .accentedDesaturated : .fullColor) } else { self } @@ -17,44 +17,77 @@ struct ImmichWidgetView: View { var entry: ImageEntry var body: some View { - if entry.image == nil { - VStack { - Image("LaunchImage") - .tintedWidgetImageModifier() - Text(entry.metadata.error?.errorDescription ?? "") - .minimumScaleFactor(0.25) - .multilineTextAlignment(.center) - .foregroundStyle(.secondary) - } - .padding(16) + if let image = entry.image { + ImmichWidgetContentView( + image: image, + subtitle: entry.metadata.subtitle, + deepLink: entry.metadata.deepLink, + forceFullColor: entry.metadata.forceFullColor + ) } else { - ZStack(alignment: .leading) { - Color.clear.overlay( - Image(uiImage: entry.image!) - .resizable() - .tintedWidgetImageModifier() - .scaledToFill() - - ) - VStack { - Spacer() - if let subtitle = entry.metadata.subtitle { - Text(subtitle) - .foregroundColor(.white) - .padding(8) - .background(Color.black.opacity(0.6)) - .cornerRadius(8) - .font(.system(size: 16)) - } - } - .padding(16) - } - .widgetURL(entry.metadata.deepLink) + ImmichWidgetLoadingView( + message: entry.metadata.error?.errorDescription, + forceFullColor: entry.metadata.forceFullColor + ) } } } +private struct ImmichWidgetLoadingView: View { + let message: String? + let forceFullColor: Bool + + var body: some View { + let messageText = Text(message ?? "") + .minimumScaleFactor(0.25) + .multilineTextAlignment(.center) + .foregroundStyle(.secondary) + + VStack(spacing: 8) { + // This is used as a nicer way to center the image, rather than using offsets + messageText.hidden() + + Image("LaunchImage") + .tintedWidgetImageModifier(forceFullColor: forceFullColor) + + messageText + } + } +} + +private struct ImmichWidgetContentView: View { + let image: UIImage + let subtitle: String? + let deepLink: URL? + let forceFullColor: Bool + + var body: some View { + ZStack(alignment: .leading) { + Color.clear.overlay( + Image(uiImage: image) + .resizable() + .tintedWidgetImageModifier(forceFullColor: forceFullColor) + .scaledToFill() + ) + + VStack { + Spacer() + if let subtitle { + Text(subtitle) + .foregroundColor(.white) + .padding(6) + .background(ContainerRelativeShape().fill(Color.black.opacity(0.6))) + .font(.system(size: 16)) + } + } + .padding(16) + } + .widgetURL(deepLink) + } +} + #Preview( + "Medium", as: .systemMedium, widget: { ImmichRandomWidget() @@ -63,10 +96,93 @@ struct ImmichWidgetView: View { let date = Date() ImageEntry( date: date, - image: UIImage(named: "ImmichLogo"), + image: UIImage(named: "LaunchImage"), metadata: EntryMetadata( subtitle: "1 year ago" ) ) } ) + +#Preview( + "Medium No Data", + as: .systemMedium, + widget: { + ImmichRandomWidget() + }, + timeline: { + let date = Date() + ImageEntry( + date: date, + image: nil + ) + } +) + +#Preview( + "Medium No Data Error", + as: .systemMedium, + widget: { + ImmichRandomWidget() + }, + timeline: { + let date = Date() + ImageEntry( + date: date, + image: nil, + metadata: EntryMetadata(error: WidgetError.fetchFailed) + ) + } +) + +#Preview( + "Small", + as: .systemSmall, + widget: { + ImmichRandomWidget() + }, + timeline: { + let date = Date() + ImageEntry( + date: date, + image: UIImage(named: "LaunchImage"), + metadata: EntryMetadata( + subtitle: "Yesterday" + ) + ) + } +) + +#Preview( + "Small No Data Error", + as: .systemSmall, + widget: { + ImmichRandomWidget() + }, + timeline: { + let date = Date() + ImageEntry( + date: date, + image: nil, + metadata: EntryMetadata(error: WidgetError.fetchFailed) + ) + } +) + +#Preview( + "Large", + as: .systemLarge, + widget: { + ImmichRandomWidget() + }, + timeline: { + let date = Date() + ImageEntry( + date: date, + image: UIImage(named: "LaunchImage"), + metadata: EntryMetadata( + subtitle: "2000 seconds ago" + ) + ) + } +) diff --git a/mobile/ios/WidgetExtension/ImmichAPI.swift b/mobile/ios/WidgetExtension/ImmichAPI.swift index c5d7971aba..7e9dcd904a 100644 --- a/mobile/ios/WidgetExtension/ImmichAPI.swift +++ b/mobile/ios/WidgetExtension/ImmichAPI.swift @@ -25,7 +25,7 @@ extension WidgetError: LocalizedError { return "Login to Immich" case .fetchFailed: - return "Unable to connect to your Immich instance" + return "Unable to connect to Immich" case .albumNotFound: return "Album not found" @@ -203,7 +203,10 @@ class ImmichAPI { func fetchMemory(for date: Date) async throws -> [MemoryResult] { // get URL - let memoryParams = [URLQueryItem(name: "for", value: date.ISO8601Format())] + let localDay = date.formatted( + Date.ISO8601FormatStyle(timeZone: .current).year().month().day().dateSeparator(.dash) + ) + let memoryParams = [URLQueryItem(name: "for", value: localDay)] guard let searchURL = buildRequestURL( serverConfig: serverConfig, diff --git a/mobile/ios/WidgetExtension/widgets/MemoryWidget.swift b/mobile/ios/WidgetExtension/widgets/MemoryWidget.swift index 22414fbec4..dee5a32159 100644 --- a/mobile/ios/WidgetExtension/widgets/MemoryWidget.swift +++ b/mobile/ios/WidgetExtension/widgets/MemoryWidget.swift @@ -2,7 +2,21 @@ import AppIntents import SwiftUI import WidgetKit -struct ImmichMemoryProvider: TimelineProvider { +// MARK: Widget Configuration + +struct MemoryConfigurationAppIntent: WidgetConfigurationIntent { + static var title: LocalizedStringResource { "Memories" } + static var description: IntentDescription { + "See memories from Immich." + } + + @Parameter(title: "Always Display in Full Color", default: false) + var forceFullColor: Bool +} + +// MARK: Provider + +struct ImmichMemoryProvider: AppIntentTimelineProvider { func getYearDifferenceSubtitle(assetYear: Int) -> String { let currentYear = Calendar.current.component(.year, from: Date.now) // construct a "X years ago" subtitle @@ -15,75 +29,69 @@ struct ImmichMemoryProvider: TimelineProvider { ImageEntry(date: Date(), image: nil) } - func getSnapshot( - in context: Context, - completion: @escaping @Sendable (ImageEntry) -> Void - ) { + func snapshot( + for configuration: MemoryConfigurationAppIntent, + in context: Context + ) async -> ImageEntry { let cacheKey = "memory_\(context.family.rawValue)" - Task { - guard let api = try? await ImmichAPI() else { - completion( - ImageEntry.handleError(for: cacheKey, error: .noLogin).entries.first! - ) - return - } - - guard let memories = try? await api.fetchMemory(for: Date.now) - else { - completion(ImageEntry.handleError(for: cacheKey).entries.first!) - return - } - - for memory in memories { - if let asset = memory.assets.first(where: { $0.type == .image }), - let entry = try? await ImageEntry.build( - api: api, - asset: asset, - dateOffset: 0, - subtitle: getYearDifferenceSubtitle(assetYear: memory.data.year) - ) - { - completion(entry) - return - } - } - - // fallback to random image - guard - let randomImage = try? await api.fetchSearchResults().first, - let imageEntry = try? await ImageEntry.build( - api: api, - asset: randomImage, - dateOffset: 0 - ) - else { - completion(ImageEntry.handleError(for: cacheKey).entries.first!) - return - } - - completion(imageEntry) + guard let api = try? await ImmichAPI() else { + return ImageEntry.handleError(for: cacheKey, error: .noLogin).entries + .first! } + + guard let memories = try? await api.fetchMemory(for: Date.now) else { + return ImageEntry.handleError(for: cacheKey).entries.first! + } + + for memory in memories { + if let asset = memory.assets.first(where: { $0.type == .image }), + let entry = try? await ImageEntry.build( + api: api, + asset: asset, + dateOffset: 0, + subtitle: getYearDifferenceSubtitle(assetYear: memory.data.year), + forceFullColor: configuration.forceFullColor + ) + { + return entry + } + } + + // fallback to random image + guard + let randomImage = try? await api.fetchSearchResults().first, + let imageEntry = try? await ImageEntry.build( + api: api, + asset: randomImage, + dateOffset: 0, + forceFullColor: configuration.forceFullColor + ) + else { + return ImageEntry.handleError(for: cacheKey).entries.first! + } + + return imageEntry } - func getTimeline( - in context: Context, - completion: @escaping @Sendable (Timeline) -> Void - ) { - Task { - var entries: [ImageEntry] = [] - let now = Date() + func timeline( + for configuration: MemoryConfigurationAppIntent, + in context: Context + ) async + -> Timeline + { + var entries: [ImageEntry] = [] + let now = Date() - let cacheKey = "memory_\(context.family.rawValue)" + let cacheKey = "memory_\(context.family.rawValue)" - guard let api = try? await ImmichAPI() else { - completion( - ImageEntry.handleError(for: cacheKey, error: .noLogin) - ) - return - } + guard let api = try? await ImmichAPI() else { + return ImageEntry.handleError(for: cacheKey, error: .noLogin) + } - let memories = try await api.fetchMemory(for: Date.now) + let memories: [MemoryResult] + do { + memories = try await api.fetchMemory(for: Date.now) await withTaskGroup(of: ImageEntry?.self) { group in var totalAssets = 0 @@ -98,7 +106,8 @@ struct ImmichMemoryProvider: TimelineProvider { dateOffset: totalAssets, subtitle: getYearDifferenceSubtitle( assetYear: memory.data.year - ) + ), + forceFullColor: configuration.forceFullColor ) } @@ -114,38 +123,38 @@ struct ImmichMemoryProvider: TimelineProvider { } } - // If we didn't add any memory images (some failure occurred or no images in memory), - // default to 12 hours of random photos - if entries.count == 0 { - // this must be a do/catch since we need to - // distinguish between a network fail and an empty search - do { - let search = try await generateRandomEntries( - api: api, - now: now, - count: 12 - ) - - // Load or save a cached asset for when network conditions are bad - if search.count == 0 { - completion( - ImageEntry.handleError(for: cacheKey, error: .noAssetsAvailable) - ) - return - } - - entries.append(contentsOf: search) - } catch { - completion(ImageEntry.handleError(for: cacheKey)) - return - } - } - - // cache the last image - try? entries.last!.cache(for: cacheKey) - - completion(Timeline(entries: entries, policy: .atEnd)) + } catch { + return ImageEntry.handleError(for: cacheKey) } + + // If we didn't add any memory images (some failure occurred or no images in memory), + // default to 12 hours of random photos + if entries.count == 0 { + // this must be a do/catch since we need to + // distinguish between a network fail and an empty search + do { + let search = try await generateRandomEntries( + api: api, + now: now, + count: 12, + forceFullColor: configuration.forceFullColor + ) + + // Load or save a cached asset for when network conditions are bad + if search.count == 0 { + return ImageEntry.handleError(for: cacheKey, error: .noAssetsAvailable) + } + + entries.append(contentsOf: search) + } catch { + return ImageEntry.handleError(for: cacheKey) + } + } + + // cache the last image + try? entries.last!.cache(for: cacheKey) + + return Timeline(entries: entries, policy: .atEnd) } } @@ -153,8 +162,9 @@ struct ImmichMemoryWidget: Widget { let kind: String = "com.immich.widget.memory" var body: some WidgetConfiguration { - StaticConfiguration( + AppIntentConfiguration( kind: kind, + intent: MemoryConfigurationAppIntent.self, provider: ImmichMemoryProvider() ) { entry in ImmichWidgetView(entry: entry) diff --git a/mobile/ios/WidgetExtension/widgets/RandomWidget.swift b/mobile/ios/WidgetExtension/widgets/RandomWidget.swift index 37f3c5e596..d987464152 100644 --- a/mobile/ios/WidgetExtension/widgets/RandomWidget.swift +++ b/mobile/ios/WidgetExtension/widgets/RandomWidget.swift @@ -47,6 +47,9 @@ struct RandomConfigurationAppIntent: WidgetConfigurationIntent { @Parameter(title: "Show Album Name", default: false) var showAlbumName: Bool + + @Parameter(title: "Always Display in Full Color", default: false) + var forceFullColor: Bool } // MARK: Provider @@ -76,7 +79,8 @@ struct ImmichRandomProvider: AppIntentTimelineProvider { let entry = try? await ImageEntry.build( api: api, asset: randomImage, - dateOffset: 0 + dateOffset: 0, + forceFullColor: configuration.forceFullColor ) else { return ImageEntry.handleError(for: cacheKey).entries.first! @@ -114,7 +118,8 @@ struct ImmichRandomProvider: AppIntentTimelineProvider { now: now, count: 12, filter: album.filter, - subtitle: configuration.showAlbumName ? albumName : nil + subtitle: configuration.showAlbumName ? albumName : nil, + forceFullColor: configuration.forceFullColor ) // Load or save a cached asset for when network conditions are bad diff --git a/mobile/ios/scripts/xcode_flutter_build.sh b/mobile/ios/scripts/xcode_flutter_build.sh new file mode 100755 index 0000000000..43977d3861 --- /dev/null +++ b/mobile/ios/scripts/xcode_flutter_build.sh @@ -0,0 +1,45 @@ +#!/usr/bin/env bash +# Makes Flutter's builds through the Xcode GUI properly display errors and warnings +# in the Issue navigator +# +# Flutter's `xcode_backend.dart` runs `flutter assemble` with `allowFail: true`, +# which intentionally does not prefix output with `error:`. Unsure why they do this, +# but this script rebuilds the expected output so Xcode can parse and display the errors + +set -o pipefail + +# The Immich mobile root (containing the Dart `lib` directory). This is used to make +# absolute paths for Xcode linking +app_root="${FLUTTER_APPLICATION_PATH:-$SRCROOT/..}" + +/bin/sh "$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh" build 2>&1 \ + | awk -v app_root="$app_root" ' + # Match Dart CFE diagnostics: .dart::: : + # Written for macOS/POSIX/BSD awk + { + # Always pass the original line through to preserve the original build log + print + + if ($0 ~ /^.*\.dart:[0-9]+:[0-9]+: (Error|Warning|Context|Info):/) { + # Locate the ": Kind:" separator to split location from message. + rest = $0 + if (match(rest, /: Error:/)) { kind = "Error"; keyword = "error" } + else if (match(rest, /: Warning:/)) { kind = "Warning"; keyword = "warning" } + else if (match(rest, /: Context:/)) { kind = "Context"; keyword = "note" } + else if (match(rest, /: Info:/)) { kind = "Info"; keyword = "note" } + + # location = everything before ": Kind:" (e.g. "lib/foo.dart:12:5") + location = substr(rest, 1, RSTART - 1) + # message = everything after ": Kind:" (leading space preserved) + message = substr(rest, RSTART + length(": " kind ":")) + + # Make the path absolute so Xcode links to it + if (location !~ /^\//) + location = app_root "/" location + + printf "%s: %s:%s\n", location, keyword, message + } + } + ' + +exit "${PIPESTATUS[0]}" diff --git a/mobile/lib/constants/aspect_ratios.dart b/mobile/lib/constants/aspect_ratios.dart index 9159db4ef1..49165e0913 100644 --- a/mobile/lib/constants/aspect_ratios.dart +++ b/mobile/lib/constants/aspect_ratios.dart @@ -1,19 +1,48 @@ import 'package:flutter/material.dart'; +import 'package:freezed_annotation/freezed_annotation.dart'; -enum AspectRatioPreset { - free(ratio: null, label: 'Free', icon: Icons.crop_free_rounded), - square(ratio: 1.0, label: '1:1', icon: Icons.crop_square_rounded), - ratio16x9(ratio: 16 / 9, label: '16:9', icon: Icons.crop_16_9_rounded), - ratio3x2(ratio: 3 / 2, label: '3:2', icon: Icons.crop_3_2_rounded), - ratio7x5(ratio: 7 / 5, label: '7:5', icon: Icons.crop_7_5_rounded), - ratio9x16(ratio: 9 / 16, label: '9:16', icon: Icons.crop_16_9_rounded, iconRotated: true), - ratio2x3(ratio: 2 / 3, label: '2:3', icon: Icons.crop_3_2_rounded, iconRotated: true), - ratio5x7(ratio: 5 / 7, label: '5:7', icon: Icons.crop_7_5_rounded, iconRotated: true); +part 'aspect_ratios.freezed.dart'; - final double? ratio; - final String label; - final IconData icon; - final bool iconRotated; +@freezed +abstract class CropAspectRatio with _$CropAspectRatio { + const CropAspectRatio._(); - const AspectRatioPreset({required this.ratio, required this.label, required this.icon, this.iconRotated = false}); + const factory CropAspectRatio({int? numerator, int? denominator, String? customLabel, IconData? icon}) = + _CropAspectRatio; + + static const free = CropAspectRatio(customLabel: "Free", icon: Icons.crop_free); + static const original = CropAspectRatio(customLabel: "Original", icon: Icons.crop_original); + + String get label { + return customLabel ?? (numerator != null && denominator != null ? '$numerator:$denominator' : 'Free'); + } + + bool get hasFlippedVariant => numerator != denominator; + double? get ratio => (numerator != null && denominator != null) ? numerator! / denominator! : null; + + CropAspectRatio get flipped { + return CropAspectRatio(numerator: denominator, denominator: numerator, customLabel: customLabel, icon: icon); + } } + +const aspectRatioFree = CropAspectRatio.free; +const aspectRatioOriginal = CropAspectRatio.original; + +final aspectRatioPresets = [ + CropAspectRatio.free, + CropAspectRatio.original, + + const CropAspectRatio(numerator: 1, denominator: 1), + + // lanscape + const CropAspectRatio(numerator: 16, denominator: 9), + const CropAspectRatio(numerator: 3, denominator: 2), + const CropAspectRatio(numerator: 7, denominator: 5), + const CropAspectRatio(numerator: 4, denominator: 3), + + // portrait + const CropAspectRatio(numerator: 16, denominator: 9).flipped, + const CropAspectRatio(numerator: 3, denominator: 2).flipped, + const CropAspectRatio(numerator: 7, denominator: 5).flipped, + const CropAspectRatio(numerator: 4, denominator: 3).flipped, +]; diff --git a/mobile/lib/constants/constants.dart b/mobile/lib/constants/constants.dart index b7fec86b55..c2a13c3ec2 100644 --- a/mobile/lib/constants/constants.dart +++ b/mobile/lib/constants/constants.dart @@ -26,7 +26,6 @@ const String kDownloadGroupLivePhoto = 'group_livephoto'; const String kShareDownloadGroup = 'group_share'; // Timeline constants -const int kTimelineNoneSegmentSize = 120; const int kTimelineAssetLoadBatchSize = 1024; const int kTimelineAssetLoadOppositeSize = 64; diff --git a/mobile/lib/constants/enums.dart b/mobile/lib/constants/enums.dart index 72479416a8..d3f85ceb2e 100644 --- a/mobile/lib/constants/enums.dart +++ b/mobile/lib/constants/enums.dart @@ -9,8 +9,6 @@ enum SortOrder { enum TextSearchType { context, filename, description, ocr } -enum AssetVisibilityEnum { timeline, hidden, archive, locked } - enum ActionSource { timeline, viewer } enum ShareAssetType { original, preview } @@ -26,3 +24,14 @@ enum SlideshowLook { contain, cover, blurredBackground } enum SlideshowDirection { forward, backward, shuffle } enum PartnerDirection { sharedBy, sharedWith } + +enum DevicePermission { photos, videos, storage, mediaLocation } + +enum DevicePermissionStatus { + denied, + granted, + limited, + permanentlyDenied; + + bool get hasAccess => this == granted || this == limited; +} diff --git a/mobile/lib/constants/locales.dart b/mobile/lib/constants/locales.dart index 3082a1a0dd..429a3718da 100644 --- a/mobile/lib/constants/locales.dart +++ b/mobile/lib/constants/locales.dart @@ -6,10 +6,12 @@ const Map locales = { // Additional locales 'Arabic (ar)': Locale('ar'), 'Basque (eu)': Locale('eu'), - 'Bosnian (bl)': Locale('bn'), + 'Belarusian (be)': Locale('be'), + 'Bengali (bn)': Locale('bn'), 'Brazilian Portuguese (pt_BR)': Locale('pt', 'BR'), 'Bulgarian (bg)': Locale('bg'), 'Catalan (ca)': Locale('ca'), + 'Cantonese (Traditional)': Locale.fromSubtags(languageCode: 'yue', scriptCode: 'Hant'), 'Chinese Simplified (zh_CN)': Locale.fromSubtags(languageCode: 'zh', scriptCode: 'Hans'), 'Chinese Traditional (zh_TW)': Locale.fromSubtags(languageCode: 'zh', scriptCode: 'Hant'), 'Croatian (hr)': Locale('hr'), diff --git a/mobile/lib/domain/models/album/album.model.dart b/mobile/lib/domain/models/album/album.model.dart index 63f4ed6be3..e63a3774e1 100644 --- a/mobile/lib/domain/models/album/album.model.dart +++ b/mobile/lib/domain/models/album/album.model.dart @@ -1,3 +1,8 @@ +import 'package:flutter/foundation.dart'; +import 'package:freezed_annotation/freezed_annotation.dart'; + +part 'album.model.freezed.dart'; + enum AlbumAssetOrder { // do not change this order! asc, @@ -12,118 +17,20 @@ enum AlbumUserRole { } // Model for an album stored in the server -class RemoteAlbum { - final String id; - final String name; - final String ownerId; - final String description; - final DateTime createdAt; - final DateTime updatedAt; - final String? thumbnailAssetId; - final bool isActivityEnabled; - final AlbumAssetOrder order; - final int assetCount; - final String ownerName; - final bool isShared; - - const RemoteAlbum({ - required this.id, - required this.name, - required this.ownerId, - required this.description, - required this.createdAt, - required this.updatedAt, - this.thumbnailAssetId, - required this.isActivityEnabled, - required this.order, - required this.assetCount, - required this.ownerName, - required this.isShared, - }); - - @override - String toString() { - return '''Album { - id: $id, - name: $name, - ownerId: $ownerId, - description: $description, - createdAt: $createdAt, - updatedAt: $updatedAt, - isActivityEnabled: $isActivityEnabled, - order: $order, - thumbnailAssetId: ${thumbnailAssetId ?? ""} - assetCount: $assetCount - ownerName: $ownerName - isShared: $isShared - }'''; - } - - @override - bool operator ==(Object other) { - if (other is! RemoteAlbum) { - return false; - } - if (identical(this, other)) { - return true; - } - return id == other.id && - name == other.name && - ownerId == other.ownerId && - description == other.description && - createdAt == other.createdAt && - updatedAt == other.updatedAt && - thumbnailAssetId == other.thumbnailAssetId && - isActivityEnabled == other.isActivityEnabled && - order == other.order && - assetCount == other.assetCount && - ownerName == other.ownerName && - isShared == other.isShared; - } - - @override - int get hashCode { - return id.hashCode ^ - name.hashCode ^ - ownerId.hashCode ^ - description.hashCode ^ - createdAt.hashCode ^ - updatedAt.hashCode ^ - thumbnailAssetId.hashCode ^ - isActivityEnabled.hashCode ^ - order.hashCode ^ - assetCount.hashCode ^ - ownerName.hashCode ^ - isShared.hashCode; - } - - RemoteAlbum copyWith({ - String? id, - String? name, - String? ownerId, - String? description, - DateTime? createdAt, - DateTime? updatedAt, +@freezed +abstract class RemoteAlbum with _$RemoteAlbum { + const factory RemoteAlbum({ + required String id, + required String name, + required String ownerId, + required String description, + required DateTime createdAt, + required DateTime updatedAt, String? thumbnailAssetId, - bool? isActivityEnabled, - AlbumAssetOrder? order, - int? assetCount, - String? ownerName, - bool? isShared, - }) { - return RemoteAlbum( - id: id ?? this.id, - name: name ?? this.name, - ownerId: ownerId ?? this.ownerId, - description: description ?? this.description, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - thumbnailAssetId: thumbnailAssetId ?? this.thumbnailAssetId, - isActivityEnabled: isActivityEnabled ?? this.isActivityEnabled, - order: order ?? this.order, - assetCount: assetCount ?? this.assetCount, - ownerName: ownerName ?? this.ownerName, - isShared: isShared ?? this.isShared, - ); - } + required bool isActivityEnabled, + required AlbumAssetOrder order, + required int assetCount, + required String ownerName, + required bool isShared, + }) = _RemoteAlbum; } diff --git a/mobile/lib/domain/models/album/local_album.model.dart b/mobile/lib/domain/models/album/local_album.model.dart index 9e8521fa02..cddc1d1953 100644 --- a/mobile/lib/domain/models/album/local_album.model.dart +++ b/mobile/lib/domain/models/album/local_album.model.dart @@ -1,3 +1,8 @@ +import 'package:flutter/foundation.dart'; +import 'package:freezed_annotation/freezed_annotation.dart'; + +part 'local_album.model.freezed.dart'; + enum BackupSelection { // Used to sort albums based on the backupSelection // selected -> none -> excluded @@ -7,85 +12,15 @@ enum BackupSelection { excluded, } -class LocalAlbum { - final String id; - final String name; - final DateTime updatedAt; - final bool isIosSharedAlbum; - - final int assetCount; - final BackupSelection backupSelection; - final String? linkedRemoteAlbumId; - - const LocalAlbum({ - required this.id, - required this.name, - required this.updatedAt, - this.assetCount = 0, - this.backupSelection = BackupSelection.none, - this.isIosSharedAlbum = false, - this.linkedRemoteAlbumId, - }); - - LocalAlbum copyWith({ - String? id, - String? name, - DateTime? updatedAt, - int? assetCount, - BackupSelection? backupSelection, - bool? isIosSharedAlbum, +@freezed +abstract class LocalAlbum with _$LocalAlbum { + const factory LocalAlbum({ + required String id, + required String name, + required DateTime updatedAt, + @Default(0) int assetCount, + @Default(BackupSelection.none) BackupSelection backupSelection, + @Default(false) bool isIosSharedAlbum, String? linkedRemoteAlbumId, - }) { - return LocalAlbum( - id: id ?? this.id, - name: name ?? this.name, - updatedAt: updatedAt ?? this.updatedAt, - assetCount: assetCount ?? this.assetCount, - backupSelection: backupSelection ?? this.backupSelection, - isIosSharedAlbum: isIosSharedAlbum ?? this.isIosSharedAlbum, - linkedRemoteAlbumId: linkedRemoteAlbumId ?? this.linkedRemoteAlbumId, - ); - } - - @override - bool operator ==(Object other) { - if (other is! LocalAlbum) { - return false; - } - if (identical(this, other)) { - return true; - } - - return other.id == id && - other.name == name && - other.updatedAt == updatedAt && - other.assetCount == assetCount && - other.backupSelection == backupSelection && - other.isIosSharedAlbum == isIosSharedAlbum && - other.linkedRemoteAlbumId == linkedRemoteAlbumId; - } - - @override - int get hashCode { - return id.hashCode ^ - name.hashCode ^ - updatedAt.hashCode ^ - assetCount.hashCode ^ - backupSelection.hashCode ^ - isIosSharedAlbum.hashCode ^ - linkedRemoteAlbumId.hashCode; - } - - @override - String toString() { - return '''LocalAlbum: { -id: $id, -name: $name, -updatedAt: $updatedAt, -assetCount: $assetCount, -backupSelection: $backupSelection, -isIosSharedAlbum: $isIosSharedAlbum -linkedRemoteAlbumId: $linkedRemoteAlbumId, -}'''; - } + }) = _LocalAlbum; } diff --git a/mobile/lib/domain/models/asset/base_asset.model.dart b/mobile/lib/domain/models/asset/base_asset.model.dart index 418b124930..ac89fe9a0a 100644 --- a/mobile/lib/domain/models/asset/base_asset.model.dart +++ b/mobile/lib/domain/models/asset/base_asset.model.dart @@ -27,7 +27,6 @@ sealed class BaseAsset { final int? height; final int? durationMs; final bool isFavorite; - final String? livePhotoVideoId; final bool isEdited; const BaseAsset({ @@ -40,52 +39,49 @@ sealed class BaseAsset { this.height, this.durationMs, this.isFavorite = false, - this.livePhotoVideoId, required this.isEdited, }); bool get isImage => type == AssetType.image; bool get isVideo => type == AssetType.video; - bool get isMotionPhoto => livePhotoVideoId != null; + bool get isMotionPhoto => playbackStyle == AssetPlaybackStyle.livePhoto; bool get isAnimatedImage => playbackStyle == AssetPlaybackStyle.imageAnimated; - AssetPlaybackStyle get playbackStyle { - if (isVideo) { - return AssetPlaybackStyle.video; - } - if (isMotionPhoto) { - return AssetPlaybackStyle.livePhoto; - } - if (isImage && durationMs != null && durationMs! > 0) { - return AssetPlaybackStyle.imageAnimated; - } - if (isImage) { - return AssetPlaybackStyle.image; - } - return AssetPlaybackStyle.unknown; - } - Duration get duration { final durationMs = this.durationMs; if (durationMs != null) { return Duration(milliseconds: durationMs); } - return const Duration(); + return Duration.zero; } bool get hasRemote => storage == AssetState.remote || storage == AssetState.merged; bool get hasLocal => storage == AssetState.local || storage == AssetState.merged; bool get isLocalOnly => storage == AssetState.local; bool get isRemoteOnly => storage == AssetState.remote; + bool get isMerged => storage == .merged; + + // Same asset even if localId is known on one side but not the other (heroTag isn't stable then) + bool refersToSameAsset(BaseAsset other) { + if (remoteId != null && other.remoteId != null) { + return remoteId == other.remoteId; + } + if (localId != null && other.localId != null) { + return localId == other.localId; + } + return checksum != null && checksum == other.checksum; + } bool get isEditable => false; // Overridden in subclasses AssetState get storage; + String get id; String? get localId; String? get remoteId; String get heroTag; + AssetPlaybackStyle get playbackStyle; @override String toString() { diff --git a/mobile/lib/domain/models/asset/local_asset.model.dart b/mobile/lib/domain/models/asset/local_asset.model.dart index 04f0ae6c8c..15039761a8 100644 --- a/mobile/lib/domain/models/asset/local_asset.model.dart +++ b/mobile/lib/domain/models/asset/local_asset.model.dart @@ -1,6 +1,7 @@ part of 'base_asset.model.dart'; class LocalAsset extends BaseAsset { + @override final String id; final String? remoteAssetId; final String? cloudId; @@ -25,7 +26,6 @@ class LocalAsset extends BaseAsset { super.height, super.durationMs, super.isFavorite = false, - super.livePhotoVideoId, this.orientation = 0, required this.playbackStyle, this.adjustmentTime, diff --git a/mobile/lib/domain/models/asset/remote_asset.model.dart b/mobile/lib/domain/models/asset/remote_asset.model.dart index b370825fdd..5707329ba3 100644 --- a/mobile/lib/domain/models/asset/remote_asset.model.dart +++ b/mobile/lib/domain/models/asset/remote_asset.model.dart @@ -4,12 +4,14 @@ enum AssetVisibility { timeline, hidden, archive, locked } // Model for an asset stored in the server class RemoteAsset extends BaseAsset { + @override final String id; final String? localAssetId; final String? thumbHash; final AssetVisibility visibility; final String ownerId; final String? stackId; + final String? livePhotoVideoId; final DateTime? uploadedAt; final DateTime? deletedAt; @@ -29,7 +31,7 @@ class RemoteAsset extends BaseAsset { super.isFavorite = false, this.thumbHash, this.visibility = AssetVisibility.timeline, - super.livePhotoVideoId, + this.livePhotoVideoId, this.stackId, required super.isEdited, this.deletedAt, @@ -38,6 +40,23 @@ class RemoteAsset extends BaseAsset { @override String? get localId => localAssetId; + @override + AssetPlaybackStyle get playbackStyle { + if (isVideo) { + return AssetPlaybackStyle.video; + } + if (livePhotoVideoId != null) { + return AssetPlaybackStyle.livePhoto; + } + if (isImage && durationMs != null && durationMs! > 0) { + return AssetPlaybackStyle.imageAnimated; + } + if (isImage) { + return AssetPlaybackStyle.image; + } + return AssetPlaybackStyle.unknown; + } + @override String? get remoteId => id; @@ -52,6 +71,12 @@ class RemoteAsset extends BaseAsset { bool get isTrashed => deletedAt != null; + bool get isStacked => stackId != null; + + bool get isArchived => visibility == .archive; + + bool get isLocked => visibility == .locked; + @override String toString() { return '''Asset { @@ -90,6 +115,7 @@ class RemoteAsset extends BaseAsset { thumbHash == other.thumbHash && visibility == other.visibility && stackId == other.stackId && + livePhotoVideoId == other.livePhotoVideoId && uploadedAt == other.uploadedAt && deletedAt == other.deletedAt; } @@ -103,6 +129,7 @@ class RemoteAsset extends BaseAsset { thumbHash.hashCode ^ visibility.hashCode ^ stackId.hashCode ^ + livePhotoVideoId.hashCode ^ uploadedAt.hashCode ^ deletedAt.hashCode; diff --git a/mobile/lib/domain/models/asset_edit.model.dart b/mobile/lib/domain/models/asset_edit.model.dart index 9809b9c606..c7a09dbae3 100644 --- a/mobile/lib/domain/models/asset_edit.model.dart +++ b/mobile/lib/domain/models/asset_edit.model.dart @@ -1,4 +1,4 @@ -import "package:openapi/api.dart" show CropParameters, RotateParameters, MirrorParameters; +import "package:openapi/api.dart" show CropParameters, MirrorParameters, RotateParameters; enum AssetEditAction { rotate, crop, mirror, other } diff --git a/mobile/lib/domain/models/asset_face.model.dart b/mobile/lib/domain/models/asset_face.model.dart index 1388836946..c65f159fe7 100644 --- a/mobile/lib/domain/models/asset_face.model.dart +++ b/mobile/lib/domain/models/asset_face.model.dart @@ -1,100 +1,21 @@ +import 'package:flutter/foundation.dart'; +import 'package:freezed_annotation/freezed_annotation.dart'; + +part 'asset_face.model.freezed.dart'; + // Model for an asset face stored in the server -class AssetFace { - 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 AssetFace({ - 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, - }); - - AssetFace copyWith({ - String? id, - String? assetId, +@freezed +abstract class AssetFace with _$AssetFace { + const factory AssetFace({ + required String id, + required String assetId, String? personId, - int? imageWidth, - int? imageHeight, - int? boundingBoxX1, - int? boundingBoxY1, - int? boundingBoxX2, - int? boundingBoxY2, - String? sourceType, - }) { - return AssetFace( - 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 - String toString() { - return '''AssetFace { - id: $id, - assetId: $assetId, - personId: ${personId ?? ""}, - imageWidth: $imageWidth, - imageHeight: $imageHeight, - boundingBoxX1: $boundingBoxX1, - boundingBoxY1: $boundingBoxY1, - boundingBoxX2: $boundingBoxX2, - boundingBoxY2: $boundingBoxY2, - sourceType: $sourceType, -}'''; - } - - @override - bool operator ==(covariant AssetFace other) { - if (identical(this, other)) { - return true; - } - - return other.id == id && - other.assetId == assetId && - other.personId == personId && - other.imageWidth == imageWidth && - other.imageHeight == imageHeight && - other.boundingBoxX1 == boundingBoxX1 && - other.boundingBoxY1 == boundingBoxY1 && - other.boundingBoxX2 == boundingBoxX2 && - other.boundingBoxY2 == boundingBoxY2 && - other.sourceType == sourceType; - } - - @override - int get hashCode { - return id.hashCode ^ - assetId.hashCode ^ - personId.hashCode ^ - imageWidth.hashCode ^ - imageHeight.hashCode ^ - boundingBoxX1.hashCode ^ - boundingBoxY1.hashCode ^ - boundingBoxX2.hashCode ^ - boundingBoxY2.hashCode ^ - sourceType.hashCode; - } + required int imageWidth, + required int imageHeight, + required int boundingBoxX1, + required int boundingBoxY1, + required int boundingBoxX2, + required int boundingBoxY2, + required String sourceType, + }) = _AssetFace; } diff --git a/mobile/lib/domain/models/config/album_config.dart b/mobile/lib/domain/models/config/album_config.dart index a83fc32fbf..16deca1b8f 100644 --- a/mobile/lib/domain/models/config/album_config.dart +++ b/mobile/lib/domain/models/config/album_config.dart @@ -1,26 +1,14 @@ +import 'package:flutter/foundation.dart'; +import 'package:freezed_annotation/freezed_annotation.dart'; import 'package:immich_mobile/providers/album/album_sort_by_options.provider.dart'; -class AlbumConfig { - final AlbumSortMode sortMode; - final bool isReverse; - final bool isGrid; +part 'album_config.freezed.dart'; - const AlbumConfig({this.sortMode = AlbumSortMode.mostRecent, this.isReverse = true, this.isGrid = false}); - - AlbumConfig copyWith({AlbumSortMode? sortMode, bool? isReverse, bool? isGrid}) => AlbumConfig( - sortMode: sortMode ?? this.sortMode, - isReverse: isReverse ?? this.isReverse, - isGrid: isGrid ?? this.isGrid, - ); - - @override - bool operator ==(Object other) => - identical(this, other) || - (other is AlbumConfig && other.sortMode == sortMode && other.isReverse == isReverse && other.isGrid == isGrid); - - @override - int get hashCode => Object.hash(sortMode, isReverse, isGrid); - - @override - String toString() => 'AlbumConfig(sortMode: $sortMode, isReverse: $isReverse, isGrid: $isGrid)'; +@freezed +abstract class AlbumConfig with _$AlbumConfig { + const factory AlbumConfig({ + @Default(AlbumSortMode.mostRecent) AlbumSortMode sortMode, + @Default(true) bool isReverse, + @Default(false) bool isGrid, + }) = _AlbumConfig; } diff --git a/mobile/lib/domain/models/config/app_config.dart b/mobile/lib/domain/models/config/app_config.dart index 30e828311b..bc089e621e 100644 --- a/mobile/lib/domain/models/config/app_config.dart +++ b/mobile/lib/domain/models/config/app_config.dart @@ -1,9 +1,12 @@ +import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; +import 'package:freezed_annotation/freezed_annotation.dart'; import 'package:immich_mobile/constants/colors.dart'; import 'package:immich_mobile/constants/enums.dart'; import 'package:immich_mobile/domain/models/config/album_config.dart'; import 'package:immich_mobile/domain/models/config/backup_config.dart'; import 'package:immich_mobile/domain/models/config/cleanup_config.dart'; +import 'package:immich_mobile/domain/models/config/feature_message_config.dart'; import 'package:immich_mobile/domain/models/config/image_config.dart'; import 'package:immich_mobile/domain/models/config/map_config.dart'; import 'package:immich_mobile/domain/models/config/network_config.dart'; @@ -16,90 +19,31 @@ import 'package:immich_mobile/domain/models/log.model.dart'; import 'package:immich_mobile/domain/models/settings_key.dart'; import 'package:immich_mobile/domain/models/timeline.model.dart'; import 'package:immich_mobile/providers/album/album_sort_by_options.provider.dart'; +import 'package:immich_mobile/utils/semver.dart'; + +part 'app_config.freezed.dart'; const defaultConfig = AppConfig(); -class AppConfig { - final LogLevel logLevel; - final ThemeConfig theme; - final CleanupConfig cleanup; - final MapConfig map; - final TimelineConfig timeline; - final ImageConfig image; - final ViewerConfig viewer; - final SlideshowConfig slideshow; - final AlbumConfig album; - final BackupConfig backup; - final NetworkConfig network; - final ShareConfig share; +@freezed +abstract class AppConfig with _$AppConfig { + const AppConfig._(); - const AppConfig({ - this.logLevel = .info, - this.theme = const .new(), - this.cleanup = const .new(), - this.map = const .new(), - this.timeline = const .new(), - this.image = const .new(), - this.viewer = const .new(), - this.slideshow = const .new(), - this.album = const .new(), - this.backup = const .new(), - this.network = const .new(), - this.share = const .new(), - }); - - AppConfig copyWith({ - LogLevel? logLevel, - ThemeConfig? theme, - CleanupConfig? cleanup, - MapConfig? map, - TimelineConfig? timeline, - ImageConfig? image, - ViewerConfig? viewer, - SlideshowConfig? slideshow, - AlbumConfig? album, - BackupConfig? backup, - NetworkConfig? network, - ShareConfig? share, - }) => .new( - logLevel: logLevel ?? this.logLevel, - theme: theme ?? this.theme, - cleanup: cleanup ?? this.cleanup, - map: map ?? this.map, - timeline: timeline ?? this.timeline, - image: image ?? this.image, - viewer: viewer ?? this.viewer, - slideshow: slideshow ?? this.slideshow, - album: album ?? this.album, - backup: backup ?? this.backup, - network: network ?? this.network, - share: share ?? this.share, - ); - - @override - bool operator ==(Object other) => - identical(this, other) || - (other is AppConfig && - other.logLevel == logLevel && - other.theme == theme && - other.cleanup == cleanup && - other.map == map && - other.timeline == timeline && - other.image == image && - other.viewer == viewer && - other.slideshow == slideshow && - other.album == album && - other.backup == backup && - other.network == network && - other.share == share); - - @override - int get hashCode => - Object.hash(logLevel, theme, cleanup, map, timeline, image, viewer, slideshow, album, backup, network, share); - - @override - String toString() => - 'AppConfig(logLevel: $logLevel, theme: $theme, cleanup: $cleanup, map: $map, timeline: $timeline, image: $image, viewer: $viewer, slideshow: $slideshow, album: $album, backup: $backup, network: $network, share: $share)'; + const factory AppConfig({ + @Default(LogLevel.info) LogLevel logLevel, + @Default(ThemeConfig()) ThemeConfig theme, + @Default(CleanupConfig()) CleanupConfig cleanup, + @Default(MapConfig()) MapConfig map, + @Default(TimelineConfig()) TimelineConfig timeline, + @Default(ImageConfig()) ImageConfig image, + @Default(ViewerConfig()) ViewerConfig viewer, + @Default(SlideshowConfig()) SlideshowConfig slideshow, + @Default(AlbumConfig()) AlbumConfig album, + @Default(BackupConfig()) BackupConfig backup, + @Default(NetworkConfig()) NetworkConfig network, + @Default(ShareConfig()) ShareConfig share, + @Default(FeatureMessageConfig()) FeatureMessageConfig featureMessage, + }) = _AppConfig; T read(SettingsKey key) => (switch (key) { @@ -133,6 +77,8 @@ class AppConfig { .timelineStorageIndicator => timeline.storageIndicator, .mapShowFavoriteOnly => map.favoritesOnly, .mapRelativeDate => map.relativeDays, + .mapCustomFrom => map.customFrom, + .mapCustomTo => map.customTo, .mapIncludeArchived => map.includeArchived, .mapThemeMode => map.themeMode, .mapWithPartners => map.withPartners, @@ -146,6 +92,7 @@ class AppConfig { .slideshowDuration => slideshow.duration, .slideshowLook => slideshow.look, .slideshowDirection => slideshow.direction, + .featureMessageSeenRelease => featureMessage.seenRelease, }) as T; @@ -167,9 +114,9 @@ class AppConfig { .viewerTapToNavigate => copyWith(viewer: viewer.copyWith(tapToNavigate: value as bool)), .networkAutoEndpointSwitching => copyWith(network: network.copyWith(autoEndpointSwitching: value as bool)), .networkPreferredWifiName => copyWith( - network: network.copyWith(preferredWifiName: .fromNullable((value as String?))), + network: network.copyWith(preferredWifiName: .fromNullable(value as String?)), ), - .networkLocalEndpoint => copyWith(network: network.copyWith(localEndpoint: .fromNullable((value as String?)))), + .networkLocalEndpoint => copyWith(network: network.copyWith(localEndpoint: .fromNullable(value as String?))), .networkExternalEndpointList => copyWith(network: network.copyWith(externalEndpointList: value as List)), .networkCustomHeaders => copyWith(network: network.copyWith(customHeaders: value as Map)), .albumSortMode => copyWith(album: album.copyWith(sortMode: value as AlbumSortMode)), @@ -186,6 +133,8 @@ class AppConfig { .timelineStorageIndicator => copyWith(timeline: timeline.copyWith(storageIndicator: value as bool)), .mapShowFavoriteOnly => copyWith(map: map.copyWith(favoritesOnly: value as bool)), .mapRelativeDate => copyWith(map: map.copyWith(relativeDays: value as int)), + .mapCustomFrom => copyWith(map: map.copyWith(customFrom: .fromNullable(value as DateTime?))), + .mapCustomTo => copyWith(map: map.copyWith(customTo: .fromNullable(value as DateTime?))), .mapIncludeArchived => copyWith(map: map.copyWith(includeArchived: value as bool)), .mapThemeMode => copyWith(map: map.copyWith(themeMode: value as ThemeMode)), .mapWithPartners => copyWith(map: map.copyWith(withPartners: value as bool)), @@ -199,6 +148,7 @@ class AppConfig { .slideshowDuration => copyWith(slideshow: slideshow.copyWith(duration: value as int)), .slideshowLook => copyWith(slideshow: slideshow.copyWith(look: value as SlideshowLook)), .slideshowDirection => copyWith(slideshow: slideshow.copyWith(direction: value as SlideshowDirection)), + .featureMessageSeenRelease => copyWith(featureMessage: featureMessage.copyWith(seenRelease: value as SemVer)), }; } } diff --git a/mobile/lib/domain/models/config/backup_config.dart b/mobile/lib/domain/models/config/backup_config.dart index 19f91a4ed7..4177408fcc 100644 --- a/mobile/lib/domain/models/config/backup_config.dart +++ b/mobile/lib/domain/models/config/backup_config.dart @@ -1,52 +1,16 @@ -class BackupConfig { - final bool enabled; - final bool useCellularForVideos; - final bool useCellularForPhotos; - final bool requireCharging; - final int triggerDelay; - final bool syncAlbums; +import 'package:flutter/foundation.dart'; +import 'package:freezed_annotation/freezed_annotation.dart'; - const BackupConfig({ - this.enabled = false, - this.useCellularForVideos = false, - this.useCellularForPhotos = false, - this.requireCharging = false, - this.triggerDelay = 30, - this.syncAlbums = false, - }); +part 'backup_config.freezed.dart'; - BackupConfig copyWith({ - bool? enabled, - bool? useCellularForVideos, - bool? useCellularForPhotos, - bool? requireCharging, - int? triggerDelay, - bool? syncAlbums, - }) => BackupConfig( - enabled: enabled ?? this.enabled, - useCellularForVideos: useCellularForVideos ?? this.useCellularForVideos, - useCellularForPhotos: useCellularForPhotos ?? this.useCellularForPhotos, - requireCharging: requireCharging ?? this.requireCharging, - triggerDelay: triggerDelay ?? this.triggerDelay, - syncAlbums: syncAlbums ?? this.syncAlbums, - ); - - @override - bool operator ==(Object other) => - identical(this, other) || - (other is BackupConfig && - other.enabled == enabled && - other.useCellularForVideos == useCellularForVideos && - other.useCellularForPhotos == useCellularForPhotos && - other.requireCharging == requireCharging && - other.triggerDelay == triggerDelay && - other.syncAlbums == syncAlbums); - - @override - int get hashCode => - Object.hash(enabled, useCellularForVideos, useCellularForPhotos, requireCharging, triggerDelay, syncAlbums); - - @override - String toString() => - 'BackupConfig(enabled: $enabled, useCellularForVideos: $useCellularForVideos, useCellularForPhotos: $useCellularForPhotos, requireCharging: $requireCharging, triggerDelay: $triggerDelay, syncAlbums: $syncAlbums)'; +@freezed +abstract class BackupConfig with _$BackupConfig { + const factory BackupConfig({ + @Default(false) bool enabled, + @Default(false) bool useCellularForVideos, + @Default(false) bool useCellularForPhotos, + @Default(false) bool requireCharging, + @Default(30) int triggerDelay, + @Default(false) bool syncAlbums, + }) = _BackupConfig; } diff --git a/mobile/lib/domain/models/config/feature_message_config.dart b/mobile/lib/domain/models/config/feature_message_config.dart new file mode 100644 index 0000000000..0fc13fd51f --- /dev/null +++ b/mobile/lib/domain/models/config/feature_message_config.dart @@ -0,0 +1,11 @@ +import 'package:flutter/foundation.dart'; +import 'package:freezed_annotation/freezed_annotation.dart'; +import 'package:immich_mobile/utils/semver.dart'; + +part 'feature_message_config.freezed.dart'; + +@freezed +abstract class FeatureMessageConfig with _$FeatureMessageConfig { + const factory FeatureMessageConfig({@Default(SemVer(major: 0, minor: 0, patch: 0)) SemVer seenRelease}) = + _FeatureMessageConfig; +} diff --git a/mobile/lib/domain/models/config/image_config.dart b/mobile/lib/domain/models/config/image_config.dart index 8410a9010b..a51193d1d3 100644 --- a/mobile/lib/domain/models/config/image_config.dart +++ b/mobile/lib/domain/models/config/image_config.dart @@ -1,20 +1,9 @@ -class ImageConfig { - final bool preferRemote; - final bool loadOriginal; +import 'package:flutter/foundation.dart'; +import 'package:freezed_annotation/freezed_annotation.dart'; - const ImageConfig({this.preferRemote = false, this.loadOriginal = false}); +part 'image_config.freezed.dart'; - ImageConfig copyWith({bool? preferRemote, bool? loadOriginal}) => - ImageConfig(preferRemote: preferRemote ?? this.preferRemote, loadOriginal: loadOriginal ?? this.loadOriginal); - - @override - bool operator ==(Object other) => - identical(this, other) || - (other is ImageConfig && other.preferRemote == preferRemote && other.loadOriginal == loadOriginal); - - @override - int get hashCode => Object.hash(preferRemote, loadOriginal); - - @override - String toString() => 'ImageConfig(preferRemoteImage: $preferRemote, loadOriginal: $loadOriginal)'; +@freezed +abstract class ImageConfig with _$ImageConfig { + const factory ImageConfig({@Default(false) bool preferRemote, @Default(false) bool loadOriginal}) = _ImageConfig; } diff --git a/mobile/lib/domain/models/config/map_config.dart b/mobile/lib/domain/models/config/map_config.dart index e37ab0f431..85cac80081 100644 --- a/mobile/lib/domain/models/config/map_config.dart +++ b/mobile/lib/domain/models/config/map_config.dart @@ -1,4 +1,5 @@ import 'package:flutter/material.dart'; +import 'package:immich_mobile/utils/option.dart'; class MapConfig { final int relativeDays; @@ -6,13 +7,17 @@ class MapConfig { final bool includeArchived; final ThemeMode themeMode; final bool withPartners; + final DateTime? customFrom; + final DateTime? customTo; const MapConfig({ this.relativeDays = 0, this.favoritesOnly = false, this.includeArchived = false, - this.themeMode = ThemeMode.system, + this.themeMode = .system, this.withPartners = false, + this.customFrom, + this.customTo, }); MapConfig copyWith({ @@ -21,12 +26,16 @@ class MapConfig { bool? includeArchived, ThemeMode? themeMode, bool? withPartners, + Option? customFrom, + Option? customTo, }) => MapConfig( relativeDays: relativeDays ?? this.relativeDays, favoritesOnly: favoritesOnly ?? this.favoritesOnly, includeArchived: includeArchived ?? this.includeArchived, themeMode: themeMode ?? this.themeMode, withPartners: withPartners ?? this.withPartners, + customFrom: customFrom.patch(this.customFrom), + customTo: customTo.patch(this.customTo), ); @override @@ -37,12 +46,15 @@ class MapConfig { other.favoritesOnly == favoritesOnly && other.includeArchived == includeArchived && other.themeMode == themeMode && - other.withPartners == withPartners); + other.withPartners == withPartners && + other.customFrom == customFrom && + other.customTo == customTo); @override - int get hashCode => Object.hash(relativeDays, favoritesOnly, includeArchived, themeMode, withPartners); + int get hashCode => + Object.hash(relativeDays, favoritesOnly, includeArchived, themeMode, withPartners, customFrom, customTo); @override String toString() => - 'MapConfig(relativeDays: $relativeDays, favoritesOnly: $favoritesOnly, includeArchived: $includeArchived, themeMode: $themeMode, withPartners: $withPartners)'; + 'MapConfig(relativeDays: $relativeDays, favoritesOnly: $favoritesOnly, includeArchived: $includeArchived, themeMode: $themeMode, withPartners: $withPartners, customFrom: $customFrom, customTo: $customTo)'; } diff --git a/mobile/lib/domain/models/config/share_config.dart b/mobile/lib/domain/models/config/share_config.dart index 898867ff78..49530aca30 100644 --- a/mobile/lib/domain/models/config/share_config.dart +++ b/mobile/lib/domain/models/config/share_config.dart @@ -1,18 +1,10 @@ +import 'package:flutter/foundation.dart'; +import 'package:freezed_annotation/freezed_annotation.dart'; import 'package:immich_mobile/constants/enums.dart'; -class ShareConfig { - final ShareAssetType fileType; +part 'share_config.freezed.dart'; - const ShareConfig({this.fileType = ShareAssetType.original}); - - ShareConfig copyWith({ShareAssetType? fileType}) => ShareConfig(fileType: fileType ?? this.fileType); - - @override - bool operator ==(Object other) => identical(this, other) || (other is ShareConfig && other.fileType == fileType); - - @override - int get hashCode => fileType.hashCode; - - @override - String toString() => 'ShareConfig(fileType: $fileType)'; +@freezed +abstract class ShareConfig with _$ShareConfig { + const factory ShareConfig({@Default(ShareAssetType.original) ShareAssetType fileType}) = _ShareConfig; } diff --git a/mobile/lib/domain/models/config/slideshow_config.dart b/mobile/lib/domain/models/config/slideshow_config.dart index 6bcdaadc77..cacba1a89e 100644 --- a/mobile/lib/domain/models/config/slideshow_config.dart +++ b/mobile/lib/domain/models/config/slideshow_config.dart @@ -1,38 +1,15 @@ +import 'package:flutter/foundation.dart'; +import 'package:freezed_annotation/freezed_annotation.dart'; import 'package:immich_mobile/constants/enums.dart'; -class SlideshowConfig { - final bool repeat; - final int duration; - final SlideshowLook look; - final SlideshowDirection direction; +part 'slideshow_config.freezed.dart'; - const SlideshowConfig({ - this.repeat = true, - this.duration = 5, - this.look = SlideshowLook.blurredBackground, - this.direction = SlideshowDirection.forward, - }); - - SlideshowConfig copyWith({bool? repeat, int? duration, SlideshowLook? look, SlideshowDirection? direction}) => - SlideshowConfig( - repeat: repeat ?? this.repeat, - duration: duration ?? this.duration, - look: look ?? this.look, - direction: direction ?? this.direction, - ); - - @override - bool operator ==(Object other) => - identical(this, other) || - (other is SlideshowConfig && - other.repeat == repeat && - other.duration == duration && - other.look == look && - other.direction == direction); - - @override - int get hashCode => Object.hash(repeat, duration, look, direction); - - @override - String toString() => 'SlideshowConfig(repeat: $repeat, duration: $duration, look: $look, direction: $direction)'; +@freezed +abstract class SlideshowConfig with _$SlideshowConfig { + const factory SlideshowConfig({ + @Default(true) bool repeat, + @Default(5) int duration, + @Default(SlideshowLook.blurredBackground) SlideshowLook look, + @Default(SlideshowDirection.forward) SlideshowDirection direction, + }) = _SlideshowConfig; } diff --git a/mobile/lib/domain/models/config/theme_config.dart b/mobile/lib/domain/models/config/theme_config.dart index fa955c5d46..ac651a8062 100644 --- a/mobile/lib/domain/models/config/theme_config.dart +++ b/mobile/lib/domain/models/config/theme_config.dart @@ -1,44 +1,16 @@ +import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; +import 'package:freezed_annotation/freezed_annotation.dart'; import 'package:immich_mobile/constants/colors.dart'; -class ThemeConfig { - final ThemeMode mode; - final ImmichColorPreset primaryColor; - final bool dynamicTheme; - final bool colorfulInterface; +part 'theme_config.freezed.dart'; - const ThemeConfig({ - this.mode = .system, - this.primaryColor = .indigo, - this.dynamicTheme = false, - this.colorfulInterface = true, - }); - - ThemeConfig copyWith({ - ThemeMode? mode, - ImmichColorPreset? primaryColor, - bool? dynamicTheme, - bool? colorfulInterface, - }) => .new( - mode: mode ?? this.mode, - primaryColor: primaryColor ?? this.primaryColor, - dynamicTheme: dynamicTheme ?? this.dynamicTheme, - colorfulInterface: colorfulInterface ?? this.colorfulInterface, - ); - - @override - bool operator ==(Object other) => - identical(this, other) || - (other is ThemeConfig && - other.mode == mode && - other.primaryColor == primaryColor && - other.dynamicTheme == dynamicTheme && - other.colorfulInterface == colorfulInterface); - - @override - int get hashCode => Object.hash(mode, primaryColor, dynamicTheme, colorfulInterface); - - @override - String toString() => - 'ThemeConfig(mode: $mode, primaryColor: $primaryColor, dynamicTheme: $dynamicTheme, colorfulInterface: $colorfulInterface)'; +@freezed +abstract class ThemeConfig with _$ThemeConfig { + const factory ThemeConfig({ + @Default(ThemeMode.system) ThemeMode mode, + @Default(ImmichColorPreset.indigo) ImmichColorPreset primaryColor, + @Default(false) bool dynamicTheme, + @Default(true) bool colorfulInterface, + }) = _ThemeConfig; } diff --git a/mobile/lib/domain/models/config/timeline_config.dart b/mobile/lib/domain/models/config/timeline_config.dart index 4b6b9d5625..c4681b0a62 100644 --- a/mobile/lib/domain/models/config/timeline_config.dart +++ b/mobile/lib/domain/models/config/timeline_config.dart @@ -1,30 +1,14 @@ +import 'package:flutter/foundation.dart'; +import 'package:freezed_annotation/freezed_annotation.dart'; import 'package:immich_mobile/domain/models/timeline.model.dart'; -class TimelineConfig { - final int tilesPerRow; - final GroupAssetsBy groupAssetsBy; - final bool storageIndicator; +part 'timeline_config.freezed.dart'; - const TimelineConfig({this.tilesPerRow = 4, this.groupAssetsBy = GroupAssetsBy.day, this.storageIndicator = true}); - - TimelineConfig copyWith({int? tilesPerRow, GroupAssetsBy? groupAssetsBy, bool? storageIndicator}) => TimelineConfig( - tilesPerRow: tilesPerRow ?? this.tilesPerRow, - groupAssetsBy: groupAssetsBy ?? this.groupAssetsBy, - storageIndicator: storageIndicator ?? this.storageIndicator, - ); - - @override - bool operator ==(Object other) => - identical(this, other) || - (other is TimelineConfig && - other.tilesPerRow == tilesPerRow && - other.groupAssetsBy == groupAssetsBy && - other.storageIndicator == storageIndicator); - - @override - int get hashCode => Object.hash(tilesPerRow, groupAssetsBy, storageIndicator); - - @override - String toString() => - 'TimelineConfig(tilesPerRow: $tilesPerRow, groupAssetsBy: $groupAssetsBy, storageIndicator: $storageIndicator)'; +@freezed +abstract class TimelineConfig with _$TimelineConfig { + const factory TimelineConfig({ + @Default(4) int tilesPerRow, + @Default(GroupAssetsBy.day) GroupAssetsBy groupAssetsBy, + @Default(true) bool storageIndicator, + }) = _TimelineConfig; } diff --git a/mobile/lib/domain/models/config/viewer_config.dart b/mobile/lib/domain/models/config/viewer_config.dart index 595f2bee5d..e799843034 100644 --- a/mobile/lib/domain/models/config/viewer_config.dart +++ b/mobile/lib/domain/models/config/viewer_config.dart @@ -1,37 +1,14 @@ -class ViewerConfig { - final bool loopVideo; - final bool loadOriginalVideo; - final bool autoPlayVideo; - final bool tapToNavigate; +import 'package:flutter/foundation.dart'; +import 'package:freezed_annotation/freezed_annotation.dart'; - const ViewerConfig({ - this.loopVideo = true, - this.loadOriginalVideo = false, - this.autoPlayVideo = true, - this.tapToNavigate = false, - }); +part 'viewer_config.freezed.dart'; - ViewerConfig copyWith({bool? loopVideo, bool? loadOriginalVideo, bool? autoPlayVideo, bool? tapToNavigate}) => - ViewerConfig( - loopVideo: loopVideo ?? this.loopVideo, - loadOriginalVideo: loadOriginalVideo ?? this.loadOriginalVideo, - autoPlayVideo: autoPlayVideo ?? this.autoPlayVideo, - tapToNavigate: tapToNavigate ?? this.tapToNavigate, - ); - - @override - bool operator ==(Object other) => - identical(this, other) || - (other is ViewerConfig && - other.loopVideo == loopVideo && - other.loadOriginalVideo == loadOriginalVideo && - other.autoPlayVideo == autoPlayVideo && - other.tapToNavigate == tapToNavigate); - - @override - int get hashCode => Object.hash(loopVideo, loadOriginalVideo, autoPlayVideo, tapToNavigate); - - @override - String toString() => - 'ViewerConfig(loopVideo: $loopVideo, loadOriginalVideo: $loadOriginalVideo, autoPlayVideo: $autoPlayVideo, tapToNavigate: $tapToNavigate)'; +@freezed +abstract class ViewerConfig with _$ViewerConfig { + const factory ViewerConfig({ + @Default(true) bool loopVideo, + @Default(false) bool loadOriginalVideo, + @Default(true) bool autoPlayVideo, + @Default(false) bool tapToNavigate, + }) = _ViewerConfig; } diff --git a/mobile/lib/domain/models/events.model.dart b/mobile/lib/domain/models/events.model.dart index 9bbe00852e..ef034a0d03 100644 --- a/mobile/lib/domain/models/events.model.dart +++ b/mobile/lib/domain/models/events.model.dart @@ -24,6 +24,12 @@ class ViewerReloadAssetEvent extends Event { const ViewerReloadAssetEvent(); } +class ViewerStackAssetDeletedEvent extends Event { + final int stackIndex; + + const ViewerStackAssetDeletedEvent({required this.stackIndex}); +} + // Multi-Select Events class MultiSelectToggleEvent extends Event { final bool isEnabled; diff --git a/mobile/lib/domain/models/exif.model.dart b/mobile/lib/domain/models/exif.model.dart index 4284aef2ab..3536048ecc 100644 --- a/mobile/lib/domain/models/exif.model.dart +++ b/mobile/lib/domain/models/exif.model.dart @@ -1,30 +1,40 @@ -class ExifInfo { - final int? assetId; - final int? fileSize; - final String? description; - final bool isFlipped; - final String? orientation; - final String? timeZone; - final DateTime? dateTimeOriginal; - final int? rating; - final int? width; - final int? height; +import 'package:flutter/foundation.dart'; +import 'package:freezed_annotation/freezed_annotation.dart'; - // GPS - final double? latitude; - final double? longitude; - final String? city; - final String? state; - final String? country; +part 'exif.model.freezed.dart'; - // Camera related - final String? make; - final String? model; - final String? lens; - final double? f; - final double? mm; - final int? iso; - final double? exposureSeconds; +@freezed +abstract class ExifInfo with _$ExifInfo { + const ExifInfo._(); + + const factory ExifInfo({ + int? assetId, + int? fileSize, + String? description, + @Default(false) bool isFlipped, + String? orientation, + String? timeZone, + DateTime? dateTimeOriginal, + int? rating, + int? width, + int? height, + + // GPS + double? latitude, + double? longitude, + String? city, + String? state, + String? country, + + // Camera related + String? make, + String? model, + String? lens, + double? f, + double? mm, + int? iso, + double? exposureSeconds, + }) = _ExifInfo; bool get hasCoordinates => latitude != null && longitude != null && latitude != 0 && longitude != 0; @@ -41,162 +51,4 @@ class ExifInfo { String get fNumber => f == null ? "" : f!.toStringAsFixed(1); String get focalLength => mm == null ? "" : mm!.toStringAsFixed(3); - - const ExifInfo({ - this.assetId, - this.fileSize, - this.description, - this.orientation, - this.timeZone, - this.dateTimeOriginal, - this.rating, - this.width, - this.height, - this.isFlipped = false, - this.latitude, - this.longitude, - this.city, - this.state, - this.country, - this.make, - this.model, - this.lens, - this.f, - this.mm, - this.iso, - this.exposureSeconds, - }); - - @override - bool operator ==(covariant ExifInfo other) { - if (identical(this, other)) { - return true; - } - - return other.fileSize == fileSize && - other.description == description && - other.isFlipped == isFlipped && - other.orientation == orientation && - other.timeZone == timeZone && - other.dateTimeOriginal == dateTimeOriginal && - other.rating == rating && - other.width == width && - other.height == height && - other.latitude == latitude && - other.longitude == longitude && - other.city == city && - other.state == state && - other.country == country && - other.make == make && - other.model == model && - other.lens == lens && - other.f == f && - other.mm == mm && - other.iso == iso && - other.exposureSeconds == exposureSeconds && - other.assetId == assetId; - } - - @override - int get hashCode { - return fileSize.hashCode ^ - description.hashCode ^ - orientation.hashCode ^ - isFlipped.hashCode ^ - timeZone.hashCode ^ - dateTimeOriginal.hashCode ^ - rating.hashCode ^ - width.hashCode ^ - height.hashCode ^ - latitude.hashCode ^ - longitude.hashCode ^ - city.hashCode ^ - state.hashCode ^ - country.hashCode ^ - make.hashCode ^ - model.hashCode ^ - lens.hashCode ^ - f.hashCode ^ - mm.hashCode ^ - iso.hashCode ^ - exposureSeconds.hashCode ^ - assetId.hashCode; - } - - @override - String toString() { - return '''{ -fileSize: ${fileSize ?? 'NA'}, -description: ${description ?? 'NA'}, -orientation: ${orientation ?? 'NA'}, -isFlipped: $isFlipped, -timeZone: ${timeZone ?? 'NA'}, -dateTimeOriginal: ${dateTimeOriginal ?? 'NA'}, -rating: ${rating ?? 'NA'}, -width: ${width ?? 'NA'}, -height: ${height ?? 'NA'}, -latitude: ${latitude ?? 'NA'}, -longitude: ${longitude ?? 'NA'}, -city: ${city ?? 'NA'}, -state: ${state ?? 'NA'}, -country: ${country ?? ''}, -make: ${make ?? 'NA'}, -model: ${model ?? 'NA'}, -lens: ${lens ?? 'NA'}, -f: ${f ?? 'NA'}, -mm: ${mm ?? ''}, -iso: ${iso ?? 'NA'}, -exposureSeconds: ${exposureSeconds ?? 'NA'}, -}'''; - } - - ExifInfo copyWith({ - int? assetId, - int? fileSize, - String? description, - String? orientation, - String? timeZone, - DateTime? dateTimeOriginal, - int? rating, - int? width, - int? height, - double? latitude, - double? longitude, - String? city, - String? state, - String? country, - bool? isFlipped, - String? make, - String? model, - String? lens, - double? f, - double? mm, - int? iso, - double? exposureSeconds, - }) { - return ExifInfo( - assetId: assetId ?? this.assetId, - fileSize: fileSize ?? this.fileSize, - description: description ?? this.description, - orientation: orientation ?? this.orientation, - timeZone: timeZone ?? this.timeZone, - dateTimeOriginal: dateTimeOriginal ?? this.dateTimeOriginal, - rating: rating ?? this.rating, - width: width ?? this.width, - height: height ?? this.height, - isFlipped: isFlipped ?? this.isFlipped, - latitude: latitude ?? this.latitude, - longitude: longitude ?? this.longitude, - city: city ?? this.city, - state: state ?? this.state, - country: country ?? this.country, - make: make ?? this.make, - model: model ?? this.model, - lens: lens ?? this.lens, - f: f ?? this.f, - mm: mm ?? this.mm, - iso: iso ?? this.iso, - exposureSeconds: exposureSeconds ?? this.exposureSeconds, - ); - } } diff --git a/mobile/lib/domain/models/feature_message.model.dart b/mobile/lib/domain/models/feature_message.model.dart new file mode 100644 index 0000000000..817076c0e9 --- /dev/null +++ b/mobile/lib/domain/models/feature_message.model.dart @@ -0,0 +1,46 @@ +import 'package:flutter/foundation.dart'; +import 'package:immich_mobile/generated/translations.g.dart'; +import 'package:immich_mobile/utils/semver.dart'; + +enum FeatureHighlight { + shareQuality(image: 'assets/feature_message/share_quality.webp'), + slideshow(image: 'assets/feature_message/slideshow.webp'), + recentlyAdded(image: 'assets/feature_message/recently_added.webp'), + ocr(image: 'assets/feature_message/ocr.webp'), + openInImmich(image: 'assets/feature_message/open_in_immich.webp', platform: [.android]), + uploadToAlbum(); + + /// Asset path of the feature screenshot, or null to show a placeholder. + final String? image; + final List platform; + + const FeatureHighlight({this.image, this.platform = const [.iOS, .android]}); + + bool get isVisibleOnCurrentPlatform => platform.contains(defaultTargetPlatform); + + String title(Translations t) => switch (this) { + FeatureHighlight.shareQuality => t.share_quality_title, + FeatureHighlight.slideshow => t.slideshow_title, + FeatureHighlight.recentlyAdded => t.recently_added_title, + FeatureHighlight.ocr => t.ocr_title, + FeatureHighlight.openInImmich => t.open_in_immich_title, + FeatureHighlight.uploadToAlbum => t.upload_to_album_title, + }; + + String body(Translations t) => switch (this) { + FeatureHighlight.shareQuality => t.share_quality_body, + FeatureHighlight.slideshow => t.slideshow_body, + FeatureHighlight.recentlyAdded => t.recently_added_body, + FeatureHighlight.ocr => t.ocr_body, + FeatureHighlight.openInImmich => t.open_in_immich_body, + FeatureHighlight.uploadToAlbum => t.upload_to_album_body, + }; +} + +/// The release this batch of highlights was authored for. Content-defined: +/// bump it only when publishing a new batch, never from the running app version. +const featureMessageRelease = SemVer(major: 3, minor: 0, patch: 0); + +/// Highlights relevant to the current platform. +List get visibleFeatureMessageHighlights => + FeatureHighlight.values.where((h) => h.isVisibleOnCurrentPlatform).toList(); diff --git a/mobile/lib/domain/models/log.model.dart b/mobile/lib/domain/models/log.model.dart index bed1729f9d..72267bcb5c 100644 --- a/mobile/lib/domain/models/log.model.dart +++ b/mobile/lib/domain/models/log.model.dart @@ -1,51 +1,18 @@ +import 'package:freezed_annotation/freezed_annotation.dart'; + +part 'log.model.freezed.dart'; + /// Log levels according to dart logging [Level] enum LogLevel { all, finest, finer, fine, config, info, warning, severe, shout, off } -class LogMessage { - final String message; - final LogLevel level; - final DateTime createdAt; - final String? logger; - final String? error; - final String? stack; - - const LogMessage({ - required this.message, - required this.level, - required this.createdAt, - this.logger, - this.error, - this.stack, - }); - - @override - bool operator ==(covariant LogMessage other) { - if (identical(this, other)) { - return true; - } - - return other.message == message && - other.level == level && - other.createdAt == createdAt && - other.logger == logger && - other.error == error && - other.stack == stack; - } - - @override - int get hashCode { - return message.hashCode ^ level.hashCode ^ createdAt.hashCode ^ logger.hashCode ^ error.hashCode ^ stack.hashCode; - } - - @override - String toString() { - return '''LogMessage: { -message: $message, -level: $level, -createdAt: $createdAt, -logger: ${logger ?? ''}, -error: ${error ?? ''}, -stack: ${stack ?? ''}, -}'''; - } +@freezed +abstract class LogMessage with _$LogMessage { + const factory LogMessage({ + required String message, + required LogLevel level, + required DateTime createdAt, + String? logger, + String? error, + String? stack, + }) = _LogMessage; } diff --git a/mobile/lib/domain/models/map.model.dart b/mobile/lib/domain/models/map.model.dart index b55f176bfd..52f6fe8afd 100644 --- a/mobile/lib/domain/models/map.model.dart +++ b/mobile/lib/domain/models/map.model.dart @@ -1,20 +1,9 @@ +import 'package:freezed_annotation/freezed_annotation.dart'; import 'package:maplibre_gl/maplibre_gl.dart'; -class Marker { - final LatLng location; - final String assetId; +part 'map.model.freezed.dart'; - const Marker({required this.location, required this.assetId}); - - @override - bool operator ==(covariant Marker other) { - if (identical(this, other)) { - return true; - } - - return other.location == location && other.assetId == assetId; - } - - @override - int get hashCode => location.hashCode ^ assetId.hashCode; +@freezed +abstract class Marker with _$Marker { + const factory Marker({required LatLng location, required String assetId}) = _Marker; } diff --git a/mobile/lib/domain/models/memory.model.dart b/mobile/lib/domain/models/memory.model.dart index e786ca18b1..1c556f382f 100644 --- a/mobile/lib/domain/models/memory.model.dart +++ b/mobile/lib/domain/models/memory.model.dart @@ -1,22 +1,21 @@ -// ignore_for_file: public_member_api_docs, sort_constructors_first import 'dart:convert'; -import 'package:collection/collection.dart'; +import 'package:freezed_annotation/freezed_annotation.dart'; import 'package:immich_mobile/domain/models/asset/base_asset.model.dart'; +part 'memory.model.freezed.dart'; + +// TODO(agg23): Remove enum suffix enum MemoryTypeEnum { // do not change this order! onThisDay, } -class MemoryData { - final int year; +@Freezed(fromJson: false, toJson: false) +abstract class MemoryData with _$MemoryData { + const MemoryData._(); - const MemoryData({required this.year}); - - MemoryData copyWith({int? year}) { - return MemoryData(year: year ?? this.year); - } + const factory MemoryData({required int year}) = _MemoryData; Map toMap() { return {'year': year}; @@ -29,144 +28,25 @@ class MemoryData { String toJson() => json.encode(toMap()); factory MemoryData.fromJson(String source) => MemoryData.fromMap(json.decode(source) as Map); - - @override - String toString() => 'MemoryData(year: $year)'; - - @override - bool operator ==(covariant MemoryData other) { - if (identical(this, other)) { - return true; - } - - return other.year == year; - } - - @override - int get hashCode => year.hashCode; } // Model for a memory stored in the server -class DriftMemory { - final String id; - final DateTime createdAt; - final DateTime updatedAt; - final DateTime? deletedAt; - final String ownerId; - - // enum - final MemoryTypeEnum type; - final MemoryData data; - final bool isSaved; - final DateTime memoryAt; - final DateTime? seenAt; - final DateTime? showAt; - final DateTime? hideAt; - final List assets; - - const DriftMemory({ - 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, - required this.assets, - }); - - DriftMemory copyWith({ - String? id, - DateTime? createdAt, - DateTime? updatedAt, +// TODO(agg23): DriftMemoryRepository currently mutates `assets` +@Freezed(makeCollectionsUnmodifiable: false) +abstract class DriftMemory with _$DriftMemory { + const factory DriftMemory({ + required String id, + required DateTime createdAt, + required DateTime updatedAt, DateTime? deletedAt, - String? ownerId, - MemoryTypeEnum? type, - MemoryData? data, - bool? isSaved, - DateTime? memoryAt, + required String ownerId, + required MemoryTypeEnum type, + required MemoryData data, + required bool isSaved, + required DateTime memoryAt, DateTime? seenAt, DateTime? showAt, DateTime? hideAt, - List? assets, - }) { - return DriftMemory( - 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, - assets: assets ?? this.assets, - ); - } - - @override - String toString() { - return '''Memory { - id: $id, - createdAt: $createdAt, - updatedAt: $updatedAt, - deletedAt: ${deletedAt ?? ""}, - ownerId: $ownerId, - type: $type, - data: $data, - isSaved: $isSaved, - memoryAt: $memoryAt, - seenAt: ${seenAt ?? ""}, - showAt: ${showAt ?? ""}, - hideAt: ${hideAt ?? ""}, - assets: $assets -}'''; - } - - @override - bool operator ==(covariant DriftMemory other) { - if (identical(this, other)) { - return true; - } - final listEquals = const DeepCollectionEquality().equals; - - return other.id == id && - other.createdAt == createdAt && - other.updatedAt == updatedAt && - other.deletedAt == deletedAt && - other.ownerId == ownerId && - other.type == type && - other.data == data && - other.isSaved == isSaved && - other.memoryAt == memoryAt && - other.seenAt == seenAt && - other.showAt == showAt && - other.hideAt == hideAt && - listEquals(other.assets, assets); - } - - @override - int get hashCode { - return id.hashCode ^ - createdAt.hashCode ^ - updatedAt.hashCode ^ - deletedAt.hashCode ^ - ownerId.hashCode ^ - type.hashCode ^ - data.hashCode ^ - isSaved.hashCode ^ - memoryAt.hashCode ^ - seenAt.hashCode ^ - showAt.hashCode ^ - hideAt.hashCode ^ - assets.hashCode; - } + required List assets, + }) = _DriftMemory; } diff --git a/mobile/lib/domain/models/ocr.model.dart b/mobile/lib/domain/models/ocr.model.dart index 403c06d44e..bfb398bc79 100644 --- a/mobile/lib/domain/models/ocr.model.dart +++ b/mobile/lib/domain/models/ocr.model.dart @@ -1,128 +1,24 @@ -class Ocr { - final String id; - final String assetId; - final double x1; - final double y1; - final double x2; - final double y2; - final double x3; - final double y3; - final double x4; - final double y4; - final double boxScore; - final double textScore; - final String text; - final bool isVisible; +import 'package:flutter/foundation.dart'; +import 'package:freezed_annotation/freezed_annotation.dart'; - const Ocr({ - required this.id, - required this.assetId, - required this.x1, - required this.y1, - required this.x2, - required this.y2, - required this.x3, - required this.y3, - required this.x4, - required this.y4, - required this.boxScore, - required this.textScore, - required this.text, - required this.isVisible, - }); +part 'ocr.model.freezed.dart'; - Ocr copyWith({ - String? id, - String? assetId, - double? x1, - double? y1, - double? x2, - double? y2, - double? x3, - double? y3, - double? x4, - double? y4, - double? boxScore, - double? textScore, - String? text, - bool? isVisible, - }) { - return Ocr( - id: id ?? this.id, - assetId: assetId ?? this.assetId, - x1: x1 ?? this.x1, - y1: y1 ?? this.y1, - x2: x2 ?? this.x2, - y2: y2 ?? this.y2, - x3: x3 ?? this.x3, - y3: y3 ?? this.y3, - x4: x4 ?? this.x4, - y4: y4 ?? this.y4, - boxScore: boxScore ?? this.boxScore, - textScore: textScore ?? this.textScore, - text: text ?? this.text, - isVisible: isVisible ?? this.isVisible, - ); - } - - @override - String toString() { - return '''Ocr { - id: $id, - assetId: $assetId, - x1: $x1, - y1: $y1, - x2: $x2, - y2: $y2, - x3: $x3, - y3: $y3, - x4: $x4, - y4: $y4, - boxScore: $boxScore, - textScore: $textScore, - text: $text, - isVisible: $isVisible - }'''; - } - - @override - bool operator ==(Object other) { - if (identical(this, other)) { - return true; - } - - return other is Ocr && - other.id == id && - other.assetId == assetId && - other.x1 == x1 && - other.y1 == y1 && - other.x2 == x2 && - other.y2 == y2 && - other.x3 == x3 && - other.y3 == y3 && - other.x4 == x4 && - other.y4 == y4 && - other.boxScore == boxScore && - other.textScore == textScore && - other.text == text && - other.isVisible == isVisible; - } - - @override - int get hashCode { - return id.hashCode ^ - assetId.hashCode ^ - x1.hashCode ^ - y1.hashCode ^ - x2.hashCode ^ - y2.hashCode ^ - x3.hashCode ^ - y3.hashCode ^ - x4.hashCode ^ - y4.hashCode ^ - boxScore.hashCode ^ - textScore.hashCode ^ - text.hashCode ^ - isVisible.hashCode; - } +@freezed +abstract class Ocr with _$Ocr { + const factory Ocr({ + required String id, + required String assetId, + required double x1, + required double y1, + required double x2, + required double y2, + required double x3, + required double y3, + required double x4, + required double y4, + required double boxScore, + required double textScore, + required String text, + required bool isVisible, + }) = _Ocr; } diff --git a/mobile/lib/domain/models/person.model.dart b/mobile/lib/domain/models/person.model.dart index c7cdcff3af..94ead6a2e9 100644 --- a/mobile/lib/domain/models/person.model.dart +++ b/mobile/lib/domain/models/person.model.dart @@ -1,194 +1,9 @@ -import 'dart:convert'; +import 'package:flutter/foundation.dart'; +import 'package:freezed_annotation/freezed_annotation.dart'; -// TODO: Remove PersonDto once Isar is removed -class PersonDto { - const PersonDto({ - required this.id, - this.birthDate, - required this.isHidden, - required this.name, - required this.thumbnailPath, - this.updatedAt, - }); +part 'person.model.freezed.dart'; - final String id; - final DateTime? birthDate; - final bool isHidden; - final String name; - final String thumbnailPath; - final DateTime? updatedAt; - - @override - String toString() { - return 'Person(id: $id, birthDate: $birthDate, isHidden: $isHidden, name: $name, thumbnailPath: $thumbnailPath, updatedAt: $updatedAt)'; - } - - PersonDto copyWith({ - String? id, - DateTime? birthDate, - bool? isHidden, - String? name, - String? thumbnailPath, - DateTime? updatedAt, - }) { - return PersonDto( - id: id ?? this.id, - birthDate: birthDate ?? this.birthDate, - isHidden: isHidden ?? this.isHidden, - name: name ?? this.name, - thumbnailPath: thumbnailPath ?? this.thumbnailPath, - updatedAt: updatedAt ?? this.updatedAt, - ); - } - - Map toMap() { - return { - 'id': id, - 'birthDate': birthDate?.millisecondsSinceEpoch, - 'isHidden': isHidden, - 'name': name, - 'thumbnailPath': thumbnailPath, - 'updatedAt': updatedAt?.millisecondsSinceEpoch, - }; - } - - factory PersonDto.fromMap(Map map) { - return PersonDto( - id: map['id'] as String, - birthDate: map['birthDate'] != null ? DateTime.fromMillisecondsSinceEpoch(map['birthDate'] as int) : null, - isHidden: map['isHidden'] as bool, - name: map['name'] as String, - thumbnailPath: map['thumbnailPath'] as String, - updatedAt: map['updatedAt'] != null ? DateTime.fromMillisecondsSinceEpoch(map['updatedAt'] as int) : null, - ); - } - - String toJson() => json.encode(toMap()); - - factory PersonDto.fromJson(String source) => PersonDto.fromMap(json.decode(source) as Map); - - @override - bool operator ==(covariant PersonDto other) { - if (identical(this, other)) { - return true; - } - - return other.id == id && - other.birthDate == birthDate && - other.isHidden == isHidden && - other.name == name && - other.thumbnailPath == thumbnailPath && - other.updatedAt == updatedAt; - } - - @override - int get hashCode { - return id.hashCode ^ - birthDate.hashCode ^ - isHidden.hashCode ^ - name.hashCode ^ - thumbnailPath.hashCode ^ - updatedAt.hashCode; - } -} - -// Model for a person stored in the server -class DriftPerson { - 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 DriftPerson({ - required this.id, - required this.createdAt, - required this.updatedAt, - required this.ownerId, - required this.name, - this.faceAssetId, - required this.isFavorite, - required this.isHidden, - required this.color, - this.birthDate, - }); - - DriftPerson copyWith({ - String? id, - DateTime? createdAt, - DateTime? updatedAt, - String? ownerId, - String? name, - String? faceAssetId, - bool? isFavorite, - bool? isHidden, - String? color, - DateTime? birthDate, - }) { - return DriftPerson( - 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 - String toString() { - return '''Person { - id: $id, - createdAt: $createdAt, - updatedAt: $updatedAt, - ownerId: $ownerId, - name: $name, - faceAssetId: ${faceAssetId ?? ""}, - isFavorite: $isFavorite, - isHidden: $isHidden, - color: ${color ?? ""}, - birthDate: ${birthDate ?? ""} -}'''; - } - - @override - bool operator ==(covariant DriftPerson other) { - if (identical(this, other)) { - return true; - } - - return other.id == id && - other.createdAt == createdAt && - other.updatedAt == updatedAt && - other.ownerId == ownerId && - other.name == name && - other.faceAssetId == faceAssetId && - other.isFavorite == isFavorite && - other.isHidden == isHidden && - other.color == color && - other.birthDate == birthDate; - } - - @override - int get hashCode { - return id.hashCode ^ - createdAt.hashCode ^ - updatedAt.hashCode ^ - ownerId.hashCode ^ - name.hashCode ^ - faceAssetId.hashCode ^ - isFavorite.hashCode ^ - isHidden.hashCode ^ - color.hashCode ^ - birthDate.hashCode; - } +@freezed +abstract class Person with _$Person { + const factory Person({required String id, required String name, DateTime? updatedAt, DateTime? birthDate}) = _Person; } diff --git a/mobile/lib/domain/models/search_result.model.dart b/mobile/lib/domain/models/search_result.model.dart index 6a782e2f37..11409e64a2 100644 --- a/mobile/lib/domain/models/search_result.model.dart +++ b/mobile/lib/domain/models/search_result.model.dart @@ -1,25 +1,15 @@ -import 'package:collection/collection.dart'; +import 'package:freezed_annotation/freezed_annotation.dart'; import 'package:immich_mobile/domain/models/asset/base_asset.model.dart'; -class SearchResult { - final List assets; - final int? nextPage; +part 'search_result.model.freezed.dart'; - const SearchResult({required this.assets, this.nextPage}); +@Freezed(toStringOverride: false) +abstract class SearchResult with _$SearchResult { + const SearchResult._(); + const factory SearchResult({required List assets, int? nextPage}) = _SearchResult; + + // Explicitly don't log results, only attributes @override String toString() => 'SearchResult(assets: ${assets.length}, nextPage: $nextPage)'; - - @override - bool operator ==(covariant SearchResult other) { - if (identical(this, other)) { - return true; - } - final listEquals = const DeepCollectionEquality().equals; - - return listEquals(other.assets, assets) && other.nextPage == nextPage; - } - - @override - int get hashCode => assets.hashCode ^ nextPage.hashCode; } diff --git a/mobile/lib/domain/models/server_capability.model.dart b/mobile/lib/domain/models/server_capability.model.dart new file mode 100644 index 0000000000..ece9850594 --- /dev/null +++ b/mobile/lib/domain/models/server_capability.model.dart @@ -0,0 +1,23 @@ +import 'package:immich_mobile/utils/semver.dart'; + +enum ServerCapability { + // Feature Support + cloudIdMetadata(SemVer(major: 2, minor: 4, patch: 0)), + bulkCloudIdMetadata(SemVer(major: 2, minor: 5, patch: 0)), + assetEdits(SemVer(major: 2, minor: 6, patch: 0)), + assetFacesV2(SemVer(major: 2, minor: 6, patch: 0)), + syncV2(SemVer(major: 3, minor: 0, patch: 0)), + assetOcr(SemVer(major: 3, minor: 0, patch: 0)), + + // Migrations + assetPayloadChange20260128(SemVer(major: 2, minor: 5, patch: 0)), + assetPayloadChange20260597(SemVer(major: 2, minor: 7, patch: 6)); + + const ServerCapability(this.minVersion); + + final SemVer minVersion; +} + +extension ServerCapabilitySupport on SemVer { + bool supports(ServerCapability capability) => this >= capability.minVersion; +} diff --git a/mobile/lib/domain/models/settings_key.dart b/mobile/lib/domain/models/settings_key.dart index 2933c301b0..85e58ffcf1 100644 --- a/mobile/lib/domain/models/settings_key.dart +++ b/mobile/lib/domain/models/settings_key.dart @@ -1,16 +1,16 @@ -import 'dart:convert'; - import 'package:flutter/material.dart'; import 'package:immich_mobile/constants/colors.dart'; import 'package:immich_mobile/constants/enums.dart'; import 'package:immich_mobile/domain/models/log.model.dart'; import 'package:immich_mobile/domain/models/timeline.model.dart'; +import 'package:immich_mobile/domain/models/value_codec.dart'; import 'package:immich_mobile/providers/album/album_sort_by_options.provider.dart'; +import 'package:immich_mobile/utils/semver.dart'; enum SettingsKey { // Theme - themePrimaryColor(codec: _EnumCodec(ImmichColorPreset.values)), - themeMode(codec: _EnumCodec(ThemeMode.values)), + themePrimaryColor(codec: EnumCodec(ImmichColorPreset.values)), + themeMode(codec: EnumCodec(ThemeMode.values)), themeDynamic(), themeColorfulInterface(), @@ -26,13 +26,13 @@ enum SettingsKey { // Network networkAutoEndpointSwitching(), + networkExternalEndpointList>(codec: ListCodec(PrimitiveCodec.string)), + networkCustomHeaders>(codec: MapCodec(PrimitiveCodec.string, PrimitiveCodec.string)), networkPreferredWifiName(), networkLocalEndpoint(), - networkExternalEndpointList>(codec: _ListCodec(_PrimitiveCodec.string)), - networkCustomHeaders>(codec: _MapCodec(_PrimitiveCodec.string, _PrimitiveCodec.string)), // Album - albumSortMode(codec: _EnumCodec(AlbumSortMode.values)), + albumSortMode(codec: EnumCodec(AlbumSortMode.values)), albumIsReverse(), albumIsGrid(), @@ -46,182 +46,47 @@ enum SettingsKey { // Timeline timelineTilesPerRow(), - timelineGroupAssetsBy(codec: _EnumCodec(GroupAssetsBy.values)), + timelineGroupAssetsBy(codec: EnumCodec(GroupAssetsBy.values)), timelineStorageIndicator(), // Log - logLevel(codec: _EnumCodec(LogLevel.values)), + logLevel(codec: EnumCodec(LogLevel.values)), // Map mapShowFavoriteOnly(), mapRelativeDate(), + mapCustomFrom(), + mapCustomTo(), mapIncludeArchived(), - mapThemeMode(codec: _EnumCodec(ThemeMode.values)), + mapThemeMode(codec: EnumCodec(ThemeMode.values)), mapWithPartners(), // Cleanup cleanupKeepFavorites(), - cleanupKeepMediaType(codec: _EnumCodec(AssetKeepType.values)), - cleanupKeepAlbumIds>(codec: _ListCodec(_PrimitiveCodec.string)), + cleanupKeepMediaType(codec: EnumCodec(AssetKeepType.values)), + cleanupKeepAlbumIds>(codec: ListCodec(PrimitiveCodec.string)), cleanupCutoffDaysAgo(), cleanupDefaultsInitialized(), // Share - shareFileType(codec: _EnumCodec(ShareAssetType.values)), + shareFileType(codec: EnumCodec(ShareAssetType.values)), // Slideshow slideshowRepeat(), slideshowDuration(), - slideshowLook(codec: _EnumCodec(SlideshowLook.values)), - slideshowDirection(codec: _EnumCodec(SlideshowDirection.values)); + slideshowLook(codec: EnumCodec(SlideshowLook.values)), + slideshowDirection(codec: EnumCodec(SlideshowDirection.values)), - final _SettingsCodec? _codecOverride; + // Feature message + featureMessageSeenRelease(codec: SemVerCodec()); - const SettingsKey({_SettingsCodec? codec}) : _codecOverride = codec; + final ValueCodec? _codecOverride; - _SettingsCodec get _codec => _codecOverride ?? _SettingsCodec.forType(T); + const SettingsKey({ValueCodec? codec}) : _codecOverride = codec; + + ValueCodec get _codec => _codecOverride ?? ValueCodec.forType(T); String encode(T value) => _codec.encode(value); T decode(String raw) => _codec.decode(raw); } - -sealed class _SettingsCodec { - const _SettingsCodec(); - - String encode(T value); - T decode(String raw); - - static final Map> _primitives = { - ..._register(_PrimitiveCodec.integer), - ..._register(_PrimitiveCodec.real), - ..._register(_PrimitiveCodec.boolean), - ..._register(_PrimitiveCodec.string), - ..._register(const _DateTimeCodec()), - }; - - static Map> _register(_SettingsCodec codec) => { - T: codec, - // Reifies the nullable type T so it can be used as a key in the _primitives map - _typeOf(): codec, - }; - - static Type _typeOf() => T; - - static _SettingsCodec forType(Type runtimeType) { - final codec = _primitives[runtimeType]; - if (codec == null) { - throw StateError('No primitive codec for $runtimeType. Provide an explicit codec when defining the SettingsKey.'); - } - return codec as _SettingsCodec; - } -} - -final class _EnumCodec extends _SettingsCodec { - final List values; - - const _EnumCodec(this.values); - - @override - String encode(T value) => value.name; - - @override - T decode(String raw) => values.firstWhere((v) => v.name == raw); -} - -final class _DateTimeCodec extends _SettingsCodec { - const _DateTimeCodec(); - - @override - String encode(DateTime value) => value.toIso8601String(); - - @override - DateTime decode(String raw) => DateTime.parse(raw); -} - -final class _MapCodec extends _SettingsCodec> { - final _SettingsCodec _keyCodec; - final _SettingsCodec _valueCodec; - - const _MapCodec(this._keyCodec, this._valueCodec); - - @override - String encode(Map value) { - final entries = {}; - value.forEach((k, v) => entries[_keyCodec.encode(k)] = _valueCodec.encode(v)); - return jsonEncode(entries); - } - - @override - Map decode(String raw) { - try { - final decoded = jsonDecode(raw); - if (decoded is! Map) { - return {}; - } - final result = {}; - for (final entry in decoded.entries) { - final rawKey = entry.key; - final rawValue = entry.value; - if (rawKey is! String || rawValue is! String) { - return {}; - } - final k = _keyCodec.decode(rawKey); - final v = _valueCodec.decode(rawValue); - result[k] = v; - } - return result; - } on FormatException { - return {}; - } - } -} - -final class _ListCodec extends _SettingsCodec> { - final _SettingsCodec _elementCodec; - - const _ListCodec(this._elementCodec); - - @override - String encode(List value) => jsonEncode(value.map(_elementCodec.encode).toList()); - - @override - List decode(String raw) { - try { - final decoded = jsonDecode(raw); - if (decoded is! List) { - return []; - } - final result = []; - for (final item in decoded) { - if (item is! String) { - return []; - } - final element = _elementCodec.decode(item); - result.add(element); - } - return result; - } on FormatException { - return []; - } - } -} - -final class _PrimitiveCodec extends _SettingsCodec { - final T Function(String) _parse; - - const _PrimitiveCodec._(this._parse); - - @override - String encode(T value) => value.toString(); - - @override - T decode(String raw) => _parse(raw); - - static const integer = _PrimitiveCodec._(int.parse); - static const real = _PrimitiveCodec._(double.parse); - static const boolean = _PrimitiveCodec._(bool.parse); - static const string = _PrimitiveCodec._(_identity); - - static String _identity(String s) => s; -} diff --git a/mobile/lib/domain/models/stack.model.dart b/mobile/lib/domain/models/stack.model.dart index f17f5788c9..4e88a02c6c 100644 --- a/mobile/lib/domain/models/stack.model.dart +++ b/mobile/lib/domain/models/stack.model.dart @@ -1,57 +1,18 @@ +import 'package:flutter/foundation.dart'; +import 'package:freezed_annotation/freezed_annotation.dart'; + +part 'stack.model.freezed.dart'; + // Model for a stack stored in the server -class Stack { - final String id; - final DateTime createdAt; - final DateTime updatedAt; - final String ownerId; - final String primaryAssetId; - - const Stack({ - required this.id, - required this.createdAt, - required this.updatedAt, - required this.ownerId, - required this.primaryAssetId, - }); - - Stack copyWith({String? id, DateTime? createdAt, DateTime? updatedAt, String? ownerId, String? primaryAssetId}) { - return Stack( - id: id ?? this.id, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - ownerId: ownerId ?? this.ownerId, - primaryAssetId: primaryAssetId ?? this.primaryAssetId, - ); - } - - @override - String toString() { - return '''Stack { - id: $id, - createdAt: $createdAt, - updatedAt: $updatedAt, - ownerId: $ownerId, - primaryAssetId: $primaryAssetId -}'''; - } - - @override - bool operator ==(covariant Stack other) { - if (identical(this, other)) { - return true; - } - - return other.id == id && - other.createdAt == createdAt && - other.updatedAt == updatedAt && - other.ownerId == ownerId && - other.primaryAssetId == primaryAssetId; - } - - @override - int get hashCode { - return id.hashCode ^ createdAt.hashCode ^ updatedAt.hashCode ^ ownerId.hashCode ^ primaryAssetId.hashCode; - } +@freezed +abstract class Stack with _$Stack { + const factory Stack({ + required String id, + required DateTime createdAt, + required DateTime updatedAt, + required String ownerId, + required String primaryAssetId, + }) = _Stack; } class StackResponse { diff --git a/mobile/lib/domain/models/tag.model.dart b/mobile/lib/domain/models/tag.model.dart index ba9aef02ee..d38931a285 100644 --- a/mobile/lib/domain/models/tag.model.dart +++ b/mobile/lib/domain/models/tag.model.dart @@ -1,29 +1,11 @@ +import 'package:freezed_annotation/freezed_annotation.dart'; import 'package:openapi/api.dart'; -class Tag { - final String id; - final String value; +part 'tag.model.freezed.dart'; - const Tag({required this.id, required this.value}); - - @override - String toString() { - return 'Tag(id: $id, value: $value)'; - } - - @override - bool operator ==(covariant Tag other) { - if (identical(this, other)) { - return true; - } - - return other.id == id && other.value == value; - } - - @override - int get hashCode { - return id.hashCode ^ value.hashCode; - } +@freezed +abstract class Tag with _$Tag { + const factory Tag({required String id, required String value}) = _Tag; static Tag fromDto(TagResponseDto dto) { return Tag(id: dto.id, value: dto.value); diff --git a/mobile/lib/domain/models/time_range.model.dart b/mobile/lib/domain/models/time_range.model.dart new file mode 100644 index 0000000000..2727a9d5c8 --- /dev/null +++ b/mobile/lib/domain/models/time_range.model.dart @@ -0,0 +1,15 @@ +import 'package:immich_mobile/utils/option.dart'; + +class TimeRange { + final DateTime? from; + final DateTime? to; + + const TimeRange({this.from, this.to}); + + TimeRange copyWith({Option? from, Option? to}) { + return TimeRange(from: from.patch(this.from), to: to.patch(this.to)); + } + + TimeRange clearFrom() => TimeRange(to: to); + TimeRange clearTo() => TimeRange(from: from); +} diff --git a/mobile/lib/domain/models/user.model.dart b/mobile/lib/domain/models/user.model.dart index d1a7fc5546..181fddf581 100644 --- a/mobile/lib/domain/models/user.model.dart +++ b/mobile/lib/domain/models/user.model.dart @@ -1,7 +1,9 @@ -// ignore_for_file: public_member_api_docs, sort_constructors_first -import 'dart:convert'; import 'dart:ui'; +import 'package:freezed_annotation/freezed_annotation.dart'; + +part 'user.model.freezed.dart'; + enum AvatarColor { // do not change this order or reuse indices for other purposes, adding is OK primary("primary"), @@ -164,78 +166,15 @@ profileChangedAt: $profileChangedAt quotaUsageInBytes.hashCode; } -class PartnerUserDto { - final String id; - final String email; - final String name; - final bool inTimeline; - - final String? profileImagePath; - - const PartnerUserDto({ - required this.id, - required this.email, - required this.name, - required this.inTimeline, - this.profileImagePath, - }); - - PartnerUserDto copyWith({String? id, String? email, String? name, bool? inTimeline, String? profileImagePath}) { - return PartnerUserDto( - id: id ?? this.id, - email: email ?? this.email, - name: name ?? this.name, - inTimeline: inTimeline ?? this.inTimeline, - profileImagePath: profileImagePath ?? this.profileImagePath, - ); - } - - Map toMap() { - return { - 'id': id, - 'email': email, - 'name': name, - 'inTimeline': inTimeline, - 'profileImagePath': profileImagePath, - }; - } - - factory PartnerUserDto.fromMap(Map map) { - return PartnerUserDto( - id: map['id'] as String, - email: map['email'] as String, - name: map['name'] as String, - inTimeline: map['inTimeline'] as bool, - profileImagePath: map['profileImagePath'] != null ? map['profileImagePath'] as String : null, - ); - } - - String toJson() => json.encode(toMap()); - - factory PartnerUserDto.fromJson(String source) => PartnerUserDto.fromMap(json.decode(source) as Map); - - @override - String toString() { - return 'PartnerUserDto(id: $id, email: $email, name: $name, inTimeline: $inTimeline, profileImagePath: $profileImagePath)'; - } - - @override - bool operator ==(covariant PartnerUserDto other) { - if (identical(this, other)) { - return true; - } - - return other.id == id && - other.email == email && - other.name == name && - other.inTimeline == inTimeline && - other.profileImagePath == profileImagePath; - } - - @override - int get hashCode { - return id.hashCode ^ email.hashCode ^ name.hashCode ^ inTimeline.hashCode ^ profileImagePath.hashCode; - } +@freezed +abstract class PartnerUserDto with _$PartnerUserDto { + const factory PartnerUserDto({ + required String id, + required String email, + required String name, + required bool inTimeline, + String? profileImagePath, + }) = _PartnerUserDto; } class User { diff --git a/mobile/lib/domain/models/user_metadata.model.dart b/mobile/lib/domain/models/user_metadata.model.dart index b73f798255..2b1da0a809 100644 --- a/mobile/lib/domain/models/user_metadata.model.dart +++ b/mobile/lib/domain/models/user_metadata.model.dart @@ -1,5 +1,9 @@ +import 'package:flutter/foundation.dart'; +import 'package:freezed_annotation/freezed_annotation.dart'; import 'package:immich_mobile/domain/models/user.model.dart'; +part 'user_metadata.model.freezed.dart'; + enum UserMetadataKey { // do not change this order! onboarding, @@ -7,105 +11,32 @@ enum UserMetadataKey { license, } -class Onboarding { - final bool isOnboarded; +@freezed +abstract class Onboarding with _$Onboarding { + const Onboarding._(); - const Onboarding({required this.isOnboarded}); - - Onboarding copyWith({bool? isOnboarded}) { - return Onboarding(isOnboarded: isOnboarded ?? this.isOnboarded); - } - - Map toMap() { - final onboarding = {}; - onboarding["isOnboarded"] = isOnboarded; - return onboarding; - } + const factory Onboarding({required bool isOnboarded}) = _Onboarding; factory Onboarding.fromMap(Map map) { - return Onboarding(isOnboarded: map["isOnboarded"] as bool); + return Onboarding(isOnboarded: map["isOnboarded"]! as bool); } - - @override - String toString() { - return '''Onboarding { -isOnboarded: $isOnboarded, -}'''; - } - - @override - bool operator ==(covariant Onboarding other) { - if (identical(this, other)) { - return true; - } - - return isOnboarded == other.isOnboarded; - } - - @override - int get hashCode => isOnboarded.hashCode; } -class Preferences { - final bool foldersEnabled; - final bool memoriesEnabled; - final bool peopleEnabled; - final bool ratingsEnabled; - final bool sharedLinksEnabled; - final bool tagsEnabled; - final AvatarColor userAvatarColor; - final bool showSupportBadge; - final int minimumFaces; +@freezed +abstract class Preferences with _$Preferences { + const Preferences._(); - const Preferences({ - this.foldersEnabled = false, - this.memoriesEnabled = true, - this.peopleEnabled = true, - this.ratingsEnabled = false, - this.sharedLinksEnabled = true, - this.tagsEnabled = false, - this.userAvatarColor = AvatarColor.primary, - this.showSupportBadge = true, - this.minimumFaces = 3, - }); - - Preferences copyWith({ - bool? foldersEnabled, - bool? memoriesEnabled, - bool? peopleEnabled, - bool? ratingsEnabled, - bool? sharedLinksEnabled, - bool? tagsEnabled, - AvatarColor? userAvatarColor, - bool? showSupportBadge, - int? minimumFaces, - }) { - return Preferences( - foldersEnabled: foldersEnabled ?? this.foldersEnabled, - memoriesEnabled: memoriesEnabled ?? this.memoriesEnabled, - peopleEnabled: peopleEnabled ?? this.peopleEnabled, - ratingsEnabled: ratingsEnabled ?? this.ratingsEnabled, - sharedLinksEnabled: sharedLinksEnabled ?? this.sharedLinksEnabled, - tagsEnabled: tagsEnabled ?? this.tagsEnabled, - userAvatarColor: userAvatarColor ?? this.userAvatarColor, - showSupportBadge: showSupportBadge ?? this.showSupportBadge, - minimumFaces: minimumFaces ?? this.minimumFaces, - ); - } - - Map toMap() { - final preferences = {}; - preferences["folders-Enabled"] = foldersEnabled; - preferences["memories-Enabled"] = memoriesEnabled; - preferences["people-Enabled"] = peopleEnabled; - preferences["ratings-Enabled"] = ratingsEnabled; - preferences["sharedLinks-Enabled"] = sharedLinksEnabled; - preferences["tags-Enabled"] = tagsEnabled; - preferences["avatar-Color"] = userAvatarColor.value; - preferences["purchase-ShowSupportBadge"] = showSupportBadge; - preferences["minimumFaces"] = minimumFaces; - return preferences; - } + const factory Preferences({ + @Default(false) bool foldersEnabled, + @Default(true) bool memoriesEnabled, + @Default(true) bool peopleEnabled, + @Default(false) bool ratingsEnabled, + @Default(true) bool sharedLinksEnabled, + @Default(false) bool tagsEnabled, + @Default(AvatarColor.primary) AvatarColor userAvatarColor, + @Default(true) bool showSupportBadge, + @Default(3) int minimumFaces, + }) = _Preferences; factory Preferences.fromMap(Map map) { return Preferences( @@ -123,162 +54,36 @@ class Preferences { minimumFaces: (map["people"] as Map?)?["minimumFaces"] as int? ?? 3, ); } - - @override - String toString() { - return '''Preferences: { -foldersEnabled: $foldersEnabled, -memoriesEnabled: $memoriesEnabled, -peopleEnabled: $peopleEnabled, -ratingsEnabled: $ratingsEnabled, -sharedLinksEnabled: $sharedLinksEnabled, -tagsEnabled: $tagsEnabled, -userAvatarColor: $userAvatarColor, -showSupportBadge: $showSupportBadge, -minimumFaces: $minimumFaces, -}'''; - } - - @override - bool operator ==(covariant Preferences other) { - if (identical(this, other)) { - return true; - } - - return other.foldersEnabled == foldersEnabled && - other.memoriesEnabled == memoriesEnabled && - other.peopleEnabled == peopleEnabled && - other.ratingsEnabled == ratingsEnabled && - other.sharedLinksEnabled == sharedLinksEnabled && - other.tagsEnabled == tagsEnabled && - other.userAvatarColor == userAvatarColor && - other.showSupportBadge == showSupportBadge && - other.minimumFaces == minimumFaces; - } - - @override - int get hashCode { - return foldersEnabled.hashCode ^ - memoriesEnabled.hashCode ^ - peopleEnabled.hashCode ^ - ratingsEnabled.hashCode ^ - sharedLinksEnabled.hashCode ^ - tagsEnabled.hashCode ^ - userAvatarColor.hashCode ^ - showSupportBadge.hashCode ^ - minimumFaces.hashCode; - } } -class License { - final DateTime activatedAt; - final String activationKey; - final String licenseKey; +@freezed +abstract class License with _$License { + const License._(); - const License({required this.activatedAt, required this.activationKey, required this.licenseKey}); - - License copyWith({DateTime? activatedAt, String? activationKey, String? licenseKey}) { - return License( - activatedAt: activatedAt ?? this.activatedAt, - activationKey: activationKey ?? this.activationKey, - licenseKey: licenseKey ?? this.licenseKey, - ); - } - - Map toMap() { - final license = {}; - license["activatedAt"] = activatedAt; - license["activationKey"] = activationKey; - license["licenseKey"] = licenseKey; - return license; - } + const factory License({required DateTime activatedAt, required String activationKey, required String licenseKey}) = + _License; factory License.fromMap(Map map) { return License( - activatedAt: DateTime.parse(map["activatedAt"] as String), - activationKey: map["activationKey"] as String, - licenseKey: map["licenseKey"] as String, + activatedAt: DateTime.parse(map["activatedAt"]! as String), + activationKey: map["activationKey"]! as String, + licenseKey: map["licenseKey"]! as String, ); } - - @override - String toString() { - return '''License { -activatedAt: $activatedAt, -activationKey: $activationKey, -licenseKey: $licenseKey, -}'''; - } - - @override - bool operator ==(covariant License other) { - if (identical(this, other)) { - return true; - } - - return activatedAt == other.activatedAt && activationKey == other.activationKey && licenseKey == other.licenseKey; - } - - @override - int get hashCode => activatedAt.hashCode ^ activationKey.hashCode ^ licenseKey.hashCode; } // Model for a user metadata stored in the server -class UserMetadata { - final String userId; - final UserMetadataKey key; - final Onboarding? onboarding; - final Preferences? preferences; - final License? license; - - const UserMetadata({required this.userId, required this.key, this.onboarding, this.preferences, this.license}) - : assert( - onboarding != null || preferences != null || license != null, - 'One of onboarding, preferences and license must be provided', - ); - - UserMetadata copyWith({ - String? userId, - UserMetadataKey? key, +@freezed +abstract class UserMetadata with _$UserMetadata { + @Assert( + 'onboarding != null || preferences != null || license != null', + 'One of onboarding, preferences and license must be provided', + ) + const factory UserMetadata({ + required String userId, + required UserMetadataKey key, Onboarding? onboarding, Preferences? preferences, License? license, - }) { - return UserMetadata( - userId: userId ?? this.userId, - key: key ?? this.key, - onboarding: onboarding ?? this.onboarding, - preferences: preferences ?? this.preferences, - license: license ?? this.license, - ); - } - - @override - String toString() { - return '''UserMetadata: { -userId: $userId, -key: $key, -onboarding: ${onboarding ?? ""}, -preferences: ${preferences ?? ""}, -license: ${license ?? ""}, -}'''; - } - - @override - bool operator ==(covariant UserMetadata other) { - if (identical(this, other)) { - return true; - } - - return other.userId == userId && - other.key == key && - other.onboarding == onboarding && - other.preferences == preferences && - other.license == license; - } - - @override - int get hashCode { - return userId.hashCode ^ key.hashCode ^ onboarding.hashCode ^ preferences.hashCode ^ license.hashCode; - } + }) = _UserMetadata; } diff --git a/mobile/lib/domain/models/value_codec.dart b/mobile/lib/domain/models/value_codec.dart new file mode 100644 index 0000000000..814ef1b926 --- /dev/null +++ b/mobile/lib/domain/models/value_codec.dart @@ -0,0 +1,153 @@ +import 'dart:convert'; + +import 'package:immich_mobile/utils/semver.dart'; + +sealed class ValueCodec { + const ValueCodec(); + + String encode(T value); + T decode(String raw); + + static final Map> _primitives = { + ..._register(PrimitiveCodec.integer), + ..._register(PrimitiveCodec.real), + ..._register(PrimitiveCodec.boolean), + ..._register(PrimitiveCodec.string), + ..._register(const DateTimeCodec()), + }; + + static Map> _register(ValueCodec codec) => { + T: codec, + // Reifies the nullable type T so it can be used as a key in the _primitives map + _typeOf(): codec, + }; + + static Type _typeOf() => T; + + static ValueCodec forType(Type runtimeType) { + final codec = _primitives[runtimeType]; + if (codec == null) { + throw StateError('No primitive codec for $runtimeType. Provide an explicit codec when defining the key.'); + } + return codec as ValueCodec; + } +} + +final class EnumCodec extends ValueCodec { + final List values; + + const EnumCodec(this.values); + + @override + String encode(T value) => value.name; + + @override + T decode(String raw) => values.firstWhere((v) => v.name == raw); +} + +final class DateTimeCodec extends ValueCodec { + const DateTimeCodec(); + + @override + String encode(DateTime value) => value.toIso8601String(); + + @override + DateTime decode(String raw) => DateTime.parse(raw); +} + +final class SemVerCodec extends ValueCodec { + const SemVerCodec(); + + @override + String encode(SemVer value) => value.toString(); + + @override + SemVer decode(String raw) => SemVer.fromString(raw); +} + +final class MapCodec extends ValueCodec> { + final ValueCodec _keyCodec; + final ValueCodec _valueCodec; + + const MapCodec(this._keyCodec, this._valueCodec); + + @override + String encode(Map value) { + final entries = {}; + value.forEach((k, v) => entries[_keyCodec.encode(k)] = _valueCodec.encode(v)); + return jsonEncode(entries); + } + + @override + Map decode(String raw) { + try { + final decoded = jsonDecode(raw); + if (decoded is! Map) { + return {}; + } + final result = {}; + for (final entry in decoded.entries) { + final rawKey = entry.key; + final rawValue = entry.value; + if (rawKey is! String || rawValue is! String) { + continue; + } + final k = _keyCodec.decode(rawKey); + final v = _valueCodec.decode(rawValue); + result[k] = v; + } + return result; + } on FormatException { + return {}; + } + } +} + +final class ListCodec extends ValueCodec> { + final ValueCodec _elementCodec; + + const ListCodec(this._elementCodec); + + @override + String encode(List value) => jsonEncode(value.map(_elementCodec.encode).toList()); + + @override + List decode(String raw) { + try { + final decoded = jsonDecode(raw); + if (decoded is! List) { + return []; + } + final result = []; + for (final item in decoded) { + if (item is! String) { + return []; + } + final element = _elementCodec.decode(item); + result.add(element); + } + return result; + } on FormatException { + return []; + } + } +} + +final class PrimitiveCodec extends ValueCodec { + final T Function(String) _parse; + + const PrimitiveCodec._(this._parse); + + @override + String encode(T value) => value.toString(); + + @override + T decode(String raw) => _parse(raw); + + static const integer = PrimitiveCodec._(int.parse); + static const real = PrimitiveCodec._(double.parse); + static const boolean = PrimitiveCodec._(bool.parse); + static const string = PrimitiveCodec._(_identity); + + static String _identity(String s) => s; +} diff --git a/mobile/lib/domain/services/asset.service.dart b/mobile/lib/domain/services/asset.service.dart index ca16d1f980..59f41f1e51 100644 --- a/mobile/lib/domain/services/asset.service.dart +++ b/mobile/lib/domain/services/asset.service.dart @@ -1,16 +1,35 @@ 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/asset_edit.model.dart'; import 'package:immich_mobile/domain/models/exif.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_asset.repository.dart'; import 'package:immich_mobile/infrastructure/repositories/remote_asset.repository.dart'; +import 'package:immich_mobile/infrastructure/repositories/remote_exif.repository.dart'; +import 'package:immich_mobile/infrastructure/repositories/trashed_local_asset.repository.dart'; import 'package:immich_mobile/repositories/asset_api.repository.dart'; +import 'package:immich_mobile/repositories/asset_media.repository.dart'; +import 'package:immich_mobile/utils/option.dart'; +import 'package:maplibre_gl/maplibre_gl.dart'; class AssetService { final RemoteAssetRepository _remoteRepository; + final RemoteExifRepository _exifRepository; final DriftLocalAssetRepository _localRepository; final AssetApiRepository _apiRepository; + final AssetMediaRepository _mediaRepository; + final DriftTrashedLocalAssetRepository _trashedLocalRepository; - const AssetService({required this._remoteRepository, required this._localRepository, required this._apiRepository}); + const AssetService({ + required this._remoteRepository, + required this._exifRepository, + required this._localRepository, + required this._apiRepository, + required this._mediaRepository, + required this._trashedLocalRepository, + }); Future getAsset(BaseAsset asset) { final id = asset is LocalAsset ? asset.id : (asset as RemoteAsset).id; @@ -26,8 +45,8 @@ class AssetService { return _localRepository.getByChecksum(checksum); } - Future getRemoteAssetByChecksum(String checksum) { - return _remoteRepository.getByChecksum(checksum); + Future> getAllRemoteAssetDebugByChecksum(String checksum) { + return _remoteRepository.getAllDebugForChecksum(checksum); } Future getRemoteAsset(String id) { @@ -69,12 +88,113 @@ class AssetService { return _localRepository.getSourceAlbums(localAssetId, backupSelection: backupSelection); } - Future updateFavorite(List remoteIds, bool isFavorite) async { + Future restoreTrash(List remoteIds) async { if (remoteIds.isEmpty) { return; } - await _apiRepository.updateFavorite(remoteIds, isFavorite); - await _remoteRepository.updateFavorite(remoteIds, isFavorite); + await _apiRepository.restoreTrash(remoteIds); + await _remoteRepository.restoreTrash(remoteIds); + } + + Future stack(String userId, List remoteIds) async { + if (remoteIds.isEmpty) { + return; + } + + final stack = await _apiRepository.stack(remoteIds); + await _remoteRepository.stack(userId, stack); + } + + Future unstack(List stackIds) async { + if (stackIds.isEmpty) { + return; + } + + await _remoteRepository.unStack(stackIds); + await _apiRepository.unStack(stackIds); + } + + Future update( + List remoteIds, { + Option isFavorite = const .none(), + Option visibility = const .none(), + Option location = const .none(), + Option dateTime = const .none(), + }) async { + if (remoteIds.isEmpty) { + return; + } + + final parsedDateTime = dateTime.map((dt) => DateTime.parse(dt)); + final offset = RegExp(r'[+-]\d{2}:\d{2}$').firstMatch(dateTime.unwrapOrNull ?? '')?.group(0); + + await _apiRepository.update( + remoteIds, + isFavorite: isFavorite, + visibility: visibility, + location: location, + dateTimeOriginal: dateTime, + ); + await _remoteRepository.update( + remoteIds, + isFavorite: isFavorite, + visibility: visibility, + createdAt: parsedDateTime, + ); + await _exifRepository.update( + remoteIds, + location: location, + dateTimeOriginal: parsedDateTime, + timeZone: .fromNullable(offset).map((o) => 'UTC$o'), + ); + } + + Future trash(List remoteIds) async { + if (remoteIds.isEmpty) { + return; + } + + await _apiRepository.delete(remoteIds, false); + await _remoteRepository.trash(remoteIds); + } + + Future delete(List remoteIds) async { + if (remoteIds.isEmpty) { + return; + } + + await _apiRepository.delete(remoteIds, true); + await _remoteRepository.delete(remoteIds); + } + + Future applyEdits(String remoteId, List edits) async { + if (edits.isEmpty) { + await _apiRepository.removeEdits(remoteId); + } else { + await _apiRepository.editAsset(remoteId, edits); + } + } + + Future deleteLocal(List localIds) async { + if (localIds.isEmpty) { + return 0; + } + + final deletedIds = await _mediaRepository.deleteAll(localIds); + if (deletedIds.isEmpty) { + return 0; + } + + if (CurrentPlatform.isAndroid && Store.get(StoreKey.manageLocalMediaAndroid, false)) { + await _trashedLocalRepository.applyTrashedAssets(deletedIds); + } else { + await _localRepository.delete(deletedIds); + } + return deletedIds.length; + } + + Future getLocalAsset(String id) { + return _localRepository.get(id); } } diff --git a/mobile/lib/domain/services/background_worker.service.dart b/mobile/lib/domain/services/background_worker.service.dart index d490b226c7..8161df5c51 100644 --- a/mobile/lib/domain/services/background_worker.service.dart +++ b/mobile/lib/domain/services/background_worker.service.dart @@ -6,7 +6,10 @@ import 'package:background_downloader/background_downloader.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/services/hash.service.dart'; +import 'package:immich_mobile/domain/services/local_sync.service.dart'; import 'package:immich_mobile/domain/services/log.service.dart'; +import 'package:immich_mobile/domain/services/sync_stream.service.dart'; import 'package:immich_mobile/entities/store.entity.dart'; import 'package:immich_mobile/extensions/platform_extensions.dart'; import 'package:immich_mobile/infrastructure/repositories/db.repository.dart'; @@ -14,11 +17,16 @@ import 'package:immich_mobile/infrastructure/repositories/logger_db.repository.d import 'package:immich_mobile/infrastructure/repositories/settings.repository.dart'; import 'package:immich_mobile/platform/background_worker_api.g.dart'; import 'package:immich_mobile/platform/background_worker_lock_api.g.dart'; -import 'package:immich_mobile/providers/background_sync.provider.dart'; +import 'package:immich_mobile/providers/api.provider.dart'; import 'package:immich_mobile/providers/backup/drift_backup.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/platform.provider.dart' show nativeSyncApiProvider; +import 'package:immich_mobile/providers/infrastructure/platform.provider.dart'; +import 'package:immich_mobile/providers/infrastructure/sync.provider.dart'; import 'package:immich_mobile/providers/user.provider.dart'; +import 'package:immich_mobile/repositories/asset_media.repository.dart'; +import 'package:immich_mobile/repositories/permission.repository.dart'; import 'package:immich_mobile/services/auth.service.dart'; import 'package:immich_mobile/services/foreground_upload.service.dart'; import 'package:immich_mobile/services/localization.service.dart'; @@ -58,12 +66,43 @@ class BackgroundWorkerBgService extends BackgroundWorkerFlutterApi { final BackgroundWorkerBgHostApi _backgroundHostApi; final _cancellationToken = Completer(); final Logger _logger = Logger('BackgroundWorkerBgService'); + late LocalSyncService _localSyncService; + late SyncStreamService _remoteSyncService; + late HashService _hashService; bool _isCleanedUp = false; BackgroundWorkerBgService({required this._drift, required this._driftLogger}) : _backgroundHostApi = BackgroundWorkerBgHostApi() { - _ref = ProviderContainer(overrides: [driftProvider.overrideWith(driftOverride(_drift))]); + final ref = ProviderContainer(overrides: [driftProvider.overrideWith(driftOverride(_drift))]); + _ref = ref; + _localSyncService = LocalSyncService( + localAlbumRepository: ref.read(localAlbumRepository), + localAssetRepository: ref.read(localAssetRepository), + nativeSyncApi: ref.read(nativeSyncApiProvider), + trashedLocalAssetRepository: ref.read(trashedLocalAssetRepository), + assetMediaRepository: ref.read(assetMediaRepositoryProvider), + permissionRepository: ref.read(permissionRepositoryProvider), + cancellation: _cancellationToken, + ); + _remoteSyncService = SyncStreamService( + syncApiRepository: ref.read(syncApiRepositoryProvider), + syncStreamRepository: ref.read(syncStreamRepositoryProvider), + localAssetRepository: ref.read(localAssetRepository), + trashedLocalAssetRepository: ref.read(trashedLocalAssetRepository), + assetMediaRepository: ref.read(assetMediaRepositoryProvider), + permissionRepository: ref.read(permissionRepositoryProvider), + syncMigrationRepository: ref.read(syncMigrationRepositoryProvider), + api: ref.read(apiServiceProvider), + cancellation: _cancellationToken, + ); + _hashService = HashService( + localAlbumRepository: ref.read(localAlbumRepository), + localAssetRepository: ref.read(localAssetRepository), + nativeSyncApi: ref.read(nativeSyncApiProvider), + trashedLocalAssetRepository: ref.read(trashedLocalAssetRepository), + cancellation: _cancellationToken, + ); BackgroundWorkerFlutterApi.setUp(this); } @@ -119,11 +158,6 @@ class BackgroundWorkerBgService extends BackgroundWorkerFlutterApi { try { final budget = maxSeconds != null ? Duration(seconds: maxSeconds - 1) : null; - final sync = _ref?.read(backgroundSyncProvider); - if (sync == null) { - return; - } - // Only for Background Processing tasks if (maxSeconds == null) { await _optimizeDB(); @@ -135,9 +169,23 @@ class BackgroundWorkerBgService extends BackgroundWorkerFlutterApi { // hash and handle_backup read drift state and tolerate stale reads // (server-side dedup catches the rare race). The single budget caps the // whole batch; no phase needs its own timeout. - final all = Future.wait([sync.syncLocal(), sync.syncRemote(), sync.hashAssets(), _handleBackup()]); + final all = Future.wait([ + _localSyncService.sync(), + _remoteSyncService.sync(), + _hashService.hashAssets(), + _handleBackup(), + ]); if (budget != null) { - await all.timeout(budget, onTimeout: () => []); + await all.timeout( + budget, + onTimeout: () { + if (!_cancellationToken.isCompleted) { + _logger.warning("iOS background upload timed out after ${budget.inSeconds}s, cancelling tasks"); + _cancellationToken.complete(); + } + return []; + }, + ); } else { await all; } @@ -221,7 +269,6 @@ class BackgroundWorkerBgService extends BackgroundWorkerFlutterApi { try { _isCleanedUp = true; - final backgroundSyncManager = _ref?.read(backgroundSyncProvider); final nativeSyncApi = _ref?.read(nativeSyncApiProvider); _logger.info("Cleaning up background worker"); @@ -230,10 +277,7 @@ class BackgroundWorkerBgService extends BackgroundWorkerFlutterApi { } // Workers share one sqlite connection, so DB teardown must wait until every worker has stopped using it. - await Future.wait([ - if (backgroundSyncManager != null) backgroundSyncManager.cancel(), - if (nativeSyncApi != null) nativeSyncApi.cancelHashing(), - ]); + await Future.wait([if (nativeSyncApi != null) nativeSyncApi.cancelHashing()]); await workerManagerPatch.dispose().catchError((_) async {}); await Future.wait([LogService.I.dispose(), Store.dispose()]); await _drift.close(); @@ -279,18 +323,18 @@ class BackgroundWorkerBgService extends BackgroundWorkerFlutterApi { } Future _syncAssets({Duration? hashTimeout}) async { - await _ref?.read(backgroundSyncProvider).syncLocal(); + await _localSyncService.sync(); if (_isCleanedUp) { return false; } - final isSuccess = await _ref?.read(backgroundSyncProvider).syncRemote() ?? false; + final isSuccess = await _remoteSyncService.sync(); if (_isCleanedUp) { return isSuccess; } - var hashFuture = _ref?.read(backgroundSyncProvider).hashAssets(); - if (hashTimeout != null && hashFuture != null) { + var hashFuture = _hashService.hashAssets(); + if (hashTimeout != null) { hashFuture = hashFuture.timeout( hashTimeout, onTimeout: () { diff --git a/mobile/lib/domain/services/device_permission.service.dart b/mobile/lib/domain/services/device_permission.service.dart new file mode 100644 index 0000000000..d6ce128b8a --- /dev/null +++ b/mobile/lib/domain/services/device_permission.service.dart @@ -0,0 +1,47 @@ +import 'package:immich_mobile/constants/enums.dart'; +import 'package:immich_mobile/extensions/platform_extensions.dart'; +import 'package:immich_mobile/repositories/permission.repository.dart'; + +typedef _Handler = Future Function(DevicePermission); + +class DevicePermissionService { + const DevicePermissionService(this._permissionRepository); + + final DevicePermissionRepository _permissionRepository; + + Future galleryStatus() => _gallery(_permissionRepository.getStatus); + + Future requestGallery() => _gallery(_permissionRepository.request); + + Future _gallery(_Handler handler) async { + if (CurrentPlatform.isIOS) { + return handler(.photos); + } + + final sdkVersion = await _permissionRepository.getAndroidSdkVersion(); + const maxExternalStorageSdk = 32; // READ/WRITE_EXTERNAL_STORAGE - Android 12.1 + final status = sdkVersion <= maxExternalStorageSdk ? await handler(.storage) : await _photosAndVideos(handler); + + const minMediaLocationSdk = 29; // ACCESS_MEDIA_LOCATION - Android 10 + if (status.hasAccess && sdkVersion >= minMediaLocationSdk) { + final mediaLocation = await handler(.mediaLocation); + return mediaLocation.hasAccess ? status : mediaLocation; + } + + return status; + } + + Future _photosAndVideos(_Handler handler) async { + final photos = await handler(.photos); + if (!photos.hasAccess) { + return photos; + } + + final videos = await handler(.videos); + if (!videos.hasAccess) { + return videos; + } + + return photos == .granted && videos == .granted ? .granted : .limited; + } +} diff --git a/mobile/lib/domain/services/feature_message.service.dart b/mobile/lib/domain/services/feature_message.service.dart new file mode 100644 index 0000000000..5eb58f0823 --- /dev/null +++ b/mobile/lib/domain/services/feature_message.service.dart @@ -0,0 +1,16 @@ +import 'package:immich_mobile/domain/models/feature_message.model.dart'; +import 'package:immich_mobile/domain/models/settings_key.dart'; +import 'package:immich_mobile/infrastructure/repositories/settings.repository.dart'; + +class FeatureMessageService { + final SettingsRepository _settingsRepository; + + const FeatureMessageService(this._settingsRepository); + + bool shouldShow() { + final seen = _settingsRepository.appConfig.featureMessage.seenRelease; + return visibleFeatureMessageHighlights.isNotEmpty && featureMessageRelease > seen; + } + + Future markSeen() => _settingsRepository.write(SettingsKey.featureMessageSeenRelease, featureMessageRelease); +} diff --git a/mobile/lib/domain/services/hash.service.dart b/mobile/lib/domain/services/hash.service.dart index e4c332b283..8a573ee209 100644 --- a/mobile/lib/domain/services/hash.service.dart +++ b/mobile/lib/domain/services/hash.service.dart @@ -32,7 +32,7 @@ class HashService { }) : _batchSize = batchSize ?? kBatchHashFileLimit { // Stop the in-flight native hash call promptly on cancellation; the loops // below also observe [isCancelled] to bail between batches. - _cancellation?.future.then((_) => _nativeSyncApi.cancelHashing().onError(_log.warning)); + unawaited(_cancellation?.future.then((_) => _nativeSyncApi.cancelHashing().onError(_log.warning))); } bool get isCancelled => _cancellation?.isCompleted ?? false; @@ -66,11 +66,12 @@ class HashService { await _hashAssets(pseudoAlbum, trashedToHash, isTrashed: true); } } - } on PlatformException catch (e) { + } on PlatformException catch (e, s) { if (e.code == _kHashCancelledCode) { _log.warning("Hashing cancelled by platform"); return; } + _log.severe("Native hashing failed: ${e.code}", e, s); } catch (e, s) { _log.severe("Error during hashing", e, s); } diff --git a/mobile/lib/domain/services/local_sync.service.dart b/mobile/lib/domain/services/local_sync.service.dart index feb104f90d..9e272ac65f 100644 --- a/mobile/lib/domain/services/local_sync.service.dart +++ b/mobile/lib/domain/services/local_sync.service.dart @@ -27,7 +27,7 @@ class LocalSyncService { final NativeSyncApi _nativeSyncApi; final DriftTrashedLocalAssetRepository _trashedLocalAssetRepository; final AssetMediaRepository _assetMediaRepository; - final IPermissionRepository _permissionRepository; + final DevicePermissionRepository _permissionRepository; final Completer? _cancellation; final Logger _log = Logger("DeviceSyncService"); @@ -40,7 +40,7 @@ class LocalSyncService { required this._permissionRepository, this._cancellation, }) { - _cancellation?.future.then((_) => _nativeSyncApi.cancelSync().onError(_log.warning)); + unawaited(_cancellation?.future.then((_) => _nativeSyncApi.cancelSync().onError(_log.warning))); } bool get _isCancelled => _cancellation?.isCompleted ?? false; diff --git a/mobile/lib/domain/services/people.service.dart b/mobile/lib/domain/services/people.service.dart index 73972dbdc0..196cf1edbb 100644 --- a/mobile/lib/domain/services/people.service.dart +++ b/mobile/lib/domain/services/people.service.dart @@ -10,16 +10,16 @@ class DriftPeopleService { const DriftPeopleService(this._repository, this._personApiRepository); - Future get(String personId) { + Future get(String personId) { return _repository.get(personId); } - Future> getAssetPeople(String assetId) { + Future> getAssetPeople(String assetId) { return _repository.getAssetPeople(assetId); } - Future> getAllPeople({int minFaces = 3}) { - return _repository.getAllPeople(minFaces: minFaces); + Stream> watch({int minFaces = 3}) { + return _repository.watch(minFaces: minFaces); } Future updateName(String personId, String name) async { @@ -27,7 +27,7 @@ class DriftPeopleService { return _repository.updateName(personId, name); } - Future updateBrithday(String personId, DateTime birthday) async { + Future updateBirthday(String personId, DateTime birthday) async { await _personApiRepository.update(personId, birthday: birthday); return _repository.updateBirthday(personId, birthday); } diff --git a/mobile/lib/domain/services/remote_album.service.dart b/mobile/lib/domain/services/remote_album.service.dart index 35a8f899a8..e59d75b01a 100644 --- a/mobile/lib/domain/services/remote_album.service.dart +++ b/mobile/lib/domain/services/remote_album.service.dart @@ -105,10 +105,8 @@ class RemoteAlbumService { switch (filterMode) { case QuickFilterMode.myAlbums: filtered = filtered.where((album) => album.ownerId == userId).toList(); - break; case QuickFilterMode.sharedWithMe: filtered = filtered.where((album) => album.ownerId != userId).toList(); - break; case QuickFilterMode.all: break; } @@ -159,8 +157,8 @@ class RemoteAlbumService { return updatedAlbum; } - FutureOr<(DateTime, DateTime)> getDateRange(String albumId) { - return _repository.getDateRange(albumId); + Stream<(DateTime, DateTime)> watchDateRange(String albumId) { + return _repository.watchDateRange(albumId); } Future> getSharedUsers(String albumId) { @@ -175,12 +173,12 @@ class RemoteAlbumService { return _repository.getAssets(albumId); } - Future addAssets({required String albumId, required List assetIds}) async { + Future<({int added, int failed})> addAssets({required String albumId, required List assetIds}) async { final album = await _albumApiRepository.addAssets(albumId, assetIds); await _repository.addAssets(albumId, album.added); - return album.added.length; + return (added: album.added.length, failed: album.failed.length); } /// !TODO The name here is not clear as we have addAssets method above, @@ -196,7 +194,7 @@ class RemoteAlbumService { }) async { int addedCount = 0; if (candidates.remoteAssetIds.isNotEmpty) { - addedCount += await addAssets(albumId: albumId, assetIds: candidates.remoteAssetIds); + addedCount += (await addAssets(albumId: albumId, assetIds: candidates.remoteAssetIds)).added; } if (candidates.localAssetsToUpload.isNotEmpty) { addedCount += await _uploadAndAddLocals( @@ -341,4 +339,10 @@ class RemoteAlbumService { return sortedAlbums; } + + Future removeAssets({required String albumId, required List assetIds}) async { + final result = await _albumApiRepository.removeAssets(albumId, assetIds); + await _repository.removeAssets(albumId, result.removed); + return result.removed.length; + } } diff --git a/mobile/lib/domain/services/sync_stream.service.dart b/mobile/lib/domain/services/sync_stream.service.dart index 5a197dc88a..71228ba2ba 100644 --- a/mobile/lib/domain/services/sync_stream.service.dart +++ b/mobile/lib/domain/services/sync_stream.service.dart @@ -4,6 +4,7 @@ import 'dart:async'; import 'dart:convert'; import 'package:immich_mobile/domain/models/asset/base_asset.model.dart'; +import 'package:immich_mobile/domain/models/server_capability.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/entities/store.entity.dart'; @@ -25,6 +26,7 @@ enum SyncMigrationTask { v20260128_CopyExifWidthHeightToAsset, // Asset table has incorrect width and height for video ratio calculations. v20260128_ResetAssetV1, // Asset v2.5.0 has width and height information that were edited assets. v20260597_ResetAssetV1AssetV2, // Assets didn't include the uploadedAt column. + v20260701_ResetAlbumsV1, // Album user migration dropped the owner. Sync fresh albums from the server to re-populate them. } class SyncStreamService { @@ -35,7 +37,7 @@ class SyncStreamService { final DriftLocalAssetRepository _localAssetRepository; final DriftTrashedLocalAssetRepository _trashedLocalAssetRepository; final AssetMediaRepository _assetMediaRepository; - final IPermissionRepository _permissionRepository; + final DevicePermissionRepository _permissionRepository; final SyncMigrationRepository _syncMigrationRepository; final ApiService _api; final Completer? _cancellation; @@ -103,6 +105,12 @@ class SyncStreamService { } Future _runPreSyncTasks(List migrations, SemVer semVer) async { + if (!migrations.contains(SyncMigrationTask.v20260701_ResetAlbumsV1.name)) { + _logger.info("Running pre-sync task: v20260701_ResetAlbumsV1"); + await _syncApiRepository.deleteSyncAck([SyncEntityType.albumV1]); + migrations.add(SyncMigrationTask.v20260701_ResetAlbumsV1.name); + } + if (!migrations.contains(SyncMigrationTask.v20260128_ResetExifV1.name)) { _logger.info("Running pre-sync task: v20260128_ResetExifV1"); await _syncApiRepository.deleteSyncAck([ @@ -115,7 +123,7 @@ class SyncStreamService { } if (!migrations.contains(SyncMigrationTask.v20260128_ResetAssetV1.name) && - semVer >= const SemVer(major: 2, minor: 5, patch: 0)) { + semVer.supports(.assetPayloadChange20260128)) { _logger.info("Running pre-sync task: v20260128_ResetAssetV1"); await _syncApiRepository.deleteSyncAck([ SyncEntityType.assetV1, @@ -132,7 +140,7 @@ class SyncStreamService { } if (!migrations.contains(SyncMigrationTask.v20260597_ResetAssetV1AssetV2.name) && - semVer > const SemVer(major: 2, minor: 7, patch: 5)) { + semVer.supports(.assetPayloadChange20260597)) { _logger.info("Running pre-sync task: v20260597_ResetAssetV1AssetV2"); await _syncApiRepository.deleteSyncAck([SyncEntityType.assetV1, SyncEntityType.assetV2]); migrations.add(SyncMigrationTask.v20260597_ResetAssetV1AssetV2.name); @@ -148,7 +156,7 @@ class SyncStreamService { } Future _handleEvents(List events, Function() abort, Function() reset) async { - List items = []; + final List items = []; for (final event in events) { if (isCancelled) { _logger.warning("Sync stream cancelled"); @@ -321,8 +329,6 @@ class SyncStreamService { return _syncStreamRepository.updateAssetOcrV1(data.cast()); case SyncEntityType.assetOcrDeleteV1: return _syncStreamRepository.deleteAssetOcrV1(data.cast()); - default: - _logger.warning("Unknown sync data type: $type"); } } diff --git a/mobile/lib/domain/services/timeline.service.dart b/mobile/lib/domain/services/timeline.service.dart index 4cc58b0fe7..b20ba306ff 100644 --- a/mobile/lib/domain/services/timeline.service.dart +++ b/mobile/lib/domain/services/timeline.service.dart @@ -106,32 +106,34 @@ class TimelineService { TimelineService._({required this._assetSource, required this._bucketSource, required this.origin}) { _bucketSubscription = _bucketSource().listen((buckets) { - _mutex.run(() async { - final totalAssets = buckets.fold(0, (acc, bucket) => acc + bucket.assetCount); + unawaited( + _mutex.run(() async { + final totalAssets = buckets.fold(0, (acc, bucket) => acc + bucket.assetCount); - if (totalAssets == 0) { - _bufferOffset = 0; - _buffer = []; - } else { - final int offset; - final int count; - // When the buffer is empty or the old bufferOffset is greater than the new total assets, - // we need to reset the buffer and load the first batch of assets. - if (_bufferOffset >= totalAssets || _buffer.isEmpty) { - offset = 0; - count = kTimelineAssetLoadBatchSize; + if (totalAssets == 0) { + _bufferOffset = 0; + _buffer = []; } else { - offset = _bufferOffset; - count = math.min(_buffer.length, totalAssets - _bufferOffset); + final int offset; + final int count; + // When the buffer is empty or the old bufferOffset is greater than the new total assets, + // we need to reset the buffer and load the first batch of assets. + if (_bufferOffset >= totalAssets || _buffer.isEmpty) { + offset = 0; + count = kTimelineAssetLoadBatchSize; + } else { + offset = _bufferOffset; + count = math.min(_buffer.length, totalAssets - _bufferOffset); + } + _buffer = await _assetSource(offset, count); + _bufferOffset = offset; } - _buffer = await _assetSource(offset, count); - _bufferOffset = offset; - } - // change the state's total assets count only after the buffer is reloaded - _totalAssets = totalAssets; - EventStream.shared.emit(const TimelineReloadEvent()); - }); + // change the state's total assets count only after the buffer is reloaded + _totalAssets = totalAssets; + EventStream.shared.emit(const TimelineReloadEvent()); + }), + ); }); } @@ -178,7 +180,7 @@ class TimelineService { if (!hasRange(index, count)) { throw RangeError('TimelineService::getAssets Index out of range'); } - int start = index - _bufferOffset; + final int start = index - _bufferOffset; return _buffer.slice(start, start + count); } diff --git a/mobile/lib/domain/utils/background_sync.dart b/mobile/lib/domain/utils/background_sync.dart index 82f397d9b6..f1e0328165 100644 --- a/mobile/lib/domain/utils/background_sync.dart +++ b/mobile/lib/domain/utils/background_sync.dart @@ -28,6 +28,7 @@ class BackgroundSyncManager { final SyncErrorCallback? onCloudIdSyncError; Cancelable? _syncTask; + bool _syncQueued = false; Cancelable? _syncWebsocketTask; Cancelable? _cloudIdSyncTask; Cancelable? _deviceAlbumSyncTask; @@ -49,15 +50,39 @@ class BackgroundSyncManager { this.onCloudIdSyncError, }); + // The tasks the app-resume path re-runs. One in-flight when the app was suspended + // stays referenced but frozen, so on resume the dedupe guards would hand back the + // stale task instead of syncing (#28082). Websocket and cloud-id are excluded - the + // resume path never restarts them. [_allTasks] builds on this so the lists can't drift. + List get _resumeSyncTasks => [_syncTask, _deviceAlbumSyncTask, _hashTask, _linkedAlbumSyncTask]; + + List get _allTasks => [_syncWebsocketTask, _cloudIdSyncTask, ..._resumeSyncTasks]; + Future cancel() async { - final tasks = [ - _syncTask, - _syncWebsocketTask, - _cloudIdSyncTask, - _linkedAlbumSyncTask, - _deviceAlbumSyncTask, - _hashTask, - ]; + _syncQueued = false; + final tasks = _allTasks; + _syncTask = null; + _syncWebsocketTask = null; + _cloudIdSyncTask = null; + _linkedAlbumSyncTask = null; + _deviceAlbumSyncTask = null; + _hashTask = null; + await _cancelAll(tasks); + } + + Future cancelResumeSyncs() async { + _syncQueued = false; + final tasks = _resumeSyncTasks; + _syncTask = null; + _deviceAlbumSyncTask = null; + _hashTask = null; + _linkedAlbumSyncTask = null; + await _cancelAll(tasks); + } + + // Cancels every task in [tasks] and waits for them to unwind. Callers null out + // their own fields first, so the sync guards see a clean slate immediately. + Future _cancelAll(List tasks) async { final futures = [ for (final task in tasks) if (task != null) task.future, @@ -65,13 +90,6 @@ class BackgroundSyncManager { for (final task in tasks) { task?.cancel(); } - _syncTask = null; - _syncWebsocketTask = null; - _cloudIdSyncTask = null; - _linkedAlbumSyncTask = null; - _deviceAlbumSyncTask = null; - _hashTask = null; - try { await Future.wait(futures); } on CanceledError { @@ -82,14 +100,14 @@ class BackgroundSyncManager { // No need to cancel the task, as it can also be run when the user logs out Future syncLocal({bool full = false}) { if (_deviceAlbumSyncTask != null) { - return _deviceAlbumSyncTask!.future; + return _deviceAlbumSyncTask!.future.catchError((_) {}, test: (error) => error is CanceledError); } onLocalSyncStart?.call(); // We use a ternary operator to avoid [_deviceAlbumSyncTask] from being // captured by the closure passed to [runInIsolateGentle]. - _deviceAlbumSyncTask = full + final task = _deviceAlbumSyncTask = full ? runInIsolateGentle( computation: (ref) => ref.read(localSyncServiceProvider).sync(full: true), debugLabel: 'local-sync-full-true', @@ -99,64 +117,82 @@ class BackgroundSyncManager { debugLabel: 'local-sync-full-false', ); - return _deviceAlbumSyncTask! + return task .whenComplete(() { - _deviceAlbumSyncTask = null; + if (identical(_deviceAlbumSyncTask, task)) { + _deviceAlbumSyncTask = null; + } onLocalSyncComplete?.call(); }) .catchError((error) { - onLocalSyncError?.call(error.toString()); - _deviceAlbumSyncTask = null; + if (error is! CanceledError) { + onLocalSyncError?.call(error.toString()); + } }); } Future hashAssets() { if (_hashTask != null) { - return _hashTask!.future; + return _hashTask!.future.catchError((_) {}, test: (error) => error is CanceledError); } onHashingStart?.call(); - _hashTask = runInIsolateGentle( + final task = _hashTask = runInIsolateGentle( computation: (ref) => ref.read(hashServiceProvider).hashAssets(), debugLabel: 'hash-assets', ); - return _hashTask! + return task .whenComplete(() { onHashingComplete?.call(); - _hashTask = null; + if (identical(_hashTask, task)) { + _hashTask = null; + } }) .catchError((error) { - onHashingError?.call(error.toString()); - _hashTask = null; + if (error is! CanceledError) { + onHashingError?.call(error.toString()); + } }); } - Future syncRemote() { + Future syncRemote({bool enqueue = false}) { if (_syncTask != null) { + _syncQueued |= enqueue; return _syncTask!.future.then((result) => result ?? false).catchError((_) => false); } onRemoteSyncStart?.call(); - _syncTask = runInIsolateGentle( + final task = _syncTask = runInIsolateGentle( computation: (ref) => ref.read(syncStreamServiceProvider).sync(), debugLabel: 'remote-sync', ); - return _syncTask! + return task .then((result) { final success = result ?? false; onRemoteSyncComplete?.call(success); + _syncQueued &= success; return success; }) .catchError((error) { - onRemoteSyncError?.call(error.toString()); - _syncTask = null; + if (error is! CanceledError) { + onRemoteSyncError?.call(error.toString()); + } + _syncQueued = false; return false; }) + // A task clears only its own slot: one that was cancelled and superseded by a + // fresh task (see cancelResumeSyncs) must not null the new task's slot. .whenComplete(() { - _syncTask = null; + if (identical(_syncTask, task)) { + _syncTask = null; + if (_syncQueued) { + _syncQueued = false; + unawaited(syncRemote()); + } + } }); } @@ -202,13 +238,21 @@ class BackgroundSyncManager { Future syncLinkedAlbum() { if (_linkedAlbumSyncTask != null) { - return _linkedAlbumSyncTask!.future; + return _linkedAlbumSyncTask!.future.catchError((_) {}, test: (error) => error is CanceledError); } - _linkedAlbumSyncTask = runInIsolateGentle(computation: syncLinkedAlbumsIsolated, debugLabel: 'linked-album-sync'); - return _linkedAlbumSyncTask!.whenComplete(() { - _linkedAlbumSyncTask = null; - }); + final task = _linkedAlbumSyncTask = runInIsolateGentle( + computation: syncLinkedAlbumsIsolated, + debugLabel: 'linked-album-sync', + ); + return task + .whenComplete(() { + if (identical(_linkedAlbumSyncTask, task)) { + _linkedAlbumSyncTask = null; + } + }) + // a cancelled resume sync is not a failure; absorb it so the websocket callers don't get an uncaught error + .catchError((_) {}, test: (error) => error is CanceledError); } Future syncCloudIds() { diff --git a/mobile/lib/domain/utils/event_stream.dart b/mobile/lib/domain/utils/event_stream.dart index 5967fdca50..0069c75f86 100644 --- a/mobile/lib/domain/utils/event_stream.dart +++ b/mobile/lib/domain/utils/event_stream.dart @@ -32,7 +32,7 @@ class EventStream { } /// Closes the stream controller - void dispose() { - _controller.close(); + Future dispose() { + return _controller.close(); } } diff --git a/mobile/lib/domain/utils/migrate_cloud_ids.dart b/mobile/lib/domain/utils/migrate_cloud_ids.dart index efef6e8327..e1d5fe451e 100644 --- a/mobile/lib/domain/utils/migrate_cloud_ids.dart +++ b/mobile/lib/domain/utils/migrate_cloud_ids.dart @@ -5,6 +5,7 @@ import 'package:hooks_riverpod/hooks_riverpod.dart'; import 'package:immich_mobile/constants/constants.dart'; import 'package:immich_mobile/domain/models/asset/asset_metadata.model.dart'; import 'package:immich_mobile/domain/models/asset/base_asset.model.dart'; +import 'package:immich_mobile/domain/models/server_capability.model.dart'; import 'package:immich_mobile/extensions/platform_extensions.dart'; import 'package:immich_mobile/infrastructure/entities/local_asset.entity.dart'; import 'package:immich_mobile/infrastructure/repositories/db.repository.dart'; @@ -31,12 +32,12 @@ Future syncCloudIds(ProviderContainer ref) async { await _populateCloudIds(db); final serverInfo = await ref.read(serverInfoProvider.notifier).getServerInfo(); - final canUpdateMetadata = serverInfo.serverVersion.isAtLeast(major: 2, minor: 4); + final canUpdateMetadata = serverInfo.serverVersion.supports(.cloudIdMetadata); if (!canUpdateMetadata) { logger.fine('Server version does not support asset metadata updates. Skipping cloudId migration.'); return; } - final canBulkUpdateMetadata = serverInfo.serverVersion.isAtLeast(major: 2, minor: 5); + final canBulkUpdateMetadata = serverInfo.serverVersion.supports(.bulkCloudIdMetadata); // Wait for remote sync to complete, so we have up-to-date asset metadata entries try { diff --git a/mobile/lib/extensions/asset_extensions.dart b/mobile/lib/extensions/asset_extensions.dart index 445af99e79..ec1aa80ceb 100644 --- a/mobile/lib/extensions/asset_extensions.dart +++ b/mobile/lib/extensions/asset_extensions.dart @@ -15,8 +15,8 @@ extension DTOToAsset on api.AssetResponseDto { ownerId: ownerId, visibility: visibility.toAssetVisibility(), durationMs: duration, - height: height?.toInt(), - width: width?.toInt(), + height: height, + width: width, isFavorite: isFavorite, livePhotoVideoId: livePhotoVideoId.orElse(null), thumbHash: thumbhash, @@ -38,8 +38,8 @@ extension DTOToAsset on api.AssetResponseDto { ownerId: ownerId, visibility: visibility.toAssetVisibility(), durationMs: duration, - height: height?.toInt(), - width: width?.toInt(), + height: height, + width: width, isFavorite: isFavorite, livePhotoVideoId: livePhotoVideoId.orElse(null), thumbHash: thumbhash, @@ -58,7 +58,6 @@ extension on api.AssetVisibility { api.AssetVisibility.hidden => AssetVisibility.hidden, api.AssetVisibility.archive => AssetVisibility.archive, api.AssetVisibility.locked => AssetVisibility.locked, - _ => AssetVisibility.timeline, }; } @@ -68,6 +67,5 @@ extension on api.AssetTypeEnum { api.AssetTypeEnum.VIDEO => AssetType.video, api.AssetTypeEnum.AUDIO => AssetType.audio, api.AssetTypeEnum.OTHER => AssetType.other, - _ => throw Exception('Unknown AssetType value: $this'), }; } diff --git a/mobile/lib/extensions/collection_extensions.dart b/mobile/lib/extensions/collection_extensions.dart index b861eb0570..53e8e73fd1 100644 --- a/mobile/lib/extensions/collection_extensions.dart +++ b/mobile/lib/extensions/collection_extensions.dart @@ -5,7 +5,8 @@ import 'package:collection/collection.dart'; extension ListExtension on List { List uniqueConsecutive({int Function(E a, E b)? compare, void Function(E a, E b)? onDuplicate}) { compare ??= (E a, E b) => a == b ? 0 : 1; - int i = 1, j = 1; + int i = 1; + int j = 1; for (; i < length; i++) { if (compare(this[i - 1], this[i]) != 0) { if (i != j) { diff --git a/mobile/lib/extensions/datetime_extensions.dart b/mobile/lib/extensions/datetime_extensions.dart index 0bc95565a6..6a51d15df0 100644 --- a/mobile/lib/extensions/datetime_extensions.dart +++ b/mobile/lib/extensions/datetime_extensions.dart @@ -4,7 +4,7 @@ import 'package:easy_localization/easy_localization.dart'; extension TimeAgoExtension on DateTime { /// Displays the time difference of this [DateTime] object to the current time as a [String] String timeAgo({bool numericDates = true}) { - DateTime date = toLocal(); + final DateTime date = toLocal(); final now = DateTime.now().toLocal(); final difference = now.difference(date); @@ -13,27 +13,27 @@ extension TimeAgoExtension on DateTime { } else if (difference.inSeconds < 60) { return '${difference.inSeconds} seconds ago'; } else if (difference.inMinutes <= 1) { - return (numericDates) ? '1 minute ago' : 'A minute ago'; + return numericDates ? '1 minute ago' : 'A minute ago'; } else if (difference.inMinutes < 60) { return '${difference.inMinutes} minutes ago'; } else if (difference.inHours <= 1) { - return (numericDates) ? '1 hour ago' : 'An hour ago'; + return numericDates ? '1 hour ago' : 'An hour ago'; } else if (difference.inHours < 60) { return '${difference.inHours} hours ago'; } else if (difference.inDays <= 1) { - return (numericDates) ? '1 day ago' : 'Yesterday'; + return numericDates ? '1 day ago' : 'Yesterday'; } else if (difference.inDays < 6) { return '${difference.inDays} days ago'; } else if ((difference.inDays / 7).ceil() <= 1) { - return (numericDates) ? '1 week ago' : 'Last week'; + return numericDates ? '1 week ago' : 'Last week'; } else if ((difference.inDays / 7).ceil() < 4) { return '${(difference.inDays / 7).ceil()} weeks ago'; } else if ((difference.inDays / 30).ceil() <= 1) { - return (numericDates) ? '1 month ago' : 'Last month'; + return numericDates ? '1 month ago' : 'Last month'; } else if ((difference.inDays / 30).ceil() < 30) { return '${(difference.inDays / 30).ceil()} months ago'; } else if ((difference.inDays / 365).ceil() <= 1) { - return (numericDates) ? '1 year ago' : 'Last year'; + return numericDates ? '1 year ago' : 'Last year'; } return '${(difference.inDays / 365).floor()} years ago'; } diff --git a/mobile/lib/extensions/translate_extensions.dart b/mobile/lib/extensions/translate_extensions.dart deleted file mode 100644 index b01203a90c..0000000000 --- a/mobile/lib/extensions/translate_extensions.dart +++ /dev/null @@ -1,46 +0,0 @@ -import 'package:easy_localization/easy_localization.dart'; -import 'package:flutter/material.dart'; -import 'package:immich_mobile/utils/debug_print.dart'; -import 'package:intl/message_format.dart'; - -extension StringTranslateExtension on String { - String t({BuildContext? context, Map? args}) { - return _translateHelper(context, this, args); - } -} - -extension TextTranslateExtension on Text { - Text t({BuildContext? context, Map? args}) { - return Text( - _translateHelper(context, data ?? '', args), - key: key, - style: style, - strutStyle: strutStyle, - textAlign: textAlign, - textDirection: textDirection, - locale: locale, - softWrap: softWrap, - overflow: overflow, - textScaler: textScaler, - maxLines: maxLines, - semanticsLabel: semanticsLabel, - textWidthBasis: textWidthBasis, - textHeightBehavior: textHeightBehavior, - ); - } -} - -String _translateHelper(BuildContext? context, String key, [Map? args]) { - if (key.isEmpty) { - return ''; - } - try { - final translatedMessage = key.tr(context: context); - return args != null - ? MessageFormat(translatedMessage, locale: Intl.defaultLocale ?? 'en').format(args) - : translatedMessage; - } catch (e) { - dPrint(() => 'Translation failed for key "$key". Error: $e'); - return key; - } -} diff --git a/mobile/lib/infrastructure/entities/asset_edit.entity.dart b/mobile/lib/infrastructure/entities/asset_edit.entity.dart index 87a05ab8fe..58e1a91d33 100644 --- a/mobile/lib/infrastructure/entities/asset_edit.entity.dart +++ b/mobile/lib/infrastructure/entities/asset_edit.entity.dart @@ -25,7 +25,7 @@ class AssetEditEntity extends Table with DriftDefaultsMixin { } final JsonTypeConverter2, Uint8List, Object?> editParameterConverter = TypeConverter.jsonb( - fromJson: (json) => json as Map, + fromJson: (json) => json! as Map, ); extension AssetEditEntityDataDomainEx on AssetEditEntityData { diff --git a/mobile/lib/infrastructure/entities/asset_edit.entity.drift.dart b/mobile/lib/infrastructure/entities/asset_edit.entity.drift.dart deleted file mode 100644 index fc40bf9030..0000000000 --- a/mobile/lib/infrastructure/entities/asset_edit.entity.drift.dart +++ /dev/null @@ -1,752 +0,0 @@ -// dart format width=80 -// ignore_for_file: type=lint -import 'package:drift/drift.dart' as i0; -import 'package:immich_mobile/infrastructure/entities/asset_edit.entity.drift.dart' - as i1; -import 'package:immich_mobile/domain/models/asset_edit.model.dart' as i2; -import 'dart:typed_data' as i3; -import 'package:immich_mobile/infrastructure/entities/asset_edit.entity.dart' - as i4; -import 'package:immich_mobile/infrastructure/entities/remote_asset.entity.drift.dart' - as i5; -import 'package:drift/internal/modular.dart' as i6; - -typedef $$AssetEditEntityTableCreateCompanionBuilder = - i1.AssetEditEntityCompanion Function({ - required String id, - required String assetId, - required i2.AssetEditAction action, - required Map parameters, - required int sequence, - }); -typedef $$AssetEditEntityTableUpdateCompanionBuilder = - i1.AssetEditEntityCompanion Function({ - i0.Value id, - i0.Value assetId, - i0.Value action, - i0.Value> parameters, - i0.Value sequence, - }); - -final class $$AssetEditEntityTableReferences - extends - i0.BaseReferences< - i0.GeneratedDatabase, - i1.$AssetEditEntityTable, - i1.AssetEditEntityData - > { - $$AssetEditEntityTableReferences( - super.$_db, - super.$_table, - super.$_typedResult, - ); - - static i5.$RemoteAssetEntityTable _assetIdTable(i0.GeneratedDatabase db) => - i6.ReadDatabaseContainer(db) - .resultSet('remote_asset_entity') - .createAlias( - i0.$_aliasNameGenerator( - i6.ReadDatabaseContainer(db) - .resultSet('asset_edit_entity') - .assetId, - i6.ReadDatabaseContainer( - db, - ).resultSet('remote_asset_entity').id, - ), - ); - - i5.$$RemoteAssetEntityTableProcessedTableManager get assetId { - final $_column = $_itemColumn('asset_id')!; - - final manager = i5 - .$$RemoteAssetEntityTableTableManager( - $_db, - i6.ReadDatabaseContainer( - $_db, - ).resultSet('remote_asset_entity'), - ) - .filter((f) => f.id.sqlEquals($_column)); - final item = $_typedResult.readTableOrNull(_assetIdTable($_db)); - if (item == null) return manager; - return i0.ProcessedTableManager( - manager.$state.copyWith(prefetchedData: [item]), - ); - } -} - -class $$AssetEditEntityTableFilterComposer - extends i0.Composer { - $$AssetEditEntityTableFilterComposer({ - required super.$db, - required super.$table, - super.joinBuilder, - super.$addJoinBuilderToRootComposer, - super.$removeJoinBuilderFromRootComposer, - }); - i0.ColumnFilters get id => $composableBuilder( - column: $table.id, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnWithTypeConverterFilters - get action => $composableBuilder( - column: $table.action, - builder: (column) => i0.ColumnWithTypeConverterFilters(column), - ); - - i0.ColumnWithTypeConverterFilters< - Map, - Map, - i3.Uint8List - > - get parameters => $composableBuilder( - column: $table.parameters, - builder: (column) => i0.ColumnWithTypeConverterFilters(column), - ); - - i0.ColumnFilters get sequence => $composableBuilder( - column: $table.sequence, - builder: (column) => i0.ColumnFilters(column), - ); - - i5.$$RemoteAssetEntityTableFilterComposer get assetId { - final i5.$$RemoteAssetEntityTableFilterComposer composer = $composerBuilder( - composer: this, - getCurrentColumn: (t) => t.assetId, - referencedTable: i6.ReadDatabaseContainer( - $db, - ).resultSet('remote_asset_entity'), - getReferencedColumn: (t) => t.id, - builder: - ( - joinBuilder, { - $addJoinBuilderToRootComposer, - $removeJoinBuilderFromRootComposer, - }) => i5.$$RemoteAssetEntityTableFilterComposer( - $db: $db, - $table: i6.ReadDatabaseContainer( - $db, - ).resultSet('remote_asset_entity'), - $addJoinBuilderToRootComposer: $addJoinBuilderToRootComposer, - joinBuilder: joinBuilder, - $removeJoinBuilderFromRootComposer: - $removeJoinBuilderFromRootComposer, - ), - ); - return composer; - } -} - -class $$AssetEditEntityTableOrderingComposer - extends i0.Composer { - $$AssetEditEntityTableOrderingComposer({ - required super.$db, - required super.$table, - super.joinBuilder, - super.$addJoinBuilderToRootComposer, - super.$removeJoinBuilderFromRootComposer, - }); - i0.ColumnOrderings get id => $composableBuilder( - column: $table.id, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get action => $composableBuilder( - column: $table.action, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get parameters => $composableBuilder( - column: $table.parameters, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get sequence => $composableBuilder( - column: $table.sequence, - builder: (column) => i0.ColumnOrderings(column), - ); - - i5.$$RemoteAssetEntityTableOrderingComposer get assetId { - final i5.$$RemoteAssetEntityTableOrderingComposer composer = - $composerBuilder( - composer: this, - getCurrentColumn: (t) => t.assetId, - referencedTable: i6.ReadDatabaseContainer( - $db, - ).resultSet('remote_asset_entity'), - getReferencedColumn: (t) => t.id, - builder: - ( - joinBuilder, { - $addJoinBuilderToRootComposer, - $removeJoinBuilderFromRootComposer, - }) => i5.$$RemoteAssetEntityTableOrderingComposer( - $db: $db, - $table: i6.ReadDatabaseContainer( - $db, - ).resultSet('remote_asset_entity'), - $addJoinBuilderToRootComposer: $addJoinBuilderToRootComposer, - joinBuilder: joinBuilder, - $removeJoinBuilderFromRootComposer: - $removeJoinBuilderFromRootComposer, - ), - ); - return composer; - } -} - -class $$AssetEditEntityTableAnnotationComposer - extends i0.Composer { - $$AssetEditEntityTableAnnotationComposer({ - required super.$db, - required super.$table, - super.joinBuilder, - super.$addJoinBuilderToRootComposer, - super.$removeJoinBuilderFromRootComposer, - }); - i0.GeneratedColumn get id => - $composableBuilder(column: $table.id, builder: (column) => column); - - i0.GeneratedColumnWithTypeConverter get action => - $composableBuilder(column: $table.action, builder: (column) => column); - - i0.GeneratedColumnWithTypeConverter, i3.Uint8List> - get parameters => $composableBuilder( - column: $table.parameters, - builder: (column) => column, - ); - - i0.GeneratedColumn get sequence => - $composableBuilder(column: $table.sequence, builder: (column) => column); - - i5.$$RemoteAssetEntityTableAnnotationComposer get assetId { - final i5.$$RemoteAssetEntityTableAnnotationComposer composer = - $composerBuilder( - composer: this, - getCurrentColumn: (t) => t.assetId, - referencedTable: i6.ReadDatabaseContainer( - $db, - ).resultSet('remote_asset_entity'), - getReferencedColumn: (t) => t.id, - builder: - ( - joinBuilder, { - $addJoinBuilderToRootComposer, - $removeJoinBuilderFromRootComposer, - }) => i5.$$RemoteAssetEntityTableAnnotationComposer( - $db: $db, - $table: i6.ReadDatabaseContainer( - $db, - ).resultSet('remote_asset_entity'), - $addJoinBuilderToRootComposer: $addJoinBuilderToRootComposer, - joinBuilder: joinBuilder, - $removeJoinBuilderFromRootComposer: - $removeJoinBuilderFromRootComposer, - ), - ); - return composer; - } -} - -class $$AssetEditEntityTableTableManager - extends - i0.RootTableManager< - i0.GeneratedDatabase, - i1.$AssetEditEntityTable, - i1.AssetEditEntityData, - i1.$$AssetEditEntityTableFilterComposer, - i1.$$AssetEditEntityTableOrderingComposer, - i1.$$AssetEditEntityTableAnnotationComposer, - $$AssetEditEntityTableCreateCompanionBuilder, - $$AssetEditEntityTableUpdateCompanionBuilder, - (i1.AssetEditEntityData, i1.$$AssetEditEntityTableReferences), - i1.AssetEditEntityData, - i0.PrefetchHooks Function({bool assetId}) - > { - $$AssetEditEntityTableTableManager( - i0.GeneratedDatabase db, - i1.$AssetEditEntityTable table, - ) : super( - i0.TableManagerState( - db: db, - table: table, - createFilteringComposer: () => - i1.$$AssetEditEntityTableFilterComposer($db: db, $table: table), - createOrderingComposer: () => - i1.$$AssetEditEntityTableOrderingComposer($db: db, $table: table), - createComputedFieldComposer: () => i1 - .$$AssetEditEntityTableAnnotationComposer($db: db, $table: table), - updateCompanionCallback: - ({ - i0.Value id = const i0.Value.absent(), - i0.Value assetId = const i0.Value.absent(), - i0.Value action = const i0.Value.absent(), - i0.Value> parameters = - const i0.Value.absent(), - i0.Value sequence = const i0.Value.absent(), - }) => i1.AssetEditEntityCompanion( - id: id, - assetId: assetId, - action: action, - parameters: parameters, - sequence: sequence, - ), - createCompanionCallback: - ({ - required String id, - required String assetId, - required i2.AssetEditAction action, - required Map parameters, - required int sequence, - }) => i1.AssetEditEntityCompanion.insert( - id: id, - assetId: assetId, - action: action, - parameters: parameters, - sequence: sequence, - ), - withReferenceMapper: (p0) => p0 - .map( - (e) => ( - e.readTable(table), - i1.$$AssetEditEntityTableReferences(db, table, e), - ), - ) - .toList(), - prefetchHooksCallback: ({assetId = false}) { - return i0.PrefetchHooks( - db: db, - explicitlyWatchedTables: [], - addJoins: - < - T extends i0.TableManagerState< - dynamic, - dynamic, - dynamic, - dynamic, - dynamic, - dynamic, - dynamic, - dynamic, - dynamic, - dynamic, - dynamic - > - >(state) { - if (assetId) { - state = - state.withJoin( - currentTable: table, - currentColumn: table.assetId, - referencedTable: i1 - .$$AssetEditEntityTableReferences - ._assetIdTable(db), - referencedColumn: i1 - .$$AssetEditEntityTableReferences - ._assetIdTable(db) - .id, - ) - as T; - } - - return state; - }, - getPrefetchedDataCallback: (items) async { - return []; - }, - ); - }, - ), - ); -} - -typedef $$AssetEditEntityTableProcessedTableManager = - i0.ProcessedTableManager< - i0.GeneratedDatabase, - i1.$AssetEditEntityTable, - i1.AssetEditEntityData, - i1.$$AssetEditEntityTableFilterComposer, - i1.$$AssetEditEntityTableOrderingComposer, - i1.$$AssetEditEntityTableAnnotationComposer, - $$AssetEditEntityTableCreateCompanionBuilder, - $$AssetEditEntityTableUpdateCompanionBuilder, - (i1.AssetEditEntityData, i1.$$AssetEditEntityTableReferences), - i1.AssetEditEntityData, - i0.PrefetchHooks Function({bool assetId}) - >; -i0.Index get idxAssetEditAssetId => i0.Index( - 'idx_asset_edit_asset_id', - 'CREATE INDEX IF NOT EXISTS idx_asset_edit_asset_id ON asset_edit_entity (asset_id)', -); - -class $AssetEditEntityTable extends i4.AssetEditEntity - with i0.TableInfo<$AssetEditEntityTable, i1.AssetEditEntityData> { - @override - final i0.GeneratedDatabase attachedDatabase; - final String? _alias; - $AssetEditEntityTable(this.attachedDatabase, [this._alias]); - 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 _assetIdMeta = const i0.VerificationMeta( - 'assetId', - ); - @override - late final i0.GeneratedColumn assetId = i0.GeneratedColumn( - 'asset_id', - aliasedName, - false, - type: i0.DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: i0.GeneratedColumn.constraintIsAlways( - 'REFERENCES remote_asset_entity (id) ON DELETE CASCADE', - ), - ); - @override - late final i0.GeneratedColumnWithTypeConverter - action = - i0.GeneratedColumn( - 'action', - aliasedName, - false, - type: i0.DriftSqlType.int, - requiredDuringInsert: true, - ).withConverter( - i1.$AssetEditEntityTable.$converteraction, - ); - @override - late final i0.GeneratedColumnWithTypeConverter< - Map, - i3.Uint8List - > - parameters = - i0.GeneratedColumn( - 'parameters', - aliasedName, - false, - type: i0.DriftSqlType.blob, - requiredDuringInsert: true, - ).withConverter>( - i1.$AssetEditEntityTable.$converterparameters, - ); - static const i0.VerificationMeta _sequenceMeta = const i0.VerificationMeta( - 'sequence', - ); - @override - late final i0.GeneratedColumn sequence = i0.GeneratedColumn( - 'sequence', - aliasedName, - false, - type: i0.DriftSqlType.int, - requiredDuringInsert: true, - ); - @override - List get $columns => [ - id, - assetId, - action, - parameters, - sequence, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'asset_edit_entity'; - @override - i0.VerificationContext validateIntegrity( - i0.Insertable instance, { - bool isInserting = false, - }) { - final context = i0.VerificationContext(); - final data = instance.toColumns(true); - if (data.containsKey('id')) { - context.handle(_idMeta, id.isAcceptableOrUnknown(data['id']!, _idMeta)); - } else if (isInserting) { - context.missing(_idMeta); - } - if (data.containsKey('asset_id')) { - context.handle( - _assetIdMeta, - assetId.isAcceptableOrUnknown(data['asset_id']!, _assetIdMeta), - ); - } else if (isInserting) { - context.missing(_assetIdMeta); - } - if (data.containsKey('sequence')) { - context.handle( - _sequenceMeta, - sequence.isAcceptableOrUnknown(data['sequence']!, _sequenceMeta), - ); - } else if (isInserting) { - context.missing(_sequenceMeta); - } - return context; - } - - @override - Set get $primaryKey => {id}; - @override - i1.AssetEditEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return i1.AssetEditEntityData( - id: attachedDatabase.typeMapping.read( - i0.DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - assetId: attachedDatabase.typeMapping.read( - i0.DriftSqlType.string, - data['${effectivePrefix}asset_id'], - )!, - action: i1.$AssetEditEntityTable.$converteraction.fromSql( - attachedDatabase.typeMapping.read( - i0.DriftSqlType.int, - data['${effectivePrefix}action'], - )!, - ), - parameters: i1.$AssetEditEntityTable.$converterparameters.fromSql( - attachedDatabase.typeMapping.read( - i0.DriftSqlType.blob, - data['${effectivePrefix}parameters'], - )!, - ), - sequence: attachedDatabase.typeMapping.read( - i0.DriftSqlType.int, - data['${effectivePrefix}sequence'], - )!, - ); - } - - @override - $AssetEditEntityTable createAlias(String alias) { - return $AssetEditEntityTable(attachedDatabase, alias); - } - - static i0.JsonTypeConverter2 $converteraction = - const i0.EnumIndexConverter( - i2.AssetEditAction.values, - ); - static i0.JsonTypeConverter2, i3.Uint8List, Object?> - $converterparameters = i4.editParameterConverter; - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class AssetEditEntityData extends i0.DataClass - implements i0.Insertable { - final String id; - final String assetId; - final i2.AssetEditAction action; - final Map parameters; - final int sequence; - const AssetEditEntityData({ - required this.id, - required this.assetId, - required this.action, - required this.parameters, - required this.sequence, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = i0.Variable(id); - map['asset_id'] = i0.Variable(assetId); - { - map['action'] = i0.Variable( - i1.$AssetEditEntityTable.$converteraction.toSql(action), - ); - } - { - map['parameters'] = i0.Variable( - i1.$AssetEditEntityTable.$converterparameters.toSql(parameters), - ); - } - map['sequence'] = i0.Variable(sequence); - return map; - } - - factory AssetEditEntityData.fromJson( - Map json, { - i0.ValueSerializer? serializer, - }) { - serializer ??= i0.driftRuntimeOptions.defaultSerializer; - return AssetEditEntityData( - id: serializer.fromJson(json['id']), - assetId: serializer.fromJson(json['assetId']), - action: i1.$AssetEditEntityTable.$converteraction.fromJson( - serializer.fromJson(json['action']), - ), - parameters: i1.$AssetEditEntityTable.$converterparameters.fromJson( - serializer.fromJson(json['parameters']), - ), - sequence: serializer.fromJson(json['sequence']), - ); - } - @override - Map toJson({i0.ValueSerializer? serializer}) { - serializer ??= i0.driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'assetId': serializer.toJson(assetId), - 'action': serializer.toJson( - i1.$AssetEditEntityTable.$converteraction.toJson(action), - ), - 'parameters': serializer.toJson( - i1.$AssetEditEntityTable.$converterparameters.toJson(parameters), - ), - 'sequence': serializer.toJson(sequence), - }; - } - - i1.AssetEditEntityData copyWith({ - String? id, - String? assetId, - i2.AssetEditAction? action, - Map? parameters, - int? sequence, - }) => i1.AssetEditEntityData( - id: id ?? this.id, - assetId: assetId ?? this.assetId, - action: action ?? this.action, - parameters: parameters ?? this.parameters, - sequence: sequence ?? this.sequence, - ); - AssetEditEntityData copyWithCompanion(i1.AssetEditEntityCompanion data) { - return AssetEditEntityData( - id: data.id.present ? data.id.value : this.id, - assetId: data.assetId.present ? data.assetId.value : this.assetId, - action: data.action.present ? data.action.value : this.action, - parameters: data.parameters.present - ? data.parameters.value - : this.parameters, - sequence: data.sequence.present ? data.sequence.value : this.sequence, - ); - } - - @override - String toString() { - return (StringBuffer('AssetEditEntityData(') - ..write('id: $id, ') - ..write('assetId: $assetId, ') - ..write('action: $action, ') - ..write('parameters: $parameters, ') - ..write('sequence: $sequence') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(id, assetId, action, parameters, sequence); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is i1.AssetEditEntityData && - other.id == this.id && - other.assetId == this.assetId && - other.action == this.action && - other.parameters == this.parameters && - other.sequence == this.sequence); -} - -class AssetEditEntityCompanion - extends i0.UpdateCompanion { - final i0.Value id; - final i0.Value assetId; - final i0.Value action; - final i0.Value> parameters; - final i0.Value sequence; - const AssetEditEntityCompanion({ - this.id = const i0.Value.absent(), - this.assetId = const i0.Value.absent(), - this.action = const i0.Value.absent(), - this.parameters = const i0.Value.absent(), - this.sequence = const i0.Value.absent(), - }); - AssetEditEntityCompanion.insert({ - required String id, - required String assetId, - required i2.AssetEditAction action, - required Map parameters, - required int sequence, - }) : id = i0.Value(id), - assetId = i0.Value(assetId), - action = i0.Value(action), - parameters = i0.Value(parameters), - sequence = i0.Value(sequence); - static i0.Insertable custom({ - i0.Expression? id, - i0.Expression? assetId, - i0.Expression? action, - i0.Expression? parameters, - i0.Expression? sequence, - }) { - return i0.RawValuesInsertable({ - if (id != null) 'id': id, - if (assetId != null) 'asset_id': assetId, - if (action != null) 'action': action, - if (parameters != null) 'parameters': parameters, - if (sequence != null) 'sequence': sequence, - }); - } - - i1.AssetEditEntityCompanion copyWith({ - i0.Value? id, - i0.Value? assetId, - i0.Value? action, - i0.Value>? parameters, - i0.Value? sequence, - }) { - return i1.AssetEditEntityCompanion( - id: id ?? this.id, - assetId: assetId ?? this.assetId, - action: action ?? this.action, - parameters: parameters ?? this.parameters, - sequence: sequence ?? this.sequence, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = i0.Variable(id.value); - } - if (assetId.present) { - map['asset_id'] = i0.Variable(assetId.value); - } - if (action.present) { - map['action'] = i0.Variable( - i1.$AssetEditEntityTable.$converteraction.toSql(action.value), - ); - } - if (parameters.present) { - map['parameters'] = i0.Variable( - i1.$AssetEditEntityTable.$converterparameters.toSql(parameters.value), - ); - } - if (sequence.present) { - map['sequence'] = i0.Variable(sequence.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('AssetEditEntityCompanion(') - ..write('id: $id, ') - ..write('assetId: $assetId, ') - ..write('action: $action, ') - ..write('parameters: $parameters, ') - ..write('sequence: $sequence') - ..write(')')) - .toString(); - } -} diff --git a/mobile/lib/infrastructure/entities/asset_face.entity.drift.dart b/mobile/lib/infrastructure/entities/asset_face.entity.drift.dart deleted file mode 100644 index d262325742..0000000000 --- a/mobile/lib/infrastructure/entities/asset_face.entity.drift.dart +++ /dev/null @@ -1,1356 +0,0 @@ -// dart format width=80 -// ignore_for_file: type=lint -import 'package:drift/drift.dart' as i0; -import 'package:immich_mobile/infrastructure/entities/asset_face.entity.drift.dart' - as i1; -import 'package:immich_mobile/infrastructure/entities/asset_face.entity.dart' - as i2; -import 'package:drift/src/runtime/query_builder/query_builder.dart' as i3; -import 'package:immich_mobile/infrastructure/entities/remote_asset.entity.drift.dart' - as i4; -import 'package:drift/internal/modular.dart' as i5; -import 'package:immich_mobile/infrastructure/entities/person.entity.drift.dart' - as i6; - -typedef $$AssetFaceEntityTableCreateCompanionBuilder = - i1.AssetFaceEntityCompanion Function({ - required String id, - required String assetId, - i0.Value personId, - required int imageWidth, - required int imageHeight, - required int boundingBoxX1, - required int boundingBoxY1, - required int boundingBoxX2, - required int boundingBoxY2, - required String sourceType, - i0.Value isVisible, - i0.Value deletedAt, - }); -typedef $$AssetFaceEntityTableUpdateCompanionBuilder = - i1.AssetFaceEntityCompanion Function({ - i0.Value id, - i0.Value assetId, - i0.Value personId, - i0.Value imageWidth, - i0.Value imageHeight, - i0.Value boundingBoxX1, - i0.Value boundingBoxY1, - i0.Value boundingBoxX2, - i0.Value boundingBoxY2, - i0.Value sourceType, - i0.Value isVisible, - i0.Value deletedAt, - }); - -final class $$AssetFaceEntityTableReferences - extends - i0.BaseReferences< - i0.GeneratedDatabase, - i1.$AssetFaceEntityTable, - i1.AssetFaceEntityData - > { - $$AssetFaceEntityTableReferences( - super.$_db, - super.$_table, - super.$_typedResult, - ); - - static i4.$RemoteAssetEntityTable _assetIdTable(i0.GeneratedDatabase db) => - i5.ReadDatabaseContainer(db) - .resultSet('remote_asset_entity') - .createAlias( - i0.$_aliasNameGenerator( - i5.ReadDatabaseContainer(db) - .resultSet('asset_face_entity') - .assetId, - i5.ReadDatabaseContainer( - db, - ).resultSet('remote_asset_entity').id, - ), - ); - - i4.$$RemoteAssetEntityTableProcessedTableManager get assetId { - final $_column = $_itemColumn('asset_id')!; - - final manager = i4 - .$$RemoteAssetEntityTableTableManager( - $_db, - i5.ReadDatabaseContainer( - $_db, - ).resultSet('remote_asset_entity'), - ) - .filter((f) => f.id.sqlEquals($_column)); - final item = $_typedResult.readTableOrNull(_assetIdTable($_db)); - if (item == null) return manager; - return i0.ProcessedTableManager( - manager.$state.copyWith(prefetchedData: [item]), - ); - } - - static i6.$PersonEntityTable _personIdTable(i0.GeneratedDatabase db) => - i5.ReadDatabaseContainer(db) - .resultSet('person_entity') - .createAlias( - i0.$_aliasNameGenerator( - i5.ReadDatabaseContainer(db) - .resultSet('asset_face_entity') - .personId, - i5.ReadDatabaseContainer( - db, - ).resultSet('person_entity').id, - ), - ); - - i6.$$PersonEntityTableProcessedTableManager? get personId { - final $_column = $_itemColumn('person_id'); - if ($_column == null) return null; - final manager = i6 - .$$PersonEntityTableTableManager( - $_db, - i5.ReadDatabaseContainer( - $_db, - ).resultSet('person_entity'), - ) - .filter((f) => f.id.sqlEquals($_column)); - final item = $_typedResult.readTableOrNull(_personIdTable($_db)); - if (item == null) return manager; - return i0.ProcessedTableManager( - manager.$state.copyWith(prefetchedData: [item]), - ); - } -} - -class $$AssetFaceEntityTableFilterComposer - extends i0.Composer { - $$AssetFaceEntityTableFilterComposer({ - required super.$db, - required super.$table, - super.joinBuilder, - super.$addJoinBuilderToRootComposer, - super.$removeJoinBuilderFromRootComposer, - }); - i0.ColumnFilters get id => $composableBuilder( - column: $table.id, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnFilters get imageWidth => $composableBuilder( - column: $table.imageWidth, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnFilters get imageHeight => $composableBuilder( - column: $table.imageHeight, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnFilters get boundingBoxX1 => $composableBuilder( - column: $table.boundingBoxX1, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnFilters get boundingBoxY1 => $composableBuilder( - column: $table.boundingBoxY1, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnFilters get boundingBoxX2 => $composableBuilder( - column: $table.boundingBoxX2, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnFilters get boundingBoxY2 => $composableBuilder( - column: $table.boundingBoxY2, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnFilters get sourceType => $composableBuilder( - column: $table.sourceType, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnFilters get isVisible => $composableBuilder( - column: $table.isVisible, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnFilters get deletedAt => $composableBuilder( - column: $table.deletedAt, - builder: (column) => i0.ColumnFilters(column), - ); - - i4.$$RemoteAssetEntityTableFilterComposer get assetId { - final i4.$$RemoteAssetEntityTableFilterComposer composer = $composerBuilder( - composer: this, - getCurrentColumn: (t) => t.assetId, - referencedTable: i5.ReadDatabaseContainer( - $db, - ).resultSet('remote_asset_entity'), - getReferencedColumn: (t) => t.id, - builder: - ( - joinBuilder, { - $addJoinBuilderToRootComposer, - $removeJoinBuilderFromRootComposer, - }) => i4.$$RemoteAssetEntityTableFilterComposer( - $db: $db, - $table: i5.ReadDatabaseContainer( - $db, - ).resultSet('remote_asset_entity'), - $addJoinBuilderToRootComposer: $addJoinBuilderToRootComposer, - joinBuilder: joinBuilder, - $removeJoinBuilderFromRootComposer: - $removeJoinBuilderFromRootComposer, - ), - ); - return composer; - } - - i6.$$PersonEntityTableFilterComposer get personId { - final i6.$$PersonEntityTableFilterComposer composer = $composerBuilder( - composer: this, - getCurrentColumn: (t) => t.personId, - referencedTable: i5.ReadDatabaseContainer( - $db, - ).resultSet('person_entity'), - getReferencedColumn: (t) => t.id, - builder: - ( - joinBuilder, { - $addJoinBuilderToRootComposer, - $removeJoinBuilderFromRootComposer, - }) => i6.$$PersonEntityTableFilterComposer( - $db: $db, - $table: i5.ReadDatabaseContainer( - $db, - ).resultSet('person_entity'), - $addJoinBuilderToRootComposer: $addJoinBuilderToRootComposer, - joinBuilder: joinBuilder, - $removeJoinBuilderFromRootComposer: - $removeJoinBuilderFromRootComposer, - ), - ); - return composer; - } -} - -class $$AssetFaceEntityTableOrderingComposer - extends i0.Composer { - $$AssetFaceEntityTableOrderingComposer({ - required super.$db, - required super.$table, - super.joinBuilder, - super.$addJoinBuilderToRootComposer, - super.$removeJoinBuilderFromRootComposer, - }); - i0.ColumnOrderings get id => $composableBuilder( - column: $table.id, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get imageWidth => $composableBuilder( - column: $table.imageWidth, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get imageHeight => $composableBuilder( - column: $table.imageHeight, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get boundingBoxX1 => $composableBuilder( - column: $table.boundingBoxX1, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get boundingBoxY1 => $composableBuilder( - column: $table.boundingBoxY1, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get boundingBoxX2 => $composableBuilder( - column: $table.boundingBoxX2, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get boundingBoxY2 => $composableBuilder( - column: $table.boundingBoxY2, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get sourceType => $composableBuilder( - column: $table.sourceType, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get isVisible => $composableBuilder( - column: $table.isVisible, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get deletedAt => $composableBuilder( - column: $table.deletedAt, - builder: (column) => i0.ColumnOrderings(column), - ); - - i4.$$RemoteAssetEntityTableOrderingComposer get assetId { - final i4.$$RemoteAssetEntityTableOrderingComposer composer = - $composerBuilder( - composer: this, - getCurrentColumn: (t) => t.assetId, - referencedTable: i5.ReadDatabaseContainer( - $db, - ).resultSet('remote_asset_entity'), - getReferencedColumn: (t) => t.id, - builder: - ( - joinBuilder, { - $addJoinBuilderToRootComposer, - $removeJoinBuilderFromRootComposer, - }) => i4.$$RemoteAssetEntityTableOrderingComposer( - $db: $db, - $table: i5.ReadDatabaseContainer( - $db, - ).resultSet('remote_asset_entity'), - $addJoinBuilderToRootComposer: $addJoinBuilderToRootComposer, - joinBuilder: joinBuilder, - $removeJoinBuilderFromRootComposer: - $removeJoinBuilderFromRootComposer, - ), - ); - return composer; - } - - i6.$$PersonEntityTableOrderingComposer get personId { - final i6.$$PersonEntityTableOrderingComposer composer = $composerBuilder( - composer: this, - getCurrentColumn: (t) => t.personId, - referencedTable: i5.ReadDatabaseContainer( - $db, - ).resultSet('person_entity'), - getReferencedColumn: (t) => t.id, - builder: - ( - joinBuilder, { - $addJoinBuilderToRootComposer, - $removeJoinBuilderFromRootComposer, - }) => i6.$$PersonEntityTableOrderingComposer( - $db: $db, - $table: i5.ReadDatabaseContainer( - $db, - ).resultSet('person_entity'), - $addJoinBuilderToRootComposer: $addJoinBuilderToRootComposer, - joinBuilder: joinBuilder, - $removeJoinBuilderFromRootComposer: - $removeJoinBuilderFromRootComposer, - ), - ); - return composer; - } -} - -class $$AssetFaceEntityTableAnnotationComposer - extends i0.Composer { - $$AssetFaceEntityTableAnnotationComposer({ - required super.$db, - required super.$table, - super.joinBuilder, - super.$addJoinBuilderToRootComposer, - super.$removeJoinBuilderFromRootComposer, - }); - i0.GeneratedColumn get id => - $composableBuilder(column: $table.id, builder: (column) => column); - - i0.GeneratedColumn get imageWidth => $composableBuilder( - column: $table.imageWidth, - builder: (column) => column, - ); - - i0.GeneratedColumn get imageHeight => $composableBuilder( - column: $table.imageHeight, - builder: (column) => column, - ); - - i0.GeneratedColumn get boundingBoxX1 => $composableBuilder( - column: $table.boundingBoxX1, - builder: (column) => column, - ); - - i0.GeneratedColumn get boundingBoxY1 => $composableBuilder( - column: $table.boundingBoxY1, - builder: (column) => column, - ); - - i0.GeneratedColumn get boundingBoxX2 => $composableBuilder( - column: $table.boundingBoxX2, - builder: (column) => column, - ); - - i0.GeneratedColumn get boundingBoxY2 => $composableBuilder( - column: $table.boundingBoxY2, - builder: (column) => column, - ); - - i0.GeneratedColumn get sourceType => $composableBuilder( - column: $table.sourceType, - builder: (column) => column, - ); - - i0.GeneratedColumn get isVisible => - $composableBuilder(column: $table.isVisible, builder: (column) => column); - - i0.GeneratedColumn get deletedAt => - $composableBuilder(column: $table.deletedAt, builder: (column) => column); - - i4.$$RemoteAssetEntityTableAnnotationComposer get assetId { - final i4.$$RemoteAssetEntityTableAnnotationComposer composer = - $composerBuilder( - composer: this, - getCurrentColumn: (t) => t.assetId, - referencedTable: i5.ReadDatabaseContainer( - $db, - ).resultSet('remote_asset_entity'), - getReferencedColumn: (t) => t.id, - builder: - ( - joinBuilder, { - $addJoinBuilderToRootComposer, - $removeJoinBuilderFromRootComposer, - }) => i4.$$RemoteAssetEntityTableAnnotationComposer( - $db: $db, - $table: i5.ReadDatabaseContainer( - $db, - ).resultSet('remote_asset_entity'), - $addJoinBuilderToRootComposer: $addJoinBuilderToRootComposer, - joinBuilder: joinBuilder, - $removeJoinBuilderFromRootComposer: - $removeJoinBuilderFromRootComposer, - ), - ); - return composer; - } - - i6.$$PersonEntityTableAnnotationComposer get personId { - final i6.$$PersonEntityTableAnnotationComposer composer = $composerBuilder( - composer: this, - getCurrentColumn: (t) => t.personId, - referencedTable: i5.ReadDatabaseContainer( - $db, - ).resultSet('person_entity'), - getReferencedColumn: (t) => t.id, - builder: - ( - joinBuilder, { - $addJoinBuilderToRootComposer, - $removeJoinBuilderFromRootComposer, - }) => i6.$$PersonEntityTableAnnotationComposer( - $db: $db, - $table: i5.ReadDatabaseContainer( - $db, - ).resultSet('person_entity'), - $addJoinBuilderToRootComposer: $addJoinBuilderToRootComposer, - joinBuilder: joinBuilder, - $removeJoinBuilderFromRootComposer: - $removeJoinBuilderFromRootComposer, - ), - ); - return composer; - } -} - -class $$AssetFaceEntityTableTableManager - extends - i0.RootTableManager< - i0.GeneratedDatabase, - i1.$AssetFaceEntityTable, - i1.AssetFaceEntityData, - i1.$$AssetFaceEntityTableFilterComposer, - i1.$$AssetFaceEntityTableOrderingComposer, - i1.$$AssetFaceEntityTableAnnotationComposer, - $$AssetFaceEntityTableCreateCompanionBuilder, - $$AssetFaceEntityTableUpdateCompanionBuilder, - (i1.AssetFaceEntityData, i1.$$AssetFaceEntityTableReferences), - i1.AssetFaceEntityData, - i0.PrefetchHooks Function({bool assetId, bool personId}) - > { - $$AssetFaceEntityTableTableManager( - i0.GeneratedDatabase db, - i1.$AssetFaceEntityTable table, - ) : super( - i0.TableManagerState( - db: db, - table: table, - createFilteringComposer: () => - i1.$$AssetFaceEntityTableFilterComposer($db: db, $table: table), - createOrderingComposer: () => - i1.$$AssetFaceEntityTableOrderingComposer($db: db, $table: table), - createComputedFieldComposer: () => i1 - .$$AssetFaceEntityTableAnnotationComposer($db: db, $table: table), - updateCompanionCallback: - ({ - i0.Value id = const i0.Value.absent(), - i0.Value assetId = const i0.Value.absent(), - i0.Value personId = const i0.Value.absent(), - i0.Value imageWidth = const i0.Value.absent(), - i0.Value imageHeight = const i0.Value.absent(), - i0.Value boundingBoxX1 = const i0.Value.absent(), - i0.Value boundingBoxY1 = const i0.Value.absent(), - i0.Value boundingBoxX2 = const i0.Value.absent(), - i0.Value boundingBoxY2 = const i0.Value.absent(), - i0.Value sourceType = const i0.Value.absent(), - i0.Value isVisible = const i0.Value.absent(), - i0.Value deletedAt = const i0.Value.absent(), - }) => i1.AssetFaceEntityCompanion( - id: id, - assetId: assetId, - personId: personId, - imageWidth: imageWidth, - imageHeight: imageHeight, - boundingBoxX1: boundingBoxX1, - boundingBoxY1: boundingBoxY1, - boundingBoxX2: boundingBoxX2, - boundingBoxY2: boundingBoxY2, - sourceType: sourceType, - isVisible: isVisible, - deletedAt: deletedAt, - ), - createCompanionCallback: - ({ - required String id, - required String assetId, - i0.Value personId = const i0.Value.absent(), - required int imageWidth, - required int imageHeight, - required int boundingBoxX1, - required int boundingBoxY1, - required int boundingBoxX2, - required int boundingBoxY2, - required String sourceType, - i0.Value isVisible = const i0.Value.absent(), - i0.Value deletedAt = const i0.Value.absent(), - }) => i1.AssetFaceEntityCompanion.insert( - id: id, - assetId: assetId, - personId: personId, - imageWidth: imageWidth, - imageHeight: imageHeight, - boundingBoxX1: boundingBoxX1, - boundingBoxY1: boundingBoxY1, - boundingBoxX2: boundingBoxX2, - boundingBoxY2: boundingBoxY2, - sourceType: sourceType, - isVisible: isVisible, - deletedAt: deletedAt, - ), - withReferenceMapper: (p0) => p0 - .map( - (e) => ( - e.readTable(table), - i1.$$AssetFaceEntityTableReferences(db, table, e), - ), - ) - .toList(), - prefetchHooksCallback: ({assetId = false, personId = false}) { - return i0.PrefetchHooks( - db: db, - explicitlyWatchedTables: [], - addJoins: - < - T extends i0.TableManagerState< - dynamic, - dynamic, - dynamic, - dynamic, - dynamic, - dynamic, - dynamic, - dynamic, - dynamic, - dynamic, - dynamic - > - >(state) { - if (assetId) { - state = - state.withJoin( - currentTable: table, - currentColumn: table.assetId, - referencedTable: i1 - .$$AssetFaceEntityTableReferences - ._assetIdTable(db), - referencedColumn: i1 - .$$AssetFaceEntityTableReferences - ._assetIdTable(db) - .id, - ) - as T; - } - if (personId) { - state = - state.withJoin( - currentTable: table, - currentColumn: table.personId, - referencedTable: i1 - .$$AssetFaceEntityTableReferences - ._personIdTable(db), - referencedColumn: i1 - .$$AssetFaceEntityTableReferences - ._personIdTable(db) - .id, - ) - as T; - } - - return state; - }, - getPrefetchedDataCallback: (items) async { - return []; - }, - ); - }, - ), - ); -} - -typedef $$AssetFaceEntityTableProcessedTableManager = - i0.ProcessedTableManager< - i0.GeneratedDatabase, - i1.$AssetFaceEntityTable, - i1.AssetFaceEntityData, - i1.$$AssetFaceEntityTableFilterComposer, - i1.$$AssetFaceEntityTableOrderingComposer, - i1.$$AssetFaceEntityTableAnnotationComposer, - $$AssetFaceEntityTableCreateCompanionBuilder, - $$AssetFaceEntityTableUpdateCompanionBuilder, - (i1.AssetFaceEntityData, i1.$$AssetFaceEntityTableReferences), - i1.AssetFaceEntityData, - i0.PrefetchHooks Function({bool assetId, bool personId}) - >; -i0.Index get idxAssetFacePersonId => i0.Index( - 'idx_asset_face_person_id', - 'CREATE INDEX IF NOT EXISTS idx_asset_face_person_id ON asset_face_entity (person_id)', -); - -class $AssetFaceEntityTable extends i2.AssetFaceEntity - with i0.TableInfo<$AssetFaceEntityTable, i1.AssetFaceEntityData> { - @override - final i0.GeneratedDatabase attachedDatabase; - final String? _alias; - $AssetFaceEntityTable(this.attachedDatabase, [this._alias]); - 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 _assetIdMeta = const i0.VerificationMeta( - 'assetId', - ); - @override - late final i0.GeneratedColumn assetId = i0.GeneratedColumn( - 'asset_id', - aliasedName, - false, - type: i0.DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: i0.GeneratedColumn.constraintIsAlways( - 'REFERENCES remote_asset_entity (id) ON DELETE CASCADE', - ), - ); - static const i0.VerificationMeta _personIdMeta = const i0.VerificationMeta( - 'personId', - ); - @override - late final i0.GeneratedColumn personId = i0.GeneratedColumn( - 'person_id', - aliasedName, - true, - type: i0.DriftSqlType.string, - requiredDuringInsert: false, - defaultConstraints: i0.GeneratedColumn.constraintIsAlways( - 'REFERENCES person_entity (id) ON DELETE SET NULL', - ), - ); - static const i0.VerificationMeta _imageWidthMeta = const i0.VerificationMeta( - 'imageWidth', - ); - @override - late final i0.GeneratedColumn imageWidth = i0.GeneratedColumn( - 'image_width', - aliasedName, - false, - type: i0.DriftSqlType.int, - requiredDuringInsert: true, - ); - static const i0.VerificationMeta _imageHeightMeta = const i0.VerificationMeta( - 'imageHeight', - ); - @override - late final i0.GeneratedColumn imageHeight = i0.GeneratedColumn( - 'image_height', - aliasedName, - false, - type: i0.DriftSqlType.int, - requiredDuringInsert: true, - ); - static const i0.VerificationMeta _boundingBoxX1Meta = - const i0.VerificationMeta('boundingBoxX1'); - @override - late final i0.GeneratedColumn boundingBoxX1 = i0.GeneratedColumn( - 'bounding_box_x1', - aliasedName, - false, - type: i0.DriftSqlType.int, - requiredDuringInsert: true, - ); - static const i0.VerificationMeta _boundingBoxY1Meta = - const i0.VerificationMeta('boundingBoxY1'); - @override - late final i0.GeneratedColumn boundingBoxY1 = i0.GeneratedColumn( - 'bounding_box_y1', - aliasedName, - false, - type: i0.DriftSqlType.int, - requiredDuringInsert: true, - ); - static const i0.VerificationMeta _boundingBoxX2Meta = - const i0.VerificationMeta('boundingBoxX2'); - @override - late final i0.GeneratedColumn boundingBoxX2 = i0.GeneratedColumn( - 'bounding_box_x2', - aliasedName, - false, - type: i0.DriftSqlType.int, - requiredDuringInsert: true, - ); - static const i0.VerificationMeta _boundingBoxY2Meta = - const i0.VerificationMeta('boundingBoxY2'); - @override - late final i0.GeneratedColumn boundingBoxY2 = i0.GeneratedColumn( - 'bounding_box_y2', - aliasedName, - false, - type: i0.DriftSqlType.int, - requiredDuringInsert: true, - ); - static const i0.VerificationMeta _sourceTypeMeta = const i0.VerificationMeta( - 'sourceType', - ); - @override - late final i0.GeneratedColumn sourceType = i0.GeneratedColumn( - 'source_type', - aliasedName, - false, - type: i0.DriftSqlType.string, - requiredDuringInsert: true, - ); - static const i0.VerificationMeta _isVisibleMeta = const i0.VerificationMeta( - 'isVisible', - ); - @override - late final i0.GeneratedColumn isVisible = i0.GeneratedColumn( - 'is_visible', - aliasedName, - false, - type: i0.DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: i0.GeneratedColumn.constraintIsAlways( - 'CHECK ("is_visible" IN (0, 1))', - ), - defaultValue: const i3.Constant(true), - ); - static const i0.VerificationMeta _deletedAtMeta = const i0.VerificationMeta( - 'deletedAt', - ); - @override - late final i0.GeneratedColumn deletedAt = - i0.GeneratedColumn( - 'deleted_at', - aliasedName, - true, - type: i0.DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - @override - List get $columns => [ - id, - assetId, - personId, - imageWidth, - imageHeight, - boundingBoxX1, - boundingBoxY1, - boundingBoxX2, - boundingBoxY2, - sourceType, - isVisible, - deletedAt, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'asset_face_entity'; - @override - i0.VerificationContext validateIntegrity( - i0.Insertable instance, { - bool isInserting = false, - }) { - final context = i0.VerificationContext(); - final data = instance.toColumns(true); - if (data.containsKey('id')) { - context.handle(_idMeta, id.isAcceptableOrUnknown(data['id']!, _idMeta)); - } else if (isInserting) { - context.missing(_idMeta); - } - if (data.containsKey('asset_id')) { - context.handle( - _assetIdMeta, - assetId.isAcceptableOrUnknown(data['asset_id']!, _assetIdMeta), - ); - } else if (isInserting) { - context.missing(_assetIdMeta); - } - if (data.containsKey('person_id')) { - context.handle( - _personIdMeta, - personId.isAcceptableOrUnknown(data['person_id']!, _personIdMeta), - ); - } - if (data.containsKey('image_width')) { - context.handle( - _imageWidthMeta, - imageWidth.isAcceptableOrUnknown(data['image_width']!, _imageWidthMeta), - ); - } else if (isInserting) { - context.missing(_imageWidthMeta); - } - if (data.containsKey('image_height')) { - context.handle( - _imageHeightMeta, - imageHeight.isAcceptableOrUnknown( - data['image_height']!, - _imageHeightMeta, - ), - ); - } else if (isInserting) { - context.missing(_imageHeightMeta); - } - if (data.containsKey('bounding_box_x1')) { - context.handle( - _boundingBoxX1Meta, - boundingBoxX1.isAcceptableOrUnknown( - data['bounding_box_x1']!, - _boundingBoxX1Meta, - ), - ); - } else if (isInserting) { - context.missing(_boundingBoxX1Meta); - } - if (data.containsKey('bounding_box_y1')) { - context.handle( - _boundingBoxY1Meta, - boundingBoxY1.isAcceptableOrUnknown( - data['bounding_box_y1']!, - _boundingBoxY1Meta, - ), - ); - } else if (isInserting) { - context.missing(_boundingBoxY1Meta); - } - if (data.containsKey('bounding_box_x2')) { - context.handle( - _boundingBoxX2Meta, - boundingBoxX2.isAcceptableOrUnknown( - data['bounding_box_x2']!, - _boundingBoxX2Meta, - ), - ); - } else if (isInserting) { - context.missing(_boundingBoxX2Meta); - } - if (data.containsKey('bounding_box_y2')) { - context.handle( - _boundingBoxY2Meta, - boundingBoxY2.isAcceptableOrUnknown( - data['bounding_box_y2']!, - _boundingBoxY2Meta, - ), - ); - } else if (isInserting) { - context.missing(_boundingBoxY2Meta); - } - if (data.containsKey('source_type')) { - context.handle( - _sourceTypeMeta, - sourceType.isAcceptableOrUnknown(data['source_type']!, _sourceTypeMeta), - ); - } else if (isInserting) { - context.missing(_sourceTypeMeta); - } - if (data.containsKey('is_visible')) { - context.handle( - _isVisibleMeta, - isVisible.isAcceptableOrUnknown(data['is_visible']!, _isVisibleMeta), - ); - } - if (data.containsKey('deleted_at')) { - context.handle( - _deletedAtMeta, - deletedAt.isAcceptableOrUnknown(data['deleted_at']!, _deletedAtMeta), - ); - } - return context; - } - - @override - Set get $primaryKey => {id}; - @override - i1.AssetFaceEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return i1.AssetFaceEntityData( - id: attachedDatabase.typeMapping.read( - i0.DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - assetId: attachedDatabase.typeMapping.read( - i0.DriftSqlType.string, - data['${effectivePrefix}asset_id'], - )!, - personId: attachedDatabase.typeMapping.read( - i0.DriftSqlType.string, - data['${effectivePrefix}person_id'], - ), - imageWidth: attachedDatabase.typeMapping.read( - i0.DriftSqlType.int, - data['${effectivePrefix}image_width'], - )!, - imageHeight: attachedDatabase.typeMapping.read( - i0.DriftSqlType.int, - data['${effectivePrefix}image_height'], - )!, - boundingBoxX1: attachedDatabase.typeMapping.read( - i0.DriftSqlType.int, - data['${effectivePrefix}bounding_box_x1'], - )!, - boundingBoxY1: attachedDatabase.typeMapping.read( - i0.DriftSqlType.int, - data['${effectivePrefix}bounding_box_y1'], - )!, - boundingBoxX2: attachedDatabase.typeMapping.read( - i0.DriftSqlType.int, - data['${effectivePrefix}bounding_box_x2'], - )!, - boundingBoxY2: attachedDatabase.typeMapping.read( - i0.DriftSqlType.int, - data['${effectivePrefix}bounding_box_y2'], - )!, - sourceType: attachedDatabase.typeMapping.read( - i0.DriftSqlType.string, - data['${effectivePrefix}source_type'], - )!, - isVisible: attachedDatabase.typeMapping.read( - i0.DriftSqlType.bool, - data['${effectivePrefix}is_visible'], - )!, - deletedAt: attachedDatabase.typeMapping.read( - i0.DriftSqlType.dateTime, - data['${effectivePrefix}deleted_at'], - ), - ); - } - - @override - $AssetFaceEntityTable createAlias(String alias) { - return $AssetFaceEntityTable(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class AssetFaceEntityData extends i0.DataClass - implements i0.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; - final bool isVisible; - final DateTime? deletedAt; - 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, - required this.isVisible, - this.deletedAt, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = i0.Variable(id); - map['asset_id'] = i0.Variable(assetId); - if (!nullToAbsent || personId != null) { - map['person_id'] = i0.Variable(personId); - } - map['image_width'] = i0.Variable(imageWidth); - map['image_height'] = i0.Variable(imageHeight); - map['bounding_box_x1'] = i0.Variable(boundingBoxX1); - map['bounding_box_y1'] = i0.Variable(boundingBoxY1); - map['bounding_box_x2'] = i0.Variable(boundingBoxX2); - map['bounding_box_y2'] = i0.Variable(boundingBoxY2); - map['source_type'] = i0.Variable(sourceType); - map['is_visible'] = i0.Variable(isVisible); - if (!nullToAbsent || deletedAt != null) { - map['deleted_at'] = i0.Variable(deletedAt); - } - return map; - } - - factory AssetFaceEntityData.fromJson( - Map json, { - i0.ValueSerializer? serializer, - }) { - serializer ??= i0.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']), - isVisible: serializer.fromJson(json['isVisible']), - deletedAt: serializer.fromJson(json['deletedAt']), - ); - } - @override - Map toJson({i0.ValueSerializer? serializer}) { - serializer ??= i0.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), - 'isVisible': serializer.toJson(isVisible), - 'deletedAt': serializer.toJson(deletedAt), - }; - } - - i1.AssetFaceEntityData copyWith({ - String? id, - String? assetId, - i0.Value personId = const i0.Value.absent(), - int? imageWidth, - int? imageHeight, - int? boundingBoxX1, - int? boundingBoxY1, - int? boundingBoxX2, - int? boundingBoxY2, - String? sourceType, - bool? isVisible, - i0.Value deletedAt = const i0.Value.absent(), - }) => i1.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, - isVisible: isVisible ?? this.isVisible, - deletedAt: deletedAt.present ? deletedAt.value : this.deletedAt, - ); - AssetFaceEntityData copyWithCompanion(i1.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, - isVisible: data.isVisible.present ? data.isVisible.value : this.isVisible, - deletedAt: data.deletedAt.present ? data.deletedAt.value : this.deletedAt, - ); - } - - @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('isVisible: $isVisible, ') - ..write('deletedAt: $deletedAt') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - assetId, - personId, - imageWidth, - imageHeight, - boundingBoxX1, - boundingBoxY1, - boundingBoxX2, - boundingBoxY2, - sourceType, - isVisible, - deletedAt, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is i1.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 && - other.isVisible == this.isVisible && - other.deletedAt == this.deletedAt); -} - -class AssetFaceEntityCompanion - extends i0.UpdateCompanion { - final i0.Value id; - final i0.Value assetId; - final i0.Value personId; - final i0.Value imageWidth; - final i0.Value imageHeight; - final i0.Value boundingBoxX1; - final i0.Value boundingBoxY1; - final i0.Value boundingBoxX2; - final i0.Value boundingBoxY2; - final i0.Value sourceType; - final i0.Value isVisible; - final i0.Value deletedAt; - const AssetFaceEntityCompanion({ - this.id = const i0.Value.absent(), - this.assetId = const i0.Value.absent(), - this.personId = const i0.Value.absent(), - this.imageWidth = const i0.Value.absent(), - this.imageHeight = const i0.Value.absent(), - this.boundingBoxX1 = const i0.Value.absent(), - this.boundingBoxY1 = const i0.Value.absent(), - this.boundingBoxX2 = const i0.Value.absent(), - this.boundingBoxY2 = const i0.Value.absent(), - this.sourceType = const i0.Value.absent(), - this.isVisible = const i0.Value.absent(), - this.deletedAt = const i0.Value.absent(), - }); - AssetFaceEntityCompanion.insert({ - required String id, - required String assetId, - this.personId = const i0.Value.absent(), - required int imageWidth, - required int imageHeight, - required int boundingBoxX1, - required int boundingBoxY1, - required int boundingBoxX2, - required int boundingBoxY2, - required String sourceType, - this.isVisible = const i0.Value.absent(), - this.deletedAt = const i0.Value.absent(), - }) : id = i0.Value(id), - assetId = i0.Value(assetId), - imageWidth = i0.Value(imageWidth), - imageHeight = i0.Value(imageHeight), - boundingBoxX1 = i0.Value(boundingBoxX1), - boundingBoxY1 = i0.Value(boundingBoxY1), - boundingBoxX2 = i0.Value(boundingBoxX2), - boundingBoxY2 = i0.Value(boundingBoxY2), - sourceType = i0.Value(sourceType); - static i0.Insertable custom({ - i0.Expression? id, - i0.Expression? assetId, - i0.Expression? personId, - i0.Expression? imageWidth, - i0.Expression? imageHeight, - i0.Expression? boundingBoxX1, - i0.Expression? boundingBoxY1, - i0.Expression? boundingBoxX2, - i0.Expression? boundingBoxY2, - i0.Expression? sourceType, - i0.Expression? isVisible, - i0.Expression? deletedAt, - }) { - return i0.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, - if (isVisible != null) 'is_visible': isVisible, - if (deletedAt != null) 'deleted_at': deletedAt, - }); - } - - i1.AssetFaceEntityCompanion copyWith({ - i0.Value? id, - i0.Value? assetId, - i0.Value? personId, - i0.Value? imageWidth, - i0.Value? imageHeight, - i0.Value? boundingBoxX1, - i0.Value? boundingBoxY1, - i0.Value? boundingBoxX2, - i0.Value? boundingBoxY2, - i0.Value? sourceType, - i0.Value? isVisible, - i0.Value? deletedAt, - }) { - return i1.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, - isVisible: isVisible ?? this.isVisible, - deletedAt: deletedAt ?? this.deletedAt, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = i0.Variable(id.value); - } - if (assetId.present) { - map['asset_id'] = i0.Variable(assetId.value); - } - if (personId.present) { - map['person_id'] = i0.Variable(personId.value); - } - if (imageWidth.present) { - map['image_width'] = i0.Variable(imageWidth.value); - } - if (imageHeight.present) { - map['image_height'] = i0.Variable(imageHeight.value); - } - if (boundingBoxX1.present) { - map['bounding_box_x1'] = i0.Variable(boundingBoxX1.value); - } - if (boundingBoxY1.present) { - map['bounding_box_y1'] = i0.Variable(boundingBoxY1.value); - } - if (boundingBoxX2.present) { - map['bounding_box_x2'] = i0.Variable(boundingBoxX2.value); - } - if (boundingBoxY2.present) { - map['bounding_box_y2'] = i0.Variable(boundingBoxY2.value); - } - if (sourceType.present) { - map['source_type'] = i0.Variable(sourceType.value); - } - if (isVisible.present) { - map['is_visible'] = i0.Variable(isVisible.value); - } - if (deletedAt.present) { - map['deleted_at'] = i0.Variable(deletedAt.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('isVisible: $isVisible, ') - ..write('deletedAt: $deletedAt') - ..write(')')) - .toString(); - } -} - -i0.Index get idxAssetFaceAssetId => i0.Index( - 'idx_asset_face_asset_id', - 'CREATE INDEX IF NOT EXISTS idx_asset_face_asset_id ON asset_face_entity (asset_id)', -); -i0.Index get idxAssetFaceVisiblePerson => i0.Index( - 'idx_asset_face_visible_person', - 'CREATE INDEX IF NOT EXISTS idx_asset_face_visible_person ON asset_face_entity (person_id, asset_id) WHERE is_visible = 1 AND deleted_at IS NULL', -); diff --git a/mobile/lib/infrastructure/entities/asset_ocr.entity.drift.dart b/mobile/lib/infrastructure/entities/asset_ocr.entity.drift.dart deleted file mode 100644 index 5d6d8787de..0000000000 --- a/mobile/lib/infrastructure/entities/asset_ocr.entity.drift.dart +++ /dev/null @@ -1,1288 +0,0 @@ -// dart format width=80 -// ignore_for_file: type=lint -import 'package:drift/drift.dart' as i0; -import 'package:immich_mobile/infrastructure/entities/asset_ocr.entity.drift.dart' - as i1; -import 'package:immich_mobile/infrastructure/entities/asset_ocr.entity.dart' - as i2; -import 'package:drift/src/runtime/query_builder/query_builder.dart' as i3; -import 'package:immich_mobile/infrastructure/entities/remote_asset.entity.drift.dart' - as i4; -import 'package:drift/internal/modular.dart' as i5; - -typedef $$AssetOcrEntityTableCreateCompanionBuilder = - i1.AssetOcrEntityCompanion Function({ - required String id, - required String assetId, - required double x1, - required double y1, - required double x2, - required double y2, - required double x3, - required double y3, - required double x4, - required double y4, - required double boxScore, - required double textScore, - required String recognizedText, - i0.Value isVisible, - }); -typedef $$AssetOcrEntityTableUpdateCompanionBuilder = - i1.AssetOcrEntityCompanion Function({ - i0.Value id, - i0.Value assetId, - i0.Value x1, - i0.Value y1, - i0.Value x2, - i0.Value y2, - i0.Value x3, - i0.Value y3, - i0.Value x4, - i0.Value y4, - i0.Value boxScore, - i0.Value textScore, - i0.Value recognizedText, - i0.Value isVisible, - }); - -final class $$AssetOcrEntityTableReferences - extends - i0.BaseReferences< - i0.GeneratedDatabase, - i1.$AssetOcrEntityTable, - i1.AssetOcrEntityData - > { - $$AssetOcrEntityTableReferences( - super.$_db, - super.$_table, - super.$_typedResult, - ); - - static i4.$RemoteAssetEntityTable _assetIdTable(i0.GeneratedDatabase db) => - i5.ReadDatabaseContainer(db) - .resultSet('remote_asset_entity') - .createAlias( - i0.$_aliasNameGenerator( - i5.ReadDatabaseContainer( - db, - ).resultSet('asset_ocr_entity').assetId, - i5.ReadDatabaseContainer( - db, - ).resultSet('remote_asset_entity').id, - ), - ); - - i4.$$RemoteAssetEntityTableProcessedTableManager get assetId { - final $_column = $_itemColumn('asset_id')!; - - final manager = i4 - .$$RemoteAssetEntityTableTableManager( - $_db, - i5.ReadDatabaseContainer( - $_db, - ).resultSet('remote_asset_entity'), - ) - .filter((f) => f.id.sqlEquals($_column)); - final item = $_typedResult.readTableOrNull(_assetIdTable($_db)); - if (item == null) return manager; - return i0.ProcessedTableManager( - manager.$state.copyWith(prefetchedData: [item]), - ); - } -} - -class $$AssetOcrEntityTableFilterComposer - extends i0.Composer { - $$AssetOcrEntityTableFilterComposer({ - required super.$db, - required super.$table, - super.joinBuilder, - super.$addJoinBuilderToRootComposer, - super.$removeJoinBuilderFromRootComposer, - }); - i0.ColumnFilters get id => $composableBuilder( - column: $table.id, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnFilters get x1 => $composableBuilder( - column: $table.x1, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnFilters get y1 => $composableBuilder( - column: $table.y1, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnFilters get x2 => $composableBuilder( - column: $table.x2, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnFilters get y2 => $composableBuilder( - column: $table.y2, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnFilters get x3 => $composableBuilder( - column: $table.x3, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnFilters get y3 => $composableBuilder( - column: $table.y3, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnFilters get x4 => $composableBuilder( - column: $table.x4, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnFilters get y4 => $composableBuilder( - column: $table.y4, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnFilters get boxScore => $composableBuilder( - column: $table.boxScore, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnFilters get textScore => $composableBuilder( - column: $table.textScore, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnFilters get recognizedText => $composableBuilder( - column: $table.recognizedText, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnFilters get isVisible => $composableBuilder( - column: $table.isVisible, - builder: (column) => i0.ColumnFilters(column), - ); - - i4.$$RemoteAssetEntityTableFilterComposer get assetId { - final i4.$$RemoteAssetEntityTableFilterComposer composer = $composerBuilder( - composer: this, - getCurrentColumn: (t) => t.assetId, - referencedTable: i5.ReadDatabaseContainer( - $db, - ).resultSet('remote_asset_entity'), - getReferencedColumn: (t) => t.id, - builder: - ( - joinBuilder, { - $addJoinBuilderToRootComposer, - $removeJoinBuilderFromRootComposer, - }) => i4.$$RemoteAssetEntityTableFilterComposer( - $db: $db, - $table: i5.ReadDatabaseContainer( - $db, - ).resultSet('remote_asset_entity'), - $addJoinBuilderToRootComposer: $addJoinBuilderToRootComposer, - joinBuilder: joinBuilder, - $removeJoinBuilderFromRootComposer: - $removeJoinBuilderFromRootComposer, - ), - ); - return composer; - } -} - -class $$AssetOcrEntityTableOrderingComposer - extends i0.Composer { - $$AssetOcrEntityTableOrderingComposer({ - required super.$db, - required super.$table, - super.joinBuilder, - super.$addJoinBuilderToRootComposer, - super.$removeJoinBuilderFromRootComposer, - }); - i0.ColumnOrderings get id => $composableBuilder( - column: $table.id, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get x1 => $composableBuilder( - column: $table.x1, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get y1 => $composableBuilder( - column: $table.y1, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get x2 => $composableBuilder( - column: $table.x2, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get y2 => $composableBuilder( - column: $table.y2, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get x3 => $composableBuilder( - column: $table.x3, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get y3 => $composableBuilder( - column: $table.y3, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get x4 => $composableBuilder( - column: $table.x4, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get y4 => $composableBuilder( - column: $table.y4, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get boxScore => $composableBuilder( - column: $table.boxScore, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get textScore => $composableBuilder( - column: $table.textScore, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get recognizedText => $composableBuilder( - column: $table.recognizedText, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get isVisible => $composableBuilder( - column: $table.isVisible, - builder: (column) => i0.ColumnOrderings(column), - ); - - i4.$$RemoteAssetEntityTableOrderingComposer get assetId { - final i4.$$RemoteAssetEntityTableOrderingComposer composer = - $composerBuilder( - composer: this, - getCurrentColumn: (t) => t.assetId, - referencedTable: i5.ReadDatabaseContainer( - $db, - ).resultSet('remote_asset_entity'), - getReferencedColumn: (t) => t.id, - builder: - ( - joinBuilder, { - $addJoinBuilderToRootComposer, - $removeJoinBuilderFromRootComposer, - }) => i4.$$RemoteAssetEntityTableOrderingComposer( - $db: $db, - $table: i5.ReadDatabaseContainer( - $db, - ).resultSet('remote_asset_entity'), - $addJoinBuilderToRootComposer: $addJoinBuilderToRootComposer, - joinBuilder: joinBuilder, - $removeJoinBuilderFromRootComposer: - $removeJoinBuilderFromRootComposer, - ), - ); - return composer; - } -} - -class $$AssetOcrEntityTableAnnotationComposer - extends i0.Composer { - $$AssetOcrEntityTableAnnotationComposer({ - required super.$db, - required super.$table, - super.joinBuilder, - super.$addJoinBuilderToRootComposer, - super.$removeJoinBuilderFromRootComposer, - }); - i0.GeneratedColumn get id => - $composableBuilder(column: $table.id, builder: (column) => column); - - i0.GeneratedColumn get x1 => - $composableBuilder(column: $table.x1, builder: (column) => column); - - i0.GeneratedColumn get y1 => - $composableBuilder(column: $table.y1, builder: (column) => column); - - i0.GeneratedColumn get x2 => - $composableBuilder(column: $table.x2, builder: (column) => column); - - i0.GeneratedColumn get y2 => - $composableBuilder(column: $table.y2, builder: (column) => column); - - i0.GeneratedColumn get x3 => - $composableBuilder(column: $table.x3, builder: (column) => column); - - i0.GeneratedColumn get y3 => - $composableBuilder(column: $table.y3, builder: (column) => column); - - i0.GeneratedColumn get x4 => - $composableBuilder(column: $table.x4, builder: (column) => column); - - i0.GeneratedColumn get y4 => - $composableBuilder(column: $table.y4, builder: (column) => column); - - i0.GeneratedColumn get boxScore => - $composableBuilder(column: $table.boxScore, builder: (column) => column); - - i0.GeneratedColumn get textScore => - $composableBuilder(column: $table.textScore, builder: (column) => column); - - i0.GeneratedColumn get recognizedText => $composableBuilder( - column: $table.recognizedText, - builder: (column) => column, - ); - - i0.GeneratedColumn get isVisible => - $composableBuilder(column: $table.isVisible, builder: (column) => column); - - i4.$$RemoteAssetEntityTableAnnotationComposer get assetId { - final i4.$$RemoteAssetEntityTableAnnotationComposer composer = - $composerBuilder( - composer: this, - getCurrentColumn: (t) => t.assetId, - referencedTable: i5.ReadDatabaseContainer( - $db, - ).resultSet('remote_asset_entity'), - getReferencedColumn: (t) => t.id, - builder: - ( - joinBuilder, { - $addJoinBuilderToRootComposer, - $removeJoinBuilderFromRootComposer, - }) => i4.$$RemoteAssetEntityTableAnnotationComposer( - $db: $db, - $table: i5.ReadDatabaseContainer( - $db, - ).resultSet('remote_asset_entity'), - $addJoinBuilderToRootComposer: $addJoinBuilderToRootComposer, - joinBuilder: joinBuilder, - $removeJoinBuilderFromRootComposer: - $removeJoinBuilderFromRootComposer, - ), - ); - return composer; - } -} - -class $$AssetOcrEntityTableTableManager - extends - i0.RootTableManager< - i0.GeneratedDatabase, - i1.$AssetOcrEntityTable, - i1.AssetOcrEntityData, - i1.$$AssetOcrEntityTableFilterComposer, - i1.$$AssetOcrEntityTableOrderingComposer, - i1.$$AssetOcrEntityTableAnnotationComposer, - $$AssetOcrEntityTableCreateCompanionBuilder, - $$AssetOcrEntityTableUpdateCompanionBuilder, - (i1.AssetOcrEntityData, i1.$$AssetOcrEntityTableReferences), - i1.AssetOcrEntityData, - i0.PrefetchHooks Function({bool assetId}) - > { - $$AssetOcrEntityTableTableManager( - i0.GeneratedDatabase db, - i1.$AssetOcrEntityTable table, - ) : super( - i0.TableManagerState( - db: db, - table: table, - createFilteringComposer: () => - i1.$$AssetOcrEntityTableFilterComposer($db: db, $table: table), - createOrderingComposer: () => - i1.$$AssetOcrEntityTableOrderingComposer($db: db, $table: table), - createComputedFieldComposer: () => i1 - .$$AssetOcrEntityTableAnnotationComposer($db: db, $table: table), - updateCompanionCallback: - ({ - i0.Value id = const i0.Value.absent(), - i0.Value assetId = const i0.Value.absent(), - i0.Value x1 = const i0.Value.absent(), - i0.Value y1 = const i0.Value.absent(), - i0.Value x2 = const i0.Value.absent(), - i0.Value y2 = const i0.Value.absent(), - i0.Value x3 = const i0.Value.absent(), - i0.Value y3 = const i0.Value.absent(), - i0.Value x4 = const i0.Value.absent(), - i0.Value y4 = const i0.Value.absent(), - i0.Value boxScore = const i0.Value.absent(), - i0.Value textScore = const i0.Value.absent(), - i0.Value recognizedText = const i0.Value.absent(), - i0.Value isVisible = const i0.Value.absent(), - }) => i1.AssetOcrEntityCompanion( - id: id, - assetId: assetId, - x1: x1, - y1: y1, - x2: x2, - y2: y2, - x3: x3, - y3: y3, - x4: x4, - y4: y4, - boxScore: boxScore, - textScore: textScore, - recognizedText: recognizedText, - isVisible: isVisible, - ), - createCompanionCallback: - ({ - required String id, - required String assetId, - required double x1, - required double y1, - required double x2, - required double y2, - required double x3, - required double y3, - required double x4, - required double y4, - required double boxScore, - required double textScore, - required String recognizedText, - i0.Value isVisible = const i0.Value.absent(), - }) => i1.AssetOcrEntityCompanion.insert( - id: id, - assetId: assetId, - x1: x1, - y1: y1, - x2: x2, - y2: y2, - x3: x3, - y3: y3, - x4: x4, - y4: y4, - boxScore: boxScore, - textScore: textScore, - recognizedText: recognizedText, - isVisible: isVisible, - ), - withReferenceMapper: (p0) => p0 - .map( - (e) => ( - e.readTable(table), - i1.$$AssetOcrEntityTableReferences(db, table, e), - ), - ) - .toList(), - prefetchHooksCallback: ({assetId = false}) { - return i0.PrefetchHooks( - db: db, - explicitlyWatchedTables: [], - addJoins: - < - T extends i0.TableManagerState< - dynamic, - dynamic, - dynamic, - dynamic, - dynamic, - dynamic, - dynamic, - dynamic, - dynamic, - dynamic, - dynamic - > - >(state) { - if (assetId) { - state = - state.withJoin( - currentTable: table, - currentColumn: table.assetId, - referencedTable: i1 - .$$AssetOcrEntityTableReferences - ._assetIdTable(db), - referencedColumn: i1 - .$$AssetOcrEntityTableReferences - ._assetIdTable(db) - .id, - ) - as T; - } - - return state; - }, - getPrefetchedDataCallback: (items) async { - return []; - }, - ); - }, - ), - ); -} - -typedef $$AssetOcrEntityTableProcessedTableManager = - i0.ProcessedTableManager< - i0.GeneratedDatabase, - i1.$AssetOcrEntityTable, - i1.AssetOcrEntityData, - i1.$$AssetOcrEntityTableFilterComposer, - i1.$$AssetOcrEntityTableOrderingComposer, - i1.$$AssetOcrEntityTableAnnotationComposer, - $$AssetOcrEntityTableCreateCompanionBuilder, - $$AssetOcrEntityTableUpdateCompanionBuilder, - (i1.AssetOcrEntityData, i1.$$AssetOcrEntityTableReferences), - i1.AssetOcrEntityData, - i0.PrefetchHooks Function({bool assetId}) - >; -i0.Index get idxAssetOcrAssetId => i0.Index( - 'idx_asset_ocr_asset_id', - 'CREATE INDEX IF NOT EXISTS idx_asset_ocr_asset_id ON asset_ocr_entity (asset_id)', -); - -class $AssetOcrEntityTable extends i2.AssetOcrEntity - with i0.TableInfo<$AssetOcrEntityTable, i1.AssetOcrEntityData> { - @override - final i0.GeneratedDatabase attachedDatabase; - final String? _alias; - $AssetOcrEntityTable(this.attachedDatabase, [this._alias]); - 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 _assetIdMeta = const i0.VerificationMeta( - 'assetId', - ); - @override - late final i0.GeneratedColumn assetId = i0.GeneratedColumn( - 'asset_id', - aliasedName, - false, - type: i0.DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: i0.GeneratedColumn.constraintIsAlways( - 'REFERENCES remote_asset_entity (id) ON DELETE CASCADE', - ), - ); - static const i0.VerificationMeta _x1Meta = const i0.VerificationMeta('x1'); - @override - late final i0.GeneratedColumn x1 = i0.GeneratedColumn( - 'x1', - aliasedName, - false, - type: i0.DriftSqlType.double, - requiredDuringInsert: true, - ); - static const i0.VerificationMeta _y1Meta = const i0.VerificationMeta('y1'); - @override - late final i0.GeneratedColumn y1 = i0.GeneratedColumn( - 'y1', - aliasedName, - false, - type: i0.DriftSqlType.double, - requiredDuringInsert: true, - ); - static const i0.VerificationMeta _x2Meta = const i0.VerificationMeta('x2'); - @override - late final i0.GeneratedColumn x2 = i0.GeneratedColumn( - 'x2', - aliasedName, - false, - type: i0.DriftSqlType.double, - requiredDuringInsert: true, - ); - static const i0.VerificationMeta _y2Meta = const i0.VerificationMeta('y2'); - @override - late final i0.GeneratedColumn y2 = i0.GeneratedColumn( - 'y2', - aliasedName, - false, - type: i0.DriftSqlType.double, - requiredDuringInsert: true, - ); - static const i0.VerificationMeta _x3Meta = const i0.VerificationMeta('x3'); - @override - late final i0.GeneratedColumn x3 = i0.GeneratedColumn( - 'x3', - aliasedName, - false, - type: i0.DriftSqlType.double, - requiredDuringInsert: true, - ); - static const i0.VerificationMeta _y3Meta = const i0.VerificationMeta('y3'); - @override - late final i0.GeneratedColumn y3 = i0.GeneratedColumn( - 'y3', - aliasedName, - false, - type: i0.DriftSqlType.double, - requiredDuringInsert: true, - ); - static const i0.VerificationMeta _x4Meta = const i0.VerificationMeta('x4'); - @override - late final i0.GeneratedColumn x4 = i0.GeneratedColumn( - 'x4', - aliasedName, - false, - type: i0.DriftSqlType.double, - requiredDuringInsert: true, - ); - static const i0.VerificationMeta _y4Meta = const i0.VerificationMeta('y4'); - @override - late final i0.GeneratedColumn y4 = i0.GeneratedColumn( - 'y4', - aliasedName, - false, - type: i0.DriftSqlType.double, - requiredDuringInsert: true, - ); - static const i0.VerificationMeta _boxScoreMeta = const i0.VerificationMeta( - 'boxScore', - ); - @override - late final i0.GeneratedColumn boxScore = i0.GeneratedColumn( - 'box_score', - aliasedName, - false, - type: i0.DriftSqlType.double, - requiredDuringInsert: true, - ); - static const i0.VerificationMeta _textScoreMeta = const i0.VerificationMeta( - 'textScore', - ); - @override - late final i0.GeneratedColumn textScore = i0.GeneratedColumn( - 'text_score', - aliasedName, - false, - type: i0.DriftSqlType.double, - requiredDuringInsert: true, - ); - static const i0.VerificationMeta _recognizedTextMeta = - const i0.VerificationMeta('recognizedText'); - @override - late final i0.GeneratedColumn recognizedText = - i0.GeneratedColumn( - 'recognized_text', - aliasedName, - false, - type: i0.DriftSqlType.string, - requiredDuringInsert: true, - ); - static const i0.VerificationMeta _isVisibleMeta = const i0.VerificationMeta( - 'isVisible', - ); - @override - late final i0.GeneratedColumn isVisible = i0.GeneratedColumn( - 'is_visible', - aliasedName, - false, - type: i0.DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: i0.GeneratedColumn.constraintIsAlways( - 'CHECK ("is_visible" IN (0, 1))', - ), - defaultValue: const i3.Constant(true), - ); - @override - List get $columns => [ - id, - assetId, - x1, - y1, - x2, - y2, - x3, - y3, - x4, - y4, - boxScore, - textScore, - recognizedText, - isVisible, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'asset_ocr_entity'; - @override - i0.VerificationContext validateIntegrity( - i0.Insertable instance, { - bool isInserting = false, - }) { - final context = i0.VerificationContext(); - final data = instance.toColumns(true); - if (data.containsKey('id')) { - context.handle(_idMeta, id.isAcceptableOrUnknown(data['id']!, _idMeta)); - } else if (isInserting) { - context.missing(_idMeta); - } - if (data.containsKey('asset_id')) { - context.handle( - _assetIdMeta, - assetId.isAcceptableOrUnknown(data['asset_id']!, _assetIdMeta), - ); - } else if (isInserting) { - context.missing(_assetIdMeta); - } - if (data.containsKey('x1')) { - context.handle(_x1Meta, x1.isAcceptableOrUnknown(data['x1']!, _x1Meta)); - } else if (isInserting) { - context.missing(_x1Meta); - } - if (data.containsKey('y1')) { - context.handle(_y1Meta, y1.isAcceptableOrUnknown(data['y1']!, _y1Meta)); - } else if (isInserting) { - context.missing(_y1Meta); - } - if (data.containsKey('x2')) { - context.handle(_x2Meta, x2.isAcceptableOrUnknown(data['x2']!, _x2Meta)); - } else if (isInserting) { - context.missing(_x2Meta); - } - if (data.containsKey('y2')) { - context.handle(_y2Meta, y2.isAcceptableOrUnknown(data['y2']!, _y2Meta)); - } else if (isInserting) { - context.missing(_y2Meta); - } - if (data.containsKey('x3')) { - context.handle(_x3Meta, x3.isAcceptableOrUnknown(data['x3']!, _x3Meta)); - } else if (isInserting) { - context.missing(_x3Meta); - } - if (data.containsKey('y3')) { - context.handle(_y3Meta, y3.isAcceptableOrUnknown(data['y3']!, _y3Meta)); - } else if (isInserting) { - context.missing(_y3Meta); - } - if (data.containsKey('x4')) { - context.handle(_x4Meta, x4.isAcceptableOrUnknown(data['x4']!, _x4Meta)); - } else if (isInserting) { - context.missing(_x4Meta); - } - if (data.containsKey('y4')) { - context.handle(_y4Meta, y4.isAcceptableOrUnknown(data['y4']!, _y4Meta)); - } else if (isInserting) { - context.missing(_y4Meta); - } - if (data.containsKey('box_score')) { - context.handle( - _boxScoreMeta, - boxScore.isAcceptableOrUnknown(data['box_score']!, _boxScoreMeta), - ); - } else if (isInserting) { - context.missing(_boxScoreMeta); - } - if (data.containsKey('text_score')) { - context.handle( - _textScoreMeta, - textScore.isAcceptableOrUnknown(data['text_score']!, _textScoreMeta), - ); - } else if (isInserting) { - context.missing(_textScoreMeta); - } - if (data.containsKey('recognized_text')) { - context.handle( - _recognizedTextMeta, - recognizedText.isAcceptableOrUnknown( - data['recognized_text']!, - _recognizedTextMeta, - ), - ); - } else if (isInserting) { - context.missing(_recognizedTextMeta); - } - if (data.containsKey('is_visible')) { - context.handle( - _isVisibleMeta, - isVisible.isAcceptableOrUnknown(data['is_visible']!, _isVisibleMeta), - ); - } - return context; - } - - @override - Set get $primaryKey => {id}; - @override - i1.AssetOcrEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return i1.AssetOcrEntityData( - id: attachedDatabase.typeMapping.read( - i0.DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - assetId: attachedDatabase.typeMapping.read( - i0.DriftSqlType.string, - data['${effectivePrefix}asset_id'], - )!, - x1: attachedDatabase.typeMapping.read( - i0.DriftSqlType.double, - data['${effectivePrefix}x1'], - )!, - y1: attachedDatabase.typeMapping.read( - i0.DriftSqlType.double, - data['${effectivePrefix}y1'], - )!, - x2: attachedDatabase.typeMapping.read( - i0.DriftSqlType.double, - data['${effectivePrefix}x2'], - )!, - y2: attachedDatabase.typeMapping.read( - i0.DriftSqlType.double, - data['${effectivePrefix}y2'], - )!, - x3: attachedDatabase.typeMapping.read( - i0.DriftSqlType.double, - data['${effectivePrefix}x3'], - )!, - y3: attachedDatabase.typeMapping.read( - i0.DriftSqlType.double, - data['${effectivePrefix}y3'], - )!, - x4: attachedDatabase.typeMapping.read( - i0.DriftSqlType.double, - data['${effectivePrefix}x4'], - )!, - y4: attachedDatabase.typeMapping.read( - i0.DriftSqlType.double, - data['${effectivePrefix}y4'], - )!, - boxScore: attachedDatabase.typeMapping.read( - i0.DriftSqlType.double, - data['${effectivePrefix}box_score'], - )!, - textScore: attachedDatabase.typeMapping.read( - i0.DriftSqlType.double, - data['${effectivePrefix}text_score'], - )!, - recognizedText: attachedDatabase.typeMapping.read( - i0.DriftSqlType.string, - data['${effectivePrefix}recognized_text'], - )!, - isVisible: attachedDatabase.typeMapping.read( - i0.DriftSqlType.bool, - data['${effectivePrefix}is_visible'], - )!, - ); - } - - @override - $AssetOcrEntityTable createAlias(String alias) { - return $AssetOcrEntityTable(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class AssetOcrEntityData extends i0.DataClass - implements i0.Insertable { - final String id; - final String assetId; - final double x1; - final double y1; - final double x2; - final double y2; - final double x3; - final double y3; - final double x4; - final double y4; - final double boxScore; - final double textScore; - final String recognizedText; - final bool isVisible; - const AssetOcrEntityData({ - required this.id, - required this.assetId, - required this.x1, - required this.y1, - required this.x2, - required this.y2, - required this.x3, - required this.y3, - required this.x4, - required this.y4, - required this.boxScore, - required this.textScore, - required this.recognizedText, - required this.isVisible, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = i0.Variable(id); - map['asset_id'] = i0.Variable(assetId); - map['x1'] = i0.Variable(x1); - map['y1'] = i0.Variable(y1); - map['x2'] = i0.Variable(x2); - map['y2'] = i0.Variable(y2); - map['x3'] = i0.Variable(x3); - map['y3'] = i0.Variable(y3); - map['x4'] = i0.Variable(x4); - map['y4'] = i0.Variable(y4); - map['box_score'] = i0.Variable(boxScore); - map['text_score'] = i0.Variable(textScore); - map['recognized_text'] = i0.Variable(recognizedText); - map['is_visible'] = i0.Variable(isVisible); - return map; - } - - factory AssetOcrEntityData.fromJson( - Map json, { - i0.ValueSerializer? serializer, - }) { - serializer ??= i0.driftRuntimeOptions.defaultSerializer; - return AssetOcrEntityData( - id: serializer.fromJson(json['id']), - assetId: serializer.fromJson(json['assetId']), - x1: serializer.fromJson(json['x1']), - y1: serializer.fromJson(json['y1']), - x2: serializer.fromJson(json['x2']), - y2: serializer.fromJson(json['y2']), - x3: serializer.fromJson(json['x3']), - y3: serializer.fromJson(json['y3']), - x4: serializer.fromJson(json['x4']), - y4: serializer.fromJson(json['y4']), - boxScore: serializer.fromJson(json['boxScore']), - textScore: serializer.fromJson(json['textScore']), - recognizedText: serializer.fromJson(json['recognizedText']), - isVisible: serializer.fromJson(json['isVisible']), - ); - } - @override - Map toJson({i0.ValueSerializer? serializer}) { - serializer ??= i0.driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'assetId': serializer.toJson(assetId), - 'x1': serializer.toJson(x1), - 'y1': serializer.toJson(y1), - 'x2': serializer.toJson(x2), - 'y2': serializer.toJson(y2), - 'x3': serializer.toJson(x3), - 'y3': serializer.toJson(y3), - 'x4': serializer.toJson(x4), - 'y4': serializer.toJson(y4), - 'boxScore': serializer.toJson(boxScore), - 'textScore': serializer.toJson(textScore), - 'recognizedText': serializer.toJson(recognizedText), - 'isVisible': serializer.toJson(isVisible), - }; - } - - i1.AssetOcrEntityData copyWith({ - String? id, - String? assetId, - double? x1, - double? y1, - double? x2, - double? y2, - double? x3, - double? y3, - double? x4, - double? y4, - double? boxScore, - double? textScore, - String? recognizedText, - bool? isVisible, - }) => i1.AssetOcrEntityData( - id: id ?? this.id, - assetId: assetId ?? this.assetId, - x1: x1 ?? this.x1, - y1: y1 ?? this.y1, - x2: x2 ?? this.x2, - y2: y2 ?? this.y2, - x3: x3 ?? this.x3, - y3: y3 ?? this.y3, - x4: x4 ?? this.x4, - y4: y4 ?? this.y4, - boxScore: boxScore ?? this.boxScore, - textScore: textScore ?? this.textScore, - recognizedText: recognizedText ?? this.recognizedText, - isVisible: isVisible ?? this.isVisible, - ); - AssetOcrEntityData copyWithCompanion(i1.AssetOcrEntityCompanion data) { - return AssetOcrEntityData( - id: data.id.present ? data.id.value : this.id, - assetId: data.assetId.present ? data.assetId.value : this.assetId, - x1: data.x1.present ? data.x1.value : this.x1, - y1: data.y1.present ? data.y1.value : this.y1, - x2: data.x2.present ? data.x2.value : this.x2, - y2: data.y2.present ? data.y2.value : this.y2, - x3: data.x3.present ? data.x3.value : this.x3, - y3: data.y3.present ? data.y3.value : this.y3, - x4: data.x4.present ? data.x4.value : this.x4, - y4: data.y4.present ? data.y4.value : this.y4, - boxScore: data.boxScore.present ? data.boxScore.value : this.boxScore, - textScore: data.textScore.present ? data.textScore.value : this.textScore, - recognizedText: data.recognizedText.present - ? data.recognizedText.value - : this.recognizedText, - isVisible: data.isVisible.present ? data.isVisible.value : this.isVisible, - ); - } - - @override - String toString() { - return (StringBuffer('AssetOcrEntityData(') - ..write('id: $id, ') - ..write('assetId: $assetId, ') - ..write('x1: $x1, ') - ..write('y1: $y1, ') - ..write('x2: $x2, ') - ..write('y2: $y2, ') - ..write('x3: $x3, ') - ..write('y3: $y3, ') - ..write('x4: $x4, ') - ..write('y4: $y4, ') - ..write('boxScore: $boxScore, ') - ..write('textScore: $textScore, ') - ..write('recognizedText: $recognizedText, ') - ..write('isVisible: $isVisible') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - assetId, - x1, - y1, - x2, - y2, - x3, - y3, - x4, - y4, - boxScore, - textScore, - recognizedText, - isVisible, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is i1.AssetOcrEntityData && - other.id == this.id && - other.assetId == this.assetId && - other.x1 == this.x1 && - other.y1 == this.y1 && - other.x2 == this.x2 && - other.y2 == this.y2 && - other.x3 == this.x3 && - other.y3 == this.y3 && - other.x4 == this.x4 && - other.y4 == this.y4 && - other.boxScore == this.boxScore && - other.textScore == this.textScore && - other.recognizedText == this.recognizedText && - other.isVisible == this.isVisible); -} - -class AssetOcrEntityCompanion - extends i0.UpdateCompanion { - final i0.Value id; - final i0.Value assetId; - final i0.Value x1; - final i0.Value y1; - final i0.Value x2; - final i0.Value y2; - final i0.Value x3; - final i0.Value y3; - final i0.Value x4; - final i0.Value y4; - final i0.Value boxScore; - final i0.Value textScore; - final i0.Value recognizedText; - final i0.Value isVisible; - const AssetOcrEntityCompanion({ - this.id = const i0.Value.absent(), - this.assetId = const i0.Value.absent(), - this.x1 = const i0.Value.absent(), - this.y1 = const i0.Value.absent(), - this.x2 = const i0.Value.absent(), - this.y2 = const i0.Value.absent(), - this.x3 = const i0.Value.absent(), - this.y3 = const i0.Value.absent(), - this.x4 = const i0.Value.absent(), - this.y4 = const i0.Value.absent(), - this.boxScore = const i0.Value.absent(), - this.textScore = const i0.Value.absent(), - this.recognizedText = const i0.Value.absent(), - this.isVisible = const i0.Value.absent(), - }); - AssetOcrEntityCompanion.insert({ - required String id, - required String assetId, - required double x1, - required double y1, - required double x2, - required double y2, - required double x3, - required double y3, - required double x4, - required double y4, - required double boxScore, - required double textScore, - required String recognizedText, - this.isVisible = const i0.Value.absent(), - }) : id = i0.Value(id), - assetId = i0.Value(assetId), - x1 = i0.Value(x1), - y1 = i0.Value(y1), - x2 = i0.Value(x2), - y2 = i0.Value(y2), - x3 = i0.Value(x3), - y3 = i0.Value(y3), - x4 = i0.Value(x4), - y4 = i0.Value(y4), - boxScore = i0.Value(boxScore), - textScore = i0.Value(textScore), - recognizedText = i0.Value(recognizedText); - static i0.Insertable custom({ - i0.Expression? id, - i0.Expression? assetId, - i0.Expression? x1, - i0.Expression? y1, - i0.Expression? x2, - i0.Expression? y2, - i0.Expression? x3, - i0.Expression? y3, - i0.Expression? x4, - i0.Expression? y4, - i0.Expression? boxScore, - i0.Expression? textScore, - i0.Expression? recognizedText, - i0.Expression? isVisible, - }) { - return i0.RawValuesInsertable({ - if (id != null) 'id': id, - if (assetId != null) 'asset_id': assetId, - if (x1 != null) 'x1': x1, - if (y1 != null) 'y1': y1, - if (x2 != null) 'x2': x2, - if (y2 != null) 'y2': y2, - if (x3 != null) 'x3': x3, - if (y3 != null) 'y3': y3, - if (x4 != null) 'x4': x4, - if (y4 != null) 'y4': y4, - if (boxScore != null) 'box_score': boxScore, - if (textScore != null) 'text_score': textScore, - if (recognizedText != null) 'recognized_text': recognizedText, - if (isVisible != null) 'is_visible': isVisible, - }); - } - - i1.AssetOcrEntityCompanion copyWith({ - i0.Value? id, - i0.Value? assetId, - i0.Value? x1, - i0.Value? y1, - i0.Value? x2, - i0.Value? y2, - i0.Value? x3, - i0.Value? y3, - i0.Value? x4, - i0.Value? y4, - i0.Value? boxScore, - i0.Value? textScore, - i0.Value? recognizedText, - i0.Value? isVisible, - }) { - return i1.AssetOcrEntityCompanion( - id: id ?? this.id, - assetId: assetId ?? this.assetId, - x1: x1 ?? this.x1, - y1: y1 ?? this.y1, - x2: x2 ?? this.x2, - y2: y2 ?? this.y2, - x3: x3 ?? this.x3, - y3: y3 ?? this.y3, - x4: x4 ?? this.x4, - y4: y4 ?? this.y4, - boxScore: boxScore ?? this.boxScore, - textScore: textScore ?? this.textScore, - recognizedText: recognizedText ?? this.recognizedText, - isVisible: isVisible ?? this.isVisible, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = i0.Variable(id.value); - } - if (assetId.present) { - map['asset_id'] = i0.Variable(assetId.value); - } - if (x1.present) { - map['x1'] = i0.Variable(x1.value); - } - if (y1.present) { - map['y1'] = i0.Variable(y1.value); - } - if (x2.present) { - map['x2'] = i0.Variable(x2.value); - } - if (y2.present) { - map['y2'] = i0.Variable(y2.value); - } - if (x3.present) { - map['x3'] = i0.Variable(x3.value); - } - if (y3.present) { - map['y3'] = i0.Variable(y3.value); - } - if (x4.present) { - map['x4'] = i0.Variable(x4.value); - } - if (y4.present) { - map['y4'] = i0.Variable(y4.value); - } - if (boxScore.present) { - map['box_score'] = i0.Variable(boxScore.value); - } - if (textScore.present) { - map['text_score'] = i0.Variable(textScore.value); - } - if (recognizedText.present) { - map['recognized_text'] = i0.Variable(recognizedText.value); - } - if (isVisible.present) { - map['is_visible'] = i0.Variable(isVisible.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('AssetOcrEntityCompanion(') - ..write('id: $id, ') - ..write('assetId: $assetId, ') - ..write('x1: $x1, ') - ..write('y1: $y1, ') - ..write('x2: $x2, ') - ..write('y2: $y2, ') - ..write('x3: $x3, ') - ..write('y3: $y3, ') - ..write('x4: $x4, ') - ..write('y4: $y4, ') - ..write('boxScore: $boxScore, ') - ..write('textScore: $textScore, ') - ..write('recognizedText: $recognizedText, ') - ..write('isVisible: $isVisible') - ..write(')')) - .toString(); - } -} diff --git a/mobile/lib/infrastructure/entities/auth_user.entity.drift.dart b/mobile/lib/infrastructure/entities/auth_user.entity.drift.dart deleted file mode 100644 index 4dba1c42fb..0000000000 --- a/mobile/lib/infrastructure/entities/auth_user.entity.drift.dart +++ /dev/null @@ -1,933 +0,0 @@ -// dart format width=80 -// ignore_for_file: type=lint -import 'package:drift/drift.dart' as i0; -import 'package:immich_mobile/infrastructure/entities/auth_user.entity.drift.dart' - as i1; -import 'package:immich_mobile/domain/models/user.model.dart' as i2; -import 'package:immich_mobile/infrastructure/entities/auth_user.entity.dart' - as i3; -import 'package:drift/src/runtime/query_builder/query_builder.dart' as i4; - -typedef $$AuthUserEntityTableCreateCompanionBuilder = - i1.AuthUserEntityCompanion Function({ - required String id, - required String name, - required String email, - i0.Value isAdmin, - i0.Value hasProfileImage, - i0.Value profileChangedAt, - required i2.AvatarColor avatarColor, - i0.Value quotaSizeInBytes, - i0.Value quotaUsageInBytes, - i0.Value pinCode, - }); -typedef $$AuthUserEntityTableUpdateCompanionBuilder = - i1.AuthUserEntityCompanion Function({ - i0.Value id, - i0.Value name, - i0.Value email, - i0.Value isAdmin, - i0.Value hasProfileImage, - i0.Value profileChangedAt, - i0.Value avatarColor, - i0.Value quotaSizeInBytes, - i0.Value quotaUsageInBytes, - i0.Value pinCode, - }); - -class $$AuthUserEntityTableFilterComposer - extends i0.Composer { - $$AuthUserEntityTableFilterComposer({ - required super.$db, - required super.$table, - super.joinBuilder, - super.$addJoinBuilderToRootComposer, - super.$removeJoinBuilderFromRootComposer, - }); - i0.ColumnFilters get id => $composableBuilder( - column: $table.id, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnFilters get name => $composableBuilder( - column: $table.name, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnFilters get email => $composableBuilder( - column: $table.email, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnFilters get isAdmin => $composableBuilder( - column: $table.isAdmin, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnFilters get hasProfileImage => $composableBuilder( - column: $table.hasProfileImage, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnFilters get profileChangedAt => $composableBuilder( - column: $table.profileChangedAt, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnWithTypeConverterFilters - get avatarColor => $composableBuilder( - column: $table.avatarColor, - builder: (column) => i0.ColumnWithTypeConverterFilters(column), - ); - - i0.ColumnFilters get quotaSizeInBytes => $composableBuilder( - column: $table.quotaSizeInBytes, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnFilters get quotaUsageInBytes => $composableBuilder( - column: $table.quotaUsageInBytes, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnFilters get pinCode => $composableBuilder( - column: $table.pinCode, - builder: (column) => i0.ColumnFilters(column), - ); -} - -class $$AuthUserEntityTableOrderingComposer - extends i0.Composer { - $$AuthUserEntityTableOrderingComposer({ - required super.$db, - required super.$table, - super.joinBuilder, - super.$addJoinBuilderToRootComposer, - super.$removeJoinBuilderFromRootComposer, - }); - i0.ColumnOrderings get id => $composableBuilder( - column: $table.id, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get name => $composableBuilder( - column: $table.name, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get email => $composableBuilder( - column: $table.email, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get isAdmin => $composableBuilder( - column: $table.isAdmin, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get hasProfileImage => $composableBuilder( - column: $table.hasProfileImage, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get profileChangedAt => $composableBuilder( - column: $table.profileChangedAt, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get avatarColor => $composableBuilder( - column: $table.avatarColor, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get quotaSizeInBytes => $composableBuilder( - column: $table.quotaSizeInBytes, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get quotaUsageInBytes => $composableBuilder( - column: $table.quotaUsageInBytes, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get pinCode => $composableBuilder( - column: $table.pinCode, - builder: (column) => i0.ColumnOrderings(column), - ); -} - -class $$AuthUserEntityTableAnnotationComposer - extends i0.Composer { - $$AuthUserEntityTableAnnotationComposer({ - required super.$db, - required super.$table, - super.joinBuilder, - super.$addJoinBuilderToRootComposer, - super.$removeJoinBuilderFromRootComposer, - }); - i0.GeneratedColumn get id => - $composableBuilder(column: $table.id, builder: (column) => column); - - i0.GeneratedColumn get name => - $composableBuilder(column: $table.name, builder: (column) => column); - - i0.GeneratedColumn get email => - $composableBuilder(column: $table.email, builder: (column) => column); - - i0.GeneratedColumn get isAdmin => - $composableBuilder(column: $table.isAdmin, builder: (column) => column); - - i0.GeneratedColumn get hasProfileImage => $composableBuilder( - column: $table.hasProfileImage, - builder: (column) => column, - ); - - i0.GeneratedColumn get profileChangedAt => $composableBuilder( - column: $table.profileChangedAt, - builder: (column) => column, - ); - - i0.GeneratedColumnWithTypeConverter get avatarColor => - $composableBuilder( - column: $table.avatarColor, - builder: (column) => column, - ); - - i0.GeneratedColumn get quotaSizeInBytes => $composableBuilder( - column: $table.quotaSizeInBytes, - builder: (column) => column, - ); - - i0.GeneratedColumn get quotaUsageInBytes => $composableBuilder( - column: $table.quotaUsageInBytes, - builder: (column) => column, - ); - - i0.GeneratedColumn get pinCode => - $composableBuilder(column: $table.pinCode, builder: (column) => column); -} - -class $$AuthUserEntityTableTableManager - extends - i0.RootTableManager< - i0.GeneratedDatabase, - i1.$AuthUserEntityTable, - i1.AuthUserEntityData, - i1.$$AuthUserEntityTableFilterComposer, - i1.$$AuthUserEntityTableOrderingComposer, - i1.$$AuthUserEntityTableAnnotationComposer, - $$AuthUserEntityTableCreateCompanionBuilder, - $$AuthUserEntityTableUpdateCompanionBuilder, - ( - i1.AuthUserEntityData, - i0.BaseReferences< - i0.GeneratedDatabase, - i1.$AuthUserEntityTable, - i1.AuthUserEntityData - >, - ), - i1.AuthUserEntityData, - i0.PrefetchHooks Function() - > { - $$AuthUserEntityTableTableManager( - i0.GeneratedDatabase db, - i1.$AuthUserEntityTable table, - ) : super( - i0.TableManagerState( - db: db, - table: table, - createFilteringComposer: () => - i1.$$AuthUserEntityTableFilterComposer($db: db, $table: table), - createOrderingComposer: () => - i1.$$AuthUserEntityTableOrderingComposer($db: db, $table: table), - createComputedFieldComposer: () => i1 - .$$AuthUserEntityTableAnnotationComposer($db: db, $table: table), - updateCompanionCallback: - ({ - i0.Value id = const i0.Value.absent(), - i0.Value name = const i0.Value.absent(), - i0.Value email = const i0.Value.absent(), - i0.Value isAdmin = const i0.Value.absent(), - i0.Value hasProfileImage = const i0.Value.absent(), - i0.Value profileChangedAt = const i0.Value.absent(), - i0.Value avatarColor = const i0.Value.absent(), - i0.Value quotaSizeInBytes = const i0.Value.absent(), - i0.Value quotaUsageInBytes = const i0.Value.absent(), - i0.Value pinCode = const i0.Value.absent(), - }) => i1.AuthUserEntityCompanion( - id: id, - name: name, - email: email, - isAdmin: isAdmin, - hasProfileImage: hasProfileImage, - profileChangedAt: profileChangedAt, - avatarColor: avatarColor, - quotaSizeInBytes: quotaSizeInBytes, - quotaUsageInBytes: quotaUsageInBytes, - pinCode: pinCode, - ), - createCompanionCallback: - ({ - required String id, - required String name, - required String email, - i0.Value isAdmin = const i0.Value.absent(), - i0.Value hasProfileImage = const i0.Value.absent(), - i0.Value profileChangedAt = const i0.Value.absent(), - required i2.AvatarColor avatarColor, - i0.Value quotaSizeInBytes = const i0.Value.absent(), - i0.Value quotaUsageInBytes = const i0.Value.absent(), - i0.Value pinCode = const i0.Value.absent(), - }) => i1.AuthUserEntityCompanion.insert( - id: id, - name: name, - email: email, - isAdmin: isAdmin, - hasProfileImage: hasProfileImage, - profileChangedAt: profileChangedAt, - avatarColor: avatarColor, - quotaSizeInBytes: quotaSizeInBytes, - quotaUsageInBytes: quotaUsageInBytes, - pinCode: pinCode, - ), - withReferenceMapper: (p0) => p0 - .map((e) => (e.readTable(table), i0.BaseReferences(db, table, e))) - .toList(), - prefetchHooksCallback: null, - ), - ); -} - -typedef $$AuthUserEntityTableProcessedTableManager = - i0.ProcessedTableManager< - i0.GeneratedDatabase, - i1.$AuthUserEntityTable, - i1.AuthUserEntityData, - i1.$$AuthUserEntityTableFilterComposer, - i1.$$AuthUserEntityTableOrderingComposer, - i1.$$AuthUserEntityTableAnnotationComposer, - $$AuthUserEntityTableCreateCompanionBuilder, - $$AuthUserEntityTableUpdateCompanionBuilder, - ( - i1.AuthUserEntityData, - i0.BaseReferences< - i0.GeneratedDatabase, - i1.$AuthUserEntityTable, - i1.AuthUserEntityData - >, - ), - i1.AuthUserEntityData, - i0.PrefetchHooks Function() - >; - -class $AuthUserEntityTable extends i3.AuthUserEntity - with i0.TableInfo<$AuthUserEntityTable, i1.AuthUserEntityData> { - @override - final i0.GeneratedDatabase attachedDatabase; - final String? _alias; - $AuthUserEntityTable(this.attachedDatabase, [this._alias]); - 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 _nameMeta = const i0.VerificationMeta( - 'name', - ); - @override - late final i0.GeneratedColumn name = i0.GeneratedColumn( - 'name', - aliasedName, - false, - type: i0.DriftSqlType.string, - requiredDuringInsert: true, - ); - static const i0.VerificationMeta _emailMeta = const i0.VerificationMeta( - 'email', - ); - @override - late final i0.GeneratedColumn email = i0.GeneratedColumn( - 'email', - aliasedName, - false, - type: i0.DriftSqlType.string, - requiredDuringInsert: true, - ); - static const i0.VerificationMeta _isAdminMeta = const i0.VerificationMeta( - 'isAdmin', - ); - @override - late final i0.GeneratedColumn isAdmin = i0.GeneratedColumn( - 'is_admin', - aliasedName, - false, - type: i0.DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: i0.GeneratedColumn.constraintIsAlways( - 'CHECK ("is_admin" IN (0, 1))', - ), - defaultValue: const i4.Constant(false), - ); - static const i0.VerificationMeta _hasProfileImageMeta = - const i0.VerificationMeta('hasProfileImage'); - @override - late final i0.GeneratedColumn hasProfileImage = - i0.GeneratedColumn( - 'has_profile_image', - aliasedName, - false, - type: i0.DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: i0.GeneratedColumn.constraintIsAlways( - 'CHECK ("has_profile_image" IN (0, 1))', - ), - defaultValue: const i4.Constant(false), - ); - static const i0.VerificationMeta _profileChangedAtMeta = - const i0.VerificationMeta('profileChangedAt'); - @override - late final i0.GeneratedColumn profileChangedAt = - i0.GeneratedColumn( - 'profile_changed_at', - aliasedName, - false, - type: i0.DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: i4.currentDateAndTime, - ); - @override - late final i0.GeneratedColumnWithTypeConverter - avatarColor = - i0.GeneratedColumn( - 'avatar_color', - aliasedName, - false, - type: i0.DriftSqlType.int, - requiredDuringInsert: true, - ).withConverter( - i1.$AuthUserEntityTable.$converteravatarColor, - ); - static const i0.VerificationMeta _quotaSizeInBytesMeta = - const i0.VerificationMeta('quotaSizeInBytes'); - @override - late final i0.GeneratedColumn quotaSizeInBytes = i0.GeneratedColumn( - 'quota_size_in_bytes', - aliasedName, - false, - type: i0.DriftSqlType.int, - requiredDuringInsert: false, - defaultValue: const i4.Constant(0), - ); - static const i0.VerificationMeta _quotaUsageInBytesMeta = - const i0.VerificationMeta('quotaUsageInBytes'); - @override - late final i0.GeneratedColumn quotaUsageInBytes = - i0.GeneratedColumn( - 'quota_usage_in_bytes', - aliasedName, - false, - type: i0.DriftSqlType.int, - requiredDuringInsert: false, - defaultValue: const i4.Constant(0), - ); - static const i0.VerificationMeta _pinCodeMeta = const i0.VerificationMeta( - 'pinCode', - ); - @override - late final i0.GeneratedColumn pinCode = i0.GeneratedColumn( - 'pin_code', - aliasedName, - true, - type: i0.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 - i0.VerificationContext validateIntegrity( - i0.Insertable instance, { - bool isInserting = false, - }) { - final context = i0.VerificationContext(); - final data = instance.toColumns(true); - if (data.containsKey('id')) { - context.handle(_idMeta, id.isAcceptableOrUnknown(data['id']!, _idMeta)); - } else if (isInserting) { - context.missing(_idMeta); - } - if (data.containsKey('name')) { - context.handle( - _nameMeta, - name.isAcceptableOrUnknown(data['name']!, _nameMeta), - ); - } else if (isInserting) { - context.missing(_nameMeta); - } - if (data.containsKey('email')) { - context.handle( - _emailMeta, - email.isAcceptableOrUnknown(data['email']!, _emailMeta), - ); - } else if (isInserting) { - context.missing(_emailMeta); - } - if (data.containsKey('is_admin')) { - context.handle( - _isAdminMeta, - isAdmin.isAcceptableOrUnknown(data['is_admin']!, _isAdminMeta), - ); - } - if (data.containsKey('has_profile_image')) { - context.handle( - _hasProfileImageMeta, - hasProfileImage.isAcceptableOrUnknown( - data['has_profile_image']!, - _hasProfileImageMeta, - ), - ); - } - if (data.containsKey('profile_changed_at')) { - context.handle( - _profileChangedAtMeta, - profileChangedAt.isAcceptableOrUnknown( - data['profile_changed_at']!, - _profileChangedAtMeta, - ), - ); - } - if (data.containsKey('quota_size_in_bytes')) { - context.handle( - _quotaSizeInBytesMeta, - quotaSizeInBytes.isAcceptableOrUnknown( - data['quota_size_in_bytes']!, - _quotaSizeInBytesMeta, - ), - ); - } - if (data.containsKey('quota_usage_in_bytes')) { - context.handle( - _quotaUsageInBytesMeta, - quotaUsageInBytes.isAcceptableOrUnknown( - data['quota_usage_in_bytes']!, - _quotaUsageInBytesMeta, - ), - ); - } - if (data.containsKey('pin_code')) { - context.handle( - _pinCodeMeta, - pinCode.isAcceptableOrUnknown(data['pin_code']!, _pinCodeMeta), - ); - } - return context; - } - - @override - Set get $primaryKey => {id}; - @override - i1.AuthUserEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return i1.AuthUserEntityData( - id: attachedDatabase.typeMapping.read( - i0.DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - name: attachedDatabase.typeMapping.read( - i0.DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - email: attachedDatabase.typeMapping.read( - i0.DriftSqlType.string, - data['${effectivePrefix}email'], - )!, - isAdmin: attachedDatabase.typeMapping.read( - i0.DriftSqlType.bool, - data['${effectivePrefix}is_admin'], - )!, - hasProfileImage: attachedDatabase.typeMapping.read( - i0.DriftSqlType.bool, - data['${effectivePrefix}has_profile_image'], - )!, - profileChangedAt: attachedDatabase.typeMapping.read( - i0.DriftSqlType.dateTime, - data['${effectivePrefix}profile_changed_at'], - )!, - avatarColor: i1.$AuthUserEntityTable.$converteravatarColor.fromSql( - attachedDatabase.typeMapping.read( - i0.DriftSqlType.int, - data['${effectivePrefix}avatar_color'], - )!, - ), - quotaSizeInBytes: attachedDatabase.typeMapping.read( - i0.DriftSqlType.int, - data['${effectivePrefix}quota_size_in_bytes'], - )!, - quotaUsageInBytes: attachedDatabase.typeMapping.read( - i0.DriftSqlType.int, - data['${effectivePrefix}quota_usage_in_bytes'], - )!, - pinCode: attachedDatabase.typeMapping.read( - i0.DriftSqlType.string, - data['${effectivePrefix}pin_code'], - ), - ); - } - - @override - $AuthUserEntityTable createAlias(String alias) { - return $AuthUserEntityTable(attachedDatabase, alias); - } - - static i0.JsonTypeConverter2 $converteravatarColor = - const i0.EnumIndexConverter(i2.AvatarColor.values); - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class AuthUserEntityData extends i0.DataClass - implements i0.Insertable { - final String id; - final String name; - final String email; - final bool isAdmin; - final bool hasProfileImage; - final DateTime profileChangedAt; - final i2.AvatarColor 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'] = i0.Variable(id); - map['name'] = i0.Variable(name); - map['email'] = i0.Variable(email); - map['is_admin'] = i0.Variable(isAdmin); - map['has_profile_image'] = i0.Variable(hasProfileImage); - map['profile_changed_at'] = i0.Variable(profileChangedAt); - { - map['avatar_color'] = i0.Variable( - i1.$AuthUserEntityTable.$converteravatarColor.toSql(avatarColor), - ); - } - map['quota_size_in_bytes'] = i0.Variable(quotaSizeInBytes); - map['quota_usage_in_bytes'] = i0.Variable(quotaUsageInBytes); - if (!nullToAbsent || pinCode != null) { - map['pin_code'] = i0.Variable(pinCode); - } - return map; - } - - factory AuthUserEntityData.fromJson( - Map json, { - i0.ValueSerializer? serializer, - }) { - serializer ??= i0.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: i1.$AuthUserEntityTable.$converteravatarColor.fromJson( - serializer.fromJson(json['avatarColor']), - ), - quotaSizeInBytes: serializer.fromJson(json['quotaSizeInBytes']), - quotaUsageInBytes: serializer.fromJson(json['quotaUsageInBytes']), - pinCode: serializer.fromJson(json['pinCode']), - ); - } - @override - Map toJson({i0.ValueSerializer? serializer}) { - serializer ??= i0.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( - i1.$AuthUserEntityTable.$converteravatarColor.toJson(avatarColor), - ), - 'quotaSizeInBytes': serializer.toJson(quotaSizeInBytes), - 'quotaUsageInBytes': serializer.toJson(quotaUsageInBytes), - 'pinCode': serializer.toJson(pinCode), - }; - } - - i1.AuthUserEntityData copyWith({ - String? id, - String? name, - String? email, - bool? isAdmin, - bool? hasProfileImage, - DateTime? profileChangedAt, - i2.AvatarColor? avatarColor, - int? quotaSizeInBytes, - int? quotaUsageInBytes, - i0.Value pinCode = const i0.Value.absent(), - }) => i1.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(i1.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 i1.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 i0.UpdateCompanion { - final i0.Value id; - final i0.Value name; - final i0.Value email; - final i0.Value isAdmin; - final i0.Value hasProfileImage; - final i0.Value profileChangedAt; - final i0.Value avatarColor; - final i0.Value quotaSizeInBytes; - final i0.Value quotaUsageInBytes; - final i0.Value pinCode; - const AuthUserEntityCompanion({ - this.id = const i0.Value.absent(), - this.name = const i0.Value.absent(), - this.email = const i0.Value.absent(), - this.isAdmin = const i0.Value.absent(), - this.hasProfileImage = const i0.Value.absent(), - this.profileChangedAt = const i0.Value.absent(), - this.avatarColor = const i0.Value.absent(), - this.quotaSizeInBytes = const i0.Value.absent(), - this.quotaUsageInBytes = const i0.Value.absent(), - this.pinCode = const i0.Value.absent(), - }); - AuthUserEntityCompanion.insert({ - required String id, - required String name, - required String email, - this.isAdmin = const i0.Value.absent(), - this.hasProfileImage = const i0.Value.absent(), - this.profileChangedAt = const i0.Value.absent(), - required i2.AvatarColor avatarColor, - this.quotaSizeInBytes = const i0.Value.absent(), - this.quotaUsageInBytes = const i0.Value.absent(), - this.pinCode = const i0.Value.absent(), - }) : id = i0.Value(id), - name = i0.Value(name), - email = i0.Value(email), - avatarColor = i0.Value(avatarColor); - static i0.Insertable custom({ - i0.Expression? id, - i0.Expression? name, - i0.Expression? email, - i0.Expression? isAdmin, - i0.Expression? hasProfileImage, - i0.Expression? profileChangedAt, - i0.Expression? avatarColor, - i0.Expression? quotaSizeInBytes, - i0.Expression? quotaUsageInBytes, - i0.Expression? pinCode, - }) { - return i0.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, - }); - } - - i1.AuthUserEntityCompanion copyWith({ - i0.Value? id, - i0.Value? name, - i0.Value? email, - i0.Value? isAdmin, - i0.Value? hasProfileImage, - i0.Value? profileChangedAt, - i0.Value? avatarColor, - i0.Value? quotaSizeInBytes, - i0.Value? quotaUsageInBytes, - i0.Value? pinCode, - }) { - return i1.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'] = i0.Variable(id.value); - } - if (name.present) { - map['name'] = i0.Variable(name.value); - } - if (email.present) { - map['email'] = i0.Variable(email.value); - } - if (isAdmin.present) { - map['is_admin'] = i0.Variable(isAdmin.value); - } - if (hasProfileImage.present) { - map['has_profile_image'] = i0.Variable(hasProfileImage.value); - } - if (profileChangedAt.present) { - map['profile_changed_at'] = i0.Variable(profileChangedAt.value); - } - if (avatarColor.present) { - map['avatar_color'] = i0.Variable( - i1.$AuthUserEntityTable.$converteravatarColor.toSql(avatarColor.value), - ); - } - if (quotaSizeInBytes.present) { - map['quota_size_in_bytes'] = i0.Variable(quotaSizeInBytes.value); - } - if (quotaUsageInBytes.present) { - map['quota_usage_in_bytes'] = i0.Variable(quotaUsageInBytes.value); - } - if (pinCode.present) { - map['pin_code'] = i0.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(); - } -} diff --git a/mobile/lib/infrastructure/entities/exif.entity.dart b/mobile/lib/infrastructure/entities/exif.entity.dart index 120fbd0c68..3328b38f31 100644 --- a/mobile/lib/infrastructure/entities/exif.entity.dart +++ b/mobile/lib/infrastructure/entities/exif.entity.dart @@ -79,8 +79,8 @@ extension RemoteExifEntityDataDomainEx on RemoteExifEntityData { orientation: orientation, latitude: latitude, longitude: longitude, - f: fNumber?.toDouble(), - mm: focalLength?.toDouble(), + f: fNumber, + mm: focalLength, lens: lens, isFlipped: ExifDtoConverter.isOrientationFlipped(orientation), exposureSeconds: ExifDtoConverter.exposureTimeToSeconds(exposureTime), diff --git a/mobile/lib/infrastructure/entities/exif.entity.drift.dart b/mobile/lib/infrastructure/entities/exif.entity.drift.dart deleted file mode 100644 index cbe31f5bb4..0000000000 --- a/mobile/lib/infrastructure/entities/exif.entity.drift.dart +++ /dev/null @@ -1,1890 +0,0 @@ -// dart format width=80 -// ignore_for_file: type=lint -import 'package:drift/drift.dart' as i0; -import 'package:immich_mobile/infrastructure/entities/exif.entity.drift.dart' - as i1; -import 'package:immich_mobile/infrastructure/entities/exif.entity.dart' as i2; -import 'package:immich_mobile/infrastructure/entities/remote_asset.entity.drift.dart' - as i3; -import 'package:drift/internal/modular.dart' as i4; - -typedef $$RemoteExifEntityTableCreateCompanionBuilder = - i1.RemoteExifEntityCompanion Function({ - required String assetId, - i0.Value city, - i0.Value state, - i0.Value country, - i0.Value dateTimeOriginal, - i0.Value description, - i0.Value height, - i0.Value width, - i0.Value exposureTime, - i0.Value fNumber, - i0.Value fileSize, - i0.Value focalLength, - i0.Value latitude, - i0.Value longitude, - i0.Value iso, - i0.Value make, - i0.Value model, - i0.Value lens, - i0.Value orientation, - i0.Value timeZone, - i0.Value rating, - i0.Value projectionType, - }); -typedef $$RemoteExifEntityTableUpdateCompanionBuilder = - i1.RemoteExifEntityCompanion Function({ - i0.Value assetId, - i0.Value city, - i0.Value state, - i0.Value country, - i0.Value dateTimeOriginal, - i0.Value description, - i0.Value height, - i0.Value width, - i0.Value exposureTime, - i0.Value fNumber, - i0.Value fileSize, - i0.Value focalLength, - i0.Value latitude, - i0.Value longitude, - i0.Value iso, - i0.Value make, - i0.Value model, - i0.Value lens, - i0.Value orientation, - i0.Value timeZone, - i0.Value rating, - i0.Value projectionType, - }); - -final class $$RemoteExifEntityTableReferences - extends - i0.BaseReferences< - i0.GeneratedDatabase, - i1.$RemoteExifEntityTable, - i1.RemoteExifEntityData - > { - $$RemoteExifEntityTableReferences( - super.$_db, - super.$_table, - super.$_typedResult, - ); - - static i3.$RemoteAssetEntityTable _assetIdTable(i0.GeneratedDatabase db) => - i4.ReadDatabaseContainer(db) - .resultSet('remote_asset_entity') - .createAlias( - i0.$_aliasNameGenerator( - i4.ReadDatabaseContainer(db) - .resultSet('remote_exif_entity') - .assetId, - i4.ReadDatabaseContainer( - db, - ).resultSet('remote_asset_entity').id, - ), - ); - - i3.$$RemoteAssetEntityTableProcessedTableManager get assetId { - final $_column = $_itemColumn('asset_id')!; - - final manager = i3 - .$$RemoteAssetEntityTableTableManager( - $_db, - i4.ReadDatabaseContainer( - $_db, - ).resultSet('remote_asset_entity'), - ) - .filter((f) => f.id.sqlEquals($_column)); - final item = $_typedResult.readTableOrNull(_assetIdTable($_db)); - if (item == null) return manager; - return i0.ProcessedTableManager( - manager.$state.copyWith(prefetchedData: [item]), - ); - } -} - -class $$RemoteExifEntityTableFilterComposer - extends i0.Composer { - $$RemoteExifEntityTableFilterComposer({ - required super.$db, - required super.$table, - super.joinBuilder, - super.$addJoinBuilderToRootComposer, - super.$removeJoinBuilderFromRootComposer, - }); - i0.ColumnFilters get city => $composableBuilder( - column: $table.city, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnFilters get state => $composableBuilder( - column: $table.state, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnFilters get country => $composableBuilder( - column: $table.country, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnFilters get dateTimeOriginal => $composableBuilder( - column: $table.dateTimeOriginal, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnFilters get description => $composableBuilder( - column: $table.description, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnFilters get height => $composableBuilder( - column: $table.height, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnFilters get width => $composableBuilder( - column: $table.width, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnFilters get exposureTime => $composableBuilder( - column: $table.exposureTime, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnFilters get fNumber => $composableBuilder( - column: $table.fNumber, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnFilters get fileSize => $composableBuilder( - column: $table.fileSize, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnFilters get focalLength => $composableBuilder( - column: $table.focalLength, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnFilters get latitude => $composableBuilder( - column: $table.latitude, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnFilters get longitude => $composableBuilder( - column: $table.longitude, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnFilters get iso => $composableBuilder( - column: $table.iso, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnFilters get make => $composableBuilder( - column: $table.make, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnFilters get model => $composableBuilder( - column: $table.model, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnFilters get lens => $composableBuilder( - column: $table.lens, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnFilters get orientation => $composableBuilder( - column: $table.orientation, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnFilters get timeZone => $composableBuilder( - column: $table.timeZone, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnFilters get rating => $composableBuilder( - column: $table.rating, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnFilters get projectionType => $composableBuilder( - column: $table.projectionType, - builder: (column) => i0.ColumnFilters(column), - ); - - i3.$$RemoteAssetEntityTableFilterComposer get assetId { - final i3.$$RemoteAssetEntityTableFilterComposer composer = $composerBuilder( - composer: this, - getCurrentColumn: (t) => t.assetId, - referencedTable: i4.ReadDatabaseContainer( - $db, - ).resultSet('remote_asset_entity'), - getReferencedColumn: (t) => t.id, - builder: - ( - joinBuilder, { - $addJoinBuilderToRootComposer, - $removeJoinBuilderFromRootComposer, - }) => i3.$$RemoteAssetEntityTableFilterComposer( - $db: $db, - $table: i4.ReadDatabaseContainer( - $db, - ).resultSet('remote_asset_entity'), - $addJoinBuilderToRootComposer: $addJoinBuilderToRootComposer, - joinBuilder: joinBuilder, - $removeJoinBuilderFromRootComposer: - $removeJoinBuilderFromRootComposer, - ), - ); - return composer; - } -} - -class $$RemoteExifEntityTableOrderingComposer - extends i0.Composer { - $$RemoteExifEntityTableOrderingComposer({ - required super.$db, - required super.$table, - super.joinBuilder, - super.$addJoinBuilderToRootComposer, - super.$removeJoinBuilderFromRootComposer, - }); - i0.ColumnOrderings get city => $composableBuilder( - column: $table.city, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get state => $composableBuilder( - column: $table.state, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get country => $composableBuilder( - column: $table.country, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get dateTimeOriginal => $composableBuilder( - column: $table.dateTimeOriginal, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get description => $composableBuilder( - column: $table.description, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get height => $composableBuilder( - column: $table.height, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get width => $composableBuilder( - column: $table.width, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get exposureTime => $composableBuilder( - column: $table.exposureTime, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get fNumber => $composableBuilder( - column: $table.fNumber, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get fileSize => $composableBuilder( - column: $table.fileSize, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get focalLength => $composableBuilder( - column: $table.focalLength, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get latitude => $composableBuilder( - column: $table.latitude, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get longitude => $composableBuilder( - column: $table.longitude, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get iso => $composableBuilder( - column: $table.iso, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get make => $composableBuilder( - column: $table.make, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get model => $composableBuilder( - column: $table.model, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get lens => $composableBuilder( - column: $table.lens, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get orientation => $composableBuilder( - column: $table.orientation, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get timeZone => $composableBuilder( - column: $table.timeZone, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get rating => $composableBuilder( - column: $table.rating, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get projectionType => $composableBuilder( - column: $table.projectionType, - builder: (column) => i0.ColumnOrderings(column), - ); - - i3.$$RemoteAssetEntityTableOrderingComposer get assetId { - final i3.$$RemoteAssetEntityTableOrderingComposer composer = - $composerBuilder( - composer: this, - getCurrentColumn: (t) => t.assetId, - referencedTable: i4.ReadDatabaseContainer( - $db, - ).resultSet('remote_asset_entity'), - getReferencedColumn: (t) => t.id, - builder: - ( - joinBuilder, { - $addJoinBuilderToRootComposer, - $removeJoinBuilderFromRootComposer, - }) => i3.$$RemoteAssetEntityTableOrderingComposer( - $db: $db, - $table: i4.ReadDatabaseContainer( - $db, - ).resultSet('remote_asset_entity'), - $addJoinBuilderToRootComposer: $addJoinBuilderToRootComposer, - joinBuilder: joinBuilder, - $removeJoinBuilderFromRootComposer: - $removeJoinBuilderFromRootComposer, - ), - ); - return composer; - } -} - -class $$RemoteExifEntityTableAnnotationComposer - extends i0.Composer { - $$RemoteExifEntityTableAnnotationComposer({ - required super.$db, - required super.$table, - super.joinBuilder, - super.$addJoinBuilderToRootComposer, - super.$removeJoinBuilderFromRootComposer, - }); - i0.GeneratedColumn get city => - $composableBuilder(column: $table.city, builder: (column) => column); - - i0.GeneratedColumn get state => - $composableBuilder(column: $table.state, builder: (column) => column); - - i0.GeneratedColumn get country => - $composableBuilder(column: $table.country, builder: (column) => column); - - i0.GeneratedColumn get dateTimeOriginal => $composableBuilder( - column: $table.dateTimeOriginal, - builder: (column) => column, - ); - - i0.GeneratedColumn get description => $composableBuilder( - column: $table.description, - builder: (column) => column, - ); - - i0.GeneratedColumn get height => - $composableBuilder(column: $table.height, builder: (column) => column); - - i0.GeneratedColumn get width => - $composableBuilder(column: $table.width, builder: (column) => column); - - i0.GeneratedColumn get exposureTime => $composableBuilder( - column: $table.exposureTime, - builder: (column) => column, - ); - - i0.GeneratedColumn get fNumber => - $composableBuilder(column: $table.fNumber, builder: (column) => column); - - i0.GeneratedColumn get fileSize => - $composableBuilder(column: $table.fileSize, builder: (column) => column); - - i0.GeneratedColumn get focalLength => $composableBuilder( - column: $table.focalLength, - builder: (column) => column, - ); - - i0.GeneratedColumn get latitude => - $composableBuilder(column: $table.latitude, builder: (column) => column); - - i0.GeneratedColumn get longitude => - $composableBuilder(column: $table.longitude, builder: (column) => column); - - i0.GeneratedColumn get iso => - $composableBuilder(column: $table.iso, builder: (column) => column); - - i0.GeneratedColumn get make => - $composableBuilder(column: $table.make, builder: (column) => column); - - i0.GeneratedColumn get model => - $composableBuilder(column: $table.model, builder: (column) => column); - - i0.GeneratedColumn get lens => - $composableBuilder(column: $table.lens, builder: (column) => column); - - i0.GeneratedColumn get orientation => $composableBuilder( - column: $table.orientation, - builder: (column) => column, - ); - - i0.GeneratedColumn get timeZone => - $composableBuilder(column: $table.timeZone, builder: (column) => column); - - i0.GeneratedColumn get rating => - $composableBuilder(column: $table.rating, builder: (column) => column); - - i0.GeneratedColumn get projectionType => $composableBuilder( - column: $table.projectionType, - builder: (column) => column, - ); - - i3.$$RemoteAssetEntityTableAnnotationComposer get assetId { - final i3.$$RemoteAssetEntityTableAnnotationComposer composer = - $composerBuilder( - composer: this, - getCurrentColumn: (t) => t.assetId, - referencedTable: i4.ReadDatabaseContainer( - $db, - ).resultSet('remote_asset_entity'), - getReferencedColumn: (t) => t.id, - builder: - ( - joinBuilder, { - $addJoinBuilderToRootComposer, - $removeJoinBuilderFromRootComposer, - }) => i3.$$RemoteAssetEntityTableAnnotationComposer( - $db: $db, - $table: i4.ReadDatabaseContainer( - $db, - ).resultSet('remote_asset_entity'), - $addJoinBuilderToRootComposer: $addJoinBuilderToRootComposer, - joinBuilder: joinBuilder, - $removeJoinBuilderFromRootComposer: - $removeJoinBuilderFromRootComposer, - ), - ); - return composer; - } -} - -class $$RemoteExifEntityTableTableManager - extends - i0.RootTableManager< - i0.GeneratedDatabase, - i1.$RemoteExifEntityTable, - i1.RemoteExifEntityData, - i1.$$RemoteExifEntityTableFilterComposer, - i1.$$RemoteExifEntityTableOrderingComposer, - i1.$$RemoteExifEntityTableAnnotationComposer, - $$RemoteExifEntityTableCreateCompanionBuilder, - $$RemoteExifEntityTableUpdateCompanionBuilder, - (i1.RemoteExifEntityData, i1.$$RemoteExifEntityTableReferences), - i1.RemoteExifEntityData, - i0.PrefetchHooks Function({bool assetId}) - > { - $$RemoteExifEntityTableTableManager( - i0.GeneratedDatabase db, - i1.$RemoteExifEntityTable table, - ) : super( - i0.TableManagerState( - db: db, - table: table, - createFilteringComposer: () => - i1.$$RemoteExifEntityTableFilterComposer($db: db, $table: table), - createOrderingComposer: () => i1 - .$$RemoteExifEntityTableOrderingComposer($db: db, $table: table), - createComputedFieldComposer: () => - i1.$$RemoteExifEntityTableAnnotationComposer( - $db: db, - $table: table, - ), - updateCompanionCallback: - ({ - i0.Value assetId = const i0.Value.absent(), - i0.Value city = const i0.Value.absent(), - i0.Value state = const i0.Value.absent(), - i0.Value country = const i0.Value.absent(), - i0.Value dateTimeOriginal = const i0.Value.absent(), - i0.Value description = const i0.Value.absent(), - i0.Value height = const i0.Value.absent(), - i0.Value width = const i0.Value.absent(), - i0.Value exposureTime = const i0.Value.absent(), - i0.Value fNumber = const i0.Value.absent(), - i0.Value fileSize = const i0.Value.absent(), - i0.Value focalLength = const i0.Value.absent(), - i0.Value latitude = const i0.Value.absent(), - i0.Value longitude = const i0.Value.absent(), - i0.Value iso = const i0.Value.absent(), - i0.Value make = const i0.Value.absent(), - i0.Value model = const i0.Value.absent(), - i0.Value lens = const i0.Value.absent(), - i0.Value orientation = const i0.Value.absent(), - i0.Value timeZone = const i0.Value.absent(), - i0.Value rating = const i0.Value.absent(), - i0.Value projectionType = const i0.Value.absent(), - }) => i1.RemoteExifEntityCompanion( - assetId: assetId, - city: city, - state: state, - country: country, - dateTimeOriginal: dateTimeOriginal, - description: description, - height: height, - width: width, - exposureTime: exposureTime, - fNumber: fNumber, - fileSize: fileSize, - focalLength: focalLength, - latitude: latitude, - longitude: longitude, - iso: iso, - make: make, - model: model, - lens: lens, - orientation: orientation, - timeZone: timeZone, - rating: rating, - projectionType: projectionType, - ), - createCompanionCallback: - ({ - required String assetId, - i0.Value city = const i0.Value.absent(), - i0.Value state = const i0.Value.absent(), - i0.Value country = const i0.Value.absent(), - i0.Value dateTimeOriginal = const i0.Value.absent(), - i0.Value description = const i0.Value.absent(), - i0.Value height = const i0.Value.absent(), - i0.Value width = const i0.Value.absent(), - i0.Value exposureTime = const i0.Value.absent(), - i0.Value fNumber = const i0.Value.absent(), - i0.Value fileSize = const i0.Value.absent(), - i0.Value focalLength = const i0.Value.absent(), - i0.Value latitude = const i0.Value.absent(), - i0.Value longitude = const i0.Value.absent(), - i0.Value iso = const i0.Value.absent(), - i0.Value make = const i0.Value.absent(), - i0.Value model = const i0.Value.absent(), - i0.Value lens = const i0.Value.absent(), - i0.Value orientation = const i0.Value.absent(), - i0.Value timeZone = const i0.Value.absent(), - i0.Value rating = const i0.Value.absent(), - i0.Value projectionType = const i0.Value.absent(), - }) => i1.RemoteExifEntityCompanion.insert( - assetId: assetId, - city: city, - state: state, - country: country, - dateTimeOriginal: dateTimeOriginal, - description: description, - height: height, - width: width, - exposureTime: exposureTime, - fNumber: fNumber, - fileSize: fileSize, - focalLength: focalLength, - latitude: latitude, - longitude: longitude, - iso: iso, - make: make, - model: model, - lens: lens, - orientation: orientation, - timeZone: timeZone, - rating: rating, - projectionType: projectionType, - ), - withReferenceMapper: (p0) => p0 - .map( - (e) => ( - e.readTable(table), - i1.$$RemoteExifEntityTableReferences(db, table, e), - ), - ) - .toList(), - prefetchHooksCallback: ({assetId = false}) { - return i0.PrefetchHooks( - db: db, - explicitlyWatchedTables: [], - addJoins: - < - T extends i0.TableManagerState< - dynamic, - dynamic, - dynamic, - dynamic, - dynamic, - dynamic, - dynamic, - dynamic, - dynamic, - dynamic, - dynamic - > - >(state) { - if (assetId) { - state = - state.withJoin( - currentTable: table, - currentColumn: table.assetId, - referencedTable: i1 - .$$RemoteExifEntityTableReferences - ._assetIdTable(db), - referencedColumn: i1 - .$$RemoteExifEntityTableReferences - ._assetIdTable(db) - .id, - ) - as T; - } - - return state; - }, - getPrefetchedDataCallback: (items) async { - return []; - }, - ); - }, - ), - ); -} - -typedef $$RemoteExifEntityTableProcessedTableManager = - i0.ProcessedTableManager< - i0.GeneratedDatabase, - i1.$RemoteExifEntityTable, - i1.RemoteExifEntityData, - i1.$$RemoteExifEntityTableFilterComposer, - i1.$$RemoteExifEntityTableOrderingComposer, - i1.$$RemoteExifEntityTableAnnotationComposer, - $$RemoteExifEntityTableCreateCompanionBuilder, - $$RemoteExifEntityTableUpdateCompanionBuilder, - (i1.RemoteExifEntityData, i1.$$RemoteExifEntityTableReferences), - i1.RemoteExifEntityData, - i0.PrefetchHooks Function({bool assetId}) - >; -i0.Index get idxLatLng => i0.Index( - 'idx_lat_lng', - 'CREATE INDEX IF NOT EXISTS idx_lat_lng ON remote_exif_entity (latitude, longitude)', -); - -class $RemoteExifEntityTable extends i2.RemoteExifEntity - with i0.TableInfo<$RemoteExifEntityTable, i1.RemoteExifEntityData> { - @override - final i0.GeneratedDatabase attachedDatabase; - final String? _alias; - $RemoteExifEntityTable(this.attachedDatabase, [this._alias]); - static const i0.VerificationMeta _assetIdMeta = const i0.VerificationMeta( - 'assetId', - ); - @override - late final i0.GeneratedColumn assetId = i0.GeneratedColumn( - 'asset_id', - aliasedName, - false, - type: i0.DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: i0.GeneratedColumn.constraintIsAlways( - 'REFERENCES remote_asset_entity (id) ON DELETE CASCADE', - ), - ); - static const i0.VerificationMeta _cityMeta = const i0.VerificationMeta( - 'city', - ); - @override - late final i0.GeneratedColumn city = i0.GeneratedColumn( - 'city', - aliasedName, - true, - type: i0.DriftSqlType.string, - requiredDuringInsert: false, - ); - static const i0.VerificationMeta _stateMeta = const i0.VerificationMeta( - 'state', - ); - @override - late final i0.GeneratedColumn state = i0.GeneratedColumn( - 'state', - aliasedName, - true, - type: i0.DriftSqlType.string, - requiredDuringInsert: false, - ); - static const i0.VerificationMeta _countryMeta = const i0.VerificationMeta( - 'country', - ); - @override - late final i0.GeneratedColumn country = i0.GeneratedColumn( - 'country', - aliasedName, - true, - type: i0.DriftSqlType.string, - requiredDuringInsert: false, - ); - static const i0.VerificationMeta _dateTimeOriginalMeta = - const i0.VerificationMeta('dateTimeOriginal'); - @override - late final i0.GeneratedColumn dateTimeOriginal = - i0.GeneratedColumn( - 'date_time_original', - aliasedName, - true, - type: i0.DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - static const i0.VerificationMeta _descriptionMeta = const i0.VerificationMeta( - 'description', - ); - @override - late final i0.GeneratedColumn description = - i0.GeneratedColumn( - 'description', - aliasedName, - true, - type: i0.DriftSqlType.string, - 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 _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 _exposureTimeMeta = - const i0.VerificationMeta('exposureTime'); - @override - late final i0.GeneratedColumn exposureTime = - i0.GeneratedColumn( - 'exposure_time', - aliasedName, - true, - type: i0.DriftSqlType.string, - requiredDuringInsert: false, - ); - static const i0.VerificationMeta _fNumberMeta = const i0.VerificationMeta( - 'fNumber', - ); - @override - late final i0.GeneratedColumn fNumber = i0.GeneratedColumn( - 'f_number', - aliasedName, - true, - type: i0.DriftSqlType.double, - requiredDuringInsert: false, - ); - static const i0.VerificationMeta _fileSizeMeta = const i0.VerificationMeta( - 'fileSize', - ); - @override - late final i0.GeneratedColumn fileSize = i0.GeneratedColumn( - 'file_size', - aliasedName, - true, - type: i0.DriftSqlType.int, - requiredDuringInsert: false, - ); - static const i0.VerificationMeta _focalLengthMeta = const i0.VerificationMeta( - 'focalLength', - ); - @override - late final i0.GeneratedColumn focalLength = - i0.GeneratedColumn( - 'focal_length', - aliasedName, - true, - type: i0.DriftSqlType.double, - requiredDuringInsert: false, - ); - static const i0.VerificationMeta _latitudeMeta = const i0.VerificationMeta( - 'latitude', - ); - @override - late final i0.GeneratedColumn latitude = i0.GeneratedColumn( - 'latitude', - aliasedName, - true, - type: i0.DriftSqlType.double, - requiredDuringInsert: false, - ); - static const i0.VerificationMeta _longitudeMeta = const i0.VerificationMeta( - 'longitude', - ); - @override - late final i0.GeneratedColumn longitude = i0.GeneratedColumn( - 'longitude', - aliasedName, - true, - type: i0.DriftSqlType.double, - requiredDuringInsert: false, - ); - static const i0.VerificationMeta _isoMeta = const i0.VerificationMeta('iso'); - @override - late final i0.GeneratedColumn iso = i0.GeneratedColumn( - 'iso', - aliasedName, - true, - type: i0.DriftSqlType.int, - requiredDuringInsert: false, - ); - static const i0.VerificationMeta _makeMeta = const i0.VerificationMeta( - 'make', - ); - @override - late final i0.GeneratedColumn make = i0.GeneratedColumn( - 'make', - aliasedName, - true, - type: i0.DriftSqlType.string, - requiredDuringInsert: false, - ); - static const i0.VerificationMeta _modelMeta = const i0.VerificationMeta( - 'model', - ); - @override - late final i0.GeneratedColumn model = i0.GeneratedColumn( - 'model', - aliasedName, - true, - type: i0.DriftSqlType.string, - requiredDuringInsert: false, - ); - static const i0.VerificationMeta _lensMeta = const i0.VerificationMeta( - 'lens', - ); - @override - late final i0.GeneratedColumn lens = i0.GeneratedColumn( - 'lens', - aliasedName, - true, - type: i0.DriftSqlType.string, - requiredDuringInsert: false, - ); - static const i0.VerificationMeta _orientationMeta = const i0.VerificationMeta( - 'orientation', - ); - @override - late final i0.GeneratedColumn orientation = - i0.GeneratedColumn( - 'orientation', - aliasedName, - true, - type: i0.DriftSqlType.string, - requiredDuringInsert: false, - ); - static const i0.VerificationMeta _timeZoneMeta = const i0.VerificationMeta( - 'timeZone', - ); - @override - late final i0.GeneratedColumn timeZone = i0.GeneratedColumn( - 'time_zone', - aliasedName, - true, - type: i0.DriftSqlType.string, - requiredDuringInsert: false, - ); - static const i0.VerificationMeta _ratingMeta = const i0.VerificationMeta( - 'rating', - ); - @override - late final i0.GeneratedColumn rating = i0.GeneratedColumn( - 'rating', - aliasedName, - true, - type: i0.DriftSqlType.int, - requiredDuringInsert: false, - ); - static const i0.VerificationMeta _projectionTypeMeta = - const i0.VerificationMeta('projectionType'); - @override - late final i0.GeneratedColumn projectionType = - i0.GeneratedColumn( - 'projection_type', - aliasedName, - true, - type: i0.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 - i0.VerificationContext validateIntegrity( - i0.Insertable instance, { - bool isInserting = false, - }) { - final context = i0.VerificationContext(); - final data = instance.toColumns(true); - if (data.containsKey('asset_id')) { - context.handle( - _assetIdMeta, - assetId.isAcceptableOrUnknown(data['asset_id']!, _assetIdMeta), - ); - } else if (isInserting) { - context.missing(_assetIdMeta); - } - if (data.containsKey('city')) { - context.handle( - _cityMeta, - city.isAcceptableOrUnknown(data['city']!, _cityMeta), - ); - } - if (data.containsKey('state')) { - context.handle( - _stateMeta, - state.isAcceptableOrUnknown(data['state']!, _stateMeta), - ); - } - if (data.containsKey('country')) { - context.handle( - _countryMeta, - country.isAcceptableOrUnknown(data['country']!, _countryMeta), - ); - } - if (data.containsKey('date_time_original')) { - context.handle( - _dateTimeOriginalMeta, - dateTimeOriginal.isAcceptableOrUnknown( - data['date_time_original']!, - _dateTimeOriginalMeta, - ), - ); - } - if (data.containsKey('description')) { - context.handle( - _descriptionMeta, - description.isAcceptableOrUnknown( - data['description']!, - _descriptionMeta, - ), - ); - } - if (data.containsKey('height')) { - context.handle( - _heightMeta, - height.isAcceptableOrUnknown(data['height']!, _heightMeta), - ); - } - if (data.containsKey('width')) { - context.handle( - _widthMeta, - width.isAcceptableOrUnknown(data['width']!, _widthMeta), - ); - } - if (data.containsKey('exposure_time')) { - context.handle( - _exposureTimeMeta, - exposureTime.isAcceptableOrUnknown( - data['exposure_time']!, - _exposureTimeMeta, - ), - ); - } - if (data.containsKey('f_number')) { - context.handle( - _fNumberMeta, - fNumber.isAcceptableOrUnknown(data['f_number']!, _fNumberMeta), - ); - } - if (data.containsKey('file_size')) { - context.handle( - _fileSizeMeta, - fileSize.isAcceptableOrUnknown(data['file_size']!, _fileSizeMeta), - ); - } - if (data.containsKey('focal_length')) { - context.handle( - _focalLengthMeta, - focalLength.isAcceptableOrUnknown( - data['focal_length']!, - _focalLengthMeta, - ), - ); - } - if (data.containsKey('latitude')) { - context.handle( - _latitudeMeta, - latitude.isAcceptableOrUnknown(data['latitude']!, _latitudeMeta), - ); - } - if (data.containsKey('longitude')) { - context.handle( - _longitudeMeta, - longitude.isAcceptableOrUnknown(data['longitude']!, _longitudeMeta), - ); - } - if (data.containsKey('iso')) { - context.handle( - _isoMeta, - iso.isAcceptableOrUnknown(data['iso']!, _isoMeta), - ); - } - if (data.containsKey('make')) { - context.handle( - _makeMeta, - make.isAcceptableOrUnknown(data['make']!, _makeMeta), - ); - } - if (data.containsKey('model')) { - context.handle( - _modelMeta, - model.isAcceptableOrUnknown(data['model']!, _modelMeta), - ); - } - if (data.containsKey('lens')) { - context.handle( - _lensMeta, - lens.isAcceptableOrUnknown(data['lens']!, _lensMeta), - ); - } - if (data.containsKey('orientation')) { - context.handle( - _orientationMeta, - orientation.isAcceptableOrUnknown( - data['orientation']!, - _orientationMeta, - ), - ); - } - if (data.containsKey('time_zone')) { - context.handle( - _timeZoneMeta, - timeZone.isAcceptableOrUnknown(data['time_zone']!, _timeZoneMeta), - ); - } - if (data.containsKey('rating')) { - context.handle( - _ratingMeta, - rating.isAcceptableOrUnknown(data['rating']!, _ratingMeta), - ); - } - if (data.containsKey('projection_type')) { - context.handle( - _projectionTypeMeta, - projectionType.isAcceptableOrUnknown( - data['projection_type']!, - _projectionTypeMeta, - ), - ); - } - return context; - } - - @override - Set get $primaryKey => {assetId}; - @override - i1.RemoteExifEntityData map( - Map data, { - String? tablePrefix, - }) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return i1.RemoteExifEntityData( - assetId: attachedDatabase.typeMapping.read( - i0.DriftSqlType.string, - data['${effectivePrefix}asset_id'], - )!, - city: attachedDatabase.typeMapping.read( - i0.DriftSqlType.string, - data['${effectivePrefix}city'], - ), - state: attachedDatabase.typeMapping.read( - i0.DriftSqlType.string, - data['${effectivePrefix}state'], - ), - country: attachedDatabase.typeMapping.read( - i0.DriftSqlType.string, - data['${effectivePrefix}country'], - ), - dateTimeOriginal: attachedDatabase.typeMapping.read( - i0.DriftSqlType.dateTime, - data['${effectivePrefix}date_time_original'], - ), - description: attachedDatabase.typeMapping.read( - i0.DriftSqlType.string, - data['${effectivePrefix}description'], - ), - height: attachedDatabase.typeMapping.read( - i0.DriftSqlType.int, - data['${effectivePrefix}height'], - ), - width: attachedDatabase.typeMapping.read( - i0.DriftSqlType.int, - data['${effectivePrefix}width'], - ), - exposureTime: attachedDatabase.typeMapping.read( - i0.DriftSqlType.string, - data['${effectivePrefix}exposure_time'], - ), - fNumber: attachedDatabase.typeMapping.read( - i0.DriftSqlType.double, - data['${effectivePrefix}f_number'], - ), - fileSize: attachedDatabase.typeMapping.read( - i0.DriftSqlType.int, - data['${effectivePrefix}file_size'], - ), - focalLength: attachedDatabase.typeMapping.read( - i0.DriftSqlType.double, - data['${effectivePrefix}focal_length'], - ), - latitude: attachedDatabase.typeMapping.read( - i0.DriftSqlType.double, - data['${effectivePrefix}latitude'], - ), - longitude: attachedDatabase.typeMapping.read( - i0.DriftSqlType.double, - data['${effectivePrefix}longitude'], - ), - iso: attachedDatabase.typeMapping.read( - i0.DriftSqlType.int, - data['${effectivePrefix}iso'], - ), - make: attachedDatabase.typeMapping.read( - i0.DriftSqlType.string, - data['${effectivePrefix}make'], - ), - model: attachedDatabase.typeMapping.read( - i0.DriftSqlType.string, - data['${effectivePrefix}model'], - ), - lens: attachedDatabase.typeMapping.read( - i0.DriftSqlType.string, - data['${effectivePrefix}lens'], - ), - orientation: attachedDatabase.typeMapping.read( - i0.DriftSqlType.string, - data['${effectivePrefix}orientation'], - ), - timeZone: attachedDatabase.typeMapping.read( - i0.DriftSqlType.string, - data['${effectivePrefix}time_zone'], - ), - rating: attachedDatabase.typeMapping.read( - i0.DriftSqlType.int, - data['${effectivePrefix}rating'], - ), - projectionType: attachedDatabase.typeMapping.read( - i0.DriftSqlType.string, - data['${effectivePrefix}projection_type'], - ), - ); - } - - @override - $RemoteExifEntityTable createAlias(String alias) { - return $RemoteExifEntityTable(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class RemoteExifEntityData extends i0.DataClass - implements i0.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'] = i0.Variable(assetId); - if (!nullToAbsent || city != null) { - map['city'] = i0.Variable(city); - } - if (!nullToAbsent || state != null) { - map['state'] = i0.Variable(state); - } - if (!nullToAbsent || country != null) { - map['country'] = i0.Variable(country); - } - if (!nullToAbsent || dateTimeOriginal != null) { - map['date_time_original'] = i0.Variable(dateTimeOriginal); - } - if (!nullToAbsent || description != null) { - map['description'] = i0.Variable(description); - } - if (!nullToAbsent || height != null) { - map['height'] = i0.Variable(height); - } - if (!nullToAbsent || width != null) { - map['width'] = i0.Variable(width); - } - if (!nullToAbsent || exposureTime != null) { - map['exposure_time'] = i0.Variable(exposureTime); - } - if (!nullToAbsent || fNumber != null) { - map['f_number'] = i0.Variable(fNumber); - } - if (!nullToAbsent || fileSize != null) { - map['file_size'] = i0.Variable(fileSize); - } - if (!nullToAbsent || focalLength != null) { - map['focal_length'] = i0.Variable(focalLength); - } - if (!nullToAbsent || latitude != null) { - map['latitude'] = i0.Variable(latitude); - } - if (!nullToAbsent || longitude != null) { - map['longitude'] = i0.Variable(longitude); - } - if (!nullToAbsent || iso != null) { - map['iso'] = i0.Variable(iso); - } - if (!nullToAbsent || make != null) { - map['make'] = i0.Variable(make); - } - if (!nullToAbsent || model != null) { - map['model'] = i0.Variable(model); - } - if (!nullToAbsent || lens != null) { - map['lens'] = i0.Variable(lens); - } - if (!nullToAbsent || orientation != null) { - map['orientation'] = i0.Variable(orientation); - } - if (!nullToAbsent || timeZone != null) { - map['time_zone'] = i0.Variable(timeZone); - } - if (!nullToAbsent || rating != null) { - map['rating'] = i0.Variable(rating); - } - if (!nullToAbsent || projectionType != null) { - map['projection_type'] = i0.Variable(projectionType); - } - return map; - } - - factory RemoteExifEntityData.fromJson( - Map json, { - i0.ValueSerializer? serializer, - }) { - serializer ??= i0.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({i0.ValueSerializer? serializer}) { - serializer ??= i0.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), - }; - } - - i1.RemoteExifEntityData copyWith({ - String? assetId, - i0.Value city = const i0.Value.absent(), - i0.Value state = const i0.Value.absent(), - i0.Value country = const i0.Value.absent(), - i0.Value dateTimeOriginal = const i0.Value.absent(), - i0.Value description = const i0.Value.absent(), - i0.Value height = const i0.Value.absent(), - i0.Value width = const i0.Value.absent(), - i0.Value exposureTime = const i0.Value.absent(), - i0.Value fNumber = const i0.Value.absent(), - i0.Value fileSize = const i0.Value.absent(), - i0.Value focalLength = const i0.Value.absent(), - i0.Value latitude = const i0.Value.absent(), - i0.Value longitude = const i0.Value.absent(), - i0.Value iso = const i0.Value.absent(), - i0.Value make = const i0.Value.absent(), - i0.Value model = const i0.Value.absent(), - i0.Value lens = const i0.Value.absent(), - i0.Value orientation = const i0.Value.absent(), - i0.Value timeZone = const i0.Value.absent(), - i0.Value rating = const i0.Value.absent(), - i0.Value projectionType = const i0.Value.absent(), - }) => i1.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(i1.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 i1.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 i0.UpdateCompanion { - final i0.Value assetId; - final i0.Value city; - final i0.Value state; - final i0.Value country; - final i0.Value dateTimeOriginal; - final i0.Value description; - final i0.Value height; - final i0.Value width; - final i0.Value exposureTime; - final i0.Value fNumber; - final i0.Value fileSize; - final i0.Value focalLength; - final i0.Value latitude; - final i0.Value longitude; - final i0.Value iso; - final i0.Value make; - final i0.Value model; - final i0.Value lens; - final i0.Value orientation; - final i0.Value timeZone; - final i0.Value rating; - final i0.Value projectionType; - const RemoteExifEntityCompanion({ - this.assetId = const i0.Value.absent(), - this.city = const i0.Value.absent(), - this.state = const i0.Value.absent(), - this.country = const i0.Value.absent(), - this.dateTimeOriginal = const i0.Value.absent(), - this.description = const i0.Value.absent(), - this.height = const i0.Value.absent(), - this.width = const i0.Value.absent(), - this.exposureTime = const i0.Value.absent(), - this.fNumber = const i0.Value.absent(), - this.fileSize = const i0.Value.absent(), - this.focalLength = const i0.Value.absent(), - this.latitude = const i0.Value.absent(), - this.longitude = const i0.Value.absent(), - this.iso = const i0.Value.absent(), - this.make = const i0.Value.absent(), - this.model = const i0.Value.absent(), - this.lens = const i0.Value.absent(), - this.orientation = const i0.Value.absent(), - this.timeZone = const i0.Value.absent(), - this.rating = const i0.Value.absent(), - this.projectionType = const i0.Value.absent(), - }); - RemoteExifEntityCompanion.insert({ - required String assetId, - this.city = const i0.Value.absent(), - this.state = const i0.Value.absent(), - this.country = const i0.Value.absent(), - this.dateTimeOriginal = const i0.Value.absent(), - this.description = const i0.Value.absent(), - this.height = const i0.Value.absent(), - this.width = const i0.Value.absent(), - this.exposureTime = const i0.Value.absent(), - this.fNumber = const i0.Value.absent(), - this.fileSize = const i0.Value.absent(), - this.focalLength = const i0.Value.absent(), - this.latitude = const i0.Value.absent(), - this.longitude = const i0.Value.absent(), - this.iso = const i0.Value.absent(), - this.make = const i0.Value.absent(), - this.model = const i0.Value.absent(), - this.lens = const i0.Value.absent(), - this.orientation = const i0.Value.absent(), - this.timeZone = const i0.Value.absent(), - this.rating = const i0.Value.absent(), - this.projectionType = const i0.Value.absent(), - }) : assetId = i0.Value(assetId); - static i0.Insertable custom({ - i0.Expression? assetId, - i0.Expression? city, - i0.Expression? state, - i0.Expression? country, - i0.Expression? dateTimeOriginal, - i0.Expression? description, - i0.Expression? height, - i0.Expression? width, - i0.Expression? exposureTime, - i0.Expression? fNumber, - i0.Expression? fileSize, - i0.Expression? focalLength, - i0.Expression? latitude, - i0.Expression? longitude, - i0.Expression? iso, - i0.Expression? make, - i0.Expression? model, - i0.Expression? lens, - i0.Expression? orientation, - i0.Expression? timeZone, - i0.Expression? rating, - i0.Expression? projectionType, - }) { - return i0.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, - }); - } - - i1.RemoteExifEntityCompanion copyWith({ - i0.Value? assetId, - i0.Value? city, - i0.Value? state, - i0.Value? country, - i0.Value? dateTimeOriginal, - i0.Value? description, - i0.Value? height, - i0.Value? width, - i0.Value? exposureTime, - i0.Value? fNumber, - i0.Value? fileSize, - i0.Value? focalLength, - i0.Value? latitude, - i0.Value? longitude, - i0.Value? iso, - i0.Value? make, - i0.Value? model, - i0.Value? lens, - i0.Value? orientation, - i0.Value? timeZone, - i0.Value? rating, - i0.Value? projectionType, - }) { - return i1.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'] = i0.Variable(assetId.value); - } - if (city.present) { - map['city'] = i0.Variable(city.value); - } - if (state.present) { - map['state'] = i0.Variable(state.value); - } - if (country.present) { - map['country'] = i0.Variable(country.value); - } - if (dateTimeOriginal.present) { - map['date_time_original'] = i0.Variable(dateTimeOriginal.value); - } - if (description.present) { - map['description'] = i0.Variable(description.value); - } - if (height.present) { - map['height'] = i0.Variable(height.value); - } - if (width.present) { - map['width'] = i0.Variable(width.value); - } - if (exposureTime.present) { - map['exposure_time'] = i0.Variable(exposureTime.value); - } - if (fNumber.present) { - map['f_number'] = i0.Variable(fNumber.value); - } - if (fileSize.present) { - map['file_size'] = i0.Variable(fileSize.value); - } - if (focalLength.present) { - map['focal_length'] = i0.Variable(focalLength.value); - } - if (latitude.present) { - map['latitude'] = i0.Variable(latitude.value); - } - if (longitude.present) { - map['longitude'] = i0.Variable(longitude.value); - } - if (iso.present) { - map['iso'] = i0.Variable(iso.value); - } - if (make.present) { - map['make'] = i0.Variable(make.value); - } - if (model.present) { - map['model'] = i0.Variable(model.value); - } - if (lens.present) { - map['lens'] = i0.Variable(lens.value); - } - if (orientation.present) { - map['orientation'] = i0.Variable(orientation.value); - } - if (timeZone.present) { - map['time_zone'] = i0.Variable(timeZone.value); - } - if (rating.present) { - map['rating'] = i0.Variable(rating.value); - } - if (projectionType.present) { - map['projection_type'] = i0.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(); - } -} - -i0.Index get idxRemoteExifCity => i0.Index( - 'idx_remote_exif_city', - 'CREATE INDEX IF NOT EXISTS idx_remote_exif_city ON remote_exif_entity (city) WHERE city IS NOT NULL', -); diff --git a/mobile/lib/infrastructure/entities/local_album.entity.drift.dart b/mobile/lib/infrastructure/entities/local_album.entity.drift.dart deleted file mode 100644 index 0703844291..0000000000 --- a/mobile/lib/infrastructure/entities/local_album.entity.drift.dart +++ /dev/null @@ -1,904 +0,0 @@ -// dart format width=80 -// ignore_for_file: type=lint -import 'package:drift/drift.dart' as i0; -import 'package:immich_mobile/infrastructure/entities/local_album.entity.drift.dart' - as i1; -import 'package:immich_mobile/domain/models/album/local_album.model.dart' as i2; -import 'package:immich_mobile/infrastructure/entities/local_album.entity.dart' - as i3; -import 'package:drift/src/runtime/query_builder/query_builder.dart' as i4; -import 'package:immich_mobile/infrastructure/entities/remote_album.entity.drift.dart' - as i5; -import 'package:drift/internal/modular.dart' as i6; - -typedef $$LocalAlbumEntityTableCreateCompanionBuilder = - i1.LocalAlbumEntityCompanion Function({ - required String id, - required String name, - i0.Value updatedAt, - required i2.BackupSelection backupSelection, - i0.Value isIosSharedAlbum, - i0.Value linkedRemoteAlbumId, - i0.Value marker_, - }); -typedef $$LocalAlbumEntityTableUpdateCompanionBuilder = - i1.LocalAlbumEntityCompanion Function({ - i0.Value id, - i0.Value name, - i0.Value updatedAt, - i0.Value backupSelection, - i0.Value isIosSharedAlbum, - i0.Value linkedRemoteAlbumId, - i0.Value marker_, - }); - -final class $$LocalAlbumEntityTableReferences - extends - i0.BaseReferences< - i0.GeneratedDatabase, - i1.$LocalAlbumEntityTable, - i1.LocalAlbumEntityData - > { - $$LocalAlbumEntityTableReferences( - super.$_db, - super.$_table, - super.$_typedResult, - ); - - static i5.$RemoteAlbumEntityTable _linkedRemoteAlbumIdTable( - i0.GeneratedDatabase db, - ) => i6.ReadDatabaseContainer(db) - .resultSet('remote_album_entity') - .createAlias( - i0.$_aliasNameGenerator( - i6.ReadDatabaseContainer(db) - .resultSet('local_album_entity') - .linkedRemoteAlbumId, - i6.ReadDatabaseContainer( - db, - ).resultSet('remote_album_entity').id, - ), - ); - - i5.$$RemoteAlbumEntityTableProcessedTableManager? get linkedRemoteAlbumId { - final $_column = $_itemColumn('linked_remote_album_id'); - if ($_column == null) return null; - final manager = i5 - .$$RemoteAlbumEntityTableTableManager( - $_db, - i6.ReadDatabaseContainer( - $_db, - ).resultSet('remote_album_entity'), - ) - .filter((f) => f.id.sqlEquals($_column)); - final item = $_typedResult.readTableOrNull(_linkedRemoteAlbumIdTable($_db)); - if (item == null) return manager; - return i0.ProcessedTableManager( - manager.$state.copyWith(prefetchedData: [item]), - ); - } -} - -class $$LocalAlbumEntityTableFilterComposer - extends i0.Composer { - $$LocalAlbumEntityTableFilterComposer({ - required super.$db, - required super.$table, - super.joinBuilder, - super.$addJoinBuilderToRootComposer, - super.$removeJoinBuilderFromRootComposer, - }); - i0.ColumnFilters get id => $composableBuilder( - column: $table.id, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnFilters get name => $composableBuilder( - column: $table.name, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnFilters get updatedAt => $composableBuilder( - column: $table.updatedAt, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnWithTypeConverterFilters - get backupSelection => $composableBuilder( - column: $table.backupSelection, - builder: (column) => i0.ColumnWithTypeConverterFilters(column), - ); - - i0.ColumnFilters get isIosSharedAlbum => $composableBuilder( - column: $table.isIosSharedAlbum, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnFilters get marker_ => $composableBuilder( - column: $table.marker_, - builder: (column) => i0.ColumnFilters(column), - ); - - i5.$$RemoteAlbumEntityTableFilterComposer get linkedRemoteAlbumId { - final i5.$$RemoteAlbumEntityTableFilterComposer composer = $composerBuilder( - composer: this, - getCurrentColumn: (t) => t.linkedRemoteAlbumId, - referencedTable: i6.ReadDatabaseContainer( - $db, - ).resultSet('remote_album_entity'), - getReferencedColumn: (t) => t.id, - builder: - ( - joinBuilder, { - $addJoinBuilderToRootComposer, - $removeJoinBuilderFromRootComposer, - }) => i5.$$RemoteAlbumEntityTableFilterComposer( - $db: $db, - $table: i6.ReadDatabaseContainer( - $db, - ).resultSet('remote_album_entity'), - $addJoinBuilderToRootComposer: $addJoinBuilderToRootComposer, - joinBuilder: joinBuilder, - $removeJoinBuilderFromRootComposer: - $removeJoinBuilderFromRootComposer, - ), - ); - return composer; - } -} - -class $$LocalAlbumEntityTableOrderingComposer - extends i0.Composer { - $$LocalAlbumEntityTableOrderingComposer({ - required super.$db, - required super.$table, - super.joinBuilder, - super.$addJoinBuilderToRootComposer, - super.$removeJoinBuilderFromRootComposer, - }); - i0.ColumnOrderings get id => $composableBuilder( - column: $table.id, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get name => $composableBuilder( - column: $table.name, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get updatedAt => $composableBuilder( - column: $table.updatedAt, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get backupSelection => $composableBuilder( - column: $table.backupSelection, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get isIosSharedAlbum => $composableBuilder( - column: $table.isIosSharedAlbum, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get marker_ => $composableBuilder( - column: $table.marker_, - builder: (column) => i0.ColumnOrderings(column), - ); - - i5.$$RemoteAlbumEntityTableOrderingComposer get linkedRemoteAlbumId { - final i5.$$RemoteAlbumEntityTableOrderingComposer composer = - $composerBuilder( - composer: this, - getCurrentColumn: (t) => t.linkedRemoteAlbumId, - referencedTable: i6.ReadDatabaseContainer( - $db, - ).resultSet('remote_album_entity'), - getReferencedColumn: (t) => t.id, - builder: - ( - joinBuilder, { - $addJoinBuilderToRootComposer, - $removeJoinBuilderFromRootComposer, - }) => i5.$$RemoteAlbumEntityTableOrderingComposer( - $db: $db, - $table: i6.ReadDatabaseContainer( - $db, - ).resultSet('remote_album_entity'), - $addJoinBuilderToRootComposer: $addJoinBuilderToRootComposer, - joinBuilder: joinBuilder, - $removeJoinBuilderFromRootComposer: - $removeJoinBuilderFromRootComposer, - ), - ); - return composer; - } -} - -class $$LocalAlbumEntityTableAnnotationComposer - extends i0.Composer { - $$LocalAlbumEntityTableAnnotationComposer({ - required super.$db, - required super.$table, - super.joinBuilder, - super.$addJoinBuilderToRootComposer, - super.$removeJoinBuilderFromRootComposer, - }); - i0.GeneratedColumn get id => - $composableBuilder(column: $table.id, builder: (column) => column); - - i0.GeneratedColumn get name => - $composableBuilder(column: $table.name, builder: (column) => column); - - i0.GeneratedColumn get updatedAt => - $composableBuilder(column: $table.updatedAt, builder: (column) => column); - - i0.GeneratedColumnWithTypeConverter - get backupSelection => $composableBuilder( - column: $table.backupSelection, - builder: (column) => column, - ); - - i0.GeneratedColumn get isIosSharedAlbum => $composableBuilder( - column: $table.isIosSharedAlbum, - builder: (column) => column, - ); - - i0.GeneratedColumn get marker_ => - $composableBuilder(column: $table.marker_, builder: (column) => column); - - i5.$$RemoteAlbumEntityTableAnnotationComposer get linkedRemoteAlbumId { - final i5.$$RemoteAlbumEntityTableAnnotationComposer composer = - $composerBuilder( - composer: this, - getCurrentColumn: (t) => t.linkedRemoteAlbumId, - referencedTable: i6.ReadDatabaseContainer( - $db, - ).resultSet('remote_album_entity'), - getReferencedColumn: (t) => t.id, - builder: - ( - joinBuilder, { - $addJoinBuilderToRootComposer, - $removeJoinBuilderFromRootComposer, - }) => i5.$$RemoteAlbumEntityTableAnnotationComposer( - $db: $db, - $table: i6.ReadDatabaseContainer( - $db, - ).resultSet('remote_album_entity'), - $addJoinBuilderToRootComposer: $addJoinBuilderToRootComposer, - joinBuilder: joinBuilder, - $removeJoinBuilderFromRootComposer: - $removeJoinBuilderFromRootComposer, - ), - ); - return composer; - } -} - -class $$LocalAlbumEntityTableTableManager - extends - i0.RootTableManager< - i0.GeneratedDatabase, - i1.$LocalAlbumEntityTable, - i1.LocalAlbumEntityData, - i1.$$LocalAlbumEntityTableFilterComposer, - i1.$$LocalAlbumEntityTableOrderingComposer, - i1.$$LocalAlbumEntityTableAnnotationComposer, - $$LocalAlbumEntityTableCreateCompanionBuilder, - $$LocalAlbumEntityTableUpdateCompanionBuilder, - (i1.LocalAlbumEntityData, i1.$$LocalAlbumEntityTableReferences), - i1.LocalAlbumEntityData, - i0.PrefetchHooks Function({bool linkedRemoteAlbumId}) - > { - $$LocalAlbumEntityTableTableManager( - i0.GeneratedDatabase db, - i1.$LocalAlbumEntityTable table, - ) : super( - i0.TableManagerState( - db: db, - table: table, - createFilteringComposer: () => - i1.$$LocalAlbumEntityTableFilterComposer($db: db, $table: table), - createOrderingComposer: () => i1 - .$$LocalAlbumEntityTableOrderingComposer($db: db, $table: table), - createComputedFieldComposer: () => - i1.$$LocalAlbumEntityTableAnnotationComposer( - $db: db, - $table: table, - ), - updateCompanionCallback: - ({ - i0.Value id = const i0.Value.absent(), - i0.Value name = const i0.Value.absent(), - i0.Value updatedAt = const i0.Value.absent(), - i0.Value backupSelection = - const i0.Value.absent(), - i0.Value isIosSharedAlbum = const i0.Value.absent(), - i0.Value linkedRemoteAlbumId = const i0.Value.absent(), - i0.Value marker_ = const i0.Value.absent(), - }) => i1.LocalAlbumEntityCompanion( - id: id, - name: name, - updatedAt: updatedAt, - backupSelection: backupSelection, - isIosSharedAlbum: isIosSharedAlbum, - linkedRemoteAlbumId: linkedRemoteAlbumId, - marker_: marker_, - ), - createCompanionCallback: - ({ - required String id, - required String name, - i0.Value updatedAt = const i0.Value.absent(), - required i2.BackupSelection backupSelection, - i0.Value isIosSharedAlbum = const i0.Value.absent(), - i0.Value linkedRemoteAlbumId = const i0.Value.absent(), - i0.Value marker_ = const i0.Value.absent(), - }) => i1.LocalAlbumEntityCompanion.insert( - id: id, - name: name, - updatedAt: updatedAt, - backupSelection: backupSelection, - isIosSharedAlbum: isIosSharedAlbum, - linkedRemoteAlbumId: linkedRemoteAlbumId, - marker_: marker_, - ), - withReferenceMapper: (p0) => p0 - .map( - (e) => ( - e.readTable(table), - i1.$$LocalAlbumEntityTableReferences(db, table, e), - ), - ) - .toList(), - prefetchHooksCallback: ({linkedRemoteAlbumId = false}) { - return i0.PrefetchHooks( - db: db, - explicitlyWatchedTables: [], - addJoins: - < - T extends i0.TableManagerState< - dynamic, - dynamic, - dynamic, - dynamic, - dynamic, - dynamic, - dynamic, - dynamic, - dynamic, - dynamic, - dynamic - > - >(state) { - if (linkedRemoteAlbumId) { - state = - state.withJoin( - currentTable: table, - currentColumn: table.linkedRemoteAlbumId, - referencedTable: i1 - .$$LocalAlbumEntityTableReferences - ._linkedRemoteAlbumIdTable(db), - referencedColumn: i1 - .$$LocalAlbumEntityTableReferences - ._linkedRemoteAlbumIdTable(db) - .id, - ) - as T; - } - - return state; - }, - getPrefetchedDataCallback: (items) async { - return []; - }, - ); - }, - ), - ); -} - -typedef $$LocalAlbumEntityTableProcessedTableManager = - i0.ProcessedTableManager< - i0.GeneratedDatabase, - i1.$LocalAlbumEntityTable, - i1.LocalAlbumEntityData, - i1.$$LocalAlbumEntityTableFilterComposer, - i1.$$LocalAlbumEntityTableOrderingComposer, - i1.$$LocalAlbumEntityTableAnnotationComposer, - $$LocalAlbumEntityTableCreateCompanionBuilder, - $$LocalAlbumEntityTableUpdateCompanionBuilder, - (i1.LocalAlbumEntityData, i1.$$LocalAlbumEntityTableReferences), - i1.LocalAlbumEntityData, - i0.PrefetchHooks Function({bool linkedRemoteAlbumId}) - >; - -class $LocalAlbumEntityTable extends i3.LocalAlbumEntity - with i0.TableInfo<$LocalAlbumEntityTable, i1.LocalAlbumEntityData> { - @override - final i0.GeneratedDatabase attachedDatabase; - final String? _alias; - $LocalAlbumEntityTable(this.attachedDatabase, [this._alias]); - 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 _nameMeta = const i0.VerificationMeta( - 'name', - ); - @override - late final i0.GeneratedColumn name = i0.GeneratedColumn( - 'name', - aliasedName, - false, - type: i0.DriftSqlType.string, - requiredDuringInsert: true, - ); - 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, - ); - @override - late final i0.GeneratedColumnWithTypeConverter - backupSelection = - i0.GeneratedColumn( - 'backup_selection', - aliasedName, - false, - type: i0.DriftSqlType.int, - requiredDuringInsert: true, - ).withConverter( - i1.$LocalAlbumEntityTable.$converterbackupSelection, - ); - static const i0.VerificationMeta _isIosSharedAlbumMeta = - const i0.VerificationMeta('isIosSharedAlbum'); - @override - late final i0.GeneratedColumn isIosSharedAlbum = - i0.GeneratedColumn( - 'is_ios_shared_album', - aliasedName, - false, - type: i0.DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: i0.GeneratedColumn.constraintIsAlways( - 'CHECK ("is_ios_shared_album" IN (0, 1))', - ), - defaultValue: const i4.Constant(false), - ); - static const i0.VerificationMeta _linkedRemoteAlbumIdMeta = - const i0.VerificationMeta('linkedRemoteAlbumId'); - @override - late final i0.GeneratedColumn linkedRemoteAlbumId = - i0.GeneratedColumn( - 'linked_remote_album_id', - aliasedName, - true, - type: i0.DriftSqlType.string, - requiredDuringInsert: false, - defaultConstraints: i0.GeneratedColumn.constraintIsAlways( - 'REFERENCES remote_album_entity (id) ON DELETE SET NULL', - ), - ); - static const i0.VerificationMeta _marker_Meta = const i0.VerificationMeta( - 'marker_', - ); - @override - late final i0.GeneratedColumn marker_ = i0.GeneratedColumn( - 'marker', - aliasedName, - true, - type: i0.DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: i0.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 - i0.VerificationContext validateIntegrity( - i0.Insertable instance, { - bool isInserting = false, - }) { - final context = i0.VerificationContext(); - final data = instance.toColumns(true); - if (data.containsKey('id')) { - context.handle(_idMeta, id.isAcceptableOrUnknown(data['id']!, _idMeta)); - } else if (isInserting) { - context.missing(_idMeta); - } - if (data.containsKey('name')) { - context.handle( - _nameMeta, - name.isAcceptableOrUnknown(data['name']!, _nameMeta), - ); - } else if (isInserting) { - context.missing(_nameMeta); - } - if (data.containsKey('updated_at')) { - context.handle( - _updatedAtMeta, - updatedAt.isAcceptableOrUnknown(data['updated_at']!, _updatedAtMeta), - ); - } - if (data.containsKey('is_ios_shared_album')) { - context.handle( - _isIosSharedAlbumMeta, - isIosSharedAlbum.isAcceptableOrUnknown( - data['is_ios_shared_album']!, - _isIosSharedAlbumMeta, - ), - ); - } - if (data.containsKey('linked_remote_album_id')) { - context.handle( - _linkedRemoteAlbumIdMeta, - linkedRemoteAlbumId.isAcceptableOrUnknown( - data['linked_remote_album_id']!, - _linkedRemoteAlbumIdMeta, - ), - ); - } - if (data.containsKey('marker')) { - context.handle( - _marker_Meta, - marker_.isAcceptableOrUnknown(data['marker']!, _marker_Meta), - ); - } - return context; - } - - @override - Set get $primaryKey => {id}; - @override - i1.LocalAlbumEntityData map( - Map data, { - String? tablePrefix, - }) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return i1.LocalAlbumEntityData( - id: attachedDatabase.typeMapping.read( - i0.DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - name: attachedDatabase.typeMapping.read( - i0.DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - i0.DriftSqlType.dateTime, - data['${effectivePrefix}updated_at'], - )!, - backupSelection: i1.$LocalAlbumEntityTable.$converterbackupSelection - .fromSql( - attachedDatabase.typeMapping.read( - i0.DriftSqlType.int, - data['${effectivePrefix}backup_selection'], - )!, - ), - isIosSharedAlbum: attachedDatabase.typeMapping.read( - i0.DriftSqlType.bool, - data['${effectivePrefix}is_ios_shared_album'], - )!, - linkedRemoteAlbumId: attachedDatabase.typeMapping.read( - i0.DriftSqlType.string, - data['${effectivePrefix}linked_remote_album_id'], - ), - marker_: attachedDatabase.typeMapping.read( - i0.DriftSqlType.bool, - data['${effectivePrefix}marker'], - ), - ); - } - - @override - $LocalAlbumEntityTable createAlias(String alias) { - return $LocalAlbumEntityTable(attachedDatabase, alias); - } - - static i0.JsonTypeConverter2 - $converterbackupSelection = const i0.EnumIndexConverter( - i2.BackupSelection.values, - ); - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class LocalAlbumEntityData extends i0.DataClass - implements i0.Insertable { - final String id; - final String name; - final DateTime updatedAt; - final i2.BackupSelection 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'] = i0.Variable(id); - map['name'] = i0.Variable(name); - map['updated_at'] = i0.Variable(updatedAt); - { - map['backup_selection'] = i0.Variable( - i1.$LocalAlbumEntityTable.$converterbackupSelection.toSql( - backupSelection, - ), - ); - } - map['is_ios_shared_album'] = i0.Variable(isIosSharedAlbum); - if (!nullToAbsent || linkedRemoteAlbumId != null) { - map['linked_remote_album_id'] = i0.Variable(linkedRemoteAlbumId); - } - if (!nullToAbsent || marker_ != null) { - map['marker'] = i0.Variable(marker_); - } - return map; - } - - factory LocalAlbumEntityData.fromJson( - Map json, { - i0.ValueSerializer? serializer, - }) { - serializer ??= i0.driftRuntimeOptions.defaultSerializer; - return LocalAlbumEntityData( - id: serializer.fromJson(json['id']), - name: serializer.fromJson(json['name']), - updatedAt: serializer.fromJson(json['updatedAt']), - backupSelection: i1.$LocalAlbumEntityTable.$converterbackupSelection - .fromJson(serializer.fromJson(json['backupSelection'])), - isIosSharedAlbum: serializer.fromJson(json['isIosSharedAlbum']), - linkedRemoteAlbumId: serializer.fromJson( - json['linkedRemoteAlbumId'], - ), - marker_: serializer.fromJson(json['marker_']), - ); - } - @override - Map toJson({i0.ValueSerializer? serializer}) { - serializer ??= i0.driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'name': serializer.toJson(name), - 'updatedAt': serializer.toJson(updatedAt), - 'backupSelection': serializer.toJson( - i1.$LocalAlbumEntityTable.$converterbackupSelection.toJson( - backupSelection, - ), - ), - 'isIosSharedAlbum': serializer.toJson(isIosSharedAlbum), - 'linkedRemoteAlbumId': serializer.toJson(linkedRemoteAlbumId), - 'marker_': serializer.toJson(marker_), - }; - } - - i1.LocalAlbumEntityData copyWith({ - String? id, - String? name, - DateTime? updatedAt, - i2.BackupSelection? backupSelection, - bool? isIosSharedAlbum, - i0.Value linkedRemoteAlbumId = const i0.Value.absent(), - i0.Value marker_ = const i0.Value.absent(), - }) => i1.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(i1.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 i1.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 i0.UpdateCompanion { - final i0.Value id; - final i0.Value name; - final i0.Value updatedAt; - final i0.Value backupSelection; - final i0.Value isIosSharedAlbum; - final i0.Value linkedRemoteAlbumId; - final i0.Value marker_; - const LocalAlbumEntityCompanion({ - this.id = const i0.Value.absent(), - this.name = const i0.Value.absent(), - this.updatedAt = const i0.Value.absent(), - this.backupSelection = const i0.Value.absent(), - this.isIosSharedAlbum = const i0.Value.absent(), - this.linkedRemoteAlbumId = const i0.Value.absent(), - this.marker_ = const i0.Value.absent(), - }); - LocalAlbumEntityCompanion.insert({ - required String id, - required String name, - this.updatedAt = const i0.Value.absent(), - required i2.BackupSelection backupSelection, - this.isIosSharedAlbum = const i0.Value.absent(), - this.linkedRemoteAlbumId = const i0.Value.absent(), - this.marker_ = const i0.Value.absent(), - }) : id = i0.Value(id), - name = i0.Value(name), - backupSelection = i0.Value(backupSelection); - static i0.Insertable custom({ - i0.Expression? id, - i0.Expression? name, - i0.Expression? updatedAt, - i0.Expression? backupSelection, - i0.Expression? isIosSharedAlbum, - i0.Expression? linkedRemoteAlbumId, - i0.Expression? marker_, - }) { - return i0.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_, - }); - } - - i1.LocalAlbumEntityCompanion copyWith({ - i0.Value? id, - i0.Value? name, - i0.Value? updatedAt, - i0.Value? backupSelection, - i0.Value? isIosSharedAlbum, - i0.Value? linkedRemoteAlbumId, - i0.Value? marker_, - }) { - return i1.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'] = i0.Variable(id.value); - } - if (name.present) { - map['name'] = i0.Variable(name.value); - } - if (updatedAt.present) { - map['updated_at'] = i0.Variable(updatedAt.value); - } - if (backupSelection.present) { - map['backup_selection'] = i0.Variable( - i1.$LocalAlbumEntityTable.$converterbackupSelection.toSql( - backupSelection.value, - ), - ); - } - if (isIosSharedAlbum.present) { - map['is_ios_shared_album'] = i0.Variable(isIosSharedAlbum.value); - } - if (linkedRemoteAlbumId.present) { - map['linked_remote_album_id'] = i0.Variable( - linkedRemoteAlbumId.value, - ); - } - if (marker_.present) { - map['marker'] = i0.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(); - } -} diff --git a/mobile/lib/infrastructure/entities/local_album_asset.entity.drift.dart b/mobile/lib/infrastructure/entities/local_album_asset.entity.drift.dart deleted file mode 100644 index 77b2798afb..0000000000 --- a/mobile/lib/infrastructure/entities/local_album_asset.entity.drift.dart +++ /dev/null @@ -1,739 +0,0 @@ -// dart format width=80 -// ignore_for_file: type=lint -import 'package:drift/drift.dart' as i0; -import 'package:immich_mobile/infrastructure/entities/local_album_asset.entity.drift.dart' - as i1; -import 'package:immich_mobile/infrastructure/entities/local_album_asset.entity.dart' - as i2; -import 'package:immich_mobile/infrastructure/entities/local_asset.entity.drift.dart' - as i3; -import 'package:drift/internal/modular.dart' as i4; -import 'package:immich_mobile/infrastructure/entities/local_album.entity.drift.dart' - as i5; - -typedef $$LocalAlbumAssetEntityTableCreateCompanionBuilder = - i1.LocalAlbumAssetEntityCompanion Function({ - required String assetId, - required String albumId, - i0.Value marker_, - }); -typedef $$LocalAlbumAssetEntityTableUpdateCompanionBuilder = - i1.LocalAlbumAssetEntityCompanion Function({ - i0.Value assetId, - i0.Value albumId, - i0.Value marker_, - }); - -final class $$LocalAlbumAssetEntityTableReferences - extends - i0.BaseReferences< - i0.GeneratedDatabase, - i1.$LocalAlbumAssetEntityTable, - i1.LocalAlbumAssetEntityData - > { - $$LocalAlbumAssetEntityTableReferences( - super.$_db, - super.$_table, - super.$_typedResult, - ); - - static i3.$LocalAssetEntityTable _assetIdTable(i0.GeneratedDatabase db) => - i4.ReadDatabaseContainer(db) - .resultSet('local_asset_entity') - .createAlias( - i0.$_aliasNameGenerator( - i4.ReadDatabaseContainer(db) - .resultSet( - 'local_album_asset_entity', - ) - .assetId, - i4.ReadDatabaseContainer( - db, - ).resultSet('local_asset_entity').id, - ), - ); - - i3.$$LocalAssetEntityTableProcessedTableManager get assetId { - final $_column = $_itemColumn('asset_id')!; - - final manager = i3 - .$$LocalAssetEntityTableTableManager( - $_db, - i4.ReadDatabaseContainer( - $_db, - ).resultSet('local_asset_entity'), - ) - .filter((f) => f.id.sqlEquals($_column)); - final item = $_typedResult.readTableOrNull(_assetIdTable($_db)); - if (item == null) return manager; - return i0.ProcessedTableManager( - manager.$state.copyWith(prefetchedData: [item]), - ); - } - - static i5.$LocalAlbumEntityTable _albumIdTable(i0.GeneratedDatabase db) => - i4.ReadDatabaseContainer(db) - .resultSet('local_album_entity') - .createAlias( - i0.$_aliasNameGenerator( - i4.ReadDatabaseContainer(db) - .resultSet( - 'local_album_asset_entity', - ) - .albumId, - i4.ReadDatabaseContainer( - db, - ).resultSet('local_album_entity').id, - ), - ); - - i5.$$LocalAlbumEntityTableProcessedTableManager get albumId { - final $_column = $_itemColumn('album_id')!; - - final manager = i5 - .$$LocalAlbumEntityTableTableManager( - $_db, - i4.ReadDatabaseContainer( - $_db, - ).resultSet('local_album_entity'), - ) - .filter((f) => f.id.sqlEquals($_column)); - final item = $_typedResult.readTableOrNull(_albumIdTable($_db)); - if (item == null) return manager; - return i0.ProcessedTableManager( - manager.$state.copyWith(prefetchedData: [item]), - ); - } -} - -class $$LocalAlbumAssetEntityTableFilterComposer - extends i0.Composer { - $$LocalAlbumAssetEntityTableFilterComposer({ - required super.$db, - required super.$table, - super.joinBuilder, - super.$addJoinBuilderToRootComposer, - super.$removeJoinBuilderFromRootComposer, - }); - i0.ColumnFilters get marker_ => $composableBuilder( - column: $table.marker_, - builder: (column) => i0.ColumnFilters(column), - ); - - i3.$$LocalAssetEntityTableFilterComposer get assetId { - final i3.$$LocalAssetEntityTableFilterComposer composer = $composerBuilder( - composer: this, - getCurrentColumn: (t) => t.assetId, - referencedTable: i4.ReadDatabaseContainer( - $db, - ).resultSet('local_asset_entity'), - getReferencedColumn: (t) => t.id, - builder: - ( - joinBuilder, { - $addJoinBuilderToRootComposer, - $removeJoinBuilderFromRootComposer, - }) => i3.$$LocalAssetEntityTableFilterComposer( - $db: $db, - $table: i4.ReadDatabaseContainer( - $db, - ).resultSet('local_asset_entity'), - $addJoinBuilderToRootComposer: $addJoinBuilderToRootComposer, - joinBuilder: joinBuilder, - $removeJoinBuilderFromRootComposer: - $removeJoinBuilderFromRootComposer, - ), - ); - return composer; - } - - i5.$$LocalAlbumEntityTableFilterComposer get albumId { - final i5.$$LocalAlbumEntityTableFilterComposer composer = $composerBuilder( - composer: this, - getCurrentColumn: (t) => t.albumId, - referencedTable: i4.ReadDatabaseContainer( - $db, - ).resultSet('local_album_entity'), - getReferencedColumn: (t) => t.id, - builder: - ( - joinBuilder, { - $addJoinBuilderToRootComposer, - $removeJoinBuilderFromRootComposer, - }) => i5.$$LocalAlbumEntityTableFilterComposer( - $db: $db, - $table: i4.ReadDatabaseContainer( - $db, - ).resultSet('local_album_entity'), - $addJoinBuilderToRootComposer: $addJoinBuilderToRootComposer, - joinBuilder: joinBuilder, - $removeJoinBuilderFromRootComposer: - $removeJoinBuilderFromRootComposer, - ), - ); - return composer; - } -} - -class $$LocalAlbumAssetEntityTableOrderingComposer - extends i0.Composer { - $$LocalAlbumAssetEntityTableOrderingComposer({ - required super.$db, - required super.$table, - super.joinBuilder, - super.$addJoinBuilderToRootComposer, - super.$removeJoinBuilderFromRootComposer, - }); - i0.ColumnOrderings get marker_ => $composableBuilder( - column: $table.marker_, - builder: (column) => i0.ColumnOrderings(column), - ); - - i3.$$LocalAssetEntityTableOrderingComposer get assetId { - final i3.$$LocalAssetEntityTableOrderingComposer composer = - $composerBuilder( - composer: this, - getCurrentColumn: (t) => t.assetId, - referencedTable: i4.ReadDatabaseContainer( - $db, - ).resultSet('local_asset_entity'), - getReferencedColumn: (t) => t.id, - builder: - ( - joinBuilder, { - $addJoinBuilderToRootComposer, - $removeJoinBuilderFromRootComposer, - }) => i3.$$LocalAssetEntityTableOrderingComposer( - $db: $db, - $table: i4.ReadDatabaseContainer( - $db, - ).resultSet('local_asset_entity'), - $addJoinBuilderToRootComposer: $addJoinBuilderToRootComposer, - joinBuilder: joinBuilder, - $removeJoinBuilderFromRootComposer: - $removeJoinBuilderFromRootComposer, - ), - ); - return composer; - } - - i5.$$LocalAlbumEntityTableOrderingComposer get albumId { - final i5.$$LocalAlbumEntityTableOrderingComposer composer = - $composerBuilder( - composer: this, - getCurrentColumn: (t) => t.albumId, - referencedTable: i4.ReadDatabaseContainer( - $db, - ).resultSet('local_album_entity'), - getReferencedColumn: (t) => t.id, - builder: - ( - joinBuilder, { - $addJoinBuilderToRootComposer, - $removeJoinBuilderFromRootComposer, - }) => i5.$$LocalAlbumEntityTableOrderingComposer( - $db: $db, - $table: i4.ReadDatabaseContainer( - $db, - ).resultSet('local_album_entity'), - $addJoinBuilderToRootComposer: $addJoinBuilderToRootComposer, - joinBuilder: joinBuilder, - $removeJoinBuilderFromRootComposer: - $removeJoinBuilderFromRootComposer, - ), - ); - return composer; - } -} - -class $$LocalAlbumAssetEntityTableAnnotationComposer - extends i0.Composer { - $$LocalAlbumAssetEntityTableAnnotationComposer({ - required super.$db, - required super.$table, - super.joinBuilder, - super.$addJoinBuilderToRootComposer, - super.$removeJoinBuilderFromRootComposer, - }); - i0.GeneratedColumn get marker_ => - $composableBuilder(column: $table.marker_, builder: (column) => column); - - i3.$$LocalAssetEntityTableAnnotationComposer get assetId { - final i3.$$LocalAssetEntityTableAnnotationComposer composer = - $composerBuilder( - composer: this, - getCurrentColumn: (t) => t.assetId, - referencedTable: i4.ReadDatabaseContainer( - $db, - ).resultSet('local_asset_entity'), - getReferencedColumn: (t) => t.id, - builder: - ( - joinBuilder, { - $addJoinBuilderToRootComposer, - $removeJoinBuilderFromRootComposer, - }) => i3.$$LocalAssetEntityTableAnnotationComposer( - $db: $db, - $table: i4.ReadDatabaseContainer( - $db, - ).resultSet('local_asset_entity'), - $addJoinBuilderToRootComposer: $addJoinBuilderToRootComposer, - joinBuilder: joinBuilder, - $removeJoinBuilderFromRootComposer: - $removeJoinBuilderFromRootComposer, - ), - ); - return composer; - } - - i5.$$LocalAlbumEntityTableAnnotationComposer get albumId { - final i5.$$LocalAlbumEntityTableAnnotationComposer composer = - $composerBuilder( - composer: this, - getCurrentColumn: (t) => t.albumId, - referencedTable: i4.ReadDatabaseContainer( - $db, - ).resultSet('local_album_entity'), - getReferencedColumn: (t) => t.id, - builder: - ( - joinBuilder, { - $addJoinBuilderToRootComposer, - $removeJoinBuilderFromRootComposer, - }) => i5.$$LocalAlbumEntityTableAnnotationComposer( - $db: $db, - $table: i4.ReadDatabaseContainer( - $db, - ).resultSet('local_album_entity'), - $addJoinBuilderToRootComposer: $addJoinBuilderToRootComposer, - joinBuilder: joinBuilder, - $removeJoinBuilderFromRootComposer: - $removeJoinBuilderFromRootComposer, - ), - ); - return composer; - } -} - -class $$LocalAlbumAssetEntityTableTableManager - extends - i0.RootTableManager< - i0.GeneratedDatabase, - i1.$LocalAlbumAssetEntityTable, - i1.LocalAlbumAssetEntityData, - i1.$$LocalAlbumAssetEntityTableFilterComposer, - i1.$$LocalAlbumAssetEntityTableOrderingComposer, - i1.$$LocalAlbumAssetEntityTableAnnotationComposer, - $$LocalAlbumAssetEntityTableCreateCompanionBuilder, - $$LocalAlbumAssetEntityTableUpdateCompanionBuilder, - ( - i1.LocalAlbumAssetEntityData, - i1.$$LocalAlbumAssetEntityTableReferences, - ), - i1.LocalAlbumAssetEntityData, - i0.PrefetchHooks Function({bool assetId, bool albumId}) - > { - $$LocalAlbumAssetEntityTableTableManager( - i0.GeneratedDatabase db, - i1.$LocalAlbumAssetEntityTable table, - ) : super( - i0.TableManagerState( - db: db, - table: table, - createFilteringComposer: () => - i1.$$LocalAlbumAssetEntityTableFilterComposer( - $db: db, - $table: table, - ), - createOrderingComposer: () => - i1.$$LocalAlbumAssetEntityTableOrderingComposer( - $db: db, - $table: table, - ), - createComputedFieldComposer: () => - i1.$$LocalAlbumAssetEntityTableAnnotationComposer( - $db: db, - $table: table, - ), - updateCompanionCallback: - ({ - i0.Value assetId = const i0.Value.absent(), - i0.Value albumId = const i0.Value.absent(), - i0.Value marker_ = const i0.Value.absent(), - }) => i1.LocalAlbumAssetEntityCompanion( - assetId: assetId, - albumId: albumId, - marker_: marker_, - ), - createCompanionCallback: - ({ - required String assetId, - required String albumId, - i0.Value marker_ = const i0.Value.absent(), - }) => i1.LocalAlbumAssetEntityCompanion.insert( - assetId: assetId, - albumId: albumId, - marker_: marker_, - ), - withReferenceMapper: (p0) => p0 - .map( - (e) => ( - e.readTable(table), - i1.$$LocalAlbumAssetEntityTableReferences(db, table, e), - ), - ) - .toList(), - prefetchHooksCallback: ({assetId = false, albumId = false}) { - return i0.PrefetchHooks( - db: db, - explicitlyWatchedTables: [], - addJoins: - < - T extends i0.TableManagerState< - dynamic, - dynamic, - dynamic, - dynamic, - dynamic, - dynamic, - dynamic, - dynamic, - dynamic, - dynamic, - dynamic - > - >(state) { - if (assetId) { - state = - state.withJoin( - currentTable: table, - currentColumn: table.assetId, - referencedTable: i1 - .$$LocalAlbumAssetEntityTableReferences - ._assetIdTable(db), - referencedColumn: i1 - .$$LocalAlbumAssetEntityTableReferences - ._assetIdTable(db) - .id, - ) - as T; - } - if (albumId) { - state = - state.withJoin( - currentTable: table, - currentColumn: table.albumId, - referencedTable: i1 - .$$LocalAlbumAssetEntityTableReferences - ._albumIdTable(db), - referencedColumn: i1 - .$$LocalAlbumAssetEntityTableReferences - ._albumIdTable(db) - .id, - ) - as T; - } - - return state; - }, - getPrefetchedDataCallback: (items) async { - return []; - }, - ); - }, - ), - ); -} - -typedef $$LocalAlbumAssetEntityTableProcessedTableManager = - i0.ProcessedTableManager< - i0.GeneratedDatabase, - i1.$LocalAlbumAssetEntityTable, - i1.LocalAlbumAssetEntityData, - i1.$$LocalAlbumAssetEntityTableFilterComposer, - i1.$$LocalAlbumAssetEntityTableOrderingComposer, - i1.$$LocalAlbumAssetEntityTableAnnotationComposer, - $$LocalAlbumAssetEntityTableCreateCompanionBuilder, - $$LocalAlbumAssetEntityTableUpdateCompanionBuilder, - (i1.LocalAlbumAssetEntityData, i1.$$LocalAlbumAssetEntityTableReferences), - i1.LocalAlbumAssetEntityData, - i0.PrefetchHooks Function({bool assetId, bool albumId}) - >; -i0.Index get idxLocalAlbumAssetAlbumAsset => i0.Index( - 'idx_local_album_asset_album_asset', - 'CREATE INDEX IF NOT EXISTS idx_local_album_asset_album_asset ON local_album_asset_entity (album_id, asset_id)', -); - -class $LocalAlbumAssetEntityTable extends i2.LocalAlbumAssetEntity - with - i0.TableInfo< - $LocalAlbumAssetEntityTable, - i1.LocalAlbumAssetEntityData - > { - @override - final i0.GeneratedDatabase attachedDatabase; - final String? _alias; - $LocalAlbumAssetEntityTable(this.attachedDatabase, [this._alias]); - static const i0.VerificationMeta _assetIdMeta = const i0.VerificationMeta( - 'assetId', - ); - @override - late final i0.GeneratedColumn assetId = i0.GeneratedColumn( - 'asset_id', - aliasedName, - false, - type: i0.DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: i0.GeneratedColumn.constraintIsAlways( - 'REFERENCES local_asset_entity (id) ON DELETE CASCADE', - ), - ); - 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, - defaultConstraints: i0.GeneratedColumn.constraintIsAlways( - 'REFERENCES local_album_entity (id) ON DELETE CASCADE', - ), - ); - static const i0.VerificationMeta _marker_Meta = const i0.VerificationMeta( - 'marker_', - ); - @override - late final i0.GeneratedColumn marker_ = i0.GeneratedColumn( - 'marker', - aliasedName, - true, - type: i0.DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: i0.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 - i0.VerificationContext validateIntegrity( - i0.Insertable instance, { - bool isInserting = false, - }) { - final context = i0.VerificationContext(); - final data = instance.toColumns(true); - if (data.containsKey('asset_id')) { - context.handle( - _assetIdMeta, - assetId.isAcceptableOrUnknown(data['asset_id']!, _assetIdMeta), - ); - } else if (isInserting) { - context.missing(_assetIdMeta); - } - if (data.containsKey('album_id')) { - context.handle( - _albumIdMeta, - albumId.isAcceptableOrUnknown(data['album_id']!, _albumIdMeta), - ); - } else if (isInserting) { - context.missing(_albumIdMeta); - } - if (data.containsKey('marker')) { - context.handle( - _marker_Meta, - marker_.isAcceptableOrUnknown(data['marker']!, _marker_Meta), - ); - } - return context; - } - - @override - Set get $primaryKey => {assetId, albumId}; - @override - i1.LocalAlbumAssetEntityData map( - Map data, { - String? tablePrefix, - }) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return i1.LocalAlbumAssetEntityData( - assetId: attachedDatabase.typeMapping.read( - i0.DriftSqlType.string, - data['${effectivePrefix}asset_id'], - )!, - albumId: attachedDatabase.typeMapping.read( - i0.DriftSqlType.string, - data['${effectivePrefix}album_id'], - )!, - marker_: attachedDatabase.typeMapping.read( - i0.DriftSqlType.bool, - data['${effectivePrefix}marker'], - ), - ); - } - - @override - $LocalAlbumAssetEntityTable createAlias(String alias) { - return $LocalAlbumAssetEntityTable(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class LocalAlbumAssetEntityData extends i0.DataClass - implements i0.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'] = i0.Variable(assetId); - map['album_id'] = i0.Variable(albumId); - if (!nullToAbsent || marker_ != null) { - map['marker'] = i0.Variable(marker_); - } - return map; - } - - factory LocalAlbumAssetEntityData.fromJson( - Map json, { - i0.ValueSerializer? serializer, - }) { - serializer ??= i0.driftRuntimeOptions.defaultSerializer; - return LocalAlbumAssetEntityData( - assetId: serializer.fromJson(json['assetId']), - albumId: serializer.fromJson(json['albumId']), - marker_: serializer.fromJson(json['marker_']), - ); - } - @override - Map toJson({i0.ValueSerializer? serializer}) { - serializer ??= i0.driftRuntimeOptions.defaultSerializer; - return { - 'assetId': serializer.toJson(assetId), - 'albumId': serializer.toJson(albumId), - 'marker_': serializer.toJson(marker_), - }; - } - - i1.LocalAlbumAssetEntityData copyWith({ - String? assetId, - String? albumId, - i0.Value marker_ = const i0.Value.absent(), - }) => i1.LocalAlbumAssetEntityData( - assetId: assetId ?? this.assetId, - albumId: albumId ?? this.albumId, - marker_: marker_.present ? marker_.value : this.marker_, - ); - LocalAlbumAssetEntityData copyWithCompanion( - i1.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 i1.LocalAlbumAssetEntityData && - other.assetId == this.assetId && - other.albumId == this.albumId && - other.marker_ == this.marker_); -} - -class LocalAlbumAssetEntityCompanion - extends i0.UpdateCompanion { - final i0.Value assetId; - final i0.Value albumId; - final i0.Value marker_; - const LocalAlbumAssetEntityCompanion({ - this.assetId = const i0.Value.absent(), - this.albumId = const i0.Value.absent(), - this.marker_ = const i0.Value.absent(), - }); - LocalAlbumAssetEntityCompanion.insert({ - required String assetId, - required String albumId, - this.marker_ = const i0.Value.absent(), - }) : assetId = i0.Value(assetId), - albumId = i0.Value(albumId); - static i0.Insertable custom({ - i0.Expression? assetId, - i0.Expression? albumId, - i0.Expression? marker_, - }) { - return i0.RawValuesInsertable({ - if (assetId != null) 'asset_id': assetId, - if (albumId != null) 'album_id': albumId, - if (marker_ != null) 'marker': marker_, - }); - } - - i1.LocalAlbumAssetEntityCompanion copyWith({ - i0.Value? assetId, - i0.Value? albumId, - i0.Value? marker_, - }) { - return i1.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'] = i0.Variable(assetId.value); - } - if (albumId.present) { - map['album_id'] = i0.Variable(albumId.value); - } - if (marker_.present) { - map['marker'] = i0.Variable(marker_.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('LocalAlbumAssetEntityCompanion(') - ..write('assetId: $assetId, ') - ..write('albumId: $albumId, ') - ..write('marker_: $marker_') - ..write(')')) - .toString(); - } -} diff --git a/mobile/lib/infrastructure/entities/local_asset.entity.drift.dart b/mobile/lib/infrastructure/entities/local_asset.entity.drift.dart deleted file mode 100644 index fe03f9b208..0000000000 --- a/mobile/lib/infrastructure/entities/local_asset.entity.drift.dart +++ /dev/null @@ -1,1354 +0,0 @@ -// dart format width=80 -// ignore_for_file: type=lint -import 'package:drift/drift.dart' as i0; -import 'package:immich_mobile/infrastructure/entities/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/local_asset.entity.dart' - as i3; -import 'package:drift/src/runtime/query_builder/query_builder.dart' as i4; - -typedef $$LocalAssetEntityTableCreateCompanionBuilder = - i1.LocalAssetEntityCompanion Function({ - required String name, - required i2.AssetType type, - i0.Value createdAt, - i0.Value updatedAt, - i0.Value width, - i0.Value height, - i0.Value durationMs, - required String id, - i0.Value checksum, - i0.Value isFavorite, - i0.Value orientation, - i0.Value iCloudId, - i0.Value adjustmentTime, - i0.Value latitude, - i0.Value longitude, - i0.Value playbackStyle, - }); -typedef $$LocalAssetEntityTableUpdateCompanionBuilder = - i1.LocalAssetEntityCompanion Function({ - i0.Value name, - i0.Value type, - i0.Value createdAt, - i0.Value updatedAt, - i0.Value width, - i0.Value height, - i0.Value durationMs, - i0.Value id, - i0.Value checksum, - i0.Value isFavorite, - i0.Value orientation, - i0.Value iCloudId, - i0.Value adjustmentTime, - i0.Value latitude, - i0.Value longitude, - i0.Value playbackStyle, - }); - -class $$LocalAssetEntityTableFilterComposer - extends i0.Composer { - $$LocalAssetEntityTableFilterComposer({ - 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 durationMs => $composableBuilder( - column: $table.durationMs, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnFilters get id => $composableBuilder( - column: $table.id, - 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), - ); - - i0.ColumnFilters get iCloudId => $composableBuilder( - column: $table.iCloudId, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnFilters get adjustmentTime => $composableBuilder( - column: $table.adjustmentTime, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnFilters get latitude => $composableBuilder( - column: $table.latitude, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnFilters get longitude => $composableBuilder( - column: $table.longitude, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnWithTypeConverterFilters< - i2.AssetPlaybackStyle, - i2.AssetPlaybackStyle, - int - > - get playbackStyle => $composableBuilder( - column: $table.playbackStyle, - builder: (column) => i0.ColumnWithTypeConverterFilters(column), - ); -} - -class $$LocalAssetEntityTableOrderingComposer - extends i0.Composer { - $$LocalAssetEntityTableOrderingComposer({ - 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 durationMs => $composableBuilder( - column: $table.durationMs, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get id => $composableBuilder( - column: $table.id, - 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), - ); - - i0.ColumnOrderings get iCloudId => $composableBuilder( - column: $table.iCloudId, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get adjustmentTime => $composableBuilder( - column: $table.adjustmentTime, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get latitude => $composableBuilder( - column: $table.latitude, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get longitude => $composableBuilder( - column: $table.longitude, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get playbackStyle => $composableBuilder( - column: $table.playbackStyle, - builder: (column) => i0.ColumnOrderings(column), - ); -} - -class $$LocalAssetEntityTableAnnotationComposer - extends i0.Composer { - $$LocalAssetEntityTableAnnotationComposer({ - 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 durationMs => $composableBuilder( - column: $table.durationMs, - builder: (column) => column, - ); - - i0.GeneratedColumn get id => - $composableBuilder(column: $table.id, 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, - ); - - i0.GeneratedColumn get iCloudId => - $composableBuilder(column: $table.iCloudId, builder: (column) => column); - - i0.GeneratedColumn get adjustmentTime => $composableBuilder( - column: $table.adjustmentTime, - builder: (column) => column, - ); - - i0.GeneratedColumn get latitude => - $composableBuilder(column: $table.latitude, builder: (column) => column); - - i0.GeneratedColumn get longitude => - $composableBuilder(column: $table.longitude, builder: (column) => column); - - i0.GeneratedColumnWithTypeConverter - get playbackStyle => $composableBuilder( - column: $table.playbackStyle, - builder: (column) => column, - ); -} - -class $$LocalAssetEntityTableTableManager - extends - i0.RootTableManager< - i0.GeneratedDatabase, - i1.$LocalAssetEntityTable, - i1.LocalAssetEntityData, - i1.$$LocalAssetEntityTableFilterComposer, - i1.$$LocalAssetEntityTableOrderingComposer, - i1.$$LocalAssetEntityTableAnnotationComposer, - $$LocalAssetEntityTableCreateCompanionBuilder, - $$LocalAssetEntityTableUpdateCompanionBuilder, - ( - i1.LocalAssetEntityData, - i0.BaseReferences< - i0.GeneratedDatabase, - i1.$LocalAssetEntityTable, - i1.LocalAssetEntityData - >, - ), - i1.LocalAssetEntityData, - i0.PrefetchHooks Function() - > { - $$LocalAssetEntityTableTableManager( - i0.GeneratedDatabase db, - i1.$LocalAssetEntityTable table, - ) : super( - i0.TableManagerState( - db: db, - table: table, - createFilteringComposer: () => - i1.$$LocalAssetEntityTableFilterComposer($db: db, $table: table), - createOrderingComposer: () => i1 - .$$LocalAssetEntityTableOrderingComposer($db: db, $table: table), - createComputedFieldComposer: () => - i1.$$LocalAssetEntityTableAnnotationComposer( - $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 durationMs = const i0.Value.absent(), - i0.Value id = 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(), - i0.Value iCloudId = const i0.Value.absent(), - i0.Value adjustmentTime = const i0.Value.absent(), - i0.Value latitude = const i0.Value.absent(), - i0.Value longitude = const i0.Value.absent(), - i0.Value playbackStyle = - const i0.Value.absent(), - }) => i1.LocalAssetEntityCompanion( - name: name, - type: type, - createdAt: createdAt, - updatedAt: updatedAt, - width: width, - height: height, - durationMs: durationMs, - id: id, - checksum: checksum, - isFavorite: isFavorite, - orientation: orientation, - iCloudId: iCloudId, - adjustmentTime: adjustmentTime, - latitude: latitude, - longitude: longitude, - playbackStyle: playbackStyle, - ), - 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 durationMs = const i0.Value.absent(), - required String id, - i0.Value checksum = const i0.Value.absent(), - i0.Value isFavorite = const i0.Value.absent(), - i0.Value orientation = const i0.Value.absent(), - i0.Value iCloudId = const i0.Value.absent(), - i0.Value adjustmentTime = const i0.Value.absent(), - i0.Value latitude = const i0.Value.absent(), - i0.Value longitude = const i0.Value.absent(), - i0.Value playbackStyle = - const i0.Value.absent(), - }) => i1.LocalAssetEntityCompanion.insert( - name: name, - type: type, - createdAt: createdAt, - updatedAt: updatedAt, - width: width, - height: height, - durationMs: durationMs, - id: id, - checksum: checksum, - isFavorite: isFavorite, - orientation: orientation, - iCloudId: iCloudId, - adjustmentTime: adjustmentTime, - latitude: latitude, - longitude: longitude, - playbackStyle: playbackStyle, - ), - withReferenceMapper: (p0) => p0 - .map((e) => (e.readTable(table), i0.BaseReferences(db, table, e))) - .toList(), - prefetchHooksCallback: null, - ), - ); -} - -typedef $$LocalAssetEntityTableProcessedTableManager = - i0.ProcessedTableManager< - i0.GeneratedDatabase, - i1.$LocalAssetEntityTable, - i1.LocalAssetEntityData, - i1.$$LocalAssetEntityTableFilterComposer, - i1.$$LocalAssetEntityTableOrderingComposer, - i1.$$LocalAssetEntityTableAnnotationComposer, - $$LocalAssetEntityTableCreateCompanionBuilder, - $$LocalAssetEntityTableUpdateCompanionBuilder, - ( - i1.LocalAssetEntityData, - i0.BaseReferences< - i0.GeneratedDatabase, - i1.$LocalAssetEntityTable, - i1.LocalAssetEntityData - >, - ), - i1.LocalAssetEntityData, - i0.PrefetchHooks Function() - >; -i0.Index get idxLocalAssetChecksum => i0.Index( - 'idx_local_asset_checksum', - 'CREATE INDEX IF NOT EXISTS idx_local_asset_checksum ON local_asset_entity (checksum)', -); - -class $LocalAssetEntityTable extends i3.LocalAssetEntity - with i0.TableInfo<$LocalAssetEntityTable, i1.LocalAssetEntityData> { - @override - final i0.GeneratedDatabase attachedDatabase; - final String? _alias; - $LocalAssetEntityTable(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.$LocalAssetEntityTable.$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 _durationMsMeta = const i0.VerificationMeta( - 'durationMs', - ); - @override - late final i0.GeneratedColumn durationMs = i0.GeneratedColumn( - 'duration_ms', - 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 _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), - ); - static const i0.VerificationMeta _iCloudIdMeta = const i0.VerificationMeta( - 'iCloudId', - ); - @override - late final i0.GeneratedColumn iCloudId = i0.GeneratedColumn( - 'i_cloud_id', - aliasedName, - true, - type: i0.DriftSqlType.string, - requiredDuringInsert: false, - ); - static const i0.VerificationMeta _adjustmentTimeMeta = - const i0.VerificationMeta('adjustmentTime'); - @override - late final i0.GeneratedColumn adjustmentTime = - i0.GeneratedColumn( - 'adjustment_time', - aliasedName, - true, - type: i0.DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - static const i0.VerificationMeta _latitudeMeta = const i0.VerificationMeta( - 'latitude', - ); - @override - late final i0.GeneratedColumn latitude = i0.GeneratedColumn( - 'latitude', - aliasedName, - true, - type: i0.DriftSqlType.double, - requiredDuringInsert: false, - ); - static const i0.VerificationMeta _longitudeMeta = const i0.VerificationMeta( - 'longitude', - ); - @override - late final i0.GeneratedColumn longitude = i0.GeneratedColumn( - 'longitude', - aliasedName, - true, - type: i0.DriftSqlType.double, - requiredDuringInsert: false, - ); - @override - late final i0.GeneratedColumnWithTypeConverter - playbackStyle = - i0.GeneratedColumn( - 'playback_style', - aliasedName, - false, - type: i0.DriftSqlType.int, - requiredDuringInsert: false, - defaultValue: const i4.Constant(0), - ).withConverter( - i1.$LocalAssetEntityTable.$converterplaybackStyle, - ); - @override - List get $columns => [ - name, - type, - createdAt, - updatedAt, - width, - height, - durationMs, - id, - checksum, - isFavorite, - orientation, - iCloudId, - adjustmentTime, - latitude, - longitude, - playbackStyle, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = '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_ms')) { - context.handle( - _durationMsMeta, - durationMs.isAcceptableOrUnknown(data['duration_ms']!, _durationMsMeta), - ); - } - if (data.containsKey('id')) { - context.handle(_idMeta, id.isAcceptableOrUnknown(data['id']!, _idMeta)); - } else if (isInserting) { - context.missing(_idMeta); - } - 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, - ), - ); - } - if (data.containsKey('i_cloud_id')) { - context.handle( - _iCloudIdMeta, - iCloudId.isAcceptableOrUnknown(data['i_cloud_id']!, _iCloudIdMeta), - ); - } - if (data.containsKey('adjustment_time')) { - context.handle( - _adjustmentTimeMeta, - adjustmentTime.isAcceptableOrUnknown( - data['adjustment_time']!, - _adjustmentTimeMeta, - ), - ); - } - if (data.containsKey('latitude')) { - context.handle( - _latitudeMeta, - latitude.isAcceptableOrUnknown(data['latitude']!, _latitudeMeta), - ); - } - if (data.containsKey('longitude')) { - context.handle( - _longitudeMeta, - longitude.isAcceptableOrUnknown(data['longitude']!, _longitudeMeta), - ); - } - return context; - } - - @override - Set get $primaryKey => {id}; - @override - i1.LocalAssetEntityData map( - Map data, { - String? tablePrefix, - }) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return i1.LocalAssetEntityData( - name: attachedDatabase.typeMapping.read( - i0.DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - type: i1.$LocalAssetEntityTable.$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'], - ), - durationMs: attachedDatabase.typeMapping.read( - i0.DriftSqlType.int, - data['${effectivePrefix}duration_ms'], - ), - id: attachedDatabase.typeMapping.read( - i0.DriftSqlType.string, - data['${effectivePrefix}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'], - )!, - iCloudId: attachedDatabase.typeMapping.read( - i0.DriftSqlType.string, - data['${effectivePrefix}i_cloud_id'], - ), - adjustmentTime: attachedDatabase.typeMapping.read( - i0.DriftSqlType.dateTime, - data['${effectivePrefix}adjustment_time'], - ), - latitude: attachedDatabase.typeMapping.read( - i0.DriftSqlType.double, - data['${effectivePrefix}latitude'], - ), - longitude: attachedDatabase.typeMapping.read( - i0.DriftSqlType.double, - data['${effectivePrefix}longitude'], - ), - playbackStyle: i1.$LocalAssetEntityTable.$converterplaybackStyle.fromSql( - attachedDatabase.typeMapping.read( - i0.DriftSqlType.int, - data['${effectivePrefix}playback_style'], - )!, - ), - ); - } - - @override - $LocalAssetEntityTable createAlias(String alias) { - return $LocalAssetEntityTable(attachedDatabase, alias); - } - - static i0.JsonTypeConverter2 $convertertype = - const i0.EnumIndexConverter(i2.AssetType.values); - static i0.JsonTypeConverter2 - $converterplaybackStyle = const i0.EnumIndexConverter( - i2.AssetPlaybackStyle.values, - ); - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class LocalAssetEntityData 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? durationMs; - final String id; - final String? checksum; - final bool isFavorite; - final int orientation; - final String? iCloudId; - final DateTime? adjustmentTime; - final double? latitude; - final double? longitude; - final i2.AssetPlaybackStyle playbackStyle; - const LocalAssetEntityData({ - required this.name, - required this.type, - required this.createdAt, - required this.updatedAt, - this.width, - this.height, - this.durationMs, - required this.id, - this.checksum, - required this.isFavorite, - required this.orientation, - this.iCloudId, - this.adjustmentTime, - this.latitude, - this.longitude, - required this.playbackStyle, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['name'] = i0.Variable(name); - { - map['type'] = i0.Variable( - i1.$LocalAssetEntityTable.$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 || durationMs != null) { - map['duration_ms'] = i0.Variable(durationMs); - } - map['id'] = i0.Variable(id); - if (!nullToAbsent || checksum != null) { - map['checksum'] = i0.Variable(checksum); - } - map['is_favorite'] = i0.Variable(isFavorite); - map['orientation'] = i0.Variable(orientation); - if (!nullToAbsent || iCloudId != null) { - map['i_cloud_id'] = i0.Variable(iCloudId); - } - if (!nullToAbsent || adjustmentTime != null) { - map['adjustment_time'] = i0.Variable(adjustmentTime); - } - if (!nullToAbsent || latitude != null) { - map['latitude'] = i0.Variable(latitude); - } - if (!nullToAbsent || longitude != null) { - map['longitude'] = i0.Variable(longitude); - } - { - map['playback_style'] = i0.Variable( - i1.$LocalAssetEntityTable.$converterplaybackStyle.toSql(playbackStyle), - ); - } - return map; - } - - factory LocalAssetEntityData.fromJson( - Map json, { - i0.ValueSerializer? serializer, - }) { - serializer ??= i0.driftRuntimeOptions.defaultSerializer; - return LocalAssetEntityData( - name: serializer.fromJson(json['name']), - type: i1.$LocalAssetEntityTable.$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']), - durationMs: serializer.fromJson(json['durationMs']), - id: serializer.fromJson(json['id']), - checksum: serializer.fromJson(json['checksum']), - isFavorite: serializer.fromJson(json['isFavorite']), - orientation: serializer.fromJson(json['orientation']), - iCloudId: serializer.fromJson(json['iCloudId']), - adjustmentTime: serializer.fromJson(json['adjustmentTime']), - latitude: serializer.fromJson(json['latitude']), - longitude: serializer.fromJson(json['longitude']), - playbackStyle: i1.$LocalAssetEntityTable.$converterplaybackStyle.fromJson( - serializer.fromJson(json['playbackStyle']), - ), - ); - } - @override - Map toJson({i0.ValueSerializer? serializer}) { - serializer ??= i0.driftRuntimeOptions.defaultSerializer; - return { - 'name': serializer.toJson(name), - 'type': serializer.toJson( - i1.$LocalAssetEntityTable.$convertertype.toJson(type), - ), - 'createdAt': serializer.toJson(createdAt), - 'updatedAt': serializer.toJson(updatedAt), - 'width': serializer.toJson(width), - 'height': serializer.toJson(height), - 'durationMs': serializer.toJson(durationMs), - 'id': serializer.toJson(id), - 'checksum': serializer.toJson(checksum), - 'isFavorite': serializer.toJson(isFavorite), - 'orientation': serializer.toJson(orientation), - 'iCloudId': serializer.toJson(iCloudId), - 'adjustmentTime': serializer.toJson(adjustmentTime), - 'latitude': serializer.toJson(latitude), - 'longitude': serializer.toJson(longitude), - 'playbackStyle': serializer.toJson( - i1.$LocalAssetEntityTable.$converterplaybackStyle.toJson(playbackStyle), - ), - }; - } - - i1.LocalAssetEntityData 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 durationMs = const i0.Value.absent(), - String? id, - i0.Value checksum = const i0.Value.absent(), - bool? isFavorite, - int? orientation, - i0.Value iCloudId = const i0.Value.absent(), - i0.Value adjustmentTime = const i0.Value.absent(), - i0.Value latitude = const i0.Value.absent(), - i0.Value longitude = const i0.Value.absent(), - i2.AssetPlaybackStyle? playbackStyle, - }) => i1.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, - durationMs: durationMs.present ? durationMs.value : this.durationMs, - id: id ?? this.id, - checksum: checksum.present ? checksum.value : this.checksum, - isFavorite: isFavorite ?? this.isFavorite, - orientation: orientation ?? this.orientation, - iCloudId: iCloudId.present ? iCloudId.value : this.iCloudId, - adjustmentTime: adjustmentTime.present - ? adjustmentTime.value - : this.adjustmentTime, - latitude: latitude.present ? latitude.value : this.latitude, - longitude: longitude.present ? longitude.value : this.longitude, - playbackStyle: playbackStyle ?? this.playbackStyle, - ); - LocalAssetEntityData copyWithCompanion(i1.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, - durationMs: data.durationMs.present - ? data.durationMs.value - : this.durationMs, - 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, - iCloudId: data.iCloudId.present ? data.iCloudId.value : this.iCloudId, - adjustmentTime: data.adjustmentTime.present - ? data.adjustmentTime.value - : this.adjustmentTime, - latitude: data.latitude.present ? data.latitude.value : this.latitude, - longitude: data.longitude.present ? data.longitude.value : this.longitude, - playbackStyle: data.playbackStyle.present - ? data.playbackStyle.value - : this.playbackStyle, - ); - } - - @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('durationMs: $durationMs, ') - ..write('id: $id, ') - ..write('checksum: $checksum, ') - ..write('isFavorite: $isFavorite, ') - ..write('orientation: $orientation, ') - ..write('iCloudId: $iCloudId, ') - ..write('adjustmentTime: $adjustmentTime, ') - ..write('latitude: $latitude, ') - ..write('longitude: $longitude, ') - ..write('playbackStyle: $playbackStyle') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - name, - type, - createdAt, - updatedAt, - width, - height, - durationMs, - id, - checksum, - isFavorite, - orientation, - iCloudId, - adjustmentTime, - latitude, - longitude, - playbackStyle, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is i1.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.durationMs == this.durationMs && - other.id == this.id && - other.checksum == this.checksum && - other.isFavorite == this.isFavorite && - other.orientation == this.orientation && - other.iCloudId == this.iCloudId && - other.adjustmentTime == this.adjustmentTime && - other.latitude == this.latitude && - other.longitude == this.longitude && - other.playbackStyle == this.playbackStyle); -} - -class LocalAssetEntityCompanion - 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 durationMs; - final i0.Value id; - final i0.Value checksum; - final i0.Value isFavorite; - final i0.Value orientation; - final i0.Value iCloudId; - final i0.Value adjustmentTime; - final i0.Value latitude; - final i0.Value longitude; - final i0.Value playbackStyle; - const LocalAssetEntityCompanion({ - 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.durationMs = const i0.Value.absent(), - this.id = const i0.Value.absent(), - this.checksum = const i0.Value.absent(), - this.isFavorite = const i0.Value.absent(), - this.orientation = const i0.Value.absent(), - this.iCloudId = const i0.Value.absent(), - this.adjustmentTime = const i0.Value.absent(), - this.latitude = const i0.Value.absent(), - this.longitude = const i0.Value.absent(), - this.playbackStyle = const i0.Value.absent(), - }); - LocalAssetEntityCompanion.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.durationMs = const i0.Value.absent(), - required String id, - this.checksum = const i0.Value.absent(), - this.isFavorite = const i0.Value.absent(), - this.orientation = const i0.Value.absent(), - this.iCloudId = const i0.Value.absent(), - this.adjustmentTime = const i0.Value.absent(), - this.latitude = const i0.Value.absent(), - this.longitude = const i0.Value.absent(), - this.playbackStyle = const i0.Value.absent(), - }) : name = i0.Value(name), - type = i0.Value(type), - id = i0.Value(id); - static i0.Insertable custom({ - i0.Expression? name, - i0.Expression? type, - i0.Expression? createdAt, - i0.Expression? updatedAt, - i0.Expression? width, - i0.Expression? height, - i0.Expression? durationMs, - i0.Expression? id, - i0.Expression? checksum, - i0.Expression? isFavorite, - i0.Expression? orientation, - i0.Expression? iCloudId, - i0.Expression? adjustmentTime, - i0.Expression? latitude, - i0.Expression? longitude, - i0.Expression? playbackStyle, - }) { - 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 (durationMs != null) 'duration_ms': durationMs, - if (id != null) 'id': id, - if (checksum != null) 'checksum': checksum, - if (isFavorite != null) 'is_favorite': isFavorite, - if (orientation != null) 'orientation': orientation, - if (iCloudId != null) 'i_cloud_id': iCloudId, - if (adjustmentTime != null) 'adjustment_time': adjustmentTime, - if (latitude != null) 'latitude': latitude, - if (longitude != null) 'longitude': longitude, - if (playbackStyle != null) 'playback_style': playbackStyle, - }); - } - - i1.LocalAssetEntityCompanion copyWith({ - i0.Value? name, - i0.Value? type, - i0.Value? createdAt, - i0.Value? updatedAt, - i0.Value? width, - i0.Value? height, - i0.Value? durationMs, - i0.Value? id, - i0.Value? checksum, - i0.Value? isFavorite, - i0.Value? orientation, - i0.Value? iCloudId, - i0.Value? adjustmentTime, - i0.Value? latitude, - i0.Value? longitude, - i0.Value? playbackStyle, - }) { - return i1.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, - durationMs: durationMs ?? this.durationMs, - id: id ?? this.id, - checksum: checksum ?? this.checksum, - isFavorite: isFavorite ?? this.isFavorite, - orientation: orientation ?? this.orientation, - iCloudId: iCloudId ?? this.iCloudId, - adjustmentTime: adjustmentTime ?? this.adjustmentTime, - latitude: latitude ?? this.latitude, - longitude: longitude ?? this.longitude, - playbackStyle: playbackStyle ?? this.playbackStyle, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (name.present) { - map['name'] = i0.Variable(name.value); - } - if (type.present) { - map['type'] = i0.Variable( - i1.$LocalAssetEntityTable.$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 (durationMs.present) { - map['duration_ms'] = i0.Variable(durationMs.value); - } - if (id.present) { - map['id'] = i0.Variable(id.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); - } - if (iCloudId.present) { - map['i_cloud_id'] = i0.Variable(iCloudId.value); - } - if (adjustmentTime.present) { - map['adjustment_time'] = i0.Variable(adjustmentTime.value); - } - if (latitude.present) { - map['latitude'] = i0.Variable(latitude.value); - } - if (longitude.present) { - map['longitude'] = i0.Variable(longitude.value); - } - if (playbackStyle.present) { - map['playback_style'] = i0.Variable( - i1.$LocalAssetEntityTable.$converterplaybackStyle.toSql( - playbackStyle.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('durationMs: $durationMs, ') - ..write('id: $id, ') - ..write('checksum: $checksum, ') - ..write('isFavorite: $isFavorite, ') - ..write('orientation: $orientation, ') - ..write('iCloudId: $iCloudId, ') - ..write('adjustmentTime: $adjustmentTime, ') - ..write('latitude: $latitude, ') - ..write('longitude: $longitude, ') - ..write('playbackStyle: $playbackStyle') - ..write(')')) - .toString(); - } -} - -i0.Index get idxLocalAssetCloudId => i0.Index( - 'idx_local_asset_cloud_id', - 'CREATE INDEX IF NOT EXISTS idx_local_asset_cloud_id ON local_asset_entity (i_cloud_id)', -); -i0.Index get idxLocalAssetCreatedAt => i0.Index( - 'idx_local_asset_created_at', - 'CREATE INDEX IF NOT EXISTS idx_local_asset_created_at ON local_asset_entity (created_at)', -); diff --git a/mobile/lib/infrastructure/entities/log.entity.dart b/mobile/lib/infrastructure/entities/log.entity.dart index e578459827..264bd3331f 100644 --- a/mobile/lib/infrastructure/entities/log.entity.dart +++ b/mobile/lib/infrastructure/entities/log.entity.dart @@ -1,6 +1,6 @@ import 'package:drift/drift.dart'; -import 'package:immich_mobile/infrastructure/entities/log.entity.drift.dart'; import 'package:immich_mobile/domain/models/log.model.dart' as domain; +import 'package:immich_mobile/infrastructure/entities/log.entity.drift.dart'; class LogMessageEntity extends Table { const LogMessageEntity(); diff --git a/mobile/lib/infrastructure/entities/log.entity.drift.dart b/mobile/lib/infrastructure/entities/log.entity.drift.dart deleted file mode 100644 index d04cd5b7a2..0000000000 --- a/mobile/lib/infrastructure/entities/log.entity.drift.dart +++ /dev/null @@ -1,697 +0,0 @@ -// dart format width=80 -// ignore_for_file: type=lint -import 'package:drift/drift.dart' as i0; -import 'package:immich_mobile/infrastructure/entities/log.entity.drift.dart' - as i1; -import 'package:immich_mobile/domain/models/log.model.dart' as i2; -import 'package:immich_mobile/infrastructure/entities/log.entity.dart' as i3; - -typedef $$LogMessageEntityTableCreateCompanionBuilder = - i1.LogMessageEntityCompanion Function({ - i0.Value id, - required String message, - i0.Value details, - required i2.LogLevel level, - required DateTime createdAt, - i0.Value logger, - i0.Value stack, - }); -typedef $$LogMessageEntityTableUpdateCompanionBuilder = - i1.LogMessageEntityCompanion Function({ - i0.Value id, - i0.Value message, - i0.Value details, - i0.Value level, - i0.Value createdAt, - i0.Value logger, - i0.Value stack, - }); - -class $$LogMessageEntityTableFilterComposer - extends i0.Composer { - $$LogMessageEntityTableFilterComposer({ - required super.$db, - required super.$table, - super.joinBuilder, - super.$addJoinBuilderToRootComposer, - super.$removeJoinBuilderFromRootComposer, - }); - i0.ColumnFilters get id => $composableBuilder( - column: $table.id, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnFilters get message => $composableBuilder( - column: $table.message, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnFilters get details => $composableBuilder( - column: $table.details, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnWithTypeConverterFilters get level => - $composableBuilder( - column: $table.level, - builder: (column) => i0.ColumnWithTypeConverterFilters(column), - ); - - i0.ColumnFilters get createdAt => $composableBuilder( - column: $table.createdAt, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnFilters get logger => $composableBuilder( - column: $table.logger, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnFilters get stack => $composableBuilder( - column: $table.stack, - builder: (column) => i0.ColumnFilters(column), - ); -} - -class $$LogMessageEntityTableOrderingComposer - extends i0.Composer { - $$LogMessageEntityTableOrderingComposer({ - required super.$db, - required super.$table, - super.joinBuilder, - super.$addJoinBuilderToRootComposer, - super.$removeJoinBuilderFromRootComposer, - }); - i0.ColumnOrderings get id => $composableBuilder( - column: $table.id, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get message => $composableBuilder( - column: $table.message, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get details => $composableBuilder( - column: $table.details, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get level => $composableBuilder( - column: $table.level, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get createdAt => $composableBuilder( - column: $table.createdAt, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get logger => $composableBuilder( - column: $table.logger, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get stack => $composableBuilder( - column: $table.stack, - builder: (column) => i0.ColumnOrderings(column), - ); -} - -class $$LogMessageEntityTableAnnotationComposer - extends i0.Composer { - $$LogMessageEntityTableAnnotationComposer({ - required super.$db, - required super.$table, - super.joinBuilder, - super.$addJoinBuilderToRootComposer, - super.$removeJoinBuilderFromRootComposer, - }); - i0.GeneratedColumn get id => - $composableBuilder(column: $table.id, builder: (column) => column); - - i0.GeneratedColumn get message => - $composableBuilder(column: $table.message, builder: (column) => column); - - i0.GeneratedColumn get details => - $composableBuilder(column: $table.details, builder: (column) => column); - - i0.GeneratedColumnWithTypeConverter get level => - $composableBuilder(column: $table.level, builder: (column) => column); - - i0.GeneratedColumn get createdAt => - $composableBuilder(column: $table.createdAt, builder: (column) => column); - - i0.GeneratedColumn get logger => - $composableBuilder(column: $table.logger, builder: (column) => column); - - i0.GeneratedColumn get stack => - $composableBuilder(column: $table.stack, builder: (column) => column); -} - -class $$LogMessageEntityTableTableManager - extends - i0.RootTableManager< - i0.GeneratedDatabase, - i1.$LogMessageEntityTable, - i1.LogMessageEntityData, - i1.$$LogMessageEntityTableFilterComposer, - i1.$$LogMessageEntityTableOrderingComposer, - i1.$$LogMessageEntityTableAnnotationComposer, - $$LogMessageEntityTableCreateCompanionBuilder, - $$LogMessageEntityTableUpdateCompanionBuilder, - ( - i1.LogMessageEntityData, - i0.BaseReferences< - i0.GeneratedDatabase, - i1.$LogMessageEntityTable, - i1.LogMessageEntityData - >, - ), - i1.LogMessageEntityData, - i0.PrefetchHooks Function() - > { - $$LogMessageEntityTableTableManager( - i0.GeneratedDatabase db, - i1.$LogMessageEntityTable table, - ) : super( - i0.TableManagerState( - db: db, - table: table, - createFilteringComposer: () => - i1.$$LogMessageEntityTableFilterComposer($db: db, $table: table), - createOrderingComposer: () => i1 - .$$LogMessageEntityTableOrderingComposer($db: db, $table: table), - createComputedFieldComposer: () => - i1.$$LogMessageEntityTableAnnotationComposer( - $db: db, - $table: table, - ), - updateCompanionCallback: - ({ - i0.Value id = const i0.Value.absent(), - i0.Value message = const i0.Value.absent(), - i0.Value details = const i0.Value.absent(), - i0.Value level = const i0.Value.absent(), - i0.Value createdAt = const i0.Value.absent(), - i0.Value logger = const i0.Value.absent(), - i0.Value stack = const i0.Value.absent(), - }) => i1.LogMessageEntityCompanion( - id: id, - message: message, - details: details, - level: level, - createdAt: createdAt, - logger: logger, - stack: stack, - ), - createCompanionCallback: - ({ - i0.Value id = const i0.Value.absent(), - required String message, - i0.Value details = const i0.Value.absent(), - required i2.LogLevel level, - required DateTime createdAt, - i0.Value logger = const i0.Value.absent(), - i0.Value stack = const i0.Value.absent(), - }) => i1.LogMessageEntityCompanion.insert( - id: id, - message: message, - details: details, - level: level, - createdAt: createdAt, - logger: logger, - stack: stack, - ), - withReferenceMapper: (p0) => p0 - .map((e) => (e.readTable(table), i0.BaseReferences(db, table, e))) - .toList(), - prefetchHooksCallback: null, - ), - ); -} - -typedef $$LogMessageEntityTableProcessedTableManager = - i0.ProcessedTableManager< - i0.GeneratedDatabase, - i1.$LogMessageEntityTable, - i1.LogMessageEntityData, - i1.$$LogMessageEntityTableFilterComposer, - i1.$$LogMessageEntityTableOrderingComposer, - i1.$$LogMessageEntityTableAnnotationComposer, - $$LogMessageEntityTableCreateCompanionBuilder, - $$LogMessageEntityTableUpdateCompanionBuilder, - ( - i1.LogMessageEntityData, - i0.BaseReferences< - i0.GeneratedDatabase, - i1.$LogMessageEntityTable, - i1.LogMessageEntityData - >, - ), - i1.LogMessageEntityData, - i0.PrefetchHooks Function() - >; - -class $LogMessageEntityTable extends i3.LogMessageEntity - with i0.TableInfo<$LogMessageEntityTable, i1.LogMessageEntityData> { - @override - final i0.GeneratedDatabase attachedDatabase; - final String? _alias; - $LogMessageEntityTable(this.attachedDatabase, [this._alias]); - static const i0.VerificationMeta _idMeta = const i0.VerificationMeta('id'); - @override - late final i0.GeneratedColumn id = i0.GeneratedColumn( - 'id', - aliasedName, - false, - hasAutoIncrement: true, - type: i0.DriftSqlType.int, - requiredDuringInsert: false, - defaultConstraints: i0.GeneratedColumn.constraintIsAlways( - 'PRIMARY KEY AUTOINCREMENT', - ), - ); - static const i0.VerificationMeta _messageMeta = const i0.VerificationMeta( - 'message', - ); - @override - late final i0.GeneratedColumn message = i0.GeneratedColumn( - 'message', - aliasedName, - false, - type: i0.DriftSqlType.string, - requiredDuringInsert: true, - ); - static const i0.VerificationMeta _detailsMeta = const i0.VerificationMeta( - 'details', - ); - @override - late final i0.GeneratedColumn details = i0.GeneratedColumn( - 'details', - aliasedName, - true, - type: i0.DriftSqlType.string, - requiredDuringInsert: false, - ); - @override - late final i0.GeneratedColumnWithTypeConverter level = - i0.GeneratedColumn( - 'level', - aliasedName, - false, - type: i0.DriftSqlType.int, - requiredDuringInsert: true, - ).withConverter(i1.$LogMessageEntityTable.$converterlevel); - 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: true, - ); - static const i0.VerificationMeta _loggerMeta = const i0.VerificationMeta( - 'logger', - ); - @override - late final i0.GeneratedColumn logger = i0.GeneratedColumn( - 'logger', - aliasedName, - true, - type: i0.DriftSqlType.string, - requiredDuringInsert: false, - ); - static const i0.VerificationMeta _stackMeta = const i0.VerificationMeta( - 'stack', - ); - @override - late final i0.GeneratedColumn stack = i0.GeneratedColumn( - 'stack', - aliasedName, - true, - type: i0.DriftSqlType.string, - requiredDuringInsert: false, - ); - @override - List get $columns => [ - id, - message, - details, - level, - createdAt, - logger, - stack, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'logger_messages'; - @override - i0.VerificationContext validateIntegrity( - i0.Insertable instance, { - bool isInserting = false, - }) { - final context = i0.VerificationContext(); - final data = instance.toColumns(true); - if (data.containsKey('id')) { - context.handle(_idMeta, id.isAcceptableOrUnknown(data['id']!, _idMeta)); - } - if (data.containsKey('message')) { - context.handle( - _messageMeta, - message.isAcceptableOrUnknown(data['message']!, _messageMeta), - ); - } else if (isInserting) { - context.missing(_messageMeta); - } - if (data.containsKey('details')) { - context.handle( - _detailsMeta, - details.isAcceptableOrUnknown(data['details']!, _detailsMeta), - ); - } - if (data.containsKey('created_at')) { - context.handle( - _createdAtMeta, - createdAt.isAcceptableOrUnknown(data['created_at']!, _createdAtMeta), - ); - } else if (isInserting) { - context.missing(_createdAtMeta); - } - if (data.containsKey('logger')) { - context.handle( - _loggerMeta, - logger.isAcceptableOrUnknown(data['logger']!, _loggerMeta), - ); - } - if (data.containsKey('stack')) { - context.handle( - _stackMeta, - stack.isAcceptableOrUnknown(data['stack']!, _stackMeta), - ); - } - return context; - } - - @override - Set get $primaryKey => {id}; - @override - i1.LogMessageEntityData map( - Map data, { - String? tablePrefix, - }) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return i1.LogMessageEntityData( - id: attachedDatabase.typeMapping.read( - i0.DriftSqlType.int, - data['${effectivePrefix}id'], - )!, - message: attachedDatabase.typeMapping.read( - i0.DriftSqlType.string, - data['${effectivePrefix}message'], - )!, - details: attachedDatabase.typeMapping.read( - i0.DriftSqlType.string, - data['${effectivePrefix}details'], - ), - level: i1.$LogMessageEntityTable.$converterlevel.fromSql( - attachedDatabase.typeMapping.read( - i0.DriftSqlType.int, - data['${effectivePrefix}level'], - )!, - ), - createdAt: attachedDatabase.typeMapping.read( - i0.DriftSqlType.dateTime, - data['${effectivePrefix}created_at'], - )!, - logger: attachedDatabase.typeMapping.read( - i0.DriftSqlType.string, - data['${effectivePrefix}logger'], - ), - stack: attachedDatabase.typeMapping.read( - i0.DriftSqlType.string, - data['${effectivePrefix}stack'], - ), - ); - } - - @override - $LogMessageEntityTable createAlias(String alias) { - return $LogMessageEntityTable(attachedDatabase, alias); - } - - static i0.JsonTypeConverter2 $converterlevel = - const i0.EnumIndexConverter(i2.LogLevel.values); -} - -class LogMessageEntityData extends i0.DataClass - implements i0.Insertable { - final int id; - final String message; - final String? details; - final i2.LogLevel level; - final DateTime createdAt; - final String? logger; - final String? stack; - const LogMessageEntityData({ - required this.id, - required this.message, - this.details, - required this.level, - required this.createdAt, - this.logger, - this.stack, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = i0.Variable(id); - map['message'] = i0.Variable(message); - if (!nullToAbsent || details != null) { - map['details'] = i0.Variable(details); - } - { - map['level'] = i0.Variable( - i1.$LogMessageEntityTable.$converterlevel.toSql(level), - ); - } - map['created_at'] = i0.Variable(createdAt); - if (!nullToAbsent || logger != null) { - map['logger'] = i0.Variable(logger); - } - if (!nullToAbsent || stack != null) { - map['stack'] = i0.Variable(stack); - } - return map; - } - - factory LogMessageEntityData.fromJson( - Map json, { - i0.ValueSerializer? serializer, - }) { - serializer ??= i0.driftRuntimeOptions.defaultSerializer; - return LogMessageEntityData( - id: serializer.fromJson(json['id']), - message: serializer.fromJson(json['message']), - details: serializer.fromJson(json['details']), - level: i1.$LogMessageEntityTable.$converterlevel.fromJson( - serializer.fromJson(json['level']), - ), - createdAt: serializer.fromJson(json['createdAt']), - logger: serializer.fromJson(json['logger']), - stack: serializer.fromJson(json['stack']), - ); - } - @override - Map toJson({i0.ValueSerializer? serializer}) { - serializer ??= i0.driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'message': serializer.toJson(message), - 'details': serializer.toJson(details), - 'level': serializer.toJson( - i1.$LogMessageEntityTable.$converterlevel.toJson(level), - ), - 'createdAt': serializer.toJson(createdAt), - 'logger': serializer.toJson(logger), - 'stack': serializer.toJson(stack), - }; - } - - i1.LogMessageEntityData copyWith({ - int? id, - String? message, - i0.Value details = const i0.Value.absent(), - i2.LogLevel? level, - DateTime? createdAt, - i0.Value logger = const i0.Value.absent(), - i0.Value stack = const i0.Value.absent(), - }) => i1.LogMessageEntityData( - id: id ?? this.id, - message: message ?? this.message, - details: details.present ? details.value : this.details, - level: level ?? this.level, - createdAt: createdAt ?? this.createdAt, - logger: logger.present ? logger.value : this.logger, - stack: stack.present ? stack.value : this.stack, - ); - LogMessageEntityData copyWithCompanion(i1.LogMessageEntityCompanion data) { - return LogMessageEntityData( - id: data.id.present ? data.id.value : this.id, - message: data.message.present ? data.message.value : this.message, - details: data.details.present ? data.details.value : this.details, - level: data.level.present ? data.level.value : this.level, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - logger: data.logger.present ? data.logger.value : this.logger, - stack: data.stack.present ? data.stack.value : this.stack, - ); - } - - @override - String toString() { - return (StringBuffer('LogMessageEntityData(') - ..write('id: $id, ') - ..write('message: $message, ') - ..write('details: $details, ') - ..write('level: $level, ') - ..write('createdAt: $createdAt, ') - ..write('logger: $logger, ') - ..write('stack: $stack') - ..write(')')) - .toString(); - } - - @override - int get hashCode => - Object.hash(id, message, details, level, createdAt, logger, stack); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is i1.LogMessageEntityData && - other.id == this.id && - other.message == this.message && - other.details == this.details && - other.level == this.level && - other.createdAt == this.createdAt && - other.logger == this.logger && - other.stack == this.stack); -} - -class LogMessageEntityCompanion - extends i0.UpdateCompanion { - final i0.Value id; - final i0.Value message; - final i0.Value details; - final i0.Value level; - final i0.Value createdAt; - final i0.Value logger; - final i0.Value stack; - const LogMessageEntityCompanion({ - this.id = const i0.Value.absent(), - this.message = const i0.Value.absent(), - this.details = const i0.Value.absent(), - this.level = const i0.Value.absent(), - this.createdAt = const i0.Value.absent(), - this.logger = const i0.Value.absent(), - this.stack = const i0.Value.absent(), - }); - LogMessageEntityCompanion.insert({ - this.id = const i0.Value.absent(), - required String message, - this.details = const i0.Value.absent(), - required i2.LogLevel level, - required DateTime createdAt, - this.logger = const i0.Value.absent(), - this.stack = const i0.Value.absent(), - }) : message = i0.Value(message), - level = i0.Value(level), - createdAt = i0.Value(createdAt); - static i0.Insertable custom({ - i0.Expression? id, - i0.Expression? message, - i0.Expression? details, - i0.Expression? level, - i0.Expression? createdAt, - i0.Expression? logger, - i0.Expression? stack, - }) { - return i0.RawValuesInsertable({ - if (id != null) 'id': id, - if (message != null) 'message': message, - if (details != null) 'details': details, - if (level != null) 'level': level, - if (createdAt != null) 'created_at': createdAt, - if (logger != null) 'logger': logger, - if (stack != null) 'stack': stack, - }); - } - - i1.LogMessageEntityCompanion copyWith({ - i0.Value? id, - i0.Value? message, - i0.Value? details, - i0.Value? level, - i0.Value? createdAt, - i0.Value? logger, - i0.Value? stack, - }) { - return i1.LogMessageEntityCompanion( - id: id ?? this.id, - message: message ?? this.message, - details: details ?? this.details, - level: level ?? this.level, - createdAt: createdAt ?? this.createdAt, - logger: logger ?? this.logger, - stack: stack ?? this.stack, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = i0.Variable(id.value); - } - if (message.present) { - map['message'] = i0.Variable(message.value); - } - if (details.present) { - map['details'] = i0.Variable(details.value); - } - if (level.present) { - map['level'] = i0.Variable( - i1.$LogMessageEntityTable.$converterlevel.toSql(level.value), - ); - } - if (createdAt.present) { - map['created_at'] = i0.Variable(createdAt.value); - } - if (logger.present) { - map['logger'] = i0.Variable(logger.value); - } - if (stack.present) { - map['stack'] = i0.Variable(stack.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('LogMessageEntityCompanion(') - ..write('id: $id, ') - ..write('message: $message, ') - ..write('details: $details, ') - ..write('level: $level, ') - ..write('createdAt: $createdAt, ') - ..write('logger: $logger, ') - ..write('stack: $stack') - ..write(')')) - .toString(); - } -} diff --git a/mobile/lib/infrastructure/entities/memory.entity.drift.dart b/mobile/lib/infrastructure/entities/memory.entity.drift.dart deleted file mode 100644 index f5f18695a5..0000000000 --- a/mobile/lib/infrastructure/entities/memory.entity.drift.dart +++ /dev/null @@ -1,1179 +0,0 @@ -// dart format width=80 -// ignore_for_file: type=lint -import 'package:drift/drift.dart' as i0; -import 'package:immich_mobile/infrastructure/entities/memory.entity.drift.dart' - as i1; -import 'package:immich_mobile/domain/models/memory.model.dart' as i2; -import 'package:immich_mobile/infrastructure/entities/memory.entity.dart' as i3; -import 'package:drift/src/runtime/query_builder/query_builder.dart' as i4; -import 'package:immich_mobile/infrastructure/entities/user.entity.drift.dart' - as i5; -import 'package:drift/internal/modular.dart' as i6; - -typedef $$MemoryEntityTableCreateCompanionBuilder = - i1.MemoryEntityCompanion Function({ - required String id, - i0.Value createdAt, - i0.Value updatedAt, - i0.Value deletedAt, - required String ownerId, - required i2.MemoryTypeEnum type, - required String data, - i0.Value isSaved, - required DateTime memoryAt, - i0.Value seenAt, - i0.Value showAt, - i0.Value hideAt, - }); -typedef $$MemoryEntityTableUpdateCompanionBuilder = - i1.MemoryEntityCompanion Function({ - i0.Value id, - i0.Value createdAt, - i0.Value updatedAt, - i0.Value deletedAt, - i0.Value ownerId, - i0.Value type, - i0.Value data, - i0.Value isSaved, - i0.Value memoryAt, - i0.Value seenAt, - i0.Value showAt, - i0.Value hideAt, - }); - -final class $$MemoryEntityTableReferences - extends - i0.BaseReferences< - i0.GeneratedDatabase, - i1.$MemoryEntityTable, - i1.MemoryEntityData - > { - $$MemoryEntityTableReferences(super.$_db, super.$_table, super.$_typedResult); - - static i5.$UserEntityTable _ownerIdTable(i0.GeneratedDatabase db) => - i6.ReadDatabaseContainer(db) - .resultSet('user_entity') - .createAlias( - i0.$_aliasNameGenerator( - i6.ReadDatabaseContainer( - db, - ).resultSet('memory_entity').ownerId, - i6.ReadDatabaseContainer( - db, - ).resultSet('user_entity').id, - ), - ); - - i5.$$UserEntityTableProcessedTableManager get ownerId { - final $_column = $_itemColumn('owner_id')!; - - final manager = i5 - .$$UserEntityTableTableManager( - $_db, - i6.ReadDatabaseContainer( - $_db, - ).resultSet('user_entity'), - ) - .filter((f) => f.id.sqlEquals($_column)); - final item = $_typedResult.readTableOrNull(_ownerIdTable($_db)); - if (item == null) return manager; - return i0.ProcessedTableManager( - manager.$state.copyWith(prefetchedData: [item]), - ); - } -} - -class $$MemoryEntityTableFilterComposer - extends i0.Composer { - $$MemoryEntityTableFilterComposer({ - required super.$db, - required super.$table, - super.joinBuilder, - super.$addJoinBuilderToRootComposer, - super.$removeJoinBuilderFromRootComposer, - }); - i0.ColumnFilters get id => $composableBuilder( - column: $table.id, - builder: (column) => i0.ColumnFilters(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 deletedAt => $composableBuilder( - column: $table.deletedAt, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnWithTypeConverterFilters - get type => $composableBuilder( - column: $table.type, - builder: (column) => i0.ColumnWithTypeConverterFilters(column), - ); - - i0.ColumnFilters get data => $composableBuilder( - column: $table.data, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnFilters get isSaved => $composableBuilder( - column: $table.isSaved, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnFilters get memoryAt => $composableBuilder( - column: $table.memoryAt, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnFilters get seenAt => $composableBuilder( - column: $table.seenAt, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnFilters get showAt => $composableBuilder( - column: $table.showAt, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnFilters get hideAt => $composableBuilder( - column: $table.hideAt, - builder: (column) => i0.ColumnFilters(column), - ); - - i5.$$UserEntityTableFilterComposer get ownerId { - final i5.$$UserEntityTableFilterComposer composer = $composerBuilder( - composer: this, - getCurrentColumn: (t) => t.ownerId, - referencedTable: i6.ReadDatabaseContainer( - $db, - ).resultSet('user_entity'), - getReferencedColumn: (t) => t.id, - builder: - ( - joinBuilder, { - $addJoinBuilderToRootComposer, - $removeJoinBuilderFromRootComposer, - }) => i5.$$UserEntityTableFilterComposer( - $db: $db, - $table: i6.ReadDatabaseContainer( - $db, - ).resultSet('user_entity'), - $addJoinBuilderToRootComposer: $addJoinBuilderToRootComposer, - joinBuilder: joinBuilder, - $removeJoinBuilderFromRootComposer: - $removeJoinBuilderFromRootComposer, - ), - ); - return composer; - } -} - -class $$MemoryEntityTableOrderingComposer - extends i0.Composer { - $$MemoryEntityTableOrderingComposer({ - required super.$db, - required super.$table, - super.joinBuilder, - super.$addJoinBuilderToRootComposer, - super.$removeJoinBuilderFromRootComposer, - }); - i0.ColumnOrderings get id => $composableBuilder( - column: $table.id, - 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 deletedAt => $composableBuilder( - column: $table.deletedAt, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get type => $composableBuilder( - column: $table.type, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get data => $composableBuilder( - column: $table.data, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get isSaved => $composableBuilder( - column: $table.isSaved, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get memoryAt => $composableBuilder( - column: $table.memoryAt, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get seenAt => $composableBuilder( - column: $table.seenAt, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get showAt => $composableBuilder( - column: $table.showAt, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get hideAt => $composableBuilder( - column: $table.hideAt, - builder: (column) => i0.ColumnOrderings(column), - ); - - i5.$$UserEntityTableOrderingComposer get ownerId { - final i5.$$UserEntityTableOrderingComposer composer = $composerBuilder( - composer: this, - getCurrentColumn: (t) => t.ownerId, - referencedTable: i6.ReadDatabaseContainer( - $db, - ).resultSet('user_entity'), - getReferencedColumn: (t) => t.id, - builder: - ( - joinBuilder, { - $addJoinBuilderToRootComposer, - $removeJoinBuilderFromRootComposer, - }) => i5.$$UserEntityTableOrderingComposer( - $db: $db, - $table: i6.ReadDatabaseContainer( - $db, - ).resultSet('user_entity'), - $addJoinBuilderToRootComposer: $addJoinBuilderToRootComposer, - joinBuilder: joinBuilder, - $removeJoinBuilderFromRootComposer: - $removeJoinBuilderFromRootComposer, - ), - ); - return composer; - } -} - -class $$MemoryEntityTableAnnotationComposer - extends i0.Composer { - $$MemoryEntityTableAnnotationComposer({ - required super.$db, - required super.$table, - super.joinBuilder, - super.$addJoinBuilderToRootComposer, - super.$removeJoinBuilderFromRootComposer, - }); - i0.GeneratedColumn get id => - $composableBuilder(column: $table.id, 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 deletedAt => - $composableBuilder(column: $table.deletedAt, builder: (column) => column); - - i0.GeneratedColumnWithTypeConverter get type => - $composableBuilder(column: $table.type, builder: (column) => column); - - i0.GeneratedColumn get data => - $composableBuilder(column: $table.data, builder: (column) => column); - - i0.GeneratedColumn get isSaved => - $composableBuilder(column: $table.isSaved, builder: (column) => column); - - i0.GeneratedColumn get memoryAt => - $composableBuilder(column: $table.memoryAt, builder: (column) => column); - - i0.GeneratedColumn get seenAt => - $composableBuilder(column: $table.seenAt, builder: (column) => column); - - i0.GeneratedColumn get showAt => - $composableBuilder(column: $table.showAt, builder: (column) => column); - - i0.GeneratedColumn get hideAt => - $composableBuilder(column: $table.hideAt, builder: (column) => column); - - i5.$$UserEntityTableAnnotationComposer get ownerId { - final i5.$$UserEntityTableAnnotationComposer composer = $composerBuilder( - composer: this, - getCurrentColumn: (t) => t.ownerId, - referencedTable: i6.ReadDatabaseContainer( - $db, - ).resultSet('user_entity'), - getReferencedColumn: (t) => t.id, - builder: - ( - joinBuilder, { - $addJoinBuilderToRootComposer, - $removeJoinBuilderFromRootComposer, - }) => i5.$$UserEntityTableAnnotationComposer( - $db: $db, - $table: i6.ReadDatabaseContainer( - $db, - ).resultSet('user_entity'), - $addJoinBuilderToRootComposer: $addJoinBuilderToRootComposer, - joinBuilder: joinBuilder, - $removeJoinBuilderFromRootComposer: - $removeJoinBuilderFromRootComposer, - ), - ); - return composer; - } -} - -class $$MemoryEntityTableTableManager - extends - i0.RootTableManager< - i0.GeneratedDatabase, - i1.$MemoryEntityTable, - i1.MemoryEntityData, - i1.$$MemoryEntityTableFilterComposer, - i1.$$MemoryEntityTableOrderingComposer, - i1.$$MemoryEntityTableAnnotationComposer, - $$MemoryEntityTableCreateCompanionBuilder, - $$MemoryEntityTableUpdateCompanionBuilder, - (i1.MemoryEntityData, i1.$$MemoryEntityTableReferences), - i1.MemoryEntityData, - i0.PrefetchHooks Function({bool ownerId}) - > { - $$MemoryEntityTableTableManager( - i0.GeneratedDatabase db, - i1.$MemoryEntityTable table, - ) : super( - i0.TableManagerState( - db: db, - table: table, - createFilteringComposer: () => - i1.$$MemoryEntityTableFilterComposer($db: db, $table: table), - createOrderingComposer: () => - i1.$$MemoryEntityTableOrderingComposer($db: db, $table: table), - createComputedFieldComposer: () => - i1.$$MemoryEntityTableAnnotationComposer($db: db, $table: table), - updateCompanionCallback: - ({ - i0.Value id = const i0.Value.absent(), - i0.Value createdAt = const i0.Value.absent(), - i0.Value updatedAt = const i0.Value.absent(), - i0.Value deletedAt = const i0.Value.absent(), - i0.Value ownerId = const i0.Value.absent(), - i0.Value type = const i0.Value.absent(), - i0.Value data = const i0.Value.absent(), - i0.Value isSaved = const i0.Value.absent(), - i0.Value memoryAt = const i0.Value.absent(), - i0.Value seenAt = const i0.Value.absent(), - i0.Value showAt = const i0.Value.absent(), - i0.Value hideAt = const i0.Value.absent(), - }) => i1.MemoryEntityCompanion( - id: id, - createdAt: createdAt, - updatedAt: updatedAt, - deletedAt: deletedAt, - ownerId: ownerId, - type: type, - data: data, - isSaved: isSaved, - memoryAt: memoryAt, - seenAt: seenAt, - showAt: showAt, - hideAt: hideAt, - ), - createCompanionCallback: - ({ - required String id, - i0.Value createdAt = const i0.Value.absent(), - i0.Value updatedAt = const i0.Value.absent(), - i0.Value deletedAt = const i0.Value.absent(), - required String ownerId, - required i2.MemoryTypeEnum type, - required String data, - i0.Value isSaved = const i0.Value.absent(), - required DateTime memoryAt, - i0.Value seenAt = const i0.Value.absent(), - i0.Value showAt = const i0.Value.absent(), - i0.Value hideAt = const i0.Value.absent(), - }) => i1.MemoryEntityCompanion.insert( - id: id, - createdAt: createdAt, - updatedAt: updatedAt, - deletedAt: deletedAt, - ownerId: ownerId, - type: type, - data: data, - isSaved: isSaved, - memoryAt: memoryAt, - seenAt: seenAt, - showAt: showAt, - hideAt: hideAt, - ), - withReferenceMapper: (p0) => p0 - .map( - (e) => ( - e.readTable(table), - i1.$$MemoryEntityTableReferences(db, table, e), - ), - ) - .toList(), - prefetchHooksCallback: ({ownerId = false}) { - return i0.PrefetchHooks( - db: db, - explicitlyWatchedTables: [], - addJoins: - < - T extends i0.TableManagerState< - dynamic, - dynamic, - dynamic, - dynamic, - dynamic, - dynamic, - dynamic, - dynamic, - dynamic, - dynamic, - dynamic - > - >(state) { - if (ownerId) { - state = - state.withJoin( - currentTable: table, - currentColumn: table.ownerId, - referencedTable: i1 - .$$MemoryEntityTableReferences - ._ownerIdTable(db), - referencedColumn: i1 - .$$MemoryEntityTableReferences - ._ownerIdTable(db) - .id, - ) - as T; - } - - return state; - }, - getPrefetchedDataCallback: (items) async { - return []; - }, - ); - }, - ), - ); -} - -typedef $$MemoryEntityTableProcessedTableManager = - i0.ProcessedTableManager< - i0.GeneratedDatabase, - i1.$MemoryEntityTable, - i1.MemoryEntityData, - i1.$$MemoryEntityTableFilterComposer, - i1.$$MemoryEntityTableOrderingComposer, - i1.$$MemoryEntityTableAnnotationComposer, - $$MemoryEntityTableCreateCompanionBuilder, - $$MemoryEntityTableUpdateCompanionBuilder, - (i1.MemoryEntityData, i1.$$MemoryEntityTableReferences), - i1.MemoryEntityData, - i0.PrefetchHooks Function({bool ownerId}) - >; - -class $MemoryEntityTable extends i3.MemoryEntity - with i0.TableInfo<$MemoryEntityTable, i1.MemoryEntityData> { - @override - final i0.GeneratedDatabase attachedDatabase; - final String? _alias; - $MemoryEntityTable(this.attachedDatabase, [this._alias]); - 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 _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 _deletedAtMeta = const i0.VerificationMeta( - 'deletedAt', - ); - @override - late final i0.GeneratedColumn deletedAt = - i0.GeneratedColumn( - 'deleted_at', - aliasedName, - true, - type: i0.DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - static const i0.VerificationMeta _ownerIdMeta = const i0.VerificationMeta( - 'ownerId', - ); - @override - late final i0.GeneratedColumn ownerId = i0.GeneratedColumn( - 'owner_id', - aliasedName, - false, - type: i0.DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: i0.GeneratedColumn.constraintIsAlways( - 'REFERENCES user_entity (id) ON DELETE CASCADE', - ), - ); - @override - late final i0.GeneratedColumnWithTypeConverter type = - i0.GeneratedColumn( - 'type', - aliasedName, - false, - type: i0.DriftSqlType.int, - requiredDuringInsert: true, - ).withConverter(i1.$MemoryEntityTable.$convertertype); - static const i0.VerificationMeta _dataMeta = const i0.VerificationMeta( - 'data', - ); - @override - late final i0.GeneratedColumn data = i0.GeneratedColumn( - 'data', - aliasedName, - false, - type: i0.DriftSqlType.string, - requiredDuringInsert: true, - ); - static const i0.VerificationMeta _isSavedMeta = const i0.VerificationMeta( - 'isSaved', - ); - @override - late final i0.GeneratedColumn isSaved = i0.GeneratedColumn( - 'is_saved', - aliasedName, - false, - type: i0.DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: i0.GeneratedColumn.constraintIsAlways( - 'CHECK ("is_saved" IN (0, 1))', - ), - defaultValue: const i4.Constant(false), - ); - static const i0.VerificationMeta _memoryAtMeta = const i0.VerificationMeta( - 'memoryAt', - ); - @override - late final i0.GeneratedColumn memoryAt = - i0.GeneratedColumn( - 'memory_at', - aliasedName, - false, - type: i0.DriftSqlType.dateTime, - requiredDuringInsert: true, - ); - static const i0.VerificationMeta _seenAtMeta = const i0.VerificationMeta( - 'seenAt', - ); - @override - late final i0.GeneratedColumn seenAt = i0.GeneratedColumn( - 'seen_at', - aliasedName, - true, - type: i0.DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - static const i0.VerificationMeta _showAtMeta = const i0.VerificationMeta( - 'showAt', - ); - @override - late final i0.GeneratedColumn showAt = i0.GeneratedColumn( - 'show_at', - aliasedName, - true, - type: i0.DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - static const i0.VerificationMeta _hideAtMeta = const i0.VerificationMeta( - 'hideAt', - ); - @override - late final i0.GeneratedColumn hideAt = i0.GeneratedColumn( - 'hide_at', - aliasedName, - true, - type: i0.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 - i0.VerificationContext validateIntegrity( - i0.Insertable instance, { - bool isInserting = false, - }) { - final context = i0.VerificationContext(); - final data = instance.toColumns(true); - if (data.containsKey('id')) { - context.handle(_idMeta, id.isAcceptableOrUnknown(data['id']!, _idMeta)); - } else if (isInserting) { - context.missing(_idMeta); - } - 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('deleted_at')) { - context.handle( - _deletedAtMeta, - deletedAt.isAcceptableOrUnknown(data['deleted_at']!, _deletedAtMeta), - ); - } - if (data.containsKey('owner_id')) { - context.handle( - _ownerIdMeta, - ownerId.isAcceptableOrUnknown(data['owner_id']!, _ownerIdMeta), - ); - } else if (isInserting) { - context.missing(_ownerIdMeta); - } - if (data.containsKey('data')) { - context.handle( - _dataMeta, - this.data.isAcceptableOrUnknown(data['data']!, _dataMeta), - ); - } else if (isInserting) { - context.missing(_dataMeta); - } - if (data.containsKey('is_saved')) { - context.handle( - _isSavedMeta, - isSaved.isAcceptableOrUnknown(data['is_saved']!, _isSavedMeta), - ); - } - if (data.containsKey('memory_at')) { - context.handle( - _memoryAtMeta, - memoryAt.isAcceptableOrUnknown(data['memory_at']!, _memoryAtMeta), - ); - } else if (isInserting) { - context.missing(_memoryAtMeta); - } - if (data.containsKey('seen_at')) { - context.handle( - _seenAtMeta, - seenAt.isAcceptableOrUnknown(data['seen_at']!, _seenAtMeta), - ); - } - if (data.containsKey('show_at')) { - context.handle( - _showAtMeta, - showAt.isAcceptableOrUnknown(data['show_at']!, _showAtMeta), - ); - } - if (data.containsKey('hide_at')) { - context.handle( - _hideAtMeta, - hideAt.isAcceptableOrUnknown(data['hide_at']!, _hideAtMeta), - ); - } - return context; - } - - @override - Set get $primaryKey => {id}; - @override - i1.MemoryEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return i1.MemoryEntityData( - id: attachedDatabase.typeMapping.read( - i0.DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - createdAt: attachedDatabase.typeMapping.read( - i0.DriftSqlType.dateTime, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - i0.DriftSqlType.dateTime, - data['${effectivePrefix}updated_at'], - )!, - deletedAt: attachedDatabase.typeMapping.read( - i0.DriftSqlType.dateTime, - data['${effectivePrefix}deleted_at'], - ), - ownerId: attachedDatabase.typeMapping.read( - i0.DriftSqlType.string, - data['${effectivePrefix}owner_id'], - )!, - type: i1.$MemoryEntityTable.$convertertype.fromSql( - attachedDatabase.typeMapping.read( - i0.DriftSqlType.int, - data['${effectivePrefix}type'], - )!, - ), - data: attachedDatabase.typeMapping.read( - i0.DriftSqlType.string, - data['${effectivePrefix}data'], - )!, - isSaved: attachedDatabase.typeMapping.read( - i0.DriftSqlType.bool, - data['${effectivePrefix}is_saved'], - )!, - memoryAt: attachedDatabase.typeMapping.read( - i0.DriftSqlType.dateTime, - data['${effectivePrefix}memory_at'], - )!, - seenAt: attachedDatabase.typeMapping.read( - i0.DriftSqlType.dateTime, - data['${effectivePrefix}seen_at'], - ), - showAt: attachedDatabase.typeMapping.read( - i0.DriftSqlType.dateTime, - data['${effectivePrefix}show_at'], - ), - hideAt: attachedDatabase.typeMapping.read( - i0.DriftSqlType.dateTime, - data['${effectivePrefix}hide_at'], - ), - ); - } - - @override - $MemoryEntityTable createAlias(String alias) { - return $MemoryEntityTable(attachedDatabase, alias); - } - - static i0.JsonTypeConverter2 $convertertype = - const i0.EnumIndexConverter(i2.MemoryTypeEnum.values); - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class MemoryEntityData extends i0.DataClass - implements i0.Insertable { - final String id; - final DateTime createdAt; - final DateTime updatedAt; - final DateTime? deletedAt; - final String ownerId; - final i2.MemoryTypeEnum 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'] = i0.Variable(id); - map['created_at'] = i0.Variable(createdAt); - map['updated_at'] = i0.Variable(updatedAt); - if (!nullToAbsent || deletedAt != null) { - map['deleted_at'] = i0.Variable(deletedAt); - } - map['owner_id'] = i0.Variable(ownerId); - { - map['type'] = i0.Variable( - i1.$MemoryEntityTable.$convertertype.toSql(type), - ); - } - map['data'] = i0.Variable(data); - map['is_saved'] = i0.Variable(isSaved); - map['memory_at'] = i0.Variable(memoryAt); - if (!nullToAbsent || seenAt != null) { - map['seen_at'] = i0.Variable(seenAt); - } - if (!nullToAbsent || showAt != null) { - map['show_at'] = i0.Variable(showAt); - } - if (!nullToAbsent || hideAt != null) { - map['hide_at'] = i0.Variable(hideAt); - } - return map; - } - - factory MemoryEntityData.fromJson( - Map json, { - i0.ValueSerializer? serializer, - }) { - serializer ??= i0.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: i1.$MemoryEntityTable.$convertertype.fromJson( - 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({i0.ValueSerializer? serializer}) { - serializer ??= i0.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( - i1.$MemoryEntityTable.$convertertype.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), - }; - } - - i1.MemoryEntityData copyWith({ - String? id, - DateTime? createdAt, - DateTime? updatedAt, - i0.Value deletedAt = const i0.Value.absent(), - String? ownerId, - i2.MemoryTypeEnum? type, - String? data, - bool? isSaved, - DateTime? memoryAt, - i0.Value seenAt = const i0.Value.absent(), - i0.Value showAt = const i0.Value.absent(), - i0.Value hideAt = const i0.Value.absent(), - }) => i1.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(i1.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 i1.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 i0.UpdateCompanion { - final i0.Value id; - final i0.Value createdAt; - final i0.Value updatedAt; - final i0.Value deletedAt; - final i0.Value ownerId; - final i0.Value type; - final i0.Value data; - final i0.Value isSaved; - final i0.Value memoryAt; - final i0.Value seenAt; - final i0.Value showAt; - final i0.Value hideAt; - const MemoryEntityCompanion({ - this.id = const i0.Value.absent(), - this.createdAt = const i0.Value.absent(), - this.updatedAt = const i0.Value.absent(), - this.deletedAt = const i0.Value.absent(), - this.ownerId = const i0.Value.absent(), - this.type = const i0.Value.absent(), - this.data = const i0.Value.absent(), - this.isSaved = const i0.Value.absent(), - this.memoryAt = const i0.Value.absent(), - this.seenAt = const i0.Value.absent(), - this.showAt = const i0.Value.absent(), - this.hideAt = const i0.Value.absent(), - }); - MemoryEntityCompanion.insert({ - required String id, - this.createdAt = const i0.Value.absent(), - this.updatedAt = const i0.Value.absent(), - this.deletedAt = const i0.Value.absent(), - required String ownerId, - required i2.MemoryTypeEnum type, - required String data, - this.isSaved = const i0.Value.absent(), - required DateTime memoryAt, - this.seenAt = const i0.Value.absent(), - this.showAt = const i0.Value.absent(), - this.hideAt = const i0.Value.absent(), - }) : id = i0.Value(id), - ownerId = i0.Value(ownerId), - type = i0.Value(type), - data = i0.Value(data), - memoryAt = i0.Value(memoryAt); - static i0.Insertable custom({ - i0.Expression? id, - i0.Expression? createdAt, - i0.Expression? updatedAt, - i0.Expression? deletedAt, - i0.Expression? ownerId, - i0.Expression? type, - i0.Expression? data, - i0.Expression? isSaved, - i0.Expression? memoryAt, - i0.Expression? seenAt, - i0.Expression? showAt, - i0.Expression? hideAt, - }) { - return i0.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, - }); - } - - i1.MemoryEntityCompanion copyWith({ - i0.Value? id, - i0.Value? createdAt, - i0.Value? updatedAt, - i0.Value? deletedAt, - i0.Value? ownerId, - i0.Value? type, - i0.Value? data, - i0.Value? isSaved, - i0.Value? memoryAt, - i0.Value? seenAt, - i0.Value? showAt, - i0.Value? hideAt, - }) { - return i1.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'] = i0.Variable(id.value); - } - if (createdAt.present) { - map['created_at'] = i0.Variable(createdAt.value); - } - if (updatedAt.present) { - map['updated_at'] = i0.Variable(updatedAt.value); - } - if (deletedAt.present) { - map['deleted_at'] = i0.Variable(deletedAt.value); - } - if (ownerId.present) { - map['owner_id'] = i0.Variable(ownerId.value); - } - if (type.present) { - map['type'] = i0.Variable( - i1.$MemoryEntityTable.$convertertype.toSql(type.value), - ); - } - if (data.present) { - map['data'] = i0.Variable(data.value); - } - if (isSaved.present) { - map['is_saved'] = i0.Variable(isSaved.value); - } - if (memoryAt.present) { - map['memory_at'] = i0.Variable(memoryAt.value); - } - if (seenAt.present) { - map['seen_at'] = i0.Variable(seenAt.value); - } - if (showAt.present) { - map['show_at'] = i0.Variable(showAt.value); - } - if (hideAt.present) { - map['hide_at'] = i0.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(); - } -} diff --git a/mobile/lib/infrastructure/entities/memory_asset.entity.drift.dart b/mobile/lib/infrastructure/entities/memory_asset.entity.drift.dart deleted file mode 100644 index eedeb85e5c..0000000000 --- a/mobile/lib/infrastructure/entities/memory_asset.entity.drift.dart +++ /dev/null @@ -1,641 +0,0 @@ -// dart format width=80 -// ignore_for_file: type=lint -import 'package:drift/drift.dart' as i0; -import 'package:immich_mobile/infrastructure/entities/memory_asset.entity.drift.dart' - as i1; -import 'package:immich_mobile/infrastructure/entities/memory_asset.entity.dart' - as i2; -import 'package:immich_mobile/infrastructure/entities/remote_asset.entity.drift.dart' - as i3; -import 'package:drift/internal/modular.dart' as i4; -import 'package:immich_mobile/infrastructure/entities/memory.entity.drift.dart' - as i5; - -typedef $$MemoryAssetEntityTableCreateCompanionBuilder = - i1.MemoryAssetEntityCompanion Function({ - required String assetId, - required String memoryId, - }); -typedef $$MemoryAssetEntityTableUpdateCompanionBuilder = - i1.MemoryAssetEntityCompanion Function({ - i0.Value assetId, - i0.Value memoryId, - }); - -final class $$MemoryAssetEntityTableReferences - extends - i0.BaseReferences< - i0.GeneratedDatabase, - i1.$MemoryAssetEntityTable, - i1.MemoryAssetEntityData - > { - $$MemoryAssetEntityTableReferences( - super.$_db, - super.$_table, - super.$_typedResult, - ); - - static i3.$RemoteAssetEntityTable _assetIdTable(i0.GeneratedDatabase db) => - i4.ReadDatabaseContainer(db) - .resultSet('remote_asset_entity') - .createAlias( - i0.$_aliasNameGenerator( - i4.ReadDatabaseContainer(db) - .resultSet('memory_asset_entity') - .assetId, - i4.ReadDatabaseContainer( - db, - ).resultSet('remote_asset_entity').id, - ), - ); - - i3.$$RemoteAssetEntityTableProcessedTableManager get assetId { - final $_column = $_itemColumn('asset_id')!; - - final manager = i3 - .$$RemoteAssetEntityTableTableManager( - $_db, - i4.ReadDatabaseContainer( - $_db, - ).resultSet('remote_asset_entity'), - ) - .filter((f) => f.id.sqlEquals($_column)); - final item = $_typedResult.readTableOrNull(_assetIdTable($_db)); - if (item == null) return manager; - return i0.ProcessedTableManager( - manager.$state.copyWith(prefetchedData: [item]), - ); - } - - static i5.$MemoryEntityTable _memoryIdTable(i0.GeneratedDatabase db) => - i4.ReadDatabaseContainer(db) - .resultSet('memory_entity') - .createAlias( - i0.$_aliasNameGenerator( - i4.ReadDatabaseContainer(db) - .resultSet('memory_asset_entity') - .memoryId, - i4.ReadDatabaseContainer( - db, - ).resultSet('memory_entity').id, - ), - ); - - i5.$$MemoryEntityTableProcessedTableManager get memoryId { - final $_column = $_itemColumn('memory_id')!; - - final manager = i5 - .$$MemoryEntityTableTableManager( - $_db, - i4.ReadDatabaseContainer( - $_db, - ).resultSet('memory_entity'), - ) - .filter((f) => f.id.sqlEquals($_column)); - final item = $_typedResult.readTableOrNull(_memoryIdTable($_db)); - if (item == null) return manager; - return i0.ProcessedTableManager( - manager.$state.copyWith(prefetchedData: [item]), - ); - } -} - -class $$MemoryAssetEntityTableFilterComposer - extends i0.Composer { - $$MemoryAssetEntityTableFilterComposer({ - required super.$db, - required super.$table, - super.joinBuilder, - super.$addJoinBuilderToRootComposer, - super.$removeJoinBuilderFromRootComposer, - }); - i3.$$RemoteAssetEntityTableFilterComposer get assetId { - final i3.$$RemoteAssetEntityTableFilterComposer composer = $composerBuilder( - composer: this, - getCurrentColumn: (t) => t.assetId, - referencedTable: i4.ReadDatabaseContainer( - $db, - ).resultSet('remote_asset_entity'), - getReferencedColumn: (t) => t.id, - builder: - ( - joinBuilder, { - $addJoinBuilderToRootComposer, - $removeJoinBuilderFromRootComposer, - }) => i3.$$RemoteAssetEntityTableFilterComposer( - $db: $db, - $table: i4.ReadDatabaseContainer( - $db, - ).resultSet('remote_asset_entity'), - $addJoinBuilderToRootComposer: $addJoinBuilderToRootComposer, - joinBuilder: joinBuilder, - $removeJoinBuilderFromRootComposer: - $removeJoinBuilderFromRootComposer, - ), - ); - return composer; - } - - i5.$$MemoryEntityTableFilterComposer get memoryId { - final i5.$$MemoryEntityTableFilterComposer composer = $composerBuilder( - composer: this, - getCurrentColumn: (t) => t.memoryId, - referencedTable: i4.ReadDatabaseContainer( - $db, - ).resultSet('memory_entity'), - getReferencedColumn: (t) => t.id, - builder: - ( - joinBuilder, { - $addJoinBuilderToRootComposer, - $removeJoinBuilderFromRootComposer, - }) => i5.$$MemoryEntityTableFilterComposer( - $db: $db, - $table: i4.ReadDatabaseContainer( - $db, - ).resultSet('memory_entity'), - $addJoinBuilderToRootComposer: $addJoinBuilderToRootComposer, - joinBuilder: joinBuilder, - $removeJoinBuilderFromRootComposer: - $removeJoinBuilderFromRootComposer, - ), - ); - return composer; - } -} - -class $$MemoryAssetEntityTableOrderingComposer - extends i0.Composer { - $$MemoryAssetEntityTableOrderingComposer({ - required super.$db, - required super.$table, - super.joinBuilder, - super.$addJoinBuilderToRootComposer, - super.$removeJoinBuilderFromRootComposer, - }); - i3.$$RemoteAssetEntityTableOrderingComposer get assetId { - final i3.$$RemoteAssetEntityTableOrderingComposer composer = - $composerBuilder( - composer: this, - getCurrentColumn: (t) => t.assetId, - referencedTable: i4.ReadDatabaseContainer( - $db, - ).resultSet('remote_asset_entity'), - getReferencedColumn: (t) => t.id, - builder: - ( - joinBuilder, { - $addJoinBuilderToRootComposer, - $removeJoinBuilderFromRootComposer, - }) => i3.$$RemoteAssetEntityTableOrderingComposer( - $db: $db, - $table: i4.ReadDatabaseContainer( - $db, - ).resultSet('remote_asset_entity'), - $addJoinBuilderToRootComposer: $addJoinBuilderToRootComposer, - joinBuilder: joinBuilder, - $removeJoinBuilderFromRootComposer: - $removeJoinBuilderFromRootComposer, - ), - ); - return composer; - } - - i5.$$MemoryEntityTableOrderingComposer get memoryId { - final i5.$$MemoryEntityTableOrderingComposer composer = $composerBuilder( - composer: this, - getCurrentColumn: (t) => t.memoryId, - referencedTable: i4.ReadDatabaseContainer( - $db, - ).resultSet('memory_entity'), - getReferencedColumn: (t) => t.id, - builder: - ( - joinBuilder, { - $addJoinBuilderToRootComposer, - $removeJoinBuilderFromRootComposer, - }) => i5.$$MemoryEntityTableOrderingComposer( - $db: $db, - $table: i4.ReadDatabaseContainer( - $db, - ).resultSet('memory_entity'), - $addJoinBuilderToRootComposer: $addJoinBuilderToRootComposer, - joinBuilder: joinBuilder, - $removeJoinBuilderFromRootComposer: - $removeJoinBuilderFromRootComposer, - ), - ); - return composer; - } -} - -class $$MemoryAssetEntityTableAnnotationComposer - extends i0.Composer { - $$MemoryAssetEntityTableAnnotationComposer({ - required super.$db, - required super.$table, - super.joinBuilder, - super.$addJoinBuilderToRootComposer, - super.$removeJoinBuilderFromRootComposer, - }); - i3.$$RemoteAssetEntityTableAnnotationComposer get assetId { - final i3.$$RemoteAssetEntityTableAnnotationComposer composer = - $composerBuilder( - composer: this, - getCurrentColumn: (t) => t.assetId, - referencedTable: i4.ReadDatabaseContainer( - $db, - ).resultSet('remote_asset_entity'), - getReferencedColumn: (t) => t.id, - builder: - ( - joinBuilder, { - $addJoinBuilderToRootComposer, - $removeJoinBuilderFromRootComposer, - }) => i3.$$RemoteAssetEntityTableAnnotationComposer( - $db: $db, - $table: i4.ReadDatabaseContainer( - $db, - ).resultSet('remote_asset_entity'), - $addJoinBuilderToRootComposer: $addJoinBuilderToRootComposer, - joinBuilder: joinBuilder, - $removeJoinBuilderFromRootComposer: - $removeJoinBuilderFromRootComposer, - ), - ); - return composer; - } - - i5.$$MemoryEntityTableAnnotationComposer get memoryId { - final i5.$$MemoryEntityTableAnnotationComposer composer = $composerBuilder( - composer: this, - getCurrentColumn: (t) => t.memoryId, - referencedTable: i4.ReadDatabaseContainer( - $db, - ).resultSet('memory_entity'), - getReferencedColumn: (t) => t.id, - builder: - ( - joinBuilder, { - $addJoinBuilderToRootComposer, - $removeJoinBuilderFromRootComposer, - }) => i5.$$MemoryEntityTableAnnotationComposer( - $db: $db, - $table: i4.ReadDatabaseContainer( - $db, - ).resultSet('memory_entity'), - $addJoinBuilderToRootComposer: $addJoinBuilderToRootComposer, - joinBuilder: joinBuilder, - $removeJoinBuilderFromRootComposer: - $removeJoinBuilderFromRootComposer, - ), - ); - return composer; - } -} - -class $$MemoryAssetEntityTableTableManager - extends - i0.RootTableManager< - i0.GeneratedDatabase, - i1.$MemoryAssetEntityTable, - i1.MemoryAssetEntityData, - i1.$$MemoryAssetEntityTableFilterComposer, - i1.$$MemoryAssetEntityTableOrderingComposer, - i1.$$MemoryAssetEntityTableAnnotationComposer, - $$MemoryAssetEntityTableCreateCompanionBuilder, - $$MemoryAssetEntityTableUpdateCompanionBuilder, - (i1.MemoryAssetEntityData, i1.$$MemoryAssetEntityTableReferences), - i1.MemoryAssetEntityData, - i0.PrefetchHooks Function({bool assetId, bool memoryId}) - > { - $$MemoryAssetEntityTableTableManager( - i0.GeneratedDatabase db, - i1.$MemoryAssetEntityTable table, - ) : super( - i0.TableManagerState( - db: db, - table: table, - createFilteringComposer: () => - i1.$$MemoryAssetEntityTableFilterComposer($db: db, $table: table), - createOrderingComposer: () => i1 - .$$MemoryAssetEntityTableOrderingComposer($db: db, $table: table), - createComputedFieldComposer: () => - i1.$$MemoryAssetEntityTableAnnotationComposer( - $db: db, - $table: table, - ), - updateCompanionCallback: - ({ - i0.Value assetId = const i0.Value.absent(), - i0.Value memoryId = const i0.Value.absent(), - }) => i1.MemoryAssetEntityCompanion( - assetId: assetId, - memoryId: memoryId, - ), - createCompanionCallback: - ({required String assetId, required String memoryId}) => - i1.MemoryAssetEntityCompanion.insert( - assetId: assetId, - memoryId: memoryId, - ), - withReferenceMapper: (p0) => p0 - .map( - (e) => ( - e.readTable(table), - i1.$$MemoryAssetEntityTableReferences(db, table, e), - ), - ) - .toList(), - prefetchHooksCallback: ({assetId = false, memoryId = false}) { - return i0.PrefetchHooks( - db: db, - explicitlyWatchedTables: [], - addJoins: - < - T extends i0.TableManagerState< - dynamic, - dynamic, - dynamic, - dynamic, - dynamic, - dynamic, - dynamic, - dynamic, - dynamic, - dynamic, - dynamic - > - >(state) { - if (assetId) { - state = - state.withJoin( - currentTable: table, - currentColumn: table.assetId, - referencedTable: i1 - .$$MemoryAssetEntityTableReferences - ._assetIdTable(db), - referencedColumn: i1 - .$$MemoryAssetEntityTableReferences - ._assetIdTable(db) - .id, - ) - as T; - } - if (memoryId) { - state = - state.withJoin( - currentTable: table, - currentColumn: table.memoryId, - referencedTable: i1 - .$$MemoryAssetEntityTableReferences - ._memoryIdTable(db), - referencedColumn: i1 - .$$MemoryAssetEntityTableReferences - ._memoryIdTable(db) - .id, - ) - as T; - } - - return state; - }, - getPrefetchedDataCallback: (items) async { - return []; - }, - ); - }, - ), - ); -} - -typedef $$MemoryAssetEntityTableProcessedTableManager = - i0.ProcessedTableManager< - i0.GeneratedDatabase, - i1.$MemoryAssetEntityTable, - i1.MemoryAssetEntityData, - i1.$$MemoryAssetEntityTableFilterComposer, - i1.$$MemoryAssetEntityTableOrderingComposer, - i1.$$MemoryAssetEntityTableAnnotationComposer, - $$MemoryAssetEntityTableCreateCompanionBuilder, - $$MemoryAssetEntityTableUpdateCompanionBuilder, - (i1.MemoryAssetEntityData, i1.$$MemoryAssetEntityTableReferences), - i1.MemoryAssetEntityData, - i0.PrefetchHooks Function({bool assetId, bool memoryId}) - >; - -class $MemoryAssetEntityTable extends i2.MemoryAssetEntity - with i0.TableInfo<$MemoryAssetEntityTable, i1.MemoryAssetEntityData> { - @override - final i0.GeneratedDatabase attachedDatabase; - final String? _alias; - $MemoryAssetEntityTable(this.attachedDatabase, [this._alias]); - static const i0.VerificationMeta _assetIdMeta = const i0.VerificationMeta( - 'assetId', - ); - @override - late final i0.GeneratedColumn assetId = i0.GeneratedColumn( - 'asset_id', - aliasedName, - false, - type: i0.DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: i0.GeneratedColumn.constraintIsAlways( - 'REFERENCES remote_asset_entity (id) ON DELETE CASCADE', - ), - ); - static const i0.VerificationMeta _memoryIdMeta = const i0.VerificationMeta( - 'memoryId', - ); - @override - late final i0.GeneratedColumn memoryId = i0.GeneratedColumn( - 'memory_id', - aliasedName, - false, - type: i0.DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: i0.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 - i0.VerificationContext validateIntegrity( - i0.Insertable instance, { - bool isInserting = false, - }) { - final context = i0.VerificationContext(); - final data = instance.toColumns(true); - if (data.containsKey('asset_id')) { - context.handle( - _assetIdMeta, - assetId.isAcceptableOrUnknown(data['asset_id']!, _assetIdMeta), - ); - } else if (isInserting) { - context.missing(_assetIdMeta); - } - if (data.containsKey('memory_id')) { - context.handle( - _memoryIdMeta, - memoryId.isAcceptableOrUnknown(data['memory_id']!, _memoryIdMeta), - ); - } else if (isInserting) { - context.missing(_memoryIdMeta); - } - return context; - } - - @override - Set get $primaryKey => {assetId, memoryId}; - @override - i1.MemoryAssetEntityData map( - Map data, { - String? tablePrefix, - }) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return i1.MemoryAssetEntityData( - assetId: attachedDatabase.typeMapping.read( - i0.DriftSqlType.string, - data['${effectivePrefix}asset_id'], - )!, - memoryId: attachedDatabase.typeMapping.read( - i0.DriftSqlType.string, - data['${effectivePrefix}memory_id'], - )!, - ); - } - - @override - $MemoryAssetEntityTable createAlias(String alias) { - return $MemoryAssetEntityTable(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class MemoryAssetEntityData extends i0.DataClass - implements i0.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'] = i0.Variable(assetId); - map['memory_id'] = i0.Variable(memoryId); - return map; - } - - factory MemoryAssetEntityData.fromJson( - Map json, { - i0.ValueSerializer? serializer, - }) { - serializer ??= i0.driftRuntimeOptions.defaultSerializer; - return MemoryAssetEntityData( - assetId: serializer.fromJson(json['assetId']), - memoryId: serializer.fromJson(json['memoryId']), - ); - } - @override - Map toJson({i0.ValueSerializer? serializer}) { - serializer ??= i0.driftRuntimeOptions.defaultSerializer; - return { - 'assetId': serializer.toJson(assetId), - 'memoryId': serializer.toJson(memoryId), - }; - } - - i1.MemoryAssetEntityData copyWith({String? assetId, String? memoryId}) => - i1.MemoryAssetEntityData( - assetId: assetId ?? this.assetId, - memoryId: memoryId ?? this.memoryId, - ); - MemoryAssetEntityData copyWithCompanion(i1.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 i1.MemoryAssetEntityData && - other.assetId == this.assetId && - other.memoryId == this.memoryId); -} - -class MemoryAssetEntityCompanion - extends i0.UpdateCompanion { - final i0.Value assetId; - final i0.Value memoryId; - const MemoryAssetEntityCompanion({ - this.assetId = const i0.Value.absent(), - this.memoryId = const i0.Value.absent(), - }); - MemoryAssetEntityCompanion.insert({ - required String assetId, - required String memoryId, - }) : assetId = i0.Value(assetId), - memoryId = i0.Value(memoryId); - static i0.Insertable custom({ - i0.Expression? assetId, - i0.Expression? memoryId, - }) { - return i0.RawValuesInsertable({ - if (assetId != null) 'asset_id': assetId, - if (memoryId != null) 'memory_id': memoryId, - }); - } - - i1.MemoryAssetEntityCompanion copyWith({ - i0.Value? assetId, - i0.Value? memoryId, - }) { - return i1.MemoryAssetEntityCompanion( - assetId: assetId ?? this.assetId, - memoryId: memoryId ?? this.memoryId, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (assetId.present) { - map['asset_id'] = i0.Variable(assetId.value); - } - if (memoryId.present) { - map['memory_id'] = i0.Variable(memoryId.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('MemoryAssetEntityCompanion(') - ..write('assetId: $assetId, ') - ..write('memoryId: $memoryId') - ..write(')')) - .toString(); - } -} diff --git a/mobile/lib/infrastructure/entities/merged_asset.drift.dart b/mobile/lib/infrastructure/entities/merged_asset.drift.dart deleted file mode 100644 index 2d05ef6ceb..0000000000 --- a/mobile/lib/infrastructure/entities/merged_asset.drift.dart +++ /dev/null @@ -1,179 +0,0 @@ -// dart format width=80 -// ignore_for_file: type=lint -import 'package:drift/drift.dart' as i0; -import 'package:drift/internal/modular.dart' as i1; -import 'package:immich_mobile/domain/models/asset/base_asset.model.dart' as i2; -import 'package:immich_mobile/infrastructure/entities/local_asset.entity.drift.dart' - as i3; -import 'package:immich_mobile/infrastructure/entities/remote_asset.entity.drift.dart' - as i4; -import 'package:immich_mobile/infrastructure/entities/stack.entity.drift.dart' - as i5; -import 'package:immich_mobile/infrastructure/entities/local_album_asset.entity.drift.dart' - as i6; -import 'package:immich_mobile/infrastructure/entities/local_album.entity.drift.dart' - as i7; - -class MergedAssetDrift extends i1.ModularAccessor { - MergedAssetDrift(i0.GeneratedDatabase db) : super(db); - i0.Selectable mergedAsset({ - required List userIds, - required MergedAsset$limit limit, - }) { - var $arrayStartIndex = 1; - final expandeduserIds = $expandVar($arrayStartIndex, userIds.length); - $arrayStartIndex += userIds.length; - final generatedlimit = $write( - limit(alias(this.localAssetEntity, 'lae')), - startIndex: $arrayStartIndex, - ); - $arrayStartIndex += generatedlimit.amountOfVariables; - return customSelect( - 'SELECT rae.id AS remote_id, (SELECT lae.id FROM local_asset_entity AS lae WHERE lae.checksum = rae.checksum LIMIT 1) AS local_id, rae.name, rae.type, rae.created_at AS created_at, rae.updated_at, rae.width, rae.height, rae.duration_ms, rae.is_favorite, rae.thumb_hash, rae.checksum, rae.owner_id, rae.live_photo_video_id, 0 AS orientation, rae.stack_id, NULL AS i_cloud_id, NULL AS latitude, NULL AS longitude, NULL AS adjustmentTime, rae.is_edited, 0 AS playback_style, rae.uploaded_at FROM remote_asset_entity AS rae LEFT JOIN stack_entity AS se ON rae.stack_id = se.id WHERE rae.deleted_at IS NULL AND rae.visibility = 0 AND rae.owner_id IN ($expandeduserIds) AND(rae.stack_id IS NULL OR rae.id = se.primary_asset_id)UNION ALL SELECT NULL AS remote_id, lae.id AS local_id, lae.name, lae.type, lae.created_at AS created_at, lae.updated_at, lae.width, lae.height, lae.duration_ms, lae.is_favorite, NULL AS thumb_hash, lae.checksum, NULL AS owner_id, NULL AS live_photo_video_id, lae.orientation, NULL AS stack_id, lae.i_cloud_id, lae.latitude, lae.longitude, lae.adjustment_time, 0 AS is_edited, lae.playback_style, NULL AS uploaded_at FROM local_asset_entity AS lae WHERE NOT EXISTS (SELECT 1 FROM remote_asset_entity AS rae WHERE rae.checksum = lae.checksum AND rae.owner_id IN ($expandeduserIds)) AND EXISTS (SELECT 1 FROM local_album_asset_entity AS laa INNER JOIN local_album_entity AS la ON laa.album_id = la.id WHERE laa.asset_id = lae.id AND la.backup_selection = 0) AND NOT EXISTS (SELECT 1 FROM local_album_asset_entity AS laa INNER JOIN local_album_entity AS la ON laa.album_id = la.id WHERE laa.asset_id = lae.id AND la.backup_selection = 2) ORDER BY created_at DESC ${generatedlimit.sql}', - variables: [ - for (var $ in userIds) i0.Variable($), - ...generatedlimit.introducedVariables, - ], - readsFrom: { - remoteAssetEntity, - localAssetEntity, - stackEntity, - localAlbumAssetEntity, - localAlbumEntity, - ...generatedlimit.watchedTables, - }, - ).map( - (i0.QueryRow row) => MergedAssetResult( - remoteId: row.readNullable('remote_id'), - localId: row.readNullable('local_id'), - name: row.read('name'), - type: i4.$RemoteAssetEntityTable.$convertertype.fromSql( - row.read('type'), - ), - createdAt: row.read('created_at'), - updatedAt: row.read('updated_at'), - width: row.readNullable('width'), - height: row.readNullable('height'), - durationMs: row.readNullable('duration_ms'), - isFavorite: row.read('is_favorite'), - thumbHash: row.readNullable('thumb_hash'), - checksum: row.readNullable('checksum'), - ownerId: row.readNullable('owner_id'), - livePhotoVideoId: row.readNullable('live_photo_video_id'), - orientation: row.read('orientation'), - stackId: row.readNullable('stack_id'), - iCloudId: row.readNullable('i_cloud_id'), - latitude: row.readNullable('latitude'), - longitude: row.readNullable('longitude'), - adjustmentTime: row.readNullable('adjustmentTime'), - isEdited: row.read('is_edited'), - playbackStyle: row.read('playback_style'), - uploadedAt: row.readNullable('uploaded_at'), - ), - ); - } - - i0.Selectable mergedBucket({ - required int groupBy, - required List userIds, - }) { - var $arrayStartIndex = 2; - final expandeduserIds = $expandVar($arrayStartIndex, userIds.length); - $arrayStartIndex += userIds.length; - return customSelect( - 'SELECT COUNT(*) AS asset_count, bucket_date FROM (SELECT CASE WHEN ?1 = 0 THEN COALESCE(STRFTIME(\'%Y-%m-%d\', rae.local_date_time), STRFTIME(\'%Y-%m-%d\', rae.created_at, \'localtime\')) WHEN ?1 = 1 THEN COALESCE(STRFTIME(\'%Y-%m\', rae.local_date_time), STRFTIME(\'%Y-%m\', rae.created_at, \'localtime\')) END AS bucket_date FROM remote_asset_entity AS rae LEFT JOIN stack_entity AS se ON rae.stack_id = se.id WHERE rae.deleted_at IS NULL AND rae.visibility = 0 AND rae.owner_id IN ($expandeduserIds) AND(rae.stack_id IS NULL OR rae.id = se.primary_asset_id)UNION ALL SELECT CASE WHEN ?1 = 0 THEN STRFTIME(\'%Y-%m-%d\', lae.created_at, \'localtime\') WHEN ?1 = 1 THEN STRFTIME(\'%Y-%m\', lae.created_at, \'localtime\') END AS bucket_date FROM local_asset_entity AS lae WHERE NOT EXISTS (SELECT 1 FROM remote_asset_entity AS rae WHERE rae.checksum = lae.checksum AND rae.owner_id IN ($expandeduserIds)) AND EXISTS (SELECT 1 FROM local_album_asset_entity AS laa INNER JOIN local_album_entity AS la ON laa.album_id = la.id WHERE laa.asset_id = lae.id AND la.backup_selection = 0) AND NOT EXISTS (SELECT 1 FROM local_album_asset_entity AS laa INNER JOIN local_album_entity AS la ON laa.album_id = la.id WHERE laa.asset_id = lae.id AND la.backup_selection = 2)) GROUP BY bucket_date ORDER BY bucket_date DESC', - variables: [ - i0.Variable(groupBy), - for (var $ in userIds) i0.Variable($), - ], - readsFrom: { - remoteAssetEntity, - stackEntity, - localAssetEntity, - localAlbumAssetEntity, - localAlbumEntity, - }, - ).map( - (i0.QueryRow row) => MergedBucketResult( - assetCount: row.read('asset_count'), - bucketDate: row.read('bucket_date'), - ), - ); - } - - i4.$RemoteAssetEntityTable get remoteAssetEntity => i1.ReadDatabaseContainer( - attachedDatabase, - ).resultSet('remote_asset_entity'); - i5.$StackEntityTable get stackEntity => i1.ReadDatabaseContainer( - attachedDatabase, - ).resultSet('stack_entity'); - i3.$LocalAssetEntityTable get localAssetEntity => i1.ReadDatabaseContainer( - attachedDatabase, - ).resultSet('local_asset_entity'); - i6.$LocalAlbumAssetEntityTable get localAlbumAssetEntity => - i1.ReadDatabaseContainer( - attachedDatabase, - ).resultSet('local_album_asset_entity'); - i7.$LocalAlbumEntityTable get localAlbumEntity => i1.ReadDatabaseContainer( - attachedDatabase, - ).resultSet('local_album_entity'); -} - -class MergedAssetResult { - final String? remoteId; - final String? localId; - final String name; - final i2.AssetType type; - final DateTime createdAt; - final DateTime updatedAt; - final int? width; - final int? height; - final int? durationMs; - final bool isFavorite; - final String? thumbHash; - final String? checksum; - final String? ownerId; - final String? livePhotoVideoId; - final int orientation; - final String? stackId; - final String? iCloudId; - final double? latitude; - final double? longitude; - final DateTime? adjustmentTime; - final bool isEdited; - final int playbackStyle; - final DateTime? uploadedAt; - MergedAssetResult({ - this.remoteId, - this.localId, - required this.name, - required this.type, - required this.createdAt, - required this.updatedAt, - this.width, - this.height, - this.durationMs, - required this.isFavorite, - this.thumbHash, - this.checksum, - this.ownerId, - this.livePhotoVideoId, - required this.orientation, - this.stackId, - this.iCloudId, - this.latitude, - this.longitude, - this.adjustmentTime, - required this.isEdited, - required this.playbackStyle, - this.uploadedAt, - }); -} - -typedef MergedAsset$limit = i0.Limit Function(i3.$LocalAssetEntityTable lae); - -class MergedBucketResult { - final int assetCount; - final String bucketDate; - MergedBucketResult({required this.assetCount, required this.bucketDate}); -} diff --git a/mobile/lib/infrastructure/entities/partner.entity.drift.dart b/mobile/lib/infrastructure/entities/partner.entity.drift.dart deleted file mode 100644 index 76a91f27bf..0000000000 --- a/mobile/lib/infrastructure/entities/partner.entity.drift.dart +++ /dev/null @@ -1,725 +0,0 @@ -// dart format width=80 -// ignore_for_file: type=lint -import 'package:drift/drift.dart' as i0; -import 'package:immich_mobile/infrastructure/entities/partner.entity.drift.dart' - as i1; -import 'package:immich_mobile/infrastructure/entities/partner.entity.dart' - as i2; -import 'package:drift/src/runtime/query_builder/query_builder.dart' as i3; -import 'package:immich_mobile/infrastructure/entities/user.entity.drift.dart' - as i4; -import 'package:drift/internal/modular.dart' as i5; - -typedef $$PartnerEntityTableCreateCompanionBuilder = - i1.PartnerEntityCompanion Function({ - required String sharedById, - required String sharedWithId, - i0.Value inTimeline, - }); -typedef $$PartnerEntityTableUpdateCompanionBuilder = - i1.PartnerEntityCompanion Function({ - i0.Value sharedById, - i0.Value sharedWithId, - i0.Value inTimeline, - }); - -final class $$PartnerEntityTableReferences - extends - i0.BaseReferences< - i0.GeneratedDatabase, - i1.$PartnerEntityTable, - i1.PartnerEntityData - > { - $$PartnerEntityTableReferences( - super.$_db, - super.$_table, - super.$_typedResult, - ); - - static i4.$UserEntityTable _sharedByIdTable(i0.GeneratedDatabase db) => - i5.ReadDatabaseContainer(db) - .resultSet('user_entity') - .createAlias( - i0.$_aliasNameGenerator( - i5.ReadDatabaseContainer( - db, - ).resultSet('partner_entity').sharedById, - i5.ReadDatabaseContainer( - db, - ).resultSet('user_entity').id, - ), - ); - - i4.$$UserEntityTableProcessedTableManager get sharedById { - final $_column = $_itemColumn('shared_by_id')!; - - final manager = i4 - .$$UserEntityTableTableManager( - $_db, - i5.ReadDatabaseContainer( - $_db, - ).resultSet('user_entity'), - ) - .filter((f) => f.id.sqlEquals($_column)); - final item = $_typedResult.readTableOrNull(_sharedByIdTable($_db)); - if (item == null) return manager; - return i0.ProcessedTableManager( - manager.$state.copyWith(prefetchedData: [item]), - ); - } - - static i4.$UserEntityTable _sharedWithIdTable(i0.GeneratedDatabase db) => - i5.ReadDatabaseContainer(db) - .resultSet('user_entity') - .createAlias( - i0.$_aliasNameGenerator( - i5.ReadDatabaseContainer(db) - .resultSet('partner_entity') - .sharedWithId, - i5.ReadDatabaseContainer( - db, - ).resultSet('user_entity').id, - ), - ); - - i4.$$UserEntityTableProcessedTableManager get sharedWithId { - final $_column = $_itemColumn('shared_with_id')!; - - final manager = i4 - .$$UserEntityTableTableManager( - $_db, - i5.ReadDatabaseContainer( - $_db, - ).resultSet('user_entity'), - ) - .filter((f) => f.id.sqlEquals($_column)); - final item = $_typedResult.readTableOrNull(_sharedWithIdTable($_db)); - if (item == null) return manager; - return i0.ProcessedTableManager( - manager.$state.copyWith(prefetchedData: [item]), - ); - } -} - -class $$PartnerEntityTableFilterComposer - extends i0.Composer { - $$PartnerEntityTableFilterComposer({ - required super.$db, - required super.$table, - super.joinBuilder, - super.$addJoinBuilderToRootComposer, - super.$removeJoinBuilderFromRootComposer, - }); - i0.ColumnFilters get inTimeline => $composableBuilder( - column: $table.inTimeline, - builder: (column) => i0.ColumnFilters(column), - ); - - i4.$$UserEntityTableFilterComposer get sharedById { - final i4.$$UserEntityTableFilterComposer composer = $composerBuilder( - composer: this, - getCurrentColumn: (t) => t.sharedById, - referencedTable: i5.ReadDatabaseContainer( - $db, - ).resultSet('user_entity'), - getReferencedColumn: (t) => t.id, - builder: - ( - joinBuilder, { - $addJoinBuilderToRootComposer, - $removeJoinBuilderFromRootComposer, - }) => i4.$$UserEntityTableFilterComposer( - $db: $db, - $table: i5.ReadDatabaseContainer( - $db, - ).resultSet('user_entity'), - $addJoinBuilderToRootComposer: $addJoinBuilderToRootComposer, - joinBuilder: joinBuilder, - $removeJoinBuilderFromRootComposer: - $removeJoinBuilderFromRootComposer, - ), - ); - return composer; - } - - i4.$$UserEntityTableFilterComposer get sharedWithId { - final i4.$$UserEntityTableFilterComposer composer = $composerBuilder( - composer: this, - getCurrentColumn: (t) => t.sharedWithId, - referencedTable: i5.ReadDatabaseContainer( - $db, - ).resultSet('user_entity'), - getReferencedColumn: (t) => t.id, - builder: - ( - joinBuilder, { - $addJoinBuilderToRootComposer, - $removeJoinBuilderFromRootComposer, - }) => i4.$$UserEntityTableFilterComposer( - $db: $db, - $table: i5.ReadDatabaseContainer( - $db, - ).resultSet('user_entity'), - $addJoinBuilderToRootComposer: $addJoinBuilderToRootComposer, - joinBuilder: joinBuilder, - $removeJoinBuilderFromRootComposer: - $removeJoinBuilderFromRootComposer, - ), - ); - return composer; - } -} - -class $$PartnerEntityTableOrderingComposer - extends i0.Composer { - $$PartnerEntityTableOrderingComposer({ - required super.$db, - required super.$table, - super.joinBuilder, - super.$addJoinBuilderToRootComposer, - super.$removeJoinBuilderFromRootComposer, - }); - i0.ColumnOrderings get inTimeline => $composableBuilder( - column: $table.inTimeline, - builder: (column) => i0.ColumnOrderings(column), - ); - - i4.$$UserEntityTableOrderingComposer get sharedById { - final i4.$$UserEntityTableOrderingComposer composer = $composerBuilder( - composer: this, - getCurrentColumn: (t) => t.sharedById, - referencedTable: i5.ReadDatabaseContainer( - $db, - ).resultSet('user_entity'), - getReferencedColumn: (t) => t.id, - builder: - ( - joinBuilder, { - $addJoinBuilderToRootComposer, - $removeJoinBuilderFromRootComposer, - }) => i4.$$UserEntityTableOrderingComposer( - $db: $db, - $table: i5.ReadDatabaseContainer( - $db, - ).resultSet('user_entity'), - $addJoinBuilderToRootComposer: $addJoinBuilderToRootComposer, - joinBuilder: joinBuilder, - $removeJoinBuilderFromRootComposer: - $removeJoinBuilderFromRootComposer, - ), - ); - return composer; - } - - i4.$$UserEntityTableOrderingComposer get sharedWithId { - final i4.$$UserEntityTableOrderingComposer composer = $composerBuilder( - composer: this, - getCurrentColumn: (t) => t.sharedWithId, - referencedTable: i5.ReadDatabaseContainer( - $db, - ).resultSet('user_entity'), - getReferencedColumn: (t) => t.id, - builder: - ( - joinBuilder, { - $addJoinBuilderToRootComposer, - $removeJoinBuilderFromRootComposer, - }) => i4.$$UserEntityTableOrderingComposer( - $db: $db, - $table: i5.ReadDatabaseContainer( - $db, - ).resultSet('user_entity'), - $addJoinBuilderToRootComposer: $addJoinBuilderToRootComposer, - joinBuilder: joinBuilder, - $removeJoinBuilderFromRootComposer: - $removeJoinBuilderFromRootComposer, - ), - ); - return composer; - } -} - -class $$PartnerEntityTableAnnotationComposer - extends i0.Composer { - $$PartnerEntityTableAnnotationComposer({ - required super.$db, - required super.$table, - super.joinBuilder, - super.$addJoinBuilderToRootComposer, - super.$removeJoinBuilderFromRootComposer, - }); - i0.GeneratedColumn get inTimeline => $composableBuilder( - column: $table.inTimeline, - builder: (column) => column, - ); - - i4.$$UserEntityTableAnnotationComposer get sharedById { - final i4.$$UserEntityTableAnnotationComposer composer = $composerBuilder( - composer: this, - getCurrentColumn: (t) => t.sharedById, - referencedTable: i5.ReadDatabaseContainer( - $db, - ).resultSet('user_entity'), - getReferencedColumn: (t) => t.id, - builder: - ( - joinBuilder, { - $addJoinBuilderToRootComposer, - $removeJoinBuilderFromRootComposer, - }) => i4.$$UserEntityTableAnnotationComposer( - $db: $db, - $table: i5.ReadDatabaseContainer( - $db, - ).resultSet('user_entity'), - $addJoinBuilderToRootComposer: $addJoinBuilderToRootComposer, - joinBuilder: joinBuilder, - $removeJoinBuilderFromRootComposer: - $removeJoinBuilderFromRootComposer, - ), - ); - return composer; - } - - i4.$$UserEntityTableAnnotationComposer get sharedWithId { - final i4.$$UserEntityTableAnnotationComposer composer = $composerBuilder( - composer: this, - getCurrentColumn: (t) => t.sharedWithId, - referencedTable: i5.ReadDatabaseContainer( - $db, - ).resultSet('user_entity'), - getReferencedColumn: (t) => t.id, - builder: - ( - joinBuilder, { - $addJoinBuilderToRootComposer, - $removeJoinBuilderFromRootComposer, - }) => i4.$$UserEntityTableAnnotationComposer( - $db: $db, - $table: i5.ReadDatabaseContainer( - $db, - ).resultSet('user_entity'), - $addJoinBuilderToRootComposer: $addJoinBuilderToRootComposer, - joinBuilder: joinBuilder, - $removeJoinBuilderFromRootComposer: - $removeJoinBuilderFromRootComposer, - ), - ); - return composer; - } -} - -class $$PartnerEntityTableTableManager - extends - i0.RootTableManager< - i0.GeneratedDatabase, - i1.$PartnerEntityTable, - i1.PartnerEntityData, - i1.$$PartnerEntityTableFilterComposer, - i1.$$PartnerEntityTableOrderingComposer, - i1.$$PartnerEntityTableAnnotationComposer, - $$PartnerEntityTableCreateCompanionBuilder, - $$PartnerEntityTableUpdateCompanionBuilder, - (i1.PartnerEntityData, i1.$$PartnerEntityTableReferences), - i1.PartnerEntityData, - i0.PrefetchHooks Function({bool sharedById, bool sharedWithId}) - > { - $$PartnerEntityTableTableManager( - i0.GeneratedDatabase db, - i1.$PartnerEntityTable table, - ) : super( - i0.TableManagerState( - db: db, - table: table, - createFilteringComposer: () => - i1.$$PartnerEntityTableFilterComposer($db: db, $table: table), - createOrderingComposer: () => - i1.$$PartnerEntityTableOrderingComposer($db: db, $table: table), - createComputedFieldComposer: () => - i1.$$PartnerEntityTableAnnotationComposer($db: db, $table: table), - updateCompanionCallback: - ({ - i0.Value sharedById = const i0.Value.absent(), - i0.Value sharedWithId = const i0.Value.absent(), - i0.Value inTimeline = const i0.Value.absent(), - }) => i1.PartnerEntityCompanion( - sharedById: sharedById, - sharedWithId: sharedWithId, - inTimeline: inTimeline, - ), - createCompanionCallback: - ({ - required String sharedById, - required String sharedWithId, - i0.Value inTimeline = const i0.Value.absent(), - }) => i1.PartnerEntityCompanion.insert( - sharedById: sharedById, - sharedWithId: sharedWithId, - inTimeline: inTimeline, - ), - withReferenceMapper: (p0) => p0 - .map( - (e) => ( - e.readTable(table), - i1.$$PartnerEntityTableReferences(db, table, e), - ), - ) - .toList(), - prefetchHooksCallback: ({sharedById = false, sharedWithId = false}) { - return i0.PrefetchHooks( - db: db, - explicitlyWatchedTables: [], - addJoins: - < - T extends i0.TableManagerState< - dynamic, - dynamic, - dynamic, - dynamic, - dynamic, - dynamic, - dynamic, - dynamic, - dynamic, - dynamic, - dynamic - > - >(state) { - if (sharedById) { - state = - state.withJoin( - currentTable: table, - currentColumn: table.sharedById, - referencedTable: i1 - .$$PartnerEntityTableReferences - ._sharedByIdTable(db), - referencedColumn: i1 - .$$PartnerEntityTableReferences - ._sharedByIdTable(db) - .id, - ) - as T; - } - if (sharedWithId) { - state = - state.withJoin( - currentTable: table, - currentColumn: table.sharedWithId, - referencedTable: i1 - .$$PartnerEntityTableReferences - ._sharedWithIdTable(db), - referencedColumn: i1 - .$$PartnerEntityTableReferences - ._sharedWithIdTable(db) - .id, - ) - as T; - } - - return state; - }, - getPrefetchedDataCallback: (items) async { - return []; - }, - ); - }, - ), - ); -} - -typedef $$PartnerEntityTableProcessedTableManager = - i0.ProcessedTableManager< - i0.GeneratedDatabase, - i1.$PartnerEntityTable, - i1.PartnerEntityData, - i1.$$PartnerEntityTableFilterComposer, - i1.$$PartnerEntityTableOrderingComposer, - i1.$$PartnerEntityTableAnnotationComposer, - $$PartnerEntityTableCreateCompanionBuilder, - $$PartnerEntityTableUpdateCompanionBuilder, - (i1.PartnerEntityData, i1.$$PartnerEntityTableReferences), - i1.PartnerEntityData, - i0.PrefetchHooks Function({bool sharedById, bool sharedWithId}) - >; -i0.Index get idxPartnerSharedWithId => i0.Index( - 'idx_partner_shared_with_id', - 'CREATE INDEX IF NOT EXISTS idx_partner_shared_with_id ON partner_entity (shared_with_id)', -); - -class $PartnerEntityTable extends i2.PartnerEntity - with i0.TableInfo<$PartnerEntityTable, i1.PartnerEntityData> { - @override - final i0.GeneratedDatabase attachedDatabase; - final String? _alias; - $PartnerEntityTable(this.attachedDatabase, [this._alias]); - static const i0.VerificationMeta _sharedByIdMeta = const i0.VerificationMeta( - 'sharedById', - ); - @override - late final i0.GeneratedColumn sharedById = i0.GeneratedColumn( - 'shared_by_id', - aliasedName, - false, - type: i0.DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: i0.GeneratedColumn.constraintIsAlways( - 'REFERENCES user_entity (id) ON DELETE CASCADE', - ), - ); - static const i0.VerificationMeta _sharedWithIdMeta = - const i0.VerificationMeta('sharedWithId'); - @override - late final i0.GeneratedColumn sharedWithId = - i0.GeneratedColumn( - 'shared_with_id', - aliasedName, - false, - type: i0.DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: i0.GeneratedColumn.constraintIsAlways( - 'REFERENCES user_entity (id) ON DELETE CASCADE', - ), - ); - static const i0.VerificationMeta _inTimelineMeta = const i0.VerificationMeta( - 'inTimeline', - ); - @override - late final i0.GeneratedColumn inTimeline = i0.GeneratedColumn( - 'in_timeline', - aliasedName, - false, - type: i0.DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: i0.GeneratedColumn.constraintIsAlways( - 'CHECK ("in_timeline" IN (0, 1))', - ), - defaultValue: const i3.Constant(false), - ); - @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 - i0.VerificationContext validateIntegrity( - i0.Insertable instance, { - bool isInserting = false, - }) { - final context = i0.VerificationContext(); - final data = instance.toColumns(true); - if (data.containsKey('shared_by_id')) { - context.handle( - _sharedByIdMeta, - sharedById.isAcceptableOrUnknown( - data['shared_by_id']!, - _sharedByIdMeta, - ), - ); - } else if (isInserting) { - context.missing(_sharedByIdMeta); - } - if (data.containsKey('shared_with_id')) { - context.handle( - _sharedWithIdMeta, - sharedWithId.isAcceptableOrUnknown( - data['shared_with_id']!, - _sharedWithIdMeta, - ), - ); - } else if (isInserting) { - context.missing(_sharedWithIdMeta); - } - if (data.containsKey('in_timeline')) { - context.handle( - _inTimelineMeta, - inTimeline.isAcceptableOrUnknown(data['in_timeline']!, _inTimelineMeta), - ); - } - return context; - } - - @override - Set get $primaryKey => {sharedById, sharedWithId}; - @override - i1.PartnerEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return i1.PartnerEntityData( - sharedById: attachedDatabase.typeMapping.read( - i0.DriftSqlType.string, - data['${effectivePrefix}shared_by_id'], - )!, - sharedWithId: attachedDatabase.typeMapping.read( - i0.DriftSqlType.string, - data['${effectivePrefix}shared_with_id'], - )!, - inTimeline: attachedDatabase.typeMapping.read( - i0.DriftSqlType.bool, - data['${effectivePrefix}in_timeline'], - )!, - ); - } - - @override - $PartnerEntityTable createAlias(String alias) { - return $PartnerEntityTable(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class PartnerEntityData extends i0.DataClass - implements i0.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'] = i0.Variable(sharedById); - map['shared_with_id'] = i0.Variable(sharedWithId); - map['in_timeline'] = i0.Variable(inTimeline); - return map; - } - - factory PartnerEntityData.fromJson( - Map json, { - i0.ValueSerializer? serializer, - }) { - serializer ??= i0.driftRuntimeOptions.defaultSerializer; - return PartnerEntityData( - sharedById: serializer.fromJson(json['sharedById']), - sharedWithId: serializer.fromJson(json['sharedWithId']), - inTimeline: serializer.fromJson(json['inTimeline']), - ); - } - @override - Map toJson({i0.ValueSerializer? serializer}) { - serializer ??= i0.driftRuntimeOptions.defaultSerializer; - return { - 'sharedById': serializer.toJson(sharedById), - 'sharedWithId': serializer.toJson(sharedWithId), - 'inTimeline': serializer.toJson(inTimeline), - }; - } - - i1.PartnerEntityData copyWith({ - String? sharedById, - String? sharedWithId, - bool? inTimeline, - }) => i1.PartnerEntityData( - sharedById: sharedById ?? this.sharedById, - sharedWithId: sharedWithId ?? this.sharedWithId, - inTimeline: inTimeline ?? this.inTimeline, - ); - PartnerEntityData copyWithCompanion(i1.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 i1.PartnerEntityData && - other.sharedById == this.sharedById && - other.sharedWithId == this.sharedWithId && - other.inTimeline == this.inTimeline); -} - -class PartnerEntityCompanion extends i0.UpdateCompanion { - final i0.Value sharedById; - final i0.Value sharedWithId; - final i0.Value inTimeline; - const PartnerEntityCompanion({ - this.sharedById = const i0.Value.absent(), - this.sharedWithId = const i0.Value.absent(), - this.inTimeline = const i0.Value.absent(), - }); - PartnerEntityCompanion.insert({ - required String sharedById, - required String sharedWithId, - this.inTimeline = const i0.Value.absent(), - }) : sharedById = i0.Value(sharedById), - sharedWithId = i0.Value(sharedWithId); - static i0.Insertable custom({ - i0.Expression? sharedById, - i0.Expression? sharedWithId, - i0.Expression? inTimeline, - }) { - return i0.RawValuesInsertable({ - if (sharedById != null) 'shared_by_id': sharedById, - if (sharedWithId != null) 'shared_with_id': sharedWithId, - if (inTimeline != null) 'in_timeline': inTimeline, - }); - } - - i1.PartnerEntityCompanion copyWith({ - i0.Value? sharedById, - i0.Value? sharedWithId, - i0.Value? inTimeline, - }) { - return i1.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'] = i0.Variable(sharedById.value); - } - if (sharedWithId.present) { - map['shared_with_id'] = i0.Variable(sharedWithId.value); - } - if (inTimeline.present) { - map['in_timeline'] = i0.Variable(inTimeline.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('PartnerEntityCompanion(') - ..write('sharedById: $sharedById, ') - ..write('sharedWithId: $sharedWithId, ') - ..write('inTimeline: $inTimeline') - ..write(')')) - .toString(); - } -} diff --git a/mobile/lib/infrastructure/entities/person.entity.drift.dart b/mobile/lib/infrastructure/entities/person.entity.drift.dart deleted file mode 100644 index 02ea48c846..0000000000 --- a/mobile/lib/infrastructure/entities/person.entity.drift.dart +++ /dev/null @@ -1,1062 +0,0 @@ -// dart format width=80 -// ignore_for_file: type=lint -import 'package:drift/drift.dart' as i0; -import 'package:immich_mobile/infrastructure/entities/person.entity.drift.dart' - as i1; -import 'package:immich_mobile/infrastructure/entities/person.entity.dart' as i2; -import 'package:drift/src/runtime/query_builder/query_builder.dart' as i3; -import 'package:immich_mobile/infrastructure/entities/user.entity.drift.dart' - as i4; -import 'package:drift/internal/modular.dart' as i5; - -typedef $$PersonEntityTableCreateCompanionBuilder = - i1.PersonEntityCompanion Function({ - required String id, - i0.Value createdAt, - i0.Value updatedAt, - required String ownerId, - required String name, - i0.Value faceAssetId, - required bool isFavorite, - required bool isHidden, - i0.Value color, - i0.Value birthDate, - }); -typedef $$PersonEntityTableUpdateCompanionBuilder = - i1.PersonEntityCompanion Function({ - i0.Value id, - i0.Value createdAt, - i0.Value updatedAt, - i0.Value ownerId, - i0.Value name, - i0.Value faceAssetId, - i0.Value isFavorite, - i0.Value isHidden, - i0.Value color, - i0.Value birthDate, - }); - -final class $$PersonEntityTableReferences - extends - i0.BaseReferences< - i0.GeneratedDatabase, - i1.$PersonEntityTable, - i1.PersonEntityData - > { - $$PersonEntityTableReferences(super.$_db, super.$_table, super.$_typedResult); - - static i4.$UserEntityTable _ownerIdTable(i0.GeneratedDatabase db) => - i5.ReadDatabaseContainer(db) - .resultSet('user_entity') - .createAlias( - i0.$_aliasNameGenerator( - i5.ReadDatabaseContainer( - db, - ).resultSet('person_entity').ownerId, - i5.ReadDatabaseContainer( - db, - ).resultSet('user_entity').id, - ), - ); - - i4.$$UserEntityTableProcessedTableManager get ownerId { - final $_column = $_itemColumn('owner_id')!; - - final manager = i4 - .$$UserEntityTableTableManager( - $_db, - i5.ReadDatabaseContainer( - $_db, - ).resultSet('user_entity'), - ) - .filter((f) => f.id.sqlEquals($_column)); - final item = $_typedResult.readTableOrNull(_ownerIdTable($_db)); - if (item == null) return manager; - return i0.ProcessedTableManager( - manager.$state.copyWith(prefetchedData: [item]), - ); - } -} - -class $$PersonEntityTableFilterComposer - extends i0.Composer { - $$PersonEntityTableFilterComposer({ - required super.$db, - required super.$table, - super.joinBuilder, - super.$addJoinBuilderToRootComposer, - super.$removeJoinBuilderFromRootComposer, - }); - i0.ColumnFilters get id => $composableBuilder( - column: $table.id, - builder: (column) => i0.ColumnFilters(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 name => $composableBuilder( - column: $table.name, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnFilters get faceAssetId => $composableBuilder( - column: $table.faceAssetId, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnFilters get isFavorite => $composableBuilder( - column: $table.isFavorite, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnFilters get isHidden => $composableBuilder( - column: $table.isHidden, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnFilters get color => $composableBuilder( - column: $table.color, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnFilters get birthDate => $composableBuilder( - column: $table.birthDate, - builder: (column) => i0.ColumnFilters(column), - ); - - i4.$$UserEntityTableFilterComposer get ownerId { - final i4.$$UserEntityTableFilterComposer composer = $composerBuilder( - composer: this, - getCurrentColumn: (t) => t.ownerId, - referencedTable: i5.ReadDatabaseContainer( - $db, - ).resultSet('user_entity'), - getReferencedColumn: (t) => t.id, - builder: - ( - joinBuilder, { - $addJoinBuilderToRootComposer, - $removeJoinBuilderFromRootComposer, - }) => i4.$$UserEntityTableFilterComposer( - $db: $db, - $table: i5.ReadDatabaseContainer( - $db, - ).resultSet('user_entity'), - $addJoinBuilderToRootComposer: $addJoinBuilderToRootComposer, - joinBuilder: joinBuilder, - $removeJoinBuilderFromRootComposer: - $removeJoinBuilderFromRootComposer, - ), - ); - return composer; - } -} - -class $$PersonEntityTableOrderingComposer - extends i0.Composer { - $$PersonEntityTableOrderingComposer({ - required super.$db, - required super.$table, - super.joinBuilder, - super.$addJoinBuilderToRootComposer, - super.$removeJoinBuilderFromRootComposer, - }); - i0.ColumnOrderings get id => $composableBuilder( - column: $table.id, - 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 name => $composableBuilder( - column: $table.name, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get faceAssetId => $composableBuilder( - column: $table.faceAssetId, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get isFavorite => $composableBuilder( - column: $table.isFavorite, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get isHidden => $composableBuilder( - column: $table.isHidden, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get color => $composableBuilder( - column: $table.color, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get birthDate => $composableBuilder( - column: $table.birthDate, - builder: (column) => i0.ColumnOrderings(column), - ); - - i4.$$UserEntityTableOrderingComposer get ownerId { - final i4.$$UserEntityTableOrderingComposer composer = $composerBuilder( - composer: this, - getCurrentColumn: (t) => t.ownerId, - referencedTable: i5.ReadDatabaseContainer( - $db, - ).resultSet('user_entity'), - getReferencedColumn: (t) => t.id, - builder: - ( - joinBuilder, { - $addJoinBuilderToRootComposer, - $removeJoinBuilderFromRootComposer, - }) => i4.$$UserEntityTableOrderingComposer( - $db: $db, - $table: i5.ReadDatabaseContainer( - $db, - ).resultSet('user_entity'), - $addJoinBuilderToRootComposer: $addJoinBuilderToRootComposer, - joinBuilder: joinBuilder, - $removeJoinBuilderFromRootComposer: - $removeJoinBuilderFromRootComposer, - ), - ); - return composer; - } -} - -class $$PersonEntityTableAnnotationComposer - extends i0.Composer { - $$PersonEntityTableAnnotationComposer({ - required super.$db, - required super.$table, - super.joinBuilder, - super.$addJoinBuilderToRootComposer, - super.$removeJoinBuilderFromRootComposer, - }); - i0.GeneratedColumn get id => - $composableBuilder(column: $table.id, 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 name => - $composableBuilder(column: $table.name, builder: (column) => column); - - i0.GeneratedColumn get faceAssetId => $composableBuilder( - column: $table.faceAssetId, - builder: (column) => column, - ); - - i0.GeneratedColumn get isFavorite => $composableBuilder( - column: $table.isFavorite, - builder: (column) => column, - ); - - i0.GeneratedColumn get isHidden => - $composableBuilder(column: $table.isHidden, builder: (column) => column); - - i0.GeneratedColumn get color => - $composableBuilder(column: $table.color, builder: (column) => column); - - i0.GeneratedColumn get birthDate => - $composableBuilder(column: $table.birthDate, builder: (column) => column); - - i4.$$UserEntityTableAnnotationComposer get ownerId { - final i4.$$UserEntityTableAnnotationComposer composer = $composerBuilder( - composer: this, - getCurrentColumn: (t) => t.ownerId, - referencedTable: i5.ReadDatabaseContainer( - $db, - ).resultSet('user_entity'), - getReferencedColumn: (t) => t.id, - builder: - ( - joinBuilder, { - $addJoinBuilderToRootComposer, - $removeJoinBuilderFromRootComposer, - }) => i4.$$UserEntityTableAnnotationComposer( - $db: $db, - $table: i5.ReadDatabaseContainer( - $db, - ).resultSet('user_entity'), - $addJoinBuilderToRootComposer: $addJoinBuilderToRootComposer, - joinBuilder: joinBuilder, - $removeJoinBuilderFromRootComposer: - $removeJoinBuilderFromRootComposer, - ), - ); - return composer; - } -} - -class $$PersonEntityTableTableManager - extends - i0.RootTableManager< - i0.GeneratedDatabase, - i1.$PersonEntityTable, - i1.PersonEntityData, - i1.$$PersonEntityTableFilterComposer, - i1.$$PersonEntityTableOrderingComposer, - i1.$$PersonEntityTableAnnotationComposer, - $$PersonEntityTableCreateCompanionBuilder, - $$PersonEntityTableUpdateCompanionBuilder, - (i1.PersonEntityData, i1.$$PersonEntityTableReferences), - i1.PersonEntityData, - i0.PrefetchHooks Function({bool ownerId}) - > { - $$PersonEntityTableTableManager( - i0.GeneratedDatabase db, - i1.$PersonEntityTable table, - ) : super( - i0.TableManagerState( - db: db, - table: table, - createFilteringComposer: () => - i1.$$PersonEntityTableFilterComposer($db: db, $table: table), - createOrderingComposer: () => - i1.$$PersonEntityTableOrderingComposer($db: db, $table: table), - createComputedFieldComposer: () => - i1.$$PersonEntityTableAnnotationComposer($db: db, $table: table), - updateCompanionCallback: - ({ - i0.Value id = const i0.Value.absent(), - i0.Value createdAt = const i0.Value.absent(), - i0.Value updatedAt = const i0.Value.absent(), - i0.Value ownerId = const i0.Value.absent(), - i0.Value name = const i0.Value.absent(), - i0.Value faceAssetId = const i0.Value.absent(), - i0.Value isFavorite = const i0.Value.absent(), - i0.Value isHidden = const i0.Value.absent(), - i0.Value color = const i0.Value.absent(), - i0.Value birthDate = const i0.Value.absent(), - }) => i1.PersonEntityCompanion( - id: id, - createdAt: createdAt, - updatedAt: updatedAt, - ownerId: ownerId, - name: name, - faceAssetId: faceAssetId, - isFavorite: isFavorite, - isHidden: isHidden, - color: color, - birthDate: birthDate, - ), - createCompanionCallback: - ({ - required String id, - i0.Value createdAt = const i0.Value.absent(), - i0.Value updatedAt = const i0.Value.absent(), - required String ownerId, - required String name, - i0.Value faceAssetId = const i0.Value.absent(), - required bool isFavorite, - required bool isHidden, - i0.Value color = const i0.Value.absent(), - i0.Value birthDate = const i0.Value.absent(), - }) => i1.PersonEntityCompanion.insert( - id: id, - createdAt: createdAt, - updatedAt: updatedAt, - ownerId: ownerId, - name: name, - faceAssetId: faceAssetId, - isFavorite: isFavorite, - isHidden: isHidden, - color: color, - birthDate: birthDate, - ), - withReferenceMapper: (p0) => p0 - .map( - (e) => ( - e.readTable(table), - i1.$$PersonEntityTableReferences(db, table, e), - ), - ) - .toList(), - prefetchHooksCallback: ({ownerId = false}) { - return i0.PrefetchHooks( - db: db, - explicitlyWatchedTables: [], - addJoins: - < - T extends i0.TableManagerState< - dynamic, - dynamic, - dynamic, - dynamic, - dynamic, - dynamic, - dynamic, - dynamic, - dynamic, - dynamic, - dynamic - > - >(state) { - if (ownerId) { - state = - state.withJoin( - currentTable: table, - currentColumn: table.ownerId, - referencedTable: i1 - .$$PersonEntityTableReferences - ._ownerIdTable(db), - referencedColumn: i1 - .$$PersonEntityTableReferences - ._ownerIdTable(db) - .id, - ) - as T; - } - - return state; - }, - getPrefetchedDataCallback: (items) async { - return []; - }, - ); - }, - ), - ); -} - -typedef $$PersonEntityTableProcessedTableManager = - i0.ProcessedTableManager< - i0.GeneratedDatabase, - i1.$PersonEntityTable, - i1.PersonEntityData, - i1.$$PersonEntityTableFilterComposer, - i1.$$PersonEntityTableOrderingComposer, - i1.$$PersonEntityTableAnnotationComposer, - $$PersonEntityTableCreateCompanionBuilder, - $$PersonEntityTableUpdateCompanionBuilder, - (i1.PersonEntityData, i1.$$PersonEntityTableReferences), - i1.PersonEntityData, - i0.PrefetchHooks Function({bool ownerId}) - >; -i0.Index get idxPersonOwnerId => i0.Index( - 'idx_person_owner_id', - 'CREATE INDEX IF NOT EXISTS idx_person_owner_id ON person_entity (owner_id)', -); - -class $PersonEntityTable extends i2.PersonEntity - with i0.TableInfo<$PersonEntityTable, i1.PersonEntityData> { - @override - final i0.GeneratedDatabase attachedDatabase; - final String? _alias; - $PersonEntityTable(this.attachedDatabase, [this._alias]); - 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 _createdAtMeta = const i0.VerificationMeta( - 'createdAt', - ); - @override - late final i0.GeneratedColumn createdAt = - i0.GeneratedColumn( - 'created_at', - aliasedName, - false, - type: i0.DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: i3.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: i3.currentDateAndTime, - ); - static const i0.VerificationMeta _ownerIdMeta = const i0.VerificationMeta( - 'ownerId', - ); - @override - late final i0.GeneratedColumn ownerId = i0.GeneratedColumn( - 'owner_id', - aliasedName, - false, - type: i0.DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: i0.GeneratedColumn.constraintIsAlways( - 'REFERENCES user_entity (id) ON DELETE CASCADE', - ), - ); - 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, - ); - static const i0.VerificationMeta _faceAssetIdMeta = const i0.VerificationMeta( - 'faceAssetId', - ); - @override - late final i0.GeneratedColumn faceAssetId = - i0.GeneratedColumn( - 'face_asset_id', - 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: true, - defaultConstraints: i0.GeneratedColumn.constraintIsAlways( - 'CHECK ("is_favorite" IN (0, 1))', - ), - ); - static const i0.VerificationMeta _isHiddenMeta = const i0.VerificationMeta( - 'isHidden', - ); - @override - late final i0.GeneratedColumn isHidden = i0.GeneratedColumn( - 'is_hidden', - aliasedName, - false, - type: i0.DriftSqlType.bool, - requiredDuringInsert: true, - defaultConstraints: i0.GeneratedColumn.constraintIsAlways( - 'CHECK ("is_hidden" IN (0, 1))', - ), - ); - static const i0.VerificationMeta _colorMeta = const i0.VerificationMeta( - 'color', - ); - @override - late final i0.GeneratedColumn color = i0.GeneratedColumn( - 'color', - aliasedName, - true, - type: i0.DriftSqlType.string, - requiredDuringInsert: false, - ); - static const i0.VerificationMeta _birthDateMeta = const i0.VerificationMeta( - 'birthDate', - ); - @override - late final i0.GeneratedColumn birthDate = - i0.GeneratedColumn( - 'birth_date', - aliasedName, - true, - type: i0.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 - i0.VerificationContext validateIntegrity( - i0.Insertable instance, { - bool isInserting = false, - }) { - final context = i0.VerificationContext(); - final data = instance.toColumns(true); - if (data.containsKey('id')) { - context.handle(_idMeta, id.isAcceptableOrUnknown(data['id']!, _idMeta)); - } else if (isInserting) { - context.missing(_idMeta); - } - 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('owner_id')) { - context.handle( - _ownerIdMeta, - ownerId.isAcceptableOrUnknown(data['owner_id']!, _ownerIdMeta), - ); - } else if (isInserting) { - context.missing(_ownerIdMeta); - } - if (data.containsKey('name')) { - context.handle( - _nameMeta, - name.isAcceptableOrUnknown(data['name']!, _nameMeta), - ); - } else if (isInserting) { - context.missing(_nameMeta); - } - if (data.containsKey('face_asset_id')) { - context.handle( - _faceAssetIdMeta, - faceAssetId.isAcceptableOrUnknown( - data['face_asset_id']!, - _faceAssetIdMeta, - ), - ); - } - if (data.containsKey('is_favorite')) { - context.handle( - _isFavoriteMeta, - isFavorite.isAcceptableOrUnknown(data['is_favorite']!, _isFavoriteMeta), - ); - } else if (isInserting) { - context.missing(_isFavoriteMeta); - } - if (data.containsKey('is_hidden')) { - context.handle( - _isHiddenMeta, - isHidden.isAcceptableOrUnknown(data['is_hidden']!, _isHiddenMeta), - ); - } else if (isInserting) { - context.missing(_isHiddenMeta); - } - if (data.containsKey('color')) { - context.handle( - _colorMeta, - color.isAcceptableOrUnknown(data['color']!, _colorMeta), - ); - } - if (data.containsKey('birth_date')) { - context.handle( - _birthDateMeta, - birthDate.isAcceptableOrUnknown(data['birth_date']!, _birthDateMeta), - ); - } - return context; - } - - @override - Set get $primaryKey => {id}; - @override - i1.PersonEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return i1.PersonEntityData( - id: attachedDatabase.typeMapping.read( - i0.DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - createdAt: attachedDatabase.typeMapping.read( - i0.DriftSqlType.dateTime, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - i0.DriftSqlType.dateTime, - data['${effectivePrefix}updated_at'], - )!, - ownerId: attachedDatabase.typeMapping.read( - i0.DriftSqlType.string, - data['${effectivePrefix}owner_id'], - )!, - name: attachedDatabase.typeMapping.read( - i0.DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - faceAssetId: attachedDatabase.typeMapping.read( - i0.DriftSqlType.string, - data['${effectivePrefix}face_asset_id'], - ), - isFavorite: attachedDatabase.typeMapping.read( - i0.DriftSqlType.bool, - data['${effectivePrefix}is_favorite'], - )!, - isHidden: attachedDatabase.typeMapping.read( - i0.DriftSqlType.bool, - data['${effectivePrefix}is_hidden'], - )!, - color: attachedDatabase.typeMapping.read( - i0.DriftSqlType.string, - data['${effectivePrefix}color'], - ), - birthDate: attachedDatabase.typeMapping.read( - i0.DriftSqlType.dateTime, - data['${effectivePrefix}birth_date'], - ), - ); - } - - @override - $PersonEntityTable createAlias(String alias) { - return $PersonEntityTable(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class PersonEntityData extends i0.DataClass - implements i0.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'] = i0.Variable(id); - map['created_at'] = i0.Variable(createdAt); - map['updated_at'] = i0.Variable(updatedAt); - map['owner_id'] = i0.Variable(ownerId); - map['name'] = i0.Variable(name); - if (!nullToAbsent || faceAssetId != null) { - map['face_asset_id'] = i0.Variable(faceAssetId); - } - map['is_favorite'] = i0.Variable(isFavorite); - map['is_hidden'] = i0.Variable(isHidden); - if (!nullToAbsent || color != null) { - map['color'] = i0.Variable(color); - } - if (!nullToAbsent || birthDate != null) { - map['birth_date'] = i0.Variable(birthDate); - } - return map; - } - - factory PersonEntityData.fromJson( - Map json, { - i0.ValueSerializer? serializer, - }) { - serializer ??= i0.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({i0.ValueSerializer? serializer}) { - serializer ??= i0.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), - }; - } - - i1.PersonEntityData copyWith({ - String? id, - DateTime? createdAt, - DateTime? updatedAt, - String? ownerId, - String? name, - i0.Value faceAssetId = const i0.Value.absent(), - bool? isFavorite, - bool? isHidden, - i0.Value color = const i0.Value.absent(), - i0.Value birthDate = const i0.Value.absent(), - }) => i1.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(i1.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 i1.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 i0.UpdateCompanion { - final i0.Value id; - final i0.Value createdAt; - final i0.Value updatedAt; - final i0.Value ownerId; - final i0.Value name; - final i0.Value faceAssetId; - final i0.Value isFavorite; - final i0.Value isHidden; - final i0.Value color; - final i0.Value birthDate; - const PersonEntityCompanion({ - this.id = const i0.Value.absent(), - this.createdAt = const i0.Value.absent(), - this.updatedAt = const i0.Value.absent(), - this.ownerId = const i0.Value.absent(), - this.name = const i0.Value.absent(), - this.faceAssetId = const i0.Value.absent(), - this.isFavorite = const i0.Value.absent(), - this.isHidden = const i0.Value.absent(), - this.color = const i0.Value.absent(), - this.birthDate = const i0.Value.absent(), - }); - PersonEntityCompanion.insert({ - required String id, - this.createdAt = const i0.Value.absent(), - this.updatedAt = const i0.Value.absent(), - required String ownerId, - required String name, - this.faceAssetId = const i0.Value.absent(), - required bool isFavorite, - required bool isHidden, - this.color = const i0.Value.absent(), - this.birthDate = const i0.Value.absent(), - }) : id = i0.Value(id), - ownerId = i0.Value(ownerId), - name = i0.Value(name), - isFavorite = i0.Value(isFavorite), - isHidden = i0.Value(isHidden); - static i0.Insertable custom({ - i0.Expression? id, - i0.Expression? createdAt, - i0.Expression? updatedAt, - i0.Expression? ownerId, - i0.Expression? name, - i0.Expression? faceAssetId, - i0.Expression? isFavorite, - i0.Expression? isHidden, - i0.Expression? color, - i0.Expression? birthDate, - }) { - return i0.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, - }); - } - - i1.PersonEntityCompanion copyWith({ - i0.Value? id, - i0.Value? createdAt, - i0.Value? updatedAt, - i0.Value? ownerId, - i0.Value? name, - i0.Value? faceAssetId, - i0.Value? isFavorite, - i0.Value? isHidden, - i0.Value? color, - i0.Value? birthDate, - }) { - return i1.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'] = i0.Variable(id.value); - } - if (createdAt.present) { - map['created_at'] = i0.Variable(createdAt.value); - } - if (updatedAt.present) { - map['updated_at'] = i0.Variable(updatedAt.value); - } - if (ownerId.present) { - map['owner_id'] = i0.Variable(ownerId.value); - } - if (name.present) { - map['name'] = i0.Variable(name.value); - } - if (faceAssetId.present) { - map['face_asset_id'] = i0.Variable(faceAssetId.value); - } - if (isFavorite.present) { - map['is_favorite'] = i0.Variable(isFavorite.value); - } - if (isHidden.present) { - map['is_hidden'] = i0.Variable(isHidden.value); - } - if (color.present) { - map['color'] = i0.Variable(color.value); - } - if (birthDate.present) { - map['birth_date'] = i0.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(); - } -} diff --git a/mobile/lib/infrastructure/entities/remote_album.entity.drift.dart b/mobile/lib/infrastructure/entities/remote_album.entity.drift.dart deleted file mode 100644 index 8fdabe0b15..0000000000 --- a/mobile/lib/infrastructure/entities/remote_album.entity.drift.dart +++ /dev/null @@ -1,956 +0,0 @@ -// dart format width=80 -// ignore_for_file: type=lint -import 'package:drift/drift.dart' as i0; -import 'package:immich_mobile/infrastructure/entities/remote_album.entity.drift.dart' - as i1; -import 'package:immich_mobile/domain/models/album/album.model.dart' as i2; -import 'package:immich_mobile/infrastructure/entities/remote_album.entity.dart' - as i3; -import 'package:drift/src/runtime/query_builder/query_builder.dart' as i4; -import 'package:immich_mobile/infrastructure/entities/remote_asset.entity.drift.dart' - as i5; -import 'package:drift/internal/modular.dart' as i6; - -typedef $$RemoteAlbumEntityTableCreateCompanionBuilder = - i1.RemoteAlbumEntityCompanion Function({ - required String id, - required String name, - i0.Value description, - i0.Value createdAt, - i0.Value updatedAt, - i0.Value thumbnailAssetId, - i0.Value isActivityEnabled, - required i2.AlbumAssetOrder order, - }); -typedef $$RemoteAlbumEntityTableUpdateCompanionBuilder = - i1.RemoteAlbumEntityCompanion Function({ - i0.Value id, - i0.Value name, - i0.Value description, - i0.Value createdAt, - i0.Value updatedAt, - i0.Value thumbnailAssetId, - i0.Value isActivityEnabled, - i0.Value order, - }); - -final class $$RemoteAlbumEntityTableReferences - extends - i0.BaseReferences< - i0.GeneratedDatabase, - i1.$RemoteAlbumEntityTable, - i1.RemoteAlbumEntityData - > { - $$RemoteAlbumEntityTableReferences( - super.$_db, - super.$_table, - super.$_typedResult, - ); - - static i5.$RemoteAssetEntityTable _thumbnailAssetIdTable( - i0.GeneratedDatabase db, - ) => i6.ReadDatabaseContainer(db) - .resultSet('remote_asset_entity') - .createAlias( - i0.$_aliasNameGenerator( - i6.ReadDatabaseContainer(db) - .resultSet('remote_album_entity') - .thumbnailAssetId, - i6.ReadDatabaseContainer( - db, - ).resultSet('remote_asset_entity').id, - ), - ); - - i5.$$RemoteAssetEntityTableProcessedTableManager? get thumbnailAssetId { - final $_column = $_itemColumn('thumbnail_asset_id'); - if ($_column == null) return null; - final manager = i5 - .$$RemoteAssetEntityTableTableManager( - $_db, - i6.ReadDatabaseContainer( - $_db, - ).resultSet('remote_asset_entity'), - ) - .filter((f) => f.id.sqlEquals($_column)); - final item = $_typedResult.readTableOrNull(_thumbnailAssetIdTable($_db)); - if (item == null) return manager; - return i0.ProcessedTableManager( - manager.$state.copyWith(prefetchedData: [item]), - ); - } -} - -class $$RemoteAlbumEntityTableFilterComposer - extends i0.Composer { - $$RemoteAlbumEntityTableFilterComposer({ - required super.$db, - required super.$table, - super.joinBuilder, - super.$addJoinBuilderToRootComposer, - super.$removeJoinBuilderFromRootComposer, - }); - i0.ColumnFilters get id => $composableBuilder( - column: $table.id, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnFilters get name => $composableBuilder( - column: $table.name, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnFilters get description => $composableBuilder( - column: $table.description, - builder: (column) => i0.ColumnFilters(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 isActivityEnabled => $composableBuilder( - column: $table.isActivityEnabled, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnWithTypeConverterFilters - get order => $composableBuilder( - column: $table.order, - builder: (column) => i0.ColumnWithTypeConverterFilters(column), - ); - - i5.$$RemoteAssetEntityTableFilterComposer get thumbnailAssetId { - final i5.$$RemoteAssetEntityTableFilterComposer composer = $composerBuilder( - composer: this, - getCurrentColumn: (t) => t.thumbnailAssetId, - referencedTable: i6.ReadDatabaseContainer( - $db, - ).resultSet('remote_asset_entity'), - getReferencedColumn: (t) => t.id, - builder: - ( - joinBuilder, { - $addJoinBuilderToRootComposer, - $removeJoinBuilderFromRootComposer, - }) => i5.$$RemoteAssetEntityTableFilterComposer( - $db: $db, - $table: i6.ReadDatabaseContainer( - $db, - ).resultSet('remote_asset_entity'), - $addJoinBuilderToRootComposer: $addJoinBuilderToRootComposer, - joinBuilder: joinBuilder, - $removeJoinBuilderFromRootComposer: - $removeJoinBuilderFromRootComposer, - ), - ); - return composer; - } -} - -class $$RemoteAlbumEntityTableOrderingComposer - extends i0.Composer { - $$RemoteAlbumEntityTableOrderingComposer({ - required super.$db, - required super.$table, - super.joinBuilder, - super.$addJoinBuilderToRootComposer, - super.$removeJoinBuilderFromRootComposer, - }); - i0.ColumnOrderings get id => $composableBuilder( - column: $table.id, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get name => $composableBuilder( - column: $table.name, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get description => $composableBuilder( - column: $table.description, - 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 isActivityEnabled => $composableBuilder( - column: $table.isActivityEnabled, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get order => $composableBuilder( - column: $table.order, - builder: (column) => i0.ColumnOrderings(column), - ); - - i5.$$RemoteAssetEntityTableOrderingComposer get thumbnailAssetId { - final i5.$$RemoteAssetEntityTableOrderingComposer composer = - $composerBuilder( - composer: this, - getCurrentColumn: (t) => t.thumbnailAssetId, - referencedTable: i6.ReadDatabaseContainer( - $db, - ).resultSet('remote_asset_entity'), - getReferencedColumn: (t) => t.id, - builder: - ( - joinBuilder, { - $addJoinBuilderToRootComposer, - $removeJoinBuilderFromRootComposer, - }) => i5.$$RemoteAssetEntityTableOrderingComposer( - $db: $db, - $table: i6.ReadDatabaseContainer( - $db, - ).resultSet('remote_asset_entity'), - $addJoinBuilderToRootComposer: $addJoinBuilderToRootComposer, - joinBuilder: joinBuilder, - $removeJoinBuilderFromRootComposer: - $removeJoinBuilderFromRootComposer, - ), - ); - return composer; - } -} - -class $$RemoteAlbumEntityTableAnnotationComposer - extends i0.Composer { - $$RemoteAlbumEntityTableAnnotationComposer({ - required super.$db, - required super.$table, - super.joinBuilder, - super.$addJoinBuilderToRootComposer, - super.$removeJoinBuilderFromRootComposer, - }); - i0.GeneratedColumn get id => - $composableBuilder(column: $table.id, builder: (column) => column); - - i0.GeneratedColumn get name => - $composableBuilder(column: $table.name, builder: (column) => column); - - i0.GeneratedColumn get description => $composableBuilder( - column: $table.description, - 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 isActivityEnabled => $composableBuilder( - column: $table.isActivityEnabled, - builder: (column) => column, - ); - - i0.GeneratedColumnWithTypeConverter get order => - $composableBuilder(column: $table.order, builder: (column) => column); - - i5.$$RemoteAssetEntityTableAnnotationComposer get thumbnailAssetId { - final i5.$$RemoteAssetEntityTableAnnotationComposer composer = - $composerBuilder( - composer: this, - getCurrentColumn: (t) => t.thumbnailAssetId, - referencedTable: i6.ReadDatabaseContainer( - $db, - ).resultSet('remote_asset_entity'), - getReferencedColumn: (t) => t.id, - builder: - ( - joinBuilder, { - $addJoinBuilderToRootComposer, - $removeJoinBuilderFromRootComposer, - }) => i5.$$RemoteAssetEntityTableAnnotationComposer( - $db: $db, - $table: i6.ReadDatabaseContainer( - $db, - ).resultSet('remote_asset_entity'), - $addJoinBuilderToRootComposer: $addJoinBuilderToRootComposer, - joinBuilder: joinBuilder, - $removeJoinBuilderFromRootComposer: - $removeJoinBuilderFromRootComposer, - ), - ); - return composer; - } -} - -class $$RemoteAlbumEntityTableTableManager - extends - i0.RootTableManager< - i0.GeneratedDatabase, - i1.$RemoteAlbumEntityTable, - i1.RemoteAlbumEntityData, - i1.$$RemoteAlbumEntityTableFilterComposer, - i1.$$RemoteAlbumEntityTableOrderingComposer, - i1.$$RemoteAlbumEntityTableAnnotationComposer, - $$RemoteAlbumEntityTableCreateCompanionBuilder, - $$RemoteAlbumEntityTableUpdateCompanionBuilder, - (i1.RemoteAlbumEntityData, i1.$$RemoteAlbumEntityTableReferences), - i1.RemoteAlbumEntityData, - i0.PrefetchHooks Function({bool thumbnailAssetId}) - > { - $$RemoteAlbumEntityTableTableManager( - i0.GeneratedDatabase db, - i1.$RemoteAlbumEntityTable table, - ) : super( - i0.TableManagerState( - db: db, - table: table, - createFilteringComposer: () => - i1.$$RemoteAlbumEntityTableFilterComposer($db: db, $table: table), - createOrderingComposer: () => i1 - .$$RemoteAlbumEntityTableOrderingComposer($db: db, $table: table), - createComputedFieldComposer: () => - i1.$$RemoteAlbumEntityTableAnnotationComposer( - $db: db, - $table: table, - ), - updateCompanionCallback: - ({ - i0.Value id = const i0.Value.absent(), - i0.Value name = const i0.Value.absent(), - i0.Value description = const i0.Value.absent(), - i0.Value createdAt = const i0.Value.absent(), - i0.Value updatedAt = const i0.Value.absent(), - i0.Value thumbnailAssetId = const i0.Value.absent(), - i0.Value isActivityEnabled = const i0.Value.absent(), - i0.Value order = const i0.Value.absent(), - }) => i1.RemoteAlbumEntityCompanion( - id: id, - name: name, - description: description, - createdAt: createdAt, - updatedAt: updatedAt, - thumbnailAssetId: thumbnailAssetId, - isActivityEnabled: isActivityEnabled, - order: order, - ), - createCompanionCallback: - ({ - required String id, - required String name, - i0.Value description = const i0.Value.absent(), - i0.Value createdAt = const i0.Value.absent(), - i0.Value updatedAt = const i0.Value.absent(), - i0.Value thumbnailAssetId = const i0.Value.absent(), - i0.Value isActivityEnabled = const i0.Value.absent(), - required i2.AlbumAssetOrder order, - }) => i1.RemoteAlbumEntityCompanion.insert( - id: id, - name: name, - description: description, - createdAt: createdAt, - updatedAt: updatedAt, - thumbnailAssetId: thumbnailAssetId, - isActivityEnabled: isActivityEnabled, - order: order, - ), - withReferenceMapper: (p0) => p0 - .map( - (e) => ( - e.readTable(table), - i1.$$RemoteAlbumEntityTableReferences(db, table, e), - ), - ) - .toList(), - prefetchHooksCallback: ({thumbnailAssetId = false}) { - return i0.PrefetchHooks( - db: db, - explicitlyWatchedTables: [], - addJoins: - < - T extends i0.TableManagerState< - dynamic, - dynamic, - dynamic, - dynamic, - dynamic, - dynamic, - dynamic, - dynamic, - dynamic, - dynamic, - dynamic - > - >(state) { - if (thumbnailAssetId) { - state = - state.withJoin( - currentTable: table, - currentColumn: table.thumbnailAssetId, - referencedTable: i1 - .$$RemoteAlbumEntityTableReferences - ._thumbnailAssetIdTable(db), - referencedColumn: i1 - .$$RemoteAlbumEntityTableReferences - ._thumbnailAssetIdTable(db) - .id, - ) - as T; - } - - return state; - }, - getPrefetchedDataCallback: (items) async { - return []; - }, - ); - }, - ), - ); -} - -typedef $$RemoteAlbumEntityTableProcessedTableManager = - i0.ProcessedTableManager< - i0.GeneratedDatabase, - i1.$RemoteAlbumEntityTable, - i1.RemoteAlbumEntityData, - i1.$$RemoteAlbumEntityTableFilterComposer, - i1.$$RemoteAlbumEntityTableOrderingComposer, - i1.$$RemoteAlbumEntityTableAnnotationComposer, - $$RemoteAlbumEntityTableCreateCompanionBuilder, - $$RemoteAlbumEntityTableUpdateCompanionBuilder, - (i1.RemoteAlbumEntityData, i1.$$RemoteAlbumEntityTableReferences), - i1.RemoteAlbumEntityData, - i0.PrefetchHooks Function({bool thumbnailAssetId}) - >; - -class $RemoteAlbumEntityTable extends i3.RemoteAlbumEntity - with i0.TableInfo<$RemoteAlbumEntityTable, i1.RemoteAlbumEntityData> { - @override - final i0.GeneratedDatabase attachedDatabase; - final String? _alias; - $RemoteAlbumEntityTable(this.attachedDatabase, [this._alias]); - 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 _nameMeta = const i0.VerificationMeta( - 'name', - ); - @override - late final i0.GeneratedColumn name = i0.GeneratedColumn( - 'name', - aliasedName, - false, - type: i0.DriftSqlType.string, - requiredDuringInsert: true, - ); - static const i0.VerificationMeta _descriptionMeta = const i0.VerificationMeta( - 'description', - ); - @override - late final i0.GeneratedColumn description = - i0.GeneratedColumn( - 'description', - aliasedName, - false, - type: i0.DriftSqlType.string, - requiredDuringInsert: false, - defaultValue: const i4.Constant(''), - ); - 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 _thumbnailAssetIdMeta = - const i0.VerificationMeta('thumbnailAssetId'); - @override - late final i0.GeneratedColumn thumbnailAssetId = - i0.GeneratedColumn( - 'thumbnail_asset_id', - aliasedName, - true, - type: i0.DriftSqlType.string, - requiredDuringInsert: false, - defaultConstraints: i0.GeneratedColumn.constraintIsAlways( - 'REFERENCES remote_asset_entity (id) ON DELETE SET NULL', - ), - ); - static const i0.VerificationMeta _isActivityEnabledMeta = - const i0.VerificationMeta('isActivityEnabled'); - @override - late final i0.GeneratedColumn isActivityEnabled = - i0.GeneratedColumn( - 'is_activity_enabled', - aliasedName, - false, - type: i0.DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: i0.GeneratedColumn.constraintIsAlways( - 'CHECK ("is_activity_enabled" IN (0, 1))', - ), - defaultValue: const i4.Constant(true), - ); - @override - late final i0.GeneratedColumnWithTypeConverter - order = - i0.GeneratedColumn( - 'order', - aliasedName, - false, - type: i0.DriftSqlType.int, - requiredDuringInsert: true, - ).withConverter( - i1.$RemoteAlbumEntityTable.$converterorder, - ); - @override - List get $columns => [ - id, - name, - description, - createdAt, - updatedAt, - thumbnailAssetId, - isActivityEnabled, - order, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'remote_album_entity'; - @override - i0.VerificationContext validateIntegrity( - i0.Insertable instance, { - bool isInserting = false, - }) { - final context = i0.VerificationContext(); - final data = instance.toColumns(true); - if (data.containsKey('id')) { - context.handle(_idMeta, id.isAcceptableOrUnknown(data['id']!, _idMeta)); - } else if (isInserting) { - context.missing(_idMeta); - } - if (data.containsKey('name')) { - context.handle( - _nameMeta, - name.isAcceptableOrUnknown(data['name']!, _nameMeta), - ); - } else if (isInserting) { - context.missing(_nameMeta); - } - if (data.containsKey('description')) { - context.handle( - _descriptionMeta, - description.isAcceptableOrUnknown( - data['description']!, - _descriptionMeta, - ), - ); - } - 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('thumbnail_asset_id')) { - context.handle( - _thumbnailAssetIdMeta, - thumbnailAssetId.isAcceptableOrUnknown( - data['thumbnail_asset_id']!, - _thumbnailAssetIdMeta, - ), - ); - } - if (data.containsKey('is_activity_enabled')) { - context.handle( - _isActivityEnabledMeta, - isActivityEnabled.isAcceptableOrUnknown( - data['is_activity_enabled']!, - _isActivityEnabledMeta, - ), - ); - } - return context; - } - - @override - Set get $primaryKey => {id}; - @override - i1.RemoteAlbumEntityData map( - Map data, { - String? tablePrefix, - }) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return i1.RemoteAlbumEntityData( - id: attachedDatabase.typeMapping.read( - i0.DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - name: attachedDatabase.typeMapping.read( - i0.DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - description: attachedDatabase.typeMapping.read( - i0.DriftSqlType.string, - data['${effectivePrefix}description'], - )!, - createdAt: attachedDatabase.typeMapping.read( - i0.DriftSqlType.dateTime, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - i0.DriftSqlType.dateTime, - data['${effectivePrefix}updated_at'], - )!, - thumbnailAssetId: attachedDatabase.typeMapping.read( - i0.DriftSqlType.string, - data['${effectivePrefix}thumbnail_asset_id'], - ), - isActivityEnabled: attachedDatabase.typeMapping.read( - i0.DriftSqlType.bool, - data['${effectivePrefix}is_activity_enabled'], - )!, - order: i1.$RemoteAlbumEntityTable.$converterorder.fromSql( - attachedDatabase.typeMapping.read( - i0.DriftSqlType.int, - data['${effectivePrefix}order'], - )!, - ), - ); - } - - @override - $RemoteAlbumEntityTable createAlias(String alias) { - return $RemoteAlbumEntityTable(attachedDatabase, alias); - } - - static i0.JsonTypeConverter2 $converterorder = - const i0.EnumIndexConverter( - i2.AlbumAssetOrder.values, - ); - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class RemoteAlbumEntityData extends i0.DataClass - implements i0.Insertable { - final String id; - final String name; - final String description; - final DateTime createdAt; - final DateTime updatedAt; - final String? thumbnailAssetId; - final bool isActivityEnabled; - final i2.AlbumAssetOrder order; - const RemoteAlbumEntityData({ - required this.id, - required this.name, - required this.description, - required this.createdAt, - required this.updatedAt, - this.thumbnailAssetId, - required this.isActivityEnabled, - required this.order, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = i0.Variable(id); - map['name'] = i0.Variable(name); - map['description'] = i0.Variable(description); - map['created_at'] = i0.Variable(createdAt); - map['updated_at'] = i0.Variable(updatedAt); - if (!nullToAbsent || thumbnailAssetId != null) { - map['thumbnail_asset_id'] = i0.Variable(thumbnailAssetId); - } - map['is_activity_enabled'] = i0.Variable(isActivityEnabled); - { - map['order'] = i0.Variable( - i1.$RemoteAlbumEntityTable.$converterorder.toSql(order), - ); - } - return map; - } - - factory RemoteAlbumEntityData.fromJson( - Map json, { - i0.ValueSerializer? serializer, - }) { - serializer ??= i0.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']), - thumbnailAssetId: serializer.fromJson(json['thumbnailAssetId']), - isActivityEnabled: serializer.fromJson(json['isActivityEnabled']), - order: i1.$RemoteAlbumEntityTable.$converterorder.fromJson( - serializer.fromJson(json['order']), - ), - ); - } - @override - Map toJson({i0.ValueSerializer? serializer}) { - serializer ??= i0.driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'name': serializer.toJson(name), - 'description': serializer.toJson(description), - 'createdAt': serializer.toJson(createdAt), - 'updatedAt': serializer.toJson(updatedAt), - 'thumbnailAssetId': serializer.toJson(thumbnailAssetId), - 'isActivityEnabled': serializer.toJson(isActivityEnabled), - 'order': serializer.toJson( - i1.$RemoteAlbumEntityTable.$converterorder.toJson(order), - ), - }; - } - - i1.RemoteAlbumEntityData copyWith({ - String? id, - String? name, - String? description, - DateTime? createdAt, - DateTime? updatedAt, - i0.Value thumbnailAssetId = const i0.Value.absent(), - bool? isActivityEnabled, - i2.AlbumAssetOrder? order, - }) => i1.RemoteAlbumEntityData( - id: id ?? this.id, - name: name ?? this.name, - description: description ?? this.description, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - thumbnailAssetId: thumbnailAssetId.present - ? thumbnailAssetId.value - : this.thumbnailAssetId, - isActivityEnabled: isActivityEnabled ?? this.isActivityEnabled, - order: order ?? this.order, - ); - RemoteAlbumEntityData copyWithCompanion(i1.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, - 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('thumbnailAssetId: $thumbnailAssetId, ') - ..write('isActivityEnabled: $isActivityEnabled, ') - ..write('order: $order') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - name, - description, - createdAt, - updatedAt, - thumbnailAssetId, - isActivityEnabled, - order, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is i1.RemoteAlbumEntityData && - other.id == this.id && - other.name == this.name && - other.description == this.description && - other.createdAt == this.createdAt && - other.updatedAt == this.updatedAt && - other.thumbnailAssetId == this.thumbnailAssetId && - other.isActivityEnabled == this.isActivityEnabled && - other.order == this.order); -} - -class RemoteAlbumEntityCompanion - extends i0.UpdateCompanion { - final i0.Value id; - final i0.Value name; - final i0.Value description; - final i0.Value createdAt; - final i0.Value updatedAt; - final i0.Value thumbnailAssetId; - final i0.Value isActivityEnabled; - final i0.Value order; - const RemoteAlbumEntityCompanion({ - this.id = const i0.Value.absent(), - this.name = const i0.Value.absent(), - this.description = const i0.Value.absent(), - this.createdAt = const i0.Value.absent(), - this.updatedAt = const i0.Value.absent(), - this.thumbnailAssetId = const i0.Value.absent(), - this.isActivityEnabled = const i0.Value.absent(), - this.order = const i0.Value.absent(), - }); - RemoteAlbumEntityCompanion.insert({ - required String id, - required String name, - this.description = const i0.Value.absent(), - this.createdAt = const i0.Value.absent(), - this.updatedAt = const i0.Value.absent(), - this.thumbnailAssetId = const i0.Value.absent(), - this.isActivityEnabled = const i0.Value.absent(), - required i2.AlbumAssetOrder order, - }) : id = i0.Value(id), - name = i0.Value(name), - order = i0.Value(order); - static i0.Insertable custom({ - i0.Expression? id, - i0.Expression? name, - i0.Expression? description, - i0.Expression? createdAt, - i0.Expression? updatedAt, - i0.Expression? thumbnailAssetId, - i0.Expression? isActivityEnabled, - i0.Expression? order, - }) { - return i0.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 (thumbnailAssetId != null) 'thumbnail_asset_id': thumbnailAssetId, - if (isActivityEnabled != null) 'is_activity_enabled': isActivityEnabled, - if (order != null) 'order': order, - }); - } - - i1.RemoteAlbumEntityCompanion copyWith({ - i0.Value? id, - i0.Value? name, - i0.Value? description, - i0.Value? createdAt, - i0.Value? updatedAt, - i0.Value? thumbnailAssetId, - i0.Value? isActivityEnabled, - i0.Value? order, - }) { - return i1.RemoteAlbumEntityCompanion( - id: id ?? this.id, - name: name ?? this.name, - description: description ?? this.description, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - thumbnailAssetId: thumbnailAssetId ?? this.thumbnailAssetId, - isActivityEnabled: isActivityEnabled ?? this.isActivityEnabled, - order: order ?? this.order, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = i0.Variable(id.value); - } - if (name.present) { - map['name'] = i0.Variable(name.value); - } - if (description.present) { - map['description'] = i0.Variable(description.value); - } - if (createdAt.present) { - map['created_at'] = i0.Variable(createdAt.value); - } - if (updatedAt.present) { - map['updated_at'] = i0.Variable(updatedAt.value); - } - if (thumbnailAssetId.present) { - map['thumbnail_asset_id'] = i0.Variable(thumbnailAssetId.value); - } - if (isActivityEnabled.present) { - map['is_activity_enabled'] = i0.Variable(isActivityEnabled.value); - } - if (order.present) { - map['order'] = i0.Variable( - i1.$RemoteAlbumEntityTable.$converterorder.toSql(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('thumbnailAssetId: $thumbnailAssetId, ') - ..write('isActivityEnabled: $isActivityEnabled, ') - ..write('order: $order') - ..write(')')) - .toString(); - } -} diff --git a/mobile/lib/infrastructure/entities/remote_album_asset.entity.drift.dart b/mobile/lib/infrastructure/entities/remote_album_asset.entity.drift.dart deleted file mode 100644 index a03c4d7e96..0000000000 --- a/mobile/lib/infrastructure/entities/remote_album_asset.entity.drift.dart +++ /dev/null @@ -1,672 +0,0 @@ -// dart format width=80 -// ignore_for_file: type=lint -import 'package:drift/drift.dart' as i0; -import 'package:immich_mobile/infrastructure/entities/remote_album_asset.entity.drift.dart' - as i1; -import 'package:immich_mobile/infrastructure/entities/remote_album_asset.entity.dart' - as i2; -import 'package:immich_mobile/infrastructure/entities/remote_asset.entity.drift.dart' - as i3; -import 'package:drift/internal/modular.dart' as i4; -import 'package:immich_mobile/infrastructure/entities/remote_album.entity.drift.dart' - as i5; - -typedef $$RemoteAlbumAssetEntityTableCreateCompanionBuilder = - i1.RemoteAlbumAssetEntityCompanion Function({ - required String assetId, - required String albumId, - }); -typedef $$RemoteAlbumAssetEntityTableUpdateCompanionBuilder = - i1.RemoteAlbumAssetEntityCompanion Function({ - i0.Value assetId, - i0.Value albumId, - }); - -final class $$RemoteAlbumAssetEntityTableReferences - extends - i0.BaseReferences< - i0.GeneratedDatabase, - i1.$RemoteAlbumAssetEntityTable, - i1.RemoteAlbumAssetEntityData - > { - $$RemoteAlbumAssetEntityTableReferences( - super.$_db, - super.$_table, - super.$_typedResult, - ); - - static i3.$RemoteAssetEntityTable _assetIdTable(i0.GeneratedDatabase db) => - i4.ReadDatabaseContainer(db) - .resultSet('remote_asset_entity') - .createAlias( - i0.$_aliasNameGenerator( - i4.ReadDatabaseContainer(db) - .resultSet( - 'remote_album_asset_entity', - ) - .assetId, - i4.ReadDatabaseContainer( - db, - ).resultSet('remote_asset_entity').id, - ), - ); - - i3.$$RemoteAssetEntityTableProcessedTableManager get assetId { - final $_column = $_itemColumn('asset_id')!; - - final manager = i3 - .$$RemoteAssetEntityTableTableManager( - $_db, - i4.ReadDatabaseContainer( - $_db, - ).resultSet('remote_asset_entity'), - ) - .filter((f) => f.id.sqlEquals($_column)); - final item = $_typedResult.readTableOrNull(_assetIdTable($_db)); - if (item == null) return manager; - return i0.ProcessedTableManager( - manager.$state.copyWith(prefetchedData: [item]), - ); - } - - static i5.$RemoteAlbumEntityTable _albumIdTable(i0.GeneratedDatabase db) => - i4.ReadDatabaseContainer(db) - .resultSet('remote_album_entity') - .createAlias( - i0.$_aliasNameGenerator( - i4.ReadDatabaseContainer(db) - .resultSet( - 'remote_album_asset_entity', - ) - .albumId, - i4.ReadDatabaseContainer( - db, - ).resultSet('remote_album_entity').id, - ), - ); - - i5.$$RemoteAlbumEntityTableProcessedTableManager get albumId { - final $_column = $_itemColumn('album_id')!; - - final manager = i5 - .$$RemoteAlbumEntityTableTableManager( - $_db, - i4.ReadDatabaseContainer( - $_db, - ).resultSet('remote_album_entity'), - ) - .filter((f) => f.id.sqlEquals($_column)); - final item = $_typedResult.readTableOrNull(_albumIdTable($_db)); - if (item == null) return manager; - return i0.ProcessedTableManager( - manager.$state.copyWith(prefetchedData: [item]), - ); - } -} - -class $$RemoteAlbumAssetEntityTableFilterComposer - extends i0.Composer { - $$RemoteAlbumAssetEntityTableFilterComposer({ - required super.$db, - required super.$table, - super.joinBuilder, - super.$addJoinBuilderToRootComposer, - super.$removeJoinBuilderFromRootComposer, - }); - i3.$$RemoteAssetEntityTableFilterComposer get assetId { - final i3.$$RemoteAssetEntityTableFilterComposer composer = $composerBuilder( - composer: this, - getCurrentColumn: (t) => t.assetId, - referencedTable: i4.ReadDatabaseContainer( - $db, - ).resultSet('remote_asset_entity'), - getReferencedColumn: (t) => t.id, - builder: - ( - joinBuilder, { - $addJoinBuilderToRootComposer, - $removeJoinBuilderFromRootComposer, - }) => i3.$$RemoteAssetEntityTableFilterComposer( - $db: $db, - $table: i4.ReadDatabaseContainer( - $db, - ).resultSet('remote_asset_entity'), - $addJoinBuilderToRootComposer: $addJoinBuilderToRootComposer, - joinBuilder: joinBuilder, - $removeJoinBuilderFromRootComposer: - $removeJoinBuilderFromRootComposer, - ), - ); - return composer; - } - - i5.$$RemoteAlbumEntityTableFilterComposer get albumId { - final i5.$$RemoteAlbumEntityTableFilterComposer composer = $composerBuilder( - composer: this, - getCurrentColumn: (t) => t.albumId, - referencedTable: i4.ReadDatabaseContainer( - $db, - ).resultSet('remote_album_entity'), - getReferencedColumn: (t) => t.id, - builder: - ( - joinBuilder, { - $addJoinBuilderToRootComposer, - $removeJoinBuilderFromRootComposer, - }) => i5.$$RemoteAlbumEntityTableFilterComposer( - $db: $db, - $table: i4.ReadDatabaseContainer( - $db, - ).resultSet('remote_album_entity'), - $addJoinBuilderToRootComposer: $addJoinBuilderToRootComposer, - joinBuilder: joinBuilder, - $removeJoinBuilderFromRootComposer: - $removeJoinBuilderFromRootComposer, - ), - ); - return composer; - } -} - -class $$RemoteAlbumAssetEntityTableOrderingComposer - extends i0.Composer { - $$RemoteAlbumAssetEntityTableOrderingComposer({ - required super.$db, - required super.$table, - super.joinBuilder, - super.$addJoinBuilderToRootComposer, - super.$removeJoinBuilderFromRootComposer, - }); - i3.$$RemoteAssetEntityTableOrderingComposer get assetId { - final i3.$$RemoteAssetEntityTableOrderingComposer composer = - $composerBuilder( - composer: this, - getCurrentColumn: (t) => t.assetId, - referencedTable: i4.ReadDatabaseContainer( - $db, - ).resultSet('remote_asset_entity'), - getReferencedColumn: (t) => t.id, - builder: - ( - joinBuilder, { - $addJoinBuilderToRootComposer, - $removeJoinBuilderFromRootComposer, - }) => i3.$$RemoteAssetEntityTableOrderingComposer( - $db: $db, - $table: i4.ReadDatabaseContainer( - $db, - ).resultSet('remote_asset_entity'), - $addJoinBuilderToRootComposer: $addJoinBuilderToRootComposer, - joinBuilder: joinBuilder, - $removeJoinBuilderFromRootComposer: - $removeJoinBuilderFromRootComposer, - ), - ); - return composer; - } - - i5.$$RemoteAlbumEntityTableOrderingComposer get albumId { - final i5.$$RemoteAlbumEntityTableOrderingComposer composer = - $composerBuilder( - composer: this, - getCurrentColumn: (t) => t.albumId, - referencedTable: i4.ReadDatabaseContainer( - $db, - ).resultSet('remote_album_entity'), - getReferencedColumn: (t) => t.id, - builder: - ( - joinBuilder, { - $addJoinBuilderToRootComposer, - $removeJoinBuilderFromRootComposer, - }) => i5.$$RemoteAlbumEntityTableOrderingComposer( - $db: $db, - $table: i4.ReadDatabaseContainer( - $db, - ).resultSet('remote_album_entity'), - $addJoinBuilderToRootComposer: $addJoinBuilderToRootComposer, - joinBuilder: joinBuilder, - $removeJoinBuilderFromRootComposer: - $removeJoinBuilderFromRootComposer, - ), - ); - return composer; - } -} - -class $$RemoteAlbumAssetEntityTableAnnotationComposer - extends i0.Composer { - $$RemoteAlbumAssetEntityTableAnnotationComposer({ - required super.$db, - required super.$table, - super.joinBuilder, - super.$addJoinBuilderToRootComposer, - super.$removeJoinBuilderFromRootComposer, - }); - i3.$$RemoteAssetEntityTableAnnotationComposer get assetId { - final i3.$$RemoteAssetEntityTableAnnotationComposer composer = - $composerBuilder( - composer: this, - getCurrentColumn: (t) => t.assetId, - referencedTable: i4.ReadDatabaseContainer( - $db, - ).resultSet('remote_asset_entity'), - getReferencedColumn: (t) => t.id, - builder: - ( - joinBuilder, { - $addJoinBuilderToRootComposer, - $removeJoinBuilderFromRootComposer, - }) => i3.$$RemoteAssetEntityTableAnnotationComposer( - $db: $db, - $table: i4.ReadDatabaseContainer( - $db, - ).resultSet('remote_asset_entity'), - $addJoinBuilderToRootComposer: $addJoinBuilderToRootComposer, - joinBuilder: joinBuilder, - $removeJoinBuilderFromRootComposer: - $removeJoinBuilderFromRootComposer, - ), - ); - return composer; - } - - i5.$$RemoteAlbumEntityTableAnnotationComposer get albumId { - final i5.$$RemoteAlbumEntityTableAnnotationComposer composer = - $composerBuilder( - composer: this, - getCurrentColumn: (t) => t.albumId, - referencedTable: i4.ReadDatabaseContainer( - $db, - ).resultSet('remote_album_entity'), - getReferencedColumn: (t) => t.id, - builder: - ( - joinBuilder, { - $addJoinBuilderToRootComposer, - $removeJoinBuilderFromRootComposer, - }) => i5.$$RemoteAlbumEntityTableAnnotationComposer( - $db: $db, - $table: i4.ReadDatabaseContainer( - $db, - ).resultSet('remote_album_entity'), - $addJoinBuilderToRootComposer: $addJoinBuilderToRootComposer, - joinBuilder: joinBuilder, - $removeJoinBuilderFromRootComposer: - $removeJoinBuilderFromRootComposer, - ), - ); - return composer; - } -} - -class $$RemoteAlbumAssetEntityTableTableManager - extends - i0.RootTableManager< - i0.GeneratedDatabase, - i1.$RemoteAlbumAssetEntityTable, - i1.RemoteAlbumAssetEntityData, - i1.$$RemoteAlbumAssetEntityTableFilterComposer, - i1.$$RemoteAlbumAssetEntityTableOrderingComposer, - i1.$$RemoteAlbumAssetEntityTableAnnotationComposer, - $$RemoteAlbumAssetEntityTableCreateCompanionBuilder, - $$RemoteAlbumAssetEntityTableUpdateCompanionBuilder, - ( - i1.RemoteAlbumAssetEntityData, - i1.$$RemoteAlbumAssetEntityTableReferences, - ), - i1.RemoteAlbumAssetEntityData, - i0.PrefetchHooks Function({bool assetId, bool albumId}) - > { - $$RemoteAlbumAssetEntityTableTableManager( - i0.GeneratedDatabase db, - i1.$RemoteAlbumAssetEntityTable table, - ) : super( - i0.TableManagerState( - db: db, - table: table, - createFilteringComposer: () => - i1.$$RemoteAlbumAssetEntityTableFilterComposer( - $db: db, - $table: table, - ), - createOrderingComposer: () => - i1.$$RemoteAlbumAssetEntityTableOrderingComposer( - $db: db, - $table: table, - ), - createComputedFieldComposer: () => - i1.$$RemoteAlbumAssetEntityTableAnnotationComposer( - $db: db, - $table: table, - ), - updateCompanionCallback: - ({ - i0.Value assetId = const i0.Value.absent(), - i0.Value albumId = const i0.Value.absent(), - }) => i1.RemoteAlbumAssetEntityCompanion( - assetId: assetId, - albumId: albumId, - ), - createCompanionCallback: - ({required String assetId, required String albumId}) => - i1.RemoteAlbumAssetEntityCompanion.insert( - assetId: assetId, - albumId: albumId, - ), - withReferenceMapper: (p0) => p0 - .map( - (e) => ( - e.readTable(table), - i1.$$RemoteAlbumAssetEntityTableReferences(db, table, e), - ), - ) - .toList(), - prefetchHooksCallback: ({assetId = false, albumId = false}) { - return i0.PrefetchHooks( - db: db, - explicitlyWatchedTables: [], - addJoins: - < - T extends i0.TableManagerState< - dynamic, - dynamic, - dynamic, - dynamic, - dynamic, - dynamic, - dynamic, - dynamic, - dynamic, - dynamic, - dynamic - > - >(state) { - if (assetId) { - state = - state.withJoin( - currentTable: table, - currentColumn: table.assetId, - referencedTable: i1 - .$$RemoteAlbumAssetEntityTableReferences - ._assetIdTable(db), - referencedColumn: i1 - .$$RemoteAlbumAssetEntityTableReferences - ._assetIdTable(db) - .id, - ) - as T; - } - if (albumId) { - state = - state.withJoin( - currentTable: table, - currentColumn: table.albumId, - referencedTable: i1 - .$$RemoteAlbumAssetEntityTableReferences - ._albumIdTable(db), - referencedColumn: i1 - .$$RemoteAlbumAssetEntityTableReferences - ._albumIdTable(db) - .id, - ) - as T; - } - - return state; - }, - getPrefetchedDataCallback: (items) async { - return []; - }, - ); - }, - ), - ); -} - -typedef $$RemoteAlbumAssetEntityTableProcessedTableManager = - i0.ProcessedTableManager< - i0.GeneratedDatabase, - i1.$RemoteAlbumAssetEntityTable, - i1.RemoteAlbumAssetEntityData, - i1.$$RemoteAlbumAssetEntityTableFilterComposer, - i1.$$RemoteAlbumAssetEntityTableOrderingComposer, - i1.$$RemoteAlbumAssetEntityTableAnnotationComposer, - $$RemoteAlbumAssetEntityTableCreateCompanionBuilder, - $$RemoteAlbumAssetEntityTableUpdateCompanionBuilder, - ( - i1.RemoteAlbumAssetEntityData, - i1.$$RemoteAlbumAssetEntityTableReferences, - ), - i1.RemoteAlbumAssetEntityData, - i0.PrefetchHooks Function({bool assetId, bool albumId}) - >; -i0.Index get idxRemoteAlbumAssetAlbumAsset => i0.Index( - 'idx_remote_album_asset_album_asset', - 'CREATE INDEX IF NOT EXISTS idx_remote_album_asset_album_asset ON remote_album_asset_entity (album_id, asset_id)', -); - -class $RemoteAlbumAssetEntityTable extends i2.RemoteAlbumAssetEntity - with - i0.TableInfo< - $RemoteAlbumAssetEntityTable, - i1.RemoteAlbumAssetEntityData - > { - @override - final i0.GeneratedDatabase attachedDatabase; - final String? _alias; - $RemoteAlbumAssetEntityTable(this.attachedDatabase, [this._alias]); - static const i0.VerificationMeta _assetIdMeta = const i0.VerificationMeta( - 'assetId', - ); - @override - late final i0.GeneratedColumn assetId = i0.GeneratedColumn( - 'asset_id', - aliasedName, - false, - type: i0.DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: i0.GeneratedColumn.constraintIsAlways( - 'REFERENCES remote_asset_entity (id) ON DELETE CASCADE', - ), - ); - 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, - defaultConstraints: i0.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 - i0.VerificationContext validateIntegrity( - i0.Insertable instance, { - bool isInserting = false, - }) { - final context = i0.VerificationContext(); - final data = instance.toColumns(true); - if (data.containsKey('asset_id')) { - context.handle( - _assetIdMeta, - assetId.isAcceptableOrUnknown(data['asset_id']!, _assetIdMeta), - ); - } else if (isInserting) { - context.missing(_assetIdMeta); - } - if (data.containsKey('album_id')) { - context.handle( - _albumIdMeta, - albumId.isAcceptableOrUnknown(data['album_id']!, _albumIdMeta), - ); - } else if (isInserting) { - context.missing(_albumIdMeta); - } - return context; - } - - @override - Set get $primaryKey => {assetId, albumId}; - @override - i1.RemoteAlbumAssetEntityData map( - Map data, { - String? tablePrefix, - }) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return i1.RemoteAlbumAssetEntityData( - assetId: attachedDatabase.typeMapping.read( - i0.DriftSqlType.string, - data['${effectivePrefix}asset_id'], - )!, - albumId: attachedDatabase.typeMapping.read( - i0.DriftSqlType.string, - data['${effectivePrefix}album_id'], - )!, - ); - } - - @override - $RemoteAlbumAssetEntityTable createAlias(String alias) { - return $RemoteAlbumAssetEntityTable(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class RemoteAlbumAssetEntityData extends i0.DataClass - implements i0.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'] = i0.Variable(assetId); - map['album_id'] = i0.Variable(albumId); - return map; - } - - factory RemoteAlbumAssetEntityData.fromJson( - Map json, { - i0.ValueSerializer? serializer, - }) { - serializer ??= i0.driftRuntimeOptions.defaultSerializer; - return RemoteAlbumAssetEntityData( - assetId: serializer.fromJson(json['assetId']), - albumId: serializer.fromJson(json['albumId']), - ); - } - @override - Map toJson({i0.ValueSerializer? serializer}) { - serializer ??= i0.driftRuntimeOptions.defaultSerializer; - return { - 'assetId': serializer.toJson(assetId), - 'albumId': serializer.toJson(albumId), - }; - } - - i1.RemoteAlbumAssetEntityData copyWith({String? assetId, String? albumId}) => - i1.RemoteAlbumAssetEntityData( - assetId: assetId ?? this.assetId, - albumId: albumId ?? this.albumId, - ); - RemoteAlbumAssetEntityData copyWithCompanion( - i1.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 i1.RemoteAlbumAssetEntityData && - other.assetId == this.assetId && - other.albumId == this.albumId); -} - -class RemoteAlbumAssetEntityCompanion - extends i0.UpdateCompanion { - final i0.Value assetId; - final i0.Value albumId; - const RemoteAlbumAssetEntityCompanion({ - this.assetId = const i0.Value.absent(), - this.albumId = const i0.Value.absent(), - }); - RemoteAlbumAssetEntityCompanion.insert({ - required String assetId, - required String albumId, - }) : assetId = i0.Value(assetId), - albumId = i0.Value(albumId); - static i0.Insertable custom({ - i0.Expression? assetId, - i0.Expression? albumId, - }) { - return i0.RawValuesInsertable({ - if (assetId != null) 'asset_id': assetId, - if (albumId != null) 'album_id': albumId, - }); - } - - i1.RemoteAlbumAssetEntityCompanion copyWith({ - i0.Value? assetId, - i0.Value? albumId, - }) { - return i1.RemoteAlbumAssetEntityCompanion( - assetId: assetId ?? this.assetId, - albumId: albumId ?? this.albumId, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (assetId.present) { - map['asset_id'] = i0.Variable(assetId.value); - } - if (albumId.present) { - map['album_id'] = i0.Variable(albumId.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('RemoteAlbumAssetEntityCompanion(') - ..write('assetId: $assetId, ') - ..write('albumId: $albumId') - ..write(')')) - .toString(); - } -} diff --git a/mobile/lib/infrastructure/entities/remote_album_user.entity.drift.dart b/mobile/lib/infrastructure/entities/remote_album_user.entity.drift.dart deleted file mode 100644 index f8167ddf94..0000000000 --- a/mobile/lib/infrastructure/entities/remote_album_user.entity.drift.dart +++ /dev/null @@ -1,739 +0,0 @@ -// dart format width=80 -// ignore_for_file: type=lint -import 'package:drift/drift.dart' as i0; -import 'package:immich_mobile/infrastructure/entities/remote_album_user.entity.drift.dart' - as i1; -import 'package:immich_mobile/domain/models/album/album.model.dart' as i2; -import 'package:immich_mobile/infrastructure/entities/remote_album_user.entity.dart' - as i3; -import 'package:immich_mobile/infrastructure/entities/remote_album.entity.drift.dart' - as i4; -import 'package:drift/internal/modular.dart' as i5; -import 'package:immich_mobile/infrastructure/entities/user.entity.drift.dart' - as i6; - -typedef $$RemoteAlbumUserEntityTableCreateCompanionBuilder = - i1.RemoteAlbumUserEntityCompanion Function({ - required String albumId, - required String userId, - required i2.AlbumUserRole role, - }); -typedef $$RemoteAlbumUserEntityTableUpdateCompanionBuilder = - i1.RemoteAlbumUserEntityCompanion Function({ - i0.Value albumId, - i0.Value userId, - i0.Value role, - }); - -final class $$RemoteAlbumUserEntityTableReferences - extends - i0.BaseReferences< - i0.GeneratedDatabase, - i1.$RemoteAlbumUserEntityTable, - i1.RemoteAlbumUserEntityData - > { - $$RemoteAlbumUserEntityTableReferences( - super.$_db, - super.$_table, - super.$_typedResult, - ); - - static i4.$RemoteAlbumEntityTable _albumIdTable(i0.GeneratedDatabase db) => - i5.ReadDatabaseContainer(db) - .resultSet('remote_album_entity') - .createAlias( - i0.$_aliasNameGenerator( - i5.ReadDatabaseContainer(db) - .resultSet( - 'remote_album_user_entity', - ) - .albumId, - i5.ReadDatabaseContainer( - db, - ).resultSet('remote_album_entity').id, - ), - ); - - i4.$$RemoteAlbumEntityTableProcessedTableManager get albumId { - final $_column = $_itemColumn('album_id')!; - - final manager = i4 - .$$RemoteAlbumEntityTableTableManager( - $_db, - i5.ReadDatabaseContainer( - $_db, - ).resultSet('remote_album_entity'), - ) - .filter((f) => f.id.sqlEquals($_column)); - final item = $_typedResult.readTableOrNull(_albumIdTable($_db)); - if (item == null) return manager; - return i0.ProcessedTableManager( - manager.$state.copyWith(prefetchedData: [item]), - ); - } - - static i6.$UserEntityTable _userIdTable(i0.GeneratedDatabase db) => - i5.ReadDatabaseContainer(db) - .resultSet('user_entity') - .createAlias( - i0.$_aliasNameGenerator( - i5.ReadDatabaseContainer(db) - .resultSet( - 'remote_album_user_entity', - ) - .userId, - i5.ReadDatabaseContainer( - db, - ).resultSet('user_entity').id, - ), - ); - - i6.$$UserEntityTableProcessedTableManager get userId { - final $_column = $_itemColumn('user_id')!; - - final manager = i6 - .$$UserEntityTableTableManager( - $_db, - i5.ReadDatabaseContainer( - $_db, - ).resultSet('user_entity'), - ) - .filter((f) => f.id.sqlEquals($_column)); - final item = $_typedResult.readTableOrNull(_userIdTable($_db)); - if (item == null) return manager; - return i0.ProcessedTableManager( - manager.$state.copyWith(prefetchedData: [item]), - ); - } -} - -class $$RemoteAlbumUserEntityTableFilterComposer - extends i0.Composer { - $$RemoteAlbumUserEntityTableFilterComposer({ - required super.$db, - required super.$table, - super.joinBuilder, - super.$addJoinBuilderToRootComposer, - super.$removeJoinBuilderFromRootComposer, - }); - i0.ColumnWithTypeConverterFilters - get role => $composableBuilder( - column: $table.role, - builder: (column) => i0.ColumnWithTypeConverterFilters(column), - ); - - i4.$$RemoteAlbumEntityTableFilterComposer get albumId { - final i4.$$RemoteAlbumEntityTableFilterComposer composer = $composerBuilder( - composer: this, - getCurrentColumn: (t) => t.albumId, - referencedTable: i5.ReadDatabaseContainer( - $db, - ).resultSet('remote_album_entity'), - getReferencedColumn: (t) => t.id, - builder: - ( - joinBuilder, { - $addJoinBuilderToRootComposer, - $removeJoinBuilderFromRootComposer, - }) => i4.$$RemoteAlbumEntityTableFilterComposer( - $db: $db, - $table: i5.ReadDatabaseContainer( - $db, - ).resultSet('remote_album_entity'), - $addJoinBuilderToRootComposer: $addJoinBuilderToRootComposer, - joinBuilder: joinBuilder, - $removeJoinBuilderFromRootComposer: - $removeJoinBuilderFromRootComposer, - ), - ); - return composer; - } - - i6.$$UserEntityTableFilterComposer get userId { - final i6.$$UserEntityTableFilterComposer composer = $composerBuilder( - composer: this, - getCurrentColumn: (t) => t.userId, - referencedTable: i5.ReadDatabaseContainer( - $db, - ).resultSet('user_entity'), - getReferencedColumn: (t) => t.id, - builder: - ( - joinBuilder, { - $addJoinBuilderToRootComposer, - $removeJoinBuilderFromRootComposer, - }) => i6.$$UserEntityTableFilterComposer( - $db: $db, - $table: i5.ReadDatabaseContainer( - $db, - ).resultSet('user_entity'), - $addJoinBuilderToRootComposer: $addJoinBuilderToRootComposer, - joinBuilder: joinBuilder, - $removeJoinBuilderFromRootComposer: - $removeJoinBuilderFromRootComposer, - ), - ); - return composer; - } -} - -class $$RemoteAlbumUserEntityTableOrderingComposer - extends i0.Composer { - $$RemoteAlbumUserEntityTableOrderingComposer({ - required super.$db, - required super.$table, - super.joinBuilder, - super.$addJoinBuilderToRootComposer, - super.$removeJoinBuilderFromRootComposer, - }); - i0.ColumnOrderings get role => $composableBuilder( - column: $table.role, - builder: (column) => i0.ColumnOrderings(column), - ); - - i4.$$RemoteAlbumEntityTableOrderingComposer get albumId { - final i4.$$RemoteAlbumEntityTableOrderingComposer composer = - $composerBuilder( - composer: this, - getCurrentColumn: (t) => t.albumId, - referencedTable: i5.ReadDatabaseContainer( - $db, - ).resultSet('remote_album_entity'), - getReferencedColumn: (t) => t.id, - builder: - ( - joinBuilder, { - $addJoinBuilderToRootComposer, - $removeJoinBuilderFromRootComposer, - }) => i4.$$RemoteAlbumEntityTableOrderingComposer( - $db: $db, - $table: i5.ReadDatabaseContainer( - $db, - ).resultSet('remote_album_entity'), - $addJoinBuilderToRootComposer: $addJoinBuilderToRootComposer, - joinBuilder: joinBuilder, - $removeJoinBuilderFromRootComposer: - $removeJoinBuilderFromRootComposer, - ), - ); - return composer; - } - - i6.$$UserEntityTableOrderingComposer get userId { - final i6.$$UserEntityTableOrderingComposer composer = $composerBuilder( - composer: this, - getCurrentColumn: (t) => t.userId, - referencedTable: i5.ReadDatabaseContainer( - $db, - ).resultSet('user_entity'), - getReferencedColumn: (t) => t.id, - builder: - ( - joinBuilder, { - $addJoinBuilderToRootComposer, - $removeJoinBuilderFromRootComposer, - }) => i6.$$UserEntityTableOrderingComposer( - $db: $db, - $table: i5.ReadDatabaseContainer( - $db, - ).resultSet('user_entity'), - $addJoinBuilderToRootComposer: $addJoinBuilderToRootComposer, - joinBuilder: joinBuilder, - $removeJoinBuilderFromRootComposer: - $removeJoinBuilderFromRootComposer, - ), - ); - return composer; - } -} - -class $$RemoteAlbumUserEntityTableAnnotationComposer - extends i0.Composer { - $$RemoteAlbumUserEntityTableAnnotationComposer({ - required super.$db, - required super.$table, - super.joinBuilder, - super.$addJoinBuilderToRootComposer, - super.$removeJoinBuilderFromRootComposer, - }); - i0.GeneratedColumnWithTypeConverter get role => - $composableBuilder(column: $table.role, builder: (column) => column); - - i4.$$RemoteAlbumEntityTableAnnotationComposer get albumId { - final i4.$$RemoteAlbumEntityTableAnnotationComposer composer = - $composerBuilder( - composer: this, - getCurrentColumn: (t) => t.albumId, - referencedTable: i5.ReadDatabaseContainer( - $db, - ).resultSet('remote_album_entity'), - getReferencedColumn: (t) => t.id, - builder: - ( - joinBuilder, { - $addJoinBuilderToRootComposer, - $removeJoinBuilderFromRootComposer, - }) => i4.$$RemoteAlbumEntityTableAnnotationComposer( - $db: $db, - $table: i5.ReadDatabaseContainer( - $db, - ).resultSet('remote_album_entity'), - $addJoinBuilderToRootComposer: $addJoinBuilderToRootComposer, - joinBuilder: joinBuilder, - $removeJoinBuilderFromRootComposer: - $removeJoinBuilderFromRootComposer, - ), - ); - return composer; - } - - i6.$$UserEntityTableAnnotationComposer get userId { - final i6.$$UserEntityTableAnnotationComposer composer = $composerBuilder( - composer: this, - getCurrentColumn: (t) => t.userId, - referencedTable: i5.ReadDatabaseContainer( - $db, - ).resultSet('user_entity'), - getReferencedColumn: (t) => t.id, - builder: - ( - joinBuilder, { - $addJoinBuilderToRootComposer, - $removeJoinBuilderFromRootComposer, - }) => i6.$$UserEntityTableAnnotationComposer( - $db: $db, - $table: i5.ReadDatabaseContainer( - $db, - ).resultSet('user_entity'), - $addJoinBuilderToRootComposer: $addJoinBuilderToRootComposer, - joinBuilder: joinBuilder, - $removeJoinBuilderFromRootComposer: - $removeJoinBuilderFromRootComposer, - ), - ); - return composer; - } -} - -class $$RemoteAlbumUserEntityTableTableManager - extends - i0.RootTableManager< - i0.GeneratedDatabase, - i1.$RemoteAlbumUserEntityTable, - i1.RemoteAlbumUserEntityData, - i1.$$RemoteAlbumUserEntityTableFilterComposer, - i1.$$RemoteAlbumUserEntityTableOrderingComposer, - i1.$$RemoteAlbumUserEntityTableAnnotationComposer, - $$RemoteAlbumUserEntityTableCreateCompanionBuilder, - $$RemoteAlbumUserEntityTableUpdateCompanionBuilder, - ( - i1.RemoteAlbumUserEntityData, - i1.$$RemoteAlbumUserEntityTableReferences, - ), - i1.RemoteAlbumUserEntityData, - i0.PrefetchHooks Function({bool albumId, bool userId}) - > { - $$RemoteAlbumUserEntityTableTableManager( - i0.GeneratedDatabase db, - i1.$RemoteAlbumUserEntityTable table, - ) : super( - i0.TableManagerState( - db: db, - table: table, - createFilteringComposer: () => - i1.$$RemoteAlbumUserEntityTableFilterComposer( - $db: db, - $table: table, - ), - createOrderingComposer: () => - i1.$$RemoteAlbumUserEntityTableOrderingComposer( - $db: db, - $table: table, - ), - createComputedFieldComposer: () => - i1.$$RemoteAlbumUserEntityTableAnnotationComposer( - $db: db, - $table: table, - ), - updateCompanionCallback: - ({ - i0.Value albumId = const i0.Value.absent(), - i0.Value userId = const i0.Value.absent(), - i0.Value role = const i0.Value.absent(), - }) => i1.RemoteAlbumUserEntityCompanion( - albumId: albumId, - userId: userId, - role: role, - ), - createCompanionCallback: - ({ - required String albumId, - required String userId, - required i2.AlbumUserRole role, - }) => i1.RemoteAlbumUserEntityCompanion.insert( - albumId: albumId, - userId: userId, - role: role, - ), - withReferenceMapper: (p0) => p0 - .map( - (e) => ( - e.readTable(table), - i1.$$RemoteAlbumUserEntityTableReferences(db, table, e), - ), - ) - .toList(), - prefetchHooksCallback: ({albumId = false, userId = false}) { - return i0.PrefetchHooks( - db: db, - explicitlyWatchedTables: [], - addJoins: - < - T extends i0.TableManagerState< - dynamic, - dynamic, - dynamic, - dynamic, - dynamic, - dynamic, - dynamic, - dynamic, - dynamic, - dynamic, - dynamic - > - >(state) { - if (albumId) { - state = - state.withJoin( - currentTable: table, - currentColumn: table.albumId, - referencedTable: i1 - .$$RemoteAlbumUserEntityTableReferences - ._albumIdTable(db), - referencedColumn: i1 - .$$RemoteAlbumUserEntityTableReferences - ._albumIdTable(db) - .id, - ) - as T; - } - if (userId) { - state = - state.withJoin( - currentTable: table, - currentColumn: table.userId, - referencedTable: i1 - .$$RemoteAlbumUserEntityTableReferences - ._userIdTable(db), - referencedColumn: i1 - .$$RemoteAlbumUserEntityTableReferences - ._userIdTable(db) - .id, - ) - as T; - } - - return state; - }, - getPrefetchedDataCallback: (items) async { - return []; - }, - ); - }, - ), - ); -} - -typedef $$RemoteAlbumUserEntityTableProcessedTableManager = - i0.ProcessedTableManager< - i0.GeneratedDatabase, - i1.$RemoteAlbumUserEntityTable, - i1.RemoteAlbumUserEntityData, - i1.$$RemoteAlbumUserEntityTableFilterComposer, - i1.$$RemoteAlbumUserEntityTableOrderingComposer, - i1.$$RemoteAlbumUserEntityTableAnnotationComposer, - $$RemoteAlbumUserEntityTableCreateCompanionBuilder, - $$RemoteAlbumUserEntityTableUpdateCompanionBuilder, - (i1.RemoteAlbumUserEntityData, i1.$$RemoteAlbumUserEntityTableReferences), - i1.RemoteAlbumUserEntityData, - i0.PrefetchHooks Function({bool albumId, bool userId}) - >; - -class $RemoteAlbumUserEntityTable extends i3.RemoteAlbumUserEntity - with - i0.TableInfo< - $RemoteAlbumUserEntityTable, - i1.RemoteAlbumUserEntityData - > { - @override - final i0.GeneratedDatabase attachedDatabase; - final String? _alias; - $RemoteAlbumUserEntityTable(this.attachedDatabase, [this._alias]); - 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, - defaultConstraints: i0.GeneratedColumn.constraintIsAlways( - 'REFERENCES remote_album_entity (id) ON DELETE CASCADE', - ), - ); - static const i0.VerificationMeta _userIdMeta = const i0.VerificationMeta( - 'userId', - ); - @override - late final i0.GeneratedColumn userId = i0.GeneratedColumn( - 'user_id', - aliasedName, - false, - type: i0.DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: i0.GeneratedColumn.constraintIsAlways( - 'REFERENCES user_entity (id) ON DELETE CASCADE', - ), - ); - @override - late final i0.GeneratedColumnWithTypeConverter role = - i0.GeneratedColumn( - 'role', - aliasedName, - false, - type: i0.DriftSqlType.int, - requiredDuringInsert: true, - ).withConverter( - i1.$RemoteAlbumUserEntityTable.$converterrole, - ); - @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 - i0.VerificationContext validateIntegrity( - i0.Insertable instance, { - bool isInserting = false, - }) { - final context = i0.VerificationContext(); - final data = instance.toColumns(true); - if (data.containsKey('album_id')) { - context.handle( - _albumIdMeta, - albumId.isAcceptableOrUnknown(data['album_id']!, _albumIdMeta), - ); - } else if (isInserting) { - context.missing(_albumIdMeta); - } - if (data.containsKey('user_id')) { - context.handle( - _userIdMeta, - userId.isAcceptableOrUnknown(data['user_id']!, _userIdMeta), - ); - } else if (isInserting) { - context.missing(_userIdMeta); - } - return context; - } - - @override - Set get $primaryKey => {albumId, userId}; - @override - i1.RemoteAlbumUserEntityData map( - Map data, { - String? tablePrefix, - }) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return i1.RemoteAlbumUserEntityData( - albumId: attachedDatabase.typeMapping.read( - i0.DriftSqlType.string, - data['${effectivePrefix}album_id'], - )!, - userId: attachedDatabase.typeMapping.read( - i0.DriftSqlType.string, - data['${effectivePrefix}user_id'], - )!, - role: i1.$RemoteAlbumUserEntityTable.$converterrole.fromSql( - attachedDatabase.typeMapping.read( - i0.DriftSqlType.int, - data['${effectivePrefix}role'], - )!, - ), - ); - } - - @override - $RemoteAlbumUserEntityTable createAlias(String alias) { - return $RemoteAlbumUserEntityTable(attachedDatabase, alias); - } - - static i0.JsonTypeConverter2 $converterrole = - const i0.EnumIndexConverter(i2.AlbumUserRole.values); - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class RemoteAlbumUserEntityData extends i0.DataClass - implements i0.Insertable { - final String albumId; - final String userId; - final i2.AlbumUserRole role; - const RemoteAlbumUserEntityData({ - required this.albumId, - required this.userId, - required this.role, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['album_id'] = i0.Variable(albumId); - map['user_id'] = i0.Variable(userId); - { - map['role'] = i0.Variable( - i1.$RemoteAlbumUserEntityTable.$converterrole.toSql(role), - ); - } - return map; - } - - factory RemoteAlbumUserEntityData.fromJson( - Map json, { - i0.ValueSerializer? serializer, - }) { - serializer ??= i0.driftRuntimeOptions.defaultSerializer; - return RemoteAlbumUserEntityData( - albumId: serializer.fromJson(json['albumId']), - userId: serializer.fromJson(json['userId']), - role: i1.$RemoteAlbumUserEntityTable.$converterrole.fromJson( - serializer.fromJson(json['role']), - ), - ); - } - @override - Map toJson({i0.ValueSerializer? serializer}) { - serializer ??= i0.driftRuntimeOptions.defaultSerializer; - return { - 'albumId': serializer.toJson(albumId), - 'userId': serializer.toJson(userId), - 'role': serializer.toJson( - i1.$RemoteAlbumUserEntityTable.$converterrole.toJson(role), - ), - }; - } - - i1.RemoteAlbumUserEntityData copyWith({ - String? albumId, - String? userId, - i2.AlbumUserRole? role, - }) => i1.RemoteAlbumUserEntityData( - albumId: albumId ?? this.albumId, - userId: userId ?? this.userId, - role: role ?? this.role, - ); - RemoteAlbumUserEntityData copyWithCompanion( - i1.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 i1.RemoteAlbumUserEntityData && - other.albumId == this.albumId && - other.userId == this.userId && - other.role == this.role); -} - -class RemoteAlbumUserEntityCompanion - extends i0.UpdateCompanion { - final i0.Value albumId; - final i0.Value userId; - final i0.Value role; - const RemoteAlbumUserEntityCompanion({ - this.albumId = const i0.Value.absent(), - this.userId = const i0.Value.absent(), - this.role = const i0.Value.absent(), - }); - RemoteAlbumUserEntityCompanion.insert({ - required String albumId, - required String userId, - required i2.AlbumUserRole role, - }) : albumId = i0.Value(albumId), - userId = i0.Value(userId), - role = i0.Value(role); - static i0.Insertable custom({ - i0.Expression? albumId, - i0.Expression? userId, - i0.Expression? role, - }) { - return i0.RawValuesInsertable({ - if (albumId != null) 'album_id': albumId, - if (userId != null) 'user_id': userId, - if (role != null) 'role': role, - }); - } - - i1.RemoteAlbumUserEntityCompanion copyWith({ - i0.Value? albumId, - i0.Value? userId, - i0.Value? role, - }) { - return i1.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'] = i0.Variable(albumId.value); - } - if (userId.present) { - map['user_id'] = i0.Variable(userId.value); - } - if (role.present) { - map['role'] = i0.Variable( - i1.$RemoteAlbumUserEntityTable.$converterrole.toSql(role.value), - ); - } - return map; - } - - @override - String toString() { - return (StringBuffer('RemoteAlbumUserEntityCompanion(') - ..write('albumId: $albumId, ') - ..write('userId: $userId, ') - ..write('role: $role') - ..write(')')) - .toString(); - } -} diff --git a/mobile/lib/infrastructure/entities/remote_asset.entity.dart b/mobile/lib/infrastructure/entities/remote_asset.entity.dart index ad1cec5641..3fe56ae431 100644 --- a/mobile/lib/infrastructure/entities/remote_asset.entity.dart +++ b/mobile/lib/infrastructure/entities/remote_asset.entity.dart @@ -21,6 +21,7 @@ WHERE (library_id IS NOT NULL); CREATE INDEX IF NOT EXISTS idx_remote_asset_owner_visibility_deleted_created ON remote_asset_entity (owner_id, visibility, deleted_at, created_at DESC) ''') +@TableIndex.sql('CREATE INDEX IF NOT EXISTS idx_remote_asset_uploaded ON remote_asset_entity (uploaded_at)') class RemoteAssetEntity extends Table with DriftDefaultsMixin, AssetEntityMixin { const RemoteAssetEntity(); diff --git a/mobile/lib/infrastructure/entities/remote_asset.entity.drift.dart b/mobile/lib/infrastructure/entities/remote_asset.entity.drift.dart deleted file mode 100644 index 8141573343..0000000000 --- a/mobile/lib/infrastructure/entities/remote_asset.entity.drift.dart +++ /dev/null @@ -1,1781 +0,0 @@ -// dart format width=80 -// ignore_for_file: type=lint -import 'package:drift/drift.dart' as i0; -import 'package:immich_mobile/infrastructure/entities/remote_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/remote_asset.entity.dart' - as i3; -import 'package:drift/src/runtime/query_builder/query_builder.dart' as i4; -import 'package:immich_mobile/infrastructure/entities/user.entity.drift.dart' - as i5; -import 'package:drift/internal/modular.dart' as i6; - -typedef $$RemoteAssetEntityTableCreateCompanionBuilder = - i1.RemoteAssetEntityCompanion Function({ - required String name, - required i2.AssetType type, - i0.Value createdAt, - i0.Value updatedAt, - i0.Value width, - i0.Value height, - i0.Value durationMs, - required String id, - required String checksum, - i0.Value isFavorite, - required String ownerId, - i0.Value localDateTime, - i0.Value thumbHash, - i0.Value deletedAt, - i0.Value uploadedAt, - i0.Value livePhotoVideoId, - required i2.AssetVisibility visibility, - i0.Value stackId, - i0.Value libraryId, - i0.Value isEdited, - }); -typedef $$RemoteAssetEntityTableUpdateCompanionBuilder = - i1.RemoteAssetEntityCompanion Function({ - i0.Value name, - i0.Value type, - i0.Value createdAt, - i0.Value updatedAt, - i0.Value width, - i0.Value height, - i0.Value durationMs, - i0.Value id, - i0.Value checksum, - i0.Value isFavorite, - i0.Value ownerId, - i0.Value localDateTime, - i0.Value thumbHash, - i0.Value deletedAt, - i0.Value uploadedAt, - i0.Value livePhotoVideoId, - i0.Value visibility, - i0.Value stackId, - i0.Value libraryId, - i0.Value isEdited, - }); - -final class $$RemoteAssetEntityTableReferences - extends - i0.BaseReferences< - i0.GeneratedDatabase, - i1.$RemoteAssetEntityTable, - i1.RemoteAssetEntityData - > { - $$RemoteAssetEntityTableReferences( - super.$_db, - super.$_table, - super.$_typedResult, - ); - - static i5.$UserEntityTable _ownerIdTable(i0.GeneratedDatabase db) => - i6.ReadDatabaseContainer(db) - .resultSet('user_entity') - .createAlias( - i0.$_aliasNameGenerator( - i6.ReadDatabaseContainer(db) - .resultSet('remote_asset_entity') - .ownerId, - i6.ReadDatabaseContainer( - db, - ).resultSet('user_entity').id, - ), - ); - - i5.$$UserEntityTableProcessedTableManager get ownerId { - final $_column = $_itemColumn('owner_id')!; - - final manager = i5 - .$$UserEntityTableTableManager( - $_db, - i6.ReadDatabaseContainer( - $_db, - ).resultSet('user_entity'), - ) - .filter((f) => f.id.sqlEquals($_column)); - final item = $_typedResult.readTableOrNull(_ownerIdTable($_db)); - if (item == null) return manager; - return i0.ProcessedTableManager( - manager.$state.copyWith(prefetchedData: [item]), - ); - } -} - -class $$RemoteAssetEntityTableFilterComposer - extends i0.Composer { - $$RemoteAssetEntityTableFilterComposer({ - 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 durationMs => $composableBuilder( - column: $table.durationMs, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnFilters get id => $composableBuilder( - column: $table.id, - 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 localDateTime => $composableBuilder( - column: $table.localDateTime, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnFilters get thumbHash => $composableBuilder( - column: $table.thumbHash, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnFilters get deletedAt => $composableBuilder( - column: $table.deletedAt, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnFilters get uploadedAt => $composableBuilder( - column: $table.uploadedAt, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnFilters get livePhotoVideoId => $composableBuilder( - column: $table.livePhotoVideoId, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnWithTypeConverterFilters - get visibility => $composableBuilder( - column: $table.visibility, - builder: (column) => i0.ColumnWithTypeConverterFilters(column), - ); - - i0.ColumnFilters get stackId => $composableBuilder( - column: $table.stackId, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnFilters get libraryId => $composableBuilder( - column: $table.libraryId, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnFilters get isEdited => $composableBuilder( - column: $table.isEdited, - builder: (column) => i0.ColumnFilters(column), - ); - - i5.$$UserEntityTableFilterComposer get ownerId { - final i5.$$UserEntityTableFilterComposer composer = $composerBuilder( - composer: this, - getCurrentColumn: (t) => t.ownerId, - referencedTable: i6.ReadDatabaseContainer( - $db, - ).resultSet('user_entity'), - getReferencedColumn: (t) => t.id, - builder: - ( - joinBuilder, { - $addJoinBuilderToRootComposer, - $removeJoinBuilderFromRootComposer, - }) => i5.$$UserEntityTableFilterComposer( - $db: $db, - $table: i6.ReadDatabaseContainer( - $db, - ).resultSet('user_entity'), - $addJoinBuilderToRootComposer: $addJoinBuilderToRootComposer, - joinBuilder: joinBuilder, - $removeJoinBuilderFromRootComposer: - $removeJoinBuilderFromRootComposer, - ), - ); - return composer; - } -} - -class $$RemoteAssetEntityTableOrderingComposer - extends i0.Composer { - $$RemoteAssetEntityTableOrderingComposer({ - 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 durationMs => $composableBuilder( - column: $table.durationMs, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get id => $composableBuilder( - column: $table.id, - 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 localDateTime => $composableBuilder( - column: $table.localDateTime, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get thumbHash => $composableBuilder( - column: $table.thumbHash, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get deletedAt => $composableBuilder( - column: $table.deletedAt, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get uploadedAt => $composableBuilder( - column: $table.uploadedAt, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get livePhotoVideoId => $composableBuilder( - column: $table.livePhotoVideoId, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get visibility => $composableBuilder( - column: $table.visibility, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get stackId => $composableBuilder( - column: $table.stackId, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get libraryId => $composableBuilder( - column: $table.libraryId, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get isEdited => $composableBuilder( - column: $table.isEdited, - builder: (column) => i0.ColumnOrderings(column), - ); - - i5.$$UserEntityTableOrderingComposer get ownerId { - final i5.$$UserEntityTableOrderingComposer composer = $composerBuilder( - composer: this, - getCurrentColumn: (t) => t.ownerId, - referencedTable: i6.ReadDatabaseContainer( - $db, - ).resultSet('user_entity'), - getReferencedColumn: (t) => t.id, - builder: - ( - joinBuilder, { - $addJoinBuilderToRootComposer, - $removeJoinBuilderFromRootComposer, - }) => i5.$$UserEntityTableOrderingComposer( - $db: $db, - $table: i6.ReadDatabaseContainer( - $db, - ).resultSet('user_entity'), - $addJoinBuilderToRootComposer: $addJoinBuilderToRootComposer, - joinBuilder: joinBuilder, - $removeJoinBuilderFromRootComposer: - $removeJoinBuilderFromRootComposer, - ), - ); - return composer; - } -} - -class $$RemoteAssetEntityTableAnnotationComposer - extends i0.Composer { - $$RemoteAssetEntityTableAnnotationComposer({ - 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 durationMs => $composableBuilder( - column: $table.durationMs, - builder: (column) => column, - ); - - i0.GeneratedColumn get id => - $composableBuilder(column: $table.id, 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 localDateTime => $composableBuilder( - column: $table.localDateTime, - builder: (column) => column, - ); - - i0.GeneratedColumn get thumbHash => - $composableBuilder(column: $table.thumbHash, builder: (column) => column); - - i0.GeneratedColumn get deletedAt => - $composableBuilder(column: $table.deletedAt, builder: (column) => column); - - i0.GeneratedColumn get uploadedAt => $composableBuilder( - column: $table.uploadedAt, - builder: (column) => column, - ); - - i0.GeneratedColumn get livePhotoVideoId => $composableBuilder( - column: $table.livePhotoVideoId, - builder: (column) => column, - ); - - i0.GeneratedColumnWithTypeConverter get visibility => - $composableBuilder( - column: $table.visibility, - builder: (column) => column, - ); - - i0.GeneratedColumn get stackId => - $composableBuilder(column: $table.stackId, builder: (column) => column); - - i0.GeneratedColumn get libraryId => - $composableBuilder(column: $table.libraryId, builder: (column) => column); - - i0.GeneratedColumn get isEdited => - $composableBuilder(column: $table.isEdited, builder: (column) => column); - - i5.$$UserEntityTableAnnotationComposer get ownerId { - final i5.$$UserEntityTableAnnotationComposer composer = $composerBuilder( - composer: this, - getCurrentColumn: (t) => t.ownerId, - referencedTable: i6.ReadDatabaseContainer( - $db, - ).resultSet('user_entity'), - getReferencedColumn: (t) => t.id, - builder: - ( - joinBuilder, { - $addJoinBuilderToRootComposer, - $removeJoinBuilderFromRootComposer, - }) => i5.$$UserEntityTableAnnotationComposer( - $db: $db, - $table: i6.ReadDatabaseContainer( - $db, - ).resultSet('user_entity'), - $addJoinBuilderToRootComposer: $addJoinBuilderToRootComposer, - joinBuilder: joinBuilder, - $removeJoinBuilderFromRootComposer: - $removeJoinBuilderFromRootComposer, - ), - ); - return composer; - } -} - -class $$RemoteAssetEntityTableTableManager - extends - i0.RootTableManager< - i0.GeneratedDatabase, - i1.$RemoteAssetEntityTable, - i1.RemoteAssetEntityData, - i1.$$RemoteAssetEntityTableFilterComposer, - i1.$$RemoteAssetEntityTableOrderingComposer, - i1.$$RemoteAssetEntityTableAnnotationComposer, - $$RemoteAssetEntityTableCreateCompanionBuilder, - $$RemoteAssetEntityTableUpdateCompanionBuilder, - (i1.RemoteAssetEntityData, i1.$$RemoteAssetEntityTableReferences), - i1.RemoteAssetEntityData, - i0.PrefetchHooks Function({bool ownerId}) - > { - $$RemoteAssetEntityTableTableManager( - i0.GeneratedDatabase db, - i1.$RemoteAssetEntityTable table, - ) : super( - i0.TableManagerState( - db: db, - table: table, - createFilteringComposer: () => - i1.$$RemoteAssetEntityTableFilterComposer($db: db, $table: table), - createOrderingComposer: () => i1 - .$$RemoteAssetEntityTableOrderingComposer($db: db, $table: table), - createComputedFieldComposer: () => - i1.$$RemoteAssetEntityTableAnnotationComposer( - $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 durationMs = const i0.Value.absent(), - i0.Value id = const i0.Value.absent(), - i0.Value checksum = const i0.Value.absent(), - i0.Value isFavorite = const i0.Value.absent(), - i0.Value ownerId = const i0.Value.absent(), - i0.Value localDateTime = const i0.Value.absent(), - i0.Value thumbHash = const i0.Value.absent(), - i0.Value deletedAt = const i0.Value.absent(), - i0.Value uploadedAt = const i0.Value.absent(), - i0.Value livePhotoVideoId = const i0.Value.absent(), - i0.Value visibility = - const i0.Value.absent(), - i0.Value stackId = const i0.Value.absent(), - i0.Value libraryId = const i0.Value.absent(), - i0.Value isEdited = const i0.Value.absent(), - }) => i1.RemoteAssetEntityCompanion( - name: name, - type: type, - createdAt: createdAt, - updatedAt: updatedAt, - width: width, - height: height, - durationMs: durationMs, - id: id, - checksum: checksum, - isFavorite: isFavorite, - ownerId: ownerId, - localDateTime: localDateTime, - thumbHash: thumbHash, - deletedAt: deletedAt, - uploadedAt: uploadedAt, - livePhotoVideoId: livePhotoVideoId, - visibility: visibility, - stackId: stackId, - libraryId: libraryId, - isEdited: isEdited, - ), - 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 durationMs = const i0.Value.absent(), - required String id, - required String checksum, - i0.Value isFavorite = const i0.Value.absent(), - required String ownerId, - i0.Value localDateTime = const i0.Value.absent(), - i0.Value thumbHash = const i0.Value.absent(), - i0.Value deletedAt = const i0.Value.absent(), - i0.Value uploadedAt = const i0.Value.absent(), - i0.Value livePhotoVideoId = const i0.Value.absent(), - required i2.AssetVisibility visibility, - i0.Value stackId = const i0.Value.absent(), - i0.Value libraryId = const i0.Value.absent(), - i0.Value isEdited = const i0.Value.absent(), - }) => i1.RemoteAssetEntityCompanion.insert( - name: name, - type: type, - createdAt: createdAt, - updatedAt: updatedAt, - width: width, - height: height, - durationMs: durationMs, - id: id, - checksum: checksum, - isFavorite: isFavorite, - ownerId: ownerId, - localDateTime: localDateTime, - thumbHash: thumbHash, - deletedAt: deletedAt, - uploadedAt: uploadedAt, - livePhotoVideoId: livePhotoVideoId, - visibility: visibility, - stackId: stackId, - libraryId: libraryId, - isEdited: isEdited, - ), - withReferenceMapper: (p0) => p0 - .map( - (e) => ( - e.readTable(table), - i1.$$RemoteAssetEntityTableReferences(db, table, e), - ), - ) - .toList(), - prefetchHooksCallback: ({ownerId = false}) { - return i0.PrefetchHooks( - db: db, - explicitlyWatchedTables: [], - addJoins: - < - T extends i0.TableManagerState< - dynamic, - dynamic, - dynamic, - dynamic, - dynamic, - dynamic, - dynamic, - dynamic, - dynamic, - dynamic, - dynamic - > - >(state) { - if (ownerId) { - state = - state.withJoin( - currentTable: table, - currentColumn: table.ownerId, - referencedTable: i1 - .$$RemoteAssetEntityTableReferences - ._ownerIdTable(db), - referencedColumn: i1 - .$$RemoteAssetEntityTableReferences - ._ownerIdTable(db) - .id, - ) - as T; - } - - return state; - }, - getPrefetchedDataCallback: (items) async { - return []; - }, - ); - }, - ), - ); -} - -typedef $$RemoteAssetEntityTableProcessedTableManager = - i0.ProcessedTableManager< - i0.GeneratedDatabase, - i1.$RemoteAssetEntityTable, - i1.RemoteAssetEntityData, - i1.$$RemoteAssetEntityTableFilterComposer, - i1.$$RemoteAssetEntityTableOrderingComposer, - i1.$$RemoteAssetEntityTableAnnotationComposer, - $$RemoteAssetEntityTableCreateCompanionBuilder, - $$RemoteAssetEntityTableUpdateCompanionBuilder, - (i1.RemoteAssetEntityData, i1.$$RemoteAssetEntityTableReferences), - i1.RemoteAssetEntityData, - i0.PrefetchHooks Function({bool ownerId}) - >; -i0.Index get uQRemoteAssetsOwnerChecksum => i0.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)', -); - -class $RemoteAssetEntityTable extends i3.RemoteAssetEntity - with i0.TableInfo<$RemoteAssetEntityTable, i1.RemoteAssetEntityData> { - @override - final i0.GeneratedDatabase attachedDatabase; - final String? _alias; - $RemoteAssetEntityTable(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.$RemoteAssetEntityTable.$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 _durationMsMeta = const i0.VerificationMeta( - 'durationMs', - ); - @override - late final i0.GeneratedColumn durationMs = i0.GeneratedColumn( - 'duration_ms', - 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 _checksumMeta = const i0.VerificationMeta( - 'checksum', - ); - @override - late final i0.GeneratedColumn checksum = i0.GeneratedColumn( - 'checksum', - aliasedName, - false, - type: i0.DriftSqlType.string, - requiredDuringInsert: true, - ); - 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 _ownerIdMeta = const i0.VerificationMeta( - 'ownerId', - ); - @override - late final i0.GeneratedColumn ownerId = i0.GeneratedColumn( - 'owner_id', - aliasedName, - false, - type: i0.DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: i0.GeneratedColumn.constraintIsAlways( - 'REFERENCES user_entity (id) ON DELETE CASCADE', - ), - ); - static const i0.VerificationMeta _localDateTimeMeta = - const i0.VerificationMeta('localDateTime'); - @override - late final i0.GeneratedColumn localDateTime = - i0.GeneratedColumn( - 'local_date_time', - aliasedName, - true, - type: i0.DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - static const i0.VerificationMeta _thumbHashMeta = const i0.VerificationMeta( - 'thumbHash', - ); - @override - late final i0.GeneratedColumn thumbHash = i0.GeneratedColumn( - 'thumb_hash', - aliasedName, - true, - type: i0.DriftSqlType.string, - requiredDuringInsert: false, - ); - static const i0.VerificationMeta _deletedAtMeta = const i0.VerificationMeta( - 'deletedAt', - ); - @override - late final i0.GeneratedColumn deletedAt = - i0.GeneratedColumn( - 'deleted_at', - aliasedName, - true, - type: i0.DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - static const i0.VerificationMeta _uploadedAtMeta = const i0.VerificationMeta( - 'uploadedAt', - ); - @override - late final i0.GeneratedColumn uploadedAt = - i0.GeneratedColumn( - 'uploaded_at', - aliasedName, - true, - type: i0.DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - static const i0.VerificationMeta _livePhotoVideoIdMeta = - const i0.VerificationMeta('livePhotoVideoId'); - @override - late final i0.GeneratedColumn livePhotoVideoId = - i0.GeneratedColumn( - 'live_photo_video_id', - aliasedName, - true, - type: i0.DriftSqlType.string, - requiredDuringInsert: false, - ); - @override - late final i0.GeneratedColumnWithTypeConverter - visibility = - i0.GeneratedColumn( - 'visibility', - aliasedName, - false, - type: i0.DriftSqlType.int, - requiredDuringInsert: true, - ).withConverter( - i1.$RemoteAssetEntityTable.$convertervisibility, - ); - static const i0.VerificationMeta _stackIdMeta = const i0.VerificationMeta( - 'stackId', - ); - @override - late final i0.GeneratedColumn stackId = i0.GeneratedColumn( - 'stack_id', - aliasedName, - true, - type: i0.DriftSqlType.string, - requiredDuringInsert: false, - ); - static const i0.VerificationMeta _libraryIdMeta = const i0.VerificationMeta( - 'libraryId', - ); - @override - late final i0.GeneratedColumn libraryId = i0.GeneratedColumn( - 'library_id', - aliasedName, - true, - type: i0.DriftSqlType.string, - requiredDuringInsert: false, - ); - static const i0.VerificationMeta _isEditedMeta = const i0.VerificationMeta( - 'isEdited', - ); - @override - late final i0.GeneratedColumn isEdited = i0.GeneratedColumn( - 'is_edited', - aliasedName, - false, - type: i0.DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: i0.GeneratedColumn.constraintIsAlways( - 'CHECK ("is_edited" IN (0, 1))', - ), - defaultValue: const i4.Constant(false), - ); - @override - List get $columns => [ - name, - type, - createdAt, - updatedAt, - width, - height, - durationMs, - id, - checksum, - isFavorite, - ownerId, - localDateTime, - thumbHash, - deletedAt, - uploadedAt, - livePhotoVideoId, - visibility, - stackId, - libraryId, - isEdited, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'remote_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_ms')) { - context.handle( - _durationMsMeta, - durationMs.isAcceptableOrUnknown(data['duration_ms']!, _durationMsMeta), - ); - } - if (data.containsKey('id')) { - context.handle(_idMeta, id.isAcceptableOrUnknown(data['id']!, _idMeta)); - } else if (isInserting) { - context.missing(_idMeta); - } - if (data.containsKey('checksum')) { - context.handle( - _checksumMeta, - checksum.isAcceptableOrUnknown(data['checksum']!, _checksumMeta), - ); - } else if (isInserting) { - context.missing(_checksumMeta); - } - if (data.containsKey('is_favorite')) { - context.handle( - _isFavoriteMeta, - isFavorite.isAcceptableOrUnknown(data['is_favorite']!, _isFavoriteMeta), - ); - } - if (data.containsKey('owner_id')) { - context.handle( - _ownerIdMeta, - ownerId.isAcceptableOrUnknown(data['owner_id']!, _ownerIdMeta), - ); - } else if (isInserting) { - context.missing(_ownerIdMeta); - } - if (data.containsKey('local_date_time')) { - context.handle( - _localDateTimeMeta, - localDateTime.isAcceptableOrUnknown( - data['local_date_time']!, - _localDateTimeMeta, - ), - ); - } - if (data.containsKey('thumb_hash')) { - context.handle( - _thumbHashMeta, - thumbHash.isAcceptableOrUnknown(data['thumb_hash']!, _thumbHashMeta), - ); - } - if (data.containsKey('deleted_at')) { - context.handle( - _deletedAtMeta, - deletedAt.isAcceptableOrUnknown(data['deleted_at']!, _deletedAtMeta), - ); - } - if (data.containsKey('uploaded_at')) { - context.handle( - _uploadedAtMeta, - uploadedAt.isAcceptableOrUnknown(data['uploaded_at']!, _uploadedAtMeta), - ); - } - if (data.containsKey('live_photo_video_id')) { - context.handle( - _livePhotoVideoIdMeta, - livePhotoVideoId.isAcceptableOrUnknown( - data['live_photo_video_id']!, - _livePhotoVideoIdMeta, - ), - ); - } - if (data.containsKey('stack_id')) { - context.handle( - _stackIdMeta, - stackId.isAcceptableOrUnknown(data['stack_id']!, _stackIdMeta), - ); - } - if (data.containsKey('library_id')) { - context.handle( - _libraryIdMeta, - libraryId.isAcceptableOrUnknown(data['library_id']!, _libraryIdMeta), - ); - } - if (data.containsKey('is_edited')) { - context.handle( - _isEditedMeta, - isEdited.isAcceptableOrUnknown(data['is_edited']!, _isEditedMeta), - ); - } - return context; - } - - @override - Set get $primaryKey => {id}; - @override - i1.RemoteAssetEntityData map( - Map data, { - String? tablePrefix, - }) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return i1.RemoteAssetEntityData( - name: attachedDatabase.typeMapping.read( - i0.DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - type: i1.$RemoteAssetEntityTable.$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'], - ), - durationMs: attachedDatabase.typeMapping.read( - i0.DriftSqlType.int, - data['${effectivePrefix}duration_ms'], - ), - id: attachedDatabase.typeMapping.read( - i0.DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - checksum: attachedDatabase.typeMapping.read( - i0.DriftSqlType.string, - data['${effectivePrefix}checksum'], - )!, - isFavorite: attachedDatabase.typeMapping.read( - i0.DriftSqlType.bool, - data['${effectivePrefix}is_favorite'], - )!, - ownerId: attachedDatabase.typeMapping.read( - i0.DriftSqlType.string, - data['${effectivePrefix}owner_id'], - )!, - localDateTime: attachedDatabase.typeMapping.read( - i0.DriftSqlType.dateTime, - data['${effectivePrefix}local_date_time'], - ), - thumbHash: attachedDatabase.typeMapping.read( - i0.DriftSqlType.string, - data['${effectivePrefix}thumb_hash'], - ), - deletedAt: attachedDatabase.typeMapping.read( - i0.DriftSqlType.dateTime, - data['${effectivePrefix}deleted_at'], - ), - uploadedAt: attachedDatabase.typeMapping.read( - i0.DriftSqlType.dateTime, - data['${effectivePrefix}uploaded_at'], - ), - livePhotoVideoId: attachedDatabase.typeMapping.read( - i0.DriftSqlType.string, - data['${effectivePrefix}live_photo_video_id'], - ), - visibility: i1.$RemoteAssetEntityTable.$convertervisibility.fromSql( - attachedDatabase.typeMapping.read( - i0.DriftSqlType.int, - data['${effectivePrefix}visibility'], - )!, - ), - stackId: attachedDatabase.typeMapping.read( - i0.DriftSqlType.string, - data['${effectivePrefix}stack_id'], - ), - libraryId: attachedDatabase.typeMapping.read( - i0.DriftSqlType.string, - data['${effectivePrefix}library_id'], - ), - isEdited: attachedDatabase.typeMapping.read( - i0.DriftSqlType.bool, - data['${effectivePrefix}is_edited'], - )!, - ); - } - - @override - $RemoteAssetEntityTable createAlias(String alias) { - return $RemoteAssetEntityTable(attachedDatabase, alias); - } - - static i0.JsonTypeConverter2 $convertertype = - const i0.EnumIndexConverter(i2.AssetType.values); - static i0.JsonTypeConverter2 - $convertervisibility = const i0.EnumIndexConverter( - i2.AssetVisibility.values, - ); - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class RemoteAssetEntityData 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? durationMs; - final String id; - final String checksum; - final bool isFavorite; - final String ownerId; - final DateTime? localDateTime; - final String? thumbHash; - final DateTime? deletedAt; - final DateTime? uploadedAt; - final String? livePhotoVideoId; - final i2.AssetVisibility visibility; - final String? stackId; - final String? libraryId; - final bool isEdited; - const RemoteAssetEntityData({ - required this.name, - required this.type, - required this.createdAt, - required this.updatedAt, - this.width, - this.height, - this.durationMs, - required this.id, - required this.checksum, - required this.isFavorite, - required this.ownerId, - this.localDateTime, - this.thumbHash, - this.deletedAt, - this.uploadedAt, - this.livePhotoVideoId, - required this.visibility, - this.stackId, - this.libraryId, - required this.isEdited, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['name'] = i0.Variable(name); - { - map['type'] = i0.Variable( - i1.$RemoteAssetEntityTable.$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 || durationMs != null) { - map['duration_ms'] = i0.Variable(durationMs); - } - map['id'] = i0.Variable(id); - map['checksum'] = i0.Variable(checksum); - map['is_favorite'] = i0.Variable(isFavorite); - map['owner_id'] = i0.Variable(ownerId); - if (!nullToAbsent || localDateTime != null) { - map['local_date_time'] = i0.Variable(localDateTime); - } - if (!nullToAbsent || thumbHash != null) { - map['thumb_hash'] = i0.Variable(thumbHash); - } - if (!nullToAbsent || deletedAt != null) { - map['deleted_at'] = i0.Variable(deletedAt); - } - if (!nullToAbsent || uploadedAt != null) { - map['uploaded_at'] = i0.Variable(uploadedAt); - } - if (!nullToAbsent || livePhotoVideoId != null) { - map['live_photo_video_id'] = i0.Variable(livePhotoVideoId); - } - { - map['visibility'] = i0.Variable( - i1.$RemoteAssetEntityTable.$convertervisibility.toSql(visibility), - ); - } - if (!nullToAbsent || stackId != null) { - map['stack_id'] = i0.Variable(stackId); - } - if (!nullToAbsent || libraryId != null) { - map['library_id'] = i0.Variable(libraryId); - } - map['is_edited'] = i0.Variable(isEdited); - return map; - } - - factory RemoteAssetEntityData.fromJson( - Map json, { - i0.ValueSerializer? serializer, - }) { - serializer ??= i0.driftRuntimeOptions.defaultSerializer; - return RemoteAssetEntityData( - name: serializer.fromJson(json['name']), - type: i1.$RemoteAssetEntityTable.$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']), - durationMs: serializer.fromJson(json['durationMs']), - 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']), - uploadedAt: serializer.fromJson(json['uploadedAt']), - livePhotoVideoId: serializer.fromJson(json['livePhotoVideoId']), - visibility: i1.$RemoteAssetEntityTable.$convertervisibility.fromJson( - serializer.fromJson(json['visibility']), - ), - stackId: serializer.fromJson(json['stackId']), - libraryId: serializer.fromJson(json['libraryId']), - isEdited: serializer.fromJson(json['isEdited']), - ); - } - @override - Map toJson({i0.ValueSerializer? serializer}) { - serializer ??= i0.driftRuntimeOptions.defaultSerializer; - return { - 'name': serializer.toJson(name), - 'type': serializer.toJson( - i1.$RemoteAssetEntityTable.$convertertype.toJson(type), - ), - 'createdAt': serializer.toJson(createdAt), - 'updatedAt': serializer.toJson(updatedAt), - 'width': serializer.toJson(width), - 'height': serializer.toJson(height), - 'durationMs': serializer.toJson(durationMs), - '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), - 'uploadedAt': serializer.toJson(uploadedAt), - 'livePhotoVideoId': serializer.toJson(livePhotoVideoId), - 'visibility': serializer.toJson( - i1.$RemoteAssetEntityTable.$convertervisibility.toJson(visibility), - ), - 'stackId': serializer.toJson(stackId), - 'libraryId': serializer.toJson(libraryId), - 'isEdited': serializer.toJson(isEdited), - }; - } - - i1.RemoteAssetEntityData 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 durationMs = const i0.Value.absent(), - String? id, - String? checksum, - bool? isFavorite, - String? ownerId, - i0.Value localDateTime = const i0.Value.absent(), - i0.Value thumbHash = const i0.Value.absent(), - i0.Value deletedAt = const i0.Value.absent(), - i0.Value uploadedAt = const i0.Value.absent(), - i0.Value livePhotoVideoId = const i0.Value.absent(), - i2.AssetVisibility? visibility, - i0.Value stackId = const i0.Value.absent(), - i0.Value libraryId = const i0.Value.absent(), - bool? isEdited, - }) => i1.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, - durationMs: durationMs.present ? durationMs.value : this.durationMs, - 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, - uploadedAt: uploadedAt.present ? uploadedAt.value : this.uploadedAt, - 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, - isEdited: isEdited ?? this.isEdited, - ); - RemoteAssetEntityData copyWithCompanion(i1.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, - durationMs: data.durationMs.present - ? data.durationMs.value - : this.durationMs, - 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, - uploadedAt: data.uploadedAt.present - ? data.uploadedAt.value - : this.uploadedAt, - 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, - isEdited: data.isEdited.present ? data.isEdited.value : this.isEdited, - ); - } - - @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('durationMs: $durationMs, ') - ..write('id: $id, ') - ..write('checksum: $checksum, ') - ..write('isFavorite: $isFavorite, ') - ..write('ownerId: $ownerId, ') - ..write('localDateTime: $localDateTime, ') - ..write('thumbHash: $thumbHash, ') - ..write('deletedAt: $deletedAt, ') - ..write('uploadedAt: $uploadedAt, ') - ..write('livePhotoVideoId: $livePhotoVideoId, ') - ..write('visibility: $visibility, ') - ..write('stackId: $stackId, ') - ..write('libraryId: $libraryId, ') - ..write('isEdited: $isEdited') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - name, - type, - createdAt, - updatedAt, - width, - height, - durationMs, - id, - checksum, - isFavorite, - ownerId, - localDateTime, - thumbHash, - deletedAt, - uploadedAt, - livePhotoVideoId, - visibility, - stackId, - libraryId, - isEdited, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is i1.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.durationMs == this.durationMs && - 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.uploadedAt == this.uploadedAt && - other.livePhotoVideoId == this.livePhotoVideoId && - other.visibility == this.visibility && - other.stackId == this.stackId && - other.libraryId == this.libraryId && - other.isEdited == this.isEdited); -} - -class RemoteAssetEntityCompanion - 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 durationMs; - final i0.Value id; - final i0.Value checksum; - final i0.Value isFavorite; - final i0.Value ownerId; - final i0.Value localDateTime; - final i0.Value thumbHash; - final i0.Value deletedAt; - final i0.Value uploadedAt; - final i0.Value livePhotoVideoId; - final i0.Value visibility; - final i0.Value stackId; - final i0.Value libraryId; - final i0.Value isEdited; - const RemoteAssetEntityCompanion({ - 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.durationMs = const i0.Value.absent(), - this.id = const i0.Value.absent(), - this.checksum = const i0.Value.absent(), - this.isFavorite = const i0.Value.absent(), - this.ownerId = const i0.Value.absent(), - this.localDateTime = const i0.Value.absent(), - this.thumbHash = const i0.Value.absent(), - this.deletedAt = const i0.Value.absent(), - this.uploadedAt = const i0.Value.absent(), - this.livePhotoVideoId = const i0.Value.absent(), - this.visibility = const i0.Value.absent(), - this.stackId = const i0.Value.absent(), - this.libraryId = const i0.Value.absent(), - this.isEdited = const i0.Value.absent(), - }); - RemoteAssetEntityCompanion.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.durationMs = const i0.Value.absent(), - required String id, - required String checksum, - this.isFavorite = const i0.Value.absent(), - required String ownerId, - this.localDateTime = const i0.Value.absent(), - this.thumbHash = const i0.Value.absent(), - this.deletedAt = const i0.Value.absent(), - this.uploadedAt = const i0.Value.absent(), - this.livePhotoVideoId = const i0.Value.absent(), - required i2.AssetVisibility visibility, - this.stackId = const i0.Value.absent(), - this.libraryId = const i0.Value.absent(), - this.isEdited = const i0.Value.absent(), - }) : name = i0.Value(name), - type = i0.Value(type), - id = i0.Value(id), - checksum = i0.Value(checksum), - ownerId = i0.Value(ownerId), - visibility = i0.Value(visibility); - static i0.Insertable custom({ - i0.Expression? name, - i0.Expression? type, - i0.Expression? createdAt, - i0.Expression? updatedAt, - i0.Expression? width, - i0.Expression? height, - i0.Expression? durationMs, - i0.Expression? id, - i0.Expression? checksum, - i0.Expression? isFavorite, - i0.Expression? ownerId, - i0.Expression? localDateTime, - i0.Expression? thumbHash, - i0.Expression? deletedAt, - i0.Expression? uploadedAt, - i0.Expression? livePhotoVideoId, - i0.Expression? visibility, - i0.Expression? stackId, - i0.Expression? libraryId, - i0.Expression? isEdited, - }) { - 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 (durationMs != null) 'duration_ms': durationMs, - 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 (uploadedAt != null) 'uploaded_at': uploadedAt, - 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, - if (isEdited != null) 'is_edited': isEdited, - }); - } - - i1.RemoteAssetEntityCompanion copyWith({ - i0.Value? name, - i0.Value? type, - i0.Value? createdAt, - i0.Value? updatedAt, - i0.Value? width, - i0.Value? height, - i0.Value? durationMs, - i0.Value? id, - i0.Value? checksum, - i0.Value? isFavorite, - i0.Value? ownerId, - i0.Value? localDateTime, - i0.Value? thumbHash, - i0.Value? deletedAt, - i0.Value? uploadedAt, - i0.Value? livePhotoVideoId, - i0.Value? visibility, - i0.Value? stackId, - i0.Value? libraryId, - i0.Value? isEdited, - }) { - return i1.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, - durationMs: durationMs ?? this.durationMs, - 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, - uploadedAt: uploadedAt ?? this.uploadedAt, - livePhotoVideoId: livePhotoVideoId ?? this.livePhotoVideoId, - visibility: visibility ?? this.visibility, - stackId: stackId ?? this.stackId, - libraryId: libraryId ?? this.libraryId, - isEdited: isEdited ?? this.isEdited, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (name.present) { - map['name'] = i0.Variable(name.value); - } - if (type.present) { - map['type'] = i0.Variable( - i1.$RemoteAssetEntityTable.$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 (durationMs.present) { - map['duration_ms'] = i0.Variable(durationMs.value); - } - if (id.present) { - map['id'] = i0.Variable(id.value); - } - if (checksum.present) { - map['checksum'] = i0.Variable(checksum.value); - } - if (isFavorite.present) { - map['is_favorite'] = i0.Variable(isFavorite.value); - } - if (ownerId.present) { - map['owner_id'] = i0.Variable(ownerId.value); - } - if (localDateTime.present) { - map['local_date_time'] = i0.Variable(localDateTime.value); - } - if (thumbHash.present) { - map['thumb_hash'] = i0.Variable(thumbHash.value); - } - if (deletedAt.present) { - map['deleted_at'] = i0.Variable(deletedAt.value); - } - if (uploadedAt.present) { - map['uploaded_at'] = i0.Variable(uploadedAt.value); - } - if (livePhotoVideoId.present) { - map['live_photo_video_id'] = i0.Variable(livePhotoVideoId.value); - } - if (visibility.present) { - map['visibility'] = i0.Variable( - i1.$RemoteAssetEntityTable.$convertervisibility.toSql(visibility.value), - ); - } - if (stackId.present) { - map['stack_id'] = i0.Variable(stackId.value); - } - if (libraryId.present) { - map['library_id'] = i0.Variable(libraryId.value); - } - if (isEdited.present) { - map['is_edited'] = i0.Variable(isEdited.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('durationMs: $durationMs, ') - ..write('id: $id, ') - ..write('checksum: $checksum, ') - ..write('isFavorite: $isFavorite, ') - ..write('ownerId: $ownerId, ') - ..write('localDateTime: $localDateTime, ') - ..write('thumbHash: $thumbHash, ') - ..write('deletedAt: $deletedAt, ') - ..write('uploadedAt: $uploadedAt, ') - ..write('livePhotoVideoId: $livePhotoVideoId, ') - ..write('visibility: $visibility, ') - ..write('stackId: $stackId, ') - ..write('libraryId: $libraryId, ') - ..write('isEdited: $isEdited') - ..write(')')) - .toString(); - } -} - -i0.Index get uQRemoteAssetsOwnerLibraryChecksum => i0.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)', -); -i0.Index get idxRemoteAssetChecksum => i0.Index( - 'idx_remote_asset_checksum', - 'CREATE INDEX IF NOT EXISTS idx_remote_asset_checksum ON remote_asset_entity (checksum)', -); -i0.Index get idxRemoteAssetStackId => i0.Index( - 'idx_remote_asset_stack_id', - 'CREATE INDEX IF NOT EXISTS idx_remote_asset_stack_id ON remote_asset_entity (stack_id)', -); -i0.Index get idxRemoteAssetOwnerVisibilityDeletedCreated => i0.Index( - 'idx_remote_asset_owner_visibility_deleted_created', - 'CREATE INDEX IF NOT EXISTS idx_remote_asset_owner_visibility_deleted_created ON remote_asset_entity (owner_id, visibility, deleted_at, created_at DESC)', -); diff --git a/mobile/lib/infrastructure/entities/remote_asset_cloud_id.entity.drift.dart b/mobile/lib/infrastructure/entities/remote_asset_cloud_id.entity.drift.dart deleted file mode 100644 index f86528ee64..0000000000 --- a/mobile/lib/infrastructure/entities/remote_asset_cloud_id.entity.drift.dart +++ /dev/null @@ -1,830 +0,0 @@ -// dart format width=80 -// ignore_for_file: type=lint -import 'package:drift/drift.dart' as i0; -import 'package:immich_mobile/infrastructure/entities/remote_asset_cloud_id.entity.drift.dart' - as i1; -import 'package:immich_mobile/infrastructure/entities/remote_asset_cloud_id.entity.dart' - as i2; -import 'package:immich_mobile/infrastructure/entities/remote_asset.entity.drift.dart' - as i3; -import 'package:drift/internal/modular.dart' as i4; - -typedef $$RemoteAssetCloudIdEntityTableCreateCompanionBuilder = - i1.RemoteAssetCloudIdEntityCompanion Function({ - required String assetId, - i0.Value cloudId, - i0.Value createdAt, - i0.Value adjustmentTime, - i0.Value latitude, - i0.Value longitude, - }); -typedef $$RemoteAssetCloudIdEntityTableUpdateCompanionBuilder = - i1.RemoteAssetCloudIdEntityCompanion Function({ - i0.Value assetId, - i0.Value cloudId, - i0.Value createdAt, - i0.Value adjustmentTime, - i0.Value latitude, - i0.Value longitude, - }); - -final class $$RemoteAssetCloudIdEntityTableReferences - extends - i0.BaseReferences< - i0.GeneratedDatabase, - i1.$RemoteAssetCloudIdEntityTable, - i1.RemoteAssetCloudIdEntityData - > { - $$RemoteAssetCloudIdEntityTableReferences( - super.$_db, - super.$_table, - super.$_typedResult, - ); - - static i3.$RemoteAssetEntityTable _assetIdTable(i0.GeneratedDatabase db) => - i4.ReadDatabaseContainer(db) - .resultSet('remote_asset_entity') - .createAlias( - i0.$_aliasNameGenerator( - i4.ReadDatabaseContainer(db) - .resultSet( - 'remote_asset_cloud_id_entity', - ) - .assetId, - i4.ReadDatabaseContainer( - db, - ).resultSet('remote_asset_entity').id, - ), - ); - - i3.$$RemoteAssetEntityTableProcessedTableManager get assetId { - final $_column = $_itemColumn('asset_id')!; - - final manager = i3 - .$$RemoteAssetEntityTableTableManager( - $_db, - i4.ReadDatabaseContainer( - $_db, - ).resultSet('remote_asset_entity'), - ) - .filter((f) => f.id.sqlEquals($_column)); - final item = $_typedResult.readTableOrNull(_assetIdTable($_db)); - if (item == null) return manager; - return i0.ProcessedTableManager( - manager.$state.copyWith(prefetchedData: [item]), - ); - } -} - -class $$RemoteAssetCloudIdEntityTableFilterComposer - extends - i0.Composer { - $$RemoteAssetCloudIdEntityTableFilterComposer({ - required super.$db, - required super.$table, - super.joinBuilder, - super.$addJoinBuilderToRootComposer, - super.$removeJoinBuilderFromRootComposer, - }); - i0.ColumnFilters get cloudId => $composableBuilder( - column: $table.cloudId, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnFilters get createdAt => $composableBuilder( - column: $table.createdAt, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnFilters get adjustmentTime => $composableBuilder( - column: $table.adjustmentTime, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnFilters get latitude => $composableBuilder( - column: $table.latitude, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnFilters get longitude => $composableBuilder( - column: $table.longitude, - builder: (column) => i0.ColumnFilters(column), - ); - - i3.$$RemoteAssetEntityTableFilterComposer get assetId { - final i3.$$RemoteAssetEntityTableFilterComposer composer = $composerBuilder( - composer: this, - getCurrentColumn: (t) => t.assetId, - referencedTable: i4.ReadDatabaseContainer( - $db, - ).resultSet('remote_asset_entity'), - getReferencedColumn: (t) => t.id, - builder: - ( - joinBuilder, { - $addJoinBuilderToRootComposer, - $removeJoinBuilderFromRootComposer, - }) => i3.$$RemoteAssetEntityTableFilterComposer( - $db: $db, - $table: i4.ReadDatabaseContainer( - $db, - ).resultSet('remote_asset_entity'), - $addJoinBuilderToRootComposer: $addJoinBuilderToRootComposer, - joinBuilder: joinBuilder, - $removeJoinBuilderFromRootComposer: - $removeJoinBuilderFromRootComposer, - ), - ); - return composer; - } -} - -class $$RemoteAssetCloudIdEntityTableOrderingComposer - extends - i0.Composer { - $$RemoteAssetCloudIdEntityTableOrderingComposer({ - required super.$db, - required super.$table, - super.joinBuilder, - super.$addJoinBuilderToRootComposer, - super.$removeJoinBuilderFromRootComposer, - }); - i0.ColumnOrderings get cloudId => $composableBuilder( - column: $table.cloudId, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get createdAt => $composableBuilder( - column: $table.createdAt, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get adjustmentTime => $composableBuilder( - column: $table.adjustmentTime, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get latitude => $composableBuilder( - column: $table.latitude, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get longitude => $composableBuilder( - column: $table.longitude, - builder: (column) => i0.ColumnOrderings(column), - ); - - i3.$$RemoteAssetEntityTableOrderingComposer get assetId { - final i3.$$RemoteAssetEntityTableOrderingComposer composer = - $composerBuilder( - composer: this, - getCurrentColumn: (t) => t.assetId, - referencedTable: i4.ReadDatabaseContainer( - $db, - ).resultSet('remote_asset_entity'), - getReferencedColumn: (t) => t.id, - builder: - ( - joinBuilder, { - $addJoinBuilderToRootComposer, - $removeJoinBuilderFromRootComposer, - }) => i3.$$RemoteAssetEntityTableOrderingComposer( - $db: $db, - $table: i4.ReadDatabaseContainer( - $db, - ).resultSet('remote_asset_entity'), - $addJoinBuilderToRootComposer: $addJoinBuilderToRootComposer, - joinBuilder: joinBuilder, - $removeJoinBuilderFromRootComposer: - $removeJoinBuilderFromRootComposer, - ), - ); - return composer; - } -} - -class $$RemoteAssetCloudIdEntityTableAnnotationComposer - extends - i0.Composer { - $$RemoteAssetCloudIdEntityTableAnnotationComposer({ - required super.$db, - required super.$table, - super.joinBuilder, - super.$addJoinBuilderToRootComposer, - super.$removeJoinBuilderFromRootComposer, - }); - i0.GeneratedColumn get cloudId => - $composableBuilder(column: $table.cloudId, builder: (column) => column); - - i0.GeneratedColumn get createdAt => - $composableBuilder(column: $table.createdAt, builder: (column) => column); - - i0.GeneratedColumn get adjustmentTime => $composableBuilder( - column: $table.adjustmentTime, - builder: (column) => column, - ); - - i0.GeneratedColumn get latitude => - $composableBuilder(column: $table.latitude, builder: (column) => column); - - i0.GeneratedColumn get longitude => - $composableBuilder(column: $table.longitude, builder: (column) => column); - - i3.$$RemoteAssetEntityTableAnnotationComposer get assetId { - final i3.$$RemoteAssetEntityTableAnnotationComposer composer = - $composerBuilder( - composer: this, - getCurrentColumn: (t) => t.assetId, - referencedTable: i4.ReadDatabaseContainer( - $db, - ).resultSet('remote_asset_entity'), - getReferencedColumn: (t) => t.id, - builder: - ( - joinBuilder, { - $addJoinBuilderToRootComposer, - $removeJoinBuilderFromRootComposer, - }) => i3.$$RemoteAssetEntityTableAnnotationComposer( - $db: $db, - $table: i4.ReadDatabaseContainer( - $db, - ).resultSet('remote_asset_entity'), - $addJoinBuilderToRootComposer: $addJoinBuilderToRootComposer, - joinBuilder: joinBuilder, - $removeJoinBuilderFromRootComposer: - $removeJoinBuilderFromRootComposer, - ), - ); - return composer; - } -} - -class $$RemoteAssetCloudIdEntityTableTableManager - extends - i0.RootTableManager< - i0.GeneratedDatabase, - i1.$RemoteAssetCloudIdEntityTable, - i1.RemoteAssetCloudIdEntityData, - i1.$$RemoteAssetCloudIdEntityTableFilterComposer, - i1.$$RemoteAssetCloudIdEntityTableOrderingComposer, - i1.$$RemoteAssetCloudIdEntityTableAnnotationComposer, - $$RemoteAssetCloudIdEntityTableCreateCompanionBuilder, - $$RemoteAssetCloudIdEntityTableUpdateCompanionBuilder, - ( - i1.RemoteAssetCloudIdEntityData, - i1.$$RemoteAssetCloudIdEntityTableReferences, - ), - i1.RemoteAssetCloudIdEntityData, - i0.PrefetchHooks Function({bool assetId}) - > { - $$RemoteAssetCloudIdEntityTableTableManager( - i0.GeneratedDatabase db, - i1.$RemoteAssetCloudIdEntityTable table, - ) : super( - i0.TableManagerState( - db: db, - table: table, - createFilteringComposer: () => - i1.$$RemoteAssetCloudIdEntityTableFilterComposer( - $db: db, - $table: table, - ), - createOrderingComposer: () => - i1.$$RemoteAssetCloudIdEntityTableOrderingComposer( - $db: db, - $table: table, - ), - createComputedFieldComposer: () => - i1.$$RemoteAssetCloudIdEntityTableAnnotationComposer( - $db: db, - $table: table, - ), - updateCompanionCallback: - ({ - i0.Value assetId = const i0.Value.absent(), - i0.Value cloudId = const i0.Value.absent(), - i0.Value createdAt = const i0.Value.absent(), - i0.Value adjustmentTime = const i0.Value.absent(), - i0.Value latitude = const i0.Value.absent(), - i0.Value longitude = const i0.Value.absent(), - }) => i1.RemoteAssetCloudIdEntityCompanion( - assetId: assetId, - cloudId: cloudId, - createdAt: createdAt, - adjustmentTime: adjustmentTime, - latitude: latitude, - longitude: longitude, - ), - createCompanionCallback: - ({ - required String assetId, - i0.Value cloudId = const i0.Value.absent(), - i0.Value createdAt = const i0.Value.absent(), - i0.Value adjustmentTime = const i0.Value.absent(), - i0.Value latitude = const i0.Value.absent(), - i0.Value longitude = const i0.Value.absent(), - }) => i1.RemoteAssetCloudIdEntityCompanion.insert( - assetId: assetId, - cloudId: cloudId, - createdAt: createdAt, - adjustmentTime: adjustmentTime, - latitude: latitude, - longitude: longitude, - ), - withReferenceMapper: (p0) => p0 - .map( - (e) => ( - e.readTable(table), - i1.$$RemoteAssetCloudIdEntityTableReferences(db, table, e), - ), - ) - .toList(), - prefetchHooksCallback: ({assetId = false}) { - return i0.PrefetchHooks( - db: db, - explicitlyWatchedTables: [], - addJoins: - < - T extends i0.TableManagerState< - dynamic, - dynamic, - dynamic, - dynamic, - dynamic, - dynamic, - dynamic, - dynamic, - dynamic, - dynamic, - dynamic - > - >(state) { - if (assetId) { - state = - state.withJoin( - currentTable: table, - currentColumn: table.assetId, - referencedTable: i1 - .$$RemoteAssetCloudIdEntityTableReferences - ._assetIdTable(db), - referencedColumn: i1 - .$$RemoteAssetCloudIdEntityTableReferences - ._assetIdTable(db) - .id, - ) - as T; - } - - return state; - }, - getPrefetchedDataCallback: (items) async { - return []; - }, - ); - }, - ), - ); -} - -typedef $$RemoteAssetCloudIdEntityTableProcessedTableManager = - i0.ProcessedTableManager< - i0.GeneratedDatabase, - i1.$RemoteAssetCloudIdEntityTable, - i1.RemoteAssetCloudIdEntityData, - i1.$$RemoteAssetCloudIdEntityTableFilterComposer, - i1.$$RemoteAssetCloudIdEntityTableOrderingComposer, - i1.$$RemoteAssetCloudIdEntityTableAnnotationComposer, - $$RemoteAssetCloudIdEntityTableCreateCompanionBuilder, - $$RemoteAssetCloudIdEntityTableUpdateCompanionBuilder, - ( - i1.RemoteAssetCloudIdEntityData, - i1.$$RemoteAssetCloudIdEntityTableReferences, - ), - i1.RemoteAssetCloudIdEntityData, - i0.PrefetchHooks Function({bool assetId}) - >; -i0.Index get idxRemoteAssetCloudId => i0.Index( - 'idx_remote_asset_cloud_id', - 'CREATE INDEX IF NOT EXISTS idx_remote_asset_cloud_id ON remote_asset_cloud_id_entity (cloud_id)', -); - -class $RemoteAssetCloudIdEntityTable extends i2.RemoteAssetCloudIdEntity - with - i0.TableInfo< - $RemoteAssetCloudIdEntityTable, - i1.RemoteAssetCloudIdEntityData - > { - @override - final i0.GeneratedDatabase attachedDatabase; - final String? _alias; - $RemoteAssetCloudIdEntityTable(this.attachedDatabase, [this._alias]); - static const i0.VerificationMeta _assetIdMeta = const i0.VerificationMeta( - 'assetId', - ); - @override - late final i0.GeneratedColumn assetId = i0.GeneratedColumn( - 'asset_id', - aliasedName, - false, - type: i0.DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: i0.GeneratedColumn.constraintIsAlways( - 'REFERENCES remote_asset_entity (id) ON DELETE CASCADE', - ), - ); - static const i0.VerificationMeta _cloudIdMeta = const i0.VerificationMeta( - 'cloudId', - ); - @override - late final i0.GeneratedColumn cloudId = i0.GeneratedColumn( - 'cloud_id', - aliasedName, - true, - type: i0.DriftSqlType.string, - requiredDuringInsert: false, - ); - static const i0.VerificationMeta _createdAtMeta = const i0.VerificationMeta( - 'createdAt', - ); - @override - late final i0.GeneratedColumn createdAt = - i0.GeneratedColumn( - 'created_at', - aliasedName, - true, - type: i0.DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - static const i0.VerificationMeta _adjustmentTimeMeta = - const i0.VerificationMeta('adjustmentTime'); - @override - late final i0.GeneratedColumn adjustmentTime = - i0.GeneratedColumn( - 'adjustment_time', - aliasedName, - true, - type: i0.DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - static const i0.VerificationMeta _latitudeMeta = const i0.VerificationMeta( - 'latitude', - ); - @override - late final i0.GeneratedColumn latitude = i0.GeneratedColumn( - 'latitude', - aliasedName, - true, - type: i0.DriftSqlType.double, - requiredDuringInsert: false, - ); - static const i0.VerificationMeta _longitudeMeta = const i0.VerificationMeta( - 'longitude', - ); - @override - late final i0.GeneratedColumn longitude = i0.GeneratedColumn( - 'longitude', - aliasedName, - true, - type: i0.DriftSqlType.double, - requiredDuringInsert: false, - ); - @override - List get $columns => [ - assetId, - cloudId, - createdAt, - adjustmentTime, - latitude, - longitude, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'remote_asset_cloud_id_entity'; - @override - i0.VerificationContext validateIntegrity( - i0.Insertable instance, { - bool isInserting = false, - }) { - final context = i0.VerificationContext(); - final data = instance.toColumns(true); - if (data.containsKey('asset_id')) { - context.handle( - _assetIdMeta, - assetId.isAcceptableOrUnknown(data['asset_id']!, _assetIdMeta), - ); - } else if (isInserting) { - context.missing(_assetIdMeta); - } - if (data.containsKey('cloud_id')) { - context.handle( - _cloudIdMeta, - cloudId.isAcceptableOrUnknown(data['cloud_id']!, _cloudIdMeta), - ); - } - if (data.containsKey('created_at')) { - context.handle( - _createdAtMeta, - createdAt.isAcceptableOrUnknown(data['created_at']!, _createdAtMeta), - ); - } - if (data.containsKey('adjustment_time')) { - context.handle( - _adjustmentTimeMeta, - adjustmentTime.isAcceptableOrUnknown( - data['adjustment_time']!, - _adjustmentTimeMeta, - ), - ); - } - if (data.containsKey('latitude')) { - context.handle( - _latitudeMeta, - latitude.isAcceptableOrUnknown(data['latitude']!, _latitudeMeta), - ); - } - if (data.containsKey('longitude')) { - context.handle( - _longitudeMeta, - longitude.isAcceptableOrUnknown(data['longitude']!, _longitudeMeta), - ); - } - return context; - } - - @override - Set get $primaryKey => {assetId}; - @override - i1.RemoteAssetCloudIdEntityData map( - Map data, { - String? tablePrefix, - }) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return i1.RemoteAssetCloudIdEntityData( - assetId: attachedDatabase.typeMapping.read( - i0.DriftSqlType.string, - data['${effectivePrefix}asset_id'], - )!, - cloudId: attachedDatabase.typeMapping.read( - i0.DriftSqlType.string, - data['${effectivePrefix}cloud_id'], - ), - createdAt: attachedDatabase.typeMapping.read( - i0.DriftSqlType.dateTime, - data['${effectivePrefix}created_at'], - ), - adjustmentTime: attachedDatabase.typeMapping.read( - i0.DriftSqlType.dateTime, - data['${effectivePrefix}adjustment_time'], - ), - latitude: attachedDatabase.typeMapping.read( - i0.DriftSqlType.double, - data['${effectivePrefix}latitude'], - ), - longitude: attachedDatabase.typeMapping.read( - i0.DriftSqlType.double, - data['${effectivePrefix}longitude'], - ), - ); - } - - @override - $RemoteAssetCloudIdEntityTable createAlias(String alias) { - return $RemoteAssetCloudIdEntityTable(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class RemoteAssetCloudIdEntityData extends i0.DataClass - implements i0.Insertable { - final String assetId; - final String? cloudId; - final DateTime? createdAt; - final DateTime? adjustmentTime; - final double? latitude; - final double? longitude; - const RemoteAssetCloudIdEntityData({ - required this.assetId, - this.cloudId, - this.createdAt, - this.adjustmentTime, - this.latitude, - this.longitude, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['asset_id'] = i0.Variable(assetId); - if (!nullToAbsent || cloudId != null) { - map['cloud_id'] = i0.Variable(cloudId); - } - if (!nullToAbsent || createdAt != null) { - map['created_at'] = i0.Variable(createdAt); - } - if (!nullToAbsent || adjustmentTime != null) { - map['adjustment_time'] = i0.Variable(adjustmentTime); - } - if (!nullToAbsent || latitude != null) { - map['latitude'] = i0.Variable(latitude); - } - if (!nullToAbsent || longitude != null) { - map['longitude'] = i0.Variable(longitude); - } - return map; - } - - factory RemoteAssetCloudIdEntityData.fromJson( - Map json, { - i0.ValueSerializer? serializer, - }) { - serializer ??= i0.driftRuntimeOptions.defaultSerializer; - return RemoteAssetCloudIdEntityData( - assetId: serializer.fromJson(json['assetId']), - cloudId: serializer.fromJson(json['cloudId']), - createdAt: serializer.fromJson(json['createdAt']), - adjustmentTime: serializer.fromJson(json['adjustmentTime']), - latitude: serializer.fromJson(json['latitude']), - longitude: serializer.fromJson(json['longitude']), - ); - } - @override - Map toJson({i0.ValueSerializer? serializer}) { - serializer ??= i0.driftRuntimeOptions.defaultSerializer; - return { - 'assetId': serializer.toJson(assetId), - 'cloudId': serializer.toJson(cloudId), - 'createdAt': serializer.toJson(createdAt), - 'adjustmentTime': serializer.toJson(adjustmentTime), - 'latitude': serializer.toJson(latitude), - 'longitude': serializer.toJson(longitude), - }; - } - - i1.RemoteAssetCloudIdEntityData copyWith({ - String? assetId, - i0.Value cloudId = const i0.Value.absent(), - i0.Value createdAt = const i0.Value.absent(), - i0.Value adjustmentTime = const i0.Value.absent(), - i0.Value latitude = const i0.Value.absent(), - i0.Value longitude = const i0.Value.absent(), - }) => i1.RemoteAssetCloudIdEntityData( - assetId: assetId ?? this.assetId, - cloudId: cloudId.present ? cloudId.value : this.cloudId, - createdAt: createdAt.present ? createdAt.value : this.createdAt, - adjustmentTime: adjustmentTime.present - ? adjustmentTime.value - : this.adjustmentTime, - latitude: latitude.present ? latitude.value : this.latitude, - longitude: longitude.present ? longitude.value : this.longitude, - ); - RemoteAssetCloudIdEntityData copyWithCompanion( - i1.RemoteAssetCloudIdEntityCompanion data, - ) { - return RemoteAssetCloudIdEntityData( - assetId: data.assetId.present ? data.assetId.value : this.assetId, - cloudId: data.cloudId.present ? data.cloudId.value : this.cloudId, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - adjustmentTime: data.adjustmentTime.present - ? data.adjustmentTime.value - : this.adjustmentTime, - latitude: data.latitude.present ? data.latitude.value : this.latitude, - longitude: data.longitude.present ? data.longitude.value : this.longitude, - ); - } - - @override - String toString() { - return (StringBuffer('RemoteAssetCloudIdEntityData(') - ..write('assetId: $assetId, ') - ..write('cloudId: $cloudId, ') - ..write('createdAt: $createdAt, ') - ..write('adjustmentTime: $adjustmentTime, ') - ..write('latitude: $latitude, ') - ..write('longitude: $longitude') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - assetId, - cloudId, - createdAt, - adjustmentTime, - latitude, - longitude, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is i1.RemoteAssetCloudIdEntityData && - other.assetId == this.assetId && - other.cloudId == this.cloudId && - other.createdAt == this.createdAt && - other.adjustmentTime == this.adjustmentTime && - other.latitude == this.latitude && - other.longitude == this.longitude); -} - -class RemoteAssetCloudIdEntityCompanion - extends i0.UpdateCompanion { - final i0.Value assetId; - final i0.Value cloudId; - final i0.Value createdAt; - final i0.Value adjustmentTime; - final i0.Value latitude; - final i0.Value longitude; - const RemoteAssetCloudIdEntityCompanion({ - this.assetId = const i0.Value.absent(), - this.cloudId = const i0.Value.absent(), - this.createdAt = const i0.Value.absent(), - this.adjustmentTime = const i0.Value.absent(), - this.latitude = const i0.Value.absent(), - this.longitude = const i0.Value.absent(), - }); - RemoteAssetCloudIdEntityCompanion.insert({ - required String assetId, - this.cloudId = const i0.Value.absent(), - this.createdAt = const i0.Value.absent(), - this.adjustmentTime = const i0.Value.absent(), - this.latitude = const i0.Value.absent(), - this.longitude = const i0.Value.absent(), - }) : assetId = i0.Value(assetId); - static i0.Insertable custom({ - i0.Expression? assetId, - i0.Expression? cloudId, - i0.Expression? createdAt, - i0.Expression? adjustmentTime, - i0.Expression? latitude, - i0.Expression? longitude, - }) { - return i0.RawValuesInsertable({ - if (assetId != null) 'asset_id': assetId, - if (cloudId != null) 'cloud_id': cloudId, - if (createdAt != null) 'created_at': createdAt, - if (adjustmentTime != null) 'adjustment_time': adjustmentTime, - if (latitude != null) 'latitude': latitude, - if (longitude != null) 'longitude': longitude, - }); - } - - i1.RemoteAssetCloudIdEntityCompanion copyWith({ - i0.Value? assetId, - i0.Value? cloudId, - i0.Value? createdAt, - i0.Value? adjustmentTime, - i0.Value? latitude, - i0.Value? longitude, - }) { - return i1.RemoteAssetCloudIdEntityCompanion( - assetId: assetId ?? this.assetId, - cloudId: cloudId ?? this.cloudId, - createdAt: createdAt ?? this.createdAt, - adjustmentTime: adjustmentTime ?? this.adjustmentTime, - latitude: latitude ?? this.latitude, - longitude: longitude ?? this.longitude, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (assetId.present) { - map['asset_id'] = i0.Variable(assetId.value); - } - if (cloudId.present) { - map['cloud_id'] = i0.Variable(cloudId.value); - } - if (createdAt.present) { - map['created_at'] = i0.Variable(createdAt.value); - } - if (adjustmentTime.present) { - map['adjustment_time'] = i0.Variable(adjustmentTime.value); - } - if (latitude.present) { - map['latitude'] = i0.Variable(latitude.value); - } - if (longitude.present) { - map['longitude'] = i0.Variable(longitude.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('RemoteAssetCloudIdEntityCompanion(') - ..write('assetId: $assetId, ') - ..write('cloudId: $cloudId, ') - ..write('createdAt: $createdAt, ') - ..write('adjustmentTime: $adjustmentTime, ') - ..write('latitude: $latitude, ') - ..write('longitude: $longitude') - ..write(')')) - .toString(); - } -} diff --git a/mobile/lib/infrastructure/entities/settings.entity.drift.dart b/mobile/lib/infrastructure/entities/settings.entity.drift.dart deleted file mode 100644 index 7b0fc00ea6..0000000000 --- a/mobile/lib/infrastructure/entities/settings.entity.drift.dart +++ /dev/null @@ -1,428 +0,0 @@ -// dart format width=80 -// ignore_for_file: type=lint -import 'package:drift/drift.dart' as i0; -import 'package:immich_mobile/infrastructure/entities/settings.entity.drift.dart' - as i1; -import 'package:immich_mobile/infrastructure/entities/settings.entity.dart' - as i2; -import 'package:drift/src/runtime/query_builder/query_builder.dart' as i3; - -typedef $$SettingsEntityTableCreateCompanionBuilder = - i1.SettingsEntityCompanion Function({ - required String key, - i0.Value value, - i0.Value updatedAt, - }); -typedef $$SettingsEntityTableUpdateCompanionBuilder = - i1.SettingsEntityCompanion Function({ - i0.Value key, - i0.Value value, - i0.Value updatedAt, - }); - -class $$SettingsEntityTableFilterComposer - extends i0.Composer { - $$SettingsEntityTableFilterComposer({ - required super.$db, - required super.$table, - super.joinBuilder, - super.$addJoinBuilderToRootComposer, - super.$removeJoinBuilderFromRootComposer, - }); - i0.ColumnFilters get key => $composableBuilder( - column: $table.key, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnFilters get value => $composableBuilder( - column: $table.value, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnFilters get updatedAt => $composableBuilder( - column: $table.updatedAt, - builder: (column) => i0.ColumnFilters(column), - ); -} - -class $$SettingsEntityTableOrderingComposer - extends i0.Composer { - $$SettingsEntityTableOrderingComposer({ - required super.$db, - required super.$table, - super.joinBuilder, - super.$addJoinBuilderToRootComposer, - super.$removeJoinBuilderFromRootComposer, - }); - i0.ColumnOrderings get key => $composableBuilder( - column: $table.key, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get value => $composableBuilder( - column: $table.value, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get updatedAt => $composableBuilder( - column: $table.updatedAt, - builder: (column) => i0.ColumnOrderings(column), - ); -} - -class $$SettingsEntityTableAnnotationComposer - extends i0.Composer { - $$SettingsEntityTableAnnotationComposer({ - required super.$db, - required super.$table, - super.joinBuilder, - super.$addJoinBuilderToRootComposer, - super.$removeJoinBuilderFromRootComposer, - }); - i0.GeneratedColumn get key => - $composableBuilder(column: $table.key, builder: (column) => column); - - i0.GeneratedColumn get value => - $composableBuilder(column: $table.value, builder: (column) => column); - - i0.GeneratedColumn get updatedAt => - $composableBuilder(column: $table.updatedAt, builder: (column) => column); -} - -class $$SettingsEntityTableTableManager - extends - i0.RootTableManager< - i0.GeneratedDatabase, - i1.$SettingsEntityTable, - i1.SettingsEntityData, - i1.$$SettingsEntityTableFilterComposer, - i1.$$SettingsEntityTableOrderingComposer, - i1.$$SettingsEntityTableAnnotationComposer, - $$SettingsEntityTableCreateCompanionBuilder, - $$SettingsEntityTableUpdateCompanionBuilder, - ( - i1.SettingsEntityData, - i0.BaseReferences< - i0.GeneratedDatabase, - i1.$SettingsEntityTable, - i1.SettingsEntityData - >, - ), - i1.SettingsEntityData, - i0.PrefetchHooks Function() - > { - $$SettingsEntityTableTableManager( - i0.GeneratedDatabase db, - i1.$SettingsEntityTable table, - ) : super( - i0.TableManagerState( - db: db, - table: table, - createFilteringComposer: () => - i1.$$SettingsEntityTableFilterComposer($db: db, $table: table), - createOrderingComposer: () => - i1.$$SettingsEntityTableOrderingComposer($db: db, $table: table), - createComputedFieldComposer: () => i1 - .$$SettingsEntityTableAnnotationComposer($db: db, $table: table), - updateCompanionCallback: - ({ - i0.Value key = const i0.Value.absent(), - i0.Value value = const i0.Value.absent(), - i0.Value updatedAt = const i0.Value.absent(), - }) => i1.SettingsEntityCompanion( - key: key, - value: value, - updatedAt: updatedAt, - ), - createCompanionCallback: - ({ - required String key, - i0.Value value = const i0.Value.absent(), - i0.Value updatedAt = const i0.Value.absent(), - }) => i1.SettingsEntityCompanion.insert( - key: key, - value: value, - updatedAt: updatedAt, - ), - withReferenceMapper: (p0) => p0 - .map((e) => (e.readTable(table), i0.BaseReferences(db, table, e))) - .toList(), - prefetchHooksCallback: null, - ), - ); -} - -typedef $$SettingsEntityTableProcessedTableManager = - i0.ProcessedTableManager< - i0.GeneratedDatabase, - i1.$SettingsEntityTable, - i1.SettingsEntityData, - i1.$$SettingsEntityTableFilterComposer, - i1.$$SettingsEntityTableOrderingComposer, - i1.$$SettingsEntityTableAnnotationComposer, - $$SettingsEntityTableCreateCompanionBuilder, - $$SettingsEntityTableUpdateCompanionBuilder, - ( - i1.SettingsEntityData, - i0.BaseReferences< - i0.GeneratedDatabase, - i1.$SettingsEntityTable, - i1.SettingsEntityData - >, - ), - i1.SettingsEntityData, - i0.PrefetchHooks Function() - >; - -class $SettingsEntityTable extends i2.SettingsEntity - with i0.TableInfo<$SettingsEntityTable, i1.SettingsEntityData> { - @override - final i0.GeneratedDatabase attachedDatabase; - final String? _alias; - $SettingsEntityTable(this.attachedDatabase, [this._alias]); - static const i0.VerificationMeta _keyMeta = const i0.VerificationMeta('key'); - @override - late final i0.GeneratedColumn key = i0.GeneratedColumn( - 'key', - aliasedName, - false, - type: i0.DriftSqlType.string, - requiredDuringInsert: true, - ); - static const i0.VerificationMeta _valueMeta = const i0.VerificationMeta( - 'value', - ); - @override - late final i0.GeneratedColumn value = i0.GeneratedColumn( - 'value', - aliasedName, - true, - type: i0.DriftSqlType.string, - requiredDuringInsert: false, - ); - 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: i3.currentDateAndTime, - ); - @override - List get $columns => [key, value, updatedAt]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'settings'; - @override - i0.VerificationContext validateIntegrity( - i0.Insertable instance, { - bool isInserting = false, - }) { - final context = i0.VerificationContext(); - final data = instance.toColumns(true); - if (data.containsKey('key')) { - context.handle( - _keyMeta, - key.isAcceptableOrUnknown(data['key']!, _keyMeta), - ); - } else if (isInserting) { - context.missing(_keyMeta); - } - if (data.containsKey('value')) { - context.handle( - _valueMeta, - value.isAcceptableOrUnknown(data['value']!, _valueMeta), - ); - } - if (data.containsKey('updated_at')) { - context.handle( - _updatedAtMeta, - updatedAt.isAcceptableOrUnknown(data['updated_at']!, _updatedAtMeta), - ); - } - return context; - } - - @override - Set get $primaryKey => {key}; - @override - i1.SettingsEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return i1.SettingsEntityData( - key: attachedDatabase.typeMapping.read( - i0.DriftSqlType.string, - data['${effectivePrefix}key'], - )!, - value: attachedDatabase.typeMapping.read( - i0.DriftSqlType.string, - data['${effectivePrefix}value'], - ), - updatedAt: attachedDatabase.typeMapping.read( - i0.DriftSqlType.dateTime, - data['${effectivePrefix}updated_at'], - )!, - ); - } - - @override - $SettingsEntityTable createAlias(String alias) { - return $SettingsEntityTable(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class SettingsEntityData extends i0.DataClass - implements i0.Insertable { - final String key; - final String? value; - final DateTime updatedAt; - const SettingsEntityData({ - required this.key, - this.value, - required this.updatedAt, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['key'] = i0.Variable(key); - if (!nullToAbsent || value != null) { - map['value'] = i0.Variable(value); - } - map['updated_at'] = i0.Variable(updatedAt); - return map; - } - - factory SettingsEntityData.fromJson( - Map json, { - i0.ValueSerializer? serializer, - }) { - serializer ??= i0.driftRuntimeOptions.defaultSerializer; - return SettingsEntityData( - key: serializer.fromJson(json['key']), - value: serializer.fromJson(json['value']), - updatedAt: serializer.fromJson(json['updatedAt']), - ); - } - @override - Map toJson({i0.ValueSerializer? serializer}) { - serializer ??= i0.driftRuntimeOptions.defaultSerializer; - return { - 'key': serializer.toJson(key), - 'value': serializer.toJson(value), - 'updatedAt': serializer.toJson(updatedAt), - }; - } - - i1.SettingsEntityData copyWith({ - String? key, - i0.Value value = const i0.Value.absent(), - DateTime? updatedAt, - }) => i1.SettingsEntityData( - key: key ?? this.key, - value: value.present ? value.value : this.value, - updatedAt: updatedAt ?? this.updatedAt, - ); - SettingsEntityData copyWithCompanion(i1.SettingsEntityCompanion data) { - return SettingsEntityData( - key: data.key.present ? data.key.value : this.key, - value: data.value.present ? data.value.value : this.value, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - ); - } - - @override - String toString() { - return (StringBuffer('SettingsEntityData(') - ..write('key: $key, ') - ..write('value: $value, ') - ..write('updatedAt: $updatedAt') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(key, value, updatedAt); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is i1.SettingsEntityData && - other.key == this.key && - other.value == this.value && - other.updatedAt == this.updatedAt); -} - -class SettingsEntityCompanion - extends i0.UpdateCompanion { - final i0.Value key; - final i0.Value value; - final i0.Value updatedAt; - const SettingsEntityCompanion({ - this.key = const i0.Value.absent(), - this.value = const i0.Value.absent(), - this.updatedAt = const i0.Value.absent(), - }); - SettingsEntityCompanion.insert({ - required String key, - this.value = const i0.Value.absent(), - this.updatedAt = const i0.Value.absent(), - }) : key = i0.Value(key); - static i0.Insertable custom({ - i0.Expression? key, - i0.Expression? value, - i0.Expression? updatedAt, - }) { - return i0.RawValuesInsertable({ - if (key != null) 'key': key, - if (value != null) 'value': value, - if (updatedAt != null) 'updated_at': updatedAt, - }); - } - - i1.SettingsEntityCompanion copyWith({ - i0.Value? key, - i0.Value? value, - i0.Value? updatedAt, - }) { - return i1.SettingsEntityCompanion( - key: key ?? this.key, - value: value ?? this.value, - updatedAt: updatedAt ?? this.updatedAt, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (key.present) { - map['key'] = i0.Variable(key.value); - } - if (value.present) { - map['value'] = i0.Variable(value.value); - } - if (updatedAt.present) { - map['updated_at'] = i0.Variable(updatedAt.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('SettingsEntityCompanion(') - ..write('key: $key, ') - ..write('value: $value, ') - ..write('updatedAt: $updatedAt') - ..write(')')) - .toString(); - } -} diff --git a/mobile/lib/infrastructure/entities/stack.entity.drift.dart b/mobile/lib/infrastructure/entities/stack.entity.drift.dart deleted file mode 100644 index 55017f8344..0000000000 --- a/mobile/lib/infrastructure/entities/stack.entity.drift.dart +++ /dev/null @@ -1,717 +0,0 @@ -// dart format width=80 -// ignore_for_file: type=lint -import 'package:drift/drift.dart' as i0; -import 'package:immich_mobile/infrastructure/entities/stack.entity.drift.dart' - as i1; -import 'package:immich_mobile/infrastructure/entities/stack.entity.dart' as i2; -import 'package:drift/src/runtime/query_builder/query_builder.dart' as i3; -import 'package:immich_mobile/infrastructure/entities/user.entity.drift.dart' - as i4; -import 'package:drift/internal/modular.dart' as i5; - -typedef $$StackEntityTableCreateCompanionBuilder = - i1.StackEntityCompanion Function({ - required String id, - i0.Value createdAt, - i0.Value updatedAt, - required String ownerId, - required String primaryAssetId, - }); -typedef $$StackEntityTableUpdateCompanionBuilder = - i1.StackEntityCompanion Function({ - i0.Value id, - i0.Value createdAt, - i0.Value updatedAt, - i0.Value ownerId, - i0.Value primaryAssetId, - }); - -final class $$StackEntityTableReferences - extends - i0.BaseReferences< - i0.GeneratedDatabase, - i1.$StackEntityTable, - i1.StackEntityData - > { - $$StackEntityTableReferences(super.$_db, super.$_table, super.$_typedResult); - - static i4.$UserEntityTable _ownerIdTable(i0.GeneratedDatabase db) => - i5.ReadDatabaseContainer(db) - .resultSet('user_entity') - .createAlias( - i0.$_aliasNameGenerator( - i5.ReadDatabaseContainer( - db, - ).resultSet('stack_entity').ownerId, - i5.ReadDatabaseContainer( - db, - ).resultSet('user_entity').id, - ), - ); - - i4.$$UserEntityTableProcessedTableManager get ownerId { - final $_column = $_itemColumn('owner_id')!; - - final manager = i4 - .$$UserEntityTableTableManager( - $_db, - i5.ReadDatabaseContainer( - $_db, - ).resultSet('user_entity'), - ) - .filter((f) => f.id.sqlEquals($_column)); - final item = $_typedResult.readTableOrNull(_ownerIdTable($_db)); - if (item == null) return manager; - return i0.ProcessedTableManager( - manager.$state.copyWith(prefetchedData: [item]), - ); - } -} - -class $$StackEntityTableFilterComposer - extends i0.Composer { - $$StackEntityTableFilterComposer({ - required super.$db, - required super.$table, - super.joinBuilder, - super.$addJoinBuilderToRootComposer, - super.$removeJoinBuilderFromRootComposer, - }); - i0.ColumnFilters get id => $composableBuilder( - column: $table.id, - builder: (column) => i0.ColumnFilters(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 primaryAssetId => $composableBuilder( - column: $table.primaryAssetId, - builder: (column) => i0.ColumnFilters(column), - ); - - i4.$$UserEntityTableFilterComposer get ownerId { - final i4.$$UserEntityTableFilterComposer composer = $composerBuilder( - composer: this, - getCurrentColumn: (t) => t.ownerId, - referencedTable: i5.ReadDatabaseContainer( - $db, - ).resultSet('user_entity'), - getReferencedColumn: (t) => t.id, - builder: - ( - joinBuilder, { - $addJoinBuilderToRootComposer, - $removeJoinBuilderFromRootComposer, - }) => i4.$$UserEntityTableFilterComposer( - $db: $db, - $table: i5.ReadDatabaseContainer( - $db, - ).resultSet('user_entity'), - $addJoinBuilderToRootComposer: $addJoinBuilderToRootComposer, - joinBuilder: joinBuilder, - $removeJoinBuilderFromRootComposer: - $removeJoinBuilderFromRootComposer, - ), - ); - return composer; - } -} - -class $$StackEntityTableOrderingComposer - extends i0.Composer { - $$StackEntityTableOrderingComposer({ - required super.$db, - required super.$table, - super.joinBuilder, - super.$addJoinBuilderToRootComposer, - super.$removeJoinBuilderFromRootComposer, - }); - i0.ColumnOrderings get id => $composableBuilder( - column: $table.id, - 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 primaryAssetId => $composableBuilder( - column: $table.primaryAssetId, - builder: (column) => i0.ColumnOrderings(column), - ); - - i4.$$UserEntityTableOrderingComposer get ownerId { - final i4.$$UserEntityTableOrderingComposer composer = $composerBuilder( - composer: this, - getCurrentColumn: (t) => t.ownerId, - referencedTable: i5.ReadDatabaseContainer( - $db, - ).resultSet('user_entity'), - getReferencedColumn: (t) => t.id, - builder: - ( - joinBuilder, { - $addJoinBuilderToRootComposer, - $removeJoinBuilderFromRootComposer, - }) => i4.$$UserEntityTableOrderingComposer( - $db: $db, - $table: i5.ReadDatabaseContainer( - $db, - ).resultSet('user_entity'), - $addJoinBuilderToRootComposer: $addJoinBuilderToRootComposer, - joinBuilder: joinBuilder, - $removeJoinBuilderFromRootComposer: - $removeJoinBuilderFromRootComposer, - ), - ); - return composer; - } -} - -class $$StackEntityTableAnnotationComposer - extends i0.Composer { - $$StackEntityTableAnnotationComposer({ - required super.$db, - required super.$table, - super.joinBuilder, - super.$addJoinBuilderToRootComposer, - super.$removeJoinBuilderFromRootComposer, - }); - i0.GeneratedColumn get id => - $composableBuilder(column: $table.id, 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 primaryAssetId => $composableBuilder( - column: $table.primaryAssetId, - builder: (column) => column, - ); - - i4.$$UserEntityTableAnnotationComposer get ownerId { - final i4.$$UserEntityTableAnnotationComposer composer = $composerBuilder( - composer: this, - getCurrentColumn: (t) => t.ownerId, - referencedTable: i5.ReadDatabaseContainer( - $db, - ).resultSet('user_entity'), - getReferencedColumn: (t) => t.id, - builder: - ( - joinBuilder, { - $addJoinBuilderToRootComposer, - $removeJoinBuilderFromRootComposer, - }) => i4.$$UserEntityTableAnnotationComposer( - $db: $db, - $table: i5.ReadDatabaseContainer( - $db, - ).resultSet('user_entity'), - $addJoinBuilderToRootComposer: $addJoinBuilderToRootComposer, - joinBuilder: joinBuilder, - $removeJoinBuilderFromRootComposer: - $removeJoinBuilderFromRootComposer, - ), - ); - return composer; - } -} - -class $$StackEntityTableTableManager - extends - i0.RootTableManager< - i0.GeneratedDatabase, - i1.$StackEntityTable, - i1.StackEntityData, - i1.$$StackEntityTableFilterComposer, - i1.$$StackEntityTableOrderingComposer, - i1.$$StackEntityTableAnnotationComposer, - $$StackEntityTableCreateCompanionBuilder, - $$StackEntityTableUpdateCompanionBuilder, - (i1.StackEntityData, i1.$$StackEntityTableReferences), - i1.StackEntityData, - i0.PrefetchHooks Function({bool ownerId}) - > { - $$StackEntityTableTableManager( - i0.GeneratedDatabase db, - i1.$StackEntityTable table, - ) : super( - i0.TableManagerState( - db: db, - table: table, - createFilteringComposer: () => - i1.$$StackEntityTableFilterComposer($db: db, $table: table), - createOrderingComposer: () => - i1.$$StackEntityTableOrderingComposer($db: db, $table: table), - createComputedFieldComposer: () => - i1.$$StackEntityTableAnnotationComposer($db: db, $table: table), - updateCompanionCallback: - ({ - i0.Value id = const i0.Value.absent(), - i0.Value createdAt = const i0.Value.absent(), - i0.Value updatedAt = const i0.Value.absent(), - i0.Value ownerId = const i0.Value.absent(), - i0.Value primaryAssetId = const i0.Value.absent(), - }) => i1.StackEntityCompanion( - id: id, - createdAt: createdAt, - updatedAt: updatedAt, - ownerId: ownerId, - primaryAssetId: primaryAssetId, - ), - createCompanionCallback: - ({ - required String id, - i0.Value createdAt = const i0.Value.absent(), - i0.Value updatedAt = const i0.Value.absent(), - required String ownerId, - required String primaryAssetId, - }) => i1.StackEntityCompanion.insert( - id: id, - createdAt: createdAt, - updatedAt: updatedAt, - ownerId: ownerId, - primaryAssetId: primaryAssetId, - ), - withReferenceMapper: (p0) => p0 - .map( - (e) => ( - e.readTable(table), - i1.$$StackEntityTableReferences(db, table, e), - ), - ) - .toList(), - prefetchHooksCallback: ({ownerId = false}) { - return i0.PrefetchHooks( - db: db, - explicitlyWatchedTables: [], - addJoins: - < - T extends i0.TableManagerState< - dynamic, - dynamic, - dynamic, - dynamic, - dynamic, - dynamic, - dynamic, - dynamic, - dynamic, - dynamic, - dynamic - > - >(state) { - if (ownerId) { - state = - state.withJoin( - currentTable: table, - currentColumn: table.ownerId, - referencedTable: i1.$$StackEntityTableReferences - ._ownerIdTable(db), - referencedColumn: i1 - .$$StackEntityTableReferences - ._ownerIdTable(db) - .id, - ) - as T; - } - - return state; - }, - getPrefetchedDataCallback: (items) async { - return []; - }, - ); - }, - ), - ); -} - -typedef $$StackEntityTableProcessedTableManager = - i0.ProcessedTableManager< - i0.GeneratedDatabase, - i1.$StackEntityTable, - i1.StackEntityData, - i1.$$StackEntityTableFilterComposer, - i1.$$StackEntityTableOrderingComposer, - i1.$$StackEntityTableAnnotationComposer, - $$StackEntityTableCreateCompanionBuilder, - $$StackEntityTableUpdateCompanionBuilder, - (i1.StackEntityData, i1.$$StackEntityTableReferences), - i1.StackEntityData, - i0.PrefetchHooks Function({bool ownerId}) - >; -i0.Index get idxStackPrimaryAssetId => i0.Index( - 'idx_stack_primary_asset_id', - 'CREATE INDEX IF NOT EXISTS idx_stack_primary_asset_id ON stack_entity (primary_asset_id)', -); - -class $StackEntityTable extends i2.StackEntity - with i0.TableInfo<$StackEntityTable, i1.StackEntityData> { - @override - final i0.GeneratedDatabase attachedDatabase; - final String? _alias; - $StackEntityTable(this.attachedDatabase, [this._alias]); - 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 _createdAtMeta = const i0.VerificationMeta( - 'createdAt', - ); - @override - late final i0.GeneratedColumn createdAt = - i0.GeneratedColumn( - 'created_at', - aliasedName, - false, - type: i0.DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: i3.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: i3.currentDateAndTime, - ); - static const i0.VerificationMeta _ownerIdMeta = const i0.VerificationMeta( - 'ownerId', - ); - @override - late final i0.GeneratedColumn ownerId = i0.GeneratedColumn( - 'owner_id', - aliasedName, - false, - type: i0.DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: i0.GeneratedColumn.constraintIsAlways( - 'REFERENCES user_entity (id) ON DELETE CASCADE', - ), - ); - static const i0.VerificationMeta _primaryAssetIdMeta = - const i0.VerificationMeta('primaryAssetId'); - @override - late final i0.GeneratedColumn primaryAssetId = - i0.GeneratedColumn( - 'primary_asset_id', - aliasedName, - false, - type: i0.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 - i0.VerificationContext validateIntegrity( - i0.Insertable instance, { - bool isInserting = false, - }) { - final context = i0.VerificationContext(); - final data = instance.toColumns(true); - if (data.containsKey('id')) { - context.handle(_idMeta, id.isAcceptableOrUnknown(data['id']!, _idMeta)); - } else if (isInserting) { - context.missing(_idMeta); - } - 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('owner_id')) { - context.handle( - _ownerIdMeta, - ownerId.isAcceptableOrUnknown(data['owner_id']!, _ownerIdMeta), - ); - } else if (isInserting) { - context.missing(_ownerIdMeta); - } - if (data.containsKey('primary_asset_id')) { - context.handle( - _primaryAssetIdMeta, - primaryAssetId.isAcceptableOrUnknown( - data['primary_asset_id']!, - _primaryAssetIdMeta, - ), - ); - } else if (isInserting) { - context.missing(_primaryAssetIdMeta); - } - return context; - } - - @override - Set get $primaryKey => {id}; - @override - i1.StackEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return i1.StackEntityData( - id: attachedDatabase.typeMapping.read( - i0.DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - createdAt: attachedDatabase.typeMapping.read( - i0.DriftSqlType.dateTime, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - i0.DriftSqlType.dateTime, - data['${effectivePrefix}updated_at'], - )!, - ownerId: attachedDatabase.typeMapping.read( - i0.DriftSqlType.string, - data['${effectivePrefix}owner_id'], - )!, - primaryAssetId: attachedDatabase.typeMapping.read( - i0.DriftSqlType.string, - data['${effectivePrefix}primary_asset_id'], - )!, - ); - } - - @override - $StackEntityTable createAlias(String alias) { - return $StackEntityTable(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class StackEntityData extends i0.DataClass - implements i0.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'] = i0.Variable(id); - map['created_at'] = i0.Variable(createdAt); - map['updated_at'] = i0.Variable(updatedAt); - map['owner_id'] = i0.Variable(ownerId); - map['primary_asset_id'] = i0.Variable(primaryAssetId); - return map; - } - - factory StackEntityData.fromJson( - Map json, { - i0.ValueSerializer? serializer, - }) { - serializer ??= i0.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({i0.ValueSerializer? serializer}) { - serializer ??= i0.driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'createdAt': serializer.toJson(createdAt), - 'updatedAt': serializer.toJson(updatedAt), - 'ownerId': serializer.toJson(ownerId), - 'primaryAssetId': serializer.toJson(primaryAssetId), - }; - } - - i1.StackEntityData copyWith({ - String? id, - DateTime? createdAt, - DateTime? updatedAt, - String? ownerId, - String? primaryAssetId, - }) => i1.StackEntityData( - id: id ?? this.id, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - ownerId: ownerId ?? this.ownerId, - primaryAssetId: primaryAssetId ?? this.primaryAssetId, - ); - StackEntityData copyWithCompanion(i1.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 i1.StackEntityData && - other.id == this.id && - other.createdAt == this.createdAt && - other.updatedAt == this.updatedAt && - other.ownerId == this.ownerId && - other.primaryAssetId == this.primaryAssetId); -} - -class StackEntityCompanion extends i0.UpdateCompanion { - final i0.Value id; - final i0.Value createdAt; - final i0.Value updatedAt; - final i0.Value ownerId; - final i0.Value primaryAssetId; - const StackEntityCompanion({ - this.id = const i0.Value.absent(), - this.createdAt = const i0.Value.absent(), - this.updatedAt = const i0.Value.absent(), - this.ownerId = const i0.Value.absent(), - this.primaryAssetId = const i0.Value.absent(), - }); - StackEntityCompanion.insert({ - required String id, - this.createdAt = const i0.Value.absent(), - this.updatedAt = const i0.Value.absent(), - required String ownerId, - required String primaryAssetId, - }) : id = i0.Value(id), - ownerId = i0.Value(ownerId), - primaryAssetId = i0.Value(primaryAssetId); - static i0.Insertable custom({ - i0.Expression? id, - i0.Expression? createdAt, - i0.Expression? updatedAt, - i0.Expression? ownerId, - i0.Expression? primaryAssetId, - }) { - return i0.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, - }); - } - - i1.StackEntityCompanion copyWith({ - i0.Value? id, - i0.Value? createdAt, - i0.Value? updatedAt, - i0.Value? ownerId, - i0.Value? primaryAssetId, - }) { - return i1.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'] = i0.Variable(id.value); - } - if (createdAt.present) { - map['created_at'] = i0.Variable(createdAt.value); - } - if (updatedAt.present) { - map['updated_at'] = i0.Variable(updatedAt.value); - } - if (ownerId.present) { - map['owner_id'] = i0.Variable(ownerId.value); - } - if (primaryAssetId.present) { - map['primary_asset_id'] = i0.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(); - } -} diff --git a/mobile/lib/infrastructure/entities/store.entity.drift.dart b/mobile/lib/infrastructure/entities/store.entity.drift.dart deleted file mode 100644 index 327b0e95d9..0000000000 --- a/mobile/lib/infrastructure/entities/store.entity.drift.dart +++ /dev/null @@ -1,426 +0,0 @@ -// dart format width=80 -// ignore_for_file: type=lint -import 'package:drift/drift.dart' as i0; -import 'package:immich_mobile/infrastructure/entities/store.entity.drift.dart' - as i1; -import 'package:immich_mobile/infrastructure/entities/store.entity.dart' as i2; - -typedef $$StoreEntityTableCreateCompanionBuilder = - i1.StoreEntityCompanion Function({ - required int id, - i0.Value stringValue, - i0.Value intValue, - }); -typedef $$StoreEntityTableUpdateCompanionBuilder = - i1.StoreEntityCompanion Function({ - i0.Value id, - i0.Value stringValue, - i0.Value intValue, - }); - -class $$StoreEntityTableFilterComposer - extends i0.Composer { - $$StoreEntityTableFilterComposer({ - required super.$db, - required super.$table, - super.joinBuilder, - super.$addJoinBuilderToRootComposer, - super.$removeJoinBuilderFromRootComposer, - }); - i0.ColumnFilters get id => $composableBuilder( - column: $table.id, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnFilters get stringValue => $composableBuilder( - column: $table.stringValue, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnFilters get intValue => $composableBuilder( - column: $table.intValue, - builder: (column) => i0.ColumnFilters(column), - ); -} - -class $$StoreEntityTableOrderingComposer - extends i0.Composer { - $$StoreEntityTableOrderingComposer({ - required super.$db, - required super.$table, - super.joinBuilder, - super.$addJoinBuilderToRootComposer, - super.$removeJoinBuilderFromRootComposer, - }); - i0.ColumnOrderings get id => $composableBuilder( - column: $table.id, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get stringValue => $composableBuilder( - column: $table.stringValue, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get intValue => $composableBuilder( - column: $table.intValue, - builder: (column) => i0.ColumnOrderings(column), - ); -} - -class $$StoreEntityTableAnnotationComposer - extends i0.Composer { - $$StoreEntityTableAnnotationComposer({ - required super.$db, - required super.$table, - super.joinBuilder, - super.$addJoinBuilderToRootComposer, - super.$removeJoinBuilderFromRootComposer, - }); - i0.GeneratedColumn get id => - $composableBuilder(column: $table.id, builder: (column) => column); - - i0.GeneratedColumn get stringValue => $composableBuilder( - column: $table.stringValue, - builder: (column) => column, - ); - - i0.GeneratedColumn get intValue => - $composableBuilder(column: $table.intValue, builder: (column) => column); -} - -class $$StoreEntityTableTableManager - extends - i0.RootTableManager< - i0.GeneratedDatabase, - i1.$StoreEntityTable, - i1.StoreEntityData, - i1.$$StoreEntityTableFilterComposer, - i1.$$StoreEntityTableOrderingComposer, - i1.$$StoreEntityTableAnnotationComposer, - $$StoreEntityTableCreateCompanionBuilder, - $$StoreEntityTableUpdateCompanionBuilder, - ( - i1.StoreEntityData, - i0.BaseReferences< - i0.GeneratedDatabase, - i1.$StoreEntityTable, - i1.StoreEntityData - >, - ), - i1.StoreEntityData, - i0.PrefetchHooks Function() - > { - $$StoreEntityTableTableManager( - i0.GeneratedDatabase db, - i1.$StoreEntityTable table, - ) : super( - i0.TableManagerState( - db: db, - table: table, - createFilteringComposer: () => - i1.$$StoreEntityTableFilterComposer($db: db, $table: table), - createOrderingComposer: () => - i1.$$StoreEntityTableOrderingComposer($db: db, $table: table), - createComputedFieldComposer: () => - i1.$$StoreEntityTableAnnotationComposer($db: db, $table: table), - updateCompanionCallback: - ({ - i0.Value id = const i0.Value.absent(), - i0.Value stringValue = const i0.Value.absent(), - i0.Value intValue = const i0.Value.absent(), - }) => i1.StoreEntityCompanion( - id: id, - stringValue: stringValue, - intValue: intValue, - ), - createCompanionCallback: - ({ - required int id, - i0.Value stringValue = const i0.Value.absent(), - i0.Value intValue = const i0.Value.absent(), - }) => i1.StoreEntityCompanion.insert( - id: id, - stringValue: stringValue, - intValue: intValue, - ), - withReferenceMapper: (p0) => p0 - .map((e) => (e.readTable(table), i0.BaseReferences(db, table, e))) - .toList(), - prefetchHooksCallback: null, - ), - ); -} - -typedef $$StoreEntityTableProcessedTableManager = - i0.ProcessedTableManager< - i0.GeneratedDatabase, - i1.$StoreEntityTable, - i1.StoreEntityData, - i1.$$StoreEntityTableFilterComposer, - i1.$$StoreEntityTableOrderingComposer, - i1.$$StoreEntityTableAnnotationComposer, - $$StoreEntityTableCreateCompanionBuilder, - $$StoreEntityTableUpdateCompanionBuilder, - ( - i1.StoreEntityData, - i0.BaseReferences< - i0.GeneratedDatabase, - i1.$StoreEntityTable, - i1.StoreEntityData - >, - ), - i1.StoreEntityData, - i0.PrefetchHooks Function() - >; - -class $StoreEntityTable extends i2.StoreEntity - with i0.TableInfo<$StoreEntityTable, i1.StoreEntityData> { - @override - final i0.GeneratedDatabase attachedDatabase; - final String? _alias; - $StoreEntityTable(this.attachedDatabase, [this._alias]); - static const i0.VerificationMeta _idMeta = const i0.VerificationMeta('id'); - @override - late final i0.GeneratedColumn id = i0.GeneratedColumn( - 'id', - aliasedName, - false, - type: i0.DriftSqlType.int, - requiredDuringInsert: true, - ); - static const i0.VerificationMeta _stringValueMeta = const i0.VerificationMeta( - 'stringValue', - ); - @override - late final i0.GeneratedColumn stringValue = - i0.GeneratedColumn( - 'string_value', - aliasedName, - true, - type: i0.DriftSqlType.string, - requiredDuringInsert: false, - ); - static const i0.VerificationMeta _intValueMeta = const i0.VerificationMeta( - 'intValue', - ); - @override - late final i0.GeneratedColumn intValue = i0.GeneratedColumn( - 'int_value', - aliasedName, - true, - type: i0.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 - i0.VerificationContext validateIntegrity( - i0.Insertable instance, { - bool isInserting = false, - }) { - final context = i0.VerificationContext(); - final data = instance.toColumns(true); - if (data.containsKey('id')) { - context.handle(_idMeta, id.isAcceptableOrUnknown(data['id']!, _idMeta)); - } else if (isInserting) { - context.missing(_idMeta); - } - if (data.containsKey('string_value')) { - context.handle( - _stringValueMeta, - stringValue.isAcceptableOrUnknown( - data['string_value']!, - _stringValueMeta, - ), - ); - } - if (data.containsKey('int_value')) { - context.handle( - _intValueMeta, - intValue.isAcceptableOrUnknown(data['int_value']!, _intValueMeta), - ); - } - return context; - } - - @override - Set get $primaryKey => {id}; - @override - i1.StoreEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return i1.StoreEntityData( - id: attachedDatabase.typeMapping.read( - i0.DriftSqlType.int, - data['${effectivePrefix}id'], - )!, - stringValue: attachedDatabase.typeMapping.read( - i0.DriftSqlType.string, - data['${effectivePrefix}string_value'], - ), - intValue: attachedDatabase.typeMapping.read( - i0.DriftSqlType.int, - data['${effectivePrefix}int_value'], - ), - ); - } - - @override - $StoreEntityTable createAlias(String alias) { - return $StoreEntityTable(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class StoreEntityData extends i0.DataClass - implements i0.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'] = i0.Variable(id); - if (!nullToAbsent || stringValue != null) { - map['string_value'] = i0.Variable(stringValue); - } - if (!nullToAbsent || intValue != null) { - map['int_value'] = i0.Variable(intValue); - } - return map; - } - - factory StoreEntityData.fromJson( - Map json, { - i0.ValueSerializer? serializer, - }) { - serializer ??= i0.driftRuntimeOptions.defaultSerializer; - return StoreEntityData( - id: serializer.fromJson(json['id']), - stringValue: serializer.fromJson(json['stringValue']), - intValue: serializer.fromJson(json['intValue']), - ); - } - @override - Map toJson({i0.ValueSerializer? serializer}) { - serializer ??= i0.driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'stringValue': serializer.toJson(stringValue), - 'intValue': serializer.toJson(intValue), - }; - } - - i1.StoreEntityData copyWith({ - int? id, - i0.Value stringValue = const i0.Value.absent(), - i0.Value intValue = const i0.Value.absent(), - }) => i1.StoreEntityData( - id: id ?? this.id, - stringValue: stringValue.present ? stringValue.value : this.stringValue, - intValue: intValue.present ? intValue.value : this.intValue, - ); - StoreEntityData copyWithCompanion(i1.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 i1.StoreEntityData && - other.id == this.id && - other.stringValue == this.stringValue && - other.intValue == this.intValue); -} - -class StoreEntityCompanion extends i0.UpdateCompanion { - final i0.Value id; - final i0.Value stringValue; - final i0.Value intValue; - const StoreEntityCompanion({ - this.id = const i0.Value.absent(), - this.stringValue = const i0.Value.absent(), - this.intValue = const i0.Value.absent(), - }); - StoreEntityCompanion.insert({ - required int id, - this.stringValue = const i0.Value.absent(), - this.intValue = const i0.Value.absent(), - }) : id = i0.Value(id); - static i0.Insertable custom({ - i0.Expression? id, - i0.Expression? stringValue, - i0.Expression? intValue, - }) { - return i0.RawValuesInsertable({ - if (id != null) 'id': id, - if (stringValue != null) 'string_value': stringValue, - if (intValue != null) 'int_value': intValue, - }); - } - - i1.StoreEntityCompanion copyWith({ - i0.Value? id, - i0.Value? stringValue, - i0.Value? intValue, - }) { - return i1.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'] = i0.Variable(id.value); - } - if (stringValue.present) { - map['string_value'] = i0.Variable(stringValue.value); - } - if (intValue.present) { - map['int_value'] = i0.Variable(intValue.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('StoreEntityCompanion(') - ..write('id: $id, ') - ..write('stringValue: $stringValue, ') - ..write('intValue: $intValue') - ..write(')')) - .toString(); - } -} diff --git a/mobile/lib/infrastructure/entities/trashed_local_asset.entity.drift.dart b/mobile/lib/infrastructure/entities/trashed_local_asset.entity.drift.dart deleted file mode 100644 index 068d008e92..0000000000 --- a/mobile/lib/infrastructure/entities/trashed_local_asset.entity.drift.dart +++ /dev/null @@ -1,1241 +0,0 @@ -// 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 durationMs, - required String id, - required String albumId, - i0.Value checksum, - i0.Value isFavorite, - i0.Value orientation, - required i3.TrashOrigin source, - i0.Value playbackStyle, - }); -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 durationMs, - i0.Value id, - i0.Value albumId, - i0.Value checksum, - i0.Value isFavorite, - i0.Value orientation, - i0.Value source, - i0.Value playbackStyle, - }); - -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 durationMs => $composableBuilder( - column: $table.durationMs, - 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), - ); - - i0.ColumnWithTypeConverterFilters - get source => $composableBuilder( - column: $table.source, - builder: (column) => i0.ColumnWithTypeConverterFilters(column), - ); - - i0.ColumnWithTypeConverterFilters< - i2.AssetPlaybackStyle, - i2.AssetPlaybackStyle, - int - > - get playbackStyle => $composableBuilder( - column: $table.playbackStyle, - builder: (column) => i0.ColumnWithTypeConverterFilters(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 durationMs => $composableBuilder( - column: $table.durationMs, - 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), - ); - - i0.ColumnOrderings get source => $composableBuilder( - column: $table.source, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get playbackStyle => $composableBuilder( - column: $table.playbackStyle, - 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 durationMs => $composableBuilder( - column: $table.durationMs, - 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, - ); - - i0.GeneratedColumnWithTypeConverter get source => - $composableBuilder(column: $table.source, builder: (column) => column); - - i0.GeneratedColumnWithTypeConverter - get playbackStyle => $composableBuilder( - column: $table.playbackStyle, - 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 durationMs = 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(), - i0.Value source = const i0.Value.absent(), - i0.Value playbackStyle = - const i0.Value.absent(), - }) => i1.TrashedLocalAssetEntityCompanion( - name: name, - type: type, - createdAt: createdAt, - updatedAt: updatedAt, - width: width, - height: height, - durationMs: durationMs, - id: id, - albumId: albumId, - checksum: checksum, - isFavorite: isFavorite, - orientation: orientation, - source: source, - playbackStyle: playbackStyle, - ), - 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 durationMs = 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(), - required i3.TrashOrigin source, - i0.Value playbackStyle = - const i0.Value.absent(), - }) => i1.TrashedLocalAssetEntityCompanion.insert( - name: name, - type: type, - createdAt: createdAt, - updatedAt: updatedAt, - width: width, - height: height, - durationMs: durationMs, - id: id, - albumId: albumId, - checksum: checksum, - isFavorite: isFavorite, - orientation: orientation, - source: source, - playbackStyle: playbackStyle, - ), - 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 _durationMsMeta = const i0.VerificationMeta( - 'durationMs', - ); - @override - late final i0.GeneratedColumn durationMs = i0.GeneratedColumn( - 'duration_ms', - 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 - late final i0.GeneratedColumnWithTypeConverter source = - i0.GeneratedColumn( - 'source', - aliasedName, - false, - type: i0.DriftSqlType.int, - requiredDuringInsert: true, - ).withConverter( - i1.$TrashedLocalAssetEntityTable.$convertersource, - ); - @override - late final i0.GeneratedColumnWithTypeConverter - playbackStyle = - i0.GeneratedColumn( - 'playback_style', - aliasedName, - false, - type: i0.DriftSqlType.int, - requiredDuringInsert: false, - defaultValue: const i4.Constant(0), - ).withConverter( - i1.$TrashedLocalAssetEntityTable.$converterplaybackStyle, - ); - @override - List get $columns => [ - name, - type, - createdAt, - updatedAt, - width, - height, - durationMs, - id, - albumId, - checksum, - isFavorite, - orientation, - source, - playbackStyle, - ]; - @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_ms')) { - context.handle( - _durationMsMeta, - durationMs.isAcceptableOrUnknown(data['duration_ms']!, _durationMsMeta), - ); - } - 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'], - ), - durationMs: attachedDatabase.typeMapping.read( - i0.DriftSqlType.int, - data['${effectivePrefix}duration_ms'], - ), - 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'], - )!, - source: i1.$TrashedLocalAssetEntityTable.$convertersource.fromSql( - attachedDatabase.typeMapping.read( - i0.DriftSqlType.int, - data['${effectivePrefix}source'], - )!, - ), - playbackStyle: i1.$TrashedLocalAssetEntityTable.$converterplaybackStyle - .fromSql( - attachedDatabase.typeMapping.read( - i0.DriftSqlType.int, - data['${effectivePrefix}playback_style'], - )!, - ), - ); - } - - @override - $TrashedLocalAssetEntityTable createAlias(String alias) { - return $TrashedLocalAssetEntityTable(attachedDatabase, alias); - } - - static i0.JsonTypeConverter2 $convertertype = - const i0.EnumIndexConverter(i2.AssetType.values); - static i0.JsonTypeConverter2 $convertersource = - const i0.EnumIndexConverter(i3.TrashOrigin.values); - static i0.JsonTypeConverter2 - $converterplaybackStyle = const i0.EnumIndexConverter( - i2.AssetPlaybackStyle.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? durationMs; - final String id; - final String albumId; - final String? checksum; - final bool isFavorite; - final int orientation; - final i3.TrashOrigin source; - final i2.AssetPlaybackStyle playbackStyle; - const TrashedLocalAssetEntityData({ - required this.name, - required this.type, - required this.createdAt, - required this.updatedAt, - this.width, - this.height, - this.durationMs, - required this.id, - required this.albumId, - this.checksum, - required this.isFavorite, - required this.orientation, - required this.source, - required this.playbackStyle, - }); - @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 || durationMs != null) { - map['duration_ms'] = i0.Variable(durationMs); - } - 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); - { - map['source'] = i0.Variable( - i1.$TrashedLocalAssetEntityTable.$convertersource.toSql(source), - ); - } - { - map['playback_style'] = i0.Variable( - i1.$TrashedLocalAssetEntityTable.$converterplaybackStyle.toSql( - playbackStyle, - ), - ); - } - 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']), - durationMs: serializer.fromJson(json['durationMs']), - 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']), - source: i1.$TrashedLocalAssetEntityTable.$convertersource.fromJson( - serializer.fromJson(json['source']), - ), - playbackStyle: i1.$TrashedLocalAssetEntityTable.$converterplaybackStyle - .fromJson(serializer.fromJson(json['playbackStyle'])), - ); - } - @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), - 'durationMs': serializer.toJson(durationMs), - 'id': serializer.toJson(id), - 'albumId': serializer.toJson(albumId), - 'checksum': serializer.toJson(checksum), - 'isFavorite': serializer.toJson(isFavorite), - 'orientation': serializer.toJson(orientation), - 'source': serializer.toJson( - i1.$TrashedLocalAssetEntityTable.$convertersource.toJson(source), - ), - 'playbackStyle': serializer.toJson( - i1.$TrashedLocalAssetEntityTable.$converterplaybackStyle.toJson( - playbackStyle, - ), - ), - }; - } - - 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 durationMs = const i0.Value.absent(), - String? id, - String? albumId, - i0.Value checksum = const i0.Value.absent(), - bool? isFavorite, - int? orientation, - i3.TrashOrigin? source, - i2.AssetPlaybackStyle? playbackStyle, - }) => 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, - durationMs: durationMs.present ? durationMs.value : this.durationMs, - id: id ?? this.id, - albumId: albumId ?? this.albumId, - checksum: checksum.present ? checksum.value : this.checksum, - isFavorite: isFavorite ?? this.isFavorite, - orientation: orientation ?? this.orientation, - source: source ?? this.source, - playbackStyle: playbackStyle ?? this.playbackStyle, - ); - 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, - durationMs: data.durationMs.present - ? data.durationMs.value - : this.durationMs, - 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, - source: data.source.present ? data.source.value : this.source, - playbackStyle: data.playbackStyle.present - ? data.playbackStyle.value - : this.playbackStyle, - ); - } - - @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('durationMs: $durationMs, ') - ..write('id: $id, ') - ..write('albumId: $albumId, ') - ..write('checksum: $checksum, ') - ..write('isFavorite: $isFavorite, ') - ..write('orientation: $orientation, ') - ..write('source: $source, ') - ..write('playbackStyle: $playbackStyle') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - name, - type, - createdAt, - updatedAt, - width, - height, - durationMs, - id, - albumId, - checksum, - isFavorite, - orientation, - source, - playbackStyle, - ); - @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.durationMs == this.durationMs && - other.id == this.id && - other.albumId == this.albumId && - other.checksum == this.checksum && - other.isFavorite == this.isFavorite && - other.orientation == this.orientation && - other.source == this.source && - other.playbackStyle == this.playbackStyle); -} - -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 durationMs; - final i0.Value id; - final i0.Value albumId; - final i0.Value checksum; - final i0.Value isFavorite; - final i0.Value orientation; - final i0.Value source; - final i0.Value playbackStyle; - 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.durationMs = 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(), - this.source = const i0.Value.absent(), - this.playbackStyle = 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.durationMs = 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(), - required i3.TrashOrigin source, - this.playbackStyle = const i0.Value.absent(), - }) : name = i0.Value(name), - type = i0.Value(type), - id = i0.Value(id), - albumId = i0.Value(albumId), - source = i0.Value(source); - static i0.Insertable custom({ - i0.Expression? name, - i0.Expression? type, - i0.Expression? createdAt, - i0.Expression? updatedAt, - i0.Expression? width, - i0.Expression? height, - i0.Expression? durationMs, - i0.Expression? id, - i0.Expression? albumId, - i0.Expression? checksum, - i0.Expression? isFavorite, - i0.Expression? orientation, - i0.Expression? source, - i0.Expression? playbackStyle, - }) { - 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 (durationMs != null) 'duration_ms': durationMs, - 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, - if (source != null) 'source': source, - if (playbackStyle != null) 'playback_style': playbackStyle, - }); - } - - i1.TrashedLocalAssetEntityCompanion copyWith({ - i0.Value? name, - i0.Value? type, - i0.Value? createdAt, - i0.Value? updatedAt, - i0.Value? width, - i0.Value? height, - i0.Value? durationMs, - i0.Value? id, - i0.Value? albumId, - i0.Value? checksum, - i0.Value? isFavorite, - i0.Value? orientation, - i0.Value? source, - i0.Value? playbackStyle, - }) { - 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, - durationMs: durationMs ?? this.durationMs, - id: id ?? this.id, - albumId: albumId ?? this.albumId, - checksum: checksum ?? this.checksum, - isFavorite: isFavorite ?? this.isFavorite, - orientation: orientation ?? this.orientation, - source: source ?? this.source, - playbackStyle: playbackStyle ?? this.playbackStyle, - ); - } - - @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 (durationMs.present) { - map['duration_ms'] = i0.Variable(durationMs.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); - } - if (source.present) { - map['source'] = i0.Variable( - i1.$TrashedLocalAssetEntityTable.$convertersource.toSql(source.value), - ); - } - if (playbackStyle.present) { - map['playback_style'] = i0.Variable( - i1.$TrashedLocalAssetEntityTable.$converterplaybackStyle.toSql( - playbackStyle.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('durationMs: $durationMs, ') - ..write('id: $id, ') - ..write('albumId: $albumId, ') - ..write('checksum: $checksum, ') - ..write('isFavorite: $isFavorite, ') - ..write('orientation: $orientation, ') - ..write('source: $source, ') - ..write('playbackStyle: $playbackStyle') - ..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/entities/user.entity.drift.dart b/mobile/lib/infrastructure/entities/user.entity.drift.dart deleted file mode 100644 index 083c14a095..0000000000 --- a/mobile/lib/infrastructure/entities/user.entity.drift.dart +++ /dev/null @@ -1,655 +0,0 @@ -// dart format width=80 -// ignore_for_file: type=lint -import 'package:drift/drift.dart' as i0; -import 'package:immich_mobile/infrastructure/entities/user.entity.drift.dart' - as i1; -import 'package:immich_mobile/domain/models/user.model.dart' as i2; -import 'package:immich_mobile/infrastructure/entities/user.entity.dart' as i3; -import 'package:drift/src/runtime/query_builder/query_builder.dart' as i4; - -typedef $$UserEntityTableCreateCompanionBuilder = - i1.UserEntityCompanion Function({ - required String id, - required String name, - required String email, - i0.Value hasProfileImage, - i0.Value profileChangedAt, - i0.Value avatarColor, - }); -typedef $$UserEntityTableUpdateCompanionBuilder = - i1.UserEntityCompanion Function({ - i0.Value id, - i0.Value name, - i0.Value email, - i0.Value hasProfileImage, - i0.Value profileChangedAt, - i0.Value avatarColor, - }); - -class $$UserEntityTableFilterComposer - extends i0.Composer { - $$UserEntityTableFilterComposer({ - required super.$db, - required super.$table, - super.joinBuilder, - super.$addJoinBuilderToRootComposer, - super.$removeJoinBuilderFromRootComposer, - }); - i0.ColumnFilters get id => $composableBuilder( - column: $table.id, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnFilters get name => $composableBuilder( - column: $table.name, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnFilters get email => $composableBuilder( - column: $table.email, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnFilters get hasProfileImage => $composableBuilder( - column: $table.hasProfileImage, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnFilters get profileChangedAt => $composableBuilder( - column: $table.profileChangedAt, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnWithTypeConverterFilters - get avatarColor => $composableBuilder( - column: $table.avatarColor, - builder: (column) => i0.ColumnWithTypeConverterFilters(column), - ); -} - -class $$UserEntityTableOrderingComposer - extends i0.Composer { - $$UserEntityTableOrderingComposer({ - required super.$db, - required super.$table, - super.joinBuilder, - super.$addJoinBuilderToRootComposer, - super.$removeJoinBuilderFromRootComposer, - }); - i0.ColumnOrderings get id => $composableBuilder( - column: $table.id, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get name => $composableBuilder( - column: $table.name, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get email => $composableBuilder( - column: $table.email, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get hasProfileImage => $composableBuilder( - column: $table.hasProfileImage, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get profileChangedAt => $composableBuilder( - column: $table.profileChangedAt, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get avatarColor => $composableBuilder( - column: $table.avatarColor, - builder: (column) => i0.ColumnOrderings(column), - ); -} - -class $$UserEntityTableAnnotationComposer - extends i0.Composer { - $$UserEntityTableAnnotationComposer({ - required super.$db, - required super.$table, - super.joinBuilder, - super.$addJoinBuilderToRootComposer, - super.$removeJoinBuilderFromRootComposer, - }); - i0.GeneratedColumn get id => - $composableBuilder(column: $table.id, builder: (column) => column); - - i0.GeneratedColumn get name => - $composableBuilder(column: $table.name, builder: (column) => column); - - i0.GeneratedColumn get email => - $composableBuilder(column: $table.email, builder: (column) => column); - - i0.GeneratedColumn get hasProfileImage => $composableBuilder( - column: $table.hasProfileImage, - builder: (column) => column, - ); - - i0.GeneratedColumn get profileChangedAt => $composableBuilder( - column: $table.profileChangedAt, - builder: (column) => column, - ); - - i0.GeneratedColumnWithTypeConverter get avatarColor => - $composableBuilder( - column: $table.avatarColor, - builder: (column) => column, - ); -} - -class $$UserEntityTableTableManager - extends - i0.RootTableManager< - i0.GeneratedDatabase, - i1.$UserEntityTable, - i1.UserEntityData, - i1.$$UserEntityTableFilterComposer, - i1.$$UserEntityTableOrderingComposer, - i1.$$UserEntityTableAnnotationComposer, - $$UserEntityTableCreateCompanionBuilder, - $$UserEntityTableUpdateCompanionBuilder, - ( - i1.UserEntityData, - i0.BaseReferences< - i0.GeneratedDatabase, - i1.$UserEntityTable, - i1.UserEntityData - >, - ), - i1.UserEntityData, - i0.PrefetchHooks Function() - > { - $$UserEntityTableTableManager( - i0.GeneratedDatabase db, - i1.$UserEntityTable table, - ) : super( - i0.TableManagerState( - db: db, - table: table, - createFilteringComposer: () => - i1.$$UserEntityTableFilterComposer($db: db, $table: table), - createOrderingComposer: () => - i1.$$UserEntityTableOrderingComposer($db: db, $table: table), - createComputedFieldComposer: () => - i1.$$UserEntityTableAnnotationComposer($db: db, $table: table), - updateCompanionCallback: - ({ - i0.Value id = const i0.Value.absent(), - i0.Value name = const i0.Value.absent(), - i0.Value email = const i0.Value.absent(), - i0.Value hasProfileImage = const i0.Value.absent(), - i0.Value profileChangedAt = const i0.Value.absent(), - i0.Value avatarColor = const i0.Value.absent(), - }) => i1.UserEntityCompanion( - id: id, - name: name, - email: email, - hasProfileImage: hasProfileImage, - profileChangedAt: profileChangedAt, - avatarColor: avatarColor, - ), - createCompanionCallback: - ({ - required String id, - required String name, - required String email, - i0.Value hasProfileImage = const i0.Value.absent(), - i0.Value profileChangedAt = const i0.Value.absent(), - i0.Value avatarColor = const i0.Value.absent(), - }) => i1.UserEntityCompanion.insert( - id: id, - name: name, - email: email, - hasProfileImage: hasProfileImage, - profileChangedAt: profileChangedAt, - avatarColor: avatarColor, - ), - withReferenceMapper: (p0) => p0 - .map((e) => (e.readTable(table), i0.BaseReferences(db, table, e))) - .toList(), - prefetchHooksCallback: null, - ), - ); -} - -typedef $$UserEntityTableProcessedTableManager = - i0.ProcessedTableManager< - i0.GeneratedDatabase, - i1.$UserEntityTable, - i1.UserEntityData, - i1.$$UserEntityTableFilterComposer, - i1.$$UserEntityTableOrderingComposer, - i1.$$UserEntityTableAnnotationComposer, - $$UserEntityTableCreateCompanionBuilder, - $$UserEntityTableUpdateCompanionBuilder, - ( - i1.UserEntityData, - i0.BaseReferences< - i0.GeneratedDatabase, - i1.$UserEntityTable, - i1.UserEntityData - >, - ), - i1.UserEntityData, - i0.PrefetchHooks Function() - >; - -class $UserEntityTable extends i3.UserEntity - with i0.TableInfo<$UserEntityTable, i1.UserEntityData> { - @override - final i0.GeneratedDatabase attachedDatabase; - final String? _alias; - $UserEntityTable(this.attachedDatabase, [this._alias]); - 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 _nameMeta = const i0.VerificationMeta( - 'name', - ); - @override - late final i0.GeneratedColumn name = i0.GeneratedColumn( - 'name', - aliasedName, - false, - type: i0.DriftSqlType.string, - requiredDuringInsert: true, - ); - static const i0.VerificationMeta _emailMeta = const i0.VerificationMeta( - 'email', - ); - @override - late final i0.GeneratedColumn email = i0.GeneratedColumn( - 'email', - aliasedName, - false, - type: i0.DriftSqlType.string, - requiredDuringInsert: true, - ); - static const i0.VerificationMeta _hasProfileImageMeta = - const i0.VerificationMeta('hasProfileImage'); - @override - late final i0.GeneratedColumn hasProfileImage = - i0.GeneratedColumn( - 'has_profile_image', - aliasedName, - false, - type: i0.DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: i0.GeneratedColumn.constraintIsAlways( - 'CHECK ("has_profile_image" IN (0, 1))', - ), - defaultValue: const i4.Constant(false), - ); - static const i0.VerificationMeta _profileChangedAtMeta = - const i0.VerificationMeta('profileChangedAt'); - @override - late final i0.GeneratedColumn profileChangedAt = - i0.GeneratedColumn( - 'profile_changed_at', - aliasedName, - false, - type: i0.DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: i4.currentDateAndTime, - ); - @override - late final i0.GeneratedColumnWithTypeConverter - avatarColor = i0.GeneratedColumn( - 'avatar_color', - aliasedName, - false, - type: i0.DriftSqlType.int, - requiredDuringInsert: false, - defaultValue: const i4.Constant(0), - ).withConverter(i1.$UserEntityTable.$converteravatarColor); - @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 - i0.VerificationContext validateIntegrity( - i0.Insertable instance, { - bool isInserting = false, - }) { - final context = i0.VerificationContext(); - final data = instance.toColumns(true); - if (data.containsKey('id')) { - context.handle(_idMeta, id.isAcceptableOrUnknown(data['id']!, _idMeta)); - } else if (isInserting) { - context.missing(_idMeta); - } - if (data.containsKey('name')) { - context.handle( - _nameMeta, - name.isAcceptableOrUnknown(data['name']!, _nameMeta), - ); - } else if (isInserting) { - context.missing(_nameMeta); - } - if (data.containsKey('email')) { - context.handle( - _emailMeta, - email.isAcceptableOrUnknown(data['email']!, _emailMeta), - ); - } else if (isInserting) { - context.missing(_emailMeta); - } - if (data.containsKey('has_profile_image')) { - context.handle( - _hasProfileImageMeta, - hasProfileImage.isAcceptableOrUnknown( - data['has_profile_image']!, - _hasProfileImageMeta, - ), - ); - } - if (data.containsKey('profile_changed_at')) { - context.handle( - _profileChangedAtMeta, - profileChangedAt.isAcceptableOrUnknown( - data['profile_changed_at']!, - _profileChangedAtMeta, - ), - ); - } - return context; - } - - @override - Set get $primaryKey => {id}; - @override - i1.UserEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return i1.UserEntityData( - id: attachedDatabase.typeMapping.read( - i0.DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - name: attachedDatabase.typeMapping.read( - i0.DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - email: attachedDatabase.typeMapping.read( - i0.DriftSqlType.string, - data['${effectivePrefix}email'], - )!, - hasProfileImage: attachedDatabase.typeMapping.read( - i0.DriftSqlType.bool, - data['${effectivePrefix}has_profile_image'], - )!, - profileChangedAt: attachedDatabase.typeMapping.read( - i0.DriftSqlType.dateTime, - data['${effectivePrefix}profile_changed_at'], - )!, - avatarColor: i1.$UserEntityTable.$converteravatarColor.fromSql( - attachedDatabase.typeMapping.read( - i0.DriftSqlType.int, - data['${effectivePrefix}avatar_color'], - )!, - ), - ); - } - - @override - $UserEntityTable createAlias(String alias) { - return $UserEntityTable(attachedDatabase, alias); - } - - static i0.JsonTypeConverter2 $converteravatarColor = - const i0.EnumIndexConverter(i2.AvatarColor.values); - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class UserEntityData extends i0.DataClass - implements i0.Insertable { - final String id; - final String name; - final String email; - final bool hasProfileImage; - final DateTime profileChangedAt; - final i2.AvatarColor 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'] = i0.Variable(id); - map['name'] = i0.Variable(name); - map['email'] = i0.Variable(email); - map['has_profile_image'] = i0.Variable(hasProfileImage); - map['profile_changed_at'] = i0.Variable(profileChangedAt); - { - map['avatar_color'] = i0.Variable( - i1.$UserEntityTable.$converteravatarColor.toSql(avatarColor), - ); - } - return map; - } - - factory UserEntityData.fromJson( - Map json, { - i0.ValueSerializer? serializer, - }) { - serializer ??= i0.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: i1.$UserEntityTable.$converteravatarColor.fromJson( - serializer.fromJson(json['avatarColor']), - ), - ); - } - @override - Map toJson({i0.ValueSerializer? serializer}) { - serializer ??= i0.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( - i1.$UserEntityTable.$converteravatarColor.toJson(avatarColor), - ), - }; - } - - i1.UserEntityData copyWith({ - String? id, - String? name, - String? email, - bool? hasProfileImage, - DateTime? profileChangedAt, - i2.AvatarColor? avatarColor, - }) => i1.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(i1.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 i1.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 i0.UpdateCompanion { - final i0.Value id; - final i0.Value name; - final i0.Value email; - final i0.Value hasProfileImage; - final i0.Value profileChangedAt; - final i0.Value avatarColor; - const UserEntityCompanion({ - this.id = const i0.Value.absent(), - this.name = const i0.Value.absent(), - this.email = const i0.Value.absent(), - this.hasProfileImage = const i0.Value.absent(), - this.profileChangedAt = const i0.Value.absent(), - this.avatarColor = const i0.Value.absent(), - }); - UserEntityCompanion.insert({ - required String id, - required String name, - required String email, - this.hasProfileImage = const i0.Value.absent(), - this.profileChangedAt = const i0.Value.absent(), - this.avatarColor = const i0.Value.absent(), - }) : id = i0.Value(id), - name = i0.Value(name), - email = i0.Value(email); - static i0.Insertable custom({ - i0.Expression? id, - i0.Expression? name, - i0.Expression? email, - i0.Expression? hasProfileImage, - i0.Expression? profileChangedAt, - i0.Expression? avatarColor, - }) { - return i0.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, - }); - } - - i1.UserEntityCompanion copyWith({ - i0.Value? id, - i0.Value? name, - i0.Value? email, - i0.Value? hasProfileImage, - i0.Value? profileChangedAt, - i0.Value? avatarColor, - }) { - return i1.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'] = i0.Variable(id.value); - } - if (name.present) { - map['name'] = i0.Variable(name.value); - } - if (email.present) { - map['email'] = i0.Variable(email.value); - } - if (hasProfileImage.present) { - map['has_profile_image'] = i0.Variable(hasProfileImage.value); - } - if (profileChangedAt.present) { - map['profile_changed_at'] = i0.Variable(profileChangedAt.value); - } - if (avatarColor.present) { - map['avatar_color'] = i0.Variable( - i1.$UserEntityTable.$converteravatarColor.toSql(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(); - } -} diff --git a/mobile/lib/infrastructure/entities/user_metadata.entity.dart b/mobile/lib/infrastructure/entities/user_metadata.entity.dart index ede3de3966..da2070fd71 100644 --- a/mobile/lib/infrastructure/entities/user_metadata.entity.dart +++ b/mobile/lib/infrastructure/entities/user_metadata.entity.dart @@ -17,5 +17,5 @@ class UserMetadataEntity extends Table with DriftDefaultsMixin { } final JsonTypeConverter2, Uint8List, Object?> userMetadataConverter = TypeConverter.jsonb( - fromJson: (json) => json as Map, + fromJson: (json) => json! as Map, ); diff --git a/mobile/lib/infrastructure/entities/user_metadata.entity.drift.dart b/mobile/lib/infrastructure/entities/user_metadata.entity.drift.dart deleted file mode 100644 index 1e9dc8a890..0000000000 --- a/mobile/lib/infrastructure/entities/user_metadata.entity.drift.dart +++ /dev/null @@ -1,624 +0,0 @@ -// dart format width=80 -// ignore_for_file: type=lint -import 'package:drift/drift.dart' as i0; -import 'package:immich_mobile/infrastructure/entities/user_metadata.entity.drift.dart' - as i1; -import 'package:immich_mobile/domain/models/user_metadata.model.dart' as i2; -import 'dart:typed_data' as i3; -import 'package:immich_mobile/infrastructure/entities/user_metadata.entity.dart' - as i4; -import 'package:immich_mobile/infrastructure/entities/user.entity.drift.dart' - as i5; -import 'package:drift/internal/modular.dart' as i6; - -typedef $$UserMetadataEntityTableCreateCompanionBuilder = - i1.UserMetadataEntityCompanion Function({ - required String userId, - required i2.UserMetadataKey key, - required Map value, - }); -typedef $$UserMetadataEntityTableUpdateCompanionBuilder = - i1.UserMetadataEntityCompanion Function({ - i0.Value userId, - i0.Value key, - i0.Value> value, - }); - -final class $$UserMetadataEntityTableReferences - extends - i0.BaseReferences< - i0.GeneratedDatabase, - i1.$UserMetadataEntityTable, - i1.UserMetadataEntityData - > { - $$UserMetadataEntityTableReferences( - super.$_db, - super.$_table, - super.$_typedResult, - ); - - static i5.$UserEntityTable _userIdTable(i0.GeneratedDatabase db) => - i6.ReadDatabaseContainer(db) - .resultSet('user_entity') - .createAlias( - i0.$_aliasNameGenerator( - i6.ReadDatabaseContainer(db) - .resultSet( - 'user_metadata_entity', - ) - .userId, - i6.ReadDatabaseContainer( - db, - ).resultSet('user_entity').id, - ), - ); - - i5.$$UserEntityTableProcessedTableManager get userId { - final $_column = $_itemColumn('user_id')!; - - final manager = i5 - .$$UserEntityTableTableManager( - $_db, - i6.ReadDatabaseContainer( - $_db, - ).resultSet('user_entity'), - ) - .filter((f) => f.id.sqlEquals($_column)); - final item = $_typedResult.readTableOrNull(_userIdTable($_db)); - if (item == null) return manager; - return i0.ProcessedTableManager( - manager.$state.copyWith(prefetchedData: [item]), - ); - } -} - -class $$UserMetadataEntityTableFilterComposer - extends i0.Composer { - $$UserMetadataEntityTableFilterComposer({ - required super.$db, - required super.$table, - super.joinBuilder, - super.$addJoinBuilderToRootComposer, - super.$removeJoinBuilderFromRootComposer, - }); - i0.ColumnWithTypeConverterFilters - get key => $composableBuilder( - column: $table.key, - builder: (column) => i0.ColumnWithTypeConverterFilters(column), - ); - - i0.ColumnWithTypeConverterFilters< - Map, - Map, - i3.Uint8List - > - get value => $composableBuilder( - column: $table.value, - builder: (column) => i0.ColumnWithTypeConverterFilters(column), - ); - - i5.$$UserEntityTableFilterComposer get userId { - final i5.$$UserEntityTableFilterComposer composer = $composerBuilder( - composer: this, - getCurrentColumn: (t) => t.userId, - referencedTable: i6.ReadDatabaseContainer( - $db, - ).resultSet('user_entity'), - getReferencedColumn: (t) => t.id, - builder: - ( - joinBuilder, { - $addJoinBuilderToRootComposer, - $removeJoinBuilderFromRootComposer, - }) => i5.$$UserEntityTableFilterComposer( - $db: $db, - $table: i6.ReadDatabaseContainer( - $db, - ).resultSet('user_entity'), - $addJoinBuilderToRootComposer: $addJoinBuilderToRootComposer, - joinBuilder: joinBuilder, - $removeJoinBuilderFromRootComposer: - $removeJoinBuilderFromRootComposer, - ), - ); - return composer; - } -} - -class $$UserMetadataEntityTableOrderingComposer - extends i0.Composer { - $$UserMetadataEntityTableOrderingComposer({ - required super.$db, - required super.$table, - super.joinBuilder, - super.$addJoinBuilderToRootComposer, - super.$removeJoinBuilderFromRootComposer, - }); - i0.ColumnOrderings get key => $composableBuilder( - column: $table.key, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get value => $composableBuilder( - column: $table.value, - builder: (column) => i0.ColumnOrderings(column), - ); - - i5.$$UserEntityTableOrderingComposer get userId { - final i5.$$UserEntityTableOrderingComposer composer = $composerBuilder( - composer: this, - getCurrentColumn: (t) => t.userId, - referencedTable: i6.ReadDatabaseContainer( - $db, - ).resultSet('user_entity'), - getReferencedColumn: (t) => t.id, - builder: - ( - joinBuilder, { - $addJoinBuilderToRootComposer, - $removeJoinBuilderFromRootComposer, - }) => i5.$$UserEntityTableOrderingComposer( - $db: $db, - $table: i6.ReadDatabaseContainer( - $db, - ).resultSet('user_entity'), - $addJoinBuilderToRootComposer: $addJoinBuilderToRootComposer, - joinBuilder: joinBuilder, - $removeJoinBuilderFromRootComposer: - $removeJoinBuilderFromRootComposer, - ), - ); - return composer; - } -} - -class $$UserMetadataEntityTableAnnotationComposer - extends i0.Composer { - $$UserMetadataEntityTableAnnotationComposer({ - required super.$db, - required super.$table, - super.joinBuilder, - super.$addJoinBuilderToRootComposer, - super.$removeJoinBuilderFromRootComposer, - }); - i0.GeneratedColumnWithTypeConverter get key => - $composableBuilder(column: $table.key, builder: (column) => column); - - i0.GeneratedColumnWithTypeConverter, i3.Uint8List> - get value => - $composableBuilder(column: $table.value, builder: (column) => column); - - i5.$$UserEntityTableAnnotationComposer get userId { - final i5.$$UserEntityTableAnnotationComposer composer = $composerBuilder( - composer: this, - getCurrentColumn: (t) => t.userId, - referencedTable: i6.ReadDatabaseContainer( - $db, - ).resultSet('user_entity'), - getReferencedColumn: (t) => t.id, - builder: - ( - joinBuilder, { - $addJoinBuilderToRootComposer, - $removeJoinBuilderFromRootComposer, - }) => i5.$$UserEntityTableAnnotationComposer( - $db: $db, - $table: i6.ReadDatabaseContainer( - $db, - ).resultSet('user_entity'), - $addJoinBuilderToRootComposer: $addJoinBuilderToRootComposer, - joinBuilder: joinBuilder, - $removeJoinBuilderFromRootComposer: - $removeJoinBuilderFromRootComposer, - ), - ); - return composer; - } -} - -class $$UserMetadataEntityTableTableManager - extends - i0.RootTableManager< - i0.GeneratedDatabase, - i1.$UserMetadataEntityTable, - i1.UserMetadataEntityData, - i1.$$UserMetadataEntityTableFilterComposer, - i1.$$UserMetadataEntityTableOrderingComposer, - i1.$$UserMetadataEntityTableAnnotationComposer, - $$UserMetadataEntityTableCreateCompanionBuilder, - $$UserMetadataEntityTableUpdateCompanionBuilder, - (i1.UserMetadataEntityData, i1.$$UserMetadataEntityTableReferences), - i1.UserMetadataEntityData, - i0.PrefetchHooks Function({bool userId}) - > { - $$UserMetadataEntityTableTableManager( - i0.GeneratedDatabase db, - i1.$UserMetadataEntityTable table, - ) : super( - i0.TableManagerState( - db: db, - table: table, - createFilteringComposer: () => i1 - .$$UserMetadataEntityTableFilterComposer($db: db, $table: table), - createOrderingComposer: () => - i1.$$UserMetadataEntityTableOrderingComposer( - $db: db, - $table: table, - ), - createComputedFieldComposer: () => - i1.$$UserMetadataEntityTableAnnotationComposer( - $db: db, - $table: table, - ), - updateCompanionCallback: - ({ - i0.Value userId = const i0.Value.absent(), - i0.Value key = const i0.Value.absent(), - i0.Value> value = const i0.Value.absent(), - }) => i1.UserMetadataEntityCompanion( - userId: userId, - key: key, - value: value, - ), - createCompanionCallback: - ({ - required String userId, - required i2.UserMetadataKey key, - required Map value, - }) => i1.UserMetadataEntityCompanion.insert( - userId: userId, - key: key, - value: value, - ), - withReferenceMapper: (p0) => p0 - .map( - (e) => ( - e.readTable(table), - i1.$$UserMetadataEntityTableReferences(db, table, e), - ), - ) - .toList(), - prefetchHooksCallback: ({userId = false}) { - return i0.PrefetchHooks( - db: db, - explicitlyWatchedTables: [], - addJoins: - < - T extends i0.TableManagerState< - dynamic, - dynamic, - dynamic, - dynamic, - dynamic, - dynamic, - dynamic, - dynamic, - dynamic, - dynamic, - dynamic - > - >(state) { - if (userId) { - state = - state.withJoin( - currentTable: table, - currentColumn: table.userId, - referencedTable: i1 - .$$UserMetadataEntityTableReferences - ._userIdTable(db), - referencedColumn: i1 - .$$UserMetadataEntityTableReferences - ._userIdTable(db) - .id, - ) - as T; - } - - return state; - }, - getPrefetchedDataCallback: (items) async { - return []; - }, - ); - }, - ), - ); -} - -typedef $$UserMetadataEntityTableProcessedTableManager = - i0.ProcessedTableManager< - i0.GeneratedDatabase, - i1.$UserMetadataEntityTable, - i1.UserMetadataEntityData, - i1.$$UserMetadataEntityTableFilterComposer, - i1.$$UserMetadataEntityTableOrderingComposer, - i1.$$UserMetadataEntityTableAnnotationComposer, - $$UserMetadataEntityTableCreateCompanionBuilder, - $$UserMetadataEntityTableUpdateCompanionBuilder, - (i1.UserMetadataEntityData, i1.$$UserMetadataEntityTableReferences), - i1.UserMetadataEntityData, - i0.PrefetchHooks Function({bool userId}) - >; - -class $UserMetadataEntityTable extends i4.UserMetadataEntity - with i0.TableInfo<$UserMetadataEntityTable, i1.UserMetadataEntityData> { - @override - final i0.GeneratedDatabase attachedDatabase; - final String? _alias; - $UserMetadataEntityTable(this.attachedDatabase, [this._alias]); - static const i0.VerificationMeta _userIdMeta = const i0.VerificationMeta( - 'userId', - ); - @override - late final i0.GeneratedColumn userId = i0.GeneratedColumn( - 'user_id', - aliasedName, - false, - type: i0.DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: i0.GeneratedColumn.constraintIsAlways( - 'REFERENCES user_entity (id) ON DELETE CASCADE', - ), - ); - @override - late final i0.GeneratedColumnWithTypeConverter key = - i0.GeneratedColumn( - 'key', - aliasedName, - false, - type: i0.DriftSqlType.int, - requiredDuringInsert: true, - ).withConverter( - i1.$UserMetadataEntityTable.$converterkey, - ); - @override - late final i0.GeneratedColumnWithTypeConverter< - Map, - i3.Uint8List - > - value = - i0.GeneratedColumn( - 'value', - aliasedName, - false, - type: i0.DriftSqlType.blob, - requiredDuringInsert: true, - ).withConverter>( - i1.$UserMetadataEntityTable.$convertervalue, - ); - @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 - i0.VerificationContext validateIntegrity( - i0.Insertable instance, { - bool isInserting = false, - }) { - final context = i0.VerificationContext(); - final data = instance.toColumns(true); - if (data.containsKey('user_id')) { - context.handle( - _userIdMeta, - userId.isAcceptableOrUnknown(data['user_id']!, _userIdMeta), - ); - } else if (isInserting) { - context.missing(_userIdMeta); - } - return context; - } - - @override - Set get $primaryKey => {userId, key}; - @override - i1.UserMetadataEntityData map( - Map data, { - String? tablePrefix, - }) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return i1.UserMetadataEntityData( - userId: attachedDatabase.typeMapping.read( - i0.DriftSqlType.string, - data['${effectivePrefix}user_id'], - )!, - key: i1.$UserMetadataEntityTable.$converterkey.fromSql( - attachedDatabase.typeMapping.read( - i0.DriftSqlType.int, - data['${effectivePrefix}key'], - )!, - ), - value: i1.$UserMetadataEntityTable.$convertervalue.fromSql( - attachedDatabase.typeMapping.read( - i0.DriftSqlType.blob, - data['${effectivePrefix}value'], - )!, - ), - ); - } - - @override - $UserMetadataEntityTable createAlias(String alias) { - return $UserMetadataEntityTable(attachedDatabase, alias); - } - - static i0.JsonTypeConverter2 $converterkey = - const i0.EnumIndexConverter( - i2.UserMetadataKey.values, - ); - static i0.JsonTypeConverter2, i3.Uint8List, Object?> - $convertervalue = i4.userMetadataConverter; - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class UserMetadataEntityData extends i0.DataClass - implements i0.Insertable { - final String userId; - final i2.UserMetadataKey key; - final Map value; - const UserMetadataEntityData({ - required this.userId, - required this.key, - required this.value, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['user_id'] = i0.Variable(userId); - { - map['key'] = i0.Variable( - i1.$UserMetadataEntityTable.$converterkey.toSql(key), - ); - } - { - map['value'] = i0.Variable( - i1.$UserMetadataEntityTable.$convertervalue.toSql(value), - ); - } - return map; - } - - factory UserMetadataEntityData.fromJson( - Map json, { - i0.ValueSerializer? serializer, - }) { - serializer ??= i0.driftRuntimeOptions.defaultSerializer; - return UserMetadataEntityData( - userId: serializer.fromJson(json['userId']), - key: i1.$UserMetadataEntityTable.$converterkey.fromJson( - serializer.fromJson(json['key']), - ), - value: i1.$UserMetadataEntityTable.$convertervalue.fromJson( - serializer.fromJson(json['value']), - ), - ); - } - @override - Map toJson({i0.ValueSerializer? serializer}) { - serializer ??= i0.driftRuntimeOptions.defaultSerializer; - return { - 'userId': serializer.toJson(userId), - 'key': serializer.toJson( - i1.$UserMetadataEntityTable.$converterkey.toJson(key), - ), - 'value': serializer.toJson( - i1.$UserMetadataEntityTable.$convertervalue.toJson(value), - ), - }; - } - - i1.UserMetadataEntityData copyWith({ - String? userId, - i2.UserMetadataKey? key, - Map? value, - }) => i1.UserMetadataEntityData( - userId: userId ?? this.userId, - key: key ?? this.key, - value: value ?? this.value, - ); - UserMetadataEntityData copyWithCompanion( - i1.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, value); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is i1.UserMetadataEntityData && - other.userId == this.userId && - other.key == this.key && - other.value == this.value); -} - -class UserMetadataEntityCompanion - extends i0.UpdateCompanion { - final i0.Value userId; - final i0.Value key; - final i0.Value> value; - const UserMetadataEntityCompanion({ - this.userId = const i0.Value.absent(), - this.key = const i0.Value.absent(), - this.value = const i0.Value.absent(), - }); - UserMetadataEntityCompanion.insert({ - required String userId, - required i2.UserMetadataKey key, - required Map value, - }) : userId = i0.Value(userId), - key = i0.Value(key), - value = i0.Value(value); - static i0.Insertable custom({ - i0.Expression? userId, - i0.Expression? key, - i0.Expression? value, - }) { - return i0.RawValuesInsertable({ - if (userId != null) 'user_id': userId, - if (key != null) 'key': key, - if (value != null) 'value': value, - }); - } - - i1.UserMetadataEntityCompanion copyWith({ - i0.Value? userId, - i0.Value? key, - i0.Value>? value, - }) { - return i1.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'] = i0.Variable(userId.value); - } - if (key.present) { - map['key'] = i0.Variable( - i1.$UserMetadataEntityTable.$converterkey.toSql(key.value), - ); - } - if (value.present) { - map['value'] = i0.Variable( - i1.$UserMetadataEntityTable.$convertervalue.toSql(value.value), - ); - } - return map; - } - - @override - String toString() { - return (StringBuffer('UserMetadataEntityCompanion(') - ..write('userId: $userId, ') - ..write('key: $key, ') - ..write('value: $value') - ..write(')')) - .toString(); - } -} diff --git a/mobile/lib/infrastructure/loaders/image_request.dart b/mobile/lib/infrastructure/loaders/image_request.dart index d0f3679084..6b2be218dc 100644 --- a/mobile/lib/infrastructure/loaders/image_request.dart +++ b/mobile/lib/infrastructure/loaders/image_request.dart @@ -1,5 +1,6 @@ import 'dart:async'; import 'dart:ffi'; +import 'dart:math' as math; import 'dart:ui' as ui; import 'package:ffi/ffi.dart'; @@ -18,7 +19,7 @@ abstract class ImageRequest { final int requestId = _nextRequestId++; bool _isCancelled = false; - get isCancelled => _isCancelled; + bool get isCancelled => _isCancelled; ImageRequest(); @@ -36,7 +37,11 @@ abstract class ImageRequest { void _onCancelled(); - Future<(ui.Codec, ui.ImageDescriptor)?> _codecFromEncodedPlatformImage(int address, int length) async { + Future<(ui.Codec, ui.ImageDescriptor)?> _codecFromEncodedPlatformImage( + int address, + int length, { + ui.Size? decodeSize, + }) async { final pointer = Pointer.fromAddress(address); if (_isCancelled) { malloc.free(pointer); @@ -62,7 +67,8 @@ abstract class ImageRequest { return null; } - final codec = await descriptor.instantiateCodec(); + final target = _targetSize(descriptor.width, descriptor.height, decodeSize); + final codec = await descriptor.instantiateCodec(targetWidth: target?.$1, targetHeight: target?.$2); if (_isCancelled) { descriptor.dispose(); codec.dispose(); @@ -72,8 +78,8 @@ abstract class ImageRequest { return (codec, descriptor); } - Future _fromEncodedPlatformImage(int address, int length) async { - final result = await _codecFromEncodedPlatformImage(address, length); + Future _fromEncodedPlatformImage(int address, int length, {ui.Size? decodeSize}) async { + final result = await _codecFromEncodedPlatformImage(address, length, decodeSize: decodeSize); if (result == null) { return null; } @@ -96,6 +102,19 @@ abstract class ImageRequest { return frame; } + (int, int)? _targetSize(int width, int height, ui.Size? decodeSize) { + if (width <= 0 || height <= 0 || decodeSize == null || decodeSize.width <= 0 || decodeSize.height <= 0) { + return null; + } + + final scale = math.max(decodeSize.width / width, decodeSize.height / height); + if (scale >= 1) { + return null; + } + + return ((width * scale).ceil(), (height * scale).ceil()); + } + Future _fromDecodedPlatformImage(int address, int width, int height, int rowBytes) async { final pointer = Pointer.fromAddress(address); if (_isCancelled) { diff --git a/mobile/lib/infrastructure/loaders/remote_image_request.dart b/mobile/lib/infrastructure/loaders/remote_image_request.dart index da135f44d4..7b504697ac 100644 --- a/mobile/lib/infrastructure/loaders/remote_image_request.dart +++ b/mobile/lib/infrastructure/loaders/remote_image_request.dart @@ -3,7 +3,10 @@ part of 'image_request.dart'; class RemoteImageRequest extends ImageRequest { final String uri; - RemoteImageRequest({required this.uri}); + /// Physical size to decode, or null for the source size. + final ui.Size? decodeSize; + + RemoteImageRequest({required this.uri, this.decodeSize}); @override Future load(ImageDecoderCallback decode, {double scale = 1.0}) async { @@ -11,11 +14,26 @@ class RemoteImageRequest extends ImageRequest { return null; } - final info = await remoteImageApi.requestImage(uri, requestId: requestId, preferEncoded: false); - // Android always returns encoded data, so we need to check for both shapes of the response. + final info = await remoteImageApi.requestImage( + uri, + requestId: requestId, + preferEncoded: false, + width: decodeSize?.width.ceil(), + height: decodeSize?.height.ceil(), + ); + // Android falls back to encoded data if native decoding fails, so check for both shapes of the response. final frame = switch (info) { - {'pointer': int pointer, 'length': int length} => await _fromEncodedPlatformImage(pointer, length), - {'pointer': int pointer, 'width': int width, 'height': int height, 'rowBytes': int rowBytes} => + {'pointer': final int pointer, 'length': final int length} => await _fromEncodedPlatformImage( + pointer, + length, + decodeSize: decodeSize, + ), + { + 'pointer': final int pointer, + 'width': final int width, + 'height': final int height, + 'rowBytes': final int rowBytes, + } => await _fromDecodedPlatformImage(pointer, width, height, rowBytes), _ => null, }; @@ -28,7 +46,13 @@ class RemoteImageRequest extends ImageRequest { return null; } - final info = await remoteImageApi.requestImage(uri, requestId: requestId, preferEncoded: true); + final info = await remoteImageApi.requestImage( + uri, + requestId: requestId, + preferEncoded: true, + width: null, + height: null, + ); if (info == null) { return null; } diff --git a/mobile/lib/infrastructure/repositories/backup.repository.dart b/mobile/lib/infrastructure/repositories/backup.repository.dart index 0241711d4b..eb3cba95d0 100644 --- a/mobile/lib/infrastructure/repositories/backup.repository.dart +++ b/mobile/lib/infrastructure/repositories/backup.repository.dart @@ -4,6 +4,7 @@ import 'package:drift/drift.dart'; import 'package:hooks_riverpod/hooks_riverpod.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_asset.entity.drift.dart'; import 'package:immich_mobile/infrastructure/entities/local_asset.entity.dart'; import 'package:immich_mobile/infrastructure/repositories/db.repository.dart'; import 'package:immich_mobile/providers/infrastructure/db.provider.dart'; @@ -16,7 +17,7 @@ class DriftBackupRepository extends DriftDatabaseRepository { final Drift _db; const DriftBackupRepository(this._db) : super(_db); - _getExcludedSubquery() { + JoinedSelectStatement<$LocalAlbumAssetEntityTable, LocalAlbumAssetEntityData> _getExcludedSubquery() { return _db.localAlbumAssetEntity.selectOnly() ..addColumns([_db.localAlbumAssetEntity.assetId]) ..join([ diff --git a/mobile/lib/infrastructure/repositories/cached_key_value_repository.dart b/mobile/lib/infrastructure/repositories/cached_key_value_repository.dart new file mode 100644 index 0000000000..afeb31fa27 --- /dev/null +++ b/mobile/lib/infrastructure/repositories/cached_key_value_repository.dart @@ -0,0 +1,41 @@ +import 'package:collection/collection.dart'; +import 'package:drift/drift.dart'; +// ignore: depend_on_referenced_packages +import 'package:meta/meta.dart'; + +abstract class CachedKeyValueRepository { + CachedKeyValueRepository(this._snapshot); + + S _snapshot; + S get snapshot => _snapshot; + @protected + set snapshot(S value) => _snapshot = value; + + List get keys; + + Object decodeValue(K key, String raw); + + S buildSnapshot(Map overrides); + + Selectable<({String key, String? value})> selectable(); + + Future refresh() async => _snapshot = _build(await selectable().get()); + + Stream watchSnapshot() => selectable().watch().map((rows) => _snapshot = _build(rows)); + + S _build(List<({String key, String? value})> rows) => buildSnapshot( + rows.fold({}, (overrides, row) { + final key = keys.firstWhereOrNull((key) => key.name == row.key); + if (key == null) { + return overrides; + } + + Object? decodedValue; + if (row.value != null) { + decodedValue = decodeValue(key, row.value!); + } + + return {...overrides, key: decodedValue}; + }), + ); +} diff --git a/mobile/lib/infrastructure/repositories/db.repository.dart b/mobile/lib/infrastructure/repositories/db.repository.dart index d39706b512..69e45685de 100644 --- a/mobile/lib/infrastructure/repositories/db.repository.dart +++ b/mobile/lib/infrastructure/repositories/db.repository.dart @@ -120,7 +120,7 @@ class Drift extends $Drift { } @override - int get schemaVersion => 30; + int get schemaVersion => 31; @override MigrationStrategy get migration => MigrationStrategy( @@ -128,199 +128,209 @@ class Drift extends $Drift { // Run migration steps without foreign keys and re-enable them later await customStatement('PRAGMA foreign_keys = OFF'); - await m.runMigrationSteps( - from: from, - to: to, - steps: migrationSteps( - from1To2: (m, v2) async { - for (final entity in v2.entities) { - await m.drop(entity); - await m.create(entity); - } - }, - from2To3: (m, v3) async { - // Removed foreign key constraint on stack.primaryAssetId - await m.alterTable(TableMigration(v3.stackEntity)); - }, - from3To4: (m, v4) async { - // Thumbnail path column got removed from person_entity - await m.alterTable(TableMigration(v4.personEntity)); - // asset_face_entity is added - await m.create(v4.assetFaceEntity); - }, - from4To5: (m, v5) async { - await m.alterTable( - TableMigration( - v5.userEntity, - newColumns: [v5.userEntity.hasProfileImage, v5.userEntity.profileChangedAt], - columnTransformer: {v5.userEntity.profileChangedAt: currentDateAndTime}, - ), - ); - }, - from5To6: (m, v6) async { - // Drops the (checksum, ownerId) and adds it back as (ownerId, checksum) - await customStatement('DROP INDEX IF EXISTS UQ_remote_asset_owner_checksum'); - await m.drop(v6.idxRemoteAssetOwnerChecksum); - await m.create(v6.idxRemoteAssetOwnerChecksum); - // Adds libraryId to remote_asset_entity - await m.addColumn(v6.remoteAssetEntity, v6.remoteAssetEntity.libraryId); - await m.drop(v6.uQRemoteAssetsOwnerChecksum); - await m.create(v6.uQRemoteAssetsOwnerChecksum); - await m.drop(v6.uQRemoteAssetsOwnerLibraryChecksum); - await m.create(v6.uQRemoteAssetsOwnerLibraryChecksum); - }, - from6To7: (m, v7) async { - await m.createIndex(v7.idxLatLng); - }, - from7To8: (m, v8) async { - await m.create(v8.storeEntity); - }, - from8To9: (m, v9) async { - await m.addColumn(v9.localAlbumEntity, v9.localAlbumEntity.linkedRemoteAlbumId); - }, - from9To10: (m, v10) async { - await m.createTable(v10.authUserEntity); - await m.addColumn(v10.userEntity, v10.userEntity.avatarColor); - await m.alterTable(TableMigration(v10.userEntity)); - }, - from10To11: (m, v11) async { - await m.addColumn(v11.localAlbumAssetEntity, v11.localAlbumAssetEntity.marker_); - }, - from11To12: (m, v12) async { - final localToUTCMapping = { - v12.localAssetEntity: [v12.localAssetEntity.createdAt, v12.localAssetEntity.updatedAt], - v12.localAlbumEntity: [v12.localAlbumEntity.updatedAt], - }; + try { + await transaction( + () => m.runMigrationSteps( + from: from, + to: to, + steps: migrationSteps( + from1To2: (m, v2) async { + for (final entity in v2.entities) { + await m.drop(entity); + await m.create(entity); + } + }, + from2To3: (m, v3) async { + // Removed foreign key constraint on stack.primaryAssetId + await m.alterTable(TableMigration(v3.stackEntity)); + }, + from3To4: (m, v4) async { + // Thumbnail path column got removed from person_entity + await m.alterTable(TableMigration(v4.personEntity)); + // asset_face_entity is added + await m.create(v4.assetFaceEntity); + }, + from4To5: (m, v5) async { + await m.alterTable( + TableMigration( + v5.userEntity, + newColumns: [v5.userEntity.hasProfileImage, v5.userEntity.profileChangedAt], + columnTransformer: {v5.userEntity.profileChangedAt: currentDateAndTime}, + ), + ); + }, + from5To6: (m, v6) async { + // Drops the (checksum, ownerId) and adds it back as (ownerId, checksum) + await customStatement('DROP INDEX IF EXISTS UQ_remote_asset_owner_checksum'); + await m.drop(v6.idxRemoteAssetOwnerChecksum); + await m.create(v6.idxRemoteAssetOwnerChecksum); + // Adds libraryId to remote_asset_entity + await m.addColumn(v6.remoteAssetEntity, v6.remoteAssetEntity.libraryId); + await m.drop(v6.uQRemoteAssetsOwnerChecksum); + await m.create(v6.uQRemoteAssetsOwnerChecksum); + await m.drop(v6.uQRemoteAssetsOwnerLibraryChecksum); + await m.create(v6.uQRemoteAssetsOwnerLibraryChecksum); + }, + from6To7: (m, v7) async { + await m.createIndex(v7.idxLatLng); + }, + from7To8: (m, v8) async { + await m.create(v8.storeEntity); + }, + from8To9: (m, v9) async { + await m.addColumn(v9.localAlbumEntity, v9.localAlbumEntity.linkedRemoteAlbumId); + }, + from9To10: (m, v10) async { + await m.createTable(v10.authUserEntity); + await m.addColumn(v10.userEntity, v10.userEntity.avatarColor); + await m.alterTable(TableMigration(v10.userEntity)); + }, + from10To11: (m, v11) async { + await m.addColumn(v11.localAlbumAssetEntity, v11.localAlbumAssetEntity.marker_); + }, + from11To12: (m, v12) async { + final localToUTCMapping = { + v12.localAssetEntity: [v12.localAssetEntity.createdAt, v12.localAssetEntity.updatedAt], + v12.localAlbumEntity: [v12.localAlbumEntity.updatedAt], + }; - for (final entry in localToUTCMapping.entries) { - final table = entry.key; - await m.alterTable( - TableMigration( - table, - columnTransformer: { - for (final column in entry.value) - column: column.modify(const DateTimeModifier.utc()).strftime('%Y-%m-%dT%H:%M:%fZ'), - }, - ), - ); - } - }, - from12To13: (m, v13) async { - await m.create(v13.trashedLocalAssetEntity); - await m.createIndex(v13.idxTrashedLocalAssetChecksum); - await m.createIndex(v13.idxTrashedLocalAssetAlbum); - }, - from13To14: (m, v14) async { - await m.addColumn(v14.localAssetEntity, v14.localAssetEntity.adjustmentTime); - await m.addColumn(v14.localAssetEntity, v14.localAssetEntity.latitude); - await m.addColumn(v14.localAssetEntity, v14.localAssetEntity.longitude); - }, - from14To15: (m, v15) async { - await m.alterTable( - TableMigration( - v15.trashedLocalAssetEntity, - columnTransformer: {v15.trashedLocalAssetEntity.source: Constant(TrashOrigin.localSync.index)}, - newColumns: [v15.trashedLocalAssetEntity.source], - ), - ); - }, - from15To16: (m, v16) async { - // Add i_cloud_id to local and remote asset tables - await m.addColumn(v16.localAssetEntity, v16.localAssetEntity.iCloudId); - await m.createIndex(v16.idxLocalAssetCloudId); - await m.createTable(v16.remoteAssetCloudIdEntity); - }, - from16To17: (m, v17) async { - await m.addColumn(v17.remoteAssetEntity, v17.remoteAssetEntity.isEdited); - }, - from17To18: (m, v18) async { - await m.createIndex(v18.idxRemoteAssetCloudId); - }, - from18To19: (m, v19) async { - await m.createIndex(v19.idxAssetFacePersonId); - await m.createIndex(v19.idxAssetFaceAssetId); - await m.createIndex(v19.idxLocalAlbumAssetAlbumAsset); - await m.createIndex(v19.idxPartnerSharedWithId); - await m.createIndex(v19.idxPersonOwnerId); - await m.createIndex(v19.idxRemoteAlbumOwnerId); - await m.createIndex(v19.idxRemoteAlbumAssetAlbumAsset); - await m.createIndex(v19.idxRemoteAssetStackId); - await m.createIndex(v19.idxRemoteAssetLocalDateTimeDay); - await m.createIndex(v19.idxRemoteAssetLocalDateTimeMonth); - await m.createIndex(v19.idxStackPrimaryAssetId); - }, - from19To20: (m, v20) async { - await m.addColumn(v20.assetFaceEntity, v20.assetFaceEntity.isVisible); - await m.addColumn(v20.assetFaceEntity, v20.assetFaceEntity.deletedAt); - }, - from20To21: (m, v21) async { - await m.addColumn(v21.localAssetEntity, v21.localAssetEntity.playbackStyle); - await m.addColumn(v21.trashedLocalAssetEntity, v21.trashedLocalAssetEntity.playbackStyle); - }, - from21To22: (m, v22) async { - await m.createTable(v22.assetEditEntity); - await m.createIndex(v22.idxAssetEditAssetId); - }, - from22To23: (m, v23) async { - await m.renameColumn(v23.localAssetEntity, 'duration_in_seconds', v23.localAssetEntity.durationMs); - await m.renameColumn(v23.remoteAssetEntity, 'duration_in_seconds', v23.remoteAssetEntity.durationMs); - await m.renameColumn( - v23.trashedLocalAssetEntity, - 'duration_in_seconds', - v23.trashedLocalAssetEntity.durationMs, - ); + for (final entry in localToUTCMapping.entries) { + final table = entry.key; + await m.alterTable( + TableMigration( + table, + columnTransformer: { + for (final column in entry.value) + column: column.modify(const DateTimeModifier.utc()).strftime('%Y-%m-%dT%H:%M:%fZ'), + }, + ), + ); + } + }, + from12To13: (m, v13) async { + await m.create(v13.trashedLocalAssetEntity); + await m.createIndex(v13.idxTrashedLocalAssetChecksum); + await m.createIndex(v13.idxTrashedLocalAssetAlbum); + }, + from13To14: (m, v14) async { + await m.addColumn(v14.localAssetEntity, v14.localAssetEntity.adjustmentTime); + await m.addColumn(v14.localAssetEntity, v14.localAssetEntity.latitude); + await m.addColumn(v14.localAssetEntity, v14.localAssetEntity.longitude); + }, + from14To15: (m, v15) async { + await m.alterTable( + TableMigration( + v15.trashedLocalAssetEntity, + columnTransformer: {v15.trashedLocalAssetEntity.source: Constant(TrashOrigin.localSync.index)}, + newColumns: [v15.trashedLocalAssetEntity.source], + ), + ); + }, + from15To16: (m, v16) async { + // Add i_cloud_id to local and remote asset tables + await m.addColumn(v16.localAssetEntity, v16.localAssetEntity.iCloudId); + await m.createIndex(v16.idxLocalAssetCloudId); + await m.createTable(v16.remoteAssetCloudIdEntity); + }, + from16To17: (m, v17) async { + await m.addColumn(v17.remoteAssetEntity, v17.remoteAssetEntity.isEdited); + }, + from17To18: (m, v18) async { + await m.createIndex(v18.idxRemoteAssetCloudId); + }, + from18To19: (m, v19) async { + await m.createIndex(v19.idxAssetFacePersonId); + await m.createIndex(v19.idxAssetFaceAssetId); + await m.createIndex(v19.idxLocalAlbumAssetAlbumAsset); + await m.createIndex(v19.idxPartnerSharedWithId); + await m.createIndex(v19.idxPersonOwnerId); + await m.createIndex(v19.idxRemoteAlbumOwnerId); + await m.createIndex(v19.idxRemoteAlbumAssetAlbumAsset); + await m.createIndex(v19.idxRemoteAssetStackId); + await m.createIndex(v19.idxRemoteAssetLocalDateTimeDay); + await m.createIndex(v19.idxRemoteAssetLocalDateTimeMonth); + await m.createIndex(v19.idxStackPrimaryAssetId); + }, + from19To20: (m, v20) async { + await m.addColumn(v20.assetFaceEntity, v20.assetFaceEntity.isVisible); + await m.addColumn(v20.assetFaceEntity, v20.assetFaceEntity.deletedAt); + }, + from20To21: (m, v21) async { + await m.addColumn(v21.localAssetEntity, v21.localAssetEntity.playbackStyle); + await m.addColumn(v21.trashedLocalAssetEntity, v21.trashedLocalAssetEntity.playbackStyle); + }, + from21To22: (m, v22) async { + await m.createTable(v22.assetEditEntity); + await m.createIndex(v22.idxAssetEditAssetId); + }, + from22To23: (m, v23) async { + await m.renameColumn(v23.localAssetEntity, 'duration_in_seconds', v23.localAssetEntity.durationMs); + await m.renameColumn(v23.remoteAssetEntity, 'duration_in_seconds', v23.remoteAssetEntity.durationMs); + await m.renameColumn( + v23.trashedLocalAssetEntity, + 'duration_in_seconds', + v23.trashedLocalAssetEntity.durationMs, + ); - await localAssetEntity.update().write( - LocalAssetEntityCompanion.custom(durationMs: v23.localAssetEntity.durationMs * const Constant(1000)), - ); - await remoteAssetEntity.update().write( - RemoteAssetEntityCompanion.custom(durationMs: v23.remoteAssetEntity.durationMs * const Constant(1000)), - ); - await trashedLocalAssetEntity.update().write( - TrashedLocalAssetEntityCompanion.custom( - durationMs: v23.trashedLocalAssetEntity.durationMs * const Constant(1000), - ), - ); - }, - from23To24: (m, v24) async { - await customStatement('DROP INDEX IF EXISTS idx_remote_album_owner_id'); - await m.alterTable(TableMigration(v24.remoteAlbumEntity)); - }, - from24To25: (m, v25) async { - await m.createTable(v25.metadata); - await customStatement('DROP INDEX IF EXISTS idx_remote_asset_owner_checksum'); - await customStatement('DROP INDEX IF EXISTS idx_remote_asset_local_date_time_day'); - await customStatement('DROP INDEX IF EXISTS idx_remote_asset_local_date_time_month'); - await m.createIndex(v25.idxRemoteAssetOwnerVisibilityDeletedCreated); - await m.createIndex(v25.idxRemoteExifCity); - await m.createIndex(v25.idxAssetFaceVisiblePerson); - }, - from25To26: (m, v26) async { - await m.addColumn(v26.remoteAssetEntity, v26.remoteAssetEntity.uploadedAt); - }, - from26To27: (m, v27) async { - await customStatement('ALTER TABLE metadata RENAME TO settings'); - }, - from27To28: (m, v28) async { - await m.createIndex(v28.idxLocalAssetCreatedAt); - }, - from28To29: (m, v29) async { - await m.createTable(v29.assetOcrEntity); - await m.createIndex(v29.idxAssetOcrAssetId); - }, - from29To30: (m, v30) async { - await m.alterTable(TableMigration(v30.settings)); - }, - ), - ); + await localAssetEntity.update().write( + LocalAssetEntityCompanion.custom(durationMs: v23.localAssetEntity.durationMs * const Constant(1000)), + ); + await remoteAssetEntity.update().write( + RemoteAssetEntityCompanion.custom( + durationMs: v23.remoteAssetEntity.durationMs * const Constant(1000), + ), + ); + await trashedLocalAssetEntity.update().write( + TrashedLocalAssetEntityCompanion.custom( + durationMs: v23.trashedLocalAssetEntity.durationMs * const Constant(1000), + ), + ); + }, + from23To24: (m, v24) async { + await customStatement('DROP INDEX IF EXISTS idx_remote_album_owner_id'); + await m.alterTable(TableMigration(v24.remoteAlbumEntity)); + }, + from24To25: (m, v25) async { + await m.createTable(v25.metadata); + await customStatement('DROP INDEX IF EXISTS idx_remote_asset_owner_checksum'); + await customStatement('DROP INDEX IF EXISTS idx_remote_asset_local_date_time_day'); + await customStatement('DROP INDEX IF EXISTS idx_remote_asset_local_date_time_month'); + await m.createIndex(v25.idxRemoteAssetOwnerVisibilityDeletedCreated); + await m.createIndex(v25.idxRemoteExifCity); + await m.createIndex(v25.idxAssetFaceVisiblePerson); + }, + from25To26: (m, v26) async { + await m.addColumn(v26.remoteAssetEntity, v26.remoteAssetEntity.uploadedAt); + }, + from26To27: (m, v27) async { + await customStatement('ALTER TABLE metadata RENAME TO settings'); + }, + from27To28: (m, v28) async { + await m.createIndex(v28.idxLocalAssetCreatedAt); + }, + from28To29: (m, v29) async { + await m.createTable(v29.assetOcrEntity); + await m.createIndex(v29.idxAssetOcrAssetId); + }, + from29To30: (m, v30) async { + await m.alterTable(TableMigration(v30.settings)); + }, + from30To31: (m, v31) async { + await m.createIndex(v31.idxRemoteAssetUploaded); + }, + ), + ), + ); - if (kDebugMode) { - // Fail if the migration broke foreign keys - final wrongFKs = await customSelect('PRAGMA foreign_key_check').get(); - assert(wrongFKs.isEmpty, '${wrongFKs.map((e) => e.data)}'); + if (kDebugMode) { + // Fail if the migration broke foreign keys + final wrongFKs = await customSelect('PRAGMA foreign_key_check').get(); + assert(wrongFKs.isEmpty, '${wrongFKs.map((e) => e.data)}'); + } + } finally { + await customStatement('PRAGMA foreign_keys = ON;'); } - await customStatement('PRAGMA foreign_keys = ON;'); await optimize(); }, beforeOpen: (details) async { @@ -363,6 +373,15 @@ final class _DriftPoolStreamQueries extends StreamQueryStore { } } +Future deleteSqliteDatabase({required String name}) async { + final file = await _databaseFile(name); + await [ + file.path, + '${file.path}-wal', + '${file.path}-shm', + ].map((path) => File(path).delete().catchError((_) => File(path), test: (e) => e is FileSystemException)).wait; +} + Future openSqliteConnection({required String name}) async { return _openImmichDatabase(await _databaseFile(name)); } diff --git a/mobile/lib/infrastructure/repositories/db.repository.drift.dart b/mobile/lib/infrastructure/repositories/db.repository.drift.dart deleted file mode 100644 index 887daea723..0000000000 --- a/mobile/lib/infrastructure/repositories/db.repository.drift.dart +++ /dev/null @@ -1,417 +0,0 @@ -// dart format width=80 -// ignore_for_file: type=lint -import 'package:drift/drift.dart' as i0; -import 'package:immich_mobile/infrastructure/entities/user.entity.drift.dart' - as i1; -import 'package:immich_mobile/infrastructure/entities/remote_asset.entity.drift.dart' - as i2; -import 'package:immich_mobile/infrastructure/entities/stack.entity.drift.dart' - as i3; -import 'package:immich_mobile/infrastructure/entities/local_asset.entity.drift.dart' - as i4; -import 'package:immich_mobile/infrastructure/entities/remote_album.entity.drift.dart' - as i5; -import 'package:immich_mobile/infrastructure/entities/local_album.entity.drift.dart' - as i6; -import 'package:immich_mobile/infrastructure/entities/local_album_asset.entity.drift.dart' - as i7; -import 'package:immich_mobile/infrastructure/entities/auth_user.entity.drift.dart' - as i8; -import 'package:immich_mobile/infrastructure/entities/user_metadata.entity.drift.dart' - as i9; -import 'package:immich_mobile/infrastructure/entities/partner.entity.drift.dart' - as i10; -import 'package:immich_mobile/infrastructure/entities/exif.entity.drift.dart' - as i11; -import 'package:immich_mobile/infrastructure/entities/remote_album_asset.entity.drift.dart' - as i12; -import 'package:immich_mobile/infrastructure/entities/remote_album_user.entity.drift.dart' - as i13; -import 'package:immich_mobile/infrastructure/entities/remote_asset_cloud_id.entity.drift.dart' - as i14; -import 'package:immich_mobile/infrastructure/entities/memory.entity.drift.dart' - as i15; -import 'package:immich_mobile/infrastructure/entities/memory_asset.entity.drift.dart' - as i16; -import 'package:immich_mobile/infrastructure/entities/person.entity.drift.dart' - as i17; -import 'package:immich_mobile/infrastructure/entities/asset_face.entity.drift.dart' - as i18; -import 'package:immich_mobile/infrastructure/entities/store.entity.drift.dart' - as i19; -import 'package:immich_mobile/infrastructure/entities/trashed_local_asset.entity.drift.dart' - as i20; -import 'package:immich_mobile/infrastructure/entities/asset_edit.entity.drift.dart' - as i21; -import 'package:immich_mobile/infrastructure/entities/settings.entity.drift.dart' - as i22; -import 'package:immich_mobile/infrastructure/entities/asset_ocr.entity.drift.dart' - as i23; -import 'package:immich_mobile/infrastructure/entities/merged_asset.drift.dart' - as i24; -import 'package:drift/internal/modular.dart' as i25; - -abstract class $Drift extends i0.GeneratedDatabase { - $Drift(i0.QueryExecutor e) : super(e); - $DriftManager get managers => $DriftManager(this); - late final i1.$UserEntityTable userEntity = i1.$UserEntityTable(this); - late final i2.$RemoteAssetEntityTable remoteAssetEntity = i2 - .$RemoteAssetEntityTable(this); - late final i3.$StackEntityTable stackEntity = i3.$StackEntityTable(this); - late final i4.$LocalAssetEntityTable localAssetEntity = i4 - .$LocalAssetEntityTable(this); - late final i5.$RemoteAlbumEntityTable remoteAlbumEntity = i5 - .$RemoteAlbumEntityTable(this); - late final i6.$LocalAlbumEntityTable localAlbumEntity = i6 - .$LocalAlbumEntityTable(this); - late final i7.$LocalAlbumAssetEntityTable localAlbumAssetEntity = i7 - .$LocalAlbumAssetEntityTable(this); - late final i8.$AuthUserEntityTable authUserEntity = i8.$AuthUserEntityTable( - this, - ); - late final i9.$UserMetadataEntityTable userMetadataEntity = i9 - .$UserMetadataEntityTable(this); - late final i10.$PartnerEntityTable partnerEntity = i10.$PartnerEntityTable( - this, - ); - late final i11.$RemoteExifEntityTable remoteExifEntity = i11 - .$RemoteExifEntityTable(this); - late final i12.$RemoteAlbumAssetEntityTable remoteAlbumAssetEntity = i12 - .$RemoteAlbumAssetEntityTable(this); - late final i13.$RemoteAlbumUserEntityTable remoteAlbumUserEntity = i13 - .$RemoteAlbumUserEntityTable(this); - late final i14.$RemoteAssetCloudIdEntityTable remoteAssetCloudIdEntity = i14 - .$RemoteAssetCloudIdEntityTable(this); - late final i15.$MemoryEntityTable memoryEntity = i15.$MemoryEntityTable(this); - late final i16.$MemoryAssetEntityTable memoryAssetEntity = i16 - .$MemoryAssetEntityTable(this); - late final i17.$PersonEntityTable personEntity = i17.$PersonEntityTable(this); - late final i18.$AssetFaceEntityTable assetFaceEntity = i18 - .$AssetFaceEntityTable(this); - late final i19.$StoreEntityTable storeEntity = i19.$StoreEntityTable(this); - late final i20.$TrashedLocalAssetEntityTable trashedLocalAssetEntity = i20 - .$TrashedLocalAssetEntityTable(this); - late final i21.$AssetEditEntityTable assetEditEntity = i21 - .$AssetEditEntityTable(this); - late final i22.$SettingsEntityTable settingsEntity = i22.$SettingsEntityTable( - this, - ); - late final i23.$AssetOcrEntityTable assetOcrEntity = i23.$AssetOcrEntityTable( - this, - ); - i24.MergedAssetDrift get mergedAssetDrift => i25.ReadDatabaseContainer( - this, - ).accessor(i24.MergedAssetDrift.new); - @override - Iterable> get allTables => - allSchemaEntities.whereType>(); - @override - List get allSchemaEntities => [ - userEntity, - remoteAssetEntity, - stackEntity, - localAssetEntity, - remoteAlbumEntity, - localAlbumEntity, - localAlbumAssetEntity, - i7.idxLocalAlbumAssetAlbumAsset, - i4.idxLocalAssetChecksum, - i4.idxLocalAssetCloudId, - i4.idxLocalAssetCreatedAt, - i3.idxStackPrimaryAssetId, - i2.uQRemoteAssetsOwnerChecksum, - i2.uQRemoteAssetsOwnerLibraryChecksum, - i2.idxRemoteAssetChecksum, - i2.idxRemoteAssetStackId, - i2.idxRemoteAssetOwnerVisibilityDeletedCreated, - authUserEntity, - userMetadataEntity, - partnerEntity, - remoteExifEntity, - remoteAlbumAssetEntity, - remoteAlbumUserEntity, - remoteAssetCloudIdEntity, - memoryEntity, - memoryAssetEntity, - personEntity, - assetFaceEntity, - storeEntity, - trashedLocalAssetEntity, - assetEditEntity, - settingsEntity, - assetOcrEntity, - i10.idxPartnerSharedWithId, - i11.idxLatLng, - i11.idxRemoteExifCity, - i12.idxRemoteAlbumAssetAlbumAsset, - i14.idxRemoteAssetCloudId, - i17.idxPersonOwnerId, - i18.idxAssetFacePersonId, - i18.idxAssetFaceAssetId, - i18.idxAssetFaceVisiblePerson, - i20.idxTrashedLocalAssetChecksum, - i20.idxTrashedLocalAssetAlbum, - i21.idxAssetEditAssetId, - i23.idxAssetOcrAssetId, - ]; - @override - i0.StreamQueryUpdateRules - get streamUpdateRules => const i0.StreamQueryUpdateRules([ - i0.WritePropagation( - on: i0.TableUpdateQuery.onTableName( - 'user_entity', - limitUpdateKind: i0.UpdateKind.delete, - ), - result: [ - i0.TableUpdate('remote_asset_entity', kind: i0.UpdateKind.delete), - ], - ), - i0.WritePropagation( - on: i0.TableUpdateQuery.onTableName( - 'user_entity', - limitUpdateKind: i0.UpdateKind.delete, - ), - result: [i0.TableUpdate('stack_entity', kind: i0.UpdateKind.delete)], - ), - i0.WritePropagation( - on: i0.TableUpdateQuery.onTableName( - 'remote_asset_entity', - limitUpdateKind: i0.UpdateKind.delete, - ), - result: [ - i0.TableUpdate('remote_album_entity', kind: i0.UpdateKind.update), - ], - ), - i0.WritePropagation( - on: i0.TableUpdateQuery.onTableName( - 'remote_album_entity', - limitUpdateKind: i0.UpdateKind.delete, - ), - result: [ - i0.TableUpdate('local_album_entity', kind: i0.UpdateKind.update), - ], - ), - i0.WritePropagation( - on: i0.TableUpdateQuery.onTableName( - 'local_asset_entity', - limitUpdateKind: i0.UpdateKind.delete, - ), - result: [ - i0.TableUpdate('local_album_asset_entity', kind: i0.UpdateKind.delete), - ], - ), - i0.WritePropagation( - on: i0.TableUpdateQuery.onTableName( - 'local_album_entity', - limitUpdateKind: i0.UpdateKind.delete, - ), - result: [ - i0.TableUpdate('local_album_asset_entity', kind: i0.UpdateKind.delete), - ], - ), - i0.WritePropagation( - on: i0.TableUpdateQuery.onTableName( - 'user_entity', - limitUpdateKind: i0.UpdateKind.delete, - ), - result: [ - i0.TableUpdate('user_metadata_entity', kind: i0.UpdateKind.delete), - ], - ), - i0.WritePropagation( - on: i0.TableUpdateQuery.onTableName( - 'user_entity', - limitUpdateKind: i0.UpdateKind.delete, - ), - result: [i0.TableUpdate('partner_entity', kind: i0.UpdateKind.delete)], - ), - i0.WritePropagation( - on: i0.TableUpdateQuery.onTableName( - 'user_entity', - limitUpdateKind: i0.UpdateKind.delete, - ), - result: [i0.TableUpdate('partner_entity', kind: i0.UpdateKind.delete)], - ), - i0.WritePropagation( - on: i0.TableUpdateQuery.onTableName( - 'remote_asset_entity', - limitUpdateKind: i0.UpdateKind.delete, - ), - result: [ - i0.TableUpdate('remote_exif_entity', kind: i0.UpdateKind.delete), - ], - ), - i0.WritePropagation( - on: i0.TableUpdateQuery.onTableName( - 'remote_asset_entity', - limitUpdateKind: i0.UpdateKind.delete, - ), - result: [ - i0.TableUpdate('remote_album_asset_entity', kind: i0.UpdateKind.delete), - ], - ), - i0.WritePropagation( - on: i0.TableUpdateQuery.onTableName( - 'remote_album_entity', - limitUpdateKind: i0.UpdateKind.delete, - ), - result: [ - i0.TableUpdate('remote_album_asset_entity', kind: i0.UpdateKind.delete), - ], - ), - i0.WritePropagation( - on: i0.TableUpdateQuery.onTableName( - 'remote_album_entity', - limitUpdateKind: i0.UpdateKind.delete, - ), - result: [ - i0.TableUpdate('remote_album_user_entity', kind: i0.UpdateKind.delete), - ], - ), - i0.WritePropagation( - on: i0.TableUpdateQuery.onTableName( - 'user_entity', - limitUpdateKind: i0.UpdateKind.delete, - ), - result: [ - i0.TableUpdate('remote_album_user_entity', kind: i0.UpdateKind.delete), - ], - ), - i0.WritePropagation( - on: i0.TableUpdateQuery.onTableName( - 'remote_asset_entity', - limitUpdateKind: i0.UpdateKind.delete, - ), - result: [ - i0.TableUpdate( - 'remote_asset_cloud_id_entity', - kind: i0.UpdateKind.delete, - ), - ], - ), - i0.WritePropagation( - on: i0.TableUpdateQuery.onTableName( - 'user_entity', - limitUpdateKind: i0.UpdateKind.delete, - ), - result: [i0.TableUpdate('memory_entity', kind: i0.UpdateKind.delete)], - ), - i0.WritePropagation( - on: i0.TableUpdateQuery.onTableName( - 'remote_asset_entity', - limitUpdateKind: i0.UpdateKind.delete, - ), - result: [ - i0.TableUpdate('memory_asset_entity', kind: i0.UpdateKind.delete), - ], - ), - i0.WritePropagation( - on: i0.TableUpdateQuery.onTableName( - 'memory_entity', - limitUpdateKind: i0.UpdateKind.delete, - ), - result: [ - i0.TableUpdate('memory_asset_entity', kind: i0.UpdateKind.delete), - ], - ), - i0.WritePropagation( - on: i0.TableUpdateQuery.onTableName( - 'user_entity', - limitUpdateKind: i0.UpdateKind.delete, - ), - result: [i0.TableUpdate('person_entity', kind: i0.UpdateKind.delete)], - ), - i0.WritePropagation( - on: i0.TableUpdateQuery.onTableName( - 'remote_asset_entity', - limitUpdateKind: i0.UpdateKind.delete, - ), - result: [i0.TableUpdate('asset_face_entity', kind: i0.UpdateKind.delete)], - ), - i0.WritePropagation( - on: i0.TableUpdateQuery.onTableName( - 'person_entity', - limitUpdateKind: i0.UpdateKind.delete, - ), - result: [i0.TableUpdate('asset_face_entity', kind: i0.UpdateKind.update)], - ), - i0.WritePropagation( - on: i0.TableUpdateQuery.onTableName( - 'remote_asset_entity', - limitUpdateKind: i0.UpdateKind.delete, - ), - result: [i0.TableUpdate('asset_edit_entity', kind: i0.UpdateKind.delete)], - ), - i0.WritePropagation( - on: i0.TableUpdateQuery.onTableName( - 'remote_asset_entity', - limitUpdateKind: i0.UpdateKind.delete, - ), - result: [i0.TableUpdate('asset_ocr_entity', kind: i0.UpdateKind.delete)], - ), - ]); - @override - i0.DriftDatabaseOptions get options => - const i0.DriftDatabaseOptions(storeDateTimeAsText: true); -} - -class $DriftManager { - final $Drift _db; - $DriftManager(this._db); - i1.$$UserEntityTableTableManager get userEntity => - i1.$$UserEntityTableTableManager(_db, _db.userEntity); - i2.$$RemoteAssetEntityTableTableManager get remoteAssetEntity => - i2.$$RemoteAssetEntityTableTableManager(_db, _db.remoteAssetEntity); - i3.$$StackEntityTableTableManager get stackEntity => - i3.$$StackEntityTableTableManager(_db, _db.stackEntity); - i4.$$LocalAssetEntityTableTableManager get localAssetEntity => - i4.$$LocalAssetEntityTableTableManager(_db, _db.localAssetEntity); - i5.$$RemoteAlbumEntityTableTableManager get remoteAlbumEntity => - i5.$$RemoteAlbumEntityTableTableManager(_db, _db.remoteAlbumEntity); - i6.$$LocalAlbumEntityTableTableManager get localAlbumEntity => - i6.$$LocalAlbumEntityTableTableManager(_db, _db.localAlbumEntity); - i7.$$LocalAlbumAssetEntityTableTableManager get localAlbumAssetEntity => i7 - .$$LocalAlbumAssetEntityTableTableManager(_db, _db.localAlbumAssetEntity); - i8.$$AuthUserEntityTableTableManager get authUserEntity => - i8.$$AuthUserEntityTableTableManager(_db, _db.authUserEntity); - i9.$$UserMetadataEntityTableTableManager get userMetadataEntity => - i9.$$UserMetadataEntityTableTableManager(_db, _db.userMetadataEntity); - i10.$$PartnerEntityTableTableManager get partnerEntity => - i10.$$PartnerEntityTableTableManager(_db, _db.partnerEntity); - i11.$$RemoteExifEntityTableTableManager get remoteExifEntity => - i11.$$RemoteExifEntityTableTableManager(_db, _db.remoteExifEntity); - i12.$$RemoteAlbumAssetEntityTableTableManager get remoteAlbumAssetEntity => - i12.$$RemoteAlbumAssetEntityTableTableManager( - _db, - _db.remoteAlbumAssetEntity, - ); - i13.$$RemoteAlbumUserEntityTableTableManager get remoteAlbumUserEntity => i13 - .$$RemoteAlbumUserEntityTableTableManager(_db, _db.remoteAlbumUserEntity); - i14.$$RemoteAssetCloudIdEntityTableTableManager - get remoteAssetCloudIdEntity => - i14.$$RemoteAssetCloudIdEntityTableTableManager( - _db, - _db.remoteAssetCloudIdEntity, - ); - i15.$$MemoryEntityTableTableManager get memoryEntity => - i15.$$MemoryEntityTableTableManager(_db, _db.memoryEntity); - i16.$$MemoryAssetEntityTableTableManager get memoryAssetEntity => - i16.$$MemoryAssetEntityTableTableManager(_db, _db.memoryAssetEntity); - i17.$$PersonEntityTableTableManager get personEntity => - i17.$$PersonEntityTableTableManager(_db, _db.personEntity); - i18.$$AssetFaceEntityTableTableManager get assetFaceEntity => - i18.$$AssetFaceEntityTableTableManager(_db, _db.assetFaceEntity); - i19.$$StoreEntityTableTableManager get storeEntity => - i19.$$StoreEntityTableTableManager(_db, _db.storeEntity); - i20.$$TrashedLocalAssetEntityTableTableManager get trashedLocalAssetEntity => - i20.$$TrashedLocalAssetEntityTableTableManager( - _db, - _db.trashedLocalAssetEntity, - ); - i21.$$AssetEditEntityTableTableManager get assetEditEntity => - i21.$$AssetEditEntityTableTableManager(_db, _db.assetEditEntity); - i22.$$SettingsEntityTableTableManager get settingsEntity => - i22.$$SettingsEntityTableTableManager(_db, _db.settingsEntity); - i23.$$AssetOcrEntityTableTableManager get assetOcrEntity => - i23.$$AssetOcrEntityTableTableManager(_db, _db.assetOcrEntity); -} diff --git a/mobile/lib/infrastructure/repositories/db.repository.steps.dart b/mobile/lib/infrastructure/repositories/db.repository.steps.dart index 91f5e8c3ef..39f9c2ea04 100644 --- a/mobile/lib/infrastructure/repositories/db.repository.steps.dart +++ b/mobile/lib/infrastructure/repositories/db.repository.steps.dart @@ -15920,6 +15920,592 @@ i1.GeneratedColumn _column_224(String aliasedName) => type: i1.DriftSqlType.string, $customConstraints: 'NULL', ); + +final class Schema31 extends i0.VersionedSchema { + Schema31({required super.database}) : super(version: 31); + @override + late final List entities = [ + userEntity, + remoteAssetEntity, + stackEntity, + localAssetEntity, + remoteAlbumEntity, + localAlbumEntity, + localAlbumAssetEntity, + idxLocalAlbumAssetAlbumAsset, + idxLocalAssetChecksum, + idxLocalAssetCloudId, + idxLocalAssetCreatedAt, + idxStackPrimaryAssetId, + uQRemoteAssetsOwnerChecksum, + uQRemoteAssetsOwnerLibraryChecksum, + idxRemoteAssetChecksum, + idxRemoteAssetStackId, + idxRemoteAssetOwnerVisibilityDeletedCreated, + idxRemoteAssetUploaded, + authUserEntity, + userMetadataEntity, + partnerEntity, + remoteExifEntity, + remoteAlbumAssetEntity, + remoteAlbumUserEntity, + remoteAssetCloudIdEntity, + memoryEntity, + memoryAssetEntity, + personEntity, + assetFaceEntity, + storeEntity, + trashedLocalAssetEntity, + assetEditEntity, + settings, + assetOcrEntity, + idxPartnerSharedWithId, + idxLatLng, + idxRemoteExifCity, + idxRemoteAlbumAssetAlbumAsset, + idxRemoteAssetCloudId, + idxPersonOwnerId, + idxAssetFacePersonId, + idxAssetFaceAssetId, + idxAssetFaceVisiblePerson, + idxTrashedLocalAssetChecksum, + idxTrashedLocalAssetAlbum, + idxAssetEditAssetId, + idxAssetOcrAssetId, + ]; + late final Shape33 userEntity = Shape33( + source: i0.VersionedTable( + entityName: 'user_entity', + withoutRowId: true, + isStrict: true, + tableConstraints: ['PRIMARY KEY(id)'], + columns: [ + _column_107, + _column_108, + _column_109, + _column_110, + _column_111, + _column_112, + ], + attachedDatabase: database, + ), + alias: null, + ); + late final Shape50 remoteAssetEntity = Shape50( + source: i0.VersionedTable( + entityName: 'remote_asset_entity', + withoutRowId: true, + isStrict: true, + tableConstraints: ['PRIMARY KEY(id)'], + columns: [ + _column_108, + _column_113, + _column_114, + _column_115, + _column_116, + _column_117, + _column_118, + _column_107, + _column_119, + _column_120, + _column_121, + _column_122, + _column_123, + _column_124, + _column_212, + _column_125, + _column_126, + _column_127, + _column_128, + _column_129, + ], + attachedDatabase: database, + ), + alias: null, + ); + late final Shape35 stackEntity = Shape35( + source: i0.VersionedTable( + entityName: 'stack_entity', + withoutRowId: true, + isStrict: true, + tableConstraints: ['PRIMARY KEY(id)'], + columns: [ + _column_107, + _column_114, + _column_115, + _column_121, + _column_130, + ], + attachedDatabase: database, + ), + alias: null, + ); + late final Shape36 localAssetEntity = Shape36( + source: i0.VersionedTable( + entityName: 'local_asset_entity', + withoutRowId: true, + isStrict: true, + tableConstraints: ['PRIMARY KEY(id)'], + columns: [ + _column_108, + _column_113, + _column_114, + _column_115, + _column_116, + _column_117, + _column_118, + _column_107, + _column_131, + _column_120, + _column_132, + _column_133, + _column_134, + _column_135, + _column_136, + _column_137, + ], + attachedDatabase: database, + ), + alias: null, + ); + late final Shape48 remoteAlbumEntity = Shape48( + source: i0.VersionedTable( + entityName: 'remote_album_entity', + withoutRowId: true, + isStrict: true, + tableConstraints: ['PRIMARY KEY(id)'], + columns: [ + _column_107, + _column_108, + _column_138, + _column_114, + _column_115, + _column_139, + _column_140, + _column_141, + ], + attachedDatabase: database, + ), + alias: null, + ); + late final Shape38 localAlbumEntity = Shape38( + source: i0.VersionedTable( + entityName: 'local_album_entity', + withoutRowId: true, + isStrict: true, + tableConstraints: ['PRIMARY KEY(id)'], + columns: [ + _column_107, + _column_108, + _column_115, + _column_142, + _column_143, + _column_144, + _column_145, + ], + attachedDatabase: database, + ), + alias: null, + ); + late final Shape39 localAlbumAssetEntity = Shape39( + source: i0.VersionedTable( + entityName: 'local_album_asset_entity', + withoutRowId: true, + isStrict: true, + tableConstraints: ['PRIMARY KEY(asset_id, album_id)'], + columns: [_column_146, _column_147, _column_145], + attachedDatabase: database, + ), + alias: null, + ); + final i1.Index idxLocalAlbumAssetAlbumAsset = i1.Index( + 'idx_local_album_asset_album_asset', + 'CREATE INDEX IF NOT EXISTS idx_local_album_asset_album_asset ON local_album_asset_entity (album_id, asset_id)', + ); + 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 idxLocalAssetCloudId = i1.Index( + 'idx_local_asset_cloud_id', + 'CREATE INDEX IF NOT EXISTS idx_local_asset_cloud_id ON local_asset_entity (i_cloud_id)', + ); + final i1.Index idxLocalAssetCreatedAt = i1.Index( + 'idx_local_asset_created_at', + 'CREATE INDEX IF NOT EXISTS idx_local_asset_created_at ON local_asset_entity (created_at)', + ); + final i1.Index idxStackPrimaryAssetId = i1.Index( + 'idx_stack_primary_asset_id', + 'CREATE INDEX IF NOT EXISTS idx_stack_primary_asset_id ON stack_entity (primary_asset_id)', + ); + 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)', + ); + final i1.Index idxRemoteAssetStackId = i1.Index( + 'idx_remote_asset_stack_id', + 'CREATE INDEX IF NOT EXISTS idx_remote_asset_stack_id ON remote_asset_entity (stack_id)', + ); + final i1.Index idxRemoteAssetOwnerVisibilityDeletedCreated = i1.Index( + 'idx_remote_asset_owner_visibility_deleted_created', + 'CREATE INDEX IF NOT EXISTS idx_remote_asset_owner_visibility_deleted_created ON remote_asset_entity (owner_id, visibility, deleted_at, created_at DESC)', + ); + final i1.Index idxRemoteAssetUploaded = i1.Index( + 'idx_remote_asset_uploaded', + 'CREATE INDEX IF NOT EXISTS idx_remote_asset_uploaded ON remote_asset_entity (uploaded_at)', + ); + late final Shape40 authUserEntity = Shape40( + source: i0.VersionedTable( + entityName: 'auth_user_entity', + withoutRowId: true, + isStrict: true, + tableConstraints: ['PRIMARY KEY(id)'], + columns: [ + _column_107, + _column_108, + _column_109, + _column_148, + _column_110, + _column_111, + _column_149, + _column_150, + _column_151, + _column_152, + ], + 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_153, _column_154, _column_155], + attachedDatabase: database, + ), + alias: null, + ); + late final Shape41 partnerEntity = Shape41( + source: i0.VersionedTable( + entityName: 'partner_entity', + withoutRowId: true, + isStrict: true, + tableConstraints: ['PRIMARY KEY(shared_by_id, shared_with_id)'], + columns: [_column_156, _column_157, _column_158], + attachedDatabase: database, + ), + alias: null, + ); + late final Shape42 remoteExifEntity = Shape42( + source: i0.VersionedTable( + entityName: 'remote_exif_entity', + withoutRowId: true, + isStrict: true, + tableConstraints: ['PRIMARY KEY(asset_id)'], + columns: [ + _column_159, + _column_160, + _column_161, + _column_162, + _column_163, + _column_164, + _column_117, + _column_116, + _column_165, + _column_166, + _column_167, + _column_168, + _column_135, + _column_136, + _column_169, + _column_170, + _column_171, + _column_172, + _column_173, + _column_174, + _column_175, + _column_176, + ], + 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_159, _column_177], + 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_177, _column_153, _column_178], + attachedDatabase: database, + ), + alias: null, + ); + late final Shape43 remoteAssetCloudIdEntity = Shape43( + source: i0.VersionedTable( + entityName: 'remote_asset_cloud_id_entity', + withoutRowId: true, + isStrict: true, + tableConstraints: ['PRIMARY KEY(asset_id)'], + columns: [ + _column_159, + _column_179, + _column_180, + _column_134, + _column_135, + _column_136, + ], + attachedDatabase: database, + ), + alias: null, + ); + late final Shape44 memoryEntity = Shape44( + source: i0.VersionedTable( + entityName: 'memory_entity', + withoutRowId: true, + isStrict: true, + tableConstraints: ['PRIMARY KEY(id)'], + columns: [ + _column_107, + _column_114, + _column_115, + _column_124, + _column_121, + _column_113, + _column_181, + _column_182, + _column_183, + _column_184, + _column_185, + _column_186, + ], + 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_159, _column_187], + attachedDatabase: database, + ), + alias: null, + ); + late final Shape45 personEntity = Shape45( + source: i0.VersionedTable( + entityName: 'person_entity', + withoutRowId: true, + isStrict: true, + tableConstraints: ['PRIMARY KEY(id)'], + columns: [ + _column_107, + _column_114, + _column_115, + _column_121, + _column_108, + _column_188, + _column_189, + _column_190, + _column_191, + _column_192, + ], + attachedDatabase: database, + ), + alias: null, + ); + late final Shape46 assetFaceEntity = Shape46( + source: i0.VersionedTable( + entityName: 'asset_face_entity', + withoutRowId: true, + isStrict: true, + tableConstraints: ['PRIMARY KEY(id)'], + columns: [ + _column_107, + _column_159, + _column_193, + _column_194, + _column_195, + _column_196, + _column_197, + _column_198, + _column_199, + _column_200, + _column_201, + _column_124, + ], + 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_202, _column_203, _column_204], + attachedDatabase: database, + ), + alias: null, + ); + late final Shape47 trashedLocalAssetEntity = Shape47( + source: i0.VersionedTable( + entityName: 'trashed_local_asset_entity', + withoutRowId: true, + isStrict: true, + tableConstraints: ['PRIMARY KEY(id, album_id)'], + columns: [ + _column_108, + _column_113, + _column_114, + _column_115, + _column_116, + _column_117, + _column_118, + _column_107, + _column_205, + _column_131, + _column_120, + _column_132, + _column_206, + _column_137, + ], + attachedDatabase: database, + ), + alias: null, + ); + late final Shape32 assetEditEntity = Shape32( + source: i0.VersionedTable( + entityName: 'asset_edit_entity', + withoutRowId: true, + isStrict: true, + tableConstraints: ['PRIMARY KEY(id)'], + columns: [ + _column_107, + _column_159, + _column_207, + _column_208, + _column_209, + ], + attachedDatabase: database, + ), + alias: null, + ); + late final Shape49 settings = Shape49( + source: i0.VersionedTable( + entityName: 'settings', + withoutRowId: true, + isStrict: true, + tableConstraints: ['PRIMARY KEY("key")'], + columns: [_column_210, _column_224, _column_115], + attachedDatabase: database, + ), + alias: null, + ); + late final Shape51 assetOcrEntity = Shape51( + source: i0.VersionedTable( + entityName: 'asset_ocr_entity', + withoutRowId: true, + isStrict: true, + tableConstraints: ['PRIMARY KEY(id)'], + columns: [ + _column_107, + _column_159, + _column_213, + _column_214, + _column_215, + _column_216, + _column_217, + _column_218, + _column_219, + _column_220, + _column_221, + _column_222, + _column_223, + _column_201, + ], + attachedDatabase: database, + ), + alias: null, + ); + final i1.Index idxPartnerSharedWithId = i1.Index( + 'idx_partner_shared_with_id', + 'CREATE INDEX IF NOT EXISTS idx_partner_shared_with_id ON partner_entity (shared_with_id)', + ); + 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 idxRemoteExifCity = i1.Index( + 'idx_remote_exif_city', + 'CREATE INDEX IF NOT EXISTS idx_remote_exif_city ON remote_exif_entity (city) WHERE city IS NOT NULL', + ); + final i1.Index idxRemoteAlbumAssetAlbumAsset = i1.Index( + 'idx_remote_album_asset_album_asset', + 'CREATE INDEX IF NOT EXISTS idx_remote_album_asset_album_asset ON remote_album_asset_entity (album_id, asset_id)', + ); + final i1.Index idxRemoteAssetCloudId = i1.Index( + 'idx_remote_asset_cloud_id', + 'CREATE INDEX IF NOT EXISTS idx_remote_asset_cloud_id ON remote_asset_cloud_id_entity (cloud_id)', + ); + final i1.Index idxPersonOwnerId = i1.Index( + 'idx_person_owner_id', + 'CREATE INDEX IF NOT EXISTS idx_person_owner_id ON person_entity (owner_id)', + ); + final i1.Index idxAssetFacePersonId = i1.Index( + 'idx_asset_face_person_id', + 'CREATE INDEX IF NOT EXISTS idx_asset_face_person_id ON asset_face_entity (person_id)', + ); + final i1.Index idxAssetFaceAssetId = i1.Index( + 'idx_asset_face_asset_id', + 'CREATE INDEX IF NOT EXISTS idx_asset_face_asset_id ON asset_face_entity (asset_id)', + ); + final i1.Index idxAssetFaceVisiblePerson = i1.Index( + 'idx_asset_face_visible_person', + 'CREATE INDEX IF NOT EXISTS idx_asset_face_visible_person ON asset_face_entity (person_id, asset_id) WHERE is_visible = 1 AND deleted_at IS NULL', + ); + 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)', + ); + final i1.Index idxAssetEditAssetId = i1.Index( + 'idx_asset_edit_asset_id', + 'CREATE INDEX IF NOT EXISTS idx_asset_edit_asset_id ON asset_edit_entity (asset_id)', + ); + final i1.Index idxAssetOcrAssetId = i1.Index( + 'idx_asset_ocr_asset_id', + 'CREATE INDEX IF NOT EXISTS idx_asset_ocr_asset_id ON asset_ocr_entity (asset_id)', + ); +} + i0.MigrationStepWithVersion migrationSteps({ required Future Function(i1.Migrator m, Schema2 schema) from1To2, required Future Function(i1.Migrator m, Schema3 schema) from2To3, @@ -15950,6 +16536,7 @@ i0.MigrationStepWithVersion migrationSteps({ required Future Function(i1.Migrator m, Schema28 schema) from27To28, required Future Function(i1.Migrator m, Schema29 schema) from28To29, required Future Function(i1.Migrator m, Schema30 schema) from29To30, + required Future Function(i1.Migrator m, Schema31 schema) from30To31, }) { return (currentVersion, database) async { switch (currentVersion) { @@ -16098,6 +16685,11 @@ i0.MigrationStepWithVersion migrationSteps({ final migrator = i1.Migrator(database, schema); await from29To30(migrator, schema); return 30; + case 30: + final schema = Schema31(database: database); + final migrator = i1.Migrator(database, schema); + await from30To31(migrator, schema); + return 31; default: throw ArgumentError.value('Unknown migration from $currentVersion'); } @@ -16134,6 +16726,7 @@ i1.OnUpgrade stepByStep({ required Future Function(i1.Migrator m, Schema28 schema) from27To28, required Future Function(i1.Migrator m, Schema29 schema) from28To29, required Future Function(i1.Migrator m, Schema30 schema) from29To30, + required Future Function(i1.Migrator m, Schema31 schema) from30To31, }) => i0.VersionedSchema.stepByStepHelper( step: migrationSteps( from1To2: from1To2, @@ -16165,5 +16758,6 @@ i1.OnUpgrade stepByStep({ from27To28: from27To28, from28To29: from28To29, from29To30: from29To30, + from30To31: from30To31, ), ); diff --git a/mobile/lib/infrastructure/repositories/local_album.repository.dart b/mobile/lib/infrastructure/repositories/local_album.repository.dart index 2c80385c34..a9911fe044 100644 --- a/mobile/lib/infrastructure/repositories/local_album.repository.dart +++ b/mobile/lib/infrastructure/repositories/local_album.repository.dart @@ -210,17 +210,19 @@ class DriftLocalAlbumRepository extends DriftDatabaseRepository { await _deleteAssets(deletes); await _upsertAssets(updates); + // Drop every existing album link for each changed asset before re-adding the + // ones the native side reports. A moved asset only reports its new album here, + // so leaving the old link around makes the per-album delete sweep wipe the + // asset entirely (it is still linked to a bucket it no longer lives in). + await _db.batch((batch) async { + for (final assetId in assetAlbums.keys) { + batch.deleteWhere(_db.localAlbumAssetEntity, (f) => f.assetId.equals(assetId)); + } + }); // The ugly casting below is required for now because the generated code // casts the returned values from the platform during decoding them // and iterating over them causes the type to be List instead of // List - await _db.batch((batch) async { - assetAlbums.cast>().forEach((assetId, albumIds) { - for (final albumId in albumIds.cast().nonNulls) { - batch.deleteWhere(_db.localAlbumAssetEntity, (f) => f.albumId.equals(albumId) & f.assetId.equals(assetId)); - } - }); - }); await _db.batch((batch) async { assetAlbums.cast>().forEach((assetId, albumIds) { batch.insertAll( @@ -354,7 +356,7 @@ class DriftLocalAlbumRepository extends DriftDatabaseRepository { return _deleteAssets(assetIds); } - List assetsToDelete = []; + final List assetsToDelete = []; List assetsToUnLink = []; final uniqueAssets = await _getUniqueAssetsInAlbum(albumId); diff --git a/mobile/lib/infrastructure/repositories/local_asset.repository.dart b/mobile/lib/infrastructure/repositories/local_asset.repository.dart index c34d2c4697..8396d6d2a6 100644 --- a/mobile/lib/infrastructure/repositories/local_asset.repository.dart +++ b/mobile/lib/infrastructure/repositories/local_asset.repository.dart @@ -24,13 +24,21 @@ class DriftLocalAssetRepository extends DriftDatabaseRepository { const DriftLocalAssetRepository(this._db) : super(_db); SingleOrNullSelectable _assetSelectable(String id) { - final query = _db.localAssetEntity.select().addColumns([_db.remoteAssetEntity.id]).join([ - leftOuterJoin( - _db.remoteAssetEntity, - _db.localAssetEntity.checksum.equalsExp(_db.remoteAssetEntity.checksum), - useColumns: false, - ), - ])..where(_db.localAssetEntity.id.equals(id)); + final query = + _db.localAssetEntity.select().addColumns([_db.remoteAssetEntity.id]).join([ + leftOuterJoin( + _db.remoteAssetEntity, + _db.localAssetEntity.checksum.equalsExp(_db.remoteAssetEntity.checksum) & + _db.remoteAssetEntity.ownerId.isInQuery( + _db.selectOnly(_db.authUserEntity) + ..addColumns([_db.authUserEntity.id]) + ..limit(1), + ), + useColumns: false, + ), + ]) + ..where(_db.localAssetEntity.id.equals(id)) + ..limit(1); return query.map((row) { final asset = row.readTable(_db.localAssetEntity).toDto(); diff --git a/mobile/lib/infrastructure/repositories/logger_db.repository.drift.dart b/mobile/lib/infrastructure/repositories/logger_db.repository.drift.dart deleted file mode 100644 index 8389d3a827..0000000000 --- a/mobile/lib/infrastructure/repositories/logger_db.repository.drift.dart +++ /dev/null @@ -1,27 +0,0 @@ -// dart format width=80 -// ignore_for_file: type=lint -import 'package:drift/drift.dart' as i0; -import 'package:immich_mobile/infrastructure/entities/log.entity.drift.dart' - as i1; - -abstract class $DriftLogger extends i0.GeneratedDatabase { - $DriftLogger(i0.QueryExecutor e) : super(e); - $DriftLoggerManager get managers => $DriftLoggerManager(this); - late final i1.$LogMessageEntityTable logMessageEntity = i1 - .$LogMessageEntityTable(this); - @override - Iterable> get allTables => - allSchemaEntities.whereType>(); - @override - List get allSchemaEntities => [logMessageEntity]; - @override - i0.DriftDatabaseOptions get options => - const i0.DriftDatabaseOptions(storeDateTimeAsText: true); -} - -class $DriftLoggerManager { - final $DriftLogger _db; - $DriftLoggerManager(this._db); - i1.$$LogMessageEntityTableTableManager get logMessageEntity => - i1.$$LogMessageEntityTableTableManager(_db, _db.logMessageEntity); -} diff --git a/mobile/lib/infrastructure/repositories/map.repository.dart b/mobile/lib/infrastructure/repositories/map.repository.dart index 95e42337fc..267ea08d20 100644 --- a/mobile/lib/infrastructure/repositories/map.repository.dart +++ b/mobile/lib/infrastructure/repositories/map.repository.dart @@ -27,7 +27,18 @@ class DriftMapRepository extends DriftDatabaseRepository { condition = condition & _db.remoteAssetEntity.isFavorite.equals(true); } - if (options.relativeDays != 0) { + final timeRange = options.timeRange; + final hasCustomRange = timeRange.from != null || timeRange.to != null; + + if (hasCustomRange) { + if (timeRange.from != null) { + condition = condition & _db.remoteAssetEntity.createdAt.isBiggerOrEqualValue(timeRange.from!); + } + + if (timeRange.to != null) { + condition = condition & _db.remoteAssetEntity.createdAt.isSmallerOrEqualValue(timeRange.to!); + } + } else if (options.relativeDays > 0) { final cutoffDate = DateTime.now().toUtc().subtract(Duration(days: options.relativeDays)); condition = condition & _db.remoteAssetEntity.createdAt.isBiggerOrEqualValue(cutoffDate); } diff --git a/mobile/lib/infrastructure/repositories/ocr.repository.dart b/mobile/lib/infrastructure/repositories/ocr.repository.dart index 99f4fa4675..c3465df357 100644 --- a/mobile/lib/infrastructure/repositories/ocr.repository.dart +++ b/mobile/lib/infrastructure/repositories/ocr.repository.dart @@ -1,7 +1,7 @@ +import 'package:drift/drift.dart'; import 'package:immich_mobile/domain/models/ocr.model.dart'; import 'package:immich_mobile/infrastructure/entities/asset_ocr.entity.drift.dart'; import 'package:immich_mobile/infrastructure/repositories/db.repository.dart'; -import 'package:drift/drift.dart'; class OcrRepository extends DriftDatabaseRepository { final Drift _db; diff --git a/mobile/lib/infrastructure/repositories/people.repository.dart b/mobile/lib/infrastructure/repositories/people.repository.dart index 0dd73cc81d..c5c7bfdb9c 100644 --- a/mobile/lib/infrastructure/repositories/people.repository.dart +++ b/mobile/lib/infrastructure/repositories/people.repository.dart @@ -8,14 +8,14 @@ class DriftPeopleRepository extends DriftDatabaseRepository { final Drift _db; const DriftPeopleRepository(this._db) : super(_db); - Future get(String personId) async { + Future get(String personId) async { final query = _db.select(_db.personEntity)..where((row) => row.id.equals(personId)); final result = await query.getSingleOrNull(); return result?.toDto(); } - Future> getAssetPeople(String assetId) async { + Future> getAssetPeople(String assetId) async { // An asset can have multiple face records for the same person (e.g., metadata // imports alongside ML detections). Use a subquery instead of a join so each // person is returned once, regardless of how many of their faces are on the asset @@ -33,7 +33,7 @@ class DriftPeopleRepository extends DriftDatabaseRepository { return query.map((row) => row.toDto()).get(); } - Future> getAllPeople({int minFaces = 3}) async { + Stream> watch({int minFaces = 3}) { final people = _db.personEntity; final faces = _db.assetFaceEntity; final assets = _db.remoteAssetEntity; @@ -59,7 +59,7 @@ class DriftPeopleRepository extends DriftDatabaseRepository { return query.map((row) { final person = row.readTable(people); return person.toDto(); - }).get(); + }).watch(); } Future updateName(String personId, String name) { @@ -76,18 +76,5 @@ class DriftPeopleRepository extends DriftDatabaseRepository { } extension on PersonEntityData { - DriftPerson toDto() { - return DriftPerson( - id: id, - createdAt: createdAt, - updatedAt: updatedAt, - ownerId: ownerId, - name: name, - faceAssetId: faceAssetId, - isFavorite: isFavorite, - isHidden: isHidden, - color: color, - birthDate: birthDate, - ); - } + Person toDto() => Person(id: id, updatedAt: updatedAt, name: name, birthDate: birthDate); } diff --git a/mobile/lib/infrastructure/repositories/remote_album.repository.dart b/mobile/lib/infrastructure/repositories/remote_album.repository.dart index 92dd9b070a..b9cd41c960 100644 --- a/mobile/lib/infrastructure/repositories/remote_album.repository.dart +++ b/mobile/lib/infrastructure/repositories/remote_album.repository.dart @@ -217,7 +217,7 @@ class DriftRemoteAlbumRepository extends DriftDatabaseRepository { }); } - FutureOr<(DateTime, DateTime)> getDateRange(String albumId) { + Stream<(DateTime, DateTime)> watchDateRange(String albumId) { final query = _db.remoteAlbumAssetEntity.selectOnly() ..where(_db.remoteAlbumAssetEntity.albumId.equals(albumId)) ..addColumns([_db.remoteAssetEntity.createdAt.min(), _db.remoteAssetEntity.createdAt.max()]) @@ -229,7 +229,7 @@ class DriftRemoteAlbumRepository extends DriftDatabaseRepository { final minDate = row.read(_db.remoteAssetEntity.createdAt.min()); final maxDate = row.read(_db.remoteAssetEntity.createdAt.max()); return (minDate ?? DateTime.now(), maxDate ?? DateTime.now()); - }).getSingle(); + }).watchSingle(); } Future> getSharedUsers(String albumId) async { diff --git a/mobile/lib/infrastructure/repositories/remote_asset.repository.dart b/mobile/lib/infrastructure/repositories/remote_asset.repository.dart index f48d88d764..d18284b636 100644 --- a/mobile/lib/infrastructure/repositories/remote_asset.repository.dart +++ b/mobile/lib/infrastructure/repositories/remote_asset.repository.dart @@ -10,6 +10,7 @@ import 'package:immich_mobile/infrastructure/entities/remote_asset.entity.dart'; import 'package:immich_mobile/infrastructure/entities/remote_asset.entity.drift.dart'; import 'package:immich_mobile/infrastructure/entities/stack.entity.drift.dart'; import 'package:immich_mobile/infrastructure/repositories/db.repository.dart'; +import 'package:immich_mobile/utils/option.dart'; import 'package:maplibre_gl/maplibre_gl.dart'; class RemoteAssetRepository extends DriftDatabaseRepository { @@ -58,10 +59,10 @@ class RemoteAssetRepository extends DriftDatabaseRepository { return _assetSelectable(id).getSingleOrNull(); } - Future getByChecksum(String checksum) { + Future> getAllDebugForChecksum(String checksum) { final query = _db.remoteAssetEntity.select()..where((row) => row.checksum.equals(checksum)); - return query.map((row) => row.toDto()).getSingleOrNull(); + return query.map((row) => row.toDto()).get(); } Future> getStackChildren(RemoteAsset asset) { @@ -116,18 +117,6 @@ class RemoteAssetRepository extends DriftDatabaseRepository { }).get(); } - Future updateFavorite(List ids, bool isFavorite) { - return _db.batch((batch) async { - for (final id in ids) { - batch.update( - _db.remoteAssetEntity, - RemoteAssetEntityCompanion(isFavorite: Value(isFavorite)), - where: (e) => e.id.equals(id), - ); - } - }); - } - Future updateVisibility(List ids, AssetVisibility visibility) { return _db.batch((batch) async { for (final id in ids) { @@ -182,38 +171,6 @@ class RemoteAssetRepository extends DriftDatabaseRepository { }); } - Future updateLocation(List ids, LatLng location) { - return _db.batch((batch) async { - for (final id in ids) { - batch.update( - _db.remoteExifEntity, - RemoteExifEntityCompanion(latitude: Value(location.latitude), longitude: Value(location.longitude)), - where: (e) => e.assetId.equals(id), - ); - } - }); - } - - Future updateDateTime(List ids, DateTime dateTime, {String? timeZone}) { - return _db.batch((batch) async { - for (final id in ids) { - batch.update( - _db.remoteExifEntity, - RemoteExifEntityCompanion( - dateTimeOriginal: Value(dateTime), - timeZone: timeZone == null ? const Value.absent() : Value(timeZone), - ), - where: (e) => e.assetId.equals(id), - ); - batch.update( - _db.remoteAssetEntity, - RemoteAssetEntityCompanion(createdAt: Value(dateTime)), - where: (e) => e.id.equals(id), - ); - } - }); - } - Future stack(String userId, StackResponse stack) { return _db.transaction(() async { final stackIds = await _db.managers.stackEntity @@ -286,4 +243,59 @@ class RemoteAssetRepository extends DriftDatabaseRepository { ..orderBy([(row) => OrderingTerm.asc(row.sequence)]); return query.map((row) => row.toDto()!).get(); } + + Future update( + List remoteIds, { + Option isFavorite = const .none(), + Option visibility = const .none(), + Option createdAt = const .none(), + }) async { + if ([isFavorite, visibility, createdAt].every((option) => option.isNone)) { + return; + } + + final companion = RemoteAssetEntityCompanion( + visibility: visibility.toDriftValue(), + isFavorite: isFavorite.toDriftValue(), + createdAt: createdAt.toDriftValue(), + ); + return _db.batch((batch) { + for (final remoteId in remoteIds) { + batch.update(_db.remoteAssetEntity, companion, where: (e) => e.id.equals(remoteId)); + } + }); + } + + // TODO(shenlong): remove after action migration + Future updateLocation(List ids, LatLng location) { + return _db.batch((batch) async { + for (final id in ids) { + batch.update( + _db.remoteExifEntity, + RemoteExifEntityCompanion(latitude: Value(location.latitude), longitude: Value(location.longitude)), + where: (e) => e.assetId.equals(id), + ); + } + }); + } + + Future updateDateTime(List ids, DateTime dateTime, {String? timeZone}) { + return _db.batch((batch) async { + for (final id in ids) { + batch.update( + _db.remoteExifEntity, + RemoteExifEntityCompanion( + dateTimeOriginal: Value(dateTime), + timeZone: timeZone == null ? const Value.absent() : Value(timeZone), + ), + where: (e) => e.assetId.equals(id), + ); + batch.update( + _db.remoteAssetEntity, + RemoteAssetEntityCompanion(createdAt: Value(dateTime)), + where: (e) => e.id.equals(id), + ); + } + }); + } } diff --git a/mobile/lib/infrastructure/repositories/remote_exif.repository.dart b/mobile/lib/infrastructure/repositories/remote_exif.repository.dart new file mode 100644 index 0000000000..568342b321 --- /dev/null +++ b/mobile/lib/infrastructure/repositories/remote_exif.repository.dart @@ -0,0 +1,34 @@ +import 'package:immich_mobile/infrastructure/entities/exif.entity.drift.dart'; +import 'package:immich_mobile/infrastructure/repositories/db.repository.dart'; +import 'package:immich_mobile/utils/option.dart'; +import 'package:maplibre_gl/maplibre_gl.dart'; + +class RemoteExifRepository extends DriftDatabaseRepository { + final Drift _db; + + const RemoteExifRepository(this._db) : super(_db); + + Future update( + List ids, { + Option dateTimeOriginal = const .none(), + Option timeZone = const .none(), + Option location = const .none(), + }) async { + if ([dateTimeOriginal, timeZone, location].every((option) => option.isNone)) { + return; + } + + final companion = RemoteExifEntityCompanion( + dateTimeOriginal: dateTimeOriginal.toDriftValue(), + timeZone: timeZone.toDriftValue(), + latitude: location.map((loc) => loc.latitude).toDriftValue(), + longitude: location.map((loc) => loc.longitude).toDriftValue(), + ); + + return _db.batch((batch) { + for (final id in ids) { + batch.update(_db.remoteExifEntity, companion, where: (a) => a.assetId.equals(id)); + } + }); + } +} diff --git a/mobile/lib/infrastructure/repositories/search_api.repository.dart b/mobile/lib/infrastructure/repositories/search_api.repository.dart index 395d4045cf..dec6e1d167 100644 --- a/mobile/lib/infrastructure/repositories/search_api.repository.dart +++ b/mobile/lib/infrastructure/repositories/search_api.repository.dart @@ -21,28 +21,28 @@ class SearchApiRepository extends ApiRepository { (filter.assetId != null && filter.assetId!.isNotEmpty)) { return _api.searchSmart( SmartSearchDto( - query: filter.context == null ? const Optional.absent() : Optional.present(filter.context!), - queryAssetId: filter.assetId == null ? const Optional.absent() : Optional.present(filter.assetId!), - language: filter.language == null ? const Optional.absent() : Optional.present(filter.language!), + query: filter.context == null ? const Optional.absent() : Optional.present(filter.context), + queryAssetId: filter.assetId == null ? const Optional.absent() : Optional.present(filter.assetId), + language: filter.language == null ? const Optional.absent() : Optional.present(filter.language), country: filter.location.country == null ? const Optional.absent() - : Optional.present(filter.location.country!), - state: filter.location.state == null ? const Optional.absent() : Optional.present(filter.location.state!), - city: filter.location.city == null ? const Optional.absent() : Optional.present(filter.location.city!), - make: filter.camera.make == null ? const Optional.absent() : Optional.present(filter.camera.make!), - model: filter.camera.model == null ? const Optional.absent() : Optional.present(filter.camera.model!), + : Optional.present(filter.location.country), + state: filter.location.state == null ? const Optional.absent() : Optional.present(filter.location.state), + city: filter.location.city == null ? const Optional.absent() : Optional.present(filter.location.city), + make: filter.camera.make == null ? const Optional.absent() : Optional.present(filter.camera.make), + model: filter.camera.model == null ? const Optional.absent() : Optional.present(filter.camera.model), takenAfter: filter.date.takenAfter == null ? const Optional.absent() - : Optional.present(filter.date.takenAfter!), + : Optional.present(filter.date.takenAfter), takenBefore: filter.date.takenBefore == null ? const Optional.absent() - : Optional.present(filter.date.takenBefore!), + : Optional.present(filter.date.takenBefore), visibility: Optional.present(filter.display.isArchive ? AssetVisibility.archive : AssetVisibility.timeline), rating: filter.rating.rating.toOptional(), isFavorite: filter.display.isFavorite ? const Optional.present(true) : const Optional.absent(), isNotInAlbum: filter.display.isNotInAlbum ? const Optional.present(true) : const Optional.absent(), personIds: Optional.present(filter.people.map((e) => e.id).toList()), - tagIds: filter.tagIds == null ? const Optional.absent() : Optional.present(filter.tagIds!), + tagIds: filter.tagIds == null ? const Optional.absent() : Optional.present(filter.tagIds), type: type == null ? const Optional.absent() : Optional.present(type), page: Optional.present(page), size: const Optional.present(100), @@ -53,29 +53,27 @@ class SearchApiRepository extends ApiRepository { return _api.searchAssets( MetadataSearchDto( originalFileName: filter.filename != null && filter.filename!.isNotEmpty - ? Optional.present(filter.filename!) + ? Optional.present(filter.filename) : const Optional.absent(), - country: filter.location.country == null ? const Optional.absent() : Optional.present(filter.location.country!), + country: filter.location.country == null ? const Optional.absent() : Optional.present(filter.location.country), description: filter.description != null && filter.description!.isNotEmpty - ? Optional.present(filter.description!) + ? Optional.present(filter.description) : const Optional.absent(), - ocr: filter.ocr != null && filter.ocr!.isNotEmpty ? Optional.present(filter.ocr!) : const Optional.absent(), - state: filter.location.state == null ? const Optional.absent() : Optional.present(filter.location.state!), - city: filter.location.city == null ? const Optional.absent() : Optional.present(filter.location.city!), - make: filter.camera.make == null ? const Optional.absent() : Optional.present(filter.camera.make!), - model: filter.camera.model == null ? const Optional.absent() : Optional.present(filter.camera.model!), - takenAfter: filter.date.takenAfter == null - ? const Optional.absent() - : Optional.present(filter.date.takenAfter!), + ocr: filter.ocr != null && filter.ocr!.isNotEmpty ? Optional.present(filter.ocr) : const Optional.absent(), + state: filter.location.state == null ? const Optional.absent() : Optional.present(filter.location.state), + city: filter.location.city == null ? const Optional.absent() : Optional.present(filter.location.city), + make: filter.camera.make == null ? const Optional.absent() : Optional.present(filter.camera.make), + model: filter.camera.model == null ? const Optional.absent() : Optional.present(filter.camera.model), + takenAfter: filter.date.takenAfter == null ? const Optional.absent() : Optional.present(filter.date.takenAfter), takenBefore: filter.date.takenBefore == null ? const Optional.absent() - : Optional.present(filter.date.takenBefore!), + : Optional.present(filter.date.takenBefore), visibility: Optional.present(filter.display.isArchive ? AssetVisibility.archive : AssetVisibility.timeline), rating: filter.rating.rating.toOptional(), isFavorite: filter.display.isFavorite ? const Optional.present(true) : const Optional.absent(), isNotInAlbum: filter.display.isNotInAlbum ? const Optional.present(true) : const Optional.absent(), personIds: Optional.present(filter.people.map((e) => e.id).toList()), - tagIds: filter.tagIds == null ? const Optional.absent() : Optional.present(filter.tagIds!), + tagIds: filter.tagIds == null ? const Optional.absent() : Optional.present(filter.tagIds), type: type == null ? const Optional.absent() : Optional.present(type), page: Optional.present(page), size: const Optional.present(1000), diff --git a/mobile/lib/infrastructure/repositories/settings.repository.dart b/mobile/lib/infrastructure/repositories/settings.repository.dart index c974963f6a..c5f8fb48d8 100644 --- a/mobile/lib/infrastructure/repositories/settings.repository.dart +++ b/mobile/lib/infrastructure/repositories/settings.repository.dart @@ -1,13 +1,15 @@ -import 'package:collection/collection.dart'; +import 'package:drift/drift.dart'; +import 'package:flutter/foundation.dart'; import 'package:immich_mobile/domain/models/config/app_config.dart'; import 'package:immich_mobile/domain/models/settings_key.dart'; import 'package:immich_mobile/infrastructure/entities/settings.entity.drift.dart'; +import 'package:immich_mobile/infrastructure/repositories/cached_key_value_repository.dart'; import 'package:immich_mobile/infrastructure/repositories/db.repository.dart'; -class SettingsRepository extends DriftDatabaseRepository { +class SettingsRepository extends CachedKeyValueRepository { final Drift _db; - SettingsRepository._(this._db) : super(_db); + SettingsRepository._(this._db) : super(const .new()); static SettingsRepository? _instance; @@ -19,9 +21,6 @@ class SettingsRepository extends DriftDatabaseRepository { return instance; } - AppConfig _appConfig = const .new(); - AppConfig get appConfig => _appConfig; - static Future ensureInitialized(Drift db) async { if (_instance == null) { final instance = SettingsRepository._(db); @@ -31,7 +30,29 @@ class SettingsRepository extends DriftDatabaseRepository { return _instance!; } - Future refresh() async => _applyOverrides(await _db.select(_db.settingsEntity).get()); + @visibleForTesting + static Future reset() async { + final instance = _instance; + if (instance != null) { + await instance.clear(SettingsKey.values); + _instance = null; + } + } + + @override + List get keys => SettingsKey.values; + + @override + Object decodeValue(SettingsKey key, String raw) => key.decode(raw); + + @override + AppConfig buildSnapshot(Map overrides) => AppConfig.fromEntries(overrides); + + @override + Selectable<({String key, String? value})> selectable() => + _db.select(_db.settingsEntity).map((row) => (key: row.key, value: row.value)); + + AppConfig get appConfig => snapshot; Future clear(Iterable keys) async { if (keys.isEmpty) { @@ -41,13 +62,15 @@ class SettingsRepository extends DriftDatabaseRepository { final names = keys.map((key) => key.name).toList(); await (_db.delete(_db.settingsEntity)..where((row) => row.key.isIn(names))).go(); + var config = snapshot; for (final key in keys) { - _appConfig = _appConfig.write(key, defaultConfig.read(key)); + config = config.write(key, defaultConfig.read(key)); } + snapshot = config; } Future write(SettingsKey key, U value) async { - if (value == _appConfig.read(key)) { + if (value == snapshot.read(key)) { return; } @@ -65,29 +88,8 @@ class SettingsRepository extends DriftDatabaseRepository { .insertOnConflictUpdate( SettingsEntityCompanion.insert(key: key.name, value: .new(resolvedValue), updatedAt: .new(DateTime.now())), ); - _appConfig = _appConfig.write(key, value); + snapshot = snapshot.write(key, value); } - Stream watchConfig() => _db.select(_db.settingsEntity).watch().map((rows) { - _applyOverrides(rows); - return _appConfig; - }); - - void _applyOverrides(List rows) { - _appConfig = AppConfig.fromEntries( - rows.fold({}, (overrides, row) { - final metadataKey = SettingsKey.values.firstWhereOrNull((key) => key.name == row.key); - if (metadataKey == null) { - return overrides; - } - - Object? decodedValue; - if (row.value != null) { - decodedValue = metadataKey.decode(row.value!); - } - - return {...overrides, metadataKey: decodedValue}; - }), - ); - } + Stream watchConfig() => watchSnapshot(); } diff --git a/mobile/lib/infrastructure/repositories/storage.repository.dart b/mobile/lib/infrastructure/repositories/storage.repository.dart index eaa6ce79f7..9500190abc 100644 --- a/mobile/lib/infrastructure/repositories/storage.repository.dart +++ b/mobile/lib/infrastructure/repositories/storage.repository.dart @@ -1,3 +1,5 @@ +// ignore_for_file: avoid_slow_async_io + import 'dart:io'; import 'package:immich_mobile/domain/models/asset/base_asset.model.dart'; @@ -33,6 +35,7 @@ class StorageRepository { return file; } + // TODO(agg23): Unify these methods Future getMotionFileForAsset(LocalAsset asset) async { File? file; final log = Logger('StorageRepository'); diff --git a/mobile/lib/infrastructure/repositories/sync_api.repository.dart b/mobile/lib/infrastructure/repositories/sync_api.repository.dart index e9d57f7506..4e27da1a3d 100644 --- a/mobile/lib/infrastructure/repositories/sync_api.repository.dart +++ b/mobile/lib/infrastructure/repositories/sync_api.repository.dart @@ -3,6 +3,7 @@ import 'dart:convert'; import 'package:http/http.dart' as http; import 'package:immich_mobile/constants/constants.dart'; +import 'package:immich_mobile/domain/models/server_capability.model.dart'; import 'package:immich_mobile/domain/models/sync_event.model.dart'; import 'package:immich_mobile/infrastructure/repositories/network.repository.dart'; import 'package:immich_mobile/services/api.service.dart'; @@ -44,25 +45,16 @@ class SyncApiRepository { types: [ SyncRequestType.authUsersV1, SyncRequestType.usersV1, - serverVersion >= const SemVer(major: 3, minor: 0, patch: 0) - ? SyncRequestType.assetsV2 - : SyncRequestType.assetsV1, + serverVersion.supports(.syncV2) ? SyncRequestType.assetsV2 : SyncRequestType.assetsV1, SyncRequestType.assetExifsV1, - if (serverVersion >= const SemVer(major: 2, minor: 6, patch: 0)) SyncRequestType.assetEditsV1, + if (serverVersion.supports(.assetEdits)) SyncRequestType.assetEditsV1, SyncRequestType.assetMetadataV1, SyncRequestType.partnersV1, - serverVersion >= const SemVer(major: 3, minor: 0, patch: 0) - ? SyncRequestType.partnerAssetsV2 - : SyncRequestType.partnerAssetsV1, + serverVersion.supports(.syncV2) ? SyncRequestType.partnerAssetsV2 : SyncRequestType.partnerAssetsV1, SyncRequestType.partnerAssetExifsV1, - if (serverVersion < const SemVer(major: 3, minor: 0, patch: 0)) - SyncRequestType.albumsV1 - else - SyncRequestType.albumsV2, + serverVersion.supports(.syncV2) ? SyncRequestType.albumsV2 : SyncRequestType.albumsV1, SyncRequestType.albumUsersV1, - serverVersion >= const SemVer(major: 3, minor: 0, patch: 0) - ? SyncRequestType.albumAssetsV2 - : SyncRequestType.albumAssetsV1, + serverVersion.supports(.syncV2) ? SyncRequestType.albumAssetsV2 : SyncRequestType.albumAssetsV1, SyncRequestType.albumAssetExifsV1, SyncRequestType.albumToAssetsV1, SyncRequestType.memoriesV1, @@ -71,16 +63,14 @@ class SyncApiRepository { SyncRequestType.partnerStacksV1, SyncRequestType.userMetadataV1, SyncRequestType.peopleV1, - serverVersion >= const SemVer(major: 2, minor: 6, patch: 0) - ? SyncRequestType.assetFacesV2 - : SyncRequestType.assetFacesV1, - if (serverVersion >= const SemVer(major: 3, minor: 0, patch: 0)) SyncRequestType.assetOcrV1, + serverVersion.supports(.assetFacesV2) ? SyncRequestType.assetFacesV2 : SyncRequestType.assetFacesV1, + if (serverVersion.supports(.assetOcr)) SyncRequestType.assetOcrV1, ], ).toJson(), ); String previousChunk = ''; - List lines = []; + final List lines = []; bool shouldAbort = false; @@ -105,7 +95,7 @@ class SyncApiRepository { } previousChunk += chunk; - final parts = previousChunk.toString().split('\n'); + final parts = previousChunk.split('\n'); previousChunk = parts.removeLast(); lines.addAll(parts); diff --git a/mobile/lib/infrastructure/repositories/sync_stream.repository.dart b/mobile/lib/infrastructure/repositories/sync_stream.repository.dart index 8de76f1412..c43de69c5d 100644 --- a/mobile/lib/infrastructure/repositories/sync_stream.repository.dart +++ b/mobile/lib/infrastructure/repositories/sync_stream.repository.dart @@ -31,8 +31,8 @@ import 'package:immich_mobile/infrastructure/entities/user_metadata.entity.drift import 'package:immich_mobile/infrastructure/repositories/db.repository.dart'; import 'package:immich_mobile/infrastructure/utils/exif.converter.dart'; import 'package:logging/logging.dart'; -import 'package:openapi/api.dart' as api show AssetVisibility, AlbumUserRole, UserMetadataKey, AssetEditAction; -import 'package:openapi/api.dart' hide UserMetadataKey, AssetEditAction, AssetVisibility, AlbumUserRole; +import 'package:openapi/api.dart' as api show AlbumUserRole, AssetEditAction, AssetVisibility, UserMetadataKey; +import 'package:openapi/api.dart' hide AlbumUserRole, AssetEditAction, AssetVisibility, UserMetadataKey; class SyncStreamRepository extends DriftDatabaseRepository { final Logger _logger = Logger('DriftSyncStreamRepository'); @@ -287,8 +287,8 @@ class SyncStreamRepository extends DriftDatabaseRepository { fNumber: Value(exif.fNumber), fileSize: Value(exif.fileSizeInByte), focalLength: Value(exif.focalLength), - latitude: Value(exif.latitude?.toDouble()), - longitude: Value(exif.longitude?.toDouble()), + latitude: Value(exif.latitude), + longitude: Value(exif.longitude), iso: Value(exif.iso), make: Value(exif.make), model: Value(exif.model), @@ -358,12 +358,12 @@ class SyncStreamRepository extends DriftDatabaseRepository { final map = metadata.value as Map; final companion = RemoteAssetCloudIdEntityCompanion( cloudId: Value(map['iCloudId']?.toString()), - createdAt: Value(map['createdAt'] != null ? DateTime.parse(map['createdAt'] as String) : null), + createdAt: Value(map['createdAt'] != null ? DateTime.parse(map['createdAt']! as String) : null), adjustmentTime: Value( - map['adjustmentTime'] != null ? DateTime.parse(map['adjustmentTime'] as String) : null, + map['adjustmentTime'] != null ? DateTime.parse(map['adjustmentTime']! as String) : null, ), - latitude: Value(map['latitude'] != null ? (double.tryParse(map['latitude'] as String)) : null), - longitude: Value(map['longitude'] != null ? (double.tryParse(map['longitude'] as String)) : null), + latitude: Value(map['latitude'] != null ? (double.tryParse(map['latitude']! as String)) : null), + longitude: Value(map['longitude'] != null ? (double.tryParse(map['longitude']! as String)) : null), ); batch.insert( _db.remoteAssetCloudIdEntity, @@ -937,7 +937,6 @@ extension on AssetTypeEnum { AssetTypeEnum.VIDEO => AssetType.video, AssetTypeEnum.AUDIO => AssetType.audio, AssetTypeEnum.OTHER => AssetType.other, - _ => throw Exception('Unknown AssetType value: $this'), }; } @@ -945,14 +944,12 @@ extension on AssetOrder { AlbumAssetOrder toAlbumAssetOrder() => switch (this) { AssetOrder.asc => AlbumAssetOrder.asc, AssetOrder.desc => AlbumAssetOrder.desc, - _ => throw Exception('Unknown AssetOrder value: $this'), }; } extension on MemoryType { MemoryTypeEnum toMemoryType() => switch (this) { MemoryType.onThisDay => MemoryTypeEnum.onThisDay, - _ => throw Exception('Unknown MemoryType value: $this'), }; } @@ -961,7 +958,6 @@ extension on api.AlbumUserRole { api.AlbumUserRole.editor => AlbumUserRole.editor, api.AlbumUserRole.viewer => AlbumUserRole.viewer, api.AlbumUserRole.owner => AlbumUserRole.owner, - _ => throw Exception('Unknown AlbumUserRole value: $this'), }; } @@ -971,7 +967,6 @@ extension on api.AssetVisibility { api.AssetVisibility.hidden => AssetVisibility.hidden, api.AssetVisibility.archive => AssetVisibility.archive, api.AssetVisibility.locked => AssetVisibility.locked, - _ => throw Exception('Unknown AssetVisibility value: $this'), }; } @@ -980,12 +975,11 @@ extension on api.UserMetadataKey { api.UserMetadataKey.onboarding => UserMetadataKey.onboarding, api.UserMetadataKey.preferences => UserMetadataKey.preferences, api.UserMetadataKey.license => UserMetadataKey.license, - _ => throw Exception('Unknown UserMetadataKey value: $this'), }; } extension on UserAvatarColor { - AvatarColor? toAvatarColor() => AvatarColor.values.firstWhereOrNull((c) => c.name == value); + AvatarColor? toAvatarColor() => AvatarColor.values.firstWhereOrNull((c) => c.name == toString()); } extension on api.AssetEditAction { @@ -993,6 +987,5 @@ extension on api.AssetEditAction { api.AssetEditAction.crop => AssetEditAction.crop, api.AssetEditAction.rotate => AssetEditAction.rotate, api.AssetEditAction.mirror => AssetEditAction.mirror, - _ => AssetEditAction.other, }; } diff --git a/mobile/lib/infrastructure/repositories/timeline.repository.dart b/mobile/lib/infrastructure/repositories/timeline.repository.dart index 9c4501b665..82ad38c80f 100644 --- a/mobile/lib/infrastructure/repositories/timeline.repository.dart +++ b/mobile/lib/infrastructure/repositories/timeline.repository.dart @@ -2,9 +2,9 @@ import 'dart:async'; import 'package:drift/drift.dart'; import 'package:easy_localization/easy_localization.dart'; -import 'package:immich_mobile/constants/constants.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/domain/models/time_range.model.dart'; import 'package:immich_mobile/domain/models/timeline.model.dart'; import 'package:immich_mobile/domain/services/timeline.service.dart'; import 'package:immich_mobile/infrastructure/entities/local_asset.entity.dart'; @@ -21,6 +21,7 @@ class TimelineMapOptions { final bool includeArchived; final bool withPartners; final int relativeDays; + final TimeRange timeRange; const TimelineMapOptions({ required this.bounds, @@ -28,6 +29,7 @@ class TimelineMapOptions { this.includeArchived = false, this.withPartners = false, this.relativeDays = 0, + this.timeRange = const TimeRange(), }); } @@ -137,11 +139,6 @@ class DriftTimelineRepository extends DriftDatabaseRepository { _db.localAlbumAssetEntity.assetId.equalsExp(_db.localAssetEntity.id), useColumns: false, ), - leftOuterJoin( - _db.remoteAssetEntity, - _db.localAssetEntity.checksum.equalsExp(_db.remoteAssetEntity.checksum), - useColumns: false, - ), ]) ..addColumns([assetCountExp, dateExp]) ..where(_db.localAlbumAssetEntity.albumId.equals(albumId)) @@ -165,7 +162,12 @@ class DriftTimelineRepository extends DriftDatabaseRepository { ), leftOuterJoin( _db.remoteAssetEntity, - _db.localAssetEntity.checksum.equalsExp(_db.remoteAssetEntity.checksum), + _db.localAssetEntity.checksum.equalsExp(_db.remoteAssetEntity.checksum) & + _db.remoteAssetEntity.ownerId.isInQuery( + _db.selectOnly(_db.authUserEntity) + ..addColumns([_db.authUserEntity.id]) + ..limit(1), + ), useColumns: false, ), ]) @@ -553,8 +555,21 @@ class DriftTimelineRepository extends DriftDatabaseRepository { query.where(_db.remoteAssetEntity.isFavorite.equals(true)); } - if (options.relativeDays != 0) { + final timeRange = options.timeRange; + + final hasCustomRange = timeRange.from != null || timeRange.to != null; + + if (hasCustomRange) { + if (timeRange.from != null) { + query.where(_db.remoteAssetEntity.createdAt.isBiggerOrEqualValue(timeRange.from!)); + } + + if (timeRange.to != null) { + query.where(_db.remoteAssetEntity.createdAt.isSmallerOrEqualValue(timeRange.to!)); + } + } else if (options.relativeDays > 0) { final cutoffDate = DateTime.now().toUtc().subtract(Duration(days: options.relativeDays)); + query.where(_db.remoteAssetEntity.createdAt.isBiggerOrEqualValue(cutoffDate)); } @@ -595,8 +610,21 @@ class DriftTimelineRepository extends DriftDatabaseRepository { query.where(_db.remoteAssetEntity.isFavorite.equals(true)); } - if (options.relativeDays != 0) { + final timeRange = options.timeRange; + + final hasCustomRange = timeRange.from != null || timeRange.to != null; + + if (hasCustomRange) { + if (timeRange.from != null) { + query.where(_db.remoteAssetEntity.createdAt.isBiggerOrEqualValue(timeRange.from!)); + } + + if (timeRange.to != null) { + query.where(_db.remoteAssetEntity.createdAt.isSmallerOrEqualValue(timeRange.to!)); + } + } else if (options.relativeDays > 0) { final cutoffDate = DateTime.now().toUtc().subtract(Duration(days: options.relativeDays)); + query.where(_db.remoteAssetEntity.createdAt.isBiggerOrEqualValue(cutoffDate)); } @@ -614,7 +642,7 @@ class DriftTimelineRepository extends DriftDatabaseRepository { return ( bucketSource: () => _watchRemoteBucket(filter: filter, groupBy: groupBy, sortBy: sortBy), assetSource: (offset, count) => - _getRemoteAssets(filter: filter, offset: offset, count: count, joinLocal: joinLocal), + _getRemoteAssets(filter: filter, offset: offset, count: count, joinLocal: joinLocal, sortBy: sortBy), origin: origin, ); } @@ -651,6 +679,7 @@ class DriftTimelineRepository extends DriftDatabaseRepository { required int offset, required int count, bool joinLocal = false, + SortAssetsBy sortBy = SortAssetsBy.taken, }) { if (joinLocal) { final query = @@ -663,7 +692,11 @@ class DriftTimelineRepository extends DriftDatabaseRepository { ]) ..addColumns([_db.localAssetEntity.id]) ..where(filter(_db.remoteAssetEntity)) - ..orderBy([OrderingTerm.desc(_db.remoteAssetEntity.createdAt)]) + ..orderBy([ + OrderingTerm.desc( + sortBy == SortAssetsBy.uploaded ? _db.remoteAssetEntity.uploadedAt : _db.remoteAssetEntity.createdAt, + ), + ]) ..limit(count, offset: offset); return query @@ -672,7 +705,7 @@ class DriftTimelineRepository extends DriftDatabaseRepository { } else { final query = _db.remoteAssetEntity.select() ..where(filter) - ..orderBy([(row) => OrderingTerm.desc(row.createdAt)]) + ..orderBy([(row) => OrderingTerm.desc(sortBy == SortAssetsBy.uploaded ? row.uploadedAt : row.createdAt)]) ..limit(count, offset: offset); return query.map((row) => row.toDto()).get(); @@ -680,16 +713,7 @@ class DriftTimelineRepository extends DriftDatabaseRepository { } } -List _generateBuckets(int count) { - final buckets = List.filled( - (count / kTimelineNoneSegmentSize).ceil(), - const Bucket(assetCount: kTimelineNoneSegmentSize), - ); - if (count % kTimelineNoneSegmentSize != 0) { - buckets[buckets.length - 1] = Bucket(assetCount: count % kTimelineNoneSegmentSize); - } - return buckets; -} +List _generateBuckets(int count) => count == 0 ? const [] : [Bucket(assetCount: count)]; extension on Expression { Expression dateFmt(GroupAssetsBy groupBy, {bool toLocal = false}) { diff --git a/mobile/lib/infrastructure/repositories/trashed_local_asset.repository.dart b/mobile/lib/infrastructure/repositories/trashed_local_asset.repository.dart index 08712588d9..0f50776e4e 100644 --- a/mobile/lib/infrastructure/repositories/trashed_local_asset.repository.dart +++ b/mobile/lib/infrastructure/repositories/trashed_local_asset.repository.dart @@ -16,6 +16,11 @@ class DriftTrashedLocalAssetRepository extends DriftDatabaseRepository { const DriftTrashedLocalAssetRepository(this._db) : super(_db); + /// Matches remote_asset_entity rows owned by the current user. The asset is unique over (owner, checksum), + /// so partners can have a duplicate checksum + Expression get _ownedByCurrentUser => + _db.remoteAssetEntity.ownerId.isInQuery(_db.selectOnly(_db.authUserEntity)..addColumns([_db.authUserEntity.id])); + Future updateHashes(Map hashes) { if (hashes.isEmpty) { return Future.value(); @@ -45,7 +50,7 @@ class DriftTrashedLocalAssetRepository extends DriftDatabaseRepository { await (_db.select(_db.trashedLocalAssetEntity).join([ innerJoin( _db.remoteAssetEntity, - _db.remoteAssetEntity.checksum.equalsExp(_db.trashedLocalAssetEntity.checksum), + _db.remoteAssetEntity.checksum.equalsExp(_db.trashedLocalAssetEntity.checksum) & _ownedByCurrentUser, ), ])..where( _db.trashedLocalAssetEntity.source.equalsValue(TrashOrigin.remoteSync) & @@ -66,7 +71,7 @@ class DriftTrashedLocalAssetRepository extends DriftDatabaseRepository { return; } final assetIds = trashedAssets.map((e) => e.asset.id).toSet(); - Map localChecksumById = await _getCachedChecksums(assetIds); + final Map localChecksumById = await _getCachedChecksums(assetIds); return _db.transaction(() async { await _db.batch((batch) { @@ -273,7 +278,7 @@ class DriftTrashedLocalAssetRepository extends DriftDatabaseRepository { innerJoin(_db.localAssetEntity, _db.localAlbumAssetEntity.assetId.equalsExp(_db.localAssetEntity.id)), leftOuterJoin( _db.remoteAssetEntity, - _db.remoteAssetEntity.checksum.equalsExp(_db.localAssetEntity.checksum), + _db.remoteAssetEntity.checksum.equalsExp(_db.localAssetEntity.checksum) & _ownedByCurrentUser, ), ])..where( _db.localAlbumEntity.backupSelection.equalsValue(BackupSelection.selected) & diff --git a/mobile/lib/infrastructure/utils/exif.converter.dart b/mobile/lib/infrastructure/utils/exif.converter.dart index 9f9b6f9324..d47c9cc97a 100644 --- a/mobile/lib/infrastructure/utils/exif.converter.dart +++ b/mobile/lib/infrastructure/utils/exif.converter.dart @@ -21,7 +21,7 @@ abstract final class ExifDtoConverter { lens: dto.lensModel.orElse(null), f: dto.fNumber.orElse(null)?.toDouble(), mm: dto.focalLength.orElse(null)?.toDouble(), - iso: dto.iso.orElse(null)?.toInt(), + iso: dto.iso.orElse(null), exposureSeconds: exposureTimeToSeconds(dto.exposureTime.orElse(null)), ); } @@ -40,7 +40,7 @@ abstract final class ExifDtoConverter { if (second == null) { return null; } - double? value = double.tryParse(second); + final double? value = double.tryParse(second); if (value != null) { return value; } diff --git a/mobile/lib/main.dart b/mobile/lib/main.dart index f576a7c63c..2f1cfdaf6a 100644 --- a/mobile/lib/main.dart +++ b/mobile/lib/main.dart @@ -16,7 +16,6 @@ import 'package:immich_mobile/constants/constants.dart'; import 'package:immich_mobile/constants/locales.dart'; import 'package:immich_mobile/domain/services/background_worker.service.dart'; import 'package:immich_mobile/extensions/build_context_extensions.dart'; -import 'package:immich_mobile/extensions/translate_extensions.dart'; import 'package:immich_mobile/generated/codegen_loader.g.dart'; import 'package:immich_mobile/generated/translations.g.dart'; import 'package:immich_mobile/infrastructure/repositories/network.repository.dart'; @@ -24,13 +23,13 @@ import 'package:immich_mobile/pages/common/splash_screen.page.dart'; import 'package:immich_mobile/platform/background_worker_lock_api.g.dart'; import 'package:immich_mobile/providers/app_life_cycle.provider.dart'; import 'package:immich_mobile/providers/asset_viewer/share_intent_upload.provider.dart'; -import 'package:immich_mobile/providers/view_intent/view_intent_handler.provider.dart'; import 'package:immich_mobile/providers/infrastructure/db.provider.dart'; -import 'package:immich_mobile/providers/infrastructure/settings.provider.dart'; import 'package:immich_mobile/providers/infrastructure/platform.provider.dart'; +import 'package:immich_mobile/providers/infrastructure/settings.provider.dart'; import 'package:immich_mobile/providers/locale_provider.dart'; import 'package:immich_mobile/providers/routes.provider.dart'; import 'package:immich_mobile/providers/theme.provider.dart'; +import 'package:immich_mobile/providers/view_intent/view_intent_handler.provider.dart'; import 'package:immich_mobile/routing/app_navigation_observer.dart'; import 'package:immich_mobile/routing/router.dart'; import 'package:immich_mobile/services/deep_link.service.dart'; @@ -84,7 +83,7 @@ Future initApp() async { FlutterError.presentError(details); log.severe( 'FlutterError - Catch all', - "${details.toString()}\nException: ${details.exception}\nLibrary: ${details.library}\nContext: ${details.context}", + "$details\nException: ${details.exception}\nLibrary: ${details.library}\nContext: ${details.context}", details.stack, ); }; @@ -128,44 +127,28 @@ class ImmichAppState extends ConsumerState with WidgetsBindingObserve switch (state) { case AppLifecycleState.resumed: dPrint(() => "[APP STATE] resumed"); - ref.read(appStateProvider.notifier).handleAppResume(); + unawaited(ref.read(appStateProvider.notifier).handleAppResume()); unawaited(ref.read(viewIntentHandlerProvider).onAppResumed()); - break; case AppLifecycleState.inactive: dPrint(() => "[APP STATE] inactive"); ref.read(appStateProvider.notifier).handleAppInactivity(); - break; case AppLifecycleState.paused: dPrint(() => "[APP STATE] paused"); - ref.read(appStateProvider.notifier).handleAppPause(); - break; + unawaited(ref.read(appStateProvider.notifier).handleAppPause()); case AppLifecycleState.detached: dPrint(() => "[APP STATE] detached"); - ref.read(appStateProvider.notifier).handleAppDetached(); - break; + unawaited(ref.read(appStateProvider.notifier).handleAppDetached()); case AppLifecycleState.hidden: dPrint(() => "[APP STATE] hidden"); ref.read(appStateProvider.notifier).handleAppHidden(); - break; } } Future initApp() async { WidgetsBinding.instance.addObserver(this); - // Draw the app from edge to edge unawaited(SystemChrome.setEnabledSystemUIMode(SystemUiMode.edgeToEdge)); - - // Sets the navigation bar color - SystemUiOverlayStyle overlayStyle = const SystemUiOverlayStyle(systemNavigationBarColor: Colors.transparent); - if (Platform.isAndroid) { - // Android 8 does not support transparent app bars - final info = await DeviceInfoPlugin().androidInfo; - if (info.version.sdkInt <= 26) { - overlayStyle = context.isDarkTheme ? SystemUiOverlayStyle.dark : SystemUiOverlayStyle.light; - } - } - SystemChrome.setSystemUIOverlayStyle(overlayStyle); + await _setNavigationBarColor(); await FlutterLocalNotificationsPlugin().initialize( const InitializationSettings( @@ -175,6 +158,22 @@ class ImmichAppState extends ConsumerState with WidgetsBindingObserve ); } + Future _setNavigationBarColor() async { + SystemUiOverlayStyle overlayStyle = const SystemUiOverlayStyle(systemNavigationBarColor: Colors.transparent); + if (Platform.isAndroid) { + // Android 8 does not support transparent app bars + final info = await DeviceInfoPlugin().androidInfo; + if (!mounted) { + return; + } + + if (info.version.sdkInt <= 26) { + overlayStyle = context.isDarkTheme ? SystemUiOverlayStyle.dark : SystemUiOverlayStyle.light; + } + } + SystemChrome.setSystemUIOverlayStyle(overlayStyle); + } + Future _deepLinkBuilder(PlatformDeepLink deepLink) async { final deepLinkHandler = ref.read(deepLinkServiceProvider); final currentRouteName = ref.read(currentRouteNameProvider.notifier).state; @@ -219,19 +218,21 @@ class ImmichAppState extends ConsumerState with WidgetsBindingObserve } @override - initState() { + void initState() { super.initState(); - initApp().then((_) => dPrint(() => "App Init Completed")); + unawaited(initApp().then((_) => dPrint(() => "App Init Completed"))); WidgetsBinding.instance.addPostFrameCallback((_) { // needs to be delayed so that EasyLocalization is working - ref.read(backgroundWorkerFgServiceProvider).enable(); + unawaited(ref.read(backgroundWorkerFgServiceProvider).enable()); if (Platform.isAndroid) { - ref - .read(backgroundWorkerFgServiceProvider) - .saveNotificationMessage( - StaticTranslations.instance.uploading_media, - StaticTranslations.instance.backup_background_service_default_notification, - ); + unawaited( + ref + .read(backgroundWorkerFgServiceProvider) + .saveNotificationMessage( + StaticTranslations.instance.uploading_media, + StaticTranslations.instance.backup_background_service_default_notification, + ), + ); } }); @@ -248,7 +249,7 @@ class ImmichAppState extends ConsumerState with WidgetsBindingObserve @override void reassemble() { if (kDebugMode) { - NetworkRepository.init(); + unawaited(NetworkRepository.init()); } super.reassemble(); } @@ -271,15 +272,12 @@ class ImmichAppState extends ConsumerState with WidgetsBindingObserve darkTheme: getThemeData(colorScheme: immichTheme.dark, locale: context.locale), theme: getThemeData(colorScheme: immichTheme.light, locale: context.locale), builder: (context, child) => ImmichTranslationProvider( - translations: ImmichTranslations( - submit: "submit".t(context: context), - password: "password".t(context: context), - ), + translations: ImmichTranslations(submit: context.t.submit, password: context.t.password), child: ImmichThemeProvider(colorScheme: context.colorScheme, child: child!), ), routerConfig: router.config( deepLinkBuilder: _deepLinkBuilder, - navigatorObservers: () => [AppNavigationObserver(ref: ref)], + navigatorObservers: () => [AppNavigationObserver(ref: ref), TransitioningRouteObserver()], ), ), ); diff --git a/mobile/lib/models/activities/activity.model.dart b/mobile/lib/models/activities/activity.model.dart index d3f99aea64..9a589ef729 100644 --- a/mobile/lib/models/activities/activity.model.dart +++ b/mobile/lib/models/activities/activity.model.dart @@ -1,65 +1,21 @@ +import 'package:flutter/foundation.dart'; +import 'package:freezed_annotation/freezed_annotation.dart'; import 'package:immich_mobile/domain/models/user.model.dart'; +part 'activity.model.freezed.dart'; + enum ActivityType { comment, like } -class Activity { - final String id; - final String? assetId; - final String? comment; - final DateTime createdAt; - final ActivityType type; - final UserDto user; - - const Activity({ - required this.id, - this.assetId, - this.comment, - required this.createdAt, - required this.type, - required this.user, - }); - - Activity copyWith({ - String? id, +@freezed +abstract class Activity with _$Activity { + const factory Activity({ + required String id, String? assetId, String? comment, - DateTime? createdAt, - ActivityType? type, - UserDto? user, - }) { - return Activity( - id: id ?? this.id, - assetId: assetId ?? this.assetId, - comment: comment ?? this.comment, - createdAt: createdAt ?? this.createdAt, - type: type ?? this.type, - user: user ?? this.user, - ); - } - - @override - String toString() { - return 'Activity(id: $id, assetId: $assetId, comment: $comment, createdAt: $createdAt, type: $type, user: $user)'; - } - - @override - bool operator ==(covariant Activity other) { - if (identical(this, other)) { - return true; - } - - return other.id == id && - other.assetId == assetId && - other.comment == comment && - other.createdAt == createdAt && - other.type == type && - other.user == user; - } - - @override - int get hashCode { - return id.hashCode ^ assetId.hashCode ^ comment.hashCode ^ createdAt.hashCode ^ type.hashCode ^ user.hashCode; - } + required DateTime createdAt, + required ActivityType type, + required UserDto user, + }) = _Activity; } class ActivityStats { diff --git a/mobile/lib/models/auth/auth_state.model.dart b/mobile/lib/models/auth/auth_state.model.dart index c8a8018929..0a3bf983b2 100644 --- a/mobile/lib/models/auth/auth_state.model.dart +++ b/mobile/lib/models/auth/auth_state.model.dart @@ -1,71 +1,17 @@ -class AuthState { - final String deviceId; - final String userId; - final String userEmail; - final bool isAuthenticated; - final String name; - final bool isAdmin; - final String profileImagePath; +import 'package:flutter/foundation.dart'; +import 'package:freezed_annotation/freezed_annotation.dart'; - const AuthState({ - required this.deviceId, - required this.userId, - required this.userEmail, - required this.isAuthenticated, - required this.name, - required this.isAdmin, - required this.profileImagePath, - }); +part 'auth_state.model.freezed.dart'; - AuthState copyWith({ - String? deviceId, - String? userId, - String? userEmail, - bool? isAuthenticated, - String? name, - bool? isAdmin, - String? profileImagePath, - }) { - return AuthState( - deviceId: deviceId ?? this.deviceId, - userId: userId ?? this.userId, - userEmail: userEmail ?? this.userEmail, - isAuthenticated: isAuthenticated ?? this.isAuthenticated, - name: name ?? this.name, - isAdmin: isAdmin ?? this.isAdmin, - profileImagePath: profileImagePath ?? this.profileImagePath, - ); - } - - @override - String toString() { - return 'AuthenticationState(deviceId: $deviceId, userId: $userId, userEmail: $userEmail, isAuthenticated: $isAuthenticated, name: $name, isAdmin: $isAdmin, profileImagePath: $profileImagePath)'; - } - - @override - bool operator ==(Object other) { - if (identical(this, other)) { - return true; - } - - return other is AuthState && - other.deviceId == deviceId && - other.userId == userId && - other.userEmail == userEmail && - other.isAuthenticated == isAuthenticated && - other.name == name && - other.isAdmin == isAdmin && - other.profileImagePath == profileImagePath; - } - - @override - int get hashCode { - return deviceId.hashCode ^ - userId.hashCode ^ - userEmail.hashCode ^ - isAuthenticated.hashCode ^ - name.hashCode ^ - isAdmin.hashCode ^ - profileImagePath.hashCode; - } +@freezed +abstract class AuthState with _$AuthState { + const factory AuthState({ + required String deviceId, + required String userId, + required String userEmail, + required bool isAuthenticated, + required String name, + required bool isAdmin, + required String profileImagePath, + }) = _AuthState; } diff --git a/mobile/lib/models/auth/auxilary_endpoint.model.dart b/mobile/lib/models/auth/auxilary_endpoint.model.dart index cd11918bed..8686ae9461 100644 --- a/mobile/lib/models/auth/auxilary_endpoint.model.dart +++ b/mobile/lib/models/auth/auxilary_endpoint.model.dart @@ -1,34 +1,14 @@ -// ignore_for_file: public_member_api_docs, sort_constructors_first import 'dart:convert'; -class AuxilaryEndpoint { - final String url; - final AuxCheckStatus status; +import 'package:freezed_annotation/freezed_annotation.dart'; - const AuxilaryEndpoint({required this.url, required this.status}); +part 'auxilary_endpoint.model.freezed.dart'; - AuxilaryEndpoint copyWith({String? url, AuxCheckStatus? status}) { - return AuxilaryEndpoint(url: url ?? this.url, status: status ?? this.status); - } +@Freezed(fromJson: false, toJson: false) +abstract class AuxilaryEndpoint with _$AuxilaryEndpoint { + const AuxilaryEndpoint._(); - @override - String toString() => 'AuxilaryEndpoint(url: $url, status: $status)'; - - @override - bool operator ==(covariant AuxilaryEndpoint other) { - if (identical(this, other)) { - return true; - } - - return other.url == url && other.status == status; - } - - @override - int get hashCode => url.hashCode ^ status.hashCode; - - Map toMap() { - return {'url': url, 'status': status.toMap()}; - } + const factory AuxilaryEndpoint({required String url, required AuxCheckStatus status}) = _AuxilaryEndpoint; factory AuxilaryEndpoint.fromMap(Map map) { return AuxilaryEndpoint( @@ -37,50 +17,23 @@ class AuxilaryEndpoint { ); } - String toJson() => json.encode(toMap()); - factory AuxilaryEndpoint.fromJson(String source) => AuxilaryEndpoint.fromMap(json.decode(source) as Map); } -class AuxCheckStatus { - final String name; - const AuxCheckStatus({required this.name}); - const AuxCheckStatus._(this.name); +// TODO(agg23): Should be an enum +@freezed +abstract class AuxCheckStatus with _$AuxCheckStatus { + const AuxCheckStatus._(); - static const loading = AuxCheckStatus._('loading'); - static const valid = AuxCheckStatus._('valid'); - static const error = AuxCheckStatus._('error'); - static const unknown = AuxCheckStatus._('unknown'); + const factory AuxCheckStatus({required String name}) = _AuxCheckStatus; - @override - bool operator ==(covariant AuxCheckStatus other) { - if (identical(this, other)) { - return true; - } - - return other.name == name; - } - - @override - int get hashCode => name.hashCode; - - AuxCheckStatus copyWith({String? name}) { - return AuxCheckStatus(name: name ?? this.name); - } - - Map toMap() { - return {'name': name}; - } + static const loading = AuxCheckStatus(name: 'loading'); + static const valid = AuxCheckStatus(name: 'valid'); + static const error = AuxCheckStatus(name: 'error'); + static const unknown = AuxCheckStatus(name: 'unknown'); factory AuxCheckStatus.fromMap(Map map) { return AuxCheckStatus(name: map['name'] as String); } - - String toJson() => json.encode(toMap()); - - factory AuxCheckStatus.fromJson(String source) => AuxCheckStatus.fromMap(json.decode(source) as Map); - - @override - String toString() => 'AuxCheckStatus(name: $name)'; } diff --git a/mobile/lib/models/auth/biometric_status.model.dart b/mobile/lib/models/auth/biometric_status.model.dart index c5c417d06d..691fee3468 100644 --- a/mobile/lib/models/auth/biometric_status.model.dart +++ b/mobile/lib/models/auth/biometric_status.model.dart @@ -1,32 +1,10 @@ -import 'package:collection/collection.dart'; +import 'package:freezed_annotation/freezed_annotation.dart'; import 'package:local_auth/local_auth.dart'; -class BiometricStatus { - final List availableBiometrics; - final bool canAuthenticate; +part 'biometric_status.model.freezed.dart'; - const BiometricStatus({required this.availableBiometrics, required this.canAuthenticate}); - - @override - String toString() => 'BiometricStatus(availableBiometrics: $availableBiometrics, canAuthenticate: $canAuthenticate)'; - - BiometricStatus copyWith({List? availableBiometrics, bool? canAuthenticate}) { - return BiometricStatus( - availableBiometrics: availableBiometrics ?? this.availableBiometrics, - canAuthenticate: canAuthenticate ?? this.canAuthenticate, - ); - } - - @override - bool operator ==(covariant BiometricStatus other) { - if (identical(this, other)) { - return true; - } - final listEquals = const DeepCollectionEquality().equals; - - return listEquals(other.availableBiometrics, availableBiometrics) && other.canAuthenticate == canAuthenticate; - } - - @override - int get hashCode => availableBiometrics.hashCode ^ canAuthenticate.hashCode; +@freezed +abstract class BiometricStatus with _$BiometricStatus { + const factory BiometricStatus({required List availableBiometrics, required bool canAuthenticate}) = + _BiometricStatus; } diff --git a/mobile/lib/models/cast/cast_manager_state.dart b/mobile/lib/models/cast/cast_manager_state.dart index 9727bc7ed8..0fd3dc877b 100644 --- a/mobile/lib/models/cast/cast_manager_state.dart +++ b/mobile/lib/models/cast/cast_manager_state.dart @@ -1,85 +1,18 @@ -import 'dart:convert'; +import 'package:freezed_annotation/freezed_annotation.dart'; + +part 'cast_manager_state.freezed.dart'; enum CastDestinationType { googleCast } enum CastState { idle, playing, paused, buffering } -class CastManagerState { - final bool isCasting; - final String receiverName; - final CastState castState; - final Duration currentTime; - final Duration duration; - - const CastManagerState({ - required this.isCasting, - required this.receiverName, - required this.castState, - required this.currentTime, - required this.duration, - }); - - CastManagerState copyWith({ - bool? isCasting, - String? receiverName, - CastState? castState, - Duration? currentTime, - Duration? duration, - }) { - return CastManagerState( - isCasting: isCasting ?? this.isCasting, - receiverName: receiverName ?? this.receiverName, - castState: castState ?? this.castState, - currentTime: currentTime ?? this.currentTime, - duration: duration ?? this.duration, - ); - } - - Map toMap() { - final result = {}; - - result.addAll({'isCasting': isCasting}); - result.addAll({'receiverName': receiverName}); - result.addAll({'castState': castState}); - result.addAll({'currentTime': currentTime.inSeconds}); - result.addAll({'duration': duration.inSeconds}); - - return result; - } - - factory CastManagerState.fromMap(Map map) { - return CastManagerState( - isCasting: map['isCasting'] ?? false, - receiverName: map['receiverName'] ?? '', - castState: map['castState'] ?? CastState.idle, - currentTime: Duration(seconds: map['currentTime']?.toInt() ?? 0), - duration: Duration(seconds: map['duration']?.toInt() ?? 0), - ); - } - - String toJson() => json.encode(toMap()); - - factory CastManagerState.fromJson(String source) => CastManagerState.fromMap(json.decode(source)); - - @override - String toString() => - 'CastManagerState(isCasting: $isCasting, receiverName: $receiverName, castState: $castState, currentTime: $currentTime, duration: $duration)'; - - @override - bool operator ==(Object other) { - if (identical(this, other)) { - return true; - } - - return other is CastManagerState && - other.isCasting == isCasting && - other.receiverName == receiverName && - other.castState == castState && - other.currentTime == currentTime && - other.duration == duration; - } - - @override - int get hashCode => - isCasting.hashCode ^ receiverName.hashCode ^ castState.hashCode ^ currentTime.hashCode ^ duration.hashCode; +@freezed +abstract class CastManagerState with _$CastManagerState { + const factory CastManagerState({ + required bool isCasting, + required String receiverName, + required CastState castState, + required Duration currentTime, + required Duration duration, + }) = _CastManagerState; } diff --git a/mobile/lib/models/download/download_state.model.dart b/mobile/lib/models/download/download_state.model.dart index bed92d98b6..5f04fcdfd4 100644 --- a/mobile/lib/models/download/download_state.model.dart +++ b/mobile/lib/models/download/download_state.model.dart @@ -1,88 +1,19 @@ -// ignore_for_file: public_member_api_docs, sort_constructors_first -import 'dart:convert'; - -import 'package:background_downloader/background_downloader.dart'; -import 'package:collection/collection.dart'; - -class DownloadInfo { - final String fileName; - final double progress; - // enum - final TaskStatus status; - - const DownloadInfo({required this.fileName, required this.progress, required this.status}); - - DownloadInfo copyWith({String? fileName, double? progress, TaskStatus? status}) { - return DownloadInfo( - fileName: fileName ?? this.fileName, - progress: progress ?? this.progress, - status: status ?? this.status, - ); - } - - Map toMap() { - return {'fileName': fileName, 'progress': progress, 'status': status.index}; - } - - factory DownloadInfo.fromMap(Map map) { - return DownloadInfo( - fileName: map['fileName'] as String, - progress: map['progress'] as double, - status: TaskStatus.values[map['status'] as int], - ); - } - - String toJson() => json.encode(toMap()); - - factory DownloadInfo.fromJson(String source) => DownloadInfo.fromMap(json.decode(source) as Map); - - @override - String toString() => 'DownloadInfo(fileName: $fileName, progress: $progress, status: $status)'; - - @override - bool operator ==(covariant DownloadInfo other) { - if (identical(this, other)) { - return true; - } - - return other.fileName == fileName && other.progress == progress && other.status == status; - } - - @override - int get hashCode => fileName.hashCode ^ progress.hashCode ^ status.hashCode; -} - -class DownloadState { - // enum - final TaskStatus downloadStatus; - final Map taskProgress; - final bool showProgress; - const DownloadState({required this.downloadStatus, required this.taskProgress, required this.showProgress}); - - DownloadState copyWith({TaskStatus? downloadStatus, Map? taskProgress, bool? showProgress}) { - return DownloadState( - downloadStatus: downloadStatus ?? this.downloadStatus, - taskProgress: taskProgress ?? this.taskProgress, - showProgress: showProgress ?? this.showProgress, - ); - } - - @override - String toString() => - 'DownloadState(downloadStatus: $downloadStatus, taskProgress: $taskProgress, showProgress: $showProgress)'; - - @override - bool operator ==(covariant DownloadState other) { - if (identical(this, other)) { - return true; - } - final mapEquals = const DeepCollectionEquality().equals; - - return other.downloadStatus == downloadStatus && - mapEquals(other.taskProgress, taskProgress) && - other.showProgress == showProgress; - } - - @override - int get hashCode => downloadStatus.hashCode ^ taskProgress.hashCode ^ showProgress.hashCode; -} +import 'package:background_downloader/background_downloader.dart'; +import 'package:freezed_annotation/freezed_annotation.dart'; + +part 'download_state.model.freezed.dart'; + +@freezed +abstract class DownloadInfo with _$DownloadInfo { + const factory DownloadInfo({required String fileName, required double progress, required TaskStatus status}) = + _DownloadInfo; +} + +@freezed +abstract class DownloadState with _$DownloadState { + const factory DownloadState({ + required TaskStatus downloadStatus, + required Map taskProgress, + required bool showProgress, + }) = _DownloadState; +} diff --git a/mobile/lib/models/download/livephotos_medatada.model.dart b/mobile/lib/models/download/livephotos_medatada.model.dart index 228ad707da..833a9ffca7 100644 --- a/mobile/lib/models/download/livephotos_medatada.model.dart +++ b/mobile/lib/models/download/livephotos_medatada.model.dart @@ -1,4 +1,3 @@ -// ignore_for_file: public_member_api_docs, sort_constructors_first import 'dart:convert'; enum LivePhotosPart { video, image } diff --git a/mobile/lib/models/map/map_marker.model.dart b/mobile/lib/models/map/map_marker.model.dart index d730f9bd6d..4093747e84 100644 --- a/mobile/lib/models/map/map_marker.model.dart +++ b/mobile/lib/models/map/map_marker.model.dart @@ -1,29 +1,14 @@ +import 'package:flutter/foundation.dart'; +import 'package:freezed_annotation/freezed_annotation.dart'; import 'package:maplibre_gl/maplibre_gl.dart'; import 'package:openapi/api.dart'; -class MapMarker { - final LatLng latLng; - final String assetRemoteId; - const MapMarker({required this.latLng, required this.assetRemoteId}); +part 'map_marker.model.freezed.dart'; - MapMarker copyWith({LatLng? latLng, String? assetRemoteId}) { - return MapMarker(latLng: latLng ?? this.latLng, assetRemoteId: assetRemoteId ?? this.assetRemoteId); - } +@freezed +abstract class MapMarker with _$MapMarker { + const factory MapMarker({required LatLng latLng, required String assetRemoteId}) = _MapMarker; - MapMarker.fromDto(MapMarkerResponseDto dto) : latLng = LatLng(dto.lat, dto.lon), assetRemoteId = dto.id; - - @override - String toString() => 'MapMarker(latLng: $latLng, assetRemoteId: $assetRemoteId)'; - - @override - bool operator ==(covariant MapMarker other) { - if (identical(this, other)) { - return true; - } - - return other.latLng == latLng && other.assetRemoteId == assetRemoteId; - } - - @override - int get hashCode => latLng.hashCode ^ assetRemoteId.hashCode; + factory MapMarker.fromDto(MapMarkerResponseDto dto) => + MapMarker(latLng: LatLng(dto.lat, dto.lon), assetRemoteId: dto.id); } diff --git a/mobile/lib/models/map/map_state.model.dart b/mobile/lib/models/map/map_state.model.dart index a4863aa465..f7bd435073 100644 --- a/mobile/lib/models/map/map_state.model.dart +++ b/mobile/lib/models/map/map_state.model.dart @@ -1,79 +1,20 @@ +import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; +import 'package:freezed_annotation/freezed_annotation.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; -class MapState { - final ThemeMode themeMode; - final bool showFavoriteOnly; - final bool includeArchived; - final bool withPartners; - final int relativeTime; - final bool shouldRefetchMarkers; - final AsyncValue lightStyleFetched; - final AsyncValue darkStyleFetched; +part 'map_state.model.freezed.dart'; - const MapState({ - this.themeMode = ThemeMode.system, - this.showFavoriteOnly = false, - this.includeArchived = false, - this.withPartners = false, - this.relativeTime = 0, - this.shouldRefetchMarkers = false, - this.lightStyleFetched = const AsyncLoading(), - this.darkStyleFetched = const AsyncLoading(), - }); - - MapState copyWith({ - ThemeMode? themeMode, - bool? showFavoriteOnly, - bool? includeArchived, - bool? withPartners, - int? relativeTime, - bool? shouldRefetchMarkers, - AsyncValue? lightStyleFetched, - AsyncValue? darkStyleFetched, - }) { - return MapState( - themeMode: themeMode ?? this.themeMode, - showFavoriteOnly: showFavoriteOnly ?? this.showFavoriteOnly, - includeArchived: includeArchived ?? this.includeArchived, - withPartners: withPartners ?? this.withPartners, - relativeTime: relativeTime ?? this.relativeTime, - shouldRefetchMarkers: shouldRefetchMarkers ?? this.shouldRefetchMarkers, - lightStyleFetched: lightStyleFetched ?? this.lightStyleFetched, - darkStyleFetched: darkStyleFetched ?? this.darkStyleFetched, - ); - } - - @override - String toString() { - return 'MapState(themeMode: $themeMode, showFavoriteOnly: $showFavoriteOnly, includeArchived: $includeArchived, withPartners: $withPartners, relativeTime: $relativeTime, shouldRefetchMarkers: $shouldRefetchMarkers, lightStyleFetched: $lightStyleFetched, darkStyleFetched: $darkStyleFetched)'; - } - - @override - bool operator ==(covariant MapState other) { - if (identical(this, other)) { - return true; - } - - return other.themeMode == themeMode && - other.showFavoriteOnly == showFavoriteOnly && - other.includeArchived == includeArchived && - other.withPartners == withPartners && - other.relativeTime == relativeTime && - other.shouldRefetchMarkers == shouldRefetchMarkers && - other.lightStyleFetched == lightStyleFetched && - other.darkStyleFetched == darkStyleFetched; - } - - @override - int get hashCode { - return themeMode.hashCode ^ - showFavoriteOnly.hashCode ^ - includeArchived.hashCode ^ - withPartners.hashCode ^ - relativeTime.hashCode ^ - shouldRefetchMarkers.hashCode ^ - lightStyleFetched.hashCode ^ - darkStyleFetched.hashCode; - } +@freezed +abstract class MapState with _$MapState { + const factory MapState({ + @Default(ThemeMode.system) ThemeMode themeMode, + @Default(false) bool showFavoriteOnly, + @Default(false) bool includeArchived, + @Default(false) bool withPartners, + @Default(0) int relativeTime, + @Default(false) bool shouldRefetchMarkers, + @Default(AsyncLoading()) AsyncValue lightStyleFetched, + @Default(AsyncLoading()) AsyncValue darkStyleFetched, + }) = _MapState; } diff --git a/mobile/lib/models/search/search_curated_content.model.dart b/mobile/lib/models/search/search_curated_content.model.dart index 58c4c73264..8778c9b407 100644 --- a/mobile/lib/models/search/search_curated_content.model.dart +++ b/mobile/lib/models/search/search_curated_content.model.dart @@ -1,54 +1,20 @@ -// ignore_for_file: public_member_api_docs, sort_constructors_first -import 'dart:convert'; - -/// A wrapper for [CuratedLocationsResponseDto] objects -/// and [CuratedObjectsResponseDto] to be displayed in -/// a view -class SearchCuratedContent { - /// The label to show associated with this curated object - final String label; - - /// The subtitle to show below the label - final String? subtitle; - - /// The id to lookup the asset from the server - final String id; - - const SearchCuratedContent({required this.label, required this.id, this.subtitle}); - - SearchCuratedContent copyWith({String? label, String? subtitle, String? id}) { - return SearchCuratedContent(label: label ?? this.label, subtitle: subtitle ?? this.subtitle, id: id ?? this.id); - } - - Map toMap() { - return {'label': label, 'subtitle': subtitle, 'id': id}; - } - - factory SearchCuratedContent.fromMap(Map map) { - return SearchCuratedContent( - label: map['label'] as String, - subtitle: map['subtitle'] as String?, - id: map['id'] as String, - ); - } - - String toJson() => json.encode(toMap()); - - factory SearchCuratedContent.fromJson(String source) => - SearchCuratedContent.fromMap(json.decode(source) as Map); - - @override - String toString() => 'CuratedContent(label: $label, subtitle: $subtitle, id: $id)'; - - @override - bool operator ==(covariant SearchCuratedContent other) { - if (identical(this, other)) { - return true; - } - - return other.label == label && other.subtitle == subtitle && other.id == id; - } - - @override - int get hashCode => label.hashCode ^ id.hashCode; -} +import 'package:freezed_annotation/freezed_annotation.dart'; + +part 'search_curated_content.model.freezed.dart'; + +/// A wrapper for [CuratedLocationsResponseDto] objects +/// and [CuratedObjectsResponseDto] to be displayed in +/// a view +@freezed +abstract class SearchCuratedContent with _$SearchCuratedContent { + const factory SearchCuratedContent({ + /// The label to show associated with this curated object + required String label, + + /// The id to lookup the asset from the server + required String id, + + /// The subtitle to show below the label + String? subtitle, + }) = _SearchCuratedContent; +} diff --git a/mobile/lib/models/search/search_filter.model.dart b/mobile/lib/models/search/search_filter.model.dart index 825acb32c6..03660204b9 100644 --- a/mobile/lib/models/search/search_filter.model.dart +++ b/mobile/lib/models/search/search_filter.model.dart @@ -1,10 +1,12 @@ -// ignore_for_file: public_member_api_docs, sort_constructors_first import 'dart:convert'; +import 'package:freezed_annotation/freezed_annotation.dart'; import 'package:immich_mobile/domain/models/asset/base_asset.model.dart'; import 'package:immich_mobile/domain/models/person.model.dart'; import 'package:immich_mobile/utils/option.dart'; +part 'search_filter.model.freezed.dart'; + class SearchLocationFilter { String? country; String? state; @@ -177,52 +179,10 @@ class SearchRatingFilter { int get hashCode => rating.hashCode; } -class SearchDisplayFilters { - bool isNotInAlbum = false; - bool isArchive = false; - bool isFavorite = false; - SearchDisplayFilters({required this.isNotInAlbum, required this.isArchive, required this.isFavorite}); - - SearchDisplayFilters copyWith({bool? isNotInAlbum, bool? isArchive, bool? isFavorite}) { - return SearchDisplayFilters( - isNotInAlbum: isNotInAlbum ?? this.isNotInAlbum, - isArchive: isArchive ?? this.isArchive, - isFavorite: isFavorite ?? this.isFavorite, - ); - } - - Map toMap() { - return {'isNotInAlbum': isNotInAlbum, 'isArchive': isArchive, 'isFavorite': isFavorite}; - } - - factory SearchDisplayFilters.fromMap(Map map) { - return SearchDisplayFilters( - isNotInAlbum: map['isNotInAlbum'] as bool, - isArchive: map['isArchive'] as bool, - isFavorite: map['isFavorite'] as bool, - ); - } - - String toJson() => json.encode(toMap()); - - factory SearchDisplayFilters.fromJson(String source) => - SearchDisplayFilters.fromMap(json.decode(source) as Map); - - @override - String toString() => - 'SearchDisplayFilters(isNotInAlbum: $isNotInAlbum, isArchive: $isArchive, isFavorite: $isFavorite)'; - - @override - bool operator ==(covariant SearchDisplayFilters other) { - if (identical(this, other)) { - return true; - } - - return other.isNotInAlbum == isNotInAlbum && other.isArchive == isArchive && other.isFavorite == isFavorite; - } - - @override - int get hashCode => isNotInAlbum.hashCode ^ isArchive.hashCode ^ isFavorite.hashCode; +@freezed +abstract class SearchDisplayFilters with _$SearchDisplayFilters { + const factory SearchDisplayFilters({required bool isNotInAlbum, required bool isArchive, required bool isFavorite}) = + _SearchDisplayFilters; } class SearchFilter { @@ -233,7 +193,7 @@ class SearchFilter { String? language; String? assetId; List? tagIds; - Set people; + Set people; SearchLocationFilter location; SearchCameraFilter camera; SearchDateFilter date; @@ -289,7 +249,7 @@ class SearchFilter { String? language, String? ocr, String? assetId, - Set? people, + Set? people, List? tagIds, SearchLocationFilter? location, SearchCameraFilter? camera, diff --git a/mobile/lib/models/server_info/server_disk_info.model.dart b/mobile/lib/models/server_info/server_disk_info.model.dart index 16e58b331d..910f06b065 100644 --- a/mobile/lib/models/server_info/server_disk_info.model.dart +++ b/mobile/lib/models/server_info/server_disk_info.model.dart @@ -1,53 +1,22 @@ +import 'package:flutter/foundation.dart'; +import 'package:freezed_annotation/freezed_annotation.dart'; import 'package:openapi/api.dart'; -class ServerDiskInfo { - final String diskAvailable; - final String diskSize; - final String diskUse; - final double diskUsagePercentage; +part 'server_disk_info.model.freezed.dart'; - const ServerDiskInfo({ - required this.diskAvailable, - required this.diskSize, - required this.diskUse, - required this.diskUsagePercentage, - }); +@freezed +abstract class ServerDiskInfo with _$ServerDiskInfo { + const factory ServerDiskInfo({ + required String diskAvailable, + required String diskSize, + required String diskUse, + required double diskUsagePercentage, + }) = _ServerDiskInfo; - ServerDiskInfo copyWith({String? diskAvailable, String? diskSize, String? diskUse, double? diskUsagePercentage}) { - return ServerDiskInfo( - diskAvailable: diskAvailable ?? this.diskAvailable, - diskSize: diskSize ?? this.diskSize, - diskUse: diskUse ?? this.diskUse, - diskUsagePercentage: diskUsagePercentage ?? this.diskUsagePercentage, - ); - } - - @override - String toString() { - return 'ServerDiskInfo(diskAvailable: $diskAvailable, diskSize: $diskSize, diskUse: $diskUse, diskUsagePercentage: $diskUsagePercentage)'; - } - - ServerDiskInfo.fromDto(ServerStorageResponseDto dto) - : diskAvailable = dto.diskAvailable, - diskSize = dto.diskSize, - diskUse = dto.diskUse, - diskUsagePercentage = dto.diskUsagePercentage; - - @override - bool operator ==(Object other) { - if (identical(this, other)) { - return true; - } - - return other is ServerDiskInfo && - other.diskAvailable == diskAvailable && - other.diskSize == diskSize && - other.diskUse == diskUse && - other.diskUsagePercentage == diskUsagePercentage; - } - - @override - int get hashCode { - return diskAvailable.hashCode ^ diskSize.hashCode ^ diskUse.hashCode ^ diskUsagePercentage.hashCode; - } + factory ServerDiskInfo.fromDto(ServerStorageResponseDto dto) => ServerDiskInfo( + diskAvailable: dto.diskAvailable, + diskSize: dto.diskSize, + diskUse: dto.diskUse, + diskUsagePercentage: dto.diskUsagePercentage, + ); } diff --git a/mobile/lib/models/server_info/server_features.model.dart b/mobile/lib/models/server_info/server_features.model.dart index c288c1bfbf..4de7e2e3cd 100644 --- a/mobile/lib/models/server_info/server_features.model.dart +++ b/mobile/lib/models/server_info/server_features.model.dart @@ -1,74 +1,26 @@ +import 'package:flutter/foundation.dart'; +import 'package:freezed_annotation/freezed_annotation.dart'; import 'package:openapi/api.dart'; -class ServerFeatures { - final bool trash; - final bool map; - final bool oauthEnabled; - final bool passwordLogin; - final bool ocr; - final bool smartSearch; +part 'server_features.model.freezed.dart'; - const ServerFeatures({ - required this.trash, - required this.map, - required this.oauthEnabled, - required this.passwordLogin, - this.ocr = false, - this.smartSearch = false, - }); +@freezed +abstract class ServerFeatures with _$ServerFeatures { + const factory ServerFeatures({ + required bool trash, + required bool map, + required bool oauthEnabled, + required bool passwordLogin, + @Default(false) bool ocr, + @Default(false) bool smartSearch, + }) = _ServerFeatures; - ServerFeatures copyWith({ - bool? trash, - bool? map, - bool? oauthEnabled, - bool? passwordLogin, - bool? ocr, - bool? smartSearch, - }) { - return ServerFeatures( - trash: trash ?? this.trash, - map: map ?? this.map, - oauthEnabled: oauthEnabled ?? this.oauthEnabled, - passwordLogin: passwordLogin ?? this.passwordLogin, - ocr: ocr ?? this.ocr, - smartSearch: smartSearch ?? this.smartSearch, - ); - } - - @override - String toString() { - return 'ServerFeatures(trash: $trash, map: $map, oauthEnabled: $oauthEnabled, passwordLogin: $passwordLogin, ocr: $ocr, smartSearch: $smartSearch)'; - } - - ServerFeatures.fromDto(ServerFeaturesDto dto) - : trash = dto.trash, - map = dto.map, - oauthEnabled = dto.oauth, - passwordLogin = dto.passwordLogin, - ocr = dto.ocr, - smartSearch = dto.smartSearch; - - @override - bool operator ==(covariant ServerFeatures other) { - if (identical(this, other)) { - return true; - } - - return other.trash == trash && - other.map == map && - other.oauthEnabled == oauthEnabled && - other.passwordLogin == passwordLogin && - other.ocr == ocr && - other.smartSearch == smartSearch; - } - - @override - int get hashCode { - return trash.hashCode ^ - map.hashCode ^ - oauthEnabled.hashCode ^ - passwordLogin.hashCode ^ - ocr.hashCode ^ - smartSearch.hashCode; - } + factory ServerFeatures.fromDto(ServerFeaturesDto dto) => ServerFeatures( + trash: dto.trash, + map: dto.map, + oauthEnabled: dto.oauth, + passwordLogin: dto.passwordLogin, + ocr: dto.ocr, + smartSearch: dto.smartSearch, + ); } diff --git a/mobile/lib/models/server_info/server_info.model.dart b/mobile/lib/models/server_info/server_info.model.dart index 33d6393e15..1ed7dd6f8b 100644 --- a/mobile/lib/models/server_info/server_info.model.dart +++ b/mobile/lib/models/server_info/server_info.model.dart @@ -1,9 +1,13 @@ -import 'package:easy_localization/easy_localization.dart'; +import 'package:flutter/foundation.dart'; +import 'package:freezed_annotation/freezed_annotation.dart'; +import 'package:immich_mobile/generated/translations.g.dart'; import 'package:immich_mobile/models/server_info/server_config.model.dart'; import 'package:immich_mobile/models/server_info/server_disk_info.model.dart'; import 'package:immich_mobile/models/server_info/server_features.model.dart'; import 'package:immich_mobile/models/server_info/server_version.model.dart'; +part 'server_info.model.freezed.dart'; + enum VersionStatus { upToDate, clientOutOfDate, @@ -12,74 +16,20 @@ enum VersionStatus { String get message => switch (this) { VersionStatus.upToDate => "", - VersionStatus.clientOutOfDate => "app_update_available".tr(), - VersionStatus.serverOutOfDate => "server_update_available".tr(), - VersionStatus.error => "unable_to_check_version".tr(), + VersionStatus.clientOutOfDate => StaticTranslations.instance.app_update_available, + VersionStatus.serverOutOfDate => StaticTranslations.instance.server_update_available, + VersionStatus.error => StaticTranslations.instance.unable_to_check_version, }; } -class ServerInfo { - final ServerVersion serverVersion; - final ServerVersion? latestVersion; - final ServerFeatures serverFeatures; - final ServerConfig serverConfig; - final ServerDiskInfo serverDiskInfo; - final VersionStatus versionStatus; - - const ServerInfo({ - required this.serverVersion, - this.latestVersion, - required this.serverFeatures, - required this.serverConfig, - required this.serverDiskInfo, - required this.versionStatus, - }); - - ServerInfo copyWith({ - ServerVersion? serverVersion, +@freezed +abstract class ServerInfo with _$ServerInfo { + const factory ServerInfo({ + required ServerVersion serverVersion, ServerVersion? latestVersion, - ServerFeatures? serverFeatures, - ServerConfig? serverConfig, - ServerDiskInfo? serverDiskInfo, - VersionStatus? versionStatus, - }) { - return ServerInfo( - serverVersion: serverVersion ?? this.serverVersion, - latestVersion: latestVersion ?? this.latestVersion, - serverFeatures: serverFeatures ?? this.serverFeatures, - serverConfig: serverConfig ?? this.serverConfig, - serverDiskInfo: serverDiskInfo ?? this.serverDiskInfo, - versionStatus: versionStatus ?? this.versionStatus, - ); - } - - @override - String toString() { - return 'ServerInfo(serverVersion: $serverVersion, latestVersion: $latestVersion, serverFeatures: $serverFeatures, serverConfig: $serverConfig, serverDiskInfo: $serverDiskInfo, versionStatus: $versionStatus)'; - } - - @override - bool operator ==(Object other) { - if (identical(this, other)) { - return true; - } - - return other is ServerInfo && - other.serverVersion == serverVersion && - other.latestVersion == latestVersion && - other.serverFeatures == serverFeatures && - other.serverConfig == serverConfig && - other.serverDiskInfo == serverDiskInfo && - other.versionStatus == versionStatus; - } - - @override - int get hashCode { - return serverVersion.hashCode ^ - latestVersion.hashCode ^ - serverFeatures.hashCode ^ - serverConfig.hashCode ^ - serverDiskInfo.hashCode ^ - versionStatus.hashCode; - } + required ServerFeatures serverFeatures, + required ServerConfig serverConfig, + required ServerDiskInfo serverDiskInfo, + required VersionStatus versionStatus, + }) = _ServerInfo; } diff --git a/mobile/lib/models/server_info/server_version.model.dart b/mobile/lib/models/server_info/server_version.model.dart index 40f35a3cd0..cf16d4db0b 100644 --- a/mobile/lib/models/server_info/server_version.model.dart +++ b/mobile/lib/models/server_info/server_version.model.dart @@ -6,8 +6,4 @@ class ServerVersion extends SemVer { ServerVersion.fromDto(ServerVersionResponseDto dto) : super(major: dto.major, minor: dto.minor, patch: dto.patch_, prerelease: dto.prerelease); - - bool isAtLeast({int major = 0, int minor = 0, int patch = 0, int? prerelease}) { - return this >= SemVer(major: major, minor: minor, patch: patch, prerelease: prerelease); - } } diff --git a/mobile/lib/models/shared_link/shared_link.model.dart b/mobile/lib/models/shared_link/shared_link.model.dart index e7b65a96ef..cf96609d3c 100644 --- a/mobile/lib/models/shared_link/shared_link.model.dart +++ b/mobile/lib/models/shared_link/shared_link.model.dart @@ -1,119 +1,47 @@ +import 'package:flutter/foundation.dart'; +import 'package:freezed_annotation/freezed_annotation.dart'; import 'package:openapi/api.dart'; +part 'shared_link.model.freezed.dart'; + enum SharedLinkSource { album, individual } -class SharedLink { - final String id; - final String title; - final bool allowDownload; - final bool allowUpload; - final String? thumbAssetId; - final String? description; - final String? password; - final DateTime? expiresAt; - final String key; - final bool showMetadata; - final SharedLinkSource type; - final String? slug; +@freezed +abstract class SharedLink with _$SharedLink { + const factory SharedLink({ + required String id, + required String title, + required bool allowDownload, + required bool allowUpload, + required String? thumbAssetId, + required String? description, + required String? password, + required DateTime? expiresAt, + required String key, + required bool showMetadata, + required SharedLinkSource type, + required String? slug, + }) = _SharedLink; - const SharedLink({ - required this.id, - required this.title, - required this.allowDownload, - required this.allowUpload, - required this.thumbAssetId, - required this.description, - required this.password, - required this.expiresAt, - required this.key, - required this.showMetadata, - required this.type, - required this.slug, - }); - - SharedLink copyWith({ - String? id, - String? title, - String? thumbAssetId, - bool? allowDownload, - bool? allowUpload, - String? description, - String? password, - DateTime? expiresAt, - String? key, - bool? showMetadata, - SharedLinkSource? type, - String? slug, - }) { + factory SharedLink.fromDto(SharedLinkResponseDto dto) { + final isAlbum = dto.type == SharedLinkType.ALBUM; return SharedLink( - id: id ?? this.id, - title: title ?? this.title, - thumbAssetId: thumbAssetId ?? this.thumbAssetId, - allowDownload: allowDownload ?? this.allowDownload, - allowUpload: allowUpload ?? this.allowUpload, - description: description ?? this.description, - password: password ?? this.password, - expiresAt: expiresAt ?? this.expiresAt, - key: key ?? this.key, - showMetadata: showMetadata ?? this.showMetadata, - type: type ?? this.type, - slug: slug ?? this.slug, - ); - } - - SharedLink.fromDto(SharedLinkResponseDto dto) - : id = dto.id, - allowDownload = dto.allowDownload, - allowUpload = dto.allowUpload, - description = dto.description, - password = dto.password, - expiresAt = dto.expiresAt, - key = dto.key, - showMetadata = dto.showMetadata, - slug = dto.slug, - type = dto.type == SharedLinkType.ALBUM ? SharedLinkSource.album : SharedLinkSource.individual, - title = dto.type == SharedLinkType.ALBUM - ? dto.album.orElse(null)?.albumName.toUpperCase() ?? "UNKNOWN SHARE" - : "INDIVIDUAL SHARE", - thumbAssetId = dto.type == SharedLinkType.ALBUM + id: dto.id, + allowDownload: dto.allowDownload, + allowUpload: dto.allowUpload, + description: dto.description, + password: dto.password, + expiresAt: dto.expiresAt, + key: dto.key, + showMetadata: dto.showMetadata, + slug: dto.slug, + type: isAlbum ? SharedLinkSource.album : SharedLinkSource.individual, + title: isAlbum ? dto.album.orElse(null)?.albumName.toUpperCase() ?? "UNKNOWN SHARE" : "INDIVIDUAL SHARE", + thumbAssetId: isAlbum ? dto.album.orElse(null)?.albumThumbnailAssetId : dto.assets.isNotEmpty ? dto.assets[0].id - : null; - - @override - String toString() => - 'SharedLink(id=$id, title=$title, thumbAssetId=$thumbAssetId, allowDownload=$allowDownload, allowUpload=$allowUpload, description=$description, password=$password, expiresAt=$expiresAt, key=$key, showMetadata=$showMetadata, type=$type, slug=$slug)'; - - @override - bool operator ==(Object other) => - identical(this, other) || - other is SharedLink && - other.id == id && - other.title == title && - other.thumbAssetId == thumbAssetId && - other.allowDownload == allowDownload && - other.allowUpload == allowUpload && - other.description == description && - other.password == password && - other.expiresAt == expiresAt && - other.key == key && - other.showMetadata == showMetadata && - other.type == type && - other.slug == slug; - - @override - int get hashCode => - id.hashCode ^ - title.hashCode ^ - thumbAssetId.hashCode ^ - allowDownload.hashCode ^ - allowUpload.hashCode ^ - description.hashCode ^ - password.hashCode ^ - expiresAt.hashCode ^ - key.hashCode ^ - showMetadata.hashCode ^ - type.hashCode ^ - slug.hashCode; + : null, + ); + } } diff --git a/mobile/lib/models/upload/share_intent_attachment.model.dart b/mobile/lib/models/upload/share_intent_attachment.model.dart index 0f9c3e4c29..3643020bc8 100644 --- a/mobile/lib/models/upload/share_intent_attachment.model.dart +++ b/mobile/lib/models/upload/share_intent_attachment.model.dart @@ -1,4 +1,3 @@ -// ignore_for_file: public_member_api_docs, sort_constructors_first import 'dart:convert'; import 'dart:io'; diff --git a/mobile/lib/pages/backup/drift_backup.page.dart b/mobile/lib/pages/backup/drift_backup.page.dart index 9e78fb4795..a0e55e58de 100644 --- a/mobile/lib/pages/backup/drift_backup.page.dart +++ b/mobile/lib/pages/backup/drift_backup.page.dart @@ -1,7 +1,6 @@ import 'dart:async'; 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/domain/models/album/local_album.model.dart'; @@ -10,7 +9,6 @@ import 'package:immich_mobile/entities/store.entity.dart'; import 'package:immich_mobile/extensions/build_context_extensions.dart'; import 'package:immich_mobile/extensions/platform_extensions.dart'; import 'package:immich_mobile/extensions/theme_extensions.dart'; -import 'package:immich_mobile/extensions/translate_extensions.dart'; import 'package:immich_mobile/generated/translations.g.dart'; import 'package:immich_mobile/presentation/widgets/backup/backup_toggle_button.widget.dart'; import 'package:immich_mobile/providers/background_sync.provider.dart'; @@ -43,7 +41,7 @@ class _DriftBackupPageState extends ConsumerState { void initState() { super.initState(); - WakelockPlus.enable(); + unawaited(WakelockPlus.enable()); final currentUser = ref.read(currentUserProvider); if (currentUser == null) { @@ -67,9 +65,9 @@ class _DriftBackupPageState extends ConsumerState { } @override - dispose() { + void dispose() { super.dispose(); - WakelockPlus.disable(); + unawaited(WakelockPlus.disable()); } @override @@ -81,8 +79,8 @@ class _DriftBackupPageState extends ConsumerState { final error = ref.watch(driftBackupProvider.select((p) => p.error)); - final backupNotifier = ref.read(driftBackupProvider.notifier); - final backupSyncManager = ref.read(backgroundSyncProvider); + final backupNotifier = ref.watch(driftBackupProvider.notifier); + final backupSyncManager = ref.watch(backgroundSyncProvider); Future startBackup() async { final currentUser = Store.tryGet(StoreKey.currentUser); @@ -108,10 +106,10 @@ class _DriftBackupPageState extends ConsumerState { return Scaffold( appBar: AppBar( elevation: 0, - title: Text("backup_controller_page_backup".t()), + title: Text(context.t.backup_controller_page_backup), leading: IconButton( onPressed: () { - context.maybePop(true); + unawaited(context.maybePop(true)); }, splashRadius: 24, icon: const Icon(Icons.arrow_back_ios_rounded), @@ -119,10 +117,10 @@ class _DriftBackupPageState extends ConsumerState { actions: [ IconButton( onPressed: () { - context.pushRoute(const DriftBackupOptionsRoute()); + unawaited(context.pushRoute(const DriftBackupOptionsRoute())); }, icon: const Icon(Icons.settings_outlined), - tooltip: "backup_options".t(context: context), + tooltip: context.t.backup_options, ), ], ), @@ -143,7 +141,7 @@ class _DriftBackupPageState extends ConsumerState { onStart: () async => await startBackup(), onStop: () { syncSuccess = null; - backupNotifier.stopForegroundBackup(); + backupNotifier.stopForegroundBackup(reason: "backup button toggled off"); }, ), switch (error) { @@ -207,8 +205,8 @@ class _BackupFooterState extends ConsumerState<_BackupFooter> with WidgetsBindin } } - void showPermissionsDialog() { - showDialog( + Future showPermissionsDialog() { + return showDialog( context: context, builder: (ctx) => AlertDialog( content: Text(context.t.notification_permission_dialog_content), @@ -225,7 +223,7 @@ class _BackupFooterState extends ConsumerState<_BackupFooter> with WidgetsBindin expanded: false, onPressed: () { ContextHelper(context).pop(); - openAppSettings(); + unawaited(openAppSettings()); }, ), ], @@ -233,8 +231,8 @@ class _BackupFooterState extends ConsumerState<_BackupFooter> with WidgetsBindin ); } - void showBatteryOptimizationInfo() { - showDialog( + Future showBatteryOptimizationInfo() { + return showDialog( context: context, barrierDismissible: false, builder: (BuildContext ctx) { @@ -246,7 +244,8 @@ class _BackupFooterState extends ConsumerState<_BackupFooter> with WidgetsBindin labelText: context.t.backup_controller_page_background_battery_info_link, variant: .ghost, expanded: false, - onPressed: () => launchUrl(Uri.parse('https://dontkillmyapp.com'), mode: LaunchMode.externalApplication), + onPressed: () => + unawaited(launchUrl(Uri.parse('https://dontkillmyapp.com'), mode: LaunchMode.externalApplication)), ), ImmichTextButton( labelText: context.t.backup_controller_page_background_battery_info_ok, @@ -279,11 +278,13 @@ class _BackupFooterState extends ConsumerState<_BackupFooter> with WidgetsBindin style: context.textTheme.bodySmall?.copyWith(color: context.colorScheme.onSurfaceSecondary), ), onPressed: () { - ref.read(notificationPermissionProvider.notifier).requestNotificationPermission().then((p) { - if (p == PermissionStatus.permanentlyDenied) { - showPermissionsDialog(); - } - }); + unawaited( + ref.read(notificationPermissionProvider.notifier).requestNotificationPermission().then((p) { + if (p == PermissionStatus.permanentlyDenied) { + unawaited(showPermissionsDialog()); + } + }), + ); }, ), if (notificationStatus != PermissionStatus.granted && batteryOptimizationStatus != PermissionStatus.granted) @@ -297,7 +298,7 @@ class _BackupFooterState extends ConsumerState<_BackupFooter> with WidgetsBindin textAlign: TextAlign.left, style: context.textTheme.bodySmall?.copyWith(color: context.colorScheme.onSurfaceSecondary), ), - onPressed: showBatteryOptimizationInfo, + onPressed: () => unawaited(showBatteryOptimizationInfo()), ), ], TextButton.icon( @@ -315,17 +316,16 @@ class _BackupAlbumSelectionCard extends ConsumerWidget { @override Widget build(BuildContext context, WidgetRef ref) { + final backupAlbums = ref.watch(backupAlbumProvider); + Widget buildSelectedAlbumName() { - String text = "backup_controller_page_backup_selected".tr(); - final albums = ref - .watch(backupAlbumProvider) - .where((album) => album.backupSelection == BackupSelection.selected) - .toList(); + String text = context.t.backup_controller_page_backup_selected; + final albums = backupAlbums.where((album) => album.backupSelection == BackupSelection.selected).toList(); if (albums.isNotEmpty) { for (var album in albums) { if (album.name == "Recent" || album.name == "Recents") { - text += "${album.name} (${'all'.tr()}), "; + text += "${album.name} (${context.t.all}), "; } else { text += "${album.name}, "; } @@ -342,7 +342,7 @@ class _BackupAlbumSelectionCard extends ConsumerWidget { return Padding( padding: const EdgeInsets.only(top: 8.0), child: Text( - "backup_controller_page_none_selected".tr(), + context.t.backup_controller_page_none_selected, style: context.textTheme.labelLarge?.copyWith(color: context.primaryColor), ), ); @@ -350,11 +350,8 @@ class _BackupAlbumSelectionCard extends ConsumerWidget { } Widget buildExcludedAlbumName() { - String text = "backup_controller_page_excluded".tr(); - final albums = ref - .watch(backupAlbumProvider) - .where((album) => album.backupSelection == BackupSelection.excluded) - .toList(); + String text = context.t.backup_controller_page_excluded; + final albums = backupAlbums.where((album) => album.backupSelection == BackupSelection.excluded).toList(); if (albums.isNotEmpty) { for (var album in albums) { @@ -382,16 +379,16 @@ class _BackupAlbumSelectionCard extends ConsumerWidget { borderOnForeground: false, child: ListTile( minVerticalPadding: 18, - title: Text("backup_controller_page_albums", style: context.textTheme.titleMedium).tr(), + title: Text(context.t.backup_controller_page_albums, style: context.textTheme.titleMedium), subtitle: Padding( padding: const EdgeInsets.only(top: 8.0), child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ Text( - "backup_controller_page_to_backup", + context.t.backup_controller_page_to_backup, style: context.textTheme.bodyMedium?.copyWith(color: context.colorScheme.onSurfaceSecondary), - ).tr(), + ), buildSelectedAlbumName(), buildExcludedAlbumName(), ], @@ -400,13 +397,17 @@ class _BackupAlbumSelectionCard extends ConsumerWidget { trailing: ElevatedButton( onPressed: () async { await context.pushRoute(const DriftBackupAlbumSelectionRoute()); + if (!context.mounted) { + return; + } + final currentUser = ref.read(currentUserProvider); if (currentUser == null) { return; } unawaited(ref.read(driftBackupProvider.notifier).getBackupStatus(currentUser.id)); }, - child: const Text("select", style: TextStyle(fontWeight: FontWeight.bold)).tr(), + child: Text(context.t.select, style: const TextStyle(fontWeight: FontWeight.bold)), ), ), ); @@ -421,8 +422,8 @@ class _TotalCard extends ConsumerWidget { final totalCount = ref.watch(driftBackupProvider.select((p) => p.totalCount)); return BackupInfoCard( - title: "total".tr(), - subtitle: "backup_controller_page_total_sub".tr(), + title: context.t.total, + subtitle: context.t.backup_controller_page_total_sub, info: totalCount.toString(), ); } @@ -437,8 +438,8 @@ class _BackupCard extends ConsumerWidget { final syncStatus = ref.watch(syncStatusProvider); return BackupInfoCard( - title: "backup_controller_page_backup".tr(), - subtitle: "backup_controller_page_backup_sub".tr(), + title: context.t.backup_controller_page_backup, + subtitle: context.t.backup_controller_page_backup_sub, info: backupCount.toString(), isLoading: syncStatus.isRemoteSyncing, ); @@ -465,11 +466,11 @@ class _RemainderCard extends ConsumerWidget { ListTile( minVerticalPadding: 18, isThreeLine: true, - title: Text("backup_controller_page_remainder".t(context: context), style: context.textTheme.titleMedium), + title: Text(context.t.backup_controller_page_remainder, style: context.textTheme.titleMedium), subtitle: Padding( padding: const EdgeInsets.only(top: 4.0, right: 18.0), child: Text( - "backup_controller_page_remainder_sub".t(context: context), + context.t.backup_controller_page_remainder_sub, style: context.textTheme.bodyMedium?.copyWith(color: context.colorScheme.onSurfaceSecondary), ), ), @@ -502,11 +503,11 @@ class _RemainderCard extends ConsumerWidget { ], ), Text( - "backup_info_card_assets", + context.t.backup_info_card_assets, style: context.textTheme.labelLarge?.copyWith( color: context.colorScheme.onSurface.withAlpha(syncStatus.isRemoteSyncing ? 50 : 255), ), - ).tr(), + ), ], ), ), @@ -523,7 +524,7 @@ class _RemainderCard extends ConsumerWidget { ), onTap: () => context.pushRoute(const DriftBackupAssetDetailRoute()), title: Text( - "view_details".t(context: context), + context.t.view_details, style: context.textTheme.labelLarge?.copyWith(color: context.colorScheme.onSurface.withAlpha(200)), ), trailing: Icon(Icons.arrow_forward_ios, size: 16, color: context.colorScheme.onSurfaceVariant), @@ -559,6 +560,11 @@ class _PreparingStatusState extends ConsumerState { final currentUser = ref.read(currentUserProvider); if (currentUser != null && mounted) { await ref.read(driftBackupProvider.notifier).getBackupStatus(currentUser.id); + if (!context.mounted) { + timer.cancel(); + _pollingTimer = null; + return; + } // Stop polling if processing count reaches 0 final updatedProcessingCount = ref.read(driftBackupProvider.select((p) => p.processingCount)); @@ -610,7 +616,7 @@ class _PreparingStatusState extends ConsumerState { Row( children: [ Text( - "preparing".t(context: context), + context.t.preparing, style: context.textTheme.labelLarge?.copyWith( color: context.colorScheme.onSurface.withAlpha(200), ), @@ -640,7 +646,7 @@ class _PreparingStatusState extends ConsumerState { crossAxisAlignment: CrossAxisAlignment.end, children: [ Text( - "ready_for_upload".t(context: context), + context.t.ready_for_upload, style: context.textTheme.labelLarge?.copyWith(color: context.colorScheme.onSurface.withAlpha(200)), ), const SizedBox(height: 2), diff --git a/mobile/lib/pages/backup/drift_backup_album_selection.page.dart b/mobile/lib/pages/backup/drift_backup_album_selection.page.dart index b0616589f1..26719c2884 100644 --- a/mobile/lib/pages/backup/drift_backup_album_selection.page.dart +++ b/mobile/lib/pages/backup/drift_backup_album_selection.page.dart @@ -1,19 +1,18 @@ import 'dart:async'; 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/domain/models/album/local_album.model.dart'; import 'package:immich_mobile/domain/services/sync_linked_album.service.dart'; import 'package:immich_mobile/extensions/build_context_extensions.dart'; -import 'package:immich_mobile/extensions/translate_extensions.dart'; +import 'package:immich_mobile/generated/translations.g.dart'; import 'package:immich_mobile/infrastructure/repositories/settings.repository.dart'; import 'package:immich_mobile/providers/background_sync.provider.dart'; import 'package:immich_mobile/providers/backup/backup_album.provider.dart'; import 'package:immich_mobile/providers/backup/drift_backup.provider.dart'; -import 'package:immich_mobile/providers/infrastructure/settings.provider.dart'; import 'package:immich_mobile/providers/infrastructure/platform.provider.dart'; +import 'package:immich_mobile/providers/infrastructure/settings.provider.dart'; import 'package:immich_mobile/providers/user.provider.dart'; import 'package:immich_mobile/widgets/backup/drift_album_info_list_tile.dart'; import 'package:immich_mobile/widgets/common/search_field.dart'; @@ -102,6 +101,9 @@ class _DriftBackupAlbumSelectionPageState extends ConsumerState p.totalCount)); final totalChanged = currentTotalAssetCount != _initialTotalAssetCount; final backupNotifier = ref.read(driftBackupProvider.notifier); @@ -119,7 +125,7 @@ class _DriftBackupAlbumSelectionPageState extends ConsumerState backgroundSync.hashAssets())); if (isBackupEnabled) { - backupNotifier.stopForegroundBackup(); + backupNotifier.stopForegroundBackup(reason: "backup albums updated"); unawaited( backgroundSync.syncRemote().then((success) { if (success) { @@ -132,6 +138,10 @@ class _DriftBackupAlbumSelectionPageState extends ConsumerState setState(() => _searchQuery = value.trim()), ) - : const Text("backup_album_selection_page_select_albums").t(context: context), + : Text(context.t.backup_album_selection_page_select_albums), actions: [ if (!_isSearchMode) IconButton( @@ -183,9 +193,9 @@ class _DriftBackupAlbumSelectionPageState extends ConsumerState removeSelection() { + return ref.read(backupAlbumProvider.notifier).deselectAlbum(album); } return Padding( padding: const EdgeInsets.only(right: 8.0), child: GestureDetector( - onTap: removeSelection, + onTap: () => unawaited(removeSelection()), child: AnimatedContainer( duration: const Duration(milliseconds: 200), curve: Curves.easeInOut, @@ -387,7 +393,7 @@ class _SelectedAlbumNameChips extends ConsumerWidget { backgroundColor: context.primaryColor, deleteIconColor: context.isDarkTheme ? Colors.black : Colors.white, deleteIcon: const Icon(Icons.cancel_rounded, size: 15), - onDeleted: removeSelection, + onDeleted: () => unawaited(removeSelection()), ), ), ), @@ -408,12 +414,12 @@ class _ExcludedAlbumNameChips extends ConsumerWidget { children: excludedBackupAlbums.asMap().entries.map((entry) { final album = entry.value; - void removeSelection() { - ref.read(backupAlbumProvider.notifier).deselectAlbum(album); + Future removeSelection() { + return ref.read(backupAlbumProvider.notifier).deselectAlbum(album); } return GestureDetector( - onTap: removeSelection, + onTap: () => unawaited(removeSelection()), child: Padding( padding: const EdgeInsets.only(right: 8.0), child: AnimatedContainer( @@ -427,7 +433,7 @@ class _ExcludedAlbumNameChips extends ConsumerWidget { backgroundColor: Colors.red[300], deleteIconColor: context.scaffoldBackgroundColor, deleteIcon: const Icon(Icons.cancel_rounded, size: 15), - onDeleted: removeSelection, + onDeleted: () => unawaited(removeSelection()), ), ), ), @@ -457,16 +463,13 @@ class _SelectAllButton extends ConsumerWidget { ? () { for (final album in filteredAlbums) { if (album.backupSelection != BackupSelection.selected) { - ref.read(backupAlbumProvider.notifier).selectAlbum(album); + unawaited(ref.read(backupAlbumProvider.notifier).selectAlbum(album)); } } } : null, icon: const Icon(Icons.select_all), - label: AnimatedSwitcher( - duration: const Duration(milliseconds: 200), - child: Text("select_all".t(context: context)), - ), + label: AnimatedSwitcher(duration: const Duration(milliseconds: 200), child: Text(context.t.select_all)), style: ElevatedButton.styleFrom(padding: const EdgeInsets.symmetric(vertical: 12.0)), ), ), @@ -477,13 +480,13 @@ class _SelectAllButton extends ConsumerWidget { ? () { for (final album in filteredAlbums) { if (album.backupSelection == BackupSelection.selected) { - ref.read(backupAlbumProvider.notifier).deselectAlbum(album); + unawaited(ref.read(backupAlbumProvider.notifier).deselectAlbum(album)); } } } : null, icon: const Icon(Icons.deselect), - label: Text('deselect_all'.t(context: context)), + label: Text(context.t.deselect_all), style: OutlinedButton.styleFrom(padding: const EdgeInsets.symmetric(vertical: 12.0)), ), ), diff --git a/mobile/lib/pages/backup/drift_backup_asset_detail.page.dart b/mobile/lib/pages/backup/drift_backup_asset_detail.page.dart index 36d51c5624..18ad9fbd3d 100644 --- a/mobile/lib/pages/backup/drift_backup_asset_detail.page.dart +++ b/mobile/lib/pages/backup/drift_backup_asset_detail.page.dart @@ -1,5 +1,4 @@ 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/domain/models/asset/base_asset.model.dart'; @@ -7,7 +6,7 @@ import 'package:immich_mobile/domain/models/events.model.dart'; import 'package:immich_mobile/domain/utils/event_stream.dart'; import 'package:immich_mobile/extensions/build_context_extensions.dart'; import 'package:immich_mobile/extensions/theme_extensions.dart'; -import 'package:immich_mobile/extensions/translate_extensions.dart'; +import 'package:immich_mobile/generated/translations.g.dart'; import 'package:immich_mobile/pages/common/large_leading_tile.dart'; import 'package:immich_mobile/presentation/widgets/images/thumbnail.widget.dart'; import 'package:immich_mobile/providers/backup/drift_backup.provider.dart'; @@ -20,9 +19,9 @@ class DriftBackupAssetDetailPage extends ConsumerWidget { @override Widget build(BuildContext context, WidgetRef ref) { - AsyncValue> result = ref.watch(driftBackupCandidateProvider); + final AsyncValue> result = ref.watch(driftBackupCandidateProvider); return Scaffold( - appBar: AppBar(title: Text('backup_controller_page_remainder'.t(context: context))), + appBar: AppBar(title: Text(context.t.backup_controller_page_remainder)), body: result.when( data: (List candidates) { return ListView.separated( @@ -66,7 +65,7 @@ class DriftBackupAssetDetailPage extends ConsumerWidget { ); }, error: (error, stackTrace) => Text( - 'error_saving_image'.tr(args: [error.toString()]), + context.t.error_saving_image(error: error.toString()), style: TextStyle(color: context.colorScheme.error), ), loading: () => @@ -88,6 +87,10 @@ class DriftBackupAssetDetailPage extends ConsumerWidget { ), onTap: () async { await context.maybePop(); + if (!context.mounted) { + return; + } + await context.navigateTo(const TabShellRoute(children: [MainTimelineRoute()])); EventStream.shared.emit(ScrollToDateEvent(asset.createdAt)); }, @@ -98,7 +101,7 @@ class DriftBackupAssetDetailPage extends ConsumerWidget { ); }, error: (Object error, StackTrace stackTrace) { - return Center(child: Text('error_saving_image'.tr(args: [error.toString()]))); + return Center(child: Text(context.t.error_saving_image(error: error.toString()))); }, loading: () { return const SizedBox(height: 48, width: 48, child: Center(child: CircularProgressIndicator.adaptive())); diff --git a/mobile/lib/pages/backup/drift_backup_options.page.dart b/mobile/lib/pages/backup/drift_backup_options.page.dart index 42643a0496..994f09766c 100644 --- a/mobile/lib/pages/backup/drift_backup_options.page.dart +++ b/mobile/lib/pages/backup/drift_backup_options.page.dart @@ -3,7 +3,7 @@ import 'dart:async'; import 'package:auto_route/auto_route.dart'; import 'package:flutter/material.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:immich_mobile/extensions/translate_extensions.dart'; +import 'package:immich_mobile/generated/translations.g.dart'; import 'package:immich_mobile/infrastructure/repositories/settings.repository.dart'; import 'package:immich_mobile/providers/background_sync.provider.dart'; import 'package:immich_mobile/providers/backup/drift_backup.provider.dart'; @@ -19,7 +19,7 @@ class DriftBackupOptionsPage extends ConsumerWidget { @override Widget build(BuildContext context, WidgetRef ref) { bool hasPopped = false; - final previousBackup = ref.read(appConfigProvider).backup; + final previousBackup = ref.watch(appConfigProvider.select((s) => s.backup)); final previousCellularForVideos = previousBackup.useCellularForVideos; final previousCellularForPhotos = previousBackup.useCellularForPhotos; return PopScope( @@ -46,20 +46,17 @@ class DriftBackupOptionsPage extends ConsumerWidget { await ref.read(driftBackupProvider.notifier).getBackupStatus(currentUser.id); final isBackupEnabled = SettingsRepository.instance.appConfig.backup.enabled; - if (!isBackupEnabled) { + if (!isBackupEnabled || !context.mounted) { return; } ScaffoldMessenger.of(context).showSnackBar( - SnackBar( - content: Text("network_requirements_updated".t(context: context)), - duration: const Duration(seconds: 4), - ), + SnackBar(content: Text(context.t.network_requirements_updated), duration: const Duration(seconds: 4)), ); final backupNotifier = ref.read(driftBackupProvider.notifier); final backgroundSync = ref.read(backgroundSyncProvider); - backupNotifier.stopForegroundBackup(); + backupNotifier.stopForegroundBackup(reason: "backup settings updated"); unawaited( backgroundSync.syncRemote().then((success) { if (success) { @@ -72,7 +69,7 @@ class DriftBackupOptionsPage extends ConsumerWidget { } }, child: Scaffold( - appBar: AppBar(title: Text("backup_options".t(context: context))), + appBar: AppBar(title: Text(context.t.backup_options)), body: const DriftBackupSettings(), ), ); diff --git a/mobile/lib/pages/backup/drift_upload_detail.page.dart b/mobile/lib/pages/backup/drift_upload_detail.page.dart index 978fcf7c57..6993601c62 100644 --- a/mobile/lib/pages/backup/drift_upload_detail.page.dart +++ b/mobile/lib/pages/backup/drift_upload_detail.page.dart @@ -3,7 +3,7 @@ import 'package:flutter/material.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; import 'package:immich_mobile/domain/models/asset/base_asset.model.dart'; import 'package:immich_mobile/extensions/build_context_extensions.dart'; -import 'package:immich_mobile/extensions/translate_extensions.dart'; +import 'package:immich_mobile/generated/translations.g.dart'; import 'package:immich_mobile/presentation/widgets/images/thumbnail.widget.dart'; import 'package:immich_mobile/providers/backup/drift_backup.provider.dart'; import 'package:immich_mobile/providers/infrastructure/asset.provider.dart'; @@ -80,7 +80,7 @@ class _DriftUploadDetailPageState extends ConsumerState { return Scaffold( appBar: AppBar( - title: Text("upload_details".t(context: context)), + title: Text(context.t.upload_details), backgroundColor: context.colorScheme.surface, elevation: 0, scrolledUnderElevation: 1, @@ -125,7 +125,7 @@ class _DriftUploadDetailPageState extends ConsumerState { SliverToBoxAdapter( child: _buildSectionHeader( context, - title: "uploading".t(context: context), + title: context.t.uploading, count: uploadingItems.length, color: context.colorScheme.primary, ), @@ -151,7 +151,7 @@ class _DriftUploadDetailPageState extends ConsumerState { SliverToBoxAdapter( child: _buildSectionHeader( context, - title: "errors_text".t(context: context), + title: context.t.errors_text, count: failedItems.length, color: context.colorScheme.error, ), @@ -231,7 +231,7 @@ class _DriftUploadDetailPageState extends ConsumerState { crossAxisAlignment: CrossAxisAlignment.start, children: [ Text( - "downloading_from_icloud".t(context: context), + context.t.downloading_from_icloud, style: context.textTheme.bodyMedium?.copyWith(fontWeight: FontWeight.w500), maxLines: 1, overflow: TextOverflow.ellipsis, @@ -318,7 +318,7 @@ class _DriftUploadDetailPageState extends ConsumerState { const SizedBox(height: 2), Text( isFailed - ? item.error ?? "unable_to_upload_file".t(context: context) + ? item.error ?? context.t.errors.unable_to_upload_file : "${formatHumanReadableBytes(item.fileSize, 1)} • ${item.networkSpeedAsString}", style: context.textTheme.labelLarge?.copyWith( color: isFailed @@ -395,7 +395,7 @@ class _DriftUploadDetailPageState extends ConsumerState { ), const SizedBox(height: 4), Text( - item.error ?? "unable_to_upload_file".t(context: context), + item.error ?? context.t.errors.unable_to_upload_file, style: context.textTheme.bodySmall?.copyWith(color: context.colorScheme.error), maxLines: 4, overflow: TextOverflow.ellipsis, @@ -429,7 +429,7 @@ class _DriftUploadDetailPageState extends ConsumerState { SizedBox( width: 48, height: 48, - child: Container( + child: DecoratedBox( decoration: BoxDecoration( color: context.colorScheme.outline.withValues(alpha: 0.1), borderRadius: const BorderRadius.all(Radius.circular(8)), @@ -520,7 +520,7 @@ class _CurrentUploadThumbnail extends ConsumerWidget { ), clipBehavior: Clip.antiAlias, child: snapshot.data != null - ? Thumbnail.fromAsset(asset: snapshot.data!, size: const Size(48, 48), fit: BoxFit.cover) + ? Thumbnail.fromAsset(asset: snapshot.data, size: const Size(48, 48), fit: BoxFit.cover) : Icon(Icons.image, size: 24, color: context.colorScheme.primary), ), ); @@ -556,7 +556,7 @@ class FileDetailDialog extends ConsumerWidget { const SizedBox(width: 8), Expanded( child: Text( - "details".t(context: context), + context.t.details, style: context.textTheme.titleMedium?.copyWith(fontWeight: FontWeight.w600, color: context.primaryColor), ), ), @@ -595,20 +595,14 @@ class FileDetailDialog extends ConsumerWidget { const SizedBox(height: 24), if (asset != null) _buildInfoSection(context, [ - _buildInfoRow(context, "filename".t(context: context), path.basename(uploadStatus.filename)), - _buildInfoRow(context, "local_id".t(context: context), asset.id), - _buildInfoRow( - context, - "file_size".t(context: context), - formatHumanReadableBytes(uploadStatus.fileSize, 2), - ), - if (asset.width != null) _buildInfoRow(context, "width".t(context: context), "${asset.width}px"), - if (asset.height != null) - _buildInfoRow(context, "height".t(context: context), "${asset.height}px"), - _buildInfoRow(context, "created_at".t(context: context), asset.createdAt.toString()), - _buildInfoRow(context, "updated_at".t(context: context), asset.updatedAt.toString()), - if (asset.checksum != null) - _buildInfoRow(context, "checksum".t(context: context), asset.checksum!), + _buildInfoRow(context, context.t.filename, path.basename(uploadStatus.filename)), + _buildInfoRow(context, context.t.local_id, asset.id), + _buildInfoRow(context, context.t.file_size, formatHumanReadableBytes(uploadStatus.fileSize, 2)), + if (asset.width != null) _buildInfoRow(context, context.t.width, "${asset.width}px"), + if (asset.height != null) _buildInfoRow(context, context.t.height, "${asset.height}px"), + _buildInfoRow(context, context.t.created_at, asset.createdAt.toString()), + _buildInfoRow(context, context.t.updated_at, asset.updatedAt.toString()), + if (asset.checksum != null) _buildInfoRow(context, context.t.checksum, asset.checksum!), ]), ], ), @@ -620,7 +614,7 @@ class FileDetailDialog extends ConsumerWidget { TextButton( onPressed: () => Navigator.of(context).pop(), child: Text( - "close".t(), + context.t.close, style: TextStyle(fontWeight: FontWeight.w600, color: context.primaryColor), ), ), diff --git a/mobile/lib/pages/common/app_log.page.dart b/mobile/lib/pages/common/app_log.page.dart index 336bf0b605..d0b5096288 100644 --- a/mobile/lib/pages/common/app_log.page.dart +++ b/mobile/lib/pages/common/app_log.page.dart @@ -1,21 +1,23 @@ +import 'dart:async'; + import 'package:auto_route/auto_route.dart'; -import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; import 'package:flutter_hooks/flutter_hooks.dart'; -import 'package:hooks_riverpod/hooks_riverpod.dart'; import 'package:immich_mobile/domain/models/log.model.dart'; import 'package:immich_mobile/domain/services/log.service.dart'; import 'package:immich_mobile/extensions/build_context_extensions.dart'; import 'package:immich_mobile/extensions/theme_extensions.dart'; +import 'package:immich_mobile/generated/translations.g.dart'; import 'package:immich_mobile/routing/router.dart'; import 'package:immich_mobile/services/immich_logger.service.dart'; +import 'package:intl/intl.dart'; @RoutePage() -class AppLogPage extends HookConsumerWidget { +class AppLogPage extends HookWidget { const AppLogPage({super.key}); @override - Widget build(BuildContext context, WidgetRef ref) { + Widget build(BuildContext context) { final immichLogger = LogService.I; final shouldReload = useState(false); final logMessages = useFuture(useMemoized(() => immichLogger.getMessages(), [shouldReload.value])); @@ -49,7 +51,7 @@ class AppLogPage extends HookConsumerWidget { return Scaffold( appBar: AppBar( - title: Text('logs'.tr(), style: const TextStyle(fontWeight: FontWeight.bold, fontSize: 16.0)), + title: Text(context.t.logs, style: const TextStyle(fontWeight: FontWeight.bold, fontSize: 16.0)), scrolledUnderElevation: 1, elevation: 2, actions: [ @@ -61,7 +63,7 @@ class AppLogPage extends HookConsumerWidget { size: 20.0, ), onPressed: () { - immichLogger.clearLogs(); + unawaited(immichLogger.clearLogs()); shouldReload.value = !shouldReload.value; }, ), @@ -70,7 +72,7 @@ class AppLogPage extends HookConsumerWidget { return IconButton( icon: Icon(Icons.share_rounded, color: context.primaryColor, semanticLabel: "Share logs", size: 20.0), onPressed: () { - ImmichLogger.shareLogs(iconContext); + unawaited(ImmichLogger.shareLogs(iconContext)); }, ); }, @@ -78,7 +80,7 @@ class AppLogPage extends HookConsumerWidget { ], leading: IconButton( onPressed: () { - context.maybePop(); + unawaited(context.maybePop()); }, icon: const Icon(Icons.arrow_back_ios_new_rounded, size: 20.0), ), @@ -90,7 +92,7 @@ class AppLogPage extends HookConsumerWidget { }, itemCount: logMessages.data?.length ?? 0, itemBuilder: (context, index) { - var logMessage = logMessages.data![index]; + final logMessage = logMessages.data![index]; return ListTile( onTap: () => context.pushRoute(AppLogDetailRoute(logMessage: logMessage)), trailing: const Icon(Icons.arrow_forward_ios_rounded), @@ -116,7 +118,7 @@ class AppLogPage extends HookConsumerWidget { /// Truncate the log message to a certain number of lines /// @param int maxLines - Max number of lines to truncate String truncateLogMessage(String message, int maxLines) { - List messageLines = message.split("\n"); + final List messageLines = message.split("\n"); if (messageLines.length < maxLines) { return message; } diff --git a/mobile/lib/pages/common/app_log_detail.page.dart b/mobile/lib/pages/common/app_log_detail.page.dart index 890e46888f..8e7eaf3ba8 100644 --- a/mobile/lib/pages/common/app_log_detail.page.dart +++ b/mobile/lib/pages/common/app_log_detail.page.dart @@ -1,20 +1,22 @@ +import 'dart:async'; + import 'package:auto_route/auto_route.dart'; -import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; -import 'package:hooks_riverpod/hooks_riverpod.dart'; +import 'package:flutter_hooks/flutter_hooks.dart'; import 'package:immich_mobile/domain/models/log.model.dart'; import 'package:immich_mobile/extensions/build_context_extensions.dart'; +import 'package:immich_mobile/generated/translations.g.dart'; @RoutePage() -class AppLogDetailPage extends HookConsumerWidget { +class AppLogDetailPage extends HookWidget { const AppLogDetailPage({super.key, required this.logMessage}); final LogMessage logMessage; @override - Widget build(BuildContext context, WidgetRef ref) { - buildTextWithCopyButton(String header, String text) { + Widget build(BuildContext context) { + Padding buildTextWithCopyButton(String header, String text) { return Padding( padding: const EdgeInsets.all(8.0), child: Column( @@ -33,22 +35,28 @@ class AppLogDetailPage extends HookConsumerWidget { ), IconButton( onPressed: () { - Clipboard.setData(ClipboardData(text: text)).then((_) { - context.scaffoldMessenger.showSnackBar( - SnackBar( - content: Text( - "copied_to_clipboard".tr(), - style: context.textTheme.bodyLarge?.copyWith(color: context.primaryColor), + unawaited( + Clipboard.setData(ClipboardData(text: text)).then((_) { + if (!context.mounted) { + return; + } + + context.scaffoldMessenger.showSnackBar( + SnackBar( + content: Text( + context.t.copied_to_clipboard, + style: context.textTheme.bodyLarge?.copyWith(color: context.primaryColor), + ), ), - ), - ); - }); + ); + }), + ); }, icon: Icon(Icons.copy, size: 16.0, color: context.primaryColor), ), ], ), - Container( + DecoratedBox( decoration: BoxDecoration( color: context.colorScheme.surfaceContainerHigh, borderRadius: const BorderRadius.all(Radius.circular(15.0)), @@ -66,7 +74,7 @@ class AppLogDetailPage extends HookConsumerWidget { ); } - buildLogContext(String logger) { + Padding buildLogContext(String logger) { return Padding( padding: const EdgeInsets.all(8.0), child: Column( @@ -79,7 +87,7 @@ class AppLogDetailPage extends HookConsumerWidget { style: TextStyle(fontSize: 12.0, color: context.primaryColor, fontWeight: FontWeight.bold), ), ), - Container( + DecoratedBox( decoration: BoxDecoration( color: context.colorScheme.surfaceContainerHigh, borderRadius: const BorderRadius.all(Radius.circular(15.0)), @@ -87,7 +95,7 @@ class AppLogDetailPage extends HookConsumerWidget { child: Padding( padding: const EdgeInsets.all(8.0), child: SelectableText( - logger.toString(), + logger, style: const TextStyle(fontSize: 12.0, fontWeight: FontWeight.bold, fontFamily: "GoogleSansCode"), ), ), @@ -98,7 +106,7 @@ class AppLogDetailPage extends HookConsumerWidget { } return Scaffold( - appBar: AppBar(title: Text("log_detail_title".tr())), + appBar: AppBar(title: Text(context.t.log_detail_title)), body: SafeArea( child: ListView( children: [ diff --git a/mobile/lib/pages/common/download_panel.dart b/mobile/lib/pages/common/download_panel.dart index 0775f5b4e4..9ee5833b83 100644 --- a/mobile/lib/pages/common/download_panel.dart +++ b/mobile/lib/pages/common/download_panel.dart @@ -1,8 +1,10 @@ +import 'dart:async'; + import 'package:background_downloader/background_downloader.dart'; -import 'package:easy_localization/easy_localization.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/generated/translations.g.dart'; import 'package:immich_mobile/providers/asset_viewer/download.provider.dart'; class DownloadPanel extends ConsumerWidget { @@ -14,8 +16,8 @@ class DownloadPanel extends ConsumerWidget { final tasks = ref.watch(downloadStateProvider.select((state) => state.taskProgress)).entries.toList(); - onCancelDownload(String id) { - ref.watch(downloadStateProvider.notifier).cancelDownload(id); + void onCancelDownload(String id) { + unawaited(ref.read(downloadStateProvider.notifier).cancelDownload(id)); } return Positioned( @@ -65,14 +67,14 @@ class DownloadTaskTile extends StatelessWidget { final progressPercent = (progress * 100).round(); String getStatusText() => switch (status) { - TaskStatus.running => 'downloading'.tr(), - TaskStatus.complete => 'download_complete'.tr(), - TaskStatus.failed => 'download_failed'.tr(), - TaskStatus.canceled => 'download_canceled'.tr(), - TaskStatus.paused => 'download_paused'.tr(), - TaskStatus.enqueued => 'download_enqueue'.tr(), - TaskStatus.notFound => 'download_notfound'.tr(), - TaskStatus.waitingToRetry => 'download_waiting_to_retry'.tr(), + TaskStatus.running => context.t.downloading, + TaskStatus.complete => context.t.download_complete, + TaskStatus.failed => context.t.download_failed, + TaskStatus.canceled => context.t.download_canceled, + TaskStatus.paused => context.t.download_paused, + TaskStatus.enqueued => context.t.download_enqueue, + TaskStatus.notFound => context.t.download_notfound, + TaskStatus.waitingToRetry => context.t.download_waiting_to_retry, }; return SizedBox( diff --git a/mobile/lib/pages/common/headers_settings.page.dart b/mobile/lib/pages/common/headers_settings.page.dart index 9a6b602b04..c934ca6a46 100644 --- a/mobile/lib/pages/common/headers_settings.page.dart +++ b/mobile/lib/pages/common/headers_settings.page.dart @@ -1,5 +1,4 @@ import 'package:auto_route/auto_route.dart'; -import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; import 'package:flutter_hooks/flutter_hooks.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; @@ -21,7 +20,7 @@ class HeaderSettingsPage extends HookConsumerWidget { final headers = useState>([]); final setInitialHeaders = useState(false); - final storedHeaders = ref.read(appConfigProvider).network.customHeaders; + final storedHeaders = ref.watch(appConfigProvider.select((s) => s.network.customHeaders)); if (!setInitialHeaders.value) { storedHeaders.forEach((k, v) { final header = SettingsHeader(); @@ -41,7 +40,7 @@ class HeaderSettingsPage extends HookConsumerWidget { } setInitialHeaders.value = true; - var list = [ + final list = [ ...headers.value.map((headerValue) { return HeaderKeyValueSettings( header: headerValue, @@ -64,7 +63,7 @@ class HeaderSettingsPage extends HookConsumerWidget { headers.value = headers.value.toList(); }, icon: const Icon(Icons.add_outlined), - tooltip: 'header_settings_add_header_tip'.tr(), + tooltip: context.t.header_settings_add_header_tip, ), ], ), @@ -81,7 +80,7 @@ class HeaderSettingsPage extends HookConsumerWidget { ); } - saveHeaders(WidgetRef ref, List headers) async { + Future saveHeaders(WidgetRef ref, List headers) async { final headersMap = {}; for (final header in headers) { final key = header.key.trim(); @@ -93,8 +92,9 @@ class HeaderSettingsPage extends HookConsumerWidget { headersMap[key] = value; } + final apiService = ref.read(apiServiceProvider); await ref.read(settingsProvider).write(.networkCustomHeaders, headersMap); - await ref.read(apiServiceProvider).updateHeaders(); + await apiService.updateHeaders(); } } @@ -110,7 +110,7 @@ class HeaderKeyValueSettings extends StatelessWidget { String? emptyFieldValidator(String? value) { if (value == null || value.isEmpty) { - return 'header_settings_field_validator_msg'.tr(); + return StaticTranslations.instance.header_settings_field_validator_msg; } return null; @@ -128,10 +128,12 @@ class HeaderKeyValueSettings extends StatelessWidget { child: TextFormField( controller: keyController, decoration: InputDecoration( - labelText: 'header_settings_header_name_input'.tr(), + labelText: context.t.header_settings_header_name_input, border: const OutlineInputBorder(), ), autocorrect: false, + smartDashesType: .disabled, + smartQuotesType: .disabled, onChanged: (headerKey) { header.key = headerKey; }, @@ -156,10 +158,12 @@ class HeaderKeyValueSettings extends StatelessWidget { child: TextFormField( controller: valueController, decoration: InputDecoration( - labelText: 'header_settings_header_value_input'.tr(), + labelText: context.t.header_settings_header_value_input, border: const OutlineInputBorder(), ), autocorrect: false, + smartDashesType: .disabled, + smartQuotesType: .disabled, onChanged: (headerValue) { header.value = headerValue; }, diff --git a/mobile/lib/pages/common/large_leading_tile.dart b/mobile/lib/pages/common/large_leading_tile.dart index 4563834473..f8a8c51e17 100644 --- a/mobile/lib/pages/common/large_leading_tile.dart +++ b/mobile/lib/pages/common/large_leading_tile.dart @@ -34,7 +34,7 @@ class LargeLeadingTile extends StatelessWidget { return InkWell( borderRadius: BorderRadius.circular(borderRadius), onTap: disabled ? null : onTap, - child: Container( + child: DecoratedBox( decoration: BoxDecoration( color: selected ? selectedTileColor ?? Theme.of(context).primaryColor.withAlpha(30) @@ -54,7 +54,7 @@ class LargeLeadingTile extends StatelessWidget { ], ), ), - if (trailing != null) trailing!, + ?trailing, ], ), ), diff --git a/mobile/lib/pages/common/settings.page.dart b/mobile/lib/pages/common/settings.page.dart index 65970ee294..2e941a70a3 100644 --- a/mobile/lib/pages/common/settings.page.dart +++ b/mobile/lib/pages/common/settings.page.dart @@ -1,8 +1,8 @@ import 'package:auto_route/auto_route.dart'; -import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; import 'package:flutter_hooks/flutter_hooks.dart' hide Store; import 'package:immich_mobile/extensions/build_context_extensions.dart'; +import 'package:immich_mobile/generated/translations.g.dart'; import 'package:immich_mobile/routing/router.dart'; import 'package:immich_mobile/widgets/settings/advanced_settings.dart'; import 'package:immich_mobile/widgets/settings/asset_list_settings/asset_list_settings.dart'; @@ -17,21 +17,45 @@ import 'package:immich_mobile/widgets/settings/preference_settings/preference_se import 'package:immich_mobile/widgets/settings/settings_card.dart'; enum SettingSection { - advanced('advanced', Icons.build_outlined, "advanced_settings_tile_subtitle"), - assetViewer('asset_viewer_settings_title', Icons.image_outlined, "asset_viewer_settings_subtitle"), - backup('backup', Icons.cloud_upload_outlined, "backup_settings_subtitle"), - freeUpSpace('free_up_space', Icons.cleaning_services_outlined, "free_up_space_settings_subtitle"), - languages('language', Icons.language, "setting_languages_subtitle"), - networking('networking_settings', Icons.wifi, "networking_subtitle"), - notifications('notifications', Icons.notifications_none_rounded, "setting_notifications_subtitle"), - preferences('preferences_settings_title', Icons.interests_outlined, "preferences_settings_subtitle"), - timeline('asset_list_settings_title', Icons.auto_awesome_mosaic_outlined, "asset_list_settings_subtitle"), - beta('sync_status', Icons.sync_outlined, "sync_status_subtitle"); + advanced(Icons.build_outlined), + assetViewer(Icons.image_outlined), + backup(Icons.cloud_upload_outlined), + freeUpSpace(Icons.cleaning_services_outlined), + languages(Icons.language), + networking(Icons.wifi), + notifications(Icons.notifications_none_rounded), + preferences(Icons.interests_outlined), + timeline(Icons.auto_awesome_mosaic_outlined), + beta(Icons.sync_outlined); - final String title; - final String subtitle; final IconData icon; + String title(Translations t) => switch (this) { + SettingSection.advanced => t.advanced, + SettingSection.assetViewer => t.asset_viewer_settings_title, + SettingSection.backup => t.backup, + SettingSection.freeUpSpace => t.free_up_space, + SettingSection.languages => t.language, + SettingSection.networking => t.networking_settings, + SettingSection.notifications => t.notifications, + SettingSection.preferences => t.preferences_settings_title, + SettingSection.timeline => t.asset_list_settings_title, + SettingSection.beta => t.sync_status, + }; + + String subtitle(Translations t) => switch (this) { + SettingSection.advanced => t.advanced_settings_tile_subtitle, + SettingSection.assetViewer => t.asset_viewer_settings_subtitle, + SettingSection.backup => t.backup_settings_subtitle, + SettingSection.freeUpSpace => t.free_up_space_settings_subtitle, + SettingSection.languages => t.setting_languages_subtitle, + SettingSection.networking => t.networking_subtitle, + SettingSection.notifications => t.setting_notifications_subtitle, + SettingSection.preferences => t.preferences_settings_subtitle, + SettingSection.timeline => t.asset_list_settings_subtitle, + SettingSection.beta => t.sync_status_subtitle, + }; + Widget get widget => switch (this) { SettingSection.advanced => const AdvancedSettings(), SettingSection.assetViewer => const AssetViewerSettings(), @@ -45,7 +69,7 @@ enum SettingSection { SettingSection.beta => const SyncStatusAndActions(), }; - const SettingSection(this.title, this.icon, this.subtitle); + const SettingSection(this.icon); } @RoutePage() @@ -54,9 +78,8 @@ class SettingsPage extends StatelessWidget { @override Widget build(BuildContext context) { - context.locale; return Scaffold( - appBar: AppBar(centerTitle: false, title: const Text('settings').tr()), + appBar: AppBar(centerTitle: false, title: Text(context.t.settings)), body: context.isMobile ? const _MobileLayout() : const _TabletLayout(), ); } @@ -72,21 +95,29 @@ class _MobileLayout extends StatelessWidget { ? [ SettingsCard( icon: Icons.sync_outlined, - title: 'sync_status'.tr(), - subtitle: 'sync_status_subtitle'.tr(), + title: context.t.sync_status, + subtitle: context.t.sync_status_subtitle, settingRoute: const SyncStatusRoute(), ), ] : [ SettingsCard( - title: setting.title.tr(), - subtitle: setting.subtitle.tr(), + title: setting.title(context.t), + subtitle: setting.subtitle(context.t), icon: setting.icon, settingRoute: SettingsSubRoute(section: setting), ), ], ) .toList(); + settings.add( + SettingsCard( + icon: Icons.auto_awesome_outlined, + title: context.t.whats_new, + subtitle: context.t.whats_new_settings_subtitle, + settingRoute: const WhatsNewRoute(), + ), + ); return ListView(padding: const EdgeInsets.only(top: 10.0, bottom: 60), children: [...settings]); } } @@ -107,7 +138,7 @@ class _TabletLayout extends HookWidget { ...SettingSection.values.map( (s) => SliverToBoxAdapter( child: ListTile( - title: Text(s.title).tr(), + title: Text(s.title(context.t)), leading: Icon(s.icon), selected: s.index == selectedSection.value.index, selectedColor: context.primaryColor, @@ -116,6 +147,13 @@ class _TabletLayout extends HookWidget { ), ), ), + SliverToBoxAdapter( + child: ListTile( + title: Text(context.t.whats_new), + leading: const Icon(Icons.auto_awesome_outlined), + onTap: () => context.pushRoute(const WhatsNewRoute()), + ), + ), ], ), ), @@ -134,9 +172,8 @@ class SettingsSubPage extends StatelessWidget { @override Widget build(BuildContext context) { - context.locale; return Scaffold( - appBar: AppBar(centerTitle: false, title: Text(section.title).tr()), + appBar: AppBar(centerTitle: false, title: Text(section.title(context.t))), body: section.widget, ); } diff --git a/mobile/lib/pages/common/splash_screen.page.dart b/mobile/lib/pages/common/splash_screen.page.dart index 2f1328d7a1..65a78aed8a 100644 --- a/mobile/lib/pages/common/splash_screen.page.dart +++ b/mobile/lib/pages/common/splash_screen.page.dart @@ -1,5 +1,4 @@ import 'dart:async'; -import 'dart:io'; import 'package:auto_route/auto_route.dart'; import 'package:easy_localization/easy_localization.dart'; @@ -12,6 +11,7 @@ import 'package:immich_mobile/domain/models/store.model.dart'; import 'package:immich_mobile/entities/store.entity.dart'; import 'package:immich_mobile/generated/codegen_loader.g.dart'; import 'package:immich_mobile/generated/translations.g.dart'; +import 'package:immich_mobile/infrastructure/repositories/db.repository.dart'; import 'package:immich_mobile/infrastructure/repositories/settings.repository.dart'; import 'package:immich_mobile/providers/auth.provider.dart'; import 'package:immich_mobile/providers/background_sync.provider.dart'; @@ -25,9 +25,7 @@ import 'package:immich_mobile/theme/theme_data.dart'; import 'package:immich_mobile/widgets/common/immich_logo.dart'; import 'package:immich_mobile/widgets/common/immich_title_text.dart'; import 'package:logging/logging.dart'; -import 'package:path/path.dart' as path; -import 'package:path_provider/path_provider.dart'; -import 'package:url_launcher/url_launcher.dart' show launchUrl, LaunchMode; +import 'package:url_launcher/url_launcher.dart' show LaunchMode, launchUrl; class BootstrapErrorWidget extends StatelessWidget { final String error; @@ -132,20 +130,16 @@ class _BottomPanelState extends State<_BottomPanel> { } try { - final dir = await getApplicationDocumentsDirectory(); - for (final suffix in ['', '-wal', '-shm']) { - final file = File(path.join(dir.path, 'immich.sqlite$suffix')); - if (await file.exists()) { - await file.delete(); - } - } + await deleteSqliteDatabase(name: 'immich'); } catch (_) { return; } - if (mounted) { - setState(() => _cleared = true); + if (!mounted) { + return; } + + setState(() => _cleared = true); } @override @@ -290,11 +284,13 @@ class SplashScreenPageState extends ConsumerState { @override void initState() { super.initState(); - ref - .read(authProvider.notifier) - .setOpenApiServiceEndpoint() - .then(logConnectionInfo) - .whenComplete(() => resumeSession()); + unawaited( + ref + .read(authProvider.notifier) + .setOpenApiServiceEndpoint() + .then(logConnectionInfo) + .whenComplete(() => resumeSession()), + ); } void logConnectionInfo(String? endpoint) { @@ -305,7 +301,7 @@ class SplashScreenPageState extends ConsumerState { log.info("Resuming session at $endpoint"); } - void resumeSession() async { + Future resumeSession() async { final serverUrl = Store.tryGet(StoreKey.serverUrl); final endpoint = Store.tryGet(StoreKey.serverEndpoint); final accessToken = Store.tryGet(StoreKey.accessToken); @@ -318,46 +314,53 @@ class SplashScreenPageState extends ConsumerState { final viewIntentHandler = ref.read(viewIntentHandlerProvider); unawaited( - ref.read(authProvider.notifier).saveAuthInfo(accessToken: accessToken).then( - (_) async { - try { - wsProvider.connect(); - unawaited(infoProvider.getServerInfo()); + ref + .read(authProvider.notifier) + .saveAuthInfo(accessToken: accessToken) + .then( + (_) async { + try { + wsProvider.connect(); + unawaited(infoProvider.getServerInfo()); - bool syncSuccess = false; - await Future.wait([ - backgroundManager.syncLocal(full: true), - backgroundManager.syncRemote().then((success) => syncSuccess = success), - ]); + bool syncSuccess = false; + await Future.wait([ + backgroundManager.syncLocal(full: true), + backgroundManager.syncRemote().then((success) => syncSuccess = success), + ]); - await viewIntentHandler.flushDeferredViewIntent(); + await viewIntentHandler.flushDeferredViewIntent(); - if (syncSuccess) { - await Future.wait([ - backgroundManager.hashAssets().then((_) { - _resumeBackup(backupProvider); - }), - _resumeBackup(backupProvider), - // TODO: Bring back when the soft freeze issue is addressed - // backgroundManager.syncCloudIds(), - ]); - } else { - await backgroundManager.hashAssets(); - } + if (syncSuccess) { + await Future.wait([ + backgroundManager.hashAssets().then((_) { + unawaited(_resumeBackup(backupProvider)); + }), + _resumeBackup(backupProvider), + // TODO: Bring back when the soft freeze issue is addressed + // backgroundManager.syncCloudIds(), + ]); + } else { + await backgroundManager.hashAssets(); + } - if (SettingsRepository.instance.appConfig.backup.syncAlbums) { - await backgroundManager.syncLinkedAlbum(); - } - } catch (e) { - log.severe('Failed establishing connection to the server: $e'); - } - }, - onError: (exception) => { - log.severe('Failed to update auth info with access token: $accessToken'), - ref.read(authProvider.notifier).logout(), - context.router.replaceAll([const LoginRoute()]), - }, - ), + if (SettingsRepository.instance.appConfig.backup.syncAlbums) { + await backgroundManager.syncLinkedAlbum(); + } + } catch (e) { + log.severe('Failed establishing connection to the server: $e'); + } + }, + onError: (exception) { + log.severe('Failed to update auth info with access token: $accessToken'); + if (!mounted) { + return; + } + + unawaited(ref.read(authProvider.notifier).logout()); + unawaited(context.router.replaceAll([const LoginRoute()])); + }, + ), ); } else { log.severe('Missing crucial offline login info - Logging out completely'); diff --git a/mobile/lib/pages/common/tab_shell.page.dart b/mobile/lib/pages/common/tab_shell.page.dart index 2fdcec4054..240c4abe7a 100644 --- a/mobile/lib/pages/common/tab_shell.page.dart +++ b/mobile/lib/pages/common/tab_shell.page.dart @@ -1,18 +1,17 @@ import 'dart:async'; 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/events.model.dart'; import 'package:immich_mobile/domain/utils/event_stream.dart'; import 'package:immich_mobile/extensions/build_context_extensions.dart'; +import 'package:immich_mobile/generated/translations.g.dart'; import 'package:immich_mobile/presentation/pages/search/paginated_search.provider.dart'; import 'package:immich_mobile/providers/haptic_feedback.provider.dart'; import 'package:immich_mobile/providers/infrastructure/album.provider.dart'; import 'package:immich_mobile/providers/infrastructure/memory.provider.dart'; -import 'package:immich_mobile/providers/infrastructure/people.provider.dart'; import 'package:immich_mobile/providers/infrastructure/readonly_mode.provider.dart'; import 'package:immich_mobile/providers/search/search_input_focus.provider.dart'; import 'package:immich_mobile/providers/tab.provider.dart'; @@ -34,24 +33,24 @@ class _TabShellPageState extends ConsumerState { final navigationDestinations = [ NavigationDestination( - label: 'photos'.tr(), + label: context.t.photos, icon: const Icon(Icons.photo_library_outlined), selectedIcon: Icon(Icons.photo_library, color: context.primaryColor), ), NavigationDestination( - label: 'search'.tr(), + label: context.t.search, icon: const Icon(Icons.search_rounded), selectedIcon: Icon(Icons.search, color: context.primaryColor), enabled: !isReadonlyModeEnabled, ), NavigationDestination( - label: 'albums'.tr(), + label: context.t.albums, icon: const Icon(Icons.photo_album_outlined), selectedIcon: Icon(Icons.photo_album_rounded, color: context.primaryColor), enabled: !isReadonlyModeEnabled, ), NavigationDestination( - label: 'library'.tr(), + label: context.t.library$, icon: const Icon(Icons.space_dashboard_outlined), selectedIcon: Icon(Icons.space_dashboard_rounded, color: context.primaryColor), enabled: !isReadonlyModeEnabled, @@ -126,13 +125,12 @@ void _onNavigationSelected(TabsRouter router, int index, WidgetRef ref) { // Album page if (index == kAlbumTabIndex) { - ref.read(remoteAlbumProvider.notifier).refresh(); + unawaited(ref.read(remoteAlbumProvider.notifier).refresh()); } // Library page if (index == kLibraryTabIndex) { ref.invalidate(localAlbumProvider); - ref.invalidate(driftGetAllPeopleProvider); } ref.read(hapticFeedbackProvider.notifier).selectionClick(); @@ -168,7 +166,7 @@ class _BottomNavigationBarState extends ConsumerState<_BottomNavigationBar> { @override void dispose() { - _eventSubscription?.cancel(); + unawaited(_eventSubscription?.cancel()); super.dispose(); } diff --git a/mobile/lib/pages/library/folder/folder.page.dart b/mobile/lib/pages/library/folder/folder.page.dart index 5efb5ccc62..0264ceee16 100644 --- a/mobile/lib/pages/library/folder/folder.page.dart +++ b/mobile/lib/pages/library/folder/folder.page.dart @@ -1,6 +1,7 @@ +import 'dart:async'; + import 'package:auto_route/auto_route.dart'; import 'package:collection/collection.dart'; -import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; import 'package:flutter_hooks/flutter_hooks.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; @@ -8,6 +9,7 @@ import 'package:immich_mobile/constants/enums.dart'; import 'package:immich_mobile/domain/services/timeline.service.dart'; import 'package:immich_mobile/extensions/build_context_extensions.dart'; import 'package:immich_mobile/extensions/theme_extensions.dart'; +import 'package:immich_mobile/generated/translations.g.dart'; import 'package:immich_mobile/models/folder/recursive_folder.model.dart'; import 'package:immich_mobile/models/folder/root_folder.model.dart'; import 'package:immich_mobile/pages/common/large_leading_tile.dart'; @@ -18,6 +20,7 @@ import 'package:immich_mobile/providers/infrastructure/timeline.provider.dart'; import 'package:immich_mobile/routing/router.dart'; import 'package:immich_mobile/utils/bytes_units.dart'; import 'package:immich_mobile/widgets/common/immich_toast.dart'; +import 'package:intl/intl.dart'; RecursiveFolder? _findFolderInStructure(RootFolder rootFolder, RecursiveFolder targetFolder) { for (final folder in rootFolder.subfolders) { @@ -53,7 +56,7 @@ class FolderPage extends HookConsumerWidget { useEffect(() { if (folder == null) { - ref.read(folderStructureProvider.notifier).fetchFolders(sortOrder.value); + unawaited(ref.read(folderStructureProvider.notifier).fetchFolders(sortOrder.value)); } return null; }, []); @@ -72,14 +75,14 @@ class FolderPage extends HookConsumerWidget { void onToggleSortOrder() { final newOrder = sortOrder.value == SortOrder.asc ? SortOrder.desc : SortOrder.asc; - ref.read(folderStructureProvider.notifier).fetchFolders(newOrder); + unawaited(ref.read(folderStructureProvider.notifier).fetchFolders(newOrder)); sortOrder.value = newOrder; } return Scaffold( appBar: AppBar( - title: Text(currentFolder.value?.name ?? tr("folders")), + title: Text(currentFolder.value?.name ?? context.t.folders), elevation: 0, centerTitle: false, actions: [IconButton(icon: const Icon(Icons.swap_vert), onPressed: onToggleSortOrder)], @@ -89,13 +92,13 @@ class FolderPage extends HookConsumerWidget { if (folder == null) { return FolderContent(folder: rootFolder, root: rootFolder, sortOrder: sortOrder.value); } else { - return FolderContent(folder: currentFolder.value!, root: rootFolder, sortOrder: sortOrder.value); + return FolderContent(folder: currentFolder.value, root: rootFolder, sortOrder: sortOrder.value); } }, loading: () => const Center(child: CircularProgressIndicator()), error: (error, stack) { - ImmichToast.show(context: context, msg: "failed_to_load_folder".tr(), toastType: ToastType.error); - return Center(child: const Text("failed_to_load_folder").tr()); + ImmichToast.show(context: context, msg: context.t.failed_to_load_folder, toastType: ToastType.error); + return Center(child: Text(context.t.failed_to_load_folder)); }, ), ); @@ -118,21 +121,21 @@ class FolderContent extends HookConsumerWidget { if (folder == null) { return; } - ref.read(folderRenderListProvider(folder!).notifier).fetchAssets(sortOrder); + unawaited(ref.read(folderRenderListProvider(folder!).notifier).fetchAssets(sortOrder)); return null; }, [folder]); if (folder == null) { - return Center(child: const Text("folder_not_found").tr()); + return Center(child: Text(context.t.folder_not_found)); } - getSubtitle(int subFolderCount) { + String getSubtitle(int subFolderCount) { if (subFolderCount > 0) { - return "$subFolderCount ${tr("folders")}".toLowerCase(); + return "$subFolderCount ${context.t.folders}".toLowerCase(); } if (subFolderCount == 1) { - return "1 ${tr("folder")}".toLowerCase(); + return "1 ${context.t.folder}".toLowerCase(); } return ""; @@ -145,7 +148,7 @@ class FolderContent extends HookConsumerWidget { child: folderRenderlist.when( data: (folderAssets) { if (folder!.subfolders.isEmpty && folderAssets.isEmpty) { - return Center(child: const Text("empty_folder").tr()); + return Center(child: Text(context.t.empty_folder)); } return ListView( @@ -176,12 +179,14 @@ class FolderContent extends HookConsumerWidget { (index, asset) => LargeLeadingTile( onTap: () { AssetViewer.setAsset(ref, asset); - context.pushRoute( - AssetViewerRoute( - initialIndex: index, - timelineService: ref - .read(timelineFactoryProvider) - .fromAssets(folderAssets, TimelineOrigin.folder), + unawaited( + context.pushRoute( + AssetViewerRoute( + initialIndex: index, + timelineService: ref + .read(timelineFactoryProvider) + .fromAssets(folderAssets, TimelineOrigin.folder), + ), ), ); }, @@ -207,8 +212,8 @@ class FolderContent extends HookConsumerWidget { }, loading: () => const Center(child: CircularProgressIndicator()), error: (error, stack) { - ImmichToast.show(context: context, msg: "failed_to_load_assets".tr(), toastType: ToastType.error); - return Center(child: const Text("failed_to_load_assets").tr()); + ImmichToast.show(context: context, msg: context.t.failed_to_load_assets, toastType: ToastType.error); + return Center(child: Text(context.t.failed_to_load_assets)); }, ), ), diff --git a/mobile/lib/pages/library/locked/pin_auth.page.dart b/mobile/lib/pages/library/locked/pin_auth.page.dart index 3af320dc5f..db0e009d8c 100644 --- a/mobile/lib/pages/library/locked/pin_auth.page.dart +++ b/mobile/lib/pages/library/locked/pin_auth.page.dart @@ -1,11 +1,11 @@ import 'dart:async'; import 'package:auto_route/auto_route.dart'; -import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; import 'package:flutter_hooks/flutter_hooks.dart' show useState; import 'package:hooks_riverpod/hooks_riverpod.dart'; import 'package:immich_mobile/extensions/build_context_extensions.dart'; +import 'package:immich_mobile/generated/translations.g.dart'; import 'package:immich_mobile/providers/local_auth.provider.dart'; import 'package:immich_mobile/routing/router.dart'; import 'package:immich_mobile/widgets/forms/pin_registration_form.dart'; @@ -25,21 +25,23 @@ class PinAuthPage extends HookConsumerWidget { Future registerBiometric(String pinCode) async { final isRegistered = await ref.read(localAuthProvider.notifier).registerBiometric(context, pinCode); - if (isRegistered) { - context.showSnackBar( - SnackBar( - content: Text('biometric_auth_enabled'.tr(), style: context.textTheme.labelLarge), - duration: const Duration(seconds: 3), - backgroundColor: context.colorScheme.primaryContainer, - ), - ); - - unawaited(context.replaceRoute(const DriftLockedFolderRoute())); + if (!isRegistered || !context.mounted) { + return; } + + context.showSnackBar( + SnackBar( + content: Text(context.t.biometric_auth_enabled, style: context.textTheme.labelLarge), + duration: const Duration(seconds: 3), + backgroundColor: context.colorScheme.primaryContainer, + ), + ); + + unawaited(context.replaceRoute(const DriftLockedFolderRoute())); } - enableBiometricAuth() { - showDialog( + Future enableBiometricAuth() { + return showDialog( context: context, builder: (buildContext) { return SimpleDialog( @@ -50,10 +52,10 @@ class PinAuthPage extends HookConsumerWidget { mainAxisSize: MainAxisSize.min, children: [ PinVerificationForm( - description: 'enable_biometric_auth_description'.tr(), + description: context.t.enable_biometric_auth_description, onSuccess: (pinCode) { Navigator.pop(buildContext); - registerBiometric(pinCode); + unawaited(registerBiometric(pinCode)); }, autoFocus: true, icon: Icons.fingerprint_rounded, @@ -69,7 +71,7 @@ class PinAuthPage extends HookConsumerWidget { } return Scaffold( - appBar: AppBar(title: Text('locked_folder'.tr())), + appBar: AppBar(title: Text(context.t.locked_folder)), body: ListView( shrinkWrap: true, children: [ @@ -83,7 +85,7 @@ class PinAuthPage extends HookConsumerWidget { child: PinVerificationForm( autoFocus: true, onSuccess: (_) { - context.replaceRoute(const DriftLockedFolderRoute()); + unawaited(context.replaceRoute(const DriftLockedFolderRoute())); }, ), ), @@ -93,9 +95,9 @@ class PinAuthPage extends HookConsumerWidget { padding: const EdgeInsets.only(right: 16.0), child: TextButton.icon( icon: const Icon(Icons.fingerprint, size: 28), - onPressed: enableBiometricAuth, + onPressed: () => unawaited(enableBiometricAuth()), label: Text( - 'use_biometric'.tr(), + context.t.use_biometric, style: context.textTheme.labelLarge?.copyWith(color: context.primaryColor, fontSize: 18), ), ), diff --git a/mobile/lib/pages/library/partner/partner.page.dart b/mobile/lib/pages/library/partner/partner.page.dart index 7274b8a14e..afe64d24f4 100644 --- a/mobile/lib/pages/library/partner/partner.page.dart +++ b/mobile/lib/pages/library/partner/partner.page.dart @@ -33,7 +33,7 @@ class PartnerPage extends ConsumerWidget { title: Text(context.t.partners), elevation: 0, centerTitle: false, - actions: const [ActionIconButtonWidget(action: PartnerAddAction())], + actions: const [ActionIconButton(action: PartnerAddAction())], ), body: sharedByAsync.when( data: (partners) => PartnerSharedByList(partners: partners.toList(growable: false)), @@ -60,7 +60,7 @@ class _EmptyPartners extends StatelessWidget { ), const Align( alignment: .center, - child: ActionButtonWidget(action: PartnerAddAction()), + child: ActionButton(action: PartnerAddAction()), ), ], ), @@ -88,7 +88,7 @@ class PartnerSharedByList extends StatelessWidget { leading: PartnerUserAvatar(userId: partner.id, name: partner.name), title: Text(partner.name), subtitle: Text(partner.email), - trailing: ActionIconButtonWidget( + trailing: ActionIconButton( action: PartnerRemoveAction(sharedWithId: partner.id, partnerName: partner.name), ), ); diff --git a/mobile/lib/pages/library/shared_link/shared_link.page.dart b/mobile/lib/pages/library/shared_link/shared_link.page.dart index a4f52ebd4c..70cd4e2129 100644 --- a/mobile/lib/pages/library/shared_link/shared_link.page.dart +++ b/mobile/lib/pages/library/shared_link/shared_link.page.dart @@ -1,9 +1,11 @@ +import 'dart:async'; + import 'package:auto_route/auto_route.dart'; -import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; import 'package:flutter_hooks/flutter_hooks.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; import 'package:immich_mobile/extensions/asyncvalue_extensions.dart'; +import 'package:immich_mobile/generated/translations.g.dart'; import 'package:immich_mobile/models/shared_link/shared_link.model.dart'; import 'package:immich_mobile/providers/shared_link.provider.dart'; import 'package:immich_mobile/widgets/shared_link/shared_link_item.dart'; @@ -17,7 +19,7 @@ class SharedLinkPage extends HookConsumerWidget { final sharedLinks = ref.watch(sharedLinksStateProvider); useEffect(() { - ref.read(sharedLinksStateProvider.notifier).fetchLinks(); + unawaited(ref.read(sharedLinksStateProvider.notifier).fetchLinks()); return () { if (!context.mounted) { return; @@ -34,7 +36,7 @@ class SharedLinkPage extends HookConsumerWidget { children: [ Icon(Icons.link_off, size: 100, color: Theme.of(context).colorScheme.onSurface.withAlpha(128)), const SizedBox(height: 20), - const Text("you_dont_have_any_shared_links", style: TextStyle(fontSize: 14)).tr(), + Text(context.t.you_dont_have_any_shared_links, style: const TextStyle(fontSize: 14)), ], ), ); @@ -66,7 +68,7 @@ class SharedLinkPage extends HookConsumerWidget { } return Scaffold( - appBar: AppBar(title: const Text("shared_link_app_bar_title").tr(), elevation: 0, centerTitle: false), + appBar: AppBar(title: Text(context.t.shared_link_app_bar_title), elevation: 0, centerTitle: false), body: SafeArea( child: sharedLinks.widgetWhen( onError: (error, stackTrace) => buildNoShares(), diff --git a/mobile/lib/pages/library/shared_link/shared_link_edit.page.dart b/mobile/lib/pages/library/shared_link/shared_link_edit.page.dart index 825b1ec2e7..6c90571428 100644 --- a/mobile/lib/pages/library/shared_link/shared_link_edit.page.dart +++ b/mobile/lib/pages/library/shared_link/shared_link_edit.page.dart @@ -132,10 +132,10 @@ class SharedLinkEditPage extends HookConsumerWidget { textInputAction: TextInputAction.done, autofocus: false, decoration: InputDecoration( - labelText: slugController.text.isNotEmpty ? context.t.custom_url : null, + labelText: slugController.text.isNotEmpty ? context.t.shared_link_custom_url_title : null, labelStyle: const TextStyle(fontWeight: FontWeight.bold), border: const OutlineInputBorder(), - hintText: context.t.custom_url, + hintText: context.t.shared_link_custom_url_title, prefixText: slugController.text.isNotEmpty ? '/s/' : null, prefixStyle: const TextStyle(fontWeight: FontWeight.bold, fontSize: 14), ), @@ -427,8 +427,8 @@ class SharedLinkEditPage extends HookConsumerWidget { return showDialog( context: context, builder: (BuildContext context) => ConfirmDialog( - title: "delete_shared_link_dialog_title", - content: "confirm_delete_shared_link", + title: context.t.delete_shared_link_dialog_title, + content: context.t.confirm_delete_shared_link, onOk: () async { await ref.read(sharedLinkServiceProvider).deleteSharedLink(existingLink!.id); ref.invalidate(sharedLinksStateProvider); diff --git a/mobile/lib/pages/login/change_password.page.dart b/mobile/lib/pages/login/change_password.page.dart index 248526df1b..051f7f408c 100644 --- a/mobile/lib/pages/login/change_password.page.dart +++ b/mobile/lib/pages/login/change_password.page.dart @@ -1,14 +1,11 @@ import 'package:auto_route/auto_route.dart'; import 'package:flutter/material.dart'; -import 'package:hooks_riverpod/hooks_riverpod.dart'; import 'package:immich_mobile/widgets/forms/change_password_form.dart'; @RoutePage() -class ChangePasswordPage extends HookConsumerWidget { +class ChangePasswordPage extends StatelessWidget { const ChangePasswordPage({super.key}); @override - Widget build(BuildContext context, WidgetRef ref) { - return const Scaffold(body: ChangePasswordForm()); - } + Widget build(BuildContext context) => const Scaffold(body: ChangePasswordForm()); } diff --git a/mobile/lib/pages/login/login.page.dart b/mobile/lib/pages/login/login.page.dart index 5f40b32baa..228fa1cc30 100644 --- a/mobile/lib/pages/login/login.page.dart +++ b/mobile/lib/pages/login/login.page.dart @@ -1,28 +1,29 @@ +import 'dart:async'; + import 'package:auto_route/auto_route.dart'; import 'package:flutter/material.dart'; import 'package:flutter_hooks/flutter_hooks.dart'; -import 'package:hooks_riverpod/hooks_riverpod.dart'; import 'package:immich_mobile/extensions/build_context_extensions.dart'; import 'package:immich_mobile/extensions/theme_extensions.dart'; -import 'package:immich_mobile/widgets/forms/login/login_form.dart'; import 'package:immich_mobile/routing/router.dart'; +import 'package:immich_mobile/widgets/forms/login/login_form.dart'; import 'package:package_info_plus/package_info_plus.dart'; @RoutePage() -class LoginPage extends HookConsumerWidget { +class LoginPage extends HookWidget { const LoginPage({super.key}); @override - Widget build(BuildContext context, WidgetRef ref) { + Widget build(BuildContext context) { final appVersion = useState('0.0.0'); - getAppInfo() async { - PackageInfo packageInfo = await PackageInfo.fromPlatform(); + Future getAppInfo() async { + final PackageInfo packageInfo = await PackageInfo.fromPlatform(); appVersion.value = packageInfo.version; } useEffect(() { - getAppInfo(); + unawaited(getAppInfo()); return null; }); @@ -55,7 +56,7 @@ class LoginPage extends HookConsumerWidget { ), ), onTap: () { - context.pushRoute(const AppLogRoute()); + unawaited(context.pushRoute(const AppLogRoute())); }, ), ], diff --git a/mobile/lib/pages/search/map/map_location_picker.page.dart b/mobile/lib/pages/search/map/map_location_picker.page.dart index 3dace15ced..314f2aba7d 100644 --- a/mobile/lib/pages/search/map/map_location_picker.page.dart +++ b/mobile/lib/pages/search/map/map_location_picker.page.dart @@ -1,25 +1,25 @@ +import 'dart:async'; import 'dart:math'; import 'package:auto_route/auto_route.dart'; -import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; import 'package:flutter_hooks/flutter_hooks.dart'; -import 'package:hooks_riverpod/hooks_riverpod.dart'; import 'package:immich_mobile/extensions/asyncvalue_extensions.dart'; import 'package:immich_mobile/extensions/build_context_extensions.dart'; import 'package:immich_mobile/extensions/maplibrecontroller_extensions.dart'; +import 'package:immich_mobile/generated/translations.g.dart'; import 'package:immich_mobile/utils/map_utils.dart'; import 'package:immich_mobile/widgets/map/map_theme_override.dart'; import 'package:maplibre_gl/maplibre_gl.dart'; @RoutePage() -class MapLocationPickerPage extends HookConsumerWidget { +class MapLocationPickerPage extends HookWidget { final LatLng initialLatLng; const MapLocationPickerPage({super.key, this.initialLatLng = const LatLng(0, 0)}); @override - Widget build(BuildContext context, WidgetRef ref) { + Widget build(BuildContext context) { final selectedLatLng = useValueNotifier(initialLatLng); final controller = useRef(null); final marker = useRef(null); @@ -37,17 +37,17 @@ class MapLocationPickerPage extends HookConsumerWidget { } void onClose([LatLng? selected]) { - context.maybePop(selected); + unawaited(context.maybePop(selected)); } Future getCurrentLocation() async { - var (currentLocation, _) = await MapUtils.checkPermAndGetLocation(context: context); + final (currentLocation, _) = await MapUtils.checkPermAndGetLocation(context: context); if (currentLocation == null) { return; } - var currentLatLng = LatLng(currentLocation.latitude, currentLocation.longitude); + final currentLatLng = LatLng(currentLocation.latitude, currentLocation.longitude); selectedLatLng.value = currentLatLng; await controller.value?.animateCamera(CameraUpdate.newLatLngZoom(currentLatLng, 12)); } @@ -140,7 +140,7 @@ class _BottomBar extends StatelessWidget { const SizedBox(width: 15), ValueListenableBuilder( valueListenable: selectedLatLng, - builder: (_, value, __) => + builder: (_, value, _) => Text("${value.latitude.toStringAsFixed(4)}, ${value.longitude.toStringAsFixed(4)}"), ), ], @@ -148,10 +148,7 @@ class _BottomBar extends StatelessWidget { Row( mainAxisAlignment: MainAxisAlignment.spaceEvenly, children: [ - ElevatedButton( - onPressed: onUseLocation, - child: const Text("map_location_picker_page_use_location").tr(), - ), + ElevatedButton(onPressed: onUseLocation, child: Text(context.t.map_location_picker_page_use_location)), ElevatedButton(onPressed: onGetCurrentLocation, child: const Icon(Icons.my_location)), ], ), diff --git a/mobile/lib/pages/settings/sync_status.page.dart b/mobile/lib/pages/settings/sync_status.page.dart index 58750e9e30..6a0af1230d 100644 --- a/mobile/lib/pages/settings/sync_status.page.dart +++ b/mobile/lib/pages/settings/sync_status.page.dart @@ -1,6 +1,6 @@ import 'package:auto_route/auto_route.dart'; import 'package:flutter/material.dart'; -import 'package:immich_mobile/extensions/translate_extensions.dart'; +import 'package:immich_mobile/generated/translations.g.dart'; import 'package:immich_mobile/widgets/settings/beta_sync_settings/sync_status_and_actions.dart'; @RoutePage() @@ -12,7 +12,7 @@ class SyncStatusPage extends StatelessWidget { return Scaffold( appBar: AppBar( elevation: 0, - title: const Text("sync_status").t(context: context), + title: Text(context.t.sync_status), leading: IconButton( onPressed: () => context.maybePop(true), splashRadius: 24, diff --git a/mobile/lib/pages/share_intent/share_intent.page.dart b/mobile/lib/pages/share_intent/share_intent.page.dart index 2744b187de..5b651fbc8f 100644 --- a/mobile/lib/pages/share_intent/share_intent.page.dart +++ b/mobile/lib/pages/share_intent/share_intent.page.dart @@ -1,8 +1,10 @@ +import 'dart:async'; + 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/extensions/build_context_extensions.dart'; +import 'package:immich_mobile/generated/translations.g.dart'; import 'package:immich_mobile/models/upload/share_intent_attachment.model.dart'; import 'package:immich_mobile/pages/common/large_leading_tile.dart'; import 'package:immich_mobile/providers/asset_viewer/share_intent_upload.provider.dart'; @@ -35,7 +37,7 @@ class ShareIntentPage extends ConsumerWidget { ref.read(shareIntentUploadProvider.notifier).addAttachments(attachments); } - void upload() async { + Future upload() async { final files = candidates.map((candidate) => candidate.file).toList(); await ref.read(shareIntentUploadProvider.notifier).uploadAll(files); } @@ -56,7 +58,7 @@ class ShareIntentPage extends ConsumerWidget { appBar: AppBar( title: Column( children: [ - const Text('upload_to_immich').tr(namedArgs: {'count': candidates.length.toString()}), + Text(context.t.upload_to_immich(count: candidates.length)), Text( currentEndpoint, style: context.textTheme.labelMedium?.copyWith(color: context.colorScheme.onSurface.withAlpha(200)), @@ -65,7 +67,7 @@ class ShareIntentPage extends ConsumerWidget { ), leading: IconButton( onPressed: () { - context.navigateTo(const TabShellRoute()); + unawaited(context.navigateTo(const TabShellRoute())); }, icon: const Icon(Icons.arrow_back), ), @@ -102,7 +104,7 @@ class ShareIntentPage extends ConsumerWidget { Icons.image, color: Colors.white, size: 20, - shadows: [Shadow(offset: Offset(0, 0), blurRadius: 8.0, color: Colors.black45)], + shadows: [Shadow(offset: Offset.zero, blurRadius: 8.0, color: Colors.black45)], ), ), ], @@ -128,7 +130,7 @@ class ShareIntentPage extends ConsumerWidget { height: 48, child: ElevatedButton( onPressed: (isUploading || isUploaded) ? null : upload, - child: (isUploading || isUploaded) ? UploadingText(candidates: candidates) : const Text('upload').tr(), + child: (isUploading || isUploaded) ? UploadingText(candidates: candidates) : Text(context.t.upload), ), ), ), @@ -147,9 +149,7 @@ class UploadingText extends StatelessWidget { return element.status == UploadStatus.complete; }).length; - return const Text( - "shared_intent_upload_button_progress_text", - ).tr(namedArgs: {'current': uploadedCount.toString(), 'total': candidates.length.toString()}); + return Text(context.t.shared_intent_upload_button_progress_text(current: uploadedCount, total: candidates.length)); } } @@ -166,7 +166,7 @@ class UploadStatusIcon extends StatelessWidget { return Icon( Icons.check_circle_outline_rounded, color: context.colorScheme.onSurface.withAlpha(100), - semanticLabel: 'not_selected'.tr(), + semanticLabel: context.t.not_selected, ); } @@ -174,7 +174,7 @@ class UploadStatusIcon extends StatelessWidget { UploadStatus.enqueued => Icon( Icons.check_circle_rounded, color: context.primaryColor, - semanticLabel: 'enqueued'.tr(), + semanticLabel: context.t.enqueued, ), UploadStatus.running => Stack( alignment: AlignmentDirectional.center, @@ -189,7 +189,7 @@ class UploadStatusIcon extends StatelessWidget { backgroundColor: context.colorScheme.surfaceContainerLow, strokeWidth: 3, value: value, - semanticsLabel: 'uploading'.tr(), + semanticsLabel: context.t.uploading, ), ), ), @@ -199,8 +199,12 @@ class UploadStatusIcon extends StatelessWidget { ), ], ), - UploadStatus.complete => Icon(Icons.check_circle_rounded, color: Colors.green, semanticLabel: 'completed'.tr()), - UploadStatus.failed => Icon(Icons.error_rounded, color: Colors.red, semanticLabel: 'failed'.tr()), + UploadStatus.complete => Icon( + Icons.check_circle_rounded, + color: Colors.green, + semanticLabel: context.t.completed, + ), + UploadStatus.failed => Icon(Icons.error_rounded, color: Colors.red, semanticLabel: context.t.failed), }; return statusIcon; diff --git a/mobile/lib/platform/background_worker_api.g.dart b/mobile/lib/platform/background_worker_api.g.dart deleted file mode 100644 index 34f4c41b48..0000000000 --- a/mobile/lib/platform/background_worker_api.g.dart +++ /dev/null @@ -1,365 +0,0 @@ -// Autogenerated from Pigeon (v26.3.4), do not edit directly. -// See also: https://pub.dev/packages/pigeon -// ignore_for_file: unused_import, unused_shown_name -// ignore_for_file: type=lint - -import 'dart:async'; -import 'dart:typed_data' show Float64List, Int32List, Int64List; - -import 'package:flutter/services.dart'; -import 'package:meta/meta.dart' show immutable, protected, visibleForTesting; - -Object? _extractReplyValueOrThrow(List? replyList, String channelName, {required bool isNullValid}) { - if (replyList == null) { - throw PlatformException( - code: 'channel-error', - message: 'Unable to establish connection on channel: "$channelName".', - ); - } else if (replyList.length > 1) { - throw PlatformException(code: replyList[0]! as String, message: replyList[1] as String?, details: replyList[2]); - } else if (!isNullValid && (replyList.isNotEmpty && replyList[0] == null)) { - throw PlatformException( - code: 'null-error', - message: 'Host platform returned null value for non-null return value.', - ); - } - return replyList.firstOrNull; -} - -List wrapResponse({Object? result, PlatformException? error, bool empty = false}) { - if (empty) { - return []; - } - if (error == null) { - return [result]; - } - return [error.code, error.message, error.details]; -} - -bool _deepEquals(Object? a, Object? b) { - if (identical(a, b)) { - return true; - } - if (a is double && b is double) { - if (a.isNaN && b.isNaN) { - return true; - } - return a == b; - } - if (a is List && b is List) { - return a.length == b.length && a.indexed.every(((int, dynamic) item) => _deepEquals(item.$2, b[item.$1])); - } - if (a is Map && b is Map) { - if (a.length != b.length) { - return false; - } - for (final MapEntry entryA in a.entries) { - bool found = false; - for (final MapEntry entryB in b.entries) { - if (_deepEquals(entryA.key, entryB.key)) { - if (_deepEquals(entryA.value, entryB.value)) { - found = true; - break; - } else { - return false; - } - } - } - if (!found) { - return false; - } - } - return true; - } - return a == b; -} - -int _deepHash(Object? value) { - if (value is List) { - return Object.hashAll(value.map(_deepHash)); - } - if (value is Map) { - int result = 0; - for (final MapEntry entry in value.entries) { - result += (_deepHash(entry.key) * 31) ^ _deepHash(entry.value); - } - return result; - } - if (value is double && value.isNaN) { - // Normalize NaN to a consistent hash. - return 0x7FF8000000000000.hashCode; - } - if (value is double && value == 0.0) { - // Normalize -0.0 to 0.0 so they have the same hash code. - return 0.0.hashCode; - } - return value.hashCode; -} - -class BackgroundWorkerSettings { - BackgroundWorkerSettings({required this.requiresCharging, required this.minimumDelaySeconds}); - - bool requiresCharging; - - int minimumDelaySeconds; - - List _toList() { - return [requiresCharging, minimumDelaySeconds]; - } - - Object encode() { - return _toList(); - } - - static BackgroundWorkerSettings decode(Object result) { - result as List; - return BackgroundWorkerSettings(requiresCharging: result[0]! as bool, minimumDelaySeconds: result[1]! as int); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - bool operator ==(Object other) { - if (other is! BackgroundWorkerSettings || other.runtimeType != runtimeType) { - return false; - } - if (identical(this, other)) { - return true; - } - return _deepEquals(requiresCharging, other.requiresCharging) && - _deepEquals(minimumDelaySeconds, other.minimumDelaySeconds); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => _deepHash([runtimeType, ..._toList()]); -} - -class _PigeonCodec extends StandardMessageCodec { - const _PigeonCodec(); - @override - void writeValue(WriteBuffer buffer, Object? value) { - if (value is int) { - buffer.putUint8(4); - buffer.putInt64(value); - } else if (value is BackgroundWorkerSettings) { - buffer.putUint8(129); - writeValue(buffer, value.encode()); - } else { - super.writeValue(buffer, value); - } - } - - @override - Object? readValueOfType(int type, ReadBuffer buffer) { - switch (type) { - case 129: - return BackgroundWorkerSettings.decode(readValue(buffer)!); - default: - return super.readValueOfType(type, buffer); - } - } -} - -class BackgroundWorkerFgHostApi { - /// Constructor for [BackgroundWorkerFgHostApi]. The [binaryMessenger] named argument is - /// available for dependency injection. If it is left null, the default - /// BinaryMessenger will be used which routes to the host platform. - BackgroundWorkerFgHostApi({BinaryMessenger? binaryMessenger, String messageChannelSuffix = ''}) - : pigeonVar_binaryMessenger = binaryMessenger, - pigeonVar_messageChannelSuffix = messageChannelSuffix.isNotEmpty ? '.$messageChannelSuffix' : ''; - final BinaryMessenger? pigeonVar_binaryMessenger; - - static const MessageCodec pigeonChannelCodec = _PigeonCodec(); - - final String pigeonVar_messageChannelSuffix; - - Future enable() async { - final pigeonVar_channelName = - 'dev.flutter.pigeon.immich_mobile.BackgroundWorkerFgHostApi.enable$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - - _extractReplyValueOrThrow(pigeonVar_replyList, pigeonVar_channelName, isNullValid: true); - } - - Future saveNotificationMessage(String title, String body) async { - final pigeonVar_channelName = - 'dev.flutter.pigeon.immich_mobile.BackgroundWorkerFgHostApi.saveNotificationMessage$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send([title, body]); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - - _extractReplyValueOrThrow(pigeonVar_replyList, pigeonVar_channelName, isNullValid: true); - } - - Future configure(BackgroundWorkerSettings settings) async { - final pigeonVar_channelName = - 'dev.flutter.pigeon.immich_mobile.BackgroundWorkerFgHostApi.configure$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send([settings]); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - - _extractReplyValueOrThrow(pigeonVar_replyList, pigeonVar_channelName, isNullValid: true); - } - - Future disable() async { - final pigeonVar_channelName = - 'dev.flutter.pigeon.immich_mobile.BackgroundWorkerFgHostApi.disable$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - - _extractReplyValueOrThrow(pigeonVar_replyList, pigeonVar_channelName, isNullValid: true); - } -} - -class BackgroundWorkerBgHostApi { - /// Constructor for [BackgroundWorkerBgHostApi]. The [binaryMessenger] named argument is - /// available for dependency injection. If it is left null, the default - /// BinaryMessenger will be used which routes to the host platform. - BackgroundWorkerBgHostApi({BinaryMessenger? binaryMessenger, String messageChannelSuffix = ''}) - : pigeonVar_binaryMessenger = binaryMessenger, - pigeonVar_messageChannelSuffix = messageChannelSuffix.isNotEmpty ? '.$messageChannelSuffix' : ''; - final BinaryMessenger? pigeonVar_binaryMessenger; - - static const MessageCodec pigeonChannelCodec = _PigeonCodec(); - - final String pigeonVar_messageChannelSuffix; - - Future onInitialized() async { - final pigeonVar_channelName = - 'dev.flutter.pigeon.immich_mobile.BackgroundWorkerBgHostApi.onInitialized$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - - _extractReplyValueOrThrow(pigeonVar_replyList, pigeonVar_channelName, isNullValid: true); - } - - Future close() async { - final pigeonVar_channelName = - 'dev.flutter.pigeon.immich_mobile.BackgroundWorkerBgHostApi.close$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - - _extractReplyValueOrThrow(pigeonVar_replyList, pigeonVar_channelName, isNullValid: true); - } -} - -abstract class BackgroundWorkerFlutterApi { - static const MessageCodec pigeonChannelCodec = _PigeonCodec(); - - Future onIosUpload(bool isRefresh, int? maxSeconds); - - Future onAndroidUpload(int? maxMinutes); - - Future cancel(); - - static void setUp( - BackgroundWorkerFlutterApi? api, { - BinaryMessenger? binaryMessenger, - String messageChannelSuffix = '', - }) { - messageChannelSuffix = messageChannelSuffix.isNotEmpty ? '.$messageChannelSuffix' : ''; - { - final pigeonVar_channel = BasicMessageChannel( - 'dev.flutter.pigeon.immich_mobile.BackgroundWorkerFlutterApi.onIosUpload$messageChannelSuffix', - pigeonChannelCodec, - binaryMessenger: binaryMessenger, - ); - if (api == null) { - pigeonVar_channel.setMessageHandler(null); - } else { - pigeonVar_channel.setMessageHandler((Object? message) async { - final List args = message! as List; - final bool arg_isRefresh = args[0]! as bool; - final int? arg_maxSeconds = args[1] as int?; - try { - await api.onIosUpload(arg_isRefresh, arg_maxSeconds); - return wrapResponse(empty: true); - } on PlatformException catch (e) { - return wrapResponse(error: e); - } catch (e) { - return wrapResponse( - error: PlatformException(code: 'error', message: e.toString()), - ); - } - }); - } - } - { - final pigeonVar_channel = BasicMessageChannel( - 'dev.flutter.pigeon.immich_mobile.BackgroundWorkerFlutterApi.onAndroidUpload$messageChannelSuffix', - pigeonChannelCodec, - binaryMessenger: binaryMessenger, - ); - if (api == null) { - pigeonVar_channel.setMessageHandler(null); - } else { - pigeonVar_channel.setMessageHandler((Object? message) async { - final List args = message! as List; - final int? arg_maxMinutes = args[0] as int?; - try { - await api.onAndroidUpload(arg_maxMinutes); - return wrapResponse(empty: true); - } on PlatformException catch (e) { - return wrapResponse(error: e); - } catch (e) { - return wrapResponse( - error: PlatformException(code: 'error', message: e.toString()), - ); - } - }); - } - } - { - final pigeonVar_channel = BasicMessageChannel( - 'dev.flutter.pigeon.immich_mobile.BackgroundWorkerFlutterApi.cancel$messageChannelSuffix', - pigeonChannelCodec, - binaryMessenger: binaryMessenger, - ); - if (api == null) { - pigeonVar_channel.setMessageHandler(null); - } else { - pigeonVar_channel.setMessageHandler((Object? message) async { - try { - await api.cancel(); - return wrapResponse(empty: true); - } on PlatformException catch (e) { - return wrapResponse(error: e); - } catch (e) { - return wrapResponse( - error: PlatformException(code: 'error', message: e.toString()), - ); - } - }); - } - } - } -} diff --git a/mobile/lib/platform/background_worker_lock_api.g.dart b/mobile/lib/platform/background_worker_lock_api.g.dart deleted file mode 100644 index c7836c4c69..0000000000 --- a/mobile/lib/platform/background_worker_lock_api.g.dart +++ /dev/null @@ -1,90 +0,0 @@ -// Autogenerated from Pigeon (v26.3.4), do not edit directly. -// See also: https://pub.dev/packages/pigeon -// ignore_for_file: unused_import, unused_shown_name -// ignore_for_file: type=lint - -import 'dart:async'; -import 'dart:typed_data' show Float64List, Int32List, Int64List; - -import 'package:flutter/services.dart'; -import 'package:meta/meta.dart' show immutable, protected, visibleForTesting; - -Object? _extractReplyValueOrThrow(List? replyList, String channelName, {required bool isNullValid}) { - if (replyList == null) { - throw PlatformException( - code: 'channel-error', - message: 'Unable to establish connection on channel: "$channelName".', - ); - } else if (replyList.length > 1) { - throw PlatformException(code: replyList[0]! as String, message: replyList[1] as String?, details: replyList[2]); - } else if (!isNullValid && (replyList.isNotEmpty && replyList[0] == null)) { - throw PlatformException( - code: 'null-error', - message: 'Host platform returned null value for non-null return value.', - ); - } - return replyList.firstOrNull; -} - -class _PigeonCodec extends StandardMessageCodec { - const _PigeonCodec(); - @override - void writeValue(WriteBuffer buffer, Object? value) { - if (value is int) { - buffer.putUint8(4); - buffer.putInt64(value); - } else { - super.writeValue(buffer, value); - } - } - - @override - Object? readValueOfType(int type, ReadBuffer buffer) { - switch (type) { - default: - return super.readValueOfType(type, buffer); - } - } -} - -class BackgroundWorkerLockApi { - /// Constructor for [BackgroundWorkerLockApi]. The [binaryMessenger] named argument is - /// available for dependency injection. If it is left null, the default - /// BinaryMessenger will be used which routes to the host platform. - BackgroundWorkerLockApi({BinaryMessenger? binaryMessenger, String messageChannelSuffix = ''}) - : pigeonVar_binaryMessenger = binaryMessenger, - pigeonVar_messageChannelSuffix = messageChannelSuffix.isNotEmpty ? '.$messageChannelSuffix' : ''; - final BinaryMessenger? pigeonVar_binaryMessenger; - - static const MessageCodec pigeonChannelCodec = _PigeonCodec(); - - final String pigeonVar_messageChannelSuffix; - - Future lock() async { - final pigeonVar_channelName = - 'dev.flutter.pigeon.immich_mobile.BackgroundWorkerLockApi.lock$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - - _extractReplyValueOrThrow(pigeonVar_replyList, pigeonVar_channelName, isNullValid: true); - } - - Future unlock() async { - final pigeonVar_channelName = - 'dev.flutter.pigeon.immich_mobile.BackgroundWorkerLockApi.unlock$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - - _extractReplyValueOrThrow(pigeonVar_replyList, pigeonVar_channelName, isNullValid: true); - } -} diff --git a/mobile/lib/platform/connectivity_api.g.dart b/mobile/lib/platform/connectivity_api.g.dart deleted file mode 100644 index 8cf8979532..0000000000 --- a/mobile/lib/platform/connectivity_api.g.dart +++ /dev/null @@ -1,89 +0,0 @@ -// Autogenerated from Pigeon (v26.3.4), do not edit directly. -// See also: https://pub.dev/packages/pigeon -// ignore_for_file: unused_import, unused_shown_name -// ignore_for_file: type=lint - -import 'dart:async'; -import 'dart:typed_data' show Float64List, Int32List, Int64List; - -import 'package:flutter/services.dart'; -import 'package:meta/meta.dart' show immutable, protected, visibleForTesting; - -Object? _extractReplyValueOrThrow(List? replyList, String channelName, {required bool isNullValid}) { - if (replyList == null) { - throw PlatformException( - code: 'channel-error', - message: 'Unable to establish connection on channel: "$channelName".', - ); - } else if (replyList.length > 1) { - throw PlatformException(code: replyList[0]! as String, message: replyList[1] as String?, details: replyList[2]); - } else if (!isNullValid && (replyList.isNotEmpty && replyList[0] == null)) { - throw PlatformException( - code: 'null-error', - message: 'Host platform returned null value for non-null return value.', - ); - } - return replyList.firstOrNull; -} - -enum NetworkCapability { cellular, wifi, vpn, unmetered } - -class _PigeonCodec extends StandardMessageCodec { - const _PigeonCodec(); - @override - void writeValue(WriteBuffer buffer, Object? value) { - if (value is int) { - buffer.putUint8(4); - buffer.putInt64(value); - } else if (value is NetworkCapability) { - buffer.putUint8(129); - writeValue(buffer, value.index); - } else { - super.writeValue(buffer, value); - } - } - - @override - Object? readValueOfType(int type, ReadBuffer buffer) { - switch (type) { - case 129: - final value = readValue(buffer) as int?; - return value == null ? null : NetworkCapability.values[value]; - default: - return super.readValueOfType(type, buffer); - } - } -} - -class ConnectivityApi { - /// Constructor for [ConnectivityApi]. The [binaryMessenger] named argument is - /// available for dependency injection. If it is left null, the default - /// BinaryMessenger will be used which routes to the host platform. - ConnectivityApi({BinaryMessenger? binaryMessenger, String messageChannelSuffix = ''}) - : pigeonVar_binaryMessenger = binaryMessenger, - pigeonVar_messageChannelSuffix = messageChannelSuffix.isNotEmpty ? '.$messageChannelSuffix' : ''; - final BinaryMessenger? pigeonVar_binaryMessenger; - - static const MessageCodec pigeonChannelCodec = _PigeonCodec(); - - final String pigeonVar_messageChannelSuffix; - - Future> getCapabilities() async { - final pigeonVar_channelName = - 'dev.flutter.pigeon.immich_mobile.ConnectivityApi.getCapabilities$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - - final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( - pigeonVar_replyList, - pigeonVar_channelName, - isNullValid: false, - ); - return (pigeonVar_replyValue! as List).cast(); - } -} diff --git a/mobile/lib/platform/local_image_api.g.dart b/mobile/lib/platform/local_image_api.g.dart deleted file mode 100644 index fbd0876735..0000000000 --- a/mobile/lib/platform/local_image_api.g.dart +++ /dev/null @@ -1,128 +0,0 @@ -// Autogenerated from Pigeon (v26.3.4), do not edit directly. -// See also: https://pub.dev/packages/pigeon -// ignore_for_file: unused_import, unused_shown_name -// ignore_for_file: type=lint - -import 'dart:async'; -import 'dart:typed_data' show Float64List, Int32List, Int64List; - -import 'package:flutter/services.dart'; -import 'package:meta/meta.dart' show immutable, protected, visibleForTesting; - -Object? _extractReplyValueOrThrow(List? replyList, String channelName, {required bool isNullValid}) { - if (replyList == null) { - throw PlatformException( - code: 'channel-error', - message: 'Unable to establish connection on channel: "$channelName".', - ); - } else if (replyList.length > 1) { - throw PlatformException(code: replyList[0]! as String, message: replyList[1] as String?, details: replyList[2]); - } else if (!isNullValid && (replyList.isNotEmpty && replyList[0] == null)) { - throw PlatformException( - code: 'null-error', - message: 'Host platform returned null value for non-null return value.', - ); - } - return replyList.firstOrNull; -} - -class _PigeonCodec extends StandardMessageCodec { - const _PigeonCodec(); - @override - void writeValue(WriteBuffer buffer, Object? value) { - if (value is int) { - buffer.putUint8(4); - buffer.putInt64(value); - } else { - super.writeValue(buffer, value); - } - } - - @override - Object? readValueOfType(int type, ReadBuffer buffer) { - switch (type) { - default: - return super.readValueOfType(type, buffer); - } - } -} - -class LocalImageApi { - /// Constructor for [LocalImageApi]. The [binaryMessenger] named argument is - /// available for dependency injection. If it is left null, the default - /// BinaryMessenger will be used which routes to the host platform. - LocalImageApi({BinaryMessenger? binaryMessenger, String messageChannelSuffix = ''}) - : pigeonVar_binaryMessenger = binaryMessenger, - pigeonVar_messageChannelSuffix = messageChannelSuffix.isNotEmpty ? '.$messageChannelSuffix' : ''; - final BinaryMessenger? pigeonVar_binaryMessenger; - - static const MessageCodec pigeonChannelCodec = _PigeonCodec(); - - final String pigeonVar_messageChannelSuffix; - - Future?> requestImage( - String assetId, { - required int requestId, - required int width, - required int height, - required bool isVideo, - required bool preferEncoded, - }) async { - final pigeonVar_channelName = - 'dev.flutter.pigeon.immich_mobile.LocalImageApi.requestImage$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send([ - assetId, - requestId, - width, - height, - isVideo, - preferEncoded, - ]); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - - final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( - pigeonVar_replyList, - pigeonVar_channelName, - isNullValid: true, - ); - return (pigeonVar_replyValue as Map?)?.cast(); - } - - Future cancelRequest(int requestId) async { - final pigeonVar_channelName = - 'dev.flutter.pigeon.immich_mobile.LocalImageApi.cancelRequest$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send([requestId]); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - - _extractReplyValueOrThrow(pigeonVar_replyList, pigeonVar_channelName, isNullValid: true); - } - - Future> getThumbhash(String thumbhash) async { - final pigeonVar_channelName = - 'dev.flutter.pigeon.immich_mobile.LocalImageApi.getThumbhash$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send([thumbhash]); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - - final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( - pigeonVar_replyList, - pigeonVar_channelName, - isNullValid: false, - ); - return (pigeonVar_replyValue! as Map).cast(); - } -} diff --git a/mobile/lib/platform/native_sync_api.g.dart b/mobile/lib/platform/native_sync_api.g.dart deleted file mode 100644 index bd979af87b..0000000000 --- a/mobile/lib/platform/native_sync_api.g.dart +++ /dev/null @@ -1,708 +0,0 @@ -// Autogenerated from Pigeon (v26.3.4), do not edit directly. -// See also: https://pub.dev/packages/pigeon -// ignore_for_file: unused_import, unused_shown_name -// ignore_for_file: type=lint - -import 'dart:async'; -import 'dart:typed_data' show Float64List, Int32List, Int64List; - -import 'package:flutter/services.dart'; -import 'package:meta/meta.dart' show immutable, protected, visibleForTesting; - -Object? _extractReplyValueOrThrow(List? replyList, String channelName, {required bool isNullValid}) { - if (replyList == null) { - throw PlatformException( - code: 'channel-error', - message: 'Unable to establish connection on channel: "$channelName".', - ); - } else if (replyList.length > 1) { - throw PlatformException(code: replyList[0]! as String, message: replyList[1] as String?, details: replyList[2]); - } else if (!isNullValid && (replyList.isNotEmpty && replyList[0] == null)) { - throw PlatformException( - code: 'null-error', - message: 'Host platform returned null value for non-null return value.', - ); - } - return replyList.firstOrNull; -} - -bool _deepEquals(Object? a, Object? b) { - if (identical(a, b)) { - return true; - } - if (a is double && b is double) { - if (a.isNaN && b.isNaN) { - return true; - } - return a == b; - } - if (a is List && b is List) { - return a.length == b.length && a.indexed.every(((int, dynamic) item) => _deepEquals(item.$2, b[item.$1])); - } - if (a is Map && b is Map) { - if (a.length != b.length) { - return false; - } - for (final MapEntry entryA in a.entries) { - bool found = false; - for (final MapEntry entryB in b.entries) { - if (_deepEquals(entryA.key, entryB.key)) { - if (_deepEquals(entryA.value, entryB.value)) { - found = true; - break; - } else { - return false; - } - } - } - if (!found) { - return false; - } - } - return true; - } - return a == b; -} - -int _deepHash(Object? value) { - if (value is List) { - return Object.hashAll(value.map(_deepHash)); - } - if (value is Map) { - int result = 0; - for (final MapEntry entry in value.entries) { - result += (_deepHash(entry.key) * 31) ^ _deepHash(entry.value); - } - return result; - } - if (value is double && value.isNaN) { - // Normalize NaN to a consistent hash. - return 0x7FF8000000000000.hashCode; - } - if (value is double && value == 0.0) { - // Normalize -0.0 to 0.0 so they have the same hash code. - return 0.0.hashCode; - } - return value.hashCode; -} - -enum PlatformAssetPlaybackStyle { unknown, image, video, imageAnimated, livePhoto, videoLooping } - -class PlatformAsset { - PlatformAsset({ - required this.id, - required this.name, - required this.type, - this.createdAt, - this.updatedAt, - this.width, - this.height, - required this.durationMs, - required this.orientation, - required this.isFavorite, - this.adjustmentTime, - this.latitude, - this.longitude, - required this.playbackStyle, - }); - - String id; - - String name; - - int type; - - int? createdAt; - - int? updatedAt; - - int? width; - - int? height; - - int durationMs; - - int orientation; - - bool isFavorite; - - int? adjustmentTime; - - double? latitude; - - double? longitude; - - PlatformAssetPlaybackStyle playbackStyle; - - List _toList() { - return [ - id, - name, - type, - createdAt, - updatedAt, - width, - height, - durationMs, - orientation, - isFavorite, - adjustmentTime, - latitude, - longitude, - playbackStyle, - ]; - } - - Object encode() { - return _toList(); - } - - static PlatformAsset decode(Object result) { - result as List; - return PlatformAsset( - id: result[0]! as String, - name: result[1]! as String, - type: result[2]! as int, - createdAt: result[3] as int?, - updatedAt: result[4] as int?, - width: result[5] as int?, - height: result[6] as int?, - durationMs: result[7]! as int, - orientation: result[8]! as int, - isFavorite: result[9]! as bool, - adjustmentTime: result[10] as int?, - latitude: result[11] as double?, - longitude: result[12] as double?, - playbackStyle: result[13]! as PlatformAssetPlaybackStyle, - ); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - bool operator ==(Object other) { - if (other is! PlatformAsset || other.runtimeType != runtimeType) { - return false; - } - if (identical(this, other)) { - return true; - } - return _deepEquals(id, other.id) && - _deepEquals(name, other.name) && - _deepEquals(type, other.type) && - _deepEquals(createdAt, other.createdAt) && - _deepEquals(updatedAt, other.updatedAt) && - _deepEquals(width, other.width) && - _deepEquals(height, other.height) && - _deepEquals(durationMs, other.durationMs) && - _deepEquals(orientation, other.orientation) && - _deepEquals(isFavorite, other.isFavorite) && - _deepEquals(adjustmentTime, other.adjustmentTime) && - _deepEquals(latitude, other.latitude) && - _deepEquals(longitude, other.longitude) && - _deepEquals(playbackStyle, other.playbackStyle); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => _deepHash([runtimeType, ..._toList()]); -} - -class PlatformAlbum { - PlatformAlbum({ - required this.id, - required this.name, - this.updatedAt, - required this.isCloud, - required this.assetCount, - }); - - String id; - - String name; - - int? updatedAt; - - bool isCloud; - - int assetCount; - - List _toList() { - return [id, name, updatedAt, isCloud, assetCount]; - } - - Object encode() { - return _toList(); - } - - static PlatformAlbum decode(Object result) { - result as List; - return PlatformAlbum( - id: result[0]! as String, - name: result[1]! as String, - updatedAt: result[2] as int?, - isCloud: result[3]! as bool, - assetCount: result[4]! as int, - ); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - bool operator ==(Object other) { - if (other is! PlatformAlbum || other.runtimeType != runtimeType) { - return false; - } - if (identical(this, other)) { - return true; - } - return _deepEquals(id, other.id) && - _deepEquals(name, other.name) && - _deepEquals(updatedAt, other.updatedAt) && - _deepEquals(isCloud, other.isCloud) && - _deepEquals(assetCount, other.assetCount); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => _deepHash([runtimeType, ..._toList()]); -} - -class SyncDelta { - SyncDelta({required this.hasChanges, required this.updates, required this.deletes, required this.assetAlbums}); - - bool hasChanges; - - List updates; - - List deletes; - - Map> assetAlbums; - - List _toList() { - return [hasChanges, updates, deletes, assetAlbums]; - } - - Object encode() { - return _toList(); - } - - static SyncDelta decode(Object result) { - result as List; - return SyncDelta( - hasChanges: result[0]! as bool, - updates: (result[1]! as List).cast(), - deletes: (result[2]! as List).cast(), - assetAlbums: (result[3]! as Map).cast>(), - ); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - bool operator ==(Object other) { - if (other is! SyncDelta || other.runtimeType != runtimeType) { - return false; - } - if (identical(this, other)) { - return true; - } - return _deepEquals(hasChanges, other.hasChanges) && - _deepEquals(updates, other.updates) && - _deepEquals(deletes, other.deletes) && - _deepEquals(assetAlbums, other.assetAlbums); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => _deepHash([runtimeType, ..._toList()]); -} - -class HashResult { - HashResult({required this.assetId, this.error, this.hash}); - - String assetId; - - String? error; - - String? hash; - - List _toList() { - return [assetId, error, hash]; - } - - Object encode() { - return _toList(); - } - - static HashResult decode(Object result) { - result as List; - return HashResult(assetId: result[0]! as String, error: result[1] as String?, hash: result[2] as String?); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - bool operator ==(Object other) { - if (other is! HashResult || other.runtimeType != runtimeType) { - return false; - } - if (identical(this, other)) { - return true; - } - return _deepEquals(assetId, other.assetId) && _deepEquals(error, other.error) && _deepEquals(hash, other.hash); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => _deepHash([runtimeType, ..._toList()]); -} - -class CloudIdResult { - CloudIdResult({required this.assetId, this.error, this.cloudId}); - - String assetId; - - String? error; - - String? cloudId; - - List _toList() { - return [assetId, error, cloudId]; - } - - Object encode() { - return _toList(); - } - - static CloudIdResult decode(Object result) { - result as List; - return CloudIdResult(assetId: result[0]! as String, error: result[1] as String?, cloudId: result[2] as String?); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - bool operator ==(Object other) { - if (other is! CloudIdResult || other.runtimeType != runtimeType) { - return false; - } - if (identical(this, other)) { - return true; - } - return _deepEquals(assetId, other.assetId) && - _deepEquals(error, other.error) && - _deepEquals(cloudId, other.cloudId); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => _deepHash([runtimeType, ..._toList()]); -} - -class _PigeonCodec extends StandardMessageCodec { - const _PigeonCodec(); - @override - void writeValue(WriteBuffer buffer, Object? value) { - if (value is int) { - buffer.putUint8(4); - buffer.putInt64(value); - } else if (value is PlatformAssetPlaybackStyle) { - buffer.putUint8(129); - writeValue(buffer, value.index); - } else if (value is PlatformAsset) { - buffer.putUint8(130); - writeValue(buffer, value.encode()); - } else if (value is PlatformAlbum) { - buffer.putUint8(131); - writeValue(buffer, value.encode()); - } else if (value is SyncDelta) { - buffer.putUint8(132); - writeValue(buffer, value.encode()); - } else if (value is HashResult) { - buffer.putUint8(133); - writeValue(buffer, value.encode()); - } else if (value is CloudIdResult) { - buffer.putUint8(134); - writeValue(buffer, value.encode()); - } else { - super.writeValue(buffer, value); - } - } - - @override - Object? readValueOfType(int type, ReadBuffer buffer) { - switch (type) { - case 129: - final value = readValue(buffer) as int?; - return value == null ? null : PlatformAssetPlaybackStyle.values[value]; - case 130: - return PlatformAsset.decode(readValue(buffer)!); - case 131: - return PlatformAlbum.decode(readValue(buffer)!); - case 132: - return SyncDelta.decode(readValue(buffer)!); - case 133: - return HashResult.decode(readValue(buffer)!); - case 134: - return CloudIdResult.decode(readValue(buffer)!); - default: - return super.readValueOfType(type, buffer); - } - } -} - -class NativeSyncApi { - /// Constructor for [NativeSyncApi]. The [binaryMessenger] named argument is - /// available for dependency injection. If it is left null, the default - /// BinaryMessenger will be used which routes to the host platform. - NativeSyncApi({BinaryMessenger? binaryMessenger, String messageChannelSuffix = ''}) - : pigeonVar_binaryMessenger = binaryMessenger, - pigeonVar_messageChannelSuffix = messageChannelSuffix.isNotEmpty ? '.$messageChannelSuffix' : ''; - final BinaryMessenger? pigeonVar_binaryMessenger; - - static const MessageCodec pigeonChannelCodec = _PigeonCodec(); - - final String pigeonVar_messageChannelSuffix; - - Future shouldFullSync() async { - final pigeonVar_channelName = - 'dev.flutter.pigeon.immich_mobile.NativeSyncApi.shouldFullSync$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - - final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( - pigeonVar_replyList, - pigeonVar_channelName, - isNullValid: false, - ); - return pigeonVar_replyValue! as bool; - } - - Future getMediaChanges() async { - final pigeonVar_channelName = - 'dev.flutter.pigeon.immich_mobile.NativeSyncApi.getMediaChanges$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - - final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( - pigeonVar_replyList, - pigeonVar_channelName, - isNullValid: false, - ); - return pigeonVar_replyValue! as SyncDelta; - } - - Future checkpointSync() async { - final pigeonVar_channelName = - 'dev.flutter.pigeon.immich_mobile.NativeSyncApi.checkpointSync$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - - _extractReplyValueOrThrow(pigeonVar_replyList, pigeonVar_channelName, isNullValid: true); - } - - Future clearSyncCheckpoint() async { - final pigeonVar_channelName = - 'dev.flutter.pigeon.immich_mobile.NativeSyncApi.clearSyncCheckpoint$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - - _extractReplyValueOrThrow(pigeonVar_replyList, pigeonVar_channelName, isNullValid: true); - } - - Future> getAssetIdsForAlbum(String albumId) async { - final pigeonVar_channelName = - 'dev.flutter.pigeon.immich_mobile.NativeSyncApi.getAssetIdsForAlbum$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send([albumId]); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - - final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( - pigeonVar_replyList, - pigeonVar_channelName, - isNullValid: false, - ); - return (pigeonVar_replyValue! as List).cast(); - } - - Future> getAlbums() async { - final pigeonVar_channelName = - 'dev.flutter.pigeon.immich_mobile.NativeSyncApi.getAlbums$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - - final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( - pigeonVar_replyList, - pigeonVar_channelName, - isNullValid: false, - ); - return (pigeonVar_replyValue! as List).cast(); - } - - Future getAssetsCountSince(String albumId, int timestamp) async { - final pigeonVar_channelName = - 'dev.flutter.pigeon.immich_mobile.NativeSyncApi.getAssetsCountSince$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send([albumId, timestamp]); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - - final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( - pigeonVar_replyList, - pigeonVar_channelName, - isNullValid: false, - ); - return pigeonVar_replyValue! as int; - } - - Future> getAssetsForAlbum(String albumId, {int? updatedTimeCond}) async { - final pigeonVar_channelName = - 'dev.flutter.pigeon.immich_mobile.NativeSyncApi.getAssetsForAlbum$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send([albumId, updatedTimeCond]); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - - final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( - pigeonVar_replyList, - pigeonVar_channelName, - isNullValid: false, - ); - return (pigeonVar_replyValue! as List).cast(); - } - - Future> hashAssets(List assetIds, {bool allowNetworkAccess = false}) async { - final pigeonVar_channelName = - 'dev.flutter.pigeon.immich_mobile.NativeSyncApi.hashAssets$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send([assetIds, allowNetworkAccess]); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - - final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( - pigeonVar_replyList, - pigeonVar_channelName, - isNullValid: false, - ); - return (pigeonVar_replyValue! as List).cast(); - } - - Future cancelHashing() async { - final pigeonVar_channelName = - 'dev.flutter.pigeon.immich_mobile.NativeSyncApi.cancelHashing$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - - _extractReplyValueOrThrow(pigeonVar_replyList, pigeonVar_channelName, isNullValid: true); - } - - Future cancelSync() async { - final pigeonVar_channelName = - 'dev.flutter.pigeon.immich_mobile.NativeSyncApi.cancelSync$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - - _extractReplyValueOrThrow(pigeonVar_replyList, pigeonVar_channelName, isNullValid: true); - } - - Future>> getTrashedAssets() async { - final pigeonVar_channelName = - 'dev.flutter.pigeon.immich_mobile.NativeSyncApi.getTrashedAssets$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - - final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( - pigeonVar_replyList, - pigeonVar_channelName, - isNullValid: false, - ); - return (pigeonVar_replyValue! as Map).cast>(); - } - - Future restoreFromTrashById(String mediaId, int type) async { - final pigeonVar_channelName = - 'dev.flutter.pigeon.immich_mobile.NativeSyncApi.restoreFromTrashById$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send([mediaId, type]); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - - final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( - pigeonVar_replyList, - pigeonVar_channelName, - isNullValid: false, - ); - return pigeonVar_replyValue! as bool; - } - - Future> getCloudIdForAssetIds(List assetIds) async { - final pigeonVar_channelName = - 'dev.flutter.pigeon.immich_mobile.NativeSyncApi.getCloudIdForAssetIds$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send([assetIds]); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - - final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( - pigeonVar_replyList, - pigeonVar_channelName, - isNullValid: false, - ); - return (pigeonVar_replyValue! as List).cast(); - } -} diff --git a/mobile/lib/platform/network_api.g.dart b/mobile/lib/platform/network_api.g.dart deleted file mode 100644 index 6258060bfb..0000000000 --- a/mobile/lib/platform/network_api.g.dart +++ /dev/null @@ -1,331 +0,0 @@ -// Autogenerated from Pigeon (v26.3.4), do not edit directly. -// See also: https://pub.dev/packages/pigeon -// ignore_for_file: unused_import, unused_shown_name -// ignore_for_file: type=lint - -import 'dart:async'; -import 'dart:typed_data' show Float64List, Int32List, Int64List; - -import 'package:flutter/services.dart'; -import 'package:meta/meta.dart' show immutable, protected, visibleForTesting; - -Object? _extractReplyValueOrThrow(List? replyList, String channelName, {required bool isNullValid}) { - if (replyList == null) { - throw PlatformException( - code: 'channel-error', - message: 'Unable to establish connection on channel: "$channelName".', - ); - } else if (replyList.length > 1) { - throw PlatformException(code: replyList[0]! as String, message: replyList[1] as String?, details: replyList[2]); - } else if (!isNullValid && (replyList.isNotEmpty && replyList[0] == null)) { - throw PlatformException( - code: 'null-error', - message: 'Host platform returned null value for non-null return value.', - ); - } - return replyList.firstOrNull; -} - -bool _deepEquals(Object? a, Object? b) { - if (identical(a, b)) { - return true; - } - if (a is double && b is double) { - if (a.isNaN && b.isNaN) { - return true; - } - return a == b; - } - if (a is List && b is List) { - return a.length == b.length && a.indexed.every(((int, dynamic) item) => _deepEquals(item.$2, b[item.$1])); - } - if (a is Map && b is Map) { - if (a.length != b.length) { - return false; - } - for (final MapEntry entryA in a.entries) { - bool found = false; - for (final MapEntry entryB in b.entries) { - if (_deepEquals(entryA.key, entryB.key)) { - if (_deepEquals(entryA.value, entryB.value)) { - found = true; - break; - } else { - return false; - } - } - } - if (!found) { - return false; - } - } - return true; - } - return a == b; -} - -int _deepHash(Object? value) { - if (value is List) { - return Object.hashAll(value.map(_deepHash)); - } - if (value is Map) { - int result = 0; - for (final MapEntry entry in value.entries) { - result += (_deepHash(entry.key) * 31) ^ _deepHash(entry.value); - } - return result; - } - if (value is double && value.isNaN) { - // Normalize NaN to a consistent hash. - return 0x7FF8000000000000.hashCode; - } - if (value is double && value == 0.0) { - // Normalize -0.0 to 0.0 so they have the same hash code. - return 0.0.hashCode; - } - return value.hashCode; -} - -class ClientCertData { - ClientCertData({required this.data, required this.password}); - - Uint8List data; - - String password; - - List _toList() { - return [data, password]; - } - - Object encode() { - return _toList(); - } - - static ClientCertData decode(Object result) { - result as List; - return ClientCertData(data: result[0]! as Uint8List, password: result[1]! as String); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - bool operator ==(Object other) { - if (other is! ClientCertData || other.runtimeType != runtimeType) { - return false; - } - if (identical(this, other)) { - return true; - } - return _deepEquals(data, other.data) && _deepEquals(password, other.password); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => _deepHash([runtimeType, ..._toList()]); -} - -class ClientCertPrompt { - ClientCertPrompt({required this.title, required this.message, required this.cancel, required this.confirm}); - - String title; - - String message; - - String cancel; - - String confirm; - - List _toList() { - return [title, message, cancel, confirm]; - } - - Object encode() { - return _toList(); - } - - static ClientCertPrompt decode(Object result) { - result as List; - return ClientCertPrompt( - title: result[0]! as String, - message: result[1]! as String, - cancel: result[2]! as String, - confirm: result[3]! as String, - ); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - bool operator ==(Object other) { - if (other is! ClientCertPrompt || other.runtimeType != runtimeType) { - return false; - } - if (identical(this, other)) { - return true; - } - return _deepEquals(title, other.title) && - _deepEquals(message, other.message) && - _deepEquals(cancel, other.cancel) && - _deepEquals(confirm, other.confirm); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => _deepHash([runtimeType, ..._toList()]); -} - -class _PigeonCodec extends StandardMessageCodec { - const _PigeonCodec(); - @override - void writeValue(WriteBuffer buffer, Object? value) { - if (value is int) { - buffer.putUint8(4); - buffer.putInt64(value); - } else if (value is ClientCertData) { - buffer.putUint8(129); - writeValue(buffer, value.encode()); - } else if (value is ClientCertPrompt) { - buffer.putUint8(130); - writeValue(buffer, value.encode()); - } else { - super.writeValue(buffer, value); - } - } - - @override - Object? readValueOfType(int type, ReadBuffer buffer) { - switch (type) { - case 129: - return ClientCertData.decode(readValue(buffer)!); - case 130: - return ClientCertPrompt.decode(readValue(buffer)!); - default: - return super.readValueOfType(type, buffer); - } - } -} - -class NetworkApi { - /// Constructor for [NetworkApi]. The [binaryMessenger] named argument is - /// available for dependency injection. If it is left null, the default - /// BinaryMessenger will be used which routes to the host platform. - NetworkApi({BinaryMessenger? binaryMessenger, String messageChannelSuffix = ''}) - : pigeonVar_binaryMessenger = binaryMessenger, - pigeonVar_messageChannelSuffix = messageChannelSuffix.isNotEmpty ? '.$messageChannelSuffix' : ''; - final BinaryMessenger? pigeonVar_binaryMessenger; - - static const MessageCodec pigeonChannelCodec = _PigeonCodec(); - - final String pigeonVar_messageChannelSuffix; - - Future addCertificate(ClientCertData clientData) async { - final pigeonVar_channelName = - 'dev.flutter.pigeon.immich_mobile.NetworkApi.addCertificate$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send([clientData]); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - - _extractReplyValueOrThrow(pigeonVar_replyList, pigeonVar_channelName, isNullValid: true); - } - - Future selectCertificate(ClientCertPrompt promptText) async { - final pigeonVar_channelName = - 'dev.flutter.pigeon.immich_mobile.NetworkApi.selectCertificate$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send([promptText]); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - - _extractReplyValueOrThrow(pigeonVar_replyList, pigeonVar_channelName, isNullValid: true); - } - - Future removeCertificate() async { - final pigeonVar_channelName = - 'dev.flutter.pigeon.immich_mobile.NetworkApi.removeCertificate$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - - _extractReplyValueOrThrow(pigeonVar_replyList, pigeonVar_channelName, isNullValid: true); - } - - Future hasCertificate() async { - final pigeonVar_channelName = - 'dev.flutter.pigeon.immich_mobile.NetworkApi.hasCertificate$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - - final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( - pigeonVar_replyList, - pigeonVar_channelName, - isNullValid: false, - ); - return pigeonVar_replyValue! as bool; - } - - Future getClientPointer() async { - final pigeonVar_channelName = - 'dev.flutter.pigeon.immich_mobile.NetworkApi.getClientPointer$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - - final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( - pigeonVar_replyList, - pigeonVar_channelName, - isNullValid: false, - ); - return pigeonVar_replyValue! as int; - } - - Future setRequestHeaders(Map headers, List serverUrls, String? token) async { - final pigeonVar_channelName = - 'dev.flutter.pigeon.immich_mobile.NetworkApi.setRequestHeaders$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send([headers, serverUrls, token]); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - - _extractReplyValueOrThrow(pigeonVar_replyList, pigeonVar_channelName, isNullValid: true); - } - - Future getAppGroupId() async { - final pigeonVar_channelName = - 'dev.flutter.pigeon.immich_mobile.NetworkApi.getAppGroupId$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - - final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( - pigeonVar_replyList, - pigeonVar_channelName, - isNullValid: false, - ); - return pigeonVar_replyValue! as String; - } -} diff --git a/mobile/lib/platform/permission_api.g.dart b/mobile/lib/platform/permission_api.g.dart deleted file mode 100644 index 7b85d611d2..0000000000 --- a/mobile/lib/platform/permission_api.g.dart +++ /dev/null @@ -1,146 +0,0 @@ -// Autogenerated from Pigeon (v26.3.4), do not edit directly. -// See also: https://pub.dev/packages/pigeon -// ignore_for_file: unused_import, unused_shown_name -// ignore_for_file: type=lint - -import 'dart:async'; -import 'dart:typed_data' show Float64List, Int32List, Int64List; - -import 'package:flutter/services.dart'; -import 'package:meta/meta.dart' show immutable, protected, visibleForTesting; - -Object? _extractReplyValueOrThrow(List? replyList, String channelName, {required bool isNullValid}) { - if (replyList == null) { - throw PlatformException( - code: 'channel-error', - message: 'Unable to establish connection on channel: "$channelName".', - ); - } else if (replyList.length > 1) { - throw PlatformException(code: replyList[0]! as String, message: replyList[1] as String?, details: replyList[2]); - } else if (!isNullValid && (replyList.isNotEmpty && replyList[0] == null)) { - throw PlatformException( - code: 'null-error', - message: 'Host platform returned null value for non-null return value.', - ); - } - return replyList.firstOrNull; -} - -enum PermissionStatus { granted, denied, permanentlyDenied } - -class _PigeonCodec extends StandardMessageCodec { - const _PigeonCodec(); - @override - void writeValue(WriteBuffer buffer, Object? value) { - if (value is int) { - buffer.putUint8(4); - buffer.putInt64(value); - } else if (value is PermissionStatus) { - buffer.putUint8(129); - writeValue(buffer, value.index); - } else { - super.writeValue(buffer, value); - } - } - - @override - Object? readValueOfType(int type, ReadBuffer buffer) { - switch (type) { - case 129: - final value = readValue(buffer) as int?; - return value == null ? null : PermissionStatus.values[value]; - default: - return super.readValueOfType(type, buffer); - } - } -} - -class PermissionApi { - /// Constructor for [PermissionApi]. The [binaryMessenger] named argument is - /// available for dependency injection. If it is left null, the default - /// BinaryMessenger will be used which routes to the host platform. - PermissionApi({BinaryMessenger? binaryMessenger, String messageChannelSuffix = ''}) - : pigeonVar_binaryMessenger = binaryMessenger, - pigeonVar_messageChannelSuffix = messageChannelSuffix.isNotEmpty ? '.$messageChannelSuffix' : ''; - final BinaryMessenger? pigeonVar_binaryMessenger; - - static const MessageCodec pigeonChannelCodec = _PigeonCodec(); - - final String pigeonVar_messageChannelSuffix; - - Future isIgnoringBatteryOptimizations() async { - final pigeonVar_channelName = - 'dev.flutter.pigeon.immich_mobile.PermissionApi.isIgnoringBatteryOptimizations$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - - final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( - pigeonVar_replyList, - pigeonVar_channelName, - isNullValid: false, - ); - return pigeonVar_replyValue! as PermissionStatus; - } - - Future hasManageMediaPermission() async { - final pigeonVar_channelName = - 'dev.flutter.pigeon.immich_mobile.PermissionApi.hasManageMediaPermission$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - - final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( - pigeonVar_replyList, - pigeonVar_channelName, - isNullValid: false, - ); - return pigeonVar_replyValue! as bool; - } - - Future requestManageMediaPermission() async { - final pigeonVar_channelName = - 'dev.flutter.pigeon.immich_mobile.PermissionApi.requestManageMediaPermission$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - - final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( - pigeonVar_replyList, - pigeonVar_channelName, - isNullValid: false, - ); - return pigeonVar_replyValue! as bool; - } - - Future manageMediaPermission() async { - final pigeonVar_channelName = - 'dev.flutter.pigeon.immich_mobile.PermissionApi.manageMediaPermission$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - - final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( - pigeonVar_replyList, - pigeonVar_channelName, - isNullValid: false, - ); - return pigeonVar_replyValue! as bool; - } -} diff --git a/mobile/lib/platform/remote_image_api.g.dart b/mobile/lib/platform/remote_image_api.g.dart deleted file mode 100644 index 5239cb3e45..0000000000 --- a/mobile/lib/platform/remote_image_api.g.dart +++ /dev/null @@ -1,114 +0,0 @@ -// Autogenerated from Pigeon (v26.3.4), do not edit directly. -// See also: https://pub.dev/packages/pigeon -// ignore_for_file: unused_import, unused_shown_name -// ignore_for_file: type=lint - -import 'dart:async'; -import 'dart:typed_data' show Float64List, Int32List, Int64List; - -import 'package:flutter/services.dart'; -import 'package:meta/meta.dart' show immutable, protected, visibleForTesting; - -Object? _extractReplyValueOrThrow(List? replyList, String channelName, {required bool isNullValid}) { - if (replyList == null) { - throw PlatformException( - code: 'channel-error', - message: 'Unable to establish connection on channel: "$channelName".', - ); - } else if (replyList.length > 1) { - throw PlatformException(code: replyList[0]! as String, message: replyList[1] as String?, details: replyList[2]); - } else if (!isNullValid && (replyList.isNotEmpty && replyList[0] == null)) { - throw PlatformException( - code: 'null-error', - message: 'Host platform returned null value for non-null return value.', - ); - } - return replyList.firstOrNull; -} - -class _PigeonCodec extends StandardMessageCodec { - const _PigeonCodec(); - @override - void writeValue(WriteBuffer buffer, Object? value) { - if (value is int) { - buffer.putUint8(4); - buffer.putInt64(value); - } else { - super.writeValue(buffer, value); - } - } - - @override - Object? readValueOfType(int type, ReadBuffer buffer) { - switch (type) { - default: - return super.readValueOfType(type, buffer); - } - } -} - -class RemoteImageApi { - /// Constructor for [RemoteImageApi]. The [binaryMessenger] named argument is - /// available for dependency injection. If it is left null, the default - /// BinaryMessenger will be used which routes to the host platform. - RemoteImageApi({BinaryMessenger? binaryMessenger, String messageChannelSuffix = ''}) - : pigeonVar_binaryMessenger = binaryMessenger, - pigeonVar_messageChannelSuffix = messageChannelSuffix.isNotEmpty ? '.$messageChannelSuffix' : ''; - final BinaryMessenger? pigeonVar_binaryMessenger; - - static const MessageCodec pigeonChannelCodec = _PigeonCodec(); - - final String pigeonVar_messageChannelSuffix; - - Future?> requestImage(String url, {required int requestId, required bool preferEncoded}) async { - final pigeonVar_channelName = - 'dev.flutter.pigeon.immich_mobile.RemoteImageApi.requestImage$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send([url, requestId, preferEncoded]); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - - final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( - pigeonVar_replyList, - pigeonVar_channelName, - isNullValid: true, - ); - return (pigeonVar_replyValue as Map?)?.cast(); - } - - Future cancelRequest(int requestId) async { - final pigeonVar_channelName = - 'dev.flutter.pigeon.immich_mobile.RemoteImageApi.cancelRequest$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send([requestId]); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - - _extractReplyValueOrThrow(pigeonVar_replyList, pigeonVar_channelName, isNullValid: true); - } - - Future clearCache() async { - final pigeonVar_channelName = - 'dev.flutter.pigeon.immich_mobile.RemoteImageApi.clearCache$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - - final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( - pigeonVar_replyList, - pigeonVar_channelName, - isNullValid: false, - ); - return pigeonVar_replyValue! as int; - } -} diff --git a/mobile/lib/platform/thumbnail_api.g.dart b/mobile/lib/platform/thumbnail_api.g.dart deleted file mode 100644 index 53d7b10fc3..0000000000 --- a/mobile/lib/platform/thumbnail_api.g.dart +++ /dev/null @@ -1,142 +0,0 @@ -// Autogenerated from Pigeon (v26.0.2), do not edit directly. -// See also: https://pub.dev/packages/pigeon -// ignore_for_file: public_member_api_docs, non_constant_identifier_names, avoid_as, unused_import, unnecessary_parenthesis, prefer_null_aware_operators, omit_local_variable_types, unused_shown_name, unnecessary_import, no_leading_underscores_for_local_identifiers - -import 'dart:async'; -import 'dart:typed_data' show Float64List, Int32List, Int64List, Uint8List; - -import 'package:flutter/foundation.dart' show ReadBuffer, WriteBuffer; -import 'package:flutter/services.dart'; - -PlatformException _createConnectionError(String channelName) { - return PlatformException( - code: 'channel-error', - message: 'Unable to establish connection on channel: "$channelName".', - ); -} - -class _PigeonCodec extends StandardMessageCodec { - const _PigeonCodec(); - @override - void writeValue(WriteBuffer buffer, Object? value) { - if (value is int) { - buffer.putUint8(4); - buffer.putInt64(value); - } else { - super.writeValue(buffer, value); - } - } - - @override - Object? readValueOfType(int type, ReadBuffer buffer) { - switch (type) { - default: - return super.readValueOfType(type, buffer); - } - } -} - -class ThumbnailApi { - /// Constructor for [ThumbnailApi]. The [binaryMessenger] named argument is - /// available for dependency injection. If it is left null, the default - /// BinaryMessenger will be used which routes to the host platform. - ThumbnailApi({BinaryMessenger? binaryMessenger, String messageChannelSuffix = ''}) - : pigeonVar_binaryMessenger = binaryMessenger, - pigeonVar_messageChannelSuffix = messageChannelSuffix.isNotEmpty ? '.$messageChannelSuffix' : ''; - final BinaryMessenger? pigeonVar_binaryMessenger; - - static const MessageCodec pigeonChannelCodec = _PigeonCodec(); - - final String pigeonVar_messageChannelSuffix; - - Future> requestImage( - String assetId, { - required int requestId, - required int width, - required int height, - required bool isVideo, - }) async { - final String pigeonVar_channelName = - 'dev.flutter.pigeon.immich_mobile.ThumbnailApi.requestImage$pigeonVar_messageChannelSuffix'; - final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send([ - assetId, - requestId, - width, - height, - isVideo, - ]); - 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(); - } - } - - Future cancelImageRequest(int requestId) async { - final String pigeonVar_channelName = - 'dev.flutter.pigeon.immich_mobile.ThumbnailApi.cancelImageRequest$pigeonVar_messageChannelSuffix'; - final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send([requestId]); - 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 { - return; - } - } - - Future> getThumbhash(String thumbhash) async { - final String pigeonVar_channelName = - 'dev.flutter.pigeon.immich_mobile.ThumbnailApi.getThumbhash$pigeonVar_messageChannelSuffix'; - final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send([thumbhash]); - 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/platform/view_intent_api.g.dart b/mobile/lib/platform/view_intent_api.g.dart deleted file mode 100644 index d457c249de..0000000000 --- a/mobile/lib/platform/view_intent_api.g.dart +++ /dev/null @@ -1,191 +0,0 @@ -// Autogenerated from Pigeon (v26.3.4), do not edit directly. -// See also: https://pub.dev/packages/pigeon -// ignore_for_file: unused_import, unused_shown_name -// ignore_for_file: type=lint - -import 'dart:async'; -import 'dart:typed_data' show Float64List, Int32List, Int64List; - -import 'package:flutter/services.dart'; -import 'package:meta/meta.dart' show immutable, protected, visibleForTesting; - -Object? _extractReplyValueOrThrow(List? replyList, String channelName, {required bool isNullValid}) { - if (replyList == null) { - throw PlatformException( - code: 'channel-error', - message: 'Unable to establish connection on channel: "$channelName".', - ); - } else if (replyList.length > 1) { - throw PlatformException(code: replyList[0]! as String, message: replyList[1] as String?, details: replyList[2]); - } else if (!isNullValid && (replyList.isNotEmpty && replyList[0] == null)) { - throw PlatformException( - code: 'null-error', - message: 'Host platform returned null value for non-null return value.', - ); - } - return replyList.firstOrNull; -} - -bool _deepEquals(Object? a, Object? b) { - if (identical(a, b)) { - return true; - } - if (a is double && b is double) { - if (a.isNaN && b.isNaN) { - return true; - } - return a == b; - } - if (a is List && b is List) { - return a.length == b.length && a.indexed.every(((int, dynamic) item) => _deepEquals(item.$2, b[item.$1])); - } - if (a is Map && b is Map) { - if (a.length != b.length) { - return false; - } - for (final MapEntry entryA in a.entries) { - bool found = false; - for (final MapEntry entryB in b.entries) { - if (_deepEquals(entryA.key, entryB.key)) { - if (_deepEquals(entryA.value, entryB.value)) { - found = true; - break; - } else { - return false; - } - } - } - if (!found) { - return false; - } - } - return true; - } - return a == b; -} - -int _deepHash(Object? value) { - if (value is List) { - return Object.hashAll(value.map(_deepHash)); - } - if (value is Map) { - int result = 0; - for (final MapEntry entry in value.entries) { - result += (_deepHash(entry.key) * 31) ^ _deepHash(entry.value); - } - return result; - } - if (value is double && value.isNaN) { - // Normalize NaN to a consistent hash. - return 0x7FF8000000000000.hashCode; - } - if (value is double && value == 0.0) { - // Normalize -0.0 to 0.0 so they have the same hash code. - return 0.0.hashCode; - } - return value.hashCode; -} - -class ViewIntentPayload { - ViewIntentPayload({this.path, required this.mimeType, this.localAssetId}); - - String? path; - - String mimeType; - - String? localAssetId; - - List _toList() { - return [path, mimeType, localAssetId]; - } - - Object encode() { - return _toList(); - } - - static ViewIntentPayload decode(Object result) { - result as List; - return ViewIntentPayload( - path: result[0] as String?, - mimeType: result[1]! as String, - localAssetId: result[2] as String?, - ); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - bool operator ==(Object other) { - if (other is! ViewIntentPayload || other.runtimeType != runtimeType) { - return false; - } - if (identical(this, other)) { - return true; - } - return _deepEquals(path, other.path) && - _deepEquals(mimeType, other.mimeType) && - _deepEquals(localAssetId, other.localAssetId); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => _deepHash([runtimeType, ..._toList()]); -} - -class _PigeonCodec extends StandardMessageCodec { - const _PigeonCodec(); - @override - void writeValue(WriteBuffer buffer, Object? value) { - if (value is int) { - buffer.putUint8(4); - buffer.putInt64(value); - } else if (value is ViewIntentPayload) { - buffer.putUint8(129); - writeValue(buffer, value.encode()); - } else { - super.writeValue(buffer, value); - } - } - - @override - Object? readValueOfType(int type, ReadBuffer buffer) { - switch (type) { - case 129: - return ViewIntentPayload.decode(readValue(buffer)!); - default: - return super.readValueOfType(type, buffer); - } - } -} - -class ViewIntentHostApi { - /// Constructor for [ViewIntentHostApi]. The [binaryMessenger] named argument is - /// available for dependency injection. If it is left null, the default - /// BinaryMessenger will be used which routes to the host platform. - ViewIntentHostApi({BinaryMessenger? binaryMessenger, String messageChannelSuffix = ''}) - : pigeonVar_binaryMessenger = binaryMessenger, - pigeonVar_messageChannelSuffix = messageChannelSuffix.isNotEmpty ? '.$messageChannelSuffix' : ''; - final BinaryMessenger? pigeonVar_binaryMessenger; - - static const MessageCodec pigeonChannelCodec = _PigeonCodec(); - - final String pigeonVar_messageChannelSuffix; - - Future consumeViewIntent() async { - final pigeonVar_channelName = - 'dev.flutter.pigeon.immich_mobile.ViewIntentHostApi.consumeViewIntent$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - - final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( - pigeonVar_replyList, - pigeonVar_channelName, - isNullValid: true, - ); - return pigeonVar_replyValue as ViewIntentPayload?; - } -} diff --git a/mobile/lib/presentation/actions/action.dart b/mobile/lib/presentation/actions/action.dart index 5ceb2f855d..d880b7ddf7 100644 --- a/mobile/lib/presentation/actions/action.dart +++ b/mobile/lib/presentation/actions/action.dart @@ -1,32 +1,56 @@ +import 'dart:async'; + import 'package:flutter/material.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; +import 'package:immich_mobile/constants/enums.dart'; import 'package:immich_mobile/domain/models/asset/base_asset.model.dart'; -import 'package:immich_mobile/domain/models/user.model.dart'; +import 'package:immich_mobile/providers/asset_viewer/asset_viewer.provider.dart'; +import 'package:immich_mobile/providers/timeline/multiselect.provider.dart'; +import 'package:immich_mobile/providers/user.provider.dart'; +import 'package:immich_mobile/utils/asset_filter.dart'; -class ActionScope { - final BuildContext context; - final WidgetRef ref; - final UserDto authUser; +class ActionItem { + final IconData icon; + final String label; + final FutureOr Function() onAction; + final FutureOr Function()? onSecondaryAction; - const ActionScope({required this.context, required this.ref, required this.authUser}); + const ActionItem({required this.icon, required this.label, required this.onAction, this.onSecondaryAction}); } -abstract class BaseAction { - const BaseAction(); +abstract class ActionBuilder { + const ActionBuilder(); - IconData get icon; - - String label(ActionScope scope); - - bool isVisible(ActionScope scope) => true; - - Future onAction(ActionScope scope); + // null when the action is not applicable for the current context + ActionItem? create(BuildContext context, WidgetRef ref); } -abstract class AssetAction extends BaseAction { - final Iterable assets; +final assetsActionProvider = Provider.family.autoDispose, ActionSource>( + (ref, source) => AssetFilter(switch (source) { + .timeline => ref.watch(multiSelectProvider.select((s) => s.selectedAssets)), + .viewer => switch (ref.watch(assetViewerProvider.select((s) => s.currentAsset))) { + final BaseAsset asset => {asset}, + null => const {}, + }, + }), + dependencies: [multiSelectProvider], +); - const AssetAction({required this.assets}); +final clearSelectionProvider = Provider.family.autoDispose((ref, source) { + if (source == .timeline) { + return ref.read(multiSelectProvider.notifier).reset; + } - Iterable filter(ActionScope scope) => assets.whereType(); + return () {}; +}, dependencies: [multiSelectProvider]); + +final ownedAssetsActionProvider = Provider.family.autoDispose, ActionSource>( + (ref, source) => ref.watch(assetsActionProvider(source)).owned(ref.watch(authUserProvider).id), + dependencies: [assetsActionProvider], +); + +abstract class AssetActionBuilder extends ActionBuilder { + final ActionSource source; + + const AssetActionBuilder({required this.source}); } diff --git a/mobile/lib/presentation/actions/action.widget.dart b/mobile/lib/presentation/actions/action.widget.dart index 0f891abde6..a865528440 100644 --- a/mobile/lib/presentation/actions/action.widget.dart +++ b/mobile/lib/presentation/actions/action.widget.dart @@ -1,95 +1,71 @@ import 'package:flutter/material.dart'; -import 'package:flutter/widgets.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; import 'package:immich_mobile/presentation/actions/action.dart'; -import 'package:immich_mobile/providers/user.provider.dart'; -import 'package:immich_mobile/utils/error_handler.dart'; import 'package:immich_ui/immich_ui.dart'; -class _ActionWidgetScope { - final String label; - final VoidCallback onAction; +abstract class ActionWidget extends ConsumerWidget { + final ActionBuilder action; - const _ActionWidgetScope({required this.label, required this.onAction}); -} + const ActionWidget({super.key, required this.action}); -class _ActionWidget extends ConsumerWidget { - final BaseAction action; - final Widget Function(_ActionWidgetScope context) builder; - - const _ActionWidget({required this.action, required this.builder}); - - Future _onAction(ActionScope scope) async { - try { - await action.onAction(scope); - } catch (error, stackTrace) { - handleError(scope.context, error, stack: stackTrace, description: 'Action failed: ${action.runtimeType}'); - } - } + Widget builder(BuildContext context, WidgetRef ref, ActionItem action); @override Widget build(BuildContext context, WidgetRef ref) { - final authUser = ref.watch(currentUserProvider); - if (authUser == null) { + final actionItem = action.create(context, ref); + if (actionItem == null) { return const SizedBox.shrink(); } - final scope = ActionScope(context: context, ref: ref, authUser: authUser); - if (!action.isVisible(scope)) { - return const SizedBox.shrink(); - } - - return builder(.new(label: action.label(scope), onAction: () => _onAction(scope))); + return builder(context, ref, actionItem); } } -class ActionIconButtonWidget extends StatelessWidget { - final BaseAction action; +class ActionColumnButton extends ActionWidget { + const ActionColumnButton({super.key, required super.action}); + + @override + Widget builder(BuildContext context, WidgetRef ref, ActionItem action) => ImmichColumnButton( + icon: action.icon, + label: action.label, + onPressed: action.onAction, + onLongPress: action.onSecondaryAction, + ); +} + +class ActionIconButton extends ActionWidget { final ImmichVariant variant; - const ActionIconButtonWidget({super.key, required this.action, this.variant = .ghost}); + const ActionIconButton({super.key, required super.action, this.variant = .ghost}); @override - Widget build(BuildContext context) => _ActionWidget( - action: action, - builder: (ctx) => ImmichIconButton(icon: action.icon, onPressed: ctx.onAction, variant: variant), + Widget builder(BuildContext context, WidgetRef ref, ActionItem action) => ImmichIconButton( + icon: action.icon, + onPressed: action.onAction, + onLongPress: action.onSecondaryAction, + variant: variant, ); } -class ActionButtonWidget extends StatelessWidget { - final BaseAction action; +class ActionButton extends ActionWidget { final ImmichVariant variant; - const ActionButtonWidget({super.key, required this.action, this.variant = .ghost}); + const ActionButton({super.key, required super.action, this.variant = .ghost}); @override - Widget build(BuildContext context) => _ActionWidget( - action: action, - builder: (ctx) => - ImmichTextButton(labelText: ctx.label, icon: action.icon, onPressed: ctx.onAction, variant: variant), + Widget builder(BuildContext context, WidgetRef ref, ActionItem action) => ImmichTextButton( + labelText: action.label, + icon: action.icon, + onPressed: action.onAction, + onLongPress: action.onSecondaryAction, + variant: variant, ); } -class ActionColumnButtonWidget extends StatelessWidget { - final BaseAction action; - - const ActionColumnButtonWidget({super.key, required this.action}); +class ActionMenuItem extends ActionWidget { + const ActionMenuItem({super.key, required super.action}); @override - Widget build(BuildContext context) => _ActionWidget( - action: action, - builder: (ctx) => ImmichColumnButton(icon: action.icon, label: ctx.label, onPressed: ctx.onAction), - ); -} - -class ActionMenuItemWidget extends StatelessWidget { - final BaseAction action; - - const ActionMenuItemWidget({super.key, required this.action}); - - @override - Widget build(BuildContext context) => _ActionWidget( - action: action, - builder: (ctx) => ImmichMenuItem(icon: action.icon, label: ctx.label, onPressed: ctx.onAction), - ); + Widget builder(BuildContext context, WidgetRef ref, ActionItem action) => + ImmichMenuItem(icon: action.icon, label: action.label, onPressed: action.onAction); } diff --git a/mobile/lib/presentation/actions/archive.action.dart b/mobile/lib/presentation/actions/archive.action.dart new file mode 100644 index 0000000000..f8e4a1e038 --- /dev/null +++ b/mobile/lib/presentation/actions/archive.action.dart @@ -0,0 +1,66 @@ +import 'package:flutter/material.dart'; +import 'package:hooks_riverpod/hooks_riverpod.dart'; +import 'package:immich_mobile/constants/enums.dart'; +import 'package:immich_mobile/generated/translations.g.dart'; +import 'package:immich_mobile/presentation/actions/action.dart'; +import 'package:immich_mobile/providers/infrastructure/asset.provider.dart'; +import 'package:immich_mobile/providers/infrastructure/toast.provider.dart'; +import 'package:immich_mobile/providers/routes.provider.dart'; +import 'package:immich_mobile/utils/error_handler.dart'; + +typedef _State = ({bool shouldArchive, List assetIds}); + +final _stateProvider = Provider.family.autoDispose<_State?, ActionSource>((ref, source) { + if (ref.watch(inLockedViewProvider)) { + return null; + } + + final assets = ref.watch(ownedAssetsActionProvider(source)); + final shouldArchive = assets.notVisibility(.archive).isNotEmpty; + final assetIds = assets + .visibility(shouldArchive ? .timeline : .archive) + .map((asset) => asset.id) + .toList(growable: false); + return assetIds.isEmpty ? null : (shouldArchive: shouldArchive, assetIds: assetIds); +}, dependencies: [ownedAssetsActionProvider]); + +class ArchiveAction extends AssetActionBuilder { + const ArchiveAction({required super.source}); + + @override + ActionItem? create(BuildContext context, WidgetRef ref) { + final shouldArchive = ref.watch(_stateProvider(source).select((state) => state?.shouldArchive)); + if (shouldArchive == null) { + return null; + } + + return .new( + icon: shouldArchive ? Icons.archive_outlined : Icons.unarchive_outlined, + label: shouldArchive ? context.t.archive : context.t.unarchive, + onAction: () => _archive(context, ref), + ); + } + + Future _archive(BuildContext context, WidgetRef ref) async { + final state = ref.read(_stateProvider(source)); + if (state == null) { + return; + } + + final (:shouldArchive, :assetIds) = state; + final message = shouldArchive + ? context.t.archive_action_prompt(count: assetIds.length) + : context.t.unarchive_action_prompt(count: assetIds.length); + final assetService = ref.read(assetServiceProvider); + final toastService = ref.read(toastServiceProvider); + final clearSelection = ref.read(clearSelectionProvider(source)); + + try { + await assetService.update(assetIds, visibility: .some(shouldArchive ? .archive : .timeline)); + toastService.success(message); + clearSelection(); + } catch (error, stack) { + handleError(error, stack: stack, description: "Failed to update the archive status for assets"); + } + } +} diff --git a/mobile/lib/presentation/actions/asset_debug.action.dart b/mobile/lib/presentation/actions/asset_debug.action.dart index aec99fc90b..16ad15700e 100644 --- a/mobile/lib/presentation/actions/asset_debug.action.dart +++ b/mobile/lib/presentation/actions/asset_debug.action.dart @@ -1,27 +1,29 @@ import 'dart:async'; import 'package:auto_route/auto_route.dart'; +import 'package:collection/collection.dart'; import 'package:flutter/material.dart'; -import 'package:immich_mobile/domain/models/asset/base_asset.model.dart'; +import 'package:hooks_riverpod/hooks_riverpod.dart'; import 'package:immich_mobile/generated/translations.g.dart'; import 'package:immich_mobile/presentation/actions/action.dart'; import 'package:immich_mobile/providers/infrastructure/setting.provider.dart'; import 'package:immich_mobile/routing/router.dart'; -class AssetDebugAction extends AssetAction { - const AssetDebugAction({required super.assets}); +class AssetDebugAction extends AssetActionBuilder { + const AssetDebugAction({required super.source}); @override - IconData get icon => Icons.help_outline_rounded; + ActionItem? create(BuildContext context, WidgetRef ref) { + final asset = ref.watch(assetsActionProvider(source)).assets.singleOrNull; + final troubleshootEnabled = ref.watch(settingsProvider.notifier).get(.advancedTroubleshooting); + if (!troubleshootEnabled || asset == null) { + return null; + } - @override - String label(ActionScope scope) => scope.context.t.troubleshoot; - - @override - bool isVisible(ActionScope scope) => - assets.length == 1 && scope.ref.watch(settingsProvider.notifier).get(.advancedTroubleshooting); - - @override - Future onAction(ActionScope scope) async => - unawaited(scope.context.pushRoute(AssetTroubleshootRoute(asset: assets.first))); + return .new( + icon: Icons.help_outline_rounded, + label: context.t.troubleshoot, + onAction: () => unawaited(context.pushRoute(AssetTroubleshootRoute(asset: asset))), + ); + } } diff --git a/mobile/lib/presentation/actions/cast.action.dart b/mobile/lib/presentation/actions/cast.action.dart new file mode 100644 index 0000000000..5d90479647 --- /dev/null +++ b/mobile/lib/presentation/actions/cast.action.dart @@ -0,0 +1,23 @@ +import 'dart:async'; + +import 'package:flutter/material.dart'; +import 'package:hooks_riverpod/hooks_riverpod.dart'; +import 'package:immich_mobile/generated/translations.g.dart'; +import 'package:immich_mobile/presentation/actions/action.dart'; +import 'package:immich_mobile/providers/cast.provider.dart'; +import 'package:immich_mobile/widgets/asset_viewer/cast_dialog.dart'; + +class CastAction extends ActionBuilder { + const CastAction(); + + @override + ActionItem create(BuildContext context, WidgetRef ref) { + final isCasting = ref.watch(castProvider.select((state) => state.isCasting)); + + return .new( + icon: isCasting ? Icons.cast_connected_rounded : Icons.cast_rounded, + label: context.t.cast, + onAction: () async => unawaited(showDialog(context: context, builder: (_) => const CastDialog())), + ); + } +} diff --git a/mobile/lib/presentation/actions/delete.action.dart b/mobile/lib/presentation/actions/delete.action.dart new file mode 100644 index 0000000000..23a2ef2a2f --- /dev/null +++ b/mobile/lib/presentation/actions/delete.action.dart @@ -0,0 +1,233 @@ +import 'package:flutter/material.dart'; +import 'package:hooks_riverpod/hooks_riverpod.dart'; +import 'package:immich_mobile/constants/enums.dart'; +import 'package:immich_mobile/domain/models/asset/base_asset.model.dart'; +import 'package:immich_mobile/extensions/platform_extensions.dart'; +import 'package:immich_mobile/generated/translations.g.dart'; +import 'package:immich_mobile/presentation/actions/action.dart'; +import 'package:immich_mobile/providers/infrastructure/asset.provider.dart'; +import 'package:immich_mobile/providers/infrastructure/store.provider.dart'; +import 'package:immich_mobile/providers/infrastructure/toast.provider.dart'; +import 'package:immich_mobile/providers/server_info.provider.dart'; +import 'package:immich_mobile/providers/user.provider.dart'; +import 'package:immich_mobile/services/cleanup.service.dart'; +import 'package:immich_mobile/utils/error_handler.dart'; +import 'package:immich_mobile/widgets/common/confirm_dialog.dart'; + +typedef _State = ({List localIds, List remoteIds, bool trash}); + +final _stateProvider = Provider.family.autoDispose<_State?, ActionSource>((ref, source) { + final assets = ref.watch(assetsActionProvider(source)); + final authUserId = ref.watch(authUserProvider).id; + + final localIds = []; + final ownedRemote = []; + for (final asset in assets) { + if (asset.localId case final localId?) { + localIds.add(localId); + } + if (asset case final RemoteAsset remote when remote.ownerId == authUserId) { + ownedRemote.add(remote); + } + } + + if (localIds.isEmpty && ownedRemote.isEmpty) { + return null; + } + + final trashEnabled = ref.watch(serverInfoProvider.select((state) => state.serverFeatures.trash)); + // Assets already in the trash or in the locked folder are deleted outright, irrespective of the server setting. + final trash = + ownedRemote.isEmpty || (trashEnabled && !ownedRemote.every((asset) => asset.isTrashed || asset.isLocked)); + + return (localIds: localIds, remoteIds: ownedRemote.map((asset) => asset.id).toList(growable: false), trash: trash); +}, dependencies: [assetsActionProvider]); + +class DeleteAction extends AssetActionBuilder { + const DeleteAction({required super.source}); + + @override + ActionItem? create(BuildContext context, WidgetRef ref) { + final trash = ref.watch(_stateProvider(source).select((state) => state?.trash)); + if (trash == null) { + return null; + } + + return .new( + icon: Icons.delete_outline, + label: trash ? context.t.trash : context.t.delete, + onAction: () => _delete(context, ref), + ); + } + + Future _delete(BuildContext context, WidgetRef ref) async { + final state = ref.read(_stateProvider(source)); + if (state == null) { + return; + } + + final (:localIds, :remoteIds, :trash) = state; + final toastService = ref.read(toastServiceProvider); + final clearSelection = ref.read(clearSelectionProvider(source)); + + try { + final String? message; + if (remoteIds.isEmpty) { + message = await _removeLocalAssets(context, ref, localIds); + } else if (trash) { + message = await _moveToTrash(context, ref, remoteIds, localIds); + } else { + message = await _deletePermanently(context, ref, remoteIds, localIds); + } + + if (message == null) { + return; + } + + toastService.success(message); + clearSelection(); + } catch (error, stack) { + handleError(error, stack: stack, description: "Failed to delete assets"); + } + } + + Future _removeLocalAssets(BuildContext context, WidgetRef ref, List localIds) async { + final count = await _cleanupLocalAssets(context, ref, localIds); + if (count <= 0 || !context.mounted) { + return null; + } + + return context.t.cleanup_deleted_assets(count: count); + } + + Future _moveToTrash( + BuildContext context, + WidgetRef ref, + List remoteIds, + List localIds, + ) async { + final assetService = ref.read(assetServiceProvider); + if (localIds.isNotEmpty) { + await _cleanupLocalAssets(context, ref, localIds); + if (!context.mounted) { + return null; + } + } + + final message = context.t.trash_action_prompt(count: remoteIds.length); + await assetService.trash(remoteIds); + return message; + } + + Future _deletePermanently( + BuildContext context, + WidgetRef ref, + List remoteIds, + List localIds, + ) async { + final assetService = ref.read(assetServiceProvider); + final confirmed = await showDialog( + context: context, + builder: (_) => ConfirmDialog( + title: context.t.delete_dialog_title, + content: context.t.delete_dialog_alert, + ok: context.t.delete_permanently, + ), + ); + if (confirmed != true || !context.mounted) { + return null; + } + + final message = context.t.delete_permanently_action_prompt(count: remoteIds.length); + // Server first, so a failed request will not remove the local copy + await assetService.delete(remoteIds); + if (localIds.isNotEmpty && context.mounted) { + await _cleanupLocalAssets(context, ref, localIds, requestCustomPrompt: false); + } + + return message; + } +} + +final _cleanupStateProvider = Provider.family.autoDispose?, ActionSource>((ref, source) { + final assets = ref.watch(assetsActionProvider(source)); + final assetIds = assets.backedUp().map((asset) => asset.localId).nonNulls.toList(growable: false); + return assetIds.isEmpty ? null : assetIds; +}, dependencies: [assetsActionProvider]); + +class CleanupLocalAction extends AssetActionBuilder { + const CleanupLocalAction({required super.source}); + + @override + ActionItem? create(BuildContext context, WidgetRef ref) { + final isVisible = ref.watch(_cleanupStateProvider(source).select((state) => state != null)); + if (!isVisible) { + return null; + } + + return .new( + icon: Icons.no_cell_outlined, + label: context.t.control_bottom_app_bar_delete_from_local, + onAction: () => _cleanup(context, ref), + ); + } + + Future _cleanup(BuildContext context, WidgetRef ref) async { + final assetIds = ref.read(_cleanupStateProvider(source)); + if (assetIds == null) { + return; + } + + final toastService = ref.read(toastServiceProvider); + final clearSelection = ref.read(clearSelectionProvider(source)); + + try { + final count = await _cleanupLocalAssets(context, ref, assetIds); + if (count <= 0 || !context.mounted) { + return; + } + + toastService.success(context.t.cleanup_deleted_assets(count: count)); + clearSelection(); + } catch (error, stack) { + handleError(error, stack: stack, description: "Failed to remove the device copies"); + } + } +} + +/// Removes the device copies of [assetIds], returning how many were deleted. +/// +/// iOS and Android without MANAGE_MEDIA prompt the user +/// with MANAGE_MEDIA, we do it ourselves unless [requestCustomPrompt] is false. +Future _cleanupLocalAssets( + BuildContext context, + WidgetRef ref, + List assetIds, { + bool requestCustomPrompt = true, +}) async { + if (assetIds.isEmpty) { + return 0; + } + + final cleanupService = ref.read(cleanupServiceProvider); + final requiresPrompt = + requestCustomPrompt && + CurrentPlatform.isAndroid && + ref.read(storeServiceProvider).get(.manageLocalMediaAndroid, false); + + if (requiresPrompt) { + final confirmed = await showDialog( + context: context, + builder: (_) => ConfirmDialog( + title: context.t.move_to_device_trash, + content: context.t.free_up_space_description, + ok: context.t.ok, + ), + ); + if (confirmed != true) { + return 0; + } + } + + return cleanupService.deleteLocalAssets(assetIds); +} diff --git a/mobile/lib/presentation/actions/download.action.dart b/mobile/lib/presentation/actions/download.action.dart new file mode 100644 index 0000000000..60a1395bcd --- /dev/null +++ b/mobile/lib/presentation/actions/download.action.dart @@ -0,0 +1,49 @@ +import 'dart:async'; + +import 'package:flutter/material.dart'; +import 'package:hooks_riverpod/hooks_riverpod.dart'; +import 'package:immich_mobile/constants/enums.dart'; +import 'package:immich_mobile/domain/models/asset/base_asset.model.dart'; +import 'package:immich_mobile/generated/translations.g.dart'; +import 'package:immich_mobile/presentation/actions/action.dart'; +import 'package:immich_mobile/providers/background_sync.provider.dart'; +import 'package:immich_mobile/repositories/download.repository.dart'; +import 'package:immich_mobile/utils/error_handler.dart'; + +final _stateProvider = Provider.family.autoDispose?, ActionSource>((ref, source) { + final assets = ref.watch(assetsActionProvider(source)); + final remote = assets.remote().toList(growable: false); + return remote.isEmpty ? null : remote; +}, dependencies: [assetsActionProvider]); + +class DownloadAction extends AssetActionBuilder { + const DownloadAction({required super.source}); + + @override + ActionItem? create(BuildContext context, WidgetRef ref) { + final assets = ref.watch(_stateProvider(source)); + if (assets == null) { + return null; + } + + return .new(icon: Icons.download, label: context.t.download, onAction: () => _download(ref, assets)); + } + + Future _download(WidgetRef ref, List assets) async { + final backgroundSync = ref.read(backgroundSyncProvider); + final downloads = ref.read(downloadRepositoryProvider); + + try { + await downloads.downloadAllAssets(assets); + + unawaited( + Future.delayed(const .new(seconds: 1), () async { + await backgroundSync.syncLocal(); + await backgroundSync.hashAssets(); + }), + ); + } catch (error, stack) { + handleError(error, stack: stack, description: "Failed to download the assets"); + } + } +} diff --git a/mobile/lib/presentation/actions/edit_asset.action.dart b/mobile/lib/presentation/actions/edit_asset.action.dart new file mode 100644 index 0000000000..ca0fa0bad0 --- /dev/null +++ b/mobile/lib/presentation/actions/edit_asset.action.dart @@ -0,0 +1,82 @@ +import 'dart:async'; + +import 'package:auto_route/auto_route.dart'; +import 'package:collection/collection.dart'; +import 'package:flutter/material.dart'; +import 'package:hooks_riverpod/hooks_riverpod.dart'; +import 'package:immich_mobile/constants/enums.dart'; +import 'package:immich_mobile/domain/models/asset/base_asset.model.dart'; +import 'package:immich_mobile/domain/models/asset_edit.model.dart'; +import 'package:immich_mobile/domain/models/server_capability.model.dart'; +import 'package:immich_mobile/generated/translations.g.dart'; +import 'package:immich_mobile/presentation/actions/action.dart'; +import 'package:immich_mobile/presentation/pages/edit/editor.provider.dart'; +import 'package:immich_mobile/presentation/widgets/images/image_provider.dart'; +import 'package:immich_mobile/providers/infrastructure/asset.provider.dart'; +import 'package:immich_mobile/providers/server_info.provider.dart'; +import 'package:immich_mobile/providers/websocket.provider.dart'; +import 'package:immich_mobile/routing/router.dart'; +import 'package:immich_mobile/utils/error_handler.dart'; + +final _stateProvider = Provider.family.autoDispose((ref, source) { + final isSupported = ref.watch(serverInfoProvider.select((state) => state.serverVersion.supports(.assetEdits))); + if (!isSupported) { + return null; + } + + final assets = ref.watch(ownedAssetsActionProvider(source)); + return assets.where((asset) => asset.isEditable).singleOrNull; +}, dependencies: [ownedAssetsActionProvider]); + +class EditAssetAction extends AssetActionBuilder { + const EditAssetAction({required super.source}); + + @override + ActionItem? create(BuildContext context, WidgetRef ref) { + if (!ref.watch(_stateProvider(source).select((asset) => asset != null))) { + return null; + } + + return .new(icon: Icons.tune, label: context.t.edit, onAction: () => _edit(context, ref)); + } + + Future _edit(BuildContext context, WidgetRef ref) async { + final asset = ref.read(_stateProvider(source)); + if (asset == null) { + return; + } + + try { + // TODO(shenlong): Move all EXIF and Apply Edits logic onto the Route + final repository = ref.read(remoteAssetRepositoryProvider); + final (edits, exif) = await (repository.getAssetEdits(asset.id), repository.getExif(asset.id)).wait; + if (exif == null || !context.mounted) { + return; + } + + ref.read(editorStateProvider.notifier).init(edits, exif); + unawaited( + context.pushRoute( + DriftEditImageRoute( + image: Image(image: getFullImageProvider(asset, edited: false)), + applyEdits: (newEdits) => applyEdits(ref, asset.id, newEdits), + ), + ), + ); + } catch (error, stack) { + handleError(error, stack: stack, description: "Failed to open the editor for the asset"); + } + } +} + +@visibleForTesting +Future applyEdits(WidgetRef ref, String remoteId, List edits) async { + final websocket = ref.read(websocketProvider.notifier); + + bool isCurrentId(dynamic data) => data is Map && (data['asset'] as Map?)?['id'] == remoteId; + await ref.read(assetServiceProvider).applyEdits(remoteId, edits); + await Future.any([ + websocket.waitForEvent('AssetEditReadyV1', isCurrentId, const .new(seconds: 10)), + websocket.waitForEvent('AssetEditReadyV2', isCurrentId, const .new(seconds: 10)), + ]).catchError((_) {}); +} diff --git a/mobile/lib/presentation/actions/edit_datetime.action.dart b/mobile/lib/presentation/actions/edit_datetime.action.dart new file mode 100644 index 0000000000..31de23d1a7 --- /dev/null +++ b/mobile/lib/presentation/actions/edit_datetime.action.dart @@ -0,0 +1,100 @@ +import 'package:collection/collection.dart'; +import 'package:flutter/material.dart'; +import 'package:hooks_riverpod/hooks_riverpod.dart'; +import 'package:immich_mobile/constants/enums.dart'; +import 'package:immich_mobile/domain/models/asset/base_asset.model.dart'; +import 'package:immich_mobile/generated/translations.g.dart'; +import 'package:immich_mobile/presentation/actions/action.dart'; +import 'package:immich_mobile/providers/infrastructure/asset.provider.dart'; +import 'package:immich_mobile/providers/infrastructure/asset_viewer/asset.provider.dart'; +import 'package:immich_mobile/providers/infrastructure/toast.provider.dart'; +import 'package:immich_mobile/utils/error_handler.dart'; +import 'package:immich_mobile/utils/timezone.dart'; +import 'package:immich_mobile/widgets/common/date_time_picker.dart'; + +typedef _State = ({List assetIds, RemoteAsset? origin}); + +final _stateProvider = Provider.family.autoDispose<_State?, ActionSource>((ref, source) { + final assets = ref.watch(ownedAssetsActionProvider(source)); + if (assets.isEmpty) { + return null; + } + + return (assetIds: assets.map((asset) => asset.id).toList(growable: false), origin: assets.singleOrNull); +}, dependencies: [ownedAssetsActionProvider]); + +class EditDateTimeAction extends AssetActionBuilder { + const EditDateTimeAction({required super.source}); + + @override + ActionItem? create(BuildContext context, WidgetRef ref) { + if (!ref.watch(_stateProvider(source).select((state) => state != null))) { + return null; + } + + return .new( + icon: Icons.edit_calendar_outlined, + label: context.t.control_bottom_app_bar_edit_time, + onAction: () => _edit(context, ref), + ); + } + + Future _edit(BuildContext context, WidgetRef ref) async { + final state = ref.read(_stateProvider(source)); + if (state == null) { + return; + } + + final (:assetIds, :origin) = state; + final remoteAssetRepository = ref.read(remoteAssetRepositoryProvider); + final clearSelection = ref.read(clearSelectionProvider(source)); + + try { + DateTime? initialDate; + String? timeZone; + Duration? offset; + + if (origin != null) { + final exif = await remoteAssetRepository.getExif(origin.id); + + // Prefer the EXIF timezone, so the picker opens on what the asset actually shows. + DateTime dateTime = origin.createdAt.toLocal(); + offset = dateTime.timeZoneOffset; + if (exif?.dateTimeOriginal case final original?) { + timeZone = exif!.timeZone; + (dateTime, offset) = applyTimezoneOffset(dateTime: original, timeZone: exif.timeZone); + } + initialDate = dateTime; + + if (!context.mounted) { + return; + } + } + + final picked = await showDateTimePicker( + context: context, + initialDateTime: initialDate, + initialTZ: timeZone, + initialTZOffset: offset, + ); + if (picked == null || !context.mounted) { + return; + } + + await saveDateTime(context, ref, assetIds, picked); + clearSelection(); + } catch (error, stack) { + handleError(error, stack: stack, description: "Failed to update the date and time for assets"); + } + } +} + +@visibleForTesting +Future saveDateTime(BuildContext context, WidgetRef ref, List assetIds, String dateTime) async { + final message = context.t.edit_date_and_time_action_prompt(count: assetIds.length); + final toastService = ref.read(toastServiceProvider); + + await ref.read(assetServiceProvider).update(assetIds, dateTime: .some(dateTime)); + ref.invalidate(assetExifProvider); + toastService.success(message); +} diff --git a/mobile/lib/presentation/actions/edit_location.action.dart b/mobile/lib/presentation/actions/edit_location.action.dart new file mode 100644 index 0000000000..5ce74a0f40 --- /dev/null +++ b/mobile/lib/presentation/actions/edit_location.action.dart @@ -0,0 +1,85 @@ +import 'package:collection/collection.dart'; +import 'package:flutter/material.dart'; +import 'package:hooks_riverpod/hooks_riverpod.dart'; +import 'package:immich_mobile/constants/enums.dart'; +import 'package:immich_mobile/domain/models/asset/base_asset.model.dart'; +import 'package:immich_mobile/generated/translations.g.dart'; +import 'package:immich_mobile/presentation/actions/action.dart'; +import 'package:immich_mobile/providers/infrastructure/asset.provider.dart'; +import 'package:immich_mobile/providers/infrastructure/asset_viewer/asset.provider.dart'; +import 'package:immich_mobile/providers/infrastructure/toast.provider.dart'; +import 'package:immich_mobile/utils/error_handler.dart'; +import 'package:immich_mobile/widgets/common/location_picker.dart'; +import 'package:maplibre_gl/maplibre_gl.dart'; + +typedef _State = ({List assetIds, RemoteAsset? origin}); + +final _stateProvider = Provider.family.autoDispose<_State?, ActionSource>((ref, source) { + final assets = ref.watch(ownedAssetsActionProvider(source)); + if (assets.isEmpty) { + return null; + } + + return (assetIds: assets.map((asset) => asset.id).toList(growable: false), origin: assets.singleOrNull); +}, dependencies: [ownedAssetsActionProvider]); + +class EditLocationAction extends AssetActionBuilder { + const EditLocationAction({required super.source}); + + @override + ActionItem? create(BuildContext context, WidgetRef ref) { + if (!ref.watch(_stateProvider(source).select((state) => state != null))) { + return null; + } + + return .new( + icon: Icons.edit_location_alt_outlined, + label: context.t.control_bottom_app_bar_edit_location, + onAction: () => _edit(context, ref), + ); + } + + Future _edit(BuildContext context, WidgetRef ref) async { + final state = ref.read(_stateProvider(source)); + if (state == null) { + return; + } + + final (:assetIds, :origin) = state; + final remoteAssetRepository = ref.read(remoteAssetRepositoryProvider); + final clearSelection = ref.read(clearSelectionProvider(source)); + + try { + LatLng? initialLatLng; + if (origin != null) { + final exif = await remoteAssetRepository.getExif(origin.id); + if (exif?.latitude != null && exif?.longitude != null) { + initialLatLng = LatLng(exif!.latitude!, exif.longitude!); + } + if (!context.mounted) { + return; + } + } + + final location = await showLocationPicker(context: context, initialLatLng: initialLatLng); + if (location == null || !context.mounted) { + return; + } + + await saveLocation(context, ref, assetIds, location); + clearSelection(); + } catch (error, stack) { + handleError(error, stack: stack, description: "Failed to update the location for assets"); + } + } +} + +@visibleForTesting +Future saveLocation(BuildContext context, WidgetRef ref, List assetIds, LatLng location) async { + final message = context.t.edit_location_action_prompt(count: assetIds.length); + final toastService = ref.read(toastServiceProvider); + + await ref.read(assetServiceProvider).update(assetIds, location: .some(location)); + ref.invalidate(assetExifProvider); + toastService.success(message); +} diff --git a/mobile/lib/presentation/actions/favorite.action.dart b/mobile/lib/presentation/actions/favorite.action.dart index 33d4bb3b6c..402d2f3833 100644 --- a/mobile/lib/presentation/actions/favorite.action.dart +++ b/mobile/lib/presentation/actions/favorite.action.dart @@ -1,40 +1,62 @@ import 'package:flutter/material.dart'; -import 'package:immich_mobile/domain/models/asset/base_asset.model.dart'; +import 'package:hooks_riverpod/hooks_riverpod.dart'; +import 'package:immich_mobile/constants/enums.dart'; import 'package:immich_mobile/generated/translations.g.dart'; import 'package:immich_mobile/presentation/actions/action.dart'; import 'package:immich_mobile/providers/infrastructure/asset.provider.dart'; -import 'package:immich_ui/immich_ui.dart'; +import 'package:immich_mobile/providers/infrastructure/toast.provider.dart'; +import 'package:immich_mobile/utils/error_handler.dart'; -class FavoriteAction extends AssetAction { - final bool shouldFavorite; +typedef _State = ({bool shouldFavorite, List assetIds}); - FavoriteAction({required super.assets}) : shouldFavorite = assets.any((asset) => !asset.isFavorite); +final _stateProvider = Provider.family.autoDispose<_State?, ActionSource>((ref, source) { + final assets = ref.watch(ownedAssetsActionProvider(source)); + if (assets.isEmpty) { + return null; + } + + final shouldFavorite = assets.favorite(isFavorite: false).isNotEmpty; + final assetIds = assets.favorite(isFavorite: !shouldFavorite).map((asset) => asset.id).toList(growable: false); + return (shouldFavorite: shouldFavorite, assetIds: assetIds); +}, dependencies: [ownedAssetsActionProvider]); + +class FavoriteAction extends AssetActionBuilder { + const FavoriteAction({required super.source}); @override - IconData get icon => shouldFavorite ? Icons.favorite_border_rounded : Icons.favorite_rounded; + ActionItem? create(BuildContext context, WidgetRef ref) { + final shouldFavorite = ref.watch(_stateProvider(source).select((state) => state?.shouldFavorite)); + if (shouldFavorite == null) { + return null; + } - @override - String label(ActionScope scope) => shouldFavorite ? scope.context.t.favorite : scope.context.t.unfavorite; + return .new( + icon: shouldFavorite ? Icons.favorite_border_rounded : Icons.favorite_rounded, + label: shouldFavorite ? context.t.favorite : context.t.unfavorite, + onAction: () => _favorite(context, ref), + ); + } - @override - Iterable filter(ActionScope scope) => assets - .where( - (asset) => asset is RemoteAsset && asset.ownerId == scope.authUser.id && asset.isFavorite == !shouldFavorite, - ) - .cast(); + Future _favorite(BuildContext context, WidgetRef ref) async { + final state = ref.read(_stateProvider(source)); + if (state == null) { + return; + } - @override - bool isVisible(ActionScope scope) => filter(scope).isNotEmpty; - - @override - Future onAction(ActionScope scope) async { - final ActionScope(:ref) = scope; - final assets = filter(scope).map((asset) => asset.id).toList(growable: false); - - await ref.read(assetServiceProvider).updateFavorite(assets, shouldFavorite); + final (:shouldFavorite, :assetIds) = state; final message = shouldFavorite - ? StaticTranslations.instance.favorite_action_prompt(count: assets.length) - : StaticTranslations.instance.unfavorite_action_prompt(count: assets.length); - snackbar.success(message); + ? context.t.favorite_action_prompt(count: assetIds.length) + : context.t.unfavorite_action_prompt(count: assetIds.length); + final assetService = ref.read(assetServiceProvider); + final toastService = ref.read(toastServiceProvider); + final clearSelection = ref.read(clearSelectionProvider(source)); + + try { + await assetService.update(assetIds, isFavorite: .some(shouldFavorite)); + toastService.success(message); + clearSelection(); + } catch (error, stack) { + handleError(error, stack: stack, description: "Failed to update favorite status for assets"); + } } } diff --git a/mobile/lib/presentation/actions/lock.action.dart b/mobile/lib/presentation/actions/lock.action.dart new file mode 100644 index 0000000000..3d090b712d --- /dev/null +++ b/mobile/lib/presentation/actions/lock.action.dart @@ -0,0 +1,71 @@ +import 'package:flutter/material.dart'; +import 'package:hooks_riverpod/hooks_riverpod.dart'; +import 'package:immich_mobile/constants/enums.dart'; +import 'package:immich_mobile/generated/translations.g.dart'; +import 'package:immich_mobile/presentation/actions/action.dart'; +import 'package:immich_mobile/providers/infrastructure/asset.provider.dart'; +import 'package:immich_mobile/providers/infrastructure/toast.provider.dart'; +import 'package:immich_mobile/utils/error_handler.dart'; + +typedef _State = ({bool shouldLock, List assetIds, List localIds}); + +final _stateProvider = Provider.family.autoDispose<_State?, ActionSource>((ref, source) { + final assets = ref.watch(ownedAssetsActionProvider(source)); + if (assets.isEmpty) { + return null; + } + + final shouldLock = assets.locked(isLocked: false).isNotEmpty; + final targets = assets.locked(isLocked: !shouldLock); + return ( + shouldLock: shouldLock, + assetIds: targets.map((asset) => asset.id).toList(growable: false), + // Only locking has an on-device copy to clean up; unlocking leaves the device alone. + localIds: shouldLock ? targets.map((asset) => asset.localId).nonNulls.toList(growable: false) : const [], + ); +}, dependencies: [ownedAssetsActionProvider]); + +class LockAction extends AssetActionBuilder { + const LockAction({required super.source}); + + @override + ActionItem? create(BuildContext context, WidgetRef ref) { + final shouldLock = ref.watch(_stateProvider(source).select((state) => state?.shouldLock)); + if (shouldLock == null) { + return null; + } + + return .new( + icon: shouldLock ? Icons.lock_rounded : Icons.lock_open_rounded, + label: shouldLock ? context.t.move_to_locked_folder : context.t.remove_from_locked_folder, + onAction: () => _lock(context, ref), + ); + } + + Future _lock(BuildContext context, WidgetRef ref) async { + final state = ref.read(_stateProvider(source)); + if (state == null) { + return; + } + + final (:shouldLock, :assetIds, :localIds) = state; + final message = shouldLock + ? context.t.move_to_lock_folder_action_prompt(count: assetIds.length) + : context.t.remove_from_lock_folder_action_prompt(count: assetIds.length); + final assetService = ref.read(assetServiceProvider); + final toastService = ref.read(toastServiceProvider); + final clearSelection = ref.read(clearSelectionProvider(source)); + + try { + await assetService.update(assetIds, visibility: .some(shouldLock ? .locked : .timeline)); + if (localIds.isNotEmpty) { + // A locked asset still sits in the device gallery, so offer to remove the local copy. + await assetService.deleteLocal(localIds); + } + toastService.success(message); + clearSelection(); + } catch (error, stack) { + handleError(error, stack: stack, description: "Failed to update the locked folder for assets"); + } + } +} diff --git a/mobile/lib/presentation/actions/open_in_browser.action.dart b/mobile/lib/presentation/actions/open_in_browser.action.dart new file mode 100644 index 0000000000..6b05762977 --- /dev/null +++ b/mobile/lib/presentation/actions/open_in_browser.action.dart @@ -0,0 +1,35 @@ +import 'package:flutter/material.dart'; +import 'package:hooks_riverpod/hooks_riverpod.dart'; +import 'package:immich_mobile/domain/services/timeline.service.dart'; +import 'package:immich_mobile/generated/translations.g.dart'; +import 'package:immich_mobile/presentation/actions/action.dart'; +import 'package:immich_mobile/providers/infrastructure/store.provider.dart'; +import 'package:url_launcher/url_launcher.dart'; + +class OpenInBrowserAction extends ActionBuilder { + final String remoteId; + final TimelineOrigin origin; + + const OpenInBrowserAction({required this.remoteId, required this.origin}); + + @override + ActionItem create(BuildContext context, WidgetRef ref) => + .new(icon: Icons.open_in_browser, label: context.t.open_in_browser, onAction: () => _open(ref)); + + Future _open(WidgetRef ref) async { + final serverEndpoint = ref.read(storeServiceProvider).get(.serverEndpoint).replaceFirst('/api', ''); + final url = Uri.parse('$serverEndpoint${webPathFor(origin)}/photos/$remoteId'); + + if (await canLaunchUrl(url)) { + await launchUrl(url, mode: .externalApplication); + } + } +} + +@visibleForTesting +String webPathFor(TimelineOrigin origin) => switch (origin) { + .favorite => '/favorites', + .trash => '/trash', + .archive => '/archive', + _ => '', +}; diff --git a/mobile/lib/presentation/actions/partner.action.dart b/mobile/lib/presentation/actions/partner.action.dart index 11fb69ee75..012340c1d8 100644 --- a/mobile/lib/presentation/actions/partner.action.dart +++ b/mobile/lib/presentation/actions/partner.action.dart @@ -6,44 +6,46 @@ import 'package:immich_mobile/presentation/actions/action.dart'; import 'package:immich_mobile/presentation/widgets/people/partner_user_avatar.widget.dart'; import 'package:immich_mobile/providers/infrastructure/user.provider.dart'; import 'package:immich_mobile/providers/user.provider.dart'; +import 'package:immich_mobile/utils/error_handler.dart'; import 'package:immich_mobile/widgets/common/confirm_dialog.dart'; -class PartnerAddAction extends BaseAction { +class PartnerAddAction extends ActionBuilder { const PartnerAddAction(); @override - IconData get icon => Icons.person_add_rounded; + ActionItem create(BuildContext context, WidgetRef ref) => + ActionItem(icon: Icons.person_add_rounded, label: context.t.add_partner, onAction: () => _add(context, ref)); - @override - String label(ActionScope scope) => scope.context.t.add_partner; + Future _add(BuildContext context, WidgetRef ref) async { + final partnerService = ref.read(partnerServiceProvider); + final authUserId = ref.read(authUserProvider).id; - @override - Future onAction(ActionScope scope) async { - final ActionScope(:context, :ref, :authUser) = scope; final selected = await showDialog(context: context, builder: (_) => const PartnerSelectionDialog()); if (selected == null) { return; } - await ref.read(partnerServiceProvider).create(sharedById: authUser.id, sharedWithId: selected.id); + try { + await partnerService.create(sharedById: authUserId, sharedWithId: selected.id); + } catch (error, stack) { + handleError(error, stack: stack, description: 'Failed to add partner'); + } } } -class PartnerRemoveAction extends BaseAction { +class PartnerRemoveAction extends ActionBuilder { const PartnerRemoveAction({required this.sharedWithId, required this.partnerName}); final String sharedWithId; final String partnerName; @override - IconData get icon => Icons.person_remove_rounded; + ActionItem create(BuildContext context, WidgetRef ref) => + ActionItem(icon: Icons.person_remove_rounded, label: context.t.remove, onAction: () => _remove(context, ref)); - @override - String label(ActionScope scope) => scope.context.t.remove; - - @override - Future onAction(ActionScope scope) async { - final ActionScope(:context, :ref, :authUser) = scope; + Future _remove(BuildContext context, WidgetRef ref) async { + final partnerService = ref.read(partnerServiceProvider); + final authUserId = ref.read(authUserProvider).id; final confirmed = await showDialog( context: context, @@ -56,19 +58,18 @@ class PartnerRemoveAction extends BaseAction { return; } - await ref.read(partnerServiceProvider).delete(sharedById: authUser.id, sharedWithId: sharedWithId); + try { + await partnerService.delete(sharedById: authUserId, sharedWithId: sharedWithId); + } catch (error, stack) { + handleError(error, stack: stack, description: 'Failed to remove partner'); + } } } @visibleForTesting -final candidatesStateProvider = StreamProvider.autoDispose>((ref) { - final currentUser = ref.watch(currentUserProvider); - // TODO: Refactor with a route guard to avoid this check in every provider - if (currentUser == null) { - return const Stream.empty(); - } - return ref.watch(partnerServiceProvider).getCandidates(currentUser.id); -}); +final candidatesStateProvider = StreamProvider.autoDispose>( + (ref) => ref.watch(partnerServiceProvider).getCandidates(ref.watch(authUserProvider).id), +); @visibleForTesting class PartnerSelectionDialog extends ConsumerWidget { diff --git a/mobile/lib/presentation/actions/remove_from_album.action.dart b/mobile/lib/presentation/actions/remove_from_album.action.dart new file mode 100644 index 0000000000..9e2d9d582f --- /dev/null +++ b/mobile/lib/presentation/actions/remove_from_album.action.dart @@ -0,0 +1,52 @@ +import 'package:flutter/material.dart'; +import 'package:hooks_riverpod/hooks_riverpod.dart'; +import 'package:immich_mobile/constants/enums.dart'; +import 'package:immich_mobile/generated/translations.g.dart'; +import 'package:immich_mobile/presentation/actions/action.dart'; +import 'package:immich_mobile/providers/infrastructure/album.provider.dart'; +import 'package:immich_mobile/providers/infrastructure/toast.provider.dart'; +import 'package:immich_mobile/utils/error_handler.dart'; + +final _stateProvider = Provider.family.autoDispose?, ActionSource>((ref, source) { + final assets = ref.watch(assetsActionProvider(source)); + final assetIds = assets.remote().map((asset) => asset.id).toList(growable: false); + return assetIds.isEmpty ? null : assetIds; +}, dependencies: [assetsActionProvider]); + +class RemoveFromAlbumAction extends AssetActionBuilder { + final String albumId; + + const RemoveFromAlbumAction({required super.source, required this.albumId}); + + @override + ActionItem? create(BuildContext context, WidgetRef ref) { + final assetIds = ref.watch(_stateProvider(source)); + if (assetIds == null) { + return null; + } + + return .new( + icon: Icons.remove_circle_outline, + label: context.t.remove_from_album, + onAction: () => _remove(context, ref, assetIds), + ); + } + + Future _remove(BuildContext context, WidgetRef ref, List assetIds) async { + final albumService = ref.read(remoteAlbumServiceProvider); + final toastService = ref.read(toastServiceProvider); + final clearSelection = ref.read(clearSelectionProvider(source)); + + try { + final count = await albumService.removeAssets(albumId: albumId, assetIds: assetIds); + if (!context.mounted) { + return; + } + + toastService.success(context.t.remove_from_album_action_prompt(count: count)); + clearSelection(); + } catch (error, stack) { + handleError(error, stack: stack, description: "Failed to remove the assets from the album"); + } + } +} diff --git a/mobile/lib/presentation/actions/restore.action.dart b/mobile/lib/presentation/actions/restore.action.dart new file mode 100644 index 0000000000..0a1b707b39 --- /dev/null +++ b/mobile/lib/presentation/actions/restore.action.dart @@ -0,0 +1,47 @@ +import 'package:flutter/material.dart'; +import 'package:hooks_riverpod/hooks_riverpod.dart'; +import 'package:immich_mobile/constants/enums.dart'; +import 'package:immich_mobile/generated/translations.g.dart'; +import 'package:immich_mobile/presentation/actions/action.dart'; +import 'package:immich_mobile/providers/infrastructure/asset.provider.dart'; +import 'package:immich_mobile/providers/infrastructure/toast.provider.dart'; +import 'package:immich_mobile/utils/error_handler.dart'; + +final _stateProvider = Provider.family.autoDispose?, ActionSource>((ref, source) { + final assets = ref.watch(ownedAssetsActionProvider(source)); + final assetIds = assets.trashed().map((asset) => asset.id).toList(growable: false); + return assetIds.isEmpty ? null : assetIds; +}, dependencies: [ownedAssetsActionProvider]); + +class RestoreAction extends AssetActionBuilder { + const RestoreAction({required super.source}); + + @override + ActionItem? create(BuildContext context, WidgetRef ref) { + if (!ref.watch(_stateProvider(source).select((state) => state != null))) { + return null; + } + + return .new(icon: Icons.history_rounded, label: context.t.restore, onAction: () => _restore(context, ref)); + } + + Future _restore(BuildContext context, WidgetRef ref) async { + final assetIds = ref.read(_stateProvider(source)); + if (assetIds == null) { + return; + } + + final message = context.t.assets_restored_count(count: assetIds.length); + final assetService = ref.read(assetServiceProvider); + final toastService = ref.read(toastServiceProvider); + final clearSelection = ref.read(clearSelectionProvider(source)); + + try { + await assetService.restoreTrash(assetIds); + toastService.success(message); + clearSelection(); + } catch (error, stack) { + handleError(error, stack: stack, description: "Failed to restore assets"); + } + } +} diff --git a/mobile/lib/presentation/actions/set_album_cover.action.dart b/mobile/lib/presentation/actions/set_album_cover.action.dart new file mode 100644 index 0000000000..d5ad367eed --- /dev/null +++ b/mobile/lib/presentation/actions/set_album_cover.action.dart @@ -0,0 +1,49 @@ +import 'package:collection/collection.dart'; +import 'package:flutter/material.dart'; +import 'package:hooks_riverpod/hooks_riverpod.dart'; +import 'package:immich_mobile/constants/enums.dart'; +import 'package:immich_mobile/generated/translations.g.dart'; +import 'package:immich_mobile/presentation/actions/action.dart'; +import 'package:immich_mobile/providers/infrastructure/album.provider.dart'; +import 'package:immich_mobile/providers/infrastructure/toast.provider.dart'; +import 'package:immich_mobile/utils/error_handler.dart'; + +final _stateProvider = Provider.family.autoDispose((ref, source) { + final assets = ref.watch(assetsActionProvider(source)); + return assets.remote().map((asset) => asset.id).singleOrNull; +}, dependencies: [assetsActionProvider]); + +class SetAlbumCoverAction extends AssetActionBuilder { + final String albumId; + + const SetAlbumCoverAction({required super.source, required this.albumId}); + + @override + ActionItem? create(BuildContext context, WidgetRef ref) { + final assetId = ref.watch(_stateProvider(source)); + if (assetId == null) { + return null; + } + + return .new( + icon: Icons.image_outlined, + label: context.t.set_as_album_cover, + onAction: () => _setCover(context, ref, assetId), + ); + } + + Future _setCover(BuildContext context, WidgetRef ref, String assetId) async { + final message = context.t.album_cover_updated; + final albumService = ref.read(remoteAlbumServiceProvider); + final toastService = ref.read(toastServiceProvider); + final clearSelection = ref.read(clearSelectionProvider(source)); + + try { + await albumService.updateAlbum(albumId, thumbnailAssetId: assetId); + toastService.success(message); + clearSelection(); + } catch (error, stack) { + handleError(error, stack: stack, description: "Failed to update the album cover"); + } + } +} diff --git a/mobile/lib/presentation/actions/set_profile_picture.action.dart b/mobile/lib/presentation/actions/set_profile_picture.action.dart new file mode 100644 index 0000000000..c14be1dc87 --- /dev/null +++ b/mobile/lib/presentation/actions/set_profile_picture.action.dart @@ -0,0 +1,22 @@ +import 'dart:async'; + +import 'package:auto_route/auto_route.dart'; +import 'package:flutter/material.dart'; +import 'package:hooks_riverpod/hooks_riverpod.dart'; +import 'package:immich_mobile/domain/models/asset/base_asset.model.dart'; +import 'package:immich_mobile/generated/translations.g.dart'; +import 'package:immich_mobile/presentation/actions/action.dart'; +import 'package:immich_mobile/routing/router.dart'; + +class SetProfilePictureAction extends ActionBuilder { + final BaseAsset asset; + + const SetProfilePictureAction({required this.asset}); + + @override + ActionItem create(BuildContext context, WidgetRef ref) => .new( + icon: Icons.account_circle_outlined, + label: context.t.set_as_profile_picture, + onAction: () async => unawaited(context.pushRoute(ProfilePictureCropRoute(asset: asset))), + ); +} diff --git a/mobile/lib/presentation/actions/share.action.dart b/mobile/lib/presentation/actions/share.action.dart new file mode 100644 index 0000000000..3b8a6318de --- /dev/null +++ b/mobile/lib/presentation/actions/share.action.dart @@ -0,0 +1,164 @@ +import 'dart:async'; + +import 'package:flutter/material.dart'; +import 'package:hooks_riverpod/hooks_riverpod.dart'; +import 'package:immich_mobile/constants/enums.dart'; +import 'package:immich_mobile/domain/models/asset/base_asset.model.dart'; +import 'package:immich_mobile/extensions/build_context_extensions.dart'; +import 'package:immich_mobile/extensions/platform_extensions.dart'; +import 'package:immich_mobile/generated/translations.g.dart'; +import 'package:immich_mobile/presentation/actions/action.dart'; +import 'package:immich_mobile/providers/infrastructure/settings.provider.dart'; +import 'package:immich_mobile/providers/infrastructure/toast.provider.dart'; +import 'package:immich_mobile/repositories/asset_media.repository.dart'; + +final _stateProvider = Provider.family.autoDispose?, ActionSource>((ref, source) { + final assets = ref.watch(assetsActionProvider(source)); + final shareable = assets.toList(growable: false); + return shareable.isEmpty ? null : shareable; +}, dependencies: [assetsActionProvider]); + +class ShareAction extends AssetActionBuilder { + const ShareAction({required super.source}); + + @override + ActionItem? create(BuildContext context, WidgetRef ref) { + final assets = ref.watch(_stateProvider(source)); + if (assets == null) { + return null; + } + + return .new( + icon: CurrentPlatform.isAndroid ? Icons.share_rounded : Icons.ios_share_rounded, + label: context.t.share, + onAction: () => _share(context, ref, assets, ref.read(appConfigProvider).share.fileType), + onSecondaryAction: () => _promptQualityAndShare(context, ref, assets), + ); + } + + Future _promptQualityAndShare(BuildContext context, WidgetRef ref, List assets) async { + // Only show preview option when at least one of the assets is not a video + final showPreview = assets.any((asset) => !asset.isVideo); + + final fileType = await showDialog( + context: context, + builder: (_) => _ShareFileTypeDialog(showPreview: showPreview), + useRootNavigator: false, + ); + if (fileType == null || !context.mounted) { + return; + } + + await _share(context, ref, assets, fileType); + } + + Future _share(BuildContext context, WidgetRef ref, List assets, ShareAssetType fileType) async { + final cancelCompleter = Completer(); + final progress = ValueNotifier(null); + final mediaRepository = ref.read(assetMediaRepositoryProvider); + final toastService = ref.read(toastServiceProvider); + final errorMessage = context.t.scaffold_body_error_occurred; + + await showDialog( + context: context, + barrierDismissible: false, + useRootNavigator: false, + builder: (dialogContext) { + void finish({required bool failed}) { + if (cancelCompleter.isCompleted || !dialogContext.mounted) { + return; + } + if (failed) { + unawaited(.value(toastService.error(errorMessage))); + } + dialogContext.pop(); + } + + unawaited( + mediaRepository + .shareAssets( + assets, + context, + fileType: fileType, + cancelCompleter: cancelCompleter, + onAssetDownloadProgress: (value) => progress.value = value, + ) + .then((count) => finish(failed: count == 0), onError: (_) => finish(failed: true)), + ); + + return _SharePreparingDialog(progress: progress); + }, + ).then((_) { + if (!cancelCompleter.isCompleted) { + cancelCompleter.complete(); + } + progress.dispose(); + }); + } +} + +class _SharePreparingDialog extends StatelessWidget { + final ValueNotifier progress; + + const _SharePreparingDialog({required this.progress}); + + @override + Widget build(BuildContext context) { + return AlertDialog( + content: Column( + mainAxisSize: .min, + children: [ + Container(margin: const .only(bottom: 12), child: Text(context.t.share_dialog_preparing)), + SizedBox( + width: 240, + child: ValueListenableBuilder( + valueListenable: progress, + builder: (context, value, _) { + final percent = value == null ? null : (value * 100).clamp(0, 100); + return Column( + mainAxisSize: .min, + children: [ + LinearProgressIndicator(value: value, minHeight: 8.0), + if (percent != null) + Container(margin: const .only(top: 8), child: Text('${percent.toStringAsFixed(0)}%')), + ], + ); + }, + ), + ), + ], + ), + ); + } +} + +class _ShareFileTypeDialog extends StatelessWidget { + final bool showPreview; + + const _ShareFileTypeDialog({this.showPreview = true}); + + @override + Widget build(BuildContext context) { + return AlertDialog( + title: Text(context.t.select_quality), + contentPadding: const .symmetric(vertical: 8), + content: Column( + mainAxisSize: .min, + children: [ + ListTile( + leading: const Icon(Icons.high_quality_rounded), + title: Text(context.t.share_original), + onTap: () => context.pop(ShareAssetType.original), + ), + if (showPreview) + ListTile( + leading: const Icon(Icons.photo_size_select_large_rounded), + title: Text(context.t.share_preview), + onTap: () => context.pop(ShareAssetType.preview), + ), + ], + ), + actions: [TextButton(onPressed: () => context.pop(), child: Text(context.t.cancel))], + ); + } +} diff --git a/mobile/lib/presentation/actions/share_link.action.dart b/mobile/lib/presentation/actions/share_link.action.dart new file mode 100644 index 0000000000..4285105ed3 --- /dev/null +++ b/mobile/lib/presentation/actions/share_link.action.dart @@ -0,0 +1,33 @@ +import 'dart:async'; + +import 'package:auto_route/auto_route.dart'; +import 'package:flutter/material.dart'; +import 'package:hooks_riverpod/hooks_riverpod.dart'; +import 'package:immich_mobile/constants/enums.dart'; +import 'package:immich_mobile/generated/translations.g.dart'; +import 'package:immich_mobile/presentation/actions/action.dart'; +import 'package:immich_mobile/routing/router.dart'; + +final _stateProvider = Provider.family.autoDispose?, ActionSource>((ref, source) { + final assets = ref.watch(assetsActionProvider(source)); + final remoteIds = assets.remote().map((asset) => asset.id).toList(growable: false); + return remoteIds.isEmpty ? null : remoteIds; +}, dependencies: [assetsActionProvider]); + +class ShareLinkAction extends AssetActionBuilder { + const ShareLinkAction({required super.source}); + + @override + ActionItem? create(BuildContext context, WidgetRef ref) { + final remoteIds = ref.watch(_stateProvider(source)); + if (remoteIds == null) { + return null; + } + + return .new( + icon: Icons.link_rounded, + label: context.t.share_link, + onAction: () async => unawaited(context.pushRoute(SharedLinkEditRoute(assetsList: remoteIds))), + ); + } +} diff --git a/mobile/lib/presentation/actions/similar_photos.action.dart b/mobile/lib/presentation/actions/similar_photos.action.dart new file mode 100644 index 0000000000..d8f63f245d --- /dev/null +++ b/mobile/lib/presentation/actions/similar_photos.action.dart @@ -0,0 +1,42 @@ +import 'dart:async'; + +import 'package:auto_route/auto_route.dart'; +import 'package:flutter/material.dart'; +import 'package:hooks_riverpod/hooks_riverpod.dart'; +import 'package:immich_mobile/generated/translations.g.dart'; +import 'package:immich_mobile/presentation/actions/action.dart'; +import 'package:immich_mobile/presentation/pages/search/paginated_search.provider.dart'; +import 'package:immich_mobile/providers/asset_viewer/asset_viewer.provider.dart'; +import 'package:immich_mobile/routing/router.dart'; + +class SimilarPhotosAction extends ActionBuilder { + final String assetId; + + const SimilarPhotosAction({required this.assetId}); + + @override + ActionItem create(BuildContext context, WidgetRef ref) => + .new(icon: Icons.compare, label: context.t.view_similar_photos, onAction: () => _search(context, ref)); + + Future _search(BuildContext context, WidgetRef ref) async { + ref.invalidate(assetViewerProvider); + ref.invalidate(paginatedSearchProvider); + + ref.read(searchPreFilterProvider.notifier) + ..clear() + ..setFilter( + .new( + assetId: assetId, + people: {}, + location: .new(), + camera: .new(), + date: .new(), + display: const .new(isNotInAlbum: false, isArchive: false, isFavorite: false), + rating: .new(), + mediaType: .other, + ), + ); + + unawaited(context.navigateTo(const DriftSearchRoute())); + } +} diff --git a/mobile/lib/presentation/actions/slideshow.action.dart b/mobile/lib/presentation/actions/slideshow.action.dart new file mode 100644 index 0000000000..4b6c90b517 --- /dev/null +++ b/mobile/lib/presentation/actions/slideshow.action.dart @@ -0,0 +1,21 @@ +import 'dart:async'; + +import 'package:auto_route/auto_route.dart'; +import 'package:flutter/material.dart'; +import 'package:hooks_riverpod/hooks_riverpod.dart'; +import 'package:immich_mobile/generated/translations.g.dart'; +import 'package:immich_mobile/presentation/actions/action.dart'; +import 'package:immich_mobile/providers/infrastructure/timeline.provider.dart'; +import 'package:immich_mobile/routing/router.dart'; + +class SlideshowAction extends ActionBuilder { + const SlideshowAction(); + + @override + ActionItem create(BuildContext context, WidgetRef ref) => .new( + icon: Icons.slideshow, + label: context.t.slideshow, + onAction: () async => + unawaited(context.pushRoute(DriftSlideshowRoute(timeline: ref.read(timelineServiceProvider)))), + ); +} diff --git a/mobile/lib/presentation/actions/stack.action.dart b/mobile/lib/presentation/actions/stack.action.dart new file mode 100644 index 0000000000..5ab978a7e4 --- /dev/null +++ b/mobile/lib/presentation/actions/stack.action.dart @@ -0,0 +1,72 @@ +import 'package:flutter/material.dart'; +import 'package:hooks_riverpod/hooks_riverpod.dart'; +import 'package:immich_mobile/constants/enums.dart'; +import 'package:immich_mobile/generated/translations.g.dart'; +import 'package:immich_mobile/presentation/actions/action.dart'; +import 'package:immich_mobile/providers/infrastructure/asset.provider.dart'; +import 'package:immich_mobile/providers/infrastructure/toast.provider.dart'; +import 'package:immich_mobile/providers/user.provider.dart'; +import 'package:immich_mobile/utils/error_handler.dart'; + +typedef _State = ({bool shouldStack, List assetIds, List stackIds}); + +final _stateProvider = Provider.family.autoDispose<_State?, ActionSource>((ref, source) { + final assets = ref.watch(ownedAssetsActionProvider(source)); + final shouldStack = assets.stacked(isStacked: false).isNotEmpty; + // Stacking needs at least two assets; unstacking needs at least one stack. + if (shouldStack ? assets.elementAtOrNull(1) == null : assets.isEmpty) { + return null; + } + + return ( + shouldStack: shouldStack, + assetIds: assets.map((asset) => asset.id).toList(growable: false), + stackIds: assets.map((asset) => asset.stackId).nonNulls.toList(growable: false), + ); +}, dependencies: [ownedAssetsActionProvider]); + +class StackAction extends AssetActionBuilder { + const StackAction({required super.source}); + + @override + ActionItem? create(BuildContext context, WidgetRef ref) { + final shouldStack = ref.watch(_stateProvider(source).select((state) => state?.shouldStack)); + if (shouldStack == null) { + return null; + } + + return .new( + icon: shouldStack ? Icons.filter_none_rounded : Icons.layers_clear_outlined, + label: shouldStack ? context.t.stack : context.t.unstack, + onAction: () => _stack(context, ref), + ); + } + + Future _stack(BuildContext context, WidgetRef ref) async { + final state = ref.read(_stateProvider(source)); + if (state == null) { + return; + } + + final (:shouldStack, :assetIds, :stackIds) = state; + final message = shouldStack + ? context.t.stacked_assets_count(count: assetIds.length) + : context.t.unstacked_assets_count(count: assetIds.length); + final assetService = ref.read(assetServiceProvider); + final userId = ref.read(authUserProvider).id; + final toastService = ref.read(toastServiceProvider); + final clearSelection = ref.read(clearSelectionProvider(source)); + + try { + if (shouldStack) { + await assetService.stack(userId, assetIds); + } else { + await assetService.unstack(stackIds); + } + toastService.success(message); + clearSelection(); + } catch (error, stack) { + handleError(error, stack: stack, description: "Failed to update the stack for assets"); + } + } +} diff --git a/mobile/lib/presentation/actions/tag.action.dart b/mobile/lib/presentation/actions/tag.action.dart new file mode 100644 index 0000000000..978648708f --- /dev/null +++ b/mobile/lib/presentation/actions/tag.action.dart @@ -0,0 +1,86 @@ +import 'package:flutter/material.dart'; +import 'package:hooks_riverpod/hooks_riverpod.dart'; +import 'package:immich_mobile/constants/enums.dart'; +import 'package:immich_mobile/domain/services/tag.service.dart'; +import 'package:immich_mobile/generated/translations.g.dart'; +import 'package:immich_mobile/presentation/actions/action.dart'; +import 'package:immich_mobile/providers/infrastructure/tag.provider.dart'; +import 'package:immich_mobile/providers/infrastructure/toast.provider.dart'; +import 'package:immich_mobile/providers/infrastructure/user_metadata.provider.dart'; +import 'package:immich_mobile/utils/error_handler.dart'; +import 'package:immich_mobile/widgets/common/tag_picker.dart'; + +final _stateProvider = Provider.family.autoDispose?, ActionSource>((ref, source) { + final tagsEnabled = ref.watch( + userMetadataPreferencesProvider.select((value) => value.valueOrNull?.tagsEnabled ?? false), + ); + if (!tagsEnabled) { + return null; + } + + final assets = ref.watch(ownedAssetsActionProvider(source)); + final assetIds = assets.map((asset) => asset.id).toList(growable: false); + return assetIds.isEmpty ? null : assetIds; +}, dependencies: [ownedAssetsActionProvider]); + +class TagAction extends AssetActionBuilder { + const TagAction({required super.source}); + + @override + ActionItem? create(BuildContext context, WidgetRef ref) { + final assetIds = ref.watch(_stateProvider(source)); + if (assetIds == null) { + return null; + } + + return .new( + icon: Icons.sell_outlined, + label: context.t.control_bottom_app_bar_add_tags, + onAction: () => _tag(context, ref, assetIds), + ); + } + + Future _tag(BuildContext context, WidgetRef ref, List assetIds) async { + final clearSelection = ref.read(clearSelectionProvider(source)); + + try { + final results = await showTagPickerModal(context: context); + if (results == null || !context.mounted) { + return; + } + + final (selected, created) = results; + await tagAssets(context, ref, assetIds, selected: selected, created: created); + clearSelection(); + } catch (error, stack) { + handleError(error, stack: stack, description: "Failed to tag the assets"); + } + } +} + +@visibleForTesting +Future tagAssets( + BuildContext context, + WidgetRef ref, + List assetIds, { + required Set selected, + required Set created, +}) async { + final tagService = ref.read(tagServiceProvider); + final toastService = ref.read(toastServiceProvider); + final tagIds = {...selected}; + + if (created.isNotEmpty) { + final tags = await tagService.upsertTags(created.toList()); + tagIds.addAll(tags.map((tag) => tag.id)); + } + if (tagIds.isEmpty) { + return; + } + + final count = await tagService.bulkTagAssets(assetIds, tagIds.toList()); + ref.invalidate(tagProvider); + if (context.mounted) { + toastService.success(context.t.tagged_assets(count: count)); + } +} diff --git a/mobile/lib/presentation/actions/timeline.action.dart b/mobile/lib/presentation/actions/timeline.action.dart deleted file mode 100644 index d8d367f674..0000000000 --- a/mobile/lib/presentation/actions/timeline.action.dart +++ /dev/null @@ -1,24 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:immich_mobile/presentation/actions/action.dart'; -import 'package:immich_mobile/providers/timeline/multiselect.provider.dart'; - -class TimelineAction extends BaseAction { - final BaseAction action; - - const TimelineAction({required this.action}); - - @override - IconData get icon => action.icon; - - @override - String label(ActionScope scope) => action.label(scope); - - @override - bool isVisible(ActionScope scope) => action.isVisible(scope); - - @override - Future onAction(ActionScope scope) async { - await action.onAction(scope); - scope.ref.read(multiSelectProvider.notifier).reset(); - } -} diff --git a/mobile/lib/presentation/actions/upload.action.dart b/mobile/lib/presentation/actions/upload.action.dart new file mode 100644 index 0000000000..e52659beb7 --- /dev/null +++ b/mobile/lib/presentation/actions/upload.action.dart @@ -0,0 +1,145 @@ +import 'dart:async'; + +import 'package:flutter/material.dart'; +import 'package:hooks_riverpod/hooks_riverpod.dart'; +import 'package:immich_mobile/constants/enums.dart'; +import 'package:immich_mobile/domain/models/asset/base_asset.model.dart'; +import 'package:immich_mobile/generated/translations.g.dart'; +import 'package:immich_mobile/presentation/actions/action.dart'; +import 'package:immich_mobile/providers/backup/asset_upload_progress.provider.dart'; +import 'package:immich_mobile/providers/infrastructure/toast.provider.dart'; +import 'package:immich_mobile/services/foreground_upload.service.dart'; +import 'package:immich_mobile/utils/error_handler.dart'; +import 'package:immich_ui/immich_ui.dart'; + +final _stateProvider = Provider.family.autoDispose?, ActionSource>((ref, source) { + final assets = ref.watch(assetsActionProvider(source)); + final local = assets.backedUp(isBackedUp: false).local().toList(growable: false); + return local.isEmpty ? null : local; +}, dependencies: [assetsActionProvider]); + +class UploadAction extends AssetActionBuilder { + final bool showProgress; + + const UploadAction({required super.source, this.showProgress = false}); + + @override + ActionItem? create(BuildContext context, WidgetRef ref) { + final assets = ref.watch(_stateProvider(source)); + if (assets == null) { + return null; + } + + return .new(icon: Icons.backup_outlined, label: context.t.upload, onAction: () => _upload(context, ref, assets)); + } + + Future _upload(BuildContext context, WidgetRef ref, List assets) async { + try { + if (!showProgress) { + await uploadAssets(context, ref, assets); + return; + } + + // The dialog is not awaited: it stays up while the upload runs and is + // dismissed below, unless the user cancelled it themselves first + var isDialogOpen = true; + unawaited( + showDialog( + context: context, + barrierDismissible: false, + builder: (_) => const _UploadProgressDialog(), + ).whenComplete(() => isDialogOpen = false), + ); + + await uploadAssets(context, ref, assets); + + if (isDialogOpen && context.mounted) { + Navigator.of(context, rootNavigator: true).pop(); + } + } catch (error, stack) { + handleError(error, stack: stack, description: "Failed to upload the assets"); + } + } +} + +@visibleForTesting +Future uploadAssets(BuildContext context, WidgetRef ref, List assets) async { + final progress = ref.read(assetUploadProgressProvider.notifier); + final uploads = ref.read(foregroundUploadServiceProvider); + final toastService = ref.read(toastServiceProvider); + final errorMessage = context.t.scaffold_body_error_occurred; + + final cancelToken = Completer(); + ref.read(manualUploadCancelTokenProvider.notifier).state = cancelToken; + + final uploaded = {}; + final failed = {}; + for (final asset in assets) { + progress.setProgress(asset.id, 0.0); + } + + try { + await uploads.uploadManual( + assets, + cancelToken: cancelToken, + callbacks: UploadCallbacks( + onProgress: (id, _, bytes, total) => progress.setProgress(id, total > 0 ? bytes / total : 0.0), + onSuccess: (id, _) { + uploaded.add(id); + progress.remove(id); + }, + onError: (id, _) { + failed.add(id); + progress.setError(id); + }, + ), + ); + } finally { + ref.read(manualUploadCancelTokenProvider.notifier).state = null; + } + + final uploadedCount = uploaded.difference(failed).length; + if (!cancelToken.isCompleted && (uploadedCount != assets.length || failed.isNotEmpty)) { + toastService.error(errorMessage); + } + + unawaited(Future.delayed(const Duration(seconds: 2), progress.clear)); +} + +class _UploadProgressDialog extends ConsumerWidget { + const _UploadProgressDialog(); + + @override + Widget build(BuildContext context, WidgetRef ref) { + final progressMap = ref.watch(assetUploadProgressProvider); + + final values = progressMap.values.where((value) => value >= 0).toList(growable: false); + final progress = values.isEmpty ? 0.0 : values.reduce((a, b) => a + b) / values.length; + final hasError = progressMap.values.any((value) => value < 0); + + return AlertDialog( + title: Text(context.t.uploading), + content: Column( + mainAxisSize: .min, + children: [ + if (hasError) + const Icon(Icons.error_outline, color: Colors.red, size: 48) + else + CircularProgressIndicator(value: progress > 0 ? progress : null), + const SizedBox(height: 16), + Text(hasError ? context.t.scaffold_body_error_occurred : '${(progress * 100).toInt()}%'), + ], + ), + actions: [ + ImmichTextButton( + onPressed: () { + ref.read(manualUploadCancelTokenProvider)?.complete(); + ref.read(manualUploadCancelTokenProvider.notifier).state = null; + Navigator.of(context, rootNavigator: true).pop(); + }, + labelText: context.t.cancel, + ), + ], + ); + } +} diff --git a/mobile/lib/presentation/pages/cleanup_preview.page.dart b/mobile/lib/presentation/pages/cleanup_preview.page.dart index 556ed6412f..45f8c80c91 100644 --- a/mobile/lib/presentation/pages/cleanup_preview.page.dart +++ b/mobile/lib/presentation/pages/cleanup_preview.page.dart @@ -5,7 +5,7 @@ import 'package:immich_mobile/domain/models/asset/base_asset.model.dart'; import 'package:immich_mobile/domain/models/timeline.model.dart'; import 'package:immich_mobile/domain/services/timeline.service.dart'; import 'package:immich_mobile/extensions/build_context_extensions.dart'; -import 'package:immich_mobile/extensions/translate_extensions.dart'; +import 'package:immich_mobile/generated/translations.g.dart'; import 'package:immich_mobile/presentation/widgets/timeline/timeline.widget.dart'; import 'package:immich_mobile/providers/infrastructure/timeline.provider.dart'; @@ -19,7 +19,7 @@ class CleanupPreviewPage extends StatelessWidget { Widget build(BuildContext context) { return Scaffold( appBar: AppBar( - title: Text('cleanup_preview_title'.t(context: context, args: {'count': assets.length.toString()})), + title: Text(context.t.cleanup_preview_title(count: assets.length)), centerTitle: true, elevation: 0, scrolledUnderElevation: 0, diff --git a/mobile/lib/presentation/pages/dev/main_timeline.page.dart b/mobile/lib/presentation/pages/dev/main_timeline.page.dart index 5ec946858d..f2215d169c 100644 --- a/mobile/lib/presentation/pages/dev/main_timeline.page.dart +++ b/mobile/lib/presentation/pages/dev/main_timeline.page.dart @@ -1,16 +1,44 @@ import 'package:auto_route/auto_route.dart'; import 'package:flutter/material.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; +import 'package:immich_mobile/presentation/widgets/feature_message/feature_message_dialog.widget.dart'; import 'package:immich_mobile/presentation/widgets/memory/memory_lane.widget.dart'; import 'package:immich_mobile/presentation/widgets/timeline/timeline.widget.dart'; +import 'package:immich_mobile/providers/feature_message.provider.dart'; import 'package:immich_mobile/providers/infrastructure/memory.provider.dart'; @RoutePage() -class MainTimelinePage extends ConsumerWidget { +class MainTimelinePage extends ConsumerStatefulWidget { const MainTimelinePage({super.key}); @override - Widget build(BuildContext context, WidgetRef ref) { + ConsumerState createState() => _MainTimelinePageState(); +} + +class _MainTimelinePageState extends ConsumerState { + @override + void initState() { + super.initState(); + WidgetsBinding.instance.addPostFrameCallback((_) async { + if (!mounted) { + return; + } + final service = ref.read(featureMessageServiceProvider); + if (!service.shouldShow()) { + return; + } + + await service.markSeen(); + if (!mounted) { + return; + } + + await showFeatureMessageDialog(context); + }); + } + + @override + Widget build(BuildContext context) { final hasMemories = ref.watch(driftMemoryFutureProvider.select((state) => state.value?.isNotEmpty ?? false)); return Timeline( topSliverWidget: const SliverToBoxAdapter(child: DriftMemoryLane()), diff --git a/mobile/lib/presentation/pages/dev/media_stat.page.dart b/mobile/lib/presentation/pages/dev/media_stat.page.dart index 4c18a09200..5947abfeb1 100644 --- a/mobile/lib/presentation/pages/dev/media_stat.page.dart +++ b/mobile/lib/presentation/pages/dev/media_stat.page.dart @@ -1,9 +1,9 @@ import 'package:auto_route/auto_route.dart'; import 'package:collection/collection.dart'; -import 'package:easy_localization/easy_localization.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/generated/translations.g.dart'; import 'package:immich_mobile/infrastructure/repositories/db.repository.dart'; import 'package:immich_mobile/providers/infrastructure/album.provider.dart'; import 'package:immich_mobile/providers/infrastructure/db.provider.dart'; @@ -56,9 +56,9 @@ class LocalMediaSummaryPage extends StatelessWidget { @override Widget build(BuildContext context) { return Scaffold( - appBar: AppBar(title: Text('local_media_summary'.tr())), + appBar: AppBar(title: Text(context.t.local_media_summary)), body: Consumer( - builder: (ctx, ref, __) { + builder: (ctx, ref, _) { final db = ref.watch(driftProvider); final albumsFuture = ref.watch(localAlbumRepository).getAll(); @@ -79,7 +79,7 @@ class LocalMediaSummaryPage extends StatelessWidget { const Divider(), Padding( padding: const EdgeInsets.only(left: 15), - child: Text("album_summary".tr(), style: ctx.textTheme.titleMedium), + child: Text(ctx.t.album_summary, style: ctx.textTheme.titleMedium), ), ], ), @@ -136,9 +136,9 @@ class RemoteMediaSummaryPage extends StatelessWidget { @override Widget build(BuildContext context) { return Scaffold( - appBar: AppBar(title: Text('remote_media_summary'.tr())), + appBar: AppBar(title: Text(context.t.remote_media_summary)), body: Consumer( - builder: (ctx, ref, __) { + builder: (ctx, ref, _) { final db = ref.watch(driftProvider); final albumsFuture = ref.watch(remoteAlbumRepository).getAll(); @@ -159,7 +159,7 @@ class RemoteMediaSummaryPage extends StatelessWidget { const Divider(), Padding( padding: const EdgeInsets.only(left: 15), - child: Text("album_summary".tr(), style: ctx.textTheme.titleMedium), + child: Text(ctx.t.album_summary, style: ctx.textTheme.titleMedium), ), ], ), diff --git a/mobile/lib/presentation/pages/download_info.page.dart b/mobile/lib/presentation/pages/download_info.page.dart index e805458e76..09a65b4586 100644 --- a/mobile/lib/presentation/pages/download_info.page.dart +++ b/mobile/lib/presentation/pages/download_info.page.dart @@ -1,8 +1,10 @@ +import 'dart:async'; + 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/translate_extensions.dart'; +import 'package:immich_mobile/generated/translations.g.dart'; import 'package:immich_mobile/pages/common/download_panel.dart'; import 'package:immich_mobile/providers/asset_viewer/download.provider.dart'; @@ -14,15 +16,12 @@ class DownloadInfoPage extends ConsumerWidget { Widget build(BuildContext context, WidgetRef ref) { final tasks = ref.watch(downloadStateProvider.select((state) => state.taskProgress)).entries.toList(); - onCancelDownload(String id) { - ref.watch(downloadStateProvider.notifier).cancelDownload(id); + void onCancelDownload(String id) { + unawaited(ref.read(downloadStateProvider.notifier).cancelDownload(id)); } return Scaffold( - appBar: AppBar( - title: Text("download".t(context: context)), - actions: [], - ), + appBar: AppBar(title: Text(context.t.download), actions: const []), body: ListView.builder( physics: const ClampingScrollPhysics(), shrinkWrap: true, @@ -47,7 +46,7 @@ class DownloadInfoPage extends ConsumerWidget { }, style: OutlinedButton.styleFrom(side: BorderSide(color: context.colorScheme.primary)), child: Text( - 'clear_all'.t(context: context), + context.t.clear_all, style: context.textTheme.labelLarge?.copyWith(color: context.colorScheme.primary), ), ), diff --git a/mobile/lib/presentation/pages/drift_activities.page.dart b/mobile/lib/presentation/pages/drift_activities.page.dart index b998e10dc2..2bb3507e6e 100644 --- a/mobile/lib/presentation/pages/drift_activities.page.dart +++ b/mobile/lib/presentation/pages/drift_activities.page.dart @@ -1,3 +1,5 @@ +import 'dart:async'; + import 'package:auto_route/auto_route.dart'; import 'package:flutter/material.dart'; import 'package:flutter_hooks/flutter_hooks.dart' hide Store; @@ -21,17 +23,21 @@ class DriftActivitiesPage extends HookConsumerWidget { @override Widget build(BuildContext context, WidgetRef ref) { - final activityNotifier = ref.read(albumActivityProvider((album.id, assetId)).notifier); + final activityNotifier = ref.watch(albumActivityProvider((album.id, assetId)).notifier); final activities = ref.watch(albumActivityProvider((album.id, assetId))); final listViewScrollController = useScrollController(); - void scrollToBottom() { - listViewScrollController.animateTo(0, duration: const Duration(milliseconds: 300), curve: Curves.fastOutSlowIn); + Future scrollToBottom() { + return listViewScrollController.animateTo( + 0, + duration: const Duration(milliseconds: 300), + curve: Curves.fastOutSlowIn, + ); } Future onAddComment(String comment) async { await activityNotifier.addComment(comment); - scrollToBottom(); + unawaited(scrollToBottom()); } return ProviderScope( @@ -45,7 +51,7 @@ class DriftActivitiesPage extends HookConsumerWidget { if (assetName != null) Text(assetName!, style: context.textTheme.bodySmall), ], ), - actions: [const LikeActivityActionButton(iconOnly: true)], + actions: const [LikeActivityActionButton(iconOnly: true)], actionsPadding: const EdgeInsets.only(right: 8), ), body: activities.widgetWhen( @@ -71,7 +77,7 @@ class DriftActivitiesPage extends HookConsumerWidget { ), Align( alignment: Alignment.bottomCenter, - child: Container( + child: DecoratedBox( decoration: BoxDecoration( color: context.scaffoldBackgroundColor, border: Border(top: BorderSide(color: context.colorScheme.secondaryContainer, width: 1)), diff --git a/mobile/lib/presentation/pages/drift_album.page.dart b/mobile/lib/presentation/pages/drift_album.page.dart index 47a4625f87..ab91b6f3c8 100644 --- a/mobile/lib/presentation/pages/drift_album.page.dart +++ b/mobile/lib/presentation/pages/drift_album.page.dart @@ -53,7 +53,7 @@ class _DriftAlbumsPageState extends ConsumerState { ), AlbumSelector( onAlbumSelected: (album) { - context.router.push(RemoteAlbumRoute(album: album)); + unawaited(context.router.push(RemoteAlbumRoute(album: album))); }, ), ], diff --git a/mobile/lib/presentation/pages/drift_album_options.page.dart b/mobile/lib/presentation/pages/drift_album_options.page.dart index 1a516426b5..078b9cc325 100644 --- a/mobile/lib/presentation/pages/drift_album_options.page.dart +++ b/mobile/lib/presentation/pages/drift_album_options.page.dart @@ -10,7 +10,7 @@ import 'package:immich_mobile/domain/models/album/album.model.dart'; import 'package:immich_mobile/domain/models/user.model.dart'; import 'package:immich_mobile/extensions/build_context_extensions.dart'; import 'package:immich_mobile/extensions/theme_extensions.dart'; -import 'package:immich_mobile/extensions/translate_extensions.dart'; +import 'package:immich_mobile/generated/translations.g.dart'; import 'package:immich_mobile/presentation/pages/drift_user_selection.page.dart'; import 'package:immich_mobile/providers/auth.provider.dart'; import 'package:immich_mobile/providers/infrastructure/album.provider.dart'; @@ -32,27 +32,33 @@ class DriftAlbumOptionsPage extends HookConsumerWidget { final userId = ref.watch(authProvider).userId; final activityEnabled = useState(album.isActivityEnabled); final isOwner = album.ownerId == userId; + final owner = isOwner ? ref.watch(currentUserProvider) : null; + final allUsers = isOwner ? null : ref.watch(driftUsersProvider); void showErrorMessage() { ContextHelper(context).pop(); ImmichToast.show( context: context, - msg: "shared_album_section_people_action_error".t(context: context), + msg: context.t.shared_album_section_people_action_error, toastType: ToastType.error, gravity: ToastGravity.BOTTOM, ); } - void leaveAlbum() async { + Future leaveAlbum() async { try { await ref.read(remoteAlbumProvider.notifier).leaveAlbum(album.id, userId: userId); + if (!context.mounted) { + return; + } + unawaited(context.navigateTo(const DriftAlbumsRoute())); } catch (_) { showErrorMessage(); } } - void removeUserFromAlbum(UserDto user) async { + Future removeUserFromAlbum(UserDto user) async { try { await ref.read(remoteAlbumProvider.notifier).removeUser(album.id, user.id); ref.invalidate(remoteAlbumSharedUsersProvider(album.id)); @@ -71,23 +77,27 @@ class DriftAlbumOptionsPage extends HookConsumerWidget { } try { - await ref.read(remoteAlbumProvider.notifier).addUsers(album.id, newUsers); - - if (newUsers.isNotEmpty) { - ImmichToast.show( - context: context, - msg: "users_added_to_album_count".t(context: context, args: {'count': newUsers.length}), - toastType: ToastType.success, - ); + if (!context.mounted) { + return; } + await ref.read(remoteAlbumProvider.notifier).addUsers(album.id, newUsers); ref.invalidate(remoteAlbumSharedUsersProvider(album.id)); - } catch (e) { + if (!context.mounted) { + return; + } + ImmichToast.show( context: context, - msg: "Failed to add users to album: ${e.toString()}", - toastType: ToastType.error, + msg: context.t.users_added_to_album_count(count: newUsers.length), + toastType: ToastType.success, ); + } catch (e) { + if (!context.mounted) { + return; + } + + ImmichToast.show(context: context, msg: "Failed to add users to album: $e", toastType: ToastType.error); } } @@ -98,7 +108,7 @@ class DriftAlbumOptionsPage extends HookConsumerWidget { actions = [ ListTile( leading: const Icon(Icons.exit_to_app_rounded), - title: const Text("leave_album").t(context: context), + title: Text(context.t.leave_album), onTap: leaveAlbum, ), ]; @@ -108,39 +118,43 @@ class DriftAlbumOptionsPage extends HookConsumerWidget { actions = [ ListTile( leading: const Icon(Icons.person_remove_rounded), - title: const Text("remove_user").t(context: context), + title: Text(context.t.remove_user), onTap: () => removeUserFromAlbum(user), ), ]; } - showModalBottomSheet( - backgroundColor: context.colorScheme.surfaceContainer, - isScrollControlled: false, - context: context, - builder: (context) { - return SafeArea( - child: Padding( - padding: const EdgeInsets.only(top: 24.0), - child: Column(mainAxisSize: MainAxisSize.min, children: [...actions]), - ), - ); - }, + unawaited( + showModalBottomSheet( + backgroundColor: context.colorScheme.surfaceContainer, + isScrollControlled: false, + context: context, + builder: (context) { + return SafeArea( + child: Padding( + padding: const EdgeInsets.only(top: 24.0), + child: Column(mainAxisSize: MainAxisSize.min, children: [...actions]), + ), + ); + }, + ), ); } - buildOwnerInfo() { + Widget buildOwnerInfo() { if (isOwner) { - final owner = ref.watch(currentUserProvider); return ListTile( leading: owner != null ? UserCircleAvatar(user: owner) : const SizedBox(), title: Text(album.ownerName, style: const TextStyle(fontWeight: FontWeight.w500)), subtitle: Text(owner?.email ?? "", style: TextStyle(color: context.colorScheme.onSurfaceSecondary)), - trailing: Text("owner", style: context.textTheme.labelLarge).t(context: context), + trailing: Text(context.t.owner, style: context.textTheme.labelLarge), ); } else { - final usersProvider = ref.watch(driftUsersProvider); - return usersProvider.maybeWhen( + if (allUsers == null) { + return const SizedBox(); + } + + return allUsers.maybeWhen( data: (users) { final user = users.firstWhereOrNull((u) => u.id == album.ownerId); @@ -152,7 +166,7 @@ class DriftAlbumOptionsPage extends HookConsumerWidget { leading: UserCircleAvatar(user: user), title: Text(user.name, style: const TextStyle(fontWeight: FontWeight.w500)), subtitle: Text(user.email, style: TextStyle(color: context.colorScheme.onSurfaceSecondary)), - trailing: Text("owner", style: context.textTheme.labelLarge).t(context: context), + trailing: Text(context.t.owner, style: context.textTheme.labelLarge), ); }, orElse: () => const SizedBox(), @@ -160,7 +174,7 @@ class DriftAlbumOptionsPage extends HookConsumerWidget { } } - buildSharedUsersList() { + Widget buildSharedUsersList() { return sharedUsersAsync.maybeWhen( data: (sharedUsers) => ListView.builder( primary: false, @@ -181,7 +195,7 @@ class DriftAlbumOptionsPage extends HookConsumerWidget { ); } - buildSectionTitle(String text) { + Padding buildSectionTitle(String text) { return Padding( padding: const EdgeInsets.all(16.0), child: Text(text, style: context.textTheme.bodySmall), @@ -197,7 +211,7 @@ class DriftAlbumOptionsPage extends HookConsumerWidget { onPressed: () => context.maybePop(null), ), centerTitle: true, - title: Text("options".t(context: context)), + title: Text(context.t.options), ), body: ListView( children: [ @@ -212,19 +226,19 @@ class DriftAlbumOptionsPage extends HookConsumerWidget { activeThumbColor: activityEnabled.value ? context.primaryColor : context.themeData.disabledColor, dense: true, title: Text( - "comments_and_likes", + context.t.comments_and_likes, style: context.textTheme.titleMedium?.copyWith(fontWeight: FontWeight.w500), - ).t(context: context), + ), subtitle: Text( - "let_others_respond", + context.t.let_others_respond, style: context.textTheme.labelLarge?.copyWith(color: context.colorScheme.onSurfaceSecondary), - ).t(context: context), + ), ), - buildSectionTitle("shared_album_section_people_title".t(context: context)), + buildSectionTitle(context.t.shared_album_section_people_title), if (isOwner) ...[ ListTile( leading: const Icon(Icons.person_add_rounded), - title: Text("invite_people".t(context: context)), + title: Text(context.t.invite_people), onTap: () async => addUsers(), ), const Divider(indent: 16), diff --git a/mobile/lib/presentation/pages/drift_archive.page.dart b/mobile/lib/presentation/pages/drift_archive.page.dart index ee8417bcad..75c05eb070 100644 --- a/mobile/lib/presentation/pages/drift_archive.page.dart +++ b/mobile/lib/presentation/pages/drift_archive.page.dart @@ -1,7 +1,7 @@ import 'package:auto_route/auto_route.dart'; import 'package:flutter/material.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:immich_mobile/extensions/translate_extensions.dart'; +import 'package:immich_mobile/generated/translations.g.dart'; import 'package:immich_mobile/presentation/widgets/bottom_sheet/archive_bottom_sheet.widget.dart'; import 'package:immich_mobile/presentation/widgets/timeline/timeline.widget.dart'; import 'package:immich_mobile/providers/infrastructure/timeline.provider.dart'; @@ -28,10 +28,7 @@ class DriftArchivePage extends StatelessWidget { }), ], child: Timeline( - appBar: MesmerizingSliverAppBar( - title: 'archive'.t(context: context), - icon: Icons.archive_outlined, - ), + appBar: MesmerizingSliverAppBar(title: context.t.archive, icon: Icons.archive_outlined), bottomSheet: const ArchiveBottomSheet(), ), ); diff --git a/mobile/lib/presentation/pages/drift_asset_selection_timeline.page.dart b/mobile/lib/presentation/pages/drift_asset_selection_timeline.page.dart index a12ca4932b..d256cc2220 100644 --- a/mobile/lib/presentation/pages/drift_asset_selection_timeline.page.dart +++ b/mobile/lib/presentation/pages/drift_asset_selection_timeline.page.dart @@ -7,12 +7,12 @@ import 'package:immich_mobile/providers/infrastructure/timeline.provider.dart'; import 'package:immich_mobile/providers/timeline/multiselect.provider.dart'; @RoutePage() -class DriftAssetSelectionTimelinePage extends ConsumerWidget { +class DriftAssetSelectionTimelinePage extends StatelessWidget { final Set lockedSelectionAssets; const DriftAssetSelectionTimelinePage({super.key, this.lockedSelectionAssets = const {}}); @override - Widget build(BuildContext context, WidgetRef ref) { + Widget build(BuildContext context) { return ProviderScope( overrides: [ multiSelectProvider.overrideWith( diff --git a/mobile/lib/presentation/pages/drift_asset_troubleshoot.page.dart b/mobile/lib/presentation/pages/drift_asset_troubleshoot.page.dart index 20021bada1..81d765239b 100644 --- a/mobile/lib/presentation/pages/drift_asset_troubleshoot.page.dart +++ b/mobile/lib/presentation/pages/drift_asset_troubleshoot.page.dart @@ -1,22 +1,24 @@ +import 'dart:async'; + 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/domain/models/asset/base_asset.model.dart'; import 'package:immich_mobile/domain/models/exif.model.dart'; import 'package:immich_mobile/extensions/platform_extensions.dart'; +import 'package:immich_mobile/generated/translations.g.dart'; import 'package:immich_mobile/providers/infrastructure/asset.provider.dart'; @RoutePage() -class AssetTroubleshootPage extends ConsumerWidget { +class AssetTroubleshootPage extends StatelessWidget { final BaseAsset asset; const AssetTroubleshootPage({super.key, required this.asset}); @override - Widget build(BuildContext context, WidgetRef ref) { + Widget build(BuildContext context) { return Scaffold( - appBar: AppBar(title: Text('asset_troubleshoot'.tr())), + appBar: AppBar(title: Text(context.t.asset_troubleshoot)), body: SingleChildScrollView( child: Padding( padding: const EdgeInsets.all(16.0), @@ -27,20 +29,20 @@ class AssetTroubleshootPage extends ConsumerWidget { } } -class _AssetDetailsView extends ConsumerWidget { +class _AssetDetailsView extends StatelessWidget { final BaseAsset asset; const _AssetDetailsView({required this.asset}); @override - Widget build(BuildContext context, WidgetRef ref) { + Widget build(BuildContext context) { return Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ _AssetPropertiesSection(asset: asset), const SizedBox(height: 16), Text( - 'matching_assets'.tr(), + context.t.matching_assets, style: Theme.of(context).textTheme.titleMedium?.copyWith(fontWeight: FontWeight.bold), ), if (asset.checksum != null) ...[ @@ -50,12 +52,12 @@ class _AssetDetailsView extends ConsumerWidget { ] else ...[ _PropertySectionCard( title: 'Local Assets', - properties: [_PropertyItem(label: 'Status', value: 'no_checksum_local'.tr())], + properties: [_PropertyItem(label: 'Status', value: context.t.no_checksum_local)], ), const SizedBox(height: 16), _PropertySectionCard( title: 'Remote Assets', - properties: [_PropertyItem(label: 'Status', value: 'no_checksum_remote'.tr())], + properties: [_PropertyItem(label: 'Status', value: context.t.no_checksum_remote)], ), ], ], @@ -78,11 +80,13 @@ class _AssetPropertiesSectionState extends ConsumerState<_AssetPropertiesSection @override void initState() { super.initState(); - _buildAssetProperties(widget.asset).whenComplete(() { - if (mounted) { - setState(() {}); - } - }); + unawaited( + _buildAssetProperties(widget.asset).whenComplete(() { + if (mounted) { + setState(() {}); + } + }), + ); } @override @@ -114,7 +118,6 @@ class _AssetPropertiesSectionState extends ConsumerState<_AssetPropertiesSection _PropertyItem(label: 'Height', value: asset.height?.toString()), _PropertyItem(label: 'Duration', value: asset.durationMs != null ? '${asset.durationMs} ms' : null), _PropertyItem(label: 'Is Favorite', value: asset.isFavorite.toString()), - _PropertyItem(label: 'Live Photo Video ID', value: asset.livePhotoVideoId), _PropertyItem(label: 'Is Edited', value: asset.isEdited.toString()), ]); } @@ -151,6 +154,7 @@ class _AssetPropertiesSectionState extends ConsumerState<_AssetPropertiesSection _PropertyItem(label: 'Thumb Hash', value: asset.thumbHash), _PropertyItem(label: 'Visibility', value: asset.visibility.toString()), _PropertyItem(label: 'Stack ID', value: asset.stackId), + _PropertyItem(label: 'Live Photo Video ID', value: asset.livePhotoVideoId), ]; properties.insertAll(4, additionalProps); @@ -239,7 +243,7 @@ class _LocalAssetsSection extends ConsumerWidget { if (localAssets.isEmpty) { return _PropertySectionCard( title: 'Local Assets', - properties: [_PropertyItem(label: 'Status', value: 'no_local_assets_found'.tr())], + properties: [_PropertyItem(label: 'Status', value: context.t.no_local_assets_found)], ); } @@ -276,8 +280,8 @@ class _RemoteAssetSection extends ConsumerWidget { return const SizedBox.shrink(); } - return FutureBuilder( - future: assetService.getRemoteAssetByChecksum(asset.checksum!), + return FutureBuilder>( + future: assetService.getAllRemoteAssetDebugByChecksum(asset.checksum!), builder: (context, snapshot) { if (snapshot.connectionState == ConnectionState.waiting) { return const _PropertySectionCard( @@ -293,12 +297,12 @@ class _RemoteAssetSection extends ConsumerWidget { ); } - final remoteAsset = snapshot.data; + final remoteAsset = snapshot.data?.firstOrNull; if (remoteAsset == null) { return _PropertySectionCard( title: 'Remote Assets', - properties: [_PropertyItem(label: 'Status', value: 'no_remote_assets_found'.tr())], + properties: [_PropertyItem(label: 'Status', value: context.t.no_remote_assets_found)], ); } @@ -352,7 +356,7 @@ class _PropertyItem extends StatelessWidget { ), Expanded( child: Text( - value ?? 'not_available'.tr(), + value ?? context.t.not_available, style: TextStyle(color: Theme.of(context).colorScheme.secondary), ), ), diff --git a/mobile/lib/presentation/pages/drift_create_album.page.dart b/mobile/lib/presentation/pages/drift_create_album.page.dart index a664f46206..f536b5b60f 100644 --- a/mobile/lib/presentation/pages/drift_create_album.page.dart +++ b/mobile/lib/presentation/pages/drift_create_album.page.dart @@ -5,7 +5,7 @@ import 'package:flutter/material.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; import 'package:immich_mobile/domain/models/asset/base_asset.model.dart'; import 'package:immich_mobile/extensions/build_context_extensions.dart'; -import 'package:immich_mobile/extensions/translate_extensions.dart'; +import 'package:immich_mobile/generated/translations.g.dart'; import 'package:immich_mobile/presentation/widgets/images/thumbnail.widget.dart'; import 'package:immich_mobile/providers/infrastructure/album.provider.dart'; import 'package:immich_mobile/routing/router.dart'; @@ -26,6 +26,7 @@ class _DriftCreateAlbumPageState extends ConsumerState { FocusNode albumTitleTextFieldFocusNode = FocusNode(); FocusNode albumDescriptionTextFieldFocusNode = FocusNode(); bool isAlbumTitleTextFieldFocus = false; + bool isCreatingAlbum = false; Set selectedAssets = {}; @override @@ -48,12 +49,10 @@ class _DriftCreateAlbumPageState extends ConsumerState { super.dispose(); } - bool get _canCreateAlbum => albumTitleController.text.trim().isNotEmpty; + bool get _canCreateAlbum => albumTitleController.text.trim().isNotEmpty && !isCreatingAlbum; String _getEffectiveTitle() { - return albumTitleController.text.isNotEmpty - ? albumTitleController.text - : 'create_album_page_untitled'.t(context: context); + return albumTitleController.text.isNotEmpty ? albumTitleController.text : context.t.create_album_page_untitled; } Widget _buildSliverAppBar() { @@ -92,7 +91,7 @@ class _DriftCreateAlbumPageState extends ConsumerState { Widget _buildEmptyState() { return Padding( padding: const EdgeInsets.only(top: 0, left: 18), - child: Text('create_shared_album_page_share_add_assets', style: context.textTheme.labelLarge).t(), + child: Text(context.t.create_shared_album_page_share_add_assets, style: context.textTheme.labelLarge), ); } @@ -111,9 +110,9 @@ class _DriftCreateAlbumPageState extends ConsumerState { label: Padding( padding: const EdgeInsets.only(left: 8.0), child: Text( - 'create_shared_album_page_share_select_photos', + context.t.create_shared_album_page_share_select_photos, style: context.textTheme.titleMedium?.copyWith(fontWeight: FontWeight.w600, color: context.primaryColor), - ).t(), + ), ), ), ); @@ -147,7 +146,7 @@ class _DriftCreateAlbumPageState extends ConsumerState { }); if (albumTitleController.text.isEmpty) { - final untitledText = 'create_album_page_untitled'.t(); + final untitledText = context.t.create_album_page_untitled; albumTitleController.text = untitledText; } } @@ -167,7 +166,12 @@ class _DriftCreateAlbumPageState extends ConsumerState { } Future createAlbum() async { + if (isCreatingAlbum) { + return; + } + onBackgroundTapped(); + setState(() => isCreatingAlbum = true); final title = _getEffectiveTitle().trim(); @@ -180,12 +184,20 @@ class _DriftCreateAlbumPageState extends ConsumerState { assets: selectedAssets, ); - if (album != null && context.mounted) { - unawaited(context.replaceRoute(RemoteAlbumRoute(album: album))); + if (!mounted || album == null) { + return; } + + unawaited(context.replaceRoute(RemoteAlbumRoute(album: album))); } catch (_) { - if (context.mounted) { - ImmichToast.show(context: context, toastType: ToastType.error, msg: 'errors.failed_to_create_album'.t()); + if (!mounted) { + return; + } + + ImmichToast.show(context: context, toastType: ToastType.error, msg: context.t.errors.failed_to_create_album); + } finally { + if (mounted) { + setState(() => isCreatingAlbum = false); } } } @@ -227,7 +239,7 @@ class _DriftCreateAlbumPageState extends ConsumerState { AlbumActionFilledButton( iconData: Icons.add_photo_alternate_outlined, onPressed: onSelectPhotos, - labelText: "add_photos".t(), + labelText: context.t.add_photos, ), ], ), @@ -243,12 +255,12 @@ class _DriftCreateAlbumPageState extends ConsumerState { centerTitle: false, backgroundColor: context.scaffoldBackgroundColor, leading: IconButton(onPressed: () => context.maybePop(), icon: const Icon(Icons.close_rounded)), - title: const Text('create_album').t(), + title: Text(context.t.create_album), actions: [ TextButton( onPressed: _canCreateAlbum ? createAlbum : null, child: Text( - 'create'.t(), + context.t.create, style: TextStyle( fontWeight: FontWeight.bold, color: _canCreateAlbum ? context.primaryColor : context.themeData.disabledColor, @@ -306,7 +318,7 @@ class _AlbumTitleTextFieldState extends State<_AlbumTitleTextField> { style: TextStyle(fontSize: 28.0, color: context.colorScheme.onSurface, fontWeight: FontWeight.bold), controller: widget.textController, onTap: () { - if (widget.textController.text == 'create_album_page_untitled'.t(context: context)) { + if (widget.textController.text == context.t.create_album_page_untitled) { widget.textController.clear(); } }, @@ -329,7 +341,7 @@ class _AlbumTitleTextFieldState extends State<_AlbumTitleTextField> { borderSide: BorderSide(color: context.primaryColor.withValues(alpha: 0.3)), borderRadius: const BorderRadius.all(Radius.circular(16.0)), ), - hintText: 'add_a_title'.t(), + hintText: context.t.add_a_title, hintStyle: context.themeData.inputDecorationTheme.hintStyle?.copyWith( fontSize: 28.0, fontWeight: FontWeight.bold, @@ -416,7 +428,7 @@ class _AlbumViewerEditableDescriptionState extends State<_AlbumViewerEditableDes focusColor: Colors.grey[300], fillColor: context.scaffoldBackgroundColor, filled: widget.focusNode.hasFocus, - hintText: 'add_a_description'.t(), + hintText: context.t.add_a_description, ), ), ); diff --git a/mobile/lib/presentation/pages/drift_favorite.page.dart b/mobile/lib/presentation/pages/drift_favorite.page.dart index 2bc3f26363..dd4384906b 100644 --- a/mobile/lib/presentation/pages/drift_favorite.page.dart +++ b/mobile/lib/presentation/pages/drift_favorite.page.dart @@ -1,7 +1,7 @@ import 'package:auto_route/auto_route.dart'; import 'package:flutter/material.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:immich_mobile/extensions/translate_extensions.dart'; +import 'package:immich_mobile/generated/translations.g.dart'; import 'package:immich_mobile/presentation/widgets/bottom_sheet/favorite_bottom_sheet.widget.dart'; import 'package:immich_mobile/presentation/widgets/timeline/timeline.widget.dart'; import 'package:immich_mobile/providers/infrastructure/timeline.provider.dart'; @@ -28,10 +28,7 @@ class DriftFavoritePage extends StatelessWidget { }), ], child: Timeline( - appBar: MesmerizingSliverAppBar( - title: 'favorites'.t(context: context), - icon: Icons.favorite_outline, - ), + appBar: MesmerizingSliverAppBar(title: context.t.favorites, icon: Icons.favorite_outline), bottomSheet: const FavoriteBottomSheet(), ), ); diff --git a/mobile/lib/presentation/pages/drift_library.page.dart b/mobile/lib/presentation/pages/drift_library.page.dart index 673df089d5..137f46659f 100644 --- a/mobile/lib/presentation/pages/drift_library.page.dart +++ b/mobile/lib/presentation/pages/drift_library.page.dart @@ -1,11 +1,10 @@ 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/domain/models/user.model.dart'; import 'package:immich_mobile/extensions/asyncvalue_extensions.dart'; import 'package:immich_mobile/extensions/build_context_extensions.dart'; -import 'package:immich_mobile/extensions/translate_extensions.dart'; +import 'package:immich_mobile/generated/translations.g.dart'; import 'package:immich_mobile/presentation/widgets/images/local_album_thumbnail.widget.dart'; import 'package:immich_mobile/presentation/widgets/images/remote_image_provider.dart'; import 'package:immich_mobile/presentation/widgets/people/partner_user_avatar.widget.dart'; @@ -21,11 +20,11 @@ import 'package:immich_mobile/widgets/map/map_thumbnail.dart'; import 'package:maplibre_gl/maplibre_gl.dart'; @RoutePage() -class DriftLibraryPage extends ConsumerWidget { +class DriftLibraryPage extends StatelessWidget { const DriftLibraryPage({super.key}); @override - Widget build(BuildContext context, WidgetRef ref) { + Widget build(BuildContext context) { return const Scaffold( body: CustomScrollView( slivers: [ @@ -56,13 +55,13 @@ class _ActionButtonGrid extends ConsumerWidget { _ActionButton( icon: Icons.favorite_outline_rounded, onTap: () => context.pushRoute(const DriftFavoriteRoute()), - label: 'favorites'.t(context: context), + label: context.t.favorites, ), const SizedBox(width: 8), _ActionButton( icon: Icons.archive_outlined, onTap: () => context.pushRoute(const DriftArchiveRoute()), - label: 'archived'.t(context: context), + label: context.t.archived, ), ], ), @@ -72,14 +71,14 @@ class _ActionButtonGrid extends ConsumerWidget { _ActionButton( icon: Icons.link_outlined, onTap: () => context.pushRoute(const SharedLinkRoute()), - label: 'shared_links'.t(context: context), + label: context.t.shared_links, ), isTrashEnable ? const SizedBox(width: 8) : const SizedBox.shrink(), isTrashEnable ? _ActionButton( icon: Icons.delete_outline_rounded, onTap: () => context.pushRoute(const DriftTrashRoute()), - label: 'trash'.t(context: context), + label: context.t.trash, ) : const SizedBox.shrink(), ], @@ -146,7 +145,7 @@ class _PeopleCollectionCard extends ConsumerWidget { @override Widget build(BuildContext context, WidgetRef ref) { - final people = ref.watch(driftGetAllPeopleProvider); + final people = ref.watch(getAllPeopleProvider); return LayoutBuilder( builder: (context, constraints) { @@ -180,7 +179,11 @@ class _PeopleCollectionCard extends ConsumerWidget { mainAxisSpacing: 8, physics: const NeverScrollableScrollPhysics(), children: people.take(4).map((person) { - return CircleAvatar(backgroundImage: RemoteImageProvider(url: getFaceThumbnailUrl(person.id))); + return CircleAvatar( + backgroundImage: RemoteImageProvider( + url: getFaceThumbnailUrl(person.id, updatedAt: person.updatedAt), + ), + ); }).toList(), ); }, @@ -189,7 +192,7 @@ class _PeopleCollectionCard extends ConsumerWidget { Padding( padding: const EdgeInsets.all(8.0), child: Text( - 'people'.t(context: context), + context.t.people, style: context.textTheme.titleSmall?.copyWith( color: context.colorScheme.onSurface, fontWeight: FontWeight.w500, @@ -241,7 +244,7 @@ class _PlacesCollectionCard extends StatelessWidget { Padding( padding: const EdgeInsets.all(8.0), child: Text( - 'places'.t(), + context.t.places, style: context.textTheme.titleSmall?.copyWith( color: context.colorScheme.onSurface, fontWeight: FontWeight.w500, @@ -299,9 +302,7 @@ class _LocalAlbumsCollectionCard extends ConsumerWidget { }).toList(); }, error: (error, _) { - return [ - Center(child: Text('error_saving_image'.tr(args: [error.toString()]))), - ]; + return [Center(child: Text(context.t.error_saving_image(error: error.toString())))]; }, loading: () { return [const Center(child: CircularProgressIndicator())]; @@ -313,7 +314,7 @@ class _LocalAlbumsCollectionCard extends ConsumerWidget { Padding( padding: const EdgeInsets.all(8.0), child: Text( - 'on_this_device'.t(context: context), + context.t.on_this_device, style: context.textTheme.titleSmall?.copyWith( color: context.colorScheme.onSurface, fontWeight: FontWeight.w500, @@ -350,7 +351,7 @@ class _QuickAccessButtonList extends ConsumerWidget { return SliverPadding( padding: const EdgeInsets.only(left: 16, top: 12, right: 16, bottom: 32), sliver: SliverToBoxAdapter( - child: Container( + child: DecoratedBox( decoration: BoxDecoration( border: Border.all(color: context.colorScheme.onSurface.withAlpha(10), width: 1), borderRadius: const BorderRadius.all(Radius.circular(20)), @@ -366,7 +367,7 @@ class _QuickAccessButtonList extends ConsumerWidget { ), child: ListView( shrinkWrap: true, - padding: const EdgeInsets.all(0), + padding: EdgeInsets.zero, physics: const NeverScrollableScrollPhysics(), children: [ ListTile( @@ -380,7 +381,7 @@ class _QuickAccessButtonList extends ConsumerWidget { ), leading: const Icon(Icons.folder_outlined, size: 26), title: Text( - 'folders'.t(context: context), + context.t.folders, style: context.textTheme.titleSmall?.copyWith(fontWeight: FontWeight.w500), ), onTap: () => context.pushRoute(FolderRoute()), @@ -388,7 +389,7 @@ class _QuickAccessButtonList extends ConsumerWidget { ListTile( leading: const Icon(Icons.lock_outline_rounded, size: 26), title: Text( - 'locked_folder'.t(context: context), + context.t.locked_folder, style: context.textTheme.titleSmall?.copyWith(fontWeight: FontWeight.w500), ), onTap: () => context.pushRoute(const DriftLockedFolderRoute()), @@ -396,7 +397,7 @@ class _QuickAccessButtonList extends ConsumerWidget { ListTile( leading: const Icon(Icons.group_outlined, size: 26), title: Text( - 'partners'.t(context: context), + context.t.partners, style: context.textTheme.titleSmall?.copyWith(fontWeight: FontWeight.w500), ), onTap: () => context.pushRoute(const PartnerRoute()), @@ -418,7 +419,7 @@ class _PartnerList extends StatelessWidget { @override Widget build(BuildContext context) { return ListView.builder( - padding: const EdgeInsets.all(0), + padding: EdgeInsets.zero, physics: const NeverScrollableScrollPhysics(), itemCount: partners.length, shrinkWrap: true, @@ -434,10 +435,10 @@ class _PartnerList extends StatelessWidget { ), contentPadding: const EdgeInsets.only(left: 12.0, right: 18.0), leading: PartnerUserAvatar(userId: partner.id, name: partner.name), - title: const Text( - "partner_list_user_photos", - style: TextStyle(fontWeight: FontWeight.w500), - ).t(context: context, args: {'user': partner.name}), + title: Text( + context.t.partner_list_user_photos(user: partner.name), + style: const TextStyle(fontWeight: FontWeight.w500), + ), onTap: () => context.pushRoute(DriftPartnerDetailRoute(partner: partner)), ); }, diff --git a/mobile/lib/presentation/pages/drift_local_album.page.dart b/mobile/lib/presentation/pages/drift_local_album.page.dart index 6b133f7a6f..71707688da 100644 --- a/mobile/lib/presentation/pages/drift_local_album.page.dart +++ b/mobile/lib/presentation/pages/drift_local_album.page.dart @@ -1,10 +1,9 @@ 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/extensions/build_context_extensions.dart'; import 'package:immich_mobile/extensions/theme_extensions.dart'; -import 'package:immich_mobile/extensions/translate_extensions.dart'; +import 'package:immich_mobile/generated/translations.g.dart'; import 'package:immich_mobile/pages/common/large_leading_tile.dart'; import 'package:immich_mobile/presentation/widgets/images/local_album_thumbnail.widget.dart'; import 'package:immich_mobile/providers/infrastructure/album.provider.dart'; @@ -49,7 +48,7 @@ class _AlbumList extends ConsumerWidget { if (albums.isEmpty) { return SliverToBoxAdapter( child: Center( - child: Padding(padding: const EdgeInsets.all(20.0), child: Text('no_albums_yet'.tr())), + child: Padding(padding: const EdgeInsets.all(20.0), child: Text(context.t.no_albums_yet)), ), ); } @@ -67,7 +66,7 @@ class _AlbumList extends ConsumerWidget { leading: SizedBox(width: 80, height: 80, child: LocalAlbumThumbnail(albumId: album.id)), title: Text(album.name, style: context.textTheme.titleSmall?.copyWith(fontWeight: FontWeight.w600)), subtitle: Text( - 'items_count'.t(context: context, args: {'count': album.assetCount}), + context.t.items_count(count: album.assetCount), style: context.textTheme.bodyMedium?.copyWith(color: context.colorScheme.onSurfaceSecondary), ), onTap: () => context.pushRoute(LocalTimelineRoute(album: album)), diff --git a/mobile/lib/presentation/pages/drift_locked_folder.page.dart b/mobile/lib/presentation/pages/drift_locked_folder.page.dart index 9849558c94..6ebe7283d3 100644 --- a/mobile/lib/presentation/pages/drift_locked_folder.page.dart +++ b/mobile/lib/presentation/pages/drift_locked_folder.page.dart @@ -1,7 +1,9 @@ +import 'dart:async'; + import 'package:auto_route/auto_route.dart'; import 'package:flutter/widgets.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:immich_mobile/extensions/translate_extensions.dart'; +import 'package:immich_mobile/generated/translations.g.dart'; import 'package:immich_mobile/presentation/widgets/bottom_sheet/locked_folder_bottom_sheet.widget.dart'; import 'package:immich_mobile/presentation/widgets/timeline/timeline.widget.dart'; import 'package:immich_mobile/providers/auth.provider.dart'; @@ -39,8 +41,8 @@ class _DriftLockedFolderPageState extends ConsumerState w return; } if (state == AppLifecycleState.paused) { - ref.read(authProvider.notifier).lockPinCode(); - context.navigateTo(const TabShellRoute()); + unawaited(ref.read(authProvider.notifier).lockPinCode()); + unawaited(context.navigateTo(const TabShellRoute())); return; } setState(() { @@ -68,7 +70,7 @@ class _DriftLockedFolderPageState extends ConsumerState w : PopScope( onPopInvokedWithResult: (didPop, _) => didPop ? ref.read(authProvider.notifier).lockPinCode() : null, child: Timeline( - appBar: MesmerizingSliverAppBar(title: 'locked_folder'.t(context: context)), + appBar: MesmerizingSliverAppBar(title: context.t.locked_folder), bottomSheet: const LockedFolderBottomSheet(), ), ), diff --git a/mobile/lib/presentation/pages/drift_map.page.dart b/mobile/lib/presentation/pages/drift_map.page.dart index 97062b88ab..d36ccc350c 100644 --- a/mobile/lib/presentation/pages/drift_map.page.dart +++ b/mobile/lib/presentation/pages/drift_map.page.dart @@ -1,3 +1,5 @@ +import 'dart:async'; + import 'package:auto_route/auto_route.dart'; import 'package:flutter/material.dart'; import 'package:immich_mobile/extensions/build_context_extensions.dart'; @@ -11,8 +13,8 @@ class DriftMapPage extends StatelessWidget { const DriftMapPage({super.key, this.initialLocation}); - void onSettingsPressed(BuildContext context) { - showModalBottomSheet( + Future onSettingsPressed(BuildContext context) { + return showModalBottomSheet( elevation: 0.0, showDragHandle: true, isScrollControlled: true, diff --git a/mobile/lib/presentation/pages/drift_memory.page.dart b/mobile/lib/presentation/pages/drift_memory.page.dart index f601bf8419..3ad7d90657 100644 --- a/mobile/lib/presentation/pages/drift_memory.page.dart +++ b/mobile/lib/presentation/pages/drift_memory.page.dart @@ -1,3 +1,5 @@ +import 'dart:async'; + import 'package:auto_route/auto_route.dart'; import 'package:flutter/material.dart'; import 'package:flutter/scheduler.dart'; @@ -6,11 +8,11 @@ import 'package:flutter_hooks/flutter_hooks.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; import 'package:immich_mobile/domain/models/asset/base_asset.model.dart'; import 'package:immich_mobile/domain/models/memory.model.dart'; -import 'package:immich_mobile/extensions/translate_extensions.dart'; -import 'package:immich_mobile/providers/asset_viewer/asset_viewer.provider.dart'; +import 'package:immich_mobile/generated/translations.g.dart'; import 'package:immich_mobile/presentation/widgets/images/image_provider.dart'; import 'package:immich_mobile/presentation/widgets/memory/memory_bottom_info.widget.dart'; import 'package:immich_mobile/presentation/widgets/memory/memory_card.widget.dart'; +import 'package:immich_mobile/providers/asset_viewer/asset_viewer.provider.dart'; import 'package:immich_mobile/providers/haptic_feedback.provider.dart'; import 'package:immich_mobile/utils/system_ui.utils.dart'; import 'package:immich_mobile/widgets/memories/memory_epilogue.dart'; @@ -47,21 +49,21 @@ class DriftMemoryPage extends HookConsumerWidget { useEffect(() { // Memories is an immersive activity - SystemChrome.setEnabledSystemUIMode(SystemUiMode.immersive); + unawaited(SystemChrome.setEnabledSystemUIMode(SystemUiMode.immersive)); return () { // Clean up to normal edge to edge when we are done - restoreEdgeToEdge(); + unawaited(restoreEdgeToEdge()); }; }); - toNextMemory() { - memoryPageController.nextPage(duration: const Duration(milliseconds: 500), curve: Curves.easeIn); + void toNextMemory() { + unawaited(memoryPageController.nextPage(duration: const Duration(milliseconds: 500), curve: Curves.easeIn)); } void toPreviousMemory() { if (currentMemoryIndex.value > 0) { // Move to the previous memory page - memoryPageController.previousPage(duration: const Duration(milliseconds: 500), curve: Curves.easeIn); + unawaited(memoryPageController.previousPage(duration: const Duration(milliseconds: 500), curve: Curves.easeIn)); // Wait for the next frame to ensure the page is built SchedulerBinding.instance.addPostFrameCallback((_) { @@ -83,36 +85,36 @@ class DriftMemoryPage extends HookConsumerWidget { } } - toNextAsset(int currentAssetIndex) { + void toNextAsset(int currentAssetIndex) { if (currentAssetIndex + 1 < currentMemory.value.assets.length) { // Go to the next asset - PageController controller = memoryAssetPageControllers[currentMemoryIndex.value]; + final PageController controller = memoryAssetPageControllers[currentMemoryIndex.value]; - controller.nextPage(curve: Curves.easeInOut, duration: const Duration(milliseconds: 500)); + unawaited(controller.nextPage(curve: Curves.easeInOut, duration: const Duration(milliseconds: 500))); } else { // Go to the next memory since we are at the end of our assets toNextMemory(); } } - toPreviousAsset(int currentAssetIndex) { + void toPreviousAsset(int currentAssetIndex) { if (currentAssetIndex > 0) { // Go to the previous asset - PageController controller = memoryAssetPageControllers[currentMemoryIndex.value]; + final PageController controller = memoryAssetPageControllers[currentMemoryIndex.value]; - controller.previousPage(curve: Curves.easeInOut, duration: const Duration(milliseconds: 500)); + unawaited(controller.previousPage(curve: Curves.easeInOut, duration: const Duration(milliseconds: 500))); } else { // Go to the previous memory since we are at the end of our assets toPreviousMemory(); } } - updateProgressText() { + void updateProgressText() { assetProgress.value = "${currentAssetPage.value + 1}|${currentMemory.value.assets.length}"; } /// Downloads and caches the image for the asset at this [currentMemory]'s index - precacheAsset(int index) async { + Future precacheAsset(int index) async { // Guard index out of range if (index < 0) { return; @@ -153,7 +155,7 @@ class DriftMemoryPage extends HookConsumerWidget { // Precache the next page right away if we are on the first page if (currentAssetPage.value == 0) { - Future.delayed(const Duration(milliseconds: 200)).then((_) => precacheAsset(1)); + unawaited(Future.delayed(const Duration(milliseconds: 200)).then((_) => precacheAsset(1))); } Future onAssetChanged(int otherIndex) async { @@ -198,7 +200,7 @@ class DriftMemoryPage extends HookConsumerWidget { final offset = notification.metrics.pixels; if (isEpiloguePage && (offset > notification.metrics.maxScrollExtent + 150)) { - context.maybePop(); + unawaited(context.maybePop()); return true; } } @@ -246,7 +248,7 @@ class DriftMemoryPage extends HookConsumerWidget { } final yearsAgo = DateTime.now().year - memories[mIndex].data.year; - final title = 'years_ago'.t(context: context, args: {'years': yearsAgo.toString()}); + final title = context.t.years_ago(years: yearsAgo); // Build horizontal page final assetController = memoryAssetPageControllers[mIndex]; return Column( @@ -281,7 +283,7 @@ class DriftMemoryPage extends HookConsumerWidget { final asset = memories[mIndex].assets[index]; return Stack( children: [ - Container( + ColoredBox( color: Colors.black, child: DriftMemoryCard( asset: asset, @@ -328,8 +330,8 @@ class DriftMemoryPage extends HookConsumerWidget { // auto_route doesn't invoke pop scope, so // turn off full screen mode here // https://github.com/Milad-Akarie/auto_route_library/issues/1799 - context.maybePop(); - restoreEdgeToEdge(); + unawaited(context.maybePop()); + unawaited(restoreEdgeToEdge()); }, shape: const CircleBorder(), color: Colors.white.withValues(alpha: 0.2), diff --git a/mobile/lib/presentation/pages/drift_partner_detail.page.dart b/mobile/lib/presentation/pages/drift_partner_detail.page.dart index 7df96cf78e..70de434d9f 100644 --- a/mobile/lib/presentation/pages/drift_partner_detail.page.dart +++ b/mobile/lib/presentation/pages/drift_partner_detail.page.dart @@ -56,7 +56,7 @@ class _InfoBoxState extends ConsumerState<_InfoBox> { _inTimeline = widget.partner.inTimeline; } - _toggleInTimeline() async { + Future _toggleInTimeline() async { final user = ref.read(currentUserProvider); if (user == null) { return; @@ -72,13 +72,16 @@ class _InfoBoxState extends ConsumerState<_InfoBox> { }); } catch (error, stack) { dPrint(() => "Failed to toggle in timeline: $error $stack"); + if (!mounted) { + return; + } + ImmichToast.show( context: context, toastType: ToastType.error, durationInSecond: 1, msg: "Failed to toggle the timeline setting", ); - return; } } @@ -89,7 +92,7 @@ class _InfoBoxState extends ConsumerState<_InfoBox> { height: 110, child: Padding( padding: const EdgeInsets.only(left: 8.0, right: 8.0, top: 16.0), - child: Container( + child: DecoratedBox( decoration: BoxDecoration( border: Border.all(color: context.colorScheme.onSurface.withAlpha(10), width: 1), borderRadius: const BorderRadius.all(Radius.circular(20)), diff --git a/mobile/lib/presentation/pages/drift_people_collection.page.dart b/mobile/lib/presentation/pages/drift_people_collection.page.dart index 26aa2e62ab..92f1ff79ca 100644 --- a/mobile/lib/presentation/pages/drift_people_collection.page.dart +++ b/mobile/lib/presentation/pages/drift_people_collection.page.dart @@ -1,11 +1,14 @@ +import 'dart:async'; + 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/domain/models/person.model.dart'; import 'package:immich_mobile/extensions/build_context_extensions.dart'; import 'package:immich_mobile/extensions/string_extensions.dart'; -import 'package:immich_mobile/providers/infrastructure/people.provider.dart'; +import 'package:immich_mobile/generated/translations.g.dart'; import 'package:immich_mobile/presentation/widgets/images/remote_image_provider.dart'; +import 'package:immich_mobile/providers/infrastructure/people.provider.dart'; import 'package:immich_mobile/routing/router.dart'; import 'package:immich_mobile/utils/image_url_builder.dart'; import 'package:immich_mobile/utils/people.utils.dart'; @@ -31,7 +34,7 @@ class _DriftPeopleCollectionPageState extends ConsumerState _formFocus.unfocus(), onChanged: (value) => setState(() => _search = value), filled: true, - hintText: 'filter_people'.tr(), + hintText: context.t.filter_people, autofocus: true, ) - : Text('people'.tr()), + : Text(context.t.people), actions: [ IconButton( icon: Icon(_search != null ? Icons.close : Icons.search), @@ -63,12 +66,15 @@ class _DriftPeopleCollectionPageState extends ConsumerState filtered; if (_search != null) { - people = people.where((person) { + filtered = people.where((person) { return person.name.toLowerCase().removeDiacritics().contains( _search!.toLowerCase().removeDiacritics(), ); }).toList(); + } else { + filtered = people; } return GridView.builder( gridDelegate: SliverGridDelegateWithFixedCrossAxisCount( @@ -77,16 +83,16 @@ class _DriftPeopleCollectionPageState extends ConsumerState showNameEditModal(context, person), child: person.name.isEmpty ? Text( - 'add_a_name'.tr(), + context.t.add_a_name, style: context.textTheme.titleSmall?.copyWith( fontWeight: FontWeight.w500, color: context.colorScheme.primary, diff --git a/mobile/lib/presentation/pages/drift_person.page.dart b/mobile/lib/presentation/pages/drift_person.page.dart index 3430dd1abd..cad3b7b6a6 100644 --- a/mobile/lib/presentation/pages/drift_person.page.dart +++ b/mobile/lib/presentation/pages/drift_person.page.dart @@ -1,3 +1,5 @@ +import 'dart:async'; + import 'package:auto_route/auto_route.dart'; import 'package:flutter/material.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; @@ -12,7 +14,7 @@ import 'package:immich_mobile/widgets/common/person_sliver_app_bar.dart'; @RoutePage() class DriftPersonPage extends ConsumerStatefulWidget { - final DriftPerson person; + final Person person; const DriftPersonPage({super.key, required this.person}); @@ -21,10 +23,10 @@ class DriftPersonPage extends ConsumerStatefulWidget { } class _DriftPersonPageState extends ConsumerState { - late DriftPerson _person; + late Person _person; @override - initState() { + void initState() { super.initState(); _person = widget.person; } @@ -49,8 +51,8 @@ class _DriftPersonPageState extends ConsumerState { } } - void showOptionSheet(BuildContext context) { - showModalBottomSheet( + Future showOptionSheet(BuildContext context) { + return showModalBottomSheet( context: context, backgroundColor: context.colorScheme.surface, isScrollControlled: false, diff --git a/mobile/lib/presentation/pages/drift_place.page.dart b/mobile/lib/presentation/pages/drift_place.page.dart index 10b9ca7ae4..0d33f2ab29 100644 --- a/mobile/lib/presentation/pages/drift_place.page.dart +++ b/mobile/lib/presentation/pages/drift_place.page.dart @@ -3,7 +3,7 @@ import 'package:flutter/material.dart'; import 'package:flutter_hooks/flutter_hooks.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; import 'package:immich_mobile/extensions/build_context_extensions.dart'; -import 'package:immich_mobile/extensions/translate_extensions.dart'; +import 'package:immich_mobile/generated/translations.g.dart'; import 'package:immich_mobile/pages/common/large_leading_tile.dart'; import 'package:immich_mobile/presentation/widgets/images/thumbnail.widget.dart'; import 'package:immich_mobile/providers/infrastructure/asset.provider.dart'; @@ -62,10 +62,10 @@ class _PlaceSliverAppBar extends HookWidget { onTapOutside: (_) => searchFocusNode.unfocus(), onChanged: (value) => search.value = value, filled: true, - hintText: 'filter_places'.t(context: context), + hintText: context.t.filter_places, autofocus: true, ) - : Text('places'.t(context: context)), + : Text(context.t.places), actions: [ IconButton( icon: Icon(search.value != null ? Icons.close : Icons.search), @@ -94,7 +94,7 @@ class _Map extends StatelessWidget { height: 200, width: context.width, child: MapThumbnail( - onTap: (_, __) => context.pushRoute(DriftMapRoute(initialLocation: currentLocation)), + onTap: (_, _) => context.pushRoute(DriftMapRoute(initialLocation: currentLocation)), zoom: 8, centre: currentLocation ?? const LatLng(21.44950, -157.91959), showAttribution: false, @@ -134,16 +134,19 @@ class _PlaceList extends ConsumerWidget { ), ), data: (places) { + final List<(String, String)> filtered; if (search.value != null) { - places = places.where((place) { + filtered = places.where((place) { return place.$1.toLowerCase().contains(search.value!.toLowerCase()); }).toList(); + } else { + filtered = places; } return SliverList.builder( - itemCount: places.length, + itemCount: filtered.length, itemBuilder: (context, index) { - final place = places[index]; + final place = filtered[index]; return _PlaceTile(place: place); }, ); diff --git a/mobile/lib/presentation/pages/drift_recently_added.page.dart b/mobile/lib/presentation/pages/drift_recently_added.page.dart index c33cd4370d..841fb9a671 100644 --- a/mobile/lib/presentation/pages/drift_recently_added.page.dart +++ b/mobile/lib/presentation/pages/drift_recently_added.page.dart @@ -1,7 +1,7 @@ import 'package:auto_route/auto_route.dart'; import 'package:flutter/widgets.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:immich_mobile/extensions/translate_extensions.dart'; +import 'package:immich_mobile/generated/translations.g.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/user.provider.dart'; @@ -26,7 +26,7 @@ class DriftRecentlyAddedPage extends StatelessWidget { return timelineService; }), ], - child: Timeline(appBar: MesmerizingSliverAppBar(title: 'recently_added'.t())), + child: Timeline(appBar: MesmerizingSliverAppBar(title: context.t.recently_added)), ); } } diff --git a/mobile/lib/presentation/pages/drift_recently_taken.page.dart b/mobile/lib/presentation/pages/drift_recently_taken.page.dart index ceb121b124..22d89770fe 100644 --- a/mobile/lib/presentation/pages/drift_recently_taken.page.dart +++ b/mobile/lib/presentation/pages/drift_recently_taken.page.dart @@ -1,7 +1,7 @@ import 'package:auto_route/auto_route.dart'; import 'package:flutter/widgets.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:immich_mobile/extensions/translate_extensions.dart'; +import 'package:immich_mobile/generated/translations.g.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/user.provider.dart'; @@ -26,7 +26,7 @@ class DriftRecentlyTakenPage extends StatelessWidget { return timelineService; }), ], - child: Timeline(appBar: MesmerizingSliverAppBar(title: 'recently_taken'.t())), + child: Timeline(appBar: MesmerizingSliverAppBar(title: context.t.recently_taken)), ); } } diff --git a/mobile/lib/presentation/pages/drift_remote_album.page.dart b/mobile/lib/presentation/pages/drift_remote_album.page.dart index ccbddb99f3..7669b6c765 100644 --- a/mobile/lib/presentation/pages/drift_remote_album.page.dart +++ b/mobile/lib/presentation/pages/drift_remote_album.page.dart @@ -7,7 +7,7 @@ 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/build_context_extensions.dart'; -import 'package:immich_mobile/extensions/translate_extensions.dart'; +import 'package:immich_mobile/generated/translations.g.dart'; import 'package:immich_mobile/presentation/widgets/album/pending_uploads_banner.widget.dart'; import 'package:immich_mobile/presentation/widgets/bottom_sheet/remote_album_bottom_sheet.widget.dart'; import 'package:immich_mobile/presentation/widgets/remote_album/drift_album_option.widget.dart'; @@ -42,6 +42,9 @@ class _RemoteAlbumPageState extends ConsumerState { Future addAssets(BuildContext context) async { final notifier = ref.read(remoteAlbumProvider.notifier); final albumAssets = await notifier.getAssets(_album.id); + if (!context.mounted) { + return; + } final newAssets = await context.pushRoute>( DriftAssetSelectionTimelineRoute(lockedSelectionAssets: albumAssets.toSet()), @@ -52,11 +55,14 @@ class _RemoteAlbumPageState extends ConsumerState { } final added = await notifier.addAssetsToAlbum(_album.id, newAssets); + if (!context.mounted) { + return; + } - if (added > 0 && context.mounted) { + if (added > 0) { ImmichToast.show( context: context, - msg: "assets_added_to_album_count".t(context: context, args: {'count': added.toString()}), + msg: context.t.assets_added_to_album_count(count: added), toastType: ToastType.success, ); } @@ -70,23 +76,27 @@ class _RemoteAlbumPageState extends ConsumerState { } try { - await ref.read(remoteAlbumProvider.notifier).addUsers(_album.id, newUsers); - - if (newUsers.isNotEmpty) { - ImmichToast.show( - context: context, - msg: "users_added_to_album_count".t(context: context, args: {'count': newUsers.length}), - toastType: ToastType.success, - ); + if (!context.mounted) { + return; } + await ref.read(remoteAlbumProvider.notifier).addUsers(_album.id, newUsers); ref.invalidate(remoteAlbumSharedUsersProvider(_album.id)); - } catch (e) { + if (!context.mounted) { + return; + } + ImmichToast.show( context: context, - msg: "Failed to add users to album: ${e.toString()}", - toastType: ToastType.error, + msg: context.t.users_added_to_album_count(count: newUsers.length), + toastType: ToastType.success, ); + } catch (e) { + if (!context.mounted) { + return; + } + + ImmichToast.show(context: context, msg: "Failed to add users to album: $e", toastType: ToastType.error); } } @@ -101,24 +111,21 @@ class _RemoteAlbumPageState extends ConsumerState { context: context, builder: (BuildContext context) { return AlertDialog( - title: Text('delete_album'.t(context: context)), + title: Text(context.t.delete_album), content: Column( mainAxisSize: MainAxisSize.min, children: [ - Text('album_delete_confirmation'.t(context: context, args: {'album': _album.name})), + Text(context.t.album_delete_confirmation(album: _album.name)), const SizedBox(height: 8), - Text('album_delete_confirmation_description'.t(context: context)), + Text(context.t.album_delete_confirmation_description), ], ), actions: [ - TextButton( - onPressed: () => Navigator.of(context).pop(false), - child: Text('cancel'.t(context: context)), - ), + TextButton(onPressed: () => Navigator.of(context).pop(false), child: Text(context.t.cancel)), TextButton( onPressed: () => Navigator.of(context).pop(true), style: TextButton.styleFrom(foregroundColor: Theme.of(context).colorScheme.error), - child: Text('delete_album'.t(context: context)), + child: Text(context.t.delete_album), ), ], ); @@ -127,19 +134,26 @@ class _RemoteAlbumPageState extends ConsumerState { if (confirmed == true) { try { - await ref.read(remoteAlbumProvider.notifier).deleteAlbum(_album.id); + if (!context.mounted) { + return; + } - ImmichToast.show( - context: context, - msg: 'album_deleted'.t(context: context), - toastType: ToastType.success, - ); + await ref.read(remoteAlbumProvider.notifier).deleteAlbum(_album.id); + if (!context.mounted) { + return; + } + + ImmichToast.show(context: context, msg: context.t.album_deleted, toastType: ToastType.success); unawaited(context.pushRoute(const DriftAlbumsRoute())); } catch (e) { + if (!context.mounted) { + return; + } + ImmichToast.show( context: context, - msg: 'album_viewer_appbar_share_err_delete'.t(context: context), + msg: context.t.album_viewer_appbar_share_err_delete, toastType: ToastType.error, ); } @@ -153,7 +167,11 @@ class _RemoteAlbumPageState extends ConsumerState { builder: (context) => _EditAlbumDialog(album: _album), ); - if (result != null && context.mounted) { + if (!context.mounted) { + return; + } + + if (result != null) { setState(() { _album = _album.copyWith(name: result.name, description: result.description ?? ''); }); @@ -251,20 +269,19 @@ class _EditAlbumDialogState extends ConsumerState<_EditAlbumDialog> { await ref .read(remoteAlbumProvider.notifier) .updateAlbum(widget.album.id, name: newTitle, description: newDescription); + if (!mounted) { + return; + } - if (mounted) { - Navigator.of( - context, - ).pop(_EditAlbumData(name: newTitle, description: newDescription.isEmpty ? null : newDescription)); - } + Navigator.of( + context, + ).pop(_EditAlbumData(name: newTitle, description: newDescription.isEmpty ? null : newDescription)); } catch (e) { - if (mounted) { - ImmichToast.show( - context: context, - msg: 'album_update_error'.t(context: context), - toastType: ToastType.error, - ); + if (!mounted) { + return; } + + ImmichToast.show(context: context, msg: context.t.errors.unable_to_update_album_info, toastType: ToastType.error); } } @@ -287,14 +304,14 @@ class _EditAlbumDialogState extends ConsumerState<_EditAlbumDialog> { children: [ Icon(Icons.edit_outlined, color: context.colorScheme.primary, size: 24), const SizedBox(width: 12), - Text('edit_album'.t(context: context), style: context.textTheme.titleMedium), + Text(context.t.edit_album, style: context.textTheme.titleMedium), ], ), const SizedBox(height: 24), // Album Name Text( - 'album_name'.t(context: context).toUpperCase(), + context.t.album_name.toUpperCase(), style: context.textTheme.labelSmall?.copyWith(fontWeight: FontWeight.w600), ), const SizedBox(height: 4), @@ -309,7 +326,7 @@ class _EditAlbumDialogState extends ConsumerState<_EditAlbumDialog> { ), validator: (value) { if (value == null || value.trim().isEmpty) { - return 'album_name_required'.t(context: context); + return context.t.name_required; } return null; @@ -319,7 +336,7 @@ class _EditAlbumDialogState extends ConsumerState<_EditAlbumDialog> { // Description Text( - 'description'.t(context: context).toUpperCase(), + context.t.description.toUpperCase(), style: context.textTheme.labelSmall?.copyWith(fontWeight: FontWeight.w600), ), const SizedBox(height: 4), @@ -339,15 +356,9 @@ class _EditAlbumDialogState extends ConsumerState<_EditAlbumDialog> { Row( mainAxisAlignment: MainAxisAlignment.end, children: [ - TextButton( - onPressed: () => Navigator.of(context).pop(null), - child: Text('cancel'.t(context: context)), - ), + TextButton(onPressed: () => Navigator.of(context).pop(null), child: Text(context.t.cancel)), const SizedBox(width: 12), - FilledButton( - onPressed: _handleSave, - child: Text('save'.t(context: context)), - ), + FilledButton(onPressed: _handleSave, child: Text(context.t.save)), ], ), ], @@ -411,7 +422,7 @@ class _AlbumKebabMenu extends ConsumerWidget { return FutureBuilder( future: ref - .read(remoteAlbumServiceProvider) + .watch(remoteAlbumServiceProvider) .getUserRole(album.id, user?.id ?? '') .then((role) => role == AlbumUserRole.editor), builder: (context, snapshot) { diff --git a/mobile/lib/presentation/pages/drift_slideshow.page.dart b/mobile/lib/presentation/pages/drift_slideshow.page.dart index 596b6fdf36..2662c60a30 100644 --- a/mobile/lib/presentation/pages/drift_slideshow.page.dart +++ b/mobile/lib/presentation/pages/drift_slideshow.page.dart @@ -7,11 +7,12 @@ import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; import 'package:immich_mobile/constants/enums.dart'; +import 'package:immich_mobile/domain/models/asset/base_asset.model.dart'; import 'package:immich_mobile/domain/models/config/slideshow_config.dart'; import 'package:immich_mobile/domain/services/timeline.service.dart'; import 'package:immich_mobile/extensions/build_context_extensions.dart'; import 'package:immich_mobile/extensions/scroll_extensions.dart'; -import 'package:immich_mobile/extensions/translate_extensions.dart'; +import 'package:immich_mobile/generated/translations.g.dart'; import 'package:immich_mobile/pages/common/settings.page.dart'; import 'package:immich_mobile/presentation/widgets/asset_viewer/video_viewer.widget.dart'; import 'package:immich_mobile/presentation/widgets/images/image_provider.dart'; @@ -51,9 +52,10 @@ class _DriftSlideshowPageState extends ConsumerState with Si int? _crossfadeFromIndex; int? _crossfadeToIndex; int _zoomCycle = 0; + bool _disableAnimations = false; @override - initState() { + void initState() { super.initState(); _config = ref.read(appConfigProvider.select((s) => s.slideshow)); final asset = ref.read(assetViewerProvider).currentAsset; @@ -66,12 +68,18 @@ class _DriftSlideshowPageState extends ConsumerState with Si _updateNextIndex(); ref.listenManual(appConfigProvider.select((s) => s.slideshow), _onConfigChanged); - SystemChrome.setEnabledSystemUIMode(SystemUiMode.immersive); + unawaited(SystemChrome.setEnabledSystemUIMode(SystemUiMode.immersive)); unawaited(WakelockPlus.enable()); } @override - dispose() { + void didChangeDependencies() { + super.didChangeDependencies(); + _disableAnimations = MediaQuery.disableAnimationsOf(context); + } + + @override + void dispose() { _timer.cancel(); _stopwatch.stop(); _pageController.dispose(); @@ -86,10 +94,10 @@ class _DriftSlideshowPageState extends ConsumerState with Si if (asset.isImage) { _createTimer(); - } else if (ref.read(videoPlayerProvider(asset.heroTag)).status == VideoPlaybackStatus.paused) { - ref.read(videoPlayerProvider(asset.heroTag).notifier).play(); + } else if (ref.read(videoPlayerProvider(asset.id)).status == VideoPlaybackStatus.paused) { + unawaited(ref.read(videoPlayerProvider(asset.id).notifier).play()); } else { - _nextPage(); + unawaited(_nextPage()); } _updateNextIndex(); @@ -106,7 +114,7 @@ class _DriftSlideshowPageState extends ConsumerState with Si final asset = widget.timeline.getAssetSafe(_index)!; if (!asset.isImage) { - ref.read(videoPlayerProvider(asset.heroTag).notifier).pause(); + unawaited(ref.read(videoPlayerProvider(asset.id).notifier).pause()); } setState(() { @@ -140,11 +148,11 @@ class _DriftSlideshowPageState extends ConsumerState with Si }; if (!widget.timeline.hasRange(_nextIndex, 1)) { - widget.timeline.preloadAssets(_nextIndex); + unawaited(widget.timeline.preloadAssets(_nextIndex)); } } - void _nextPage() async { + Future _nextPage() async { if (_nextIndex < 0 || _nextIndex >= widget.timeline.totalAssets) { if (_config.repeat) { final wrapped = _config.direction == SlideshowDirection.forward ? 0 : widget.timeline.totalAssets - 1; @@ -166,20 +174,27 @@ class _DriftSlideshowPageState extends ConsumerState with Si } void _crossFadeToPage(int page) { + if (_disableAnimations) { + _pageController.jumpToPage(page); + return; + } + final previousIndex = _index; _pageController.jumpToPage(page); setState(() { _crossfadeFromIndex = previousIndex; _crossfadeToIndex = page; }); - _crossfadeController.forward(from: 0.0).whenComplete(() { - if (mounted) { - setState(() { - _crossfadeFromIndex = null; - _crossfadeToIndex = null; - }); - } - }); + unawaited( + _crossfadeController.forward(from: 0.0).whenComplete(() { + if (mounted) { + setState(() { + _crossfadeFromIndex = null; + _crossfadeToIndex = null; + }); + } + }), + ); } Widget _getCrossfadeLayer(BuildContext context, int index, {required bool isIncoming}) { @@ -226,7 +241,7 @@ class _DriftSlideshowPageState extends ConsumerState with Si _timer = Timer(Duration(milliseconds: _config.duration * 1000 - _stopwatch.elapsedMilliseconds), () { _stopwatch.stop(); _stopwatch.reset(); - _nextPage(); + unawaited(_nextPage()); }); _stopwatch.start(); @@ -255,7 +270,7 @@ class _DriftSlideshowPageState extends ConsumerState with Si _updateNextIndex(); } - void _onTapUp() async { + Future _onTapUp() async { await (_showAppBar ? SystemChrome.setEnabledSystemUIMode(SystemUiMode.immersive) : restoreEdgeToEdge()); WidgetsBinding.instance.addPostFrameCallback((_) { @@ -273,29 +288,15 @@ class _DriftSlideshowPageState extends ConsumerState with Si } if (asset.isImage) { - final elapsed = _stopwatch.elapsedMilliseconds; - final duration = _config.duration * 1000; - - return TweenAnimationBuilder( + return _SlideshowProgressBar( key: Key(_index.toString()), - tween: Tween(begin: elapsed / duration.toDouble(), end: _paused ? elapsed / duration.toDouble() : 1.0), - duration: Duration(milliseconds: _paused ? 1 : max(duration - elapsed, 1)), - builder: (context, value, _) => LinearProgressIndicator( - color: context.colorScheme.primary, - borderRadius: const BorderRadius.all(Radius.zero), - minHeight: 5, - value: value, - ), + durationMs: _config.duration * 1000, + elapsedMs: _stopwatch.elapsedMilliseconds, + paused: _paused, + color: context.colorScheme.primary, ); } else { - return LinearProgressIndicator( - color: context.colorScheme.primary, - borderRadius: const BorderRadius.all(Radius.zero), - minHeight: 5, - value: - ref.watch(videoPlayerProvider(asset.heroTag).select((s) => s.position)).inMilliseconds / - asset.duration.inMilliseconds, - ); + return _VideoProgressBar(asset: asset); } } @@ -308,7 +309,7 @@ class _DriftSlideshowPageState extends ConsumerState with Si return ImageFiltered( imageFilter: ImageFilter.blur(sigmaX: 30, sigmaY: 30), - child: Container( + child: DecoratedBox( decoration: BoxDecoration( image: DecorationImage( image: getFullImageProvider(asset, size: Size(context.width, context.height)), @@ -334,6 +335,21 @@ class _DriftSlideshowPageState extends ConsumerState with Si final imageProvider = getFullImageProvider(asset, size: context.sizeData); if (asset.isImage) { + PhotoView buildPhotoView(PhotoViewComputedScale initialScale) => PhotoView( + imageProvider: imageProvider, + index: index, + disableScaleGestures: true, + gaplessPlayback: true, + filterQuality: FilterQuality.high, + initialScale: initialScale, + controller: PhotoViewController(), + onTapUp: (_, _, _) => _onTapUp(), + ); + + if (_disableAnimations) { + return buildPhotoView(scale); + } + final zoomOut = _zoomCycle.isOdd; final elapsed = _stopwatch.elapsedMilliseconds; final duration = _config.duration * 1000; @@ -349,37 +365,16 @@ class _DriftSlideshowPageState extends ConsumerState with Si : 1.0, ), duration: Duration(milliseconds: _paused ? 1 : max(duration - elapsed, 1)), - builder: (context, value, _) => PhotoView( - imageProvider: imageProvider, - index: index, - disableScaleGestures: true, - gaplessPlayback: true, - filterQuality: FilterQuality.high, - initialScale: scale * (1.0 + value * _kenBurnsZoom), - controller: PhotoViewController(), - onTapUp: (_, _, _) => _onTapUp(), - ), + builder: (context, value, _) => buildPhotoView(scale * (1.0 + value * _kenBurnsZoom)), ); } else { - final status = ref.watch(videoPlayerProvider(asset.heroTag).select((s) => s.status)); - final position = ref.read(videoPlayerProvider(asset.heroTag)).position; - - if (status == VideoPlaybackStatus.completed && isCurrent && position.inMicroseconds > 0) { - _nextPage(); - } else if (status == VideoPlaybackStatus.playing) { - ref.read(videoPlayerProvider(asset.heroTag).notifier).setLoop(false); - } - - return PhotoView.customChild( - onTapUp: (_, _, _) => _onTapUp(), - disableScaleGestures: true, - filterQuality: FilterQuality.high, - initialScale: scale, - child: NativeVideoViewer( - asset: asset, - isCurrent: isCurrent, - image: Image(image: imageProvider, fit: BoxFit.contain, alignment: Alignment.center), - ), + return _VideoChild( + asset: asset, + isCurrent: isCurrent, + scale: scale, + imageProvider: imageProvider, + onTapUp: _onTapUp, + onCompleted: _nextPage, ); } } @@ -398,7 +393,7 @@ class _DriftSlideshowPageState extends ConsumerState with Si children: [ AppBar( backgroundColor: context.scaffoldBackgroundColor, - title: Text("slideshow".t(context: context)), + title: Text(context.t.slideshow), actions: [ IconButton( onPressed: _paused ? _play : _pause, @@ -407,7 +402,7 @@ class _DriftSlideshowPageState extends ConsumerState with Si IconButton( onPressed: () { _pause(); - context.pushRoute(SettingsSubRoute(section: SettingSection.assetViewer)); + unawaited(context.pushRoute(SettingsSubRoute(section: SettingSection.assetViewer))); }, icon: const Icon(Icons.settings), ), @@ -463,3 +458,136 @@ class _DriftSlideshowPageState extends ConsumerState with Si ); } } + +class _VideoChild extends ConsumerWidget { + final BaseAsset asset; + final bool isCurrent; + final PhotoViewComputedScale scale; + final ImageProvider imageProvider; + final VoidCallback onTapUp; + final VoidCallback onCompleted; + + const _VideoChild({ + required this.asset, + required this.isCurrent, + required this.scale, + required this.imageProvider, + required this.onTapUp, + required this.onCompleted, + }); + + @override + Widget build(BuildContext context, WidgetRef ref) { + ref.listen(videoPlayerProvider(asset.id).select((s) => s.status), (_, status) { + if (status == VideoPlaybackStatus.completed) { + if (isCurrent && ref.read(videoPlayerProvider(asset.id)).position.inMicroseconds > 0) { + onCompleted(); + } + } else if (status == VideoPlaybackStatus.playing) { + unawaited(ref.read(videoPlayerProvider(asset.id).notifier).setLoop(false)); + } + }); + + return PhotoView.customChild( + onTapUp: (_, _, _) => onTapUp(), + disableScaleGestures: true, + filterQuality: FilterQuality.high, + initialScale: scale, + child: NativeVideoViewer( + asset: asset, + isCurrent: isCurrent, + image: Image(image: imageProvider, fit: BoxFit.contain, alignment: Alignment.center), + ), + ); + } +} + +class _VideoProgressBar extends ConsumerWidget { + final BaseAsset asset; + + const _VideoProgressBar({required this.asset}); + + @override + Widget build(BuildContext context, WidgetRef ref) { + final position = ref.watch(videoPlayerProvider(asset.id).select((s) => s.position)); + + return LinearProgressIndicator( + color: context.colorScheme.primary, + borderRadius: BorderRadius.zero, + minHeight: 5, + value: position.inMilliseconds / asset.duration.inMilliseconds, + ); + } +} + +/// Progress bar for image slides, driven by an explicit [AnimationController]. +/// +/// [TweenAnimationBuilder] creates its controller internally with the default +/// [AnimationBehavior.normal], which makes it run ~20x too fast while the system +/// "reduce motion" setting is on (flutter/flutter#164287). This owns its +/// controller so it can use [AnimationBehavior.preserve] and animate at the real +/// slide duration regardless of that setting. +class _SlideshowProgressBar extends StatefulWidget { + final int durationMs; + final int elapsedMs; + final bool paused; + final Color color; + + const _SlideshowProgressBar({ + super.key, + required this.durationMs, + required this.elapsedMs, + required this.paused, + required this.color, + }); + + @override + State<_SlideshowProgressBar> createState() => _SlideshowProgressBarState(); +} + +class _SlideshowProgressBarState extends State<_SlideshowProgressBar> with SingleTickerProviderStateMixin { + late final AnimationController _controller; + + @override + void initState() { + super.initState(); + _controller = AnimationController( + vsync: this, + duration: Duration(milliseconds: widget.durationMs), + animationBehavior: AnimationBehavior.preserve, + )..value = (widget.elapsedMs / widget.durationMs).clamp(0.0, 1.0); + if (!widget.paused) { + unawaited(_controller.forward()); + } + } + + @override + void didUpdateWidget(_SlideshowProgressBar oldWidget) { + super.didUpdateWidget(oldWidget); + if (widget.durationMs != oldWidget.durationMs) { + _controller.duration = Duration(milliseconds: widget.durationMs); + } + if (widget.paused != oldWidget.paused) { + widget.paused ? _controller.stop() : _controller.forward(); + } + } + + @override + void dispose() { + _controller.dispose(); + super.dispose(); + } + + @override + Widget build(BuildContext context) { + return AnimatedBuilder( + animation: _controller, + builder: (context, _) => LinearProgressIndicator( + color: widget.color, + borderRadius: BorderRadius.zero, + minHeight: 5, + value: _controller.value, + ), + ); + } +} diff --git a/mobile/lib/presentation/pages/drift_trash.page.dart b/mobile/lib/presentation/pages/drift_trash.page.dart index d21b437efe..4dd027494d 100644 --- a/mobile/lib/presentation/pages/drift_trash.page.dart +++ b/mobile/lib/presentation/pages/drift_trash.page.dart @@ -2,12 +2,11 @@ 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/translate_extensions.dart'; import 'package:immich_mobile/generated/translations.g.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/base_action_button.widget.dart'; import 'package:immich_mobile/presentation/widgets/bottom_sheet/trash_bottom_sheet.widget.dart'; -import 'package:immich_mobile/providers/infrastructure/action.provider.dart'; import 'package:immich_mobile/presentation/widgets/timeline/timeline.widget.dart'; +import 'package:immich_mobile/providers/infrastructure/action.provider.dart'; import 'package:immich_mobile/providers/infrastructure/timeline.provider.dart'; import 'package:immich_mobile/providers/server_info.provider.dart'; import 'package:immich_mobile/providers/user.provider.dart'; @@ -35,13 +34,13 @@ class DriftTrashPage extends StatelessWidget { ], child: Timeline( appBar: SliverAppBar( - title: Text('trash'.t(context: context)), + title: Text(context.t.trash), floating: true, snap: true, pinned: true, centerTitle: true, elevation: 0, - actions: [const _TrashKebabMenu()], + actions: const [_TrashKebabMenu()], ), topSliverWidgetHeight: 24, topSliverWidget: Consumer( diff --git a/mobile/lib/presentation/pages/drift_user_selection.page.dart b/mobile/lib/presentation/pages/drift_user_selection.page.dart index b73913fd02..c11d5a1fd6 100644 --- a/mobile/lib/presentation/pages/drift_user_selection.page.dart +++ b/mobile/lib/presentation/pages/drift_user_selection.page.dart @@ -1,5 +1,6 @@ +import 'dart:async'; + import 'package:auto_route/auto_route.dart'; -import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; import 'package:flutter_hooks/flutter_hooks.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; @@ -7,6 +8,7 @@ import 'package:immich_mobile/domain/models/album/album.model.dart'; import 'package:immich_mobile/domain/models/user.model.dart'; import 'package:immich_mobile/extensions/asyncvalue_extensions.dart'; import 'package:immich_mobile/extensions/build_context_extensions.dart'; +import 'package:immich_mobile/generated/translations.g.dart'; import 'package:immich_mobile/providers/infrastructure/db.provider.dart'; import 'package:immich_mobile/providers/infrastructure/remote_album.provider.dart'; import 'package:immich_mobile/providers/user.provider.dart'; @@ -50,13 +52,14 @@ class DriftUserSelectionPage extends HookConsumerWidget { @override Widget build(BuildContext context, WidgetRef ref) { final AsyncValue> suggestedShareUsers = ref.watch(driftUsersProvider); + final sharedUsers = ref.watch(remoteAlbumSharedUsersProvider(album.id)); final sharedUsersList = useState>({}); - addNewUsersHandler() { - context.maybePop(sharedUsersList.value.map((e) => e.id).toList()); + void addNewUsersHandler() { + unawaited(context.maybePop(sharedUsersList.value.map((e) => e.id).toList())); } - buildTileIcon(UserDto user) { + Widget buildTileIcon(UserDto user) { if (sharedUsersList.value.contains(user)) { return CircleAvatar(backgroundColor: context.primaryColor, child: const Icon(Icons.check_rounded, size: 25)); } else { @@ -64,8 +67,8 @@ class DriftUserSelectionPage extends HookConsumerWidget { } } - buildUserList(List users) { - List usersChip = []; + ListView buildUserList(List users) { + final List usersChip = []; for (var user in sharedUsersList.value) { usersChip.add( @@ -84,14 +87,14 @@ class DriftUserSelectionPage extends HookConsumerWidget { Padding( padding: const EdgeInsets.all(16.0), child: Text( - 'suggestions'.tr(), + context.t.suggestions, style: const TextStyle(fontSize: 14, color: Colors.grey, fontWeight: FontWeight.bold), ), ), ListView.builder( primary: false, shrinkWrap: true, - itemBuilder: ((context, index) { + itemBuilder: (context, index) { return ListTile( leading: buildTileIcon(users[index]), dense: true, @@ -107,7 +110,7 @@ class DriftUserSelectionPage extends HookConsumerWidget { } }, ); - }), + }, itemCount: users.length, ), ], @@ -116,27 +119,24 @@ class DriftUserSelectionPage extends HookConsumerWidget { return Scaffold( appBar: AppBar( - title: const Text('invite_to_album').tr(), + title: Text(context.t.invite_to_album), elevation: 0, centerTitle: false, leading: IconButton( icon: const Icon(Icons.close_rounded), onPressed: () { - context.maybePop(null); + unawaited(context.maybePop(null)); }, ), actions: [ TextButton( - onPressed: sharedUsersList.value.isEmpty ? null : addNewUsersHandler, - child: const Text("add", style: TextStyle(fontSize: 14, fontWeight: FontWeight.bold)).tr(), + onPressed: sharedUsersList.value.isEmpty ? null : () => addNewUsersHandler(), + child: Text(context.t.add, style: const TextStyle(fontSize: 14, fontWeight: FontWeight.bold)), ), ], ), body: suggestedShareUsers.widgetWhen( onData: (users) { - // Get shared users for this album from the database - final sharedUsers = ref.watch(remoteAlbumSharedUsersProvider(album.id)); - return sharedUsers.when( data: (albumSharedUsers) { // Filter out users that are already shared with this album and the owner diff --git a/mobile/lib/presentation/pages/drift_video.page.dart b/mobile/lib/presentation/pages/drift_video.page.dart index eef05acdce..b51ebc25b8 100644 --- a/mobile/lib/presentation/pages/drift_video.page.dart +++ b/mobile/lib/presentation/pages/drift_video.page.dart @@ -1,7 +1,7 @@ import 'package:auto_route/auto_route.dart'; import 'package:flutter/widgets.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:immich_mobile/extensions/translate_extensions.dart'; +import 'package:immich_mobile/generated/translations.g.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/user.provider.dart'; @@ -26,7 +26,7 @@ class DriftVideoPage extends StatelessWidget { return timelineService; }), ], - child: Timeline(appBar: MesmerizingSliverAppBar(title: 'videos'.t())), + child: Timeline(appBar: MesmerizingSliverAppBar(title: context.t.videos)), ); } } diff --git a/mobile/lib/presentation/pages/edit/drift_edit.page.dart b/mobile/lib/presentation/pages/edit/drift_edit.page.dart index dcb340cc0e..6237169431 100644 --- a/mobile/lib/presentation/pages/edit/drift_edit.page.dart +++ b/mobile/lib/presentation/pages/edit/drift_edit.page.dart @@ -9,13 +9,14 @@ import 'package:hooks_riverpod/hooks_riverpod.dart'; import 'package:immich_mobile/constants/aspect_ratios.dart'; import 'package:immich_mobile/domain/models/asset_edit.model.dart'; import 'package:immich_mobile/extensions/build_context_extensions.dart'; +import 'package:immich_mobile/generated/translations.g.dart'; import 'package:immich_mobile/presentation/pages/edit/editor.provider.dart'; import 'package:immich_mobile/providers/theme.provider.dart'; import 'package:immich_mobile/theme/theme_data.dart'; import 'package:immich_mobile/utils/editor.utils.dart'; import 'package:immich_mobile/widgets/common/immich_toast.dart'; import 'package:immich_ui/immich_ui.dart'; -import 'package:openapi/api.dart' show RotateParameters, MirrorParameters, MirrorAxis; +import 'package:openapi/api.dart' show MirrorAxis, MirrorParameters, RotateParameters; @RoutePage() class DriftEditImagePage extends ConsumerStatefulWidget { @@ -59,10 +60,18 @@ class _DriftEditImagePageState extends ConsumerState with Ti try { await widget.applyEdits(edits); - ImmichToast.show(context: context, msg: 'success'.tr(), toastType: ToastType.success); + if (!mounted) { + return; + } + + ImmichToast.show(context: context, msg: context.t.success, toastType: ToastType.success); Navigator.of(context).pop(); } catch (e) { - ImmichToast.show(context: context, msg: 'error_title'.tr(), toastType: ToastType.error); + if (!mounted) { + return; + } + + ImmichToast.show(context: context, msg: context.t.error_title, toastType: ToastType.error); } finally { ref.read(editorStateProvider.notifier).setIsEditing(false); } @@ -72,17 +81,17 @@ class _DriftEditImagePageState extends ConsumerState with Ti return showDialog( context: context, builder: (context) => AlertDialog( - title: Text('editor_discard_edits_title'.tr()), - content: Text('editor_discard_edits_prompt'.tr()), + title: Text(context.t.editor_discard_edits_title), + content: Text(context.t.editor_discard_edits_prompt), actions: [ TextButton( onPressed: () => Navigator.of(context).pop(false), style: ButtonStyle( foregroundColor: WidgetStateProperty.all(context.themeData.colorScheme.onSurfaceVariant), ), - child: Text('cancel'.tr()), + child: Text(context.t.cancel), ), - TextButton(onPressed: () => Navigator.of(context).pop(true), child: Text('confirm'.tr())), + TextButton(onPressed: () => Navigator.of(context).pop(true), child: Text(context.t.confirm)), ], ), ); @@ -99,7 +108,7 @@ class _DriftEditImagePageState extends ConsumerState with Ti return; } final shouldDiscard = await _showDiscardChangesDialog() ?? false; - if (shouldDiscard && mounted) { + if (shouldDiscard && context.mounted) { Navigator.of(context).pop(); } }, @@ -108,7 +117,7 @@ class _DriftEditImagePageState extends ConsumerState with Ti child: Scaffold( appBar: AppBar( backgroundColor: Colors.black, - title: Text("edit".tr()), + title: Text(context.t.edit), leading: ImmichCloseButton(onPressed: () => Navigator.of(context).maybePop()), actions: [_SaveEditsButton(onSave: _saveEditedImage)], ), @@ -154,7 +163,7 @@ class _DriftEditImagePageState extends ConsumerState with Ti } class _AspectRatioButton extends StatelessWidget { - final AspectRatioPreset ratio; + final CropAspectRatio ratio; final bool isSelected; final VoidCallback onPressed; @@ -162,15 +171,16 @@ class _AspectRatioButton extends StatelessWidget { @override Widget build(BuildContext context) { + final color = isSelected ? context.primaryColor : context.themeData.iconTheme.color; + return Column( mainAxisSize: MainAxisSize.max, children: [ IconButton( iconSize: 36, - icon: Transform.rotate( - angle: ratio.iconRotated ? pi / 2 : 0, - child: Icon(ratio.icon, color: isSelected ? context.primaryColor : context.themeData.iconTheme.color), - ), + icon: ratio.ratio != null + ? _AspectRatioRect(ratio: ratio.ratio!, color: color) + : Icon(ratio.icon, color: color), onPressed: onPressed, ), Text(ratio.label, style: context.textTheme.displayMedium), @@ -179,30 +189,50 @@ class _AspectRatioButton extends StatelessWidget { } } +class _AspectRatioRect extends StatelessWidget { + final double ratio; + final Color? color; + + const _AspectRatioRect({required this.ratio, required this.color}); + + @override + Widget build(BuildContext context) { + return SizedBox( + width: 28, + height: 28, + child: Center( + child: AspectRatio( + aspectRatio: ratio, + child: Container( + decoration: BoxDecoration( + border: Border.all(color: color ?? Colors.transparent, width: 3), + borderRadius: const BorderRadius.all(Radius.circular(4)), + ), + ), + ), + ), + ); + } +} + class _AspectRatioSelector extends ConsumerWidget { const _AspectRatioSelector(); @override Widget build(BuildContext context, WidgetRef ref) { final editorState = ref.watch(editorStateProvider); - final editorNotifier = ref.read(editorStateProvider.notifier); - - // the whole crop view is rotated, so we need to swap the aspect ratio when the rotation is 90 or 270 degrees - double? selectedAspectRatio = editorState.aspectRatio; - if (editorState.rotationAngle % 180 != 0 && selectedAspectRatio != null) { - selectedAspectRatio = 1 / selectedAspectRatio; - } + final editorNotifier = ref.watch(editorStateProvider.notifier); return SingleChildScrollView( scrollDirection: Axis.horizontal, child: Row( - children: AspectRatioPreset.values.map((entry) { + children: aspectRatioPresets.map((entry) { return Padding( padding: const EdgeInsets.symmetric(horizontal: 8.0), child: _AspectRatioButton( ratio: entry, - isSelected: selectedAspectRatio == entry.ratio, - onPressed: () => editorNotifier.setAspectRatio(entry.ratio), + isSelected: editorState.aspectRatio == entry, + onPressed: () => editorNotifier.setAspectRatio(entry), ), ); }).toList(), @@ -216,7 +246,7 @@ class _TransformControls extends ConsumerWidget { @override Widget build(BuildContext context, WidgetRef ref) { - final editorNotifier = ref.read(editorStateProvider.notifier); + final editorNotifier = ref.watch(editorStateProvider.notifier); return Column( mainAxisSize: MainAxisSize.min, @@ -304,10 +334,10 @@ class _ResetEditsButton extends ConsumerWidget { @override Widget build(BuildContext context, WidgetRef ref) { final editorState = ref.watch(editorStateProvider); - final editorNotifier = ref.read(editorStateProvider.notifier); + final editorNotifier = ref.watch(editorStateProvider.notifier); return ImmichTextButton( - labelText: 'reset'.tr(), + labelText: context.t.reset, onPressed: editorNotifier.resetEdits, variant: ImmichVariant.ghost, expanded: false, @@ -355,10 +385,24 @@ class _EditorPreviewState extends ConsumerState<_EditorPreview> with TickerProvi @override Widget build(BuildContext context) { final editorState = ref.watch(editorStateProvider); - final editorNotifier = ref.read(editorStateProvider.notifier); + final editorNotifier = ref.watch(editorStateProvider.notifier); - ref.listen(editorStateProvider, (_, current) { - cropController.aspectRatio = current.aspectRatio; + ref.listen(editorStateProvider, (previous, current) { + // Only re-apply the aspect ratio when it changes, otherwise the crop rect will shrink on every rotation + if (previous?.aspectRatio != current.aspectRatio) { + double? ratio; + + ratio = switch (current.aspectRatio) { + CropAspectRatio.original => current.originalWidth / current.originalHeight, + _ => current.aspectRatio.ratio, + }; + + if (current.rotationAngle % 180 != 0) { + ratio = ratio != null ? 1 / ratio : null; + } + + cropController.aspectRatio = ratio; + } if (cropController.crop != current.crop) { cropController.crop = current.crop; @@ -386,7 +430,9 @@ class _EditorPreviewState extends ConsumerState<_EditorPreview> with TickerProvi 1.0, 1.0, ), - child: Container( + child: AnimatedContainer( + duration: editorState.animationDuration, + curve: Curves.easeInOut, padding: const EdgeInsets.all(10), width: (editorState.rotationAngle % 180 == 0) ? baseWidth : baseHeight, height: (editorState.rotationAngle % 180 == 0) ? baseHeight : baseWidth, diff --git a/mobile/lib/presentation/pages/edit/editor.provider.dart b/mobile/lib/presentation/pages/edit/editor.provider.dart index fcfb8be68e..39cf4cc3ff 100644 --- a/mobile/lib/presentation/pages/edit/editor.provider.dart +++ b/mobile/lib/presentation/pages/edit/editor.provider.dart @@ -1,9 +1,14 @@ +import 'package:flutter/foundation.dart'; import 'package:flutter/services.dart'; +import 'package:freezed_annotation/freezed_annotation.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; +import 'package:immich_mobile/constants/aspect_ratios.dart'; import 'package:immich_mobile/domain/models/asset_edit.model.dart'; import 'package:immich_mobile/domain/models/exif.model.dart'; import 'package:immich_mobile/utils/editor.utils.dart'; +part 'editor.provider.freezed.dart'; + final editorStateProvider = NotifierProvider(EditorProvider.new); class EditorProvider extends Notifier { @@ -24,15 +29,15 @@ class EditorProvider extends Notifier { final originalWidth = exifInfo.isFlipped ? exifInfo.height : exifInfo.width; final originalHeight = exifInfo.isFlipped ? exifInfo.width : exifInfo.height; - Rect crop = existingCrop != null && originalWidth != null && originalHeight != null + final Rect crop = existingCrop != null && originalWidth != null && originalHeight != null ? convertCropParametersToRect(existingCrop.parameters, originalWidth, originalHeight) : const Rect.fromLTRB(0, 0, 1, 1); final transform = normalizeTransformEdits(edits); state = state.copyWith( - originalWidth: originalWidth, - originalHeight: originalHeight, + originalWidth: originalWidth ?? state.originalWidth, + originalHeight: originalHeight ?? state.originalHeight, crop: crop, flipHorizontal: transform.mirrorHorizontal, flipVertical: transform.mirrorVertical, @@ -60,13 +65,8 @@ class EditorProvider extends Notifier { state = state.copyWith(crop: crop, hasUnsavedEdits: true); } - void setAspectRatio(double? aspectRatio) { - if (aspectRatio != null && state.rotationAngle % 180 != 0) { - // When rotated 90 or 270 degrees, swap width and height for aspect ratio calculations - aspectRatio = 1 / aspectRatio; - } - - state = state.copyWith(aspectRatio: aspectRatio); + void setAspectRatio(CropAspectRatio preset) { + state = state.copyWith(aspectRatio: preset, hasUnsavedEdits: true); } void resetEdits() { @@ -76,19 +76,19 @@ class EditorProvider extends Notifier { flipHorizontal: false, flipVertical: false, crop: const Rect.fromLTRB(0, 0, 1, 1), - aspectRatio: null, + aspectRatio: CropAspectRatio.free, hasUnsavedEdits: true, ); } void rotateCCW() { _animateRotation(state.rotationAngle - 90); - state = state.copyWith(hasUnsavedEdits: true); + state = state.copyWith(aspectRatio: state.aspectRatio.flipped, hasUnsavedEdits: true); } void rotateCW() { _animateRotation(state.rotationAngle + 90); - state = state.copyWith(hasUnsavedEdits: true); + state = state.copyWith(aspectRatio: state.aspectRatio.flipped, hasUnsavedEdits: true); } void flipHorizontally() { @@ -110,103 +110,24 @@ class EditorProvider extends Notifier { } } -class EditorState { - final bool isApplyingEdits; +@freezed +abstract class EditorState with _$EditorState { + const EditorState._(); - final int rotationAngle; - final bool flipHorizontal; - final bool flipVertical; - final Rect crop; - final double? aspectRatio; - - final int originalWidth; - final int originalHeight; - - final Duration animationDuration; - - final bool hasUnsavedEdits; - - const EditorState({ - bool? isApplyingEdits, - int? rotationAngle, - bool? flipHorizontal, - bool? flipVertical, - Rect? crop, - this.aspectRatio, - int? originalWidth, - int? originalHeight, - Duration? animationDuration, - bool? hasUnsavedEdits, - }) : isApplyingEdits = isApplyingEdits ?? false, - rotationAngle = rotationAngle ?? 0, - flipHorizontal = flipHorizontal ?? false, - flipVertical = flipVertical ?? false, - animationDuration = animationDuration ?? Duration.zero, - originalWidth = originalWidth ?? 0, - originalHeight = originalHeight ?? 0, - crop = crop ?? const Rect.fromLTRB(0, 0, 1, 1), - hasUnsavedEdits = hasUnsavedEdits ?? false; - - EditorState copyWith({ - bool? isApplyingEdits, - int? rotationAngle, - bool? flipHorizontal, - bool? flipVertical, - double? aspectRatio = double.infinity, - int? originalWidth, - int? originalHeight, - Duration? animationDuration, - Rect? crop, - bool? hasUnsavedEdits, - }) { - return EditorState( - isApplyingEdits: isApplyingEdits ?? this.isApplyingEdits, - rotationAngle: rotationAngle ?? this.rotationAngle, - flipHorizontal: flipHorizontal ?? this.flipHorizontal, - flipVertical: flipVertical ?? this.flipVertical, - aspectRatio: aspectRatio == double.infinity ? this.aspectRatio : aspectRatio, - animationDuration: animationDuration ?? this.animationDuration, - originalWidth: originalWidth ?? this.originalWidth, - originalHeight: originalHeight ?? this.originalHeight, - crop: crop ?? this.crop, - hasUnsavedEdits: hasUnsavedEdits ?? this.hasUnsavedEdits, - ); - } + const factory EditorState({ + @Default(false) bool isApplyingEdits, + @Default(0) int rotationAngle, + @Default(false) bool flipHorizontal, + @Default(false) bool flipVertical, + @Default(Rect.fromLTRB(0, 0, 1, 1)) Rect crop, + @Default(CropAspectRatio.free) CropAspectRatio aspectRatio, + @Default(0) int originalWidth, + @Default(0) int originalHeight, + @Default(Duration.zero) Duration animationDuration, + @Default(false) bool hasUnsavedEdits, + }) = _EditorState; bool get hasEdits { return rotationAngle != 0 || flipHorizontal || flipVertical || crop != const Rect.fromLTRB(0, 0, 1, 1); } - - @override - bool operator ==(Object other) { - if (identical(this, other)) { - return true; - } - - return other is EditorState && - other.isApplyingEdits == isApplyingEdits && - other.rotationAngle == rotationAngle && - other.flipHorizontal == flipHorizontal && - other.flipVertical == flipVertical && - other.crop == crop && - other.aspectRatio == aspectRatio && - other.originalWidth == originalWidth && - other.originalHeight == originalHeight && - other.animationDuration == animationDuration && - other.hasUnsavedEdits == hasUnsavedEdits; - } - - @override - int get hashCode { - return isApplyingEdits.hashCode ^ - rotationAngle.hashCode ^ - flipHorizontal.hashCode ^ - flipVertical.hashCode ^ - crop.hashCode ^ - aspectRatio.hashCode ^ - originalWidth.hashCode ^ - originalHeight.hashCode ^ - animationDuration.hashCode ^ - hasUnsavedEdits.hashCode; - } } diff --git a/mobile/lib/presentation/pages/feature_message/whats_new.page.dart b/mobile/lib/presentation/pages/feature_message/whats_new.page.dart new file mode 100644 index 0000000000..d9e4e5c6eb --- /dev/null +++ b/mobile/lib/presentation/pages/feature_message/whats_new.page.dart @@ -0,0 +1,72 @@ +import 'package:auto_route/auto_route.dart'; +import 'package:flutter/material.dart'; +import 'package:immich_mobile/domain/models/feature_message.model.dart'; +import 'package:immich_mobile/extensions/build_context_extensions.dart'; +import 'package:immich_mobile/generated/translations.g.dart'; +import 'package:immich_mobile/presentation/widgets/feature_message/feature_message_placeholder.widget.dart'; + +@RoutePage() +class WhatsNewPage extends StatelessWidget { + const WhatsNewPage({super.key}); + + @override + Widget build(BuildContext context) { + final highlights = visibleFeatureMessageHighlights; + return Scaffold( + appBar: AppBar(centerTitle: false, title: Text(context.t.whats_new)), + body: ListView.separated( + padding: const EdgeInsets.only(top: 16, bottom: 64), + itemCount: highlights.length, + separatorBuilder: (_, _) => const SizedBox(height: 24), + itemBuilder: (_, index) => _HighlightCard(highlight: highlights[index]), + ), + ); + } +} + +class _HighlightCard extends StatelessWidget { + final FeatureHighlight highlight; + + const _HighlightCard({required this.highlight}); + + @override + Widget build(BuildContext context) { + final scheme = context.colorScheme; + return Padding( + padding: const EdgeInsets.symmetric(horizontal: 16), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + DecoratedBox( + decoration: BoxDecoration( + color: scheme.surfaceContainerHighest, + borderRadius: const BorderRadius.all(Radius.circular(18)), + border: Border.all(color: scheme.outlineVariant.withValues(alpha: 0.5)), + ), + child: ClipRRect( + borderRadius: const BorderRadius.all(Radius.circular(18)), + child: SizedBox( + width: double.infinity, + height: 256, + child: highlight.image == null + ? const FeatureMessagePlaceholder() + : Image.asset( + highlight.image!, + fit: BoxFit.contain, + errorBuilder: (context, _, _) => const FeatureMessagePlaceholder(), + ), + ), + ), + ), + const SizedBox(height: 12), + Text(highlight.title(context.t), style: context.textTheme.titleMedium?.copyWith(fontWeight: FontWeight.w600)), + const SizedBox(height: 4), + Text( + highlight.body(context.t), + style: context.textTheme.bodyMedium?.copyWith(color: context.colorScheme.onSurfaceVariant), + ), + ], + ), + ); + } +} diff --git a/mobile/lib/presentation/pages/profile/profile_picture_crop.page.dart b/mobile/lib/presentation/pages/profile/profile_picture_crop.page.dart index 3fb32b7d93..a5c069671c 100644 --- a/mobile/lib/presentation/pages/profile/profile_picture_crop.page.dart +++ b/mobile/lib/presentation/pages/profile/profile_picture_crop.page.dart @@ -2,13 +2,13 @@ import 'dart:async'; import 'package:auto_route/auto_route.dart'; import 'package:crop_image/crop_image.dart'; -import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; import 'package:fluttertoast/fluttertoast.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; import 'package:image_picker/image_picker.dart'; import 'package:immich_mobile/domain/models/asset/base_asset.model.dart'; import 'package:immich_mobile/extensions/build_context_extensions.dart'; +import 'package:immich_mobile/generated/translations.g.dart'; import 'package:immich_mobile/presentation/widgets/images/image_provider.dart'; import 'package:immich_mobile/providers/auth.provider.dart'; import 'package:immich_mobile/providers/backup/backup.provider.dart'; @@ -70,11 +70,15 @@ class _ProfilePictureCropPageState extends ConsumerState final croppedImage = await _cropController.croppedImage(); final pngBytes = await imageToUint8List(croppedImage); final xFile = XFile.fromData(pngBytes, mimeType: 'image/png'); + if (!context.mounted) { + return; + } + final success = await ref .read(uploadProfileImageProvider.notifier) .upload(xFile, fileName: 'profile-picture.png'); - if (!context.mounted) { + if (!mounted) { return; } @@ -89,30 +93,28 @@ class _ProfilePictureCropPageState extends ConsumerState ImmichToast.show( context: context, - msg: 'profile_picture_set'.tr(), + msg: context.t.profile_picture_set, gravity: ToastGravity.BOTTOM, toastType: ToastType.success, ); - if (context.mounted) { - unawaited(context.maybePop()); - } + unawaited(context.maybePop()); } else { ImmichToast.show( context: context, - msg: 'errors.unable_to_set_profile_picture'.tr(), + msg: context.t.errors.unable_to_set_profile_picture, toastType: ToastType.error, gravity: ToastGravity.BOTTOM, ); } } catch (e) { - if (!context.mounted) { + if (!mounted) { return; } ImmichToast.show( context: context, - msg: 'errors.unable_to_set_profile_picture'.tr(), + msg: context.t.errors.unable_to_set_profile_picture, toastType: ToastType.error, gravity: ToastGravity.BOTTOM, ); @@ -133,7 +135,7 @@ class _ProfilePictureCropPageState extends ConsumerState return Scaffold( appBar: AppBar( backgroundColor: context.scaffoldBackgroundColor, - title: Text("set_profile_picture".tr()), + title: Text(context.t.set_profile_picture), leading: _isLoading ? null : const ImmichCloseButton(), actions: [ if (_isLoading) @@ -157,7 +159,7 @@ class _ProfilePictureCropPageState extends ConsumerState return Center( child: ConstrainedBox( constraints: BoxConstraints(maxHeight: context.height * 0.7, maxWidth: context.width * 0.9), - child: Container( + child: DecoratedBox( decoration: BoxDecoration( borderRadius: const BorderRadius.all(Radius.circular(7)), boxShadow: [ diff --git a/mobile/lib/presentation/pages/search/drift_search.page.dart b/mobile/lib/presentation/pages/search/drift_search.page.dart index 2ae6371f6a..e364e0d2f8 100644 --- a/mobile/lib/presentation/pages/search/drift_search.page.dart +++ b/mobile/lib/presentation/pages/search/drift_search.page.dart @@ -12,7 +12,6 @@ import 'package:immich_mobile/domain/models/tag.model.dart'; import 'package:immich_mobile/domain/models/timeline.model.dart'; import 'package:immich_mobile/domain/services/timeline.service.dart'; import 'package:immich_mobile/extensions/build_context_extensions.dart'; -import 'package:immich_mobile/extensions/translate_extensions.dart'; import 'package:immich_mobile/generated/translations.g.dart'; import 'package:immich_mobile/models/search/search_filter.model.dart'; import 'package:immich_mobile/presentation/pages/search/paginated_search.provider.dart'; @@ -48,9 +47,7 @@ class DriftSearchPage extends HookConsumerWidget { serverFeatures.smartSearch ? TextSearchType.context : TextSearchType.filename, ); final searchHintText = useState( - serverFeatures.smartSearch - ? 'sunrise_on_the_beach'.t(context: context) - : 'file_name_or_extension'.t(context: context), + serverFeatures.smartSearch ? context.t.sunrise_on_the_beach : context.t.file_name_or_extension, ); final textSearchController = useTextEditingController(); final filter = useState( @@ -59,7 +56,7 @@ class DriftSearchPage extends HookConsumerWidget { location: SearchLocationFilter(), camera: SearchCameraFilter(), date: SearchDateFilter(), - display: SearchDisplayFilters(isNotInAlbum: false, isArchive: false, isFavorite: false), + display: const SearchDisplayFilters(isNotInAlbum: false, isArchive: false, isFavorite: false), rating: SearchRatingFilter(), mediaType: AssetType.other, language: "${context.locale.languageCode}-${context.locale.countryCode}", @@ -80,7 +77,7 @@ class DriftSearchPage extends HookConsumerWidget { final userPreferences = ref.watch(userMetadataPreferencesProvider); - search(SearchFilter f) { + void search(SearchFilter f) { if (f == filter.value) { return; } @@ -94,7 +91,7 @@ class DriftSearchPage extends HookConsumerWidget { } } - loadMoreSearchResults() { + void loadMoreSearchResults() { unawaited(ref.read(paginatedSearchProvider.notifier).search(filter.value)); } @@ -105,106 +102,116 @@ class DriftSearchPage extends HookConsumerWidget { return null; } - Future.microtask(() { - textSearchController.clear(); - peopleCurrentFilterWidget.value = null; - dateRangeCurrentFilterWidget.value = null; - cameraCurrentFilterWidget.value = null; - tagCurrentFilterWidget.value = null; - mediaTypeCurrentFilterWidget.value = null; - ratingCurrentFilterWidget.value = null; - displayOptionCurrentFilterWidget.value = null; - locationCurrentFilterWidget.value = preFilter.location.city != null - ? Text(preFilter.location.city!, style: context.textTheme.labelLarge) - : null; - search(preFilter); - }); + unawaited( + Future.microtask(() { + if (!context.mounted) { + return; + } + + textSearchController.clear(); + peopleCurrentFilterWidget.value = null; + dateRangeCurrentFilterWidget.value = null; + cameraCurrentFilterWidget.value = null; + tagCurrentFilterWidget.value = null; + mediaTypeCurrentFilterWidget.value = null; + ratingCurrentFilterWidget.value = null; + displayOptionCurrentFilterWidget.value = null; + locationCurrentFilterWidget.value = preFilter.location.city != null + ? Text(preFilter.location.city!, style: context.textTheme.labelLarge) + : null; + search(preFilter); + }), + ); return null; }, [preFilter]); - showPeoplePicker() { + void showPeoplePicker() { var people = filter.value.people; - handleOnSelect(Set value) { + void handleOnSelect(Set value) { people = value; } - handleClear() { + void handleClear() { peopleCurrentFilterWidget.value = null; search(filter.value.copyWith(people: {})); } - handleApply() { - final label = people.map((e) => e.name != '' ? e.name : 'no_name'.t(context: context)).join(', '); + void handleApply() { + final label = people.map((e) => e.name != '' ? e.name : context.t.no_name).join(', '); peopleCurrentFilterWidget.value = label.isNotEmpty ? Text(label, style: context.textTheme.labelLarge) : null; search(filter.value.copyWith(people: people)); } - showFilterBottomSheet( - context: context, - isScrollControlled: true, - child: FractionallySizedBox( - heightFactor: 0.8, - child: FilterBottomSheetScaffold( - title: 'search_filter_people_title'.t(context: context), - expanded: true, - onSearch: handleApply, - onClear: handleClear, - child: PeoplePicker(onSelect: handleOnSelect, filter: filter.value.people), + unawaited( + showFilterBottomSheet( + context: context, + isScrollControlled: true, + child: FractionallySizedBox( + heightFactor: 0.8, + child: FilterBottomSheetScaffold( + title: context.t.search_filter_people_title, + expanded: true, + onSearch: handleApply, + onClear: handleClear, + child: PeoplePicker(onSelect: handleOnSelect, filter: filter.value.people), + ), ), ), ); } - showTagPicker() { + void showTagPicker() { var tagIds = filter.value.tagIds ?? []; String tagLabel = ''; - handleOnSelect(Iterable tags) { + void handleOnSelect(Iterable tags) { tagIds = tags.map((t) => t.id).toList(); tagLabel = tags.map((t) => t.value).join(', '); } - handleClear() { + void handleClear() { tagCurrentFilterWidget.value = null; search(filter.value.copyWith(tagIds: [])); } - handleApply() { + void handleApply() { tagCurrentFilterWidget.value = tagLabel.isNotEmpty ? Text(tagLabel, style: context.textTheme.labelLarge) : null; search(filter.value.copyWith(tagIds: tagIds)); } - showFilterBottomSheet( - context: context, - isScrollControlled: true, - child: FractionallySizedBox( - heightFactor: 0.8, - child: FilterBottomSheetScaffold( - title: 'search_filter_tags_title'.t(context: context), - expanded: true, - onSearch: handleApply, - onClear: handleClear, - child: TagPicker(onSelectExistingTag: handleOnSelect, filter: (filter.value.tagIds ?? []).toSet()), + unawaited( + showFilterBottomSheet( + context: context, + isScrollControlled: true, + child: FractionallySizedBox( + heightFactor: 0.8, + child: FilterBottomSheetScaffold( + title: context.t.search_filter_tags_title, + expanded: true, + onSearch: handleApply, + onClear: handleClear, + child: TagPicker(onSelectExistingTag: handleOnSelect, filter: (filter.value.tagIds ?? []).toSet()), + ), ), ), ); } - showLocationPicker() { + void showLocationPicker() { var location = filter.value.location; - handleOnSelect(Map value) { + void handleOnSelect(Map value) { location = SearchLocationFilter(country: value['country'], city: value['city'], state: value['state']); } - handleClear() { + void handleClear() { locationCurrentFilterWidget.value = null; search(filter.value.copyWith(location: SearchLocationFilter())); } - handleApply() { + void handleApply() { final locationText = [ if (location.country != null) location.country!, if (location.state != null) location.state!, @@ -216,21 +223,23 @@ class DriftSearchPage extends HookConsumerWidget { search(filter.value.copyWith(location: location)); } - showFilterBottomSheet( - context: context, - isScrollControlled: true, - isDismissible: true, - child: FilterBottomSheetScaffold( - title: 'search_filter_location_title'.t(context: context), - onSearch: handleApply, - onClear: handleClear, - child: Padding( - padding: const EdgeInsets.symmetric(vertical: 16.0), - child: Container( - padding: EdgeInsets.only(bottom: context.viewInsets.bottom), - child: Padding( - padding: const EdgeInsets.symmetric(horizontal: 16.0), - child: LocationPicker(onSelected: handleOnSelect, filter: filter.value.location), + unawaited( + showFilterBottomSheet( + context: context, + isScrollControlled: true, + isDismissible: true, + child: FilterBottomSheetScaffold( + title: context.t.search_filter_location_title, + onSearch: handleApply, + onClear: handleClear, + child: Padding( + padding: const EdgeInsets.symmetric(vertical: 16.0), + child: Container( + padding: EdgeInsets.only(bottom: context.viewInsets.bottom), + child: Padding( + padding: const EdgeInsets.symmetric(horizontal: 16.0), + child: LocationPicker(onSelected: handleOnSelect, filter: filter.value.location), + ), ), ), ), @@ -238,19 +247,19 @@ class DriftSearchPage extends HookConsumerWidget { ); } - showCameraPicker() { + void showCameraPicker() { var camera = filter.value.camera; - handleOnSelect(Map value) { + void handleOnSelect(Map value) { camera = SearchCameraFilter(make: value['make'], model: value['model']); } - handleClear() { + void handleClear() { cameraCurrentFilterWidget.value = null; search(filter.value.copyWith(camera: SearchCameraFilter())); } - handleApply() { + void handleApply() { final make = camera.make ?? ''; final model = camera.model ?? ''; cameraCurrentFilterWidget.value = (make.isNotEmpty || model.isNotEmpty) @@ -259,23 +268,25 @@ class DriftSearchPage extends HookConsumerWidget { search(filter.value.copyWith(camera: camera)); } - showFilterBottomSheet( - context: context, - isScrollControlled: true, - isDismissible: true, - child: FilterBottomSheetScaffold( - title: 'search_filter_camera_title'.t(context: context), - onSearch: handleApply, - onClear: handleClear, - child: Padding( - padding: const EdgeInsets.all(16.0), - child: CameraPicker(onSelect: handleOnSelect, filter: filter.value.camera), + unawaited( + showFilterBottomSheet( + context: context, + isScrollControlled: true, + isDismissible: true, + child: FilterBottomSheetScaffold( + title: context.t.search_filter_camera_title, + onSearch: handleApply, + onClear: handleClear, + child: Padding( + padding: const EdgeInsets.all(16.0), + child: CameraPicker(onSelect: handleOnSelect, filter: filter.value.camera), + ), ), ), ); } - datePicked(DateFilterInputModel? selectedDate) { + void datePicked(DateFilterInputModel? selectedDate) { dateInputFilter.value = selectedDate; if (selectedDate == null) { dateRangeCurrentFilterWidget.value = null; @@ -298,7 +309,7 @@ class DriftSearchPage extends HookConsumerWidget { ); } - showDatePicker() async { + Future showDatePicker() async { final firstDate = DateTime(1900); final lastDate = DateTime.now(); @@ -319,14 +330,14 @@ class DriftSearchPage extends HookConsumerWidget { lastDate: lastDate, currentDate: DateTime.now(), initialDateRange: dateRange, - helpText: 'search_filter_date_title'.t(context: context), - cancelText: 'cancel'.t(context: context), - confirmText: 'select'.t(context: context), - saveText: 'save'.t(context: context), - errorFormatText: 'invalid_date_format'.t(context: context), - errorInvalidText: 'invalid_date'.t(context: context), - fieldStartHintText: 'start_date'.t(context: context), - fieldEndHintText: 'end_date'.t(context: context), + helpText: context.t.search_filter_date_title, + cancelText: context.t.cancel, + confirmText: context.t.select, + saveText: context.t.save, + errorFormatText: context.t.invalid_date_format, + errorInvalidText: context.t.invalid_date, + fieldStartHintText: context.t.start_date, + fieldEndHintText: context.t.end_date, initialEntryMode: DatePickerEntryMode.calendar, keyboardType: TextInputType.text, ); @@ -338,123 +349,126 @@ class DriftSearchPage extends HookConsumerWidget { } } - showQuickDatePicker() { - showFilterBottomSheet( - context: context, - child: FilterBottomSheetScaffold( - title: "pick_date_range".tr(), - expanded: true, - onClear: () => datePicked(null), - child: QuickDatePicker( - currentInput: dateInputFilter.value, - onRequestPicker: () { - ContextHelper(context).pop(); - showDatePicker(); - }, - onSelect: (date) { - ContextHelper(context).pop(); - datePicked(date); - }, + void showQuickDatePicker() { + unawaited( + showFilterBottomSheet( + context: context, + child: FilterBottomSheetScaffold( + title: context.t.pick_date_range, + expanded: true, + onClear: () => datePicked(null), + child: QuickDatePicker( + currentInput: dateInputFilter.value, + onRequestPicker: () { + ContextHelper(context).pop(); + unawaited(showDatePicker()); + }, + onSelect: (date) { + ContextHelper(context).pop(); + datePicked(date); + }, + ), ), ), ); } // MEDIA PICKER - showMediaTypePicker() { + void showMediaTypePicker() { var mediaType = filter.value.mediaType; - handleOnSelected(AssetType assetType) { + void handleOnSelected(AssetType assetType) { mediaType = assetType; } - handleClear() { + void handleClear() { mediaTypeCurrentFilterWidget.value = null; search(filter.value.copyWith(mediaType: AssetType.other)); } - handleApply() { + void handleApply() { mediaTypeCurrentFilterWidget.value = mediaType != AssetType.other ? Text( - mediaType == AssetType.image ? 'image'.t(context: context) : 'video'.t(context: context), + mediaType == AssetType.image ? context.t.image : context.t.video, style: context.textTheme.labelLarge, ) : null; search(filter.value.copyWith(mediaType: mediaType)); } - showFilterBottomSheet( - context: context, - child: FilterBottomSheetScaffold( - title: 'search_filter_media_type_title'.t(context: context), - onSearch: handleApply, - onClear: handleClear, - child: MediaTypePicker(onSelect: handleOnSelected, filter: filter.value.mediaType), + unawaited( + showFilterBottomSheet( + context: context, + child: FilterBottomSheetScaffold( + title: context.t.search_filter_media_type_title, + onSearch: handleApply, + onClear: handleClear, + child: MediaTypePicker(onSelect: handleOnSelected, filter: filter.value.mediaType), + ), ), ); } // STAR RATING PICKER - showStarRatingPicker() { + void showStarRatingPicker() { var rating = filter.value.rating; - handleOnSelected(SearchRatingFilter value) { + void handleOnSelected(SearchRatingFilter value) { rating = value; } - handleClear() { + void handleClear() { ratingCurrentFilterWidget.value = null; search(filter.value.copyWith(rating: SearchRatingFilter())); } - handleApply() { + void handleApply() { ratingCurrentFilterWidget.value = rating.rating.isSome - ? Text( - 'rating_count'.t(args: {'count': rating.rating.unwrapOrNull ?? 0}), - style: context.textTheme.labelLarge, - ) + ? Text(context.t.rating_count(count: rating.rating.unwrapOrNull ?? 0), style: context.textTheme.labelLarge) : null; search(filter.value.copyWith(rating: rating)); } - showFilterBottomSheet( - context: context, - isScrollControlled: true, - child: FilterBottomSheetScaffold( - title: 'rating'.t(context: context), - onSearch: handleApply, - onClear: handleClear, - child: StarRatingPicker(onSelect: handleOnSelected, filter: filter.value.rating), + unawaited( + showFilterBottomSheet( + context: context, + isScrollControlled: true, + child: FilterBottomSheetScaffold( + title: context.t.rating, + onSearch: handleApply, + onClear: handleClear, + child: StarRatingPicker(onSelect: handleOnSelected, filter: filter.value.rating), + ), ), ); } // DISPLAY OPTION - showDisplayOptionPicker() { + void showDisplayOptionPicker() { var display = filter.value.display; - handleOnSelect(Map value) { + void handleOnSelect(Map value) { display = display.copyWith( - isNotInAlbum: value[DisplayOption.notInAlbum], - isArchive: value[DisplayOption.archive], - isFavorite: value[DisplayOption.favorite], + isNotInAlbum: value[DisplayOption.notInAlbum] ?? display.isNotInAlbum, + isArchive: value[DisplayOption.archive] ?? display.isArchive, + isFavorite: value[DisplayOption.favorite] ?? display.isFavorite, ); } - handleClear() { + void handleClear() { displayOptionCurrentFilterWidget.value = null; search( filter.value.copyWith( - display: SearchDisplayFilters(isNotInAlbum: false, isArchive: false, isFavorite: false), + display: const SearchDisplayFilters(isNotInAlbum: false, isArchive: false, isFavorite: false), ), ); } - handleApply() { + void handleApply() { final filterText = [ - if (display.isNotInAlbum) 'search_filter_display_option_not_in_album'.t(context: context), - if (display.isArchive) 'archive'.t(context: context), - if (display.isFavorite) 'favorite'.t(context: context), + if (display.isNotInAlbum) context.t.search_filter_display_option_not_in_album, + if (display.isArchive) context.t.archive, + if (display.isFavorite) context.t.favorite, ]; displayOptionCurrentFilterWidget.value = filterText.isNotEmpty ? Text(filterText.join(', '), style: context.textTheme.labelLarge) @@ -462,18 +476,20 @@ class DriftSearchPage extends HookConsumerWidget { search(filter.value.copyWith(display: display)); } - showFilterBottomSheet( - context: context, - child: FilterBottomSheetScaffold( - title: 'display_options'.t(context: context), - onSearch: handleApply, - onClear: handleClear, - child: DisplayOptionPicker(onSelect: handleOnSelect, filter: filter.value.display), + unawaited( + showFilterBottomSheet( + context: context, + child: FilterBottomSheetScaffold( + title: context.t.display_options, + onSearch: handleApply, + onClear: handleClear, + child: DisplayOptionPicker(onSelect: handleOnSelect, filter: filter.value.display), + ), ), ); } - handleTextSubmitted(String value) => search(switch (textSearchType.value) { + void handleTextSubmitted(String value) => search(switch (textSearchType.value) { TextSearchType.context => filter.value.copyWith(filename: '', context: value, description: '', ocr: ''), TextSearchType.filename => filter.value.copyWith(filename: value, context: '', description: '', ocr: ''), TextSearchType.description => filter.value.copyWith(filename: '', context: '', description: value, ocr: ''), @@ -512,7 +528,7 @@ class DriftSearchPage extends HookConsumerWidget { } }, icon: const Icon(Icons.more_vert_rounded), - tooltip: 'show_text_search_menu'.tr(), + tooltip: context.t.show_text_search_menu, ); }, menuChildren: [ @@ -522,7 +538,7 @@ class DriftSearchPage extends HookConsumerWidget { child: ListTile( leading: const Icon(Icons.image_search_rounded), title: Text( - 'search_by_context'.t(context: context), + context.t.search_by_context, style: context.textTheme.bodyLarge?.copyWith( fontWeight: FontWeight.w500, color: textSearchType.value == TextSearchType.context ? context.colorScheme.primary : null, @@ -533,7 +549,7 @@ class DriftSearchPage extends HookConsumerWidget { ), onPressed: () { textSearchType.value = TextSearchType.context; - searchHintText.value = 'sunrise_on_the_beach'.t(context: context); + searchHintText.value = context.t.sunrise_on_the_beach; }, ), ), @@ -541,7 +557,7 @@ class DriftSearchPage extends HookConsumerWidget { child: ListTile( leading: const Icon(Icons.abc_rounded), title: Text( - 'search_filter_filename'.t(context: context), + context.t.search_filter_filename, style: context.textTheme.bodyLarge?.copyWith( fontWeight: FontWeight.w500, color: textSearchType.value == TextSearchType.filename ? context.colorScheme.primary : null, @@ -552,14 +568,14 @@ class DriftSearchPage extends HookConsumerWidget { ), onPressed: () { textSearchType.value = TextSearchType.filename; - searchHintText.value = 'file_name_or_extension'.t(context: context); + searchHintText.value = context.t.file_name_or_extension; }, ), MenuItemButton( child: ListTile( leading: const Icon(Icons.text_snippet_outlined), title: Text( - 'search_by_description'.t(context: context), + context.t.search_by_description, style: context.textTheme.bodyLarge?.copyWith( fontWeight: FontWeight.w500, color: textSearchType.value == TextSearchType.description ? context.colorScheme.primary : null, @@ -570,7 +586,7 @@ class DriftSearchPage extends HookConsumerWidget { ), onPressed: () { textSearchType.value = TextSearchType.description; - searchHintText.value = 'search_by_description_example'.t(context: context); + searchHintText.value = context.t.search_by_description_example; }, ), FeatureCheck( @@ -579,7 +595,7 @@ class DriftSearchPage extends HookConsumerWidget { child: ListTile( leading: const Icon(Icons.document_scanner_outlined), title: Text( - 'search_by_ocr'.t(context: context), + context.t.search_by_ocr, style: context.textTheme.bodyLarge?.copyWith( fontWeight: FontWeight.w500, color: textSearchType.value == TextSearchType.ocr ? context.colorScheme.primary : null, @@ -590,7 +606,7 @@ class DriftSearchPage extends HookConsumerWidget { ), onPressed: () { textSearchType.value = TextSearchType.ocr; - searchHintText.value = 'search_by_ocr_example'.t(context: context); + searchHintText.value = context.t.search_by_ocr_example; }, ), ), @@ -598,7 +614,7 @@ class DriftSearchPage extends HookConsumerWidget { ), ), ], - title: Container( + title: DecoratedBox( decoration: BoxDecoration( border: Border.all(color: context.colorScheme.onSurface.withAlpha(0), width: 0), borderRadius: const BorderRadius.all(Radius.circular(24)), @@ -641,52 +657,52 @@ class DriftSearchPage extends HookConsumerWidget { SearchFilterChip( icon: Icons.people_alt_outlined, onTap: showPeoplePicker, - label: 'people'.t(context: context), + label: context.t.people, currentFilter: peopleCurrentFilterWidget.value, ), SearchFilterChip( icon: Icons.location_on_outlined, onTap: showLocationPicker, - label: 'search_filter_location'.t(context: context), + label: context.t.search_filter_location, currentFilter: locationCurrentFilterWidget.value, ), if (userPreferences.valueOrNull?.tagsEnabled ?? false) SearchFilterChip( icon: Icons.sell_outlined, onTap: showTagPicker, - label: 'tags'.t(context: context), + label: context.t.tags, currentFilter: tagCurrentFilterWidget.value, ), SearchFilterChip( icon: Icons.camera_alt_outlined, onTap: showCameraPicker, - label: 'camera'.t(context: context), + label: context.t.camera, currentFilter: cameraCurrentFilterWidget.value, ), SearchFilterChip( icon: Icons.date_range_outlined, onTap: showQuickDatePicker, - label: 'search_filter_date'.t(context: context), + label: context.t.search_filter_date, currentFilter: dateRangeCurrentFilterWidget.value, ), SearchFilterChip( key: const Key('media_type_chip'), icon: Icons.video_collection_outlined, onTap: showMediaTypePicker, - label: 'search_filter_media_type'.t(context: context), + label: context.t.search_filter_media_type, currentFilter: mediaTypeCurrentFilterWidget.value, ), if (userPreferences.valueOrNull?.ratingsEnabled ?? false) SearchFilterChip( icon: Icons.star_outline_rounded, onTap: showStarRatingPicker, - label: 'search_filter_star_rating'.t(context: context), + label: context.t.search_filter_star_rating, currentFilter: ratingCurrentFilterWidget.value, ), SearchFilterChip( icon: Icons.display_settings_outlined, onTap: showDisplayOptionPicker, - label: 'search_filter_display_options'.t(context: context), + label: context.t.search_filter_display_options, currentFilter: displayOptionCurrentFilterWidget.value, ), ], @@ -697,7 +713,7 @@ class DriftSearchPage extends HookConsumerWidget { if (filter.value.isEmpty) const _SearchSuggestions() else - _SearchResultGrid(onScrollEnd: loadMoreSearchResults), + _SearchResultGrid(onScrollEnd: () => loadMoreSearchResults()), ], ), ); @@ -726,9 +742,7 @@ class _SearchResultGrid extends ConsumerWidget { return false; } - Widget? _bottomWidget(BuildContext context, WidgetRef ref) { - final isLoading = ref.watch(paginatedSearchProvider.select((s) => s.isLoading)); - + Widget? _bottomWidget(BuildContext context, {required bool isLoading, required bool hasMore}) { if (isLoading) { return const SliverFillRemaining( hasScrollBody: false, @@ -739,8 +753,6 @@ class _SearchResultGrid extends ConsumerWidget { ); } - final hasMore = ref.watch(paginatedSearchProvider.select((s) => s.nextPage != null)); - if (hasMore) { return null; } @@ -750,7 +762,7 @@ class _SearchResultGrid extends ConsumerWidget { padding: const EdgeInsets.symmetric(vertical: 32), child: Center( child: Text( - 'search_no_more_result'.t(context: context), + context.t.search_no_more_result, style: context.textTheme.bodyMedium?.copyWith(color: context.colorScheme.onSurfaceVariant), ), ), @@ -762,6 +774,7 @@ class _SearchResultGrid extends ConsumerWidget { Widget build(BuildContext context, WidgetRef ref) { final hasAssets = ref.watch(paginatedSearchProvider.select((s) => s.assets.isNotEmpty)); final isLoading = ref.watch(paginatedSearchProvider.select((s) => s.isLoading)); + final hasMore = ref.watch(paginatedSearchProvider.select((s) => s.nextPage != null)); if (!hasAssets && !isLoading) { return const _SearchNoResults(); @@ -791,7 +804,7 @@ class _SearchResultGrid extends ConsumerWidget { bottomSheet: const GeneralBottomSheet(minChildSize: 0.20), snapToMonth: false, loadingWidget: const SizedBox.shrink(), - bottomSliverWidget: _bottomWidget(context, ref), + bottomSliverWidget: _bottomWidget(context, isLoading: isLoading, hasMore: hasMore), ), ), ), @@ -815,7 +828,7 @@ class _SearchNoResults extends StatelessWidget { Icon(Icons.search_off_rounded, size: 72, color: context.colorScheme.onSurfaceVariant), const SizedBox(height: 24), Text( - 'search_no_result'.t(context: context), + context.t.search_no_result, textAlign: TextAlign.center, style: context.textTheme.bodyLarge?.copyWith(color: context.colorScheme.onSurfaceVariant), ), @@ -843,9 +856,7 @@ class _SearchSuggestions extends StatelessWidget { ), ), const SizedBox(height: 16), - Center( - child: Text('search_page_search_photos_videos'.t(context: context), style: context.textTheme.labelLarge), - ), + Center(child: Text(context.t.search_page_search_photos_videos, style: context.textTheme.labelLarge)), const SizedBox(height: 32), const Padding(padding: EdgeInsets.symmetric(horizontal: 16), child: _QuickLinkList()), ], @@ -859,7 +870,7 @@ class _QuickLinkList extends StatelessWidget { @override Widget build(BuildContext context) { - return Container( + return DecoratedBox( decoration: BoxDecoration( borderRadius: const BorderRadius.all(Radius.circular(20)), border: Border.all(color: context.colorScheme.outline.withAlpha(10), width: 1), @@ -878,7 +889,7 @@ class _QuickLinkList extends StatelessWidget { physics: const NeverScrollableScrollPhysics(), children: [ _QuickLink( - title: 'recently_taken'.t(context: context), + title: context.t.recently_taken, icon: Icons.schedule_outlined, isTop: true, onTap: () => context.pushRoute(const DriftRecentlyTakenRoute()), @@ -886,16 +897,15 @@ class _QuickLinkList extends StatelessWidget { _QuickLink( title: context.t.recently_added, icon: Icons.upload_outlined, - isTop: true, onTap: () => context.pushRoute(const DriftRecentlyAddedRoute()), ), _QuickLink( - title: 'videos'.t(context: context), + title: context.t.videos, icon: Icons.play_circle_outline_rounded, onTap: () => context.pushRoute(const DriftVideoRoute()), ), _QuickLink( - title: 'favorites'.t(context: context), + title: context.t.favorites, icon: Icons.favorite_border_rounded, isBottom: true, onTap: () => context.pushRoute(const DriftFavoriteRoute()), diff --git a/mobile/lib/presentation/pages/search/paginated_search.provider.dart b/mobile/lib/presentation/pages/search/paginated_search.provider.dart index fa2d5a06cf..e9839f31ea 100644 --- a/mobile/lib/presentation/pages/search/paginated_search.provider.dart +++ b/mobile/lib/presentation/pages/search/paginated_search.provider.dart @@ -70,7 +70,7 @@ class PaginatedSearchNotifier extends StateNotifier { @override void dispose() { - _assetCountController.close(); + unawaited(_assetCountController.close()); super.dispose(); } } diff --git a/mobile/lib/presentation/widgets/action_buttons/add_action_button.widget.dart b/mobile/lib/presentation/widgets/action_buttons/add_action_button.widget.dart index 1ab3f2039d..2466a52ead 100644 --- a/mobile/lib/presentation/widgets/action_buttons/add_action_button.widget.dart +++ b/mobile/lib/presentation/widgets/action_buttons/add_action_button.widget.dart @@ -1,26 +1,26 @@ -import 'package:easy_localization/easy_localization.dart'; +import 'dart:async'; + 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/presentation/widgets/action_buttons/base_action_button.widget.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/unarchive_action_button.widget.dart'; -import 'package:immich_mobile/providers/asset_viewer/asset_viewer.provider.dart'; -import 'package:immich_mobile/presentation/widgets/album/album_selector.widget.dart'; -import 'package:immich_mobile/providers/infrastructure/action.provider.dart'; -import 'package:immich_mobile/providers/infrastructure/album.provider.dart'; -import 'package:immich_mobile/providers/routes.provider.dart'; -import 'package:immich_mobile/widgets/common/immich_toast.dart'; -import 'package:immich_mobile/providers/user.provider.dart'; - +import 'package:immich_mobile/constants/enums.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/constants/enums.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/archive_action_button.widget.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/move_to_lock_folder_action_button.widget.dart'; +import 'package:immich_mobile/extensions/build_context_extensions.dart'; +import 'package:immich_mobile/generated/translations.g.dart'; +import 'package:immich_mobile/presentation/actions/action.widget.dart'; +import 'package:immich_mobile/presentation/actions/archive.action.dart'; +import 'package:immich_mobile/presentation/actions/lock.action.dart'; +import 'package:immich_mobile/presentation/widgets/action_buttons/base_action_button.widget.dart'; +import 'package:immich_mobile/presentation/widgets/album/album_selector.widget.dart'; import 'package:immich_mobile/presentation/widgets/bottom_sheet/base_bottom_sheet.widget.dart'; +import 'package:immich_mobile/providers/asset_viewer/asset_viewer.provider.dart'; +import 'package:immich_mobile/providers/infrastructure/action.provider.dart'; +import 'package:immich_mobile/providers/infrastructure/album.provider.dart'; +import 'package:immich_mobile/providers/user.provider.dart'; +import 'package:immich_mobile/widgets/common/immich_toast.dart'; +import 'package:immich_ui/immich_ui.dart'; -enum AddToMenuItem { album, archive, unarchive, lockedFolder } +enum AddToMenuItem { album } class AddActionButton extends ConsumerStatefulWidget { const AddActionButton({super.key, this.originalTheme}); @@ -36,16 +36,6 @@ class _AddActionButtonState extends ConsumerState { switch (selected) { case AddToMenuItem.album: _openAlbumSelector(); - break; - case AddToMenuItem.archive: - performArchiveAction(context, ref, source: ActionSource.viewer); - break; - case AddToMenuItem.unarchive: - performUnArchiveAction(context, ref, source: ActionSource.viewer); - break; - case AddToMenuItem.lockedFolder: - performMoveToLockFolderAction(context, ref, source: ActionSource.viewer); - break; } } @@ -57,20 +47,15 @@ class _AddActionButtonState extends ConsumerState { final user = ref.read(currentUserProvider); final isOwner = asset is RemoteAsset && asset.ownerId == user?.id; - final isInLockedView = ref.watch(inLockedViewProvider); - final isArchived = asset is RemoteAsset && asset.visibility == AssetVisibility.archive; - final hasRemote = asset is RemoteAsset; - final showArchive = isOwner && !isInLockedView && hasRemote && !isArchived; - final showUnarchive = isOwner && !isInLockedView && hasRemote && isArchived; return [ Padding( padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 8), - child: Text("add_to_bottom_bar".tr(), style: context.textTheme.labelMedium), + child: Text(context.t.add_to_bottom_bar, style: context.textTheme.labelMedium), ), BaseActionButton( iconData: Icons.photo_album_outlined, - label: "album".tr(), + label: context.t.album, menuItem: true, onPressed: () => _handleMenuSelection(AddToMenuItem.album), ), @@ -79,28 +64,10 @@ class _AddActionButtonState extends ConsumerState { const Divider(), Padding( padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 8), - child: Text("move_to".tr(), style: context.textTheme.labelMedium), - ), - if (showArchive) - BaseActionButton( - iconData: Icons.archive_outlined, - label: "archive".tr(), - menuItem: true, - onPressed: () => _handleMenuSelection(AddToMenuItem.archive), - ), - if (showUnarchive) - BaseActionButton( - iconData: Icons.unarchive_outlined, - label: "unarchive".tr(), - menuItem: true, - onPressed: () => _handleMenuSelection(AddToMenuItem.unarchive), - ), - BaseActionButton( - iconData: Icons.lock_outline, - label: "locked_folder".tr(), - menuItem: true, - onPressed: () => _handleMenuSelection(AddToMenuItem.lockedFolder), + child: Text(context.t.move_to, style: context.textTheme.labelMedium), ), + const ActionMenuItem(action: ArchiveAction(source: .viewer)), + const ActionMenuItem(action: LockAction(source: .viewer)), ], ]; } @@ -117,21 +84,23 @@ class _AddActionButtonState extends ConsumerState { AlbumSelector(onAlbumSelected: (album) => _addCurrentAssetToAlbum(album)), ]; - showModalBottomSheet( - context: context, - isScrollControlled: true, - backgroundColor: Colors.transparent, - builder: (_) { - return BaseBottomSheet( - actions: const [], - slivers: slivers, - initialChildSize: 0.6, - minChildSize: 0.3, - maxChildSize: 0.95, - expand: false, - backgroundColor: context.isDarkTheme ? Colors.black : Colors.white, - ); - }, + unawaited( + showModalBottomSheet( + context: context, + isScrollControlled: true, + backgroundColor: Colors.transparent, + builder: (_) { + return BaseBottomSheet( + actions: const [], + slivers: slivers, + initialChildSize: 0.6, + minChildSize: 0.3, + maxChildSize: 0.95, + expand: false, + backgroundColor: context.isDarkTheme ? Colors.black : Colors.white, + ); + }, + ), ); } @@ -145,31 +114,38 @@ class _AddActionButtonState extends ConsumerState { final result = await ref.read(actionProvider.notifier).addToAlbum(ActionSource.viewer, album); - if (!context.mounted) { + if (!mounted) { return; } if (!result.success) { - ImmichToast.show(context: context, msg: 'scaffold_body_error_occurred'.tr(), toastType: ToastType.error); + ImmichToast.show(context: context, msg: context.t.scaffold_body_error_occurred, toastType: ToastType.error); return; } - if (result.count == 0) { + // Only report the failure when nothing was added; if some succeeded we show "added". + if (result.count > 0) { ImmichToast.show( context: context, - msg: 'add_to_album_bottom_sheet_already_exists'.tr(namedArgs: {'album': album.name}), - ); - } else { - ImmichToast.show( - context: context, - msg: 'add_to_album_bottom_sheet_added'.tr(namedArgs: {'album': album.name}), + msg: context.t.add_to_album_bottom_sheet_added(album: album.name), ); // Refresh the "Appears in" list on the asset's info panel. ref.invalidate(albumsContainingAssetProvider(latest.remoteId!)); + } else if (result.failedCount > 0) { + ImmichToast.show( + context: context, + msg: context.t.assets_cannot_be_added_to_album_count(count: result.failedCount), + toastType: ToastType.error, + ); + } else { + ImmichToast.show( + context: context, + msg: context.t.add_to_album_bottom_sheet_already_exists(album: album.name), + ); } - if (!context.mounted) { + if (!mounted) { return; } await Navigator.of(context).maybePop(); @@ -184,7 +160,7 @@ class _AddActionButtonState extends ConsumerState { final themeData = widget.originalTheme ?? context.themeData; - return MenuAnchor( + return ImmichMenu( consumeOutsideTap: true, style: MenuStyle( backgroundColor: WidgetStatePropertyAll(themeData.scaffoldBackgroundColor), @@ -195,7 +171,7 @@ class _AddActionButtonState extends ConsumerState { ), padding: const WidgetStatePropertyAll(EdgeInsets.symmetric(vertical: 6)), ), - menuChildren: widget.originalTheme != null + children: widget.originalTheme != null ? [ Theme( data: widget.originalTheme!, @@ -206,7 +182,7 @@ class _AddActionButtonState extends ConsumerState { builder: (context, controller, child) { return BaseActionButton( iconData: Icons.add, - label: "add_to_bottom_bar".tr(), + label: context.t.add_to_bottom_bar, onPressed: () => controller.isOpen ? controller.close() : controller.open(), ); }, diff --git a/mobile/lib/presentation/widgets/action_buttons/archive_action_button.widget.dart b/mobile/lib/presentation/widgets/action_buttons/archive_action_button.widget.dart deleted file mode 100644 index bb2cae21ad..0000000000 --- a/mobile/lib/presentation/widgets/action_buttons/archive_action_button.widget.dart +++ /dev/null @@ -1,59 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:fluttertoast/fluttertoast.dart'; -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:immich_mobile/constants/enums.dart'; -import 'package:immich_mobile/domain/models/events.model.dart'; -import 'package:immich_mobile/domain/utils/event_stream.dart'; -import 'package:immich_mobile/extensions/translate_extensions.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/base_action_button.widget.dart'; -import 'package:immich_mobile/providers/infrastructure/action.provider.dart'; -import 'package:immich_mobile/providers/timeline/multiselect.provider.dart'; -import 'package:immich_mobile/widgets/common/immich_toast.dart'; - -// used to allow performing archive action from different sources (without duplicating code) -Future performArchiveAction(BuildContext context, WidgetRef ref, {required ActionSource source}) async { - if (!context.mounted) { - return; - } - - if (source == ActionSource.viewer) { - EventStream.shared.emit(const ViewerReloadAssetEvent()); - } - - final result = await ref.read(actionProvider.notifier).archive(source); - ref.read(multiSelectProvider.notifier).reset(); - - final successMessage = 'archive_action_prompt'.t(context: context, args: {'count': result.count.toString()}); - - if (context.mounted) { - ImmichToast.show( - context: context, - msg: result.success ? successMessage : 'scaffold_body_error_occurred'.t(context: context), - gravity: ToastGravity.BOTTOM, - toastType: result.success ? ToastType.success : ToastType.error, - ); - } -} - -class ArchiveActionButton extends ConsumerWidget { - final ActionSource source; - final bool iconOnly; - final bool menuItem; - - const ArchiveActionButton({super.key, required this.source, this.iconOnly = false, this.menuItem = false}); - - Future _onTap(BuildContext context, WidgetRef ref) async { - await performArchiveAction(context, ref, source: source); - } - - @override - Widget build(BuildContext context, WidgetRef ref) { - return BaseActionButton( - iconData: Icons.archive_outlined, - label: "to_archive".t(context: context), - iconOnly: iconOnly, - menuItem: menuItem, - onPressed: () => _onTap(context, ref), - ); - } -} diff --git a/mobile/lib/presentation/widgets/action_buttons/base_action_button.widget.dart b/mobile/lib/presentation/widgets/action_buttons/base_action_button.widget.dart index d55f5e25a3..bb25fc4739 100644 --- a/mobile/lib/presentation/widgets/action_buttons/base_action_button.widget.dart +++ b/mobile/lib/presentation/widgets/action_buttons/base_action_button.widget.dart @@ -1,8 +1,7 @@ import 'package:flutter/material.dart'; -import 'package:hooks_riverpod/hooks_riverpod.dart'; import 'package:immich_mobile/extensions/build_context_extensions.dart'; -class BaseActionButton extends ConsumerWidget { +class BaseActionButton extends StatelessWidget { const BaseActionButton({ super.key, required this.label, @@ -31,7 +30,7 @@ class BaseActionButton extends ConsumerWidget { final void Function()? onLongPressed; @override - Widget build(BuildContext context, WidgetRef ref) { + Widget build(BuildContext context) { final miniWidth = minWidth ?? (context.isMobile ? context.width / 4.5 : 75.0); final iconTheme = IconTheme.of(context); final iconSize = iconTheme.size ?? 24.0; @@ -49,14 +48,21 @@ class BaseActionButton extends ConsumerWidget { if (menuItem) { final iconColor = this.iconColor; + final onPressed = this.onPressed; return MenuItemButton( + closeOnActivate: false, style: MenuItemButton.styleFrom( alignment: Alignment.centerLeft, padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 14), ), leadingIcon: Icon(iconData, color: iconColor, size: 20), - onPressed: onPressed, + onPressed: onPressed == null + ? null + : () { + onPressed(); + MenuController.maybeOf(context)?.close(); + }, child: Text(label, style: TextStyle(fontSize: 15, color: iconColor)), ); } diff --git a/mobile/lib/presentation/widgets/action_buttons/bulk_tag_assets_action_button.widget.dart b/mobile/lib/presentation/widgets/action_buttons/bulk_tag_assets_action_button.widget.dart deleted file mode 100644 index b9ac47cd57..0000000000 --- a/mobile/lib/presentation/widgets/action_buttons/bulk_tag_assets_action_button.widget.dart +++ /dev/null @@ -1,46 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:fluttertoast/fluttertoast.dart'; -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:immich_mobile/constants/enums.dart'; -import 'package:immich_mobile/extensions/translate_extensions.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/base_action_button.widget.dart'; -import 'package:immich_mobile/providers/infrastructure/action.provider.dart'; -import 'package:immich_mobile/providers/timeline/multiselect.provider.dart'; -import 'package:immich_mobile/widgets/common/immich_toast.dart'; - -class BulkTagAssetsActionButton extends ConsumerWidget { - final ActionSource source; - - const BulkTagAssetsActionButton({super.key, required this.source}); - - Future _onTap(BuildContext context, WidgetRef ref) async { - final result = await ref.read(actionProvider.notifier).tagAssets(source, context); - if (result == null) { - return; - } - - ref.read(multiSelectProvider.notifier).reset(); - - if (!context.mounted) { - return; - } - - ImmichToast.show( - context: context, - msg: result.success - ? 'tagged_assets'.t(context: context, args: {'count': result.count.toString()}) - : 'errors.failed_to_tag_assets'.t(context: context), - gravity: ToastGravity.BOTTOM, - toastType: result.success ? ToastType.success : ToastType.error, - ); - } - - @override - Widget build(BuildContext context, WidgetRef ref) { - return BaseActionButton( - iconData: Icons.sell_outlined, - label: "control_bottom_app_bar_add_tags".t(context: context), - onPressed: () => _onTap(context, ref), - ); - } -} diff --git a/mobile/lib/presentation/widgets/action_buttons/cast_action_button.widget.dart b/mobile/lib/presentation/widgets/action_buttons/cast_action_button.widget.dart deleted file mode 100644 index 7a4f84fb4f..0000000000 --- a/mobile/lib/presentation/widgets/action_buttons/cast_action_button.widget.dart +++ /dev/null @@ -1,30 +0,0 @@ -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/translate_extensions.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/base_action_button.widget.dart'; -import 'package:immich_mobile/providers/cast.provider.dart'; -import 'package:immich_mobile/widgets/asset_viewer/cast_dialog.dart'; - -class CastActionButton extends ConsumerWidget { - const CastActionButton({super.key, this.iconOnly = false, this.menuItem = false}); - - final bool iconOnly; - final bool menuItem; - - @override - Widget build(BuildContext context, WidgetRef ref) { - final isCasting = ref.watch(castProvider.select((c) => c.isCasting)); - - return BaseActionButton( - iconData: isCasting ? Icons.cast_connected_rounded : Icons.cast_rounded, - iconColor: isCasting ? context.primaryColor : null, // null = default color - label: "cast".t(context: context), - onPressed: () { - showDialog(context: context, builder: (context) => const CastDialog()); - }, - iconOnly: iconOnly, - menuItem: menuItem, - ); - } -} diff --git a/mobile/lib/presentation/widgets/action_buttons/delete_action_button.widget.dart b/mobile/lib/presentation/widgets/action_buttons/delete_action_button.widget.dart deleted file mode 100644 index 92747c6d44..0000000000 --- a/mobile/lib/presentation/widgets/action_buttons/delete_action_button.widget.dart +++ /dev/null @@ -1,92 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:fluttertoast/fluttertoast.dart'; -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:immich_mobile/constants/enums.dart'; -import 'package:immich_mobile/domain/models/events.model.dart'; -import 'package:immich_mobile/domain/utils/event_stream.dart'; -import 'package:immich_mobile/extensions/build_context_extensions.dart'; -import 'package:immich_mobile/extensions/translate_extensions.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/base_action_button.widget.dart'; -import 'package:immich_mobile/providers/infrastructure/action.provider.dart'; -import 'package:immich_mobile/providers/timeline/multiselect.provider.dart'; -import 'package:immich_mobile/widgets/common/immich_toast.dart'; - -/// This delete action has the following behavior: -/// - Set the deletedAt information, put the asset in the trash in the server -/// which will be permanently deleted after the number of days configure by the admin -/// - Prompt to delete the asset locally -class DeleteActionButton extends ConsumerWidget { - final ActionSource source; - final bool showConfirmation; - final bool iconOnly; - final bool menuItem; - const DeleteActionButton({ - super.key, - required this.source, - this.showConfirmation = false, - this.iconOnly = false, - this.menuItem = false, - }); - - void _onTap(BuildContext context, WidgetRef ref) async { - if (!context.mounted) { - return; - } - - if (showConfirmation) { - final confirm = await showDialog( - context: context, - builder: (context) => AlertDialog( - title: Text('delete'.t(context: context)), - content: Text('delete_action_confirmation_message'.t(context: context)), - actions: [ - TextButton( - onPressed: () => Navigator.of(context).pop(false), - child: Text('cancel'.t(context: context)), - ), - TextButton( - onPressed: () => Navigator.of(context).pop(true), - child: Text( - 'confirm'.t(context: context), - style: TextStyle(color: context.colorScheme.error), - ), - ), - ], - ), - ); - if (confirm != true) { - return; - } - } - - if (source == ActionSource.viewer) { - EventStream.shared.emit(const ViewerReloadAssetEvent()); - } - - final result = await ref.read(actionProvider.notifier).trashRemoteAndDeleteLocal(source); - ref.read(multiSelectProvider.notifier).reset(); - - final successMessage = 'delete_action_prompt'.t(context: context, args: {'count': result.count.toString()}); - - if (context.mounted) { - ImmichToast.show( - context: context, - msg: result.success ? successMessage : 'scaffold_body_error_occurred'.t(context: context), - gravity: ToastGravity.BOTTOM, - toastType: result.success ? ToastType.success : ToastType.error, - ); - } - } - - @override - Widget build(BuildContext context, WidgetRef ref) { - return BaseActionButton( - maxWidth: 110.0, - iconData: Icons.delete_sweep_outlined, - label: "delete".t(context: context), - iconOnly: iconOnly, - menuItem: menuItem, - onPressed: () => _onTap(context, ref), - ); - } -} diff --git a/mobile/lib/presentation/widgets/action_buttons/delete_local_action_button.widget.dart b/mobile/lib/presentation/widgets/action_buttons/delete_local_action_button.widget.dart deleted file mode 100644 index 6911d09f89..0000000000 --- a/mobile/lib/presentation/widgets/action_buttons/delete_local_action_button.widget.dart +++ /dev/null @@ -1,68 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:fluttertoast/fluttertoast.dart'; -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:immich_mobile/constants/enums.dart'; -import 'package:immich_mobile/domain/models/events.model.dart'; -import 'package:immich_mobile/domain/utils/event_stream.dart'; -import 'package:immich_mobile/extensions/translate_extensions.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/base_action_button.widget.dart'; -import 'package:immich_mobile/providers/infrastructure/action.provider.dart'; -import 'package:immich_mobile/providers/timeline/multiselect.provider.dart'; -import 'package:immich_mobile/widgets/common/immich_toast.dart'; -import 'package:immich_mobile/providers/infrastructure/album.provider.dart'; - -/// This delete action has the following behavior: -/// - Prompt to delete the asset locally -class DeleteLocalActionButton extends ConsumerWidget { - final ActionSource source; - final bool iconOnly; - final bool menuItem; - - const DeleteLocalActionButton({super.key, required this.source, this.iconOnly = false, this.menuItem = false}); - - void _onTap(BuildContext context, WidgetRef ref) async { - if (!context.mounted) { - return; - } - - final result = await ref.read(actionProvider.notifier).deleteLocal(source, context); - if (result == null) { - return; - } - - ref.read(multiSelectProvider.notifier).reset(); - - if (source == ActionSource.viewer) { - EventStream.shared.emit(const ViewerReloadAssetEvent()); - } - - if (result.count == 0) { - return; - } - - ref.invalidate(localAlbumProvider); - - final successMessage = 'delete_local_action_prompt'.t(context: context, args: {'count': result.count.toString()}); - - if (context.mounted) { - ImmichToast.show( - context: context, - msg: result.success ? successMessage : 'scaffold_body_error_occurred'.t(context: context), - gravity: ToastGravity.BOTTOM, - toastType: result.success ? ToastType.success : ToastType.error, - ); - } - } - - @override - Widget build(BuildContext context, WidgetRef ref) { - return BaseActionButton( - maxWidth: 95.0, - iconData: Icons.no_cell_outlined, - label: "control_bottom_app_bar_delete_from_local".t(context: context), - iconOnly: iconOnly, - menuItem: menuItem, - onPressed: () => _onTap(context, ref), - ); - } -} diff --git a/mobile/lib/presentation/widgets/action_buttons/delete_permanent_action_button.widget.dart b/mobile/lib/presentation/widgets/action_buttons/delete_permanent_action_button.widget.dart deleted file mode 100644 index 267a9f55e6..0000000000 --- a/mobile/lib/presentation/widgets/action_buttons/delete_permanent_action_button.widget.dart +++ /dev/null @@ -1,80 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:fluttertoast/fluttertoast.dart'; -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:immich_mobile/constants/enums.dart'; -import 'package:immich_mobile/domain/models/events.model.dart'; -import 'package:immich_mobile/domain/utils/event_stream.dart'; -import 'package:immich_mobile/extensions/translate_extensions.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/base_action_button.widget.dart'; -import 'package:immich_mobile/providers/infrastructure/action.provider.dart'; -import 'package:immich_mobile/providers/timeline/multiselect.provider.dart'; -import 'package:immich_mobile/widgets/asset_grid/permanent_delete_dialog.dart'; -import 'package:immich_mobile/widgets/common/immich_toast.dart'; - -/// This delete action has the following behavior: -/// - Delete permanently on the server -/// - Prompt to delete the asset locally -class DeletePermanentActionButton extends ConsumerWidget { - final ActionSource source; - final bool iconOnly; - final bool menuItem; - final bool useShortLabel; - - const DeletePermanentActionButton({ - super.key, - required this.source, - this.iconOnly = false, - this.menuItem = false, - this.useShortLabel = false, - }); - - void _onTap(BuildContext context, WidgetRef ref) async { - if (!context.mounted) { - return; - } - - final count = source == ActionSource.viewer ? 1 : ref.read(multiSelectProvider).selectedAssets.length; - final confirm = - await showDialog( - context: context, - builder: (context) => PermanentDeleteDialog(count: count), - ) ?? - false; - if (!confirm) { - return; - } - - if (source == ActionSource.viewer) { - EventStream.shared.emit(const ViewerReloadAssetEvent()); - } - - final result = await ref.read(actionProvider.notifier).deleteRemoteAndLocal(source); - ref.read(multiSelectProvider.notifier).reset(); - - final successMessage = 'delete_permanently_action_prompt'.t( - context: context, - args: {'count': result.count.toString()}, - ); - - if (context.mounted) { - ImmichToast.show( - context: context, - msg: result.success ? successMessage : 'scaffold_body_error_occurred'.t(context: context), - gravity: ToastGravity.BOTTOM, - toastType: result.success ? ToastType.success : ToastType.error, - ); - } - } - - @override - Widget build(BuildContext context, WidgetRef ref) { - return BaseActionButton( - maxWidth: 110.0, - iconData: Icons.delete_forever, - label: useShortLabel ? "delete".t(context: context) : "delete_permanently".t(context: context), - iconOnly: iconOnly, - menuItem: menuItem, - onPressed: () => _onTap(context, ref), - ); - } -} diff --git a/mobile/lib/presentation/widgets/action_buttons/delete_trash_action_button.widget.dart b/mobile/lib/presentation/widgets/action_buttons/delete_trash_action_button.widget.dart deleted file mode 100644 index d19a188561..0000000000 --- a/mobile/lib/presentation/widgets/action_buttons/delete_trash_action_button.widget.dart +++ /dev/null @@ -1,67 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:fluttertoast/fluttertoast.dart'; -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:immich_mobile/constants/enums.dart'; -import 'package:immich_mobile/extensions/translate_extensions.dart'; -import 'package:immich_mobile/providers/infrastructure/action.provider.dart'; -import 'package:immich_mobile/providers/timeline/multiselect.provider.dart'; -import 'package:immich_mobile/widgets/asset_grid/permanent_delete_dialog.dart'; -import 'package:immich_mobile/widgets/common/immich_toast.dart'; - -/// This delete action has the following behavior: -/// - Delete permanently on the server -/// - Prompt to delete the asset locally -/// -/// This action is used when the asset is selected in multi-selection mode in the trash page -class DeleteTrashActionButton extends ConsumerWidget { - final ActionSource source; - - const DeleteTrashActionButton({super.key, required this.source}); - - void _onTap(BuildContext context, WidgetRef ref) async { - if (!context.mounted) { - return; - } - - final selectCount = ref.watch(multiSelectProvider.select((s) => s.selectedAssets.length)); - - final confirmDelete = - await showDialog( - context: context, - builder: (context) => PermanentDeleteDialog(count: selectCount), - ) ?? - false; - if (!confirmDelete) { - return; - } - - final result = await ref.read(actionProvider.notifier).deleteRemoteAndLocal(source); - ref.read(multiSelectProvider.notifier).reset(); - - final successMessage = 'assets_permanently_deleted_count'.t( - context: context, - args: {'count': result.count.toString()}, - ); - - if (context.mounted) { - ImmichToast.show( - context: context, - msg: result.success ? successMessage : 'scaffold_body_error_occurred'.t(context: context), - gravity: ToastGravity.BOTTOM, - toastType: result.success ? ToastType.success : ToastType.error, - ); - } - } - - @override - Widget build(BuildContext context, WidgetRef ref) { - return TextButton.icon( - icon: Icon(Icons.delete_forever, color: Colors.red[400]), - label: Text( - "delete".t(context: context), - style: TextStyle(fontSize: 14, color: Colors.red[400], fontWeight: FontWeight.bold), - ), - onPressed: () => _onTap(context, ref), - ); - } -} diff --git a/mobile/lib/presentation/widgets/action_buttons/download_action_button.widget.dart b/mobile/lib/presentation/widgets/action_buttons/download_action_button.widget.dart deleted file mode 100644 index a5129b643a..0000000000 --- a/mobile/lib/presentation/widgets/action_buttons/download_action_button.widget.dart +++ /dev/null @@ -1,47 +0,0 @@ -import 'package:immich_mobile/constants/enums.dart'; -import 'package:flutter/material.dart'; -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:immich_mobile/domain/utils/background_sync.dart'; -import 'package:immich_mobile/extensions/translate_extensions.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/base_action_button.widget.dart'; -import 'package:immich_mobile/providers/background_sync.provider.dart'; -import 'package:immich_mobile/providers/infrastructure/action.provider.dart'; -import 'package:immich_mobile/providers/timeline/multiselect.provider.dart'; - -class DownloadActionButton extends ConsumerWidget { - final ActionSource source; - final bool iconOnly; - final bool menuItem; - const DownloadActionButton({super.key, required this.source, this.iconOnly = false, this.menuItem = false}); - - void _onTap(BuildContext context, WidgetRef ref, BackgroundSyncManager backgroundSyncManager) async { - if (!context.mounted) { - return; - } - - try { - await ref.read(actionProvider.notifier).downloadAll(source); - - Future.delayed(const Duration(seconds: 1), () async { - await backgroundSyncManager.syncLocal(); - await backgroundSyncManager.hashAssets(); - }); - } finally { - ref.read(multiSelectProvider.notifier).reset(); - } - } - - @override - Widget build(BuildContext context, WidgetRef ref) { - final backgroundManager = ref.watch(backgroundSyncProvider); - - return BaseActionButton( - iconData: Icons.download, - maxWidth: 95, - label: "download".t(context: context), - iconOnly: iconOnly, - menuItem: menuItem, - onPressed: () => _onTap(context, ref, backgroundManager), - ); - } -} diff --git a/mobile/lib/presentation/widgets/action_buttons/download_status_floating_button.widget.dart b/mobile/lib/presentation/widgets/action_buttons/download_status_floating_button.widget.dart index efa7f5c6d0..264e489db3 100644 --- a/mobile/lib/presentation/widgets/action_buttons/download_status_floating_button.widget.dart +++ b/mobile/lib/presentation/widgets/action_buttons/download_status_floating_button.widget.dart @@ -1,3 +1,5 @@ +import 'dart:async'; + import 'package:auto_route/auto_route.dart'; import 'package:flutter/material.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; @@ -33,7 +35,7 @@ class DownloadStatusFloatingButton extends ConsumerWidget { : context.colorScheme.surfaceBright, elevation: 2, onPressed: () { - context.pushRoute(const DownloadInfoRoute()); + unawaited(context.pushRoute(const DownloadInfoRoute())); }, child: Stack( alignment: AlignmentDirectional.center, diff --git a/mobile/lib/presentation/widgets/action_buttons/edit_date_time_action_button.widget.dart b/mobile/lib/presentation/widgets/action_buttons/edit_date_time_action_button.widget.dart deleted file mode 100644 index 6eeec0658b..0000000000 --- a/mobile/lib/presentation/widgets/action_buttons/edit_date_time_action_button.widget.dart +++ /dev/null @@ -1,52 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:fluttertoast/fluttertoast.dart'; -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:immich_mobile/constants/enums.dart'; -import 'package:immich_mobile/extensions/translate_extensions.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/base_action_button.widget.dart'; -import 'package:immich_mobile/providers/infrastructure/action.provider.dart'; -import 'package:immich_mobile/providers/timeline/multiselect.provider.dart'; -import 'package:immich_mobile/widgets/common/immich_toast.dart'; - -class EditDateTimeActionButton extends ConsumerWidget { - final ActionSource source; - - const EditDateTimeActionButton({super.key, required this.source}); - - _onTap(BuildContext context, WidgetRef ref) async { - if (!context.mounted) { - return; - } - - final result = await ref.read(actionProvider.notifier).editDateTime(source, context); - if (result == null) { - return; - } - - ref.read(multiSelectProvider.notifier).reset(); - - final successMessage = 'edit_date_and_time_action_prompt'.t( - context: context, - args: {'count': result.count.toString()}, - ); - - if (context.mounted) { - ImmichToast.show( - context: context, - msg: result.success ? successMessage : 'scaffold_body_error_occurred'.t(context: context), - gravity: ToastGravity.BOTTOM, - toastType: result.success ? ToastType.success : ToastType.error, - ); - } - } - - @override - Widget build(BuildContext context, WidgetRef ref) { - return BaseActionButton( - maxWidth: 95.0, - iconData: Icons.edit_calendar_outlined, - label: "control_bottom_app_bar_edit_time".t(context: context), - onPressed: () => _onTap(context, ref), - ); - } -} diff --git a/mobile/lib/presentation/widgets/action_buttons/edit_image_action_button.widget.dart b/mobile/lib/presentation/widgets/action_buttons/edit_image_action_button.widget.dart deleted file mode 100644 index 564b02d884..0000000000 --- a/mobile/lib/presentation/widgets/action_buttons/edit_image_action_button.widget.dart +++ /dev/null @@ -1,59 +0,0 @@ -import 'dart:async'; - -import 'package:auto_route/auto_route.dart'; -import 'package:flutter/material.dart'; -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:immich_mobile/constants/enums.dart'; -import 'package:immich_mobile/domain/models/asset_edit.model.dart'; -import 'package:immich_mobile/extensions/translate_extensions.dart'; -import 'package:immich_mobile/presentation/pages/edit/editor.provider.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/base_action_button.widget.dart'; -import 'package:immich_mobile/presentation/widgets/images/image_provider.dart'; -import 'package:immich_mobile/providers/asset_viewer/asset_viewer.provider.dart'; -import 'package:immich_mobile/providers/infrastructure/action.provider.dart'; -import 'package:immich_mobile/providers/infrastructure/asset.provider.dart'; -import 'package:immich_mobile/routing/router.dart'; - -class EditImageActionButton extends ConsumerWidget { - const EditImageActionButton({super.key}); - - @override - Widget build(BuildContext context, WidgetRef ref) { - final currentAsset = ref.watch(assetViewerProvider.select((s) => s.currentAsset)); - - Future editImage(List edits) async { - if (currentAsset == null || currentAsset.remoteId == null) { - return; - } - - await ref.read(actionProvider.notifier).applyEdits(ActionSource.viewer, edits); - } - - Future onPress() async { - if (currentAsset == null || currentAsset.remoteId == null) { - return; - } - - final imageProvider = getFullImageProvider(currentAsset, edited: false); - - final image = Image(image: imageProvider); - final (edits, exifInfo) = await ( - ref.read(remoteAssetRepositoryProvider).getAssetEdits(currentAsset.remoteId!), - ref.read(remoteAssetRepositoryProvider).getExif(currentAsset.remoteId!), - ).wait; - - if (exifInfo == null) { - return; - } - - ref.read(editorStateProvider.notifier).init(edits, exifInfo); - await context.pushRoute(DriftEditImageRoute(image: image, applyEdits: editImage)); - } - - return BaseActionButton( - iconData: Icons.tune, - label: "edit".t(context: context), - onPressed: onPress, - ); - } -} diff --git a/mobile/lib/presentation/widgets/action_buttons/edit_location_action_button.widget.dart b/mobile/lib/presentation/widgets/action_buttons/edit_location_action_button.widget.dart deleted file mode 100644 index 1a8a1a5c39..0000000000 --- a/mobile/lib/presentation/widgets/action_buttons/edit_location_action_button.widget.dart +++ /dev/null @@ -1,48 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:fluttertoast/fluttertoast.dart'; -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:immich_mobile/constants/enums.dart'; -import 'package:immich_mobile/extensions/translate_extensions.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/base_action_button.widget.dart'; -import 'package:immich_mobile/providers/infrastructure/action.provider.dart'; -import 'package:immich_mobile/providers/timeline/multiselect.provider.dart'; -import 'package:immich_mobile/widgets/common/immich_toast.dart'; - -class EditLocationActionButton extends ConsumerWidget { - final ActionSource source; - - const EditLocationActionButton({super.key, required this.source}); - - _onTap(BuildContext context, WidgetRef ref) async { - if (!context.mounted) { - return; - } - - final result = await ref.read(actionProvider.notifier).editLocation(source, context); - if (result == null) { - return; - } - - ref.read(multiSelectProvider.notifier).reset(); - - final successMessage = 'edit_location_action_prompt'.t(context: context, args: {'count': result.count.toString()}); - - if (context.mounted) { - ImmichToast.show( - context: context, - msg: result.success ? successMessage : 'scaffold_body_error_occurred'.t(context: context), - gravity: ToastGravity.BOTTOM, - toastType: result.success ? ToastType.success : ToastType.error, - ); - } - } - - @override - Widget build(BuildContext context, WidgetRef ref) { - return BaseActionButton( - iconData: Icons.edit_location_alt_outlined, - label: "control_bottom_app_bar_edit_location".t(context: context), - onPressed: () => _onTap(context, ref), - ); - } -} diff --git a/mobile/lib/presentation/widgets/action_buttons/favorite_action_button.widget.dart b/mobile/lib/presentation/widgets/action_buttons/favorite_action_button.widget.dart deleted file mode 100644 index 07ace7e631..0000000000 --- a/mobile/lib/presentation/widgets/action_buttons/favorite_action_button.widget.dart +++ /dev/null @@ -1,61 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:fluttertoast/fluttertoast.dart'; -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:immich_mobile/constants/enums.dart'; -import 'package:immich_mobile/domain/models/asset/base_asset.model.dart'; -import 'package:immich_mobile/extensions/translate_extensions.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/base_action_button.widget.dart'; -import 'package:immich_mobile/providers/asset_viewer/asset_viewer.provider.dart'; -import 'package:immich_mobile/providers/infrastructure/action.provider.dart'; -import 'package:immich_mobile/providers/timeline/multiselect.provider.dart'; -import 'package:immich_mobile/widgets/common/immich_toast.dart'; - -class FavoriteActionButton extends ConsumerWidget { - final ActionSource source; - final bool iconOnly; - final bool menuItem; - - const FavoriteActionButton({super.key, required this.source, this.iconOnly = false, this.menuItem = false}); - - void _onTap(BuildContext context, WidgetRef ref) async { - if (!context.mounted) { - return; - } - - final result = await ref.read(actionProvider.notifier).favorite(source); - - if (source == ActionSource.viewer) { - if (result.success) { - final currentAsset = ref.read(assetViewerProvider).currentAsset; - if (currentAsset is RemoteAsset && !currentAsset.isFavorite) { - ref.read(assetViewerProvider.notifier).setAsset(currentAsset.copyWith(isFavorite: true)); - } - } - return; - } - - ref.read(multiSelectProvider.notifier).reset(); - - final successMessage = 'favorite_action_prompt'.t(context: context, args: {'count': result.count.toString()}); - - if (context.mounted) { - ImmichToast.show( - context: context, - msg: result.success ? successMessage : 'scaffold_body_error_occurred'.t(context: context), - gravity: ToastGravity.BOTTOM, - toastType: result.success ? ToastType.success : ToastType.error, - ); - } - } - - @override - Widget build(BuildContext context, WidgetRef ref) { - return BaseActionButton( - iconData: Icons.favorite_border_rounded, - label: "favorite".t(context: context), - iconOnly: iconOnly, - menuItem: menuItem, - onPressed: () => _onTap(context, ref), - ); - } -} diff --git a/mobile/lib/presentation/widgets/action_buttons/like_activity_action_button.widget.dart b/mobile/lib/presentation/widgets/action_buttons/like_activity_action_button.widget.dart index 4cb973cca1..e39a76ef02 100644 --- a/mobile/lib/presentation/widgets/action_buttons/like_activity_action_button.widget.dart +++ b/mobile/lib/presentation/widgets/action_buttons/like_activity_action_button.widget.dart @@ -1,9 +1,8 @@ import 'package:collection/collection.dart'; -import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; import 'package:immich_mobile/domain/models/asset/base_asset.model.dart'; -import 'package:immich_mobile/extensions/translate_extensions.dart'; +import 'package:immich_mobile/generated/translations.g.dart'; import 'package:immich_mobile/models/activities/activity.model.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/base_action_button.widget.dart'; import 'package:immich_mobile/providers/activity.provider.dart'; @@ -25,7 +24,7 @@ class LikeActivityActionButton extends ConsumerWidget { final activities = ref.watch(albumActivityProvider((album?.id ?? "", asset?.id))); - onTap(Activity? liked) async { + Future onTap(Activity? liked) async { if (user == null) { return; } @@ -48,7 +47,7 @@ class LikeActivityActionButton extends ConsumerWidget { return BaseActionButton( maxWidth: 60, iconData: liked != null ? Icons.thumb_up : Icons.thumb_up_off_alt, - label: "like".t(context: context), + label: context.t.like, onPressed: () => onTap(liked), iconOnly: iconOnly, menuItem: menuItem, @@ -58,11 +57,11 @@ class LikeActivityActionButton extends ConsumerWidget { // default to empty heart during loading loading: () => BaseActionButton( iconData: Icons.thumb_up_off_alt, - label: "like".t(context: context), + label: context.t.like, iconOnly: iconOnly, menuItem: menuItem, ), - error: (error, stack) => Text('error_saving_image'.tr(args: [error.toString()])), + error: (error, stack) => Text(context.t.error_saving_image(error: error.toString())), ); } } diff --git a/mobile/lib/presentation/widgets/action_buttons/motion_photo_action_button.widget.dart b/mobile/lib/presentation/widgets/action_buttons/motion_photo_action_button.widget.dart index 3bd67978e2..6be8a6b023 100644 --- a/mobile/lib/presentation/widgets/action_buttons/motion_photo_action_button.widget.dart +++ b/mobile/lib/presentation/widgets/action_buttons/motion_photo_action_button.widget.dart @@ -1,6 +1,6 @@ import 'package:flutter/material.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:immich_mobile/extensions/translate_extensions.dart'; +import 'package:immich_mobile/generated/translations.g.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/base_action_button.widget.dart'; import 'package:immich_mobile/providers/asset_viewer/is_motion_video_playing.provider.dart'; @@ -16,8 +16,8 @@ class MotionPhotoActionButton extends ConsumerWidget { return BaseActionButton( iconData: isPlaying ? Icons.motion_photos_pause_outlined : Icons.play_circle_outline_rounded, - label: "play_motion_photo".t(context: context), - onPressed: ref.read(isPlayingMotionVideoProvider.notifier).toggle, + label: context.t.play_motion_photo, + onPressed: ref.watch(isPlayingMotionVideoProvider.notifier).toggle, iconOnly: iconOnly, menuItem: menuItem, ); diff --git a/mobile/lib/presentation/widgets/action_buttons/move_to_lock_folder_action_button.widget.dart b/mobile/lib/presentation/widgets/action_buttons/move_to_lock_folder_action_button.widget.dart deleted file mode 100644 index 56191e9055..0000000000 --- a/mobile/lib/presentation/widgets/action_buttons/move_to_lock_folder_action_button.widget.dart +++ /dev/null @@ -1,63 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:fluttertoast/fluttertoast.dart'; -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:immich_mobile/constants/enums.dart'; -import 'package:immich_mobile/domain/models/events.model.dart'; -import 'package:immich_mobile/domain/utils/event_stream.dart'; -import 'package:immich_mobile/extensions/translate_extensions.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/base_action_button.widget.dart'; -import 'package:immich_mobile/providers/infrastructure/action.provider.dart'; -import 'package:immich_mobile/providers/timeline/multiselect.provider.dart'; -import 'package:immich_mobile/widgets/common/immich_toast.dart'; - -// Reusable helper: move to locked folder from any source (e.g called from menu) -Future performMoveToLockFolderAction(BuildContext context, WidgetRef ref, {required ActionSource source}) async { - if (!context.mounted) { - return; - } - - if (source == ActionSource.viewer) { - EventStream.shared.emit(const ViewerReloadAssetEvent()); - } - - final result = await ref.read(actionProvider.notifier).moveToLockFolder(source); - ref.read(multiSelectProvider.notifier).reset(); - - final successMessage = 'move_to_lock_folder_action_prompt'.t( - context: context, - args: {'count': result.count.toString()}, - ); - - if (context.mounted) { - ImmichToast.show( - context: context, - msg: result.success ? successMessage : 'scaffold_body_error_occurred'.t(context: context), - gravity: ToastGravity.BOTTOM, - toastType: result.success ? ToastType.success : ToastType.error, - ); - } -} - -class MoveToLockFolderActionButton extends ConsumerWidget { - final ActionSource source; - final bool iconOnly; - final bool menuItem; - - const MoveToLockFolderActionButton({super.key, required this.source, this.iconOnly = false, this.menuItem = false}); - - Future _onTap(BuildContext context, WidgetRef ref) async { - await performMoveToLockFolderAction(context, ref, source: source); - } - - @override - Widget build(BuildContext context, WidgetRef ref) { - return BaseActionButton( - maxWidth: 115.0, - iconData: Icons.lock_outline_rounded, - label: "move_to_locked_folder".t(context: context), - iconOnly: iconOnly, - menuItem: menuItem, - onPressed: () => _onTap(context, ref), - ); - } -} diff --git a/mobile/lib/presentation/widgets/action_buttons/open_in_browser_action_button.widget.dart b/mobile/lib/presentation/widgets/action_buttons/open_in_browser_action_button.widget.dart deleted file mode 100644 index 541a9f8093..0000000000 --- a/mobile/lib/presentation/widgets/action_buttons/open_in_browser_action_button.widget.dart +++ /dev/null @@ -1,58 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:immich_mobile/domain/models/store.model.dart'; -import 'package:immich_mobile/domain/services/timeline.service.dart'; -import 'package:immich_mobile/entities/store.entity.dart'; -import 'package:immich_mobile/extensions/translate_extensions.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/base_action_button.widget.dart'; -import 'package:url_launcher/url_launcher.dart'; - -class OpenInBrowserActionButton extends ConsumerWidget { - final String remoteId; - final TimelineOrigin origin; - final bool iconOnly; - final bool menuItem; - - const OpenInBrowserActionButton({ - super.key, - required this.remoteId, - required this.origin, - this.iconOnly = false, - this.menuItem = false, - }); - - void _onTap() async { - final serverEndpoint = Store.get(StoreKey.serverEndpoint).replaceFirst('/api', ''); - - String originPath = ''; - switch (origin) { - case TimelineOrigin.favorite: - originPath = '/favorites'; - break; - case TimelineOrigin.trash: - originPath = '/trash'; - break; - case TimelineOrigin.archive: - originPath = '/archive'; - break; - default: - break; - } - - final url = '$serverEndpoint$originPath/photos/$remoteId'; - if (await canLaunchUrl(Uri.parse(url))) { - await launchUrl(Uri.parse(url), mode: LaunchMode.externalApplication); - } - } - - @override - Widget build(BuildContext context, WidgetRef ref) { - return BaseActionButton( - label: 'open_in_browser'.t(context: context), - iconData: Icons.open_in_browser, - iconOnly: iconOnly, - menuItem: menuItem, - onPressed: _onTap, - ); - } -} diff --git a/mobile/lib/presentation/widgets/action_buttons/remove_from_album_action_button.widget.dart b/mobile/lib/presentation/widgets/action_buttons/remove_from_album_action_button.widget.dart deleted file mode 100644 index 97a36a56dc..0000000000 --- a/mobile/lib/presentation/widgets/action_buttons/remove_from_album_action_button.widget.dart +++ /dev/null @@ -1,65 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:fluttertoast/fluttertoast.dart'; -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:immich_mobile/constants/enums.dart'; -import 'package:immich_mobile/domain/models/events.model.dart'; -import 'package:immich_mobile/domain/utils/event_stream.dart'; -import 'package:immich_mobile/extensions/translate_extensions.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/base_action_button.widget.dart'; -import 'package:immich_mobile/providers/infrastructure/action.provider.dart'; -import 'package:immich_mobile/providers/timeline/multiselect.provider.dart'; -import 'package:immich_mobile/widgets/common/immich_toast.dart'; - -class RemoveFromAlbumActionButton extends ConsumerWidget { - final String albumId; - final ActionSource source; - final bool iconOnly; - final bool menuItem; - - const RemoveFromAlbumActionButton({ - super.key, - required this.albumId, - required this.source, - this.iconOnly = false, - this.menuItem = false, - }); - - void _onTap(BuildContext context, WidgetRef ref) async { - if (!context.mounted) { - return; - } - - if (source == ActionSource.viewer) { - EventStream.shared.emit(const ViewerReloadAssetEvent()); - } - - final result = await ref.read(actionProvider.notifier).removeFromAlbum(source, albumId); - ref.read(multiSelectProvider.notifier).reset(); - - final successMessage = 'remove_from_album_action_prompt'.t( - context: context, - args: {'count': result.count.toString()}, - ); - - if (context.mounted) { - ImmichToast.show( - context: context, - msg: result.success ? successMessage : 'scaffold_body_error_occurred'.t(context: context), - gravity: ToastGravity.BOTTOM, - toastType: result.success ? ToastType.success : ToastType.error, - ); - } - } - - @override - Widget build(BuildContext context, WidgetRef ref) { - return BaseActionButton( - iconData: Icons.remove_circle_outline, - label: "remove_from_album".t(context: context), - iconOnly: iconOnly, - menuItem: menuItem, - onPressed: () => _onTap(context, ref), - maxWidth: 100, - ); - } -} diff --git a/mobile/lib/presentation/widgets/action_buttons/remove_from_lock_folder_action_button.widget.dart b/mobile/lib/presentation/widgets/action_buttons/remove_from_lock_folder_action_button.widget.dart deleted file mode 100644 index 17d2a76af7..0000000000 --- a/mobile/lib/presentation/widgets/action_buttons/remove_from_lock_folder_action_button.widget.dart +++ /dev/null @@ -1,57 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:fluttertoast/fluttertoast.dart'; -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:immich_mobile/constants/enums.dart'; -import 'package:immich_mobile/extensions/translate_extensions.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/base_action_button.widget.dart'; -import 'package:immich_mobile/providers/infrastructure/action.provider.dart'; -import 'package:immich_mobile/providers/timeline/multiselect.provider.dart'; -import 'package:immich_mobile/widgets/common/immich_toast.dart'; - -class RemoveFromLockFolderActionButton extends ConsumerWidget { - final ActionSource source; - final bool iconOnly; - final bool menuItem; - - const RemoveFromLockFolderActionButton({ - super.key, - required this.source, - this.iconOnly = false, - this.menuItem = false, - }); - - void _onTap(BuildContext context, WidgetRef ref) async { - if (!context.mounted) { - return; - } - - final result = await ref.read(actionProvider.notifier).removeFromLockFolder(source); - ref.read(multiSelectProvider.notifier).reset(); - - final successMessage = 'remove_from_lock_folder_action_prompt'.t( - context: context, - args: {'count': result.count.toString()}, - ); - - if (context.mounted) { - ImmichToast.show( - context: context, - msg: result.success ? successMessage : 'scaffold_body_error_occurred'.t(context: context), - gravity: ToastGravity.BOTTOM, - toastType: result.success ? ToastType.success : ToastType.error, - ); - } - } - - @override - Widget build(BuildContext context, WidgetRef ref) { - return BaseActionButton( - maxWidth: 100.0, - iconData: Icons.lock_open_rounded, - label: "remove_from_locked_folder".t(context: context), - iconOnly: iconOnly, - menuItem: menuItem, - onPressed: () => _onTap(context, ref), - ); - } -} diff --git a/mobile/lib/presentation/widgets/action_buttons/restore_action_button.widget.dart b/mobile/lib/presentation/widgets/action_buttons/restore_action_button.widget.dart deleted file mode 100644 index 1713718967..0000000000 --- a/mobile/lib/presentation/widgets/action_buttons/restore_action_button.widget.dart +++ /dev/null @@ -1,55 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:fluttertoast/fluttertoast.dart'; -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:immich_mobile/constants/enums.dart'; -import 'package:immich_mobile/domain/models/events.model.dart'; -import 'package:immich_mobile/domain/utils/event_stream.dart'; -import 'package:immich_mobile/extensions/translate_extensions.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/base_action_button.widget.dart'; -import 'package:immich_mobile/providers/infrastructure/action.provider.dart'; -import 'package:immich_mobile/providers/timeline/multiselect.provider.dart'; -import 'package:immich_mobile/widgets/common/immich_toast.dart'; - -class RestoreActionButton extends ConsumerWidget { - final ActionSource source; - final bool iconOnly; - final bool menuItem; - - const RestoreActionButton({super.key, required this.source, this.iconOnly = false, this.menuItem = false}); - - void _onTap(BuildContext context, WidgetRef ref) async { - if (!context.mounted) { - return; - } - - final result = await ref.read(actionProvider.notifier).restoreTrash(source); - ref.read(multiSelectProvider.notifier).reset(); - - if (source == ActionSource.viewer) { - EventStream.shared.emit(const ViewerReloadAssetEvent()); - } - - final successMessage = 'assets_restored_count'.t(context: context, args: {'count': result.count.toString()}); - - if (context.mounted) { - ImmichToast.show( - context: context, - msg: result.success ? successMessage : 'scaffold_body_error_occurred'.t(context: context), - gravity: ToastGravity.BOTTOM, - toastType: result.success ? ToastType.success : ToastType.error, - ); - } - } - - @override - Widget build(BuildContext context, WidgetRef ref) { - return BaseActionButton( - iconData: Icons.history_rounded, - label: 'restore'.t(context: context), - iconOnly: iconOnly, - menuItem: menuItem, - onPressed: () => _onTap(context, ref), - maxWidth: 100.0, - ); - } -} diff --git a/mobile/lib/presentation/widgets/action_buttons/restore_trash_action_button.widget.dart b/mobile/lib/presentation/widgets/action_buttons/restore_trash_action_button.widget.dart deleted file mode 100644 index e7928bd325..0000000000 --- a/mobile/lib/presentation/widgets/action_buttons/restore_trash_action_button.widget.dart +++ /dev/null @@ -1,43 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:fluttertoast/fluttertoast.dart'; -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:immich_mobile/constants/enums.dart'; -import 'package:immich_mobile/extensions/translate_extensions.dart'; -import 'package:immich_mobile/providers/infrastructure/action.provider.dart'; -import 'package:immich_mobile/providers/timeline/multiselect.provider.dart'; -import 'package:immich_mobile/widgets/common/immich_toast.dart'; - -class RestoreTrashActionButton extends ConsumerWidget { - final ActionSource source; - - const RestoreTrashActionButton({super.key, required this.source}); - - void _onTap(BuildContext context, WidgetRef ref) async { - if (!context.mounted) { - return; - } - - final result = await ref.read(actionProvider.notifier).restoreTrash(source); - ref.read(multiSelectProvider.notifier).reset(); - - final successMessage = 'assets_restored_count'.t(context: context, args: {'count': result.count.toString()}); - - if (context.mounted) { - ImmichToast.show( - context: context, - msg: result.success ? successMessage : 'scaffold_body_error_occurred'.t(context: context), - gravity: ToastGravity.BOTTOM, - toastType: result.success ? ToastType.success : ToastType.error, - ); - } - } - - @override - Widget build(BuildContext context, WidgetRef ref) { - return TextButton.icon( - icon: const Icon(Icons.history_rounded), - label: Text('restore'.t(), style: const TextStyle(fontSize: 14, fontWeight: FontWeight.bold)), - onPressed: () => _onTap(context, ref), - ); - } -} diff --git a/mobile/lib/presentation/widgets/action_buttons/set_album_cover.widget.dart b/mobile/lib/presentation/widgets/action_buttons/set_album_cover.widget.dart deleted file mode 100644 index 1d704aafe8..0000000000 --- a/mobile/lib/presentation/widgets/action_buttons/set_album_cover.widget.dart +++ /dev/null @@ -1,56 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:fluttertoast/fluttertoast.dart'; -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:immich_mobile/constants/enums.dart'; -import 'package:immich_mobile/extensions/translate_extensions.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/base_action_button.widget.dart'; -import 'package:immich_mobile/providers/infrastructure/action.provider.dart'; -import 'package:immich_mobile/providers/timeline/multiselect.provider.dart'; -import 'package:immich_mobile/widgets/common/immich_toast.dart'; - -class SetAlbumCoverActionButton extends ConsumerWidget { - final String albumId; - final ActionSource source; - final bool iconOnly; - final bool menuItem; - - const SetAlbumCoverActionButton({ - super.key, - required this.albumId, - required this.source, - this.iconOnly = false, - this.menuItem = false, - }); - - void _onTap(BuildContext context, WidgetRef ref) async { - if (!context.mounted) { - return; - } - - final result = await ref.read(actionProvider.notifier).setAlbumCover(source, albumId); - ref.read(multiSelectProvider.notifier).reset(); - - final successMessage = 'album_cover_updated'.t(context: context); - - if (context.mounted) { - ImmichToast.show( - context: context, - msg: result.success ? successMessage : 'scaffold_body_error_occurred'.t(context: context), - gravity: ToastGravity.BOTTOM, - toastType: result.success ? ToastType.success : ToastType.error, - ); - } - } - - @override - Widget build(BuildContext context, WidgetRef ref) { - return BaseActionButton( - iconData: Icons.image_outlined, - label: 'set_as_album_cover'.t(context: context), - iconOnly: iconOnly, - menuItem: menuItem, - onPressed: () => _onTap(context, ref), - maxWidth: 100, - ); - } -} diff --git a/mobile/lib/presentation/widgets/action_buttons/set_profile_picture_action_button.widget.dart b/mobile/lib/presentation/widgets/action_buttons/set_profile_picture_action_button.widget.dart deleted file mode 100644 index c8dbb7cb1f..0000000000 --- a/mobile/lib/presentation/widgets/action_buttons/set_profile_picture_action_button.widget.dart +++ /dev/null @@ -1,35 +0,0 @@ -import 'package:auto_route/auto_route.dart'; -import 'package:flutter/material.dart'; -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:immich_mobile/domain/models/asset/base_asset.model.dart'; -import 'package:immich_mobile/extensions/translate_extensions.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/base_action_button.widget.dart'; -import 'package:immich_mobile/routing/router.dart'; - -class SetProfilePictureActionButton extends ConsumerWidget { - final BaseAsset asset; - final bool iconOnly; - final bool menuItem; - - const SetProfilePictureActionButton({super.key, required this.asset, this.iconOnly = false, this.menuItem = false}); - - void _onTap(BuildContext context) { - if (!context.mounted) { - return; - } - - context.pushRoute(ProfilePictureCropRoute(asset: asset)); - } - - @override - Widget build(BuildContext context, WidgetRef ref) { - return BaseActionButton( - iconData: Icons.account_circle_outlined, - label: "set_as_profile_picture".t(context: context), - iconOnly: iconOnly, - menuItem: menuItem, - onPressed: () => _onTap(context), - maxWidth: 100, - ); - } -} diff --git a/mobile/lib/presentation/widgets/action_buttons/share_action_button.widget.dart b/mobile/lib/presentation/widgets/action_buttons/share_action_button.widget.dart deleted file mode 100644 index 53bd15b457..0000000000 --- a/mobile/lib/presentation/widgets/action_buttons/share_action_button.widget.dart +++ /dev/null @@ -1,200 +0,0 @@ -import 'dart:async'; -import 'dart:io'; - -import 'package:easy_localization/easy_localization.dart'; -import 'package:flutter/material.dart'; -import 'package:fluttertoast/fluttertoast.dart'; -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:immich_mobile/constants/enums.dart'; -import 'package:immich_mobile/domain/models/asset/base_asset.model.dart'; -import 'package:immich_mobile/domain/models/settings_key.dart'; -import 'package:immich_mobile/extensions/build_context_extensions.dart'; -import 'package:immich_mobile/generated/translations.g.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/base_action_button.widget.dart'; -import 'package:immich_mobile/providers/asset_viewer/asset_viewer.provider.dart'; -import 'package:immich_mobile/providers/infrastructure/action.provider.dart'; -import 'package:immich_mobile/providers/infrastructure/settings.provider.dart'; -import 'package:immich_mobile/providers/timeline/multiselect.provider.dart'; -import 'package:immich_mobile/widgets/common/immich_toast.dart'; - -class _SharePreparingDialog extends StatelessWidget { - final ValueNotifier progress; - - const _SharePreparingDialog({required this.progress}); - - @override - Widget build(BuildContext context) { - return AlertDialog( - content: Column( - mainAxisSize: MainAxisSize.min, - children: [ - Container(margin: const EdgeInsets.only(bottom: 12), child: const Text('share_dialog_preparing').tr()), - SizedBox( - width: 240, - child: ValueListenableBuilder( - valueListenable: progress, - builder: (context, value, _) { - final percent = value == null ? null : (value * 100).clamp(0, 100); - return Column( - mainAxisSize: MainAxisSize.min, - children: [ - LinearProgressIndicator(value: value, minHeight: 8.0), - if (percent != null) - Container(margin: const EdgeInsets.only(top: 8), child: Text('${percent.toStringAsFixed(0)}%')), - ], - ); - }, - ), - ), - ], - ), - ); - } -} - -class _ShareFileTypeDialog extends StatelessWidget { - final bool showPreview; - - const _ShareFileTypeDialog({this.showPreview = true}); - - @override - Widget build(BuildContext context) { - return AlertDialog( - title: Text(context.t.select_quality), - contentPadding: const EdgeInsets.symmetric(vertical: 8), - content: Column( - mainAxisSize: MainAxisSize.min, - children: [ - ListTile( - leading: const Icon(Icons.high_quality_rounded), - title: Text(context.t.share_original), - onTap: () => context.pop(ShareAssetType.original), - ), - if (showPreview) - ListTile( - leading: const Icon(Icons.photo_size_select_large_rounded), - title: Text(context.t.share_preview), - onTap: () => context.pop(ShareAssetType.preview), - ), - ], - ), - actions: [TextButton(onPressed: () => context.pop(), child: Text(context.t.cancel))], - ); - } -} - -class ShareActionButton extends ConsumerWidget { - final ActionSource source; - final bool iconOnly; - final bool menuItem; - - const ShareActionButton({super.key, required this.source, this.iconOnly = false, this.menuItem = false}); - - Set _getSelectedAssets(WidgetRef ref) { - return switch (source) { - ActionSource.timeline => ref.read(multiSelectProvider).selectedAssets, - ActionSource.viewer => switch (ref.read(assetViewerProvider).currentAsset) { - BaseAsset asset => {asset}, - null => const {}, - }, - }; - } - - void _onTap(BuildContext context, WidgetRef ref) async { - if (!context.mounted) { - return; - } - - final fileType = ref.read(appConfigProvider).share.fileType; - await _share(context, ref, fileType); - } - - void _onLongPress(BuildContext context, WidgetRef ref) async { - if (!context.mounted) { - return; - } - - // only show preview option when at least one of the assets is not a video - // we cant share previews of videos - final assets = _getSelectedAssets(ref); - final showPreview = assets.isEmpty || assets.any((asset) => !asset.isVideo); - - final fileType = await showDialog( - context: context, - builder: (_) => _ShareFileTypeDialog(showPreview: showPreview), - useRootNavigator: false, - ); - - if (fileType == null || !context.mounted) { - return; - } - - await ref.read(settingsProvider).write(SettingsKey.shareFileType, fileType); - - if (!context.mounted) { - return; - } - - await _share(context, ref, fileType); - } - - Future _share(BuildContext context, WidgetRef ref, ShareAssetType fileType) async { - final cancelCompleter = Completer(); - final progress = ValueNotifier(null); - final preparingDialog = _SharePreparingDialog(progress: progress); - await showDialog( - context: context, - builder: (BuildContext buildContext) { - ref - .read(actionProvider.notifier) - .shareAssets( - source, - context, - fileType: fileType, - cancelCompleter: cancelCompleter, - onAssetDownloadProgress: (value) => progress.value = value, - ) - .then((ActionResult result) { - if (cancelCompleter.isCompleted || !context.mounted) { - return; - } - - ref.read(multiSelectProvider.notifier).reset(); - - if (!result.success) { - ImmichToast.show( - context: context, - msg: context.t.scaffold_body_error_occurred, - gravity: ToastGravity.BOTTOM, - toastType: ToastType.error, - ); - } - - buildContext.pop(); - }); - - // Show download progress with a "Preparing" message - return preparingDialog; - }, - barrierDismissible: false, - useRootNavigator: false, - ).then((_) { - if (!cancelCompleter.isCompleted) { - cancelCompleter.complete(); - } - progress.dispose(); - }); - } - - @override - Widget build(BuildContext context, WidgetRef ref) { - return BaseActionButton( - iconData: Platform.isAndroid ? Icons.share_rounded : Icons.ios_share_rounded, - label: context.t.share, - iconOnly: iconOnly, - menuItem: menuItem, - onPressed: () => _onTap(context, ref), - onLongPressed: () => _onLongPress(context, ref), - ); - } -} diff --git a/mobile/lib/presentation/widgets/action_buttons/share_link_action_button.widget.dart b/mobile/lib/presentation/widgets/action_buttons/share_link_action_button.widget.dart deleted file mode 100644 index b8dc69f515..0000000000 --- a/mobile/lib/presentation/widgets/action_buttons/share_link_action_button.widget.dart +++ /dev/null @@ -1,33 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:immich_mobile/constants/enums.dart'; -import 'package:immich_mobile/extensions/translate_extensions.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/base_action_button.widget.dart'; -import 'package:immich_mobile/providers/infrastructure/action.provider.dart'; - -class ShareLinkActionButton extends ConsumerWidget { - final ActionSource source; - final bool iconOnly; - final bool menuItem; - - const ShareLinkActionButton({super.key, required this.source, this.iconOnly = false, this.menuItem = false}); - - _onTap(BuildContext context, WidgetRef ref) async { - if (!context.mounted) { - return; - } - - await ref.read(actionProvider.notifier).shareLink(source, context); - } - - @override - Widget build(BuildContext context, WidgetRef ref) { - return BaseActionButton( - iconData: Icons.link_rounded, - label: "share_link".t(context: context), - iconOnly: iconOnly, - menuItem: menuItem, - onPressed: () => _onTap(context, ref), - ); - } -} 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 deleted file mode 100644 index 42dcfa683a..0000000000 --- a/mobile/lib/presentation/widgets/action_buttons/similar_photos_action_button.widget.dart +++ /dev/null @@ -1,58 +0,0 @@ -import 'dart:async'; - -import 'package:auto_route/auto_route.dart'; -import 'package:flutter/material.dart'; -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:immich_mobile/domain/models/asset/base_asset.model.dart'; -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/action_buttons/base_action_button.widget.dart'; -import 'package:immich_mobile/providers/asset_viewer/asset_viewer.provider.dart'; -import 'package:immich_mobile/routing/router.dart'; - -class SimilarPhotosActionButton extends ConsumerWidget { - final String assetId; - final bool iconOnly; - final bool menuItem; - - const SimilarPhotosActionButton({super.key, required this.assetId, this.iconOnly = false, this.menuItem = false}); - - void _onTap(BuildContext context, WidgetRef ref) async { - if (!context.mounted) { - return; - } - - ref.invalidate(assetViewerProvider); - ref.invalidate(paginatedSearchProvider); - - ref.read(searchPreFilterProvider.notifier) - ..clear() - ..setFilter( - SearchFilter( - assetId: assetId, - people: {}, - location: SearchLocationFilter(), - camera: SearchCameraFilter(), - date: SearchDateFilter(), - display: SearchDisplayFilters(isNotInAlbum: false, isArchive: false, isFavorite: false), - rating: SearchRatingFilter(), - mediaType: AssetType.other, - ), - ); - - unawaited(context.navigateTo(const DriftSearchRoute())); - } - - @override - Widget build(BuildContext context, WidgetRef ref) { - return BaseActionButton( - iconData: Icons.compare, - label: "view_similar_photos".t(context: context), - iconOnly: iconOnly, - menuItem: menuItem, - onPressed: () => _onTap(context, ref), - maxWidth: 100, - ); - } -} diff --git a/mobile/lib/presentation/widgets/action_buttons/slideshow_action_button.widget.dart b/mobile/lib/presentation/widgets/action_buttons/slideshow_action_button.widget.dart deleted file mode 100644 index 479cf2dfe9..0000000000 --- a/mobile/lib/presentation/widgets/action_buttons/slideshow_action_button.widget.dart +++ /dev/null @@ -1,34 +0,0 @@ -import 'package:auto_route/auto_route.dart'; -import 'package:flutter/material.dart'; -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:immich_mobile/extensions/translate_extensions.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/base_action_button.widget.dart'; -import 'package:immich_mobile/providers/infrastructure/timeline.provider.dart'; -import 'package:immich_mobile/routing/router.dart'; - -class SlideshowActionButton extends ConsumerWidget { - final bool iconOnly; - final bool menuItem; - - const SlideshowActionButton({super.key, this.iconOnly = false, this.menuItem = false}); - - void _onTap(BuildContext context, WidgetRef ref) { - if (!context.mounted) { - return; - } - - context.pushRoute(DriftSlideshowRoute(timeline: ref.read(timelineServiceProvider))); - } - - @override - Widget build(BuildContext context, WidgetRef ref) { - return BaseActionButton( - iconData: Icons.slideshow, - label: "slideshow".t(context: context), - iconOnly: iconOnly, - menuItem: menuItem, - onPressed: () => _onTap(context, ref), - maxWidth: 100, - ); - } -} diff --git a/mobile/lib/presentation/widgets/action_buttons/stack_action_button.widget.dart b/mobile/lib/presentation/widgets/action_buttons/stack_action_button.widget.dart deleted file mode 100644 index 22fccf5473..0000000000 --- a/mobile/lib/presentation/widgets/action_buttons/stack_action_button.widget.dart +++ /dev/null @@ -1,50 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:fluttertoast/fluttertoast.dart'; -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:immich_mobile/constants/enums.dart'; -import 'package:immich_mobile/extensions/translate_extensions.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/base_action_button.widget.dart'; -import 'package:immich_mobile/providers/infrastructure/action.provider.dart'; -import 'package:immich_mobile/providers/timeline/multiselect.provider.dart'; -import 'package:immich_mobile/providers/user.provider.dart'; -import 'package:immich_mobile/widgets/common/immich_toast.dart'; - -class StackActionButton extends ConsumerWidget { - final ActionSource source; - - const StackActionButton({super.key, required this.source}); - - void _onTap(BuildContext context, WidgetRef ref) async { - if (!context.mounted) { - return; - } - - final user = ref.watch(currentUserProvider); - if (user == null) { - throw Exception('User must be logged in to access stack action'); - } - - final result = await ref.read(actionProvider.notifier).stack(user.id, source); - ref.read(multiSelectProvider.notifier).reset(); - - final successMessage = 'stack_action_prompt'.t(context: context, args: {'count': result.count.toString()}); - - if (context.mounted) { - ImmichToast.show( - context: context, - msg: result.success ? successMessage : 'scaffold_body_error_occurred'.t(context: context), - gravity: ToastGravity.BOTTOM, - toastType: result.success ? ToastType.success : ToastType.error, - ); - } - } - - @override - Widget build(BuildContext context, WidgetRef ref) { - return BaseActionButton( - iconData: Icons.filter_none_rounded, - label: "stack".t(context: context), - onPressed: () => _onTap(context, ref), - ); - } -} diff --git a/mobile/lib/presentation/widgets/action_buttons/trash_action_button.widget.dart b/mobile/lib/presentation/widgets/action_buttons/trash_action_button.widget.dart deleted file mode 100644 index e95569af45..0000000000 --- a/mobile/lib/presentation/widgets/action_buttons/trash_action_button.widget.dart +++ /dev/null @@ -1,58 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:fluttertoast/fluttertoast.dart'; -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:immich_mobile/constants/enums.dart'; -import 'package:immich_mobile/domain/models/events.model.dart'; -import 'package:immich_mobile/domain/utils/event_stream.dart'; -import 'package:immich_mobile/extensions/translate_extensions.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/base_action_button.widget.dart'; -import 'package:immich_mobile/providers/infrastructure/action.provider.dart'; -import 'package:immich_mobile/providers/timeline/multiselect.provider.dart'; -import 'package:immich_mobile/widgets/common/immich_toast.dart'; - -/// This delete action has the following behavior: -/// - Set the deletedAt information, put the asset in the trash in the server -/// which will be permanently deleted after the number of days configure by the admin -class TrashActionButton extends ConsumerWidget { - final ActionSource source; - final bool iconOnly; - final bool menuItem; - - const TrashActionButton({super.key, required this.source, this.iconOnly = false, this.menuItem = false}); - - void _onTap(BuildContext context, WidgetRef ref) async { - if (!context.mounted) { - return; - } - - if (source == ActionSource.viewer) { - EventStream.shared.emit(const ViewerReloadAssetEvent()); - } - - final result = await ref.read(actionProvider.notifier).trash(source); - ref.read(multiSelectProvider.notifier).reset(); - - final successMessage = 'trash_action_prompt'.t(context: context, args: {'count': result.count.toString()}); - - if (context.mounted) { - ImmichToast.show( - context: context, - msg: result.success ? successMessage : 'scaffold_body_error_occurred'.t(context: context), - gravity: ToastGravity.BOTTOM, - toastType: result.success ? ToastType.success : ToastType.error, - ); - } - } - - @override - Widget build(BuildContext context, WidgetRef ref) { - return BaseActionButton( - maxWidth: 85.0, - iconData: Icons.delete_outline_rounded, - label: "control_bottom_app_bar_trash_from_immich".t(context: context), - iconOnly: iconOnly, - menuItem: menuItem, - onPressed: () => _onTap(context, ref), - ); - } -} diff --git a/mobile/lib/presentation/widgets/action_buttons/unarchive_action_button.widget.dart b/mobile/lib/presentation/widgets/action_buttons/unarchive_action_button.widget.dart deleted file mode 100644 index 57221303a8..0000000000 --- a/mobile/lib/presentation/widgets/action_buttons/unarchive_action_button.widget.dart +++ /dev/null @@ -1,61 +0,0 @@ -// dart -// File: `lib/presentation/widgets/action_buttons/unarchive_action_button.widget.dart` -import 'package:flutter/material.dart'; -import 'package:fluttertoast/fluttertoast.dart'; -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:immich_mobile/constants/enums.dart'; -import 'package:immich_mobile/extensions/translate_extensions.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/base_action_button.widget.dart'; -import 'package:immich_mobile/providers/infrastructure/action.provider.dart'; -import 'package:immich_mobile/providers/timeline/multiselect.provider.dart'; -import 'package:immich_mobile/widgets/common/immich_toast.dart'; -import 'package:immich_mobile/domain/models/events.model.dart'; -import 'package:immich_mobile/domain/utils/event_stream.dart'; - -// used to allow performing unarchive action from different sources (without duplicating code) -Future performUnArchiveAction(BuildContext context, WidgetRef ref, {required ActionSource source}) async { - if (!context.mounted) { - return; - } - - if (source == ActionSource.viewer) { - EventStream.shared.emit(const ViewerReloadAssetEvent()); - } - - final result = await ref.read(actionProvider.notifier).unArchive(source); - ref.read(multiSelectProvider.notifier).reset(); - - final successMessage = 'unarchive_action_prompt'.t(context: context, args: {'count': result.count.toString()}); - - if (context.mounted) { - ImmichToast.show( - context: context, - msg: result.success ? successMessage : 'scaffold_body_error_occurred'.t(context: context), - gravity: ToastGravity.BOTTOM, - toastType: result.success ? ToastType.success : ToastType.error, - ); - } -} - -class UnArchiveActionButton extends ConsumerWidget { - final ActionSource source; - final bool iconOnly; - final bool menuItem; - - const UnArchiveActionButton({super.key, required this.source, this.iconOnly = false, this.menuItem = false}); - - Future _onTap(BuildContext context, WidgetRef ref) async { - await performUnArchiveAction(context, ref, source: source); - } - - @override - Widget build(BuildContext context, WidgetRef ref) { - return BaseActionButton( - iconData: Icons.unarchive_outlined, - label: "unarchive".t(context: context), - iconOnly: iconOnly, - menuItem: menuItem, - onPressed: () => _onTap(context, ref), - ); - } -} diff --git a/mobile/lib/presentation/widgets/action_buttons/unfavorite_action_button.widget.dart b/mobile/lib/presentation/widgets/action_buttons/unfavorite_action_button.widget.dart deleted file mode 100644 index 5e88735d9c..0000000000 --- a/mobile/lib/presentation/widgets/action_buttons/unfavorite_action_button.widget.dart +++ /dev/null @@ -1,61 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:fluttertoast/fluttertoast.dart'; -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:immich_mobile/constants/enums.dart'; -import 'package:immich_mobile/domain/models/asset/base_asset.model.dart'; -import 'package:immich_mobile/extensions/translate_extensions.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/base_action_button.widget.dart'; -import 'package:immich_mobile/providers/asset_viewer/asset_viewer.provider.dart'; -import 'package:immich_mobile/providers/infrastructure/action.provider.dart'; -import 'package:immich_mobile/providers/timeline/multiselect.provider.dart'; -import 'package:immich_mobile/widgets/common/immich_toast.dart'; - -class UnFavoriteActionButton extends ConsumerWidget { - final ActionSource source; - final bool iconOnly; - final bool menuItem; - - const UnFavoriteActionButton({super.key, required this.source, this.iconOnly = false, this.menuItem = false}); - - void _onTap(BuildContext context, WidgetRef ref) async { - if (!context.mounted) { - return; - } - - final result = await ref.read(actionProvider.notifier).unFavorite(source); - - if (source == ActionSource.viewer) { - if (result.success) { - final currentAsset = ref.read(assetViewerProvider).currentAsset; - if (currentAsset is RemoteAsset && currentAsset.isFavorite) { - ref.read(assetViewerProvider.notifier).setAsset(currentAsset.copyWith(isFavorite: false)); - } - } - return; - } - - ref.read(multiSelectProvider.notifier).reset(); - - final successMessage = 'unfavorite_action_prompt'.t(context: context, args: {'count': result.count.toString()}); - - if (context.mounted) { - ImmichToast.show( - context: context, - msg: result.success ? successMessage : 'scaffold_body_error_occurred'.t(context: context), - gravity: ToastGravity.BOTTOM, - toastType: result.success ? ToastType.success : ToastType.error, - ); - } - } - - @override - Widget build(BuildContext context, WidgetRef ref) { - return BaseActionButton( - iconData: Icons.favorite_rounded, - label: "unfavorite".t(context: context), - onPressed: () => _onTap(context, ref), - iconOnly: iconOnly, - menuItem: menuItem, - ); - } -} diff --git a/mobile/lib/presentation/widgets/action_buttons/unstack_action_button.widget.dart b/mobile/lib/presentation/widgets/action_buttons/unstack_action_button.widget.dart deleted file mode 100644 index e7badf129f..0000000000 --- a/mobile/lib/presentation/widgets/action_buttons/unstack_action_button.widget.dart +++ /dev/null @@ -1,48 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:fluttertoast/fluttertoast.dart'; -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:immich_mobile/constants/enums.dart'; -import 'package:immich_mobile/extensions/translate_extensions.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/base_action_button.widget.dart'; -import 'package:immich_mobile/providers/infrastructure/action.provider.dart'; -import 'package:immich_mobile/providers/timeline/multiselect.provider.dart'; -import 'package:immich_mobile/widgets/common/immich_toast.dart'; - -class UnStackActionButton extends ConsumerWidget { - final ActionSource source; - final bool iconOnly; - final bool menuItem; - - const UnStackActionButton({super.key, required this.source, this.iconOnly = false, this.menuItem = false}); - - void _onTap(BuildContext context, WidgetRef ref) async { - if (!context.mounted) { - return; - } - - final result = await ref.read(actionProvider.notifier).unStack(source); - ref.read(multiSelectProvider.notifier).reset(); - - final successMessage = 'unstack_action_prompt'.t(context: context, args: {'count': result.count.toString()}); - - if (context.mounted) { - ImmichToast.show( - context: context, - msg: result.success ? successMessage : 'scaffold_body_error_occurred'.t(context: context), - gravity: ToastGravity.BOTTOM, - toastType: result.success ? ToastType.success : ToastType.error, - ); - } - } - - @override - Widget build(BuildContext context, WidgetRef ref) { - return BaseActionButton( - iconData: Icons.layers_clear_outlined, - label: "unstack".t(context: context), - iconOnly: iconOnly, - menuItem: menuItem, - onPressed: () => _onTap(context, ref), - ); - } -} diff --git a/mobile/lib/presentation/widgets/action_buttons/upload_action_button.widget.dart b/mobile/lib/presentation/widgets/action_buttons/upload_action_button.widget.dart deleted file mode 100644 index 599e11d467..0000000000 --- a/mobile/lib/presentation/widgets/action_buttons/upload_action_button.widget.dart +++ /dev/null @@ -1,152 +0,0 @@ -import 'dart:async'; -import 'dart:io'; - -import 'package:flutter/material.dart'; -import 'package:fluttertoast/fluttertoast.dart'; -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:immich_mobile/constants/enums.dart'; -import 'package:immich_mobile/domain/models/asset/base_asset.model.dart'; -import 'package:immich_mobile/extensions/translate_extensions.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/base_action_button.widget.dart'; -import 'package:immich_mobile/providers/backup/asset_upload_progress.provider.dart'; -import 'package:immich_mobile/providers/infrastructure/action.provider.dart'; -import 'package:immich_mobile/providers/timeline/multiselect.provider.dart'; -import 'package:immich_mobile/providers/view_intent/view_intent_file_path.provider.dart'; -import 'package:immich_mobile/services/foreground_upload.service.dart'; -import 'package:immich_mobile/services/view_intent.service.dart'; -import 'package:immich_mobile/widgets/common/immich_toast.dart'; -import 'package:immich_ui/immich_ui.dart'; - -class UploadActionButton extends ConsumerWidget { - final ActionSource source; - final bool iconOnly; - final bool menuItem; - - const UploadActionButton({super.key, required this.source, this.iconOnly = false, this.menuItem = false}); - - void _onTap(BuildContext context, WidgetRef ref) async { - if (!context.mounted) { - return; - } - - final isTimeline = source == ActionSource.timeline; - final viewerIntentFilePath = source == ActionSource.viewer ? ref.read(viewIntentFilePathProvider) : null; - List? assets; - var isUploadDialogOpen = false; - var wasUploadCancelled = false; - Future? uploadDialogFuture; - - if (source == ActionSource.timeline) { - assets = ref.read(multiSelectProvider).selectedAssets.whereType().toList(); - if (assets.isEmpty) { - return; - } - ref.read(multiSelectProvider.notifier).reset(); - } else { - isUploadDialogOpen = true; - uploadDialogFuture = - showDialog( - context: context, - barrierDismissible: false, - builder: (dialogContext) => _UploadProgressDialog( - onCancel: () { - wasUploadCancelled = true; - }, - ), - ).whenComplete(() { - isUploadDialogOpen = false; - }); - unawaited(uploadDialogFuture); - } - - var success = false; - if (!isTimeline && viewerIntentFilePath != null) { - final viewIntentService = ref.read(viewIntentServiceProvider); - viewIntentService.markUploadActive(viewerIntentFilePath); - var hasError = false; - try { - await ref - .read(foregroundUploadServiceProvider) - .uploadShareIntent( - [File(viewerIntentFilePath)], - onError: (_, _) { - hasError = true; - }, - ); - } finally { - await viewIntentService.markUploadInactive(viewerIntentFilePath); - } - success = !hasError; - } else { - final result = await ref.read(actionProvider.notifier).upload(source, assets: assets); - success = result.success; - } - - if (!isTimeline && context.mounted && isUploadDialogOpen) { - Navigator.of(context, rootNavigator: true).pop(); - } - - if (context.mounted && !success && !wasUploadCancelled) { - ImmichToast.show( - context: context, - msg: 'scaffold_body_error_occurred'.t(context: context), - gravity: ToastGravity.BOTTOM, - toastType: ToastType.error, - ); - } - } - - @override - Widget build(BuildContext context, WidgetRef ref) { - return BaseActionButton( - iconData: Icons.backup_outlined, - label: "upload".t(context: context), - iconOnly: iconOnly, - menuItem: menuItem, - onPressed: () => _onTap(context, ref), - ); - } -} - -class _UploadProgressDialog extends ConsumerWidget { - final VoidCallback onCancel; - - const _UploadProgressDialog({required this.onCancel}); - - @override - Widget build(BuildContext context, WidgetRef ref) { - final progressMap = ref.watch(assetUploadProgressProvider); - - // Calculate overall progress from all assets - final values = progressMap.values.where((v) => v >= 0).toList(); - final progress = values.isEmpty ? 0.0 : values.reduce((a, b) => a + b) / values.length; - final hasError = progressMap.values.any((v) => v < 0); - final percentage = (progress * 100).toInt(); - - return AlertDialog( - title: Text('uploading'.t(context: context)), - content: Column( - mainAxisSize: MainAxisSize.min, - children: [ - if (hasError) - const Icon(Icons.error_outline, color: Colors.red, size: 48) - else - CircularProgressIndicator(value: progress > 0 ? progress : null), - const SizedBox(height: 16), - Text(hasError ? 'Error' : '$percentage%'), - ], - ), - actions: [ - ImmichTextButton( - onPressed: () { - ref.read(manualUploadCancelTokenProvider)?.complete(); - ref.read(manualUploadCancelTokenProvider.notifier).state = null; - onCancel(); - Navigator.of(context, rootNavigator: true).pop(); - }, - labelText: 'cancel'.t(context: context), - ), - ], - ); - } -} diff --git a/mobile/lib/presentation/widgets/album/album_selector.widget.dart b/mobile/lib/presentation/widgets/album/album_selector.widget.dart index 5a174bfc5e..521f7d0f77 100644 --- a/mobile/lib/presentation/widgets/album/album_selector.widget.dart +++ b/mobile/lib/presentation/widgets/album/album_selector.widget.dart @@ -2,14 +2,13 @@ import 'dart:async'; import 'dart:math'; 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/enums.dart'; import 'package:immich_mobile/domain/models/album/album.model.dart'; import 'package:immich_mobile/extensions/build_context_extensions.dart'; import 'package:immich_mobile/extensions/theme_extensions.dart'; -import 'package:immich_mobile/extensions/translate_extensions.dart'; +import 'package:immich_mobile/generated/translations.g.dart'; import 'package:immich_mobile/models/albums/album_search.model.dart'; import 'package:immich_mobile/presentation/widgets/album/album_tile.dart'; import 'package:immich_mobile/presentation/widgets/album/new_album_name_modal.widget.dart'; @@ -63,7 +62,7 @@ class _AlbumSelectorState extends ConsumerState { isGrid = albumConfig.isGrid; }); - ref.read(remoteAlbumProvider.notifier).refresh(); + unawaited(ref.read(remoteAlbumProvider.notifier).refresh()); }); searchController.addListener(() { @@ -81,7 +80,7 @@ class _AlbumSelectorState extends ConsumerState { final userId = ref.read(currentUserProvider)?.id; filter = filter.copyWith(query: searchTerm, userId: userId, mode: filterMode); - filterAlbums(); + unawaited(filterAlbums()); } Future onRefresh() async { @@ -92,7 +91,7 @@ class _AlbumSelectorState extends ConsumerState { setState(() { isGrid = !isGrid; }); - ref.read(settingsProvider).write(.albumIsGrid, isGrid); + unawaited(ref.read(settingsProvider).write(.albumIsGrid, isGrid)); } void changeFilter(QuickFilterMode mode) { @@ -100,7 +99,7 @@ class _AlbumSelectorState extends ConsumerState { filter = filter.copyWith(mode: mode); }); - filterAlbums(); + unawaited(filterAlbums()); } Future changeSort(AlbumSort sort) async { @@ -121,7 +120,7 @@ class _AlbumSelectorState extends ConsumerState { searchController.clear(); }); - filterAlbums(); + unawaited(filterAlbums()); } Future sortAlbums() async { @@ -326,7 +325,7 @@ class _SortButtonState extends ConsumerState<_SortButton> { ), ), child: Text( - sortMode.label.t(context: context), + sortMode.label(context.t), style: context.textTheme.labelLarge?.copyWith( color: albumSortOption == sortMode ? context.colorScheme.onPrimary @@ -354,7 +353,7 @@ class _SortButtonState extends ConsumerState<_SortButton> { : Icon(Icons.keyboard_arrow_up_rounded, color: context.colorScheme.onSurface), ), Text( - albumSortOption.label.t(context: context), + albumSortOption.label(context.t), style: context.textTheme.labelLarge?.copyWith(color: context.colorScheme.onSurface.withAlpha(225)), ), isSorting @@ -395,7 +394,7 @@ class _SearchBar extends StatelessWidget { return SliverPadding( padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 12), sliver: SliverToBoxAdapter( - child: Container( + child: DecoratedBox( decoration: BoxDecoration( border: Border.all(color: context.colorScheme.onSurface.withAlpha(0), width: 0), borderRadius: const BorderRadius.all(Radius.circular(24)), @@ -413,7 +412,7 @@ class _SearchBar extends StatelessWidget { child: SearchField( autofocus: false, contentPadding: const EdgeInsets.all(16), - hintText: 'search_albums'.tr(), + hintText: context.t.search_albums, prefixIcon: const Icon(Icons.search_rounded), suffixIcon: searchController.text.isNotEmpty ? IconButton(icon: const Icon(Icons.clear_rounded), onPressed: onClearSearch) @@ -452,7 +451,7 @@ class _QuickFilterButtonRow extends StatelessWidget { runSpacing: 4, children: [ _QuickFilterButton( - label: 'all'.tr(), + label: context.t.all, isSelected: filterMode == QuickFilterMode.all, onTap: () { onChangeFilter(QuickFilterMode.all); @@ -460,7 +459,7 @@ class _QuickFilterButtonRow extends StatelessWidget { }, ), _QuickFilterButton( - label: 'shared_with_me'.tr(), + label: context.t.shared_with_me, isSelected: filterMode == QuickFilterMode.sharedWithMe, onTap: () { onChangeFilter(QuickFilterMode.sharedWithMe); @@ -468,7 +467,7 @@ class _QuickFilterButtonRow extends StatelessWidget { }, ), _QuickFilterButton( - label: 'my_albums'.tr(), + label: context.t.my_albums, isSelected: filterMode == QuickFilterMode.myAlbums, onTap: () { onChangeFilter(QuickFilterMode.myAlbums); @@ -571,7 +570,7 @@ class _AlbumList extends ConsumerWidget { if (albums.isEmpty) { return SliverToBoxAdapter( child: Center( - child: Padding(padding: const EdgeInsets.all(20.0), child: Text('album_search_not_found'.tr())), + child: Padding(padding: const EdgeInsets.all(20.0), child: Text(context.t.album_search_not_found)), ), ); } @@ -600,9 +599,9 @@ class _AlbumList extends ConsumerWidget { context: context, builder: (context) => ConfirmDialog( onOk: () => true, - title: "delete_album".t(context: context), - content: "album_delete_confirmation".t(context: context, args: {'album': album.name}), - ok: "delete".t(context: context), + title: context.t.delete_album, + content: context.t.album_delete_confirmation(album: album.name), + ok: context.t.delete, ), ); }, @@ -637,7 +636,7 @@ class _AlbumGrid extends StatelessWidget { if (albums.isEmpty) { return SliverToBoxAdapter( child: Center( - child: Padding(padding: const EdgeInsets.all(20.0), child: Text('album_search_not_found'.tr())), + child: Padding(padding: const EdgeInsets.all(20.0), child: Text(context.t.album_search_not_found)), ), ); } @@ -669,7 +668,7 @@ class _GridAlbumCard extends ConsumerWidget { @override Widget build(BuildContext context, WidgetRef ref) { - final albumThumbnailAsset = ref.read(assetServiceProvider).getRemoteAsset(album.thumbnailAssetId ?? ""); + final albumThumbnailAsset = ref.watch(assetServiceProvider).getRemoteAsset(album.thumbnailAssetId ?? ""); return GestureDetector( onTap: () => onAlbumSelected(album), @@ -699,7 +698,7 @@ class _GridAlbumCard extends ConsumerWidget { ); } - return Container( + return ColoredBox( color: context.colorScheme.surfaceContainerHighest, child: const Icon(Icons.photo_album_rounded, size: 40, color: Colors.grey), ); @@ -723,7 +722,7 @@ class _GridAlbumCard extends ConsumerWidget { style: context.textTheme.titleSmall?.copyWith(fontWeight: FontWeight.w600), ), Text( - '${'items_count'.t(context: context, args: {'count': album.assetCount})} • ${album.ownerId != userId ? 'shared_by_user'.t(context: context, args: {'user': album.ownerName}) : 'owned'.t(context: context)}', + '${context.t.items_count(count: album.assetCount)} • ${album.ownerId != userId ? context.t.shared_by_user(user: album.ownerName) : context.t.owned}', maxLines: 1, overflow: TextOverflow.ellipsis, style: context.textTheme.labelMedium?.copyWith(color: context.colorScheme.onSurfaceSecondary), @@ -745,13 +744,22 @@ class AddToAlbumHeader extends ConsumerWidget { @override Widget build(BuildContext context, WidgetRef ref) { Future onCreateAlbum() async { + final albumName = await showDialog(context: context, builder: (context) => const NewAlbumNameModal()); + if (albumName == null || !context.mounted) { + return; + } + final selectedAssets = ref.read(multiSelectProvider).selectedAssets; final newAlbum = await ref .read(remoteAlbumProvider.notifier) - .createAlbumWithAssets(title: "Untitled Album", assets: selectedAssets); + .createAlbumWithAssets(title: albumName, assets: selectedAssets); + + if (!context.mounted) { + return; + } if (newAlbum == null) { - ImmichToast.show(context: context, toastType: ToastType.error, msg: 'errors.failed_to_create_album'.tr()); + ImmichToast.show(context: context, toastType: ToastType.error, msg: context.t.errors.failed_to_create_album); return; } @@ -765,19 +773,19 @@ class AddToAlbumHeader extends ConsumerWidget { child: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ - Text("add_to_album", style: context.textTheme.titleSmall).tr(), + Text(context.t.add_to_album, style: context.textTheme.titleSmall), TextButton.icon( style: TextButton.styleFrom( padding: const EdgeInsets.symmetric(horizontal: 8, vertical: 4), // remove internal padding - minimumSize: const Size(0, 0), // allow shrinking + minimumSize: Size.zero, // allow shrinking tapTargetSize: MaterialTapTargetSize.shrinkWrap, // remove extra height ), onPressed: onCreateAlbum, icon: Icon(Icons.add, color: context.primaryColor), label: Text( - "common_create_new_album", + context.t.common_create_new_album, style: TextStyle(color: context.primaryColor, fontWeight: FontWeight.bold, fontSize: 14), - ).tr(), + ), ), ], ), @@ -792,8 +800,8 @@ class CreateAlbumButton extends ConsumerWidget { @override Widget build(BuildContext context, WidgetRef ref) { Future onCreateAlbum() async { - var albumName = await showDialog(context: context, builder: (context) => const NewAlbumNameModal()); - if (albumName == null) { + final albumName = await showDialog(context: context, builder: (context) => const NewAlbumNameModal()); + if (albumName == null || !context.mounted) { return; } @@ -808,14 +816,18 @@ class CreateAlbumButton extends ConsumerWidget { .read(remoteAlbumProvider.notifier) .createAlbum(title: albumName, assetIds: [asset.remoteId!]); + if (!context.mounted) { + return; + } + if (album == null) { - ImmichToast.show(context: context, toastType: ToastType.error, msg: 'errors.failed_to_create_album'.tr()); + ImmichToast.show(context: context, toastType: ToastType.error, msg: context.t.errors.failed_to_create_album); return; } ImmichToast.show( context: context, - msg: 'add_to_album_bottom_sheet_added'.tr(namedArgs: {'album': album.name}), + msg: context.t.add_to_album_bottom_sheet_added(album: album.name), ); // Invalidate using the asset's remote ID to refresh the "Appears in" list @@ -830,19 +842,19 @@ class CreateAlbumButton extends ConsumerWidget { child: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ - Text("add_to_album", style: context.textTheme.titleSmall).tr(), + Text(context.t.add_to_album, style: context.textTheme.titleSmall), TextButton.icon( style: TextButton.styleFrom( padding: const EdgeInsets.symmetric(horizontal: 8, vertical: 4), - minimumSize: const Size(0, 0), + minimumSize: Size.zero, tapTargetSize: MaterialTapTargetSize.shrinkWrap, ), onPressed: onCreateAlbum, icon: Icon(Icons.add, color: context.primaryColor), label: Text( - "common_create_new_album", + context.t.common_create_new_album, style: TextStyle(color: context.primaryColor, fontWeight: FontWeight.bold, fontSize: 14), - ).tr(), + ), ), ], ), diff --git a/mobile/lib/presentation/widgets/album/album_tile.dart b/mobile/lib/presentation/widgets/album/album_tile.dart index 1aeadf61bc..54fc27cfd1 100644 --- a/mobile/lib/presentation/widgets/album/album_tile.dart +++ b/mobile/lib/presentation/widgets/album/album_tile.dart @@ -3,7 +3,7 @@ import 'package:hooks_riverpod/hooks_riverpod.dart'; import 'package:immich_mobile/domain/models/album/album.model.dart'; import 'package:immich_mobile/extensions/build_context_extensions.dart'; import 'package:immich_mobile/extensions/theme_extensions.dart'; -import 'package:immich_mobile/extensions/translate_extensions.dart'; +import 'package:immich_mobile/generated/translations.g.dart'; import 'package:immich_mobile/pages/common/large_leading_tile.dart'; import 'package:immich_mobile/presentation/widgets/images/thumbnail.widget.dart'; import 'package:immich_mobile/providers/infrastructure/asset.provider.dart'; @@ -17,7 +17,7 @@ class AlbumTile extends ConsumerWidget { @override Widget build(BuildContext context, WidgetRef ref) { - final albumThumbnailAsset = ref.read(assetServiceProvider).getRemoteAsset(album.thumbnailAssetId ?? ""); + final albumThumbnailAsset = ref.watch(assetServiceProvider).getRemoteAsset(album.thumbnailAssetId ?? ""); return LargeLeadingTile( title: Text( @@ -27,7 +27,7 @@ class AlbumTile extends ConsumerWidget { style: context.textTheme.titleSmall?.copyWith(fontWeight: FontWeight.w600), ), subtitle: Text( - '${'items_count'.t(context: context, args: {'count': album.assetCount})} • ${isOwner ? 'owned'.t(context: context) : 'shared_by_user'.t(context: context, args: {'user': album.ownerName})}', + '${context.t.items_count(count: album.assetCount)} • ${isOwner ? context.t.owned : context.t.shared_by_user(user: album.ownerName)}', overflow: TextOverflow.ellipsis, style: context.textTheme.bodyMedium?.copyWith(color: context.colorScheme.onSurfaceSecondary), ), @@ -51,7 +51,7 @@ class AlbumTile extends ConsumerWidget { : SizedBox( width: 80, height: 80, - child: Container( + child: DecoratedBox( decoration: BoxDecoration( color: context.colorScheme.surfaceContainer, borderRadius: const BorderRadius.all(Radius.circular(16)), diff --git a/mobile/lib/presentation/widgets/album/drift_activity_text_field.dart b/mobile/lib/presentation/widgets/album/drift_activity_text_field.dart index 691b46f80d..55024d9b2b 100644 --- a/mobile/lib/presentation/widgets/album/drift_activity_text_field.dart +++ b/mobile/lib/presentation/widgets/album/drift_activity_text_field.dart @@ -1,7 +1,7 @@ -import 'package:easy_localization/easy_localization.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/generated/translations.g.dart'; import 'package:immich_mobile/providers/user.provider.dart'; import 'package:immich_mobile/widgets/common/user_circle_avatar.dart'; @@ -98,7 +98,7 @@ class _DriftActivityTextFieldState extends ConsumerState color: context.primaryColor, disabledColor: context.colorScheme.secondaryContainer, ), - hintText: !widget.isEnabled ? 'shared_album_activities_input_disable'.tr() : 'say_something'.tr(), + hintText: !widget.isEnabled ? context.t.shared_album_activities_input_disable : context.t.say_something, hintStyle: TextStyle(fontWeight: FontWeight.normal, fontSize: 14, color: Colors.grey[600]), ), onEditingComplete: onEditingComplete, diff --git a/mobile/lib/presentation/widgets/album/new_album_name_modal.widget.dart b/mobile/lib/presentation/widgets/album/new_album_name_modal.widget.dart index a5e21af489..255dbd4a0c 100644 --- a/mobile/lib/presentation/widgets/album/new_album_name_modal.widget.dart +++ b/mobile/lib/presentation/widgets/album/new_album_name_modal.widget.dart @@ -1,6 +1,6 @@ -import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; import 'package:immich_mobile/extensions/build_context_extensions.dart'; +import 'package:immich_mobile/generated/translations.g.dart'; class NewAlbumNameModal extends StatefulWidget { const NewAlbumNameModal({super.key}); @@ -21,31 +21,31 @@ class _NewAlbumNameModalState extends State { @override Widget build(BuildContext context) { return AlertDialog( - title: const Text("album_name", style: TextStyle(fontWeight: FontWeight.bold)).tr(), + title: Text(context.t.album_name, style: const TextStyle(fontWeight: FontWeight.bold)), content: SingleChildScrollView( child: TextFormField( controller: nameController, textCapitalization: TextCapitalization.words, autofocus: true, - decoration: InputDecoration(hintText: 'name'.tr(), border: const OutlineInputBorder()), + decoration: InputDecoration(hintText: context.t.name, border: const OutlineInputBorder()), ), ), actions: [ TextButton( onPressed: () => context.pop(null), child: Text( - "cancel", + context.t.cancel, style: TextStyle(color: Colors.red[300], fontWeight: FontWeight.bold), - ).tr(), + ), ), TextButton( onPressed: () { context.pop(nameController.text.trim()); }, child: Text( - "create_album", + context.t.create_album, style: TextStyle(color: context.primaryColor, fontWeight: FontWeight.bold), - ).tr(), + ), ), ], ); diff --git a/mobile/lib/presentation/widgets/album/pending_uploads_banner.widget.dart b/mobile/lib/presentation/widgets/album/pending_uploads_banner.widget.dart index 2701316e75..796c4ce43a 100644 --- a/mobile/lib/presentation/widgets/album/pending_uploads_banner.widget.dart +++ b/mobile/lib/presentation/widgets/album/pending_uploads_banner.widget.dart @@ -1,8 +1,10 @@ +import 'dart:async'; + import 'package:flutter/material.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; import 'package:immich_mobile/domain/models/asset/base_asset.model.dart'; import 'package:immich_mobile/extensions/build_context_extensions.dart'; -import 'package:immich_mobile/extensions/translate_extensions.dart'; +import 'package:immich_mobile/generated/translations.g.dart'; import 'package:immich_mobile/presentation/widgets/images/thumbnail.widget.dart'; import 'package:immich_mobile/providers/album/pending_album_uploads.provider.dart'; import 'package:immich_mobile/providers/backup/asset_upload_progress.provider.dart'; @@ -45,8 +47,8 @@ class PendingUploadsBanner extends ConsumerWidget { ); } - static void _openSheet(BuildContext context, String albumId) { - showModalBottomSheet( + static Future _openSheet(BuildContext context, String albumId) { + return showModalBottomSheet( context: context, showDragHandle: true, builder: (_) => _PendingUploadsSheet(albumId: albumId), @@ -97,7 +99,7 @@ class _PendingUploadsBannerContent extends StatelessWidget { return Material( color: hasFailures ? context.colorScheme.errorContainer : context.colorScheme.surfaceContainerHigh, child: InkWell( - onTap: () => PendingUploadsBanner._openSheet(context, albumId), + onTap: () => unawaited(PendingUploadsBanner._openSheet(context, albumId)), child: Column( mainAxisSize: MainAxisSize.min, children: [ @@ -113,7 +115,7 @@ class _PendingUploadsBannerContent extends StatelessWidget { const SizedBox(width: 12), Expanded( child: Text( - '${'uploading'.t(context: context)} $count$percentLabel', + '${context.t.uploading} $count$percentLabel', maxLines: 1, overflow: TextOverflow.ellipsis, style: context.textTheme.bodyMedium?.copyWith(fontWeight: FontWeight.w500), @@ -181,10 +183,7 @@ class _PendingUploadsSheet extends ConsumerWidget { child: Row( children: [ Expanded( - child: Text( - '${'uploading'.t(context: context)} (${pending.length})', - style: context.textTheme.titleMedium, - ), + child: Text('${context.t.uploading} (${pending.length})', style: context.textTheme.titleMedium), ), if (canAbort) TextButton.icon( @@ -197,14 +196,14 @@ class _PendingUploadsSheet extends ConsumerWidget { ref.read(pendingAlbumUploadsProvider(albumId).notifier).clear(); }, icon: const Icon(Icons.stop_circle_outlined, size: 18), - label: Text('cancel'.t(context: context)), + label: Text(context.t.cancel), style: TextButton.styleFrom(foregroundColor: context.colorScheme.error), ) else if (failedCount > 0) TextButton.icon( onPressed: () => ref.read(pendingAlbumUploadsProvider(albumId).notifier).clearFailed(), icon: const Icon(Icons.clear_rounded, size: 18), - label: Text('clear_failed_count'.t(context: context, args: {'count': failedCount})), + label: Text(context.t.clear_failed_count(count: failedCount)), style: TextButton.styleFrom(foregroundColor: context.colorScheme.error), ), ], @@ -215,7 +214,7 @@ class _PendingUploadsSheet extends ConsumerWidget { child: ListView.separated( scrollDirection: Axis.horizontal, itemCount: pending.length, - separatorBuilder: (_, __) => const SizedBox(width: 8), + separatorBuilder: (_, _) => const SizedBox(width: 8), itemBuilder: (_, index) => _PendingUploadTile(entry: pending[index]), ), ), diff --git a/mobile/lib/presentation/widgets/asset_viewer/asset_details/appears_in_details.widget.dart b/mobile/lib/presentation/widgets/asset_viewer/asset_details/appears_in_details.widget.dart index 6a565fa2cd..0cb2ccd254 100644 --- a/mobile/lib/presentation/widgets/asset_viewer/asset_details/appears_in_details.widget.dart +++ b/mobile/lib/presentation/widgets/asset_viewer/asset_details/appears_in_details.widget.dart @@ -1,4 +1,5 @@ import 'dart:async'; + import 'package:auto_route/auto_route.dart'; import 'package:collection/collection.dart'; import 'package:flutter/material.dart'; @@ -6,10 +7,10 @@ import 'package:hooks_riverpod/hooks_riverpod.dart'; import 'package:immich_mobile/domain/models/asset/base_asset.model.dart'; import 'package:immich_mobile/extensions/build_context_extensions.dart'; import 'package:immich_mobile/extensions/theme_extensions.dart'; -import 'package:immich_mobile/extensions/translate_extensions.dart'; +import 'package:immich_mobile/generated/translations.g.dart'; import 'package:immich_mobile/presentation/widgets/album/album_tile.dart'; -import 'package:immich_mobile/providers/asset_viewer/asset_viewer.provider.dart'; import 'package:immich_mobile/presentation/widgets/asset_viewer/sheet_tile.widget.dart'; +import 'package:immich_mobile/providers/asset_viewer/asset_viewer.provider.dart'; import 'package:immich_mobile/providers/infrastructure/album.provider.dart'; import 'package:immich_mobile/providers/user.provider.dart'; import 'package:immich_mobile/routing/router.dart'; @@ -51,7 +52,7 @@ class AppearsInDetails extends ConsumerWidget { spacing: 12, children: [ SheetTile( - title: 'appears_in'.t(context: context), + title: context.t.appears_in, titleStyle: context.textTheme.labelLarge?.copyWith(color: context.colorScheme.onSurfaceSecondary), ), Padding( @@ -76,7 +77,7 @@ class AppearsInDetails extends ConsumerWidget { ); }, loading: () => const SizedBox.shrink(), - error: (_, __) => const SizedBox.shrink(), + error: (_, _) => const SizedBox.shrink(), ); } } diff --git a/mobile/lib/presentation/widgets/asset_viewer/asset_details/date_time_details.widget.dart b/mobile/lib/presentation/widgets/asset_viewer/asset_details/date_time_details.widget.dart index 27bac68310..9f426f6db7 100644 --- a/mobile/lib/presentation/widgets/asset_viewer/asset_details/date_time_details.widget.dart +++ b/mobile/lib/presentation/widgets/asset_viewer/asset_details/date_time_details.widget.dart @@ -1,4 +1,5 @@ import 'dart:async'; + import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; @@ -7,7 +8,8 @@ import 'package:immich_mobile/domain/models/asset/base_asset.model.dart'; import 'package:immich_mobile/domain/models/exif.model.dart'; import 'package:immich_mobile/extensions/build_context_extensions.dart'; import 'package:immich_mobile/extensions/duration_extensions.dart'; -import 'package:immich_mobile/extensions/translate_extensions.dart'; +import 'package:immich_mobile/generated/translations.g.dart'; +import 'package:immich_mobile/presentation/actions/edit_datetime.action.dart'; import 'package:immich_mobile/presentation/widgets/asset_viewer/sheet_tile.widget.dart'; import 'package:immich_mobile/providers/infrastructure/action.provider.dart'; import 'package:immich_mobile/providers/user.provider.dart'; @@ -27,16 +29,15 @@ class DateTimeDetails extends ConsumerWidget { final asset = this.asset; final exifInfo = this.exifInfo; final isOwner = ref.watch(currentUserProvider)?.id == (asset is RemoteAsset ? asset.ownerId : null); + final editDateTime = const EditDateTimeAction(source: .viewer).create(context, ref); return Column( children: [ SheetTile( title: _getDateTime(context, asset, exifInfo), titleStyle: context.textTheme.labelLarge, - trailing: asset.hasRemote && isOwner ? const Icon(Icons.edit, size: 18) : null, - onTap: asset.hasRemote && isOwner - ? () async => await ref.read(actionProvider.notifier).editDateTime(ActionSource.viewer, context) - : null, + trailing: editDateTime == null ? null : const Icon(Icons.edit, size: 18), + onTap: editDateTime?.onAction, ), if (exifInfo != null) _SheetAssetDescription(exif: exifInfo, isEditable: isOwner), ], @@ -93,10 +94,13 @@ class _SheetAssetDescriptionState extends ConsumerState<_SheetAssetDescription> if (!editAction.success) { _controller.text = previousDescription ?? ''; + if (!mounted) { + return; + } ImmichToast.show( context: context, - msg: 'exif_bottom_sheet_description_error'.t(context: context), + msg: context.t.exif_bottom_sheet_description_error, toastType: ToastType.error, ); } @@ -107,9 +111,9 @@ class _SheetAssetDescriptionState extends ConsumerState<_SheetAssetDescription> @override Widget build(BuildContext context) { final currentDescription = widget.exif.description ?? ''; - final hintText = (widget.isEditable ? 'exif_bottom_sheet_description' : 'exif_bottom_sheet_no_description').t( - context: context, - ); + final hintText = widget.isEditable + ? context.t.exif_bottom_sheet_description + : context.t.exif_bottom_sheet_no_description; if (_controller.text != currentDescription && !_descriptionFocus.hasFocus) { _controller.text = currentDescription; } diff --git a/mobile/lib/presentation/widgets/asset_viewer/asset_details/location_details.widget.dart b/mobile/lib/presentation/widgets/asset_viewer/asset_details/location_details.widget.dart index 8c144a83bd..47ecb53d8a 100644 --- a/mobile/lib/presentation/widgets/asset_viewer/asset_details/location_details.widget.dart +++ b/mobile/lib/presentation/widgets/asset_viewer/asset_details/location_details.widget.dart @@ -1,13 +1,14 @@ +import 'dart:async'; + import 'package:flutter/material.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:immich_mobile/constants/enums.dart'; import 'package:immich_mobile/domain/models/asset/base_asset.model.dart'; import 'package:immich_mobile/domain/models/exif.model.dart'; import 'package:immich_mobile/extensions/build_context_extensions.dart'; import 'package:immich_mobile/extensions/theme_extensions.dart'; -import 'package:immich_mobile/extensions/translate_extensions.dart'; +import 'package:immich_mobile/generated/translations.g.dart'; +import 'package:immich_mobile/presentation/actions/edit_location.action.dart'; import 'package:immich_mobile/presentation/widgets/asset_viewer/sheet_tile.widget.dart'; -import 'package:immich_mobile/providers/infrastructure/action.provider.dart'; import 'package:immich_mobile/widgets/asset_viewer/detail_panel/exif_map.dart'; import 'package:maplibre_gl/maplibre_gl.dart'; @@ -48,15 +49,11 @@ class _LocationDetailsState extends ConsumerState { if (widget.exifInfo != oldWidget.exifInfo) { final exif = widget.exifInfo; if (exif != null && exif.hasCoordinates) { - _mapController?.moveCamera(CameraUpdate.newLatLng(LatLng(exif.latitude!, exif.longitude!))); + unawaited(_mapController?.moveCamera(CameraUpdate.newLatLng(LatLng(exif.latitude!, exif.longitude!)))); } } } - void editLocation() async { - await ref.read(actionProvider.notifier).editLocation(ActionSource.viewer, context); - } - @override Widget build(BuildContext context) { final asset = widget.asset; @@ -68,6 +65,7 @@ class _LocationDetailsState extends ConsumerState { return const SizedBox.shrink(); } + final editLocation = const EditLocationAction(source: .viewer).create(context, ref); final locationName = _getLocationName(exifInfo); final coordinates = "${exifInfo?.latitude?.toStringAsFixed(4)}, ${exifInfo?.longitude?.toStringAsFixed(4)}"; @@ -77,10 +75,10 @@ class _LocationDetailsState extends ConsumerState { crossAxisAlignment: CrossAxisAlignment.start, children: [ SheetTile( - title: 'location'.t(context: context), + title: context.t.location, titleStyle: context.textTheme.labelLarge?.copyWith(color: context.colorScheme.onSurfaceSecondary), - trailing: hasCoordinates ? const Icon(Icons.edit_location_alt, size: 20) : null, - onTap: editLocation, + trailing: hasCoordinates && editLocation != null ? const Icon(Icons.edit_location_alt, size: 20) : null, + onTap: editLocation?.onAction, ), if (hasCoordinates) Padding( @@ -109,13 +107,13 @@ class _LocationDetailsState extends ConsumerState { ), if (!hasCoordinates) SheetTile( - title: "add_a_location".t(context: context), + title: context.t.add_a_location, titleStyle: context.textTheme.bodyMedium?.copyWith( fontWeight: FontWeight.w600, color: context.primaryColor, ), leading: const Icon(Icons.location_off), - onTap: editLocation, + onTap: editLocation?.onAction, ), ], ), diff --git a/mobile/lib/presentation/widgets/asset_viewer/asset_details/people_details.widget.dart b/mobile/lib/presentation/widgets/asset_viewer/asset_details/people_details.widget.dart index 32bbc915a1..00c20f35bd 100644 --- a/mobile/lib/presentation/widgets/asset_viewer/asset_details/people_details.widget.dart +++ b/mobile/lib/presentation/widgets/asset_viewer/asset_details/people_details.widget.dart @@ -1,3 +1,5 @@ +import 'dart:async'; + import 'package:auto_route/auto_route.dart'; import 'package:flutter/material.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; @@ -5,7 +7,7 @@ import 'package:immich_mobile/domain/models/asset/base_asset.model.dart'; import 'package:immich_mobile/domain/models/person.model.dart'; import 'package:immich_mobile/extensions/build_context_extensions.dart'; import 'package:immich_mobile/extensions/theme_extensions.dart'; -import 'package:immich_mobile/extensions/translate_extensions.dart'; +import 'package:immich_mobile/generated/translations.g.dart'; import 'package:immich_mobile/presentation/widgets/images/remote_image_provider.dart'; import 'package:immich_mobile/presentation/widgets/people/person_edit_name_modal.widget.dart'; import 'package:immich_mobile/providers/infrastructure/people.provider.dart'; @@ -28,7 +30,7 @@ class PeopleDetails extends ConsumerWidget { final peopleFuture = ref.watch(driftPeopleAssetProvider(asset.id)); - Future showNameEditModal(DriftPerson person) async { + Future showNameEditModal(Person person) async { await showDialog( context: context, useRootNavigator: false, @@ -50,7 +52,7 @@ class PeopleDetails extends ConsumerWidget { Padding( padding: const EdgeInsets.only(left: 16, top: 16, bottom: 16), child: Text( - "people".t(context: context), + context.t.people, style: context.textTheme.labelLarge?.copyWith(color: context.colorScheme.onSurfaceSecondary), ), ), @@ -74,7 +76,7 @@ class PeopleDetails extends ConsumerWidget { return; } ContextHelper(context).pop(); - context.pushRoute(DriftPersonRoute(person: person)); + unawaited(context.pushRoute(DriftPersonRoute(person: person))); }, onNameTap: () => showNameEditModal(person), ), @@ -87,14 +89,14 @@ class PeopleDetails extends ConsumerWidget { duration: Durations.short4, ); }, - error: (error, stack) => Text("error_loading_people".t(context: context), style: context.textTheme.bodyMedium), + error: (error, stack) => Text(context.t.errors.failed_to_load_people, style: context.textTheme.bodyMedium), loading: () => const SizedBox.shrink(), ); } } class _Avatar extends StatelessWidget { - final DriftPerson person; + final Person person; final DateTime assetFileCreatedAt; final VoidCallback? onTap; final VoidCallback? onNameTap; @@ -121,7 +123,9 @@ class _Avatar extends StatelessWidget { elevation: 3, child: CircleAvatar( maxRadius: imageSize / 2, - backgroundImage: RemoteImageProvider(url: getFaceThumbnailUrl(person.id)), + backgroundImage: RemoteImageProvider( + url: getFaceThumbnailUrl(person.id, updatedAt: person.updatedAt), + ), ), ), ), @@ -131,7 +135,7 @@ class _Avatar extends StatelessWidget { GestureDetector( onTap: () => onNameTap?.call(), child: Text( - "add_a_name".t(context: context), + context.t.add_a_name, style: context.textTheme.labelLarge?.copyWith(color: context.primaryColor), maxLines: 2, overflow: TextOverflow.ellipsis, diff --git a/mobile/lib/presentation/widgets/asset_viewer/asset_details/rating_details.widget.dart b/mobile/lib/presentation/widgets/asset_viewer/asset_details/rating_details.widget.dart index e501c2ee3e..f07fb5c112 100644 --- a/mobile/lib/presentation/widgets/asset_viewer/asset_details/rating_details.widget.dart +++ b/mobile/lib/presentation/widgets/asset_viewer/asset_details/rating_details.widget.dart @@ -4,7 +4,7 @@ import 'package:immich_mobile/constants/enums.dart'; import 'package:immich_mobile/domain/models/exif.model.dart'; import 'package:immich_mobile/extensions/build_context_extensions.dart'; import 'package:immich_mobile/extensions/theme_extensions.dart'; -import 'package:immich_mobile/extensions/translate_extensions.dart'; +import 'package:immich_mobile/generated/translations.g.dart'; import 'package:immich_mobile/presentation/widgets/asset_viewer/rating_bar.widget.dart'; import 'package:immich_mobile/providers/infrastructure/action.provider.dart'; import 'package:immich_mobile/providers/infrastructure/user_metadata.provider.dart'; @@ -32,7 +32,7 @@ class RatingDetails extends ConsumerWidget { spacing: 8, children: [ Text( - 'rating'.t(context: context), + context.t.rating, style: context.textTheme.labelLarge?.copyWith(color: context.colorScheme.onSurfaceSecondary), ), RatingBar( @@ -41,7 +41,7 @@ class RatingDetails extends ConsumerWidget { unfilledColor: context.themeData.colorScheme.onSurface.withAlpha(100), itemSize: 40, onRatingUpdate: (rating) async { - await ref.read(actionProvider.notifier).updateRating(ActionSource.viewer, rating.round()); + await ref.read(actionProvider.notifier).updateRating(ActionSource.viewer, rating); }, onClearRating: () async { await ref.read(actionProvider.notifier).updateRating(ActionSource.viewer, null); diff --git a/mobile/lib/presentation/widgets/asset_viewer/asset_details/technical_details.widget.dart b/mobile/lib/presentation/widgets/asset_viewer/asset_details/technical_details.widget.dart index 33e0fa38f5..e36cd9967b 100644 --- a/mobile/lib/presentation/widgets/asset_viewer/asset_details/technical_details.widget.dart +++ b/mobile/lib/presentation/widgets/asset_viewer/asset_details/technical_details.widget.dart @@ -4,7 +4,7 @@ import 'package:immich_mobile/domain/models/asset/base_asset.model.dart'; import 'package:immich_mobile/domain/models/exif.model.dart'; import 'package:immich_mobile/extensions/build_context_extensions.dart'; import 'package:immich_mobile/extensions/theme_extensions.dart'; -import 'package:immich_mobile/extensions/translate_extensions.dart'; +import 'package:immich_mobile/generated/translations.g.dart'; import 'package:immich_mobile/presentation/widgets/asset_viewer/sheet_tile.widget.dart'; import 'package:immich_mobile/repositories/asset_media.repository.dart'; import 'package:immich_mobile/utils/bytes_units.dart'; @@ -27,7 +27,7 @@ class TechnicalDetails extends ConsumerWidget { return Column( children: [ SheetTile( - title: 'details'.t(context: context), + title: context.t.details, titleStyle: context.textTheme.labelLarge?.copyWith(color: context.colorScheme.onSurfaceSecondary), ), _buildFileInfoTile(context, ref, asset, exifInfo), @@ -72,7 +72,7 @@ class TechnicalDetails extends ConsumerWidget { final subtitleStyle = context.textTheme.bodyMedium?.copyWith(color: context.colorScheme.onSurfaceSecondary); if (asset is LocalAsset) { - final assetMediaRepository = ref.watch(assetMediaRepositoryProvider); + final assetMediaRepository = ref.read(assetMediaRepositoryProvider); return FutureBuilder( future: assetMediaRepository.getOriginalFilename(asset.id), builder: (context, snapshot) { @@ -99,14 +99,14 @@ class TechnicalDetails extends ConsumerWidget { static String _getFileInfo(BaseAsset asset, ExifInfo? exifInfo) { final height = asset.height; final width = asset.width; - final resolution = (width != null && height != null) ? "${width.toInt()} x ${height.toInt()}" : null; + final resolution = (width != null && height != null) ? "$width x $height" : null; final fileSize = exifInfo?.fileSize != null ? formatBytes(exifInfo!.fileSize!) : null; return switch ((fileSize, resolution)) { (null, null) => '', - (String fileSize, null) => fileSize, - (null, String resolution) => resolution, - (String fileSize, String resolution) => '$fileSize$_kSeparator$resolution', + (final String fileSize, null) => fileSize, + (null, final String resolution) => resolution, + (final String fileSize, final String resolution) => '$fileSize$_kSeparator$resolution', }; } @@ -116,9 +116,9 @@ class TechnicalDetails extends ConsumerWidget { } return switch ((exifInfo.make, exifInfo.model)) { (null, null) => null, - (String make, null) => make, - (null, String model) => model, - (String make, String model) => '$make $model', + (final String make, null) => make, + (null, final String model) => model, + (final String make, final String model) => '$make $model', }; } diff --git a/mobile/lib/presentation/widgets/asset_viewer/asset_page.widget.dart b/mobile/lib/presentation/widgets/asset_viewer/asset_page.widget.dart index 6c974376a1..9c17d9a035 100644 --- a/mobile/lib/presentation/widgets/asset_viewer/asset_page.widget.dart +++ b/mobile/lib/presentation/widgets/asset_viewer/asset_page.widget.dart @@ -87,8 +87,8 @@ class _AssetPageState extends ConsumerState { @override void dispose() { _scrollController.dispose(); - _scaleBoundarySub?.cancel(); - _eventSubscription?.cancel(); + unawaited(_scaleBoundarySub?.cancel()); + unawaited(_eventSubscription?.cancel()); super.dispose(); } @@ -99,6 +99,8 @@ class _AssetPageState extends ConsumerState { case TimelineReloadEvent(): final asset = ref.read(timelineServiceProvider).getAssetSafe(widget.index); if (asset != _asset) { + _isZoomed = false; + _viewer.setZoomed(false); setState(() => _asset = asset); } default: @@ -110,7 +112,7 @@ class _AssetPageState extends ConsumerState { return; } _viewer.setShowingDetails(true); - _scrollController.animateTo(_snapOffset, duration: Durations.medium2, curve: Curves.easeOutCubic); + unawaited(_scrollController.animateTo(_snapOffset, duration: Durations.medium2, curve: Curves.easeOutCubic)); } bool _willClose(double scrollVelocity) => @@ -197,7 +199,7 @@ class _AssetPageState extends ConsumerState { case _DragIntent.dismiss: const popThreshold = 75.0; if (details.localPosition.dy - start!.localPosition.dy > popThreshold) { - context.maybePop(); + unawaited(context.maybePop()); return; } _viewController?.animateMultiple( @@ -290,14 +292,14 @@ class _AssetPageState extends ConsumerState { } void _listenForScaleBoundaries(PhotoViewControllerBase? controller) { - _scaleBoundarySub?.cancel(); + unawaited(_scaleBoundarySub?.cancel()); _scaleBoundarySub = null; if (controller == null || controller.scaleBoundaries != null) { return; } _scaleBoundarySub = controller.outputStateStream.listen((_) { if (controller.scaleBoundaries != null) { - _scaleBoundarySub?.cancel(); + unawaited(_scaleBoundarySub?.cancel()); _scaleBoundarySub = null; if (mounted) { setState(() {}); @@ -331,9 +333,15 @@ class _AssetPageState extends ConsumerState { required bool isCurrent, required bool isPlayingMotionVideo, required String? localFilePath, + required Size? remoteThumbnailSize, }) { final size = context.sizeData; - final imageProvider = getFullImageProvider(asset, size: size, localFilePath: localFilePath); + final imageProvider = getFullImageProvider( + asset, + size: size, + localFilePath: localFilePath, + remoteThumbnailSize: remoteThumbnailSize, + ); if (asset.isImage && !isPlayingMotionVideo) { return PhotoView( @@ -355,7 +363,7 @@ class _AssetPageState extends ConsumerState { onDragCancel: _onDragCancel, onTapUp: _onTapUp, onLongPressStart: asset.isMotionPhoto ? _onLongPress : null, - errorBuilder: (_, __, ___) => SizedBox( + errorBuilder: (_, _, _) => SizedBox( width: size.width, height: size.height, child: Thumbnail.fromAsset(asset: asset, fit: BoxFit.contain), @@ -395,11 +403,13 @@ class _AssetPageState extends ConsumerState { @override Widget build(BuildContext context) { - final currentHeroTag = ref.watch(assetViewerProvider.select((s) => s.currentAsset?.heroTag)); + final (currentAsset, thumbnailSize) = ref.watch( + assetViewerProvider.select((s) => (s.currentAsset, s.thumbnailSize)), + ); _showingDetails = ref.watch(assetViewerProvider.select((s) => s.showingDetails)); final stackIndex = ref.watch(assetViewerProvider.select((s) => s.stackIndex)); final isPlayingMotionVideo = ref.watch(isPlayingMotionVideoProvider); - final timelineOrigin = ref.read(timelineServiceProvider).origin; + final timelineOrigin = ref.watch(timelineServiceProvider).origin; final showingOcr = ref.watch(assetViewerProvider.select((s) => s.showingOcr)); final asset = _asset; @@ -411,10 +421,11 @@ class _AssetPageState extends ConsumerState { final showAssetStack = ref.watch(timelineServiceProvider.select((s) => s.origin != TimelineOrigin.trash)); final stackChildren = showAssetStack ? ref.watch(stackChildrenNotifier(asset)).valueOrNull : null; if (stackChildren != null && stackChildren.isNotEmpty) { - displayAsset = stackChildren.elementAt(stackIndex); + final safeStackIndex = stackIndex.clamp(0, stackChildren.length - 1); + displayAsset = stackChildren.elementAt(safeStackIndex); } - final isCurrent = currentHeroTag == displayAsset.heroTag; + final isCurrent = currentAsset != null && currentAsset.refersToSameAsset(displayAsset); final viewportWidth = MediaQuery.widthOf(context); final viewportHeight = MediaQuery.heightOf(context); @@ -451,6 +462,7 @@ class _AssetPageState extends ConsumerState { isCurrent: isCurrent, isPlayingMotionVideo: isPlayingMotionVideo, localFilePath: viewIntentFilePath, + remoteThumbnailSize: thumbnailSize, ), ), if (showingOcr && displayAsset.width != null && displayAsset.height != null) diff --git a/mobile/lib/presentation/widgets/asset_viewer/asset_preloader.dart b/mobile/lib/presentation/widgets/asset_viewer/asset_preloader.dart index 4d1856b90d..8c153e9995 100644 --- a/mobile/lib/presentation/widgets/asset_viewer/asset_preloader.dart +++ b/mobile/lib/presentation/widgets/asset_viewer/asset_preloader.dart @@ -17,7 +17,8 @@ class AssetPreloader { AssetPreloader({required this.timelineService, required this.mounted}); - void preload(int index, Size size) { + /// Preloads adjacent images with the current thumbnail size. + void preload(int index, Size size, {Size? thumbnailSize}) { unawaited(timelineService.preloadAssets(index)); _timer?.cancel(); _timer = Timer(Durations.medium4, () async { @@ -33,13 +34,14 @@ class AssetPreloader { } _prevStream?.removeListener(_dummyListener); _nextStream?.removeListener(_dummyListener); - _prevStream = prev != null ? _resolveImage(prev, size) : null; - _nextStream = next != null ? _resolveImage(next, size) : null; + _prevStream = prev != null ? _resolveImage(prev, size, thumbnailSize) : null; + _nextStream = next != null ? _resolveImage(next, size, thumbnailSize) : null; }); } - ImageStream _resolveImage(BaseAsset asset, Size size) { - return getFullImageProvider(asset, size: size).resolve(ImageConfiguration.empty)..addListener(_dummyListener); + ImageStream _resolveImage(BaseAsset asset, Size size, Size? thumbnailSize) { + return getFullImageProvider(asset, size: size, remoteThumbnailSize: thumbnailSize).resolve(ImageConfiguration.empty) + ..addListener(_dummyListener); } void dispose() { diff --git a/mobile/lib/presentation/widgets/asset_viewer/asset_stack.provider.dart b/mobile/lib/presentation/widgets/asset_viewer/asset_stack.provider.dart index dae6db568c..c4e06e5ad9 100644 --- a/mobile/lib/presentation/widgets/asset_viewer/asset_stack.provider.dart +++ b/mobile/lib/presentation/widgets/asset_viewer/asset_stack.provider.dart @@ -11,6 +11,10 @@ class StackChildrenNotifier extends AutoDisposeFamilyAsyncNotifier stack) { + state = AsyncData(stack); + } } final stackChildrenNotifier = AsyncNotifierProvider.autoDispose diff --git a/mobile/lib/presentation/widgets/asset_viewer/asset_stack.widget.dart b/mobile/lib/presentation/widgets/asset_viewer/asset_stack.widget.dart index f5d75a6a86..77832c2685 100644 --- a/mobile/lib/presentation/widgets/asset_viewer/asset_stack.widget.dart +++ b/mobile/lib/presentation/widgets/asset_viewer/asset_stack.widget.dart @@ -2,8 +2,8 @@ import 'package:flutter/material.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; import 'package:immich_mobile/domain/models/asset/base_asset.model.dart'; import 'package:immich_mobile/domain/services/timeline.service.dart'; -import 'package:immich_mobile/providers/asset_viewer/asset_viewer.provider.dart'; import 'package:immich_mobile/presentation/widgets/images/thumbnail.widget.dart'; +import 'package:immich_mobile/providers/asset_viewer/asset_viewer.provider.dart'; import 'package:immich_mobile/providers/infrastructure/timeline.provider.dart'; class AssetStackRow extends ConsumerWidget { @@ -17,13 +17,19 @@ class AssetStackRow extends ConsumerWidget { return const SizedBox.shrink(); } - final hideAssetStack = ref.read(timelineServiceProvider).origin == TimelineOrigin.trash; + final hideAssetStack = ref.watch(timelineServiceProvider).origin == TimelineOrigin.trash; if (hideAssetStack) { return const SizedBox.shrink(); } + final showingDetails = ref.watch(assetViewerProvider.select((s) => s.showingDetails)); + if (showingDetails) { + return const SizedBox.shrink(); + } + final showingControls = ref.watch(assetViewerProvider.select((s) => s.showingControls)); - double opacity = ref.watch(assetViewerProvider.select((s) => s.backgroundOpacity)) * (showingControls ? 1 : 0); + final double opacity = + ref.watch(assetViewerProvider.select((s) => s.backgroundOpacity)) * (showingControls ? 1 : 0); return IgnorePointer( ignoring: opacity < 1.0, @@ -75,7 +81,7 @@ class _StackItemState extends ConsumerState<_StackItem> { Icons.play_circle_outline_rounded, color: Colors.white, size: 16, - shadows: [Shadow(blurRadius: 5.0, color: Color.fromRGBO(0, 0, 0, 0.6), offset: Offset(0.0, 0.0))], + shadows: [Shadow(blurRadius: 5.0, color: Color.fromRGBO(0, 0, 0, 0.6), offset: Offset.zero)], ), ); const selectedDecoration = BoxDecoration( 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 8b9dc6f887..ad330309ab 100644 --- a/mobile/lib/presentation/widgets/asset_viewer/asset_viewer.page.dart +++ b/mobile/lib/presentation/widgets/asset_viewer/asset_viewer.page.dart @@ -1,7 +1,7 @@ import 'dart:async'; +import 'dart:math' as math; import 'package:auto_route/auto_route.dart'; -import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; @@ -13,6 +13,7 @@ import 'package:immich_mobile/domain/utils/event_stream.dart'; import 'package:immich_mobile/extensions/build_context_extensions.dart'; import 'package:immich_mobile/extensions/platform_extensions.dart'; import 'package:immich_mobile/extensions/scroll_extensions.dart'; +import 'package:immich_mobile/generated/translations.g.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/download_status_floating_button.widget.dart'; import 'package:immich_mobile/presentation/widgets/asset_viewer/asset_page.widget.dart'; import 'package:immich_mobile/presentation/widgets/asset_viewer/asset_preloader.dart'; @@ -64,7 +65,8 @@ class AssetViewer extends ConsumerStatefulWidget { @override ConsumerState createState() => _AssetViewerState(); - static void setAsset(WidgetRef ref, BaseAsset asset) { + /// Sets the asset and thumbnail size before opening the viewer. + static void setAsset(WidgetRef ref, BaseAsset asset, {Size? thumbnailSize}) { ref.read(assetViewerProvider.notifier).reset(); // Hide controls by default for videos @@ -72,15 +74,17 @@ class AssetViewer extends ConsumerStatefulWidget { ref.read(assetViewerProvider.notifier).setControls(false); } - _setAsset(ref, asset); - } - - static void _setAsset(WidgetRef ref, BaseAsset asset) { - ref.read(assetViewerProvider.notifier).setAsset(asset); + ref.read(assetViewerProvider.notifier).setAsset(asset, thumbnailSize: thumbnailSize); } } class _AssetViewerState extends ConsumerState { + static const _viewerOverlayStyle = SystemUiOverlayStyle( + statusBarIconBrightness: Brightness.light, + statusBarBrightness: Brightness.dark, + systemNavigationBarIconBrightness: Brightness.light, + ); + late final _heroOffset = widget.heroOffset ?? TabsRouterScope.of(context)?.controller.activeIndex ?? 0; late final _pageController = PageController(initialPage: widget.initialIndex); late final _preloader = AssetPreloader(timelineService: ref.read(timelineServiceProvider), mounted: () => mounted); @@ -100,7 +104,7 @@ class _AssetViewerState extends ConsumerState { final maxPage = _totalAssets - 1; if (target >= 0 && target <= maxPage) { _pageController.jumpToPage(target); - _onAssetChanged(target); + unawaited(_onAssetChanged(target)); } } @@ -119,14 +123,14 @@ class _AssetViewerState extends ConsumerState { WidgetsBinding.instance.addPostFrameCallback(_onAssetInit); final assetViewer = ref.read(assetViewerProvider); - _setSystemUIMode(assetViewer.showingControls, assetViewer.showingDetails); + unawaited(_setSystemUIMode(assetViewer.showingControls, assetViewer.showingDetails)); } @override void dispose() { _pageController.dispose(); _preloader.dispose(); - _reloadSubscription?.cancel(); + unawaited(_reloadSubscription?.cancel()); _stackChildrenKeepAlive?.close(); unawaited(restoreEdgeToEdge()); @@ -150,17 +154,21 @@ class _AssetViewerState extends ConsumerState { final page = _pageController.page?.round(); if (page != null && page != _currentPage) { - _onAssetChanged(page); + unawaited(_onAssetChanged(page)); } return false; } void _onAssetInit(Duration timeStamp) { - _preloader.preload(widget.initialIndex, context.sizeData); + _preloader.preload( + widget.initialIndex, + context.sizeData, + thumbnailSize: ref.read(assetViewerProvider).thumbnailSize, + ); _handleCasting(); } - void _onAssetChanged(int index) async { + Future _onAssetChanged(int index) async { _currentPage = index; final asset = await ref.read(timelineServiceProvider).getAssetAsync(index); @@ -168,8 +176,14 @@ class _AssetViewerState extends ConsumerState { return; } - AssetViewer._setAsset(ref, asset); - _preloader.preload(index, context.sizeData); + // The viewer is closing; don't flip the current asset now. Flipping it swaps + // the grid tile hero keys mid pop and animates the close on two tiles (#23779). + if (!mounted || !(ModalRoute.of(context)?.isActive ?? true)) { + return; + } + + ref.read(assetViewerProvider.notifier).setAsset(asset); + _preloader.preload(index, context.sizeData, thumbnailSize: ref.read(assetViewerProvider).thumbnailSize); _handleCasting(); _stackChildrenKeepAlive?.close(); _stackChildrenKeepAlive = ref.read(stackChildrenNotifier(asset).notifier).ref.keepAlive(); @@ -196,7 +210,7 @@ class _AssetViewerState extends ConsumerState { SnackBar( duration: const Duration(seconds: 2), content: Text( - "local_asset_cast_failed".tr(), + context.t.local_asset_cast_failed, style: context.textTheme.bodyLarge?.copyWith(color: context.primaryColor), ), ), @@ -209,6 +223,8 @@ class _AssetViewerState extends ConsumerState { _onTimelineReloadEvent(); case ViewerReloadAssetEvent(): _onViewerReloadEvent(); + case final ViewerStackAssetDeletedEvent event: + unawaited(_onViewerStackAssetDeletedEvent(event)); default: } } @@ -220,8 +236,35 @@ class _AssetViewerState extends ConsumerState { final index = _pageController.page?.round() ?? 0; final target = index >= _totalAssets - 1 ? index - 1 : index + 1; - _pageController.animateToPage(target, duration: Durations.medium1, curve: Curves.easeInOut); - _onAssetChanged(target); + unawaited(_pageController.animateToPage(target, duration: Durations.medium1, curve: Curves.easeInOut)); + unawaited(_onAssetChanged(target)); + } + + Future _onViewerStackAssetDeletedEvent(ViewerStackAssetDeletedEvent event) async { + final timelineAsset = ref.read(timelineServiceProvider).getAssetSafe(_currentPage); + if (timelineAsset == null) { + _onViewerReloadEvent(); + return; + } + + final stackProvider = stackChildrenNotifier(timelineAsset); + + ref.invalidate(stackProvider); + final stack = await ref.read(stackProvider.future); + + if (!mounted) { + return; + } + + if (stack.isEmpty) { + _onViewerReloadEvent(); + return; + } + + final targetIndex = math.min(event.stackIndex, stack.length - 1); + ref.read(assetViewerProvider.notifier) + ..setAsset(stack[targetIndex]) + ..setStackIndex(targetIndex); } void _onTimelineReloadEvent() { @@ -229,7 +272,7 @@ class _AssetViewerState extends ConsumerState { final totalAssets = timelineService.totalAssets; if (totalAssets == 0) { - context.maybePop(); + unawaited(context.maybePop()); return; } @@ -239,9 +282,14 @@ class _AssetViewerState extends ConsumerState { if (index != _currentPage) { _pageController.jumpToPage(index); - _onAssetChanged(index); + unawaited(_onAssetChanged(index)); + } else if (currentAsset is RemoteAsset && currentAsset.stackId != null && assetIndex == null) { + final timelineAsset = timelineService.getAssetSafe(index); + if (timelineAsset is! RemoteAsset || currentAsset.stackId != timelineAsset.stackId) { + unawaited(_onAssetChanged(index)); + } } else if (currentAsset != null && assetIndex == null) { - _onAssetChanged(index); + unawaited(_onAssetChanged(index)); } if (_totalAssets != totalAssets) { @@ -251,9 +299,9 @@ class _AssetViewerState extends ConsumerState { } } - void _setSystemUIMode(bool controls, bool details) { + Future _setSystemUIMode(bool controls, bool details) { final immersive = !controls || (CurrentPlatform.isIOS && details); - unawaited(immersive ? SystemChrome.setEnabledSystemUIMode(SystemUiMode.immersiveSticky) : restoreEdgeToEdge()); + return immersive ? SystemChrome.setEnabledSystemUIMode(SystemUiMode.immersiveSticky) : restoreEdgeToEdge(); } @override @@ -277,52 +325,55 @@ class _AssetViewerState extends ConsumerState { ref.listen(assetViewerProvider.select((value) => (value.showingControls, value.showingDetails)), (_, state) { final (controls, details) = state; - _setSystemUIMode(controls, details); + unawaited(_setSystemUIMode(controls, details)); }); - return Scaffold( - backgroundColor: backgroundColor, - resizeToAvoidBottomInset: false, - appBar: const ViewerTopAppBar(), - extendBody: true, - extendBodyBehindAppBar: true, - floatingActionButton: IgnorePointer( - ignoring: !showingControls, - child: AnimatedOpacity( - opacity: showingControls ? 1.0 : 0.0, - duration: Durations.short2, - child: const DownloadStatusFloatingButton(), - ), - ), - bottomNavigationBar: const ViewerBottomAppBar(), - body: Stack( - children: [ - NotificationListener( - onNotification: _onScrollEnd, - child: PhotoViewGestureDetectorScope( - axis: Axis.horizontal, - child: PageView.builder( - controller: _pageController, - physics: isZoomed - ? const NeverScrollableScrollPhysics() - : CurrentPlatform.isIOS - ? const FastScrollPhysics() - : const FastClampingScrollPhysics(), - itemCount: _totalAssets, - itemBuilder: (context, index) => - AssetPage(index: index, heroOffset: _heroOffset, onTapNavigate: _onTapNavigate), - ), - ), + return AnnotatedRegion( + value: _viewerOverlayStyle, + child: Scaffold( + backgroundColor: backgroundColor, + resizeToAvoidBottomInset: false, + appBar: const ViewerTopAppBar(), + extendBody: true, + extendBodyBehindAppBar: true, + floatingActionButton: IgnorePointer( + ignoring: !showingControls, + child: AnimatedOpacity( + opacity: showingControls ? 1.0 : 0.0, + duration: Durations.short2, + child: const DownloadStatusFloatingButton(), ), - if (!CurrentPlatform.isIOS) - IgnorePointer( - child: AnimatedContainer( - duration: Durations.short2, - color: Colors.black.withValues(alpha: showingDetails ? 0.6 : 0.0), - height: context.padding.top, + ), + bottomNavigationBar: const ViewerBottomAppBar(), + body: Stack( + children: [ + NotificationListener( + onNotification: _onScrollEnd, + child: PhotoViewGestureDetectorScope( + axis: Axis.horizontal, + child: PageView.builder( + controller: _pageController, + physics: isZoomed + ? const NeverScrollableScrollPhysics() + : CurrentPlatform.isIOS + ? const FastScrollPhysics() + : const FastClampingScrollPhysics(), + itemCount: _totalAssets, + itemBuilder: (context, index) => + AssetPage(index: index, heroOffset: _heroOffset, onTapNavigate: _onTapNavigate), + ), ), ), - ], + if (!CurrentPlatform.isIOS) + IgnorePointer( + child: AnimatedContainer( + duration: Durations.short2, + color: Colors.black.withValues(alpha: showingDetails ? 0.6 : 0.0), + height: context.padding.top, + ), + ), + ], + ), ), ); } diff --git a/mobile/lib/presentation/widgets/asset_viewer/bottom_bar.widget.dart b/mobile/lib/presentation/widgets/asset_viewer/bottom_bar.widget.dart index 01a48e7e97..15b90e58ea 100644 --- a/mobile/lib/presentation/widgets/asset_viewer/bottom_bar.widget.dart +++ b/mobile/lib/presentation/widgets/asset_viewer/bottom_bar.widget.dart @@ -1,26 +1,31 @@ import 'package:flutter/material.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:immich_mobile/constants/enums.dart'; -import 'package:immich_mobile/domain/models/asset/base_asset.model.dart'; import 'package:immich_mobile/domain/services/timeline.service.dart'; import 'package:immich_mobile/extensions/build_context_extensions.dart'; +import 'package:immich_mobile/presentation/actions/action.dart'; +import 'package:immich_mobile/presentation/actions/delete.action.dart'; +import 'package:immich_mobile/presentation/actions/edit_asset.action.dart'; +import 'package:immich_mobile/presentation/actions/restore.action.dart'; +import 'package:immich_mobile/presentation/actions/share.action.dart'; +import 'package:immich_mobile/presentation/actions/upload.action.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/add_action_button.widget.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/delete_action_button.widget.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/delete_local_action_button.widget.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/delete_permanent_action_button.widget.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/edit_image_action_button.widget.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/restore_action_button.widget.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/share_action_button.widget.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/upload_action_button.widget.dart'; import 'package:immich_mobile/presentation/widgets/asset_viewer/ocr_toggle_button.widget.dart'; import 'package:immich_mobile/providers/asset_viewer/asset_viewer.provider.dart'; import 'package:immich_mobile/providers/infrastructure/readonly_mode.provider.dart'; import 'package:immich_mobile/providers/infrastructure/timeline.provider.dart'; import 'package:immich_mobile/providers/routes.provider.dart'; -import 'package:immich_mobile/providers/server_info.provider.dart'; -import 'package:immich_mobile/providers/user.provider.dart'; -import 'package:immich_mobile/utils/semver.dart'; import 'package:immich_mobile/widgets/asset_viewer/video_controls.dart'; +import 'package:immich_ui/immich_ui.dart'; + +// Resolved here rather than as an ActionColumnButton so a hidden restore +// takes no slot in the spaceEvenly row below. +List _actionColumnButtons(BuildContext context, WidgetRef ref, List actions) => actions + .map((a) => a.create(context, ref)) + .nonNulls + .map( + (item) => .new(icon: item.icon, label: item.label, onPressed: item.onAction, onLongPress: item.onSecondaryAction), + ) + .toList(growable: false); class ViewerBottomBar extends ConsumerWidget { const ViewerBottomBar({super.key}); @@ -33,37 +38,24 @@ class ViewerBottomBar extends ConsumerWidget { } final isReadonlyModeEnabled = ref.watch(readonlyModeProvider); - final user = ref.watch(currentUserProvider); - final isOwner = asset is RemoteAsset && asset.ownerId == user?.id; final showingDetails = ref.watch(assetViewerProvider.select((s) => s.showingDetails)); final isInLockedView = ref.watch(inLockedViewProvider); - final serverInfo = ref.watch(serverInfoProvider); - final isInTrash = ref.read(timelineServiceProvider).origin == TimelineOrigin.trash; + final isInTrash = ref.watch(timelineServiceProvider).origin == TimelineOrigin.trash; final originalTheme = context.themeData; final actions = [ - if (isInTrash && isOwner && asset.hasRemote) - const RestoreActionButton(source: ActionSource.viewer) - else - const ShareActionButton(source: ActionSource.viewer), + ..._actionColumnButtons(context, ref, const [RestoreAction(source: .viewer), ShareAction(source: .viewer)]), if (!isInLockedView) ...[ if (!isInTrash) ...[ - if (asset.isLocalOnly) const UploadActionButton(source: ActionSource.viewer), - // edit sync was added in 2.6.0 - if (asset.isEditable && serverInfo.serverVersion >= const SemVer(major: 2, minor: 6, patch: 0)) - const EditImageActionButton(), - if (asset.hasRemote) AddActionButton(originalTheme: originalTheme), - ], - if (isOwner) ...[ - if (asset.isLocalOnly) - const DeleteLocalActionButton(source: ActionSource.viewer) - else if (asset.isTrashed) - const DeletePermanentActionButton(source: ActionSource.viewer, useShortLabel: true) - else - const DeleteActionButton(source: ActionSource.viewer, showConfirmation: true), + ..._actionColumnButtons(context, ref, const [ + UploadAction(source: .viewer, showProgress: true), + EditAssetAction(source: .viewer), + ]), + if (asset.hasRemote) ImmichColorOverride(color: null, child: AddActionButton(originalTheme: originalTheme)), ], + ..._actionColumnButtons(context, ref, const [DeleteAction(source: .viewer)]), ], ]; @@ -101,10 +93,13 @@ class ViewerBottomBar extends ConsumerWidget { child: Column( mainAxisSize: MainAxisSize.min, children: [ - OcrToggleButton(asset: asset), - if (asset.isVideo) VideoControls(videoPlayerName: asset.heroTag), + if (asset.isImage) OcrToggleButton(asset: asset), + if (asset.isVideo) VideoControls(videoPlayerName: asset.id), if (!isReadonlyModeEnabled) - Row(mainAxisAlignment: MainAxisAlignment.spaceEvenly, children: actions), + ImmichColorOverride( + color: Colors.white, + child: Row(mainAxisAlignment: MainAxisAlignment.spaceEvenly, children: actions), + ), ], ), ), diff --git a/mobile/lib/presentation/widgets/asset_viewer/motion_photo_button.widget.dart b/mobile/lib/presentation/widgets/asset_viewer/motion_photo_button.widget.dart index 800af23039..78f234d39b 100644 --- a/mobile/lib/presentation/widgets/asset_viewer/motion_photo_button.widget.dart +++ b/mobile/lib/presentation/widgets/asset_viewer/motion_photo_button.widget.dart @@ -1,7 +1,7 @@ import 'package:flutter/material.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; import 'package:immich_mobile/extensions/platform_extensions.dart'; -import 'package:immich_mobile/extensions/translate_extensions.dart'; +import 'package:immich_mobile/generated/translations.g.dart'; import 'package:immich_mobile/providers/asset_viewer/asset_viewer.provider.dart'; import 'package:immich_mobile/providers/asset_viewer/is_motion_video_playing.provider.dart'; @@ -30,7 +30,7 @@ class MotionPhotoPlayButton extends ConsumerWidget { child: Center( child: _MotionButton( isPlaying: isPlaying, - onPressed: ref.read(isPlayingMotionVideoProvider.notifier).toggle, + onPressed: ref.watch(isPlayingMotionVideoProvider.notifier).toggle, ), ), ), @@ -66,7 +66,7 @@ class _MotionButton extends StatelessWidget { ), const SizedBox(width: 8), Text( - CurrentPlatform.isAndroid ? 'motion'.t(context: context) : 'live'.t(context: context), + CurrentPlatform.isAndroid ? context.t.motion : context.t.live, style: const TextStyle(color: Colors.white, fontSize: 14, fontWeight: FontWeight.w500), ), ], diff --git a/mobile/lib/presentation/widgets/asset_viewer/ocr_overlay.widget.dart b/mobile/lib/presentation/widgets/asset_viewer/ocr_overlay.widget.dart index a9291f3173..b86d7298d5 100644 --- a/mobile/lib/presentation/widgets/asset_viewer/ocr_overlay.widget.dart +++ b/mobile/lib/presentation/widgets/asset_viewer/ocr_overlay.widget.dart @@ -82,7 +82,7 @@ class _OcrOverlayState extends ConsumerState { } void _detachController() { - _controllerSub?.cancel(); + unawaited(_controllerSub?.cancel()); _controllerSub = null; } @@ -110,7 +110,7 @@ class _OcrOverlayState extends ConsumerState { ); }, loading: () => const SizedBox.shrink(), - error: (_, __) => const SizedBox.shrink(), + error: (_, _) => const SizedBox.shrink(), ); } } diff --git a/mobile/lib/presentation/widgets/asset_viewer/ocr_toggle_button.widget.dart b/mobile/lib/presentation/widgets/asset_viewer/ocr_toggle_button.widget.dart index 73c7b2d3e7..cdff727967 100644 --- a/mobile/lib/presentation/widgets/asset_viewer/ocr_toggle_button.widget.dart +++ b/mobile/lib/presentation/widgets/asset_viewer/ocr_toggle_button.widget.dart @@ -28,7 +28,7 @@ class OcrToggleButton extends ConsumerWidget { shape: const CircleBorder(), clipBehavior: Clip.antiAlias, child: InkWell( - onTap: ref.read(assetViewerProvider.notifier).toggleOcr, + onTap: ref.watch(assetViewerProvider.notifier).toggleOcr, child: const Padding( padding: EdgeInsets.all(10.0), child: Icon(Icons.text_fields_rounded, size: 22, color: Colors.white), diff --git a/mobile/lib/presentation/widgets/asset_viewer/rating_bar.widget.dart b/mobile/lib/presentation/widgets/asset_viewer/rating_bar.widget.dart index b956ef103c..fb5cfff255 100644 --- a/mobile/lib/presentation/widgets/asset_viewer/rating_bar.widget.dart +++ b/mobile/lib/presentation/widgets/asset_viewer/rating_bar.widget.dart @@ -1,6 +1,6 @@ import 'package:flutter/material.dart'; import 'package:immich_mobile/extensions/build_context_extensions.dart'; -import 'package:immich_mobile/extensions/translate_extensions.dart'; +import 'package:immich_mobile/generated/translations.g.dart'; class RatingBar extends StatefulWidget { final double initialRating; @@ -64,8 +64,8 @@ class _RatingBarState extends State { } else if (dx >= totalWidth) { newRating = widget.itemCount.toDouble(); } else { - double starWithPadding = widget.itemSize + widget.starPadding; - int tappedIndex = (dx / starWithPadding).floor().clamp(0, widget.itemCount - 1); + final double starWithPadding = widget.itemSize + widget.starPadding; + final int tappedIndex = (dx / starWithPadding).floor().clamp(0, widget.itemCount - 1); newRating = tappedIndex + 1.0; if (isTap && newRating == _currentRating && _currentRating != 0) { @@ -88,7 +88,7 @@ class _RatingBarState extends State { @override Widget build(BuildContext context) { final isRTL = Directionality.of(context) == TextDirection.rtl; - final double visualAlignmentOffset = 5.0; + const double visualAlignmentOffset = 5.0; return Column( mainAxisSize: MainAxisSize.min, @@ -107,8 +107,8 @@ class _RatingBarState extends State { if (i.isOdd) { return SizedBox(width: widget.starPadding); } - int index = i ~/ 2; - bool filled = _currentRating > index; + final int index = i ~/ 2; + final bool filled = _currentRating > index; return widget.itemBuilder ?? Icon( Icons.star_rounded, @@ -129,10 +129,7 @@ class _RatingBarState extends State { }); widget.onClearRating?.call(); }, - child: Text( - 'rating_clear'.t(context: context), - style: TextStyle(color: context.themeData.colorScheme.primary), - ), + child: Text(context.t.rating_clear, style: TextStyle(color: context.themeData.colorScheme.primary)), ), ), ], diff --git a/mobile/lib/presentation/widgets/asset_viewer/sheet_tile.widget.dart b/mobile/lib/presentation/widgets/asset_viewer/sheet_tile.widget.dart index 69e84ee03d..8ff0befd7b 100644 --- a/mobile/lib/presentation/widgets/asset_viewer/sheet_tile.widget.dart +++ b/mobile/lib/presentation/widgets/asset_viewer/sheet_tile.widget.dart @@ -1,7 +1,9 @@ +import 'dart:async'; + import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:immich_mobile/extensions/translate_extensions.dart'; +import 'package:immich_mobile/generated/translations.g.dart'; import 'package:immich_mobile/providers/haptic_feedback.provider.dart'; import 'package:immich_mobile/widgets/common/immich_toast.dart'; @@ -26,12 +28,8 @@ class SheetTile extends ConsumerWidget { }); void copyTitle(BuildContext context, WidgetRef ref) { - Clipboard.setData(ClipboardData(text: title)); - ImmichToast.show( - context: context, - msg: 'copied_to_clipboard'.t(context: context), - toastType: ToastType.info, - ); + unawaited(Clipboard.setData(ClipboardData(text: title))); + ImmichToast.show(context: context, msg: context.t.copied_to_clipboard, toastType: ToastType.info); ref.read(hapticFeedbackProvider.notifier).selectionClick(); } diff --git a/mobile/lib/presentation/widgets/asset_viewer/video_viewer.widget.dart b/mobile/lib/presentation/widgets/asset_viewer/video_viewer.widget.dart index 2be7bb91e8..9011888b54 100644 --- a/mobile/lib/presentation/widgets/asset_viewer/video_viewer.widget.dart +++ b/mobile/lib/presentation/widgets/asset_viewer/video_viewer.widget.dart @@ -47,7 +47,7 @@ class _NativeVideoViewerState extends ConsumerState with Widg bool _isVideoReady = false; bool _shouldPlayOnForeground = true; - VideoPlayerNotifier get _notifier => ref.read(videoPlayerProvider(widget.asset.heroTag).notifier); + VideoPlayerNotifier get _notifier => ref.read(videoPlayerProvider(widget.asset.id).notifier); @override void initState() { @@ -66,7 +66,7 @@ class _NativeVideoViewerState extends ConsumerState with Widg if (!widget.isCurrent) { _loadTimer?.cancel(); - _notifier.pause(); + unawaited(_notifier.pause()); return; } @@ -83,7 +83,7 @@ class _NativeVideoViewerState extends ConsumerState with Widg } @override - void didChangeAppLifecycleState(AppLifecycleState state) async { + Future didChangeAppLifecycleState(AppLifecycleState state) async { switch (state) { case AppLifecycleState.resumed: if (_shouldPlayOnForeground) { @@ -91,7 +91,7 @@ class _NativeVideoViewerState extends ConsumerState with Widg } case AppLifecycleState.paused: _shouldPlayOnForeground = await _controller?.isPlaying() ?? true; - if (_shouldPlayOnForeground) { + if (_shouldPlayOnForeground && mounted) { await _notifier.pause(); } default: @@ -112,6 +112,7 @@ class _NativeVideoViewerState extends ConsumerState with Widg final localFilePath = widget.localFilePath; if (localFilePath != null) { final file = File(localFilePath); + // ignore: avoid_slow_async_io if (!await file.exists()) { throw Exception('No file found for the video'); } @@ -122,9 +123,14 @@ class _NativeVideoViewerState extends ConsumerState with Widg ); } - if (videoAsset.hasLocal && videoAsset.livePhotoVideoId == null) { - final id = videoAsset is LocalAsset ? videoAsset.id : (videoAsset as RemoteAsset).localId!; - final file = await StorageRepository().getFileForAsset(id); + // Attempt to retrieve LocalAsset, falling back to remote if it cannot be found + final localAsset = await _localPlaybackAsset(videoAsset); + + if (localAsset != null) { + final file = localAsset.isMotionPhoto + ? await StorageRepository().getMotionFileForAsset(localAsset) + : await StorageRepository().getFileForAsset(localAsset.id); + if (!mounted) { return null; } @@ -141,14 +147,17 @@ class _NativeVideoViewerState extends ConsumerState with Widg ); } - final remoteId = (videoAsset as RemoteAsset).id; + final remoteAsset = videoAsset as RemoteAsset; final serverEndpoint = Store.get(StoreKey.serverEndpoint); + if (!context.mounted) { + return null; + } + final isOriginalVideo = ref.read(appConfigProvider).viewer.loadOriginalVideo; final String postfixUrl = isOriginalVideo ? 'original' : 'video/playback'; - final String videoUrl = videoAsset.livePhotoVideoId != null - ? '$serverEndpoint/assets/${videoAsset.livePhotoVideoId}/$postfixUrl' - : '$serverEndpoint/assets/$remoteId/$postfixUrl'; + final String assetId = remoteAsset.livePhotoVideoId ?? remoteAsset.id; + final String videoUrl = '$serverEndpoint/assets/$assetId/$postfixUrl'; return VideoSource.init(path: videoUrl, type: VideoSourceType.network, headers: ApiService.getRequestHeaders()); } catch (error) { @@ -157,7 +166,44 @@ class _NativeVideoViewerState extends ConsumerState with Widg } } - void _onPlaybackReady() async { + Future _localPlaybackAsset(BaseAsset baseAsset) async { + if (!baseAsset.hasLocal) { + return null; + } + + LocalAsset? localAsset; + + if (baseAsset is LocalAsset) { + localAsset = baseAsset; + } else { + final localId = (baseAsset as RemoteAsset).localId; + localAsset = localId != null ? await ref.read(assetServiceProvider).getLocalAsset(localId) : null; + } + + if (localAsset == null) { + _log.severe( + 'Invariant violation: asset ${baseAsset.name} (${baseAsset.localId}) is marked `hasLocal` but local asset could not be retrieved', + ); + + return null; + } + + // Clients (local) may not correctly recognize a given asset as a motion photo. This allows for a scenario where both remote and local + // have the same asset (hash), but only the remote properly recognizes it as a motion asset + // If this scenario occurs, fall back to using the remote asset + if (baseAsset.isMotionPhoto && !localAsset.isMotionPhoto) { + // Platform mismatch for motion photo, use remote instead + _log.warning( + 'Mismatched local and remote motion states on ${baseAsset.name} (${baseAsset.localId}), local = ${localAsset.isMotionPhoto}, remote = ${baseAsset.isMotionPhoto}', + ); + + return null; + } + + return localAsset; + } + + Future _onPlaybackReady() async { if (!mounted || !widget.isCurrent) { return; } @@ -216,7 +262,7 @@ class _NativeVideoViewerState extends ConsumerState with Widg _controller?.onPlaybackEnded.removeListener(_onPlaybackEnded); } - void _loadVideo() async { + Future _loadVideo() async { final nc = _controller; if (nc == null || nc.videoSource != null || !mounted) { return; @@ -227,10 +273,13 @@ class _NativeVideoViewerState extends ConsumerState with Widg return; } - await _notifier.load(source); + // Grab refs to prevent reading after dispose final loopVideo = ref.read(appConfigProvider).viewer.loopVideo; - await _notifier.setLoop(!widget.asset.isMotionPhoto && loopVideo); - await _notifier.setVolume(1); + final localNotifier = _notifier; + + await localNotifier.load(source); + await localNotifier.setLoop(!widget.asset.isMotionPhoto && loopVideo); + await localNotifier.setVolume(1); } void _initController(NativeVideoPlayerController nc) { @@ -248,19 +297,19 @@ class _NativeVideoViewerState extends ConsumerState with Widg _controller = nc; if (widget.isCurrent) { - _loadVideo(); + unawaited(_loadVideo()); } } @override Widget build(BuildContext context) { final isCasting = ref.watch(castProvider.select((c) => c.isCasting)); - final status = ref.watch(videoPlayerProvider(widget.asset.heroTag).select((v) => v.status)); + final status = ref.watch(videoPlayerProvider(widget.asset.id).select((v) => v.status)); return IgnorePointer( child: Stack( children: [ - Center(child: widget.image), + if (!_isVideoReady || widget.asset.isMotionPhoto || isCasting) Center(child: widget.image), if (!isCasting) ...[ Visibility.maintain( visible: _isVideoReady, diff --git a/mobile/lib/presentation/widgets/asset_viewer/viewer_bottom_app_bar.widget.dart b/mobile/lib/presentation/widgets/asset_viewer/viewer_bottom_app_bar.widget.dart index 1c0b600843..0e7b5661de 100644 --- a/mobile/lib/presentation/widgets/asset_viewer/viewer_bottom_app_bar.widget.dart +++ b/mobile/lib/presentation/widgets/asset_viewer/viewer_bottom_app_bar.widget.dart @@ -1,7 +1,7 @@ import 'package:flutter/material.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:immich_mobile/providers/asset_viewer/asset_viewer.provider.dart'; import 'package:immich_mobile/presentation/widgets/asset_viewer/bottom_bar.widget.dart'; +import 'package:immich_mobile/providers/asset_viewer/asset_viewer.provider.dart'; class ViewerBottomAppBar extends ConsumerWidget { const ViewerBottomAppBar({super.key}); @@ -9,7 +9,8 @@ class ViewerBottomAppBar extends ConsumerWidget { @override Widget build(BuildContext context, WidgetRef ref) { final showingControls = ref.watch(assetViewerProvider.select((s) => s.showingControls)); - double opacity = ref.watch(assetViewerProvider.select((s) => s.backgroundOpacity)) * (showingControls ? 1 : 0); + final double opacity = + ref.watch(assetViewerProvider.select((s) => s.backgroundOpacity)) * (showingControls ? 1 : 0); return IgnorePointer( ignoring: opacity < 1.0, diff --git a/mobile/lib/presentation/widgets/asset_viewer/viewer_kebab_menu.widget.dart b/mobile/lib/presentation/widgets/asset_viewer/viewer_kebab_menu.widget.dart index da0abad1dd..cbbc851108 100644 --- a/mobile/lib/presentation/widgets/asset_viewer/viewer_kebab_menu.widget.dart +++ b/mobile/lib/presentation/widgets/asset_viewer/viewer_kebab_menu.widget.dart @@ -29,7 +29,7 @@ class ViewerKebabMenu extends ConsumerWidget { final user = ref.watch(currentUserProvider); final isOwner = asset is RemoteAsset && asset.ownerId == user?.id; final isCasting = ref.watch(castProvider.select((c) => c.isCasting)); - final timelineOrigin = ref.read(timelineServiceProvider).origin; + final timelineOrigin = ref.watch(timelineServiceProvider).origin; final isTrashEnable = ref.watch(serverInfoProvider.select((state) => state.serverFeatures.trash)); final isInLockedView = ref.watch(inLockedViewProvider); final currentAlbum = ref.watch(currentRemoteAlbumProvider); diff --git a/mobile/lib/presentation/widgets/asset_viewer/viewer_top_app_bar.widget.dart b/mobile/lib/presentation/widgets/asset_viewer/viewer_top_app_bar.widget.dart index 8d51b8cd2e..deae9cbd07 100644 --- a/mobile/lib/presentation/widgets/asset_viewer/viewer_top_app_bar.widget.dart +++ b/mobile/lib/presentation/widgets/asset_viewer/viewer_top_app_bar.widget.dart @@ -1,3 +1,5 @@ +import 'dart:async'; + import 'package:auto_route/auto_route.dart'; import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; @@ -40,10 +42,10 @@ class ViewerTopAppBar extends ConsumerWidget implements PreferredSizeWidget { } final showingControls = ref.watch(assetViewerProvider.select((s) => s.showingControls)); - double opacity = ref.watch(assetViewerProvider.select((s) => s.backgroundOpacity)) * (showingControls ? 1 : 0); + final double opacity = + ref.watch(assetViewerProvider.select((s) => s.backgroundOpacity)) * (showingControls ? 1 : 0); final originalTheme = context.themeData; - final assetForAction = [asset]; final actions = [ if (asset.isMotionPhoto) const MotionPhotoActionButton(iconOnly: true), @@ -51,19 +53,21 @@ class ViewerTopAppBar extends ConsumerWidget implements PreferredSizeWidget { IconButton( icon: const Icon(Icons.chat_outlined), onPressed: () { - context.router.push( - DriftActivitiesRoute( - album: album, - assetId: asset is RemoteAsset ? asset.id : null, - assetName: asset.name, + unawaited( + context.router.push( + DriftActivitiesRoute( + album: album, + assetId: asset is RemoteAsset ? asset.id : null, + assetName: asset.name, + ), ), ); }, ), - ActionIconButtonWidget(action: FavoriteAction(assets: assetForAction)), + const ActionIconButton(action: FavoriteAction(source: .viewer)), - ViewerKebabMenu(originalTheme: originalTheme), + ImmichColorOverride(color: null, child: ViewerKebabMenu(originalTheme: originalTheme)), ]; final lockedViewActions = [ViewerKebabMenu(originalTheme: originalTheme)]; diff --git a/mobile/lib/presentation/widgets/backup/backup_toggle_button.widget.dart b/mobile/lib/presentation/widgets/backup/backup_toggle_button.widget.dart index b424298f5b..383ec17952 100644 --- a/mobile/lib/presentation/widgets/backup/backup_toggle_button.widget.dart +++ b/mobile/lib/presentation/widgets/backup/backup_toggle_button.widget.dart @@ -1,7 +1,7 @@ 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/translate_extensions.dart'; +import 'package:immich_mobile/generated/translations.g.dart'; import 'package:immich_mobile/providers/backup/drift_backup.provider.dart'; import 'package:immich_mobile/providers/infrastructure/settings.provider.dart'; @@ -135,7 +135,7 @@ class BackupToggleButtonState extends ConsumerState with Sin children: [ Flexible( child: Text( - "enable_backup".t(context: context), + context.t.enable_backup, style: context.textTheme.titleMedium?.copyWith( fontWeight: FontWeight.w600, color: context.primaryColor, @@ -148,7 +148,7 @@ class BackupToggleButtonState extends ConsumerState with Sin Padding( padding: const EdgeInsets.only(top: 2), child: Text( - "upload_error_with_count".t(context: context, args: {'count': '$errorCount'}), + context.t.upload_error_with_count(count: errorCount), style: context.textTheme.labelMedium?.copyWith(color: context.colorScheme.error), ), ), diff --git a/mobile/lib/presentation/widgets/bottom_sheet/archive_bottom_sheet.widget.dart b/mobile/lib/presentation/widgets/bottom_sheet/archive_bottom_sheet.widget.dart index 3c9c0c692e..c68ce8d9ca 100644 --- a/mobile/lib/presentation/widgets/bottom_sheet/archive_bottom_sheet.widget.dart +++ b/mobile/lib/presentation/widgets/bottom_sheet/archive_bottom_sheet.widget.dart @@ -1,28 +1,23 @@ -import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; import 'package:immich_mobile/constants/enums.dart'; import 'package:immich_mobile/domain/models/album/album.model.dart'; +import 'package:immich_mobile/generated/translations.g.dart'; import 'package:immich_mobile/presentation/actions/action.widget.dart'; +import 'package:immich_mobile/presentation/actions/archive.action.dart'; +import 'package:immich_mobile/presentation/actions/asset_debug.action.dart'; +import 'package:immich_mobile/presentation/actions/delete.action.dart'; +import 'package:immich_mobile/presentation/actions/download.action.dart'; +import 'package:immich_mobile/presentation/actions/edit_datetime.action.dart'; +import 'package:immich_mobile/presentation/actions/edit_location.action.dart'; import 'package:immich_mobile/presentation/actions/favorite.action.dart'; -import 'package:immich_mobile/presentation/actions/timeline.action.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/delete_local_action_button.widget.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/delete_permanent_action_button.widget.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/download_action_button.widget.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/edit_date_time_action_button.widget.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/edit_location_action_button.widget.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/move_to_lock_folder_action_button.widget.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/share_action_button.widget.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/share_link_action_button.widget.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/stack_action_button.widget.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/trash_action_button.widget.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/unarchive_action_button.widget.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/unstack_action_button.widget.dart'; +import 'package:immich_mobile/presentation/actions/lock.action.dart'; +import 'package:immich_mobile/presentation/actions/share.action.dart'; +import 'package:immich_mobile/presentation/actions/share_link.action.dart'; +import 'package:immich_mobile/presentation/actions/stack.action.dart'; import 'package:immich_mobile/presentation/widgets/album/album_selector.widget.dart'; import 'package:immich_mobile/presentation/widgets/bottom_sheet/base_bottom_sheet.widget.dart'; import 'package:immich_mobile/providers/infrastructure/action.provider.dart'; -import 'package:immich_mobile/providers/server_info.provider.dart'; -import 'package:immich_mobile/providers/timeline/multiselect.provider.dart'; import 'package:immich_mobile/widgets/common/immich_toast.dart'; class ArchiveBottomSheet extends ConsumerStatefulWidget { @@ -49,9 +44,6 @@ class _ArchiveBottomSheetState extends ConsumerState { @override Widget build(BuildContext context) { - final multiselect = ref.watch(multiSelectProvider); - final isTrashEnable = ref.watch(serverInfoProvider.select((state) => state.serverFeatures.trash)); - Future addToAlbum(RemoteAlbum album) async { final result = await ref.read(actionProvider.notifier).addToAlbum(ActionSource.timeline, album); @@ -60,15 +52,15 @@ class _ArchiveBottomSheetState extends ConsumerState { } if (!result.success) { - ImmichToast.show(context: context, msg: 'scaffold_body_error_occurred'.tr(), toastType: ToastType.error); + ImmichToast.show(context: context, msg: context.t.scaffold_body_error_occurred, toastType: ToastType.error); return; } ImmichToast.show( context: context, msg: result.count == 0 - ? 'add_to_album_bottom_sheet_already_exists'.tr(namedArgs: {'album': album.name}) - : 'add_to_album_bottom_sheet_added'.tr(namedArgs: {'album': album.name}), + ? context.t.add_to_album_bottom_sheet_already_exists(album: album.name) + : context.t.add_to_album_bottom_sheet_added(album: album.name), ); } @@ -76,31 +68,24 @@ class _ArchiveBottomSheetState extends ConsumerState { return sheetController.animateTo(0.85, duration: const Duration(milliseconds: 200), curve: Curves.easeInOut); } - final assets = multiselect.selectedAssets.toList(growable: false); - final actions = [FavoriteAction(assets: assets)]; - return BaseBottomSheet( controller: sheetController, initialChildSize: 0.25, maxChildSize: 0.85, shouldCloseOnMinExtent: false, - actions: [ - const ShareActionButton(source: ActionSource.timeline), - if (multiselect.hasRemote) ...[ - const ShareLinkActionButton(source: ActionSource.timeline), - const UnArchiveActionButton(source: ActionSource.timeline), - ...actions.map((action) => ActionColumnButtonWidget(action: TimelineAction(action: action))), - if (multiselect.onlyRemote) const DownloadActionButton(source: ActionSource.timeline), - isTrashEnable - ? const TrashActionButton(source: ActionSource.timeline) - : const DeletePermanentActionButton(source: ActionSource.timeline), - const EditDateTimeActionButton(source: ActionSource.timeline), - const EditLocationActionButton(source: ActionSource.timeline), - const MoveToLockFolderActionButton(source: ActionSource.timeline), - if (multiselect.selectedAssets.length > 1) const StackActionButton(source: ActionSource.timeline), - if (multiselect.hasStacked) const UnStackActionButton(source: ActionSource.timeline), - ], - if (multiselect.hasMerged) const DeleteLocalActionButton(source: ActionSource.timeline), + actions: const [ + .new(action: AssetDebugAction(source: .timeline)), + .new(action: ShareAction(source: .timeline)), + .new(action: ShareLinkAction(source: .timeline)), + .new(action: ArchiveAction(source: .timeline)), + .new(action: FavoriteAction(source: .timeline)), + .new(action: DownloadAction(source: .timeline)), + .new(action: DeleteAction(source: .timeline)), + .new(action: EditDateTimeAction(source: .timeline)), + .new(action: EditLocationAction(source: .timeline)), + .new(action: LockAction(source: .timeline)), + .new(action: StackAction(source: .timeline)), + .new(action: CleanupLocalAction(source: .timeline)), ], slivers: [ const AddToAlbumHeader(), 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 0d0e0259fd..a066e0167e 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 @@ -1,3 +1,5 @@ +import 'dart:async'; + import 'package:flutter/material.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; import 'package:immich_mobile/extensions/build_context_extensions.dart'; @@ -53,10 +55,12 @@ class _BaseDraggableScrollableSheetState extends ConsumerState } if (previous?.isInteracting != true && next.isInteracting) { - _controller.animateTo( - widget.minChildSize, - duration: const Duration(milliseconds: 200), - curve: Curves.easeInOut, + unawaited( + _controller.animateTo( + widget.minChildSize, + duration: const Duration(milliseconds: 200), + curve: Curves.easeInOut, + ), ); } }); @@ -74,7 +78,7 @@ class _BaseDraggableScrollableSheetState extends ConsumerState color: widget.backgroundColor ?? context.colorScheme.surfaceContainer, elevation: 3.0, shape: const RoundedRectangleBorder(borderRadius: BorderRadius.vertical(top: Radius.circular(18))), - margin: const EdgeInsets.symmetric(horizontal: 0), + margin: EdgeInsets.zero, child: Column( children: [ Expanded( diff --git a/mobile/lib/presentation/widgets/bottom_sheet/favorite_bottom_sheet.widget.dart b/mobile/lib/presentation/widgets/bottom_sheet/favorite_bottom_sheet.widget.dart index 8438d5e8ac..5ac6869c57 100644 --- a/mobile/lib/presentation/widgets/bottom_sheet/favorite_bottom_sheet.widget.dart +++ b/mobile/lib/presentation/widgets/bottom_sheet/favorite_bottom_sheet.widget.dart @@ -1,28 +1,23 @@ import 'package:flutter/material.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:immich_mobile/constants/enums.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/translate_extensions.dart'; +import 'package:immich_mobile/generated/translations.g.dart'; import 'package:immich_mobile/presentation/actions/action.widget.dart'; +import 'package:immich_mobile/presentation/actions/archive.action.dart'; +import 'package:immich_mobile/presentation/actions/asset_debug.action.dart'; +import 'package:immich_mobile/presentation/actions/delete.action.dart'; +import 'package:immich_mobile/presentation/actions/download.action.dart'; +import 'package:immich_mobile/presentation/actions/edit_datetime.action.dart'; +import 'package:immich_mobile/presentation/actions/edit_location.action.dart'; import 'package:immich_mobile/presentation/actions/favorite.action.dart'; -import 'package:immich_mobile/presentation/actions/timeline.action.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/archive_action_button.widget.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/delete_local_action_button.widget.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/delete_permanent_action_button.widget.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/download_action_button.widget.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/edit_date_time_action_button.widget.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/edit_location_action_button.widget.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/move_to_lock_folder_action_button.widget.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/share_action_button.widget.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/share_link_action_button.widget.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/stack_action_button.widget.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/trash_action_button.widget.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/unstack_action_button.widget.dart'; +import 'package:immich_mobile/presentation/actions/lock.action.dart'; +import 'package:immich_mobile/presentation/actions/share.action.dart'; +import 'package:immich_mobile/presentation/actions/share_link.action.dart'; +import 'package:immich_mobile/presentation/actions/stack.action.dart'; import 'package:immich_mobile/presentation/widgets/album/album_selector.widget.dart'; import 'package:immich_mobile/presentation/widgets/bottom_sheet/base_bottom_sheet.widget.dart'; import 'package:immich_mobile/providers/infrastructure/album.provider.dart'; -import 'package:immich_mobile/providers/server_info.provider.dart'; import 'package:immich_mobile/providers/timeline/multiselect.provider.dart'; import 'package:immich_mobile/widgets/common/immich_toast.dart'; @@ -32,7 +27,6 @@ class FavoriteBottomSheet extends ConsumerWidget { @override Widget build(BuildContext context, WidgetRef ref) { final multiselect = ref.watch(multiSelectProvider); - final isTrashEnable = ref.watch(serverInfoProvider.select((state) => state.serverFeatures.trash)); Future addAssetsToAlbum(RemoteAlbum album) async { final selectedAssets = multiselect.selectedAssets; @@ -41,56 +35,56 @@ class FavoriteBottomSheet extends ConsumerWidget { } final remoteAssets = selectedAssets.whereType(); - final addedCount = await ref + final result = await ref .read(remoteAlbumProvider.notifier) .addAssets(album.id, remoteAssets.map((e) => e.id).toList()); - - if (selectedAssets.length != remoteAssets.length) { - ImmichToast.show( - context: context, - msg: 'add_to_album_bottom_sheet_some_local_assets'.t(context: context), - ); + if (!context.mounted) { + return; } - if (addedCount != remoteAssets.length) { + if (selectedAssets.length != remoteAssets.length) { + ImmichToast.show(context: context, msg: context.t.add_to_album_bottom_sheet_some_local_assets); + } + + // Only report the failure when nothing was added; if some succeeded we show "added". + if (result.added > 0) { ImmichToast.show( context: context, - msg: 'add_to_album_bottom_sheet_already_exists'.t(args: {"album": album.name}), + msg: context.t.add_to_album_bottom_sheet_added(album: album.name), + ); + } else if (result.failed > 0) { + ImmichToast.show( + context: context, + msg: context.t.assets_cannot_be_added_to_album_count(count: result.failed), + toastType: ToastType.error, ); } else { ImmichToast.show( context: context, - msg: 'add_to_album_bottom_sheet_added'.t(args: {"album": album.name}), + msg: context.t.add_to_album_bottom_sheet_already_exists(album: album.name), ); } ref.read(multiSelectProvider.notifier).reset(); } - final assets = multiselect.selectedAssets.toList(growable: false); - final actions = [FavoriteAction(assets: assets)]; - return BaseBottomSheet( initialChildSize: 0.4, maxChildSize: 0.7, shouldCloseOnMinExtent: false, - actions: [ - const ShareActionButton(source: ActionSource.timeline), - if (multiselect.hasRemote) ...[ - const ShareLinkActionButton(source: ActionSource.timeline), - ...actions.map((action) => ActionColumnButtonWidget(action: TimelineAction(action: action))), - const ArchiveActionButton(source: ActionSource.timeline), - if (multiselect.onlyRemote) const DownloadActionButton(source: ActionSource.timeline), - isTrashEnable - ? const TrashActionButton(source: ActionSource.timeline) - : const DeletePermanentActionButton(source: ActionSource.timeline), - const EditDateTimeActionButton(source: ActionSource.timeline), - const EditLocationActionButton(source: ActionSource.timeline), - const MoveToLockFolderActionButton(source: ActionSource.timeline), - if (multiselect.selectedAssets.length > 1) const StackActionButton(source: ActionSource.timeline), - if (multiselect.hasStacked) const UnStackActionButton(source: ActionSource.timeline), - ], - if (multiselect.hasMerged) const DeleteLocalActionButton(source: ActionSource.timeline), + actions: const [ + .new(action: AssetDebugAction(source: .timeline)), + .new(action: ShareAction(source: .timeline)), + .new(action: ShareLinkAction(source: .timeline)), + .new(action: FavoriteAction(source: .timeline)), + .new(action: ArchiveAction(source: .timeline)), + .new(action: DownloadAction(source: .timeline)), + .new(action: DeleteAction(source: .timeline)), + .new(action: EditDateTimeAction(source: .timeline)), + .new(action: EditLocationAction(source: .timeline)), + .new(action: LockAction(source: .timeline)), + .new(action: StackAction(source: .timeline)), + .new(action: CleanupLocalAction(source: .timeline)), ], slivers: multiselect.hasRemote ? [const AddToAlbumHeader(), AlbumSelector(onAlbumSelected: addAssetsToAlbum)] diff --git a/mobile/lib/presentation/widgets/bottom_sheet/general_bottom_sheet.widget.dart b/mobile/lib/presentation/widgets/bottom_sheet/general_bottom_sheet.widget.dart index 1949a79495..1fb78703a1 100644 --- a/mobile/lib/presentation/widgets/bottom_sheet/general_bottom_sheet.widget.dart +++ b/mobile/lib/presentation/widgets/bottom_sheet/general_bottom_sheet.widget.dart @@ -1,33 +1,25 @@ -import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; import 'package:immich_mobile/constants/enums.dart'; import 'package:immich_mobile/domain/models/album/album.model.dart'; +import 'package:immich_mobile/generated/translations.g.dart'; import 'package:immich_mobile/presentation/actions/action.widget.dart'; +import 'package:immich_mobile/presentation/actions/archive.action.dart'; import 'package:immich_mobile/presentation/actions/asset_debug.action.dart'; -import 'package:immich_mobile/presentation/actions/timeline.action.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/archive_action_button.widget.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/bulk_tag_assets_action_button.widget.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/delete_action_button.widget.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/delete_local_action_button.widget.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/delete_permanent_action_button.widget.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/download_action_button.widget.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/edit_date_time_action_button.widget.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/edit_location_action_button.widget.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/favorite_action_button.widget.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/move_to_lock_folder_action_button.widget.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/share_action_button.widget.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/share_link_action_button.widget.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/stack_action_button.widget.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/trash_action_button.widget.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/unstack_action_button.widget.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/upload_action_button.widget.dart'; +import 'package:immich_mobile/presentation/actions/delete.action.dart'; +import 'package:immich_mobile/presentation/actions/download.action.dart'; +import 'package:immich_mobile/presentation/actions/edit_datetime.action.dart'; +import 'package:immich_mobile/presentation/actions/edit_location.action.dart'; +import 'package:immich_mobile/presentation/actions/favorite.action.dart'; +import 'package:immich_mobile/presentation/actions/lock.action.dart'; +import 'package:immich_mobile/presentation/actions/share.action.dart'; +import 'package:immich_mobile/presentation/actions/share_link.action.dart'; +import 'package:immich_mobile/presentation/actions/stack.action.dart'; +import 'package:immich_mobile/presentation/actions/tag.action.dart'; +import 'package:immich_mobile/presentation/actions/upload.action.dart'; import 'package:immich_mobile/presentation/widgets/album/album_selector.widget.dart'; import 'package:immich_mobile/presentation/widgets/bottom_sheet/base_bottom_sheet.widget.dart'; import 'package:immich_mobile/providers/infrastructure/action.provider.dart'; -import 'package:immich_mobile/providers/infrastructure/user_metadata.provider.dart'; -import 'package:immich_mobile/providers/server_info.provider.dart'; -import 'package:immich_mobile/providers/timeline/multiselect.provider.dart'; import 'package:immich_mobile/widgets/common/immich_toast.dart'; class GeneralBottomSheet extends ConsumerStatefulWidget { @@ -54,12 +46,6 @@ class _GeneralBottomSheetState extends ConsumerState { @override Widget build(BuildContext context) { - final multiselect = ref.watch(multiSelectProvider); - final isTrashEnable = ref.watch(serverInfoProvider.select((state) => state.serverFeatures.trash)); - final tagsEnabled = ref.watch( - userMetadataPreferencesProvider.select((value) => value.valueOrNull?.tagsEnabled ?? false), - ); - Future addToAlbum(RemoteAlbum album) async { final result = await ref.read(actionProvider.notifier).addToAlbum(ActionSource.timeline, album); @@ -68,14 +54,14 @@ class _GeneralBottomSheetState extends ConsumerState { } if (!result.success) { - ImmichToast.show(context: context, msg: 'scaffold_body_error_occurred'.tr(), toastType: ToastType.error); + ImmichToast.show(context: context, msg: context.t.scaffold_body_error_occurred, toastType: ToastType.error); return; } ImmichToast.show( context: context, msg: result.count == 0 - ? 'add_to_album_bottom_sheet_already_exists'.tr(namedArgs: {'album': album.name}) - : 'add_to_album_bottom_sheet_added'.tr(namedArgs: {'album': album.name}), + ? context.t.add_to_album_bottom_sheet_already_exists(album: album.name) + : context.t.add_to_album_bottom_sheet_added(album: album.name), ); } @@ -83,37 +69,27 @@ class _GeneralBottomSheetState extends ConsumerState { return sheetController.animateTo(0.85, duration: const Duration(milliseconds: 200), curve: Curves.easeInOut); } - final assets = multiselect.selectedAssets.toList(growable: false); - final actions = [AssetDebugAction(assets: assets)]; - return BaseBottomSheet( controller: sheetController, initialChildSize: widget.minChildSize ?? 0.15, minChildSize: widget.minChildSize, maxChildSize: 0.85, shouldCloseOnMinExtent: false, - actions: [ - ...actions.map((action) => ActionColumnButtonWidget(action: TimelineAction(action: action))), - const ShareActionButton(source: ActionSource.timeline), - if (multiselect.hasRemote) ...[ - const ShareLinkActionButton(source: ActionSource.timeline), - if (multiselect.onlyRemote) const DownloadActionButton(source: ActionSource.timeline), - isTrashEnable - ? const TrashActionButton(source: ActionSource.timeline) - : const DeletePermanentActionButton(source: ActionSource.timeline), - const FavoriteActionButton(source: ActionSource.timeline), - const ArchiveActionButton(source: ActionSource.timeline), - if (tagsEnabled) const BulkTagAssetsActionButton(source: ActionSource.timeline), - const EditDateTimeActionButton(source: ActionSource.timeline), - const EditLocationActionButton(source: ActionSource.timeline), - const MoveToLockFolderActionButton(source: ActionSource.timeline), - if (multiselect.selectedAssets.length > 1) const StackActionButton(source: ActionSource.timeline), - if (multiselect.hasStacked) const UnStackActionButton(source: ActionSource.timeline), - if (multiselect.onlyLocal || multiselect.hasMerged) const DeleteActionButton(source: ActionSource.timeline), - ], - if (multiselect.onlyLocal || multiselect.hasMerged) - const DeleteLocalActionButton(source: ActionSource.timeline), - if (multiselect.onlyLocal) const UploadActionButton(source: ActionSource.timeline), + actions: const [ + .new(action: AssetDebugAction(source: .timeline)), + .new(action: ShareAction(source: .timeline)), + .new(action: ShareLinkAction(source: .timeline)), + .new(action: DownloadAction(source: .timeline)), + .new(action: DeleteAction(source: .timeline)), + .new(action: FavoriteAction(source: .timeline)), + .new(action: ArchiveAction(source: .timeline)), + .new(action: TagAction(source: .timeline)), + .new(action: EditDateTimeAction(source: .timeline)), + .new(action: EditLocationAction(source: .timeline)), + .new(action: LockAction(source: .timeline)), + .new(action: StackAction(source: .timeline)), + .new(action: CleanupLocalAction(source: .timeline)), + .new(action: UploadAction(source: .timeline)), ], slivers: [ const AddToAlbumHeader(), diff --git a/mobile/lib/presentation/widgets/bottom_sheet/local_album_bottom_sheet.widget.dart b/mobile/lib/presentation/widgets/bottom_sheet/local_album_bottom_sheet.widget.dart index ac8c77af03..74d5ec96da 100644 --- a/mobile/lib/presentation/widgets/bottom_sheet/local_album_bottom_sheet.widget.dart +++ b/mobile/lib/presentation/widgets/bottom_sheet/local_album_bottom_sheet.widget.dart @@ -1,11 +1,13 @@ -import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; import 'package:immich_mobile/constants/enums.dart'; import 'package:immich_mobile/domain/models/album/album.model.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/delete_local_action_button.widget.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/share_action_button.widget.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/upload_action_button.widget.dart'; +import 'package:immich_mobile/generated/translations.g.dart'; +import 'package:immich_mobile/presentation/actions/action.widget.dart'; +import 'package:immich_mobile/presentation/actions/asset_debug.action.dart'; +import 'package:immich_mobile/presentation/actions/delete.action.dart'; +import 'package:immich_mobile/presentation/actions/share.action.dart'; +import 'package:immich_mobile/presentation/actions/upload.action.dart'; import 'package:immich_mobile/presentation/widgets/album/album_selector.widget.dart'; import 'package:immich_mobile/presentation/widgets/bottom_sheet/base_bottom_sheet.widget.dart'; import 'package:immich_mobile/providers/infrastructure/action.provider.dart'; @@ -43,15 +45,15 @@ class _LocalAlbumBottomSheetState extends ConsumerState { } if (!result.success) { - ImmichToast.show(context: context, msg: 'scaffold_body_error_occurred'.tr(), toastType: ToastType.error); + ImmichToast.show(context: context, msg: context.t.scaffold_body_error_occurred, toastType: ToastType.error); return; } ImmichToast.show( context: context, msg: result.count == 0 - ? 'add_to_album_bottom_sheet_already_exists'.tr(namedArgs: {'album': album.name}) - : 'add_to_album_bottom_sheet_added'.tr(namedArgs: {'album': album.name}), + ? context.t.add_to_album_bottom_sheet_already_exists(album: album.name) + : context.t.add_to_album_bottom_sheet_added(album: album.name), ); } @@ -64,10 +66,12 @@ class _LocalAlbumBottomSheetState extends ConsumerState { initialChildSize: 0.25, maxChildSize: 0.85, shouldCloseOnMinExtent: false, - actions: const [ - ShareActionButton(source: ActionSource.timeline), - DeleteLocalActionButton(source: ActionSource.timeline), - UploadActionButton(source: ActionSource.timeline), + actions: const [ + .new(action: AssetDebugAction(source: .timeline)), + .new(action: ShareAction(source: .timeline)), + .new(action: DeleteAction(source: .timeline)), + .new(action: CleanupLocalAction(source: .timeline)), + .new(action: UploadAction(source: .timeline)), ], slivers: [ const AddToAlbumHeader(), diff --git a/mobile/lib/presentation/widgets/bottom_sheet/locked_folder_bottom_sheet.widget.dart b/mobile/lib/presentation/widgets/bottom_sheet/locked_folder_bottom_sheet.widget.dart index a644e6a035..32730b8ac4 100644 --- a/mobile/lib/presentation/widgets/bottom_sheet/locked_folder_bottom_sheet.widget.dart +++ b/mobile/lib/presentation/widgets/bottom_sheet/locked_folder_bottom_sheet.widget.dart @@ -1,26 +1,27 @@ import 'package:flutter/material.dart'; -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:immich_mobile/constants/enums.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/delete_permanent_action_button.widget.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/download_action_button.widget.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/remove_from_lock_folder_action_button.widget.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/share_action_button.widget.dart'; +import 'package:immich_mobile/presentation/actions/action.widget.dart'; +import 'package:immich_mobile/presentation/actions/asset_debug.action.dart'; +import 'package:immich_mobile/presentation/actions/delete.action.dart'; +import 'package:immich_mobile/presentation/actions/download.action.dart'; +import 'package:immich_mobile/presentation/actions/lock.action.dart'; +import 'package:immich_mobile/presentation/actions/share.action.dart'; import 'package:immich_mobile/presentation/widgets/bottom_sheet/base_bottom_sheet.widget.dart'; -class LockedFolderBottomSheet extends ConsumerWidget { +class LockedFolderBottomSheet extends StatelessWidget { const LockedFolderBottomSheet({super.key}); @override - Widget build(BuildContext context, WidgetRef ref) { + Widget build(BuildContext context) { return const BaseBottomSheet( initialChildSize: 0.25, maxChildSize: 0.4, shouldCloseOnMinExtent: false, - actions: [ - ShareActionButton(source: ActionSource.timeline), - DownloadActionButton(source: ActionSource.timeline), - DeletePermanentActionButton(source: ActionSource.timeline), - RemoveFromLockFolderActionButton(source: ActionSource.timeline), + actions: [ + .new(action: AssetDebugAction(source: .timeline)), + .new(action: ShareAction(source: .timeline)), + .new(action: DownloadAction(source: .timeline)), + .new(action: DeleteAction(source: .timeline)), + .new(action: LockAction(source: .timeline)), ], ); } diff --git a/mobile/lib/presentation/widgets/bottom_sheet/map_bottom_sheet.widget.dart b/mobile/lib/presentation/widgets/bottom_sheet/map_bottom_sheet.widget.dart index 945bdc9584..06d1ddc99d 100644 --- a/mobile/lib/presentation/widgets/bottom_sheet/map_bottom_sheet.widget.dart +++ b/mobile/lib/presentation/widgets/bottom_sheet/map_bottom_sheet.widget.dart @@ -21,10 +21,10 @@ class MapBottomSheet extends StatelessWidget { maxChildSize: 0.75, shouldCloseOnMinExtent: false, resizeOnScroll: false, - actions: [], + actions: const [], backgroundColor: context.themeData.colorScheme.surface, - slivers: [ - const SliverFillRemaining(hasScrollBody: false, child: SizedBox(height: 0, child: _ScopedMapTimeline())), + slivers: const [ + SliverFillRemaining(hasScrollBody: false, child: SizedBox(height: 0, child: _ScopedMapTimeline())), ], ); } diff --git a/mobile/lib/presentation/widgets/bottom_sheet/partner_detail_bottom_sheet.widget.dart b/mobile/lib/presentation/widgets/bottom_sheet/partner_detail_bottom_sheet.widget.dart index 5e4dae34bc..0c63cde140 100644 --- a/mobile/lib/presentation/widgets/bottom_sheet/partner_detail_bottom_sheet.widget.dart +++ b/mobile/lib/presentation/widgets/bottom_sheet/partner_detail_bottom_sheet.widget.dart @@ -1,22 +1,78 @@ import 'package:flutter/material.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; import 'package:immich_mobile/constants/enums.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/download_action_button.widget.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/share_action_button.widget.dart'; +import 'package:immich_mobile/domain/models/album/album.model.dart'; +import 'package:immich_mobile/generated/translations.g.dart'; +import 'package:immich_mobile/presentation/actions/action.widget.dart'; +import 'package:immich_mobile/presentation/actions/asset_debug.action.dart'; +import 'package:immich_mobile/presentation/actions/download.action.dart'; +import 'package:immich_mobile/presentation/actions/share.action.dart'; +import 'package:immich_mobile/presentation/widgets/album/album_selector.widget.dart'; import 'package:immich_mobile/presentation/widgets/bottom_sheet/base_bottom_sheet.widget.dart'; +import 'package:immich_mobile/providers/infrastructure/action.provider.dart'; +import 'package:immich_mobile/widgets/common/immich_toast.dart'; -class PartnerDetailBottomSheet extends ConsumerWidget { +class PartnerDetailBottomSheet extends ConsumerStatefulWidget { const PartnerDetailBottomSheet({super.key}); @override - Widget build(BuildContext context, WidgetRef ref) { - return const BaseBottomSheet( + ConsumerState createState() => _PartnerDetailBottomSheetState(); +} + +class _PartnerDetailBottomSheetState extends ConsumerState { + late final DraggableScrollableController sheetController; + + @override + void initState() { + super.initState(); + sheetController = DraggableScrollableController(); + } + + @override + void dispose() { + sheetController.dispose(); + super.dispose(); + } + + @override + Widget build(BuildContext context) { + Future addToAlbum(RemoteAlbum album) async { + final result = await ref.read(actionProvider.notifier).addToAlbum(ActionSource.timeline, album); + + if (!context.mounted) { + return; + } + + if (!result.success) { + ImmichToast.show(context: context, msg: context.t.scaffold_body_error_occurred, toastType: ToastType.error); + return; + } + + ImmichToast.show( + context: context, + msg: result.count == 0 + ? context.t.add_to_album_bottom_sheet_already_exists(album: album.name) + : context.t.add_to_album_bottom_sheet_added(album: album.name), + ); + } + + Future onKeyboardExpand() { + return sheetController.animateTo(0.85, duration: const Duration(milliseconds: 200), curve: Curves.easeInOut); + } + + return BaseBottomSheet( + controller: sheetController, initialChildSize: 0.25, - maxChildSize: 0.4, + maxChildSize: 0.85, shouldCloseOnMinExtent: false, - actions: [ - ShareActionButton(source: ActionSource.timeline), - DownloadActionButton(source: ActionSource.timeline), + actions: const [ + .new(action: AssetDebugAction(source: .timeline)), + .new(action: ShareAction(source: .timeline)), + .new(action: DownloadAction(source: .timeline)), + ], + slivers: [ + const AddToAlbumHeader(), + AlbumSelector(onAlbumSelected: addToAlbum, onKeyboardExpanded: onKeyboardExpand), ], ); } diff --git a/mobile/lib/presentation/widgets/bottom_sheet/remote_album_bottom_sheet.widget.dart b/mobile/lib/presentation/widgets/bottom_sheet/remote_album_bottom_sheet.widget.dart index a292c1899c..9500e6329d 100644 --- a/mobile/lib/presentation/widgets/bottom_sheet/remote_album_bottom_sheet.widget.dart +++ b/mobile/lib/presentation/widgets/bottom_sheet/remote_album_bottom_sheet.widget.dart @@ -2,29 +2,24 @@ import 'package:flutter/material.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; import 'package:immich_mobile/constants/enums.dart'; import 'package:immich_mobile/domain/models/album/album.model.dart'; -import 'package:immich_mobile/extensions/translate_extensions.dart'; +import 'package:immich_mobile/generated/translations.g.dart'; import 'package:immich_mobile/presentation/actions/action.widget.dart'; +import 'package:immich_mobile/presentation/actions/archive.action.dart'; +import 'package:immich_mobile/presentation/actions/asset_debug.action.dart'; +import 'package:immich_mobile/presentation/actions/delete.action.dart'; +import 'package:immich_mobile/presentation/actions/download.action.dart'; +import 'package:immich_mobile/presentation/actions/edit_datetime.action.dart'; +import 'package:immich_mobile/presentation/actions/edit_location.action.dart'; import 'package:immich_mobile/presentation/actions/favorite.action.dart'; -import 'package:immich_mobile/presentation/actions/timeline.action.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/archive_action_button.widget.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/delete_local_action_button.widget.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/delete_permanent_action_button.widget.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/download_action_button.widget.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/edit_date_time_action_button.widget.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/edit_location_action_button.widget.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/move_to_lock_folder_action_button.widget.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/remove_from_album_action_button.widget.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/set_album_cover.widget.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/share_action_button.widget.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/share_link_action_button.widget.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/stack_action_button.widget.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/trash_action_button.widget.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/unstack_action_button.widget.dart'; +import 'package:immich_mobile/presentation/actions/lock.action.dart'; +import 'package:immich_mobile/presentation/actions/remove_from_album.action.dart'; +import 'package:immich_mobile/presentation/actions/set_album_cover.action.dart'; +import 'package:immich_mobile/presentation/actions/share.action.dart'; +import 'package:immich_mobile/presentation/actions/share_link.action.dart'; +import 'package:immich_mobile/presentation/actions/stack.action.dart'; import 'package:immich_mobile/presentation/widgets/album/album_selector.widget.dart'; import 'package:immich_mobile/presentation/widgets/bottom_sheet/base_bottom_sheet.widget.dart'; import 'package:immich_mobile/providers/infrastructure/action.provider.dart'; -import 'package:immich_mobile/providers/server_info.provider.dart'; -import 'package:immich_mobile/providers/timeline/multiselect.provider.dart'; import 'package:immich_mobile/providers/user.provider.dart'; import 'package:immich_mobile/widgets/common/immich_toast.dart'; @@ -53,8 +48,6 @@ class _RemoteAlbumBottomSheetState extends ConsumerState @override Widget build(BuildContext context) { - final multiselect = ref.watch(multiSelectProvider); - final isTrashEnable = ref.watch(serverInfoProvider.select((state) => state.serverFeatures.trash)); final ownsAlbum = ref.watch(currentUserProvider)?.id == widget.album.ownerId; Future addToAlbum(RemoteAlbum album) async { @@ -65,19 +58,15 @@ class _RemoteAlbumBottomSheetState extends ConsumerState } if (!result.success) { - ImmichToast.show( - context: context, - msg: 'scaffold_body_error_occurred'.t(context: context), - toastType: ToastType.error, - ); + ImmichToast.show(context: context, msg: context.t.scaffold_body_error_occurred, toastType: ToastType.error); return; } ImmichToast.show( context: context, msg: result.count == 0 - ? 'add_to_album_bottom_sheet_already_exists'.t(context: context, args: {"album": album.name}) - : 'add_to_album_bottom_sheet_added'.t(context: context, args: {"album": album.name}), + ? context.t.add_to_album_bottom_sheet_already_exists(album: album.name) + : context.t.add_to_album_bottom_sheet_added(album: album.name), ); } @@ -85,40 +74,38 @@ class _RemoteAlbumBottomSheetState extends ConsumerState return sheetController.animateTo(0.85, duration: const Duration(milliseconds: 200), curve: Curves.easeInOut); } - final assets = multiselect.selectedAssets.toList(growable: false); - final actions = [FavoriteAction(assets: assets)]; - return BaseBottomSheet( controller: sheetController, initialChildSize: 0.22, minChildSize: 0.22, maxChildSize: 0.85, shouldCloseOnMinExtent: false, - actions: [ - const ShareActionButton(source: ActionSource.timeline), - if (multiselect.hasRemote) ...[ - const ShareLinkActionButton(source: ActionSource.timeline), + actions: [ + const .new(action: AssetDebugAction(source: .timeline)), + const .new(action: ShareAction(source: .timeline)), + const .new(action: ShareLinkAction(source: .timeline)), - if (ownsAlbum) ...[ - const ArchiveActionButton(source: ActionSource.timeline), - ...actions.map((action) => ActionColumnButtonWidget(action: TimelineAction(action: action))), - ], - const DownloadActionButton(source: ActionSource.timeline), - if (ownsAlbum) ...[ - isTrashEnable - ? const TrashActionButton(source: ActionSource.timeline) - : const DeletePermanentActionButton(source: ActionSource.timeline), - const EditDateTimeActionButton(source: ActionSource.timeline), - const EditLocationActionButton(source: ActionSource.timeline), - const MoveToLockFolderActionButton(source: ActionSource.timeline), - if (multiselect.selectedAssets.length > 1) const StackActionButton(source: ActionSource.timeline), - if (multiselect.hasStacked) const UnStackActionButton(source: ActionSource.timeline), - ], + if (ownsAlbum) ...const [ + .new(action: ArchiveAction(source: .timeline)), + .new(action: FavoriteAction(source: .timeline)), + ], + const .new(action: DownloadAction(source: .timeline)), + if (ownsAlbum) ...const [ + .new(action: DeleteAction(source: .timeline)), + .new(action: EditDateTimeAction(source: .timeline)), + .new(action: EditLocationAction(source: .timeline)), + .new(action: LockAction(source: .timeline)), + .new(action: StackAction(source: .timeline)), + ], + const .new(action: CleanupLocalAction(source: .timeline)), + if (ownsAlbum) ...[ + ActionColumnButton( + action: RemoveFromAlbumAction(source: .timeline, albumId: widget.album.id), + ), + ActionColumnButton( + action: SetAlbumCoverAction(source: .timeline, albumId: widget.album.id), + ), ], - if (multiselect.hasMerged) const DeleteLocalActionButton(source: ActionSource.timeline), - if (ownsAlbum) RemoveFromAlbumActionButton(source: ActionSource.timeline, albumId: widget.album.id), - if (ownsAlbum && multiselect.selectedAssets.length == 1) - SetAlbumCoverActionButton(source: ActionSource.timeline, albumId: widget.album.id), ], slivers: ownsAlbum ? [const AddToAlbumHeader(), AlbumSelector(onAlbumSelected: addToAlbum, onKeyboardExpanded: onKeyboardExpand)] diff --git a/mobile/lib/presentation/widgets/bottom_sheet/trash_bottom_sheet.widget.dart b/mobile/lib/presentation/widgets/bottom_sheet/trash_bottom_sheet.widget.dart index c96e680966..32e5b01a99 100644 --- a/mobile/lib/presentation/widgets/bottom_sheet/trash_bottom_sheet.widget.dart +++ b/mobile/lib/presentation/widgets/bottom_sheet/trash_bottom_sheet.widget.dart @@ -1,15 +1,15 @@ import 'package:flutter/material.dart'; -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:immich_mobile/constants/enums.dart'; import 'package:immich_mobile/extensions/build_context_extensions.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/delete_trash_action_button.widget.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/restore_trash_action_button.widget.dart'; +import 'package:immich_mobile/presentation/actions/action.widget.dart'; +import 'package:immich_mobile/presentation/actions/asset_debug.action.dart'; +import 'package:immich_mobile/presentation/actions/delete.action.dart'; +import 'package:immich_mobile/presentation/actions/restore.action.dart'; -class TrashBottomBar extends ConsumerWidget { +class TrashBottomBar extends StatelessWidget { const TrashBottomBar({super.key}); @override - Widget build(BuildContext context, WidgetRef ref) { + Widget build(BuildContext context) { return Align( alignment: Alignment.bottomCenter, child: Container( @@ -19,9 +19,10 @@ class TrashBottomBar extends ConsumerWidget { top: false, child: Row( mainAxisAlignment: MainAxisAlignment.spaceEvenly, - children: [ - DeleteTrashActionButton(source: ActionSource.timeline), - RestoreTrashActionButton(source: ActionSource.timeline), + children: [ + .new(action: AssetDebugAction(source: .timeline)), + .new(action: DeleteAction(source: .timeline)), + .new(action: RestoreAction(source: .timeline)), ], ), ), diff --git a/mobile/lib/presentation/widgets/feature_message/feature_message_dialog.widget.dart b/mobile/lib/presentation/widgets/feature_message/feature_message_dialog.widget.dart new file mode 100644 index 0000000000..dc89c10294 --- /dev/null +++ b/mobile/lib/presentation/widgets/feature_message/feature_message_dialog.widget.dart @@ -0,0 +1,316 @@ +import 'dart:async'; +import 'dart:math' as math; + +import 'package:flutter/foundation.dart'; +import 'package:flutter/material.dart'; +import 'package:immich_mobile/domain/models/feature_message.model.dart'; +import 'package:immich_mobile/extensions/build_context_extensions.dart'; +import 'package:immich_mobile/extensions/theme_extensions.dart'; +import 'package:immich_mobile/generated/translations.g.dart'; +import 'package:immich_mobile/presentation/widgets/feature_message/feature_message_placeholder.widget.dart'; + +Future showFeatureMessageDialog(BuildContext context) { + return showGeneralDialog( + context: context, + useRootNavigator: true, + barrierDismissible: true, + barrierLabel: context.t.whats_new, + barrierColor: Colors.black.withValues(alpha: 0.55), + transitionDuration: const Duration(milliseconds: 280), + pageBuilder: (_, _, _) => const _FeatureMessageDialog(), + transitionBuilder: (_, animation, _, child) { + final curved = CurvedAnimation(parent: animation, curve: Curves.easeOutCubic, reverseCurve: Curves.easeInCubic); + return FadeTransition( + opacity: animation, + child: ScaleTransition(scale: Tween(begin: 0.94, end: 1.0).animate(curved), child: child), + ); + }, + ); +} + +class _FeatureMessageDialog extends StatefulWidget { + const _FeatureMessageDialog(); + + @override + State<_FeatureMessageDialog> createState() => _FeatureMessageDialogState(); +} + +class _FeatureMessageDialogState extends State<_FeatureMessageDialog> with SingleTickerProviderStateMixin { + static const double _radius = 24; + + final PageController _controller = PageController(); + late final AnimationController _borderController = AnimationController( + vsync: this, + duration: const Duration(seconds: 7), + )..repeat(); + final List _highlights = visibleFeatureMessageHighlights; + int _index = 0; + + bool get _isLast => _index >= _highlights.length - 1; + + @override + void dispose() { + _controller.dispose(); + _borderController.dispose(); + super.dispose(); + } + + void _advance() { + if (_isLast) { + Navigator.of(context).pop(); + return; + } + unawaited(_controller.nextPage(duration: const Duration(milliseconds: 320), curve: Curves.easeOutCubic)); + } + + List _borderColors(BuildContext context) { + final scheme = context.colorScheme; + // Mute the hues toward the surface and drop opacity in dark mode to keep it gentle. + Color tone(Color c) => context.isDarkTheme ? Color.lerp(c, scheme.surface, 0.45)!.withValues(alpha: 0.6) : c; + return [tone(scheme.primary), tone(scheme.tertiary), tone(scheme.secondary), tone(scheme.primary)]; + } + + @override + Widget build(BuildContext context) { + return Dialog( + insetPadding: const EdgeInsets.symmetric(horizontal: 8, vertical: 64), + clipBehavior: Clip.antiAlias, + backgroundColor: context.isDarkTheme ? context.colorScheme.surfaceContainerLow : Colors.white, + shape: const RoundedRectangleBorder(borderRadius: BorderRadius.all(Radius.circular(_radius))), + child: AnimatedBuilder( + animation: _borderController, + builder: (context, child) => CustomPaint( + foregroundPainter: _GradientBorderPainter( + rotation: _borderController.value, + colors: _borderColors(context), + radius: _radius, + strokeWidth: 3, + ), + child: child, + ), + child: ConstrainedBox( + constraints: BoxConstraints(maxHeight: context.height * 0.9, maxWidth: 480), + child: Column( + mainAxisSize: MainAxisSize.min, + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Padding( + padding: const EdgeInsets.fromLTRB(24, 20, 24, 4), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisSize: MainAxisSize.min, + children: [ + Text( + context.t.whats_new, + style: context.textTheme.titleLarge?.copyWith(fontWeight: FontWeight.w700), + ), + const SizedBox(height: 2), + Text( + context.t.whats_new_version(version: featureMessageRelease.toString()), + style: context.textTheme.bodyLarge?.copyWith(color: context.colorScheme.onSurfaceSecondary), + ), + ], + ), + ), + const SizedBox(height: 32), + + Expanded( + child: PageView.builder( + controller: _controller, + itemCount: _highlights.length, + onPageChanged: (i) => setState(() => _index = i), + itemBuilder: (_, index) => _FeaturePage(highlight: _highlights[index]), + ), + ), + const SizedBox(height: 8), + _PageDots(controller: _controller, index: _index, count: _highlights.length), + Padding( + padding: const EdgeInsets.fromLTRB(20, 18, 20, 26), + child: Row( + children: [ + TextButton( + onPressed: () => Navigator.of(context).pop(), + style: TextButton.styleFrom(padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 14)), + child: Text(context.t.skip), + ), + const SizedBox(width: 8), + Expanded( + child: DecoratedBox( + decoration: BoxDecoration( + borderRadius: const BorderRadius.all(Radius.circular(100)), + boxShadow: [ + // Soft wide primary glow. + BoxShadow( + color: context.primaryColor.withValues(alpha: 0.38), + blurRadius: 22, + spreadRadius: -4, + offset: const Offset(0, 10), + ), + // Tight contact shadow for grounding. + BoxShadow( + color: context.primaryColor.withValues(alpha: 0.22), + blurRadius: 6, + offset: const Offset(0, 2), + ), + ], + ), + child: FilledButton( + onPressed: _advance, + style: FilledButton.styleFrom( + padding: const EdgeInsets.symmetric(vertical: 16), + elevation: 0, + textStyle: context.textTheme.labelLarge?.copyWith( + fontWeight: FontWeight.w700, + fontSize: 16, + ), + ), + child: AnimatedSwitcher( + duration: const Duration(milliseconds: 200), + child: Text(_isLast ? context.t.ok : context.t.next, key: ValueKey(_isLast)), + ), + ), + ), + ), + ], + ), + ), + ], + ), + ), + ), + ); + } +} + +class _GradientBorderPainter extends CustomPainter { + const _GradientBorderPainter({ + required this.rotation, + required this.colors, + required this.radius, + this.strokeWidth = 3, + }); + + final double rotation; + final List colors; + final double radius; + final double strokeWidth; + + @override + void paint(Canvas canvas, Size size) { + final inset = strokeWidth / 2; + final rect = (Offset.zero & size).deflate(inset); + final rrect = RRect.fromRectAndRadius(rect, Radius.circular(radius - inset)); + + final shader = SweepGradient( + transform: GradientRotation(rotation * 2 * math.pi), + colors: colors, + ).createShader(rect); + + final paint = Paint() + ..shader = shader + ..style = PaintingStyle.stroke + ..strokeWidth = strokeWidth; + canvas.drawRRect(rrect, paint); + } + + @override + bool shouldRepaint(_GradientBorderPainter oldDelegate) => + oldDelegate.rotation != rotation || !listEquals(oldDelegate.colors, colors); +} + +class _FeaturePage extends StatelessWidget { + final FeatureHighlight highlight; + + const _FeaturePage({required this.highlight}); + + @override + Widget build(BuildContext context) { + final scheme = context.colorScheme; + + return SingleChildScrollView( + child: Column( + children: [ + Padding( + padding: const EdgeInsets.fromLTRB(20, 8, 20, 0), + child: DecoratedBox( + decoration: BoxDecoration( + color: scheme.surfaceContainerHighest, + borderRadius: const BorderRadius.all(Radius.circular(18)), + border: Border.all(color: scheme.outlineVariant.withValues(alpha: 0.5)), + ), + child: ClipRRect( + borderRadius: const BorderRadius.all(Radius.circular(18)), + child: SizedBox( + width: double.infinity, + height: 256, + child: highlight.image == null + ? const FeatureMessagePlaceholder() + : Image.asset( + highlight.image!, + fit: BoxFit.contain, + errorBuilder: (context, _, _) => const FeatureMessagePlaceholder(), + ), + ), + ), + ), + ), + Padding( + padding: const EdgeInsets.fromLTRB(24, 18, 24, 8), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisSize: MainAxisSize.min, + children: [ + Text( + highlight.title(context.t), + style: context.textTheme.titleLarge?.copyWith(fontWeight: FontWeight.w700, fontSize: 24), + ), + const SizedBox(height: 8), + Text( + highlight.body(context.t), + style: context.textTheme.bodyLarge?.copyWith(color: scheme.onSurfaceVariant, height: 1.4), + ), + ], + ), + ), + ], + ), + ); + } +} + +class _PageDots extends StatelessWidget { + final PageController controller; + final int index; + final int count; + + const _PageDots({required this.controller, required this.index, required this.count}); + + @override + Widget build(BuildContext context) { + final primary = context.primaryColor; + + return AnimatedBuilder( + animation: controller, + builder: (context, _) { + final page = controller.hasClients ? (controller.page ?? index.toDouble()) : index.toDouble(); + return Row( + mainAxisAlignment: MainAxisAlignment.center, + children: List.generate(count, (i) { + final activeness = (1 - (page - i).abs()).clamp(0.0, 1.0); + return AnimatedContainer( + duration: const Duration(milliseconds: 150), + margin: const EdgeInsets.symmetric(horizontal: 3), + height: 7, + width: 7 + 16 * activeness, + decoration: BoxDecoration( + color: Color.lerp(context.colorScheme.surfaceContainerHighest, primary, activeness), + borderRadius: const BorderRadius.all(Radius.circular(8)), + ), + ); + }), + ); + }, + ); + } +} diff --git a/mobile/lib/presentation/widgets/feature_message/feature_message_placeholder.widget.dart b/mobile/lib/presentation/widgets/feature_message/feature_message_placeholder.widget.dart new file mode 100644 index 0000000000..b157d5078b --- /dev/null +++ b/mobile/lib/presentation/widgets/feature_message/feature_message_placeholder.widget.dart @@ -0,0 +1,105 @@ +import 'package:flutter/material.dart'; +import 'package:immich_mobile/extensions/build_context_extensions.dart'; +import 'package:immich_mobile/generated/translations.g.dart'; +import 'package:immich_mobile/widgets/common/immich_logo.dart'; + +class _SplatColors { + static const primary = Color(0xFF4250AF); + static const info = Color(0xFF3B82F6); + static const success = Color(0xFF2FB457); + static const warning = Color(0xFFF2A73B); + static const danger = Color(0xFFE5484D); +} + +class FeatureMessagePlaceholder extends StatelessWidget { + const FeatureMessagePlaceholder({super.key}); + + @override + Widget build(BuildContext context) { + final dark = Theme.of(context).brightness == Brightness.dark; + + final cardColor = dark ? const Color(0xFF232228) : const Color(0xFFEEEDF4); + final tileColor = dark ? const Color(0xFF2B2A32) : const Color(0xFFFBFAFE); + final inkColor = dark ? const Color(0xFFE7E7EC) : const Color(0xFF1A1A1E); + + return Container( + width: double.infinity, + height: double.infinity, + clipBehavior: Clip.antiAlias, + // Fill a plain rectangle — the parent's ClipRRect handles the corner rounding, + // so the placeholder doesn't round its own corners inside that clip. + decoration: BoxDecoration(color: cardColor), + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + // ---- confetti motif (168 × 120 region) ---- + SizedBox( + width: 168, + height: 120, + child: Stack( + clipBehavior: Clip.none, + children: [ + // scattered confetti + Positioned(left: 6, top: 24, child: _dot(12, _SplatColors.primary)), + Positioned(left: 80, top: -2, child: _dot(9, _SplatColors.danger)), + Positioned(left: 148, top: 84, child: _dot(11, _SplatColors.success)), + Positioned(left: 140, top: 14, child: _bar(22, 8, 0.49, _SplatColors.danger)), // ~28° + Positioned(left: 2, top: 90, child: _bar(20, 8, -0.31, _SplatColors.info)), // ~-18° + // tilted spark tile + Positioned( + left: 46, + top: 18, + child: Transform.rotate( + angle: -0.105, // ~-6° + child: Container( + width: 84, + height: 84, + decoration: BoxDecoration( + color: tileColor, + borderRadius: const BorderRadius.all(Radius.circular(18)), + boxShadow: [ + BoxShadow( + color: const Color(0xFF0F122D).withValues(alpha: 0.22), + blurRadius: 22, + offset: const Offset(0, 10), + ), + ], + ), + child: Stack( + alignment: Alignment.center, + children: [ + Positioned(left: 12, top: 12, child: _dot(12, _SplatColors.warning)), + const ImmichLogo(size: 40), + ], + ), + ), + ), + ), + ], + ), + ), + const SizedBox(height: 16), + Text( + context.t.new_feature, + style: context.textTheme.titleMedium?.copyWith(fontWeight: FontWeight.w600, color: inkColor), + ), + ], + ), + ); + } + + static Widget _dot(double d, Color c) => Container( + width: d, + height: d, + decoration: BoxDecoration(color: c, shape: BoxShape.circle), + ); + + static Widget _bar(double w, double h, double angle, Color c) => Transform.rotate( + angle: angle, + child: Container( + width: w, + height: h, + decoration: BoxDecoration(color: c, borderRadius: const BorderRadius.all(Radius.circular(99))), + ), + ); +} diff --git a/mobile/lib/presentation/widgets/images/full_image.widget.dart b/mobile/lib/presentation/widgets/images/full_image.widget.dart index 77ea996b89..8c92ac2818 100644 --- a/mobile/lib/presentation/widgets/images/full_image.widget.dart +++ b/mobile/lib/presentation/widgets/images/full_image.widget.dart @@ -1,3 +1,5 @@ +import 'dart:async'; + import 'package:flutter/material.dart'; import 'package:immich_mobile/domain/models/asset/base_asset.model.dart'; import 'package:immich_mobile/presentation/widgets/images/image_provider.dart'; @@ -22,7 +24,7 @@ class FullImage extends StatelessWidget { Widget build(BuildContext context) { final provider = getFullImageProvider(asset, size: size); return OctoImage( - fadeInDuration: const Duration(milliseconds: 0), + fadeInDuration: Duration.zero, fadeOutDuration: const Duration(milliseconds: 100), placeholderBuilder: placeholder != null ? (_) => placeholder! : null, image: provider, @@ -30,7 +32,7 @@ class FullImage extends StatelessWidget { height: size.height, fit: fit, errorBuilder: (context, error, stackTrace) { - provider.evict(); + unawaited(provider.evict()); return const Icon(Icons.image_not_supported_outlined, size: 32); }, ); diff --git a/mobile/lib/presentation/widgets/images/image_provider.dart b/mobile/lib/presentation/widgets/images/image_provider.dart index b3c58314db..bdedd29d45 100644 --- a/mobile/lib/presentation/widgets/images/image_provider.dart +++ b/mobile/lib/presentation/widgets/images/image_provider.dart @@ -1,3 +1,4 @@ +import 'dart:async'; import 'dart:io'; import 'dart:ui' as ui; @@ -25,7 +26,7 @@ mixin CancellableImageProviderMixin on CancellableImageProvide ImageInfo? getInitialImage(CancellableImageProvider provider) { final completer = CancelableCompleter(onCancel: provider.cancel); - final cachedStream = provider.resolve(const ImageConfiguration()); + final cachedStream = provider.resolve(ImageConfiguration.empty); ImageInfo? cachedImage; final listener = ImageStreamListener((image, synchronousCall) { if (synchronousCall) { @@ -43,10 +44,12 @@ mixin CancellableImageProviderMixin on CancellableImageProvide return cachedImage; } - completer.operation.valueOrCancellation().whenComplete(() { - cachedStream.removeListener(listener); - cachedOperation = null; - }); + unawaited( + completer.operation.valueOrCancellation().whenComplete(() { + cachedStream.removeListener(listener); + cachedOperation = null; + }), + ); cachedOperation = completer.operation; return null; } @@ -138,7 +141,7 @@ mixin CancellableImageProviderMixin on CancellableImageProvide final operation = cachedOperation; if (operation != null) { cachedOperation = null; - operation.cancel(); + unawaited(operation.cancel()); } if (hasActiveWork) { @@ -152,6 +155,7 @@ ImageProvider getFullImageProvider( Size size = const Size(1080, 1920), bool edited = true, String? localFilePath, + Size? remoteThumbnailSize, }) { // Create new provider and cache it final ImageProvider provider; @@ -159,7 +163,15 @@ ImageProvider getFullImageProvider( provider = FileImage(File(localFilePath)); } else if (_shouldUseLocalAsset(asset)) { final id = asset is LocalAsset ? asset.id : (asset as RemoteAsset).localId!; - provider = LocalFullImageProvider(id: id, size: size, assetType: asset.type, isAnimated: asset.isAnimatedImage); + provider = LocalFullImageProvider( + id: id, + size: size, + assetType: asset.type, + isAnimated: asset.isAnimatedImage, + width: asset.width, + height: asset.height, + checksum: asset.checksum, + ); } else { final String assetId; final String thumbhash; @@ -178,21 +190,31 @@ ImageProvider getFullImageProvider( assetType: asset.type, isAnimated: asset.isAnimatedImage, edited: edited, + thumbnailSize: remoteThumbnailSize, ); } return provider; } -ImageProvider? getThumbnailImageProvider(BaseAsset asset, {Size size = kThumbnailResolution, bool edited = true}) { +ImageProvider? getThumbnailImageProvider( + BaseAsset asset, { + Size size = kThumbnailResolution, + + /// Physical size to decode for remote thumbnails, or null for the source size. + Size? remoteSize, + bool edited = true, +}) { if (_shouldUseLocalAsset(asset)) { final id = asset is LocalAsset ? asset.id : (asset as RemoteAsset).localId!; - return LocalThumbProvider(id: id, size: size, assetType: asset.type); + return LocalThumbProvider(id: id, size: size, assetType: asset.type, checksum: asset.checksum); } final assetId = asset is RemoteAsset ? asset.id : (asset as LocalAsset).remoteId; final thumbhash = asset is RemoteAsset ? asset.thumbHash ?? "" : ""; - return assetId != null ? RemoteImageProvider.thumbnail(assetId: assetId, thumbhash: thumbhash, edited: edited) : null; + return assetId != null + ? RemoteImageProvider.thumbnail(assetId: assetId, thumbhash: thumbhash, edited: edited, decodeSize: remoteSize) + : null; } bool _shouldUseLocalAsset(BaseAsset asset) => diff --git a/mobile/lib/presentation/widgets/images/local_album_thumbnail.widget.dart b/mobile/lib/presentation/widgets/images/local_album_thumbnail.widget.dart index b519da33c3..966e070872 100644 --- a/mobile/lib/presentation/widgets/images/local_album_thumbnail.widget.dart +++ b/mobile/lib/presentation/widgets/images/local_album_thumbnail.widget.dart @@ -14,7 +14,7 @@ class LocalAlbumThumbnail extends ConsumerWidget { return localAlbumThumbnail.when( data: (data) { if (data == null) { - return Container( + return DecoratedBox( decoration: BoxDecoration( color: context.colorScheme.surfaceContainer, borderRadius: const BorderRadius.all(Radius.circular(16)), diff --git a/mobile/lib/presentation/widgets/images/local_image_provider.dart b/mobile/lib/presentation/widgets/images/local_image_provider.dart index eba4f0a1cd..46e8eda85b 100644 --- a/mobile/lib/presentation/widgets/images/local_image_provider.dart +++ b/mobile/lib/presentation/widgets/images/local_image_provider.dart @@ -1,3 +1,5 @@ +import 'dart:math' as math; + import 'package:flutter/foundation.dart'; import 'package:flutter/widgets.dart'; import 'package:immich_mobile/domain/models/asset/base_asset.model.dart'; @@ -8,13 +10,19 @@ import 'package:immich_mobile/presentation/widgets/images/image_provider.dart'; import 'package:immich_mobile/presentation/widgets/images/one_frame_multi_image_stream_completer.dart'; import 'package:immich_mobile/presentation/widgets/timeline/constants.dart'; +// iOS GPU textures max out at 16384px; larger images squish. +const _kMaxPixelSize = 16384; + class LocalThumbProvider extends CancellableImageProvider with CancellableImageProviderMixin { final String id; final Size size; final AssetType assetType; - LocalThumbProvider({required this.id, required this.assetType, this.size = kThumbnailResolution}); + // an edit on the device keeps the id and changes the bytes, so the checksum is what separates two renders + final String? checksum; + + LocalThumbProvider({required this.id, required this.assetType, this.checksum, this.size = kThumbnailResolution}); @override Future obtainKey(ImageConfiguration configuration) { @@ -44,13 +52,13 @@ class LocalThumbProvider extends CancellableImageProvider return true; } if (other is LocalThumbProvider) { - return id == other.id; + return id == other.id && checksum == other.checksum; } return false; } @override - int get hashCode => id.hashCode; + int get hashCode => Object.hash(id, checksum); } class LocalFullImageProvider extends CancellableImageProvider @@ -59,8 +67,38 @@ class LocalFullImageProvider extends CancellableImageProvider + previewTargetSize(size.width * dpr, size.height * dpr, width, height, previewIsFinal: previewIsFinal); + + // Use an aspect-correct target when aspectFill would exceed the texture limit. + @visibleForTesting + static Size previewTargetSize(double boxW, double boxH, int? width, int? height, {required bool previewIsFinal}) { + if (width == null || height == null || width <= 0 || height <= 0) { + return Size(boxW, boxH); + } + final imgLong = math.max(width, height).toDouble(); + final coverLong = imgLong * math.max(boxW / width, boxH / height); + if (coverLong <= _kMaxPixelSize) { + return Size(boxW, boxH); + } + final bound = previewIsFinal ? _kMaxPixelSize.toDouble() : math.max(boxW, boxH); + final scale = math.min(1.0, bound / imgLong); + return Size(math.max(1.0, width * scale), math.max(1.0, height * scale)); + } @override Future obtainKey(ImageConfiguration configuration) { @@ -73,7 +111,7 @@ class LocalFullImageProvider extends CancellableImageProvider [ DiagnosticsProperty('Image provider', this), DiagnosticsProperty('Id', key.id), @@ -86,7 +124,7 @@ class LocalFullImageProvider extends CancellableImageProvider [ DiagnosticsProperty('Image provider', this), DiagnosticsProperty('Id', key.id), @@ -108,7 +146,7 @@ class LocalFullImageProvider extends CancellableImageProvider id.hashCode ^ size.hashCode ^ isAnimated.hashCode; + int get hashCode => Object.hash(id, size, isAnimated, width, height, checksum); } diff --git a/mobile/lib/presentation/widgets/images/remote_image_provider.dart b/mobile/lib/presentation/widgets/images/remote_image_provider.dart index 9618ee72ad..b533fd8cf5 100644 --- a/mobile/lib/presentation/widgets/images/remote_image_provider.dart +++ b/mobile/lib/presentation/widgets/images/remote_image_provider.dart @@ -14,10 +14,17 @@ class RemoteImageProvider extends CancellableImageProvider final String url; final bool edited; - RemoteImageProvider({required this.url, this.edited = true}); + /// Physical size to decode, or null for the source size. + final Size? decodeSize; - RemoteImageProvider.thumbnail({required String assetId, required String thumbhash, this.edited = true}) - : url = getThumbnailUrlForRemoteId(assetId, thumbhash: thumbhash, edited: edited); + RemoteImageProvider({required this.url, this.edited = true, this.decodeSize}); + + RemoteImageProvider.thumbnail({ + required String assetId, + required String thumbhash, + this.edited = true, + this.decodeSize, + }) : url = getThumbnailUrlForRemoteId(assetId, thumbhash: thumbhash, edited: edited); @override Future obtainKey(ImageConfiguration configuration) { @@ -37,7 +44,7 @@ class RemoteImageProvider extends CancellableImageProvider } Stream _codec(RemoteImageProvider key, ImageDecoderCallback decode) { - final request = this.request = RemoteImageRequest(uri: key.url); + final request = this.request = RemoteImageRequest(uri: key.url, decodeSize: key.decodeSize); return loadRequest(request, decode, isFinal: true); } @@ -47,13 +54,13 @@ class RemoteImageProvider extends CancellableImageProvider return true; } if (other is RemoteImageProvider) { - return url == other.url && edited == other.edited; + return url == other.url && edited == other.edited && decodeSize == other.decodeSize; } return false; } @override - int get hashCode => url.hashCode ^ edited.hashCode; + int get hashCode => url.hashCode ^ edited.hashCode ^ decodeSize.hashCode; } class RemoteFullImageProvider extends CancellableImageProvider @@ -64,12 +71,16 @@ class RemoteFullImageProvider extends CancellableImageProvider [ DiagnosticsProperty('Image provider', this), DiagnosticsProperty('Asset Id', key.assetId), @@ -96,7 +109,12 @@ class RemoteFullImageProvider extends CancellableImageProvider [ DiagnosticsProperty('Image provider', this), diff --git a/mobile/lib/presentation/widgets/images/thumbnail.widget.dart b/mobile/lib/presentation/widgets/images/thumbnail.widget.dart index 847fa4e381..5bfeb25977 100644 --- a/mobile/lib/presentation/widgets/images/thumbnail.widget.dart +++ b/mobile/lib/presentation/widgets/images/thumbnail.widget.dart @@ -1,3 +1,4 @@ +import 'dart:async'; import 'dart:ui' as ui; import 'package:flutter/material.dart'; @@ -25,17 +26,22 @@ class Thumbnail extends StatefulWidget { required String remoteId, required String thumbhash, this.fit = BoxFit.cover, - Size size = kThumbnailResolution, + + /// Physical size to decode, or null for the source size. + Size? decodeSize, super.key, - }) : imageProvider = RemoteImageProvider.thumbnail(assetId: remoteId, thumbhash: thumbhash), + }) : imageProvider = RemoteImageProvider.thumbnail(assetId: remoteId, thumbhash: thumbhash, decodeSize: decodeSize), thumbhashProvider = null; Thumbnail.fromAsset({ required BaseAsset? asset, this.fit = BoxFit.cover, - /// The logical UI size of the thumbnail. This is only used to determine the ideal image resolution and does not affect the widget size. + /// Decode size for local thumbnails. This does not affect the widget size. Size size = kThumbnailResolution, + + /// Physical size to decode for remote thumbnails. + Size? remoteSize, super.key, }) : thumbhashProvider = switch (asset) { RemoteAsset() when asset.thumbHash != null && asset.localId == null => ThumbHashProvider( @@ -43,7 +49,7 @@ class Thumbnail extends StatefulWidget { ), _ => null, }, - imageProvider = asset == null ? null : getThumbnailImageProvider(asset, size: size); + imageProvider = asset == null ? null : getThumbnailImageProvider(asset, size: size, remoteSize: remoteSize); @override State createState() => _ThumbnailState(); @@ -130,9 +136,9 @@ class _ThumbnailState extends State with SingleTickerProviderStateMix if ((synchronousCall && _providerImage == null) || !_isVisible()) { _fadeController.value = 1.0; } else if (_fadeController.isAnimating) { - _fadeController.forward(); + unawaited(_fadeController.forward()); } else { - _fadeController.forward(from: 0.0); + unawaited(_fadeController.forward(from: 0.0)); } setState(() { diff --git a/mobile/lib/presentation/widgets/images/thumbnail_tile.widget.dart b/mobile/lib/presentation/widgets/images/thumbnail_tile.widget.dart index 4803e26b86..953efc144d 100644 --- a/mobile/lib/presentation/widgets/images/thumbnail_tile.widget.dart +++ b/mobile/lib/presentation/widgets/images/thumbnail_tile.widget.dart @@ -16,6 +16,7 @@ class ThumbnailTile extends ConsumerStatefulWidget { const ThumbnailTile( this.asset, { this.size = kThumbnailResolution, + this.remoteSize, this.fit = BoxFit.cover, this.showStorageIndicator = false, this.lockSelection = false, @@ -26,6 +27,9 @@ class ThumbnailTile extends ConsumerStatefulWidget { final BaseAsset? asset; final Size size; + + /// Physical size to decode for remote thumbnails. + final Size? remoteSize; final BoxFit fit; final bool showStorageIndicator; final bool lockSelection; @@ -108,7 +112,7 @@ class _ThumbnailTileState extends ConsumerState { // but other solutions have failed thus far. key: ValueKey(isCurrentAsset), tag: '${asset?.heroTag}_$heroIndex', - child: Thumbnail.fromAsset(asset: asset, size: widget.size), + child: Thumbnail.fromAsset(asset: asset, size: widget.size, remoteSize: widget.remoteSize), // Placeholderbuilder used to hide indicators on first hero animation, since flightShuttleBuilder isn't called until both source and destination hero exist in widget tree. placeholderBuilder: (context, heroSize, child) { if (!_hideIndicators) { @@ -285,7 +289,7 @@ class _TileOverlayIcon extends StatelessWidget { icon, color: Colors.white, size: 16, - shadows: [const Shadow(blurRadius: 5.0, color: Color.fromRGBO(0, 0, 0, 0.6), offset: Offset(0.0, 0.0))], + shadows: const [Shadow(blurRadius: 5.0, color: Color.fromRGBO(0, 0, 0, 0.6), offset: Offset.zero)], ); } } @@ -297,8 +301,7 @@ class _AssetTypeIcons extends StatelessWidget { @override Widget build(BuildContext context) { - final remoteAsset = asset is RemoteAsset ? asset as RemoteAsset : null; - final isLivePhoto = remoteAsset?.livePhotoVideoId != null; + final isLivePhoto = asset.isMotionPhoto; return Column( mainAxisSize: MainAxisSize.min, @@ -347,7 +350,7 @@ class _UploadProgressOverlay extends StatelessWidget { final percentage = isError ? 0 : (progress * 100).toInt(); return Positioned.fill( - child: Container( + child: ColoredBox( color: isError ? Colors.red.withValues(alpha: 0.6) : Colors.black54, child: Center( child: Column( diff --git a/mobile/lib/presentation/widgets/map/map.state.dart b/mobile/lib/presentation/widgets/map/map.state.dart index 57ce619771..eedf3aadf5 100644 --- a/mobile/lib/presentation/widgets/map/map.state.dart +++ b/mobile/lib/presentation/widgets/map/map.state.dart @@ -1,11 +1,15 @@ +import 'dart:async'; + import 'package:flutter/material.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; import 'package:immich_mobile/domain/models/events.model.dart'; +import 'package:immich_mobile/domain/models/time_range.model.dart'; import 'package:immich_mobile/domain/utils/event_stream.dart'; import 'package:immich_mobile/infrastructure/repositories/timeline.repository.dart'; import 'package:immich_mobile/providers/infrastructure/map.provider.dart'; import 'package:immich_mobile/providers/infrastructure/settings.provider.dart'; import 'package:immich_mobile/providers/map/map_state.provider.dart'; +import 'package:immich_mobile/utils/option.dart'; import 'package:maplibre_gl/maplibre_gl.dart'; class MapState { @@ -15,6 +19,7 @@ class MapState { final bool includeArchived; final bool withPartners; final int relativeDays; + final TimeRange timeRange; const MapState({ this.themeMode = ThemeMode.system, @@ -23,6 +28,7 @@ class MapState { this.includeArchived = false, this.withPartners = false, this.relativeDays = 0, + this.timeRange = const TimeRange(), }); @override @@ -40,6 +46,7 @@ class MapState { bool? includeArchived, bool? withPartners, int? relativeDays, + TimeRange? timeRange, }) { return MapState( bounds: bounds ?? this.bounds, @@ -48,6 +55,7 @@ class MapState { includeArchived: includeArchived ?? this.includeArchived, withPartners: withPartners ?? this.withPartners, relativeDays: relativeDays ?? this.relativeDays, + timeRange: timeRange ?? this.timeRange, ); } @@ -57,6 +65,7 @@ class MapState { includeArchived: includeArchived, withPartners: withPartners, relativeDays: relativeDays, + timeRange: timeRange, ); } @@ -80,29 +89,47 @@ class MapStateNotifier extends Notifier { } void switchFavoriteOnly(bool isFavoriteOnly) { - ref.read(settingsProvider).write(.mapShowFavoriteOnly, isFavoriteOnly); + unawaited(ref.read(settingsProvider).write(.mapShowFavoriteOnly, isFavoriteOnly)); state = state.copyWith(onlyFavorites: isFavoriteOnly); EventStream.shared.emit(const MapMarkerReloadEvent()); } void switchIncludeArchived(bool isIncludeArchived) { - ref.read(settingsProvider).write(.mapIncludeArchived, isIncludeArchived); + unawaited(ref.read(settingsProvider).write(.mapIncludeArchived, isIncludeArchived)); state = state.copyWith(includeArchived: isIncludeArchived); EventStream.shared.emit(const MapMarkerReloadEvent()); } void switchWithPartners(bool isWithPartners) { - ref.read(settingsProvider).write(.mapWithPartners, isWithPartners); + unawaited(ref.read(settingsProvider).write(.mapWithPartners, isWithPartners)); state = state.copyWith(withPartners: isWithPartners); EventStream.shared.emit(const MapMarkerReloadEvent()); } void setRelativeTime(int relativeDays) { - ref.read(settingsProvider).write(.mapRelativeDate, relativeDays); + unawaited(ref.read(settingsProvider).write(.mapRelativeDate, relativeDays)); state = state.copyWith(relativeDays: relativeDays); EventStream.shared.emit(const MapMarkerReloadEvent()); } + void setCustomTimeRange(TimeRange range) { + unawaited(ref.read(settingsProvider).write(.mapCustomFrom, range.from)); + unawaited(ref.read(settingsProvider).write(.mapCustomTo, range.to)); + state = state.copyWith(timeRange: range); + EventStream.shared.emit(const MapMarkerReloadEvent()); + } + + Option parseDateOption(String s) { + try { + if (s.trim().isEmpty) { + return const Option.none(); + } + return Option.some(DateTime.parse(s)); + } catch (_) { + return const Option.none(); + } + } + @override MapState build() { final mapConfig = ref.read(appConfigProvider.select((config) => config.map)); @@ -113,6 +140,7 @@ class MapStateNotifier extends Notifier { withPartners: mapConfig.withPartners, relativeDays: mapConfig.relativeDays, bounds: LatLngBounds(northeast: const LatLng(0, 0), southwest: const LatLng(0, 0)), + timeRange: TimeRange(from: mapConfig.customFrom, to: mapConfig.customTo), ); } } diff --git a/mobile/lib/presentation/widgets/map/map.widget.dart b/mobile/lib/presentation/widgets/map/map.widget.dart index f6c4f7d468..ab2db23d8b 100644 --- a/mobile/lib/presentation/widgets/map/map.widget.dart +++ b/mobile/lib/presentation/widgets/map/map.widget.dart @@ -10,13 +10,12 @@ import 'package:immich_mobile/domain/models/events.model.dart'; import 'package:immich_mobile/domain/utils/event_stream.dart'; import 'package:immich_mobile/extensions/asyncvalue_extensions.dart'; import 'package:immich_mobile/extensions/build_context_extensions.dart'; -import 'package:immich_mobile/extensions/translate_extensions.dart'; +import 'package:immich_mobile/generated/translations.g.dart'; import 'package:immich_mobile/presentation/widgets/bottom_sheet/base_bottom_sheet.widget.dart'; import 'package:immich_mobile/presentation/widgets/bottom_sheet/map_bottom_sheet.widget.dart'; import 'package:immich_mobile/presentation/widgets/map/map.state.dart'; import 'package:immich_mobile/presentation/widgets/map/map_utils.dart'; import 'package:immich_mobile/providers/routes.provider.dart'; -import 'package:immich_mobile/routing/router.dart'; import 'package:immich_mobile/utils/async_mutex.dart'; import 'package:immich_mobile/utils/debounce.dart'; import 'package:immich_mobile/widgets/common/immich_toast.dart'; @@ -67,7 +66,7 @@ class _DriftMapState extends ConsumerState { void dispose() { _debouncer.dispose(); bottomSheetOffset.dispose(); - _eventSubscription?.cancel(); + unawaited(_eventSubscription?.cancel()); super.dispose(); } @@ -133,8 +132,7 @@ class _DriftMapState extends ConsumerState { // When the AssetViewer is open, the DriftMap route stays alive in the background. // If we continue to update bounds, the map-scoped timeline service gets recreated and the previous one disposed, // which can invalidate the TimelineService instance that was passed into AssetViewerRoute (causing "loading forever"). - final currentRoute = ref.read(currentRouteNameProvider); - if (currentRoute == AssetViewerRoute.name) { + if (ref.read(isAssetViewerOpenProvider)) { return; } @@ -166,7 +164,7 @@ class _DriftMapState extends ConsumerState { context: context, gravity: ToastGravity.BOTTOM, toastType: ToastType.error, - msg: "map_cannot_get_user_location".t(context: context), + msg: context.t.map_cannot_get_user_location, ); } return; @@ -183,6 +181,11 @@ class _DriftMapState extends ConsumerState { @override Widget build(BuildContext context) { + ref.listen(isAssetViewerOpenProvider, (previous, current) { + if (previous == true && !current) { + _debouncer.run(() => setBounds(forceReload: true)); + } + }); return Stack( children: [ _Map(initialLocation: widget.initialLocation, onMapCreated: onMapCreated, onMapReady: onMapReady), diff --git a/mobile/lib/presentation/widgets/map/map_settings_sheet.dart b/mobile/lib/presentation/widgets/map/map_settings_sheet.dart index c581dd6292..c2a5678ee9 100644 --- a/mobile/lib/presentation/widgets/map/map_settings_sheet.dart +++ b/mobile/lib/presentation/widgets/map/map_settings_sheet.dart @@ -1,21 +1,38 @@ import 'package:flutter/material.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:immich_mobile/extensions/translate_extensions.dart'; +import 'package:immich_mobile/domain/models/time_range.model.dart'; +import 'package:immich_mobile/generated/translations.g.dart'; import 'package:immich_mobile/presentation/widgets/map/map.state.dart'; +import 'package:immich_mobile/widgets/map/map_settings/map_custom_time_range.dart'; import 'package:immich_mobile/widgets/map/map_settings/map_settings_list_tile.dart'; import 'package:immich_mobile/widgets/map/map_settings/map_settings_time_dropdown.dart'; import 'package:immich_mobile/widgets/map/map_settings/map_theme_picker.dart'; -class DriftMapSettingsSheet extends HookConsumerWidget { +class DriftMapSettingsSheet extends ConsumerStatefulWidget { const DriftMapSettingsSheet({super.key}); @override - Widget build(BuildContext context, WidgetRef ref) { + ConsumerState createState() => _DriftMapSettingsSheetState(); +} + +class _DriftMapSettingsSheetState extends ConsumerState { + late bool useCustomRange; + + @override + void initState() { + super.initState(); + final mapState = ref.read(mapStateProvider); + final timeRange = mapState.timeRange; + useCustomRange = timeRange.from != null || timeRange.to != null; + } + + @override + Widget build(BuildContext context) { final mapState = ref.watch(mapStateProvider); return DraggableScrollableSheet( expand: false, - initialChildSize: 0.6, + initialChildSize: useCustomRange ? 0.7 : 0.6, builder: (ctx, scrollController) => SingleChildScrollView( controller: scrollController, child: Card( @@ -32,25 +49,56 @@ class DriftMapSettingsSheet extends HookConsumerWidget { ), const Divider(height: 30, thickness: 1), MapSettingsListTile( - title: "map_settings_only_show_favorites".t(context: context), + title: context.t.map_settings_only_show_favorites, selected: mapState.onlyFavorites, onChanged: (favoriteOnly) => ref.read(mapStateProvider.notifier).switchFavoriteOnly(favoriteOnly), ), MapSettingsListTile( - title: "map_settings_include_show_archived".t(context: context), + title: context.t.map_settings_include_show_archived, selected: mapState.includeArchived, onChanged: (includeArchive) => ref.read(mapStateProvider.notifier).switchIncludeArchived(includeArchive), ), MapSettingsListTile( - title: "map_settings_include_show_partners".t(context: context), + title: context.t.map_settings_include_show_partners, selected: mapState.withPartners, onChanged: (withPartners) => ref.read(mapStateProvider.notifier).switchWithPartners(withPartners), ), - MapTimeDropDown( - relativeTime: mapState.relativeDays, - onTimeChange: (time) => ref.read(mapStateProvider.notifier).setRelativeTime(time), - ), + if (useCustomRange) ...[ + MapTimeRange( + timeRange: mapState.timeRange, + onChanged: (range) { + ref.read(mapStateProvider.notifier).setCustomTimeRange(range); + }, + ), + Align( + alignment: Alignment.centerLeft, + child: TextButton( + onPressed: () => setState(() { + useCustomRange = false; + ref.read(mapStateProvider.notifier).setRelativeTime(0); + ref.read(mapStateProvider.notifier).setCustomTimeRange(const TimeRange()); + }), + child: Text(context.t.remove_custom_date_range), + ), + ), + ] else ...[ + MapTimeDropDown( + relativeTime: mapState.relativeDays, + onTimeChange: (time) => ref.read(mapStateProvider.notifier).setRelativeTime(time), + ), + Align( + alignment: Alignment.centerLeft, + child: TextButton( + onPressed: () => setState(() { + useCustomRange = true; + ref.read(mapStateProvider.notifier).setRelativeTime(0); + ref.read(mapStateProvider.notifier).setCustomTimeRange(const TimeRange()); + }), + child: Text(context.t.use_custom_date_range), + ), + ), + ], const SizedBox(height: 20), ], ), diff --git a/mobile/lib/presentation/widgets/map/map_utils.dart b/mobile/lib/presentation/widgets/map/map_utils.dart index 80df5995b6..3ed6ceee25 100644 --- a/mobile/lib/presentation/widgets/map/map_utils.dart +++ b/mobile/lib/presentation/widgets/map/map_utils.dart @@ -2,7 +2,7 @@ import 'dart:async'; import 'package:flutter/material.dart'; import 'package:geolocator/geolocator.dart'; -import 'package:immich_mobile/extensions/translate_extensions.dart'; +import 'package:immich_mobile/generated/translations.g.dart'; import 'package:immich_mobile/widgets/common/confirm_dialog.dart'; import 'package:logging/logging.dart'; import 'package:maplibre_gl/maplibre_gl.dart'; @@ -71,7 +71,11 @@ class MapUtils { bool silent = false, }) async { try { - bool serviceEnabled = await Geolocator.isLocationServiceEnabled(); + final serviceEnabled = await Geolocator.isLocationServiceEnabled(); + if (!context.mounted) { + return (null, LocationPermission.unableToDetermine); + } + if (!serviceEnabled && !silent) { unawaited(showDialog(context: context, builder: (context) => _LocationServiceDisabledDialog(context))); return (null, LocationPermission.deniedForever); @@ -81,6 +85,10 @@ class MapUtils { bool shouldRequestPermission = false; if (permission == LocationPermission.denied && !silent) { + if (!context.mounted) { + return (null, LocationPermission.unableToDetermine); + } + shouldRequestPermission = await showDialog( context: context, builder: (context) => _LocationPermissionDisabledDialog(context), @@ -98,7 +106,7 @@ class MapUtils { return (null, LocationPermission.deniedForever); } - Position currentUserLocation = await Geolocator.getCurrentPosition( + final Position currentUserLocation = await Geolocator.getCurrentPosition( locationSettings: const LocationSettings( accuracy: LocationAccuracy.high, distanceFilter: 0, @@ -116,10 +124,10 @@ class MapUtils { class _LocationServiceDisabledDialog extends ConfirmDialog { _LocationServiceDisabledDialog(BuildContext context) : super( - title: 'map_location_service_disabled_title'.t(context: context), - content: 'map_location_service_disabled_content'.t(context: context), - cancel: 'cancel'.t(context: context), - ok: 'yes'.t(context: context), + title: context.t.map_location_service_disabled_title, + content: context.t.map_location_service_disabled_content, + cancel: context.t.cancel, + ok: context.t.yes, onOk: () async { await Geolocator.openLocationSettings(); }, @@ -129,10 +137,10 @@ class _LocationServiceDisabledDialog extends ConfirmDialog { class _LocationPermissionDisabledDialog extends ConfirmDialog { _LocationPermissionDisabledDialog(BuildContext context) : super( - title: 'map_no_location_permission_title'.t(context: context), - content: 'map_no_location_permission_content'.t(context: context), - cancel: 'cancel'.t(context: context), - ok: 'yes'.t(context: context), + title: context.t.map_no_location_permission_title, + content: context.t.map_no_location_permission_content, + cancel: context.t.cancel, + ok: context.t.yes, onOk: () {}, ); } diff --git a/mobile/lib/presentation/widgets/memory/memory_bottom_info.widget.dart b/mobile/lib/presentation/widgets/memory/memory_bottom_info.widget.dart index fc9bfb34e7..eb8ce1815a 100644 --- a/mobile/lib/presentation/widgets/memory/memory_bottom_info.widget.dart +++ b/mobile/lib/presentation/widgets/memory/memory_bottom_info.widget.dart @@ -1,12 +1,11 @@ -// ignore_for_file: require_trailing_commas - import 'package:auto_route/auto_route.dart'; -import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; import 'package:immich_mobile/domain/models/events.model.dart'; import 'package:immich_mobile/domain/models/memory.model.dart'; import 'package:immich_mobile/domain/utils/event_stream.dart'; +import 'package:immich_mobile/generated/translations.g.dart'; import 'package:immich_mobile/routing/router.dart'; +import 'package:intl/intl.dart'; class DriftMemoryBottomInfo extends StatelessWidget { final DriftMemory memory; @@ -36,7 +35,7 @@ class DriftMemoryBottomInfo extends StatelessWidget { ], ), Tooltip( - message: 'view_in_timeline'.tr(), + message: context.t.view_in_timeline, child: MaterialButton( minWidth: 0, onPressed: () async { diff --git a/mobile/lib/presentation/widgets/memory/memory_card.widget.dart b/mobile/lib/presentation/widgets/memory/memory_card.widget.dart index 2f7a616632..7e782a3db4 100644 --- a/mobile/lib/presentation/widgets/memory/memory_card.widget.dart +++ b/mobile/lib/presentation/widgets/memory/memory_card.widget.dart @@ -55,7 +55,7 @@ class DriftMemoryCard extends StatelessWidget { } if (asset.isImage) { - return FullImage(asset, fit: fit, size: const Size(double.infinity, double.infinity)); + return FullImage(asset, fit: fit, size: Size.infinite); } return Center( @@ -97,7 +97,7 @@ class _BlurredBackdrop extends HookWidget { final blurhash = useDriftBlurHashRef(asset).value; if (blurhash != null) { // Use a nice cheap blur hash image decoration - return Container( + return DecoratedBox( decoration: BoxDecoration( image: DecorationImage(image: MemoryImage(blurhash), fit: BoxFit.cover), ), @@ -109,7 +109,7 @@ class _BlurredBackdrop extends HookWidget { // safely use that as the image provider return ImageFiltered( imageFilter: ImageFilter.blur(sigmaX: 30, sigmaY: 30), - child: Container( + child: DecoratedBox( decoration: BoxDecoration( image: DecorationImage( image: getFullImageProvider(asset, size: Size(context.width, context.height)), diff --git a/mobile/lib/presentation/widgets/memory/memory_lane.widget.dart b/mobile/lib/presentation/widgets/memory/memory_lane.widget.dart index 62889b10cb..1732249523 100644 --- a/mobile/lib/presentation/widgets/memory/memory_lane.widget.dart +++ b/mobile/lib/presentation/widgets/memory/memory_lane.widget.dart @@ -1,8 +1,10 @@ +import 'dart:async'; + import 'package:auto_route/auto_route.dart'; import 'package:flutter/material.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; import 'package:immich_mobile/domain/models/memory.model.dart'; -import 'package:immich_mobile/extensions/translate_extensions.dart'; +import 'package:immich_mobile/generated/translations.g.dart'; import 'package:immich_mobile/presentation/pages/drift_memory.page.dart'; import 'package:immich_mobile/presentation/widgets/images/thumbnail.widget.dart'; import 'package:immich_mobile/providers/haptic_feedback.provider.dart'; @@ -33,7 +35,7 @@ class DriftMemoryLane extends ConsumerWidget { if (memories[index].assets.isNotEmpty) { DriftMemoryPage.setMemory(ref, memories[index]); } - context.pushRoute(DriftMemoryRoute(memories: memories, memoryIndex: index)); + unawaited(context.pushRoute(DriftMemoryRoute(memories: memories, memoryIndex: index))); }, children: memories .map((memory) => DriftMemoryCard(key: Key(memory.id), memory: memory)) @@ -43,15 +45,15 @@ class DriftMemoryLane extends ConsumerWidget { } } -class DriftMemoryCard extends ConsumerWidget { +class DriftMemoryCard extends StatelessWidget { const DriftMemoryCard({super.key, required this.memory}); final DriftMemory memory; @override - Widget build(BuildContext context, WidgetRef ref) { + Widget build(BuildContext context) { final yearsAgo = DateTime.now().year - memory.data.year; - final title = 'years_ago'.t(context: context, args: {'years': yearsAgo.toString()}); + final title = context.t.years_ago(years: yearsAgo); return Center( child: Stack( children: [ diff --git a/mobile/lib/presentation/widgets/people/person_edit_birthday_modal.widget.dart b/mobile/lib/presentation/widgets/people/person_edit_birthday_modal.widget.dart index 7ed02af26b..e56a21e021 100644 --- a/mobile/lib/presentation/widgets/people/person_edit_birthday_modal.widget.dart +++ b/mobile/lib/presentation/widgets/people/person_edit_birthday_modal.widget.dart @@ -4,14 +4,14 @@ import 'package:fluttertoast/fluttertoast.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; import 'package:immich_mobile/domain/models/person.model.dart'; import 'package:immich_mobile/extensions/build_context_extensions.dart'; -import 'package:immich_mobile/extensions/translate_extensions.dart'; +import 'package:immich_mobile/generated/translations.g.dart'; import 'package:immich_mobile/providers/infrastructure/people.provider.dart'; +import 'package:immich_mobile/utils/debug_print.dart'; import 'package:immich_mobile/widgets/common/immich_toast.dart'; import 'package:scroll_date_picker/scroll_date_picker.dart'; -import 'package:immich_mobile/utils/debug_print.dart'; class DriftPersonBirthdayEditForm extends ConsumerStatefulWidget { - final DriftPerson person; + final Person person; const DriftPersonBirthdayEditForm({super.key, required this.person}); @@ -28,24 +28,23 @@ class _DriftPersonNameEditFormState extends ConsumerState saveBirthday() async { try { - final result = await ref.read(driftPeopleServiceProvider).updateBrithday(widget.person.id, _selectedDate); + final result = await ref.read(driftPeopleServiceProvider).updateBirthday(widget.person.id, _selectedDate); - if (result != 0) { - ref.invalidate(driftGetAllPeopleProvider); + if (result != 0 && mounted) { context.pop(_selectedDate); } } catch (error) { dPrint(() => 'Error updating birthday: $error'); - if (!context.mounted) { + if (!mounted) { return; } ImmichToast.show( context: context, - msg: 'scaffold_body_error_occurred'.t(context: context), + msg: context.t.scaffold_body_error_occurred, gravity: ToastGravity.BOTTOM, toastType: ToastType.error, ); @@ -55,16 +54,14 @@ class _DriftPersonNameEditFormState extends ConsumerState context.pop(null), child: Text( - "cancel", + context.t.cancel, style: TextStyle(color: Colors.red[300], fontWeight: FontWeight.bold), - ).tr(), + ), ), TextButton( onPressed: () => saveBirthday(), child: Text( - "save", + context.t.save, style: TextStyle(color: context.primaryColor, fontWeight: FontWeight.bold), - ).tr(), + ), ), ], ); } } + +List? datePickerColumnOrder(String? pattern) { + if (pattern == null) { + return null; + } + final positions = { + DatePickerViewType.year: pattern.indexOf('y'), + DatePickerViewType.month: pattern.indexOf('M'), + DatePickerViewType.day: pattern.indexOf('d'), + }; + if (positions.values.any((position) => position < 0)) { + return null; + } + return positions.keys.toList()..sort((a, b) => positions[a]!.compareTo(positions[b]!)); +} diff --git a/mobile/lib/presentation/widgets/people/person_edit_name_modal.widget.dart b/mobile/lib/presentation/widgets/people/person_edit_name_modal.widget.dart index 6de19000e0..4ae41bc640 100644 --- a/mobile/lib/presentation/widgets/people/person_edit_name_modal.widget.dart +++ b/mobile/lib/presentation/widgets/people/person_edit_name_modal.widget.dart @@ -1,16 +1,15 @@ -import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; import 'package:fluttertoast/fluttertoast.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; import 'package:immich_mobile/domain/models/person.model.dart'; import 'package:immich_mobile/extensions/build_context_extensions.dart'; -import 'package:immich_mobile/extensions/translate_extensions.dart'; +import 'package:immich_mobile/generated/translations.g.dart'; import 'package:immich_mobile/providers/infrastructure/people.provider.dart'; -import 'package:immich_mobile/widgets/common/immich_toast.dart'; import 'package:immich_mobile/utils/debug_print.dart'; +import 'package:immich_mobile/widgets/common/immich_toast.dart'; class DriftPersonNameEditForm extends ConsumerStatefulWidget { - final DriftPerson person; + final Person person; const DriftPersonNameEditForm({super.key, required this.person}); @@ -27,23 +26,22 @@ class _DriftPersonNameEditFormState extends ConsumerState onEdit(String personId, String newName) async { try { final result = await ref.read(driftPeopleServiceProvider).updateName(personId, newName); - if (result != 0) { - ref.invalidate(driftGetAllPeopleProvider); + if (result != 0 && mounted) { context.pop(newName); } } catch (error) { dPrint(() => 'Error updating name: $error'); - if (!context.mounted) { + if (!mounted) { return; } ImmichToast.show( context: context, - msg: 'scaffold_body_error_occurred'.t(context: context), + msg: context.t.scaffold_body_error_occurred, gravity: ToastGravity.BOTTOM, toastType: ToastType.error, ); @@ -53,29 +51,29 @@ class _DriftPersonNameEditFormState extends ConsumerState context.pop(null), child: Text( - "cancel", + context.t.cancel, style: TextStyle(color: Colors.red[300], fontWeight: FontWeight.bold), - ).tr(), + ), ), TextButton( onPressed: () => onEdit(widget.person.id, _formController.text), child: Text( - "save", + context.t.save, style: TextStyle(color: context.primaryColor, fontWeight: FontWeight.bold), - ).tr(), + ), ), ], ); diff --git a/mobile/lib/presentation/widgets/people/person_option_sheet.widget.dart b/mobile/lib/presentation/widgets/people/person_option_sheet.widget.dart index b374d48417..026a28bd7d 100644 --- a/mobile/lib/presentation/widgets/people/person_option_sheet.widget.dart +++ b/mobile/lib/presentation/widgets/people/person_option_sheet.widget.dart @@ -1,8 +1,7 @@ import 'package:flutter/material.dart'; -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:immich_mobile/extensions/translate_extensions.dart'; +import 'package:immich_mobile/generated/translations.g.dart'; -class PersonOptionSheet extends ConsumerWidget { +class PersonOptionSheet extends StatelessWidget { const PersonOptionSheet({super.key, this.onEditName, this.onEditBirthday, this.birthdayExists = false}); final VoidCallback? onEditName; @@ -10,8 +9,8 @@ class PersonOptionSheet extends ConsumerWidget { final bool birthdayExists; @override - Widget build(BuildContext context, WidgetRef ref) { - TextStyle textStyle = Theme.of(context).textTheme.bodyLarge!.copyWith(fontWeight: FontWeight.w600); + Widget build(BuildContext context) { + final TextStyle textStyle = Theme.of(context).textTheme.bodyLarge!.copyWith(fontWeight: FontWeight.w600); return SafeArea( child: Padding( @@ -21,12 +20,12 @@ class PersonOptionSheet extends ConsumerWidget { children: [ ListTile( leading: const Icon(Icons.edit), - title: Text('edit_name'.t(context: context), style: textStyle), + title: Text(context.t.edit_name, style: textStyle), onTap: onEditName, ), ListTile( leading: const Icon(Icons.cake), - title: Text((birthdayExists ? 'edit_birthday' : "add_birthday").t(context: context), style: textStyle), + title: Text(birthdayExists ? context.t.edit_birthday : context.t.add_birthday, style: textStyle), onTap: onEditBirthday, ), ], diff --git a/mobile/lib/presentation/widgets/remote_album/drift_album_option.widget.dart b/mobile/lib/presentation/widgets/remote_album/drift_album_option.widget.dart index 355e1a01a8..dc89a25788 100644 --- a/mobile/lib/presentation/widgets/remote_album/drift_album_option.widget.dart +++ b/mobile/lib/presentation/widgets/remote_album/drift_album_option.widget.dart @@ -1,10 +1,9 @@ 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/translate_extensions.dart'; +import 'package:immich_mobile/generated/translations.g.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/base_action_button.widget.dart'; -class DriftRemoteAlbumOption extends ConsumerWidget { +class DriftRemoteAlbumOption extends StatelessWidget { const DriftRemoteAlbumOption({ super.key, this.onAddPhotos, @@ -31,25 +30,20 @@ class DriftRemoteAlbumOption extends ConsumerWidget { final List? iconShadows; @override - Widget build(BuildContext context, WidgetRef ref) { + Widget build(BuildContext context) { final theme = context.themeData; final menuChildren = []; if (onEditAlbum != null) { menuChildren.add( - BaseActionButton( - label: 'edit_album'.t(context: context), - iconData: Icons.edit, - onPressed: onEditAlbum, - menuItem: true, - ), + BaseActionButton(label: context.t.edit_album, iconData: Icons.edit, onPressed: onEditAlbum, menuItem: true), ); } if (onAddPhotos != null) { menuChildren.add( BaseActionButton( - label: 'add_photos'.t(context: context), + label: context.t.add_photos, iconData: Icons.add_a_photo, onPressed: onAddPhotos, menuItem: true, @@ -60,7 +54,7 @@ class DriftRemoteAlbumOption extends ConsumerWidget { if (onAddUsers != null) { menuChildren.add( BaseActionButton( - label: 'album_viewer_page_share_add_users'.t(context: context), + label: context.t.album_viewer_page_share_add_users, iconData: Icons.group_add, onPressed: onAddUsers, menuItem: true, @@ -71,7 +65,7 @@ class DriftRemoteAlbumOption extends ConsumerWidget { if (onLeaveAlbum != null) { menuChildren.add( BaseActionButton( - label: 'leave_album'.t(context: context), + label: context.t.leave_album, iconData: Icons.person_remove_rounded, onPressed: onLeaveAlbum, menuItem: true, @@ -82,7 +76,7 @@ class DriftRemoteAlbumOption extends ConsumerWidget { if (onToggleAlbumOrder != null) { menuChildren.add( BaseActionButton( - label: 'change_display_order'.t(context: context), + label: context.t.change_display_order, iconData: Icons.swap_vert_rounded, onPressed: onToggleAlbumOrder, menuItem: true, @@ -93,7 +87,7 @@ class DriftRemoteAlbumOption extends ConsumerWidget { if (onCreateSharedLink != null) { menuChildren.add( BaseActionButton( - label: 'create_shared_link'.t(context: context), + label: context.t.create_shared_link, iconData: Icons.link, onPressed: onCreateSharedLink, menuItem: true, @@ -103,12 +97,7 @@ class DriftRemoteAlbumOption extends ConsumerWidget { if (onShowOptions != null) { menuChildren.add( - BaseActionButton( - label: 'options'.t(context: context), - iconData: Icons.settings, - onPressed: onShowOptions, - menuItem: true, - ), + BaseActionButton(label: context.t.options, iconData: Icons.settings, onPressed: onShowOptions, menuItem: true), ); } @@ -116,7 +105,7 @@ class DriftRemoteAlbumOption extends ConsumerWidget { menuChildren.add(const Divider(height: 1)); menuChildren.add( BaseActionButton( - label: 'delete_album'.t(context: context), + label: context.t.delete_album, iconData: Icons.delete, iconColor: context.isDarkTheme ? Colors.red[400] : Colors.red[800], onPressed: onDeleteAlbum, diff --git a/mobile/lib/presentation/widgets/search/quick_date_picker.dart b/mobile/lib/presentation/widgets/search/quick_date_picker.dart index e8bf3c5a43..97ea163be8 100644 --- a/mobile/lib/presentation/widgets/search/quick_date_picker.dart +++ b/mobile/lib/presentation/widgets/search/quick_date_picker.dart @@ -1,7 +1,7 @@ -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'; +import 'package:immich_mobile/generated/translations.g.dart'; +import 'package:intl/intl.dart'; sealed class DateFilterInputModel { DateTimeRange asDateTimeRange(); @@ -13,12 +13,9 @@ sealed class DateFilterInputModel { 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()), - }, + return context.t.search_filter_date_interval( + start: DateFormat.yMMMd().format(date.start.toLocal()), + end: DateFormat.yMMMd().format(date.end.toLocal()), ); } } @@ -38,7 +35,7 @@ class RecentMonthRangeFilter extends DateFilterInputModel { @override String asHumanReadable(BuildContext context) { - return 'last_months'.t(context: context, args: {"count": monthDelta.toString()}); + return context.t.last_months(count: monthDelta); } } @@ -62,7 +59,7 @@ class YearFilter extends DateFilterInputModel { @override String asHumanReadable(BuildContext context) { - return 'in_year'.tr(namedArgs: {"year": year.toString()}); + return context.t.in_year(year: year); } } @@ -121,14 +118,13 @@ class QuickDatePicker extends HookWidget { return null; } - Text _monthLabel(BuildContext context, int monthsFromNow) => - const Text('last_months').t(context: context, args: {"count": monthsFromNow.toString()}); + Text _monthLabel(BuildContext context, int monthsFromNow) => Text(context.t.last_months(count: monthsFromNow)); Widget _yearPicker(BuildContext context) { final size = MediaQuery.of(context).size; return Row( children: [ - const Text("in_year_selector").tr(), + Text(context.t.in_year_selector), const SizedBox(width: 15), Expanded( child: DropdownMenu( @@ -158,7 +154,7 @@ class QuickDatePicker extends HookWidget { child: IgnorePointer( ignoring: true, child: RadioListTile( - title: const Text('pick_custom_range').tr(), + title: Text(context.t.pick_custom_range), subtitle: hasPreviousInput ? Text(currentInput!.asHumanReadable(context)) : null, secondary: hasPreviousInput ? const Icon(Icons.edit) : null, value: _QuickPickerType.custom, diff --git a/mobile/lib/presentation/widgets/timeline/constants.dart b/mobile/lib/presentation/widgets/timeline/constants.dart index 84892c79f7..86c44d4a7f 100644 --- a/mobile/lib/presentation/widgets/timeline/constants.dart +++ b/mobile/lib/presentation/widgets/timeline/constants.dart @@ -9,5 +9,5 @@ const double kScrubberThumbHeight = 48.0; const Duration kTimelineScrubberFadeInDuration = Duration(milliseconds: 300); const Duration kTimelineScrubberFadeOutDuration = Duration(milliseconds: 800); -const Size kThumbnailResolution = Size.square(320); // TODO: make the resolution vary based on actual tile size +const Size kThumbnailResolution = Size.square(320); const kThumbnailDiskCacheSize = 1024 << 20; // 1GiB diff --git a/mobile/lib/presentation/widgets/timeline/fixed/segment.model.dart b/mobile/lib/presentation/widgets/timeline/fixed/segment.model.dart index 7712983fde..32bbffa95e 100644 --- a/mobile/lib/presentation/widgets/timeline/fixed/segment.model.dart +++ b/mobile/lib/presentation/widgets/timeline/fixed/segment.model.dart @@ -107,7 +107,7 @@ class _FixedSegmentRow extends ConsumerWidget { @override Widget build(BuildContext context, WidgetRef ref) { final isScrubbing = ref.watch(timelineStateProvider.select((s) => s.isScrubbing)); - final timelineService = ref.read(timelineServiceProvider); + final timelineService = ref.watch(timelineServiceProvider); final isDynamicLayout = columnCount <= (context.isMobile ? 2 : 3); if (timelineService.hasRange(assetIndex, assetCount)) { @@ -144,19 +144,6 @@ class _FixedSegmentRow extends ConsumerWidget { TimelineService timelineService, bool isDynamicLayout, ) { - final children = [ - for (int i = 0; i < assets.length; i++) - TimelineAssetIndexWrapper( - assetIndex: assetIndex + i, - segmentIndex: 0, // For simplicity, using 0 for now - child: _AssetTileWidget( - key: ValueKey(Object.hash(assets[i].heroTag, assetIndex + i, timelineService.hashCode)), - asset: assets[i], - assetIndex: assetIndex + i, - ), - ), - ]; - final widths = List.filled(assets.length, tileHeight); if (isDynamicLayout) { @@ -186,6 +173,20 @@ class _FixedSegmentRow extends ConsumerWidget { } } + final children = [ + for (int i = 0; i < assets.length; i++) + TimelineAssetIndexWrapper( + assetIndex: assetIndex + i, + segmentIndex: 0, // For simplicity, using 0 for now + child: _AssetTileWidget( + key: ValueKey(Object.hash(assets[i].heroTag, assetIndex + i, timelineService.hashCode)), + asset: assets[i], + assetIndex: assetIndex + i, + size: Size(widths[i], tileHeight), + ), + ), + ]; + return TimelineDragRegion( child: TimelineRow( height: tileHeight, @@ -201,18 +202,30 @@ class _FixedSegmentRow extends ConsumerWidget { class _AssetTileWidget extends ConsumerWidget { final BaseAsset asset; final int assetIndex; + final Size size; - const _AssetTileWidget({super.key, required this.asset, required this.assetIndex}); + const _AssetTileWidget({super.key, required this.asset, required this.assetIndex, required this.size}); - Future _handleOnTap(BuildContext ctx, WidgetRef ref, int assetIndex, BaseAsset asset, int? heroOffset) async { + Future _handleOnTap( + BuildContext ctx, + WidgetRef ref, + int assetIndex, + BaseAsset asset, + int? heroOffset, + Size remoteSize, + ) async { final multiSelectState = ref.read(multiSelectProvider); if (multiSelectState.forceEnable || multiSelectState.isEnabled) { ref.read(multiSelectProvider.notifier).toggleAssetSelection(asset); } else { await ref.read(timelineServiceProvider).loadAssets(assetIndex, 1); + if (!ctx.mounted) { + return; + } + ref.read(isPlayingMotionVideoProvider.notifier).playing = false; - AssetViewer.setAsset(ref, asset); + AssetViewer.setAsset(ref, asset, thumbnailSize: remoteSize); unawaited( ctx.pushRoute( AssetViewerRoute( @@ -252,19 +265,22 @@ class _AssetTileWidget extends ConsumerWidget { @override Widget build(BuildContext context, WidgetRef ref) { + final remoteSize = size * MediaQuery.devicePixelRatioOf(context); + final heroOffset = TabsRouterScope.of(context)?.controller.activeIndex ?? 0; final lockSelection = _getLockSelectionStatus(ref); final showStorageIndicator = ref.watch(timelineArgsProvider.select((args) => args.showStorageIndicator)); final isReadonlyModeEnabled = ref.watch(readonlyModeProvider); - final showStackIndicator = ref.read(timelineServiceProvider).origin != TimelineOrigin.trash; + final showStackIndicator = ref.watch(timelineServiceProvider).origin != TimelineOrigin.trash; return RepaintBoundary( child: GestureDetector( - onTap: () => lockSelection ? null : _handleOnTap(context, ref, assetIndex, asset, heroOffset), + onTap: () => lockSelection ? null : _handleOnTap(context, ref, assetIndex, asset, heroOffset, remoteSize), onLongPress: () => lockSelection || isReadonlyModeEnabled ? null : _handleOnLongPress(ref, asset), child: ThumbnailTile( asset, + remoteSize: remoteSize, lockSelection: lockSelection, showStorageIndicator: showStorageIndicator, showStackIndicator: showStackIndicator, diff --git a/mobile/lib/presentation/widgets/timeline/header.widget.dart b/mobile/lib/presentation/widgets/timeline/header.widget.dart index 3eff305251..433118d13c 100644 --- a/mobile/lib/presentation/widgets/timeline/header.widget.dart +++ b/mobile/lib/presentation/widgets/timeline/header.widget.dart @@ -1,16 +1,19 @@ +import 'dart:async'; + import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; +import 'package:flutter_hooks/flutter_hooks.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; import 'package:immich_mobile/domain/models/asset/base_asset.model.dart'; import 'package:immich_mobile/domain/models/timeline.model.dart'; import 'package:immich_mobile/extensions/build_context_extensions.dart'; import 'package:immich_mobile/extensions/theme_extensions.dart'; import 'package:immich_mobile/providers/haptic_feedback.provider.dart'; -import 'package:immich_mobile/providers/infrastructure/timeline.provider.dart'; import 'package:immich_mobile/providers/infrastructure/readonly_mode.provider.dart'; +import 'package:immich_mobile/providers/infrastructure/timeline.provider.dart'; import 'package:immich_mobile/providers/timeline/multiselect.provider.dart'; -class TimelineHeader extends HookConsumerWidget { +class TimelineHeader extends HookWidget { final Bucket bucket; final HeaderType header; final double height; @@ -37,7 +40,7 @@ class TimelineHeader extends HookConsumerWidget { } @override - Widget build(BuildContext context, WidgetRef ref) { + Widget build(BuildContext context) { if (bucket is! TimeBucket || header == HeaderType.none) { return const SizedBox.shrink(); } @@ -105,7 +108,7 @@ class _BulkSelectIconButton extends ConsumerWidget { ? const SizedBox.shrink() : IconButton( onPressed: () { - ref.read(multiSelectProvider.notifier).toggleBucketSelection(assetOffset, bucket.assetCount); + unawaited(ref.read(multiSelectProvider.notifier).toggleBucketSelection(assetOffset, bucket.assetCount)); ref.read(hapticFeedbackProvider.notifier).heavyImpact(); }, icon: isAllSelected diff --git a/mobile/lib/presentation/widgets/timeline/scrubber.widget.dart b/mobile/lib/presentation/widgets/timeline/scrubber.widget.dart index 27f523a2a8..a2298313ac 100644 --- a/mobile/lib/presentation/widgets/timeline/scrubber.widget.dart +++ b/mobile/lib/presentation/widgets/timeline/scrubber.widget.dart @@ -38,7 +38,6 @@ class Scrubber extends ConsumerStatefulWidget { Scrubber({ super.key, - Key? scrollThumbKey, required this.layoutSegments, required this.timelineHeight, this.topPadding = 0, @@ -152,7 +151,7 @@ class ScrubberState extends ConsumerState with TickerProviderStateMixi void _resetThumbTimer() { _fadeOutTimer?.cancel(); _fadeOutTimer = Timer(kTimelineScrubberFadeOutDuration, () { - _thumbAnimationController.reverse(); + unawaited(_thumbAnimationController.reverse()); _fadeOutTimer = null; }); } @@ -177,10 +176,10 @@ class ScrubberState extends ConsumerState with TickerProviderStateMixi if (notification is ScrollUpdateNotification) { _thumbTopOffset = _currentOffset; if (_labelAnimation.status != AnimationStatus.reverse) { - _labelAnimationController.reverse(); + unawaited(_labelAnimationController.reverse()); } if (_thumbAnimationController.status != AnimationStatus.forward) { - _thumbAnimationController.forward(); + unawaited(_thumbAnimationController.forward()); } } _resetThumbTimer(); @@ -210,7 +209,7 @@ class ScrubberState extends ConsumerState with TickerProviderStateMixi void _onDragStart(DragStartDetails _) { setState(() { _isDragging = true; - _labelAnimationController.forward(); + unawaited(_labelAnimationController.forward()); _fadeOutTimer?.cancel(); _lastLabel = null; }); @@ -226,7 +225,7 @@ class ScrubberState extends ConsumerState with TickerProviderStateMixi } if (_thumbAnimationController.status != AnimationStatus.forward) { - _thumbAnimationController.forward(); + unawaited(_thumbAnimationController.forward()); } final dragPosition = _calculateDragPosition(details); @@ -344,7 +343,7 @@ class ScrubberState extends ConsumerState with TickerProviderStateMixi } void _onDragEnd(DragEndDetails _) { - _labelAnimationController.reverse(); + unawaited(_labelAnimationController.reverse()); setState(() { _isDragging = false; }); @@ -590,7 +589,7 @@ class _SlideFadeTransition extends StatelessWidget { animation: _animation, builder: (context, child) => _animation.value == 0.0 ? const SizedBox() : child!, child: SlideTransition( - position: Tween(begin: const Offset(0.3, 0.0), end: const Offset(0.0, 0.0)).animate(_animation), + position: Tween(begin: const Offset(0.3, 0.0), end: Offset.zero).animate(_animation), child: FadeTransition(opacity: _animation, child: _child), ), ); diff --git a/mobile/lib/presentation/widgets/timeline/timeline.state.dart b/mobile/lib/presentation/widgets/timeline/timeline.state.dart index 8dd87f9868..adad06b987 100644 --- a/mobile/lib/presentation/widgets/timeline/timeline.state.dart +++ b/mobile/lib/presentation/widgets/timeline/timeline.state.dart @@ -1,5 +1,7 @@ import 'dart:math' as math; +import 'package:flutter/foundation.dart'; +import 'package:freezed_annotation/freezed_annotation.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; import 'package:immich_mobile/domain/models/timeline.model.dart'; import 'package:immich_mobile/presentation/widgets/timeline/constants.dart'; @@ -8,66 +10,28 @@ import 'package:immich_mobile/presentation/widgets/timeline/segment.model.dart'; import 'package:immich_mobile/providers/infrastructure/settings.provider.dart'; import 'package:immich_mobile/providers/infrastructure/timeline.provider.dart'; -class TimelineArgs { - final double maxWidth; - final double maxHeight; - final double spacing; - final int columnCount; - final bool showStorageIndicator; - final bool withStack; - final GroupAssetsBy? groupBy; +part 'timeline.state.freezed.dart'; - const TimelineArgs({ - required this.maxWidth, - required this.maxHeight, - this.spacing = kTimelineSpacing, - this.columnCount = kTimelineColumnCount, - this.showStorageIndicator = false, - this.withStack = false, - this.groupBy, - }); - - @override - bool operator ==(covariant TimelineArgs other) { - return spacing == other.spacing && - maxWidth == other.maxWidth && - maxHeight == other.maxHeight && - columnCount == other.columnCount && - showStorageIndicator == other.showStorageIndicator && - withStack == other.withStack && - groupBy == other.groupBy; - } - - @override - int get hashCode => - maxWidth.hashCode ^ - maxHeight.hashCode ^ - spacing.hashCode ^ - columnCount.hashCode ^ - showStorageIndicator.hashCode ^ - withStack.hashCode ^ - groupBy.hashCode; +@freezed +abstract class TimelineArgs with _$TimelineArgs { + const factory TimelineArgs({ + required double maxWidth, + required double maxHeight, + @Default(kTimelineSpacing) double spacing, + @Default(kTimelineColumnCount) int columnCount, + @Default(false) bool showStorageIndicator, + @Default(false) bool withStack, + GroupAssetsBy? groupBy, + }) = _TimelineArgs; } -class TimelineState { - final bool isScrubbing; - final bool isScrolling; +@freezed +abstract class TimelineState with _$TimelineState { + const TimelineState._(); - const TimelineState({this.isScrubbing = false, this.isScrolling = false}); + const factory TimelineState({@Default(false) bool isScrubbing, @Default(false) bool isScrolling}) = _TimelineState; bool get isInteracting => isScrubbing || isScrolling; - - @override - bool operator ==(covariant TimelineState other) { - return isScrubbing == other.isScrubbing && isScrolling == other.isScrolling; - } - - @override - int get hashCode => isScrubbing.hashCode ^ isScrolling.hashCode; - - TimelineState copyWith({bool? isScrubbing, bool? isScrolling}) { - return TimelineState(isScrubbing: isScrubbing ?? this.isScrubbing, isScrolling: isScrolling ?? this.isScrolling); - } } class TimelineStateNotifier extends Notifier { @@ -86,13 +50,14 @@ class TimelineStateNotifier extends Notifier { // This provider watches the buckets from the timeline service & args and serves the segments. // It should be used only after the timeline service and timeline args provider is overridden final timelineSegmentProvider = StreamProvider.autoDispose>((ref) async* { - final args = ref.watch(timelineArgsProvider); - final columnCount = args.columnCount; - final spacing = args.spacing; - final availableTileWidth = args.maxWidth - (spacing * (columnCount - 1)); + // maxHeight is left out on purpose, a height-only change must not restart the bucket stream + final (maxWidth, columnCount, spacing, groupByArg) = ref.watch( + timelineArgsProvider.select((args) => (args.maxWidth, args.columnCount, args.spacing, args.groupBy)), + ); + final availableTileWidth = maxWidth - (spacing * (columnCount - 1)); final tileExtent = math.max(0, availableTileWidth) / columnCount; - final groupBy = args.groupBy ?? ref.watch(appConfigProvider.select((config) => config.timeline.groupAssetsBy)); + final groupBy = groupByArg ?? ref.watch(appConfigProvider.select((config) => config.timeline.groupAssetsBy)); final timelineService = ref.watch(timelineServiceProvider); yield* timelineService.watchBuckets().map((buckets) { diff --git a/mobile/lib/presentation/widgets/timeline/timeline.widget.dart b/mobile/lib/presentation/widgets/timeline/timeline.widget.dart index 8acaebf40e..0387cbf597 100644 --- a/mobile/lib/presentation/widgets/timeline/timeline.widget.dart +++ b/mobile/lib/presentation/widgets/timeline/timeline.widget.dart @@ -2,6 +2,7 @@ import 'dart:async'; import 'dart:collection'; import 'dart:math' as math; +import 'package:auto_route/auto_route.dart'; import 'package:collection/collection.dart'; import 'package:flutter/foundation.dart'; import 'package:flutter/gestures.dart'; @@ -25,11 +26,12 @@ import 'package:immich_mobile/providers/infrastructure/readonly_mode.provider.da import 'package:immich_mobile/providers/infrastructure/settings.provider.dart'; import 'package:immich_mobile/providers/infrastructure/timeline.provider.dart'; import 'package:immich_mobile/providers/timeline/multiselect.provider.dart'; +import 'package:immich_mobile/routing/app_navigation_observer.dart'; import 'package:immich_mobile/widgets/common/immich_sliver_app_bar.dart'; import 'package:immich_mobile/widgets/common/mesmerizing_sliver_app_bar.dart'; import 'package:immich_mobile/widgets/common/selection_sliver_app_bar.dart'; -class Timeline extends StatelessWidget { +class Timeline extends ConsumerWidget { const Timeline({ super.key, this.topSliverWidget, @@ -62,35 +64,40 @@ class Timeline extends StatelessWidget { final Widget? loadingWidget; @override - Widget build(BuildContext context) { + Widget build(BuildContext context, WidgetRef ref) { + final columnCount = ref.watch(appConfigProvider.select((config) => config.timeline.tilesPerRow)); return LayoutBuilder( - builder: (_, constraints) => ProviderScope( - overrides: [ - timelineArgsProvider.overrideWith( - (ref) => TimelineArgs( - maxWidth: constraints.maxWidth, - maxHeight: constraints.maxHeight, - columnCount: ref.watch(appConfigProvider.select((config) => config.timeline.tilesPerRow)), - showStorageIndicator: showStorageIndicator, - withStack: withStack, - groupBy: groupBy, + builder: (_, constraints) { + return ProviderScope( + overrides: [ + // overrideWithValue keeps the scoped args in sync with the latest constraints on rebuilds, + // a function override would stay locked to the first frame's constraints for the whole session + timelineArgsProvider.overrideWithValue( + TimelineArgs( + maxWidth: constraints.maxWidth, + maxHeight: constraints.maxHeight, + columnCount: columnCount, + showStorageIndicator: showStorageIndicator, + withStack: withStack, + groupBy: groupBy, + ), ), + if (readOnly) readonlyModeProvider.overrideWith(() => _AlwaysReadOnlyNotifier()), + ], + child: _SliverTimeline( + topSliverWidget: topSliverWidget, + topSliverWidgetHeight: topSliverWidgetHeight, + bottomSliverWidget: bottomSliverWidget, + appBar: appBar, + bottomSheet: bottomSheet, + withScrubber: withScrubber, + persistentBottomBar: persistentBottomBar, + snapToMonth: snapToMonth, + maxWidth: constraints.maxWidth, + loadingWidget: loadingWidget, ), - if (readOnly) readonlyModeProvider.overrideWith(() => _AlwaysReadOnlyNotifier()), - ], - child: _SliverTimeline( - topSliverWidget: topSliverWidget, - topSliverWidgetHeight: topSliverWidgetHeight, - bottomSliverWidget: bottomSliverWidget, - appBar: appBar, - bottomSheet: bottomSheet, - withScrubber: withScrubber, - persistentBottomBar: persistentBottomBar, - snapToMonth: snapToMonth, - maxWidth: constraints.maxWidth, - loadingWidget: loadingWidget, - ), - ), + ); + }, ); } } @@ -135,7 +142,7 @@ class _SliverTimeline extends ConsumerStatefulWidget { ConsumerState createState() => _SliverTimelineState(); } -class _SliverTimelineState extends ConsumerState<_SliverTimeline> { +class _SliverTimelineState extends ConsumerState<_SliverTimeline> with WidgetsBindingObserver { late final ScrollController _scrollController; StreamSubscription? _eventSubscription; @@ -153,6 +160,7 @@ class _SliverTimelineState extends ConsumerState<_SliverTimeline> { @override void initState() { super.initState(); + WidgetsBinding.instance.addObserver(this); _scrollController = ScrollController(onAttach: _restoreAssetPosition); _eventSubscription = EventStream.shared.listen(_onEvent); @@ -168,28 +176,38 @@ class _SliverTimelineState extends ConsumerState<_SliverTimeline> { void didUpdateWidget(covariant _SliverTimeline oldWidget) { super.didUpdateWidget(oldWidget); if (widget.maxWidth != oldWidget.maxWidth) { - final asyncSegments = ref.read(timelineSegmentProvider); - asyncSegments.whenData((segments) { - final index = _getCurrentAssetIndex(segments); - // Refresh to wait for new segments to be generated with the updated width before restoring the scroll position - final _ = ref.refresh(timelineArgsProvider); - _restoreAssetIndex = index; - }); + // The updated args already regenerate the segments, only remember the scroll position to restore it afterwards + final segments = ref.read(timelineSegmentProvider).valueOrNull; + if (segments != null && _scrollController.hasClients) { + _restoreAssetIndex = _getCurrentAssetIndex(segments); + } + } + } + + // Capture iOS status bar tap + @override + void handleStatusBarTap() { + // Routes may be pushed non-opaquely on top of the timeline (such as the asset viewer), or the timeline + // may be in a background tab. In either case, `handleStatusBarTap()` still fires + // Make sure the timeline is the primary route before scrolling to the top + final routeData = context.findAncestorWidgetOfExactType()?.routeData; + // The tap is generated async, so it can arrive after a route pop has started (due to a back button or similar) + // Check if route is alive and not exiting before taking action + final observers = Navigator.maybeOf(context)?.widget.observers ?? const []; + final isRouteTransitioning = observers.whereType().any( + (observer) => observer.hasTransitioningRoute, + ); + + if (ModalRoute.of(context)?.isCurrent == true && routeData?.isActive == true && !isRouteTransitioning) { + _scrollToTop(); } } void _onEvent(Event event) { switch (event) { case ScrollToTopEvent(): - { - final timelineState = ref.read(timelineStateProvider.notifier); - timelineState.setScrubbing(true); - _scrollController - .animateTo(0, duration: const Duration(milliseconds: 250), curve: Curves.easeInOut) - .whenComplete(() => timelineState.setScrubbing(false)); - } - - case ScrollToDateEvent scrollToDateEvent: + _scrollToTop(); + case final ScrollToDateEvent scrollToDateEvent: _scrollToDate(scrollToDateEvent.date); case TimelineReloadEvent(): setState(() {}); @@ -246,11 +264,26 @@ class _SliverTimelineState extends ConsumerState<_SliverTimeline> { @override void dispose() { + WidgetsBinding.instance.removeObserver(this); _scrollController.dispose(); - _eventSubscription?.cancel(); + unawaited(_eventSubscription?.cancel()); super.dispose(); } + void _scrollToTop() { + if (!_scrollController.hasClients) { + return; + } + + final timelineState = ref.read(timelineStateProvider.notifier); + timelineState.setScrubbing(true); + unawaited( + _scrollController + .animateTo(0, duration: const Duration(milliseconds: 250), curve: Curves.easeInOut) + .whenComplete(() => timelineState.setScrubbing(false)), + ); + } + void _scrollToDate(DateTime date) { final timelineState = ref.read(timelineStateProvider.notifier); final asyncSegments = ref.read(timelineSegmentProvider); @@ -280,13 +313,15 @@ class _SliverTimelineState extends ConsumerState<_SliverTimeline> { // Scroll to the segment with a small offset to show the header final targetOffset = fallbackSegment.startOffset - 50; timelineState.setScrubbing(true); - _scrollController - .animateTo( - targetOffset.clamp(0.0, _scrollController.position.maxScrollExtent), - duration: const Duration(milliseconds: 500), - curve: Curves.easeInOut, - ) - .whenComplete(() => timelineState.setScrubbing(false)); + unawaited( + _scrollController + .animateTo( + targetOffset.clamp(0.0, _scrollController.position.maxScrollExtent), + duration: const Duration(milliseconds: 500), + curve: Curves.easeInOut, + ) + .whenComplete(() => timelineState.setScrubbing(false)), + ); } else { timelineState.setScrubbing(false); } @@ -321,8 +356,8 @@ class _SliverTimelineState extends ConsumerState<_SliverTimeline> { }); } - void _dragScroll(ScrollDirection direction) { - _scrollController.animateTo( + Future _dragScroll(ScrollDirection direction) { + return _scrollController.animateTo( _scrollController.offset + (direction == ScrollDirection.forward ? 175 : -175), duration: const Duration(milliseconds: 125), curve: Curves.easeOut, @@ -373,7 +408,7 @@ class _SliverTimelineState extends ConsumerState<_SliverTimeline> { return PopScope( canPop: !isMultiSelectEnabled, - onPopInvokedWithResult: (_, __) { + onPopInvokedWithResult: (_, _) { if (isMultiSelectEnabled) { ref.read(multiSelectProvider.notifier).reset(); } @@ -381,6 +416,9 @@ class _SliverTimelineState extends ConsumerState<_SliverTimeline> { child: PrimaryScrollController( controller: _scrollController, child: Scaffold( + // This removes the built in Scaffold `handleStatusBarTap` implementation, preventing duplicate + // events when we provide our own + primary: false, resizeToAvoidBottomInset: false, floatingActionButton: const DownloadStatusFloatingButton(), body: asyncSegments.widgetWhen( @@ -462,7 +500,7 @@ class _SliverTimelineState extends ConsumerState<_SliverTimeline> { _restoreAssetIndex = targetAssetIndex; }); - ref.read(settingsProvider).write(.timelineTilesPerRow, _perRow); + unawaited(ref.read(settingsProvider).write(.timelineTilesPerRow, _perRow)); } }; }, @@ -472,7 +510,7 @@ class _SliverTimelineState extends ConsumerState<_SliverTimeline> { onStart: !isReadonlyModeEnabled ? _setDragStartIndex : null, onAssetEnter: _handleDragAssetEnter, onEnd: !isReadonlyModeEnabled ? _stopDrag : null, - onScroll: _dragScroll, + onScroll: (direction) => unawaited(_dragScroll(direction)), onScrollStart: () { // Minimize the bottom sheet when drag selection starts ref.read(timelineStateProvider.notifier).setScrolling(true); diff --git a/mobile/lib/presentation/widgets/timeline/timeline_drag_region.dart b/mobile/lib/presentation/widgets/timeline/timeline_drag_region.dart index 9ffcc3b23b..892d0c6102 100644 --- a/mobile/lib/presentation/widgets/timeline/timeline_drag_region.dart +++ b/mobile/lib/presentation/widgets/timeline/timeline_drag_region.dart @@ -4,6 +4,9 @@ import 'package:collection/collection.dart'; import 'package:flutter/gestures.dart'; import 'package:flutter/material.dart'; import 'package:flutter/rendering.dart'; +import 'package:freezed_annotation/freezed_annotation.dart'; + +part 'timeline_drag_region.freezed.dart'; class TimelineDragRegion extends StatefulWidget { final Widget child; @@ -206,21 +209,7 @@ class _TimelineAssetIndexProxy extends RenderProxyBox { _TimelineAssetIndexProxy({required this.index}); } -class TimelineAssetIndex { - final int assetIndex; - final int segmentIndex; - - const TimelineAssetIndex({required this.assetIndex, required this.segmentIndex}); - - @override - bool operator ==(covariant TimelineAssetIndex other) { - if (identical(this, other)) { - return true; - } - - return other.assetIndex == assetIndex && other.segmentIndex == segmentIndex; - } - - @override - int get hashCode => assetIndex.hashCode ^ segmentIndex.hashCode; +@freezed +abstract class TimelineAssetIndex with _$TimelineAssetIndex { + const factory TimelineAssetIndex({required int assetIndex, required int segmentIndex}) = _TimelineAssetIndex; } diff --git a/mobile/lib/providers/album/album_sort_by_options.provider.dart b/mobile/lib/providers/album/album_sort_by_options.provider.dart index ec4ae71d03..015a846de8 100644 --- a/mobile/lib/providers/album/album_sort_by_options.provider.dart +++ b/mobile/lib/providers/album/album_sort_by_options.provider.dart @@ -1,19 +1,28 @@ import 'package:immich_mobile/constants/enums.dart'; +import 'package:immich_mobile/generated/translations.g.dart'; // Store index allows us to re-arrange the values without affecting the saved prefs enum AlbumSortMode { - title(1, "library_page_sort_title", SortOrder.asc), - assetCount(4, "library_page_sort_asset_count", SortOrder.desc), - lastModified(3, "library_page_sort_last_modified", SortOrder.desc), - created(0, "library_page_sort_created", SortOrder.desc), - mostRecent(2, "sort_recent", SortOrder.desc), - mostOldest(5, "sort_oldest", SortOrder.asc); + title(1, SortOrder.asc), + assetCount(4, SortOrder.desc), + lastModified(3, SortOrder.desc), + created(0, SortOrder.desc), + mostRecent(2, SortOrder.desc), + mostOldest(5, SortOrder.asc); final int storeIndex; - final String label; final SortOrder defaultOrder; - const AlbumSortMode(this.storeIndex, this.label, this.defaultOrder); + const AlbumSortMode(this.storeIndex, this.defaultOrder); + + String label(Translations t) => switch (this) { + AlbumSortMode.title => t.library_page_sort_title, + AlbumSortMode.assetCount => t.library_page_sort_asset_count, + AlbumSortMode.lastModified => t.library_page_sort_last_modified, + AlbumSortMode.created => t.library_page_sort_created, + AlbumSortMode.mostRecent => t.sort_recent, + AlbumSortMode.mostOldest => t.sort_oldest, + }; SortOrder effectiveOrder(bool isReverse) => isReverse ? defaultOrder.reverse() : defaultOrder; } diff --git a/mobile/lib/providers/album/album_title.provider.dart b/mobile/lib/providers/album/album_title.provider.dart index bf812a01d8..b38c2929fb 100644 --- a/mobile/lib/providers/album/album_title.provider.dart +++ b/mobile/lib/providers/album/album_title.provider.dart @@ -3,11 +3,11 @@ import 'package:hooks_riverpod/hooks_riverpod.dart'; class AlbumTitleNotifier extends StateNotifier { AlbumTitleNotifier() : super(""); - setAlbumTitle(String title) { + void setAlbumTitle(String title) { state = title; } - clearAlbumTitle() { + void clearAlbumTitle() { state = ""; } } diff --git a/mobile/lib/providers/album/current_album.provider.g.dart b/mobile/lib/providers/album/current_album.provider.g.dart deleted file mode 100644 index b6d079231f..0000000000 --- a/mobile/lib/providers/album/current_album.provider.g.dart +++ /dev/null @@ -1,26 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'current_album.provider.dart'; - -// ************************************************************************** -// RiverpodGenerator -// ************************************************************************** - -String _$currentAlbumHash() => r'61f00273d6b69da45add1532cc3d3a076ee55110'; - -/// See also [CurrentAlbum]. -@ProviderFor(CurrentAlbum) -final currentAlbumProvider = - AutoDisposeNotifierProvider.internal( - CurrentAlbum.new, - name: r'currentAlbumProvider', - debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product') - ? null - : _$currentAlbumHash, - dependencies: null, - allTransitiveDependencies: null, - ); - -typedef _$CurrentAlbum = AutoDisposeNotifier; -// ignore_for_file: type=lint -// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member, deprecated_member_use_from_same_package diff --git a/mobile/lib/providers/app_life_cycle.provider.dart b/mobile/lib/providers/app_life_cycle.provider.dart index ad0940b776..f369a37142 100644 --- a/mobile/lib/providers/app_life_cycle.provider.dart +++ b/mobile/lib/providers/app_life_cycle.provider.dart @@ -35,7 +35,7 @@ class AppLifeCycleNotifier extends StateNotifier { return state; } - void handleAppResume() async { + Future handleAppResume() async { state = AppLifeCycleEnum.resumed; // Prevent overlapping resume operations @@ -81,6 +81,10 @@ class AppLifeCycleNotifier extends StateNotifier { await _ref.read(serverInfoProvider.notifier).getServerVersion(); } + if (!_shouldContinueOperation()) { + _wasPaused = true; + return; + } _ref.read(websocketProvider.notifier).connect(); await _handleBetaTimelineResume(); @@ -89,13 +93,13 @@ class AppLifeCycleNotifier extends StateNotifier { await _ref.read(galleryPermissionNotifier.notifier).getGalleryPermissionStatus(); } - Future _safeRun(Future action, String debugName) async { + Future _safeRun(Future Function() action, String debugName) async { if (!_shouldContinueOperation()) { return; } try { - await action; + await action(); } catch (e, stackTrace) { _log.warning("Error during $debugName operation", e, stackTrace); } @@ -108,30 +112,38 @@ class AppLifeCycleNotifier extends StateNotifier { await Future.delayed(const Duration(milliseconds: 500)); final backgroundManager = _ref.read(backgroundSyncProvider); + + // Drop any sync that froze mid-flight while the app was suspended so resume + // starts fresh instead of awaiting the stale task (#28082). cancelResumeSyncs + // clears the task refs synchronously, so the syncs below see a clean slate. + unawaited(backgroundManager.cancelResumeSyncs()); + final isAlbumLinkedSyncEnable = _ref.read(appConfigProvider).backup.syncAlbums; try { bool syncSuccess = false; await Future.wait([ - _safeRun(backgroundManager.syncLocal(full: CurrentPlatform.isAndroid ? true : false), "syncLocal"), - _safeRun(backgroundManager.syncRemote().then((success) => syncSuccess = success), "syncRemote"), + _safeRun(() => backgroundManager.syncLocal(full: CurrentPlatform.isAndroid), "syncLocal"), + _safeRun(() async { + syncSuccess = await backgroundManager.syncRemote(); + }, "syncRemote"), ]); _ref.invalidate(driftMemoryFutureProvider); if (syncSuccess) { await Future.wait([ - _safeRun(backgroundManager.hashAssets(), "hashAssets").then((_) { - _resumeBackup(); + _safeRun(backgroundManager.hashAssets, "hashAssets").then((_) { + unawaited(_resumeBackup()); }), _resumeBackup(), // TODO: Bring back when the soft freeze issue is addressed // _safeRun(backgroundManager.syncCloudIds(), "syncCloudIds"), ]); } else { - await _safeRun(backgroundManager.hashAssets(), "hashAssets"); + await _safeRun(backgroundManager.hashAssets, "hashAssets"); } if (isAlbumLinkedSyncEnable) { - await _safeRun(backgroundManager.syncLinkedAlbum(), "syncLinkedAlbum"); + await _safeRun(backgroundManager.syncLinkedAlbum, "syncLinkedAlbum"); } } catch (e, stackTrace) { _log.severe("Error during background sync", e, stackTrace); @@ -145,7 +157,7 @@ class AppLifeCycleNotifier extends StateNotifier { final currentUser = Store.tryGet(StoreKey.currentUser); if (currentUser != null) { await _safeRun( - _ref.read(driftBackupProvider.notifier).startForegroundBackup(currentUser.id), + () => _ref.read(driftBackupProvider.notifier).startForegroundBackup(currentUser.id), "handleBackupResume", ); } @@ -195,7 +207,7 @@ class AppLifeCycleNotifier extends StateNotifier { Future _performPause() { if (_ref.read(authProvider).isAuthenticated) { - _ref.read(driftBackupProvider.notifier).stopForegroundBackup(); + _ref.read(driftBackupProvider.notifier).stopForegroundBackup(reason: "the app being sent to the background"); _ref.read(websocketProvider.notifier).disconnect(); } diff --git a/mobile/lib/providers/asset_viewer/asset_viewer.provider.dart b/mobile/lib/providers/asset_viewer/asset_viewer.provider.dart index 6808860ffc..fd7fbebe36 100644 --- a/mobile/lib/providers/asset_viewer/asset_viewer.provider.dart +++ b/mobile/lib/providers/asset_viewer/asset_viewer.provider.dart @@ -1,81 +1,29 @@ import 'dart:async'; +import 'dart:ui'; +import 'package:flutter/foundation.dart'; +import 'package:freezed_annotation/freezed_annotation.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; import 'package:immich_mobile/domain/models/asset/base_asset.model.dart'; import 'package:immich_mobile/providers/asset_viewer/video_player_provider.dart'; import 'package:immich_mobile/providers/infrastructure/asset.provider.dart'; -class AssetViewerState { - final double backgroundOpacity; - final bool showingDetails; - final bool showingControls; - final bool isZoomed; - final bool showingOcr; - final BaseAsset? currentAsset; - final int stackIndex; +part 'asset_viewer.provider.freezed.dart'; - const AssetViewerState({ - this.backgroundOpacity = 1.0, - this.showingDetails = false, - this.showingControls = true, - this.isZoomed = false, - this.showingOcr = false, - this.currentAsset, - this.stackIndex = 0, - }); - - AssetViewerState copyWith({ - double? backgroundOpacity, - bool? showingDetails, - bool? showingControls, - bool? isZoomed, - bool? showingOcr, +@freezed +abstract class AssetViewerState with _$AssetViewerState { + const factory AssetViewerState({ + @Default(1.0) double backgroundOpacity, + @Default(false) bool showingDetails, + @Default(true) bool showingControls, + @Default(false) bool isZoomed, + @Default(false) bool showingOcr, BaseAsset? currentAsset, - int? stackIndex, - }) { - return AssetViewerState( - backgroundOpacity: backgroundOpacity ?? this.backgroundOpacity, - showingDetails: showingDetails ?? this.showingDetails, - showingControls: showingControls ?? this.showingControls, - isZoomed: isZoomed ?? this.isZoomed, - showingOcr: showingOcr ?? this.showingOcr, - currentAsset: currentAsset ?? this.currentAsset, - stackIndex: stackIndex ?? this.stackIndex, - ); - } - @override - String toString() { - return 'AssetViewerState(opacity: $backgroundOpacity, showingDetails: $showingDetails, controls: $showingControls, isZoomed: $isZoomed, showingOcr: $showingOcr)'; - } - - @override - bool operator ==(Object other) { - if (identical(this, other)) { - return true; - } - if (other.runtimeType != runtimeType) { - return false; - } - return other is AssetViewerState && - other.backgroundOpacity == backgroundOpacity && - other.showingDetails == showingDetails && - other.showingControls == showingControls && - other.isZoomed == isZoomed && - other.showingOcr == showingOcr && - other.currentAsset == currentAsset && - other.stackIndex == stackIndex; - } - - @override - int get hashCode => - backgroundOpacity.hashCode ^ - showingDetails.hashCode ^ - showingControls.hashCode ^ - isZoomed.hashCode ^ - showingOcr.hashCode ^ - currentAsset.hashCode ^ - stackIndex.hashCode; + /// Physical thumbnail size retained while paging through the viewer. + Size? thumbnailSize, + @Default(0) int stackIndex, + }) = _AssetViewerState; } class AssetViewerStateNotifier extends Notifier { @@ -88,21 +36,27 @@ class AssetViewerStateNotifier extends Notifier { } void reset() { - _assetSubscription?.cancel(); + unawaited(_assetSubscription?.cancel()); _assetSubscription = null; state = const AssetViewerState(); } - void setAsset(BaseAsset asset) { + void setAsset(BaseAsset asset, {Size? thumbnailSize}) { if (asset == state.currentAsset) { return; } - state = state.copyWith(currentAsset: asset, stackIndex: 0, showingOcr: false); + // Swiping to a neighbor passes no size; keep the tapped tile's so neighbors reuse it. + state = state.copyWith( + currentAsset: asset, + thumbnailSize: thumbnailSize ?? state.thumbnailSize, + stackIndex: 0, + showingOcr: false, + ); _watchCurrentAsset(asset); } void _watchCurrentAsset(BaseAsset asset) { - _assetSubscription?.cancel(); + unawaited(_assetSubscription?.cancel()); _assetSubscription = ref.read(assetServiceProvider).watchAsset(asset).listen((updated) { if (updated != null) { state = state.copyWith(currentAsset: updated); @@ -123,9 +77,9 @@ class AssetViewerStateNotifier extends Notifier { } state = state.copyWith(showingDetails: showing, showingControls: showing ? true : state.showingControls); - final heroTag = state.currentAsset?.heroTag; - if (heroTag != null) { - final notifier = ref.read(videoPlayerProvider(heroTag).notifier); + final id = state.currentAsset?.id; + if (id != null) { + final notifier = ref.read(videoPlayerProvider(id).notifier); showing ? notifier.hold() : notifier.release(); } } diff --git a/mobile/lib/providers/asset_viewer/download.provider.dart b/mobile/lib/providers/asset_viewer/download.provider.dart index 25db76b077..2c4854bdb0 100644 --- a/mobile/lib/providers/asset_viewer/download.provider.dart +++ b/mobile/lib/providers/asset_viewer/download.provider.dart @@ -1,9 +1,6 @@ -import 'dart:async'; - import 'package:background_downloader/background_downloader.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; import 'package:immich_mobile/models/download/download_state.model.dart'; -import 'package:immich_mobile/models/download/livephotos_medatada.model.dart'; import 'package:immich_mobile/services/download.service.dart'; class DownloadStateNotifier extends StateNotifier { @@ -17,79 +14,9 @@ class DownloadStateNotifier extends StateNotifier { taskProgress: {}, ), ) { - _downloadService.onImageDownloadStatus = _downloadImageCallback; - _downloadService.onVideoDownloadStatus = _downloadVideoCallback; - _downloadService.onLivePhotoDownloadStatus = _downloadLivePhotoCallback; _downloadService.onTaskProgress = _taskProgressCallback; } - void _updateDownloadStatus(String taskId, TaskStatus status) { - if (status == TaskStatus.canceled) { - return; - } - - state = state.copyWith( - taskProgress: {} - ..addAll(state.taskProgress) - ..addAll({ - taskId: DownloadInfo( - progress: state.taskProgress[taskId]?.progress ?? 0, - fileName: state.taskProgress[taskId]?.fileName ?? '', - status: status, - ), - }), - ); - } - - // Download live photo callback - void _downloadLivePhotoCallback(TaskStatusUpdate update) { - _updateDownloadStatus(update.task.taskId, update.status); - - switch (update.status) { - case TaskStatus.complete: - if (update.task.metaData.isEmpty) { - return; - } - final livePhotosId = LivePhotosMetadata.fromJson(update.task.metaData).id; - _downloadService.saveLivePhotos(update.task, livePhotosId); - _onDownloadComplete(update.task.taskId); - break; - - default: - break; - } - } - - // Download image callback - void _downloadImageCallback(TaskStatusUpdate update) { - _updateDownloadStatus(update.task.taskId, update.status); - - switch (update.status) { - case TaskStatus.complete: - _downloadService.saveImageWithPath(update.task); - _onDownloadComplete(update.task.taskId); - break; - - default: - break; - } - } - - // Download video callback - void _downloadVideoCallback(TaskStatusUpdate update) { - _updateDownloadStatus(update.task.taskId, update.status); - - switch (update.status) { - case TaskStatus.complete: - _downloadService.saveVideo(update.task); - _onDownloadComplete(update.task.taskId); - break; - - default: - break; - } - } - void _taskProgressCallback(TaskProgressUpdate update) { // Ignore if the task is canceled or completed if (update.progress == -2 || update.progress == -1) { @@ -110,21 +37,7 @@ class DownloadStateNotifier extends StateNotifier { ); } - void _onDownloadComplete(String id) { - Future.delayed(const Duration(seconds: 2), () { - state = state.copyWith( - taskProgress: {} - ..addAll(state.taskProgress) - ..remove(id), - ); - - if (state.taskProgress.isEmpty) { - state = state.copyWith(showProgress: false); - } - }); - } - - void cancelDownload(String id) async { + Future cancelDownload(String id) async { final isCanceled = await _downloadService.cancelDownload(id); if (isCanceled) { @@ -142,5 +55,5 @@ class DownloadStateNotifier extends StateNotifier { } final downloadStateProvider = StateNotifierProvider( - ((ref) => DownloadStateNotifier(ref.watch(downloadServiceProvider))), + (ref) => DownloadStateNotifier(ref.watch(downloadServiceProvider)), ); diff --git a/mobile/lib/providers/asset_viewer/share_intent_upload.provider.dart b/mobile/lib/providers/asset_viewer/share_intent_upload.provider.dart index 8bd0581061..47d67c9674 100644 --- a/mobile/lib/providers/asset_viewer/share_intent_upload.provider.dart +++ b/mobile/lib/providers/asset_viewer/share_intent_upload.provider.dart @@ -1,3 +1,4 @@ +import 'dart:async'; import 'dart:io'; import 'package:hooks_riverpod/hooks_riverpod.dart'; @@ -9,11 +10,11 @@ import 'package:logging/logging.dart'; import 'package:path/path.dart' as p; final shareIntentUploadProvider = StateNotifierProvider>( - ((ref) => ShareIntentUploadStateNotifier( + (ref) => ShareIntentUploadStateNotifier( ref.watch(appRouterProvider), ref.read(foregroundUploadServiceProvider), ref.read(shareIntentServiceProvider), - )), + ), ); class ShareIntentUploadStateNotifier extends StateNotifier> { @@ -33,7 +34,7 @@ class ShareIntentUploadStateNotifier extends StateNotifier route.name == "ShareIntentRoute"); clearAttachments(); addAttachments(attachments); - router.push(ShareIntentRoute(attachments: attachments)); + unawaited(router.push(ShareIntentRoute(attachments: attachments))); } void addAttachments(List attachments) { diff --git a/mobile/lib/providers/asset_viewer/video_player_provider.dart b/mobile/lib/providers/asset_viewer/video_player_provider.dart index 463a1ac3d2..74d697a2ea 100644 --- a/mobile/lib/providers/asset_viewer/video_player_provider.dart +++ b/mobile/lib/providers/asset_viewer/video_player_provider.dart @@ -50,7 +50,7 @@ class VideoPlayerNotifier extends StateNotifier { void dispose() { _bufferingTimer?.cancel(); _seekTimer?.cancel(); - WakelockPlus.disable(); + unawaited(WakelockPlus.disable()); _controller = null; super.dispose(); @@ -121,7 +121,7 @@ class VideoPlayerNotifier extends StateNotifier { } _seekTimer = Timer(const Duration(milliseconds: 150), () { - _controller?.seekTo(state.position.inMilliseconds); + unawaited(_controller?.seekTo(state.position.inMilliseconds)); }); } @@ -130,11 +130,11 @@ class VideoPlayerNotifier extends StateNotifier { switch (state.status) { case VideoPlaybackStatus.paused: - play(); + unawaited(play()); case VideoPlaybackStatus.playing || VideoPlaybackStatus.buffering: - pause(); + unawaited(pause()); case VideoPlaybackStatus.completed: - restart(); + unawaited(restart()); } } @@ -145,7 +145,7 @@ class VideoPlayerNotifier extends StateNotifier { } _holdStatus = state.status; - pause(); + unawaited(pause()); } /// Restores playback to the status before [hold] was called. @@ -155,7 +155,7 @@ class VideoPlayerNotifier extends StateNotifier { switch (status) { case VideoPlaybackStatus.playing || VideoPlaybackStatus.buffering: - play(); + unawaited(play()); default: } } @@ -238,7 +238,7 @@ class VideoPlayerNotifier extends StateNotifier { final newStatus = _mapStatus(playbackInfo.status); switch (newStatus) { case VideoPlaybackStatus.playing: - WakelockPlus.enable(); + unawaited(WakelockPlus.enable()); _startBufferingTimer(); default: onNativePlaybackEnded(); @@ -250,7 +250,7 @@ class VideoPlayerNotifier extends StateNotifier { } void onNativePlaybackEnded() { - WakelockPlus.disable(); + unawaited(WakelockPlus.disable()); _bufferingTimer?.cancel(); } diff --git a/mobile/lib/providers/auth.provider.dart b/mobile/lib/providers/auth.provider.dart index 8a3f503553..2ed4cbcf00 100644 --- a/mobile/lib/providers/auth.provider.dart +++ b/mobile/lib/providers/auth.provider.dart @@ -134,7 +134,7 @@ class AuthNotifier extends StateNotifier { await _widgetService.writeCredentials(serverEndpoint, accessToken, customHeaders); // Get the deviceid from the store if it exists, otherwise generate a new one - String deviceId = Store.tryGet(StoreKey.deviceId) ?? await FlutterUdid.consistentUdid; + final String deviceId = Store.tryGet(StoreKey.deviceId) ?? await FlutterUdid.consistentUdid; UserDto? user = _userService.tryGetMyUser(); @@ -183,6 +183,7 @@ class AuthNotifier extends StateNotifier { Future saveLocalEndpoint(String url) async { await _ref.read(settingsProvider).write(.networkLocalEndpoint, url); + await _apiService.updateHeaders(); } String? getSavedWifiName() { diff --git a/mobile/lib/providers/background_sync.provider.dart b/mobile/lib/providers/background_sync.provider.dart index 37b3145eb4..5873e992b1 100644 --- a/mobile/lib/providers/background_sync.provider.dart +++ b/mobile/lib/providers/background_sync.provider.dart @@ -9,6 +9,7 @@ final backgroundSyncProvider = Provider((ref) { final manager = BackgroundSyncManager( onRemoteSyncStart: () { syncStatusNotifier.startRemoteSync(); + // ignore: dispose-provided-instances final backupProvider = ref.read(driftBackupProvider.notifier); if (backupProvider.mounted) { backupProvider.updateError(BackupError.none); @@ -16,6 +17,7 @@ final backgroundSyncProvider = Provider((ref) { }, onRemoteSyncComplete: (isSuccess) { syncStatusNotifier.completeRemoteSync(); + // ignore: dispose-provided-instances final backupProvider = ref.read(driftBackupProvider.notifier); if (backupProvider.mounted) { backupProvider.updateError(isSuccess == true ? BackupError.none : BackupError.syncFailed); diff --git a/mobile/lib/providers/backup/backup_album.provider.dart b/mobile/lib/providers/backup/backup_album.provider.dart index f81f905c2f..5d16722418 100644 --- a/mobile/lib/providers/backup/backup_album.provider.dart +++ b/mobile/lib/providers/backup/backup_album.provider.dart @@ -1,3 +1,5 @@ +import 'dart:async'; + import 'package:hooks_riverpod/hooks_riverpod.dart'; import 'package:immich_mobile/domain/models/album/local_album.model.dart'; import 'package:immich_mobile/domain/services/local_album.service.dart'; @@ -10,7 +12,7 @@ final backupAlbumProvider = StateNotifierProvider> { BackupAlbumNotifier(this._localAlbumService) : super([]) { - getAll(); + unawaited(getAll()); } final LocalAlbumService _localAlbumService; @@ -20,40 +22,25 @@ class BackupAlbumNotifier extends StateNotifier> { } Future selectAlbum(LocalAlbum album) async { - album = album.copyWith(backupSelection: BackupSelection.selected); - await _localAlbumService.update(album); + final selectedAlbum = album.copyWith(backupSelection: BackupSelection.selected); + await _localAlbumService.update(selectedAlbum); - state = state - .map( - (currentAlbum) => currentAlbum.id == album.id - ? currentAlbum.copyWith(backupSelection: BackupSelection.selected) - : currentAlbum, - ) - .toList(); + state = state.map((currentAlbum) => currentAlbum.id == selectedAlbum.id ? selectedAlbum : currentAlbum).toList(); } Future deselectAlbum(LocalAlbum album) async { - album = album.copyWith(backupSelection: BackupSelection.none); - await _localAlbumService.update(album); + final deselectedAlbum = album.copyWith(backupSelection: BackupSelection.none); + await _localAlbumService.update(deselectedAlbum); state = state - .map( - (currentAlbum) => - currentAlbum.id == album.id ? currentAlbum.copyWith(backupSelection: BackupSelection.none) : currentAlbum, - ) + .map((currentAlbum) => currentAlbum.id == deselectedAlbum.id ? deselectedAlbum : currentAlbum) .toList(); } Future excludeAlbum(LocalAlbum album) async { - album = album.copyWith(backupSelection: BackupSelection.excluded); - await _localAlbumService.update(album); + final excludedAlbum = album.copyWith(backupSelection: BackupSelection.excluded); + await _localAlbumService.update(excludedAlbum); - state = state - .map( - (currentAlbum) => currentAlbum.id == album.id - ? currentAlbum.copyWith(backupSelection: BackupSelection.excluded) - : currentAlbum, - ) - .toList(); + state = state.map((currentAlbum) => currentAlbum.id == excludedAlbum.id ? excludedAlbum : currentAlbum).toList(); } } diff --git a/mobile/lib/providers/backup/drift_backup.provider.dart b/mobile/lib/providers/backup/drift_backup.provider.dart index bf2b7cae4a..c3e1098e4b 100644 --- a/mobile/lib/providers/backup/drift_backup.provider.dart +++ b/mobile/lib/providers/backup/drift_backup.provider.dart @@ -1,17 +1,19 @@ import 'dart:async'; -import 'package:collection/collection.dart'; +import 'package:flutter/foundation.dart'; +import 'package:freezed_annotation/freezed_annotation.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:logging/logging.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/utils/upload_speed_calculator.dart'; import 'package:immich_mobile/providers/infrastructure/asset.provider.dart'; import 'package:immich_mobile/providers/user.provider.dart'; -import 'package:immich_mobile/services/foreground_upload.service.dart'; import 'package:immich_mobile/services/background_upload.service.dart'; +import 'package:immich_mobile/services/foreground_upload.service.dart'; +import 'package:immich_mobile/utils/upload_speed_calculator.dart'; +import 'package:logging/logging.dart'; + +part 'drift_backup.provider.freezed.dart'; class EnqueueStatus { final int enqueueCount; @@ -27,160 +29,37 @@ class EnqueueStatus { String toString() => 'EnqueueStatus(enqueueCount: $enqueueCount, totalCount: $totalCount)'; } -class DriftUploadStatus { - final String taskId; - final String filename; - final double progress; - final int fileSize; - final String networkSpeedAsString; - final bool? isFailed; - final String? error; - - const DriftUploadStatus({ - required this.taskId, - required this.filename, - required this.progress, - required this.fileSize, - required this.networkSpeedAsString, - this.isFailed, - this.error, - }); - - DriftUploadStatus copyWith({ - String? taskId, - String? filename, - double? progress, - int? fileSize, - String? networkSpeedAsString, +@freezed +abstract class DriftUploadStatus with _$DriftUploadStatus { + const factory DriftUploadStatus({ + required String taskId, + required String filename, + required double progress, + required int fileSize, + required String networkSpeedAsString, bool? isFailed, String? error, - }) { - return DriftUploadStatus( - taskId: taskId ?? this.taskId, - filename: filename ?? this.filename, - progress: progress ?? this.progress, - fileSize: fileSize ?? this.fileSize, - networkSpeedAsString: networkSpeedAsString ?? this.networkSpeedAsString, - isFailed: isFailed ?? this.isFailed, - error: error ?? this.error, - ); - } - - @override - String toString() { - return 'DriftUploadStatus(taskId: $taskId, filename: $filename, progress: $progress, fileSize: $fileSize, networkSpeedAsString: $networkSpeedAsString, isFailed: $isFailed, error: $error)'; - } - - @override - bool operator ==(covariant DriftUploadStatus other) { - if (identical(this, other)) { - return true; - } - - return other.taskId == taskId && - other.filename == filename && - other.progress == progress && - other.fileSize == fileSize && - other.networkSpeedAsString == networkSpeedAsString && - other.isFailed == isFailed && - other.error == error; - } - - @override - int get hashCode { - return taskId.hashCode ^ - filename.hashCode ^ - progress.hashCode ^ - fileSize.hashCode ^ - networkSpeedAsString.hashCode ^ - isFailed.hashCode ^ - error.hashCode; - } + }) = _DriftUploadStatus; } enum BackupError { none, syncFailed } -class DriftBackupState { - final int totalCount; - final int backupCount; - final int remainderCount; - final int processingCount; +@freezed +abstract class DriftBackupState with _$DriftBackupState { + const DriftBackupState._(); - final bool isSyncing; - final BackupError error; - - final Map uploadItems; - - final Map iCloudDownloadProgress; - - const DriftBackupState({ - required this.totalCount, - required this.backupCount, - required this.remainderCount, - required this.processingCount, - required this.isSyncing, - this.error = BackupError.none, - required this.uploadItems, - this.iCloudDownloadProgress = const {}, - }); - - DriftBackupState copyWith({ - int? totalCount, - int? backupCount, - int? remainderCount, - int? processingCount, - bool? isSyncing, - BackupError? error, - Map? uploadItems, - Map? iCloudDownloadProgress, - }) { - return DriftBackupState( - totalCount: totalCount ?? this.totalCount, - backupCount: backupCount ?? this.backupCount, - remainderCount: remainderCount ?? this.remainderCount, - processingCount: processingCount ?? this.processingCount, - isSyncing: isSyncing ?? this.isSyncing, - error: error ?? this.error, - uploadItems: uploadItems ?? this.uploadItems, - iCloudDownloadProgress: iCloudDownloadProgress ?? this.iCloudDownloadProgress, - ); - } + const factory DriftBackupState({ + required int totalCount, + required int backupCount, + required int remainderCount, + required int processingCount, + required bool isSyncing, + @Default(BackupError.none) BackupError error, + required Map uploadItems, + @Default({}) Map iCloudDownloadProgress, + }) = _DriftBackupState; int get errorCount => uploadItems.values.where((item) => item.isFailed == true).length; - - @override - String toString() { - return 'DriftBackupState(totalCount: $totalCount, backupCount: $backupCount, remainderCount: $remainderCount, processingCount: $processingCount, isSyncing: $isSyncing, error: $error, uploadItems: $uploadItems, iCloudDownloadProgress: $iCloudDownloadProgress)'; - } - - @override - bool operator ==(covariant DriftBackupState other) { - if (identical(this, other)) { - return true; - } - final mapEquals = const DeepCollectionEquality().equals; - - return other.totalCount == totalCount && - other.backupCount == backupCount && - other.remainderCount == remainderCount && - other.processingCount == processingCount && - other.isSyncing == isSyncing && - other.error == error && - mapEquals(other.iCloudDownloadProgress, iCloudDownloadProgress) && - mapEquals(other.uploadItems, uploadItems); - } - - @override - int get hashCode { - return totalCount.hashCode ^ - backupCount.hashCode ^ - remainderCount.hashCode ^ - processingCount.hashCode ^ - isSyncing.hashCode ^ - error.hashCode ^ - uploadItems.hashCode ^ - iCloudDownloadProgress.hashCode; - } } final driftBackupProvider = StateNotifierProvider((ref) { @@ -256,19 +135,25 @@ class DriftBackupNotifier extends StateNotifier { state = state.copyWith(isSyncing: isSyncing); } - Future startForegroundBackup(String userId) { + Future startForegroundBackup(String userId) async { // Cancel any existing backup before starting a new one if (_cancelToken != null) { - stopForegroundBackup(); + stopForegroundBackup(reason: "restarting the backup"); } state = state.copyWith(error: BackupError.none); - _cancelToken = Completer(); + // A pause during the recount below nulls _cancelToken, so the run keeps its own reference. + final cancelToken = Completer(); + _cancelToken = cancelToken; + + // Re-baseline the counters against the same DB read that feeds this run's candidate list, + // otherwise a resume counts duplicate successes against the old baseline (#26215). + await getBackupStatus(userId); return _foregroundUploadService.uploadCandidates( userId, - _cancelToken!, + cancelToken, callbacks: UploadCallbacks( onProgress: _handleForegroundBackupProgress, onSuccess: _handleForegroundBackupSuccess, @@ -278,7 +163,10 @@ class DriftBackupNotifier extends StateNotifier { ); } - void stopForegroundBackup() { + void stopForegroundBackup({required String reason}) { + if (_cancelToken != null) { + _logger.info("Foreground backup cancelled: $reason"); + } _cancelToken?.complete(); _cancelToken = null; _uploadSpeedManager.clear(); @@ -334,6 +222,10 @@ class DriftBackupNotifier extends StateNotifier { } void _handleForegroundBackupSuccess(String localAssetId, String remoteAssetId) { + if (!mounted) { + _logger.warning("Skip _handleForegroundBackupSuccess: notifier disposed"); + return; + } state = state.copyWith(backupCount: state.backupCount + 1, remainderCount: state.remainderCount - 1); _uploadSpeedManager.removeTask(localAssetId); diff --git a/mobile/lib/providers/cast.provider.dart b/mobile/lib/providers/cast.provider.dart index b298514d67..776888146b 100644 --- a/mobile/lib/providers/cast.provider.dart +++ b/mobile/lib/providers/cast.provider.dart @@ -1,3 +1,5 @@ +import 'dart:async'; + import 'package:hooks_riverpod/hooks_riverpod.dart'; import 'package:immich_mobile/domain/models/asset/base_asset.model.dart'; import 'package:immich_mobile/models/cast/cast_manager_state.dart'; @@ -51,14 +53,13 @@ class CastNotifier extends StateNotifier { } void loadMedia(RemoteAsset asset, bool reload) { - _gCastService.loadMedia(asset, reload); + unawaited(_gCastService.loadMedia(asset, reload)); } Future connect(CastDestinationType type, dynamic device) async { switch (type) { case CastDestinationType.googleCast: await _gCastService.connect(device); - break; } } diff --git a/mobile/lib/providers/cleanup.provider.dart b/mobile/lib/providers/cleanup.provider.dart index 378ceb010f..4316b4eb00 100644 --- a/mobile/lib/providers/cleanup.provider.dart +++ b/mobile/lib/providers/cleanup.provider.dart @@ -1,3 +1,5 @@ +import 'dart:async'; + import 'package:hooks_riverpod/hooks_riverpod.dart'; import 'package:immich_mobile/constants/enums.dart'; import 'package:immich_mobile/domain/models/asset/base_asset.model.dart'; @@ -87,18 +89,18 @@ class CleanupNotifier extends StateNotifier { state = state.copyWith(selectedDate: date, assetsToDelete: []); if (date != null) { final daysAgo = DateTime.now().difference(date).inDays; - _settingsRepository.write(.cleanupCutoffDaysAgo, daysAgo); + unawaited(_settingsRepository.write(.cleanupCutoffDaysAgo, daysAgo)); } } void setKeepMediaType(AssetKeepType keepMediaType) { state = state.copyWith(keepMediaType: keepMediaType, assetsToDelete: []); - _settingsRepository.write(.cleanupKeepMediaType, keepMediaType); + unawaited(_settingsRepository.write(.cleanupKeepMediaType, keepMediaType)); } void setKeepFavorites(bool keepFavorites) { state = state.copyWith(keepFavorites: keepFavorites, assetsToDelete: []); - _settingsRepository.write(.cleanupKeepFavorites, keepFavorites); + unawaited(_settingsRepository.write(.cleanupKeepFavorites, keepFavorites)); } void toggleKeepAlbum(String albumId) { @@ -118,7 +120,7 @@ class CleanupNotifier extends StateNotifier { } void _persistExcludedAlbumIds(Set albumIds) { - _settingsRepository.write(.cleanupKeepAlbumIds, albumIds.toList()); + unawaited(_settingsRepository.write(.cleanupKeepAlbumIds, albumIds.toList())); } void cleanupStaleAlbumIds(Set existingAlbumIds) { @@ -144,7 +146,7 @@ class CleanupNotifier extends StateNotifier { _persistExcludedAlbumIds(keepAlbumIds); } - _settingsRepository.write(.cleanupDefaultsInitialized, true); + unawaited(_settingsRepository.write(.cleanupDefaultsInitialized, true)); } Future scanAssets() async { diff --git a/mobile/lib/providers/feature_message.provider.dart b/mobile/lib/providers/feature_message.provider.dart new file mode 100644 index 0000000000..459464524d --- /dev/null +++ b/mobile/lib/providers/feature_message.provider.dart @@ -0,0 +1,7 @@ +import 'package:hooks_riverpod/hooks_riverpod.dart'; +import 'package:immich_mobile/domain/services/feature_message.service.dart'; +import 'package:immich_mobile/providers/infrastructure/settings.provider.dart'; + +final featureMessageServiceProvider = Provider( + (ref) => FeatureMessageService(ref.read(settingsProvider)), +); diff --git a/mobile/lib/providers/gallery_permission.provider.dart b/mobile/lib/providers/gallery_permission.provider.dart index 6e4fc69926..6be504bd2e 100644 --- a/mobile/lib/providers/gallery_permission.provider.dart +++ b/mobile/lib/providers/gallery_permission.provider.dart @@ -1,108 +1,28 @@ -import 'dart:io'; +import 'dart:async'; -import 'package:device_info_plus/device_info_plus.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:permission_handler/permission_handler.dart'; +import 'package:immich_mobile/constants/enums.dart'; +import 'package:immich_mobile/domain/services/device_permission.service.dart'; +import 'package:immich_mobile/repositories/permission.repository.dart'; -class GalleryPermissionNotifier extends StateNotifier { - GalleryPermissionNotifier() - : super(PermissionStatus.denied) // Denied is the initial state - { - // Sets the initial state - getGalleryPermissionStatus(); +final galleryPermissionServiceProvider = Provider((ref) { + return DevicePermissionService(ref.watch(permissionRepositoryProvider)); +}); + +class GalleryPermissionNotifier extends StateNotifier { + GalleryPermissionNotifier(this._service) : super(.denied) { + unawaited(getGalleryPermissionStatus()); } - get hasPermission => state.isGranted || state.isLimited; + final DevicePermissionService _service; - /// Requests the gallery permission - Future requestGalleryPermission() async { - PermissionStatus result; - // Android 32 and below uses Permission.storage - if (Platform.isAndroid) { - final androidInfo = await DeviceInfoPlugin().androidInfo; - if (androidInfo.version.sdkInt <= 32) { - // Android 32 and below need storage - final permission = await Permission.storage.request(); - result = permission; - } else { - // Android 33 need photo & video - final photos = await Permission.photos.request(); - if (!photos.isGranted) { - // Don't ask twice for the same permission - state = photos; - return photos; - } - final videos = await Permission.videos.request(); + bool get hasPermission => state.hasAccess; - // Return the joint result of those two permissions - final PermissionStatus status; - if ((photos.isGranted && videos.isGranted) || (photos.isLimited && videos.isLimited)) { - status = PermissionStatus.granted; - } else if (photos.isDenied || videos.isDenied) { - status = PermissionStatus.denied; - } else if (photos.isPermanentlyDenied || videos.isPermanentlyDenied) { - status = PermissionStatus.permanentlyDenied; - } else { - status = PermissionStatus.denied; - } + Future requestGalleryPermission() async => state = await _service.requestGallery(); - result = status; - } - if (result == PermissionStatus.granted && androidInfo.version.sdkInt >= 29) { - result = await Permission.accessMediaLocation.request(); - } - } else { - // iOS can use photos - final photos = await Permission.photos.request(); - result = photos; - } - state = result; - return result; - } - - /// Checks the current state of the gallery permissions without - /// requesting them again - Future getGalleryPermissionStatus() async { - PermissionStatus result; - // Android 32 and below uses Permission.storage - if (Platform.isAndroid) { - final androidInfo = await DeviceInfoPlugin().androidInfo; - if (androidInfo.version.sdkInt <= 32) { - // Android 32 and below need storage - final permission = await Permission.storage.status; - result = permission; - } else { - // Android 33 needs photo & video - final photos = await Permission.photos.status; - final videos = await Permission.videos.status; - - // Return the joint result of those two permissions - final PermissionStatus status; - if ((photos.isGranted && videos.isGranted) || (photos.isLimited && videos.isLimited)) { - status = PermissionStatus.granted; - } else if (photos.isDenied || videos.isDenied) { - status = PermissionStatus.denied; - } else if (photos.isPermanentlyDenied || videos.isPermanentlyDenied) { - status = PermissionStatus.permanentlyDenied; - } else { - status = PermissionStatus.denied; - } - - result = status; - } - if (state == PermissionStatus.granted && androidInfo.version.sdkInt >= 29) { - result = await Permission.accessMediaLocation.status; - } - } else { - // iOS can use photos - final photos = await Permission.photos.status; - result = photos; - } - state = result; - return result; - } + Future getGalleryPermissionStatus() async => state = await _service.galleryStatus(); } -final galleryPermissionNotifier = StateNotifierProvider( - (ref) => GalleryPermissionNotifier(), +final galleryPermissionNotifier = StateNotifierProvider( + (ref) => GalleryPermissionNotifier(ref.watch(galleryPermissionServiceProvider)), ); diff --git a/mobile/lib/providers/haptic_feedback.provider.dart b/mobile/lib/providers/haptic_feedback.provider.dart index 711c6fa4e2..850935163d 100644 --- a/mobile/lib/providers/haptic_feedback.provider.dart +++ b/mobile/lib/providers/haptic_feedback.provider.dart @@ -1,3 +1,5 @@ +import 'dart:async'; + import 'package:flutter/services.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; import 'package:immich_mobile/providers/app_settings.provider.dart'; @@ -13,33 +15,33 @@ class HapticNotifier extends StateNotifier { HapticNotifier(this._ref) : super(null); - selectionClick() { + void selectionClick() { if (_ref.read(appSettingsServiceProvider).getSetting(AppSettingsEnum.enableHapticFeedback)) { - HapticFeedback.selectionClick(); + unawaited(HapticFeedback.selectionClick()); } } - lightImpact() { + void lightImpact() { if (_ref.read(appSettingsServiceProvider).getSetting(AppSettingsEnum.enableHapticFeedback)) { - HapticFeedback.lightImpact(); + unawaited(HapticFeedback.lightImpact()); } } - mediumImpact() { + void mediumImpact() { if (_ref.read(appSettingsServiceProvider).getSetting(AppSettingsEnum.enableHapticFeedback)) { - HapticFeedback.mediumImpact(); + unawaited(HapticFeedback.mediumImpact()); } } - heavyImpact() { + void heavyImpact() { if (_ref.read(appSettingsServiceProvider).getSetting(AppSettingsEnum.enableHapticFeedback)) { - HapticFeedback.heavyImpact(); + unawaited(HapticFeedback.heavyImpact()); } } - vibrate() { + void vibrate() { if (_ref.read(appSettingsServiceProvider).getSetting(AppSettingsEnum.enableHapticFeedback)) { - HapticFeedback.vibrate(); + unawaited(HapticFeedback.vibrate()); } } } diff --git a/mobile/lib/providers/infrastructure/action.provider.dart b/mobile/lib/providers/infrastructure/action.provider.dart index ed62b9a0e8..3fb9f8acbc 100644 --- a/mobile/lib/providers/infrastructure/action.provider.dart +++ b/mobile/lib/providers/infrastructure/action.provider.dart @@ -1,34 +1,22 @@ +// ignore_for_file: use-ref-and-state-synchronously + import 'dart:async'; import 'package:auto_route/auto_route.dart'; -import 'package:background_downloader/background_downloader.dart'; import 'package:flutter/material.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; import 'package:immich_mobile/constants/enums.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/domain/models/asset_edit.model.dart'; -import 'package:immich_mobile/domain/services/asset.service.dart'; import 'package:immich_mobile/domain/services/remote_album.service.dart'; -import 'package:immich_mobile/models/download/livephotos_medatada.model.dart'; import 'package:immich_mobile/providers/asset_viewer/asset_viewer.provider.dart'; import 'package:immich_mobile/providers/backup/asset_upload_progress.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/asset_viewer/asset.provider.dart' show assetExifProvider; -import 'package:immich_mobile/providers/infrastructure/tag.provider.dart'; -import 'package:immich_mobile/providers/server_info.provider.dart'; import 'package:immich_mobile/providers/timeline/multiselect.provider.dart'; -import 'package:immich_mobile/providers/user.provider.dart'; -import 'package:immich_mobile/providers/websocket.provider.dart'; import 'package:immich_mobile/routing/router.dart'; import 'package:immich_mobile/services/action.service.dart'; -import 'package:immich_mobile/services/download.service.dart'; import 'package:immich_mobile/services/foreground_upload.service.dart'; -import 'package:immich_mobile/utils/semver.dart'; -import 'package:immich_mobile/widgets/asset_grid/delete_dialog.dart'; import 'package:logging/logging.dart'; -import 'package:openapi/api.dart'; final actionProvider = NotifierProvider(ActionNotifier.new, dependencies: [multiSelectProvider]); @@ -37,19 +25,25 @@ class ActionResult { final bool success; final String? error; final List remoteAssetIds; + final int failedCount; - const ActionResult({required this.count, required this.success, this.error, this.remoteAssetIds = const []}); + const ActionResult({ + required this.count, + required this.success, + this.error, + this.remoteAssetIds = const [], + this.failedCount = 0, + }); @override - String toString() => 'ActionResult(count: $count, success: $success, error: $error, remoteAssetIds: $remoteAssetIds)'; + String toString() => + 'ActionResult(count: $count, success: $success, error: $error, remoteAssetIds: $remoteAssetIds, failedCount: $failedCount)'; } class ActionNotifier extends Notifier { final Logger _logger = Logger('ActionNotifier'); late ActionService _service; late ForegroundUploadService _foregroundUploadService; - late DownloadService _downloadService; - late AssetService _assetService; ActionNotifier() : super(); @@ -57,79 +51,17 @@ class ActionNotifier extends Notifier { void build() { _foregroundUploadService = ref.watch(foregroundUploadServiceProvider); _service = ref.watch(actionServiceProvider); - _assetService = ref.watch(assetServiceProvider); - _downloadService = ref.watch(downloadServiceProvider); - _downloadService.onImageDownloadStatus = _downloadImageCallback; - _downloadService.onVideoDownloadStatus = _downloadVideoCallback; - _downloadService.onLivePhotoDownloadStatus = _downloadLivePhotoCallback; - } - - void _downloadImageCallback(TaskStatusUpdate update) { - if (update.status == TaskStatus.complete) { - _downloadService.saveImageWithPath(update.task); - } - } - - void _downloadVideoCallback(TaskStatusUpdate update) { - if (update.status == TaskStatus.complete) { - _downloadService.saveVideo(update.task); - } - } - - void _downloadLivePhotoCallback(TaskStatusUpdate update) async { - if (update.status == TaskStatus.complete) { - final livePhotosId = LivePhotosMetadata.fromJson(update.task.metaData).id; - unawaited(_downloadService.saveLivePhotos(update.task, livePhotosId)); - } } List _getRemoteIdsForSource(ActionSource source) { return _getAssets(source).whereType().toIds().toList(growable: false); } - List _getLocalIdsForSource(ActionSource source, {bool ignoreLocalOnly = false}) { - final Set assets = _getAssets(source); - final List localIds = []; - - for (final asset in assets) { - if (ignoreLocalOnly && asset.storage != AssetState.merged) { - continue; - } - if (asset is LocalAsset) { - localIds.add(asset.id); - } else if (asset is RemoteAsset && asset.localId != null) { - localIds.add(asset.localId!); - } - } - - return localIds; - } - - List _getOwnedRemoteIdsForSource(ActionSource source) { - final ownerId = ref.read(currentUserProvider)?.id; - return _getAssets(source).whereType().ownedAssets(ownerId).toIds().toList(growable: false); - } - - List _getOwnedRemoteAssetsForSource(ActionSource source) { - final ownerId = ref.read(currentUserProvider)?.id; - return _getIdsForSource(source).ownedAssets(ownerId).toList(); - } - - Iterable _getIdsForSource(ActionSource source) { - final Set assets = _getAssets(source); - return switch (T) { - const (RemoteAsset) => assets.whereType(), - const (LocalAsset) => assets.whereType(), - _ => const [], - } - as Iterable; - } - Set _getAssets(ActionSource source) { return switch (source) { ActionSource.timeline => ref.read(multiSelectProvider).selectedAssets, ActionSource.viewer => switch (ref.read(assetViewerProvider).currentAsset) { - BaseAsset asset => {asset}, + final BaseAsset asset => {asset}, null => const {}, }, }; @@ -145,107 +77,6 @@ class ActionNotifier extends Notifier { return ActionResult(count: assets.length, success: true); } - Future shareLink(ActionSource source, BuildContext context) async { - final ids = _getRemoteIdsForSource(source); - try { - await _service.shareLink(ids, context); - return ActionResult(count: ids.length, success: true); - } catch (error, stack) { - _logger.severe('Failed to create shared link for assets', error, stack); - return ActionResult(count: ids.length, success: false, error: error.toString()); - } - } - - Future favorite(ActionSource source) async { - final ids = _getOwnedRemoteIdsForSource(source); - try { - await _service.favorite(ids); - return ActionResult(count: ids.length, success: true); - } catch (error, stack) { - _logger.severe('Failed to favorite assets', error, stack); - return ActionResult(count: ids.length, success: false, error: error.toString()); - } - } - - Future unFavorite(ActionSource source) async { - final ids = _getOwnedRemoteIdsForSource(source); - try { - await _service.unFavorite(ids); - return ActionResult(count: ids.length, success: true); - } catch (error, stack) { - _logger.severe('Failed to unfavorite assets', error, stack); - return ActionResult(count: ids.length, success: false, error: error.toString()); - } - } - - Future archive(ActionSource source) async { - final ids = _getOwnedRemoteIdsForSource(source); - try { - await _service.archive(ids); - return ActionResult(count: ids.length, success: true); - } catch (error, stack) { - _logger.severe('Failed to archive assets', error, stack); - return ActionResult(count: ids.length, success: false, error: error.toString()); - } - } - - Future unArchive(ActionSource source) async { - final ids = _getOwnedRemoteIdsForSource(source); - try { - await _service.unArchive(ids); - return ActionResult(count: ids.length, success: true); - } catch (error, stack) { - _logger.severe('Failed to unarchive assets', error, stack); - return ActionResult(count: ids.length, success: false, error: error.toString()); - } - } - - Future moveToLockFolder(ActionSource source) async { - final ids = _getOwnedRemoteIdsForSource(source); - final localIds = _getLocalIdsForSource(source, ignoreLocalOnly: true); - try { - await _service.moveToLockFolder(ids, localIds); - return ActionResult(count: ids.length, success: true); - } catch (error, stack) { - _logger.severe('Failed to move assets to lock folder', error, stack); - return ActionResult(count: ids.length, success: false, error: error.toString()); - } - } - - Future removeFromLockFolder(ActionSource source) async { - final ids = _getOwnedRemoteIdsForSource(source); - try { - await _service.removeFromLockFolder(ids); - return ActionResult(count: ids.length, success: true); - } catch (error, stack) { - _logger.severe('Failed to remove assets from lock folder', error, stack); - return ActionResult(count: ids.length, success: false, error: error.toString()); - } - } - - Future trash(ActionSource source) async { - final ids = _getOwnedRemoteIdsForSource(source); - - try { - await _service.trash(ids); - return ActionResult(count: ids.length, success: true); - } catch (error, stack) { - _logger.severe('Failed to trash assets', error, stack); - return ActionResult(count: ids.length, success: false, error: error.toString()); - } - } - - Future restoreTrash(ActionSource source) async { - final ids = _getOwnedRemoteIdsForSource(source); - try { - await _service.restoreTrash(ids); - return ActionResult(count: ids.length, success: true); - } catch (error, stack) { - _logger.severe('Failed to restore trash assets', error, stack); - return ActionResult(count: ids.length, success: false, error: error.toString()); - } - } - Future emptyTrash(String userId) async { try { final count = await _service.emptyTrash(userId); @@ -266,121 +97,6 @@ class ActionNotifier extends Notifier { } } - Future trashRemoteAndDeleteLocal(ActionSource source) async { - final ids = _getOwnedRemoteIdsForSource(source); - final localIds = _getLocalIdsForSource(source); - try { - await _service.trashRemoteAndDeleteLocal(ids, localIds); - return ActionResult(count: ids.length, success: true); - } catch (error, stack) { - _logger.severe('Failed to delete assets', error, stack); - return ActionResult(count: ids.length, success: false, error: error.toString()); - } - } - - Future deleteRemoteAndLocal(ActionSource source) async { - final ids = _getOwnedRemoteIdsForSource(source); - final localIds = _getLocalIdsForSource(source); - try { - await _service.deleteRemoteAndLocal(ids, localIds); - return ActionResult(count: ids.length, success: true); - } catch (error, stack) { - _logger.severe('Failed to delete assets', error, stack); - return ActionResult(count: ids.length, success: false, error: error.toString()); - } - } - - Future deleteLocal(ActionSource source, BuildContext context) async { - final assets = _getAssets(source); - bool? backedUpOnly = assets.every((asset) => asset.storage == AssetState.merged) - ? true - : await showDialog( - context: context, - builder: (BuildContext context) => DeleteLocalOnlyDialog(onDeleteLocal: (_) {}), - ); - - if (backedUpOnly == null) { - // User cancelled the dialog - return null; - } - - final List ids; - if (backedUpOnly) { - ids = assets.where((asset) => asset.storage == AssetState.merged).map((asset) => asset.localId!).toList(); - } else { - ids = _getLocalIdsForSource(source); - } - - try { - final deletedCount = await _service.deleteLocal(ids); - return ActionResult(count: deletedCount, success: true); - } catch (error, stack) { - _logger.severe('Failed to delete assets', error, stack); - return ActionResult(count: ids.length, success: false, error: error.toString()); - } - } - - Future editLocation(ActionSource source, BuildContext context) async { - final ids = _getOwnedRemoteIdsForSource(source); - try { - final isEdited = await _service.editLocation(ids, context); - if (!isEdited) { - return null; - } - - // This must be called since editing location - // does not update the currentAsset which means - // the exif provider will not be refreshed automatically - if (source == ActionSource.viewer) { - final currentAsset = ref.read(assetViewerProvider).currentAsset; - if (currentAsset != null) { - ref.invalidate(assetExifProvider(currentAsset)); - } - } - - return ActionResult(count: ids.length, success: true); - } catch (error, stack) { - _logger.severe('Failed to edit location for assets', error, stack); - return ActionResult(count: ids.length, success: false, error: error.toString()); - } - } - - Future editDateTime(ActionSource source, BuildContext context) async { - final ids = _getOwnedRemoteIdsForSource(source); - try { - final isEdited = await _service.editDateTime(ids, context); - if (!isEdited) { - return null; - } - - if (source == ActionSource.viewer) { - ref.invalidate(assetExifProvider); - } - - return ActionResult(count: ids.length, success: true); - } catch (error, stack) { - _logger.severe('Failed to edit date and time for assets', error, stack); - return ActionResult(count: ids.length, success: false, error: error.toString()); - } - } - - Future tagAssets(ActionSource source, BuildContext context) async { - final ids = _getOwnedRemoteIdsForSource(source); - try { - final count = await _service.tagAssets(ids, context); - if (count == null) { - return null; - } - - ref.invalidate(tagProvider); - return ActionResult(count: count, success: true); - } catch (error, stack) { - _logger.severe('Failed to tag assets', error, stack); - ref.invalidate(tagProvider); - return ActionResult(count: ids.length, success: false, error: error.toString()); - } - } - Future addToAlbum(ActionSource source, RemoteAlbum album) async { final selected = _getAssets(source).toList(growable: false); if (selected.isEmpty) { @@ -393,9 +109,12 @@ class ActionNotifier extends Notifier { final albumNotifier = ref.read(remoteAlbumProvider.notifier); int addedRemote = 0; + int failedRemote = 0; if (remoteIds.isNotEmpty) { try { - addedRemote = await albumNotifier.addAssets(album.id, remoteIds); + final result = await albumNotifier.addAssets(album.id, remoteIds); + addedRemote = result.added; + failedRemote = result.failed; } catch (error, stack) { _logger.severe('Failed to add assets to album ${album.id}', error, stack); return ActionResult(count: 0, success: false, error: error.toString()); @@ -409,7 +128,7 @@ class ActionNotifier extends Notifier { } if (localAssets.isEmpty) { - return ActionResult(count: addedRemote, success: true); + return ActionResult(count: addedRemote, success: true, failedCount: failedRemote); } final uploadResult = await upload( @@ -424,36 +143,10 @@ class ActionNotifier extends Notifier { count: addedRemote + uploadResult.count, success: uploadResult.success, error: uploadResult.error, + failedCount: failedRemote, ); } - Future removeFromAlbum(ActionSource source, String albumId) async { - final ids = _getRemoteIdsForSource(source); - try { - final removedCount = await _service.removeFromAlbum(ids, albumId); - return ActionResult(count: removedCount, success: true); - } catch (error, stack) { - _logger.severe('Failed to remove assets from album', error, stack); - return ActionResult(count: ids.length, success: false, error: error.toString()); - } - } - - Future setAlbumCover(ActionSource source, String albumId) async { - final assets = _getAssets(source); - final asset = assets.first; - if (asset is! RemoteAsset) { - return const ActionResult(count: 1, success: false, error: 'Asset must be remote'); - } - - try { - await _service.setAlbumCover(albumId, asset.id); - return const ActionResult(count: 1, success: true); - } catch (error, stack) { - _logger.severe('Failed to set album cover', error, stack); - return ActionResult(count: 1, success: false, error: error.toString()); - } - } - Future updateDescription(ActionSource source, String description) async { final ids = _getRemoteIdsForSource(source); if (ids.length != 1) { @@ -486,71 +179,6 @@ class ActionNotifier extends Notifier { } } - Future stack(String userId, ActionSource source) async { - final ids = _getOwnedRemoteIdsForSource(source); - try { - await _service.stack(userId, ids); - return ActionResult(count: ids.length, success: true); - } catch (error, stack) { - _logger.severe('Failed to stack assets', error, stack); - return ActionResult(count: ids.length, success: false, error: error.toString()); - } - } - - Future unStack(ActionSource source) async { - final assets = _getOwnedRemoteAssetsForSource(source); - try { - await _service.unStack(assets.map((e) => e.stackId).nonNulls.toList()); - if (source == ActionSource.viewer) { - final updatedParent = await _assetService.getRemoteAsset(assets.first.id); - if (updatedParent != null) { - ref.read(assetViewerProvider.notifier).setAsset(updatedParent); - } - } - - return ActionResult(count: assets.length, success: true); - } catch (error, stack) { - _logger.severe('Failed to unstack assets', error, stack); - return ActionResult(count: assets.length, success: false); - } - } - - Future shareAssets( - ActionSource source, - BuildContext context, { - ShareAssetType fileType = ShareAssetType.original, - Completer? cancelCompleter, - void Function(double progress)? onAssetDownloadProgress, - }) async { - final ids = _getAssets(source).toList(growable: false); - - try { - final count = await _service.shareAssets( - ids, - context, - fileType: fileType, - cancelCompleter: cancelCompleter, - onAssetDownloadProgress: onAssetDownloadProgress, - ); - return ActionResult(count: count, success: count > 0 || ids.isEmpty); - } catch (error, stack) { - _logger.severe('Failed to share assets', error, stack); - return ActionResult(count: ids.length, success: false, error: error.toString()); - } - } - - Future downloadAll(ActionSource source) async { - final assets = _getAssets(source).whereType().toList(growable: false); - try { - final didEnqueue = await _service.downloadAll(assets); - final enqueueCount = didEnqueue.where((e) => e).length; - return ActionResult(count: enqueueCount, success: true); - } catch (error, stack) { - _logger.severe('Failed to download assets', error, stack); - return ActionResult(count: assets.length, success: false, error: error.toString()); - } - } - Future upload( ActionSource source, { List? assets, @@ -631,46 +259,8 @@ class ActionNotifier extends Notifier { }); } } - - Future applyEdits(ActionSource source, List edits) async { - final ids = _getOwnedRemoteIdsForSource(source); - - if (ids.length != 1) { - _logger.warning('applyEdits called with multiple assets, expected single asset'); - return ActionResult(count: ids.length, success: false, error: 'Expected single asset for applying edits'); - } - - Future editReady; - if (ref.read(serverInfoProvider).serverVersion >= const SemVer(major: 3, minor: 0, patch: 0)) { - editReady = ref.read(websocketProvider.notifier).waitForEvent("AssetEditReadyV2", (dynamic data) { - final eventAsset = SyncAssetV2.fromJson(data["asset"]); - return eventAsset?.id == ids.first; - }, const Duration(seconds: 10)); - } else { - editReady = ref.read(websocketProvider.notifier).waitForEvent("AssetEditReadyV1", (dynamic data) { - final eventAsset = SyncAssetV1.fromJson(data["asset"]); - return eventAsset?.id == ids.first; - }, const Duration(seconds: 10)); - } - - try { - await _service.applyEdits(ids.first, edits); - await editReady; - return const ActionResult(count: 1, success: true); - } catch (error, stack) { - _logger.severe('Failed to apply edits to assets', error, stack); - return ActionResult(count: ids.length, success: false, error: error.toString()); - } - } } extension on Iterable { Iterable toIds() => map((e) => e.id); - - Iterable ownedAssets(String? ownerId) { - if (ownerId == null) { - return const []; - } - return whereType().where((a) => a.ownerId == ownerId); - } } diff --git a/mobile/lib/providers/infrastructure/asset.provider.dart b/mobile/lib/providers/infrastructure/asset.provider.dart index 6326d003e5..8ca0ca0ec9 100644 --- a/mobile/lib/providers/infrastructure/asset.provider.dart +++ b/mobile/lib/providers/infrastructure/asset.provider.dart @@ -2,10 +2,12 @@ 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/remote_exif.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'; import 'package:immich_mobile/repositories/asset_api.repository.dart'; +import 'package:immich_mobile/repositories/asset_media.repository.dart'; final localAssetRepository = Provider( (ref) => DriftLocalAssetRepository(ref.watch(driftProvider)), @@ -15,6 +17,8 @@ final remoteAssetRepositoryProvider = Provider( (ref) => RemoteAssetRepository(ref.watch(driftProvider)), ); +final remoteExifRepositoryProvider = Provider((ref) => RemoteExifRepository(ref.watch(driftProvider))); + final trashedLocalAssetRepository = Provider( (ref) => DriftTrashedLocalAssetRepository(ref.watch(driftProvider)), ); @@ -22,8 +26,11 @@ final trashedLocalAssetRepository = Provider( final assetServiceProvider = Provider( (ref) => AssetService( remoteRepository: ref.watch(remoteAssetRepositoryProvider), + exifRepository: ref.watch(remoteExifRepositoryProvider), localRepository: ref.watch(localAssetRepository), apiRepository: ref.watch(assetApiRepositoryProvider), + mediaRepository: ref.watch(assetMediaRepositoryProvider), + trashedLocalRepository: ref.watch(trashedLocalAssetRepository), ), ); diff --git a/mobile/lib/providers/infrastructure/people.provider.dart b/mobile/lib/providers/infrastructure/people.provider.dart index 1939940975..ae24f044e8 100644 --- a/mobile/lib/providers/infrastructure/people.provider.dart +++ b/mobile/lib/providers/infrastructure/people.provider.dart @@ -14,13 +14,13 @@ final driftPeopleServiceProvider = Provider( (ref) => DriftPeopleService(ref.watch(driftPeopleRepositoryProvider), ref.watch(personApiRepositoryProvider)), ); -final driftPeopleAssetProvider = FutureProvider.family, String>((ref, assetId) async { +final driftPeopleAssetProvider = FutureProvider.family, String>((ref, assetId) async { final service = ref.watch(driftPeopleServiceProvider); return service.getAssetPeople(assetId); }); -final driftGetAllPeopleProvider = FutureProvider>((ref) async { +final getAllPeopleProvider = StreamProvider>((ref) async* { final service = ref.watch(driftPeopleServiceProvider); final prefs = await ref.watch(userMetadataPreferencesProvider.future); - return service.getAllPeople(minFaces: prefs?.minimumFaces ?? 3); + yield* service.watch(minFaces: prefs?.minimumFaces ?? 3); }); diff --git a/mobile/lib/providers/infrastructure/readonly_mode.provider.dart b/mobile/lib/providers/infrastructure/readonly_mode.provider.dart index d503919c90..be94a8a341 100644 --- a/mobile/lib/providers/infrastructure/readonly_mode.provider.dart +++ b/mobile/lib/providers/infrastructure/readonly_mode.provider.dart @@ -1,3 +1,5 @@ +import 'dart:async'; + import 'package:hooks_riverpod/hooks_riverpod.dart'; import 'package:immich_mobile/providers/app_settings.provider.dart'; import 'package:immich_mobile/providers/auth.provider.dart'; @@ -16,11 +18,11 @@ class ReadOnlyModeNotifier extends Notifier { void setMode(bool value) { final isLoggedIn = ref.read(authProvider).isAuthenticated; - _appSettingService.setSetting(AppSettingsEnum.readonlyModeEnabled, value); + unawaited(_appSettingService.setSetting(AppSettingsEnum.readonlyModeEnabled, value)); state = value; if (value && isLoggedIn) { - ref.read(appRouterProvider).navigate(const MainTimelineRoute()); + unawaited(ref.read(appRouterProvider).navigate(const MainTimelineRoute())); } } diff --git a/mobile/lib/providers/infrastructure/remote_album.provider.dart b/mobile/lib/providers/infrastructure/remote_album.provider.dart index a4bbbae818..b76a8213c6 100644 --- a/mobile/lib/providers/infrastructure/remote_album.provider.dart +++ b/mobile/lib/providers/infrastructure/remote_album.provider.dart @@ -1,6 +1,8 @@ +// ignore_for_file: use-ref-and-state-synchronously + import 'dart:async'; -import 'package:collection/collection.dart'; +import 'package:freezed_annotation/freezed_annotation.dart'; 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'; @@ -15,30 +17,17 @@ import 'package:immich_mobile/providers/user.provider.dart'; import 'package:immich_mobile/services/foreground_upload.service.dart'; import 'package:logging/logging.dart'; -class RemoteAlbumState { - final List albums; +part 'remote_album.provider.freezed.dart'; - const RemoteAlbumState({required this.albums}); +@Freezed(toStringOverride: false) +abstract class RemoteAlbumState with _$RemoteAlbumState { + const RemoteAlbumState._(); - RemoteAlbumState copyWith({List? albums}) { - return RemoteAlbumState(albums: albums ?? this.albums); - } + const factory RemoteAlbumState({required List albums}) = _RemoteAlbumState; + // Explicitly don't log albums @override String toString() => 'RemoteAlbumState(albums: ${albums.length})'; - - @override - bool operator ==(covariant RemoteAlbumState other) { - if (identical(this, other)) { - return true; - } - final listEquals = const DeepCollectionEquality().equals; - - return listEquals(other.albums, albums); - } - - @override - int get hashCode => albums.hashCode; } class RemoteAlbumNotifier extends Notifier { @@ -200,12 +189,12 @@ class RemoteAlbumNotifier extends Notifier { return _remoteAlbumService.getAssets(albumId); } - Future addAssets(String albumId, List assetIds) async { - final added = await _remoteAlbumService.addAssets(albumId: albumId, assetIds: assetIds); - if (added > 0) { + Future<({int added, int failed})> addAssets(String albumId, List assetIds) async { + final result = await _remoteAlbumService.addAssets(albumId: albumId, assetIds: assetIds); + if (result.added > 0) { await _refreshAlbumInState(albumId); } - return added; + return result; } /// Links a freshly-uploaded local asset to an album using its new remote ID, @@ -313,9 +302,9 @@ class RemoteAlbumNotifier extends Notifier { } } -final remoteAlbumDateRangeProvider = FutureProvider.family<(DateTime, DateTime), String>((ref, albumId) async { +final remoteAlbumDateRangeProvider = StreamProvider.autoDispose.family<(DateTime, DateTime), String>((ref, albumId) { final service = ref.watch(remoteAlbumServiceProvider); - return service.getDateRange(albumId); + return service.watchDateRange(albumId); }); final remoteAlbumSharedUsersProvider = FutureProvider.autoDispose.family, String>((ref, albumId) async { diff --git a/mobile/lib/providers/infrastructure/setting.provider.dart b/mobile/lib/providers/infrastructure/setting.provider.dart index 7d8be72cd0..9e33017cab 100644 --- a/mobile/lib/providers/infrastructure/setting.provider.dart +++ b/mobile/lib/providers/infrastructure/setting.provider.dart @@ -1,3 +1,5 @@ +// ignore_for_file: use-ref-and-state-synchronously + import 'package:hooks_riverpod/hooks_riverpod.dart'; import 'package:immich_mobile/domain/models/setting.model.dart'; import 'package:immich_mobile/domain/services/setting.service.dart'; diff --git a/mobile/lib/providers/infrastructure/tag.provider.dart b/mobile/lib/providers/infrastructure/tag.provider.dart index 2d527768c5..152582aa93 100644 --- a/mobile/lib/providers/infrastructure/tag.provider.dart +++ b/mobile/lib/providers/infrastructure/tag.provider.dart @@ -1,3 +1,5 @@ +// ignore_for_file: use-ref-and-state-synchronously + import 'package:hooks_riverpod/hooks_riverpod.dart'; import 'package:immich_mobile/domain/models/tag.model.dart'; import 'package:immich_mobile/domain/services/tag.service.dart'; diff --git a/mobile/lib/providers/infrastructure/timeline.provider.dart b/mobile/lib/providers/infrastructure/timeline.provider.dart index b22c693033..e5ac1389e9 100644 --- a/mobile/lib/providers/infrastructure/timeline.provider.dart +++ b/mobile/lib/providers/infrastructure/timeline.provider.dart @@ -1,3 +1,4 @@ +import 'package:collection/collection.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; import 'package:immich_mobile/domain/services/timeline.service.dart'; import 'package:immich_mobile/infrastructure/repositories/timeline.repository.dart'; @@ -23,7 +24,7 @@ final timelineServiceProvider = Provider( }, // Empty dependencies to inform the framework that this provider // might be used in a ProviderScope - dependencies: [], + dependencies: const [], ); final timelineFactoryProvider = Provider( @@ -39,5 +40,10 @@ final timelineUsersProvider = StreamProvider>((ref) { return Stream.value([]); } - return ref.watch(timelineRepositoryProvider).watchTimelineUserIds(currentUserId); + // Drift re-emits a fresh but content-identical list on unrelated table updates, + // which would dispose and rebuild the timeline service mid-load + return ref + .watch(timelineRepositoryProvider) + .watchTimelineUserIds(currentUserId) + .distinct(const ListEquality().equals); }); diff --git a/mobile/lib/providers/infrastructure/toast.provider.dart b/mobile/lib/providers/infrastructure/toast.provider.dart new file mode 100644 index 0000000000..eaaffd6fca --- /dev/null +++ b/mobile/lib/providers/infrastructure/toast.provider.dart @@ -0,0 +1,4 @@ +import 'package:hooks_riverpod/hooks_riverpod.dart'; +import 'package:immich_mobile/services/toast.service.dart'; + +final toastServiceProvider = Provider((ref) => const .new()); diff --git a/mobile/lib/providers/local_auth.provider.dart b/mobile/lib/providers/local_auth.provider.dart index 44fc5ad80c..d99f28823f 100644 --- a/mobile/lib/providers/local_auth.provider.dart +++ b/mobile/lib/providers/local_auth.provider.dart @@ -1,9 +1,11 @@ -import 'package:easy_localization/easy_localization.dart'; +import 'dart:async'; + import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; import 'package:immich_mobile/constants/constants.dart'; import 'package:immich_mobile/extensions/build_context_extensions.dart'; +import 'package:immich_mobile/generated/translations.g.dart'; import 'package:immich_mobile/models/auth/biometric_status.model.dart'; import 'package:immich_mobile/services/local_auth.service.dart'; import 'package:immich_mobile/services/secure_storage.service.dart'; @@ -21,9 +23,11 @@ class LocalAuthNotifier extends StateNotifier { LocalAuthNotifier(this._localAuthService, this._secureStorageService) : super(const BiometricStatus(availableBiometrics: [], canAuthenticate: false)) { - _localAuthService.getStatus().then((value) { - state = state.copyWith(canAuthenticate: value.canAuthenticate, availableBiometrics: value.availableBiometrics); - }); + unawaited( + _localAuthService.getStatus().then((value) { + state = state.copyWith(canAuthenticate: value.canAuthenticate, availableBiometrics: value.availableBiometrics); + }), + ); } Future registerBiometric(BuildContext context, String pinCode) async { @@ -39,6 +43,7 @@ class LocalAuthNotifier extends StateNotifier { } Future authenticate(BuildContext context, String? message) async { + final t = StaticTranslations.instance; String errorMessage = ""; try { @@ -47,23 +52,20 @@ class LocalAuthNotifier extends StateNotifier { switch (error.code) { case "NotEnrolled": _log.warning("User is not enrolled in biometrics"); - errorMessage = "biometric_no_options".tr(); - break; + errorMessage = t.biometric_no_options; case "NotAvailable": _log.warning("Biometric authentication is not available"); - errorMessage = "biometric_not_available".tr(); - break; + errorMessage = t.biometric_not_available; case "LockedOut": _log.warning("User is locked out of biometric authentication"); - errorMessage = "biometric_locked_out".tr(); - break; + errorMessage = t.biometric_locked_out; default: _log.warning("Failed to authenticate with unknown reason"); - errorMessage = 'failed_to_authenticate'.tr(); + errorMessage = t.failed_to_authenticate; } } catch (error) { _log.warning("Error during authentication: $error"); - errorMessage = 'failed_to_authenticate'.tr(); + errorMessage = t.failed_to_authenticate; } finally { if (errorMessage.isNotEmpty) { context.showSnackBar( diff --git a/mobile/lib/providers/map/map_marker.provider.dart b/mobile/lib/providers/map/map_marker.provider.dart index 38432eab6b..ab73f94c10 100644 --- a/mobile/lib/providers/map/map_marker.provider.dart +++ b/mobile/lib/providers/map/map_marker.provider.dart @@ -8,8 +8,8 @@ final mapMarkersProvider = FutureProvider.autoDispose>((ref) asy final mapState = ref.read(mapStateNotifierProvider); DateTime? fileCreatedAfter; bool? isFavorite; - bool isIncludeArchived = mapState.includeArchived; - bool isWithPartners = mapState.withPartners; + final bool isIncludeArchived = mapState.includeArchived; + final bool isWithPartners = mapState.withPartners; if (mapState.relativeTime != 0) { fileCreatedAfter = DateTime.now().subtract(Duration(days: mapState.relativeTime)); diff --git a/mobile/lib/providers/map/map_state.provider.dart b/mobile/lib/providers/map/map_state.provider.dart index b643264dca..12e9e59fac 100644 --- a/mobile/lib/providers/map/map_state.provider.dart +++ b/mobile/lib/providers/map/map_state.provider.dart @@ -1,3 +1,5 @@ +import 'dart:async'; + import 'package:flutter/material.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; import 'package:immich_mobile/models/map/map_state.model.dart'; @@ -26,12 +28,12 @@ class MapStateNotifier extends Notifier { } void switchTheme(ThemeMode mode) { - ref.read(settingsProvider).write(.mapThemeMode, mode); + unawaited(ref.read(settingsProvider).write(.mapThemeMode, mode)); state = state.copyWith(themeMode: mode); } void switchFavoriteOnly(bool isFavoriteOnly) { - ref.read(settingsProvider).write(.mapShowFavoriteOnly, isFavoriteOnly); + unawaited(ref.read(settingsProvider).write(.mapShowFavoriteOnly, isFavoriteOnly)); state = state.copyWith(showFavoriteOnly: isFavoriteOnly, shouldRefetchMarkers: true); } @@ -40,17 +42,17 @@ class MapStateNotifier extends Notifier { } void switchIncludeArchived(bool isIncludeArchived) { - ref.read(settingsProvider).write(.mapIncludeArchived, isIncludeArchived); + unawaited(ref.read(settingsProvider).write(.mapIncludeArchived, isIncludeArchived)); state = state.copyWith(includeArchived: isIncludeArchived, shouldRefetchMarkers: true); } void switchWithPartners(bool isWithPartners) { - ref.read(settingsProvider).write(.mapWithPartners, isWithPartners); + unawaited(ref.read(settingsProvider).write(.mapWithPartners, isWithPartners)); state = state.copyWith(withPartners: isWithPartners, shouldRefetchMarkers: true); } void setRelativeTime(int relativeTime) { - ref.read(settingsProvider).write(.mapRelativeDate, relativeTime); + unawaited(ref.read(settingsProvider).write(.mapRelativeDate, relativeTime)); state = state.copyWith(relativeTime: relativeTime, shouldRefetchMarkers: true); } } diff --git a/mobile/lib/providers/oauth.provider.dart b/mobile/lib/providers/oauth.provider.dart index 14b3353943..fd39e0907d 100644 --- a/mobile/lib/providers/oauth.provider.dart +++ b/mobile/lib/providers/oauth.provider.dart @@ -1,5 +1,5 @@ import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:immich_mobile/services/oauth.service.dart'; import 'package:immich_mobile/providers/api.provider.dart'; +import 'package:immich_mobile/services/oauth.service.dart'; final oAuthServiceProvider = Provider((ref) => OAuthService(ref.watch(apiServiceProvider))); diff --git a/mobile/lib/providers/permission.provider.dart b/mobile/lib/providers/permission.provider.dart index b7011e1357..bd4dc7b61e 100644 --- a/mobile/lib/providers/permission.provider.dart +++ b/mobile/lib/providers/permission.provider.dart @@ -1,3 +1,5 @@ +// ignore_for_file: use-ref-and-state-synchronously + import 'dart:async'; import 'dart:io'; @@ -10,7 +12,7 @@ class NotificationPermissionNotifier extends StateNotifier { NotificationPermissionNotifier() : super(Platform.isAndroid ? PermissionStatus.granted : PermissionStatus.restricted) { // Sets the initial state - getNotificationPermission().then((p) => state = p); + unawaited(getNotificationPermission().then((p) => state = p)); } /// Requests the notification permission diff --git a/mobile/lib/providers/routes.provider.dart b/mobile/lib/providers/routes.provider.dart index c51f67bc0e..776389b330 100644 --- a/mobile/lib/providers/routes.provider.dart +++ b/mobile/lib/providers/routes.provider.dart @@ -1,7 +1,16 @@ import 'package:flutter/widgets.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; +import 'package:immich_mobile/routing/router.dart'; + +@visibleForTesting +bool isRouteInStack(Ref ref, String routeName) { + final router = ref.watch(appRouterProvider); + return router.stackData.any((route) => route.name == routeName); +} + +final inLockedViewProvider = Provider((ref) => isRouteInStack(ref, DriftLockedFolderRoute.name)); +final isAssetViewerOpenProvider = Provider((ref) => isRouteInStack(ref, AssetViewerRoute.name)); -final inLockedViewProvider = StateProvider((ref) => false); final currentRouteNameProvider = StateProvider((ref) => null); final previousRouteNameProvider = StateProvider((ref) => null); final previousRouteDataProvider = StateProvider((ref) => null); diff --git a/mobile/lib/providers/search/people.provider.dart b/mobile/lib/providers/search/people.provider.dart deleted file mode 100644 index 1bd58509f5..0000000000 --- a/mobile/lib/providers/search/people.provider.dart +++ /dev/null @@ -1,24 +0,0 @@ -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:immich_mobile/domain/models/person.model.dart'; -import 'package:immich_mobile/services/person.service.dart'; - -final getAllPeopleProvider = FutureProvider.autoDispose>((ref) async { - final PersonService personService = ref.read(personServiceProvider); - - final people = await personService.getAllPeople(); - - return people; -}); - -final updatePersonNameProvider = FutureProvider.autoDispose( - (ref) => (String personId, String updatedName) async { - final PersonService personService = ref.read(personServiceProvider); - final person = await personService.updateName(personId, updatedName); - - if (person != null && person.name == updatedName) { - ref.invalidate(getAllPeopleProvider); - return true; - } - return false; - }, -); diff --git a/mobile/lib/providers/search/search_filter.provider.dart b/mobile/lib/providers/search/search_filter.provider.dart index b171de50c7..5da0a11fe7 100644 --- a/mobile/lib/providers/search/search_filter.provider.dart +++ b/mobile/lib/providers/search/search_filter.provider.dart @@ -1,34 +1,19 @@ +import 'package:freezed_annotation/freezed_annotation.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; import 'package:immich_mobile/services/search.service.dart'; import 'package:openapi/api.dart'; -class SearchSuggestionArgs { - SearchSuggestionType type; - final String? locationCountry; - final String? locationState; - final String? make; - final String? model; +part 'search_filter.provider.freezed.dart'; - SearchSuggestionArgs({required this.type, this.locationCountry, this.locationState, this.make, this.model}); - - @override - bool operator ==(Object other) { - if (identical(this, other)) { - return true; - } - - return other is SearchSuggestionArgs && - other.type == type && - other.locationCountry == locationCountry && - other.locationState == locationState && - other.make == make && - other.model == model; - } - - @override - int get hashCode { - return type.hashCode ^ locationCountry.hashCode ^ locationState.hashCode ^ make.hashCode ^ model.hashCode; - } +@freezed +abstract class SearchSuggestionArgs with _$SearchSuggestionArgs { + const factory SearchSuggestionArgs({ + required SearchSuggestionType type, + String? locationCountry, + String? locationState, + String? make, + String? model, + }) = _SearchSuggestionArgs; } final getSearchSuggestionsProvider = FutureProvider.autoDispose.family, SearchSuggestionArgs>(( diff --git a/mobile/lib/providers/search/search_input_focus.provider.dart b/mobile/lib/providers/search/search_input_focus.provider.dart index 4f6ed41ee0..4ebbfc6553 100644 --- a/mobile/lib/providers/search/search_input_focus.provider.dart +++ b/mobile/lib/providers/search/search_input_focus.provider.dart @@ -2,5 +2,7 @@ import 'package:flutter/widgets.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; final searchInputFocusProvider = Provider((ref) { - return FocusNode(); + final focusNode = FocusNode(); + ref.onDispose(focusNode.dispose); + return focusNode; }); diff --git a/mobile/lib/providers/server_info.provider.dart b/mobile/lib/providers/server_info.provider.dart index 98300894f9..79593cce95 100644 --- a/mobile/lib/providers/server_info.provider.dart +++ b/mobile/lib/providers/server_info.provider.dart @@ -1,3 +1,5 @@ +import 'dart:async'; + import 'package:hooks_riverpod/hooks_riverpod.dart'; import 'package:immich_mobile/domain/models/user.model.dart'; import 'package:immich_mobile/models/server_info/server_config.model.dart'; @@ -56,11 +58,11 @@ class ServerInfoNotifier extends StateNotifier { } } - _checkServerVersionMismatch(ServerVersion serverVersion, {ServerVersion? latestVersion}) async { - state = state.copyWith(serverVersion: serverVersion, latestVersion: latestVersion); + Future _checkServerVersionMismatch(ServerVersion serverVersion, {ServerVersion? latestVersion}) async { + state = state.copyWith(serverVersion: serverVersion, latestVersion: latestVersion ?? state.latestVersion); - var packageInfo = await PackageInfo.fromPlatform(); - SemVer clientVersion = SemVer.fromString(packageInfo.version); + final packageInfo = await PackageInfo.fromPlatform(); + final SemVer clientVersion = SemVer.fromString(packageInfo.version); if (serverVersion < clientVersion || (latestVersion != null && serverVersion < latestVersion)) { state = state.copyWith(versionStatus: VersionStatus.serverOutOfDate); @@ -75,12 +77,12 @@ class ServerInfoNotifier extends StateNotifier { state = state.copyWith(versionStatus: VersionStatus.upToDate); } - handleReleaseInfo(ServerVersion serverVersion, ServerVersion? latestVersion) { + void handleReleaseInfo(ServerVersion serverVersion, ServerVersion? latestVersion) { // Update local server version - _checkServerVersionMismatch(serverVersion, latestVersion: latestVersion); + unawaited(_checkServerVersionMismatch(serverVersion, latestVersion: latestVersion)); } - getServerFeatures() async { + Future getServerFeatures() async { final serverFeatures = await _serverInfoService.getServerFeatures(); if (serverFeatures == null) { return; @@ -88,7 +90,7 @@ class ServerInfoNotifier extends StateNotifier { state = state.copyWith(serverFeatures: serverFeatures); } - getServerConfig() async { + Future getServerConfig() async { final serverConfig = await _serverInfoService.getServerConfig(); if (serverConfig == null) { return; diff --git a/mobile/lib/providers/shared_link.provider.dart b/mobile/lib/providers/shared_link.provider.dart index fb44aea203..096919f28a 100644 --- a/mobile/lib/providers/shared_link.provider.dart +++ b/mobile/lib/providers/shared_link.provider.dart @@ -8,7 +8,7 @@ class SharedLinksNotifier extends StateNotifier>> { final SharedLinkService _sharedLinkService; SharedLinksNotifier(this._sharedLinkService) : super(const AsyncLoading()) { - fetchLinks(); + unawaited(fetchLinks()); } Future fetchLinks() async { diff --git a/mobile/lib/providers/sync_status.provider.dart b/mobile/lib/providers/sync_status.provider.dart index 8d7266abf7..eb183fbb13 100644 --- a/mobile/lib/providers/sync_status.provider.dart +++ b/mobile/lib/providers/sync_status.provider.dart @@ -1,5 +1,9 @@ -import 'package:easy_localization/easy_localization.dart'; +import 'package:flutter/foundation.dart'; +import 'package:freezed_annotation/freezed_annotation.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; +import 'package:immich_mobile/generated/translations.g.dart'; + +part 'sync_status.provider.freezed.dart'; enum SyncStatus { idle, @@ -7,68 +11,33 @@ enum SyncStatus { success, error; - localized() { + String localized() { + final t = StaticTranslations.instance; return switch (this) { - SyncStatus.idle => "idle".tr(), - SyncStatus.syncing => "running".tr(), - SyncStatus.success => "success".tr(), - SyncStatus.error => "error".tr(), + SyncStatus.idle => t.idle, + SyncStatus.syncing => t.running, + SyncStatus.success => t.success, + SyncStatus.error => t.error, }; } } -class SyncStatusState { - final SyncStatus remoteSyncStatus; - final SyncStatus localSyncStatus; - final SyncStatus hashJobStatus; - final SyncStatus cloudIdSyncStatus; +@freezed +abstract class SyncStatusState with _$SyncStatusState { + const SyncStatusState._(); - final String? errorMessage; - - const SyncStatusState({ - this.remoteSyncStatus = SyncStatus.idle, - this.localSyncStatus = SyncStatus.idle, - this.hashJobStatus = SyncStatus.idle, - this.cloudIdSyncStatus = SyncStatus.idle, - this.errorMessage, - }); - - SyncStatusState copyWith({ - SyncStatus? remoteSyncStatus, - SyncStatus? localSyncStatus, - SyncStatus? hashJobStatus, - SyncStatus? cloudIdSyncStatus, + const factory SyncStatusState({ + @Default(SyncStatus.idle) SyncStatus remoteSyncStatus, + @Default(SyncStatus.idle) SyncStatus localSyncStatus, + @Default(SyncStatus.idle) SyncStatus hashJobStatus, + @Default(SyncStatus.idle) SyncStatus cloudIdSyncStatus, String? errorMessage, - }) { - return SyncStatusState( - remoteSyncStatus: remoteSyncStatus ?? this.remoteSyncStatus, - localSyncStatus: localSyncStatus ?? this.localSyncStatus, - hashJobStatus: hashJobStatus ?? this.hashJobStatus, - cloudIdSyncStatus: cloudIdSyncStatus ?? this.cloudIdSyncStatus, - errorMessage: errorMessage ?? this.errorMessage, - ); - } + }) = _SyncStatusState; bool get isRemoteSyncing => remoteSyncStatus == SyncStatus.syncing; bool get isLocalSyncing => localSyncStatus == SyncStatus.syncing; bool get isHashing => hashJobStatus == SyncStatus.syncing; bool get isCloudIdSyncing => cloudIdSyncStatus == SyncStatus.syncing; - - @override - bool operator ==(Object other) { - if (identical(this, other)) { - return true; - } - return other is SyncStatusState && - other.remoteSyncStatus == remoteSyncStatus && - other.localSyncStatus == localSyncStatus && - other.hashJobStatus == hashJobStatus && - other.cloudIdSyncStatus == cloudIdSyncStatus && - other.errorMessage == errorMessage; - } - - @override - int get hashCode => Object.hash(remoteSyncStatus, localSyncStatus, hashJobStatus, cloudIdSyncStatus, errorMessage); } class SyncStatusNotifier extends Notifier { @@ -88,7 +57,11 @@ class SyncStatusNotifier extends Notifier { /// void setRemoteSyncStatus(SyncStatus status, [String? errorMessage]) { - state = state.copyWith(remoteSyncStatus: status, errorMessage: status == SyncStatus.error ? errorMessage : null); + // TODO(agg23): These error messages probably should be cleared, not preserved on null + state = state.copyWith( + remoteSyncStatus: status, + errorMessage: (status == SyncStatus.error ? errorMessage : null) ?? state.errorMessage, + ); } void startRemoteSync() => setRemoteSyncStatus(SyncStatus.syncing); @@ -100,7 +73,11 @@ class SyncStatusNotifier extends Notifier { /// void setLocalSyncStatus(SyncStatus status, [String? errorMessage]) { - state = state.copyWith(localSyncStatus: status, errorMessage: status == SyncStatus.error ? errorMessage : null); + // TODO(agg23): These error messages probably should be cleared, not preserved on null + state = state.copyWith( + localSyncStatus: status, + errorMessage: (status == SyncStatus.error ? errorMessage : null) ?? state.errorMessage, + ); } void startLocalSync() => setLocalSyncStatus(SyncStatus.syncing); @@ -112,7 +89,11 @@ class SyncStatusNotifier extends Notifier { /// void setHashJobStatus(SyncStatus status, [String? errorMessage]) { - state = state.copyWith(hashJobStatus: status, errorMessage: status == SyncStatus.error ? errorMessage : null); + // TODO(agg23): These error messages probably should be cleared, not preserved on null + state = state.copyWith( + hashJobStatus: status, + errorMessage: (status == SyncStatus.error ? errorMessage : null) ?? state.errorMessage, + ); } void startHashJob() => setHashJobStatus(SyncStatus.syncing); @@ -124,7 +105,11 @@ class SyncStatusNotifier extends Notifier { /// void setCloudIdSyncStatus(SyncStatus status, [String? errorMessage]) { - state = state.copyWith(cloudIdSyncStatus: status, errorMessage: status == SyncStatus.error ? errorMessage : null); + // TODO(agg23): These error messages probably should be cleared, not preserved on null + state = state.copyWith( + cloudIdSyncStatus: status, + errorMessage: (status == SyncStatus.error ? errorMessage : null) ?? state.errorMessage, + ); } void startCloudIdSync() => setCloudIdSyncStatus(SyncStatus.syncing); diff --git a/mobile/lib/providers/timeline/multiselect.provider.dart b/mobile/lib/providers/timeline/multiselect.provider.dart index 10c8bb86b6..f74201e983 100644 --- a/mobile/lib/providers/timeline/multiselect.provider.dart +++ b/mobile/lib/providers/timeline/multiselect.provider.dart @@ -1,20 +1,27 @@ -import 'package:collection/collection.dart'; +// ignore_for_file: use-ref-and-state-synchronously + +import 'package:freezed_annotation/freezed_annotation.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; import 'package:immich_mobile/domain/models/asset/base_asset.model.dart'; import 'package:immich_mobile/domain/services/timeline.service.dart'; import 'package:immich_mobile/providers/infrastructure/timeline.provider.dart'; +part 'multiselect.provider.freezed.dart'; + final multiSelectProvider = NotifierProvider( MultiSelectNotifier.new, dependencies: [timelineServiceProvider], ); -class MultiSelectState { - final Set selectedAssets; - final Set lockedSelectionAssets; - final bool forceEnable; +@freezed +abstract class MultiSelectState with _$MultiSelectState { + const MultiSelectState._(); - const MultiSelectState({required this.selectedAssets, required this.lockedSelectionAssets, this.forceEnable = false}); + const factory MultiSelectState({ + required Set selectedAssets, + required Set lockedSelectionAssets, + @Default(false) bool forceEnable, + }) = _MultiSelectState; bool get isEnabled => selectedAssets.isNotEmpty; @@ -22,44 +29,11 @@ class MultiSelectState { bool get hasRemote => selectedAssets.any((asset) => asset.storage == AssetState.remote || asset.storage == AssetState.merged); - bool get hasStacked => selectedAssets.any((asset) => asset is RemoteAsset && asset.stackId != null); - bool get hasMerged => selectedAssets.any((asset) => asset.storage == AssetState.merged); bool get onlyLocal => selectedAssets.any((asset) => asset.storage == AssetState.local); bool get onlyRemote => selectedAssets.any((asset) => asset.storage == AssetState.remote); - - MultiSelectState copyWith({ - Set? selectedAssets, - Set? lockedSelectionAssets, - bool? forceEnable, - }) { - return MultiSelectState( - selectedAssets: selectedAssets ?? this.selectedAssets, - lockedSelectionAssets: lockedSelectionAssets ?? this.lockedSelectionAssets, - forceEnable: forceEnable ?? this.forceEnable, - ); - } - - @override - String toString() => - 'MultiSelectState(selectedAssets: $selectedAssets, lockedSelectionAssets: $lockedSelectionAssets, forceEnable: $forceEnable)'; - - @override - bool operator ==(covariant MultiSelectState other) { - if (identical(this, other)) { - return true; - } - final setEquals = const DeepCollectionEquality().equals; - - return setEquals(other.selectedAssets, selectedAssets) && - setEquals(other.lockedSelectionAssets, lockedSelectionAssets) && - other.forceEnable == forceEnable; - } - - @override - int get hashCode => selectedAssets.hashCode ^ lockedSelectionAssets.hashCode ^ forceEnable.hashCode; } class MultiSelectNotifier extends Notifier { @@ -102,7 +76,7 @@ class MultiSelectNotifier extends Notifier { } /// Bucket bulk operations - void selectBucket(int offset, int bucketCount) async { + Future selectBucket(int offset, int bucketCount) async { final assets = await _timelineService.loadAssets(offset, bucketCount); final selectedAssets = state.selectedAssets.toSet(); @@ -111,7 +85,7 @@ class MultiSelectNotifier extends Notifier { state = state.copyWith(selectedAssets: selectedAssets); } - void deselectBucket(int offset, int bucketCount) async { + Future deselectBucket(int offset, int bucketCount) async { final assets = await _timelineService.loadAssets(offset, bucketCount); final selectedAssets = state.selectedAssets.toSet(); @@ -120,7 +94,7 @@ class MultiSelectNotifier extends Notifier { state = state.copyWith(selectedAssets: selectedAssets); } - void toggleBucketSelection(int offset, int bucketCount) async { + Future toggleBucketSelection(int offset, int bucketCount) async { final assets = await _timelineService.loadAssets(offset, bucketCount); toggleBucketSelectionByAssets(assets); } diff --git a/mobile/lib/providers/upload_profile_image.provider.dart b/mobile/lib/providers/upload_profile_image.provider.dart index 77772b0205..9b5e83622e 100644 --- a/mobile/lib/providers/upload_profile_image.provider.dart +++ b/mobile/lib/providers/upload_profile_image.provider.dart @@ -1,60 +1,18 @@ -import 'dart:convert'; - +import 'package:freezed_annotation/freezed_annotation.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; import 'package:image_picker/image_picker.dart'; import 'package:immich_mobile/domain/services/user.service.dart'; import 'package:immich_mobile/providers/infrastructure/user.provider.dart'; import 'package:immich_mobile/utils/debug_print.dart'; +part 'upload_profile_image.provider.freezed.dart'; + enum UploadProfileStatus { idle, loading, success, failure } -class UploadProfileImageState { - // enum - final UploadProfileStatus status; - final String profileImagePath; - const UploadProfileImageState({required this.status, required this.profileImagePath}); - - UploadProfileImageState copyWith({UploadProfileStatus? status, String? profileImagePath}) { - return UploadProfileImageState( - status: status ?? this.status, - profileImagePath: profileImagePath ?? this.profileImagePath, - ); - } - - Map toMap() { - final result = {}; - - result.addAll({'status': status.index}); - result.addAll({'profileImagePath': profileImagePath}); - - return result; - } - - factory UploadProfileImageState.fromMap(Map map) { - return UploadProfileImageState( - status: UploadProfileStatus.values[map['status'] ?? 0], - profileImagePath: map['profileImagePath'] ?? '', - ); - } - - String toJson() => json.encode(toMap()); - - factory UploadProfileImageState.fromJson(String source) => UploadProfileImageState.fromMap(json.decode(source)); - - @override - String toString() => 'UploadProfileImageState(status: $status, profileImagePath: $profileImagePath)'; - - @override - bool operator ==(Object other) { - if (identical(this, other)) { - return true; - } - - return other is UploadProfileImageState && other.status == status && other.profileImagePath == profileImagePath; - } - - @override - int get hashCode => status.hashCode ^ profileImagePath.hashCode; +@freezed +abstract class UploadProfileImageState with _$UploadProfileImageState { + const factory UploadProfileImageState({required UploadProfileStatus status, required String profileImagePath}) = + _UploadProfileImageState; } class UploadProfileImageNotifier extends StateNotifier { @@ -66,7 +24,7 @@ class UploadProfileImageNotifier extends StateNotifier Future upload(XFile file, {String? fileName}) async { state = state.copyWith(status: UploadProfileStatus.loading); - var profileImagePath = await _userService.createProfileImage(fileName ?? file.name, await file.readAsBytes()); + final profileImagePath = await _userService.createProfileImage(fileName ?? file.name, await file.readAsBytes()); if (profileImagePath != null) { dPrint(() => "Successfully upload profile image"); @@ -80,5 +38,5 @@ class UploadProfileImageNotifier extends StateNotifier } final uploadProfileImageProvider = StateNotifierProvider( - ((ref) => UploadProfileImageNotifier(ref.watch(userServiceProvider))), + (ref) => UploadProfileImageNotifier(ref.watch(userServiceProvider)), ); diff --git a/mobile/lib/providers/user.provider.dart b/mobile/lib/providers/user.provider.dart index 5a56b65793..427a1bf1c7 100644 --- a/mobile/lib/providers/user.provider.dart +++ b/mobile/lib/providers/user.provider.dart @@ -14,7 +14,7 @@ class CurrentUserProvider extends StateNotifier { final UserService _userService; late final StreamSubscription streamSub; - refresh() async { + Future refresh() async { try { await _userService.refreshMyUser(); } catch (_) {} @@ -22,7 +22,7 @@ class CurrentUserProvider extends StateNotifier { @override void dispose() { - streamSub.cancel(); + unawaited(streamSub.cancel()); super.dispose(); } } @@ -30,3 +30,11 @@ class CurrentUserProvider extends StateNotifier { final currentUserProvider = StateNotifierProvider((ref) { return CurrentUserProvider(ref.watch(userServiceProvider)); }); + +final authUserProvider = Provider((ref) { + final user = ref.watch(currentUserProvider); + if (user == null) { + throw Exception('User must be logged in to access this provider'); + } + return user; +}); diff --git a/mobile/lib/providers/websocket.provider.dart b/mobile/lib/providers/websocket.provider.dart index 8d9bd5bfe3..32531c354b 100644 --- a/mobile/lib/providers/websocket.provider.dart +++ b/mobile/lib/providers/websocket.provider.dart @@ -1,5 +1,7 @@ import 'dart:async'; +import 'package:flutter/foundation.dart'; +import 'package:freezed_annotation/freezed_annotation.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; import 'package:immich_mobile/domain/models/store.model.dart'; import 'package:immich_mobile/entities/store.entity.dart'; @@ -15,30 +17,11 @@ import 'package:logging/logging.dart'; import 'package:openapi/api.dart'; import 'package:socket_io_client/socket_io_client.dart'; -class WebsocketState { - final Socket? socket; - final bool isConnected; +part 'websocket.provider.freezed.dart'; - const WebsocketState({this.socket, required this.isConnected}); - - WebsocketState copyWith({Socket? socket, bool? isConnected}) { - return WebsocketState(socket: socket ?? this.socket, isConnected: isConnected ?? this.isConnected); - } - - @override - String toString() => 'WebsocketState(socket: $socket, isConnected: $isConnected)'; - - @override - bool operator ==(Object other) { - if (identical(this, other)) { - return true; - } - - return other is WebsocketState && other.socket == socket && other.isConnected == isConnected; - } - - @override - int get hashCode => socket.hashCode ^ isConnected.hashCode; +@freezed +abstract class WebsocketState with _$WebsocketState { + const factory WebsocketState({Socket? socket, required bool isConnected}) = _WebsocketState; } class WebsocketNotifier extends StateNotifier { @@ -56,14 +39,16 @@ class WebsocketNotifier extends StateNotifier { @override void dispose() { _batchDebouncer.dispose(); + state.socket?.dispose(); super.dispose(); } - /// Connects websocket to server unless already connected + /// Connects websocket to server unless an active socket already exists void connect() { - if (state.isConnected) { + if (state.socket?.active == true) { return; } + state.socket?.dispose(); final authenticationState = _ref.read(authProvider); if (authenticationState.isAuthenticated) { @@ -71,7 +56,7 @@ class WebsocketNotifier extends StateNotifier { final endpoint = Uri.parse(Store.get(StoreKey.serverEndpoint)); dPrint(() => "Attempting to connect to websocket"); // Configure socket transports must be specified - Socket socket = io( + final Socket socket = io( endpoint.origin, OptionBuilder() .setPath("${endpoint.path}/socket.io") @@ -84,6 +69,8 @@ class WebsocketNotifier extends StateNotifier { .build(), ); + state = WebsocketState(isConnected: false, socket: socket); + socket.onConnect((_) { dPrint(() => "Established Websocket Connection"); state = WebsocketState(isConnected: true, socket: socket); @@ -91,22 +78,29 @@ class WebsocketNotifier extends StateNotifier { socket.onDisconnect((_) { dPrint(() => "Disconnect to Websocket Connection"); - state = const WebsocketState(isConnected: false, socket: null); + state = WebsocketState(isConnected: false, socket: socket); }); socket.on('error', (errorMessage) { _log.severe("Websocket Error - $errorMessage"); - state = const WebsocketState(isConnected: false, socket: null); + state = WebsocketState(isConnected: false, socket: socket); }); socket.on('AssetUploadReadyV1', _handleSyncAssetUploadReadyV1); socket.on('AssetUploadReadyV2', _handleSyncAssetUploadReadyV2); socket.on('AssetEditReadyV1', _handleSyncAssetEditReadyV1); socket.on('AssetEditReadyV2', _handleSyncAssetEditReadyV2); + socket.on('on_album_update', _handleRemoteChange); + socket.on('on_asset_stack_update', _handleRemoteChange); + socket.on('on_asset_delete', _handleRemoteChange); + socket.on('on_asset_trash', _handleRemoteChange); + socket.on('on_asset_restore', _handleRemoteChange); + socket.on('on_asset_hidden', _handleRemoteChange); + socket.on('on_asset_update', _handleRemoteChange); socket.on('on_config_update', _handleOnConfigUpdate); socket.on('on_new_release', _handleReleaseUpdates); } catch (e) { - dPrint(() => "[WEBSOCKET] Catch Websocket Error - ${e.toString()}"); + dPrint(() => "[WEBSOCKET] Catch Websocket Error - $e"); } } } @@ -142,11 +136,11 @@ class WebsocketNotifier extends StateNotifier { } void _handleOnConfigUpdate(dynamic _) { - _ref.read(serverInfoProvider.notifier).getServerFeatures(); - _ref.read(serverInfoProvider.notifier).getServerConfig(); + unawaited(_ref.read(serverInfoProvider.notifier).getServerFeatures()); + unawaited(_ref.read(serverInfoProvider.notifier).getServerConfig()); } - _handleReleaseUpdates(dynamic data) { + void _handleReleaseUpdates(dynamic data) { // Json guard if (data is! Map) { return; @@ -184,6 +178,10 @@ class WebsocketNotifier extends StateNotifier { unawaited(_ref.read(backgroundSyncProvider).syncWebsocketEditV1(data)); } + void _handleRemoteChange(dynamic _) { + unawaited(_ref.read(backgroundSyncProvider).syncRemote(enqueue: true)); + } + void _handleSyncAssetEditReadyV2(dynamic data) { unawaited(_ref.read(backgroundSyncProvider).syncWebsocketEditV2(data)); } @@ -198,7 +196,7 @@ class WebsocketNotifier extends StateNotifier { unawaited( _ref.read(backgroundSyncProvider).syncWebsocketBatchV1(_batchedAssetUploadReady.toList()).then((_) { if (isSyncAlbumEnabled) { - _ref.read(backgroundSyncProvider).syncLinkedAlbum(); + unawaited(_ref.read(backgroundSyncProvider).syncLinkedAlbum()); } }), ); @@ -219,7 +217,7 @@ class WebsocketNotifier extends StateNotifier { unawaited( _ref.read(backgroundSyncProvider).syncWebsocketBatchV2(_batchedAssetUploadReady.toList()).then((_) { if (isSyncAlbumEnabled) { - _ref.read(backgroundSyncProvider).syncLinkedAlbum(); + unawaited(_ref.read(backgroundSyncProvider).syncLinkedAlbum()); } }), ); diff --git a/mobile/lib/repositories/asset_api.repository.dart b/mobile/lib/repositories/asset_api.repository.dart index 40233e90c4..9b92b491bf 100644 --- a/mobile/lib/repositories/asset_api.repository.dart +++ b/mobile/lib/repositories/asset_api.repository.dart @@ -1,12 +1,14 @@ import 'package:hooks_riverpod/hooks_riverpod.dart'; import 'package:http/http.dart'; -import 'package:immich_mobile/constants/enums.dart'; +import 'package:immich_mobile/domain/models/asset/base_asset.model.dart'; import 'package:immich_mobile/domain/models/asset_edit.model.dart' hide AssetEditAction; import 'package:immich_mobile/domain/models/stack.model.dart'; import 'package:immich_mobile/providers/api.provider.dart'; import 'package:immich_mobile/repositories/api.repository.dart'; +import 'package:immich_mobile/utils/option.dart'; import 'package:maplibre_gl/maplibre_gl.dart'; -import 'package:openapi/api.dart'; +import 'package:openapi/api.dart' as api show AssetVisibility; +import 'package:openapi/api.dart' hide AssetVisibility; final assetApiRepositoryProvider = Provider( (ref) => AssetApiRepository( @@ -41,28 +43,11 @@ class AssetApiRepository extends ApiRepository { return response?.count ?? 0; } - Future updateVisibility(List ids, AssetVisibilityEnum visibility) async { + // TODO(shenlong): remove after action migration + Future updateVisibility(List ids, AssetVisibility visibility) async { return _api.updateAssets(AssetBulkUpdateDto(ids: ids, visibility: Optional.present(_mapVisibility(visibility)))); } - Future updateFavorite(List ids, bool isFavorite) async { - return _api.updateAssets(AssetBulkUpdateDto(ids: ids, isFavorite: Optional.present(isFavorite))); - } - - Future updateLocation(List ids, LatLng location) async { - return _api.updateAssets( - AssetBulkUpdateDto( - ids: ids, - latitude: Optional.present(location.latitude), - longitude: Optional.present(location.longitude), - ), - ); - } - - Future updateDateTime(List ids, String dateTime) async { - return _api.updateAssets(AssetBulkUpdateDto(ids: ids, dateTimeOriginal: Optional.present(dateTime))); - } - Future stack(List ids) async { final responseDto = await checkNull(_stacksApi.createStack(StackCreateDto(assetIds: ids))); @@ -77,11 +62,11 @@ class AssetApiRepository extends ApiRepository { return _api.downloadAssetWithHttpInfo(id, edited: edited); } - _mapVisibility(AssetVisibilityEnum visibility) => switch (visibility) { - AssetVisibilityEnum.timeline => AssetVisibility.timeline, - AssetVisibilityEnum.hidden => AssetVisibility.hidden, - AssetVisibilityEnum.locked => AssetVisibility.locked, - AssetVisibilityEnum.archive => AssetVisibility.archive, + api.AssetVisibility _mapVisibility(AssetVisibility visibility) => switch (visibility) { + AssetVisibility.timeline => api.AssetVisibility.timeline, + AssetVisibility.hidden => api.AssetVisibility.hidden, + AssetVisibility.locked => api.AssetVisibility.locked, + AssetVisibility.archive => api.AssetVisibility.archive, }; Future getAssetMIMEType(String assetId) async { @@ -106,6 +91,39 @@ class AssetApiRepository extends ApiRepository { Future removeEdits(String assetId) async { return _api.removeAssetEdits(assetId); } + + Future update( + List remoteIds, { + Option isFavorite = const .none(), + Option visibility = const .none(), + Option dateTimeOriginal = const .none(), + Option location = const .none(), + }) { + return _api.updateAssets( + AssetBulkUpdateDto( + ids: remoteIds, + isFavorite: isFavorite.toOptional(), + visibility: visibility.map(_mapVisibility).toOptional(), + dateTimeOriginal: dateTimeOriginal.toOptional(), + latitude: location.map((loc) => loc.latitude).toOptional(), + longitude: location.map((loc) => loc.longitude).toOptional(), + ), + ); + } + + Future updateLocation(List ids, LatLng location) async { + return _api.updateAssets( + AssetBulkUpdateDto( + ids: ids, + latitude: Optional.present(location.latitude), + longitude: Optional.present(location.longitude), + ), + ); + } + + Future updateDateTime(List ids, String dateTime) async { + return _api.updateAssets(AssetBulkUpdateDto(ids: ids, dateTimeOriginal: Optional.present(dateTime))); + } } extension on StackResponseDto { diff --git a/mobile/lib/repositories/asset_media.repository.dart b/mobile/lib/repositories/asset_media.repository.dart index 4c9b6f6009..6058883544 100644 --- a/mobile/lib/repositories/asset_media.repository.dart +++ b/mobile/lib/repositories/asset_media.repository.dart @@ -37,9 +37,9 @@ class AssetMediaRepository { Future _androidSupportsTrash() async { if (Platform.isAndroid) { - DeviceInfoPlugin deviceInfo = DeviceInfoPlugin(); - AndroidDeviceInfo androidInfo = await deviceInfo.androidInfo; - int sdkVersion = androidInfo.version.sdkInt; + final DeviceInfoPlugin deviceInfo = DeviceInfoPlugin(); + final AndroidDeviceInfo androidInfo = await deviceInfo.androidInfo; + final int sdkVersion = androidInfo.version.sdkInt; return sdkVersion >= 31; } return false; @@ -324,7 +324,7 @@ class AssetMediaRepository { return 0; } - if (_isCancelled(cancelCompleter)) { + if (_isCancelled(cancelCompleter) || !context.mounted) { await _cleanupTempFiles(tempFiles); return 0; } diff --git a/mobile/lib/repositories/auth_api.repository.dart b/mobile/lib/repositories/auth_api.repository.dart index 05dc7f103a..447826b9aa 100644 --- a/mobile/lib/repositories/auth_api.repository.dart +++ b/mobile/lib/repositories/auth_api.repository.dart @@ -32,7 +32,7 @@ class AuthApiRepository extends ApiRepository { await _apiService.authenticationApi.logout().timeout(const Duration(seconds: 7)); } - _mapLoginReponse(LoginResponseDto dto) { + LoginResponse _mapLoginReponse(LoginResponseDto dto) { return LoginResponse( accessToken: dto.accessToken, isAdmin: dto.isAdmin, diff --git a/mobile/lib/repositories/biometric.repository.dart b/mobile/lib/repositories/biometric.repository.dart index 8bd5a85542..7da4bfe757 100644 --- a/mobile/lib/repositories/biometric.repository.dart +++ b/mobile/lib/repositories/biometric.repository.dart @@ -1,5 +1,5 @@ -import 'package:easy_localization/easy_localization.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; +import 'package:immich_mobile/generated/translations.g.dart'; import 'package:immich_mobile/models/auth/biometric_status.model.dart'; import 'package:local_auth/local_auth.dart'; @@ -19,6 +19,6 @@ class BiometricRepository { } Future authenticate(String? message) async { - return _localAuth.authenticate(localizedReason: message ?? 'please_auth_to_access'.tr()); + return _localAuth.authenticate(localizedReason: message ?? StaticTranslations.instance.please_auth_to_access); } } diff --git a/mobile/lib/repositories/download.repository.dart b/mobile/lib/repositories/download.repository.dart index c578746a4c..855b8302a9 100644 --- a/mobile/lib/repositories/download.repository.dart +++ b/mobile/lib/repositories/download.repository.dart @@ -10,6 +10,7 @@ import 'package:immich_mobile/models/download/livephotos_medatada.model.dart'; import 'package:immich_mobile/services/api.service.dart'; import 'package:immich_mobile/utils/image_url_builder.dart'; +// ignore: dispose-provided-instances final downloadRepositoryProvider = Provider((ref) => DownloadRepository()); class DownloadRepository { @@ -27,10 +28,12 @@ class DownloadRepository { void Function(TaskStatusUpdate)? onVideoDownloadStatus; - void Function(TaskStatusUpdate)? onLivePhotoDownloadStatus; - void Function(TaskProgressUpdate)? onTaskProgress; + // #29900: `taskStatusCallback` is called before the DB has been updated, causing a race between the two Live Photo tasks + // This callback instead listens directly to DB updates + void Function(TaskRecord)? onLivePhotoRecordComplete; + DownloadRepository() { _downloader.registerCallbacks( group: kDownloadGroupImage, @@ -46,9 +49,12 @@ class DownloadRepository { _downloader.registerCallbacks( group: kDownloadGroupLivePhoto, - taskStatusCallback: (update) => onLivePhotoDownloadStatus?.call(update), taskProgressCallback: (update) => onTaskProgress?.call(update), ); + + _downloader.database.updates + .where((record) => record.group == kDownloadGroupLivePhoto && record.status == TaskStatus.complete) + .listen((record) => onLivePhotoRecordComplete?.call(record)); } Future> downloadAll(List tasks) { diff --git a/mobile/lib/repositories/drift_album_api_repository.dart b/mobile/lib/repositories/drift_album_api_repository.dart index ee57352fb1..8c21af6599 100644 --- a/mobile/lib/repositories/drift_album_api_repository.dart +++ b/mobile/lib/repositories/drift_album_api_repository.dart @@ -25,7 +25,9 @@ class DriftAlbumApiRepository extends ApiRepository { _api.createAlbum( CreateAlbumDto( albumName: name, - description: description == null ? const Optional.absent() : Optional.present(description), + description: description == null + ? const Optional.absent() + : Optional.present(description.isEmpty ? null : description), assetIds: Optional.present(assetIds.toList()), ), ), @@ -36,7 +38,8 @@ class DriftAlbumApiRepository extends ApiRepository { Future<({List removed, List failed})> removeAssets(String albumId, Iterable assetIds) async { final response = await checkNull(_api.removeAssetFromAlbum(albumId, BulkIdsDto(ids: assetIds.toList()))); - final List removed = [], failed = []; + final List removed = []; + final List failed = []; for (final dto in response) { if (dto.success) { removed.add(dto.id); @@ -55,11 +58,12 @@ class DriftAlbumApiRepository extends ApiRepository { final response = await checkNull( _api.addAssetsToAlbum(albumId, BulkIdsDto(ids: assetIds.toList()), abortTrigger: abortTrigger), ); - final List added = [], failed = []; + final List added = []; + final List failed = []; for (final dto in response) { if (dto.success) { added.add(dto.id); - } else { + } else if (dto.error.orElse(null) != BulkIdErrorReason.duplicate) { failed.add(dto.id); } } @@ -86,7 +90,9 @@ class DriftAlbumApiRepository extends ApiRepository { albumId, UpdateAlbumDto( albumName: name == null ? const Optional.absent() : Optional.present(name), - description: description == null ? const Optional.absent() : Optional.present(description), + description: description == null + ? const Optional.absent() + : Optional.present(description.isEmpty ? null : description), albumThumbnailAssetId: thumbnailAssetId == null ? const Optional.absent() : Optional.present(thumbnailAssetId), diff --git a/mobile/lib/repositories/gcast.repository.dart b/mobile/lib/repositories/gcast.repository.dart index db3e0f45d0..b8ffe79b04 100644 --- a/mobile/lib/repositories/gcast.repository.dart +++ b/mobile/lib/repositories/gcast.repository.dart @@ -1,7 +1,7 @@ import 'package:cast/device.dart'; +import 'package:cast/discovery_service.dart'; import 'package:cast/session.dart'; import 'package:cast/session_manager.dart'; -import 'package:cast/discovery_service.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; final gCastRepositoryProvider = Provider((_) { diff --git a/mobile/lib/repositories/permission.repository.dart b/mobile/lib/repositories/permission.repository.dart index e4b6d99f25..932be4a290 100644 --- a/mobile/lib/repositories/permission.repository.dart +++ b/mobile/lib/repositories/permission.repository.dart @@ -1,67 +1,83 @@ +import 'package:device_info_plus/device_info_plus.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; +import 'package:immich_mobile/constants/enums.dart'; +import 'package:immich_mobile/extensions/platform_extensions.dart'; import 'package:immich_mobile/platform/permission_api.g.dart'; import 'package:immich_mobile/providers/infrastructure/platform.provider.dart'; -import 'package:permission_handler/permission_handler.dart'; +import 'package:permission_handler/permission_handler.dart' as ph; final permissionRepositoryProvider = Provider((ref) { - return PermissionRepository(ref.watch(permissionApiProvider)); + return DevicePermissionRepository(ref.watch(permissionApiProvider)); }); -class PermissionRepository implements IPermissionRepository { +class DevicePermissionRepository { final PermissionApi _permissionApi; - const PermissionRepository(this._permissionApi); + const DevicePermissionRepository(this._permissionApi); - @override - Future hasLocationWhenInUsePermission() { - return Permission.locationWhenInUse.isGranted; + Future getStatus(DevicePermission permission) async => + (await permission.handler.status).toDevicePermissionStatus(); + + Future request(DevicePermission permission) async => + (await permission.handler.request()).toDevicePermissionStatus(); + + // TODO(shenlong): Move this to it's own device info repo + Future getAndroidSdkVersion() async { + if (CurrentPlatform.isIOS) { + throw UnsupportedError("This method is available only on Android"); + } + + final androidInfo = await DeviceInfoPlugin().androidInfo; + return androidInfo.version.sdkInt; } - @override + Future hasLocationWhenInUsePermission() => ph.Permission.locationWhenInUse.isGranted; + Future requestLocationWhenInUsePermission() async { - final result = await Permission.locationWhenInUse.request(); + final result = await ph.Permission.locationWhenInUse.request(); return result.isGranted; } - @override Future hasLocationAlwaysPermission() { - return Permission.locationAlways.isGranted; + return ph.Permission.locationAlways.isGranted; } - @override Future requestLocationAlwaysPermission() async { - final result = await Permission.locationAlways.request(); + final result = await ph.Permission.locationAlways.request(); return result.isGranted; } - @override Future openSettings() { - return openAppSettings(); + return ph.openAppSettings(); } - @override Future hasManageMediaPermission() { return _permissionApi.hasManageMediaPermission(); } - @override Future requestManageMediaPermission() { return _permissionApi.requestManageMediaPermission(); } - @override Future manageMediaPermission() { return _permissionApi.manageMediaPermission(); } } -abstract interface class IPermissionRepository { - Future hasLocationWhenInUsePermission(); - Future requestLocationWhenInUsePermission(); - Future hasLocationAlwaysPermission(); - Future requestLocationAlwaysPermission(); - Future openSettings(); - Future hasManageMediaPermission(); - Future requestManageMediaPermission(); - Future manageMediaPermission(); +extension on DevicePermission { + ph.Permission get handler => switch (this) { + .photos => ph.Permission.photos, + .videos => ph.Permission.videos, + .storage => ph.Permission.storage, + .mediaLocation => ph.Permission.accessMediaLocation, + }; +} + +extension on ph.PermissionStatus { + DevicePermissionStatus toDevicePermissionStatus() => switch (this) { + .granted => .granted, + .limited => .limited, + .permanentlyDenied => .permanentlyDenied, + _ => .denied, + }; } diff --git a/mobile/lib/repositories/person_api.repository.dart b/mobile/lib/repositories/person_api.repository.dart index 26662601b7..262868eea1 100644 --- a/mobile/lib/repositories/person_api.repository.dart +++ b/mobile/lib/repositories/person_api.repository.dart @@ -11,12 +11,7 @@ class PersonApiRepository extends ApiRepository { PersonApiRepository(this._api); - Future> getAll() async { - final dto = await checkNull(_api.getAllPeople()); - return dto.people.map(_toPerson).toList(); - } - - Future update(String id, {String? name, DateTime? birthday}) async { + Future update(String id, {String? name, DateTime? birthday}) async { final birthdayUtc = birthday == null ? null : DateTime.utc(birthday.year, birthday.month, birthday.day); final dto = PersonUpdateDto( name: name == null ? const Optional.absent() : Optional.present(name), @@ -26,11 +21,6 @@ class PersonApiRepository extends ApiRepository { return _toPerson(response); } - static PersonDto _toPerson(PersonResponseDto dto) => PersonDto( - birthDate: dto.birthDate, - id: dto.id, - isHidden: dto.isHidden, - name: dto.name, - thumbnailPath: dto.thumbnailPath, - ); + static Person _toPerson(PersonResponseDto dto) => + .new(birthDate: dto.birthDate, id: dto.id, name: dto.name, updatedAt: dto.updatedAt.orElse(null)); } diff --git a/mobile/lib/repositories/upload.repository.dart b/mobile/lib/repositories/upload.repository.dart index 68522490d8..1ebc9825f4 100644 --- a/mobile/lib/repositories/upload.repository.dart +++ b/mobile/lib/repositories/upload.repository.dart @@ -4,13 +4,13 @@ import 'dart:io'; import 'package:background_downloader/background_downloader.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; +import 'package:http/http.dart'; import 'package:immich_mobile/constants/constants.dart'; import 'package:immich_mobile/domain/models/store.model.dart'; import 'package:immich_mobile/entities/store.entity.dart'; import 'package:immich_mobile/infrastructure/repositories/network.repository.dart'; -import 'package:logging/logging.dart'; -import 'package:http/http.dart'; import 'package:immich_mobile/utils/debug_print.dart'; +import 'package:logging/logging.dart'; final uploadRepositoryProvider = Provider((ref) => UploadRepository()); @@ -144,7 +144,7 @@ class UploadRepository { logger.warning("Upload $logContext was cancelled"); return UploadResult.cancelled(); } catch (error, stackTrace) { - logger.warning("Error uploading $logContext: ${error.toString()}: $stackTrace"); + logger.warning("Error uploading $logContext: $error: $stackTrace"); return UploadResult.error(errorMessage: error.toString()); } } diff --git a/mobile/lib/routing/app_navigation_observer.dart b/mobile/lib/routing/app_navigation_observer.dart index b6b08d7831..90381cf49c 100644 --- a/mobile/lib/routing/app_navigation_observer.dart +++ b/mobile/lib/routing/app_navigation_observer.dart @@ -4,7 +4,6 @@ import 'package:auto_route/auto_route.dart'; import 'package:flutter/material.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; import 'package:immich_mobile/providers/routes.provider.dart'; -import 'package:immich_mobile/routing/router.dart'; class AppNavigationObserver extends AutoRouterObserver { /// Riverpod Instance @@ -13,34 +12,40 @@ class AppNavigationObserver extends AutoRouterObserver { AppNavigationObserver({required this.ref}); @override - Future didChangeTabRoute(TabPageRoute route, TabPageRoute previousRoute) async { - unawaited(Future(() => ref.read(inLockedViewProvider.notifier).state = false)); + void didPush(Route route, Route? previousRoute) { + ref.invalidate(inLockedViewProvider); + ref.invalidate(isAssetViewerOpenProvider); + unawaited( + Future(() { + ref.read(currentRouteNameProvider.notifier).state = route.settings.name; + ref.read(previousRouteNameProvider.notifier).state = previousRoute?.settings.name; + ref.read(previousRouteDataProvider.notifier).state = previousRoute?.settings; + }), + ); } @override - void didPush(Route route, Route? previousRoute) { - _handleDriftLockedFolderState(route, previousRoute); - Future(() { - ref.read(currentRouteNameProvider.notifier).state = route.settings.name; - ref.read(previousRouteNameProvider.notifier).state = previousRoute?.settings.name; - ref.read(previousRouteDataProvider.notifier).state = previousRoute?.settings; - }); - } - - _handleDriftLockedFolderState(Route route, Route? previousRoute) { - final isInLockedView = ref.read(inLockedViewProvider); - final isFromLockedViewToDetailView = - route.settings.name == AssetViewerRoute.name && previousRoute?.settings.name == DriftLockedFolderRoute.name; - - final isFromDetailViewToInfoPanelView = - route.settings.name == null && previousRoute?.settings.name == AssetViewerRoute.name && isInLockedView; - - if (route.settings.name == DriftLockedFolderRoute.name || - isFromLockedViewToDetailView || - isFromDetailViewToInfoPanelView) { - Future(() => ref.read(inLockedViewProvider.notifier).state = true); - } else { - Future(() => ref.read(inLockedViewProvider.notifier).state = false); - } + void didPop(Route route, Route? previousRoute) { + ref.invalidate(inLockedViewProvider); + ref.invalidate(isAssetViewerOpenProvider); + } +} + +/// Tracks routes that are undergoing a pop transition +class TransitioningRouteObserver extends NavigatorObserver { + int _transitioningRoutes = 0; + + /// Whether a "popping" route is still on screen + bool get hasTransitioningRoute => _transitioningRoutes > 0; + + @override + void didPop(Route route, Route? previousRoute) { + if (route is! TransitionRoute) { + return; + } + + _transitioningRoutes += 1; + // Transition completed and route disposed + unawaited(route.completed.whenComplete(() => _transitioningRoutes -= 1)); } } diff --git a/mobile/lib/routing/duplicate_guard.dart b/mobile/lib/routing/duplicate_guard.dart index c55c7318d0..bffe6064ee 100644 --- a/mobile/lib/routing/duplicate_guard.dart +++ b/mobile/lib/routing/duplicate_guard.dart @@ -5,7 +5,7 @@ import 'package:immich_mobile/utils/debug_print.dart'; class DuplicateGuard extends AutoRouteGuard { const DuplicateGuard(); @override - void onNavigation(NavigationResolver resolver, StackRouter router) async { + Future onNavigation(NavigationResolver resolver, StackRouter router) async { // Duplicate navigation if (resolver.route.name == router.current.name) { dPrint(() => 'DuplicateGuard: Preventing duplicate route navigation for ${resolver.route.name}'); diff --git a/mobile/lib/routing/locked_guard.dart b/mobile/lib/routing/locked_guard.dart index 38484538e0..da0a025bca 100644 --- a/mobile/lib/routing/locked_guard.dart +++ b/mobile/lib/routing/locked_guard.dart @@ -21,7 +21,7 @@ class LockedGuard extends AutoRouteGuard { LockedGuard(this._apiService, this._secureStorageService, this._localAuth); @override - void onNavigation(NavigationResolver resolver, StackRouter router) async { + Future onNavigation(NavigationResolver resolver, StackRouter router) async { final authStatus = await _apiService.authenticationApi.getAuthStatus(); if (authStatus == null) { @@ -62,13 +62,10 @@ class LockedGuard extends AutoRouteGuard { switch (error.code) { case auth_error.notAvailable: _log.severe("notAvailable: $error"); - break; case auth_error.notEnrolled: _log.severe("not enrolled"); - break; default: _log.severe("error"); - break; } resolver.next(false); diff --git a/mobile/lib/routing/router.dart b/mobile/lib/routing/router.dart index a5403e3966..1d6455782c 100644 --- a/mobile/lib/routing/router.dart +++ b/mobile/lib/routing/router.dart @@ -65,12 +65,12 @@ import 'package:immich_mobile/presentation/pages/drift_trash.page.dart'; import 'package:immich_mobile/presentation/pages/drift_user_selection.page.dart'; import 'package:immich_mobile/presentation/pages/drift_video.page.dart'; import 'package:immich_mobile/presentation/pages/edit/drift_edit.page.dart'; +import 'package:immich_mobile/presentation/pages/feature_message/whats_new.page.dart'; import 'package:immich_mobile/presentation/pages/local_timeline.page.dart'; import 'package:immich_mobile/presentation/pages/profile/profile_picture_crop.page.dart'; import 'package:immich_mobile/presentation/pages/search/drift_search.page.dart'; import 'package:immich_mobile/presentation/widgets/asset_viewer/asset_viewer.page.dart'; import 'package:immich_mobile/providers/api.provider.dart'; -import 'package:immich_mobile/providers/gallery_permission.provider.dart'; import 'package:immich_mobile/routing/auth_guard.dart'; import 'package:immich_mobile/routing/duplicate_guard.dart'; import 'package:immich_mobile/routing/locked_guard.dart'; @@ -83,10 +83,10 @@ import 'package:maplibre_gl/maplibre_gl.dart'; part 'router.gr.dart'; final appRouterProvider = Provider( + // ignore: dispose-provided-instances (ref) => AppRouter( ref.watch(apiServiceProvider), ref.watch(authServiceProvider), - ref.watch(galleryPermissionNotifier.notifier), ref.watch(secureStorageServiceProvider), ref.watch(localAuthServiceProvider), ), @@ -101,7 +101,6 @@ class AppRouter extends RootStackRouter { AppRouter( ApiService apiService, AuthService authService, - GalleryPermissionNotifier galleryPermissionNotifier, SecureStorageService secureStorageService, LocalAuthService localAuthService, ) { @@ -131,6 +130,7 @@ class AppRouter extends RootStackRouter { AutoRoute(page: ProfilePictureCropRoute.page), AutoRoute(page: SettingsRoute.page, guards: [_duplicateGuard]), AutoRoute(page: SettingsSubRoute.page, guards: [_duplicateGuard]), + AutoRoute(page: WhatsNewRoute.page, guards: [_duplicateGuard]), AutoRoute(page: AppLogRoute.page, guards: [_duplicateGuard]), AutoRoute(page: AppLogDetailRoute.page, guards: [_duplicateGuard]), AutoRoute(page: FolderRoute.page, guards: [_authGuard]), @@ -154,7 +154,7 @@ class AppRouter extends RootStackRouter { customRouteBuilder: (context, child, page) => PageRouteBuilder( fullscreenDialog: page.fullscreenDialog, settings: page, - pageBuilder: (_, __, ___) => child, + pageBuilder: (_, _, _) => child, opaque: false, transitionsBuilder: TransitionsBuilders.fadeIn, ), diff --git a/mobile/lib/routing/router.gr.dart b/mobile/lib/routing/router.gr.dart deleted file mode 100644 index bc7226c2ee..0000000000 --- a/mobile/lib/routing/router.gr.dart +++ /dev/null @@ -1,1874 +0,0 @@ -// dart format width=80 -// GENERATED CODE - DO NOT MODIFY BY HAND - -// ************************************************************************** -// AutoRouterGenerator -// ************************************************************************** - -// ignore_for_file: type=lint -// coverage:ignore-file - -part of 'router.dart'; - -/// generated route for -/// [AppLogDetailPage] -class AppLogDetailRoute extends PageRouteInfo { - AppLogDetailRoute({ - Key? key, - required LogMessage logMessage, - List? children, - }) : super( - AppLogDetailRoute.name, - args: AppLogDetailRouteArgs(key: key, logMessage: logMessage), - initialChildren: children, - ); - - static const String name = 'AppLogDetailRoute'; - - static PageInfo page = PageInfo( - name, - builder: (data) { - final args = data.argsAs(); - return AppLogDetailPage(key: args.key, logMessage: args.logMessage); - }, - ); -} - -class AppLogDetailRouteArgs { - const AppLogDetailRouteArgs({this.key, required this.logMessage}); - - final Key? key; - - final LogMessage logMessage; - - @override - String toString() { - return 'AppLogDetailRouteArgs{key: $key, logMessage: $logMessage}'; - } - - @override - bool operator ==(Object other) { - if (identical(this, other)) return true; - if (other is! AppLogDetailRouteArgs) return false; - return key == other.key && logMessage == other.logMessage; - } - - @override - int get hashCode => key.hashCode ^ logMessage.hashCode; -} - -/// generated route for -/// [AppLogPage] -class AppLogRoute extends PageRouteInfo { - const AppLogRoute({List? children}) - : super(AppLogRoute.name, initialChildren: children); - - static const String name = 'AppLogRoute'; - - static PageInfo page = PageInfo( - name, - builder: (data) { - return const AppLogPage(); - }, - ); -} - -/// generated route for -/// [AssetTroubleshootPage] -class AssetTroubleshootRoute extends PageRouteInfo { - AssetTroubleshootRoute({ - Key? key, - required BaseAsset asset, - List? children, - }) : super( - AssetTroubleshootRoute.name, - args: AssetTroubleshootRouteArgs(key: key, asset: asset), - initialChildren: children, - ); - - static const String name = 'AssetTroubleshootRoute'; - - static PageInfo page = PageInfo( - name, - builder: (data) { - final args = data.argsAs(); - return AssetTroubleshootPage(key: args.key, asset: args.asset); - }, - ); -} - -class AssetTroubleshootRouteArgs { - const AssetTroubleshootRouteArgs({this.key, required this.asset}); - - final Key? key; - - final BaseAsset asset; - - @override - String toString() { - return 'AssetTroubleshootRouteArgs{key: $key, asset: $asset}'; - } - - @override - bool operator ==(Object other) { - if (identical(this, other)) return true; - if (other is! AssetTroubleshootRouteArgs) return false; - return key == other.key && asset == other.asset; - } - - @override - int get hashCode => key.hashCode ^ asset.hashCode; -} - -/// generated route for -/// [AssetViewerPage] -class AssetViewerRoute extends PageRouteInfo { - AssetViewerRoute({ - Key? key, - required int initialIndex, - required TimelineService timelineService, - int? heroOffset, - RemoteAlbum? currentAlbum, - List? children, - }) : super( - AssetViewerRoute.name, - args: AssetViewerRouteArgs( - key: key, - initialIndex: initialIndex, - timelineService: timelineService, - heroOffset: heroOffset, - currentAlbum: currentAlbum, - ), - initialChildren: children, - ); - - static const String name = 'AssetViewerRoute'; - - static PageInfo page = PageInfo( - name, - builder: (data) { - final args = data.argsAs(); - return AssetViewerPage( - key: args.key, - initialIndex: args.initialIndex, - timelineService: args.timelineService, - heroOffset: args.heroOffset, - currentAlbum: args.currentAlbum, - ); - }, - ); -} - -class AssetViewerRouteArgs { - const AssetViewerRouteArgs({ - this.key, - required this.initialIndex, - required this.timelineService, - this.heroOffset, - this.currentAlbum, - }); - - final Key? key; - - final int initialIndex; - - final TimelineService timelineService; - - final int? heroOffset; - - final RemoteAlbum? currentAlbum; - - @override - String toString() { - return 'AssetViewerRouteArgs{key: $key, initialIndex: $initialIndex, timelineService: $timelineService, heroOffset: $heroOffset, currentAlbum: $currentAlbum}'; - } - - @override - bool operator ==(Object other) { - if (identical(this, other)) return true; - if (other is! AssetViewerRouteArgs) return false; - return key == other.key && - initialIndex == other.initialIndex && - timelineService == other.timelineService && - heroOffset == other.heroOffset && - currentAlbum == other.currentAlbum; - } - - @override - int get hashCode => - key.hashCode ^ - initialIndex.hashCode ^ - timelineService.hashCode ^ - heroOffset.hashCode ^ - currentAlbum.hashCode; -} - -/// generated route for -/// [ChangePasswordPage] -class ChangePasswordRoute extends PageRouteInfo { - const ChangePasswordRoute({List? children}) - : super(ChangePasswordRoute.name, initialChildren: children); - - static const String name = 'ChangePasswordRoute'; - - static PageInfo page = PageInfo( - name, - builder: (data) { - return const ChangePasswordPage(); - }, - ); -} - -/// generated route for -/// [CleanupPreviewPage] -class CleanupPreviewRoute extends PageRouteInfo { - CleanupPreviewRoute({ - Key? key, - required List assets, - List? children, - }) : super( - CleanupPreviewRoute.name, - args: CleanupPreviewRouteArgs(key: key, assets: assets), - initialChildren: children, - ); - - static const String name = 'CleanupPreviewRoute'; - - static PageInfo page = PageInfo( - name, - builder: (data) { - final args = data.argsAs(); - return CleanupPreviewPage(key: args.key, assets: args.assets); - }, - ); -} - -class CleanupPreviewRouteArgs { - const CleanupPreviewRouteArgs({this.key, required this.assets}); - - final Key? key; - - final List assets; - - @override - String toString() { - return 'CleanupPreviewRouteArgs{key: $key, assets: $assets}'; - } - - @override - bool operator ==(Object other) { - if (identical(this, other)) return true; - if (other is! CleanupPreviewRouteArgs) return false; - return key == other.key && - const ListEquality().equals(assets, other.assets); - } - - @override - int get hashCode => - key.hashCode ^ const ListEquality().hash(assets); -} - -/// generated route for -/// [DownloadInfoPage] -class DownloadInfoRoute extends PageRouteInfo { - const DownloadInfoRoute({List? children}) - : super(DownloadInfoRoute.name, initialChildren: children); - - static const String name = 'DownloadInfoRoute'; - - static PageInfo page = PageInfo( - name, - builder: (data) { - return const DownloadInfoPage(); - }, - ); -} - -/// generated route for -/// [DriftActivitiesPage] -class DriftActivitiesRoute extends PageRouteInfo { - DriftActivitiesRoute({ - Key? key, - required RemoteAlbum album, - String? assetId, - String? assetName, - List? children, - }) : super( - DriftActivitiesRoute.name, - args: DriftActivitiesRouteArgs( - key: key, - album: album, - assetId: assetId, - assetName: assetName, - ), - initialChildren: children, - ); - - static const String name = 'DriftActivitiesRoute'; - - static PageInfo page = PageInfo( - name, - builder: (data) { - final args = data.argsAs(); - return DriftActivitiesPage( - key: args.key, - album: args.album, - assetId: args.assetId, - assetName: args.assetName, - ); - }, - ); -} - -class DriftActivitiesRouteArgs { - const DriftActivitiesRouteArgs({ - this.key, - required this.album, - this.assetId, - this.assetName, - }); - - final Key? key; - - final RemoteAlbum album; - - final String? assetId; - - final String? assetName; - - @override - String toString() { - return 'DriftActivitiesRouteArgs{key: $key, album: $album, assetId: $assetId, assetName: $assetName}'; - } - - @override - bool operator ==(Object other) { - if (identical(this, other)) return true; - if (other is! DriftActivitiesRouteArgs) return false; - return key == other.key && - album == other.album && - assetId == other.assetId && - assetName == other.assetName; - } - - @override - int get hashCode => - key.hashCode ^ album.hashCode ^ assetId.hashCode ^ assetName.hashCode; -} - -/// generated route for -/// [DriftAlbumOptionsPage] -class DriftAlbumOptionsRoute extends PageRouteInfo { - DriftAlbumOptionsRoute({ - Key? key, - required RemoteAlbum album, - List? children, - }) : super( - DriftAlbumOptionsRoute.name, - args: DriftAlbumOptionsRouteArgs(key: key, album: album), - initialChildren: children, - ); - - static const String name = 'DriftAlbumOptionsRoute'; - - static PageInfo page = PageInfo( - name, - builder: (data) { - final args = data.argsAs(); - return DriftAlbumOptionsPage(key: args.key, album: args.album); - }, - ); -} - -class DriftAlbumOptionsRouteArgs { - const DriftAlbumOptionsRouteArgs({this.key, required this.album}); - - final Key? key; - - final RemoteAlbum album; - - @override - String toString() { - return 'DriftAlbumOptionsRouteArgs{key: $key, album: $album}'; - } - - @override - bool operator ==(Object other) { - if (identical(this, other)) return true; - if (other is! DriftAlbumOptionsRouteArgs) return false; - return key == other.key && album == other.album; - } - - @override - int get hashCode => key.hashCode ^ album.hashCode; -} - -/// generated route for -/// [DriftAlbumsPage] -class DriftAlbumsRoute extends PageRouteInfo { - const DriftAlbumsRoute({List? children}) - : super(DriftAlbumsRoute.name, initialChildren: children); - - static const String name = 'DriftAlbumsRoute'; - - static PageInfo page = PageInfo( - name, - builder: (data) { - return const DriftAlbumsPage(); - }, - ); -} - -/// generated route for -/// [DriftArchivePage] -class DriftArchiveRoute extends PageRouteInfo { - const DriftArchiveRoute({List? children}) - : super(DriftArchiveRoute.name, initialChildren: children); - - static const String name = 'DriftArchiveRoute'; - - static PageInfo page = PageInfo( - name, - builder: (data) { - return const DriftArchivePage(); - }, - ); -} - -/// generated route for -/// [DriftAssetSelectionTimelinePage] -class DriftAssetSelectionTimelineRoute - extends PageRouteInfo { - DriftAssetSelectionTimelineRoute({ - Key? key, - Set lockedSelectionAssets = const {}, - List? children, - }) : super( - DriftAssetSelectionTimelineRoute.name, - args: DriftAssetSelectionTimelineRouteArgs( - key: key, - lockedSelectionAssets: lockedSelectionAssets, - ), - initialChildren: children, - ); - - static const String name = 'DriftAssetSelectionTimelineRoute'; - - static PageInfo page = PageInfo( - name, - builder: (data) { - final args = data.argsAs( - orElse: () => const DriftAssetSelectionTimelineRouteArgs(), - ); - return DriftAssetSelectionTimelinePage( - key: args.key, - lockedSelectionAssets: args.lockedSelectionAssets, - ); - }, - ); -} - -class DriftAssetSelectionTimelineRouteArgs { - const DriftAssetSelectionTimelineRouteArgs({ - this.key, - this.lockedSelectionAssets = const {}, - }); - - final Key? key; - - final Set lockedSelectionAssets; - - @override - String toString() { - return 'DriftAssetSelectionTimelineRouteArgs{key: $key, lockedSelectionAssets: $lockedSelectionAssets}'; - } - - @override - bool operator ==(Object other) { - if (identical(this, other)) return true; - if (other is! DriftAssetSelectionTimelineRouteArgs) return false; - return key == other.key && - const SetEquality().equals( - lockedSelectionAssets, - other.lockedSelectionAssets, - ); - } - - @override - int get hashCode => - key.hashCode ^ const SetEquality().hash(lockedSelectionAssets); -} - -/// generated route for -/// [DriftBackupAlbumSelectionPage] -class DriftBackupAlbumSelectionRoute extends PageRouteInfo { - const DriftBackupAlbumSelectionRoute({List? children}) - : super(DriftBackupAlbumSelectionRoute.name, initialChildren: children); - - static const String name = 'DriftBackupAlbumSelectionRoute'; - - static PageInfo page = PageInfo( - name, - builder: (data) { - return const DriftBackupAlbumSelectionPage(); - }, - ); -} - -/// generated route for -/// [DriftBackupAssetDetailPage] -class DriftBackupAssetDetailRoute extends PageRouteInfo { - const DriftBackupAssetDetailRoute({List? children}) - : super(DriftBackupAssetDetailRoute.name, initialChildren: children); - - static const String name = 'DriftBackupAssetDetailRoute'; - - static PageInfo page = PageInfo( - name, - builder: (data) { - return const DriftBackupAssetDetailPage(); - }, - ); -} - -/// generated route for -/// [DriftBackupOptionsPage] -class DriftBackupOptionsRoute extends PageRouteInfo { - const DriftBackupOptionsRoute({List? children}) - : super(DriftBackupOptionsRoute.name, initialChildren: children); - - static const String name = 'DriftBackupOptionsRoute'; - - static PageInfo page = PageInfo( - name, - builder: (data) { - return const DriftBackupOptionsPage(); - }, - ); -} - -/// generated route for -/// [DriftBackupPage] -class DriftBackupRoute extends PageRouteInfo { - const DriftBackupRoute({List? children}) - : super(DriftBackupRoute.name, initialChildren: children); - - static const String name = 'DriftBackupRoute'; - - static PageInfo page = PageInfo( - name, - builder: (data) { - return const DriftBackupPage(); - }, - ); -} - -/// generated route for -/// [DriftCreateAlbumPage] -class DriftCreateAlbumRoute extends PageRouteInfo { - const DriftCreateAlbumRoute({List? children}) - : super(DriftCreateAlbumRoute.name, initialChildren: children); - - static const String name = 'DriftCreateAlbumRoute'; - - static PageInfo page = PageInfo( - name, - builder: (data) { - return const DriftCreateAlbumPage(); - }, - ); -} - -/// generated route for -/// [DriftEditImagePage] -class DriftEditImageRoute extends PageRouteInfo { - DriftEditImageRoute({ - Key? key, - required Image image, - required Future Function(List) applyEdits, - List? children, - }) : super( - DriftEditImageRoute.name, - args: DriftEditImageRouteArgs( - key: key, - image: image, - applyEdits: applyEdits, - ), - initialChildren: children, - ); - - static const String name = 'DriftEditImageRoute'; - - static PageInfo page = PageInfo( - name, - builder: (data) { - final args = data.argsAs(); - return DriftEditImagePage( - key: args.key, - image: args.image, - applyEdits: args.applyEdits, - ); - }, - ); -} - -class DriftEditImageRouteArgs { - const DriftEditImageRouteArgs({ - this.key, - required this.image, - required this.applyEdits, - }); - - final Key? key; - - final Image image; - - final Future Function(List) applyEdits; - - @override - String toString() { - return 'DriftEditImageRouteArgs{key: $key, image: $image, applyEdits: $applyEdits}'; - } - - @override - bool operator ==(Object other) { - if (identical(this, other)) return true; - if (other is! DriftEditImageRouteArgs) return false; - return key == other.key && image == other.image; - } - - @override - int get hashCode => key.hashCode ^ image.hashCode; -} - -/// generated route for -/// [DriftFavoritePage] -class DriftFavoriteRoute extends PageRouteInfo { - const DriftFavoriteRoute({List? children}) - : super(DriftFavoriteRoute.name, initialChildren: children); - - static const String name = 'DriftFavoriteRoute'; - - static PageInfo page = PageInfo( - name, - builder: (data) { - return const DriftFavoritePage(); - }, - ); -} - -/// generated route for -/// [DriftLibraryPage] -class DriftLibraryRoute extends PageRouteInfo { - const DriftLibraryRoute({List? children}) - : super(DriftLibraryRoute.name, initialChildren: children); - - static const String name = 'DriftLibraryRoute'; - - static PageInfo page = PageInfo( - name, - builder: (data) { - return const DriftLibraryPage(); - }, - ); -} - -/// generated route for -/// [DriftLocalAlbumsPage] -class DriftLocalAlbumsRoute extends PageRouteInfo { - const DriftLocalAlbumsRoute({List? children}) - : super(DriftLocalAlbumsRoute.name, initialChildren: children); - - static const String name = 'DriftLocalAlbumsRoute'; - - static PageInfo page = PageInfo( - name, - builder: (data) { - return const DriftLocalAlbumsPage(); - }, - ); -} - -/// generated route for -/// [DriftLockedFolderPage] -class DriftLockedFolderRoute extends PageRouteInfo { - const DriftLockedFolderRoute({List? children}) - : super(DriftLockedFolderRoute.name, initialChildren: children); - - static const String name = 'DriftLockedFolderRoute'; - - static PageInfo page = PageInfo( - name, - builder: (data) { - return const DriftLockedFolderPage(); - }, - ); -} - -/// generated route for -/// [DriftMapPage] -class DriftMapRoute extends PageRouteInfo { - DriftMapRoute({ - Key? key, - LatLng? initialLocation, - List? children, - }) : super( - DriftMapRoute.name, - args: DriftMapRouteArgs(key: key, initialLocation: initialLocation), - initialChildren: children, - ); - - static const String name = 'DriftMapRoute'; - - static PageInfo page = PageInfo( - name, - builder: (data) { - final args = data.argsAs( - orElse: () => const DriftMapRouteArgs(), - ); - return DriftMapPage(key: args.key, initialLocation: args.initialLocation); - }, - ); -} - -class DriftMapRouteArgs { - const DriftMapRouteArgs({this.key, this.initialLocation}); - - final Key? key; - - final LatLng? initialLocation; - - @override - String toString() { - return 'DriftMapRouteArgs{key: $key, initialLocation: $initialLocation}'; - } - - @override - bool operator ==(Object other) { - if (identical(this, other)) return true; - if (other is! DriftMapRouteArgs) return false; - return key == other.key && initialLocation == other.initialLocation; - } - - @override - int get hashCode => key.hashCode ^ initialLocation.hashCode; -} - -/// generated route for -/// [DriftMemoryPage] -class DriftMemoryRoute extends PageRouteInfo { - DriftMemoryRoute({ - required List memories, - required int memoryIndex, - Key? key, - List? children, - }) : super( - DriftMemoryRoute.name, - args: DriftMemoryRouteArgs( - memories: memories, - memoryIndex: memoryIndex, - key: key, - ), - initialChildren: children, - ); - - static const String name = 'DriftMemoryRoute'; - - static PageInfo page = PageInfo( - name, - builder: (data) { - final args = data.argsAs(); - return DriftMemoryPage( - memories: args.memories, - memoryIndex: args.memoryIndex, - key: args.key, - ); - }, - ); -} - -class DriftMemoryRouteArgs { - const DriftMemoryRouteArgs({ - required this.memories, - required this.memoryIndex, - this.key, - }); - - final List memories; - - final int memoryIndex; - - final Key? key; - - @override - String toString() { - return 'DriftMemoryRouteArgs{memories: $memories, memoryIndex: $memoryIndex, key: $key}'; - } - - @override - bool operator ==(Object other) { - if (identical(this, other)) return true; - if (other is! DriftMemoryRouteArgs) return false; - return const ListEquality().equals(memories, other.memories) && - memoryIndex == other.memoryIndex && - key == other.key; - } - - @override - int get hashCode => - const ListEquality().hash(memories) ^ - memoryIndex.hashCode ^ - key.hashCode; -} - -/// generated route for -/// [DriftPartnerDetailPage] -class DriftPartnerDetailRoute - extends PageRouteInfo { - DriftPartnerDetailRoute({ - Key? key, - required Partner partner, - List? children, - }) : super( - DriftPartnerDetailRoute.name, - args: DriftPartnerDetailRouteArgs(key: key, partner: partner), - initialChildren: children, - ); - - static const String name = 'DriftPartnerDetailRoute'; - - static PageInfo page = PageInfo( - name, - builder: (data) { - final args = data.argsAs(); - return DriftPartnerDetailPage(key: args.key, partner: args.partner); - }, - ); -} - -class DriftPartnerDetailRouteArgs { - const DriftPartnerDetailRouteArgs({this.key, required this.partner}); - - final Key? key; - - final Partner partner; - - @override - String toString() { - return 'DriftPartnerDetailRouteArgs{key: $key, partner: $partner}'; - } - - @override - bool operator ==(Object other) { - if (identical(this, other)) return true; - if (other is! DriftPartnerDetailRouteArgs) return false; - return key == other.key && partner == other.partner; - } - - @override - int get hashCode => key.hashCode ^ partner.hashCode; -} - -/// generated route for -/// [DriftPeopleCollectionPage] -class DriftPeopleCollectionRoute extends PageRouteInfo { - const DriftPeopleCollectionRoute({List? children}) - : super(DriftPeopleCollectionRoute.name, initialChildren: children); - - static const String name = 'DriftPeopleCollectionRoute'; - - static PageInfo page = PageInfo( - name, - builder: (data) { - return const DriftPeopleCollectionPage(); - }, - ); -} - -/// generated route for -/// [DriftPersonPage] -class DriftPersonRoute extends PageRouteInfo { - DriftPersonRoute({ - Key? key, - required DriftPerson person, - List? children, - }) : super( - DriftPersonRoute.name, - args: DriftPersonRouteArgs(key: key, person: person), - initialChildren: children, - ); - - static const String name = 'DriftPersonRoute'; - - static PageInfo page = PageInfo( - name, - builder: (data) { - final args = data.argsAs(); - return DriftPersonPage(key: args.key, person: args.person); - }, - ); -} - -class DriftPersonRouteArgs { - const DriftPersonRouteArgs({this.key, required this.person}); - - final Key? key; - - final DriftPerson person; - - @override - String toString() { - return 'DriftPersonRouteArgs{key: $key, person: $person}'; - } - - @override - bool operator ==(Object other) { - if (identical(this, other)) return true; - if (other is! DriftPersonRouteArgs) return false; - return key == other.key && person == other.person; - } - - @override - int get hashCode => key.hashCode ^ person.hashCode; -} - -/// generated route for -/// [DriftPlaceDetailPage] -class DriftPlaceDetailRoute extends PageRouteInfo { - DriftPlaceDetailRoute({ - Key? key, - required String place, - List? children, - }) : super( - DriftPlaceDetailRoute.name, - args: DriftPlaceDetailRouteArgs(key: key, place: place), - initialChildren: children, - ); - - static const String name = 'DriftPlaceDetailRoute'; - - static PageInfo page = PageInfo( - name, - builder: (data) { - final args = data.argsAs(); - return DriftPlaceDetailPage(key: args.key, place: args.place); - }, - ); -} - -class DriftPlaceDetailRouteArgs { - const DriftPlaceDetailRouteArgs({this.key, required this.place}); - - final Key? key; - - final String place; - - @override - String toString() { - return 'DriftPlaceDetailRouteArgs{key: $key, place: $place}'; - } - - @override - bool operator ==(Object other) { - if (identical(this, other)) return true; - if (other is! DriftPlaceDetailRouteArgs) return false; - return key == other.key && place == other.place; - } - - @override - int get hashCode => key.hashCode ^ place.hashCode; -} - -/// generated route for -/// [DriftPlacePage] -class DriftPlaceRoute extends PageRouteInfo { - DriftPlaceRoute({ - Key? key, - LatLng? currentLocation, - List? children, - }) : super( - DriftPlaceRoute.name, - args: DriftPlaceRouteArgs(key: key, currentLocation: currentLocation), - initialChildren: children, - ); - - static const String name = 'DriftPlaceRoute'; - - static PageInfo page = PageInfo( - name, - builder: (data) { - final args = data.argsAs( - orElse: () => const DriftPlaceRouteArgs(), - ); - return DriftPlacePage( - key: args.key, - currentLocation: args.currentLocation, - ); - }, - ); -} - -class DriftPlaceRouteArgs { - const DriftPlaceRouteArgs({this.key, this.currentLocation}); - - final Key? key; - - final LatLng? currentLocation; - - @override - String toString() { - return 'DriftPlaceRouteArgs{key: $key, currentLocation: $currentLocation}'; - } - - @override - bool operator ==(Object other) { - if (identical(this, other)) return true; - if (other is! DriftPlaceRouteArgs) return false; - return key == other.key && currentLocation == other.currentLocation; - } - - @override - int get hashCode => key.hashCode ^ currentLocation.hashCode; -} - -/// generated route for -/// [DriftRecentlyAddedPage] -class DriftRecentlyAddedRoute extends PageRouteInfo { - const DriftRecentlyAddedRoute({List? children}) - : super(DriftRecentlyAddedRoute.name, initialChildren: children); - - static const String name = 'DriftRecentlyAddedRoute'; - - static PageInfo page = PageInfo( - name, - builder: (data) { - return const DriftRecentlyAddedPage(); - }, - ); -} - -/// generated route for -/// [DriftRecentlyTakenPage] -class DriftRecentlyTakenRoute extends PageRouteInfo { - const DriftRecentlyTakenRoute({List? children}) - : super(DriftRecentlyTakenRoute.name, initialChildren: children); - - static const String name = 'DriftRecentlyTakenRoute'; - - static PageInfo page = PageInfo( - name, - builder: (data) { - return const DriftRecentlyTakenPage(); - }, - ); -} - -/// generated route for -/// [DriftSearchPage] -class DriftSearchRoute extends PageRouteInfo { - const DriftSearchRoute({List? children}) - : super(DriftSearchRoute.name, initialChildren: children); - - static const String name = 'DriftSearchRoute'; - - static PageInfo page = PageInfo( - name, - builder: (data) { - return const DriftSearchPage(); - }, - ); -} - -/// generated route for -/// [DriftSlideshowPage] -class DriftSlideshowRoute extends PageRouteInfo { - DriftSlideshowRoute({ - Key? key, - required TimelineService timeline, - List? children, - }) : super( - DriftSlideshowRoute.name, - args: DriftSlideshowRouteArgs(key: key, timeline: timeline), - initialChildren: children, - ); - - static const String name = 'DriftSlideshowRoute'; - - static PageInfo page = PageInfo( - name, - builder: (data) { - final args = data.argsAs(); - return DriftSlideshowPage(key: args.key, timeline: args.timeline); - }, - ); -} - -class DriftSlideshowRouteArgs { - const DriftSlideshowRouteArgs({this.key, required this.timeline}); - - final Key? key; - - final TimelineService timeline; - - @override - String toString() { - return 'DriftSlideshowRouteArgs{key: $key, timeline: $timeline}'; - } - - @override - bool operator ==(Object other) { - if (identical(this, other)) return true; - if (other is! DriftSlideshowRouteArgs) return false; - return key == other.key && timeline == other.timeline; - } - - @override - int get hashCode => key.hashCode ^ timeline.hashCode; -} - -/// generated route for -/// [DriftTrashPage] -class DriftTrashRoute extends PageRouteInfo { - const DriftTrashRoute({List? children}) - : super(DriftTrashRoute.name, initialChildren: children); - - static const String name = 'DriftTrashRoute'; - - static PageInfo page = PageInfo( - name, - builder: (data) { - return const DriftTrashPage(); - }, - ); -} - -/// generated route for -/// [DriftUploadDetailPage] -class DriftUploadDetailRoute extends PageRouteInfo { - const DriftUploadDetailRoute({List? children}) - : super(DriftUploadDetailRoute.name, initialChildren: children); - - static const String name = 'DriftUploadDetailRoute'; - - static PageInfo page = PageInfo( - name, - builder: (data) { - return const DriftUploadDetailPage(); - }, - ); -} - -/// generated route for -/// [DriftUserSelectionPage] -class DriftUserSelectionRoute - extends PageRouteInfo { - DriftUserSelectionRoute({ - Key? key, - required RemoteAlbum album, - List? children, - }) : super( - DriftUserSelectionRoute.name, - args: DriftUserSelectionRouteArgs(key: key, album: album), - initialChildren: children, - ); - - static const String name = 'DriftUserSelectionRoute'; - - static PageInfo page = PageInfo( - name, - builder: (data) { - final args = data.argsAs(); - return DriftUserSelectionPage(key: args.key, album: args.album); - }, - ); -} - -class DriftUserSelectionRouteArgs { - const DriftUserSelectionRouteArgs({this.key, required this.album}); - - final Key? key; - - final RemoteAlbum album; - - @override - String toString() { - return 'DriftUserSelectionRouteArgs{key: $key, album: $album}'; - } - - @override - bool operator ==(Object other) { - if (identical(this, other)) return true; - if (other is! DriftUserSelectionRouteArgs) return false; - return key == other.key && album == other.album; - } - - @override - int get hashCode => key.hashCode ^ album.hashCode; -} - -/// generated route for -/// [DriftVideoPage] -class DriftVideoRoute extends PageRouteInfo { - const DriftVideoRoute({List? children}) - : super(DriftVideoRoute.name, initialChildren: children); - - static const String name = 'DriftVideoRoute'; - - static PageInfo page = PageInfo( - name, - builder: (data) { - return const DriftVideoPage(); - }, - ); -} - -/// generated route for -/// [FolderPage] -class FolderRoute extends PageRouteInfo { - FolderRoute({ - Key? key, - RecursiveFolder? folder, - List? children, - }) : super( - FolderRoute.name, - args: FolderRouteArgs(key: key, folder: folder), - initialChildren: children, - ); - - static const String name = 'FolderRoute'; - - static PageInfo page = PageInfo( - name, - builder: (data) { - final args = data.argsAs( - orElse: () => const FolderRouteArgs(), - ); - return FolderPage(key: args.key, folder: args.folder); - }, - ); -} - -class FolderRouteArgs { - const FolderRouteArgs({this.key, this.folder}); - - final Key? key; - - final RecursiveFolder? folder; - - @override - String toString() { - return 'FolderRouteArgs{key: $key, folder: $folder}'; - } - - @override - bool operator ==(Object other) { - if (identical(this, other)) return true; - if (other is! FolderRouteArgs) return false; - return key == other.key && folder == other.folder; - } - - @override - int get hashCode => key.hashCode ^ folder.hashCode; -} - -/// generated route for -/// [HeaderSettingsPage] -class HeaderSettingsRoute extends PageRouteInfo { - const HeaderSettingsRoute({List? children}) - : super(HeaderSettingsRoute.name, initialChildren: children); - - static const String name = 'HeaderSettingsRoute'; - - static PageInfo page = PageInfo( - name, - builder: (data) { - return const HeaderSettingsPage(); - }, - ); -} - -/// generated route for -/// [LocalMediaSummaryPage] -class LocalMediaSummaryRoute extends PageRouteInfo { - const LocalMediaSummaryRoute({List? children}) - : super(LocalMediaSummaryRoute.name, initialChildren: children); - - static const String name = 'LocalMediaSummaryRoute'; - - static PageInfo page = PageInfo( - name, - builder: (data) { - return const LocalMediaSummaryPage(); - }, - ); -} - -/// generated route for -/// [LocalTimelinePage] -class LocalTimelineRoute extends PageRouteInfo { - LocalTimelineRoute({ - Key? key, - required LocalAlbum album, - List? children, - }) : super( - LocalTimelineRoute.name, - args: LocalTimelineRouteArgs(key: key, album: album), - initialChildren: children, - ); - - static const String name = 'LocalTimelineRoute'; - - static PageInfo page = PageInfo( - name, - builder: (data) { - final args = data.argsAs(); - return LocalTimelinePage(key: args.key, album: args.album); - }, - ); -} - -class LocalTimelineRouteArgs { - const LocalTimelineRouteArgs({this.key, required this.album}); - - final Key? key; - - final LocalAlbum album; - - @override - String toString() { - return 'LocalTimelineRouteArgs{key: $key, album: $album}'; - } - - @override - bool operator ==(Object other) { - if (identical(this, other)) return true; - if (other is! LocalTimelineRouteArgs) return false; - return key == other.key && album == other.album; - } - - @override - int get hashCode => key.hashCode ^ album.hashCode; -} - -/// generated route for -/// [LoginPage] -class LoginRoute extends PageRouteInfo { - const LoginRoute({List? children}) - : super(LoginRoute.name, initialChildren: children); - - static const String name = 'LoginRoute'; - - static PageInfo page = PageInfo( - name, - builder: (data) { - return const LoginPage(); - }, - ); -} - -/// generated route for -/// [MainTimelinePage] -class MainTimelineRoute extends PageRouteInfo { - const MainTimelineRoute({List? children}) - : super(MainTimelineRoute.name, initialChildren: children); - - static const String name = 'MainTimelineRoute'; - - static PageInfo page = PageInfo( - name, - builder: (data) { - return const MainTimelinePage(); - }, - ); -} - -/// generated route for -/// [MapLocationPickerPage] -class MapLocationPickerRoute extends PageRouteInfo { - MapLocationPickerRoute({ - Key? key, - LatLng initialLatLng = const LatLng(0, 0), - List? children, - }) : super( - MapLocationPickerRoute.name, - args: MapLocationPickerRouteArgs( - key: key, - initialLatLng: initialLatLng, - ), - initialChildren: children, - ); - - static const String name = 'MapLocationPickerRoute'; - - static PageInfo page = PageInfo( - name, - builder: (data) { - final args = data.argsAs( - orElse: () => const MapLocationPickerRouteArgs(), - ); - return MapLocationPickerPage( - key: args.key, - initialLatLng: args.initialLatLng, - ); - }, - ); -} - -class MapLocationPickerRouteArgs { - const MapLocationPickerRouteArgs({ - this.key, - this.initialLatLng = const LatLng(0, 0), - }); - - final Key? key; - - final LatLng initialLatLng; - - @override - String toString() { - return 'MapLocationPickerRouteArgs{key: $key, initialLatLng: $initialLatLng}'; - } - - @override - bool operator ==(Object other) { - if (identical(this, other)) return true; - if (other is! MapLocationPickerRouteArgs) return false; - return key == other.key && initialLatLng == other.initialLatLng; - } - - @override - int get hashCode => key.hashCode ^ initialLatLng.hashCode; -} - -/// generated route for -/// [PartnerPage] -class PartnerRoute extends PageRouteInfo { - const PartnerRoute({List? children}) - : super(PartnerRoute.name, initialChildren: children); - - static const String name = 'PartnerRoute'; - - static PageInfo page = PageInfo( - name, - builder: (data) { - return const PartnerPage(); - }, - ); -} - -/// generated route for -/// [PinAuthPage] -class PinAuthRoute extends PageRouteInfo { - PinAuthRoute({ - Key? key, - bool createPinCode = false, - List? children, - }) : super( - PinAuthRoute.name, - args: PinAuthRouteArgs(key: key, createPinCode: createPinCode), - initialChildren: children, - ); - - static const String name = 'PinAuthRoute'; - - static PageInfo page = PageInfo( - name, - builder: (data) { - final args = data.argsAs( - orElse: () => const PinAuthRouteArgs(), - ); - return PinAuthPage(key: args.key, createPinCode: args.createPinCode); - }, - ); -} - -class PinAuthRouteArgs { - const PinAuthRouteArgs({this.key, this.createPinCode = false}); - - final Key? key; - - final bool createPinCode; - - @override - String toString() { - return 'PinAuthRouteArgs{key: $key, createPinCode: $createPinCode}'; - } - - @override - bool operator ==(Object other) { - if (identical(this, other)) return true; - if (other is! PinAuthRouteArgs) return false; - return key == other.key && createPinCode == other.createPinCode; - } - - @override - int get hashCode => key.hashCode ^ createPinCode.hashCode; -} - -/// generated route for -/// [ProfilePictureCropPage] -class ProfilePictureCropRoute - extends PageRouteInfo { - ProfilePictureCropRoute({ - Key? key, - required BaseAsset asset, - List? children, - }) : super( - ProfilePictureCropRoute.name, - args: ProfilePictureCropRouteArgs(key: key, asset: asset), - initialChildren: children, - ); - - static const String name = 'ProfilePictureCropRoute'; - - static PageInfo page = PageInfo( - name, - builder: (data) { - final args = data.argsAs(); - return ProfilePictureCropPage(key: args.key, asset: args.asset); - }, - ); -} - -class ProfilePictureCropRouteArgs { - const ProfilePictureCropRouteArgs({this.key, required this.asset}); - - final Key? key; - - final BaseAsset asset; - - @override - String toString() { - return 'ProfilePictureCropRouteArgs{key: $key, asset: $asset}'; - } - - @override - bool operator ==(Object other) { - if (identical(this, other)) return true; - if (other is! ProfilePictureCropRouteArgs) return false; - return key == other.key && asset == other.asset; - } - - @override - int get hashCode => key.hashCode ^ asset.hashCode; -} - -/// generated route for -/// [RemoteAlbumPage] -class RemoteAlbumRoute extends PageRouteInfo { - RemoteAlbumRoute({ - Key? key, - required RemoteAlbum album, - List? children, - }) : super( - RemoteAlbumRoute.name, - args: RemoteAlbumRouteArgs(key: key, album: album), - initialChildren: children, - ); - - static const String name = 'RemoteAlbumRoute'; - - static PageInfo page = PageInfo( - name, - builder: (data) { - final args = data.argsAs(); - return RemoteAlbumPage(key: args.key, album: args.album); - }, - ); -} - -class RemoteAlbumRouteArgs { - const RemoteAlbumRouteArgs({this.key, required this.album}); - - final Key? key; - - final RemoteAlbum album; - - @override - String toString() { - return 'RemoteAlbumRouteArgs{key: $key, album: $album}'; - } - - @override - bool operator ==(Object other) { - if (identical(this, other)) return true; - if (other is! RemoteAlbumRouteArgs) return false; - return key == other.key && album == other.album; - } - - @override - int get hashCode => key.hashCode ^ album.hashCode; -} - -/// generated route for -/// [RemoteMediaSummaryPage] -class RemoteMediaSummaryRoute extends PageRouteInfo { - const RemoteMediaSummaryRoute({List? children}) - : super(RemoteMediaSummaryRoute.name, initialChildren: children); - - static const String name = 'RemoteMediaSummaryRoute'; - - static PageInfo page = PageInfo( - name, - builder: (data) { - return const RemoteMediaSummaryPage(); - }, - ); -} - -/// generated route for -/// [SettingsPage] -class SettingsRoute extends PageRouteInfo { - const SettingsRoute({List? children}) - : super(SettingsRoute.name, initialChildren: children); - - static const String name = 'SettingsRoute'; - - static PageInfo page = PageInfo( - name, - builder: (data) { - return const SettingsPage(); - }, - ); -} - -/// generated route for -/// [SettingsSubPage] -class SettingsSubRoute extends PageRouteInfo { - SettingsSubRoute({ - required SettingSection section, - Key? key, - List? children, - }) : super( - SettingsSubRoute.name, - args: SettingsSubRouteArgs(section: section, key: key), - initialChildren: children, - ); - - static const String name = 'SettingsSubRoute'; - - static PageInfo page = PageInfo( - name, - builder: (data) { - final args = data.argsAs(); - return SettingsSubPage(args.section, key: args.key); - }, - ); -} - -class SettingsSubRouteArgs { - const SettingsSubRouteArgs({required this.section, this.key}); - - final SettingSection section; - - final Key? key; - - @override - String toString() { - return 'SettingsSubRouteArgs{section: $section, key: $key}'; - } - - @override - bool operator ==(Object other) { - if (identical(this, other)) return true; - if (other is! SettingsSubRouteArgs) return false; - return section == other.section && key == other.key; - } - - @override - int get hashCode => section.hashCode ^ key.hashCode; -} - -/// generated route for -/// [ShareIntentPage] -class ShareIntentRoute extends PageRouteInfo { - ShareIntentRoute({ - Key? key, - required List attachments, - List? children, - }) : super( - ShareIntentRoute.name, - args: ShareIntentRouteArgs(key: key, attachments: attachments), - initialChildren: children, - ); - - static const String name = 'ShareIntentRoute'; - - static PageInfo page = PageInfo( - name, - builder: (data) { - final args = data.argsAs(); - return ShareIntentPage(key: args.key, attachments: args.attachments); - }, - ); -} - -class ShareIntentRouteArgs { - const ShareIntentRouteArgs({this.key, required this.attachments}); - - final Key? key; - - final List attachments; - - @override - String toString() { - return 'ShareIntentRouteArgs{key: $key, attachments: $attachments}'; - } - - @override - bool operator ==(Object other) { - if (identical(this, other)) return true; - if (other is! ShareIntentRouteArgs) return false; - return key == other.key && - const ListEquality().equals( - attachments, - other.attachments, - ); - } - - @override - int get hashCode => - key.hashCode ^ - const ListEquality().hash(attachments); -} - -/// generated route for -/// [SharedLinkEditPage] -class SharedLinkEditRoute extends PageRouteInfo { - SharedLinkEditRoute({ - Key? key, - SharedLink? existingLink, - List? assetsList, - String? albumId, - List? children, - }) : super( - SharedLinkEditRoute.name, - args: SharedLinkEditRouteArgs( - key: key, - existingLink: existingLink, - assetsList: assetsList, - albumId: albumId, - ), - initialChildren: children, - ); - - static const String name = 'SharedLinkEditRoute'; - - static PageInfo page = PageInfo( - name, - builder: (data) { - final args = data.argsAs( - orElse: () => const SharedLinkEditRouteArgs(), - ); - return SharedLinkEditPage( - key: args.key, - existingLink: args.existingLink, - assetsList: args.assetsList, - albumId: args.albumId, - ); - }, - ); -} - -class SharedLinkEditRouteArgs { - const SharedLinkEditRouteArgs({ - this.key, - this.existingLink, - this.assetsList, - this.albumId, - }); - - final Key? key; - - final SharedLink? existingLink; - - final List? assetsList; - - final String? albumId; - - @override - String toString() { - return 'SharedLinkEditRouteArgs{key: $key, existingLink: $existingLink, assetsList: $assetsList, albumId: $albumId}'; - } - - @override - bool operator ==(Object other) { - if (identical(this, other)) return true; - if (other is! SharedLinkEditRouteArgs) return false; - return key == other.key && - existingLink == other.existingLink && - const ListEquality().equals(assetsList, other.assetsList) && - albumId == other.albumId; - } - - @override - int get hashCode => - key.hashCode ^ - existingLink.hashCode ^ - const ListEquality().hash(assetsList) ^ - albumId.hashCode; -} - -/// generated route for -/// [SharedLinkPage] -class SharedLinkRoute extends PageRouteInfo { - const SharedLinkRoute({List? children}) - : super(SharedLinkRoute.name, initialChildren: children); - - static const String name = 'SharedLinkRoute'; - - static PageInfo page = PageInfo( - name, - builder: (data) { - return const SharedLinkPage(); - }, - ); -} - -/// generated route for -/// [SplashScreenPage] -class SplashScreenRoute extends PageRouteInfo { - const SplashScreenRoute({List? children}) - : super(SplashScreenRoute.name, initialChildren: children); - - static const String name = 'SplashScreenRoute'; - - static PageInfo page = PageInfo( - name, - builder: (data) { - return const SplashScreenPage(); - }, - ); -} - -/// generated route for -/// [SyncStatusPage] -class SyncStatusRoute extends PageRouteInfo { - const SyncStatusRoute({List? children}) - : super(SyncStatusRoute.name, initialChildren: children); - - static const String name = 'SyncStatusRoute'; - - static PageInfo page = PageInfo( - name, - builder: (data) { - return const SyncStatusPage(); - }, - ); -} - -/// generated route for -/// [TabShellPage] -class TabShellRoute extends PageRouteInfo { - const TabShellRoute({List? children}) - : super(TabShellRoute.name, initialChildren: children); - - static const String name = 'TabShellRoute'; - - static PageInfo page = PageInfo( - name, - builder: (data) { - return const TabShellPage(); - }, - ); -} diff --git a/mobile/lib/services/action.service.dart b/mobile/lib/services/action.service.dart index 8e01777c5d..ec9b7cd446 100644 --- a/mobile/lib/services/action.service.dart +++ b/mobile/lib/services/action.service.dart @@ -1,117 +1,19 @@ import 'dart:async'; -import 'package:auto_route/auto_route.dart'; -import 'package:flutter/material.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:immich_mobile/constants/enums.dart'; -import 'package:immich_mobile/domain/models/asset/base_asset.model.dart'; -import 'package:immich_mobile/domain/models/asset_edit.model.dart'; -import 'package:immich_mobile/domain/models/store.model.dart'; -import 'package:immich_mobile/domain/services/tag.service.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/remote_album.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/album.provider.dart'; import 'package:immich_mobile/providers/infrastructure/asset.provider.dart'; import 'package:immich_mobile/repositories/asset_api.repository.dart'; -import 'package:immich_mobile/repositories/asset_media.repository.dart'; -import 'package:immich_mobile/repositories/download.repository.dart'; -import 'package:immich_mobile/repositories/drift_album_api_repository.dart'; -import 'package:immich_mobile/routing/router.dart'; -import 'package:immich_mobile/utils/timezone.dart'; -import 'package:immich_mobile/widgets/common/date_time_picker.dart'; -import 'package:immich_mobile/widgets/common/location_picker.dart'; -import 'package:immich_mobile/widgets/common/tag_picker.dart'; -import 'package:maplibre_gl/maplibre_gl.dart' as maplibre; final actionServiceProvider = Provider( - (ref) => ActionService( - ref.watch(assetApiRepositoryProvider), - ref.watch(remoteAssetRepositoryProvider), - ref.watch(localAssetRepository), - ref.watch(driftAlbumApiRepositoryProvider), - ref.watch(remoteAlbumRepository), - ref.watch(trashedLocalAssetRepository), - ref.watch(assetMediaRepositoryProvider), - ref.watch(downloadRepositoryProvider), - ref.watch(tagServiceProvider), - ), + (ref) => ActionService(ref.watch(assetApiRepositoryProvider), ref.watch(remoteAssetRepositoryProvider)), ); class ActionService { final AssetApiRepository _assetApiRepository; final RemoteAssetRepository _remoteAssetRepository; - final DriftLocalAssetRepository _localAssetRepository; - final DriftAlbumApiRepository _albumApiRepository; - final DriftRemoteAlbumRepository _remoteAlbumRepository; - final DriftTrashedLocalAssetRepository _trashedLocalAssetRepository; - final AssetMediaRepository _assetMediaRepository; - final DownloadRepository _downloadRepository; - final TagService _tagService; - const ActionService( - this._assetApiRepository, - this._remoteAssetRepository, - this._localAssetRepository, - this._albumApiRepository, - this._remoteAlbumRepository, - this._trashedLocalAssetRepository, - this._assetMediaRepository, - this._downloadRepository, - this._tagService, - ); - - Future shareLink(List remoteIds, BuildContext context) async { - unawaited(context.pushRoute(SharedLinkEditRoute(assetsList: remoteIds))); - } - - Future favorite(List remoteIds) async { - await _assetApiRepository.updateFavorite(remoteIds, true); - await _remoteAssetRepository.updateFavorite(remoteIds, true); - } - - Future unFavorite(List remoteIds) async { - await _assetApiRepository.updateFavorite(remoteIds, false); - await _remoteAssetRepository.updateFavorite(remoteIds, false); - } - - Future archive(List remoteIds) async { - await _assetApiRepository.updateVisibility(remoteIds, AssetVisibilityEnum.archive); - await _remoteAssetRepository.updateVisibility(remoteIds, AssetVisibility.archive); - } - - Future unArchive(List remoteIds) async { - await _assetApiRepository.updateVisibility(remoteIds, AssetVisibilityEnum.timeline); - await _remoteAssetRepository.updateVisibility(remoteIds, AssetVisibility.timeline); - } - - Future moveToLockFolder(List remoteIds, List localIds) async { - await _assetApiRepository.updateVisibility(remoteIds, AssetVisibilityEnum.locked); - await _remoteAssetRepository.updateVisibility(remoteIds, AssetVisibility.locked); - - // Ask user if they want to delete local copies - if (localIds.isNotEmpty) { - await _deleteLocalAssets(localIds); - } - } - - Future removeFromLockFolder(List remoteIds) async { - await _assetApiRepository.updateVisibility(remoteIds, AssetVisibilityEnum.timeline); - await _remoteAssetRepository.updateVisibility(remoteIds, AssetVisibility.timeline); - } - - Future trash(List remoteIds) async { - await _assetApiRepository.delete(remoteIds, false); - await _remoteAssetRepository.trash(remoteIds); - } - - Future restoreTrash(List ids) async { - await _assetApiRepository.restoreTrash(ids); - await _remoteAssetRepository.restoreTrash(ids); - } + const ActionService(this._assetApiRepository, this._remoteAssetRepository); Future emptyTrash(String userId) async { final count = await _assetApiRepository.emptyTrash(); @@ -125,113 +27,6 @@ class ActionService { return count; } - Future trashRemoteAndDeleteLocal(List remoteIds, List localIds) async { - await _assetApiRepository.delete(remoteIds, false); - await _remoteAssetRepository.trash(remoteIds); - - if (localIds.isNotEmpty) { - await _deleteLocalAssets(localIds); - } - } - - Future deleteRemoteAndLocal(List remoteIds, List localIds) async { - await _assetApiRepository.delete(remoteIds, true); - await _remoteAssetRepository.delete(remoteIds); - - if (localIds.isNotEmpty) { - await _deleteLocalAssets(localIds); - } - } - - Future deleteLocal(List localIds) async { - return await _deleteLocalAssets(localIds); - } - - Future editLocation(List remoteIds, BuildContext context) async { - maplibre.LatLng? initialLatLng; - if (remoteIds.length == 1) { - final exif = await _remoteAssetRepository.getExif(remoteIds[0]); - - if (exif?.latitude != null && exif?.longitude != null) { - initialLatLng = maplibre.LatLng(exif!.latitude!, exif.longitude!); - } - } - - final location = await showLocationPicker(context: context, initialLatLng: initialLatLng); - - if (location == null) { - return false; - } - - await _assetApiRepository.updateLocation(remoteIds, location); - await _remoteAssetRepository.updateLocation(remoteIds, location); - - return true; - } - - Future editDateTime(List remoteIds, BuildContext context) async { - DateTime? initialDate; - String? timeZone; - Duration? offset; - - if (remoteIds.length == 1) { - final assetId = remoteIds.first; - final asset = await _remoteAssetRepository.get(assetId); - if (asset == null) { - return false; - } - - final exifData = await _remoteAssetRepository.getExif(assetId); - - // Use EXIF timezone information if available (matching web app and display behavior) - DateTime dt = asset.createdAt.toLocal(); - offset = dt.timeZoneOffset; - - if (exifData?.dateTimeOriginal != null) { - timeZone = exifData!.timeZone; - (dt, offset) = applyTimezoneOffset(dateTime: exifData.dateTimeOriginal!, timeZone: exifData.timeZone); - } - - initialDate = dt; - } - - final dateTime = await showDateTimePicker( - context: context, - initialDateTime: initialDate, - initialTZ: timeZone, - initialTZOffset: offset, - ); - - if (dateTime == null) { - return false; - } - - await applyDateTime(remoteIds, dateTime); - - return true; - } - - @visibleForTesting - Future applyDateTime(List remoteIds, String dateTime) async { - final parsedDateTime = DateTime.parse(dateTime); - final offset = RegExp(r'[+-]\d{2}:\d{2}$').firstMatch(dateTime)?.group(0); - - await _assetApiRepository.updateDateTime(remoteIds, dateTime); - await _remoteAssetRepository.updateDateTime( - remoteIds, - parsedDateTime, - timeZone: offset == null ? null : 'UTC$offset', - ); - } - - Future removeFromAlbum(List remoteIds, String albumId) async { - final result = await _albumApiRepository.removeAssets(albumId, remoteIds); - if (result.removed.isNotEmpty) { - await _remoteAlbumRepository.removeAssets(albumId, result.removed); - } - return result.removed.length; - } - Future updateDescription(String assetId, String description) async { // update remote first, then local to ensure consistency await _assetApiRepository.updateDescription(assetId, description); @@ -247,82 +42,4 @@ class ActionService { return true; } - - Future tagAssets(List remoteIds, BuildContext context) async { - final tagResults = await showTagPickerModal(context: context); - if (tagResults == null) { - // user cancelled - return null; - } - - final selectedTagIds = Set.from(tagResults.$1); - final selectedNewTagValues = tagResults.$2; - - if (selectedNewTagValues.isNotEmpty) { - final upsertedTags = await _tagService.upsertTags(selectedNewTagValues.toList()); - selectedTagIds.addAll(upsertedTags.map((t) => t.id)); - } - if (selectedTagIds.isEmpty) { - return 0; - } - return _tagService.bulkTagAssets(remoteIds, selectedTagIds.toList()); - } - - Future stack(String userId, List remoteIds) async { - final stack = await _assetApiRepository.stack(remoteIds); - await _remoteAssetRepository.stack(userId, stack); - } - - Future unStack(List stackIds) async { - await _remoteAssetRepository.unStack(stackIds); - await _assetApiRepository.unStack(stackIds); - } - - Future shareAssets( - List assets, - BuildContext context, { - ShareAssetType fileType = ShareAssetType.original, - Completer? cancelCompleter, - void Function(double progress)? onAssetDownloadProgress, - }) { - return _assetMediaRepository.shareAssets( - assets, - context, - fileType: fileType, - cancelCompleter: cancelCompleter, - onAssetDownloadProgress: onAssetDownloadProgress, - ); - } - - Future> downloadAll(List assets) { - return _downloadRepository.downloadAllAssets(assets); - } - - Future setAlbumCover(String albumId, String assetId) async { - final owner = await _remoteAlbumRepository.getOwner(albumId); - final updatedAlbum = await _albumApiRepository.updateAlbum(albumId, owner, thumbnailAssetId: assetId); - await _remoteAlbumRepository.update(updatedAlbum); - return true; - } - - Future applyEdits(String remoteId, List edits) async { - if (edits.isEmpty) { - await _assetApiRepository.removeEdits(remoteId); - } else { - await _assetApiRepository.editAsset(remoteId, edits); - } - } - - Future _deleteLocalAssets(List localIds) async { - final deletedIds = await _assetMediaRepository.deleteAll(localIds); - if (deletedIds.isEmpty) { - return 0; - } - if (CurrentPlatform.isAndroid && Store.get(StoreKey.manageLocalMediaAndroid, false)) { - await _trashedLocalAssetRepository.applyTrashedAssets(deletedIds); - } else { - await _localAssetRepository.delete(deletedIds); - } - return deletedIds.length; - } } diff --git a/mobile/lib/services/api.service.dart b/mobile/lib/services/api.service.dart index 59ef935f2f..d1aec9cc86 100644 --- a/mobile/lib/services/api.service.dart +++ b/mobile/lib/services/api.service.dart @@ -53,7 +53,7 @@ class ApiService { _apiClient.client = NetworkRepository.client; } - setEndpoint(String endpoint) { + void setEndpoint(String endpoint) { _apiClient.basePath = endpoint; _apiClient.client = NetworkRepository.client; usersApi = UsersApi(_apiClient); @@ -96,12 +96,12 @@ class ApiService { /// port - optional (default: based on schema) /// path - optional Future resolveEndpoint(String serverUrl) async { - String url = sanitizeUrl(serverUrl); + String url = normalizeServerUrl(serverUrl); // Check for /.well-known/immich final wellKnownEndpoint = await _getWellKnownEndpoint(url); if (wellKnownEndpoint.isNotEmpty) { - url = sanitizeUrl(wellKnownEndpoint); + url = normalizeServerUrl(wellKnownEndpoint); } if (!await _isEndpointAvailable(url)) { @@ -113,12 +113,10 @@ class ApiService { } Future _isEndpointAvailable(String serverUrl) async { - if (!serverUrl.endsWith('/api')) { - serverUrl += '/api'; - } + final endpoint = serverUrl.endsWith('/api') ? serverUrl : '$serverUrl/api'; try { - await setEndpoint(serverUrl); + setEndpoint(endpoint); await serverInfoApi.pingServer().timeout(const Duration(seconds: 5)); } on TimeoutException catch (_) { return false; @@ -155,7 +153,7 @@ class ApiService { } Future setDeviceInfoHeader() async { - DeviceInfoPlugin deviceInfoPlugin = DeviceInfoPlugin(); + final DeviceInfoPlugin deviceInfoPlugin = DeviceInfoPlugin(); if (Platform.isIOS) { final iosInfo = await deviceInfoPlugin.iosInfo; diff --git a/mobile/lib/services/auth.service.dart b/mobile/lib/services/auth.service.dart index 0de22fd124..0e02c7b1b9 100644 --- a/mobile/lib/services/auth.service.dart +++ b/mobile/lib/services/auth.service.dart @@ -5,8 +5,8 @@ import 'package:immich_mobile/domain/models/settings_key.dart'; import 'package:immich_mobile/domain/models/store.model.dart'; import 'package:immich_mobile/domain/utils/background_sync.dart'; import 'package:immich_mobile/entities/store.entity.dart'; -import 'package:immich_mobile/infrastructure/repositories/settings.repository.dart'; import 'package:immich_mobile/infrastructure/repositories/network.repository.dart'; +import 'package:immich_mobile/infrastructure/repositories/settings.repository.dart'; import 'package:immich_mobile/models/auth/auxilary_endpoint.model.dart'; import 'package:immich_mobile/models/auth/login_response.model.dart'; import 'package:immich_mobile/providers/api.provider.dart'; diff --git a/mobile/lib/services/background_upload.service.dart b/mobile/lib/services/background_upload.service.dart index 903fd02395..3bc8b2a004 100644 --- a/mobile/lib/services/background_upload.service.dart +++ b/mobile/lib/services/background_upload.service.dart @@ -4,6 +4,7 @@ import 'dart:io'; import 'package:background_downloader/background_downloader.dart'; import 'package:flutter/foundation.dart'; +import 'package:freezed_annotation/freezed_annotation.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; import 'package:immich_mobile/constants/constants.dart'; import 'package:immich_mobile/domain/models/asset/asset_metadata.model.dart'; @@ -22,8 +23,11 @@ import 'package:immich_mobile/repositories/upload.repository.dart'; import 'package:immich_mobile/services/api.service.dart'; import 'package:immich_mobile/utils/debug_print.dart'; import 'package:logging/logging.dart'; +import 'package:openapi/api.dart' as api; import 'package:path/path.dart' as p; +part 'background_upload.service.freezed.dart'; + final backgroundUploadServiceProvider = Provider((ref) { final service = BackgroundUploadService( ref.watch(uploadRepositoryProvider), @@ -38,20 +42,15 @@ final backgroundUploadServiceProvider = Provider((ref) { }); /// Metadata for upload tasks to track live photo handling -class UploadTaskMetadata { - final String localAssetId; - final bool isLivePhotos; - final String livePhotoVideoId; +@Freezed(fromJson: false, toJson: false) +abstract class UploadTaskMetadata with _$UploadTaskMetadata { + const UploadTaskMetadata._(); - const UploadTaskMetadata({required this.localAssetId, required this.isLivePhotos, required this.livePhotoVideoId}); - - UploadTaskMetadata copyWith({String? localAssetId, bool? isLivePhotos, String? livePhotoVideoId}) { - return UploadTaskMetadata( - localAssetId: localAssetId ?? this.localAssetId, - isLivePhotos: isLivePhotos ?? this.isLivePhotos, - livePhotoVideoId: livePhotoVideoId ?? this.livePhotoVideoId, - ); - } + const factory UploadTaskMetadata({ + required String localAssetId, + required bool isLivePhotos, + required String livePhotoVideoId, + }) = _UploadTaskMetadata; Map toMap() { return { @@ -69,28 +68,10 @@ class UploadTaskMetadata { ); } - String toJson() => json.encode(toMap()); - factory UploadTaskMetadata.fromJson(String source) => UploadTaskMetadata.fromMap(json.decode(source) as Map); - @override - String toString() => - 'UploadTaskMetadata(localAssetId: $localAssetId, isLivePhotos: $isLivePhotos, livePhotoVideoId: $livePhotoVideoId)'; - - @override - bool operator ==(covariant UploadTaskMetadata other) { - if (identical(this, other)) { - return true; - } - - return other.localAssetId == localAssetId && - other.isLivePhotos == isLivePhotos && - other.livePhotoVideoId == livePhotoVideoId; - } - - @override - int get hashCode => localAssetId.hashCode ^ isLivePhotos.hashCode ^ livePhotoVideoId.hashCode; + String toJson() => json.encode(toMap()); } /// Service for handling background uploads using iOS URLSession (background_downloader) @@ -134,12 +115,12 @@ class BackgroundUploadService { if (!_taskStatusController.isClosed) { _taskStatusController.add(update); } - _handleTaskStatusUpdate(update); + unawaited(_handleTaskStatusUpdate(update)); } void dispose() { - _taskStatusController.close(); - _taskProgressController.close(); + unawaited(_taskStatusController.close()); + unawaited(_taskProgressController.close()); } /// Enqueue tasks to the background upload queue @@ -170,7 +151,7 @@ class BackgroundUploadService { const batchSize = 100; final batch = candidates.take(batchSize).toList(); - List tasks = []; + final List tasks = []; for (final asset in batch) { final task = await getUploadTask(asset); @@ -204,7 +185,7 @@ class BackgroundUploadService { return _uploadRepository.start(); } - void _handleTaskStatusUpdate(TaskStatusUpdate update) async { + Future _handleTaskStatusUpdate(TaskStatusUpdate update) async { switch (update.status) { case TaskStatus.complete: unawaited(_handleLivePhoto(update)); @@ -218,8 +199,6 @@ class BackgroundUploadService { } } - break; - default: break; } @@ -289,15 +268,12 @@ class BackgroundUploadService { return null; } - String fileName = await _assetMediaRepository.getOriginalFilename(asset.id) ?? asset.name; - final hasExtension = p.extension(fileName).isNotEmpty; - if (!hasExtension) { - fileName = p.setExtension(fileName, p.extension(asset.name)); - } + final fileName = await _assetMediaRepository.getOriginalFilename(asset.id) ?? asset.name; + // Some apps (e.g. DJI/Fusion) return names without an extension; fall back to the asset name for those. + final extension = p.extension(file.path).isNotEmpty ? p.extension(file.path) : p.extension(asset.name); + final originalFileName = p.setExtension(fileName, extension); - final originalFileName = entity.isLivePhoto ? p.setExtension(fileName, p.extension(file.path)) : fileName; - - String metadata = UploadTaskMetadata( + final String metadata = UploadTaskMetadata( localAssetId: asset.id, isLivePhotos: entity.isLivePhoto, livePhotoVideoId: '', @@ -316,6 +292,8 @@ class BackgroundUploadService { priority: priority, isFavorite: asset.isFavorite, requiresWiFi: requiresWiFi, + // Visibility hidden on upload to prevent the server from running regular jobs on the live photo asset + fields: entity.isLivePhoto ? {'visibility': api.AssetVisibility.hidden.toString()} : null, cloudId: entity.isLivePhoto ? null : asset.cloudId, adjustmentTime: entity.isLivePhoto ? null : asset.adjustmentTime?.toIso8601String(), latitude: entity.isLivePhoto ? null : asset.latitude?.toString(), @@ -400,7 +378,7 @@ class BackgroundUploadService { 'fileModifiedAt': modifiedAt.toUtc().toIso8601String(), 'isFavorite': isFavorite?.toString() ?? 'false', 'duration': '0', - if (fields != null) ...fields, + ...?fields, if (CurrentPlatform.isIOS && cloudId != null) 'metadata': jsonEncode([ RemoteAssetMetadataItem( diff --git a/mobile/lib/services/download.service.dart b/mobile/lib/services/download.service.dart index 3f2c36fa7e..f38b20cc21 100644 --- a/mobile/lib/services/download.service.dart +++ b/mobile/lib/services/download.service.dart @@ -1,6 +1,10 @@ +// ignore_for_file: avoid_slow_async_io + +import 'dart:async'; import 'dart:io'; import 'package:background_downloader/background_downloader.dart'; +import 'package:collection/collection.dart'; import 'package:flutter/services.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; import 'package:immich_mobile/models/download/livephotos_medatada.model.dart'; @@ -18,14 +22,27 @@ class DownloadService { final Logger _log = Logger("DownloadService"); void Function(TaskStatusUpdate)? onImageDownloadStatus; void Function(TaskStatusUpdate)? onVideoDownloadStatus; - void Function(TaskStatusUpdate)? onLivePhotoDownloadStatus; void Function(TaskProgressUpdate)? onTaskProgress; + /// Active Live Photo IDs undergoing saving + final Set _savingLivePhotoIds = {}; + DownloadService(this._fileMediaRepository, this._downloadRepository) { _downloadRepository.onImageDownloadStatus = _onImageDownloadCallback; _downloadRepository.onVideoDownloadStatus = _onVideoDownloadCallback; - _downloadRepository.onLivePhotoDownloadStatus = _onLivePhotoDownloadCallback; _downloadRepository.onTaskProgress = _onTaskProgressCallback; + _downloadRepository.onLivePhotoRecordComplete = _onLivePhotoRecordComplete; + + unawaited(_savePreviouslyCompletedLivePhotos()); + } + + Future _savePreviouslyCompletedLivePhotos() async { + // Specifically fetch Live Photo video components only, as to not double fetch assets + final records = await _downloadRepository.getLiveVideoTasks(); + final completedIds = records.map((record) => LivePhotosMetadata.fromJson(record.task.metaData).id).toSet(); + for (final id in completedIds) { + await _saveLivePhotos(id); + } } void _onTaskProgressCallback(TaskProgressUpdate update) { @@ -33,18 +50,27 @@ class DownloadService { } void _onImageDownloadCallback(TaskStatusUpdate update) { + if (update.status == TaskStatus.complete) { + unawaited(_saveImageWithPath(update.task)); + } + onImageDownloadStatus?.call(update); } void _onVideoDownloadCallback(TaskStatusUpdate update) { + if (update.status == TaskStatus.complete) { + unawaited(_saveVideo(update.task)); + } + onVideoDownloadStatus?.call(update); } - void _onLivePhotoDownloadCallback(TaskStatusUpdate update) { - onLivePhotoDownloadStatus?.call(update); + Future _onLivePhotoRecordComplete(TaskRecord record) async { + final livePhotosId = LivePhotosMetadata.fromJson(record.task.metaData).id; + await _saveLivePhotos(livePhotosId); } - Future saveImageWithPath(Task task) async { + Future _saveImageWithPath(Task task) async { final filePath = await task.filePath(); final title = task.filename; final relativePath = Platform.isAndroid ? 'DCIM/Immich' : null; @@ -65,7 +91,7 @@ class DownloadService { } } - Future saveVideo(Task task) async { + Future _saveVideo(Task task) async { final filePath = await task.filePath(); final title = task.filename; final relativePath = Platform.isAndroid ? 'DCIM/Immich' : null; @@ -83,14 +109,21 @@ class DownloadService { } } - Future saveLivePhotos(Task task, String livePhotosId) async { + Future _saveLivePhotos(String livePhotosId) async { final records = await _downloadRepository.getLiveVideoTasks(); - if (records.length < 2) { + final imageRecord = _findTaskRecord(records, livePhotosId, LivePhotosPart.image); + final videoRecord = _findTaskRecord(records, livePhotosId, LivePhotosPart.video); + + if (imageRecord == null || videoRecord == null) { return false; } - final imageRecord = _findTaskRecord(records, livePhotosId, LivePhotosPart.image); - final videoRecord = _findTaskRecord(records, livePhotosId, LivePhotosPart.video); + // Write semaphore for this `livePhotoId` + if (!_savingLivePhotoIds.add(livePhotosId)) { + return false; + } + + final title = imageRecord.task.filename; final imageFilePath = await imageRecord.task.filePath(); final videoFilePath = await videoRecord.task.filePath(); @@ -98,14 +131,14 @@ class DownloadService { final result = await _fileMediaRepository.saveLivePhoto( image: File(imageFilePath), video: File(videoFilePath), - title: task.filename, + title: title, ); return result != null; } on PlatformException catch (error, stack) { // Handle saving MotionPhotos on iOS if (error.code.startsWith('PHPhotosErrorDomain')) { - final result = await _fileMediaRepository.saveImageWithFile(imageFilePath, title: task.filename); + final result = await _fileMediaRepository.saveImageWithFile(imageFilePath, title: title); return result != null; } _log.severe("Error saving live photo", error, stack); @@ -125,6 +158,7 @@ class DownloadService { } await _downloadRepository.deleteRecordsWithIds([imageRecord.task.taskId, videoRecord.task.taskId]); + _savingLivePhotoIds.remove(livePhotosId); } } @@ -133,8 +167,8 @@ class DownloadService { } } -TaskRecord _findTaskRecord(List records, String livePhotosId, LivePhotosPart part) { - return records.firstWhere((record) { +TaskRecord? _findTaskRecord(List records, String livePhotosId, LivePhotosPart part) { + return records.firstWhereOrNull((record) { final metadata = LivePhotosMetadata.fromJson(record.task.metaData); return metadata.id == livePhotosId && metadata.part == part; }); diff --git a/mobile/lib/services/folder.service.dart b/mobile/lib/services/folder.service.dart index 543c7231d6..011acbe869 100644 --- a/mobile/lib/services/folder.service.dart +++ b/mobile/lib/services/folder.service.dart @@ -18,7 +18,7 @@ class FolderService { final paths = await _folderApiRepository.getAllUniquePaths(); // Create folder structure - Map> folderMap = {}; + final Map> folderMap = {}; for (String fullPath in paths) { if (fullPath == '/') { @@ -30,12 +30,12 @@ class FolderService { fullPath = '/$fullPath'; } - List segments = fullPath.split('/')..removeWhere((s) => s.isEmpty); + final List segments = fullPath.split('/')..removeWhere((s) => s.isEmpty); String currentPath = ''; for (int i = 0; i < segments.length; i++) { - String parentPath = currentPath.isEmpty ? '_root_' : currentPath; + final String parentPath = currentPath.isEmpty ? '_root_' : currentPath; currentPath = i == 0 ? '/${segments[i]}' : '$currentPath/${segments[i]}'; if (!folderMap.containsKey(parentPath)) { @@ -55,7 +55,7 @@ class FolderService { } void attachSubfolders(RecursiveFolder folder) { - String fullPath = folder.path.isEmpty ? '/${folder.name}' : '${folder.path}/${folder.name}'; + final String fullPath = folder.path.isEmpty ? '/${folder.name}' : '${folder.path}/${folder.name}'; if (folderMap.containsKey(fullPath)) { folder.subfolders.addAll(folderMap[fullPath]!); @@ -67,7 +67,7 @@ class FolderService { } } - List rootSubfolders = folderMap['_root_'] ?? []; + final List rootSubfolders = folderMap['_root_'] ?? []; // Sort root subfolders based on order parameter rootSubfolders.sort((a, b) => order == SortOrder.desc ? b.name.compareTo(a.name) : a.name.compareTo(b.name)); @@ -83,7 +83,7 @@ class FolderService { if (folder is RecursiveFolder) { String fullPath = folder.path.isEmpty ? folder.name : '${folder.path}/${folder.name}'; fullPath = fullPath[0] == '/' ? fullPath.substring(1) : fullPath; - var result = await _folderApiRepository.getAssetsForPath(fullPath); + final result = await _folderApiRepository.getAssetsForPath(fullPath); if (order == SortOrder.desc) { result.sort((a, b) => b.createdAt.compareTo(a.createdAt)); diff --git a/mobile/lib/services/foreground_upload.service.dart b/mobile/lib/services/foreground_upload.service.dart index aea187dc9f..88576bbb4d 100644 --- a/mobile/lib/services/foreground_upload.service.dart +++ b/mobile/lib/services/foreground_upload.service.dart @@ -2,14 +2,15 @@ import 'dart:async'; import 'dart:convert'; import 'dart:io'; +import 'package:flutter/foundation.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; import 'package:immich_mobile/domain/models/asset/asset_metadata.model.dart'; -import 'package:immich_mobile/domain/models/asset/base_asset.model.dart'; +import 'package:immich_mobile/domain/models/asset/base_asset.model.dart' hide AssetVisibility; import 'package:immich_mobile/domain/models/store.model.dart'; import 'package:immich_mobile/entities/store.entity.dart'; import 'package:immich_mobile/extensions/network_capability_extensions.dart'; import 'package:immich_mobile/extensions/platform_extensions.dart'; -import 'package:immich_mobile/extensions/translate_extensions.dart'; +import 'package:immich_mobile/generated/translations.g.dart'; import 'package:immich_mobile/infrastructure/repositories/backup.repository.dart'; import 'package:immich_mobile/infrastructure/repositories/settings.repository.dart'; import 'package:immich_mobile/infrastructure/repositories/storage.repository.dart'; @@ -19,6 +20,7 @@ import 'package:immich_mobile/providers/infrastructure/storage.provider.dart'; import 'package:immich_mobile/repositories/asset_media.repository.dart'; import 'package:immich_mobile/repositories/upload.repository.dart'; import 'package:logging/logging.dart'; +import 'package:openapi/api.dart'; import 'package:path/path.dart' as p; import 'package:photo_manager/photo_manager.dart' show PMProgressHandler; @@ -33,6 +35,7 @@ class UploadCallbacks { } final foregroundUploadServiceProvider = Provider((ref) { + // ignore: dispose-provided-instances return ForegroundUploadService( ref.watch(uploadRepositoryProvider), ref.watch(storageRepositoryProvider), @@ -99,7 +102,7 @@ class ForegroundUploadService { final requireWifi = _shouldRequireWiFi(asset); return requireWifi && !hasWifi; }, - processItem: (asset) => _uploadSingleAsset(asset, cancelToken, callbacks: callbacks), + processItem: (asset) => uploadSingleAsset(asset, cancelToken, callbacks: callbacks), ); } } @@ -125,7 +128,7 @@ class ForegroundUploadService { continue; } - await _uploadSingleAsset(asset, cancelToken, callbacks: callbacks); + await uploadSingleAsset(asset, cancelToken, callbacks: callbacks); } } @@ -142,7 +145,7 @@ class ForegroundUploadService { await _executeWithWorkerPool( items: localAssets, cancelToken: cancelToken, - processItem: (asset) => _uploadSingleAsset(asset, cancelToken, callbacks: callbacks), + processItem: (asset) => uploadSingleAsset(asset, cancelToken, callbacks: callbacks), ); } @@ -232,21 +235,23 @@ class ForegroundUploadService { await Future.wait(workerFutures); } - Future _uploadSingleAsset( + @visibleForTesting + Future uploadSingleAsset( LocalAsset asset, Completer? cancelToken, { required UploadCallbacks callbacks, }) async { + final t = StaticTranslations.instance; + final assetNotFoundOnDevice = CurrentPlatform.isAndroid + ? t.asset_not_found_on_device_android + : t.asset_not_found_on_device_ios; File? file; File? livePhotoFile; try { final entity = await _storageRepository.getAssetEntityForAsset(asset); if (entity == null) { - callbacks.onError?.call( - asset.localId!, - CurrentPlatform.isAndroid ? "asset_not_found_on_device_android".t() : "asset_not_found_on_device_ios".t(), - ); + callbacks.onError?.call(asset.localId!, assetNotFoundOnDevice); return; } @@ -280,10 +285,7 @@ class ForegroundUploadService { file = await _storageRepository.getFileForAsset(asset.id); if (file == null) { _logger.warning("Failed to get file ${asset.id} - ${asset.name}"); - callbacks.onError?.call( - asset.localId!, - CurrentPlatform.isAndroid ? "asset_not_found_on_device_android".t() : "asset_not_found_on_device_ios".t(), - ); + callbacks.onError?.call(asset.localId!, assetNotFoundOnDevice); return; } @@ -292,31 +294,21 @@ class ForegroundUploadService { livePhotoFile = await _storageRepository.getMotionFileForAsset(asset); if (livePhotoFile == null) { _logger.warning("Failed to obtain motion part of the livePhoto - ${asset.name}"); - callbacks.onError?.call( - asset.localId!, - CurrentPlatform.isAndroid ? "asset_not_found_on_device_android".t() : "asset_not_found_on_device_ios".t(), - ); + callbacks.onError?.call(asset.localId!, assetNotFoundOnDevice); } } } if (file == null) { _logger.warning("Failed to obtain file from iCloud for asset ${asset.id} - ${asset.name}"); - callbacks.onError?.call(asset.localId!, "asset_not_found_on_icloud".t()); + callbacks.onError?.call(asset.localId!, t.asset_not_found_on_icloud); return; } - String fileName = await _assetMediaRepository.getOriginalFilename(asset.id) ?? asset.name; - - /// Handle special file name from DJI or Fusion app - /// If the file name has no extension, likely due to special renaming template by specific apps - /// we append the original extension from the asset name - final hasExtension = p.extension(fileName).isNotEmpty; - if (!hasExtension) { - fileName = p.setExtension(fileName, p.extension(asset.name)); - } - - final originalFileName = entity.isLivePhoto ? p.setExtension(fileName, p.extension(file.path)) : fileName; + final fileName = await _assetMediaRepository.getOriginalFilename(asset.id) ?? asset.name; + // Some apps (e.g. DJI/Fusion) return names without an extension; fall back to the asset name for those. + final extension = p.extension(file.path).isNotEmpty ? p.extension(file.path) : p.extension(asset.name); + final originalFileName = p.setExtension(fileName, extension); final deviceId = Store.get(StoreKey.deviceId); final fields = { @@ -338,7 +330,8 @@ class ForegroundUploadService { final livePhotoResult = await _uploadRepository.uploadFile( file: livePhotoFile, originalFileName: livePhotoTitle, - fields: fields, + // Visibility hidden on upload to prevent the server from running regular jobs on the live photo asset + fields: {...fields, 'visibility': AssetVisibility.hidden.toString()}, cancelToken: cancelToken, onProgress: onProgress != null ? (bytes, totalBytes) => onProgress(asset.localId!, livePhotoTitle, bytes, totalBytes) @@ -386,7 +379,6 @@ class ForegroundUploadService { if (result.isSuccess && result.remoteAssetId != null) { callbacks.onSuccess?.call(asset.localId!, result.remoteAssetId!); } else if (result.isCancelled) { - _logger.warning(() => "Backup was cancelled by the user"); shouldAbortUpload = true; } else if (result.errorMessage != null) { _logger.severe( @@ -401,7 +393,7 @@ class ForegroundUploadService { } } } catch (error, stackTrace) { - _logger.severe(() => "Error backup asset: ${error.toString()}", stackTrace); + _logger.severe(() => "Error backup asset: $error", stackTrace); callbacks.onError?.call(asset.localId!, error.toString()); } finally { if (Platform.isIOS) { @@ -409,7 +401,7 @@ class ForegroundUploadService { await file?.delete(); await livePhotoFile?.delete(); } catch (error, stackTrace) { - _logger.severe(() => "ERROR deleting file: ${error.toString()}", stackTrace); + _logger.severe(() => "ERROR deleting file: $error", stackTrace); } } } @@ -422,6 +414,7 @@ class ForegroundUploadService { void Function(int bytes, int totalBytes)? onProgress, }) async { try { + // ignore: avoid_slow_async_io final stats = await file.stat(); final fileCreatedAt = stats.changed; final fileModifiedAt = stats.modified; diff --git a/mobile/lib/services/gcast.service.dart b/mobile/lib/services/gcast.service.dart index dcf7685237..d9fc44a34d 100644 --- a/mobile/lib/services/gcast.service.dart +++ b/mobile/lib/services/gcast.service.dart @@ -62,7 +62,6 @@ class GCastService { switch (message['type']) { case "MEDIA_STATUS": _handleMediaStatus(message); - break; } } @@ -77,13 +76,10 @@ class GCastService { switch (status['playerState']) { case "PLAYING": onCastState?.call(CastState.playing); - break; case "PAUSED": onCastState?.call(CastState.paused); - break; case "BUFFERING": onCastState?.call(CastState.buffering); - break; case "IDLE": onCastState?.call(CastState.idle); @@ -91,8 +87,6 @@ class GCastService { if (status["idleReason"] == "FINISHED") { _mediaStatusPollingTimer?.cancel(); } - - break; } if (status["media"] != null && status["media"]["duration"] != null) { @@ -147,7 +141,7 @@ class GCastService { return bufferedExpiration.isAfter(DateTime.now()); } - void loadMedia(RemoteAsset asset, bool reload) async { + Future loadMedia(RemoteAsset asset, bool reload) async { if (!isConnected) { return; } else if (asset.id == currentAssetId && !reload) { diff --git a/mobile/lib/services/immich_logger.service.dart b/mobile/lib/services/immich_logger.service.dart index fab4b9966a..bfc9bd9b51 100644 --- a/mobile/lib/services/immich_logger.service.dart +++ b/mobile/lib/services/immich_logger.service.dart @@ -39,6 +39,10 @@ abstract final class ImmichLogger { await io.close(); } + if (!context.mounted) { + return; + } + final box = context.findRenderObject() as RenderBox?; // Share file diff --git a/mobile/lib/services/map.service.dart b/mobile/lib/services/map.service.dart index 5b50e8a890..b439af8668 100644 --- a/mobile/lib/services/map.service.dart +++ b/mobile/lib/services/map.service.dart @@ -1,3 +1,5 @@ +import 'dart:async'; + import 'package:immich_mobile/mixins/error_logger.mixin.dart'; import 'package:immich_mobile/models/map/map_marker.model.dart'; import 'package:immich_mobile/services/api.service.dart'; @@ -11,7 +13,7 @@ class MapService with ErrorLoggerMixin { final logger = Logger("MapService"); MapService(this._apiService) { - _setMapUserAgentHeader(); + unawaited(_setMapUserAgentHeader()); } Future _setMapUserAgentHeader() async { diff --git a/mobile/lib/services/network.service.dart b/mobile/lib/services/network.service.dart index 8622400e7a..e31ecb617e 100644 --- a/mobile/lib/services/network.service.dart +++ b/mobile/lib/services/network.service.dart @@ -8,7 +8,7 @@ final networkServiceProvider = Provider((ref) { class NetworkService { final NetworkRepository _repository; - final IPermissionRepository _permissionRepository; + final DevicePermissionRepository _permissionRepository; const NetworkService(this._repository, this._permissionRepository); diff --git a/mobile/lib/services/person.service.dart b/mobile/lib/services/person.service.dart deleted file mode 100644 index 0d589ea71d..0000000000 --- a/mobile/lib/services/person.service.dart +++ /dev/null @@ -1,32 +0,0 @@ -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:immich_mobile/domain/models/person.model.dart'; -import 'package:immich_mobile/repositories/person_api.repository.dart'; -import 'package:logging/logging.dart'; - -final personServiceProvider = Provider.autoDispose( - (ref) => PersonService(ref.watch(personApiRepositoryProvider)), -); - -class PersonService { - final Logger _log = Logger("PersonService"); - final PersonApiRepository _personApiRepository; - PersonService(this._personApiRepository); - - Future> getAllPeople() async { - try { - return await _personApiRepository.getAll(); - } catch (error, stack) { - _log.severe("Error while fetching curated people", error, stack); - return []; - } - } - - Future updateName(String id, String name) async { - try { - return await _personApiRepository.update(id, name: name); - } catch (error, stack) { - _log.severe("Error while updating person name", error, stack); - } - return null; - } -} diff --git a/mobile/lib/services/search.service.dart b/mobile/lib/services/search.service.dart index 0330c8485c..e64c529f26 100644 --- a/mobile/lib/services/search.service.dart +++ b/mobile/lib/services/search.service.dart @@ -34,7 +34,7 @@ class SearchService { model: model, ); } catch (e) { - dPrint(() => "[ERROR] [getSearchSuggestions] ${e.toString()}"); + dPrint(() => "[ERROR] [getSearchSuggestions] $e"); return []; } } diff --git a/mobile/lib/services/server_info.service.dart b/mobile/lib/services/server_info.service.dart index 460e135421..fb8b347caa 100644 --- a/mobile/lib/services/server_info.service.dart +++ b/mobile/lib/services/server_info.service.dart @@ -21,7 +21,7 @@ class ServerInfoService { return ServerDiskInfo.fromDto(dto); } } catch (e) { - dPrint(() => "Error [getDiskInfo] ${e.toString()}"); + dPrint(() => "Error [getDiskInfo] $e"); } return null; } @@ -33,7 +33,7 @@ class ServerInfoService { return ServerVersion.fromDto(dto); } } catch (e) { - dPrint(() => "Error [getServerVersion] ${e.toString()}"); + dPrint(() => "Error [getServerVersion] $e"); } return null; } @@ -45,7 +45,7 @@ class ServerInfoService { return ServerFeatures.fromDto(dto); } } catch (e) { - dPrint(() => "Error [getServerFeatures] ${e.toString()}"); + dPrint(() => "Error [getServerFeatures] $e"); } return null; } @@ -57,7 +57,7 @@ class ServerInfoService { return ServerConfig.fromDto(dto); } } catch (e) { - dPrint(() => "Error [getServerConfig] ${e.toString()}"); + dPrint(() => "Error [getServerConfig] $e"); } return null; } diff --git a/mobile/lib/services/share_intent_service.dart b/mobile/lib/services/share_intent_service.dart index fca5c4a188..a5ab5d8bc9 100644 --- a/mobile/lib/services/share_intent_service.dart +++ b/mobile/lib/services/share_intent_service.dart @@ -1,3 +1,5 @@ +import 'dart:async'; + import 'package:hooks_riverpod/hooks_riverpod.dart'; import 'package:immich_mobile/models/upload/share_intent_attachment.model.dart'; import 'package:immich_mobile/repositories/share_handler.repository.dart'; @@ -12,6 +14,6 @@ class ShareIntentService { void init() { shareHandlerRepository.onSharedMedia = onSharedMedia; - shareHandlerRepository.init(); + unawaited(shareHandlerRepository.init()); } } diff --git a/mobile/lib/services/toast.service.dart b/mobile/lib/services/toast.service.dart new file mode 100644 index 0000000000..2b61a945ff --- /dev/null +++ b/mobile/lib/services/toast.service.dart @@ -0,0 +1,26 @@ +import 'dart:async'; + +import 'package:immich_ui/immich_ui.dart'; + +class ToastOption { + final Duration? timeout; + final FutureOr Function()? onUndo; + + const ToastOption({this.timeout, this.onUndo}); +} + +class ToastService { + const ToastService(); + + FutureOr success(String message, {ToastOption? toast}) { + snackbar.success(message, duration: toast?.timeout); + } + + FutureOr info(String message, {ToastOption? toast}) { + snackbar.info(message, duration: toast?.timeout); + } + + FutureOr error(String message, {ToastOption? toast}) { + snackbar.error(message, duration: toast?.timeout); + } +} diff --git a/mobile/lib/services/view_intent.service.dart b/mobile/lib/services/view_intent.service.dart index 22a3407e5a..e822d1ebb6 100644 --- a/mobile/lib/services/view_intent.service.dart +++ b/mobile/lib/services/view_intent.service.dart @@ -61,6 +61,7 @@ class ViewIntentService { try { final file = File(path); + // ignore: avoid_slow_async_io if (await file.exists()) { await file.delete(); } diff --git a/mobile/lib/theme/dynamic_theme.dart b/mobile/lib/theme/dynamic_theme.dart index 7f7c4d05d7..088679b508 100644 --- a/mobile/lib/theme/dynamic_theme.dart +++ b/mobile/lib/theme/dynamic_theme.dart @@ -1,6 +1,5 @@ -import 'package:flutter/material.dart'; import 'package:dynamic_color/dynamic_color.dart'; - +import 'package:flutter/material.dart'; import 'package:immich_mobile/theme/theme_data.dart'; import 'package:immich_mobile/utils/debug_print.dart'; diff --git a/mobile/lib/utils/action_button.utils.dart b/mobile/lib/utils/action_button.utils.dart index 0e5a3123e7..4e0a5efff5 100644 --- a/mobile/lib/utils/action_button.utils.dart +++ b/mobile/lib/utils/action_button.utils.dart @@ -1,5 +1,4 @@ import 'package:auto_route/auto_route.dart'; -import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; import 'package:immich_mobile/constants/enums.dart'; import 'package:immich_mobile/domain/models/album/album.model.dart'; @@ -7,31 +6,27 @@ import 'package:immich_mobile/domain/models/asset/base_asset.model.dart'; import 'package:immich_mobile/domain/models/events.model.dart'; import 'package:immich_mobile/domain/services/timeline.service.dart'; import 'package:immich_mobile/domain/utils/event_stream.dart'; +import 'package:immich_mobile/generated/translations.g.dart'; import 'package:immich_mobile/presentation/actions/action.widget.dart'; +import 'package:immich_mobile/presentation/actions/archive.action.dart'; import 'package:immich_mobile/presentation/actions/asset_debug.action.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/archive_action_button.widget.dart'; +import 'package:immich_mobile/presentation/actions/cast.action.dart'; +import 'package:immich_mobile/presentation/actions/delete.action.dart'; +import 'package:immich_mobile/presentation/actions/download.action.dart'; +import 'package:immich_mobile/presentation/actions/lock.action.dart'; +import 'package:immich_mobile/presentation/actions/open_in_browser.action.dart'; +import 'package:immich_mobile/presentation/actions/remove_from_album.action.dart'; +import 'package:immich_mobile/presentation/actions/restore.action.dart'; +import 'package:immich_mobile/presentation/actions/set_album_cover.action.dart'; +import 'package:immich_mobile/presentation/actions/set_profile_picture.action.dart'; +import 'package:immich_mobile/presentation/actions/share.action.dart'; +import 'package:immich_mobile/presentation/actions/share_link.action.dart'; +import 'package:immich_mobile/presentation/actions/similar_photos.action.dart'; +import 'package:immich_mobile/presentation/actions/slideshow.action.dart'; +import 'package:immich_mobile/presentation/actions/stack.action.dart'; +import 'package:immich_mobile/presentation/actions/upload.action.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/base_action_button.widget.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/cast_action_button.widget.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/delete_action_button.widget.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/delete_local_action_button.widget.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/delete_permanent_action_button.widget.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/download_action_button.widget.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/like_activity_action_button.widget.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/move_to_lock_folder_action_button.widget.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/open_in_browser_action_button.widget.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/remove_from_album_action_button.widget.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/remove_from_lock_folder_action_button.widget.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/restore_action_button.widget.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/set_album_cover.widget.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/set_profile_picture_action_button.widget.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/share_action_button.widget.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/share_link_action_button.widget.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/similar_photos_action_button.widget.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/slideshow_action_button.widget.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/trash_action_button.widget.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/unarchive_action_button.widget.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/unstack_action_button.widget.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/upload_action_button.widget.dart'; import 'package:immich_mobile/routing/router.dart'; class ActionButtonContext { @@ -85,9 +80,7 @@ enum ActionButtonType { removeFromLockFolder, removeFromAlbum, restoreTrash, - trash, deleteLocal, - deletePermanent, delete, advancedInfo; @@ -112,25 +105,12 @@ enum ActionButtonType { !context.isInLockedView && // context.asset.hasRemote && // !context.asset.hasLocal, - ActionButtonType.trash => - context.isOwner && // - !context.isInLockedView && // - context.asset.hasRemote && // - context.isTrashEnabled && // - context.timelineOrigin != TimelineOrigin.trash, ActionButtonType.restoreTrash => context.isOwner && // !context.isInLockedView && // context.asset.hasRemote && // context.timelineOrigin == TimelineOrigin.trash, - ActionButtonType.deletePermanent => - context.isOwner && // - context.asset.hasRemote && // - (!context.isTrashEnabled || context.timelineOrigin == TimelineOrigin.trash || context.isInLockedView), - ActionButtonType.delete => - context.isOwner && // - !context.isInLockedView && // - context.asset.hasRemote, + ActionButtonType.delete => true, ActionButtonType.moveToLockFolder => context.isOwner && // !context.isInLockedView && // @@ -141,7 +121,7 @@ enum ActionButtonType { context.asset.hasRemote, ActionButtonType.deleteLocal => !context.isInLockedView && // - context.asset.hasLocal, + context.asset.isMerged, ActionButtonType.upload => !context.isInLockedView && // context.asset.storage == AssetState.local, @@ -192,87 +172,44 @@ enum ActionButtonType { bool menuItem = false, ]) { return switch (this) { - ActionButtonType.advancedInfo => ActionMenuItemWidget(action: AssetDebugAction(assets: [context.asset])), - ActionButtonType.share => ShareActionButton(source: context.source, iconOnly: iconOnly, menuItem: menuItem), - ActionButtonType.shareLink => ShareLinkActionButton( - source: context.source, - iconOnly: iconOnly, - menuItem: menuItem, + ActionButtonType.advancedInfo => ActionMenuItem(action: AssetDebugAction(source: context.source)), + ActionButtonType.share => ActionMenuItem(action: ShareAction(source: context.source)), + ActionButtonType.shareLink => ActionMenuItem(action: ShareLinkAction(source: context.source)), + ActionButtonType.slideshow => const ActionMenuItem(action: SlideshowAction()), + ActionButtonType.archive || + ActionButtonType.unarchive => ActionMenuItem(action: ArchiveAction(source: context.source)), + ActionButtonType.download => ActionMenuItem(action: DownloadAction(source: context.source)), + ActionButtonType.restoreTrash => ActionMenuItem(action: RestoreAction(source: context.source)), + ActionButtonType.delete => ActionMenuItem(action: DeleteAction(source: context.source)), + ActionButtonType.moveToLockFolder || + ActionButtonType.removeFromLockFolder => ActionMenuItem(action: LockAction(source: context.source)), + ActionButtonType.deleteLocal => ActionMenuItem(action: CleanupLocalAction(source: context.source)), + ActionButtonType.upload => ActionMenuItem( + action: UploadAction(source: context.source, showProgress: context.source == ActionSource.viewer), ), - ActionButtonType.slideshow => SlideshowActionButton(iconOnly: iconOnly, menuItem: menuItem), - ActionButtonType.archive => ArchiveActionButton(source: context.source, iconOnly: iconOnly, menuItem: menuItem), - ActionButtonType.unarchive => UnArchiveActionButton( - source: context.source, - iconOnly: iconOnly, - menuItem: menuItem, + ActionButtonType.removeFromAlbum => ActionMenuItem( + action: RemoveFromAlbumAction(source: context.source, albumId: context.currentAlbum!.id), ), - ActionButtonType.download => DownloadActionButton(source: context.source, iconOnly: iconOnly, menuItem: menuItem), - ActionButtonType.trash => TrashActionButton(source: context.source, iconOnly: iconOnly, menuItem: menuItem), - ActionButtonType.restoreTrash => RestoreActionButton( - source: context.source, - iconOnly: iconOnly, - menuItem: menuItem, - ), - ActionButtonType.deletePermanent => DeletePermanentActionButton( - source: context.source, - iconOnly: iconOnly, - menuItem: menuItem, - ), - ActionButtonType.delete => DeleteActionButton(source: context.source, iconOnly: iconOnly, menuItem: menuItem), - ActionButtonType.moveToLockFolder => MoveToLockFolderActionButton( - source: context.source, - iconOnly: iconOnly, - menuItem: menuItem, - ), - ActionButtonType.removeFromLockFolder => RemoveFromLockFolderActionButton( - source: context.source, - iconOnly: iconOnly, - menuItem: menuItem, - ), - ActionButtonType.deleteLocal => DeleteLocalActionButton( - source: context.source, - iconOnly: iconOnly, - menuItem: menuItem, - ), - ActionButtonType.upload => UploadActionButton(source: context.source, iconOnly: iconOnly, menuItem: menuItem), - ActionButtonType.removeFromAlbum => RemoveFromAlbumActionButton( - albumId: context.currentAlbum!.id, - source: context.source, - iconOnly: iconOnly, - menuItem: menuItem, - ), - ActionButtonType.setAlbumCover => SetAlbumCoverActionButton( - albumId: context.currentAlbum!.id, - source: context.source, - iconOnly: iconOnly, - menuItem: menuItem, + ActionButtonType.setAlbumCover => ActionMenuItem( + action: SetAlbumCoverAction(source: context.source, albumId: context.currentAlbum!.id), ), ActionButtonType.likeActivity => LikeActivityActionButton(iconOnly: iconOnly, menuItem: menuItem), - ActionButtonType.unstack => UnStackActionButton(source: context.source, iconOnly: iconOnly, menuItem: menuItem), - ActionButtonType.openInBrowser => OpenInBrowserActionButton( - remoteId: context.asset.remoteId!, - origin: context.timelineOrigin, - iconOnly: iconOnly, - menuItem: menuItem, + ActionButtonType.unstack => ActionMenuItem(action: StackAction(source: context.source)), + ActionButtonType.openInBrowser => ActionMenuItem( + action: OpenInBrowserAction(remoteId: context.asset.remoteId!, origin: context.timelineOrigin), ), - ActionButtonType.similarPhotos => SimilarPhotosActionButton( - assetId: (context.asset as RemoteAsset).id, - iconOnly: iconOnly, - menuItem: menuItem, - ), - ActionButtonType.setProfilePicture => SetProfilePictureActionButton( - asset: context.asset, - iconOnly: iconOnly, - menuItem: menuItem, + ActionButtonType.similarPhotos => ActionMenuItem( + action: SimilarPhotosAction(assetId: (context.asset as RemoteAsset).id), ), + ActionButtonType.setProfilePicture => ActionMenuItem(action: SetProfilePictureAction(asset: context.asset)), ActionButtonType.openInfo => BaseActionButton( - label: 'info'.tr(), + label: StaticTranslations.instance.info, iconData: Icons.info_outline, menuItem: true, onPressed: () => EventStream.shared.emit(const ViewerShowDetailsEvent()), ), ActionButtonType.viewInTimeline => BaseActionButton( - label: 'view_in_timeline'.tr(), + label: StaticTranslations.instance.view_in_timeline, iconData: Icons.image_search, iconOnly: iconOnly, menuItem: menuItem, @@ -283,7 +220,7 @@ enum ActionButtonType { EventStream.shared.emit(ScrollToDateEvent(context.asset.createdAt)); }, ), - ActionButtonType.cast => CastActionButton(iconOnly: iconOnly, menuItem: menuItem), + ActionButtonType.cast => const ActionMenuItem(action: CastAction()), }; } @@ -294,8 +231,6 @@ enum ActionButtonType { // 0: info ActionButtonType.openInfo => 0, // 10: move, remove, and delete - ActionButtonType.trash => 10, - ActionButtonType.deletePermanent => 10, ActionButtonType.removeFromLockFolder => 10, ActionButtonType.removeFromAlbum => 10, ActionButtonType.unstack => 10, @@ -323,7 +258,6 @@ class ActionButtonBuilder { ActionButtonType.archive, ActionButtonType.unarchive, ActionButtonType.restoreTrash, - ActionButtonType.deletePermanent, }; static List build(ActionButtonContext context) { diff --git a/mobile/lib/utils/asset_filter.dart b/mobile/lib/utils/asset_filter.dart new file mode 100644 index 0000000000..a4de5d2761 --- /dev/null +++ b/mobile/lib/utils/asset_filter.dart @@ -0,0 +1,24 @@ +import 'package:immich_mobile/domain/models/asset/base_asset.model.dart'; + +extension type const AssetFilter(Iterable assets) implements Iterable { + AssetFilter where(bool Function(T asset) test) => AssetFilter(assets.where(test)); + AssetFilter whereNot(bool Function(T asset) test) => AssetFilter(assets.where((asset) => !test(asset))); + + AssetFilter type(AssetType type) => where((asset) => asset.type == type); + AssetFilter favorite({bool isFavorite = true}) => where((asset) => asset.isFavorite == isFavorite); + + AssetFilter remote() => AssetFilter(assets.whereType()); + AssetFilter owned(String ownerId) => remote().where((asset) => asset.ownerId == ownerId); + AssetFilter visibility(AssetVisibility visibility) => + remote().where((asset) => asset.visibility == visibility); + AssetFilter notVisibility(AssetVisibility visibility) => + remote().where((asset) => asset.visibility != visibility); + AssetFilter archived({bool isArchived = true}) => + remote().where((asset) => asset.isArchived == isArchived); + AssetFilter locked({bool isLocked = true}) => remote().where((asset) => asset.isLocked == isLocked); + AssetFilter stacked({bool isStacked = true}) => remote().where((asset) => asset.isStacked == isStacked); + AssetFilter trashed({bool isTrashed = true}) => remote().where((asset) => asset.isTrashed == isTrashed); + + AssetFilter local() => AssetFilter(assets.whereType()); + AssetFilter backedUp({bool isBackedUp = true}) => where((asset) => asset.isMerged == isBackedUp); +} diff --git a/mobile/lib/utils/async_mutex.dart b/mobile/lib/utils/async_mutex.dart index b97ab9b052..6c54c1220d 100644 --- a/mobile/lib/utils/async_mutex.dart +++ b/mobile/lib/utils/async_mutex.dart @@ -12,10 +12,12 @@ class AsyncMutex { Future run(Future Function() operation) { final completer = Completer(); _enqueued++; - _running.whenComplete(() { - _enqueued--; - completer.complete(Future.sync(operation)); - }); + unawaited( + _running.whenComplete(() { + _enqueued--; + completer.complete(Future.sync(operation)); + }), + ); return _running = completer.future; } } diff --git a/mobile/lib/utils/bootstrap.dart b/mobile/lib/utils/bootstrap.dart index 119df5b804..efe6403559 100644 --- a/mobile/lib/utils/bootstrap.dart +++ b/mobile/lib/utils/bootstrap.dart @@ -2,41 +2,46 @@ import 'package:background_downloader/background_downloader.dart'; import 'package:immich_mobile/constants/constants.dart'; import 'package:immich_mobile/domain/services/log.service.dart'; import 'package:immich_mobile/domain/services/store.service.dart'; -import 'package:immich_mobile/extensions/translate_extensions.dart'; +import 'package:immich_mobile/generated/translations.g.dart'; import 'package:immich_mobile/infrastructure/repositories/db.repository.dart'; import 'package:immich_mobile/infrastructure/repositories/log.repository.dart'; import 'package:immich_mobile/infrastructure/repositories/logger_db.repository.dart'; -import 'package:immich_mobile/infrastructure/repositories/settings.repository.dart'; import 'package:immich_mobile/infrastructure/repositories/network.repository.dart'; +import 'package:immich_mobile/infrastructure/repositories/settings.repository.dart'; import 'package:immich_mobile/infrastructure/repositories/store.repository.dart'; +import 'package:immich_mobile/utils/debug_print.dart'; +import 'package:logging/logging.dart'; import 'package:photo_manager/photo_manager.dart'; +import 'package:sqlite3/common.dart'; void configureFileDownloaderNotifications() { + final t = StaticTranslations.instance; + FileDownloader().configureNotificationForGroup( kDownloadGroupImage, - running: TaskNotification('downloading_media'.t(), '${'file_name_text'.t()}: {filename}'), - complete: TaskNotification('download_finished'.t(), '${'file_name_text'.t()}: {filename}'), + running: TaskNotification(t.downloading_media, '${t.file_name_text}: {filename}'), + complete: TaskNotification(t.download_finished, '${t.file_name_text}: {filename}'), progressBar: true, ); FileDownloader().configureNotificationForGroup( kDownloadGroupVideo, - running: TaskNotification('downloading_media'.t(), '${'file_name_text'.t()}: {filename}'), - complete: TaskNotification('download_finished'.t(), '${'file_name_text'.t()}: {filename}'), + running: TaskNotification(t.downloading_media, '${t.file_name_text}: {filename}'), + complete: TaskNotification(t.download_finished, '${t.file_name_text}: {filename}'), progressBar: true, ); FileDownloader().configureNotificationForGroup( kManualUploadGroup, - running: TaskNotification('uploading_media'.t(), 'backup_background_service_in_progress_notification'.t()), - complete: TaskNotification('upload_finished'.t(), 'backup_background_service_complete_notification'.t()), + running: TaskNotification(t.uploading_media, t.backup_background_service_in_progress_notification), + complete: TaskNotification(t.upload_finished, t.backup_background_service_complete_notification), groupNotificationId: kManualUploadGroup, ); FileDownloader().configureNotificationForGroup( kBackupGroup, - running: TaskNotification('uploading_media'.t(), 'backup_background_service_in_progress_notification'.t()), - complete: TaskNotification('upload_finished'.t(), 'backup_background_service_complete_notification'.t()), + running: TaskNotification(t.uploading_media, t.backup_background_service_in_progress_notification), + complete: TaskNotification(t.upload_finished, t.backup_background_service_complete_notification), groupNotificationId: kBackupGroup, ); } @@ -46,18 +51,12 @@ abstract final class Bootstrap { await configureSqliteCache(); final (db, updatePool) = await openSqliteConnectionWithUpdatePool(name: 'immich'); final drift = Drift.sqlite(db, updatePool); - final logDb = DriftLogger.sqlite(await openSqliteConnection(name: 'immich_logs')); final DriftStoreRepository storeRepo = DriftStoreRepository(drift); await StoreService.init(storeRepository: storeRepo, listenUpdates: listenStoreUpdates); final settingsRepo = await SettingsRepository.ensureInitialized(drift); - - await LogService.init( - logRepository: LogRepository(logDb), - settingsRepository: settingsRepo, - shouldBuffer: shouldBufferLogs, - ); + final logDb = await _initLogger(settingsRepository: settingsRepo, shouldBufferLogs: shouldBufferLogs); await NetworkRepository.init(); // Remove once all asset operations are migrated to Native APIs @@ -65,3 +64,33 @@ abstract final class Bootstrap { return (drift, logDb); } } + +Future _initLogger({required SettingsRepository settingsRepository, bool shouldBufferLogs = true}) async { + Future open() async => DriftLogger.sqlite(await openSqliteConnection(name: 'immich_logs')); + + DriftLogger logDb = await open(); + bool wasCorrupt = false; + try { + await logDb.customSelect('SELECT COUNT(*) FROM logger_messages').get(); + } on SqliteException catch (error) { + if (error.resultCode != SqlError.SQLITE_CORRUPT && error.resultCode != SqlError.SQLITE_NOTADB) { + await logDb.close(); + rethrow; + } + dPrint(() => 'Logs database is corrupt, recreating it'); + await logDb.close(); + await deleteSqliteDatabase(name: 'immich_logs'); + logDb = await open(); + wasCorrupt = true; + } + + await LogService.init( + logRepository: LogRepository(logDb), + settingsRepository: settingsRepository, + shouldBuffer: shouldBufferLogs, + ); + if (wasCorrupt) { + Logger('bootstrap:initLogger').warning('Logs database was corrupt and has been recreated'); + } + return logDb; +} diff --git a/mobile/lib/utils/bytes_units.dart b/mobile/lib/utils/bytes_units.dart index 5eb15221fe..2c5c5f18a9 100644 --- a/mobile/lib/utils/bytes_units.dart +++ b/mobile/lib/utils/bytes_units.dart @@ -22,6 +22,6 @@ String formatHumanReadableBytes(int bytes, int decimals) { return "0 B"; } const suffixes = ["B", "KiB", "MiB", "GiB", "TiB"]; - var i = (log(bytes) / log(1024)).floor(); + final i = (log(bytes) / log(1024)).floor(); return '${(bytes / pow(1024, i)).toStringAsFixed(decimals)} ${suffixes[i]}'; } diff --git a/mobile/lib/utils/diff.dart b/mobile/lib/utils/diff.dart index ea20de16cc..fae3a5d516 100644 --- a/mobile/lib/utils/diff.dart +++ b/mobile/lib/utils/diff.dart @@ -16,7 +16,8 @@ Future diffSortedLists( assert(la.isSorted(compare), "first argument must be sorted"); assert(lb.isSorted(compare), "second argument must be sorted"); bool diff = false; - int i = 0, j = 0; + int i = 0; + int j = 0; for (; i < la.length && j < lb.length;) { final int order = compare(la[i], lb[j]); if (order == 0) { @@ -53,7 +54,8 @@ bool diffSortedListsSync( assert(la.isSorted(compare), "first argument must be sorted"); assert(lb.isSorted(compare), "second argument must be sorted"); bool diff = false; - int i = 0, j = 0; + int i = 0; + int j = 0; for (; i < la.length && j < lb.length;) { final int order = compare(la[i], lb[j]); if (order == 0) { diff --git a/mobile/lib/utils/editor.utils.dart b/mobile/lib/utils/editor.utils.dart index fa2dedf383..c3440cce1a 100644 --- a/mobile/lib/utils/editor.utils.dart +++ b/mobile/lib/utils/editor.utils.dart @@ -50,10 +50,10 @@ typedef NormalizedTransform = ({double rotation, bool mirrorHorizontal, bool mir NormalizedTransform normalizeTransformEdits(List edits) { final matrix = buildAffineFromEdits(edits); - double a = matrix.a; - double b = matrix.b; - double c = matrix.c; - double d = matrix.d; + final double a = matrix.a; + final double b = matrix.b; + final double c = matrix.c; + final double d = matrix.d; final rotation = ((isCloseToZero(a) ? asin(c) : acos(a)) * 180) / pi; diff --git a/mobile/lib/utils/error_handler.dart b/mobile/lib/utils/error_handler.dart index 24387b8002..dcac1431ab 100644 --- a/mobile/lib/utils/error_handler.dart +++ b/mobile/lib/utils/error_handler.dart @@ -8,7 +8,7 @@ import 'package:openapi/api.dart'; // ignore: depend_on_referenced_packages import 'package:stack_trace/stack_trace.dart'; -void handleError(BuildContext context, Object error, {StackTrace? stack, String? description}) { +void handleError(Object error, {StackTrace? stack, String? description}) { String? stackTrace; if (stack != null) { final trace = Trace.from(stack); @@ -23,17 +23,13 @@ void handleError(BuildContext context, Object error, {StackTrace? stack, String? () => 'Error${description != null ? ' ($description)' : ''}: $error${stackTrace != null ? '\n$stackTrace' : ''}', ); - if (!context.mounted) { - return; - } - final String message; - if (serverErrorMessage(error) case String serverMessage) { + if (serverErrorMessage(error) case final String serverMessage) { message = serverMessage; } else if (isConnectionError(error)) { - message = context.t.login_form_server_error; + message = StaticTranslations.instance.login_form_server_error; } else { - message = context.t.scaffold_body_error_occurred; + message = StaticTranslations.instance.scaffold_body_error_occurred; } snackbar.error(message); diff --git a/mobile/lib/utils/hooks/app_settings_update_hook.dart b/mobile/lib/utils/hooks/app_settings_update_hook.dart index c498b60b06..6b7ba357f3 100644 --- a/mobile/lib/utils/hooks/app_settings_update_hook.dart +++ b/mobile/lib/utils/hooks/app_settings_update_hook.dart @@ -1,3 +1,5 @@ +import 'dart:async'; + import 'package:flutter/cupertino.dart'; import 'package:flutter_hooks/flutter_hooks.dart' hide Store; import 'package:immich_mobile/entities/store.entity.dart'; @@ -7,7 +9,7 @@ ValueNotifier useAppSettingsState(AppSettingsEnum key) { final notifier = useState(Store.get(key.storeKey, key.defaultValue)); // Listen to changes to the notifier and update app settings - useValueChanged(notifier.value, (_, __) => Store.put(key.storeKey, notifier.value)); + useValueChanged(notifier.value, (_, _) => unawaited(Store.put(key.storeKey, notifier.value))); return notifier; } diff --git a/mobile/lib/utils/hooks/crop_controller_hook.dart b/mobile/lib/utils/hooks/crop_controller_hook.dart index 663bca3dbf..cea901bd2e 100644 --- a/mobile/lib/utils/hooks/crop_controller_hook.dart +++ b/mobile/lib/utils/hooks/crop_controller_hook.dart @@ -1,7 +1,8 @@ -import 'package:flutter_hooks/flutter_hooks.dart'; -import 'package:crop_image/crop_image.dart'; import 'dart:ui'; // Import the dart:ui library for Rect +import 'package:crop_image/crop_image.dart'; +import 'package:flutter_hooks/flutter_hooks.dart'; + /// A hook that provides a [CropController] instance. CropController useCropController() { return useMemoized(() => CropController(defaultCrop: const Rect.fromLTRB(0, 0, 1, 1))); diff --git a/mobile/lib/utils/image_converter.dart b/mobile/lib/utils/image_converter.dart index 6711e2bd56..1a3a00130a 100644 --- a/mobile/lib/utils/image_converter.dart +++ b/mobile/lib/utils/image_converter.dart @@ -12,16 +12,18 @@ import 'package:flutter/material.dart'; Future imageToUint8List(Image image) async { final Completer completer = Completer(); image.image - .resolve(const ImageConfiguration()) + .resolve(ImageConfiguration.empty) .addListener( ImageStreamListener((ImageInfo info, bool _) { - info.image.toByteData(format: ImageByteFormat.png).then((byteData) { - if (byteData != null) { - completer.complete(byteData.buffer.asUint8List()); - } else { - completer.completeError('Failed to convert image to bytes'); - } - }); + unawaited( + info.image.toByteData(format: ImageByteFormat.png).then((byteData) { + if (byteData != null) { + completer.complete(byteData.buffer.asUint8List()); + } else { + completer.completeError('Failed to convert image to bytes'); + } + }), + ); }, onError: (exception, stackTrace) => completer.completeError(exception)), ); return completer.future; diff --git a/mobile/lib/utils/image_url_builder.dart b/mobile/lib/utils/image_url_builder.dart index c562049b1d..4f584061d7 100644 --- a/mobile/lib/utils/image_url_builder.dart +++ b/mobile/lib/utils/image_url_builder.dart @@ -12,7 +12,7 @@ String getThumbnailUrlForRemoteId( bool edited = true, String? thumbhash, }) { - final url = '${Store.get(StoreKey.serverEndpoint)}/assets/$id/thumbnail?size=${type.value}&edited=$edited'; + final url = '${Store.get(StoreKey.serverEndpoint)}/assets/$id/thumbnail?size=$type&edited=$edited'; return thumbhash != null ? '$url&c=${Uri.encodeComponent(thumbhash)}' : url; } @@ -20,6 +20,7 @@ String getPlaybackUrlForRemoteId(final String id) { return '${Store.get(StoreKey.serverEndpoint)}/assets/$id/video/playback?'; } -String getFaceThumbnailUrl(final String personId) { - return '${Store.get(StoreKey.serverEndpoint)}/people/$personId/thumbnail'; +String getFaceThumbnailUrl(final String personId, {DateTime? updatedAt}) { + final url = '${Store.get(StoreKey.serverEndpoint)}/people/$personId/thumbnail'; + return updatedAt != null ? '$url?c=${updatedAt.millisecondsSinceEpoch}' : url; } diff --git a/mobile/lib/utils/map_utils.dart b/mobile/lib/utils/map_utils.dart index 6213b214a9..2a89b63422 100644 --- a/mobile/lib/utils/map_utils.dart +++ b/mobile/lib/utils/map_utils.dart @@ -1,8 +1,8 @@ import 'dart:async'; -import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; import 'package:geolocator/geolocator.dart'; +import 'package:immich_mobile/generated/translations.g.dart'; import 'package:immich_mobile/models/map/map_marker.model.dart'; import 'package:immich_mobile/widgets/common/confirm_dialog.dart'; import 'package:logging/logging.dart'; @@ -68,7 +68,11 @@ class MapUtils { bool silent = false, }) async { try { - bool serviceEnabled = await Geolocator.isLocationServiceEnabled(); + final serviceEnabled = await Geolocator.isLocationServiceEnabled(); + if (!context.mounted) { + return (null, LocationPermission.unableToDetermine); + } + if (!serviceEnabled && !silent) { unawaited(showDialog(context: context, builder: (context) => _LocationServiceDisabledDialog())); return (null, LocationPermission.deniedForever); @@ -78,6 +82,10 @@ class MapUtils { bool shouldRequestPermission = false; if (permission == LocationPermission.denied && !silent) { + if (!context.mounted) { + return (null, LocationPermission.unableToDetermine); + } + shouldRequestPermission = await showDialog( context: context, builder: (context) => _LocationPermissionDisabledDialog(), @@ -95,7 +103,7 @@ class MapUtils { return (null, LocationPermission.deniedForever); } - Position currentUserLocation = await Geolocator.getCurrentPosition( + final Position currentUserLocation = await Geolocator.getCurrentPosition( locationSettings: const LocationSettings( accuracy: LocationAccuracy.high, distanceFilter: 0, @@ -113,10 +121,10 @@ class MapUtils { class _LocationServiceDisabledDialog extends ConfirmDialog { _LocationServiceDisabledDialog() : super( - title: 'map_location_service_disabled_title'.tr(), - content: 'map_location_service_disabled_content'.tr(), - cancel: 'cancel'.tr(), - ok: 'yes'.tr(), + title: StaticTranslations.instance.map_location_service_disabled_title, + content: StaticTranslations.instance.map_location_service_disabled_content, + cancel: StaticTranslations.instance.cancel, + ok: StaticTranslations.instance.yes, onOk: () async { await Geolocator.openLocationSettings(); }, @@ -126,10 +134,10 @@ class _LocationServiceDisabledDialog extends ConfirmDialog { class _LocationPermissionDisabledDialog extends ConfirmDialog { _LocationPermissionDisabledDialog() : super( - title: 'map_no_location_permission_title'.tr(), - content: 'map_no_location_permission_content'.tr(), - cancel: 'cancel'.tr(), - ok: 'yes'.tr(), + title: StaticTranslations.instance.map_no_location_permission_title, + content: StaticTranslations.instance.map_no_location_permission_content, + cancel: StaticTranslations.instance.cancel, + ok: StaticTranslations.instance.yes, onOk: () {}, ); } diff --git a/mobile/lib/utils/migration.dart b/mobile/lib/utils/migration.dart index d387c274ea..56fccf4610 100644 --- a/mobile/lib/utils/migration.dart +++ b/mobile/lib/utils/migration.dart @@ -11,17 +11,20 @@ import 'package:immich_mobile/domain/models/log.model.dart'; import 'package:immich_mobile/domain/models/settings_key.dart'; import 'package:immich_mobile/domain/models/store.model.dart'; import 'package:immich_mobile/domain/models/timeline.model.dart'; +import 'package:immich_mobile/domain/services/feature_message.service.dart'; import 'package:immich_mobile/entities/store.entity.dart'; import 'package:immich_mobile/infrastructure/entities/settings.entity.drift.dart'; import 'package:immich_mobile/infrastructure/repositories/db.repository.dart'; import 'package:immich_mobile/infrastructure/repositories/network.repository.dart'; +import 'package:immich_mobile/infrastructure/repositories/settings.repository.dart'; import 'package:immich_mobile/models/auth/auxilary_endpoint.model.dart'; import 'package:immich_mobile/providers/album/album_sort_by_options.provider.dart'; const int targetVersion = 26; Future migrateDatabaseIfNeeded(Drift drift) async { - final int version = Store.get(StoreKey.version, targetVersion); + final int? storedVersion = Store.tryGet(StoreKey.version); + final version = storedVersion ?? targetVersion; if (version < 25) { await _migrateTo25(); @@ -31,6 +34,10 @@ Future migrateDatabaseIfNeeded(Drift drift) async { await _migrateTo26(drift); } + if (storedVersion == null) { + await FeatureMessageService(SettingsRepository.instance).markSeen(); + } + await Store.put(StoreKey.version, targetVersion); return; } diff --git a/mobile/lib/utils/openapi_patching.dart b/mobile/lib/utils/openapi_patching.dart index eca190ce8b..9df2eea462 100644 --- a/mobile/lib/utils/openapi_patching.dart +++ b/mobile/lib/utils/openapi_patching.dart @@ -26,6 +26,7 @@ final Map> openApiPatches = { 'sharedLinks': SharedLinksResponse(enabled: true, sidebarWeb: false).toJson(), 'cast': CastResponse(gCastEnabled: false).toJson(), 'albums': {'defaultAssetOrder': 'desc'}, + 'recentlyAdded': RecentlyAddedResponse(sidebarWeb: false).toJson(), }, 'ServerConfigDto': { 'mapLightStyleUrl': 'https://tiles.immich.cloud/v1/style/light.json', @@ -40,6 +41,7 @@ final Map> openApiPatches = { 'SyncAssetV1': {'isEdited': false}, 'ServerFeaturesDto': {'ocr': false, 'realtimeTranscoding': false}, 'MemoriesResponse': {'duration': 5}, + 'WorkflowResponseDto': {'logging': false}, }; void upgradeDto(dynamic value, String targetType) { @@ -55,9 +57,9 @@ void upgradeDto(dynamic value, String targetType) { }); } -addDefault(dynamic value, String keys, dynamic defaultValue) { +void addDefault(dynamic value, String keys, dynamic defaultValue) { // Loop through the keys and assign the default value if the key is not present - List keyList = keys.split('.'); + final List keyList = keys.split('.'); dynamic current = value; for (int i = 0; i < keyList.length - 1; i++) { diff --git a/mobile/lib/utils/option.dart b/mobile/lib/utils/option.dart index d98dad1995..e88ae59c1f 100644 --- a/mobile/lib/utils/option.dart +++ b/mobile/lib/utils/option.dart @@ -1,3 +1,4 @@ +import 'package:drift/drift.dart'; import 'package:openapi/api.dart' show Optional; sealed class Option { @@ -21,6 +22,11 @@ sealed class Option { None() => null, }; + Option map(U Function(T value) f) => switch (this) { + Some(:final value) => Some(f(value)), + None() => None(), + }; + U fold(U Function(T value) onSome, U Function() onNone) => switch (this) { Some(:final value) => onSome(value), None() => onNone(), @@ -65,3 +71,10 @@ extension OptionToOptional on Option { Some(:final value) => Optional.present(value), }; } + +extension OptionToDriftValue on Option { + Value toDriftValue() => switch (this) { + Some(:final value) => Value(value), + None() => const Value.absent(), + }; +} diff --git a/mobile/lib/utils/people.utils.dart b/mobile/lib/utils/people.utils.dart index ddd1867269..bd2b607e0b 100644 --- a/mobile/lib/utils/people.utils.dart +++ b/mobile/lib/utils/people.utils.dart @@ -1,19 +1,20 @@ import 'package:flutter/material.dart'; import 'package:immich_mobile/domain/models/person.model.dart'; -import 'package:immich_mobile/extensions/translate_extensions.dart'; +import 'package:immich_mobile/generated/translations.g.dart'; import 'package:immich_mobile/presentation/widgets/people/person_edit_birthday_modal.widget.dart'; import 'package:immich_mobile/presentation/widgets/people/person_edit_name_modal.widget.dart'; String formatAge(DateTime birthDate, DateTime referenceDate) { - int ageInYears = _calculateAge(birthDate, referenceDate); - int ageInMonths = _calculateAgeInMonths(birthDate, referenceDate); + final int ageInYears = _calculateAge(birthDate, referenceDate); + final int ageInMonths = _calculateAgeInMonths(birthDate, referenceDate); + final t = StaticTranslations.instance; if (ageInMonths <= 11) { - return "person_age_months".t(args: {'months': ageInMonths.toString()}); + return t.person_age_months(months: ageInMonths); } else if (ageInMonths > 12 && ageInMonths <= 23) { - return "person_age_year_months".t(args: {'months': (ageInMonths - 12).toString()}); + return t.person_age_year_months(months: ageInMonths - 12); } else { - return "person_age_years".t(args: {'years': ageInYears.toString()}); + return t.person_age_years(years: ageInYears); } } @@ -33,7 +34,7 @@ int _calculateAgeInMonths(DateTime birthDate, DateTime referenceDate) { (referenceDate.day < birthDate.day ? 1 : 0); } -Future showNameEditModal(BuildContext context, DriftPerson person) { +Future showNameEditModal(BuildContext context, Person person) { return showDialog( context: context, useRootNavigator: false, @@ -43,7 +44,7 @@ Future showNameEditModal(BuildContext context, DriftPerson person) { ); } -Future showBirthdayEditModal(BuildContext context, DriftPerson person) { +Future showBirthdayEditModal(BuildContext context, Person person) { return showDialog( context: context, useRootNavigator: false, diff --git a/mobile/lib/utils/timezone.dart b/mobile/lib/utils/timezone.dart index 3e8c42d1b2..980d51de8e 100644 --- a/mobile/lib/utils/timezone.dart +++ b/mobile/lib/utils/timezone.dart @@ -21,7 +21,7 @@ import 'package:timezone/timezone.dart'; return (dt, dt.timeZoneOffset); } on LocationNotFoundException { // Handle UTC offset format (e.g., "UTC+08:00") - RegExp re = RegExp(r'^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$', caseSensitive: false); + final RegExp re = RegExp(r'^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$', caseSensitive: false); final m = re.firstMatch(timeZone); if (m != null) { final hours = int.parse(m.group(1) ?? '0'); diff --git a/mobile/lib/utils/url_helper.dart b/mobile/lib/utils/url_helper.dart index b7dc41c4cf..3bcdca06f3 100644 --- a/mobile/lib/utils/url_helper.dart +++ b/mobile/lib/utils/url_helper.dart @@ -2,12 +2,31 @@ import 'package:immich_mobile/domain/models/store.model.dart'; import 'package:immich_mobile/entities/store.entity.dart'; import 'package:punycode/punycode.dart'; -String sanitizeUrl(String url) { +/// Normalizes a server URL, guaranteeing that it has a schema and no trailing slashes +String normalizeServerUrl(String url) { + final trimmedUrl = url.trim(); + // Add schema if none is set - final urlWithSchema = url.trimLeft().startsWith(RegExp(r"https?://")) ? url : "https://$url"; + final urlWithSchema = trimmedUrl.contains('://') ? trimmedUrl : "https://$trimmedUrl"; // Remove trailing slash(es) - return urlWithSchema.trimRight().replaceFirst(RegExp(r"/+$"), ""); + return urlWithSchema.replaceFirst(RegExp(r"/+$"), ""); +} + +/// Validates a user-entered server URL +bool _validateServerUrl(String url) { + final parsedUrl = Uri.tryParse(url); + return parsedUrl != null && parsedUrl.scheme.startsWith(RegExp(r'^https?$')) && parsedUrl.host.isNotEmpty; +} + +/// Normalizes and validates that a server URL is supported +bool normalizeAndValidateServerUrl(String? url) { + if (url == null || url.isEmpty) { + return true; + } + + final normalizedUrl = normalizeServerUrl(url); + return _validateServerUrl(normalizedUrl); } String? getServerUrl() { diff --git a/mobile/lib/utils/version_compatibility.dart b/mobile/lib/utils/version_compatibility.dart index 55dbdc6269..0fbc37a11d 100644 --- a/mobile/lib/utils/version_compatibility.dart +++ b/mobile/lib/utils/version_compatibility.dart @@ -1,6 +1,6 @@ import 'package:immich_mobile/utils/semver.dart'; -String? getVersionCompatibilityMessage(SemVer serverVersion, SemVer appVersion) { +String? getVersionCompatibilityMessage({required SemVer serverVersion, required SemVer appVersion}) { // Add latest compat info up top // ensure mobile app major version is not behind server major version diff --git a/mobile/lib/widgets/activities/comment_bubble.dart b/mobile/lib/widgets/activities/comment_bubble.dart index 95cff7b87d..5431420741 100644 --- a/mobile/lib/widgets/activities/comment_bubble.dart +++ b/mobile/lib/widgets/activities/comment_bubble.dart @@ -28,13 +28,17 @@ class CommentBubble extends ConsumerWidget { final isLike = activity.type == ActivityType.like; final bgColor = isOwn ? context.colorScheme.primaryContainer : context.colorScheme.surfaceContainer; - final activityNotifier = ref.read( + final activityNotifier = ref.watch( 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 (!context.mounted) { + return; + } + if (route != null) { await context.pushRoute(route); } diff --git a/mobile/lib/widgets/activities/dismissible_activity.dart b/mobile/lib/widgets/activities/dismissible_activity.dart index c056f5ee35..f1305ba3aa 100644 --- a/mobile/lib/widgets/activities/dismissible_activity.dart +++ b/mobile/lib/widgets/activities/dismissible_activity.dart @@ -1,4 +1,5 @@ import 'package:flutter/material.dart'; +import 'package:immich_mobile/generated/translations.g.dart'; import 'package:immich_mobile/widgets/common/confirm_dialog.dart'; class DismissibleActivity extends StatelessWidget { @@ -23,9 +24,9 @@ class DismissibleActivity extends StatelessWidget { context: context, builder: (context) => ConfirmDialog( onOk: () {}, - title: "shared_album_activity_remove_title", - content: "shared_album_activity_remove_content", - ok: "delete", + title: context.t.shared_album_activity_remove_title, + content: context.t.shared_album_activity_remove_content, + ok: context.t.delete, ), ) : Future.value(false), diff --git a/mobile/lib/widgets/album/remote_album_shared_user_icons.dart b/mobile/lib/widgets/album/remote_album_shared_user_icons.dart index 2025fa7583..be908259d4 100644 --- a/mobile/lib/widgets/album/remote_album_shared_user_icons.dart +++ b/mobile/lib/widgets/album/remote_album_shared_user_icons.dart @@ -30,12 +30,12 @@ class RemoteAlbumSharedUserIcons extends ConsumerWidget { height: 50, child: ListView.builder( scrollDirection: Axis.horizontal, - itemBuilder: ((context, index) { + itemBuilder: (context, index) { return Padding( padding: const EdgeInsets.only(right: 4.0), child: UserCircleAvatar(user: sharedUsers[index], size: 36, hasBorder: true), ); - }), + }, itemCount: sharedUsers.length, ), ), diff --git a/mobile/lib/widgets/asset_grid/delete_dialog.dart b/mobile/lib/widgets/asset_grid/delete_dialog.dart index ff5aac617a..9b0367a463 100644 --- a/mobile/lib/widgets/asset_grid/delete_dialog.dart +++ b/mobile/lib/widgets/asset_grid/delete_dialog.dart @@ -1,69 +1,69 @@ -import 'package:easy_localization/easy_localization.dart'; -import 'package:flutter/material.dart'; -import 'package:immich_mobile/extensions/build_context_extensions.dart'; - -class DeleteLocalOnlyDialog extends StatelessWidget { - final void Function(bool onlyMerged) onDeleteLocal; - - const DeleteLocalOnlyDialog({super.key, required this.onDeleteLocal}); - - @override - Widget build(BuildContext context) { - void onDeleteBackedUpOnly() { - context.pop(true); - onDeleteLocal(true); - } - - void onForceDelete() { - context.pop(false); - onDeleteLocal(false); - } - - return AlertDialog( - shape: const RoundedRectangleBorder(borderRadius: BorderRadius.all(Radius.circular(10))), - title: const Text("delete_dialog_title").tr(), - content: const Text("delete_dialog_alert_local_non_backed_up").tr(), - actions: [ - SizedBox( - width: double.infinity, - height: 48, - child: FilledButton( - onPressed: () => context.pop(), - style: FilledButton.styleFrom( - backgroundColor: context.colorScheme.surfaceDim, - foregroundColor: context.primaryColor, - ), - child: const Text("cancel", style: TextStyle(fontWeight: FontWeight.bold)).tr(), - ), - ), - const SizedBox(height: 8), - SizedBox( - width: double.infinity, - height: 48, - - child: FilledButton( - onPressed: onDeleteBackedUpOnly, - style: FilledButton.styleFrom( - backgroundColor: context.colorScheme.errorContainer, - foregroundColor: context.colorScheme.onErrorContainer, - ), - child: const Text( - "delete_local_dialog_ok_backed_up_only", - style: TextStyle(fontWeight: FontWeight.bold), - ).tr(), - ), - ), - const SizedBox(height: 8), - SizedBox( - width: double.infinity, - height: 48, - child: FilledButton( - onPressed: onForceDelete, - style: FilledButton.styleFrom(backgroundColor: Colors.red[400], foregroundColor: Colors.white), - child: const Text("delete_local_dialog_ok_force", style: TextStyle(fontWeight: FontWeight.bold)).tr(), - ), - ), - ], - ); - } -} +import 'package:flutter/material.dart'; +import 'package:immich_mobile/extensions/build_context_extensions.dart'; +import 'package:immich_mobile/generated/translations.g.dart'; + +class DeleteLocalOnlyDialog extends StatelessWidget { + final void Function(bool onlyMerged) onDeleteLocal; + + const DeleteLocalOnlyDialog({super.key, required this.onDeleteLocal}); + + @override + Widget build(BuildContext context) { + void onDeleteBackedUpOnly() { + context.pop(true); + onDeleteLocal(true); + } + + void onForceDelete() { + context.pop(false); + onDeleteLocal(false); + } + + return AlertDialog( + shape: const RoundedRectangleBorder(borderRadius: BorderRadius.all(Radius.circular(10))), + title: Text(context.t.delete_dialog_title), + content: Text(context.t.delete_dialog_alert_local_non_backed_up), + actions: [ + SizedBox( + width: double.infinity, + height: 48, + child: FilledButton( + onPressed: () => context.pop(), + style: FilledButton.styleFrom( + backgroundColor: context.colorScheme.surfaceDim, + foregroundColor: context.primaryColor, + ), + child: Text(context.t.cancel, style: const TextStyle(fontWeight: FontWeight.bold)), + ), + ), + const SizedBox(height: 8), + SizedBox( + width: double.infinity, + height: 48, + + child: FilledButton( + onPressed: onDeleteBackedUpOnly, + style: FilledButton.styleFrom( + backgroundColor: context.colorScheme.errorContainer, + foregroundColor: context.colorScheme.onErrorContainer, + ), + child: Text( + context.t.delete_local_dialog_ok_backed_up_only, + style: const TextStyle(fontWeight: FontWeight.bold), + ), + ), + ), + const SizedBox(height: 8), + SizedBox( + width: double.infinity, + height: 48, + child: FilledButton( + onPressed: onForceDelete, + style: FilledButton.styleFrom(backgroundColor: Colors.red[400], foregroundColor: Colors.white), + child: Text(context.t.delete_local_dialog_ok_force, style: const TextStyle(fontWeight: FontWeight.bold)), + ), + ), + ], + ); + } +} diff --git a/mobile/lib/widgets/asset_grid/thumbnail_placeholder.dart b/mobile/lib/widgets/asset_grid/thumbnail_placeholder.dart index a84dfbae37..12105aa498 100644 --- a/mobile/lib/widgets/asset_grid/thumbnail_placeholder.dart +++ b/mobile/lib/widgets/asset_grid/thumbnail_placeholder.dart @@ -11,7 +11,7 @@ class ThumbnailPlaceholder extends StatelessWidget { @override Widget build(BuildContext context) { - var gradientColors = [ + final gradientColors = [ context.colorScheme.surfaceContainer, context.colorScheme.surfaceContainer.darken(amount: .1), ]; diff --git a/mobile/lib/widgets/asset_viewer/animated_play_pause.dart b/mobile/lib/widgets/asset_viewer/animated_play_pause.dart index 4be7f49b5a..bad8a6345c 100644 --- a/mobile/lib/widgets/asset_viewer/animated_play_pause.dart +++ b/mobile/lib/widgets/asset_viewer/animated_play_pause.dart @@ -1,3 +1,4 @@ +import 'dart:async'; import 'dart:ui'; import 'package:flutter/material.dart'; @@ -27,9 +28,9 @@ class AnimatedPlayPauseState extends State with SingleTickerP super.didUpdateWidget(oldWidget); if (widget.playing != oldWidget.playing) { if (widget.playing) { - animationController.forward(); + unawaited(animationController.forward()); } else { - animationController.reverse(); + unawaited(animationController.reverse()); } } } diff --git a/mobile/lib/widgets/asset_viewer/cast_dialog.dart b/mobile/lib/widgets/asset_viewer/cast_dialog.dart index d406f29a22..70b1b3d3e5 100644 --- a/mobile/lib/widgets/asset_viewer/cast_dialog.dart +++ b/mobile/lib/widgets/asset_viewer/cast_dialog.dart @@ -1,9 +1,9 @@ import 'dart:async'; -import 'package:easy_localization/easy_localization.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/generated/translations.g.dart'; import 'package:immich_mobile/models/cast/cast_manager_state.dart'; import 'package:immich_mobile/providers/cast.provider.dart'; @@ -23,21 +23,21 @@ class CastDialog extends ConsumerWidget { } return AlertDialog( - title: const Text("cast", style: TextStyle(fontWeight: FontWeight.bold)).tr(), + title: Text(context.t.cast, style: const TextStyle(fontWeight: FontWeight.bold)), content: SizedBox( width: 250, height: 250, child: FutureBuilder>( - future: ref.read(castProvider.notifier).getDevices(), + future: ref.watch(castProvider.notifier).getDevices(), builder: (context, snapshot) { if (snapshot.hasError) { - return Text('error_saving_image'.tr(args: [snapshot.error.toString()])); + return Text(context.t.error_saving_image(error: snapshot.error.toString())); } else if (!snapshot.hasData) { return const SizedBox(height: 48, child: Center(child: CircularProgressIndicator())); } if (snapshot.data!.isEmpty) { - return const Text('no_cast_devices_found').tr(); + return Text(context.t.no_cast_devices_found); } final devices = snapshot.data!; @@ -47,12 +47,12 @@ class CastDialog extends ConsumerWidget { final List sectionedList = []; if (connected.isNotEmpty) { - sectionedList.add("connected_device"); + sectionedList.add(context.t.connected_device); sectionedList.addAll(connected); } if (others.isNotEmpty) { - sectionedList.add("discovered_devices"); + sectionedList.add(context.t.discovered_devices); sectionedList.addAll(others); } @@ -66,7 +66,7 @@ class CastDialog extends ConsumerWidget { // It's a section header return Padding( padding: const EdgeInsets.symmetric(vertical: 8.0), - child: Text(item, style: const TextStyle(fontWeight: FontWeight.bold, fontSize: 16)).tr(), + child: Text(item, style: const TextStyle(fontWeight: FontWeight.bold, fontSize: 16)), ); } else { final (deviceName, type, deviceObj) = item as (String, CastDestinationType, dynamic); @@ -110,16 +110,16 @@ class CastDialog extends ConsumerWidget { TextButton( onPressed: () => ref.read(castProvider.notifier).disconnect(), child: Text( - "stop_casting", + context.t.stop_casting, style: TextStyle(color: context.colorScheme.secondary, fontWeight: FontWeight.bold), - ).tr(), + ), ), TextButton( onPressed: () => context.pop(), child: Text( - "close", + context.t.close, style: TextStyle(color: context.colorScheme.primary, fontWeight: FontWeight.bold), - ).tr(), + ), ), ], ); diff --git a/mobile/lib/widgets/asset_viewer/detail_panel/exif_map.dart b/mobile/lib/widgets/asset_viewer/detail_panel/exif_map.dart index f48ee06fdd..18bb27d024 100644 --- a/mobile/lib/widgets/asset_viewer/detail_panel/exif_map.dart +++ b/mobile/lib/widgets/asset_viewer/detail_panel/exif_map.dart @@ -39,7 +39,7 @@ class ExifMap extends StatelessWidget { const zoomLevel = 16; if (Platform.isAndroid) { - Uri uri = Uri( + final Uri uri = Uri( scheme: 'geo', host: '$latitude,$longitude', queryParameters: {'z': '$zoomLevel', 'q': '$latitude,$longitude'}, @@ -48,8 +48,8 @@ class ExifMap extends StatelessWidget { return uri; } } else if (Platform.isIOS) { - var params = {'ll': '$latitude,$longitude', 'q': '$latitude,$longitude', 'z': '$zoomLevel'}; - Uri uri = Uri.https('maps.apple.com', '/', params); + final params = {'ll': '$latitude,$longitude', 'q': '$latitude,$longitude', 'z': '$zoomLevel'}; + final Uri uri = Uri.https('maps.apple.com', '/', params); if (await canLaunchUrl(uri)) { return uri; } @@ -73,7 +73,7 @@ class ExifMap extends StatelessWidget { assetMarkerRemoteId: markerId, assetThumbhash: markerAssetThumbhash, onTap: (tapPosition, latLong) async { - Uri? uri = await createCoordinatesUri(); + final Uri? uri = await createCoordinatesUri(); if (uri == null) { return; diff --git a/mobile/lib/widgets/asset_viewer/video_controls.dart b/mobile/lib/widgets/asset_viewer/video_controls.dart index 0f1e0e020d..b5678b8d9f 100644 --- a/mobile/lib/widgets/asset_viewer/video_controls.dart +++ b/mobile/lib/widgets/asset_viewer/video_controls.dart @@ -4,11 +4,11 @@ import 'package:async/async.dart'; import 'package:flutter/material.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; import 'package:immich_mobile/constants/colors.dart'; +import 'package:immich_mobile/extensions/duration_extensions.dart'; import 'package:immich_mobile/models/cast/cast_manager_state.dart'; import 'package:immich_mobile/providers/asset_viewer/asset_viewer.provider.dart'; import 'package:immich_mobile/providers/asset_viewer/video_player_provider.dart'; import 'package:immich_mobile/providers/cast.provider.dart'; -import 'package:immich_mobile/extensions/duration_extensions.dart'; import 'package:immich_mobile/widgets/asset_viewer/animated_play_pause.dart'; class VideoControls extends ConsumerStatefulWidget { @@ -97,9 +97,9 @@ class _VideoControlsState extends ConsumerState { _hideTimer.reset(); } }); - ref.listen(_provider.select((v) => v.status), (_, __) => _hideTimer.reset()); + ref.listen(_provider.select((v) => v.status), (_, _) => _hideTimer.reset()); - final notifier = ref.read(_provider.notifier); + final notifier = ref.watch(_provider.notifier); final isLoaded = duration != Duration.zero; return Padding( diff --git a/mobile/lib/widgets/backup/backup_info_card.dart b/mobile/lib/widgets/backup/backup_info_card.dart index 7911679577..4efd940e36 100644 --- a/mobile/lib/widgets/backup/backup_info_card.dart +++ b/mobile/lib/widgets/backup/backup_info_card.dart @@ -1,8 +1,7 @@ -import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; import 'package:immich_mobile/extensions/build_context_extensions.dart'; import 'package:immich_mobile/extensions/theme_extensions.dart'; -import 'package:immich_mobile/extensions/translate_extensions.dart'; +import 'package:immich_mobile/generated/translations.g.dart'; class BackupInfoCard extends StatelessWidget { final String title; @@ -73,11 +72,11 @@ class BackupInfoCard extends StatelessWidget { ], ), Text( - "backup_info_card_assets", + context.t.backup_info_card_assets, style: context.textTheme.labelLarge?.copyWith( color: context.colorScheme.onSurface.withAlpha(isLoading ? 50 : 255), ), - ).tr(), + ), ], ), ), @@ -93,7 +92,7 @@ class BackupInfoCard extends StatelessWidget { ), onTap: onTap, title: Text( - "view_details".t(context: context), + context.t.view_details, style: context.textTheme.labelLarge?.copyWith(color: context.colorScheme.onSurface.withAlpha(200)), ), trailing: Icon(Icons.arrow_forward_ios, size: 16, color: context.colorScheme.onSurfaceVariant), diff --git a/mobile/lib/widgets/backup/drift_album_info_list_tile.dart b/mobile/lib/widgets/backup/drift_album_info_list_tile.dart index 84128ddde2..41a215fb99 100644 --- a/mobile/lib/widgets/backup/drift_album_info_list_tile.dart +++ b/mobile/lib/widgets/backup/drift_album_info_list_tile.dart @@ -1,3 +1,5 @@ +import 'dart:async'; + import 'package:auto_route/auto_route.dart'; import 'package:flutter/material.dart'; import 'package:fluttertoast/fluttertoast.dart'; @@ -20,7 +22,7 @@ class DriftAlbumInfoListTile extends HookConsumerWidget { final bool isSelected = album.backupSelection == BackupSelection.selected; final bool isExcluded = album.backupSelection == BackupSelection.excluded; - buildTileColor() { + Color? buildTileColor() { if (isSelected) { return context.isDarkTheme ? context.primaryColor.withAlpha(100) : context.primaryColor.withAlpha(25); } else if (isExcluded) { @@ -30,7 +32,7 @@ class DriftAlbumInfoListTile extends HookConsumerWidget { } } - buildIcon() { + Icon buildIcon() { if (isSelected) { return Icon(Icons.check_circle_rounded, color: context.colorScheme.primary); } @@ -51,10 +53,10 @@ class DriftAlbumInfoListTile extends HookConsumerWidget { return GestureDetector( onDoubleTap: () { - ref.watch(hapticFeedbackProvider.notifier).selectionClick(); + ref.read(hapticFeedbackProvider.notifier).selectionClick(); if (isExcluded) { - ref.read(backupAlbumProvider.notifier).deselectAlbum(album); + unawaited(ref.read(backupAlbumProvider.notifier).deselectAlbum(album)); } else { if (album.id == 'isAll' || album.name == 'Recents') { ImmichToast.show( @@ -66,7 +68,7 @@ class DriftAlbumInfoListTile extends HookConsumerWidget { return; } - ref.read(backupAlbumProvider.notifier).excludeAlbum(album); + unawaited(ref.read(backupAlbumProvider.notifier).excludeAlbum(album)); } }, child: ListTile( @@ -75,9 +77,9 @@ class DriftAlbumInfoListTile extends HookConsumerWidget { onTap: () { ref.read(hapticFeedbackProvider.notifier).selectionClick(); if (isSelected) { - ref.read(backupAlbumProvider.notifier).deselectAlbum(album); + unawaited(ref.read(backupAlbumProvider.notifier).deselectAlbum(album)); } else { - ref.read(backupAlbumProvider.notifier).selectAlbum(album); + unawaited(ref.read(backupAlbumProvider.notifier).selectAlbum(album)); } }, leading: buildIcon(), @@ -85,7 +87,7 @@ class DriftAlbumInfoListTile extends HookConsumerWidget { subtitle: buildSubtitle(), trailing: IconButton( onPressed: () { - context.pushRoute(LocalTimelineRoute(album: album)); + unawaited(context.pushRoute(LocalTimelineRoute(album: album))); }, icon: Icon(Icons.image_outlined, color: context.primaryColor, size: 24), splashRadius: 25, diff --git a/mobile/lib/widgets/common/app_bar_dialog/app_bar_dialog.dart b/mobile/lib/widgets/common/app_bar_dialog/app_bar_dialog.dart index e77bc1869e..fffa6746f6 100644 --- a/mobile/lib/widgets/common/app_bar_dialog/app_bar_dialog.dart +++ b/mobile/lib/widgets/common/app_bar_dialog/app_bar_dialog.dart @@ -1,11 +1,11 @@ import 'dart:async'; import 'package:auto_route/auto_route.dart'; -import 'package:easy_localization/easy_localization.dart'; 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/extensions/build_context_extensions.dart'; +import 'package:immich_mobile/generated/translations.g.dart'; import 'package:immich_mobile/models/server_info/server_disk_info.model.dart'; import 'package:immich_mobile/pages/common/settings.page.dart'; import 'package:immich_mobile/providers/auth.provider.dart'; @@ -29,21 +29,21 @@ class ImmichAppBarDialog extends HookConsumerWidget { @override Widget build(BuildContext context, WidgetRef ref) { ref.watch(localeProvider); - ServerDiskInfo backupState = ref.watch(backupProvider); + final ServerDiskInfo backupState = ref.watch(backupProvider); final theme = context.themeData; - bool isHorizontal = !context.isMobile; + final bool isHorizontal = !context.isMobile; final horizontalPadding = isHorizontal ? 100.0 : 20.0; final user = ref.watch(currentUserProvider); final isLoggingOut = useState(false); final isReadonlyModeEnabled = ref.watch(readonlyModeProvider); useEffect(() { - ref.read(backupProvider.notifier).updateDiskInfo(); - ref.read(currentUserProvider.notifier).refresh(); + unawaited(ref.read(backupProvider.notifier).updateDiskInfo()); + unawaited(ref.read(currentUserProvider.notifier).refresh()); return null; }, []); - buildTopRow() { + SizedBox buildTopRow() { return SizedBox( height: 56, child: Stack( @@ -68,7 +68,7 @@ class ImmichAppBarDialog extends HookConsumerWidget { ); } - buildActionButton(IconData icon, String text, Function() onTap, {Widget? trailing}) { + ListTile buildActionButton(IconData icon, String text, Function() onTap, {Widget? trailing}) { return ListTile( dense: true, visualDensity: VisualDensity.standard, @@ -78,36 +78,40 @@ class ImmichAppBarDialog extends HookConsumerWidget { title: Text( text, style: theme.textTheme.labelLarge?.copyWith(color: theme.textTheme.labelLarge?.color?.withAlpha(250)), - ).tr(), + ), onTap: onTap, trailing: trailing, ); } - buildSettingButton() { - return buildActionButton(Icons.settings_outlined, "settings", () => context.pushRoute(const SettingsRoute())); + ListTile buildSettingButton() { + return buildActionButton( + Icons.settings_outlined, + context.t.settings, + () => context.pushRoute(const SettingsRoute()), + ); } - buildFreeUpSpaceButton() { + ListTile buildFreeUpSpaceButton() { return buildActionButton( Icons.cleaning_services_outlined, - "free_up_space", + context.t.free_up_space, () => context.pushRoute(SettingsSubRoute(section: SettingSection.freeUpSpace)), ); } - buildAppLogButton() { + ListTile buildAppLogButton() { return buildActionButton( Icons.assignment_outlined, - "profile_drawer_app_logs", + context.t.profile_drawer_app_logs, () => context.pushRoute(const AppLogRoute()), ); } - buildSignOutButton() { + ListTile buildSignOutButton() { return buildActionButton( Icons.logout_rounded, - "sign_out", + context.t.sign_out, () async { if (isLoggingOut.value) { return; @@ -118,14 +122,21 @@ class ImmichAppBarDialog extends HookConsumerWidget { context: context, builder: (BuildContext ctx) { return ConfirmDialog( - title: "app_bar_signout_dialog_title", - content: "app_bar_signout_dialog_content", - ok: "yes", + title: context.t.app_bar_signout_dialog_title, + content: context.t.app_bar_signout_dialog_content, + ok: context.t.yes, onOk: () async { isLoggingOut.value = true; await ref.read(authProvider.notifier).logout().whenComplete(() => isLoggingOut.value = false); + if (!context.mounted) { + return; + } ref.read(websocketProvider.notifier).disconnect(); + if (!context.mounted) { + return; + } + unawaited(context.replaceRoute(const LoginRoute())); }, ); @@ -156,22 +167,22 @@ class ImmichAppBarDialog extends HookConsumerWidget { crossAxisAlignment: CrossAxisAlignment.start, spacing: 12, children: [ - Text("backup_controller_page_server_storage".tr(), style: context.textTheme.labelLarge), + Text(context.t.backup_controller_page_server_storage, style: context.textTheme.labelLarge), LinearProgressIndicator( minHeight: 10.0, value: percentage, borderRadius: const BorderRadius.all(Radius.circular(10.0)), ), Text( - 'backup_controller_page_storage_format', + context.t.backup_controller_page_storage_format(used: usedDiskSpace, total: totalDiskSpace), style: context.textTheme.bodySmall, - ).tr(namedArgs: {'used': usedDiskSpace, 'total': totalDiskSpace}), + ), ], ), ); } - buildFooter() { + Padding buildFooter() { return Padding( padding: const EdgeInsets.only(top: 10, bottom: 20), child: Row( @@ -180,23 +191,29 @@ class ImmichAppBarDialog extends HookConsumerWidget { InkWell( onTap: () { ContextHelper(context).pop(); - launchUrl(Uri.parse('https://docs.immich.app'), mode: LaunchMode.externalApplication); + unawaited(launchUrl(Uri.parse('https://docs.immich.app'), mode: LaunchMode.externalApplication)); }, - child: Text("documentation", style: context.textTheme.bodySmall).tr(), + child: Text(context.t.documentation, style: context.textTheme.bodySmall), ), const SizedBox(width: 20, child: Text("•", textAlign: TextAlign.center)), InkWell( onTap: () { ContextHelper(context).pop(); - launchUrl(Uri.parse('https://github.com/immich-app/immich'), mode: LaunchMode.externalApplication); + unawaited( + launchUrl(Uri.parse('https://github.com/immich-app/immich'), mode: LaunchMode.externalApplication), + ); }, - child: Text("profile_drawer_github", style: context.textTheme.bodySmall).tr(), + child: Text(context.t.profile_drawer_github, style: context.textTheme.bodySmall), ), const SizedBox(width: 20, child: Text("•", textAlign: TextAlign.center)), InkWell( onTap: () async { ContextHelper(context).pop(); final packageInfo = await PackageInfo.fromPlatform(); + if (!context.mounted) { + return; + } + showLicensePage( context: context, applicationIcon: const Padding( @@ -206,14 +223,14 @@ class ImmichAppBarDialog extends HookConsumerWidget { applicationVersion: packageInfo.version, ); }, - child: Text("licenses", style: context.textTheme.bodySmall).tr(), + child: Text(context.t.licenses, style: context.textTheme.bodySmall), ), ], ), ); } - buildReadonlyMessage() { + Padding buildReadonlyMessage() { return Padding( padding: const EdgeInsets.only(left: 10.0, right: 10.0), child: ListTile( @@ -224,10 +241,10 @@ class ImmichAppBarDialog extends HookConsumerWidget { minLeadingWidth: 20, tileColor: theme.primaryColor.withAlpha(80), title: Text( - "profile_drawer_readonly_mode", + context.t.profile_drawer_readonly_mode, style: theme.textTheme.labelLarge?.copyWith(color: theme.textTheme.labelLarge?.color?.withAlpha(250)), textAlign: TextAlign.center, - ).tr(), + ), ), ); } diff --git a/mobile/lib/widgets/common/app_bar_dialog/app_bar_profile_info.dart b/mobile/lib/widgets/common/app_bar_dialog/app_bar_profile_info.dart index d6881f519a..bd8e883ef0 100644 --- a/mobile/lib/widgets/common/app_bar_dialog/app_bar_profile_info.dart +++ b/mobile/lib/widgets/common/app_bar_dialog/app_bar_profile_info.dart @@ -1,11 +1,11 @@ import 'dart:async'; -import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; import 'package:image_picker/image_picker.dart'; import 'package:immich_mobile/extensions/build_context_extensions.dart'; import 'package:immich_mobile/extensions/theme_extensions.dart'; +import 'package:immich_mobile/generated/translations.g.dart'; import 'package:immich_mobile/providers/auth.provider.dart'; import 'package:immich_mobile/providers/backup/backup.provider.dart'; import 'package:immich_mobile/providers/infrastructure/readonly_mode.provider.dart'; @@ -24,7 +24,7 @@ class AppBarProfileInfoBox extends HookConsumerWidget { final isReadonlyModeEnabled = ref.watch(readonlyModeProvider); final user = ref.watch(currentUserProvider); - buildUserProfileImage() { + Widget buildUserProfileImage() { if (user == null) { return const CircleAvatar( radius: 20, @@ -42,17 +42,17 @@ class AppBarProfileInfoBox extends HookConsumerWidget { return userImage; } - pickUserProfileImage() async { + Future pickUserProfileImage() async { final XFile? image = await ImagePicker().pickImage(source: ImageSource.gallery, maxHeight: 1024, maxWidth: 1024); - if (image != null) { - var success = await ref.watch(uploadProfileImageProvider.notifier).upload(image); + if (image != null && context.mounted) { + final success = await ref.read(uploadProfileImageProvider.notifier).upload(image); - if (success) { + if (success && context.mounted) { final profileImagePath = ref.read(uploadProfileImageProvider).profileImagePath; - ref.watch(authProvider.notifier).updateUserProfileImagePath(profileImagePath); + ref.read(authProvider.notifier).updateUserProfileImagePath(profileImagePath); if (user != null) { - ref.read(currentUserProvider.notifier).refresh(); + unawaited(ref.read(currentUserProvider.notifier).refresh()); } unawaited(ref.read(backupProvider.notifier).updateDiskInfo()); @@ -61,14 +61,14 @@ class AppBarProfileInfoBox extends HookConsumerWidget { } void toggleReadonlyMode() { - final isReadonlyModeEnabled = ref.watch(readonlyModeProvider); + final isReadonlyModeEnabled = ref.read(readonlyModeProvider); ref.read(readonlyModeProvider.notifier).toggleReadonlyMode(); context.scaffoldMessenger.showSnackBar( SnackBar( duration: const Duration(seconds: 2), content: Text( - (isReadonlyModeEnabled ? "readonly_mode_disabled" : "readonly_mode_enabled").tr(), + isReadonlyModeEnabled ? context.t.readonly_mode_disabled : context.t.readonly_mode_enabled, style: context.textTheme.bodyLarge?.copyWith(color: context.primaryColor), ), ), diff --git a/mobile/lib/widgets/common/app_bar_dialog/app_bar_server_info.dart b/mobile/lib/widgets/common/app_bar_dialog/app_bar_server_info.dart index a209d280c3..901ffb2496 100644 --- a/mobile/lib/widgets/common/app_bar_dialog/app_bar_server_info.dart +++ b/mobile/lib/widgets/common/app_bar_dialog/app_bar_server_info.dart @@ -1,9 +1,11 @@ -import 'package:easy_localization/easy_localization.dart'; +import 'dart:async'; + 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/extensions/build_context_extensions.dart'; import 'package:immich_mobile/extensions/theme_extensions.dart'; +import 'package:immich_mobile/generated/translations.g.dart'; import 'package:immich_mobile/models/server_info/server_info.model.dart'; import 'package:immich_mobile/providers/locale_provider.dart'; import 'package:immich_mobile/providers/server_info.provider.dart'; @@ -18,20 +20,20 @@ class AppBarServerInfo extends HookConsumerWidget { @override Widget build(BuildContext context, WidgetRef ref) { ref.watch(localeProvider); - ServerInfo serverInfoState = ref.watch(serverInfoProvider); + final ServerInfo serverInfoState = ref.watch(serverInfoProvider); final user = ref.watch(currentUserProvider); final bool showVersionWarning = ref.watch(versionWarningPresentProvider(user)); final appInfo = useState({}); - getPackageInfo() async { - PackageInfo packageInfo = await PackageInfo.fromPlatform(); + Future getPackageInfo() async { + final PackageInfo packageInfo = await PackageInfo.fromPlatform(); appInfo.value = {"version": packageInfo.version, "buildNumber": packageInfo.buildNumber}; } useEffect(() { - getPackageInfo(); + unawaited(getPackageInfo()); return null; }, []); @@ -44,20 +46,20 @@ class AppBarServerInfo extends HookConsumerWidget { children: [ if (showVersionWarning) ...[const ServerUpdateNotification(), divider], _ServerInfoItem( - label: "server_info_box_app_version".tr(), + label: context.t.server_info_box_app_version, text: "${appInfo.value["version"]} build.${appInfo.value["buildNumber"]}", ), divider, _ServerInfoItem( - label: "server_version".tr(), + label: context.t.server_version, text: serverInfoState.serverVersion.major > 0 ? "${serverInfoState.serverVersion}" : "--", ), divider, - _ServerInfoItem(label: "server_info_box_server_url".tr(), text: getServerUrl() ?? '--', tooltip: true), + _ServerInfoItem(label: context.t.server_info_box_server_url, text: getServerUrl() ?? '--', tooltip: true), if (serverInfoState.latestVersion != null) ...[ divider, _ServerInfoItem( - label: "latest_version".tr(), + label: context.t.latest_version, text: serverInfoState.latestVersion!.major > 0 ? "${serverInfoState.latestVersion!}" : "--", tooltip: true, icon: serverInfoState.versionStatus == VersionStatus.serverOutOfDate @@ -87,7 +89,7 @@ class _ServerInfoItem extends StatelessWidget { return Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ - if (icon != null) ...[icon as Widget, const SizedBox(width: 8)], + if (icon != null) ...[icon! as Widget, const SizedBox(width: 8)], Text( label, style: TextStyle( diff --git a/mobile/lib/widgets/common/app_bar_dialog/server_update_notification.dart b/mobile/lib/widgets/common/app_bar_dialog/server_update_notification.dart index 179eab8e7d..8261f71ad8 100644 --- a/mobile/lib/widgets/common/app_bar_dialog/server_update_notification.dart +++ b/mobile/lib/widgets/common/app_bar_dialog/server_update_notification.dart @@ -1,10 +1,11 @@ +import 'dart:async'; import 'dart:io'; -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/extensions/build_context_extensions.dart'; +import 'package:immich_mobile/generated/translations.g.dart'; import 'package:immich_mobile/models/server_info/server_info.model.dart'; import 'package:immich_mobile/providers/server_info.provider.dart'; import 'package:url_launcher/url_launcher_string.dart'; @@ -16,9 +17,11 @@ class ServerUpdateNotification extends HookConsumerWidget { Widget build(BuildContext context, WidgetRef ref) { final serverInfoState = ref.watch(serverInfoProvider); - Color errorColor = const Color.fromARGB(85, 253, 97, 83); - Color infoColor = context.isDarkTheme ? context.primaryColor.withAlpha(55) : context.primaryColor.withAlpha(25); - void openUpdateLink() { + const Color errorColor = Color.fromARGB(85, 253, 97, 83); + final Color infoColor = context.isDarkTheme + ? context.primaryColor.withAlpha(55) + : context.primaryColor.withAlpha(25); + Future openUpdateLink() { String url; if (serverInfoState.versionStatus == VersionStatus.serverOutOfDate) { url = kImmichLatestRelease; @@ -33,7 +36,7 @@ class ServerUpdateNotification extends HookConsumerWidget { } } - launchUrlString(url, mode: LaunchMode.externalApplication); + return launchUrlString(url, mode: LaunchMode.externalApplication); } return SizedBox( @@ -66,15 +69,15 @@ class ServerUpdateNotification extends HookConsumerWidget { serverInfoState.versionStatus == VersionStatus.clientOutOfDate) ...[ const SizedBox(width: 8), TextButton( - onPressed: openUpdateLink, + onPressed: () => unawaited(openUpdateLink()), style: TextButton.styleFrom( padding: const EdgeInsets.all(4), - minimumSize: const Size(0, 0), + minimumSize: Size.zero, tapTargetSize: MaterialTapTargetSize.shrinkWrap, ), child: serverInfoState.versionStatus == VersionStatus.clientOutOfDate - ? Text("action_common_update".tr(context: context)) - : Text("view".tr()), + ? Text(context.t.action_common_update) + : Text(context.t.view), ), ], ], diff --git a/mobile/lib/widgets/common/confirm_dialog.dart b/mobile/lib/widgets/common/confirm_dialog.dart index 9c3f4344c6..74b7f4a04c 100644 --- a/mobile/lib/widgets/common/confirm_dialog.dart +++ b/mobile/lib/widgets/common/confirm_dialog.dart @@ -1,22 +1,15 @@ -import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; import 'package:immich_mobile/extensions/build_context_extensions.dart'; +import 'package:immich_mobile/generated/translations.g.dart'; class ConfirmDialog extends StatelessWidget { final Function? onOk; final String title; final String content; - final String cancel; - final String ok; + final String? cancel; + final String? ok; - const ConfirmDialog({ - super.key, - this.onOk, - required this.title, - required this.content, - this.cancel = "cancel", - this.ok = "backup_controller_page_background_battery_info_ok", - }); + const ConfirmDialog({super.key, this.onOk, required this.title, required this.content, this.cancel, this.ok}); @override Widget build(BuildContext context) { @@ -27,22 +20,22 @@ class ConfirmDialog extends StatelessWidget { return AlertDialog( shape: const RoundedRectangleBorder(borderRadius: BorderRadius.all(Radius.circular(10))), - title: Text(title).tr(), - content: Text(content).tr(), + title: Text(title), + content: Text(content), actions: [ TextButton( onPressed: () => context.pop(false), child: Text( - cancel, + cancel ?? context.t.cancel, style: TextStyle(color: context.primaryColor, fontWeight: FontWeight.bold), - ).tr(), + ), ), TextButton( onPressed: onOkPressed, child: Text( - ok, + ok ?? context.t.backup_controller_page_background_battery_info_ok, style: TextStyle(color: context.colorScheme.error, fontWeight: FontWeight.bold), - ).tr(), + ), ), ], ); diff --git a/mobile/lib/widgets/common/date_time_picker.dart b/mobile/lib/widgets/common/date_time_picker.dart index 0ebd7bba93..86154c308e 100644 --- a/mobile/lib/widgets/common/date_time_picker.dart +++ b/mobile/lib/widgets/common/date_time_picker.dart @@ -1,10 +1,11 @@ import 'package:collection/collection.dart'; -import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; import 'package:flutter_hooks/flutter_hooks.dart'; import 'package:immich_mobile/extensions/build_context_extensions.dart'; import 'package:immich_mobile/extensions/duration_extensions.dart'; +import 'package:immich_mobile/generated/translations.g.dart'; import 'package:immich_mobile/widgets/common/dropdown_search_menu.dart'; +import 'package:intl/intl.dart'; import 'package:timezone/timezone.dart' as tz; import 'package:timezone/timezone.dart'; @@ -41,7 +42,7 @@ class _DateTimePicker extends HookWidget { } } - Duration? tzOffset = initialTZOffset ?? initialDateTime?.timeZoneOffset; + final Duration? tzOffset = initialTZOffset ?? initialDateTime?.timeZoneOffset; if (tzOffset != null) { final offsetInMilli = tzOffset.inMilliseconds; @@ -80,7 +81,7 @@ class _DateTimePicker extends HookWidget { ) .toList(); - void pickDate() async { + Future pickDate() async { final now = DateTime.now(); // Handles cases where the date from the asset is far off in the future final initialDate = date.value.isAfter(now) ? now : date.value; @@ -90,7 +91,7 @@ class _DateTimePicker extends HookWidget { firstDate: DateTime(1800), lastDate: now, ); - if (newDate == null) { + if (newDate == null || !context.mounted) { return; } @@ -116,26 +117,26 @@ class _DateTimePicker extends HookWidget { TextButton( onPressed: () => context.pop(), child: Text( - "cancel", + context.t.cancel, style: context.textTheme.bodyMedium?.copyWith( fontWeight: FontWeight.w600, color: context.colorScheme.error, ), - ).tr(), + ), ), TextButton( onPressed: popWithDateTime, child: Text( - "action_common_update", + context.t.action_common_update, style: context.textTheme.bodyMedium?.copyWith(fontWeight: FontWeight.w600, color: context.primaryColor), - ).tr(), + ), ), ], content: Column( mainAxisSize: MainAxisSize.min, crossAxisAlignment: CrossAxisAlignment.start, children: [ - const Text("date_and_time", style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600)).tr(), + Text(context.t.date_and_time, style: const TextStyle(fontSize: 16, fontWeight: FontWeight.w600)), const SizedBox(height: 32), ListTile( tileColor: context.colorScheme.surfaceContainerHighest, @@ -151,8 +152,8 @@ class _DateTimePicker extends HookWidget { const SizedBox(height: 24), DropdownSearchMenu( trailingIcon: Icon(Icons.arrow_drop_down, color: context.primaryColor), - hintText: "timezone".tr(), - label: const Text('timezone').tr(), + hintText: context.t.timezone, + label: Text(context.t.timezone), textStyle: context.textTheme.bodyMedium, onSelected: (value) => tzOffset.value = value, initialSelection: tzOffset.value, diff --git a/mobile/lib/widgets/common/dropdown_search_menu.dart b/mobile/lib/widgets/common/dropdown_search_menu.dart index bf0c75c8aa..ba40bb98d5 100644 --- a/mobile/lib/widgets/common/dropdown_search_menu.dart +++ b/mobile/lib/widgets/common/dropdown_search_menu.dart @@ -1,9 +1,11 @@ +import 'dart:async'; + import 'package:collection/collection.dart'; -import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; import 'package:flutter/scheduler.dart'; import 'package:flutter_hooks/flutter_hooks.dart'; import 'package:immich_mobile/extensions/build_context_extensions.dart'; +import 'package:immich_mobile/generated/translations.g.dart'; class DropdownSearchMenu extends HookWidget { const DropdownSearchMenu({ @@ -79,7 +81,7 @@ class DropdownSearchMenu extends HookWidget { autofocus: true, focusNode: focusNode, controller: textEditingController, - decoration: inputDecoration.copyWith(hintText: "search_timezone".tr()), + decoration: inputDecoration.copyWith(hintText: context.t.search_timezone), maxLines: 1, style: context.textTheme.bodyMedium, expands: false, @@ -114,7 +116,7 @@ class DropdownSearchMenu extends HookWidget { final bool highlight = AutocompleteHighlightedOption.of(context) == index; if (highlight) { SchedulerBinding.instance.addPostFrameCallback((Duration timeStamp) { - Scrollable.ensureVisible(context, alignment: 0.5); + unawaited(Scrollable.ensureVisible(context, alignment: 0.5)); }, debugLabel: 'AutocompleteOptions.ensureVisible'); } return Container( diff --git a/mobile/lib/widgets/common/immich_loading_indicator.dart b/mobile/lib/widgets/common/immich_loading_indicator.dart index 52f957f7e7..1fdc5213df 100644 --- a/mobile/lib/widgets/common/immich_loading_indicator.dart +++ b/mobile/lib/widgets/common/immich_loading_indicator.dart @@ -1,3 +1,5 @@ +import 'dart:async'; + import 'package:flutter/material.dart'; import 'package:flutter_hooks/flutter_hooks.dart'; import 'package:immich_mobile/widgets/common/immich_logo.dart'; @@ -9,11 +11,12 @@ class ImmichLoadingIndicator extends HookWidget { @override Widget build(BuildContext context) { - final logoAnimationController = useAnimationController(duration: const Duration(seconds: 6)) - ..reverse() - ..repeat(); + final logoAnimationController = useAnimationController(duration: const Duration(seconds: 6)); + unawaited(logoAnimationController.reverse()); + unawaited(logoAnimationController.repeat()); - final borderAnimationController = useAnimationController(duration: const Duration(seconds: 6))..repeat(); + final borderAnimationController = useAnimationController(duration: const Duration(seconds: 6)); + unawaited(borderAnimationController.repeat()); return Container( height: 80, diff --git a/mobile/lib/widgets/common/immich_sliver_app_bar.dart b/mobile/lib/widgets/common/immich_sliver_app_bar.dart index 6905b5b430..b966601c31 100644 --- a/mobile/lib/widgets/common/immich_sliver_app_bar.dart +++ b/mobile/lib/widgets/common/immich_sliver_app_bar.dart @@ -1,17 +1,18 @@ +import 'dart:async'; import 'dart:math' as math; import 'package:auto_route/auto_route.dart'; -import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; import 'package:flutter_svg/svg.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; import 'package:immich_mobile/extensions/build_context_extensions.dart'; +import 'package:immich_mobile/generated/translations.g.dart'; import 'package:immich_mobile/models/server_info/server_info.model.dart'; import 'package:immich_mobile/providers/backup/drift_backup.provider.dart'; import 'package:immich_mobile/providers/cast.provider.dart'; -import 'package:immich_mobile/providers/infrastructure/settings.provider.dart'; import 'package:immich_mobile/providers/infrastructure/readonly_mode.provider.dart'; +import 'package:immich_mobile/providers/infrastructure/settings.provider.dart'; import 'package:immich_mobile/providers/server_info.provider.dart'; import 'package:immich_mobile/providers/sync_status.provider.dart'; import 'package:immich_mobile/providers/timeline/multiselect.provider.dart'; @@ -72,7 +73,7 @@ class ImmichSliverAppBar extends ConsumerWidget { onPressed: () => showDialog(context: context, builder: (context) => const CastDialog()), icon: Icon(isCasting ? Icons.cast_connected_rounded : Icons.cast_rounded), ), - if (actions != null) ...actions!, + ...?actions, if (showUploadButton && !isReadonlyModeEnabled) const _BackupIndicator(), const _ProfileIndicator(), const SizedBox(width: 8), @@ -112,14 +113,14 @@ class _ProfileIndicator extends ConsumerWidget { final isIpad = defaultTargetPlatform == TargetPlatform.iOS && !context.isMobile; void toggleReadonlyMode() { - final isReadonlyModeEnabled = ref.watch(readonlyModeProvider); + final isReadonlyModeEnabled = ref.read(readonlyModeProvider); ref.read(readonlyModeProvider.notifier).toggleReadonlyMode(); context.scaffoldMessenger.showSnackBar( SnackBar( duration: const Duration(seconds: 2), content: Text( - (isReadonlyModeEnabled ? "readonly_mode_disabled" : "readonly_mode_enabled").tr(), + isReadonlyModeEnabled ? context.t.readonly_mode_disabled : context.t.readonly_mode_enabled, style: context.textTheme.bodyLarge?.copyWith(color: context.primaryColor), ), ), @@ -142,7 +143,7 @@ class _ProfileIndicator extends ConsumerWidget { ? context.colorScheme.error : context.primaryColor, size: widgetSize / 2 - 3, - semanticLabel: 'new_version_available'.tr(), + semanticLabel: context.t.new_version_available, ), ), backgroundColor: Colors.transparent, @@ -152,7 +153,7 @@ class _ProfileIndicator extends ConsumerWidget { child: user == null ? const Icon(Icons.face_outlined, size: widgetSize) : Semantics( - label: "logged_in_as".tr(namedArgs: {"user": user.name}), + label: context.t.logged_in_as(user: user.name), child: AbsorbPointer( child: Builder( builder: (context) => UserCircleAvatar( @@ -176,7 +177,15 @@ class _BackupIndicator extends ConsumerWidget { @override Widget build(BuildContext context, WidgetRef ref) { - final indicatorIcon = _getBackupBadgeIcon(context, ref); + final backupEnabled = ref.watch(appConfigProvider.select((c) => c.backup.enabled)); + final hasError = ref.watch(driftBackupProvider.select((state) => state.error != BackupError.none)); + final isUploading = ref.watch(driftBackupProvider.select((state) => state.uploadItems.isNotEmpty)); + final indicatorIcon = _getBackupBadgeIcon( + context, + backupEnabled: backupEnabled, + hasError: hasError, + isUploading: isUploading, + ); return IconButton( onPressed: () => context.pushRoute(const DriftBackupRoute()), @@ -191,16 +200,23 @@ class _BackupIndicator extends ConsumerWidget { ); } - Widget? _getBackupBadgeIcon(BuildContext context, WidgetRef ref) { - final backupEnabled = ref.watch(appConfigProvider.select((c) => c.backup.enabled)); - final hasError = ref.watch(driftBackupProvider.select((state) => state.error != BackupError.none)); + Widget? _getBackupBadgeIcon( + BuildContext context, { + required bool backupEnabled, + required bool hasError, + required bool isUploading, + }) { final isDarkTheme = context.isDarkTheme; final iconColor = isDarkTheme ? Colors.white : Colors.black; - final isUploading = ref.watch(driftBackupProvider.select((state) => state.uploadItems.isNotEmpty)); if (!backupEnabled) { return _BadgeLabel( - Icon(Icons.cloud_off_rounded, size: 9, color: iconColor, semanticLabel: 'backup_controller_page_backup'.tr()), + Icon( + Icons.cloud_off_rounded, + size: 9, + color: iconColor, + semanticLabel: context.t.backup_controller_page_backup, + ), ); } @@ -210,7 +226,7 @@ class _BackupIndicator extends ConsumerWidget { Icons.warning_rounded, size: 12, color: context.colorScheme.error, - semanticLabel: 'backup_controller_page_backup'.tr(), + semanticLabel: context.t.backup_controller_page_backup, ), backgroundColor: context.colorScheme.errorContainer, ); @@ -228,7 +244,7 @@ class _BackupIndicator extends ConsumerWidget { strokeWidth: 2, strokeCap: StrokeCap.round, valueColor: AlwaysStoppedAnimation(iconColor), - semanticsLabel: 'backup_controller_page_backup'.tr(), + semanticsLabel: context.t.backup_controller_page_backup, ), ), ), @@ -236,7 +252,7 @@ class _BackupIndicator extends ConsumerWidget { } return _BadgeLabel( - Icon(Icons.check_outlined, size: 9, color: iconColor, semanticLabel: 'backup_controller_page_backup'.tr()), + Icon(Icons.check_outlined, size: 9, color: iconColor, semanticLabel: context.t.backup_controller_page_backup), ); } } @@ -304,13 +320,13 @@ class _SyncStatusIndicatorState extends ConsumerState<_SyncStatusIndicator> with // Control animations based on sync status if (isSyncing) { if (!_rotationController.isAnimating) { - _rotationController.repeat(); + unawaited(_rotationController.repeat()); } _dismissalController.reset(); } else { _rotationController.stop(); if (_dismissalController.status == AnimationStatus.dismissed) { - _dismissalController.forward(); + unawaited(_dismissalController.forward()); } } diff --git a/mobile/lib/widgets/common/immich_toast.dart b/mobile/lib/widgets/common/immich_toast.dart index 1da07f419d..0a06de4d91 100644 --- a/mobile/lib/widgets/common/immich_toast.dart +++ b/mobile/lib/widgets/common/immich_toast.dart @@ -5,7 +5,7 @@ import 'package:immich_mobile/extensions/build_context_extensions.dart'; enum ToastType { info, success, error } class ImmichToast { - static show({ + static void show({ required BuildContext context, required String msg, ToastType toastType = ToastType.info, diff --git a/mobile/lib/widgets/common/local_album_sliver_app_bar.dart b/mobile/lib/widgets/common/local_album_sliver_app_bar.dart index 85d8f4bb01..1de1d1a262 100644 --- a/mobile/lib/widgets/common/local_album_sliver_app_bar.dart +++ b/mobile/lib/widgets/common/local_album_sliver_app_bar.dart @@ -1,6 +1,6 @@ import 'package:flutter/material.dart'; import 'package:immich_mobile/extensions/build_context_extensions.dart'; -import 'package:immich_mobile/extensions/translate_extensions.dart'; +import 'package:immich_mobile/generated/translations.g.dart'; class LocalAlbumsSliverAppBar extends StatelessWidget { const LocalAlbumsSliverAppBar({super.key}); @@ -15,7 +15,7 @@ class LocalAlbumsSliverAppBar extends StatelessWidget { shape: const RoundedRectangleBorder(borderRadius: BorderRadius.all(Radius.circular(5))), automaticallyImplyLeading: true, centerTitle: true, - title: Text("on_this_device".t(context: context)), + title: Text(context.t.on_this_device), ); } } diff --git a/mobile/lib/widgets/common/location_picker.dart b/mobile/lib/widgets/common/location_picker.dart index c7eb827781..cf3240977b 100644 --- a/mobile/lib/widgets/common/location_picker.dart +++ b/mobile/lib/widgets/common/location_picker.dart @@ -1,10 +1,10 @@ import 'package:auto_route/auto_route.dart'; -import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:flutter_hooks/flutter_hooks.dart'; import 'package:immich_mobile/extensions/build_context_extensions.dart'; import 'package:immich_mobile/extensions/string_extensions.dart'; +import 'package:immich_mobile/generated/translations.g.dart'; import 'package:immich_mobile/routing/router.dart'; import 'package:maplibre_gl/maplibre_gl.dart'; @@ -73,11 +73,11 @@ class _LocationPicker extends HookWidget { mainAxisSize: MainAxisSize.min, crossAxisAlignment: CrossAxisAlignment.start, children: [ - Text("edit_location_dialog_title", style: context.textTheme.titleMedium).tr(), + Text(context.t.edit_location_dialog_title, style: context.textTheme.titleMedium), Align( alignment: Alignment.center, child: TextButton.icon( - icon: const Text("location_picker_choose_on_map").tr(), + icon: Text(context.t.location_picker_choose_on_map), label: const Icon(Icons.map_outlined, size: 16), onPressed: onMapTap, ), @@ -85,9 +85,9 @@ class _LocationPicker extends HookWidget { const SizedBox(height: 12), _ManualPickerInput( controller: latitudeController, - decorationText: "latitude", - hintText: "location_picker_latitude_hint", - errorText: "location_picker_latitude_error", + decorationText: context.t.latitude, + hintText: context.t.location_picker_latitude_hint, + errorText: context.t.location_picker_latitude_error, focusNode: latitiudeFocusNode, validator: _validateLat, onUpdated: onLatitudeUpdated, @@ -95,9 +95,9 @@ class _LocationPicker extends HookWidget { const SizedBox(height: 24), _ManualPickerInput( controller: longitudeController, - decorationText: "longitude", - hintText: "location_picker_longitude_hint", - errorText: "location_picker_longitude_error", + decorationText: context.t.longitude, + hintText: context.t.location_picker_longitude_hint, + errorText: context.t.location_picker_longitude_error, focusNode: longitudeFocusNode, validator: _validateLong, onUpdated: onLongitudeEditingCompleted, @@ -109,19 +109,19 @@ class _LocationPicker extends HookWidget { TextButton( onPressed: () => ContextHelper(context).pop(), child: Text( - "cancel", + context.t.cancel, style: context.textTheme.bodyMedium?.copyWith( fontWeight: FontWeight.w600, color: context.colorScheme.error, ), - ).tr(), + ), ), TextButton( onPressed: () => context.maybePop(latlng), child: Text( - "action_common_update", + context.t.action_common_update, style: context.textTheme.bodyMedium?.copyWith(fontWeight: FontWeight.w600, color: context.primaryColor), - ).tr(), + ), ), ], ); @@ -163,13 +163,13 @@ class _ManualPickerInput extends HookWidget { textInputAction: TextInputAction.done, autofocus: false, decoration: InputDecoration( - labelText: decorationText.tr(), + labelText: decorationText, labelStyle: TextStyle(fontWeight: FontWeight.bold, color: context.primaryColor), floatingLabelBehavior: FloatingLabelBehavior.auto, border: const OutlineInputBorder(), - hintText: hintText.tr(), + hintText: hintText, hintStyle: const TextStyle(fontWeight: FontWeight.normal, fontSize: 14), - errorText: isValid.value ? null : errorText.tr(), + errorText: isValid.value ? null : errorText, ), onEditingComplete: onEditingComplete, keyboardType: const TextInputType.numberWithOptions(decimal: true, signed: true), diff --git a/mobile/lib/widgets/common/mesmerizing_sliver_app_bar.dart b/mobile/lib/widgets/common/mesmerizing_sliver_app_bar.dart index 44b547a5f1..ac53bca72f 100644 --- a/mobile/lib/widgets/common/mesmerizing_sliver_app_bar.dart +++ b/mobile/lib/widgets/common/mesmerizing_sliver_app_bar.dart @@ -8,7 +8,7 @@ import 'package:immich_mobile/domain/models/events.model.dart'; import 'package:immich_mobile/domain/services/timeline.service.dart'; import 'package:immich_mobile/domain/utils/event_stream.dart'; import 'package:immich_mobile/extensions/build_context_extensions.dart'; -import 'package:immich_mobile/extensions/translate_extensions.dart'; +import 'package:immich_mobile/generated/translations.g.dart'; import 'package:immich_mobile/presentation/widgets/images/image_provider.dart'; import 'package:immich_mobile/providers/infrastructure/timeline.provider.dart'; import 'package:immich_mobile/providers/timeline/multiselect.provider.dart'; @@ -134,7 +134,7 @@ class _ExpandedBackgroundState extends ConsumerState<_ExpandedBackground> with S Future.delayed(const Duration(milliseconds: 100), () { if (mounted) { - _slideController.forward(); + unawaited(_slideController.forward()); } }); } @@ -228,7 +228,7 @@ class _ItemCountTextState extends ConsumerState<_ItemCountText> { @override void dispose() { - _reloadSubscription?.cancel(); + unawaited(_reloadSubscription?.cancel()); super.dispose(); } @@ -237,7 +237,7 @@ class _ItemCountTextState extends ConsumerState<_ItemCountText> { final assetCount = ref.watch(timelineServiceProvider.select((s) => s.totalAssets)); return Text( - 'items_count'.t(context: context, args: {"count": assetCount}), + context.t.items_count(count: assetCount), style: context.textTheme.labelLarge?.copyWith( // letterSpacing: 0.2, fontWeight: FontWeight.bold, @@ -311,13 +311,17 @@ class _RandomAssetBackgroundState extends State<_RandomAssetBackground> with Tic void _startAnimationCycle() { if (_isZoomingIn) { - _zoomController.forward().then((_) { - _loadNextAsset(); - }); + unawaited( + _zoomController.forward().then((_) { + unawaited(_loadNextAsset()); + }), + ); } else { - _zoomController.reverse().then((_) { - _loadNextAsset(); - }); + unawaited( + _zoomController.reverse().then((_) { + unawaited(_loadNextAsset()); + }), + ); } } @@ -393,10 +397,8 @@ class _RandomAssetBackgroundState extends State<_RandomAssetBackground> with Tic builder: (context, child) { return Transform.scale( scale: _zoomAnimation.value, - filterQuality: Platform.isAndroid ? FilterQuality.low : null, child: Transform.translate( offset: _panAnimation.value, - filterQuality: Platform.isAndroid ? FilterQuality.low : null, child: Stack( fit: StackFit.expand, children: [ diff --git a/mobile/lib/widgets/common/person_sliver_app_bar.dart b/mobile/lib/widgets/common/person_sliver_app_bar.dart index a2a9d1bdbd..56eb3c6094 100644 --- a/mobile/lib/widgets/common/person_sliver_app_bar.dart +++ b/mobile/lib/widgets/common/person_sliver_app_bar.dart @@ -11,13 +11,13 @@ import 'package:immich_mobile/domain/models/person.model.dart'; import 'package:immich_mobile/domain/services/timeline.service.dart'; import 'package:immich_mobile/domain/utils/event_stream.dart'; import 'package:immich_mobile/extensions/build_context_extensions.dart'; -import 'package:immich_mobile/extensions/translate_extensions.dart'; +import 'package:immich_mobile/generated/translations.g.dart'; import 'package:immich_mobile/presentation/widgets/images/image_provider.dart'; -import 'package:immich_mobile/providers/infrastructure/timeline.provider.dart'; import 'package:immich_mobile/presentation/widgets/images/remote_image_provider.dart'; +import 'package:immich_mobile/providers/infrastructure/timeline.provider.dart'; import 'package:immich_mobile/providers/timeline/multiselect.provider.dart'; -import 'package:immich_mobile/utils/people.utils.dart'; import 'package:immich_mobile/utils/image_url_builder.dart'; +import 'package:immich_mobile/utils/people.utils.dart'; class PersonSliverAppBar extends ConsumerStatefulWidget { const PersonSliverAppBar({ @@ -28,7 +28,7 @@ class PersonSliverAppBar extends ConsumerStatefulWidget { required this.onBirthdayTap, }); - final DriftPerson person; + final Person person; final VoidCallback onNameTap; final VoidCallback onBirthdayTap; final VoidCallback onShowOptions; @@ -56,8 +56,8 @@ class _MesmerizingSliverAppBarState extends ConsumerState { @override Widget build(BuildContext context) { final isMultiSelectEnabled = ref.watch(multiSelectProvider.select((s) => s.isEnabled)); - Color? actionIconColor = Color.lerp(Colors.white, context.primaryColor, _scrollProgress); - List actionIconShadows = [ + final Color? actionIconColor = Color.lerp(Colors.white, context.primaryColor, _scrollProgress); + final List actionIconShadows = [ if (_scrollProgress < 0.95) Shadow(offset: const Offset(0, 2), blurRadius: 5, color: Colors.black.withValues(alpha: 0.5)) else @@ -137,7 +137,7 @@ class _MesmerizingSliverAppBarState extends ConsumerState { class _ExpandedBackground extends ConsumerStatefulWidget { final double scrollProgress; - final DriftPerson person; + final Person person; final VoidCallback onNameTap; final VoidCallback onBirthdayTap; @@ -169,7 +169,7 @@ class _ExpandedBackgroundState extends ConsumerState<_ExpandedBackground> with S Future.delayed(const Duration(milliseconds: 100), () { if (mounted) { - _slideController.forward(); + unawaited(_slideController.forward()); } }); } @@ -230,7 +230,9 @@ class _ExpandedBackgroundState extends ConsumerState<_ExpandedBackground> with S elevation: 3, child: CircleAvatar( maxRadius: 84 / 2, - backgroundImage: RemoteImageProvider(url: getFaceThumbnailUrl(widget.person.id)), + backgroundImage: RemoteImageProvider( + url: getFaceThumbnailUrl(widget.person.id, updatedAt: widget.person.updatedAt), + ), ), ), ), @@ -259,7 +261,7 @@ class _ExpandedBackgroundState extends ConsumerState<_ExpandedBackground> with S ), ) : Text( - 'add_a_name'.tr(), + context.t.add_a_name, style: context.textTheme.titleLarge?.copyWith( color: Colors.grey[400], fontSize: 36, @@ -291,7 +293,7 @@ class _ExpandedBackgroundState extends ConsumerState<_ExpandedBackground> with S ) else Text( - 'add_birthday'.tr(), + context.t.add_birthday, style: context.textTheme.labelLarge?.copyWith( color: Colors.grey[400], height: 1.2, @@ -333,7 +335,7 @@ class _ItemCountTextState extends ConsumerState<_ItemCountText> { @override void dispose() { - _reloadSubscription?.cancel(); + unawaited(_reloadSubscription?.cancel()); super.dispose(); } @@ -342,7 +344,7 @@ class _ItemCountTextState extends ConsumerState<_ItemCountText> { final assetCount = ref.watch(timelineServiceProvider.select((s) => s.totalAssets)); return Text( - 'items_count'.t(context: context, args: {"count": assetCount}), + context.t.items_count(count: assetCount), style: context.textTheme.labelLarge?.copyWith( fontWeight: FontWeight.bold, color: Colors.white, @@ -414,13 +416,17 @@ class _RandomAssetBackgroundState extends State<_RandomAssetBackground> with Tic void _startAnimationCycle() { if (_isZoomingIn) { - _zoomController.forward().then((_) { - _loadNextAsset(); - }); + unawaited( + _zoomController.forward().then((_) { + unawaited(_loadNextAsset()); + }), + ); } else { - _zoomController.reverse().then((_) { - _loadNextAsset(); - }); + unawaited( + _zoomController.reverse().then((_) { + unawaited(_loadNextAsset()); + }), + ); } } @@ -496,10 +502,8 @@ class _RandomAssetBackgroundState extends State<_RandomAssetBackground> with Tic builder: (context, child) { return Transform.scale( scale: _zoomAnimation.value, - filterQuality: Platform.isAndroid ? FilterQuality.low : null, child: Transform.translate( offset: _panAnimation.value, - filterQuality: Platform.isAndroid ? FilterQuality.low : null, child: Stack( fit: StackFit.expand, children: [ diff --git a/mobile/lib/widgets/common/remote_album_sliver_app_bar.dart b/mobile/lib/widgets/common/remote_album_sliver_app_bar.dart index 2fc136302d..4b9532eb88 100644 --- a/mobile/lib/widgets/common/remote_album_sliver_app_bar.dart +++ b/mobile/lib/widgets/common/remote_album_sliver_app_bar.dart @@ -12,7 +12,7 @@ import 'package:immich_mobile/domain/services/timeline.service.dart'; import 'package:immich_mobile/domain/utils/event_stream.dart'; import 'package:immich_mobile/extensions/build_context_extensions.dart'; import 'package:immich_mobile/extensions/datetime_extensions.dart'; -import 'package:immich_mobile/extensions/translate_extensions.dart'; +import 'package:immich_mobile/generated/translations.g.dart'; import 'package:immich_mobile/presentation/widgets/images/image_provider.dart'; import 'package:immich_mobile/providers/infrastructure/current_album.provider.dart'; import 'package:immich_mobile/providers/infrastructure/remote_album.provider.dart'; @@ -64,9 +64,9 @@ class _MesmerizingSliverAppBarState extends ConsumerState actionIconShadows = [ + final List actionIconShadows = [ if (_scrollProgress < 0.95) Shadow(offset: const Offset(0, 2), blurRadius: 5, color: Colors.black.withValues(alpha: 0.5)) else @@ -172,7 +172,7 @@ class _ExpandedBackgroundState extends ConsumerState<_ExpandedBackground> with S Future.delayed(const Duration(milliseconds: 100), () { if (mounted) { - _slideController.forward(); + unawaited(_slideController.forward()); } }); } @@ -309,7 +309,7 @@ class _ItemCountTextState extends ConsumerState<_ItemCountText> { @override void dispose() { - _reloadSubscription?.cancel(); + unawaited(_reloadSubscription?.cancel()); super.dispose(); } @@ -318,7 +318,7 @@ class _ItemCountTextState extends ConsumerState<_ItemCountText> { final assetCount = ref.watch(timelineServiceProvider.select((s) => s.totalAssets)); return Text( - 'items_count'.t(context: context, args: {"count": assetCount}), + context.t.items_count(count: assetCount), style: context.textTheme.labelLarge?.copyWith( color: Colors.white, shadows: [const Shadow(offset: Offset(0, 2), blurRadius: 12, color: Colors.black87)], @@ -390,13 +390,17 @@ class _RandomAssetBackgroundState extends State<_RandomAssetBackground> with Tic void _startAnimationCycle() { if (_isZoomingIn) { - _zoomController.forward().then((_) { - _loadNextAsset(); - }); + unawaited( + _zoomController.forward().then((_) { + unawaited(_loadNextAsset()); + }), + ); } else { - _zoomController.reverse().then((_) { - _loadNextAsset(); - }); + unawaited( + _zoomController.reverse().then((_) { + unawaited(_loadNextAsset()); + }), + ); } } @@ -472,10 +476,8 @@ class _RandomAssetBackgroundState extends State<_RandomAssetBackground> with Tic builder: (context, child) { return Transform.scale( scale: _zoomAnimation.value, - filterQuality: Platform.isAndroid ? FilterQuality.low : null, child: Transform.translate( offset: _panAnimation.value, - filterQuality: Platform.isAndroid ? FilterQuality.low : null, child: Stack( fit: StackFit.expand, children: [ diff --git a/mobile/lib/widgets/common/scaffold_error_body.dart b/mobile/lib/widgets/common/scaffold_error_body.dart index 2e2d8fb506..5f3fb1cb0d 100644 --- a/mobile/lib/widgets/common/scaffold_error_body.dart +++ b/mobile/lib/widgets/common/scaffold_error_body.dart @@ -1,6 +1,6 @@ -import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; import 'package:immich_mobile/extensions/build_context_extensions.dart'; +import 'package:immich_mobile/generated/translations.g.dart'; // Error widget to be used in Scaffold when an AsyncError is received class ScaffoldErrorBody extends StatelessWidget { @@ -15,7 +15,11 @@ class ScaffoldErrorBody extends StatelessWidget { crossAxisAlignment: CrossAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center, children: [ - Text("scaffold_body_error_occurred", style: context.textTheme.displayMedium, textAlign: TextAlign.center).tr(), + Text( + context.t.scaffold_body_error_occurred, + style: context.textTheme.displayMedium, + textAlign: TextAlign.center, + ), if (withIcon) Center( child: Padding( diff --git a/mobile/lib/widgets/common/selection_sliver_app_bar.dart b/mobile/lib/widgets/common/selection_sliver_app_bar.dart index ac74e69e64..f6fb2fc88f 100644 --- a/mobile/lib/widgets/common/selection_sliver_app_bar.dart +++ b/mobile/lib/widgets/common/selection_sliver_app_bar.dart @@ -2,7 +2,7 @@ import 'package:flutter/material.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; import 'package:immich_mobile/domain/models/asset/base_asset.model.dart'; import 'package:immich_mobile/extensions/build_context_extensions.dart'; -import 'package:immich_mobile/extensions/translate_extensions.dart'; +import 'package:immich_mobile/generated/translations.g.dart'; import 'package:immich_mobile/providers/timeline/multiselect.provider.dart'; class SelectionSliverAppBar extends ConsumerStatefulWidget { @@ -23,7 +23,7 @@ class _SelectionSliverAppBarState extends ConsumerState { return !toExclude.contains(asset); }).toSet(); - onDone(Set selected) { + void onDone(Set selected) { ref.read(multiSelectProvider.notifier).reset(); context.pop>(selected); } @@ -43,12 +43,12 @@ class _SelectionSliverAppBarState extends ConsumerState { }, ), centerTitle: true, - title: Text("Select {count}".t(context: context, args: {'count': filteredAssets.length.toString()})), + title: Text(context.t.selected_count(count: filteredAssets.length)), actions: [ TextButton( onPressed: () => onDone(filteredAssets), child: Text( - 'done'.t(context: context), + context.t.done, style: context.textTheme.titleSmall?.copyWith(color: context.colorScheme.primary), ), ), diff --git a/mobile/lib/widgets/common/tag_picker.dart b/mobile/lib/widgets/common/tag_picker.dart index 0265cf7e6c..2b4f07536f 100644 --- a/mobile/lib/widgets/common/tag_picker.dart +++ b/mobile/lib/widgets/common/tag_picker.dart @@ -1,10 +1,10 @@ import 'package:flutter/material.dart'; -import 'package:easy_localization/easy_localization.dart'; import 'package:flutter_hooks/flutter_hooks.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; import 'package:immich_mobile/domain/models/tag.model.dart'; import 'package:immich_mobile/extensions/asyncvalue_extensions.dart'; import 'package:immich_mobile/extensions/build_context_extensions.dart'; +import 'package:immich_mobile/generated/translations.g.dart'; import 'package:immich_mobile/providers/infrastructure/tag.provider.dart'; import 'package:immich_mobile/widgets/common/search_field.dart'; @@ -17,13 +17,13 @@ Future<(Set, Set)?> showTagPickerModal({required BuildContext co ); } -class _TagPickerModal extends HookConsumerWidget { +class _TagPickerModal extends HookWidget { final Set? initialSelection; const _TagPickerModal({this.initialSelection}); @override - Widget build(BuildContext context, WidgetRef ref) { + Widget build(BuildContext context) { final selectedTagIds = useState>(initialSelection ?? {}); final newTagValues = useState>({}); @@ -41,19 +41,19 @@ class _TagPickerModal extends HookConsumerWidget { TextButton( onPressed: () => context.pop(), child: Text( - "cancel", + context.t.cancel, style: context.textTheme.bodyMedium?.copyWith( fontWeight: FontWeight.w600, color: context.colorScheme.error, ), - ).tr(), + ), ), TextButton( onPressed: () => context.pop((selectedTagIds.value, newTagValues.value)), child: Text( - "action_common_update", + context.t.action_common_update, style: context.textTheme.bodyMedium?.copyWith(fontWeight: FontWeight.w600, color: context.primaryColor), - ).tr(), + ), ), ], content: SizedBox( @@ -86,7 +86,7 @@ class TagPicker extends HookConsumerWidget { final searchQuery = useState(''); final tags = ref.watch(tagProvider); final selectedTagIds = useState>(filter); - final borderRadius = const BorderRadius.all(Radius.circular(10)); + const borderRadius = BorderRadius.all(Radius.circular(10)); final selectedNewTagValues = useState>({}); return Column( @@ -98,7 +98,7 @@ class TagPicker extends HookConsumerWidget { onChanged: (value) => searchQuery.value = value, onTapOutside: (_) => formFocus.unfocus(), filled: true, - hintText: 'filter_tags'.tr(), + hintText: context.t.filter_tags, ), ), Padding( @@ -125,7 +125,7 @@ class TagPicker extends HookConsumerWidget { // Create new tag tile return Padding( padding: const EdgeInsets.only(bottom: 2.0), - child: Container( + child: DecoratedBox( decoration: BoxDecoration( color: isCreateSelected ? context.primaryColor : context.primaryColor.withAlpha(25), borderRadius: const BorderRadius.all(Radius.circular(10)), @@ -160,7 +160,7 @@ class TagPicker extends HookConsumerWidget { return Padding( padding: const EdgeInsets.only(bottom: 2.0), - child: Container( + child: DecoratedBox( decoration: BoxDecoration( color: isSelected ? context.primaryColor : context.primaryColor.withAlpha(25), borderRadius: borderRadius, diff --git a/mobile/lib/widgets/common/user_circle_avatar.dart b/mobile/lib/widgets/common/user_circle_avatar.dart index c6e4f4719e..11257da77b 100644 --- a/mobile/lib/widgets/common/user_circle_avatar.dart +++ b/mobile/lib/widgets/common/user_circle_avatar.dart @@ -1,21 +1,19 @@ import 'package:flutter/material.dart'; -import 'package:hooks_riverpod/hooks_riverpod.dart'; import 'package:immich_mobile/domain/models/store.model.dart'; import 'package:immich_mobile/domain/models/user.model.dart'; import 'package:immich_mobile/entities/store.entity.dart'; import 'package:immich_mobile/presentation/widgets/images/remote_image_provider.dart'; -// ignore: must_be_immutable -class UserCircleAvatar extends ConsumerWidget { +class UserCircleAvatar extends StatelessWidget { final UserDto user; - double size; - bool hasBorder; - double opacity; + final double size; + final bool hasBorder; + final double opacity; - UserCircleAvatar({super.key, this.size = 44, this.hasBorder = false, this.opacity = 1, required this.user}); + const UserCircleAvatar({super.key, this.size = 44, this.hasBorder = false, this.opacity = 1, required this.user}); @override - Widget build(BuildContext context, WidgetRef ref) { + Widget build(BuildContext context) { final userAvatarColor = user.avatarColor.toColor().withValues(alpha: opacity); final profileImageUrl = '${Store.get(StoreKey.serverEndpoint)}/users/${user.id}/profile-image?d=${user.profileChangedAt.millisecondsSinceEpoch}'; diff --git a/mobile/lib/widgets/forms/change_password_form.dart b/mobile/lib/widgets/forms/change_password_form.dart index 7ed9fa5f1c..65a4c6f88e 100644 --- a/mobile/lib/widgets/forms/change_password_form.dart +++ b/mobile/lib/widgets/forms/change_password_form.dart @@ -1,10 +1,10 @@ import 'package:auto_route/auto_route.dart'; -import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; import 'package:flutter_hooks/flutter_hooks.dart'; import 'package:fluttertoast/fluttertoast.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; import 'package:immich_mobile/extensions/build_context_extensions.dart'; +import 'package:immich_mobile/generated/translations.g.dart'; import 'package:immich_mobile/providers/auth.provider.dart'; import 'package:immich_mobile/providers/websocket.provider.dart'; import 'package:immich_mobile/widgets/common/immich_toast.dart'; @@ -29,13 +29,13 @@ class ChangePasswordForm extends HookConsumerWidget { alignment: WrapAlignment.start, children: [ Text( - 'change_password'.tr(), + context.t.change_password, style: TextStyle(fontSize: 24, fontWeight: FontWeight.bold, color: context.primaryColor), ), Padding( padding: const EdgeInsets.symmetric(vertical: 24.0), child: Text( - 'change_password_form_description'.tr(namedArgs: {'name': authState.name}), + context.t.change_password_form_description(name: authState.name), style: TextStyle(fontSize: 14, color: context.colorScheme.onSurface, fontWeight: FontWeight.w600), ), ), @@ -55,37 +55,44 @@ class ChangePasswordForm extends HookConsumerWidget { passwordController: passwordController, onPressed: () async { if (formKey.currentState!.validate()) { - var isSuccess = await ref + final isSuccess = await ref .read(authProvider.notifier) .changePassword(passwordController.value.text); - if (isSuccess) { - await ref.read(authProvider.notifier).logout(); - ref.read(websocketProvider.notifier).disconnect(); - - AutoRouter.of(context).back(); - + if (!isSuccess && context.mounted) { ImmichToast.show( context: context, - msg: "login_password_changed_success".tr(), - toastType: ToastType.success, - gravity: ToastGravity.TOP, - ); - } else { - ImmichToast.show( - context: context, - msg: "login_password_changed_error".tr(), + msg: context.t.login_password_changed_error, toastType: ToastType.error, gravity: ToastGravity.TOP, ); + return; } + + if (!context.mounted) { + return; + } + + await ref.read(authProvider.notifier).logout(); + if (!context.mounted) { + return; + } + + ref.read(websocketProvider.notifier).disconnect(); + AutoRouter.of(context).back(); + ImmichToast.show( + context: context, + msg: context.t.login_password_changed_success, + toastType: ToastType.success, + gravity: ToastGravity.TOP, + ); } }, ), TextButton.icon( icon: const Icon(Icons.arrow_back), onPressed: () => AutoRouter.of(context).back(), - label: const Text('back').tr(), + label: Text(context.t.back), ), ], ), @@ -109,9 +116,9 @@ class PasswordInput extends StatelessWidget { obscureText: true, controller: controller, decoration: InputDecoration( - labelText: 'change_password_form_new_password'.tr(), + labelText: context.t.change_password_form_new_password, border: const OutlineInputBorder(), - hintText: 'change_password_form_new_password'.tr(), + hintText: context.t.change_password_form_new_password, ), ); } @@ -125,7 +132,7 @@ class ConfirmPasswordInput extends StatelessWidget { String? _validateInput(String? email) { if (confirmController.value != originalController.value) { - return 'change_password_form_password_mismatch'.tr(); + return StaticTranslations.instance.change_password_form_password_mismatch; } return null; } @@ -136,8 +143,8 @@ class ConfirmPasswordInput extends StatelessWidget { obscureText: true, controller: confirmController, decoration: InputDecoration( - labelText: 'change_password_form_confirm_password'.tr(), - hintText: 'change_password_form_reenter_new_password'.tr(), + labelText: context.t.change_password_form_confirm_password, + hintText: context.t.change_password_form_reenter_new_password, border: const OutlineInputBorder(), ), validator: _validateInput, @@ -146,20 +153,20 @@ class ConfirmPasswordInput extends StatelessWidget { } } -class ChangePasswordButton extends ConsumerWidget { +class ChangePasswordButton extends StatelessWidget { final TextEditingController passwordController; final VoidCallback onPressed; const ChangePasswordButton({super.key, required this.passwordController, required this.onPressed}); @override - Widget build(BuildContext context, WidgetRef ref) { + Widget build(BuildContext context) { return ElevatedButton( style: ElevatedButton.styleFrom( visualDensity: VisualDensity.standard, padding: const EdgeInsets.symmetric(vertical: 10, horizontal: 25), ), onPressed: onPressed, - child: Text('change_password'.tr(), style: const TextStyle(fontSize: 14, fontWeight: FontWeight.bold)), + child: Text(context.t.change_password, style: const TextStyle(fontSize: 14, fontWeight: FontWeight.bold)), ); } } diff --git a/mobile/lib/widgets/forms/login/login_form.dart b/mobile/lib/widgets/forms/login/login_form.dart index 9adf15b448..aa9750a2a5 100644 --- a/mobile/lib/widgets/forms/login/login_form.dart +++ b/mobile/lib/widgets/forms/login/login_form.dart @@ -5,7 +5,6 @@ import 'dart:math'; import 'package:auto_route/auto_route.dart'; import 'package:crypto/crypto.dart'; -import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:flutter_hooks/flutter_hooks.dart' hide Store; @@ -14,10 +13,11 @@ import 'package:hooks_riverpod/hooks_riverpod.dart'; import 'package:immich_mobile/domain/models/store.model.dart'; import 'package:immich_mobile/entities/store.entity.dart'; import 'package:immich_mobile/extensions/build_context_extensions.dart'; -import 'package:immich_mobile/extensions/translate_extensions.dart'; +import 'package:immich_mobile/generated/translations.g.dart'; import 'package:immich_mobile/infrastructure/repositories/settings.repository.dart'; import 'package:immich_mobile/providers/auth.provider.dart'; import 'package:immich_mobile/providers/background_sync.provider.dart'; +import 'package:immich_mobile/providers/feature_message.provider.dart'; 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'; @@ -42,31 +42,21 @@ class LoginForm extends HookConsumerWidget { final log = Logger('LoginForm'); - String? _validateUrl(String? url) { - if (url == null || url.isEmpty) { - return null; - } - - final parsedUrl = Uri.tryParse(url); - if (parsedUrl == null || !parsedUrl.isAbsolute || !parsedUrl.scheme.startsWith("http") || parsedUrl.host.isEmpty) { - return 'login_form_err_invalid_url'.tr(); - } - - return null; - } + String? _validateUrl(String? url) => + normalizeAndValidateServerUrl(url) ? null : StaticTranslations.instance.login_form_err_invalid_url; String? _validateEmail(String? email) { if (email == null || email == '') { return null; } if (email.endsWith(' ')) { - return 'login_form_err_trailing_whitespace'.tr(); + return StaticTranslations.instance.login_form_err_trailing_whitespace; } if (email.startsWith(' ')) { - return 'login_form_err_leading_whitespace'.tr(); + return StaticTranslations.instance.login_form_err_leading_whitespace; } if (email.contains(' ') || !email.contains('@')) { - return 'login_form_err_invalid_email'.tr(); + return StaticTranslations.instance.login_form_err_invalid_email; } return null; } @@ -80,18 +70,19 @@ class LoginForm extends HookConsumerWidget { final isOauthEnable = useState(false); final isPasswordLoginEnable = useState(false); final oAuthButtonLabel = useState('OAuth'); - final logoAnimationController = useAnimationController(duration: const Duration(seconds: 60))..repeat(); + final logoAnimationController = useAnimationController(duration: const Duration(seconds: 60)); + unawaited(logoAnimationController.repeat()); final serverInfo = ref.watch(serverInfoProvider); final warningMessage = useState(null); final loginFormKey = GlobalKey(); final ValueNotifier serverEndpoint = useState(null); - checkVersionMismatch() async { + Future checkVersionMismatch() async { try { final packageInfo = await PackageInfo.fromPlatform(); final appSemVer = SemVer.fromString(packageInfo.version); final serverSemVer = serverInfo.serverVersion; - warningMessage.value = getVersionCompatibilityMessage(appSemVer, serverSemVer); + warningMessage.value = getVersionCompatibilityMessage(serverVersion: serverSemVer, appVersion: appSemVer); } catch (error) { warningMessage.value = 'Error checking version compatibility'; } @@ -100,19 +91,25 @@ class LoginForm extends HookConsumerWidget { /// Fetch the server login credential and enables oAuth login if necessary /// Returns true if successful, false otherwise Future getServerAuthSettings() async { - final sanitizeServerUrl = sanitizeUrl(serverEndpointController.text); + final sanitizeServerUrl = normalizeServerUrl(serverEndpointController.text); final serverUrl = punycodeEncodeUrl(sanitizeServerUrl); // Guard empty URL if (serverUrl.isEmpty) { - ImmichToast.show(context: context, msg: "login_form_server_empty".tr(), toastType: ToastType.error); + ImmichToast.show(context: context, msg: context.t.login_form_server_empty, toastType: ToastType.error); } try { final endpoint = await ref.read(authProvider.notifier).validateServerUrl(serverUrl); + if (!context.mounted) { + return; + } // Fetch and load server config and features await ref.read(serverInfoProvider.notifier).getServerInfo(); + if (!context.mounted) { + return; + } final serverInfo = ref.read(serverInfoProvider); final features = serverInfo.serverFeatures; @@ -124,27 +121,39 @@ class LoginForm extends HookConsumerWidget { serverEndpoint.value = endpoint; } on ApiException catch (e) { + if (!context.mounted) { + return; + } + ImmichToast.show( context: context, - msg: e.message ?? 'login_form_api_exception'.tr(), + msg: e.message ?? context.t.login_form_api_exception, toastType: ToastType.error, gravity: ToastGravity.TOP, ); isOauthEnable.value = false; isPasswordLoginEnable.value = true; } on HandshakeException { + if (!context.mounted) { + return; + } + ImmichToast.show( context: context, - msg: 'login_form_handshake_exception'.tr(), + msg: context.t.login_form_handshake_exception, toastType: ToastType.error, gravity: ToastGravity.TOP, ); isOauthEnable.value = false; isPasswordLoginEnable.value = true; } catch (e) { + if (!context.mounted) { + return; + } + ImmichToast.show( context: context, - msg: 'login_form_server_error'.tr(), + msg: context.t.login_form_server_error, toastType: ToastType.error, gravity: ToastGravity.TOP, ); @@ -161,13 +170,13 @@ class LoginForm extends HookConsumerWidget { return null; }, []); - populateTestLoginInfo() { + void populateTestLoginInfo() { emailController.text = 'demo@immich.app'; passwordController.text = 'demo'; serverEndpointController.text = 'https://demo.immich.app'; } - populateTestLoginInfo1() { + void populateTestLoginInfo1() { emailController.text = 'testuser@email.com'; passwordController.text = 'password'; serverEndpointController.text = 'http://10.1.15.216:2283/api'; @@ -187,8 +196,12 @@ class LoginForm extends HookConsumerWidget { } } - getManageMediaPermission() async { + Future getManageMediaPermission() async { final hasPermission = await ref.read(permissionRepositoryProvider).hasManageMediaPermission(); + if (!context.mounted) { + return; + } + if (!hasPermission) { await showDialog( context: context, @@ -197,15 +210,15 @@ class LoginForm extends HookConsumerWidget { shape: const RoundedRectangleBorder(borderRadius: BorderRadius.all(Radius.circular(10))), elevation: 5, title: Text( - 'manage_media_access_title', + context.t.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(), + Text(context.t.manage_media_access_subtitle, style: const TextStyle(fontSize: 14)), const SizedBox(height: 4), - const Text('manage_media_access_rationale', style: TextStyle(fontSize: 12)).tr(), + Text(context.t.manage_media_access_rationale, style: const TextStyle(fontSize: 12)), ], ), ), @@ -213,7 +226,7 @@ class LoginForm extends HookConsumerWidget { TextButton( onPressed: () => Navigator.of(context).pop(), child: Text( - 'cancel'.tr(), + context.t.cancel, style: TextStyle(fontWeight: FontWeight.w600, color: context.primaryColor), ), ), @@ -223,7 +236,7 @@ class LoginForm extends HookConsumerWidget { Navigator.of(context).pop(); }, child: Text( - 'manage_media_access_settings'.tr(), + context.t.manage_media_access_settings, style: TextStyle(fontWeight: FontWeight.w600, color: context.primaryColor), ), ), @@ -236,7 +249,7 @@ class LoginForm extends HookConsumerWidget { bool isSyncRemoteDeletionsMode() => Platform.isAndroid && Store.get(StoreKey.manageLocalMediaAndroid, false); - login() async { + Future login() async { TextInput.finishAutofillContext(); // Invalidate all api repository provider instance to take into account new access token @@ -245,6 +258,10 @@ class LoginForm extends HookConsumerWidget { try { final result = await ref.read(authProvider.notifier).login(emailController.text, passwordController.text); + if (!context.mounted) { + return; + } + if (result.shouldChangePassword && !result.isAdmin) { unawaited(context.pushRoute(const ChangePasswordRoute())); } else { @@ -253,14 +270,27 @@ class LoginForm extends HookConsumerWidget { await getManageMediaPermission(); } unawaited(handleSyncFlow()); + if (!context.mounted) { + return; + } + ref.read(websocketProvider.notifier).connect(); + unawaited(ref.read(featureMessageServiceProvider).markSeen()); + if (!context.mounted) { + return; + } + unawaited(context.router.replaceAll([const TabShellRoute()])); return; } } catch (error) { + if (!context.mounted) { + return; + } + ImmichToast.show( context: context, - msg: "login_form_failed_login".tr(), + msg: context.t.login_form_failed_login, toastType: ToastType.error, gravity: ToastGravity.TOP, ); @@ -286,13 +316,13 @@ class LoginForm extends HookConsumerWidget { } Future generatePKCECodeChallenge(String codeVerifier) async { - var bytes = utf8.encode(codeVerifier); - var digest = sha256.convert(bytes); + final bytes = utf8.encode(codeVerifier); + final digest = sha256.convert(bytes); return base64Url.encode(digest.bytes).replaceAll('=', ''); } - oAuthLogin() async { - var oAuthService = ref.watch(oAuthServiceProvider); + Future oAuthLogin() async { + final oAuthService = ref.read(oAuthServiceProvider); String? oAuthServerUrl; final state = generateRandomString(32); @@ -302,7 +332,7 @@ class LoginForm extends HookConsumerWidget { try { oAuthServerUrl = await oAuthService.getOAuthServerUrl( - sanitizeUrl(serverEndpointController.text), + normalizeServerUrl(serverEndpointController.text), state, codeChallenge, ); @@ -312,9 +342,13 @@ class LoginForm extends HookConsumerWidget { } catch (error, stack) { log.severe('Error getting OAuth server Url: $error', stack); + if (!context.mounted) { + return; + } + ImmichToast.show( context: context, - msg: "login_form_failed_get_oauth_server_config".tr(), + msg: context.t.login_form_failed_get_oauth_server_config, toastType: ToastType.error, gravity: ToastGravity.TOP, ); @@ -325,28 +359,37 @@ class LoginForm extends HookConsumerWidget { try { final loginResponseDto = await oAuthService.oAuthLogin(oAuthServerUrl, state, codeVerifier); - if (loginResponseDto == null) { + if (loginResponseDto == null || !context.mounted) { return; } log.info("Finished OAuth login with response: ${loginResponseDto.userEmail}"); final isSuccess = await ref - .watch(authProvider.notifier) + .read(authProvider.notifier) .saveAuthInfo(accessToken: loginResponseDto.accessToken); - if (isSuccess) { + if (isSuccess && context.mounted) { await ref.read(galleryPermissionNotifier.notifier).requestGalleryPermission(); if (isSyncRemoteDeletionsMode()) { await getManageMediaPermission(); } unawaited(handleSyncFlow()); + if (!context.mounted) { + return; + } + + unawaited(ref.read(featureMessageServiceProvider).markSeen()); unawaited(context.router.replaceAll([const TabShellRoute()])); return; } } catch (error, stack) { log.severe('Error logging in with OAuth: $error', stack); + if (!context.mounted) { + return; + } + ImmichToast.show( context: context, msg: error.toString(), @@ -355,9 +398,13 @@ class LoginForm extends HookConsumerWidget { ); } finally {} } else { + if (!context.mounted) { + return; + } + ImmichToast.show( context: context, - msg: "login_form_failed_get_oauth_server_disable".tr(), + msg: context.t.login_form_failed_get_oauth_server_disable, toastType: ToastType.info, gravity: ToastGravity.TOP, ); @@ -365,8 +412,8 @@ class LoginForm extends HookConsumerWidget { } } - buildVersionCompatWarning() { - checkVersionMismatch(); + SingleChildRenderObjectWidget buildVersionCompatWarning() { + unawaited(checkVersionMismatch()); if (warningMessage.value == null) { return const SizedBox.shrink(); @@ -377,11 +424,21 @@ class LoginForm extends HookConsumerWidget { child: Container( padding: const EdgeInsets.all(16), decoration: BoxDecoration( - color: context.isDarkTheme ? Colors.red.shade700 : Colors.red.shade100, - borderRadius: const BorderRadius.all(Radius.circular(8)), - border: Border.all(color: context.isDarkTheme ? Colors.red.shade900 : Colors.red[200]!), + color: context.isDarkTheme ? Colors.amber.shade700 : Colors.amber.shade100, + borderRadius: const BorderRadius.all(Radius.circular(12)), + border: Border.all(color: context.isDarkTheme ? Colors.amber.shade800 : Colors.amber[200]!, width: 2), + ), + child: Row( + mainAxisSize: MainAxisSize.min, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Icon(Icons.warning_amber_rounded, color: Colors.amber.shade800), + const SizedBox(width: 8), + Expanded( + child: Padding(padding: const EdgeInsets.only(top: 2), child: Text(warningMessage.value!)), + ), + ], ), - child: Text(warningMessage.value!, textAlign: TextAlign.center), ), ); } @@ -394,19 +451,19 @@ class LoginForm extends HookConsumerWidget { children: [ ImmichForm( onSubmit: getServerAuthSettings, - submitText: 'next'.t(context: context), + submitText: context.t.next, submitIcon: Icons.arrow_forward_rounded, builder: (_, form) => ImmichURLInput( controller: serverEndpointController, - label: 'login_form_endpoint_url'.t(context: context), - hintText: 'login_form_endpoint_hint'.t(context: context), + label: context.t.login_form_endpoint_url, + hintText: context.t.login_form_endpoint_hint, validator: _validateUrl, keyboardAction: .next, onSubmit: (_) => form.submit(), ), ), ImmichTextButton( - labelText: 'settings'.t(context: context), + labelText: context.t.settings, icon: Icons.settings, variant: ImmichVariant.ghost, onPressed: () => context.pushRoute(const SettingsRoute()), @@ -423,7 +480,7 @@ class LoginForm extends HookConsumerWidget { Padding( padding: const EdgeInsets.only(bottom: ImmichSpacing.md), child: Text( - sanitizeUrl(serverEndpointController.text), + normalizeServerUrl(serverEndpointController.text), style: context.textTheme.displaySmall, textAlign: TextAlign.center, ), @@ -431,26 +488,24 @@ class LoginForm extends HookConsumerWidget { if (isPasswordLoginEnable.value) ImmichForm( onSubmit: login, - submitText: 'login'.t(context: context), + submitText: context.t.login, submitIcon: Icons.login_rounded, builder: (context, form) => Column( spacing: ImmichSpacing.md, children: [ - ImmichTextInput( + ImmichEmailInput( controller: emailController, - label: 'email'.t(context: context), - hintText: 'login_form_email_hint'.t(context: context), + label: context.t.email, + hintText: context.t.login_form_email_hint, validator: _validateEmail, keyboardAction: TextInputAction.next, - keyboardType: TextInputType.emailAddress, - autofillHints: const [AutofillHints.email], onSubmit: (_) => passwordFocusNode.requestFocus(), ), ImmichPasswordInput( controller: passwordController, focusNode: passwordFocusNode, - label: 'password'.t(context: context), - hintText: 'login_form_password_hint'.t(context: context), + label: context.t.password, + hintText: context.t.login_form_password_hint, keyboardAction: TextInputAction.go, onSubmit: (_) => form.submit(), ), @@ -469,10 +524,9 @@ class LoginForm extends HookConsumerWidget { ) : const SizedBox.shrink(), ), - if (!isOauthEnable.value && !isPasswordLoginEnable.value) - Center(child: const Text('login_disabled').tr()), + if (!isOauthEnable.value && !isPasswordLoginEnable.value) Center(child: Text(context.t.login_disabled)), ImmichTextButton( - labelText: 'back'.t(context: context), + labelText: context.t.back, icon: Icons.arrow_back, variant: ImmichVariant.ghost, onPressed: () => serverEndpoint.value = null, diff --git a/mobile/lib/widgets/forms/pin_input.dart b/mobile/lib/widgets/forms/pin_input.dart index c4f0d8f3b7..8bcfd51282 100644 --- a/mobile/lib/widgets/forms/pin_input.dart +++ b/mobile/lib/widgets/forms/pin_input.dart @@ -26,9 +26,9 @@ class PinInput extends StatelessWidget { @override Widget build(BuildContext context) { - getPinSize() { - final minimumPadding = 18.0; - final gapWidth = 3.0; + Size getPinSize() { + const minimumPadding = 18.0; + const gapWidth = 3.0; final screenWidth = context.width; final pinWidth = (screenWidth - (minimumPadding * 2) - (gapWidth * 5)) / (length ?? 6); diff --git a/mobile/lib/widgets/forms/pin_registration_form.dart b/mobile/lib/widgets/forms/pin_registration_form.dart index d126169aad..bc14388021 100644 --- a/mobile/lib/widgets/forms/pin_registration_form.dart +++ b/mobile/lib/widgets/forms/pin_registration_form.dart @@ -1,8 +1,8 @@ -import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; import 'package:flutter_hooks/flutter_hooks.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; import 'package:immich_mobile/extensions/build_context_extensions.dart'; +import 'package:immich_mobile/generated/translations.g.dart'; import 'package:immich_mobile/providers/auth.provider.dart'; import 'package:immich_mobile/widgets/forms/pin_input.dart'; @@ -29,7 +29,7 @@ class PinRegistrationForm extends HookConsumerWidget { return true; } - createNewPinCode() async { + Future createNewPinCode() async { final isValid = validatePinCode(); if (!isValid) { hasError.value = true; @@ -42,6 +42,10 @@ class PinRegistrationForm extends HookConsumerWidget { onDone(); } catch (error) { hasError.value = true; + if (!context.mounted) { + return; + } + context.showSnackBar(SnackBar(content: Text(error.toString()))); } } @@ -54,7 +58,7 @@ class PinRegistrationForm extends HookConsumerWidget { SizedBox( width: context.width * 0.7, child: Text( - 'setup_pin_code'.tr(), + context.t.setup_pin_code, style: context.textTheme.labelLarge!.copyWith(fontSize: 24), textAlign: TextAlign.center, ), @@ -62,7 +66,7 @@ class PinRegistrationForm extends HookConsumerWidget { SizedBox( width: context.width * 0.8, child: Text( - 'new_pin_code_subtitle'.tr(), + context.t.new_pin_code_subtitle, style: context.textTheme.bodyLarge!.copyWith(fontSize: 16), textAlign: TextAlign.center, ), @@ -70,7 +74,7 @@ class PinRegistrationForm extends HookConsumerWidget { const SizedBox(height: 32), PinInput( controller: newPinCodeController, - label: 'new_pin_code'.tr(), + label: context.t.new_pin_code, length: 6, autoFocus: true, hasError: hasError.value, @@ -83,7 +87,7 @@ class PinRegistrationForm extends HookConsumerWidget { const SizedBox(height: 32), PinInput( controller: confirmPinCodeController, - label: 'confirm_new_pin_code'.tr(), + label: context.t.confirm_new_pin_code, length: 6, hasError: hasError.value, onChanged: (input) { @@ -98,7 +102,7 @@ class PinRegistrationForm extends HookConsumerWidget { child: Row( children: [ Expanded( - child: ElevatedButton(onPressed: createNewPinCode, child: Text('create'.tr())), + child: ElevatedButton(onPressed: createNewPinCode, child: Text(context.t.create)), ), ], ), diff --git a/mobile/lib/widgets/forms/pin_verification_form.dart b/mobile/lib/widgets/forms/pin_verification_form.dart index 2b7e3e8251..6f1ba25fd0 100644 --- a/mobile/lib/widgets/forms/pin_verification_form.dart +++ b/mobile/lib/widgets/forms/pin_verification_form.dart @@ -1,8 +1,8 @@ -import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; import 'package:flutter_hooks/flutter_hooks.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; import 'package:immich_mobile/extensions/build_context_extensions.dart'; +import 'package:immich_mobile/generated/translations.g.dart'; import 'package:immich_mobile/providers/auth.provider.dart'; import 'package:immich_mobile/widgets/forms/pin_input.dart'; @@ -29,7 +29,7 @@ class PinVerificationForm extends HookConsumerWidget { final hasError = useState(false); final isVerified = useState(false); - verifyPin(String pinCode) async { + Future verifyPin(String pinCode) async { final isUnlocked = await ref.read(authProvider.notifier).unlockPinCode(pinCode); if (isUnlocked) { @@ -60,7 +60,7 @@ class PinVerificationForm extends HookConsumerWidget { SizedBox( width: context.width * 0.7, child: Text( - description ?? 'enter_your_pin_code_subtitle'.tr(), + description ?? context.t.enter_your_pin_code_subtitle, style: context.textTheme.labelLarge!.copyWith(fontSize: 18), textAlign: TextAlign.center, ), diff --git a/mobile/lib/widgets/map/asset_marker_icon.dart b/mobile/lib/widgets/map/asset_marker_icon.dart index ff6058161b..75881195a4 100644 --- a/mobile/lib/widgets/map/asset_marker_icon.dart +++ b/mobile/lib/widgets/map/asset_marker_icon.dart @@ -69,15 +69,15 @@ class _PinPainter extends CustomPainter { @override void paint(Canvas canvas, Size size) { - Paint primaryBrush = Paint() + final Paint primaryBrush = Paint() ..color = primaryColor ..style = PaintingStyle.fill; - Paint secondaryBrush = Paint() + final Paint secondaryBrush = Paint() ..color = secondaryColor ..style = PaintingStyle.fill; - Paint lineBrush = Paint() + final Paint lineBrush = Paint() ..color = primaryColor ..style = PaintingStyle.stroke ..strokeWidth = 2; diff --git a/mobile/lib/widgets/map/map_settings/map_custom_time_range.dart b/mobile/lib/widgets/map/map_settings/map_custom_time_range.dart new file mode 100644 index 0000000000..6fa929852a --- /dev/null +++ b/mobile/lib/widgets/map/map_settings/map_custom_time_range.dart @@ -0,0 +1,73 @@ +import 'package:easy_localization/easy_localization.dart'; +import 'package:flutter/material.dart'; +import 'package:immich_mobile/domain/models/time_range.model.dart'; +import 'package:immich_mobile/generated/translations.g.dart'; +import 'package:immich_mobile/utils/option.dart'; + +class MapTimeRange extends StatelessWidget { + const MapTimeRange({super.key, required this.timeRange, required this.onChanged}); + + final TimeRange timeRange; + final Function(TimeRange) onChanged; + + @override + Widget build(BuildContext context) { + return Column( + mainAxisSize: MainAxisSize.min, + children: [ + ListTile( + title: Text(context.t.date_after), + subtitle: Text( + timeRange.from != null + ? DateFormat.yMMMd(context.locale.toLanguageTag()).add_jm().format(timeRange.from!) + : context.t.not_set, + ), + trailing: timeRange.from != null + ? IconButton(icon: const Icon(Icons.close), onPressed: () => onChanged(timeRange.clearFrom())) + : null, + onTap: () async { + final initial = timeRange.from ?? DateTime.now(); + final currentTo = timeRange.to; + + final picked = await showDatePicker( + context: context, + initialDate: currentTo != null && initial.isAfter(currentTo) ? currentTo : initial, + firstDate: DateTime(1970), + lastDate: currentTo ?? DateTime.now(), + ); + + if (picked != null) { + onChanged(timeRange.copyWith(from: Option.some(picked))); + } + }, + ), + ListTile( + title: Text(context.t.date_before), + subtitle: Text( + timeRange.to != null + ? DateFormat.yMMMd(context.locale.toLanguageTag()).add_jm().format(timeRange.to!) + : context.t.not_set, + ), + trailing: timeRange.to != null + ? IconButton(icon: const Icon(Icons.close), onPressed: () => onChanged(timeRange.clearTo())) + : null, + onTap: () async { + final initial = timeRange.to ?? DateTime.now(); + final currentFrom = timeRange.from; + + final picked = await showDatePicker( + context: context, + initialDate: currentFrom != null && initial.isBefore(currentFrom) ? currentFrom : initial, + firstDate: currentFrom ?? DateTime(1970), + lastDate: DateTime.now(), + ); + + if (picked != null) { + onChanged(timeRange.copyWith(to: Option.some(picked))); + } + }, + ), + ], + ); + } +} diff --git a/mobile/lib/widgets/map/map_settings/map_settings_time_dropdown.dart b/mobile/lib/widgets/map/map_settings/map_settings_time_dropdown.dart index 2a4dacaff7..eeebc28dda 100644 --- a/mobile/lib/widgets/map/map_settings/map_settings_time_dropdown.dart +++ b/mobile/lib/widgets/map/map_settings/map_settings_time_dropdown.dart @@ -1,7 +1,6 @@ -import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; import 'package:immich_mobile/extensions/build_context_extensions.dart'; -import 'package:immich_mobile/extensions/translate_extensions.dart'; +import 'package:immich_mobile/generated/translations.g.dart'; class MapTimeDropDown extends StatelessWidget { final int relativeTime; @@ -20,7 +19,7 @@ class MapTimeDropDown extends StatelessWidget { mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ Text( - "date_range".t(context: context), + context.t.date_range, style: context.textTheme.bodyLarge!.copyWith(fontWeight: FontWeight.w500, height: 1.5), ), Flexible( @@ -30,24 +29,21 @@ class MapTimeDropDown extends StatelessWidget { initialSelection: relativeTime, onSelected: (value) => onTimeChange(value!), dropdownMenuEntries: [ - DropdownMenuEntry(value: 0, label: "all".t(context: context)), - DropdownMenuEntry(value: 1, label: "map_settings_date_range_option_day".t(context: context)), - DropdownMenuEntry(value: 7, label: "map_settings_date_range_option_days".tr(namedArgs: {'days': "7"})), - DropdownMenuEntry( - value: 30, - label: "map_settings_date_range_option_days".tr(namedArgs: {'days': "30"}), - ), + DropdownMenuEntry(value: 0, label: context.t.all), + DropdownMenuEntry(value: 1, label: context.t.map_settings_date_range_option_day), + DropdownMenuEntry(value: 7, label: context.t.map_settings_date_range_option_days(days: 7)), + DropdownMenuEntry(value: 30, label: context.t.map_settings_date_range_option_days(days: 30)), DropdownMenuEntry( value: now .difference(DateTime(now.year - 1, now.month, now.day, now.hour, now.minute, now.second)) .inDays, - label: "map_settings_date_range_option_year".t(context: context), + label: context.t.map_settings_date_range_option_year, ), DropdownMenuEntry( value: now .difference(DateTime(now.year - 3, now.month, now.day, now.hour, now.minute, now.second)) .inDays, - label: "map_settings_date_range_option_years".t(args: {'years': "3"}), + label: context.t.map_settings_date_range_option_years(years: 3), ), ], ), diff --git a/mobile/lib/widgets/map/map_settings/map_theme_picker.dart b/mobile/lib/widgets/map/map_settings/map_theme_picker.dart index 7866c0ecdc..6b53a273a0 100644 --- a/mobile/lib/widgets/map/map_settings/map_theme_picker.dart +++ b/mobile/lib/widgets/map/map_settings/map_theme_picker.dart @@ -1,6 +1,6 @@ import 'package:flutter/material.dart'; import 'package:immich_mobile/extensions/build_context_extensions.dart'; -import 'package:immich_mobile/extensions/translate_extensions.dart'; +import 'package:immich_mobile/generated/translations.g.dart'; import 'package:immich_mobile/widgets/map/map_thumbnail.dart'; import 'package:maplibre_gl/maplibre_gl.dart'; @@ -18,7 +18,7 @@ class MapThemePicker extends StatelessWidget { padding: const EdgeInsets.only(bottom: 20), child: Center( child: Text( - "map_settings_theme_settings".t(context: context), + context.t.map_settings_theme_settings, style: context.textTheme.bodyLarge!.copyWith(fontWeight: FontWeight.w500, height: 1.5), ), ), @@ -69,7 +69,7 @@ class _BorderedMapThumbnail extends StatelessWidget { Widget build(BuildContext context) { return Column( children: [ - Container( + DecoratedBox( decoration: BoxDecoration( border: Border.fromBorderSide( BorderSide(width: 4, color: shouldHighlight ? context.colorScheme.onSurface : Colors.transparent), @@ -79,7 +79,7 @@ class _BorderedMapThumbnail extends StatelessWidget { child: MapThumbnail( zoom: 2, centre: const LatLng(47, 5), - onTap: (_, __) => onThemeChange(mode), + onTap: (_, _) => onThemeChange(mode), themeMode: mode, showAttribution: false, ), diff --git a/mobile/lib/widgets/map/map_theme_override.dart b/mobile/lib/widgets/map/map_theme_override.dart index 57f970b0d1..93cbd8846f 100644 --- a/mobile/lib/widgets/map/map_theme_override.dart +++ b/mobile/lib/widgets/map/map_theme_override.dart @@ -66,10 +66,10 @@ class _MapThemeOverrideState extends ConsumerState with Widget @override Widget build(BuildContext context) { _theme = widget.themeMode ?? ref.watch(mapStateNotifierProvider.select((v) => v.themeMode)); - var appTheme = ref.watch(immichThemeProvider); + final appTheme = ref.watch(immichThemeProvider); final locale = ref.watch(localeProvider); - useValueChanged(_theme, (_, __) { + useValueChanged(_theme, (_, _) { if (_theme == ThemeMode.system) { WidgetsBinding.instance.addObserver(this); } else { diff --git a/mobile/lib/widgets/map/map_thumbnail.dart b/mobile/lib/widgets/map/map_thumbnail.dart index 7defb52264..84c2ac0100 100644 --- a/mobile/lib/widgets/map/map_thumbnail.dart +++ b/mobile/lib/widgets/map/map_thumbnail.dart @@ -2,12 +2,11 @@ import 'dart:math'; import 'package:flutter/material.dart'; import 'package:flutter_hooks/flutter_hooks.dart'; -import 'package:hooks_riverpod/hooks_riverpod.dart'; import 'package:immich_mobile/extensions/asyncvalue_extensions.dart'; import 'package:immich_mobile/extensions/build_context_extensions.dart'; import 'package:immich_mobile/extensions/maplibrecontroller_extensions.dart'; -import 'package:immich_mobile/widgets/map/map_theme_override.dart'; import 'package:immich_mobile/widgets/map/asset_marker_icon.dart'; +import 'package:immich_mobile/widgets/map/map_theme_override.dart'; import 'package:maplibre_gl/maplibre_gl.dart'; /// A non-interactive thumbnail of a map in the given coordinates with optional markers @@ -15,7 +14,7 @@ import 'package:maplibre_gl/maplibre_gl.dart'; /// User can provide either a [assetMarkerRemoteId] to display the asset's thumbnail or set /// [showMarkerPin] to true which would display a marker pin instead. If both are provided, /// [assetMarkerRemoteId] will take precedence -class MapThumbnail extends HookConsumerWidget { +class MapThumbnail extends HookWidget { final Function(Point, LatLng)? onTap; final LatLng centre; final String? assetMarkerRemoteId; @@ -44,7 +43,7 @@ class MapThumbnail extends HookConsumerWidget { }); @override - Widget build(BuildContext context, WidgetRef ref) { + Widget build(BuildContext context) { final controller = useRef(null); final styleLoaded = useState(false); diff --git a/mobile/lib/widgets/memories/memory_epilogue.dart b/mobile/lib/widgets/memories/memory_epilogue.dart index b866ed049a..0335b586ac 100644 --- a/mobile/lib/widgets/memories/memory_epilogue.dart +++ b/mobile/lib/widgets/memories/memory_epilogue.dart @@ -1,6 +1,6 @@ -import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; import 'package:immich_mobile/extensions/build_context_extensions.dart'; +import 'package:immich_mobile/generated/translations.g.dart'; class MemoryEpilogue extends StatefulWidget { final Function()? onStartOver; @@ -45,23 +45,23 @@ class _MemoryEpilogueState extends State with TickerProviderStat ), const SizedBox(height: 16.0), Text( - "memories_all_caught_up", + context.t.memories_all_caught_up, style: context.textTheme.headlineMedium?.copyWith(color: Colors.white), - ).tr(), + ), const SizedBox(height: 16.0), Text( - "memories_check_back_tomorrow", + context.t.memories_check_back_tomorrow, style: context.textTheme.bodyMedium?.copyWith(color: Colors.white), - ).tr(), + ), const SizedBox(height: 16.0), TextButton( onPressed: widget.onStartOver, child: Text( - "memories_start_over", + context.t.memories_start_over, style: context.textTheme.displayMedium?.copyWith( color: context.isDarkTheme ? context.colorScheme.primary : context.colorScheme.inversePrimary, ), - ).tr(), + ), ), ], ), @@ -85,9 +85,9 @@ class _MemoryEpilogueState extends State with TickerProviderStat ), ), Text( - "memories_swipe_to_close", + context.t.memories_swipe_to_close, style: context.textTheme.bodyMedium?.copyWith(color: Colors.white), - ).tr(), + ), ], ), ), diff --git a/mobile/lib/widgets/photo_view/photo_view_gallery.dart b/mobile/lib/widgets/photo_view/photo_view_gallery.dart index aa33d18403..3c41b2ca19 100644 --- a/mobile/lib/widgets/photo_view/photo_view_gallery.dart +++ b/mobile/lib/widgets/photo_view/photo_view_gallery.dart @@ -128,8 +128,8 @@ class PhotoViewGallery extends StatefulWidget { /// The builder must return a [PhotoViewGalleryPageOptions]. const PhotoViewGallery.builder({ super.key, - required this.itemCount, - required this.builder, + required int this.itemCount, + required PhotoViewGalleryBuilder this.builder, this.loadingBuilder, this.backgroundDecoration, this.wantKeepAlive = false, @@ -145,9 +145,7 @@ class PhotoViewGallery extends StatefulWidget { this.customSize, this.allowImplicitScrolling = false, this.enablePanAlways = false, - }) : pageOptions = null, - assert(itemCount != null), - assert(builder != null); + }) : pageOptions = null; /// A list of options to describe the items in the gallery final List? pageOptions; @@ -352,9 +350,9 @@ class _PhotoViewGalleryState extends State { /// The [maxScale], [minScale] and [initialScale] options may be [double] or a [PhotoViewComputedScale] constant /// class PhotoViewGalleryPageOptions { - PhotoViewGalleryPageOptions({ + const PhotoViewGalleryPageOptions({ this.key, - required this.imageProvider, + required ImageProvider this.imageProvider, this.heroAttributes, this.semanticLabel, this.minScale, @@ -379,8 +377,7 @@ class PhotoViewGalleryPageOptions { this.disableGestures, this.errorBuilder, }) : child = null, - childSize = null, - assert(imageProvider != null); + childSize = null; const PhotoViewGalleryPageOptions.customChild({ this.key, diff --git a/mobile/lib/widgets/photo_view/src/controller/photo_view_controller.dart b/mobile/lib/widgets/photo_view/src/controller/photo_view_controller.dart index b9475a9ee2..08c300e9ae 100644 --- a/mobile/lib/widgets/photo_view/src/controller/photo_view_controller.dart +++ b/mobile/lib/widgets/photo_view/src/controller/photo_view_controller.dart @@ -209,7 +209,7 @@ class PhotoViewController implements PhotoViewControllerBase } else if (scaleState == PhotoViewScaleState.zoomedIn) { animateRotation(controller.rotation, 0); if (_shouldAllowPanRotate()) { - animatePosition(controller.position, Offset.zero); + animatePosition(controller.position, clampPosition()); } } @@ -240,9 +242,8 @@ class PhotoViewCoreState extends State return; } _scaleAnimation = Tween(begin: from, end: to).animate(_scaleAnimationController); - _scaleAnimationController - ..value = 0.0 - ..fling(velocity: 0.4); + _scaleAnimationController.value = 0.0; + unawaited(_scaleAnimationController.fling(velocity: 0.4)); } void animatePosition(Offset from, Offset to) { @@ -250,9 +251,8 @@ class PhotoViewCoreState extends State return; } _positionAnimation = Tween(begin: from, end: to).animate(_positionAnimationController); - _positionAnimationController - ..value = 0.0 - ..fling(velocity: 0.4); + _positionAnimationController.value = 0.0; + unawaited(_positionAnimationController.fling(velocity: 0.4)); } void animateRotation(double from, double to) { @@ -260,9 +260,8 @@ class PhotoViewCoreState extends State return; } _rotationAnimation = Tween(begin: from, end: to).animate(_rotationAnimationController); - _rotationAnimationController - ..value = 0.0 - ..fling(velocity: 0.4); + _rotationAnimationController.value = 0.0; + unawaited(_rotationAnimationController.fling(velocity: 0.4)); } void onAnimationStatus(AnimationStatus status) { @@ -436,7 +435,7 @@ class PhotoViewCoreState extends State ? SizedBox( width: scaleBoundaries.childSize.width * scale, height: scaleBoundaries.childSize.height * scale, - child: widget.customChild!, + child: widget.customChild, ) : Image( key: widget.heroAttributes?.tag != null ? ObjectKey(widget.heroAttributes!.tag) : null, diff --git a/mobile/lib/widgets/photo_view/src/core/photo_view_gesture_detector.dart b/mobile/lib/widgets/photo_view/src/core/photo_view_gesture_detector.dart index 7b55e0e37e..8f408e043e 100644 --- a/mobile/lib/widgets/photo_view/src/core/photo_view_gesture_detector.dart +++ b/mobile/lib/widgets/photo_view/src/core/photo_view_gesture_detector.dart @@ -121,7 +121,6 @@ class PhotoViewGestureRecognizer extends ScaleGestureRecognizer { super.debugOwner, this.validateAxis, this.touchSlopFactor = 1, - PointerDeviceKind? kind, this.disableScaleGestures = false, }) : super(supportedDevices: null); final HitCornersDetector? hitDetector; diff --git a/mobile/lib/widgets/photo_view/src/photo_view_wrappers.dart b/mobile/lib/widgets/photo_view/src/photo_view_wrappers.dart index a9cfeb3a40..e55df57105 100644 --- a/mobile/lib/widgets/photo_view/src/photo_view_wrappers.dart +++ b/mobile/lib/widgets/photo_view/src/photo_view_wrappers.dart @@ -75,14 +75,13 @@ class ImageWrapper extends StatefulWidget { final int index; @override - createState() => _ImageWrapperState(); + State createState() => _ImageWrapperState(); } class _ImageWrapperState extends State { ImageStreamListener? _imageStreamListener; ImageStream? _imageStream; ImageChunkEvent? _loadingProgress; - ImageInfo? _imageInfo; bool _loading = true; Size? _imageSize; Object? _lastException; @@ -122,7 +121,7 @@ class _ImageWrapperState extends State { // retrieve image from the provider void _resolveImage() { - final ImageStream newStream = widget.imageProvider.resolve(const ImageConfiguration()); + final ImageStream newStream = widget.imageProvider.resolve(ImageConfiguration.empty); _updateSourceStream(newStream); } @@ -135,10 +134,9 @@ class _ImageWrapperState extends State { } void handleImageFrame(ImageInfo info, bool synchronousCall) { - setupCB() { + void setupCB() { _imageSize = Size(info.image.width.toDouble(), info.image.height.toDouble()); _loading = false; - _imageInfo = _imageInfo; _loadingProgress = null; _lastException = null; diff --git a/mobile/lib/widgets/photo_view/src/utils/ignorable_change_notifier.dart b/mobile/lib/widgets/photo_view/src/utils/ignorable_change_notifier.dart index 3ca31cb8f9..27aa256b14 100644 --- a/mobile/lib/widgets/photo_view/src/utils/ignorable_change_notifier.dart +++ b/mobile/lib/widgets/photo_view/src/utils/ignorable_change_notifier.dart @@ -28,12 +28,12 @@ class IgnorableChangeNotifier extends ChangeNotifier { return super.hasListeners || (_ignorableListeners?.isNotEmpty ?? false); } - void addIgnorableListener(listener) { + void addIgnorableListener(VoidCallback listener) { assert(_debugAssertNotDisposed()); _ignorableListeners!.add(listener); } - void removeIgnorableListener(listener) { + void removeIgnorableListener(VoidCallback listener) { assert(_debugAssertNotDisposed()); _ignorableListeners!.remove(listener); } diff --git a/mobile/lib/widgets/photo_view/src/utils/photo_view_utils.dart b/mobile/lib/widgets/photo_view/src/utils/photo_view_utils.dart index d120955250..c1ee1ab769 100644 --- a/mobile/lib/widgets/photo_view/src/utils/photo_view_utils.dart +++ b/mobile/lib/widgets/photo_view/src/utils/photo_view_utils.dart @@ -32,12 +32,10 @@ class ScaleBoundaries { double get minScale { assert(_minScale is double || _minScale is PhotoViewComputedScale); if (_minScale == PhotoViewComputedScale.contained) { - return _scaleForContained(outerSize, childSize) * - (_minScale as PhotoViewComputedScale).multiplier; // ignore: avoid_as + return _scaleForContained(outerSize, childSize) * (_minScale as PhotoViewComputedScale).multiplier; } if (_minScale == PhotoViewComputedScale.covered) { - return _scaleForCovering(outerSize, childSize) * - (_minScale as PhotoViewComputedScale).multiplier; // ignore: avoid_as + return _scaleForCovering(outerSize, childSize) * (_minScale as PhotoViewComputedScale).multiplier; } assert(_minScale >= 0.0); return _minScale; @@ -46,16 +44,16 @@ class ScaleBoundaries { double get maxScale { assert(_maxScale is double || _maxScale is PhotoViewComputedScale); if (_maxScale == PhotoViewComputedScale.contained) { - return (_scaleForContained(outerSize, childSize) * - (_maxScale as PhotoViewComputedScale) // ignore: avoid_as - .multiplier) - .clamp(minScale, double.infinity); + return (_scaleForContained(outerSize, childSize) * (_maxScale as PhotoViewComputedScale).multiplier).clamp( + minScale, + double.infinity, + ); } if (_maxScale == PhotoViewComputedScale.covered) { - return (_scaleForCovering(outerSize, childSize) * - (_maxScale as PhotoViewComputedScale) // ignore: avoid_as - .multiplier) - .clamp(minScale, double.infinity); + return (_scaleForCovering(outerSize, childSize) * (_maxScale as PhotoViewComputedScale).multiplier).clamp( + minScale, + double.infinity, + ); } return _maxScale.clamp(minScale, double.infinity); } @@ -63,14 +61,10 @@ class ScaleBoundaries { double get initialScale { assert(_initialScale is double || _initialScale is PhotoViewComputedScale); if (_initialScale == PhotoViewComputedScale.contained) { - return _scaleForContained(outerSize, childSize) * - (_initialScale as PhotoViewComputedScale) // ignore: avoid_as - .multiplier; + return _scaleForContained(outerSize, childSize) * (_initialScale as PhotoViewComputedScale).multiplier; } if (_initialScale == PhotoViewComputedScale.covered) { - return _scaleForCovering(outerSize, childSize) * - (_initialScale as PhotoViewComputedScale) // ignore: avoid_as - .multiplier; + return _scaleForCovering(outerSize, childSize) * (_initialScale as PhotoViewComputedScale).multiplier; } return _initialScale.clamp(minScale, maxScale); } diff --git a/mobile/lib/widgets/search/search_filter/camera_picker.dart b/mobile/lib/widgets/search/search_filter/camera_picker.dart index 6a025bdb69..aad5fda18f 100644 --- a/mobile/lib/widgets/search/search_filter/camera_picker.dart +++ b/mobile/lib/widgets/search/search_filter/camera_picker.dart @@ -1,8 +1,8 @@ -import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; import 'package:flutter_hooks/flutter_hooks.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; import 'package:immich_mobile/extensions/build_context_extensions.dart'; +import 'package:immich_mobile/generated/translations.g.dart'; import 'package:immich_mobile/models/search/search_filter.model.dart'; import 'package:immich_mobile/providers/search/search_filter.provider.dart'; import 'package:immich_mobile/widgets/search/search_filter/common/dropdown.dart'; @@ -21,7 +21,9 @@ class CameraPicker extends HookConsumerWidget { final selectedMake = useState(filter?.make); final selectedModel = useState(filter?.model); - final make = ref.watch(getSearchSuggestionsProvider(SearchSuggestionArgs(type: SearchSuggestionType.cameraMake))); + final make = ref.watch( + getSearchSuggestionsProvider(const SearchSuggestionArgs(type: SearchSuggestionType.cameraMake)), + ); final models = ref.watch( getSearchSuggestionsProvider( @@ -35,7 +37,7 @@ class CameraPicker extends HookConsumerWidget { AsyncData(:final value) => value.map((e) => DropdownMenuEntry(value: e, label: e)).toList(), _ => [], }, - label: const Text('make').tr(), + label: Text(context.t.make), controller: makeTextController, leadingIcon: const Icon(Icons.photo_camera_rounded), onSelected: (value) { @@ -54,7 +56,7 @@ class CameraPicker extends HookConsumerWidget { AsyncData(:final value) => value.map((e) => DropdownMenuEntry(value: e, label: e)).toList(), _ => [], }, - label: const Text('model').tr(), + label: Text(context.t.model), controller: modelTextController, leadingIcon: const Icon(Icons.camera), onSelected: (value) { diff --git a/mobile/lib/widgets/search/search_filter/display_option_picker.dart b/mobile/lib/widgets/search/search_filter/display_option_picker.dart index a64eab7b71..83ddc98107 100644 --- a/mobile/lib/widgets/search/search_filter/display_option_picker.dart +++ b/mobile/lib/widgets/search/search_filter/display_option_picker.dart @@ -1,6 +1,6 @@ -import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; import 'package:flutter_hooks/flutter_hooks.dart'; +import 'package:immich_mobile/generated/translations.g.dart'; import 'package:immich_mobile/models/search/search_filter.model.dart'; enum DisplayOption { notInAlbum, favorite, archive } @@ -23,7 +23,7 @@ class DisplayOptionPicker extends HookWidget { shrinkWrap: true, children: [ CheckboxListTile( - title: const Text('search_filter_display_option_not_in_album').tr(), + title: Text(context.t.search_filter_display_option_not_in_album), value: options.value[DisplayOption.notInAlbum], onChanged: (bool? value) { options.value = {...options.value, DisplayOption.notInAlbum: value!}; @@ -31,7 +31,7 @@ class DisplayOptionPicker extends HookWidget { }, ), CheckboxListTile( - title: const Text('favorite').tr(), + title: Text(context.t.favorite), value: options.value[DisplayOption.favorite], onChanged: (value) { options.value = {...options.value, DisplayOption.favorite: value!}; @@ -39,7 +39,7 @@ class DisplayOptionPicker extends HookWidget { }, ), CheckboxListTile( - title: const Text('archive').tr(), + title: Text(context.t.archive), value: options.value[DisplayOption.archive], onChanged: (value) { options.value = {...options.value, DisplayOption.archive: value!}; 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 dee42ec5a0..a74ea41c38 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 @@ -1,6 +1,6 @@ -import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; import 'package:immich_mobile/extensions/build_context_extensions.dart'; +import 'package:immich_mobile/generated/translations.g.dart'; class FilterBottomSheetScaffold extends StatelessWidget { const FilterBottomSheetScaffold({ @@ -20,7 +20,7 @@ class FilterBottomSheetScaffold extends StatelessWidget { @override Widget build(BuildContext context) { - buildChildWidget() { + Widget buildChildWidget() { if (expanded != null && expanded == true) { return Expanded(child: child); } @@ -46,7 +46,7 @@ class FilterBottomSheetScaffold extends StatelessWidget { onClear(); context.pop(); }, - child: const Text('clear').tr(), + child: Text(context.t.clear), ), if (onSearch != null) const SizedBox(width: 8), if (onSearch != null) @@ -56,7 +56,7 @@ class FilterBottomSheetScaffold extends StatelessWidget { onSearch!(); context.pop(); }, - child: const Text('search_filter_apply').tr(), + child: Text(context.t.search_filter_apply), ), ], ), diff --git a/mobile/lib/widgets/search/search_filter/location_picker.dart b/mobile/lib/widgets/search/search_filter/location_picker.dart index f521a50f35..ab35145a28 100644 --- a/mobile/lib/widgets/search/search_filter/location_picker.dart +++ b/mobile/lib/widgets/search/search_filter/location_picker.dart @@ -1,7 +1,7 @@ -import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; import 'package:flutter_hooks/flutter_hooks.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; +import 'package:immich_mobile/generated/translations.g.dart'; import 'package:immich_mobile/models/search/search_filter.model.dart'; import 'package:immich_mobile/providers/search/search_filter.provider.dart'; import 'package:immich_mobile/widgets/search/search_filter/common/dropdown.dart'; @@ -61,7 +61,7 @@ class LocationPicker extends HookConsumerWidget { AsyncData(:final value) => value.map((e) => DropdownMenuEntry(value: e, label: e)).toList(), _ => [], }, - label: const Text('country').tr(), + label: Text(context.t.country), controller: countryTextController, onSelected: (value) { if (value.toString() == selectedCountry.value) { @@ -80,7 +80,7 @@ class LocationPicker extends HookConsumerWidget { AsyncData(:final value) => value.map((e) => DropdownMenuEntry(value: e, label: e)).toList(), _ => [], }, - label: const Text('state').tr(), + label: Text(context.t.state), controller: stateTextController, onSelected: (value) { if (value.toString() == selectedState.value) { @@ -98,7 +98,7 @@ class LocationPicker extends HookConsumerWidget { AsyncData(:final value) => value.map((e) => DropdownMenuEntry(value: e, label: e)).toList(), _ => [], }, - label: const Text('city').tr(), + label: Text(context.t.city), controller: cityTextController, onSelected: (value) { selectedCity.value = value.toString(); diff --git a/mobile/lib/widgets/search/search_filter/media_type_picker.dart b/mobile/lib/widgets/search/search_filter/media_type_picker.dart index ac89de8190..dd0767a97a 100644 --- a/mobile/lib/widgets/search/search_filter/media_type_picker.dart +++ b/mobile/lib/widgets/search/search_filter/media_type_picker.dart @@ -1,7 +1,7 @@ -import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; import 'package:flutter_hooks/flutter_hooks.dart'; import 'package:immich_mobile/domain/models/asset/base_asset.model.dart'; +import 'package:immich_mobile/generated/translations.g.dart'; class MediaTypePicker extends HookWidget { const MediaTypePicker({super.key, required this.onSelect, this.filter}); @@ -21,9 +21,9 @@ class MediaTypePicker extends HookWidget { groupValue: selectedMediaType.value, child: Column( children: [ - RadioListTile(key: const Key("all"), title: const Text("all").tr(), value: AssetType.other), - RadioListTile(key: const Key("image"), title: const Text("image").tr(), value: AssetType.image), - RadioListTile(key: const Key("video"), title: const Text("video").tr(), value: AssetType.video), + RadioListTile(key: const Key("all"), title: Text(context.t.all), value: AssetType.other), + RadioListTile(key: const Key("image"), title: Text(context.t.image), value: AssetType.image), + RadioListTile(key: const Key("video"), title: Text(context.t.video), value: AssetType.video), ], ), ); diff --git a/mobile/lib/widgets/search/search_filter/people_picker.dart b/mobile/lib/widgets/search/search_filter/people_picker.dart index 24b625e95e..ee738265b2 100644 --- a/mobile/lib/widgets/search/search_filter/people_picker.dart +++ b/mobile/lib/widgets/search/search_filter/people_picker.dart @@ -1,110 +1,112 @@ -import 'package:flutter/material.dart'; -import 'package:easy_localization/easy_localization.dart'; -import 'package:flutter_hooks/flutter_hooks.dart'; -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:immich_mobile/domain/models/person.model.dart'; -import 'package:immich_mobile/extensions/asyncvalue_extensions.dart'; -import 'package:immich_mobile/extensions/build_context_extensions.dart'; -import 'package:immich_mobile/extensions/string_extensions.dart'; -import 'package:immich_mobile/pages/common/large_leading_tile.dart'; -import 'package:immich_mobile/presentation/widgets/images/remote_image_provider.dart'; -import 'package:immich_mobile/providers/search/people.provider.dart'; -import 'package:immich_mobile/utils/image_url_builder.dart'; -import 'package:immich_mobile/widgets/common/search_field.dart'; - -class PeoplePicker extends HookConsumerWidget { - const PeoplePicker({super.key, required this.onSelect, this.filter}); - - final Function(Set) onSelect; - final Set? filter; - - @override - Widget build(BuildContext context, WidgetRef ref) { - final formFocus = useFocusNode(); - final imageSize = 60.0; - final searchQuery = useState(''); - final people = ref.watch(getAllPeopleProvider); - final selectedPeople = useState>(filter ?? {}); - - return Column( - children: [ - Padding( - padding: const EdgeInsets.all(8), - child: SearchField( - focusNode: formFocus, - onChanged: (value) => searchQuery.value = value, - onTapOutside: (_) => formFocus.unfocus(), - filled: true, - hintText: 'filter_people'.tr(), - ), - ), - Padding( - padding: const EdgeInsets.only(left: 16.0, right: 16.0, bottom: 0), - child: Divider(color: context.colorScheme.surfaceContainerHighest, thickness: 1), - ), - Expanded( - child: people.widgetWhen( - onData: (people) { - final filtered = people - .where( - (person) => person.name.toLowerCase().removeDiacritics().contains( - searchQuery.value.toLowerCase().removeDiacritics(), - ), - ) - .toList(); - return ListView.builder( - shrinkWrap: true, - itemCount: filtered.length, - padding: const EdgeInsets.all(8), - itemBuilder: (context, index) { - final person = filtered[index]; - final isSelected = selectedPeople.value.contains(person); - - return Padding( - key: ValueKey(person.id), - padding: const EdgeInsets.only(bottom: 2.0), - child: LargeLeadingTile( - title: Text( - person.name, - style: context.textTheme.bodyLarge?.copyWith( - fontSize: 20, - fontWeight: FontWeight.w500, - color: isSelected ? context.colorScheme.onPrimary : context.colorScheme.onSurface, - ), - ), - leading: SizedBox( - height: imageSize, - child: Material( - shape: const CircleBorder(side: BorderSide.none), - elevation: 3, - child: CircleAvatar( - key: ValueKey(person.id), - maxRadius: imageSize / 2, - backgroundImage: RemoteImageProvider(url: getFaceThumbnailUrl(person.id)), - ), - ), - ), - onTap: () { - if (selectedPeople.value.contains(person)) { - selectedPeople.value.remove(person); - } else { - selectedPeople.value.add(person); - } - - selectedPeople.value = {...selectedPeople.value}; - onSelect(selectedPeople.value); - }, - selected: isSelected, - selectedTileColor: context.primaryColor, - tileColor: context.primaryColor.withAlpha(25), - ), - ); - }, - ); - }, - ), - ), - ], - ); - } -} +import 'package:flutter/material.dart'; +import 'package:flutter_hooks/flutter_hooks.dart'; +import 'package:hooks_riverpod/hooks_riverpod.dart'; +import 'package:immich_mobile/domain/models/person.model.dart'; +import 'package:immich_mobile/extensions/asyncvalue_extensions.dart'; +import 'package:immich_mobile/extensions/build_context_extensions.dart'; +import 'package:immich_mobile/extensions/string_extensions.dart'; +import 'package:immich_mobile/generated/translations.g.dart'; +import 'package:immich_mobile/pages/common/large_leading_tile.dart'; +import 'package:immich_mobile/presentation/widgets/images/remote_image_provider.dart'; +import 'package:immich_mobile/providers/infrastructure/people.provider.dart'; +import 'package:immich_mobile/utils/image_url_builder.dart'; +import 'package:immich_mobile/widgets/common/search_field.dart'; + +class PeoplePicker extends HookConsumerWidget { + const PeoplePicker({super.key, required this.onSelect, this.filter}); + + final Function(Set) onSelect; + final Set? filter; + + @override + Widget build(BuildContext context, WidgetRef ref) { + final formFocus = useFocusNode(); + const imageSize = 60.0; + final searchQuery = useState(''); + final people = ref.watch(getAllPeopleProvider); + final selectedPeople = useState>(filter ?? {}); + + return Column( + children: [ + Padding( + padding: const EdgeInsets.all(8), + child: SearchField( + focusNode: formFocus, + onChanged: (value) => searchQuery.value = value, + onTapOutside: (_) => formFocus.unfocus(), + filled: true, + hintText: context.t.filter_people, + ), + ), + Padding( + padding: const EdgeInsets.only(left: 16.0, right: 16.0, bottom: 0), + child: Divider(color: context.colorScheme.surfaceContainerHighest, thickness: 1), + ), + Expanded( + child: people.widgetWhen( + onData: (people) { + final filtered = people + .where( + (person) => person.name.toLowerCase().removeDiacritics().contains( + searchQuery.value.toLowerCase().removeDiacritics(), + ), + ) + .toList(); + return ListView.builder( + shrinkWrap: true, + itemCount: filtered.length, + padding: const EdgeInsets.all(8), + itemBuilder: (context, index) { + final person = filtered[index]; + final isSelected = selectedPeople.value.contains(person); + + return Padding( + key: ValueKey(person.id), + padding: const EdgeInsets.only(bottom: 2.0), + child: LargeLeadingTile( + title: Text( + person.name.nullIfEmpty ?? context.t.no_name, + style: context.textTheme.bodyLarge?.copyWith( + fontSize: 20, + fontWeight: FontWeight.w500, + color: isSelected ? context.colorScheme.onPrimary : context.colorScheme.onSurface, + ), + ), + leading: SizedBox( + height: imageSize, + child: Material( + shape: const CircleBorder(side: BorderSide.none), + elevation: 3, + child: CircleAvatar( + key: ValueKey(person.id), + maxRadius: imageSize / 2, + backgroundImage: RemoteImageProvider( + url: getFaceThumbnailUrl(person.id, updatedAt: person.updatedAt), + ), + ), + ), + ), + onTap: () { + if (selectedPeople.value.contains(person)) { + selectedPeople.value.remove(person); + } else { + selectedPeople.value.add(person); + } + + selectedPeople.value = {...selectedPeople.value}; + onSelect(selectedPeople.value); + }, + selected: isSelected, + selectedTileColor: context.primaryColor, + tileColor: context.primaryColor.withAlpha(25), + ), + ); + }, + ); + }, + ), + ), + ], + ); + } +} diff --git a/mobile/lib/widgets/search/search_filter/star_rating_picker.dart b/mobile/lib/widgets/search/search_filter/star_rating_picker.dart index 32d1ab5bd4..643f4f167c 100644 --- a/mobile/lib/widgets/search/search_filter/star_rating_picker.dart +++ b/mobile/lib/widgets/search/search_filter/star_rating_picker.dart @@ -1,6 +1,6 @@ import 'package:flutter/material.dart'; import 'package:flutter_hooks/flutter_hooks.dart'; -import 'package:immich_mobile/extensions/translate_extensions.dart'; +import 'package:immich_mobile/generated/translations.g.dart'; import 'package:immich_mobile/models/search/search_filter.model.dart'; import 'package:immich_mobile/utils/option.dart'; @@ -28,7 +28,7 @@ class StarRatingPicker extends HookWidget { 6, (index) => RadioListTile( key: Key("star_$index"), - title: Text('rating_count'.t(args: {'count': (index)})), + title: Text(context.t.rating_count(count: index)), value: index, ), ), diff --git a/mobile/lib/widgets/search/search_row_title.dart b/mobile/lib/widgets/search/search_row_title.dart index dc0a4ba6cb..cf4cc62c18 100644 --- a/mobile/lib/widgets/search/search_row_title.dart +++ b/mobile/lib/widgets/search/search_row_title.dart @@ -1,6 +1,6 @@ -import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; import 'package:immich_mobile/extensions/build_context_extensions.dart'; +import 'package:immich_mobile/generated/translations.g.dart'; class SearchRowTitle extends StatelessWidget { const SearchRowTitle({super.key, required this.onViewAllPressed, required this.title}); @@ -17,9 +17,9 @@ class SearchRowTitle extends StatelessWidget { TextButton( onPressed: onViewAllPressed, child: Text( - 'search_page_view_all_button', + context.t.search_page_view_all_button, style: context.textTheme.labelLarge?.copyWith(color: context.primaryColor), - ).tr(), + ), ), ], ); diff --git a/mobile/lib/widgets/search/thumbnail_with_info.dart b/mobile/lib/widgets/search/thumbnail_with_info.dart index 7ba8257c8a..d25a324860 100644 --- a/mobile/lib/widgets/search/thumbnail_with_info.dart +++ b/mobile/lib/widgets/search/thumbnail_with_info.dart @@ -22,7 +22,7 @@ class ThumbnailWithInfo extends StatelessWidget { @override Widget build(BuildContext context) { - var textAndIconColor = context.isDarkTheme ? Colors.grey[100] : Colors.grey[700]; + final textAndIconColor = context.isDarkTheme ? Colors.grey[100] : Colors.grey[700]; return ThumbnailWithInfoContainer( onTap: onTap, borderRadius: borderRadius, diff --git a/mobile/lib/widgets/settings/advanced_settings.dart b/mobile/lib/widgets/settings/advanced_settings.dart index 542a7cc5e2..44a992345f 100644 --- a/mobile/lib/widgets/settings/advanced_settings.dart +++ b/mobile/lib/widgets/settings/advanced_settings.dart @@ -1,15 +1,16 @@ +import 'dart:async'; import 'dart:io'; import 'package:device_info_plus/device_info_plus.dart'; -import 'package:easy_localization/easy_localization.dart'; 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/services/log.service.dart'; import 'package:immich_mobile/extensions/build_context_extensions.dart'; -import 'package:immich_mobile/providers/infrastructure/settings.provider.dart'; +import 'package:immich_mobile/generated/translations.g.dart'; import 'package:immich_mobile/providers/infrastructure/platform.provider.dart'; import 'package:immich_mobile/providers/infrastructure/readonly_mode.provider.dart'; +import 'package:immich_mobile/providers/infrastructure/settings.provider.dart'; import 'package:immich_mobile/repositories/permission.repository.dart'; import 'package:immich_mobile/services/app_settings.service.dart'; import 'package:immich_mobile/utils/bytes_units.dart'; @@ -31,35 +32,38 @@ class AdvancedSettings extends HookConsumerWidget { final manageLocalMediaAndroid = useAppSettingsState(AppSettingsEnum.manageLocalMediaAndroid); final isManageMediaSupported = useState(false); final manageMediaAndroidPermission = useState(false); - final levelId = useState(ref.read(appConfigProvider).logLevel.index); - final preferRemote = useState(ref.read(appConfigProvider).image.preferRemote); + final levelId = useState(ref.watch(appConfigProvider).logLevel.index); + final preferRemote = useState(ref.watch(appConfigProvider).image.preferRemote); useValueChanged( preferRemote.value, - (_, __) => ref.read(settingsProvider).write(.imagePreferRemote, preferRemote.value), + (_, _) => unawaited(ref.read(settingsProvider).write(.imagePreferRemote, preferRemote.value)), ); final readonlyModeEnabled = useAppSettingsState(AppSettingsEnum.readonlyModeEnabled); final logLevel = Level.LEVELS[levelId.value].name; - useValueChanged(levelId.value, (_, __) => LogService.I.setLogLevel(Level.LEVELS[levelId.value].toLogLevel())); + useValueChanged( + levelId.value, + (_, _) => unawaited(LogService.I.setLogLevel(Level.LEVELS[levelId.value].toLogLevel())), + ); Future checkAndroidVersion() async { if (Platform.isAndroid) { - DeviceInfoPlugin deviceInfo = DeviceInfoPlugin(); - AndroidDeviceInfo androidInfo = await deviceInfo.androidInfo; - int sdkVersion = androidInfo.version.sdkInt; + final DeviceInfoPlugin deviceInfo = DeviceInfoPlugin(); + final AndroidDeviceInfo androidInfo = await deviceInfo.androidInfo; + final int sdkVersion = androidInfo.version.sdkInt; return sdkVersion >= 31; } return false; } useEffect(() { - () async { + unawaited(() async { isManageMediaSupported.value = await checkAndroidVersion(); - if (isManageMediaSupported.value) { + if (isManageMediaSupported.value && context.mounted) { manageMediaAndroidPermission.value = await ref.read(permissionRepositoryProvider).hasManageMediaPermission(); } - }(); + }()); return null; }, []); @@ -67,8 +71,8 @@ class AdvancedSettings extends HookConsumerWidget { SettingsSwitchListTile( enabled: true, valueNotifier: advancedTroubleshooting, - title: "advanced_settings_troubleshooting_title".tr(), - subtitle: "advanced_settings_troubleshooting_subtitle".tr(), + title: context.t.advanced_settings_troubleshooting_title, + subtitle: context.t.advanced_settings_troubleshooting_subtitle, ), if (isManageMediaSupported.value) Column( @@ -76,8 +80,8 @@ class AdvancedSettings extends HookConsumerWidget { SettingsSwitchListTile( enabled: true, valueNotifier: manageLocalMediaAndroid, - title: "advanced_settings_sync_remote_deletions_title".tr(), - subtitle: "advanced_settings_sync_remote_deletions_subtitle".tr(), + title: context.t.advanced_settings_sync_remote_deletions_title, + subtitle: context.t.advanced_settings_sync_remote_deletions_subtitle, onChanged: (value) async { if (value) { final result = await ref.read(permissionRepositoryProvider).requestManageMediaPermission(); @@ -87,9 +91,9 @@ class AdvancedSettings extends HookConsumerWidget { }, ), SettingsActionTile( - title: "manage_media_access_title".tr(), - statusText: manageMediaAndroidPermission.value ? "allowed".tr() : "not_allowed".tr(), - subtitle: "manage_media_access_rationale".tr(), + title: context.t.manage_media_access_title, + statusText: manageMediaAndroidPermission.value ? context.t.allowed : context.t.not_allowed, + subtitle: context.t.manage_media_access_rationale, statusColor: manageLocalMediaAndroid.value && !manageMediaAndroidPermission.value ? const Color.fromARGB(255, 243, 188, 106) : null, @@ -101,7 +105,7 @@ class AdvancedSettings extends HookConsumerWidget { ], ), SettingsSliderListTile( - text: "advanced_settings_log_level_title".tr(namedArgs: {'level': logLevel}), + text: context.t.advanced_settings_log_level_title(level: logLevel), valueNotifier: levelId, maxValue: 8, minValue: 1, @@ -110,15 +114,15 @@ class AdvancedSettings extends HookConsumerWidget { ), SettingsSwitchListTile( valueNotifier: preferRemote, - title: "advanced_settings_prefer_remote_title".tr(), - subtitle: "advanced_settings_prefer_remote_subtitle".tr(), + title: context.t.advanced_settings_prefer_remote_title, + subtitle: context.t.advanced_settings_prefer_remote_subtitle, ), const CustomProxyHeaderSettings(), const SslClientCertSettings(), SettingsSwitchListTile( valueNotifier: readonlyModeEnabled, - title: "advanced_settings_readonly_mode_title".tr(), - subtitle: "advanced_settings_readonly_mode_subtitle".tr(), + title: context.t.advanced_settings_readonly_mode_title, + subtitle: context.t.advanced_settings_readonly_mode_subtitle, onChanged: (value) { readonlyModeEnabled.value = value; ref.read(readonlyModeProvider.notifier).setReadonlyMode(value); @@ -126,7 +130,7 @@ class AdvancedSettings extends HookConsumerWidget { SnackBar( duration: const Duration(seconds: 2), content: Text( - (value ? "readonly_mode_enabled" : "readonly_mode_disabled").tr(), + value ? context.t.readonly_mode_enabled : context.t.readonly_mode_disabled, style: context.textTheme.bodyLarge?.copyWith(color: context.primaryColor), ), ), @@ -134,18 +138,22 @@ class AdvancedSettings extends HookConsumerWidget { }, ), ListTile( - title: Text("advanced_settings_clear_image_cache".tr(), style: const TextStyle(fontWeight: FontWeight.w500)), + title: Text(context.t.advanced_settings_clear_image_cache, style: const TextStyle(fontWeight: FontWeight.w500)), leading: const Icon(Icons.playlist_remove_rounded), onTap: () async { final int clearedBytes; try { clearedBytes = await remoteImageApi.clearCache(); } catch (e) { + if (!context.mounted) { + return; + } + context.scaffoldMessenger.showSnackBar( SnackBar( duration: const Duration(seconds: 2), content: Text( - "advanced_settings_clear_image_cache_error".tr(), + context.t.advanced_settings_clear_image_cache_error, style: context.textTheme.bodyLarge?.copyWith(color: context.themeData.colorScheme.error), ), ), @@ -153,7 +161,7 @@ class AdvancedSettings extends HookConsumerWidget { return; } - if (clearedBytes < 0) { + if (clearedBytes < 0 || !context.mounted) { return; } @@ -163,7 +171,7 @@ class AdvancedSettings extends HookConsumerWidget { SnackBar( duration: const Duration(seconds: 2), content: Text( - "advanced_settings_clear_image_cache_success".tr(namedArgs: {'size': clearedMB}), + context.t.advanced_settings_clear_image_cache_success(size: clearedMB), style: context.textTheme.bodyLarge?.copyWith(color: context.primaryColor), ), ), diff --git a/mobile/lib/widgets/settings/asset_list_settings/asset_list_group_settings.dart b/mobile/lib/widgets/settings/asset_list_settings/asset_list_group_settings.dart index a5ced2ef5f..a68ad0fe5e 100644 --- a/mobile/lib/widgets/settings/asset_list_settings/asset_list_group_settings.dart +++ b/mobile/lib/widgets/settings/asset_list_settings/asset_list_group_settings.dart @@ -4,7 +4,7 @@ import 'package:flutter/material.dart'; import 'package:flutter_hooks/flutter_hooks.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; import 'package:immich_mobile/domain/models/timeline.model.dart'; -import 'package:immich_mobile/extensions/translate_extensions.dart'; +import 'package:immich_mobile/generated/translations.g.dart'; import 'package:immich_mobile/providers/app_settings.provider.dart'; import 'package:immich_mobile/providers/infrastructure/settings.provider.dart'; import 'package:immich_mobile/providers/infrastructure/timeline.provider.dart'; @@ -34,20 +34,14 @@ class GroupSettings extends HookConsumerWidget { return Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - SettingGroupTitle( - title: "asset_list_group_by_sub_title".t(context: context), - icon: Icons.group_work_outlined, - ), + SettingGroupTitle(title: context.t.asset_list_group_by_sub_title, icon: Icons.group_work_outlined), SettingsRadioListTile( groups: [ SettingsRadioGroup( - title: 'asset_list_layout_settings_group_by_month_day'.t(context: context), + title: context.t.asset_list_layout_settings_group_by_month_day, value: GroupAssetsBy.day, ), - SettingsRadioGroup( - title: 'month'.t(context: context), - value: GroupAssetsBy.month, - ), + SettingsRadioGroup(title: context.t.month, value: GroupAssetsBy.month), ], groupBy: groupBy.value, onRadioChanged: changeGroupValue, diff --git a/mobile/lib/widgets/settings/asset_list_settings/asset_list_layout_settings.dart b/mobile/lib/widgets/settings/asset_list_settings/asset_list_layout_settings.dart index f915df04f8..651cc43656 100644 --- a/mobile/lib/widgets/settings/asset_list_settings/asset_list_layout_settings.dart +++ b/mobile/lib/widgets/settings/asset_list_settings/asset_list_layout_settings.dart @@ -1,8 +1,9 @@ -import 'package:easy_localization/easy_localization.dart'; +import 'dart:async'; + import 'package:flutter/material.dart'; import 'package:flutter_hooks/flutter_hooks.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:immich_mobile/extensions/translate_extensions.dart'; +import 'package:immich_mobile/generated/translations.g.dart'; import 'package:immich_mobile/providers/app_settings.provider.dart'; import 'package:immich_mobile/providers/infrastructure/settings.provider.dart'; import 'package:immich_mobile/widgets/settings/setting_group_title.dart'; @@ -13,21 +14,18 @@ class LayoutSettings extends HookConsumerWidget { @override Widget build(BuildContext context, WidgetRef ref) { - final tilesPerRow = useState(ref.read(appConfigProvider.select((s) => s.timeline.tilesPerRow))); - useValueChanged(tilesPerRow.value, (_, __) { - ref.read(settingsProvider).write(.timelineTilesPerRow, tilesPerRow.value); + final tilesPerRow = useState(ref.watch(appConfigProvider.select((s) => s.timeline.tilesPerRow))); + useValueChanged(tilesPerRow.value, (_, _) { + unawaited(ref.read(settingsProvider).write(.timelineTilesPerRow, tilesPerRow.value)); }); return Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - SettingGroupTitle( - title: "asset_list_layout_sub_title".t(context: context), - icon: Icons.view_module_outlined, - ), + SettingGroupTitle(title: context.t.asset_list_layout_sub_title, icon: Icons.view_module_outlined), SettingsSliderListTile( valueNotifier: tilesPerRow, - text: 'theme_setting_asset_list_tiles_per_row_title'.tr(namedArgs: {'count': "${tilesPerRow.value}"}), + text: context.t.theme_setting_asset_list_tiles_per_row_title(count: tilesPerRow.value), label: "${tilesPerRow.value}", maxValue: 6, minValue: 2, diff --git a/mobile/lib/widgets/settings/asset_list_settings/asset_list_settings.dart b/mobile/lib/widgets/settings/asset_list_settings/asset_list_settings.dart index 3ac72d6612..08fe897c5f 100644 --- a/mobile/lib/widgets/settings/asset_list_settings/asset_list_settings.dart +++ b/mobile/lib/widgets/settings/asset_list_settings/asset_list_settings.dart @@ -1,7 +1,9 @@ -import 'package:easy_localization/easy_localization.dart'; +import 'dart:async'; + import 'package:flutter/material.dart'; import 'package:flutter_hooks/flutter_hooks.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; +import 'package:immich_mobile/generated/translations.g.dart'; import 'package:immich_mobile/providers/app_settings.provider.dart'; import 'package:immich_mobile/providers/infrastructure/settings.provider.dart'; import 'package:immich_mobile/widgets/settings/asset_list_settings/asset_list_group_settings.dart'; @@ -19,9 +21,9 @@ class AssetListSettings extends HookConsumerWidget { final assetListSetting = [ SettingsSwitchListTile( valueNotifier: storageIndicator, - title: 'theme_setting_asset_list_storage_indicator_title'.tr(), + title: context.t.theme_setting_asset_list_storage_indicator_title, onChanged: (value) { - ref.read(settingsProvider).write(.timelineStorageIndicator, value); + unawaited(ref.read(settingsProvider).write(.timelineStorageIndicator, value)); ref.invalidate(appSettingsServiceProvider); ref.invalidate(settingsProvider); }, diff --git a/mobile/lib/widgets/settings/asset_viewer_settings/asset_viewer_settings.dart b/mobile/lib/widgets/settings/asset_viewer_settings/asset_viewer_settings.dart index f3b9039b2b..25829327e0 100644 --- a/mobile/lib/widgets/settings/asset_viewer_settings/asset_viewer_settings.dart +++ b/mobile/lib/widgets/settings/asset_viewer_settings/asset_viewer_settings.dart @@ -1,8 +1,8 @@ import 'package:flutter/material.dart'; import 'package:immich_mobile/widgets/settings/asset_viewer_settings/image_viewer_quality_setting.dart'; import 'package:immich_mobile/widgets/settings/asset_viewer_settings/image_viewer_tap_to_navigate_setting.dart'; -import 'package:immich_mobile/widgets/settings/asset_viewer_settings/video_viewer_settings.dart'; import 'package:immich_mobile/widgets/settings/asset_viewer_settings/slideshow_settings.dart'; +import 'package:immich_mobile/widgets/settings/asset_viewer_settings/video_viewer_settings.dart'; import 'package:immich_mobile/widgets/settings/settings_sub_page_scaffold.dart'; class AssetViewerSettings extends StatelessWidget { diff --git a/mobile/lib/widgets/settings/asset_viewer_settings/image_viewer_quality_setting.dart b/mobile/lib/widgets/settings/asset_viewer_settings/image_viewer_quality_setting.dart index f65af6af9d..5b5917addc 100644 --- a/mobile/lib/widgets/settings/asset_viewer_settings/image_viewer_quality_setting.dart +++ b/mobile/lib/widgets/settings/asset_viewer_settings/image_viewer_quality_setting.dart @@ -1,7 +1,9 @@ +import 'dart:async'; + import 'package:flutter/material.dart'; import 'package:flutter_hooks/flutter_hooks.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:immich_mobile/extensions/translate_extensions.dart'; +import 'package:immich_mobile/generated/translations.g.dart'; import 'package:immich_mobile/providers/app_settings.provider.dart'; import 'package:immich_mobile/providers/infrastructure/settings.provider.dart'; import 'package:immich_mobile/widgets/settings/setting_group_title.dart'; @@ -12,23 +14,23 @@ class ImageViewerQualitySetting extends HookConsumerWidget { @override Widget build(BuildContext context, WidgetRef ref) { - final isOriginal = useState(ref.read(appConfigProvider).image.loadOriginal); - useValueChanged(isOriginal.value, (_, __) { - ref.read(settingsProvider).write(.imageLoadOriginal, isOriginal.value); + final isOriginal = useState(ref.watch(appConfigProvider).image.loadOriginal); + useValueChanged(isOriginal.value, (_, _) { + unawaited(ref.read(settingsProvider).write(.imageLoadOriginal, isOriginal.value)); }); return Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ SettingGroupTitle( - title: "photos".t(context: context), + title: context.t.photos, icon: Icons.image_outlined, - subtitle: "setting_image_viewer_help".t(context: context), + subtitle: context.t.setting_image_viewer_help, ), SettingsSwitchListTile( valueNotifier: isOriginal, - title: "setting_image_viewer_original_title".t(context: context), - subtitle: "setting_image_viewer_original_subtitle".t(context: context), + title: context.t.setting_image_viewer_original_title, + subtitle: context.t.setting_image_viewer_original_subtitle, onChanged: (_) => ref.invalidate(appSettingsServiceProvider), ), ], diff --git a/mobile/lib/widgets/settings/asset_viewer_settings/image_viewer_tap_to_navigate_setting.dart b/mobile/lib/widgets/settings/asset_viewer_settings/image_viewer_tap_to_navigate_setting.dart index 730521e3c1..f8dc6b0e1b 100644 --- a/mobile/lib/widgets/settings/asset_viewer_settings/image_viewer_tap_to_navigate_setting.dart +++ b/mobile/lib/widgets/settings/asset_viewer_settings/image_viewer_tap_to_navigate_setting.dart @@ -1,7 +1,9 @@ -import 'package:easy_localization/easy_localization.dart'; +import 'dart:async'; + import 'package:flutter/material.dart'; import 'package:flutter_hooks/flutter_hooks.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; +import 'package:immich_mobile/generated/translations.g.dart'; import 'package:immich_mobile/providers/infrastructure/settings.provider.dart'; import 'package:immich_mobile/widgets/settings/settings_sub_title.dart'; import 'package:immich_mobile/widgets/settings/settings_switch_list_tile.dart'; @@ -11,19 +13,19 @@ class ImageViewerTapToNavigateSetting extends HookConsumerWidget { @override Widget build(BuildContext context, WidgetRef ref) { - final tapToNavigate = useState(ref.read(appConfigProvider).viewer.tapToNavigate); - useValueChanged(tapToNavigate.value, (_, __) { - ref.read(settingsProvider).write(.viewerTapToNavigate, tapToNavigate.value); + final tapToNavigate = useState(ref.watch(appConfigProvider).viewer.tapToNavigate); + useValueChanged(tapToNavigate.value, (_, _) { + unawaited(ref.read(settingsProvider).write(.viewerTapToNavigate, tapToNavigate.value)); }); return Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - SettingsSubTitle(title: "setting_image_navigation_title".tr()), + SettingsSubTitle(title: context.t.setting_image_navigation_title), SettingsSwitchListTile( valueNotifier: tapToNavigate, - title: "setting_image_navigation_enable_title".tr(), - subtitle: "setting_image_navigation_enable_subtitle".tr(), + title: context.t.setting_image_navigation_enable_title, + subtitle: context.t.setting_image_navigation_enable_subtitle, ), ], ); diff --git a/mobile/lib/widgets/settings/asset_viewer_settings/slideshow_settings.dart b/mobile/lib/widgets/settings/asset_viewer_settings/slideshow_settings.dart index af361943ec..72d1685d33 100644 --- a/mobile/lib/widgets/settings/asset_viewer_settings/slideshow_settings.dart +++ b/mobile/lib/widgets/settings/asset_viewer_settings/slideshow_settings.dart @@ -1,8 +1,10 @@ +import 'dart:async'; + import 'package:flutter/material.dart'; import 'package:flutter_hooks/flutter_hooks.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; import 'package:immich_mobile/constants/enums.dart'; -import 'package:immich_mobile/extensions/translate_extensions.dart'; +import 'package:immich_mobile/generated/translations.g.dart'; import 'package:immich_mobile/providers/infrastructure/settings.provider.dart'; import 'package:immich_mobile/widgets/settings/setting_group_title.dart'; import 'package:immich_mobile/widgets/settings/settings_radio_list_tile.dart'; @@ -15,62 +17,50 @@ class SlideshowSettings extends HookConsumerWidget { @override Widget build(BuildContext context, WidgetRef ref) { - final slideshow = ref.read(appConfigProvider).slideshow; + final slideshow = ref.watch(appConfigProvider).slideshow; final useRepeat = useState(slideshow.repeat); final useDuration = useState(slideshow.duration); final useLook = useState(slideshow.look); final useDirection = useState(slideshow.direction); - useValueChanged(useRepeat.value, (_, __) { - ref.read(settingsProvider).write(.slideshowRepeat, useRepeat.value); + useValueChanged(useRepeat.value, (_, _) { + unawaited(ref.read(settingsProvider).write(.slideshowRepeat, useRepeat.value)); }); - useValueChanged(useDuration.value, (_, __) { - ref.read(settingsProvider).write(.slideshowDuration, useDuration.value); + useValueChanged(useDuration.value, (_, _) { + unawaited(ref.read(settingsProvider).write(.slideshowDuration, useDuration.value)); }); - useValueChanged(useLook.value, (_, __) { - ref.read(settingsProvider).write(.slideshowLook, useLook.value); + useValueChanged(useLook.value, (_, _) { + unawaited(ref.read(settingsProvider).write(.slideshowLook, useLook.value)); }); - useValueChanged(useDirection.value, (_, __) { - ref.read(settingsProvider).write(.slideshowDirection, useDirection.value); + useValueChanged(useDirection.value, (_, _) { + unawaited(ref.read(settingsProvider).write(.slideshowDirection, useDirection.value)); }); return Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - SettingGroupTitle( - title: 'slideshow'.t(context: context), - icon: Icons.slideshow_outlined, - ), + SettingGroupTitle(title: context.t.slideshow, icon: Icons.slideshow_outlined), SettingsSwitchListTile( valueNotifier: useRepeat, - title: "slideshow_repeat".t(context: context), - subtitle: "slideshow_repeat_description".t(context: context), + title: context.t.slideshow_repeat, + subtitle: context.t.slideshow_repeat_description, ), SettingsSliderListTile( valueNotifier: useDuration, - text: "duration".t(context: context), + text: context.t.duration, minValue: 5, noDivisons: 5, maxValue: 30, ), Padding( padding: const EdgeInsets.only(top: 20), - child: SettingsSubTitle(title: 'look'.t(context: context)), + child: SettingsSubTitle(title: context.t.look), ), SettingsRadioListTile( groups: [ - SettingsRadioGroup( - title: 'contain'.t(context: context), - value: SlideshowLook.contain, - ), - SettingsRadioGroup( - title: 'cover'.t(context: context), - value: SlideshowLook.cover, - ), - SettingsRadioGroup( - title: 'blurred_background'.t(context: context), - value: SlideshowLook.blurredBackground, - ), + SettingsRadioGroup(title: context.t.contain, value: SlideshowLook.contain), + SettingsRadioGroup(title: context.t.cover, value: SlideshowLook.cover), + SettingsRadioGroup(title: context.t.blurred_background, value: SlideshowLook.blurredBackground), ], groupBy: useLook.value, onRadioChanged: (value) { @@ -81,24 +71,15 @@ class SlideshowSettings extends HookConsumerWidget { ), Padding( padding: const EdgeInsets.only(top: 20), - child: SettingsSubTitle(title: 'direction'.t(context: context)), + child: SettingsSubTitle(title: context.t.direction), ), Padding( padding: const EdgeInsets.only(bottom: 32), child: SettingsRadioListTile( groups: [ - SettingsRadioGroup( - title: 'forward'.t(context: context), - value: SlideshowDirection.forward, - ), - SettingsRadioGroup( - title: 'backward'.t(context: context), - value: SlideshowDirection.backward, - ), - SettingsRadioGroup( - title: 'shuffle'.t(context: context), - value: SlideshowDirection.shuffle, - ), + SettingsRadioGroup(title: context.t.forward, value: SlideshowDirection.forward), + SettingsRadioGroup(title: context.t.backward, value: SlideshowDirection.backward), + SettingsRadioGroup(title: context.t.shuffle, value: SlideshowDirection.shuffle), ], groupBy: useDirection.value, onRadioChanged: (value) { diff --git a/mobile/lib/widgets/settings/asset_viewer_settings/video_viewer_settings.dart b/mobile/lib/widgets/settings/asset_viewer_settings/video_viewer_settings.dart index 81929d95b9..bb14d4b327 100644 --- a/mobile/lib/widgets/settings/asset_viewer_settings/video_viewer_settings.dart +++ b/mobile/lib/widgets/settings/asset_viewer_settings/video_viewer_settings.dart @@ -1,7 +1,9 @@ +import 'dart:async'; + import 'package:flutter/material.dart'; import 'package:flutter_hooks/flutter_hooks.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:immich_mobile/extensions/translate_extensions.dart'; +import 'package:immich_mobile/generated/translations.g.dart'; import 'package:immich_mobile/providers/infrastructure/settings.provider.dart'; import 'package:immich_mobile/widgets/settings/setting_group_title.dart'; import 'package:immich_mobile/widgets/settings/settings_switch_list_tile.dart'; @@ -11,42 +13,39 @@ class VideoViewerSettings extends HookConsumerWidget { @override Widget build(BuildContext context, WidgetRef ref) { - final viewer = ref.read(appConfigProvider).viewer; + final viewer = ref.watch(appConfigProvider).viewer; final useAutoPlayVideo = useState(viewer.autoPlayVideo); final useLoopVideo = useState(viewer.loopVideo); final useOriginalVideo = useState(viewer.loadOriginalVideo); - useValueChanged(useAutoPlayVideo.value, (_, __) { - ref.read(settingsProvider).write(.viewerAutoPlayVideo, useAutoPlayVideo.value); + useValueChanged(useAutoPlayVideo.value, (_, _) { + unawaited(ref.read(settingsProvider).write(.viewerAutoPlayVideo, useAutoPlayVideo.value)); }); - useValueChanged(useLoopVideo.value, (_, __) { - ref.read(settingsProvider).write(.viewerLoopVideo, useLoopVideo.value); + useValueChanged(useLoopVideo.value, (_, _) { + unawaited(ref.read(settingsProvider).write(.viewerLoopVideo, useLoopVideo.value)); }); - useValueChanged(useOriginalVideo.value, (_, __) { - ref.read(settingsProvider).write(.viewerLoadOriginalVideo, useOriginalVideo.value); + useValueChanged(useOriginalVideo.value, (_, _) { + unawaited(ref.read(settingsProvider).write(.viewerLoadOriginalVideo, useOriginalVideo.value)); }); return Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - SettingGroupTitle( - title: "videos".t(context: context), - icon: Icons.video_camera_back_outlined, - ), + SettingGroupTitle(title: context.t.videos, icon: Icons.video_camera_back_outlined), SettingsSwitchListTile( valueNotifier: useAutoPlayVideo, - title: "setting_video_viewer_auto_play_title".t(context: context), - subtitle: "setting_video_viewer_auto_play_subtitle".t(context: context), + title: context.t.setting_video_viewer_auto_play_title, + subtitle: context.t.setting_video_viewer_auto_play_subtitle, ), SettingsSwitchListTile( valueNotifier: useLoopVideo, - title: "setting_video_viewer_looping_title".t(context: context), - subtitle: "loop_videos_description".t(context: context), + title: context.t.setting_video_viewer_looping_title, + subtitle: context.t.loop_videos_description, ), SettingsSwitchListTile( valueNotifier: useOriginalVideo, - title: "setting_video_viewer_original_video_title".t(context: context), - subtitle: "setting_video_viewer_original_video_subtitle".t(context: context), + title: context.t.setting_video_viewer_original_video_title, + subtitle: context.t.setting_video_viewer_original_video_subtitle, ), ], ); diff --git a/mobile/lib/widgets/settings/backup_settings/drift_backup_settings.dart b/mobile/lib/widgets/settings/backup_settings/drift_backup_settings.dart index e5debb43fe..ae9ff87a91 100644 --- a/mobile/lib/widgets/settings/backup_settings/drift_backup_settings.dart +++ b/mobile/lib/widgets/settings/backup_settings/drift_backup_settings.dart @@ -1,6 +1,5 @@ import 'dart:async'; -import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; import 'package:immich_mobile/domain/models/album/local_album.model.dart'; @@ -9,7 +8,7 @@ import 'package:immich_mobile/domain/models/settings_key.dart'; import 'package:immich_mobile/domain/services/sync_linked_album.service.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/generated/translations.g.dart'; import 'package:immich_mobile/providers/background_sync.provider.dart'; import 'package:immich_mobile/providers/backup/backup_album.provider.dart'; import 'package:immich_mobile/providers/infrastructure/platform.provider.dart'; @@ -19,33 +18,24 @@ import 'package:immich_mobile/widgets/settings/setting_group_title.dart'; import 'package:immich_mobile/widgets/settings/setting_list_tile.dart'; import 'package:immich_mobile/widgets/settings/settings_sub_page_scaffold.dart'; -class DriftBackupSettings extends ConsumerWidget { +class DriftBackupSettings extends StatelessWidget { const DriftBackupSettings({super.key}); @override - Widget build(BuildContext context, WidgetRef ref) { + Widget build(BuildContext context) { return SettingsSubPageScaffold( settings: [ - SettingGroupTitle( - title: "network_requirements".t(context: context), - icon: Icons.cell_tower, - ), + SettingGroupTitle(title: context.t.network_requirements, icon: Icons.cell_tower), const _UseCellularForVideosButton(), const _UseCellularForPhotosButton(), if (CurrentPlatform.isAndroid) ...[ const Divider(), - SettingGroupTitle( - title: "background_options".t(context: context), - icon: Icons.charging_station_rounded, - ), + SettingGroupTitle(title: context.t.background_options, icon: Icons.charging_station_rounded), const _BackupOnlyWhenChargingButton(), const _BackupDelaySlider(), ], const Divider(), - SettingGroupTitle( - title: "backup_albums_sync".t(context: context), - icon: Icons.sync, - ), + SettingGroupTitle(title: context.t.backup_albums_sync, icon: Icons.sync), const _AlbumSyncActionButton(), ], ); @@ -68,8 +58,9 @@ class _AlbumSyncActionButtonState extends ConsumerState<_AlbumSyncActionButton> }); try { - await ref.read(backgroundSyncProvider).syncLinkedAlbum(); - await ref.read(backgroundSyncProvider).syncRemote(); + final backgroundSync = ref.read(backgroundSyncProvider); + await backgroundSync.syncLinkedAlbum(); + await backgroundSync.syncRemote(); } catch (_) { } finally { Future.delayed(const Duration(seconds: 1), () { @@ -107,8 +98,8 @@ class _AlbumSyncActionButtonState extends ConsumerState<_AlbumSyncActionButton> Column( children: [ SettingListTile( - title: "sync_albums".t(context: context), - subtitle: "sync_upload_album_setting_subtitle".t(context: context), + title: context.t.sync_albums, + subtitle: context.t.sync_upload_album_setting_subtitle, trailing: Switch( value: albumSyncEnable, onChanged: (bool newValue) async { @@ -130,8 +121,8 @@ class _AlbumSyncActionButtonState extends ConsumerState<_AlbumSyncActionButton> ? SettingListTile( onTap: _manualSyncAlbums, contentPadding: const EdgeInsets.only(left: 32, right: 16), - title: "organize_into_albums".t(context: context), - subtitle: "organize_into_albums_description".t(context: context), + title: context.t.organize_into_albums, + subtitle: context.t.organize_into_albums_description, trailing: isAlbumSyncInProgress ? const SizedBox( width: 32, @@ -160,15 +151,15 @@ class _AlbumSyncActionButtonState extends ConsumerState<_AlbumSyncActionButton> class _BackupSwitchTile extends ConsumerWidget { final SettingsKey metadataKey; final bool Function(AppConfig) selector; - final String titleKey; - final String subtitleKey; + final String title; + final String subtitle; final void Function(bool)? onChanged; const _BackupSwitchTile({ required this.metadataKey, required this.selector, - required this.titleKey, - required this.subtitleKey, + required this.title, + required this.subtitle, this.onChanged, }); @@ -178,8 +169,8 @@ class _BackupSwitchTile extends ConsumerWidget { return Padding( padding: const EdgeInsets.only(left: 8.0), child: SettingListTile( - title: titleKey.t(context: context), - subtitle: subtitleKey.t(context: context), + title: title, + subtitle: subtitle, trailing: Switch( value: value, onChanged: (bool newValue) async { @@ -200,8 +191,8 @@ class _UseCellularForVideosButton extends StatelessWidget { return _BackupSwitchTile( metadataKey: SettingsKey.backupUseCellularForVideos, selector: (c) => c.backup.useCellularForVideos, - titleKey: "videos", - subtitleKey: "network_requirement_videos_upload", + title: context.t.videos, + subtitle: context.t.network_requirement_videos_upload, ); } } @@ -214,8 +205,8 @@ class _UseCellularForPhotosButton extends StatelessWidget { return _BackupSwitchTile( metadataKey: SettingsKey.backupUseCellularForPhotos, selector: (c) => c.backup.useCellularForPhotos, - titleKey: "photos", - subtitleKey: "network_requirement_photos_upload", + title: context.t.photos, + subtitle: context.t.network_requirement_photos_upload, ); } } @@ -225,14 +216,14 @@ class _BackupOnlyWhenChargingButton extends ConsumerWidget { @override Widget build(BuildContext context, WidgetRef ref) { - final fgService = ref.read(backgroundWorkerFgServiceProvider); + final fgService = ref.watch(backgroundWorkerFgServiceProvider); return _BackupSwitchTile( metadataKey: SettingsKey.backupRequireCharging, selector: (c) => c.backup.requireCharging, - titleKey: "charging", - subtitleKey: "charging_requirement_mobile_backup", + title: context.t.charging, + subtitle: context.t.charging_requirement_mobile_backup, onChanged: (value) { - fgService.configure(requireCharging: value); + unawaited(fgService.configure(requireCharging: value)); }, ); } @@ -255,11 +246,11 @@ class _BackupDelaySlider extends ConsumerWidget { _ => 600, }; - static String formatBackupDelaySliderValue(int v) => switch (v) { - 0 => 'setting_notifications_notify_seconds'.tr(namedArgs: {'count': '5'}), - 1 => 'setting_notifications_notify_seconds'.tr(namedArgs: {'count': '30'}), - 2 => 'setting_notifications_notify_minutes'.tr(namedArgs: {'count': '2'}), - _ => 'setting_notifications_notify_minutes'.tr(namedArgs: {'count': '10'}), + static String formatBackupDelaySliderValue(BuildContext context, int v) => switch (v) { + 0 => context.t.setting_notifications_notify_seconds(count: 5), + 1 => context.t.setting_notifications_notify_seconds(count: 30), + 2 => context.t.setting_notifications_notify_minutes(count: 2), + _ => context.t.setting_notifications_notify_minutes(count: 10), }; @override @@ -272,8 +263,8 @@ class _BackupDelaySlider extends ConsumerWidget { Padding( padding: const EdgeInsets.only(left: 24.0, top: 8.0), child: Text( - 'backup_controller_page_background_delay'.tr( - namedArgs: {'duration': formatBackupDelaySliderValue(currentValue)}, + context.t.backup_controller_page_background_delay( + duration: formatBackupDelaySliderValue(context, currentValue), ), style: context.textTheme.bodyLarge?.copyWith(fontWeight: FontWeight.w500), ), @@ -291,7 +282,7 @@ class _BackupDelaySlider extends ConsumerWidget { max: 3.0, min: 0.0, divisions: 3, - label: formatBackupDelaySliderValue(currentValue), + label: formatBackupDelaySliderValue(context, currentValue), ), ], ); 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 92787077a1..69d86b4c36 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,9 +3,9 @@ import 'dart:io'; import 'package:flutter/material.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; +import 'package:immich_mobile/domain/models/server_capability.model.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/generated/translations.g.dart'; import 'package:immich_mobile/providers/app_settings.provider.dart'; import 'package:immich_mobile/providers/background_sync.provider.dart'; @@ -39,12 +39,13 @@ class SyncStatusAndActions extends HookConsumerWidget { final documentsDir = await getApplicationDocumentsDirectory(); final dbFile = File(path.join(documentsDir.path, 'immich.sqlite')); + // ignore: avoid_slow_async_io if (!await dbFile.exists()) { - if (context.mounted) { - context.scaffoldMessenger.showSnackBar( - SnackBar(content: Text("Database file not found".t(context: context))), - ); + if (!context.mounted) { + return; } + + context.scaffoldMessenger.showSnackBar(const SnackBar(content: Text('Database file not found'))); return; } @@ -53,6 +54,10 @@ class SyncStatusAndActions extends HookConsumerWidget { await dbFile.copy(exportFile.path); + if (!context.mounted) { + return; + } + final size = MediaQuery.of(context).size; await Share.shareXFiles( [XFile(exportFile.path)], @@ -61,22 +66,22 @@ class SyncStatusAndActions extends HookConsumerWidget { ); Future.delayed(const Duration(seconds: 30), () async { + // ignore: avoid_slow_async_io if (await exportFile.exists()) { await exportFile.delete(); } }); + if (!context.mounted) { + return; + } - if (context.mounted) { - context.scaffoldMessenger.showSnackBar( - SnackBar(content: Text("Database exported successfully".t(context: context))), - ); - } + context.scaffoldMessenger.showSnackBar(const SnackBar(content: Text('Database exported successfully'))); } catch (e) { - if (context.mounted) { - context.scaffoldMessenger.showSnackBar( - SnackBar(content: Text("Failed to export database: $e".t(context: context))), - ); + if (!context.mounted) { + return; } + + context.scaffoldMessenger.showSnackBar(SnackBar(content: Text('Failed to export database: $e'))); } } @@ -96,6 +101,10 @@ class SyncStatusAndActions extends HookConsumerWidget { TextButton( onPressed: () async { await ref.read(driftProvider).reset(); + if (!context.mounted) { + return; + } + context.pop(); unawaited( showDialog( @@ -123,65 +132,59 @@ class SyncStatusAndActions extends HookConsumerWidget { const _SyncStatsCounts(), const Divider(height: 10), const SizedBox(height: 16), - SettingGroupTitle(title: "jobs".t(context: context)), + SettingGroupTitle(title: context.t.jobs), SettingListTile( - title: "sync_local".t(context: context), - subtitle: "tap_to_run_job".t(context: context), + title: context.t.sync_local, + subtitle: context.t.tap_to_run_job, leading: const Icon(Icons.sync), trailing: _SyncStatusIcon(status: ref.watch(syncStatusProvider).localSyncStatus), onTap: () { - ref.read(backgroundSyncProvider).syncLocal(full: true); + unawaited(ref.read(backgroundSyncProvider).syncLocal(full: true)); }, ), SettingListTile( - title: "sync_remote".t(context: context), - subtitle: "tap_to_run_job".t(context: context), + title: context.t.sync_remote, + subtitle: context.t.tap_to_run_job, leading: const Icon(Icons.cloud_sync), trailing: _SyncStatusIcon(status: ref.watch(syncStatusProvider).remoteSyncStatus), onTap: () { - ref.read(backgroundSyncProvider).syncRemote(); + unawaited(ref.read(backgroundSyncProvider).syncRemote()); }, ), - if (CurrentPlatform.isIOS && serverVersion.isAtLeast(major: 2, minor: 5)) + if (CurrentPlatform.isIOS && serverVersion.supports(.cloudIdMetadata)) SettingListTile( - title: "Sync Cloud Ids".t(context: context), + title: 'Sync Cloud Ids', leading: const Icon(Icons.cloud_circle_rounded), - subtitle: "tap_to_run_job".t(context: context), + subtitle: context.t.tap_to_run_job, trailing: _SyncStatusIcon(status: ref.watch(syncStatusProvider).cloudIdSyncStatus), - onTap: ref.read(backgroundSyncProvider).syncCloudIds, + onTap: ref.watch(backgroundSyncProvider).syncCloudIds, ), SettingListTile( - title: "hash_asset".t(context: context), + title: context.t.hash_asset, leading: const Icon(Icons.tag), - subtitle: "tap_to_run_job".t(context: context), + subtitle: context.t.tap_to_run_job, trailing: _SyncStatusIcon(status: ref.watch(syncStatusProvider).hashJobStatus), onTap: () { - ref.read(backgroundSyncProvider).hashAssets(); + unawaited(ref.read(backgroundSyncProvider).hashAssets()); }, ), const Divider(height: 1), const SizedBox(height: 16), - SettingGroupTitle(title: "actions".t(context: context)), + SettingGroupTitle(title: context.t.actions), ListTile( - title: Text( - "clear_file_cache".t(context: context), - style: const TextStyle(fontWeight: FontWeight.w500), - ), + title: Text(context.t.clear_file_cache, style: const TextStyle(fontWeight: FontWeight.w500)), leading: const Icon(Icons.playlist_remove_rounded), onTap: clearFileCache, ), ListTile( - title: Text( - "export_database".t(context: context), - style: const TextStyle(fontWeight: FontWeight.w500), - ), - subtitle: Text("export_database_description".t(context: context)), + title: Text(context.t.export_database, style: const TextStyle(fontWeight: FontWeight.w500)), + subtitle: Text(context.t.export_database_description), leading: const Icon(Icons.download), onTap: exportDatabase, ), ListTile( title: Text( - "reset_sqlite".t(context: context), + context.t.reset_sqlite, style: TextStyle(color: context.colorScheme.error, fontWeight: FontWeight.w500), ), leading: Icon(Icons.settings_backup_restore_rounded, color: context.colorScheme.error), @@ -267,7 +270,7 @@ class _SyncStatsCounts extends ConsumerWidget { mainAxisAlignment: MainAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start, children: [ - SettingGroupTitle(title: "assets".t(context: context)), + SettingGroupTitle(title: context.t.assets), Padding( padding: const EdgeInsets.fromLTRB(16, 0, 16, 16), // 1. Wrap in IntrinsicHeight @@ -280,24 +283,16 @@ class _SyncStatsCounts extends ConsumerWidget { spacing: 8.0, children: [ Expanded( - child: EntityCountTile( - label: "local".t(context: context), - count: localAssetCount, - icon: Icons.smartphone, - ), + child: EntityCountTile(label: context.t.local, count: localAssetCount, icon: Icons.smartphone), ), Expanded( - child: EntityCountTile( - label: "remote".t(context: context), - count: remoteAssetCount, - icon: Icons.cloud, - ), + child: EntityCountTile(label: context.t.remote, count: remoteAssetCount, icon: Icons.cloud), ), ], ), ), ), - SettingGroupTitle(title: "albums".t(context: context)), + SettingGroupTitle(title: context.t.albums), Padding( padding: const EdgeInsets.fromLTRB(16, 0, 16, 16), child: IntrinsicHeight( @@ -308,24 +303,16 @@ class _SyncStatsCounts extends ConsumerWidget { spacing: 8.0, children: [ Expanded( - child: EntityCountTile( - label: "local".t(context: context), - count: localAlbumCount, - icon: Icons.smartphone, - ), + child: EntityCountTile(label: context.t.local, count: localAlbumCount, icon: Icons.smartphone), ), Expanded( - child: EntityCountTile( - label: "remote".t(context: context), - count: remoteAlbumCount, - icon: Icons.cloud, - ), + child: EntityCountTile(label: context.t.remote, count: remoteAlbumCount, icon: Icons.cloud), ), ], ), ), ), - SettingGroupTitle(title: "other".t(context: context)), + SettingGroupTitle(title: context.t.other), Padding( padding: const EdgeInsets.fromLTRB(16, 0, 16, 16), child: IntrinsicHeight( @@ -336,18 +323,10 @@ class _SyncStatsCounts extends ConsumerWidget { spacing: 8.0, children: [ Expanded( - child: EntityCountTile( - label: "memories".t(context: context), - count: memoryCount, - icon: Icons.calendar_today, - ), + child: EntityCountTile(label: context.t.memories, count: memoryCount, icon: Icons.calendar_today), ), Expanded( - child: EntityCountTile( - label: "hashed_assets".t(context: context), - count: localHashedCount, - icon: Icons.tag, - ), + child: EntityCountTile(label: context.t.hashed_assets, count: localHashedCount, icon: Icons.tag), ), ], ), @@ -356,7 +335,7 @@ class _SyncStatsCounts extends ConsumerWidget { // To be removed once the experimental feature is stable if (CurrentPlatform.isAndroid && appSettingsService.getSetting(AppSettingsEnum.manageLocalMediaAndroid)) ...[ - SettingGroupTitle(title: "trash".t(context: context)), + SettingGroupTitle(title: context.t.trash), Consumer( builder: (context, ref, _) { final counts = ref.watch(trashedAssetsCountProvider); @@ -372,17 +351,13 @@ class _SyncStatsCounts extends ConsumerWidget { children: [ Expanded( child: EntityCountTile( - label: "local".t(context: context), + label: context.t.local, count: c.total, icon: Icons.delete_outline, ), ), Expanded( - child: EntityCountTile( - label: "hashed_assets".t(context: context), - count: c.hashed, - icon: Icons.tag, - ), + child: EntityCountTile(label: context.t.hashed_assets, count: c.hashed, icon: Icons.tag), ), ], ), diff --git a/mobile/lib/widgets/settings/free_up_space_settings.dart b/mobile/lib/widgets/settings/free_up_space_settings.dart index da14933997..07dfe95b21 100644 --- a/mobile/lib/widgets/settings/free_up_space_settings.dart +++ b/mobile/lib/widgets/settings/free_up_space_settings.dart @@ -1,5 +1,6 @@ +import 'dart:async'; + 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/enums.dart'; @@ -7,12 +8,13 @@ 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/build_context_extensions.dart'; import 'package:immich_mobile/extensions/platform_extensions.dart'; -import 'package:immich_mobile/extensions/translate_extensions.dart'; +import 'package:immich_mobile/generated/translations.g.dart'; import 'package:immich_mobile/providers/cleanup.provider.dart'; import 'package:immich_mobile/providers/haptic_feedback.provider.dart'; import 'package:immich_mobile/providers/infrastructure/album.provider.dart'; import 'package:immich_mobile/routing/router.dart'; import 'package:immich_mobile/utils/bytes_units.dart'; +import 'package:intl/intl.dart'; import 'package:wakelock_plus/wakelock_plus.dart'; class FreeUpSpaceSettings extends ConsumerStatefulWidget { @@ -30,18 +32,18 @@ class _FreeUpSpaceSettingsState extends ConsumerState { @override void initState() { super.initState(); - WakelockPlus.enable(); + unawaited(WakelockPlus.enable()); WidgetsBinding.instance.addPostFrameCallback((_) { - _initializeAlbumDefaults(); + unawaited(_initializeAlbumDefaults()); }); } Future _initializeAlbumDefaults() async { + final notifier = ref.read(cleanupProvider.notifier); final albums = await ref.read(localAlbumProvider.future); final existingAlbumIds = albums.map((a) => a.id).toSet(); final albumsWithNames = albums.map((a) => (a.id, a.name)).toList(); - final notifier = ref.read(cleanupProvider.notifier); notifier.applyDefaultAlbumSelections(albumsWithNames); notifier.cleanupStaleAlbumIds(existingAlbumIds); } @@ -68,7 +70,7 @@ class _FreeUpSpaceSettingsState extends ConsumerState { void _goToScanStep() { ref.read(hapticFeedbackProvider.notifier).mediumImpact(); setState(() => _currentStep = CleanupStep.scan); - _scanAssets(); + unawaited(_scanAssets()); } void _setPresetDate(int daysAgo) { @@ -103,7 +105,7 @@ class _FreeUpSpaceSettingsState extends ConsumerState { lastDate: DateTime.now(), ); - if (picked != null) { + if (picked != null && context.mounted) { ref.read(cleanupProvider.notifier).setSelectedDate(picked); setState(() => _hasScanned = false); } @@ -120,6 +122,10 @@ class _FreeUpSpaceSettingsState extends ConsumerState { ref.read(hapticFeedbackProvider.notifier).mediumImpact(); await ref.read(cleanupProvider.notifier).scanAssets(); + if (!mounted) { + return; + } + final state = ref.read(cleanupProvider); setState(() { @@ -144,7 +150,7 @@ class _FreeUpSpaceSettingsState extends ConsumerState { _DeleteConfirmationDialog(assetCount: state.assetsToDelete.length, cutoffDate: state.selectedDate!), ); - if (confirmed != true) { + if (confirmed != true || !context.mounted) { return; } @@ -169,13 +175,13 @@ class _FreeUpSpaceSettingsState extends ConsumerState { void _showAssetsPreview(List assets) { ref.read(hapticFeedbackProvider.notifier).mediumImpact(); - context.pushRoute(CleanupPreviewRoute(assets: assets)); + unawaited(context.pushRoute(CleanupPreviewRoute(assets: assets))); } @override - dispose() { + void dispose() { super.dispose(); - WakelockPlus.disable(); + unawaited(WakelockPlus.disable()); } @override @@ -230,21 +236,21 @@ class _FreeUpSpaceSettingsState extends ConsumerState { final parts = []; if (state.keepMediaType == AssetKeepType.photosOnly) { - parts.add('all_photos'.t(context: context)); + parts.add(context.t.all_photos); } else if (state.keepMediaType == AssetKeepType.videosOnly) { - parts.add('all_videos'.t(context: context)); + parts.add(context.t.all_videos); } if (state.keepFavorites) { - parts.add('favorites'.t(context: context)); + parts.add(context.t.favorites); } if (state.keepAlbumIds.isNotEmpty) { - parts.add('keep_albums_count'.t(context: context, args: {'count': state.keepAlbumIds.length.toString()})); + parts.add(context.t.keep_albums_count(count: state.keepAlbumIds.length)); } if (parts.isEmpty) { - return 'none'.t(context: context); + return context.t.none; } return parts.join(', '); @@ -268,7 +274,7 @@ class _FreeUpSpaceSettingsState extends ConsumerState { borderRadius: const BorderRadius.all(Radius.circular(12)), border: Border.all(color: context.primaryColor.withValues(alpha: 0.25)), ), - child: Text('free_up_space_description'.t(context: context), style: context.textTheme.bodyMedium), + child: Text(context.t.free_up_space_description, style: context.textTheme.bodyMedium), ), ), @@ -301,7 +307,7 @@ class _FreeUpSpaceSettingsState extends ConsumerState { color: hasKeepSettings ? context.colorScheme.primary : context.colorScheme.onSurfaceVariant, ), title: Text( - 'keep_on_device'.t(context: context), + context.t.keep_on_device, style: context.textTheme.titleSmall?.copyWith( fontWeight: FontWeight.w600, color: hasKeepSettings ? context.colorScheme.primary : null, @@ -309,8 +315,8 @@ class _FreeUpSpaceSettingsState extends ConsumerState { ), subtitle: Text( hasKeepSettings - ? 'keeping'.t(context: context, args: {'items': getKeepSettingsSummary()}) - : 'keep_on_device_hint'.t(context: context), + ? context.t.keeping(items: getKeepSettingsSummary()) + : context.t.keep_on_device_hint, style: context.textTheme.bodySmall?.copyWith( color: hasKeepSettings ? context.colorScheme.primary : context.colorScheme.onSurfaceVariant, ), @@ -321,12 +327,12 @@ class _FreeUpSpaceSettingsState extends ConsumerState { child: Column( crossAxisAlignment: CrossAxisAlignment.stretch, children: [ - Text('keep_description'.t(context: context), style: subtitleStyle), + Text(context.t.keep_description, style: subtitleStyle), const SizedBox(height: 4), SwitchListTile( contentPadding: EdgeInsets.zero, title: Text( - 'keep_favorites'.t(context: context), + context.t.keep_favorites, style: context.textTheme.bodyLarge!.copyWith(fontWeight: FontWeight.w500, height: 1.5), ), @@ -346,7 +352,7 @@ class _FreeUpSpaceSettingsState extends ConsumerState { ), const SizedBox(height: 16), Text( - 'always_keep'.t(context: context), + context.t.always_keep, style: context.textTheme.bodyLarge!.copyWith(fontWeight: FontWeight.w500, height: 1.5), ), const SizedBox(height: 4), @@ -356,12 +362,12 @@ class _FreeUpSpaceSettingsState extends ConsumerState { const ButtonSegment(value: AssetKeepType.none, label: Text('—')), ButtonSegment( value: AssetKeepType.photosOnly, - label: Text('photos'.t(context: context)), + label: Text(context.t.photos), icon: const Icon(Icons.photo), ), ButtonSegment( value: AssetKeepType.videosOnly, - label: Text('videos'.t(context: context)), + label: Text(context.t.videos), icon: const Icon(Icons.videocam), ), ], @@ -375,8 +381,8 @@ class _FreeUpSpaceSettingsState extends ConsumerState { const SizedBox(height: 8), Text( state.keepMediaType == AssetKeepType.photosOnly - ? 'always_keep_photos_hint'.t(context: context) - : 'always_keep_videos_hint'.t(context: context), + ? context.t.always_keep_photos_hint + : context.t.always_keep_videos_hint, style: context.textTheme.bodySmall?.copyWith( color: context.colorScheme.onSurfaceVariant, ), @@ -401,13 +407,13 @@ class _FreeUpSpaceSettingsState extends ConsumerState { setState(() => _currentStep = CleanupStep.values[step]); } }, - controlsBuilder: (_, __) => const SizedBox.shrink(), + controlsBuilder: (_, _) => const SizedBox.shrink(), steps: [ // Step 1: Select Cutoff Date Step( stepStyle: styleForState(step1State), title: Text( - 'select_cutoff_date'.t(context: context), + context.t.select_cutoff_date, style: context.textTheme.titleMedium?.copyWith( fontWeight: FontWeight.w600, color: step1State == StepState.complete @@ -427,7 +433,7 @@ class _FreeUpSpaceSettingsState extends ConsumerState { content: Column( crossAxisAlignment: CrossAxisAlignment.stretch, children: [ - Text('cutoff_date_description'.t(context: context), style: subtitleStyle), + Text(context.t.cutoff_date_description, style: subtitleStyle), const SizedBox(height: 16), GridView.count( shrinkWrap: true, @@ -439,39 +445,39 @@ class _FreeUpSpaceSettingsState extends ConsumerState { children: [ _DatePresetCard( value: '30', - unit: 'cutoff_day'.t(context: context, args: {'count': '30'}), + unit: context.t.cutoff_day(count: 30), onTap: () => _setPresetDate(30), isSelected: _isPresetSelected(30), ), _DatePresetCard( value: '60', - unit: 'cutoff_day'.t(context: context, args: {'count': '60'}), + unit: context.t.cutoff_day(count: 60), onTap: () => _setPresetDate(60), isSelected: _isPresetSelected(60), ), _DatePresetCard( value: '90', - unit: 'cutoff_day'.t(context: context, args: {'count': '90'}), + unit: context.t.cutoff_day(count: 90), onTap: () => _setPresetDate(90), isSelected: _isPresetSelected(90), ), _DatePresetCard( value: '1', - unit: 'cutoff_year'.t(context: context, args: {'count': '1'}), + unit: context.t.cutoff_year(count: 1), onTap: () => _setPresetDate(365), isSelected: _isPresetSelected(365), ), _DatePresetCard( value: '2', - unit: 'cutoff_year'.t(context: context, args: {'count': '2'}), + unit: context.t.cutoff_year(count: 2), onTap: () => _setPresetDate(730), isSelected: _isPresetSelected(730), ), _DatePresetCard( value: '3', - unit: 'cutoff_year'.t(context: context, args: {'count': '3'}), + unit: context.t.cutoff_year(count: 3), onTap: () => _setPresetDate(1095), isSelected: _isPresetSelected(1095), ), @@ -481,14 +487,14 @@ class _FreeUpSpaceSettingsState extends ConsumerState { OutlinedButton.icon( onPressed: _selectDate, icon: const Icon(Icons.calendar_today), - label: Text('custom_date'.t(context: context)), + label: Text(context.t.custom_date), style: OutlinedButton.styleFrom(minimumSize: const Size(double.infinity, 48)), ), const SizedBox(height: 16), ElevatedButton.icon( onPressed: hasDate ? _goToScanStep : null, icon: const Icon(Icons.arrow_forward), - label: Text('continue'.t(context: context)), + label: Text(context.t.continue$), style: ElevatedButton.styleFrom(minimumSize: const Size(double.infinity, 48)), ), ], @@ -501,7 +507,7 @@ class _FreeUpSpaceSettingsState extends ConsumerState { Step( stepStyle: styleForState(step2State), title: Text( - 'scan'.t(context: context), + context.t.scan, style: context.textTheme.titleMedium?.copyWith( fontWeight: FontWeight.w600, color: step2State == StepState.complete @@ -514,17 +520,11 @@ class _FreeUpSpaceSettingsState extends ConsumerState { subtitle: _hasScanned ? Text( state.totalBytes > 0 - ? 'cleanup_found_assets_with_size'.t( - context: context, - args: { - 'count': state.assetsToDelete.length.toString(), - 'size': formatBytes(state.totalBytes), - }, + ? context.t.cleanup_found_assets_with_size( + count: state.assetsToDelete.length, + size: formatBytes(state.totalBytes), ) - : 'cleanup_found_assets'.t( - context: context, - args: {'count': state.assetsToDelete.length.toString()}, - ), + : context.t.cleanup_found_assets(count: state.assetsToDelete.length), style: context.textTheme.bodyMedium?.copyWith( color: state.assetsToDelete.isNotEmpty ? context.colorScheme.primary @@ -535,7 +535,7 @@ class _FreeUpSpaceSettingsState extends ConsumerState { : null, content: Column( children: [ - Text('cleanup_step3_description'.t(context: context), style: subtitleStyle), + Text(context.t.cleanup_step3_description, style: subtitleStyle), if (CurrentPlatform.isIOS) ...[ const SizedBox(height: 12), Container( @@ -550,7 +550,7 @@ class _FreeUpSpaceSettingsState extends ConsumerState { const SizedBox(width: 12), Expanded( child: Text( - 'cleanup_icloud_shared_albums_excluded'.t(context: context), + context.t.cleanup_icloud_shared_albums_excluded, style: context.textTheme.labelLarge, ), ), @@ -571,7 +571,7 @@ class _FreeUpSpaceSettingsState extends ConsumerState { : ElevatedButton.icon( onPressed: state.isScanning ? null : _scanAssets, icon: const Icon(Icons.search), - label: Text(_hasScanned ? 'rescan'.t(context: context) : 'scan'.t(context: context)), + label: Text(_hasScanned ? context.t.rescan : context.t.scan), style: ElevatedButton.styleFrom(minimumSize: const Size(double.infinity, 48)), ), if (_hasScanned && state.assetsToDelete.isEmpty) ...[ @@ -587,10 +587,7 @@ class _FreeUpSpaceSettingsState extends ConsumerState { const Icon(Icons.info, color: Colors.orange), const SizedBox(width: 12), Expanded( - child: Text( - 'cleanup_no_assets_found'.t(context: context), - style: context.textTheme.bodyMedium, - ), + child: Text(context.t.cleanup_no_assets_found, style: context.textTheme.bodyMedium), ), ], ), @@ -606,7 +603,7 @@ class _FreeUpSpaceSettingsState extends ConsumerState { Step( stepStyle: styleForState(step3State, isDestructive: true), title: Text( - 'move_to_device_trash'.t(context: context), + context.t.move_to_device_trash, style: context.textTheme.titleMedium?.copyWith( fontWeight: FontWeight.w600, color: step3State == StepState.disabled @@ -629,12 +626,9 @@ class _FreeUpSpaceSettingsState extends ConsumerState { crossAxisAlignment: CrossAxisAlignment.start, children: [ Text( - 'cleanup_step4_summary'.t( - context: context, - args: { - 'count': state.assetsToDelete.length.toString(), - 'date': DateFormat.yMMMd().format(state.selectedDate!), - }, + context.t.cleanup_step4_summary( + count: state.assetsToDelete.length, + date: DateFormat.yMMMd().format(state.selectedDate!), ), style: context.textTheme.labelLarge?.copyWith(fontSize: 15), ), @@ -646,7 +640,7 @@ class _FreeUpSpaceSettingsState extends ConsumerState { OutlinedButton.icon( onPressed: () => _showAssetsPreview(state.assetsToDelete), icon: const Icon(Icons.preview), - label: Text('preview'.t(context: context)), + label: Text(context.t.preview), style: OutlinedButton.styleFrom(minimumSize: const Size(double.infinity, 48)), ), const SizedBox(height: 12), @@ -659,11 +653,7 @@ class _FreeUpSpaceSettingsState extends ConsumerState { child: CircularProgressIndicator(strokeWidth: 2, color: Colors.white), ) : const Icon(Icons.delete_forever), - label: Text( - state.isDeleting - ? 'cleanup_deleting'.t(context: context) - : 'move_to_device_trash'.t(context: context), - ), + label: Text(state.isDeleting ? context.t.cleanup_deleting : context.t.move_to_device_trash), style: ElevatedButton.styleFrom( backgroundColor: context.colorScheme.error, foregroundColor: context.colorScheme.onError, @@ -695,26 +685,20 @@ class _DeleteConfirmationDialog extends StatelessWidget { @override Widget build(BuildContext context) { return AlertDialog( - title: Text('cleanup_confirm_prompt_title'.t(context: context)), + title: Text(context.t.cleanup_confirm_prompt_title), content: Text( - 'cleanup_confirm_description'.t( - context: context, - args: {'count': assetCount.toString(), 'date': DateFormat.yMMMd().format(cutoffDate)}, - ), + context.t.cleanup_confirm_description(count: assetCount, date: DateFormat.yMMMd().format(cutoffDate)), style: context.textTheme.labelLarge?.copyWith(fontSize: 15), ), actions: [ - TextButton( - onPressed: () => ContextHelper(context).pop(false), - child: Text('cancel'.t(context: context)), - ), + TextButton(onPressed: () => ContextHelper(context).pop(false), child: Text(context.t.cancel)), ElevatedButton( onPressed: () => ContextHelper(context).pop(true), style: ElevatedButton.styleFrom( backgroundColor: context.colorScheme.error, foregroundColor: context.colorScheme.onError, ), - child: Text('confirm'.t(context: context)), + child: Text(context.t.confirm), ), ], ); @@ -730,29 +714,24 @@ class _DeleteSuccessDialog extends StatelessWidget { Widget build(BuildContext context) { return AlertDialog( icon: Icon(Icons.check_circle, color: context.colorScheme.primary, size: 48), - title: Text('success'.t(context: context)), + title: Text(context.t.success), content: Column( mainAxisSize: MainAxisSize.min, children: [ Text( - 'cleanup_deleted_assets'.t(context: context, args: {'count': deletedCount.toString()}), + context.t.cleanup_deleted_assets(count: deletedCount), style: context.textTheme.labelLarge?.copyWith(fontSize: 16), textAlign: TextAlign.center, ), const SizedBox(height: 16), Text( - 'cleanup_trash_hint'.t(context: context), + context.t.cleanup_trash_hint, style: context.textTheme.labelLarge?.copyWith(fontSize: 16, color: context.primaryColor), textAlign: TextAlign.center, ), ], ), - actions: [ - ElevatedButton( - onPressed: () => ContextHelper(context).pop(), - child: Text('done'.t(context: context)), - ), - ], + actions: [ElevatedButton(onPressed: () => ContextHelper(context).pop(), child: Text(context.t.done))], ); } } @@ -773,7 +752,7 @@ class _DatePresetCard extends StatelessWidget { child: InkWell( onTap: onTap, borderRadius: const BorderRadius.all(Radius.circular(12)), - child: Container( + child: DecoratedBox( decoration: BoxDecoration( borderRadius: const BorderRadius.all(Radius.circular(12)), border: Border.all(color: isSelected ? context.colorScheme.primary : Colors.transparent, width: 1), @@ -818,7 +797,7 @@ class _KeepAlbumsSection extends ConsumerWidget { crossAxisAlignment: CrossAxisAlignment.start, children: [ Text( - 'keep_albums'.t(context: context), + context.t.keep_albums, style: context.textTheme.bodyLarge!.copyWith(fontWeight: FontWeight.w500, height: 1.5), ), @@ -828,13 +807,13 @@ class _KeepAlbumsSection extends ConsumerWidget { child: Padding(padding: EdgeInsets.all(16.0), child: CircularProgressIndicator(strokeWidth: 2)), ), error: (error, stack) => Text( - 'error_loading_albums'.t(context: context), + context.t.error_loading_albums, style: context.textTheme.bodyMedium?.copyWith(color: context.colorScheme.error), ), data: (albums) { if (albums.isEmpty) { return Text( - 'no_albums_found'.t(context: context), + context.t.no_albums_found, style: context.textTheme.bodyMedium?.copyWith( color: context.colorScheme.onSurface.withValues(alpha: 0.6), ), @@ -864,7 +843,7 @@ class _KeepAlbumsSection extends ConsumerWidget { if (albumIds.isNotEmpty) ...[ const SizedBox(height: 8), Text( - 'keep_albums_count'.t(context: context, args: {'count': albumIds.length.toString()}), + context.t.keep_albums_count(count: albumIds.length), style: context.textTheme.bodySmall?.copyWith( color: context.colorScheme.primary, fontWeight: FontWeight.w500, diff --git a/mobile/lib/widgets/settings/language_settings.dart b/mobile/lib/widgets/settings/language_settings.dart index 2482801923..61f2088979 100644 --- a/mobile/lib/widgets/settings/language_settings.dart +++ b/mobile/lib/widgets/settings/language_settings.dart @@ -3,14 +3,13 @@ import 'dart:async'; import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; import 'package:flutter_hooks/flutter_hooks.dart'; -import 'package:hooks_riverpod/hooks_riverpod.dart'; import 'package:immich_mobile/constants/locales.dart'; import 'package:immich_mobile/extensions/build_context_extensions.dart'; -import 'package:immich_mobile/extensions/translate_extensions.dart'; +import 'package:immich_mobile/generated/translations.g.dart'; import 'package:immich_mobile/services/localization.service.dart'; import 'package:immich_mobile/widgets/common/search_field.dart'; -class LanguageSettings extends HookConsumerWidget { +class LanguageSettings extends HookWidget { const LanguageSettings({super.key}); Future _applyLanguageChange( @@ -21,6 +20,10 @@ class LanguageSettings extends HookConsumerWidget { isLoading.value = true; await Future.delayed(const Duration(milliseconds: 500)); try { + if (!context.mounted) { + return; + } + await context.setLocale(selectedLocale.value); await loadTranslations(); } finally { @@ -29,7 +32,7 @@ class LanguageSettings extends HookConsumerWidget { } @override - Widget build(BuildContext context, WidgetRef ref) { + Widget build(BuildContext context) { final localeEntries = useMemoized(() => locales.entries.toList(), const []); final currentLocale = context.locale; final filteredLocaleEntries = useState>>(localeEntries); @@ -149,7 +152,7 @@ class _LanguageSearchBar extends StatelessWidget { child: SearchField( autofocus: false, contentPadding: const EdgeInsets.all(12), - hintText: 'language_search_hint'.t(context: context), + hintText: context.t.language_search_hint, prefixIcon: const Icon(Icons.search_rounded), suffixIcon: controller.text.isNotEmpty ? IconButton(icon: const Icon(Icons.clear_rounded), onPressed: onClear) @@ -176,12 +179,12 @@ class _LanguageNotFound extends StatelessWidget { Icon(Icons.search_off_rounded, size: 64, color: context.colorScheme.onSurface.withValues(alpha: 0.4)), const SizedBox(height: 8), Text( - 'language_no_results_title'.t(context: context), + context.t.language_no_results_title, style: context.textTheme.titleMedium?.copyWith(color: context.colorScheme.onSurface), ), const SizedBox(height: 4), Text( - 'language_no_results_subtitle'.t(context: context), + context.t.language_no_results_subtitle, style: context.textTheme.bodyMedium?.copyWith(color: context.colorScheme.onSurface.withValues(alpha: 0.8)), ), ], @@ -211,7 +214,7 @@ class _LanguageApplyButton extends StatelessWidget { child: isLoading ? const SizedBox.square(dimension: 24, child: CircularProgressIndicator(strokeWidth: 2)) : Text( - 'setting_languages_apply'.t(context: context), + context.t.setting_languages_apply, style: const TextStyle(fontWeight: FontWeight.w600, fontSize: 16.0), ), ), diff --git a/mobile/lib/widgets/settings/networking_settings/endpoint_input.dart b/mobile/lib/widgets/settings/networking_settings/endpoint_input.dart index e8310caed4..349b32287b 100644 --- a/mobile/lib/widgets/settings/networking_settings/endpoint_input.dart +++ b/mobile/lib/widgets/settings/networking_settings/endpoint_input.dart @@ -1,6 +1,8 @@ -import 'package:easy_localization/easy_localization.dart'; +import 'dart:async'; + import 'package:flutter/material.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; +import 'package:immich_mobile/generated/translations.g.dart'; import 'package:immich_mobile/models/auth/auxilary_endpoint.model.dart'; import 'package:immich_mobile/providers/auth.provider.dart'; import 'package:immich_mobile/widgets/settings/networking_settings/networking_settings.dart'; @@ -53,7 +55,7 @@ class EndpointInputState extends ConsumerState { void _onOutFocus() { if (!focusNode.hasFocus && isInputValid) { - validateAuxilaryServerUrl(); + unawaited(validateAuxilaryServerUrl()); } } @@ -76,11 +78,11 @@ class EndpointInputState extends ConsumerState { try { if (url == null || url.isEmpty || !Uri.parse(url).isAbsolute) { isInputValid = false; - return 'validate_endpoint_error'.tr(); + return context.t.validate_endpoint_error; } } catch (_) { isInputValid = false; - return 'validate_endpoint_error'.tr(); + return context.t.validate_endpoint_error; } isInputValid = true; diff --git a/mobile/lib/widgets/settings/networking_settings/external_network_preference.dart b/mobile/lib/widgets/settings/networking_settings/external_network_preference.dart index 492a13de93..63b094b440 100644 --- a/mobile/lib/widgets/settings/networking_settings/external_network_preference.dart +++ b/mobile/lib/widgets/settings/networking_settings/external_network_preference.dart @@ -1,10 +1,13 @@ +import 'dart:async'; + import 'package:flutter/material.dart'; import 'package:flutter_hooks/flutter_hooks.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; import 'package:immich_mobile/domain/models/settings_key.dart'; import 'package:immich_mobile/extensions/build_context_extensions.dart'; -import 'package:immich_mobile/extensions/translate_extensions.dart'; +import 'package:immich_mobile/generated/translations.g.dart'; import 'package:immich_mobile/models/auth/auxilary_endpoint.model.dart'; +import 'package:immich_mobile/providers/api.provider.dart'; import 'package:immich_mobile/providers/infrastructure/settings.provider.dart'; import 'package:immich_mobile/widgets/settings/networking_settings/endpoint_input.dart'; @@ -18,7 +21,7 @@ class ExternalNetworkPreference extends HookConsumerWidget { final entries = useState([const AuxilaryEndpoint(url: '', status: AuxCheckStatus.unknown)]); final canSave = useState(false); - saveEndpointList() { + Future saveEndpointList() { canSave.value = entries.value.every((e) => e.status == AuxCheckStatus.valid); final urls = entries.value @@ -26,27 +29,30 @@ class ExternalNetworkPreference extends HookConsumerWidget { .map((e) => e.url) .toList(); - ref.read(settingsProvider).write(SettingsKey.networkExternalEndpointList, urls); + return ref.read(settingsProvider).write(SettingsKey.networkExternalEndpointList, urls); } - updateValidationStatus(String url, int index, AuxCheckStatus status) { + Future updateValidationStatus(String url, int index, AuxCheckStatus status) async { entries.value[index] = entries.value[index].copyWith(url: url, status: status); - saveEndpointList(); + await saveEndpointList(); + if (status == AuxCheckStatus.valid && context.mounted) { + await ref.read(apiServiceProvider).updateHeaders(); + } } - handleReorder(int oldIndex, int newIndex) { + void handleReorder(int oldIndex, int newIndex) { final entry = entries.value.removeAt(oldIndex); entries.value.insert(newIndex, entry); entries.value = [...entries.value]; - saveEndpointList(); + unawaited(saveEndpointList()); } - handleDismiss(int index) { + void handleDismiss(int index) { entries.value = [...entries.value..removeAt(index)]; - saveEndpointList(); + unawaited(saveEndpointList()); } Widget proxyDecorator(Widget child, int _, Animation animation) { @@ -97,7 +103,7 @@ class ExternalNetworkPreference extends HookConsumerWidget { children: [ Padding( padding: const EdgeInsets.symmetric(vertical: 4.0, horizontal: 24), - child: Text("external_network_sheet_info".t(context: context), style: context.textTheme.bodyMedium), + child: Text(context.t.external_network_sheet_info, style: context.textTheme.bodyMedium), ), const SizedBox(height: 4), Divider(color: context.colorScheme.surfaceContainerHighest), @@ -129,7 +135,7 @@ class ExternalNetworkPreference extends HookConsumerWidget { height: 48, child: OutlinedButton.icon( icon: const Icon(Icons.add), - label: Text('add_endpoint'.t(context: context)), + label: Text(context.t.add_endpoint), onPressed: enabled ? () { entries.value = [ diff --git a/mobile/lib/widgets/settings/networking_settings/local_network_preference.dart b/mobile/lib/widgets/settings/networking_settings/local_network_preference.dart index 1d2b5eea0f..3c4fa73543 100644 --- a/mobile/lib/widgets/settings/networking_settings/local_network_preference.dart +++ b/mobile/lib/widgets/settings/networking_settings/local_network_preference.dart @@ -1,11 +1,10 @@ import 'dart:async'; -import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; import 'package:flutter_hooks/flutter_hooks.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; import 'package:immich_mobile/extensions/build_context_extensions.dart'; -import 'package:immich_mobile/extensions/translate_extensions.dart'; +import 'package:immich_mobile/generated/translations.g.dart'; import 'package:immich_mobile/providers/auth.provider.dart'; import 'package:immich_mobile/providers/network.provider.dart'; import 'package:immich_ui/immich_ui.dart'; @@ -34,9 +33,12 @@ class LocalNetworkPreference extends HookConsumerWidget { actions: [ TextButton( onPressed: () => Navigator.pop(context), - child: Text('cancel'.tr().toUpperCase(), style: const TextStyle(color: Colors.red)), + child: Text(context.t.cancel.toUpperCase(), style: const TextStyle(color: Colors.red)), + ), + TextButton( + onPressed: () => Navigator.pop(context, controller.text), + child: Text(context.t.save.toUpperCase()), ), - TextButton(onPressed: () => Navigator.pop(context, controller.text), child: Text('save'.tr().toUpperCase())), ], ), ); @@ -62,28 +64,33 @@ class LocalNetworkPreference extends HookConsumerWidget { return null; }, []); - saveWifiName(String wifiName) { + Future saveWifiName(String wifiName) { wifiNameText.value = wifiName; return ref.read(authProvider.notifier).saveWifiName(wifiName); } - saveLocalEndpoint(String url) { + Future saveLocalEndpoint(String url) { localEndpointText.value = url; return ref.read(authProvider.notifier).saveLocalEndpoint(url); } - handleEditWifiName() async { - final wifiName = await _showEditDialog(context, "wifi_name".tr(), "your_wifi_name".tr(), wifiNameText.value); + Future handleEditWifiName() async { + final wifiName = await _showEditDialog( + context, + context.t.wifi_name, + context.t.your_wifi_name, + wifiNameText.value, + ); if (wifiName != null) { await saveWifiName(wifiName); } } - handleEditServerEndpoint() async { + Future handleEditServerEndpoint() async { final localEndpoint = await _showEditDialog( context, - "server_endpoint".tr(), + context.t.server_endpoint, "http://local-ip:2283", localEndpointText.value, isUrlField: true, @@ -94,14 +101,17 @@ class LocalNetworkPreference extends HookConsumerWidget { } } - autofillCurrentNetwork() async { + Future autofillCurrentNetwork() async { final wifiName = await ref.read(networkProvider.notifier).getWifiName(); + if (!context.mounted) { + return; + } if (wifiName == null) { context.showSnackBar( SnackBar( content: Text( - "get_wifiname_error".tr(), + context.t.get_wifiname_error, style: context.textTheme.bodyMedium?.copyWith( fontWeight: FontWeight.w500, color: context.colorScheme.onSecondary, @@ -146,7 +156,7 @@ class LocalNetworkPreference extends HookConsumerWidget { children: [ Padding( padding: const EdgeInsets.symmetric(vertical: 4.0, horizontal: 24), - child: Text("local_network_sheet_info".tr(), style: context.textTheme.bodyMedium), + child: Text(context.t.local_network_sheet_info, style: context.textTheme.bodyMedium), ), const SizedBox(height: 4), Divider(color: context.colorScheme.surfaceContainerHighest), @@ -154,9 +164,9 @@ class LocalNetworkPreference extends HookConsumerWidget { enabled: enabled, contentPadding: const EdgeInsets.only(left: 24, right: 8), leading: const Icon(Icons.wifi_rounded), - title: Text("wifi_name".tr()), + title: Text(context.t.wifi_name), subtitle: wifiNameText.value.isEmpty - ? Text("enter_wifi_name".tr()) + ? Text(context.t.enter_wifi_name) : Text( wifiNameText.value, style: context.textTheme.labelLarge?.copyWith( @@ -174,7 +184,7 @@ class LocalNetworkPreference extends HookConsumerWidget { enabled: enabled, contentPadding: const EdgeInsets.only(left: 24, right: 8), leading: const Icon(Icons.lan_rounded), - title: Text("server_endpoint".t(context: context)), + title: Text(context.t.server_endpoint), subtitle: localEndpointText.value.isEmpty ? const Text("http://local-ip:2283") : Text( @@ -196,7 +206,7 @@ class LocalNetworkPreference extends HookConsumerWidget { height: 48, child: OutlinedButton.icon( icon: const Icon(Icons.wifi_find_rounded), - label: Text('use_current_connection'.t(context: context)), + label: Text(context.t.use_current_connection), onPressed: enabled ? autofillCurrentNetwork : null, ), ), diff --git a/mobile/lib/widgets/settings/networking_settings/networking_settings.dart b/mobile/lib/widgets/settings/networking_settings/networking_settings.dart index 7e6e169de7..80b0b78fc2 100644 --- a/mobile/lib/widgets/settings/networking_settings/networking_settings.dart +++ b/mobile/lib/widgets/settings/networking_settings/networking_settings.dart @@ -1,9 +1,10 @@ -import 'package:easy_localization/easy_localization.dart'; +import 'dart:async'; + import 'package:flutter/material.dart'; import 'package:flutter_hooks/flutter_hooks.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; import 'package:immich_mobile/extensions/build_context_extensions.dart'; -import 'package:immich_mobile/extensions/translate_extensions.dart'; +import 'package:immich_mobile/generated/translations.g.dart'; import 'package:immich_mobile/models/auth/auxilary_endpoint.model.dart'; import 'package:immich_mobile/providers/infrastructure/settings.provider.dart'; import 'package:immich_mobile/providers/network.provider.dart'; @@ -19,9 +20,9 @@ class NetworkingSettings extends HookConsumerWidget { @override Widget build(BuildContext context, WidgetRef ref) { final currentEndpoint = getServerUrl(); - final featureEnabled = useState(ref.read(appConfigProvider).network.autoEndpointSwitching); - useValueChanged(featureEnabled.value, (_, __) { - ref.read(settingsProvider).write(.networkAutoEndpointSwitching, featureEnabled.value); + final featureEnabled = useState(ref.watch(appConfigProvider).network.autoEndpointSwitching); + useValueChanged(featureEnabled.value, (_, _) { + unawaited(ref.read(settingsProvider).write(.networkAutoEndpointSwitching, featureEnabled.value)); }); Future checkWifiReadPermission() async { @@ -37,16 +38,20 @@ class NetworkingSettings extends HookConsumerWidget { context: context, builder: (context) { return AlertDialog( - title: Text("location_permission".tr()), - content: Text("location_permission_content".tr()), + title: Text(context.t.location_permission), + content: Text(context.t.location_permission_content), actions: [ TextButton( onPressed: () async { final isGrant = await ref.read(networkProvider.notifier).requestWifiReadPermission(); + if (!context.mounted) { + return; + } + Navigator.pop(context, isGrant); }, - child: Text("grant_permission".tr()), + child: Text(context.t.grant_permission), ), ], ); @@ -54,21 +59,29 @@ class NetworkingSettings extends HookConsumerWidget { ); } + if (!context.mounted) { + return; + } + if (!hasLocationAlways) { isGrantLocationAlwaysPermission = await showDialog( context: context, builder: (context) { return AlertDialog( - title: Text("background_location_permission".tr()), - content: Text("background_location_permission_content".tr()), + title: Text(context.t.background_location_permission), + content: Text(context.t.background_location_permission_content), actions: [ TextButton( onPressed: () async { final isGrant = await ref.read(networkProvider.notifier).requestWifiReadBackgroundPermission(); + if (!context.mounted) { + return; + } + Navigator.pop(context, isGrant); }, - child: Text("grant_permission".tr()), + child: Text(context.t.grant_permission), ), ], ); @@ -83,7 +96,7 @@ class NetworkingSettings extends HookConsumerWidget { useEffect(() { if (featureEnabled.value == true) { - checkWifiReadPermission(); + unawaited(checkWifiReadPermission()); } return null; }, [featureEnabled.value]); @@ -93,7 +106,7 @@ class NetworkingSettings extends HookConsumerWidget { children: [ const SizedBox(height: 8), SettingGroupTitle( - title: "current_server_address".t(context: context), + title: context.t.current_server_address, icon: (currentEndpoint?.startsWith('https') ?? false) ? Icons.https_outlined : Icons.http_outlined, ), Padding( @@ -122,20 +135,14 @@ class NetworkingSettings extends HookConsumerWidget { SettingsSwitchListTile( enabled: true, valueNotifier: featureEnabled, - title: "automatic_endpoint_switching_title".tr(), - subtitle: "automatic_endpoint_switching_subtitle".tr(), + title: context.t.automatic_endpoint_switching_title, + subtitle: context.t.automatic_endpoint_switching_subtitle, ), const SizedBox(height: 8), - SettingGroupTitle( - title: "local_network".t(context: context), - icon: Icons.home_outlined, - ), + SettingGroupTitle(title: context.t.local_network, icon: Icons.home_outlined), LocalNetworkPreference(enabled: featureEnabled.value), const SizedBox(height: 16), - SettingGroupTitle( - title: "external_network".t(context: context), - icon: Icons.dns_outlined, - ), + SettingGroupTitle(title: context.t.external_network, icon: Icons.dns_outlined), ExternalNetworkPreference(enabled: featureEnabled.value), ], ); diff --git a/mobile/lib/widgets/settings/notification_setting.dart b/mobile/lib/widgets/settings/notification_setting.dart index 8b7c652925..c3d175999d 100644 --- a/mobile/lib/widgets/settings/notification_setting.dart +++ b/mobile/lib/widgets/settings/notification_setting.dart @@ -1,7 +1,9 @@ -import 'package:easy_localization/easy_localization.dart'; +import 'dart:async'; + 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/generated/translations.g.dart'; import 'package:immich_mobile/providers/permission.provider.dart'; import 'package:immich_mobile/widgets/settings/settings_button_list_tile.dart'; import 'package:immich_mobile/widgets/settings/settings_sub_page_scaffold.dart'; @@ -15,22 +17,24 @@ class NotificationSetting extends HookConsumerWidget { final permissionService = ref.watch(notificationPermissionProvider); final hasPermission = permissionService == PermissionStatus.granted; - openAppNotificationSettings(BuildContext ctx) { + void openAppNotificationSettings(BuildContext ctx) { ctx.pop(); - openAppSettings(); + unawaited(openAppSettings()); } // When permissions are permanently denied, you need to go to settings to // allow them - showPermissionsDialog() { - showDialog( - context: context, - builder: (ctx) => AlertDialog( - content: const Text('notification_permission_dialog_content').tr(), - actions: [ - TextButton(child: const Text('cancel').tr(), onPressed: () => ctx.pop()), - TextButton(onPressed: () => openAppNotificationSettings(ctx), child: const Text('settings').tr()), - ], + void showPermissionsDialog() { + unawaited( + showDialog( + context: context, + builder: (ctx) => AlertDialog( + content: Text(ctx.t.notification_permission_dialog_content), + actions: [ + TextButton(child: Text(ctx.t.cancel), onPressed: () => ctx.pop()), + TextButton(onPressed: () => openAppNotificationSettings(ctx), child: Text(ctx.t.settings)), + ], + ), ), ); } @@ -39,11 +43,11 @@ class NotificationSetting extends HookConsumerWidget { if (!hasPermission) SettingsButtonListTile( icon: Icons.notifications_outlined, - title: 'notification_permission_list_tile_title'.tr(), - subtileText: 'notification_permission_list_tile_content'.tr(), - buttonText: 'notification_permission_list_tile_enable_button'.tr(), + title: context.t.notification_permission_list_tile_title, + subtileText: context.t.notification_permission_list_tile_content, + buttonText: context.t.notification_permission_list_tile_enable_button, onButtonTap: () => - ref.watch(notificationPermissionProvider.notifier).requestNotificationPermission().then((permission) { + ref.read(notificationPermissionProvider.notifier).requestNotificationPermission().then((permission) { if (permission == PermissionStatus.permanentlyDenied) { showPermissionsDialog(); } @@ -52,9 +56,9 @@ class NotificationSetting extends HookConsumerWidget { else SettingsButtonListTile( icon: Icons.notifications_active_outlined, - title: 'notification_enabled_list_tile_title'.tr(), - subtileText: 'notification_enabled_list_tile_content'.tr(), - buttonText: 'notification_enabled_list_tile_open_button'.tr(), + title: context.t.notification_enabled_list_tile_title, + subtileText: context.t.notification_enabled_list_tile_content, + buttonText: context.t.notification_enabled_list_tile_open_button, onButtonTap: () => openAppSettings(), ), ]; diff --git a/mobile/lib/widgets/settings/preference_settings/haptic_setting.dart b/mobile/lib/widgets/settings/preference_settings/haptic_setting.dart index 5e745dd61d..9aaae683ab 100644 --- a/mobile/lib/widgets/settings/preference_settings/haptic_setting.dart +++ b/mobile/lib/widgets/settings/preference_settings/haptic_setting.dart @@ -1,34 +1,30 @@ import 'package:flutter/material.dart'; import 'package:flutter_hooks/flutter_hooks.dart'; -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:immich_mobile/extensions/translate_extensions.dart'; +import 'package:immich_mobile/generated/translations.g.dart'; import 'package:immich_mobile/services/app_settings.service.dart'; +import 'package:immich_mobile/utils/hooks/app_settings_update_hook.dart'; import 'package:immich_mobile/widgets/settings/setting_group_title.dart'; import 'package:immich_mobile/widgets/settings/settings_switch_list_tile.dart'; -import 'package:immich_mobile/utils/hooks/app_settings_update_hook.dart'; -class HapticSetting extends HookConsumerWidget { +class HapticSetting extends HookWidget { const HapticSetting({super.key}); @override - Widget build(BuildContext context, WidgetRef ref) { + Widget build(BuildContext context) { final hapticFeedbackSetting = useAppSettingsState(AppSettingsEnum.enableHapticFeedback); final isHapticFeedbackEnabled = useValueNotifier(hapticFeedbackSetting.value); - onHapticFeedbackChange(bool isEnabled) { + void onHapticFeedbackChange(bool isEnabled) { hapticFeedbackSetting.value = isEnabled; } return Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - SettingGroupTitle( - title: "haptic_feedback_title".t(context: context), - icon: Icons.vibration_outlined, - ), + SettingGroupTitle(title: context.t.haptic_feedback_title, icon: Icons.vibration_outlined), SettingsSwitchListTile( valueNotifier: isHapticFeedbackEnabled, - title: 'enabled'.t(context: context), + title: context.t.enabled, onChanged: onHapticFeedbackChange, ), ], diff --git a/mobile/lib/widgets/settings/preference_settings/primary_color_setting.dart b/mobile/lib/widgets/settings/preference_settings/primary_color_setting.dart index 48d0ca672b..37235a182a 100644 --- a/mobile/lib/widgets/settings/preference_settings/primary_color_setting.dart +++ b/mobile/lib/widgets/settings/preference_settings/primary_color_setting.dart @@ -1,9 +1,11 @@ -import 'package:easy_localization/easy_localization.dart'; +import 'dart:async'; + import 'package:flutter/material.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; import 'package:immich_mobile/constants/colors.dart'; import 'package:immich_mobile/extensions/build_context_extensions.dart'; import 'package:immich_mobile/extensions/theme_extensions.dart'; +import 'package:immich_mobile/generated/translations.g.dart'; import 'package:immich_mobile/providers/infrastructure/settings.provider.dart'; import 'package:immich_mobile/providers/theme.provider.dart'; import 'package:immich_mobile/theme/color_scheme.dart'; @@ -14,33 +16,37 @@ class PrimaryColorSetting extends HookConsumerWidget { @override Widget build(BuildContext context, WidgetRef ref) { - final themeProvider = ref.read(immichThemeProvider); + final themeProvider = ref.watch(immichThemeProvider); final themeConfig = ref.watch(appConfigProvider.select((config) => config.theme)); const tileSize = 55.0; void popBottomSheet() { Future.delayed(const Duration(milliseconds: 200), () { + if (!context.mounted) { + return; + } + Navigator.pop(context); }); } - onUseSystemColorChange(bool newValue) { - ref.read(settingsProvider).write(.themeDynamic, newValue); + void onUseSystemColorChange(bool newValue) { + unawaited(ref.read(settingsProvider).write(.themeDynamic, newValue)); popBottomSheet(); } - onPrimaryColorChange(ImmichColorPreset colorPreset) { - ref.read(settingsProvider).write(.themePrimaryColor, colorPreset); + void onPrimaryColorChange(ImmichColorPreset colorPreset) { + unawaited(ref.read(settingsProvider).write(.themePrimaryColor, colorPreset)); //turn off system color setting if (themeConfig.dynamicTheme) { - ref.read(settingsProvider).write(.themeDynamic, false); + unawaited(ref.read(settingsProvider).write(.themeDynamic, false)); } popBottomSheet(); } - buildPrimaryColorTile({ + Container buildPrimaryColorTile({ required Color topColor, required Color bottomColor, required double tileSize, @@ -69,7 +75,7 @@ class PrimaryColorSetting extends HookConsumerWidget { right: 0, top: 0, bottom: 0, - child: Container( + child: DecoratedBox( decoration: BoxDecoration( borderRadius: const BorderRadius.all(Radius.circular(100)), color: Colors.grey[900]?.withValues(alpha: .4), @@ -85,13 +91,13 @@ class PrimaryColorSetting extends HookConsumerWidget { ); } - bottomSheetContent() { + Column bottomSheetContent() { return Column( mainAxisSize: MainAxisSize.min, children: [ Align( alignment: Alignment.center, - child: Text("theme_setting_primary_color_title".tr(), style: context.textTheme.titleLarge), + child: Text(context.t.theme_setting_primary_color_title, style: context.textTheme.titleLarge), ), if (DynamicTheme.isAvailable) Container( @@ -104,7 +110,7 @@ class PrimaryColorSetting extends HookConsumerWidget { tileColor: context.colorScheme.surfaceContainerHigh, shape: const RoundedRectangleBorder(borderRadius: BorderRadius.all(Radius.circular(15))), title: Text( - 'theme_setting_system_primary_color_title'.tr(), + context.t.theme_setting_system_primary_color_title, style: context.textTheme.bodyLarge?.copyWith(fontWeight: FontWeight.w500, height: 1.5), ), value: themeConfig.dynamicTheme, @@ -151,11 +157,11 @@ class PrimaryColorSetting extends HookConsumerWidget { crossAxisAlignment: CrossAxisAlignment.start, children: [ Text( - "theme_setting_primary_color_title".tr(), + context.t.theme_setting_primary_color_title, style: context.textTheme.bodyLarge?.copyWith(fontWeight: FontWeight.w500), ), Text( - "theme_setting_primary_color_subtitle".tr(), + context.t.theme_setting_primary_color_subtitle, style: context.textTheme.bodyMedium?.copyWith(color: context.colorScheme.onSurfaceSecondary), ), ], diff --git a/mobile/lib/widgets/settings/preference_settings/share_setting.dart b/mobile/lib/widgets/settings/preference_settings/share_setting.dart index 2435810566..1881703023 100644 --- a/mobile/lib/widgets/settings/preference_settings/share_setting.dart +++ b/mobile/lib/widgets/settings/preference_settings/share_setting.dart @@ -1,3 +1,5 @@ +import 'dart:async'; + import 'package:flutter/material.dart'; import 'package:flutter_hooks/flutter_hooks.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; @@ -19,7 +21,7 @@ class ShareSetting extends HookConsumerWidget { void onChanged(ShareAssetType? value) { if (value != null) { fileType.value = value; - ref.read(settingsProvider).write(SettingsKey.shareFileType, value); + unawaited(ref.read(settingsProvider).write(SettingsKey.shareFileType, value)); } } diff --git a/mobile/lib/widgets/settings/preference_settings/theme_setting.dart b/mobile/lib/widgets/settings/preference_settings/theme_setting.dart index ffeeceae02..cf1a22c45f 100644 --- a/mobile/lib/widgets/settings/preference_settings/theme_setting.dart +++ b/mobile/lib/widgets/settings/preference_settings/theme_setting.dart @@ -1,8 +1,10 @@ +import 'dart:async'; + import 'package:flutter/material.dart'; import 'package:flutter_hooks/flutter_hooks.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; import 'package:immich_mobile/extensions/build_context_extensions.dart'; -import 'package:immich_mobile/extensions/translate_extensions.dart'; +import 'package:immich_mobile/generated/translations.g.dart'; import 'package:immich_mobile/providers/infrastructure/settings.provider.dart'; import 'package:immich_mobile/widgets/settings/preference_settings/primary_color_setting.dart'; import 'package:immich_mobile/widgets/settings/setting_group_title.dart'; @@ -13,7 +15,7 @@ class ThemeSetting extends HookConsumerWidget { @override Widget build(BuildContext context, WidgetRef ref) { - final currentTheme = useState(ref.read(appConfigProvider.select((config) => config.theme.mode))); + final currentTheme = useState(ref.watch(appConfigProvider.select((config) => config.theme.mode))); final isDarkTheme = useValueNotifier(currentTheme.value == ThemeMode.dark); final isSystemTheme = useValueNotifier(currentTheme.value == ThemeMode.system); final colorfulInterface = useValueNotifier( @@ -22,7 +24,7 @@ class ThemeSetting extends HookConsumerWidget { void onThemeChange(bool isDark) { currentTheme.value = isDark ? ThemeMode.dark : ThemeMode.light; - ref.read(settingsProvider).write(.themeMode, currentTheme.value); + unawaited(ref.read(settingsProvider).write(.themeMode, currentTheme.value)); } void onSystemThemeChange(bool isSystem) { @@ -39,37 +41,34 @@ class ThemeSetting extends HookConsumerWidget { currentTheme.value = ThemeMode.dark; } } - ref.read(settingsProvider).write(.themeMode, currentTheme.value); + unawaited(ref.read(settingsProvider).write(.themeMode, currentTheme.value)); } void onSurfaceColorSettingChange(bool useColorfulInterface) { - ref.read(settingsProvider).write(.themeColorfulInterface, useColorfulInterface); + unawaited(ref.read(settingsProvider).write(.themeColorfulInterface, useColorfulInterface)); colorfulInterface.value = useColorfulInterface; } return Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - SettingGroupTitle( - title: "theme".t(context: context), - icon: Icons.color_lens_outlined, - ), + SettingGroupTitle(title: context.t.theme, icon: Icons.color_lens_outlined), SettingsSwitchListTile( valueNotifier: isSystemTheme, - title: 'theme_setting_system_theme_switch'.t(context: context), + title: context.t.theme_setting_system_theme_switch, onChanged: onSystemThemeChange, ), if (currentTheme.value != ThemeMode.system) SettingsSwitchListTile( valueNotifier: isDarkTheme, - title: 'map_settings_dark_mode'.t(context: context), + title: context.t.map_settings_dark_mode, onChanged: onThemeChange, ), const PrimaryColorSetting(), SettingsSwitchListTile( valueNotifier: colorfulInterface, - title: "theme_setting_colorful_interface_title".t(context: context), - subtitle: 'theme_setting_colorful_interface_subtitle'.t(context: context), + title: context.t.theme_setting_colorful_interface_title, + subtitle: context.t.theme_setting_colorful_interface_subtitle, onChanged: onSurfaceColorSettingChange, ), ], diff --git a/mobile/lib/widgets/settings/settings_button_list_tile.dart b/mobile/lib/widgets/settings/settings_button_list_tile.dart index 0e8d75b22f..1e06c0b2b4 100644 --- a/mobile/lib/widgets/settings/settings_button_list_tile.dart +++ b/mobile/lib/widgets/settings/settings_button_list_tile.dart @@ -41,7 +41,7 @@ class SettingsButtonListTile extends StatelessWidget { subtileText!, style: context.textTheme.bodyMedium?.copyWith(color: context.colorScheme.onSurfaceSecondary), ), - if (subtitle != null) subtitle!, + ?subtitle, const SizedBox(height: 6), child ?? ElevatedButton(onPressed: onButtonTap, child: Text(buttonText)), ], diff --git a/mobile/lib/widgets/settings/settings_switch_list_tile.dart b/mobile/lib/widgets/settings/settings_switch_list_tile.dart index d8ed3ac017..4d358fa2b6 100644 --- a/mobile/lib/widgets/settings/settings_switch_list_tile.dart +++ b/mobile/lib/widgets/settings/settings_switch_list_tile.dart @@ -44,7 +44,7 @@ class SettingsSwitchListTile extends StatelessWidget { onChanged: onSwitchChanged, activeThumbColor: enabled ? context.primaryColor : context.themeData.disabledColor, dense: true, - secondary: icon != null ? Icon(icon!, color: valueNotifier.value ? context.primaryColor : null) : null, + secondary: icon != null ? Icon(icon, color: valueNotifier.value ? context.primaryColor : null) : null, title: Text( title, style: diff --git a/mobile/lib/widgets/settings/ssl_client_cert_settings.dart b/mobile/lib/widgets/settings/ssl_client_cert_settings.dart index 77ad7ee179..f37aa04b33 100644 --- a/mobile/lib/widgets/settings/ssl_client_cert_settings.dart +++ b/mobile/lib/widgets/settings/ssl_client_cert_settings.dart @@ -1,10 +1,10 @@ import 'dart:async'; -import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:immich_mobile/extensions/build_context_extensions.dart'; import 'package:immich_mobile/extensions/theme_extensions.dart'; +import 'package:immich_mobile/generated/translations.g.dart'; import 'package:immich_mobile/platform/network_api.g.dart'; import 'package:immich_mobile/providers/infrastructure/platform.provider.dart'; import 'package:logging/logging.dart'; @@ -44,12 +44,15 @@ class _SslClientCertSettingsState extends State { contentPadding: const EdgeInsets.symmetric(horizontal: 20), horizontalTitleGap: 20, isThreeLine: true, - title: Text("client_cert_title".tr(), style: context.textTheme.bodyLarge?.copyWith(fontWeight: FontWeight.w500)), + title: Text( + context.t.client_cert_title, + style: context.textTheme.bodyLarge?.copyWith(fontWeight: FontWeight.w500), + ), subtitle: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ Text( - "client_cert_subtitle".tr(), + context.t.client_cert_subtitle, style: context.textTheme.bodyMedium?.copyWith(color: context.colorScheme.onSurfaceSecondary), ), const SizedBox(height: 6), @@ -58,8 +61,8 @@ class _SslClientCertSettingsState extends State { mainAxisAlignment: MainAxisAlignment.spaceEvenly, crossAxisAlignment: CrossAxisAlignment.center, children: [ - ElevatedButton(onPressed: importCert, child: Text("client_cert_import".tr())), - ElevatedButton(onPressed: !isCertExist ? null : removeCert, child: Text("remove".tr())), + ElevatedButton(onPressed: importCert, child: Text(context.t.client_cert_import)), + ElevatedButton(onPressed: !isCertExist ? null : removeCert, child: Text(context.t.remove)), ], ), ], @@ -79,20 +82,20 @@ class _SslClientCertSettingsState extends State { Future importCert() async { try { final styling = ClientCertPrompt( - title: "client_cert_password_title".tr(), - message: "client_cert_password_message".tr(), - cancel: "cancel".tr(), - confirm: "confirm".tr(), + title: context.t.client_cert_password_title, + message: context.t.client_cert_password_message, + cancel: context.t.cancel, + confirm: context.t.confirm, ); await networkApi.selectCertificate(styling); setState(() => isCertExist = true); - showMessage("client_cert_import_success_msg".tr()); + showMessage(StaticTranslations.instance.client_cert_import_success_msg); } catch (e) { if (_isCancellation(e)) { return; } _log.severe("Error importing client cert", e); - showMessage("client_cert_invalid_msg".tr()); + showMessage(StaticTranslations.instance.client_cert_invalid_msg); } } @@ -100,13 +103,13 @@ class _SslClientCertSettingsState extends State { try { await networkApi.removeCertificate(); setState(() => isCertExist = false); - showMessage("client_cert_remove_msg".tr()); + showMessage(StaticTranslations.instance.client_cert_remove_msg); } catch (e) { if (_isCancellation(e)) { return; } _log.severe("Error removing client cert", e); - showMessage("client_cert_invalid_msg".tr()); + showMessage(StaticTranslations.instance.client_cert_invalid_msg); } } diff --git a/mobile/lib/widgets/shared_link/shared_link_item.dart b/mobile/lib/widgets/shared_link/shared_link_item.dart index d419d6ead0..2471c19cea 100644 --- a/mobile/lib/widgets/shared_link/shared_link_item.dart +++ b/mobile/lib/widgets/shared_link/shared_link_item.dart @@ -173,13 +173,13 @@ class SharedLinkItem extends ConsumerWidget { final confirmed = await showDialog( context: context, builder: (BuildContext context) => ConfirmDialog( - title: "delete_shared_link_dialog_title", - content: "confirm_delete_shared_link", + title: context.t.delete_shared_link_dialog_title, + content: context.t.confirm_delete_shared_link, onOk: () {}, ), ); - if (confirmed == true) { + if (confirmed == true && context.mounted) { await ref.read(sharedLinksStateProvider.notifier).deleteLink(sharedLink.id); return true; } diff --git a/mobile/lib/wm_executor.dart b/mobile/lib/wm_executor.dart index e873c5f76d..aac6d3e174 100644 --- a/mobile/lib/wm_executor.dart +++ b/mobile/lib/wm_executor.dart @@ -145,7 +145,7 @@ class _Executor extends Mixinable<_Executor> with _ExecutorLogger { void _schedule() { final availableWorker = _pool.firstWhereOrNull((worker) => worker.taskId == null && worker.initialized); if (availableWorker == null) { - _ensureWorkersInitialized(); + unawaited(_ensureWorkersInitialized()); return; } if (_queue.isEmpty) { @@ -153,26 +153,28 @@ class _Executor extends Mixinable<_Executor> with _ExecutorLogger { } final task = _queue.removeFirst(); - availableWorker - .work(task) - .then( - (value) { - //might be completed by cancel and it is normal. - //Assuming that worker finished with error and cleaned gracefully - task.complete(value, null, null); - }, - onError: (error, st) { - task.complete(null, error, st); - }, - ) - .whenComplete(() { - if (_dynamicSpawning && _queue.isEmpty) { - // Retire the idle worker; shutdown() nulls its fields so the husk - // stays pooled and is revived by initialize() if work arrives. - unawaited(availableWorker.shutdown()); - } - _schedule(); - }); + unawaited( + availableWorker + .work(task) + .then( + (value) { + //might be completed by cancel and it is normal. + //Assuming that worker finished with error and cleaned gracefully + task.complete(value, null, null); + }, + onError: (error, st) { + task.complete(null, error, st); + }, + ) + .whenComplete(() { + if (_dynamicSpawning && _queue.isEmpty) { + // Retire the idle worker; shutdown() nulls its fields so the husk + // stays pooled and is revived by initialize() if work arrives. + unawaited(availableWorker.shutdown()); + } + _schedule(); + }), + ); } @override diff --git a/mobile/makefile b/mobile/makefile deleted file mode 100644 index 645316efee..0000000000 --- a/mobile/makefile +++ /dev/null @@ -1,26 +0,0 @@ -.PHONY: build watch create_app_icon create_splash build_release_android pigeon test analyze format migration translation - -build: - @printf "This command has been removed. Please use:\n\n mise codegen # or mise //mobile:codegen:dart from another directory\n\n" >&2 && exit 1 - -pigeon: - @printf "This command has been removed. Please use:\n\n mise pigeon # or mise //mobile:codegen:pigeon from another directory\n\n" >&2 && exit 1 - - -build_release_android: - @printf "This command has been removed. Please use:\n\n mise run build:android # or mise //mobile:build:android from another directory\n\n" >&2 && exit 1 - -migration: - @printf "This command has been removed. Please use:\n\n mise migration # or mise //mobile:drift:migration from another directory\n\n" >&2 && exit 1 - -translation: - @printf "This command has been removed. Please use:\n\n mise translation # or mise //mobile:codegen:translation from another directory\n\n" >&2 && exit 1 - -analyze: - @printf "This command has been removed. Please use:\n\n mise analyze # or mise //mobile:lint from another directory\n\n" >&2 && exit 1 - -format: - @printf "This command has been removed. Please use:\n\n mise format # or mise //mobile:format from another directory\n\n" >&2 && exit 1 - -test: - @printf "This command has been removed. Please use:\n\n mise test # or mise //mobile:test from another directory\n\n" >&2 && exit 1 diff --git a/mobile/mise.lock b/mobile/mise.lock index 763c026559..cd3ac25848 100644 --- a/mobile/mise.lock +++ b/mobile/mise.lock @@ -1,68 +1,30 @@ # @generated - this file is auto-generated by `mise lock` https://mise.en.dev/dev-tools/mise-lock.html [[tools."aqua:flutter/flutter"]] -version = "3.44.1" +version = "3.44.9" backend = "aqua:flutter/flutter" [tools."aqua:flutter/flutter"."platforms.linux-arm64"] -url = "https://storage.googleapis.com/flutter_infra_release/releases/stable/linux/flutter_linux_3.44.1-stable.tar.xz" +url = "https://storage.googleapis.com/flutter_infra_release/releases/stable/linux/flutter_linux_3.44.9-stable.tar.xz" [tools."aqua:flutter/flutter"."platforms.linux-arm64-musl"] -url = "https://storage.googleapis.com/flutter_infra_release/releases/stable/linux/flutter_linux_3.44.1-stable.tar.xz" +url = "https://storage.googleapis.com/flutter_infra_release/releases/stable/linux/flutter_linux_3.44.9-stable.tar.xz" [tools."aqua:flutter/flutter"."platforms.linux-x64"] -url = "https://storage.googleapis.com/flutter_infra_release/releases/stable/linux/flutter_linux_3.44.1-stable.tar.xz" +url = "https://storage.googleapis.com/flutter_infra_release/releases/stable/linux/flutter_linux_3.44.9-stable.tar.xz" [tools."aqua:flutter/flutter"."platforms.linux-x64-musl"] -url = "https://storage.googleapis.com/flutter_infra_release/releases/stable/linux/flutter_linux_3.44.1-stable.tar.xz" +url = "https://storage.googleapis.com/flutter_infra_release/releases/stable/linux/flutter_linux_3.44.9-stable.tar.xz" [tools."aqua:flutter/flutter"."platforms.macos-arm64"] -url = "https://storage.googleapis.com/flutter_infra_release/releases/stable/macos/flutter_macos_arm64_3.44.1-stable.zip" +checksum = "blake3:e5c14d6b5e917a8578327d2564ab78ece83cd685c74c29572ddaf7655f42205d" +url = "https://storage.googleapis.com/flutter_infra_release/releases/stable/macos/flutter_macos_arm64_3.44.9-stable.zip" [tools."aqua:flutter/flutter"."platforms.macos-x64"] -url = "https://storage.googleapis.com/flutter_infra_release/releases/stable/macos/flutter_macos_3.44.1-stable.zip" +url = "https://storage.googleapis.com/flutter_infra_release/releases/stable/macos/flutter_macos_3.44.9-stable.zip" [tools."aqua:flutter/flutter"."platforms.windows-x64"] -url = "https://storage.googleapis.com/flutter_infra_release/releases/stable/windows/flutter_windows_3.44.1-stable.zip" - -[[tools."github:CQLabs/homebrew-dcm"]] -version = "1.37.0" -backend = "github:CQLabs/homebrew-dcm" - -[tools."github:CQLabs/homebrew-dcm"."platforms.linux-arm64"] -checksum = "sha256:253da2512b149913dfe345bf9a62a79acb2d730f66e71162ba4a92dfc4224b82" -url = "https://github.com/CQLabs/homebrew-dcm/releases/download/1.37.0/dcm-linux-arm-release.zip" -url_api = "https://api.github.com/repos/CQLabs/homebrew-dcm/releases/assets/404543838" - -[tools."github:CQLabs/homebrew-dcm"."platforms.linux-arm64-musl"] -checksum = "sha256:253da2512b149913dfe345bf9a62a79acb2d730f66e71162ba4a92dfc4224b82" -url = "https://github.com/CQLabs/homebrew-dcm/releases/download/1.37.0/dcm-linux-arm-release.zip" -url_api = "https://api.github.com/repos/CQLabs/homebrew-dcm/releases/assets/404543838" - -[tools."github:CQLabs/homebrew-dcm"."platforms.linux-x64"] -checksum = "sha256:477e086d4099c12f21e5ccd83b005d5fb945dd4cac4fd127fd9a08d7649af1cf" -url = "https://github.com/CQLabs/homebrew-dcm/releases/download/1.37.0/dcm-linux-x64-release.zip" -url_api = "https://api.github.com/repos/CQLabs/homebrew-dcm/releases/assets/404543797" - -[tools."github:CQLabs/homebrew-dcm"."platforms.linux-x64-musl"] -checksum = "sha256:477e086d4099c12f21e5ccd83b005d5fb945dd4cac4fd127fd9a08d7649af1cf" -url = "https://github.com/CQLabs/homebrew-dcm/releases/download/1.37.0/dcm-linux-x64-release.zip" -url_api = "https://api.github.com/repos/CQLabs/homebrew-dcm/releases/assets/404543797" - -[tools."github:CQLabs/homebrew-dcm"."platforms.macos-arm64"] -checksum = "sha256:30bede64367d09067093cc57af6ec9496d7717898138ded5cb98a16ac8dd9d93" -url = "https://github.com/CQLabs/homebrew-dcm/releases/download/1.37.0/dcm-macos-arm-release.zip" -url_api = "https://api.github.com/repos/CQLabs/homebrew-dcm/releases/assets/404543757" - -[tools."github:CQLabs/homebrew-dcm"."platforms.macos-x64"] -checksum = "sha256:e56cb99872be7445a4de1d37e5438ca70e3bcd83be7a2b9b385e3538881f8068" -url = "https://github.com/CQLabs/homebrew-dcm/releases/download/1.37.0/dcm-macos-x64-release.zip" -url_api = "https://api.github.com/repos/CQLabs/homebrew-dcm/releases/assets/404543727" - -[tools."github:CQLabs/homebrew-dcm"."platforms.windows-x64"] -checksum = "sha256:f133470daa3fb0427f039b424392af7e917d7e7db6b556aa2a968ab0e31587da" -url = "https://github.com/CQLabs/homebrew-dcm/releases/download/1.37.0/dcm-windows-release.zip" -url_api = "https://api.github.com/repos/CQLabs/homebrew-dcm/releases/assets/404543660" +url = "https://storage.googleapis.com/flutter_infra_release/releases/stable/windows/flutter_windows_3.44.9-stable.zip" [[tools."github:CQLabs/homebrew-dcm"]] version = "1.37.0" @@ -102,6 +64,18 @@ url_api = "https://api.github.com/repos/CQLabs/homebrew-dcm/releases/assets/4045 version = "1.37.0" backend = "github:CQLabs/homebrew-dcm" +[tools."github:CQLabs/homebrew-dcm".options] +asset_pattern = "dcm-macos-arm-release.zip" + +[tools."github:CQLabs/homebrew-dcm"."platforms.macos-arm64"] +checksum = "sha256:30bede64367d09067093cc57af6ec9496d7717898138ded5cb98a16ac8dd9d93" +url = "https://github.com/CQLabs/homebrew-dcm/releases/download/1.37.0/dcm-macos-arm-release.zip" +url_api = "https://api.github.com/repos/CQLabs/homebrew-dcm/releases/assets/404543757" + +[[tools."github:CQLabs/homebrew-dcm"]] +version = "1.37.0" +backend = "github:CQLabs/homebrew-dcm" + [tools."github:CQLabs/homebrew-dcm".options] asset_pattern = "dcm-macos-x64-release.zip" @@ -122,42 +96,6 @@ checksum = "sha256:f133470daa3fb0427f039b424392af7e917d7e7db6b556aa2a968ab0e3158 url = "https://github.com/CQLabs/homebrew-dcm/releases/download/1.37.0/dcm-windows-release.zip" url_api = "https://api.github.com/repos/CQLabs/homebrew-dcm/releases/assets/404543660" -[[tools."github:CQLabs/homebrew-dcm"]] -version = "1.37.0" -backend = "github:CQLabs/homebrew-dcm" - -[tools."github:CQLabs/homebrew-dcm".options] -asset_pattern = "dcm-macos-arm-release.zip" - -[tools."github:CQLabs/homebrew-dcm"."platforms.macos-arm64"] -checksum = "sha256:30bede64367d09067093cc57af6ec9496d7717898138ded5cb98a16ac8dd9d93" -url = "https://github.com/CQLabs/homebrew-dcm/releases/download/1.37.0/dcm-macos-arm-release.zip" -url_api = "https://api.github.com/repos/CQLabs/homebrew-dcm/releases/assets/404543757" - -[[tools.java]] -version = "21.0.2" -backend = "core:java" - -[tools.java."platforms.linux-arm64"] -checksum = "sha256:08db1392a48d4eb5ea5315cf8f18b89dbaf36cda663ba882cf03c704c9257ec2" -url = "https://download.java.net/java/GA/jdk21.0.2/f2283984656d49d69e91c558476027ac/13/GPL/openjdk-21.0.2_linux-aarch64_bin.tar.gz" - -[tools.java."platforms.linux-x64"] -checksum = "sha256:a2def047a73941e01a73739f92755f86b895811afb1f91243db214cff5bdac3f" -url = "https://download.java.net/java/GA/jdk21.0.2/f2283984656d49d69e91c558476027ac/13/GPL/openjdk-21.0.2_linux-x64_bin.tar.gz" - -[tools.java."platforms.macos-arm64"] -checksum = "sha256:b3d588e16ec1e0ef9805d8a696591bd518a5cea62567da8f53b5ce32d11d22e4" -url = "https://download.java.net/java/GA/jdk21.0.2/f2283984656d49d69e91c558476027ac/13/GPL/openjdk-21.0.2_macos-aarch64_bin.tar.gz" - -[tools.java."platforms.macos-x64"] -checksum = "sha256:8fd09e15dc406387a0aba70bf5d99692874e999bf9cd9208b452b5d76ac922d3" -url = "https://download.java.net/java/GA/jdk21.0.2/f2283984656d49d69e91c558476027ac/13/GPL/openjdk-21.0.2_macos-x64_bin.tar.gz" - -[tools.java."platforms.windows-x64"] -checksum = "sha256:b6c17e747ae78cdd6de4d7532b3164b277daee97c007d3eaa2b39cca99882664" -url = "https://download.java.net/java/GA/jdk21.0.2/f2283984656d49d69e91c558476027ac/13/GPL/openjdk-21.0.2_windows-x64_bin.zip" - [[tools.java]] version = "21.0.2" backend = "core:java" @@ -184,3 +122,7 @@ url = "https://download.java.net/java/GA/jdk21.0.2/f2283984656d49d69e91c55847602 [tools.java."platforms.windows-x64"] checksum = "sha256:b6c17e747ae78cdd6de4d7532b3164b277daee97c007d3eaa2b39cca99882664" url = "https://download.java.net/java/GA/jdk21.0.2/f2283984656d49d69e91c558476027ac/13/GPL/openjdk-21.0.2_windows-x64_bin.zip" + +[[tools."npm:@openapitools/openapi-generator-cli"]] +version = "2.40.1" +backend = "npm:@openapitools/openapi-generator-cli" diff --git a/mobile/mise.toml b/mobile/mise.toml index a2ee6d70df..d8ddc8ab21 100644 --- a/mobile/mise.toml +++ b/mobile/mise.toml @@ -1,5 +1,5 @@ [tools] -"aqua:flutter/flutter" = "3.44.1" +"aqua:flutter/flutter" = "3.44.9" java = "21.0.2" [tools."github:CQLabs/homebrew-dcm"] @@ -14,8 +14,12 @@ macos-x64 = { asset_pattern = "dcm-macos-x64-release.zip" } macos-arm64 = { asset_pattern = "dcm-macos-arm-release.zip" } windows-x64 = { asset_pattern = "dcm-windows-release.zip" } -[tasks."codegen:dart"] +[tasks.codegen] alias = "codegen" +description = "Generate all codegen artifacts" +depends = ["//:open-api-dart", "codegen:dart", "codegen:drift:schema", "codegen:pigeon", "codegen:translation"] + +[tasks."codegen:dart"] description = "Execute build_runner to auto-generate dart code" sources = [ "pubspec.yaml", @@ -25,14 +29,22 @@ sources = [ ] outputs = { auto = true } run = [ - "dart run build_runner build --delete-conflicting-outputs", + "dart run build_runner build", "dart format lib/routing/router.gr.dart", ] +depends = ["//:open-api-dart"] + +[tasks."codegen:drift:schema"] +description = "Generate Drift migration schema test code" +sources = ["drift_schemas/main/*.json"] +outputs = { auto = true } +run = "dart run drift_dev schema generate --data-classes --companions drift_schemas/main/ test/drift/main/generated/" +depends = ["//:open-api-dart"] [tasks."codegen:watch"] alias = "watch" description = "Watch and auto-generate dart code" -run = "dart run build_runner watch --delete-conflicting-outputs" +run = "dart run build_runner watch" [tasks."codegen:pigeon"] alias = "pigeon" @@ -41,17 +53,12 @@ run = [ "ls pigeon/*.dart | xargs -n1 -P4 -I{} dart run pigeon --input {}", "dart format lib/platform/", ] +depends = ["//:open-api-dart"] [tasks."codegen:translation"] alias = "translation" description = "Generate translations from i18n JSONs" -run = [ - { task = "//:i18n:format-fix" }, - { tasks = [ - "i18n:loader", - "i18n:keys", - ] }, -] +depends = ["//:i18n:format-fix", "i18n:loader", "i18n:keys"] [tasks."codegen:app-icon"] description = "Generate app icons" @@ -91,7 +98,30 @@ run = "dart run drift_dev make-migrations" [tasks.install] alias = "install" description = "Install flutter dependencies" -run = "flutter pub get" +depends = ["//:open-api-dart"] +run = [ + # This receives passed `--enforce-lockfile` args + "flutter pub get", + { task = "install:ios" }, +] + +[tasks."install:ci"] +description = "Install flutter dependencies in CI" +run = [ + { task = "install", args = ["--enforce-lockfile"] }, +] + +[tasks.checkout] +description = "Bring a checkout up to date after switching branches" +run = [ + { task = "install" }, + { task = "checkout:ios" }, + { task = "codegen" }, +] + +[tasks."checkout:ios"] +description = "Bring the iOS project up to date after switching branches" +run = "bash ./scripts/checkout_ios.sh" [tasks.start] alias = "start" @@ -106,6 +136,8 @@ run = [ "dart run easy_localization:generate -S ../i18n", "dart format lib/generated/codegen_loader.g.dart", ] +depends = ["//:open-api-dart"] +wait_for = ["//:i18n:format-fix"] [tasks."i18n:keys"] description = "Generate i18n keys" @@ -114,6 +146,20 @@ run = [ "dart run bin/generate_keys.dart", "dart format lib/generated/translations.g.dart", ] +wait_for = ["//:i18n:format-fix"] + +[tasks."install:ios"] +description = "Install CocoaPods dependencies" +hide = true +sources = ["ios/Podfile", "ios/Podfile.lock", ".flutter-plugins-dependencies"] +outputs = ["ios/Pods/Manifest.lock"] +run = ''' +echo "Running pod install" +if [ "$(uname)" != "Darwin" ]; then + exit 0 +fi +cd ios && pod install +''' [tasks."analyze:dart"] description = "Run Dart analysis" diff --git a/mobile/openapi/.gitignore b/mobile/openapi/.gitignore deleted file mode 100644 index 0f74d293b9..0000000000 --- a/mobile/openapi/.gitignore +++ /dev/null @@ -1,19 +0,0 @@ -# See https://dart.dev/guides/libraries/private-files - -.dart_tool/ -.packages -build/ - -# Except for application packages -pubspec.lock - -doc/api/ - -# IntelliJ -*.iml -*.ipr -*.iws -.idea/ - -# Mac -.DS_Store diff --git a/mobile/openapi/.openapi-generator-ignore b/mobile/openapi/.openapi-generator-ignore deleted file mode 100644 index 7484ee590a..0000000000 --- a/mobile/openapi/.openapi-generator-ignore +++ /dev/null @@ -1,23 +0,0 @@ -# OpenAPI Generator Ignore -# Generated by openapi-generator https://github.com/openapitools/openapi-generator - -# Use this file to prevent files from being overwritten by the generator. -# The patterns follow closely to .gitignore or .dockerignore. - -# As an example, the C# client generator defines ApiClient.cs. -# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: -#ApiClient.cs - -# You can match any string of characters against a directory, file or extension with a single asterisk (*): -#foo/*/qux -# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux - -# You can recursively match patterns against a directory, file or extension with a double asterisk (**): -#foo/**/qux -# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux - -# You can also negate patterns with an exclamation (!). -# For example, you can ignore all files in a docs folder with the file extension .md: -#docs/*.md -# Then explicitly reverse the ignore rule for a single file: -#!docs/README.md diff --git a/mobile/openapi/.openapi-generator/VERSION b/mobile/openapi/.openapi-generator/VERSION deleted file mode 100644 index 696eaac5ce..0000000000 --- a/mobile/openapi/.openapi-generator/VERSION +++ /dev/null @@ -1 +0,0 @@ -7.22.0 diff --git a/mobile/openapi/.travis.yml b/mobile/openapi/.travis.yml deleted file mode 100644 index 2774ccbba0..0000000000 --- a/mobile/openapi/.travis.yml +++ /dev/null @@ -1,14 +0,0 @@ -# -# AUTO-GENERATED FILE, DO NOT MODIFY! -# -# https://docs.travis-ci.com/user/languages/dart/ -# -language: dart -dart: -# Install a specific stable release -- "2.12" -install: -- pub get - -script: -- pub run test diff --git a/mobile/openapi/README.md b/mobile/openapi/README.md deleted file mode 100644 index 5eb1a9bbc1..0000000000 --- a/mobile/openapi/README.md +++ /dev/null @@ -1,745 +0,0 @@ -# openapi -Immich API - -This Dart package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: - -- API version: 3.0.0-rc.3 -- Generator version: 7.22.0 -- Build package: org.openapitools.codegen.languages.DartClientCodegen - -## Requirements - -Dart 2.12 or later - -## Installation & Usage - -### Github -If this Dart package is published to Github, add the following dependency to your pubspec.yaml -``` -dependencies: - openapi: - git: https://github.com/GIT_USER_ID/GIT_REPO_ID.git -``` - -### Local -To use the package in your local drive, add the following dependency to your pubspec.yaml -``` -dependencies: - openapi: - path: /path/to/openapi -``` - -## Tests - -TODO - -## Getting Started - -Please follow the [installation procedure](#installation--usage) and then run the following: - -```dart -import 'package:openapi/api.dart'; - -// TODO Configure API key authorization: cookie -//defaultApiClient.getAuthentication('cookie').apiKey = 'YOUR_API_KEY'; -// uncomment below to setup prefix (e.g. Bearer) for API key, if needed -//defaultApiClient.getAuthentication('cookie').apiKeyPrefix = 'Bearer'; -// TODO Configure API key authorization: api_key -//defaultApiClient.getAuthentication('api_key').apiKey = 'YOUR_API_KEY'; -// uncomment below to setup prefix (e.g. Bearer) for API key, if needed -//defaultApiClient.getAuthentication('api_key').apiKeyPrefix = 'Bearer'; -// TODO Configure HTTP Bearer authorization: bearer -// Case 1. Use String Token -//defaultApiClient.getAuthentication('bearer').setAccessToken('YOUR_ACCESS_TOKEN'); -// Case 2. Use Function which generate token. -// String yourTokenGeneratorFunction() { ... } -//defaultApiClient.getAuthentication('bearer').setAccessToken(yourTokenGeneratorFunction); - -final api_instance = APIKeysApi(); -final apiKeyCreateDto = ApiKeyCreateDto(); // ApiKeyCreateDto | - -try { - final result = api_instance.createApiKey(apiKeyCreateDto); - print(result); -} catch (e) { - print('Exception when calling APIKeysApi->createApiKey: $e\n'); -} - -``` - -## Documentation for API Endpoints - -All URIs are relative to */api* - -Class | Method | HTTP request | Description ------------- | ------------- | ------------- | ------------- -*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* | [**getAlbumMapMarkers**](doc//AlbumsApi.md#getalbummapmarkers) | **GET** /albums/{id}/map-markers | Retrieve album map markers -*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* | [**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* | [**deleteBulkAssetMetadata**](doc//AssetsApi.md#deletebulkassetmetadata) | **DELETE** /assets/metadata | Delete asset metadata -*AssetsApi* | [**downloadAsset**](doc//AssetsApi.md#downloadasset) | **GET** /assets/{id}/original | Download original asset -*AssetsApi* | [**editAsset**](doc//AssetsApi.md#editasset) | **PUT** /assets/{id}/edits | Apply edits to an existing asset -*AssetsApi* | [**endSession**](doc//AssetsApi.md#endsession) | **DELETE** /assets/{id}/video/stream/{sessionId} | End HLS streaming session -*AssetsApi* | [**getAssetEdits**](doc//AssetsApi.md#getassetedits) | **GET** /assets/{id}/edits | Retrieve edits for an existing asset -*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* | [**getMainPlaylist**](doc//AssetsApi.md#getmainplaylist) | **GET** /assets/{id}/video/stream/main.m3u8 | Get HLS main playlist -*AssetsApi* | [**getMediaPlaylist**](doc//AssetsApi.md#getmediaplaylist) | **GET** /assets/{id}/video/stream/{sessionId}/{variantIndex}/playlist.m3u8 | Get HLS media playlist -*AssetsApi* | [**getSegment**](doc//AssetsApi.md#getsegment) | **GET** /assets/{id}/video/stream/{sessionId}/{variantIndex}/{filename} | Get HLS segment or init file -*AssetsApi* | [**playAssetVideo**](doc//AssetsApi.md#playassetvideo) | **GET** /assets/{id}/video/playback | Play asset video -*AssetsApi* | [**removeAssetEdits**](doc//AssetsApi.md#removeassetedits) | **DELETE** /assets/{id}/edits | Remove edits from an existing 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* | [**updateBulkAssetMetadata**](doc//AssetsApi.md#updatebulkassetmetadata) | **PUT** /assets/metadata | Upsert asset metadata -*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* | [**logoutOAuth**](doc//AuthenticationApi.md#logoutoauth) | **POST** /oauth/backchannel-logout | Backchannel OAuth 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 -*DatabaseBackupsAdminApi* | [**deleteDatabaseBackup**](doc//DatabaseBackupsAdminApi.md#deletedatabasebackup) | **DELETE** /admin/database-backups | Delete database backup -*DatabaseBackupsAdminApi* | [**downloadDatabaseBackup**](doc//DatabaseBackupsAdminApi.md#downloaddatabasebackup) | **GET** /admin/database-backups/{filename} | Download database backup -*DatabaseBackupsAdminApi* | [**listDatabaseBackups**](doc//DatabaseBackupsAdminApi.md#listdatabasebackups) | **GET** /admin/database-backups | List database backups -*DatabaseBackupsAdminApi* | [**startDatabaseRestoreFlow**](doc//DatabaseBackupsAdminApi.md#startdatabaserestoreflow) | **POST** /admin/database-backups/start-restore | Start database backup restore flow -*DatabaseBackupsAdminApi* | [**uploadDatabaseBackup**](doc//DatabaseBackupsAdminApi.md#uploaddatabasebackup) | **POST** /admin/database-backups/upload | Upload database backup -*DeprecatedApi* | [**createPartnerDeprecated**](doc//DeprecatedApi.md#createpartnerdeprecated) | **POST** /partners/{id} | Create a partner -*DeprecatedApi* | [**getQueuesLegacy**](doc//DeprecatedApi.md#getqueueslegacy) | **GET** /jobs | Retrieve queue counts and status -*DeprecatedApi* | [**runQueueCommandLegacy**](doc//DeprecatedApi.md#runqueuecommandlegacy) | **PUT** /jobs/{name} | Run jobs -*DeprecatedApi* | [**updateApiKey**](doc//DeprecatedApi.md#updateapikey) | **PUT** /api-keys/{id} | Update an API key -*DeprecatedApi* | [**updateAsset**](doc//DeprecatedApi.md#updateasset) | **PUT** /assets/{id} | Update an asset -*DeprecatedApi* | [**updateAssets**](doc//DeprecatedApi.md#updateassets) | **PUT** /assets | Update assets -*DeprecatedApi* | [**updateLibrary**](doc//DeprecatedApi.md#updatelibrary) | **PUT** /libraries/{id} | Update a library -*DeprecatedApi* | [**updateMemory**](doc//DeprecatedApi.md#updatememory) | **PUT** /memories/{id} | Update a memory -*DeprecatedApi* | [**updateMyPreferences**](doc//DeprecatedApi.md#updatemypreferences) | **PUT** /users/me/preferences | Update my preferences -*DeprecatedApi* | [**updateMyUser**](doc//DeprecatedApi.md#updatemyuser) | **PUT** /users/me | Update current user -*DeprecatedApi* | [**updatePerson**](doc//DeprecatedApi.md#updateperson) | **PUT** /people/{id} | Update person -*DeprecatedApi* | [**updateSession**](doc//DeprecatedApi.md#updatesession) | **PUT** /sessions/{id} | Update a session -*DeprecatedApi* | [**updateStack**](doc//DeprecatedApi.md#updatestack) | **PUT** /stacks/{id} | Update a stack -*DeprecatedApi* | [**updateTag**](doc//DeprecatedApi.md#updatetag) | **PUT** /tags/{id} | Update a tag -*DeprecatedApi* | [**updateUserAdmin**](doc//DeprecatedApi.md#updateuseradmin) | **PUT** /admin/users/{id} | Update a user -*DeprecatedApi* | [**updateUserPreferencesAdmin**](doc//DeprecatedApi.md#updateuserpreferencesadmin) | **PUT** /admin/users/{id}/preferences | Update user preferences -*DeprecatedApi* | [**updateWorkflow**](doc//DeprecatedApi.md#updateworkflow) | **PUT** /workflows/{id} | Update a workflow -*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} | Dismiss a duplicate group -*DuplicatesApi* | [**deleteDuplicates**](doc//DuplicatesApi.md#deleteduplicates) | **DELETE** /duplicates | Delete duplicates -*DuplicatesApi* | [**getAssetDuplicates**](doc//DuplicatesApi.md#getassetduplicates) | **GET** /duplicates | Retrieve duplicates -*DuplicatesApi* | [**resolveDuplicates**](doc//DuplicatesApi.md#resolveduplicates) | **POST** /duplicates/resolve | Resolve duplicate groups -*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* | [**getQueuesLegacy**](doc//JobsApi.md#getqueueslegacy) | **GET** /jobs | Retrieve queue counts and status -*JobsApi* | [**runQueueCommandLegacy**](doc//JobsApi.md#runqueuecommandlegacy) | **PUT** /jobs/{name} | 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* | [**deleteIntegrityReport**](doc//MaintenanceAdminApi.md#deleteintegrityreport) | **DELETE** /admin/integrity/report/{id} | Delete integrity report item -*MaintenanceAdminApi* | [**detectPriorInstall**](doc//MaintenanceAdminApi.md#detectpriorinstall) | **GET** /admin/maintenance/detect-install | Detect existing install -*MaintenanceAdminApi* | [**getIntegrityReport**](doc//MaintenanceAdminApi.md#getintegrityreport) | **GET** /admin/integrity/report | Get integrity report by type -*MaintenanceAdminApi* | [**getIntegrityReportCsv**](doc//MaintenanceAdminApi.md#getintegrityreportcsv) | **GET** /admin/integrity/report/{type}/csv | Export integrity report by type as CSV -*MaintenanceAdminApi* | [**getIntegrityReportFile**](doc//MaintenanceAdminApi.md#getintegrityreportfile) | **GET** /admin/integrity/report/{id}/file | Download flagged file -*MaintenanceAdminApi* | [**getIntegrityReportSummary**](doc//MaintenanceAdminApi.md#getintegrityreportsummary) | **GET** /admin/integrity/summary | Get integrity report summary -*MaintenanceAdminApi* | [**getMaintenanceStatus**](doc//MaintenanceAdminApi.md#getmaintenancestatus) | **GET** /admin/maintenance/status | Get maintenance mode status -*MaintenanceAdminApi* | [**maintenanceLogin**](doc//MaintenanceAdminApi.md#maintenancelogin) | **POST** /admin/maintenance/login | Log into maintenance mode -*MaintenanceAdminApi* | [**setMaintenanceMode**](doc//MaintenanceAdminApi.md#setmaintenancemode) | **POST** /admin/maintenance | Set maintenance mode -*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 -*PluginsApi* | [**getPlugin**](doc//PluginsApi.md#getplugin) | **GET** /plugins/{id} | Retrieve a plugin -*PluginsApi* | [**searchPluginMethods**](doc//PluginsApi.md#searchpluginmethods) | **GET** /plugins/methods | Retrieve plugin methods -*PluginsApi* | [**searchPluginTemplates**](doc//PluginsApi.md#searchplugintemplates) | **GET** /plugins/templates | Retrieve workflow templates -*PluginsApi* | [**searchPlugins**](doc//PluginsApi.md#searchplugins) | **GET** /plugins | List all plugins -*QueuesApi* | [**emptyQueue**](doc//QueuesApi.md#emptyqueue) | **DELETE** /queues/{name}/jobs | Empty a queue -*QueuesApi* | [**getQueue**](doc//QueuesApi.md#getqueue) | **GET** /queues/{name} | Retrieve a queue -*QueuesApi* | [**getQueueJobs**](doc//QueuesApi.md#getqueuejobs) | **GET** /queues/{name}/jobs | Retrieve queue jobs -*QueuesApi* | [**getQueues**](doc//QueuesApi.md#getqueues) | **GET** /queues | List all queues -*QueuesApi* | [**updateQueue**](doc//QueuesApi.md#updatequeue) | **PUT** /queues/{name} | Update a queue -*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* | [**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* | [**sharedLinkLogin**](doc//SharedLinksApi.md#sharedlinklogin) | **POST** /shared-links/login | Shared link login -*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* | [**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* | [**getMyCalendarHeatmap**](doc//UsersApi.md#getmycalendarheatmap) | **GET** /users/me/calendar-heatmap | Retrieve calendar heatmap activity -*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* | [**getUserCalendarHeatmapAdmin**](doc//UsersAdminApi.md#getusercalendarheatmapadmin) | **GET** /admin/users/{id}/calendar-heatmap | Retrieve calendar heatmap activity -*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 -*WorkflowsApi* | [**createWorkflow**](doc//WorkflowsApi.md#createworkflow) | **POST** /workflows | Create a workflow -*WorkflowsApi* | [**deleteWorkflow**](doc//WorkflowsApi.md#deleteworkflow) | **DELETE** /workflows/{id} | Delete a workflow -*WorkflowsApi* | [**getWorkflow**](doc//WorkflowsApi.md#getworkflow) | **GET** /workflows/{id} | Retrieve a workflow -*WorkflowsApi* | [**getWorkflowForShare**](doc//WorkflowsApi.md#getworkflowforshare) | **GET** /workflows/{id}/share | Retrieve a workflow -*WorkflowsApi* | [**getWorkflowTriggers**](doc//WorkflowsApi.md#getworkflowtriggers) | **GET** /workflows/triggers | List all workflow triggers -*WorkflowsApi* | [**searchWorkflows**](doc//WorkflowsApi.md#searchworkflows) | **GET** /workflows | List all workflows -*WorkflowsApi* | [**updateWorkflow**](doc//WorkflowsApi.md#updateworkflow) | **PUT** /workflows/{id} | Update a workflow - - -## Documentation For Models - - - [ActivityCreateDto](doc//ActivityCreateDto.md) - - [ActivityResponseDto](doc//ActivityResponseDto.md) - - [ActivityStatisticsResponseDto](doc//ActivityStatisticsResponseDto.md) - - [AddUsersDto](doc//AddUsersDto.md) - - [AdminOnboardingUpdateDto](doc//AdminOnboardingUpdateDto.md) - - [AlbumResponseDto](doc//AlbumResponseDto.md) - - [AlbumStatisticsResponseDto](doc//AlbumStatisticsResponseDto.md) - - [AlbumUserAddDto](doc//AlbumUserAddDto.md) - - [AlbumUserCreateDto](doc//AlbumUserCreateDto.md) - - [AlbumUserResponseDto](doc//AlbumUserResponseDto.md) - - [AlbumUserRole](doc//AlbumUserRole.md) - - [AlbumsAddAssetsDto](doc//AlbumsAddAssetsDto.md) - - [AlbumsAddAssetsResponseDto](doc//AlbumsAddAssetsResponseDto.md) - - [AlbumsResponse](doc//AlbumsResponse.md) - - [AlbumsUpdate](doc//AlbumsUpdate.md) - - [ApiKeyCreateDto](doc//ApiKeyCreateDto.md) - - [ApiKeyCreateResponseDto](doc//ApiKeyCreateResponseDto.md) - - [ApiKeyResponseDto](doc//ApiKeyResponseDto.md) - - [ApiKeyUpdateDto](doc//ApiKeyUpdateDto.md) - - [AssetBulkDeleteDto](doc//AssetBulkDeleteDto.md) - - [AssetBulkUpdateDto](doc//AssetBulkUpdateDto.md) - - [AssetBulkUploadCheckDto](doc//AssetBulkUploadCheckDto.md) - - [AssetBulkUploadCheckItem](doc//AssetBulkUploadCheckItem.md) - - [AssetBulkUploadCheckResponseDto](doc//AssetBulkUploadCheckResponseDto.md) - - [AssetBulkUploadCheckResult](doc//AssetBulkUploadCheckResult.md) - - [AssetCopyDto](doc//AssetCopyDto.md) - - [AssetEditAction](doc//AssetEditAction.md) - - [AssetEditActionItemDto](doc//AssetEditActionItemDto.md) - - [AssetEditActionItemDtoParameters](doc//AssetEditActionItemDtoParameters.md) - - [AssetEditActionItemResponseDto](doc//AssetEditActionItemResponseDto.md) - - [AssetEditsCreateDto](doc//AssetEditsCreateDto.md) - - [AssetEditsResponseDto](doc//AssetEditsResponseDto.md) - - [AssetFaceCreateDto](doc//AssetFaceCreateDto.md) - - [AssetFaceDeleteDto](doc//AssetFaceDeleteDto.md) - - [AssetFaceResponseDto](doc//AssetFaceResponseDto.md) - - [AssetFaceUpdateDto](doc//AssetFaceUpdateDto.md) - - [AssetFaceUpdateItem](doc//AssetFaceUpdateItem.md) - - [AssetIdErrorReason](doc//AssetIdErrorReason.md) - - [AssetIdsDto](doc//AssetIdsDto.md) - - [AssetIdsResponseDto](doc//AssetIdsResponseDto.md) - - [AssetJobName](doc//AssetJobName.md) - - [AssetJobsDto](doc//AssetJobsDto.md) - - [AssetMediaResponseDto](doc//AssetMediaResponseDto.md) - - [AssetMediaSize](doc//AssetMediaSize.md) - - [AssetMediaStatus](doc//AssetMediaStatus.md) - - [AssetMetadataBulkDeleteDto](doc//AssetMetadataBulkDeleteDto.md) - - [AssetMetadataBulkDeleteItemDto](doc//AssetMetadataBulkDeleteItemDto.md) - - [AssetMetadataBulkResponseDto](doc//AssetMetadataBulkResponseDto.md) - - [AssetMetadataBulkUpsertDto](doc//AssetMetadataBulkUpsertDto.md) - - [AssetMetadataBulkUpsertItemDto](doc//AssetMetadataBulkUpsertItemDto.md) - - [AssetMetadataResponseDto](doc//AssetMetadataResponseDto.md) - - [AssetMetadataUpsertDto](doc//AssetMetadataUpsertDto.md) - - [AssetMetadataUpsertItemDto](doc//AssetMetadataUpsertItemDto.md) - - [AssetOcrResponseDto](doc//AssetOcrResponseDto.md) - - [AssetOrder](doc//AssetOrder.md) - - [AssetOrderBy](doc//AssetOrderBy.md) - - [AssetRejectReason](doc//AssetRejectReason.md) - - [AssetResponseDto](doc//AssetResponseDto.md) - - [AssetStackResponseDto](doc//AssetStackResponseDto.md) - - [AssetStatsResponseDto](doc//AssetStatsResponseDto.md) - - [AssetTypeEnum](doc//AssetTypeEnum.md) - - [AssetUploadAction](doc//AssetUploadAction.md) - - [AssetVisibility](doc//AssetVisibility.md) - - [AudioCodec](doc//AudioCodec.md) - - [AuthStatusResponseDto](doc//AuthStatusResponseDto.md) - - [AvatarUpdate](doc//AvatarUpdate.md) - - [BulkIdErrorReason](doc//BulkIdErrorReason.md) - - [BulkIdResponseDto](doc//BulkIdResponseDto.md) - - [BulkIdsDto](doc//BulkIdsDto.md) - - [CLIPConfig](doc//CLIPConfig.md) - - [CQMode](doc//CQMode.md) - - [CalendarHeatmapResponseDto](doc//CalendarHeatmapResponseDto.md) - - [CalendarHeatmapResponseDtoSeriesInner](doc//CalendarHeatmapResponseDtoSeriesInner.md) - - [CalendarHeatmapType](doc//CalendarHeatmapType.md) - - [CastResponse](doc//CastResponse.md) - - [CastUpdate](doc//CastUpdate.md) - - [ChangePasswordDto](doc//ChangePasswordDto.md) - - [Colorspace](doc//Colorspace.md) - - [ContributorCountResponseDto](doc//ContributorCountResponseDto.md) - - [CreateAlbumDto](doc//CreateAlbumDto.md) - - [CreateLibraryDto](doc//CreateLibraryDto.md) - - [CreateProfileImageResponseDto](doc//CreateProfileImageResponseDto.md) - - [CropParameters](doc//CropParameters.md) - - [DatabaseBackupConfig](doc//DatabaseBackupConfig.md) - - [DatabaseBackupDeleteDto](doc//DatabaseBackupDeleteDto.md) - - [DatabaseBackupDto](doc//DatabaseBackupDto.md) - - [DatabaseBackupListResponseDto](doc//DatabaseBackupListResponseDto.md) - - [DownloadArchiveDto](doc//DownloadArchiveDto.md) - - [DownloadArchiveInfo](doc//DownloadArchiveInfo.md) - - [DownloadInfoDto](doc//DownloadInfoDto.md) - - [DownloadResponse](doc//DownloadResponse.md) - - [DownloadResponseDto](doc//DownloadResponseDto.md) - - [DownloadUpdate](doc//DownloadUpdate.md) - - [DuplicateDetectionConfig](doc//DuplicateDetectionConfig.md) - - [DuplicateResolveDto](doc//DuplicateResolveDto.md) - - [DuplicateResolveGroupDto](doc//DuplicateResolveGroupDto.md) - - [DuplicateResponseDto](doc//DuplicateResponseDto.md) - - [EmailNotificationsResponse](doc//EmailNotificationsResponse.md) - - [EmailNotificationsUpdate](doc//EmailNotificationsUpdate.md) - - [ExifResponseDto](doc//ExifResponseDto.md) - - [FaceDto](doc//FaceDto.md) - - [FacialRecognitionConfig](doc//FacialRecognitionConfig.md) - - [FoldersResponse](doc//FoldersResponse.md) - - [FoldersUpdate](doc//FoldersUpdate.md) - - [ImageFormat](doc//ImageFormat.md) - - [IntegrityReport](doc//IntegrityReport.md) - - [IntegrityReportResponseDto](doc//IntegrityReportResponseDto.md) - - [IntegrityReportResponseDtoItemsInner](doc//IntegrityReportResponseDtoItemsInner.md) - - [IntegrityReportSummaryResponseDto](doc//IntegrityReportSummaryResponseDto.md) - - [JobCreateDto](doc//JobCreateDto.md) - - [JobName](doc//JobName.md) - - [JobSettingsDto](doc//JobSettingsDto.md) - - [LibraryResponseDto](doc//LibraryResponseDto.md) - - [LibraryStatsResponseDto](doc//LibraryStatsResponseDto.md) - - [LicenseKeyDto](doc//LicenseKeyDto.md) - - [LogLevel](doc//LogLevel.md) - - [LoginCredentialDto](doc//LoginCredentialDto.md) - - [LoginResponseDto](doc//LoginResponseDto.md) - - [LogoutResponseDto](doc//LogoutResponseDto.md) - - [MachineLearningAvailabilityChecksDto](doc//MachineLearningAvailabilityChecksDto.md) - - [MaintenanceAction](doc//MaintenanceAction.md) - - [MaintenanceAuthDto](doc//MaintenanceAuthDto.md) - - [MaintenanceDetectInstallResponseDto](doc//MaintenanceDetectInstallResponseDto.md) - - [MaintenanceDetectInstallStorageFolderDto](doc//MaintenanceDetectInstallStorageFolderDto.md) - - [MaintenanceLoginDto](doc//MaintenanceLoginDto.md) - - [MaintenanceStatusResponseDto](doc//MaintenanceStatusResponseDto.md) - - [ManualJobName](doc//ManualJobName.md) - - [MapMarkerResponseDto](doc//MapMarkerResponseDto.md) - - [MapReverseGeocodeResponseDto](doc//MapReverseGeocodeResponseDto.md) - - [MemoriesResponse](doc//MemoriesResponse.md) - - [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) - - [MergePersonDto](doc//MergePersonDto.md) - - [MetadataSearchDto](doc//MetadataSearchDto.md) - - [MirrorAxis](doc//MirrorAxis.md) - - [MirrorParameters](doc//MirrorParameters.md) - - [NotificationCreateDto](doc//NotificationCreateDto.md) - - [NotificationDeleteAllDto](doc//NotificationDeleteAllDto.md) - - [NotificationDto](doc//NotificationDto.md) - - [NotificationLevel](doc//NotificationLevel.md) - - [NotificationType](doc//NotificationType.md) - - [NotificationUpdateAllDto](doc//NotificationUpdateAllDto.md) - - [NotificationUpdateDto](doc//NotificationUpdateDto.md) - - [OAuthAuthorizeResponseDto](doc//OAuthAuthorizeResponseDto.md) - - [OAuthCallbackDto](doc//OAuthCallbackDto.md) - - [OAuthConfigDto](doc//OAuthConfigDto.md) - - [OAuthTokenEndpointAuthMethod](doc//OAuthTokenEndpointAuthMethod.md) - - [OcrConfig](doc//OcrConfig.md) - - [OnThisDayDto](doc//OnThisDayDto.md) - - [OnboardingDto](doc//OnboardingDto.md) - - [OnboardingResponseDto](doc//OnboardingResponseDto.md) - - [PartnerCreateDto](doc//PartnerCreateDto.md) - - [PartnerDirection](doc//PartnerDirection.md) - - [PartnerResponseDto](doc//PartnerResponseDto.md) - - [PartnerUpdateDto](doc//PartnerUpdateDto.md) - - [PeopleResponse](doc//PeopleResponse.md) - - [PeopleResponseDto](doc//PeopleResponseDto.md) - - [PeopleUpdate](doc//PeopleUpdate.md) - - [PeopleUpdateDto](doc//PeopleUpdateDto.md) - - [PeopleUpdateItem](doc//PeopleUpdateItem.md) - - [Permission](doc//Permission.md) - - [PersonCreateDto](doc//PersonCreateDto.md) - - [PersonResponseDto](doc//PersonResponseDto.md) - - [PersonStatisticsResponseDto](doc//PersonStatisticsResponseDto.md) - - [PersonUpdateDto](doc//PersonUpdateDto.md) - - [PinCodeChangeDto](doc//PinCodeChangeDto.md) - - [PinCodeResetDto](doc//PinCodeResetDto.md) - - [PinCodeSetupDto](doc//PinCodeSetupDto.md) - - [PlacesResponseDto](doc//PlacesResponseDto.md) - - [PluginMethodResponseDto](doc//PluginMethodResponseDto.md) - - [PluginResponseDto](doc//PluginResponseDto.md) - - [PluginTemplateResponseDto](doc//PluginTemplateResponseDto.md) - - [PluginTemplateStepResponseDto](doc//PluginTemplateStepResponseDto.md) - - [PurchaseResponse](doc//PurchaseResponse.md) - - [PurchaseUpdate](doc//PurchaseUpdate.md) - - [QueueCommand](doc//QueueCommand.md) - - [QueueCommandDto](doc//QueueCommandDto.md) - - [QueueDeleteDto](doc//QueueDeleteDto.md) - - [QueueJobResponseDto](doc//QueueJobResponseDto.md) - - [QueueJobStatus](doc//QueueJobStatus.md) - - [QueueName](doc//QueueName.md) - - [QueueResponseDto](doc//QueueResponseDto.md) - - [QueueResponseLegacyDto](doc//QueueResponseLegacyDto.md) - - [QueueStatisticsDto](doc//QueueStatisticsDto.md) - - [QueueStatusLegacyDto](doc//QueueStatusLegacyDto.md) - - [QueueUpdateDto](doc//QueueUpdateDto.md) - - [QueuesResponseLegacyDto](doc//QueuesResponseLegacyDto.md) - - [RandomSearchDto](doc//RandomSearchDto.md) - - [RatingsResponse](doc//RatingsResponse.md) - - [RatingsUpdate](doc//RatingsUpdate.md) - - [ReactionLevel](doc//ReactionLevel.md) - - [ReactionType](doc//ReactionType.md) - - [ReleaseChannel](doc//ReleaseChannel.md) - - [ReleaseEventV1](doc//ReleaseEventV1.md) - - [ReleaseType](doc//ReleaseType.md) - - [ReverseGeocodingStateResponseDto](doc//ReverseGeocodingStateResponseDto.md) - - [RotateParameters](doc//RotateParameters.md) - - [SearchAlbumResponseDto](doc//SearchAlbumResponseDto.md) - - [SearchAssetResponseDto](doc//SearchAssetResponseDto.md) - - [SearchExploreItem](doc//SearchExploreItem.md) - - [SearchExploreResponseDto](doc//SearchExploreResponseDto.md) - - [SearchFacetCountResponseDto](doc//SearchFacetCountResponseDto.md) - - [SearchFacetResponseDto](doc//SearchFacetResponseDto.md) - - [SearchResponseDto](doc//SearchResponseDto.md) - - [SearchStatisticsResponseDto](doc//SearchStatisticsResponseDto.md) - - [SearchSuggestionType](doc//SearchSuggestionType.md) - - [ServerAboutResponseDto](doc//ServerAboutResponseDto.md) - - [ServerApkLinksDto](doc//ServerApkLinksDto.md) - - [ServerConfigDto](doc//ServerConfigDto.md) - - [ServerFeaturesDto](doc//ServerFeaturesDto.md) - - [ServerMediaTypesResponseDto](doc//ServerMediaTypesResponseDto.md) - - [ServerPingResponse](doc//ServerPingResponse.md) - - [ServerStatsResponseDto](doc//ServerStatsResponseDto.md) - - [ServerStorageResponseDto](doc//ServerStorageResponseDto.md) - - [ServerVersionHistoryResponseDto](doc//ServerVersionHistoryResponseDto.md) - - [ServerVersionResponseDto](doc//ServerVersionResponseDto.md) - - [SessionCreateDto](doc//SessionCreateDto.md) - - [SessionCreateResponseDto](doc//SessionCreateResponseDto.md) - - [SessionResponseDto](doc//SessionResponseDto.md) - - [SessionUnlockDto](doc//SessionUnlockDto.md) - - [SessionUpdateDto](doc//SessionUpdateDto.md) - - [SetMaintenanceModeDto](doc//SetMaintenanceModeDto.md) - - [SharedLinkCreateDto](doc//SharedLinkCreateDto.md) - - [SharedLinkEditDto](doc//SharedLinkEditDto.md) - - [SharedLinkLoginDto](doc//SharedLinkLoginDto.md) - - [SharedLinkResponseDto](doc//SharedLinkResponseDto.md) - - [SharedLinkType](doc//SharedLinkType.md) - - [SharedLinksResponse](doc//SharedLinksResponse.md) - - [SharedLinksUpdate](doc//SharedLinksUpdate.md) - - [SignUpDto](doc//SignUpDto.md) - - [SmartSearchDto](doc//SmartSearchDto.md) - - [SourceType](doc//SourceType.md) - - [StackCreateDto](doc//StackCreateDto.md) - - [StackResponseDto](doc//StackResponseDto.md) - - [StackUpdateDto](doc//StackUpdateDto.md) - - [StatisticsSearchDto](doc//StatisticsSearchDto.md) - - [StorageFolder](doc//StorageFolder.md) - - [SyncAckDeleteDto](doc//SyncAckDeleteDto.md) - - [SyncAckDto](doc//SyncAckDto.md) - - [SyncAckSetDto](doc//SyncAckSetDto.md) - - [SyncAlbumDeleteV1](doc//SyncAlbumDeleteV1.md) - - [SyncAlbumToAssetDeleteV1](doc//SyncAlbumToAssetDeleteV1.md) - - [SyncAlbumToAssetV1](doc//SyncAlbumToAssetV1.md) - - [SyncAlbumUserDeleteV1](doc//SyncAlbumUserDeleteV1.md) - - [SyncAlbumUserV1](doc//SyncAlbumUserV1.md) - - [SyncAlbumV1](doc//SyncAlbumV1.md) - - [SyncAlbumV2](doc//SyncAlbumV2.md) - - [SyncAssetDeleteV1](doc//SyncAssetDeleteV1.md) - - [SyncAssetEditDeleteV1](doc//SyncAssetEditDeleteV1.md) - - [SyncAssetEditV1](doc//SyncAssetEditV1.md) - - [SyncAssetExifV1](doc//SyncAssetExifV1.md) - - [SyncAssetFaceDeleteV1](doc//SyncAssetFaceDeleteV1.md) - - [SyncAssetFaceV1](doc//SyncAssetFaceV1.md) - - [SyncAssetFaceV2](doc//SyncAssetFaceV2.md) - - [SyncAssetMetadataDeleteV1](doc//SyncAssetMetadataDeleteV1.md) - - [SyncAssetMetadataV1](doc//SyncAssetMetadataV1.md) - - [SyncAssetOcrDeleteV1](doc//SyncAssetOcrDeleteV1.md) - - [SyncAssetOcrV1](doc//SyncAssetOcrV1.md) - - [SyncAssetV1](doc//SyncAssetV1.md) - - [SyncAssetV2](doc//SyncAssetV2.md) - - [SyncAuthUserV1](doc//SyncAuthUserV1.md) - - [SyncEntityType](doc//SyncEntityType.md) - - [SyncMemoryAssetDeleteV1](doc//SyncMemoryAssetDeleteV1.md) - - [SyncMemoryAssetV1](doc//SyncMemoryAssetV1.md) - - [SyncMemoryDeleteV1](doc//SyncMemoryDeleteV1.md) - - [SyncMemoryV1](doc//SyncMemoryV1.md) - - [SyncPartnerDeleteV1](doc//SyncPartnerDeleteV1.md) - - [SyncPartnerV1](doc//SyncPartnerV1.md) - - [SyncPersonDeleteV1](doc//SyncPersonDeleteV1.md) - - [SyncPersonV1](doc//SyncPersonV1.md) - - [SyncRequestType](doc//SyncRequestType.md) - - [SyncStackDeleteV1](doc//SyncStackDeleteV1.md) - - [SyncStackV1](doc//SyncStackV1.md) - - [SyncStreamDto](doc//SyncStreamDto.md) - - [SyncUserDeleteV1](doc//SyncUserDeleteV1.md) - - [SyncUserMetadataDeleteV1](doc//SyncUserMetadataDeleteV1.md) - - [SyncUserMetadataV1](doc//SyncUserMetadataV1.md) - - [SyncUserV1](doc//SyncUserV1.md) - - [SystemConfigBackupsDto](doc//SystemConfigBackupsDto.md) - - [SystemConfigDto](doc//SystemConfigDto.md) - - [SystemConfigFFmpegDto](doc//SystemConfigFFmpegDto.md) - - [SystemConfigFFmpegRealtimeDto](doc//SystemConfigFFmpegRealtimeDto.md) - - [SystemConfigFacesDto](doc//SystemConfigFacesDto.md) - - [SystemConfigGeneratedFullsizeImageDto](doc//SystemConfigGeneratedFullsizeImageDto.md) - - [SystemConfigGeneratedImageDto](doc//SystemConfigGeneratedImageDto.md) - - [SystemConfigImageDto](doc//SystemConfigImageDto.md) - - [SystemConfigIntegrityChecks](doc//SystemConfigIntegrityChecks.md) - - [SystemConfigIntegrityChecksumJob](doc//SystemConfigIntegrityChecksumJob.md) - - [SystemConfigIntegrityJob](doc//SystemConfigIntegrityJob.md) - - [SystemConfigJobDto](doc//SystemConfigJobDto.md) - - [SystemConfigLibraryDto](doc//SystemConfigLibraryDto.md) - - [SystemConfigLibraryScanDto](doc//SystemConfigLibraryScanDto.md) - - [SystemConfigLibraryWatchDto](doc//SystemConfigLibraryWatchDto.md) - - [SystemConfigLoggingDto](doc//SystemConfigLoggingDto.md) - - [SystemConfigMachineLearningDto](doc//SystemConfigMachineLearningDto.md) - - [SystemConfigMapDto](doc//SystemConfigMapDto.md) - - [SystemConfigMetadataDto](doc//SystemConfigMetadataDto.md) - - [SystemConfigNewVersionCheckDto](doc//SystemConfigNewVersionCheckDto.md) - - [SystemConfigNightlyTasksDto](doc//SystemConfigNightlyTasksDto.md) - - [SystemConfigNotificationsDto](doc//SystemConfigNotificationsDto.md) - - [SystemConfigOAuthDto](doc//SystemConfigOAuthDto.md) - - [SystemConfigPasswordLoginDto](doc//SystemConfigPasswordLoginDto.md) - - [SystemConfigReverseGeocodingDto](doc//SystemConfigReverseGeocodingDto.md) - - [SystemConfigServerDto](doc//SystemConfigServerDto.md) - - [SystemConfigSmtpDto](doc//SystemConfigSmtpDto.md) - - [SystemConfigSmtpTransportDto](doc//SystemConfigSmtpTransportDto.md) - - [SystemConfigStorageTemplateDto](doc//SystemConfigStorageTemplateDto.md) - - [SystemConfigTemplateEmailsDto](doc//SystemConfigTemplateEmailsDto.md) - - [SystemConfigTemplateStorageOptionDto](doc//SystemConfigTemplateStorageOptionDto.md) - - [SystemConfigTemplatesDto](doc//SystemConfigTemplatesDto.md) - - [SystemConfigThemeDto](doc//SystemConfigThemeDto.md) - - [SystemConfigTrashDto](doc//SystemConfigTrashDto.md) - - [SystemConfigUserDto](doc//SystemConfigUserDto.md) - - [TagBulkAssetsDto](doc//TagBulkAssetsDto.md) - - [TagBulkAssetsResponseDto](doc//TagBulkAssetsResponseDto.md) - - [TagCreateDto](doc//TagCreateDto.md) - - [TagResponseDto](doc//TagResponseDto.md) - - [TagUpdateDto](doc//TagUpdateDto.md) - - [TagUpsertDto](doc//TagUpsertDto.md) - - [TagsResponse](doc//TagsResponse.md) - - [TagsUpdate](doc//TagsUpdate.md) - - [TemplateDto](doc//TemplateDto.md) - - [TemplateResponseDto](doc//TemplateResponseDto.md) - - [TestEmailResponseDto](doc//TestEmailResponseDto.md) - - [TimeBucketAssetResponseDto](doc//TimeBucketAssetResponseDto.md) - - [TimeBucketsResponseDto](doc//TimeBucketsResponseDto.md) - - [ToneMapping](doc//ToneMapping.md) - - [TranscodeHWAccel](doc//TranscodeHWAccel.md) - - [TranscodePolicy](doc//TranscodePolicy.md) - - [TrashResponseDto](doc//TrashResponseDto.md) - - [UpdateAlbumDto](doc//UpdateAlbumDto.md) - - [UpdateAlbumUserDto](doc//UpdateAlbumUserDto.md) - - [UpdateAssetDto](doc//UpdateAssetDto.md) - - [UpdateLibraryDto](doc//UpdateLibraryDto.md) - - [UsageByUserDto](doc//UsageByUserDto.md) - - [UserAdminCreateDto](doc//UserAdminCreateDto.md) - - [UserAdminDeleteDto](doc//UserAdminDeleteDto.md) - - [UserAdminResponseDto](doc//UserAdminResponseDto.md) - - [UserAdminUpdateDto](doc//UserAdminUpdateDto.md) - - [UserAvatarColor](doc//UserAvatarColor.md) - - [UserLicense](doc//UserLicense.md) - - [UserMetadataKey](doc//UserMetadataKey.md) - - [UserPreferencesResponseDto](doc//UserPreferencesResponseDto.md) - - [UserPreferencesUpdateDto](doc//UserPreferencesUpdateDto.md) - - [UserResponseDto](doc//UserResponseDto.md) - - [UserStatus](doc//UserStatus.md) - - [UserUpdateMeDto](doc//UserUpdateMeDto.md) - - [ValidateAccessTokenResponseDto](doc//ValidateAccessTokenResponseDto.md) - - [ValidateLibraryDto](doc//ValidateLibraryDto.md) - - [ValidateLibraryImportPathResponseDto](doc//ValidateLibraryImportPathResponseDto.md) - - [ValidateLibraryResponseDto](doc//ValidateLibraryResponseDto.md) - - [VersionCheckStateResponseDto](doc//VersionCheckStateResponseDto.md) - - [VideoCodec](doc//VideoCodec.md) - - [VideoContainer](doc//VideoContainer.md) - - [WorkflowCreateDto](doc//WorkflowCreateDto.md) - - [WorkflowResponseDto](doc//WorkflowResponseDto.md) - - [WorkflowShareResponseDto](doc//WorkflowShareResponseDto.md) - - [WorkflowShareStepDto](doc//WorkflowShareStepDto.md) - - [WorkflowStepDto](doc//WorkflowStepDto.md) - - [WorkflowTrigger](doc//WorkflowTrigger.md) - - [WorkflowTriggerResponseDto](doc//WorkflowTriggerResponseDto.md) - - [WorkflowType](doc//WorkflowType.md) - - [WorkflowUpdateDto](doc//WorkflowUpdateDto.md) - - -## Documentation For Authorization - - -Authentication schemes defined for the API: -### bearer - -- **Type**: HTTP Bearer authentication - -### cookie - -- **Type**: API key -- **API key parameter name**: immich_access_token -- **Location**: - -### api_key - -- **Type**: API key -- **API key parameter name**: x-api-key -- **Location**: HTTP header - - -## Author - - - diff --git a/mobile/openapi/git_push.sh b/mobile/openapi/git_push.sh deleted file mode 100644 index f53a75d4fa..0000000000 --- a/mobile/openapi/git_push.sh +++ /dev/null @@ -1,57 +0,0 @@ -#!/bin/sh -# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ -# -# Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" "gitlab.com" - -git_user_id=$1 -git_repo_id=$2 -release_note=$3 -git_host=$4 - -if [ "$git_host" = "" ]; then - git_host="github.com" - echo "[INFO] No command line input provided. Set \$git_host to $git_host" -fi - -if [ "$git_user_id" = "" ]; then - git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" -fi - -if [ "$git_repo_id" = "" ]; then - git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" -fi - -if [ "$release_note" = "" ]; then - release_note="Minor update" - echo "[INFO] No command line input provided. Set \$release_note to $release_note" -fi - -# Initialize the local directory as a Git repository -git init - -# Adds the files in the local repository and stages them for commit. -git add . - -# Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "$release_note" - -# Sets the new remote -git_remote=$(git remote) -if [ "$git_remote" = "" ]; then # git remote not defined - - if [ "$GIT_TOKEN" = "" ]; then - echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git - else - git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git - fi - -fi - -git pull origin master - -# Pushes (Forces) the changes in the local repository up to the remote repository -echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git" -git push origin master 2>&1 | grep -v 'To https' diff --git a/mobile/openapi/lib/api.dart b/mobile/openapi/lib/api.dart deleted file mode 100644 index 413a64040c..0000000000 --- a/mobile/openapi/lib/api.dart +++ /dev/null @@ -1,454 +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 - -library openapi.api; - -import 'dart:async'; -import 'dart:convert'; -import 'dart:io'; - -import 'package:collection/collection.dart'; -import 'package:flutter/foundation.dart'; -import 'package:immich_mobile/utils/openapi_patching.dart'; -import 'package:http/http.dart'; -import 'package:intl/intl.dart'; -import 'package:meta/meta.dart'; - -part 'api_client.dart'; -part 'api_helper.dart'; -part 'api_exception.dart'; -part 'auth/authentication.dart'; -part 'auth/api_key_auth.dart'; -part 'auth/oauth.dart'; -part 'auth/http_basic_auth.dart'; -part 'auth/http_bearer_auth.dart'; -part 'optional.dart'; - -part 'api/api_keys_api.dart'; -part 'api/activities_api.dart'; -part 'api/albums_api.dart'; -part 'api/assets_api.dart'; -part 'api/authentication_api.dart'; -part 'api/authentication_admin_api.dart'; -part 'api/database_backups_admin_api.dart'; -part 'api/deprecated_api.dart'; -part 'api/download_api.dart'; -part 'api/duplicates_api.dart'; -part 'api/faces_api.dart'; -part 'api/jobs_api.dart'; -part 'api/libraries_api.dart'; -part 'api/maintenance_admin_api.dart'; -part 'api/map_api.dart'; -part 'api/memories_api.dart'; -part 'api/notifications_api.dart'; -part 'api/notifications_admin_api.dart'; -part 'api/partners_api.dart'; -part 'api/people_api.dart'; -part 'api/plugins_api.dart'; -part 'api/queues_api.dart'; -part 'api/search_api.dart'; -part 'api/server_api.dart'; -part 'api/sessions_api.dart'; -part 'api/shared_links_api.dart'; -part 'api/stacks_api.dart'; -part 'api/sync_api.dart'; -part 'api/system_config_api.dart'; -part 'api/system_metadata_api.dart'; -part 'api/tags_api.dart'; -part 'api/timeline_api.dart'; -part 'api/trash_api.dart'; -part 'api/users_api.dart'; -part 'api/users_admin_api.dart'; -part 'api/views_api.dart'; -part 'api/workflows_api.dart'; - -part 'model/activity_create_dto.dart'; -part 'model/activity_response_dto.dart'; -part 'model/activity_statistics_response_dto.dart'; -part 'model/add_users_dto.dart'; -part 'model/admin_onboarding_update_dto.dart'; -part 'model/album_response_dto.dart'; -part 'model/album_statistics_response_dto.dart'; -part 'model/album_user_add_dto.dart'; -part 'model/album_user_create_dto.dart'; -part 'model/album_user_response_dto.dart'; -part 'model/album_user_role.dart'; -part 'model/albums_add_assets_dto.dart'; -part 'model/albums_add_assets_response_dto.dart'; -part 'model/albums_response.dart'; -part 'model/albums_update.dart'; -part 'model/api_key_create_dto.dart'; -part 'model/api_key_create_response_dto.dart'; -part 'model/api_key_response_dto.dart'; -part 'model/api_key_update_dto.dart'; -part 'model/asset_bulk_delete_dto.dart'; -part 'model/asset_bulk_update_dto.dart'; -part 'model/asset_bulk_upload_check_dto.dart'; -part 'model/asset_bulk_upload_check_item.dart'; -part 'model/asset_bulk_upload_check_response_dto.dart'; -part 'model/asset_bulk_upload_check_result.dart'; -part 'model/asset_copy_dto.dart'; -part 'model/asset_edit_action.dart'; -part 'model/asset_edit_action_item_dto.dart'; -part 'model/asset_edit_action_item_dto_parameters.dart'; -part 'model/asset_edit_action_item_response_dto.dart'; -part 'model/asset_edits_create_dto.dart'; -part 'model/asset_edits_response_dto.dart'; -part 'model/asset_face_create_dto.dart'; -part 'model/asset_face_delete_dto.dart'; -part 'model/asset_face_response_dto.dart'; -part 'model/asset_face_update_dto.dart'; -part 'model/asset_face_update_item.dart'; -part 'model/asset_id_error_reason.dart'; -part 'model/asset_ids_dto.dart'; -part 'model/asset_ids_response_dto.dart'; -part 'model/asset_job_name.dart'; -part 'model/asset_jobs_dto.dart'; -part 'model/asset_media_response_dto.dart'; -part 'model/asset_media_size.dart'; -part 'model/asset_media_status.dart'; -part 'model/asset_metadata_bulk_delete_dto.dart'; -part 'model/asset_metadata_bulk_delete_item_dto.dart'; -part 'model/asset_metadata_bulk_response_dto.dart'; -part 'model/asset_metadata_bulk_upsert_dto.dart'; -part 'model/asset_metadata_bulk_upsert_item_dto.dart'; -part 'model/asset_metadata_response_dto.dart'; -part 'model/asset_metadata_upsert_dto.dart'; -part 'model/asset_metadata_upsert_item_dto.dart'; -part 'model/asset_ocr_response_dto.dart'; -part 'model/asset_order.dart'; -part 'model/asset_order_by.dart'; -part 'model/asset_reject_reason.dart'; -part 'model/asset_response_dto.dart'; -part 'model/asset_stack_response_dto.dart'; -part 'model/asset_stats_response_dto.dart'; -part 'model/asset_type_enum.dart'; -part 'model/asset_upload_action.dart'; -part 'model/asset_visibility.dart'; -part 'model/audio_codec.dart'; -part 'model/auth_status_response_dto.dart'; -part 'model/avatar_update.dart'; -part 'model/bulk_id_error_reason.dart'; -part 'model/bulk_id_response_dto.dart'; -part 'model/bulk_ids_dto.dart'; -part 'model/clip_config.dart'; -part 'model/cq_mode.dart'; -part 'model/calendar_heatmap_response_dto.dart'; -part 'model/calendar_heatmap_response_dto_series_inner.dart'; -part 'model/calendar_heatmap_type.dart'; -part 'model/cast_response.dart'; -part 'model/cast_update.dart'; -part 'model/change_password_dto.dart'; -part 'model/colorspace.dart'; -part 'model/contributor_count_response_dto.dart'; -part 'model/create_album_dto.dart'; -part 'model/create_library_dto.dart'; -part 'model/create_profile_image_response_dto.dart'; -part 'model/crop_parameters.dart'; -part 'model/database_backup_config.dart'; -part 'model/database_backup_delete_dto.dart'; -part 'model/database_backup_dto.dart'; -part 'model/database_backup_list_response_dto.dart'; -part 'model/download_archive_dto.dart'; -part 'model/download_archive_info.dart'; -part 'model/download_info_dto.dart'; -part 'model/download_response.dart'; -part 'model/download_response_dto.dart'; -part 'model/download_update.dart'; -part 'model/duplicate_detection_config.dart'; -part 'model/duplicate_resolve_dto.dart'; -part 'model/duplicate_resolve_group_dto.dart'; -part 'model/duplicate_response_dto.dart'; -part 'model/email_notifications_response.dart'; -part 'model/email_notifications_update.dart'; -part 'model/exif_response_dto.dart'; -part 'model/face_dto.dart'; -part 'model/facial_recognition_config.dart'; -part 'model/folders_response.dart'; -part 'model/folders_update.dart'; -part 'model/image_format.dart'; -part 'model/integrity_report.dart'; -part 'model/integrity_report_response_dto.dart'; -part 'model/integrity_report_response_dto_items_inner.dart'; -part 'model/integrity_report_summary_response_dto.dart'; -part 'model/job_create_dto.dart'; -part 'model/job_name.dart'; -part 'model/job_settings_dto.dart'; -part 'model/library_response_dto.dart'; -part 'model/library_stats_response_dto.dart'; -part 'model/license_key_dto.dart'; -part 'model/log_level.dart'; -part 'model/login_credential_dto.dart'; -part 'model/login_response_dto.dart'; -part 'model/logout_response_dto.dart'; -part 'model/machine_learning_availability_checks_dto.dart'; -part 'model/maintenance_action.dart'; -part 'model/maintenance_auth_dto.dart'; -part 'model/maintenance_detect_install_response_dto.dart'; -part 'model/maintenance_detect_install_storage_folder_dto.dart'; -part 'model/maintenance_login_dto.dart'; -part 'model/maintenance_status_response_dto.dart'; -part 'model/manual_job_name.dart'; -part 'model/map_marker_response_dto.dart'; -part 'model/map_reverse_geocode_response_dto.dart'; -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'; -part 'model/merge_person_dto.dart'; -part 'model/metadata_search_dto.dart'; -part 'model/mirror_axis.dart'; -part 'model/mirror_parameters.dart'; -part 'model/notification_create_dto.dart'; -part 'model/notification_delete_all_dto.dart'; -part 'model/notification_dto.dart'; -part 'model/notification_level.dart'; -part 'model/notification_type.dart'; -part 'model/notification_update_all_dto.dart'; -part 'model/notification_update_dto.dart'; -part 'model/o_auth_authorize_response_dto.dart'; -part 'model/o_auth_callback_dto.dart'; -part 'model/o_auth_config_dto.dart'; -part 'model/o_auth_token_endpoint_auth_method.dart'; -part 'model/ocr_config.dart'; -part 'model/on_this_day_dto.dart'; -part 'model/onboarding_dto.dart'; -part 'model/onboarding_response_dto.dart'; -part 'model/partner_create_dto.dart'; -part 'model/partner_direction.dart'; -part 'model/partner_response_dto.dart'; -part 'model/partner_update_dto.dart'; -part 'model/people_response.dart'; -part 'model/people_response_dto.dart'; -part 'model/people_update.dart'; -part 'model/people_update_dto.dart'; -part 'model/people_update_item.dart'; -part 'model/permission.dart'; -part 'model/person_create_dto.dart'; -part 'model/person_response_dto.dart'; -part 'model/person_statistics_response_dto.dart'; -part 'model/person_update_dto.dart'; -part 'model/pin_code_change_dto.dart'; -part 'model/pin_code_reset_dto.dart'; -part 'model/pin_code_setup_dto.dart'; -part 'model/places_response_dto.dart'; -part 'model/plugin_method_response_dto.dart'; -part 'model/plugin_response_dto.dart'; -part 'model/plugin_template_response_dto.dart'; -part 'model/plugin_template_step_response_dto.dart'; -part 'model/purchase_response.dart'; -part 'model/purchase_update.dart'; -part 'model/queue_command.dart'; -part 'model/queue_command_dto.dart'; -part 'model/queue_delete_dto.dart'; -part 'model/queue_job_response_dto.dart'; -part 'model/queue_job_status.dart'; -part 'model/queue_name.dart'; -part 'model/queue_response_dto.dart'; -part 'model/queue_response_legacy_dto.dart'; -part 'model/queue_statistics_dto.dart'; -part 'model/queue_status_legacy_dto.dart'; -part 'model/queue_update_dto.dart'; -part 'model/queues_response_legacy_dto.dart'; -part 'model/random_search_dto.dart'; -part 'model/ratings_response.dart'; -part 'model/ratings_update.dart'; -part 'model/reaction_level.dart'; -part 'model/reaction_type.dart'; -part 'model/release_channel.dart'; -part 'model/release_event_v1.dart'; -part 'model/release_type.dart'; -part 'model/reverse_geocoding_state_response_dto.dart'; -part 'model/rotate_parameters.dart'; -part 'model/search_album_response_dto.dart'; -part 'model/search_asset_response_dto.dart'; -part 'model/search_explore_item.dart'; -part 'model/search_explore_response_dto.dart'; -part 'model/search_facet_count_response_dto.dart'; -part 'model/search_facet_response_dto.dart'; -part 'model/search_response_dto.dart'; -part 'model/search_statistics_response_dto.dart'; -part 'model/search_suggestion_type.dart'; -part 'model/server_about_response_dto.dart'; -part 'model/server_apk_links_dto.dart'; -part 'model/server_config_dto.dart'; -part 'model/server_features_dto.dart'; -part 'model/server_media_types_response_dto.dart'; -part 'model/server_ping_response.dart'; -part 'model/server_stats_response_dto.dart'; -part 'model/server_storage_response_dto.dart'; -part 'model/server_version_history_response_dto.dart'; -part 'model/server_version_response_dto.dart'; -part 'model/session_create_dto.dart'; -part 'model/session_create_response_dto.dart'; -part 'model/session_response_dto.dart'; -part 'model/session_unlock_dto.dart'; -part 'model/session_update_dto.dart'; -part 'model/set_maintenance_mode_dto.dart'; -part 'model/shared_link_create_dto.dart'; -part 'model/shared_link_edit_dto.dart'; -part 'model/shared_link_login_dto.dart'; -part 'model/shared_link_response_dto.dart'; -part 'model/shared_link_type.dart'; -part 'model/shared_links_response.dart'; -part 'model/shared_links_update.dart'; -part 'model/sign_up_dto.dart'; -part 'model/smart_search_dto.dart'; -part 'model/source_type.dart'; -part 'model/stack_create_dto.dart'; -part 'model/stack_response_dto.dart'; -part 'model/stack_update_dto.dart'; -part 'model/statistics_search_dto.dart'; -part 'model/storage_folder.dart'; -part 'model/sync_ack_delete_dto.dart'; -part 'model/sync_ack_dto.dart'; -part 'model/sync_ack_set_dto.dart'; -part 'model/sync_album_delete_v1.dart'; -part 'model/sync_album_to_asset_delete_v1.dart'; -part 'model/sync_album_to_asset_v1.dart'; -part 'model/sync_album_user_delete_v1.dart'; -part 'model/sync_album_user_v1.dart'; -part 'model/sync_album_v1.dart'; -part 'model/sync_album_v2.dart'; -part 'model/sync_asset_delete_v1.dart'; -part 'model/sync_asset_edit_delete_v1.dart'; -part 'model/sync_asset_edit_v1.dart'; -part 'model/sync_asset_exif_v1.dart'; -part 'model/sync_asset_face_delete_v1.dart'; -part 'model/sync_asset_face_v1.dart'; -part 'model/sync_asset_face_v2.dart'; -part 'model/sync_asset_metadata_delete_v1.dart'; -part 'model/sync_asset_metadata_v1.dart'; -part 'model/sync_asset_ocr_delete_v1.dart'; -part 'model/sync_asset_ocr_v1.dart'; -part 'model/sync_asset_v1.dart'; -part 'model/sync_asset_v2.dart'; -part 'model/sync_auth_user_v1.dart'; -part 'model/sync_entity_type.dart'; -part 'model/sync_memory_asset_delete_v1.dart'; -part 'model/sync_memory_asset_v1.dart'; -part 'model/sync_memory_delete_v1.dart'; -part 'model/sync_memory_v1.dart'; -part 'model/sync_partner_delete_v1.dart'; -part 'model/sync_partner_v1.dart'; -part 'model/sync_person_delete_v1.dart'; -part 'model/sync_person_v1.dart'; -part 'model/sync_request_type.dart'; -part 'model/sync_stack_delete_v1.dart'; -part 'model/sync_stack_v1.dart'; -part 'model/sync_stream_dto.dart'; -part 'model/sync_user_delete_v1.dart'; -part 'model/sync_user_metadata_delete_v1.dart'; -part 'model/sync_user_metadata_v1.dart'; -part 'model/sync_user_v1.dart'; -part 'model/system_config_backups_dto.dart'; -part 'model/system_config_dto.dart'; -part 'model/system_config_f_fmpeg_dto.dart'; -part 'model/system_config_f_fmpeg_realtime_dto.dart'; -part 'model/system_config_faces_dto.dart'; -part 'model/system_config_generated_fullsize_image_dto.dart'; -part 'model/system_config_generated_image_dto.dart'; -part 'model/system_config_image_dto.dart'; -part 'model/system_config_integrity_checks.dart'; -part 'model/system_config_integrity_checksum_job.dart'; -part 'model/system_config_integrity_job.dart'; -part 'model/system_config_job_dto.dart'; -part 'model/system_config_library_dto.dart'; -part 'model/system_config_library_scan_dto.dart'; -part 'model/system_config_library_watch_dto.dart'; -part 'model/system_config_logging_dto.dart'; -part 'model/system_config_machine_learning_dto.dart'; -part 'model/system_config_map_dto.dart'; -part 'model/system_config_metadata_dto.dart'; -part 'model/system_config_new_version_check_dto.dart'; -part 'model/system_config_nightly_tasks_dto.dart'; -part 'model/system_config_notifications_dto.dart'; -part 'model/system_config_o_auth_dto.dart'; -part 'model/system_config_password_login_dto.dart'; -part 'model/system_config_reverse_geocoding_dto.dart'; -part 'model/system_config_server_dto.dart'; -part 'model/system_config_smtp_dto.dart'; -part 'model/system_config_smtp_transport_dto.dart'; -part 'model/system_config_storage_template_dto.dart'; -part 'model/system_config_template_emails_dto.dart'; -part 'model/system_config_template_storage_option_dto.dart'; -part 'model/system_config_templates_dto.dart'; -part 'model/system_config_theme_dto.dart'; -part 'model/system_config_trash_dto.dart'; -part 'model/system_config_user_dto.dart'; -part 'model/tag_bulk_assets_dto.dart'; -part 'model/tag_bulk_assets_response_dto.dart'; -part 'model/tag_create_dto.dart'; -part 'model/tag_response_dto.dart'; -part 'model/tag_update_dto.dart'; -part 'model/tag_upsert_dto.dart'; -part 'model/tags_response.dart'; -part 'model/tags_update.dart'; -part 'model/template_dto.dart'; -part 'model/template_response_dto.dart'; -part 'model/test_email_response_dto.dart'; -part 'model/time_bucket_asset_response_dto.dart'; -part 'model/time_buckets_response_dto.dart'; -part 'model/tone_mapping.dart'; -part 'model/transcode_hw_accel.dart'; -part 'model/transcode_policy.dart'; -part 'model/trash_response_dto.dart'; -part 'model/update_album_dto.dart'; -part 'model/update_album_user_dto.dart'; -part 'model/update_asset_dto.dart'; -part 'model/update_library_dto.dart'; -part 'model/usage_by_user_dto.dart'; -part 'model/user_admin_create_dto.dart'; -part 'model/user_admin_delete_dto.dart'; -part 'model/user_admin_response_dto.dart'; -part 'model/user_admin_update_dto.dart'; -part 'model/user_avatar_color.dart'; -part 'model/user_license.dart'; -part 'model/user_metadata_key.dart'; -part 'model/user_preferences_response_dto.dart'; -part 'model/user_preferences_update_dto.dart'; -part 'model/user_response_dto.dart'; -part 'model/user_status.dart'; -part 'model/user_update_me_dto.dart'; -part 'model/validate_access_token_response_dto.dart'; -part 'model/validate_library_dto.dart'; -part 'model/validate_library_import_path_response_dto.dart'; -part 'model/validate_library_response_dto.dart'; -part 'model/version_check_state_response_dto.dart'; -part 'model/video_codec.dart'; -part 'model/video_container.dart'; -part 'model/workflow_create_dto.dart'; -part 'model/workflow_response_dto.dart'; -part 'model/workflow_share_response_dto.dart'; -part 'model/workflow_share_step_dto.dart'; -part 'model/workflow_step_dto.dart'; -part 'model/workflow_trigger.dart'; -part 'model/workflow_trigger_response_dto.dart'; -part 'model/workflow_type.dart'; -part 'model/workflow_update_dto.dart'; - - -/// An [ApiClient] instance that uses the default values obtained from -/// the OpenAPI specification file. -var defaultApiClient = ApiClient(); - -const _delimiters = {'csv': ',', 'ssv': ' ', 'tsv': '\t', 'pipes': '|'}; -const _dateEpochMarker = 'epoch'; -const _deepEquality = DeepCollectionEquality(); -final _dateFormatter = DateFormat('yyyy-MM-dd'); -final _regList = RegExp(r'^List<(.*)>$'); -final _regSet = RegExp(r'^Set<(.*)>$'); -final _regMap = RegExp(r'^Map$'); - -bool _isEpochMarker(String? pattern) => pattern == _dateEpochMarker || pattern == '/$_dateEpochMarker/'; diff --git a/mobile/openapi/lib/api/activities_api.dart b/mobile/openapi/lib/api/activities_api.dart deleted file mode 100644 index 490c418785..0000000000 --- a/mobile/openapi/lib/api/activities_api.dart +++ /dev/null @@ -1,291 +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 ActivitiesApi { - ActivitiesApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient; - - final ApiClient apiClient; - - /// 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]. - /// - /// Parameters: - /// - /// * [ActivityCreateDto] activityCreateDto (required): - Future createActivityWithHttpInfo(ActivityCreateDto activityCreateDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/activities'; - - // ignore: prefer_final_locals - Object? postBody = activityCreateDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'POST', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Create an activity - /// - /// Create a like or a comment for an album, or an asset in an album. - /// - /// Parameters: - /// - /// * [ActivityCreateDto] activityCreateDto (required): - Future createActivity(ActivityCreateDto activityCreateDto, { Future? abortTrigger, }) async { - final response = await createActivityWithHttpInfo(activityCreateDto, abortTrigger: abortTrigger,); - 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), 'ActivityResponseDto',) as ActivityResponseDto; - - } - return null; - } - - /// Delete an activity - /// - /// Removes a like or comment from a given album or asset in an album. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - Future deleteActivityWithHttpInfo(String id, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/activities/{id}' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'DELETE', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Delete an activity - /// - /// Removes a like or comment from a given album or asset in an album. - /// - /// Parameters: - /// - /// * [String] id (required): - Future deleteActivity(String id, { Future? abortTrigger, }) async { - final response = await deleteActivityWithHttpInfo(id, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - } - - /// 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]. - /// - /// Parameters: - /// - /// * [String] albumId (required): - /// Album ID - /// - /// * [String] assetId: - /// Asset ID (if activity is for an asset) - /// - /// * [ReactionLevel] level: - /// - /// * [ReactionType] type: - /// - /// * [String] userId: - /// Filter by user ID - Future getActivitiesWithHttpInfo(String albumId, { String? assetId, ReactionLevel? level, ReactionType? type, String? userId, Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/activities'; - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - queryParams.addAll(_queryParams('', 'albumId', albumId)); - if (assetId != null) { - queryParams.addAll(_queryParams('', 'assetId', assetId)); - } - if (level != null) { - queryParams.addAll(_queryParams('', 'level', level)); - } - if (type != null) { - queryParams.addAll(_queryParams('', 'type', type)); - } - if (userId != null) { - queryParams.addAll(_queryParams('', 'userId', userId)); - } - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// 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: - /// - /// * [String] albumId (required): - /// Album ID - /// - /// * [String] assetId: - /// Asset ID (if activity is for an asset) - /// - /// * [ReactionLevel] level: - /// - /// * [ReactionType] type: - /// - /// * [String] userId: - /// Filter by user ID - Future?> getActivities(String albumId, { String? assetId, ReactionLevel? level, ReactionType? type, String? userId, Future? abortTrigger, }) async { - final response = await getActivitiesWithHttpInfo(albumId, assetId: assetId, level: level, type: type, userId: userId, abortTrigger: abortTrigger,); - 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; - } - - /// 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]. - /// - /// Parameters: - /// - /// * [String] albumId (required): - /// Album ID - /// - /// * [String] assetId: - /// Asset ID (if activity is for an asset) - Future getActivityStatisticsWithHttpInfo(String albumId, { String? assetId, Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/activities/statistics'; - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - queryParams.addAll(_queryParams('', 'albumId', albumId)); - if (assetId != null) { - queryParams.addAll(_queryParams('', 'assetId', assetId)); - } - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Retrieve activity statistics - /// - /// Returns the number of likes and comments for a given album or asset in an album. - /// - /// Parameters: - /// - /// * [String] albumId (required): - /// Album ID - /// - /// * [String] assetId: - /// Asset ID (if activity is for an asset) - Future getActivityStatistics(String albumId, { String? assetId, Future? abortTrigger, }) async { - final response = await getActivityStatisticsWithHttpInfo(albumId, assetId: assetId, abortTrigger: abortTrigger,); - 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), 'ActivityStatisticsResponseDto',) as ActivityStatisticsResponseDto; - - } - return null; - } -} diff --git a/mobile/openapi/lib/api/albums_api.dart b/mobile/openapi/lib/api/albums_api.dart deleted file mode 100644 index e6e7cdbf40..0000000000 --- a/mobile/openapi/lib/api/albums_api.dart +++ /dev/null @@ -1,850 +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 AlbumsApi { - AlbumsApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient; - - final ApiClient apiClient; - - /// Add assets to an album - /// - /// Add multiple assets to a specific album by its ID. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [BulkIdsDto] bulkIdsDto (required): - Future addAssetsToAlbumWithHttpInfo(String id, BulkIdsDto bulkIdsDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/albums/{id}/assets' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody = bulkIdsDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'PUT', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Add assets to an album - /// - /// Add multiple assets to a specific album by its ID. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [BulkIdsDto] bulkIdsDto (required): - Future?> addAssetsToAlbum(String id, BulkIdsDto bulkIdsDto, { Future? abortTrigger, }) async { - final response = await addAssetsToAlbumWithHttpInfo(id, bulkIdsDto, abortTrigger: abortTrigger,); - 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; - } - - /// 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]. - /// - /// Parameters: - /// - /// * [AlbumsAddAssetsDto] albumsAddAssetsDto (required): - Future addAssetsToAlbumsWithHttpInfo(AlbumsAddAssetsDto albumsAddAssetsDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/albums/assets'; - - // ignore: prefer_final_locals - Object? postBody = albumsAddAssetsDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'PUT', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Add assets to albums - /// - /// Send a list of asset IDs and album IDs to add each asset to each album. - /// - /// Parameters: - /// - /// * [AlbumsAddAssetsDto] albumsAddAssetsDto (required): - Future addAssetsToAlbums(AlbumsAddAssetsDto albumsAddAssetsDto, { Future? abortTrigger, }) async { - final response = await addAssetsToAlbumsWithHttpInfo(albumsAddAssetsDto, abortTrigger: abortTrigger,); - 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), 'AlbumsAddAssetsResponseDto',) as AlbumsAddAssetsResponseDto; - - } - return null; - } - - /// 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]. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [AddUsersDto] addUsersDto (required): - Future addUsersToAlbumWithHttpInfo(String id, AddUsersDto addUsersDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/albums/{id}/users' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody = addUsersDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'PUT', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Share album with users - /// - /// Share an album with multiple users. Each user can be given a specific role in the album. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [AddUsersDto] addUsersDto (required): - Future addUsersToAlbum(String id, AddUsersDto addUsersDto, { Future? abortTrigger, }) async { - final response = await addUsersToAlbumWithHttpInfo(id, addUsersDto, abortTrigger: abortTrigger,); - 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), 'AlbumResponseDto',) as AlbumResponseDto; - - } - return null; - } - - /// 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]. - /// - /// Parameters: - /// - /// * [CreateAlbumDto] createAlbumDto (required): - Future createAlbumWithHttpInfo(CreateAlbumDto createAlbumDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/albums'; - - // ignore: prefer_final_locals - Object? postBody = createAlbumDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'POST', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Create an album - /// - /// Create a new album. The album can also be created with initial users and assets. - /// - /// Parameters: - /// - /// * [CreateAlbumDto] createAlbumDto (required): - Future createAlbum(CreateAlbumDto createAlbumDto, { Future? abortTrigger, }) async { - final response = await createAlbumWithHttpInfo(createAlbumDto, abortTrigger: abortTrigger,); - 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), 'AlbumResponseDto',) as AlbumResponseDto; - - } - return null; - } - - /// 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]. - /// - /// Parameters: - /// - /// * [String] id (required): - Future deleteAlbumWithHttpInfo(String id, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/albums/{id}' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'DELETE', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// 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: - /// - /// * [String] id (required): - Future deleteAlbum(String id, { Future? abortTrigger, }) async { - final response = await deleteAlbumWithHttpInfo(id, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - } - - /// Retrieve an album - /// - /// Retrieve information about a specific album by its ID. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [String] key: - /// - /// * [String] slug: - Future getAlbumInfoWithHttpInfo(String id, { String? key, String? slug, Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/albums/{id}' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - if (key != null) { - queryParams.addAll(_queryParams('', 'key', key)); - } - if (slug != null) { - queryParams.addAll(_queryParams('', 'slug', slug)); - } - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Retrieve an album - /// - /// Retrieve information about a specific album by its ID. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [String] key: - /// - /// * [String] slug: - Future getAlbumInfo(String id, { String? key, String? slug, Future? abortTrigger, }) async { - final response = await getAlbumInfoWithHttpInfo(id, key: key, slug: slug, abortTrigger: abortTrigger,); - 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), 'AlbumResponseDto',) as AlbumResponseDto; - - } - return null; - } - - /// Retrieve album map markers - /// - /// Retrieve map marker information for a specific album by its ID. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [String] key: - /// - /// * [String] slug: - Future getAlbumMapMarkersWithHttpInfo(String id, { String? key, String? slug, Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/albums/{id}/map-markers' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - if (key != null) { - queryParams.addAll(_queryParams('', 'key', key)); - } - if (slug != null) { - queryParams.addAll(_queryParams('', 'slug', slug)); - } - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Retrieve album map markers - /// - /// Retrieve map marker information for a specific album by its ID. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [String] key: - /// - /// * [String] slug: - Future?> getAlbumMapMarkers(String id, { String? key, String? slug, Future? abortTrigger, }) async { - final response = await getAlbumMapMarkersWithHttpInfo(id, key: key, slug: slug, abortTrigger: abortTrigger,); - 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; - } - - /// Retrieve album statistics - /// - /// Returns statistics about the albums available to the authenticated user. - /// - /// Note: This method returns the HTTP [Response]. - Future getAlbumStatisticsWithHttpInfo({ Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/albums/statistics'; - - // 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, - abortTrigger: abortTrigger, - ); - } - - /// Retrieve album statistics - /// - /// Returns statistics about the albums available to the authenticated user. - Future getAlbumStatistics({ Future? abortTrigger, }) async { - final response = await getAlbumStatisticsWithHttpInfo(abortTrigger: abortTrigger,); - 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), 'AlbumStatisticsResponseDto',) as AlbumStatisticsResponseDto; - - } - return null; - } - - /// List all albums - /// - /// Retrieve a list of albums available to the authenticated user. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] assetId: - /// Filter albums containing this asset ID (ignores other parameters) - /// - /// * [String] id: - /// Album ID - /// - /// * [bool] isOwned: - /// Filter by ownership: true = only owned, false = only shared-with-me, undefined = no filter - /// - /// * [bool] isShared: - /// Filter by shared status: true = only shared, false = not shared, undefined = no filter - /// - /// * [String] name: - /// Album name (exact match) - Future getAllAlbumsWithHttpInfo({ String? assetId, String? id, bool? isOwned, bool? isShared, String? name, Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/albums'; - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - if (assetId != null) { - queryParams.addAll(_queryParams('', 'assetId', assetId)); - } - if (id != null) { - queryParams.addAll(_queryParams('', 'id', id)); - } - if (isOwned != null) { - queryParams.addAll(_queryParams('', 'isOwned', isOwned)); - } - if (isShared != null) { - queryParams.addAll(_queryParams('', 'isShared', isShared)); - } - if (name != null) { - queryParams.addAll(_queryParams('', 'name', name)); - } - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// List all albums - /// - /// Retrieve a list of albums available to the authenticated user. - /// - /// Parameters: - /// - /// * [String] assetId: - /// Filter albums containing this asset ID (ignores other parameters) - /// - /// * [String] id: - /// Album ID - /// - /// * [bool] isOwned: - /// Filter by ownership: true = only owned, false = only shared-with-me, undefined = no filter - /// - /// * [bool] isShared: - /// Filter by shared status: true = only shared, false = not shared, undefined = no filter - /// - /// * [String] name: - /// Album name (exact match) - Future?> getAllAlbums({ String? assetId, String? id, bool? isOwned, bool? isShared, String? name, Future? abortTrigger, }) async { - final response = await getAllAlbumsWithHttpInfo(assetId: assetId, id: id, isOwned: isOwned, isShared: isShared, name: name, abortTrigger: abortTrigger,); - 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; - } - - /// Remove assets from an album - /// - /// Remove multiple assets from a specific album by its ID. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [BulkIdsDto] bulkIdsDto (required): - Future removeAssetFromAlbumWithHttpInfo(String id, BulkIdsDto bulkIdsDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/albums/{id}/assets' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody = bulkIdsDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'DELETE', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Remove assets from an album - /// - /// Remove multiple assets from a specific album by its ID. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [BulkIdsDto] bulkIdsDto (required): - Future?> removeAssetFromAlbum(String id, BulkIdsDto bulkIdsDto, { Future? abortTrigger, }) async { - final response = await removeAssetFromAlbumWithHttpInfo(id, bulkIdsDto, abortTrigger: abortTrigger,); - 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; - } - - /// 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]. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [String] userId (required): - Future removeUserFromAlbumWithHttpInfo(String id, String userId, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/albums/{id}/user/{userId}' - .replaceAll('{id}', id) - .replaceAll('{userId}', userId); - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'DELETE', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Remove user from album - /// - /// Remove a user from an album. Use an ID of \"me\" to leave a shared album. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [String] userId (required): - Future removeUserFromAlbum(String id, String userId, { Future? abortTrigger, }) async { - final response = await removeUserFromAlbumWithHttpInfo(id, userId, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - } - - /// 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]. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [UpdateAlbumDto] updateAlbumDto (required): - Future updateAlbumInfoWithHttpInfo(String id, UpdateAlbumDto updateAlbumDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/albums/{id}' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody = updateAlbumDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'PATCH', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// 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: - /// - /// * [String] id (required): - /// - /// * [UpdateAlbumDto] updateAlbumDto (required): - Future updateAlbumInfo(String id, UpdateAlbumDto updateAlbumDto, { Future? abortTrigger, }) async { - final response = await updateAlbumInfoWithHttpInfo(id, updateAlbumDto, abortTrigger: abortTrigger,); - 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), 'AlbumResponseDto',) as AlbumResponseDto; - - } - return null; - } - - /// Update user role - /// - /// Change the role for a specific user in a specific album. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [String] userId (required): - /// - /// * [UpdateAlbumUserDto] updateAlbumUserDto (required): - Future updateAlbumUserWithHttpInfo(String id, String userId, UpdateAlbumUserDto updateAlbumUserDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/albums/{id}/user/{userId}' - .replaceAll('{id}', id) - .replaceAll('{userId}', userId); - - // ignore: prefer_final_locals - Object? postBody = updateAlbumUserDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'PUT', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Update user role - /// - /// Change the role for a specific user in a specific album. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [String] userId (required): - /// - /// * [UpdateAlbumUserDto] updateAlbumUserDto (required): - Future updateAlbumUser(String id, String userId, UpdateAlbumUserDto updateAlbumUserDto, { Future? abortTrigger, }) async { - final response = await updateAlbumUserWithHttpInfo(id, userId, updateAlbumUserDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - } -} diff --git a/mobile/openapi/lib/api/api_keys_api.dart b/mobile/openapi/lib/api/api_keys_api.dart deleted file mode 100644 index c26ddc263d..0000000000 --- a/mobile/openapi/lib/api/api_keys_api.dart +++ /dev/null @@ -1,346 +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 APIKeysApi { - APIKeysApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient; - - final ApiClient apiClient; - - /// Create an API key - /// - /// Creates a new API key. It will be limited to the permissions specified. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [ApiKeyCreateDto] apiKeyCreateDto (required): - Future createApiKeyWithHttpInfo(ApiKeyCreateDto apiKeyCreateDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/api-keys'; - - // ignore: prefer_final_locals - Object? postBody = apiKeyCreateDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'POST', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Create an API key - /// - /// Creates a new API key. It will be limited to the permissions specified. - /// - /// Parameters: - /// - /// * [ApiKeyCreateDto] apiKeyCreateDto (required): - Future createApiKey(ApiKeyCreateDto apiKeyCreateDto, { Future? abortTrigger, }) async { - final response = await createApiKeyWithHttpInfo(apiKeyCreateDto, abortTrigger: abortTrigger,); - 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), 'ApiKeyCreateResponseDto',) as ApiKeyCreateResponseDto; - - } - return null; - } - - /// 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]. - /// - /// Parameters: - /// - /// * [String] id (required): - Future deleteApiKeyWithHttpInfo(String id, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/api-keys/{id}' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'DELETE', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Delete an API key - /// - /// Deletes an API key identified by its ID. The current user must own this API key. - /// - /// Parameters: - /// - /// * [String] id (required): - Future deleteApiKey(String id, { Future? abortTrigger, }) async { - final response = await deleteApiKeyWithHttpInfo(id, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - } - - /// 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]. - /// - /// Parameters: - /// - /// * [String] id (required): - Future getApiKeyWithHttpInfo(String id, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/api-keys/{id}' - .replaceAll('{id}', id); - - // 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, - abortTrigger: abortTrigger, - ); - } - - /// Retrieve an API key - /// - /// Retrieve an API key by its ID. The current user must own this API key. - /// - /// Parameters: - /// - /// * [String] id (required): - Future getApiKey(String id, { Future? abortTrigger, }) async { - final response = await getApiKeyWithHttpInfo(id, abortTrigger: abortTrigger,); - 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), 'ApiKeyResponseDto',) as ApiKeyResponseDto; - - } - return null; - } - - /// List all API keys - /// - /// Retrieve all API keys of the current user. - /// - /// Note: This method returns the HTTP [Response]. - Future getApiKeysWithHttpInfo({ Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/api-keys'; - - // 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, - abortTrigger: abortTrigger, - ); - } - - /// List all API keys - /// - /// Retrieve all API keys of the current user. - Future?> getApiKeys({ Future? abortTrigger, }) async { - final response = await getApiKeysWithHttpInfo(abortTrigger: abortTrigger,); - 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; - } - - /// 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({ Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/api-keys/me'; - - // 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, - abortTrigger: abortTrigger, - ); - } - - /// Retrieve the current API key - /// - /// Retrieve the API key that is used to access this endpoint. - Future getMyApiKey({ Future? abortTrigger, }) async { - final response = await getMyApiKeyWithHttpInfo(abortTrigger: abortTrigger,); - 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), 'ApiKeyResponseDto',) as ApiKeyResponseDto; - - } - return null; - } - - /// 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]. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [ApiKeyUpdateDto] apiKeyUpdateDto (required): - Future updateApiKeyWithHttpInfo(String id, ApiKeyUpdateDto apiKeyUpdateDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/api-keys/{id}' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody = apiKeyUpdateDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'PUT', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// 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: - /// - /// * [String] id (required): - /// - /// * [ApiKeyUpdateDto] apiKeyUpdateDto (required): - Future updateApiKey(String id, ApiKeyUpdateDto apiKeyUpdateDto, { Future? abortTrigger, }) async { - final response = await updateApiKeyWithHttpInfo(id, apiKeyUpdateDto, abortTrigger: abortTrigger,); - 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), 'ApiKeyResponseDto',) as ApiKeyResponseDto; - - } - return null; - } -} diff --git a/mobile/openapi/lib/api/assets_api.dart b/mobile/openapi/lib/api/assets_api.dart deleted file mode 100644 index fa49d382b9..0000000000 --- a/mobile/openapi/lib/api/assets_api.dart +++ /dev/null @@ -1,1834 +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 AssetsApi { - AssetsApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient; - - final ApiClient apiClient; - - /// Check bulk upload - /// - /// Determine which assets have already been uploaded to the server based on their SHA1 checksums. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [AssetBulkUploadCheckDto] assetBulkUploadCheckDto (required): - Future checkBulkUploadWithHttpInfo(AssetBulkUploadCheckDto assetBulkUploadCheckDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/assets/bulk-upload-check'; - - // ignore: prefer_final_locals - Object? postBody = assetBulkUploadCheckDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'POST', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Check bulk upload - /// - /// Determine which assets have already been uploaded to the server based on their SHA1 checksums. - /// - /// Parameters: - /// - /// * [AssetBulkUploadCheckDto] assetBulkUploadCheckDto (required): - Future checkBulkUpload(AssetBulkUploadCheckDto assetBulkUploadCheckDto, { Future? abortTrigger, }) async { - final response = await checkBulkUploadWithHttpInfo(assetBulkUploadCheckDto, abortTrigger: abortTrigger,); - 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), 'AssetBulkUploadCheckResponseDto',) as AssetBulkUploadCheckResponseDto; - - } - return null; - } - - /// Copy asset - /// - /// Copy asset information like albums, tags, etc. from one asset to another. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [AssetCopyDto] assetCopyDto (required): - Future copyAssetWithHttpInfo(AssetCopyDto assetCopyDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/assets/copy'; - - // ignore: prefer_final_locals - Object? postBody = assetCopyDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'PUT', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Copy asset - /// - /// Copy asset information like albums, tags, etc. from one asset to another. - /// - /// Parameters: - /// - /// * [AssetCopyDto] assetCopyDto (required): - Future copyAsset(AssetCopyDto assetCopyDto, { Future? abortTrigger, }) async { - final response = await copyAssetWithHttpInfo(assetCopyDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - } - - /// Delete asset metadata by key - /// - /// Delete a specific metadata key-value pair associated with the specified asset. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - /// Asset ID - /// - /// * [String] key (required): - /// Metadata key - Future deleteAssetMetadataWithHttpInfo(String id, String key, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/assets/{id}/metadata/{key}' - .replaceAll('{id}', id) - .replaceAll('{key}', key); - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'DELETE', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Delete asset metadata by key - /// - /// Delete a specific metadata key-value pair associated with the specified asset. - /// - /// Parameters: - /// - /// * [String] id (required): - /// Asset ID - /// - /// * [String] key (required): - /// Metadata key - Future deleteAssetMetadata(String id, String key, { Future? abortTrigger, }) async { - final response = await deleteAssetMetadataWithHttpInfo(id, key, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - } - - /// Delete assets - /// - /// Deletes multiple assets at the same time. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [AssetBulkDeleteDto] assetBulkDeleteDto (required): - Future deleteAssetsWithHttpInfo(AssetBulkDeleteDto assetBulkDeleteDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/assets'; - - // ignore: prefer_final_locals - Object? postBody = assetBulkDeleteDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'DELETE', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Delete assets - /// - /// Deletes multiple assets at the same time. - /// - /// Parameters: - /// - /// * [AssetBulkDeleteDto] assetBulkDeleteDto (required): - Future deleteAssets(AssetBulkDeleteDto assetBulkDeleteDto, { Future? abortTrigger, }) async { - final response = await deleteAssetsWithHttpInfo(assetBulkDeleteDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - } - - /// Delete asset metadata - /// - /// Delete metadata key-value pairs for multiple assets. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [AssetMetadataBulkDeleteDto] assetMetadataBulkDeleteDto (required): - Future deleteBulkAssetMetadataWithHttpInfo(AssetMetadataBulkDeleteDto assetMetadataBulkDeleteDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/assets/metadata'; - - // ignore: prefer_final_locals - Object? postBody = assetMetadataBulkDeleteDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'DELETE', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Delete asset metadata - /// - /// Delete metadata key-value pairs for multiple assets. - /// - /// Parameters: - /// - /// * [AssetMetadataBulkDeleteDto] assetMetadataBulkDeleteDto (required): - Future deleteBulkAssetMetadata(AssetMetadataBulkDeleteDto assetMetadataBulkDeleteDto, { Future? abortTrigger, }) async { - final response = await deleteBulkAssetMetadataWithHttpInfo(assetMetadataBulkDeleteDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - } - - /// Download original asset - /// - /// Downloads the original file of the specified asset. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [bool] edited: - /// Return edited asset if available - /// - /// * [String] key: - /// - /// * [String] slug: - Future downloadAssetWithHttpInfo(String id, { bool? edited, String? key, String? slug, Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/assets/{id}/original' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - if (edited != null) { - queryParams.addAll(_queryParams('', 'edited', edited)); - } - if (key != null) { - queryParams.addAll(_queryParams('', 'key', key)); - } - if (slug != null) { - queryParams.addAll(_queryParams('', 'slug', slug)); - } - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Download original asset - /// - /// Downloads the original file of the specified asset. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [bool] edited: - /// Return edited asset if available - /// - /// * [String] key: - /// - /// * [String] slug: - Future downloadAsset(String id, { bool? edited, String? key, String? slug, Future? abortTrigger, }) async { - final response = await downloadAssetWithHttpInfo(id, edited: edited, key: key, slug: slug, abortTrigger: abortTrigger,); - 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), 'MultipartFile',) as MultipartFile; - - } - return null; - } - - /// Apply edits to an existing asset - /// - /// Apply a series of edit actions (crop, rotate, mirror) to the specified asset. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [AssetEditsCreateDto] assetEditsCreateDto (required): - Future editAssetWithHttpInfo(String id, AssetEditsCreateDto assetEditsCreateDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/assets/{id}/edits' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody = assetEditsCreateDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'PUT', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Apply edits to an existing asset - /// - /// Apply a series of edit actions (crop, rotate, mirror) to the specified asset. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [AssetEditsCreateDto] assetEditsCreateDto (required): - Future editAsset(String id, AssetEditsCreateDto assetEditsCreateDto, { Future? abortTrigger, }) async { - final response = await editAssetWithHttpInfo(id, assetEditsCreateDto, abortTrigger: abortTrigger,); - 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), 'AssetEditsResponseDto',) as AssetEditsResponseDto; - - } - return null; - } - - /// End HLS streaming session - /// - /// Releases server resources for the streaming session. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [String] sessionId (required): - /// - /// * [String] key: - /// - /// * [String] slug: - Future endSessionWithHttpInfo(String id, String sessionId, { String? key, String? slug, Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/assets/{id}/video/stream/{sessionId}' - .replaceAll('{id}', id) - .replaceAll('{sessionId}', sessionId); - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - if (key != null) { - queryParams.addAll(_queryParams('', 'key', key)); - } - if (slug != null) { - queryParams.addAll(_queryParams('', 'slug', slug)); - } - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'DELETE', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// End HLS streaming session - /// - /// Releases server resources for the streaming session. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [String] sessionId (required): - /// - /// * [String] key: - /// - /// * [String] slug: - Future endSession(String id, String sessionId, { String? key, String? slug, Future? abortTrigger, }) async { - final response = await endSessionWithHttpInfo(id, sessionId, key: key, slug: slug, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - } - - /// Retrieve edits for an existing asset - /// - /// Retrieve a series of edit actions (crop, rotate, mirror) associated with the specified asset. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - Future getAssetEditsWithHttpInfo(String id, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/assets/{id}/edits' - .replaceAll('{id}', id); - - // 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, - abortTrigger: abortTrigger, - ); - } - - /// Retrieve edits for an existing asset - /// - /// Retrieve a series of edit actions (crop, rotate, mirror) associated with the specified asset. - /// - /// Parameters: - /// - /// * [String] id (required): - Future getAssetEdits(String id, { Future? abortTrigger, }) async { - final response = await getAssetEditsWithHttpInfo(id, abortTrigger: abortTrigger,); - 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), 'AssetEditsResponseDto',) as AssetEditsResponseDto; - - } - return null; - } - - /// Retrieve an asset - /// - /// Retrieve detailed information about a specific asset. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [String] key: - /// - /// * [String] slug: - Future getAssetInfoWithHttpInfo(String id, { String? key, String? slug, Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/assets/{id}' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - if (key != null) { - queryParams.addAll(_queryParams('', 'key', key)); - } - if (slug != null) { - queryParams.addAll(_queryParams('', 'slug', slug)); - } - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Retrieve an asset - /// - /// Retrieve detailed information about a specific asset. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [String] key: - /// - /// * [String] slug: - Future getAssetInfo(String id, { String? key, String? slug, Future? abortTrigger, }) async { - final response = await getAssetInfoWithHttpInfo(id, key: key, slug: slug, abortTrigger: abortTrigger,); - 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), 'AssetResponseDto',) as AssetResponseDto; - - } - return null; - } - - /// Get asset metadata - /// - /// Retrieve all metadata key-value pairs associated with the specified asset. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - Future getAssetMetadataWithHttpInfo(String id, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/assets/{id}/metadata' - .replaceAll('{id}', id); - - // 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, - abortTrigger: abortTrigger, - ); - } - - /// Get asset metadata - /// - /// Retrieve all metadata key-value pairs associated with the specified asset. - /// - /// Parameters: - /// - /// * [String] id (required): - Future?> getAssetMetadata(String id, { Future? abortTrigger, }) async { - final response = await getAssetMetadataWithHttpInfo(id, abortTrigger: abortTrigger,); - 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; - } - - /// 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]. - /// - /// Parameters: - /// - /// * [String] id (required): - /// Asset ID - /// - /// * [String] key (required): - /// Metadata key - Future getAssetMetadataByKeyWithHttpInfo(String id, String key, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/assets/{id}/metadata/{key}' - .replaceAll('{id}', id) - .replaceAll('{key}', key); - - // 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, - abortTrigger: abortTrigger, - ); - } - - /// Retrieve asset metadata by key - /// - /// Retrieve the value of a specific metadata key associated with the specified asset. - /// - /// Parameters: - /// - /// * [String] id (required): - /// Asset ID - /// - /// * [String] key (required): - /// Metadata key - Future getAssetMetadataByKey(String id, String key, { Future? abortTrigger, }) async { - final response = await getAssetMetadataByKeyWithHttpInfo(id, key, abortTrigger: abortTrigger,); - 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), 'AssetMetadataResponseDto',) as AssetMetadataResponseDto; - - } - return null; - } - - /// Retrieve asset OCR data - /// - /// Retrieve all OCR (Optical Character Recognition) data associated with the specified asset. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - Future getAssetOcrWithHttpInfo(String id, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/assets/{id}/ocr' - .replaceAll('{id}', id); - - // 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, - abortTrigger: abortTrigger, - ); - } - - /// Retrieve asset OCR data - /// - /// Retrieve all OCR (Optical Character Recognition) data associated with the specified asset. - /// - /// Parameters: - /// - /// * [String] id (required): - Future?> getAssetOcr(String id, { Future? abortTrigger, }) async { - final response = await getAssetOcrWithHttpInfo(id, abortTrigger: abortTrigger,); - 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 asset statistics - /// - /// Retrieve various statistics about the assets owned by the authenticated user. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [bool] isFavorite: - /// Filter by favorite status - /// - /// * [bool] isTrashed: - /// Filter by trash status - /// - /// * [AssetVisibility] visibility: - Future getAssetStatisticsWithHttpInfo({ bool? isFavorite, bool? isTrashed, AssetVisibility? visibility, Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/assets/statistics'; - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - if (isFavorite != null) { - queryParams.addAll(_queryParams('', 'isFavorite', isFavorite)); - } - if (isTrashed != null) { - queryParams.addAll(_queryParams('', 'isTrashed', isTrashed)); - } - if (visibility != null) { - queryParams.addAll(_queryParams('', 'visibility', visibility)); - } - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Get asset statistics - /// - /// Retrieve various statistics about the assets owned by the authenticated user. - /// - /// Parameters: - /// - /// * [bool] isFavorite: - /// Filter by favorite status - /// - /// * [bool] isTrashed: - /// Filter by trash status - /// - /// * [AssetVisibility] visibility: - Future getAssetStatistics({ bool? isFavorite, bool? isTrashed, AssetVisibility? visibility, Future? abortTrigger, }) async { - final response = await getAssetStatisticsWithHttpInfo(isFavorite: isFavorite, isTrashed: isTrashed, visibility: visibility, abortTrigger: abortTrigger,); - 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), 'AssetStatsResponseDto',) as AssetStatsResponseDto; - - } - return null; - } - - /// Get HLS main playlist - /// - /// Returns an HLS main playlist with all available variants for the asset. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [String] key: - /// - /// * [String] slug: - Future getMainPlaylistWithHttpInfo(String id, { String? key, String? slug, Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/assets/{id}/video/stream/main.m3u8' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - if (key != null) { - queryParams.addAll(_queryParams('', 'key', key)); - } - if (slug != null) { - queryParams.addAll(_queryParams('', 'slug', slug)); - } - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Get HLS main playlist - /// - /// Returns an HLS main playlist with all available variants for the asset. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [String] key: - /// - /// * [String] slug: - Future getMainPlaylist(String id, { String? key, String? slug, Future? abortTrigger, }) async { - final response = await getMainPlaylistWithHttpInfo(id, key: key, slug: slug, abortTrigger: abortTrigger,); - 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), 'String',) as String; - - } - return null; - } - - /// Get HLS media playlist - /// - /// Returns an HLS media playlist for one variant of the streaming session. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [String] sessionId (required): - /// - /// * [int] variantIndex (required): - /// - /// * [String] key: - /// - /// * [String] slug: - /// - /// * [num] xImmichHlsPos: - Future getMediaPlaylistWithHttpInfo(String id, String sessionId, int variantIndex, { String? key, String? slug, num? xImmichHlsPos, Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/assets/{id}/video/stream/{sessionId}/{variantIndex}/playlist.m3u8' - .replaceAll('{id}', id) - .replaceAll('{sessionId}', sessionId) - .replaceAll('{variantIndex}', variantIndex.toString()); - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - if (key != null) { - queryParams.addAll(_queryParams('', 'key', key)); - } - if (slug != null) { - queryParams.addAll(_queryParams('', 'slug', slug)); - } - - if (xImmichHlsPos != null) { - headerParams[r'x-immich-hls-pos'] = parameterToString(xImmichHlsPos); - } - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Get HLS media playlist - /// - /// Returns an HLS media playlist for one variant of the streaming session. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [String] sessionId (required): - /// - /// * [int] variantIndex (required): - /// - /// * [String] key: - /// - /// * [String] slug: - /// - /// * [num] xImmichHlsPos: - Future getMediaPlaylist(String id, String sessionId, int variantIndex, { String? key, String? slug, num? xImmichHlsPos, Future? abortTrigger, }) async { - final response = await getMediaPlaylistWithHttpInfo(id, sessionId, variantIndex, key: key, slug: slug, xImmichHlsPos: xImmichHlsPos, abortTrigger: abortTrigger,); - 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), 'String',) as String; - - } - return null; - } - - /// Get HLS segment or init file - /// - /// Streams an HLS init segment (init.mp4) or media segment (seg_N.m4s). - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] filename (required): - /// - /// * [String] id (required): - /// - /// * [String] sessionId (required): - /// - /// * [int] variantIndex (required): - /// - /// * [String] key: - /// - /// * [String] slug: - /// - /// * [int] xImmichHlsMsn: - Future getSegmentWithHttpInfo(String filename, String id, String sessionId, int variantIndex, { String? key, String? slug, int? xImmichHlsMsn, Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/assets/{id}/video/stream/{sessionId}/{variantIndex}/{filename}' - .replaceAll('{filename}', filename) - .replaceAll('{id}', id) - .replaceAll('{sessionId}', sessionId) - .replaceAll('{variantIndex}', variantIndex.toString()); - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - if (key != null) { - queryParams.addAll(_queryParams('', 'key', key)); - } - if (slug != null) { - queryParams.addAll(_queryParams('', 'slug', slug)); - } - - if (xImmichHlsMsn != null) { - headerParams[r'x-immich-hls-msn'] = parameterToString(xImmichHlsMsn); - } - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Get HLS segment or init file - /// - /// Streams an HLS init segment (init.mp4) or media segment (seg_N.m4s). - /// - /// Parameters: - /// - /// * [String] filename (required): - /// - /// * [String] id (required): - /// - /// * [String] sessionId (required): - /// - /// * [int] variantIndex (required): - /// - /// * [String] key: - /// - /// * [String] slug: - /// - /// * [int] xImmichHlsMsn: - Future getSegment(String filename, String id, String sessionId, int variantIndex, { String? key, String? slug, int? xImmichHlsMsn, Future? abortTrigger, }) async { - final response = await getSegmentWithHttpInfo(filename, id, sessionId, variantIndex, key: key, slug: slug, xImmichHlsMsn: xImmichHlsMsn, abortTrigger: abortTrigger,); - 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), 'MultipartFile',) as MultipartFile; - - } - return null; - } - - /// 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]. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [String] key: - /// - /// * [String] slug: - Future playAssetVideoWithHttpInfo(String id, { String? key, String? slug, Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/assets/{id}/video/playback' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - if (key != null) { - queryParams.addAll(_queryParams('', 'key', key)); - } - if (slug != null) { - queryParams.addAll(_queryParams('', 'slug', slug)); - } - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Play asset video - /// - /// Streams the video file for the specified asset. This endpoint also supports byte range requests. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [String] key: - /// - /// * [String] slug: - Future playAssetVideo(String id, { String? key, String? slug, Future? abortTrigger, }) async { - final response = await playAssetVideoWithHttpInfo(id, key: key, slug: slug, abortTrigger: abortTrigger,); - 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), 'MultipartFile',) as MultipartFile; - - } - return null; - } - - /// Remove edits from an existing asset - /// - /// Removes all edit actions (crop, rotate, mirror) associated with the specified asset. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - Future removeAssetEditsWithHttpInfo(String id, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/assets/{id}/edits' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'DELETE', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Remove edits from an existing asset - /// - /// Removes all edit actions (crop, rotate, mirror) associated with the specified asset. - /// - /// Parameters: - /// - /// * [String] id (required): - Future removeAssetEdits(String id, { Future? abortTrigger, }) async { - final response = await removeAssetEditsWithHttpInfo(id, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(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): - Future runAssetJobsWithHttpInfo(AssetJobsDto assetJobsDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/assets/jobs'; - - // ignore: prefer_final_locals - Object? postBody = assetJobsDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'POST', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Run an asset job - /// - /// Run a specific job on a set of assets. - /// - /// Parameters: - /// - /// * [AssetJobsDto] assetJobsDto (required): - Future runAssetJobs(AssetJobsDto assetJobsDto, { Future? abortTrigger, }) async { - final response = await runAssetJobsWithHttpInfo(assetJobsDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - } - - /// Update an asset - /// - /// Update information of a specific asset. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [UpdateAssetDto] updateAssetDto (required): - Future updateAssetWithHttpInfo(String id, UpdateAssetDto updateAssetDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/assets/{id}' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody = updateAssetDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'PUT', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Update an asset - /// - /// Update information of a specific asset. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [UpdateAssetDto] updateAssetDto (required): - Future updateAsset(String id, UpdateAssetDto updateAssetDto, { Future? abortTrigger, }) async { - final response = await updateAssetWithHttpInfo(id, updateAssetDto, abortTrigger: abortTrigger,); - 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), 'AssetResponseDto',) as AssetResponseDto; - - } - return null; - } - - /// Update asset metadata - /// - /// Update or add metadata key-value pairs for the specified asset. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [AssetMetadataUpsertDto] assetMetadataUpsertDto (required): - Future updateAssetMetadataWithHttpInfo(String id, AssetMetadataUpsertDto assetMetadataUpsertDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/assets/{id}/metadata' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody = assetMetadataUpsertDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'PUT', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Update asset metadata - /// - /// Update or add metadata key-value pairs for the specified asset. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [AssetMetadataUpsertDto] assetMetadataUpsertDto (required): - Future?> updateAssetMetadata(String id, AssetMetadataUpsertDto assetMetadataUpsertDto, { Future? abortTrigger, }) async { - final response = await updateAssetMetadataWithHttpInfo(id, assetMetadataUpsertDto, abortTrigger: abortTrigger,); - 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; - } - - /// Update assets - /// - /// Updates multiple assets at the same time. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [AssetBulkUpdateDto] assetBulkUpdateDto (required): - Future updateAssetsWithHttpInfo(AssetBulkUpdateDto assetBulkUpdateDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/assets'; - - // ignore: prefer_final_locals - Object? postBody = assetBulkUpdateDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'PUT', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Update assets - /// - /// Updates multiple assets at the same time. - /// - /// Parameters: - /// - /// * [AssetBulkUpdateDto] assetBulkUpdateDto (required): - Future updateAssets(AssetBulkUpdateDto assetBulkUpdateDto, { Future? abortTrigger, }) async { - final response = await updateAssetsWithHttpInfo(assetBulkUpdateDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - } - - /// Upsert asset metadata - /// - /// Upsert metadata key-value pairs for multiple assets. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [AssetMetadataBulkUpsertDto] assetMetadataBulkUpsertDto (required): - Future updateBulkAssetMetadataWithHttpInfo(AssetMetadataBulkUpsertDto assetMetadataBulkUpsertDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/assets/metadata'; - - // ignore: prefer_final_locals - Object? postBody = assetMetadataBulkUpsertDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'PUT', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Upsert asset metadata - /// - /// Upsert metadata key-value pairs for multiple assets. - /// - /// Parameters: - /// - /// * [AssetMetadataBulkUpsertDto] assetMetadataBulkUpsertDto (required): - Future?> updateBulkAssetMetadata(AssetMetadataBulkUpsertDto assetMetadataBulkUpsertDto, { Future? abortTrigger, }) async { - final response = await updateBulkAssetMetadataWithHttpInfo(assetMetadataBulkUpsertDto, abortTrigger: abortTrigger,); - 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; - } - - /// Upload asset - /// - /// Uploads a new asset to the server. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [MultipartFile] assetData (required): - /// Asset file data - /// - /// * [DateTime] fileCreatedAt (required): - /// File creation date - /// - /// * [DateTime] fileModifiedAt (required): - /// File modification date - /// - /// * [String] key: - /// - /// * [String] slug: - /// - /// * [String] xImmichChecksum: - /// sha1 checksum that can be used for duplicate detection before the file is uploaded - /// - /// * [int] duration: - /// Duration in milliseconds (for videos) - /// - /// * [String] filename: - /// Filename - /// - /// * [bool] isFavorite: - /// Mark as favorite - /// - /// * [String] livePhotoVideoId: - /// Live photo video ID - /// - /// * [List] metadata: - /// Asset metadata items - /// - /// * [MultipartFile] sidecarData: - /// Sidecar file data - /// - /// * [AssetVisibility] visibility: - Future uploadAssetWithHttpInfo(MultipartFile assetData, DateTime fileCreatedAt, DateTime fileModifiedAt, { String? key, String? slug, String? xImmichChecksum, int? duration, String? filename, bool? isFavorite, String? livePhotoVideoId, List? metadata, MultipartFile? sidecarData, AssetVisibility? visibility, Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/assets'; - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - if (key != null) { - queryParams.addAll(_queryParams('', 'key', key)); - } - if (slug != null) { - queryParams.addAll(_queryParams('', 'slug', slug)); - } - - if (xImmichChecksum != null) { - headerParams[r'x-immich-checksum'] = parameterToString(xImmichChecksum); - } - - const contentTypes = ['multipart/form-data']; - - bool hasFields = false; - final mp = MultipartRequest('POST', Uri.parse(apiPath)); - if (assetData != null) { - hasFields = true; - mp.fields[r'assetData'] = assetData.field; - mp.files.add(assetData); - } - if (duration != null) { - hasFields = true; - mp.fields[r'duration'] = parameterToString(duration); - } - if (fileCreatedAt != null) { - hasFields = true; - mp.fields[r'fileCreatedAt'] = parameterToString(fileCreatedAt); - } - if (fileModifiedAt != null) { - hasFields = true; - mp.fields[r'fileModifiedAt'] = parameterToString(fileModifiedAt); - } - if (filename != null) { - hasFields = true; - mp.fields[r'filename'] = parameterToString(filename); - } - if (isFavorite != null) { - hasFields = true; - mp.fields[r'isFavorite'] = parameterToString(isFavorite); - } - if (livePhotoVideoId != null) { - hasFields = true; - mp.fields[r'livePhotoVideoId'] = parameterToString(livePhotoVideoId); - } - if (metadata != null) { - hasFields = true; - mp.fields[r'metadata'] = parameterToString(metadata); - } - if (sidecarData != null) { - hasFields = true; - mp.fields[r'sidecarData'] = sidecarData.field; - mp.files.add(sidecarData); - } - if (visibility != null) { - hasFields = true; - mp.fields[r'visibility'] = parameterToString(visibility); - } - if (hasFields) { - postBody = mp; - } - - return apiClient.invokeAPI( - apiPath, - 'POST', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Upload asset - /// - /// Uploads a new asset to the server. - /// - /// Parameters: - /// - /// * [MultipartFile] assetData (required): - /// Asset file data - /// - /// * [DateTime] fileCreatedAt (required): - /// File creation date - /// - /// * [DateTime] fileModifiedAt (required): - /// File modification date - /// - /// * [String] key: - /// - /// * [String] slug: - /// - /// * [String] xImmichChecksum: - /// sha1 checksum that can be used for duplicate detection before the file is uploaded - /// - /// * [int] duration: - /// Duration in milliseconds (for videos) - /// - /// * [String] filename: - /// Filename - /// - /// * [bool] isFavorite: - /// Mark as favorite - /// - /// * [String] livePhotoVideoId: - /// Live photo video ID - /// - /// * [List] metadata: - /// Asset metadata items - /// - /// * [MultipartFile] sidecarData: - /// Sidecar file data - /// - /// * [AssetVisibility] visibility: - Future uploadAsset(MultipartFile assetData, DateTime fileCreatedAt, DateTime fileModifiedAt, { String? key, String? slug, String? xImmichChecksum, int? duration, String? filename, bool? isFavorite, String? livePhotoVideoId, List? metadata, MultipartFile? sidecarData, AssetVisibility? visibility, Future? abortTrigger, }) async { - final response = await uploadAssetWithHttpInfo(assetData, fileCreatedAt, fileModifiedAt, key: key, slug: slug, xImmichChecksum: xImmichChecksum, duration: duration, filename: filename, isFavorite: isFavorite, livePhotoVideoId: livePhotoVideoId, metadata: metadata, sidecarData: sidecarData, visibility: visibility, abortTrigger: abortTrigger,); - 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), 'AssetMediaResponseDto',) as AssetMediaResponseDto; - - } - return null; - } - - /// View asset thumbnail - /// - /// Retrieve the thumbnail image for the specified asset. Viewing the fullsize thumbnail might redirect to downloadAsset, which requires a different permission. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [bool] edited: - /// Return edited asset if available - /// - /// * [String] key: - /// - /// * [AssetMediaSize] size: - /// - /// * [String] slug: - Future viewAssetWithHttpInfo(String id, { bool? edited, String? key, AssetMediaSize? size, String? slug, Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/assets/{id}/thumbnail' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - if (edited != null) { - queryParams.addAll(_queryParams('', 'edited', edited)); - } - if (key != null) { - queryParams.addAll(_queryParams('', 'key', key)); - } - if (size != null) { - queryParams.addAll(_queryParams('', 'size', size)); - } - if (slug != null) { - queryParams.addAll(_queryParams('', 'slug', slug)); - } - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// View asset thumbnail - /// - /// Retrieve the thumbnail image for the specified asset. Viewing the fullsize thumbnail might redirect to downloadAsset, which requires a different permission. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [bool] edited: - /// Return edited asset if available - /// - /// * [String] key: - /// - /// * [AssetMediaSize] size: - /// - /// * [String] slug: - Future viewAsset(String id, { bool? edited, String? key, AssetMediaSize? size, String? slug, Future? abortTrigger, }) async { - final response = await viewAssetWithHttpInfo(id, edited: edited, key: key, size: size, slug: slug, abortTrigger: abortTrigger,); - 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), 'MultipartFile',) as MultipartFile; - - } - return null; - } -} diff --git a/mobile/openapi/lib/api/authentication_admin_api.dart b/mobile/openapi/lib/api/authentication_admin_api.dart deleted file mode 100644 index 2c107891b3..0000000000 --- a/mobile/openapi/lib/api/authentication_admin_api.dart +++ /dev/null @@ -1,59 +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 AuthenticationAdminApi { - AuthenticationAdminApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient; - - final ApiClient apiClient; - - /// Unlink all OAuth accounts - /// - /// Unlinks all OAuth accounts associated with user accounts in the system. - /// - /// Note: This method returns the HTTP [Response]. - Future unlinkAllOAuthAccountsAdminWithHttpInfo({ Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/admin/auth/unlink-all'; - - // 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, - abortTrigger: abortTrigger, - ); - } - - /// Unlink all OAuth accounts - /// - /// Unlinks all OAuth accounts associated with user accounts in the system. - Future unlinkAllOAuthAccountsAdmin({ Future? abortTrigger, }) async { - final response = await unlinkAllOAuthAccountsAdminWithHttpInfo(abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - } -} diff --git a/mobile/openapi/lib/api/authentication_api.dart b/mobile/openapi/lib/api/authentication_api.dart deleted file mode 100644 index 8e088d040b..0000000000 --- a/mobile/openapi/lib/api/authentication_api.dart +++ /dev/null @@ -1,888 +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 AuthenticationApi { - AuthenticationApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient; - - final ApiClient apiClient; - - /// Change password - /// - /// Change the password of the current user. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [ChangePasswordDto] changePasswordDto (required): - Future changePasswordWithHttpInfo(ChangePasswordDto changePasswordDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/auth/change-password'; - - // ignore: prefer_final_locals - Object? postBody = changePasswordDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'POST', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Change password - /// - /// Change the password of the current user. - /// - /// Parameters: - /// - /// * [ChangePasswordDto] changePasswordDto (required): - Future changePassword(ChangePasswordDto changePasswordDto, { Future? abortTrigger, }) async { - final response = await changePasswordWithHttpInfo(changePasswordDto, abortTrigger: abortTrigger,); - 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; - } - - /// Change pin code - /// - /// Change the pin code for the current user. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [PinCodeChangeDto] pinCodeChangeDto (required): - Future changePinCodeWithHttpInfo(PinCodeChangeDto pinCodeChangeDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/auth/pin-code'; - - // ignore: prefer_final_locals - Object? postBody = pinCodeChangeDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'PUT', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Change pin code - /// - /// Change the pin code for the current user. - /// - /// Parameters: - /// - /// * [PinCodeChangeDto] pinCodeChangeDto (required): - Future changePinCode(PinCodeChangeDto pinCodeChangeDto, { Future? abortTrigger, }) async { - final response = await changePinCodeWithHttpInfo(pinCodeChangeDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(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, { Future? abortTrigger, }) 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, - abortTrigger: abortTrigger, - ); - } - - /// Finish OAuth - /// - /// Complete the OAuth authorization process by exchanging the authorization code for a session token. - /// - /// Parameters: - /// - /// * [OAuthCallbackDto] oAuthCallbackDto (required): - Future finishOAuth(OAuthCallbackDto oAuthCallbackDto, { Future? abortTrigger, }) async { - final response = await finishOAuthWithHttpInfo(oAuthCallbackDto, abortTrigger: abortTrigger,); - 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({ Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/auth/status'; - - // 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, - abortTrigger: abortTrigger, - ); - } - - /// 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({ Future? abortTrigger, }) async { - final response = await getAuthStatusWithHttpInfo(abortTrigger: abortTrigger,); - 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), 'AuthStatusResponseDto',) as AuthStatusResponseDto; - - } - return null; - } - - /// 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, { Future? abortTrigger, }) 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, - abortTrigger: abortTrigger, - ); - } - - /// Link OAuth account - /// - /// Link an OAuth account to the authenticated user. - /// - /// Parameters: - /// - /// * [OAuthCallbackDto] oAuthCallbackDto (required): - Future linkOAuthAccount(OAuthCallbackDto oAuthCallbackDto, { Future? abortTrigger, }) async { - final response = await linkOAuthAccountWithHttpInfo(oAuthCallbackDto, abortTrigger: abortTrigger,); - 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({ Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/auth/session/lock'; - - // 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, - abortTrigger: abortTrigger, - ); - } - - /// Lock auth session - /// - /// Remove elevated access to locked assets from the current session. - Future lockAuthSession({ Future? abortTrigger, }) async { - final response = await lockAuthSessionWithHttpInfo(abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - } - - /// Login - /// - /// Login with username and password and receive a session token. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [LoginCredentialDto] loginCredentialDto (required): - Future loginWithHttpInfo(LoginCredentialDto loginCredentialDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/auth/login'; - - // ignore: prefer_final_locals - Object? postBody = loginCredentialDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'POST', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Login - /// - /// Login with username and password and receive a session token. - /// - /// Parameters: - /// - /// * [LoginCredentialDto] loginCredentialDto (required): - Future login(LoginCredentialDto loginCredentialDto, { Future? abortTrigger, }) async { - final response = await loginWithHttpInfo(loginCredentialDto, abortTrigger: abortTrigger,); - 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; - } - - /// Logout - /// - /// Logout the current user and invalidate the session token. - /// - /// Note: This method returns the HTTP [Response]. - Future logoutWithHttpInfo({ Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/auth/logout'; - - // 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, - abortTrigger: abortTrigger, - ); - } - - /// Logout - /// - /// Logout the current user and invalidate the session token. - Future logout({ Future? abortTrigger, }) async { - final response = await logoutWithHttpInfo(abortTrigger: abortTrigger,); - 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), 'LogoutResponseDto',) as LogoutResponseDto; - - } - return null; - } - - /// Backchannel OAuth logout - /// - /// Logout the OAuth account and invalidate the session specified by the sid claim or all sessions if the sid claim is not present. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] logoutToken (required): - /// OAuth logout token - Future logoutOAuthWithHttpInfo(String logoutToken, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/oauth/backchannel-logout'; - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/x-www-form-urlencoded']; - - if (logoutToken != null) { - formParams[r'logout_token'] = parameterToString(logoutToken); - } - - return apiClient.invokeAPI( - apiPath, - 'POST', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Backchannel OAuth logout - /// - /// Logout the OAuth account and invalidate the session specified by the sid claim or all sessions if the sid claim is not present. - /// - /// Parameters: - /// - /// * [String] logoutToken (required): - /// OAuth logout token - Future logoutOAuth(String logoutToken, { Future? abortTrigger, }) async { - final response = await logoutOAuthWithHttpInfo(logoutToken, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - } - - /// 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({ Future? abortTrigger, }) 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, - abortTrigger: abortTrigger, - ); - } - - /// 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({ Future? abortTrigger, }) async { - final response = await redirectOAuthToMobileWithHttpInfo(abortTrigger: abortTrigger,); - 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]. - /// - /// Parameters: - /// - /// * [PinCodeResetDto] pinCodeResetDto (required): - Future resetPinCodeWithHttpInfo(PinCodeResetDto pinCodeResetDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/auth/pin-code'; - - // ignore: prefer_final_locals - Object? postBody = pinCodeResetDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'DELETE', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Reset pin code - /// - /// Reset the pin code for the current user by providing the account password - /// - /// Parameters: - /// - /// * [PinCodeResetDto] pinCodeResetDto (required): - Future resetPinCode(PinCodeResetDto pinCodeResetDto, { Future? abortTrigger, }) async { - final response = await resetPinCodeWithHttpInfo(pinCodeResetDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - } - - /// Setup pin code - /// - /// Setup a new pin code for the current user. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [PinCodeSetupDto] pinCodeSetupDto (required): - Future setupPinCodeWithHttpInfo(PinCodeSetupDto pinCodeSetupDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/auth/pin-code'; - - // ignore: prefer_final_locals - Object? postBody = pinCodeSetupDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'POST', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Setup pin code - /// - /// Setup a new pin code for the current user. - /// - /// Parameters: - /// - /// * [PinCodeSetupDto] pinCodeSetupDto (required): - Future setupPinCode(PinCodeSetupDto pinCodeSetupDto, { Future? abortTrigger, }) async { - final response = await setupPinCodeWithHttpInfo(pinCodeSetupDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - } - - /// Register admin - /// - /// Create the first admin user in the system. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [SignUpDto] signUpDto (required): - Future signUpAdminWithHttpInfo(SignUpDto signUpDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/auth/admin-sign-up'; - - // ignore: prefer_final_locals - Object? postBody = signUpDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'POST', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Register admin - /// - /// Create the first admin user in the system. - /// - /// Parameters: - /// - /// * [SignUpDto] signUpDto (required): - Future signUpAdmin(SignUpDto signUpDto, { Future? abortTrigger, }) async { - final response = await signUpAdminWithHttpInfo(signUpDto, abortTrigger: abortTrigger,); - 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; - } - - /// Start OAuth - /// - /// Initiate the OAuth authorization process. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [OAuthConfigDto] oAuthConfigDto (required): - Future startOAuthWithHttpInfo(OAuthConfigDto oAuthConfigDto, { Future? abortTrigger, }) 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, - abortTrigger: abortTrigger, - ); - } - - /// Start OAuth - /// - /// Initiate the OAuth authorization process. - /// - /// Parameters: - /// - /// * [OAuthConfigDto] oAuthConfigDto (required): - Future startOAuth(OAuthConfigDto oAuthConfigDto, { Future? abortTrigger, }) async { - final response = await startOAuthWithHttpInfo(oAuthConfigDto, abortTrigger: abortTrigger,); - 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({ Future? abortTrigger, }) 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, - abortTrigger: abortTrigger, - ); - } - - /// Unlink OAuth account - /// - /// Unlink the OAuth account from the authenticated user. - Future unlinkOAuthAccount({ Future? abortTrigger, }) async { - final response = await unlinkOAuthAccountWithHttpInfo(abortTrigger: abortTrigger,); - 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): - Future unlockAuthSessionWithHttpInfo(SessionUnlockDto sessionUnlockDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/auth/session/unlock'; - - // ignore: prefer_final_locals - Object? postBody = sessionUnlockDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'POST', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Unlock auth session - /// - /// Temporarily grant the session elevated access to locked assets by providing the correct PIN code. - /// - /// Parameters: - /// - /// * [SessionUnlockDto] sessionUnlockDto (required): - Future unlockAuthSession(SessionUnlockDto sessionUnlockDto, { Future? abortTrigger, }) async { - final response = await unlockAuthSessionWithHttpInfo(sessionUnlockDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - } - - /// Validate access token - /// - /// Validate the current authorization method is still valid. - /// - /// Note: This method returns the HTTP [Response]. - Future validateAccessTokenWithHttpInfo({ Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/auth/validateToken'; - - // 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, - abortTrigger: abortTrigger, - ); - } - - /// Validate access token - /// - /// Validate the current authorization method is still valid. - Future validateAccessToken({ Future? abortTrigger, }) async { - final response = await validateAccessTokenWithHttpInfo(abortTrigger: abortTrigger,); - 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), 'ValidateAccessTokenResponseDto',) as ValidateAccessTokenResponseDto; - - } - return null; - } -} diff --git a/mobile/openapi/lib/api/database_backups_admin_api.dart b/mobile/openapi/lib/api/database_backups_admin_api.dart deleted file mode 100644 index ba393833b5..0000000000 --- a/mobile/openapi/lib/api/database_backups_admin_api.dart +++ /dev/null @@ -1,276 +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 DatabaseBackupsAdminApi { - DatabaseBackupsAdminApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient; - - final ApiClient apiClient; - - /// Delete database backup - /// - /// Delete a backup by its filename - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [DatabaseBackupDeleteDto] databaseBackupDeleteDto (required): - Future deleteDatabaseBackupWithHttpInfo(DatabaseBackupDeleteDto databaseBackupDeleteDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/admin/database-backups'; - - // ignore: prefer_final_locals - Object? postBody = databaseBackupDeleteDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'DELETE', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Delete database backup - /// - /// Delete a backup by its filename - /// - /// Parameters: - /// - /// * [DatabaseBackupDeleteDto] databaseBackupDeleteDto (required): - Future deleteDatabaseBackup(DatabaseBackupDeleteDto databaseBackupDeleteDto, { Future? abortTrigger, }) async { - final response = await deleteDatabaseBackupWithHttpInfo(databaseBackupDeleteDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - } - - /// Download database backup - /// - /// Downloads the database backup file - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] filename (required): - Future downloadDatabaseBackupWithHttpInfo(String filename, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/admin/database-backups/{filename}' - .replaceAll('{filename}', filename); - - // 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, - abortTrigger: abortTrigger, - ); - } - - /// Download database backup - /// - /// Downloads the database backup file - /// - /// Parameters: - /// - /// * [String] filename (required): - Future downloadDatabaseBackup(String filename, { Future? abortTrigger, }) async { - final response = await downloadDatabaseBackupWithHttpInfo(filename, abortTrigger: abortTrigger,); - 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), 'MultipartFile',) as MultipartFile; - - } - return null; - } - - /// List database backups - /// - /// Get the list of the successful and failed backups - /// - /// Note: This method returns the HTTP [Response]. - Future listDatabaseBackupsWithHttpInfo({ Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/admin/database-backups'; - - // 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, - abortTrigger: abortTrigger, - ); - } - - /// List database backups - /// - /// Get the list of the successful and failed backups - Future listDatabaseBackups({ Future? abortTrigger, }) async { - final response = await listDatabaseBackupsWithHttpInfo(abortTrigger: abortTrigger,); - 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), 'DatabaseBackupListResponseDto',) as DatabaseBackupListResponseDto; - - } - return null; - } - - /// Start database backup restore flow - /// - /// Put Immich into maintenance mode to restore a backup (Immich must not be configured) - /// - /// Note: This method returns the HTTP [Response]. - Future startDatabaseRestoreFlowWithHttpInfo({ Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/admin/database-backups/start-restore'; - - // 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, - abortTrigger: abortTrigger, - ); - } - - /// Start database backup restore flow - /// - /// Put Immich into maintenance mode to restore a backup (Immich must not be configured) - Future startDatabaseRestoreFlow({ Future? abortTrigger, }) async { - final response = await startDatabaseRestoreFlowWithHttpInfo(abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - } - - /// Upload database backup - /// - /// Uploads .sql/.sql.gz file to restore backup from - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [MultipartFile] file: - /// Database backup file - Future uploadDatabaseBackupWithHttpInfo({ MultipartFile? file, Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/admin/database-backups/upload'; - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['multipart/form-data']; - - bool hasFields = false; - final mp = MultipartRequest('POST', Uri.parse(apiPath)); - if (file != null) { - hasFields = true; - mp.fields[r'file'] = file.field; - mp.files.add(file); - } - if (hasFields) { - postBody = mp; - } - - return apiClient.invokeAPI( - apiPath, - 'POST', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Upload database backup - /// - /// Uploads .sql/.sql.gz file to restore backup from - /// - /// Parameters: - /// - /// * [MultipartFile] file: - /// Database backup file - Future uploadDatabaseBackup({ MultipartFile? file, Future? abortTrigger, }) async { - final response = await uploadDatabaseBackupWithHttpInfo(file: file, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - } -} diff --git a/mobile/openapi/lib/api/deprecated_api.dart b/mobile/openapi/lib/api/deprecated_api.dart deleted file mode 100644 index 9b4472676c..0000000000 --- a/mobile/openapi/lib/api/deprecated_api.dart +++ /dev/null @@ -1,1032 +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 DeprecatedApi { - DeprecatedApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient; - - final ApiClient apiClient; - - /// Create a partner - /// - /// Create a new partner to share assets with. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - Future createPartnerDeprecatedWithHttpInfo(String id, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/partners/{id}' - .replaceAll('{id}', id); - - // 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, - abortTrigger: abortTrigger, - ); - } - - /// Create a partner - /// - /// Create a new partner to share assets with. - /// - /// Parameters: - /// - /// * [String] id (required): - Future createPartnerDeprecated(String id, { Future? abortTrigger, }) async { - final response = await createPartnerDeprecatedWithHttpInfo(id, abortTrigger: abortTrigger,); - 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), 'PartnerResponseDto',) as PartnerResponseDto; - - } - return null; - } - - /// 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 getQueuesLegacyWithHttpInfo({ Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/jobs'; - - // 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, - abortTrigger: abortTrigger, - ); - } - - /// Retrieve queue counts and status - /// - /// Retrieve the counts of the current queue, as well as the current status. - Future getQueuesLegacy({ Future? abortTrigger, }) async { - final response = await getQueuesLegacyWithHttpInfo(abortTrigger: abortTrigger,); - 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), 'QueuesResponseLegacyDto',) as QueuesResponseLegacyDto; - - } - return null; - } - - /// 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]. - /// - /// Parameters: - /// - /// * [QueueName] name (required): - /// - /// * [QueueCommandDto] queueCommandDto (required): - Future runQueueCommandLegacyWithHttpInfo(QueueName name, QueueCommandDto queueCommandDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/jobs/{name}' - .replaceAll('{name}', name.toString()); - - // ignore: prefer_final_locals - Object? postBody = queueCommandDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'PUT', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// 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: - /// - /// * [QueueName] name (required): - /// - /// * [QueueCommandDto] queueCommandDto (required): - Future runQueueCommandLegacy(QueueName name, QueueCommandDto queueCommandDto, { Future? abortTrigger, }) async { - final response = await runQueueCommandLegacyWithHttpInfo(name, queueCommandDto, abortTrigger: abortTrigger,); - 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), 'QueueResponseLegacyDto',) as QueueResponseLegacyDto; - - } - return null; - } - - /// 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]. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [ApiKeyUpdateDto] apiKeyUpdateDto (required): - Future updateApiKeyWithHttpInfo(String id, ApiKeyUpdateDto apiKeyUpdateDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/api-keys/{id}' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody = apiKeyUpdateDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'PUT', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// 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: - /// - /// * [String] id (required): - /// - /// * [ApiKeyUpdateDto] apiKeyUpdateDto (required): - Future updateApiKey(String id, ApiKeyUpdateDto apiKeyUpdateDto, { Future? abortTrigger, }) async { - final response = await updateApiKeyWithHttpInfo(id, apiKeyUpdateDto, abortTrigger: abortTrigger,); - 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), 'ApiKeyResponseDto',) as ApiKeyResponseDto; - - } - return null; - } - - /// Update an asset - /// - /// Update information of a specific asset. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [UpdateAssetDto] updateAssetDto (required): - Future updateAssetWithHttpInfo(String id, UpdateAssetDto updateAssetDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/assets/{id}' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody = updateAssetDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'PUT', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Update an asset - /// - /// Update information of a specific asset. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [UpdateAssetDto] updateAssetDto (required): - Future updateAsset(String id, UpdateAssetDto updateAssetDto, { Future? abortTrigger, }) async { - final response = await updateAssetWithHttpInfo(id, updateAssetDto, abortTrigger: abortTrigger,); - 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), 'AssetResponseDto',) as AssetResponseDto; - - } - return null; - } - - /// Update assets - /// - /// Updates multiple assets at the same time. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [AssetBulkUpdateDto] assetBulkUpdateDto (required): - Future updateAssetsWithHttpInfo(AssetBulkUpdateDto assetBulkUpdateDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/assets'; - - // ignore: prefer_final_locals - Object? postBody = assetBulkUpdateDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'PUT', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Update assets - /// - /// Updates multiple assets at the same time. - /// - /// Parameters: - /// - /// * [AssetBulkUpdateDto] assetBulkUpdateDto (required): - Future updateAssets(AssetBulkUpdateDto assetBulkUpdateDto, { Future? abortTrigger, }) async { - final response = await updateAssetsWithHttpInfo(assetBulkUpdateDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - } - - /// Update a library - /// - /// Update an existing external library. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [UpdateLibraryDto] updateLibraryDto (required): - Future updateLibraryWithHttpInfo(String id, UpdateLibraryDto updateLibraryDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/libraries/{id}' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody = updateLibraryDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'PUT', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Update a library - /// - /// Update an existing external library. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [UpdateLibraryDto] updateLibraryDto (required): - Future updateLibrary(String id, UpdateLibraryDto updateLibraryDto, { Future? abortTrigger, }) async { - final response = await updateLibraryWithHttpInfo(id, updateLibraryDto, abortTrigger: abortTrigger,); - 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), 'LibraryResponseDto',) as LibraryResponseDto; - - } - return null; - } - - /// Update a memory - /// - /// Update an existing memory by its ID. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [MemoryUpdateDto] memoryUpdateDto (required): - Future updateMemoryWithHttpInfo(String id, MemoryUpdateDto memoryUpdateDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/memories/{id}' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody = memoryUpdateDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'PUT', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Update a memory - /// - /// Update an existing memory by its ID. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [MemoryUpdateDto] memoryUpdateDto (required): - Future updateMemory(String id, MemoryUpdateDto memoryUpdateDto, { Future? abortTrigger, }) async { - final response = await updateMemoryWithHttpInfo(id, memoryUpdateDto, abortTrigger: abortTrigger,); - 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), 'MemoryResponseDto',) as MemoryResponseDto; - - } - return null; - } - - /// Update my preferences - /// - /// Update the preferences of the current user. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [UserPreferencesUpdateDto] userPreferencesUpdateDto (required): - Future updateMyPreferencesWithHttpInfo(UserPreferencesUpdateDto userPreferencesUpdateDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/users/me/preferences'; - - // ignore: prefer_final_locals - Object? postBody = userPreferencesUpdateDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'PUT', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Update my preferences - /// - /// Update the preferences of the current user. - /// - /// Parameters: - /// - /// * [UserPreferencesUpdateDto] userPreferencesUpdateDto (required): - Future updateMyPreferences(UserPreferencesUpdateDto userPreferencesUpdateDto, { Future? abortTrigger, }) async { - final response = await updateMyPreferencesWithHttpInfo(userPreferencesUpdateDto, abortTrigger: abortTrigger,); - 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), 'UserPreferencesResponseDto',) as UserPreferencesResponseDto; - - } - return null; - } - - /// Update current user - /// - /// Update the current user making the API request. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [UserUpdateMeDto] userUpdateMeDto (required): - Future updateMyUserWithHttpInfo(UserUpdateMeDto userUpdateMeDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/users/me'; - - // ignore: prefer_final_locals - Object? postBody = userUpdateMeDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'PUT', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Update current user - /// - /// Update the current user making the API request. - /// - /// Parameters: - /// - /// * [UserUpdateMeDto] userUpdateMeDto (required): - Future updateMyUser(UserUpdateMeDto userUpdateMeDto, { Future? abortTrigger, }) async { - final response = await updateMyUserWithHttpInfo(userUpdateMeDto, abortTrigger: abortTrigger,); - 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; - } - - /// Update person - /// - /// Update an individual person. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [PersonUpdateDto] personUpdateDto (required): - Future updatePersonWithHttpInfo(String id, PersonUpdateDto personUpdateDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/people/{id}' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody = personUpdateDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'PUT', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Update person - /// - /// Update an individual person. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [PersonUpdateDto] personUpdateDto (required): - Future updatePerson(String id, PersonUpdateDto personUpdateDto, { Future? abortTrigger, }) async { - final response = await updatePersonWithHttpInfo(id, personUpdateDto, abortTrigger: abortTrigger,); - 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), 'PersonResponseDto',) as PersonResponseDto; - - } - return null; - } - - /// Update a session - /// - /// Update a specific session identified by id. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [SessionUpdateDto] sessionUpdateDto (required): - Future updateSessionWithHttpInfo(String id, SessionUpdateDto sessionUpdateDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/sessions/{id}' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody = sessionUpdateDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'PUT', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Update a session - /// - /// Update a specific session identified by id. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [SessionUpdateDto] sessionUpdateDto (required): - Future updateSession(String id, SessionUpdateDto sessionUpdateDto, { Future? abortTrigger, }) async { - final response = await updateSessionWithHttpInfo(id, sessionUpdateDto, abortTrigger: abortTrigger,); - 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), 'SessionResponseDto',) as SessionResponseDto; - - } - return null; - } - - /// Update a stack - /// - /// Update an existing stack by its ID. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [StackUpdateDto] stackUpdateDto (required): - Future updateStackWithHttpInfo(String id, StackUpdateDto stackUpdateDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/stacks/{id}' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody = stackUpdateDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'PUT', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Update a stack - /// - /// Update an existing stack by its ID. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [StackUpdateDto] stackUpdateDto (required): - Future updateStack(String id, StackUpdateDto stackUpdateDto, { Future? abortTrigger, }) async { - final response = await updateStackWithHttpInfo(id, stackUpdateDto, abortTrigger: abortTrigger,); - 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), 'StackResponseDto',) as StackResponseDto; - - } - return null; - } - - /// Update a tag - /// - /// Update an existing tag identified by its ID. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [TagUpdateDto] tagUpdateDto (required): - Future updateTagWithHttpInfo(String id, TagUpdateDto tagUpdateDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/tags/{id}' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody = tagUpdateDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'PUT', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Update a tag - /// - /// Update an existing tag identified by its ID. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [TagUpdateDto] tagUpdateDto (required): - Future updateTag(String id, TagUpdateDto tagUpdateDto, { Future? abortTrigger, }) async { - final response = await updateTagWithHttpInfo(id, tagUpdateDto, abortTrigger: abortTrigger,); - 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), 'TagResponseDto',) as TagResponseDto; - - } - return null; - } - - /// Update a user - /// - /// Update an existing user. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [UserAdminUpdateDto] userAdminUpdateDto (required): - Future updateUserAdminWithHttpInfo(String id, UserAdminUpdateDto userAdminUpdateDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/admin/users/{id}' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody = userAdminUpdateDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'PUT', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Update a user - /// - /// Update an existing user. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [UserAdminUpdateDto] userAdminUpdateDto (required): - Future updateUserAdmin(String id, UserAdminUpdateDto userAdminUpdateDto, { Future? abortTrigger, }) async { - final response = await updateUserAdminWithHttpInfo(id, userAdminUpdateDto, abortTrigger: abortTrigger,); - 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; - } - - /// Update user preferences - /// - /// Update the preferences of a specific user. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [UserPreferencesUpdateDto] userPreferencesUpdateDto (required): - Future updateUserPreferencesAdminWithHttpInfo(String id, UserPreferencesUpdateDto userPreferencesUpdateDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/admin/users/{id}/preferences' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody = userPreferencesUpdateDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'PUT', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Update user preferences - /// - /// Update the preferences of a specific user. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [UserPreferencesUpdateDto] userPreferencesUpdateDto (required): - Future updateUserPreferencesAdmin(String id, UserPreferencesUpdateDto userPreferencesUpdateDto, { Future? abortTrigger, }) async { - final response = await updateUserPreferencesAdminWithHttpInfo(id, userPreferencesUpdateDto, abortTrigger: abortTrigger,); - 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), 'UserPreferencesResponseDto',) as UserPreferencesResponseDto; - - } - return null; - } - - /// Update a workflow - /// - /// Update the information of a specific workflow by its ID. This endpoint can be used to update the workflow name, description, trigger type, filters and actions order, etc. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [WorkflowUpdateDto] workflowUpdateDto (required): - Future updateWorkflowWithHttpInfo(String id, WorkflowUpdateDto workflowUpdateDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/workflows/{id}' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody = workflowUpdateDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'PUT', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Update a workflow - /// - /// Update the information of a specific workflow by its ID. This endpoint can be used to update the workflow name, description, trigger type, filters and actions order, etc. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [WorkflowUpdateDto] workflowUpdateDto (required): - Future updateWorkflow(String id, WorkflowUpdateDto workflowUpdateDto, { Future? abortTrigger, }) async { - final response = await updateWorkflowWithHttpInfo(id, workflowUpdateDto, abortTrigger: abortTrigger,); - 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), 'WorkflowResponseDto',) as WorkflowResponseDto; - - } - return null; - } -} diff --git a/mobile/openapi/lib/api/download_api.dart b/mobile/openapi/lib/api/download_api.dart deleted file mode 100644 index ac26259277..0000000000 --- a/mobile/openapi/lib/api/download_api.dart +++ /dev/null @@ -1,162 +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 DownloadApi { - DownloadApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient; - - final ApiClient apiClient; - - /// 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]. - /// - /// Parameters: - /// - /// * [DownloadArchiveDto] downloadArchiveDto (required): - /// - /// * [String] key: - /// - /// * [String] slug: - Future downloadArchiveWithHttpInfo(DownloadArchiveDto downloadArchiveDto, { String? key, String? slug, Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/download/archive'; - - // ignore: prefer_final_locals - Object? postBody = downloadArchiveDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - if (key != null) { - queryParams.addAll(_queryParams('', 'key', key)); - } - if (slug != null) { - queryParams.addAll(_queryParams('', 'slug', slug)); - } - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'POST', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Download asset archive - /// - /// Download a ZIP archive containing the specified assets. The assets must have been previously requested via the \"getDownloadInfo\" endpoint. - /// - /// Parameters: - /// - /// * [DownloadArchiveDto] downloadArchiveDto (required): - /// - /// * [String] key: - /// - /// * [String] slug: - Future downloadArchive(DownloadArchiveDto downloadArchiveDto, { String? key, String? slug, Future? abortTrigger, }) async { - final response = await downloadArchiveWithHttpInfo(downloadArchiveDto, key: key, slug: slug, abortTrigger: abortTrigger,); - 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), 'MultipartFile',) as MultipartFile; - - } - return null; - } - - /// 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]. - /// - /// Parameters: - /// - /// * [DownloadInfoDto] downloadInfoDto (required): - /// - /// * [String] key: - /// - /// * [String] slug: - Future getDownloadInfoWithHttpInfo(DownloadInfoDto downloadInfoDto, { String? key, String? slug, Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/download/info'; - - // ignore: prefer_final_locals - Object? postBody = downloadInfoDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - if (key != null) { - queryParams.addAll(_queryParams('', 'key', key)); - } - if (slug != null) { - queryParams.addAll(_queryParams('', 'slug', slug)); - } - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'POST', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// 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: - /// - /// * [DownloadInfoDto] downloadInfoDto (required): - /// - /// * [String] key: - /// - /// * [String] slug: - Future getDownloadInfo(DownloadInfoDto downloadInfoDto, { String? key, String? slug, Future? abortTrigger, }) async { - final response = await getDownloadInfoWithHttpInfo(downloadInfoDto, key: key, slug: slug, abortTrigger: abortTrigger,); - 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), 'DownloadResponseDto',) as DownloadResponseDto; - - } - return null; - } -} diff --git a/mobile/openapi/lib/api/duplicates_api.dart b/mobile/openapi/lib/api/duplicates_api.dart deleted file mode 100644 index 357947b889..0000000000 --- a/mobile/openapi/lib/api/duplicates_api.dart +++ /dev/null @@ -1,229 +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 DuplicatesApi { - DuplicatesApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient; - - final ApiClient apiClient; - - /// Dismiss a duplicate group - /// - /// Dismiss a duplicate group by its ID, unlinking all assets in the group without deleting them. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - Future deleteDuplicateWithHttpInfo(String id, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/duplicates/{id}' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'DELETE', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Dismiss a duplicate group - /// - /// Dismiss a duplicate group by its ID, unlinking all assets in the group without deleting them. - /// - /// Parameters: - /// - /// * [String] id (required): - Future deleteDuplicate(String id, { Future? abortTrigger, }) async { - final response = await deleteDuplicateWithHttpInfo(id, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - } - - /// Delete duplicates - /// - /// Delete multiple duplicate assets specified by their IDs. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [BulkIdsDto] bulkIdsDto (required): - Future deleteDuplicatesWithHttpInfo(BulkIdsDto bulkIdsDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/duplicates'; - - // ignore: prefer_final_locals - Object? postBody = bulkIdsDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'DELETE', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Delete duplicates - /// - /// Delete multiple duplicate assets specified by their IDs. - /// - /// Parameters: - /// - /// * [BulkIdsDto] bulkIdsDto (required): - Future deleteDuplicates(BulkIdsDto bulkIdsDto, { Future? abortTrigger, }) async { - final response = await deleteDuplicatesWithHttpInfo(bulkIdsDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - } - - /// Retrieve duplicates - /// - /// Retrieve a list of duplicate assets available to the authenticated user. - /// - /// Note: This method returns the HTTP [Response]. - Future getAssetDuplicatesWithHttpInfo({ Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/duplicates'; - - // 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, - abortTrigger: abortTrigger, - ); - } - - /// Retrieve duplicates - /// - /// Retrieve a list of duplicate assets available to the authenticated user. - Future?> getAssetDuplicates({ Future? abortTrigger, }) async { - final response = await getAssetDuplicatesWithHttpInfo(abortTrigger: abortTrigger,); - 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; - } - - /// Resolve duplicate groups - /// - /// Resolve duplicate groups by synchronizing metadata across assets and deleting/trashing duplicates. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [DuplicateResolveDto] duplicateResolveDto (required): - Future resolveDuplicatesWithHttpInfo(DuplicateResolveDto duplicateResolveDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/duplicates/resolve'; - - // ignore: prefer_final_locals - Object? postBody = duplicateResolveDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'POST', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Resolve duplicate groups - /// - /// Resolve duplicate groups by synchronizing metadata across assets and deleting/trashing duplicates. - /// - /// Parameters: - /// - /// * [DuplicateResolveDto] duplicateResolveDto (required): - Future?> resolveDuplicates(DuplicateResolveDto duplicateResolveDto, { Future? abortTrigger, }) async { - final response = await resolveDuplicatesWithHttpInfo(duplicateResolveDto, abortTrigger: abortTrigger,); - 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; - } -} diff --git a/mobile/openapi/lib/api/faces_api.dart b/mobile/openapi/lib/api/faces_api.dart deleted file mode 100644 index 2a71bbbaca..0000000000 --- a/mobile/openapi/lib/api/faces_api.dart +++ /dev/null @@ -1,247 +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 FacesApi { - FacesApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient; - - final ApiClient apiClient; - - /// 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]. - /// - /// Parameters: - /// - /// * [AssetFaceCreateDto] assetFaceCreateDto (required): - Future createFaceWithHttpInfo(AssetFaceCreateDto assetFaceCreateDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/faces'; - - // ignore: prefer_final_locals - Object? postBody = assetFaceCreateDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'POST', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// 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: - /// - /// * [AssetFaceCreateDto] assetFaceCreateDto (required): - Future createFace(AssetFaceCreateDto assetFaceCreateDto, { Future? abortTrigger, }) async { - final response = await createFaceWithHttpInfo(assetFaceCreateDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - } - - /// Delete a face - /// - /// Delete a face identified by the id. Optionally can be force deleted. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [AssetFaceDeleteDto] assetFaceDeleteDto (required): - Future deleteFaceWithHttpInfo(String id, AssetFaceDeleteDto assetFaceDeleteDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/faces/{id}' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody = assetFaceDeleteDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'DELETE', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Delete a face - /// - /// Delete a face identified by the id. Optionally can be force deleted. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [AssetFaceDeleteDto] assetFaceDeleteDto (required): - Future deleteFace(String id, AssetFaceDeleteDto assetFaceDeleteDto, { Future? abortTrigger, }) async { - final response = await deleteFaceWithHttpInfo(id, assetFaceDeleteDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - } - - /// Retrieve faces for asset - /// - /// Retrieve all faces belonging to an asset. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - /// Face ID - Future getFacesWithHttpInfo(String id, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/faces'; - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - queryParams.addAll(_queryParams('', 'id', id)); - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Retrieve faces for asset - /// - /// Retrieve all faces belonging to an asset. - /// - /// Parameters: - /// - /// * [String] id (required): - /// Face ID - Future?> getFaces(String id, { Future? abortTrigger, }) async { - final response = await getFacesWithHttpInfo(id, abortTrigger: abortTrigger,); - 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; - } - - /// 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]. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [FaceDto] faceDto (required): - Future reassignFacesByIdWithHttpInfo(String id, FaceDto faceDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/faces/{id}' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody = faceDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'PUT', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// 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: - /// - /// * [String] id (required): - /// - /// * [FaceDto] faceDto (required): - Future reassignFacesById(String id, FaceDto faceDto, { Future? abortTrigger, }) async { - final response = await reassignFacesByIdWithHttpInfo(id, faceDto, abortTrigger: abortTrigger,); - 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), 'PersonResponseDto',) as PersonResponseDto; - - } - return null; - } -} diff --git a/mobile/openapi/lib/api/jobs_api.dart b/mobile/openapi/lib/api/jobs_api.dart deleted file mode 100644 index 287432ad9a..0000000000 --- a/mobile/openapi/lib/api/jobs_api.dart +++ /dev/null @@ -1,178 +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 JobsApi { - JobsApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient; - - final ApiClient apiClient; - - /// 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]. - /// - /// Parameters: - /// - /// * [JobCreateDto] jobCreateDto (required): - Future createJobWithHttpInfo(JobCreateDto jobCreateDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/jobs'; - - // ignore: prefer_final_locals - Object? postBody = jobCreateDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'POST', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// 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: - /// - /// * [JobCreateDto] jobCreateDto (required): - Future createJob(JobCreateDto jobCreateDto, { Future? abortTrigger, }) async { - final response = await createJobWithHttpInfo(jobCreateDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - } - - /// 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 getQueuesLegacyWithHttpInfo({ Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/jobs'; - - // 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, - abortTrigger: abortTrigger, - ); - } - - /// Retrieve queue counts and status - /// - /// Retrieve the counts of the current queue, as well as the current status. - Future getQueuesLegacy({ Future? abortTrigger, }) async { - final response = await getQueuesLegacyWithHttpInfo(abortTrigger: abortTrigger,); - 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), 'QueuesResponseLegacyDto',) as QueuesResponseLegacyDto; - - } - return null; - } - - /// 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]. - /// - /// Parameters: - /// - /// * [QueueName] name (required): - /// - /// * [QueueCommandDto] queueCommandDto (required): - Future runQueueCommandLegacyWithHttpInfo(QueueName name, QueueCommandDto queueCommandDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/jobs/{name}' - .replaceAll('{name}', name.toString()); - - // ignore: prefer_final_locals - Object? postBody = queueCommandDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'PUT', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// 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: - /// - /// * [QueueName] name (required): - /// - /// * [QueueCommandDto] queueCommandDto (required): - Future runQueueCommandLegacy(QueueName name, QueueCommandDto queueCommandDto, { Future? abortTrigger, }) async { - final response = await runQueueCommandLegacyWithHttpInfo(name, queueCommandDto, abortTrigger: abortTrigger,); - 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), 'QueueResponseLegacyDto',) as QueueResponseLegacyDto; - - } - return null; - } -} diff --git a/mobile/openapi/lib/api/libraries_api.dart b/mobile/openapi/lib/api/libraries_api.dart deleted file mode 100644 index a3b3086994..0000000000 --- a/mobile/openapi/lib/api/libraries_api.dart +++ /dev/null @@ -1,467 +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 LibrariesApi { - LibrariesApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient; - - final ApiClient apiClient; - - /// Create a library - /// - /// Create a new external library. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [CreateLibraryDto] createLibraryDto (required): - Future createLibraryWithHttpInfo(CreateLibraryDto createLibraryDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/libraries'; - - // ignore: prefer_final_locals - Object? postBody = createLibraryDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'POST', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Create a library - /// - /// Create a new external library. - /// - /// Parameters: - /// - /// * [CreateLibraryDto] createLibraryDto (required): - Future createLibrary(CreateLibraryDto createLibraryDto, { Future? abortTrigger, }) async { - final response = await createLibraryWithHttpInfo(createLibraryDto, abortTrigger: abortTrigger,); - 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), 'LibraryResponseDto',) as LibraryResponseDto; - - } - return null; - } - - /// Delete a library - /// - /// Delete an external library by its ID. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - Future deleteLibraryWithHttpInfo(String id, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/libraries/{id}' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'DELETE', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Delete a library - /// - /// Delete an external library by its ID. - /// - /// Parameters: - /// - /// * [String] id (required): - Future deleteLibrary(String id, { Future? abortTrigger, }) async { - final response = await deleteLibraryWithHttpInfo(id, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - } - - /// Retrieve libraries - /// - /// Retrieve a list of external libraries. - /// - /// Note: This method returns the HTTP [Response]. - Future getAllLibrariesWithHttpInfo({ Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/libraries'; - - // 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, - abortTrigger: abortTrigger, - ); - } - - /// Retrieve libraries - /// - /// Retrieve a list of external libraries. - Future?> getAllLibraries({ Future? abortTrigger, }) async { - final response = await getAllLibrariesWithHttpInfo(abortTrigger: abortTrigger,); - 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; - } - - /// Retrieve a library - /// - /// Retrieve an external library by its ID. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - Future getLibraryWithHttpInfo(String id, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/libraries/{id}' - .replaceAll('{id}', id); - - // 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, - abortTrigger: abortTrigger, - ); - } - - /// Retrieve a library - /// - /// Retrieve an external library by its ID. - /// - /// Parameters: - /// - /// * [String] id (required): - Future getLibrary(String id, { Future? abortTrigger, }) async { - final response = await getLibraryWithHttpInfo(id, abortTrigger: abortTrigger,); - 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), 'LibraryResponseDto',) as LibraryResponseDto; - - } - return null; - } - - /// 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]. - /// - /// Parameters: - /// - /// * [String] id (required): - Future getLibraryStatisticsWithHttpInfo(String id, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/libraries/{id}/statistics' - .replaceAll('{id}', id); - - // 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, - abortTrigger: abortTrigger, - ); - } - - /// Retrieve library statistics - /// - /// Retrieve statistics for a specific external library, including number of videos, images, and storage usage. - /// - /// Parameters: - /// - /// * [String] id (required): - Future getLibraryStatistics(String id, { Future? abortTrigger, }) async { - final response = await getLibraryStatisticsWithHttpInfo(id, abortTrigger: abortTrigger,); - 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), 'LibraryStatsResponseDto',) as LibraryStatsResponseDto; - - } - return null; - } - - /// Scan a library - /// - /// Queue a scan for the external library to find and import new assets. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - Future scanLibraryWithHttpInfo(String id, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/libraries/{id}/scan' - .replaceAll('{id}', id); - - // 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, - abortTrigger: abortTrigger, - ); - } - - /// Scan a library - /// - /// Queue a scan for the external library to find and import new assets. - /// - /// Parameters: - /// - /// * [String] id (required): - Future scanLibrary(String id, { Future? abortTrigger, }) async { - final response = await scanLibraryWithHttpInfo(id, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - } - - /// Update a library - /// - /// Update an existing external library. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [UpdateLibraryDto] updateLibraryDto (required): - Future updateLibraryWithHttpInfo(String id, UpdateLibraryDto updateLibraryDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/libraries/{id}' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody = updateLibraryDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'PUT', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Update a library - /// - /// Update an existing external library. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [UpdateLibraryDto] updateLibraryDto (required): - Future updateLibrary(String id, UpdateLibraryDto updateLibraryDto, { Future? abortTrigger, }) async { - final response = await updateLibraryWithHttpInfo(id, updateLibraryDto, abortTrigger: abortTrigger,); - 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), 'LibraryResponseDto',) as LibraryResponseDto; - - } - return null; - } - - /// Validate library settings - /// - /// Validate the settings of an external library. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [ValidateLibraryDto] validateLibraryDto (required): - Future validateWithHttpInfo(String id, ValidateLibraryDto validateLibraryDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/libraries/{id}/validate' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody = validateLibraryDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'POST', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Validate library settings - /// - /// Validate the settings of an external library. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [ValidateLibraryDto] validateLibraryDto (required): - Future validate(String id, ValidateLibraryDto validateLibraryDto, { Future? abortTrigger, }) async { - final response = await validateWithHttpInfo(id, validateLibraryDto, abortTrigger: abortTrigger,); - 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), 'ValidateLibraryResponseDto',) as ValidateLibraryResponseDto; - - } - return null; - } -} diff --git a/mobile/openapi/lib/api/maintenance_admin_api.dart b/mobile/openapi/lib/api/maintenance_admin_api.dart deleted file mode 100644 index 3e43f6d51a..0000000000 --- a/mobile/openapi/lib/api/maintenance_admin_api.dart +++ /dev/null @@ -1,514 +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 MaintenanceAdminApi { - MaintenanceAdminApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient; - - final ApiClient apiClient; - - /// Delete integrity report item - /// - /// Delete a given report item and perform corresponding deletion (e.g. trash asset, delete file) - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - Future deleteIntegrityReportWithHttpInfo(String id, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/admin/integrity/report/{id}' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'DELETE', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Delete integrity report item - /// - /// Delete a given report item and perform corresponding deletion (e.g. trash asset, delete file) - /// - /// Parameters: - /// - /// * [String] id (required): - Future deleteIntegrityReport(String id, { Future? abortTrigger, }) async { - final response = await deleteIntegrityReportWithHttpInfo(id, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - } - - /// Detect existing install - /// - /// Collect integrity checks and other heuristics about local data. - /// - /// Note: This method returns the HTTP [Response]. - Future detectPriorInstallWithHttpInfo({ Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/admin/maintenance/detect-install'; - - // 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, - abortTrigger: abortTrigger, - ); - } - - /// Detect existing install - /// - /// Collect integrity checks and other heuristics about local data. - Future detectPriorInstall({ Future? abortTrigger, }) async { - final response = await detectPriorInstallWithHttpInfo(abortTrigger: abortTrigger,); - 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), 'MaintenanceDetectInstallResponseDto',) as MaintenanceDetectInstallResponseDto; - - } - return null; - } - - /// Get integrity report by type - /// - /// Get all flagged items by integrity report type - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [IntegrityReport] type (required): - /// - /// * [String] cursor: - /// Cursor for pagination - /// - /// * [int] limit: - /// Number of items per page - Future getIntegrityReportWithHttpInfo(IntegrityReport type, { String? cursor, int? limit, Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/admin/integrity/report'; - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - if (cursor != null) { - queryParams.addAll(_queryParams('', 'cursor', cursor)); - } - if (limit != null) { - queryParams.addAll(_queryParams('', 'limit', limit)); - } - queryParams.addAll(_queryParams('', 'type', type)); - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Get integrity report by type - /// - /// Get all flagged items by integrity report type - /// - /// Parameters: - /// - /// * [IntegrityReport] type (required): - /// - /// * [String] cursor: - /// Cursor for pagination - /// - /// * [int] limit: - /// Number of items per page - Future getIntegrityReport(IntegrityReport type, { String? cursor, int? limit, Future? abortTrigger, }) async { - final response = await getIntegrityReportWithHttpInfo(type, cursor: cursor, limit: limit, abortTrigger: abortTrigger,); - 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), 'IntegrityReportResponseDto',) as IntegrityReportResponseDto; - - } - return null; - } - - /// Export integrity report by type as CSV - /// - /// Get all integrity report entries for a given type as a CSV - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [IntegrityReport] type (required): - Future getIntegrityReportCsvWithHttpInfo(IntegrityReport type, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/admin/integrity/report/{type}/csv' - .replaceAll('{type}', type.toString()); - - // 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, - abortTrigger: abortTrigger, - ); - } - - /// Export integrity report by type as CSV - /// - /// Get all integrity report entries for a given type as a CSV - /// - /// Parameters: - /// - /// * [IntegrityReport] type (required): - Future getIntegrityReportCsv(IntegrityReport type, { Future? abortTrigger, }) async { - final response = await getIntegrityReportCsvWithHttpInfo(type, abortTrigger: abortTrigger,); - 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), 'MultipartFile',) as MultipartFile; - - } - return null; - } - - /// Download flagged file - /// - /// Download the untracked/broken file if one exists - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - Future getIntegrityReportFileWithHttpInfo(String id, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/admin/integrity/report/{id}/file' - .replaceAll('{id}', id); - - // 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, - abortTrigger: abortTrigger, - ); - } - - /// Download flagged file - /// - /// Download the untracked/broken file if one exists - /// - /// Parameters: - /// - /// * [String] id (required): - Future getIntegrityReportFile(String id, { Future? abortTrigger, }) async { - final response = await getIntegrityReportFileWithHttpInfo(id, abortTrigger: abortTrigger,); - 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), 'MultipartFile',) as MultipartFile; - - } - return null; - } - - /// Get integrity report summary - /// - /// Get a count of the items flagged in each integrity report - /// - /// Note: This method returns the HTTP [Response]. - Future getIntegrityReportSummaryWithHttpInfo({ Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/admin/integrity/summary'; - - // 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, - abortTrigger: abortTrigger, - ); - } - - /// Get integrity report summary - /// - /// Get a count of the items flagged in each integrity report - Future getIntegrityReportSummary({ Future? abortTrigger, }) async { - final response = await getIntegrityReportSummaryWithHttpInfo(abortTrigger: abortTrigger,); - 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), 'IntegrityReportSummaryResponseDto',) as IntegrityReportSummaryResponseDto; - - } - return null; - } - - /// Get maintenance mode status - /// - /// Fetch information about the currently running maintenance action. - /// - /// Note: This method returns the HTTP [Response]. - Future getMaintenanceStatusWithHttpInfo({ Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/admin/maintenance/status'; - - // 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, - abortTrigger: abortTrigger, - ); - } - - /// Get maintenance mode status - /// - /// Fetch information about the currently running maintenance action. - Future getMaintenanceStatus({ Future? abortTrigger, }) async { - final response = await getMaintenanceStatusWithHttpInfo(abortTrigger: abortTrigger,); - 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), 'MaintenanceStatusResponseDto',) as MaintenanceStatusResponseDto; - - } - return null; - } - - /// Log into maintenance mode - /// - /// Login with maintenance token or cookie to receive current information and perform further actions. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [MaintenanceLoginDto] maintenanceLoginDto (required): - Future maintenanceLoginWithHttpInfo(MaintenanceLoginDto maintenanceLoginDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/admin/maintenance/login'; - - // ignore: prefer_final_locals - Object? postBody = maintenanceLoginDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'POST', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Log into maintenance mode - /// - /// Login with maintenance token or cookie to receive current information and perform further actions. - /// - /// Parameters: - /// - /// * [MaintenanceLoginDto] maintenanceLoginDto (required): - Future maintenanceLogin(MaintenanceLoginDto maintenanceLoginDto, { Future? abortTrigger, }) async { - final response = await maintenanceLoginWithHttpInfo(maintenanceLoginDto, abortTrigger: abortTrigger,); - 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), 'MaintenanceAuthDto',) as MaintenanceAuthDto; - - } - return null; - } - - /// Set maintenance mode - /// - /// Put Immich into or take it out of maintenance mode - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [SetMaintenanceModeDto] setMaintenanceModeDto (required): - Future setMaintenanceModeWithHttpInfo(SetMaintenanceModeDto setMaintenanceModeDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/admin/maintenance'; - - // ignore: prefer_final_locals - Object? postBody = setMaintenanceModeDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'POST', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Set maintenance mode - /// - /// Put Immich into or take it out of maintenance mode - /// - /// Parameters: - /// - /// * [SetMaintenanceModeDto] setMaintenanceModeDto (required): - Future setMaintenanceMode(SetMaintenanceModeDto setMaintenanceModeDto, { Future? abortTrigger, }) async { - final response = await setMaintenanceModeWithHttpInfo(setMaintenanceModeDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - } -} diff --git a/mobile/openapi/lib/api/map_api.dart b/mobile/openapi/lib/api/map_api.dart deleted file mode 100644 index 7e1618a875..0000000000 --- a/mobile/openapi/lib/api/map_api.dart +++ /dev/null @@ -1,200 +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 MapApi { - MapApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient; - - final ApiClient apiClient; - - /// 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: - /// - /// * [DateTime] fileCreatedAfter: - /// Filter assets created after this date - /// - /// * [DateTime] fileCreatedBefore: - /// Filter assets created before this date - /// - /// * [bool] isArchived: - /// Filter by archived status - /// - /// * [bool] isFavorite: - /// Filter by favorite status - /// - /// * [bool] withPartners: - /// Include partner assets - /// - /// * [bool] withSharedAlbums: - /// Include shared album assets - Future getMapMarkersWithHttpInfo({ DateTime? fileCreatedAfter, DateTime? fileCreatedBefore, bool? isArchived, bool? isFavorite, bool? withPartners, bool? withSharedAlbums, Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/map/markers'; - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - 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)); - } - if (withSharedAlbums != null) { - queryParams.addAll(_queryParams('', 'withSharedAlbums', withSharedAlbums)); - } - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Retrieve map markers - /// - /// Retrieve a list of latitude and longitude coordinates for every asset with location data. - /// - /// Parameters: - /// - /// * [DateTime] fileCreatedAfter: - /// Filter assets created after this date - /// - /// * [DateTime] fileCreatedBefore: - /// Filter assets created before this date - /// - /// * [bool] isArchived: - /// Filter by archived status - /// - /// * [bool] isFavorite: - /// Filter by favorite status - /// - /// * [bool] withPartners: - /// Include partner assets - /// - /// * [bool] withSharedAlbums: - /// Include shared album assets - Future?> getMapMarkers({ DateTime? fileCreatedAfter, DateTime? fileCreatedBefore, bool? isArchived, bool? isFavorite, bool? withPartners, bool? withSharedAlbums, Future? abortTrigger, }) async { - final response = await getMapMarkersWithHttpInfo(fileCreatedAfter: fileCreatedAfter, fileCreatedBefore: fileCreatedBefore, isArchived: isArchived, isFavorite: isFavorite, withPartners: withPartners, withSharedAlbums: withSharedAlbums, abortTrigger: abortTrigger,); - 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; - } - - /// 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): - /// Latitude (-90 to 90) - /// - /// * [double] lon (required): - /// Longitude (-180 to 180) - Future reverseGeocodeWithHttpInfo(double lat, double lon, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/map/reverse-geocode'; - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - queryParams.addAll(_queryParams('', 'lat', lat)); - queryParams.addAll(_queryParams('', 'lon', lon)); - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Reverse geocode coordinates - /// - /// Retrieve location information (e.g., city, country) for given latitude and longitude coordinates. - /// - /// Parameters: - /// - /// * [double] lat (required): - /// Latitude (-90 to 90) - /// - /// * [double] lon (required): - /// Longitude (-180 to 180) - Future?> reverseGeocode(double lat, double lon, { Future? abortTrigger, }) async { - final response = await reverseGeocodeWithHttpInfo(lat, lon, abortTrigger: abortTrigger,); - 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; - } -} diff --git a/mobile/openapi/lib/api/memories_api.dart b/mobile/openapi/lib/api/memories_api.dart deleted file mode 100644 index f5c653765a..0000000000 --- a/mobile/openapi/lib/api/memories_api.dart +++ /dev/null @@ -1,586 +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 MemoriesApi { - MemoriesApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient; - - final ApiClient apiClient; - - /// Add assets to a memory - /// - /// Add a list of asset IDs to a specific memory. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [BulkIdsDto] bulkIdsDto (required): - Future addMemoryAssetsWithHttpInfo(String id, BulkIdsDto bulkIdsDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/memories/{id}/assets' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody = bulkIdsDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'PUT', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Add assets to a memory - /// - /// Add a list of asset IDs to a specific memory. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [BulkIdsDto] bulkIdsDto (required): - Future?> addMemoryAssets(String id, BulkIdsDto bulkIdsDto, { Future? abortTrigger, }) async { - final response = await addMemoryAssetsWithHttpInfo(id, bulkIdsDto, abortTrigger: abortTrigger,); - 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; - } - - /// 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]. - /// - /// Parameters: - /// - /// * [MemoryCreateDto] memoryCreateDto (required): - Future createMemoryWithHttpInfo(MemoryCreateDto memoryCreateDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/memories'; - - // ignore: prefer_final_locals - Object? postBody = memoryCreateDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'POST', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Create a memory - /// - /// Create a new memory by providing a name, description, and a list of asset IDs to include in the memory. - /// - /// Parameters: - /// - /// * [MemoryCreateDto] memoryCreateDto (required): - Future createMemory(MemoryCreateDto memoryCreateDto, { Future? abortTrigger, }) async { - final response = await createMemoryWithHttpInfo(memoryCreateDto, abortTrigger: abortTrigger,); - 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), 'MemoryResponseDto',) as MemoryResponseDto; - - } - return null; - } - - /// Delete a memory - /// - /// Delete a specific memory by its ID. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - Future deleteMemoryWithHttpInfo(String id, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/memories/{id}' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'DELETE', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Delete a memory - /// - /// Delete a specific memory by its ID. - /// - /// Parameters: - /// - /// * [String] id (required): - Future deleteMemory(String id, { Future? abortTrigger, }) async { - final response = await deleteMemoryWithHttpInfo(id, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - } - - /// Retrieve a memory - /// - /// Retrieve a specific memory by its ID. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - Future getMemoryWithHttpInfo(String id, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/memories/{id}' - .replaceAll('{id}', id); - - // 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, - abortTrigger: abortTrigger, - ); - } - - /// Retrieve a memory - /// - /// Retrieve a specific memory by its ID. - /// - /// Parameters: - /// - /// * [String] id (required): - Future getMemory(String id, { Future? abortTrigger, }) async { - final response = await getMemoryWithHttpInfo(id, abortTrigger: abortTrigger,); - 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), 'MemoryResponseDto',) as MemoryResponseDto; - - } - return null; - } - - /// Retrieve memories statistics - /// - /// Retrieve statistics about memories, such as total count and other relevant metrics. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [DateTime] for_: - /// Filter by date - /// - /// * [bool] isSaved: - /// Filter by saved status - /// - /// * [bool] isTrashed: - /// Include trashed memories - /// - /// * [MemorySearchOrder] order: - /// - /// * [int] size: - /// Number of memories to return - /// - /// * [MemoryType] type: - Future memoriesStatisticsWithHttpInfo({ DateTime? for_, bool? isSaved, bool? isTrashed, MemorySearchOrder? order, int? size, MemoryType? type, Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/memories/statistics'; - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - if (for_ != null) { - queryParams.addAll(_queryParams('', 'for', for_)); - } - if (isSaved != null) { - queryParams.addAll(_queryParams('', 'isSaved', isSaved)); - } - 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)); - } - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Retrieve memories statistics - /// - /// Retrieve statistics about memories, such as total count and other relevant metrics. - /// - /// Parameters: - /// - /// * [DateTime] for_: - /// Filter by date - /// - /// * [bool] isSaved: - /// Filter by saved status - /// - /// * [bool] isTrashed: - /// Include trashed memories - /// - /// * [MemorySearchOrder] order: - /// - /// * [int] size: - /// Number of memories to return - /// - /// * [MemoryType] type: - Future memoriesStatistics({ DateTime? for_, bool? isSaved, bool? isTrashed, MemorySearchOrder? order, int? size, MemoryType? type, Future? abortTrigger, }) async { - final response = await memoriesStatisticsWithHttpInfo(for_: for_, isSaved: isSaved, isTrashed: isTrashed, order: order, size: size, type: type, abortTrigger: abortTrigger,); - 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), 'MemoryStatisticsResponseDto',) as MemoryStatisticsResponseDto; - - } - return null; - } - - /// Remove assets from a memory - /// - /// Remove a list of asset IDs from a specific memory. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [BulkIdsDto] bulkIdsDto (required): - Future removeMemoryAssetsWithHttpInfo(String id, BulkIdsDto bulkIdsDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/memories/{id}/assets' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody = bulkIdsDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'DELETE', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Remove assets from a memory - /// - /// Remove a list of asset IDs from a specific memory. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [BulkIdsDto] bulkIdsDto (required): - Future?> removeMemoryAssets(String id, BulkIdsDto bulkIdsDto, { Future? abortTrigger, }) async { - final response = await removeMemoryAssetsWithHttpInfo(id, bulkIdsDto, abortTrigger: abortTrigger,); - 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; - } - - /// 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]. - /// - /// Parameters: - /// - /// * [DateTime] for_: - /// Filter by date - /// - /// * [bool] isSaved: - /// Filter by saved status - /// - /// * [bool] isTrashed: - /// Include trashed memories - /// - /// * [MemorySearchOrder] order: - /// - /// * [int] size: - /// Number of memories to return - /// - /// * [MemoryType] type: - Future searchMemoriesWithHttpInfo({ DateTime? for_, bool? isSaved, bool? isTrashed, MemorySearchOrder? order, int? size, MemoryType? type, Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/memories'; - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - if (for_ != null) { - queryParams.addAll(_queryParams('', 'for', for_)); - } - if (isSaved != null) { - queryParams.addAll(_queryParams('', 'isSaved', isSaved)); - } - 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)); - } - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// 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: - /// - /// * [DateTime] for_: - /// Filter by date - /// - /// * [bool] isSaved: - /// Filter by saved status - /// - /// * [bool] isTrashed: - /// Include trashed memories - /// - /// * [MemorySearchOrder] order: - /// - /// * [int] size: - /// Number of memories to return - /// - /// * [MemoryType] type: - Future?> searchMemories({ DateTime? for_, bool? isSaved, bool? isTrashed, MemorySearchOrder? order, int? size, MemoryType? type, Future? abortTrigger, }) async { - final response = await searchMemoriesWithHttpInfo(for_: for_, isSaved: isSaved, isTrashed: isTrashed, order: order, size: size, type: type, abortTrigger: abortTrigger,); - 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; - } - - /// Update a memory - /// - /// Update an existing memory by its ID. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [MemoryUpdateDto] memoryUpdateDto (required): - Future updateMemoryWithHttpInfo(String id, MemoryUpdateDto memoryUpdateDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/memories/{id}' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody = memoryUpdateDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'PUT', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Update a memory - /// - /// Update an existing memory by its ID. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [MemoryUpdateDto] memoryUpdateDto (required): - Future updateMemory(String id, MemoryUpdateDto memoryUpdateDto, { Future? abortTrigger, }) async { - final response = await updateMemoryWithHttpInfo(id, memoryUpdateDto, abortTrigger: abortTrigger,); - 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), 'MemoryResponseDto',) as MemoryResponseDto; - - } - return null; - } -} diff --git a/mobile/openapi/lib/api/notifications_admin_api.dart b/mobile/openapi/lib/api/notifications_admin_api.dart deleted file mode 100644 index e9e18e791e..0000000000 --- a/mobile/openapi/lib/api/notifications_admin_api.dart +++ /dev/null @@ -1,194 +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 NotificationsAdminApi { - NotificationsAdminApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient; - - final ApiClient apiClient; - - /// Create a notification - /// - /// Create a new notification for a specific user. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [NotificationCreateDto] notificationCreateDto (required): - Future createNotificationWithHttpInfo(NotificationCreateDto notificationCreateDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/admin/notifications'; - - // ignore: prefer_final_locals - Object? postBody = notificationCreateDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'POST', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Create a notification - /// - /// Create a new notification for a specific user. - /// - /// Parameters: - /// - /// * [NotificationCreateDto] notificationCreateDto (required): - Future createNotification(NotificationCreateDto notificationCreateDto, { Future? abortTrigger, }) async { - final response = await createNotificationWithHttpInfo(notificationCreateDto, abortTrigger: abortTrigger,); - 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), 'NotificationDto',) as NotificationDto; - - } - return null; - } - - /// Render email template - /// - /// Retrieve a preview of the provided email template. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] name (required): - /// - /// * [TemplateDto] templateDto (required): - Future getNotificationTemplateAdminWithHttpInfo(String name, TemplateDto templateDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/admin/notifications/templates/{name}' - .replaceAll('{name}', name); - - // ignore: prefer_final_locals - Object? postBody = templateDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'POST', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Render email template - /// - /// Retrieve a preview of the provided email template. - /// - /// Parameters: - /// - /// * [String] name (required): - /// - /// * [TemplateDto] templateDto (required): - Future getNotificationTemplateAdmin(String name, TemplateDto templateDto, { Future? abortTrigger, }) async { - final response = await getNotificationTemplateAdminWithHttpInfo(name, templateDto, abortTrigger: abortTrigger,); - 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), 'TemplateResponseDto',) as TemplateResponseDto; - - } - return null; - } - - /// Send test email - /// - /// Send a test email using the provided SMTP configuration. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [SystemConfigSmtpDto] systemConfigSmtpDto (required): - Future sendTestEmailAdminWithHttpInfo(SystemConfigSmtpDto systemConfigSmtpDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/admin/notifications/test-email'; - - // ignore: prefer_final_locals - Object? postBody = systemConfigSmtpDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'POST', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Send test email - /// - /// Send a test email using the provided SMTP configuration. - /// - /// Parameters: - /// - /// * [SystemConfigSmtpDto] systemConfigSmtpDto (required): - Future sendTestEmailAdmin(SystemConfigSmtpDto systemConfigSmtpDto, { Future? abortTrigger, }) async { - final response = await sendTestEmailAdminWithHttpInfo(systemConfigSmtpDto, abortTrigger: abortTrigger,); - 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), 'TestEmailResponseDto',) as TestEmailResponseDto; - - } - return null; - } -} diff --git a/mobile/openapi/lib/api/notifications_api.dart b/mobile/openapi/lib/api/notifications_api.dart deleted file mode 100644 index 6b4f213bcd..0000000000 --- a/mobile/openapi/lib/api/notifications_api.dart +++ /dev/null @@ -1,375 +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 NotificationsApi { - NotificationsApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient; - - final ApiClient apiClient; - - /// Delete a notification - /// - /// Delete a specific notification. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - Future deleteNotificationWithHttpInfo(String id, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/notifications/{id}' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'DELETE', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Delete a notification - /// - /// Delete a specific notification. - /// - /// Parameters: - /// - /// * [String] id (required): - Future deleteNotification(String id, { Future? abortTrigger, }) async { - final response = await deleteNotificationWithHttpInfo(id, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - } - - /// Delete notifications - /// - /// Delete a list of notifications at once. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [NotificationDeleteAllDto] notificationDeleteAllDto (required): - Future deleteNotificationsWithHttpInfo(NotificationDeleteAllDto notificationDeleteAllDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/notifications'; - - // ignore: prefer_final_locals - Object? postBody = notificationDeleteAllDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'DELETE', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Delete notifications - /// - /// Delete a list of notifications at once. - /// - /// Parameters: - /// - /// * [NotificationDeleteAllDto] notificationDeleteAllDto (required): - Future deleteNotifications(NotificationDeleteAllDto notificationDeleteAllDto, { Future? abortTrigger, }) async { - final response = await deleteNotificationsWithHttpInfo(notificationDeleteAllDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - } - - /// Get a notification - /// - /// Retrieve a specific notification identified by id. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - Future getNotificationWithHttpInfo(String id, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/notifications/{id}' - .replaceAll('{id}', id); - - // 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, - abortTrigger: abortTrigger, - ); - } - - /// Get a notification - /// - /// Retrieve a specific notification identified by id. - /// - /// Parameters: - /// - /// * [String] id (required): - Future getNotification(String id, { Future? abortTrigger, }) async { - final response = await getNotificationWithHttpInfo(id, abortTrigger: abortTrigger,); - 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), 'NotificationDto',) as NotificationDto; - - } - return null; - } - - /// Retrieve notifications - /// - /// Retrieve a list of notifications. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id: - /// Filter by notification ID - /// - /// * [NotificationLevel] level: - /// - /// * [NotificationType] type: - /// - /// * [bool] unread: - /// Filter by unread status - Future getNotificationsWithHttpInfo({ String? id, NotificationLevel? level, NotificationType? type, bool? unread, Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/notifications'; - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - if (id != null) { - queryParams.addAll(_queryParams('', 'id', id)); - } - if (level != null) { - queryParams.addAll(_queryParams('', 'level', level)); - } - if (type != null) { - queryParams.addAll(_queryParams('', 'type', type)); - } - if (unread != null) { - queryParams.addAll(_queryParams('', 'unread', unread)); - } - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Retrieve notifications - /// - /// Retrieve a list of notifications. - /// - /// Parameters: - /// - /// * [String] id: - /// Filter by notification ID - /// - /// * [NotificationLevel] level: - /// - /// * [NotificationType] type: - /// - /// * [bool] unread: - /// Filter by unread status - Future?> getNotifications({ String? id, NotificationLevel? level, NotificationType? type, bool? unread, Future? abortTrigger, }) async { - final response = await getNotificationsWithHttpInfo(id: id, level: level, type: type, unread: unread, abortTrigger: abortTrigger,); - 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; - } - - /// Update a notification - /// - /// Update a specific notification to set its read status. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [NotificationUpdateDto] notificationUpdateDto (required): - Future updateNotificationWithHttpInfo(String id, NotificationUpdateDto notificationUpdateDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/notifications/{id}' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody = notificationUpdateDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'PUT', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Update a notification - /// - /// Update a specific notification to set its read status. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [NotificationUpdateDto] notificationUpdateDto (required): - Future updateNotification(String id, NotificationUpdateDto notificationUpdateDto, { Future? abortTrigger, }) async { - final response = await updateNotificationWithHttpInfo(id, notificationUpdateDto, abortTrigger: abortTrigger,); - 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), 'NotificationDto',) as NotificationDto; - - } - return null; - } - - /// Update notifications - /// - /// Update a list of notifications. Allows to bulk-set the read status of notifications. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [NotificationUpdateAllDto] notificationUpdateAllDto (required): - Future updateNotificationsWithHttpInfo(NotificationUpdateAllDto notificationUpdateAllDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/notifications'; - - // ignore: prefer_final_locals - Object? postBody = notificationUpdateAllDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'PUT', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Update notifications - /// - /// Update a list of notifications. Allows to bulk-set the read status of notifications. - /// - /// Parameters: - /// - /// * [NotificationUpdateAllDto] notificationUpdateAllDto (required): - Future updateNotifications(NotificationUpdateAllDto notificationUpdateAllDto, { Future? abortTrigger, }) async { - final response = await updateNotificationsWithHttpInfo(notificationUpdateAllDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - } -} diff --git a/mobile/openapi/lib/api/partners_api.dart b/mobile/openapi/lib/api/partners_api.dart deleted file mode 100644 index 45bcdcd085..0000000000 --- a/mobile/openapi/lib/api/partners_api.dart +++ /dev/null @@ -1,307 +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 PartnersApi { - PartnersApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient; - - final ApiClient apiClient; - - /// Create a partner - /// - /// Create a new partner to share assets with. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [PartnerCreateDto] partnerCreateDto (required): - Future createPartnerWithHttpInfo(PartnerCreateDto partnerCreateDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/partners'; - - // ignore: prefer_final_locals - Object? postBody = partnerCreateDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'POST', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Create a partner - /// - /// Create a new partner to share assets with. - /// - /// Parameters: - /// - /// * [PartnerCreateDto] partnerCreateDto (required): - Future createPartner(PartnerCreateDto partnerCreateDto, { Future? abortTrigger, }) async { - final response = await createPartnerWithHttpInfo(partnerCreateDto, abortTrigger: abortTrigger,); - 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), 'PartnerResponseDto',) as PartnerResponseDto; - - } - return null; - } - - /// Create a partner - /// - /// Create a new partner to share assets with. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - Future createPartnerDeprecatedWithHttpInfo(String id, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/partners/{id}' - .replaceAll('{id}', id); - - // 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, - abortTrigger: abortTrigger, - ); - } - - /// Create a partner - /// - /// Create a new partner to share assets with. - /// - /// Parameters: - /// - /// * [String] id (required): - Future createPartnerDeprecated(String id, { Future? abortTrigger, }) async { - final response = await createPartnerDeprecatedWithHttpInfo(id, abortTrigger: abortTrigger,); - 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), 'PartnerResponseDto',) as PartnerResponseDto; - - } - return null; - } - - /// Retrieve partners - /// - /// Retrieve a list of partners with whom assets are shared. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [PartnerDirection] direction (required): - Future getPartnersWithHttpInfo(PartnerDirection direction, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/partners'; - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - queryParams.addAll(_queryParams('', 'direction', direction)); - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Retrieve partners - /// - /// Retrieve a list of partners with whom assets are shared. - /// - /// Parameters: - /// - /// * [PartnerDirection] direction (required): - Future?> getPartners(PartnerDirection direction, { Future? abortTrigger, }) async { - final response = await getPartnersWithHttpInfo(direction, abortTrigger: abortTrigger,); - 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; - } - - /// Remove a partner - /// - /// Stop sharing assets with a partner. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - Future removePartnerWithHttpInfo(String id, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/partners/{id}' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'DELETE', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Remove a partner - /// - /// Stop sharing assets with a partner. - /// - /// Parameters: - /// - /// * [String] id (required): - Future removePartner(String id, { Future? abortTrigger, }) async { - final response = await removePartnerWithHttpInfo(id, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - } - - /// Update a partner - /// - /// Specify whether a partner's assets should appear in the user's timeline. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [PartnerUpdateDto] partnerUpdateDto (required): - Future updatePartnerWithHttpInfo(String id, PartnerUpdateDto partnerUpdateDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/partners/{id}' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody = partnerUpdateDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'PUT', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Update a partner - /// - /// Specify whether a partner's assets should appear in the user's timeline. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [PartnerUpdateDto] partnerUpdateDto (required): - Future updatePartner(String id, PartnerUpdateDto partnerUpdateDto, { Future? abortTrigger, }) async { - final response = await updatePartnerWithHttpInfo(id, partnerUpdateDto, abortTrigger: abortTrigger,); - 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), 'PartnerResponseDto',) as PartnerResponseDto; - - } - return null; - } -} diff --git a/mobile/openapi/lib/api/people_api.dart b/mobile/openapi/lib/api/people_api.dart deleted file mode 100644 index c35491e110..0000000000 --- a/mobile/openapi/lib/api/people_api.dart +++ /dev/null @@ -1,699 +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 PeopleApi { - PeopleApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient; - - final ApiClient apiClient; - - /// Create a person - /// - /// Create a new person that can have multiple faces assigned to them. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [PersonCreateDto] personCreateDto (required): - Future createPersonWithHttpInfo(PersonCreateDto personCreateDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/people'; - - // ignore: prefer_final_locals - Object? postBody = personCreateDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'POST', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Create a person - /// - /// Create a new person that can have multiple faces assigned to them. - /// - /// Parameters: - /// - /// * [PersonCreateDto] personCreateDto (required): - Future createPerson(PersonCreateDto personCreateDto, { Future? abortTrigger, }) async { - final response = await createPersonWithHttpInfo(personCreateDto, abortTrigger: abortTrigger,); - 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), 'PersonResponseDto',) as PersonResponseDto; - - } - return null; - } - - /// Delete people - /// - /// Bulk delete a list of people at once. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [BulkIdsDto] bulkIdsDto (required): - Future deletePeopleWithHttpInfo(BulkIdsDto bulkIdsDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/people'; - - // ignore: prefer_final_locals - Object? postBody = bulkIdsDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'DELETE', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Delete people - /// - /// Bulk delete a list of people at once. - /// - /// Parameters: - /// - /// * [BulkIdsDto] bulkIdsDto (required): - Future deletePeople(BulkIdsDto bulkIdsDto, { Future? abortTrigger, }) async { - final response = await deletePeopleWithHttpInfo(bulkIdsDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - } - - /// Delete person - /// - /// Delete an individual person. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - Future deletePersonWithHttpInfo(String id, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/people/{id}' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'DELETE', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Delete person - /// - /// Delete an individual person. - /// - /// Parameters: - /// - /// * [String] id (required): - Future deletePerson(String id, { Future? abortTrigger, }) async { - final response = await deletePersonWithHttpInfo(id, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - } - - /// Get all people - /// - /// Retrieve a list of all people. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] closestAssetId: - /// Closest asset ID for similarity search - /// - /// * [String] closestPersonId: - /// Closest person ID for similarity search - /// - /// * [int] page: - /// Page number for pagination - /// - /// * [int] size: - /// Number of items per page - /// - /// * [bool] withHidden: - /// Include hidden people - Future getAllPeopleWithHttpInfo({ String? closestAssetId, String? closestPersonId, int? page, int? size, bool? withHidden, Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/people'; - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - if (closestAssetId != null) { - queryParams.addAll(_queryParams('', 'closestAssetId', closestAssetId)); - } - if (closestPersonId != null) { - queryParams.addAll(_queryParams('', 'closestPersonId', closestPersonId)); - } - if (page != null) { - queryParams.addAll(_queryParams('', 'page', page)); - } - if (size != null) { - queryParams.addAll(_queryParams('', 'size', size)); - } - if (withHidden != null) { - queryParams.addAll(_queryParams('', 'withHidden', withHidden)); - } - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Get all people - /// - /// Retrieve a list of all people. - /// - /// Parameters: - /// - /// * [String] closestAssetId: - /// Closest asset ID for similarity search - /// - /// * [String] closestPersonId: - /// Closest person ID for similarity search - /// - /// * [int] page: - /// Page number for pagination - /// - /// * [int] size: - /// Number of items per page - /// - /// * [bool] withHidden: - /// Include hidden people - Future getAllPeople({ String? closestAssetId, String? closestPersonId, int? page, int? size, bool? withHidden, Future? abortTrigger, }) async { - final response = await getAllPeopleWithHttpInfo(closestAssetId: closestAssetId, closestPersonId: closestPersonId, page: page, size: size, withHidden: withHidden, abortTrigger: abortTrigger,); - 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), 'PeopleResponseDto',) as PeopleResponseDto; - - } - return null; - } - - /// Get a person - /// - /// Retrieve a person by id. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - Future getPersonWithHttpInfo(String id, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/people/{id}' - .replaceAll('{id}', id); - - // 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, - abortTrigger: abortTrigger, - ); - } - - /// Get a person - /// - /// Retrieve a person by id. - /// - /// Parameters: - /// - /// * [String] id (required): - Future getPerson(String id, { Future? abortTrigger, }) async { - final response = await getPersonWithHttpInfo(id, abortTrigger: abortTrigger,); - 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), 'PersonResponseDto',) as PersonResponseDto; - - } - return null; - } - - /// Get person statistics - /// - /// Retrieve statistics about a specific person. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - Future getPersonStatisticsWithHttpInfo(String id, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/people/{id}/statistics' - .replaceAll('{id}', id); - - // 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, - abortTrigger: abortTrigger, - ); - } - - /// Get person statistics - /// - /// Retrieve statistics about a specific person. - /// - /// Parameters: - /// - /// * [String] id (required): - Future getPersonStatistics(String id, { Future? abortTrigger, }) async { - final response = await getPersonStatisticsWithHttpInfo(id, abortTrigger: abortTrigger,); - 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), 'PersonStatisticsResponseDto',) as PersonStatisticsResponseDto; - - } - return null; - } - - /// Get person thumbnail - /// - /// Retrieve the thumbnail file for a person. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - Future getPersonThumbnailWithHttpInfo(String id, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/people/{id}/thumbnail' - .replaceAll('{id}', id); - - // 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, - abortTrigger: abortTrigger, - ); - } - - /// Get person thumbnail - /// - /// Retrieve the thumbnail file for a person. - /// - /// Parameters: - /// - /// * [String] id (required): - Future getPersonThumbnail(String id, { Future? abortTrigger, }) async { - final response = await getPersonThumbnailWithHttpInfo(id, abortTrigger: abortTrigger,); - 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), 'MultipartFile',) as MultipartFile; - - } - return null; - } - - /// Merge people - /// - /// Merge a list of people into the person specified in the path parameter. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [MergePersonDto] mergePersonDto (required): - Future mergePersonWithHttpInfo(String id, MergePersonDto mergePersonDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/people/{id}/merge' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody = mergePersonDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'POST', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Merge people - /// - /// Merge a list of people into the person specified in the path parameter. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [MergePersonDto] mergePersonDto (required): - Future?> mergePerson(String id, MergePersonDto mergePersonDto, { Future? abortTrigger, }) async { - final response = await mergePersonWithHttpInfo(id, mergePersonDto, abortTrigger: abortTrigger,); - 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; - } - - /// Reassign faces - /// - /// Bulk reassign a list of faces to a different person. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [AssetFaceUpdateDto] assetFaceUpdateDto (required): - Future reassignFacesWithHttpInfo(String id, AssetFaceUpdateDto assetFaceUpdateDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/people/{id}/reassign' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody = assetFaceUpdateDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'PUT', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Reassign faces - /// - /// Bulk reassign a list of faces to a different person. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [AssetFaceUpdateDto] assetFaceUpdateDto (required): - Future?> reassignFaces(String id, AssetFaceUpdateDto assetFaceUpdateDto, { Future? abortTrigger, }) async { - final response = await reassignFacesWithHttpInfo(id, assetFaceUpdateDto, abortTrigger: abortTrigger,); - 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; - } - - /// Update people - /// - /// Bulk update multiple people at once. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [PeopleUpdateDto] peopleUpdateDto (required): - Future updatePeopleWithHttpInfo(PeopleUpdateDto peopleUpdateDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/people'; - - // ignore: prefer_final_locals - Object? postBody = peopleUpdateDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'PUT', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Update people - /// - /// Bulk update multiple people at once. - /// - /// Parameters: - /// - /// * [PeopleUpdateDto] peopleUpdateDto (required): - Future?> updatePeople(PeopleUpdateDto peopleUpdateDto, { Future? abortTrigger, }) async { - final response = await updatePeopleWithHttpInfo(peopleUpdateDto, abortTrigger: abortTrigger,); - 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; - } - - /// Update person - /// - /// Update an individual person. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [PersonUpdateDto] personUpdateDto (required): - Future updatePersonWithHttpInfo(String id, PersonUpdateDto personUpdateDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/people/{id}' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody = personUpdateDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'PUT', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Update person - /// - /// Update an individual person. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [PersonUpdateDto] personUpdateDto (required): - Future updatePerson(String id, PersonUpdateDto personUpdateDto, { Future? abortTrigger, }) async { - final response = await updatePersonWithHttpInfo(id, personUpdateDto, abortTrigger: abortTrigger,); - 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), 'PersonResponseDto',) as PersonResponseDto; - - } - return null; - } -} diff --git a/mobile/openapi/lib/api/plugins_api.dart b/mobile/openapi/lib/api/plugins_api.dart deleted file mode 100644 index 40892b8a67..0000000000 --- a/mobile/openapi/lib/api/plugins_api.dart +++ /dev/null @@ -1,363 +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 PluginsApi { - PluginsApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient; - - final ApiClient apiClient; - - /// Retrieve a plugin - /// - /// Retrieve information about a specific plugin by its ID. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - Future getPluginWithHttpInfo(String id, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/plugins/{id}' - .replaceAll('{id}', id); - - // 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, - abortTrigger: abortTrigger, - ); - } - - /// Retrieve a plugin - /// - /// Retrieve information about a specific plugin by its ID. - /// - /// Parameters: - /// - /// * [String] id (required): - Future getPlugin(String id, { Future? abortTrigger, }) async { - final response = await getPluginWithHttpInfo(id, abortTrigger: abortTrigger,); - 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), 'PluginResponseDto',) as PluginResponseDto; - - } - return null; - } - - /// Retrieve plugin methods - /// - /// Retrieve a list of plugin methods - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] description: - /// - /// * [bool] enabled: - /// Whether the plugin method is enabled - /// - /// * [String] id: - /// Plugin method ID - /// - /// * [String] name: - /// - /// * [String] pluginName: - /// Plugin name - /// - /// * [String] pluginVersion: - /// Plugin version - /// - /// * [String] title: - /// - /// * [WorkflowTrigger] trigger: - /// Workflow trigger - /// - /// * [WorkflowType] type: - /// Workflow types - Future searchPluginMethodsWithHttpInfo({ String? description, bool? enabled, String? id, String? name, String? pluginName, String? pluginVersion, String? title, WorkflowTrigger? trigger, WorkflowType? type, Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/plugins/methods'; - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - if (description != null) { - queryParams.addAll(_queryParams('', 'description', description)); - } - if (enabled != null) { - queryParams.addAll(_queryParams('', 'enabled', enabled)); - } - if (id != null) { - queryParams.addAll(_queryParams('', 'id', id)); - } - if (name != null) { - queryParams.addAll(_queryParams('', 'name', name)); - } - if (pluginName != null) { - queryParams.addAll(_queryParams('', 'pluginName', pluginName)); - } - if (pluginVersion != null) { - queryParams.addAll(_queryParams('', 'pluginVersion', pluginVersion)); - } - if (title != null) { - queryParams.addAll(_queryParams('', 'title', title)); - } - if (trigger != null) { - queryParams.addAll(_queryParams('', 'trigger', trigger)); - } - if (type != null) { - queryParams.addAll(_queryParams('', 'type', type)); - } - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Retrieve plugin methods - /// - /// Retrieve a list of plugin methods - /// - /// Parameters: - /// - /// * [String] description: - /// - /// * [bool] enabled: - /// Whether the plugin method is enabled - /// - /// * [String] id: - /// Plugin method ID - /// - /// * [String] name: - /// - /// * [String] pluginName: - /// Plugin name - /// - /// * [String] pluginVersion: - /// Plugin version - /// - /// * [String] title: - /// - /// * [WorkflowTrigger] trigger: - /// Workflow trigger - /// - /// * [WorkflowType] type: - /// Workflow types - Future?> searchPluginMethods({ String? description, bool? enabled, String? id, String? name, String? pluginName, String? pluginVersion, String? title, WorkflowTrigger? trigger, WorkflowType? type, Future? abortTrigger, }) async { - final response = await searchPluginMethodsWithHttpInfo(description: description, enabled: enabled, id: id, name: name, pluginName: pluginName, pluginVersion: pluginVersion, title: title, trigger: trigger, type: type, abortTrigger: abortTrigger,); - 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; - } - - /// Retrieve workflow templates - /// - /// Retrieve workflow templates provided by installed plugins - /// - /// Note: This method returns the HTTP [Response]. - Future searchPluginTemplatesWithHttpInfo({ Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/plugins/templates'; - - // 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, - abortTrigger: abortTrigger, - ); - } - - /// Retrieve workflow templates - /// - /// Retrieve workflow templates provided by installed plugins - Future?> searchPluginTemplates({ Future? abortTrigger, }) async { - final response = await searchPluginTemplatesWithHttpInfo(abortTrigger: abortTrigger,); - 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; - } - - /// List all plugins - /// - /// Retrieve a list of plugins available to the authenticated user. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] description: - /// - /// * [bool] enabled: - /// Whether the plugin is enabled - /// - /// * [String] id: - /// Plugin ID - /// - /// * [String] name: - /// - /// * [String] title: - /// - /// * [String] version: - Future searchPluginsWithHttpInfo({ String? description, bool? enabled, String? id, String? name, String? title, String? version, Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/plugins'; - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - if (description != null) { - queryParams.addAll(_queryParams('', 'description', description)); - } - if (enabled != null) { - queryParams.addAll(_queryParams('', 'enabled', enabled)); - } - if (id != null) { - queryParams.addAll(_queryParams('', 'id', id)); - } - if (name != null) { - queryParams.addAll(_queryParams('', 'name', name)); - } - if (title != null) { - queryParams.addAll(_queryParams('', 'title', title)); - } - if (version != null) { - queryParams.addAll(_queryParams('', 'version', version)); - } - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// List all plugins - /// - /// Retrieve a list of plugins available to the authenticated user. - /// - /// Parameters: - /// - /// * [String] description: - /// - /// * [bool] enabled: - /// Whether the plugin is enabled - /// - /// * [String] id: - /// Plugin ID - /// - /// * [String] name: - /// - /// * [String] title: - /// - /// * [String] version: - Future?> searchPlugins({ String? description, bool? enabled, String? id, String? name, String? title, String? version, Future? abortTrigger, }) async { - final response = await searchPluginsWithHttpInfo(description: description, enabled: enabled, id: id, name: name, title: title, version: version, abortTrigger: abortTrigger,); - 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; - } -} diff --git a/mobile/openapi/lib/api/queues_api.dart b/mobile/openapi/lib/api/queues_api.dart deleted file mode 100644 index 39386c23f9..0000000000 --- a/mobile/openapi/lib/api/queues_api.dart +++ /dev/null @@ -1,315 +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 QueuesApi { - QueuesApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient; - - final ApiClient apiClient; - - /// Empty a queue - /// - /// Removes all jobs from the specified queue. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [QueueName] name (required): - /// - /// * [QueueDeleteDto] queueDeleteDto (required): - Future emptyQueueWithHttpInfo(QueueName name, QueueDeleteDto queueDeleteDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/queues/{name}/jobs' - .replaceAll('{name}', name.toString()); - - // ignore: prefer_final_locals - Object? postBody = queueDeleteDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'DELETE', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Empty a queue - /// - /// Removes all jobs from the specified queue. - /// - /// Parameters: - /// - /// * [QueueName] name (required): - /// - /// * [QueueDeleteDto] queueDeleteDto (required): - Future emptyQueue(QueueName name, QueueDeleteDto queueDeleteDto, { Future? abortTrigger, }) async { - final response = await emptyQueueWithHttpInfo(name, queueDeleteDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - } - - /// Retrieve a queue - /// - /// Retrieves a specific queue by its name. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [QueueName] name (required): - Future getQueueWithHttpInfo(QueueName name, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/queues/{name}' - .replaceAll('{name}', name.toString()); - - // 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, - abortTrigger: abortTrigger, - ); - } - - /// Retrieve a queue - /// - /// Retrieves a specific queue by its name. - /// - /// Parameters: - /// - /// * [QueueName] name (required): - Future getQueue(QueueName name, { Future? abortTrigger, }) async { - final response = await getQueueWithHttpInfo(name, abortTrigger: abortTrigger,); - 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), 'QueueResponseDto',) as QueueResponseDto; - - } - return null; - } - - /// Retrieve queue jobs - /// - /// Retrieves a list of queue jobs from the specified queue. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [QueueName] name (required): - /// - /// * [List] status: - /// Filter jobs by status - Future getQueueJobsWithHttpInfo(QueueName name, { List? status, Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/queues/{name}/jobs' - .replaceAll('{name}', name.toString()); - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - if (status != null) { - queryParams.addAll(_queryParams('multi', 'status', status)); - } - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Retrieve queue jobs - /// - /// Retrieves a list of queue jobs from the specified queue. - /// - /// Parameters: - /// - /// * [QueueName] name (required): - /// - /// * [List] status: - /// Filter jobs by status - Future?> getQueueJobs(QueueName name, { List? status, Future? abortTrigger, }) async { - final response = await getQueueJobsWithHttpInfo(name, status: status, abortTrigger: abortTrigger,); - 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; - } - - /// List all queues - /// - /// Retrieves a list of queues. - /// - /// Note: This method returns the HTTP [Response]. - Future getQueuesWithHttpInfo({ Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/queues'; - - // 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, - abortTrigger: abortTrigger, - ); - } - - /// List all queues - /// - /// Retrieves a list of queues. - Future?> getQueues({ Future? abortTrigger, }) async { - final response = await getQueuesWithHttpInfo(abortTrigger: abortTrigger,); - 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; - } - - /// Update a queue - /// - /// Change the paused status of a specific queue. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [QueueName] name (required): - /// - /// * [QueueUpdateDto] queueUpdateDto (required): - Future updateQueueWithHttpInfo(QueueName name, QueueUpdateDto queueUpdateDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/queues/{name}' - .replaceAll('{name}', name.toString()); - - // ignore: prefer_final_locals - Object? postBody = queueUpdateDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'PUT', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Update a queue - /// - /// Change the paused status of a specific queue. - /// - /// Parameters: - /// - /// * [QueueName] name (required): - /// - /// * [QueueUpdateDto] queueUpdateDto (required): - Future updateQueue(QueueName name, QueueUpdateDto queueUpdateDto, { Future? abortTrigger, }) async { - final response = await updateQueueWithHttpInfo(name, queueUpdateDto, abortTrigger: abortTrigger,); - 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), 'QueueResponseDto',) as QueueResponseDto; - - } - return null; - } -} diff --git a/mobile/openapi/lib/api/search_api.dart b/mobile/openapi/lib/api/search_api.dart deleted file mode 100644 index 0118cabdba..0000000000 --- a/mobile/openapi/lib/api/search_api.dart +++ /dev/null @@ -1,938 +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 SearchApi { - SearchApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient; - - final ApiClient apiClient; - - /// 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({ Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/search/cities'; - - // 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, - abortTrigger: abortTrigger, - ); - } - - /// 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({ Future? abortTrigger, }) async { - final response = await getAssetsByCityWithHttpInfo(abortTrigger: abortTrigger,); - 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; - } - - /// Retrieve explore data - /// - /// Retrieve data for the explore section, such as popular people and places. - /// - /// Note: This method returns the HTTP [Response]. - Future getExploreDataWithHttpInfo({ Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/search/explore'; - - // 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, - abortTrigger: abortTrigger, - ); - } - - /// Retrieve explore data - /// - /// Retrieve data for the explore section, such as popular people and places. - Future?> getExploreData({ Future? abortTrigger, }) async { - final response = await getExploreDataWithHttpInfo(abortTrigger: abortTrigger,); - 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; - } - - /// 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]. - /// - /// Parameters: - /// - /// * [SearchSuggestionType] type (required): - /// - /// * [String] country: - /// Filter by country - /// - /// * [bool] includeNull: - /// Include null values in suggestions - /// - /// * [String] lensModel: - /// Filter by lens model - /// - /// * [String] make: - /// Filter by camera make - /// - /// * [String] model: - /// Filter by camera model - /// - /// * [String] state: - /// Filter by state/province - Future getSearchSuggestionsWithHttpInfo(SearchSuggestionType type, { String? country, bool? includeNull, String? lensModel, String? make, String? model, String? state, Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/search/suggestions'; - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - if (country != null) { - queryParams.addAll(_queryParams('', 'country', country)); - } - if (includeNull != null) { - queryParams.addAll(_queryParams('', 'includeNull', includeNull)); - } - if (lensModel != null) { - queryParams.addAll(_queryParams('', 'lensModel', lensModel)); - } - if (make != null) { - queryParams.addAll(_queryParams('', 'make', make)); - } - if (model != null) { - queryParams.addAll(_queryParams('', 'model', model)); - } - if (state != null) { - queryParams.addAll(_queryParams('', 'state', state)); - } - queryParams.addAll(_queryParams('', 'type', type)); - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Retrieve search suggestions - /// - /// Retrieve search suggestions based on partial input. This endpoint is used for typeahead search features. - /// - /// Parameters: - /// - /// * [SearchSuggestionType] type (required): - /// - /// * [String] country: - /// Filter by country - /// - /// * [bool] includeNull: - /// Include null values in suggestions - /// - /// * [String] lensModel: - /// Filter by lens model - /// - /// * [String] make: - /// Filter by camera make - /// - /// * [String] model: - /// Filter by camera model - /// - /// * [String] state: - /// Filter by state/province - Future?> getSearchSuggestions(SearchSuggestionType type, { String? country, bool? includeNull, String? lensModel, String? make, String? model, String? state, Future? abortTrigger, }) async { - final response = await getSearchSuggestionsWithHttpInfo(type, country: country, includeNull: includeNull, lensModel: lensModel, make: make, model: model, state: state, abortTrigger: abortTrigger,); - 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; - } - - /// 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]. - /// - /// Parameters: - /// - /// * [StatisticsSearchDto] statisticsSearchDto (required): - Future searchAssetStatisticsWithHttpInfo(StatisticsSearchDto statisticsSearchDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/search/statistics'; - - // ignore: prefer_final_locals - Object? postBody = statisticsSearchDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'POST', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Search asset statistics - /// - /// Retrieve statistical data about assets based on search criteria, such as the total matching count. - /// - /// Parameters: - /// - /// * [StatisticsSearchDto] statisticsSearchDto (required): - Future searchAssetStatistics(StatisticsSearchDto statisticsSearchDto, { Future? abortTrigger, }) async { - final response = await searchAssetStatisticsWithHttpInfo(statisticsSearchDto, abortTrigger: abortTrigger,); - 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), 'SearchStatisticsResponseDto',) as SearchStatisticsResponseDto; - - } - return null; - } - - /// Search assets by metadata - /// - /// Search for assets based on various metadata criteria. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [MetadataSearchDto] metadataSearchDto (required): - Future searchAssetsWithHttpInfo(MetadataSearchDto metadataSearchDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/search/metadata'; - - // ignore: prefer_final_locals - Object? postBody = metadataSearchDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'POST', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Search assets by metadata - /// - /// Search for assets based on various metadata criteria. - /// - /// Parameters: - /// - /// * [MetadataSearchDto] metadataSearchDto (required): - Future searchAssets(MetadataSearchDto metadataSearchDto, { Future? abortTrigger, }) async { - final response = await searchAssetsWithHttpInfo(metadataSearchDto, abortTrigger: abortTrigger,); - 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), 'SearchResponseDto',) as SearchResponseDto; - - } - return null; - } - - /// Search large assets - /// - /// Search for assets that are considered large based on specified criteria. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [List] albumIds: - /// Filter by album IDs - /// - /// * [String] city: - /// Filter by city name - /// - /// * [String] country: - /// Filter by country name - /// - /// * [DateTime] createdAfter: - /// Filter by creation date (after) - /// - /// * [DateTime] createdBefore: - /// Filter by creation date (before) - /// - /// * [bool] isEncoded: - /// Filter by encoded status - /// - /// * [bool] isFavorite: - /// Filter by favorite status - /// - /// * [bool] isMotion: - /// Filter by motion photo status - /// - /// * [bool] isNotInAlbum: - /// Filter assets not in any album - /// - /// * [bool] isOffline: - /// Filter by offline status - /// - /// * [String] lensModel: - /// Filter by lens model - /// - /// * [String] libraryId: - /// Library ID to filter by - /// - /// * [String] make: - /// Filter by camera make - /// - /// * [int] minFileSize: - /// Minimum file size in bytes - /// - /// * [String] model: - /// Filter by camera model - /// - /// * [String] ocr: - /// Filter by OCR text content - /// - /// * [List] personIds: - /// Filter by person IDs - /// - /// * [int] rating: - /// Filter by rating [1-5], or null for unrated - /// - /// * [int] size: - /// Number of results to return - /// - /// * [String] state: - /// Filter by state/province name - /// - /// * [List] tagIds: - /// Filter by tag IDs - /// - /// * [DateTime] takenAfter: - /// Filter by taken date (after) - /// - /// * [DateTime] takenBefore: - /// Filter by taken date (before) - /// - /// * [DateTime] trashedAfter: - /// Filter by trash date (after) - /// - /// * [DateTime] trashedBefore: - /// Filter by trash date (before) - /// - /// * [AssetTypeEnum] type: - /// - /// * [DateTime] updatedAfter: - /// Filter by update date (after) - /// - /// * [DateTime] updatedBefore: - /// Filter by update date (before) - /// - /// * [AssetVisibility] visibility: - /// - /// * [bool] withDeleted: - /// Include deleted assets - /// - /// * [bool] withExif: - /// Include EXIF data in response - Future searchLargeAssetsWithHttpInfo({ List? albumIds, String? city, String? country, DateTime? createdAfter, DateTime? createdBefore, bool? isEncoded, bool? isFavorite, bool? isMotion, bool? isNotInAlbum, bool? isOffline, String? lensModel, String? libraryId, String? make, int? minFileSize, String? model, String? ocr, List? personIds, int? rating, int? size, String? state, List? tagIds, DateTime? takenAfter, DateTime? takenBefore, DateTime? trashedAfter, DateTime? trashedBefore, AssetTypeEnum? type, DateTime? updatedAfter, DateTime? updatedBefore, AssetVisibility? visibility, bool? withDeleted, bool? withExif, Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/search/large-assets'; - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - if (albumIds != null) { - queryParams.addAll(_queryParams('multi', 'albumIds', albumIds)); - } - if (city != null) { - queryParams.addAll(_queryParams('', 'city', city)); - } - if (country != null) { - queryParams.addAll(_queryParams('', 'country', country)); - } - if (createdAfter != null) { - queryParams.addAll(_queryParams('', 'createdAfter', createdAfter)); - } - if (createdBefore != null) { - queryParams.addAll(_queryParams('', 'createdBefore', createdBefore)); - } - if (isEncoded != null) { - queryParams.addAll(_queryParams('', 'isEncoded', isEncoded)); - } - if (isFavorite != null) { - queryParams.addAll(_queryParams('', 'isFavorite', isFavorite)); - } - if (isMotion != null) { - queryParams.addAll(_queryParams('', 'isMotion', isMotion)); - } - if (isNotInAlbum != null) { - queryParams.addAll(_queryParams('', 'isNotInAlbum', isNotInAlbum)); - } - if (isOffline != null) { - queryParams.addAll(_queryParams('', 'isOffline', isOffline)); - } - if (lensModel != null) { - queryParams.addAll(_queryParams('', 'lensModel', lensModel)); - } - if (libraryId != null) { - queryParams.addAll(_queryParams('', 'libraryId', libraryId)); - } - if (make != null) { - queryParams.addAll(_queryParams('', 'make', make)); - } - if (minFileSize != null) { - queryParams.addAll(_queryParams('', 'minFileSize', minFileSize)); - } - if (model != null) { - queryParams.addAll(_queryParams('', 'model', model)); - } - if (ocr != null) { - queryParams.addAll(_queryParams('', 'ocr', ocr)); - } - if (personIds != null) { - queryParams.addAll(_queryParams('multi', 'personIds', personIds)); - } - if (rating != null) { - queryParams.addAll(_queryParams('', 'rating', rating)); - } - if (size != null) { - queryParams.addAll(_queryParams('', 'size', size)); - } - if (state != null) { - queryParams.addAll(_queryParams('', 'state', state)); - } - if (tagIds != null) { - queryParams.addAll(_queryParams('multi', 'tagIds', tagIds)); - } - if (takenAfter != null) { - queryParams.addAll(_queryParams('', 'takenAfter', takenAfter)); - } - if (takenBefore != null) { - queryParams.addAll(_queryParams('', 'takenBefore', takenBefore)); - } - if (trashedAfter != null) { - queryParams.addAll(_queryParams('', 'trashedAfter', trashedAfter)); - } - if (trashedBefore != null) { - queryParams.addAll(_queryParams('', 'trashedBefore', trashedBefore)); - } - if (type != null) { - queryParams.addAll(_queryParams('', 'type', type)); - } - if (updatedAfter != null) { - queryParams.addAll(_queryParams('', 'updatedAfter', updatedAfter)); - } - if (updatedBefore != null) { - queryParams.addAll(_queryParams('', 'updatedBefore', updatedBefore)); - } - if (visibility != null) { - queryParams.addAll(_queryParams('', 'visibility', visibility)); - } - if (withDeleted != null) { - queryParams.addAll(_queryParams('', 'withDeleted', withDeleted)); - } - if (withExif != null) { - queryParams.addAll(_queryParams('', 'withExif', withExif)); - } - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'POST', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Search large assets - /// - /// Search for assets that are considered large based on specified criteria. - /// - /// Parameters: - /// - /// * [List] albumIds: - /// Filter by album IDs - /// - /// * [String] city: - /// Filter by city name - /// - /// * [String] country: - /// Filter by country name - /// - /// * [DateTime] createdAfter: - /// Filter by creation date (after) - /// - /// * [DateTime] createdBefore: - /// Filter by creation date (before) - /// - /// * [bool] isEncoded: - /// Filter by encoded status - /// - /// * [bool] isFavorite: - /// Filter by favorite status - /// - /// * [bool] isMotion: - /// Filter by motion photo status - /// - /// * [bool] isNotInAlbum: - /// Filter assets not in any album - /// - /// * [bool] isOffline: - /// Filter by offline status - /// - /// * [String] lensModel: - /// Filter by lens model - /// - /// * [String] libraryId: - /// Library ID to filter by - /// - /// * [String] make: - /// Filter by camera make - /// - /// * [int] minFileSize: - /// Minimum file size in bytes - /// - /// * [String] model: - /// Filter by camera model - /// - /// * [String] ocr: - /// Filter by OCR text content - /// - /// * [List] personIds: - /// Filter by person IDs - /// - /// * [int] rating: - /// Filter by rating [1-5], or null for unrated - /// - /// * [int] size: - /// Number of results to return - /// - /// * [String] state: - /// Filter by state/province name - /// - /// * [List] tagIds: - /// Filter by tag IDs - /// - /// * [DateTime] takenAfter: - /// Filter by taken date (after) - /// - /// * [DateTime] takenBefore: - /// Filter by taken date (before) - /// - /// * [DateTime] trashedAfter: - /// Filter by trash date (after) - /// - /// * [DateTime] trashedBefore: - /// Filter by trash date (before) - /// - /// * [AssetTypeEnum] type: - /// - /// * [DateTime] updatedAfter: - /// Filter by update date (after) - /// - /// * [DateTime] updatedBefore: - /// Filter by update date (before) - /// - /// * [AssetVisibility] visibility: - /// - /// * [bool] withDeleted: - /// Include deleted assets - /// - /// * [bool] withExif: - /// Include EXIF data in response - Future?> searchLargeAssets({ List? albumIds, String? city, String? country, DateTime? createdAfter, DateTime? createdBefore, bool? isEncoded, bool? isFavorite, bool? isMotion, bool? isNotInAlbum, bool? isOffline, String? lensModel, String? libraryId, String? make, int? minFileSize, String? model, String? ocr, List? personIds, int? rating, int? size, String? state, List? tagIds, DateTime? takenAfter, DateTime? takenBefore, DateTime? trashedAfter, DateTime? trashedBefore, AssetTypeEnum? type, DateTime? updatedAfter, DateTime? updatedBefore, AssetVisibility? visibility, bool? withDeleted, bool? withExif, Future? abortTrigger, }) async { - final response = await searchLargeAssetsWithHttpInfo(albumIds: albumIds, city: city, country: country, createdAfter: createdAfter, createdBefore: createdBefore, isEncoded: isEncoded, isFavorite: isFavorite, isMotion: isMotion, isNotInAlbum: isNotInAlbum, isOffline: isOffline, lensModel: lensModel, libraryId: libraryId, make: make, minFileSize: minFileSize, model: model, ocr: ocr, personIds: personIds, rating: rating, size: size, state: state, tagIds: tagIds, takenAfter: takenAfter, takenBefore: takenBefore, trashedAfter: trashedAfter, trashedBefore: trashedBefore, type: type, updatedAfter: updatedAfter, updatedBefore: updatedBefore, visibility: visibility, withDeleted: withDeleted, withExif: withExif, abortTrigger: abortTrigger,); - 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; - } - - /// Search people - /// - /// Search for people by name. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] name (required): - /// Person name to search for - /// - /// * [bool] withHidden: - /// Include hidden people - Future searchPersonWithHttpInfo(String name, { bool? withHidden, Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/search/person'; - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - queryParams.addAll(_queryParams('', 'name', name)); - if (withHidden != null) { - queryParams.addAll(_queryParams('', 'withHidden', withHidden)); - } - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Search people - /// - /// Search for people by name. - /// - /// Parameters: - /// - /// * [String] name (required): - /// Person name to search for - /// - /// * [bool] withHidden: - /// Include hidden people - Future?> searchPerson(String name, { bool? withHidden, Future? abortTrigger, }) async { - final response = await searchPersonWithHttpInfo(name, withHidden: withHidden, abortTrigger: abortTrigger,); - 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; - } - - /// Search places - /// - /// Search for places by name. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] name (required): - /// Place name to search for - Future searchPlacesWithHttpInfo(String name, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/search/places'; - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - queryParams.addAll(_queryParams('', 'name', name)); - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Search places - /// - /// Search for places by name. - /// - /// Parameters: - /// - /// * [String] name (required): - /// Place name to search for - Future?> searchPlaces(String name, { Future? abortTrigger, }) async { - final response = await searchPlacesWithHttpInfo(name, abortTrigger: abortTrigger,); - 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; - } - - /// Search random assets - /// - /// Retrieve a random selection of assets based on the provided criteria. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [RandomSearchDto] randomSearchDto (required): - Future searchRandomWithHttpInfo(RandomSearchDto randomSearchDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/search/random'; - - // ignore: prefer_final_locals - Object? postBody = randomSearchDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'POST', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Search random assets - /// - /// Retrieve a random selection of assets based on the provided criteria. - /// - /// Parameters: - /// - /// * [RandomSearchDto] randomSearchDto (required): - Future?> searchRandom(RandomSearchDto randomSearchDto, { Future? abortTrigger, }) async { - final response = await searchRandomWithHttpInfo(randomSearchDto, abortTrigger: abortTrigger,); - 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; - } - - /// Smart asset search - /// - /// Perform a smart search for assets by using machine learning vectors to determine relevance. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [SmartSearchDto] smartSearchDto (required): - Future searchSmartWithHttpInfo(SmartSearchDto smartSearchDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/search/smart'; - - // ignore: prefer_final_locals - Object? postBody = smartSearchDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'POST', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Smart asset search - /// - /// Perform a smart search for assets by using machine learning vectors to determine relevance. - /// - /// Parameters: - /// - /// * [SmartSearchDto] smartSearchDto (required): - Future searchSmart(SmartSearchDto smartSearchDto, { Future? abortTrigger, }) async { - final response = await searchSmartWithHttpInfo(smartSearchDto, abortTrigger: abortTrigger,); - 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), 'SearchResponseDto',) as SearchResponseDto; - - } - return null; - } -} diff --git a/mobile/openapi/lib/api/server_api.dart b/mobile/openapi/lib/api/server_api.dart deleted file mode 100644 index 1a46a86188..0000000000 --- a/mobile/openapi/lib/api/server_api.dart +++ /dev/null @@ -1,707 +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 ServerApi { - ServerApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient; - - final ApiClient apiClient; - - /// Delete server product key - /// - /// Delete the currently set server product key. - /// - /// Note: This method returns the HTTP [Response]. - Future deleteServerLicenseWithHttpInfo({ Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/server/license'; - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'DELETE', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Delete server product key - /// - /// Delete the currently set server product key. - Future deleteServerLicense({ Future? abortTrigger, }) async { - final response = await deleteServerLicenseWithHttpInfo(abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - } - - /// Get server information - /// - /// Retrieve a list of information about the server. - /// - /// Note: This method returns the HTTP [Response]. - Future getAboutInfoWithHttpInfo({ Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/server/about'; - - // 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, - abortTrigger: abortTrigger, - ); - } - - /// Get server information - /// - /// Retrieve a list of information about the server. - Future getAboutInfo({ Future? abortTrigger, }) async { - final response = await getAboutInfoWithHttpInfo(abortTrigger: abortTrigger,); - 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), 'ServerAboutResponseDto',) as ServerAboutResponseDto; - - } - return null; - } - - /// Get APK links - /// - /// Retrieve links to the APKs for the current server version. - /// - /// Note: This method returns the HTTP [Response]. - Future getApkLinksWithHttpInfo({ Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/server/apk-links'; - - // 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, - abortTrigger: abortTrigger, - ); - } - - /// Get APK links - /// - /// Retrieve links to the APKs for the current server version. - Future getApkLinks({ Future? abortTrigger, }) async { - final response = await getApkLinksWithHttpInfo(abortTrigger: abortTrigger,); - 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), 'ServerApkLinksDto',) as ServerApkLinksDto; - - } - return null; - } - - /// Get config - /// - /// Retrieve the current server configuration. - /// - /// Note: This method returns the HTTP [Response]. - Future getServerConfigWithHttpInfo({ Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/server/config'; - - // 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, - abortTrigger: abortTrigger, - ); - } - - /// Get config - /// - /// Retrieve the current server configuration. - Future getServerConfig({ Future? abortTrigger, }) async { - final response = await getServerConfigWithHttpInfo(abortTrigger: abortTrigger,); - 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), 'ServerConfigDto',) as ServerConfigDto; - - } - return null; - } - - /// Get features - /// - /// Retrieve available features supported by this server. - /// - /// Note: This method returns the HTTP [Response]. - Future getServerFeaturesWithHttpInfo({ Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/server/features'; - - // 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, - abortTrigger: abortTrigger, - ); - } - - /// Get features - /// - /// Retrieve available features supported by this server. - Future getServerFeatures({ Future? abortTrigger, }) async { - final response = await getServerFeaturesWithHttpInfo(abortTrigger: abortTrigger,); - 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), 'ServerFeaturesDto',) as ServerFeaturesDto; - - } - return null; - } - - /// Get product key - /// - /// Retrieve information about whether the server currently has a product key registered. - /// - /// Note: This method returns the HTTP [Response]. - Future getServerLicenseWithHttpInfo({ Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/server/license'; - - // 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, - abortTrigger: abortTrigger, - ); - } - - /// Get product key - /// - /// Retrieve information about whether the server currently has a product key registered. - Future getServerLicense({ Future? abortTrigger, }) async { - final response = await getServerLicenseWithHttpInfo(abortTrigger: abortTrigger,); - 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), 'UserLicense',) as UserLicense; - - } - return null; - } - - /// Get statistics - /// - /// Retrieve statistics about the entire Immich instance such as asset counts. - /// - /// Note: This method returns the HTTP [Response]. - Future getServerStatisticsWithHttpInfo({ Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/server/statistics'; - - // 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, - abortTrigger: abortTrigger, - ); - } - - /// Get statistics - /// - /// Retrieve statistics about the entire Immich instance such as asset counts. - Future getServerStatistics({ Future? abortTrigger, }) async { - final response = await getServerStatisticsWithHttpInfo(abortTrigger: abortTrigger,); - 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), 'ServerStatsResponseDto',) as ServerStatsResponseDto; - - } - return null; - } - - /// Get server version - /// - /// Retrieve the current server version in semantic versioning (semver) format. - /// - /// Note: This method returns the HTTP [Response]. - Future getServerVersionWithHttpInfo({ Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/server/version'; - - // 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, - abortTrigger: abortTrigger, - ); - } - - /// Get server version - /// - /// Retrieve the current server version in semantic versioning (semver) format. - Future getServerVersion({ Future? abortTrigger, }) async { - final response = await getServerVersionWithHttpInfo(abortTrigger: abortTrigger,); - 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), 'ServerVersionResponseDto',) as ServerVersionResponseDto; - - } - return null; - } - - /// Get storage - /// - /// Retrieve the current storage utilization information of the server. - /// - /// Note: This method returns the HTTP [Response]. - Future getStorageWithHttpInfo({ Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/server/storage'; - - // 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, - abortTrigger: abortTrigger, - ); - } - - /// Get storage - /// - /// Retrieve the current storage utilization information of the server. - Future getStorage({ Future? abortTrigger, }) async { - final response = await getStorageWithHttpInfo(abortTrigger: abortTrigger,); - 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), 'ServerStorageResponseDto',) as ServerStorageResponseDto; - - } - return null; - } - - /// Get supported media types - /// - /// Retrieve all media types supported by the server. - /// - /// Note: This method returns the HTTP [Response]. - Future getSupportedMediaTypesWithHttpInfo({ Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/server/media-types'; - - // 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, - abortTrigger: abortTrigger, - ); - } - - /// Get supported media types - /// - /// Retrieve all media types supported by the server. - Future getSupportedMediaTypes({ Future? abortTrigger, }) async { - final response = await getSupportedMediaTypesWithHttpInfo(abortTrigger: abortTrigger,); - 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), 'ServerMediaTypesResponseDto',) as ServerMediaTypesResponseDto; - - } - return null; - } - - /// Get version check status - /// - /// Retrieve information about the last time the version check ran. - /// - /// Note: This method returns the HTTP [Response]. - Future getVersionCheckWithHttpInfo({ Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/server/version-check'; - - // 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, - abortTrigger: abortTrigger, - ); - } - - /// Get version check status - /// - /// Retrieve information about the last time the version check ran. - Future getVersionCheck({ Future? abortTrigger, }) async { - final response = await getVersionCheckWithHttpInfo(abortTrigger: abortTrigger,); - 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), 'VersionCheckStateResponseDto',) as VersionCheckStateResponseDto; - - } - return null; - } - - /// Get version history - /// - /// Retrieve a list of past versions the server has been on. - /// - /// Note: This method returns the HTTP [Response]. - Future getVersionHistoryWithHttpInfo({ Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/server/version-history'; - - // 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, - abortTrigger: abortTrigger, - ); - } - - /// Get version history - /// - /// Retrieve a list of past versions the server has been on. - Future?> getVersionHistory({ Future? abortTrigger, }) async { - final response = await getVersionHistoryWithHttpInfo(abortTrigger: abortTrigger,); - 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; - } - - /// Ping - /// - /// Pong - /// - /// Note: This method returns the HTTP [Response]. - Future pingServerWithHttpInfo({ Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/server/ping'; - - // 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, - abortTrigger: abortTrigger, - ); - } - - /// Ping - /// - /// Pong - Future pingServer({ Future? abortTrigger, }) async { - final response = await pingServerWithHttpInfo(abortTrigger: abortTrigger,); - 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), 'ServerPingResponse',) as ServerPingResponse; - - } - return null; - } - - /// Set server product key - /// - /// Validate and set the server product key if successful. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [LicenseKeyDto] licenseKeyDto (required): - Future setServerLicenseWithHttpInfo(LicenseKeyDto licenseKeyDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/server/license'; - - // ignore: prefer_final_locals - Object? postBody = licenseKeyDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'PUT', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Set server product key - /// - /// Validate and set the server product key if successful. - /// - /// Parameters: - /// - /// * [LicenseKeyDto] licenseKeyDto (required): - Future setServerLicense(LicenseKeyDto licenseKeyDto, { Future? abortTrigger, }) async { - final response = await setServerLicenseWithHttpInfo(licenseKeyDto, abortTrigger: abortTrigger,); - 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), 'UserLicense',) as UserLicense; - - } - return null; - } -} diff --git a/mobile/openapi/lib/api/sessions_api.dart b/mobile/openapi/lib/api/sessions_api.dart deleted file mode 100644 index fdd6c09266..0000000000 --- a/mobile/openapi/lib/api/sessions_api.dart +++ /dev/null @@ -1,330 +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 SessionsApi { - SessionsApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient; - - final ApiClient apiClient; - - /// 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]. - /// - /// Parameters: - /// - /// * [SessionCreateDto] sessionCreateDto (required): - Future createSessionWithHttpInfo(SessionCreateDto sessionCreateDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/sessions'; - - // ignore: prefer_final_locals - Object? postBody = sessionCreateDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'POST', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Create a session - /// - /// Create a session as a child to the current session. This endpoint is used for casting. - /// - /// Parameters: - /// - /// * [SessionCreateDto] sessionCreateDto (required): - Future createSession(SessionCreateDto sessionCreateDto, { Future? abortTrigger, }) async { - final response = await createSessionWithHttpInfo(sessionCreateDto, abortTrigger: abortTrigger,); - 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), 'SessionCreateResponseDto',) as SessionCreateResponseDto; - - } - return null; - } - - /// 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({ Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/sessions'; - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'DELETE', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Delete all sessions - /// - /// Delete all sessions for the user. This will not delete the current session. - Future deleteAllSessions({ Future? abortTrigger, }) async { - final response = await deleteAllSessionsWithHttpInfo(abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - } - - /// Delete a session - /// - /// Delete a specific session by id. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - Future deleteSessionWithHttpInfo(String id, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/sessions/{id}' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'DELETE', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Delete a session - /// - /// Delete a specific session by id. - /// - /// Parameters: - /// - /// * [String] id (required): - Future deleteSession(String id, { Future? abortTrigger, }) async { - final response = await deleteSessionWithHttpInfo(id, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - } - - /// Retrieve sessions - /// - /// Retrieve a list of sessions for the user. - /// - /// Note: This method returns the HTTP [Response]. - Future getSessionsWithHttpInfo({ Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/sessions'; - - // 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, - abortTrigger: abortTrigger, - ); - } - - /// Retrieve sessions - /// - /// Retrieve a list of sessions for the user. - Future?> getSessions({ Future? abortTrigger, }) async { - final response = await getSessionsWithHttpInfo(abortTrigger: abortTrigger,); - 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; - } - - /// Lock a session - /// - /// Lock a specific session by id. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - Future lockSessionWithHttpInfo(String id, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/sessions/{id}/lock' - .replaceAll('{id}', id); - - // 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, - abortTrigger: abortTrigger, - ); - } - - /// Lock a session - /// - /// Lock a specific session by id. - /// - /// Parameters: - /// - /// * [String] id (required): - Future lockSession(String id, { Future? abortTrigger, }) async { - final response = await lockSessionWithHttpInfo(id, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - } - - /// Update a session - /// - /// Update a specific session identified by id. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [SessionUpdateDto] sessionUpdateDto (required): - Future updateSessionWithHttpInfo(String id, SessionUpdateDto sessionUpdateDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/sessions/{id}' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody = sessionUpdateDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'PUT', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Update a session - /// - /// Update a specific session identified by id. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [SessionUpdateDto] sessionUpdateDto (required): - Future updateSession(String id, SessionUpdateDto sessionUpdateDto, { Future? abortTrigger, }) async { - final response = await updateSessionWithHttpInfo(id, sessionUpdateDto, abortTrigger: abortTrigger,); - 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), 'SessionResponseDto',) as SessionResponseDto; - - } - return null; - } -} diff --git a/mobile/openapi/lib/api/shared_links_api.dart b/mobile/openapi/lib/api/shared_links_api.dart deleted file mode 100644 index 5bd548d7d2..0000000000 --- a/mobile/openapi/lib/api/shared_links_api.dart +++ /dev/null @@ -1,590 +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 SharedLinksApi { - SharedLinksApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient; - - final ApiClient apiClient; - - /// 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): - /// - /// * [AssetIdsDto] assetIdsDto (required): - Future addSharedLinkAssetsWithHttpInfo(String id, AssetIdsDto assetIdsDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/shared-links/{id}/assets' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody = assetIdsDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'PUT', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// 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): - /// - /// * [AssetIdsDto] assetIdsDto (required): - Future?> addSharedLinkAssets(String id, AssetIdsDto assetIdsDto, { Future? abortTrigger, }) async { - final response = await addSharedLinkAssetsWithHttpInfo(id, assetIdsDto, abortTrigger: abortTrigger,); - 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; - } - - /// Create a shared link - /// - /// Create a new shared link. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [SharedLinkCreateDto] sharedLinkCreateDto (required): - Future createSharedLinkWithHttpInfo(SharedLinkCreateDto sharedLinkCreateDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/shared-links'; - - // ignore: prefer_final_locals - Object? postBody = sharedLinkCreateDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'POST', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Create a shared link - /// - /// Create a new shared link. - /// - /// Parameters: - /// - /// * [SharedLinkCreateDto] sharedLinkCreateDto (required): - Future createSharedLink(SharedLinkCreateDto sharedLinkCreateDto, { Future? abortTrigger, }) async { - final response = await createSharedLinkWithHttpInfo(sharedLinkCreateDto, abortTrigger: abortTrigger,); - 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), 'SharedLinkResponseDto',) as SharedLinkResponseDto; - - } - return null; - } - - /// Retrieve all shared links - /// - /// Retrieve a list of all shared links. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] albumId: - /// Filter by album ID - /// - /// * [String] id: - /// Filter by shared link ID - Future getAllSharedLinksWithHttpInfo({ String? albumId, String? id, Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/shared-links'; - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - if (albumId != null) { - queryParams.addAll(_queryParams('', 'albumId', albumId)); - } - if (id != null) { - queryParams.addAll(_queryParams('', 'id', id)); - } - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Retrieve all shared links - /// - /// Retrieve a list of all shared links. - /// - /// Parameters: - /// - /// * [String] albumId: - /// Filter by album ID - /// - /// * [String] id: - /// Filter by shared link ID - Future?> getAllSharedLinks({ String? albumId, String? id, Future? abortTrigger, }) async { - final response = await getAllSharedLinksWithHttpInfo(albumId: albumId, id: id, abortTrigger: abortTrigger,); - 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; - } - - /// Retrieve current shared link - /// - /// Retrieve the current shared link associated with authentication method. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] key: - /// - /// * [String] slug: - Future getMySharedLinkWithHttpInfo({ String? key, String? slug, Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/shared-links/me'; - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - if (key != null) { - queryParams.addAll(_queryParams('', 'key', key)); - } - if (slug != null) { - queryParams.addAll(_queryParams('', 'slug', slug)); - } - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Retrieve current shared link - /// - /// Retrieve the current shared link associated with authentication method. - /// - /// Parameters: - /// - /// * [String] key: - /// - /// * [String] slug: - Future getMySharedLink({ String? key, String? slug, Future? abortTrigger, }) async { - final response = await getMySharedLinkWithHttpInfo(key: key, slug: slug, abortTrigger: abortTrigger,); - 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), 'SharedLinkResponseDto',) as SharedLinkResponseDto; - - } - return null; - } - - /// Retrieve a shared link - /// - /// Retrieve a specific shared link by its ID. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - Future getSharedLinkByIdWithHttpInfo(String id, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/shared-links/{id}' - .replaceAll('{id}', id); - - // 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, - abortTrigger: abortTrigger, - ); - } - - /// Retrieve a shared link - /// - /// Retrieve a specific shared link by its ID. - /// - /// Parameters: - /// - /// * [String] id (required): - Future getSharedLinkById(String id, { Future? abortTrigger, }) async { - final response = await getSharedLinkByIdWithHttpInfo(id, abortTrigger: abortTrigger,); - 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), 'SharedLinkResponseDto',) as SharedLinkResponseDto; - - } - return null; - } - - /// Delete a shared link - /// - /// Delete a specific shared link by its ID. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - Future removeSharedLinkWithHttpInfo(String id, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/shared-links/{id}' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'DELETE', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Delete a shared link - /// - /// Delete a specific shared link by its ID. - /// - /// Parameters: - /// - /// * [String] id (required): - Future removeSharedLink(String id, { Future? abortTrigger, }) async { - final response = await removeSharedLinkWithHttpInfo(id, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(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): - /// - /// * [AssetIdsDto] assetIdsDto (required): - Future removeSharedLinkAssetsWithHttpInfo(String id, AssetIdsDto assetIdsDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/shared-links/{id}/assets' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody = assetIdsDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'DELETE', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// 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): - /// - /// * [AssetIdsDto] assetIdsDto (required): - Future?> removeSharedLinkAssets(String id, AssetIdsDto assetIdsDto, { Future? abortTrigger, }) async { - final response = await removeSharedLinkAssetsWithHttpInfo(id, assetIdsDto, abortTrigger: abortTrigger,); - 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; - } - - /// Shared link login - /// - /// Login to a password protected shared link - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [SharedLinkLoginDto] sharedLinkLoginDto (required): - /// - /// * [String] key: - /// - /// * [String] slug: - Future sharedLinkLoginWithHttpInfo(SharedLinkLoginDto sharedLinkLoginDto, { String? key, String? slug, Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/shared-links/login'; - - // ignore: prefer_final_locals - Object? postBody = sharedLinkLoginDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - if (key != null) { - queryParams.addAll(_queryParams('', 'key', key)); - } - if (slug != null) { - queryParams.addAll(_queryParams('', 'slug', slug)); - } - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'POST', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Shared link login - /// - /// Login to a password protected shared link - /// - /// Parameters: - /// - /// * [SharedLinkLoginDto] sharedLinkLoginDto (required): - /// - /// * [String] key: - /// - /// * [String] slug: - Future sharedLinkLogin(SharedLinkLoginDto sharedLinkLoginDto, { String? key, String? slug, Future? abortTrigger, }) async { - final response = await sharedLinkLoginWithHttpInfo(sharedLinkLoginDto, key: key, slug: slug, abortTrigger: abortTrigger,); - 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), 'SharedLinkResponseDto',) as SharedLinkResponseDto; - - } - return null; - } - - /// Update a shared link - /// - /// Update an existing shared link by its ID. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [SharedLinkEditDto] sharedLinkEditDto (required): - Future updateSharedLinkWithHttpInfo(String id, SharedLinkEditDto sharedLinkEditDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/shared-links/{id}' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody = sharedLinkEditDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'PATCH', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Update a shared link - /// - /// Update an existing shared link by its ID. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [SharedLinkEditDto] sharedLinkEditDto (required): - Future updateSharedLink(String id, SharedLinkEditDto sharedLinkEditDto, { Future? abortTrigger, }) async { - final response = await updateSharedLinkWithHttpInfo(id, sharedLinkEditDto, abortTrigger: abortTrigger,); - 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), 'SharedLinkResponseDto',) as SharedLinkResponseDto; - - } - return null; - } -} diff --git a/mobile/openapi/lib/api/stacks_api.dart b/mobile/openapi/lib/api/stacks_api.dart deleted file mode 100644 index a99ebe0600..0000000000 --- a/mobile/openapi/lib/api/stacks_api.dart +++ /dev/null @@ -1,415 +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 StacksApi { - StacksApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient; - - final ApiClient apiClient; - - /// 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]. - /// - /// Parameters: - /// - /// * [StackCreateDto] stackCreateDto (required): - Future createStackWithHttpInfo(StackCreateDto stackCreateDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/stacks'; - - // ignore: prefer_final_locals - Object? postBody = stackCreateDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'POST', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// 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: - /// - /// * [StackCreateDto] stackCreateDto (required): - Future createStack(StackCreateDto stackCreateDto, { Future? abortTrigger, }) async { - final response = await createStackWithHttpInfo(stackCreateDto, abortTrigger: abortTrigger,); - 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), 'StackResponseDto',) as StackResponseDto; - - } - return null; - } - - /// Delete a stack - /// - /// Delete a specific stack by its ID. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - Future deleteStackWithHttpInfo(String id, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/stacks/{id}' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'DELETE', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Delete a stack - /// - /// Delete a specific stack by its ID. - /// - /// Parameters: - /// - /// * [String] id (required): - Future deleteStack(String id, { Future? abortTrigger, }) async { - final response = await deleteStackWithHttpInfo(id, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - } - - /// Delete stacks - /// - /// Delete multiple stacks by providing a list of stack IDs. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [BulkIdsDto] bulkIdsDto (required): - Future deleteStacksWithHttpInfo(BulkIdsDto bulkIdsDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/stacks'; - - // ignore: prefer_final_locals - Object? postBody = bulkIdsDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'DELETE', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Delete stacks - /// - /// Delete multiple stacks by providing a list of stack IDs. - /// - /// Parameters: - /// - /// * [BulkIdsDto] bulkIdsDto (required): - Future deleteStacks(BulkIdsDto bulkIdsDto, { Future? abortTrigger, }) async { - final response = await deleteStacksWithHttpInfo(bulkIdsDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - } - - /// Retrieve a stack - /// - /// Retrieve a specific stack by its ID. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - Future getStackWithHttpInfo(String id, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/stacks/{id}' - .replaceAll('{id}', id); - - // 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, - abortTrigger: abortTrigger, - ); - } - - /// Retrieve a stack - /// - /// Retrieve a specific stack by its ID. - /// - /// Parameters: - /// - /// * [String] id (required): - Future getStack(String id, { Future? abortTrigger, }) async { - final response = await getStackWithHttpInfo(id, abortTrigger: abortTrigger,); - 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), 'StackResponseDto',) as StackResponseDto; - - } - return null; - } - - /// 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]. - /// - /// Parameters: - /// - /// * [String] assetId (required): - /// - /// * [String] id (required): - Future removeAssetFromStackWithHttpInfo(String assetId, String id, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/stacks/{id}/assets/{assetId}' - .replaceAll('{assetId}', assetId) - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'DELETE', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Remove an asset from a stack - /// - /// Remove a specific asset from a stack by providing the stack ID and asset ID. - /// - /// Parameters: - /// - /// * [String] assetId (required): - /// - /// * [String] id (required): - Future removeAssetFromStack(String assetId, String id, { Future? abortTrigger, }) async { - final response = await removeAssetFromStackWithHttpInfo(assetId, id, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - } - - /// Retrieve stacks - /// - /// Retrieve a list of stacks. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] primaryAssetId: - /// Filter by primary asset ID - Future searchStacksWithHttpInfo({ String? primaryAssetId, Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/stacks'; - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - if (primaryAssetId != null) { - queryParams.addAll(_queryParams('', 'primaryAssetId', primaryAssetId)); - } - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Retrieve stacks - /// - /// Retrieve a list of stacks. - /// - /// Parameters: - /// - /// * [String] primaryAssetId: - /// Filter by primary asset ID - Future?> searchStacks({ String? primaryAssetId, Future? abortTrigger, }) async { - final response = await searchStacksWithHttpInfo(primaryAssetId: primaryAssetId, abortTrigger: abortTrigger,); - 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; - } - - /// Update a stack - /// - /// Update an existing stack by its ID. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [StackUpdateDto] stackUpdateDto (required): - Future updateStackWithHttpInfo(String id, StackUpdateDto stackUpdateDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/stacks/{id}' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody = stackUpdateDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'PUT', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Update a stack - /// - /// Update an existing stack by its ID. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [StackUpdateDto] stackUpdateDto (required): - Future updateStack(String id, StackUpdateDto stackUpdateDto, { Future? abortTrigger, }) async { - final response = await updateStackWithHttpInfo(id, stackUpdateDto, abortTrigger: abortTrigger,); - 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), 'StackResponseDto',) as StackResponseDto; - - } - return null; - } -} diff --git a/mobile/openapi/lib/api/sync_api.dart b/mobile/openapi/lib/api/sync_api.dart deleted file mode 100644 index c2a57c3395..0000000000 --- a/mobile/openapi/lib/api/sync_api.dart +++ /dev/null @@ -1,217 +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 SyncApi { - SyncApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient; - - final ApiClient apiClient; - - /// Delete acknowledgements - /// - /// Delete specific synchronization acknowledgments. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [SyncAckDeleteDto] syncAckDeleteDto (required): - Future deleteSyncAckWithHttpInfo(SyncAckDeleteDto syncAckDeleteDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/sync/ack'; - - // ignore: prefer_final_locals - Object? postBody = syncAckDeleteDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'DELETE', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Delete acknowledgements - /// - /// Delete specific synchronization acknowledgments. - /// - /// Parameters: - /// - /// * [SyncAckDeleteDto] syncAckDeleteDto (required): - Future deleteSyncAck(SyncAckDeleteDto syncAckDeleteDto, { Future? abortTrigger, }) async { - final response = await deleteSyncAckWithHttpInfo(syncAckDeleteDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - } - - /// Retrieve acknowledgements - /// - /// Retrieve the synchronization acknowledgments for the current session. - /// - /// Note: This method returns the HTTP [Response]. - Future getSyncAckWithHttpInfo({ Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/sync/ack'; - - // 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, - abortTrigger: abortTrigger, - ); - } - - /// Retrieve acknowledgements - /// - /// Retrieve the synchronization acknowledgments for the current session. - Future?> getSyncAck({ Future? abortTrigger, }) async { - final response = await getSyncAckWithHttpInfo(abortTrigger: abortTrigger,); - 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; - } - - /// 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]. - /// - /// Parameters: - /// - /// * [SyncStreamDto] syncStreamDto (required): - Future getSyncStreamWithHttpInfo(SyncStreamDto syncStreamDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/sync/stream'; - - // ignore: prefer_final_locals - Object? postBody = syncStreamDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'POST', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// 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: - /// - /// * [SyncStreamDto] syncStreamDto (required): - Future getSyncStream(SyncStreamDto syncStreamDto, { Future? abortTrigger, }) async { - final response = await getSyncStreamWithHttpInfo(syncStreamDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - } - - /// Acknowledge changes - /// - /// Send a list of synchronization acknowledgements to confirm that the latest changes have been received. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [SyncAckSetDto] syncAckSetDto (required): - Future sendSyncAckWithHttpInfo(SyncAckSetDto syncAckSetDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/sync/ack'; - - // ignore: prefer_final_locals - Object? postBody = syncAckSetDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'POST', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Acknowledge changes - /// - /// Send a list of synchronization acknowledgements to confirm that the latest changes have been received. - /// - /// Parameters: - /// - /// * [SyncAckSetDto] syncAckSetDto (required): - Future sendSyncAck(SyncAckSetDto syncAckSetDto, { Future? abortTrigger, }) async { - final response = await sendSyncAckWithHttpInfo(syncAckSetDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - } -} diff --git a/mobile/openapi/lib/api/system_config_api.dart b/mobile/openapi/lib/api/system_config_api.dart deleted file mode 100644 index ba5b82263a..0000000000 --- a/mobile/openapi/lib/api/system_config_api.dart +++ /dev/null @@ -1,222 +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 SystemConfigApi { - SystemConfigApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient; - - final ApiClient apiClient; - - /// Get system configuration - /// - /// Retrieve the current system configuration. - /// - /// Note: This method returns the HTTP [Response]. - Future getConfigWithHttpInfo({ Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/system-config'; - - // 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, - abortTrigger: abortTrigger, - ); - } - - /// Get system configuration - /// - /// Retrieve the current system configuration. - Future getConfig({ Future? abortTrigger, }) async { - final response = await getConfigWithHttpInfo(abortTrigger: abortTrigger,); - 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), 'SystemConfigDto',) as SystemConfigDto; - - } - return null; - } - - /// Get system configuration defaults - /// - /// Retrieve the default values for the system configuration. - /// - /// Note: This method returns the HTTP [Response]. - Future getConfigDefaultsWithHttpInfo({ Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/system-config/defaults'; - - // 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, - abortTrigger: abortTrigger, - ); - } - - /// Get system configuration defaults - /// - /// Retrieve the default values for the system configuration. - Future getConfigDefaults({ Future? abortTrigger, }) async { - final response = await getConfigDefaultsWithHttpInfo(abortTrigger: abortTrigger,); - 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), 'SystemConfigDto',) as SystemConfigDto; - - } - return null; - } - - /// Get storage template options - /// - /// Retrieve exemplary storage template options. - /// - /// Note: This method returns the HTTP [Response]. - Future getStorageTemplateOptionsWithHttpInfo({ Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/system-config/storage-template-options'; - - // 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, - abortTrigger: abortTrigger, - ); - } - - /// Get storage template options - /// - /// Retrieve exemplary storage template options. - Future getStorageTemplateOptions({ Future? abortTrigger, }) async { - final response = await getStorageTemplateOptionsWithHttpInfo(abortTrigger: abortTrigger,); - 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), 'SystemConfigTemplateStorageOptionDto',) as SystemConfigTemplateStorageOptionDto; - - } - return null; - } - - /// Update system configuration - /// - /// Update the system configuration with a new system configuration. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [SystemConfigDto] systemConfigDto (required): - Future updateConfigWithHttpInfo(SystemConfigDto systemConfigDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/system-config'; - - // ignore: prefer_final_locals - Object? postBody = systemConfigDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'PUT', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Update system configuration - /// - /// Update the system configuration with a new system configuration. - /// - /// Parameters: - /// - /// * [SystemConfigDto] systemConfigDto (required): - Future updateConfig(SystemConfigDto systemConfigDto, { Future? abortTrigger, }) async { - final response = await updateConfigWithHttpInfo(systemConfigDto, abortTrigger: abortTrigger,); - 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), 'SystemConfigDto',) as SystemConfigDto; - - } - return null; - } -} diff --git a/mobile/openapi/lib/api/system_metadata_api.dart b/mobile/openapi/lib/api/system_metadata_api.dart deleted file mode 100644 index a1429b54b0..0000000000 --- a/mobile/openapi/lib/api/system_metadata_api.dart +++ /dev/null @@ -1,214 +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 SystemMetadataApi { - SystemMetadataApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient; - - final ApiClient apiClient; - - /// Retrieve admin onboarding - /// - /// Retrieve the current admin onboarding status. - /// - /// Note: This method returns the HTTP [Response]. - Future getAdminOnboardingWithHttpInfo({ Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/system-metadata/admin-onboarding'; - - // 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, - abortTrigger: abortTrigger, - ); - } - - /// Retrieve admin onboarding - /// - /// Retrieve the current admin onboarding status. - Future getAdminOnboarding({ Future? abortTrigger, }) async { - final response = await getAdminOnboardingWithHttpInfo(abortTrigger: abortTrigger,); - 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), 'AdminOnboardingUpdateDto',) as AdminOnboardingUpdateDto; - - } - return null; - } - - /// Retrieve reverse geocoding state - /// - /// Retrieve the current state of the reverse geocoding import. - /// - /// Note: This method returns the HTTP [Response]. - Future getReverseGeocodingStateWithHttpInfo({ Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/system-metadata/reverse-geocoding-state'; - - // 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, - abortTrigger: abortTrigger, - ); - } - - /// Retrieve reverse geocoding state - /// - /// Retrieve the current state of the reverse geocoding import. - Future getReverseGeocodingState({ Future? abortTrigger, }) async { - final response = await getReverseGeocodingStateWithHttpInfo(abortTrigger: abortTrigger,); - 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), 'ReverseGeocodingStateResponseDto',) as ReverseGeocodingStateResponseDto; - - } - return null; - } - - /// Retrieve version check state - /// - /// Retrieve the current state of the version check process. - /// - /// Note: This method returns the HTTP [Response]. - Future getVersionCheckStateWithHttpInfo({ Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/system-metadata/version-check-state'; - - // 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, - abortTrigger: abortTrigger, - ); - } - - /// Retrieve version check state - /// - /// Retrieve the current state of the version check process. - Future getVersionCheckState({ Future? abortTrigger, }) async { - final response = await getVersionCheckStateWithHttpInfo(abortTrigger: abortTrigger,); - 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), 'VersionCheckStateResponseDto',) as VersionCheckStateResponseDto; - - } - return null; - } - - /// Update admin onboarding - /// - /// Update the admin onboarding status. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [AdminOnboardingUpdateDto] adminOnboardingUpdateDto (required): - Future updateAdminOnboardingWithHttpInfo(AdminOnboardingUpdateDto adminOnboardingUpdateDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/system-metadata/admin-onboarding'; - - // ignore: prefer_final_locals - Object? postBody = adminOnboardingUpdateDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'POST', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Update admin onboarding - /// - /// Update the admin onboarding status. - /// - /// Parameters: - /// - /// * [AdminOnboardingUpdateDto] adminOnboardingUpdateDto (required): - Future updateAdminOnboarding(AdminOnboardingUpdateDto adminOnboardingUpdateDto, { Future? abortTrigger, }) async { - final response = await updateAdminOnboardingWithHttpInfo(adminOnboardingUpdateDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - } -} diff --git a/mobile/openapi/lib/api/tags_api.dart b/mobile/openapi/lib/api/tags_api.dart deleted file mode 100644 index c3cf9f545c..0000000000 --- a/mobile/openapi/lib/api/tags_api.dart +++ /dev/null @@ -1,544 +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 TagsApi { - TagsApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient; - - final ApiClient apiClient; - - /// Tag assets - /// - /// Add multiple tags to multiple assets in a single request. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [TagBulkAssetsDto] tagBulkAssetsDto (required): - Future bulkTagAssetsWithHttpInfo(TagBulkAssetsDto tagBulkAssetsDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/tags/assets'; - - // ignore: prefer_final_locals - Object? postBody = tagBulkAssetsDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'PUT', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Tag assets - /// - /// Add multiple tags to multiple assets in a single request. - /// - /// Parameters: - /// - /// * [TagBulkAssetsDto] tagBulkAssetsDto (required): - Future bulkTagAssets(TagBulkAssetsDto tagBulkAssetsDto, { Future? abortTrigger, }) async { - final response = await bulkTagAssetsWithHttpInfo(tagBulkAssetsDto, abortTrigger: abortTrigger,); - 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), 'TagBulkAssetsResponseDto',) as TagBulkAssetsResponseDto; - - } - return null; - } - - /// Create a tag - /// - /// Create a new tag by providing a name and optional color. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [TagCreateDto] tagCreateDto (required): - Future createTagWithHttpInfo(TagCreateDto tagCreateDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/tags'; - - // ignore: prefer_final_locals - Object? postBody = tagCreateDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'POST', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Create a tag - /// - /// Create a new tag by providing a name and optional color. - /// - /// Parameters: - /// - /// * [TagCreateDto] tagCreateDto (required): - Future createTag(TagCreateDto tagCreateDto, { Future? abortTrigger, }) async { - final response = await createTagWithHttpInfo(tagCreateDto, abortTrigger: abortTrigger,); - 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), 'TagResponseDto',) as TagResponseDto; - - } - return null; - } - - /// Delete a tag - /// - /// Delete a specific tag by its ID. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - Future deleteTagWithHttpInfo(String id, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/tags/{id}' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'DELETE', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Delete a tag - /// - /// Delete a specific tag by its ID. - /// - /// Parameters: - /// - /// * [String] id (required): - Future deleteTag(String id, { Future? abortTrigger, }) async { - final response = await deleteTagWithHttpInfo(id, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - } - - /// Retrieve tags - /// - /// Retrieve a list of all tags. - /// - /// Note: This method returns the HTTP [Response]. - Future getAllTagsWithHttpInfo({ Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/tags'; - - // 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, - abortTrigger: abortTrigger, - ); - } - - /// Retrieve tags - /// - /// Retrieve a list of all tags. - Future?> getAllTags({ Future? abortTrigger, }) async { - final response = await getAllTagsWithHttpInfo(abortTrigger: abortTrigger,); - 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; - } - - /// Retrieve a tag - /// - /// Retrieve a specific tag by its ID. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - Future getTagByIdWithHttpInfo(String id, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/tags/{id}' - .replaceAll('{id}', id); - - // 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, - abortTrigger: abortTrigger, - ); - } - - /// Retrieve a tag - /// - /// Retrieve a specific tag by its ID. - /// - /// Parameters: - /// - /// * [String] id (required): - Future getTagById(String id, { Future? abortTrigger, }) async { - final response = await getTagByIdWithHttpInfo(id, abortTrigger: abortTrigger,); - 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), 'TagResponseDto',) as TagResponseDto; - - } - return null; - } - - /// Tag assets - /// - /// Add a tag to all the specified assets. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [BulkIdsDto] bulkIdsDto (required): - Future tagAssetsWithHttpInfo(String id, BulkIdsDto bulkIdsDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/tags/{id}/assets' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody = bulkIdsDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'PUT', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Tag assets - /// - /// Add a tag to all the specified assets. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [BulkIdsDto] bulkIdsDto (required): - Future?> tagAssets(String id, BulkIdsDto bulkIdsDto, { Future? abortTrigger, }) async { - final response = await tagAssetsWithHttpInfo(id, bulkIdsDto, abortTrigger: abortTrigger,); - 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; - } - - /// Untag assets - /// - /// Remove a tag from all the specified assets. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [BulkIdsDto] bulkIdsDto (required): - Future untagAssetsWithHttpInfo(String id, BulkIdsDto bulkIdsDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/tags/{id}/assets' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody = bulkIdsDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'DELETE', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Untag assets - /// - /// Remove a tag from all the specified assets. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [BulkIdsDto] bulkIdsDto (required): - Future?> untagAssets(String id, BulkIdsDto bulkIdsDto, { Future? abortTrigger, }) async { - final response = await untagAssetsWithHttpInfo(id, bulkIdsDto, abortTrigger: abortTrigger,); - 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; - } - - /// Update a tag - /// - /// Update an existing tag identified by its ID. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [TagUpdateDto] tagUpdateDto (required): - Future updateTagWithHttpInfo(String id, TagUpdateDto tagUpdateDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/tags/{id}' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody = tagUpdateDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'PUT', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Update a tag - /// - /// Update an existing tag identified by its ID. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [TagUpdateDto] tagUpdateDto (required): - Future updateTag(String id, TagUpdateDto tagUpdateDto, { Future? abortTrigger, }) async { - final response = await updateTagWithHttpInfo(id, tagUpdateDto, abortTrigger: abortTrigger,); - 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), 'TagResponseDto',) as TagResponseDto; - - } - return null; - } - - /// Upsert tags - /// - /// Create or update multiple tags in a single request. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [TagUpsertDto] tagUpsertDto (required): - Future upsertTagsWithHttpInfo(TagUpsertDto tagUpsertDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/tags'; - - // ignore: prefer_final_locals - Object? postBody = tagUpsertDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'PUT', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Upsert tags - /// - /// Create or update multiple tags in a single request. - /// - /// Parameters: - /// - /// * [TagUpsertDto] tagUpsertDto (required): - Future?> upsertTags(TagUpsertDto tagUpsertDto, { Future? abortTrigger, }) async { - final response = await upsertTagsWithHttpInfo(tagUpsertDto, abortTrigger: abortTrigger,); - 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; - } -} diff --git a/mobile/openapi/lib/api/timeline_api.dart b/mobile/openapi/lib/api/timeline_api.dart deleted file mode 100644 index a85aee2d7a..0000000000 --- a/mobile/openapi/lib/api/timeline_api.dart +++ /dev/null @@ -1,398 +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 TimelineApi { - TimelineApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient; - - final ApiClient apiClient; - - /// Get time bucket - /// - /// Retrieve a string of all asset ids in a given time bucket. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] timeBucket (required): - /// Time bucket identifier in YYYY-MM-DD format - /// - /// * [String] albumId: - /// Filter assets belonging to a specific album - /// - /// * [String] bbox: - /// Bounding box coordinates as west,south,east,north (WGS84) - /// - /// * [bool] isFavorite: - /// Filter by favorite status (true for favorites only, false for non-favorites only) - /// - /// * [bool] isTrashed: - /// Filter by trash status (true for trashed assets only, false for non-trashed only) - /// - /// * [String] key: - /// - /// * [AssetOrder] order: - /// Sort order for assets within time buckets (ASC for oldest first, DESC for newest first) - /// - /// * [AssetOrderBy] orderBy: - /// Date to group and order assets by (takenAt for date taken, createdAt for date added to Immich) - /// - /// * [String] personId: - /// Filter assets containing a specific person (face recognition) - /// - /// * [String] slug: - /// - /// * [String] tagId: - /// Filter assets with a specific tag - /// - /// * [String] userId: - /// Filter assets by specific user ID - /// - /// * [AssetVisibility] visibility: - /// Filter by asset visibility status (ARCHIVE, TIMELINE, HIDDEN, LOCKED) - /// - /// * [bool] withCoordinates: - /// Include location data in the response - /// - /// * [bool] withPartners: - /// Include assets shared by partners - /// - /// * [bool] withStacked: - /// Include stacked assets in the response. When true, only primary assets from stacks are returned. - Future getTimeBucketWithHttpInfo(String timeBucket, { String? albumId, String? bbox, bool? isFavorite, bool? isTrashed, String? key, AssetOrder? order, AssetOrderBy? orderBy, String? personId, String? slug, String? tagId, String? userId, AssetVisibility? visibility, bool? withCoordinates, bool? withPartners, bool? withStacked, Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/timeline/bucket'; - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - if (albumId != null) { - queryParams.addAll(_queryParams('', 'albumId', albumId)); - } - if (bbox != null) { - queryParams.addAll(_queryParams('', 'bbox', bbox)); - } - if (isFavorite != null) { - queryParams.addAll(_queryParams('', 'isFavorite', isFavorite)); - } - if (isTrashed != null) { - queryParams.addAll(_queryParams('', 'isTrashed', isTrashed)); - } - if (key != null) { - queryParams.addAll(_queryParams('', 'key', key)); - } - if (order != null) { - queryParams.addAll(_queryParams('', 'order', order)); - } - if (orderBy != null) { - queryParams.addAll(_queryParams('', 'orderBy', orderBy)); - } - if (personId != null) { - queryParams.addAll(_queryParams('', 'personId', personId)); - } - if (slug != null) { - queryParams.addAll(_queryParams('', 'slug', slug)); - } - if (tagId != null) { - queryParams.addAll(_queryParams('', 'tagId', tagId)); - } - queryParams.addAll(_queryParams('', 'timeBucket', timeBucket)); - if (userId != null) { - queryParams.addAll(_queryParams('', 'userId', userId)); - } - if (visibility != null) { - queryParams.addAll(_queryParams('', 'visibility', visibility)); - } - if (withCoordinates != null) { - queryParams.addAll(_queryParams('', 'withCoordinates', withCoordinates)); - } - if (withPartners != null) { - queryParams.addAll(_queryParams('', 'withPartners', withPartners)); - } - if (withStacked != null) { - queryParams.addAll(_queryParams('', 'withStacked', withStacked)); - } - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Get time bucket - /// - /// Retrieve a string of all asset ids in a given time bucket. - /// - /// Parameters: - /// - /// * [String] timeBucket (required): - /// Time bucket identifier in YYYY-MM-DD format - /// - /// * [String] albumId: - /// Filter assets belonging to a specific album - /// - /// * [String] bbox: - /// Bounding box coordinates as west,south,east,north (WGS84) - /// - /// * [bool] isFavorite: - /// Filter by favorite status (true for favorites only, false for non-favorites only) - /// - /// * [bool] isTrashed: - /// Filter by trash status (true for trashed assets only, false for non-trashed only) - /// - /// * [String] key: - /// - /// * [AssetOrder] order: - /// Sort order for assets within time buckets (ASC for oldest first, DESC for newest first) - /// - /// * [AssetOrderBy] orderBy: - /// Date to group and order assets by (takenAt for date taken, createdAt for date added to Immich) - /// - /// * [String] personId: - /// Filter assets containing a specific person (face recognition) - /// - /// * [String] slug: - /// - /// * [String] tagId: - /// Filter assets with a specific tag - /// - /// * [String] userId: - /// Filter assets by specific user ID - /// - /// * [AssetVisibility] visibility: - /// Filter by asset visibility status (ARCHIVE, TIMELINE, HIDDEN, LOCKED) - /// - /// * [bool] withCoordinates: - /// Include location data in the response - /// - /// * [bool] withPartners: - /// Include assets shared by partners - /// - /// * [bool] withStacked: - /// Include stacked assets in the response. When true, only primary assets from stacks are returned. - Future getTimeBucket(String timeBucket, { String? albumId, String? bbox, bool? isFavorite, bool? isTrashed, String? key, AssetOrder? order, AssetOrderBy? orderBy, String? personId, String? slug, String? tagId, String? userId, AssetVisibility? visibility, bool? withCoordinates, bool? withPartners, bool? withStacked, Future? abortTrigger, }) async { - final response = await getTimeBucketWithHttpInfo(timeBucket, albumId: albumId, bbox: bbox, isFavorite: isFavorite, isTrashed: isTrashed, key: key, order: order, orderBy: orderBy, personId: personId, slug: slug, tagId: tagId, userId: userId, visibility: visibility, withCoordinates: withCoordinates, withPartners: withPartners, withStacked: withStacked, abortTrigger: abortTrigger,); - 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), 'TimeBucketAssetResponseDto',) as TimeBucketAssetResponseDto; - - } - return null; - } - - /// Get time buckets - /// - /// Retrieve a list of all minimal time buckets. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] albumId: - /// Filter assets belonging to a specific album - /// - /// * [String] bbox: - /// Bounding box coordinates as west,south,east,north (WGS84) - /// - /// * [bool] isFavorite: - /// Filter by favorite status (true for favorites only, false for non-favorites only) - /// - /// * [bool] isTrashed: - /// Filter by trash status (true for trashed assets only, false for non-trashed only) - /// - /// * [String] key: - /// - /// * [AssetOrder] order: - /// Sort order for assets within time buckets (ASC for oldest first, DESC for newest first) - /// - /// * [AssetOrderBy] orderBy: - /// Date to group and order assets by (takenAt for date taken, createdAt for date added to Immich) - /// - /// * [String] personId: - /// Filter assets containing a specific person (face recognition) - /// - /// * [String] slug: - /// - /// * [String] tagId: - /// Filter assets with a specific tag - /// - /// * [String] userId: - /// Filter assets by specific user ID - /// - /// * [AssetVisibility] visibility: - /// Filter by asset visibility status (ARCHIVE, TIMELINE, HIDDEN, LOCKED) - /// - /// * [bool] withCoordinates: - /// Include location data in the response - /// - /// * [bool] withPartners: - /// Include assets shared by partners - /// - /// * [bool] withStacked: - /// Include stacked assets in the response. When true, only primary assets from stacks are returned. - Future getTimeBucketsWithHttpInfo({ String? albumId, String? bbox, bool? isFavorite, bool? isTrashed, String? key, AssetOrder? order, AssetOrderBy? orderBy, String? personId, String? slug, String? tagId, String? userId, AssetVisibility? visibility, bool? withCoordinates, bool? withPartners, bool? withStacked, Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/timeline/buckets'; - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - if (albumId != null) { - queryParams.addAll(_queryParams('', 'albumId', albumId)); - } - if (bbox != null) { - queryParams.addAll(_queryParams('', 'bbox', bbox)); - } - if (isFavorite != null) { - queryParams.addAll(_queryParams('', 'isFavorite', isFavorite)); - } - if (isTrashed != null) { - queryParams.addAll(_queryParams('', 'isTrashed', isTrashed)); - } - if (key != null) { - queryParams.addAll(_queryParams('', 'key', key)); - } - if (order != null) { - queryParams.addAll(_queryParams('', 'order', order)); - } - if (orderBy != null) { - queryParams.addAll(_queryParams('', 'orderBy', orderBy)); - } - if (personId != null) { - queryParams.addAll(_queryParams('', 'personId', personId)); - } - if (slug != null) { - queryParams.addAll(_queryParams('', 'slug', slug)); - } - if (tagId != null) { - queryParams.addAll(_queryParams('', 'tagId', tagId)); - } - if (userId != null) { - queryParams.addAll(_queryParams('', 'userId', userId)); - } - if (visibility != null) { - queryParams.addAll(_queryParams('', 'visibility', visibility)); - } - if (withCoordinates != null) { - queryParams.addAll(_queryParams('', 'withCoordinates', withCoordinates)); - } - if (withPartners != null) { - queryParams.addAll(_queryParams('', 'withPartners', withPartners)); - } - if (withStacked != null) { - queryParams.addAll(_queryParams('', 'withStacked', withStacked)); - } - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Get time buckets - /// - /// Retrieve a list of all minimal time buckets. - /// - /// Parameters: - /// - /// * [String] albumId: - /// Filter assets belonging to a specific album - /// - /// * [String] bbox: - /// Bounding box coordinates as west,south,east,north (WGS84) - /// - /// * [bool] isFavorite: - /// Filter by favorite status (true for favorites only, false for non-favorites only) - /// - /// * [bool] isTrashed: - /// Filter by trash status (true for trashed assets only, false for non-trashed only) - /// - /// * [String] key: - /// - /// * [AssetOrder] order: - /// Sort order for assets within time buckets (ASC for oldest first, DESC for newest first) - /// - /// * [AssetOrderBy] orderBy: - /// Date to group and order assets by (takenAt for date taken, createdAt for date added to Immich) - /// - /// * [String] personId: - /// Filter assets containing a specific person (face recognition) - /// - /// * [String] slug: - /// - /// * [String] tagId: - /// Filter assets with a specific tag - /// - /// * [String] userId: - /// Filter assets by specific user ID - /// - /// * [AssetVisibility] visibility: - /// Filter by asset visibility status (ARCHIVE, TIMELINE, HIDDEN, LOCKED) - /// - /// * [bool] withCoordinates: - /// Include location data in the response - /// - /// * [bool] withPartners: - /// Include assets shared by partners - /// - /// * [bool] withStacked: - /// Include stacked assets in the response. When true, only primary assets from stacks are returned. - Future?> getTimeBuckets({ String? albumId, String? bbox, bool? isFavorite, bool? isTrashed, String? key, AssetOrder? order, AssetOrderBy? orderBy, String? personId, String? slug, String? tagId, String? userId, AssetVisibility? visibility, bool? withCoordinates, bool? withPartners, bool? withStacked, Future? abortTrigger, }) async { - final response = await getTimeBucketsWithHttpInfo(albumId: albumId, bbox: bbox, isFavorite: isFavorite, isTrashed: isTrashed, key: key, order: order, orderBy: orderBy, personId: personId, slug: slug, tagId: tagId, userId: userId, visibility: visibility, withCoordinates: withCoordinates, withPartners: withPartners, withStacked: withStacked, abortTrigger: abortTrigger,); - 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; - } -} diff --git a/mobile/openapi/lib/api/trash_api.dart b/mobile/openapi/lib/api/trash_api.dart deleted file mode 100644 index 7b593e5111..0000000000 --- a/mobile/openapi/lib/api/trash_api.dart +++ /dev/null @@ -1,173 +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 TrashApi { - TrashApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient; - - final ApiClient apiClient; - - /// Empty trash - /// - /// Permanently delete all items in the trash. - /// - /// Note: This method returns the HTTP [Response]. - Future emptyTrashWithHttpInfo({ Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/trash/empty'; - - // 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, - abortTrigger: abortTrigger, - ); - } - - /// Empty trash - /// - /// Permanently delete all items in the trash. - Future emptyTrash({ Future? abortTrigger, }) async { - final response = await emptyTrashWithHttpInfo(abortTrigger: abortTrigger,); - 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), 'TrashResponseDto',) as TrashResponseDto; - - } - return null; - } - - /// Restore assets - /// - /// Restore specific assets from the trash. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [BulkIdsDto] bulkIdsDto (required): - Future restoreAssetsWithHttpInfo(BulkIdsDto bulkIdsDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/trash/restore/assets'; - - // ignore: prefer_final_locals - Object? postBody = bulkIdsDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'POST', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Restore assets - /// - /// Restore specific assets from the trash. - /// - /// Parameters: - /// - /// * [BulkIdsDto] bulkIdsDto (required): - Future restoreAssets(BulkIdsDto bulkIdsDto, { Future? abortTrigger, }) async { - final response = await restoreAssetsWithHttpInfo(bulkIdsDto, abortTrigger: abortTrigger,); - 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), 'TrashResponseDto',) as TrashResponseDto; - - } - return null; - } - - /// Restore trash - /// - /// Restore all items in the trash. - /// - /// Note: This method returns the HTTP [Response]. - Future restoreTrashWithHttpInfo({ Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/trash/restore'; - - // 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, - abortTrigger: abortTrigger, - ); - } - - /// Restore trash - /// - /// Restore all items in the trash. - Future restoreTrash({ Future? abortTrigger, }) async { - final response = await restoreTrashWithHttpInfo(abortTrigger: abortTrigger,); - 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), 'TrashResponseDto',) as TrashResponseDto; - - } - return null; - } -} diff --git a/mobile/openapi/lib/api/users_admin_api.dart b/mobile/openapi/lib/api/users_admin_api.dart deleted file mode 100644 index ef695e2f33..0000000000 --- a/mobile/openapi/lib/api/users_admin_api.dart +++ /dev/null @@ -1,739 +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 UsersAdminApi { - UsersAdminApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient; - - final ApiClient apiClient; - - /// Create a user - /// - /// Create a new user. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [UserAdminCreateDto] userAdminCreateDto (required): - Future createUserAdminWithHttpInfo(UserAdminCreateDto userAdminCreateDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/admin/users'; - - // ignore: prefer_final_locals - Object? postBody = userAdminCreateDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'POST', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Create a user - /// - /// Create a new user. - /// - /// Parameters: - /// - /// * [UserAdminCreateDto] userAdminCreateDto (required): - Future createUserAdmin(UserAdminCreateDto userAdminCreateDto, { Future? abortTrigger, }) async { - final response = await createUserAdminWithHttpInfo(userAdminCreateDto, abortTrigger: abortTrigger,); - 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; - } - - /// Delete a user - /// - /// Delete a user. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [UserAdminDeleteDto] userAdminDeleteDto (required): - Future deleteUserAdminWithHttpInfo(String id, UserAdminDeleteDto userAdminDeleteDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/admin/users/{id}' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody = userAdminDeleteDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'DELETE', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Delete a user - /// - /// Delete a user. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [UserAdminDeleteDto] userAdminDeleteDto (required): - Future deleteUserAdmin(String id, UserAdminDeleteDto userAdminDeleteDto, { Future? abortTrigger, }) async { - final response = await deleteUserAdminWithHttpInfo(id, userAdminDeleteDto, abortTrigger: abortTrigger,); - 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; - } - - /// Retrieve a user - /// - /// Retrieve a specific user by their ID. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - Future getUserAdminWithHttpInfo(String id, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/admin/users/{id}' - .replaceAll('{id}', id); - - // 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, - abortTrigger: abortTrigger, - ); - } - - /// Retrieve a user - /// - /// Retrieve a specific user by their ID. - /// - /// Parameters: - /// - /// * [String] id (required): - Future getUserAdmin(String id, { Future? abortTrigger, }) async { - final response = await getUserAdminWithHttpInfo(id, abortTrigger: abortTrigger,); - 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; - } - - /// Retrieve calendar heatmap activity - /// - /// Retrieve activity counts for a specified period, in a calendar heatmap format. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [DateTime] from: - /// Start date in UTC - /// - /// * [DateTime] to: - /// End date in UTC - /// - /// * [CalendarHeatmapType] type: - Future getUserCalendarHeatmapAdminWithHttpInfo(String id, { DateTime? from, DateTime? to, CalendarHeatmapType? type, Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/admin/users/{id}/calendar-heatmap' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - if (from != null) { - queryParams.addAll(_queryParams('', 'from', from)); - } - if (to != null) { - queryParams.addAll(_queryParams('', 'to', to)); - } - if (type != null) { - queryParams.addAll(_queryParams('', 'type', type)); - } - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Retrieve calendar heatmap activity - /// - /// Retrieve activity counts for a specified period, in a calendar heatmap format. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [DateTime] from: - /// Start date in UTC - /// - /// * [DateTime] to: - /// End date in UTC - /// - /// * [CalendarHeatmapType] type: - Future getUserCalendarHeatmapAdmin(String id, { DateTime? from, DateTime? to, CalendarHeatmapType? type, Future? abortTrigger, }) async { - final response = await getUserCalendarHeatmapAdminWithHttpInfo(id, from: from, to: to, type: type, abortTrigger: abortTrigger,); - 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), 'CalendarHeatmapResponseDto',) as CalendarHeatmapResponseDto; - - } - return null; - } - - /// Retrieve user preferences - /// - /// Retrieve the preferences of a specific user. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - Future getUserPreferencesAdminWithHttpInfo(String id, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/admin/users/{id}/preferences' - .replaceAll('{id}', id); - - // 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, - abortTrigger: abortTrigger, - ); - } - - /// Retrieve user preferences - /// - /// Retrieve the preferences of a specific user. - /// - /// Parameters: - /// - /// * [String] id (required): - Future getUserPreferencesAdmin(String id, { Future? abortTrigger, }) async { - final response = await getUserPreferencesAdminWithHttpInfo(id, abortTrigger: abortTrigger,); - 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), 'UserPreferencesResponseDto',) as UserPreferencesResponseDto; - - } - return null; - } - - /// Retrieve user sessions - /// - /// Retrieve all sessions for a specific user. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - Future getUserSessionsAdminWithHttpInfo(String id, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/admin/users/{id}/sessions' - .replaceAll('{id}', id); - - // 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, - abortTrigger: abortTrigger, - ); - } - - /// Retrieve user sessions - /// - /// Retrieve all sessions for a specific user. - /// - /// Parameters: - /// - /// * [String] id (required): - Future?> getUserSessionsAdmin(String id, { Future? abortTrigger, }) async { - final response = await getUserSessionsAdminWithHttpInfo(id, abortTrigger: abortTrigger,); - 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; - } - - /// Retrieve user statistics - /// - /// Retrieve asset statistics for a specific user. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [bool] isFavorite: - /// Filter by favorite status - /// - /// * [bool] isTrashed: - /// Filter by trash status - /// - /// * [AssetVisibility] visibility: - Future getUserStatisticsAdminWithHttpInfo(String id, { bool? isFavorite, bool? isTrashed, AssetVisibility? visibility, Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/admin/users/{id}/statistics' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - if (isFavorite != null) { - queryParams.addAll(_queryParams('', 'isFavorite', isFavorite)); - } - if (isTrashed != null) { - queryParams.addAll(_queryParams('', 'isTrashed', isTrashed)); - } - if (visibility != null) { - queryParams.addAll(_queryParams('', 'visibility', visibility)); - } - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Retrieve user statistics - /// - /// Retrieve asset statistics for a specific user. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [bool] isFavorite: - /// Filter by favorite status - /// - /// * [bool] isTrashed: - /// Filter by trash status - /// - /// * [AssetVisibility] visibility: - Future getUserStatisticsAdmin(String id, { bool? isFavorite, bool? isTrashed, AssetVisibility? visibility, Future? abortTrigger, }) async { - final response = await getUserStatisticsAdminWithHttpInfo(id, isFavorite: isFavorite, isTrashed: isTrashed, visibility: visibility, abortTrigger: abortTrigger,); - 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), 'AssetStatsResponseDto',) as AssetStatsResponseDto; - - } - return null; - } - - /// Restore a deleted user - /// - /// Restore a previously deleted user. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - Future restoreUserAdminWithHttpInfo(String id, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/admin/users/{id}/restore' - .replaceAll('{id}', id); - - // 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, - abortTrigger: abortTrigger, - ); - } - - /// Restore a deleted user - /// - /// Restore a previously deleted user. - /// - /// Parameters: - /// - /// * [String] id (required): - Future restoreUserAdmin(String id, { Future? abortTrigger, }) async { - final response = await restoreUserAdminWithHttpInfo(id, abortTrigger: abortTrigger,); - 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; - } - - /// Search users - /// - /// Search for users. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id: - /// User ID filter - /// - /// * [bool] withDeleted: - /// Include deleted users - Future searchUsersAdminWithHttpInfo({ String? id, bool? withDeleted, Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/admin/users'; - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - if (id != null) { - queryParams.addAll(_queryParams('', 'id', id)); - } - if (withDeleted != null) { - queryParams.addAll(_queryParams('', 'withDeleted', withDeleted)); - } - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Search users - /// - /// Search for users. - /// - /// Parameters: - /// - /// * [String] id: - /// User ID filter - /// - /// * [bool] withDeleted: - /// Include deleted users - Future?> searchUsersAdmin({ String? id, bool? withDeleted, Future? abortTrigger, }) async { - final response = await searchUsersAdminWithHttpInfo(id: id, withDeleted: withDeleted, abortTrigger: abortTrigger,); - 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; - } - - /// Update a user - /// - /// Update an existing user. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [UserAdminUpdateDto] userAdminUpdateDto (required): - Future updateUserAdminWithHttpInfo(String id, UserAdminUpdateDto userAdminUpdateDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/admin/users/{id}' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody = userAdminUpdateDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'PUT', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Update a user - /// - /// Update an existing user. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [UserAdminUpdateDto] userAdminUpdateDto (required): - Future updateUserAdmin(String id, UserAdminUpdateDto userAdminUpdateDto, { Future? abortTrigger, }) async { - final response = await updateUserAdminWithHttpInfo(id, userAdminUpdateDto, abortTrigger: abortTrigger,); - 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; - } - - /// Update user preferences - /// - /// Update the preferences of a specific user. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [UserPreferencesUpdateDto] userPreferencesUpdateDto (required): - Future updateUserPreferencesAdminWithHttpInfo(String id, UserPreferencesUpdateDto userPreferencesUpdateDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/admin/users/{id}/preferences' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody = userPreferencesUpdateDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'PUT', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Update user preferences - /// - /// Update the preferences of a specific user. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [UserPreferencesUpdateDto] userPreferencesUpdateDto (required): - Future updateUserPreferencesAdmin(String id, UserPreferencesUpdateDto userPreferencesUpdateDto, { Future? abortTrigger, }) async { - final response = await updateUserPreferencesAdminWithHttpInfo(id, userPreferencesUpdateDto, abortTrigger: abortTrigger,); - 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), 'UserPreferencesResponseDto',) as UserPreferencesResponseDto; - - } - return null; - } -} diff --git a/mobile/openapi/lib/api/users_api.dart b/mobile/openapi/lib/api/users_api.dart deleted file mode 100644 index f768e7c92b..0000000000 --- a/mobile/openapi/lib/api/users_api.dart +++ /dev/null @@ -1,881 +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 UsersApi { - UsersApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient; - - final ApiClient apiClient; - - /// Create user profile image - /// - /// Upload and set a new profile image for the current user. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [MultipartFile] file (required): - /// Profile image file - Future createProfileImageWithHttpInfo(MultipartFile file, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/users/profile-image'; - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['multipart/form-data']; - - bool hasFields = false; - final mp = MultipartRequest('POST', Uri.parse(apiPath)); - if (file != null) { - hasFields = true; - mp.fields[r'file'] = file.field; - mp.files.add(file); - } - if (hasFields) { - postBody = mp; - } - - return apiClient.invokeAPI( - apiPath, - 'POST', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Create user profile image - /// - /// Upload and set a new profile image for the current user. - /// - /// Parameters: - /// - /// * [MultipartFile] file (required): - /// Profile image file - Future createProfileImage(MultipartFile file, { Future? abortTrigger, }) async { - final response = await createProfileImageWithHttpInfo(file, abortTrigger: abortTrigger,); - 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), 'CreateProfileImageResponseDto',) as CreateProfileImageResponseDto; - - } - return null; - } - - /// Delete user profile image - /// - /// Delete the profile image of the current user. - /// - /// Note: This method returns the HTTP [Response]. - Future deleteProfileImageWithHttpInfo({ Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/users/profile-image'; - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'DELETE', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Delete user profile image - /// - /// Delete the profile image of the current user. - Future deleteProfileImage({ Future? abortTrigger, }) async { - final response = await deleteProfileImageWithHttpInfo(abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - } - - /// Delete user product key - /// - /// Delete the registered product key for the current user. - /// - /// Note: This method returns the HTTP [Response]. - Future deleteUserLicenseWithHttpInfo({ Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/users/me/license'; - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'DELETE', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Delete user product key - /// - /// Delete the registered product key for the current user. - Future deleteUserLicense({ Future? abortTrigger, }) async { - final response = await deleteUserLicenseWithHttpInfo(abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - } - - /// Delete user onboarding - /// - /// Delete the onboarding status of the current user. - /// - /// Note: This method returns the HTTP [Response]. - Future deleteUserOnboardingWithHttpInfo({ Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/users/me/onboarding'; - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'DELETE', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Delete user onboarding - /// - /// Delete the onboarding status of the current user. - Future deleteUserOnboarding({ Future? abortTrigger, }) async { - final response = await deleteUserOnboardingWithHttpInfo(abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - } - - /// Retrieve calendar heatmap activity - /// - /// Retrieve activity counts for a specified period, in a calendar heatmap format. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [DateTime] from: - /// Start date in UTC - /// - /// * [DateTime] to: - /// End date in UTC - /// - /// * [CalendarHeatmapType] type: - Future getMyCalendarHeatmapWithHttpInfo({ DateTime? from, DateTime? to, CalendarHeatmapType? type, Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/users/me/calendar-heatmap'; - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - if (from != null) { - queryParams.addAll(_queryParams('', 'from', from)); - } - if (to != null) { - queryParams.addAll(_queryParams('', 'to', to)); - } - if (type != null) { - queryParams.addAll(_queryParams('', 'type', type)); - } - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Retrieve calendar heatmap activity - /// - /// Retrieve activity counts for a specified period, in a calendar heatmap format. - /// - /// Parameters: - /// - /// * [DateTime] from: - /// Start date in UTC - /// - /// * [DateTime] to: - /// End date in UTC - /// - /// * [CalendarHeatmapType] type: - Future getMyCalendarHeatmap({ DateTime? from, DateTime? to, CalendarHeatmapType? type, Future? abortTrigger, }) async { - final response = await getMyCalendarHeatmapWithHttpInfo(from: from, to: to, type: type, abortTrigger: abortTrigger,); - 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), 'CalendarHeatmapResponseDto',) as CalendarHeatmapResponseDto; - - } - return null; - } - - /// Get my preferences - /// - /// Retrieve the preferences for the current user. - /// - /// Note: This method returns the HTTP [Response]. - Future getMyPreferencesWithHttpInfo({ Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/users/me/preferences'; - - // 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, - abortTrigger: abortTrigger, - ); - } - - /// Get my preferences - /// - /// Retrieve the preferences for the current user. - Future getMyPreferences({ Future? abortTrigger, }) async { - final response = await getMyPreferencesWithHttpInfo(abortTrigger: abortTrigger,); - 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), 'UserPreferencesResponseDto',) as UserPreferencesResponseDto; - - } - return null; - } - - /// Get current user - /// - /// Retrieve information about the user making the API request. - /// - /// Note: This method returns the HTTP [Response]. - Future getMyUserWithHttpInfo({ Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/users/me'; - - // 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, - abortTrigger: abortTrigger, - ); - } - - /// Get current user - /// - /// Retrieve information about the user making the API request. - Future getMyUser({ Future? abortTrigger, }) async { - final response = await getMyUserWithHttpInfo(abortTrigger: abortTrigger,); - 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; - } - - /// Retrieve user profile image - /// - /// Retrieve the profile image file for a user. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - Future getProfileImageWithHttpInfo(String id, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/users/{id}/profile-image' - .replaceAll('{id}', id); - - // 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, - abortTrigger: abortTrigger, - ); - } - - /// Retrieve user profile image - /// - /// Retrieve the profile image file for a user. - /// - /// Parameters: - /// - /// * [String] id (required): - Future getProfileImage(String id, { Future? abortTrigger, }) async { - final response = await getProfileImageWithHttpInfo(id, abortTrigger: abortTrigger,); - 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), 'MultipartFile',) as MultipartFile; - - } - return null; - } - - /// Retrieve a user - /// - /// Retrieve a specific user by their ID. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - Future getUserWithHttpInfo(String id, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/users/{id}' - .replaceAll('{id}', id); - - // 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, - abortTrigger: abortTrigger, - ); - } - - /// Retrieve a user - /// - /// Retrieve a specific user by their ID. - /// - /// Parameters: - /// - /// * [String] id (required): - Future getUser(String id, { Future? abortTrigger, }) async { - final response = await getUserWithHttpInfo(id, abortTrigger: abortTrigger,); - 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), 'UserResponseDto',) as UserResponseDto; - - } - return null; - } - - /// 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({ Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/users/me/license'; - - // 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, - abortTrigger: abortTrigger, - ); - } - - /// Retrieve user product key - /// - /// Retrieve information about whether the current user has a registered product key. - Future getUserLicense({ Future? abortTrigger, }) async { - final response = await getUserLicenseWithHttpInfo(abortTrigger: abortTrigger,); - 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), 'UserLicense',) as UserLicense; - - } - return null; - } - - /// Retrieve user onboarding - /// - /// Retrieve the onboarding status of the current user. - /// - /// Note: This method returns the HTTP [Response]. - Future getUserOnboardingWithHttpInfo({ Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/users/me/onboarding'; - - // 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, - abortTrigger: abortTrigger, - ); - } - - /// Retrieve user onboarding - /// - /// Retrieve the onboarding status of the current user. - Future getUserOnboarding({ Future? abortTrigger, }) async { - final response = await getUserOnboardingWithHttpInfo(abortTrigger: abortTrigger,); - 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), 'OnboardingResponseDto',) as OnboardingResponseDto; - - } - return null; - } - - /// Get all users - /// - /// Retrieve a list of all users on the server. - /// - /// Note: This method returns the HTTP [Response]. - Future searchUsersWithHttpInfo({ Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/users'; - - // 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, - abortTrigger: abortTrigger, - ); - } - - /// Get all users - /// - /// Retrieve a list of all users on the server. - Future?> searchUsers({ Future? abortTrigger, }) async { - final response = await searchUsersWithHttpInfo(abortTrigger: abortTrigger,); - 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; - } - - /// Set user product key - /// - /// Register a product key for the current user. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [LicenseKeyDto] licenseKeyDto (required): - Future setUserLicenseWithHttpInfo(LicenseKeyDto licenseKeyDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/users/me/license'; - - // ignore: prefer_final_locals - Object? postBody = licenseKeyDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'PUT', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Set user product key - /// - /// Register a product key for the current user. - /// - /// Parameters: - /// - /// * [LicenseKeyDto] licenseKeyDto (required): - Future setUserLicense(LicenseKeyDto licenseKeyDto, { Future? abortTrigger, }) async { - final response = await setUserLicenseWithHttpInfo(licenseKeyDto, abortTrigger: abortTrigger,); - 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), 'UserLicense',) as UserLicense; - - } - return null; - } - - /// Update user onboarding - /// - /// Update the onboarding status of the current user. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [OnboardingDto] onboardingDto (required): - Future setUserOnboardingWithHttpInfo(OnboardingDto onboardingDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/users/me/onboarding'; - - // ignore: prefer_final_locals - Object? postBody = onboardingDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'PUT', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Update user onboarding - /// - /// Update the onboarding status of the current user. - /// - /// Parameters: - /// - /// * [OnboardingDto] onboardingDto (required): - Future setUserOnboarding(OnboardingDto onboardingDto, { Future? abortTrigger, }) async { - final response = await setUserOnboardingWithHttpInfo(onboardingDto, abortTrigger: abortTrigger,); - 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), 'OnboardingResponseDto',) as OnboardingResponseDto; - - } - return null; - } - - /// Update my preferences - /// - /// Update the preferences of the current user. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [UserPreferencesUpdateDto] userPreferencesUpdateDto (required): - Future updateMyPreferencesWithHttpInfo(UserPreferencesUpdateDto userPreferencesUpdateDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/users/me/preferences'; - - // ignore: prefer_final_locals - Object? postBody = userPreferencesUpdateDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'PUT', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Update my preferences - /// - /// Update the preferences of the current user. - /// - /// Parameters: - /// - /// * [UserPreferencesUpdateDto] userPreferencesUpdateDto (required): - Future updateMyPreferences(UserPreferencesUpdateDto userPreferencesUpdateDto, { Future? abortTrigger, }) async { - final response = await updateMyPreferencesWithHttpInfo(userPreferencesUpdateDto, abortTrigger: abortTrigger,); - 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), 'UserPreferencesResponseDto',) as UserPreferencesResponseDto; - - } - return null; - } - - /// Update current user - /// - /// Update the current user making the API request. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [UserUpdateMeDto] userUpdateMeDto (required): - Future updateMyUserWithHttpInfo(UserUpdateMeDto userUpdateMeDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/users/me'; - - // ignore: prefer_final_locals - Object? postBody = userUpdateMeDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'PUT', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Update current user - /// - /// Update the current user making the API request. - /// - /// Parameters: - /// - /// * [UserUpdateMeDto] userUpdateMeDto (required): - Future updateMyUser(UserUpdateMeDto userUpdateMeDto, { Future? abortTrigger, }) async { - final response = await updateMyUserWithHttpInfo(userUpdateMeDto, abortTrigger: abortTrigger,); - 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/views_api.dart b/mobile/openapi/lib/api/views_api.dart deleted file mode 100644 index 3ccbacb650..0000000000 --- a/mobile/openapi/lib/api/views_api.dart +++ /dev/null @@ -1,132 +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 ViewsApi { - ViewsApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient; - - final ApiClient apiClient; - - /// 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): - Future getAssetsByOriginalPathWithHttpInfo(String path, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/view/folder'; - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - queryParams.addAll(_queryParams('', 'path', path)); - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Retrieve assets by original path - /// - /// Retrieve assets that are children of a specific folder. - /// - /// Parameters: - /// - /// * [String] path (required): - Future?> getAssetsByOriginalPath(String path, { Future? abortTrigger, }) async { - final response = await getAssetsByOriginalPathWithHttpInfo(path, abortTrigger: abortTrigger,); - 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; - } - - /// Retrieve unique paths - /// - /// Retrieve a list of unique folder paths from asset original paths. - /// - /// Note: This method returns the HTTP [Response]. - Future getUniqueOriginalPathsWithHttpInfo({ Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/view/folder/unique-paths'; - - // 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, - abortTrigger: abortTrigger, - ); - } - - /// Retrieve unique paths - /// - /// Retrieve a list of unique folder paths from asset original paths. - Future?> getUniqueOriginalPaths({ Future? abortTrigger, }) async { - final response = await getUniqueOriginalPathsWithHttpInfo(abortTrigger: abortTrigger,); - 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; - } -} diff --git a/mobile/openapi/lib/api/workflows_api.dart b/mobile/openapi/lib/api/workflows_api.dart deleted file mode 100644 index 4b27acd624..0000000000 --- a/mobile/openapi/lib/api/workflows_api.dart +++ /dev/null @@ -1,457 +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 WorkflowsApi { - WorkflowsApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient; - - final ApiClient apiClient; - - /// Create a workflow - /// - /// Create a new workflow, the workflow can also be created with empty filters and actions. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [WorkflowCreateDto] workflowCreateDto (required): - Future createWorkflowWithHttpInfo(WorkflowCreateDto workflowCreateDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/workflows'; - - // ignore: prefer_final_locals - Object? postBody = workflowCreateDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'POST', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Create a workflow - /// - /// Create a new workflow, the workflow can also be created with empty filters and actions. - /// - /// Parameters: - /// - /// * [WorkflowCreateDto] workflowCreateDto (required): - Future createWorkflow(WorkflowCreateDto workflowCreateDto, { Future? abortTrigger, }) async { - final response = await createWorkflowWithHttpInfo(workflowCreateDto, abortTrigger: abortTrigger,); - 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), 'WorkflowResponseDto',) as WorkflowResponseDto; - - } - return null; - } - - /// Delete a workflow - /// - /// Delete a workflow by its ID. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - Future deleteWorkflowWithHttpInfo(String id, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/workflows/{id}' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'DELETE', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Delete a workflow - /// - /// Delete a workflow by its ID. - /// - /// Parameters: - /// - /// * [String] id (required): - Future deleteWorkflow(String id, { Future? abortTrigger, }) async { - final response = await deleteWorkflowWithHttpInfo(id, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - } - - /// Retrieve a workflow - /// - /// Retrieve information about a specific workflow by its ID. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - Future getWorkflowWithHttpInfo(String id, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/workflows/{id}' - .replaceAll('{id}', id); - - // 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, - abortTrigger: abortTrigger, - ); - } - - /// Retrieve a workflow - /// - /// Retrieve information about a specific workflow by its ID. - /// - /// Parameters: - /// - /// * [String] id (required): - Future getWorkflow(String id, { Future? abortTrigger, }) async { - final response = await getWorkflowWithHttpInfo(id, abortTrigger: abortTrigger,); - 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), 'WorkflowResponseDto',) as WorkflowResponseDto; - - } - return null; - } - - /// Retrieve a workflow - /// - /// Retrieve a workflow details without ids, default values, etc. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - Future getWorkflowForShareWithHttpInfo(String id, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/workflows/{id}/share' - .replaceAll('{id}', id); - - // 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, - abortTrigger: abortTrigger, - ); - } - - /// Retrieve a workflow - /// - /// Retrieve a workflow details without ids, default values, etc. - /// - /// Parameters: - /// - /// * [String] id (required): - Future getWorkflowForShare(String id, { Future? abortTrigger, }) async { - final response = await getWorkflowForShareWithHttpInfo(id, abortTrigger: abortTrigger,); - 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), 'WorkflowShareResponseDto',) as WorkflowShareResponseDto; - - } - return null; - } - - /// List all workflow triggers - /// - /// Retrieve a list of all available workflow triggers. - /// - /// Note: This method returns the HTTP [Response]. - Future getWorkflowTriggersWithHttpInfo({ Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/workflows/triggers'; - - // 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, - abortTrigger: abortTrigger, - ); - } - - /// List all workflow triggers - /// - /// Retrieve a list of all available workflow triggers. - Future?> getWorkflowTriggers({ Future? abortTrigger, }) async { - final response = await getWorkflowTriggersWithHttpInfo(abortTrigger: abortTrigger,); - 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; - } - - /// List all workflows - /// - /// Retrieve a list of workflows available to the authenticated user. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] description: - /// Workflow description - /// - /// * [bool] enabled: - /// Workflow enabled - /// - /// * [String] id: - /// Workflow ID - /// - /// * [String] name: - /// Workflow name - /// - /// * [WorkflowTrigger] trigger: - /// Workflow trigger type - Future searchWorkflowsWithHttpInfo({ String? description, bool? enabled, String? id, String? name, WorkflowTrigger? trigger, Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/workflows'; - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - if (description != null) { - queryParams.addAll(_queryParams('', 'description', description)); - } - if (enabled != null) { - queryParams.addAll(_queryParams('', 'enabled', enabled)); - } - if (id != null) { - queryParams.addAll(_queryParams('', 'id', id)); - } - if (name != null) { - queryParams.addAll(_queryParams('', 'name', name)); - } - if (trigger != null) { - queryParams.addAll(_queryParams('', 'trigger', trigger)); - } - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// List all workflows - /// - /// Retrieve a list of workflows available to the authenticated user. - /// - /// Parameters: - /// - /// * [String] description: - /// Workflow description - /// - /// * [bool] enabled: - /// Workflow enabled - /// - /// * [String] id: - /// Workflow ID - /// - /// * [String] name: - /// Workflow name - /// - /// * [WorkflowTrigger] trigger: - /// Workflow trigger type - Future?> searchWorkflows({ String? description, bool? enabled, String? id, String? name, WorkflowTrigger? trigger, Future? abortTrigger, }) async { - final response = await searchWorkflowsWithHttpInfo(description: description, enabled: enabled, id: id, name: name, trigger: trigger, abortTrigger: abortTrigger,); - 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; - } - - /// Update a workflow - /// - /// Update the information of a specific workflow by its ID. This endpoint can be used to update the workflow name, description, trigger type, filters and actions order, etc. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [WorkflowUpdateDto] workflowUpdateDto (required): - Future updateWorkflowWithHttpInfo(String id, WorkflowUpdateDto workflowUpdateDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/workflows/{id}' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody = workflowUpdateDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'PUT', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Update a workflow - /// - /// Update the information of a specific workflow by its ID. This endpoint can be used to update the workflow name, description, trigger type, filters and actions order, etc. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [WorkflowUpdateDto] workflowUpdateDto (required): - Future updateWorkflow(String id, WorkflowUpdateDto workflowUpdateDto, { Future? abortTrigger, }) async { - final response = await updateWorkflowWithHttpInfo(id, workflowUpdateDto, abortTrigger: abortTrigger,); - 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), 'WorkflowResponseDto',) as WorkflowResponseDto; - - } - return null; - } -} diff --git a/mobile/openapi/lib/api_client.dart b/mobile/openapi/lib/api_client.dart deleted file mode 100644 index 90bff45431..0000000000 --- a/mobile/openapi/lib/api_client.dart +++ /dev/null @@ -1,993 +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 ApiClient { - ApiClient({this.basePath = '/api', this.authentication,}); - - String basePath; - final Authentication? authentication; - - var _client = Client(); - final _defaultHeaderMap = {}; - - /// Returns the current HTTP [Client] instance to use in this class. - /// - /// The return value is guaranteed to never be null. - Client get client => _client; - - /// Requests to use a new HTTP [Client] in this class. - set client(Client newClient) { - _client = newClient; - } - - Map get defaultHeaderMap => _defaultHeaderMap; - - void addDefaultHeader(String key, String value) { - _defaultHeaderMap[key] = value; - } - - // We don't use a Map for queryParams. - // If collectionFormat is 'multi', a key might appear multiple times. - Future invokeAPI( - String path, - String method, - List queryParams, - Object? body, - Map headerParams, - Map formParams, - String? contentType, { - Future? abortTrigger, - }) async { - await authentication?.applyToParams(queryParams, headerParams); - - headerParams.addAll(_defaultHeaderMap); - if (contentType != null) { - headerParams['Content-Type'] = contentType; - } - - final urlEncodedQueryParams = queryParams.map((param) => '$param'); - final queryString = urlEncodedQueryParams.isNotEmpty ? '?${urlEncodedQueryParams.join('&')}' : ''; - final uri = Uri.parse('$basePath$path$queryString'); - - try { - // Special case for uploading a single file which isn't a 'multipart/form-data'. - if ( - body is MultipartFile && (contentType == null || - !contentType.toLowerCase().startsWith('multipart/form-data')) - ) { - final request = AbortableStreamedRequest(method, uri, abortTrigger: abortTrigger); - request.headers.addAll(headerParams); - request.contentLength = body.length; - body.finalize().listen( - request.sink.add, - onDone: request.sink.close, - // ignore: avoid_types_on_closure_parameters - onError: (Object error, StackTrace trace) => request.sink.close(), - cancelOnError: true, - ); - final response = await _client.send(request); - return Response.fromStream(response); - } - - if (body is MultipartRequest) { - final request = AbortableMultipartRequest(method, uri, abortTrigger: abortTrigger); - request.fields.addAll(body.fields); - request.files.addAll(body.files); - request.headers.addAll(body.headers); - request.headers.addAll(headerParams); - final response = await _client.send(request); - return Response.fromStream(response); - } - - final msgBody = contentType == 'application/x-www-form-urlencoded' - ? formParams - : await serializeAsync(body); - final nullableHeaderParams = headerParams.isEmpty ? null : headerParams; - - final request = AbortableRequest(method, uri, abortTrigger: abortTrigger); - if (nullableHeaderParams != null) { - request.headers.addAll(nullableHeaderParams); - } - if (msgBody is String) { - request.body = msgBody; - } else if (msgBody is List) { - request.bodyBytes = msgBody; - } else if (msgBody is Map) { - request.bodyFields = msgBody; - } - final response = await _client.send(request); - return Response.fromStream(response); - } on SocketException catch (error, trace) { - throw ApiException.withInner( - HttpStatus.badRequest, - 'Socket operation failed: $method $path', - error, - trace, - ); - } on TlsException catch (error, trace) { - throw ApiException.withInner( - HttpStatus.badRequest, - 'TLS/SSL communication failed: $method $path', - error, - trace, - ); - } on IOException catch (error, trace) { - throw ApiException.withInner( - HttpStatus.badRequest, - 'I/O operation failed: $method $path', - error, - trace, - ); - } on ClientException catch (error, trace) { - throw ApiException.withInner( - HttpStatus.badRequest, - 'HTTP connection failed: $method $path', - error, - trace, - ); - } on Exception catch (error, trace) { - throw ApiException.withInner( - HttpStatus.badRequest, - 'Exception occurred: $method $path', - error, - trace, - ); - } - } - - Future deserializeAsync(String value, String targetType, {bool growable = false,}) => - // ignore: deprecated_member_use_from_same_package - deserialize(value, targetType, growable: growable); - - @Deprecated('Scheduled for removal in OpenAPI Generator 6.x. Use deserializeAsync() instead.') - Future deserialize(String value, String targetType, {bool growable = false,}) async { - // Remove all spaces. Necessary for regular expressions as well. - targetType = targetType.replaceAll(' ', ''); // ignore: parameter_assignments - - // If the expected target type is String, nothing to do... - return targetType == 'String' - ? value - : fromJson(await compute((String j) => json.decode(j), value), targetType, growable: growable); - } - - // ignore: deprecated_member_use_from_same_package - Future serializeAsync(Object? value) async => serialize(value); - - @Deprecated('Scheduled for removal in OpenAPI Generator 6.x. Use serializeAsync() instead.') - String serialize(Object? value) => value == null ? '' : json.encode(value); - - /// Returns a native instance of an OpenAPI class matching the [specified type][targetType]. - static dynamic fromJson(dynamic value, String targetType, {bool growable = false,}) { - try { - switch (targetType) { - case 'String': - return value is String ? value : value.toString(); - case 'int': - return value is int ? value : int.parse('$value'); - case 'double': - return value is double ? value : double.parse('$value'); - case 'bool': - if (value is bool) { - return value; - } - final valueString = '$value'.toLowerCase(); - return valueString == 'true' || valueString == '1'; - case 'DateTime': - return value is DateTime ? value : DateTime.tryParse(value); - case 'ActivityCreateDto': - return ActivityCreateDto.fromJson(value); - case 'ActivityResponseDto': - return ActivityResponseDto.fromJson(value); - case 'ActivityStatisticsResponseDto': - return ActivityStatisticsResponseDto.fromJson(value); - case 'AddUsersDto': - return AddUsersDto.fromJson(value); - case 'AdminOnboardingUpdateDto': - return AdminOnboardingUpdateDto.fromJson(value); - case 'AlbumResponseDto': - return AlbumResponseDto.fromJson(value); - case 'AlbumStatisticsResponseDto': - return AlbumStatisticsResponseDto.fromJson(value); - case 'AlbumUserAddDto': - return AlbumUserAddDto.fromJson(value); - case 'AlbumUserCreateDto': - return AlbumUserCreateDto.fromJson(value); - case 'AlbumUserResponseDto': - return AlbumUserResponseDto.fromJson(value); - case 'AlbumUserRole': - return AlbumUserRoleTypeTransformer().decode(value); - case 'AlbumsAddAssetsDto': - return AlbumsAddAssetsDto.fromJson(value); - case 'AlbumsAddAssetsResponseDto': - return AlbumsAddAssetsResponseDto.fromJson(value); - case 'AlbumsResponse': - return AlbumsResponse.fromJson(value); - case 'AlbumsUpdate': - return AlbumsUpdate.fromJson(value); - case 'ApiKeyCreateDto': - return ApiKeyCreateDto.fromJson(value); - case 'ApiKeyCreateResponseDto': - return ApiKeyCreateResponseDto.fromJson(value); - case 'ApiKeyResponseDto': - return ApiKeyResponseDto.fromJson(value); - case 'ApiKeyUpdateDto': - return ApiKeyUpdateDto.fromJson(value); - case 'AssetBulkDeleteDto': - return AssetBulkDeleteDto.fromJson(value); - case 'AssetBulkUpdateDto': - return AssetBulkUpdateDto.fromJson(value); - case 'AssetBulkUploadCheckDto': - return AssetBulkUploadCheckDto.fromJson(value); - case 'AssetBulkUploadCheckItem': - return AssetBulkUploadCheckItem.fromJson(value); - case 'AssetBulkUploadCheckResponseDto': - return AssetBulkUploadCheckResponseDto.fromJson(value); - case 'AssetBulkUploadCheckResult': - return AssetBulkUploadCheckResult.fromJson(value); - case 'AssetCopyDto': - return AssetCopyDto.fromJson(value); - case 'AssetEditAction': - return AssetEditActionTypeTransformer().decode(value); - case 'AssetEditActionItemDto': - return AssetEditActionItemDto.fromJson(value); - case 'AssetEditActionItemDtoParameters': - return AssetEditActionItemDtoParameters.fromJson(value); - case 'AssetEditActionItemResponseDto': - return AssetEditActionItemResponseDto.fromJson(value); - case 'AssetEditsCreateDto': - return AssetEditsCreateDto.fromJson(value); - case 'AssetEditsResponseDto': - return AssetEditsResponseDto.fromJson(value); - case 'AssetFaceCreateDto': - return AssetFaceCreateDto.fromJson(value); - case 'AssetFaceDeleteDto': - return AssetFaceDeleteDto.fromJson(value); - case 'AssetFaceResponseDto': - return AssetFaceResponseDto.fromJson(value); - case 'AssetFaceUpdateDto': - return AssetFaceUpdateDto.fromJson(value); - case 'AssetFaceUpdateItem': - return AssetFaceUpdateItem.fromJson(value); - case 'AssetIdErrorReason': - return AssetIdErrorReasonTypeTransformer().decode(value); - case 'AssetIdsDto': - return AssetIdsDto.fromJson(value); - case 'AssetIdsResponseDto': - return AssetIdsResponseDto.fromJson(value); - case 'AssetJobName': - return AssetJobNameTypeTransformer().decode(value); - case 'AssetJobsDto': - return AssetJobsDto.fromJson(value); - case 'AssetMediaResponseDto': - return AssetMediaResponseDto.fromJson(value); - case 'AssetMediaSize': - return AssetMediaSizeTypeTransformer().decode(value); - case 'AssetMediaStatus': - return AssetMediaStatusTypeTransformer().decode(value); - case 'AssetMetadataBulkDeleteDto': - return AssetMetadataBulkDeleteDto.fromJson(value); - case 'AssetMetadataBulkDeleteItemDto': - return AssetMetadataBulkDeleteItemDto.fromJson(value); - case 'AssetMetadataBulkResponseDto': - return AssetMetadataBulkResponseDto.fromJson(value); - case 'AssetMetadataBulkUpsertDto': - return AssetMetadataBulkUpsertDto.fromJson(value); - case 'AssetMetadataBulkUpsertItemDto': - return AssetMetadataBulkUpsertItemDto.fromJson(value); - case 'AssetMetadataResponseDto': - return AssetMetadataResponseDto.fromJson(value); - case 'AssetMetadataUpsertDto': - return AssetMetadataUpsertDto.fromJson(value); - case 'AssetMetadataUpsertItemDto': - return AssetMetadataUpsertItemDto.fromJson(value); - case 'AssetOcrResponseDto': - return AssetOcrResponseDto.fromJson(value); - case 'AssetOrder': - return AssetOrderTypeTransformer().decode(value); - case 'AssetOrderBy': - return AssetOrderByTypeTransformer().decode(value); - case 'AssetRejectReason': - return AssetRejectReasonTypeTransformer().decode(value); - case 'AssetResponseDto': - return AssetResponseDto.fromJson(value); - case 'AssetStackResponseDto': - return AssetStackResponseDto.fromJson(value); - case 'AssetStatsResponseDto': - return AssetStatsResponseDto.fromJson(value); - case 'AssetTypeEnum': - return AssetTypeEnumTypeTransformer().decode(value); - case 'AssetUploadAction': - return AssetUploadActionTypeTransformer().decode(value); - case 'AssetVisibility': - return AssetVisibilityTypeTransformer().decode(value); - case 'AudioCodec': - return AudioCodecTypeTransformer().decode(value); - case 'AuthStatusResponseDto': - return AuthStatusResponseDto.fromJson(value); - case 'AvatarUpdate': - return AvatarUpdate.fromJson(value); - case 'BulkIdErrorReason': - return BulkIdErrorReasonTypeTransformer().decode(value); - case 'BulkIdResponseDto': - return BulkIdResponseDto.fromJson(value); - case 'BulkIdsDto': - return BulkIdsDto.fromJson(value); - case 'CLIPConfig': - return CLIPConfig.fromJson(value); - case 'CQMode': - return CQModeTypeTransformer().decode(value); - case 'CalendarHeatmapResponseDto': - return CalendarHeatmapResponseDto.fromJson(value); - case 'CalendarHeatmapResponseDtoSeriesInner': - return CalendarHeatmapResponseDtoSeriesInner.fromJson(value); - case 'CalendarHeatmapType': - return CalendarHeatmapTypeTypeTransformer().decode(value); - case 'CastResponse': - return CastResponse.fromJson(value); - case 'CastUpdate': - return CastUpdate.fromJson(value); - case 'ChangePasswordDto': - return ChangePasswordDto.fromJson(value); - case 'Colorspace': - return ColorspaceTypeTransformer().decode(value); - case 'ContributorCountResponseDto': - return ContributorCountResponseDto.fromJson(value); - case 'CreateAlbumDto': - return CreateAlbumDto.fromJson(value); - case 'CreateLibraryDto': - return CreateLibraryDto.fromJson(value); - case 'CreateProfileImageResponseDto': - return CreateProfileImageResponseDto.fromJson(value); - case 'CropParameters': - return CropParameters.fromJson(value); - case 'DatabaseBackupConfig': - return DatabaseBackupConfig.fromJson(value); - case 'DatabaseBackupDeleteDto': - return DatabaseBackupDeleteDto.fromJson(value); - case 'DatabaseBackupDto': - return DatabaseBackupDto.fromJson(value); - case 'DatabaseBackupListResponseDto': - return DatabaseBackupListResponseDto.fromJson(value); - case 'DownloadArchiveDto': - return DownloadArchiveDto.fromJson(value); - case 'DownloadArchiveInfo': - return DownloadArchiveInfo.fromJson(value); - case 'DownloadInfoDto': - return DownloadInfoDto.fromJson(value); - case 'DownloadResponse': - return DownloadResponse.fromJson(value); - case 'DownloadResponseDto': - return DownloadResponseDto.fromJson(value); - case 'DownloadUpdate': - return DownloadUpdate.fromJson(value); - case 'DuplicateDetectionConfig': - return DuplicateDetectionConfig.fromJson(value); - case 'DuplicateResolveDto': - return DuplicateResolveDto.fromJson(value); - case 'DuplicateResolveGroupDto': - return DuplicateResolveGroupDto.fromJson(value); - case 'DuplicateResponseDto': - return DuplicateResponseDto.fromJson(value); - case 'EmailNotificationsResponse': - return EmailNotificationsResponse.fromJson(value); - case 'EmailNotificationsUpdate': - return EmailNotificationsUpdate.fromJson(value); - case 'ExifResponseDto': - return ExifResponseDto.fromJson(value); - case 'FaceDto': - return FaceDto.fromJson(value); - case 'FacialRecognitionConfig': - return FacialRecognitionConfig.fromJson(value); - case 'FoldersResponse': - return FoldersResponse.fromJson(value); - case 'FoldersUpdate': - return FoldersUpdate.fromJson(value); - case 'ImageFormat': - return ImageFormatTypeTransformer().decode(value); - case 'IntegrityReport': - return IntegrityReportTypeTransformer().decode(value); - case 'IntegrityReportResponseDto': - return IntegrityReportResponseDto.fromJson(value); - case 'IntegrityReportResponseDtoItemsInner': - return IntegrityReportResponseDtoItemsInner.fromJson(value); - case 'IntegrityReportSummaryResponseDto': - return IntegrityReportSummaryResponseDto.fromJson(value); - case 'JobCreateDto': - return JobCreateDto.fromJson(value); - case 'JobName': - return JobNameTypeTransformer().decode(value); - case 'JobSettingsDto': - return JobSettingsDto.fromJson(value); - case 'LibraryResponseDto': - return LibraryResponseDto.fromJson(value); - case 'LibraryStatsResponseDto': - return LibraryStatsResponseDto.fromJson(value); - case 'LicenseKeyDto': - return LicenseKeyDto.fromJson(value); - case 'LogLevel': - return LogLevelTypeTransformer().decode(value); - case 'LoginCredentialDto': - return LoginCredentialDto.fromJson(value); - case 'LoginResponseDto': - return LoginResponseDto.fromJson(value); - case 'LogoutResponseDto': - return LogoutResponseDto.fromJson(value); - case 'MachineLearningAvailabilityChecksDto': - return MachineLearningAvailabilityChecksDto.fromJson(value); - case 'MaintenanceAction': - return MaintenanceActionTypeTransformer().decode(value); - case 'MaintenanceAuthDto': - return MaintenanceAuthDto.fromJson(value); - case 'MaintenanceDetectInstallResponseDto': - return MaintenanceDetectInstallResponseDto.fromJson(value); - case 'MaintenanceDetectInstallStorageFolderDto': - return MaintenanceDetectInstallStorageFolderDto.fromJson(value); - case 'MaintenanceLoginDto': - return MaintenanceLoginDto.fromJson(value); - case 'MaintenanceStatusResponseDto': - return MaintenanceStatusResponseDto.fromJson(value); - case 'ManualJobName': - return ManualJobNameTypeTransformer().decode(value); - case 'MapMarkerResponseDto': - return MapMarkerResponseDto.fromJson(value); - case 'MapReverseGeocodeResponseDto': - return MapReverseGeocodeResponseDto.fromJson(value); - case 'MemoriesResponse': - return MemoriesResponse.fromJson(value); - case 'MemoriesUpdate': - return MemoriesUpdate.fromJson(value); - case 'MemoryCreateDto': - return MemoryCreateDto.fromJson(value); - case 'MemoryResponseDto': - return MemoryResponseDto.fromJson(value); - case 'MemorySearchOrder': - return MemorySearchOrderTypeTransformer().decode(value); - case 'MemoryStatisticsResponseDto': - return MemoryStatisticsResponseDto.fromJson(value); - case 'MemoryType': - return MemoryTypeTypeTransformer().decode(value); - case 'MemoryUpdateDto': - return MemoryUpdateDto.fromJson(value); - case 'MergePersonDto': - return MergePersonDto.fromJson(value); - case 'MetadataSearchDto': - return MetadataSearchDto.fromJson(value); - case 'MirrorAxis': - return MirrorAxisTypeTransformer().decode(value); - case 'MirrorParameters': - return MirrorParameters.fromJson(value); - case 'NotificationCreateDto': - return NotificationCreateDto.fromJson(value); - case 'NotificationDeleteAllDto': - return NotificationDeleteAllDto.fromJson(value); - case 'NotificationDto': - return NotificationDto.fromJson(value); - case 'NotificationLevel': - return NotificationLevelTypeTransformer().decode(value); - case 'NotificationType': - return NotificationTypeTypeTransformer().decode(value); - case 'NotificationUpdateAllDto': - return NotificationUpdateAllDto.fromJson(value); - case 'NotificationUpdateDto': - return NotificationUpdateDto.fromJson(value); - case 'OAuthAuthorizeResponseDto': - return OAuthAuthorizeResponseDto.fromJson(value); - case 'OAuthCallbackDto': - return OAuthCallbackDto.fromJson(value); - case 'OAuthConfigDto': - return OAuthConfigDto.fromJson(value); - case 'OAuthTokenEndpointAuthMethod': - return OAuthTokenEndpointAuthMethodTypeTransformer().decode(value); - case 'OcrConfig': - return OcrConfig.fromJson(value); - case 'OnThisDayDto': - return OnThisDayDto.fromJson(value); - case 'OnboardingDto': - return OnboardingDto.fromJson(value); - case 'OnboardingResponseDto': - return OnboardingResponseDto.fromJson(value); - case 'PartnerCreateDto': - return PartnerCreateDto.fromJson(value); - case 'PartnerDirection': - return PartnerDirectionTypeTransformer().decode(value); - case 'PartnerResponseDto': - return PartnerResponseDto.fromJson(value); - case 'PartnerUpdateDto': - return PartnerUpdateDto.fromJson(value); - case 'PeopleResponse': - return PeopleResponse.fromJson(value); - case 'PeopleResponseDto': - return PeopleResponseDto.fromJson(value); - case 'PeopleUpdate': - return PeopleUpdate.fromJson(value); - case 'PeopleUpdateDto': - return PeopleUpdateDto.fromJson(value); - case 'PeopleUpdateItem': - return PeopleUpdateItem.fromJson(value); - case 'Permission': - return PermissionTypeTransformer().decode(value); - case 'PersonCreateDto': - return PersonCreateDto.fromJson(value); - case 'PersonResponseDto': - return PersonResponseDto.fromJson(value); - case 'PersonStatisticsResponseDto': - return PersonStatisticsResponseDto.fromJson(value); - case 'PersonUpdateDto': - return PersonUpdateDto.fromJson(value); - case 'PinCodeChangeDto': - return PinCodeChangeDto.fromJson(value); - case 'PinCodeResetDto': - return PinCodeResetDto.fromJson(value); - case 'PinCodeSetupDto': - return PinCodeSetupDto.fromJson(value); - case 'PlacesResponseDto': - return PlacesResponseDto.fromJson(value); - case 'PluginMethodResponseDto': - return PluginMethodResponseDto.fromJson(value); - case 'PluginResponseDto': - return PluginResponseDto.fromJson(value); - case 'PluginTemplateResponseDto': - return PluginTemplateResponseDto.fromJson(value); - case 'PluginTemplateStepResponseDto': - return PluginTemplateStepResponseDto.fromJson(value); - case 'PurchaseResponse': - return PurchaseResponse.fromJson(value); - case 'PurchaseUpdate': - return PurchaseUpdate.fromJson(value); - case 'QueueCommand': - return QueueCommandTypeTransformer().decode(value); - case 'QueueCommandDto': - return QueueCommandDto.fromJson(value); - case 'QueueDeleteDto': - return QueueDeleteDto.fromJson(value); - case 'QueueJobResponseDto': - return QueueJobResponseDto.fromJson(value); - case 'QueueJobStatus': - return QueueJobStatusTypeTransformer().decode(value); - case 'QueueName': - return QueueNameTypeTransformer().decode(value); - case 'QueueResponseDto': - return QueueResponseDto.fromJson(value); - case 'QueueResponseLegacyDto': - return QueueResponseLegacyDto.fromJson(value); - case 'QueueStatisticsDto': - return QueueStatisticsDto.fromJson(value); - case 'QueueStatusLegacyDto': - return QueueStatusLegacyDto.fromJson(value); - case 'QueueUpdateDto': - return QueueUpdateDto.fromJson(value); - case 'QueuesResponseLegacyDto': - return QueuesResponseLegacyDto.fromJson(value); - case 'RandomSearchDto': - return RandomSearchDto.fromJson(value); - case 'RatingsResponse': - return RatingsResponse.fromJson(value); - case 'RatingsUpdate': - return RatingsUpdate.fromJson(value); - case 'ReactionLevel': - return ReactionLevelTypeTransformer().decode(value); - case 'ReactionType': - return ReactionTypeTypeTransformer().decode(value); - case 'ReleaseChannel': - return ReleaseChannelTypeTransformer().decode(value); - case 'ReleaseEventV1': - return ReleaseEventV1.fromJson(value); - case 'ReleaseType': - return ReleaseTypeTypeTransformer().decode(value); - case 'ReverseGeocodingStateResponseDto': - return ReverseGeocodingStateResponseDto.fromJson(value); - case 'RotateParameters': - return RotateParameters.fromJson(value); - case 'SearchAlbumResponseDto': - return SearchAlbumResponseDto.fromJson(value); - case 'SearchAssetResponseDto': - return SearchAssetResponseDto.fromJson(value); - case 'SearchExploreItem': - return SearchExploreItem.fromJson(value); - case 'SearchExploreResponseDto': - return SearchExploreResponseDto.fromJson(value); - case 'SearchFacetCountResponseDto': - return SearchFacetCountResponseDto.fromJson(value); - case 'SearchFacetResponseDto': - return SearchFacetResponseDto.fromJson(value); - case 'SearchResponseDto': - return SearchResponseDto.fromJson(value); - case 'SearchStatisticsResponseDto': - return SearchStatisticsResponseDto.fromJson(value); - case 'SearchSuggestionType': - return SearchSuggestionTypeTypeTransformer().decode(value); - case 'ServerAboutResponseDto': - return ServerAboutResponseDto.fromJson(value); - case 'ServerApkLinksDto': - return ServerApkLinksDto.fromJson(value); - case 'ServerConfigDto': - return ServerConfigDto.fromJson(value); - case 'ServerFeaturesDto': - return ServerFeaturesDto.fromJson(value); - case 'ServerMediaTypesResponseDto': - return ServerMediaTypesResponseDto.fromJson(value); - case 'ServerPingResponse': - return ServerPingResponse.fromJson(value); - case 'ServerStatsResponseDto': - return ServerStatsResponseDto.fromJson(value); - case 'ServerStorageResponseDto': - return ServerStorageResponseDto.fromJson(value); - case 'ServerVersionHistoryResponseDto': - return ServerVersionHistoryResponseDto.fromJson(value); - case 'ServerVersionResponseDto': - return ServerVersionResponseDto.fromJson(value); - case 'SessionCreateDto': - return SessionCreateDto.fromJson(value); - case 'SessionCreateResponseDto': - return SessionCreateResponseDto.fromJson(value); - case 'SessionResponseDto': - return SessionResponseDto.fromJson(value); - case 'SessionUnlockDto': - return SessionUnlockDto.fromJson(value); - case 'SessionUpdateDto': - return SessionUpdateDto.fromJson(value); - case 'SetMaintenanceModeDto': - return SetMaintenanceModeDto.fromJson(value); - case 'SharedLinkCreateDto': - return SharedLinkCreateDto.fromJson(value); - case 'SharedLinkEditDto': - return SharedLinkEditDto.fromJson(value); - case 'SharedLinkLoginDto': - return SharedLinkLoginDto.fromJson(value); - case 'SharedLinkResponseDto': - return SharedLinkResponseDto.fromJson(value); - case 'SharedLinkType': - return SharedLinkTypeTypeTransformer().decode(value); - case 'SharedLinksResponse': - return SharedLinksResponse.fromJson(value); - case 'SharedLinksUpdate': - return SharedLinksUpdate.fromJson(value); - case 'SignUpDto': - return SignUpDto.fromJson(value); - case 'SmartSearchDto': - return SmartSearchDto.fromJson(value); - case 'SourceType': - return SourceTypeTypeTransformer().decode(value); - case 'StackCreateDto': - return StackCreateDto.fromJson(value); - case 'StackResponseDto': - return StackResponseDto.fromJson(value); - case 'StackUpdateDto': - return StackUpdateDto.fromJson(value); - case 'StatisticsSearchDto': - return StatisticsSearchDto.fromJson(value); - case 'StorageFolder': - return StorageFolderTypeTransformer().decode(value); - case 'SyncAckDeleteDto': - return SyncAckDeleteDto.fromJson(value); - case 'SyncAckDto': - return SyncAckDto.fromJson(value); - case 'SyncAckSetDto': - return SyncAckSetDto.fromJson(value); - case 'SyncAlbumDeleteV1': - return SyncAlbumDeleteV1.fromJson(value); - case 'SyncAlbumToAssetDeleteV1': - return SyncAlbumToAssetDeleteV1.fromJson(value); - case 'SyncAlbumToAssetV1': - return SyncAlbumToAssetV1.fromJson(value); - case 'SyncAlbumUserDeleteV1': - return SyncAlbumUserDeleteV1.fromJson(value); - case 'SyncAlbumUserV1': - return SyncAlbumUserV1.fromJson(value); - case 'SyncAlbumV1': - return SyncAlbumV1.fromJson(value); - case 'SyncAlbumV2': - return SyncAlbumV2.fromJson(value); - case 'SyncAssetDeleteV1': - return SyncAssetDeleteV1.fromJson(value); - case 'SyncAssetEditDeleteV1': - return SyncAssetEditDeleteV1.fromJson(value); - case 'SyncAssetEditV1': - return SyncAssetEditV1.fromJson(value); - case 'SyncAssetExifV1': - return SyncAssetExifV1.fromJson(value); - case 'SyncAssetFaceDeleteV1': - return SyncAssetFaceDeleteV1.fromJson(value); - case 'SyncAssetFaceV1': - return SyncAssetFaceV1.fromJson(value); - case 'SyncAssetFaceV2': - return SyncAssetFaceV2.fromJson(value); - case 'SyncAssetMetadataDeleteV1': - return SyncAssetMetadataDeleteV1.fromJson(value); - case 'SyncAssetMetadataV1': - return SyncAssetMetadataV1.fromJson(value); - case 'SyncAssetOcrDeleteV1': - return SyncAssetOcrDeleteV1.fromJson(value); - case 'SyncAssetOcrV1': - return SyncAssetOcrV1.fromJson(value); - case 'SyncAssetV1': - return SyncAssetV1.fromJson(value); - case 'SyncAssetV2': - return SyncAssetV2.fromJson(value); - case 'SyncAuthUserV1': - return SyncAuthUserV1.fromJson(value); - case 'SyncEntityType': - return SyncEntityTypeTypeTransformer().decode(value); - case 'SyncMemoryAssetDeleteV1': - return SyncMemoryAssetDeleteV1.fromJson(value); - case 'SyncMemoryAssetV1': - return SyncMemoryAssetV1.fromJson(value); - case 'SyncMemoryDeleteV1': - return SyncMemoryDeleteV1.fromJson(value); - case 'SyncMemoryV1': - return SyncMemoryV1.fromJson(value); - case 'SyncPartnerDeleteV1': - return SyncPartnerDeleteV1.fromJson(value); - case 'SyncPartnerV1': - return SyncPartnerV1.fromJson(value); - case 'SyncPersonDeleteV1': - return SyncPersonDeleteV1.fromJson(value); - case 'SyncPersonV1': - return SyncPersonV1.fromJson(value); - case 'SyncRequestType': - return SyncRequestTypeTypeTransformer().decode(value); - case 'SyncStackDeleteV1': - return SyncStackDeleteV1.fromJson(value); - case 'SyncStackV1': - return SyncStackV1.fromJson(value); - case 'SyncStreamDto': - return SyncStreamDto.fromJson(value); - case 'SyncUserDeleteV1': - return SyncUserDeleteV1.fromJson(value); - case 'SyncUserMetadataDeleteV1': - return SyncUserMetadataDeleteV1.fromJson(value); - case 'SyncUserMetadataV1': - return SyncUserMetadataV1.fromJson(value); - case 'SyncUserV1': - return SyncUserV1.fromJson(value); - case 'SystemConfigBackupsDto': - return SystemConfigBackupsDto.fromJson(value); - case 'SystemConfigDto': - return SystemConfigDto.fromJson(value); - case 'SystemConfigFFmpegDto': - return SystemConfigFFmpegDto.fromJson(value); - case 'SystemConfigFFmpegRealtimeDto': - return SystemConfigFFmpegRealtimeDto.fromJson(value); - case 'SystemConfigFacesDto': - return SystemConfigFacesDto.fromJson(value); - case 'SystemConfigGeneratedFullsizeImageDto': - return SystemConfigGeneratedFullsizeImageDto.fromJson(value); - case 'SystemConfigGeneratedImageDto': - return SystemConfigGeneratedImageDto.fromJson(value); - case 'SystemConfigImageDto': - return SystemConfigImageDto.fromJson(value); - case 'SystemConfigIntegrityChecks': - return SystemConfigIntegrityChecks.fromJson(value); - case 'SystemConfigIntegrityChecksumJob': - return SystemConfigIntegrityChecksumJob.fromJson(value); - case 'SystemConfigIntegrityJob': - return SystemConfigIntegrityJob.fromJson(value); - case 'SystemConfigJobDto': - return SystemConfigJobDto.fromJson(value); - case 'SystemConfigLibraryDto': - return SystemConfigLibraryDto.fromJson(value); - case 'SystemConfigLibraryScanDto': - return SystemConfigLibraryScanDto.fromJson(value); - case 'SystemConfigLibraryWatchDto': - return SystemConfigLibraryWatchDto.fromJson(value); - case 'SystemConfigLoggingDto': - return SystemConfigLoggingDto.fromJson(value); - case 'SystemConfigMachineLearningDto': - return SystemConfigMachineLearningDto.fromJson(value); - case 'SystemConfigMapDto': - return SystemConfigMapDto.fromJson(value); - case 'SystemConfigMetadataDto': - return SystemConfigMetadataDto.fromJson(value); - case 'SystemConfigNewVersionCheckDto': - return SystemConfigNewVersionCheckDto.fromJson(value); - case 'SystemConfigNightlyTasksDto': - return SystemConfigNightlyTasksDto.fromJson(value); - case 'SystemConfigNotificationsDto': - return SystemConfigNotificationsDto.fromJson(value); - case 'SystemConfigOAuthDto': - return SystemConfigOAuthDto.fromJson(value); - case 'SystemConfigPasswordLoginDto': - return SystemConfigPasswordLoginDto.fromJson(value); - case 'SystemConfigReverseGeocodingDto': - return SystemConfigReverseGeocodingDto.fromJson(value); - case 'SystemConfigServerDto': - return SystemConfigServerDto.fromJson(value); - case 'SystemConfigSmtpDto': - return SystemConfigSmtpDto.fromJson(value); - case 'SystemConfigSmtpTransportDto': - return SystemConfigSmtpTransportDto.fromJson(value); - case 'SystemConfigStorageTemplateDto': - return SystemConfigStorageTemplateDto.fromJson(value); - case 'SystemConfigTemplateEmailsDto': - return SystemConfigTemplateEmailsDto.fromJson(value); - case 'SystemConfigTemplateStorageOptionDto': - return SystemConfigTemplateStorageOptionDto.fromJson(value); - case 'SystemConfigTemplatesDto': - return SystemConfigTemplatesDto.fromJson(value); - case 'SystemConfigThemeDto': - return SystemConfigThemeDto.fromJson(value); - case 'SystemConfigTrashDto': - return SystemConfigTrashDto.fromJson(value); - case 'SystemConfigUserDto': - return SystemConfigUserDto.fromJson(value); - case 'TagBulkAssetsDto': - return TagBulkAssetsDto.fromJson(value); - case 'TagBulkAssetsResponseDto': - return TagBulkAssetsResponseDto.fromJson(value); - case 'TagCreateDto': - return TagCreateDto.fromJson(value); - case 'TagResponseDto': - return TagResponseDto.fromJson(value); - case 'TagUpdateDto': - return TagUpdateDto.fromJson(value); - case 'TagUpsertDto': - return TagUpsertDto.fromJson(value); - case 'TagsResponse': - return TagsResponse.fromJson(value); - case 'TagsUpdate': - return TagsUpdate.fromJson(value); - case 'TemplateDto': - return TemplateDto.fromJson(value); - case 'TemplateResponseDto': - return TemplateResponseDto.fromJson(value); - case 'TestEmailResponseDto': - return TestEmailResponseDto.fromJson(value); - case 'TimeBucketAssetResponseDto': - return TimeBucketAssetResponseDto.fromJson(value); - case 'TimeBucketsResponseDto': - return TimeBucketsResponseDto.fromJson(value); - case 'ToneMapping': - return ToneMappingTypeTransformer().decode(value); - case 'TranscodeHWAccel': - return TranscodeHWAccelTypeTransformer().decode(value); - case 'TranscodePolicy': - return TranscodePolicyTypeTransformer().decode(value); - case 'TrashResponseDto': - return TrashResponseDto.fromJson(value); - case 'UpdateAlbumDto': - return UpdateAlbumDto.fromJson(value); - case 'UpdateAlbumUserDto': - return UpdateAlbumUserDto.fromJson(value); - case 'UpdateAssetDto': - return UpdateAssetDto.fromJson(value); - case 'UpdateLibraryDto': - return UpdateLibraryDto.fromJson(value); - case 'UsageByUserDto': - return UsageByUserDto.fromJson(value); - case 'UserAdminCreateDto': - return UserAdminCreateDto.fromJson(value); - case 'UserAdminDeleteDto': - return UserAdminDeleteDto.fromJson(value); - case 'UserAdminResponseDto': - return UserAdminResponseDto.fromJson(value); - case 'UserAdminUpdateDto': - return UserAdminUpdateDto.fromJson(value); - case 'UserAvatarColor': - return UserAvatarColorTypeTransformer().decode(value); - case 'UserLicense': - return UserLicense.fromJson(value); - case 'UserMetadataKey': - return UserMetadataKeyTypeTransformer().decode(value); - case 'UserPreferencesResponseDto': - return UserPreferencesResponseDto.fromJson(value); - case 'UserPreferencesUpdateDto': - return UserPreferencesUpdateDto.fromJson(value); - case 'UserResponseDto': - return UserResponseDto.fromJson(value); - case 'UserStatus': - return UserStatusTypeTransformer().decode(value); - case 'UserUpdateMeDto': - return UserUpdateMeDto.fromJson(value); - case 'ValidateAccessTokenResponseDto': - return ValidateAccessTokenResponseDto.fromJson(value); - case 'ValidateLibraryDto': - return ValidateLibraryDto.fromJson(value); - case 'ValidateLibraryImportPathResponseDto': - return ValidateLibraryImportPathResponseDto.fromJson(value); - case 'ValidateLibraryResponseDto': - return ValidateLibraryResponseDto.fromJson(value); - case 'VersionCheckStateResponseDto': - return VersionCheckStateResponseDto.fromJson(value); - case 'VideoCodec': - return VideoCodecTypeTransformer().decode(value); - case 'VideoContainer': - return VideoContainerTypeTransformer().decode(value); - case 'WorkflowCreateDto': - return WorkflowCreateDto.fromJson(value); - case 'WorkflowResponseDto': - return WorkflowResponseDto.fromJson(value); - case 'WorkflowShareResponseDto': - return WorkflowShareResponseDto.fromJson(value); - case 'WorkflowShareStepDto': - return WorkflowShareStepDto.fromJson(value); - case 'WorkflowStepDto': - return WorkflowStepDto.fromJson(value); - case 'WorkflowTrigger': - return WorkflowTriggerTypeTransformer().decode(value); - case 'WorkflowTriggerResponseDto': - return WorkflowTriggerResponseDto.fromJson(value); - case 'WorkflowType': - return WorkflowTypeTypeTransformer().decode(value); - case 'WorkflowUpdateDto': - return WorkflowUpdateDto.fromJson(value); - default: - dynamic match; - if (value is List && (match = _regList.firstMatch(targetType)?.group(1)) != null) { - return value - .map((dynamic v) => fromJson(v, match, growable: growable,)) - .toList(growable: growable); - } - if (value is Set && (match = _regSet.firstMatch(targetType)?.group(1)) != null) { - return value - .map((dynamic v) => fromJson(v, match, growable: growable,)) - .toSet(); - } - if (value is Map && (match = _regMap.firstMatch(targetType)?.group(1)) != null) { - return Map.fromIterables( - value.keys.cast(), - value.values.map((dynamic v) => fromJson(v, match, growable: growable,)), - ); - } - } - } on Exception catch (error, trace) { - throw ApiException.withInner(HttpStatus.internalServerError, 'Exception during deserialization.', error, trace,); - } - throw ApiException(HttpStatus.internalServerError, 'Could not find a suitable class for deserialization',); - } -} - -/// Primarily intended for use in an isolate. -class DeserializationMessage { - const DeserializationMessage({ - required this.json, - required this.targetType, - this.growable = false, - }); - - /// The JSON value to deserialize. - final String json; - - /// Target type to deserialize to. - final String targetType; - - /// Whether to make deserialized lists or maps growable. - final bool growable; -} - -/// Primarily intended for use in an isolate. -Future decodeAsync(DeserializationMessage message) async { - // Remove all spaces. Necessary for regular expressions as well. - final targetType = message.targetType.replaceAll(' ', ''); - - // If the expected target type is String, nothing to do... - return targetType == 'String' - ? message.json - : json.decode(message.json); -} - -/// Primarily intended for use in an isolate. -Future deserializeAsync(DeserializationMessage message) async { - // Remove all spaces. Necessary for regular expressions as well. - final targetType = message.targetType.replaceAll(' ', ''); - - // If the expected target type is String, nothing to do... - return targetType == 'String' - ? message.json - : ApiClient.fromJson( - json.decode(message.json), - targetType, - growable: message.growable, - ); -} - -/// Primarily intended for use in an isolate. -Future serializeAsync(Object? value) async => value == null ? '' : json.encode(value); diff --git a/mobile/openapi/lib/api_exception.dart b/mobile/openapi/lib/api_exception.dart deleted file mode 100644 index 53077d686d..0000000000 --- a/mobile/openapi/lib/api_exception.dart +++ /dev/null @@ -1,33 +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 ApiException implements Exception { - ApiException(this.code, this.message); - - ApiException.withInner(this.code, this.message, this.innerException, this.stackTrace); - - int code = 0; - String? message; - Exception? innerException; - StackTrace? stackTrace; - - @override - String toString() { - if (message == null) { - return 'ApiException'; - } - if (innerException == null) { - return 'ApiException $code: $message'; - } - return 'ApiException $code: $message (Inner exception: $innerException)\n\n$stackTrace'; - } -} diff --git a/mobile/openapi/lib/api_helper.dart b/mobile/openapi/lib/api_helper.dart deleted file mode 100644 index a985dece82..0000000000 --- a/mobile/openapi/lib/api_helper.dart +++ /dev/null @@ -1,266 +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 QueryParam { - const QueryParam(this.name, this.value); - - final String name; - final String value; - - @override - String toString() => '${Uri.encodeQueryComponent(name)}=${Uri.encodeQueryComponent(value)}'; -} - -// Ported from the Java version. -Iterable _queryParams(String collectionFormat, String name, dynamic value,) { - // Assertions to run in debug mode only. - assert(name.isNotEmpty, 'Parameter cannot be an empty string.'); - - final params = []; - - if (value is List) { - if (collectionFormat == 'multi') { - return value.map((dynamic v) => QueryParam(name, parameterToString(v)),); - } - - // Default collection format is 'csv'. - if (collectionFormat.isEmpty) { - collectionFormat = 'csv'; // ignore: parameter_assignments - } - - final delimiter = _delimiters[collectionFormat] ?? ','; - - params.add(QueryParam(name, value.map(parameterToString).join(delimiter),)); - } else if (value != null) { - params.add(QueryParam(name, parameterToString(value))); - } - - return params; -} - -/// Format the given parameter object into a [String]. -String parameterToString(dynamic value) { - if (value == null) { - return ''; - } - if (value is DateTime) { - return value.toUtc().toIso8601String(); - } - if (value is AlbumUserRole) { - return AlbumUserRoleTypeTransformer().encode(value).toString(); - } - if (value is AssetEditAction) { - return AssetEditActionTypeTransformer().encode(value).toString(); - } - if (value is AssetIdErrorReason) { - return AssetIdErrorReasonTypeTransformer().encode(value).toString(); - } - if (value is AssetJobName) { - return AssetJobNameTypeTransformer().encode(value).toString(); - } - if (value is AssetMediaSize) { - return AssetMediaSizeTypeTransformer().encode(value).toString(); - } - if (value is AssetMediaStatus) { - return AssetMediaStatusTypeTransformer().encode(value).toString(); - } - if (value is AssetOrder) { - return AssetOrderTypeTransformer().encode(value).toString(); - } - if (value is AssetOrderBy) { - return AssetOrderByTypeTransformer().encode(value).toString(); - } - if (value is AssetRejectReason) { - return AssetRejectReasonTypeTransformer().encode(value).toString(); - } - if (value is AssetTypeEnum) { - return AssetTypeEnumTypeTransformer().encode(value).toString(); - } - if (value is AssetUploadAction) { - return AssetUploadActionTypeTransformer().encode(value).toString(); - } - if (value is AssetVisibility) { - return AssetVisibilityTypeTransformer().encode(value).toString(); - } - if (value is AudioCodec) { - return AudioCodecTypeTransformer().encode(value).toString(); - } - if (value is BulkIdErrorReason) { - return BulkIdErrorReasonTypeTransformer().encode(value).toString(); - } - if (value is CQMode) { - return CQModeTypeTransformer().encode(value).toString(); - } - if (value is CalendarHeatmapType) { - return CalendarHeatmapTypeTypeTransformer().encode(value).toString(); - } - if (value is Colorspace) { - return ColorspaceTypeTransformer().encode(value).toString(); - } - if (value is ImageFormat) { - return ImageFormatTypeTransformer().encode(value).toString(); - } - if (value is IntegrityReport) { - return IntegrityReportTypeTransformer().encode(value).toString(); - } - if (value is JobName) { - return JobNameTypeTransformer().encode(value).toString(); - } - if (value is LogLevel) { - return LogLevelTypeTransformer().encode(value).toString(); - } - if (value is MaintenanceAction) { - return MaintenanceActionTypeTransformer().encode(value).toString(); - } - 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(); - } - if (value is MirrorAxis) { - return MirrorAxisTypeTransformer().encode(value).toString(); - } - if (value is NotificationLevel) { - return NotificationLevelTypeTransformer().encode(value).toString(); - } - if (value is NotificationType) { - return NotificationTypeTypeTransformer().encode(value).toString(); - } - if (value is OAuthTokenEndpointAuthMethod) { - return OAuthTokenEndpointAuthMethodTypeTransformer().encode(value).toString(); - } - if (value is PartnerDirection) { - return PartnerDirectionTypeTransformer().encode(value).toString(); - } - if (value is Permission) { - return PermissionTypeTransformer().encode(value).toString(); - } - if (value is QueueCommand) { - return QueueCommandTypeTransformer().encode(value).toString(); - } - if (value is QueueJobStatus) { - return QueueJobStatusTypeTransformer().encode(value).toString(); - } - if (value is QueueName) { - return QueueNameTypeTransformer().encode(value).toString(); - } - if (value is ReactionLevel) { - return ReactionLevelTypeTransformer().encode(value).toString(); - } - if (value is ReactionType) { - return ReactionTypeTypeTransformer().encode(value).toString(); - } - if (value is ReleaseChannel) { - return ReleaseChannelTypeTransformer().encode(value).toString(); - } - if (value is ReleaseType) { - return ReleaseTypeTypeTransformer().encode(value).toString(); - } - if (value is SearchSuggestionType) { - return SearchSuggestionTypeTypeTransformer().encode(value).toString(); - } - if (value is SharedLinkType) { - return SharedLinkTypeTypeTransformer().encode(value).toString(); - } - if (value is SourceType) { - return SourceTypeTypeTransformer().encode(value).toString(); - } - if (value is StorageFolder) { - return StorageFolderTypeTransformer().encode(value).toString(); - } - if (value is SyncEntityType) { - return SyncEntityTypeTypeTransformer().encode(value).toString(); - } - if (value is SyncRequestType) { - return SyncRequestTypeTypeTransformer().encode(value).toString(); - } - if (value is ToneMapping) { - return ToneMappingTypeTransformer().encode(value).toString(); - } - if (value is TranscodeHWAccel) { - return TranscodeHWAccelTypeTransformer().encode(value).toString(); - } - if (value is TranscodePolicy) { - return TranscodePolicyTypeTransformer().encode(value).toString(); - } - if (value is UserAvatarColor) { - return UserAvatarColorTypeTransformer().encode(value).toString(); - } - if (value is UserMetadataKey) { - return UserMetadataKeyTypeTransformer().encode(value).toString(); - } - if (value is UserStatus) { - return UserStatusTypeTransformer().encode(value).toString(); - } - if (value is VideoCodec) { - return VideoCodecTypeTransformer().encode(value).toString(); - } - if (value is VideoContainer) { - return VideoContainerTypeTransformer().encode(value).toString(); - } - if (value is WorkflowTrigger) { - return WorkflowTriggerTypeTransformer().encode(value).toString(); - } - if (value is WorkflowType) { - return WorkflowTypeTypeTransformer().encode(value).toString(); - } - return value.toString(); -} - -/// Returns the decoded body as UTF-8 if the given headers indicate an 'application/json' -/// content type. Otherwise, returns the decoded body as decoded by dart:http package. -Future _decodeBodyBytes(Response response) async { - final contentType = response.headers['content-type']; - return contentType != null && contentType.toLowerCase().startsWith('application/json') - ? response.bodyBytes.isEmpty ? '' : utf8.decode(response.bodyBytes) - : response.body; -} - -/// Returns a valid [T] value found at the specified Map [key], null otherwise. -T? mapValueOfType(dynamic map, String key) { - final dynamic value = map is Map ? map[key] : null; - if (T == double && value is int) { - return value.toDouble() as T; - } - return value is T ? value : null; -} - -/// Returns a valid Map found at the specified Map [key], null otherwise. -Map? mapCastOfType(dynamic map, String key) { - final dynamic value = map is Map ? map[key] : null; - return value is Map ? value.cast() : null; -} - -/// Returns a valid [DateTime] found at the specified Map [key], null otherwise. -DateTime? mapDateTime(dynamic map, String key, [String? pattern]) { - final dynamic value = map is Map ? map[key] : null; - if (value != null) { - int? millis; - if (value is int) { - millis = value; - } else if (value is String) { - if (_isEpochMarker(pattern)) { - millis = int.tryParse(value); - } else { - return DateTime.tryParse(value); - } - } - if (millis != null) { - return DateTime.fromMillisecondsSinceEpoch(millis, isUtc: true); - } - } - return null; -} diff --git a/mobile/openapi/lib/auth/api_key_auth.dart b/mobile/openapi/lib/auth/api_key_auth.dart deleted file mode 100644 index 6c5621798f..0000000000 --- a/mobile/openapi/lib/auth/api_key_auth.dart +++ /dev/null @@ -1,40 +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 ApiKeyAuth implements Authentication { - ApiKeyAuth(this.location, this.paramName); - - final String location; - final String paramName; - - String apiKeyPrefix = ''; - String apiKey = ''; - - @override - Future applyToParams(List queryParams, Map headerParams,) async { - final paramValue = apiKeyPrefix.isEmpty ? apiKey : '$apiKeyPrefix $apiKey'; - - if (paramValue.isNotEmpty) { - if (location == 'query') { - queryParams.add(QueryParam(paramName, paramValue)); - } else if (location == 'header') { - headerParams[paramName] = paramValue; - } else if (location == 'cookie') { - headerParams.update( - 'Cookie', - (existingCookie) => '$existingCookie; $paramName=$paramValue', - ifAbsent: () => '$paramName=$paramValue', - ); - } - } - } -} diff --git a/mobile/openapi/lib/auth/authentication.dart b/mobile/openapi/lib/auth/authentication.dart deleted file mode 100644 index 5377fb6f34..0000000000 --- a/mobile/openapi/lib/auth/authentication.dart +++ /dev/null @@ -1,17 +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; - -// ignore: one_member_abstracts -abstract class Authentication { - /// Apply authentication settings to header and query params. - Future applyToParams(List queryParams, Map headerParams); -} diff --git a/mobile/openapi/lib/auth/http_basic_auth.dart b/mobile/openapi/lib/auth/http_basic_auth.dart deleted file mode 100644 index 5e8b1c4147..0000000000 --- a/mobile/openapi/lib/auth/http_basic_auth.dart +++ /dev/null @@ -1,26 +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 HttpBasicAuth implements Authentication { - HttpBasicAuth({this.username = '', this.password = ''}); - - String username; - String password; - - @override - Future applyToParams(List queryParams, Map headerParams,) async { - if (username.isNotEmpty && password.isNotEmpty) { - final credentials = '$username:$password'; - headerParams['Authorization'] = 'Basic ${base64.encode(utf8.encode(credentials))}'; - } - } -} diff --git a/mobile/openapi/lib/auth/http_bearer_auth.dart b/mobile/openapi/lib/auth/http_bearer_auth.dart deleted file mode 100644 index 847dc056e1..0000000000 --- a/mobile/openapi/lib/auth/http_bearer_auth.dart +++ /dev/null @@ -1,49 +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; - -typedef HttpBearerAuthProvider = String Function(); - -class HttpBearerAuth implements Authentication { - HttpBearerAuth(); - - dynamic _accessToken; - - dynamic get accessToken => _accessToken; - - set accessToken(dynamic accessToken) { - if (accessToken is! String && accessToken is! HttpBearerAuthProvider) { - throw ArgumentError('accessToken value must be either a String or a String Function().'); - } - _accessToken = accessToken; - } - - @override - Future applyToParams(List queryParams, Map headerParams,) async { - if (_accessToken == null) { - return; - } - - String accessToken; - - if (_accessToken is String) { - accessToken = _accessToken; - } else if (_accessToken is HttpBearerAuthProvider) { - accessToken = _accessToken!(); - } else { - return; - } - - if (accessToken.isNotEmpty) { - headerParams['Authorization'] = 'Bearer $accessToken'; - } - } -} diff --git a/mobile/openapi/lib/auth/oauth.dart b/mobile/openapi/lib/auth/oauth.dart deleted file mode 100644 index 73fd8202dc..0000000000 --- a/mobile/openapi/lib/auth/oauth.dart +++ /dev/null @@ -1,24 +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 OAuth implements Authentication { - OAuth({this.accessToken = ''}); - - String accessToken; - - @override - Future applyToParams(List queryParams, Map headerParams,) async { - if (accessToken.isNotEmpty) { - headerParams['Authorization'] = 'Bearer $accessToken'; - } - } -} diff --git a/mobile/openapi/lib/model/activity_create_dto.dart b/mobile/openapi/lib/model/activity_create_dto.dart deleted file mode 100644 index 7dbea342c9..0000000000 --- a/mobile/openapi/lib/model/activity_create_dto.dart +++ /dev/null @@ -1,142 +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 ActivityCreateDto { - /// Returns a new [ActivityCreateDto] instance. - ActivityCreateDto({ - required this.albumId, - this.assetId = const Optional.absent(), - this.comment = const Optional.absent(), - required this.type, - }); - - /// Album ID - String albumId; - - /// Asset ID (if activity is for an asset) - /// - /// 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. - /// - Optional assetId; - - /// Comment text (required if type is comment) - /// - /// 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. - /// - Optional comment; - - ReactionType type; - - @override - bool operator ==(Object other) => identical(this, other) || other is ActivityCreateDto && - other.albumId == albumId && - other.assetId == assetId && - other.comment == comment && - other.type == type; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (albumId.hashCode) + - (assetId == null ? 0 : assetId!.hashCode) + - (comment == null ? 0 : comment!.hashCode) + - (type.hashCode); - - @override - String toString() => 'ActivityCreateDto[albumId=$albumId, assetId=$assetId, comment=$comment, type=$type]'; - - Map toJson() { - final json = {}; - json[r'albumId'] = this.albumId; - if (this.assetId.isPresent) { - final value = this.assetId.value; - json[r'assetId'] = value; - } - if (this.comment.isPresent) { - final value = this.comment.value; - json[r'comment'] = value; - } - json[r'type'] = this.type; - return json; - } - - /// Returns a new [ActivityCreateDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static ActivityCreateDto? fromJson(dynamic value) { - upgradeDto(value, "ActivityCreateDto"); - if (value is Map) { - final json = value.cast(); - - return ActivityCreateDto( - albumId: mapValueOfType(json, r'albumId')!, - assetId: json.containsKey(r'assetId') ? Optional.present(mapValueOfType(json, r'assetId')) : const Optional.absent(), - comment: json.containsKey(r'comment') ? Optional.present(mapValueOfType(json, r'comment')) : const Optional.absent(), - type: ReactionType.fromJson(json[r'type'])!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = ActivityCreateDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = ActivityCreateDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of ActivityCreateDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = ActivityCreateDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'albumId', - 'type', - }; -} - diff --git a/mobile/openapi/lib/model/activity_response_dto.dart b/mobile/openapi/lib/model/activity_response_dto.dart deleted file mode 100644 index 15d22e56cd..0000000000 --- a/mobile/openapi/lib/model/activity_response_dto.dart +++ /dev/null @@ -1,151 +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 ActivityResponseDto { - /// Returns a new [ActivityResponseDto] instance. - ActivityResponseDto({ - required this.assetId, - this.comment = const Optional.absent(), - required this.createdAt, - required this.id, - required this.type, - required this.user, - }); - - /// Asset ID (if activity is for an asset) - String? assetId; - - /// Comment text (for comment activities) - Optional comment; - - /// Creation date - DateTime createdAt; - - /// Activity ID - String id; - - ReactionType type; - - UserResponseDto user; - - @override - bool operator ==(Object other) => identical(this, other) || other is ActivityResponseDto && - other.assetId == assetId && - other.comment == comment && - other.createdAt == createdAt && - other.id == id && - other.type == type && - other.user == user; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (assetId == null ? 0 : assetId!.hashCode) + - (comment == null ? 0 : comment!.hashCode) + - (createdAt.hashCode) + - (id.hashCode) + - (type.hashCode) + - (user.hashCode); - - @override - String toString() => 'ActivityResponseDto[assetId=$assetId, comment=$comment, createdAt=$createdAt, id=$id, type=$type, user=$user]'; - - Map toJson() { - final json = {}; - if (this.assetId != null) { - json[r'assetId'] = this.assetId; - } else { - json[r'assetId'] = null; - } - if (this.comment.isPresent) { - final value = this.comment.value; - json[r'comment'] = value; - } - json[r'createdAt'] = _isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? this.createdAt.millisecondsSinceEpoch - : this.createdAt.toUtc().toIso8601String(); - json[r'id'] = this.id; - json[r'type'] = this.type; - json[r'user'] = this.user; - return json; - } - - /// Returns a new [ActivityResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static ActivityResponseDto? fromJson(dynamic value) { - upgradeDto(value, "ActivityResponseDto"); - if (value is Map) { - final json = value.cast(); - - return ActivityResponseDto( - assetId: mapValueOfType(json, r'assetId'), - comment: json.containsKey(r'comment') ? Optional.present(mapValueOfType(json, r'comment')) : const Optional.absent(), - createdAt: mapDateTime(json, r'createdAt', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')!, - id: mapValueOfType(json, r'id')!, - type: ReactionType.fromJson(json[r'type'])!, - user: UserResponseDto.fromJson(json[r'user'])!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = ActivityResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = ActivityResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of ActivityResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = ActivityResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'assetId', - 'createdAt', - 'id', - 'type', - 'user', - }; -} - diff --git a/mobile/openapi/lib/model/activity_statistics_response_dto.dart b/mobile/openapi/lib/model/activity_statistics_response_dto.dart deleted file mode 100644 index d9ac019ee2..0000000000 --- a/mobile/openapi/lib/model/activity_statistics_response_dto.dart +++ /dev/null @@ -1,115 +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 ActivityStatisticsResponseDto { - /// Returns a new [ActivityStatisticsResponseDto] instance. - ActivityStatisticsResponseDto({ - required this.comments, - required this.likes, - }); - - /// Number of comments - /// - /// Minimum value: 0 - /// Maximum value: 9007199254740991 - int comments; - - /// Number of likes - /// - /// Minimum value: 0 - /// Maximum value: 9007199254740991 - int likes; - - @override - bool operator ==(Object other) => identical(this, other) || other is ActivityStatisticsResponseDto && - other.comments == comments && - other.likes == likes; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (comments.hashCode) + - (likes.hashCode); - - @override - String toString() => 'ActivityStatisticsResponseDto[comments=$comments, likes=$likes]'; - - Map toJson() { - final json = {}; - json[r'comments'] = this.comments; - json[r'likes'] = this.likes; - return json; - } - - /// Returns a new [ActivityStatisticsResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static ActivityStatisticsResponseDto? fromJson(dynamic value) { - upgradeDto(value, "ActivityStatisticsResponseDto"); - if (value is Map) { - final json = value.cast(); - - return ActivityStatisticsResponseDto( - comments: mapValueOfType(json, r'comments')!, - likes: mapValueOfType(json, r'likes')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = ActivityStatisticsResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = ActivityStatisticsResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of ActivityStatisticsResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = ActivityStatisticsResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'comments', - 'likes', - }; -} - diff --git a/mobile/openapi/lib/model/add_users_dto.dart b/mobile/openapi/lib/model/add_users_dto.dart deleted file mode 100644 index 1dad234811..0000000000 --- a/mobile/openapi/lib/model/add_users_dto.dart +++ /dev/null @@ -1,100 +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 AddUsersDto { - /// Returns a new [AddUsersDto] instance. - AddUsersDto({ - this.albumUsers = const [], - }); - - /// Album users to add - List albumUsers; - - @override - bool operator ==(Object other) => identical(this, other) || other is AddUsersDto && - _deepEquality.equals(other.albumUsers, albumUsers); - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (albumUsers.hashCode); - - @override - String toString() => 'AddUsersDto[albumUsers=$albumUsers]'; - - Map toJson() { - final json = {}; - json[r'albumUsers'] = this.albumUsers; - return json; - } - - /// Returns a new [AddUsersDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static AddUsersDto? fromJson(dynamic value) { - upgradeDto(value, "AddUsersDto"); - if (value is Map) { - final json = value.cast(); - - return AddUsersDto( - albumUsers: AlbumUserAddDto.listFromJson(json[r'albumUsers']), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = AddUsersDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = AddUsersDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of AddUsersDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = AddUsersDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'albumUsers', - }; -} - diff --git a/mobile/openapi/lib/model/admin_onboarding_update_dto.dart b/mobile/openapi/lib/model/admin_onboarding_update_dto.dart deleted file mode 100644 index 6daba2a796..0000000000 --- a/mobile/openapi/lib/model/admin_onboarding_update_dto.dart +++ /dev/null @@ -1,100 +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 AdminOnboardingUpdateDto { - /// Returns a new [AdminOnboardingUpdateDto] instance. - AdminOnboardingUpdateDto({ - required this.isOnboarded, - }); - - /// Is admin onboarded - bool isOnboarded; - - @override - bool operator ==(Object other) => identical(this, other) || other is AdminOnboardingUpdateDto && - other.isOnboarded == isOnboarded; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (isOnboarded.hashCode); - - @override - String toString() => 'AdminOnboardingUpdateDto[isOnboarded=$isOnboarded]'; - - Map toJson() { - final json = {}; - json[r'isOnboarded'] = this.isOnboarded; - return json; - } - - /// Returns a new [AdminOnboardingUpdateDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static AdminOnboardingUpdateDto? fromJson(dynamic value) { - upgradeDto(value, "AdminOnboardingUpdateDto"); - if (value is Map) { - final json = value.cast(); - - return AdminOnboardingUpdateDto( - isOnboarded: mapValueOfType(json, r'isOnboarded')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = AdminOnboardingUpdateDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = AdminOnboardingUpdateDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of AdminOnboardingUpdateDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = AdminOnboardingUpdateDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'isOnboarded', - }; -} - diff --git a/mobile/openapi/lib/model/album_response_dto.dart b/mobile/openapi/lib/model/album_response_dto.dart deleted file mode 100644 index a7e350fd53..0000000000 --- a/mobile/openapi/lib/model/album_response_dto.dart +++ /dev/null @@ -1,274 +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 AlbumResponseDto { - /// Returns a new [AlbumResponseDto] instance. - AlbumResponseDto({ - required this.albumName, - required this.albumThumbnailAssetId, - this.albumUsers = const [], - required this.assetCount, - this.contributorCounts = const Optional.present(const []), - required this.createdAt, - required this.description, - this.endDate = const Optional.absent(), - required this.hasSharedLink, - required this.id, - required this.isActivityEnabled, - this.lastModifiedAssetTimestamp = const Optional.absent(), - this.order = const Optional.absent(), - required this.shared, - this.startDate = const Optional.absent(), - required this.updatedAt, - }); - - /// Album name - String albumName; - - /// Thumbnail asset ID - String? albumThumbnailAssetId; - - /// First entry is always the album owner. Second entry is the auth user, if it differs from the owner. The rest are ordered alphabetically. - List albumUsers; - - /// Number of assets - /// - /// Minimum value: 0 - /// Maximum value: 9007199254740991 - int assetCount; - - Optional?> contributorCounts; - - /// Creation date - DateTime createdAt; - - /// Album description - String description; - - /// End date (latest asset) - /// - /// 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. - /// - Optional endDate; - - /// Has shared link - bool hasSharedLink; - - /// Album ID - String id; - - /// Activity feed enabled - bool isActivityEnabled; - - /// Last modified asset timestamp - /// - /// 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. - /// - Optional lastModifiedAssetTimestamp; - - /// - /// 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. - /// - Optional order; - - /// Is shared album - bool shared; - - /// Start date (earliest asset) - /// - /// 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. - /// - Optional startDate; - - /// Last update date - DateTime updatedAt; - - @override - bool operator ==(Object other) => identical(this, other) || other is AlbumResponseDto && - other.albumName == albumName && - other.albumThumbnailAssetId == albumThumbnailAssetId && - _deepEquality.equals(other.albumUsers, albumUsers) && - other.assetCount == assetCount && - _deepEquality.equals(other.contributorCounts, contributorCounts) && - other.createdAt == createdAt && - other.description == description && - other.endDate == endDate && - other.hasSharedLink == hasSharedLink && - other.id == id && - other.isActivityEnabled == isActivityEnabled && - other.lastModifiedAssetTimestamp == lastModifiedAssetTimestamp && - other.order == order && - other.shared == shared && - other.startDate == startDate && - other.updatedAt == updatedAt; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (albumName.hashCode) + - (albumThumbnailAssetId == null ? 0 : albumThumbnailAssetId!.hashCode) + - (albumUsers.hashCode) + - (assetCount.hashCode) + - (contributorCounts.hashCode) + - (createdAt.hashCode) + - (description.hashCode) + - (endDate == null ? 0 : endDate!.hashCode) + - (hasSharedLink.hashCode) + - (id.hashCode) + - (isActivityEnabled.hashCode) + - (lastModifiedAssetTimestamp == null ? 0 : lastModifiedAssetTimestamp!.hashCode) + - (order == null ? 0 : order!.hashCode) + - (shared.hashCode) + - (startDate == null ? 0 : startDate!.hashCode) + - (updatedAt.hashCode); - - @override - String toString() => 'AlbumResponseDto[albumName=$albumName, albumThumbnailAssetId=$albumThumbnailAssetId, albumUsers=$albumUsers, assetCount=$assetCount, contributorCounts=$contributorCounts, createdAt=$createdAt, description=$description, endDate=$endDate, hasSharedLink=$hasSharedLink, id=$id, isActivityEnabled=$isActivityEnabled, lastModifiedAssetTimestamp=$lastModifiedAssetTimestamp, order=$order, shared=$shared, startDate=$startDate, updatedAt=$updatedAt]'; - - Map toJson() { - final json = {}; - json[r'albumName'] = this.albumName; - if (this.albumThumbnailAssetId != null) { - json[r'albumThumbnailAssetId'] = this.albumThumbnailAssetId; - } else { - json[r'albumThumbnailAssetId'] = null; - } - json[r'albumUsers'] = this.albumUsers; - json[r'assetCount'] = this.assetCount; - if (this.contributorCounts.isPresent) { - final value = this.contributorCounts.value; - json[r'contributorCounts'] = value; - } - json[r'createdAt'] = this.createdAt.toUtc().toIso8601String(); - json[r'description'] = this.description; - if (this.endDate.isPresent) { - final value = this.endDate.value; - json[r'endDate'] = value == null ? null : value.toUtc().toIso8601String(); - } - json[r'hasSharedLink'] = this.hasSharedLink; - json[r'id'] = this.id; - json[r'isActivityEnabled'] = this.isActivityEnabled; - if (this.lastModifiedAssetTimestamp.isPresent) { - final value = this.lastModifiedAssetTimestamp.value; - json[r'lastModifiedAssetTimestamp'] = value == null ? null : value.toUtc().toIso8601String(); - } - if (this.order.isPresent) { - final value = this.order.value; - json[r'order'] = value; - } - json[r'shared'] = this.shared; - if (this.startDate.isPresent) { - final value = this.startDate.value; - json[r'startDate'] = value == null ? null : value.toUtc().toIso8601String(); - } - json[r'updatedAt'] = this.updatedAt.toUtc().toIso8601String(); - return json; - } - - /// Returns a new [AlbumResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static AlbumResponseDto? fromJson(dynamic value) { - upgradeDto(value, "AlbumResponseDto"); - if (value is Map) { - final json = value.cast(); - - return AlbumResponseDto( - albumName: mapValueOfType(json, r'albumName')!, - albumThumbnailAssetId: mapValueOfType(json, r'albumThumbnailAssetId'), - albumUsers: AlbumUserResponseDto.listFromJson(json[r'albumUsers']), - assetCount: mapValueOfType(json, r'assetCount')!, - contributorCounts: json.containsKey(r'contributorCounts') ? Optional.present(ContributorCountResponseDto.listFromJson(json[r'contributorCounts'])) : const Optional.absent(), - createdAt: mapDateTime(json, r'createdAt', r'')!, - description: mapValueOfType(json, r'description')!, - endDate: json.containsKey(r'endDate') ? Optional.present(mapDateTime(json, r'endDate', r'')) : const Optional.absent(), - hasSharedLink: mapValueOfType(json, r'hasSharedLink')!, - id: mapValueOfType(json, r'id')!, - isActivityEnabled: mapValueOfType(json, r'isActivityEnabled')!, - lastModifiedAssetTimestamp: json.containsKey(r'lastModifiedAssetTimestamp') ? Optional.present(mapDateTime(json, r'lastModifiedAssetTimestamp', r'')) : const Optional.absent(), - order: json.containsKey(r'order') ? Optional.present(AssetOrder.fromJson(json[r'order'])) : const Optional.absent(), - shared: mapValueOfType(json, r'shared')!, - startDate: json.containsKey(r'startDate') ? Optional.present(mapDateTime(json, r'startDate', r'')) : const Optional.absent(), - updatedAt: mapDateTime(json, r'updatedAt', r'')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = AlbumResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = AlbumResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of AlbumResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = AlbumResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'albumName', - 'albumThumbnailAssetId', - 'albumUsers', - 'assetCount', - 'createdAt', - 'description', - 'hasSharedLink', - 'id', - 'isActivityEnabled', - 'shared', - 'updatedAt', - }; -} - diff --git a/mobile/openapi/lib/model/album_statistics_response_dto.dart b/mobile/openapi/lib/model/album_statistics_response_dto.dart deleted file mode 100644 index 0f440d572d..0000000000 --- a/mobile/openapi/lib/model/album_statistics_response_dto.dart +++ /dev/null @@ -1,127 +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 AlbumStatisticsResponseDto { - /// Returns a new [AlbumStatisticsResponseDto] instance. - AlbumStatisticsResponseDto({ - required this.notShared, - required this.owned, - required this.shared, - }); - - /// Number of non-shared albums - /// - /// Minimum value: 0 - /// Maximum value: 9007199254740991 - int notShared; - - /// Number of owned albums - /// - /// Minimum value: 0 - /// Maximum value: 9007199254740991 - int owned; - - /// Number of shared albums - /// - /// Minimum value: 0 - /// Maximum value: 9007199254740991 - int shared; - - @override - bool operator ==(Object other) => identical(this, other) || other is AlbumStatisticsResponseDto && - other.notShared == notShared && - other.owned == owned && - other.shared == shared; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (notShared.hashCode) + - (owned.hashCode) + - (shared.hashCode); - - @override - String toString() => 'AlbumStatisticsResponseDto[notShared=$notShared, owned=$owned, shared=$shared]'; - - Map toJson() { - final json = {}; - json[r'notShared'] = this.notShared; - json[r'owned'] = this.owned; - json[r'shared'] = this.shared; - return json; - } - - /// Returns a new [AlbumStatisticsResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static AlbumStatisticsResponseDto? fromJson(dynamic value) { - upgradeDto(value, "AlbumStatisticsResponseDto"); - if (value is Map) { - final json = value.cast(); - - return AlbumStatisticsResponseDto( - notShared: mapValueOfType(json, r'notShared')!, - owned: mapValueOfType(json, r'owned')!, - shared: mapValueOfType(json, r'shared')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = AlbumStatisticsResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = AlbumStatisticsResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of AlbumStatisticsResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = AlbumStatisticsResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'notShared', - 'owned', - 'shared', - }; -} - diff --git a/mobile/openapi/lib/model/album_user_add_dto.dart b/mobile/openapi/lib/model/album_user_add_dto.dart deleted file mode 100644 index e47ffc421c..0000000000 --- a/mobile/openapi/lib/model/album_user_add_dto.dart +++ /dev/null @@ -1,116 +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 AlbumUserAddDto { - /// Returns a new [AlbumUserAddDto] instance. - AlbumUserAddDto({ - this.role = const Optional.absent(), - required this.userId, - }); - - /// - /// 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. - /// - Optional role; - - /// User ID - String userId; - - @override - bool operator ==(Object other) => identical(this, other) || other is AlbumUserAddDto && - other.role == role && - other.userId == userId; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (role == null ? 0 : role!.hashCode) + - (userId.hashCode); - - @override - String toString() => 'AlbumUserAddDto[role=$role, userId=$userId]'; - - Map toJson() { - final json = {}; - if (this.role.isPresent) { - final value = this.role.value; - json[r'role'] = value; - } - json[r'userId'] = this.userId; - return json; - } - - /// Returns a new [AlbumUserAddDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static AlbumUserAddDto? fromJson(dynamic value) { - upgradeDto(value, "AlbumUserAddDto"); - if (value is Map) { - final json = value.cast(); - - return AlbumUserAddDto( - role: json.containsKey(r'role') ? Optional.present(AlbumUserRole.fromJson(json[r'role'])) : const Optional.absent(), - userId: mapValueOfType(json, r'userId')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = AlbumUserAddDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = AlbumUserAddDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of AlbumUserAddDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = AlbumUserAddDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'userId', - }; -} - diff --git a/mobile/openapi/lib/model/album_user_create_dto.dart b/mobile/openapi/lib/model/album_user_create_dto.dart deleted file mode 100644 index 26aa35ae78..0000000000 --- a/mobile/openapi/lib/model/album_user_create_dto.dart +++ /dev/null @@ -1,108 +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 AlbumUserCreateDto { - /// Returns a new [AlbumUserCreateDto] instance. - AlbumUserCreateDto({ - required this.role, - required this.userId, - }); - - AlbumUserRole role; - - /// User ID - String userId; - - @override - bool operator ==(Object other) => identical(this, other) || other is AlbumUserCreateDto && - other.role == role && - other.userId == userId; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (role.hashCode) + - (userId.hashCode); - - @override - String toString() => 'AlbumUserCreateDto[role=$role, userId=$userId]'; - - Map toJson() { - final json = {}; - json[r'role'] = this.role; - json[r'userId'] = this.userId; - return json; - } - - /// Returns a new [AlbumUserCreateDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static AlbumUserCreateDto? fromJson(dynamic value) { - upgradeDto(value, "AlbumUserCreateDto"); - if (value is Map) { - final json = value.cast(); - - return AlbumUserCreateDto( - role: AlbumUserRole.fromJson(json[r'role'])!, - userId: mapValueOfType(json, r'userId')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = AlbumUserCreateDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = AlbumUserCreateDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of AlbumUserCreateDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = AlbumUserCreateDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'role', - 'userId', - }; -} - diff --git a/mobile/openapi/lib/model/album_user_response_dto.dart b/mobile/openapi/lib/model/album_user_response_dto.dart deleted file mode 100644 index bbae03fba7..0000000000 --- a/mobile/openapi/lib/model/album_user_response_dto.dart +++ /dev/null @@ -1,107 +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 AlbumUserResponseDto { - /// Returns a new [AlbumUserResponseDto] instance. - AlbumUserResponseDto({ - required this.role, - required this.user, - }); - - AlbumUserRole role; - - UserResponseDto user; - - @override - bool operator ==(Object other) => identical(this, other) || other is AlbumUserResponseDto && - other.role == role && - other.user == user; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (role.hashCode) + - (user.hashCode); - - @override - String toString() => 'AlbumUserResponseDto[role=$role, user=$user]'; - - Map toJson() { - final json = {}; - json[r'role'] = this.role; - json[r'user'] = this.user; - return json; - } - - /// Returns a new [AlbumUserResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static AlbumUserResponseDto? fromJson(dynamic value) { - upgradeDto(value, "AlbumUserResponseDto"); - if (value is Map) { - final json = value.cast(); - - return AlbumUserResponseDto( - role: AlbumUserRole.fromJson(json[r'role'])!, - user: UserResponseDto.fromJson(json[r'user'])!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = AlbumUserResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = AlbumUserResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of AlbumUserResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = AlbumUserResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'role', - 'user', - }; -} - diff --git a/mobile/openapi/lib/model/album_user_role.dart b/mobile/openapi/lib/model/album_user_role.dart deleted file mode 100644 index 6fb7830115..0000000000 --- a/mobile/openapi/lib/model/album_user_role.dart +++ /dev/null @@ -1,88 +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; - -/// Album user role -class AlbumUserRole { - /// Instantiate a new enum with the provided [value]. - const AlbumUserRole._(this.value); - - /// The underlying value of this enum member. - final String value; - - @override - String toString() => value; - - String toJson() => value; - - static const editor = AlbumUserRole._(r'editor'); - static const owner = AlbumUserRole._(r'owner'); - static const viewer = AlbumUserRole._(r'viewer'); - - /// List of all possible values in this [enum][AlbumUserRole]. - static const values = [ - editor, - owner, - viewer, - ]; - - static AlbumUserRole? fromJson(dynamic value) => AlbumUserRoleTypeTransformer().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 = AlbumUserRole.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } -} - -/// Transformation class that can [encode] an instance of [AlbumUserRole] to String, -/// and [decode] dynamic data back to [AlbumUserRole]. -class AlbumUserRoleTypeTransformer { - factory AlbumUserRoleTypeTransformer() => _instance ??= const AlbumUserRoleTypeTransformer._(); - - const AlbumUserRoleTypeTransformer._(); - - String encode(AlbumUserRole data) => data.value; - - /// Decodes a [dynamic value][data] to a AlbumUserRole. - /// - /// 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. - AlbumUserRole? decode(dynamic data, {bool allowNull = true}) { - if (data != null) { - switch (data) { - case r'editor': return AlbumUserRole.editor; - case r'owner': return AlbumUserRole.owner; - case r'viewer': return AlbumUserRole.viewer; - default: - if (!allowNull) { - throw ArgumentError('Unknown enum value to decode: $data'); - } - } - } - return null; - } - - /// Singleton [AlbumUserRoleTypeTransformer] instance. - static AlbumUserRoleTypeTransformer? _instance; -} - diff --git a/mobile/openapi/lib/model/albums_add_assets_dto.dart b/mobile/openapi/lib/model/albums_add_assets_dto.dart deleted file mode 100644 index d6aa3db1c1..0000000000 --- a/mobile/openapi/lib/model/albums_add_assets_dto.dart +++ /dev/null @@ -1,113 +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 AlbumsAddAssetsDto { - /// Returns a new [AlbumsAddAssetsDto] instance. - AlbumsAddAssetsDto({ - this.albumIds = const [], - this.assetIds = const [], - }); - - /// Album IDs - List albumIds; - - /// Asset IDs - List assetIds; - - @override - bool operator ==(Object other) => identical(this, other) || other is AlbumsAddAssetsDto && - _deepEquality.equals(other.albumIds, albumIds) && - _deepEquality.equals(other.assetIds, assetIds); - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (albumIds.hashCode) + - (assetIds.hashCode); - - @override - String toString() => 'AlbumsAddAssetsDto[albumIds=$albumIds, assetIds=$assetIds]'; - - Map toJson() { - final json = {}; - json[r'albumIds'] = this.albumIds; - json[r'assetIds'] = this.assetIds; - return json; - } - - /// Returns a new [AlbumsAddAssetsDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static AlbumsAddAssetsDto? fromJson(dynamic value) { - upgradeDto(value, "AlbumsAddAssetsDto"); - if (value is Map) { - final json = value.cast(); - - return AlbumsAddAssetsDto( - albumIds: json[r'albumIds'] is Iterable - ? (json[r'albumIds'] as Iterable).cast().toList(growable: false) - : const [], - assetIds: json[r'assetIds'] is Iterable - ? (json[r'assetIds'] as Iterable).cast().toList(growable: false) - : const [], - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = AlbumsAddAssetsDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = AlbumsAddAssetsDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of AlbumsAddAssetsDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = AlbumsAddAssetsDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'albumIds', - 'assetIds', - }; -} - diff --git a/mobile/openapi/lib/model/albums_add_assets_response_dto.dart b/mobile/openapi/lib/model/albums_add_assets_response_dto.dart deleted file mode 100644 index 943bd30bc5..0000000000 --- a/mobile/openapi/lib/model/albums_add_assets_response_dto.dart +++ /dev/null @@ -1,116 +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 AlbumsAddAssetsResponseDto { - /// Returns a new [AlbumsAddAssetsResponseDto] instance. - AlbumsAddAssetsResponseDto({ - this.error = const Optional.absent(), - required this.success, - }); - - /// - /// 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. - /// - Optional error; - - /// Operation success - bool success; - - @override - bool operator ==(Object other) => identical(this, other) || other is AlbumsAddAssetsResponseDto && - other.error == error && - other.success == success; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (error == null ? 0 : error!.hashCode) + - (success.hashCode); - - @override - String toString() => 'AlbumsAddAssetsResponseDto[error=$error, success=$success]'; - - Map toJson() { - final json = {}; - if (this.error.isPresent) { - final value = this.error.value; - json[r'error'] = value; - } - json[r'success'] = this.success; - return json; - } - - /// Returns a new [AlbumsAddAssetsResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static AlbumsAddAssetsResponseDto? fromJson(dynamic value) { - upgradeDto(value, "AlbumsAddAssetsResponseDto"); - if (value is Map) { - final json = value.cast(); - - return AlbumsAddAssetsResponseDto( - error: json.containsKey(r'error') ? Optional.present(BulkIdErrorReason.fromJson(json[r'error'])) : const Optional.absent(), - success: mapValueOfType(json, r'success')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = AlbumsAddAssetsResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = AlbumsAddAssetsResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of AlbumsAddAssetsResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = AlbumsAddAssetsResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'success', - }; -} - diff --git a/mobile/openapi/lib/model/albums_response.dart b/mobile/openapi/lib/model/albums_response.dart deleted file mode 100644 index def205de90..0000000000 --- a/mobile/openapi/lib/model/albums_response.dart +++ /dev/null @@ -1,99 +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 AlbumsResponse { - /// Returns a new [AlbumsResponse] instance. - AlbumsResponse({ - required this.defaultAssetOrder, - }); - - AssetOrder defaultAssetOrder; - - @override - bool operator ==(Object other) => identical(this, other) || other is AlbumsResponse && - other.defaultAssetOrder == defaultAssetOrder; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (defaultAssetOrder.hashCode); - - @override - String toString() => 'AlbumsResponse[defaultAssetOrder=$defaultAssetOrder]'; - - Map toJson() { - final json = {}; - json[r'defaultAssetOrder'] = this.defaultAssetOrder; - return json; - } - - /// Returns a new [AlbumsResponse] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static AlbumsResponse? fromJson(dynamic value) { - upgradeDto(value, "AlbumsResponse"); - if (value is Map) { - final json = value.cast(); - - return AlbumsResponse( - defaultAssetOrder: AssetOrder.fromJson(json[r'defaultAssetOrder'])!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = AlbumsResponse.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = AlbumsResponse.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of AlbumsResponse-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = AlbumsResponse.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'defaultAssetOrder', - }; -} - diff --git a/mobile/openapi/lib/model/albums_update.dart b/mobile/openapi/lib/model/albums_update.dart deleted file mode 100644 index 46bb3ef66d..0000000000 --- a/mobile/openapi/lib/model/albums_update.dart +++ /dev/null @@ -1,107 +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 AlbumsUpdate { - /// Returns a new [AlbumsUpdate] instance. - AlbumsUpdate({ - this.defaultAssetOrder = const Optional.absent(), - }); - - /// - /// 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. - /// - Optional defaultAssetOrder; - - @override - bool operator ==(Object other) => identical(this, other) || other is AlbumsUpdate && - other.defaultAssetOrder == defaultAssetOrder; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (defaultAssetOrder == null ? 0 : defaultAssetOrder!.hashCode); - - @override - String toString() => 'AlbumsUpdate[defaultAssetOrder=$defaultAssetOrder]'; - - Map toJson() { - final json = {}; - if (this.defaultAssetOrder.isPresent) { - final value = this.defaultAssetOrder.value; - json[r'defaultAssetOrder'] = value; - } - return json; - } - - /// Returns a new [AlbumsUpdate] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static AlbumsUpdate? fromJson(dynamic value) { - upgradeDto(value, "AlbumsUpdate"); - if (value is Map) { - final json = value.cast(); - - return AlbumsUpdate( - defaultAssetOrder: json.containsKey(r'defaultAssetOrder') ? Optional.present(AssetOrder.fromJson(json[r'defaultAssetOrder'])) : const Optional.absent(), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = AlbumsUpdate.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = AlbumsUpdate.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of AlbumsUpdate-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = AlbumsUpdate.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - }; -} - diff --git a/mobile/openapi/lib/model/api_key_create_dto.dart b/mobile/openapi/lib/model/api_key_create_dto.dart deleted file mode 100644 index e1a50fecd5..0000000000 --- a/mobile/openapi/lib/model/api_key_create_dto.dart +++ /dev/null @@ -1,117 +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 ApiKeyCreateDto { - /// Returns a new [ApiKeyCreateDto] instance. - ApiKeyCreateDto({ - this.name = const Optional.absent(), - this.permissions = const [], - }); - - /// API key name - /// - /// 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. - /// - Optional name; - - /// List of permissions - List permissions; - - @override - bool operator ==(Object other) => identical(this, other) || other is ApiKeyCreateDto && - other.name == name && - _deepEquality.equals(other.permissions, permissions); - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (name == null ? 0 : name!.hashCode) + - (permissions.hashCode); - - @override - String toString() => 'ApiKeyCreateDto[name=$name, permissions=$permissions]'; - - Map toJson() { - final json = {}; - if (this.name.isPresent) { - final value = this.name.value; - json[r'name'] = value; - } - json[r'permissions'] = this.permissions; - return json; - } - - /// Returns a new [ApiKeyCreateDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static ApiKeyCreateDto? fromJson(dynamic value) { - upgradeDto(value, "ApiKeyCreateDto"); - if (value is Map) { - final json = value.cast(); - - return ApiKeyCreateDto( - name: json.containsKey(r'name') ? Optional.present(mapValueOfType(json, r'name')) : const Optional.absent(), - permissions: Permission.listFromJson(json[r'permissions']), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = ApiKeyCreateDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = ApiKeyCreateDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of ApiKeyCreateDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = ApiKeyCreateDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'permissions', - }; -} - diff --git a/mobile/openapi/lib/model/api_key_create_response_dto.dart b/mobile/openapi/lib/model/api_key_create_response_dto.dart deleted file mode 100644 index 77b19ebfd2..0000000000 --- a/mobile/openapi/lib/model/api_key_create_response_dto.dart +++ /dev/null @@ -1,108 +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 ApiKeyCreateResponseDto { - /// Returns a new [ApiKeyCreateResponseDto] instance. - ApiKeyCreateResponseDto({ - required this.apiKey, - required this.secret, - }); - - ApiKeyResponseDto apiKey; - - /// API key secret (only shown once) - String secret; - - @override - bool operator ==(Object other) => identical(this, other) || other is ApiKeyCreateResponseDto && - other.apiKey == apiKey && - other.secret == secret; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (apiKey.hashCode) + - (secret.hashCode); - - @override - String toString() => 'ApiKeyCreateResponseDto[apiKey=$apiKey, secret=$secret]'; - - Map toJson() { - final json = {}; - json[r'apiKey'] = this.apiKey; - json[r'secret'] = this.secret; - return json; - } - - /// Returns a new [ApiKeyCreateResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static ApiKeyCreateResponseDto? fromJson(dynamic value) { - upgradeDto(value, "ApiKeyCreateResponseDto"); - if (value is Map) { - final json = value.cast(); - - return ApiKeyCreateResponseDto( - apiKey: ApiKeyResponseDto.fromJson(json[r'apiKey'])!, - secret: mapValueOfType(json, r'secret')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = ApiKeyCreateResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = ApiKeyCreateResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of ApiKeyCreateResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = ApiKeyCreateResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'apiKey', - 'secret', - }; -} - diff --git a/mobile/openapi/lib/model/api_key_response_dto.dart b/mobile/openapi/lib/model/api_key_response_dto.dart deleted file mode 100644 index 4005ca9f12..0000000000 --- a/mobile/openapi/lib/model/api_key_response_dto.dart +++ /dev/null @@ -1,140 +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 ApiKeyResponseDto { - /// Returns a new [ApiKeyResponseDto] instance. - ApiKeyResponseDto({ - required this.createdAt, - required this.id, - required this.name, - this.permissions = const [], - required this.updatedAt, - }); - - /// Creation date - DateTime createdAt; - - /// API key ID - String id; - - /// API key name - String name; - - /// List of permissions - List permissions; - - /// Last update date - DateTime updatedAt; - - @override - bool operator ==(Object other) => identical(this, other) || other is ApiKeyResponseDto && - other.createdAt == createdAt && - other.id == id && - other.name == name && - _deepEquality.equals(other.permissions, permissions) && - other.updatedAt == updatedAt; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (createdAt.hashCode) + - (id.hashCode) + - (name.hashCode) + - (permissions.hashCode) + - (updatedAt.hashCode); - - @override - String toString() => 'ApiKeyResponseDto[createdAt=$createdAt, id=$id, name=$name, permissions=$permissions, updatedAt=$updatedAt]'; - - Map toJson() { - final json = {}; - json[r'createdAt'] = _isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? this.createdAt.millisecondsSinceEpoch - : this.createdAt.toUtc().toIso8601String(); - json[r'id'] = this.id; - json[r'name'] = this.name; - json[r'permissions'] = this.permissions; - json[r'updatedAt'] = _isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? this.updatedAt.millisecondsSinceEpoch - : this.updatedAt.toUtc().toIso8601String(); - return json; - } - - /// Returns a new [ApiKeyResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static ApiKeyResponseDto? fromJson(dynamic value) { - upgradeDto(value, "ApiKeyResponseDto"); - if (value is Map) { - final json = value.cast(); - - return ApiKeyResponseDto( - createdAt: mapDateTime(json, r'createdAt', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')!, - id: mapValueOfType(json, r'id')!, - name: mapValueOfType(json, r'name')!, - permissions: Permission.listFromJson(json[r'permissions']), - updatedAt: mapDateTime(json, r'updatedAt', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = ApiKeyResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = ApiKeyResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of ApiKeyResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = ApiKeyResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'createdAt', - 'id', - 'name', - 'permissions', - 'updatedAt', - }; -} - diff --git a/mobile/openapi/lib/model/api_key_update_dto.dart b/mobile/openapi/lib/model/api_key_update_dto.dart deleted file mode 100644 index c6b0b5ed3c..0000000000 --- a/mobile/openapi/lib/model/api_key_update_dto.dart +++ /dev/null @@ -1,119 +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 ApiKeyUpdateDto { - /// Returns a new [ApiKeyUpdateDto] instance. - ApiKeyUpdateDto({ - this.name = const Optional.absent(), - this.permissions = const Optional.present(const []), - }); - - /// API key name - /// - /// 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. - /// - Optional name; - - /// List of permissions - Optional?> permissions; - - @override - bool operator ==(Object other) => identical(this, other) || other is ApiKeyUpdateDto && - other.name == name && - _deepEquality.equals(other.permissions, permissions); - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (name == null ? 0 : name!.hashCode) + - (permissions.hashCode); - - @override - String toString() => 'ApiKeyUpdateDto[name=$name, permissions=$permissions]'; - - Map toJson() { - final json = {}; - if (this.name.isPresent) { - final value = this.name.value; - json[r'name'] = value; - } - if (this.permissions.isPresent) { - final value = this.permissions.value; - json[r'permissions'] = value; - } - return json; - } - - /// Returns a new [ApiKeyUpdateDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static ApiKeyUpdateDto? fromJson(dynamic value) { - upgradeDto(value, "ApiKeyUpdateDto"); - if (value is Map) { - final json = value.cast(); - - return ApiKeyUpdateDto( - name: json.containsKey(r'name') ? Optional.present(mapValueOfType(json, r'name')) : const Optional.absent(), - permissions: json.containsKey(r'permissions') ? Optional.present(Permission.listFromJson(json[r'permissions'])) : const Optional.absent(), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = ApiKeyUpdateDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = ApiKeyUpdateDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of ApiKeyUpdateDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = ApiKeyUpdateDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - }; -} - diff --git a/mobile/openapi/lib/model/asset_bulk_delete_dto.dart b/mobile/openapi/lib/model/asset_bulk_delete_dto.dart deleted file mode 100644 index bfe51e1779..0000000000 --- a/mobile/openapi/lib/model/asset_bulk_delete_dto.dart +++ /dev/null @@ -1,119 +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 AssetBulkDeleteDto { - /// Returns a new [AssetBulkDeleteDto] instance. - AssetBulkDeleteDto({ - this.force = const Optional.absent(), - this.ids = const [], - }); - - /// Force delete even if in use - /// - /// 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. - /// - Optional force; - - /// IDs to process - List ids; - - @override - bool operator ==(Object other) => identical(this, other) || other is AssetBulkDeleteDto && - other.force == force && - _deepEquality.equals(other.ids, ids); - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (force == null ? 0 : force!.hashCode) + - (ids.hashCode); - - @override - String toString() => 'AssetBulkDeleteDto[force=$force, ids=$ids]'; - - Map toJson() { - final json = {}; - if (this.force.isPresent) { - final value = this.force.value; - json[r'force'] = value; - } - json[r'ids'] = this.ids; - return json; - } - - /// Returns a new [AssetBulkDeleteDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static AssetBulkDeleteDto? fromJson(dynamic value) { - upgradeDto(value, "AssetBulkDeleteDto"); - if (value is Map) { - final json = value.cast(); - - return AssetBulkDeleteDto( - force: json.containsKey(r'force') ? Optional.present(mapValueOfType(json, r'force')) : const Optional.absent(), - ids: json[r'ids'] is Iterable - ? (json[r'ids'] as Iterable).cast().toList(growable: false) - : const [], - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = AssetBulkDeleteDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = AssetBulkDeleteDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of AssetBulkDeleteDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = AssetBulkDeleteDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'ids', - }; -} - diff --git a/mobile/openapi/lib/model/asset_bulk_update_dto.dart b/mobile/openapi/lib/model/asset_bulk_update_dto.dart deleted file mode 100644 index fe34c3a14c..0000000000 --- a/mobile/openapi/lib/model/asset_bulk_update_dto.dart +++ /dev/null @@ -1,271 +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 AssetBulkUpdateDto { - /// Returns a new [AssetBulkUpdateDto] instance. - AssetBulkUpdateDto({ - this.dateTimeOriginal = const Optional.absent(), - this.dateTimeRelative = const Optional.absent(), - this.description = const Optional.absent(), - this.duplicateId = const Optional.absent(), - this.ids = const [], - this.isFavorite = const Optional.absent(), - this.latitude = const Optional.absent(), - this.longitude = const Optional.absent(), - this.rating = const Optional.absent(), - this.timeZone = const Optional.absent(), - this.visibility = const Optional.absent(), - }); - - /// Original date and time - /// - /// 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. - /// - Optional dateTimeOriginal; - - /// Relative time offset in minutes - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - /// - /// 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. - /// - Optional dateTimeRelative; - - /// Asset description - /// - /// 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. - /// - Optional description; - - /// Duplicate ID - Optional duplicateId; - - /// Asset IDs to update - List ids; - - /// Mark as favorite - /// - /// 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. - /// - Optional isFavorite; - - /// Latitude coordinate - /// - /// Minimum value: -90 - /// Maximum value: 90 - /// - /// 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. - /// - Optional latitude; - - /// Longitude coordinate - /// - /// Minimum value: -180 - /// Maximum value: 180 - /// - /// 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. - /// - Optional longitude; - - /// Rating in range [1-5] (starred), -1 (rejected), or null (unrated) - /// - /// Minimum value: -1 - /// Maximum value: 5 - Optional rating; - - /// Time zone (IANA timezone) - /// - /// 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. - /// - Optional timeZone; - - /// - /// 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. - /// - Optional visibility; - - @override - bool operator ==(Object other) => identical(this, other) || other is AssetBulkUpdateDto && - other.dateTimeOriginal == dateTimeOriginal && - other.dateTimeRelative == dateTimeRelative && - other.description == description && - other.duplicateId == duplicateId && - _deepEquality.equals(other.ids, ids) && - other.isFavorite == isFavorite && - other.latitude == latitude && - other.longitude == longitude && - other.rating == rating && - other.timeZone == timeZone && - other.visibility == visibility; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (dateTimeOriginal == null ? 0 : dateTimeOriginal!.hashCode) + - (dateTimeRelative == null ? 0 : dateTimeRelative!.hashCode) + - (description == null ? 0 : description!.hashCode) + - (duplicateId == null ? 0 : duplicateId!.hashCode) + - (ids.hashCode) + - (isFavorite == null ? 0 : isFavorite!.hashCode) + - (latitude == null ? 0 : latitude!.hashCode) + - (longitude == null ? 0 : longitude!.hashCode) + - (rating == null ? 0 : rating!.hashCode) + - (timeZone == null ? 0 : timeZone!.hashCode) + - (visibility == null ? 0 : visibility!.hashCode); - - @override - String toString() => 'AssetBulkUpdateDto[dateTimeOriginal=$dateTimeOriginal, dateTimeRelative=$dateTimeRelative, description=$description, duplicateId=$duplicateId, ids=$ids, isFavorite=$isFavorite, latitude=$latitude, longitude=$longitude, rating=$rating, timeZone=$timeZone, visibility=$visibility]'; - - Map toJson() { - final json = {}; - if (this.dateTimeOriginal.isPresent) { - final value = this.dateTimeOriginal.value; - json[r'dateTimeOriginal'] = value; - } - if (this.dateTimeRelative.isPresent) { - final value = this.dateTimeRelative.value; - json[r'dateTimeRelative'] = value; - } - if (this.description.isPresent) { - final value = this.description.value; - json[r'description'] = value; - } - if (this.duplicateId.isPresent) { - final value = this.duplicateId.value; - json[r'duplicateId'] = value; - } - json[r'ids'] = this.ids; - if (this.isFavorite.isPresent) { - final value = this.isFavorite.value; - json[r'isFavorite'] = value; - } - if (this.latitude.isPresent) { - final value = this.latitude.value; - json[r'latitude'] = value; - } - if (this.longitude.isPresent) { - final value = this.longitude.value; - json[r'longitude'] = value; - } - if (this.rating.isPresent) { - final value = this.rating.value; - json[r'rating'] = value; - } - if (this.timeZone.isPresent) { - final value = this.timeZone.value; - json[r'timeZone'] = value; - } - if (this.visibility.isPresent) { - final value = this.visibility.value; - json[r'visibility'] = value; - } - return json; - } - - /// Returns a new [AssetBulkUpdateDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static AssetBulkUpdateDto? fromJson(dynamic value) { - upgradeDto(value, "AssetBulkUpdateDto"); - if (value is Map) { - final json = value.cast(); - - return AssetBulkUpdateDto( - dateTimeOriginal: json.containsKey(r'dateTimeOriginal') ? Optional.present(mapValueOfType(json, r'dateTimeOriginal')) : const Optional.absent(), - dateTimeRelative: json.containsKey(r'dateTimeRelative') ? Optional.present(json[r'dateTimeRelative'] == null ? null : int.parse('${json[r'dateTimeRelative']}')) : const Optional.absent(), - description: json.containsKey(r'description') ? Optional.present(mapValueOfType(json, r'description')) : const Optional.absent(), - duplicateId: json.containsKey(r'duplicateId') ? Optional.present(mapValueOfType(json, r'duplicateId')) : const Optional.absent(), - ids: json[r'ids'] is Iterable - ? (json[r'ids'] as Iterable).cast().toList(growable: false) - : const [], - isFavorite: json.containsKey(r'isFavorite') ? Optional.present(mapValueOfType(json, r'isFavorite')) : const Optional.absent(), - latitude: json.containsKey(r'latitude') ? Optional.present(json[r'latitude'] == null ? null : num.parse('${json[r'latitude']}')) : const Optional.absent(), - longitude: json.containsKey(r'longitude') ? Optional.present(json[r'longitude'] == null ? null : num.parse('${json[r'longitude']}')) : const Optional.absent(), - rating: json.containsKey(r'rating') ? Optional.present(json[r'rating'] == null ? null : int.parse('${json[r'rating']}')) : const Optional.absent(), - timeZone: json.containsKey(r'timeZone') ? Optional.present(mapValueOfType(json, r'timeZone')) : const Optional.absent(), - visibility: json.containsKey(r'visibility') ? Optional.present(AssetVisibility.fromJson(json[r'visibility'])) : const Optional.absent(), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = AssetBulkUpdateDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = AssetBulkUpdateDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of AssetBulkUpdateDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = AssetBulkUpdateDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'ids', - }; -} - diff --git a/mobile/openapi/lib/model/asset_bulk_upload_check_dto.dart b/mobile/openapi/lib/model/asset_bulk_upload_check_dto.dart deleted file mode 100644 index 66f46795e8..0000000000 --- a/mobile/openapi/lib/model/asset_bulk_upload_check_dto.dart +++ /dev/null @@ -1,100 +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 AssetBulkUploadCheckDto { - /// Returns a new [AssetBulkUploadCheckDto] instance. - AssetBulkUploadCheckDto({ - this.assets = const [], - }); - - /// Assets to check - List assets; - - @override - bool operator ==(Object other) => identical(this, other) || other is AssetBulkUploadCheckDto && - _deepEquality.equals(other.assets, assets); - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (assets.hashCode); - - @override - String toString() => 'AssetBulkUploadCheckDto[assets=$assets]'; - - Map toJson() { - final json = {}; - json[r'assets'] = this.assets; - return json; - } - - /// Returns a new [AssetBulkUploadCheckDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static AssetBulkUploadCheckDto? fromJson(dynamic value) { - upgradeDto(value, "AssetBulkUploadCheckDto"); - if (value is Map) { - final json = value.cast(); - - return AssetBulkUploadCheckDto( - assets: AssetBulkUploadCheckItem.listFromJson(json[r'assets']), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = AssetBulkUploadCheckDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = AssetBulkUploadCheckDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of AssetBulkUploadCheckDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = AssetBulkUploadCheckDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'assets', - }; -} - diff --git a/mobile/openapi/lib/model/asset_bulk_upload_check_item.dart b/mobile/openapi/lib/model/asset_bulk_upload_check_item.dart deleted file mode 100644 index a3d928b0d8..0000000000 --- a/mobile/openapi/lib/model/asset_bulk_upload_check_item.dart +++ /dev/null @@ -1,109 +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 AssetBulkUploadCheckItem { - /// Returns a new [AssetBulkUploadCheckItem] instance. - AssetBulkUploadCheckItem({ - required this.checksum, - required this.id, - }); - - /// Base64 or hex encoded SHA1 hash - String checksum; - - /// Client-side identifier echoed in the response to match results to inputs (e.g. filename) - String id; - - @override - bool operator ==(Object other) => identical(this, other) || other is AssetBulkUploadCheckItem && - other.checksum == checksum && - other.id == id; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (checksum.hashCode) + - (id.hashCode); - - @override - String toString() => 'AssetBulkUploadCheckItem[checksum=$checksum, id=$id]'; - - Map toJson() { - final json = {}; - json[r'checksum'] = this.checksum; - json[r'id'] = this.id; - return json; - } - - /// Returns a new [AssetBulkUploadCheckItem] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static AssetBulkUploadCheckItem? fromJson(dynamic value) { - upgradeDto(value, "AssetBulkUploadCheckItem"); - if (value is Map) { - final json = value.cast(); - - return AssetBulkUploadCheckItem( - checksum: mapValueOfType(json, r'checksum')!, - id: mapValueOfType(json, r'id')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = AssetBulkUploadCheckItem.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = AssetBulkUploadCheckItem.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of AssetBulkUploadCheckItem-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = AssetBulkUploadCheckItem.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'checksum', - 'id', - }; -} - diff --git a/mobile/openapi/lib/model/asset_bulk_upload_check_response_dto.dart b/mobile/openapi/lib/model/asset_bulk_upload_check_response_dto.dart deleted file mode 100644 index b37bb0de8a..0000000000 --- a/mobile/openapi/lib/model/asset_bulk_upload_check_response_dto.dart +++ /dev/null @@ -1,100 +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 AssetBulkUploadCheckResponseDto { - /// Returns a new [AssetBulkUploadCheckResponseDto] instance. - AssetBulkUploadCheckResponseDto({ - this.results = const [], - }); - - /// Upload check results - List results; - - @override - bool operator ==(Object other) => identical(this, other) || other is AssetBulkUploadCheckResponseDto && - _deepEquality.equals(other.results, results); - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (results.hashCode); - - @override - String toString() => 'AssetBulkUploadCheckResponseDto[results=$results]'; - - Map toJson() { - final json = {}; - json[r'results'] = this.results; - return json; - } - - /// Returns a new [AssetBulkUploadCheckResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static AssetBulkUploadCheckResponseDto? fromJson(dynamic value) { - upgradeDto(value, "AssetBulkUploadCheckResponseDto"); - if (value is Map) { - final json = value.cast(); - - return AssetBulkUploadCheckResponseDto( - results: AssetBulkUploadCheckResult.listFromJson(json[r'results']), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = AssetBulkUploadCheckResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = AssetBulkUploadCheckResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of AssetBulkUploadCheckResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = AssetBulkUploadCheckResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'results', - }; -} - diff --git a/mobile/openapi/lib/model/asset_bulk_upload_check_result.dart b/mobile/openapi/lib/model/asset_bulk_upload_check_result.dart deleted file mode 100644 index 572c99c11e..0000000000 --- a/mobile/openapi/lib/model/asset_bulk_upload_check_result.dart +++ /dev/null @@ -1,158 +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 AssetBulkUploadCheckResult { - /// Returns a new [AssetBulkUploadCheckResult] instance. - AssetBulkUploadCheckResult({ - required this.action, - this.assetId = const Optional.absent(), - required this.id, - this.isTrashed = const Optional.absent(), - this.reason = const Optional.absent(), - }); - - AssetUploadAction action; - - /// Existing asset ID if duplicate - /// - /// 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. - /// - Optional assetId; - - /// Client-side identifier echoed from the request to match results to inputs - String id; - - /// Whether existing asset is trashed - /// - /// 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. - /// - Optional isTrashed; - - /// - /// 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. - /// - Optional reason; - - @override - bool operator ==(Object other) => identical(this, other) || other is AssetBulkUploadCheckResult && - other.action == action && - other.assetId == assetId && - other.id == id && - other.isTrashed == isTrashed && - other.reason == reason; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (action.hashCode) + - (assetId == null ? 0 : assetId!.hashCode) + - (id.hashCode) + - (isTrashed == null ? 0 : isTrashed!.hashCode) + - (reason == null ? 0 : reason!.hashCode); - - @override - String toString() => 'AssetBulkUploadCheckResult[action=$action, assetId=$assetId, id=$id, isTrashed=$isTrashed, reason=$reason]'; - - Map toJson() { - final json = {}; - json[r'action'] = this.action; - if (this.assetId.isPresent) { - final value = this.assetId.value; - json[r'assetId'] = value; - } - json[r'id'] = this.id; - if (this.isTrashed.isPresent) { - final value = this.isTrashed.value; - json[r'isTrashed'] = value; - } - if (this.reason.isPresent) { - final value = this.reason.value; - json[r'reason'] = value; - } - return json; - } - - /// Returns a new [AssetBulkUploadCheckResult] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static AssetBulkUploadCheckResult? fromJson(dynamic value) { - upgradeDto(value, "AssetBulkUploadCheckResult"); - if (value is Map) { - final json = value.cast(); - - return AssetBulkUploadCheckResult( - action: AssetUploadAction.fromJson(json[r'action'])!, - assetId: json.containsKey(r'assetId') ? Optional.present(mapValueOfType(json, r'assetId')) : const Optional.absent(), - id: mapValueOfType(json, r'id')!, - isTrashed: json.containsKey(r'isTrashed') ? Optional.present(mapValueOfType(json, r'isTrashed')) : const Optional.absent(), - reason: json.containsKey(r'reason') ? Optional.present(AssetRejectReason.fromJson(json[r'reason'])) : const Optional.absent(), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = AssetBulkUploadCheckResult.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = AssetBulkUploadCheckResult.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of AssetBulkUploadCheckResult-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = AssetBulkUploadCheckResult.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'action', - 'id', - }; -} - diff --git a/mobile/openapi/lib/model/asset_copy_dto.dart b/mobile/openapi/lib/model/asset_copy_dto.dart deleted file mode 100644 index 577ba9ffa6..0000000000 --- a/mobile/openapi/lib/model/asset_copy_dto.dart +++ /dev/null @@ -1,164 +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 AssetCopyDto { - /// Returns a new [AssetCopyDto] instance. - AssetCopyDto({ - this.albums = const Optional.present(true), - this.favorite = const Optional.present(true), - this.sharedLinks = const Optional.present(true), - this.sidecar = const Optional.present(true), - required this.sourceId, - this.stack = const Optional.present(true), - required this.targetId, - }); - - /// Copy album associations - Optional albums; - - /// Copy favorite status - Optional favorite; - - /// Copy shared links - Optional sharedLinks; - - /// Copy sidecar file - Optional sidecar; - - /// Source asset ID - String sourceId; - - /// Copy stack association - Optional stack; - - /// Target asset ID - String targetId; - - @override - bool operator ==(Object other) => identical(this, other) || other is AssetCopyDto && - other.albums == albums && - other.favorite == favorite && - other.sharedLinks == sharedLinks && - other.sidecar == sidecar && - other.sourceId == sourceId && - other.stack == stack && - other.targetId == targetId; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (albums.hashCode) + - (favorite.hashCode) + - (sharedLinks.hashCode) + - (sidecar.hashCode) + - (sourceId.hashCode) + - (stack.hashCode) + - (targetId.hashCode); - - @override - String toString() => 'AssetCopyDto[albums=$albums, favorite=$favorite, sharedLinks=$sharedLinks, sidecar=$sidecar, sourceId=$sourceId, stack=$stack, targetId=$targetId]'; - - Map toJson() { - final json = {}; - if (this.albums.isPresent) { - final value = this.albums.value; - json[r'albums'] = value; - } - if (this.favorite.isPresent) { - final value = this.favorite.value; - json[r'favorite'] = value; - } - if (this.sharedLinks.isPresent) { - final value = this.sharedLinks.value; - json[r'sharedLinks'] = value; - } - if (this.sidecar.isPresent) { - final value = this.sidecar.value; - json[r'sidecar'] = value; - } - json[r'sourceId'] = this.sourceId; - if (this.stack.isPresent) { - final value = this.stack.value; - json[r'stack'] = value; - } - json[r'targetId'] = this.targetId; - return json; - } - - /// Returns a new [AssetCopyDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static AssetCopyDto? fromJson(dynamic value) { - upgradeDto(value, "AssetCopyDto"); - if (value is Map) { - final json = value.cast(); - - return AssetCopyDto( - albums: json.containsKey(r'albums') ? Optional.present(mapValueOfType(json, r'albums')) : const Optional.absent(), - favorite: json.containsKey(r'favorite') ? Optional.present(mapValueOfType(json, r'favorite')) : const Optional.absent(), - sharedLinks: json.containsKey(r'sharedLinks') ? Optional.present(mapValueOfType(json, r'sharedLinks')) : const Optional.absent(), - sidecar: json.containsKey(r'sidecar') ? Optional.present(mapValueOfType(json, r'sidecar')) : const Optional.absent(), - sourceId: mapValueOfType(json, r'sourceId')!, - stack: json.containsKey(r'stack') ? Optional.present(mapValueOfType(json, r'stack')) : const Optional.absent(), - targetId: mapValueOfType(json, r'targetId')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = AssetCopyDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = AssetCopyDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of AssetCopyDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = AssetCopyDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'sourceId', - 'targetId', - }; -} - diff --git a/mobile/openapi/lib/model/asset_edit_action.dart b/mobile/openapi/lib/model/asset_edit_action.dart deleted file mode 100644 index 3754cb4501..0000000000 --- a/mobile/openapi/lib/model/asset_edit_action.dart +++ /dev/null @@ -1,88 +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; - -/// Type of edit action to perform -class AssetEditAction { - /// Instantiate a new enum with the provided [value]. - const AssetEditAction._(this.value); - - /// The underlying value of this enum member. - final String value; - - @override - String toString() => value; - - String toJson() => value; - - static const crop = AssetEditAction._(r'crop'); - static const rotate = AssetEditAction._(r'rotate'); - static const mirror = AssetEditAction._(r'mirror'); - - /// List of all possible values in this [enum][AssetEditAction]. - static const values = [ - crop, - rotate, - mirror, - ]; - - static AssetEditAction? fromJson(dynamic value) => AssetEditActionTypeTransformer().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 = AssetEditAction.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } -} - -/// Transformation class that can [encode] an instance of [AssetEditAction] to String, -/// and [decode] dynamic data back to [AssetEditAction]. -class AssetEditActionTypeTransformer { - factory AssetEditActionTypeTransformer() => _instance ??= const AssetEditActionTypeTransformer._(); - - const AssetEditActionTypeTransformer._(); - - String encode(AssetEditAction data) => data.value; - - /// Decodes a [dynamic value][data] to a AssetEditAction. - /// - /// 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. - AssetEditAction? decode(dynamic data, {bool allowNull = true}) { - if (data != null) { - switch (data) { - case r'crop': return AssetEditAction.crop; - case r'rotate': return AssetEditAction.rotate; - case r'mirror': return AssetEditAction.mirror; - default: - if (!allowNull) { - throw ArgumentError('Unknown enum value to decode: $data'); - } - } - } - return null; - } - - /// Singleton [AssetEditActionTypeTransformer] instance. - static AssetEditActionTypeTransformer? _instance; -} - diff --git a/mobile/openapi/lib/model/asset_edit_action_item_dto.dart b/mobile/openapi/lib/model/asset_edit_action_item_dto.dart deleted file mode 100644 index 1b19612bf3..0000000000 --- a/mobile/openapi/lib/model/asset_edit_action_item_dto.dart +++ /dev/null @@ -1,107 +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 AssetEditActionItemDto { - /// Returns a new [AssetEditActionItemDto] instance. - AssetEditActionItemDto({ - required this.action, - required this.parameters, - }); - - AssetEditAction action; - - Map parameters; - - @override - bool operator ==(Object other) => identical(this, other) || other is AssetEditActionItemDto && - other.action == action && - other.parameters == parameters; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (action.hashCode) + - (parameters.hashCode); - - @override - String toString() => 'AssetEditActionItemDto[action=$action, parameters=$parameters]'; - - Map toJson() { - final json = {}; - json[r'action'] = this.action; - json[r'parameters'] = this.parameters; - return json; - } - - /// Returns a new [AssetEditActionItemDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static AssetEditActionItemDto? fromJson(dynamic value) { - upgradeDto(value, "AssetEditActionItemDto"); - if (value is Map) { - final json = value.cast(); - - return AssetEditActionItemDto( - action: AssetEditAction.fromJson(json[r'action'])!, - parameters: json[r'parameters'], - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = AssetEditActionItemDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = AssetEditActionItemDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of AssetEditActionItemDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = AssetEditActionItemDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'action', - 'parameters', - }; -} - diff --git a/mobile/openapi/lib/model/asset_edit_action_item_dto_parameters.dart b/mobile/openapi/lib/model/asset_edit_action_item_dto_parameters.dart deleted file mode 100644 index 6f2811e89d..0000000000 --- a/mobile/openapi/lib/model/asset_edit_action_item_dto_parameters.dart +++ /dev/null @@ -1,156 +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 AssetEditActionItemDtoParameters { - /// Returns a new [AssetEditActionItemDtoParameters] instance. - AssetEditActionItemDtoParameters({ - required this.height, - required this.width, - required this.x, - required this.y, - required this.angle, - required this.axis, - }); - - /// Height of the crop - /// - /// Minimum value: 1 - /// Maximum value: 9007199254740991 - int height; - - /// Width of the crop - /// - /// Minimum value: 1 - /// Maximum value: 9007199254740991 - int width; - - /// Top-Left X coordinate of crop - /// - /// Minimum value: 0 - /// Maximum value: 9007199254740991 - int x; - - /// Top-Left Y coordinate of crop - /// - /// Minimum value: 0 - /// Maximum value: 9007199254740991 - int y; - - /// Rotation angle in degrees - num angle; - - MirrorAxis axis; - - @override - bool operator ==(Object other) => identical(this, other) || other is AssetEditActionItemDtoParameters && - other.height == height && - other.width == width && - other.x == x && - other.y == y && - other.angle == angle && - other.axis == axis; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (height.hashCode) + - (width.hashCode) + - (x.hashCode) + - (y.hashCode) + - (angle.hashCode) + - (axis.hashCode); - - @override - String toString() => 'AssetEditActionItemDtoParameters[height=$height, width=$width, x=$x, y=$y, angle=$angle, axis=$axis]'; - - Map toJson() { - final json = {}; - json[r'height'] = this.height; - json[r'width'] = this.width; - json[r'x'] = this.x; - json[r'y'] = this.y; - json[r'angle'] = this.angle; - json[r'axis'] = this.axis; - return json; - } - - /// Returns a new [AssetEditActionItemDtoParameters] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static AssetEditActionItemDtoParameters? fromJson(dynamic value) { - upgradeDto(value, "AssetEditActionItemDtoParameters"); - if (value is Map) { - final json = value.cast(); - - return AssetEditActionItemDtoParameters( - height: mapValueOfType(json, r'height')!, - width: mapValueOfType(json, r'width')!, - x: mapValueOfType(json, r'x')!, - y: mapValueOfType(json, r'y')!, - angle: num.parse('${json[r'angle']}'), - axis: MirrorAxis.fromJson(json[r'axis'])!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = AssetEditActionItemDtoParameters.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = AssetEditActionItemDtoParameters.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of AssetEditActionItemDtoParameters-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = AssetEditActionItemDtoParameters.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'height', - 'width', - 'x', - 'y', - 'angle', - 'axis', - }; -} - diff --git a/mobile/openapi/lib/model/asset_edit_action_item_response_dto.dart b/mobile/openapi/lib/model/asset_edit_action_item_response_dto.dart deleted file mode 100644 index 3315fe8579..0000000000 --- a/mobile/openapi/lib/model/asset_edit_action_item_response_dto.dart +++ /dev/null @@ -1,116 +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 AssetEditActionItemResponseDto { - /// Returns a new [AssetEditActionItemResponseDto] instance. - AssetEditActionItemResponseDto({ - required this.action, - required this.id, - required this.parameters, - }); - - AssetEditAction action; - - /// Asset edit ID - String id; - - AssetEditActionItemDtoParameters parameters; - - @override - bool operator ==(Object other) => identical(this, other) || other is AssetEditActionItemResponseDto && - other.action == action && - other.id == id && - other.parameters == parameters; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (action.hashCode) + - (id.hashCode) + - (parameters.hashCode); - - @override - String toString() => 'AssetEditActionItemResponseDto[action=$action, id=$id, parameters=$parameters]'; - - Map toJson() { - final json = {}; - json[r'action'] = this.action; - json[r'id'] = this.id; - json[r'parameters'] = this.parameters; - return json; - } - - /// Returns a new [AssetEditActionItemResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static AssetEditActionItemResponseDto? fromJson(dynamic value) { - upgradeDto(value, "AssetEditActionItemResponseDto"); - if (value is Map) { - final json = value.cast(); - - return AssetEditActionItemResponseDto( - action: AssetEditAction.fromJson(json[r'action'])!, - id: mapValueOfType(json, r'id')!, - parameters: AssetEditActionItemDtoParameters.fromJson(json[r'parameters'])!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = AssetEditActionItemResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = AssetEditActionItemResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of AssetEditActionItemResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = AssetEditActionItemResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'action', - 'id', - 'parameters', - }; -} - diff --git a/mobile/openapi/lib/model/asset_edits_create_dto.dart b/mobile/openapi/lib/model/asset_edits_create_dto.dart deleted file mode 100644 index 9f6fc66904..0000000000 --- a/mobile/openapi/lib/model/asset_edits_create_dto.dart +++ /dev/null @@ -1,100 +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 AssetEditsCreateDto { - /// Returns a new [AssetEditsCreateDto] instance. - AssetEditsCreateDto({ - this.edits = const [], - }); - - /// List of edit actions to apply (crop, rotate, or mirror) - List edits; - - @override - bool operator ==(Object other) => identical(this, other) || other is AssetEditsCreateDto && - _deepEquality.equals(other.edits, edits); - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (edits.hashCode); - - @override - String toString() => 'AssetEditsCreateDto[edits=$edits]'; - - Map toJson() { - final json = {}; - json[r'edits'] = this.edits; - return json; - } - - /// Returns a new [AssetEditsCreateDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static AssetEditsCreateDto? fromJson(dynamic value) { - upgradeDto(value, "AssetEditsCreateDto"); - if (value is Map) { - final json = value.cast(); - - return AssetEditsCreateDto( - edits: AssetEditActionItemDto.listFromJson(json[r'edits']), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = AssetEditsCreateDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = AssetEditsCreateDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of AssetEditsCreateDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = AssetEditsCreateDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'edits', - }; -} - diff --git a/mobile/openapi/lib/model/asset_edits_response_dto.dart b/mobile/openapi/lib/model/asset_edits_response_dto.dart deleted file mode 100644 index 322b4c0a4c..0000000000 --- a/mobile/openapi/lib/model/asset_edits_response_dto.dart +++ /dev/null @@ -1,109 +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 AssetEditsResponseDto { - /// Returns a new [AssetEditsResponseDto] instance. - AssetEditsResponseDto({ - required this.assetId, - this.edits = const [], - }); - - /// Asset ID these edits belong to - String assetId; - - /// List of edit actions applied to the asset - List edits; - - @override - bool operator ==(Object other) => identical(this, other) || other is AssetEditsResponseDto && - other.assetId == assetId && - _deepEquality.equals(other.edits, edits); - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (assetId.hashCode) + - (edits.hashCode); - - @override - String toString() => 'AssetEditsResponseDto[assetId=$assetId, edits=$edits]'; - - Map toJson() { - final json = {}; - json[r'assetId'] = this.assetId; - json[r'edits'] = this.edits; - return json; - } - - /// Returns a new [AssetEditsResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static AssetEditsResponseDto? fromJson(dynamic value) { - upgradeDto(value, "AssetEditsResponseDto"); - if (value is Map) { - final json = value.cast(); - - return AssetEditsResponseDto( - assetId: mapValueOfType(json, r'assetId')!, - edits: AssetEditActionItemResponseDto.listFromJson(json[r'edits']), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = AssetEditsResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = AssetEditsResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of AssetEditsResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = AssetEditsResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'assetId', - 'edits', - }; -} - diff --git a/mobile/openapi/lib/model/asset_face_create_dto.dart b/mobile/openapi/lib/model/asset_face_create_dto.dart deleted file mode 100644 index 29c28175cd..0000000000 --- a/mobile/openapi/lib/model/asset_face_create_dto.dart +++ /dev/null @@ -1,181 +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 AssetFaceCreateDto { - /// Returns a new [AssetFaceCreateDto] instance. - AssetFaceCreateDto({ - required this.assetId, - required this.height, - required this.imageHeight, - required this.imageWidth, - required this.personId, - required this.width, - required this.x, - required this.y, - }); - - /// Asset ID - String assetId; - - /// Face bounding box height - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int height; - - /// Image height in pixels - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int imageHeight; - - /// Image width in pixels - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int imageWidth; - - /// Person ID - String personId; - - /// Face bounding box width - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int width; - - /// Face bounding box X coordinate - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int x; - - /// Face bounding box Y coordinate - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int y; - - @override - bool operator ==(Object other) => identical(this, other) || other is AssetFaceCreateDto && - other.assetId == assetId && - other.height == height && - other.imageHeight == imageHeight && - other.imageWidth == imageWidth && - other.personId == personId && - other.width == width && - other.x == x && - other.y == y; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (assetId.hashCode) + - (height.hashCode) + - (imageHeight.hashCode) + - (imageWidth.hashCode) + - (personId.hashCode) + - (width.hashCode) + - (x.hashCode) + - (y.hashCode); - - @override - String toString() => 'AssetFaceCreateDto[assetId=$assetId, height=$height, imageHeight=$imageHeight, imageWidth=$imageWidth, personId=$personId, width=$width, x=$x, y=$y]'; - - Map toJson() { - final json = {}; - json[r'assetId'] = this.assetId; - json[r'height'] = this.height; - json[r'imageHeight'] = this.imageHeight; - json[r'imageWidth'] = this.imageWidth; - json[r'personId'] = this.personId; - json[r'width'] = this.width; - json[r'x'] = this.x; - json[r'y'] = this.y; - return json; - } - - /// Returns a new [AssetFaceCreateDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static AssetFaceCreateDto? fromJson(dynamic value) { - upgradeDto(value, "AssetFaceCreateDto"); - if (value is Map) { - final json = value.cast(); - - return AssetFaceCreateDto( - assetId: mapValueOfType(json, r'assetId')!, - height: mapValueOfType(json, r'height')!, - imageHeight: mapValueOfType(json, r'imageHeight')!, - imageWidth: mapValueOfType(json, r'imageWidth')!, - personId: mapValueOfType(json, r'personId')!, - width: mapValueOfType(json, r'width')!, - x: mapValueOfType(json, r'x')!, - y: mapValueOfType(json, r'y')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = AssetFaceCreateDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = AssetFaceCreateDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of AssetFaceCreateDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = AssetFaceCreateDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'assetId', - 'height', - 'imageHeight', - 'imageWidth', - 'personId', - 'width', - 'x', - 'y', - }; -} - diff --git a/mobile/openapi/lib/model/asset_face_delete_dto.dart b/mobile/openapi/lib/model/asset_face_delete_dto.dart deleted file mode 100644 index a1f3731bea..0000000000 --- a/mobile/openapi/lib/model/asset_face_delete_dto.dart +++ /dev/null @@ -1,100 +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 AssetFaceDeleteDto { - /// Returns a new [AssetFaceDeleteDto] instance. - AssetFaceDeleteDto({ - required this.force, - }); - - /// Force delete even if person has other faces - bool force; - - @override - bool operator ==(Object other) => identical(this, other) || other is AssetFaceDeleteDto && - other.force == force; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (force.hashCode); - - @override - String toString() => 'AssetFaceDeleteDto[force=$force]'; - - Map toJson() { - final json = {}; - json[r'force'] = this.force; - return json; - } - - /// Returns a new [AssetFaceDeleteDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static AssetFaceDeleteDto? fromJson(dynamic value) { - upgradeDto(value, "AssetFaceDeleteDto"); - if (value is Map) { - final json = value.cast(); - - return AssetFaceDeleteDto( - force: mapValueOfType(json, r'force')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = AssetFaceDeleteDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = AssetFaceDeleteDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of AssetFaceDeleteDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = AssetFaceDeleteDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'force', - }; -} - diff --git a/mobile/openapi/lib/model/asset_face_response_dto.dart b/mobile/openapi/lib/model/asset_face_response_dto.dart deleted file mode 100644 index aa7b8b65f0..0000000000 --- a/mobile/openapi/lib/model/asset_face_response_dto.dart +++ /dev/null @@ -1,200 +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 AssetFaceResponseDto { - /// Returns a new [AssetFaceResponseDto] instance. - AssetFaceResponseDto({ - required this.boundingBoxX1, - required this.boundingBoxX2, - required this.boundingBoxY1, - required this.boundingBoxY2, - required this.id, - required this.imageHeight, - required this.imageWidth, - required this.person, - this.sourceType = const Optional.absent(), - }); - - /// Bounding box X1 coordinate - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int boundingBoxX1; - - /// Bounding box X2 coordinate - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int boundingBoxX2; - - /// Bounding box Y1 coordinate - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int boundingBoxY1; - - /// Bounding box Y2 coordinate - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int boundingBoxY2; - - /// Face ID - String id; - - /// Image height in pixels - /// - /// Minimum value: 0 - /// Maximum value: 9007199254740991 - int imageHeight; - - /// Image width in pixels - /// - /// Minimum value: 0 - /// Maximum value: 9007199254740991 - int imageWidth; - - PersonResponseDto? person; - - /// - /// 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. - /// - Optional sourceType; - - @override - bool operator ==(Object other) => identical(this, other) || other is AssetFaceResponseDto && - other.boundingBoxX1 == boundingBoxX1 && - other.boundingBoxX2 == boundingBoxX2 && - other.boundingBoxY1 == boundingBoxY1 && - other.boundingBoxY2 == boundingBoxY2 && - other.id == id && - other.imageHeight == imageHeight && - other.imageWidth == imageWidth && - other.person == person && - other.sourceType == sourceType; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (boundingBoxX1.hashCode) + - (boundingBoxX2.hashCode) + - (boundingBoxY1.hashCode) + - (boundingBoxY2.hashCode) + - (id.hashCode) + - (imageHeight.hashCode) + - (imageWidth.hashCode) + - (person == null ? 0 : person!.hashCode) + - (sourceType == null ? 0 : sourceType!.hashCode); - - @override - String toString() => 'AssetFaceResponseDto[boundingBoxX1=$boundingBoxX1, boundingBoxX2=$boundingBoxX2, boundingBoxY1=$boundingBoxY1, boundingBoxY2=$boundingBoxY2, id=$id, imageHeight=$imageHeight, imageWidth=$imageWidth, person=$person, sourceType=$sourceType]'; - - Map toJson() { - final json = {}; - json[r'boundingBoxX1'] = this.boundingBoxX1; - json[r'boundingBoxX2'] = this.boundingBoxX2; - json[r'boundingBoxY1'] = this.boundingBoxY1; - json[r'boundingBoxY2'] = this.boundingBoxY2; - json[r'id'] = this.id; - json[r'imageHeight'] = this.imageHeight; - json[r'imageWidth'] = this.imageWidth; - if (this.person != null) { - json[r'person'] = this.person; - } else { - json[r'person'] = null; - } - if (this.sourceType.isPresent) { - final value = this.sourceType.value; - json[r'sourceType'] = value; - } - return json; - } - - /// Returns a new [AssetFaceResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static AssetFaceResponseDto? fromJson(dynamic value) { - upgradeDto(value, "AssetFaceResponseDto"); - if (value is Map) { - final json = value.cast(); - - return AssetFaceResponseDto( - boundingBoxX1: mapValueOfType(json, r'boundingBoxX1')!, - boundingBoxX2: mapValueOfType(json, r'boundingBoxX2')!, - boundingBoxY1: mapValueOfType(json, r'boundingBoxY1')!, - boundingBoxY2: mapValueOfType(json, r'boundingBoxY2')!, - id: mapValueOfType(json, r'id')!, - imageHeight: mapValueOfType(json, r'imageHeight')!, - imageWidth: mapValueOfType(json, r'imageWidth')!, - person: PersonResponseDto.fromJson(json[r'person']), - sourceType: json.containsKey(r'sourceType') ? Optional.present(SourceType.fromJson(json[r'sourceType'])) : const Optional.absent(), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = AssetFaceResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = AssetFaceResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of AssetFaceResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = AssetFaceResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'boundingBoxX1', - 'boundingBoxX2', - 'boundingBoxY1', - 'boundingBoxY2', - 'id', - 'imageHeight', - 'imageWidth', - 'person', - }; -} - diff --git a/mobile/openapi/lib/model/asset_face_update_dto.dart b/mobile/openapi/lib/model/asset_face_update_dto.dart deleted file mode 100644 index 1027627552..0000000000 --- a/mobile/openapi/lib/model/asset_face_update_dto.dart +++ /dev/null @@ -1,100 +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 AssetFaceUpdateDto { - /// Returns a new [AssetFaceUpdateDto] instance. - AssetFaceUpdateDto({ - this.data = const [], - }); - - /// Face update items - List data; - - @override - bool operator ==(Object other) => identical(this, other) || other is AssetFaceUpdateDto && - _deepEquality.equals(other.data, data); - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (data.hashCode); - - @override - String toString() => 'AssetFaceUpdateDto[data=$data]'; - - Map toJson() { - final json = {}; - json[r'data'] = this.data; - return json; - } - - /// Returns a new [AssetFaceUpdateDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static AssetFaceUpdateDto? fromJson(dynamic value) { - upgradeDto(value, "AssetFaceUpdateDto"); - if (value is Map) { - final json = value.cast(); - - return AssetFaceUpdateDto( - data: AssetFaceUpdateItem.listFromJson(json[r'data']), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = AssetFaceUpdateDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = AssetFaceUpdateDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of AssetFaceUpdateDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = AssetFaceUpdateDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'data', - }; -} - diff --git a/mobile/openapi/lib/model/asset_face_update_item.dart b/mobile/openapi/lib/model/asset_face_update_item.dart deleted file mode 100644 index a81b21e139..0000000000 --- a/mobile/openapi/lib/model/asset_face_update_item.dart +++ /dev/null @@ -1,109 +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 AssetFaceUpdateItem { - /// Returns a new [AssetFaceUpdateItem] instance. - AssetFaceUpdateItem({ - required this.assetId, - required this.personId, - }); - - /// Asset ID - String assetId; - - /// Person ID - String personId; - - @override - bool operator ==(Object other) => identical(this, other) || other is AssetFaceUpdateItem && - other.assetId == assetId && - other.personId == personId; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (assetId.hashCode) + - (personId.hashCode); - - @override - String toString() => 'AssetFaceUpdateItem[assetId=$assetId, personId=$personId]'; - - Map toJson() { - final json = {}; - json[r'assetId'] = this.assetId; - json[r'personId'] = this.personId; - return json; - } - - /// Returns a new [AssetFaceUpdateItem] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static AssetFaceUpdateItem? fromJson(dynamic value) { - upgradeDto(value, "AssetFaceUpdateItem"); - if (value is Map) { - final json = value.cast(); - - return AssetFaceUpdateItem( - assetId: mapValueOfType(json, r'assetId')!, - personId: mapValueOfType(json, r'personId')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = AssetFaceUpdateItem.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = AssetFaceUpdateItem.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of AssetFaceUpdateItem-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = AssetFaceUpdateItem.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'assetId', - 'personId', - }; -} - diff --git a/mobile/openapi/lib/model/asset_id_error_reason.dart b/mobile/openapi/lib/model/asset_id_error_reason.dart deleted file mode 100644 index c51eab1692..0000000000 --- a/mobile/openapi/lib/model/asset_id_error_reason.dart +++ /dev/null @@ -1,88 +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; - -/// Error reason if failed -class AssetIdErrorReason { - /// Instantiate a new enum with the provided [value]. - const AssetIdErrorReason._(this.value); - - /// The underlying value of this enum member. - final String value; - - @override - String toString() => value; - - String toJson() => value; - - static const duplicate = AssetIdErrorReason._(r'duplicate'); - static const noPermission = AssetIdErrorReason._(r'no_permission'); - static const notFound = AssetIdErrorReason._(r'not_found'); - - /// List of all possible values in this [enum][AssetIdErrorReason]. - static const values = [ - duplicate, - noPermission, - notFound, - ]; - - static AssetIdErrorReason? fromJson(dynamic value) => AssetIdErrorReasonTypeTransformer().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 = AssetIdErrorReason.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } -} - -/// Transformation class that can [encode] an instance of [AssetIdErrorReason] to String, -/// and [decode] dynamic data back to [AssetIdErrorReason]. -class AssetIdErrorReasonTypeTransformer { - factory AssetIdErrorReasonTypeTransformer() => _instance ??= const AssetIdErrorReasonTypeTransformer._(); - - const AssetIdErrorReasonTypeTransformer._(); - - String encode(AssetIdErrorReason data) => data.value; - - /// Decodes a [dynamic value][data] to a AssetIdErrorReason. - /// - /// 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. - AssetIdErrorReason? decode(dynamic data, {bool allowNull = true}) { - if (data != null) { - switch (data) { - case r'duplicate': return AssetIdErrorReason.duplicate; - case r'no_permission': return AssetIdErrorReason.noPermission; - case r'not_found': return AssetIdErrorReason.notFound; - default: - if (!allowNull) { - throw ArgumentError('Unknown enum value to decode: $data'); - } - } - } - return null; - } - - /// Singleton [AssetIdErrorReasonTypeTransformer] instance. - static AssetIdErrorReasonTypeTransformer? _instance; -} - diff --git a/mobile/openapi/lib/model/asset_ids_dto.dart b/mobile/openapi/lib/model/asset_ids_dto.dart deleted file mode 100644 index 85e5cc3aee..0000000000 --- a/mobile/openapi/lib/model/asset_ids_dto.dart +++ /dev/null @@ -1,102 +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 AssetIdsDto { - /// Returns a new [AssetIdsDto] instance. - AssetIdsDto({ - this.assetIds = const [], - }); - - /// Asset IDs - List assetIds; - - @override - bool operator ==(Object other) => identical(this, other) || other is AssetIdsDto && - _deepEquality.equals(other.assetIds, assetIds); - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (assetIds.hashCode); - - @override - String toString() => 'AssetIdsDto[assetIds=$assetIds]'; - - Map toJson() { - final json = {}; - json[r'assetIds'] = this.assetIds; - return json; - } - - /// Returns a new [AssetIdsDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static AssetIdsDto? fromJson(dynamic value) { - upgradeDto(value, "AssetIdsDto"); - if (value is Map) { - final json = value.cast(); - - return AssetIdsDto( - assetIds: json[r'assetIds'] is Iterable - ? (json[r'assetIds'] as Iterable).cast().toList(growable: false) - : const [], - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = AssetIdsDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = AssetIdsDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of AssetIdsDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = AssetIdsDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'assetIds', - }; -} - diff --git a/mobile/openapi/lib/model/asset_ids_response_dto.dart b/mobile/openapi/lib/model/asset_ids_response_dto.dart deleted file mode 100644 index 6d8076952e..0000000000 --- a/mobile/openapi/lib/model/asset_ids_response_dto.dart +++ /dev/null @@ -1,125 +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 AssetIdsResponseDto { - /// Returns a new [AssetIdsResponseDto] instance. - AssetIdsResponseDto({ - required this.assetId, - this.error = const Optional.absent(), - required this.success, - }); - - /// Asset ID - String assetId; - - /// - /// 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. - /// - Optional error; - - /// Whether operation succeeded - bool success; - - @override - bool operator ==(Object other) => identical(this, other) || other is AssetIdsResponseDto && - other.assetId == assetId && - other.error == error && - other.success == success; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (assetId.hashCode) + - (error == null ? 0 : error!.hashCode) + - (success.hashCode); - - @override - String toString() => 'AssetIdsResponseDto[assetId=$assetId, error=$error, success=$success]'; - - Map toJson() { - final json = {}; - json[r'assetId'] = this.assetId; - if (this.error.isPresent) { - final value = this.error.value; - json[r'error'] = value; - } - json[r'success'] = this.success; - return json; - } - - /// Returns a new [AssetIdsResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static AssetIdsResponseDto? fromJson(dynamic value) { - upgradeDto(value, "AssetIdsResponseDto"); - if (value is Map) { - final json = value.cast(); - - return AssetIdsResponseDto( - assetId: mapValueOfType(json, r'assetId')!, - error: json.containsKey(r'error') ? Optional.present(AssetIdErrorReason.fromJson(json[r'error'])) : const Optional.absent(), - success: mapValueOfType(json, r'success')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = AssetIdsResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = AssetIdsResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of AssetIdsResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = AssetIdsResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'assetId', - 'success', - }; -} - diff --git a/mobile/openapi/lib/model/asset_job_name.dart b/mobile/openapi/lib/model/asset_job_name.dart deleted file mode 100644 index 7625677bb5..0000000000 --- a/mobile/openapi/lib/model/asset_job_name.dart +++ /dev/null @@ -1,91 +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; - -/// Job name -class AssetJobName { - /// Instantiate a new enum with the provided [value]. - const AssetJobName._(this.value); - - /// The underlying value of this enum member. - final String value; - - @override - String toString() => value; - - String toJson() => value; - - static const refreshFaces = AssetJobName._(r'refresh-faces'); - static const refreshMetadata = AssetJobName._(r'refresh-metadata'); - static const regenerateThumbnail = AssetJobName._(r'regenerate-thumbnail'); - static const transcodeVideo = AssetJobName._(r'transcode-video'); - - /// List of all possible values in this [enum][AssetJobName]. - static const values = [ - refreshFaces, - refreshMetadata, - regenerateThumbnail, - transcodeVideo, - ]; - - static AssetJobName? fromJson(dynamic value) => AssetJobNameTypeTransformer().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 = AssetJobName.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } -} - -/// Transformation class that can [encode] an instance of [AssetJobName] to String, -/// and [decode] dynamic data back to [AssetJobName]. -class AssetJobNameTypeTransformer { - factory AssetJobNameTypeTransformer() => _instance ??= const AssetJobNameTypeTransformer._(); - - const AssetJobNameTypeTransformer._(); - - String encode(AssetJobName data) => data.value; - - /// Decodes a [dynamic value][data] to a AssetJobName. - /// - /// 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. - AssetJobName? decode(dynamic data, {bool allowNull = true}) { - if (data != null) { - switch (data) { - case r'refresh-faces': return AssetJobName.refreshFaces; - case r'refresh-metadata': return AssetJobName.refreshMetadata; - case r'regenerate-thumbnail': return AssetJobName.regenerateThumbnail; - case r'transcode-video': return AssetJobName.transcodeVideo; - default: - if (!allowNull) { - throw ArgumentError('Unknown enum value to decode: $data'); - } - } - } - return null; - } - - /// Singleton [AssetJobNameTypeTransformer] instance. - static AssetJobNameTypeTransformer? _instance; -} - diff --git a/mobile/openapi/lib/model/asset_jobs_dto.dart b/mobile/openapi/lib/model/asset_jobs_dto.dart deleted file mode 100644 index 5085e3820c..0000000000 --- a/mobile/openapi/lib/model/asset_jobs_dto.dart +++ /dev/null @@ -1,110 +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 AssetJobsDto { - /// Returns a new [AssetJobsDto] instance. - AssetJobsDto({ - this.assetIds = const [], - required this.name, - }); - - /// Asset IDs - List assetIds; - - AssetJobName name; - - @override - bool operator ==(Object other) => identical(this, other) || other is AssetJobsDto && - _deepEquality.equals(other.assetIds, assetIds) && - other.name == name; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (assetIds.hashCode) + - (name.hashCode); - - @override - String toString() => 'AssetJobsDto[assetIds=$assetIds, name=$name]'; - - Map toJson() { - final json = {}; - json[r'assetIds'] = this.assetIds; - json[r'name'] = this.name; - return json; - } - - /// Returns a new [AssetJobsDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static AssetJobsDto? fromJson(dynamic value) { - upgradeDto(value, "AssetJobsDto"); - if (value is Map) { - final json = value.cast(); - - return AssetJobsDto( - assetIds: json[r'assetIds'] is Iterable - ? (json[r'assetIds'] as Iterable).cast().toList(growable: false) - : const [], - name: AssetJobName.fromJson(json[r'name'])!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = AssetJobsDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = AssetJobsDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of AssetJobsDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = AssetJobsDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'assetIds', - 'name', - }; -} - diff --git a/mobile/openapi/lib/model/asset_media_response_dto.dart b/mobile/openapi/lib/model/asset_media_response_dto.dart deleted file mode 100644 index 6dc5cd3c92..0000000000 --- a/mobile/openapi/lib/model/asset_media_response_dto.dart +++ /dev/null @@ -1,108 +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 AssetMediaResponseDto { - /// Returns a new [AssetMediaResponseDto] instance. - AssetMediaResponseDto({ - required this.id, - required this.status, - }); - - /// Asset media ID - String id; - - AssetMediaStatus status; - - @override - bool operator ==(Object other) => identical(this, other) || other is AssetMediaResponseDto && - other.id == id && - other.status == status; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (id.hashCode) + - (status.hashCode); - - @override - String toString() => 'AssetMediaResponseDto[id=$id, status=$status]'; - - Map toJson() { - final json = {}; - json[r'id'] = this.id; - json[r'status'] = this.status; - return json; - } - - /// Returns a new [AssetMediaResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static AssetMediaResponseDto? fromJson(dynamic value) { - upgradeDto(value, "AssetMediaResponseDto"); - if (value is Map) { - final json = value.cast(); - - return AssetMediaResponseDto( - id: mapValueOfType(json, r'id')!, - status: AssetMediaStatus.fromJson(json[r'status'])!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = AssetMediaResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = AssetMediaResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of AssetMediaResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = AssetMediaResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'id', - 'status', - }; -} - diff --git a/mobile/openapi/lib/model/asset_media_size.dart b/mobile/openapi/lib/model/asset_media_size.dart deleted file mode 100644 index ed7a72a613..0000000000 --- a/mobile/openapi/lib/model/asset_media_size.dart +++ /dev/null @@ -1,91 +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; - -/// Asset media size -class AssetMediaSize { - /// Instantiate a new enum with the provided [value]. - const AssetMediaSize._(this.value); - - /// The underlying value of this enum member. - final String value; - - @override - String toString() => value; - - String toJson() => value; - - static const original = AssetMediaSize._(r'original'); - static const fullsize = AssetMediaSize._(r'fullsize'); - static const preview = AssetMediaSize._(r'preview'); - static const thumbnail = AssetMediaSize._(r'thumbnail'); - - /// List of all possible values in this [enum][AssetMediaSize]. - static const values = [ - original, - fullsize, - preview, - thumbnail, - ]; - - static AssetMediaSize? fromJson(dynamic value) => AssetMediaSizeTypeTransformer().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 = AssetMediaSize.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } -} - -/// Transformation class that can [encode] an instance of [AssetMediaSize] to String, -/// and [decode] dynamic data back to [AssetMediaSize]. -class AssetMediaSizeTypeTransformer { - factory AssetMediaSizeTypeTransformer() => _instance ??= const AssetMediaSizeTypeTransformer._(); - - const AssetMediaSizeTypeTransformer._(); - - String encode(AssetMediaSize data) => data.value; - - /// Decodes a [dynamic value][data] to a AssetMediaSize. - /// - /// 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. - AssetMediaSize? decode(dynamic data, {bool allowNull = true}) { - if (data != null) { - switch (data) { - case r'original': return AssetMediaSize.original; - case r'fullsize': return AssetMediaSize.fullsize; - case r'preview': return AssetMediaSize.preview; - case r'thumbnail': return AssetMediaSize.thumbnail; - default: - if (!allowNull) { - throw ArgumentError('Unknown enum value to decode: $data'); - } - } - } - return null; - } - - /// Singleton [AssetMediaSizeTypeTransformer] instance. - static AssetMediaSizeTypeTransformer? _instance; -} - diff --git a/mobile/openapi/lib/model/asset_media_status.dart b/mobile/openapi/lib/model/asset_media_status.dart deleted file mode 100644 index 44438f15ab..0000000000 --- a/mobile/openapi/lib/model/asset_media_status.dart +++ /dev/null @@ -1,85 +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; - -/// Upload status -class AssetMediaStatus { - /// Instantiate a new enum with the provided [value]. - const AssetMediaStatus._(this.value); - - /// The underlying value of this enum member. - final String value; - - @override - String toString() => value; - - String toJson() => value; - - static const created = AssetMediaStatus._(r'created'); - static const duplicate = AssetMediaStatus._(r'duplicate'); - - /// List of all possible values in this [enum][AssetMediaStatus]. - static const values = [ - created, - duplicate, - ]; - - static AssetMediaStatus? fromJson(dynamic value) => AssetMediaStatusTypeTransformer().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 = AssetMediaStatus.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } -} - -/// Transformation class that can [encode] an instance of [AssetMediaStatus] to String, -/// and [decode] dynamic data back to [AssetMediaStatus]. -class AssetMediaStatusTypeTransformer { - factory AssetMediaStatusTypeTransformer() => _instance ??= const AssetMediaStatusTypeTransformer._(); - - const AssetMediaStatusTypeTransformer._(); - - String encode(AssetMediaStatus data) => data.value; - - /// Decodes a [dynamic value][data] to a AssetMediaStatus. - /// - /// 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. - AssetMediaStatus? decode(dynamic data, {bool allowNull = true}) { - if (data != null) { - switch (data) { - case r'created': return AssetMediaStatus.created; - case r'duplicate': return AssetMediaStatus.duplicate; - default: - if (!allowNull) { - throw ArgumentError('Unknown enum value to decode: $data'); - } - } - } - return null; - } - - /// Singleton [AssetMediaStatusTypeTransformer] instance. - static AssetMediaStatusTypeTransformer? _instance; -} - diff --git a/mobile/openapi/lib/model/asset_metadata_bulk_delete_dto.dart b/mobile/openapi/lib/model/asset_metadata_bulk_delete_dto.dart deleted file mode 100644 index 6376ebc531..0000000000 --- a/mobile/openapi/lib/model/asset_metadata_bulk_delete_dto.dart +++ /dev/null @@ -1,100 +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 AssetMetadataBulkDeleteDto { - /// Returns a new [AssetMetadataBulkDeleteDto] instance. - AssetMetadataBulkDeleteDto({ - this.items = const [], - }); - - /// Metadata items to delete - List items; - - @override - bool operator ==(Object other) => identical(this, other) || other is AssetMetadataBulkDeleteDto && - _deepEquality.equals(other.items, items); - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (items.hashCode); - - @override - String toString() => 'AssetMetadataBulkDeleteDto[items=$items]'; - - Map toJson() { - final json = {}; - json[r'items'] = this.items; - return json; - } - - /// Returns a new [AssetMetadataBulkDeleteDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static AssetMetadataBulkDeleteDto? fromJson(dynamic value) { - upgradeDto(value, "AssetMetadataBulkDeleteDto"); - if (value is Map) { - final json = value.cast(); - - return AssetMetadataBulkDeleteDto( - items: AssetMetadataBulkDeleteItemDto.listFromJson(json[r'items']), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = AssetMetadataBulkDeleteDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = AssetMetadataBulkDeleteDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of AssetMetadataBulkDeleteDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = AssetMetadataBulkDeleteDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'items', - }; -} - diff --git a/mobile/openapi/lib/model/asset_metadata_bulk_delete_item_dto.dart b/mobile/openapi/lib/model/asset_metadata_bulk_delete_item_dto.dart deleted file mode 100644 index 90417b79e0..0000000000 --- a/mobile/openapi/lib/model/asset_metadata_bulk_delete_item_dto.dart +++ /dev/null @@ -1,109 +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 AssetMetadataBulkDeleteItemDto { - /// Returns a new [AssetMetadataBulkDeleteItemDto] instance. - AssetMetadataBulkDeleteItemDto({ - required this.assetId, - required this.key, - }); - - /// Asset ID - String assetId; - - /// Metadata key - String key; - - @override - bool operator ==(Object other) => identical(this, other) || other is AssetMetadataBulkDeleteItemDto && - other.assetId == assetId && - other.key == key; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (assetId.hashCode) + - (key.hashCode); - - @override - String toString() => 'AssetMetadataBulkDeleteItemDto[assetId=$assetId, key=$key]'; - - Map toJson() { - final json = {}; - json[r'assetId'] = this.assetId; - json[r'key'] = this.key; - return json; - } - - /// Returns a new [AssetMetadataBulkDeleteItemDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static AssetMetadataBulkDeleteItemDto? fromJson(dynamic value) { - upgradeDto(value, "AssetMetadataBulkDeleteItemDto"); - if (value is Map) { - final json = value.cast(); - - return AssetMetadataBulkDeleteItemDto( - assetId: mapValueOfType(json, r'assetId')!, - key: mapValueOfType(json, r'key')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = AssetMetadataBulkDeleteItemDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = AssetMetadataBulkDeleteItemDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of AssetMetadataBulkDeleteItemDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = AssetMetadataBulkDeleteItemDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'assetId', - 'key', - }; -} - diff --git a/mobile/openapi/lib/model/asset_metadata_bulk_response_dto.dart b/mobile/openapi/lib/model/asset_metadata_bulk_response_dto.dart deleted file mode 100644 index 9afb8dda3f..0000000000 --- a/mobile/openapi/lib/model/asset_metadata_bulk_response_dto.dart +++ /dev/null @@ -1,129 +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 AssetMetadataBulkResponseDto { - /// Returns a new [AssetMetadataBulkResponseDto] instance. - AssetMetadataBulkResponseDto({ - required this.assetId, - required this.key, - required this.updatedAt, - this.value = const {}, - }); - - /// Asset ID - String assetId; - - /// Metadata key - String key; - - /// Last update date - DateTime updatedAt; - - /// Metadata value (object) - Map value; - - @override - bool operator ==(Object other) => identical(this, other) || other is AssetMetadataBulkResponseDto && - other.assetId == assetId && - other.key == key && - other.updatedAt == updatedAt && - _deepEquality.equals(other.value, value); - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (assetId.hashCode) + - (key.hashCode) + - (updatedAt.hashCode) + - (value.hashCode); - - @override - String toString() => 'AssetMetadataBulkResponseDto[assetId=$assetId, key=$key, updatedAt=$updatedAt, value=$value]'; - - Map toJson() { - final json = {}; - json[r'assetId'] = this.assetId; - json[r'key'] = this.key; - json[r'updatedAt'] = _isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? this.updatedAt.millisecondsSinceEpoch - : this.updatedAt.toUtc().toIso8601String(); - json[r'value'] = this.value; - return json; - } - - /// Returns a new [AssetMetadataBulkResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static AssetMetadataBulkResponseDto? fromJson(dynamic value) { - upgradeDto(value, "AssetMetadataBulkResponseDto"); - if (value is Map) { - final json = value.cast(); - - return AssetMetadataBulkResponseDto( - assetId: mapValueOfType(json, r'assetId')!, - key: mapValueOfType(json, r'key')!, - updatedAt: mapDateTime(json, r'updatedAt', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')!, - value: mapCastOfType(json, r'value')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = AssetMetadataBulkResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = AssetMetadataBulkResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of AssetMetadataBulkResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = AssetMetadataBulkResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'assetId', - 'key', - 'updatedAt', - 'value', - }; -} - diff --git a/mobile/openapi/lib/model/asset_metadata_bulk_upsert_dto.dart b/mobile/openapi/lib/model/asset_metadata_bulk_upsert_dto.dart deleted file mode 100644 index a5e770b02a..0000000000 --- a/mobile/openapi/lib/model/asset_metadata_bulk_upsert_dto.dart +++ /dev/null @@ -1,100 +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 AssetMetadataBulkUpsertDto { - /// Returns a new [AssetMetadataBulkUpsertDto] instance. - AssetMetadataBulkUpsertDto({ - this.items = const [], - }); - - /// Metadata items to upsert - List items; - - @override - bool operator ==(Object other) => identical(this, other) || other is AssetMetadataBulkUpsertDto && - _deepEquality.equals(other.items, items); - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (items.hashCode); - - @override - String toString() => 'AssetMetadataBulkUpsertDto[items=$items]'; - - Map toJson() { - final json = {}; - json[r'items'] = this.items; - return json; - } - - /// Returns a new [AssetMetadataBulkUpsertDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static AssetMetadataBulkUpsertDto? fromJson(dynamic value) { - upgradeDto(value, "AssetMetadataBulkUpsertDto"); - if (value is Map) { - final json = value.cast(); - - return AssetMetadataBulkUpsertDto( - items: AssetMetadataBulkUpsertItemDto.listFromJson(json[r'items']), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = AssetMetadataBulkUpsertDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = AssetMetadataBulkUpsertDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of AssetMetadataBulkUpsertDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = AssetMetadataBulkUpsertDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'items', - }; -} - diff --git a/mobile/openapi/lib/model/asset_metadata_bulk_upsert_item_dto.dart b/mobile/openapi/lib/model/asset_metadata_bulk_upsert_item_dto.dart deleted file mode 100644 index e4eab08bf1..0000000000 --- a/mobile/openapi/lib/model/asset_metadata_bulk_upsert_item_dto.dart +++ /dev/null @@ -1,118 +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 AssetMetadataBulkUpsertItemDto { - /// Returns a new [AssetMetadataBulkUpsertItemDto] instance. - AssetMetadataBulkUpsertItemDto({ - required this.assetId, - required this.key, - this.value = const {}, - }); - - /// Asset ID - String assetId; - - /// Metadata key - String key; - - /// Metadata value (object) - Map value; - - @override - bool operator ==(Object other) => identical(this, other) || other is AssetMetadataBulkUpsertItemDto && - other.assetId == assetId && - other.key == key && - _deepEquality.equals(other.value, value); - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (assetId.hashCode) + - (key.hashCode) + - (value.hashCode); - - @override - String toString() => 'AssetMetadataBulkUpsertItemDto[assetId=$assetId, key=$key, value=$value]'; - - Map toJson() { - final json = {}; - json[r'assetId'] = this.assetId; - json[r'key'] = this.key; - json[r'value'] = this.value; - return json; - } - - /// Returns a new [AssetMetadataBulkUpsertItemDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static AssetMetadataBulkUpsertItemDto? fromJson(dynamic value) { - upgradeDto(value, "AssetMetadataBulkUpsertItemDto"); - if (value is Map) { - final json = value.cast(); - - return AssetMetadataBulkUpsertItemDto( - assetId: mapValueOfType(json, r'assetId')!, - key: mapValueOfType(json, r'key')!, - value: mapCastOfType(json, r'value')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = AssetMetadataBulkUpsertItemDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = AssetMetadataBulkUpsertItemDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of AssetMetadataBulkUpsertItemDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = AssetMetadataBulkUpsertItemDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'assetId', - 'key', - 'value', - }; -} - diff --git a/mobile/openapi/lib/model/asset_metadata_response_dto.dart b/mobile/openapi/lib/model/asset_metadata_response_dto.dart deleted file mode 100644 index 6b6a255ae4..0000000000 --- a/mobile/openapi/lib/model/asset_metadata_response_dto.dart +++ /dev/null @@ -1,120 +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 AssetMetadataResponseDto { - /// Returns a new [AssetMetadataResponseDto] instance. - AssetMetadataResponseDto({ - required this.key, - required this.updatedAt, - this.value = const {}, - }); - - /// Metadata key - String key; - - /// Last update date - DateTime updatedAt; - - /// Metadata value (object) - Map value; - - @override - bool operator ==(Object other) => identical(this, other) || other is AssetMetadataResponseDto && - other.key == key && - other.updatedAt == updatedAt && - _deepEquality.equals(other.value, value); - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (key.hashCode) + - (updatedAt.hashCode) + - (value.hashCode); - - @override - String toString() => 'AssetMetadataResponseDto[key=$key, updatedAt=$updatedAt, value=$value]'; - - Map toJson() { - final json = {}; - json[r'key'] = this.key; - json[r'updatedAt'] = _isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? this.updatedAt.millisecondsSinceEpoch - : this.updatedAt.toUtc().toIso8601String(); - json[r'value'] = this.value; - return json; - } - - /// Returns a new [AssetMetadataResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static AssetMetadataResponseDto? fromJson(dynamic value) { - upgradeDto(value, "AssetMetadataResponseDto"); - if (value is Map) { - final json = value.cast(); - - return AssetMetadataResponseDto( - key: mapValueOfType(json, r'key')!, - updatedAt: mapDateTime(json, r'updatedAt', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')!, - value: mapCastOfType(json, r'value')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = AssetMetadataResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = AssetMetadataResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of AssetMetadataResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = AssetMetadataResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'key', - 'updatedAt', - 'value', - }; -} - diff --git a/mobile/openapi/lib/model/asset_metadata_upsert_dto.dart b/mobile/openapi/lib/model/asset_metadata_upsert_dto.dart deleted file mode 100644 index b1473d4826..0000000000 --- a/mobile/openapi/lib/model/asset_metadata_upsert_dto.dart +++ /dev/null @@ -1,100 +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 AssetMetadataUpsertDto { - /// Returns a new [AssetMetadataUpsertDto] instance. - AssetMetadataUpsertDto({ - this.items = const [], - }); - - /// Metadata items to upsert - List items; - - @override - bool operator ==(Object other) => identical(this, other) || other is AssetMetadataUpsertDto && - _deepEquality.equals(other.items, items); - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (items.hashCode); - - @override - String toString() => 'AssetMetadataUpsertDto[items=$items]'; - - Map toJson() { - final json = {}; - json[r'items'] = this.items; - return json; - } - - /// Returns a new [AssetMetadataUpsertDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static AssetMetadataUpsertDto? fromJson(dynamic value) { - upgradeDto(value, "AssetMetadataUpsertDto"); - if (value is Map) { - final json = value.cast(); - - return AssetMetadataUpsertDto( - items: AssetMetadataUpsertItemDto.listFromJson(json[r'items']), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = AssetMetadataUpsertDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = AssetMetadataUpsertDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of AssetMetadataUpsertDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = AssetMetadataUpsertDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'items', - }; -} - diff --git a/mobile/openapi/lib/model/asset_metadata_upsert_item_dto.dart b/mobile/openapi/lib/model/asset_metadata_upsert_item_dto.dart deleted file mode 100644 index 70de1941f3..0000000000 --- a/mobile/openapi/lib/model/asset_metadata_upsert_item_dto.dart +++ /dev/null @@ -1,109 +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 AssetMetadataUpsertItemDto { - /// Returns a new [AssetMetadataUpsertItemDto] instance. - AssetMetadataUpsertItemDto({ - required this.key, - this.value = const {}, - }); - - /// Metadata key - String key; - - /// Metadata value (object) - Map value; - - @override - bool operator ==(Object other) => identical(this, other) || other is AssetMetadataUpsertItemDto && - other.key == key && - _deepEquality.equals(other.value, value); - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (key.hashCode) + - (value.hashCode); - - @override - String toString() => 'AssetMetadataUpsertItemDto[key=$key, value=$value]'; - - Map toJson() { - final json = {}; - json[r'key'] = this.key; - json[r'value'] = this.value; - return json; - } - - /// Returns a new [AssetMetadataUpsertItemDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static AssetMetadataUpsertItemDto? fromJson(dynamic value) { - upgradeDto(value, "AssetMetadataUpsertItemDto"); - if (value is Map) { - final json = value.cast(); - - return AssetMetadataUpsertItemDto( - key: mapValueOfType(json, r'key')!, - value: mapCastOfType(json, r'value')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = AssetMetadataUpsertItemDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = AssetMetadataUpsertItemDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of AssetMetadataUpsertItemDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = AssetMetadataUpsertItemDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'key', - 'value', - }; -} - diff --git a/mobile/openapi/lib/model/asset_ocr_response_dto.dart b/mobile/openapi/lib/model/asset_ocr_response_dto.dart deleted file mode 100644 index 23c51f054c..0000000000 --- a/mobile/openapi/lib/model/asset_ocr_response_dto.dart +++ /dev/null @@ -1,206 +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 AssetOcrResponseDto { - /// Returns a new [AssetOcrResponseDto] instance. - AssetOcrResponseDto({ - required this.assetId, - required this.boxScore, - required this.id, - required this.text, - required this.textScore, - required this.x1, - required this.x2, - required this.x3, - required this.x4, - required this.y1, - required this.y2, - required this.y3, - required this.y4, - }); - - String assetId; - - /// Confidence score for text detection box - double boxScore; - - String id; - - /// Recognized text - String text; - - /// Confidence score for text recognition - double textScore; - - /// Normalized x coordinate of box corner 1 (0-1) - double x1; - - /// Normalized x coordinate of box corner 2 (0-1) - double x2; - - /// Normalized x coordinate of box corner 3 (0-1) - double x3; - - /// Normalized x coordinate of box corner 4 (0-1) - double x4; - - /// Normalized y coordinate of box corner 1 (0-1) - double y1; - - /// Normalized y coordinate of box corner 2 (0-1) - double y2; - - /// Normalized y coordinate of box corner 3 (0-1) - double y3; - - /// Normalized y coordinate of box corner 4 (0-1) - double y4; - - @override - bool operator ==(Object other) => identical(this, other) || other is AssetOcrResponseDto && - other.assetId == assetId && - other.boxScore == boxScore && - other.id == id && - other.text == text && - other.textScore == textScore && - other.x1 == x1 && - other.x2 == x2 && - other.x3 == x3 && - other.x4 == x4 && - other.y1 == y1 && - other.y2 == y2 && - other.y3 == y3 && - other.y4 == y4; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (assetId.hashCode) + - (boxScore.hashCode) + - (id.hashCode) + - (text.hashCode) + - (textScore.hashCode) + - (x1.hashCode) + - (x2.hashCode) + - (x3.hashCode) + - (x4.hashCode) + - (y1.hashCode) + - (y2.hashCode) + - (y3.hashCode) + - (y4.hashCode); - - @override - String toString() => 'AssetOcrResponseDto[assetId=$assetId, boxScore=$boxScore, id=$id, text=$text, textScore=$textScore, x1=$x1, x2=$x2, x3=$x3, x4=$x4, y1=$y1, y2=$y2, y3=$y3, y4=$y4]'; - - Map toJson() { - final json = {}; - json[r'assetId'] = this.assetId; - json[r'boxScore'] = this.boxScore; - json[r'id'] = this.id; - json[r'text'] = this.text; - json[r'textScore'] = this.textScore; - json[r'x1'] = this.x1; - json[r'x2'] = this.x2; - json[r'x3'] = this.x3; - json[r'x4'] = this.x4; - json[r'y1'] = this.y1; - json[r'y2'] = this.y2; - json[r'y3'] = this.y3; - json[r'y4'] = this.y4; - return json; - } - - /// Returns a new [AssetOcrResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static AssetOcrResponseDto? fromJson(dynamic value) { - upgradeDto(value, "AssetOcrResponseDto"); - if (value is Map) { - final json = value.cast(); - - return AssetOcrResponseDto( - assetId: mapValueOfType(json, r'assetId')!, - boxScore: mapValueOfType(json, r'boxScore')!, - id: mapValueOfType(json, r'id')!, - text: mapValueOfType(json, r'text')!, - textScore: mapValueOfType(json, r'textScore')!, - x1: mapValueOfType(json, r'x1')!, - x2: mapValueOfType(json, r'x2')!, - x3: mapValueOfType(json, r'x3')!, - x4: mapValueOfType(json, r'x4')!, - y1: mapValueOfType(json, r'y1')!, - y2: mapValueOfType(json, r'y2')!, - y3: mapValueOfType(json, r'y3')!, - y4: mapValueOfType(json, r'y4')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = AssetOcrResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = AssetOcrResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of AssetOcrResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = AssetOcrResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'assetId', - 'boxScore', - 'id', - 'text', - 'textScore', - 'x1', - 'x2', - 'x3', - 'x4', - 'y1', - 'y2', - 'y3', - 'y4', - }; -} - diff --git a/mobile/openapi/lib/model/asset_order.dart b/mobile/openapi/lib/model/asset_order.dart deleted file mode 100644 index 21edd95ff6..0000000000 --- a/mobile/openapi/lib/model/asset_order.dart +++ /dev/null @@ -1,85 +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; - -/// Asset sort order -class AssetOrder { - /// Instantiate a new enum with the provided [value]. - const AssetOrder._(this.value); - - /// The underlying value of this enum member. - final String value; - - @override - String toString() => value; - - String toJson() => value; - - static const asc = AssetOrder._(r'asc'); - static const desc = AssetOrder._(r'desc'); - - /// List of all possible values in this [enum][AssetOrder]. - static const values = [ - asc, - desc, - ]; - - static AssetOrder? fromJson(dynamic value) => AssetOrderTypeTransformer().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 = AssetOrder.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } -} - -/// Transformation class that can [encode] an instance of [AssetOrder] to String, -/// and [decode] dynamic data back to [AssetOrder]. -class AssetOrderTypeTransformer { - factory AssetOrderTypeTransformer() => _instance ??= const AssetOrderTypeTransformer._(); - - const AssetOrderTypeTransformer._(); - - String encode(AssetOrder data) => data.value; - - /// Decodes a [dynamic value][data] to a AssetOrder. - /// - /// 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. - AssetOrder? decode(dynamic data, {bool allowNull = true}) { - if (data != null) { - switch (data) { - case r'asc': return AssetOrder.asc; - case r'desc': return AssetOrder.desc; - default: - if (!allowNull) { - throw ArgumentError('Unknown enum value to decode: $data'); - } - } - } - return null; - } - - /// Singleton [AssetOrderTypeTransformer] instance. - static AssetOrderTypeTransformer? _instance; -} - diff --git a/mobile/openapi/lib/model/asset_order_by.dart b/mobile/openapi/lib/model/asset_order_by.dart deleted file mode 100644 index 2edba961d9..0000000000 --- a/mobile/openapi/lib/model/asset_order_by.dart +++ /dev/null @@ -1,85 +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; - -/// Asset sorting property -class AssetOrderBy { - /// Instantiate a new enum with the provided [value]. - const AssetOrderBy._(this.value); - - /// The underlying value of this enum member. - final String value; - - @override - String toString() => value; - - String toJson() => value; - - static const takenAt = AssetOrderBy._(r'takenAt'); - static const createdAt = AssetOrderBy._(r'createdAt'); - - /// List of all possible values in this [enum][AssetOrderBy]. - static const values = [ - takenAt, - createdAt, - ]; - - static AssetOrderBy? fromJson(dynamic value) => AssetOrderByTypeTransformer().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 = AssetOrderBy.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } -} - -/// Transformation class that can [encode] an instance of [AssetOrderBy] to String, -/// and [decode] dynamic data back to [AssetOrderBy]. -class AssetOrderByTypeTransformer { - factory AssetOrderByTypeTransformer() => _instance ??= const AssetOrderByTypeTransformer._(); - - const AssetOrderByTypeTransformer._(); - - String encode(AssetOrderBy data) => data.value; - - /// Decodes a [dynamic value][data] to a AssetOrderBy. - /// - /// 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. - AssetOrderBy? decode(dynamic data, {bool allowNull = true}) { - if (data != null) { - switch (data) { - case r'takenAt': return AssetOrderBy.takenAt; - case r'createdAt': return AssetOrderBy.createdAt; - default: - if (!allowNull) { - throw ArgumentError('Unknown enum value to decode: $data'); - } - } - } - return null; - } - - /// Singleton [AssetOrderByTypeTransformer] instance. - static AssetOrderByTypeTransformer? _instance; -} - diff --git a/mobile/openapi/lib/model/asset_reject_reason.dart b/mobile/openapi/lib/model/asset_reject_reason.dart deleted file mode 100644 index a31e1e6117..0000000000 --- a/mobile/openapi/lib/model/asset_reject_reason.dart +++ /dev/null @@ -1,85 +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; - -/// Rejection reason if rejected -class AssetRejectReason { - /// Instantiate a new enum with the provided [value]. - const AssetRejectReason._(this.value); - - /// The underlying value of this enum member. - final String value; - - @override - String toString() => value; - - String toJson() => value; - - static const duplicate = AssetRejectReason._(r'duplicate'); - static const unsupportedFormat = AssetRejectReason._(r'unsupported-format'); - - /// List of all possible values in this [enum][AssetRejectReason]. - static const values = [ - duplicate, - unsupportedFormat, - ]; - - static AssetRejectReason? fromJson(dynamic value) => AssetRejectReasonTypeTransformer().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 = AssetRejectReason.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } -} - -/// Transformation class that can [encode] an instance of [AssetRejectReason] to String, -/// and [decode] dynamic data back to [AssetRejectReason]. -class AssetRejectReasonTypeTransformer { - factory AssetRejectReasonTypeTransformer() => _instance ??= const AssetRejectReasonTypeTransformer._(); - - const AssetRejectReasonTypeTransformer._(); - - String encode(AssetRejectReason data) => data.value; - - /// Decodes a [dynamic value][data] to a AssetRejectReason. - /// - /// 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. - AssetRejectReason? decode(dynamic data, {bool allowNull = true}) { - if (data != null) { - switch (data) { - case r'duplicate': return AssetRejectReason.duplicate; - case r'unsupported-format': return AssetRejectReason.unsupportedFormat; - default: - if (!allowNull) { - throw ArgumentError('Unknown enum value to decode: $data'); - } - } - } - return null; - } - - /// Singleton [AssetRejectReasonTypeTransformer] instance. - static AssetRejectReasonTypeTransformer? _instance; -} - diff --git a/mobile/openapi/lib/model/asset_response_dto.dart b/mobile/openapi/lib/model/asset_response_dto.dart deleted file mode 100644 index 3c09de3f15..0000000000 --- a/mobile/openapi/lib/model/asset_response_dto.dart +++ /dev/null @@ -1,441 +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 AssetResponseDto { - /// Returns a new [AssetResponseDto] instance. - AssetResponseDto({ - required this.checksum, - required this.createdAt, - this.duplicateId = const Optional.absent(), - required this.duration, - this.exifInfo = const Optional.absent(), - required this.fileCreatedAt, - required this.fileModifiedAt, - required this.hasMetadata, - required this.height, - required this.id, - required this.isArchived, - required this.isEdited, - required this.isFavorite, - required this.isOffline, - required this.isTrashed, - this.libraryId = const Optional.absent(), - this.livePhotoVideoId = const Optional.absent(), - required this.localDateTime, - required this.originalFileName, - this.originalMimeType = const Optional.absent(), - required this.originalPath, - this.owner = const Optional.absent(), - required this.ownerId, - this.people = const Optional.present(const []), - this.resized = const Optional.absent(), - this.stack = const Optional.absent(), - this.tags = const Optional.present(const []), - required this.thumbhash, - required this.type, - required this.updatedAt, - required this.visibility, - required this.width, - }); - - /// Base64 encoded SHA1 hash - String checksum; - - /// The UTC timestamp when the asset was originally uploaded to Immich. - DateTime createdAt; - - /// Duplicate group ID - Optional duplicateId; - - /// Video/gif duration in milliseconds (null for static images) - /// - /// Minimum value: 0 - /// Maximum value: 2147483647 - 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 - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional exifInfo; - - /// The actual UTC timestamp when the file was created/captured, preserving timezone information. This is the authoritative timestamp for chronological sorting within timeline groups. Combined with timezone data, this can be used to determine the exact moment the photo was taken. - DateTime fileCreatedAt; - - /// The UTC timestamp when the file was last modified on the filesystem. This reflects the last time the physical file was changed, which may be different from when the photo was originally taken. - DateTime fileModifiedAt; - - /// Whether asset has metadata - bool hasMetadata; - - /// Asset height - /// - /// Minimum value: 0 - /// Maximum value: 9007199254740991 - int? height; - - /// Asset ID - String id; - - /// Is archived - bool isArchived; - - /// Is edited - bool isEdited; - - /// Is favorite - bool isFavorite; - - /// Is offline - bool isOffline; - - /// Is trashed - bool isTrashed; - - /// Library ID - Optional libraryId; - - /// Live photo video ID - Optional livePhotoVideoId; - - /// The local date and time when the photo/video was taken, derived from EXIF metadata. This represents the photographer's local time regardless of timezone, stored as a timezone-agnostic timestamp. Used for timeline grouping by \"local\" days and months. - DateTime localDateTime; - - /// Original file name - String originalFileName; - - /// Original MIME type - /// - /// 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. - /// - Optional originalMimeType; - - /// Original file path - String originalPath; - - /// - /// 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. - /// - Optional owner; - - /// Owner user ID - String ownerId; - - Optional?> people; - - /// Is resized - /// - /// 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. - /// - Optional resized; - - Optional stack; - - Optional?> tags; - - /// Thumbhash for thumbnail generation (base64) also used as the c query param for thumbnail cache busting. - String? thumbhash; - - AssetTypeEnum type; - - /// The UTC timestamp when the asset record was last updated in the database. This is automatically maintained by the database and reflects when any field in the asset was last modified. - DateTime updatedAt; - - AssetVisibility visibility; - - /// Asset width - /// - /// Minimum value: 0 - /// Maximum value: 9007199254740991 - int? width; - - @override - bool operator ==(Object other) => identical(this, other) || other is AssetResponseDto && - other.checksum == checksum && - other.createdAt == createdAt && - other.duplicateId == duplicateId && - other.duration == duration && - other.exifInfo == exifInfo && - other.fileCreatedAt == fileCreatedAt && - other.fileModifiedAt == fileModifiedAt && - other.hasMetadata == hasMetadata && - other.height == height && - other.id == id && - other.isArchived == isArchived && - other.isEdited == isEdited && - other.isFavorite == isFavorite && - other.isOffline == isOffline && - other.isTrashed == isTrashed && - other.libraryId == libraryId && - other.livePhotoVideoId == livePhotoVideoId && - other.localDateTime == localDateTime && - other.originalFileName == originalFileName && - other.originalMimeType == originalMimeType && - other.originalPath == originalPath && - other.owner == owner && - other.ownerId == ownerId && - _deepEquality.equals(other.people, people) && - other.resized == resized && - other.stack == stack && - _deepEquality.equals(other.tags, tags) && - other.thumbhash == thumbhash && - other.type == type && - other.updatedAt == updatedAt && - other.visibility == visibility && - other.width == width; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (checksum.hashCode) + - (createdAt.hashCode) + - (duplicateId == null ? 0 : duplicateId!.hashCode) + - (duration == null ? 0 : duration!.hashCode) + - (exifInfo == null ? 0 : exifInfo!.hashCode) + - (fileCreatedAt.hashCode) + - (fileModifiedAt.hashCode) + - (hasMetadata.hashCode) + - (height == null ? 0 : height!.hashCode) + - (id.hashCode) + - (isArchived.hashCode) + - (isEdited.hashCode) + - (isFavorite.hashCode) + - (isOffline.hashCode) + - (isTrashed.hashCode) + - (libraryId == null ? 0 : libraryId!.hashCode) + - (livePhotoVideoId == null ? 0 : livePhotoVideoId!.hashCode) + - (localDateTime.hashCode) + - (originalFileName.hashCode) + - (originalMimeType == null ? 0 : originalMimeType!.hashCode) + - (originalPath.hashCode) + - (owner == null ? 0 : owner!.hashCode) + - (ownerId.hashCode) + - (people.hashCode) + - (resized == null ? 0 : resized!.hashCode) + - (stack == null ? 0 : stack!.hashCode) + - (tags.hashCode) + - (thumbhash == null ? 0 : thumbhash!.hashCode) + - (type.hashCode) + - (updatedAt.hashCode) + - (visibility.hashCode) + - (width == null ? 0 : width!.hashCode); - - @override - String toString() => 'AssetResponseDto[checksum=$checksum, createdAt=$createdAt, duplicateId=$duplicateId, duration=$duration, exifInfo=$exifInfo, fileCreatedAt=$fileCreatedAt, fileModifiedAt=$fileModifiedAt, hasMetadata=$hasMetadata, height=$height, id=$id, isArchived=$isArchived, isEdited=$isEdited, isFavorite=$isFavorite, isOffline=$isOffline, isTrashed=$isTrashed, libraryId=$libraryId, livePhotoVideoId=$livePhotoVideoId, localDateTime=$localDateTime, originalFileName=$originalFileName, originalMimeType=$originalMimeType, originalPath=$originalPath, owner=$owner, ownerId=$ownerId, people=$people, resized=$resized, stack=$stack, tags=$tags, thumbhash=$thumbhash, type=$type, updatedAt=$updatedAt, visibility=$visibility, width=$width]'; - - Map toJson() { - final json = {}; - json[r'checksum'] = this.checksum; - json[r'createdAt'] = this.createdAt.toUtc().toIso8601String(); - if (this.duplicateId.isPresent) { - final value = this.duplicateId.value; - json[r'duplicateId'] = value; - } - if (this.duration != null) { - json[r'duration'] = this.duration; - } else { - json[r'duration'] = null; - } - if (this.exifInfo.isPresent) { - final value = this.exifInfo.value; - json[r'exifInfo'] = value; - } - json[r'fileCreatedAt'] = this.fileCreatedAt.toUtc().toIso8601String(); - json[r'fileModifiedAt'] = this.fileModifiedAt.toUtc().toIso8601String(); - json[r'hasMetadata'] = this.hasMetadata; - if (this.height != null) { - json[r'height'] = this.height; - } else { - json[r'height'] = null; - } - json[r'id'] = this.id; - json[r'isArchived'] = this.isArchived; - json[r'isEdited'] = this.isEdited; - json[r'isFavorite'] = this.isFavorite; - json[r'isOffline'] = this.isOffline; - json[r'isTrashed'] = this.isTrashed; - if (this.libraryId.isPresent) { - final value = this.libraryId.value; - json[r'libraryId'] = value; - } - if (this.livePhotoVideoId.isPresent) { - final value = this.livePhotoVideoId.value; - json[r'livePhotoVideoId'] = value; - } - json[r'localDateTime'] = this.localDateTime.toUtc().toIso8601String(); - json[r'originalFileName'] = this.originalFileName; - if (this.originalMimeType.isPresent) { - final value = this.originalMimeType.value; - json[r'originalMimeType'] = value; - } - json[r'originalPath'] = this.originalPath; - if (this.owner.isPresent) { - final value = this.owner.value; - json[r'owner'] = value; - } - json[r'ownerId'] = this.ownerId; - if (this.people.isPresent) { - final value = this.people.value; - json[r'people'] = value; - } - if (this.resized.isPresent) { - final value = this.resized.value; - json[r'resized'] = value; - } - if (this.stack.isPresent) { - final value = this.stack.value; - json[r'stack'] = value; - } - if (this.tags.isPresent) { - final value = this.tags.value; - json[r'tags'] = value; - } - if (this.thumbhash != null) { - json[r'thumbhash'] = this.thumbhash; - } else { - json[r'thumbhash'] = null; - } - json[r'type'] = this.type; - json[r'updatedAt'] = this.updatedAt.toUtc().toIso8601String(); - json[r'visibility'] = this.visibility; - if (this.width != null) { - json[r'width'] = this.width; - } else { - json[r'width'] = null; - } - return json; - } - - /// Returns a new [AssetResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static AssetResponseDto? fromJson(dynamic value) { - upgradeDto(value, "AssetResponseDto"); - if (value is Map) { - final json = value.cast(); - - return AssetResponseDto( - checksum: mapValueOfType(json, r'checksum')!, - createdAt: mapDateTime(json, r'createdAt', r'')!, - duplicateId: json.containsKey(r'duplicateId') ? Optional.present(mapValueOfType(json, r'duplicateId')) : const Optional.absent(), - duration: mapValueOfType(json, r'duration'), - exifInfo: json.containsKey(r'exifInfo') ? Optional.present(ExifResponseDto.fromJson(json[r'exifInfo'])) : const Optional.absent(), - fileCreatedAt: mapDateTime(json, r'fileCreatedAt', r'')!, - fileModifiedAt: mapDateTime(json, r'fileModifiedAt', r'')!, - hasMetadata: mapValueOfType(json, r'hasMetadata')!, - height: mapValueOfType(json, r'height'), - id: mapValueOfType(json, r'id')!, - isArchived: mapValueOfType(json, r'isArchived')!, - isEdited: mapValueOfType(json, r'isEdited')!, - isFavorite: mapValueOfType(json, r'isFavorite')!, - isOffline: mapValueOfType(json, r'isOffline')!, - isTrashed: mapValueOfType(json, r'isTrashed')!, - libraryId: json.containsKey(r'libraryId') ? Optional.present(mapValueOfType(json, r'libraryId')) : const Optional.absent(), - livePhotoVideoId: json.containsKey(r'livePhotoVideoId') ? Optional.present(mapValueOfType(json, r'livePhotoVideoId')) : const Optional.absent(), - localDateTime: mapDateTime(json, r'localDateTime', r'')!, - originalFileName: mapValueOfType(json, r'originalFileName')!, - originalMimeType: json.containsKey(r'originalMimeType') ? Optional.present(mapValueOfType(json, r'originalMimeType')) : const Optional.absent(), - originalPath: mapValueOfType(json, r'originalPath')!, - owner: json.containsKey(r'owner') ? Optional.present(UserResponseDto.fromJson(json[r'owner'])) : const Optional.absent(), - ownerId: mapValueOfType(json, r'ownerId')!, - people: json.containsKey(r'people') ? Optional.present(PersonResponseDto.listFromJson(json[r'people'])) : const Optional.absent(), - resized: json.containsKey(r'resized') ? Optional.present(mapValueOfType(json, r'resized')) : const Optional.absent(), - stack: json.containsKey(r'stack') ? Optional.present(AssetStackResponseDto.fromJson(json[r'stack'])) : const Optional.absent(), - tags: json.containsKey(r'tags') ? Optional.present(TagResponseDto.listFromJson(json[r'tags'])) : const Optional.absent(), - thumbhash: mapValueOfType(json, r'thumbhash'), - type: AssetTypeEnum.fromJson(json[r'type'])!, - updatedAt: mapDateTime(json, r'updatedAt', r'')!, - visibility: AssetVisibility.fromJson(json[r'visibility'])!, - width: mapValueOfType(json, r'width'), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = AssetResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = AssetResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of AssetResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = AssetResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'checksum', - 'createdAt', - 'duration', - 'fileCreatedAt', - 'fileModifiedAt', - 'hasMetadata', - 'height', - 'id', - 'isArchived', - 'isEdited', - 'isFavorite', - 'isOffline', - 'isTrashed', - 'localDateTime', - 'originalFileName', - 'originalPath', - 'ownerId', - 'thumbhash', - 'type', - 'updatedAt', - 'visibility', - 'width', - }; -} - diff --git a/mobile/openapi/lib/model/asset_stack_response_dto.dart b/mobile/openapi/lib/model/asset_stack_response_dto.dart deleted file mode 100644 index 96fd66a392..0000000000 --- a/mobile/openapi/lib/model/asset_stack_response_dto.dart +++ /dev/null @@ -1,121 +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 AssetStackResponseDto { - /// Returns a new [AssetStackResponseDto] instance. - AssetStackResponseDto({ - required this.assetCount, - required this.id, - required this.primaryAssetId, - }); - - /// Number of assets in stack - /// - /// Minimum value: 0 - /// Maximum value: 9007199254740991 - int assetCount; - - /// Stack ID - String id; - - /// Primary asset ID - String primaryAssetId; - - @override - bool operator ==(Object other) => identical(this, other) || other is AssetStackResponseDto && - other.assetCount == assetCount && - other.id == id && - other.primaryAssetId == primaryAssetId; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (assetCount.hashCode) + - (id.hashCode) + - (primaryAssetId.hashCode); - - @override - String toString() => 'AssetStackResponseDto[assetCount=$assetCount, id=$id, primaryAssetId=$primaryAssetId]'; - - Map toJson() { - final json = {}; - json[r'assetCount'] = this.assetCount; - json[r'id'] = this.id; - json[r'primaryAssetId'] = this.primaryAssetId; - return json; - } - - /// Returns a new [AssetStackResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static AssetStackResponseDto? fromJson(dynamic value) { - upgradeDto(value, "AssetStackResponseDto"); - if (value is Map) { - final json = value.cast(); - - return AssetStackResponseDto( - assetCount: mapValueOfType(json, r'assetCount')!, - id: mapValueOfType(json, r'id')!, - primaryAssetId: mapValueOfType(json, r'primaryAssetId')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = AssetStackResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = AssetStackResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of AssetStackResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = AssetStackResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'assetCount', - 'id', - 'primaryAssetId', - }; -} - diff --git a/mobile/openapi/lib/model/asset_stats_response_dto.dart b/mobile/openapi/lib/model/asset_stats_response_dto.dart deleted file mode 100644 index df2762a2f3..0000000000 --- a/mobile/openapi/lib/model/asset_stats_response_dto.dart +++ /dev/null @@ -1,127 +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 AssetStatsResponseDto { - /// Returns a new [AssetStatsResponseDto] instance. - AssetStatsResponseDto({ - required this.images, - required this.total, - required this.videos, - }); - - /// Number of images - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int images; - - /// Total number of assets - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int total; - - /// Number of videos - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int videos; - - @override - bool operator ==(Object other) => identical(this, other) || other is AssetStatsResponseDto && - other.images == images && - other.total == total && - other.videos == videos; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (images.hashCode) + - (total.hashCode) + - (videos.hashCode); - - @override - String toString() => 'AssetStatsResponseDto[images=$images, total=$total, videos=$videos]'; - - Map toJson() { - final json = {}; - json[r'images'] = this.images; - json[r'total'] = this.total; - json[r'videos'] = this.videos; - return json; - } - - /// Returns a new [AssetStatsResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static AssetStatsResponseDto? fromJson(dynamic value) { - upgradeDto(value, "AssetStatsResponseDto"); - if (value is Map) { - final json = value.cast(); - - return AssetStatsResponseDto( - images: mapValueOfType(json, r'images')!, - total: mapValueOfType(json, r'total')!, - videos: mapValueOfType(json, r'videos')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = AssetStatsResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = AssetStatsResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of AssetStatsResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = AssetStatsResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'images', - 'total', - 'videos', - }; -} - diff --git a/mobile/openapi/lib/model/asset_type_enum.dart b/mobile/openapi/lib/model/asset_type_enum.dart deleted file mode 100644 index b6e0351198..0000000000 --- a/mobile/openapi/lib/model/asset_type_enum.dart +++ /dev/null @@ -1,91 +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; - -/// Asset type -class AssetTypeEnum { - /// Instantiate a new enum with the provided [value]. - const AssetTypeEnum._(this.value); - - /// The underlying value of this enum member. - final String value; - - @override - String toString() => value; - - String toJson() => value; - - static const IMAGE = AssetTypeEnum._(r'IMAGE'); - static const VIDEO = AssetTypeEnum._(r'VIDEO'); - static const AUDIO = AssetTypeEnum._(r'AUDIO'); - static const OTHER = AssetTypeEnum._(r'OTHER'); - - /// List of all possible values in this [enum][AssetTypeEnum]. - static const values = [ - IMAGE, - VIDEO, - AUDIO, - OTHER, - ]; - - static AssetTypeEnum? fromJson(dynamic value) => AssetTypeEnumTypeTransformer().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 = AssetTypeEnum.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } -} - -/// Transformation class that can [encode] an instance of [AssetTypeEnum] to String, -/// and [decode] dynamic data back to [AssetTypeEnum]. -class AssetTypeEnumTypeTransformer { - factory AssetTypeEnumTypeTransformer() => _instance ??= const AssetTypeEnumTypeTransformer._(); - - const AssetTypeEnumTypeTransformer._(); - - String encode(AssetTypeEnum data) => data.value; - - /// Decodes a [dynamic value][data] to a AssetTypeEnum. - /// - /// 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. - AssetTypeEnum? decode(dynamic data, {bool allowNull = true}) { - if (data != null) { - switch (data) { - case r'IMAGE': return AssetTypeEnum.IMAGE; - case r'VIDEO': return AssetTypeEnum.VIDEO; - case r'AUDIO': return AssetTypeEnum.AUDIO; - case r'OTHER': return AssetTypeEnum.OTHER; - default: - if (!allowNull) { - throw ArgumentError('Unknown enum value to decode: $data'); - } - } - } - return null; - } - - /// Singleton [AssetTypeEnumTypeTransformer] instance. - static AssetTypeEnumTypeTransformer? _instance; -} - diff --git a/mobile/openapi/lib/model/asset_upload_action.dart b/mobile/openapi/lib/model/asset_upload_action.dart deleted file mode 100644 index b5cdbb0151..0000000000 --- a/mobile/openapi/lib/model/asset_upload_action.dart +++ /dev/null @@ -1,85 +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; - -/// Upload action -class AssetUploadAction { - /// Instantiate a new enum with the provided [value]. - const AssetUploadAction._(this.value); - - /// The underlying value of this enum member. - final String value; - - @override - String toString() => value; - - String toJson() => value; - - static const accept = AssetUploadAction._(r'accept'); - static const reject = AssetUploadAction._(r'reject'); - - /// List of all possible values in this [enum][AssetUploadAction]. - static const values = [ - accept, - reject, - ]; - - static AssetUploadAction? fromJson(dynamic value) => AssetUploadActionTypeTransformer().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 = AssetUploadAction.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } -} - -/// Transformation class that can [encode] an instance of [AssetUploadAction] to String, -/// and [decode] dynamic data back to [AssetUploadAction]. -class AssetUploadActionTypeTransformer { - factory AssetUploadActionTypeTransformer() => _instance ??= const AssetUploadActionTypeTransformer._(); - - const AssetUploadActionTypeTransformer._(); - - String encode(AssetUploadAction data) => data.value; - - /// Decodes a [dynamic value][data] to a AssetUploadAction. - /// - /// 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. - AssetUploadAction? decode(dynamic data, {bool allowNull = true}) { - if (data != null) { - switch (data) { - case r'accept': return AssetUploadAction.accept; - case r'reject': return AssetUploadAction.reject; - default: - if (!allowNull) { - throw ArgumentError('Unknown enum value to decode: $data'); - } - } - } - return null; - } - - /// Singleton [AssetUploadActionTypeTransformer] instance. - static AssetUploadActionTypeTransformer? _instance; -} - diff --git a/mobile/openapi/lib/model/asset_visibility.dart b/mobile/openapi/lib/model/asset_visibility.dart deleted file mode 100644 index 6290dffb2e..0000000000 --- a/mobile/openapi/lib/model/asset_visibility.dart +++ /dev/null @@ -1,91 +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; - -/// Asset visibility -class AssetVisibility { - /// Instantiate a new enum with the provided [value]. - const AssetVisibility._(this.value); - - /// The underlying value of this enum member. - final String value; - - @override - String toString() => value; - - String toJson() => value; - - static const archive = AssetVisibility._(r'archive'); - static const timeline = AssetVisibility._(r'timeline'); - static const hidden = AssetVisibility._(r'hidden'); - static const locked = AssetVisibility._(r'locked'); - - /// List of all possible values in this [enum][AssetVisibility]. - static const values = [ - archive, - timeline, - hidden, - locked, - ]; - - static AssetVisibility? fromJson(dynamic value) => AssetVisibilityTypeTransformer().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 = AssetVisibility.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } -} - -/// Transformation class that can [encode] an instance of [AssetVisibility] to String, -/// and [decode] dynamic data back to [AssetVisibility]. -class AssetVisibilityTypeTransformer { - factory AssetVisibilityTypeTransformer() => _instance ??= const AssetVisibilityTypeTransformer._(); - - const AssetVisibilityTypeTransformer._(); - - String encode(AssetVisibility data) => data.value; - - /// Decodes a [dynamic value][data] to a AssetVisibility. - /// - /// 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. - AssetVisibility? decode(dynamic data, {bool allowNull = true}) { - if (data != null) { - switch (data) { - case r'archive': return AssetVisibility.archive; - case r'timeline': return AssetVisibility.timeline; - case r'hidden': return AssetVisibility.hidden; - case r'locked': return AssetVisibility.locked; - default: - if (!allowNull) { - throw ArgumentError('Unknown enum value to decode: $data'); - } - } - } - return null; - } - - /// Singleton [AssetVisibilityTypeTransformer] instance. - static AssetVisibilityTypeTransformer? _instance; -} - diff --git a/mobile/openapi/lib/model/audio_codec.dart b/mobile/openapi/lib/model/audio_codec.dart deleted file mode 100644 index d1c10e08a1..0000000000 --- a/mobile/openapi/lib/model/audio_codec.dart +++ /dev/null @@ -1,91 +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; - -/// Target audio codec -class AudioCodec { - /// Instantiate a new enum with the provided [value]. - const AudioCodec._(this.value); - - /// The underlying value of this enum member. - final String value; - - @override - String toString() => value; - - String toJson() => value; - - static const mp3 = AudioCodec._(r'mp3'); - static const aac = AudioCodec._(r'aac'); - static const opus = AudioCodec._(r'opus'); - static const pcmS16le = AudioCodec._(r'pcm_s16le'); - - /// List of all possible values in this [enum][AudioCodec]. - static const values = [ - mp3, - aac, - opus, - pcmS16le, - ]; - - static AudioCodec? fromJson(dynamic value) => AudioCodecTypeTransformer().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 = AudioCodec.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } -} - -/// Transformation class that can [encode] an instance of [AudioCodec] to String, -/// and [decode] dynamic data back to [AudioCodec]. -class AudioCodecTypeTransformer { - factory AudioCodecTypeTransformer() => _instance ??= const AudioCodecTypeTransformer._(); - - const AudioCodecTypeTransformer._(); - - String encode(AudioCodec data) => data.value; - - /// Decodes a [dynamic value][data] to a AudioCodec. - /// - /// 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. - AudioCodec? decode(dynamic data, {bool allowNull = true}) { - if (data != null) { - switch (data) { - case r'mp3': return AudioCodec.mp3; - case r'aac': return AudioCodec.aac; - case r'opus': return AudioCodec.opus; - case r'pcm_s16le': return AudioCodec.pcmS16le; - default: - if (!allowNull) { - throw ArgumentError('Unknown enum value to decode: $data'); - } - } - } - return null; - } - - /// Singleton [AudioCodecTypeTransformer] instance. - static AudioCodecTypeTransformer? _instance; -} - diff --git a/mobile/openapi/lib/model/auth_status_response_dto.dart b/mobile/openapi/lib/model/auth_status_response_dto.dart deleted file mode 100644 index f0dc61215e..0000000000 --- a/mobile/openapi/lib/model/auth_status_response_dto.dart +++ /dev/null @@ -1,152 +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 AuthStatusResponseDto { - /// Returns a new [AuthStatusResponseDto] instance. - AuthStatusResponseDto({ - this.expiresAt = const Optional.absent(), - required this.isElevated, - required this.password, - required this.pinCode, - this.pinExpiresAt = const Optional.absent(), - }); - - /// Session expiration date - /// - /// 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. - /// - Optional expiresAt; - - /// Is elevated session - bool isElevated; - - /// Has password set - bool password; - - /// Has PIN code set - bool pinCode; - - /// PIN expiration date - /// - /// 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. - /// - Optional pinExpiresAt; - - @override - bool operator ==(Object other) => identical(this, other) || other is AuthStatusResponseDto && - other.expiresAt == expiresAt && - other.isElevated == isElevated && - other.password == password && - other.pinCode == pinCode && - other.pinExpiresAt == pinExpiresAt; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (expiresAt == null ? 0 : expiresAt!.hashCode) + - (isElevated.hashCode) + - (password.hashCode) + - (pinCode.hashCode) + - (pinExpiresAt == null ? 0 : pinExpiresAt!.hashCode); - - @override - String toString() => 'AuthStatusResponseDto[expiresAt=$expiresAt, isElevated=$isElevated, password=$password, pinCode=$pinCode, pinExpiresAt=$pinExpiresAt]'; - - Map toJson() { - final json = {}; - if (this.expiresAt.isPresent) { - final value = this.expiresAt.value; - json[r'expiresAt'] = value; - } - json[r'isElevated'] = this.isElevated; - json[r'password'] = this.password; - json[r'pinCode'] = this.pinCode; - if (this.pinExpiresAt.isPresent) { - final value = this.pinExpiresAt.value; - json[r'pinExpiresAt'] = value; - } - return json; - } - - /// Returns a new [AuthStatusResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static AuthStatusResponseDto? fromJson(dynamic value) { - upgradeDto(value, "AuthStatusResponseDto"); - if (value is Map) { - final json = value.cast(); - - return AuthStatusResponseDto( - expiresAt: json.containsKey(r'expiresAt') ? Optional.present(mapValueOfType(json, r'expiresAt')) : const Optional.absent(), - isElevated: mapValueOfType(json, r'isElevated')!, - password: mapValueOfType(json, r'password')!, - pinCode: mapValueOfType(json, r'pinCode')!, - pinExpiresAt: json.containsKey(r'pinExpiresAt') ? Optional.present(mapValueOfType(json, r'pinExpiresAt')) : const Optional.absent(), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = AuthStatusResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = AuthStatusResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of AuthStatusResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = AuthStatusResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'isElevated', - 'password', - 'pinCode', - }; -} - diff --git a/mobile/openapi/lib/model/avatar_update.dart b/mobile/openapi/lib/model/avatar_update.dart deleted file mode 100644 index 1075f0df46..0000000000 --- a/mobile/openapi/lib/model/avatar_update.dart +++ /dev/null @@ -1,107 +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 AvatarUpdate { - /// Returns a new [AvatarUpdate] instance. - AvatarUpdate({ - this.color = const Optional.absent(), - }); - - /// - /// 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. - /// - Optional color; - - @override - bool operator ==(Object other) => identical(this, other) || other is AvatarUpdate && - other.color == color; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (color == null ? 0 : color!.hashCode); - - @override - String toString() => 'AvatarUpdate[color=$color]'; - - Map toJson() { - final json = {}; - if (this.color.isPresent) { - final value = this.color.value; - json[r'color'] = value; - } - return json; - } - - /// Returns a new [AvatarUpdate] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static AvatarUpdate? fromJson(dynamic value) { - upgradeDto(value, "AvatarUpdate"); - if (value is Map) { - final json = value.cast(); - - return AvatarUpdate( - color: json.containsKey(r'color') ? Optional.present(UserAvatarColor.fromJson(json[r'color'])) : const Optional.absent(), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = AvatarUpdate.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = AvatarUpdate.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of AvatarUpdate-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = AvatarUpdate.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - }; -} - diff --git a/mobile/openapi/lib/model/bulk_id_error_reason.dart b/mobile/openapi/lib/model/bulk_id_error_reason.dart deleted file mode 100644 index fd6c61d6fd..0000000000 --- a/mobile/openapi/lib/model/bulk_id_error_reason.dart +++ /dev/null @@ -1,94 +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; - -/// Error reason -class BulkIdErrorReason { - /// Instantiate a new enum with the provided [value]. - const BulkIdErrorReason._(this.value); - - /// The underlying value of this enum member. - final String value; - - @override - String toString() => value; - - String toJson() => value; - - static const duplicate = BulkIdErrorReason._(r'duplicate'); - static const noPermission = BulkIdErrorReason._(r'no_permission'); - static const notFound = BulkIdErrorReason._(r'not_found'); - static const unknown = BulkIdErrorReason._(r'unknown'); - static const validation = BulkIdErrorReason._(r'validation'); - - /// List of all possible values in this [enum][BulkIdErrorReason]. - static const values = [ - duplicate, - noPermission, - notFound, - unknown, - validation, - ]; - - static BulkIdErrorReason? fromJson(dynamic value) => BulkIdErrorReasonTypeTransformer().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 = BulkIdErrorReason.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } -} - -/// Transformation class that can [encode] an instance of [BulkIdErrorReason] to String, -/// and [decode] dynamic data back to [BulkIdErrorReason]. -class BulkIdErrorReasonTypeTransformer { - factory BulkIdErrorReasonTypeTransformer() => _instance ??= const BulkIdErrorReasonTypeTransformer._(); - - const BulkIdErrorReasonTypeTransformer._(); - - String encode(BulkIdErrorReason data) => data.value; - - /// Decodes a [dynamic value][data] to a BulkIdErrorReason. - /// - /// 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. - BulkIdErrorReason? decode(dynamic data, {bool allowNull = true}) { - if (data != null) { - switch (data) { - case r'duplicate': return BulkIdErrorReason.duplicate; - case r'no_permission': return BulkIdErrorReason.noPermission; - case r'not_found': return BulkIdErrorReason.notFound; - case r'unknown': return BulkIdErrorReason.unknown; - case r'validation': return BulkIdErrorReason.validation; - default: - if (!allowNull) { - throw ArgumentError('Unknown enum value to decode: $data'); - } - } - } - return null; - } - - /// Singleton [BulkIdErrorReasonTypeTransformer] instance. - static BulkIdErrorReasonTypeTransformer? _instance; -} - diff --git a/mobile/openapi/lib/model/bulk_id_response_dto.dart b/mobile/openapi/lib/model/bulk_id_response_dto.dart deleted file mode 100644 index 301400fa5e..0000000000 --- a/mobile/openapi/lib/model/bulk_id_response_dto.dart +++ /dev/null @@ -1,141 +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 BulkIdResponseDto { - /// Returns a new [BulkIdResponseDto] instance. - BulkIdResponseDto({ - this.error = const Optional.absent(), - this.errorMessage = const Optional.absent(), - required this.id, - required this.success, - }); - - /// - /// 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. - /// - Optional error; - - /// - /// 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. - /// - Optional errorMessage; - - /// ID - String id; - - /// Whether operation succeeded - bool success; - - @override - bool operator ==(Object other) => identical(this, other) || other is BulkIdResponseDto && - other.error == error && - other.errorMessage == errorMessage && - other.id == id && - other.success == success; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (error == null ? 0 : error!.hashCode) + - (errorMessage == null ? 0 : errorMessage!.hashCode) + - (id.hashCode) + - (success.hashCode); - - @override - String toString() => 'BulkIdResponseDto[error=$error, errorMessage=$errorMessage, id=$id, success=$success]'; - - Map toJson() { - final json = {}; - if (this.error.isPresent) { - final value = this.error.value; - json[r'error'] = value; - } - if (this.errorMessage.isPresent) { - final value = this.errorMessage.value; - json[r'errorMessage'] = value; - } - json[r'id'] = this.id; - json[r'success'] = this.success; - return json; - } - - /// Returns a new [BulkIdResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static BulkIdResponseDto? fromJson(dynamic value) { - upgradeDto(value, "BulkIdResponseDto"); - if (value is Map) { - final json = value.cast(); - - return BulkIdResponseDto( - error: json.containsKey(r'error') ? Optional.present(BulkIdErrorReason.fromJson(json[r'error'])) : const Optional.absent(), - errorMessage: json.containsKey(r'errorMessage') ? Optional.present(mapValueOfType(json, r'errorMessage')) : const Optional.absent(), - id: mapValueOfType(json, r'id')!, - success: mapValueOfType(json, r'success')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = BulkIdResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = BulkIdResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of BulkIdResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = BulkIdResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'id', - 'success', - }; -} - diff --git a/mobile/openapi/lib/model/bulk_ids_dto.dart b/mobile/openapi/lib/model/bulk_ids_dto.dart deleted file mode 100644 index 7e7864a285..0000000000 --- a/mobile/openapi/lib/model/bulk_ids_dto.dart +++ /dev/null @@ -1,102 +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 BulkIdsDto { - /// Returns a new [BulkIdsDto] instance. - BulkIdsDto({ - this.ids = const [], - }); - - /// IDs to process - List ids; - - @override - bool operator ==(Object other) => identical(this, other) || other is BulkIdsDto && - _deepEquality.equals(other.ids, ids); - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (ids.hashCode); - - @override - String toString() => 'BulkIdsDto[ids=$ids]'; - - Map toJson() { - final json = {}; - json[r'ids'] = this.ids; - return json; - } - - /// Returns a new [BulkIdsDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static BulkIdsDto? fromJson(dynamic value) { - upgradeDto(value, "BulkIdsDto"); - if (value is Map) { - final json = value.cast(); - - return BulkIdsDto( - ids: json[r'ids'] is Iterable - ? (json[r'ids'] as Iterable).cast().toList(growable: false) - : const [], - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = BulkIdsDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = BulkIdsDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of BulkIdsDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = BulkIdsDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'ids', - }; -} - diff --git a/mobile/openapi/lib/model/calendar_heatmap_response_dto.dart b/mobile/openapi/lib/model/calendar_heatmap_response_dto.dart deleted file mode 100644 index 2da9c411d4..0000000000 --- a/mobile/openapi/lib/model/calendar_heatmap_response_dto.dart +++ /dev/null @@ -1,129 +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 CalendarHeatmapResponseDto { - /// Returns a new [CalendarHeatmapResponseDto] instance. - CalendarHeatmapResponseDto({ - required this.from, - this.series = const [], - required this.to, - required this.totalCount, - }); - - /// Start date in UTC - String from; - - List series; - - /// End date in UTC - String to; - - /// Total activity count over the period - /// - /// Minimum value: 0 - /// Maximum value: 9007199254740991 - int totalCount; - - @override - bool operator ==(Object other) => identical(this, other) || other is CalendarHeatmapResponseDto && - other.from == from && - _deepEquality.equals(other.series, series) && - other.to == to && - other.totalCount == totalCount; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (from.hashCode) + - (series.hashCode) + - (to.hashCode) + - (totalCount.hashCode); - - @override - String toString() => 'CalendarHeatmapResponseDto[from=$from, series=$series, to=$to, totalCount=$totalCount]'; - - Map toJson() { - final json = {}; - json[r'from'] = this.from; - json[r'series'] = this.series; - json[r'to'] = this.to; - json[r'totalCount'] = this.totalCount; - return json; - } - - /// Returns a new [CalendarHeatmapResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static CalendarHeatmapResponseDto? fromJson(dynamic value) { - upgradeDto(value, "CalendarHeatmapResponseDto"); - if (value is Map) { - final json = value.cast(); - - return CalendarHeatmapResponseDto( - from: mapValueOfType(json, r'from')!, - series: CalendarHeatmapResponseDtoSeriesInner.listFromJson(json[r'series']), - to: mapValueOfType(json, r'to')!, - totalCount: mapValueOfType(json, r'totalCount')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = CalendarHeatmapResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = CalendarHeatmapResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of CalendarHeatmapResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = CalendarHeatmapResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'from', - 'series', - 'to', - 'totalCount', - }; -} - diff --git a/mobile/openapi/lib/model/calendar_heatmap_response_dto_series_inner.dart b/mobile/openapi/lib/model/calendar_heatmap_response_dto_series_inner.dart deleted file mode 100644 index d1bdd467d4..0000000000 --- a/mobile/openapi/lib/model/calendar_heatmap_response_dto_series_inner.dart +++ /dev/null @@ -1,112 +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 CalendarHeatmapResponseDtoSeriesInner { - /// Returns a new [CalendarHeatmapResponseDtoSeriesInner] instance. - CalendarHeatmapResponseDtoSeriesInner({ - required this.count, - required this.date, - }); - - /// Activity count - /// - /// Minimum value: 0 - /// Maximum value: 9007199254740991 - int count; - - /// Date in UTC - String date; - - @override - bool operator ==(Object other) => identical(this, other) || other is CalendarHeatmapResponseDtoSeriesInner && - other.count == count && - other.date == date; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (count.hashCode) + - (date.hashCode); - - @override - String toString() => 'CalendarHeatmapResponseDtoSeriesInner[count=$count, date=$date]'; - - Map toJson() { - final json = {}; - json[r'count'] = this.count; - json[r'date'] = this.date; - return json; - } - - /// Returns a new [CalendarHeatmapResponseDtoSeriesInner] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static CalendarHeatmapResponseDtoSeriesInner? fromJson(dynamic value) { - upgradeDto(value, "CalendarHeatmapResponseDtoSeriesInner"); - if (value is Map) { - final json = value.cast(); - - return CalendarHeatmapResponseDtoSeriesInner( - count: mapValueOfType(json, r'count')!, - date: mapValueOfType(json, r'date')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = CalendarHeatmapResponseDtoSeriesInner.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = CalendarHeatmapResponseDtoSeriesInner.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of CalendarHeatmapResponseDtoSeriesInner-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = CalendarHeatmapResponseDtoSeriesInner.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'count', - 'date', - }; -} - diff --git a/mobile/openapi/lib/model/calendar_heatmap_type.dart b/mobile/openapi/lib/model/calendar_heatmap_type.dart deleted file mode 100644 index 8fdc0b1727..0000000000 --- a/mobile/openapi/lib/model/calendar_heatmap_type.dart +++ /dev/null @@ -1,85 +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; - -/// Type of calendar heatmap -class CalendarHeatmapType { - /// Instantiate a new enum with the provided [value]. - const CalendarHeatmapType._(this.value); - - /// The underlying value of this enum member. - final String value; - - @override - String toString() => value; - - String toJson() => value; - - static const upload = CalendarHeatmapType._(r'Upload'); - static const taken = CalendarHeatmapType._(r'Taken'); - - /// List of all possible values in this [enum][CalendarHeatmapType]. - static const values = [ - upload, - taken, - ]; - - static CalendarHeatmapType? fromJson(dynamic value) => CalendarHeatmapTypeTypeTransformer().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 = CalendarHeatmapType.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } -} - -/// Transformation class that can [encode] an instance of [CalendarHeatmapType] to String, -/// and [decode] dynamic data back to [CalendarHeatmapType]. -class CalendarHeatmapTypeTypeTransformer { - factory CalendarHeatmapTypeTypeTransformer() => _instance ??= const CalendarHeatmapTypeTypeTransformer._(); - - const CalendarHeatmapTypeTypeTransformer._(); - - String encode(CalendarHeatmapType data) => data.value; - - /// Decodes a [dynamic value][data] to a CalendarHeatmapType. - /// - /// 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. - CalendarHeatmapType? decode(dynamic data, {bool allowNull = true}) { - if (data != null) { - switch (data) { - case r'Upload': return CalendarHeatmapType.upload; - case r'Taken': return CalendarHeatmapType.taken; - default: - if (!allowNull) { - throw ArgumentError('Unknown enum value to decode: $data'); - } - } - } - return null; - } - - /// Singleton [CalendarHeatmapTypeTypeTransformer] instance. - static CalendarHeatmapTypeTypeTransformer? _instance; -} - diff --git a/mobile/openapi/lib/model/cast_response.dart b/mobile/openapi/lib/model/cast_response.dart deleted file mode 100644 index 796138b0bf..0000000000 --- a/mobile/openapi/lib/model/cast_response.dart +++ /dev/null @@ -1,100 +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 CastResponse { - /// Returns a new [CastResponse] instance. - CastResponse({ - required this.gCastEnabled, - }); - - /// Whether Google Cast is enabled - bool gCastEnabled; - - @override - bool operator ==(Object other) => identical(this, other) || other is CastResponse && - other.gCastEnabled == gCastEnabled; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (gCastEnabled.hashCode); - - @override - String toString() => 'CastResponse[gCastEnabled=$gCastEnabled]'; - - Map toJson() { - final json = {}; - json[r'gCastEnabled'] = this.gCastEnabled; - return json; - } - - /// Returns a new [CastResponse] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static CastResponse? fromJson(dynamic value) { - upgradeDto(value, "CastResponse"); - if (value is Map) { - final json = value.cast(); - - return CastResponse( - gCastEnabled: mapValueOfType(json, r'gCastEnabled')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = CastResponse.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = CastResponse.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of CastResponse-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = CastResponse.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'gCastEnabled', - }; -} - diff --git a/mobile/openapi/lib/model/cast_update.dart b/mobile/openapi/lib/model/cast_update.dart deleted file mode 100644 index f9eb5be382..0000000000 --- a/mobile/openapi/lib/model/cast_update.dart +++ /dev/null @@ -1,108 +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 CastUpdate { - /// Returns a new [CastUpdate] instance. - CastUpdate({ - this.gCastEnabled = const Optional.absent(), - }); - - /// Whether Google Cast is enabled - /// - /// 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. - /// - Optional gCastEnabled; - - @override - bool operator ==(Object other) => identical(this, other) || other is CastUpdate && - other.gCastEnabled == gCastEnabled; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (gCastEnabled == null ? 0 : gCastEnabled!.hashCode); - - @override - String toString() => 'CastUpdate[gCastEnabled=$gCastEnabled]'; - - Map toJson() { - final json = {}; - if (this.gCastEnabled.isPresent) { - final value = this.gCastEnabled.value; - json[r'gCastEnabled'] = value; - } - return json; - } - - /// Returns a new [CastUpdate] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static CastUpdate? fromJson(dynamic value) { - upgradeDto(value, "CastUpdate"); - if (value is Map) { - final json = value.cast(); - - return CastUpdate( - gCastEnabled: json.containsKey(r'gCastEnabled') ? Optional.present(mapValueOfType(json, r'gCastEnabled')) : const Optional.absent(), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = CastUpdate.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = CastUpdate.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of CastUpdate-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = CastUpdate.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - }; -} - diff --git a/mobile/openapi/lib/model/change_password_dto.dart b/mobile/openapi/lib/model/change_password_dto.dart deleted file mode 100644 index 369e960dac..0000000000 --- a/mobile/openapi/lib/model/change_password_dto.dart +++ /dev/null @@ -1,120 +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 ChangePasswordDto { - /// Returns a new [ChangePasswordDto] instance. - ChangePasswordDto({ - this.invalidateSessions = const Optional.present(false), - required this.newPassword, - required this.password, - }); - - /// Invalidate all other sessions - Optional invalidateSessions; - - /// New password (min 8 characters) - String newPassword; - - /// Current password - String password; - - @override - bool operator ==(Object other) => identical(this, other) || other is ChangePasswordDto && - other.invalidateSessions == invalidateSessions && - other.newPassword == newPassword && - other.password == password; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (invalidateSessions.hashCode) + - (newPassword.hashCode) + - (password.hashCode); - - @override - String toString() => 'ChangePasswordDto[invalidateSessions=$invalidateSessions, newPassword=$newPassword, password=$password]'; - - Map toJson() { - final json = {}; - if (this.invalidateSessions.isPresent) { - final value = this.invalidateSessions.value; - json[r'invalidateSessions'] = value; - } - json[r'newPassword'] = this.newPassword; - json[r'password'] = this.password; - return json; - } - - /// Returns a new [ChangePasswordDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static ChangePasswordDto? fromJson(dynamic value) { - upgradeDto(value, "ChangePasswordDto"); - if (value is Map) { - final json = value.cast(); - - return ChangePasswordDto( - invalidateSessions: json.containsKey(r'invalidateSessions') ? Optional.present(mapValueOfType(json, r'invalidateSessions')) : const Optional.absent(), - newPassword: mapValueOfType(json, r'newPassword')!, - password: mapValueOfType(json, r'password')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = ChangePasswordDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = ChangePasswordDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of ChangePasswordDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = ChangePasswordDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'newPassword', - 'password', - }; -} - diff --git a/mobile/openapi/lib/model/clip_config.dart b/mobile/openapi/lib/model/clip_config.dart deleted file mode 100644 index 915e4975ed..0000000000 --- a/mobile/openapi/lib/model/clip_config.dart +++ /dev/null @@ -1,109 +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 CLIPConfig { - /// Returns a new [CLIPConfig] instance. - CLIPConfig({ - required this.enabled, - required this.modelName, - }); - - /// Whether the task is enabled - bool enabled; - - /// Name of the model to use - String modelName; - - @override - bool operator ==(Object other) => identical(this, other) || other is CLIPConfig && - other.enabled == enabled && - other.modelName == modelName; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (enabled.hashCode) + - (modelName.hashCode); - - @override - String toString() => 'CLIPConfig[enabled=$enabled, modelName=$modelName]'; - - Map toJson() { - final json = {}; - json[r'enabled'] = this.enabled; - json[r'modelName'] = this.modelName; - return json; - } - - /// Returns a new [CLIPConfig] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static CLIPConfig? fromJson(dynamic value) { - upgradeDto(value, "CLIPConfig"); - if (value is Map) { - final json = value.cast(); - - return CLIPConfig( - enabled: mapValueOfType(json, r'enabled')!, - modelName: mapValueOfType(json, r'modelName')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = CLIPConfig.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = CLIPConfig.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of CLIPConfig-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = CLIPConfig.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'enabled', - 'modelName', - }; -} - diff --git a/mobile/openapi/lib/model/colorspace.dart b/mobile/openapi/lib/model/colorspace.dart deleted file mode 100644 index e871e140fb..0000000000 --- a/mobile/openapi/lib/model/colorspace.dart +++ /dev/null @@ -1,85 +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; - -/// Colorspace -class Colorspace { - /// Instantiate a new enum with the provided [value]. - const Colorspace._(this.value); - - /// The underlying value of this enum member. - final String value; - - @override - String toString() => value; - - String toJson() => value; - - static const srgb = Colorspace._(r'srgb'); - static const p3 = Colorspace._(r'p3'); - - /// List of all possible values in this [enum][Colorspace]. - static const values = [ - srgb, - p3, - ]; - - static Colorspace? fromJson(dynamic value) => ColorspaceTypeTransformer().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 = Colorspace.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } -} - -/// Transformation class that can [encode] an instance of [Colorspace] to String, -/// and [decode] dynamic data back to [Colorspace]. -class ColorspaceTypeTransformer { - factory ColorspaceTypeTransformer() => _instance ??= const ColorspaceTypeTransformer._(); - - const ColorspaceTypeTransformer._(); - - String encode(Colorspace data) => data.value; - - /// Decodes a [dynamic value][data] to a Colorspace. - /// - /// 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. - Colorspace? decode(dynamic data, {bool allowNull = true}) { - if (data != null) { - switch (data) { - case r'srgb': return Colorspace.srgb; - case r'p3': return Colorspace.p3; - default: - if (!allowNull) { - throw ArgumentError('Unknown enum value to decode: $data'); - } - } - } - return null; - } - - /// Singleton [ColorspaceTypeTransformer] instance. - static ColorspaceTypeTransformer? _instance; -} - diff --git a/mobile/openapi/lib/model/contributor_count_response_dto.dart b/mobile/openapi/lib/model/contributor_count_response_dto.dart deleted file mode 100644 index af5b2cbf68..0000000000 --- a/mobile/openapi/lib/model/contributor_count_response_dto.dart +++ /dev/null @@ -1,112 +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 ContributorCountResponseDto { - /// Returns a new [ContributorCountResponseDto] instance. - ContributorCountResponseDto({ - required this.assetCount, - required this.userId, - }); - - /// Number of assets contributed - /// - /// Minimum value: 0 - /// Maximum value: 9007199254740991 - int assetCount; - - /// User ID - String userId; - - @override - bool operator ==(Object other) => identical(this, other) || other is ContributorCountResponseDto && - other.assetCount == assetCount && - other.userId == userId; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (assetCount.hashCode) + - (userId.hashCode); - - @override - String toString() => 'ContributorCountResponseDto[assetCount=$assetCount, userId=$userId]'; - - Map toJson() { - final json = {}; - json[r'assetCount'] = this.assetCount; - json[r'userId'] = this.userId; - return json; - } - - /// Returns a new [ContributorCountResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static ContributorCountResponseDto? fromJson(dynamic value) { - upgradeDto(value, "ContributorCountResponseDto"); - if (value is Map) { - final json = value.cast(); - - return ContributorCountResponseDto( - assetCount: mapValueOfType(json, r'assetCount')!, - userId: mapValueOfType(json, r'userId')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = ContributorCountResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = ContributorCountResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of ContributorCountResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = ContributorCountResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'assetCount', - 'userId', - }; -} - diff --git a/mobile/openapi/lib/model/cq_mode.dart b/mobile/openapi/lib/model/cq_mode.dart deleted file mode 100644 index efd788b5fb..0000000000 --- a/mobile/openapi/lib/model/cq_mode.dart +++ /dev/null @@ -1,88 +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; - -/// CQ mode -class CQMode { - /// Instantiate a new enum with the provided [value]. - const CQMode._(this.value); - - /// The underlying value of this enum member. - final String value; - - @override - String toString() => value; - - String toJson() => value; - - static const auto = CQMode._(r'auto'); - static const cqp = CQMode._(r'cqp'); - static const icq = CQMode._(r'icq'); - - /// List of all possible values in this [enum][CQMode]. - static const values = [ - auto, - cqp, - icq, - ]; - - static CQMode? fromJson(dynamic value) => CQModeTypeTransformer().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 = CQMode.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } -} - -/// Transformation class that can [encode] an instance of [CQMode] to String, -/// and [decode] dynamic data back to [CQMode]. -class CQModeTypeTransformer { - factory CQModeTypeTransformer() => _instance ??= const CQModeTypeTransformer._(); - - const CQModeTypeTransformer._(); - - String encode(CQMode data) => data.value; - - /// Decodes a [dynamic value][data] to a CQMode. - /// - /// 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. - CQMode? decode(dynamic data, {bool allowNull = true}) { - if (data != null) { - switch (data) { - case r'auto': return CQMode.auto; - case r'cqp': return CQMode.cqp; - case r'icq': return CQMode.icq; - default: - if (!allowNull) { - throw ArgumentError('Unknown enum value to decode: $data'); - } - } - } - return null; - } - - /// Singleton [CQModeTypeTransformer] instance. - static CQModeTypeTransformer? _instance; -} - diff --git a/mobile/openapi/lib/model/create_album_dto.dart b/mobile/openapi/lib/model/create_album_dto.dart deleted file mode 100644 index a028146964..0000000000 --- a/mobile/openapi/lib/model/create_album_dto.dart +++ /dev/null @@ -1,141 +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 CreateAlbumDto { - /// Returns a new [CreateAlbumDto] instance. - CreateAlbumDto({ - required this.albumName, - this.albumUsers = const Optional.present(const []), - this.assetIds = const Optional.present(const []), - this.description = const Optional.absent(), - }); - - /// Album name - String albumName; - - /// Album users - Optional?> albumUsers; - - /// Initial asset IDs - Optional?> assetIds; - - /// Album description - /// - /// 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. - /// - Optional description; - - @override - bool operator ==(Object other) => identical(this, other) || other is CreateAlbumDto && - other.albumName == albumName && - _deepEquality.equals(other.albumUsers, albumUsers) && - _deepEquality.equals(other.assetIds, assetIds) && - other.description == description; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (albumName.hashCode) + - (albumUsers.hashCode) + - (assetIds.hashCode) + - (description == null ? 0 : description!.hashCode); - - @override - String toString() => 'CreateAlbumDto[albumName=$albumName, albumUsers=$albumUsers, assetIds=$assetIds, description=$description]'; - - Map toJson() { - final json = {}; - json[r'albumName'] = this.albumName; - if (this.albumUsers.isPresent) { - final value = this.albumUsers.value; - json[r'albumUsers'] = value; - } - if (this.assetIds.isPresent) { - final value = this.assetIds.value; - json[r'assetIds'] = value; - } - if (this.description.isPresent) { - final value = this.description.value; - json[r'description'] = value; - } - return json; - } - - /// Returns a new [CreateAlbumDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static CreateAlbumDto? fromJson(dynamic value) { - upgradeDto(value, "CreateAlbumDto"); - if (value is Map) { - final json = value.cast(); - - return CreateAlbumDto( - albumName: mapValueOfType(json, r'albumName')!, - albumUsers: json.containsKey(r'albumUsers') ? Optional.present(AlbumUserCreateDto.listFromJson(json[r'albumUsers'])) : const Optional.absent(), - assetIds: json.containsKey(r'assetIds') ? Optional.present(json[r'assetIds'] is Iterable - ? (json[r'assetIds'] as Iterable).cast().toList(growable: false) - : const []) : const Optional.absent(), - description: json.containsKey(r'description') ? Optional.present(mapValueOfType(json, r'description')) : const Optional.absent(), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = CreateAlbumDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = CreateAlbumDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of CreateAlbumDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = CreateAlbumDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'albumName', - }; -} - diff --git a/mobile/openapi/lib/model/create_library_dto.dart b/mobile/openapi/lib/model/create_library_dto.dart deleted file mode 100644 index 61eb9867b8..0000000000 --- a/mobile/openapi/lib/model/create_library_dto.dart +++ /dev/null @@ -1,143 +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 CreateLibraryDto { - /// Returns a new [CreateLibraryDto] instance. - CreateLibraryDto({ - this.exclusionPatterns = const Optional.present(const []), - this.importPaths = const Optional.present(const []), - this.name = const Optional.absent(), - required this.ownerId, - }); - - /// Exclusion patterns (max 128) - Optional?> exclusionPatterns; - - /// Import paths (max 128) - Optional?> importPaths; - - /// Library name - /// - /// 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. - /// - Optional name; - - /// Owner user ID - String ownerId; - - @override - bool operator ==(Object other) => identical(this, other) || other is CreateLibraryDto && - _deepEquality.equals(other.exclusionPatterns, exclusionPatterns) && - _deepEquality.equals(other.importPaths, importPaths) && - other.name == name && - other.ownerId == ownerId; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (exclusionPatterns.hashCode) + - (importPaths.hashCode) + - (name == null ? 0 : name!.hashCode) + - (ownerId.hashCode); - - @override - String toString() => 'CreateLibraryDto[exclusionPatterns=$exclusionPatterns, importPaths=$importPaths, name=$name, ownerId=$ownerId]'; - - Map toJson() { - final json = {}; - if (this.exclusionPatterns.isPresent) { - final value = this.exclusionPatterns.value; - json[r'exclusionPatterns'] = value; - } - if (this.importPaths.isPresent) { - final value = this.importPaths.value; - json[r'importPaths'] = value; - } - if (this.name.isPresent) { - final value = this.name.value; - json[r'name'] = value; - } - json[r'ownerId'] = this.ownerId; - return json; - } - - /// Returns a new [CreateLibraryDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static CreateLibraryDto? fromJson(dynamic value) { - upgradeDto(value, "CreateLibraryDto"); - if (value is Map) { - final json = value.cast(); - - return CreateLibraryDto( - exclusionPatterns: json.containsKey(r'exclusionPatterns') ? Optional.present(json[r'exclusionPatterns'] is Iterable - ? (json[r'exclusionPatterns'] as Iterable).cast().toList(growable: false) - : const []) : const Optional.absent(), - importPaths: json.containsKey(r'importPaths') ? Optional.present(json[r'importPaths'] is Iterable - ? (json[r'importPaths'] as Iterable).cast().toList(growable: false) - : const []) : const Optional.absent(), - name: json.containsKey(r'name') ? Optional.present(mapValueOfType(json, r'name')) : const Optional.absent(), - ownerId: mapValueOfType(json, r'ownerId')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = CreateLibraryDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = CreateLibraryDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of CreateLibraryDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = CreateLibraryDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'ownerId', - }; -} - diff --git a/mobile/openapi/lib/model/create_profile_image_response_dto.dart b/mobile/openapi/lib/model/create_profile_image_response_dto.dart deleted file mode 100644 index 68700400e4..0000000000 --- a/mobile/openapi/lib/model/create_profile_image_response_dto.dart +++ /dev/null @@ -1,120 +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 CreateProfileImageResponseDto { - /// Returns a new [CreateProfileImageResponseDto] instance. - CreateProfileImageResponseDto({ - required this.profileChangedAt, - required this.profileImagePath, - required this.userId, - }); - - /// Profile image change date - DateTime profileChangedAt; - - /// Profile image file path - String profileImagePath; - - /// User ID - String userId; - - @override - bool operator ==(Object other) => identical(this, other) || other is CreateProfileImageResponseDto && - other.profileChangedAt == profileChangedAt && - other.profileImagePath == profileImagePath && - other.userId == userId; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (profileChangedAt.hashCode) + - (profileImagePath.hashCode) + - (userId.hashCode); - - @override - String toString() => 'CreateProfileImageResponseDto[profileChangedAt=$profileChangedAt, profileImagePath=$profileImagePath, userId=$userId]'; - - Map toJson() { - final json = {}; - json[r'profileChangedAt'] = _isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? this.profileChangedAt.millisecondsSinceEpoch - : this.profileChangedAt.toUtc().toIso8601String(); - json[r'profileImagePath'] = this.profileImagePath; - json[r'userId'] = this.userId; - return json; - } - - /// Returns a new [CreateProfileImageResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static CreateProfileImageResponseDto? fromJson(dynamic value) { - upgradeDto(value, "CreateProfileImageResponseDto"); - if (value is Map) { - final json = value.cast(); - - return CreateProfileImageResponseDto( - profileChangedAt: mapDateTime(json, r'profileChangedAt', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')!, - profileImagePath: mapValueOfType(json, r'profileImagePath')!, - userId: mapValueOfType(json, r'userId')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = CreateProfileImageResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = CreateProfileImageResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of CreateProfileImageResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = CreateProfileImageResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'profileChangedAt', - 'profileImagePath', - 'userId', - }; -} - diff --git a/mobile/openapi/lib/model/crop_parameters.dart b/mobile/openapi/lib/model/crop_parameters.dart deleted file mode 100644 index d19c23562b..0000000000 --- a/mobile/openapi/lib/model/crop_parameters.dart +++ /dev/null @@ -1,139 +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 CropParameters { - /// Returns a new [CropParameters] instance. - CropParameters({ - required this.height, - required this.width, - required this.x, - required this.y, - }); - - /// Height of the crop - /// - /// Minimum value: 1 - /// Maximum value: 9007199254740991 - int height; - - /// Width of the crop - /// - /// Minimum value: 1 - /// Maximum value: 9007199254740991 - int width; - - /// Top-Left X coordinate of crop - /// - /// Minimum value: 0 - /// Maximum value: 9007199254740991 - int x; - - /// Top-Left Y coordinate of crop - /// - /// Minimum value: 0 - /// Maximum value: 9007199254740991 - int y; - - @override - bool operator ==(Object other) => identical(this, other) || other is CropParameters && - other.height == height && - other.width == width && - other.x == x && - other.y == y; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (height.hashCode) + - (width.hashCode) + - (x.hashCode) + - (y.hashCode); - - @override - String toString() => 'CropParameters[height=$height, width=$width, x=$x, y=$y]'; - - Map toJson() { - final json = {}; - json[r'height'] = this.height; - json[r'width'] = this.width; - json[r'x'] = this.x; - json[r'y'] = this.y; - return json; - } - - /// Returns a new [CropParameters] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static CropParameters? fromJson(dynamic value) { - upgradeDto(value, "CropParameters"); - if (value is Map) { - final json = value.cast(); - - return CropParameters( - height: mapValueOfType(json, r'height')!, - width: mapValueOfType(json, r'width')!, - x: mapValueOfType(json, r'x')!, - y: mapValueOfType(json, r'y')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = CropParameters.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = CropParameters.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of CropParameters-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = CropParameters.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'height', - 'width', - 'x', - 'y', - }; -} - diff --git a/mobile/openapi/lib/model/database_backup_config.dart b/mobile/openapi/lib/model/database_backup_config.dart deleted file mode 100644 index 4beb32849e..0000000000 --- a/mobile/openapi/lib/model/database_backup_config.dart +++ /dev/null @@ -1,121 +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 DatabaseBackupConfig { - /// Returns a new [DatabaseBackupConfig] instance. - DatabaseBackupConfig({ - required this.cronExpression, - required this.enabled, - required this.keepLastAmount, - }); - - /// Cron expression - String cronExpression; - - /// Enabled - bool enabled; - - /// Keep last amount - /// - /// Minimum value: 1 - /// Maximum value: 9007199254740991 - int keepLastAmount; - - @override - bool operator ==(Object other) => identical(this, other) || other is DatabaseBackupConfig && - other.cronExpression == cronExpression && - other.enabled == enabled && - other.keepLastAmount == keepLastAmount; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (cronExpression.hashCode) + - (enabled.hashCode) + - (keepLastAmount.hashCode); - - @override - String toString() => 'DatabaseBackupConfig[cronExpression=$cronExpression, enabled=$enabled, keepLastAmount=$keepLastAmount]'; - - Map toJson() { - final json = {}; - json[r'cronExpression'] = this.cronExpression; - json[r'enabled'] = this.enabled; - json[r'keepLastAmount'] = this.keepLastAmount; - return json; - } - - /// Returns a new [DatabaseBackupConfig] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static DatabaseBackupConfig? fromJson(dynamic value) { - upgradeDto(value, "DatabaseBackupConfig"); - if (value is Map) { - final json = value.cast(); - - return DatabaseBackupConfig( - cronExpression: mapValueOfType(json, r'cronExpression')!, - enabled: mapValueOfType(json, r'enabled')!, - keepLastAmount: mapValueOfType(json, r'keepLastAmount')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = DatabaseBackupConfig.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = DatabaseBackupConfig.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of DatabaseBackupConfig-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = DatabaseBackupConfig.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'cronExpression', - 'enabled', - 'keepLastAmount', - }; -} - diff --git a/mobile/openapi/lib/model/database_backup_delete_dto.dart b/mobile/openapi/lib/model/database_backup_delete_dto.dart deleted file mode 100644 index c336270b84..0000000000 --- a/mobile/openapi/lib/model/database_backup_delete_dto.dart +++ /dev/null @@ -1,102 +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 DatabaseBackupDeleteDto { - /// Returns a new [DatabaseBackupDeleteDto] instance. - DatabaseBackupDeleteDto({ - this.backups = const [], - }); - - /// Backup filenames to delete - List backups; - - @override - bool operator ==(Object other) => identical(this, other) || other is DatabaseBackupDeleteDto && - _deepEquality.equals(other.backups, backups); - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (backups.hashCode); - - @override - String toString() => 'DatabaseBackupDeleteDto[backups=$backups]'; - - Map toJson() { - final json = {}; - json[r'backups'] = this.backups; - return json; - } - - /// Returns a new [DatabaseBackupDeleteDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static DatabaseBackupDeleteDto? fromJson(dynamic value) { - upgradeDto(value, "DatabaseBackupDeleteDto"); - if (value is Map) { - final json = value.cast(); - - return DatabaseBackupDeleteDto( - backups: json[r'backups'] is Iterable - ? (json[r'backups'] as Iterable).cast().toList(growable: false) - : const [], - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = DatabaseBackupDeleteDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = DatabaseBackupDeleteDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of DatabaseBackupDeleteDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = DatabaseBackupDeleteDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'backups', - }; -} - diff --git a/mobile/openapi/lib/model/database_backup_dto.dart b/mobile/openapi/lib/model/database_backup_dto.dart deleted file mode 100644 index 5a2590da40..0000000000 --- a/mobile/openapi/lib/model/database_backup_dto.dart +++ /dev/null @@ -1,121 +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 DatabaseBackupDto { - /// Returns a new [DatabaseBackupDto] instance. - DatabaseBackupDto({ - required this.filename, - required this.filesize, - required this.timezone, - }); - - /// Backup filename - String filename; - - /// Backup file size - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int filesize; - - /// Backup timezone - String timezone; - - @override - bool operator ==(Object other) => identical(this, other) || other is DatabaseBackupDto && - other.filename == filename && - other.filesize == filesize && - other.timezone == timezone; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (filename.hashCode) + - (filesize.hashCode) + - (timezone.hashCode); - - @override - String toString() => 'DatabaseBackupDto[filename=$filename, filesize=$filesize, timezone=$timezone]'; - - Map toJson() { - final json = {}; - json[r'filename'] = this.filename; - json[r'filesize'] = this.filesize; - json[r'timezone'] = this.timezone; - return json; - } - - /// Returns a new [DatabaseBackupDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static DatabaseBackupDto? fromJson(dynamic value) { - upgradeDto(value, "DatabaseBackupDto"); - if (value is Map) { - final json = value.cast(); - - return DatabaseBackupDto( - filename: mapValueOfType(json, r'filename')!, - filesize: mapValueOfType(json, r'filesize')!, - timezone: mapValueOfType(json, r'timezone')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = DatabaseBackupDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = DatabaseBackupDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of DatabaseBackupDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = DatabaseBackupDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'filename', - 'filesize', - 'timezone', - }; -} - diff --git a/mobile/openapi/lib/model/database_backup_list_response_dto.dart b/mobile/openapi/lib/model/database_backup_list_response_dto.dart deleted file mode 100644 index de7bf78d5a..0000000000 --- a/mobile/openapi/lib/model/database_backup_list_response_dto.dart +++ /dev/null @@ -1,100 +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 DatabaseBackupListResponseDto { - /// Returns a new [DatabaseBackupListResponseDto] instance. - DatabaseBackupListResponseDto({ - this.backups = const [], - }); - - /// List of backups - List backups; - - @override - bool operator ==(Object other) => identical(this, other) || other is DatabaseBackupListResponseDto && - _deepEquality.equals(other.backups, backups); - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (backups.hashCode); - - @override - String toString() => 'DatabaseBackupListResponseDto[backups=$backups]'; - - Map toJson() { - final json = {}; - json[r'backups'] = this.backups; - return json; - } - - /// Returns a new [DatabaseBackupListResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static DatabaseBackupListResponseDto? fromJson(dynamic value) { - upgradeDto(value, "DatabaseBackupListResponseDto"); - if (value is Map) { - final json = value.cast(); - - return DatabaseBackupListResponseDto( - backups: DatabaseBackupDto.listFromJson(json[r'backups']), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = DatabaseBackupListResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = DatabaseBackupListResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of DatabaseBackupListResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = DatabaseBackupListResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'backups', - }; -} - diff --git a/mobile/openapi/lib/model/download_archive_dto.dart b/mobile/openapi/lib/model/download_archive_dto.dart deleted file mode 100644 index f89ac8c867..0000000000 --- a/mobile/openapi/lib/model/download_archive_dto.dart +++ /dev/null @@ -1,119 +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 DownloadArchiveDto { - /// Returns a new [DownloadArchiveDto] instance. - DownloadArchiveDto({ - this.assetIds = const [], - this.edited = const Optional.absent(), - }); - - /// Asset IDs - List assetIds; - - /// Download edited asset if available - /// - /// 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. - /// - Optional edited; - - @override - bool operator ==(Object other) => identical(this, other) || other is DownloadArchiveDto && - _deepEquality.equals(other.assetIds, assetIds) && - other.edited == edited; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (assetIds.hashCode) + - (edited == null ? 0 : edited!.hashCode); - - @override - String toString() => 'DownloadArchiveDto[assetIds=$assetIds, edited=$edited]'; - - Map toJson() { - final json = {}; - json[r'assetIds'] = this.assetIds; - if (this.edited.isPresent) { - final value = this.edited.value; - json[r'edited'] = value; - } - return json; - } - - /// Returns a new [DownloadArchiveDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static DownloadArchiveDto? fromJson(dynamic value) { - upgradeDto(value, "DownloadArchiveDto"); - if (value is Map) { - final json = value.cast(); - - return DownloadArchiveDto( - assetIds: json[r'assetIds'] is Iterable - ? (json[r'assetIds'] as Iterable).cast().toList(growable: false) - : const [], - edited: json.containsKey(r'edited') ? Optional.present(mapValueOfType(json, r'edited')) : const Optional.absent(), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = DownloadArchiveDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = DownloadArchiveDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of DownloadArchiveDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = DownloadArchiveDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'assetIds', - }; -} - diff --git a/mobile/openapi/lib/model/download_archive_info.dart b/mobile/openapi/lib/model/download_archive_info.dart deleted file mode 100644 index dcb1258457..0000000000 --- a/mobile/openapi/lib/model/download_archive_info.dart +++ /dev/null @@ -1,114 +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 DownloadArchiveInfo { - /// Returns a new [DownloadArchiveInfo] instance. - DownloadArchiveInfo({ - this.assetIds = const [], - required this.size, - }); - - /// Asset IDs in this archive - List assetIds; - - /// Archive size in bytes - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int size; - - @override - bool operator ==(Object other) => identical(this, other) || other is DownloadArchiveInfo && - _deepEquality.equals(other.assetIds, assetIds) && - other.size == size; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (assetIds.hashCode) + - (size.hashCode); - - @override - String toString() => 'DownloadArchiveInfo[assetIds=$assetIds, size=$size]'; - - Map toJson() { - final json = {}; - json[r'assetIds'] = this.assetIds; - json[r'size'] = this.size; - return json; - } - - /// Returns a new [DownloadArchiveInfo] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static DownloadArchiveInfo? fromJson(dynamic value) { - upgradeDto(value, "DownloadArchiveInfo"); - if (value is Map) { - final json = value.cast(); - - return DownloadArchiveInfo( - assetIds: json[r'assetIds'] is Iterable - ? (json[r'assetIds'] as Iterable).cast().toList(growable: false) - : const [], - size: mapValueOfType(json, r'size')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = DownloadArchiveInfo.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = DownloadArchiveInfo.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of DownloadArchiveInfo-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = DownloadArchiveInfo.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'assetIds', - 'size', - }; -} - diff --git a/mobile/openapi/lib/model/download_info_dto.dart b/mobile/openapi/lib/model/download_info_dto.dart deleted file mode 100644 index 47e09de05a..0000000000 --- a/mobile/openapi/lib/model/download_info_dto.dart +++ /dev/null @@ -1,158 +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 DownloadInfoDto { - /// Returns a new [DownloadInfoDto] instance. - DownloadInfoDto({ - this.albumId = const Optional.absent(), - this.archiveSize = const Optional.absent(), - this.assetIds = const Optional.present(const []), - this.userId = const Optional.absent(), - }); - - /// Album ID to download - /// - /// 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. - /// - Optional albumId; - - /// Archive size limit in bytes - /// - /// Minimum value: 1 - /// Maximum value: 9007199254740991 - /// - /// 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. - /// - Optional archiveSize; - - /// Asset IDs to download - Optional?> assetIds; - - /// User ID to download assets from - /// - /// 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. - /// - Optional userId; - - @override - bool operator ==(Object other) => identical(this, other) || other is DownloadInfoDto && - other.albumId == albumId && - other.archiveSize == archiveSize && - _deepEquality.equals(other.assetIds, assetIds) && - other.userId == userId; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (albumId == null ? 0 : albumId!.hashCode) + - (archiveSize == null ? 0 : archiveSize!.hashCode) + - (assetIds.hashCode) + - (userId == null ? 0 : userId!.hashCode); - - @override - String toString() => 'DownloadInfoDto[albumId=$albumId, archiveSize=$archiveSize, assetIds=$assetIds, userId=$userId]'; - - Map toJson() { - final json = {}; - if (this.albumId.isPresent) { - final value = this.albumId.value; - json[r'albumId'] = value; - } - if (this.archiveSize.isPresent) { - final value = this.archiveSize.value; - json[r'archiveSize'] = value; - } - if (this.assetIds.isPresent) { - final value = this.assetIds.value; - json[r'assetIds'] = value; - } - if (this.userId.isPresent) { - final value = this.userId.value; - json[r'userId'] = value; - } - return json; - } - - /// Returns a new [DownloadInfoDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static DownloadInfoDto? fromJson(dynamic value) { - upgradeDto(value, "DownloadInfoDto"); - if (value is Map) { - final json = value.cast(); - - return DownloadInfoDto( - albumId: json.containsKey(r'albumId') ? Optional.present(mapValueOfType(json, r'albumId')) : const Optional.absent(), - archiveSize: json.containsKey(r'archiveSize') ? Optional.present(json[r'archiveSize'] == null ? null : int.parse('${json[r'archiveSize']}')) : const Optional.absent(), - assetIds: json.containsKey(r'assetIds') ? Optional.present(json[r'assetIds'] is Iterable - ? (json[r'assetIds'] as Iterable).cast().toList(growable: false) - : const []) : const Optional.absent(), - userId: json.containsKey(r'userId') ? Optional.present(mapValueOfType(json, r'userId')) : const Optional.absent(), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = DownloadInfoDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = DownloadInfoDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of DownloadInfoDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = DownloadInfoDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - }; -} - diff --git a/mobile/openapi/lib/model/download_response.dart b/mobile/openapi/lib/model/download_response.dart deleted file mode 100644 index bc1d7b4047..0000000000 --- a/mobile/openapi/lib/model/download_response.dart +++ /dev/null @@ -1,112 +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 DownloadResponse { - /// Returns a new [DownloadResponse] instance. - DownloadResponse({ - required this.archiveSize, - required this.includeEmbeddedVideos, - }); - - /// Maximum archive size in bytes - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int archiveSize; - - /// Whether to include embedded videos in downloads - bool includeEmbeddedVideos; - - @override - bool operator ==(Object other) => identical(this, other) || other is DownloadResponse && - other.archiveSize == archiveSize && - other.includeEmbeddedVideos == includeEmbeddedVideos; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (archiveSize.hashCode) + - (includeEmbeddedVideos.hashCode); - - @override - String toString() => 'DownloadResponse[archiveSize=$archiveSize, includeEmbeddedVideos=$includeEmbeddedVideos]'; - - Map toJson() { - final json = {}; - json[r'archiveSize'] = this.archiveSize; - json[r'includeEmbeddedVideos'] = this.includeEmbeddedVideos; - return json; - } - - /// Returns a new [DownloadResponse] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static DownloadResponse? fromJson(dynamic value) { - upgradeDto(value, "DownloadResponse"); - if (value is Map) { - final json = value.cast(); - - return DownloadResponse( - archiveSize: mapValueOfType(json, r'archiveSize')!, - includeEmbeddedVideos: mapValueOfType(json, r'includeEmbeddedVideos')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = DownloadResponse.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = DownloadResponse.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of DownloadResponse-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = DownloadResponse.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'archiveSize', - 'includeEmbeddedVideos', - }; -} - diff --git a/mobile/openapi/lib/model/download_response_dto.dart b/mobile/openapi/lib/model/download_response_dto.dart deleted file mode 100644 index bfe32307fa..0000000000 --- a/mobile/openapi/lib/model/download_response_dto.dart +++ /dev/null @@ -1,112 +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 DownloadResponseDto { - /// Returns a new [DownloadResponseDto] instance. - DownloadResponseDto({ - this.archives = const [], - required this.totalSize, - }); - - /// Archive information - List archives; - - /// Total size in bytes - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int totalSize; - - @override - bool operator ==(Object other) => identical(this, other) || other is DownloadResponseDto && - _deepEquality.equals(other.archives, archives) && - other.totalSize == totalSize; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (archives.hashCode) + - (totalSize.hashCode); - - @override - String toString() => 'DownloadResponseDto[archives=$archives, totalSize=$totalSize]'; - - Map toJson() { - final json = {}; - json[r'archives'] = this.archives; - json[r'totalSize'] = this.totalSize; - return json; - } - - /// Returns a new [DownloadResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static DownloadResponseDto? fromJson(dynamic value) { - upgradeDto(value, "DownloadResponseDto"); - if (value is Map) { - final json = value.cast(); - - return DownloadResponseDto( - archives: DownloadArchiveInfo.listFromJson(json[r'archives']), - totalSize: mapValueOfType(json, r'totalSize')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = DownloadResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = DownloadResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of DownloadResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = DownloadResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'archives', - 'totalSize', - }; -} - diff --git a/mobile/openapi/lib/model/download_update.dart b/mobile/openapi/lib/model/download_update.dart deleted file mode 100644 index 08369ef0fb..0000000000 --- a/mobile/openapi/lib/model/download_update.dart +++ /dev/null @@ -1,128 +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 DownloadUpdate { - /// Returns a new [DownloadUpdate] instance. - DownloadUpdate({ - this.archiveSize = const Optional.absent(), - this.includeEmbeddedVideos = const Optional.absent(), - }); - - /// Maximum archive size in bytes - /// - /// Minimum value: 1 - /// Maximum value: 9007199254740991 - /// - /// 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. - /// - Optional archiveSize; - - /// Whether to include embedded videos in downloads - /// - /// 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. - /// - Optional includeEmbeddedVideos; - - @override - bool operator ==(Object other) => identical(this, other) || other is DownloadUpdate && - other.archiveSize == archiveSize && - other.includeEmbeddedVideos == includeEmbeddedVideos; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (archiveSize == null ? 0 : archiveSize!.hashCode) + - (includeEmbeddedVideos == null ? 0 : includeEmbeddedVideos!.hashCode); - - @override - String toString() => 'DownloadUpdate[archiveSize=$archiveSize, includeEmbeddedVideos=$includeEmbeddedVideos]'; - - Map toJson() { - final json = {}; - if (this.archiveSize.isPresent) { - final value = this.archiveSize.value; - json[r'archiveSize'] = value; - } - if (this.includeEmbeddedVideos.isPresent) { - final value = this.includeEmbeddedVideos.value; - json[r'includeEmbeddedVideos'] = value; - } - return json; - } - - /// Returns a new [DownloadUpdate] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static DownloadUpdate? fromJson(dynamic value) { - upgradeDto(value, "DownloadUpdate"); - if (value is Map) { - final json = value.cast(); - - return DownloadUpdate( - archiveSize: json.containsKey(r'archiveSize') ? Optional.present(json[r'archiveSize'] == null ? null : int.parse('${json[r'archiveSize']}')) : const Optional.absent(), - includeEmbeddedVideos: json.containsKey(r'includeEmbeddedVideos') ? Optional.present(mapValueOfType(json, r'includeEmbeddedVideos')) : const Optional.absent(), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = DownloadUpdate.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = DownloadUpdate.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of DownloadUpdate-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = DownloadUpdate.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - }; -} - diff --git a/mobile/openapi/lib/model/duplicate_detection_config.dart b/mobile/openapi/lib/model/duplicate_detection_config.dart deleted file mode 100644 index d0f016a4f3..0000000000 --- a/mobile/openapi/lib/model/duplicate_detection_config.dart +++ /dev/null @@ -1,112 +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 DuplicateDetectionConfig { - /// Returns a new [DuplicateDetectionConfig] instance. - DuplicateDetectionConfig({ - required this.enabled, - required this.maxDistance, - }); - - /// Whether the task is enabled - bool enabled; - - /// Maximum distance threshold for duplicate detection - /// - /// Minimum value: 0.001 - /// Maximum value: 0.1 - double maxDistance; - - @override - bool operator ==(Object other) => identical(this, other) || other is DuplicateDetectionConfig && - other.enabled == enabled && - other.maxDistance == maxDistance; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (enabled.hashCode) + - (maxDistance.hashCode); - - @override - String toString() => 'DuplicateDetectionConfig[enabled=$enabled, maxDistance=$maxDistance]'; - - Map toJson() { - final json = {}; - json[r'enabled'] = this.enabled; - json[r'maxDistance'] = this.maxDistance; - return json; - } - - /// Returns a new [DuplicateDetectionConfig] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static DuplicateDetectionConfig? fromJson(dynamic value) { - upgradeDto(value, "DuplicateDetectionConfig"); - if (value is Map) { - final json = value.cast(); - - return DuplicateDetectionConfig( - enabled: mapValueOfType(json, r'enabled')!, - maxDistance: mapValueOfType(json, r'maxDistance')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = DuplicateDetectionConfig.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = DuplicateDetectionConfig.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of DuplicateDetectionConfig-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = DuplicateDetectionConfig.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'enabled', - 'maxDistance', - }; -} - diff --git a/mobile/openapi/lib/model/duplicate_resolve_dto.dart b/mobile/openapi/lib/model/duplicate_resolve_dto.dart deleted file mode 100644 index 3466d3a620..0000000000 --- a/mobile/openapi/lib/model/duplicate_resolve_dto.dart +++ /dev/null @@ -1,100 +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 DuplicateResolveDto { - /// Returns a new [DuplicateResolveDto] instance. - DuplicateResolveDto({ - this.groups = const [], - }); - - /// List of duplicate groups to resolve - List groups; - - @override - bool operator ==(Object other) => identical(this, other) || other is DuplicateResolveDto && - _deepEquality.equals(other.groups, groups); - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (groups.hashCode); - - @override - String toString() => 'DuplicateResolveDto[groups=$groups]'; - - Map toJson() { - final json = {}; - json[r'groups'] = this.groups; - return json; - } - - /// Returns a new [DuplicateResolveDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static DuplicateResolveDto? fromJson(dynamic value) { - upgradeDto(value, "DuplicateResolveDto"); - if (value is Map) { - final json = value.cast(); - - return DuplicateResolveDto( - groups: DuplicateResolveGroupDto.listFromJson(json[r'groups']), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = DuplicateResolveDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = DuplicateResolveDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of DuplicateResolveDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = DuplicateResolveDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'groups', - }; -} - diff --git a/mobile/openapi/lib/model/duplicate_resolve_group_dto.dart b/mobile/openapi/lib/model/duplicate_resolve_group_dto.dart deleted file mode 100644 index 94ca53eb7d..0000000000 --- a/mobile/openapi/lib/model/duplicate_resolve_group_dto.dart +++ /dev/null @@ -1,121 +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 DuplicateResolveGroupDto { - /// Returns a new [DuplicateResolveGroupDto] instance. - DuplicateResolveGroupDto({ - required this.duplicateId, - this.keepAssetIds = const [], - this.trashAssetIds = const [], - }); - - String duplicateId; - - /// Asset IDs to keep - List keepAssetIds; - - /// Asset IDs to trash or delete - List trashAssetIds; - - @override - bool operator ==(Object other) => identical(this, other) || other is DuplicateResolveGroupDto && - other.duplicateId == duplicateId && - _deepEquality.equals(other.keepAssetIds, keepAssetIds) && - _deepEquality.equals(other.trashAssetIds, trashAssetIds); - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (duplicateId.hashCode) + - (keepAssetIds.hashCode) + - (trashAssetIds.hashCode); - - @override - String toString() => 'DuplicateResolveGroupDto[duplicateId=$duplicateId, keepAssetIds=$keepAssetIds, trashAssetIds=$trashAssetIds]'; - - Map toJson() { - final json = {}; - json[r'duplicateId'] = this.duplicateId; - json[r'keepAssetIds'] = this.keepAssetIds; - json[r'trashAssetIds'] = this.trashAssetIds; - return json; - } - - /// Returns a new [DuplicateResolveGroupDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static DuplicateResolveGroupDto? fromJson(dynamic value) { - upgradeDto(value, "DuplicateResolveGroupDto"); - if (value is Map) { - final json = value.cast(); - - return DuplicateResolveGroupDto( - duplicateId: mapValueOfType(json, r'duplicateId')!, - keepAssetIds: json[r'keepAssetIds'] is Iterable - ? (json[r'keepAssetIds'] as Iterable).cast().toList(growable: false) - : const [], - trashAssetIds: json[r'trashAssetIds'] is Iterable - ? (json[r'trashAssetIds'] as Iterable).cast().toList(growable: false) - : const [], - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = DuplicateResolveGroupDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = DuplicateResolveGroupDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of DuplicateResolveGroupDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = DuplicateResolveGroupDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'duplicateId', - 'keepAssetIds', - 'trashAssetIds', - }; -} - diff --git a/mobile/openapi/lib/model/duplicate_response_dto.dart b/mobile/openapi/lib/model/duplicate_response_dto.dart deleted file mode 100644 index f0ddbb4fdd..0000000000 --- a/mobile/openapi/lib/model/duplicate_response_dto.dart +++ /dev/null @@ -1,120 +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 DuplicateResponseDto { - /// Returns a new [DuplicateResponseDto] instance. - DuplicateResponseDto({ - this.assets = const [], - required this.duplicateId, - this.suggestedKeepAssetIds = const [], - }); - - /// Duplicate assets - List assets; - - /// Duplicate group ID - String duplicateId; - - /// Suggested asset IDs to keep based on file size and EXIF data - List suggestedKeepAssetIds; - - @override - bool operator ==(Object other) => identical(this, other) || other is DuplicateResponseDto && - _deepEquality.equals(other.assets, assets) && - other.duplicateId == duplicateId && - _deepEquality.equals(other.suggestedKeepAssetIds, suggestedKeepAssetIds); - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (assets.hashCode) + - (duplicateId.hashCode) + - (suggestedKeepAssetIds.hashCode); - - @override - String toString() => 'DuplicateResponseDto[assets=$assets, duplicateId=$duplicateId, suggestedKeepAssetIds=$suggestedKeepAssetIds]'; - - Map toJson() { - final json = {}; - json[r'assets'] = this.assets; - json[r'duplicateId'] = this.duplicateId; - json[r'suggestedKeepAssetIds'] = this.suggestedKeepAssetIds; - return json; - } - - /// Returns a new [DuplicateResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static DuplicateResponseDto? fromJson(dynamic value) { - upgradeDto(value, "DuplicateResponseDto"); - if (value is Map) { - final json = value.cast(); - - return DuplicateResponseDto( - assets: AssetResponseDto.listFromJson(json[r'assets']), - duplicateId: mapValueOfType(json, r'duplicateId')!, - suggestedKeepAssetIds: json[r'suggestedKeepAssetIds'] is Iterable - ? (json[r'suggestedKeepAssetIds'] as Iterable).cast().toList(growable: false) - : const [], - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = DuplicateResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = DuplicateResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of DuplicateResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = DuplicateResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'assets', - 'duplicateId', - 'suggestedKeepAssetIds', - }; -} - diff --git a/mobile/openapi/lib/model/email_notifications_response.dart b/mobile/openapi/lib/model/email_notifications_response.dart deleted file mode 100644 index 08a3d580c6..0000000000 --- a/mobile/openapi/lib/model/email_notifications_response.dart +++ /dev/null @@ -1,118 +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 EmailNotificationsResponse { - /// Returns a new [EmailNotificationsResponse] instance. - EmailNotificationsResponse({ - required this.albumInvite, - required this.albumUpdate, - required this.enabled, - }); - - /// Whether to receive email notifications for album invites - bool albumInvite; - - /// Whether to receive email notifications for album updates - bool albumUpdate; - - /// Whether email notifications are enabled - bool enabled; - - @override - bool operator ==(Object other) => identical(this, other) || other is EmailNotificationsResponse && - other.albumInvite == albumInvite && - other.albumUpdate == albumUpdate && - other.enabled == enabled; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (albumInvite.hashCode) + - (albumUpdate.hashCode) + - (enabled.hashCode); - - @override - String toString() => 'EmailNotificationsResponse[albumInvite=$albumInvite, albumUpdate=$albumUpdate, enabled=$enabled]'; - - Map toJson() { - final json = {}; - json[r'albumInvite'] = this.albumInvite; - json[r'albumUpdate'] = this.albumUpdate; - json[r'enabled'] = this.enabled; - return json; - } - - /// Returns a new [EmailNotificationsResponse] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static EmailNotificationsResponse? fromJson(dynamic value) { - upgradeDto(value, "EmailNotificationsResponse"); - if (value is Map) { - final json = value.cast(); - - return EmailNotificationsResponse( - albumInvite: mapValueOfType(json, r'albumInvite')!, - albumUpdate: mapValueOfType(json, r'albumUpdate')!, - enabled: mapValueOfType(json, r'enabled')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = EmailNotificationsResponse.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = EmailNotificationsResponse.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of EmailNotificationsResponse-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = EmailNotificationsResponse.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'albumInvite', - 'albumUpdate', - 'enabled', - }; -} - diff --git a/mobile/openapi/lib/model/email_notifications_update.dart b/mobile/openapi/lib/model/email_notifications_update.dart deleted file mode 100644 index 89724e0552..0000000000 --- a/mobile/openapi/lib/model/email_notifications_update.dart +++ /dev/null @@ -1,142 +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 EmailNotificationsUpdate { - /// Returns a new [EmailNotificationsUpdate] instance. - EmailNotificationsUpdate({ - this.albumInvite = const Optional.absent(), - this.albumUpdate = const Optional.absent(), - this.enabled = const Optional.absent(), - }); - - /// Whether to receive email notifications for album invites - /// - /// 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. - /// - Optional albumInvite; - - /// Whether to receive email notifications for album updates - /// - /// 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. - /// - Optional albumUpdate; - - /// Whether email notifications are enabled - /// - /// 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. - /// - Optional enabled; - - @override - bool operator ==(Object other) => identical(this, other) || other is EmailNotificationsUpdate && - other.albumInvite == albumInvite && - other.albumUpdate == albumUpdate && - other.enabled == enabled; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (albumInvite == null ? 0 : albumInvite!.hashCode) + - (albumUpdate == null ? 0 : albumUpdate!.hashCode) + - (enabled == null ? 0 : enabled!.hashCode); - - @override - String toString() => 'EmailNotificationsUpdate[albumInvite=$albumInvite, albumUpdate=$albumUpdate, enabled=$enabled]'; - - Map toJson() { - final json = {}; - if (this.albumInvite.isPresent) { - final value = this.albumInvite.value; - json[r'albumInvite'] = value; - } - if (this.albumUpdate.isPresent) { - final value = this.albumUpdate.value; - json[r'albumUpdate'] = value; - } - if (this.enabled.isPresent) { - final value = this.enabled.value; - json[r'enabled'] = value; - } - return json; - } - - /// Returns a new [EmailNotificationsUpdate] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static EmailNotificationsUpdate? fromJson(dynamic value) { - upgradeDto(value, "EmailNotificationsUpdate"); - if (value is Map) { - final json = value.cast(); - - return EmailNotificationsUpdate( - albumInvite: json.containsKey(r'albumInvite') ? Optional.present(mapValueOfType(json, r'albumInvite')) : const Optional.absent(), - albumUpdate: json.containsKey(r'albumUpdate') ? Optional.present(mapValueOfType(json, r'albumUpdate')) : const Optional.absent(), - enabled: json.containsKey(r'enabled') ? Optional.present(mapValueOfType(json, r'enabled')) : const Optional.absent(), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = EmailNotificationsUpdate.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = EmailNotificationsUpdate.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of EmailNotificationsUpdate-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = EmailNotificationsUpdate.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - }; -} - diff --git a/mobile/openapi/lib/model/exif_response_dto.dart b/mobile/openapi/lib/model/exif_response_dto.dart deleted file mode 100644 index 2cec6f5161..0000000000 --- a/mobile/openapi/lib/model/exif_response_dto.dart +++ /dev/null @@ -1,348 +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 ExifResponseDto { - /// Returns a new [ExifResponseDto] instance. - ExifResponseDto({ - this.city = const Optional.absent(), - this.country = const Optional.absent(), - this.dateTimeOriginal = const Optional.absent(), - this.description = const Optional.absent(), - this.exifImageHeight = const Optional.absent(), - this.exifImageWidth = const Optional.absent(), - this.exposureTime = const Optional.absent(), - this.fNumber = const Optional.absent(), - this.fileSizeInByte = const Optional.absent(), - this.focalLength = const Optional.absent(), - this.iso = const Optional.absent(), - this.latitude = const Optional.absent(), - this.lensModel = const Optional.absent(), - this.longitude = const Optional.absent(), - this.make = const Optional.absent(), - this.model = const Optional.absent(), - this.modifyDate = const Optional.absent(), - this.orientation = const Optional.absent(), - this.projectionType = const Optional.absent(), - this.rating = const Optional.absent(), - this.state = const Optional.absent(), - this.timeZone = const Optional.absent(), - }); - - /// City name - Optional city; - - /// Country name - Optional country; - - /// Original date/time - Optional dateTimeOriginal; - - /// Image description - Optional description; - - /// Image height in pixels - /// - /// Minimum value: 0 - /// Maximum value: 9007199254740991 - Optional exifImageHeight; - - /// Image width in pixels - /// - /// Minimum value: 0 - /// Maximum value: 9007199254740991 - Optional exifImageWidth; - - /// Exposure time - Optional exposureTime; - - /// F-number (aperture) - Optional fNumber; - - /// File size in bytes - /// - /// Minimum value: 0 - /// Maximum value: 9007199254740991 - Optional fileSizeInByte; - - /// Focal length in mm - Optional focalLength; - - /// ISO sensitivity - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - Optional iso; - - /// GPS latitude - Optional latitude; - - /// Lens model - Optional lensModel; - - /// GPS longitude - Optional longitude; - - /// Camera make - Optional make; - - /// Camera model - Optional model; - - /// Modification date/time - Optional modifyDate; - - /// Image orientation - Optional orientation; - - /// Projection type - Optional projectionType; - - /// Rating - /// - /// Minimum value: 1 - /// Maximum value: 5 - Optional rating; - - /// State/province name - Optional state; - - /// Time zone - Optional timeZone; - - @override - bool operator ==(Object other) => identical(this, other) || other is ExifResponseDto && - other.city == city && - other.country == country && - other.dateTimeOriginal == dateTimeOriginal && - other.description == description && - other.exifImageHeight == exifImageHeight && - other.exifImageWidth == exifImageWidth && - other.exposureTime == exposureTime && - other.fNumber == fNumber && - other.fileSizeInByte == fileSizeInByte && - other.focalLength == focalLength && - other.iso == iso && - other.latitude == latitude && - other.lensModel == lensModel && - other.longitude == longitude && - other.make == make && - other.model == model && - other.modifyDate == modifyDate && - other.orientation == orientation && - other.projectionType == projectionType && - other.rating == rating && - other.state == state && - other.timeZone == timeZone; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (city == null ? 0 : city!.hashCode) + - (country == null ? 0 : country!.hashCode) + - (dateTimeOriginal == null ? 0 : dateTimeOriginal!.hashCode) + - (description == null ? 0 : description!.hashCode) + - (exifImageHeight == null ? 0 : exifImageHeight!.hashCode) + - (exifImageWidth == null ? 0 : exifImageWidth!.hashCode) + - (exposureTime == null ? 0 : exposureTime!.hashCode) + - (fNumber == null ? 0 : fNumber!.hashCode) + - (fileSizeInByte == null ? 0 : fileSizeInByte!.hashCode) + - (focalLength == null ? 0 : focalLength!.hashCode) + - (iso == null ? 0 : iso!.hashCode) + - (latitude == null ? 0 : latitude!.hashCode) + - (lensModel == null ? 0 : lensModel!.hashCode) + - (longitude == null ? 0 : longitude!.hashCode) + - (make == null ? 0 : make!.hashCode) + - (model == null ? 0 : model!.hashCode) + - (modifyDate == null ? 0 : modifyDate!.hashCode) + - (orientation == null ? 0 : orientation!.hashCode) + - (projectionType == null ? 0 : projectionType!.hashCode) + - (rating == null ? 0 : rating!.hashCode) + - (state == null ? 0 : state!.hashCode) + - (timeZone == null ? 0 : timeZone!.hashCode); - - @override - String toString() => 'ExifResponseDto[city=$city, country=$country, dateTimeOriginal=$dateTimeOriginal, description=$description, exifImageHeight=$exifImageHeight, exifImageWidth=$exifImageWidth, exposureTime=$exposureTime, fNumber=$fNumber, fileSizeInByte=$fileSizeInByte, focalLength=$focalLength, iso=$iso, latitude=$latitude, lensModel=$lensModel, longitude=$longitude, make=$make, model=$model, modifyDate=$modifyDate, orientation=$orientation, projectionType=$projectionType, rating=$rating, state=$state, timeZone=$timeZone]'; - - Map toJson() { - final json = {}; - if (this.city.isPresent) { - final value = this.city.value; - json[r'city'] = value; - } - if (this.country.isPresent) { - final value = this.country.value; - json[r'country'] = value; - } - if (this.dateTimeOriginal.isPresent) { - final value = this.dateTimeOriginal.value; - json[r'dateTimeOriginal'] = value == null ? null : value.toUtc().toIso8601String(); - } - if (this.description.isPresent) { - final value = this.description.value; - json[r'description'] = value; - } - if (this.exifImageHeight.isPresent) { - final value = this.exifImageHeight.value; - json[r'exifImageHeight'] = value; - } - if (this.exifImageWidth.isPresent) { - final value = this.exifImageWidth.value; - json[r'exifImageWidth'] = value; - } - if (this.exposureTime.isPresent) { - final value = this.exposureTime.value; - json[r'exposureTime'] = value; - } - if (this.fNumber.isPresent) { - final value = this.fNumber.value; - json[r'fNumber'] = value; - } - if (this.fileSizeInByte.isPresent) { - final value = this.fileSizeInByte.value; - json[r'fileSizeInByte'] = value; - } - if (this.focalLength.isPresent) { - final value = this.focalLength.value; - json[r'focalLength'] = value; - } - if (this.iso.isPresent) { - final value = this.iso.value; - json[r'iso'] = value; - } - if (this.latitude.isPresent) { - final value = this.latitude.value; - json[r'latitude'] = value; - } - if (this.lensModel.isPresent) { - final value = this.lensModel.value; - json[r'lensModel'] = value; - } - if (this.longitude.isPresent) { - final value = this.longitude.value; - json[r'longitude'] = value; - } - if (this.make.isPresent) { - final value = this.make.value; - json[r'make'] = value; - } - if (this.model.isPresent) { - final value = this.model.value; - json[r'model'] = value; - } - if (this.modifyDate.isPresent) { - final value = this.modifyDate.value; - json[r'modifyDate'] = value == null ? null : value.toUtc().toIso8601String(); - } - if (this.orientation.isPresent) { - final value = this.orientation.value; - json[r'orientation'] = value; - } - if (this.projectionType.isPresent) { - final value = this.projectionType.value; - json[r'projectionType'] = value; - } - if (this.rating.isPresent) { - final value = this.rating.value; - json[r'rating'] = value; - } - if (this.state.isPresent) { - final value = this.state.value; - json[r'state'] = value; - } - if (this.timeZone.isPresent) { - final value = this.timeZone.value; - json[r'timeZone'] = value; - } - return json; - } - - /// Returns a new [ExifResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static ExifResponseDto? fromJson(dynamic value) { - upgradeDto(value, "ExifResponseDto"); - if (value is Map) { - final json = value.cast(); - - return ExifResponseDto( - city: json.containsKey(r'city') ? Optional.present(mapValueOfType(json, r'city')) : const Optional.absent(), - country: json.containsKey(r'country') ? Optional.present(mapValueOfType(json, r'country')) : const Optional.absent(), - dateTimeOriginal: json.containsKey(r'dateTimeOriginal') ? Optional.present(mapDateTime(json, r'dateTimeOriginal', r'')) : const Optional.absent(), - description: json.containsKey(r'description') ? Optional.present(mapValueOfType(json, r'description')) : const Optional.absent(), - exifImageHeight: json.containsKey(r'exifImageHeight') ? Optional.present(json[r'exifImageHeight'] == null ? null : int.parse('${json[r'exifImageHeight']}')) : const Optional.absent(), - exifImageWidth: json.containsKey(r'exifImageWidth') ? Optional.present(json[r'exifImageWidth'] == null ? null : int.parse('${json[r'exifImageWidth']}')) : const Optional.absent(), - exposureTime: json.containsKey(r'exposureTime') ? Optional.present(mapValueOfType(json, r'exposureTime')) : const Optional.absent(), - fNumber: json.containsKey(r'fNumber') ? Optional.present(json[r'fNumber'] == null ? null : num.parse('${json[r'fNumber']}')) : const Optional.absent(), - fileSizeInByte: json.containsKey(r'fileSizeInByte') ? Optional.present(json[r'fileSizeInByte'] == null ? null : int.parse('${json[r'fileSizeInByte']}')) : const Optional.absent(), - focalLength: json.containsKey(r'focalLength') ? Optional.present(json[r'focalLength'] == null ? null : num.parse('${json[r'focalLength']}')) : const Optional.absent(), - iso: json.containsKey(r'iso') ? Optional.present(json[r'iso'] == null ? null : int.parse('${json[r'iso']}')) : const Optional.absent(), - latitude: json.containsKey(r'latitude') ? Optional.present(json[r'latitude'] == null ? null : num.parse('${json[r'latitude']}')) : const Optional.absent(), - lensModel: json.containsKey(r'lensModel') ? Optional.present(mapValueOfType(json, r'lensModel')) : const Optional.absent(), - longitude: json.containsKey(r'longitude') ? Optional.present(json[r'longitude'] == null ? null : num.parse('${json[r'longitude']}')) : const Optional.absent(), - make: json.containsKey(r'make') ? Optional.present(mapValueOfType(json, r'make')) : const Optional.absent(), - model: json.containsKey(r'model') ? Optional.present(mapValueOfType(json, r'model')) : const Optional.absent(), - modifyDate: json.containsKey(r'modifyDate') ? Optional.present(mapDateTime(json, r'modifyDate', r'')) : const Optional.absent(), - orientation: json.containsKey(r'orientation') ? Optional.present(mapValueOfType(json, r'orientation')) : const Optional.absent(), - projectionType: json.containsKey(r'projectionType') ? Optional.present(mapValueOfType(json, r'projectionType')) : const Optional.absent(), - rating: json.containsKey(r'rating') ? Optional.present(json[r'rating'] == null ? null : int.parse('${json[r'rating']}')) : const Optional.absent(), - state: json.containsKey(r'state') ? Optional.present(mapValueOfType(json, r'state')) : const Optional.absent(), - timeZone: json.containsKey(r'timeZone') ? Optional.present(mapValueOfType(json, r'timeZone')) : const Optional.absent(), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = ExifResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = ExifResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of ExifResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = ExifResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - }; -} - diff --git a/mobile/openapi/lib/model/face_dto.dart b/mobile/openapi/lib/model/face_dto.dart deleted file mode 100644 index ec5f5c8a6c..0000000000 --- a/mobile/openapi/lib/model/face_dto.dart +++ /dev/null @@ -1,100 +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 FaceDto { - /// Returns a new [FaceDto] instance. - FaceDto({ - required this.id, - }); - - /// Face ID - String id; - - @override - bool operator ==(Object other) => identical(this, other) || other is FaceDto && - other.id == id; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (id.hashCode); - - @override - String toString() => 'FaceDto[id=$id]'; - - Map toJson() { - final json = {}; - json[r'id'] = this.id; - return json; - } - - /// Returns a new [FaceDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static FaceDto? fromJson(dynamic value) { - upgradeDto(value, "FaceDto"); - if (value is Map) { - final json = value.cast(); - - return FaceDto( - id: mapValueOfType(json, r'id')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = FaceDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = FaceDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of FaceDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = FaceDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'id', - }; -} - diff --git a/mobile/openapi/lib/model/facial_recognition_config.dart b/mobile/openapi/lib/model/facial_recognition_config.dart deleted file mode 100644 index c5f477e1d5..0000000000 --- a/mobile/openapi/lib/model/facial_recognition_config.dart +++ /dev/null @@ -1,145 +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 FacialRecognitionConfig { - /// Returns a new [FacialRecognitionConfig] instance. - FacialRecognitionConfig({ - required this.enabled, - required this.maxDistance, - required this.minFaces, - required this.minScore, - required this.modelName, - }); - - /// Whether the task is enabled - bool enabled; - - /// Maximum distance threshold for face recognition - /// - /// Minimum value: 0.1 - /// Maximum value: 2 - double maxDistance; - - /// Minimum number of faces required for recognition - /// - /// Minimum value: 1 - /// Maximum value: 9007199254740991 - int minFaces; - - /// Minimum confidence score for face detection - /// - /// Minimum value: 0.1 - /// Maximum value: 1 - double minScore; - - /// Name of the model to use - String modelName; - - @override - bool operator ==(Object other) => identical(this, other) || other is FacialRecognitionConfig && - other.enabled == enabled && - other.maxDistance == maxDistance && - other.minFaces == minFaces && - other.minScore == minScore && - other.modelName == modelName; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (enabled.hashCode) + - (maxDistance.hashCode) + - (minFaces.hashCode) + - (minScore.hashCode) + - (modelName.hashCode); - - @override - String toString() => 'FacialRecognitionConfig[enabled=$enabled, maxDistance=$maxDistance, minFaces=$minFaces, minScore=$minScore, modelName=$modelName]'; - - Map toJson() { - final json = {}; - json[r'enabled'] = this.enabled; - json[r'maxDistance'] = this.maxDistance; - json[r'minFaces'] = this.minFaces; - json[r'minScore'] = this.minScore; - json[r'modelName'] = this.modelName; - return json; - } - - /// Returns a new [FacialRecognitionConfig] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static FacialRecognitionConfig? fromJson(dynamic value) { - upgradeDto(value, "FacialRecognitionConfig"); - if (value is Map) { - final json = value.cast(); - - return FacialRecognitionConfig( - enabled: mapValueOfType(json, r'enabled')!, - maxDistance: mapValueOfType(json, r'maxDistance')!, - minFaces: mapValueOfType(json, r'minFaces')!, - minScore: mapValueOfType(json, r'minScore')!, - modelName: mapValueOfType(json, r'modelName')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = FacialRecognitionConfig.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = FacialRecognitionConfig.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of FacialRecognitionConfig-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = FacialRecognitionConfig.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'enabled', - 'maxDistance', - 'minFaces', - 'minScore', - 'modelName', - }; -} - diff --git a/mobile/openapi/lib/model/folders_response.dart b/mobile/openapi/lib/model/folders_response.dart deleted file mode 100644 index 873404c786..0000000000 --- a/mobile/openapi/lib/model/folders_response.dart +++ /dev/null @@ -1,109 +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 FoldersResponse { - /// Returns a new [FoldersResponse] instance. - FoldersResponse({ - required this.enabled, - required this.sidebarWeb, - }); - - /// Whether folders are enabled - bool enabled; - - /// Whether folders appear in web sidebar - bool sidebarWeb; - - @override - bool operator ==(Object other) => identical(this, other) || other is FoldersResponse && - other.enabled == enabled && - other.sidebarWeb == sidebarWeb; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (enabled.hashCode) + - (sidebarWeb.hashCode); - - @override - String toString() => 'FoldersResponse[enabled=$enabled, sidebarWeb=$sidebarWeb]'; - - Map toJson() { - final json = {}; - json[r'enabled'] = this.enabled; - json[r'sidebarWeb'] = this.sidebarWeb; - return json; - } - - /// Returns a new [FoldersResponse] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static FoldersResponse? fromJson(dynamic value) { - upgradeDto(value, "FoldersResponse"); - if (value is Map) { - final json = value.cast(); - - return FoldersResponse( - enabled: mapValueOfType(json, r'enabled')!, - sidebarWeb: mapValueOfType(json, r'sidebarWeb')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = FoldersResponse.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = FoldersResponse.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of FoldersResponse-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = FoldersResponse.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'enabled', - 'sidebarWeb', - }; -} - diff --git a/mobile/openapi/lib/model/folders_update.dart b/mobile/openapi/lib/model/folders_update.dart deleted file mode 100644 index 2ce0cde807..0000000000 --- a/mobile/openapi/lib/model/folders_update.dart +++ /dev/null @@ -1,125 +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 FoldersUpdate { - /// Returns a new [FoldersUpdate] instance. - FoldersUpdate({ - this.enabled = const Optional.absent(), - this.sidebarWeb = const Optional.absent(), - }); - - /// Whether folders are enabled - /// - /// 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. - /// - Optional enabled; - - /// Whether folders appear in web sidebar - /// - /// 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. - /// - Optional sidebarWeb; - - @override - bool operator ==(Object other) => identical(this, other) || other is FoldersUpdate && - other.enabled == enabled && - other.sidebarWeb == sidebarWeb; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (enabled == null ? 0 : enabled!.hashCode) + - (sidebarWeb == null ? 0 : sidebarWeb!.hashCode); - - @override - String toString() => 'FoldersUpdate[enabled=$enabled, sidebarWeb=$sidebarWeb]'; - - Map toJson() { - final json = {}; - if (this.enabled.isPresent) { - final value = this.enabled.value; - json[r'enabled'] = value; - } - if (this.sidebarWeb.isPresent) { - final value = this.sidebarWeb.value; - json[r'sidebarWeb'] = value; - } - return json; - } - - /// Returns a new [FoldersUpdate] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static FoldersUpdate? fromJson(dynamic value) { - upgradeDto(value, "FoldersUpdate"); - if (value is Map) { - final json = value.cast(); - - return FoldersUpdate( - enabled: json.containsKey(r'enabled') ? Optional.present(mapValueOfType(json, r'enabled')) : const Optional.absent(), - sidebarWeb: json.containsKey(r'sidebarWeb') ? Optional.present(mapValueOfType(json, r'sidebarWeb')) : const Optional.absent(), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = FoldersUpdate.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = FoldersUpdate.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of FoldersUpdate-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = FoldersUpdate.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - }; -} - diff --git a/mobile/openapi/lib/model/image_format.dart b/mobile/openapi/lib/model/image_format.dart deleted file mode 100644 index 1a0dde5def..0000000000 --- a/mobile/openapi/lib/model/image_format.dart +++ /dev/null @@ -1,85 +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; - -/// Image format -class ImageFormat { - /// Instantiate a new enum with the provided [value]. - const ImageFormat._(this.value); - - /// The underlying value of this enum member. - final String value; - - @override - String toString() => value; - - String toJson() => value; - - static const jpeg = ImageFormat._(r'jpeg'); - static const webp = ImageFormat._(r'webp'); - - /// List of all possible values in this [enum][ImageFormat]. - static const values = [ - jpeg, - webp, - ]; - - static ImageFormat? fromJson(dynamic value) => ImageFormatTypeTransformer().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 = ImageFormat.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } -} - -/// Transformation class that can [encode] an instance of [ImageFormat] to String, -/// and [decode] dynamic data back to [ImageFormat]. -class ImageFormatTypeTransformer { - factory ImageFormatTypeTransformer() => _instance ??= const ImageFormatTypeTransformer._(); - - const ImageFormatTypeTransformer._(); - - String encode(ImageFormat data) => data.value; - - /// Decodes a [dynamic value][data] to a ImageFormat. - /// - /// 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. - ImageFormat? decode(dynamic data, {bool allowNull = true}) { - if (data != null) { - switch (data) { - case r'jpeg': return ImageFormat.jpeg; - case r'webp': return ImageFormat.webp; - default: - if (!allowNull) { - throw ArgumentError('Unknown enum value to decode: $data'); - } - } - } - return null; - } - - /// Singleton [ImageFormatTypeTransformer] instance. - static ImageFormatTypeTransformer? _instance; -} - diff --git a/mobile/openapi/lib/model/integrity_report.dart b/mobile/openapi/lib/model/integrity_report.dart deleted file mode 100644 index 42a85bd0ce..0000000000 --- a/mobile/openapi/lib/model/integrity_report.dart +++ /dev/null @@ -1,88 +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; - -/// Integrity report type -class IntegrityReport { - /// Instantiate a new enum with the provided [value]. - const IntegrityReport._(this.value); - - /// The underlying value of this enum member. - final String value; - - @override - String toString() => value; - - String toJson() => value; - - static const untrackedFile = IntegrityReport._(r'untracked_file'); - static const missingFile = IntegrityReport._(r'missing_file'); - static const checksumMismatch = IntegrityReport._(r'checksum_mismatch'); - - /// List of all possible values in this [enum][IntegrityReport]. - static const values = [ - untrackedFile, - missingFile, - checksumMismatch, - ]; - - static IntegrityReport? fromJson(dynamic value) => IntegrityReportTypeTransformer().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 = IntegrityReport.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } -} - -/// Transformation class that can [encode] an instance of [IntegrityReport] to String, -/// and [decode] dynamic data back to [IntegrityReport]. -class IntegrityReportTypeTransformer { - factory IntegrityReportTypeTransformer() => _instance ??= const IntegrityReportTypeTransformer._(); - - const IntegrityReportTypeTransformer._(); - - String encode(IntegrityReport data) => data.value; - - /// Decodes a [dynamic value][data] to a IntegrityReport. - /// - /// 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. - IntegrityReport? decode(dynamic data, {bool allowNull = true}) { - if (data != null) { - switch (data) { - case r'untracked_file': return IntegrityReport.untrackedFile; - case r'missing_file': return IntegrityReport.missingFile; - case r'checksum_mismatch': return IntegrityReport.checksumMismatch; - default: - if (!allowNull) { - throw ArgumentError('Unknown enum value to decode: $data'); - } - } - } - return null; - } - - /// Singleton [IntegrityReportTypeTransformer] instance. - static IntegrityReportTypeTransformer? _instance; -} - diff --git a/mobile/openapi/lib/model/integrity_report_response_dto.dart b/mobile/openapi/lib/model/integrity_report_response_dto.dart deleted file mode 100644 index e9f8b91cca..0000000000 --- a/mobile/openapi/lib/model/integrity_report_response_dto.dart +++ /dev/null @@ -1,115 +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 IntegrityReportResponseDto { - /// Returns a new [IntegrityReportResponseDto] instance. - IntegrityReportResponseDto({ - this.items = const [], - this.nextCursor = const Optional.absent(), - }); - - List items; - - /// - /// 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. - /// - Optional nextCursor; - - @override - bool operator ==(Object other) => identical(this, other) || other is IntegrityReportResponseDto && - _deepEquality.equals(other.items, items) && - other.nextCursor == nextCursor; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (items.hashCode) + - (nextCursor == null ? 0 : nextCursor!.hashCode); - - @override - String toString() => 'IntegrityReportResponseDto[items=$items, nextCursor=$nextCursor]'; - - Map toJson() { - final json = {}; - json[r'items'] = this.items; - if (this.nextCursor.isPresent) { - final value = this.nextCursor.value; - json[r'nextCursor'] = value; - } - return json; - } - - /// Returns a new [IntegrityReportResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static IntegrityReportResponseDto? fromJson(dynamic value) { - upgradeDto(value, "IntegrityReportResponseDto"); - if (value is Map) { - final json = value.cast(); - - return IntegrityReportResponseDto( - items: IntegrityReportResponseDtoItemsInner.listFromJson(json[r'items']), - nextCursor: json.containsKey(r'nextCursor') ? Optional.present(mapValueOfType(json, r'nextCursor')) : const Optional.absent(), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = IntegrityReportResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = IntegrityReportResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of IntegrityReportResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = IntegrityReportResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'items', - }; -} - diff --git a/mobile/openapi/lib/model/integrity_report_response_dto_items_inner.dart b/mobile/openapi/lib/model/integrity_report_response_dto_items_inner.dart deleted file mode 100644 index db09f698f4..0000000000 --- a/mobile/openapi/lib/model/integrity_report_response_dto_items_inner.dart +++ /dev/null @@ -1,117 +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 IntegrityReportResponseDtoItemsInner { - /// Returns a new [IntegrityReportResponseDtoItemsInner] instance. - IntegrityReportResponseDtoItemsInner({ - required this.id, - required this.path, - required this.type, - }); - - /// Integrity report item id - String id; - - /// Integrity report item path - String path; - - IntegrityReport type; - - @override - bool operator ==(Object other) => identical(this, other) || other is IntegrityReportResponseDtoItemsInner && - other.id == id && - other.path == path && - other.type == type; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (id.hashCode) + - (path.hashCode) + - (type.hashCode); - - @override - String toString() => 'IntegrityReportResponseDtoItemsInner[id=$id, path=$path, type=$type]'; - - Map toJson() { - final json = {}; - json[r'id'] = this.id; - json[r'path'] = this.path; - json[r'type'] = this.type; - return json; - } - - /// Returns a new [IntegrityReportResponseDtoItemsInner] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static IntegrityReportResponseDtoItemsInner? fromJson(dynamic value) { - upgradeDto(value, "IntegrityReportResponseDtoItemsInner"); - if (value is Map) { - final json = value.cast(); - - return IntegrityReportResponseDtoItemsInner( - id: mapValueOfType(json, r'id')!, - path: mapValueOfType(json, r'path')!, - type: IntegrityReport.fromJson(json[r'type'])!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = IntegrityReportResponseDtoItemsInner.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = IntegrityReportResponseDtoItemsInner.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of IntegrityReportResponseDtoItemsInner-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = IntegrityReportResponseDtoItemsInner.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'id', - 'path', - 'type', - }; -} - diff --git a/mobile/openapi/lib/model/integrity_report_summary_response_dto.dart b/mobile/openapi/lib/model/integrity_report_summary_response_dto.dart deleted file mode 100644 index f95c036d14..0000000000 --- a/mobile/openapi/lib/model/integrity_report_summary_response_dto.dart +++ /dev/null @@ -1,121 +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 IntegrityReportSummaryResponseDto { - /// Returns a new [IntegrityReportSummaryResponseDto] instance. - IntegrityReportSummaryResponseDto({ - required this.checksumMismatch, - required this.missingFile, - required this.untrackedFile, - }); - - /// Minimum value: 0 - /// Maximum value: 9007199254740991 - int checksumMismatch; - - /// Minimum value: 0 - /// Maximum value: 9007199254740991 - int missingFile; - - /// Minimum value: 0 - /// Maximum value: 9007199254740991 - int untrackedFile; - - @override - bool operator ==(Object other) => identical(this, other) || other is IntegrityReportSummaryResponseDto && - other.checksumMismatch == checksumMismatch && - other.missingFile == missingFile && - other.untrackedFile == untrackedFile; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (checksumMismatch.hashCode) + - (missingFile.hashCode) + - (untrackedFile.hashCode); - - @override - String toString() => 'IntegrityReportSummaryResponseDto[checksumMismatch=$checksumMismatch, missingFile=$missingFile, untrackedFile=$untrackedFile]'; - - Map toJson() { - final json = {}; - json[r'checksum_mismatch'] = this.checksumMismatch; - json[r'missing_file'] = this.missingFile; - json[r'untracked_file'] = this.untrackedFile; - return json; - } - - /// Returns a new [IntegrityReportSummaryResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static IntegrityReportSummaryResponseDto? fromJson(dynamic value) { - upgradeDto(value, "IntegrityReportSummaryResponseDto"); - if (value is Map) { - final json = value.cast(); - - return IntegrityReportSummaryResponseDto( - checksumMismatch: mapValueOfType(json, r'checksum_mismatch')!, - missingFile: mapValueOfType(json, r'missing_file')!, - untrackedFile: mapValueOfType(json, r'untracked_file')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = IntegrityReportSummaryResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = IntegrityReportSummaryResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of IntegrityReportSummaryResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = IntegrityReportSummaryResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'checksum_mismatch', - 'missing_file', - 'untracked_file', - }; -} - diff --git a/mobile/openapi/lib/model/job_create_dto.dart b/mobile/openapi/lib/model/job_create_dto.dart deleted file mode 100644 index fe6743cba0..0000000000 --- a/mobile/openapi/lib/model/job_create_dto.dart +++ /dev/null @@ -1,99 +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 JobCreateDto { - /// Returns a new [JobCreateDto] instance. - JobCreateDto({ - required this.name, - }); - - ManualJobName name; - - @override - bool operator ==(Object other) => identical(this, other) || other is JobCreateDto && - other.name == name; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (name.hashCode); - - @override - String toString() => 'JobCreateDto[name=$name]'; - - Map toJson() { - final json = {}; - json[r'name'] = this.name; - return json; - } - - /// Returns a new [JobCreateDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static JobCreateDto? fromJson(dynamic value) { - upgradeDto(value, "JobCreateDto"); - if (value is Map) { - final json = value.cast(); - - return JobCreateDto( - name: ManualJobName.fromJson(json[r'name'])!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = JobCreateDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = JobCreateDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of JobCreateDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = JobCreateDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'name', - }; -} - diff --git a/mobile/openapi/lib/model/job_name.dart b/mobile/openapi/lib/model/job_name.dart deleted file mode 100644 index 048e5a60a4..0000000000 --- a/mobile/openapi/lib/model/job_name.dart +++ /dev/null @@ -1,277 +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; - -/// Job name -class JobName { - /// Instantiate a new enum with the provided [value]. - const JobName._(this.value); - - /// The underlying value of this enum member. - final String value; - - @override - String toString() => value; - - String toJson() => value; - - static const assetDelete = JobName._(r'AssetDelete'); - static const assetDeleteCheck = JobName._(r'AssetDeleteCheck'); - static const assetDetectFacesQueueAll = JobName._(r'AssetDetectFacesQueueAll'); - static const assetDetectFaces = JobName._(r'AssetDetectFaces'); - static const assetDetectDuplicatesQueueAll = JobName._(r'AssetDetectDuplicatesQueueAll'); - static const assetDetectDuplicates = JobName._(r'AssetDetectDuplicates'); - static const assetEditThumbnailGeneration = JobName._(r'AssetEditThumbnailGeneration'); - static const assetEncodeVideoQueueAll = JobName._(r'AssetEncodeVideoQueueAll'); - static const assetEncodeVideo = JobName._(r'AssetEncodeVideo'); - static const assetEmptyTrash = JobName._(r'AssetEmptyTrash'); - static const assetExtractMetadataQueueAll = JobName._(r'AssetExtractMetadataQueueAll'); - static const assetExtractMetadata = JobName._(r'AssetExtractMetadata'); - static const assetFileMigration = JobName._(r'AssetFileMigration'); - static const assetGenerateThumbnailsQueueAll = JobName._(r'AssetGenerateThumbnailsQueueAll'); - static const assetGenerateThumbnails = JobName._(r'AssetGenerateThumbnails'); - static const auditTableCleanup = JobName._(r'AuditTableCleanup'); - static const databaseBackup = JobName._(r'DatabaseBackup'); - static const facialRecognitionQueueAll = JobName._(r'FacialRecognitionQueueAll'); - static const facialRecognition = JobName._(r'FacialRecognition'); - static const fileDelete = JobName._(r'FileDelete'); - static const fileMigrationQueueAll = JobName._(r'FileMigrationQueueAll'); - static const libraryDeleteCheck = JobName._(r'LibraryDeleteCheck'); - static const libraryDelete = JobName._(r'LibraryDelete'); - static const libraryRemoveAsset = JobName._(r'LibraryRemoveAsset'); - static const libraryScanAssetsQueueAll = JobName._(r'LibraryScanAssetsQueueAll'); - static const librarySyncAssets = JobName._(r'LibrarySyncAssets'); - static const librarySyncFilesQueueAll = JobName._(r'LibrarySyncFilesQueueAll'); - static const librarySyncFiles = JobName._(r'LibrarySyncFiles'); - static const libraryScanQueueAll = JobName._(r'LibraryScanQueueAll'); - static const hlsSessionCleanup = JobName._(r'HlsSessionCleanup'); - static const memoryCleanup = JobName._(r'MemoryCleanup'); - static const memoryGenerate = JobName._(r'MemoryGenerate'); - static const notificationsCleanup = JobName._(r'NotificationsCleanup'); - static const notifyUserSignup = JobName._(r'NotifyUserSignup'); - static const notifyAlbumInvite = JobName._(r'NotifyAlbumInvite'); - static const notifyAlbumUpdate = JobName._(r'NotifyAlbumUpdate'); - static const userDelete = JobName._(r'UserDelete'); - static const userDeleteCheck = JobName._(r'UserDeleteCheck'); - static const userSyncUsage = JobName._(r'UserSyncUsage'); - static const personCleanup = JobName._(r'PersonCleanup'); - static const personFileMigration = JobName._(r'PersonFileMigration'); - static const personGenerateThumbnail = JobName._(r'PersonGenerateThumbnail'); - static const sessionCleanup = JobName._(r'SessionCleanup'); - static const sendMail = JobName._(r'SendMail'); - static const sidecarQueueAll = JobName._(r'SidecarQueueAll'); - static const sidecarCheck = JobName._(r'SidecarCheck'); - static const sidecarWrite = JobName._(r'SidecarWrite'); - static const smartSearchQueueAll = JobName._(r'SmartSearchQueueAll'); - static const smartSearch = JobName._(r'SmartSearch'); - static const storageTemplateMigration = JobName._(r'StorageTemplateMigration'); - static const storageTemplateMigrationSingle = JobName._(r'StorageTemplateMigrationSingle'); - static const tagCleanup = JobName._(r'TagCleanup'); - static const versionCheck = JobName._(r'VersionCheck'); - static const ocrQueueAll = JobName._(r'OcrQueueAll'); - static const ocr = JobName._(r'Ocr'); - static const workflowAssetTrigger = JobName._(r'WorkflowAssetTrigger'); - static const integrityUntrackedFilesQueueAll = JobName._(r'IntegrityUntrackedFilesQueueAll'); - static const integrityUntrackedFiles = JobName._(r'IntegrityUntrackedFiles'); - static const integrityUntrackedRefresh = JobName._(r'IntegrityUntrackedRefresh'); - static const integrityMissingFilesQueueAll = JobName._(r'IntegrityMissingFilesQueueAll'); - static const integrityMissingFiles = JobName._(r'IntegrityMissingFiles'); - static const integrityMissingFilesRefresh = JobName._(r'IntegrityMissingFilesRefresh'); - static const integrityChecksumFiles = JobName._(r'IntegrityChecksumFiles'); - static const integrityChecksumFilesRefresh = JobName._(r'IntegrityChecksumFilesRefresh'); - static const integrityDeleteReportType = JobName._(r'IntegrityDeleteReportType'); - static const integrityDeleteReports = JobName._(r'IntegrityDeleteReports'); - - /// List of all possible values in this [enum][JobName]. - static const values = [ - assetDelete, - assetDeleteCheck, - assetDetectFacesQueueAll, - assetDetectFaces, - assetDetectDuplicatesQueueAll, - assetDetectDuplicates, - assetEditThumbnailGeneration, - assetEncodeVideoQueueAll, - assetEncodeVideo, - assetEmptyTrash, - assetExtractMetadataQueueAll, - assetExtractMetadata, - assetFileMigration, - assetGenerateThumbnailsQueueAll, - assetGenerateThumbnails, - auditTableCleanup, - databaseBackup, - facialRecognitionQueueAll, - facialRecognition, - fileDelete, - fileMigrationQueueAll, - libraryDeleteCheck, - libraryDelete, - libraryRemoveAsset, - libraryScanAssetsQueueAll, - librarySyncAssets, - librarySyncFilesQueueAll, - librarySyncFiles, - libraryScanQueueAll, - hlsSessionCleanup, - memoryCleanup, - memoryGenerate, - notificationsCleanup, - notifyUserSignup, - notifyAlbumInvite, - notifyAlbumUpdate, - userDelete, - userDeleteCheck, - userSyncUsage, - personCleanup, - personFileMigration, - personGenerateThumbnail, - sessionCleanup, - sendMail, - sidecarQueueAll, - sidecarCheck, - sidecarWrite, - smartSearchQueueAll, - smartSearch, - storageTemplateMigration, - storageTemplateMigrationSingle, - tagCleanup, - versionCheck, - ocrQueueAll, - ocr, - workflowAssetTrigger, - integrityUntrackedFilesQueueAll, - integrityUntrackedFiles, - integrityUntrackedRefresh, - integrityMissingFilesQueueAll, - integrityMissingFiles, - integrityMissingFilesRefresh, - integrityChecksumFiles, - integrityChecksumFilesRefresh, - integrityDeleteReportType, - integrityDeleteReports, - ]; - - static JobName? fromJson(dynamic value) => JobNameTypeTransformer().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 = JobName.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } -} - -/// Transformation class that can [encode] an instance of [JobName] to String, -/// and [decode] dynamic data back to [JobName]. -class JobNameTypeTransformer { - factory JobNameTypeTransformer() => _instance ??= const JobNameTypeTransformer._(); - - const JobNameTypeTransformer._(); - - String encode(JobName data) => data.value; - - /// Decodes a [dynamic value][data] to a JobName. - /// - /// 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. - JobName? decode(dynamic data, {bool allowNull = true}) { - if (data != null) { - switch (data) { - case r'AssetDelete': return JobName.assetDelete; - case r'AssetDeleteCheck': return JobName.assetDeleteCheck; - case r'AssetDetectFacesQueueAll': return JobName.assetDetectFacesQueueAll; - case r'AssetDetectFaces': return JobName.assetDetectFaces; - case r'AssetDetectDuplicatesQueueAll': return JobName.assetDetectDuplicatesQueueAll; - case r'AssetDetectDuplicates': return JobName.assetDetectDuplicates; - case r'AssetEditThumbnailGeneration': return JobName.assetEditThumbnailGeneration; - case r'AssetEncodeVideoQueueAll': return JobName.assetEncodeVideoQueueAll; - case r'AssetEncodeVideo': return JobName.assetEncodeVideo; - case r'AssetEmptyTrash': return JobName.assetEmptyTrash; - case r'AssetExtractMetadataQueueAll': return JobName.assetExtractMetadataQueueAll; - case r'AssetExtractMetadata': return JobName.assetExtractMetadata; - case r'AssetFileMigration': return JobName.assetFileMigration; - case r'AssetGenerateThumbnailsQueueAll': return JobName.assetGenerateThumbnailsQueueAll; - case r'AssetGenerateThumbnails': return JobName.assetGenerateThumbnails; - case r'AuditTableCleanup': return JobName.auditTableCleanup; - case r'DatabaseBackup': return JobName.databaseBackup; - case r'FacialRecognitionQueueAll': return JobName.facialRecognitionQueueAll; - case r'FacialRecognition': return JobName.facialRecognition; - case r'FileDelete': return JobName.fileDelete; - case r'FileMigrationQueueAll': return JobName.fileMigrationQueueAll; - case r'LibraryDeleteCheck': return JobName.libraryDeleteCheck; - case r'LibraryDelete': return JobName.libraryDelete; - case r'LibraryRemoveAsset': return JobName.libraryRemoveAsset; - case r'LibraryScanAssetsQueueAll': return JobName.libraryScanAssetsQueueAll; - case r'LibrarySyncAssets': return JobName.librarySyncAssets; - case r'LibrarySyncFilesQueueAll': return JobName.librarySyncFilesQueueAll; - case r'LibrarySyncFiles': return JobName.librarySyncFiles; - case r'LibraryScanQueueAll': return JobName.libraryScanQueueAll; - case r'HlsSessionCleanup': return JobName.hlsSessionCleanup; - case r'MemoryCleanup': return JobName.memoryCleanup; - case r'MemoryGenerate': return JobName.memoryGenerate; - case r'NotificationsCleanup': return JobName.notificationsCleanup; - case r'NotifyUserSignup': return JobName.notifyUserSignup; - case r'NotifyAlbumInvite': return JobName.notifyAlbumInvite; - case r'NotifyAlbumUpdate': return JobName.notifyAlbumUpdate; - case r'UserDelete': return JobName.userDelete; - case r'UserDeleteCheck': return JobName.userDeleteCheck; - case r'UserSyncUsage': return JobName.userSyncUsage; - case r'PersonCleanup': return JobName.personCleanup; - case r'PersonFileMigration': return JobName.personFileMigration; - case r'PersonGenerateThumbnail': return JobName.personGenerateThumbnail; - case r'SessionCleanup': return JobName.sessionCleanup; - case r'SendMail': return JobName.sendMail; - case r'SidecarQueueAll': return JobName.sidecarQueueAll; - case r'SidecarCheck': return JobName.sidecarCheck; - case r'SidecarWrite': return JobName.sidecarWrite; - case r'SmartSearchQueueAll': return JobName.smartSearchQueueAll; - case r'SmartSearch': return JobName.smartSearch; - case r'StorageTemplateMigration': return JobName.storageTemplateMigration; - case r'StorageTemplateMigrationSingle': return JobName.storageTemplateMigrationSingle; - case r'TagCleanup': return JobName.tagCleanup; - case r'VersionCheck': return JobName.versionCheck; - case r'OcrQueueAll': return JobName.ocrQueueAll; - case r'Ocr': return JobName.ocr; - case r'WorkflowAssetTrigger': return JobName.workflowAssetTrigger; - case r'IntegrityUntrackedFilesQueueAll': return JobName.integrityUntrackedFilesQueueAll; - case r'IntegrityUntrackedFiles': return JobName.integrityUntrackedFiles; - case r'IntegrityUntrackedRefresh': return JobName.integrityUntrackedRefresh; - case r'IntegrityMissingFilesQueueAll': return JobName.integrityMissingFilesQueueAll; - case r'IntegrityMissingFiles': return JobName.integrityMissingFiles; - case r'IntegrityMissingFilesRefresh': return JobName.integrityMissingFilesRefresh; - case r'IntegrityChecksumFiles': return JobName.integrityChecksumFiles; - case r'IntegrityChecksumFilesRefresh': return JobName.integrityChecksumFilesRefresh; - case r'IntegrityDeleteReportType': return JobName.integrityDeleteReportType; - case r'IntegrityDeleteReports': return JobName.integrityDeleteReports; - default: - if (!allowNull) { - throw ArgumentError('Unknown enum value to decode: $data'); - } - } - } - return null; - } - - /// Singleton [JobNameTypeTransformer] instance. - static JobNameTypeTransformer? _instance; -} - diff --git a/mobile/openapi/lib/model/job_settings_dto.dart b/mobile/openapi/lib/model/job_settings_dto.dart deleted file mode 100644 index 98fe3d3536..0000000000 --- a/mobile/openapi/lib/model/job_settings_dto.dart +++ /dev/null @@ -1,103 +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 JobSettingsDto { - /// Returns a new [JobSettingsDto] instance. - JobSettingsDto({ - required this.concurrency, - }); - - /// Concurrency - /// - /// Minimum value: 1 - /// Maximum value: 9007199254740991 - int concurrency; - - @override - bool operator ==(Object other) => identical(this, other) || other is JobSettingsDto && - other.concurrency == concurrency; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (concurrency.hashCode); - - @override - String toString() => 'JobSettingsDto[concurrency=$concurrency]'; - - Map toJson() { - final json = {}; - json[r'concurrency'] = this.concurrency; - return json; - } - - /// Returns a new [JobSettingsDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static JobSettingsDto? fromJson(dynamic value) { - upgradeDto(value, "JobSettingsDto"); - if (value is Map) { - final json = value.cast(); - - return JobSettingsDto( - concurrency: mapValueOfType(json, r'concurrency')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = JobSettingsDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = JobSettingsDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of JobSettingsDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = JobSettingsDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'concurrency', - }; -} - diff --git a/mobile/openapi/lib/model/library_response_dto.dart b/mobile/openapi/lib/model/library_response_dto.dart deleted file mode 100644 index 128469839a..0000000000 --- a/mobile/openapi/lib/model/library_response_dto.dart +++ /dev/null @@ -1,189 +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 LibraryResponseDto { - /// Returns a new [LibraryResponseDto] instance. - LibraryResponseDto({ - required this.assetCount, - required this.createdAt, - this.exclusionPatterns = const [], - required this.id, - this.importPaths = const [], - required this.name, - required this.ownerId, - required this.refreshedAt, - required this.updatedAt, - }); - - /// Number of assets - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int assetCount; - - /// Creation date - DateTime createdAt; - - /// Exclusion patterns - List exclusionPatterns; - - /// Library ID - String id; - - /// Import paths - List importPaths; - - /// Library name - String name; - - /// Owner user ID - String ownerId; - - /// Last refresh date - DateTime? refreshedAt; - - /// Last update date - DateTime updatedAt; - - @override - bool operator ==(Object other) => identical(this, other) || other is LibraryResponseDto && - other.assetCount == assetCount && - other.createdAt == createdAt && - _deepEquality.equals(other.exclusionPatterns, exclusionPatterns) && - other.id == id && - _deepEquality.equals(other.importPaths, importPaths) && - other.name == name && - other.ownerId == ownerId && - other.refreshedAt == refreshedAt && - other.updatedAt == updatedAt; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (assetCount.hashCode) + - (createdAt.hashCode) + - (exclusionPatterns.hashCode) + - (id.hashCode) + - (importPaths.hashCode) + - (name.hashCode) + - (ownerId.hashCode) + - (refreshedAt == null ? 0 : refreshedAt!.hashCode) + - (updatedAt.hashCode); - - @override - String toString() => 'LibraryResponseDto[assetCount=$assetCount, createdAt=$createdAt, exclusionPatterns=$exclusionPatterns, id=$id, importPaths=$importPaths, name=$name, ownerId=$ownerId, refreshedAt=$refreshedAt, updatedAt=$updatedAt]'; - - Map toJson() { - final json = {}; - json[r'assetCount'] = this.assetCount; - json[r'createdAt'] = _isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? this.createdAt.millisecondsSinceEpoch - : this.createdAt.toUtc().toIso8601String(); - json[r'exclusionPatterns'] = this.exclusionPatterns; - json[r'id'] = this.id; - json[r'importPaths'] = this.importPaths; - json[r'name'] = this.name; - json[r'ownerId'] = this.ownerId; - if (this.refreshedAt != null) { - json[r'refreshedAt'] = _isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? this.refreshedAt!.millisecondsSinceEpoch - : this.refreshedAt!.toUtc().toIso8601String(); - } else { - json[r'refreshedAt'] = null; - } - json[r'updatedAt'] = _isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? this.updatedAt.millisecondsSinceEpoch - : this.updatedAt.toUtc().toIso8601String(); - return json; - } - - /// Returns a new [LibraryResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static LibraryResponseDto? fromJson(dynamic value) { - upgradeDto(value, "LibraryResponseDto"); - if (value is Map) { - final json = value.cast(); - - return LibraryResponseDto( - assetCount: mapValueOfType(json, r'assetCount')!, - createdAt: mapDateTime(json, r'createdAt', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')!, - exclusionPatterns: json[r'exclusionPatterns'] is Iterable - ? (json[r'exclusionPatterns'] as Iterable).cast().toList(growable: false) - : const [], - id: mapValueOfType(json, r'id')!, - importPaths: json[r'importPaths'] is Iterable - ? (json[r'importPaths'] as Iterable).cast().toList(growable: false) - : const [], - name: mapValueOfType(json, r'name')!, - ownerId: mapValueOfType(json, r'ownerId')!, - refreshedAt: mapDateTime(json, r'refreshedAt', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/'), - updatedAt: mapDateTime(json, r'updatedAt', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = LibraryResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = LibraryResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of LibraryResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = LibraryResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'assetCount', - 'createdAt', - 'exclusionPatterns', - 'id', - 'importPaths', - 'name', - 'ownerId', - 'refreshedAt', - 'updatedAt', - }; -} - diff --git a/mobile/openapi/lib/model/library_stats_response_dto.dart b/mobile/openapi/lib/model/library_stats_response_dto.dart deleted file mode 100644 index 55adbc2b49..0000000000 --- a/mobile/openapi/lib/model/library_stats_response_dto.dart +++ /dev/null @@ -1,139 +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 LibraryStatsResponseDto { - /// Returns a new [LibraryStatsResponseDto] instance. - LibraryStatsResponseDto({ - required this.photos, - required this.total, - required this.usage, - required this.videos, - }); - - /// Number of photos - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int photos; - - /// Total number of assets - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int total; - - /// Storage usage in bytes - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int usage; - - /// Number of videos - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int videos; - - @override - bool operator ==(Object other) => identical(this, other) || other is LibraryStatsResponseDto && - other.photos == photos && - other.total == total && - other.usage == usage && - other.videos == videos; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (photos.hashCode) + - (total.hashCode) + - (usage.hashCode) + - (videos.hashCode); - - @override - String toString() => 'LibraryStatsResponseDto[photos=$photos, total=$total, usage=$usage, videos=$videos]'; - - Map toJson() { - final json = {}; - json[r'photos'] = this.photos; - json[r'total'] = this.total; - json[r'usage'] = this.usage; - json[r'videos'] = this.videos; - return json; - } - - /// Returns a new [LibraryStatsResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static LibraryStatsResponseDto? fromJson(dynamic value) { - upgradeDto(value, "LibraryStatsResponseDto"); - if (value is Map) { - final json = value.cast(); - - return LibraryStatsResponseDto( - photos: mapValueOfType(json, r'photos')!, - total: mapValueOfType(json, r'total')!, - usage: mapValueOfType(json, r'usage')!, - videos: mapValueOfType(json, r'videos')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = LibraryStatsResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = LibraryStatsResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of LibraryStatsResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = LibraryStatsResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'photos', - 'total', - 'usage', - 'videos', - }; -} - diff --git a/mobile/openapi/lib/model/license_key_dto.dart b/mobile/openapi/lib/model/license_key_dto.dart deleted file mode 100644 index d1818a2a43..0000000000 --- a/mobile/openapi/lib/model/license_key_dto.dart +++ /dev/null @@ -1,109 +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 LicenseKeyDto { - /// Returns a new [LicenseKeyDto] instance. - LicenseKeyDto({ - required this.activationKey, - required this.licenseKey, - }); - - /// Activation key - String activationKey; - - /// License key (format: /^IM(SV|CL)(-[\\dA-Za-z]{4}){8}$/) - String licenseKey; - - @override - bool operator ==(Object other) => identical(this, other) || other is LicenseKeyDto && - other.activationKey == activationKey && - other.licenseKey == licenseKey; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (activationKey.hashCode) + - (licenseKey.hashCode); - - @override - String toString() => 'LicenseKeyDto[activationKey=$activationKey, licenseKey=$licenseKey]'; - - Map toJson() { - final json = {}; - json[r'activationKey'] = this.activationKey; - json[r'licenseKey'] = this.licenseKey; - return json; - } - - /// Returns a new [LicenseKeyDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static LicenseKeyDto? fromJson(dynamic value) { - upgradeDto(value, "LicenseKeyDto"); - if (value is Map) { - final json = value.cast(); - - return LicenseKeyDto( - activationKey: mapValueOfType(json, r'activationKey')!, - licenseKey: mapValueOfType(json, r'licenseKey')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = LicenseKeyDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = LicenseKeyDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of LicenseKeyDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = LicenseKeyDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'activationKey', - 'licenseKey', - }; -} - diff --git a/mobile/openapi/lib/model/log_level.dart b/mobile/openapi/lib/model/log_level.dart deleted file mode 100644 index edb6a1ddda..0000000000 --- a/mobile/openapi/lib/model/log_level.dart +++ /dev/null @@ -1,97 +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; - -/// Log level -class LogLevel { - /// Instantiate a new enum with the provided [value]. - const LogLevel._(this.value); - - /// The underlying value of this enum member. - final String value; - - @override - String toString() => value; - - String toJson() => value; - - static const verbose = LogLevel._(r'verbose'); - static const debug = LogLevel._(r'debug'); - static const log = LogLevel._(r'log'); - static const warn = LogLevel._(r'warn'); - static const error = LogLevel._(r'error'); - static const fatal = LogLevel._(r'fatal'); - - /// List of all possible values in this [enum][LogLevel]. - static const values = [ - verbose, - debug, - log, - warn, - error, - fatal, - ]; - - static LogLevel? fromJson(dynamic value) => LogLevelTypeTransformer().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 = LogLevel.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } -} - -/// Transformation class that can [encode] an instance of [LogLevel] to String, -/// and [decode] dynamic data back to [LogLevel]. -class LogLevelTypeTransformer { - factory LogLevelTypeTransformer() => _instance ??= const LogLevelTypeTransformer._(); - - const LogLevelTypeTransformer._(); - - String encode(LogLevel data) => data.value; - - /// Decodes a [dynamic value][data] to a LogLevel. - /// - /// 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. - LogLevel? decode(dynamic data, {bool allowNull = true}) { - if (data != null) { - switch (data) { - case r'verbose': return LogLevel.verbose; - case r'debug': return LogLevel.debug; - case r'log': return LogLevel.log; - case r'warn': return LogLevel.warn; - case r'error': return LogLevel.error; - case r'fatal': return LogLevel.fatal; - default: - if (!allowNull) { - throw ArgumentError('Unknown enum value to decode: $data'); - } - } - } - return null; - } - - /// Singleton [LogLevelTypeTransformer] instance. - static LogLevelTypeTransformer? _instance; -} - diff --git a/mobile/openapi/lib/model/login_credential_dto.dart b/mobile/openapi/lib/model/login_credential_dto.dart deleted file mode 100644 index 1fdfdc3d40..0000000000 --- a/mobile/openapi/lib/model/login_credential_dto.dart +++ /dev/null @@ -1,109 +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 LoginCredentialDto { - /// Returns a new [LoginCredentialDto] instance. - LoginCredentialDto({ - required this.email, - required this.password, - }); - - /// User email - String email; - - /// User password - String password; - - @override - bool operator ==(Object other) => identical(this, other) || other is LoginCredentialDto && - other.email == email && - other.password == password; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (email.hashCode) + - (password.hashCode); - - @override - String toString() => 'LoginCredentialDto[email=$email, password=$password]'; - - Map toJson() { - final json = {}; - json[r'email'] = this.email; - json[r'password'] = this.password; - return json; - } - - /// Returns a new [LoginCredentialDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static LoginCredentialDto? fromJson(dynamic value) { - upgradeDto(value, "LoginCredentialDto"); - if (value is Map) { - final json = value.cast(); - - return LoginCredentialDto( - email: mapValueOfType(json, r'email')!, - password: mapValueOfType(json, r'password')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = LoginCredentialDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = LoginCredentialDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of LoginCredentialDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = LoginCredentialDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'email', - 'password', - }; -} - diff --git a/mobile/openapi/lib/model/login_response_dto.dart b/mobile/openapi/lib/model/login_response_dto.dart deleted file mode 100644 index c6938c2393..0000000000 --- a/mobile/openapi/lib/model/login_response_dto.dart +++ /dev/null @@ -1,163 +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 LoginResponseDto { - /// Returns a new [LoginResponseDto] instance. - LoginResponseDto({ - required this.accessToken, - required this.isAdmin, - required this.isOnboarded, - required this.name, - required this.profileImagePath, - required this.shouldChangePassword, - required this.userEmail, - required this.userId, - }); - - /// Access token - String accessToken; - - /// Is admin user - bool isAdmin; - - /// Is onboarded - bool isOnboarded; - - /// User name - String name; - - /// Profile image path - String profileImagePath; - - /// Should change password - bool shouldChangePassword; - - /// User email - String userEmail; - - /// User ID - String userId; - - @override - bool operator ==(Object other) => identical(this, other) || other is LoginResponseDto && - other.accessToken == accessToken && - other.isAdmin == isAdmin && - other.isOnboarded == isOnboarded && - other.name == name && - other.profileImagePath == profileImagePath && - other.shouldChangePassword == shouldChangePassword && - other.userEmail == userEmail && - other.userId == userId; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (accessToken.hashCode) + - (isAdmin.hashCode) + - (isOnboarded.hashCode) + - (name.hashCode) + - (profileImagePath.hashCode) + - (shouldChangePassword.hashCode) + - (userEmail.hashCode) + - (userId.hashCode); - - @override - String toString() => 'LoginResponseDto[accessToken=$accessToken, isAdmin=$isAdmin, isOnboarded=$isOnboarded, name=$name, profileImagePath=$profileImagePath, shouldChangePassword=$shouldChangePassword, userEmail=$userEmail, userId=$userId]'; - - Map toJson() { - final json = {}; - json[r'accessToken'] = this.accessToken; - json[r'isAdmin'] = this.isAdmin; - json[r'isOnboarded'] = this.isOnboarded; - json[r'name'] = this.name; - json[r'profileImagePath'] = this.profileImagePath; - json[r'shouldChangePassword'] = this.shouldChangePassword; - json[r'userEmail'] = this.userEmail; - json[r'userId'] = this.userId; - return json; - } - - /// Returns a new [LoginResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static LoginResponseDto? fromJson(dynamic value) { - upgradeDto(value, "LoginResponseDto"); - if (value is Map) { - final json = value.cast(); - - return LoginResponseDto( - accessToken: mapValueOfType(json, r'accessToken')!, - isAdmin: mapValueOfType(json, r'isAdmin')!, - isOnboarded: mapValueOfType(json, r'isOnboarded')!, - name: mapValueOfType(json, r'name')!, - profileImagePath: mapValueOfType(json, r'profileImagePath')!, - shouldChangePassword: mapValueOfType(json, r'shouldChangePassword')!, - userEmail: mapValueOfType(json, r'userEmail')!, - userId: mapValueOfType(json, r'userId')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = LoginResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = LoginResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of LoginResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = LoginResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'accessToken', - 'isAdmin', - 'isOnboarded', - 'name', - 'profileImagePath', - 'shouldChangePassword', - 'userEmail', - 'userId', - }; -} - diff --git a/mobile/openapi/lib/model/logout_response_dto.dart b/mobile/openapi/lib/model/logout_response_dto.dart deleted file mode 100644 index b50db2c28b..0000000000 --- a/mobile/openapi/lib/model/logout_response_dto.dart +++ /dev/null @@ -1,109 +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 LogoutResponseDto { - /// Returns a new [LogoutResponseDto] instance. - LogoutResponseDto({ - required this.redirectUri, - required this.successful, - }); - - /// Redirect URI - String redirectUri; - - /// Logout successful - bool successful; - - @override - bool operator ==(Object other) => identical(this, other) || other is LogoutResponseDto && - other.redirectUri == redirectUri && - other.successful == successful; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (redirectUri.hashCode) + - (successful.hashCode); - - @override - String toString() => 'LogoutResponseDto[redirectUri=$redirectUri, successful=$successful]'; - - Map toJson() { - final json = {}; - json[r'redirectUri'] = this.redirectUri; - json[r'successful'] = this.successful; - return json; - } - - /// Returns a new [LogoutResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static LogoutResponseDto? fromJson(dynamic value) { - upgradeDto(value, "LogoutResponseDto"); - if (value is Map) { - final json = value.cast(); - - return LogoutResponseDto( - redirectUri: mapValueOfType(json, r'redirectUri')!, - successful: mapValueOfType(json, r'successful')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = LogoutResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = LogoutResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of LogoutResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = LogoutResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'redirectUri', - 'successful', - }; -} - diff --git a/mobile/openapi/lib/model/machine_learning_availability_checks_dto.dart b/mobile/openapi/lib/model/machine_learning_availability_checks_dto.dart deleted file mode 100644 index a9b8608ac1..0000000000 --- a/mobile/openapi/lib/model/machine_learning_availability_checks_dto.dart +++ /dev/null @@ -1,120 +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 MachineLearningAvailabilityChecksDto { - /// Returns a new [MachineLearningAvailabilityChecksDto] instance. - MachineLearningAvailabilityChecksDto({ - required this.enabled, - required this.interval, - required this.timeout, - }); - - /// Enabled - bool enabled; - - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int interval; - - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int timeout; - - @override - bool operator ==(Object other) => identical(this, other) || other is MachineLearningAvailabilityChecksDto && - other.enabled == enabled && - other.interval == interval && - other.timeout == timeout; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (enabled.hashCode) + - (interval.hashCode) + - (timeout.hashCode); - - @override - String toString() => 'MachineLearningAvailabilityChecksDto[enabled=$enabled, interval=$interval, timeout=$timeout]'; - - Map toJson() { - final json = {}; - json[r'enabled'] = this.enabled; - json[r'interval'] = this.interval; - json[r'timeout'] = this.timeout; - return json; - } - - /// Returns a new [MachineLearningAvailabilityChecksDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static MachineLearningAvailabilityChecksDto? fromJson(dynamic value) { - upgradeDto(value, "MachineLearningAvailabilityChecksDto"); - if (value is Map) { - final json = value.cast(); - - return MachineLearningAvailabilityChecksDto( - enabled: mapValueOfType(json, r'enabled')!, - interval: mapValueOfType(json, r'interval')!, - timeout: mapValueOfType(json, r'timeout')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = MachineLearningAvailabilityChecksDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = MachineLearningAvailabilityChecksDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of MachineLearningAvailabilityChecksDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = MachineLearningAvailabilityChecksDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'enabled', - 'interval', - 'timeout', - }; -} - diff --git a/mobile/openapi/lib/model/maintenance_action.dart b/mobile/openapi/lib/model/maintenance_action.dart deleted file mode 100644 index ebf5ec0f71..0000000000 --- a/mobile/openapi/lib/model/maintenance_action.dart +++ /dev/null @@ -1,91 +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; - -/// Maintenance action -class MaintenanceAction { - /// Instantiate a new enum with the provided [value]. - const MaintenanceAction._(this.value); - - /// The underlying value of this enum member. - final String value; - - @override - String toString() => value; - - String toJson() => value; - - static const start = MaintenanceAction._(r'start'); - static const end = MaintenanceAction._(r'end'); - static const selectDatabaseRestore = MaintenanceAction._(r'select_database_restore'); - static const restoreDatabase = MaintenanceAction._(r'restore_database'); - - /// List of all possible values in this [enum][MaintenanceAction]. - static const values = [ - start, - end, - selectDatabaseRestore, - restoreDatabase, - ]; - - static MaintenanceAction? fromJson(dynamic value) => MaintenanceActionTypeTransformer().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 = MaintenanceAction.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } -} - -/// Transformation class that can [encode] an instance of [MaintenanceAction] to String, -/// and [decode] dynamic data back to [MaintenanceAction]. -class MaintenanceActionTypeTransformer { - factory MaintenanceActionTypeTransformer() => _instance ??= const MaintenanceActionTypeTransformer._(); - - const MaintenanceActionTypeTransformer._(); - - String encode(MaintenanceAction data) => data.value; - - /// Decodes a [dynamic value][data] to a MaintenanceAction. - /// - /// 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. - MaintenanceAction? decode(dynamic data, {bool allowNull = true}) { - if (data != null) { - switch (data) { - case r'start': return MaintenanceAction.start; - case r'end': return MaintenanceAction.end; - case r'select_database_restore': return MaintenanceAction.selectDatabaseRestore; - case r'restore_database': return MaintenanceAction.restoreDatabase; - default: - if (!allowNull) { - throw ArgumentError('Unknown enum value to decode: $data'); - } - } - } - return null; - } - - /// Singleton [MaintenanceActionTypeTransformer] instance. - static MaintenanceActionTypeTransformer? _instance; -} - diff --git a/mobile/openapi/lib/model/maintenance_auth_dto.dart b/mobile/openapi/lib/model/maintenance_auth_dto.dart deleted file mode 100644 index f9511bdd2b..0000000000 --- a/mobile/openapi/lib/model/maintenance_auth_dto.dart +++ /dev/null @@ -1,100 +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 MaintenanceAuthDto { - /// Returns a new [MaintenanceAuthDto] instance. - MaintenanceAuthDto({ - required this.username, - }); - - /// Maintenance username - String username; - - @override - bool operator ==(Object other) => identical(this, other) || other is MaintenanceAuthDto && - other.username == username; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (username.hashCode); - - @override - String toString() => 'MaintenanceAuthDto[username=$username]'; - - Map toJson() { - final json = {}; - json[r'username'] = this.username; - return json; - } - - /// Returns a new [MaintenanceAuthDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static MaintenanceAuthDto? fromJson(dynamic value) { - upgradeDto(value, "MaintenanceAuthDto"); - if (value is Map) { - final json = value.cast(); - - return MaintenanceAuthDto( - username: mapValueOfType(json, r'username')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = MaintenanceAuthDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = MaintenanceAuthDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of MaintenanceAuthDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = MaintenanceAuthDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'username', - }; -} - diff --git a/mobile/openapi/lib/model/maintenance_detect_install_response_dto.dart b/mobile/openapi/lib/model/maintenance_detect_install_response_dto.dart deleted file mode 100644 index 1c364a6fdc..0000000000 --- a/mobile/openapi/lib/model/maintenance_detect_install_response_dto.dart +++ /dev/null @@ -1,99 +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 MaintenanceDetectInstallResponseDto { - /// Returns a new [MaintenanceDetectInstallResponseDto] instance. - MaintenanceDetectInstallResponseDto({ - this.storage = const [], - }); - - List storage; - - @override - bool operator ==(Object other) => identical(this, other) || other is MaintenanceDetectInstallResponseDto && - _deepEquality.equals(other.storage, storage); - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (storage.hashCode); - - @override - String toString() => 'MaintenanceDetectInstallResponseDto[storage=$storage]'; - - Map toJson() { - final json = {}; - json[r'storage'] = this.storage; - return json; - } - - /// Returns a new [MaintenanceDetectInstallResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static MaintenanceDetectInstallResponseDto? fromJson(dynamic value) { - upgradeDto(value, "MaintenanceDetectInstallResponseDto"); - if (value is Map) { - final json = value.cast(); - - return MaintenanceDetectInstallResponseDto( - storage: MaintenanceDetectInstallStorageFolderDto.listFromJson(json[r'storage']), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = MaintenanceDetectInstallResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = MaintenanceDetectInstallResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of MaintenanceDetectInstallResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = MaintenanceDetectInstallResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'storage', - }; -} - diff --git a/mobile/openapi/lib/model/maintenance_detect_install_storage_folder_dto.dart b/mobile/openapi/lib/model/maintenance_detect_install_storage_folder_dto.dart deleted file mode 100644 index 83182f53d7..0000000000 --- a/mobile/openapi/lib/model/maintenance_detect_install_storage_folder_dto.dart +++ /dev/null @@ -1,129 +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 MaintenanceDetectInstallStorageFolderDto { - /// Returns a new [MaintenanceDetectInstallStorageFolderDto] instance. - MaintenanceDetectInstallStorageFolderDto({ - required this.files, - required this.folder, - required this.readable, - required this.writable, - }); - - /// Number of files in the folder - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int files; - - StorageFolder folder; - - /// Whether the folder is readable - bool readable; - - /// Whether the folder is writable - bool writable; - - @override - bool operator ==(Object other) => identical(this, other) || other is MaintenanceDetectInstallStorageFolderDto && - other.files == files && - other.folder == folder && - other.readable == readable && - other.writable == writable; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (files.hashCode) + - (folder.hashCode) + - (readable.hashCode) + - (writable.hashCode); - - @override - String toString() => 'MaintenanceDetectInstallStorageFolderDto[files=$files, folder=$folder, readable=$readable, writable=$writable]'; - - Map toJson() { - final json = {}; - json[r'files'] = this.files; - json[r'folder'] = this.folder; - json[r'readable'] = this.readable; - json[r'writable'] = this.writable; - return json; - } - - /// Returns a new [MaintenanceDetectInstallStorageFolderDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static MaintenanceDetectInstallStorageFolderDto? fromJson(dynamic value) { - upgradeDto(value, "MaintenanceDetectInstallStorageFolderDto"); - if (value is Map) { - final json = value.cast(); - - return MaintenanceDetectInstallStorageFolderDto( - files: mapValueOfType(json, r'files')!, - folder: StorageFolder.fromJson(json[r'folder'])!, - readable: mapValueOfType(json, r'readable')!, - writable: mapValueOfType(json, r'writable')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = MaintenanceDetectInstallStorageFolderDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = MaintenanceDetectInstallStorageFolderDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of MaintenanceDetectInstallStorageFolderDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = MaintenanceDetectInstallStorageFolderDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'files', - 'folder', - 'readable', - 'writable', - }; -} - diff --git a/mobile/openapi/lib/model/maintenance_login_dto.dart b/mobile/openapi/lib/model/maintenance_login_dto.dart deleted file mode 100644 index eaa91ae738..0000000000 --- a/mobile/openapi/lib/model/maintenance_login_dto.dart +++ /dev/null @@ -1,108 +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 MaintenanceLoginDto { - /// Returns a new [MaintenanceLoginDto] instance. - MaintenanceLoginDto({ - this.token = const Optional.absent(), - }); - - /// Maintenance token - /// - /// 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. - /// - Optional token; - - @override - bool operator ==(Object other) => identical(this, other) || other is MaintenanceLoginDto && - other.token == token; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (token == null ? 0 : token!.hashCode); - - @override - String toString() => 'MaintenanceLoginDto[token=$token]'; - - Map toJson() { - final json = {}; - if (this.token.isPresent) { - final value = this.token.value; - json[r'token'] = value; - } - return json; - } - - /// Returns a new [MaintenanceLoginDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static MaintenanceLoginDto? fromJson(dynamic value) { - upgradeDto(value, "MaintenanceLoginDto"); - if (value is Map) { - final json = value.cast(); - - return MaintenanceLoginDto( - token: json.containsKey(r'token') ? Optional.present(mapValueOfType(json, r'token')) : const Optional.absent(), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = MaintenanceLoginDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = MaintenanceLoginDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of MaintenanceLoginDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = MaintenanceLoginDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - }; -} - diff --git a/mobile/openapi/lib/model/maintenance_status_response_dto.dart b/mobile/openapi/lib/model/maintenance_status_response_dto.dart deleted file mode 100644 index 82ad12d340..0000000000 --- a/mobile/openapi/lib/model/maintenance_status_response_dto.dart +++ /dev/null @@ -1,157 +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 MaintenanceStatusResponseDto { - /// Returns a new [MaintenanceStatusResponseDto] instance. - MaintenanceStatusResponseDto({ - required this.action, - required this.active, - this.error = const Optional.absent(), - this.progress = const Optional.absent(), - this.task = const Optional.absent(), - }); - - MaintenanceAction action; - - bool active; - - /// - /// 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. - /// - Optional error; - - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - /// - /// 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. - /// - Optional progress; - - /// - /// 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. - /// - Optional task; - - @override - bool operator ==(Object other) => identical(this, other) || other is MaintenanceStatusResponseDto && - other.action == action && - other.active == active && - other.error == error && - other.progress == progress && - other.task == task; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (action.hashCode) + - (active.hashCode) + - (error == null ? 0 : error!.hashCode) + - (progress == null ? 0 : progress!.hashCode) + - (task == null ? 0 : task!.hashCode); - - @override - String toString() => 'MaintenanceStatusResponseDto[action=$action, active=$active, error=$error, progress=$progress, task=$task]'; - - Map toJson() { - final json = {}; - json[r'action'] = this.action; - json[r'active'] = this.active; - if (this.error.isPresent) { - final value = this.error.value; - json[r'error'] = value; - } - if (this.progress.isPresent) { - final value = this.progress.value; - json[r'progress'] = value; - } - if (this.task.isPresent) { - final value = this.task.value; - json[r'task'] = value; - } - return json; - } - - /// Returns a new [MaintenanceStatusResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static MaintenanceStatusResponseDto? fromJson(dynamic value) { - upgradeDto(value, "MaintenanceStatusResponseDto"); - if (value is Map) { - final json = value.cast(); - - return MaintenanceStatusResponseDto( - action: MaintenanceAction.fromJson(json[r'action'])!, - active: mapValueOfType(json, r'active')!, - error: json.containsKey(r'error') ? Optional.present(mapValueOfType(json, r'error')) : const Optional.absent(), - progress: json.containsKey(r'progress') ? Optional.present(json[r'progress'] == null ? null : int.parse('${json[r'progress']}')) : const Optional.absent(), - task: json.containsKey(r'task') ? Optional.present(mapValueOfType(json, r'task')) : const Optional.absent(), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = MaintenanceStatusResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = MaintenanceStatusResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of MaintenanceStatusResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = MaintenanceStatusResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'action', - 'active', - }; -} - diff --git a/mobile/openapi/lib/model/manual_job_name.dart b/mobile/openapi/lib/model/manual_job_name.dart deleted file mode 100644 index 44faaf4476..0000000000 --- a/mobile/openapi/lib/model/manual_job_name.dart +++ /dev/null @@ -1,124 +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; - -/// Manual job name -class ManualJobName { - /// Instantiate a new enum with the provided [value]. - const ManualJobName._(this.value); - - /// The underlying value of this enum member. - final String value; - - @override - String toString() => value; - - String toJson() => value; - - static const personCleanup = ManualJobName._(r'person-cleanup'); - static const tagCleanup = ManualJobName._(r'tag-cleanup'); - static const userCleanup = ManualJobName._(r'user-cleanup'); - static const memoryCleanup = ManualJobName._(r'memory-cleanup'); - static const memoryCreate = ManualJobName._(r'memory-create'); - static const backupDatabase = ManualJobName._(r'backup-database'); - static const integrityMissingFiles = ManualJobName._(r'integrity-missing-files'); - static const integrityUntrackedFiles = ManualJobName._(r'integrity-untracked-files'); - static const integrityChecksumMismatch = ManualJobName._(r'integrity-checksum-mismatch'); - static const integrityMissingFilesRefresh = ManualJobName._(r'integrity-missing-files-refresh'); - static const integrityUntrackedFilesRefresh = ManualJobName._(r'integrity-untracked-files-refresh'); - static const integrityChecksumMismatchRefresh = ManualJobName._(r'integrity-checksum-mismatch-refresh'); - static const integrityMissingFilesDeleteAll = ManualJobName._(r'integrity-missing-files-delete-all'); - static const integrityUntrackedFilesDeleteAll = ManualJobName._(r'integrity-untracked-files-delete-all'); - static const integrityChecksumMismatchDeleteAll = ManualJobName._(r'integrity-checksum-mismatch-delete-all'); - - /// List of all possible values in this [enum][ManualJobName]. - static const values = [ - personCleanup, - tagCleanup, - userCleanup, - memoryCleanup, - memoryCreate, - backupDatabase, - integrityMissingFiles, - integrityUntrackedFiles, - integrityChecksumMismatch, - integrityMissingFilesRefresh, - integrityUntrackedFilesRefresh, - integrityChecksumMismatchRefresh, - integrityMissingFilesDeleteAll, - integrityUntrackedFilesDeleteAll, - integrityChecksumMismatchDeleteAll, - ]; - - static ManualJobName? fromJson(dynamic value) => ManualJobNameTypeTransformer().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 = ManualJobName.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } -} - -/// Transformation class that can [encode] an instance of [ManualJobName] to String, -/// and [decode] dynamic data back to [ManualJobName]. -class ManualJobNameTypeTransformer { - factory ManualJobNameTypeTransformer() => _instance ??= const ManualJobNameTypeTransformer._(); - - const ManualJobNameTypeTransformer._(); - - String encode(ManualJobName data) => data.value; - - /// Decodes a [dynamic value][data] to a ManualJobName. - /// - /// 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. - ManualJobName? decode(dynamic data, {bool allowNull = true}) { - if (data != null) { - switch (data) { - case r'person-cleanup': return ManualJobName.personCleanup; - case r'tag-cleanup': return ManualJobName.tagCleanup; - case r'user-cleanup': return ManualJobName.userCleanup; - case r'memory-cleanup': return ManualJobName.memoryCleanup; - case r'memory-create': return ManualJobName.memoryCreate; - case r'backup-database': return ManualJobName.backupDatabase; - case r'integrity-missing-files': return ManualJobName.integrityMissingFiles; - case r'integrity-untracked-files': return ManualJobName.integrityUntrackedFiles; - case r'integrity-checksum-mismatch': return ManualJobName.integrityChecksumMismatch; - case r'integrity-missing-files-refresh': return ManualJobName.integrityMissingFilesRefresh; - case r'integrity-untracked-files-refresh': return ManualJobName.integrityUntrackedFilesRefresh; - case r'integrity-checksum-mismatch-refresh': return ManualJobName.integrityChecksumMismatchRefresh; - case r'integrity-missing-files-delete-all': return ManualJobName.integrityMissingFilesDeleteAll; - case r'integrity-untracked-files-delete-all': return ManualJobName.integrityUntrackedFilesDeleteAll; - case r'integrity-checksum-mismatch-delete-all': return ManualJobName.integrityChecksumMismatchDeleteAll; - default: - if (!allowNull) { - throw ArgumentError('Unknown enum value to decode: $data'); - } - } - } - return null; - } - - /// Singleton [ManualJobNameTypeTransformer] instance. - static ManualJobNameTypeTransformer? _instance; -} - diff --git a/mobile/openapi/lib/model/map_marker_response_dto.dart b/mobile/openapi/lib/model/map_marker_response_dto.dart deleted file mode 100644 index 3f19c21b6b..0000000000 --- a/mobile/openapi/lib/model/map_marker_response_dto.dart +++ /dev/null @@ -1,157 +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 MapMarkerResponseDto { - /// Returns a new [MapMarkerResponseDto] instance. - MapMarkerResponseDto({ - required this.city, - required this.country, - required this.id, - required this.lat, - required this.lon, - required this.state, - }); - - /// City name - String? city; - - /// Country name - String? country; - - /// Asset ID - String id; - - /// Latitude - double lat; - - /// Longitude - double lon; - - /// State/Province name - String? state; - - @override - bool operator ==(Object other) => identical(this, other) || other is MapMarkerResponseDto && - other.city == city && - other.country == country && - other.id == id && - other.lat == lat && - other.lon == lon && - other.state == state; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (city == null ? 0 : city!.hashCode) + - (country == null ? 0 : country!.hashCode) + - (id.hashCode) + - (lat.hashCode) + - (lon.hashCode) + - (state == null ? 0 : state!.hashCode); - - @override - String toString() => 'MapMarkerResponseDto[city=$city, country=$country, id=$id, lat=$lat, lon=$lon, state=$state]'; - - Map toJson() { - final json = {}; - if (this.city != null) { - json[r'city'] = this.city; - } else { - json[r'city'] = null; - } - if (this.country != null) { - json[r'country'] = this.country; - } else { - json[r'country'] = null; - } - json[r'id'] = this.id; - json[r'lat'] = this.lat; - json[r'lon'] = this.lon; - if (this.state != null) { - json[r'state'] = this.state; - } else { - json[r'state'] = null; - } - return json; - } - - /// Returns a new [MapMarkerResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static MapMarkerResponseDto? fromJson(dynamic value) { - upgradeDto(value, "MapMarkerResponseDto"); - if (value is Map) { - final json = value.cast(); - - return MapMarkerResponseDto( - city: mapValueOfType(json, r'city'), - country: mapValueOfType(json, r'country'), - id: mapValueOfType(json, r'id')!, - lat: mapValueOfType(json, r'lat')!, - lon: mapValueOfType(json, r'lon')!, - state: mapValueOfType(json, r'state'), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = MapMarkerResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = MapMarkerResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of MapMarkerResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = MapMarkerResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'city', - 'country', - 'id', - 'lat', - 'lon', - 'state', - }; -} - diff --git a/mobile/openapi/lib/model/map_reverse_geocode_response_dto.dart b/mobile/openapi/lib/model/map_reverse_geocode_response_dto.dart deleted file mode 100644 index 0fc30f2b88..0000000000 --- a/mobile/openapi/lib/model/map_reverse_geocode_response_dto.dart +++ /dev/null @@ -1,130 +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 MapReverseGeocodeResponseDto { - /// Returns a new [MapReverseGeocodeResponseDto] instance. - MapReverseGeocodeResponseDto({ - required this.city, - required this.country, - required this.state, - }); - - /// City name - String? city; - - /// Country name - String? country; - - /// State/Province name - String? state; - - @override - bool operator ==(Object other) => identical(this, other) || other is MapReverseGeocodeResponseDto && - other.city == city && - other.country == country && - other.state == state; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (city == null ? 0 : city!.hashCode) + - (country == null ? 0 : country!.hashCode) + - (state == null ? 0 : state!.hashCode); - - @override - String toString() => 'MapReverseGeocodeResponseDto[city=$city, country=$country, state=$state]'; - - Map toJson() { - final json = {}; - if (this.city != null) { - json[r'city'] = this.city; - } else { - json[r'city'] = null; - } - if (this.country != null) { - json[r'country'] = this.country; - } else { - json[r'country'] = null; - } - if (this.state != null) { - json[r'state'] = this.state; - } else { - json[r'state'] = null; - } - return json; - } - - /// Returns a new [MapReverseGeocodeResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static MapReverseGeocodeResponseDto? fromJson(dynamic value) { - upgradeDto(value, "MapReverseGeocodeResponseDto"); - if (value is Map) { - final json = value.cast(); - - return MapReverseGeocodeResponseDto( - city: mapValueOfType(json, r'city'), - country: mapValueOfType(json, r'country'), - state: mapValueOfType(json, r'state'), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = MapReverseGeocodeResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = MapReverseGeocodeResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of MapReverseGeocodeResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = MapReverseGeocodeResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'city', - 'country', - 'state', - }; -} - diff --git a/mobile/openapi/lib/model/memories_response.dart b/mobile/openapi/lib/model/memories_response.dart deleted file mode 100644 index 250e214a60..0000000000 --- a/mobile/openapi/lib/model/memories_response.dart +++ /dev/null @@ -1,112 +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 MemoriesResponse { - /// Returns a new [MemoriesResponse] instance. - MemoriesResponse({ - required this.duration, - required this.enabled, - }); - - /// Memory duration in seconds - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int duration; - - /// Whether memories are enabled - 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[duration=$duration, enabled=$enabled]'; - - Map toJson() { - final json = {}; - json[r'duration'] = this.duration; - json[r'enabled'] = this.enabled; - return json; - } - - /// Returns a new [MemoriesResponse] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static MemoriesResponse? fromJson(dynamic value) { - upgradeDto(value, "MemoriesResponse"); - if (value is Map) { - final json = value.cast(); - - return MemoriesResponse( - duration: mapValueOfType(json, r'duration')!, - enabled: mapValueOfType(json, r'enabled')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = MemoriesResponse.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = MemoriesResponse.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of MemoriesResponse-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = MemoriesResponse.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// 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 deleted file mode 100644 index 350cf19182..0000000000 --- a/mobile/openapi/lib/model/memories_update.dart +++ /dev/null @@ -1,128 +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 MemoriesUpdate { - /// Returns a new [MemoriesUpdate] instance. - MemoriesUpdate({ - this.duration = const Optional.absent(), - this.enabled = const Optional.absent(), - }); - - /// Memory duration in seconds - /// - /// Minimum value: 1 - /// Maximum value: 9007199254740991 - /// - /// 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. - /// - Optional duration; - - /// Whether memories are enabled - /// - /// 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. - /// - Optional enabled; - - @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[duration=$duration, enabled=$enabled]'; - - Map toJson() { - final json = {}; - if (this.duration.isPresent) { - final value = this.duration.value; - json[r'duration'] = value; - } - if (this.enabled.isPresent) { - final value = this.enabled.value; - json[r'enabled'] = value; - } - return json; - } - - /// Returns a new [MemoriesUpdate] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static MemoriesUpdate? fromJson(dynamic value) { - upgradeDto(value, "MemoriesUpdate"); - if (value is Map) { - final json = value.cast(); - - return MemoriesUpdate( - duration: json.containsKey(r'duration') ? Optional.present(json[r'duration'] == null ? null : int.parse('${json[r'duration']}')) : const Optional.absent(), - enabled: json.containsKey(r'enabled') ? Optional.present(mapValueOfType(json, r'enabled')) : const Optional.absent(), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = MemoriesUpdate.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = MemoriesUpdate.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of MemoriesUpdate-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = MemoriesUpdate.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - }; -} - diff --git a/mobile/openapi/lib/model/memory_create_dto.dart b/mobile/openapi/lib/model/memory_create_dto.dart deleted file mode 100644 index d032ff0c38..0000000000 --- a/mobile/openapi/lib/model/memory_create_dto.dart +++ /dev/null @@ -1,205 +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 MemoryCreateDto { - /// Returns a new [MemoryCreateDto] instance. - MemoryCreateDto({ - this.assetIds = const Optional.present(const []), - required this.data, - this.hideAt = const Optional.absent(), - this.isSaved = const Optional.absent(), - required this.memoryAt, - this.seenAt = const Optional.absent(), - this.showAt = const Optional.absent(), - required this.type, - }); - - /// Asset IDs to associate with memory - Optional?> assetIds; - - OnThisDayDto data; - - /// Date when memory should be hidden - /// - /// 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. - /// - Optional hideAt; - - /// Is memory saved - /// - /// 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. - /// - Optional isSaved; - - /// Memory date - DateTime memoryAt; - - /// Date when memory was seen - /// - /// 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. - /// - Optional seenAt; - - /// Date when memory should be shown - /// - /// 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. - /// - Optional showAt; - - MemoryType type; - - @override - bool operator ==(Object other) => identical(this, other) || other is MemoryCreateDto && - _deepEquality.equals(other.assetIds, assetIds) && - other.data == data && - other.hideAt == hideAt && - other.isSaved == isSaved && - other.memoryAt == memoryAt && - other.seenAt == seenAt && - other.showAt == showAt && - other.type == type; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (assetIds.hashCode) + - (data.hashCode) + - (hideAt == null ? 0 : hideAt!.hashCode) + - (isSaved == null ? 0 : isSaved!.hashCode) + - (memoryAt.hashCode) + - (seenAt == null ? 0 : seenAt!.hashCode) + - (showAt == null ? 0 : showAt!.hashCode) + - (type.hashCode); - - @override - String toString() => 'MemoryCreateDto[assetIds=$assetIds, data=$data, hideAt=$hideAt, isSaved=$isSaved, memoryAt=$memoryAt, seenAt=$seenAt, showAt=$showAt, type=$type]'; - - Map toJson() { - final json = {}; - if (this.assetIds.isPresent) { - final value = this.assetIds.value; - json[r'assetIds'] = value; - } - json[r'data'] = this.data; - if (this.hideAt.isPresent) { - final value = this.hideAt.value; - json[r'hideAt'] = value == null ? null : (_isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? value.millisecondsSinceEpoch - : value.toUtc().toIso8601String()); - } - if (this.isSaved.isPresent) { - final value = this.isSaved.value; - json[r'isSaved'] = value; - } - json[r'memoryAt'] = _isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? this.memoryAt.millisecondsSinceEpoch - : this.memoryAt.toUtc().toIso8601String(); - if (this.seenAt.isPresent) { - final value = this.seenAt.value; - json[r'seenAt'] = value == null ? null : (_isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? value.millisecondsSinceEpoch - : value.toUtc().toIso8601String()); - } - if (this.showAt.isPresent) { - final value = this.showAt.value; - json[r'showAt'] = value == null ? null : (_isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? value.millisecondsSinceEpoch - : value.toUtc().toIso8601String()); - } - json[r'type'] = this.type; - return json; - } - - /// Returns a new [MemoryCreateDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static MemoryCreateDto? fromJson(dynamic value) { - upgradeDto(value, "MemoryCreateDto"); - if (value is Map) { - final json = value.cast(); - - return MemoryCreateDto( - assetIds: json.containsKey(r'assetIds') ? Optional.present(json[r'assetIds'] is Iterable - ? (json[r'assetIds'] as Iterable).cast().toList(growable: false) - : const []) : const Optional.absent(), - data: OnThisDayDto.fromJson(json[r'data'])!, - hideAt: json.containsKey(r'hideAt') ? Optional.present(mapDateTime(json, r'hideAt', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')) : const Optional.absent(), - isSaved: json.containsKey(r'isSaved') ? Optional.present(mapValueOfType(json, r'isSaved')) : const Optional.absent(), - memoryAt: mapDateTime(json, r'memoryAt', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')!, - seenAt: json.containsKey(r'seenAt') ? Optional.present(mapDateTime(json, r'seenAt', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')) : const Optional.absent(), - showAt: json.containsKey(r'showAt') ? Optional.present(mapDateTime(json, r'showAt', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')) : const Optional.absent(), - type: MemoryType.fromJson(json[r'type'])!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = MemoryCreateDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = MemoryCreateDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of MemoryCreateDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = MemoryCreateDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'data', - 'memoryAt', - 'type', - }; -} - diff --git a/mobile/openapi/lib/model/memory_response_dto.dart b/mobile/openapi/lib/model/memory_response_dto.dart deleted file mode 100644 index 41a522c773..0000000000 --- a/mobile/openapi/lib/model/memory_response_dto.dart +++ /dev/null @@ -1,251 +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 MemoryResponseDto { - /// Returns a new [MemoryResponseDto] instance. - MemoryResponseDto({ - this.assets = const [], - required this.createdAt, - required this.data, - this.deletedAt = const Optional.absent(), - this.hideAt = const Optional.absent(), - required this.id, - required this.isSaved, - required this.memoryAt, - required this.ownerId, - this.seenAt = const Optional.absent(), - this.showAt = const Optional.absent(), - required this.type, - required this.updatedAt, - }); - - List assets; - - /// Creation date - DateTime createdAt; - - OnThisDayDto data; - - /// Deletion date - /// - /// 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. - /// - Optional deletedAt; - - /// Date when memory should be hidden - /// - /// 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. - /// - Optional hideAt; - - /// Memory ID - String id; - - /// Is memory saved - bool isSaved; - - /// Memory date - DateTime memoryAt; - - /// Owner user ID - String ownerId; - - /// Date when memory was seen - /// - /// 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. - /// - Optional seenAt; - - /// Date when memory should be shown - /// - /// 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. - /// - Optional showAt; - - MemoryType type; - - /// Last update date - DateTime updatedAt; - - @override - bool operator ==(Object other) => identical(this, other) || other is MemoryResponseDto && - _deepEquality.equals(other.assets, assets) && - other.createdAt == createdAt && - other.data == data && - other.deletedAt == deletedAt && - other.hideAt == hideAt && - other.id == id && - other.isSaved == isSaved && - other.memoryAt == memoryAt && - other.ownerId == ownerId && - other.seenAt == seenAt && - other.showAt == showAt && - other.type == type && - other.updatedAt == updatedAt; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (assets.hashCode) + - (createdAt.hashCode) + - (data.hashCode) + - (deletedAt == null ? 0 : deletedAt!.hashCode) + - (hideAt == null ? 0 : hideAt!.hashCode) + - (id.hashCode) + - (isSaved.hashCode) + - (memoryAt.hashCode) + - (ownerId.hashCode) + - (seenAt == null ? 0 : seenAt!.hashCode) + - (showAt == null ? 0 : showAt!.hashCode) + - (type.hashCode) + - (updatedAt.hashCode); - - @override - String toString() => 'MemoryResponseDto[assets=$assets, createdAt=$createdAt, data=$data, deletedAt=$deletedAt, hideAt=$hideAt, id=$id, isSaved=$isSaved, memoryAt=$memoryAt, ownerId=$ownerId, seenAt=$seenAt, showAt=$showAt, type=$type, updatedAt=$updatedAt]'; - - Map toJson() { - final json = {}; - json[r'assets'] = this.assets; - json[r'createdAt'] = _isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? this.createdAt.millisecondsSinceEpoch - : this.createdAt.toUtc().toIso8601String(); - json[r'data'] = this.data; - if (this.deletedAt.isPresent) { - final value = this.deletedAt.value; - json[r'deletedAt'] = value == null ? null : (_isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? value.millisecondsSinceEpoch - : value.toUtc().toIso8601String()); - } - if (this.hideAt.isPresent) { - final value = this.hideAt.value; - json[r'hideAt'] = value == null ? null : (_isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? value.millisecondsSinceEpoch - : value.toUtc().toIso8601String()); - } - json[r'id'] = this.id; - json[r'isSaved'] = this.isSaved; - json[r'memoryAt'] = _isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? this.memoryAt.millisecondsSinceEpoch - : this.memoryAt.toUtc().toIso8601String(); - json[r'ownerId'] = this.ownerId; - if (this.seenAt.isPresent) { - final value = this.seenAt.value; - json[r'seenAt'] = value == null ? null : (_isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? value.millisecondsSinceEpoch - : value.toUtc().toIso8601String()); - } - if (this.showAt.isPresent) { - final value = this.showAt.value; - json[r'showAt'] = value == null ? null : (_isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? value.millisecondsSinceEpoch - : value.toUtc().toIso8601String()); - } - json[r'type'] = this.type; - json[r'updatedAt'] = _isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? this.updatedAt.millisecondsSinceEpoch - : this.updatedAt.toUtc().toIso8601String(); - return json; - } - - /// Returns a new [MemoryResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static MemoryResponseDto? fromJson(dynamic value) { - upgradeDto(value, "MemoryResponseDto"); - if (value is Map) { - final json = value.cast(); - - return MemoryResponseDto( - assets: AssetResponseDto.listFromJson(json[r'assets']), - createdAt: mapDateTime(json, r'createdAt', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')!, - data: OnThisDayDto.fromJson(json[r'data'])!, - deletedAt: json.containsKey(r'deletedAt') ? Optional.present(mapDateTime(json, r'deletedAt', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')) : const Optional.absent(), - hideAt: json.containsKey(r'hideAt') ? Optional.present(mapDateTime(json, r'hideAt', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')) : const Optional.absent(), - id: mapValueOfType(json, r'id')!, - isSaved: mapValueOfType(json, r'isSaved')!, - memoryAt: mapDateTime(json, r'memoryAt', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')!, - ownerId: mapValueOfType(json, r'ownerId')!, - seenAt: json.containsKey(r'seenAt') ? Optional.present(mapDateTime(json, r'seenAt', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')) : const Optional.absent(), - showAt: json.containsKey(r'showAt') ? Optional.present(mapDateTime(json, r'showAt', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')) : const Optional.absent(), - type: MemoryType.fromJson(json[r'type'])!, - updatedAt: mapDateTime(json, r'updatedAt', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = MemoryResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = MemoryResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of MemoryResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = MemoryResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'assets', - 'createdAt', - 'data', - 'id', - 'isSaved', - 'memoryAt', - 'ownerId', - 'type', - 'updatedAt', - }; -} - diff --git a/mobile/openapi/lib/model/memory_search_order.dart b/mobile/openapi/lib/model/memory_search_order.dart deleted file mode 100644 index 67d0b69f46..0000000000 --- a/mobile/openapi/lib/model/memory_search_order.dart +++ /dev/null @@ -1,88 +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; - -/// Sort order -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/openapi/lib/model/memory_statistics_response_dto.dart b/mobile/openapi/lib/model/memory_statistics_response_dto.dart deleted file mode 100644 index ae542870d9..0000000000 --- a/mobile/openapi/lib/model/memory_statistics_response_dto.dart +++ /dev/null @@ -1,103 +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 MemoryStatisticsResponseDto { - /// Returns a new [MemoryStatisticsResponseDto] instance. - MemoryStatisticsResponseDto({ - required this.total, - }); - - /// Total number of memories - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int total; - - @override - bool operator ==(Object other) => identical(this, other) || other is MemoryStatisticsResponseDto && - other.total == total; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (total.hashCode); - - @override - String toString() => 'MemoryStatisticsResponseDto[total=$total]'; - - Map toJson() { - final json = {}; - json[r'total'] = this.total; - return json; - } - - /// Returns a new [MemoryStatisticsResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static MemoryStatisticsResponseDto? fromJson(dynamic value) { - upgradeDto(value, "MemoryStatisticsResponseDto"); - if (value is Map) { - final json = value.cast(); - - return MemoryStatisticsResponseDto( - total: mapValueOfType(json, r'total')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = MemoryStatisticsResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = MemoryStatisticsResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of MemoryStatisticsResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = MemoryStatisticsResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'total', - }; -} - diff --git a/mobile/openapi/lib/model/memory_type.dart b/mobile/openapi/lib/model/memory_type.dart deleted file mode 100644 index ecfc93edb0..0000000000 --- a/mobile/openapi/lib/model/memory_type.dart +++ /dev/null @@ -1,82 +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; - -/// Memory type -class MemoryType { - /// Instantiate a new enum with the provided [value]. - const MemoryType._(this.value); - - /// The underlying value of this enum member. - final String value; - - @override - String toString() => value; - - String toJson() => value; - - static const onThisDay = MemoryType._(r'on_this_day'); - - /// List of all possible values in this [enum][MemoryType]. - static const values = [ - onThisDay, - ]; - - static MemoryType? fromJson(dynamic value) => MemoryTypeTypeTransformer().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 = MemoryType.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } -} - -/// Transformation class that can [encode] an instance of [MemoryType] to String, -/// and [decode] dynamic data back to [MemoryType]. -class MemoryTypeTypeTransformer { - factory MemoryTypeTypeTransformer() => _instance ??= const MemoryTypeTypeTransformer._(); - - const MemoryTypeTypeTransformer._(); - - String encode(MemoryType data) => data.value; - - /// Decodes a [dynamic value][data] to a MemoryType. - /// - /// 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. - MemoryType? decode(dynamic data, {bool allowNull = true}) { - if (data != null) { - switch (data) { - case r'on_this_day': return MemoryType.onThisDay; - default: - if (!allowNull) { - throw ArgumentError('Unknown enum value to decode: $data'); - } - } - } - return null; - } - - /// Singleton [MemoryTypeTypeTransformer] instance. - static MemoryTypeTypeTransformer? _instance; -} - diff --git a/mobile/openapi/lib/model/memory_update_dto.dart b/mobile/openapi/lib/model/memory_update_dto.dart deleted file mode 100644 index 43e879745c..0000000000 --- a/mobile/openapi/lib/model/memory_update_dto.dart +++ /dev/null @@ -1,146 +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 MemoryUpdateDto { - /// Returns a new [MemoryUpdateDto] instance. - MemoryUpdateDto({ - this.isSaved = const Optional.absent(), - this.memoryAt = const Optional.absent(), - this.seenAt = const Optional.absent(), - }); - - /// Is memory saved - /// - /// 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. - /// - Optional isSaved; - - /// Memory date - /// - /// 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. - /// - Optional memoryAt; - - /// Date when memory was seen - /// - /// 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. - /// - Optional seenAt; - - @override - bool operator ==(Object other) => identical(this, other) || other is MemoryUpdateDto && - other.isSaved == isSaved && - other.memoryAt == memoryAt && - other.seenAt == seenAt; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (isSaved == null ? 0 : isSaved!.hashCode) + - (memoryAt == null ? 0 : memoryAt!.hashCode) + - (seenAt == null ? 0 : seenAt!.hashCode); - - @override - String toString() => 'MemoryUpdateDto[isSaved=$isSaved, memoryAt=$memoryAt, seenAt=$seenAt]'; - - Map toJson() { - final json = {}; - if (this.isSaved.isPresent) { - final value = this.isSaved.value; - json[r'isSaved'] = value; - } - if (this.memoryAt.isPresent) { - final value = this.memoryAt.value; - json[r'memoryAt'] = value == null ? null : (_isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? value.millisecondsSinceEpoch - : value.toUtc().toIso8601String()); - } - if (this.seenAt.isPresent) { - final value = this.seenAt.value; - json[r'seenAt'] = value == null ? null : (_isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? value.millisecondsSinceEpoch - : value.toUtc().toIso8601String()); - } - return json; - } - - /// Returns a new [MemoryUpdateDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static MemoryUpdateDto? fromJson(dynamic value) { - upgradeDto(value, "MemoryUpdateDto"); - if (value is Map) { - final json = value.cast(); - - return MemoryUpdateDto( - isSaved: json.containsKey(r'isSaved') ? Optional.present(mapValueOfType(json, r'isSaved')) : const Optional.absent(), - memoryAt: json.containsKey(r'memoryAt') ? Optional.present(mapDateTime(json, r'memoryAt', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')) : const Optional.absent(), - seenAt: json.containsKey(r'seenAt') ? Optional.present(mapDateTime(json, r'seenAt', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')) : const Optional.absent(), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = MemoryUpdateDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = MemoryUpdateDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of MemoryUpdateDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = MemoryUpdateDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - }; -} - diff --git a/mobile/openapi/lib/model/merge_person_dto.dart b/mobile/openapi/lib/model/merge_person_dto.dart deleted file mode 100644 index 8a647890c3..0000000000 --- a/mobile/openapi/lib/model/merge_person_dto.dart +++ /dev/null @@ -1,102 +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 MergePersonDto { - /// Returns a new [MergePersonDto] instance. - MergePersonDto({ - this.ids = const [], - }); - - /// Person IDs to merge - List ids; - - @override - bool operator ==(Object other) => identical(this, other) || other is MergePersonDto && - _deepEquality.equals(other.ids, ids); - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (ids.hashCode); - - @override - String toString() => 'MergePersonDto[ids=$ids]'; - - Map toJson() { - final json = {}; - json[r'ids'] = this.ids; - return json; - } - - /// Returns a new [MergePersonDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static MergePersonDto? fromJson(dynamic value) { - upgradeDto(value, "MergePersonDto"); - if (value is Map) { - final json = value.cast(); - - return MergePersonDto( - ids: json[r'ids'] is Iterable - ? (json[r'ids'] as Iterable).cast().toList(growable: false) - : const [], - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = MergePersonDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = MergePersonDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of MergePersonDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = MergePersonDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'ids', - }; -} - diff --git a/mobile/openapi/lib/model/metadata_search_dto.dart b/mobile/openapi/lib/model/metadata_search_dto.dart deleted file mode 100644 index b0afd292ee..0000000000 --- a/mobile/openapi/lib/model/metadata_search_dto.dart +++ /dev/null @@ -1,767 +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 MetadataSearchDto { - /// Returns a new [MetadataSearchDto] instance. - MetadataSearchDto({ - this.albumIds = const Optional.present(const []), - this.checksum = const Optional.absent(), - this.city = const Optional.absent(), - this.country = const Optional.absent(), - this.createdAfter = const Optional.absent(), - this.createdBefore = const Optional.absent(), - this.description = const Optional.absent(), - this.encodedVideoPath = const Optional.absent(), - this.id = const Optional.absent(), - this.isEncoded = const Optional.absent(), - this.isFavorite = const Optional.absent(), - this.isMotion = const Optional.absent(), - this.isNotInAlbum = const Optional.absent(), - this.isOffline = const Optional.absent(), - this.lensModel = const Optional.absent(), - this.libraryId = const Optional.absent(), - this.make = const Optional.absent(), - this.model = const Optional.absent(), - this.ocr = const Optional.absent(), - this.order = const Optional.absent(), - this.originalFileName = const Optional.absent(), - this.originalPath = const Optional.absent(), - this.page = const Optional.absent(), - this.personIds = const Optional.present(const []), - this.previewPath = const Optional.absent(), - this.rating = const Optional.absent(), - this.size = const Optional.absent(), - this.state = const Optional.absent(), - this.tagIds = const Optional.present(const []), - this.takenAfter = const Optional.absent(), - this.takenBefore = const Optional.absent(), - this.thumbnailPath = const Optional.absent(), - this.trashedAfter = const Optional.absent(), - this.trashedBefore = const Optional.absent(), - this.type = const Optional.absent(), - this.updatedAfter = const Optional.absent(), - this.updatedBefore = const Optional.absent(), - this.visibility = const Optional.absent(), - this.withDeleted = const Optional.absent(), - this.withExif = const Optional.absent(), - this.withPeople = const Optional.absent(), - this.withStacked = const Optional.absent(), - }); - - /// Filter by album IDs - Optional?> albumIds; - - /// Filter by file checksum - /// - /// 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. - /// - Optional checksum; - - /// Filter by city name - Optional city; - - /// Filter by country name - Optional country; - - /// Filter by creation date (after) - /// - /// 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. - /// - Optional createdAfter; - - /// Filter by creation date (before) - /// - /// 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. - /// - Optional createdBefore; - - /// Filter by description text - /// - /// 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. - /// - Optional description; - - /// Filter by encoded video file path - /// - /// 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. - /// - Optional encodedVideoPath; - - /// Filter by asset ID - /// - /// 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. - /// - Optional id; - - /// Filter by encoded status - /// - /// 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. - /// - Optional isEncoded; - - /// Filter by favorite status - /// - /// 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. - /// - Optional isFavorite; - - /// Filter by motion photo status - /// - /// 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. - /// - Optional isMotion; - - /// Filter assets not in any album - /// - /// 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. - /// - Optional isNotInAlbum; - - /// Filter by offline status - /// - /// 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. - /// - Optional isOffline; - - /// Filter by lens model - Optional lensModel; - - /// Library ID to filter by - Optional libraryId; - - /// Filter by camera make - Optional make; - - /// Filter by camera model - Optional model; - - /// Filter by OCR text content - /// - /// 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. - /// - Optional ocr; - - /// - /// 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. - /// - Optional order; - - /// Filter by original file name - /// - /// 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. - /// - Optional originalFileName; - - /// Filter by original file path - /// - /// 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. - /// - Optional originalPath; - - /// Page number - /// - /// Minimum value: 1 - /// Maximum value: 9007199254740991 - /// - /// 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. - /// - Optional page; - - /// Filter by person IDs - Optional?> personIds; - - /// Filter by preview file path - /// - /// 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. - /// - Optional previewPath; - - /// Filter by rating [1-5], or null for unrated - /// - /// Minimum value: 1 - /// Maximum value: 5 - Optional rating; - - /// Number of results to return - /// - /// Minimum value: 1 - /// Maximum value: 1000 - /// - /// 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. - /// - Optional size; - - /// Filter by state/province name - Optional state; - - /// Filter by tag IDs - Optional?> tagIds; - - /// Filter by taken date (after) - /// - /// 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. - /// - Optional takenAfter; - - /// Filter by taken date (before) - /// - /// 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. - /// - Optional takenBefore; - - /// Filter by thumbnail file path - /// - /// 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. - /// - Optional thumbnailPath; - - /// Filter by trash date (after) - /// - /// 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. - /// - Optional trashedAfter; - - /// Filter by trash date (before) - /// - /// 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. - /// - Optional trashedBefore; - - /// - /// 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. - /// - Optional type; - - /// Filter by update date (after) - /// - /// 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. - /// - Optional updatedAfter; - - /// Filter by update date (before) - /// - /// 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. - /// - Optional updatedBefore; - - /// - /// 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. - /// - Optional visibility; - - /// Include deleted assets - /// - /// 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. - /// - Optional withDeleted; - - /// Include EXIF data in response - /// - /// 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. - /// - Optional withExif; - - /// Include people data in response - /// - /// 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. - /// - Optional withPeople; - - /// Include stacked assets - /// - /// 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. - /// - Optional withStacked; - - @override - bool operator ==(Object other) => identical(this, other) || other is MetadataSearchDto && - _deepEquality.equals(other.albumIds, albumIds) && - other.checksum == checksum && - other.city == city && - other.country == country && - other.createdAfter == createdAfter && - other.createdBefore == createdBefore && - other.description == description && - other.encodedVideoPath == encodedVideoPath && - other.id == id && - other.isEncoded == isEncoded && - other.isFavorite == isFavorite && - other.isMotion == isMotion && - other.isNotInAlbum == isNotInAlbum && - other.isOffline == isOffline && - other.lensModel == lensModel && - other.libraryId == libraryId && - other.make == make && - other.model == model && - other.ocr == ocr && - other.order == order && - other.originalFileName == originalFileName && - other.originalPath == originalPath && - other.page == page && - _deepEquality.equals(other.personIds, personIds) && - other.previewPath == previewPath && - other.rating == rating && - other.size == size && - other.state == state && - _deepEquality.equals(other.tagIds, tagIds) && - other.takenAfter == takenAfter && - other.takenBefore == takenBefore && - other.thumbnailPath == thumbnailPath && - other.trashedAfter == trashedAfter && - other.trashedBefore == trashedBefore && - other.type == type && - other.updatedAfter == updatedAfter && - other.updatedBefore == updatedBefore && - other.visibility == visibility && - other.withDeleted == withDeleted && - other.withExif == withExif && - other.withPeople == withPeople && - other.withStacked == withStacked; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (albumIds.hashCode) + - (checksum == null ? 0 : checksum!.hashCode) + - (city == null ? 0 : city!.hashCode) + - (country == null ? 0 : country!.hashCode) + - (createdAfter == null ? 0 : createdAfter!.hashCode) + - (createdBefore == null ? 0 : createdBefore!.hashCode) + - (description == null ? 0 : description!.hashCode) + - (encodedVideoPath == null ? 0 : encodedVideoPath!.hashCode) + - (id == null ? 0 : id!.hashCode) + - (isEncoded == null ? 0 : isEncoded!.hashCode) + - (isFavorite == null ? 0 : isFavorite!.hashCode) + - (isMotion == null ? 0 : isMotion!.hashCode) + - (isNotInAlbum == null ? 0 : isNotInAlbum!.hashCode) + - (isOffline == null ? 0 : isOffline!.hashCode) + - (lensModel == null ? 0 : lensModel!.hashCode) + - (libraryId == null ? 0 : libraryId!.hashCode) + - (make == null ? 0 : make!.hashCode) + - (model == null ? 0 : model!.hashCode) + - (ocr == null ? 0 : ocr!.hashCode) + - (order == null ? 0 : order!.hashCode) + - (originalFileName == null ? 0 : originalFileName!.hashCode) + - (originalPath == null ? 0 : originalPath!.hashCode) + - (page == null ? 0 : page!.hashCode) + - (personIds.hashCode) + - (previewPath == null ? 0 : previewPath!.hashCode) + - (rating == null ? 0 : rating!.hashCode) + - (size == null ? 0 : size!.hashCode) + - (state == null ? 0 : state!.hashCode) + - (tagIds == null ? 0 : tagIds!.hashCode) + - (takenAfter == null ? 0 : takenAfter!.hashCode) + - (takenBefore == null ? 0 : takenBefore!.hashCode) + - (thumbnailPath == null ? 0 : thumbnailPath!.hashCode) + - (trashedAfter == null ? 0 : trashedAfter!.hashCode) + - (trashedBefore == null ? 0 : trashedBefore!.hashCode) + - (type == null ? 0 : type!.hashCode) + - (updatedAfter == null ? 0 : updatedAfter!.hashCode) + - (updatedBefore == null ? 0 : updatedBefore!.hashCode) + - (visibility == null ? 0 : visibility!.hashCode) + - (withDeleted == null ? 0 : withDeleted!.hashCode) + - (withExif == null ? 0 : withExif!.hashCode) + - (withPeople == null ? 0 : withPeople!.hashCode) + - (withStacked == null ? 0 : withStacked!.hashCode); - - @override - String toString() => 'MetadataSearchDto[albumIds=$albumIds, checksum=$checksum, city=$city, country=$country, createdAfter=$createdAfter, createdBefore=$createdBefore, description=$description, encodedVideoPath=$encodedVideoPath, id=$id, isEncoded=$isEncoded, isFavorite=$isFavorite, isMotion=$isMotion, isNotInAlbum=$isNotInAlbum, isOffline=$isOffline, lensModel=$lensModel, libraryId=$libraryId, make=$make, model=$model, ocr=$ocr, order=$order, originalFileName=$originalFileName, originalPath=$originalPath, page=$page, personIds=$personIds, previewPath=$previewPath, rating=$rating, size=$size, state=$state, tagIds=$tagIds, takenAfter=$takenAfter, takenBefore=$takenBefore, thumbnailPath=$thumbnailPath, trashedAfter=$trashedAfter, trashedBefore=$trashedBefore, type=$type, updatedAfter=$updatedAfter, updatedBefore=$updatedBefore, visibility=$visibility, withDeleted=$withDeleted, withExif=$withExif, withPeople=$withPeople, withStacked=$withStacked]'; - - Map toJson() { - final json = {}; - if (this.albumIds.isPresent) { - final value = this.albumIds.value; - json[r'albumIds'] = value; - } - if (this.checksum.isPresent) { - final value = this.checksum.value; - json[r'checksum'] = value; - } - if (this.city.isPresent) { - final value = this.city.value; - json[r'city'] = value; - } - if (this.country.isPresent) { - final value = this.country.value; - json[r'country'] = value; - } - if (this.createdAfter.isPresent) { - final value = this.createdAfter.value; - json[r'createdAfter'] = value == null ? null : (_isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? value.millisecondsSinceEpoch - : value.toUtc().toIso8601String()); - } - if (this.createdBefore.isPresent) { - final value = this.createdBefore.value; - json[r'createdBefore'] = value == null ? null : (_isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? value.millisecondsSinceEpoch - : value.toUtc().toIso8601String()); - } - if (this.description.isPresent) { - final value = this.description.value; - json[r'description'] = value; - } - if (this.encodedVideoPath.isPresent) { - final value = this.encodedVideoPath.value; - json[r'encodedVideoPath'] = value; - } - if (this.id.isPresent) { - final value = this.id.value; - json[r'id'] = value; - } - if (this.isEncoded.isPresent) { - final value = this.isEncoded.value; - json[r'isEncoded'] = value; - } - if (this.isFavorite.isPresent) { - final value = this.isFavorite.value; - json[r'isFavorite'] = value; - } - if (this.isMotion.isPresent) { - final value = this.isMotion.value; - json[r'isMotion'] = value; - } - if (this.isNotInAlbum.isPresent) { - final value = this.isNotInAlbum.value; - json[r'isNotInAlbum'] = value; - } - if (this.isOffline.isPresent) { - final value = this.isOffline.value; - json[r'isOffline'] = value; - } - if (this.lensModel.isPresent) { - final value = this.lensModel.value; - json[r'lensModel'] = value; - } - if (this.libraryId.isPresent) { - final value = this.libraryId.value; - json[r'libraryId'] = value; - } - if (this.make.isPresent) { - final value = this.make.value; - json[r'make'] = value; - } - if (this.model.isPresent) { - final value = this.model.value; - json[r'model'] = value; - } - if (this.ocr.isPresent) { - final value = this.ocr.value; - json[r'ocr'] = value; - } - if (this.order.isPresent) { - final value = this.order.value; - json[r'order'] = value; - } - if (this.originalFileName.isPresent) { - final value = this.originalFileName.value; - json[r'originalFileName'] = value; - } - if (this.originalPath.isPresent) { - final value = this.originalPath.value; - json[r'originalPath'] = value; - } - if (this.page.isPresent) { - final value = this.page.value; - json[r'page'] = value; - } - if (this.personIds.isPresent) { - final value = this.personIds.value; - json[r'personIds'] = value; - } - if (this.previewPath.isPresent) { - final value = this.previewPath.value; - json[r'previewPath'] = value; - } - if (this.rating.isPresent) { - final value = this.rating.value; - json[r'rating'] = value; - } - if (this.size.isPresent) { - final value = this.size.value; - json[r'size'] = value; - } - if (this.state.isPresent) { - final value = this.state.value; - json[r'state'] = value; - } - if (this.tagIds.isPresent) { - final value = this.tagIds.value; - json[r'tagIds'] = value; - } - if (this.takenAfter.isPresent) { - final value = this.takenAfter.value; - json[r'takenAfter'] = value == null ? null : (_isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? value.millisecondsSinceEpoch - : value.toUtc().toIso8601String()); - } - if (this.takenBefore.isPresent) { - final value = this.takenBefore.value; - json[r'takenBefore'] = value == null ? null : (_isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? value.millisecondsSinceEpoch - : value.toUtc().toIso8601String()); - } - if (this.thumbnailPath.isPresent) { - final value = this.thumbnailPath.value; - json[r'thumbnailPath'] = value; - } - if (this.trashedAfter.isPresent) { - final value = this.trashedAfter.value; - json[r'trashedAfter'] = value == null ? null : (_isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? value.millisecondsSinceEpoch - : value.toUtc().toIso8601String()); - } - if (this.trashedBefore.isPresent) { - final value = this.trashedBefore.value; - json[r'trashedBefore'] = value == null ? null : (_isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? value.millisecondsSinceEpoch - : value.toUtc().toIso8601String()); - } - if (this.type.isPresent) { - final value = this.type.value; - json[r'type'] = value; - } - if (this.updatedAfter.isPresent) { - final value = this.updatedAfter.value; - json[r'updatedAfter'] = value == null ? null : (_isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? value.millisecondsSinceEpoch - : value.toUtc().toIso8601String()); - } - if (this.updatedBefore.isPresent) { - final value = this.updatedBefore.value; - json[r'updatedBefore'] = value == null ? null : (_isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? value.millisecondsSinceEpoch - : value.toUtc().toIso8601String()); - } - if (this.visibility.isPresent) { - final value = this.visibility.value; - json[r'visibility'] = value; - } - if (this.withDeleted.isPresent) { - final value = this.withDeleted.value; - json[r'withDeleted'] = value; - } - if (this.withExif.isPresent) { - final value = this.withExif.value; - json[r'withExif'] = value; - } - if (this.withPeople.isPresent) { - final value = this.withPeople.value; - json[r'withPeople'] = value; - } - if (this.withStacked.isPresent) { - final value = this.withStacked.value; - json[r'withStacked'] = value; - } - return json; - } - - /// Returns a new [MetadataSearchDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static MetadataSearchDto? fromJson(dynamic value) { - upgradeDto(value, "MetadataSearchDto"); - if (value is Map) { - final json = value.cast(); - - return MetadataSearchDto( - albumIds: json.containsKey(r'albumIds') ? Optional.present(json[r'albumIds'] is Iterable - ? (json[r'albumIds'] as Iterable).cast().toList(growable: false) - : const []) : const Optional.absent(), - checksum: json.containsKey(r'checksum') ? Optional.present(mapValueOfType(json, r'checksum')) : const Optional.absent(), - city: json.containsKey(r'city') ? Optional.present(mapValueOfType(json, r'city')) : const Optional.absent(), - country: json.containsKey(r'country') ? Optional.present(mapValueOfType(json, r'country')) : const Optional.absent(), - createdAfter: json.containsKey(r'createdAfter') ? Optional.present(mapDateTime(json, r'createdAfter', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')) : const Optional.absent(), - createdBefore: json.containsKey(r'createdBefore') ? Optional.present(mapDateTime(json, r'createdBefore', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')) : const Optional.absent(), - description: json.containsKey(r'description') ? Optional.present(mapValueOfType(json, r'description')) : const Optional.absent(), - encodedVideoPath: json.containsKey(r'encodedVideoPath') ? Optional.present(mapValueOfType(json, r'encodedVideoPath')) : const Optional.absent(), - id: json.containsKey(r'id') ? Optional.present(mapValueOfType(json, r'id')) : const Optional.absent(), - isEncoded: json.containsKey(r'isEncoded') ? Optional.present(mapValueOfType(json, r'isEncoded')) : const Optional.absent(), - isFavorite: json.containsKey(r'isFavorite') ? Optional.present(mapValueOfType(json, r'isFavorite')) : const Optional.absent(), - isMotion: json.containsKey(r'isMotion') ? Optional.present(mapValueOfType(json, r'isMotion')) : const Optional.absent(), - isNotInAlbum: json.containsKey(r'isNotInAlbum') ? Optional.present(mapValueOfType(json, r'isNotInAlbum')) : const Optional.absent(), - isOffline: json.containsKey(r'isOffline') ? Optional.present(mapValueOfType(json, r'isOffline')) : const Optional.absent(), - lensModel: json.containsKey(r'lensModel') ? Optional.present(mapValueOfType(json, r'lensModel')) : const Optional.absent(), - libraryId: json.containsKey(r'libraryId') ? Optional.present(mapValueOfType(json, r'libraryId')) : const Optional.absent(), - make: json.containsKey(r'make') ? Optional.present(mapValueOfType(json, r'make')) : const Optional.absent(), - model: json.containsKey(r'model') ? Optional.present(mapValueOfType(json, r'model')) : const Optional.absent(), - ocr: json.containsKey(r'ocr') ? Optional.present(mapValueOfType(json, r'ocr')) : const Optional.absent(), - order: json.containsKey(r'order') ? Optional.present(AssetOrder.fromJson(json[r'order'])) : const Optional.absent(), - originalFileName: json.containsKey(r'originalFileName') ? Optional.present(mapValueOfType(json, r'originalFileName')) : const Optional.absent(), - originalPath: json.containsKey(r'originalPath') ? Optional.present(mapValueOfType(json, r'originalPath')) : const Optional.absent(), - page: json.containsKey(r'page') ? Optional.present(json[r'page'] == null ? null : int.parse('${json[r'page']}')) : const Optional.absent(), - personIds: json.containsKey(r'personIds') ? Optional.present(json[r'personIds'] is Iterable - ? (json[r'personIds'] as Iterable).cast().toList(growable: false) - : const []) : const Optional.absent(), - previewPath: json.containsKey(r'previewPath') ? Optional.present(mapValueOfType(json, r'previewPath')) : const Optional.absent(), - rating: json.containsKey(r'rating') ? Optional.present(json[r'rating'] == null ? null : int.parse('${json[r'rating']}')) : const Optional.absent(), - size: json.containsKey(r'size') ? Optional.present(json[r'size'] == null ? null : int.parse('${json[r'size']}')) : const Optional.absent(), - state: json.containsKey(r'state') ? Optional.present(mapValueOfType(json, r'state')) : const Optional.absent(), - tagIds: json.containsKey(r'tagIds') ? Optional.present(json[r'tagIds'] is Iterable - ? (json[r'tagIds'] as Iterable).cast().toList(growable: false) - : const []) : const Optional.absent(), - takenAfter: json.containsKey(r'takenAfter') ? Optional.present(mapDateTime(json, r'takenAfter', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')) : const Optional.absent(), - takenBefore: json.containsKey(r'takenBefore') ? Optional.present(mapDateTime(json, r'takenBefore', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')) : const Optional.absent(), - thumbnailPath: json.containsKey(r'thumbnailPath') ? Optional.present(mapValueOfType(json, r'thumbnailPath')) : const Optional.absent(), - trashedAfter: json.containsKey(r'trashedAfter') ? Optional.present(mapDateTime(json, r'trashedAfter', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')) : const Optional.absent(), - trashedBefore: json.containsKey(r'trashedBefore') ? Optional.present(mapDateTime(json, r'trashedBefore', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')) : const Optional.absent(), - type: json.containsKey(r'type') ? Optional.present(AssetTypeEnum.fromJson(json[r'type'])) : const Optional.absent(), - updatedAfter: json.containsKey(r'updatedAfter') ? Optional.present(mapDateTime(json, r'updatedAfter', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')) : const Optional.absent(), - updatedBefore: json.containsKey(r'updatedBefore') ? Optional.present(mapDateTime(json, r'updatedBefore', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')) : const Optional.absent(), - visibility: json.containsKey(r'visibility') ? Optional.present(AssetVisibility.fromJson(json[r'visibility'])) : const Optional.absent(), - withDeleted: json.containsKey(r'withDeleted') ? Optional.present(mapValueOfType(json, r'withDeleted')) : const Optional.absent(), - withExif: json.containsKey(r'withExif') ? Optional.present(mapValueOfType(json, r'withExif')) : const Optional.absent(), - withPeople: json.containsKey(r'withPeople') ? Optional.present(mapValueOfType(json, r'withPeople')) : const Optional.absent(), - withStacked: json.containsKey(r'withStacked') ? Optional.present(mapValueOfType(json, r'withStacked')) : const Optional.absent(), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = MetadataSearchDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = MetadataSearchDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of MetadataSearchDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = MetadataSearchDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - }; -} - diff --git a/mobile/openapi/lib/model/mirror_axis.dart b/mobile/openapi/lib/model/mirror_axis.dart deleted file mode 100644 index 4deeeb047c..0000000000 --- a/mobile/openapi/lib/model/mirror_axis.dart +++ /dev/null @@ -1,85 +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; - -/// Axis to mirror along -class MirrorAxis { - /// Instantiate a new enum with the provided [value]. - const MirrorAxis._(this.value); - - /// The underlying value of this enum member. - final String value; - - @override - String toString() => value; - - String toJson() => value; - - static const horizontal = MirrorAxis._(r'horizontal'); - static const vertical = MirrorAxis._(r'vertical'); - - /// List of all possible values in this [enum][MirrorAxis]. - static const values = [ - horizontal, - vertical, - ]; - - static MirrorAxis? fromJson(dynamic value) => MirrorAxisTypeTransformer().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 = MirrorAxis.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } -} - -/// Transformation class that can [encode] an instance of [MirrorAxis] to String, -/// and [decode] dynamic data back to [MirrorAxis]. -class MirrorAxisTypeTransformer { - factory MirrorAxisTypeTransformer() => _instance ??= const MirrorAxisTypeTransformer._(); - - const MirrorAxisTypeTransformer._(); - - String encode(MirrorAxis data) => data.value; - - /// Decodes a [dynamic value][data] to a MirrorAxis. - /// - /// 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. - MirrorAxis? decode(dynamic data, {bool allowNull = true}) { - if (data != null) { - switch (data) { - case r'horizontal': return MirrorAxis.horizontal; - case r'vertical': return MirrorAxis.vertical; - default: - if (!allowNull) { - throw ArgumentError('Unknown enum value to decode: $data'); - } - } - } - return null; - } - - /// Singleton [MirrorAxisTypeTransformer] instance. - static MirrorAxisTypeTransformer? _instance; -} - diff --git a/mobile/openapi/lib/model/mirror_parameters.dart b/mobile/openapi/lib/model/mirror_parameters.dart deleted file mode 100644 index 78c3da786c..0000000000 --- a/mobile/openapi/lib/model/mirror_parameters.dart +++ /dev/null @@ -1,99 +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 MirrorParameters { - /// Returns a new [MirrorParameters] instance. - MirrorParameters({ - required this.axis, - }); - - MirrorAxis axis; - - @override - bool operator ==(Object other) => identical(this, other) || other is MirrorParameters && - other.axis == axis; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (axis.hashCode); - - @override - String toString() => 'MirrorParameters[axis=$axis]'; - - Map toJson() { - final json = {}; - json[r'axis'] = this.axis; - return json; - } - - /// Returns a new [MirrorParameters] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static MirrorParameters? fromJson(dynamic value) { - upgradeDto(value, "MirrorParameters"); - if (value is Map) { - final json = value.cast(); - - return MirrorParameters( - axis: MirrorAxis.fromJson(json[r'axis'])!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = MirrorParameters.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = MirrorParameters.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of MirrorParameters-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = MirrorParameters.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'axis', - }; -} - diff --git a/mobile/openapi/lib/model/notification_create_dto.dart b/mobile/openapi/lib/model/notification_create_dto.dart deleted file mode 100644 index b7f3528156..0000000000 --- a/mobile/openapi/lib/model/notification_create_dto.dart +++ /dev/null @@ -1,176 +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 NotificationCreateDto { - /// Returns a new [NotificationCreateDto] instance. - NotificationCreateDto({ - this.data = const Optional.present(const {}), - this.description = const Optional.absent(), - this.level = const Optional.absent(), - this.readAt = const Optional.absent(), - required this.title, - this.type = const Optional.absent(), - required this.userId, - }); - - /// Additional notification data - Optional?> data; - - /// Notification description - Optional description; - - /// - /// 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. - /// - Optional level; - - /// Date when notification was read - Optional readAt; - - /// Notification title - String title; - - /// - /// 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. - /// - Optional type; - - /// User ID to send notification to - String userId; - - @override - bool operator ==(Object other) => identical(this, other) || other is NotificationCreateDto && - _deepEquality.equals(other.data, data) && - other.description == description && - other.level == level && - other.readAt == readAt && - other.title == title && - other.type == type && - other.userId == userId; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (data.hashCode) + - (description == null ? 0 : description!.hashCode) + - (level == null ? 0 : level!.hashCode) + - (readAt == null ? 0 : readAt!.hashCode) + - (title.hashCode) + - (type == null ? 0 : type!.hashCode) + - (userId.hashCode); - - @override - String toString() => 'NotificationCreateDto[data=$data, description=$description, level=$level, readAt=$readAt, title=$title, type=$type, userId=$userId]'; - - Map toJson() { - final json = {}; - if (this.data.isPresent) { - final value = this.data.value; - json[r'data'] = value; - } - if (this.description.isPresent) { - final value = this.description.value; - json[r'description'] = value; - } - if (this.level.isPresent) { - final value = this.level.value; - json[r'level'] = value; - } - if (this.readAt.isPresent) { - final value = this.readAt.value; - json[r'readAt'] = value == null ? null : (_isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? value.millisecondsSinceEpoch - : value.toUtc().toIso8601String()); - } - json[r'title'] = this.title; - if (this.type.isPresent) { - final value = this.type.value; - json[r'type'] = value; - } - json[r'userId'] = this.userId; - return json; - } - - /// Returns a new [NotificationCreateDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static NotificationCreateDto? fromJson(dynamic value) { - upgradeDto(value, "NotificationCreateDto"); - if (value is Map) { - final json = value.cast(); - - return NotificationCreateDto( - data: json.containsKey(r'data') ? Optional.present(mapCastOfType(json, r'data')) : const Optional.absent(), - description: json.containsKey(r'description') ? Optional.present(mapValueOfType(json, r'description')) : const Optional.absent(), - level: json.containsKey(r'level') ? Optional.present(NotificationLevel.fromJson(json[r'level'])) : const Optional.absent(), - readAt: json.containsKey(r'readAt') ? Optional.present(mapDateTime(json, r'readAt', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')) : const Optional.absent(), - title: mapValueOfType(json, r'title')!, - type: json.containsKey(r'type') ? Optional.present(NotificationType.fromJson(json[r'type'])) : const Optional.absent(), - userId: mapValueOfType(json, r'userId')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = NotificationCreateDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = NotificationCreateDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of NotificationCreateDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = NotificationCreateDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'title', - 'userId', - }; -} - diff --git a/mobile/openapi/lib/model/notification_delete_all_dto.dart b/mobile/openapi/lib/model/notification_delete_all_dto.dart deleted file mode 100644 index 1b398a4f33..0000000000 --- a/mobile/openapi/lib/model/notification_delete_all_dto.dart +++ /dev/null @@ -1,102 +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 NotificationDeleteAllDto { - /// Returns a new [NotificationDeleteAllDto] instance. - NotificationDeleteAllDto({ - this.ids = const [], - }); - - /// Notification IDs to delete - List ids; - - @override - bool operator ==(Object other) => identical(this, other) || other is NotificationDeleteAllDto && - _deepEquality.equals(other.ids, ids); - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (ids.hashCode); - - @override - String toString() => 'NotificationDeleteAllDto[ids=$ids]'; - - Map toJson() { - final json = {}; - json[r'ids'] = this.ids; - return json; - } - - /// Returns a new [NotificationDeleteAllDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static NotificationDeleteAllDto? fromJson(dynamic value) { - upgradeDto(value, "NotificationDeleteAllDto"); - if (value is Map) { - final json = value.cast(); - - return NotificationDeleteAllDto( - ids: json[r'ids'] is Iterable - ? (json[r'ids'] as Iterable).cast().toList(growable: false) - : const [], - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = NotificationDeleteAllDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = NotificationDeleteAllDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of NotificationDeleteAllDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = NotificationDeleteAllDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'ids', - }; -} - diff --git a/mobile/openapi/lib/model/notification_dto.dart b/mobile/openapi/lib/model/notification_dto.dart deleted file mode 100644 index 7609a6a021..0000000000 --- a/mobile/openapi/lib/model/notification_dto.dart +++ /dev/null @@ -1,183 +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 NotificationDto { - /// Returns a new [NotificationDto] instance. - NotificationDto({ - required this.createdAt, - this.data = const Optional.present(const {}), - this.description = const Optional.absent(), - required this.id, - required this.level, - this.readAt = const Optional.absent(), - required this.title, - required this.type, - }); - - /// Creation date - DateTime createdAt; - - /// Additional notification data - Optional?> data; - - /// Notification description - /// - /// 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. - /// - Optional description; - - /// Notification ID - String id; - - NotificationLevel level; - - /// Date when notification was read - /// - /// 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. - /// - Optional readAt; - - /// Notification title - String title; - - NotificationType type; - - @override - bool operator ==(Object other) => identical(this, other) || other is NotificationDto && - other.createdAt == createdAt && - _deepEquality.equals(other.data, data) && - other.description == description && - other.id == id && - other.level == level && - other.readAt == readAt && - other.title == title && - other.type == type; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (createdAt.hashCode) + - (data.hashCode) + - (description == null ? 0 : description!.hashCode) + - (id.hashCode) + - (level.hashCode) + - (readAt == null ? 0 : readAt!.hashCode) + - (title.hashCode) + - (type.hashCode); - - @override - String toString() => 'NotificationDto[createdAt=$createdAt, data=$data, description=$description, id=$id, level=$level, readAt=$readAt, title=$title, type=$type]'; - - Map toJson() { - final json = {}; - json[r'createdAt'] = _isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? this.createdAt.millisecondsSinceEpoch - : this.createdAt.toUtc().toIso8601String(); - if (this.data.isPresent) { - final value = this.data.value; - json[r'data'] = value; - } - if (this.description.isPresent) { - final value = this.description.value; - json[r'description'] = value; - } - json[r'id'] = this.id; - json[r'level'] = this.level; - if (this.readAt.isPresent) { - final value = this.readAt.value; - json[r'readAt'] = value == null ? null : (_isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? value.millisecondsSinceEpoch - : value.toUtc().toIso8601String()); - } - json[r'title'] = this.title; - json[r'type'] = this.type; - return json; - } - - /// Returns a new [NotificationDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static NotificationDto? fromJson(dynamic value) { - upgradeDto(value, "NotificationDto"); - if (value is Map) { - final json = value.cast(); - - return NotificationDto( - createdAt: mapDateTime(json, r'createdAt', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')!, - data: json.containsKey(r'data') ? Optional.present(mapCastOfType(json, r'data')) : const Optional.absent(), - description: json.containsKey(r'description') ? Optional.present(mapValueOfType(json, r'description')) : const Optional.absent(), - id: mapValueOfType(json, r'id')!, - level: NotificationLevel.fromJson(json[r'level'])!, - readAt: json.containsKey(r'readAt') ? Optional.present(mapDateTime(json, r'readAt', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')) : const Optional.absent(), - title: mapValueOfType(json, r'title')!, - type: NotificationType.fromJson(json[r'type'])!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = NotificationDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = NotificationDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of NotificationDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = NotificationDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'createdAt', - 'id', - 'level', - 'title', - 'type', - }; -} - diff --git a/mobile/openapi/lib/model/notification_level.dart b/mobile/openapi/lib/model/notification_level.dart deleted file mode 100644 index 4ca4e2bcc8..0000000000 --- a/mobile/openapi/lib/model/notification_level.dart +++ /dev/null @@ -1,91 +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; - -/// Notification level -class NotificationLevel { - /// Instantiate a new enum with the provided [value]. - const NotificationLevel._(this.value); - - /// The underlying value of this enum member. - final String value; - - @override - String toString() => value; - - String toJson() => value; - - static const success = NotificationLevel._(r'success'); - static const error = NotificationLevel._(r'error'); - static const warning = NotificationLevel._(r'warning'); - static const info = NotificationLevel._(r'info'); - - /// List of all possible values in this [enum][NotificationLevel]. - static const values = [ - success, - error, - warning, - info, - ]; - - static NotificationLevel? fromJson(dynamic value) => NotificationLevelTypeTransformer().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 = NotificationLevel.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } -} - -/// Transformation class that can [encode] an instance of [NotificationLevel] to String, -/// and [decode] dynamic data back to [NotificationLevel]. -class NotificationLevelTypeTransformer { - factory NotificationLevelTypeTransformer() => _instance ??= const NotificationLevelTypeTransformer._(); - - const NotificationLevelTypeTransformer._(); - - String encode(NotificationLevel data) => data.value; - - /// Decodes a [dynamic value][data] to a NotificationLevel. - /// - /// 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. - NotificationLevel? decode(dynamic data, {bool allowNull = true}) { - if (data != null) { - switch (data) { - case r'success': return NotificationLevel.success; - case r'error': return NotificationLevel.error; - case r'warning': return NotificationLevel.warning; - case r'info': return NotificationLevel.info; - default: - if (!allowNull) { - throw ArgumentError('Unknown enum value to decode: $data'); - } - } - } - return null; - } - - /// Singleton [NotificationLevelTypeTransformer] instance. - static NotificationLevelTypeTransformer? _instance; -} - diff --git a/mobile/openapi/lib/model/notification_type.dart b/mobile/openapi/lib/model/notification_type.dart deleted file mode 100644 index dbc9c12f84..0000000000 --- a/mobile/openapi/lib/model/notification_type.dart +++ /dev/null @@ -1,97 +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; - -/// Notification type -class NotificationType { - /// Instantiate a new enum with the provided [value]. - const NotificationType._(this.value); - - /// The underlying value of this enum member. - final String value; - - @override - String toString() => value; - - String toJson() => value; - - static const jobFailed = NotificationType._(r'JobFailed'); - static const backupFailed = NotificationType._(r'BackupFailed'); - static const systemMessage = NotificationType._(r'SystemMessage'); - static const albumInvite = NotificationType._(r'AlbumInvite'); - static const albumUpdate = NotificationType._(r'AlbumUpdate'); - static const custom = NotificationType._(r'Custom'); - - /// List of all possible values in this [enum][NotificationType]. - static const values = [ - jobFailed, - backupFailed, - systemMessage, - albumInvite, - albumUpdate, - custom, - ]; - - static NotificationType? fromJson(dynamic value) => NotificationTypeTypeTransformer().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 = NotificationType.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } -} - -/// Transformation class that can [encode] an instance of [NotificationType] to String, -/// and [decode] dynamic data back to [NotificationType]. -class NotificationTypeTypeTransformer { - factory NotificationTypeTypeTransformer() => _instance ??= const NotificationTypeTypeTransformer._(); - - const NotificationTypeTypeTransformer._(); - - String encode(NotificationType data) => data.value; - - /// Decodes a [dynamic value][data] to a NotificationType. - /// - /// 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. - NotificationType? decode(dynamic data, {bool allowNull = true}) { - if (data != null) { - switch (data) { - case r'JobFailed': return NotificationType.jobFailed; - case r'BackupFailed': return NotificationType.backupFailed; - case r'SystemMessage': return NotificationType.systemMessage; - case r'AlbumInvite': return NotificationType.albumInvite; - case r'AlbumUpdate': return NotificationType.albumUpdate; - case r'Custom': return NotificationType.custom; - default: - if (!allowNull) { - throw ArgumentError('Unknown enum value to decode: $data'); - } - } - } - return null; - } - - /// Singleton [NotificationTypeTypeTransformer] instance. - static NotificationTypeTypeTransformer? _instance; -} - diff --git a/mobile/openapi/lib/model/notification_update_all_dto.dart b/mobile/openapi/lib/model/notification_update_all_dto.dart deleted file mode 100644 index e3d15c5519..0000000000 --- a/mobile/openapi/lib/model/notification_update_all_dto.dart +++ /dev/null @@ -1,115 +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 NotificationUpdateAllDto { - /// Returns a new [NotificationUpdateAllDto] instance. - NotificationUpdateAllDto({ - this.ids = const [], - this.readAt = const Optional.absent(), - }); - - /// Notification IDs to update - List ids; - - /// Date when notifications were read - Optional readAt; - - @override - bool operator ==(Object other) => identical(this, other) || other is NotificationUpdateAllDto && - _deepEquality.equals(other.ids, ids) && - other.readAt == readAt; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (ids.hashCode) + - (readAt == null ? 0 : readAt!.hashCode); - - @override - String toString() => 'NotificationUpdateAllDto[ids=$ids, readAt=$readAt]'; - - Map toJson() { - final json = {}; - json[r'ids'] = this.ids; - if (this.readAt.isPresent) { - final value = this.readAt.value; - json[r'readAt'] = value == null ? null : (_isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? value.millisecondsSinceEpoch - : value.toUtc().toIso8601String()); - } - return json; - } - - /// Returns a new [NotificationUpdateAllDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static NotificationUpdateAllDto? fromJson(dynamic value) { - upgradeDto(value, "NotificationUpdateAllDto"); - if (value is Map) { - final json = value.cast(); - - return NotificationUpdateAllDto( - ids: json[r'ids'] is Iterable - ? (json[r'ids'] as Iterable).cast().toList(growable: false) - : const [], - readAt: json.containsKey(r'readAt') ? Optional.present(mapDateTime(json, r'readAt', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')) : const Optional.absent(), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = NotificationUpdateAllDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = NotificationUpdateAllDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of NotificationUpdateAllDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = NotificationUpdateAllDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'ids', - }; -} - diff --git a/mobile/openapi/lib/model/notification_update_dto.dart b/mobile/openapi/lib/model/notification_update_dto.dart deleted file mode 100644 index 73a14ec7cd..0000000000 --- a/mobile/openapi/lib/model/notification_update_dto.dart +++ /dev/null @@ -1,104 +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 NotificationUpdateDto { - /// Returns a new [NotificationUpdateDto] instance. - NotificationUpdateDto({ - this.readAt = const Optional.absent(), - }); - - /// Date when notification was read - Optional readAt; - - @override - bool operator ==(Object other) => identical(this, other) || other is NotificationUpdateDto && - other.readAt == readAt; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (readAt == null ? 0 : readAt!.hashCode); - - @override - String toString() => 'NotificationUpdateDto[readAt=$readAt]'; - - Map toJson() { - final json = {}; - if (this.readAt.isPresent) { - final value = this.readAt.value; - json[r'readAt'] = value == null ? null : (_isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? value.millisecondsSinceEpoch - : value.toUtc().toIso8601String()); - } - return json; - } - - /// Returns a new [NotificationUpdateDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static NotificationUpdateDto? fromJson(dynamic value) { - upgradeDto(value, "NotificationUpdateDto"); - if (value is Map) { - final json = value.cast(); - - return NotificationUpdateDto( - readAt: json.containsKey(r'readAt') ? Optional.present(mapDateTime(json, r'readAt', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')) : const Optional.absent(), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = NotificationUpdateDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = NotificationUpdateDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of NotificationUpdateDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = NotificationUpdateDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - }; -} - diff --git a/mobile/openapi/lib/model/o_auth_authorize_response_dto.dart b/mobile/openapi/lib/model/o_auth_authorize_response_dto.dart deleted file mode 100644 index 7eedc45673..0000000000 --- a/mobile/openapi/lib/model/o_auth_authorize_response_dto.dart +++ /dev/null @@ -1,100 +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 OAuthAuthorizeResponseDto { - /// Returns a new [OAuthAuthorizeResponseDto] instance. - OAuthAuthorizeResponseDto({ - required this.url, - }); - - /// OAuth authorization URL - String url; - - @override - bool operator ==(Object other) => identical(this, other) || other is OAuthAuthorizeResponseDto && - other.url == url; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (url.hashCode); - - @override - String toString() => 'OAuthAuthorizeResponseDto[url=$url]'; - - Map toJson() { - final json = {}; - json[r'url'] = this.url; - return json; - } - - /// Returns a new [OAuthAuthorizeResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static OAuthAuthorizeResponseDto? fromJson(dynamic value) { - upgradeDto(value, "OAuthAuthorizeResponseDto"); - if (value is Map) { - final json = value.cast(); - - return OAuthAuthorizeResponseDto( - url: mapValueOfType(json, r'url')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = OAuthAuthorizeResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = OAuthAuthorizeResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of OAuthAuthorizeResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = OAuthAuthorizeResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'url', - }; -} - diff --git a/mobile/openapi/lib/model/o_auth_callback_dto.dart b/mobile/openapi/lib/model/o_auth_callback_dto.dart deleted file mode 100644 index 61de33e1a6..0000000000 --- a/mobile/openapi/lib/model/o_auth_callback_dto.dart +++ /dev/null @@ -1,134 +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 OAuthCallbackDto { - /// Returns a new [OAuthCallbackDto] instance. - OAuthCallbackDto({ - this.codeVerifier = const Optional.absent(), - this.state = const Optional.absent(), - required this.url, - }); - - /// OAuth code verifier (PKCE) - /// - /// 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. - /// - Optional codeVerifier; - - /// OAuth state parameter - /// - /// 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. - /// - Optional state; - - /// OAuth callback URL - String url; - - @override - bool operator ==(Object other) => identical(this, other) || other is OAuthCallbackDto && - other.codeVerifier == codeVerifier && - other.state == state && - other.url == url; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (codeVerifier == null ? 0 : codeVerifier!.hashCode) + - (state == null ? 0 : state!.hashCode) + - (url.hashCode); - - @override - String toString() => 'OAuthCallbackDto[codeVerifier=$codeVerifier, state=$state, url=$url]'; - - Map toJson() { - final json = {}; - if (this.codeVerifier.isPresent) { - final value = this.codeVerifier.value; - json[r'codeVerifier'] = value; - } - if (this.state.isPresent) { - final value = this.state.value; - json[r'state'] = value; - } - json[r'url'] = this.url; - return json; - } - - /// Returns a new [OAuthCallbackDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static OAuthCallbackDto? fromJson(dynamic value) { - upgradeDto(value, "OAuthCallbackDto"); - if (value is Map) { - final json = value.cast(); - - return OAuthCallbackDto( - codeVerifier: json.containsKey(r'codeVerifier') ? Optional.present(mapValueOfType(json, r'codeVerifier')) : const Optional.absent(), - state: json.containsKey(r'state') ? Optional.present(mapValueOfType(json, r'state')) : const Optional.absent(), - url: mapValueOfType(json, r'url')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = OAuthCallbackDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = OAuthCallbackDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of OAuthCallbackDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = OAuthCallbackDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'url', - }; -} - diff --git a/mobile/openapi/lib/model/o_auth_config_dto.dart b/mobile/openapi/lib/model/o_auth_config_dto.dart deleted file mode 100644 index fb9f95dd92..0000000000 --- a/mobile/openapi/lib/model/o_auth_config_dto.dart +++ /dev/null @@ -1,134 +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 OAuthConfigDto { - /// Returns a new [OAuthConfigDto] instance. - OAuthConfigDto({ - this.codeChallenge = const Optional.absent(), - required this.redirectUri, - this.state = const Optional.absent(), - }); - - /// OAuth code challenge (PKCE) - /// - /// 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. - /// - Optional codeChallenge; - - /// OAuth redirect URI - String redirectUri; - - /// OAuth state parameter - /// - /// 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. - /// - Optional state; - - @override - bool operator ==(Object other) => identical(this, other) || other is OAuthConfigDto && - other.codeChallenge == codeChallenge && - other.redirectUri == redirectUri && - other.state == state; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (codeChallenge == null ? 0 : codeChallenge!.hashCode) + - (redirectUri.hashCode) + - (state == null ? 0 : state!.hashCode); - - @override - String toString() => 'OAuthConfigDto[codeChallenge=$codeChallenge, redirectUri=$redirectUri, state=$state]'; - - Map toJson() { - final json = {}; - if (this.codeChallenge.isPresent) { - final value = this.codeChallenge.value; - json[r'codeChallenge'] = value; - } - json[r'redirectUri'] = this.redirectUri; - if (this.state.isPresent) { - final value = this.state.value; - json[r'state'] = value; - } - return json; - } - - /// Returns a new [OAuthConfigDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static OAuthConfigDto? fromJson(dynamic value) { - upgradeDto(value, "OAuthConfigDto"); - if (value is Map) { - final json = value.cast(); - - return OAuthConfigDto( - codeChallenge: json.containsKey(r'codeChallenge') ? Optional.present(mapValueOfType(json, r'codeChallenge')) : const Optional.absent(), - redirectUri: mapValueOfType(json, r'redirectUri')!, - state: json.containsKey(r'state') ? Optional.present(mapValueOfType(json, r'state')) : const Optional.absent(), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = OAuthConfigDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = OAuthConfigDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of OAuthConfigDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = OAuthConfigDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'redirectUri', - }; -} - diff --git a/mobile/openapi/lib/model/o_auth_token_endpoint_auth_method.dart b/mobile/openapi/lib/model/o_auth_token_endpoint_auth_method.dart deleted file mode 100644 index 414108068a..0000000000 --- a/mobile/openapi/lib/model/o_auth_token_endpoint_auth_method.dart +++ /dev/null @@ -1,85 +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; - -/// OAuth token endpoint auth method -class OAuthTokenEndpointAuthMethod { - /// Instantiate a new enum with the provided [value]. - const OAuthTokenEndpointAuthMethod._(this.value); - - /// The underlying value of this enum member. - final String value; - - @override - String toString() => value; - - String toJson() => value; - - static const clientSecretPost = OAuthTokenEndpointAuthMethod._(r'client_secret_post'); - static const clientSecretBasic = OAuthTokenEndpointAuthMethod._(r'client_secret_basic'); - - /// List of all possible values in this [enum][OAuthTokenEndpointAuthMethod]. - static const values = [ - clientSecretPost, - clientSecretBasic, - ]; - - static OAuthTokenEndpointAuthMethod? fromJson(dynamic value) => OAuthTokenEndpointAuthMethodTypeTransformer().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 = OAuthTokenEndpointAuthMethod.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } -} - -/// Transformation class that can [encode] an instance of [OAuthTokenEndpointAuthMethod] to String, -/// and [decode] dynamic data back to [OAuthTokenEndpointAuthMethod]. -class OAuthTokenEndpointAuthMethodTypeTransformer { - factory OAuthTokenEndpointAuthMethodTypeTransformer() => _instance ??= const OAuthTokenEndpointAuthMethodTypeTransformer._(); - - const OAuthTokenEndpointAuthMethodTypeTransformer._(); - - String encode(OAuthTokenEndpointAuthMethod data) => data.value; - - /// Decodes a [dynamic value][data] to a OAuthTokenEndpointAuthMethod. - /// - /// 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. - OAuthTokenEndpointAuthMethod? decode(dynamic data, {bool allowNull = true}) { - if (data != null) { - switch (data) { - case r'client_secret_post': return OAuthTokenEndpointAuthMethod.clientSecretPost; - case r'client_secret_basic': return OAuthTokenEndpointAuthMethod.clientSecretBasic; - default: - if (!allowNull) { - throw ArgumentError('Unknown enum value to decode: $data'); - } - } - } - return null; - } - - /// Singleton [OAuthTokenEndpointAuthMethodTypeTransformer] instance. - static OAuthTokenEndpointAuthMethodTypeTransformer? _instance; -} - diff --git a/mobile/openapi/lib/model/ocr_config.dart b/mobile/openapi/lib/model/ocr_config.dart deleted file mode 100644 index d58c8af3ee..0000000000 --- a/mobile/openapi/lib/model/ocr_config.dart +++ /dev/null @@ -1,145 +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 OcrConfig { - /// Returns a new [OcrConfig] instance. - OcrConfig({ - required this.enabled, - required this.maxResolution, - required this.minDetectionScore, - required this.minRecognitionScore, - required this.modelName, - }); - - /// Whether the task is enabled - bool enabled; - - /// Maximum resolution for OCR processing - /// - /// Minimum value: 1 - /// Maximum value: 9007199254740991 - int maxResolution; - - /// Minimum confidence score for text detection - /// - /// Minimum value: 0.1 - /// Maximum value: 1 - double minDetectionScore; - - /// Minimum confidence score for text recognition - /// - /// Minimum value: 0.1 - /// Maximum value: 1 - double minRecognitionScore; - - /// Name of the model to use - String modelName; - - @override - bool operator ==(Object other) => identical(this, other) || other is OcrConfig && - other.enabled == enabled && - other.maxResolution == maxResolution && - other.minDetectionScore == minDetectionScore && - other.minRecognitionScore == minRecognitionScore && - other.modelName == modelName; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (enabled.hashCode) + - (maxResolution.hashCode) + - (minDetectionScore.hashCode) + - (minRecognitionScore.hashCode) + - (modelName.hashCode); - - @override - String toString() => 'OcrConfig[enabled=$enabled, maxResolution=$maxResolution, minDetectionScore=$minDetectionScore, minRecognitionScore=$minRecognitionScore, modelName=$modelName]'; - - Map toJson() { - final json = {}; - json[r'enabled'] = this.enabled; - json[r'maxResolution'] = this.maxResolution; - json[r'minDetectionScore'] = this.minDetectionScore; - json[r'minRecognitionScore'] = this.minRecognitionScore; - json[r'modelName'] = this.modelName; - return json; - } - - /// Returns a new [OcrConfig] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static OcrConfig? fromJson(dynamic value) { - upgradeDto(value, "OcrConfig"); - if (value is Map) { - final json = value.cast(); - - return OcrConfig( - enabled: mapValueOfType(json, r'enabled')!, - maxResolution: mapValueOfType(json, r'maxResolution')!, - minDetectionScore: mapValueOfType(json, r'minDetectionScore')!, - minRecognitionScore: mapValueOfType(json, r'minRecognitionScore')!, - modelName: mapValueOfType(json, r'modelName')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = OcrConfig.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = OcrConfig.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of OcrConfig-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = OcrConfig.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'enabled', - 'maxResolution', - 'minDetectionScore', - 'minRecognitionScore', - 'modelName', - }; -} - diff --git a/mobile/openapi/lib/model/on_this_day_dto.dart b/mobile/openapi/lib/model/on_this_day_dto.dart deleted file mode 100644 index 77ae96532f..0000000000 --- a/mobile/openapi/lib/model/on_this_day_dto.dart +++ /dev/null @@ -1,103 +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 OnThisDayDto { - /// Returns a new [OnThisDayDto] instance. - OnThisDayDto({ - required this.year, - }); - - /// Year for on this day memory - /// - /// Minimum value: 1000 - /// Maximum value: 9999 - int year; - - @override - bool operator ==(Object other) => identical(this, other) || other is OnThisDayDto && - other.year == year; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (year.hashCode); - - @override - String toString() => 'OnThisDayDto[year=$year]'; - - Map toJson() { - final json = {}; - json[r'year'] = this.year; - return json; - } - - /// Returns a new [OnThisDayDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static OnThisDayDto? fromJson(dynamic value) { - upgradeDto(value, "OnThisDayDto"); - if (value is Map) { - final json = value.cast(); - - return OnThisDayDto( - year: mapValueOfType(json, r'year')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = OnThisDayDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = OnThisDayDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of OnThisDayDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = OnThisDayDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'year', - }; -} - diff --git a/mobile/openapi/lib/model/onboarding_dto.dart b/mobile/openapi/lib/model/onboarding_dto.dart deleted file mode 100644 index 8499bc9b9a..0000000000 --- a/mobile/openapi/lib/model/onboarding_dto.dart +++ /dev/null @@ -1,100 +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 OnboardingDto { - /// Returns a new [OnboardingDto] instance. - OnboardingDto({ - required this.isOnboarded, - }); - - /// Is user onboarded - bool isOnboarded; - - @override - bool operator ==(Object other) => identical(this, other) || other is OnboardingDto && - other.isOnboarded == isOnboarded; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (isOnboarded.hashCode); - - @override - String toString() => 'OnboardingDto[isOnboarded=$isOnboarded]'; - - Map toJson() { - final json = {}; - json[r'isOnboarded'] = this.isOnboarded; - return json; - } - - /// Returns a new [OnboardingDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static OnboardingDto? fromJson(dynamic value) { - upgradeDto(value, "OnboardingDto"); - if (value is Map) { - final json = value.cast(); - - return OnboardingDto( - isOnboarded: mapValueOfType(json, r'isOnboarded')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = OnboardingDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = OnboardingDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of OnboardingDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = OnboardingDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'isOnboarded', - }; -} - diff --git a/mobile/openapi/lib/model/onboarding_response_dto.dart b/mobile/openapi/lib/model/onboarding_response_dto.dart deleted file mode 100644 index 2b0dbe2b96..0000000000 --- a/mobile/openapi/lib/model/onboarding_response_dto.dart +++ /dev/null @@ -1,100 +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 OnboardingResponseDto { - /// Returns a new [OnboardingResponseDto] instance. - OnboardingResponseDto({ - required this.isOnboarded, - }); - - /// Is user onboarded - bool isOnboarded; - - @override - bool operator ==(Object other) => identical(this, other) || other is OnboardingResponseDto && - other.isOnboarded == isOnboarded; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (isOnboarded.hashCode); - - @override - String toString() => 'OnboardingResponseDto[isOnboarded=$isOnboarded]'; - - Map toJson() { - final json = {}; - json[r'isOnboarded'] = this.isOnboarded; - return json; - } - - /// Returns a new [OnboardingResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static OnboardingResponseDto? fromJson(dynamic value) { - upgradeDto(value, "OnboardingResponseDto"); - if (value is Map) { - final json = value.cast(); - - return OnboardingResponseDto( - isOnboarded: mapValueOfType(json, r'isOnboarded')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = OnboardingResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = OnboardingResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of OnboardingResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = OnboardingResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'isOnboarded', - }; -} - diff --git a/mobile/openapi/lib/model/partner_create_dto.dart b/mobile/openapi/lib/model/partner_create_dto.dart deleted file mode 100644 index 30aa96ff30..0000000000 --- a/mobile/openapi/lib/model/partner_create_dto.dart +++ /dev/null @@ -1,100 +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 PartnerCreateDto { - /// Returns a new [PartnerCreateDto] instance. - PartnerCreateDto({ - required this.sharedWithId, - }); - - /// User ID to share with - String sharedWithId; - - @override - bool operator ==(Object other) => identical(this, other) || other is PartnerCreateDto && - other.sharedWithId == sharedWithId; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (sharedWithId.hashCode); - - @override - String toString() => 'PartnerCreateDto[sharedWithId=$sharedWithId]'; - - Map toJson() { - final json = {}; - json[r'sharedWithId'] = this.sharedWithId; - return json; - } - - /// Returns a new [PartnerCreateDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static PartnerCreateDto? fromJson(dynamic value) { - upgradeDto(value, "PartnerCreateDto"); - if (value is Map) { - final json = value.cast(); - - return PartnerCreateDto( - sharedWithId: mapValueOfType(json, r'sharedWithId')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = PartnerCreateDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = PartnerCreateDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of PartnerCreateDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = PartnerCreateDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'sharedWithId', - }; -} - diff --git a/mobile/openapi/lib/model/partner_direction.dart b/mobile/openapi/lib/model/partner_direction.dart deleted file mode 100644 index c1e38b8dfe..0000000000 --- a/mobile/openapi/lib/model/partner_direction.dart +++ /dev/null @@ -1,85 +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; - -/// Partner direction -class PartnerDirection { - /// Instantiate a new enum with the provided [value]. - const PartnerDirection._(this.value); - - /// The underlying value of this enum member. - final String value; - - @override - String toString() => value; - - String toJson() => value; - - static const sharedBy = PartnerDirection._(r'shared-by'); - static const sharedWith = PartnerDirection._(r'shared-with'); - - /// List of all possible values in this [enum][PartnerDirection]. - static const values = [ - sharedBy, - sharedWith, - ]; - - static PartnerDirection? fromJson(dynamic value) => PartnerDirectionTypeTransformer().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 = PartnerDirection.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } -} - -/// Transformation class that can [encode] an instance of [PartnerDirection] to String, -/// and [decode] dynamic data back to [PartnerDirection]. -class PartnerDirectionTypeTransformer { - factory PartnerDirectionTypeTransformer() => _instance ??= const PartnerDirectionTypeTransformer._(); - - const PartnerDirectionTypeTransformer._(); - - String encode(PartnerDirection data) => data.value; - - /// Decodes a [dynamic value][data] to a PartnerDirection. - /// - /// 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. - PartnerDirection? decode(dynamic data, {bool allowNull = true}) { - if (data != null) { - switch (data) { - case r'shared-by': return PartnerDirection.sharedBy; - case r'shared-with': return PartnerDirection.sharedWith; - default: - if (!allowNull) { - throw ArgumentError('Unknown enum value to decode: $data'); - } - } - } - return null; - } - - /// Singleton [PartnerDirectionTypeTransformer] instance. - static PartnerDirectionTypeTransformer? _instance; -} - diff --git a/mobile/openapi/lib/model/partner_response_dto.dart b/mobile/openapi/lib/model/partner_response_dto.dart deleted file mode 100644 index 967c5b930b..0000000000 --- a/mobile/openapi/lib/model/partner_response_dto.dart +++ /dev/null @@ -1,161 +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 PartnerResponseDto { - /// Returns a new [PartnerResponseDto] instance. - PartnerResponseDto({ - required this.avatarColor, - required this.email, - required this.id, - this.inTimeline = const Optional.absent(), - required this.name, - required this.profileChangedAt, - required this.profileImagePath, - }); - - UserAvatarColor avatarColor; - - /// User email - String email; - - /// User ID - String id; - - /// Show in timeline - /// - /// 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. - /// - Optional inTimeline; - - /// User name - String name; - - /// Profile change date - DateTime profileChangedAt; - - /// Profile image path - String profileImagePath; - - @override - bool operator ==(Object other) => identical(this, other) || other is PartnerResponseDto && - other.avatarColor == avatarColor && - other.email == email && - other.id == id && - other.inTimeline == inTimeline && - other.name == name && - other.profileChangedAt == profileChangedAt && - other.profileImagePath == profileImagePath; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (avatarColor.hashCode) + - (email.hashCode) + - (id.hashCode) + - (inTimeline == null ? 0 : inTimeline!.hashCode) + - (name.hashCode) + - (profileChangedAt.hashCode) + - (profileImagePath.hashCode); - - @override - String toString() => 'PartnerResponseDto[avatarColor=$avatarColor, email=$email, id=$id, inTimeline=$inTimeline, name=$name, profileChangedAt=$profileChangedAt, profileImagePath=$profileImagePath]'; - - Map toJson() { - final json = {}; - json[r'avatarColor'] = this.avatarColor; - json[r'email'] = this.email; - json[r'id'] = this.id; - if (this.inTimeline.isPresent) { - final value = this.inTimeline.value; - json[r'inTimeline'] = value; - } - json[r'name'] = this.name; - json[r'profileChangedAt'] = this.profileChangedAt.toUtc().toIso8601String(); - json[r'profileImagePath'] = this.profileImagePath; - return json; - } - - /// Returns a new [PartnerResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static PartnerResponseDto? fromJson(dynamic value) { - upgradeDto(value, "PartnerResponseDto"); - if (value is Map) { - final json = value.cast(); - - return PartnerResponseDto( - avatarColor: UserAvatarColor.fromJson(json[r'avatarColor'])!, - email: mapValueOfType(json, r'email')!, - id: mapValueOfType(json, r'id')!, - inTimeline: json.containsKey(r'inTimeline') ? Optional.present(mapValueOfType(json, r'inTimeline')) : const Optional.absent(), - name: mapValueOfType(json, r'name')!, - profileChangedAt: mapDateTime(json, r'profileChangedAt', r'')!, - profileImagePath: mapValueOfType(json, r'profileImagePath')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = PartnerResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = PartnerResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of PartnerResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = PartnerResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'avatarColor', - 'email', - 'id', - 'name', - 'profileChangedAt', - 'profileImagePath', - }; -} - diff --git a/mobile/openapi/lib/model/partner_update_dto.dart b/mobile/openapi/lib/model/partner_update_dto.dart deleted file mode 100644 index db3516e3a1..0000000000 --- a/mobile/openapi/lib/model/partner_update_dto.dart +++ /dev/null @@ -1,100 +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 PartnerUpdateDto { - /// Returns a new [PartnerUpdateDto] instance. - PartnerUpdateDto({ - required this.inTimeline, - }); - - /// Show partner assets in timeline - bool inTimeline; - - @override - bool operator ==(Object other) => identical(this, other) || other is PartnerUpdateDto && - other.inTimeline == inTimeline; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (inTimeline.hashCode); - - @override - String toString() => 'PartnerUpdateDto[inTimeline=$inTimeline]'; - - Map toJson() { - final json = {}; - json[r'inTimeline'] = this.inTimeline; - return json; - } - - /// Returns a new [PartnerUpdateDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static PartnerUpdateDto? fromJson(dynamic value) { - upgradeDto(value, "PartnerUpdateDto"); - if (value is Map) { - final json = value.cast(); - - return PartnerUpdateDto( - inTimeline: mapValueOfType(json, r'inTimeline')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = PartnerUpdateDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = PartnerUpdateDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of PartnerUpdateDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = PartnerUpdateDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'inTimeline', - }; -} - diff --git a/mobile/openapi/lib/model/people_response.dart b/mobile/openapi/lib/model/people_response.dart deleted file mode 100644 index 838d1e2324..0000000000 --- a/mobile/openapi/lib/model/people_response.dart +++ /dev/null @@ -1,129 +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 PeopleResponse { - /// Returns a new [PeopleResponse] instance. - PeopleResponse({ - required this.enabled, - this.minimumFaces = const Optional.absent(), - required this.sidebarWeb, - }); - - /// Whether people are enabled - bool enabled; - - /// People face threshold - /// - /// Minimum value: 1 - /// Maximum value: 9007199254740991 - /// - /// 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. - /// - Optional minimumFaces; - - /// Whether people appear in web sidebar - bool sidebarWeb; - - @override - bool operator ==(Object other) => identical(this, other) || other is PeopleResponse && - other.enabled == enabled && - other.minimumFaces == minimumFaces && - other.sidebarWeb == sidebarWeb; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (enabled.hashCode) + - (minimumFaces == null ? 0 : minimumFaces!.hashCode) + - (sidebarWeb.hashCode); - - @override - String toString() => 'PeopleResponse[enabled=$enabled, minimumFaces=$minimumFaces, sidebarWeb=$sidebarWeb]'; - - Map toJson() { - final json = {}; - json[r'enabled'] = this.enabled; - if (this.minimumFaces.isPresent) { - final value = this.minimumFaces.value; - json[r'minimumFaces'] = value; - } - json[r'sidebarWeb'] = this.sidebarWeb; - return json; - } - - /// Returns a new [PeopleResponse] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static PeopleResponse? fromJson(dynamic value) { - upgradeDto(value, "PeopleResponse"); - if (value is Map) { - final json = value.cast(); - - return PeopleResponse( - enabled: mapValueOfType(json, r'enabled')!, - minimumFaces: json.containsKey(r'minimumFaces') ? Optional.present(json[r'minimumFaces'] == null ? null : int.parse('${json[r'minimumFaces']}')) : const Optional.absent(), - sidebarWeb: mapValueOfType(json, r'sidebarWeb')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = PeopleResponse.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = PeopleResponse.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of PeopleResponse-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = PeopleResponse.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'enabled', - 'sidebarWeb', - }; -} - diff --git a/mobile/openapi/lib/model/people_response_dto.dart b/mobile/openapi/lib/model/people_response_dto.dart deleted file mode 100644 index f9fc157239..0000000000 --- a/mobile/openapi/lib/model/people_response_dto.dart +++ /dev/null @@ -1,140 +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 PeopleResponseDto { - /// Returns a new [PeopleResponseDto] instance. - PeopleResponseDto({ - this.hasNextPage = const Optional.absent(), - required this.hidden, - this.people = const [], - required this.total, - }); - - /// Whether there are more pages - /// - /// 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. - /// - Optional hasNextPage; - - /// Number of hidden people - /// - /// Minimum value: 0 - /// Maximum value: 9007199254740991 - int hidden; - - List people; - - /// Total number of people - /// - /// Minimum value: 0 - /// Maximum value: 9007199254740991 - int total; - - @override - bool operator ==(Object other) => identical(this, other) || other is PeopleResponseDto && - other.hasNextPage == hasNextPage && - other.hidden == hidden && - _deepEquality.equals(other.people, people) && - other.total == total; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (hasNextPage == null ? 0 : hasNextPage!.hashCode) + - (hidden.hashCode) + - (people.hashCode) + - (total.hashCode); - - @override - String toString() => 'PeopleResponseDto[hasNextPage=$hasNextPage, hidden=$hidden, people=$people, total=$total]'; - - Map toJson() { - final json = {}; - if (this.hasNextPage.isPresent) { - final value = this.hasNextPage.value; - json[r'hasNextPage'] = value; - } - json[r'hidden'] = this.hidden; - json[r'people'] = this.people; - json[r'total'] = this.total; - return json; - } - - /// Returns a new [PeopleResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static PeopleResponseDto? fromJson(dynamic value) { - upgradeDto(value, "PeopleResponseDto"); - if (value is Map) { - final json = value.cast(); - - return PeopleResponseDto( - hasNextPage: json.containsKey(r'hasNextPage') ? Optional.present(mapValueOfType(json, r'hasNextPage')) : const Optional.absent(), - hidden: mapValueOfType(json, r'hidden')!, - people: PersonResponseDto.listFromJson(json[r'people']), - total: mapValueOfType(json, r'total')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = PeopleResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = PeopleResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of PeopleResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = PeopleResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'hidden', - 'people', - 'total', - }; -} - diff --git a/mobile/openapi/lib/model/people_update.dart b/mobile/openapi/lib/model/people_update.dart deleted file mode 100644 index ea8ae73138..0000000000 --- a/mobile/openapi/lib/model/people_update.dart +++ /dev/null @@ -1,145 +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 PeopleUpdate { - /// Returns a new [PeopleUpdate] instance. - PeopleUpdate({ - this.enabled = const Optional.absent(), - this.minimumFaces = const Optional.absent(), - this.sidebarWeb = const Optional.absent(), - }); - - /// Whether people are enabled - /// - /// 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. - /// - Optional enabled; - - /// People face threshold - /// - /// Minimum value: 1 - /// Maximum value: 9007199254740991 - /// - /// 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. - /// - Optional minimumFaces; - - /// Whether people appear in web sidebar - /// - /// 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. - /// - Optional sidebarWeb; - - @override - bool operator ==(Object other) => identical(this, other) || other is PeopleUpdate && - other.enabled == enabled && - other.minimumFaces == minimumFaces && - other.sidebarWeb == sidebarWeb; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (enabled == null ? 0 : enabled!.hashCode) + - (minimumFaces == null ? 0 : minimumFaces!.hashCode) + - (sidebarWeb == null ? 0 : sidebarWeb!.hashCode); - - @override - String toString() => 'PeopleUpdate[enabled=$enabled, minimumFaces=$minimumFaces, sidebarWeb=$sidebarWeb]'; - - Map toJson() { - final json = {}; - if (this.enabled.isPresent) { - final value = this.enabled.value; - json[r'enabled'] = value; - } - if (this.minimumFaces.isPresent) { - final value = this.minimumFaces.value; - json[r'minimumFaces'] = value; - } - if (this.sidebarWeb.isPresent) { - final value = this.sidebarWeb.value; - json[r'sidebarWeb'] = value; - } - return json; - } - - /// Returns a new [PeopleUpdate] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static PeopleUpdate? fromJson(dynamic value) { - upgradeDto(value, "PeopleUpdate"); - if (value is Map) { - final json = value.cast(); - - return PeopleUpdate( - enabled: json.containsKey(r'enabled') ? Optional.present(mapValueOfType(json, r'enabled')) : const Optional.absent(), - minimumFaces: json.containsKey(r'minimumFaces') ? Optional.present(json[r'minimumFaces'] == null ? null : int.parse('${json[r'minimumFaces']}')) : const Optional.absent(), - sidebarWeb: json.containsKey(r'sidebarWeb') ? Optional.present(mapValueOfType(json, r'sidebarWeb')) : const Optional.absent(), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = PeopleUpdate.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = PeopleUpdate.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of PeopleUpdate-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = PeopleUpdate.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - }; -} - diff --git a/mobile/openapi/lib/model/people_update_dto.dart b/mobile/openapi/lib/model/people_update_dto.dart deleted file mode 100644 index c9ce74d659..0000000000 --- a/mobile/openapi/lib/model/people_update_dto.dart +++ /dev/null @@ -1,100 +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 PeopleUpdateDto { - /// Returns a new [PeopleUpdateDto] instance. - PeopleUpdateDto({ - this.people = const [], - }); - - /// People to update - List people; - - @override - bool operator ==(Object other) => identical(this, other) || other is PeopleUpdateDto && - _deepEquality.equals(other.people, people); - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (people.hashCode); - - @override - String toString() => 'PeopleUpdateDto[people=$people]'; - - Map toJson() { - final json = {}; - json[r'people'] = this.people; - return json; - } - - /// Returns a new [PeopleUpdateDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static PeopleUpdateDto? fromJson(dynamic value) { - upgradeDto(value, "PeopleUpdateDto"); - if (value is Map) { - final json = value.cast(); - - return PeopleUpdateDto( - people: PeopleUpdateItem.listFromJson(json[r'people']), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = PeopleUpdateDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = PeopleUpdateDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of PeopleUpdateDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = PeopleUpdateDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'people', - }; -} - diff --git a/mobile/openapi/lib/model/people_update_item.dart b/mobile/openapi/lib/model/people_update_item.dart deleted file mode 100644 index 9ebbd93e28..0000000000 --- a/mobile/openapi/lib/model/people_update_item.dart +++ /dev/null @@ -1,190 +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 PeopleUpdateItem { - /// Returns a new [PeopleUpdateItem] instance. - PeopleUpdateItem({ - this.birthDate = const Optional.absent(), - this.color = const Optional.absent(), - this.featureFaceAssetId = const Optional.absent(), - required this.id, - this.isFavorite = const Optional.absent(), - this.isHidden = const Optional.absent(), - this.name = const Optional.absent(), - }); - - /// Person date of birth - Optional birthDate; - - /// Person color (hex) - Optional color; - - /// Asset ID used for feature face thumbnail - /// - /// 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. - /// - Optional featureFaceAssetId; - - /// Person ID - String id; - - /// Mark as favorite - /// - /// 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. - /// - Optional isFavorite; - - /// Person visibility (hidden) - /// - /// 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. - /// - Optional isHidden; - - /// Person name - /// - /// 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. - /// - Optional name; - - @override - bool operator ==(Object other) => identical(this, other) || other is PeopleUpdateItem && - other.birthDate == birthDate && - other.color == color && - other.featureFaceAssetId == featureFaceAssetId && - other.id == id && - other.isFavorite == isFavorite && - other.isHidden == isHidden && - other.name == name; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (birthDate == null ? 0 : birthDate!.hashCode) + - (color == null ? 0 : color!.hashCode) + - (featureFaceAssetId == null ? 0 : featureFaceAssetId!.hashCode) + - (id.hashCode) + - (isFavorite == null ? 0 : isFavorite!.hashCode) + - (isHidden == null ? 0 : isHidden!.hashCode) + - (name == null ? 0 : name!.hashCode); - - @override - String toString() => 'PeopleUpdateItem[birthDate=$birthDate, color=$color, featureFaceAssetId=$featureFaceAssetId, id=$id, isFavorite=$isFavorite, isHidden=$isHidden, name=$name]'; - - Map toJson() { - final json = {}; - if (this.birthDate.isPresent) { - final value = this.birthDate.value; - json[r'birthDate'] = value == null ? null : _dateFormatter.format(value.toUtc()); - } - if (this.color.isPresent) { - final value = this.color.value; - json[r'color'] = value; - } - if (this.featureFaceAssetId.isPresent) { - final value = this.featureFaceAssetId.value; - json[r'featureFaceAssetId'] = value; - } - json[r'id'] = this.id; - if (this.isFavorite.isPresent) { - final value = this.isFavorite.value; - json[r'isFavorite'] = value; - } - if (this.isHidden.isPresent) { - final value = this.isHidden.value; - json[r'isHidden'] = value; - } - if (this.name.isPresent) { - final value = this.name.value; - json[r'name'] = value; - } - return json; - } - - /// Returns a new [PeopleUpdateItem] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static PeopleUpdateItem? fromJson(dynamic value) { - upgradeDto(value, "PeopleUpdateItem"); - if (value is Map) { - final json = value.cast(); - - return PeopleUpdateItem( - birthDate: json.containsKey(r'birthDate') ? Optional.present(mapDateTime(json, r'birthDate', r'')) : const Optional.absent(), - color: json.containsKey(r'color') ? Optional.present(mapValueOfType(json, r'color')) : const Optional.absent(), - featureFaceAssetId: json.containsKey(r'featureFaceAssetId') ? Optional.present(mapValueOfType(json, r'featureFaceAssetId')) : const Optional.absent(), - id: mapValueOfType(json, r'id')!, - isFavorite: json.containsKey(r'isFavorite') ? Optional.present(mapValueOfType(json, r'isFavorite')) : const Optional.absent(), - isHidden: json.containsKey(r'isHidden') ? Optional.present(mapValueOfType(json, r'isHidden')) : const Optional.absent(), - name: json.containsKey(r'name') ? Optional.present(mapValueOfType(json, r'name')) : const Optional.absent(), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = PeopleUpdateItem.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = PeopleUpdateItem.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of PeopleUpdateItem-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = PeopleUpdateItem.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'id', - }; -} - diff --git a/mobile/openapi/lib/model/permission.dart b/mobile/openapi/lib/model/permission.dart deleted file mode 100644 index 0ac9461027..0000000000 --- a/mobile/openapi/lib/model/permission.dart +++ /dev/null @@ -1,544 +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; - -/// List of permissions -class Permission { - /// Instantiate a new enum with the provided [value]. - const Permission._(this.value); - - /// The underlying value of this enum member. - final String value; - - @override - String toString() => value; - - String toJson() => value; - - static const all = Permission._(r'all'); - static const activityPeriodCreate = Permission._(r'activity.create'); - static const activityPeriodRead = Permission._(r'activity.read'); - static const activityPeriodUpdate = Permission._(r'activity.update'); - static const activityPeriodDelete = Permission._(r'activity.delete'); - static const activityPeriodStatistics = Permission._(r'activity.statistics'); - static const apiKeyPeriodCreate = Permission._(r'apiKey.create'); - static const apiKeyPeriodRead = Permission._(r'apiKey.read'); - static const apiKeyPeriodUpdate = Permission._(r'apiKey.update'); - static const apiKeyPeriodDelete = Permission._(r'apiKey.delete'); - static const assetPeriodRead = Permission._(r'asset.read'); - static const assetPeriodUpdate = Permission._(r'asset.update'); - static const assetPeriodDelete = Permission._(r'asset.delete'); - static const assetPeriodStatistics = Permission._(r'asset.statistics'); - static const assetPeriodShare = Permission._(r'asset.share'); - static const assetPeriodView = Permission._(r'asset.view'); - static const assetPeriodDownload = Permission._(r'asset.download'); - static const assetPeriodUpload = Permission._(r'asset.upload'); - static const assetPeriodCopy = Permission._(r'asset.copy'); - static const assetPeriodDerive = Permission._(r'asset.derive'); - static const assetPeriodEditPeriodGet = Permission._(r'asset.edit.get'); - static const assetPeriodEditPeriodCreate = Permission._(r'asset.edit.create'); - static const assetPeriodEditPeriodDelete = Permission._(r'asset.edit.delete'); - static const albumPeriodCreate = Permission._(r'album.create'); - static const albumPeriodRead = Permission._(r'album.read'); - static const albumPeriodUpdate = Permission._(r'album.update'); - static const albumPeriodDelete = Permission._(r'album.delete'); - static const albumPeriodStatistics = Permission._(r'album.statistics'); - static const albumPeriodShare = Permission._(r'album.share'); - static const albumPeriodDownload = Permission._(r'album.download'); - static const albumAssetPeriodCreate = Permission._(r'albumAsset.create'); - static const albumAssetPeriodDelete = Permission._(r'albumAsset.delete'); - static const albumUserPeriodCreate = Permission._(r'albumUser.create'); - static const albumUserPeriodUpdate = Permission._(r'albumUser.update'); - static const albumUserPeriodDelete = Permission._(r'albumUser.delete'); - static const authPeriodChangePassword = Permission._(r'auth.changePassword'); - static const authDevicePeriodDelete = Permission._(r'authDevice.delete'); - static const archivePeriodRead = Permission._(r'archive.read'); - static const backupPeriodList = Permission._(r'backup.list'); - static const backupPeriodDownload = Permission._(r'backup.download'); - static const backupPeriodUpload = Permission._(r'backup.upload'); - static const backupPeriodDelete = Permission._(r'backup.delete'); - static const duplicatePeriodRead = Permission._(r'duplicate.read'); - static const duplicatePeriodDelete = Permission._(r'duplicate.delete'); - static const facePeriodCreate = Permission._(r'face.create'); - static const facePeriodRead = Permission._(r'face.read'); - static const facePeriodUpdate = Permission._(r'face.update'); - static const facePeriodDelete = Permission._(r'face.delete'); - static const folderPeriodRead = Permission._(r'folder.read'); - static const jobPeriodCreate = Permission._(r'job.create'); - static const jobPeriodRead = Permission._(r'job.read'); - static const libraryPeriodCreate = Permission._(r'library.create'); - static const libraryPeriodRead = Permission._(r'library.read'); - static const libraryPeriodUpdate = Permission._(r'library.update'); - static const libraryPeriodDelete = Permission._(r'library.delete'); - static const libraryPeriodStatistics = Permission._(r'library.statistics'); - static const timelinePeriodRead = Permission._(r'timeline.read'); - static const timelinePeriodDownload = Permission._(r'timeline.download'); - static const maintenance = Permission._(r'maintenance'); - static const mapPeriodRead = Permission._(r'map.read'); - static const mapPeriodSearch = Permission._(r'map.search'); - static const memoryPeriodCreate = Permission._(r'memory.create'); - static const memoryPeriodRead = Permission._(r'memory.read'); - static const memoryPeriodUpdate = Permission._(r'memory.update'); - static const memoryPeriodDelete = Permission._(r'memory.delete'); - static const memoryPeriodStatistics = Permission._(r'memory.statistics'); - static const memoryAssetPeriodCreate = Permission._(r'memoryAsset.create'); - static const memoryAssetPeriodDelete = Permission._(r'memoryAsset.delete'); - static const notificationPeriodCreate = Permission._(r'notification.create'); - static const notificationPeriodRead = Permission._(r'notification.read'); - static const notificationPeriodUpdate = Permission._(r'notification.update'); - static const notificationPeriodDelete = Permission._(r'notification.delete'); - static const partnerPeriodCreate = Permission._(r'partner.create'); - static const partnerPeriodRead = Permission._(r'partner.read'); - static const partnerPeriodUpdate = Permission._(r'partner.update'); - static const partnerPeriodDelete = Permission._(r'partner.delete'); - static const personPeriodCreate = Permission._(r'person.create'); - static const personPeriodRead = Permission._(r'person.read'); - static const personPeriodUpdate = Permission._(r'person.update'); - static const personPeriodDelete = Permission._(r'person.delete'); - static const personPeriodStatistics = Permission._(r'person.statistics'); - static const personPeriodMerge = Permission._(r'person.merge'); - static const personPeriodReassign = Permission._(r'person.reassign'); - static const pinCodePeriodCreate = Permission._(r'pinCode.create'); - static const pinCodePeriodUpdate = Permission._(r'pinCode.update'); - static const pinCodePeriodDelete = Permission._(r'pinCode.delete'); - static const pluginPeriodCreate = Permission._(r'plugin.create'); - static const pluginPeriodRead = Permission._(r'plugin.read'); - static const pluginPeriodUpdate = Permission._(r'plugin.update'); - static const pluginPeriodDelete = Permission._(r'plugin.delete'); - static const serverPeriodAbout = Permission._(r'server.about'); - static const serverPeriodApkLinks = Permission._(r'server.apkLinks'); - static const serverPeriodStorage = Permission._(r'server.storage'); - static const serverPeriodStatistics = Permission._(r'server.statistics'); - static const serverPeriodVersionCheck = Permission._(r'server.versionCheck'); - static const serverLicensePeriodRead = Permission._(r'serverLicense.read'); - static const serverLicensePeriodUpdate = Permission._(r'serverLicense.update'); - static const serverLicensePeriodDelete = Permission._(r'serverLicense.delete'); - static const sessionPeriodCreate = Permission._(r'session.create'); - static const sessionPeriodRead = Permission._(r'session.read'); - static const sessionPeriodUpdate = Permission._(r'session.update'); - static const sessionPeriodDelete = Permission._(r'session.delete'); - static const sessionPeriodLock = Permission._(r'session.lock'); - static const sharedLinkPeriodCreate = Permission._(r'sharedLink.create'); - static const sharedLinkPeriodRead = Permission._(r'sharedLink.read'); - static const sharedLinkPeriodUpdate = Permission._(r'sharedLink.update'); - static const sharedLinkPeriodDelete = Permission._(r'sharedLink.delete'); - static const stackPeriodCreate = Permission._(r'stack.create'); - static const stackPeriodRead = Permission._(r'stack.read'); - static const stackPeriodUpdate = Permission._(r'stack.update'); - static const stackPeriodDelete = Permission._(r'stack.delete'); - static const syncPeriodStream = Permission._(r'sync.stream'); - static const syncCheckpointPeriodRead = Permission._(r'syncCheckpoint.read'); - static const syncCheckpointPeriodUpdate = Permission._(r'syncCheckpoint.update'); - static const syncCheckpointPeriodDelete = Permission._(r'syncCheckpoint.delete'); - static const systemConfigPeriodRead = Permission._(r'systemConfig.read'); - static const systemConfigPeriodUpdate = Permission._(r'systemConfig.update'); - static const systemMetadataPeriodRead = Permission._(r'systemMetadata.read'); - static const systemMetadataPeriodUpdate = Permission._(r'systemMetadata.update'); - static const tagPeriodCreate = Permission._(r'tag.create'); - static const tagPeriodRead = Permission._(r'tag.read'); - static const tagPeriodUpdate = Permission._(r'tag.update'); - static const tagPeriodDelete = Permission._(r'tag.delete'); - static const tagPeriodAsset = Permission._(r'tag.asset'); - static const userPeriodRead = Permission._(r'user.read'); - static const userPeriodUpdate = Permission._(r'user.update'); - static const userLicensePeriodCreate = Permission._(r'userLicense.create'); - static const userLicensePeriodRead = Permission._(r'userLicense.read'); - static const userLicensePeriodUpdate = Permission._(r'userLicense.update'); - static const userLicensePeriodDelete = Permission._(r'userLicense.delete'); - static const userOnboardingPeriodRead = Permission._(r'userOnboarding.read'); - static const userOnboardingPeriodUpdate = Permission._(r'userOnboarding.update'); - static const userOnboardingPeriodDelete = Permission._(r'userOnboarding.delete'); - static const userPreferencePeriodRead = Permission._(r'userPreference.read'); - static const userPreferencePeriodUpdate = Permission._(r'userPreference.update'); - static const userProfileImagePeriodCreate = Permission._(r'userProfileImage.create'); - static const userProfileImagePeriodRead = Permission._(r'userProfileImage.read'); - static const userProfileImagePeriodUpdate = Permission._(r'userProfileImage.update'); - static const userProfileImagePeriodDelete = Permission._(r'userProfileImage.delete'); - static const queuePeriodRead = Permission._(r'queue.read'); - static const queuePeriodUpdate = Permission._(r'queue.update'); - static const queueJobPeriodCreate = Permission._(r'queueJob.create'); - static const queueJobPeriodRead = Permission._(r'queueJob.read'); - static const queueJobPeriodUpdate = Permission._(r'queueJob.update'); - static const queueJobPeriodDelete = Permission._(r'queueJob.delete'); - static const workflowPeriodCreate = Permission._(r'workflow.create'); - static const workflowPeriodRead = Permission._(r'workflow.read'); - static const workflowPeriodUpdate = Permission._(r'workflow.update'); - static const workflowPeriodDelete = Permission._(r'workflow.delete'); - static const adminUserPeriodCreate = Permission._(r'adminUser.create'); - static const adminUserPeriodRead = Permission._(r'adminUser.read'); - static const adminUserPeriodUpdate = Permission._(r'adminUser.update'); - static const adminUserPeriodDelete = Permission._(r'adminUser.delete'); - static const adminSessionPeriodRead = Permission._(r'adminSession.read'); - static const adminAuthPeriodUnlinkAll = Permission._(r'adminAuth.unlinkAll'); - - /// List of all possible values in this [enum][Permission]. - static const values = [ - all, - activityPeriodCreate, - activityPeriodRead, - activityPeriodUpdate, - activityPeriodDelete, - activityPeriodStatistics, - apiKeyPeriodCreate, - apiKeyPeriodRead, - apiKeyPeriodUpdate, - apiKeyPeriodDelete, - assetPeriodRead, - assetPeriodUpdate, - assetPeriodDelete, - assetPeriodStatistics, - assetPeriodShare, - assetPeriodView, - assetPeriodDownload, - assetPeriodUpload, - assetPeriodCopy, - assetPeriodDerive, - assetPeriodEditPeriodGet, - assetPeriodEditPeriodCreate, - assetPeriodEditPeriodDelete, - albumPeriodCreate, - albumPeriodRead, - albumPeriodUpdate, - albumPeriodDelete, - albumPeriodStatistics, - albumPeriodShare, - albumPeriodDownload, - albumAssetPeriodCreate, - albumAssetPeriodDelete, - albumUserPeriodCreate, - albumUserPeriodUpdate, - albumUserPeriodDelete, - authPeriodChangePassword, - authDevicePeriodDelete, - archivePeriodRead, - backupPeriodList, - backupPeriodDownload, - backupPeriodUpload, - backupPeriodDelete, - duplicatePeriodRead, - duplicatePeriodDelete, - facePeriodCreate, - facePeriodRead, - facePeriodUpdate, - facePeriodDelete, - folderPeriodRead, - jobPeriodCreate, - jobPeriodRead, - libraryPeriodCreate, - libraryPeriodRead, - libraryPeriodUpdate, - libraryPeriodDelete, - libraryPeriodStatistics, - timelinePeriodRead, - timelinePeriodDownload, - maintenance, - mapPeriodRead, - mapPeriodSearch, - memoryPeriodCreate, - memoryPeriodRead, - memoryPeriodUpdate, - memoryPeriodDelete, - memoryPeriodStatistics, - memoryAssetPeriodCreate, - memoryAssetPeriodDelete, - notificationPeriodCreate, - notificationPeriodRead, - notificationPeriodUpdate, - notificationPeriodDelete, - partnerPeriodCreate, - partnerPeriodRead, - partnerPeriodUpdate, - partnerPeriodDelete, - personPeriodCreate, - personPeriodRead, - personPeriodUpdate, - personPeriodDelete, - personPeriodStatistics, - personPeriodMerge, - personPeriodReassign, - pinCodePeriodCreate, - pinCodePeriodUpdate, - pinCodePeriodDelete, - pluginPeriodCreate, - pluginPeriodRead, - pluginPeriodUpdate, - pluginPeriodDelete, - serverPeriodAbout, - serverPeriodApkLinks, - serverPeriodStorage, - serverPeriodStatistics, - serverPeriodVersionCheck, - serverLicensePeriodRead, - serverLicensePeriodUpdate, - serverLicensePeriodDelete, - sessionPeriodCreate, - sessionPeriodRead, - sessionPeriodUpdate, - sessionPeriodDelete, - sessionPeriodLock, - sharedLinkPeriodCreate, - sharedLinkPeriodRead, - sharedLinkPeriodUpdate, - sharedLinkPeriodDelete, - stackPeriodCreate, - stackPeriodRead, - stackPeriodUpdate, - stackPeriodDelete, - syncPeriodStream, - syncCheckpointPeriodRead, - syncCheckpointPeriodUpdate, - syncCheckpointPeriodDelete, - systemConfigPeriodRead, - systemConfigPeriodUpdate, - systemMetadataPeriodRead, - systemMetadataPeriodUpdate, - tagPeriodCreate, - tagPeriodRead, - tagPeriodUpdate, - tagPeriodDelete, - tagPeriodAsset, - userPeriodRead, - userPeriodUpdate, - userLicensePeriodCreate, - userLicensePeriodRead, - userLicensePeriodUpdate, - userLicensePeriodDelete, - userOnboardingPeriodRead, - userOnboardingPeriodUpdate, - userOnboardingPeriodDelete, - userPreferencePeriodRead, - userPreferencePeriodUpdate, - userProfileImagePeriodCreate, - userProfileImagePeriodRead, - userProfileImagePeriodUpdate, - userProfileImagePeriodDelete, - queuePeriodRead, - queuePeriodUpdate, - queueJobPeriodCreate, - queueJobPeriodRead, - queueJobPeriodUpdate, - queueJobPeriodDelete, - workflowPeriodCreate, - workflowPeriodRead, - workflowPeriodUpdate, - workflowPeriodDelete, - adminUserPeriodCreate, - adminUserPeriodRead, - adminUserPeriodUpdate, - adminUserPeriodDelete, - adminSessionPeriodRead, - adminAuthPeriodUnlinkAll, - ]; - - static Permission? fromJson(dynamic value) => PermissionTypeTransformer().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 = Permission.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } -} - -/// Transformation class that can [encode] an instance of [Permission] to String, -/// and [decode] dynamic data back to [Permission]. -class PermissionTypeTransformer { - factory PermissionTypeTransformer() => _instance ??= const PermissionTypeTransformer._(); - - const PermissionTypeTransformer._(); - - String encode(Permission data) => data.value; - - /// Decodes a [dynamic value][data] to a Permission. - /// - /// 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. - Permission? decode(dynamic data, {bool allowNull = true}) { - if (data != null) { - switch (data) { - case r'all': return Permission.all; - case r'activity.create': return Permission.activityPeriodCreate; - case r'activity.read': return Permission.activityPeriodRead; - case r'activity.update': return Permission.activityPeriodUpdate; - case r'activity.delete': return Permission.activityPeriodDelete; - case r'activity.statistics': return Permission.activityPeriodStatistics; - case r'apiKey.create': return Permission.apiKeyPeriodCreate; - case r'apiKey.read': return Permission.apiKeyPeriodRead; - case r'apiKey.update': return Permission.apiKeyPeriodUpdate; - case r'apiKey.delete': return Permission.apiKeyPeriodDelete; - case r'asset.read': return Permission.assetPeriodRead; - case r'asset.update': return Permission.assetPeriodUpdate; - case r'asset.delete': return Permission.assetPeriodDelete; - case r'asset.statistics': return Permission.assetPeriodStatistics; - case r'asset.share': return Permission.assetPeriodShare; - case r'asset.view': return Permission.assetPeriodView; - case r'asset.download': return Permission.assetPeriodDownload; - case r'asset.upload': return Permission.assetPeriodUpload; - case r'asset.copy': return Permission.assetPeriodCopy; - case r'asset.derive': return Permission.assetPeriodDerive; - case r'asset.edit.get': return Permission.assetPeriodEditPeriodGet; - case r'asset.edit.create': return Permission.assetPeriodEditPeriodCreate; - case r'asset.edit.delete': return Permission.assetPeriodEditPeriodDelete; - case r'album.create': return Permission.albumPeriodCreate; - case r'album.read': return Permission.albumPeriodRead; - case r'album.update': return Permission.albumPeriodUpdate; - case r'album.delete': return Permission.albumPeriodDelete; - case r'album.statistics': return Permission.albumPeriodStatistics; - case r'album.share': return Permission.albumPeriodShare; - case r'album.download': return Permission.albumPeriodDownload; - case r'albumAsset.create': return Permission.albumAssetPeriodCreate; - case r'albumAsset.delete': return Permission.albumAssetPeriodDelete; - case r'albumUser.create': return Permission.albumUserPeriodCreate; - case r'albumUser.update': return Permission.albumUserPeriodUpdate; - case r'albumUser.delete': return Permission.albumUserPeriodDelete; - case r'auth.changePassword': return Permission.authPeriodChangePassword; - case r'authDevice.delete': return Permission.authDevicePeriodDelete; - case r'archive.read': return Permission.archivePeriodRead; - case r'backup.list': return Permission.backupPeriodList; - case r'backup.download': return Permission.backupPeriodDownload; - case r'backup.upload': return Permission.backupPeriodUpload; - case r'backup.delete': return Permission.backupPeriodDelete; - case r'duplicate.read': return Permission.duplicatePeriodRead; - case r'duplicate.delete': return Permission.duplicatePeriodDelete; - case r'face.create': return Permission.facePeriodCreate; - case r'face.read': return Permission.facePeriodRead; - case r'face.update': return Permission.facePeriodUpdate; - case r'face.delete': return Permission.facePeriodDelete; - case r'folder.read': return Permission.folderPeriodRead; - case r'job.create': return Permission.jobPeriodCreate; - case r'job.read': return Permission.jobPeriodRead; - case r'library.create': return Permission.libraryPeriodCreate; - case r'library.read': return Permission.libraryPeriodRead; - case r'library.update': return Permission.libraryPeriodUpdate; - case r'library.delete': return Permission.libraryPeriodDelete; - case r'library.statistics': return Permission.libraryPeriodStatistics; - case r'timeline.read': return Permission.timelinePeriodRead; - case r'timeline.download': return Permission.timelinePeriodDownload; - case r'maintenance': return Permission.maintenance; - case r'map.read': return Permission.mapPeriodRead; - case r'map.search': return Permission.mapPeriodSearch; - case r'memory.create': return Permission.memoryPeriodCreate; - case r'memory.read': return Permission.memoryPeriodRead; - case r'memory.update': return Permission.memoryPeriodUpdate; - case r'memory.delete': return Permission.memoryPeriodDelete; - case r'memory.statistics': return Permission.memoryPeriodStatistics; - case r'memoryAsset.create': return Permission.memoryAssetPeriodCreate; - case r'memoryAsset.delete': return Permission.memoryAssetPeriodDelete; - case r'notification.create': return Permission.notificationPeriodCreate; - case r'notification.read': return Permission.notificationPeriodRead; - case r'notification.update': return Permission.notificationPeriodUpdate; - case r'notification.delete': return Permission.notificationPeriodDelete; - case r'partner.create': return Permission.partnerPeriodCreate; - case r'partner.read': return Permission.partnerPeriodRead; - case r'partner.update': return Permission.partnerPeriodUpdate; - case r'partner.delete': return Permission.partnerPeriodDelete; - case r'person.create': return Permission.personPeriodCreate; - case r'person.read': return Permission.personPeriodRead; - case r'person.update': return Permission.personPeriodUpdate; - case r'person.delete': return Permission.personPeriodDelete; - case r'person.statistics': return Permission.personPeriodStatistics; - case r'person.merge': return Permission.personPeriodMerge; - case r'person.reassign': return Permission.personPeriodReassign; - case r'pinCode.create': return Permission.pinCodePeriodCreate; - case r'pinCode.update': return Permission.pinCodePeriodUpdate; - case r'pinCode.delete': return Permission.pinCodePeriodDelete; - case r'plugin.create': return Permission.pluginPeriodCreate; - case r'plugin.read': return Permission.pluginPeriodRead; - case r'plugin.update': return Permission.pluginPeriodUpdate; - case r'plugin.delete': return Permission.pluginPeriodDelete; - case r'server.about': return Permission.serverPeriodAbout; - case r'server.apkLinks': return Permission.serverPeriodApkLinks; - case r'server.storage': return Permission.serverPeriodStorage; - case r'server.statistics': return Permission.serverPeriodStatistics; - case r'server.versionCheck': return Permission.serverPeriodVersionCheck; - case r'serverLicense.read': return Permission.serverLicensePeriodRead; - case r'serverLicense.update': return Permission.serverLicensePeriodUpdate; - case r'serverLicense.delete': return Permission.serverLicensePeriodDelete; - case r'session.create': return Permission.sessionPeriodCreate; - case r'session.read': return Permission.sessionPeriodRead; - case r'session.update': return Permission.sessionPeriodUpdate; - case r'session.delete': return Permission.sessionPeriodDelete; - case r'session.lock': return Permission.sessionPeriodLock; - case r'sharedLink.create': return Permission.sharedLinkPeriodCreate; - case r'sharedLink.read': return Permission.sharedLinkPeriodRead; - case r'sharedLink.update': return Permission.sharedLinkPeriodUpdate; - case r'sharedLink.delete': return Permission.sharedLinkPeriodDelete; - case r'stack.create': return Permission.stackPeriodCreate; - case r'stack.read': return Permission.stackPeriodRead; - case r'stack.update': return Permission.stackPeriodUpdate; - case r'stack.delete': return Permission.stackPeriodDelete; - case r'sync.stream': return Permission.syncPeriodStream; - case r'syncCheckpoint.read': return Permission.syncCheckpointPeriodRead; - case r'syncCheckpoint.update': return Permission.syncCheckpointPeriodUpdate; - case r'syncCheckpoint.delete': return Permission.syncCheckpointPeriodDelete; - case r'systemConfig.read': return Permission.systemConfigPeriodRead; - case r'systemConfig.update': return Permission.systemConfigPeriodUpdate; - case r'systemMetadata.read': return Permission.systemMetadataPeriodRead; - case r'systemMetadata.update': return Permission.systemMetadataPeriodUpdate; - case r'tag.create': return Permission.tagPeriodCreate; - case r'tag.read': return Permission.tagPeriodRead; - case r'tag.update': return Permission.tagPeriodUpdate; - case r'tag.delete': return Permission.tagPeriodDelete; - case r'tag.asset': return Permission.tagPeriodAsset; - case r'user.read': return Permission.userPeriodRead; - case r'user.update': return Permission.userPeriodUpdate; - case r'userLicense.create': return Permission.userLicensePeriodCreate; - case r'userLicense.read': return Permission.userLicensePeriodRead; - case r'userLicense.update': return Permission.userLicensePeriodUpdate; - case r'userLicense.delete': return Permission.userLicensePeriodDelete; - case r'userOnboarding.read': return Permission.userOnboardingPeriodRead; - case r'userOnboarding.update': return Permission.userOnboardingPeriodUpdate; - case r'userOnboarding.delete': return Permission.userOnboardingPeriodDelete; - case r'userPreference.read': return Permission.userPreferencePeriodRead; - case r'userPreference.update': return Permission.userPreferencePeriodUpdate; - case r'userProfileImage.create': return Permission.userProfileImagePeriodCreate; - case r'userProfileImage.read': return Permission.userProfileImagePeriodRead; - case r'userProfileImage.update': return Permission.userProfileImagePeriodUpdate; - case r'userProfileImage.delete': return Permission.userProfileImagePeriodDelete; - case r'queue.read': return Permission.queuePeriodRead; - case r'queue.update': return Permission.queuePeriodUpdate; - case r'queueJob.create': return Permission.queueJobPeriodCreate; - case r'queueJob.read': return Permission.queueJobPeriodRead; - case r'queueJob.update': return Permission.queueJobPeriodUpdate; - case r'queueJob.delete': return Permission.queueJobPeriodDelete; - case r'workflow.create': return Permission.workflowPeriodCreate; - case r'workflow.read': return Permission.workflowPeriodRead; - case r'workflow.update': return Permission.workflowPeriodUpdate; - case r'workflow.delete': return Permission.workflowPeriodDelete; - case r'adminUser.create': return Permission.adminUserPeriodCreate; - case r'adminUser.read': return Permission.adminUserPeriodRead; - case r'adminUser.update': return Permission.adminUserPeriodUpdate; - case r'adminUser.delete': return Permission.adminUserPeriodDelete; - case r'adminSession.read': return Permission.adminSessionPeriodRead; - case r'adminAuth.unlinkAll': return Permission.adminAuthPeriodUnlinkAll; - default: - if (!allowNull) { - throw ArgumentError('Unknown enum value to decode: $data'); - } - } - } - return null; - } - - /// Singleton [PermissionTypeTransformer] instance. - static PermissionTypeTransformer? _instance; -} - diff --git a/mobile/openapi/lib/model/person_create_dto.dart b/mobile/openapi/lib/model/person_create_dto.dart deleted file mode 100644 index 22c9d2fb4c..0000000000 --- a/mobile/openapi/lib/model/person_create_dto.dart +++ /dev/null @@ -1,164 +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 PersonCreateDto { - /// Returns a new [PersonCreateDto] instance. - PersonCreateDto({ - this.birthDate = const Optional.absent(), - this.color = const Optional.absent(), - this.isFavorite = const Optional.absent(), - this.isHidden = const Optional.absent(), - this.name = const Optional.absent(), - }); - - /// Person date of birth - Optional birthDate; - - /// Person color (hex) - Optional color; - - /// Mark as favorite - /// - /// 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. - /// - Optional isFavorite; - - /// Person visibility (hidden) - /// - /// 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. - /// - Optional isHidden; - - /// Person name - /// - /// 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. - /// - Optional name; - - @override - bool operator ==(Object other) => identical(this, other) || other is PersonCreateDto && - other.birthDate == birthDate && - other.color == color && - other.isFavorite == isFavorite && - other.isHidden == isHidden && - other.name == name; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (birthDate == null ? 0 : birthDate!.hashCode) + - (color == null ? 0 : color!.hashCode) + - (isFavorite == null ? 0 : isFavorite!.hashCode) + - (isHidden == null ? 0 : isHidden!.hashCode) + - (name == null ? 0 : name!.hashCode); - - @override - String toString() => 'PersonCreateDto[birthDate=$birthDate, color=$color, isFavorite=$isFavorite, isHidden=$isHidden, name=$name]'; - - Map toJson() { - final json = {}; - if (this.birthDate.isPresent) { - final value = this.birthDate.value; - json[r'birthDate'] = value == null ? null : _dateFormatter.format(value.toUtc()); - } - if (this.color.isPresent) { - final value = this.color.value; - json[r'color'] = value; - } - if (this.isFavorite.isPresent) { - final value = this.isFavorite.value; - json[r'isFavorite'] = value; - } - if (this.isHidden.isPresent) { - final value = this.isHidden.value; - json[r'isHidden'] = value; - } - if (this.name.isPresent) { - final value = this.name.value; - json[r'name'] = value; - } - return json; - } - - /// Returns a new [PersonCreateDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static PersonCreateDto? fromJson(dynamic value) { - upgradeDto(value, "PersonCreateDto"); - if (value is Map) { - final json = value.cast(); - - return PersonCreateDto( - birthDate: json.containsKey(r'birthDate') ? Optional.present(mapDateTime(json, r'birthDate', r'')) : const Optional.absent(), - color: json.containsKey(r'color') ? Optional.present(mapValueOfType(json, r'color')) : const Optional.absent(), - isFavorite: json.containsKey(r'isFavorite') ? Optional.present(mapValueOfType(json, r'isFavorite')) : const Optional.absent(), - isHidden: json.containsKey(r'isHidden') ? Optional.present(mapValueOfType(json, r'isHidden')) : const Optional.absent(), - name: json.containsKey(r'name') ? Optional.present(mapValueOfType(json, r'name')) : const Optional.absent(), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = PersonCreateDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = PersonCreateDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of PersonCreateDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = PersonCreateDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - }; -} - diff --git a/mobile/openapi/lib/model/person_response_dto.dart b/mobile/openapi/lib/model/person_response_dto.dart deleted file mode 100644 index a99f465236..0000000000 --- a/mobile/openapi/lib/model/person_response_dto.dart +++ /dev/null @@ -1,191 +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 PersonResponseDto { - /// Returns a new [PersonResponseDto] instance. - PersonResponseDto({ - required this.birthDate, - this.color = const Optional.absent(), - required this.id, - this.isFavorite = const Optional.absent(), - required this.isHidden, - required this.name, - required this.thumbnailPath, - this.updatedAt = const Optional.absent(), - }); - - /// Person date of birth - DateTime? birthDate; - - /// Person color (hex) - /// - /// 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. - /// - Optional color; - - /// Person ID - String id; - - /// Is favorite - /// - /// 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. - /// - Optional isFavorite; - - /// Is hidden - bool isHidden; - - /// Person name - String name; - - /// Thumbnail path - String thumbnailPath; - - /// Last update date - /// - /// 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. - /// - Optional updatedAt; - - @override - bool operator ==(Object other) => identical(this, other) || other is PersonResponseDto && - other.birthDate == birthDate && - other.color == color && - other.id == id && - other.isFavorite == isFavorite && - other.isHidden == isHidden && - other.name == name && - other.thumbnailPath == thumbnailPath && - other.updatedAt == updatedAt; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (birthDate == null ? 0 : birthDate!.hashCode) + - (color == null ? 0 : color!.hashCode) + - (id.hashCode) + - (isFavorite == null ? 0 : isFavorite!.hashCode) + - (isHidden.hashCode) + - (name.hashCode) + - (thumbnailPath.hashCode) + - (updatedAt == null ? 0 : updatedAt!.hashCode); - - @override - String toString() => 'PersonResponseDto[birthDate=$birthDate, color=$color, id=$id, isFavorite=$isFavorite, isHidden=$isHidden, name=$name, thumbnailPath=$thumbnailPath, updatedAt=$updatedAt]'; - - Map toJson() { - final json = {}; - if (this.birthDate != null) { - json[r'birthDate'] = _dateFormatter.format(this.birthDate!.toUtc()); - } else { - json[r'birthDate'] = null; - } - if (this.color.isPresent) { - final value = this.color.value; - json[r'color'] = value; - } - json[r'id'] = this.id; - if (this.isFavorite.isPresent) { - final value = this.isFavorite.value; - json[r'isFavorite'] = value; - } - json[r'isHidden'] = this.isHidden; - json[r'name'] = this.name; - json[r'thumbnailPath'] = this.thumbnailPath; - if (this.updatedAt.isPresent) { - final value = this.updatedAt.value; - json[r'updatedAt'] = value == null ? null : value.toUtc().toIso8601String(); - } - return json; - } - - /// Returns a new [PersonResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static PersonResponseDto? fromJson(dynamic value) { - upgradeDto(value, "PersonResponseDto"); - if (value is Map) { - final json = value.cast(); - - return PersonResponseDto( - birthDate: mapDateTime(json, r'birthDate', r''), - color: json.containsKey(r'color') ? Optional.present(mapValueOfType(json, r'color')) : const Optional.absent(), - id: mapValueOfType(json, r'id')!, - isFavorite: json.containsKey(r'isFavorite') ? Optional.present(mapValueOfType(json, r'isFavorite')) : const Optional.absent(), - isHidden: mapValueOfType(json, r'isHidden')!, - name: mapValueOfType(json, r'name')!, - thumbnailPath: mapValueOfType(json, r'thumbnailPath')!, - updatedAt: json.containsKey(r'updatedAt') ? Optional.present(mapDateTime(json, r'updatedAt', r'')) : const Optional.absent(), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = PersonResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = PersonResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of PersonResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = PersonResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'birthDate', - 'id', - 'isHidden', - 'name', - 'thumbnailPath', - }; -} - diff --git a/mobile/openapi/lib/model/person_statistics_response_dto.dart b/mobile/openapi/lib/model/person_statistics_response_dto.dart deleted file mode 100644 index aeac16cc8a..0000000000 --- a/mobile/openapi/lib/model/person_statistics_response_dto.dart +++ /dev/null @@ -1,103 +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 PersonStatisticsResponseDto { - /// Returns a new [PersonStatisticsResponseDto] instance. - PersonStatisticsResponseDto({ - required this.assets, - }); - - /// Number of assets - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int assets; - - @override - bool operator ==(Object other) => identical(this, other) || other is PersonStatisticsResponseDto && - other.assets == assets; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (assets.hashCode); - - @override - String toString() => 'PersonStatisticsResponseDto[assets=$assets]'; - - Map toJson() { - final json = {}; - json[r'assets'] = this.assets; - return json; - } - - /// Returns a new [PersonStatisticsResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static PersonStatisticsResponseDto? fromJson(dynamic value) { - upgradeDto(value, "PersonStatisticsResponseDto"); - if (value is Map) { - final json = value.cast(); - - return PersonStatisticsResponseDto( - assets: mapValueOfType(json, r'assets')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = PersonStatisticsResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = PersonStatisticsResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of PersonStatisticsResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = PersonStatisticsResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'assets', - }; -} - diff --git a/mobile/openapi/lib/model/person_update_dto.dart b/mobile/openapi/lib/model/person_update_dto.dart deleted file mode 100644 index 56b99606ee..0000000000 --- a/mobile/openapi/lib/model/person_update_dto.dart +++ /dev/null @@ -1,181 +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 PersonUpdateDto { - /// Returns a new [PersonUpdateDto] instance. - PersonUpdateDto({ - this.birthDate = const Optional.absent(), - this.color = const Optional.absent(), - this.featureFaceAssetId = const Optional.absent(), - this.isFavorite = const Optional.absent(), - this.isHidden = const Optional.absent(), - this.name = const Optional.absent(), - }); - - /// Person date of birth - Optional birthDate; - - /// Person color (hex) - Optional color; - - /// Asset ID used for feature face thumbnail - /// - /// 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. - /// - Optional featureFaceAssetId; - - /// Mark as favorite - /// - /// 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. - /// - Optional isFavorite; - - /// Person visibility (hidden) - /// - /// 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. - /// - Optional isHidden; - - /// Person name - /// - /// 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. - /// - Optional name; - - @override - bool operator ==(Object other) => identical(this, other) || other is PersonUpdateDto && - other.birthDate == birthDate && - other.color == color && - other.featureFaceAssetId == featureFaceAssetId && - other.isFavorite == isFavorite && - other.isHidden == isHidden && - other.name == name; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (birthDate == null ? 0 : birthDate!.hashCode) + - (color == null ? 0 : color!.hashCode) + - (featureFaceAssetId == null ? 0 : featureFaceAssetId!.hashCode) + - (isFavorite == null ? 0 : isFavorite!.hashCode) + - (isHidden == null ? 0 : isHidden!.hashCode) + - (name == null ? 0 : name!.hashCode); - - @override - String toString() => 'PersonUpdateDto[birthDate=$birthDate, color=$color, featureFaceAssetId=$featureFaceAssetId, isFavorite=$isFavorite, isHidden=$isHidden, name=$name]'; - - Map toJson() { - final json = {}; - if (this.birthDate.isPresent) { - final value = this.birthDate.value; - json[r'birthDate'] = value == null ? null : _dateFormatter.format(value.toUtc()); - } - if (this.color.isPresent) { - final value = this.color.value; - json[r'color'] = value; - } - if (this.featureFaceAssetId.isPresent) { - final value = this.featureFaceAssetId.value; - json[r'featureFaceAssetId'] = value; - } - if (this.isFavorite.isPresent) { - final value = this.isFavorite.value; - json[r'isFavorite'] = value; - } - if (this.isHidden.isPresent) { - final value = this.isHidden.value; - json[r'isHidden'] = value; - } - if (this.name.isPresent) { - final value = this.name.value; - json[r'name'] = value; - } - return json; - } - - /// Returns a new [PersonUpdateDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static PersonUpdateDto? fromJson(dynamic value) { - upgradeDto(value, "PersonUpdateDto"); - if (value is Map) { - final json = value.cast(); - - return PersonUpdateDto( - birthDate: json.containsKey(r'birthDate') ? Optional.present(mapDateTime(json, r'birthDate', r'')) : const Optional.absent(), - color: json.containsKey(r'color') ? Optional.present(mapValueOfType(json, r'color')) : const Optional.absent(), - featureFaceAssetId: json.containsKey(r'featureFaceAssetId') ? Optional.present(mapValueOfType(json, r'featureFaceAssetId')) : const Optional.absent(), - isFavorite: json.containsKey(r'isFavorite') ? Optional.present(mapValueOfType(json, r'isFavorite')) : const Optional.absent(), - isHidden: json.containsKey(r'isHidden') ? Optional.present(mapValueOfType(json, r'isHidden')) : const Optional.absent(), - name: json.containsKey(r'name') ? Optional.present(mapValueOfType(json, r'name')) : const Optional.absent(), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = PersonUpdateDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = PersonUpdateDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of PersonUpdateDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = PersonUpdateDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - }; -} - diff --git a/mobile/openapi/lib/model/pin_code_change_dto.dart b/mobile/openapi/lib/model/pin_code_change_dto.dart deleted file mode 100644 index 42c244933f..0000000000 --- a/mobile/openapi/lib/model/pin_code_change_dto.dart +++ /dev/null @@ -1,134 +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 PinCodeChangeDto { - /// Returns a new [PinCodeChangeDto] instance. - PinCodeChangeDto({ - required this.newPinCode, - this.password = const Optional.absent(), - this.pinCode = const Optional.absent(), - }); - - /// New PIN code (4-6 digits) - String newPinCode; - - /// User password (required if PIN code is not provided) - /// - /// 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. - /// - Optional password; - - /// New PIN code (4-6 digits) - /// - /// 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. - /// - Optional pinCode; - - @override - bool operator ==(Object other) => identical(this, other) || other is PinCodeChangeDto && - other.newPinCode == newPinCode && - other.password == password && - other.pinCode == pinCode; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (newPinCode.hashCode) + - (password == null ? 0 : password!.hashCode) + - (pinCode == null ? 0 : pinCode!.hashCode); - - @override - String toString() => 'PinCodeChangeDto[newPinCode=$newPinCode, password=$password, pinCode=$pinCode]'; - - Map toJson() { - final json = {}; - json[r'newPinCode'] = this.newPinCode; - if (this.password.isPresent) { - final value = this.password.value; - json[r'password'] = value; - } - if (this.pinCode.isPresent) { - final value = this.pinCode.value; - json[r'pinCode'] = value; - } - return json; - } - - /// Returns a new [PinCodeChangeDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static PinCodeChangeDto? fromJson(dynamic value) { - upgradeDto(value, "PinCodeChangeDto"); - if (value is Map) { - final json = value.cast(); - - return PinCodeChangeDto( - newPinCode: mapValueOfType(json, r'newPinCode')!, - password: json.containsKey(r'password') ? Optional.present(mapValueOfType(json, r'password')) : const Optional.absent(), - pinCode: json.containsKey(r'pinCode') ? Optional.present(mapValueOfType(json, r'pinCode')) : const Optional.absent(), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = PinCodeChangeDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = PinCodeChangeDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of PinCodeChangeDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = PinCodeChangeDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'newPinCode', - }; -} - diff --git a/mobile/openapi/lib/model/pin_code_reset_dto.dart b/mobile/openapi/lib/model/pin_code_reset_dto.dart deleted file mode 100644 index 04ad61eeeb..0000000000 --- a/mobile/openapi/lib/model/pin_code_reset_dto.dart +++ /dev/null @@ -1,125 +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 PinCodeResetDto { - /// Returns a new [PinCodeResetDto] instance. - PinCodeResetDto({ - this.password = const Optional.absent(), - this.pinCode = const Optional.absent(), - }); - - /// User password (required if PIN code is not provided) - /// - /// 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. - /// - Optional password; - - /// New PIN code (4-6 digits) - /// - /// 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. - /// - Optional pinCode; - - @override - bool operator ==(Object other) => identical(this, other) || other is PinCodeResetDto && - other.password == password && - other.pinCode == pinCode; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (password == null ? 0 : password!.hashCode) + - (pinCode == null ? 0 : pinCode!.hashCode); - - @override - String toString() => 'PinCodeResetDto[password=$password, pinCode=$pinCode]'; - - Map toJson() { - final json = {}; - if (this.password.isPresent) { - final value = this.password.value; - json[r'password'] = value; - } - if (this.pinCode.isPresent) { - final value = this.pinCode.value; - json[r'pinCode'] = value; - } - return json; - } - - /// Returns a new [PinCodeResetDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static PinCodeResetDto? fromJson(dynamic value) { - upgradeDto(value, "PinCodeResetDto"); - if (value is Map) { - final json = value.cast(); - - return PinCodeResetDto( - password: json.containsKey(r'password') ? Optional.present(mapValueOfType(json, r'password')) : const Optional.absent(), - pinCode: json.containsKey(r'pinCode') ? Optional.present(mapValueOfType(json, r'pinCode')) : const Optional.absent(), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = PinCodeResetDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = PinCodeResetDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of PinCodeResetDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = PinCodeResetDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - }; -} - diff --git a/mobile/openapi/lib/model/pin_code_setup_dto.dart b/mobile/openapi/lib/model/pin_code_setup_dto.dart deleted file mode 100644 index e2f08f102b..0000000000 --- a/mobile/openapi/lib/model/pin_code_setup_dto.dart +++ /dev/null @@ -1,100 +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 PinCodeSetupDto { - /// Returns a new [PinCodeSetupDto] instance. - PinCodeSetupDto({ - required this.pinCode, - }); - - /// PIN code (4-6 digits) - String pinCode; - - @override - bool operator ==(Object other) => identical(this, other) || other is PinCodeSetupDto && - other.pinCode == pinCode; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (pinCode.hashCode); - - @override - String toString() => 'PinCodeSetupDto[pinCode=$pinCode]'; - - Map toJson() { - final json = {}; - json[r'pinCode'] = this.pinCode; - return json; - } - - /// Returns a new [PinCodeSetupDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static PinCodeSetupDto? fromJson(dynamic value) { - upgradeDto(value, "PinCodeSetupDto"); - if (value is Map) { - final json = value.cast(); - - return PinCodeSetupDto( - pinCode: mapValueOfType(json, r'pinCode')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = PinCodeSetupDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = PinCodeSetupDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of PinCodeSetupDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = PinCodeSetupDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'pinCode', - }; -} - diff --git a/mobile/openapi/lib/model/places_response_dto.dart b/mobile/openapi/lib/model/places_response_dto.dart deleted file mode 100644 index f222c33dba..0000000000 --- a/mobile/openapi/lib/model/places_response_dto.dart +++ /dev/null @@ -1,152 +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 PlacesResponseDto { - /// Returns a new [PlacesResponseDto] instance. - PlacesResponseDto({ - this.admin1name = const Optional.absent(), - this.admin2name = const Optional.absent(), - required this.latitude, - required this.longitude, - required this.name, - }); - - /// Administrative level 1 name (state/province) - /// - /// 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. - /// - Optional admin1name; - - /// Administrative level 2 name (county/district) - /// - /// 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. - /// - Optional admin2name; - - /// Latitude coordinate - num latitude; - - /// Longitude coordinate - num longitude; - - /// Place name - String name; - - @override - bool operator ==(Object other) => identical(this, other) || other is PlacesResponseDto && - other.admin1name == admin1name && - other.admin2name == admin2name && - other.latitude == latitude && - other.longitude == longitude && - other.name == name; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (admin1name == null ? 0 : admin1name!.hashCode) + - (admin2name == null ? 0 : admin2name!.hashCode) + - (latitude.hashCode) + - (longitude.hashCode) + - (name.hashCode); - - @override - String toString() => 'PlacesResponseDto[admin1name=$admin1name, admin2name=$admin2name, latitude=$latitude, longitude=$longitude, name=$name]'; - - Map toJson() { - final json = {}; - if (this.admin1name.isPresent) { - final value = this.admin1name.value; - json[r'admin1name'] = value; - } - if (this.admin2name.isPresent) { - final value = this.admin2name.value; - json[r'admin2name'] = value; - } - json[r'latitude'] = this.latitude; - json[r'longitude'] = this.longitude; - json[r'name'] = this.name; - return json; - } - - /// Returns a new [PlacesResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static PlacesResponseDto? fromJson(dynamic value) { - upgradeDto(value, "PlacesResponseDto"); - if (value is Map) { - final json = value.cast(); - - return PlacesResponseDto( - admin1name: json.containsKey(r'admin1name') ? Optional.present(mapValueOfType(json, r'admin1name')) : const Optional.absent(), - admin2name: json.containsKey(r'admin2name') ? Optional.present(mapValueOfType(json, r'admin2name')) : const Optional.absent(), - latitude: num.parse('${json[r'latitude']}'), - longitude: num.parse('${json[r'longitude']}'), - name: mapValueOfType(json, r'name')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = PlacesResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = PlacesResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of PlacesResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = PlacesResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'latitude', - 'longitude', - 'name', - }; -} - diff --git a/mobile/openapi/lib/model/plugin_method_response_dto.dart b/mobile/openapi/lib/model/plugin_method_response_dto.dart deleted file mode 100644 index 1d6f9c1331..0000000000 --- a/mobile/openapi/lib/model/plugin_method_response_dto.dart +++ /dev/null @@ -1,171 +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 PluginMethodResponseDto { - /// Returns a new [PluginMethodResponseDto] instance. - PluginMethodResponseDto({ - required this.description, - required this.hostFunctions, - required this.key, - required this.name, - this.schema = const Optional.absent(), - required this.title, - this.types = const [], - this.uiHints = const [], - }); - - /// Description - String description; - - bool hostFunctions; - - /// Key - String key; - - /// Name - String name; - - /// - /// 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. - /// - Optional schema; - - /// Title - String title; - - /// Workflow types - List types; - - /// Ui hints - List uiHints; - - @override - bool operator ==(Object other) => identical(this, other) || other is PluginMethodResponseDto && - other.description == description && - other.hostFunctions == hostFunctions && - other.key == key && - other.name == name && - other.schema == schema && - other.title == title && - _deepEquality.equals(other.types, types) && - _deepEquality.equals(other.uiHints, uiHints); - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (description.hashCode) + - (hostFunctions.hashCode) + - (key.hashCode) + - (name.hashCode) + - (schema == null ? 0 : schema!.hashCode) + - (title.hashCode) + - (types.hashCode) + - (uiHints.hashCode); - - @override - String toString() => 'PluginMethodResponseDto[description=$description, hostFunctions=$hostFunctions, key=$key, name=$name, schema=$schema, title=$title, types=$types, uiHints=$uiHints]'; - - Map toJson() { - final json = {}; - json[r'description'] = this.description; - json[r'hostFunctions'] = this.hostFunctions; - json[r'key'] = this.key; - json[r'name'] = this.name; - if (this.schema.isPresent) { - final value = this.schema.value; - json[r'schema'] = value; - } - json[r'title'] = this.title; - json[r'types'] = this.types; - json[r'uiHints'] = this.uiHints; - return json; - } - - /// Returns a new [PluginMethodResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static PluginMethodResponseDto? fromJson(dynamic value) { - upgradeDto(value, "PluginMethodResponseDto"); - if (value is Map) { - final json = value.cast(); - - return PluginMethodResponseDto( - description: mapValueOfType(json, r'description')!, - hostFunctions: mapValueOfType(json, r'hostFunctions')!, - key: mapValueOfType(json, r'key')!, - name: mapValueOfType(json, r'name')!, - schema: json.containsKey(r'schema') ? Optional.present(mapValueOfType(json, r'schema')) : const Optional.absent(), - title: mapValueOfType(json, r'title')!, - types: WorkflowType.listFromJson(json[r'types']), - uiHints: json[r'uiHints'] is Iterable - ? (json[r'uiHints'] as Iterable).cast().toList(growable: false) - : const [], - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = PluginMethodResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = PluginMethodResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of PluginMethodResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = PluginMethodResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'description', - 'hostFunctions', - 'key', - 'name', - 'title', - 'types', - 'uiHints', - }; -} - diff --git a/mobile/openapi/lib/model/plugin_response_dto.dart b/mobile/openapi/lib/model/plugin_response_dto.dart deleted file mode 100644 index 1bdb366f9e..0000000000 --- a/mobile/openapi/lib/model/plugin_response_dto.dart +++ /dev/null @@ -1,172 +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 PluginResponseDto { - /// Returns a new [PluginResponseDto] instance. - PluginResponseDto({ - required this.author, - required this.createdAt, - required this.description, - required this.id, - this.methods = const [], - required this.name, - required this.title, - required this.updatedAt, - required this.version, - }); - - /// Plugin author - String author; - - /// Creation date - String createdAt; - - /// Plugin description - String description; - - /// Plugin ID - String id; - - /// Plugin methods - List methods; - - /// Plugin name - String name; - - /// Plugin title - String title; - - /// Last update date - String updatedAt; - - /// Plugin version - String version; - - @override - bool operator ==(Object other) => identical(this, other) || other is PluginResponseDto && - other.author == author && - other.createdAt == createdAt && - other.description == description && - other.id == id && - _deepEquality.equals(other.methods, methods) && - other.name == name && - other.title == title && - other.updatedAt == updatedAt && - other.version == version; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (author.hashCode) + - (createdAt.hashCode) + - (description.hashCode) + - (id.hashCode) + - (methods.hashCode) + - (name.hashCode) + - (title.hashCode) + - (updatedAt.hashCode) + - (version.hashCode); - - @override - String toString() => 'PluginResponseDto[author=$author, createdAt=$createdAt, description=$description, id=$id, methods=$methods, name=$name, title=$title, updatedAt=$updatedAt, version=$version]'; - - Map toJson() { - final json = {}; - json[r'author'] = this.author; - json[r'createdAt'] = this.createdAt; - json[r'description'] = this.description; - json[r'id'] = this.id; - json[r'methods'] = this.methods; - json[r'name'] = this.name; - json[r'title'] = this.title; - json[r'updatedAt'] = this.updatedAt; - json[r'version'] = this.version; - return json; - } - - /// Returns a new [PluginResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static PluginResponseDto? fromJson(dynamic value) { - upgradeDto(value, "PluginResponseDto"); - if (value is Map) { - final json = value.cast(); - - return PluginResponseDto( - author: mapValueOfType(json, r'author')!, - createdAt: mapValueOfType(json, r'createdAt')!, - description: mapValueOfType(json, r'description')!, - id: mapValueOfType(json, r'id')!, - methods: PluginMethodResponseDto.listFromJson(json[r'methods']), - name: mapValueOfType(json, r'name')!, - title: mapValueOfType(json, r'title')!, - updatedAt: mapValueOfType(json, r'updatedAt')!, - version: mapValueOfType(json, r'version')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = PluginResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = PluginResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of PluginResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = PluginResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'author', - 'createdAt', - 'description', - 'id', - 'methods', - 'name', - 'title', - 'updatedAt', - 'version', - }; -} - diff --git a/mobile/openapi/lib/model/plugin_template_response_dto.dart b/mobile/openapi/lib/model/plugin_template_response_dto.dart deleted file mode 100644 index 9f54753f49..0000000000 --- a/mobile/openapi/lib/model/plugin_template_response_dto.dart +++ /dev/null @@ -1,146 +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 PluginTemplateResponseDto { - /// Returns a new [PluginTemplateResponseDto] instance. - PluginTemplateResponseDto({ - required this.description, - required this.key, - this.steps = const [], - required this.title, - required this.trigger, - this.uiHints = const [], - }); - - /// Template description - String description; - - /// Template key (unique across all templates) - String key; - - /// Workflow steps - List steps; - - /// Template title - String title; - - WorkflowTrigger trigger; - - /// Ui hints, for example \"smart-album\" - List uiHints; - - @override - bool operator ==(Object other) => identical(this, other) || other is PluginTemplateResponseDto && - other.description == description && - other.key == key && - _deepEquality.equals(other.steps, steps) && - other.title == title && - other.trigger == trigger && - _deepEquality.equals(other.uiHints, uiHints); - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (description.hashCode) + - (key.hashCode) + - (steps.hashCode) + - (title.hashCode) + - (trigger.hashCode) + - (uiHints.hashCode); - - @override - String toString() => 'PluginTemplateResponseDto[description=$description, key=$key, steps=$steps, title=$title, trigger=$trigger, uiHints=$uiHints]'; - - Map toJson() { - final json = {}; - json[r'description'] = this.description; - json[r'key'] = this.key; - json[r'steps'] = this.steps; - json[r'title'] = this.title; - json[r'trigger'] = this.trigger; - json[r'uiHints'] = this.uiHints; - return json; - } - - /// Returns a new [PluginTemplateResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static PluginTemplateResponseDto? fromJson(dynamic value) { - upgradeDto(value, "PluginTemplateResponseDto"); - if (value is Map) { - final json = value.cast(); - - return PluginTemplateResponseDto( - description: mapValueOfType(json, r'description')!, - key: mapValueOfType(json, r'key')!, - steps: PluginTemplateStepResponseDto.listFromJson(json[r'steps']), - title: mapValueOfType(json, r'title')!, - trigger: WorkflowTrigger.fromJson(json[r'trigger'])!, - uiHints: json[r'uiHints'] is Iterable - ? (json[r'uiHints'] as Iterable).cast().toList(growable: false) - : const [], - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = PluginTemplateResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = PluginTemplateResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of PluginTemplateResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = PluginTemplateResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'description', - 'key', - 'steps', - 'title', - 'trigger', - 'uiHints', - }; -} - diff --git a/mobile/openapi/lib/model/plugin_template_step_response_dto.dart b/mobile/openapi/lib/model/plugin_template_step_response_dto.dart deleted file mode 100644 index 3e82c029d2..0000000000 --- a/mobile/openapi/lib/model/plugin_template_step_response_dto.dart +++ /dev/null @@ -1,130 +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 PluginTemplateStepResponseDto { - /// Returns a new [PluginTemplateStepResponseDto] instance. - PluginTemplateStepResponseDto({ - this.config = const {}, - this.enabled = const Optional.absent(), - required this.method, - }); - - /// Step configuration - Map? config; - - /// Whether the step is enabled - /// - /// 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. - /// - Optional enabled; - - /// Step plugin method - String method; - - @override - bool operator ==(Object other) => identical(this, other) || other is PluginTemplateStepResponseDto && - _deepEquality.equals(other.config, config) && - other.enabled == enabled && - other.method == method; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (config == null ? 0 : config!.hashCode) + - (enabled == null ? 0 : enabled!.hashCode) + - (method.hashCode); - - @override - String toString() => 'PluginTemplateStepResponseDto[config=$config, enabled=$enabled, method=$method]'; - - Map toJson() { - final json = {}; - if (this.config != null) { - json[r'config'] = this.config; - } else { - json[r'config'] = null; - } - if (this.enabled.isPresent) { - final value = this.enabled.value; - json[r'enabled'] = value; - } - json[r'method'] = this.method; - return json; - } - - /// Returns a new [PluginTemplateStepResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static PluginTemplateStepResponseDto? fromJson(dynamic value) { - upgradeDto(value, "PluginTemplateStepResponseDto"); - if (value is Map) { - final json = value.cast(); - - return PluginTemplateStepResponseDto( - config: mapCastOfType(json, r'config'), - enabled: json.containsKey(r'enabled') ? Optional.present(mapValueOfType(json, r'enabled')) : const Optional.absent(), - method: mapValueOfType(json, r'method')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = PluginTemplateStepResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = PluginTemplateStepResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of PluginTemplateStepResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = PluginTemplateStepResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'config', - 'method', - }; -} - diff --git a/mobile/openapi/lib/model/purchase_response.dart b/mobile/openapi/lib/model/purchase_response.dart deleted file mode 100644 index e55c286629..0000000000 --- a/mobile/openapi/lib/model/purchase_response.dart +++ /dev/null @@ -1,109 +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 PurchaseResponse { - /// Returns a new [PurchaseResponse] instance. - PurchaseResponse({ - required this.hideBuyButtonUntil, - required this.showSupportBadge, - }); - - /// Date until which to hide buy button - String hideBuyButtonUntil; - - /// Whether to show support badge - bool showSupportBadge; - - @override - bool operator ==(Object other) => identical(this, other) || other is PurchaseResponse && - other.hideBuyButtonUntil == hideBuyButtonUntil && - other.showSupportBadge == showSupportBadge; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (hideBuyButtonUntil.hashCode) + - (showSupportBadge.hashCode); - - @override - String toString() => 'PurchaseResponse[hideBuyButtonUntil=$hideBuyButtonUntil, showSupportBadge=$showSupportBadge]'; - - Map toJson() { - final json = {}; - json[r'hideBuyButtonUntil'] = this.hideBuyButtonUntil; - json[r'showSupportBadge'] = this.showSupportBadge; - return json; - } - - /// Returns a new [PurchaseResponse] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static PurchaseResponse? fromJson(dynamic value) { - upgradeDto(value, "PurchaseResponse"); - if (value is Map) { - final json = value.cast(); - - return PurchaseResponse( - hideBuyButtonUntil: mapValueOfType(json, r'hideBuyButtonUntil')!, - showSupportBadge: mapValueOfType(json, r'showSupportBadge')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = PurchaseResponse.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = PurchaseResponse.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of PurchaseResponse-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = PurchaseResponse.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'hideBuyButtonUntil', - 'showSupportBadge', - }; -} - diff --git a/mobile/openapi/lib/model/purchase_update.dart b/mobile/openapi/lib/model/purchase_update.dart deleted file mode 100644 index 8a0fb0d1b6..0000000000 --- a/mobile/openapi/lib/model/purchase_update.dart +++ /dev/null @@ -1,125 +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 PurchaseUpdate { - /// Returns a new [PurchaseUpdate] instance. - PurchaseUpdate({ - this.hideBuyButtonUntil = const Optional.absent(), - this.showSupportBadge = const Optional.absent(), - }); - - /// Date until which to hide buy button - /// - /// 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. - /// - Optional hideBuyButtonUntil; - - /// Whether to show support badge - /// - /// 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. - /// - Optional showSupportBadge; - - @override - bool operator ==(Object other) => identical(this, other) || other is PurchaseUpdate && - other.hideBuyButtonUntil == hideBuyButtonUntil && - other.showSupportBadge == showSupportBadge; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (hideBuyButtonUntil == null ? 0 : hideBuyButtonUntil!.hashCode) + - (showSupportBadge == null ? 0 : showSupportBadge!.hashCode); - - @override - String toString() => 'PurchaseUpdate[hideBuyButtonUntil=$hideBuyButtonUntil, showSupportBadge=$showSupportBadge]'; - - Map toJson() { - final json = {}; - if (this.hideBuyButtonUntil.isPresent) { - final value = this.hideBuyButtonUntil.value; - json[r'hideBuyButtonUntil'] = value; - } - if (this.showSupportBadge.isPresent) { - final value = this.showSupportBadge.value; - json[r'showSupportBadge'] = value; - } - return json; - } - - /// Returns a new [PurchaseUpdate] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static PurchaseUpdate? fromJson(dynamic value) { - upgradeDto(value, "PurchaseUpdate"); - if (value is Map) { - final json = value.cast(); - - return PurchaseUpdate( - hideBuyButtonUntil: json.containsKey(r'hideBuyButtonUntil') ? Optional.present(mapValueOfType(json, r'hideBuyButtonUntil')) : const Optional.absent(), - showSupportBadge: json.containsKey(r'showSupportBadge') ? Optional.present(mapValueOfType(json, r'showSupportBadge')) : const Optional.absent(), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = PurchaseUpdate.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = PurchaseUpdate.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of PurchaseUpdate-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = PurchaseUpdate.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - }; -} - diff --git a/mobile/openapi/lib/model/queue_command.dart b/mobile/openapi/lib/model/queue_command.dart deleted file mode 100644 index 3cf689a02d..0000000000 --- a/mobile/openapi/lib/model/queue_command.dart +++ /dev/null @@ -1,94 +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; - -/// Queue command to execute -class QueueCommand { - /// Instantiate a new enum with the provided [value]. - const QueueCommand._(this.value); - - /// The underlying value of this enum member. - final String value; - - @override - String toString() => value; - - String toJson() => value; - - static const start = QueueCommand._(r'start'); - static const pause = QueueCommand._(r'pause'); - static const resume = QueueCommand._(r'resume'); - static const empty = QueueCommand._(r'empty'); - static const clearFailed = QueueCommand._(r'clear-failed'); - - /// List of all possible values in this [enum][QueueCommand]. - static const values = [ - start, - pause, - resume, - empty, - clearFailed, - ]; - - static QueueCommand? fromJson(dynamic value) => QueueCommandTypeTransformer().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 = QueueCommand.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } -} - -/// Transformation class that can [encode] an instance of [QueueCommand] to String, -/// and [decode] dynamic data back to [QueueCommand]. -class QueueCommandTypeTransformer { - factory QueueCommandTypeTransformer() => _instance ??= const QueueCommandTypeTransformer._(); - - const QueueCommandTypeTransformer._(); - - String encode(QueueCommand data) => data.value; - - /// Decodes a [dynamic value][data] to a QueueCommand. - /// - /// 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. - QueueCommand? decode(dynamic data, {bool allowNull = true}) { - if (data != null) { - switch (data) { - case r'start': return QueueCommand.start; - case r'pause': return QueueCommand.pause; - case r'resume': return QueueCommand.resume; - case r'empty': return QueueCommand.empty; - case r'clear-failed': return QueueCommand.clearFailed; - default: - if (!allowNull) { - throw ArgumentError('Unknown enum value to decode: $data'); - } - } - } - return null; - } - - /// Singleton [QueueCommandTypeTransformer] instance. - static QueueCommandTypeTransformer? _instance; -} - diff --git a/mobile/openapi/lib/model/queue_command_dto.dart b/mobile/openapi/lib/model/queue_command_dto.dart deleted file mode 100644 index e8a600923f..0000000000 --- a/mobile/openapi/lib/model/queue_command_dto.dart +++ /dev/null @@ -1,116 +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 QueueCommandDto { - /// Returns a new [QueueCommandDto] instance. - QueueCommandDto({ - required this.command, - this.force = const Optional.absent(), - }); - - QueueCommand command; - - /// Force the command execution (if applicable) - /// - /// 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. - /// - Optional force; - - @override - bool operator ==(Object other) => identical(this, other) || other is QueueCommandDto && - other.command == command && - other.force == force; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (command.hashCode) + - (force == null ? 0 : force!.hashCode); - - @override - String toString() => 'QueueCommandDto[command=$command, force=$force]'; - - Map toJson() { - final json = {}; - json[r'command'] = this.command; - if (this.force.isPresent) { - final value = this.force.value; - json[r'force'] = value; - } - return json; - } - - /// Returns a new [QueueCommandDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static QueueCommandDto? fromJson(dynamic value) { - upgradeDto(value, "QueueCommandDto"); - if (value is Map) { - final json = value.cast(); - - return QueueCommandDto( - command: QueueCommand.fromJson(json[r'command'])!, - force: json.containsKey(r'force') ? Optional.present(mapValueOfType(json, r'force')) : const Optional.absent(), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = QueueCommandDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = QueueCommandDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of QueueCommandDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = QueueCommandDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'command', - }; -} - diff --git a/mobile/openapi/lib/model/queue_delete_dto.dart b/mobile/openapi/lib/model/queue_delete_dto.dart deleted file mode 100644 index 9511313f01..0000000000 --- a/mobile/openapi/lib/model/queue_delete_dto.dart +++ /dev/null @@ -1,108 +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 QueueDeleteDto { - /// Returns a new [QueueDeleteDto] instance. - QueueDeleteDto({ - this.failed = const Optional.absent(), - }); - - /// If true, will also remove failed jobs from the queue. - /// - /// 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. - /// - Optional failed; - - @override - bool operator ==(Object other) => identical(this, other) || other is QueueDeleteDto && - other.failed == failed; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (failed == null ? 0 : failed!.hashCode); - - @override - String toString() => 'QueueDeleteDto[failed=$failed]'; - - Map toJson() { - final json = {}; - if (this.failed.isPresent) { - final value = this.failed.value; - json[r'failed'] = value; - } - return json; - } - - /// Returns a new [QueueDeleteDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static QueueDeleteDto? fromJson(dynamic value) { - upgradeDto(value, "QueueDeleteDto"); - if (value is Map) { - final json = value.cast(); - - return QueueDeleteDto( - failed: json.containsKey(r'failed') ? Optional.present(mapValueOfType(json, r'failed')) : const Optional.absent(), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = QueueDeleteDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = QueueDeleteDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of QueueDeleteDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = QueueDeleteDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - }; -} - diff --git a/mobile/openapi/lib/model/queue_job_response_dto.dart b/mobile/openapi/lib/model/queue_job_response_dto.dart deleted file mode 100644 index ca26361a3e..0000000000 --- a/mobile/openapi/lib/model/queue_job_response_dto.dart +++ /dev/null @@ -1,137 +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 QueueJobResponseDto { - /// Returns a new [QueueJobResponseDto] instance. - QueueJobResponseDto({ - this.data = const {}, - this.id = const Optional.absent(), - required this.name, - required this.timestamp, - }); - - /// Job data payload - Map data; - - /// Job ID - /// - /// 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. - /// - Optional id; - - JobName name; - - /// Job creation timestamp - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int timestamp; - - @override - bool operator ==(Object other) => identical(this, other) || other is QueueJobResponseDto && - _deepEquality.equals(other.data, data) && - other.id == id && - other.name == name && - other.timestamp == timestamp; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (data.hashCode) + - (id == null ? 0 : id!.hashCode) + - (name.hashCode) + - (timestamp.hashCode); - - @override - String toString() => 'QueueJobResponseDto[data=$data, id=$id, name=$name, timestamp=$timestamp]'; - - Map toJson() { - final json = {}; - json[r'data'] = this.data; - if (this.id.isPresent) { - final value = this.id.value; - json[r'id'] = value; - } - json[r'name'] = this.name; - json[r'timestamp'] = this.timestamp; - return json; - } - - /// Returns a new [QueueJobResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static QueueJobResponseDto? fromJson(dynamic value) { - upgradeDto(value, "QueueJobResponseDto"); - if (value is Map) { - final json = value.cast(); - - return QueueJobResponseDto( - data: mapCastOfType(json, r'data')!, - id: json.containsKey(r'id') ? Optional.present(mapValueOfType(json, r'id')) : const Optional.absent(), - name: JobName.fromJson(json[r'name'])!, - timestamp: mapValueOfType(json, r'timestamp')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = QueueJobResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = QueueJobResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of QueueJobResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = QueueJobResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'data', - 'name', - 'timestamp', - }; -} - diff --git a/mobile/openapi/lib/model/queue_job_status.dart b/mobile/openapi/lib/model/queue_job_status.dart deleted file mode 100644 index cbd01b11ed..0000000000 --- a/mobile/openapi/lib/model/queue_job_status.dart +++ /dev/null @@ -1,97 +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; - -/// Queue job status -class QueueJobStatus { - /// Instantiate a new enum with the provided [value]. - const QueueJobStatus._(this.value); - - /// The underlying value of this enum member. - final String value; - - @override - String toString() => value; - - String toJson() => value; - - static const active = QueueJobStatus._(r'active'); - static const failed = QueueJobStatus._(r'failed'); - static const completed = QueueJobStatus._(r'completed'); - static const delayed = QueueJobStatus._(r'delayed'); - static const waiting = QueueJobStatus._(r'waiting'); - static const paused = QueueJobStatus._(r'paused'); - - /// List of all possible values in this [enum][QueueJobStatus]. - static const values = [ - active, - failed, - completed, - delayed, - waiting, - paused, - ]; - - static QueueJobStatus? fromJson(dynamic value) => QueueJobStatusTypeTransformer().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 = QueueJobStatus.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } -} - -/// Transformation class that can [encode] an instance of [QueueJobStatus] to String, -/// and [decode] dynamic data back to [QueueJobStatus]. -class QueueJobStatusTypeTransformer { - factory QueueJobStatusTypeTransformer() => _instance ??= const QueueJobStatusTypeTransformer._(); - - const QueueJobStatusTypeTransformer._(); - - String encode(QueueJobStatus data) => data.value; - - /// Decodes a [dynamic value][data] to a QueueJobStatus. - /// - /// 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. - QueueJobStatus? decode(dynamic data, {bool allowNull = true}) { - if (data != null) { - switch (data) { - case r'active': return QueueJobStatus.active; - case r'failed': return QueueJobStatus.failed; - case r'completed': return QueueJobStatus.completed; - case r'delayed': return QueueJobStatus.delayed; - case r'waiting': return QueueJobStatus.waiting; - case r'paused': return QueueJobStatus.paused; - default: - if (!allowNull) { - throw ArgumentError('Unknown enum value to decode: $data'); - } - } - } - return null; - } - - /// Singleton [QueueJobStatusTypeTransformer] instance. - static QueueJobStatusTypeTransformer? _instance; -} - diff --git a/mobile/openapi/lib/model/queue_name.dart b/mobile/openapi/lib/model/queue_name.dart deleted file mode 100644 index e9ecfcdd84..0000000000 --- a/mobile/openapi/lib/model/queue_name.dart +++ /dev/null @@ -1,136 +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; - -/// Queue name -class QueueName { - /// Instantiate a new enum with the provided [value]. - const QueueName._(this.value); - - /// The underlying value of this enum member. - final String value; - - @override - String toString() => value; - - String toJson() => value; - - static const thumbnailGeneration = QueueName._(r'thumbnailGeneration'); - static const metadataExtraction = QueueName._(r'metadataExtraction'); - static const videoConversion = QueueName._(r'videoConversion'); - static const faceDetection = QueueName._(r'faceDetection'); - static const facialRecognition = QueueName._(r'facialRecognition'); - static const smartSearch = QueueName._(r'smartSearch'); - static const duplicateDetection = QueueName._(r'duplicateDetection'); - static const backgroundTask = QueueName._(r'backgroundTask'); - static const storageTemplateMigration = QueueName._(r'storageTemplateMigration'); - static const migration = QueueName._(r'migration'); - static const search = QueueName._(r'search'); - static const sidecar = QueueName._(r'sidecar'); - static const library_ = QueueName._(r'library'); - static const notifications = QueueName._(r'notifications'); - static const backupDatabase = QueueName._(r'backupDatabase'); - static const ocr = QueueName._(r'ocr'); - static const workflow = QueueName._(r'workflow'); - static const integrityCheck = QueueName._(r'integrityCheck'); - static const editor = QueueName._(r'editor'); - - /// List of all possible values in this [enum][QueueName]. - static const values = [ - thumbnailGeneration, - metadataExtraction, - videoConversion, - faceDetection, - facialRecognition, - smartSearch, - duplicateDetection, - backgroundTask, - storageTemplateMigration, - migration, - search, - sidecar, - library_, - notifications, - backupDatabase, - ocr, - workflow, - integrityCheck, - editor, - ]; - - static QueueName? fromJson(dynamic value) => QueueNameTypeTransformer().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 = QueueName.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } -} - -/// Transformation class that can [encode] an instance of [QueueName] to String, -/// and [decode] dynamic data back to [QueueName]. -class QueueNameTypeTransformer { - factory QueueNameTypeTransformer() => _instance ??= const QueueNameTypeTransformer._(); - - const QueueNameTypeTransformer._(); - - String encode(QueueName data) => data.value; - - /// Decodes a [dynamic value][data] to a QueueName. - /// - /// 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. - QueueName? decode(dynamic data, {bool allowNull = true}) { - if (data != null) { - switch (data) { - case r'thumbnailGeneration': return QueueName.thumbnailGeneration; - case r'metadataExtraction': return QueueName.metadataExtraction; - case r'videoConversion': return QueueName.videoConversion; - case r'faceDetection': return QueueName.faceDetection; - case r'facialRecognition': return QueueName.facialRecognition; - case r'smartSearch': return QueueName.smartSearch; - case r'duplicateDetection': return QueueName.duplicateDetection; - case r'backgroundTask': return QueueName.backgroundTask; - case r'storageTemplateMigration': return QueueName.storageTemplateMigration; - case r'migration': return QueueName.migration; - case r'search': return QueueName.search; - case r'sidecar': return QueueName.sidecar; - case r'library': return QueueName.library_; - case r'notifications': return QueueName.notifications; - case r'backupDatabase': return QueueName.backupDatabase; - case r'ocr': return QueueName.ocr; - case r'workflow': return QueueName.workflow; - case r'integrityCheck': return QueueName.integrityCheck; - case r'editor': return QueueName.editor; - default: - if (!allowNull) { - throw ArgumentError('Unknown enum value to decode: $data'); - } - } - } - return null; - } - - /// Singleton [QueueNameTypeTransformer] instance. - static QueueNameTypeTransformer? _instance; -} - diff --git a/mobile/openapi/lib/model/queue_response_dto.dart b/mobile/openapi/lib/model/queue_response_dto.dart deleted file mode 100644 index c88f9fc195..0000000000 --- a/mobile/openapi/lib/model/queue_response_dto.dart +++ /dev/null @@ -1,116 +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 QueueResponseDto { - /// Returns a new [QueueResponseDto] instance. - QueueResponseDto({ - required this.isPaused, - required this.name, - required this.statistics, - }); - - /// Whether the queue is paused - bool isPaused; - - QueueName name; - - QueueStatisticsDto statistics; - - @override - bool operator ==(Object other) => identical(this, other) || other is QueueResponseDto && - other.isPaused == isPaused && - other.name == name && - other.statistics == statistics; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (isPaused.hashCode) + - (name.hashCode) + - (statistics.hashCode); - - @override - String toString() => 'QueueResponseDto[isPaused=$isPaused, name=$name, statistics=$statistics]'; - - Map toJson() { - final json = {}; - json[r'isPaused'] = this.isPaused; - json[r'name'] = this.name; - json[r'statistics'] = this.statistics; - return json; - } - - /// Returns a new [QueueResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static QueueResponseDto? fromJson(dynamic value) { - upgradeDto(value, "QueueResponseDto"); - if (value is Map) { - final json = value.cast(); - - return QueueResponseDto( - isPaused: mapValueOfType(json, r'isPaused')!, - name: QueueName.fromJson(json[r'name'])!, - statistics: QueueStatisticsDto.fromJson(json[r'statistics'])!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = QueueResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = QueueResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of QueueResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = QueueResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'isPaused', - 'name', - 'statistics', - }; -} - diff --git a/mobile/openapi/lib/model/queue_response_legacy_dto.dart b/mobile/openapi/lib/model/queue_response_legacy_dto.dart deleted file mode 100644 index 214b0b31f6..0000000000 --- a/mobile/openapi/lib/model/queue_response_legacy_dto.dart +++ /dev/null @@ -1,107 +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 QueueResponseLegacyDto { - /// Returns a new [QueueResponseLegacyDto] instance. - QueueResponseLegacyDto({ - required this.jobCounts, - required this.queueStatus, - }); - - QueueStatisticsDto jobCounts; - - QueueStatusLegacyDto queueStatus; - - @override - bool operator ==(Object other) => identical(this, other) || other is QueueResponseLegacyDto && - other.jobCounts == jobCounts && - other.queueStatus == queueStatus; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (jobCounts.hashCode) + - (queueStatus.hashCode); - - @override - String toString() => 'QueueResponseLegacyDto[jobCounts=$jobCounts, queueStatus=$queueStatus]'; - - Map toJson() { - final json = {}; - json[r'jobCounts'] = this.jobCounts; - json[r'queueStatus'] = this.queueStatus; - return json; - } - - /// Returns a new [QueueResponseLegacyDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static QueueResponseLegacyDto? fromJson(dynamic value) { - upgradeDto(value, "QueueResponseLegacyDto"); - if (value is Map) { - final json = value.cast(); - - return QueueResponseLegacyDto( - jobCounts: QueueStatisticsDto.fromJson(json[r'jobCounts'])!, - queueStatus: QueueStatusLegacyDto.fromJson(json[r'queueStatus'])!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = QueueResponseLegacyDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = QueueResponseLegacyDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of QueueResponseLegacyDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = QueueResponseLegacyDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'jobCounts', - 'queueStatus', - }; -} - diff --git a/mobile/openapi/lib/model/queue_statistics_dto.dart b/mobile/openapi/lib/model/queue_statistics_dto.dart deleted file mode 100644 index 86c75f8e7c..0000000000 --- a/mobile/openapi/lib/model/queue_statistics_dto.dart +++ /dev/null @@ -1,163 +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 QueueStatisticsDto { - /// Returns a new [QueueStatisticsDto] instance. - QueueStatisticsDto({ - required this.active, - required this.completed, - required this.delayed, - required this.failed, - required this.paused, - required this.waiting, - }); - - /// Number of active jobs - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int active; - - /// Number of completed jobs - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int completed; - - /// Number of delayed jobs - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int delayed; - - /// Number of failed jobs - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int failed; - - /// Number of paused jobs - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int paused; - - /// Number of waiting jobs - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int waiting; - - @override - bool operator ==(Object other) => identical(this, other) || other is QueueStatisticsDto && - other.active == active && - other.completed == completed && - other.delayed == delayed && - other.failed == failed && - other.paused == paused && - other.waiting == waiting; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (active.hashCode) + - (completed.hashCode) + - (delayed.hashCode) + - (failed.hashCode) + - (paused.hashCode) + - (waiting.hashCode); - - @override - String toString() => 'QueueStatisticsDto[active=$active, completed=$completed, delayed=$delayed, failed=$failed, paused=$paused, waiting=$waiting]'; - - Map toJson() { - final json = {}; - json[r'active'] = this.active; - json[r'completed'] = this.completed; - json[r'delayed'] = this.delayed; - json[r'failed'] = this.failed; - json[r'paused'] = this.paused; - json[r'waiting'] = this.waiting; - return json; - } - - /// Returns a new [QueueStatisticsDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static QueueStatisticsDto? fromJson(dynamic value) { - upgradeDto(value, "QueueStatisticsDto"); - if (value is Map) { - final json = value.cast(); - - return QueueStatisticsDto( - active: mapValueOfType(json, r'active')!, - completed: mapValueOfType(json, r'completed')!, - delayed: mapValueOfType(json, r'delayed')!, - failed: mapValueOfType(json, r'failed')!, - paused: mapValueOfType(json, r'paused')!, - waiting: mapValueOfType(json, r'waiting')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = QueueStatisticsDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = QueueStatisticsDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of QueueStatisticsDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = QueueStatisticsDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'active', - 'completed', - 'delayed', - 'failed', - 'paused', - 'waiting', - }; -} - diff --git a/mobile/openapi/lib/model/queue_status_legacy_dto.dart b/mobile/openapi/lib/model/queue_status_legacy_dto.dart deleted file mode 100644 index de6ce63319..0000000000 --- a/mobile/openapi/lib/model/queue_status_legacy_dto.dart +++ /dev/null @@ -1,109 +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 QueueStatusLegacyDto { - /// Returns a new [QueueStatusLegacyDto] instance. - QueueStatusLegacyDto({ - required this.isActive, - required this.isPaused, - }); - - /// Whether the queue is currently active (has running jobs) - bool isActive; - - /// Whether the queue is paused - bool isPaused; - - @override - bool operator ==(Object other) => identical(this, other) || other is QueueStatusLegacyDto && - other.isActive == isActive && - other.isPaused == isPaused; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (isActive.hashCode) + - (isPaused.hashCode); - - @override - String toString() => 'QueueStatusLegacyDto[isActive=$isActive, isPaused=$isPaused]'; - - Map toJson() { - final json = {}; - json[r'isActive'] = this.isActive; - json[r'isPaused'] = this.isPaused; - return json; - } - - /// Returns a new [QueueStatusLegacyDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static QueueStatusLegacyDto? fromJson(dynamic value) { - upgradeDto(value, "QueueStatusLegacyDto"); - if (value is Map) { - final json = value.cast(); - - return QueueStatusLegacyDto( - isActive: mapValueOfType(json, r'isActive')!, - isPaused: mapValueOfType(json, r'isPaused')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = QueueStatusLegacyDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = QueueStatusLegacyDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of QueueStatusLegacyDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = QueueStatusLegacyDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'isActive', - 'isPaused', - }; -} - diff --git a/mobile/openapi/lib/model/queue_update_dto.dart b/mobile/openapi/lib/model/queue_update_dto.dart deleted file mode 100644 index 189fc219f1..0000000000 --- a/mobile/openapi/lib/model/queue_update_dto.dart +++ /dev/null @@ -1,108 +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 QueueUpdateDto { - /// Returns a new [QueueUpdateDto] instance. - QueueUpdateDto({ - this.isPaused = const Optional.absent(), - }); - - /// Whether to pause the queue - /// - /// 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. - /// - Optional isPaused; - - @override - bool operator ==(Object other) => identical(this, other) || other is QueueUpdateDto && - other.isPaused == isPaused; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (isPaused == null ? 0 : isPaused!.hashCode); - - @override - String toString() => 'QueueUpdateDto[isPaused=$isPaused]'; - - Map toJson() { - final json = {}; - if (this.isPaused.isPresent) { - final value = this.isPaused.value; - json[r'isPaused'] = value; - } - return json; - } - - /// Returns a new [QueueUpdateDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static QueueUpdateDto? fromJson(dynamic value) { - upgradeDto(value, "QueueUpdateDto"); - if (value is Map) { - final json = value.cast(); - - return QueueUpdateDto( - isPaused: json.containsKey(r'isPaused') ? Optional.present(mapValueOfType(json, r'isPaused')) : const Optional.absent(), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = QueueUpdateDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = QueueUpdateDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of QueueUpdateDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = QueueUpdateDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - }; -} - diff --git a/mobile/openapi/lib/model/queues_response_legacy_dto.dart b/mobile/openapi/lib/model/queues_response_legacy_dto.dart deleted file mode 100644 index 80e74b9c41..0000000000 --- a/mobile/openapi/lib/model/queues_response_legacy_dto.dart +++ /dev/null @@ -1,243 +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 QueuesResponseLegacyDto { - /// Returns a new [QueuesResponseLegacyDto] instance. - QueuesResponseLegacyDto({ - required this.backgroundTask, - required this.backupDatabase, - required this.duplicateDetection, - required this.editor, - required this.faceDetection, - required this.facialRecognition, - required this.integrityCheck, - required this.library_, - required this.metadataExtraction, - required this.migration, - required this.notifications, - required this.ocr, - required this.search, - required this.sidecar, - required this.smartSearch, - required this.storageTemplateMigration, - required this.thumbnailGeneration, - required this.videoConversion, - required this.workflow, - }); - - QueueResponseLegacyDto backgroundTask; - - QueueResponseLegacyDto backupDatabase; - - QueueResponseLegacyDto duplicateDetection; - - QueueResponseLegacyDto editor; - - QueueResponseLegacyDto faceDetection; - - QueueResponseLegacyDto facialRecognition; - - QueueResponseLegacyDto integrityCheck; - - QueueResponseLegacyDto library_; - - QueueResponseLegacyDto metadataExtraction; - - QueueResponseLegacyDto migration; - - QueueResponseLegacyDto notifications; - - QueueResponseLegacyDto ocr; - - QueueResponseLegacyDto search; - - QueueResponseLegacyDto sidecar; - - QueueResponseLegacyDto smartSearch; - - QueueResponseLegacyDto storageTemplateMigration; - - QueueResponseLegacyDto thumbnailGeneration; - - QueueResponseLegacyDto videoConversion; - - QueueResponseLegacyDto workflow; - - @override - bool operator ==(Object other) => identical(this, other) || other is QueuesResponseLegacyDto && - other.backgroundTask == backgroundTask && - other.backupDatabase == backupDatabase && - other.duplicateDetection == duplicateDetection && - other.editor == editor && - other.faceDetection == faceDetection && - other.facialRecognition == facialRecognition && - other.integrityCheck == integrityCheck && - other.library_ == library_ && - other.metadataExtraction == metadataExtraction && - other.migration == migration && - other.notifications == notifications && - other.ocr == ocr && - other.search == search && - other.sidecar == sidecar && - other.smartSearch == smartSearch && - other.storageTemplateMigration == storageTemplateMigration && - other.thumbnailGeneration == thumbnailGeneration && - other.videoConversion == videoConversion && - other.workflow == workflow; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (backgroundTask.hashCode) + - (backupDatabase.hashCode) + - (duplicateDetection.hashCode) + - (editor.hashCode) + - (faceDetection.hashCode) + - (facialRecognition.hashCode) + - (integrityCheck.hashCode) + - (library_.hashCode) + - (metadataExtraction.hashCode) + - (migration.hashCode) + - (notifications.hashCode) + - (ocr.hashCode) + - (search.hashCode) + - (sidecar.hashCode) + - (smartSearch.hashCode) + - (storageTemplateMigration.hashCode) + - (thumbnailGeneration.hashCode) + - (videoConversion.hashCode) + - (workflow.hashCode); - - @override - String toString() => 'QueuesResponseLegacyDto[backgroundTask=$backgroundTask, backupDatabase=$backupDatabase, duplicateDetection=$duplicateDetection, editor=$editor, faceDetection=$faceDetection, facialRecognition=$facialRecognition, integrityCheck=$integrityCheck, library_=$library_, metadataExtraction=$metadataExtraction, migration=$migration, notifications=$notifications, ocr=$ocr, search=$search, sidecar=$sidecar, smartSearch=$smartSearch, storageTemplateMigration=$storageTemplateMigration, thumbnailGeneration=$thumbnailGeneration, videoConversion=$videoConversion, workflow=$workflow]'; - - Map toJson() { - final json = {}; - json[r'backgroundTask'] = this.backgroundTask; - json[r'backupDatabase'] = this.backupDatabase; - json[r'duplicateDetection'] = this.duplicateDetection; - json[r'editor'] = this.editor; - json[r'faceDetection'] = this.faceDetection; - json[r'facialRecognition'] = this.facialRecognition; - json[r'integrityCheck'] = this.integrityCheck; - json[r'library'] = this.library_; - json[r'metadataExtraction'] = this.metadataExtraction; - json[r'migration'] = this.migration; - json[r'notifications'] = this.notifications; - json[r'ocr'] = this.ocr; - json[r'search'] = this.search; - json[r'sidecar'] = this.sidecar; - json[r'smartSearch'] = this.smartSearch; - json[r'storageTemplateMigration'] = this.storageTemplateMigration; - json[r'thumbnailGeneration'] = this.thumbnailGeneration; - json[r'videoConversion'] = this.videoConversion; - json[r'workflow'] = this.workflow; - return json; - } - - /// Returns a new [QueuesResponseLegacyDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static QueuesResponseLegacyDto? fromJson(dynamic value) { - upgradeDto(value, "QueuesResponseLegacyDto"); - if (value is Map) { - final json = value.cast(); - - return QueuesResponseLegacyDto( - backgroundTask: QueueResponseLegacyDto.fromJson(json[r'backgroundTask'])!, - backupDatabase: QueueResponseLegacyDto.fromJson(json[r'backupDatabase'])!, - duplicateDetection: QueueResponseLegacyDto.fromJson(json[r'duplicateDetection'])!, - editor: QueueResponseLegacyDto.fromJson(json[r'editor'])!, - faceDetection: QueueResponseLegacyDto.fromJson(json[r'faceDetection'])!, - facialRecognition: QueueResponseLegacyDto.fromJson(json[r'facialRecognition'])!, - integrityCheck: QueueResponseLegacyDto.fromJson(json[r'integrityCheck'])!, - library_: QueueResponseLegacyDto.fromJson(json[r'library'])!, - metadataExtraction: QueueResponseLegacyDto.fromJson(json[r'metadataExtraction'])!, - migration: QueueResponseLegacyDto.fromJson(json[r'migration'])!, - notifications: QueueResponseLegacyDto.fromJson(json[r'notifications'])!, - ocr: QueueResponseLegacyDto.fromJson(json[r'ocr'])!, - search: QueueResponseLegacyDto.fromJson(json[r'search'])!, - sidecar: QueueResponseLegacyDto.fromJson(json[r'sidecar'])!, - smartSearch: QueueResponseLegacyDto.fromJson(json[r'smartSearch'])!, - storageTemplateMigration: QueueResponseLegacyDto.fromJson(json[r'storageTemplateMigration'])!, - thumbnailGeneration: QueueResponseLegacyDto.fromJson(json[r'thumbnailGeneration'])!, - videoConversion: QueueResponseLegacyDto.fromJson(json[r'videoConversion'])!, - workflow: QueueResponseLegacyDto.fromJson(json[r'workflow'])!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = QueuesResponseLegacyDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = QueuesResponseLegacyDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of QueuesResponseLegacyDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = QueuesResponseLegacyDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'backgroundTask', - 'backupDatabase', - 'duplicateDetection', - 'editor', - 'faceDetection', - 'facialRecognition', - 'integrityCheck', - 'library', - 'metadataExtraction', - 'migration', - 'notifications', - 'ocr', - 'search', - 'sidecar', - 'smartSearch', - 'storageTemplateMigration', - 'thumbnailGeneration', - 'videoConversion', - 'workflow', - }; -} - diff --git a/mobile/openapi/lib/model/random_search_dto.dart b/mobile/openapi/lib/model/random_search_dto.dart deleted file mode 100644 index 7937069578..0000000000 --- a/mobile/openapi/lib/model/random_search_dto.dart +++ /dev/null @@ -1,595 +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 RandomSearchDto { - /// Returns a new [RandomSearchDto] instance. - RandomSearchDto({ - this.albumIds = const Optional.present(const []), - this.city = const Optional.absent(), - this.country = const Optional.absent(), - this.createdAfter = const Optional.absent(), - this.createdBefore = const Optional.absent(), - this.isEncoded = const Optional.absent(), - this.isFavorite = const Optional.absent(), - this.isMotion = const Optional.absent(), - this.isNotInAlbum = const Optional.absent(), - this.isOffline = const Optional.absent(), - this.lensModel = const Optional.absent(), - this.libraryId = const Optional.absent(), - this.make = const Optional.absent(), - this.model = const Optional.absent(), - this.ocr = const Optional.absent(), - this.personIds = const Optional.present(const []), - this.rating = const Optional.absent(), - this.size = const Optional.absent(), - this.state = const Optional.absent(), - this.tagIds = const Optional.present(const []), - this.takenAfter = const Optional.absent(), - this.takenBefore = const Optional.absent(), - this.trashedAfter = const Optional.absent(), - this.trashedBefore = const Optional.absent(), - this.type = const Optional.absent(), - this.updatedAfter = const Optional.absent(), - this.updatedBefore = const Optional.absent(), - this.visibility = const Optional.absent(), - this.withDeleted = const Optional.absent(), - this.withExif = const Optional.absent(), - this.withPeople = const Optional.absent(), - this.withStacked = const Optional.absent(), - }); - - /// Filter by album IDs - Optional?> albumIds; - - /// Filter by city name - Optional city; - - /// Filter by country name - Optional country; - - /// Filter by creation date (after) - /// - /// 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. - /// - Optional createdAfter; - - /// Filter by creation date (before) - /// - /// 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. - /// - Optional createdBefore; - - /// Filter by encoded status - /// - /// 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. - /// - Optional isEncoded; - - /// Filter by favorite status - /// - /// 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. - /// - Optional isFavorite; - - /// Filter by motion photo status - /// - /// 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. - /// - Optional isMotion; - - /// Filter assets not in any album - /// - /// 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. - /// - Optional isNotInAlbum; - - /// Filter by offline status - /// - /// 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. - /// - Optional isOffline; - - /// Filter by lens model - Optional lensModel; - - /// Library ID to filter by - Optional libraryId; - - /// Filter by camera make - Optional make; - - /// Filter by camera model - Optional model; - - /// Filter by OCR text content - /// - /// 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. - /// - Optional ocr; - - /// Filter by person IDs - Optional?> personIds; - - /// Filter by rating [1-5], or null for unrated - /// - /// Minimum value: 1 - /// Maximum value: 5 - Optional rating; - - /// Number of results to return - /// - /// Minimum value: 1 - /// Maximum value: 1000 - /// - /// 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. - /// - Optional size; - - /// Filter by state/province name - Optional state; - - /// Filter by tag IDs - Optional?> tagIds; - - /// Filter by taken date (after) - /// - /// 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. - /// - Optional takenAfter; - - /// Filter by taken date (before) - /// - /// 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. - /// - Optional takenBefore; - - /// Filter by trash date (after) - /// - /// 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. - /// - Optional trashedAfter; - - /// Filter by trash date (before) - /// - /// 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. - /// - Optional trashedBefore; - - /// - /// 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. - /// - Optional type; - - /// Filter by update date (after) - /// - /// 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. - /// - Optional updatedAfter; - - /// Filter by update date (before) - /// - /// 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. - /// - Optional updatedBefore; - - /// - /// 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. - /// - Optional visibility; - - /// Include deleted assets - /// - /// 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. - /// - Optional withDeleted; - - /// Include EXIF data in response - /// - /// 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. - /// - Optional withExif; - - /// Include people data in response - /// - /// 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. - /// - Optional withPeople; - - /// Include stacked assets - /// - /// 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. - /// - Optional withStacked; - - @override - bool operator ==(Object other) => identical(this, other) || other is RandomSearchDto && - _deepEquality.equals(other.albumIds, albumIds) && - other.city == city && - other.country == country && - other.createdAfter == createdAfter && - other.createdBefore == createdBefore && - other.isEncoded == isEncoded && - other.isFavorite == isFavorite && - other.isMotion == isMotion && - other.isNotInAlbum == isNotInAlbum && - other.isOffline == isOffline && - other.lensModel == lensModel && - other.libraryId == libraryId && - other.make == make && - other.model == model && - other.ocr == ocr && - _deepEquality.equals(other.personIds, personIds) && - other.rating == rating && - other.size == size && - other.state == state && - _deepEquality.equals(other.tagIds, tagIds) && - other.takenAfter == takenAfter && - other.takenBefore == takenBefore && - other.trashedAfter == trashedAfter && - other.trashedBefore == trashedBefore && - other.type == type && - other.updatedAfter == updatedAfter && - other.updatedBefore == updatedBefore && - other.visibility == visibility && - other.withDeleted == withDeleted && - other.withExif == withExif && - other.withPeople == withPeople && - other.withStacked == withStacked; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (albumIds.hashCode) + - (city == null ? 0 : city!.hashCode) + - (country == null ? 0 : country!.hashCode) + - (createdAfter == null ? 0 : createdAfter!.hashCode) + - (createdBefore == null ? 0 : createdBefore!.hashCode) + - (isEncoded == null ? 0 : isEncoded!.hashCode) + - (isFavorite == null ? 0 : isFavorite!.hashCode) + - (isMotion == null ? 0 : isMotion!.hashCode) + - (isNotInAlbum == null ? 0 : isNotInAlbum!.hashCode) + - (isOffline == null ? 0 : isOffline!.hashCode) + - (lensModel == null ? 0 : lensModel!.hashCode) + - (libraryId == null ? 0 : libraryId!.hashCode) + - (make == null ? 0 : make!.hashCode) + - (model == null ? 0 : model!.hashCode) + - (ocr == null ? 0 : ocr!.hashCode) + - (personIds.hashCode) + - (rating == null ? 0 : rating!.hashCode) + - (size == null ? 0 : size!.hashCode) + - (state == null ? 0 : state!.hashCode) + - (tagIds == null ? 0 : tagIds!.hashCode) + - (takenAfter == null ? 0 : takenAfter!.hashCode) + - (takenBefore == null ? 0 : takenBefore!.hashCode) + - (trashedAfter == null ? 0 : trashedAfter!.hashCode) + - (trashedBefore == null ? 0 : trashedBefore!.hashCode) + - (type == null ? 0 : type!.hashCode) + - (updatedAfter == null ? 0 : updatedAfter!.hashCode) + - (updatedBefore == null ? 0 : updatedBefore!.hashCode) + - (visibility == null ? 0 : visibility!.hashCode) + - (withDeleted == null ? 0 : withDeleted!.hashCode) + - (withExif == null ? 0 : withExif!.hashCode) + - (withPeople == null ? 0 : withPeople!.hashCode) + - (withStacked == null ? 0 : withStacked!.hashCode); - - @override - String toString() => 'RandomSearchDto[albumIds=$albumIds, city=$city, country=$country, createdAfter=$createdAfter, createdBefore=$createdBefore, isEncoded=$isEncoded, isFavorite=$isFavorite, isMotion=$isMotion, isNotInAlbum=$isNotInAlbum, isOffline=$isOffline, lensModel=$lensModel, libraryId=$libraryId, make=$make, model=$model, ocr=$ocr, personIds=$personIds, rating=$rating, size=$size, state=$state, tagIds=$tagIds, takenAfter=$takenAfter, takenBefore=$takenBefore, trashedAfter=$trashedAfter, trashedBefore=$trashedBefore, type=$type, updatedAfter=$updatedAfter, updatedBefore=$updatedBefore, visibility=$visibility, withDeleted=$withDeleted, withExif=$withExif, withPeople=$withPeople, withStacked=$withStacked]'; - - Map toJson() { - final json = {}; - if (this.albumIds.isPresent) { - final value = this.albumIds.value; - json[r'albumIds'] = value; - } - if (this.city.isPresent) { - final value = this.city.value; - json[r'city'] = value; - } - if (this.country.isPresent) { - final value = this.country.value; - json[r'country'] = value; - } - if (this.createdAfter.isPresent) { - final value = this.createdAfter.value; - json[r'createdAfter'] = value == null ? null : (_isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? value.millisecondsSinceEpoch - : value.toUtc().toIso8601String()); - } - if (this.createdBefore.isPresent) { - final value = this.createdBefore.value; - json[r'createdBefore'] = value == null ? null : (_isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? value.millisecondsSinceEpoch - : value.toUtc().toIso8601String()); - } - if (this.isEncoded.isPresent) { - final value = this.isEncoded.value; - json[r'isEncoded'] = value; - } - if (this.isFavorite.isPresent) { - final value = this.isFavorite.value; - json[r'isFavorite'] = value; - } - if (this.isMotion.isPresent) { - final value = this.isMotion.value; - json[r'isMotion'] = value; - } - if (this.isNotInAlbum.isPresent) { - final value = this.isNotInAlbum.value; - json[r'isNotInAlbum'] = value; - } - if (this.isOffline.isPresent) { - final value = this.isOffline.value; - json[r'isOffline'] = value; - } - if (this.lensModel.isPresent) { - final value = this.lensModel.value; - json[r'lensModel'] = value; - } - if (this.libraryId.isPresent) { - final value = this.libraryId.value; - json[r'libraryId'] = value; - } - if (this.make.isPresent) { - final value = this.make.value; - json[r'make'] = value; - } - if (this.model.isPresent) { - final value = this.model.value; - json[r'model'] = value; - } - if (this.ocr.isPresent) { - final value = this.ocr.value; - json[r'ocr'] = value; - } - if (this.personIds.isPresent) { - final value = this.personIds.value; - json[r'personIds'] = value; - } - if (this.rating.isPresent) { - final value = this.rating.value; - json[r'rating'] = value; - } - if (this.size.isPresent) { - final value = this.size.value; - json[r'size'] = value; - } - if (this.state.isPresent) { - final value = this.state.value; - json[r'state'] = value; - } - if (this.tagIds.isPresent) { - final value = this.tagIds.value; - json[r'tagIds'] = value; - } - if (this.takenAfter.isPresent) { - final value = this.takenAfter.value; - json[r'takenAfter'] = value == null ? null : (_isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? value.millisecondsSinceEpoch - : value.toUtc().toIso8601String()); - } - if (this.takenBefore.isPresent) { - final value = this.takenBefore.value; - json[r'takenBefore'] = value == null ? null : (_isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? value.millisecondsSinceEpoch - : value.toUtc().toIso8601String()); - } - if (this.trashedAfter.isPresent) { - final value = this.trashedAfter.value; - json[r'trashedAfter'] = value == null ? null : (_isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? value.millisecondsSinceEpoch - : value.toUtc().toIso8601String()); - } - if (this.trashedBefore.isPresent) { - final value = this.trashedBefore.value; - json[r'trashedBefore'] = value == null ? null : (_isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? value.millisecondsSinceEpoch - : value.toUtc().toIso8601String()); - } - if (this.type.isPresent) { - final value = this.type.value; - json[r'type'] = value; - } - if (this.updatedAfter.isPresent) { - final value = this.updatedAfter.value; - json[r'updatedAfter'] = value == null ? null : (_isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? value.millisecondsSinceEpoch - : value.toUtc().toIso8601String()); - } - if (this.updatedBefore.isPresent) { - final value = this.updatedBefore.value; - json[r'updatedBefore'] = value == null ? null : (_isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? value.millisecondsSinceEpoch - : value.toUtc().toIso8601String()); - } - if (this.visibility.isPresent) { - final value = this.visibility.value; - json[r'visibility'] = value; - } - if (this.withDeleted.isPresent) { - final value = this.withDeleted.value; - json[r'withDeleted'] = value; - } - if (this.withExif.isPresent) { - final value = this.withExif.value; - json[r'withExif'] = value; - } - if (this.withPeople.isPresent) { - final value = this.withPeople.value; - json[r'withPeople'] = value; - } - if (this.withStacked.isPresent) { - final value = this.withStacked.value; - json[r'withStacked'] = value; - } - return json; - } - - /// Returns a new [RandomSearchDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static RandomSearchDto? fromJson(dynamic value) { - upgradeDto(value, "RandomSearchDto"); - if (value is Map) { - final json = value.cast(); - - return RandomSearchDto( - albumIds: json.containsKey(r'albumIds') ? Optional.present(json[r'albumIds'] is Iterable - ? (json[r'albumIds'] as Iterable).cast().toList(growable: false) - : const []) : const Optional.absent(), - city: json.containsKey(r'city') ? Optional.present(mapValueOfType(json, r'city')) : const Optional.absent(), - country: json.containsKey(r'country') ? Optional.present(mapValueOfType(json, r'country')) : const Optional.absent(), - createdAfter: json.containsKey(r'createdAfter') ? Optional.present(mapDateTime(json, r'createdAfter', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')) : const Optional.absent(), - createdBefore: json.containsKey(r'createdBefore') ? Optional.present(mapDateTime(json, r'createdBefore', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')) : const Optional.absent(), - isEncoded: json.containsKey(r'isEncoded') ? Optional.present(mapValueOfType(json, r'isEncoded')) : const Optional.absent(), - isFavorite: json.containsKey(r'isFavorite') ? Optional.present(mapValueOfType(json, r'isFavorite')) : const Optional.absent(), - isMotion: json.containsKey(r'isMotion') ? Optional.present(mapValueOfType(json, r'isMotion')) : const Optional.absent(), - isNotInAlbum: json.containsKey(r'isNotInAlbum') ? Optional.present(mapValueOfType(json, r'isNotInAlbum')) : const Optional.absent(), - isOffline: json.containsKey(r'isOffline') ? Optional.present(mapValueOfType(json, r'isOffline')) : const Optional.absent(), - lensModel: json.containsKey(r'lensModel') ? Optional.present(mapValueOfType(json, r'lensModel')) : const Optional.absent(), - libraryId: json.containsKey(r'libraryId') ? Optional.present(mapValueOfType(json, r'libraryId')) : const Optional.absent(), - make: json.containsKey(r'make') ? Optional.present(mapValueOfType(json, r'make')) : const Optional.absent(), - model: json.containsKey(r'model') ? Optional.present(mapValueOfType(json, r'model')) : const Optional.absent(), - ocr: json.containsKey(r'ocr') ? Optional.present(mapValueOfType(json, r'ocr')) : const Optional.absent(), - personIds: json.containsKey(r'personIds') ? Optional.present(json[r'personIds'] is Iterable - ? (json[r'personIds'] as Iterable).cast().toList(growable: false) - : const []) : const Optional.absent(), - rating: json.containsKey(r'rating') ? Optional.present(json[r'rating'] == null ? null : int.parse('${json[r'rating']}')) : const Optional.absent(), - size: json.containsKey(r'size') ? Optional.present(json[r'size'] == null ? null : int.parse('${json[r'size']}')) : const Optional.absent(), - state: json.containsKey(r'state') ? Optional.present(mapValueOfType(json, r'state')) : const Optional.absent(), - tagIds: json.containsKey(r'tagIds') ? Optional.present(json[r'tagIds'] is Iterable - ? (json[r'tagIds'] as Iterable).cast().toList(growable: false) - : const []) : const Optional.absent(), - takenAfter: json.containsKey(r'takenAfter') ? Optional.present(mapDateTime(json, r'takenAfter', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')) : const Optional.absent(), - takenBefore: json.containsKey(r'takenBefore') ? Optional.present(mapDateTime(json, r'takenBefore', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')) : const Optional.absent(), - trashedAfter: json.containsKey(r'trashedAfter') ? Optional.present(mapDateTime(json, r'trashedAfter', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')) : const Optional.absent(), - trashedBefore: json.containsKey(r'trashedBefore') ? Optional.present(mapDateTime(json, r'trashedBefore', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')) : const Optional.absent(), - type: json.containsKey(r'type') ? Optional.present(AssetTypeEnum.fromJson(json[r'type'])) : const Optional.absent(), - updatedAfter: json.containsKey(r'updatedAfter') ? Optional.present(mapDateTime(json, r'updatedAfter', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')) : const Optional.absent(), - updatedBefore: json.containsKey(r'updatedBefore') ? Optional.present(mapDateTime(json, r'updatedBefore', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')) : const Optional.absent(), - visibility: json.containsKey(r'visibility') ? Optional.present(AssetVisibility.fromJson(json[r'visibility'])) : const Optional.absent(), - withDeleted: json.containsKey(r'withDeleted') ? Optional.present(mapValueOfType(json, r'withDeleted')) : const Optional.absent(), - withExif: json.containsKey(r'withExif') ? Optional.present(mapValueOfType(json, r'withExif')) : const Optional.absent(), - withPeople: json.containsKey(r'withPeople') ? Optional.present(mapValueOfType(json, r'withPeople')) : const Optional.absent(), - withStacked: json.containsKey(r'withStacked') ? Optional.present(mapValueOfType(json, r'withStacked')) : const Optional.absent(), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = RandomSearchDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = RandomSearchDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of RandomSearchDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = RandomSearchDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - }; -} - diff --git a/mobile/openapi/lib/model/ratings_response.dart b/mobile/openapi/lib/model/ratings_response.dart deleted file mode 100644 index 7b067412bf..0000000000 --- a/mobile/openapi/lib/model/ratings_response.dart +++ /dev/null @@ -1,100 +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 RatingsResponse { - /// Returns a new [RatingsResponse] instance. - RatingsResponse({ - required this.enabled, - }); - - /// Whether ratings are enabled - bool enabled; - - @override - bool operator ==(Object other) => identical(this, other) || other is RatingsResponse && - other.enabled == enabled; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (enabled.hashCode); - - @override - String toString() => 'RatingsResponse[enabled=$enabled]'; - - Map toJson() { - final json = {}; - json[r'enabled'] = this.enabled; - return json; - } - - /// Returns a new [RatingsResponse] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static RatingsResponse? fromJson(dynamic value) { - upgradeDto(value, "RatingsResponse"); - if (value is Map) { - final json = value.cast(); - - return RatingsResponse( - enabled: mapValueOfType(json, r'enabled')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = RatingsResponse.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = RatingsResponse.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of RatingsResponse-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = RatingsResponse.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'enabled', - }; -} - diff --git a/mobile/openapi/lib/model/ratings_update.dart b/mobile/openapi/lib/model/ratings_update.dart deleted file mode 100644 index 085efd97e6..0000000000 --- a/mobile/openapi/lib/model/ratings_update.dart +++ /dev/null @@ -1,108 +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 RatingsUpdate { - /// Returns a new [RatingsUpdate] instance. - RatingsUpdate({ - this.enabled = const Optional.absent(), - }); - - /// Whether ratings are enabled - /// - /// 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. - /// - Optional enabled; - - @override - bool operator ==(Object other) => identical(this, other) || other is RatingsUpdate && - other.enabled == enabled; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (enabled == null ? 0 : enabled!.hashCode); - - @override - String toString() => 'RatingsUpdate[enabled=$enabled]'; - - Map toJson() { - final json = {}; - if (this.enabled.isPresent) { - final value = this.enabled.value; - json[r'enabled'] = value; - } - return json; - } - - /// Returns a new [RatingsUpdate] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static RatingsUpdate? fromJson(dynamic value) { - upgradeDto(value, "RatingsUpdate"); - if (value is Map) { - final json = value.cast(); - - return RatingsUpdate( - enabled: json.containsKey(r'enabled') ? Optional.present(mapValueOfType(json, r'enabled')) : const Optional.absent(), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = RatingsUpdate.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = RatingsUpdate.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of RatingsUpdate-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = RatingsUpdate.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - }; -} - diff --git a/mobile/openapi/lib/model/reaction_level.dart b/mobile/openapi/lib/model/reaction_level.dart deleted file mode 100644 index 6060f4c2b7..0000000000 --- a/mobile/openapi/lib/model/reaction_level.dart +++ /dev/null @@ -1,85 +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; - -/// Reaction level -class ReactionLevel { - /// Instantiate a new enum with the provided [value]. - const ReactionLevel._(this.value); - - /// The underlying value of this enum member. - final String value; - - @override - String toString() => value; - - String toJson() => value; - - static const album = ReactionLevel._(r'album'); - static const asset = ReactionLevel._(r'asset'); - - /// List of all possible values in this [enum][ReactionLevel]. - static const values = [ - album, - asset, - ]; - - static ReactionLevel? fromJson(dynamic value) => ReactionLevelTypeTransformer().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 = ReactionLevel.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } -} - -/// Transformation class that can [encode] an instance of [ReactionLevel] to String, -/// and [decode] dynamic data back to [ReactionLevel]. -class ReactionLevelTypeTransformer { - factory ReactionLevelTypeTransformer() => _instance ??= const ReactionLevelTypeTransformer._(); - - const ReactionLevelTypeTransformer._(); - - String encode(ReactionLevel data) => data.value; - - /// Decodes a [dynamic value][data] to a ReactionLevel. - /// - /// 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. - ReactionLevel? decode(dynamic data, {bool allowNull = true}) { - if (data != null) { - switch (data) { - case r'album': return ReactionLevel.album; - case r'asset': return ReactionLevel.asset; - default: - if (!allowNull) { - throw ArgumentError('Unknown enum value to decode: $data'); - } - } - } - return null; - } - - /// Singleton [ReactionLevelTypeTransformer] instance. - static ReactionLevelTypeTransformer? _instance; -} - diff --git a/mobile/openapi/lib/model/reaction_type.dart b/mobile/openapi/lib/model/reaction_type.dart deleted file mode 100644 index c4daccad71..0000000000 --- a/mobile/openapi/lib/model/reaction_type.dart +++ /dev/null @@ -1,85 +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; - -/// Reaction type -class ReactionType { - /// Instantiate a new enum with the provided [value]. - const ReactionType._(this.value); - - /// The underlying value of this enum member. - final String value; - - @override - String toString() => value; - - String toJson() => value; - - static const comment = ReactionType._(r'comment'); - static const like = ReactionType._(r'like'); - - /// List of all possible values in this [enum][ReactionType]. - static const values = [ - comment, - like, - ]; - - static ReactionType? fromJson(dynamic value) => ReactionTypeTypeTransformer().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 = ReactionType.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } -} - -/// Transformation class that can [encode] an instance of [ReactionType] to String, -/// and [decode] dynamic data back to [ReactionType]. -class ReactionTypeTypeTransformer { - factory ReactionTypeTypeTransformer() => _instance ??= const ReactionTypeTypeTransformer._(); - - const ReactionTypeTypeTransformer._(); - - String encode(ReactionType data) => data.value; - - /// Decodes a [dynamic value][data] to a ReactionType. - /// - /// 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. - ReactionType? decode(dynamic data, {bool allowNull = true}) { - if (data != null) { - switch (data) { - case r'comment': return ReactionType.comment; - case r'like': return ReactionType.like; - default: - if (!allowNull) { - throw ArgumentError('Unknown enum value to decode: $data'); - } - } - } - return null; - } - - /// Singleton [ReactionTypeTypeTransformer] instance. - static ReactionTypeTypeTransformer? _instance; -} - diff --git a/mobile/openapi/lib/model/release_channel.dart b/mobile/openapi/lib/model/release_channel.dart deleted file mode 100644 index 48b082af07..0000000000 --- a/mobile/openapi/lib/model/release_channel.dart +++ /dev/null @@ -1,85 +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; - -/// Release channel -class ReleaseChannel { - /// Instantiate a new enum with the provided [value]. - const ReleaseChannel._(this.value); - - /// The underlying value of this enum member. - final String value; - - @override - String toString() => value; - - String toJson() => value; - - static const stable = ReleaseChannel._(r'stable'); - static const releaseCandidate = ReleaseChannel._(r'releaseCandidate'); - - /// List of all possible values in this [enum][ReleaseChannel]. - static const values = [ - stable, - releaseCandidate, - ]; - - static ReleaseChannel? fromJson(dynamic value) => ReleaseChannelTypeTransformer().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 = ReleaseChannel.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } -} - -/// Transformation class that can [encode] an instance of [ReleaseChannel] to String, -/// and [decode] dynamic data back to [ReleaseChannel]. -class ReleaseChannelTypeTransformer { - factory ReleaseChannelTypeTransformer() => _instance ??= const ReleaseChannelTypeTransformer._(); - - const ReleaseChannelTypeTransformer._(); - - String encode(ReleaseChannel data) => data.value; - - /// Decodes a [dynamic value][data] to a ReleaseChannel. - /// - /// 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. - ReleaseChannel? decode(dynamic data, {bool allowNull = true}) { - if (data != null) { - switch (data) { - case r'stable': return ReleaseChannel.stable; - case r'releaseCandidate': return ReleaseChannel.releaseCandidate; - default: - if (!allowNull) { - throw ArgumentError('Unknown enum value to decode: $data'); - } - } - } - return null; - } - - /// Singleton [ReleaseChannelTypeTransformer] instance. - static ReleaseChannelTypeTransformer? _instance; -} - diff --git a/mobile/openapi/lib/model/release_event_v1.dart b/mobile/openapi/lib/model/release_event_v1.dart deleted file mode 100644 index f26ae3e96e..0000000000 --- a/mobile/openapi/lib/model/release_event_v1.dart +++ /dev/null @@ -1,133 +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 ReleaseEventV1 { - /// Returns a new [ReleaseEventV1] instance. - ReleaseEventV1({ - required this.checkedAt, - required this.isAvailable, - required this.releaseVersion, - required this.serverVersion, - required this.type, - }); - - /// When the server last checked for a latest version. As an ISO timestamp - String checkedAt; - - /// Whether a new version is available - bool isAvailable; - - ServerVersionResponseDto releaseVersion; - - ServerVersionResponseDto serverVersion; - - ReleaseType type; - - @override - bool operator ==(Object other) => identical(this, other) || other is ReleaseEventV1 && - other.checkedAt == checkedAt && - other.isAvailable == isAvailable && - other.releaseVersion == releaseVersion && - other.serverVersion == serverVersion && - other.type == type; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (checkedAt.hashCode) + - (isAvailable.hashCode) + - (releaseVersion.hashCode) + - (serverVersion.hashCode) + - (type.hashCode); - - @override - String toString() => 'ReleaseEventV1[checkedAt=$checkedAt, isAvailable=$isAvailable, releaseVersion=$releaseVersion, serverVersion=$serverVersion, type=$type]'; - - Map toJson() { - final json = {}; - json[r'checkedAt'] = this.checkedAt; - json[r'isAvailable'] = this.isAvailable; - json[r'releaseVersion'] = this.releaseVersion; - json[r'serverVersion'] = this.serverVersion; - json[r'type'] = this.type; - return json; - } - - /// Returns a new [ReleaseEventV1] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static ReleaseEventV1? fromJson(dynamic value) { - upgradeDto(value, "ReleaseEventV1"); - if (value is Map) { - final json = value.cast(); - - return ReleaseEventV1( - checkedAt: mapValueOfType(json, r'checkedAt')!, - isAvailable: mapValueOfType(json, r'isAvailable')!, - releaseVersion: ServerVersionResponseDto.fromJson(json[r'releaseVersion'])!, - serverVersion: ServerVersionResponseDto.fromJson(json[r'serverVersion'])!, - type: ReleaseType.fromJson(json[r'type'])!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = ReleaseEventV1.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = ReleaseEventV1.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of ReleaseEventV1-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = ReleaseEventV1.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'checkedAt', - 'isAvailable', - 'releaseVersion', - 'serverVersion', - 'type', - }; -} - diff --git a/mobile/openapi/lib/model/release_type.dart b/mobile/openapi/lib/model/release_type.dart deleted file mode 100644 index 2d61072286..0000000000 --- a/mobile/openapi/lib/model/release_type.dart +++ /dev/null @@ -1,100 +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 ReleaseType { - /// Instantiate a new enum with the provided [value]. - const ReleaseType._(this.value); - - /// The underlying value of this enum member. - final String value; - - @override - String toString() => value; - - String toJson() => value; - - static const major = ReleaseType._(r'major'); - static const premajor = ReleaseType._(r'premajor'); - static const minor = ReleaseType._(r'minor'); - static const preminor = ReleaseType._(r'preminor'); - static const patch_ = ReleaseType._(r'patch'); - static const prepatch = ReleaseType._(r'prepatch'); - static const prerelease = ReleaseType._(r'prerelease'); - - /// List of all possible values in this [enum][ReleaseType]. - static const values = [ - major, - premajor, - minor, - preminor, - patch_, - prepatch, - prerelease, - ]; - - static ReleaseType? fromJson(dynamic value) => ReleaseTypeTypeTransformer().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 = ReleaseType.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } -} - -/// Transformation class that can [encode] an instance of [ReleaseType] to String, -/// and [decode] dynamic data back to [ReleaseType]. -class ReleaseTypeTypeTransformer { - factory ReleaseTypeTypeTransformer() => _instance ??= const ReleaseTypeTypeTransformer._(); - - const ReleaseTypeTypeTransformer._(); - - String encode(ReleaseType data) => data.value; - - /// Decodes a [dynamic value][data] to a ReleaseType. - /// - /// 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. - ReleaseType? decode(dynamic data, {bool allowNull = true}) { - if (data != null) { - switch (data) { - case r'major': return ReleaseType.major; - case r'premajor': return ReleaseType.premajor; - case r'minor': return ReleaseType.minor; - case r'preminor': return ReleaseType.preminor; - case r'patch': return ReleaseType.patch_; - case r'prepatch': return ReleaseType.prepatch; - case r'prerelease': return ReleaseType.prerelease; - default: - if (!allowNull) { - throw ArgumentError('Unknown enum value to decode: $data'); - } - } - } - return null; - } - - /// Singleton [ReleaseTypeTypeTransformer] instance. - static ReleaseTypeTypeTransformer? _instance; -} - diff --git a/mobile/openapi/lib/model/reverse_geocoding_state_response_dto.dart b/mobile/openapi/lib/model/reverse_geocoding_state_response_dto.dart deleted file mode 100644 index 07bb226ac0..0000000000 --- a/mobile/openapi/lib/model/reverse_geocoding_state_response_dto.dart +++ /dev/null @@ -1,117 +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 ReverseGeocodingStateResponseDto { - /// Returns a new [ReverseGeocodingStateResponseDto] instance. - ReverseGeocodingStateResponseDto({ - required this.lastImportFileName, - required this.lastUpdate, - }); - - /// Last import file name - String? lastImportFileName; - - /// Last update timestamp - String? lastUpdate; - - @override - bool operator ==(Object other) => identical(this, other) || other is ReverseGeocodingStateResponseDto && - other.lastImportFileName == lastImportFileName && - other.lastUpdate == lastUpdate; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (lastImportFileName == null ? 0 : lastImportFileName!.hashCode) + - (lastUpdate == null ? 0 : lastUpdate!.hashCode); - - @override - String toString() => 'ReverseGeocodingStateResponseDto[lastImportFileName=$lastImportFileName, lastUpdate=$lastUpdate]'; - - Map toJson() { - final json = {}; - if (this.lastImportFileName != null) { - json[r'lastImportFileName'] = this.lastImportFileName; - } else { - json[r'lastImportFileName'] = null; - } - if (this.lastUpdate != null) { - json[r'lastUpdate'] = this.lastUpdate; - } else { - json[r'lastUpdate'] = null; - } - return json; - } - - /// Returns a new [ReverseGeocodingStateResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static ReverseGeocodingStateResponseDto? fromJson(dynamic value) { - upgradeDto(value, "ReverseGeocodingStateResponseDto"); - if (value is Map) { - final json = value.cast(); - - return ReverseGeocodingStateResponseDto( - lastImportFileName: mapValueOfType(json, r'lastImportFileName'), - lastUpdate: mapValueOfType(json, r'lastUpdate'), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = ReverseGeocodingStateResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = ReverseGeocodingStateResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of ReverseGeocodingStateResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = ReverseGeocodingStateResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'lastImportFileName', - 'lastUpdate', - }; -} - diff --git a/mobile/openapi/lib/model/rotate_parameters.dart b/mobile/openapi/lib/model/rotate_parameters.dart deleted file mode 100644 index 33609e83e5..0000000000 --- a/mobile/openapi/lib/model/rotate_parameters.dart +++ /dev/null @@ -1,100 +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 RotateParameters { - /// Returns a new [RotateParameters] instance. - RotateParameters({ - required this.angle, - }); - - /// Rotation angle in degrees - num angle; - - @override - bool operator ==(Object other) => identical(this, other) || other is RotateParameters && - other.angle == angle; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (angle.hashCode); - - @override - String toString() => 'RotateParameters[angle=$angle]'; - - Map toJson() { - final json = {}; - json[r'angle'] = this.angle; - return json; - } - - /// Returns a new [RotateParameters] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static RotateParameters? fromJson(dynamic value) { - upgradeDto(value, "RotateParameters"); - if (value is Map) { - final json = value.cast(); - - return RotateParameters( - angle: num.parse('${json[r'angle']}'), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = RotateParameters.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = RotateParameters.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of RotateParameters-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = RotateParameters.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'angle', - }; -} - diff --git a/mobile/openapi/lib/model/search_album_response_dto.dart b/mobile/openapi/lib/model/search_album_response_dto.dart deleted file mode 100644 index c21113ee6d..0000000000 --- a/mobile/openapi/lib/model/search_album_response_dto.dart +++ /dev/null @@ -1,131 +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 SearchAlbumResponseDto { - /// Returns a new [SearchAlbumResponseDto] instance. - SearchAlbumResponseDto({ - required this.count, - this.facets = const [], - this.items = const [], - required this.total, - }); - - /// Number of albums in this page - /// - /// Minimum value: 0 - /// Maximum value: 9007199254740991 - int count; - - List facets; - - List items; - - /// Total number of matching albums - /// - /// Minimum value: 0 - /// Maximum value: 9007199254740991 - int total; - - @override - bool operator ==(Object other) => identical(this, other) || other is SearchAlbumResponseDto && - other.count == count && - _deepEquality.equals(other.facets, facets) && - _deepEquality.equals(other.items, items) && - other.total == total; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (count.hashCode) + - (facets.hashCode) + - (items.hashCode) + - (total.hashCode); - - @override - String toString() => 'SearchAlbumResponseDto[count=$count, facets=$facets, items=$items, total=$total]'; - - Map toJson() { - final json = {}; - json[r'count'] = this.count; - json[r'facets'] = this.facets; - json[r'items'] = this.items; - json[r'total'] = this.total; - return json; - } - - /// Returns a new [SearchAlbumResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SearchAlbumResponseDto? fromJson(dynamic value) { - upgradeDto(value, "SearchAlbumResponseDto"); - if (value is Map) { - final json = value.cast(); - - return SearchAlbumResponseDto( - count: mapValueOfType(json, r'count')!, - facets: SearchFacetResponseDto.listFromJson(json[r'facets']), - items: AlbumResponseDto.listFromJson(json[r'items']), - total: mapValueOfType(json, r'total')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SearchAlbumResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SearchAlbumResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SearchAlbumResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SearchAlbumResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'count', - 'facets', - 'items', - 'total', - }; -} - diff --git a/mobile/openapi/lib/model/search_asset_response_dto.dart b/mobile/openapi/lib/model/search_asset_response_dto.dart deleted file mode 100644 index 82971c3c49..0000000000 --- a/mobile/openapi/lib/model/search_asset_response_dto.dart +++ /dev/null @@ -1,144 +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 SearchAssetResponseDto { - /// Returns a new [SearchAssetResponseDto] instance. - SearchAssetResponseDto({ - required this.count, - this.facets = const [], - this.items = const [], - required this.nextPage, - required this.total, - }); - - /// Number of assets in this page - /// - /// Minimum value: 0 - /// Maximum value: 9007199254740991 - int count; - - List facets; - - List items; - - /// Next page token - String? nextPage; - - /// Total number of matching assets - /// - /// Minimum value: 0 - /// Maximum value: 9007199254740991 - int total; - - @override - bool operator ==(Object other) => identical(this, other) || other is SearchAssetResponseDto && - other.count == count && - _deepEquality.equals(other.facets, facets) && - _deepEquality.equals(other.items, items) && - other.nextPage == nextPage && - other.total == total; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (count.hashCode) + - (facets.hashCode) + - (items.hashCode) + - (nextPage == null ? 0 : nextPage!.hashCode) + - (total.hashCode); - - @override - String toString() => 'SearchAssetResponseDto[count=$count, facets=$facets, items=$items, nextPage=$nextPage, total=$total]'; - - Map toJson() { - final json = {}; - json[r'count'] = this.count; - json[r'facets'] = this.facets; - json[r'items'] = this.items; - if (this.nextPage != null) { - json[r'nextPage'] = this.nextPage; - } else { - json[r'nextPage'] = null; - } - json[r'total'] = this.total; - return json; - } - - /// Returns a new [SearchAssetResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SearchAssetResponseDto? fromJson(dynamic value) { - upgradeDto(value, "SearchAssetResponseDto"); - if (value is Map) { - final json = value.cast(); - - return SearchAssetResponseDto( - count: mapValueOfType(json, r'count')!, - facets: SearchFacetResponseDto.listFromJson(json[r'facets']), - items: AssetResponseDto.listFromJson(json[r'items']), - nextPage: mapValueOfType(json, r'nextPage'), - total: mapValueOfType(json, r'total')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SearchAssetResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SearchAssetResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SearchAssetResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SearchAssetResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'count', - 'facets', - 'items', - 'nextPage', - 'total', - }; -} - diff --git a/mobile/openapi/lib/model/search_explore_item.dart b/mobile/openapi/lib/model/search_explore_item.dart deleted file mode 100644 index 4089011879..0000000000 --- a/mobile/openapi/lib/model/search_explore_item.dart +++ /dev/null @@ -1,108 +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 SearchExploreItem { - /// Returns a new [SearchExploreItem] instance. - SearchExploreItem({ - required this.data, - required this.value, - }); - - AssetResponseDto data; - - /// Explore value - String value; - - @override - bool operator ==(Object other) => identical(this, other) || other is SearchExploreItem && - other.data == data && - other.value == value; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (data.hashCode) + - (value.hashCode); - - @override - String toString() => 'SearchExploreItem[data=$data, value=$value]'; - - Map toJson() { - final json = {}; - json[r'data'] = this.data; - json[r'value'] = this.value; - return json; - } - - /// Returns a new [SearchExploreItem] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SearchExploreItem? fromJson(dynamic value) { - upgradeDto(value, "SearchExploreItem"); - if (value is Map) { - final json = value.cast(); - - return SearchExploreItem( - data: AssetResponseDto.fromJson(json[r'data'])!, - value: mapValueOfType(json, r'value')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SearchExploreItem.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SearchExploreItem.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SearchExploreItem-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SearchExploreItem.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'data', - 'value', - }; -} - diff --git a/mobile/openapi/lib/model/search_explore_response_dto.dart b/mobile/openapi/lib/model/search_explore_response_dto.dart deleted file mode 100644 index 07ce26c9b8..0000000000 --- a/mobile/openapi/lib/model/search_explore_response_dto.dart +++ /dev/null @@ -1,108 +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 SearchExploreResponseDto { - /// Returns a new [SearchExploreResponseDto] instance. - SearchExploreResponseDto({ - required this.fieldName, - this.items = const [], - }); - - /// Explore field name - String fieldName; - - List items; - - @override - bool operator ==(Object other) => identical(this, other) || other is SearchExploreResponseDto && - other.fieldName == fieldName && - _deepEquality.equals(other.items, items); - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (fieldName.hashCode) + - (items.hashCode); - - @override - String toString() => 'SearchExploreResponseDto[fieldName=$fieldName, items=$items]'; - - Map toJson() { - final json = {}; - json[r'fieldName'] = this.fieldName; - json[r'items'] = this.items; - return json; - } - - /// Returns a new [SearchExploreResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SearchExploreResponseDto? fromJson(dynamic value) { - upgradeDto(value, "SearchExploreResponseDto"); - if (value is Map) { - final json = value.cast(); - - return SearchExploreResponseDto( - fieldName: mapValueOfType(json, r'fieldName')!, - items: SearchExploreItem.listFromJson(json[r'items']), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SearchExploreResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SearchExploreResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SearchExploreResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SearchExploreResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'fieldName', - 'items', - }; -} - diff --git a/mobile/openapi/lib/model/search_facet_count_response_dto.dart b/mobile/openapi/lib/model/search_facet_count_response_dto.dart deleted file mode 100644 index 62adfaa74a..0000000000 --- a/mobile/openapi/lib/model/search_facet_count_response_dto.dart +++ /dev/null @@ -1,112 +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 SearchFacetCountResponseDto { - /// Returns a new [SearchFacetCountResponseDto] instance. - SearchFacetCountResponseDto({ - required this.count, - required this.value, - }); - - /// Number of assets with this facet value - /// - /// Minimum value: 0 - /// Maximum value: 9007199254740991 - int count; - - /// Facet value - String value; - - @override - bool operator ==(Object other) => identical(this, other) || other is SearchFacetCountResponseDto && - other.count == count && - other.value == value; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (count.hashCode) + - (value.hashCode); - - @override - String toString() => 'SearchFacetCountResponseDto[count=$count, value=$value]'; - - Map toJson() { - final json = {}; - json[r'count'] = this.count; - json[r'value'] = this.value; - return json; - } - - /// Returns a new [SearchFacetCountResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SearchFacetCountResponseDto? fromJson(dynamic value) { - upgradeDto(value, "SearchFacetCountResponseDto"); - if (value is Map) { - final json = value.cast(); - - return SearchFacetCountResponseDto( - count: mapValueOfType(json, r'count')!, - value: mapValueOfType(json, r'value')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SearchFacetCountResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SearchFacetCountResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SearchFacetCountResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SearchFacetCountResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'count', - 'value', - }; -} - diff --git a/mobile/openapi/lib/model/search_facet_response_dto.dart b/mobile/openapi/lib/model/search_facet_response_dto.dart deleted file mode 100644 index 51124ef1cf..0000000000 --- a/mobile/openapi/lib/model/search_facet_response_dto.dart +++ /dev/null @@ -1,108 +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 SearchFacetResponseDto { - /// Returns a new [SearchFacetResponseDto] instance. - SearchFacetResponseDto({ - this.counts = const [], - required this.fieldName, - }); - - List counts; - - /// Facet field name - String fieldName; - - @override - bool operator ==(Object other) => identical(this, other) || other is SearchFacetResponseDto && - _deepEquality.equals(other.counts, counts) && - other.fieldName == fieldName; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (counts.hashCode) + - (fieldName.hashCode); - - @override - String toString() => 'SearchFacetResponseDto[counts=$counts, fieldName=$fieldName]'; - - Map toJson() { - final json = {}; - json[r'counts'] = this.counts; - json[r'fieldName'] = this.fieldName; - return json; - } - - /// Returns a new [SearchFacetResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SearchFacetResponseDto? fromJson(dynamic value) { - upgradeDto(value, "SearchFacetResponseDto"); - if (value is Map) { - final json = value.cast(); - - return SearchFacetResponseDto( - counts: SearchFacetCountResponseDto.listFromJson(json[r'counts']), - fieldName: mapValueOfType(json, r'fieldName')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SearchFacetResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SearchFacetResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SearchFacetResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SearchFacetResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'counts', - 'fieldName', - }; -} - diff --git a/mobile/openapi/lib/model/search_response_dto.dart b/mobile/openapi/lib/model/search_response_dto.dart deleted file mode 100644 index ca742ae35c..0000000000 --- a/mobile/openapi/lib/model/search_response_dto.dart +++ /dev/null @@ -1,107 +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 SearchResponseDto { - /// Returns a new [SearchResponseDto] instance. - SearchResponseDto({ - required this.albums, - required this.assets, - }); - - SearchAlbumResponseDto albums; - - SearchAssetResponseDto assets; - - @override - bool operator ==(Object other) => identical(this, other) || other is SearchResponseDto && - other.albums == albums && - other.assets == assets; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (albums.hashCode) + - (assets.hashCode); - - @override - String toString() => 'SearchResponseDto[albums=$albums, assets=$assets]'; - - Map toJson() { - final json = {}; - json[r'albums'] = this.albums; - json[r'assets'] = this.assets; - return json; - } - - /// Returns a new [SearchResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SearchResponseDto? fromJson(dynamic value) { - upgradeDto(value, "SearchResponseDto"); - if (value is Map) { - final json = value.cast(); - - return SearchResponseDto( - albums: SearchAlbumResponseDto.fromJson(json[r'albums'])!, - assets: SearchAssetResponseDto.fromJson(json[r'assets'])!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SearchResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SearchResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SearchResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SearchResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'albums', - 'assets', - }; -} - diff --git a/mobile/openapi/lib/model/search_statistics_response_dto.dart b/mobile/openapi/lib/model/search_statistics_response_dto.dart deleted file mode 100644 index c4d893af05..0000000000 --- a/mobile/openapi/lib/model/search_statistics_response_dto.dart +++ /dev/null @@ -1,103 +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 SearchStatisticsResponseDto { - /// Returns a new [SearchStatisticsResponseDto] instance. - SearchStatisticsResponseDto({ - required this.total, - }); - - /// Total number of matching assets - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int total; - - @override - bool operator ==(Object other) => identical(this, other) || other is SearchStatisticsResponseDto && - other.total == total; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (total.hashCode); - - @override - String toString() => 'SearchStatisticsResponseDto[total=$total]'; - - Map toJson() { - final json = {}; - json[r'total'] = this.total; - return json; - } - - /// Returns a new [SearchStatisticsResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SearchStatisticsResponseDto? fromJson(dynamic value) { - upgradeDto(value, "SearchStatisticsResponseDto"); - if (value is Map) { - final json = value.cast(); - - return SearchStatisticsResponseDto( - total: mapValueOfType(json, r'total')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SearchStatisticsResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SearchStatisticsResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SearchStatisticsResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SearchStatisticsResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'total', - }; -} - diff --git a/mobile/openapi/lib/model/search_suggestion_type.dart b/mobile/openapi/lib/model/search_suggestion_type.dart deleted file mode 100644 index 6d44b881bd..0000000000 --- a/mobile/openapi/lib/model/search_suggestion_type.dart +++ /dev/null @@ -1,97 +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; - -/// Suggestion type -class SearchSuggestionType { - /// Instantiate a new enum with the provided [value]. - const SearchSuggestionType._(this.value); - - /// The underlying value of this enum member. - final String value; - - @override - String toString() => value; - - String toJson() => value; - - static const country = SearchSuggestionType._(r'country'); - static const state = SearchSuggestionType._(r'state'); - static const city = SearchSuggestionType._(r'city'); - static const cameraMake = SearchSuggestionType._(r'camera-make'); - static const cameraModel = SearchSuggestionType._(r'camera-model'); - static const cameraLensModel = SearchSuggestionType._(r'camera-lens-model'); - - /// List of all possible values in this [enum][SearchSuggestionType]. - static const values = [ - country, - state, - city, - cameraMake, - cameraModel, - cameraLensModel, - ]; - - static SearchSuggestionType? fromJson(dynamic value) => SearchSuggestionTypeTypeTransformer().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 = SearchSuggestionType.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } -} - -/// Transformation class that can [encode] an instance of [SearchSuggestionType] to String, -/// and [decode] dynamic data back to [SearchSuggestionType]. -class SearchSuggestionTypeTypeTransformer { - factory SearchSuggestionTypeTypeTransformer() => _instance ??= const SearchSuggestionTypeTypeTransformer._(); - - const SearchSuggestionTypeTypeTransformer._(); - - String encode(SearchSuggestionType data) => data.value; - - /// Decodes a [dynamic value][data] to a SearchSuggestionType. - /// - /// 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. - SearchSuggestionType? decode(dynamic data, {bool allowNull = true}) { - if (data != null) { - switch (data) { - case r'country': return SearchSuggestionType.country; - case r'state': return SearchSuggestionType.state; - case r'city': return SearchSuggestionType.city; - case r'camera-make': return SearchSuggestionType.cameraMake; - case r'camera-model': return SearchSuggestionType.cameraModel; - case r'camera-lens-model': return SearchSuggestionType.cameraLensModel; - default: - if (!allowNull) { - throw ArgumentError('Unknown enum value to decode: $data'); - } - } - } - return null; - } - - /// Singleton [SearchSuggestionTypeTypeTransformer] instance. - static SearchSuggestionTypeTypeTransformer? _instance; -} - diff --git a/mobile/openapi/lib/model/server_about_response_dto.dart b/mobile/openapi/lib/model/server_about_response_dto.dart deleted file mode 100644 index dcfb279204..0000000000 --- a/mobile/openapi/lib/model/server_about_response_dto.dart +++ /dev/null @@ -1,424 +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 ServerAboutResponseDto { - /// Returns a new [ServerAboutResponseDto] instance. - ServerAboutResponseDto({ - this.build = const Optional.absent(), - this.buildImage = const Optional.absent(), - this.buildImageUrl = const Optional.absent(), - this.buildUrl = const Optional.absent(), - this.exiftool = const Optional.absent(), - this.ffmpeg = const Optional.absent(), - this.imagemagick = const Optional.absent(), - this.libvips = const Optional.absent(), - required this.licensed, - this.nodejs = const Optional.absent(), - this.repository = const Optional.absent(), - this.repositoryUrl = const Optional.absent(), - this.sourceCommit = const Optional.absent(), - this.sourceRef = const Optional.absent(), - this.sourceUrl = const Optional.absent(), - this.thirdPartyBugFeatureUrl = const Optional.absent(), - this.thirdPartyDocumentationUrl = const Optional.absent(), - this.thirdPartySourceUrl = const Optional.absent(), - this.thirdPartySupportUrl = const Optional.absent(), - required this.version, - required this.versionUrl, - }); - - /// Build identifier - /// - /// 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. - /// - Optional build; - - /// Build image name - /// - /// 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. - /// - Optional buildImage; - - /// Build image URL - /// - /// 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. - /// - Optional buildImageUrl; - - /// Build URL - /// - /// 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. - /// - Optional buildUrl; - - /// ExifTool version - /// - /// 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. - /// - Optional exiftool; - - /// FFmpeg version - /// - /// 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. - /// - Optional ffmpeg; - - /// ImageMagick version - /// - /// 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. - /// - Optional imagemagick; - - /// libvips version - /// - /// 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. - /// - Optional libvips; - - /// Whether the server is licensed - bool licensed; - - /// Node.js version - /// - /// 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. - /// - Optional nodejs; - - /// Repository name - /// - /// 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. - /// - Optional repository; - - /// Repository URL - /// - /// 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. - /// - Optional repositoryUrl; - - /// Source commit hash - /// - /// 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. - /// - Optional sourceCommit; - - /// Source reference (branch/tag) - /// - /// 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. - /// - Optional sourceRef; - - /// Source URL - /// - /// 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. - /// - Optional sourceUrl; - - /// Third-party bug/feature URL - /// - /// 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. - /// - Optional thirdPartyBugFeatureUrl; - - /// Third-party documentation URL - /// - /// 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. - /// - Optional thirdPartyDocumentationUrl; - - /// Third-party source URL - /// - /// 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. - /// - Optional thirdPartySourceUrl; - - /// Third-party support URL - /// - /// 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. - /// - Optional thirdPartySupportUrl; - - /// Server version - String version; - - /// URL to version information - String versionUrl; - - @override - bool operator ==(Object other) => identical(this, other) || other is ServerAboutResponseDto && - other.build == build && - other.buildImage == buildImage && - other.buildImageUrl == buildImageUrl && - other.buildUrl == buildUrl && - other.exiftool == exiftool && - other.ffmpeg == ffmpeg && - other.imagemagick == imagemagick && - other.libvips == libvips && - other.licensed == licensed && - other.nodejs == nodejs && - other.repository == repository && - other.repositoryUrl == repositoryUrl && - other.sourceCommit == sourceCommit && - other.sourceRef == sourceRef && - other.sourceUrl == sourceUrl && - other.thirdPartyBugFeatureUrl == thirdPartyBugFeatureUrl && - other.thirdPartyDocumentationUrl == thirdPartyDocumentationUrl && - other.thirdPartySourceUrl == thirdPartySourceUrl && - other.thirdPartySupportUrl == thirdPartySupportUrl && - other.version == version && - other.versionUrl == versionUrl; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (build == null ? 0 : build!.hashCode) + - (buildImage == null ? 0 : buildImage!.hashCode) + - (buildImageUrl == null ? 0 : buildImageUrl!.hashCode) + - (buildUrl == null ? 0 : buildUrl!.hashCode) + - (exiftool == null ? 0 : exiftool!.hashCode) + - (ffmpeg == null ? 0 : ffmpeg!.hashCode) + - (imagemagick == null ? 0 : imagemagick!.hashCode) + - (libvips == null ? 0 : libvips!.hashCode) + - (licensed.hashCode) + - (nodejs == null ? 0 : nodejs!.hashCode) + - (repository == null ? 0 : repository!.hashCode) + - (repositoryUrl == null ? 0 : repositoryUrl!.hashCode) + - (sourceCommit == null ? 0 : sourceCommit!.hashCode) + - (sourceRef == null ? 0 : sourceRef!.hashCode) + - (sourceUrl == null ? 0 : sourceUrl!.hashCode) + - (thirdPartyBugFeatureUrl == null ? 0 : thirdPartyBugFeatureUrl!.hashCode) + - (thirdPartyDocumentationUrl == null ? 0 : thirdPartyDocumentationUrl!.hashCode) + - (thirdPartySourceUrl == null ? 0 : thirdPartySourceUrl!.hashCode) + - (thirdPartySupportUrl == null ? 0 : thirdPartySupportUrl!.hashCode) + - (version.hashCode) + - (versionUrl.hashCode); - - @override - String toString() => 'ServerAboutResponseDto[build=$build, buildImage=$buildImage, buildImageUrl=$buildImageUrl, buildUrl=$buildUrl, exiftool=$exiftool, ffmpeg=$ffmpeg, imagemagick=$imagemagick, libvips=$libvips, licensed=$licensed, nodejs=$nodejs, repository=$repository, repositoryUrl=$repositoryUrl, sourceCommit=$sourceCommit, sourceRef=$sourceRef, sourceUrl=$sourceUrl, thirdPartyBugFeatureUrl=$thirdPartyBugFeatureUrl, thirdPartyDocumentationUrl=$thirdPartyDocumentationUrl, thirdPartySourceUrl=$thirdPartySourceUrl, thirdPartySupportUrl=$thirdPartySupportUrl, version=$version, versionUrl=$versionUrl]'; - - Map toJson() { - final json = {}; - if (this.build.isPresent) { - final value = this.build.value; - json[r'build'] = value; - } - if (this.buildImage.isPresent) { - final value = this.buildImage.value; - json[r'buildImage'] = value; - } - if (this.buildImageUrl.isPresent) { - final value = this.buildImageUrl.value; - json[r'buildImageUrl'] = value; - } - if (this.buildUrl.isPresent) { - final value = this.buildUrl.value; - json[r'buildUrl'] = value; - } - if (this.exiftool.isPresent) { - final value = this.exiftool.value; - json[r'exiftool'] = value; - } - if (this.ffmpeg.isPresent) { - final value = this.ffmpeg.value; - json[r'ffmpeg'] = value; - } - if (this.imagemagick.isPresent) { - final value = this.imagemagick.value; - json[r'imagemagick'] = value; - } - if (this.libvips.isPresent) { - final value = this.libvips.value; - json[r'libvips'] = value; - } - json[r'licensed'] = this.licensed; - if (this.nodejs.isPresent) { - final value = this.nodejs.value; - json[r'nodejs'] = value; - } - if (this.repository.isPresent) { - final value = this.repository.value; - json[r'repository'] = value; - } - if (this.repositoryUrl.isPresent) { - final value = this.repositoryUrl.value; - json[r'repositoryUrl'] = value; - } - if (this.sourceCommit.isPresent) { - final value = this.sourceCommit.value; - json[r'sourceCommit'] = value; - } - if (this.sourceRef.isPresent) { - final value = this.sourceRef.value; - json[r'sourceRef'] = value; - } - if (this.sourceUrl.isPresent) { - final value = this.sourceUrl.value; - json[r'sourceUrl'] = value; - } - if (this.thirdPartyBugFeatureUrl.isPresent) { - final value = this.thirdPartyBugFeatureUrl.value; - json[r'thirdPartyBugFeatureUrl'] = value; - } - if (this.thirdPartyDocumentationUrl.isPresent) { - final value = this.thirdPartyDocumentationUrl.value; - json[r'thirdPartyDocumentationUrl'] = value; - } - if (this.thirdPartySourceUrl.isPresent) { - final value = this.thirdPartySourceUrl.value; - json[r'thirdPartySourceUrl'] = value; - } - if (this.thirdPartySupportUrl.isPresent) { - final value = this.thirdPartySupportUrl.value; - json[r'thirdPartySupportUrl'] = value; - } - json[r'version'] = this.version; - json[r'versionUrl'] = this.versionUrl; - return json; - } - - /// Returns a new [ServerAboutResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static ServerAboutResponseDto? fromJson(dynamic value) { - upgradeDto(value, "ServerAboutResponseDto"); - if (value is Map) { - final json = value.cast(); - - return ServerAboutResponseDto( - build: json.containsKey(r'build') ? Optional.present(mapValueOfType(json, r'build')) : const Optional.absent(), - buildImage: json.containsKey(r'buildImage') ? Optional.present(mapValueOfType(json, r'buildImage')) : const Optional.absent(), - buildImageUrl: json.containsKey(r'buildImageUrl') ? Optional.present(mapValueOfType(json, r'buildImageUrl')) : const Optional.absent(), - buildUrl: json.containsKey(r'buildUrl') ? Optional.present(mapValueOfType(json, r'buildUrl')) : const Optional.absent(), - exiftool: json.containsKey(r'exiftool') ? Optional.present(mapValueOfType(json, r'exiftool')) : const Optional.absent(), - ffmpeg: json.containsKey(r'ffmpeg') ? Optional.present(mapValueOfType(json, r'ffmpeg')) : const Optional.absent(), - imagemagick: json.containsKey(r'imagemagick') ? Optional.present(mapValueOfType(json, r'imagemagick')) : const Optional.absent(), - libvips: json.containsKey(r'libvips') ? Optional.present(mapValueOfType(json, r'libvips')) : const Optional.absent(), - licensed: mapValueOfType(json, r'licensed')!, - nodejs: json.containsKey(r'nodejs') ? Optional.present(mapValueOfType(json, r'nodejs')) : const Optional.absent(), - repository: json.containsKey(r'repository') ? Optional.present(mapValueOfType(json, r'repository')) : const Optional.absent(), - repositoryUrl: json.containsKey(r'repositoryUrl') ? Optional.present(mapValueOfType(json, r'repositoryUrl')) : const Optional.absent(), - sourceCommit: json.containsKey(r'sourceCommit') ? Optional.present(mapValueOfType(json, r'sourceCommit')) : const Optional.absent(), - sourceRef: json.containsKey(r'sourceRef') ? Optional.present(mapValueOfType(json, r'sourceRef')) : const Optional.absent(), - sourceUrl: json.containsKey(r'sourceUrl') ? Optional.present(mapValueOfType(json, r'sourceUrl')) : const Optional.absent(), - thirdPartyBugFeatureUrl: json.containsKey(r'thirdPartyBugFeatureUrl') ? Optional.present(mapValueOfType(json, r'thirdPartyBugFeatureUrl')) : const Optional.absent(), - thirdPartyDocumentationUrl: json.containsKey(r'thirdPartyDocumentationUrl') ? Optional.present(mapValueOfType(json, r'thirdPartyDocumentationUrl')) : const Optional.absent(), - thirdPartySourceUrl: json.containsKey(r'thirdPartySourceUrl') ? Optional.present(mapValueOfType(json, r'thirdPartySourceUrl')) : const Optional.absent(), - thirdPartySupportUrl: json.containsKey(r'thirdPartySupportUrl') ? Optional.present(mapValueOfType(json, r'thirdPartySupportUrl')) : const Optional.absent(), - version: mapValueOfType(json, r'version')!, - versionUrl: mapValueOfType(json, r'versionUrl')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = ServerAboutResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = ServerAboutResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of ServerAboutResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = ServerAboutResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'licensed', - 'version', - 'versionUrl', - }; -} - diff --git a/mobile/openapi/lib/model/server_apk_links_dto.dart b/mobile/openapi/lib/model/server_apk_links_dto.dart deleted file mode 100644 index 2227018468..0000000000 --- a/mobile/openapi/lib/model/server_apk_links_dto.dart +++ /dev/null @@ -1,127 +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 ServerApkLinksDto { - /// Returns a new [ServerApkLinksDto] instance. - ServerApkLinksDto({ - required this.arm64v8a, - required this.armeabiv7a, - required this.universal, - required this.x8664, - }); - - /// APK download link for ARM64 v8a architecture - String arm64v8a; - - /// APK download link for ARM EABI v7a architecture - String armeabiv7a; - - /// APK download link for universal architecture - String universal; - - /// APK download link for x86_64 architecture - String x8664; - - @override - bool operator ==(Object other) => identical(this, other) || other is ServerApkLinksDto && - other.arm64v8a == arm64v8a && - other.armeabiv7a == armeabiv7a && - other.universal == universal && - other.x8664 == x8664; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (arm64v8a.hashCode) + - (armeabiv7a.hashCode) + - (universal.hashCode) + - (x8664.hashCode); - - @override - String toString() => 'ServerApkLinksDto[arm64v8a=$arm64v8a, armeabiv7a=$armeabiv7a, universal=$universal, x8664=$x8664]'; - - Map toJson() { - final json = {}; - json[r'arm64v8a'] = this.arm64v8a; - json[r'armeabiv7a'] = this.armeabiv7a; - json[r'universal'] = this.universal; - json[r'x86_64'] = this.x8664; - return json; - } - - /// Returns a new [ServerApkLinksDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static ServerApkLinksDto? fromJson(dynamic value) { - upgradeDto(value, "ServerApkLinksDto"); - if (value is Map) { - final json = value.cast(); - - return ServerApkLinksDto( - arm64v8a: mapValueOfType(json, r'arm64v8a')!, - armeabiv7a: mapValueOfType(json, r'armeabiv7a')!, - universal: mapValueOfType(json, r'universal')!, - x8664: mapValueOfType(json, r'x86_64')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = ServerApkLinksDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = ServerApkLinksDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of ServerApkLinksDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = ServerApkLinksDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'arm64v8a', - 'armeabiv7a', - 'universal', - 'x86_64', - }; -} - diff --git a/mobile/openapi/lib/model/server_config_dto.dart b/mobile/openapi/lib/model/server_config_dto.dart deleted file mode 100644 index 0eaaec7c7f..0000000000 --- a/mobile/openapi/lib/model/server_config_dto.dart +++ /dev/null @@ -1,208 +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 ServerConfigDto { - /// Returns a new [ServerConfigDto] instance. - ServerConfigDto({ - required this.externalDomain, - required this.isInitialized, - required this.isOnboarded, - required this.loginPageMessage, - required this.maintenanceMode, - required this.mapDarkStyleUrl, - required this.mapLightStyleUrl, - required this.minFaces, - required this.oauthButtonText, - required this.publicUsers, - required this.trashDays, - required this.userDeleteDelay, - }); - - /// External domain URL - String externalDomain; - - /// Whether the server has been initialized - bool isInitialized; - - /// Whether the admin has completed onboarding - bool isOnboarded; - - /// Login page message - String loginPageMessage; - - /// Whether maintenance mode is active - bool maintenanceMode; - - /// Map dark style URL - String mapDarkStyleUrl; - - /// Map light style URL - String mapLightStyleUrl; - - /// People min faces server default - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int minFaces; - - /// OAuth button text - String oauthButtonText; - - /// Whether public user registration is enabled - bool publicUsers; - - /// Number of days before trashed assets are permanently deleted - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int trashDays; - - /// Delay in days before deleted users are permanently removed - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int userDeleteDelay; - - @override - bool operator ==(Object other) => identical(this, other) || other is ServerConfigDto && - other.externalDomain == externalDomain && - other.isInitialized == isInitialized && - other.isOnboarded == isOnboarded && - other.loginPageMessage == loginPageMessage && - other.maintenanceMode == maintenanceMode && - other.mapDarkStyleUrl == mapDarkStyleUrl && - other.mapLightStyleUrl == mapLightStyleUrl && - other.minFaces == minFaces && - other.oauthButtonText == oauthButtonText && - other.publicUsers == publicUsers && - other.trashDays == trashDays && - other.userDeleteDelay == userDeleteDelay; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (externalDomain.hashCode) + - (isInitialized.hashCode) + - (isOnboarded.hashCode) + - (loginPageMessage.hashCode) + - (maintenanceMode.hashCode) + - (mapDarkStyleUrl.hashCode) + - (mapLightStyleUrl.hashCode) + - (minFaces.hashCode) + - (oauthButtonText.hashCode) + - (publicUsers.hashCode) + - (trashDays.hashCode) + - (userDeleteDelay.hashCode); - - @override - String toString() => 'ServerConfigDto[externalDomain=$externalDomain, isInitialized=$isInitialized, isOnboarded=$isOnboarded, loginPageMessage=$loginPageMessage, maintenanceMode=$maintenanceMode, mapDarkStyleUrl=$mapDarkStyleUrl, mapLightStyleUrl=$mapLightStyleUrl, minFaces=$minFaces, oauthButtonText=$oauthButtonText, publicUsers=$publicUsers, trashDays=$trashDays, userDeleteDelay=$userDeleteDelay]'; - - Map toJson() { - final json = {}; - json[r'externalDomain'] = this.externalDomain; - json[r'isInitialized'] = this.isInitialized; - json[r'isOnboarded'] = this.isOnboarded; - json[r'loginPageMessage'] = this.loginPageMessage; - json[r'maintenanceMode'] = this.maintenanceMode; - json[r'mapDarkStyleUrl'] = this.mapDarkStyleUrl; - json[r'mapLightStyleUrl'] = this.mapLightStyleUrl; - json[r'minFaces'] = this.minFaces; - json[r'oauthButtonText'] = this.oauthButtonText; - json[r'publicUsers'] = this.publicUsers; - json[r'trashDays'] = this.trashDays; - json[r'userDeleteDelay'] = this.userDeleteDelay; - return json; - } - - /// Returns a new [ServerConfigDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static ServerConfigDto? fromJson(dynamic value) { - upgradeDto(value, "ServerConfigDto"); - if (value is Map) { - final json = value.cast(); - - return ServerConfigDto( - externalDomain: mapValueOfType(json, r'externalDomain')!, - isInitialized: mapValueOfType(json, r'isInitialized')!, - isOnboarded: mapValueOfType(json, r'isOnboarded')!, - loginPageMessage: mapValueOfType(json, r'loginPageMessage')!, - maintenanceMode: mapValueOfType(json, r'maintenanceMode')!, - mapDarkStyleUrl: mapValueOfType(json, r'mapDarkStyleUrl')!, - mapLightStyleUrl: mapValueOfType(json, r'mapLightStyleUrl')!, - minFaces: mapValueOfType(json, r'minFaces')!, - oauthButtonText: mapValueOfType(json, r'oauthButtonText')!, - publicUsers: mapValueOfType(json, r'publicUsers')!, - trashDays: mapValueOfType(json, r'trashDays')!, - userDeleteDelay: mapValueOfType(json, r'userDeleteDelay')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = ServerConfigDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = ServerConfigDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of ServerConfigDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = ServerConfigDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'externalDomain', - 'isInitialized', - 'isOnboarded', - 'loginPageMessage', - 'maintenanceMode', - 'mapDarkStyleUrl', - 'mapLightStyleUrl', - 'minFaces', - 'oauthButtonText', - 'publicUsers', - 'trashDays', - 'userDeleteDelay', - }; -} - diff --git a/mobile/openapi/lib/model/server_features_dto.dart b/mobile/openapi/lib/model/server_features_dto.dart deleted file mode 100644 index 9b75ef2b32..0000000000 --- a/mobile/openapi/lib/model/server_features_dto.dart +++ /dev/null @@ -1,235 +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 ServerFeaturesDto { - /// Returns a new [ServerFeaturesDto] instance. - ServerFeaturesDto({ - required this.configFile, - required this.duplicateDetection, - required this.email, - required this.facialRecognition, - required this.importFaces, - required this.map, - required this.oauth, - required this.oauthAutoLaunch, - required this.ocr, - required this.passwordLogin, - required this.realtimeTranscoding, - required this.reverseGeocoding, - required this.search, - required this.sidecar, - required this.smartSearch, - required this.trash, - }); - - /// Whether config file is available - bool configFile; - - /// Whether duplicate detection is enabled - bool duplicateDetection; - - /// Whether email notifications are enabled - bool email; - - /// Whether facial recognition is enabled - bool facialRecognition; - - /// Whether face import is enabled - bool importFaces; - - /// Whether map feature is enabled - bool map; - - /// Whether OAuth is enabled - bool oauth; - - /// Whether OAuth auto-launch is enabled - bool oauthAutoLaunch; - - /// Whether OCR is enabled - bool ocr; - - /// Whether password login is enabled - bool passwordLogin; - - /// Whether real-time transcoding is enabled - bool realtimeTranscoding; - - /// Whether reverse geocoding is enabled - bool reverseGeocoding; - - /// Whether search is enabled - bool search; - - /// Whether sidecar files are supported - bool sidecar; - - /// Whether smart search is enabled - bool smartSearch; - - /// Whether trash feature is enabled - bool trash; - - @override - bool operator ==(Object other) => identical(this, other) || other is ServerFeaturesDto && - other.configFile == configFile && - other.duplicateDetection == duplicateDetection && - other.email == email && - other.facialRecognition == facialRecognition && - other.importFaces == importFaces && - other.map == map && - other.oauth == oauth && - other.oauthAutoLaunch == oauthAutoLaunch && - other.ocr == ocr && - other.passwordLogin == passwordLogin && - other.realtimeTranscoding == realtimeTranscoding && - other.reverseGeocoding == reverseGeocoding && - other.search == search && - other.sidecar == sidecar && - other.smartSearch == smartSearch && - other.trash == trash; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (configFile.hashCode) + - (duplicateDetection.hashCode) + - (email.hashCode) + - (facialRecognition.hashCode) + - (importFaces.hashCode) + - (map.hashCode) + - (oauth.hashCode) + - (oauthAutoLaunch.hashCode) + - (ocr.hashCode) + - (passwordLogin.hashCode) + - (realtimeTranscoding.hashCode) + - (reverseGeocoding.hashCode) + - (search.hashCode) + - (sidecar.hashCode) + - (smartSearch.hashCode) + - (trash.hashCode); - - @override - String toString() => 'ServerFeaturesDto[configFile=$configFile, duplicateDetection=$duplicateDetection, email=$email, facialRecognition=$facialRecognition, importFaces=$importFaces, map=$map, oauth=$oauth, oauthAutoLaunch=$oauthAutoLaunch, ocr=$ocr, passwordLogin=$passwordLogin, realtimeTranscoding=$realtimeTranscoding, reverseGeocoding=$reverseGeocoding, search=$search, sidecar=$sidecar, smartSearch=$smartSearch, trash=$trash]'; - - Map toJson() { - final json = {}; - json[r'configFile'] = this.configFile; - json[r'duplicateDetection'] = this.duplicateDetection; - json[r'email'] = this.email; - json[r'facialRecognition'] = this.facialRecognition; - json[r'importFaces'] = this.importFaces; - json[r'map'] = this.map; - json[r'oauth'] = this.oauth; - json[r'oauthAutoLaunch'] = this.oauthAutoLaunch; - json[r'ocr'] = this.ocr; - json[r'passwordLogin'] = this.passwordLogin; - json[r'realtimeTranscoding'] = this.realtimeTranscoding; - json[r'reverseGeocoding'] = this.reverseGeocoding; - json[r'search'] = this.search; - json[r'sidecar'] = this.sidecar; - json[r'smartSearch'] = this.smartSearch; - json[r'trash'] = this.trash; - return json; - } - - /// Returns a new [ServerFeaturesDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static ServerFeaturesDto? fromJson(dynamic value) { - upgradeDto(value, "ServerFeaturesDto"); - if (value is Map) { - final json = value.cast(); - - return ServerFeaturesDto( - configFile: mapValueOfType(json, r'configFile')!, - duplicateDetection: mapValueOfType(json, r'duplicateDetection')!, - email: mapValueOfType(json, r'email')!, - facialRecognition: mapValueOfType(json, r'facialRecognition')!, - importFaces: mapValueOfType(json, r'importFaces')!, - map: mapValueOfType(json, r'map')!, - oauth: mapValueOfType(json, r'oauth')!, - oauthAutoLaunch: mapValueOfType(json, r'oauthAutoLaunch')!, - ocr: mapValueOfType(json, r'ocr')!, - passwordLogin: mapValueOfType(json, r'passwordLogin')!, - realtimeTranscoding: mapValueOfType(json, r'realtimeTranscoding')!, - reverseGeocoding: mapValueOfType(json, r'reverseGeocoding')!, - search: mapValueOfType(json, r'search')!, - sidecar: mapValueOfType(json, r'sidecar')!, - smartSearch: mapValueOfType(json, r'smartSearch')!, - trash: mapValueOfType(json, r'trash')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = ServerFeaturesDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = ServerFeaturesDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of ServerFeaturesDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = ServerFeaturesDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'configFile', - 'duplicateDetection', - 'email', - 'facialRecognition', - 'importFaces', - 'map', - 'oauth', - 'oauthAutoLaunch', - 'ocr', - 'passwordLogin', - 'realtimeTranscoding', - 'reverseGeocoding', - 'search', - 'sidecar', - 'smartSearch', - 'trash', - }; -} - diff --git a/mobile/openapi/lib/model/server_media_types_response_dto.dart b/mobile/openapi/lib/model/server_media_types_response_dto.dart deleted file mode 100644 index 6a2aaeb9e1..0000000000 --- a/mobile/openapi/lib/model/server_media_types_response_dto.dart +++ /dev/null @@ -1,124 +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 ServerMediaTypesResponseDto { - /// Returns a new [ServerMediaTypesResponseDto] instance. - ServerMediaTypesResponseDto({ - this.image = const [], - this.sidecar = const [], - this.video = const [], - }); - - /// Supported image MIME types - List image; - - /// Supported sidecar MIME types - List sidecar; - - /// Supported video MIME types - List video; - - @override - bool operator ==(Object other) => identical(this, other) || other is ServerMediaTypesResponseDto && - _deepEquality.equals(other.image, image) && - _deepEquality.equals(other.sidecar, sidecar) && - _deepEquality.equals(other.video, video); - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (image.hashCode) + - (sidecar.hashCode) + - (video.hashCode); - - @override - String toString() => 'ServerMediaTypesResponseDto[image=$image, sidecar=$sidecar, video=$video]'; - - Map toJson() { - final json = {}; - json[r'image'] = this.image; - json[r'sidecar'] = this.sidecar; - json[r'video'] = this.video; - return json; - } - - /// Returns a new [ServerMediaTypesResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static ServerMediaTypesResponseDto? fromJson(dynamic value) { - upgradeDto(value, "ServerMediaTypesResponseDto"); - if (value is Map) { - final json = value.cast(); - - return ServerMediaTypesResponseDto( - image: json[r'image'] is Iterable - ? (json[r'image'] as Iterable).cast().toList(growable: false) - : const [], - sidecar: json[r'sidecar'] is Iterable - ? (json[r'sidecar'] as Iterable).cast().toList(growable: false) - : const [], - video: json[r'video'] is Iterable - ? (json[r'video'] as Iterable).cast().toList(growable: false) - : const [], - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = ServerMediaTypesResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = ServerMediaTypesResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of ServerMediaTypesResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = ServerMediaTypesResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'image', - 'sidecar', - 'video', - }; -} - diff --git a/mobile/openapi/lib/model/server_ping_response.dart b/mobile/openapi/lib/model/server_ping_response.dart deleted file mode 100644 index 621ebfa294..0000000000 --- a/mobile/openapi/lib/model/server_ping_response.dart +++ /dev/null @@ -1,99 +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 ServerPingResponse { - /// Returns a new [ServerPingResponse] instance. - ServerPingResponse({ - required this.res, - }); - - String res; - - @override - bool operator ==(Object other) => identical(this, other) || other is ServerPingResponse && - other.res == res; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (res.hashCode); - - @override - String toString() => 'ServerPingResponse[res=$res]'; - - Map toJson() { - final json = {}; - json[r'res'] = this.res; - return json; - } - - /// Returns a new [ServerPingResponse] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static ServerPingResponse? fromJson(dynamic value) { - upgradeDto(value, "ServerPingResponse"); - if (value is Map) { - final json = value.cast(); - - return ServerPingResponse( - res: mapValueOfType(json, r'res')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = ServerPingResponse.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = ServerPingResponse.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of ServerPingResponse-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = ServerPingResponse.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'res', - }; -} - diff --git a/mobile/openapi/lib/model/server_stats_response_dto.dart b/mobile/openapi/lib/model/server_stats_response_dto.dart deleted file mode 100644 index 605bd74f41..0000000000 --- a/mobile/openapi/lib/model/server_stats_response_dto.dart +++ /dev/null @@ -1,160 +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 ServerStatsResponseDto { - /// Returns a new [ServerStatsResponseDto] instance. - ServerStatsResponseDto({ - required this.photos, - required this.usage, - this.usageByUser = const [], - required this.usagePhotos, - required this.usageVideos, - required this.videos, - }); - - /// Total number of photos - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int photos; - - /// Total storage usage in bytes - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int usage; - - /// Array of usage for each user - List usageByUser; - - /// Storage usage for photos in bytes - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int usagePhotos; - - /// Storage usage for videos in bytes - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int usageVideos; - - /// Total number of videos - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int videos; - - @override - bool operator ==(Object other) => identical(this, other) || other is ServerStatsResponseDto && - other.photos == photos && - other.usage == usage && - _deepEquality.equals(other.usageByUser, usageByUser) && - other.usagePhotos == usagePhotos && - other.usageVideos == usageVideos && - other.videos == videos; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (photos.hashCode) + - (usage.hashCode) + - (usageByUser.hashCode) + - (usagePhotos.hashCode) + - (usageVideos.hashCode) + - (videos.hashCode); - - @override - String toString() => 'ServerStatsResponseDto[photos=$photos, usage=$usage, usageByUser=$usageByUser, usagePhotos=$usagePhotos, usageVideos=$usageVideos, videos=$videos]'; - - Map toJson() { - final json = {}; - json[r'photos'] = this.photos; - json[r'usage'] = this.usage; - json[r'usageByUser'] = this.usageByUser; - json[r'usagePhotos'] = this.usagePhotos; - json[r'usageVideos'] = this.usageVideos; - json[r'videos'] = this.videos; - return json; - } - - /// Returns a new [ServerStatsResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static ServerStatsResponseDto? fromJson(dynamic value) { - upgradeDto(value, "ServerStatsResponseDto"); - if (value is Map) { - final json = value.cast(); - - return ServerStatsResponseDto( - photos: mapValueOfType(json, r'photos')!, - usage: mapValueOfType(json, r'usage')!, - usageByUser: UsageByUserDto.listFromJson(json[r'usageByUser']), - usagePhotos: mapValueOfType(json, r'usagePhotos')!, - usageVideos: mapValueOfType(json, r'usageVideos')!, - videos: mapValueOfType(json, r'videos')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = ServerStatsResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = ServerStatsResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of ServerStatsResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = ServerStatsResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'photos', - 'usage', - 'usageByUser', - 'usagePhotos', - 'usageVideos', - 'videos', - }; -} - diff --git a/mobile/openapi/lib/model/server_storage_response_dto.dart b/mobile/openapi/lib/model/server_storage_response_dto.dart deleted file mode 100644 index f4f77c7f9b..0000000000 --- a/mobile/openapi/lib/model/server_storage_response_dto.dart +++ /dev/null @@ -1,163 +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 ServerStorageResponseDto { - /// Returns a new [ServerStorageResponseDto] instance. - ServerStorageResponseDto({ - required this.diskAvailable, - required this.diskAvailableRaw, - required this.diskSize, - required this.diskSizeRaw, - required this.diskUsagePercentage, - required this.diskUse, - required this.diskUseRaw, - }); - - /// Available disk space (human-readable format) - String diskAvailable; - - /// Available disk space in bytes - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int diskAvailableRaw; - - /// Total disk size (human-readable format) - String diskSize; - - /// Total disk size in bytes - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int diskSizeRaw; - - /// Disk usage percentage (0-100) - double diskUsagePercentage; - - /// Used disk space (human-readable format) - String diskUse; - - /// Used disk space in bytes - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int diskUseRaw; - - @override - bool operator ==(Object other) => identical(this, other) || other is ServerStorageResponseDto && - other.diskAvailable == diskAvailable && - other.diskAvailableRaw == diskAvailableRaw && - other.diskSize == diskSize && - other.diskSizeRaw == diskSizeRaw && - other.diskUsagePercentage == diskUsagePercentage && - other.diskUse == diskUse && - other.diskUseRaw == diskUseRaw; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (diskAvailable.hashCode) + - (diskAvailableRaw.hashCode) + - (diskSize.hashCode) + - (diskSizeRaw.hashCode) + - (diskUsagePercentage.hashCode) + - (diskUse.hashCode) + - (diskUseRaw.hashCode); - - @override - String toString() => 'ServerStorageResponseDto[diskAvailable=$diskAvailable, diskAvailableRaw=$diskAvailableRaw, diskSize=$diskSize, diskSizeRaw=$diskSizeRaw, diskUsagePercentage=$diskUsagePercentage, diskUse=$diskUse, diskUseRaw=$diskUseRaw]'; - - Map toJson() { - final json = {}; - json[r'diskAvailable'] = this.diskAvailable; - json[r'diskAvailableRaw'] = this.diskAvailableRaw; - json[r'diskSize'] = this.diskSize; - json[r'diskSizeRaw'] = this.diskSizeRaw; - json[r'diskUsagePercentage'] = this.diskUsagePercentage; - json[r'diskUse'] = this.diskUse; - json[r'diskUseRaw'] = this.diskUseRaw; - return json; - } - - /// Returns a new [ServerStorageResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static ServerStorageResponseDto? fromJson(dynamic value) { - upgradeDto(value, "ServerStorageResponseDto"); - if (value is Map) { - final json = value.cast(); - - return ServerStorageResponseDto( - diskAvailable: mapValueOfType(json, r'diskAvailable')!, - diskAvailableRaw: mapValueOfType(json, r'diskAvailableRaw')!, - diskSize: mapValueOfType(json, r'diskSize')!, - diskSizeRaw: mapValueOfType(json, r'diskSizeRaw')!, - diskUsagePercentage: mapValueOfType(json, r'diskUsagePercentage')!, - diskUse: mapValueOfType(json, r'diskUse')!, - diskUseRaw: mapValueOfType(json, r'diskUseRaw')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = ServerStorageResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = ServerStorageResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of ServerStorageResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = ServerStorageResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'diskAvailable', - 'diskAvailableRaw', - 'diskSize', - 'diskSizeRaw', - 'diskUsagePercentage', - 'diskUse', - 'diskUseRaw', - }; -} - diff --git a/mobile/openapi/lib/model/server_version_history_response_dto.dart b/mobile/openapi/lib/model/server_version_history_response_dto.dart deleted file mode 100644 index 4af2933f8d..0000000000 --- a/mobile/openapi/lib/model/server_version_history_response_dto.dart +++ /dev/null @@ -1,120 +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 ServerVersionHistoryResponseDto { - /// Returns a new [ServerVersionHistoryResponseDto] instance. - ServerVersionHistoryResponseDto({ - required this.createdAt, - required this.id, - required this.version, - }); - - /// When this version was first seen - DateTime createdAt; - - /// Version history entry ID - String id; - - /// Version string - String version; - - @override - bool operator ==(Object other) => identical(this, other) || other is ServerVersionHistoryResponseDto && - other.createdAt == createdAt && - other.id == id && - other.version == version; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (createdAt.hashCode) + - (id.hashCode) + - (version.hashCode); - - @override - String toString() => 'ServerVersionHistoryResponseDto[createdAt=$createdAt, id=$id, version=$version]'; - - Map toJson() { - final json = {}; - json[r'createdAt'] = _isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? this.createdAt.millisecondsSinceEpoch - : this.createdAt.toUtc().toIso8601String(); - json[r'id'] = this.id; - json[r'version'] = this.version; - return json; - } - - /// Returns a new [ServerVersionHistoryResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static ServerVersionHistoryResponseDto? fromJson(dynamic value) { - upgradeDto(value, "ServerVersionHistoryResponseDto"); - if (value is Map) { - final json = value.cast(); - - return ServerVersionHistoryResponseDto( - createdAt: mapDateTime(json, r'createdAt', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')!, - id: mapValueOfType(json, r'id')!, - version: mapValueOfType(json, r'version')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = ServerVersionHistoryResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = ServerVersionHistoryResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of ServerVersionHistoryResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = ServerVersionHistoryResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'createdAt', - 'id', - 'version', - }; -} - diff --git a/mobile/openapi/lib/model/server_version_response_dto.dart b/mobile/openapi/lib/model/server_version_response_dto.dart deleted file mode 100644 index 8f4a192920..0000000000 --- a/mobile/openapi/lib/model/server_version_response_dto.dart +++ /dev/null @@ -1,143 +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 ServerVersionResponseDto { - /// Returns a new [ServerVersionResponseDto] instance. - ServerVersionResponseDto({ - required this.major, - required this.minor, - required this.patch_, - required this.prerelease, - }); - - /// Major version number - /// - /// Minimum value: 0 - /// Maximum value: 9007199254740991 - int major; - - /// Minor version number - /// - /// Minimum value: 0 - /// Maximum value: 9007199254740991 - int minor; - - /// Patch version number - /// - /// Minimum value: 0 - /// Maximum value: 9007199254740991 - int patch_; - - /// Pre-release version number - /// - /// Minimum value: 0 - /// Maximum value: 9007199254740991 - int? prerelease; - - @override - bool operator ==(Object other) => identical(this, other) || other is ServerVersionResponseDto && - other.major == major && - other.minor == minor && - other.patch_ == patch_ && - other.prerelease == prerelease; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (major.hashCode) + - (minor.hashCode) + - (patch_.hashCode) + - (prerelease == null ? 0 : prerelease!.hashCode); - - @override - String toString() => 'ServerVersionResponseDto[major=$major, minor=$minor, patch_=$patch_, prerelease=$prerelease]'; - - Map toJson() { - final json = {}; - json[r'major'] = this.major; - json[r'minor'] = this.minor; - json[r'patch'] = this.patch_; - if (this.prerelease != null) { - json[r'prerelease'] = this.prerelease; - } else { - json[r'prerelease'] = null; - } - return json; - } - - /// Returns a new [ServerVersionResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static ServerVersionResponseDto? fromJson(dynamic value) { - upgradeDto(value, "ServerVersionResponseDto"); - if (value is Map) { - final json = value.cast(); - - return ServerVersionResponseDto( - major: mapValueOfType(json, r'major')!, - minor: mapValueOfType(json, r'minor')!, - patch_: mapValueOfType(json, r'patch')!, - prerelease: mapValueOfType(json, r'prerelease'), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = ServerVersionResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = ServerVersionResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of ServerVersionResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = ServerVersionResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'major', - 'minor', - 'patch', - 'prerelease', - }; -} - diff --git a/mobile/openapi/lib/model/session_create_dto.dart b/mobile/openapi/lib/model/session_create_dto.dart deleted file mode 100644 index 8033bb7f71..0000000000 --- a/mobile/openapi/lib/model/session_create_dto.dart +++ /dev/null @@ -1,145 +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 SessionCreateDto { - /// Returns a new [SessionCreateDto] instance. - SessionCreateDto({ - this.deviceOS = const Optional.absent(), - this.deviceType = const Optional.absent(), - this.duration = const Optional.absent(), - }); - - /// Device OS - /// - /// 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. - /// - Optional deviceOS; - - /// Device type - /// - /// 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. - /// - Optional deviceType; - - /// Session duration in seconds - /// - /// Minimum value: 1 - /// Maximum value: 9007199254740991 - /// - /// 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. - /// - Optional duration; - - @override - bool operator ==(Object other) => identical(this, other) || other is SessionCreateDto && - other.deviceOS == deviceOS && - other.deviceType == deviceType && - other.duration == duration; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (deviceOS == null ? 0 : deviceOS!.hashCode) + - (deviceType == null ? 0 : deviceType!.hashCode) + - (duration == null ? 0 : duration!.hashCode); - - @override - String toString() => 'SessionCreateDto[deviceOS=$deviceOS, deviceType=$deviceType, duration=$duration]'; - - Map toJson() { - final json = {}; - if (this.deviceOS.isPresent) { - final value = this.deviceOS.value; - json[r'deviceOS'] = value; - } - if (this.deviceType.isPresent) { - final value = this.deviceType.value; - json[r'deviceType'] = value; - } - if (this.duration.isPresent) { - final value = this.duration.value; - json[r'duration'] = value; - } - return json; - } - - /// Returns a new [SessionCreateDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SessionCreateDto? fromJson(dynamic value) { - upgradeDto(value, "SessionCreateDto"); - if (value is Map) { - final json = value.cast(); - - return SessionCreateDto( - deviceOS: json.containsKey(r'deviceOS') ? Optional.present(mapValueOfType(json, r'deviceOS')) : const Optional.absent(), - deviceType: json.containsKey(r'deviceType') ? Optional.present(mapValueOfType(json, r'deviceType')) : const Optional.absent(), - duration: json.containsKey(r'duration') ? Optional.present(json[r'duration'] == null ? null : int.parse('${json[r'duration']}')) : const Optional.absent(), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SessionCreateDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SessionCreateDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SessionCreateDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SessionCreateDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - }; -} - diff --git a/mobile/openapi/lib/model/session_create_response_dto.dart b/mobile/openapi/lib/model/session_create_response_dto.dart deleted file mode 100644 index 497da9afe8..0000000000 --- a/mobile/openapi/lib/model/session_create_response_dto.dart +++ /dev/null @@ -1,193 +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 SessionCreateResponseDto { - /// Returns a new [SessionCreateResponseDto] instance. - SessionCreateResponseDto({ - required this.appVersion, - required this.createdAt, - required this.current, - required this.deviceOS, - required this.deviceType, - this.expiresAt = const Optional.absent(), - required this.id, - required this.isPendingSyncReset, - required this.token, - required this.updatedAt, - }); - - /// App version - String? appVersion; - - /// Creation date - String createdAt; - - /// Is current session - bool current; - - /// Device OS - String deviceOS; - - /// Device type - String deviceType; - - /// Expiration date - /// - /// 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. - /// - Optional expiresAt; - - /// Session ID - String id; - - /// Is pending sync reset - bool isPendingSyncReset; - - /// Session token - String token; - - /// Last update date - String updatedAt; - - @override - bool operator ==(Object other) => identical(this, other) || other is SessionCreateResponseDto && - other.appVersion == appVersion && - other.createdAt == createdAt && - other.current == current && - other.deviceOS == deviceOS && - other.deviceType == deviceType && - other.expiresAt == expiresAt && - other.id == id && - other.isPendingSyncReset == isPendingSyncReset && - other.token == token && - other.updatedAt == updatedAt; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (appVersion == null ? 0 : appVersion!.hashCode) + - (createdAt.hashCode) + - (current.hashCode) + - (deviceOS.hashCode) + - (deviceType.hashCode) + - (expiresAt == null ? 0 : expiresAt!.hashCode) + - (id.hashCode) + - (isPendingSyncReset.hashCode) + - (token.hashCode) + - (updatedAt.hashCode); - - @override - String toString() => 'SessionCreateResponseDto[appVersion=$appVersion, createdAt=$createdAt, current=$current, deviceOS=$deviceOS, deviceType=$deviceType, expiresAt=$expiresAt, id=$id, isPendingSyncReset=$isPendingSyncReset, token=$token, updatedAt=$updatedAt]'; - - Map toJson() { - final json = {}; - if (this.appVersion != null) { - json[r'appVersion'] = this.appVersion; - } else { - json[r'appVersion'] = null; - } - json[r'createdAt'] = this.createdAt; - json[r'current'] = this.current; - json[r'deviceOS'] = this.deviceOS; - json[r'deviceType'] = this.deviceType; - if (this.expiresAt.isPresent) { - final value = this.expiresAt.value; - json[r'expiresAt'] = value; - } - json[r'id'] = this.id; - json[r'isPendingSyncReset'] = this.isPendingSyncReset; - json[r'token'] = this.token; - json[r'updatedAt'] = this.updatedAt; - return json; - } - - /// Returns a new [SessionCreateResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SessionCreateResponseDto? fromJson(dynamic value) { - upgradeDto(value, "SessionCreateResponseDto"); - if (value is Map) { - final json = value.cast(); - - return SessionCreateResponseDto( - appVersion: mapValueOfType(json, r'appVersion'), - createdAt: mapValueOfType(json, r'createdAt')!, - current: mapValueOfType(json, r'current')!, - deviceOS: mapValueOfType(json, r'deviceOS')!, - deviceType: mapValueOfType(json, r'deviceType')!, - expiresAt: json.containsKey(r'expiresAt') ? Optional.present(mapValueOfType(json, r'expiresAt')) : const Optional.absent(), - id: mapValueOfType(json, r'id')!, - isPendingSyncReset: mapValueOfType(json, r'isPendingSyncReset')!, - token: mapValueOfType(json, r'token')!, - updatedAt: mapValueOfType(json, r'updatedAt')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SessionCreateResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SessionCreateResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SessionCreateResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SessionCreateResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'appVersion', - 'createdAt', - 'current', - 'deviceOS', - 'deviceType', - 'id', - 'isPendingSyncReset', - 'token', - 'updatedAt', - }; -} - diff --git a/mobile/openapi/lib/model/session_response_dto.dart b/mobile/openapi/lib/model/session_response_dto.dart deleted file mode 100644 index e1e20619cb..0000000000 --- a/mobile/openapi/lib/model/session_response_dto.dart +++ /dev/null @@ -1,184 +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 SessionResponseDto { - /// Returns a new [SessionResponseDto] instance. - SessionResponseDto({ - required this.appVersion, - required this.createdAt, - required this.current, - required this.deviceOS, - required this.deviceType, - this.expiresAt = const Optional.absent(), - required this.id, - required this.isPendingSyncReset, - required this.updatedAt, - }); - - /// App version - String? appVersion; - - /// Creation date - String createdAt; - - /// Is current session - bool current; - - /// Device OS - String deviceOS; - - /// Device type - String deviceType; - - /// Expiration date - /// - /// 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. - /// - Optional expiresAt; - - /// Session ID - String id; - - /// Is pending sync reset - bool isPendingSyncReset; - - /// Last update date - String updatedAt; - - @override - bool operator ==(Object other) => identical(this, other) || other is SessionResponseDto && - other.appVersion == appVersion && - other.createdAt == createdAt && - other.current == current && - other.deviceOS == deviceOS && - other.deviceType == deviceType && - other.expiresAt == expiresAt && - other.id == id && - other.isPendingSyncReset == isPendingSyncReset && - other.updatedAt == updatedAt; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (appVersion == null ? 0 : appVersion!.hashCode) + - (createdAt.hashCode) + - (current.hashCode) + - (deviceOS.hashCode) + - (deviceType.hashCode) + - (expiresAt == null ? 0 : expiresAt!.hashCode) + - (id.hashCode) + - (isPendingSyncReset.hashCode) + - (updatedAt.hashCode); - - @override - String toString() => 'SessionResponseDto[appVersion=$appVersion, createdAt=$createdAt, current=$current, deviceOS=$deviceOS, deviceType=$deviceType, expiresAt=$expiresAt, id=$id, isPendingSyncReset=$isPendingSyncReset, updatedAt=$updatedAt]'; - - Map toJson() { - final json = {}; - if (this.appVersion != null) { - json[r'appVersion'] = this.appVersion; - } else { - json[r'appVersion'] = null; - } - json[r'createdAt'] = this.createdAt; - json[r'current'] = this.current; - json[r'deviceOS'] = this.deviceOS; - json[r'deviceType'] = this.deviceType; - if (this.expiresAt.isPresent) { - final value = this.expiresAt.value; - json[r'expiresAt'] = value; - } - json[r'id'] = this.id; - json[r'isPendingSyncReset'] = this.isPendingSyncReset; - json[r'updatedAt'] = this.updatedAt; - return json; - } - - /// Returns a new [SessionResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SessionResponseDto? fromJson(dynamic value) { - upgradeDto(value, "SessionResponseDto"); - if (value is Map) { - final json = value.cast(); - - return SessionResponseDto( - appVersion: mapValueOfType(json, r'appVersion'), - createdAt: mapValueOfType(json, r'createdAt')!, - current: mapValueOfType(json, r'current')!, - deviceOS: mapValueOfType(json, r'deviceOS')!, - deviceType: mapValueOfType(json, r'deviceType')!, - expiresAt: json.containsKey(r'expiresAt') ? Optional.present(mapValueOfType(json, r'expiresAt')) : const Optional.absent(), - id: mapValueOfType(json, r'id')!, - isPendingSyncReset: mapValueOfType(json, r'isPendingSyncReset')!, - updatedAt: mapValueOfType(json, r'updatedAt')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SessionResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SessionResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SessionResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SessionResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'appVersion', - 'createdAt', - 'current', - 'deviceOS', - 'deviceType', - 'id', - 'isPendingSyncReset', - 'updatedAt', - }; -} - diff --git a/mobile/openapi/lib/model/session_unlock_dto.dart b/mobile/openapi/lib/model/session_unlock_dto.dart deleted file mode 100644 index 960b58acf0..0000000000 --- a/mobile/openapi/lib/model/session_unlock_dto.dart +++ /dev/null @@ -1,125 +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 SessionUnlockDto { - /// Returns a new [SessionUnlockDto] instance. - SessionUnlockDto({ - this.password = const Optional.absent(), - this.pinCode = const Optional.absent(), - }); - - /// User password (required if PIN code is not provided) - /// - /// 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. - /// - Optional password; - - /// New PIN code (4-6 digits) - /// - /// 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. - /// - Optional pinCode; - - @override - bool operator ==(Object other) => identical(this, other) || other is SessionUnlockDto && - other.password == password && - other.pinCode == pinCode; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (password == null ? 0 : password!.hashCode) + - (pinCode == null ? 0 : pinCode!.hashCode); - - @override - String toString() => 'SessionUnlockDto[password=$password, pinCode=$pinCode]'; - - Map toJson() { - final json = {}; - if (this.password.isPresent) { - final value = this.password.value; - json[r'password'] = value; - } - if (this.pinCode.isPresent) { - final value = this.pinCode.value; - json[r'pinCode'] = value; - } - return json; - } - - /// Returns a new [SessionUnlockDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SessionUnlockDto? fromJson(dynamic value) { - upgradeDto(value, "SessionUnlockDto"); - if (value is Map) { - final json = value.cast(); - - return SessionUnlockDto( - password: json.containsKey(r'password') ? Optional.present(mapValueOfType(json, r'password')) : const Optional.absent(), - pinCode: json.containsKey(r'pinCode') ? Optional.present(mapValueOfType(json, r'pinCode')) : const Optional.absent(), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SessionUnlockDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SessionUnlockDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SessionUnlockDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SessionUnlockDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - }; -} - diff --git a/mobile/openapi/lib/model/session_update_dto.dart b/mobile/openapi/lib/model/session_update_dto.dart deleted file mode 100644 index 90cbaffaf4..0000000000 --- a/mobile/openapi/lib/model/session_update_dto.dart +++ /dev/null @@ -1,108 +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 SessionUpdateDto { - /// Returns a new [SessionUpdateDto] instance. - SessionUpdateDto({ - this.isPendingSyncReset = const Optional.absent(), - }); - - /// Reset pending sync state - /// - /// 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. - /// - Optional isPendingSyncReset; - - @override - bool operator ==(Object other) => identical(this, other) || other is SessionUpdateDto && - other.isPendingSyncReset == isPendingSyncReset; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (isPendingSyncReset == null ? 0 : isPendingSyncReset!.hashCode); - - @override - String toString() => 'SessionUpdateDto[isPendingSyncReset=$isPendingSyncReset]'; - - Map toJson() { - final json = {}; - if (this.isPendingSyncReset.isPresent) { - final value = this.isPendingSyncReset.value; - json[r'isPendingSyncReset'] = value; - } - return json; - } - - /// Returns a new [SessionUpdateDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SessionUpdateDto? fromJson(dynamic value) { - upgradeDto(value, "SessionUpdateDto"); - if (value is Map) { - final json = value.cast(); - - return SessionUpdateDto( - isPendingSyncReset: json.containsKey(r'isPendingSyncReset') ? Optional.present(mapValueOfType(json, r'isPendingSyncReset')) : const Optional.absent(), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SessionUpdateDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SessionUpdateDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SessionUpdateDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SessionUpdateDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - }; -} - diff --git a/mobile/openapi/lib/model/set_maintenance_mode_dto.dart b/mobile/openapi/lib/model/set_maintenance_mode_dto.dart deleted file mode 100644 index 21f123bb84..0000000000 --- a/mobile/openapi/lib/model/set_maintenance_mode_dto.dart +++ /dev/null @@ -1,116 +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 SetMaintenanceModeDto { - /// Returns a new [SetMaintenanceModeDto] instance. - SetMaintenanceModeDto({ - required this.action, - this.restoreBackupFilename = const Optional.absent(), - }); - - MaintenanceAction action; - - /// Restore backup filename - /// - /// 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. - /// - Optional restoreBackupFilename; - - @override - bool operator ==(Object other) => identical(this, other) || other is SetMaintenanceModeDto && - other.action == action && - other.restoreBackupFilename == restoreBackupFilename; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (action.hashCode) + - (restoreBackupFilename == null ? 0 : restoreBackupFilename!.hashCode); - - @override - String toString() => 'SetMaintenanceModeDto[action=$action, restoreBackupFilename=$restoreBackupFilename]'; - - Map toJson() { - final json = {}; - json[r'action'] = this.action; - if (this.restoreBackupFilename.isPresent) { - final value = this.restoreBackupFilename.value; - json[r'restoreBackupFilename'] = value; - } - return json; - } - - /// Returns a new [SetMaintenanceModeDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SetMaintenanceModeDto? fromJson(dynamic value) { - upgradeDto(value, "SetMaintenanceModeDto"); - if (value is Map) { - final json = value.cast(); - - return SetMaintenanceModeDto( - action: MaintenanceAction.fromJson(json[r'action'])!, - restoreBackupFilename: json.containsKey(r'restoreBackupFilename') ? Optional.present(mapValueOfType(json, r'restoreBackupFilename')) : const Optional.absent(), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SetMaintenanceModeDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SetMaintenanceModeDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SetMaintenanceModeDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SetMaintenanceModeDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'action', - }; -} - diff --git a/mobile/openapi/lib/model/shared_link_create_dto.dart b/mobile/openapi/lib/model/shared_link_create_dto.dart deleted file mode 100644 index f6c7b66181..0000000000 --- a/mobile/openapi/lib/model/shared_link_create_dto.dart +++ /dev/null @@ -1,214 +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 SharedLinkCreateDto { - /// Returns a new [SharedLinkCreateDto] instance. - SharedLinkCreateDto({ - this.albumId = const Optional.absent(), - this.allowDownload = const Optional.present(true), - this.allowUpload = const Optional.absent(), - this.assetIds = const Optional.present(const []), - this.description = const Optional.absent(), - this.expiresAt = const Optional.absent(), - this.password = const Optional.absent(), - this.showMetadata = const Optional.present(true), - this.slug = const Optional.absent(), - required this.type, - }); - - /// Album ID (for album sharing) - /// - /// 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. - /// - Optional albumId; - - /// Allow downloads - Optional allowDownload; - - /// Allow uploads - /// - /// 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. - /// - Optional allowUpload; - - /// Asset IDs (for individual assets) - Optional?> assetIds; - - /// Link description - Optional description; - - /// Expiration date - Optional expiresAt; - - /// Link password - Optional password; - - /// Show metadata - Optional showMetadata; - - /// Custom URL slug - Optional slug; - - SharedLinkType type; - - @override - bool operator ==(Object other) => identical(this, other) || other is SharedLinkCreateDto && - other.albumId == albumId && - other.allowDownload == allowDownload && - other.allowUpload == allowUpload && - _deepEquality.equals(other.assetIds, assetIds) && - other.description == description && - other.expiresAt == expiresAt && - other.password == password && - other.showMetadata == showMetadata && - other.slug == slug && - other.type == type; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (albumId == null ? 0 : albumId!.hashCode) + - (allowDownload.hashCode) + - (allowUpload == null ? 0 : allowUpload!.hashCode) + - (assetIds.hashCode) + - (description == null ? 0 : description!.hashCode) + - (expiresAt == null ? 0 : expiresAt!.hashCode) + - (password == null ? 0 : password!.hashCode) + - (showMetadata.hashCode) + - (slug == null ? 0 : slug!.hashCode) + - (type.hashCode); - - @override - String toString() => 'SharedLinkCreateDto[albumId=$albumId, allowDownload=$allowDownload, allowUpload=$allowUpload, assetIds=$assetIds, description=$description, expiresAt=$expiresAt, password=$password, showMetadata=$showMetadata, slug=$slug, type=$type]'; - - Map toJson() { - final json = {}; - if (this.albumId.isPresent) { - final value = this.albumId.value; - json[r'albumId'] = value; - } - if (this.allowDownload.isPresent) { - final value = this.allowDownload.value; - json[r'allowDownload'] = value; - } - if (this.allowUpload.isPresent) { - final value = this.allowUpload.value; - json[r'allowUpload'] = value; - } - if (this.assetIds.isPresent) { - final value = this.assetIds.value; - json[r'assetIds'] = value; - } - if (this.description.isPresent) { - final value = this.description.value; - json[r'description'] = value; - } - if (this.expiresAt.isPresent) { - final value = this.expiresAt.value; - json[r'expiresAt'] = value == null ? null : (_isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? value.millisecondsSinceEpoch - : value.toUtc().toIso8601String()); - } - if (this.password.isPresent) { - final value = this.password.value; - json[r'password'] = value; - } - if (this.showMetadata.isPresent) { - final value = this.showMetadata.value; - json[r'showMetadata'] = value; - } - if (this.slug.isPresent) { - final value = this.slug.value; - json[r'slug'] = value; - } - json[r'type'] = this.type; - return json; - } - - /// Returns a new [SharedLinkCreateDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SharedLinkCreateDto? fromJson(dynamic value) { - upgradeDto(value, "SharedLinkCreateDto"); - if (value is Map) { - final json = value.cast(); - - return SharedLinkCreateDto( - albumId: json.containsKey(r'albumId') ? Optional.present(mapValueOfType(json, r'albumId')) : const Optional.absent(), - allowDownload: json.containsKey(r'allowDownload') ? Optional.present(mapValueOfType(json, r'allowDownload')) : const Optional.absent(), - allowUpload: json.containsKey(r'allowUpload') ? Optional.present(mapValueOfType(json, r'allowUpload')) : const Optional.absent(), - assetIds: json.containsKey(r'assetIds') ? Optional.present(json[r'assetIds'] is Iterable - ? (json[r'assetIds'] as Iterable).cast().toList(growable: false) - : const []) : const Optional.absent(), - description: json.containsKey(r'description') ? Optional.present(mapValueOfType(json, r'description')) : const Optional.absent(), - expiresAt: json.containsKey(r'expiresAt') ? Optional.present(mapDateTime(json, r'expiresAt', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')) : const Optional.absent(), - password: json.containsKey(r'password') ? Optional.present(mapValueOfType(json, r'password')) : const Optional.absent(), - showMetadata: json.containsKey(r'showMetadata') ? Optional.present(mapValueOfType(json, r'showMetadata')) : const Optional.absent(), - slug: json.containsKey(r'slug') ? Optional.present(mapValueOfType(json, r'slug')) : const Optional.absent(), - type: SharedLinkType.fromJson(json[r'type'])!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SharedLinkCreateDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SharedLinkCreateDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SharedLinkCreateDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SharedLinkCreateDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'type', - }; -} - diff --git a/mobile/openapi/lib/model/shared_link_edit_dto.dart b/mobile/openapi/lib/model/shared_link_edit_dto.dart deleted file mode 100644 index 6cc0353370..0000000000 --- a/mobile/openapi/lib/model/shared_link_edit_dto.dart +++ /dev/null @@ -1,188 +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 SharedLinkEditDto { - /// Returns a new [SharedLinkEditDto] instance. - SharedLinkEditDto({ - this.allowDownload = const Optional.absent(), - this.allowUpload = const Optional.absent(), - this.description = const Optional.absent(), - this.expiresAt = const Optional.absent(), - this.password = const Optional.absent(), - this.showMetadata = const Optional.absent(), - this.slug = const Optional.absent(), - }); - - /// Allow downloads - /// - /// 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. - /// - Optional allowDownload; - - /// Allow uploads - /// - /// 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. - /// - Optional allowUpload; - - /// Link description - Optional description; - - /// Expiration date - Optional expiresAt; - - /// Link password - Optional password; - - /// Show metadata - /// - /// 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. - /// - Optional showMetadata; - - /// Custom URL slug - Optional slug; - - @override - bool operator ==(Object other) => identical(this, other) || other is SharedLinkEditDto && - other.allowDownload == allowDownload && - other.allowUpload == allowUpload && - other.description == description && - other.expiresAt == expiresAt && - other.password == password && - other.showMetadata == showMetadata && - other.slug == slug; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (allowDownload == null ? 0 : allowDownload!.hashCode) + - (allowUpload == null ? 0 : allowUpload!.hashCode) + - (description == null ? 0 : description!.hashCode) + - (expiresAt == null ? 0 : expiresAt!.hashCode) + - (password == null ? 0 : password!.hashCode) + - (showMetadata == null ? 0 : showMetadata!.hashCode) + - (slug == null ? 0 : slug!.hashCode); - - @override - String toString() => 'SharedLinkEditDto[allowDownload=$allowDownload, allowUpload=$allowUpload, description=$description, expiresAt=$expiresAt, password=$password, showMetadata=$showMetadata, slug=$slug]'; - - Map toJson() { - final json = {}; - if (this.allowDownload.isPresent) { - final value = this.allowDownload.value; - json[r'allowDownload'] = value; - } - if (this.allowUpload.isPresent) { - final value = this.allowUpload.value; - json[r'allowUpload'] = value; - } - if (this.description.isPresent) { - final value = this.description.value; - json[r'description'] = value; - } - if (this.expiresAt.isPresent) { - final value = this.expiresAt.value; - json[r'expiresAt'] = value == null ? null : (_isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? value.millisecondsSinceEpoch - : value.toUtc().toIso8601String()); - } - if (this.password.isPresent) { - final value = this.password.value; - json[r'password'] = value; - } - if (this.showMetadata.isPresent) { - final value = this.showMetadata.value; - json[r'showMetadata'] = value; - } - if (this.slug.isPresent) { - final value = this.slug.value; - json[r'slug'] = value; - } - return json; - } - - /// Returns a new [SharedLinkEditDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SharedLinkEditDto? fromJson(dynamic value) { - upgradeDto(value, "SharedLinkEditDto"); - if (value is Map) { - final json = value.cast(); - - return SharedLinkEditDto( - allowDownload: json.containsKey(r'allowDownload') ? Optional.present(mapValueOfType(json, r'allowDownload')) : const Optional.absent(), - allowUpload: json.containsKey(r'allowUpload') ? Optional.present(mapValueOfType(json, r'allowUpload')) : const Optional.absent(), - description: json.containsKey(r'description') ? Optional.present(mapValueOfType(json, r'description')) : const Optional.absent(), - expiresAt: json.containsKey(r'expiresAt') ? Optional.present(mapDateTime(json, r'expiresAt', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')) : const Optional.absent(), - password: json.containsKey(r'password') ? Optional.present(mapValueOfType(json, r'password')) : const Optional.absent(), - showMetadata: json.containsKey(r'showMetadata') ? Optional.present(mapValueOfType(json, r'showMetadata')) : const Optional.absent(), - slug: json.containsKey(r'slug') ? Optional.present(mapValueOfType(json, r'slug')) : const Optional.absent(), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SharedLinkEditDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SharedLinkEditDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SharedLinkEditDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SharedLinkEditDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - }; -} - diff --git a/mobile/openapi/lib/model/shared_link_login_dto.dart b/mobile/openapi/lib/model/shared_link_login_dto.dart deleted file mode 100644 index 1ab1bc9349..0000000000 --- a/mobile/openapi/lib/model/shared_link_login_dto.dart +++ /dev/null @@ -1,100 +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 SharedLinkLoginDto { - /// Returns a new [SharedLinkLoginDto] instance. - SharedLinkLoginDto({ - required this.password, - }); - - /// Shared link password - String password; - - @override - bool operator ==(Object other) => identical(this, other) || other is SharedLinkLoginDto && - other.password == password; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (password.hashCode); - - @override - String toString() => 'SharedLinkLoginDto[password=$password]'; - - Map toJson() { - final json = {}; - json[r'password'] = this.password; - return json; - } - - /// Returns a new [SharedLinkLoginDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SharedLinkLoginDto? fromJson(dynamic value) { - upgradeDto(value, "SharedLinkLoginDto"); - if (value is Map) { - final json = value.cast(); - - return SharedLinkLoginDto( - password: mapValueOfType(json, r'password')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SharedLinkLoginDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SharedLinkLoginDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SharedLinkLoginDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SharedLinkLoginDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'password', - }; -} - diff --git a/mobile/openapi/lib/model/shared_link_response_dto.dart b/mobile/openapi/lib/model/shared_link_response_dto.dart deleted file mode 100644 index 2c86b21515..0000000000 --- a/mobile/openapi/lib/model/shared_link_response_dto.dart +++ /dev/null @@ -1,242 +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 SharedLinkResponseDto { - /// Returns a new [SharedLinkResponseDto] instance. - SharedLinkResponseDto({ - this.album = const Optional.absent(), - required this.allowDownload, - required this.allowUpload, - this.assets = const [], - required this.createdAt, - required this.description, - required this.expiresAt, - required this.id, - required this.key, - required this.password, - required this.showMetadata, - required this.slug, - required this.type, - required this.userId, - }); - - /// - /// 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. - /// - Optional album; - - /// Allow downloads - bool allowDownload; - - /// Allow uploads - bool allowUpload; - - List assets; - - /// Creation date - DateTime createdAt; - - /// Link description - String? description; - - /// Expiration date - DateTime? expiresAt; - - /// Shared link ID - String id; - - /// Encryption key (base64url) - String key; - - /// Has password - String? password; - - /// Show metadata - bool showMetadata; - - /// Custom URL slug - String? slug; - - SharedLinkType type; - - /// Owner user ID - String userId; - - @override - bool operator ==(Object other) => identical(this, other) || other is SharedLinkResponseDto && - other.album == album && - other.allowDownload == allowDownload && - other.allowUpload == allowUpload && - _deepEquality.equals(other.assets, assets) && - other.createdAt == createdAt && - other.description == description && - other.expiresAt == expiresAt && - other.id == id && - other.key == key && - other.password == password && - other.showMetadata == showMetadata && - other.slug == slug && - other.type == type && - other.userId == userId; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (album == null ? 0 : album!.hashCode) + - (allowDownload.hashCode) + - (allowUpload.hashCode) + - (assets.hashCode) + - (createdAt.hashCode) + - (description == null ? 0 : description!.hashCode) + - (expiresAt == null ? 0 : expiresAt!.hashCode) + - (id.hashCode) + - (key.hashCode) + - (password == null ? 0 : password!.hashCode) + - (showMetadata.hashCode) + - (slug == null ? 0 : slug!.hashCode) + - (type.hashCode) + - (userId.hashCode); - - @override - String toString() => 'SharedLinkResponseDto[album=$album, allowDownload=$allowDownload, allowUpload=$allowUpload, assets=$assets, createdAt=$createdAt, description=$description, expiresAt=$expiresAt, id=$id, key=$key, password=$password, showMetadata=$showMetadata, slug=$slug, type=$type, userId=$userId]'; - - Map toJson() { - final json = {}; - if (this.album.isPresent) { - final value = this.album.value; - json[r'album'] = value; - } - json[r'allowDownload'] = this.allowDownload; - json[r'allowUpload'] = this.allowUpload; - json[r'assets'] = this.assets; - json[r'createdAt'] = _isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? this.createdAt.millisecondsSinceEpoch - : this.createdAt.toUtc().toIso8601String(); - if (this.description != null) { - json[r'description'] = this.description; - } else { - json[r'description'] = null; - } - if (this.expiresAt != null) { - json[r'expiresAt'] = _isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? this.expiresAt!.millisecondsSinceEpoch - : this.expiresAt!.toUtc().toIso8601String(); - } else { - json[r'expiresAt'] = null; - } - json[r'id'] = this.id; - json[r'key'] = this.key; - if (this.password != null) { - json[r'password'] = this.password; - } else { - json[r'password'] = null; - } - json[r'showMetadata'] = this.showMetadata; - if (this.slug != null) { - json[r'slug'] = this.slug; - } else { - json[r'slug'] = null; - } - json[r'type'] = this.type; - json[r'userId'] = this.userId; - return json; - } - - /// Returns a new [SharedLinkResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SharedLinkResponseDto? fromJson(dynamic value) { - upgradeDto(value, "SharedLinkResponseDto"); - if (value is Map) { - final json = value.cast(); - - return SharedLinkResponseDto( - album: json.containsKey(r'album') ? Optional.present(AlbumResponseDto.fromJson(json[r'album'])) : const Optional.absent(), - allowDownload: mapValueOfType(json, r'allowDownload')!, - allowUpload: mapValueOfType(json, r'allowUpload')!, - assets: AssetResponseDto.listFromJson(json[r'assets']), - createdAt: mapDateTime(json, r'createdAt', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')!, - description: mapValueOfType(json, r'description'), - expiresAt: mapDateTime(json, r'expiresAt', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/'), - id: mapValueOfType(json, r'id')!, - key: mapValueOfType(json, r'key')!, - password: mapValueOfType(json, r'password'), - showMetadata: mapValueOfType(json, r'showMetadata')!, - slug: mapValueOfType(json, r'slug'), - type: SharedLinkType.fromJson(json[r'type'])!, - userId: mapValueOfType(json, r'userId')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SharedLinkResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SharedLinkResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SharedLinkResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SharedLinkResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'allowDownload', - 'allowUpload', - 'assets', - 'createdAt', - 'description', - 'expiresAt', - 'id', - 'key', - 'password', - 'showMetadata', - 'slug', - 'type', - 'userId', - }; -} - diff --git a/mobile/openapi/lib/model/shared_link_type.dart b/mobile/openapi/lib/model/shared_link_type.dart deleted file mode 100644 index 6a17a9c763..0000000000 --- a/mobile/openapi/lib/model/shared_link_type.dart +++ /dev/null @@ -1,85 +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; - -/// Shared link type -class SharedLinkType { - /// Instantiate a new enum with the provided [value]. - const SharedLinkType._(this.value); - - /// The underlying value of this enum member. - final String value; - - @override - String toString() => value; - - String toJson() => value; - - static const ALBUM = SharedLinkType._(r'ALBUM'); - static const INDIVIDUAL = SharedLinkType._(r'INDIVIDUAL'); - - /// List of all possible values in this [enum][SharedLinkType]. - static const values = [ - ALBUM, - INDIVIDUAL, - ]; - - static SharedLinkType? fromJson(dynamic value) => SharedLinkTypeTypeTransformer().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 = SharedLinkType.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } -} - -/// Transformation class that can [encode] an instance of [SharedLinkType] to String, -/// and [decode] dynamic data back to [SharedLinkType]. -class SharedLinkTypeTypeTransformer { - factory SharedLinkTypeTypeTransformer() => _instance ??= const SharedLinkTypeTypeTransformer._(); - - const SharedLinkTypeTypeTransformer._(); - - String encode(SharedLinkType data) => data.value; - - /// Decodes a [dynamic value][data] to a SharedLinkType. - /// - /// 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. - SharedLinkType? decode(dynamic data, {bool allowNull = true}) { - if (data != null) { - switch (data) { - case r'ALBUM': return SharedLinkType.ALBUM; - case r'INDIVIDUAL': return SharedLinkType.INDIVIDUAL; - default: - if (!allowNull) { - throw ArgumentError('Unknown enum value to decode: $data'); - } - } - } - return null; - } - - /// Singleton [SharedLinkTypeTypeTransformer] instance. - static SharedLinkTypeTypeTransformer? _instance; -} - diff --git a/mobile/openapi/lib/model/shared_links_response.dart b/mobile/openapi/lib/model/shared_links_response.dart deleted file mode 100644 index 2b32a57540..0000000000 --- a/mobile/openapi/lib/model/shared_links_response.dart +++ /dev/null @@ -1,109 +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 SharedLinksResponse { - /// Returns a new [SharedLinksResponse] instance. - SharedLinksResponse({ - required this.enabled, - required this.sidebarWeb, - }); - - /// Whether shared links are enabled - bool enabled; - - /// Whether shared links appear in web sidebar - bool sidebarWeb; - - @override - bool operator ==(Object other) => identical(this, other) || other is SharedLinksResponse && - other.enabled == enabled && - other.sidebarWeb == sidebarWeb; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (enabled.hashCode) + - (sidebarWeb.hashCode); - - @override - String toString() => 'SharedLinksResponse[enabled=$enabled, sidebarWeb=$sidebarWeb]'; - - Map toJson() { - final json = {}; - json[r'enabled'] = this.enabled; - json[r'sidebarWeb'] = this.sidebarWeb; - return json; - } - - /// Returns a new [SharedLinksResponse] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SharedLinksResponse? fromJson(dynamic value) { - upgradeDto(value, "SharedLinksResponse"); - if (value is Map) { - final json = value.cast(); - - return SharedLinksResponse( - enabled: mapValueOfType(json, r'enabled')!, - sidebarWeb: mapValueOfType(json, r'sidebarWeb')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SharedLinksResponse.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SharedLinksResponse.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SharedLinksResponse-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SharedLinksResponse.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'enabled', - 'sidebarWeb', - }; -} - diff --git a/mobile/openapi/lib/model/shared_links_update.dart b/mobile/openapi/lib/model/shared_links_update.dart deleted file mode 100644 index 7c5761e343..0000000000 --- a/mobile/openapi/lib/model/shared_links_update.dart +++ /dev/null @@ -1,125 +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 SharedLinksUpdate { - /// Returns a new [SharedLinksUpdate] instance. - SharedLinksUpdate({ - this.enabled = const Optional.absent(), - this.sidebarWeb = const Optional.absent(), - }); - - /// Whether shared links are enabled - /// - /// 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. - /// - Optional enabled; - - /// Whether shared links appear in web sidebar - /// - /// 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. - /// - Optional sidebarWeb; - - @override - bool operator ==(Object other) => identical(this, other) || other is SharedLinksUpdate && - other.enabled == enabled && - other.sidebarWeb == sidebarWeb; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (enabled == null ? 0 : enabled!.hashCode) + - (sidebarWeb == null ? 0 : sidebarWeb!.hashCode); - - @override - String toString() => 'SharedLinksUpdate[enabled=$enabled, sidebarWeb=$sidebarWeb]'; - - Map toJson() { - final json = {}; - if (this.enabled.isPresent) { - final value = this.enabled.value; - json[r'enabled'] = value; - } - if (this.sidebarWeb.isPresent) { - final value = this.sidebarWeb.value; - json[r'sidebarWeb'] = value; - } - return json; - } - - /// Returns a new [SharedLinksUpdate] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SharedLinksUpdate? fromJson(dynamic value) { - upgradeDto(value, "SharedLinksUpdate"); - if (value is Map) { - final json = value.cast(); - - return SharedLinksUpdate( - enabled: json.containsKey(r'enabled') ? Optional.present(mapValueOfType(json, r'enabled')) : const Optional.absent(), - sidebarWeb: json.containsKey(r'sidebarWeb') ? Optional.present(mapValueOfType(json, r'sidebarWeb')) : const Optional.absent(), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SharedLinksUpdate.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SharedLinksUpdate.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SharedLinksUpdate-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SharedLinksUpdate.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - }; -} - diff --git a/mobile/openapi/lib/model/sign_up_dto.dart b/mobile/openapi/lib/model/sign_up_dto.dart deleted file mode 100644 index 54c8fa07d2..0000000000 --- a/mobile/openapi/lib/model/sign_up_dto.dart +++ /dev/null @@ -1,118 +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 SignUpDto { - /// Returns a new [SignUpDto] instance. - SignUpDto({ - required this.email, - required this.name, - required this.password, - }); - - /// User email - String email; - - /// User name - String name; - - /// User password - String password; - - @override - bool operator ==(Object other) => identical(this, other) || other is SignUpDto && - other.email == email && - other.name == name && - other.password == password; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (email.hashCode) + - (name.hashCode) + - (password.hashCode); - - @override - String toString() => 'SignUpDto[email=$email, name=$name, password=$password]'; - - Map toJson() { - final json = {}; - json[r'email'] = this.email; - json[r'name'] = this.name; - json[r'password'] = this.password; - return json; - } - - /// Returns a new [SignUpDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SignUpDto? fromJson(dynamic value) { - upgradeDto(value, "SignUpDto"); - if (value is Map) { - final json = value.cast(); - - return SignUpDto( - email: mapValueOfType(json, r'email')!, - name: mapValueOfType(json, r'name')!, - password: mapValueOfType(json, r'password')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SignUpDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SignUpDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SignUpDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SignUpDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'email', - 'name', - 'password', - }; -} - diff --git a/mobile/openapi/lib/model/smart_search_dto.dart b/mobile/openapi/lib/model/smart_search_dto.dart deleted file mode 100644 index 70c9a9354e..0000000000 --- a/mobile/openapi/lib/model/smart_search_dto.dart +++ /dev/null @@ -1,632 +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 SmartSearchDto { - /// Returns a new [SmartSearchDto] instance. - SmartSearchDto({ - this.albumIds = const Optional.present(const []), - this.city = const Optional.absent(), - this.country = const Optional.absent(), - this.createdAfter = const Optional.absent(), - this.createdBefore = const Optional.absent(), - this.isEncoded = const Optional.absent(), - this.isFavorite = const Optional.absent(), - this.isMotion = const Optional.absent(), - this.isNotInAlbum = const Optional.absent(), - this.isOffline = const Optional.absent(), - this.language = const Optional.absent(), - this.lensModel = const Optional.absent(), - this.libraryId = const Optional.absent(), - this.make = const Optional.absent(), - this.model = const Optional.absent(), - this.ocr = const Optional.absent(), - this.page = const Optional.absent(), - this.personIds = const Optional.present(const []), - this.query = const Optional.absent(), - this.queryAssetId = const Optional.absent(), - this.rating = const Optional.absent(), - this.size = const Optional.absent(), - this.state = const Optional.absent(), - this.tagIds = const Optional.present(const []), - this.takenAfter = const Optional.absent(), - this.takenBefore = const Optional.absent(), - this.trashedAfter = const Optional.absent(), - this.trashedBefore = const Optional.absent(), - this.type = const Optional.absent(), - this.updatedAfter = const Optional.absent(), - this.updatedBefore = const Optional.absent(), - this.visibility = const Optional.absent(), - this.withDeleted = const Optional.absent(), - this.withExif = const Optional.absent(), - }); - - /// Filter by album IDs - Optional?> albumIds; - - /// Filter by city name - Optional city; - - /// Filter by country name - Optional country; - - /// Filter by creation date (after) - /// - /// 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. - /// - Optional createdAfter; - - /// Filter by creation date (before) - /// - /// 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. - /// - Optional createdBefore; - - /// Filter by encoded status - /// - /// 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. - /// - Optional isEncoded; - - /// Filter by favorite status - /// - /// 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. - /// - Optional isFavorite; - - /// Filter by motion photo status - /// - /// 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. - /// - Optional isMotion; - - /// Filter assets not in any album - /// - /// 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. - /// - Optional isNotInAlbum; - - /// Filter by offline status - /// - /// 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. - /// - Optional isOffline; - - /// Search language code - /// - /// 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. - /// - Optional language; - - /// Filter by lens model - Optional lensModel; - - /// Library ID to filter by - Optional libraryId; - - /// Filter by camera make - Optional make; - - /// Filter by camera model - Optional model; - - /// Filter by OCR text content - /// - /// 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. - /// - Optional ocr; - - /// Page number - /// - /// Minimum value: 1 - /// Maximum value: 9007199254740991 - /// - /// 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. - /// - Optional page; - - /// Filter by person IDs - Optional?> personIds; - - /// Natural language search query - /// - /// 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. - /// - Optional query; - - /// Asset ID to use as search reference - /// - /// 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. - /// - Optional queryAssetId; - - /// Filter by rating [1-5], or null for unrated - /// - /// Minimum value: 1 - /// Maximum value: 5 - Optional rating; - - /// Number of results to return - /// - /// Minimum value: 1 - /// Maximum value: 1000 - /// - /// 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. - /// - Optional size; - - /// Filter by state/province name - Optional state; - - /// Filter by tag IDs - Optional?> tagIds; - - /// Filter by taken date (after) - /// - /// 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. - /// - Optional takenAfter; - - /// Filter by taken date (before) - /// - /// 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. - /// - Optional takenBefore; - - /// Filter by trash date (after) - /// - /// 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. - /// - Optional trashedAfter; - - /// Filter by trash date (before) - /// - /// 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. - /// - Optional trashedBefore; - - /// - /// 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. - /// - Optional type; - - /// Filter by update date (after) - /// - /// 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. - /// - Optional updatedAfter; - - /// Filter by update date (before) - /// - /// 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. - /// - Optional updatedBefore; - - /// - /// 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. - /// - Optional visibility; - - /// Include deleted assets - /// - /// 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. - /// - Optional withDeleted; - - /// Include EXIF data in response - /// - /// 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. - /// - Optional withExif; - - @override - bool operator ==(Object other) => identical(this, other) || other is SmartSearchDto && - _deepEquality.equals(other.albumIds, albumIds) && - other.city == city && - other.country == country && - other.createdAfter == createdAfter && - other.createdBefore == createdBefore && - other.isEncoded == isEncoded && - other.isFavorite == isFavorite && - other.isMotion == isMotion && - other.isNotInAlbum == isNotInAlbum && - other.isOffline == isOffline && - other.language == language && - other.lensModel == lensModel && - other.libraryId == libraryId && - other.make == make && - other.model == model && - other.ocr == ocr && - other.page == page && - _deepEquality.equals(other.personIds, personIds) && - other.query == query && - other.queryAssetId == queryAssetId && - other.rating == rating && - other.size == size && - other.state == state && - _deepEquality.equals(other.tagIds, tagIds) && - other.takenAfter == takenAfter && - other.takenBefore == takenBefore && - other.trashedAfter == trashedAfter && - other.trashedBefore == trashedBefore && - other.type == type && - other.updatedAfter == updatedAfter && - other.updatedBefore == updatedBefore && - other.visibility == visibility && - other.withDeleted == withDeleted && - other.withExif == withExif; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (albumIds.hashCode) + - (city == null ? 0 : city!.hashCode) + - (country == null ? 0 : country!.hashCode) + - (createdAfter == null ? 0 : createdAfter!.hashCode) + - (createdBefore == null ? 0 : createdBefore!.hashCode) + - (isEncoded == null ? 0 : isEncoded!.hashCode) + - (isFavorite == null ? 0 : isFavorite!.hashCode) + - (isMotion == null ? 0 : isMotion!.hashCode) + - (isNotInAlbum == null ? 0 : isNotInAlbum!.hashCode) + - (isOffline == null ? 0 : isOffline!.hashCode) + - (language == null ? 0 : language!.hashCode) + - (lensModel == null ? 0 : lensModel!.hashCode) + - (libraryId == null ? 0 : libraryId!.hashCode) + - (make == null ? 0 : make!.hashCode) + - (model == null ? 0 : model!.hashCode) + - (ocr == null ? 0 : ocr!.hashCode) + - (page == null ? 0 : page!.hashCode) + - (personIds.hashCode) + - (query == null ? 0 : query!.hashCode) + - (queryAssetId == null ? 0 : queryAssetId!.hashCode) + - (rating == null ? 0 : rating!.hashCode) + - (size == null ? 0 : size!.hashCode) + - (state == null ? 0 : state!.hashCode) + - (tagIds == null ? 0 : tagIds!.hashCode) + - (takenAfter == null ? 0 : takenAfter!.hashCode) + - (takenBefore == null ? 0 : takenBefore!.hashCode) + - (trashedAfter == null ? 0 : trashedAfter!.hashCode) + - (trashedBefore == null ? 0 : trashedBefore!.hashCode) + - (type == null ? 0 : type!.hashCode) + - (updatedAfter == null ? 0 : updatedAfter!.hashCode) + - (updatedBefore == null ? 0 : updatedBefore!.hashCode) + - (visibility == null ? 0 : visibility!.hashCode) + - (withDeleted == null ? 0 : withDeleted!.hashCode) + - (withExif == null ? 0 : withExif!.hashCode); - - @override - String toString() => 'SmartSearchDto[albumIds=$albumIds, city=$city, country=$country, createdAfter=$createdAfter, createdBefore=$createdBefore, isEncoded=$isEncoded, isFavorite=$isFavorite, isMotion=$isMotion, isNotInAlbum=$isNotInAlbum, isOffline=$isOffline, language=$language, lensModel=$lensModel, libraryId=$libraryId, make=$make, model=$model, ocr=$ocr, page=$page, personIds=$personIds, query=$query, queryAssetId=$queryAssetId, rating=$rating, size=$size, state=$state, tagIds=$tagIds, takenAfter=$takenAfter, takenBefore=$takenBefore, trashedAfter=$trashedAfter, trashedBefore=$trashedBefore, type=$type, updatedAfter=$updatedAfter, updatedBefore=$updatedBefore, visibility=$visibility, withDeleted=$withDeleted, withExif=$withExif]'; - - Map toJson() { - final json = {}; - if (this.albumIds.isPresent) { - final value = this.albumIds.value; - json[r'albumIds'] = value; - } - if (this.city.isPresent) { - final value = this.city.value; - json[r'city'] = value; - } - if (this.country.isPresent) { - final value = this.country.value; - json[r'country'] = value; - } - if (this.createdAfter.isPresent) { - final value = this.createdAfter.value; - json[r'createdAfter'] = value == null ? null : (_isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? value.millisecondsSinceEpoch - : value.toUtc().toIso8601String()); - } - if (this.createdBefore.isPresent) { - final value = this.createdBefore.value; - json[r'createdBefore'] = value == null ? null : (_isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? value.millisecondsSinceEpoch - : value.toUtc().toIso8601String()); - } - if (this.isEncoded.isPresent) { - final value = this.isEncoded.value; - json[r'isEncoded'] = value; - } - if (this.isFavorite.isPresent) { - final value = this.isFavorite.value; - json[r'isFavorite'] = value; - } - if (this.isMotion.isPresent) { - final value = this.isMotion.value; - json[r'isMotion'] = value; - } - if (this.isNotInAlbum.isPresent) { - final value = this.isNotInAlbum.value; - json[r'isNotInAlbum'] = value; - } - if (this.isOffline.isPresent) { - final value = this.isOffline.value; - json[r'isOffline'] = value; - } - if (this.language.isPresent) { - final value = this.language.value; - json[r'language'] = value; - } - if (this.lensModel.isPresent) { - final value = this.lensModel.value; - json[r'lensModel'] = value; - } - if (this.libraryId.isPresent) { - final value = this.libraryId.value; - json[r'libraryId'] = value; - } - if (this.make.isPresent) { - final value = this.make.value; - json[r'make'] = value; - } - if (this.model.isPresent) { - final value = this.model.value; - json[r'model'] = value; - } - if (this.ocr.isPresent) { - final value = this.ocr.value; - json[r'ocr'] = value; - } - if (this.page.isPresent) { - final value = this.page.value; - json[r'page'] = value; - } - if (this.personIds.isPresent) { - final value = this.personIds.value; - json[r'personIds'] = value; - } - if (this.query.isPresent) { - final value = this.query.value; - json[r'query'] = value; - } - if (this.queryAssetId.isPresent) { - final value = this.queryAssetId.value; - json[r'queryAssetId'] = value; - } - if (this.rating.isPresent) { - final value = this.rating.value; - json[r'rating'] = value; - } - if (this.size.isPresent) { - final value = this.size.value; - json[r'size'] = value; - } - if (this.state.isPresent) { - final value = this.state.value; - json[r'state'] = value; - } - if (this.tagIds.isPresent) { - final value = this.tagIds.value; - json[r'tagIds'] = value; - } - if (this.takenAfter.isPresent) { - final value = this.takenAfter.value; - json[r'takenAfter'] = value == null ? null : (_isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? value.millisecondsSinceEpoch - : value.toUtc().toIso8601String()); - } - if (this.takenBefore.isPresent) { - final value = this.takenBefore.value; - json[r'takenBefore'] = value == null ? null : (_isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? value.millisecondsSinceEpoch - : value.toUtc().toIso8601String()); - } - if (this.trashedAfter.isPresent) { - final value = this.trashedAfter.value; - json[r'trashedAfter'] = value == null ? null : (_isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? value.millisecondsSinceEpoch - : value.toUtc().toIso8601String()); - } - if (this.trashedBefore.isPresent) { - final value = this.trashedBefore.value; - json[r'trashedBefore'] = value == null ? null : (_isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? value.millisecondsSinceEpoch - : value.toUtc().toIso8601String()); - } - if (this.type.isPresent) { - final value = this.type.value; - json[r'type'] = value; - } - if (this.updatedAfter.isPresent) { - final value = this.updatedAfter.value; - json[r'updatedAfter'] = value == null ? null : (_isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? value.millisecondsSinceEpoch - : value.toUtc().toIso8601String()); - } - if (this.updatedBefore.isPresent) { - final value = this.updatedBefore.value; - json[r'updatedBefore'] = value == null ? null : (_isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? value.millisecondsSinceEpoch - : value.toUtc().toIso8601String()); - } - if (this.visibility.isPresent) { - final value = this.visibility.value; - json[r'visibility'] = value; - } - if (this.withDeleted.isPresent) { - final value = this.withDeleted.value; - json[r'withDeleted'] = value; - } - if (this.withExif.isPresent) { - final value = this.withExif.value; - json[r'withExif'] = value; - } - return json; - } - - /// Returns a new [SmartSearchDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SmartSearchDto? fromJson(dynamic value) { - upgradeDto(value, "SmartSearchDto"); - if (value is Map) { - final json = value.cast(); - - return SmartSearchDto( - albumIds: json.containsKey(r'albumIds') ? Optional.present(json[r'albumIds'] is Iterable - ? (json[r'albumIds'] as Iterable).cast().toList(growable: false) - : const []) : const Optional.absent(), - city: json.containsKey(r'city') ? Optional.present(mapValueOfType(json, r'city')) : const Optional.absent(), - country: json.containsKey(r'country') ? Optional.present(mapValueOfType(json, r'country')) : const Optional.absent(), - createdAfter: json.containsKey(r'createdAfter') ? Optional.present(mapDateTime(json, r'createdAfter', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')) : const Optional.absent(), - createdBefore: json.containsKey(r'createdBefore') ? Optional.present(mapDateTime(json, r'createdBefore', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')) : const Optional.absent(), - isEncoded: json.containsKey(r'isEncoded') ? Optional.present(mapValueOfType(json, r'isEncoded')) : const Optional.absent(), - isFavorite: json.containsKey(r'isFavorite') ? Optional.present(mapValueOfType(json, r'isFavorite')) : const Optional.absent(), - isMotion: json.containsKey(r'isMotion') ? Optional.present(mapValueOfType(json, r'isMotion')) : const Optional.absent(), - isNotInAlbum: json.containsKey(r'isNotInAlbum') ? Optional.present(mapValueOfType(json, r'isNotInAlbum')) : const Optional.absent(), - isOffline: json.containsKey(r'isOffline') ? Optional.present(mapValueOfType(json, r'isOffline')) : const Optional.absent(), - language: json.containsKey(r'language') ? Optional.present(mapValueOfType(json, r'language')) : const Optional.absent(), - lensModel: json.containsKey(r'lensModel') ? Optional.present(mapValueOfType(json, r'lensModel')) : const Optional.absent(), - libraryId: json.containsKey(r'libraryId') ? Optional.present(mapValueOfType(json, r'libraryId')) : const Optional.absent(), - make: json.containsKey(r'make') ? Optional.present(mapValueOfType(json, r'make')) : const Optional.absent(), - model: json.containsKey(r'model') ? Optional.present(mapValueOfType(json, r'model')) : const Optional.absent(), - ocr: json.containsKey(r'ocr') ? Optional.present(mapValueOfType(json, r'ocr')) : const Optional.absent(), - page: json.containsKey(r'page') ? Optional.present(json[r'page'] == null ? null : int.parse('${json[r'page']}')) : const Optional.absent(), - personIds: json.containsKey(r'personIds') ? Optional.present(json[r'personIds'] is Iterable - ? (json[r'personIds'] as Iterable).cast().toList(growable: false) - : const []) : const Optional.absent(), - query: json.containsKey(r'query') ? Optional.present(mapValueOfType(json, r'query')) : const Optional.absent(), - queryAssetId: json.containsKey(r'queryAssetId') ? Optional.present(mapValueOfType(json, r'queryAssetId')) : const Optional.absent(), - rating: json.containsKey(r'rating') ? Optional.present(json[r'rating'] == null ? null : int.parse('${json[r'rating']}')) : const Optional.absent(), - size: json.containsKey(r'size') ? Optional.present(json[r'size'] == null ? null : int.parse('${json[r'size']}')) : const Optional.absent(), - state: json.containsKey(r'state') ? Optional.present(mapValueOfType(json, r'state')) : const Optional.absent(), - tagIds: json.containsKey(r'tagIds') ? Optional.present(json[r'tagIds'] is Iterable - ? (json[r'tagIds'] as Iterable).cast().toList(growable: false) - : const []) : const Optional.absent(), - takenAfter: json.containsKey(r'takenAfter') ? Optional.present(mapDateTime(json, r'takenAfter', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')) : const Optional.absent(), - takenBefore: json.containsKey(r'takenBefore') ? Optional.present(mapDateTime(json, r'takenBefore', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')) : const Optional.absent(), - trashedAfter: json.containsKey(r'trashedAfter') ? Optional.present(mapDateTime(json, r'trashedAfter', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')) : const Optional.absent(), - trashedBefore: json.containsKey(r'trashedBefore') ? Optional.present(mapDateTime(json, r'trashedBefore', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')) : const Optional.absent(), - type: json.containsKey(r'type') ? Optional.present(AssetTypeEnum.fromJson(json[r'type'])) : const Optional.absent(), - updatedAfter: json.containsKey(r'updatedAfter') ? Optional.present(mapDateTime(json, r'updatedAfter', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')) : const Optional.absent(), - updatedBefore: json.containsKey(r'updatedBefore') ? Optional.present(mapDateTime(json, r'updatedBefore', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')) : const Optional.absent(), - visibility: json.containsKey(r'visibility') ? Optional.present(AssetVisibility.fromJson(json[r'visibility'])) : const Optional.absent(), - withDeleted: json.containsKey(r'withDeleted') ? Optional.present(mapValueOfType(json, r'withDeleted')) : const Optional.absent(), - withExif: json.containsKey(r'withExif') ? Optional.present(mapValueOfType(json, r'withExif')) : const Optional.absent(), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SmartSearchDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SmartSearchDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SmartSearchDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SmartSearchDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - }; -} - diff --git a/mobile/openapi/lib/model/source_type.dart b/mobile/openapi/lib/model/source_type.dart deleted file mode 100644 index ed164172a3..0000000000 --- a/mobile/openapi/lib/model/source_type.dart +++ /dev/null @@ -1,88 +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; - -/// Face detection source type -class SourceType { - /// Instantiate a new enum with the provided [value]. - const SourceType._(this.value); - - /// The underlying value of this enum member. - final String value; - - @override - String toString() => value; - - String toJson() => value; - - static const machineLearning = SourceType._(r'machine-learning'); - static const exif = SourceType._(r'exif'); - static const manual = SourceType._(r'manual'); - - /// List of all possible values in this [enum][SourceType]. - static const values = [ - machineLearning, - exif, - manual, - ]; - - static SourceType? fromJson(dynamic value) => SourceTypeTypeTransformer().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 = SourceType.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } -} - -/// Transformation class that can [encode] an instance of [SourceType] to String, -/// and [decode] dynamic data back to [SourceType]. -class SourceTypeTypeTransformer { - factory SourceTypeTypeTransformer() => _instance ??= const SourceTypeTypeTransformer._(); - - const SourceTypeTypeTransformer._(); - - String encode(SourceType data) => data.value; - - /// Decodes a [dynamic value][data] to a SourceType. - /// - /// 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. - SourceType? decode(dynamic data, {bool allowNull = true}) { - if (data != null) { - switch (data) { - case r'machine-learning': return SourceType.machineLearning; - case r'exif': return SourceType.exif; - case r'manual': return SourceType.manual; - default: - if (!allowNull) { - throw ArgumentError('Unknown enum value to decode: $data'); - } - } - } - return null; - } - - /// Singleton [SourceTypeTypeTransformer] instance. - static SourceTypeTypeTransformer? _instance; -} - diff --git a/mobile/openapi/lib/model/stack_create_dto.dart b/mobile/openapi/lib/model/stack_create_dto.dart deleted file mode 100644 index 6b08c83401..0000000000 --- a/mobile/openapi/lib/model/stack_create_dto.dart +++ /dev/null @@ -1,102 +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 StackCreateDto { - /// Returns a new [StackCreateDto] instance. - StackCreateDto({ - this.assetIds = const [], - }); - - /// Asset IDs (first becomes primary, min 2) - List assetIds; - - @override - bool operator ==(Object other) => identical(this, other) || other is StackCreateDto && - _deepEquality.equals(other.assetIds, assetIds); - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (assetIds.hashCode); - - @override - String toString() => 'StackCreateDto[assetIds=$assetIds]'; - - Map toJson() { - final json = {}; - json[r'assetIds'] = this.assetIds; - return json; - } - - /// Returns a new [StackCreateDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static StackCreateDto? fromJson(dynamic value) { - upgradeDto(value, "StackCreateDto"); - if (value is Map) { - final json = value.cast(); - - return StackCreateDto( - assetIds: json[r'assetIds'] is Iterable - ? (json[r'assetIds'] as Iterable).cast().toList(growable: false) - : const [], - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = StackCreateDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = StackCreateDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of StackCreateDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = StackCreateDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'assetIds', - }; -} - diff --git a/mobile/openapi/lib/model/stack_response_dto.dart b/mobile/openapi/lib/model/stack_response_dto.dart deleted file mode 100644 index 326f83a03d..0000000000 --- a/mobile/openapi/lib/model/stack_response_dto.dart +++ /dev/null @@ -1,117 +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 StackResponseDto { - /// Returns a new [StackResponseDto] instance. - StackResponseDto({ - this.assets = const [], - required this.id, - required this.primaryAssetId, - }); - - List assets; - - /// Stack ID - String id; - - /// Primary asset ID - String primaryAssetId; - - @override - bool operator ==(Object other) => identical(this, other) || other is StackResponseDto && - _deepEquality.equals(other.assets, assets) && - other.id == id && - other.primaryAssetId == primaryAssetId; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (assets.hashCode) + - (id.hashCode) + - (primaryAssetId.hashCode); - - @override - String toString() => 'StackResponseDto[assets=$assets, id=$id, primaryAssetId=$primaryAssetId]'; - - Map toJson() { - final json = {}; - json[r'assets'] = this.assets; - json[r'id'] = this.id; - json[r'primaryAssetId'] = this.primaryAssetId; - return json; - } - - /// Returns a new [StackResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static StackResponseDto? fromJson(dynamic value) { - upgradeDto(value, "StackResponseDto"); - if (value is Map) { - final json = value.cast(); - - return StackResponseDto( - assets: AssetResponseDto.listFromJson(json[r'assets']), - id: mapValueOfType(json, r'id')!, - primaryAssetId: mapValueOfType(json, r'primaryAssetId')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = StackResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = StackResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of StackResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = StackResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'assets', - 'id', - 'primaryAssetId', - }; -} - diff --git a/mobile/openapi/lib/model/stack_update_dto.dart b/mobile/openapi/lib/model/stack_update_dto.dart deleted file mode 100644 index 98787f3a43..0000000000 --- a/mobile/openapi/lib/model/stack_update_dto.dart +++ /dev/null @@ -1,108 +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 StackUpdateDto { - /// Returns a new [StackUpdateDto] instance. - StackUpdateDto({ - this.primaryAssetId = const Optional.absent(), - }); - - /// Primary asset ID - /// - /// 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. - /// - Optional primaryAssetId; - - @override - bool operator ==(Object other) => identical(this, other) || other is StackUpdateDto && - other.primaryAssetId == primaryAssetId; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (primaryAssetId == null ? 0 : primaryAssetId!.hashCode); - - @override - String toString() => 'StackUpdateDto[primaryAssetId=$primaryAssetId]'; - - Map toJson() { - final json = {}; - if (this.primaryAssetId.isPresent) { - final value = this.primaryAssetId.value; - json[r'primaryAssetId'] = value; - } - return json; - } - - /// Returns a new [StackUpdateDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static StackUpdateDto? fromJson(dynamic value) { - upgradeDto(value, "StackUpdateDto"); - if (value is Map) { - final json = value.cast(); - - return StackUpdateDto( - primaryAssetId: json.containsKey(r'primaryAssetId') ? Optional.present(mapValueOfType(json, r'primaryAssetId')) : const Optional.absent(), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = StackUpdateDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = StackUpdateDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of StackUpdateDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = StackUpdateDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - }; -} - diff --git a/mobile/openapi/lib/model/statistics_search_dto.dart b/mobile/openapi/lib/model/statistics_search_dto.dart deleted file mode 100644 index 37328cd7f4..0000000000 --- a/mobile/openapi/lib/model/statistics_search_dto.dart +++ /dev/null @@ -1,524 +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 StatisticsSearchDto { - /// Returns a new [StatisticsSearchDto] instance. - StatisticsSearchDto({ - this.albumIds = const Optional.present(const []), - this.city = const Optional.absent(), - this.country = const Optional.absent(), - this.createdAfter = const Optional.absent(), - this.createdBefore = const Optional.absent(), - this.description = const Optional.absent(), - this.isEncoded = const Optional.absent(), - this.isFavorite = const Optional.absent(), - this.isMotion = const Optional.absent(), - this.isNotInAlbum = const Optional.absent(), - this.isOffline = const Optional.absent(), - this.lensModel = const Optional.absent(), - this.libraryId = const Optional.absent(), - this.make = const Optional.absent(), - this.model = const Optional.absent(), - this.ocr = const Optional.absent(), - this.personIds = const Optional.present(const []), - this.rating = const Optional.absent(), - this.state = const Optional.absent(), - this.tagIds = const Optional.present(const []), - this.takenAfter = const Optional.absent(), - this.takenBefore = const Optional.absent(), - this.trashedAfter = const Optional.absent(), - this.trashedBefore = const Optional.absent(), - this.type = const Optional.absent(), - this.updatedAfter = const Optional.absent(), - this.updatedBefore = const Optional.absent(), - this.visibility = const Optional.absent(), - }); - - /// Filter by album IDs - Optional?> albumIds; - - /// Filter by city name - Optional city; - - /// Filter by country name - Optional country; - - /// Filter by creation date (after) - /// - /// 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. - /// - Optional createdAfter; - - /// Filter by creation date (before) - /// - /// 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. - /// - Optional createdBefore; - - /// Filter by description text - /// - /// 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. - /// - Optional description; - - /// Filter by encoded status - /// - /// 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. - /// - Optional isEncoded; - - /// Filter by favorite status - /// - /// 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. - /// - Optional isFavorite; - - /// Filter by motion photo status - /// - /// 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. - /// - Optional isMotion; - - /// Filter assets not in any album - /// - /// 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. - /// - Optional isNotInAlbum; - - /// Filter by offline status - /// - /// 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. - /// - Optional isOffline; - - /// Filter by lens model - Optional lensModel; - - /// Library ID to filter by - Optional libraryId; - - /// Filter by camera make - Optional make; - - /// Filter by camera model - Optional model; - - /// Filter by OCR text content - /// - /// 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. - /// - Optional ocr; - - /// Filter by person IDs - Optional?> personIds; - - /// Filter by rating [1-5], or null for unrated - /// - /// Minimum value: 1 - /// Maximum value: 5 - Optional rating; - - /// Filter by state/province name - Optional state; - - /// Filter by tag IDs - Optional?> tagIds; - - /// Filter by taken date (after) - /// - /// 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. - /// - Optional takenAfter; - - /// Filter by taken date (before) - /// - /// 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. - /// - Optional takenBefore; - - /// Filter by trash date (after) - /// - /// 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. - /// - Optional trashedAfter; - - /// Filter by trash date (before) - /// - /// 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. - /// - Optional trashedBefore; - - /// - /// 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. - /// - Optional type; - - /// Filter by update date (after) - /// - /// 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. - /// - Optional updatedAfter; - - /// Filter by update date (before) - /// - /// 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. - /// - Optional updatedBefore; - - /// - /// 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. - /// - Optional visibility; - - @override - bool operator ==(Object other) => identical(this, other) || other is StatisticsSearchDto && - _deepEquality.equals(other.albumIds, albumIds) && - other.city == city && - other.country == country && - other.createdAfter == createdAfter && - other.createdBefore == createdBefore && - other.description == description && - other.isEncoded == isEncoded && - other.isFavorite == isFavorite && - other.isMotion == isMotion && - other.isNotInAlbum == isNotInAlbum && - other.isOffline == isOffline && - other.lensModel == lensModel && - other.libraryId == libraryId && - other.make == make && - other.model == model && - other.ocr == ocr && - _deepEquality.equals(other.personIds, personIds) && - other.rating == rating && - other.state == state && - _deepEquality.equals(other.tagIds, tagIds) && - other.takenAfter == takenAfter && - other.takenBefore == takenBefore && - other.trashedAfter == trashedAfter && - other.trashedBefore == trashedBefore && - other.type == type && - other.updatedAfter == updatedAfter && - other.updatedBefore == updatedBefore && - other.visibility == visibility; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (albumIds.hashCode) + - (city == null ? 0 : city!.hashCode) + - (country == null ? 0 : country!.hashCode) + - (createdAfter == null ? 0 : createdAfter!.hashCode) + - (createdBefore == null ? 0 : createdBefore!.hashCode) + - (description == null ? 0 : description!.hashCode) + - (isEncoded == null ? 0 : isEncoded!.hashCode) + - (isFavorite == null ? 0 : isFavorite!.hashCode) + - (isMotion == null ? 0 : isMotion!.hashCode) + - (isNotInAlbum == null ? 0 : isNotInAlbum!.hashCode) + - (isOffline == null ? 0 : isOffline!.hashCode) + - (lensModel == null ? 0 : lensModel!.hashCode) + - (libraryId == null ? 0 : libraryId!.hashCode) + - (make == null ? 0 : make!.hashCode) + - (model == null ? 0 : model!.hashCode) + - (ocr == null ? 0 : ocr!.hashCode) + - (personIds.hashCode) + - (rating == null ? 0 : rating!.hashCode) + - (state == null ? 0 : state!.hashCode) + - (tagIds == null ? 0 : tagIds!.hashCode) + - (takenAfter == null ? 0 : takenAfter!.hashCode) + - (takenBefore == null ? 0 : takenBefore!.hashCode) + - (trashedAfter == null ? 0 : trashedAfter!.hashCode) + - (trashedBefore == null ? 0 : trashedBefore!.hashCode) + - (type == null ? 0 : type!.hashCode) + - (updatedAfter == null ? 0 : updatedAfter!.hashCode) + - (updatedBefore == null ? 0 : updatedBefore!.hashCode) + - (visibility == null ? 0 : visibility!.hashCode); - - @override - String toString() => 'StatisticsSearchDto[albumIds=$albumIds, city=$city, country=$country, createdAfter=$createdAfter, createdBefore=$createdBefore, description=$description, isEncoded=$isEncoded, isFavorite=$isFavorite, isMotion=$isMotion, isNotInAlbum=$isNotInAlbum, isOffline=$isOffline, lensModel=$lensModel, libraryId=$libraryId, make=$make, model=$model, ocr=$ocr, personIds=$personIds, rating=$rating, state=$state, tagIds=$tagIds, takenAfter=$takenAfter, takenBefore=$takenBefore, trashedAfter=$trashedAfter, trashedBefore=$trashedBefore, type=$type, updatedAfter=$updatedAfter, updatedBefore=$updatedBefore, visibility=$visibility]'; - - Map toJson() { - final json = {}; - if (this.albumIds.isPresent) { - final value = this.albumIds.value; - json[r'albumIds'] = value; - } - if (this.city.isPresent) { - final value = this.city.value; - json[r'city'] = value; - } - if (this.country.isPresent) { - final value = this.country.value; - json[r'country'] = value; - } - if (this.createdAfter.isPresent) { - final value = this.createdAfter.value; - json[r'createdAfter'] = value == null ? null : (_isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? value.millisecondsSinceEpoch - : value.toUtc().toIso8601String()); - } - if (this.createdBefore.isPresent) { - final value = this.createdBefore.value; - json[r'createdBefore'] = value == null ? null : (_isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? value.millisecondsSinceEpoch - : value.toUtc().toIso8601String()); - } - if (this.description.isPresent) { - final value = this.description.value; - json[r'description'] = value; - } - if (this.isEncoded.isPresent) { - final value = this.isEncoded.value; - json[r'isEncoded'] = value; - } - if (this.isFavorite.isPresent) { - final value = this.isFavorite.value; - json[r'isFavorite'] = value; - } - if (this.isMotion.isPresent) { - final value = this.isMotion.value; - json[r'isMotion'] = value; - } - if (this.isNotInAlbum.isPresent) { - final value = this.isNotInAlbum.value; - json[r'isNotInAlbum'] = value; - } - if (this.isOffline.isPresent) { - final value = this.isOffline.value; - json[r'isOffline'] = value; - } - if (this.lensModel.isPresent) { - final value = this.lensModel.value; - json[r'lensModel'] = value; - } - if (this.libraryId.isPresent) { - final value = this.libraryId.value; - json[r'libraryId'] = value; - } - if (this.make.isPresent) { - final value = this.make.value; - json[r'make'] = value; - } - if (this.model.isPresent) { - final value = this.model.value; - json[r'model'] = value; - } - if (this.ocr.isPresent) { - final value = this.ocr.value; - json[r'ocr'] = value; - } - if (this.personIds.isPresent) { - final value = this.personIds.value; - json[r'personIds'] = value; - } - if (this.rating.isPresent) { - final value = this.rating.value; - json[r'rating'] = value; - } - if (this.state.isPresent) { - final value = this.state.value; - json[r'state'] = value; - } - if (this.tagIds.isPresent) { - final value = this.tagIds.value; - json[r'tagIds'] = value; - } - if (this.takenAfter.isPresent) { - final value = this.takenAfter.value; - json[r'takenAfter'] = value == null ? null : (_isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? value.millisecondsSinceEpoch - : value.toUtc().toIso8601String()); - } - if (this.takenBefore.isPresent) { - final value = this.takenBefore.value; - json[r'takenBefore'] = value == null ? null : (_isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? value.millisecondsSinceEpoch - : value.toUtc().toIso8601String()); - } - if (this.trashedAfter.isPresent) { - final value = this.trashedAfter.value; - json[r'trashedAfter'] = value == null ? null : (_isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? value.millisecondsSinceEpoch - : value.toUtc().toIso8601String()); - } - if (this.trashedBefore.isPresent) { - final value = this.trashedBefore.value; - json[r'trashedBefore'] = value == null ? null : (_isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? value.millisecondsSinceEpoch - : value.toUtc().toIso8601String()); - } - if (this.type.isPresent) { - final value = this.type.value; - json[r'type'] = value; - } - if (this.updatedAfter.isPresent) { - final value = this.updatedAfter.value; - json[r'updatedAfter'] = value == null ? null : (_isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? value.millisecondsSinceEpoch - : value.toUtc().toIso8601String()); - } - if (this.updatedBefore.isPresent) { - final value = this.updatedBefore.value; - json[r'updatedBefore'] = value == null ? null : (_isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? value.millisecondsSinceEpoch - : value.toUtc().toIso8601String()); - } - if (this.visibility.isPresent) { - final value = this.visibility.value; - json[r'visibility'] = value; - } - return json; - } - - /// Returns a new [StatisticsSearchDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static StatisticsSearchDto? fromJson(dynamic value) { - upgradeDto(value, "StatisticsSearchDto"); - if (value is Map) { - final json = value.cast(); - - return StatisticsSearchDto( - albumIds: json.containsKey(r'albumIds') ? Optional.present(json[r'albumIds'] is Iterable - ? (json[r'albumIds'] as Iterable).cast().toList(growable: false) - : const []) : const Optional.absent(), - city: json.containsKey(r'city') ? Optional.present(mapValueOfType(json, r'city')) : const Optional.absent(), - country: json.containsKey(r'country') ? Optional.present(mapValueOfType(json, r'country')) : const Optional.absent(), - createdAfter: json.containsKey(r'createdAfter') ? Optional.present(mapDateTime(json, r'createdAfter', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')) : const Optional.absent(), - createdBefore: json.containsKey(r'createdBefore') ? Optional.present(mapDateTime(json, r'createdBefore', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')) : const Optional.absent(), - description: json.containsKey(r'description') ? Optional.present(mapValueOfType(json, r'description')) : const Optional.absent(), - isEncoded: json.containsKey(r'isEncoded') ? Optional.present(mapValueOfType(json, r'isEncoded')) : const Optional.absent(), - isFavorite: json.containsKey(r'isFavorite') ? Optional.present(mapValueOfType(json, r'isFavorite')) : const Optional.absent(), - isMotion: json.containsKey(r'isMotion') ? Optional.present(mapValueOfType(json, r'isMotion')) : const Optional.absent(), - isNotInAlbum: json.containsKey(r'isNotInAlbum') ? Optional.present(mapValueOfType(json, r'isNotInAlbum')) : const Optional.absent(), - isOffline: json.containsKey(r'isOffline') ? Optional.present(mapValueOfType(json, r'isOffline')) : const Optional.absent(), - lensModel: json.containsKey(r'lensModel') ? Optional.present(mapValueOfType(json, r'lensModel')) : const Optional.absent(), - libraryId: json.containsKey(r'libraryId') ? Optional.present(mapValueOfType(json, r'libraryId')) : const Optional.absent(), - make: json.containsKey(r'make') ? Optional.present(mapValueOfType(json, r'make')) : const Optional.absent(), - model: json.containsKey(r'model') ? Optional.present(mapValueOfType(json, r'model')) : const Optional.absent(), - ocr: json.containsKey(r'ocr') ? Optional.present(mapValueOfType(json, r'ocr')) : const Optional.absent(), - personIds: json.containsKey(r'personIds') ? Optional.present(json[r'personIds'] is Iterable - ? (json[r'personIds'] as Iterable).cast().toList(growable: false) - : const []) : const Optional.absent(), - rating: json.containsKey(r'rating') ? Optional.present(json[r'rating'] == null ? null : int.parse('${json[r'rating']}')) : const Optional.absent(), - state: json.containsKey(r'state') ? Optional.present(mapValueOfType(json, r'state')) : const Optional.absent(), - tagIds: json.containsKey(r'tagIds') ? Optional.present(json[r'tagIds'] is Iterable - ? (json[r'tagIds'] as Iterable).cast().toList(growable: false) - : const []) : const Optional.absent(), - takenAfter: json.containsKey(r'takenAfter') ? Optional.present(mapDateTime(json, r'takenAfter', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')) : const Optional.absent(), - takenBefore: json.containsKey(r'takenBefore') ? Optional.present(mapDateTime(json, r'takenBefore', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')) : const Optional.absent(), - trashedAfter: json.containsKey(r'trashedAfter') ? Optional.present(mapDateTime(json, r'trashedAfter', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')) : const Optional.absent(), - trashedBefore: json.containsKey(r'trashedBefore') ? Optional.present(mapDateTime(json, r'trashedBefore', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')) : const Optional.absent(), - type: json.containsKey(r'type') ? Optional.present(AssetTypeEnum.fromJson(json[r'type'])) : const Optional.absent(), - updatedAfter: json.containsKey(r'updatedAfter') ? Optional.present(mapDateTime(json, r'updatedAfter', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')) : const Optional.absent(), - updatedBefore: json.containsKey(r'updatedBefore') ? Optional.present(mapDateTime(json, r'updatedBefore', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')) : const Optional.absent(), - visibility: json.containsKey(r'visibility') ? Optional.present(AssetVisibility.fromJson(json[r'visibility'])) : const Optional.absent(), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = StatisticsSearchDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = StatisticsSearchDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of StatisticsSearchDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = StatisticsSearchDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - }; -} - diff --git a/mobile/openapi/lib/model/storage_folder.dart b/mobile/openapi/lib/model/storage_folder.dart deleted file mode 100644 index 8579d48f28..0000000000 --- a/mobile/openapi/lib/model/storage_folder.dart +++ /dev/null @@ -1,97 +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; - -/// Storage folder -class StorageFolder { - /// Instantiate a new enum with the provided [value]. - const StorageFolder._(this.value); - - /// The underlying value of this enum member. - final String value; - - @override - String toString() => value; - - String toJson() => value; - - static const encodedVideo = StorageFolder._(r'encoded-video'); - static const library_ = StorageFolder._(r'library'); - static const upload = StorageFolder._(r'upload'); - static const profile = StorageFolder._(r'profile'); - static const thumbs = StorageFolder._(r'thumbs'); - static const backups = StorageFolder._(r'backups'); - - /// List of all possible values in this [enum][StorageFolder]. - static const values = [ - encodedVideo, - library_, - upload, - profile, - thumbs, - backups, - ]; - - static StorageFolder? fromJson(dynamic value) => StorageFolderTypeTransformer().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 = StorageFolder.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } -} - -/// Transformation class that can [encode] an instance of [StorageFolder] to String, -/// and [decode] dynamic data back to [StorageFolder]. -class StorageFolderTypeTransformer { - factory StorageFolderTypeTransformer() => _instance ??= const StorageFolderTypeTransformer._(); - - const StorageFolderTypeTransformer._(); - - String encode(StorageFolder data) => data.value; - - /// Decodes a [dynamic value][data] to a StorageFolder. - /// - /// 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. - StorageFolder? decode(dynamic data, {bool allowNull = true}) { - if (data != null) { - switch (data) { - case r'encoded-video': return StorageFolder.encodedVideo; - case r'library': return StorageFolder.library_; - case r'upload': return StorageFolder.upload; - case r'profile': return StorageFolder.profile; - case r'thumbs': return StorageFolder.thumbs; - case r'backups': return StorageFolder.backups; - default: - if (!allowNull) { - throw ArgumentError('Unknown enum value to decode: $data'); - } - } - } - return null; - } - - /// Singleton [StorageFolderTypeTransformer] instance. - static StorageFolderTypeTransformer? _instance; -} - diff --git a/mobile/openapi/lib/model/sync_ack_delete_dto.dart b/mobile/openapi/lib/model/sync_ack_delete_dto.dart deleted file mode 100644 index 76e2b780a7..0000000000 --- a/mobile/openapi/lib/model/sync_ack_delete_dto.dart +++ /dev/null @@ -1,102 +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 SyncAckDeleteDto { - /// Returns a new [SyncAckDeleteDto] instance. - SyncAckDeleteDto({ - this.types = const Optional.present(const []), - }); - - /// Sync entity types to delete acks for - Optional?> types; - - @override - bool operator ==(Object other) => identical(this, other) || other is SyncAckDeleteDto && - _deepEquality.equals(other.types, types); - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (types.hashCode); - - @override - String toString() => 'SyncAckDeleteDto[types=$types]'; - - Map toJson() { - final json = {}; - if (this.types.isPresent) { - final value = this.types.value; - json[r'types'] = value; - } - return json; - } - - /// Returns a new [SyncAckDeleteDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SyncAckDeleteDto? fromJson(dynamic value) { - upgradeDto(value, "SyncAckDeleteDto"); - if (value is Map) { - final json = value.cast(); - - return SyncAckDeleteDto( - types: json.containsKey(r'types') ? Optional.present(SyncEntityType.listFromJson(json[r'types'])) : const Optional.absent(), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SyncAckDeleteDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SyncAckDeleteDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SyncAckDeleteDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SyncAckDeleteDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - }; -} - diff --git a/mobile/openapi/lib/model/sync_ack_dto.dart b/mobile/openapi/lib/model/sync_ack_dto.dart deleted file mode 100644 index fa7e20a832..0000000000 --- a/mobile/openapi/lib/model/sync_ack_dto.dart +++ /dev/null @@ -1,108 +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 SyncAckDto { - /// Returns a new [SyncAckDto] instance. - SyncAckDto({ - required this.ack, - required this.type, - }); - - /// Acknowledgment ID - String ack; - - SyncEntityType type; - - @override - bool operator ==(Object other) => identical(this, other) || other is SyncAckDto && - other.ack == ack && - other.type == type; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (ack.hashCode) + - (type.hashCode); - - @override - String toString() => 'SyncAckDto[ack=$ack, type=$type]'; - - Map toJson() { - final json = {}; - json[r'ack'] = this.ack; - json[r'type'] = this.type; - return json; - } - - /// Returns a new [SyncAckDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SyncAckDto? fromJson(dynamic value) { - upgradeDto(value, "SyncAckDto"); - if (value is Map) { - final json = value.cast(); - - return SyncAckDto( - ack: mapValueOfType(json, r'ack')!, - type: SyncEntityType.fromJson(json[r'type'])!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SyncAckDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SyncAckDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SyncAckDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SyncAckDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'ack', - 'type', - }; -} - diff --git a/mobile/openapi/lib/model/sync_ack_set_dto.dart b/mobile/openapi/lib/model/sync_ack_set_dto.dart deleted file mode 100644 index 531a9dc763..0000000000 --- a/mobile/openapi/lib/model/sync_ack_set_dto.dart +++ /dev/null @@ -1,102 +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 SyncAckSetDto { - /// Returns a new [SyncAckSetDto] instance. - SyncAckSetDto({ - this.acks = const [], - }); - - /// Acknowledgment IDs (max 1000) - List acks; - - @override - bool operator ==(Object other) => identical(this, other) || other is SyncAckSetDto && - _deepEquality.equals(other.acks, acks); - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (acks.hashCode); - - @override - String toString() => 'SyncAckSetDto[acks=$acks]'; - - Map toJson() { - final json = {}; - json[r'acks'] = this.acks; - return json; - } - - /// Returns a new [SyncAckSetDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SyncAckSetDto? fromJson(dynamic value) { - upgradeDto(value, "SyncAckSetDto"); - if (value is Map) { - final json = value.cast(); - - return SyncAckSetDto( - acks: json[r'acks'] is Iterable - ? (json[r'acks'] as Iterable).cast().toList(growable: false) - : const [], - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SyncAckSetDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SyncAckSetDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SyncAckSetDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SyncAckSetDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'acks', - }; -} - diff --git a/mobile/openapi/lib/model/sync_album_delete_v1.dart b/mobile/openapi/lib/model/sync_album_delete_v1.dart deleted file mode 100644 index a6fdf5c68c..0000000000 --- a/mobile/openapi/lib/model/sync_album_delete_v1.dart +++ /dev/null @@ -1,100 +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 SyncAlbumDeleteV1 { - /// Returns a new [SyncAlbumDeleteV1] instance. - SyncAlbumDeleteV1({ - required this.albumId, - }); - - /// Album ID - String albumId; - - @override - bool operator ==(Object other) => identical(this, other) || other is SyncAlbumDeleteV1 && - other.albumId == albumId; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (albumId.hashCode); - - @override - String toString() => 'SyncAlbumDeleteV1[albumId=$albumId]'; - - Map toJson() { - final json = {}; - json[r'albumId'] = this.albumId; - return json; - } - - /// Returns a new [SyncAlbumDeleteV1] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SyncAlbumDeleteV1? fromJson(dynamic value) { - upgradeDto(value, "SyncAlbumDeleteV1"); - if (value is Map) { - final json = value.cast(); - - return SyncAlbumDeleteV1( - albumId: mapValueOfType(json, r'albumId')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SyncAlbumDeleteV1.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SyncAlbumDeleteV1.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SyncAlbumDeleteV1-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SyncAlbumDeleteV1.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'albumId', - }; -} - diff --git a/mobile/openapi/lib/model/sync_album_to_asset_delete_v1.dart b/mobile/openapi/lib/model/sync_album_to_asset_delete_v1.dart deleted file mode 100644 index 08952b90ed..0000000000 --- a/mobile/openapi/lib/model/sync_album_to_asset_delete_v1.dart +++ /dev/null @@ -1,109 +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 SyncAlbumToAssetDeleteV1 { - /// Returns a new [SyncAlbumToAssetDeleteV1] instance. - SyncAlbumToAssetDeleteV1({ - required this.albumId, - required this.assetId, - }); - - /// Album ID - String albumId; - - /// Asset ID - String assetId; - - @override - bool operator ==(Object other) => identical(this, other) || other is SyncAlbumToAssetDeleteV1 && - other.albumId == albumId && - other.assetId == assetId; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (albumId.hashCode) + - (assetId.hashCode); - - @override - String toString() => 'SyncAlbumToAssetDeleteV1[albumId=$albumId, assetId=$assetId]'; - - Map toJson() { - final json = {}; - json[r'albumId'] = this.albumId; - json[r'assetId'] = this.assetId; - return json; - } - - /// Returns a new [SyncAlbumToAssetDeleteV1] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SyncAlbumToAssetDeleteV1? fromJson(dynamic value) { - upgradeDto(value, "SyncAlbumToAssetDeleteV1"); - if (value is Map) { - final json = value.cast(); - - return SyncAlbumToAssetDeleteV1( - albumId: mapValueOfType(json, r'albumId')!, - assetId: mapValueOfType(json, r'assetId')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SyncAlbumToAssetDeleteV1.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SyncAlbumToAssetDeleteV1.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SyncAlbumToAssetDeleteV1-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SyncAlbumToAssetDeleteV1.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'albumId', - 'assetId', - }; -} - diff --git a/mobile/openapi/lib/model/sync_album_to_asset_v1.dart b/mobile/openapi/lib/model/sync_album_to_asset_v1.dart deleted file mode 100644 index 5f38b35088..0000000000 --- a/mobile/openapi/lib/model/sync_album_to_asset_v1.dart +++ /dev/null @@ -1,109 +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 SyncAlbumToAssetV1 { - /// Returns a new [SyncAlbumToAssetV1] instance. - SyncAlbumToAssetV1({ - required this.albumId, - required this.assetId, - }); - - /// Album ID - String albumId; - - /// Asset ID - String assetId; - - @override - bool operator ==(Object other) => identical(this, other) || other is SyncAlbumToAssetV1 && - other.albumId == albumId && - other.assetId == assetId; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (albumId.hashCode) + - (assetId.hashCode); - - @override - String toString() => 'SyncAlbumToAssetV1[albumId=$albumId, assetId=$assetId]'; - - Map toJson() { - final json = {}; - json[r'albumId'] = this.albumId; - json[r'assetId'] = this.assetId; - return json; - } - - /// Returns a new [SyncAlbumToAssetV1] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SyncAlbumToAssetV1? fromJson(dynamic value) { - upgradeDto(value, "SyncAlbumToAssetV1"); - if (value is Map) { - final json = value.cast(); - - return SyncAlbumToAssetV1( - albumId: mapValueOfType(json, r'albumId')!, - assetId: mapValueOfType(json, r'assetId')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SyncAlbumToAssetV1.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SyncAlbumToAssetV1.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SyncAlbumToAssetV1-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SyncAlbumToAssetV1.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'albumId', - 'assetId', - }; -} - diff --git a/mobile/openapi/lib/model/sync_album_user_delete_v1.dart b/mobile/openapi/lib/model/sync_album_user_delete_v1.dart deleted file mode 100644 index 526bcc6b6e..0000000000 --- a/mobile/openapi/lib/model/sync_album_user_delete_v1.dart +++ /dev/null @@ -1,109 +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 SyncAlbumUserDeleteV1 { - /// Returns a new [SyncAlbumUserDeleteV1] instance. - SyncAlbumUserDeleteV1({ - required this.albumId, - required this.userId, - }); - - /// Album ID - String albumId; - - /// User ID - String userId; - - @override - bool operator ==(Object other) => identical(this, other) || other is SyncAlbumUserDeleteV1 && - other.albumId == albumId && - other.userId == userId; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (albumId.hashCode) + - (userId.hashCode); - - @override - String toString() => 'SyncAlbumUserDeleteV1[albumId=$albumId, userId=$userId]'; - - Map toJson() { - final json = {}; - json[r'albumId'] = this.albumId; - json[r'userId'] = this.userId; - return json; - } - - /// Returns a new [SyncAlbumUserDeleteV1] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SyncAlbumUserDeleteV1? fromJson(dynamic value) { - upgradeDto(value, "SyncAlbumUserDeleteV1"); - if (value is Map) { - final json = value.cast(); - - return SyncAlbumUserDeleteV1( - albumId: mapValueOfType(json, r'albumId')!, - userId: mapValueOfType(json, r'userId')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SyncAlbumUserDeleteV1.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SyncAlbumUserDeleteV1.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SyncAlbumUserDeleteV1-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SyncAlbumUserDeleteV1.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'albumId', - 'userId', - }; -} - diff --git a/mobile/openapi/lib/model/sync_album_user_v1.dart b/mobile/openapi/lib/model/sync_album_user_v1.dart deleted file mode 100644 index 1efe7da029..0000000000 --- a/mobile/openapi/lib/model/sync_album_user_v1.dart +++ /dev/null @@ -1,117 +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 SyncAlbumUserV1 { - /// Returns a new [SyncAlbumUserV1] instance. - SyncAlbumUserV1({ - required this.albumId, - required this.role, - required this.userId, - }); - - /// Album ID - String albumId; - - AlbumUserRole role; - - /// User ID - String userId; - - @override - bool operator ==(Object other) => identical(this, other) || other is SyncAlbumUserV1 && - other.albumId == albumId && - other.role == role && - other.userId == userId; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (albumId.hashCode) + - (role.hashCode) + - (userId.hashCode); - - @override - String toString() => 'SyncAlbumUserV1[albumId=$albumId, role=$role, userId=$userId]'; - - Map toJson() { - final json = {}; - json[r'albumId'] = this.albumId; - json[r'role'] = this.role; - json[r'userId'] = this.userId; - return json; - } - - /// Returns a new [SyncAlbumUserV1] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SyncAlbumUserV1? fromJson(dynamic value) { - upgradeDto(value, "SyncAlbumUserV1"); - if (value is Map) { - final json = value.cast(); - - return SyncAlbumUserV1( - albumId: mapValueOfType(json, r'albumId')!, - role: AlbumUserRole.fromJson(json[r'role'])!, - userId: mapValueOfType(json, r'userId')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SyncAlbumUserV1.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SyncAlbumUserV1.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SyncAlbumUserV1-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SyncAlbumUserV1.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'albumId', - 'role', - 'userId', - }; -} - diff --git a/mobile/openapi/lib/model/sync_album_v1.dart b/mobile/openapi/lib/model/sync_album_v1.dart deleted file mode 100644 index 677795fd58..0000000000 --- a/mobile/openapi/lib/model/sync_album_v1.dart +++ /dev/null @@ -1,179 +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 SyncAlbumV1 { - /// Returns a new [SyncAlbumV1] instance. - SyncAlbumV1({ - required this.createdAt, - required this.description, - required this.id, - required this.isActivityEnabled, - required this.name, - required this.order, - required this.ownerId, - required this.thumbnailAssetId, - required this.updatedAt, - }); - - /// Created at - DateTime createdAt; - - /// Album description - String description; - - /// Album ID - String id; - - /// Is activity enabled - bool isActivityEnabled; - - /// Album name - String name; - - AssetOrder order; - - /// Owner ID - String ownerId; - - /// Thumbnail asset ID - String? thumbnailAssetId; - - /// Updated at - DateTime updatedAt; - - @override - bool operator ==(Object other) => identical(this, other) || other is SyncAlbumV1 && - other.createdAt == createdAt && - other.description == description && - other.id == id && - other.isActivityEnabled == isActivityEnabled && - other.name == name && - other.order == order && - other.ownerId == ownerId && - other.thumbnailAssetId == thumbnailAssetId && - other.updatedAt == updatedAt; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (createdAt.hashCode) + - (description.hashCode) + - (id.hashCode) + - (isActivityEnabled.hashCode) + - (name.hashCode) + - (order.hashCode) + - (ownerId.hashCode) + - (thumbnailAssetId == null ? 0 : thumbnailAssetId!.hashCode) + - (updatedAt.hashCode); - - @override - String toString() => 'SyncAlbumV1[createdAt=$createdAt, description=$description, id=$id, isActivityEnabled=$isActivityEnabled, name=$name, order=$order, ownerId=$ownerId, thumbnailAssetId=$thumbnailAssetId, updatedAt=$updatedAt]'; - - Map toJson() { - final json = {}; - json[r'createdAt'] = _isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? this.createdAt.millisecondsSinceEpoch - : this.createdAt.toUtc().toIso8601String(); - json[r'description'] = this.description; - json[r'id'] = this.id; - json[r'isActivityEnabled'] = this.isActivityEnabled; - json[r'name'] = this.name; - json[r'order'] = this.order; - json[r'ownerId'] = this.ownerId; - if (this.thumbnailAssetId != null) { - json[r'thumbnailAssetId'] = this.thumbnailAssetId; - } else { - json[r'thumbnailAssetId'] = null; - } - json[r'updatedAt'] = _isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? this.updatedAt.millisecondsSinceEpoch - : this.updatedAt.toUtc().toIso8601String(); - return json; - } - - /// Returns a new [SyncAlbumV1] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SyncAlbumV1? fromJson(dynamic value) { - upgradeDto(value, "SyncAlbumV1"); - if (value is Map) { - final json = value.cast(); - - return SyncAlbumV1( - createdAt: mapDateTime(json, r'createdAt', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')!, - description: mapValueOfType(json, r'description')!, - id: mapValueOfType(json, r'id')!, - isActivityEnabled: mapValueOfType(json, r'isActivityEnabled')!, - name: mapValueOfType(json, r'name')!, - order: AssetOrder.fromJson(json[r'order'])!, - ownerId: mapValueOfType(json, r'ownerId')!, - thumbnailAssetId: mapValueOfType(json, r'thumbnailAssetId'), - updatedAt: mapDateTime(json, r'updatedAt', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SyncAlbumV1.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SyncAlbumV1.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SyncAlbumV1-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SyncAlbumV1.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'createdAt', - 'description', - 'id', - 'isActivityEnabled', - 'name', - 'order', - 'ownerId', - 'thumbnailAssetId', - 'updatedAt', - }; -} - diff --git a/mobile/openapi/lib/model/sync_album_v2.dart b/mobile/openapi/lib/model/sync_album_v2.dart deleted file mode 100644 index 701c0c94ec..0000000000 --- a/mobile/openapi/lib/model/sync_album_v2.dart +++ /dev/null @@ -1,170 +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 SyncAlbumV2 { - /// Returns a new [SyncAlbumV2] instance. - SyncAlbumV2({ - required this.createdAt, - required this.description, - required this.id, - required this.isActivityEnabled, - required this.name, - required this.order, - required this.thumbnailAssetId, - required this.updatedAt, - }); - - /// Created at - DateTime createdAt; - - /// Album description - String description; - - /// Album ID - String id; - - /// Is activity enabled - bool isActivityEnabled; - - /// Album name - String name; - - AssetOrder order; - - /// Thumbnail asset ID - String? thumbnailAssetId; - - /// Updated at - DateTime updatedAt; - - @override - bool operator ==(Object other) => identical(this, other) || other is SyncAlbumV2 && - other.createdAt == createdAt && - other.description == description && - other.id == id && - other.isActivityEnabled == isActivityEnabled && - other.name == name && - other.order == order && - other.thumbnailAssetId == thumbnailAssetId && - other.updatedAt == updatedAt; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (createdAt.hashCode) + - (description.hashCode) + - (id.hashCode) + - (isActivityEnabled.hashCode) + - (name.hashCode) + - (order.hashCode) + - (thumbnailAssetId == null ? 0 : thumbnailAssetId!.hashCode) + - (updatedAt.hashCode); - - @override - String toString() => 'SyncAlbumV2[createdAt=$createdAt, description=$description, id=$id, isActivityEnabled=$isActivityEnabled, name=$name, order=$order, thumbnailAssetId=$thumbnailAssetId, updatedAt=$updatedAt]'; - - Map toJson() { - final json = {}; - json[r'createdAt'] = _isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? this.createdAt.millisecondsSinceEpoch - : this.createdAt.toUtc().toIso8601String(); - json[r'description'] = this.description; - json[r'id'] = this.id; - json[r'isActivityEnabled'] = this.isActivityEnabled; - json[r'name'] = this.name; - json[r'order'] = this.order; - if (this.thumbnailAssetId != null) { - json[r'thumbnailAssetId'] = this.thumbnailAssetId; - } else { - json[r'thumbnailAssetId'] = null; - } - json[r'updatedAt'] = _isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? this.updatedAt.millisecondsSinceEpoch - : this.updatedAt.toUtc().toIso8601String(); - return json; - } - - /// Returns a new [SyncAlbumV2] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SyncAlbumV2? fromJson(dynamic value) { - upgradeDto(value, "SyncAlbumV2"); - if (value is Map) { - final json = value.cast(); - - return SyncAlbumV2( - createdAt: mapDateTime(json, r'createdAt', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')!, - description: mapValueOfType(json, r'description')!, - id: mapValueOfType(json, r'id')!, - isActivityEnabled: mapValueOfType(json, r'isActivityEnabled')!, - name: mapValueOfType(json, r'name')!, - order: AssetOrder.fromJson(json[r'order'])!, - thumbnailAssetId: mapValueOfType(json, r'thumbnailAssetId'), - updatedAt: mapDateTime(json, r'updatedAt', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SyncAlbumV2.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SyncAlbumV2.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SyncAlbumV2-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SyncAlbumV2.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'createdAt', - 'description', - 'id', - 'isActivityEnabled', - 'name', - 'order', - 'thumbnailAssetId', - 'updatedAt', - }; -} - diff --git a/mobile/openapi/lib/model/sync_asset_delete_v1.dart b/mobile/openapi/lib/model/sync_asset_delete_v1.dart deleted file mode 100644 index 1d5a947774..0000000000 --- a/mobile/openapi/lib/model/sync_asset_delete_v1.dart +++ /dev/null @@ -1,100 +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 SyncAssetDeleteV1 { - /// Returns a new [SyncAssetDeleteV1] instance. - SyncAssetDeleteV1({ - required this.assetId, - }); - - /// Asset ID - String assetId; - - @override - bool operator ==(Object other) => identical(this, other) || other is SyncAssetDeleteV1 && - other.assetId == assetId; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (assetId.hashCode); - - @override - String toString() => 'SyncAssetDeleteV1[assetId=$assetId]'; - - Map toJson() { - final json = {}; - json[r'assetId'] = this.assetId; - return json; - } - - /// Returns a new [SyncAssetDeleteV1] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SyncAssetDeleteV1? fromJson(dynamic value) { - upgradeDto(value, "SyncAssetDeleteV1"); - if (value is Map) { - final json = value.cast(); - - return SyncAssetDeleteV1( - assetId: mapValueOfType(json, r'assetId')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SyncAssetDeleteV1.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SyncAssetDeleteV1.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SyncAssetDeleteV1-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SyncAssetDeleteV1.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'assetId', - }; -} - diff --git a/mobile/openapi/lib/model/sync_asset_edit_delete_v1.dart b/mobile/openapi/lib/model/sync_asset_edit_delete_v1.dart deleted file mode 100644 index e0c98bfef3..0000000000 --- a/mobile/openapi/lib/model/sync_asset_edit_delete_v1.dart +++ /dev/null @@ -1,100 +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 SyncAssetEditDeleteV1 { - /// Returns a new [SyncAssetEditDeleteV1] instance. - SyncAssetEditDeleteV1({ - required this.editId, - }); - - /// Edit ID - String editId; - - @override - bool operator ==(Object other) => identical(this, other) || other is SyncAssetEditDeleteV1 && - other.editId == editId; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (editId.hashCode); - - @override - String toString() => 'SyncAssetEditDeleteV1[editId=$editId]'; - - Map toJson() { - final json = {}; - json[r'editId'] = this.editId; - return json; - } - - /// Returns a new [SyncAssetEditDeleteV1] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SyncAssetEditDeleteV1? fromJson(dynamic value) { - upgradeDto(value, "SyncAssetEditDeleteV1"); - if (value is Map) { - final json = value.cast(); - - return SyncAssetEditDeleteV1( - editId: mapValueOfType(json, r'editId')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SyncAssetEditDeleteV1.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SyncAssetEditDeleteV1.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SyncAssetEditDeleteV1-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SyncAssetEditDeleteV1.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'editId', - }; -} - diff --git a/mobile/openapi/lib/model/sync_asset_edit_v1.dart b/mobile/openapi/lib/model/sync_asset_edit_v1.dart deleted file mode 100644 index 8acfad5f6a..0000000000 --- a/mobile/openapi/lib/model/sync_asset_edit_v1.dart +++ /dev/null @@ -1,138 +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 SyncAssetEditV1 { - /// Returns a new [SyncAssetEditV1] instance. - SyncAssetEditV1({ - required this.action, - required this.assetId, - required this.id, - this.parameters = const {}, - required this.sequence, - }); - - AssetEditAction action; - - /// Asset ID - String assetId; - - /// Edit ID - String id; - - /// Edit parameters - Map parameters; - - /// Edit sequence - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int sequence; - - @override - bool operator ==(Object other) => identical(this, other) || other is SyncAssetEditV1 && - other.action == action && - other.assetId == assetId && - other.id == id && - _deepEquality.equals(other.parameters, parameters) && - other.sequence == sequence; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (action.hashCode) + - (assetId.hashCode) + - (id.hashCode) + - (parameters.hashCode) + - (sequence.hashCode); - - @override - String toString() => 'SyncAssetEditV1[action=$action, assetId=$assetId, id=$id, parameters=$parameters, sequence=$sequence]'; - - Map toJson() { - final json = {}; - json[r'action'] = this.action; - json[r'assetId'] = this.assetId; - json[r'id'] = this.id; - json[r'parameters'] = this.parameters; - json[r'sequence'] = this.sequence; - return json; - } - - /// Returns a new [SyncAssetEditV1] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SyncAssetEditV1? fromJson(dynamic value) { - upgradeDto(value, "SyncAssetEditV1"); - if (value is Map) { - final json = value.cast(); - - return SyncAssetEditV1( - action: AssetEditAction.fromJson(json[r'action'])!, - assetId: mapValueOfType(json, r'assetId')!, - id: mapValueOfType(json, r'id')!, - parameters: mapCastOfType(json, r'parameters')!, - sequence: mapValueOfType(json, r'sequence')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SyncAssetEditV1.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SyncAssetEditV1.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SyncAssetEditV1-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SyncAssetEditV1.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'action', - 'assetId', - 'id', - 'parameters', - 'sequence', - }; -} - diff --git a/mobile/openapi/lib/model/sync_asset_exif_v1.dart b/mobile/openapi/lib/model/sync_asset_exif_v1.dart deleted file mode 100644 index f5bc4d021d..0000000000 --- a/mobile/openapi/lib/model/sync_asset_exif_v1.dart +++ /dev/null @@ -1,431 +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 SyncAssetExifV1 { - /// Returns a new [SyncAssetExifV1] instance. - SyncAssetExifV1({ - required this.assetId, - required this.city, - required this.country, - required this.dateTimeOriginal, - required this.description, - required this.exifImageHeight, - required this.exifImageWidth, - required this.exposureTime, - required this.fNumber, - required this.fileSizeInByte, - required this.focalLength, - required this.fps, - required this.iso, - required this.latitude, - required this.lensModel, - required this.longitude, - required this.make, - required this.model, - required this.modifyDate, - required this.orientation, - required this.profileDescription, - required this.projectionType, - required this.rating, - required this.state, - required this.timeZone, - }); - - /// Asset ID - String assetId; - - /// City - String? city; - - /// Country - String? country; - - /// Date time original - DateTime? dateTimeOriginal; - - /// Description - String? description; - - /// Exif image height - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int? exifImageHeight; - - /// Exif image width - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int? exifImageWidth; - - /// Exposure time - String? exposureTime; - - /// F number - double? fNumber; - - /// File size in byte - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int? fileSizeInByte; - - /// Focal length - double? focalLength; - - /// FPS - double? fps; - - /// ISO - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int? iso; - - /// Latitude - double? latitude; - - /// Lens model - String? lensModel; - - /// Longitude - double? longitude; - - /// Make - String? make; - - /// Model - String? model; - - /// Modify date - DateTime? modifyDate; - - /// Orientation - String? orientation; - - /// Profile description - String? profileDescription; - - /// Projection type - String? projectionType; - - /// Rating - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int? rating; - - /// State - String? state; - - /// Time zone - String? timeZone; - - @override - bool operator ==(Object other) => identical(this, other) || other is SyncAssetExifV1 && - other.assetId == assetId && - other.city == city && - other.country == country && - other.dateTimeOriginal == dateTimeOriginal && - other.description == description && - other.exifImageHeight == exifImageHeight && - other.exifImageWidth == exifImageWidth && - other.exposureTime == exposureTime && - other.fNumber == fNumber && - other.fileSizeInByte == fileSizeInByte && - other.focalLength == focalLength && - other.fps == fps && - other.iso == iso && - other.latitude == latitude && - other.lensModel == lensModel && - other.longitude == longitude && - other.make == make && - other.model == model && - other.modifyDate == modifyDate && - other.orientation == orientation && - other.profileDescription == profileDescription && - other.projectionType == projectionType && - other.rating == rating && - other.state == state && - other.timeZone == timeZone; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (assetId.hashCode) + - (city == null ? 0 : city!.hashCode) + - (country == null ? 0 : country!.hashCode) + - (dateTimeOriginal == null ? 0 : dateTimeOriginal!.hashCode) + - (description == null ? 0 : description!.hashCode) + - (exifImageHeight == null ? 0 : exifImageHeight!.hashCode) + - (exifImageWidth == null ? 0 : exifImageWidth!.hashCode) + - (exposureTime == null ? 0 : exposureTime!.hashCode) + - (fNumber == null ? 0 : fNumber!.hashCode) + - (fileSizeInByte == null ? 0 : fileSizeInByte!.hashCode) + - (focalLength == null ? 0 : focalLength!.hashCode) + - (fps == null ? 0 : fps!.hashCode) + - (iso == null ? 0 : iso!.hashCode) + - (latitude == null ? 0 : latitude!.hashCode) + - (lensModel == null ? 0 : lensModel!.hashCode) + - (longitude == null ? 0 : longitude!.hashCode) + - (make == null ? 0 : make!.hashCode) + - (model == null ? 0 : model!.hashCode) + - (modifyDate == null ? 0 : modifyDate!.hashCode) + - (orientation == null ? 0 : orientation!.hashCode) + - (profileDescription == null ? 0 : profileDescription!.hashCode) + - (projectionType == null ? 0 : projectionType!.hashCode) + - (rating == null ? 0 : rating!.hashCode) + - (state == null ? 0 : state!.hashCode) + - (timeZone == null ? 0 : timeZone!.hashCode); - - @override - String toString() => 'SyncAssetExifV1[assetId=$assetId, city=$city, country=$country, dateTimeOriginal=$dateTimeOriginal, description=$description, exifImageHeight=$exifImageHeight, exifImageWidth=$exifImageWidth, exposureTime=$exposureTime, fNumber=$fNumber, fileSizeInByte=$fileSizeInByte, focalLength=$focalLength, fps=$fps, iso=$iso, latitude=$latitude, lensModel=$lensModel, longitude=$longitude, make=$make, model=$model, modifyDate=$modifyDate, orientation=$orientation, profileDescription=$profileDescription, projectionType=$projectionType, rating=$rating, state=$state, timeZone=$timeZone]'; - - Map toJson() { - final json = {}; - json[r'assetId'] = this.assetId; - if (this.city != null) { - json[r'city'] = this.city; - } else { - json[r'city'] = null; - } - if (this.country != null) { - json[r'country'] = this.country; - } else { - json[r'country'] = null; - } - if (this.dateTimeOriginal != null) { - json[r'dateTimeOriginal'] = _isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? this.dateTimeOriginal!.millisecondsSinceEpoch - : this.dateTimeOriginal!.toUtc().toIso8601String(); - } else { - json[r'dateTimeOriginal'] = null; - } - if (this.description != null) { - json[r'description'] = this.description; - } else { - json[r'description'] = null; - } - if (this.exifImageHeight != null) { - json[r'exifImageHeight'] = this.exifImageHeight; - } else { - json[r'exifImageHeight'] = null; - } - if (this.exifImageWidth != null) { - json[r'exifImageWidth'] = this.exifImageWidth; - } else { - json[r'exifImageWidth'] = null; - } - if (this.exposureTime != null) { - json[r'exposureTime'] = this.exposureTime; - } else { - json[r'exposureTime'] = null; - } - if (this.fNumber != null) { - json[r'fNumber'] = this.fNumber; - } else { - json[r'fNumber'] = null; - } - if (this.fileSizeInByte != null) { - json[r'fileSizeInByte'] = this.fileSizeInByte; - } else { - json[r'fileSizeInByte'] = null; - } - if (this.focalLength != null) { - json[r'focalLength'] = this.focalLength; - } else { - json[r'focalLength'] = null; - } - if (this.fps != null) { - json[r'fps'] = this.fps; - } else { - json[r'fps'] = null; - } - if (this.iso != null) { - json[r'iso'] = this.iso; - } else { - json[r'iso'] = null; - } - if (this.latitude != null) { - json[r'latitude'] = this.latitude; - } else { - json[r'latitude'] = null; - } - if (this.lensModel != null) { - json[r'lensModel'] = this.lensModel; - } else { - json[r'lensModel'] = null; - } - if (this.longitude != null) { - json[r'longitude'] = this.longitude; - } else { - json[r'longitude'] = null; - } - if (this.make != null) { - json[r'make'] = this.make; - } else { - json[r'make'] = null; - } - if (this.model != null) { - json[r'model'] = this.model; - } else { - json[r'model'] = null; - } - if (this.modifyDate != null) { - json[r'modifyDate'] = _isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? this.modifyDate!.millisecondsSinceEpoch - : this.modifyDate!.toUtc().toIso8601String(); - } else { - json[r'modifyDate'] = null; - } - if (this.orientation != null) { - json[r'orientation'] = this.orientation; - } else { - json[r'orientation'] = null; - } - if (this.profileDescription != null) { - json[r'profileDescription'] = this.profileDescription; - } else { - json[r'profileDescription'] = null; - } - if (this.projectionType != null) { - json[r'projectionType'] = this.projectionType; - } else { - json[r'projectionType'] = null; - } - if (this.rating != null) { - json[r'rating'] = this.rating; - } else { - json[r'rating'] = null; - } - if (this.state != null) { - json[r'state'] = this.state; - } else { - json[r'state'] = null; - } - if (this.timeZone != null) { - json[r'timeZone'] = this.timeZone; - } else { - json[r'timeZone'] = null; - } - return json; - } - - /// Returns a new [SyncAssetExifV1] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SyncAssetExifV1? fromJson(dynamic value) { - upgradeDto(value, "SyncAssetExifV1"); - if (value is Map) { - final json = value.cast(); - - return SyncAssetExifV1( - assetId: mapValueOfType(json, r'assetId')!, - city: mapValueOfType(json, r'city'), - country: mapValueOfType(json, r'country'), - dateTimeOriginal: mapDateTime(json, r'dateTimeOriginal', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/'), - description: mapValueOfType(json, r'description'), - exifImageHeight: mapValueOfType(json, r'exifImageHeight'), - exifImageWidth: mapValueOfType(json, r'exifImageWidth'), - exposureTime: mapValueOfType(json, r'exposureTime'), - fNumber: mapValueOfType(json, r'fNumber'), - fileSizeInByte: mapValueOfType(json, r'fileSizeInByte'), - focalLength: mapValueOfType(json, r'focalLength'), - fps: mapValueOfType(json, r'fps'), - iso: mapValueOfType(json, r'iso'), - latitude: mapValueOfType(json, r'latitude'), - lensModel: mapValueOfType(json, r'lensModel'), - longitude: mapValueOfType(json, r'longitude'), - make: mapValueOfType(json, r'make'), - model: mapValueOfType(json, r'model'), - modifyDate: mapDateTime(json, r'modifyDate', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/'), - orientation: mapValueOfType(json, r'orientation'), - profileDescription: mapValueOfType(json, r'profileDescription'), - projectionType: mapValueOfType(json, r'projectionType'), - rating: mapValueOfType(json, r'rating'), - state: mapValueOfType(json, r'state'), - timeZone: mapValueOfType(json, r'timeZone'), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SyncAssetExifV1.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SyncAssetExifV1.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SyncAssetExifV1-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SyncAssetExifV1.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'assetId', - 'city', - 'country', - 'dateTimeOriginal', - 'description', - 'exifImageHeight', - 'exifImageWidth', - 'exposureTime', - 'fNumber', - 'fileSizeInByte', - 'focalLength', - 'fps', - 'iso', - 'latitude', - 'lensModel', - 'longitude', - 'make', - 'model', - 'modifyDate', - 'orientation', - 'profileDescription', - 'projectionType', - 'rating', - 'state', - 'timeZone', - }; -} - diff --git a/mobile/openapi/lib/model/sync_asset_face_delete_v1.dart b/mobile/openapi/lib/model/sync_asset_face_delete_v1.dart deleted file mode 100644 index 9cfb8814a7..0000000000 --- a/mobile/openapi/lib/model/sync_asset_face_delete_v1.dart +++ /dev/null @@ -1,100 +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 SyncAssetFaceDeleteV1 { - /// Returns a new [SyncAssetFaceDeleteV1] instance. - SyncAssetFaceDeleteV1({ - required this.assetFaceId, - }); - - /// Asset face ID - String assetFaceId; - - @override - bool operator ==(Object other) => identical(this, other) || other is SyncAssetFaceDeleteV1 && - other.assetFaceId == assetFaceId; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (assetFaceId.hashCode); - - @override - String toString() => 'SyncAssetFaceDeleteV1[assetFaceId=$assetFaceId]'; - - Map toJson() { - final json = {}; - json[r'assetFaceId'] = this.assetFaceId; - return json; - } - - /// Returns a new [SyncAssetFaceDeleteV1] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SyncAssetFaceDeleteV1? fromJson(dynamic value) { - upgradeDto(value, "SyncAssetFaceDeleteV1"); - if (value is Map) { - final json = value.cast(); - - return SyncAssetFaceDeleteV1( - assetFaceId: mapValueOfType(json, r'assetFaceId')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SyncAssetFaceDeleteV1.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SyncAssetFaceDeleteV1.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SyncAssetFaceDeleteV1-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SyncAssetFaceDeleteV1.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'assetFaceId', - }; -} - diff --git a/mobile/openapi/lib/model/sync_asset_face_v1.dart b/mobile/openapi/lib/model/sync_asset_face_v1.dart deleted file mode 100644 index 7ccc455f47..0000000000 --- a/mobile/openapi/lib/model/sync_asset_face_v1.dart +++ /dev/null @@ -1,203 +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 SyncAssetFaceV1 { - /// Returns a new [SyncAssetFaceV1] instance. - SyncAssetFaceV1({ - required this.assetId, - required this.boundingBoxX1, - required this.boundingBoxX2, - required this.boundingBoxY1, - required this.boundingBoxY2, - required this.id, - required this.imageHeight, - required this.imageWidth, - required this.personId, - required this.sourceType, - }); - - /// Asset ID - String assetId; - - /// Bounding box X1 - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int boundingBoxX1; - - /// Bounding box X2 - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int boundingBoxX2; - - /// Bounding box Y1 - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int boundingBoxY1; - - /// Bounding box Y2 - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int boundingBoxY2; - - /// Asset face ID - String id; - - /// Image height - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int imageHeight; - - /// Image width - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int imageWidth; - - /// Person ID - String? personId; - - /// Source type - String sourceType; - - @override - bool operator ==(Object other) => identical(this, other) || other is SyncAssetFaceV1 && - other.assetId == assetId && - other.boundingBoxX1 == boundingBoxX1 && - other.boundingBoxX2 == boundingBoxX2 && - other.boundingBoxY1 == boundingBoxY1 && - other.boundingBoxY2 == boundingBoxY2 && - other.id == id && - other.imageHeight == imageHeight && - other.imageWidth == imageWidth && - other.personId == personId && - other.sourceType == sourceType; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (assetId.hashCode) + - (boundingBoxX1.hashCode) + - (boundingBoxX2.hashCode) + - (boundingBoxY1.hashCode) + - (boundingBoxY2.hashCode) + - (id.hashCode) + - (imageHeight.hashCode) + - (imageWidth.hashCode) + - (personId == null ? 0 : personId!.hashCode) + - (sourceType.hashCode); - - @override - String toString() => 'SyncAssetFaceV1[assetId=$assetId, boundingBoxX1=$boundingBoxX1, boundingBoxX2=$boundingBoxX2, boundingBoxY1=$boundingBoxY1, boundingBoxY2=$boundingBoxY2, id=$id, imageHeight=$imageHeight, imageWidth=$imageWidth, personId=$personId, sourceType=$sourceType]'; - - Map toJson() { - final json = {}; - json[r'assetId'] = this.assetId; - json[r'boundingBoxX1'] = this.boundingBoxX1; - json[r'boundingBoxX2'] = this.boundingBoxX2; - json[r'boundingBoxY1'] = this.boundingBoxY1; - json[r'boundingBoxY2'] = this.boundingBoxY2; - json[r'id'] = this.id; - json[r'imageHeight'] = this.imageHeight; - json[r'imageWidth'] = this.imageWidth; - if (this.personId != null) { - json[r'personId'] = this.personId; - } else { - json[r'personId'] = null; - } - json[r'sourceType'] = this.sourceType; - return json; - } - - /// Returns a new [SyncAssetFaceV1] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SyncAssetFaceV1? fromJson(dynamic value) { - upgradeDto(value, "SyncAssetFaceV1"); - if (value is Map) { - final json = value.cast(); - - return SyncAssetFaceV1( - assetId: mapValueOfType(json, r'assetId')!, - boundingBoxX1: mapValueOfType(json, r'boundingBoxX1')!, - boundingBoxX2: mapValueOfType(json, r'boundingBoxX2')!, - boundingBoxY1: mapValueOfType(json, r'boundingBoxY1')!, - boundingBoxY2: mapValueOfType(json, r'boundingBoxY2')!, - id: mapValueOfType(json, r'id')!, - imageHeight: mapValueOfType(json, r'imageHeight')!, - imageWidth: mapValueOfType(json, r'imageWidth')!, - personId: mapValueOfType(json, r'personId'), - sourceType: mapValueOfType(json, r'sourceType')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SyncAssetFaceV1.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SyncAssetFaceV1.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SyncAssetFaceV1-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SyncAssetFaceV1.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'assetId', - 'boundingBoxX1', - 'boundingBoxX2', - 'boundingBoxY1', - 'boundingBoxY2', - 'id', - 'imageHeight', - 'imageWidth', - 'personId', - 'sourceType', - }; -} - diff --git a/mobile/openapi/lib/model/sync_asset_face_v2.dart b/mobile/openapi/lib/model/sync_asset_face_v2.dart deleted file mode 100644 index 3b714b7632..0000000000 --- a/mobile/openapi/lib/model/sync_asset_face_v2.dart +++ /dev/null @@ -1,227 +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 SyncAssetFaceV2 { - /// Returns a new [SyncAssetFaceV2] instance. - SyncAssetFaceV2({ - required this.assetId, - required this.boundingBoxX1, - required this.boundingBoxX2, - required this.boundingBoxY1, - required this.boundingBoxY2, - required this.deletedAt, - required this.id, - required this.imageHeight, - required this.imageWidth, - required this.isVisible, - required this.personId, - required this.sourceType, - }); - - /// Asset ID - String assetId; - - /// Bounding box X1 - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int boundingBoxX1; - - /// Bounding box X2 - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int boundingBoxX2; - - /// Bounding box Y1 - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int boundingBoxY1; - - /// Bounding box Y2 - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int boundingBoxY2; - - /// Face deleted at - DateTime? deletedAt; - - /// Asset face ID - String id; - - /// Image height - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int imageHeight; - - /// Image width - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int imageWidth; - - /// Is the face visible in the asset - bool isVisible; - - /// Person ID - String? personId; - - /// Source type - String sourceType; - - @override - bool operator ==(Object other) => identical(this, other) || other is SyncAssetFaceV2 && - other.assetId == assetId && - other.boundingBoxX1 == boundingBoxX1 && - other.boundingBoxX2 == boundingBoxX2 && - other.boundingBoxY1 == boundingBoxY1 && - other.boundingBoxY2 == boundingBoxY2 && - other.deletedAt == deletedAt && - other.id == id && - other.imageHeight == imageHeight && - other.imageWidth == imageWidth && - other.isVisible == isVisible && - other.personId == personId && - other.sourceType == sourceType; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (assetId.hashCode) + - (boundingBoxX1.hashCode) + - (boundingBoxX2.hashCode) + - (boundingBoxY1.hashCode) + - (boundingBoxY2.hashCode) + - (deletedAt == null ? 0 : deletedAt!.hashCode) + - (id.hashCode) + - (imageHeight.hashCode) + - (imageWidth.hashCode) + - (isVisible.hashCode) + - (personId == null ? 0 : personId!.hashCode) + - (sourceType.hashCode); - - @override - String toString() => 'SyncAssetFaceV2[assetId=$assetId, boundingBoxX1=$boundingBoxX1, boundingBoxX2=$boundingBoxX2, boundingBoxY1=$boundingBoxY1, boundingBoxY2=$boundingBoxY2, deletedAt=$deletedAt, id=$id, imageHeight=$imageHeight, imageWidth=$imageWidth, isVisible=$isVisible, personId=$personId, sourceType=$sourceType]'; - - Map toJson() { - final json = {}; - json[r'assetId'] = this.assetId; - json[r'boundingBoxX1'] = this.boundingBoxX1; - json[r'boundingBoxX2'] = this.boundingBoxX2; - json[r'boundingBoxY1'] = this.boundingBoxY1; - json[r'boundingBoxY2'] = this.boundingBoxY2; - if (this.deletedAt != null) { - json[r'deletedAt'] = _isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? this.deletedAt!.millisecondsSinceEpoch - : this.deletedAt!.toUtc().toIso8601String(); - } else { - json[r'deletedAt'] = null; - } - json[r'id'] = this.id; - json[r'imageHeight'] = this.imageHeight; - json[r'imageWidth'] = this.imageWidth; - json[r'isVisible'] = this.isVisible; - if (this.personId != null) { - json[r'personId'] = this.personId; - } else { - json[r'personId'] = null; - } - json[r'sourceType'] = this.sourceType; - return json; - } - - /// Returns a new [SyncAssetFaceV2] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SyncAssetFaceV2? fromJson(dynamic value) { - upgradeDto(value, "SyncAssetFaceV2"); - if (value is Map) { - final json = value.cast(); - - return SyncAssetFaceV2( - assetId: mapValueOfType(json, r'assetId')!, - boundingBoxX1: mapValueOfType(json, r'boundingBoxX1')!, - boundingBoxX2: mapValueOfType(json, r'boundingBoxX2')!, - boundingBoxY1: mapValueOfType(json, r'boundingBoxY1')!, - boundingBoxY2: mapValueOfType(json, r'boundingBoxY2')!, - deletedAt: mapDateTime(json, r'deletedAt', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/'), - id: mapValueOfType(json, r'id')!, - imageHeight: mapValueOfType(json, r'imageHeight')!, - imageWidth: mapValueOfType(json, r'imageWidth')!, - isVisible: mapValueOfType(json, r'isVisible')!, - personId: mapValueOfType(json, r'personId'), - sourceType: mapValueOfType(json, r'sourceType')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SyncAssetFaceV2.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SyncAssetFaceV2.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SyncAssetFaceV2-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SyncAssetFaceV2.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'assetId', - 'boundingBoxX1', - 'boundingBoxX2', - 'boundingBoxY1', - 'boundingBoxY2', - 'deletedAt', - 'id', - 'imageHeight', - 'imageWidth', - 'isVisible', - 'personId', - 'sourceType', - }; -} - diff --git a/mobile/openapi/lib/model/sync_asset_metadata_delete_v1.dart b/mobile/openapi/lib/model/sync_asset_metadata_delete_v1.dart deleted file mode 100644 index 326555ef13..0000000000 --- a/mobile/openapi/lib/model/sync_asset_metadata_delete_v1.dart +++ /dev/null @@ -1,109 +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 SyncAssetMetadataDeleteV1 { - /// Returns a new [SyncAssetMetadataDeleteV1] instance. - SyncAssetMetadataDeleteV1({ - required this.assetId, - required this.key, - }); - - /// Asset ID - String assetId; - - /// Key - String key; - - @override - bool operator ==(Object other) => identical(this, other) || other is SyncAssetMetadataDeleteV1 && - other.assetId == assetId && - other.key == key; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (assetId.hashCode) + - (key.hashCode); - - @override - String toString() => 'SyncAssetMetadataDeleteV1[assetId=$assetId, key=$key]'; - - Map toJson() { - final json = {}; - json[r'assetId'] = this.assetId; - json[r'key'] = this.key; - return json; - } - - /// Returns a new [SyncAssetMetadataDeleteV1] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SyncAssetMetadataDeleteV1? fromJson(dynamic value) { - upgradeDto(value, "SyncAssetMetadataDeleteV1"); - if (value is Map) { - final json = value.cast(); - - return SyncAssetMetadataDeleteV1( - assetId: mapValueOfType(json, r'assetId')!, - key: mapValueOfType(json, r'key')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SyncAssetMetadataDeleteV1.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SyncAssetMetadataDeleteV1.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SyncAssetMetadataDeleteV1-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SyncAssetMetadataDeleteV1.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'assetId', - 'key', - }; -} - diff --git a/mobile/openapi/lib/model/sync_asset_metadata_v1.dart b/mobile/openapi/lib/model/sync_asset_metadata_v1.dart deleted file mode 100644 index 08d7eae49b..0000000000 --- a/mobile/openapi/lib/model/sync_asset_metadata_v1.dart +++ /dev/null @@ -1,118 +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 SyncAssetMetadataV1 { - /// Returns a new [SyncAssetMetadataV1] instance. - SyncAssetMetadataV1({ - required this.assetId, - required this.key, - this.value = const {}, - }); - - /// Asset ID - String assetId; - - /// Key - String key; - - /// Value - Map value; - - @override - bool operator ==(Object other) => identical(this, other) || other is SyncAssetMetadataV1 && - other.assetId == assetId && - other.key == key && - _deepEquality.equals(other.value, value); - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (assetId.hashCode) + - (key.hashCode) + - (value.hashCode); - - @override - String toString() => 'SyncAssetMetadataV1[assetId=$assetId, key=$key, value=$value]'; - - Map toJson() { - final json = {}; - json[r'assetId'] = this.assetId; - json[r'key'] = this.key; - json[r'value'] = this.value; - return json; - } - - /// Returns a new [SyncAssetMetadataV1] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SyncAssetMetadataV1? fromJson(dynamic value) { - upgradeDto(value, "SyncAssetMetadataV1"); - if (value is Map) { - final json = value.cast(); - - return SyncAssetMetadataV1( - assetId: mapValueOfType(json, r'assetId')!, - key: mapValueOfType(json, r'key')!, - value: mapCastOfType(json, r'value')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SyncAssetMetadataV1.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SyncAssetMetadataV1.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SyncAssetMetadataV1-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SyncAssetMetadataV1.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'assetId', - 'key', - 'value', - }; -} - diff --git a/mobile/openapi/lib/model/sync_asset_ocr_delete_v1.dart b/mobile/openapi/lib/model/sync_asset_ocr_delete_v1.dart deleted file mode 100644 index 018c134644..0000000000 --- a/mobile/openapi/lib/model/sync_asset_ocr_delete_v1.dart +++ /dev/null @@ -1,120 +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 SyncAssetOcrDeleteV1 { - /// Returns a new [SyncAssetOcrDeleteV1] instance. - SyncAssetOcrDeleteV1({ - required this.assetId, - required this.deletedAt, - required this.id, - }); - - /// Original asset ID of the deleted OCR entry - String assetId; - - /// Timestamp when the OCR entry was deleted - DateTime deletedAt; - - /// Audit row ID of the deleted OCR entry - String id; - - @override - bool operator ==(Object other) => identical(this, other) || other is SyncAssetOcrDeleteV1 && - other.assetId == assetId && - other.deletedAt == deletedAt && - other.id == id; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (assetId.hashCode) + - (deletedAt.hashCode) + - (id.hashCode); - - @override - String toString() => 'SyncAssetOcrDeleteV1[assetId=$assetId, deletedAt=$deletedAt, id=$id]'; - - Map toJson() { - final json = {}; - json[r'assetId'] = this.assetId; - json[r'deletedAt'] = _isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? this.deletedAt.millisecondsSinceEpoch - : this.deletedAt.toUtc().toIso8601String(); - json[r'id'] = this.id; - return json; - } - - /// Returns a new [SyncAssetOcrDeleteV1] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SyncAssetOcrDeleteV1? fromJson(dynamic value) { - upgradeDto(value, "SyncAssetOcrDeleteV1"); - if (value is Map) { - final json = value.cast(); - - return SyncAssetOcrDeleteV1( - assetId: mapValueOfType(json, r'assetId')!, - deletedAt: mapDateTime(json, r'deletedAt', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')!, - id: mapValueOfType(json, r'id')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SyncAssetOcrDeleteV1.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SyncAssetOcrDeleteV1.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SyncAssetOcrDeleteV1-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SyncAssetOcrDeleteV1.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'assetId', - 'deletedAt', - 'id', - }; -} - diff --git a/mobile/openapi/lib/model/sync_asset_ocr_v1.dart b/mobile/openapi/lib/model/sync_asset_ocr_v1.dart deleted file mode 100644 index 616583189a..0000000000 --- a/mobile/openapi/lib/model/sync_asset_ocr_v1.dart +++ /dev/null @@ -1,217 +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 SyncAssetOcrV1 { - /// Returns a new [SyncAssetOcrV1] instance. - SyncAssetOcrV1({ - required this.assetId, - required this.boxScore, - required this.id, - required this.isVisible, - required this.text, - required this.textScore, - required this.x1, - required this.x2, - required this.x3, - required this.x4, - required this.y1, - required this.y2, - required this.y3, - required this.y4, - }); - - /// Asset ID - String assetId; - - /// Confidence score of the bounding box - double boxScore; - - /// OCR entry ID - String id; - - /// Whether the OCR entry is visible - bool isVisible; - - /// Recognized text content - String text; - - /// Confidence score of the recognized text - double textScore; - - /// Top-left X coordinate (normalized 0–1) - double x1; - - /// Top-right X coordinate (normalized 0–1) - double x2; - - /// Bottom-right X coordinate (normalized 0–1) - double x3; - - /// Bottom-left X coordinate (normalized 0–1) - double x4; - - /// Top-left Y coordinate (normalized 0–1) - double y1; - - /// Top-right Y coordinate (normalized 0–1) - double y2; - - /// Bottom-right Y coordinate (normalized 0–1) - double y3; - - /// Bottom-left Y coordinate (normalized 0–1) - double y4; - - @override - bool operator ==(Object other) => identical(this, other) || other is SyncAssetOcrV1 && - other.assetId == assetId && - other.boxScore == boxScore && - other.id == id && - other.isVisible == isVisible && - other.text == text && - other.textScore == textScore && - other.x1 == x1 && - other.x2 == x2 && - other.x3 == x3 && - other.x4 == x4 && - other.y1 == y1 && - other.y2 == y2 && - other.y3 == y3 && - other.y4 == y4; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (assetId.hashCode) + - (boxScore.hashCode) + - (id.hashCode) + - (isVisible.hashCode) + - (text.hashCode) + - (textScore.hashCode) + - (x1.hashCode) + - (x2.hashCode) + - (x3.hashCode) + - (x4.hashCode) + - (y1.hashCode) + - (y2.hashCode) + - (y3.hashCode) + - (y4.hashCode); - - @override - String toString() => 'SyncAssetOcrV1[assetId=$assetId, boxScore=$boxScore, id=$id, isVisible=$isVisible, text=$text, textScore=$textScore, x1=$x1, x2=$x2, x3=$x3, x4=$x4, y1=$y1, y2=$y2, y3=$y3, y4=$y4]'; - - Map toJson() { - final json = {}; - json[r'assetId'] = this.assetId; - json[r'boxScore'] = this.boxScore; - json[r'id'] = this.id; - json[r'isVisible'] = this.isVisible; - json[r'text'] = this.text; - json[r'textScore'] = this.textScore; - json[r'x1'] = this.x1; - json[r'x2'] = this.x2; - json[r'x3'] = this.x3; - json[r'x4'] = this.x4; - json[r'y1'] = this.y1; - json[r'y2'] = this.y2; - json[r'y3'] = this.y3; - json[r'y4'] = this.y4; - return json; - } - - /// Returns a new [SyncAssetOcrV1] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SyncAssetOcrV1? fromJson(dynamic value) { - upgradeDto(value, "SyncAssetOcrV1"); - if (value is Map) { - final json = value.cast(); - - return SyncAssetOcrV1( - assetId: mapValueOfType(json, r'assetId')!, - boxScore: mapValueOfType(json, r'boxScore')!, - id: mapValueOfType(json, r'id')!, - isVisible: mapValueOfType(json, r'isVisible')!, - text: mapValueOfType(json, r'text')!, - textScore: mapValueOfType(json, r'textScore')!, - x1: mapValueOfType(json, r'x1')!, - x2: mapValueOfType(json, r'x2')!, - x3: mapValueOfType(json, r'x3')!, - x4: mapValueOfType(json, r'x4')!, - y1: mapValueOfType(json, r'y1')!, - y2: mapValueOfType(json, r'y2')!, - y3: mapValueOfType(json, r'y3')!, - y4: mapValueOfType(json, r'y4')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SyncAssetOcrV1.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SyncAssetOcrV1.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SyncAssetOcrV1-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SyncAssetOcrV1.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'assetId', - 'boxScore', - 'id', - 'isVisible', - 'text', - 'textScore', - 'x1', - 'x2', - 'x3', - 'x4', - 'y1', - 'y2', - 'y3', - 'y4', - }; -} - diff --git a/mobile/openapi/lib/model/sync_asset_v1.dart b/mobile/openapi/lib/model/sync_asset_v1.dart deleted file mode 100644 index 1bcfadd4e1..0000000000 --- a/mobile/openapi/lib/model/sync_asset_v1.dart +++ /dev/null @@ -1,333 +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 SyncAssetV1 { - /// Returns a new [SyncAssetV1] instance. - SyncAssetV1({ - required this.checksum, - required this.createdAt, - required this.deletedAt, - required this.duration, - required this.fileCreatedAt, - required this.fileModifiedAt, - required this.height, - required this.id, - required this.isEdited, - required this.isFavorite, - required this.libraryId, - required this.livePhotoVideoId, - required this.localDateTime, - required this.originalFileName, - required this.ownerId, - required this.stackId, - required this.thumbhash, - required this.type, - required this.visibility, - required this.width, - }); - - /// Checksum - String checksum; - - /// Uploaded to Immich at - DateTime? createdAt; - - /// Deleted at - DateTime? deletedAt; - - /// Duration - String? duration; - - /// File created at - DateTime? fileCreatedAt; - - /// File modified at - DateTime? fileModifiedAt; - - /// Asset height - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int? height; - - /// Asset ID - String id; - - /// Is edited - bool isEdited; - - /// Is favorite - bool isFavorite; - - /// Library ID - String? libraryId; - - /// Live photo video ID - String? livePhotoVideoId; - - /// Local date time - DateTime? localDateTime; - - /// Original file name - String originalFileName; - - /// Owner ID - String ownerId; - - /// Stack ID - String? stackId; - - /// Thumbhash - String? thumbhash; - - AssetTypeEnum type; - - AssetVisibility visibility; - - /// Asset width - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int? width; - - @override - bool operator ==(Object other) => identical(this, other) || other is SyncAssetV1 && - other.checksum == checksum && - other.createdAt == createdAt && - other.deletedAt == deletedAt && - other.duration == duration && - other.fileCreatedAt == fileCreatedAt && - other.fileModifiedAt == fileModifiedAt && - other.height == height && - other.id == id && - other.isEdited == isEdited && - other.isFavorite == isFavorite && - other.libraryId == libraryId && - other.livePhotoVideoId == livePhotoVideoId && - other.localDateTime == localDateTime && - other.originalFileName == originalFileName && - other.ownerId == ownerId && - other.stackId == stackId && - other.thumbhash == thumbhash && - other.type == type && - other.visibility == visibility && - other.width == width; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (checksum.hashCode) + - (createdAt == null ? 0 : createdAt!.hashCode) + - (deletedAt == null ? 0 : deletedAt!.hashCode) + - (duration == null ? 0 : duration!.hashCode) + - (fileCreatedAt == null ? 0 : fileCreatedAt!.hashCode) + - (fileModifiedAt == null ? 0 : fileModifiedAt!.hashCode) + - (height == null ? 0 : height!.hashCode) + - (id.hashCode) + - (isEdited.hashCode) + - (isFavorite.hashCode) + - (libraryId == null ? 0 : libraryId!.hashCode) + - (livePhotoVideoId == null ? 0 : livePhotoVideoId!.hashCode) + - (localDateTime == null ? 0 : localDateTime!.hashCode) + - (originalFileName.hashCode) + - (ownerId.hashCode) + - (stackId == null ? 0 : stackId!.hashCode) + - (thumbhash == null ? 0 : thumbhash!.hashCode) + - (type.hashCode) + - (visibility.hashCode) + - (width == null ? 0 : width!.hashCode); - - @override - String toString() => 'SyncAssetV1[checksum=$checksum, createdAt=$createdAt, deletedAt=$deletedAt, duration=$duration, fileCreatedAt=$fileCreatedAt, fileModifiedAt=$fileModifiedAt, height=$height, id=$id, isEdited=$isEdited, isFavorite=$isFavorite, libraryId=$libraryId, livePhotoVideoId=$livePhotoVideoId, localDateTime=$localDateTime, originalFileName=$originalFileName, ownerId=$ownerId, stackId=$stackId, thumbhash=$thumbhash, type=$type, visibility=$visibility, width=$width]'; - - Map toJson() { - final json = {}; - json[r'checksum'] = this.checksum; - if (this.createdAt != null) { - json[r'createdAt'] = _isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? this.createdAt!.millisecondsSinceEpoch - : this.createdAt!.toUtc().toIso8601String(); - } else { - json[r'createdAt'] = null; - } - if (this.deletedAt != null) { - json[r'deletedAt'] = _isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? this.deletedAt!.millisecondsSinceEpoch - : this.deletedAt!.toUtc().toIso8601String(); - } else { - json[r'deletedAt'] = null; - } - if (this.duration != null) { - json[r'duration'] = this.duration; - } else { - json[r'duration'] = null; - } - if (this.fileCreatedAt != null) { - json[r'fileCreatedAt'] = _isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? this.fileCreatedAt!.millisecondsSinceEpoch - : this.fileCreatedAt!.toUtc().toIso8601String(); - } else { - json[r'fileCreatedAt'] = null; - } - if (this.fileModifiedAt != null) { - json[r'fileModifiedAt'] = _isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? this.fileModifiedAt!.millisecondsSinceEpoch - : this.fileModifiedAt!.toUtc().toIso8601String(); - } else { - json[r'fileModifiedAt'] = null; - } - if (this.height != null) { - json[r'height'] = this.height; - } else { - json[r'height'] = null; - } - json[r'id'] = this.id; - json[r'isEdited'] = this.isEdited; - json[r'isFavorite'] = this.isFavorite; - if (this.libraryId != null) { - json[r'libraryId'] = this.libraryId; - } else { - json[r'libraryId'] = null; - } - if (this.livePhotoVideoId != null) { - json[r'livePhotoVideoId'] = this.livePhotoVideoId; - } else { - json[r'livePhotoVideoId'] = null; - } - if (this.localDateTime != null) { - json[r'localDateTime'] = _isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? this.localDateTime!.millisecondsSinceEpoch - : this.localDateTime!.toUtc().toIso8601String(); - } else { - json[r'localDateTime'] = null; - } - json[r'originalFileName'] = this.originalFileName; - json[r'ownerId'] = this.ownerId; - if (this.stackId != null) { - json[r'stackId'] = this.stackId; - } else { - json[r'stackId'] = null; - } - if (this.thumbhash != null) { - json[r'thumbhash'] = this.thumbhash; - } else { - json[r'thumbhash'] = null; - } - json[r'type'] = this.type; - json[r'visibility'] = this.visibility; - if (this.width != null) { - json[r'width'] = this.width; - } else { - json[r'width'] = null; - } - return json; - } - - /// Returns a new [SyncAssetV1] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SyncAssetV1? fromJson(dynamic value) { - upgradeDto(value, "SyncAssetV1"); - if (value is Map) { - final json = value.cast(); - - return SyncAssetV1( - checksum: mapValueOfType(json, r'checksum')!, - createdAt: mapDateTime(json, r'createdAt', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/'), - deletedAt: mapDateTime(json, r'deletedAt', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/'), - duration: mapValueOfType(json, r'duration'), - fileCreatedAt: mapDateTime(json, r'fileCreatedAt', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/'), - fileModifiedAt: mapDateTime(json, r'fileModifiedAt', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/'), - height: mapValueOfType(json, r'height'), - id: mapValueOfType(json, r'id')!, - isEdited: mapValueOfType(json, r'isEdited')!, - isFavorite: mapValueOfType(json, r'isFavorite')!, - libraryId: mapValueOfType(json, r'libraryId'), - livePhotoVideoId: mapValueOfType(json, r'livePhotoVideoId'), - localDateTime: mapDateTime(json, r'localDateTime', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/'), - originalFileName: mapValueOfType(json, r'originalFileName')!, - ownerId: mapValueOfType(json, r'ownerId')!, - stackId: mapValueOfType(json, r'stackId'), - thumbhash: mapValueOfType(json, r'thumbhash'), - type: AssetTypeEnum.fromJson(json[r'type'])!, - visibility: AssetVisibility.fromJson(json[r'visibility'])!, - width: mapValueOfType(json, r'width'), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SyncAssetV1.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SyncAssetV1.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SyncAssetV1-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SyncAssetV1.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'checksum', - 'createdAt', - 'deletedAt', - 'duration', - 'fileCreatedAt', - 'fileModifiedAt', - 'height', - 'id', - 'isEdited', - 'isFavorite', - 'libraryId', - 'livePhotoVideoId', - 'localDateTime', - 'originalFileName', - 'ownerId', - 'stackId', - 'thumbhash', - 'type', - 'visibility', - 'width', - }; -} - diff --git a/mobile/openapi/lib/model/sync_asset_v2.dart b/mobile/openapi/lib/model/sync_asset_v2.dart deleted file mode 100644 index 37751f9f91..0000000000 --- a/mobile/openapi/lib/model/sync_asset_v2.dart +++ /dev/null @@ -1,336 +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 SyncAssetV2 { - /// Returns a new [SyncAssetV2] instance. - SyncAssetV2({ - required this.checksum, - required this.createdAt, - required this.deletedAt, - required this.duration, - required this.fileCreatedAt, - required this.fileModifiedAt, - required this.height, - required this.id, - required this.isEdited, - required this.isFavorite, - required this.libraryId, - required this.livePhotoVideoId, - required this.localDateTime, - required this.originalFileName, - required this.ownerId, - required this.stackId, - required this.thumbhash, - required this.type, - required this.visibility, - required this.width, - }); - - /// Checksum - String checksum; - - /// Uploaded to Immich at - DateTime? createdAt; - - /// Deleted at - DateTime? deletedAt; - - /// Duration - /// - /// Minimum value: 0 - /// Maximum value: 2147483647 - int? duration; - - /// File created at - DateTime? fileCreatedAt; - - /// File modified at - DateTime? fileModifiedAt; - - /// Asset height - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int? height; - - /// Asset ID - String id; - - /// Is edited - bool isEdited; - - /// Is favorite - bool isFavorite; - - /// Library ID - String? libraryId; - - /// Live photo video ID - String? livePhotoVideoId; - - /// Local date time - DateTime? localDateTime; - - /// Original file name - String originalFileName; - - /// Owner ID - String ownerId; - - /// Stack ID - String? stackId; - - /// Thumbhash - String? thumbhash; - - AssetTypeEnum type; - - AssetVisibility visibility; - - /// Asset width - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int? width; - - @override - bool operator ==(Object other) => identical(this, other) || other is SyncAssetV2 && - other.checksum == checksum && - other.createdAt == createdAt && - other.deletedAt == deletedAt && - other.duration == duration && - other.fileCreatedAt == fileCreatedAt && - other.fileModifiedAt == fileModifiedAt && - other.height == height && - other.id == id && - other.isEdited == isEdited && - other.isFavorite == isFavorite && - other.libraryId == libraryId && - other.livePhotoVideoId == livePhotoVideoId && - other.localDateTime == localDateTime && - other.originalFileName == originalFileName && - other.ownerId == ownerId && - other.stackId == stackId && - other.thumbhash == thumbhash && - other.type == type && - other.visibility == visibility && - other.width == width; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (checksum.hashCode) + - (createdAt == null ? 0 : createdAt!.hashCode) + - (deletedAt == null ? 0 : deletedAt!.hashCode) + - (duration == null ? 0 : duration!.hashCode) + - (fileCreatedAt == null ? 0 : fileCreatedAt!.hashCode) + - (fileModifiedAt == null ? 0 : fileModifiedAt!.hashCode) + - (height == null ? 0 : height!.hashCode) + - (id.hashCode) + - (isEdited.hashCode) + - (isFavorite.hashCode) + - (libraryId == null ? 0 : libraryId!.hashCode) + - (livePhotoVideoId == null ? 0 : livePhotoVideoId!.hashCode) + - (localDateTime == null ? 0 : localDateTime!.hashCode) + - (originalFileName.hashCode) + - (ownerId.hashCode) + - (stackId == null ? 0 : stackId!.hashCode) + - (thumbhash == null ? 0 : thumbhash!.hashCode) + - (type.hashCode) + - (visibility.hashCode) + - (width == null ? 0 : width!.hashCode); - - @override - String toString() => 'SyncAssetV2[checksum=$checksum, createdAt=$createdAt, deletedAt=$deletedAt, duration=$duration, fileCreatedAt=$fileCreatedAt, fileModifiedAt=$fileModifiedAt, height=$height, id=$id, isEdited=$isEdited, isFavorite=$isFavorite, libraryId=$libraryId, livePhotoVideoId=$livePhotoVideoId, localDateTime=$localDateTime, originalFileName=$originalFileName, ownerId=$ownerId, stackId=$stackId, thumbhash=$thumbhash, type=$type, visibility=$visibility, width=$width]'; - - Map toJson() { - final json = {}; - json[r'checksum'] = this.checksum; - if (this.createdAt != null) { - json[r'createdAt'] = _isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? this.createdAt!.millisecondsSinceEpoch - : this.createdAt!.toUtc().toIso8601String(); - } else { - json[r'createdAt'] = null; - } - if (this.deletedAt != null) { - json[r'deletedAt'] = _isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? this.deletedAt!.millisecondsSinceEpoch - : this.deletedAt!.toUtc().toIso8601String(); - } else { - json[r'deletedAt'] = null; - } - if (this.duration != null) { - json[r'duration'] = this.duration; - } else { - json[r'duration'] = null; - } - if (this.fileCreatedAt != null) { - json[r'fileCreatedAt'] = _isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? this.fileCreatedAt!.millisecondsSinceEpoch - : this.fileCreatedAt!.toUtc().toIso8601String(); - } else { - json[r'fileCreatedAt'] = null; - } - if (this.fileModifiedAt != null) { - json[r'fileModifiedAt'] = _isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? this.fileModifiedAt!.millisecondsSinceEpoch - : this.fileModifiedAt!.toUtc().toIso8601String(); - } else { - json[r'fileModifiedAt'] = null; - } - if (this.height != null) { - json[r'height'] = this.height; - } else { - json[r'height'] = null; - } - json[r'id'] = this.id; - json[r'isEdited'] = this.isEdited; - json[r'isFavorite'] = this.isFavorite; - if (this.libraryId != null) { - json[r'libraryId'] = this.libraryId; - } else { - json[r'libraryId'] = null; - } - if (this.livePhotoVideoId != null) { - json[r'livePhotoVideoId'] = this.livePhotoVideoId; - } else { - json[r'livePhotoVideoId'] = null; - } - if (this.localDateTime != null) { - json[r'localDateTime'] = _isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? this.localDateTime!.millisecondsSinceEpoch - : this.localDateTime!.toUtc().toIso8601String(); - } else { - json[r'localDateTime'] = null; - } - json[r'originalFileName'] = this.originalFileName; - json[r'ownerId'] = this.ownerId; - if (this.stackId != null) { - json[r'stackId'] = this.stackId; - } else { - json[r'stackId'] = null; - } - if (this.thumbhash != null) { - json[r'thumbhash'] = this.thumbhash; - } else { - json[r'thumbhash'] = null; - } - json[r'type'] = this.type; - json[r'visibility'] = this.visibility; - if (this.width != null) { - json[r'width'] = this.width; - } else { - json[r'width'] = null; - } - return json; - } - - /// Returns a new [SyncAssetV2] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SyncAssetV2? fromJson(dynamic value) { - upgradeDto(value, "SyncAssetV2"); - if (value is Map) { - final json = value.cast(); - - return SyncAssetV2( - checksum: mapValueOfType(json, r'checksum')!, - createdAt: mapDateTime(json, r'createdAt', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/'), - deletedAt: mapDateTime(json, r'deletedAt', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/'), - duration: mapValueOfType(json, r'duration'), - fileCreatedAt: mapDateTime(json, r'fileCreatedAt', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/'), - fileModifiedAt: mapDateTime(json, r'fileModifiedAt', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/'), - height: mapValueOfType(json, r'height'), - id: mapValueOfType(json, r'id')!, - isEdited: mapValueOfType(json, r'isEdited')!, - isFavorite: mapValueOfType(json, r'isFavorite')!, - libraryId: mapValueOfType(json, r'libraryId'), - livePhotoVideoId: mapValueOfType(json, r'livePhotoVideoId'), - localDateTime: mapDateTime(json, r'localDateTime', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/'), - originalFileName: mapValueOfType(json, r'originalFileName')!, - ownerId: mapValueOfType(json, r'ownerId')!, - stackId: mapValueOfType(json, r'stackId'), - thumbhash: mapValueOfType(json, r'thumbhash'), - type: AssetTypeEnum.fromJson(json[r'type'])!, - visibility: AssetVisibility.fromJson(json[r'visibility'])!, - width: mapValueOfType(json, r'width'), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SyncAssetV2.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SyncAssetV2.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SyncAssetV2-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SyncAssetV2.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'checksum', - 'createdAt', - 'deletedAt', - 'duration', - 'fileCreatedAt', - 'fileModifiedAt', - 'height', - 'id', - 'isEdited', - 'isFavorite', - 'libraryId', - 'livePhotoVideoId', - 'localDateTime', - 'originalFileName', - 'ownerId', - 'stackId', - 'thumbhash', - 'type', - 'visibility', - 'width', - }; -} - diff --git a/mobile/openapi/lib/model/sync_auth_user_v1.dart b/mobile/openapi/lib/model/sync_auth_user_v1.dart deleted file mode 100644 index 24e8bc897e..0000000000 --- a/mobile/openapi/lib/model/sync_auth_user_v1.dart +++ /dev/null @@ -1,235 +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 SyncAuthUserV1 { - /// Returns a new [SyncAuthUserV1] instance. - SyncAuthUserV1({ - this.avatarColor = const Optional.absent(), - required this.deletedAt, - required this.email, - required this.hasProfileImage, - required this.id, - required this.isAdmin, - required this.name, - required this.oauthId, - required this.pinCode, - required this.profileChangedAt, - required this.quotaSizeInBytes, - required this.quotaUsageInBytes, - required this.storageLabel, - }); - - Optional avatarColor; - - /// User deleted at - DateTime? deletedAt; - - /// User email - String email; - - /// User has profile image - bool hasProfileImage; - - /// User ID - String id; - - /// User is admin - bool isAdmin; - - /// User name - String name; - - /// User OAuth ID - String oauthId; - - /// User pin code - String? pinCode; - - /// User profile changed at - DateTime profileChangedAt; - - /// Quota size in bytes - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int? quotaSizeInBytes; - - /// Quota usage in bytes - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int quotaUsageInBytes; - - /// User storage label - String? storageLabel; - - @override - bool operator ==(Object other) => identical(this, other) || other is SyncAuthUserV1 && - other.avatarColor == avatarColor && - other.deletedAt == deletedAt && - other.email == email && - other.hasProfileImage == hasProfileImage && - other.id == id && - other.isAdmin == isAdmin && - other.name == name && - other.oauthId == oauthId && - other.pinCode == pinCode && - other.profileChangedAt == profileChangedAt && - other.quotaSizeInBytes == quotaSizeInBytes && - other.quotaUsageInBytes == quotaUsageInBytes && - other.storageLabel == storageLabel; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (avatarColor == null ? 0 : avatarColor!.hashCode) + - (deletedAt == null ? 0 : deletedAt!.hashCode) + - (email.hashCode) + - (hasProfileImage.hashCode) + - (id.hashCode) + - (isAdmin.hashCode) + - (name.hashCode) + - (oauthId.hashCode) + - (pinCode == null ? 0 : pinCode!.hashCode) + - (profileChangedAt.hashCode) + - (quotaSizeInBytes == null ? 0 : quotaSizeInBytes!.hashCode) + - (quotaUsageInBytes.hashCode) + - (storageLabel == null ? 0 : storageLabel!.hashCode); - - @override - String toString() => 'SyncAuthUserV1[avatarColor=$avatarColor, deletedAt=$deletedAt, email=$email, hasProfileImage=$hasProfileImage, id=$id, isAdmin=$isAdmin, name=$name, oauthId=$oauthId, pinCode=$pinCode, profileChangedAt=$profileChangedAt, quotaSizeInBytes=$quotaSizeInBytes, quotaUsageInBytes=$quotaUsageInBytes, storageLabel=$storageLabel]'; - - Map toJson() { - final json = {}; - if (this.avatarColor.isPresent) { - final value = this.avatarColor.value; - json[r'avatarColor'] = value; - } - if (this.deletedAt != null) { - json[r'deletedAt'] = _isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? this.deletedAt!.millisecondsSinceEpoch - : this.deletedAt!.toUtc().toIso8601String(); - } else { - json[r'deletedAt'] = null; - } - json[r'email'] = this.email; - json[r'hasProfileImage'] = this.hasProfileImage; - json[r'id'] = this.id; - json[r'isAdmin'] = this.isAdmin; - json[r'name'] = this.name; - json[r'oauthId'] = this.oauthId; - if (this.pinCode != null) { - json[r'pinCode'] = this.pinCode; - } else { - json[r'pinCode'] = null; - } - json[r'profileChangedAt'] = _isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? this.profileChangedAt.millisecondsSinceEpoch - : this.profileChangedAt.toUtc().toIso8601String(); - if (this.quotaSizeInBytes != null) { - json[r'quotaSizeInBytes'] = this.quotaSizeInBytes; - } else { - json[r'quotaSizeInBytes'] = null; - } - json[r'quotaUsageInBytes'] = this.quotaUsageInBytes; - if (this.storageLabel != null) { - json[r'storageLabel'] = this.storageLabel; - } else { - json[r'storageLabel'] = null; - } - return json; - } - - /// Returns a new [SyncAuthUserV1] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SyncAuthUserV1? fromJson(dynamic value) { - upgradeDto(value, "SyncAuthUserV1"); - if (value is Map) { - final json = value.cast(); - - return SyncAuthUserV1( - avatarColor: json.containsKey(r'avatarColor') ? Optional.present(UserAvatarColor.fromJson(json[r'avatarColor'])) : const Optional.absent(), - deletedAt: mapDateTime(json, r'deletedAt', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/'), - email: mapValueOfType(json, r'email')!, - hasProfileImage: mapValueOfType(json, r'hasProfileImage')!, - id: mapValueOfType(json, r'id')!, - isAdmin: mapValueOfType(json, r'isAdmin')!, - name: mapValueOfType(json, r'name')!, - oauthId: mapValueOfType(json, r'oauthId')!, - pinCode: mapValueOfType(json, r'pinCode'), - profileChangedAt: mapDateTime(json, r'profileChangedAt', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')!, - quotaSizeInBytes: mapValueOfType(json, r'quotaSizeInBytes'), - quotaUsageInBytes: mapValueOfType(json, r'quotaUsageInBytes')!, - storageLabel: mapValueOfType(json, r'storageLabel'), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SyncAuthUserV1.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SyncAuthUserV1.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SyncAuthUserV1-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SyncAuthUserV1.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'deletedAt', - 'email', - 'hasProfileImage', - 'id', - 'isAdmin', - 'name', - 'oauthId', - 'pinCode', - 'profileChangedAt', - 'quotaSizeInBytes', - 'quotaUsageInBytes', - 'storageLabel', - }; -} - diff --git a/mobile/openapi/lib/model/sync_entity_type.dart b/mobile/openapi/lib/model/sync_entity_type.dart deleted file mode 100644 index 543e72eb44..0000000000 --- a/mobile/openapi/lib/model/sync_entity_type.dart +++ /dev/null @@ -1,256 +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; - -/// Sync entity type -class SyncEntityType { - /// Instantiate a new enum with the provided [value]. - const SyncEntityType._(this.value); - - /// The underlying value of this enum member. - final String value; - - @override - String toString() => value; - - String toJson() => value; - - static const authUserV1 = SyncEntityType._(r'AuthUserV1'); - static const userV1 = SyncEntityType._(r'UserV1'); - static const userDeleteV1 = SyncEntityType._(r'UserDeleteV1'); - static const assetV1 = SyncEntityType._(r'AssetV1'); - static const assetV2 = SyncEntityType._(r'AssetV2'); - static const assetDeleteV1 = SyncEntityType._(r'AssetDeleteV1'); - static const assetExifV1 = SyncEntityType._(r'AssetExifV1'); - static const assetEditV1 = SyncEntityType._(r'AssetEditV1'); - static const assetEditDeleteV1 = SyncEntityType._(r'AssetEditDeleteV1'); - static const assetMetadataV1 = SyncEntityType._(r'AssetMetadataV1'); - static const assetMetadataDeleteV1 = SyncEntityType._(r'AssetMetadataDeleteV1'); - static const assetOcrV1 = SyncEntityType._(r'AssetOcrV1'); - static const assetOcrDeleteV1 = SyncEntityType._(r'AssetOcrDeleteV1'); - static const partnerV1 = SyncEntityType._(r'PartnerV1'); - static const partnerDeleteV1 = SyncEntityType._(r'PartnerDeleteV1'); - static const partnerAssetV1 = SyncEntityType._(r'PartnerAssetV1'); - static const partnerAssetV2 = SyncEntityType._(r'PartnerAssetV2'); - static const partnerAssetBackfillV1 = SyncEntityType._(r'PartnerAssetBackfillV1'); - static const partnerAssetBackfillV2 = SyncEntityType._(r'PartnerAssetBackfillV2'); - static const partnerAssetDeleteV1 = SyncEntityType._(r'PartnerAssetDeleteV1'); - static const partnerAssetExifV1 = SyncEntityType._(r'PartnerAssetExifV1'); - static const partnerAssetExifBackfillV1 = SyncEntityType._(r'PartnerAssetExifBackfillV1'); - static const partnerStackBackfillV1 = SyncEntityType._(r'PartnerStackBackfillV1'); - static const partnerStackDeleteV1 = SyncEntityType._(r'PartnerStackDeleteV1'); - static const partnerStackV1 = SyncEntityType._(r'PartnerStackV1'); - static const albumV1 = SyncEntityType._(r'AlbumV1'); - static const albumV2 = SyncEntityType._(r'AlbumV2'); - static const albumDeleteV1 = SyncEntityType._(r'AlbumDeleteV1'); - static const albumUserV1 = SyncEntityType._(r'AlbumUserV1'); - static const albumUserBackfillV1 = SyncEntityType._(r'AlbumUserBackfillV1'); - static const albumUserDeleteV1 = SyncEntityType._(r'AlbumUserDeleteV1'); - static const albumAssetCreateV1 = SyncEntityType._(r'AlbumAssetCreateV1'); - static const albumAssetCreateV2 = SyncEntityType._(r'AlbumAssetCreateV2'); - static const albumAssetUpdateV1 = SyncEntityType._(r'AlbumAssetUpdateV1'); - static const albumAssetUpdateV2 = SyncEntityType._(r'AlbumAssetUpdateV2'); - static const albumAssetBackfillV1 = SyncEntityType._(r'AlbumAssetBackfillV1'); - static const albumAssetBackfillV2 = SyncEntityType._(r'AlbumAssetBackfillV2'); - static const albumAssetExifCreateV1 = SyncEntityType._(r'AlbumAssetExifCreateV1'); - static const albumAssetExifUpdateV1 = SyncEntityType._(r'AlbumAssetExifUpdateV1'); - static const albumAssetExifBackfillV1 = SyncEntityType._(r'AlbumAssetExifBackfillV1'); - static const albumToAssetV1 = SyncEntityType._(r'AlbumToAssetV1'); - static const albumToAssetDeleteV1 = SyncEntityType._(r'AlbumToAssetDeleteV1'); - static const albumToAssetBackfillV1 = SyncEntityType._(r'AlbumToAssetBackfillV1'); - static const memoryV1 = SyncEntityType._(r'MemoryV1'); - static const memoryDeleteV1 = SyncEntityType._(r'MemoryDeleteV1'); - static const memoryToAssetV1 = SyncEntityType._(r'MemoryToAssetV1'); - static const memoryToAssetDeleteV1 = SyncEntityType._(r'MemoryToAssetDeleteV1'); - static const stackV1 = SyncEntityType._(r'StackV1'); - static const stackDeleteV1 = SyncEntityType._(r'StackDeleteV1'); - static const personV1 = SyncEntityType._(r'PersonV1'); - static const personDeleteV1 = SyncEntityType._(r'PersonDeleteV1'); - static const assetFaceV1 = SyncEntityType._(r'AssetFaceV1'); - static const assetFaceV2 = SyncEntityType._(r'AssetFaceV2'); - static const assetFaceDeleteV1 = SyncEntityType._(r'AssetFaceDeleteV1'); - static const userMetadataV1 = SyncEntityType._(r'UserMetadataV1'); - static const userMetadataDeleteV1 = SyncEntityType._(r'UserMetadataDeleteV1'); - static const syncAckV1 = SyncEntityType._(r'SyncAckV1'); - static const syncResetV1 = SyncEntityType._(r'SyncResetV1'); - static const syncCompleteV1 = SyncEntityType._(r'SyncCompleteV1'); - - /// List of all possible values in this [enum][SyncEntityType]. - static const values = [ - authUserV1, - userV1, - userDeleteV1, - assetV1, - assetV2, - assetDeleteV1, - assetExifV1, - assetEditV1, - assetEditDeleteV1, - assetMetadataV1, - assetMetadataDeleteV1, - assetOcrV1, - assetOcrDeleteV1, - partnerV1, - partnerDeleteV1, - partnerAssetV1, - partnerAssetV2, - partnerAssetBackfillV1, - partnerAssetBackfillV2, - partnerAssetDeleteV1, - partnerAssetExifV1, - partnerAssetExifBackfillV1, - partnerStackBackfillV1, - partnerStackDeleteV1, - partnerStackV1, - albumV1, - albumV2, - albumDeleteV1, - albumUserV1, - albumUserBackfillV1, - albumUserDeleteV1, - albumAssetCreateV1, - albumAssetCreateV2, - albumAssetUpdateV1, - albumAssetUpdateV2, - albumAssetBackfillV1, - albumAssetBackfillV2, - albumAssetExifCreateV1, - albumAssetExifUpdateV1, - albumAssetExifBackfillV1, - albumToAssetV1, - albumToAssetDeleteV1, - albumToAssetBackfillV1, - memoryV1, - memoryDeleteV1, - memoryToAssetV1, - memoryToAssetDeleteV1, - stackV1, - stackDeleteV1, - personV1, - personDeleteV1, - assetFaceV1, - assetFaceV2, - assetFaceDeleteV1, - userMetadataV1, - userMetadataDeleteV1, - syncAckV1, - syncResetV1, - syncCompleteV1, - ]; - - static SyncEntityType? fromJson(dynamic value) => SyncEntityTypeTypeTransformer().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 = SyncEntityType.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } -} - -/// Transformation class that can [encode] an instance of [SyncEntityType] to String, -/// and [decode] dynamic data back to [SyncEntityType]. -class SyncEntityTypeTypeTransformer { - factory SyncEntityTypeTypeTransformer() => _instance ??= const SyncEntityTypeTypeTransformer._(); - - const SyncEntityTypeTypeTransformer._(); - - String encode(SyncEntityType data) => data.value; - - /// Decodes a [dynamic value][data] to a SyncEntityType. - /// - /// 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. - SyncEntityType? decode(dynamic data, {bool allowNull = true}) { - if (data != null) { - switch (data) { - case r'AuthUserV1': return SyncEntityType.authUserV1; - case r'UserV1': return SyncEntityType.userV1; - case r'UserDeleteV1': return SyncEntityType.userDeleteV1; - case r'AssetV1': return SyncEntityType.assetV1; - case r'AssetV2': return SyncEntityType.assetV2; - case r'AssetDeleteV1': return SyncEntityType.assetDeleteV1; - case r'AssetExifV1': return SyncEntityType.assetExifV1; - case r'AssetEditV1': return SyncEntityType.assetEditV1; - case r'AssetEditDeleteV1': return SyncEntityType.assetEditDeleteV1; - case r'AssetMetadataV1': return SyncEntityType.assetMetadataV1; - case r'AssetMetadataDeleteV1': return SyncEntityType.assetMetadataDeleteV1; - case r'AssetOcrV1': return SyncEntityType.assetOcrV1; - case r'AssetOcrDeleteV1': return SyncEntityType.assetOcrDeleteV1; - case r'PartnerV1': return SyncEntityType.partnerV1; - case r'PartnerDeleteV1': return SyncEntityType.partnerDeleteV1; - case r'PartnerAssetV1': return SyncEntityType.partnerAssetV1; - case r'PartnerAssetV2': return SyncEntityType.partnerAssetV2; - case r'PartnerAssetBackfillV1': return SyncEntityType.partnerAssetBackfillV1; - case r'PartnerAssetBackfillV2': return SyncEntityType.partnerAssetBackfillV2; - case r'PartnerAssetDeleteV1': return SyncEntityType.partnerAssetDeleteV1; - case r'PartnerAssetExifV1': return SyncEntityType.partnerAssetExifV1; - case r'PartnerAssetExifBackfillV1': return SyncEntityType.partnerAssetExifBackfillV1; - case r'PartnerStackBackfillV1': return SyncEntityType.partnerStackBackfillV1; - case r'PartnerStackDeleteV1': return SyncEntityType.partnerStackDeleteV1; - case r'PartnerStackV1': return SyncEntityType.partnerStackV1; - case r'AlbumV1': return SyncEntityType.albumV1; - case r'AlbumV2': return SyncEntityType.albumV2; - case r'AlbumDeleteV1': return SyncEntityType.albumDeleteV1; - case r'AlbumUserV1': return SyncEntityType.albumUserV1; - case r'AlbumUserBackfillV1': return SyncEntityType.albumUserBackfillV1; - case r'AlbumUserDeleteV1': return SyncEntityType.albumUserDeleteV1; - case r'AlbumAssetCreateV1': return SyncEntityType.albumAssetCreateV1; - case r'AlbumAssetCreateV2': return SyncEntityType.albumAssetCreateV2; - case r'AlbumAssetUpdateV1': return SyncEntityType.albumAssetUpdateV1; - case r'AlbumAssetUpdateV2': return SyncEntityType.albumAssetUpdateV2; - case r'AlbumAssetBackfillV1': return SyncEntityType.albumAssetBackfillV1; - case r'AlbumAssetBackfillV2': return SyncEntityType.albumAssetBackfillV2; - case r'AlbumAssetExifCreateV1': return SyncEntityType.albumAssetExifCreateV1; - case r'AlbumAssetExifUpdateV1': return SyncEntityType.albumAssetExifUpdateV1; - case r'AlbumAssetExifBackfillV1': return SyncEntityType.albumAssetExifBackfillV1; - case r'AlbumToAssetV1': return SyncEntityType.albumToAssetV1; - case r'AlbumToAssetDeleteV1': return SyncEntityType.albumToAssetDeleteV1; - case r'AlbumToAssetBackfillV1': return SyncEntityType.albumToAssetBackfillV1; - case r'MemoryV1': return SyncEntityType.memoryV1; - case r'MemoryDeleteV1': return SyncEntityType.memoryDeleteV1; - case r'MemoryToAssetV1': return SyncEntityType.memoryToAssetV1; - case r'MemoryToAssetDeleteV1': return SyncEntityType.memoryToAssetDeleteV1; - case r'StackV1': return SyncEntityType.stackV1; - case r'StackDeleteV1': return SyncEntityType.stackDeleteV1; - case r'PersonV1': return SyncEntityType.personV1; - case r'PersonDeleteV1': return SyncEntityType.personDeleteV1; - case r'AssetFaceV1': return SyncEntityType.assetFaceV1; - case r'AssetFaceV2': return SyncEntityType.assetFaceV2; - case r'AssetFaceDeleteV1': return SyncEntityType.assetFaceDeleteV1; - case r'UserMetadataV1': return SyncEntityType.userMetadataV1; - case r'UserMetadataDeleteV1': return SyncEntityType.userMetadataDeleteV1; - case r'SyncAckV1': return SyncEntityType.syncAckV1; - case r'SyncResetV1': return SyncEntityType.syncResetV1; - case r'SyncCompleteV1': return SyncEntityType.syncCompleteV1; - default: - if (!allowNull) { - throw ArgumentError('Unknown enum value to decode: $data'); - } - } - } - return null; - } - - /// Singleton [SyncEntityTypeTypeTransformer] instance. - static SyncEntityTypeTypeTransformer? _instance; -} - diff --git a/mobile/openapi/lib/model/sync_memory_asset_delete_v1.dart b/mobile/openapi/lib/model/sync_memory_asset_delete_v1.dart deleted file mode 100644 index c37682d02d..0000000000 --- a/mobile/openapi/lib/model/sync_memory_asset_delete_v1.dart +++ /dev/null @@ -1,109 +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 SyncMemoryAssetDeleteV1 { - /// Returns a new [SyncMemoryAssetDeleteV1] instance. - SyncMemoryAssetDeleteV1({ - required this.assetId, - required this.memoryId, - }); - - /// Asset ID - String assetId; - - /// Memory ID - String memoryId; - - @override - bool operator ==(Object other) => identical(this, other) || other is SyncMemoryAssetDeleteV1 && - other.assetId == assetId && - other.memoryId == memoryId; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (assetId.hashCode) + - (memoryId.hashCode); - - @override - String toString() => 'SyncMemoryAssetDeleteV1[assetId=$assetId, memoryId=$memoryId]'; - - Map toJson() { - final json = {}; - json[r'assetId'] = this.assetId; - json[r'memoryId'] = this.memoryId; - return json; - } - - /// Returns a new [SyncMemoryAssetDeleteV1] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SyncMemoryAssetDeleteV1? fromJson(dynamic value) { - upgradeDto(value, "SyncMemoryAssetDeleteV1"); - if (value is Map) { - final json = value.cast(); - - return SyncMemoryAssetDeleteV1( - assetId: mapValueOfType(json, r'assetId')!, - memoryId: mapValueOfType(json, r'memoryId')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SyncMemoryAssetDeleteV1.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SyncMemoryAssetDeleteV1.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SyncMemoryAssetDeleteV1-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SyncMemoryAssetDeleteV1.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'assetId', - 'memoryId', - }; -} - diff --git a/mobile/openapi/lib/model/sync_memory_asset_v1.dart b/mobile/openapi/lib/model/sync_memory_asset_v1.dart deleted file mode 100644 index 2cfab98afd..0000000000 --- a/mobile/openapi/lib/model/sync_memory_asset_v1.dart +++ /dev/null @@ -1,109 +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 SyncMemoryAssetV1 { - /// Returns a new [SyncMemoryAssetV1] instance. - SyncMemoryAssetV1({ - required this.assetId, - required this.memoryId, - }); - - /// Asset ID - String assetId; - - /// Memory ID - String memoryId; - - @override - bool operator ==(Object other) => identical(this, other) || other is SyncMemoryAssetV1 && - other.assetId == assetId && - other.memoryId == memoryId; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (assetId.hashCode) + - (memoryId.hashCode); - - @override - String toString() => 'SyncMemoryAssetV1[assetId=$assetId, memoryId=$memoryId]'; - - Map toJson() { - final json = {}; - json[r'assetId'] = this.assetId; - json[r'memoryId'] = this.memoryId; - return json; - } - - /// Returns a new [SyncMemoryAssetV1] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SyncMemoryAssetV1? fromJson(dynamic value) { - upgradeDto(value, "SyncMemoryAssetV1"); - if (value is Map) { - final json = value.cast(); - - return SyncMemoryAssetV1( - assetId: mapValueOfType(json, r'assetId')!, - memoryId: mapValueOfType(json, r'memoryId')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SyncMemoryAssetV1.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SyncMemoryAssetV1.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SyncMemoryAssetV1-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SyncMemoryAssetV1.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'assetId', - 'memoryId', - }; -} - diff --git a/mobile/openapi/lib/model/sync_memory_delete_v1.dart b/mobile/openapi/lib/model/sync_memory_delete_v1.dart deleted file mode 100644 index d5f63ec8fa..0000000000 --- a/mobile/openapi/lib/model/sync_memory_delete_v1.dart +++ /dev/null @@ -1,100 +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 SyncMemoryDeleteV1 { - /// Returns a new [SyncMemoryDeleteV1] instance. - SyncMemoryDeleteV1({ - required this.memoryId, - }); - - /// Memory ID - String memoryId; - - @override - bool operator ==(Object other) => identical(this, other) || other is SyncMemoryDeleteV1 && - other.memoryId == memoryId; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (memoryId.hashCode); - - @override - String toString() => 'SyncMemoryDeleteV1[memoryId=$memoryId]'; - - Map toJson() { - final json = {}; - json[r'memoryId'] = this.memoryId; - return json; - } - - /// Returns a new [SyncMemoryDeleteV1] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SyncMemoryDeleteV1? fromJson(dynamic value) { - upgradeDto(value, "SyncMemoryDeleteV1"); - if (value is Map) { - final json = value.cast(); - - return SyncMemoryDeleteV1( - memoryId: mapValueOfType(json, r'memoryId')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SyncMemoryDeleteV1.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SyncMemoryDeleteV1.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SyncMemoryDeleteV1-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SyncMemoryDeleteV1.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'memoryId', - }; -} - diff --git a/mobile/openapi/lib/model/sync_memory_v1.dart b/mobile/openapi/lib/model/sync_memory_v1.dart deleted file mode 100644 index 95f5751f1f..0000000000 --- a/mobile/openapi/lib/model/sync_memory_v1.dart +++ /dev/null @@ -1,228 +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 SyncMemoryV1 { - /// Returns a new [SyncMemoryV1] instance. - SyncMemoryV1({ - required this.createdAt, - this.data = const {}, - required this.deletedAt, - required this.hideAt, - required this.id, - required this.isSaved, - required this.memoryAt, - required this.ownerId, - required this.seenAt, - required this.showAt, - required this.type, - required this.updatedAt, - }); - - /// Created at - DateTime createdAt; - - /// Data - Map data; - - /// Deleted at - DateTime? deletedAt; - - /// Hide at - DateTime? hideAt; - - /// Memory ID - String id; - - /// Is saved - bool isSaved; - - /// Memory at - DateTime memoryAt; - - /// Owner ID - String ownerId; - - /// Seen at - DateTime? seenAt; - - /// Show at - DateTime? showAt; - - MemoryType type; - - /// Updated at - DateTime updatedAt; - - @override - bool operator ==(Object other) => identical(this, other) || other is SyncMemoryV1 && - other.createdAt == createdAt && - _deepEquality.equals(other.data, data) && - other.deletedAt == deletedAt && - other.hideAt == hideAt && - other.id == id && - other.isSaved == isSaved && - other.memoryAt == memoryAt && - other.ownerId == ownerId && - other.seenAt == seenAt && - other.showAt == showAt && - other.type == type && - other.updatedAt == updatedAt; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (createdAt.hashCode) + - (data.hashCode) + - (deletedAt == null ? 0 : deletedAt!.hashCode) + - (hideAt == null ? 0 : hideAt!.hashCode) + - (id.hashCode) + - (isSaved.hashCode) + - (memoryAt.hashCode) + - (ownerId.hashCode) + - (seenAt == null ? 0 : seenAt!.hashCode) + - (showAt == null ? 0 : showAt!.hashCode) + - (type.hashCode) + - (updatedAt.hashCode); - - @override - String toString() => 'SyncMemoryV1[createdAt=$createdAt, data=$data, deletedAt=$deletedAt, hideAt=$hideAt, id=$id, isSaved=$isSaved, memoryAt=$memoryAt, ownerId=$ownerId, seenAt=$seenAt, showAt=$showAt, type=$type, updatedAt=$updatedAt]'; - - Map toJson() { - final json = {}; - json[r'createdAt'] = _isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? this.createdAt.millisecondsSinceEpoch - : this.createdAt.toUtc().toIso8601String(); - json[r'data'] = this.data; - if (this.deletedAt != null) { - json[r'deletedAt'] = _isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? this.deletedAt!.millisecondsSinceEpoch - : this.deletedAt!.toUtc().toIso8601String(); - } else { - json[r'deletedAt'] = null; - } - if (this.hideAt != null) { - json[r'hideAt'] = _isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? this.hideAt!.millisecondsSinceEpoch - : this.hideAt!.toUtc().toIso8601String(); - } else { - json[r'hideAt'] = null; - } - json[r'id'] = this.id; - json[r'isSaved'] = this.isSaved; - json[r'memoryAt'] = _isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? this.memoryAt.millisecondsSinceEpoch - : this.memoryAt.toUtc().toIso8601String(); - json[r'ownerId'] = this.ownerId; - if (this.seenAt != null) { - json[r'seenAt'] = _isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? this.seenAt!.millisecondsSinceEpoch - : this.seenAt!.toUtc().toIso8601String(); - } else { - json[r'seenAt'] = null; - } - if (this.showAt != null) { - json[r'showAt'] = _isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? this.showAt!.millisecondsSinceEpoch - : this.showAt!.toUtc().toIso8601String(); - } else { - json[r'showAt'] = null; - } - json[r'type'] = this.type; - json[r'updatedAt'] = _isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? this.updatedAt.millisecondsSinceEpoch - : this.updatedAt.toUtc().toIso8601String(); - return json; - } - - /// Returns a new [SyncMemoryV1] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SyncMemoryV1? fromJson(dynamic value) { - upgradeDto(value, "SyncMemoryV1"); - if (value is Map) { - final json = value.cast(); - - return SyncMemoryV1( - createdAt: mapDateTime(json, r'createdAt', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')!, - data: mapCastOfType(json, r'data')!, - deletedAt: mapDateTime(json, r'deletedAt', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/'), - hideAt: mapDateTime(json, r'hideAt', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/'), - id: mapValueOfType(json, r'id')!, - isSaved: mapValueOfType(json, r'isSaved')!, - memoryAt: mapDateTime(json, r'memoryAt', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')!, - ownerId: mapValueOfType(json, r'ownerId')!, - seenAt: mapDateTime(json, r'seenAt', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/'), - showAt: mapDateTime(json, r'showAt', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/'), - type: MemoryType.fromJson(json[r'type'])!, - updatedAt: mapDateTime(json, r'updatedAt', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SyncMemoryV1.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SyncMemoryV1.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SyncMemoryV1-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SyncMemoryV1.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'createdAt', - 'data', - 'deletedAt', - 'hideAt', - 'id', - 'isSaved', - 'memoryAt', - 'ownerId', - 'seenAt', - 'showAt', - 'type', - 'updatedAt', - }; -} - diff --git a/mobile/openapi/lib/model/sync_partner_delete_v1.dart b/mobile/openapi/lib/model/sync_partner_delete_v1.dart deleted file mode 100644 index 64dfb4eb98..0000000000 --- a/mobile/openapi/lib/model/sync_partner_delete_v1.dart +++ /dev/null @@ -1,109 +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 SyncPartnerDeleteV1 { - /// Returns a new [SyncPartnerDeleteV1] instance. - SyncPartnerDeleteV1({ - required this.sharedById, - required this.sharedWithId, - }); - - /// Shared by ID - String sharedById; - - /// Shared with ID - String sharedWithId; - - @override - bool operator ==(Object other) => identical(this, other) || other is SyncPartnerDeleteV1 && - other.sharedById == sharedById && - other.sharedWithId == sharedWithId; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (sharedById.hashCode) + - (sharedWithId.hashCode); - - @override - String toString() => 'SyncPartnerDeleteV1[sharedById=$sharedById, sharedWithId=$sharedWithId]'; - - Map toJson() { - final json = {}; - json[r'sharedById'] = this.sharedById; - json[r'sharedWithId'] = this.sharedWithId; - return json; - } - - /// Returns a new [SyncPartnerDeleteV1] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SyncPartnerDeleteV1? fromJson(dynamic value) { - upgradeDto(value, "SyncPartnerDeleteV1"); - if (value is Map) { - final json = value.cast(); - - return SyncPartnerDeleteV1( - sharedById: mapValueOfType(json, r'sharedById')!, - sharedWithId: mapValueOfType(json, r'sharedWithId')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SyncPartnerDeleteV1.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SyncPartnerDeleteV1.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SyncPartnerDeleteV1-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SyncPartnerDeleteV1.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'sharedById', - 'sharedWithId', - }; -} - diff --git a/mobile/openapi/lib/model/sync_partner_v1.dart b/mobile/openapi/lib/model/sync_partner_v1.dart deleted file mode 100644 index 9f9c3d14c1..0000000000 --- a/mobile/openapi/lib/model/sync_partner_v1.dart +++ /dev/null @@ -1,118 +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 SyncPartnerV1 { - /// Returns a new [SyncPartnerV1] instance. - SyncPartnerV1({ - required this.inTimeline, - required this.sharedById, - required this.sharedWithId, - }); - - /// In timeline - bool inTimeline; - - /// Shared by ID - String sharedById; - - /// Shared with ID - String sharedWithId; - - @override - bool operator ==(Object other) => identical(this, other) || other is SyncPartnerV1 && - other.inTimeline == inTimeline && - other.sharedById == sharedById && - other.sharedWithId == sharedWithId; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (inTimeline.hashCode) + - (sharedById.hashCode) + - (sharedWithId.hashCode); - - @override - String toString() => 'SyncPartnerV1[inTimeline=$inTimeline, sharedById=$sharedById, sharedWithId=$sharedWithId]'; - - Map toJson() { - final json = {}; - json[r'inTimeline'] = this.inTimeline; - json[r'sharedById'] = this.sharedById; - json[r'sharedWithId'] = this.sharedWithId; - return json; - } - - /// Returns a new [SyncPartnerV1] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SyncPartnerV1? fromJson(dynamic value) { - upgradeDto(value, "SyncPartnerV1"); - if (value is Map) { - final json = value.cast(); - - return SyncPartnerV1( - inTimeline: mapValueOfType(json, r'inTimeline')!, - sharedById: mapValueOfType(json, r'sharedById')!, - sharedWithId: mapValueOfType(json, r'sharedWithId')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SyncPartnerV1.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SyncPartnerV1.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SyncPartnerV1-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SyncPartnerV1.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'inTimeline', - 'sharedById', - 'sharedWithId', - }; -} - diff --git a/mobile/openapi/lib/model/sync_person_delete_v1.dart b/mobile/openapi/lib/model/sync_person_delete_v1.dart deleted file mode 100644 index 526bc26187..0000000000 --- a/mobile/openapi/lib/model/sync_person_delete_v1.dart +++ /dev/null @@ -1,100 +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 SyncPersonDeleteV1 { - /// Returns a new [SyncPersonDeleteV1] instance. - SyncPersonDeleteV1({ - required this.personId, - }); - - /// Person ID - String personId; - - @override - bool operator ==(Object other) => identical(this, other) || other is SyncPersonDeleteV1 && - other.personId == personId; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (personId.hashCode); - - @override - String toString() => 'SyncPersonDeleteV1[personId=$personId]'; - - Map toJson() { - final json = {}; - json[r'personId'] = this.personId; - return json; - } - - /// Returns a new [SyncPersonDeleteV1] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SyncPersonDeleteV1? fromJson(dynamic value) { - upgradeDto(value, "SyncPersonDeleteV1"); - if (value is Map) { - final json = value.cast(); - - return SyncPersonDeleteV1( - personId: mapValueOfType(json, r'personId')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SyncPersonDeleteV1.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SyncPersonDeleteV1.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SyncPersonDeleteV1-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SyncPersonDeleteV1.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'personId', - }; -} - diff --git a/mobile/openapi/lib/model/sync_person_v1.dart b/mobile/openapi/lib/model/sync_person_v1.dart deleted file mode 100644 index 6a669a0306..0000000000 --- a/mobile/openapi/lib/model/sync_person_v1.dart +++ /dev/null @@ -1,199 +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 SyncPersonV1 { - /// Returns a new [SyncPersonV1] instance. - SyncPersonV1({ - required this.birthDate, - required this.color, - required this.createdAt, - required this.faceAssetId, - required this.id, - required this.isFavorite, - required this.isHidden, - required this.name, - required this.ownerId, - required this.updatedAt, - }); - - /// Birth date - DateTime? birthDate; - - /// Color - String? color; - - /// Created at - DateTime createdAt; - - /// Face asset ID - String? faceAssetId; - - /// Person ID - String id; - - /// Is favorite - bool isFavorite; - - /// Is hidden - bool isHidden; - - /// Person name - String name; - - /// Owner ID - String ownerId; - - /// Updated at - DateTime updatedAt; - - @override - bool operator ==(Object other) => identical(this, other) || other is SyncPersonV1 && - other.birthDate == birthDate && - other.color == color && - other.createdAt == createdAt && - other.faceAssetId == faceAssetId && - other.id == id && - other.isFavorite == isFavorite && - other.isHidden == isHidden && - other.name == name && - other.ownerId == ownerId && - other.updatedAt == updatedAt; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (birthDate == null ? 0 : birthDate!.hashCode) + - (color == null ? 0 : color!.hashCode) + - (createdAt.hashCode) + - (faceAssetId == null ? 0 : faceAssetId!.hashCode) + - (id.hashCode) + - (isFavorite.hashCode) + - (isHidden.hashCode) + - (name.hashCode) + - (ownerId.hashCode) + - (updatedAt.hashCode); - - @override - String toString() => 'SyncPersonV1[birthDate=$birthDate, color=$color, createdAt=$createdAt, faceAssetId=$faceAssetId, id=$id, isFavorite=$isFavorite, isHidden=$isHidden, name=$name, ownerId=$ownerId, updatedAt=$updatedAt]'; - - Map toJson() { - final json = {}; - if (this.birthDate != null) { - json[r'birthDate'] = _isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? this.birthDate!.millisecondsSinceEpoch - : this.birthDate!.toUtc().toIso8601String(); - } else { - json[r'birthDate'] = null; - } - if (this.color != null) { - json[r'color'] = this.color; - } else { - json[r'color'] = null; - } - json[r'createdAt'] = _isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? this.createdAt.millisecondsSinceEpoch - : this.createdAt.toUtc().toIso8601String(); - if (this.faceAssetId != null) { - json[r'faceAssetId'] = this.faceAssetId; - } else { - json[r'faceAssetId'] = null; - } - json[r'id'] = this.id; - json[r'isFavorite'] = this.isFavorite; - json[r'isHidden'] = this.isHidden; - json[r'name'] = this.name; - json[r'ownerId'] = this.ownerId; - json[r'updatedAt'] = _isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? this.updatedAt.millisecondsSinceEpoch - : this.updatedAt.toUtc().toIso8601String(); - return json; - } - - /// Returns a new [SyncPersonV1] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SyncPersonV1? fromJson(dynamic value) { - upgradeDto(value, "SyncPersonV1"); - if (value is Map) { - final json = value.cast(); - - return SyncPersonV1( - birthDate: mapDateTime(json, r'birthDate', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/'), - color: mapValueOfType(json, r'color'), - createdAt: mapDateTime(json, r'createdAt', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')!, - faceAssetId: mapValueOfType(json, r'faceAssetId'), - id: mapValueOfType(json, r'id')!, - isFavorite: mapValueOfType(json, r'isFavorite')!, - isHidden: mapValueOfType(json, r'isHidden')!, - name: mapValueOfType(json, r'name')!, - ownerId: mapValueOfType(json, r'ownerId')!, - updatedAt: mapDateTime(json, r'updatedAt', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SyncPersonV1.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SyncPersonV1.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SyncPersonV1-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SyncPersonV1.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'birthDate', - 'color', - 'createdAt', - 'faceAssetId', - 'id', - 'isFavorite', - 'isHidden', - 'name', - 'ownerId', - 'updatedAt', - }; -} - diff --git a/mobile/openapi/lib/model/sync_request_type.dart b/mobile/openapi/lib/model/sync_request_type.dart deleted file mode 100644 index da08c4c597..0000000000 --- a/mobile/openapi/lib/model/sync_request_type.dart +++ /dev/null @@ -1,160 +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; - -/// Sync request type -class SyncRequestType { - /// Instantiate a new enum with the provided [value]. - const SyncRequestType._(this.value); - - /// The underlying value of this enum member. - final String value; - - @override - String toString() => value; - - String toJson() => value; - - static const albumsV1 = SyncRequestType._(r'AlbumsV1'); - static const albumsV2 = SyncRequestType._(r'AlbumsV2'); - static const albumUsersV1 = SyncRequestType._(r'AlbumUsersV1'); - static const albumToAssetsV1 = SyncRequestType._(r'AlbumToAssetsV1'); - static const albumAssetsV1 = SyncRequestType._(r'AlbumAssetsV1'); - static const albumAssetsV2 = SyncRequestType._(r'AlbumAssetsV2'); - static const albumAssetExifsV1 = SyncRequestType._(r'AlbumAssetExifsV1'); - static const assetsV1 = SyncRequestType._(r'AssetsV1'); - static const assetsV2 = SyncRequestType._(r'AssetsV2'); - static const assetExifsV1 = SyncRequestType._(r'AssetExifsV1'); - static const assetEditsV1 = SyncRequestType._(r'AssetEditsV1'); - static const assetMetadataV1 = SyncRequestType._(r'AssetMetadataV1'); - static const assetOcrV1 = SyncRequestType._(r'AssetOcrV1'); - static const authUsersV1 = SyncRequestType._(r'AuthUsersV1'); - static const memoriesV1 = SyncRequestType._(r'MemoriesV1'); - static const memoryToAssetsV1 = SyncRequestType._(r'MemoryToAssetsV1'); - static const partnersV1 = SyncRequestType._(r'PartnersV1'); - static const partnerAssetsV1 = SyncRequestType._(r'PartnerAssetsV1'); - static const partnerAssetsV2 = SyncRequestType._(r'PartnerAssetsV2'); - static const partnerAssetExifsV1 = SyncRequestType._(r'PartnerAssetExifsV1'); - static const partnerStacksV1 = SyncRequestType._(r'PartnerStacksV1'); - static const stacksV1 = SyncRequestType._(r'StacksV1'); - static const usersV1 = SyncRequestType._(r'UsersV1'); - static const peopleV1 = SyncRequestType._(r'PeopleV1'); - static const assetFacesV1 = SyncRequestType._(r'AssetFacesV1'); - static const assetFacesV2 = SyncRequestType._(r'AssetFacesV2'); - static const userMetadataV1 = SyncRequestType._(r'UserMetadataV1'); - - /// List of all possible values in this [enum][SyncRequestType]. - static const values = [ - albumsV1, - albumsV2, - albumUsersV1, - albumToAssetsV1, - albumAssetsV1, - albumAssetsV2, - albumAssetExifsV1, - assetsV1, - assetsV2, - assetExifsV1, - assetEditsV1, - assetMetadataV1, - assetOcrV1, - authUsersV1, - memoriesV1, - memoryToAssetsV1, - partnersV1, - partnerAssetsV1, - partnerAssetsV2, - partnerAssetExifsV1, - partnerStacksV1, - stacksV1, - usersV1, - peopleV1, - assetFacesV1, - assetFacesV2, - userMetadataV1, - ]; - - static SyncRequestType? fromJson(dynamic value) => SyncRequestTypeTypeTransformer().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 = SyncRequestType.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } -} - -/// Transformation class that can [encode] an instance of [SyncRequestType] to String, -/// and [decode] dynamic data back to [SyncRequestType]. -class SyncRequestTypeTypeTransformer { - factory SyncRequestTypeTypeTransformer() => _instance ??= const SyncRequestTypeTypeTransformer._(); - - const SyncRequestTypeTypeTransformer._(); - - String encode(SyncRequestType data) => data.value; - - /// Decodes a [dynamic value][data] to a SyncRequestType. - /// - /// 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. - SyncRequestType? decode(dynamic data, {bool allowNull = true}) { - if (data != null) { - switch (data) { - case r'AlbumsV1': return SyncRequestType.albumsV1; - case r'AlbumsV2': return SyncRequestType.albumsV2; - case r'AlbumUsersV1': return SyncRequestType.albumUsersV1; - case r'AlbumToAssetsV1': return SyncRequestType.albumToAssetsV1; - case r'AlbumAssetsV1': return SyncRequestType.albumAssetsV1; - case r'AlbumAssetsV2': return SyncRequestType.albumAssetsV2; - case r'AlbumAssetExifsV1': return SyncRequestType.albumAssetExifsV1; - case r'AssetsV1': return SyncRequestType.assetsV1; - case r'AssetsV2': return SyncRequestType.assetsV2; - case r'AssetExifsV1': return SyncRequestType.assetExifsV1; - case r'AssetEditsV1': return SyncRequestType.assetEditsV1; - case r'AssetMetadataV1': return SyncRequestType.assetMetadataV1; - case r'AssetOcrV1': return SyncRequestType.assetOcrV1; - case r'AuthUsersV1': return SyncRequestType.authUsersV1; - case r'MemoriesV1': return SyncRequestType.memoriesV1; - case r'MemoryToAssetsV1': return SyncRequestType.memoryToAssetsV1; - case r'PartnersV1': return SyncRequestType.partnersV1; - case r'PartnerAssetsV1': return SyncRequestType.partnerAssetsV1; - case r'PartnerAssetsV2': return SyncRequestType.partnerAssetsV2; - case r'PartnerAssetExifsV1': return SyncRequestType.partnerAssetExifsV1; - case r'PartnerStacksV1': return SyncRequestType.partnerStacksV1; - case r'StacksV1': return SyncRequestType.stacksV1; - case r'UsersV1': return SyncRequestType.usersV1; - case r'PeopleV1': return SyncRequestType.peopleV1; - case r'AssetFacesV1': return SyncRequestType.assetFacesV1; - case r'AssetFacesV2': return SyncRequestType.assetFacesV2; - case r'UserMetadataV1': return SyncRequestType.userMetadataV1; - default: - if (!allowNull) { - throw ArgumentError('Unknown enum value to decode: $data'); - } - } - } - return null; - } - - /// Singleton [SyncRequestTypeTypeTransformer] instance. - static SyncRequestTypeTypeTransformer? _instance; -} - diff --git a/mobile/openapi/lib/model/sync_stack_delete_v1.dart b/mobile/openapi/lib/model/sync_stack_delete_v1.dart deleted file mode 100644 index 2a7398291a..0000000000 --- a/mobile/openapi/lib/model/sync_stack_delete_v1.dart +++ /dev/null @@ -1,100 +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 SyncStackDeleteV1 { - /// Returns a new [SyncStackDeleteV1] instance. - SyncStackDeleteV1({ - required this.stackId, - }); - - /// Stack ID - String stackId; - - @override - bool operator ==(Object other) => identical(this, other) || other is SyncStackDeleteV1 && - other.stackId == stackId; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (stackId.hashCode); - - @override - String toString() => 'SyncStackDeleteV1[stackId=$stackId]'; - - Map toJson() { - final json = {}; - json[r'stackId'] = this.stackId; - return json; - } - - /// Returns a new [SyncStackDeleteV1] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SyncStackDeleteV1? fromJson(dynamic value) { - upgradeDto(value, "SyncStackDeleteV1"); - if (value is Map) { - final json = value.cast(); - - return SyncStackDeleteV1( - stackId: mapValueOfType(json, r'stackId')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SyncStackDeleteV1.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SyncStackDeleteV1.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SyncStackDeleteV1-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SyncStackDeleteV1.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'stackId', - }; -} - diff --git a/mobile/openapi/lib/model/sync_stack_v1.dart b/mobile/openapi/lib/model/sync_stack_v1.dart deleted file mode 100644 index 6da2243872..0000000000 --- a/mobile/openapi/lib/model/sync_stack_v1.dart +++ /dev/null @@ -1,140 +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 SyncStackV1 { - /// Returns a new [SyncStackV1] instance. - SyncStackV1({ - required this.createdAt, - required this.id, - required this.ownerId, - required this.primaryAssetId, - required this.updatedAt, - }); - - /// Created at - DateTime createdAt; - - /// Stack ID - String id; - - /// Owner ID - String ownerId; - - /// Primary asset ID - String primaryAssetId; - - /// Updated at - DateTime updatedAt; - - @override - bool operator ==(Object other) => identical(this, other) || other is SyncStackV1 && - other.createdAt == createdAt && - other.id == id && - other.ownerId == ownerId && - other.primaryAssetId == primaryAssetId && - other.updatedAt == updatedAt; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (createdAt.hashCode) + - (id.hashCode) + - (ownerId.hashCode) + - (primaryAssetId.hashCode) + - (updatedAt.hashCode); - - @override - String toString() => 'SyncStackV1[createdAt=$createdAt, id=$id, ownerId=$ownerId, primaryAssetId=$primaryAssetId, updatedAt=$updatedAt]'; - - Map toJson() { - final json = {}; - json[r'createdAt'] = _isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? this.createdAt.millisecondsSinceEpoch - : this.createdAt.toUtc().toIso8601String(); - json[r'id'] = this.id; - json[r'ownerId'] = this.ownerId; - json[r'primaryAssetId'] = this.primaryAssetId; - json[r'updatedAt'] = _isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? this.updatedAt.millisecondsSinceEpoch - : this.updatedAt.toUtc().toIso8601String(); - return json; - } - - /// Returns a new [SyncStackV1] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SyncStackV1? fromJson(dynamic value) { - upgradeDto(value, "SyncStackV1"); - if (value is Map) { - final json = value.cast(); - - return SyncStackV1( - createdAt: mapDateTime(json, r'createdAt', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')!, - id: mapValueOfType(json, r'id')!, - ownerId: mapValueOfType(json, r'ownerId')!, - primaryAssetId: mapValueOfType(json, r'primaryAssetId')!, - updatedAt: mapDateTime(json, r'updatedAt', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SyncStackV1.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SyncStackV1.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SyncStackV1-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SyncStackV1.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'createdAt', - 'id', - 'ownerId', - 'primaryAssetId', - 'updatedAt', - }; -} - diff --git a/mobile/openapi/lib/model/sync_stream_dto.dart b/mobile/openapi/lib/model/sync_stream_dto.dart deleted file mode 100644 index 12dcfb4b84..0000000000 --- a/mobile/openapi/lib/model/sync_stream_dto.dart +++ /dev/null @@ -1,117 +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 SyncStreamDto { - /// Returns a new [SyncStreamDto] instance. - SyncStreamDto({ - this.reset = const Optional.absent(), - this.types = const [], - }); - - /// Reset sync state - /// - /// 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. - /// - Optional reset; - - /// Sync request types - List types; - - @override - bool operator ==(Object other) => identical(this, other) || other is SyncStreamDto && - other.reset == reset && - _deepEquality.equals(other.types, types); - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (reset == null ? 0 : reset!.hashCode) + - (types.hashCode); - - @override - String toString() => 'SyncStreamDto[reset=$reset, types=$types]'; - - Map toJson() { - final json = {}; - if (this.reset.isPresent) { - final value = this.reset.value; - json[r'reset'] = value; - } - json[r'types'] = this.types; - return json; - } - - /// Returns a new [SyncStreamDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SyncStreamDto? fromJson(dynamic value) { - upgradeDto(value, "SyncStreamDto"); - if (value is Map) { - final json = value.cast(); - - return SyncStreamDto( - reset: json.containsKey(r'reset') ? Optional.present(mapValueOfType(json, r'reset')) : const Optional.absent(), - types: SyncRequestType.listFromJson(json[r'types']), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SyncStreamDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SyncStreamDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SyncStreamDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SyncStreamDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'types', - }; -} - diff --git a/mobile/openapi/lib/model/sync_user_delete_v1.dart b/mobile/openapi/lib/model/sync_user_delete_v1.dart deleted file mode 100644 index bbbdc147dd..0000000000 --- a/mobile/openapi/lib/model/sync_user_delete_v1.dart +++ /dev/null @@ -1,100 +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 SyncUserDeleteV1 { - /// Returns a new [SyncUserDeleteV1] instance. - SyncUserDeleteV1({ - required this.userId, - }); - - /// User ID - String userId; - - @override - bool operator ==(Object other) => identical(this, other) || other is SyncUserDeleteV1 && - other.userId == userId; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (userId.hashCode); - - @override - String toString() => 'SyncUserDeleteV1[userId=$userId]'; - - Map toJson() { - final json = {}; - json[r'userId'] = this.userId; - return json; - } - - /// Returns a new [SyncUserDeleteV1] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SyncUserDeleteV1? fromJson(dynamic value) { - upgradeDto(value, "SyncUserDeleteV1"); - if (value is Map) { - final json = value.cast(); - - return SyncUserDeleteV1( - userId: mapValueOfType(json, r'userId')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SyncUserDeleteV1.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SyncUserDeleteV1.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SyncUserDeleteV1-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SyncUserDeleteV1.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'userId', - }; -} - diff --git a/mobile/openapi/lib/model/sync_user_metadata_delete_v1.dart b/mobile/openapi/lib/model/sync_user_metadata_delete_v1.dart deleted file mode 100644 index 67976108e1..0000000000 --- a/mobile/openapi/lib/model/sync_user_metadata_delete_v1.dart +++ /dev/null @@ -1,108 +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 SyncUserMetadataDeleteV1 { - /// Returns a new [SyncUserMetadataDeleteV1] instance. - SyncUserMetadataDeleteV1({ - required this.key, - required this.userId, - }); - - UserMetadataKey key; - - /// User ID - String userId; - - @override - bool operator ==(Object other) => identical(this, other) || other is SyncUserMetadataDeleteV1 && - other.key == key && - other.userId == userId; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (key.hashCode) + - (userId.hashCode); - - @override - String toString() => 'SyncUserMetadataDeleteV1[key=$key, userId=$userId]'; - - Map toJson() { - final json = {}; - json[r'key'] = this.key; - json[r'userId'] = this.userId; - return json; - } - - /// Returns a new [SyncUserMetadataDeleteV1] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SyncUserMetadataDeleteV1? fromJson(dynamic value) { - upgradeDto(value, "SyncUserMetadataDeleteV1"); - if (value is Map) { - final json = value.cast(); - - return SyncUserMetadataDeleteV1( - key: UserMetadataKey.fromJson(json[r'key'])!, - userId: mapValueOfType(json, r'userId')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SyncUserMetadataDeleteV1.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SyncUserMetadataDeleteV1.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SyncUserMetadataDeleteV1-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SyncUserMetadataDeleteV1.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'key', - 'userId', - }; -} - diff --git a/mobile/openapi/lib/model/sync_user_metadata_v1.dart b/mobile/openapi/lib/model/sync_user_metadata_v1.dart deleted file mode 100644 index ddde7c0513..0000000000 --- a/mobile/openapi/lib/model/sync_user_metadata_v1.dart +++ /dev/null @@ -1,117 +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 SyncUserMetadataV1 { - /// Returns a new [SyncUserMetadataV1] instance. - SyncUserMetadataV1({ - required this.key, - required this.userId, - this.value = const {}, - }); - - UserMetadataKey key; - - /// User ID - String userId; - - /// User metadata value - Map value; - - @override - bool operator ==(Object other) => identical(this, other) || other is SyncUserMetadataV1 && - other.key == key && - other.userId == userId && - _deepEquality.equals(other.value, value); - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (key.hashCode) + - (userId.hashCode) + - (value.hashCode); - - @override - String toString() => 'SyncUserMetadataV1[key=$key, userId=$userId, value=$value]'; - - Map toJson() { - final json = {}; - json[r'key'] = this.key; - json[r'userId'] = this.userId; - json[r'value'] = this.value; - return json; - } - - /// Returns a new [SyncUserMetadataV1] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SyncUserMetadataV1? fromJson(dynamic value) { - upgradeDto(value, "SyncUserMetadataV1"); - if (value is Map) { - final json = value.cast(); - - return SyncUserMetadataV1( - key: UserMetadataKey.fromJson(json[r'key'])!, - userId: mapValueOfType(json, r'userId')!, - value: mapCastOfType(json, r'value')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SyncUserMetadataV1.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SyncUserMetadataV1.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SyncUserMetadataV1-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SyncUserMetadataV1.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'key', - 'userId', - 'value', - }; -} - diff --git a/mobile/openapi/lib/model/sync_user_v1.dart b/mobile/openapi/lib/model/sync_user_v1.dart deleted file mode 100644 index d86680179e..0000000000 --- a/mobile/openapi/lib/model/sync_user_v1.dart +++ /dev/null @@ -1,163 +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 SyncUserV1 { - /// Returns a new [SyncUserV1] instance. - SyncUserV1({ - this.avatarColor = const Optional.absent(), - required this.deletedAt, - required this.email, - required this.hasProfileImage, - required this.id, - required this.name, - required this.profileChangedAt, - }); - - Optional avatarColor; - - /// User deleted at - DateTime? deletedAt; - - /// User email - String email; - - /// User has profile image - bool hasProfileImage; - - /// User ID - String id; - - /// User name - String name; - - /// User profile changed at - DateTime profileChangedAt; - - @override - bool operator ==(Object other) => identical(this, other) || other is SyncUserV1 && - other.avatarColor == avatarColor && - other.deletedAt == deletedAt && - other.email == email && - other.hasProfileImage == hasProfileImage && - other.id == id && - other.name == name && - other.profileChangedAt == profileChangedAt; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (avatarColor == null ? 0 : avatarColor!.hashCode) + - (deletedAt == null ? 0 : deletedAt!.hashCode) + - (email.hashCode) + - (hasProfileImage.hashCode) + - (id.hashCode) + - (name.hashCode) + - (profileChangedAt.hashCode); - - @override - String toString() => 'SyncUserV1[avatarColor=$avatarColor, deletedAt=$deletedAt, email=$email, hasProfileImage=$hasProfileImage, id=$id, name=$name, profileChangedAt=$profileChangedAt]'; - - Map toJson() { - final json = {}; - if (this.avatarColor.isPresent) { - final value = this.avatarColor.value; - json[r'avatarColor'] = value; - } - if (this.deletedAt != null) { - json[r'deletedAt'] = _isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? this.deletedAt!.millisecondsSinceEpoch - : this.deletedAt!.toUtc().toIso8601String(); - } else { - json[r'deletedAt'] = null; - } - json[r'email'] = this.email; - json[r'hasProfileImage'] = this.hasProfileImage; - json[r'id'] = this.id; - json[r'name'] = this.name; - json[r'profileChangedAt'] = _isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? this.profileChangedAt.millisecondsSinceEpoch - : this.profileChangedAt.toUtc().toIso8601String(); - return json; - } - - /// Returns a new [SyncUserV1] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SyncUserV1? fromJson(dynamic value) { - upgradeDto(value, "SyncUserV1"); - if (value is Map) { - final json = value.cast(); - - return SyncUserV1( - avatarColor: json.containsKey(r'avatarColor') ? Optional.present(UserAvatarColor.fromJson(json[r'avatarColor'])) : const Optional.absent(), - deletedAt: mapDateTime(json, r'deletedAt', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/'), - email: mapValueOfType(json, r'email')!, - hasProfileImage: mapValueOfType(json, r'hasProfileImage')!, - id: mapValueOfType(json, r'id')!, - name: mapValueOfType(json, r'name')!, - profileChangedAt: mapDateTime(json, r'profileChangedAt', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SyncUserV1.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SyncUserV1.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SyncUserV1-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SyncUserV1.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'deletedAt', - 'email', - 'hasProfileImage', - 'id', - 'name', - 'profileChangedAt', - }; -} - diff --git a/mobile/openapi/lib/model/system_config_backups_dto.dart b/mobile/openapi/lib/model/system_config_backups_dto.dart deleted file mode 100644 index 82cd6e59eb..0000000000 --- a/mobile/openapi/lib/model/system_config_backups_dto.dart +++ /dev/null @@ -1,99 +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 SystemConfigBackupsDto { - /// Returns a new [SystemConfigBackupsDto] instance. - SystemConfigBackupsDto({ - required this.database, - }); - - DatabaseBackupConfig database; - - @override - bool operator ==(Object other) => identical(this, other) || other is SystemConfigBackupsDto && - other.database == database; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (database.hashCode); - - @override - String toString() => 'SystemConfigBackupsDto[database=$database]'; - - Map toJson() { - final json = {}; - json[r'database'] = this.database; - return json; - } - - /// Returns a new [SystemConfigBackupsDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SystemConfigBackupsDto? fromJson(dynamic value) { - upgradeDto(value, "SystemConfigBackupsDto"); - if (value is Map) { - final json = value.cast(); - - return SystemConfigBackupsDto( - database: DatabaseBackupConfig.fromJson(json[r'database'])!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SystemConfigBackupsDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SystemConfigBackupsDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SystemConfigBackupsDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SystemConfigBackupsDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'database', - }; -} - diff --git a/mobile/openapi/lib/model/system_config_dto.dart b/mobile/openapi/lib/model/system_config_dto.dart deleted file mode 100644 index 3a5e15b030..0000000000 --- a/mobile/openapi/lib/model/system_config_dto.dart +++ /dev/null @@ -1,267 +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 SystemConfigDto { - /// Returns a new [SystemConfigDto] instance. - SystemConfigDto({ - required this.backup, - required this.ffmpeg, - required this.image, - required this.integrityChecks, - required this.job, - required this.library_, - required this.logging, - required this.machineLearning, - required this.map, - required this.metadata, - required this.newVersionCheck, - required this.nightlyTasks, - required this.notifications, - required this.oauth, - required this.passwordLogin, - required this.reverseGeocoding, - required this.server, - required this.storageTemplate, - required this.templates, - required this.theme, - required this.trash, - required this.user, - }); - - SystemConfigBackupsDto backup; - - SystemConfigFFmpegDto ffmpeg; - - SystemConfigImageDto image; - - SystemConfigIntegrityChecks integrityChecks; - - SystemConfigJobDto job; - - SystemConfigLibraryDto library_; - - SystemConfigLoggingDto logging; - - SystemConfigMachineLearningDto machineLearning; - - SystemConfigMapDto map; - - SystemConfigMetadataDto metadata; - - SystemConfigNewVersionCheckDto newVersionCheck; - - SystemConfigNightlyTasksDto nightlyTasks; - - SystemConfigNotificationsDto notifications; - - SystemConfigOAuthDto oauth; - - SystemConfigPasswordLoginDto passwordLogin; - - SystemConfigReverseGeocodingDto reverseGeocoding; - - SystemConfigServerDto server; - - SystemConfigStorageTemplateDto storageTemplate; - - SystemConfigTemplatesDto templates; - - SystemConfigThemeDto theme; - - SystemConfigTrashDto trash; - - SystemConfigUserDto user; - - @override - bool operator ==(Object other) => identical(this, other) || other is SystemConfigDto && - other.backup == backup && - other.ffmpeg == ffmpeg && - other.image == image && - other.integrityChecks == integrityChecks && - other.job == job && - other.library_ == library_ && - other.logging == logging && - other.machineLearning == machineLearning && - other.map == map && - other.metadata == metadata && - other.newVersionCheck == newVersionCheck && - other.nightlyTasks == nightlyTasks && - other.notifications == notifications && - other.oauth == oauth && - other.passwordLogin == passwordLogin && - other.reverseGeocoding == reverseGeocoding && - other.server == server && - other.storageTemplate == storageTemplate && - other.templates == templates && - other.theme == theme && - other.trash == trash && - other.user == user; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (backup.hashCode) + - (ffmpeg.hashCode) + - (image.hashCode) + - (integrityChecks.hashCode) + - (job.hashCode) + - (library_.hashCode) + - (logging.hashCode) + - (machineLearning.hashCode) + - (map.hashCode) + - (metadata.hashCode) + - (newVersionCheck.hashCode) + - (nightlyTasks.hashCode) + - (notifications.hashCode) + - (oauth.hashCode) + - (passwordLogin.hashCode) + - (reverseGeocoding.hashCode) + - (server.hashCode) + - (storageTemplate.hashCode) + - (templates.hashCode) + - (theme.hashCode) + - (trash.hashCode) + - (user.hashCode); - - @override - String toString() => 'SystemConfigDto[backup=$backup, ffmpeg=$ffmpeg, image=$image, integrityChecks=$integrityChecks, job=$job, library_=$library_, logging=$logging, machineLearning=$machineLearning, map=$map, metadata=$metadata, newVersionCheck=$newVersionCheck, nightlyTasks=$nightlyTasks, notifications=$notifications, oauth=$oauth, passwordLogin=$passwordLogin, reverseGeocoding=$reverseGeocoding, server=$server, storageTemplate=$storageTemplate, templates=$templates, theme=$theme, trash=$trash, user=$user]'; - - Map toJson() { - final json = {}; - json[r'backup'] = this.backup; - json[r'ffmpeg'] = this.ffmpeg; - json[r'image'] = this.image; - json[r'integrityChecks'] = this.integrityChecks; - json[r'job'] = this.job; - json[r'library'] = this.library_; - json[r'logging'] = this.logging; - json[r'machineLearning'] = this.machineLearning; - json[r'map'] = this.map; - json[r'metadata'] = this.metadata; - json[r'newVersionCheck'] = this.newVersionCheck; - json[r'nightlyTasks'] = this.nightlyTasks; - json[r'notifications'] = this.notifications; - json[r'oauth'] = this.oauth; - json[r'passwordLogin'] = this.passwordLogin; - json[r'reverseGeocoding'] = this.reverseGeocoding; - json[r'server'] = this.server; - json[r'storageTemplate'] = this.storageTemplate; - json[r'templates'] = this.templates; - json[r'theme'] = this.theme; - json[r'trash'] = this.trash; - json[r'user'] = this.user; - return json; - } - - /// Returns a new [SystemConfigDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SystemConfigDto? fromJson(dynamic value) { - upgradeDto(value, "SystemConfigDto"); - if (value is Map) { - final json = value.cast(); - - return SystemConfigDto( - backup: SystemConfigBackupsDto.fromJson(json[r'backup'])!, - ffmpeg: SystemConfigFFmpegDto.fromJson(json[r'ffmpeg'])!, - image: SystemConfigImageDto.fromJson(json[r'image'])!, - integrityChecks: SystemConfigIntegrityChecks.fromJson(json[r'integrityChecks'])!, - job: SystemConfigJobDto.fromJson(json[r'job'])!, - library_: SystemConfigLibraryDto.fromJson(json[r'library'])!, - logging: SystemConfigLoggingDto.fromJson(json[r'logging'])!, - machineLearning: SystemConfigMachineLearningDto.fromJson(json[r'machineLearning'])!, - map: SystemConfigMapDto.fromJson(json[r'map'])!, - metadata: SystemConfigMetadataDto.fromJson(json[r'metadata'])!, - newVersionCheck: SystemConfigNewVersionCheckDto.fromJson(json[r'newVersionCheck'])!, - nightlyTasks: SystemConfigNightlyTasksDto.fromJson(json[r'nightlyTasks'])!, - notifications: SystemConfigNotificationsDto.fromJson(json[r'notifications'])!, - oauth: SystemConfigOAuthDto.fromJson(json[r'oauth'])!, - passwordLogin: SystemConfigPasswordLoginDto.fromJson(json[r'passwordLogin'])!, - reverseGeocoding: SystemConfigReverseGeocodingDto.fromJson(json[r'reverseGeocoding'])!, - server: SystemConfigServerDto.fromJson(json[r'server'])!, - storageTemplate: SystemConfigStorageTemplateDto.fromJson(json[r'storageTemplate'])!, - templates: SystemConfigTemplatesDto.fromJson(json[r'templates'])!, - theme: SystemConfigThemeDto.fromJson(json[r'theme'])!, - trash: SystemConfigTrashDto.fromJson(json[r'trash'])!, - user: SystemConfigUserDto.fromJson(json[r'user'])!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SystemConfigDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SystemConfigDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SystemConfigDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SystemConfigDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'backup', - 'ffmpeg', - 'image', - 'integrityChecks', - 'job', - 'library', - 'logging', - 'machineLearning', - 'map', - 'metadata', - 'newVersionCheck', - 'nightlyTasks', - 'notifications', - 'oauth', - 'passwordLogin', - 'reverseGeocoding', - 'server', - 'storageTemplate', - 'templates', - 'theme', - 'trash', - 'user', - }; -} - diff --git a/mobile/openapi/lib/model/system_config_f_fmpeg_dto.dart b/mobile/openapi/lib/model/system_config_f_fmpeg_dto.dart deleted file mode 100644 index 79da8da97f..0000000000 --- a/mobile/openapi/lib/model/system_config_f_fmpeg_dto.dart +++ /dev/null @@ -1,297 +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 SystemConfigFFmpegDto { - /// Returns a new [SystemConfigFFmpegDto] instance. - SystemConfigFFmpegDto({ - required this.accel, - required this.accelDecode, - this.acceptedAudioCodecs = const [], - this.acceptedContainers = const [], - this.acceptedVideoCodecs = const [], - required this.bframes, - required this.cqMode, - required this.crf, - required this.gopSize, - required this.maxBitrate, - required this.preferredHwDevice, - required this.preset, - required this.realtime, - required this.refs, - required this.targetAudioCodec, - required this.targetResolution, - required this.targetVideoCodec, - required this.temporalAQ, - required this.threads, - required this.tonemap, - required this.transcode, - required this.twoPass, - }); - - TranscodeHWAccel accel; - - /// Accelerated decode - bool accelDecode; - - /// Accepted audio codecs - List acceptedAudioCodecs; - - /// Accepted containers - List acceptedContainers; - - /// Accepted video codecs - List acceptedVideoCodecs; - - /// B-frames - /// - /// Minimum value: -1 - /// Maximum value: 16 - int bframes; - - CQMode cqMode; - - /// CRF - /// - /// Minimum value: 0 - /// Maximum value: 51 - int crf; - - /// GOP size - /// - /// Minimum value: 0 - /// Maximum value: 9007199254740991 - int gopSize; - - /// Max bitrate - String maxBitrate; - - /// Preferred hardware device - String preferredHwDevice; - - /// Preset - String preset; - - SystemConfigFFmpegRealtimeDto realtime; - - /// References - /// - /// Minimum value: 0 - /// Maximum value: 6 - int refs; - - AudioCodec targetAudioCodec; - - /// Target resolution - String targetResolution; - - VideoCodec targetVideoCodec; - - /// Temporal AQ - bool temporalAQ; - - /// Threads - /// - /// Minimum value: 0 - /// Maximum value: 9007199254740991 - int threads; - - ToneMapping tonemap; - - TranscodePolicy transcode; - - /// Two pass - bool twoPass; - - @override - bool operator ==(Object other) => identical(this, other) || other is SystemConfigFFmpegDto && - other.accel == accel && - other.accelDecode == accelDecode && - _deepEquality.equals(other.acceptedAudioCodecs, acceptedAudioCodecs) && - _deepEquality.equals(other.acceptedContainers, acceptedContainers) && - _deepEquality.equals(other.acceptedVideoCodecs, acceptedVideoCodecs) && - other.bframes == bframes && - other.cqMode == cqMode && - other.crf == crf && - other.gopSize == gopSize && - other.maxBitrate == maxBitrate && - other.preferredHwDevice == preferredHwDevice && - other.preset == preset && - other.realtime == realtime && - other.refs == refs && - other.targetAudioCodec == targetAudioCodec && - other.targetResolution == targetResolution && - other.targetVideoCodec == targetVideoCodec && - other.temporalAQ == temporalAQ && - other.threads == threads && - other.tonemap == tonemap && - other.transcode == transcode && - other.twoPass == twoPass; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (accel.hashCode) + - (accelDecode.hashCode) + - (acceptedAudioCodecs.hashCode) + - (acceptedContainers.hashCode) + - (acceptedVideoCodecs.hashCode) + - (bframes.hashCode) + - (cqMode.hashCode) + - (crf.hashCode) + - (gopSize.hashCode) + - (maxBitrate.hashCode) + - (preferredHwDevice.hashCode) + - (preset.hashCode) + - (realtime.hashCode) + - (refs.hashCode) + - (targetAudioCodec.hashCode) + - (targetResolution.hashCode) + - (targetVideoCodec.hashCode) + - (temporalAQ.hashCode) + - (threads.hashCode) + - (tonemap.hashCode) + - (transcode.hashCode) + - (twoPass.hashCode); - - @override - String toString() => 'SystemConfigFFmpegDto[accel=$accel, accelDecode=$accelDecode, acceptedAudioCodecs=$acceptedAudioCodecs, acceptedContainers=$acceptedContainers, acceptedVideoCodecs=$acceptedVideoCodecs, bframes=$bframes, cqMode=$cqMode, crf=$crf, gopSize=$gopSize, maxBitrate=$maxBitrate, preferredHwDevice=$preferredHwDevice, preset=$preset, realtime=$realtime, refs=$refs, targetAudioCodec=$targetAudioCodec, targetResolution=$targetResolution, targetVideoCodec=$targetVideoCodec, temporalAQ=$temporalAQ, threads=$threads, tonemap=$tonemap, transcode=$transcode, twoPass=$twoPass]'; - - Map toJson() { - final json = {}; - json[r'accel'] = this.accel; - json[r'accelDecode'] = this.accelDecode; - json[r'acceptedAudioCodecs'] = this.acceptedAudioCodecs; - json[r'acceptedContainers'] = this.acceptedContainers; - json[r'acceptedVideoCodecs'] = this.acceptedVideoCodecs; - json[r'bframes'] = this.bframes; - json[r'cqMode'] = this.cqMode; - json[r'crf'] = this.crf; - json[r'gopSize'] = this.gopSize; - json[r'maxBitrate'] = this.maxBitrate; - json[r'preferredHwDevice'] = this.preferredHwDevice; - json[r'preset'] = this.preset; - json[r'realtime'] = this.realtime; - json[r'refs'] = this.refs; - json[r'targetAudioCodec'] = this.targetAudioCodec; - json[r'targetResolution'] = this.targetResolution; - json[r'targetVideoCodec'] = this.targetVideoCodec; - json[r'temporalAQ'] = this.temporalAQ; - json[r'threads'] = this.threads; - json[r'tonemap'] = this.tonemap; - json[r'transcode'] = this.transcode; - json[r'twoPass'] = this.twoPass; - return json; - } - - /// Returns a new [SystemConfigFFmpegDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SystemConfigFFmpegDto? fromJson(dynamic value) { - upgradeDto(value, "SystemConfigFFmpegDto"); - if (value is Map) { - final json = value.cast(); - - return SystemConfigFFmpegDto( - accel: TranscodeHWAccel.fromJson(json[r'accel'])!, - accelDecode: mapValueOfType(json, r'accelDecode')!, - acceptedAudioCodecs: AudioCodec.listFromJson(json[r'acceptedAudioCodecs']), - acceptedContainers: VideoContainer.listFromJson(json[r'acceptedContainers']), - acceptedVideoCodecs: VideoCodec.listFromJson(json[r'acceptedVideoCodecs']), - bframes: mapValueOfType(json, r'bframes')!, - cqMode: CQMode.fromJson(json[r'cqMode'])!, - crf: mapValueOfType(json, r'crf')!, - gopSize: mapValueOfType(json, r'gopSize')!, - maxBitrate: mapValueOfType(json, r'maxBitrate')!, - preferredHwDevice: mapValueOfType(json, r'preferredHwDevice')!, - preset: mapValueOfType(json, r'preset')!, - realtime: SystemConfigFFmpegRealtimeDto.fromJson(json[r'realtime'])!, - refs: mapValueOfType(json, r'refs')!, - targetAudioCodec: AudioCodec.fromJson(json[r'targetAudioCodec'])!, - targetResolution: mapValueOfType(json, r'targetResolution')!, - targetVideoCodec: VideoCodec.fromJson(json[r'targetVideoCodec'])!, - temporalAQ: mapValueOfType(json, r'temporalAQ')!, - threads: mapValueOfType(json, r'threads')!, - tonemap: ToneMapping.fromJson(json[r'tonemap'])!, - transcode: TranscodePolicy.fromJson(json[r'transcode'])!, - twoPass: mapValueOfType(json, r'twoPass')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SystemConfigFFmpegDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SystemConfigFFmpegDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SystemConfigFFmpegDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SystemConfigFFmpegDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'accel', - 'accelDecode', - 'acceptedAudioCodecs', - 'acceptedContainers', - 'acceptedVideoCodecs', - 'bframes', - 'cqMode', - 'crf', - 'gopSize', - 'maxBitrate', - 'preferredHwDevice', - 'preset', - 'realtime', - 'refs', - 'targetAudioCodec', - 'targetResolution', - 'targetVideoCodec', - 'temporalAQ', - 'threads', - 'tonemap', - 'transcode', - 'twoPass', - }; -} - diff --git a/mobile/openapi/lib/model/system_config_f_fmpeg_realtime_dto.dart b/mobile/openapi/lib/model/system_config_f_fmpeg_realtime_dto.dart deleted file mode 100644 index 1a8669912e..0000000000 --- a/mobile/openapi/lib/model/system_config_f_fmpeg_realtime_dto.dart +++ /dev/null @@ -1,100 +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 SystemConfigFFmpegRealtimeDto { - /// Returns a new [SystemConfigFFmpegRealtimeDto] instance. - SystemConfigFFmpegRealtimeDto({ - required this.enabled, - }); - - /// Enable real-time HLS transcoding (alpha) - bool enabled; - - @override - bool operator ==(Object other) => identical(this, other) || other is SystemConfigFFmpegRealtimeDto && - other.enabled == enabled; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (enabled.hashCode); - - @override - String toString() => 'SystemConfigFFmpegRealtimeDto[enabled=$enabled]'; - - Map toJson() { - final json = {}; - json[r'enabled'] = this.enabled; - return json; - } - - /// Returns a new [SystemConfigFFmpegRealtimeDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SystemConfigFFmpegRealtimeDto? fromJson(dynamic value) { - upgradeDto(value, "SystemConfigFFmpegRealtimeDto"); - if (value is Map) { - final json = value.cast(); - - return SystemConfigFFmpegRealtimeDto( - enabled: mapValueOfType(json, r'enabled')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SystemConfigFFmpegRealtimeDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SystemConfigFFmpegRealtimeDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SystemConfigFFmpegRealtimeDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SystemConfigFFmpegRealtimeDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'enabled', - }; -} - diff --git a/mobile/openapi/lib/model/system_config_faces_dto.dart b/mobile/openapi/lib/model/system_config_faces_dto.dart deleted file mode 100644 index f57303c310..0000000000 --- a/mobile/openapi/lib/model/system_config_faces_dto.dart +++ /dev/null @@ -1,100 +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 SystemConfigFacesDto { - /// Returns a new [SystemConfigFacesDto] instance. - SystemConfigFacesDto({ - required this.import_, - }); - - /// Import - bool import_; - - @override - bool operator ==(Object other) => identical(this, other) || other is SystemConfigFacesDto && - other.import_ == import_; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (import_.hashCode); - - @override - String toString() => 'SystemConfigFacesDto[import_=$import_]'; - - Map toJson() { - final json = {}; - json[r'import'] = this.import_; - return json; - } - - /// Returns a new [SystemConfigFacesDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SystemConfigFacesDto? fromJson(dynamic value) { - upgradeDto(value, "SystemConfigFacesDto"); - if (value is Map) { - final json = value.cast(); - - return SystemConfigFacesDto( - import_: mapValueOfType(json, r'import')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SystemConfigFacesDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SystemConfigFacesDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SystemConfigFacesDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SystemConfigFacesDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'import', - }; -} - diff --git a/mobile/openapi/lib/model/system_config_generated_fullsize_image_dto.dart b/mobile/openapi/lib/model/system_config_generated_fullsize_image_dto.dart deleted file mode 100644 index f0d27ffa85..0000000000 --- a/mobile/openapi/lib/model/system_config_generated_fullsize_image_dto.dart +++ /dev/null @@ -1,137 +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 SystemConfigGeneratedFullsizeImageDto { - /// Returns a new [SystemConfigGeneratedFullsizeImageDto] instance. - SystemConfigGeneratedFullsizeImageDto({ - required this.enabled, - required this.format, - this.progressive = const Optional.absent(), - required this.quality, - }); - - /// Enabled - bool enabled; - - ImageFormat format; - - /// Progressive - /// - /// 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. - /// - Optional progressive; - - /// Quality - /// - /// Minimum value: 1 - /// Maximum value: 100 - int quality; - - @override - bool operator ==(Object other) => identical(this, other) || other is SystemConfigGeneratedFullsizeImageDto && - other.enabled == enabled && - other.format == format && - other.progressive == progressive && - other.quality == quality; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (enabled.hashCode) + - (format.hashCode) + - (progressive == null ? 0 : progressive!.hashCode) + - (quality.hashCode); - - @override - String toString() => 'SystemConfigGeneratedFullsizeImageDto[enabled=$enabled, format=$format, progressive=$progressive, quality=$quality]'; - - Map toJson() { - final json = {}; - json[r'enabled'] = this.enabled; - json[r'format'] = this.format; - if (this.progressive.isPresent) { - final value = this.progressive.value; - json[r'progressive'] = value; - } - json[r'quality'] = this.quality; - return json; - } - - /// Returns a new [SystemConfigGeneratedFullsizeImageDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SystemConfigGeneratedFullsizeImageDto? fromJson(dynamic value) { - upgradeDto(value, "SystemConfigGeneratedFullsizeImageDto"); - if (value is Map) { - final json = value.cast(); - - return SystemConfigGeneratedFullsizeImageDto( - enabled: mapValueOfType(json, r'enabled')!, - format: ImageFormat.fromJson(json[r'format'])!, - progressive: json.containsKey(r'progressive') ? Optional.present(mapValueOfType(json, r'progressive')) : const Optional.absent(), - quality: mapValueOfType(json, r'quality')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SystemConfigGeneratedFullsizeImageDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SystemConfigGeneratedFullsizeImageDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SystemConfigGeneratedFullsizeImageDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SystemConfigGeneratedFullsizeImageDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'enabled', - 'format', - 'quality', - }; -} - diff --git a/mobile/openapi/lib/model/system_config_generated_image_dto.dart b/mobile/openapi/lib/model/system_config_generated_image_dto.dart deleted file mode 100644 index 6aff16322c..0000000000 --- a/mobile/openapi/lib/model/system_config_generated_image_dto.dart +++ /dev/null @@ -1,140 +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 SystemConfigGeneratedImageDto { - /// Returns a new [SystemConfigGeneratedImageDto] instance. - SystemConfigGeneratedImageDto({ - required this.format, - this.progressive = const Optional.absent(), - required this.quality, - required this.size, - }); - - ImageFormat format; - - /// Progressive - /// - /// 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. - /// - Optional progressive; - - /// Quality - /// - /// Minimum value: 1 - /// Maximum value: 100 - int quality; - - /// Size - /// - /// Minimum value: 1 - /// Maximum value: 9007199254740991 - int size; - - @override - bool operator ==(Object other) => identical(this, other) || other is SystemConfigGeneratedImageDto && - other.format == format && - other.progressive == progressive && - other.quality == quality && - other.size == size; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (format.hashCode) + - (progressive == null ? 0 : progressive!.hashCode) + - (quality.hashCode) + - (size.hashCode); - - @override - String toString() => 'SystemConfigGeneratedImageDto[format=$format, progressive=$progressive, quality=$quality, size=$size]'; - - Map toJson() { - final json = {}; - json[r'format'] = this.format; - if (this.progressive.isPresent) { - final value = this.progressive.value; - json[r'progressive'] = value; - } - json[r'quality'] = this.quality; - json[r'size'] = this.size; - return json; - } - - /// Returns a new [SystemConfigGeneratedImageDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SystemConfigGeneratedImageDto? fromJson(dynamic value) { - upgradeDto(value, "SystemConfigGeneratedImageDto"); - if (value is Map) { - final json = value.cast(); - - return SystemConfigGeneratedImageDto( - format: ImageFormat.fromJson(json[r'format'])!, - progressive: json.containsKey(r'progressive') ? Optional.present(mapValueOfType(json, r'progressive')) : const Optional.absent(), - quality: mapValueOfType(json, r'quality')!, - size: mapValueOfType(json, r'size')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SystemConfigGeneratedImageDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SystemConfigGeneratedImageDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SystemConfigGeneratedImageDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SystemConfigGeneratedImageDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'format', - 'quality', - 'size', - }; -} - diff --git a/mobile/openapi/lib/model/system_config_image_dto.dart b/mobile/openapi/lib/model/system_config_image_dto.dart deleted file mode 100644 index 668b740872..0000000000 --- a/mobile/openapi/lib/model/system_config_image_dto.dart +++ /dev/null @@ -1,132 +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 SystemConfigImageDto { - /// Returns a new [SystemConfigImageDto] instance. - SystemConfigImageDto({ - required this.colorspace, - required this.extractEmbedded, - required this.fullsize, - required this.preview, - required this.thumbnail, - }); - - Colorspace colorspace; - - /// Extract embedded - bool extractEmbedded; - - SystemConfigGeneratedFullsizeImageDto fullsize; - - SystemConfigGeneratedImageDto preview; - - SystemConfigGeneratedImageDto thumbnail; - - @override - bool operator ==(Object other) => identical(this, other) || other is SystemConfigImageDto && - other.colorspace == colorspace && - other.extractEmbedded == extractEmbedded && - other.fullsize == fullsize && - other.preview == preview && - other.thumbnail == thumbnail; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (colorspace.hashCode) + - (extractEmbedded.hashCode) + - (fullsize.hashCode) + - (preview.hashCode) + - (thumbnail.hashCode); - - @override - String toString() => 'SystemConfigImageDto[colorspace=$colorspace, extractEmbedded=$extractEmbedded, fullsize=$fullsize, preview=$preview, thumbnail=$thumbnail]'; - - Map toJson() { - final json = {}; - json[r'colorspace'] = this.colorspace; - json[r'extractEmbedded'] = this.extractEmbedded; - json[r'fullsize'] = this.fullsize; - json[r'preview'] = this.preview; - json[r'thumbnail'] = this.thumbnail; - return json; - } - - /// Returns a new [SystemConfigImageDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SystemConfigImageDto? fromJson(dynamic value) { - upgradeDto(value, "SystemConfigImageDto"); - if (value is Map) { - final json = value.cast(); - - return SystemConfigImageDto( - colorspace: Colorspace.fromJson(json[r'colorspace'])!, - extractEmbedded: mapValueOfType(json, r'extractEmbedded')!, - fullsize: SystemConfigGeneratedFullsizeImageDto.fromJson(json[r'fullsize'])!, - preview: SystemConfigGeneratedImageDto.fromJson(json[r'preview'])!, - thumbnail: SystemConfigGeneratedImageDto.fromJson(json[r'thumbnail'])!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SystemConfigImageDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SystemConfigImageDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SystemConfigImageDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SystemConfigImageDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'colorspace', - 'extractEmbedded', - 'fullsize', - 'preview', - 'thumbnail', - }; -} - diff --git a/mobile/openapi/lib/model/system_config_integrity_checks.dart b/mobile/openapi/lib/model/system_config_integrity_checks.dart deleted file mode 100644 index ef047e156a..0000000000 --- a/mobile/openapi/lib/model/system_config_integrity_checks.dart +++ /dev/null @@ -1,115 +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 SystemConfigIntegrityChecks { - /// Returns a new [SystemConfigIntegrityChecks] instance. - SystemConfigIntegrityChecks({ - required this.checksumFiles, - required this.missingFiles, - required this.untrackedFiles, - }); - - SystemConfigIntegrityChecksumJob checksumFiles; - - SystemConfigIntegrityJob missingFiles; - - SystemConfigIntegrityJob untrackedFiles; - - @override - bool operator ==(Object other) => identical(this, other) || other is SystemConfigIntegrityChecks && - other.checksumFiles == checksumFiles && - other.missingFiles == missingFiles && - other.untrackedFiles == untrackedFiles; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (checksumFiles.hashCode) + - (missingFiles.hashCode) + - (untrackedFiles.hashCode); - - @override - String toString() => 'SystemConfigIntegrityChecks[checksumFiles=$checksumFiles, missingFiles=$missingFiles, untrackedFiles=$untrackedFiles]'; - - Map toJson() { - final json = {}; - json[r'checksumFiles'] = this.checksumFiles; - json[r'missingFiles'] = this.missingFiles; - json[r'untrackedFiles'] = this.untrackedFiles; - return json; - } - - /// Returns a new [SystemConfigIntegrityChecks] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SystemConfigIntegrityChecks? fromJson(dynamic value) { - upgradeDto(value, "SystemConfigIntegrityChecks"); - if (value is Map) { - final json = value.cast(); - - return SystemConfigIntegrityChecks( - checksumFiles: SystemConfigIntegrityChecksumJob.fromJson(json[r'checksumFiles'])!, - missingFiles: SystemConfigIntegrityJob.fromJson(json[r'missingFiles'])!, - untrackedFiles: SystemConfigIntegrityJob.fromJson(json[r'untrackedFiles'])!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SystemConfigIntegrityChecks.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SystemConfigIntegrityChecks.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SystemConfigIntegrityChecks-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SystemConfigIntegrityChecks.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'checksumFiles', - 'missingFiles', - 'untrackedFiles', - }; -} - diff --git a/mobile/openapi/lib/model/system_config_integrity_checksum_job.dart b/mobile/openapi/lib/model/system_config_integrity_checksum_job.dart deleted file mode 100644 index beed3c76be..0000000000 --- a/mobile/openapi/lib/model/system_config_integrity_checksum_job.dart +++ /dev/null @@ -1,133 +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 SystemConfigIntegrityChecksumJob { - /// Returns a new [SystemConfigIntegrityChecksumJob] instance. - SystemConfigIntegrityChecksumJob({ - required this.cronExpression, - required this.enabled, - required this.percentageLimit, - required this.timeLimit, - }); - - /// Cron expression for when the integrity check should run - String cronExpression; - - /// Enabled - bool enabled; - - /// Percentage limit of the integrity checksum job - /// - /// Minimum value: 0 - /// Maximum value: 9007199254740991 - int percentageLimit; - - /// How long the integrity checksum job may run for - /// - /// Minimum value: 0 - /// Maximum value: 9007199254740991 - int timeLimit; - - @override - bool operator ==(Object other) => identical(this, other) || other is SystemConfigIntegrityChecksumJob && - other.cronExpression == cronExpression && - other.enabled == enabled && - other.percentageLimit == percentageLimit && - other.timeLimit == timeLimit; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (cronExpression.hashCode) + - (enabled.hashCode) + - (percentageLimit.hashCode) + - (timeLimit.hashCode); - - @override - String toString() => 'SystemConfigIntegrityChecksumJob[cronExpression=$cronExpression, enabled=$enabled, percentageLimit=$percentageLimit, timeLimit=$timeLimit]'; - - Map toJson() { - final json = {}; - json[r'cronExpression'] = this.cronExpression; - json[r'enabled'] = this.enabled; - json[r'percentageLimit'] = this.percentageLimit; - json[r'timeLimit'] = this.timeLimit; - return json; - } - - /// Returns a new [SystemConfigIntegrityChecksumJob] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SystemConfigIntegrityChecksumJob? fromJson(dynamic value) { - upgradeDto(value, "SystemConfigIntegrityChecksumJob"); - if (value is Map) { - final json = value.cast(); - - return SystemConfigIntegrityChecksumJob( - cronExpression: mapValueOfType(json, r'cronExpression')!, - enabled: mapValueOfType(json, r'enabled')!, - percentageLimit: mapValueOfType(json, r'percentageLimit')!, - timeLimit: mapValueOfType(json, r'timeLimit')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SystemConfigIntegrityChecksumJob.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SystemConfigIntegrityChecksumJob.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SystemConfigIntegrityChecksumJob-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SystemConfigIntegrityChecksumJob.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'cronExpression', - 'enabled', - 'percentageLimit', - 'timeLimit', - }; -} - diff --git a/mobile/openapi/lib/model/system_config_integrity_job.dart b/mobile/openapi/lib/model/system_config_integrity_job.dart deleted file mode 100644 index 52afcfa187..0000000000 --- a/mobile/openapi/lib/model/system_config_integrity_job.dart +++ /dev/null @@ -1,109 +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 SystemConfigIntegrityJob { - /// Returns a new [SystemConfigIntegrityJob] instance. - SystemConfigIntegrityJob({ - required this.cronExpression, - required this.enabled, - }); - - /// Cron expression for when the integrity check should run - String cronExpression; - - /// Enabled - bool enabled; - - @override - bool operator ==(Object other) => identical(this, other) || other is SystemConfigIntegrityJob && - other.cronExpression == cronExpression && - other.enabled == enabled; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (cronExpression.hashCode) + - (enabled.hashCode); - - @override - String toString() => 'SystemConfigIntegrityJob[cronExpression=$cronExpression, enabled=$enabled]'; - - Map toJson() { - final json = {}; - json[r'cronExpression'] = this.cronExpression; - json[r'enabled'] = this.enabled; - return json; - } - - /// Returns a new [SystemConfigIntegrityJob] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SystemConfigIntegrityJob? fromJson(dynamic value) { - upgradeDto(value, "SystemConfigIntegrityJob"); - if (value is Map) { - final json = value.cast(); - - return SystemConfigIntegrityJob( - cronExpression: mapValueOfType(json, r'cronExpression')!, - enabled: mapValueOfType(json, r'enabled')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SystemConfigIntegrityJob.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SystemConfigIntegrityJob.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SystemConfigIntegrityJob-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SystemConfigIntegrityJob.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'cronExpression', - 'enabled', - }; -} - diff --git a/mobile/openapi/lib/model/system_config_job_dto.dart b/mobile/openapi/lib/model/system_config_job_dto.dart deleted file mode 100644 index 08b07cc37c..0000000000 --- a/mobile/openapi/lib/model/system_config_job_dto.dart +++ /dev/null @@ -1,211 +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 SystemConfigJobDto { - /// Returns a new [SystemConfigJobDto] instance. - SystemConfigJobDto({ - required this.backgroundTask, - required this.editor, - required this.faceDetection, - required this.integrityCheck, - required this.library_, - required this.metadataExtraction, - required this.migration, - required this.notifications, - required this.ocr, - required this.search, - required this.sidecar, - required this.smartSearch, - required this.thumbnailGeneration, - required this.videoConversion, - required this.workflow, - }); - - JobSettingsDto backgroundTask; - - JobSettingsDto editor; - - JobSettingsDto faceDetection; - - JobSettingsDto integrityCheck; - - JobSettingsDto library_; - - JobSettingsDto metadataExtraction; - - JobSettingsDto migration; - - JobSettingsDto notifications; - - JobSettingsDto ocr; - - JobSettingsDto search; - - JobSettingsDto sidecar; - - JobSettingsDto smartSearch; - - JobSettingsDto thumbnailGeneration; - - JobSettingsDto videoConversion; - - JobSettingsDto workflow; - - @override - bool operator ==(Object other) => identical(this, other) || other is SystemConfigJobDto && - other.backgroundTask == backgroundTask && - other.editor == editor && - other.faceDetection == faceDetection && - other.integrityCheck == integrityCheck && - other.library_ == library_ && - other.metadataExtraction == metadataExtraction && - other.migration == migration && - other.notifications == notifications && - other.ocr == ocr && - other.search == search && - other.sidecar == sidecar && - other.smartSearch == smartSearch && - other.thumbnailGeneration == thumbnailGeneration && - other.videoConversion == videoConversion && - other.workflow == workflow; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (backgroundTask.hashCode) + - (editor.hashCode) + - (faceDetection.hashCode) + - (integrityCheck.hashCode) + - (library_.hashCode) + - (metadataExtraction.hashCode) + - (migration.hashCode) + - (notifications.hashCode) + - (ocr.hashCode) + - (search.hashCode) + - (sidecar.hashCode) + - (smartSearch.hashCode) + - (thumbnailGeneration.hashCode) + - (videoConversion.hashCode) + - (workflow.hashCode); - - @override - String toString() => 'SystemConfigJobDto[backgroundTask=$backgroundTask, editor=$editor, faceDetection=$faceDetection, integrityCheck=$integrityCheck, library_=$library_, metadataExtraction=$metadataExtraction, migration=$migration, notifications=$notifications, ocr=$ocr, search=$search, sidecar=$sidecar, smartSearch=$smartSearch, thumbnailGeneration=$thumbnailGeneration, videoConversion=$videoConversion, workflow=$workflow]'; - - Map toJson() { - final json = {}; - json[r'backgroundTask'] = this.backgroundTask; - json[r'editor'] = this.editor; - json[r'faceDetection'] = this.faceDetection; - json[r'integrityCheck'] = this.integrityCheck; - json[r'library'] = this.library_; - json[r'metadataExtraction'] = this.metadataExtraction; - json[r'migration'] = this.migration; - json[r'notifications'] = this.notifications; - json[r'ocr'] = this.ocr; - json[r'search'] = this.search; - json[r'sidecar'] = this.sidecar; - json[r'smartSearch'] = this.smartSearch; - json[r'thumbnailGeneration'] = this.thumbnailGeneration; - json[r'videoConversion'] = this.videoConversion; - json[r'workflow'] = this.workflow; - return json; - } - - /// Returns a new [SystemConfigJobDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SystemConfigJobDto? fromJson(dynamic value) { - upgradeDto(value, "SystemConfigJobDto"); - if (value is Map) { - final json = value.cast(); - - return SystemConfigJobDto( - backgroundTask: JobSettingsDto.fromJson(json[r'backgroundTask'])!, - editor: JobSettingsDto.fromJson(json[r'editor'])!, - faceDetection: JobSettingsDto.fromJson(json[r'faceDetection'])!, - integrityCheck: JobSettingsDto.fromJson(json[r'integrityCheck'])!, - library_: JobSettingsDto.fromJson(json[r'library'])!, - metadataExtraction: JobSettingsDto.fromJson(json[r'metadataExtraction'])!, - migration: JobSettingsDto.fromJson(json[r'migration'])!, - notifications: JobSettingsDto.fromJson(json[r'notifications'])!, - ocr: JobSettingsDto.fromJson(json[r'ocr'])!, - search: JobSettingsDto.fromJson(json[r'search'])!, - sidecar: JobSettingsDto.fromJson(json[r'sidecar'])!, - smartSearch: JobSettingsDto.fromJson(json[r'smartSearch'])!, - thumbnailGeneration: JobSettingsDto.fromJson(json[r'thumbnailGeneration'])!, - videoConversion: JobSettingsDto.fromJson(json[r'videoConversion'])!, - workflow: JobSettingsDto.fromJson(json[r'workflow'])!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SystemConfigJobDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SystemConfigJobDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SystemConfigJobDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SystemConfigJobDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'backgroundTask', - 'editor', - 'faceDetection', - 'integrityCheck', - 'library', - 'metadataExtraction', - 'migration', - 'notifications', - 'ocr', - 'search', - 'sidecar', - 'smartSearch', - 'thumbnailGeneration', - 'videoConversion', - 'workflow', - }; -} - diff --git a/mobile/openapi/lib/model/system_config_library_dto.dart b/mobile/openapi/lib/model/system_config_library_dto.dart deleted file mode 100644 index e728b0bf20..0000000000 --- a/mobile/openapi/lib/model/system_config_library_dto.dart +++ /dev/null @@ -1,107 +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 SystemConfigLibraryDto { - /// Returns a new [SystemConfigLibraryDto] instance. - SystemConfigLibraryDto({ - required this.scan, - required this.watch, - }); - - SystemConfigLibraryScanDto scan; - - SystemConfigLibraryWatchDto watch; - - @override - bool operator ==(Object other) => identical(this, other) || other is SystemConfigLibraryDto && - other.scan == scan && - other.watch == watch; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (scan.hashCode) + - (watch.hashCode); - - @override - String toString() => 'SystemConfigLibraryDto[scan=$scan, watch=$watch]'; - - Map toJson() { - final json = {}; - json[r'scan'] = this.scan; - json[r'watch'] = this.watch; - return json; - } - - /// Returns a new [SystemConfigLibraryDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SystemConfigLibraryDto? fromJson(dynamic value) { - upgradeDto(value, "SystemConfigLibraryDto"); - if (value is Map) { - final json = value.cast(); - - return SystemConfigLibraryDto( - scan: SystemConfigLibraryScanDto.fromJson(json[r'scan'])!, - watch: SystemConfigLibraryWatchDto.fromJson(json[r'watch'])!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SystemConfigLibraryDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SystemConfigLibraryDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SystemConfigLibraryDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SystemConfigLibraryDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'scan', - 'watch', - }; -} - diff --git a/mobile/openapi/lib/model/system_config_library_scan_dto.dart b/mobile/openapi/lib/model/system_config_library_scan_dto.dart deleted file mode 100644 index 003000d2ec..0000000000 --- a/mobile/openapi/lib/model/system_config_library_scan_dto.dart +++ /dev/null @@ -1,109 +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 SystemConfigLibraryScanDto { - /// Returns a new [SystemConfigLibraryScanDto] instance. - SystemConfigLibraryScanDto({ - required this.cronExpression, - required this.enabled, - }); - - /// Cron expression - String cronExpression; - - /// Enabled - bool enabled; - - @override - bool operator ==(Object other) => identical(this, other) || other is SystemConfigLibraryScanDto && - other.cronExpression == cronExpression && - other.enabled == enabled; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (cronExpression.hashCode) + - (enabled.hashCode); - - @override - String toString() => 'SystemConfigLibraryScanDto[cronExpression=$cronExpression, enabled=$enabled]'; - - Map toJson() { - final json = {}; - json[r'cronExpression'] = this.cronExpression; - json[r'enabled'] = this.enabled; - return json; - } - - /// Returns a new [SystemConfigLibraryScanDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SystemConfigLibraryScanDto? fromJson(dynamic value) { - upgradeDto(value, "SystemConfigLibraryScanDto"); - if (value is Map) { - final json = value.cast(); - - return SystemConfigLibraryScanDto( - cronExpression: mapValueOfType(json, r'cronExpression')!, - enabled: mapValueOfType(json, r'enabled')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SystemConfigLibraryScanDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SystemConfigLibraryScanDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SystemConfigLibraryScanDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SystemConfigLibraryScanDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'cronExpression', - 'enabled', - }; -} - diff --git a/mobile/openapi/lib/model/system_config_library_watch_dto.dart b/mobile/openapi/lib/model/system_config_library_watch_dto.dart deleted file mode 100644 index b4f171bd25..0000000000 --- a/mobile/openapi/lib/model/system_config_library_watch_dto.dart +++ /dev/null @@ -1,100 +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 SystemConfigLibraryWatchDto { - /// Returns a new [SystemConfigLibraryWatchDto] instance. - SystemConfigLibraryWatchDto({ - required this.enabled, - }); - - /// Enabled - bool enabled; - - @override - bool operator ==(Object other) => identical(this, other) || other is SystemConfigLibraryWatchDto && - other.enabled == enabled; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (enabled.hashCode); - - @override - String toString() => 'SystemConfigLibraryWatchDto[enabled=$enabled]'; - - Map toJson() { - final json = {}; - json[r'enabled'] = this.enabled; - return json; - } - - /// Returns a new [SystemConfigLibraryWatchDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SystemConfigLibraryWatchDto? fromJson(dynamic value) { - upgradeDto(value, "SystemConfigLibraryWatchDto"); - if (value is Map) { - final json = value.cast(); - - return SystemConfigLibraryWatchDto( - enabled: mapValueOfType(json, r'enabled')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SystemConfigLibraryWatchDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SystemConfigLibraryWatchDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SystemConfigLibraryWatchDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SystemConfigLibraryWatchDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'enabled', - }; -} - diff --git a/mobile/openapi/lib/model/system_config_logging_dto.dart b/mobile/openapi/lib/model/system_config_logging_dto.dart deleted file mode 100644 index 54278893db..0000000000 --- a/mobile/openapi/lib/model/system_config_logging_dto.dart +++ /dev/null @@ -1,108 +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 SystemConfigLoggingDto { - /// Returns a new [SystemConfigLoggingDto] instance. - SystemConfigLoggingDto({ - required this.enabled, - required this.level, - }); - - /// Enabled - bool enabled; - - LogLevel level; - - @override - bool operator ==(Object other) => identical(this, other) || other is SystemConfigLoggingDto && - other.enabled == enabled && - other.level == level; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (enabled.hashCode) + - (level.hashCode); - - @override - String toString() => 'SystemConfigLoggingDto[enabled=$enabled, level=$level]'; - - Map toJson() { - final json = {}; - json[r'enabled'] = this.enabled; - json[r'level'] = this.level; - return json; - } - - /// Returns a new [SystemConfigLoggingDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SystemConfigLoggingDto? fromJson(dynamic value) { - upgradeDto(value, "SystemConfigLoggingDto"); - if (value is Map) { - final json = value.cast(); - - return SystemConfigLoggingDto( - enabled: mapValueOfType(json, r'enabled')!, - level: LogLevel.fromJson(json[r'level'])!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SystemConfigLoggingDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SystemConfigLoggingDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SystemConfigLoggingDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SystemConfigLoggingDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'enabled', - 'level', - }; -} - diff --git a/mobile/openapi/lib/model/system_config_machine_learning_dto.dart b/mobile/openapi/lib/model/system_config_machine_learning_dto.dart deleted file mode 100644 index 6162e72b8f..0000000000 --- a/mobile/openapi/lib/model/system_config_machine_learning_dto.dart +++ /dev/null @@ -1,151 +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 SystemConfigMachineLearningDto { - /// Returns a new [SystemConfigMachineLearningDto] instance. - SystemConfigMachineLearningDto({ - required this.availabilityChecks, - required this.clip, - required this.duplicateDetection, - required this.enabled, - required this.facialRecognition, - required this.ocr, - this.urls = const [], - }); - - MachineLearningAvailabilityChecksDto availabilityChecks; - - CLIPConfig clip; - - DuplicateDetectionConfig duplicateDetection; - - /// Enabled - bool enabled; - - FacialRecognitionConfig facialRecognition; - - OcrConfig ocr; - - /// ML service URLs - List urls; - - @override - bool operator ==(Object other) => identical(this, other) || other is SystemConfigMachineLearningDto && - other.availabilityChecks == availabilityChecks && - other.clip == clip && - other.duplicateDetection == duplicateDetection && - other.enabled == enabled && - other.facialRecognition == facialRecognition && - other.ocr == ocr && - _deepEquality.equals(other.urls, urls); - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (availabilityChecks.hashCode) + - (clip.hashCode) + - (duplicateDetection.hashCode) + - (enabled.hashCode) + - (facialRecognition.hashCode) + - (ocr.hashCode) + - (urls.hashCode); - - @override - String toString() => 'SystemConfigMachineLearningDto[availabilityChecks=$availabilityChecks, clip=$clip, duplicateDetection=$duplicateDetection, enabled=$enabled, facialRecognition=$facialRecognition, ocr=$ocr, urls=$urls]'; - - Map toJson() { - final json = {}; - json[r'availabilityChecks'] = this.availabilityChecks; - json[r'clip'] = this.clip; - json[r'duplicateDetection'] = this.duplicateDetection; - json[r'enabled'] = this.enabled; - json[r'facialRecognition'] = this.facialRecognition; - json[r'ocr'] = this.ocr; - json[r'urls'] = this.urls; - return json; - } - - /// Returns a new [SystemConfigMachineLearningDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SystemConfigMachineLearningDto? fromJson(dynamic value) { - upgradeDto(value, "SystemConfigMachineLearningDto"); - if (value is Map) { - final json = value.cast(); - - return SystemConfigMachineLearningDto( - availabilityChecks: MachineLearningAvailabilityChecksDto.fromJson(json[r'availabilityChecks'])!, - clip: CLIPConfig.fromJson(json[r'clip'])!, - duplicateDetection: DuplicateDetectionConfig.fromJson(json[r'duplicateDetection'])!, - enabled: mapValueOfType(json, r'enabled')!, - facialRecognition: FacialRecognitionConfig.fromJson(json[r'facialRecognition'])!, - ocr: OcrConfig.fromJson(json[r'ocr'])!, - urls: json[r'urls'] is Iterable - ? (json[r'urls'] as Iterable).cast().toList(growable: false) - : const [], - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SystemConfigMachineLearningDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SystemConfigMachineLearningDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SystemConfigMachineLearningDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SystemConfigMachineLearningDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'availabilityChecks', - 'clip', - 'duplicateDetection', - 'enabled', - 'facialRecognition', - 'ocr', - 'urls', - }; -} - diff --git a/mobile/openapi/lib/model/system_config_map_dto.dart b/mobile/openapi/lib/model/system_config_map_dto.dart deleted file mode 100644 index 7a2fbb516b..0000000000 --- a/mobile/openapi/lib/model/system_config_map_dto.dart +++ /dev/null @@ -1,118 +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 SystemConfigMapDto { - /// Returns a new [SystemConfigMapDto] instance. - SystemConfigMapDto({ - required this.darkStyle, - required this.enabled, - required this.lightStyle, - }); - - /// Dark map style URL - String darkStyle; - - /// Enabled - bool enabled; - - /// Light map style URL - String lightStyle; - - @override - bool operator ==(Object other) => identical(this, other) || other is SystemConfigMapDto && - other.darkStyle == darkStyle && - other.enabled == enabled && - other.lightStyle == lightStyle; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (darkStyle.hashCode) + - (enabled.hashCode) + - (lightStyle.hashCode); - - @override - String toString() => 'SystemConfigMapDto[darkStyle=$darkStyle, enabled=$enabled, lightStyle=$lightStyle]'; - - Map toJson() { - final json = {}; - json[r'darkStyle'] = this.darkStyle; - json[r'enabled'] = this.enabled; - json[r'lightStyle'] = this.lightStyle; - return json; - } - - /// Returns a new [SystemConfigMapDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SystemConfigMapDto? fromJson(dynamic value) { - upgradeDto(value, "SystemConfigMapDto"); - if (value is Map) { - final json = value.cast(); - - return SystemConfigMapDto( - darkStyle: mapValueOfType(json, r'darkStyle')!, - enabled: mapValueOfType(json, r'enabled')!, - lightStyle: mapValueOfType(json, r'lightStyle')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SystemConfigMapDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SystemConfigMapDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SystemConfigMapDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SystemConfigMapDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'darkStyle', - 'enabled', - 'lightStyle', - }; -} - diff --git a/mobile/openapi/lib/model/system_config_metadata_dto.dart b/mobile/openapi/lib/model/system_config_metadata_dto.dart deleted file mode 100644 index 3c32fc551d..0000000000 --- a/mobile/openapi/lib/model/system_config_metadata_dto.dart +++ /dev/null @@ -1,99 +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 SystemConfigMetadataDto { - /// Returns a new [SystemConfigMetadataDto] instance. - SystemConfigMetadataDto({ - required this.faces, - }); - - SystemConfigFacesDto faces; - - @override - bool operator ==(Object other) => identical(this, other) || other is SystemConfigMetadataDto && - other.faces == faces; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (faces.hashCode); - - @override - String toString() => 'SystemConfigMetadataDto[faces=$faces]'; - - Map toJson() { - final json = {}; - json[r'faces'] = this.faces; - return json; - } - - /// Returns a new [SystemConfigMetadataDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SystemConfigMetadataDto? fromJson(dynamic value) { - upgradeDto(value, "SystemConfigMetadataDto"); - if (value is Map) { - final json = value.cast(); - - return SystemConfigMetadataDto( - faces: SystemConfigFacesDto.fromJson(json[r'faces'])!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SystemConfigMetadataDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SystemConfigMetadataDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SystemConfigMetadataDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SystemConfigMetadataDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'faces', - }; -} - diff --git a/mobile/openapi/lib/model/system_config_new_version_check_dto.dart b/mobile/openapi/lib/model/system_config_new_version_check_dto.dart deleted file mode 100644 index 17ae9577e8..0000000000 --- a/mobile/openapi/lib/model/system_config_new_version_check_dto.dart +++ /dev/null @@ -1,108 +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 SystemConfigNewVersionCheckDto { - /// Returns a new [SystemConfigNewVersionCheckDto] instance. - SystemConfigNewVersionCheckDto({ - required this.channel, - required this.enabled, - }); - - ReleaseChannel channel; - - /// Enabled - bool enabled; - - @override - bool operator ==(Object other) => identical(this, other) || other is SystemConfigNewVersionCheckDto && - other.channel == channel && - other.enabled == enabled; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (channel.hashCode) + - (enabled.hashCode); - - @override - String toString() => 'SystemConfigNewVersionCheckDto[channel=$channel, enabled=$enabled]'; - - Map toJson() { - final json = {}; - json[r'channel'] = this.channel; - json[r'enabled'] = this.enabled; - return json; - } - - /// Returns a new [SystemConfigNewVersionCheckDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SystemConfigNewVersionCheckDto? fromJson(dynamic value) { - upgradeDto(value, "SystemConfigNewVersionCheckDto"); - if (value is Map) { - final json = value.cast(); - - return SystemConfigNewVersionCheckDto( - channel: ReleaseChannel.fromJson(json[r'channel'])!, - enabled: mapValueOfType(json, r'enabled')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SystemConfigNewVersionCheckDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SystemConfigNewVersionCheckDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SystemConfigNewVersionCheckDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SystemConfigNewVersionCheckDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'channel', - 'enabled', - }; -} - diff --git a/mobile/openapi/lib/model/system_config_nightly_tasks_dto.dart b/mobile/openapi/lib/model/system_config_nightly_tasks_dto.dart deleted file mode 100644 index 4838c86065..0000000000 --- a/mobile/openapi/lib/model/system_config_nightly_tasks_dto.dart +++ /dev/null @@ -1,145 +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 SystemConfigNightlyTasksDto { - /// Returns a new [SystemConfigNightlyTasksDto] instance. - SystemConfigNightlyTasksDto({ - required this.clusterNewFaces, - required this.databaseCleanup, - required this.generateMemories, - required this.missingThumbnails, - required this.startTime, - required this.syncQuotaUsage, - }); - - /// Cluster new faces - bool clusterNewFaces; - - /// Database cleanup - bool databaseCleanup; - - /// Generate memories - bool generateMemories; - - /// Missing thumbnails - bool missingThumbnails; - - /// Start time (HH:MM) - String startTime; - - /// Sync quota usage - bool syncQuotaUsage; - - @override - bool operator ==(Object other) => identical(this, other) || other is SystemConfigNightlyTasksDto && - other.clusterNewFaces == clusterNewFaces && - other.databaseCleanup == databaseCleanup && - other.generateMemories == generateMemories && - other.missingThumbnails == missingThumbnails && - other.startTime == startTime && - other.syncQuotaUsage == syncQuotaUsage; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (clusterNewFaces.hashCode) + - (databaseCleanup.hashCode) + - (generateMemories.hashCode) + - (missingThumbnails.hashCode) + - (startTime.hashCode) + - (syncQuotaUsage.hashCode); - - @override - String toString() => 'SystemConfigNightlyTasksDto[clusterNewFaces=$clusterNewFaces, databaseCleanup=$databaseCleanup, generateMemories=$generateMemories, missingThumbnails=$missingThumbnails, startTime=$startTime, syncQuotaUsage=$syncQuotaUsage]'; - - Map toJson() { - final json = {}; - json[r'clusterNewFaces'] = this.clusterNewFaces; - json[r'databaseCleanup'] = this.databaseCleanup; - json[r'generateMemories'] = this.generateMemories; - json[r'missingThumbnails'] = this.missingThumbnails; - json[r'startTime'] = this.startTime; - json[r'syncQuotaUsage'] = this.syncQuotaUsage; - return json; - } - - /// Returns a new [SystemConfigNightlyTasksDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SystemConfigNightlyTasksDto? fromJson(dynamic value) { - upgradeDto(value, "SystemConfigNightlyTasksDto"); - if (value is Map) { - final json = value.cast(); - - return SystemConfigNightlyTasksDto( - clusterNewFaces: mapValueOfType(json, r'clusterNewFaces')!, - databaseCleanup: mapValueOfType(json, r'databaseCleanup')!, - generateMemories: mapValueOfType(json, r'generateMemories')!, - missingThumbnails: mapValueOfType(json, r'missingThumbnails')!, - startTime: mapValueOfType(json, r'startTime')!, - syncQuotaUsage: mapValueOfType(json, r'syncQuotaUsage')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SystemConfigNightlyTasksDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SystemConfigNightlyTasksDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SystemConfigNightlyTasksDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SystemConfigNightlyTasksDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'clusterNewFaces', - 'databaseCleanup', - 'generateMemories', - 'missingThumbnails', - 'startTime', - 'syncQuotaUsage', - }; -} - diff --git a/mobile/openapi/lib/model/system_config_notifications_dto.dart b/mobile/openapi/lib/model/system_config_notifications_dto.dart deleted file mode 100644 index 35d3d31833..0000000000 --- a/mobile/openapi/lib/model/system_config_notifications_dto.dart +++ /dev/null @@ -1,99 +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 SystemConfigNotificationsDto { - /// Returns a new [SystemConfigNotificationsDto] instance. - SystemConfigNotificationsDto({ - required this.smtp, - }); - - SystemConfigSmtpDto smtp; - - @override - bool operator ==(Object other) => identical(this, other) || other is SystemConfigNotificationsDto && - other.smtp == smtp; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (smtp.hashCode); - - @override - String toString() => 'SystemConfigNotificationsDto[smtp=$smtp]'; - - Map toJson() { - final json = {}; - json[r'smtp'] = this.smtp; - return json; - } - - /// Returns a new [SystemConfigNotificationsDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SystemConfigNotificationsDto? fromJson(dynamic value) { - upgradeDto(value, "SystemConfigNotificationsDto"); - if (value is Map) { - final json = value.cast(); - - return SystemConfigNotificationsDto( - smtp: SystemConfigSmtpDto.fromJson(json[r'smtp'])!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SystemConfigNotificationsDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SystemConfigNotificationsDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SystemConfigNotificationsDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SystemConfigNotificationsDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'smtp', - }; -} - diff --git a/mobile/openapi/lib/model/system_config_o_auth_dto.dart b/mobile/openapi/lib/model/system_config_o_auth_dto.dart deleted file mode 100644 index 44eefe605c..0000000000 --- a/mobile/openapi/lib/model/system_config_o_auth_dto.dart +++ /dev/null @@ -1,289 +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 SystemConfigOAuthDto { - /// Returns a new [SystemConfigOAuthDto] instance. - SystemConfigOAuthDto({ - required this.allowInsecureRequests, - required this.autoLaunch, - required this.autoRegister, - required this.buttonText, - required this.clientId, - required this.clientSecret, - required this.defaultStorageQuota, - required this.enabled, - required this.endSessionEndpoint, - required this.issuerUrl, - required this.mobileOverrideEnabled, - required this.mobileRedirectUri, - required this.profileSigningAlgorithm, - required this.prompt, - required this.roleClaim, - required this.scope, - required this.signingAlgorithm, - required this.storageLabelClaim, - required this.storageQuotaClaim, - required this.timeout, - required this.tokenEndpointAuthMethod, - }); - - /// Allow insecure requests - bool allowInsecureRequests; - - /// Auto launch - bool autoLaunch; - - /// Auto register - bool autoRegister; - - /// Button text - String buttonText; - - /// Client ID - String clientId; - - /// Client secret - String clientSecret; - - /// Default storage quota - /// - /// Minimum value: 0 - /// Maximum value: 9007199254740991 - int? defaultStorageQuota; - - /// Enabled - bool enabled; - - /// End session endpoint - String endSessionEndpoint; - - /// Issuer URL - String issuerUrl; - - /// Mobile override enabled - bool mobileOverrideEnabled; - - /// Mobile redirect URI (set to empty string to disable) - String mobileRedirectUri; - - /// Profile signing algorithm - String profileSigningAlgorithm; - - /// OAuth prompt parameter (e.g. select_account, login, consent) - String prompt; - - /// Role claim - String roleClaim; - - /// Scope - String scope; - - /// Signing algorithm - String signingAlgorithm; - - /// Storage label claim - String storageLabelClaim; - - /// Storage quota claim - String storageQuotaClaim; - - /// Timeout - /// - /// Minimum value: 1 - /// Maximum value: 9007199254740991 - int timeout; - - OAuthTokenEndpointAuthMethod tokenEndpointAuthMethod; - - @override - bool operator ==(Object other) => identical(this, other) || other is SystemConfigOAuthDto && - other.allowInsecureRequests == allowInsecureRequests && - other.autoLaunch == autoLaunch && - other.autoRegister == autoRegister && - other.buttonText == buttonText && - other.clientId == clientId && - other.clientSecret == clientSecret && - other.defaultStorageQuota == defaultStorageQuota && - other.enabled == enabled && - other.endSessionEndpoint == endSessionEndpoint && - other.issuerUrl == issuerUrl && - other.mobileOverrideEnabled == mobileOverrideEnabled && - other.mobileRedirectUri == mobileRedirectUri && - other.profileSigningAlgorithm == profileSigningAlgorithm && - other.prompt == prompt && - other.roleClaim == roleClaim && - other.scope == scope && - other.signingAlgorithm == signingAlgorithm && - other.storageLabelClaim == storageLabelClaim && - other.storageQuotaClaim == storageQuotaClaim && - other.timeout == timeout && - other.tokenEndpointAuthMethod == tokenEndpointAuthMethod; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (allowInsecureRequests.hashCode) + - (autoLaunch.hashCode) + - (autoRegister.hashCode) + - (buttonText.hashCode) + - (clientId.hashCode) + - (clientSecret.hashCode) + - (defaultStorageQuota == null ? 0 : defaultStorageQuota!.hashCode) + - (enabled.hashCode) + - (endSessionEndpoint.hashCode) + - (issuerUrl.hashCode) + - (mobileOverrideEnabled.hashCode) + - (mobileRedirectUri.hashCode) + - (profileSigningAlgorithm.hashCode) + - (prompt.hashCode) + - (roleClaim.hashCode) + - (scope.hashCode) + - (signingAlgorithm.hashCode) + - (storageLabelClaim.hashCode) + - (storageQuotaClaim.hashCode) + - (timeout.hashCode) + - (tokenEndpointAuthMethod.hashCode); - - @override - String toString() => 'SystemConfigOAuthDto[allowInsecureRequests=$allowInsecureRequests, autoLaunch=$autoLaunch, autoRegister=$autoRegister, buttonText=$buttonText, clientId=$clientId, clientSecret=$clientSecret, defaultStorageQuota=$defaultStorageQuota, enabled=$enabled, endSessionEndpoint=$endSessionEndpoint, issuerUrl=$issuerUrl, mobileOverrideEnabled=$mobileOverrideEnabled, mobileRedirectUri=$mobileRedirectUri, profileSigningAlgorithm=$profileSigningAlgorithm, prompt=$prompt, roleClaim=$roleClaim, scope=$scope, signingAlgorithm=$signingAlgorithm, storageLabelClaim=$storageLabelClaim, storageQuotaClaim=$storageQuotaClaim, timeout=$timeout, tokenEndpointAuthMethod=$tokenEndpointAuthMethod]'; - - Map toJson() { - final json = {}; - json[r'allowInsecureRequests'] = this.allowInsecureRequests; - json[r'autoLaunch'] = this.autoLaunch; - json[r'autoRegister'] = this.autoRegister; - json[r'buttonText'] = this.buttonText; - json[r'clientId'] = this.clientId; - json[r'clientSecret'] = this.clientSecret; - if (this.defaultStorageQuota != null) { - json[r'defaultStorageQuota'] = this.defaultStorageQuota; - } else { - json[r'defaultStorageQuota'] = null; - } - json[r'enabled'] = this.enabled; - json[r'endSessionEndpoint'] = this.endSessionEndpoint; - json[r'issuerUrl'] = this.issuerUrl; - json[r'mobileOverrideEnabled'] = this.mobileOverrideEnabled; - json[r'mobileRedirectUri'] = this.mobileRedirectUri; - json[r'profileSigningAlgorithm'] = this.profileSigningAlgorithm; - json[r'prompt'] = this.prompt; - json[r'roleClaim'] = this.roleClaim; - json[r'scope'] = this.scope; - json[r'signingAlgorithm'] = this.signingAlgorithm; - json[r'storageLabelClaim'] = this.storageLabelClaim; - json[r'storageQuotaClaim'] = this.storageQuotaClaim; - json[r'timeout'] = this.timeout; - json[r'tokenEndpointAuthMethod'] = this.tokenEndpointAuthMethod; - return json; - } - - /// Returns a new [SystemConfigOAuthDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SystemConfigOAuthDto? fromJson(dynamic value) { - upgradeDto(value, "SystemConfigOAuthDto"); - if (value is Map) { - final json = value.cast(); - - return SystemConfigOAuthDto( - allowInsecureRequests: mapValueOfType(json, r'allowInsecureRequests')!, - autoLaunch: mapValueOfType(json, r'autoLaunch')!, - autoRegister: mapValueOfType(json, r'autoRegister')!, - buttonText: mapValueOfType(json, r'buttonText')!, - clientId: mapValueOfType(json, r'clientId')!, - clientSecret: mapValueOfType(json, r'clientSecret')!, - defaultStorageQuota: mapValueOfType(json, r'defaultStorageQuota'), - enabled: mapValueOfType(json, r'enabled')!, - endSessionEndpoint: mapValueOfType(json, r'endSessionEndpoint')!, - issuerUrl: mapValueOfType(json, r'issuerUrl')!, - mobileOverrideEnabled: mapValueOfType(json, r'mobileOverrideEnabled')!, - mobileRedirectUri: mapValueOfType(json, r'mobileRedirectUri')!, - profileSigningAlgorithm: mapValueOfType(json, r'profileSigningAlgorithm')!, - prompt: mapValueOfType(json, r'prompt')!, - roleClaim: mapValueOfType(json, r'roleClaim')!, - scope: mapValueOfType(json, r'scope')!, - signingAlgorithm: mapValueOfType(json, r'signingAlgorithm')!, - storageLabelClaim: mapValueOfType(json, r'storageLabelClaim')!, - storageQuotaClaim: mapValueOfType(json, r'storageQuotaClaim')!, - timeout: mapValueOfType(json, r'timeout')!, - tokenEndpointAuthMethod: OAuthTokenEndpointAuthMethod.fromJson(json[r'tokenEndpointAuthMethod'])!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SystemConfigOAuthDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SystemConfigOAuthDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SystemConfigOAuthDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SystemConfigOAuthDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'allowInsecureRequests', - 'autoLaunch', - 'autoRegister', - 'buttonText', - 'clientId', - 'clientSecret', - 'defaultStorageQuota', - 'enabled', - 'endSessionEndpoint', - 'issuerUrl', - 'mobileOverrideEnabled', - 'mobileRedirectUri', - 'profileSigningAlgorithm', - 'prompt', - 'roleClaim', - 'scope', - 'signingAlgorithm', - 'storageLabelClaim', - 'storageQuotaClaim', - 'timeout', - 'tokenEndpointAuthMethod', - }; -} - diff --git a/mobile/openapi/lib/model/system_config_password_login_dto.dart b/mobile/openapi/lib/model/system_config_password_login_dto.dart deleted file mode 100644 index 1328a6acaa..0000000000 --- a/mobile/openapi/lib/model/system_config_password_login_dto.dart +++ /dev/null @@ -1,100 +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 SystemConfigPasswordLoginDto { - /// Returns a new [SystemConfigPasswordLoginDto] instance. - SystemConfigPasswordLoginDto({ - required this.enabled, - }); - - /// Enabled - bool enabled; - - @override - bool operator ==(Object other) => identical(this, other) || other is SystemConfigPasswordLoginDto && - other.enabled == enabled; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (enabled.hashCode); - - @override - String toString() => 'SystemConfigPasswordLoginDto[enabled=$enabled]'; - - Map toJson() { - final json = {}; - json[r'enabled'] = this.enabled; - return json; - } - - /// Returns a new [SystemConfigPasswordLoginDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SystemConfigPasswordLoginDto? fromJson(dynamic value) { - upgradeDto(value, "SystemConfigPasswordLoginDto"); - if (value is Map) { - final json = value.cast(); - - return SystemConfigPasswordLoginDto( - enabled: mapValueOfType(json, r'enabled')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SystemConfigPasswordLoginDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SystemConfigPasswordLoginDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SystemConfigPasswordLoginDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SystemConfigPasswordLoginDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'enabled', - }; -} - diff --git a/mobile/openapi/lib/model/system_config_reverse_geocoding_dto.dart b/mobile/openapi/lib/model/system_config_reverse_geocoding_dto.dart deleted file mode 100644 index 0374e19be1..0000000000 --- a/mobile/openapi/lib/model/system_config_reverse_geocoding_dto.dart +++ /dev/null @@ -1,100 +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 SystemConfigReverseGeocodingDto { - /// Returns a new [SystemConfigReverseGeocodingDto] instance. - SystemConfigReverseGeocodingDto({ - required this.enabled, - }); - - /// Enabled - bool enabled; - - @override - bool operator ==(Object other) => identical(this, other) || other is SystemConfigReverseGeocodingDto && - other.enabled == enabled; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (enabled.hashCode); - - @override - String toString() => 'SystemConfigReverseGeocodingDto[enabled=$enabled]'; - - Map toJson() { - final json = {}; - json[r'enabled'] = this.enabled; - return json; - } - - /// Returns a new [SystemConfigReverseGeocodingDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SystemConfigReverseGeocodingDto? fromJson(dynamic value) { - upgradeDto(value, "SystemConfigReverseGeocodingDto"); - if (value is Map) { - final json = value.cast(); - - return SystemConfigReverseGeocodingDto( - enabled: mapValueOfType(json, r'enabled')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SystemConfigReverseGeocodingDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SystemConfigReverseGeocodingDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SystemConfigReverseGeocodingDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SystemConfigReverseGeocodingDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'enabled', - }; -} - diff --git a/mobile/openapi/lib/model/system_config_server_dto.dart b/mobile/openapi/lib/model/system_config_server_dto.dart deleted file mode 100644 index 200f75f7c6..0000000000 --- a/mobile/openapi/lib/model/system_config_server_dto.dart +++ /dev/null @@ -1,118 +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 SystemConfigServerDto { - /// Returns a new [SystemConfigServerDto] instance. - SystemConfigServerDto({ - required this.externalDomain, - required this.loginPageMessage, - required this.publicUsers, - }); - - /// External domain - String externalDomain; - - /// Login page message - String loginPageMessage; - - /// Public users - bool publicUsers; - - @override - bool operator ==(Object other) => identical(this, other) || other is SystemConfigServerDto && - other.externalDomain == externalDomain && - other.loginPageMessage == loginPageMessage && - other.publicUsers == publicUsers; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (externalDomain.hashCode) + - (loginPageMessage.hashCode) + - (publicUsers.hashCode); - - @override - String toString() => 'SystemConfigServerDto[externalDomain=$externalDomain, loginPageMessage=$loginPageMessage, publicUsers=$publicUsers]'; - - Map toJson() { - final json = {}; - json[r'externalDomain'] = this.externalDomain; - json[r'loginPageMessage'] = this.loginPageMessage; - json[r'publicUsers'] = this.publicUsers; - return json; - } - - /// Returns a new [SystemConfigServerDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SystemConfigServerDto? fromJson(dynamic value) { - upgradeDto(value, "SystemConfigServerDto"); - if (value is Map) { - final json = value.cast(); - - return SystemConfigServerDto( - externalDomain: mapValueOfType(json, r'externalDomain')!, - loginPageMessage: mapValueOfType(json, r'loginPageMessage')!, - publicUsers: mapValueOfType(json, r'publicUsers')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SystemConfigServerDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SystemConfigServerDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SystemConfigServerDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SystemConfigServerDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'externalDomain', - 'loginPageMessage', - 'publicUsers', - }; -} - diff --git a/mobile/openapi/lib/model/system_config_smtp_dto.dart b/mobile/openapi/lib/model/system_config_smtp_dto.dart deleted file mode 100644 index a3d14cda63..0000000000 --- a/mobile/openapi/lib/model/system_config_smtp_dto.dart +++ /dev/null @@ -1,126 +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 SystemConfigSmtpDto { - /// Returns a new [SystemConfigSmtpDto] instance. - SystemConfigSmtpDto({ - required this.enabled, - required this.from, - required this.replyTo, - required this.transport, - }); - - /// Whether SMTP email notifications are enabled - bool enabled; - - /// Email address to send from - String from; - - /// Email address for replies - String replyTo; - - SystemConfigSmtpTransportDto transport; - - @override - bool operator ==(Object other) => identical(this, other) || other is SystemConfigSmtpDto && - other.enabled == enabled && - other.from == from && - other.replyTo == replyTo && - other.transport == transport; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (enabled.hashCode) + - (from.hashCode) + - (replyTo.hashCode) + - (transport.hashCode); - - @override - String toString() => 'SystemConfigSmtpDto[enabled=$enabled, from=$from, replyTo=$replyTo, transport=$transport]'; - - Map toJson() { - final json = {}; - json[r'enabled'] = this.enabled; - json[r'from'] = this.from; - json[r'replyTo'] = this.replyTo; - json[r'transport'] = this.transport; - return json; - } - - /// Returns a new [SystemConfigSmtpDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SystemConfigSmtpDto? fromJson(dynamic value) { - upgradeDto(value, "SystemConfigSmtpDto"); - if (value is Map) { - final json = value.cast(); - - return SystemConfigSmtpDto( - enabled: mapValueOfType(json, r'enabled')!, - from: mapValueOfType(json, r'from')!, - replyTo: mapValueOfType(json, r'replyTo')!, - transport: SystemConfigSmtpTransportDto.fromJson(json[r'transport'])!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SystemConfigSmtpDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SystemConfigSmtpDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SystemConfigSmtpDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SystemConfigSmtpDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'enabled', - 'from', - 'replyTo', - 'transport', - }; -} - diff --git a/mobile/openapi/lib/model/system_config_smtp_transport_dto.dart b/mobile/openapi/lib/model/system_config_smtp_transport_dto.dart deleted file mode 100644 index 266e3f3c86..0000000000 --- a/mobile/openapi/lib/model/system_config_smtp_transport_dto.dart +++ /dev/null @@ -1,148 +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 SystemConfigSmtpTransportDto { - /// Returns a new [SystemConfigSmtpTransportDto] instance. - SystemConfigSmtpTransportDto({ - required this.host, - required this.ignoreCert, - required this.password, - required this.port, - required this.secure, - required this.username, - }); - - /// SMTP server hostname - String host; - - /// Whether to ignore SSL certificate errors - bool ignoreCert; - - /// SMTP password - String password; - - /// SMTP server port - /// - /// Minimum value: 0 - /// Maximum value: 65535 - int port; - - /// Whether to use secure connection (TLS/SSL) - bool secure; - - /// SMTP username - String username; - - @override - bool operator ==(Object other) => identical(this, other) || other is SystemConfigSmtpTransportDto && - other.host == host && - other.ignoreCert == ignoreCert && - other.password == password && - other.port == port && - other.secure == secure && - other.username == username; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (host.hashCode) + - (ignoreCert.hashCode) + - (password.hashCode) + - (port.hashCode) + - (secure.hashCode) + - (username.hashCode); - - @override - String toString() => 'SystemConfigSmtpTransportDto[host=$host, ignoreCert=$ignoreCert, password=$password, port=$port, secure=$secure, username=$username]'; - - Map toJson() { - final json = {}; - json[r'host'] = this.host; - json[r'ignoreCert'] = this.ignoreCert; - json[r'password'] = this.password; - json[r'port'] = this.port; - json[r'secure'] = this.secure; - json[r'username'] = this.username; - return json; - } - - /// Returns a new [SystemConfigSmtpTransportDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SystemConfigSmtpTransportDto? fromJson(dynamic value) { - upgradeDto(value, "SystemConfigSmtpTransportDto"); - if (value is Map) { - final json = value.cast(); - - return SystemConfigSmtpTransportDto( - host: mapValueOfType(json, r'host')!, - ignoreCert: mapValueOfType(json, r'ignoreCert')!, - password: mapValueOfType(json, r'password')!, - port: mapValueOfType(json, r'port')!, - secure: mapValueOfType(json, r'secure')!, - username: mapValueOfType(json, r'username')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SystemConfigSmtpTransportDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SystemConfigSmtpTransportDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SystemConfigSmtpTransportDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SystemConfigSmtpTransportDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'host', - 'ignoreCert', - 'password', - 'port', - 'secure', - 'username', - }; -} - diff --git a/mobile/openapi/lib/model/system_config_storage_template_dto.dart b/mobile/openapi/lib/model/system_config_storage_template_dto.dart deleted file mode 100644 index f9f37e48ad..0000000000 --- a/mobile/openapi/lib/model/system_config_storage_template_dto.dart +++ /dev/null @@ -1,118 +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 SystemConfigStorageTemplateDto { - /// Returns a new [SystemConfigStorageTemplateDto] instance. - SystemConfigStorageTemplateDto({ - required this.enabled, - required this.hashVerificationEnabled, - required this.template, - }); - - /// Enabled - bool enabled; - - /// Hash verification enabled - bool hashVerificationEnabled; - - /// Template - String template; - - @override - bool operator ==(Object other) => identical(this, other) || other is SystemConfigStorageTemplateDto && - other.enabled == enabled && - other.hashVerificationEnabled == hashVerificationEnabled && - other.template == template; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (enabled.hashCode) + - (hashVerificationEnabled.hashCode) + - (template.hashCode); - - @override - String toString() => 'SystemConfigStorageTemplateDto[enabled=$enabled, hashVerificationEnabled=$hashVerificationEnabled, template=$template]'; - - Map toJson() { - final json = {}; - json[r'enabled'] = this.enabled; - json[r'hashVerificationEnabled'] = this.hashVerificationEnabled; - json[r'template'] = this.template; - return json; - } - - /// Returns a new [SystemConfigStorageTemplateDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SystemConfigStorageTemplateDto? fromJson(dynamic value) { - upgradeDto(value, "SystemConfigStorageTemplateDto"); - if (value is Map) { - final json = value.cast(); - - return SystemConfigStorageTemplateDto( - enabled: mapValueOfType(json, r'enabled')!, - hashVerificationEnabled: mapValueOfType(json, r'hashVerificationEnabled')!, - template: mapValueOfType(json, r'template')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SystemConfigStorageTemplateDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SystemConfigStorageTemplateDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SystemConfigStorageTemplateDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SystemConfigStorageTemplateDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'enabled', - 'hashVerificationEnabled', - 'template', - }; -} - diff --git a/mobile/openapi/lib/model/system_config_template_emails_dto.dart b/mobile/openapi/lib/model/system_config_template_emails_dto.dart deleted file mode 100644 index d29ca1fac3..0000000000 --- a/mobile/openapi/lib/model/system_config_template_emails_dto.dart +++ /dev/null @@ -1,118 +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 SystemConfigTemplateEmailsDto { - /// Returns a new [SystemConfigTemplateEmailsDto] instance. - SystemConfigTemplateEmailsDto({ - required this.albumInviteTemplate, - required this.albumUpdateTemplate, - required this.welcomeTemplate, - }); - - /// Album invite template - String albumInviteTemplate; - - /// Album update template - String albumUpdateTemplate; - - /// Welcome template - String welcomeTemplate; - - @override - bool operator ==(Object other) => identical(this, other) || other is SystemConfigTemplateEmailsDto && - other.albumInviteTemplate == albumInviteTemplate && - other.albumUpdateTemplate == albumUpdateTemplate && - other.welcomeTemplate == welcomeTemplate; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (albumInviteTemplate.hashCode) + - (albumUpdateTemplate.hashCode) + - (welcomeTemplate.hashCode); - - @override - String toString() => 'SystemConfigTemplateEmailsDto[albumInviteTemplate=$albumInviteTemplate, albumUpdateTemplate=$albumUpdateTemplate, welcomeTemplate=$welcomeTemplate]'; - - Map toJson() { - final json = {}; - json[r'albumInviteTemplate'] = this.albumInviteTemplate; - json[r'albumUpdateTemplate'] = this.albumUpdateTemplate; - json[r'welcomeTemplate'] = this.welcomeTemplate; - return json; - } - - /// Returns a new [SystemConfigTemplateEmailsDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SystemConfigTemplateEmailsDto? fromJson(dynamic value) { - upgradeDto(value, "SystemConfigTemplateEmailsDto"); - if (value is Map) { - final json = value.cast(); - - return SystemConfigTemplateEmailsDto( - albumInviteTemplate: mapValueOfType(json, r'albumInviteTemplate')!, - albumUpdateTemplate: mapValueOfType(json, r'albumUpdateTemplate')!, - welcomeTemplate: mapValueOfType(json, r'welcomeTemplate')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SystemConfigTemplateEmailsDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SystemConfigTemplateEmailsDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SystemConfigTemplateEmailsDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SystemConfigTemplateEmailsDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'albumInviteTemplate', - 'albumUpdateTemplate', - 'welcomeTemplate', - }; -} - diff --git a/mobile/openapi/lib/model/system_config_template_storage_option_dto.dart b/mobile/openapi/lib/model/system_config_template_storage_option_dto.dart deleted file mode 100644 index 6f81513039..0000000000 --- a/mobile/openapi/lib/model/system_config_template_storage_option_dto.dart +++ /dev/null @@ -1,179 +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 SystemConfigTemplateStorageOptionDto { - /// Returns a new [SystemConfigTemplateStorageOptionDto] instance. - SystemConfigTemplateStorageOptionDto({ - this.dayOptions = const [], - this.hourOptions = const [], - this.minuteOptions = const [], - this.monthOptions = const [], - this.presetOptions = const [], - this.secondOptions = const [], - this.weekOptions = const [], - this.yearOptions = const [], - }); - - /// Available day format options for storage template - List dayOptions; - - /// Available hour format options for storage template - List hourOptions; - - /// Available minute format options for storage template - List minuteOptions; - - /// Available month format options for storage template - List monthOptions; - - /// Available preset template options - List presetOptions; - - /// Available second format options for storage template - List secondOptions; - - /// Available week format options for storage template - List weekOptions; - - /// Available year format options for storage template - List yearOptions; - - @override - bool operator ==(Object other) => identical(this, other) || other is SystemConfigTemplateStorageOptionDto && - _deepEquality.equals(other.dayOptions, dayOptions) && - _deepEquality.equals(other.hourOptions, hourOptions) && - _deepEquality.equals(other.minuteOptions, minuteOptions) && - _deepEquality.equals(other.monthOptions, monthOptions) && - _deepEquality.equals(other.presetOptions, presetOptions) && - _deepEquality.equals(other.secondOptions, secondOptions) && - _deepEquality.equals(other.weekOptions, weekOptions) && - _deepEquality.equals(other.yearOptions, yearOptions); - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (dayOptions.hashCode) + - (hourOptions.hashCode) + - (minuteOptions.hashCode) + - (monthOptions.hashCode) + - (presetOptions.hashCode) + - (secondOptions.hashCode) + - (weekOptions.hashCode) + - (yearOptions.hashCode); - - @override - String toString() => 'SystemConfigTemplateStorageOptionDto[dayOptions=$dayOptions, hourOptions=$hourOptions, minuteOptions=$minuteOptions, monthOptions=$monthOptions, presetOptions=$presetOptions, secondOptions=$secondOptions, weekOptions=$weekOptions, yearOptions=$yearOptions]'; - - Map toJson() { - final json = {}; - json[r'dayOptions'] = this.dayOptions; - json[r'hourOptions'] = this.hourOptions; - json[r'minuteOptions'] = this.minuteOptions; - json[r'monthOptions'] = this.monthOptions; - json[r'presetOptions'] = this.presetOptions; - json[r'secondOptions'] = this.secondOptions; - json[r'weekOptions'] = this.weekOptions; - json[r'yearOptions'] = this.yearOptions; - return json; - } - - /// Returns a new [SystemConfigTemplateStorageOptionDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SystemConfigTemplateStorageOptionDto? fromJson(dynamic value) { - upgradeDto(value, "SystemConfigTemplateStorageOptionDto"); - if (value is Map) { - final json = value.cast(); - - return SystemConfigTemplateStorageOptionDto( - dayOptions: json[r'dayOptions'] is Iterable - ? (json[r'dayOptions'] as Iterable).cast().toList(growable: false) - : const [], - hourOptions: json[r'hourOptions'] is Iterable - ? (json[r'hourOptions'] as Iterable).cast().toList(growable: false) - : const [], - minuteOptions: json[r'minuteOptions'] is Iterable - ? (json[r'minuteOptions'] as Iterable).cast().toList(growable: false) - : const [], - monthOptions: json[r'monthOptions'] is Iterable - ? (json[r'monthOptions'] as Iterable).cast().toList(growable: false) - : const [], - presetOptions: json[r'presetOptions'] is Iterable - ? (json[r'presetOptions'] as Iterable).cast().toList(growable: false) - : const [], - secondOptions: json[r'secondOptions'] is Iterable - ? (json[r'secondOptions'] as Iterable).cast().toList(growable: false) - : const [], - weekOptions: json[r'weekOptions'] is Iterable - ? (json[r'weekOptions'] as Iterable).cast().toList(growable: false) - : const [], - yearOptions: json[r'yearOptions'] is Iterable - ? (json[r'yearOptions'] as Iterable).cast().toList(growable: false) - : const [], - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SystemConfigTemplateStorageOptionDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SystemConfigTemplateStorageOptionDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SystemConfigTemplateStorageOptionDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SystemConfigTemplateStorageOptionDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'dayOptions', - 'hourOptions', - 'minuteOptions', - 'monthOptions', - 'presetOptions', - 'secondOptions', - 'weekOptions', - 'yearOptions', - }; -} - diff --git a/mobile/openapi/lib/model/system_config_templates_dto.dart b/mobile/openapi/lib/model/system_config_templates_dto.dart deleted file mode 100644 index a5e8834978..0000000000 --- a/mobile/openapi/lib/model/system_config_templates_dto.dart +++ /dev/null @@ -1,99 +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 SystemConfigTemplatesDto { - /// Returns a new [SystemConfigTemplatesDto] instance. - SystemConfigTemplatesDto({ - required this.email, - }); - - SystemConfigTemplateEmailsDto email; - - @override - bool operator ==(Object other) => identical(this, other) || other is SystemConfigTemplatesDto && - other.email == email; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (email.hashCode); - - @override - String toString() => 'SystemConfigTemplatesDto[email=$email]'; - - Map toJson() { - final json = {}; - json[r'email'] = this.email; - return json; - } - - /// Returns a new [SystemConfigTemplatesDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SystemConfigTemplatesDto? fromJson(dynamic value) { - upgradeDto(value, "SystemConfigTemplatesDto"); - if (value is Map) { - final json = value.cast(); - - return SystemConfigTemplatesDto( - email: SystemConfigTemplateEmailsDto.fromJson(json[r'email'])!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SystemConfigTemplatesDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SystemConfigTemplatesDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SystemConfigTemplatesDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SystemConfigTemplatesDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'email', - }; -} - diff --git a/mobile/openapi/lib/model/system_config_theme_dto.dart b/mobile/openapi/lib/model/system_config_theme_dto.dart deleted file mode 100644 index fca38f71fb..0000000000 --- a/mobile/openapi/lib/model/system_config_theme_dto.dart +++ /dev/null @@ -1,100 +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 SystemConfigThemeDto { - /// Returns a new [SystemConfigThemeDto] instance. - SystemConfigThemeDto({ - required this.customCss, - }); - - /// Custom CSS for theming - String customCss; - - @override - bool operator ==(Object other) => identical(this, other) || other is SystemConfigThemeDto && - other.customCss == customCss; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (customCss.hashCode); - - @override - String toString() => 'SystemConfigThemeDto[customCss=$customCss]'; - - Map toJson() { - final json = {}; - json[r'customCss'] = this.customCss; - return json; - } - - /// Returns a new [SystemConfigThemeDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SystemConfigThemeDto? fromJson(dynamic value) { - upgradeDto(value, "SystemConfigThemeDto"); - if (value is Map) { - final json = value.cast(); - - return SystemConfigThemeDto( - customCss: mapValueOfType(json, r'customCss')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SystemConfigThemeDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SystemConfigThemeDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SystemConfigThemeDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SystemConfigThemeDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'customCss', - }; -} - diff --git a/mobile/openapi/lib/model/system_config_trash_dto.dart b/mobile/openapi/lib/model/system_config_trash_dto.dart deleted file mode 100644 index 790710751f..0000000000 --- a/mobile/openapi/lib/model/system_config_trash_dto.dart +++ /dev/null @@ -1,112 +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 SystemConfigTrashDto { - /// Returns a new [SystemConfigTrashDto] instance. - SystemConfigTrashDto({ - required this.days, - required this.enabled, - }); - - /// Days - /// - /// Minimum value: 0 - /// Maximum value: 9007199254740991 - int days; - - /// Enabled - bool enabled; - - @override - bool operator ==(Object other) => identical(this, other) || other is SystemConfigTrashDto && - other.days == days && - other.enabled == enabled; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (days.hashCode) + - (enabled.hashCode); - - @override - String toString() => 'SystemConfigTrashDto[days=$days, enabled=$enabled]'; - - Map toJson() { - final json = {}; - json[r'days'] = this.days; - json[r'enabled'] = this.enabled; - return json; - } - - /// Returns a new [SystemConfigTrashDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SystemConfigTrashDto? fromJson(dynamic value) { - upgradeDto(value, "SystemConfigTrashDto"); - if (value is Map) { - final json = value.cast(); - - return SystemConfigTrashDto( - days: mapValueOfType(json, r'days')!, - enabled: mapValueOfType(json, r'enabled')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SystemConfigTrashDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SystemConfigTrashDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SystemConfigTrashDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SystemConfigTrashDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'days', - 'enabled', - }; -} - diff --git a/mobile/openapi/lib/model/system_config_user_dto.dart b/mobile/openapi/lib/model/system_config_user_dto.dart deleted file mode 100644 index dc553e7369..0000000000 --- a/mobile/openapi/lib/model/system_config_user_dto.dart +++ /dev/null @@ -1,103 +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 SystemConfigUserDto { - /// Returns a new [SystemConfigUserDto] instance. - SystemConfigUserDto({ - required this.deleteDelay, - }); - - /// Delete delay - /// - /// Minimum value: 1 - /// Maximum value: 9007199254740991 - int deleteDelay; - - @override - bool operator ==(Object other) => identical(this, other) || other is SystemConfigUserDto && - other.deleteDelay == deleteDelay; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (deleteDelay.hashCode); - - @override - String toString() => 'SystemConfigUserDto[deleteDelay=$deleteDelay]'; - - Map toJson() { - final json = {}; - json[r'deleteDelay'] = this.deleteDelay; - return json; - } - - /// Returns a new [SystemConfigUserDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SystemConfigUserDto? fromJson(dynamic value) { - upgradeDto(value, "SystemConfigUserDto"); - if (value is Map) { - final json = value.cast(); - - return SystemConfigUserDto( - deleteDelay: mapValueOfType(json, r'deleteDelay')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SystemConfigUserDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SystemConfigUserDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SystemConfigUserDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SystemConfigUserDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'deleteDelay', - }; -} - diff --git a/mobile/openapi/lib/model/tag_bulk_assets_dto.dart b/mobile/openapi/lib/model/tag_bulk_assets_dto.dart deleted file mode 100644 index 16abc3bcdc..0000000000 --- a/mobile/openapi/lib/model/tag_bulk_assets_dto.dart +++ /dev/null @@ -1,113 +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 TagBulkAssetsDto { - /// Returns a new [TagBulkAssetsDto] instance. - TagBulkAssetsDto({ - this.assetIds = const [], - this.tagIds = const [], - }); - - /// Asset IDs - List assetIds; - - /// Tag IDs - List tagIds; - - @override - bool operator ==(Object other) => identical(this, other) || other is TagBulkAssetsDto && - _deepEquality.equals(other.assetIds, assetIds) && - _deepEquality.equals(other.tagIds, tagIds); - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (assetIds.hashCode) + - (tagIds.hashCode); - - @override - String toString() => 'TagBulkAssetsDto[assetIds=$assetIds, tagIds=$tagIds]'; - - Map toJson() { - final json = {}; - json[r'assetIds'] = this.assetIds; - json[r'tagIds'] = this.tagIds; - return json; - } - - /// Returns a new [TagBulkAssetsDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static TagBulkAssetsDto? fromJson(dynamic value) { - upgradeDto(value, "TagBulkAssetsDto"); - if (value is Map) { - final json = value.cast(); - - return TagBulkAssetsDto( - assetIds: json[r'assetIds'] is Iterable - ? (json[r'assetIds'] as Iterable).cast().toList(growable: false) - : const [], - tagIds: json[r'tagIds'] is Iterable - ? (json[r'tagIds'] as Iterable).cast().toList(growable: false) - : const [], - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = TagBulkAssetsDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = TagBulkAssetsDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of TagBulkAssetsDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = TagBulkAssetsDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'assetIds', - 'tagIds', - }; -} - diff --git a/mobile/openapi/lib/model/tag_bulk_assets_response_dto.dart b/mobile/openapi/lib/model/tag_bulk_assets_response_dto.dart deleted file mode 100644 index 4d689f01a1..0000000000 --- a/mobile/openapi/lib/model/tag_bulk_assets_response_dto.dart +++ /dev/null @@ -1,103 +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 TagBulkAssetsResponseDto { - /// Returns a new [TagBulkAssetsResponseDto] instance. - TagBulkAssetsResponseDto({ - required this.count, - }); - - /// Number of assets tagged - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int count; - - @override - bool operator ==(Object other) => identical(this, other) || other is TagBulkAssetsResponseDto && - other.count == count; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (count.hashCode); - - @override - String toString() => 'TagBulkAssetsResponseDto[count=$count]'; - - Map toJson() { - final json = {}; - json[r'count'] = this.count; - return json; - } - - /// Returns a new [TagBulkAssetsResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static TagBulkAssetsResponseDto? fromJson(dynamic value) { - upgradeDto(value, "TagBulkAssetsResponseDto"); - if (value is Map) { - final json = value.cast(); - - return TagBulkAssetsResponseDto( - count: mapValueOfType(json, r'count')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = TagBulkAssetsResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = TagBulkAssetsResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of TagBulkAssetsResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = TagBulkAssetsResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'count', - }; -} - diff --git a/mobile/openapi/lib/model/tag_create_dto.dart b/mobile/openapi/lib/model/tag_create_dto.dart deleted file mode 100644 index e46f3fc8b6..0000000000 --- a/mobile/openapi/lib/model/tag_create_dto.dart +++ /dev/null @@ -1,122 +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 TagCreateDto { - /// Returns a new [TagCreateDto] instance. - TagCreateDto({ - this.color = const Optional.absent(), - required this.name, - this.parentId = const Optional.absent(), - }); - - /// Tag color (hex) - Optional color; - - /// Tag name - String name; - - /// Parent tag ID - Optional parentId; - - @override - bool operator ==(Object other) => identical(this, other) || other is TagCreateDto && - other.color == color && - other.name == name && - other.parentId == parentId; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (color == null ? 0 : color!.hashCode) + - (name.hashCode) + - (parentId == null ? 0 : parentId!.hashCode); - - @override - String toString() => 'TagCreateDto[color=$color, name=$name, parentId=$parentId]'; - - Map toJson() { - final json = {}; - if (this.color.isPresent) { - final value = this.color.value; - json[r'color'] = value; - } - json[r'name'] = this.name; - if (this.parentId.isPresent) { - final value = this.parentId.value; - json[r'parentId'] = value; - } - return json; - } - - /// Returns a new [TagCreateDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static TagCreateDto? fromJson(dynamic value) { - upgradeDto(value, "TagCreateDto"); - if (value is Map) { - final json = value.cast(); - - return TagCreateDto( - color: json.containsKey(r'color') ? Optional.present(mapValueOfType(json, r'color')) : const Optional.absent(), - name: mapValueOfType(json, r'name')!, - parentId: json.containsKey(r'parentId') ? Optional.present(mapValueOfType(json, r'parentId')) : const Optional.absent(), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = TagCreateDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = TagCreateDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of TagCreateDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = TagCreateDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'name', - }; -} - diff --git a/mobile/openapi/lib/model/tag_response_dto.dart b/mobile/openapi/lib/model/tag_response_dto.dart deleted file mode 100644 index 79a89f6d33..0000000000 --- a/mobile/openapi/lib/model/tag_response_dto.dart +++ /dev/null @@ -1,170 +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 TagResponseDto { - /// Returns a new [TagResponseDto] instance. - TagResponseDto({ - this.color = const Optional.absent(), - required this.createdAt, - required this.id, - required this.name, - this.parentId = const Optional.absent(), - required this.updatedAt, - required this.value, - }); - - /// Tag color (hex) - /// - /// 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. - /// - Optional color; - - /// Creation date - DateTime createdAt; - - /// Tag ID - String id; - - /// Tag name - String name; - - /// Parent tag ID - /// - /// 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. - /// - Optional parentId; - - /// Last update date - DateTime updatedAt; - - /// Tag value (full path) - String value; - - @override - bool operator ==(Object other) => identical(this, other) || other is TagResponseDto && - other.color == color && - other.createdAt == createdAt && - other.id == id && - other.name == name && - other.parentId == parentId && - other.updatedAt == updatedAt && - other.value == value; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (color == null ? 0 : color!.hashCode) + - (createdAt.hashCode) + - (id.hashCode) + - (name.hashCode) + - (parentId == null ? 0 : parentId!.hashCode) + - (updatedAt.hashCode) + - (value.hashCode); - - @override - String toString() => 'TagResponseDto[color=$color, createdAt=$createdAt, id=$id, name=$name, parentId=$parentId, updatedAt=$updatedAt, value=$value]'; - - Map toJson() { - final json = {}; - if (this.color.isPresent) { - final value = this.color.value; - json[r'color'] = value; - } - json[r'createdAt'] = this.createdAt.toUtc().toIso8601String(); - json[r'id'] = this.id; - json[r'name'] = this.name; - if (this.parentId.isPresent) { - final value = this.parentId.value; - json[r'parentId'] = value; - } - json[r'updatedAt'] = this.updatedAt.toUtc().toIso8601String(); - json[r'value'] = this.value; - return json; - } - - /// Returns a new [TagResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static TagResponseDto? fromJson(dynamic value) { - upgradeDto(value, "TagResponseDto"); - if (value is Map) { - final json = value.cast(); - - return TagResponseDto( - color: json.containsKey(r'color') ? Optional.present(mapValueOfType(json, r'color')) : const Optional.absent(), - createdAt: mapDateTime(json, r'createdAt', r'')!, - id: mapValueOfType(json, r'id')!, - name: mapValueOfType(json, r'name')!, - parentId: json.containsKey(r'parentId') ? Optional.present(mapValueOfType(json, r'parentId')) : const Optional.absent(), - updatedAt: mapDateTime(json, r'updatedAt', r'')!, - value: mapValueOfType(json, r'value')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = TagResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = TagResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of TagResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = TagResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'createdAt', - 'id', - 'name', - 'updatedAt', - 'value', - }; -} - diff --git a/mobile/openapi/lib/model/tag_update_dto.dart b/mobile/openapi/lib/model/tag_update_dto.dart deleted file mode 100644 index d66bb9097e..0000000000 --- a/mobile/openapi/lib/model/tag_update_dto.dart +++ /dev/null @@ -1,102 +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 TagUpdateDto { - /// Returns a new [TagUpdateDto] instance. - TagUpdateDto({ - this.color = const Optional.absent(), - }); - - /// Tag color (hex) - Optional color; - - @override - bool operator ==(Object other) => identical(this, other) || other is TagUpdateDto && - other.color == color; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (color == null ? 0 : color!.hashCode); - - @override - String toString() => 'TagUpdateDto[color=$color]'; - - Map toJson() { - final json = {}; - if (this.color.isPresent) { - final value = this.color.value; - json[r'color'] = value; - } - return json; - } - - /// Returns a new [TagUpdateDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static TagUpdateDto? fromJson(dynamic value) { - upgradeDto(value, "TagUpdateDto"); - if (value is Map) { - final json = value.cast(); - - return TagUpdateDto( - color: json.containsKey(r'color') ? Optional.present(mapValueOfType(json, r'color')) : const Optional.absent(), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = TagUpdateDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = TagUpdateDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of TagUpdateDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = TagUpdateDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - }; -} - diff --git a/mobile/openapi/lib/model/tag_upsert_dto.dart b/mobile/openapi/lib/model/tag_upsert_dto.dart deleted file mode 100644 index 3581ef1e8f..0000000000 --- a/mobile/openapi/lib/model/tag_upsert_dto.dart +++ /dev/null @@ -1,102 +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 TagUpsertDto { - /// Returns a new [TagUpsertDto] instance. - TagUpsertDto({ - this.tags = const [], - }); - - /// Tag names to upsert - List tags; - - @override - bool operator ==(Object other) => identical(this, other) || other is TagUpsertDto && - _deepEquality.equals(other.tags, tags); - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (tags.hashCode); - - @override - String toString() => 'TagUpsertDto[tags=$tags]'; - - Map toJson() { - final json = {}; - json[r'tags'] = this.tags; - return json; - } - - /// Returns a new [TagUpsertDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static TagUpsertDto? fromJson(dynamic value) { - upgradeDto(value, "TagUpsertDto"); - if (value is Map) { - final json = value.cast(); - - return TagUpsertDto( - tags: json[r'tags'] is Iterable - ? (json[r'tags'] as Iterable).cast().toList(growable: false) - : const [], - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = TagUpsertDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = TagUpsertDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of TagUpsertDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = TagUpsertDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'tags', - }; -} - diff --git a/mobile/openapi/lib/model/tags_response.dart b/mobile/openapi/lib/model/tags_response.dart deleted file mode 100644 index 8a3ac17474..0000000000 --- a/mobile/openapi/lib/model/tags_response.dart +++ /dev/null @@ -1,109 +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 TagsResponse { - /// Returns a new [TagsResponse] instance. - TagsResponse({ - required this.enabled, - required this.sidebarWeb, - }); - - /// Whether tags are enabled - bool enabled; - - /// Whether tags appear in web sidebar - bool sidebarWeb; - - @override - bool operator ==(Object other) => identical(this, other) || other is TagsResponse && - other.enabled == enabled && - other.sidebarWeb == sidebarWeb; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (enabled.hashCode) + - (sidebarWeb.hashCode); - - @override - String toString() => 'TagsResponse[enabled=$enabled, sidebarWeb=$sidebarWeb]'; - - Map toJson() { - final json = {}; - json[r'enabled'] = this.enabled; - json[r'sidebarWeb'] = this.sidebarWeb; - return json; - } - - /// Returns a new [TagsResponse] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static TagsResponse? fromJson(dynamic value) { - upgradeDto(value, "TagsResponse"); - if (value is Map) { - final json = value.cast(); - - return TagsResponse( - enabled: mapValueOfType(json, r'enabled')!, - sidebarWeb: mapValueOfType(json, r'sidebarWeb')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = TagsResponse.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = TagsResponse.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of TagsResponse-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = TagsResponse.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'enabled', - 'sidebarWeb', - }; -} - diff --git a/mobile/openapi/lib/model/tags_update.dart b/mobile/openapi/lib/model/tags_update.dart deleted file mode 100644 index 9a9e78f1d3..0000000000 --- a/mobile/openapi/lib/model/tags_update.dart +++ /dev/null @@ -1,125 +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 TagsUpdate { - /// Returns a new [TagsUpdate] instance. - TagsUpdate({ - this.enabled = const Optional.absent(), - this.sidebarWeb = const Optional.absent(), - }); - - /// Whether tags are enabled - /// - /// 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. - /// - Optional enabled; - - /// Whether tags appear in web sidebar - /// - /// 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. - /// - Optional sidebarWeb; - - @override - bool operator ==(Object other) => identical(this, other) || other is TagsUpdate && - other.enabled == enabled && - other.sidebarWeb == sidebarWeb; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (enabled == null ? 0 : enabled!.hashCode) + - (sidebarWeb == null ? 0 : sidebarWeb!.hashCode); - - @override - String toString() => 'TagsUpdate[enabled=$enabled, sidebarWeb=$sidebarWeb]'; - - Map toJson() { - final json = {}; - if (this.enabled.isPresent) { - final value = this.enabled.value; - json[r'enabled'] = value; - } - if (this.sidebarWeb.isPresent) { - final value = this.sidebarWeb.value; - json[r'sidebarWeb'] = value; - } - return json; - } - - /// Returns a new [TagsUpdate] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static TagsUpdate? fromJson(dynamic value) { - upgradeDto(value, "TagsUpdate"); - if (value is Map) { - final json = value.cast(); - - return TagsUpdate( - enabled: json.containsKey(r'enabled') ? Optional.present(mapValueOfType(json, r'enabled')) : const Optional.absent(), - sidebarWeb: json.containsKey(r'sidebarWeb') ? Optional.present(mapValueOfType(json, r'sidebarWeb')) : const Optional.absent(), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = TagsUpdate.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = TagsUpdate.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of TagsUpdate-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = TagsUpdate.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - }; -} - diff --git a/mobile/openapi/lib/model/template_dto.dart b/mobile/openapi/lib/model/template_dto.dart deleted file mode 100644 index b1eab848ed..0000000000 --- a/mobile/openapi/lib/model/template_dto.dart +++ /dev/null @@ -1,100 +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 TemplateDto { - /// Returns a new [TemplateDto] instance. - TemplateDto({ - required this.template, - }); - - /// Template name - String template; - - @override - bool operator ==(Object other) => identical(this, other) || other is TemplateDto && - other.template == template; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (template.hashCode); - - @override - String toString() => 'TemplateDto[template=$template]'; - - Map toJson() { - final json = {}; - json[r'template'] = this.template; - return json; - } - - /// Returns a new [TemplateDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static TemplateDto? fromJson(dynamic value) { - upgradeDto(value, "TemplateDto"); - if (value is Map) { - final json = value.cast(); - - return TemplateDto( - template: mapValueOfType(json, r'template')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = TemplateDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = TemplateDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of TemplateDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = TemplateDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'template', - }; -} - diff --git a/mobile/openapi/lib/model/template_response_dto.dart b/mobile/openapi/lib/model/template_response_dto.dart deleted file mode 100644 index f19c1eae7d..0000000000 --- a/mobile/openapi/lib/model/template_response_dto.dart +++ /dev/null @@ -1,109 +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 TemplateResponseDto { - /// Returns a new [TemplateResponseDto] instance. - TemplateResponseDto({ - required this.html, - required this.name, - }); - - /// Template HTML content - String html; - - /// Template name - String name; - - @override - bool operator ==(Object other) => identical(this, other) || other is TemplateResponseDto && - other.html == html && - other.name == name; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (html.hashCode) + - (name.hashCode); - - @override - String toString() => 'TemplateResponseDto[html=$html, name=$name]'; - - Map toJson() { - final json = {}; - json[r'html'] = this.html; - json[r'name'] = this.name; - return json; - } - - /// Returns a new [TemplateResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static TemplateResponseDto? fromJson(dynamic value) { - upgradeDto(value, "TemplateResponseDto"); - if (value is Map) { - final json = value.cast(); - - return TemplateResponseDto( - html: mapValueOfType(json, r'html')!, - name: mapValueOfType(json, r'name')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = TemplateResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = TemplateResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of TemplateResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = TemplateResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'html', - 'name', - }; -} - diff --git a/mobile/openapi/lib/model/test_email_response_dto.dart b/mobile/openapi/lib/model/test_email_response_dto.dart deleted file mode 100644 index e14783f3c4..0000000000 --- a/mobile/openapi/lib/model/test_email_response_dto.dart +++ /dev/null @@ -1,100 +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 TestEmailResponseDto { - /// Returns a new [TestEmailResponseDto] instance. - TestEmailResponseDto({ - required this.messageId, - }); - - /// Email message ID - String messageId; - - @override - bool operator ==(Object other) => identical(this, other) || other is TestEmailResponseDto && - other.messageId == messageId; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (messageId.hashCode); - - @override - String toString() => 'TestEmailResponseDto[messageId=$messageId]'; - - Map toJson() { - final json = {}; - json[r'messageId'] = this.messageId; - return json; - } - - /// Returns a new [TestEmailResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static TestEmailResponseDto? fromJson(dynamic value) { - upgradeDto(value, "TestEmailResponseDto"); - if (value is Map) { - final json = value.cast(); - - return TestEmailResponseDto( - messageId: mapValueOfType(json, r'messageId')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = TestEmailResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = TestEmailResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of TestEmailResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = TestEmailResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'messageId', - }; -} - diff --git a/mobile/openapi/lib/model/time_bucket_asset_response_dto.dart b/mobile/openapi/lib/model/time_bucket_asset_response_dto.dart deleted file mode 100644 index 154ca97504..0000000000 --- a/mobile/openapi/lib/model/time_bucket_asset_response_dto.dart +++ /dev/null @@ -1,310 +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 TimeBucketAssetResponseDto { - /// Returns a new [TimeBucketAssetResponseDto] instance. - TimeBucketAssetResponseDto({ - this.city = const Optional.present(const []), - this.country = const Optional.present(const []), - this.createdAt = const [], - this.duration = const [], - this.fileCreatedAt = const [], - this.id = const [], - this.isFavorite = const [], - this.isImage = const [], - this.isTrashed = const [], - this.latitude = const Optional.present(const []), - this.livePhotoVideoId = const [], - this.localOffsetHours = const [], - this.longitude = const Optional.present(const []), - this.ownerId = const [], - this.projectionType = const [], - this.ratio = const [], - this.stack = const Optional.present(const []), - this.thumbhash = const [], - this.visibility = const [], - }); - - /// Array of city names extracted from EXIF GPS data - Optional?> city; - - /// Array of country names extracted from EXIF GPS data - Optional?> country; - - /// Array of UTC timestamps when each asset was originally uploaded to Immich - List createdAt; - - /// Array of video/gif durations in milliseconds (null for static images) - List duration; - - /// Array of file creation timestamps in UTC - List fileCreatedAt; - - /// Array of asset IDs in the time bucket - List id; - - /// Array indicating whether each asset is favorited - List isFavorite; - - /// Array indicating whether each asset is an image (false for videos) - List isImage; - - /// Array indicating whether each asset is in the trash - List isTrashed; - - /// Array of latitude coordinates extracted from EXIF GPS data - Optional?> latitude; - - /// Array of live photo video asset IDs (null for non-live photos) - List livePhotoVideoId; - - /// Array of UTC offset hours at the time each photo was taken. Positive values are east of UTC, negative values are west of UTC. Values may be fractional (e.g., 5.5 for +05:30, -9.75 for -09:45). Applying this offset to 'fileCreatedAt' will give you the time the photo was taken from the photographer's perspective. - List localOffsetHours; - - /// Array of longitude coordinates extracted from EXIF GPS data - Optional?> longitude; - - /// Array of owner IDs for each asset - List ownerId; - - /// Array of projection types for 360° content (e.g., \"EQUIRECTANGULAR\", \"CUBEFACE\", \"CYLINDRICAL\") - List projectionType; - - /// Array of aspect ratios (width/height) for each asset - List ratio; - - /// Array of stack information as [stackId, assetCount] tuples (null for non-stacked assets) - Optional?>?> stack; - - /// Array of BlurHash strings for generating asset previews (base64 encoded) - List thumbhash; - - /// Array of visibility statuses for each asset (e.g., ARCHIVE, TIMELINE, HIDDEN, LOCKED) - List visibility; - - @override - bool operator ==(Object other) => identical(this, other) || other is TimeBucketAssetResponseDto && - _deepEquality.equals(other.city, city) && - _deepEquality.equals(other.country, country) && - _deepEquality.equals(other.createdAt, createdAt) && - _deepEquality.equals(other.duration, duration) && - _deepEquality.equals(other.fileCreatedAt, fileCreatedAt) && - _deepEquality.equals(other.id, id) && - _deepEquality.equals(other.isFavorite, isFavorite) && - _deepEquality.equals(other.isImage, isImage) && - _deepEquality.equals(other.isTrashed, isTrashed) && - _deepEquality.equals(other.latitude, latitude) && - _deepEquality.equals(other.livePhotoVideoId, livePhotoVideoId) && - _deepEquality.equals(other.localOffsetHours, localOffsetHours) && - _deepEquality.equals(other.longitude, longitude) && - _deepEquality.equals(other.ownerId, ownerId) && - _deepEquality.equals(other.projectionType, projectionType) && - _deepEquality.equals(other.ratio, ratio) && - _deepEquality.equals(other.stack, stack) && - _deepEquality.equals(other.thumbhash, thumbhash) && - _deepEquality.equals(other.visibility, visibility); - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (city.hashCode) + - (country.hashCode) + - (createdAt.hashCode) + - (duration.hashCode) + - (fileCreatedAt.hashCode) + - (id.hashCode) + - (isFavorite.hashCode) + - (isImage.hashCode) + - (isTrashed.hashCode) + - (latitude.hashCode) + - (livePhotoVideoId.hashCode) + - (localOffsetHours.hashCode) + - (longitude.hashCode) + - (ownerId.hashCode) + - (projectionType.hashCode) + - (ratio.hashCode) + - (stack.hashCode) + - (thumbhash.hashCode) + - (visibility.hashCode); - - @override - String toString() => 'TimeBucketAssetResponseDto[city=$city, country=$country, createdAt=$createdAt, duration=$duration, fileCreatedAt=$fileCreatedAt, id=$id, isFavorite=$isFavorite, isImage=$isImage, isTrashed=$isTrashed, latitude=$latitude, livePhotoVideoId=$livePhotoVideoId, localOffsetHours=$localOffsetHours, longitude=$longitude, ownerId=$ownerId, projectionType=$projectionType, ratio=$ratio, stack=$stack, thumbhash=$thumbhash, visibility=$visibility]'; - - Map toJson() { - final json = {}; - if (this.city.isPresent) { - final value = this.city.value; - json[r'city'] = value; - } - if (this.country.isPresent) { - final value = this.country.value; - json[r'country'] = value; - } - json[r'createdAt'] = this.createdAt; - json[r'duration'] = this.duration; - json[r'fileCreatedAt'] = this.fileCreatedAt; - json[r'id'] = this.id; - json[r'isFavorite'] = this.isFavorite; - json[r'isImage'] = this.isImage; - json[r'isTrashed'] = this.isTrashed; - if (this.latitude.isPresent) { - final value = this.latitude.value; - json[r'latitude'] = value; - } - json[r'livePhotoVideoId'] = this.livePhotoVideoId; - json[r'localOffsetHours'] = this.localOffsetHours; - if (this.longitude.isPresent) { - final value = this.longitude.value; - json[r'longitude'] = value; - } - json[r'ownerId'] = this.ownerId; - json[r'projectionType'] = this.projectionType; - json[r'ratio'] = this.ratio; - if (this.stack.isPresent) { - final value = this.stack.value; - json[r'stack'] = value; - } - json[r'thumbhash'] = this.thumbhash; - json[r'visibility'] = this.visibility; - return json; - } - - /// Returns a new [TimeBucketAssetResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static TimeBucketAssetResponseDto? fromJson(dynamic value) { - upgradeDto(value, "TimeBucketAssetResponseDto"); - if (value is Map) { - final json = value.cast(); - - return TimeBucketAssetResponseDto( - city: json.containsKey(r'city') ? Optional.present(json[r'city'] is Iterable - ? (json[r'city'] as Iterable).cast().toList(growable: false) - : const []) : const Optional.absent(), - country: json.containsKey(r'country') ? Optional.present(json[r'country'] is Iterable - ? (json[r'country'] as Iterable).cast().toList(growable: false) - : const []) : const Optional.absent(), - createdAt: json[r'createdAt'] is Iterable - ? (json[r'createdAt'] as Iterable).cast().toList(growable: false) - : const [], - duration: json[r'duration'] is Iterable - ? (json[r'duration'] as Iterable).cast().toList(growable: false) - : const [], - fileCreatedAt: json[r'fileCreatedAt'] is Iterable - ? (json[r'fileCreatedAt'] as Iterable).cast().toList(growable: false) - : const [], - id: json[r'id'] is Iterable - ? (json[r'id'] as Iterable).cast().toList(growable: false) - : const [], - isFavorite: json[r'isFavorite'] is Iterable - ? (json[r'isFavorite'] as Iterable).cast().toList(growable: false) - : const [], - isImage: json[r'isImage'] is Iterable - ? (json[r'isImage'] as Iterable).cast().toList(growable: false) - : const [], - isTrashed: json[r'isTrashed'] is Iterable - ? (json[r'isTrashed'] as Iterable).cast().toList(growable: false) - : const [], - latitude: json.containsKey(r'latitude') ? Optional.present(json[r'latitude'] is Iterable - ? (json[r'latitude'] as Iterable).cast().toList(growable: false) - : const []) : const Optional.absent(), - livePhotoVideoId: json[r'livePhotoVideoId'] is Iterable - ? (json[r'livePhotoVideoId'] as Iterable).cast().toList(growable: false) - : const [], - localOffsetHours: json[r'localOffsetHours'] is Iterable - ? (json[r'localOffsetHours'] as Iterable).cast().toList(growable: false) - : const [], - longitude: json.containsKey(r'longitude') ? Optional.present(json[r'longitude'] is Iterable - ? (json[r'longitude'] as Iterable).cast().toList(growable: false) - : const []) : const Optional.absent(), - ownerId: json[r'ownerId'] is Iterable - ? (json[r'ownerId'] as Iterable).cast().toList(growable: false) - : const [], - projectionType: json[r'projectionType'] is Iterable - ? (json[r'projectionType'] as Iterable).cast().toList(growable: false) - : const [], - ratio: json[r'ratio'] is Iterable - ? (json[r'ratio'] as Iterable).cast().toList(growable: false) - : const [], - stack: json.containsKey(r'stack') ? Optional.present(json[r'stack'] is List - ? (json[r'stack'] as List).map((e) => - e == null ? null : (e as List).map((value) => value as String).toList(growable: false) - ).toList() - : const []) : const Optional.absent(), - thumbhash: json[r'thumbhash'] is Iterable - ? (json[r'thumbhash'] as Iterable).cast().toList(growable: false) - : const [], - visibility: AssetVisibility.listFromJson(json[r'visibility']), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = TimeBucketAssetResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = TimeBucketAssetResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of TimeBucketAssetResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = TimeBucketAssetResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'createdAt', - 'duration', - 'fileCreatedAt', - 'id', - 'isFavorite', - 'isImage', - 'isTrashed', - 'livePhotoVideoId', - 'localOffsetHours', - 'ownerId', - 'projectionType', - 'ratio', - 'thumbhash', - 'visibility', - }; -} - diff --git a/mobile/openapi/lib/model/time_buckets_response_dto.dart b/mobile/openapi/lib/model/time_buckets_response_dto.dart deleted file mode 100644 index 8b8da1d37a..0000000000 --- a/mobile/openapi/lib/model/time_buckets_response_dto.dart +++ /dev/null @@ -1,112 +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 TimeBucketsResponseDto { - /// Returns a new [TimeBucketsResponseDto] instance. - TimeBucketsResponseDto({ - required this.count, - required this.timeBucket, - }); - - /// Number of assets in this time bucket - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int count; - - /// Time bucket identifier in YYYY-MM-DD format representing the start of the time period - String timeBucket; - - @override - bool operator ==(Object other) => identical(this, other) || other is TimeBucketsResponseDto && - other.count == count && - other.timeBucket == timeBucket; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (count.hashCode) + - (timeBucket.hashCode); - - @override - String toString() => 'TimeBucketsResponseDto[count=$count, timeBucket=$timeBucket]'; - - Map toJson() { - final json = {}; - json[r'count'] = this.count; - json[r'timeBucket'] = this.timeBucket; - return json; - } - - /// Returns a new [TimeBucketsResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static TimeBucketsResponseDto? fromJson(dynamic value) { - upgradeDto(value, "TimeBucketsResponseDto"); - if (value is Map) { - final json = value.cast(); - - return TimeBucketsResponseDto( - count: mapValueOfType(json, r'count')!, - timeBucket: mapValueOfType(json, r'timeBucket')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = TimeBucketsResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = TimeBucketsResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of TimeBucketsResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = TimeBucketsResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'count', - 'timeBucket', - }; -} - diff --git a/mobile/openapi/lib/model/tone_mapping.dart b/mobile/openapi/lib/model/tone_mapping.dart deleted file mode 100644 index a1db2f5c9c..0000000000 --- a/mobile/openapi/lib/model/tone_mapping.dart +++ /dev/null @@ -1,91 +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; - -/// Tone mapping -class ToneMapping { - /// Instantiate a new enum with the provided [value]. - const ToneMapping._(this.value); - - /// The underlying value of this enum member. - final String value; - - @override - String toString() => value; - - String toJson() => value; - - static const hable = ToneMapping._(r'hable'); - static const mobius = ToneMapping._(r'mobius'); - static const reinhard = ToneMapping._(r'reinhard'); - static const disabled = ToneMapping._(r'disabled'); - - /// List of all possible values in this [enum][ToneMapping]. - static const values = [ - hable, - mobius, - reinhard, - disabled, - ]; - - static ToneMapping? fromJson(dynamic value) => ToneMappingTypeTransformer().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 = ToneMapping.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } -} - -/// Transformation class that can [encode] an instance of [ToneMapping] to String, -/// and [decode] dynamic data back to [ToneMapping]. -class ToneMappingTypeTransformer { - factory ToneMappingTypeTransformer() => _instance ??= const ToneMappingTypeTransformer._(); - - const ToneMappingTypeTransformer._(); - - String encode(ToneMapping data) => data.value; - - /// Decodes a [dynamic value][data] to a ToneMapping. - /// - /// 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. - ToneMapping? decode(dynamic data, {bool allowNull = true}) { - if (data != null) { - switch (data) { - case r'hable': return ToneMapping.hable; - case r'mobius': return ToneMapping.mobius; - case r'reinhard': return ToneMapping.reinhard; - case r'disabled': return ToneMapping.disabled; - default: - if (!allowNull) { - throw ArgumentError('Unknown enum value to decode: $data'); - } - } - } - return null; - } - - /// Singleton [ToneMappingTypeTransformer] instance. - static ToneMappingTypeTransformer? _instance; -} - diff --git a/mobile/openapi/lib/model/transcode_hw_accel.dart b/mobile/openapi/lib/model/transcode_hw_accel.dart deleted file mode 100644 index 22d20de320..0000000000 --- a/mobile/openapi/lib/model/transcode_hw_accel.dart +++ /dev/null @@ -1,94 +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; - -/// Transcode hardware acceleration -class TranscodeHWAccel { - /// Instantiate a new enum with the provided [value]. - const TranscodeHWAccel._(this.value); - - /// The underlying value of this enum member. - final String value; - - @override - String toString() => value; - - String toJson() => value; - - static const nvenc = TranscodeHWAccel._(r'nvenc'); - static const qsv = TranscodeHWAccel._(r'qsv'); - static const vaapi = TranscodeHWAccel._(r'vaapi'); - static const rkmpp = TranscodeHWAccel._(r'rkmpp'); - static const disabled = TranscodeHWAccel._(r'disabled'); - - /// List of all possible values in this [enum][TranscodeHWAccel]. - static const values = [ - nvenc, - qsv, - vaapi, - rkmpp, - disabled, - ]; - - static TranscodeHWAccel? fromJson(dynamic value) => TranscodeHWAccelTypeTransformer().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 = TranscodeHWAccel.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } -} - -/// Transformation class that can [encode] an instance of [TranscodeHWAccel] to String, -/// and [decode] dynamic data back to [TranscodeHWAccel]. -class TranscodeHWAccelTypeTransformer { - factory TranscodeHWAccelTypeTransformer() => _instance ??= const TranscodeHWAccelTypeTransformer._(); - - const TranscodeHWAccelTypeTransformer._(); - - String encode(TranscodeHWAccel data) => data.value; - - /// Decodes a [dynamic value][data] to a TranscodeHWAccel. - /// - /// 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. - TranscodeHWAccel? decode(dynamic data, {bool allowNull = true}) { - if (data != null) { - switch (data) { - case r'nvenc': return TranscodeHWAccel.nvenc; - case r'qsv': return TranscodeHWAccel.qsv; - case r'vaapi': return TranscodeHWAccel.vaapi; - case r'rkmpp': return TranscodeHWAccel.rkmpp; - case r'disabled': return TranscodeHWAccel.disabled; - default: - if (!allowNull) { - throw ArgumentError('Unknown enum value to decode: $data'); - } - } - } - return null; - } - - /// Singleton [TranscodeHWAccelTypeTransformer] instance. - static TranscodeHWAccelTypeTransformer? _instance; -} - diff --git a/mobile/openapi/lib/model/transcode_policy.dart b/mobile/openapi/lib/model/transcode_policy.dart deleted file mode 100644 index ab3a876a93..0000000000 --- a/mobile/openapi/lib/model/transcode_policy.dart +++ /dev/null @@ -1,94 +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; - -/// Transcode policy -class TranscodePolicy { - /// Instantiate a new enum with the provided [value]. - const TranscodePolicy._(this.value); - - /// The underlying value of this enum member. - final String value; - - @override - String toString() => value; - - String toJson() => value; - - static const all = TranscodePolicy._(r'all'); - static const optimal = TranscodePolicy._(r'optimal'); - static const bitrate = TranscodePolicy._(r'bitrate'); - static const required_ = TranscodePolicy._(r'required'); - static const disabled = TranscodePolicy._(r'disabled'); - - /// List of all possible values in this [enum][TranscodePolicy]. - static const values = [ - all, - optimal, - bitrate, - required_, - disabled, - ]; - - static TranscodePolicy? fromJson(dynamic value) => TranscodePolicyTypeTransformer().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 = TranscodePolicy.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } -} - -/// Transformation class that can [encode] an instance of [TranscodePolicy] to String, -/// and [decode] dynamic data back to [TranscodePolicy]. -class TranscodePolicyTypeTransformer { - factory TranscodePolicyTypeTransformer() => _instance ??= const TranscodePolicyTypeTransformer._(); - - const TranscodePolicyTypeTransformer._(); - - String encode(TranscodePolicy data) => data.value; - - /// Decodes a [dynamic value][data] to a TranscodePolicy. - /// - /// 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. - TranscodePolicy? decode(dynamic data, {bool allowNull = true}) { - if (data != null) { - switch (data) { - case r'all': return TranscodePolicy.all; - case r'optimal': return TranscodePolicy.optimal; - case r'bitrate': return TranscodePolicy.bitrate; - case r'required': return TranscodePolicy.required_; - case r'disabled': return TranscodePolicy.disabled; - default: - if (!allowNull) { - throw ArgumentError('Unknown enum value to decode: $data'); - } - } - } - return null; - } - - /// Singleton [TranscodePolicyTypeTransformer] instance. - static TranscodePolicyTypeTransformer? _instance; -} - diff --git a/mobile/openapi/lib/model/trash_response_dto.dart b/mobile/openapi/lib/model/trash_response_dto.dart deleted file mode 100644 index 7b43d9ceb7..0000000000 --- a/mobile/openapi/lib/model/trash_response_dto.dart +++ /dev/null @@ -1,103 +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 TrashResponseDto { - /// Returns a new [TrashResponseDto] instance. - TrashResponseDto({ - required this.count, - }); - - /// Number of items in trash - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int count; - - @override - bool operator ==(Object other) => identical(this, other) || other is TrashResponseDto && - other.count == count; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (count.hashCode); - - @override - String toString() => 'TrashResponseDto[count=$count]'; - - Map toJson() { - final json = {}; - json[r'count'] = this.count; - return json; - } - - /// Returns a new [TrashResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static TrashResponseDto? fromJson(dynamic value) { - upgradeDto(value, "TrashResponseDto"); - if (value is Map) { - final json = value.cast(); - - return TrashResponseDto( - count: mapValueOfType(json, r'count')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = TrashResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = TrashResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of TrashResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = TrashResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'count', - }; -} - diff --git a/mobile/openapi/lib/model/update_album_dto.dart b/mobile/openapi/lib/model/update_album_dto.dart deleted file mode 100644 index 8995a69656..0000000000 --- a/mobile/openapi/lib/model/update_album_dto.dart +++ /dev/null @@ -1,175 +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 UpdateAlbumDto { - /// Returns a new [UpdateAlbumDto] instance. - UpdateAlbumDto({ - this.albumName = const Optional.absent(), - this.albumThumbnailAssetId = const Optional.absent(), - this.description = const Optional.absent(), - this.isActivityEnabled = const Optional.absent(), - this.order = const Optional.absent(), - }); - - /// Album name - /// - /// 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. - /// - Optional albumName; - - /// Album thumbnail asset ID - /// - /// 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. - /// - Optional albumThumbnailAssetId; - - /// Album description - /// - /// 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. - /// - Optional description; - - /// Enable activity feed - /// - /// 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. - /// - Optional isActivityEnabled; - - /// - /// 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. - /// - Optional order; - - @override - bool operator ==(Object other) => identical(this, other) || other is UpdateAlbumDto && - other.albumName == albumName && - other.albumThumbnailAssetId == albumThumbnailAssetId && - other.description == description && - other.isActivityEnabled == isActivityEnabled && - other.order == order; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (albumName == null ? 0 : albumName!.hashCode) + - (albumThumbnailAssetId == null ? 0 : albumThumbnailAssetId!.hashCode) + - (description == null ? 0 : description!.hashCode) + - (isActivityEnabled == null ? 0 : isActivityEnabled!.hashCode) + - (order == null ? 0 : order!.hashCode); - - @override - String toString() => 'UpdateAlbumDto[albumName=$albumName, albumThumbnailAssetId=$albumThumbnailAssetId, description=$description, isActivityEnabled=$isActivityEnabled, order=$order]'; - - Map toJson() { - final json = {}; - if (this.albumName.isPresent) { - final value = this.albumName.value; - json[r'albumName'] = value; - } - if (this.albumThumbnailAssetId.isPresent) { - final value = this.albumThumbnailAssetId.value; - json[r'albumThumbnailAssetId'] = value; - } - if (this.description.isPresent) { - final value = this.description.value; - json[r'description'] = value; - } - if (this.isActivityEnabled.isPresent) { - final value = this.isActivityEnabled.value; - json[r'isActivityEnabled'] = value; - } - if (this.order.isPresent) { - final value = this.order.value; - json[r'order'] = value; - } - return json; - } - - /// Returns a new [UpdateAlbumDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static UpdateAlbumDto? fromJson(dynamic value) { - upgradeDto(value, "UpdateAlbumDto"); - if (value is Map) { - final json = value.cast(); - - return UpdateAlbumDto( - albumName: json.containsKey(r'albumName') ? Optional.present(mapValueOfType(json, r'albumName')) : const Optional.absent(), - albumThumbnailAssetId: json.containsKey(r'albumThumbnailAssetId') ? Optional.present(mapValueOfType(json, r'albumThumbnailAssetId')) : const Optional.absent(), - description: json.containsKey(r'description') ? Optional.present(mapValueOfType(json, r'description')) : const Optional.absent(), - isActivityEnabled: json.containsKey(r'isActivityEnabled') ? Optional.present(mapValueOfType(json, r'isActivityEnabled')) : const Optional.absent(), - order: json.containsKey(r'order') ? Optional.present(AssetOrder.fromJson(json[r'order'])) : const Optional.absent(), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = UpdateAlbumDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = UpdateAlbumDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of UpdateAlbumDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = UpdateAlbumDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - }; -} - diff --git a/mobile/openapi/lib/model/update_album_user_dto.dart b/mobile/openapi/lib/model/update_album_user_dto.dart deleted file mode 100644 index 43218cae6e..0000000000 --- a/mobile/openapi/lib/model/update_album_user_dto.dart +++ /dev/null @@ -1,99 +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 UpdateAlbumUserDto { - /// Returns a new [UpdateAlbumUserDto] instance. - UpdateAlbumUserDto({ - required this.role, - }); - - AlbumUserRole role; - - @override - bool operator ==(Object other) => identical(this, other) || other is UpdateAlbumUserDto && - other.role == role; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (role.hashCode); - - @override - String toString() => 'UpdateAlbumUserDto[role=$role]'; - - Map toJson() { - final json = {}; - json[r'role'] = this.role; - return json; - } - - /// Returns a new [UpdateAlbumUserDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static UpdateAlbumUserDto? fromJson(dynamic value) { - upgradeDto(value, "UpdateAlbumUserDto"); - if (value is Map) { - final json = value.cast(); - - return UpdateAlbumUserDto( - role: AlbumUserRole.fromJson(json[r'role'])!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = UpdateAlbumUserDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = UpdateAlbumUserDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of UpdateAlbumUserDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = UpdateAlbumUserDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'role', - }; -} - diff --git a/mobile/openapi/lib/model/update_asset_dto.dart b/mobile/openapi/lib/model/update_asset_dto.dart deleted file mode 100644 index 1958e36963..0000000000 --- a/mobile/openapi/lib/model/update_asset_dto.dart +++ /dev/null @@ -1,223 +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 UpdateAssetDto { - /// Returns a new [UpdateAssetDto] instance. - UpdateAssetDto({ - this.dateTimeOriginal = const Optional.absent(), - this.description = const Optional.absent(), - this.isFavorite = const Optional.absent(), - this.latitude = const Optional.absent(), - this.livePhotoVideoId = const Optional.absent(), - this.longitude = const Optional.absent(), - this.rating = const Optional.absent(), - this.visibility = const Optional.absent(), - }); - - /// Original date and time - /// - /// 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. - /// - Optional dateTimeOriginal; - - /// Asset description - /// - /// 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. - /// - Optional description; - - /// Mark as favorite - /// - /// 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. - /// - Optional isFavorite; - - /// Latitude coordinate - /// - /// Minimum value: -90 - /// Maximum value: 90 - /// - /// 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. - /// - Optional latitude; - - /// Live photo video ID - Optional livePhotoVideoId; - - /// Longitude coordinate - /// - /// Minimum value: -180 - /// Maximum value: 180 - /// - /// 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. - /// - Optional longitude; - - /// Rating in range [1-5] (starred), -1 (rejected), or null (unrated) - /// - /// Minimum value: -1 - /// Maximum value: 5 - Optional rating; - - /// - /// 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. - /// - Optional visibility; - - @override - bool operator ==(Object other) => identical(this, other) || other is UpdateAssetDto && - other.dateTimeOriginal == dateTimeOriginal && - other.description == description && - other.isFavorite == isFavorite && - other.latitude == latitude && - other.livePhotoVideoId == livePhotoVideoId && - other.longitude == longitude && - other.rating == rating && - other.visibility == visibility; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (dateTimeOriginal == null ? 0 : dateTimeOriginal!.hashCode) + - (description == null ? 0 : description!.hashCode) + - (isFavorite == null ? 0 : isFavorite!.hashCode) + - (latitude == null ? 0 : latitude!.hashCode) + - (livePhotoVideoId == null ? 0 : livePhotoVideoId!.hashCode) + - (longitude == null ? 0 : longitude!.hashCode) + - (rating == null ? 0 : rating!.hashCode) + - (visibility == null ? 0 : visibility!.hashCode); - - @override - String toString() => 'UpdateAssetDto[dateTimeOriginal=$dateTimeOriginal, description=$description, isFavorite=$isFavorite, latitude=$latitude, livePhotoVideoId=$livePhotoVideoId, longitude=$longitude, rating=$rating, visibility=$visibility]'; - - Map toJson() { - final json = {}; - if (this.dateTimeOriginal.isPresent) { - final value = this.dateTimeOriginal.value; - json[r'dateTimeOriginal'] = value; - } - if (this.description.isPresent) { - final value = this.description.value; - json[r'description'] = value; - } - if (this.isFavorite.isPresent) { - final value = this.isFavorite.value; - json[r'isFavorite'] = value; - } - if (this.latitude.isPresent) { - final value = this.latitude.value; - json[r'latitude'] = value; - } - if (this.livePhotoVideoId.isPresent) { - final value = this.livePhotoVideoId.value; - json[r'livePhotoVideoId'] = value; - } - if (this.longitude.isPresent) { - final value = this.longitude.value; - json[r'longitude'] = value; - } - if (this.rating.isPresent) { - final value = this.rating.value; - json[r'rating'] = value; - } - if (this.visibility.isPresent) { - final value = this.visibility.value; - json[r'visibility'] = value; - } - return json; - } - - /// Returns a new [UpdateAssetDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static UpdateAssetDto? fromJson(dynamic value) { - upgradeDto(value, "UpdateAssetDto"); - if (value is Map) { - final json = value.cast(); - - return UpdateAssetDto( - dateTimeOriginal: json.containsKey(r'dateTimeOriginal') ? Optional.present(mapValueOfType(json, r'dateTimeOriginal')) : const Optional.absent(), - description: json.containsKey(r'description') ? Optional.present(mapValueOfType(json, r'description')) : const Optional.absent(), - isFavorite: json.containsKey(r'isFavorite') ? Optional.present(mapValueOfType(json, r'isFavorite')) : const Optional.absent(), - latitude: json.containsKey(r'latitude') ? Optional.present(json[r'latitude'] == null ? null : num.parse('${json[r'latitude']}')) : const Optional.absent(), - livePhotoVideoId: json.containsKey(r'livePhotoVideoId') ? Optional.present(mapValueOfType(json, r'livePhotoVideoId')) : const Optional.absent(), - longitude: json.containsKey(r'longitude') ? Optional.present(json[r'longitude'] == null ? null : num.parse('${json[r'longitude']}')) : const Optional.absent(), - rating: json.containsKey(r'rating') ? Optional.present(json[r'rating'] == null ? null : int.parse('${json[r'rating']}')) : const Optional.absent(), - visibility: json.containsKey(r'visibility') ? Optional.present(AssetVisibility.fromJson(json[r'visibility'])) : const Optional.absent(), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = UpdateAssetDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = UpdateAssetDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of UpdateAssetDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = UpdateAssetDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - }; -} - diff --git a/mobile/openapi/lib/model/update_library_dto.dart b/mobile/openapi/lib/model/update_library_dto.dart deleted file mode 100644 index 44aa042f35..0000000000 --- a/mobile/openapi/lib/model/update_library_dto.dart +++ /dev/null @@ -1,134 +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 UpdateLibraryDto { - /// Returns a new [UpdateLibraryDto] instance. - UpdateLibraryDto({ - this.exclusionPatterns = const Optional.present(const []), - this.importPaths = const Optional.present(const []), - this.name = const Optional.absent(), - }); - - /// Exclusion patterns (max 128) - Optional?> exclusionPatterns; - - /// Import paths (max 128) - Optional?> importPaths; - - /// Library name - /// - /// 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. - /// - Optional name; - - @override - bool operator ==(Object other) => identical(this, other) || other is UpdateLibraryDto && - _deepEquality.equals(other.exclusionPatterns, exclusionPatterns) && - _deepEquality.equals(other.importPaths, importPaths) && - other.name == name; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (exclusionPatterns.hashCode) + - (importPaths.hashCode) + - (name == null ? 0 : name!.hashCode); - - @override - String toString() => 'UpdateLibraryDto[exclusionPatterns=$exclusionPatterns, importPaths=$importPaths, name=$name]'; - - Map toJson() { - final json = {}; - if (this.exclusionPatterns.isPresent) { - final value = this.exclusionPatterns.value; - json[r'exclusionPatterns'] = value; - } - if (this.importPaths.isPresent) { - final value = this.importPaths.value; - json[r'importPaths'] = value; - } - if (this.name.isPresent) { - final value = this.name.value; - json[r'name'] = value; - } - return json; - } - - /// Returns a new [UpdateLibraryDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static UpdateLibraryDto? fromJson(dynamic value) { - upgradeDto(value, "UpdateLibraryDto"); - if (value is Map) { - final json = value.cast(); - - return UpdateLibraryDto( - exclusionPatterns: json.containsKey(r'exclusionPatterns') ? Optional.present(json[r'exclusionPatterns'] is Iterable - ? (json[r'exclusionPatterns'] as Iterable).cast().toList(growable: false) - : const []) : const Optional.absent(), - importPaths: json.containsKey(r'importPaths') ? Optional.present(json[r'importPaths'] is Iterable - ? (json[r'importPaths'] as Iterable).cast().toList(growable: false) - : const []) : const Optional.absent(), - name: json.containsKey(r'name') ? Optional.present(mapValueOfType(json, r'name')) : const Optional.absent(), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = UpdateLibraryDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = UpdateLibraryDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of UpdateLibraryDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = UpdateLibraryDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - }; -} - diff --git a/mobile/openapi/lib/model/usage_by_user_dto.dart b/mobile/openapi/lib/model/usage_by_user_dto.dart deleted file mode 100644 index fbf2cc02e4..0000000000 --- a/mobile/openapi/lib/model/usage_by_user_dto.dart +++ /dev/null @@ -1,185 +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 UsageByUserDto { - /// Returns a new [UsageByUserDto] instance. - UsageByUserDto({ - required this.photos, - required this.quotaSizeInBytes, - required this.usage, - required this.usagePhotos, - required this.usageVideos, - required this.userId, - required this.userName, - required this.videos, - }); - - /// Number of photos - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int photos; - - /// User quota size in bytes (null if unlimited) - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int? quotaSizeInBytes; - - /// Total storage usage in bytes - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int usage; - - /// Storage usage for photos in bytes - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int usagePhotos; - - /// Storage usage for videos in bytes - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int usageVideos; - - /// User ID - String userId; - - /// User name - String userName; - - /// Number of videos - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int videos; - - @override - bool operator ==(Object other) => identical(this, other) || other is UsageByUserDto && - other.photos == photos && - other.quotaSizeInBytes == quotaSizeInBytes && - other.usage == usage && - other.usagePhotos == usagePhotos && - other.usageVideos == usageVideos && - other.userId == userId && - other.userName == userName && - other.videos == videos; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (photos.hashCode) + - (quotaSizeInBytes == null ? 0 : quotaSizeInBytes!.hashCode) + - (usage.hashCode) + - (usagePhotos.hashCode) + - (usageVideos.hashCode) + - (userId.hashCode) + - (userName.hashCode) + - (videos.hashCode); - - @override - String toString() => 'UsageByUserDto[photos=$photos, quotaSizeInBytes=$quotaSizeInBytes, usage=$usage, usagePhotos=$usagePhotos, usageVideos=$usageVideos, userId=$userId, userName=$userName, videos=$videos]'; - - Map toJson() { - final json = {}; - json[r'photos'] = this.photos; - if (this.quotaSizeInBytes != null) { - json[r'quotaSizeInBytes'] = this.quotaSizeInBytes; - } else { - json[r'quotaSizeInBytes'] = null; - } - json[r'usage'] = this.usage; - json[r'usagePhotos'] = this.usagePhotos; - json[r'usageVideos'] = this.usageVideos; - json[r'userId'] = this.userId; - json[r'userName'] = this.userName; - json[r'videos'] = this.videos; - return json; - } - - /// Returns a new [UsageByUserDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static UsageByUserDto? fromJson(dynamic value) { - upgradeDto(value, "UsageByUserDto"); - if (value is Map) { - final json = value.cast(); - - return UsageByUserDto( - photos: mapValueOfType(json, r'photos')!, - quotaSizeInBytes: mapValueOfType(json, r'quotaSizeInBytes'), - usage: mapValueOfType(json, r'usage')!, - usagePhotos: mapValueOfType(json, r'usagePhotos')!, - usageVideos: mapValueOfType(json, r'usageVideos')!, - userId: mapValueOfType(json, r'userId')!, - userName: mapValueOfType(json, r'userName')!, - videos: mapValueOfType(json, r'videos')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = UsageByUserDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = UsageByUserDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of UsageByUserDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = UsageByUserDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'photos', - 'quotaSizeInBytes', - 'usage', - 'usagePhotos', - 'usageVideos', - 'userId', - 'userName', - 'videos', - }; -} - diff --git a/mobile/openapi/lib/model/user_admin_create_dto.dart b/mobile/openapi/lib/model/user_admin_create_dto.dart deleted file mode 100644 index 8ed867c2cf..0000000000 --- a/mobile/openapi/lib/model/user_admin_create_dto.dart +++ /dev/null @@ -1,215 +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 UserAdminCreateDto { - /// Returns a new [UserAdminCreateDto] instance. - UserAdminCreateDto({ - this.avatarColor = const Optional.absent(), - required this.email, - this.isAdmin = const Optional.absent(), - required this.name, - this.notify = const Optional.absent(), - required this.password, - this.pinCode = const Optional.absent(), - this.quotaSizeInBytes = const Optional.absent(), - this.shouldChangePassword = const Optional.absent(), - this.storageLabel = const Optional.absent(), - }); - - Optional avatarColor; - - /// User email - String email; - - /// Grant admin privileges - /// - /// 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. - /// - Optional isAdmin; - - /// User name - String name; - - /// Send notification email - /// - /// 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. - /// - Optional notify; - - /// User password - String password; - - /// PIN code - Optional pinCode; - - /// Storage quota in bytes - /// - /// Minimum value: 0 - /// Maximum value: 9007199254740991 - Optional quotaSizeInBytes; - - /// Require password change on next login - /// - /// 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. - /// - Optional shouldChangePassword; - - /// Storage label - Optional storageLabel; - - @override - bool operator ==(Object other) => identical(this, other) || other is UserAdminCreateDto && - other.avatarColor == avatarColor && - other.email == email && - other.isAdmin == isAdmin && - other.name == name && - other.notify == notify && - other.password == password && - other.pinCode == pinCode && - other.quotaSizeInBytes == quotaSizeInBytes && - other.shouldChangePassword == shouldChangePassword && - other.storageLabel == storageLabel; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (avatarColor == null ? 0 : avatarColor!.hashCode) + - (email.hashCode) + - (isAdmin == null ? 0 : isAdmin!.hashCode) + - (name.hashCode) + - (notify == null ? 0 : notify!.hashCode) + - (password.hashCode) + - (pinCode == null ? 0 : pinCode!.hashCode) + - (quotaSizeInBytes == null ? 0 : quotaSizeInBytes!.hashCode) + - (shouldChangePassword == null ? 0 : shouldChangePassword!.hashCode) + - (storageLabel == null ? 0 : storageLabel!.hashCode); - - @override - String toString() => 'UserAdminCreateDto[avatarColor=$avatarColor, email=$email, isAdmin=$isAdmin, name=$name, notify=$notify, password=$password, pinCode=$pinCode, quotaSizeInBytes=$quotaSizeInBytes, shouldChangePassword=$shouldChangePassword, storageLabel=$storageLabel]'; - - Map toJson() { - final json = {}; - if (this.avatarColor.isPresent) { - final value = this.avatarColor.value; - json[r'avatarColor'] = value; - } - json[r'email'] = this.email; - if (this.isAdmin.isPresent) { - final value = this.isAdmin.value; - json[r'isAdmin'] = value; - } - json[r'name'] = this.name; - if (this.notify.isPresent) { - final value = this.notify.value; - json[r'notify'] = value; - } - json[r'password'] = this.password; - if (this.pinCode.isPresent) { - final value = this.pinCode.value; - json[r'pinCode'] = value; - } - if (this.quotaSizeInBytes.isPresent) { - final value = this.quotaSizeInBytes.value; - json[r'quotaSizeInBytes'] = value; - } - if (this.shouldChangePassword.isPresent) { - final value = this.shouldChangePassword.value; - json[r'shouldChangePassword'] = value; - } - if (this.storageLabel.isPresent) { - final value = this.storageLabel.value; - json[r'storageLabel'] = value; - } - return json; - } - - /// Returns a new [UserAdminCreateDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static UserAdminCreateDto? fromJson(dynamic value) { - upgradeDto(value, "UserAdminCreateDto"); - if (value is Map) { - final json = value.cast(); - - return UserAdminCreateDto( - avatarColor: json.containsKey(r'avatarColor') ? Optional.present(UserAvatarColor.fromJson(json[r'avatarColor'])) : const Optional.absent(), - email: mapValueOfType(json, r'email')!, - isAdmin: json.containsKey(r'isAdmin') ? Optional.present(mapValueOfType(json, r'isAdmin')) : const Optional.absent(), - name: mapValueOfType(json, r'name')!, - notify: json.containsKey(r'notify') ? Optional.present(mapValueOfType(json, r'notify')) : const Optional.absent(), - password: mapValueOfType(json, r'password')!, - pinCode: json.containsKey(r'pinCode') ? Optional.present(mapValueOfType(json, r'pinCode')) : const Optional.absent(), - quotaSizeInBytes: json.containsKey(r'quotaSizeInBytes') ? Optional.present(json[r'quotaSizeInBytes'] == null ? null : int.parse('${json[r'quotaSizeInBytes']}')) : const Optional.absent(), - shouldChangePassword: json.containsKey(r'shouldChangePassword') ? Optional.present(mapValueOfType(json, r'shouldChangePassword')) : const Optional.absent(), - storageLabel: json.containsKey(r'storageLabel') ? Optional.present(mapValueOfType(json, r'storageLabel')) : const Optional.absent(), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = UserAdminCreateDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = UserAdminCreateDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of UserAdminCreateDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = UserAdminCreateDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'email', - 'name', - 'password', - }; -} - diff --git a/mobile/openapi/lib/model/user_admin_delete_dto.dart b/mobile/openapi/lib/model/user_admin_delete_dto.dart deleted file mode 100644 index 8d7ab73076..0000000000 --- a/mobile/openapi/lib/model/user_admin_delete_dto.dart +++ /dev/null @@ -1,108 +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 UserAdminDeleteDto { - /// Returns a new [UserAdminDeleteDto] instance. - UserAdminDeleteDto({ - this.force = const Optional.absent(), - }); - - /// Force delete even if user has assets - /// - /// 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. - /// - Optional force; - - @override - bool operator ==(Object other) => identical(this, other) || other is UserAdminDeleteDto && - other.force == force; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (force == null ? 0 : force!.hashCode); - - @override - String toString() => 'UserAdminDeleteDto[force=$force]'; - - Map toJson() { - final json = {}; - if (this.force.isPresent) { - final value = this.force.value; - json[r'force'] = value; - } - return json; - } - - /// Returns a new [UserAdminDeleteDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static UserAdminDeleteDto? fromJson(dynamic value) { - upgradeDto(value, "UserAdminDeleteDto"); - if (value is Map) { - final json = value.cast(); - - return UserAdminDeleteDto( - force: json.containsKey(r'force') ? Optional.present(mapValueOfType(json, r'force')) : const Optional.absent(), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = UserAdminDeleteDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = UserAdminDeleteDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of UserAdminDeleteDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = UserAdminDeleteDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - }; -} - diff --git a/mobile/openapi/lib/model/user_admin_response_dto.dart b/mobile/openapi/lib/model/user_admin_response_dto.dart deleted file mode 100644 index c8499ab0dd..0000000000 --- a/mobile/openapi/lib/model/user_admin_response_dto.dart +++ /dev/null @@ -1,273 +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 UserAdminResponseDto { - /// Returns a new [UserAdminResponseDto] instance. - UserAdminResponseDto({ - required this.avatarColor, - required this.createdAt, - required this.deletedAt, - required this.email, - required this.id, - required this.isAdmin, - required this.license, - required this.name, - required this.oauthId, - required this.profileChangedAt, - required this.profileImagePath, - required this.quotaSizeInBytes, - required this.quotaUsageInBytes, - required this.shouldChangePassword, - required this.status, - required this.storageLabel, - required this.updatedAt, - }); - - UserAvatarColor avatarColor; - - /// Creation date - DateTime createdAt; - - /// Deletion date - DateTime? deletedAt; - - /// User email - String email; - - /// User ID - String id; - - /// Is admin user - bool isAdmin; - - UserLicense? license; - - /// User name - String name; - - /// OAuth ID - String oauthId; - - /// Profile change date - DateTime profileChangedAt; - - /// Profile image path - String profileImagePath; - - /// Storage quota in bytes - /// - /// Minimum value: 0 - /// Maximum value: 9007199254740991 - int? quotaSizeInBytes; - - /// Storage usage in bytes - /// - /// Minimum value: 0 - /// Maximum value: 9007199254740991 - int? quotaUsageInBytes; - - /// Require password change on next login - bool shouldChangePassword; - - UserStatus status; - - /// Storage label - String? storageLabel; - - /// Last update date - DateTime updatedAt; - - @override - bool operator ==(Object other) => identical(this, other) || other is UserAdminResponseDto && - other.avatarColor == avatarColor && - other.createdAt == createdAt && - other.deletedAt == deletedAt && - other.email == email && - other.id == id && - other.isAdmin == isAdmin && - other.license == license && - other.name == name && - other.oauthId == oauthId && - other.profileChangedAt == profileChangedAt && - other.profileImagePath == profileImagePath && - other.quotaSizeInBytes == quotaSizeInBytes && - other.quotaUsageInBytes == quotaUsageInBytes && - other.shouldChangePassword == shouldChangePassword && - other.status == status && - other.storageLabel == storageLabel && - other.updatedAt == updatedAt; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (avatarColor.hashCode) + - (createdAt.hashCode) + - (deletedAt == null ? 0 : deletedAt!.hashCode) + - (email.hashCode) + - (id.hashCode) + - (isAdmin.hashCode) + - (license == null ? 0 : license!.hashCode) + - (name.hashCode) + - (oauthId.hashCode) + - (profileChangedAt.hashCode) + - (profileImagePath.hashCode) + - (quotaSizeInBytes == null ? 0 : quotaSizeInBytes!.hashCode) + - (quotaUsageInBytes == null ? 0 : quotaUsageInBytes!.hashCode) + - (shouldChangePassword.hashCode) + - (status.hashCode) + - (storageLabel == null ? 0 : storageLabel!.hashCode) + - (updatedAt.hashCode); - - @override - String toString() => 'UserAdminResponseDto[avatarColor=$avatarColor, createdAt=$createdAt, deletedAt=$deletedAt, email=$email, id=$id, isAdmin=$isAdmin, license=$license, name=$name, oauthId=$oauthId, profileChangedAt=$profileChangedAt, profileImagePath=$profileImagePath, quotaSizeInBytes=$quotaSizeInBytes, quotaUsageInBytes=$quotaUsageInBytes, shouldChangePassword=$shouldChangePassword, status=$status, storageLabel=$storageLabel, updatedAt=$updatedAt]'; - - Map toJson() { - final json = {}; - json[r'avatarColor'] = this.avatarColor; - json[r'createdAt'] = _isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? this.createdAt.millisecondsSinceEpoch - : this.createdAt.toUtc().toIso8601String(); - if (this.deletedAt != null) { - json[r'deletedAt'] = _isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? this.deletedAt!.millisecondsSinceEpoch - : this.deletedAt!.toUtc().toIso8601String(); - } else { - json[r'deletedAt'] = null; - } - json[r'email'] = this.email; - json[r'id'] = this.id; - json[r'isAdmin'] = this.isAdmin; - if (this.license != null) { - json[r'license'] = this.license; - } else { - json[r'license'] = null; - } - json[r'name'] = this.name; - json[r'oauthId'] = this.oauthId; - json[r'profileChangedAt'] = this.profileChangedAt.toUtc().toIso8601String(); - json[r'profileImagePath'] = this.profileImagePath; - if (this.quotaSizeInBytes != null) { - json[r'quotaSizeInBytes'] = this.quotaSizeInBytes; - } else { - json[r'quotaSizeInBytes'] = null; - } - if (this.quotaUsageInBytes != null) { - json[r'quotaUsageInBytes'] = this.quotaUsageInBytes; - } else { - json[r'quotaUsageInBytes'] = null; - } - json[r'shouldChangePassword'] = this.shouldChangePassword; - json[r'status'] = this.status; - if (this.storageLabel != null) { - json[r'storageLabel'] = this.storageLabel; - } else { - json[r'storageLabel'] = null; - } - json[r'updatedAt'] = _isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? this.updatedAt.millisecondsSinceEpoch - : this.updatedAt.toUtc().toIso8601String(); - return json; - } - - /// Returns a new [UserAdminResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static UserAdminResponseDto? fromJson(dynamic value) { - upgradeDto(value, "UserAdminResponseDto"); - if (value is Map) { - final json = value.cast(); - - return UserAdminResponseDto( - avatarColor: UserAvatarColor.fromJson(json[r'avatarColor'])!, - createdAt: mapDateTime(json, r'createdAt', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')!, - deletedAt: mapDateTime(json, r'deletedAt', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/'), - email: mapValueOfType(json, r'email')!, - id: mapValueOfType(json, r'id')!, - isAdmin: mapValueOfType(json, r'isAdmin')!, - license: UserLicense.fromJson(json[r'license']), - name: mapValueOfType(json, r'name')!, - oauthId: mapValueOfType(json, r'oauthId')!, - profileChangedAt: mapDateTime(json, r'profileChangedAt', r'')!, - profileImagePath: mapValueOfType(json, r'profileImagePath')!, - quotaSizeInBytes: mapValueOfType(json, r'quotaSizeInBytes'), - quotaUsageInBytes: mapValueOfType(json, r'quotaUsageInBytes'), - shouldChangePassword: mapValueOfType(json, r'shouldChangePassword')!, - status: UserStatus.fromJson(json[r'status'])!, - storageLabel: mapValueOfType(json, r'storageLabel'), - updatedAt: mapDateTime(json, r'updatedAt', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = UserAdminResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = UserAdminResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of UserAdminResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = UserAdminResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'avatarColor', - 'createdAt', - 'deletedAt', - 'email', - 'id', - 'isAdmin', - 'license', - 'name', - 'oauthId', - 'profileChangedAt', - 'profileImagePath', - 'quotaSizeInBytes', - 'quotaUsageInBytes', - 'shouldChangePassword', - 'status', - 'storageLabel', - 'updatedAt', - }; -} - diff --git a/mobile/openapi/lib/model/user_admin_update_dto.dart b/mobile/openapi/lib/model/user_admin_update_dto.dart deleted file mode 100644 index f1b91d8e61..0000000000 --- a/mobile/openapi/lib/model/user_admin_update_dto.dart +++ /dev/null @@ -1,222 +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 UserAdminUpdateDto { - /// Returns a new [UserAdminUpdateDto] instance. - UserAdminUpdateDto({ - this.avatarColor = const Optional.absent(), - this.email = const Optional.absent(), - this.isAdmin = const Optional.absent(), - this.name = const Optional.absent(), - this.password = const Optional.absent(), - this.pinCode = const Optional.absent(), - this.quotaSizeInBytes = const Optional.absent(), - this.shouldChangePassword = const Optional.absent(), - this.storageLabel = const Optional.absent(), - }); - - Optional avatarColor; - - /// User email - /// - /// 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. - /// - Optional email; - - /// Grant admin privileges - /// - /// 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. - /// - Optional isAdmin; - - /// User name - /// - /// 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. - /// - Optional name; - - /// User password - /// - /// 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. - /// - Optional password; - - /// PIN code - Optional pinCode; - - /// Storage quota in bytes - /// - /// Minimum value: 0 - /// Maximum value: 9007199254740991 - Optional quotaSizeInBytes; - - /// Require password change on next login - /// - /// 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. - /// - Optional shouldChangePassword; - - /// Storage label - Optional storageLabel; - - @override - bool operator ==(Object other) => identical(this, other) || other is UserAdminUpdateDto && - other.avatarColor == avatarColor && - other.email == email && - other.isAdmin == isAdmin && - other.name == name && - other.password == password && - other.pinCode == pinCode && - other.quotaSizeInBytes == quotaSizeInBytes && - other.shouldChangePassword == shouldChangePassword && - other.storageLabel == storageLabel; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (avatarColor == null ? 0 : avatarColor!.hashCode) + - (email == null ? 0 : email!.hashCode) + - (isAdmin == null ? 0 : isAdmin!.hashCode) + - (name == null ? 0 : name!.hashCode) + - (password == null ? 0 : password!.hashCode) + - (pinCode == null ? 0 : pinCode!.hashCode) + - (quotaSizeInBytes == null ? 0 : quotaSizeInBytes!.hashCode) + - (shouldChangePassword == null ? 0 : shouldChangePassword!.hashCode) + - (storageLabel == null ? 0 : storageLabel!.hashCode); - - @override - String toString() => 'UserAdminUpdateDto[avatarColor=$avatarColor, email=$email, isAdmin=$isAdmin, name=$name, password=$password, pinCode=$pinCode, quotaSizeInBytes=$quotaSizeInBytes, shouldChangePassword=$shouldChangePassword, storageLabel=$storageLabel]'; - - Map toJson() { - final json = {}; - if (this.avatarColor.isPresent) { - final value = this.avatarColor.value; - json[r'avatarColor'] = value; - } - if (this.email.isPresent) { - final value = this.email.value; - json[r'email'] = value; - } - if (this.isAdmin.isPresent) { - final value = this.isAdmin.value; - json[r'isAdmin'] = value; - } - if (this.name.isPresent) { - final value = this.name.value; - json[r'name'] = value; - } - if (this.password.isPresent) { - final value = this.password.value; - json[r'password'] = value; - } - if (this.pinCode.isPresent) { - final value = this.pinCode.value; - json[r'pinCode'] = value; - } - if (this.quotaSizeInBytes.isPresent) { - final value = this.quotaSizeInBytes.value; - json[r'quotaSizeInBytes'] = value; - } - if (this.shouldChangePassword.isPresent) { - final value = this.shouldChangePassword.value; - json[r'shouldChangePassword'] = value; - } - if (this.storageLabel.isPresent) { - final value = this.storageLabel.value; - json[r'storageLabel'] = value; - } - return json; - } - - /// Returns a new [UserAdminUpdateDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static UserAdminUpdateDto? fromJson(dynamic value) { - upgradeDto(value, "UserAdminUpdateDto"); - if (value is Map) { - final json = value.cast(); - - return UserAdminUpdateDto( - avatarColor: json.containsKey(r'avatarColor') ? Optional.present(UserAvatarColor.fromJson(json[r'avatarColor'])) : const Optional.absent(), - email: json.containsKey(r'email') ? Optional.present(mapValueOfType(json, r'email')) : const Optional.absent(), - isAdmin: json.containsKey(r'isAdmin') ? Optional.present(mapValueOfType(json, r'isAdmin')) : const Optional.absent(), - name: json.containsKey(r'name') ? Optional.present(mapValueOfType(json, r'name')) : const Optional.absent(), - password: json.containsKey(r'password') ? Optional.present(mapValueOfType(json, r'password')) : const Optional.absent(), - pinCode: json.containsKey(r'pinCode') ? Optional.present(mapValueOfType(json, r'pinCode')) : const Optional.absent(), - quotaSizeInBytes: json.containsKey(r'quotaSizeInBytes') ? Optional.present(json[r'quotaSizeInBytes'] == null ? null : int.parse('${json[r'quotaSizeInBytes']}')) : const Optional.absent(), - shouldChangePassword: json.containsKey(r'shouldChangePassword') ? Optional.present(mapValueOfType(json, r'shouldChangePassword')) : const Optional.absent(), - storageLabel: json.containsKey(r'storageLabel') ? Optional.present(mapValueOfType(json, r'storageLabel')) : const Optional.absent(), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = UserAdminUpdateDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = UserAdminUpdateDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of UserAdminUpdateDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = UserAdminUpdateDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - }; -} - diff --git a/mobile/openapi/lib/model/user_avatar_color.dart b/mobile/openapi/lib/model/user_avatar_color.dart deleted file mode 100644 index 719e366899..0000000000 --- a/mobile/openapi/lib/model/user_avatar_color.dart +++ /dev/null @@ -1,109 +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; - -/// User avatar color -class UserAvatarColor { - /// Instantiate a new enum with the provided [value]. - const UserAvatarColor._(this.value); - - /// The underlying value of this enum member. - final String value; - - @override - String toString() => value; - - String toJson() => value; - - static const primary = UserAvatarColor._(r'primary'); - static const pink = UserAvatarColor._(r'pink'); - static const red = UserAvatarColor._(r'red'); - static const yellow = UserAvatarColor._(r'yellow'); - static const blue = UserAvatarColor._(r'blue'); - static const green = UserAvatarColor._(r'green'); - static const purple = UserAvatarColor._(r'purple'); - static const orange = UserAvatarColor._(r'orange'); - static const gray = UserAvatarColor._(r'gray'); - static const amber = UserAvatarColor._(r'amber'); - - /// List of all possible values in this [enum][UserAvatarColor]. - static const values = [ - primary, - pink, - red, - yellow, - blue, - green, - purple, - orange, - gray, - amber, - ]; - - static UserAvatarColor? fromJson(dynamic value) => UserAvatarColorTypeTransformer().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 = UserAvatarColor.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } -} - -/// Transformation class that can [encode] an instance of [UserAvatarColor] to String, -/// and [decode] dynamic data back to [UserAvatarColor]. -class UserAvatarColorTypeTransformer { - factory UserAvatarColorTypeTransformer() => _instance ??= const UserAvatarColorTypeTransformer._(); - - const UserAvatarColorTypeTransformer._(); - - String encode(UserAvatarColor data) => data.value; - - /// Decodes a [dynamic value][data] to a UserAvatarColor. - /// - /// 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. - UserAvatarColor? decode(dynamic data, {bool allowNull = true}) { - if (data != null) { - switch (data) { - case r'primary': return UserAvatarColor.primary; - case r'pink': return UserAvatarColor.pink; - case r'red': return UserAvatarColor.red; - case r'yellow': return UserAvatarColor.yellow; - case r'blue': return UserAvatarColor.blue; - case r'green': return UserAvatarColor.green; - case r'purple': return UserAvatarColor.purple; - case r'orange': return UserAvatarColor.orange; - case r'gray': return UserAvatarColor.gray; - case r'amber': return UserAvatarColor.amber; - default: - if (!allowNull) { - throw ArgumentError('Unknown enum value to decode: $data'); - } - } - } - return null; - } - - /// Singleton [UserAvatarColorTypeTransformer] instance. - static UserAvatarColorTypeTransformer? _instance; -} - diff --git a/mobile/openapi/lib/model/user_license.dart b/mobile/openapi/lib/model/user_license.dart deleted file mode 100644 index 87f5bd74da..0000000000 --- a/mobile/openapi/lib/model/user_license.dart +++ /dev/null @@ -1,120 +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 UserLicense { - /// Returns a new [UserLicense] instance. - UserLicense({ - required this.activatedAt, - required this.activationKey, - required this.licenseKey, - }); - - /// Activation date - DateTime activatedAt; - - /// Activation key - String activationKey; - - /// License key (format: /^IM(SV|CL)(-[\\dA-Za-z]{4}){8}$/) - String licenseKey; - - @override - bool operator ==(Object other) => identical(this, other) || other is UserLicense && - other.activatedAt == activatedAt && - other.activationKey == activationKey && - other.licenseKey == licenseKey; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (activatedAt.hashCode) + - (activationKey.hashCode) + - (licenseKey.hashCode); - - @override - String toString() => 'UserLicense[activatedAt=$activatedAt, activationKey=$activationKey, licenseKey=$licenseKey]'; - - Map toJson() { - final json = {}; - json[r'activatedAt'] = _isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? this.activatedAt.millisecondsSinceEpoch - : this.activatedAt.toUtc().toIso8601String(); - json[r'activationKey'] = this.activationKey; - json[r'licenseKey'] = this.licenseKey; - return json; - } - - /// Returns a new [UserLicense] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static UserLicense? fromJson(dynamic value) { - upgradeDto(value, "UserLicense"); - if (value is Map) { - final json = value.cast(); - - return UserLicense( - activatedAt: mapDateTime(json, r'activatedAt', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')!, - activationKey: mapValueOfType(json, r'activationKey')!, - licenseKey: mapValueOfType(json, r'licenseKey')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = UserLicense.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = UserLicense.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of UserLicense-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = UserLicense.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'activatedAt', - 'activationKey', - 'licenseKey', - }; -} - diff --git a/mobile/openapi/lib/model/user_metadata_key.dart b/mobile/openapi/lib/model/user_metadata_key.dart deleted file mode 100644 index 2b4c11a73d..0000000000 --- a/mobile/openapi/lib/model/user_metadata_key.dart +++ /dev/null @@ -1,88 +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; - -/// User metadata key -class UserMetadataKey { - /// Instantiate a new enum with the provided [value]. - const UserMetadataKey._(this.value); - - /// The underlying value of this enum member. - final String value; - - @override - String toString() => value; - - String toJson() => value; - - static const preferences = UserMetadataKey._(r'preferences'); - static const license = UserMetadataKey._(r'license'); - static const onboarding = UserMetadataKey._(r'onboarding'); - - /// List of all possible values in this [enum][UserMetadataKey]. - static const values = [ - preferences, - license, - onboarding, - ]; - - static UserMetadataKey? fromJson(dynamic value) => UserMetadataKeyTypeTransformer().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 = UserMetadataKey.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } -} - -/// Transformation class that can [encode] an instance of [UserMetadataKey] to String, -/// and [decode] dynamic data back to [UserMetadataKey]. -class UserMetadataKeyTypeTransformer { - factory UserMetadataKeyTypeTransformer() => _instance ??= const UserMetadataKeyTypeTransformer._(); - - const UserMetadataKeyTypeTransformer._(); - - String encode(UserMetadataKey data) => data.value; - - /// Decodes a [dynamic value][data] to a UserMetadataKey. - /// - /// 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. - UserMetadataKey? decode(dynamic data, {bool allowNull = true}) { - if (data != null) { - switch (data) { - case r'preferences': return UserMetadataKey.preferences; - case r'license': return UserMetadataKey.license; - case r'onboarding': return UserMetadataKey.onboarding; - default: - if (!allowNull) { - throw ArgumentError('Unknown enum value to decode: $data'); - } - } - } - return null; - } - - /// Singleton [UserMetadataKeyTypeTransformer] instance. - static UserMetadataKeyTypeTransformer? _instance; -} - diff --git a/mobile/openapi/lib/model/user_preferences_response_dto.dart b/mobile/openapi/lib/model/user_preferences_response_dto.dart deleted file mode 100644 index 7a6e0252af..0000000000 --- a/mobile/openapi/lib/model/user_preferences_response_dto.dart +++ /dev/null @@ -1,179 +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 UserPreferencesResponseDto { - /// Returns a new [UserPreferencesResponseDto] instance. - UserPreferencesResponseDto({ - required this.albums, - required this.cast, - required this.download, - required this.emailNotifications, - required this.folders, - required this.memories, - required this.people, - required this.purchase, - required this.ratings, - required this.sharedLinks, - required this.tags, - }); - - AlbumsResponse albums; - - CastResponse cast; - - DownloadResponse download; - - EmailNotificationsResponse emailNotifications; - - FoldersResponse folders; - - MemoriesResponse memories; - - PeopleResponse people; - - PurchaseResponse purchase; - - RatingsResponse ratings; - - SharedLinksResponse sharedLinks; - - TagsResponse tags; - - @override - bool operator ==(Object other) => identical(this, other) || other is UserPreferencesResponseDto && - other.albums == albums && - other.cast == cast && - other.download == download && - other.emailNotifications == emailNotifications && - other.folders == folders && - other.memories == memories && - other.people == people && - other.purchase == purchase && - other.ratings == ratings && - other.sharedLinks == sharedLinks && - other.tags == tags; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (albums.hashCode) + - (cast.hashCode) + - (download.hashCode) + - (emailNotifications.hashCode) + - (folders.hashCode) + - (memories.hashCode) + - (people.hashCode) + - (purchase.hashCode) + - (ratings.hashCode) + - (sharedLinks.hashCode) + - (tags.hashCode); - - @override - String toString() => 'UserPreferencesResponseDto[albums=$albums, cast=$cast, download=$download, emailNotifications=$emailNotifications, folders=$folders, memories=$memories, people=$people, purchase=$purchase, ratings=$ratings, sharedLinks=$sharedLinks, tags=$tags]'; - - Map toJson() { - final json = {}; - json[r'albums'] = this.albums; - json[r'cast'] = this.cast; - json[r'download'] = this.download; - json[r'emailNotifications'] = this.emailNotifications; - json[r'folders'] = this.folders; - json[r'memories'] = this.memories; - json[r'people'] = this.people; - json[r'purchase'] = this.purchase; - json[r'ratings'] = this.ratings; - json[r'sharedLinks'] = this.sharedLinks; - json[r'tags'] = this.tags; - return json; - } - - /// Returns a new [UserPreferencesResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static UserPreferencesResponseDto? fromJson(dynamic value) { - upgradeDto(value, "UserPreferencesResponseDto"); - if (value is Map) { - final json = value.cast(); - - return UserPreferencesResponseDto( - albums: AlbumsResponse.fromJson(json[r'albums'])!, - cast: CastResponse.fromJson(json[r'cast'])!, - download: DownloadResponse.fromJson(json[r'download'])!, - emailNotifications: EmailNotificationsResponse.fromJson(json[r'emailNotifications'])!, - folders: FoldersResponse.fromJson(json[r'folders'])!, - memories: MemoriesResponse.fromJson(json[r'memories'])!, - people: PeopleResponse.fromJson(json[r'people'])!, - purchase: PurchaseResponse.fromJson(json[r'purchase'])!, - ratings: RatingsResponse.fromJson(json[r'ratings'])!, - sharedLinks: SharedLinksResponse.fromJson(json[r'sharedLinks'])!, - tags: TagsResponse.fromJson(json[r'tags'])!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = UserPreferencesResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = UserPreferencesResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of UserPreferencesResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = UserPreferencesResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'albums', - 'cast', - 'download', - 'emailNotifications', - 'folders', - 'memories', - 'people', - 'purchase', - 'ratings', - 'sharedLinks', - 'tags', - }; -} - diff --git a/mobile/openapi/lib/model/user_preferences_update_dto.dart b/mobile/openapi/lib/model/user_preferences_update_dto.dart deleted file mode 100644 index f3f2d85bdf..0000000000 --- a/mobile/openapi/lib/model/user_preferences_update_dto.dart +++ /dev/null @@ -1,283 +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 UserPreferencesUpdateDto { - /// Returns a new [UserPreferencesUpdateDto] instance. - UserPreferencesUpdateDto({ - this.albums = const Optional.absent(), - this.avatar = const Optional.absent(), - this.cast = const Optional.absent(), - this.download = const Optional.absent(), - this.emailNotifications = const Optional.absent(), - this.folders = const Optional.absent(), - this.memories = const Optional.absent(), - this.people = const Optional.absent(), - this.purchase = const Optional.absent(), - this.ratings = const Optional.absent(), - this.sharedLinks = const Optional.absent(), - this.tags = const Optional.absent(), - }); - - /// - /// 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. - /// - Optional albums; - - /// - /// 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. - /// - Optional avatar; - - /// - /// 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. - /// - Optional cast; - - /// - /// 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. - /// - Optional download; - - /// - /// 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. - /// - Optional emailNotifications; - - /// - /// 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. - /// - Optional folders; - - /// - /// 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. - /// - Optional memories; - - /// - /// 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. - /// - Optional people; - - /// - /// 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. - /// - Optional purchase; - - /// - /// 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. - /// - Optional ratings; - - /// - /// 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. - /// - Optional sharedLinks; - - /// - /// 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. - /// - Optional tags; - - @override - bool operator ==(Object other) => identical(this, other) || other is UserPreferencesUpdateDto && - other.albums == albums && - other.avatar == avatar && - other.cast == cast && - other.download == download && - other.emailNotifications == emailNotifications && - other.folders == folders && - other.memories == memories && - other.people == people && - other.purchase == purchase && - other.ratings == ratings && - other.sharedLinks == sharedLinks && - other.tags == tags; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (albums == null ? 0 : albums!.hashCode) + - (avatar == null ? 0 : avatar!.hashCode) + - (cast == null ? 0 : cast!.hashCode) + - (download == null ? 0 : download!.hashCode) + - (emailNotifications == null ? 0 : emailNotifications!.hashCode) + - (folders == null ? 0 : folders!.hashCode) + - (memories == null ? 0 : memories!.hashCode) + - (people == null ? 0 : people!.hashCode) + - (purchase == null ? 0 : purchase!.hashCode) + - (ratings == null ? 0 : ratings!.hashCode) + - (sharedLinks == null ? 0 : sharedLinks!.hashCode) + - (tags == null ? 0 : tags!.hashCode); - - @override - String toString() => 'UserPreferencesUpdateDto[albums=$albums, avatar=$avatar, cast=$cast, download=$download, emailNotifications=$emailNotifications, folders=$folders, memories=$memories, people=$people, purchase=$purchase, ratings=$ratings, sharedLinks=$sharedLinks, tags=$tags]'; - - Map toJson() { - final json = {}; - if (this.albums.isPresent) { - final value = this.albums.value; - json[r'albums'] = value; - } - if (this.avatar.isPresent) { - final value = this.avatar.value; - json[r'avatar'] = value; - } - if (this.cast.isPresent) { - final value = this.cast.value; - json[r'cast'] = value; - } - if (this.download.isPresent) { - final value = this.download.value; - json[r'download'] = value; - } - if (this.emailNotifications.isPresent) { - final value = this.emailNotifications.value; - json[r'emailNotifications'] = value; - } - if (this.folders.isPresent) { - final value = this.folders.value; - json[r'folders'] = value; - } - if (this.memories.isPresent) { - final value = this.memories.value; - json[r'memories'] = value; - } - if (this.people.isPresent) { - final value = this.people.value; - json[r'people'] = value; - } - if (this.purchase.isPresent) { - final value = this.purchase.value; - json[r'purchase'] = value; - } - if (this.ratings.isPresent) { - final value = this.ratings.value; - json[r'ratings'] = value; - } - if (this.sharedLinks.isPresent) { - final value = this.sharedLinks.value; - json[r'sharedLinks'] = value; - } - if (this.tags.isPresent) { - final value = this.tags.value; - json[r'tags'] = value; - } - return json; - } - - /// Returns a new [UserPreferencesUpdateDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static UserPreferencesUpdateDto? fromJson(dynamic value) { - upgradeDto(value, "UserPreferencesUpdateDto"); - if (value is Map) { - final json = value.cast(); - - return UserPreferencesUpdateDto( - albums: json.containsKey(r'albums') ? Optional.present(AlbumsUpdate.fromJson(json[r'albums'])) : const Optional.absent(), - avatar: json.containsKey(r'avatar') ? Optional.present(AvatarUpdate.fromJson(json[r'avatar'])) : const Optional.absent(), - cast: json.containsKey(r'cast') ? Optional.present(CastUpdate.fromJson(json[r'cast'])) : const Optional.absent(), - download: json.containsKey(r'download') ? Optional.present(DownloadUpdate.fromJson(json[r'download'])) : const Optional.absent(), - emailNotifications: json.containsKey(r'emailNotifications') ? Optional.present(EmailNotificationsUpdate.fromJson(json[r'emailNotifications'])) : const Optional.absent(), - folders: json.containsKey(r'folders') ? Optional.present(FoldersUpdate.fromJson(json[r'folders'])) : const Optional.absent(), - memories: json.containsKey(r'memories') ? Optional.present(MemoriesUpdate.fromJson(json[r'memories'])) : const Optional.absent(), - people: json.containsKey(r'people') ? Optional.present(PeopleUpdate.fromJson(json[r'people'])) : const Optional.absent(), - purchase: json.containsKey(r'purchase') ? Optional.present(PurchaseUpdate.fromJson(json[r'purchase'])) : const Optional.absent(), - ratings: json.containsKey(r'ratings') ? Optional.present(RatingsUpdate.fromJson(json[r'ratings'])) : const Optional.absent(), - sharedLinks: json.containsKey(r'sharedLinks') ? Optional.present(SharedLinksUpdate.fromJson(json[r'sharedLinks'])) : const Optional.absent(), - tags: json.containsKey(r'tags') ? Optional.present(TagsUpdate.fromJson(json[r'tags'])) : const Optional.absent(), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = UserPreferencesUpdateDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = UserPreferencesUpdateDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of UserPreferencesUpdateDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = UserPreferencesUpdateDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - }; -} - diff --git a/mobile/openapi/lib/model/user_response_dto.dart b/mobile/openapi/lib/model/user_response_dto.dart deleted file mode 100644 index f671072c72..0000000000 --- a/mobile/openapi/lib/model/user_response_dto.dart +++ /dev/null @@ -1,144 +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 UserResponseDto { - /// Returns a new [UserResponseDto] instance. - UserResponseDto({ - required this.avatarColor, - required this.email, - required this.id, - required this.name, - required this.profileChangedAt, - required this.profileImagePath, - }); - - UserAvatarColor avatarColor; - - /// User email - String email; - - /// User ID - String id; - - /// User name - String name; - - /// Profile change date - DateTime profileChangedAt; - - /// Profile image path - String profileImagePath; - - @override - bool operator ==(Object other) => identical(this, other) || other is UserResponseDto && - other.avatarColor == avatarColor && - other.email == email && - other.id == id && - other.name == name && - other.profileChangedAt == profileChangedAt && - other.profileImagePath == profileImagePath; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (avatarColor.hashCode) + - (email.hashCode) + - (id.hashCode) + - (name.hashCode) + - (profileChangedAt.hashCode) + - (profileImagePath.hashCode); - - @override - String toString() => 'UserResponseDto[avatarColor=$avatarColor, email=$email, id=$id, name=$name, profileChangedAt=$profileChangedAt, profileImagePath=$profileImagePath]'; - - Map toJson() { - final json = {}; - json[r'avatarColor'] = this.avatarColor; - json[r'email'] = this.email; - json[r'id'] = this.id; - json[r'name'] = this.name; - json[r'profileChangedAt'] = this.profileChangedAt.toUtc().toIso8601String(); - json[r'profileImagePath'] = this.profileImagePath; - return json; - } - - /// Returns a new [UserResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static UserResponseDto? fromJson(dynamic value) { - upgradeDto(value, "UserResponseDto"); - if (value is Map) { - final json = value.cast(); - - return UserResponseDto( - avatarColor: UserAvatarColor.fromJson(json[r'avatarColor'])!, - email: mapValueOfType(json, r'email')!, - id: mapValueOfType(json, r'id')!, - name: mapValueOfType(json, r'name')!, - profileChangedAt: mapDateTime(json, r'profileChangedAt', r'')!, - profileImagePath: mapValueOfType(json, r'profileImagePath')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = UserResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = UserResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of UserResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = UserResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'avatarColor', - 'email', - 'id', - 'name', - 'profileChangedAt', - 'profileImagePath', - }; -} - diff --git a/mobile/openapi/lib/model/user_status.dart b/mobile/openapi/lib/model/user_status.dart deleted file mode 100644 index 130bd650f2..0000000000 --- a/mobile/openapi/lib/model/user_status.dart +++ /dev/null @@ -1,88 +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; - -/// User status -class UserStatus { - /// Instantiate a new enum with the provided [value]. - const UserStatus._(this.value); - - /// The underlying value of this enum member. - final String value; - - @override - String toString() => value; - - String toJson() => value; - - static const active = UserStatus._(r'active'); - static const removing = UserStatus._(r'removing'); - static const deleted = UserStatus._(r'deleted'); - - /// List of all possible values in this [enum][UserStatus]. - static const values = [ - active, - removing, - deleted, - ]; - - static UserStatus? fromJson(dynamic value) => UserStatusTypeTransformer().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 = UserStatus.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } -} - -/// Transformation class that can [encode] an instance of [UserStatus] to String, -/// and [decode] dynamic data back to [UserStatus]. -class UserStatusTypeTransformer { - factory UserStatusTypeTransformer() => _instance ??= const UserStatusTypeTransformer._(); - - const UserStatusTypeTransformer._(); - - String encode(UserStatus data) => data.value; - - /// Decodes a [dynamic value][data] to a UserStatus. - /// - /// 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. - UserStatus? decode(dynamic data, {bool allowNull = true}) { - if (data != null) { - switch (data) { - case r'active': return UserStatus.active; - case r'removing': return UserStatus.removing; - case r'deleted': return UserStatus.deleted; - default: - if (!allowNull) { - throw ArgumentError('Unknown enum value to decode: $data'); - } - } - } - return null; - } - - /// Singleton [UserStatusTypeTransformer] instance. - static UserStatusTypeTransformer? _instance; -} - diff --git a/mobile/openapi/lib/model/user_update_me_dto.dart b/mobile/openapi/lib/model/user_update_me_dto.dart deleted file mode 100644 index c4859747a6..0000000000 --- a/mobile/openapi/lib/model/user_update_me_dto.dart +++ /dev/null @@ -1,152 +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 UserUpdateMeDto { - /// Returns a new [UserUpdateMeDto] instance. - UserUpdateMeDto({ - this.avatarColor = const Optional.absent(), - this.email = const Optional.absent(), - this.name = const Optional.absent(), - this.password = const Optional.absent(), - }); - - Optional avatarColor; - - /// User email - /// - /// 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. - /// - Optional email; - - /// User name - /// - /// 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. - /// - Optional name; - - /// User password (deprecated, use change password endpoint) - /// - /// 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. - /// - Optional password; - - @override - bool operator ==(Object other) => identical(this, other) || other is UserUpdateMeDto && - other.avatarColor == avatarColor && - other.email == email && - other.name == name && - other.password == password; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (avatarColor == null ? 0 : avatarColor!.hashCode) + - (email == null ? 0 : email!.hashCode) + - (name == null ? 0 : name!.hashCode) + - (password == null ? 0 : password!.hashCode); - - @override - String toString() => 'UserUpdateMeDto[avatarColor=$avatarColor, email=$email, name=$name, password=$password]'; - - Map toJson() { - final json = {}; - if (this.avatarColor.isPresent) { - final value = this.avatarColor.value; - json[r'avatarColor'] = value; - } - if (this.email.isPresent) { - final value = this.email.value; - json[r'email'] = value; - } - if (this.name.isPresent) { - final value = this.name.value; - json[r'name'] = value; - } - if (this.password.isPresent) { - final value = this.password.value; - json[r'password'] = value; - } - return json; - } - - /// Returns a new [UserUpdateMeDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static UserUpdateMeDto? fromJson(dynamic value) { - upgradeDto(value, "UserUpdateMeDto"); - if (value is Map) { - final json = value.cast(); - - return UserUpdateMeDto( - avatarColor: json.containsKey(r'avatarColor') ? Optional.present(UserAvatarColor.fromJson(json[r'avatarColor'])) : const Optional.absent(), - email: json.containsKey(r'email') ? Optional.present(mapValueOfType(json, r'email')) : const Optional.absent(), - name: json.containsKey(r'name') ? Optional.present(mapValueOfType(json, r'name')) : const Optional.absent(), - password: json.containsKey(r'password') ? Optional.present(mapValueOfType(json, r'password')) : const Optional.absent(), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = UserUpdateMeDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = UserUpdateMeDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of UserUpdateMeDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = UserUpdateMeDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - }; -} - diff --git a/mobile/openapi/lib/model/validate_access_token_response_dto.dart b/mobile/openapi/lib/model/validate_access_token_response_dto.dart deleted file mode 100644 index 16b9d0f925..0000000000 --- a/mobile/openapi/lib/model/validate_access_token_response_dto.dart +++ /dev/null @@ -1,100 +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 ValidateAccessTokenResponseDto { - /// Returns a new [ValidateAccessTokenResponseDto] instance. - ValidateAccessTokenResponseDto({ - required this.authStatus, - }); - - /// Authentication status - bool authStatus; - - @override - bool operator ==(Object other) => identical(this, other) || other is ValidateAccessTokenResponseDto && - other.authStatus == authStatus; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (authStatus.hashCode); - - @override - String toString() => 'ValidateAccessTokenResponseDto[authStatus=$authStatus]'; - - Map toJson() { - final json = {}; - json[r'authStatus'] = this.authStatus; - return json; - } - - /// Returns a new [ValidateAccessTokenResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static ValidateAccessTokenResponseDto? fromJson(dynamic value) { - upgradeDto(value, "ValidateAccessTokenResponseDto"); - if (value is Map) { - final json = value.cast(); - - return ValidateAccessTokenResponseDto( - authStatus: mapValueOfType(json, r'authStatus')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = ValidateAccessTokenResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = ValidateAccessTokenResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of ValidateAccessTokenResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = ValidateAccessTokenResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'authStatus', - }; -} - diff --git a/mobile/openapi/lib/model/validate_library_dto.dart b/mobile/openapi/lib/model/validate_library_dto.dart deleted file mode 100644 index 6d85712191..0000000000 --- a/mobile/openapi/lib/model/validate_library_dto.dart +++ /dev/null @@ -1,117 +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 ValidateLibraryDto { - /// Returns a new [ValidateLibraryDto] instance. - ValidateLibraryDto({ - this.exclusionPatterns = const Optional.present(const []), - this.importPaths = const Optional.present(const []), - }); - - /// Exclusion patterns (max 128) - Optional?> exclusionPatterns; - - /// Import paths to validate (max 128) - Optional?> importPaths; - - @override - bool operator ==(Object other) => identical(this, other) || other is ValidateLibraryDto && - _deepEquality.equals(other.exclusionPatterns, exclusionPatterns) && - _deepEquality.equals(other.importPaths, importPaths); - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (exclusionPatterns.hashCode) + - (importPaths.hashCode); - - @override - String toString() => 'ValidateLibraryDto[exclusionPatterns=$exclusionPatterns, importPaths=$importPaths]'; - - Map toJson() { - final json = {}; - if (this.exclusionPatterns.isPresent) { - final value = this.exclusionPatterns.value; - json[r'exclusionPatterns'] = value; - } - if (this.importPaths.isPresent) { - final value = this.importPaths.value; - json[r'importPaths'] = value; - } - return json; - } - - /// Returns a new [ValidateLibraryDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static ValidateLibraryDto? fromJson(dynamic value) { - upgradeDto(value, "ValidateLibraryDto"); - if (value is Map) { - final json = value.cast(); - - return ValidateLibraryDto( - exclusionPatterns: json.containsKey(r'exclusionPatterns') ? Optional.present(json[r'exclusionPatterns'] is Iterable - ? (json[r'exclusionPatterns'] as Iterable).cast().toList(growable: false) - : const []) : const Optional.absent(), - importPaths: json.containsKey(r'importPaths') ? Optional.present(json[r'importPaths'] is Iterable - ? (json[r'importPaths'] as Iterable).cast().toList(growable: false) - : const []) : const Optional.absent(), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = ValidateLibraryDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = ValidateLibraryDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of ValidateLibraryDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = ValidateLibraryDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - }; -} - diff --git a/mobile/openapi/lib/model/validate_library_import_path_response_dto.dart b/mobile/openapi/lib/model/validate_library_import_path_response_dto.dart deleted file mode 100644 index 3c8d7c58cd..0000000000 --- a/mobile/openapi/lib/model/validate_library_import_path_response_dto.dart +++ /dev/null @@ -1,126 +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 ValidateLibraryImportPathResponseDto { - /// Returns a new [ValidateLibraryImportPathResponseDto] instance. - ValidateLibraryImportPathResponseDto({ - required this.importPath, - required this.isValid, - this.message = const Optional.absent(), - }); - - /// Import path - String importPath; - - /// Is valid - bool isValid; - - /// Validation message - /// - /// 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. - /// - Optional message; - - @override - bool operator ==(Object other) => identical(this, other) || other is ValidateLibraryImportPathResponseDto && - other.importPath == importPath && - other.isValid == isValid && - other.message == message; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (importPath.hashCode) + - (isValid.hashCode) + - (message == null ? 0 : message!.hashCode); - - @override - String toString() => 'ValidateLibraryImportPathResponseDto[importPath=$importPath, isValid=$isValid, message=$message]'; - - Map toJson() { - final json = {}; - json[r'importPath'] = this.importPath; - json[r'isValid'] = this.isValid; - if (this.message.isPresent) { - final value = this.message.value; - json[r'message'] = value; - } - return json; - } - - /// Returns a new [ValidateLibraryImportPathResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static ValidateLibraryImportPathResponseDto? fromJson(dynamic value) { - upgradeDto(value, "ValidateLibraryImportPathResponseDto"); - if (value is Map) { - final json = value.cast(); - - return ValidateLibraryImportPathResponseDto( - importPath: mapValueOfType(json, r'importPath')!, - isValid: mapValueOfType(json, r'isValid')!, - message: json.containsKey(r'message') ? Optional.present(mapValueOfType(json, r'message')) : const Optional.absent(), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = ValidateLibraryImportPathResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = ValidateLibraryImportPathResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of ValidateLibraryImportPathResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = ValidateLibraryImportPathResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'importPath', - 'isValid', - }; -} - diff --git a/mobile/openapi/lib/model/validate_library_response_dto.dart b/mobile/openapi/lib/model/validate_library_response_dto.dart deleted file mode 100644 index 5106b93ca8..0000000000 --- a/mobile/openapi/lib/model/validate_library_response_dto.dart +++ /dev/null @@ -1,102 +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 ValidateLibraryResponseDto { - /// Returns a new [ValidateLibraryResponseDto] instance. - ValidateLibraryResponseDto({ - this.importPaths = const Optional.present(const []), - }); - - /// Validation results for import paths - Optional?> importPaths; - - @override - bool operator ==(Object other) => identical(this, other) || other is ValidateLibraryResponseDto && - _deepEquality.equals(other.importPaths, importPaths); - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (importPaths.hashCode); - - @override - String toString() => 'ValidateLibraryResponseDto[importPaths=$importPaths]'; - - Map toJson() { - final json = {}; - if (this.importPaths.isPresent) { - final value = this.importPaths.value; - json[r'importPaths'] = value; - } - return json; - } - - /// Returns a new [ValidateLibraryResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static ValidateLibraryResponseDto? fromJson(dynamic value) { - upgradeDto(value, "ValidateLibraryResponseDto"); - if (value is Map) { - final json = value.cast(); - - return ValidateLibraryResponseDto( - importPaths: json.containsKey(r'importPaths') ? Optional.present(ValidateLibraryImportPathResponseDto.listFromJson(json[r'importPaths'])) : const Optional.absent(), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = ValidateLibraryResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = ValidateLibraryResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of ValidateLibraryResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = ValidateLibraryResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - }; -} - diff --git a/mobile/openapi/lib/model/version_check_state_response_dto.dart b/mobile/openapi/lib/model/version_check_state_response_dto.dart deleted file mode 100644 index 4ad9458a1b..0000000000 --- a/mobile/openapi/lib/model/version_check_state_response_dto.dart +++ /dev/null @@ -1,117 +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 VersionCheckStateResponseDto { - /// Returns a new [VersionCheckStateResponseDto] instance. - VersionCheckStateResponseDto({ - required this.checkedAt, - required this.releaseVersion, - }); - - /// Last check timestamp - String? checkedAt; - - /// Release version - String? releaseVersion; - - @override - bool operator ==(Object other) => identical(this, other) || other is VersionCheckStateResponseDto && - other.checkedAt == checkedAt && - other.releaseVersion == releaseVersion; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (checkedAt == null ? 0 : checkedAt!.hashCode) + - (releaseVersion == null ? 0 : releaseVersion!.hashCode); - - @override - String toString() => 'VersionCheckStateResponseDto[checkedAt=$checkedAt, releaseVersion=$releaseVersion]'; - - Map toJson() { - final json = {}; - if (this.checkedAt != null) { - json[r'checkedAt'] = this.checkedAt; - } else { - json[r'checkedAt'] = null; - } - if (this.releaseVersion != null) { - json[r'releaseVersion'] = this.releaseVersion; - } else { - json[r'releaseVersion'] = null; - } - return json; - } - - /// Returns a new [VersionCheckStateResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static VersionCheckStateResponseDto? fromJson(dynamic value) { - upgradeDto(value, "VersionCheckStateResponseDto"); - if (value is Map) { - final json = value.cast(); - - return VersionCheckStateResponseDto( - checkedAt: mapValueOfType(json, r'checkedAt'), - releaseVersion: mapValueOfType(json, r'releaseVersion'), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = VersionCheckStateResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = VersionCheckStateResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of VersionCheckStateResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = VersionCheckStateResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'checkedAt', - 'releaseVersion', - }; -} - diff --git a/mobile/openapi/lib/model/video_codec.dart b/mobile/openapi/lib/model/video_codec.dart deleted file mode 100644 index ba6441c8f7..0000000000 --- a/mobile/openapi/lib/model/video_codec.dart +++ /dev/null @@ -1,91 +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; - -/// Target video codec -class VideoCodec { - /// Instantiate a new enum with the provided [value]. - const VideoCodec._(this.value); - - /// The underlying value of this enum member. - final String value; - - @override - String toString() => value; - - String toJson() => value; - - static const h264 = VideoCodec._(r'h264'); - static const hevc = VideoCodec._(r'hevc'); - static const vp9 = VideoCodec._(r'vp9'); - static const av1 = VideoCodec._(r'av1'); - - /// List of all possible values in this [enum][VideoCodec]. - static const values = [ - h264, - hevc, - vp9, - av1, - ]; - - static VideoCodec? fromJson(dynamic value) => VideoCodecTypeTransformer().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 = VideoCodec.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } -} - -/// Transformation class that can [encode] an instance of [VideoCodec] to String, -/// and [decode] dynamic data back to [VideoCodec]. -class VideoCodecTypeTransformer { - factory VideoCodecTypeTransformer() => _instance ??= const VideoCodecTypeTransformer._(); - - const VideoCodecTypeTransformer._(); - - String encode(VideoCodec data) => data.value; - - /// Decodes a [dynamic value][data] to a VideoCodec. - /// - /// 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. - VideoCodec? decode(dynamic data, {bool allowNull = true}) { - if (data != null) { - switch (data) { - case r'h264': return VideoCodec.h264; - case r'hevc': return VideoCodec.hevc; - case r'vp9': return VideoCodec.vp9; - case r'av1': return VideoCodec.av1; - default: - if (!allowNull) { - throw ArgumentError('Unknown enum value to decode: $data'); - } - } - } - return null; - } - - /// Singleton [VideoCodecTypeTransformer] instance. - static VideoCodecTypeTransformer? _instance; -} - diff --git a/mobile/openapi/lib/model/video_container.dart b/mobile/openapi/lib/model/video_container.dart deleted file mode 100644 index a291fabf6e..0000000000 --- a/mobile/openapi/lib/model/video_container.dart +++ /dev/null @@ -1,91 +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; - -/// Accepted video containers -class VideoContainer { - /// Instantiate a new enum with the provided [value]. - const VideoContainer._(this.value); - - /// The underlying value of this enum member. - final String value; - - @override - String toString() => value; - - String toJson() => value; - - static const mov = VideoContainer._(r'mov'); - static const mp4 = VideoContainer._(r'mp4'); - static const ogg = VideoContainer._(r'ogg'); - static const webm = VideoContainer._(r'webm'); - - /// List of all possible values in this [enum][VideoContainer]. - static const values = [ - mov, - mp4, - ogg, - webm, - ]; - - static VideoContainer? fromJson(dynamic value) => VideoContainerTypeTransformer().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 = VideoContainer.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } -} - -/// Transformation class that can [encode] an instance of [VideoContainer] to String, -/// and [decode] dynamic data back to [VideoContainer]. -class VideoContainerTypeTransformer { - factory VideoContainerTypeTransformer() => _instance ??= const VideoContainerTypeTransformer._(); - - const VideoContainerTypeTransformer._(); - - String encode(VideoContainer data) => data.value; - - /// Decodes a [dynamic value][data] to a VideoContainer. - /// - /// 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. - VideoContainer? decode(dynamic data, {bool allowNull = true}) { - if (data != null) { - switch (data) { - case r'mov': return VideoContainer.mov; - case r'mp4': return VideoContainer.mp4; - case r'ogg': return VideoContainer.ogg; - case r'webm': return VideoContainer.webm; - default: - if (!allowNull) { - throw ArgumentError('Unknown enum value to decode: $data'); - } - } - } - return null; - } - - /// Singleton [VideoContainerTypeTransformer] instance. - static VideoContainerTypeTransformer? _instance; -} - diff --git a/mobile/openapi/lib/model/workflow_create_dto.dart b/mobile/openapi/lib/model/workflow_create_dto.dart deleted file mode 100644 index e84554e8c9..0000000000 --- a/mobile/openapi/lib/model/workflow_create_dto.dart +++ /dev/null @@ -1,148 +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 WorkflowCreateDto { - /// Returns a new [WorkflowCreateDto] instance. - WorkflowCreateDto({ - this.description = const Optional.absent(), - this.enabled = const Optional.absent(), - this.name = const Optional.absent(), - this.steps = const Optional.present(const []), - required this.trigger, - }); - - /// Workflow description - Optional description; - - /// Workflow enabled - /// - /// 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. - /// - Optional enabled; - - /// Workflow name - Optional name; - - Optional?> steps; - - WorkflowTrigger trigger; - - @override - bool operator ==(Object other) => identical(this, other) || other is WorkflowCreateDto && - other.description == description && - other.enabled == enabled && - other.name == name && - _deepEquality.equals(other.steps, steps) && - other.trigger == trigger; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (description == null ? 0 : description!.hashCode) + - (enabled == null ? 0 : enabled!.hashCode) + - (name == null ? 0 : name!.hashCode) + - (steps.hashCode) + - (trigger.hashCode); - - @override - String toString() => 'WorkflowCreateDto[description=$description, enabled=$enabled, name=$name, steps=$steps, trigger=$trigger]'; - - Map toJson() { - final json = {}; - if (this.description.isPresent) { - final value = this.description.value; - json[r'description'] = value; - } - if (this.enabled.isPresent) { - final value = this.enabled.value; - json[r'enabled'] = value; - } - if (this.name.isPresent) { - final value = this.name.value; - json[r'name'] = value; - } - if (this.steps.isPresent) { - final value = this.steps.value; - json[r'steps'] = value; - } - json[r'trigger'] = this.trigger; - return json; - } - - /// Returns a new [WorkflowCreateDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static WorkflowCreateDto? fromJson(dynamic value) { - upgradeDto(value, "WorkflowCreateDto"); - if (value is Map) { - final json = value.cast(); - - return WorkflowCreateDto( - description: json.containsKey(r'description') ? Optional.present(mapValueOfType(json, r'description')) : const Optional.absent(), - enabled: json.containsKey(r'enabled') ? Optional.present(mapValueOfType(json, r'enabled')) : const Optional.absent(), - name: json.containsKey(r'name') ? Optional.present(mapValueOfType(json, r'name')) : const Optional.absent(), - steps: json.containsKey(r'steps') ? Optional.present(WorkflowStepDto.listFromJson(json[r'steps'])) : const Optional.absent(), - trigger: WorkflowTrigger.fromJson(json[r'trigger'])!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = WorkflowCreateDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = WorkflowCreateDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of WorkflowCreateDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = WorkflowCreateDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'trigger', - }; -} - diff --git a/mobile/openapi/lib/model/workflow_response_dto.dart b/mobile/openapi/lib/model/workflow_response_dto.dart deleted file mode 100644 index b2b5586601..0000000000 --- a/mobile/openapi/lib/model/workflow_response_dto.dart +++ /dev/null @@ -1,170 +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 WorkflowResponseDto { - /// Returns a new [WorkflowResponseDto] instance. - WorkflowResponseDto({ - required this.createdAt, - required this.description, - required this.enabled, - required this.id, - required this.name, - this.steps = const [], - required this.trigger, - required this.updatedAt, - }); - - /// Creation date - String createdAt; - - /// Workflow description - String? description; - - /// Workflow enabled - bool enabled; - - /// Workflow ID - String id; - - /// Workflow name - String? name; - - /// Workflow steps - List steps; - - WorkflowTrigger trigger; - - /// Update date - String updatedAt; - - @override - bool operator ==(Object other) => identical(this, other) || other is WorkflowResponseDto && - other.createdAt == createdAt && - other.description == description && - other.enabled == enabled && - other.id == id && - other.name == name && - _deepEquality.equals(other.steps, steps) && - other.trigger == trigger && - other.updatedAt == updatedAt; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (createdAt.hashCode) + - (description == null ? 0 : description!.hashCode) + - (enabled.hashCode) + - (id.hashCode) + - (name == null ? 0 : name!.hashCode) + - (steps.hashCode) + - (trigger.hashCode) + - (updatedAt.hashCode); - - @override - String toString() => 'WorkflowResponseDto[createdAt=$createdAt, description=$description, enabled=$enabled, id=$id, name=$name, steps=$steps, trigger=$trigger, updatedAt=$updatedAt]'; - - Map toJson() { - final json = {}; - json[r'createdAt'] = this.createdAt; - if (this.description != null) { - json[r'description'] = this.description; - } else { - json[r'description'] = null; - } - json[r'enabled'] = this.enabled; - json[r'id'] = this.id; - if (this.name != null) { - json[r'name'] = this.name; - } else { - json[r'name'] = null; - } - json[r'steps'] = this.steps; - json[r'trigger'] = this.trigger; - json[r'updatedAt'] = this.updatedAt; - return json; - } - - /// Returns a new [WorkflowResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static WorkflowResponseDto? fromJson(dynamic value) { - upgradeDto(value, "WorkflowResponseDto"); - if (value is Map) { - final json = value.cast(); - - return WorkflowResponseDto( - createdAt: mapValueOfType(json, r'createdAt')!, - description: mapValueOfType(json, r'description'), - enabled: mapValueOfType(json, r'enabled')!, - id: mapValueOfType(json, r'id')!, - name: mapValueOfType(json, r'name'), - steps: WorkflowStepDto.listFromJson(json[r'steps']), - trigger: WorkflowTrigger.fromJson(json[r'trigger'])!, - updatedAt: mapValueOfType(json, r'updatedAt')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = WorkflowResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = WorkflowResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of WorkflowResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = WorkflowResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'createdAt', - 'description', - 'enabled', - 'id', - 'name', - 'steps', - 'trigger', - 'updatedAt', - }; -} - diff --git a/mobile/openapi/lib/model/workflow_share_response_dto.dart b/mobile/openapi/lib/model/workflow_share_response_dto.dart deleted file mode 100644 index d7e90085c2..0000000000 --- a/mobile/openapi/lib/model/workflow_share_response_dto.dart +++ /dev/null @@ -1,134 +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 WorkflowShareResponseDto { - /// Returns a new [WorkflowShareResponseDto] instance. - WorkflowShareResponseDto({ - required this.description, - required this.name, - this.steps = const [], - required this.trigger, - }); - - /// Workflow description - String? description; - - /// Workflow name - String? name; - - /// Workflow steps - List steps; - - WorkflowTrigger trigger; - - @override - bool operator ==(Object other) => identical(this, other) || other is WorkflowShareResponseDto && - other.description == description && - other.name == name && - _deepEquality.equals(other.steps, steps) && - other.trigger == trigger; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (description == null ? 0 : description!.hashCode) + - (name == null ? 0 : name!.hashCode) + - (steps.hashCode) + - (trigger.hashCode); - - @override - String toString() => 'WorkflowShareResponseDto[description=$description, name=$name, steps=$steps, trigger=$trigger]'; - - Map toJson() { - final json = {}; - if (this.description != null) { - json[r'description'] = this.description; - } else { - json[r'description'] = null; - } - if (this.name != null) { - json[r'name'] = this.name; - } else { - json[r'name'] = null; - } - json[r'steps'] = this.steps; - json[r'trigger'] = this.trigger; - return json; - } - - /// Returns a new [WorkflowShareResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static WorkflowShareResponseDto? fromJson(dynamic value) { - upgradeDto(value, "WorkflowShareResponseDto"); - if (value is Map) { - final json = value.cast(); - - return WorkflowShareResponseDto( - description: mapValueOfType(json, r'description'), - name: mapValueOfType(json, r'name'), - steps: WorkflowShareStepDto.listFromJson(json[r'steps']), - trigger: WorkflowTrigger.fromJson(json[r'trigger'])!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = WorkflowShareResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = WorkflowShareResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of WorkflowShareResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = WorkflowShareResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'description', - 'name', - 'steps', - 'trigger', - }; -} - diff --git a/mobile/openapi/lib/model/workflow_share_step_dto.dart b/mobile/openapi/lib/model/workflow_share_step_dto.dart deleted file mode 100644 index eeb6ba4e51..0000000000 --- a/mobile/openapi/lib/model/workflow_share_step_dto.dart +++ /dev/null @@ -1,130 +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 WorkflowShareStepDto { - /// Returns a new [WorkflowShareStepDto] instance. - WorkflowShareStepDto({ - this.config = const {}, - this.enabled = const Optional.absent(), - required this.method, - }); - - /// Step configuration - Map? config; - - /// Step is enabled - /// - /// 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. - /// - Optional enabled; - - /// Step plugin method - String method; - - @override - bool operator ==(Object other) => identical(this, other) || other is WorkflowShareStepDto && - _deepEquality.equals(other.config, config) && - other.enabled == enabled && - other.method == method; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (config == null ? 0 : config!.hashCode) + - (enabled == null ? 0 : enabled!.hashCode) + - (method.hashCode); - - @override - String toString() => 'WorkflowShareStepDto[config=$config, enabled=$enabled, method=$method]'; - - Map toJson() { - final json = {}; - if (this.config != null) { - json[r'config'] = this.config; - } else { - json[r'config'] = null; - } - if (this.enabled.isPresent) { - final value = this.enabled.value; - json[r'enabled'] = value; - } - json[r'method'] = this.method; - return json; - } - - /// Returns a new [WorkflowShareStepDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static WorkflowShareStepDto? fromJson(dynamic value) { - upgradeDto(value, "WorkflowShareStepDto"); - if (value is Map) { - final json = value.cast(); - - return WorkflowShareStepDto( - config: mapCastOfType(json, r'config'), - enabled: json.containsKey(r'enabled') ? Optional.present(mapValueOfType(json, r'enabled')) : const Optional.absent(), - method: mapValueOfType(json, r'method')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = WorkflowShareStepDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = WorkflowShareStepDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of WorkflowShareStepDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = WorkflowShareStepDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'config', - 'method', - }; -} - diff --git a/mobile/openapi/lib/model/workflow_step_dto.dart b/mobile/openapi/lib/model/workflow_step_dto.dart deleted file mode 100644 index c01e8e6b44..0000000000 --- a/mobile/openapi/lib/model/workflow_step_dto.dart +++ /dev/null @@ -1,130 +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 WorkflowStepDto { - /// Returns a new [WorkflowStepDto] instance. - WorkflowStepDto({ - this.config = const {}, - this.enabled = const Optional.absent(), - required this.method, - }); - - /// Step configuration - Map? config; - - /// Step is enabled - /// - /// 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. - /// - Optional enabled; - - /// Step plugin method - String method; - - @override - bool operator ==(Object other) => identical(this, other) || other is WorkflowStepDto && - _deepEquality.equals(other.config, config) && - other.enabled == enabled && - other.method == method; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (config == null ? 0 : config!.hashCode) + - (enabled == null ? 0 : enabled!.hashCode) + - (method.hashCode); - - @override - String toString() => 'WorkflowStepDto[config=$config, enabled=$enabled, method=$method]'; - - Map toJson() { - final json = {}; - if (this.config != null) { - json[r'config'] = this.config; - } else { - json[r'config'] = null; - } - if (this.enabled.isPresent) { - final value = this.enabled.value; - json[r'enabled'] = value; - } - json[r'method'] = this.method; - return json; - } - - /// Returns a new [WorkflowStepDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static WorkflowStepDto? fromJson(dynamic value) { - upgradeDto(value, "WorkflowStepDto"); - if (value is Map) { - final json = value.cast(); - - return WorkflowStepDto( - config: mapCastOfType(json, r'config'), - enabled: json.containsKey(r'enabled') ? Optional.present(mapValueOfType(json, r'enabled')) : const Optional.absent(), - method: mapValueOfType(json, r'method')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = WorkflowStepDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = WorkflowStepDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of WorkflowStepDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = WorkflowStepDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'config', - 'method', - }; -} - diff --git a/mobile/openapi/lib/model/workflow_trigger.dart b/mobile/openapi/lib/model/workflow_trigger.dart deleted file mode 100644 index b9c0597b28..0000000000 --- a/mobile/openapi/lib/model/workflow_trigger.dart +++ /dev/null @@ -1,85 +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; - -/// Plugin trigger type -class WorkflowTrigger { - /// Instantiate a new enum with the provided [value]. - const WorkflowTrigger._(this.value); - - /// The underlying value of this enum member. - final String value; - - @override - String toString() => value; - - String toJson() => value; - - static const assetCreate = WorkflowTrigger._(r'AssetCreate'); - static const assetMetadataExtraction = WorkflowTrigger._(r'AssetMetadataExtraction'); - - /// List of all possible values in this [enum][WorkflowTrigger]. - static const values = [ - assetCreate, - assetMetadataExtraction, - ]; - - static WorkflowTrigger? fromJson(dynamic value) => WorkflowTriggerTypeTransformer().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 = WorkflowTrigger.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } -} - -/// Transformation class that can [encode] an instance of [WorkflowTrigger] to String, -/// and [decode] dynamic data back to [WorkflowTrigger]. -class WorkflowTriggerTypeTransformer { - factory WorkflowTriggerTypeTransformer() => _instance ??= const WorkflowTriggerTypeTransformer._(); - - const WorkflowTriggerTypeTransformer._(); - - String encode(WorkflowTrigger data) => data.value; - - /// Decodes a [dynamic value][data] to a WorkflowTrigger. - /// - /// 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. - WorkflowTrigger? decode(dynamic data, {bool allowNull = true}) { - if (data != null) { - switch (data) { - case r'AssetCreate': return WorkflowTrigger.assetCreate; - case r'AssetMetadataExtraction': return WorkflowTrigger.assetMetadataExtraction; - default: - if (!allowNull) { - throw ArgumentError('Unknown enum value to decode: $data'); - } - } - } - return null; - } - - /// Singleton [WorkflowTriggerTypeTransformer] instance. - static WorkflowTriggerTypeTransformer? _instance; -} - diff --git a/mobile/openapi/lib/model/workflow_trigger_response_dto.dart b/mobile/openapi/lib/model/workflow_trigger_response_dto.dart deleted file mode 100644 index 6e24e1559a..0000000000 --- a/mobile/openapi/lib/model/workflow_trigger_response_dto.dart +++ /dev/null @@ -1,108 +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 WorkflowTriggerResponseDto { - /// Returns a new [WorkflowTriggerResponseDto] instance. - WorkflowTriggerResponseDto({ - required this.trigger, - this.types = const [], - }); - - WorkflowTrigger trigger; - - /// Workflow types - List types; - - @override - bool operator ==(Object other) => identical(this, other) || other is WorkflowTriggerResponseDto && - other.trigger == trigger && - _deepEquality.equals(other.types, types); - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (trigger.hashCode) + - (types.hashCode); - - @override - String toString() => 'WorkflowTriggerResponseDto[trigger=$trigger, types=$types]'; - - Map toJson() { - final json = {}; - json[r'trigger'] = this.trigger; - json[r'types'] = this.types; - return json; - } - - /// Returns a new [WorkflowTriggerResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static WorkflowTriggerResponseDto? fromJson(dynamic value) { - upgradeDto(value, "WorkflowTriggerResponseDto"); - if (value is Map) { - final json = value.cast(); - - return WorkflowTriggerResponseDto( - trigger: WorkflowTrigger.fromJson(json[r'trigger'])!, - types: WorkflowType.listFromJson(json[r'types']), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = WorkflowTriggerResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = WorkflowTriggerResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of WorkflowTriggerResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = WorkflowTriggerResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'trigger', - 'types', - }; -} - diff --git a/mobile/openapi/lib/model/workflow_type.dart b/mobile/openapi/lib/model/workflow_type.dart deleted file mode 100644 index 0c87824bb1..0000000000 --- a/mobile/openapi/lib/model/workflow_type.dart +++ /dev/null @@ -1,82 +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; - -/// Workflow type -class WorkflowType { - /// Instantiate a new enum with the provided [value]. - const WorkflowType._(this.value); - - /// The underlying value of this enum member. - final String value; - - @override - String toString() => value; - - String toJson() => value; - - static const assetV1 = WorkflowType._(r'AssetV1'); - - /// List of all possible values in this [enum][WorkflowType]. - static const values = [ - assetV1, - ]; - - static WorkflowType? fromJson(dynamic value) => WorkflowTypeTypeTransformer().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 = WorkflowType.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } -} - -/// Transformation class that can [encode] an instance of [WorkflowType] to String, -/// and [decode] dynamic data back to [WorkflowType]. -class WorkflowTypeTypeTransformer { - factory WorkflowTypeTypeTransformer() => _instance ??= const WorkflowTypeTypeTransformer._(); - - const WorkflowTypeTypeTransformer._(); - - String encode(WorkflowType data) => data.value; - - /// Decodes a [dynamic value][data] to a WorkflowType. - /// - /// 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. - WorkflowType? decode(dynamic data, {bool allowNull = true}) { - if (data != null) { - switch (data) { - case r'AssetV1': return WorkflowType.assetV1; - default: - if (!allowNull) { - throw ArgumentError('Unknown enum value to decode: $data'); - } - } - } - return null; - } - - /// Singleton [WorkflowTypeTypeTransformer] instance. - static WorkflowTypeTypeTransformer? _instance; -} - diff --git a/mobile/openapi/lib/model/workflow_update_dto.dart b/mobile/openapi/lib/model/workflow_update_dto.dart deleted file mode 100644 index 32759b6395..0000000000 --- a/mobile/openapi/lib/model/workflow_update_dto.dart +++ /dev/null @@ -1,156 +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 WorkflowUpdateDto { - /// Returns a new [WorkflowUpdateDto] instance. - WorkflowUpdateDto({ - this.description = const Optional.absent(), - this.enabled = const Optional.absent(), - this.name = const Optional.absent(), - this.steps = const Optional.present(const []), - this.trigger = const Optional.absent(), - }); - - /// Workflow description - Optional description; - - /// Workflow enabled - /// - /// 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. - /// - Optional enabled; - - /// Workflow name - Optional name; - - Optional?> steps; - - /// - /// 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. - /// - Optional trigger; - - @override - bool operator ==(Object other) => identical(this, other) || other is WorkflowUpdateDto && - other.description == description && - other.enabled == enabled && - other.name == name && - _deepEquality.equals(other.steps, steps) && - other.trigger == trigger; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (description == null ? 0 : description!.hashCode) + - (enabled == null ? 0 : enabled!.hashCode) + - (name == null ? 0 : name!.hashCode) + - (steps.hashCode) + - (trigger == null ? 0 : trigger!.hashCode); - - @override - String toString() => 'WorkflowUpdateDto[description=$description, enabled=$enabled, name=$name, steps=$steps, trigger=$trigger]'; - - Map toJson() { - final json = {}; - if (this.description.isPresent) { - final value = this.description.value; - json[r'description'] = value; - } - if (this.enabled.isPresent) { - final value = this.enabled.value; - json[r'enabled'] = value; - } - if (this.name.isPresent) { - final value = this.name.value; - json[r'name'] = value; - } - if (this.steps.isPresent) { - final value = this.steps.value; - json[r'steps'] = value; - } - if (this.trigger.isPresent) { - final value = this.trigger.value; - json[r'trigger'] = value; - } - return json; - } - - /// Returns a new [WorkflowUpdateDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static WorkflowUpdateDto? fromJson(dynamic value) { - upgradeDto(value, "WorkflowUpdateDto"); - if (value is Map) { - final json = value.cast(); - - return WorkflowUpdateDto( - description: json.containsKey(r'description') ? Optional.present(mapValueOfType(json, r'description')) : const Optional.absent(), - enabled: json.containsKey(r'enabled') ? Optional.present(mapValueOfType(json, r'enabled')) : const Optional.absent(), - name: json.containsKey(r'name') ? Optional.present(mapValueOfType(json, r'name')) : const Optional.absent(), - steps: json.containsKey(r'steps') ? Optional.present(WorkflowStepDto.listFromJson(json[r'steps'])) : const Optional.absent(), - trigger: json.containsKey(r'trigger') ? Optional.present(WorkflowTrigger.fromJson(json[r'trigger'])) : const Optional.absent(), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = WorkflowUpdateDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = WorkflowUpdateDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of WorkflowUpdateDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = WorkflowUpdateDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - }; -} - diff --git a/mobile/openapi/lib/optional.dart b/mobile/openapi/lib/optional.dart deleted file mode 100644 index f260ec4a84..0000000000 --- a/mobile/openapi/lib/optional.dart +++ /dev/null @@ -1,119 +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; - -/// Represents an optional value that can be either absent or present. -/// -/// This is used to distinguish between three states in PATCH operations: -/// - Absent: Field is not set (omitted from JSON) -/// - Present with null: Field is explicitly set to null -/// - Present with value: Field has a value -/// -/// Example usage: -/// ```dart -/// // Field absent - not sent in request -/// final patch1 = Model(); -/// -/// // Field explicitly null - sends {"field": null} -/// final patch2 = Model(field: const Optional.present(null)); -/// -/// // Field has value - sends {"field": "value"} -/// final patch3 = Model(field: const Optional.present('value')); -/// ``` -abstract class Optional { - const Optional(); - - /// Creates an Optional with an absent value (not set). - const factory Optional.absent() = Absent; - - /// Creates an Optional with a present value (can be null). - const factory Optional.present(T value) = Present; - - /// Returns true if this Optional has a value (even if that value is null). - bool get isPresent; - - /// Returns true if this Optional does not have a value. - bool get isEmpty => !isPresent; - - /// Returns the value if present, throws if absent. - T get value; - - /// Returns the value if present, otherwise returns [defaultValue]. - T orElse(T defaultValue); - - /// Returns the value if present, otherwise returns the result of calling [defaultValue]. - T orElseGet(T Function() defaultValue); - - /// Maps the value if present using [transform], otherwise returns an absent Optional. - Optional map(R Function(T value) transform); -} - -/// Represents an absent Optional value. -class Absent extends Optional { - const Absent(); - - @override - bool get isPresent => false; - - @override - T get value => throw StateError('No value present'); - - @override - T orElse(T defaultValue) => defaultValue; - - @override - T orElseGet(T Function() defaultValue) => defaultValue(); - - @override - Optional map(R Function(T value) transform) => const Absent(); - - @override - bool operator ==(Object other) => other is Absent; - - @override - int get hashCode => 0; - - @override - String toString() => 'Optional.absent()'; -} - -/// Represents a present Optional value. -class Present extends Optional { - const Present(this._value); - - final T _value; - - @override - bool get isPresent => true; - - @override - T get value => _value; - - @override - T orElse(T defaultValue) => _value; - - @override - T orElseGet(T Function() defaultValue) => _value; - - @override - Optional map(R Function(T value) transform) => Optional.present(transform(_value)); - - @override - bool operator ==(Object other) => - identical(this, other) || - (other is Present && _value == other._value); - - @override - int get hashCode => _value.hashCode; - - @override - String toString() => 'Optional.present($_value)'; -} diff --git a/mobile/openapi/pubspec.yaml b/mobile/openapi/pubspec.yaml deleted file mode 100644 index 1c26f8707c..0000000000 --- a/mobile/openapi/pubspec.yaml +++ /dev/null @@ -1,17 +0,0 @@ -# -# AUTO-GENERATED FILE, DO NOT MODIFY! -# - -name: 'openapi' -version: '1.0.0' -description: 'OpenAPI API client' -homepage: 'homepage' -environment: - sdk: '>=2.12.0 <4.0.0' -dependencies: - collection: '>=1.17.0 <2.0.0' - http: '>=0.13.0 <2.0.0' - intl: any - meta: '>=1.1.8 <2.0.0' - immich_mobile: - path: ../ diff --git a/mobile/packages/ui/lib/immich_ui.dart b/mobile/packages/ui/lib/immich_ui.dart index 8ea88135e5..85875717a3 100644 --- a/mobile/packages/ui/lib/immich_ui.dart +++ b/mobile/packages/ui/lib/immich_ui.dart @@ -1,6 +1,7 @@ export 'src/color_override.dart'; export 'src/components/close_button.dart'; export 'src/components/column_button.dart'; +export 'src/components/email_input.dart'; export 'src/components/form.dart'; export 'src/components/formatted_text.dart'; export 'src/components/icon_button.dart'; diff --git a/mobile/packages/ui/lib/src/color_override.dart b/mobile/packages/ui/lib/src/color_override.dart index c0b8358bb5..873f5e42ef 100644 --- a/mobile/packages/ui/lib/src/color_override.dart +++ b/mobile/packages/ui/lib/src/color_override.dart @@ -3,7 +3,7 @@ import 'package:flutter/widgets.dart'; class ImmichColorOverride extends InheritedWidget { const ImmichColorOverride({super.key, required this.color, required super.child}); - final Color color; + final Color? color; static Color? maybeOf(BuildContext context) => context.dependOnInheritedWidgetOfExactType()?.color; diff --git a/mobile/packages/ui/lib/src/components/column_button.dart b/mobile/packages/ui/lib/src/components/column_button.dart index bf0023c1bc..03b6933389 100644 --- a/mobile/packages/ui/lib/src/components/column_button.dart +++ b/mobile/packages/ui/lib/src/components/column_button.dart @@ -1,4 +1,5 @@ import 'dart:async'; +import 'dart:core'; import 'package:flutter/material.dart'; import 'package:immich_ui/src/constants.dart'; @@ -8,6 +9,7 @@ class ImmichColumnButton extends StatefulWidget { final IconData icon; final String label; final FutureOr Function() onPressed; + final FutureOr Function()? onLongPress; final bool disabled; final bool? loading; @@ -16,6 +18,7 @@ class ImmichColumnButton extends StatefulWidget { required this.icon, required this.label, required this.onPressed, + this.onLongPress, this.disabled = false, this.loading, }); @@ -25,26 +28,33 @@ class ImmichColumnButton extends StatefulWidget { } class _ImmichColumnButtonState extends State { - bool _loading = false; - bool get _isLoading => widget.loading ?? _loading; + bool _running = false; + bool get _isLoading => widget.loading ?? _running; + bool get _isDisabled => widget.disabled || _isLoading; - Future _onPressed() async { - setState(() => _loading = true); + Future _runAction(FutureOr Function() action) async { + setState(() => _running = true); try { - await widget.onPressed(); + await action(); } finally { if (mounted) { - setState(() => _loading = false); + setState(() => _running = false); } } } + VoidCallback? get _onPressed => _isDisabled ? null : () => _runAction(widget.onPressed); + + VoidCallback? get _onLongPress => + _isDisabled || widget.onLongPress == null ? null : () => _runAction(widget.onLongPress!); + @override Widget build(BuildContext context) { final foreground = context.colorOverride ?? Theme.of(context).colorScheme.onSurface; return TextButton( - onPressed: widget.disabled || _isLoading ? null : _onPressed, + onPressed: _onPressed, + onLongPress: _onLongPress, style: TextButton.styleFrom( foregroundColor: foreground, padding: const .symmetric(horizontal: ImmichSpacing.sm, vertical: ImmichSpacing.md), diff --git a/mobile/packages/ui/lib/src/components/email_input.dart b/mobile/packages/ui/lib/src/components/email_input.dart new file mode 100644 index 0000000000..27d79e9f0e --- /dev/null +++ b/mobile/packages/ui/lib/src/components/email_input.dart @@ -0,0 +1,26 @@ +import 'package:flutter/services.dart'; +import 'package:immich_ui/src/components/text_input.dart'; + +/// An ImmichTextInput customized for receiving email addresses +class ImmichEmailInput extends ImmichTextInput { + const ImmichEmailInput({ + super.key, + super.controller, + super.focusNode, + super.label, + super.hintText, + super.validator, + super.onSubmit, + super.keyboardAction, + super.suffixIcon, + super.enabled, + super.autofocus, + super.autovalidateMode, + }) : super( + keyboardType: .emailAddress, + autofillHints: const [AutofillHints.email], + autocorrect: false, + smartDashesType: .disabled, + smartQuotesType: .disabled, + ); +} diff --git a/mobile/packages/ui/lib/src/components/icon_button.dart b/mobile/packages/ui/lib/src/components/icon_button.dart index b9bdd3a406..c0e1bcc3fa 100644 --- a/mobile/packages/ui/lib/src/components/icon_button.dart +++ b/mobile/packages/ui/lib/src/components/icon_button.dart @@ -7,6 +7,7 @@ import 'package:immich_ui/src/internal.dart'; class ImmichIconButton extends StatefulWidget { final IconData icon; final FutureOr Function() onPressed; + final FutureOr Function()? onLongPress; final ImmichVariant variant; final ImmichColor color; final bool disabled; @@ -16,6 +17,7 @@ class ImmichIconButton extends StatefulWidget { super.key, required this.icon, required this.onPressed, + this.onLongPress, this.color = .primary, this.variant = .filled, this.disabled = false, @@ -27,20 +29,26 @@ class ImmichIconButton extends StatefulWidget { } class _ImmichIconButtonState extends State { - bool _loading = false; - bool get _isLoading => widget.loading ?? _loading; + bool _running = false; + bool get _isLoading => widget.loading ?? _running; + bool get _isDisabled => widget.disabled || _isLoading; - Future _onPressed() async { - setState(() => _loading = true); + Future _runAction(FutureOr Function() action) async { + setState(() => _running = true); try { - await widget.onPressed(); + await action(); } finally { if (mounted) { - setState(() => _loading = false); + setState(() => _running = false); } } } + VoidCallback? get _onPressed => _isDisabled ? null : () => _runAction(widget.onPressed); + + VoidCallback? get _onLongPress => + _isDisabled || widget.onLongPress == null ? null : () => _runAction(widget.onLongPress!); + @override Widget build(BuildContext context) { final colorScheme = Theme.of(context).colorScheme; @@ -73,7 +81,8 @@ class _ImmichIconButtonState extends State { child: CircularProgressIndicator(strokeWidth: ImmichBorderWidth.md), ) : Icon(widget.icon), - onPressed: widget.disabled || _isLoading ? null : _onPressed, + onPressed: _onPressed, + onLongPress: _onLongPress, style: IconButton.styleFrom(backgroundColor: background, foregroundColor: foreground), ); } diff --git a/mobile/packages/ui/lib/src/components/password_input.dart b/mobile/packages/ui/lib/src/components/password_input.dart index e99e9730a8..aa66d43b4d 100644 --- a/mobile/packages/ui/lib/src/components/password_input.dart +++ b/mobile/packages/ui/lib/src/components/password_input.dart @@ -47,11 +47,14 @@ class _ImmichPasswordInputState extends State { onSubmit: widget.onSubmit, keyboardAction: widget.keyboardAction, obscureText: !_visible, + autocorrect: false, + smartDashesType: .disabled, + smartQuotesType: .disabled, suffixIcon: IconButton( onPressed: _toggleVisibility, icon: Icon(_visible ? Icons.visibility_off_rounded : Icons.visibility_rounded), ), - autofillHints: [AutofillHints.password], + autofillHints: const [AutofillHints.password], ); } } diff --git a/mobile/packages/ui/lib/src/components/text_button.dart b/mobile/packages/ui/lib/src/components/text_button.dart index fb3459897c..6cbc08473b 100644 --- a/mobile/packages/ui/lib/src/components/text_button.dart +++ b/mobile/packages/ui/lib/src/components/text_button.dart @@ -7,6 +7,7 @@ class ImmichTextButton extends StatefulWidget { final String labelText; final IconData? icon; final FutureOr Function() onPressed; + final FutureOr Function()? onLongPress; final ImmichVariant variant; final bool expanded; final bool disabled; @@ -17,6 +18,7 @@ class ImmichTextButton extends StatefulWidget { required this.labelText, this.icon, required this.onPressed, + this.onLongPress, this.variant = .filled, this.expanded = true, @@ -29,20 +31,26 @@ class ImmichTextButton extends StatefulWidget { } class _ImmichTextButtonState extends State { - bool _loading = false; - bool get _isLoading => widget.loading ?? _loading; + bool _running = false; + bool get _isLoading => widget.loading ?? _running; + bool get _isDisabled => widget.disabled || _isLoading; - Future _onPressed() async { - setState(() => _loading = true); + Future _runAction(FutureOr Function() action) async { + setState(() => _running = true); try { - await widget.onPressed(); + await action(); } finally { if (mounted) { - setState(() => _loading = false); + setState(() => _running = false); } } } + VoidCallback? get _onPressed => _isDisabled ? null : () => _runAction(widget.onPressed); + + VoidCallback? get _onLongPress => + _isDisabled || widget.onLongPress == null ? null : () => _runAction(widget.onLongPress!); + @override Widget build(BuildContext context) { final Widget? icon = _isLoading @@ -59,11 +67,22 @@ class _ImmichTextButtonState extends State { style: const .new(fontSize: ImmichTextSize.body, fontWeight: .bold), ); final style = ElevatedButton.styleFrom(padding: const .symmetric(vertical: ImmichSpacing.md)); - final onPressed = widget.disabled || _isLoading ? null : _onPressed; final button = switch (widget.variant) { - ImmichVariant.filled => ElevatedButton.icon(style: style, onPressed: onPressed, icon: icon, label: label), - ImmichVariant.ghost => TextButton.icon(style: style, onPressed: onPressed, icon: icon, label: label), + ImmichVariant.filled => ElevatedButton.icon( + style: style, + onPressed: _onPressed, + onLongPress: _onLongPress, + icon: icon, + label: label, + ), + ImmichVariant.ghost => TextButton.icon( + style: style, + onPressed: _onPressed, + onLongPress: _onLongPress, + icon: icon, + label: label, + ), }; if (widget.expanded) { diff --git a/mobile/packages/ui/lib/src/previews/email_input.dart b/mobile/packages/ui/lib/src/previews/email_input.dart new file mode 100644 index 0000000000..b9d1d64ea0 --- /dev/null +++ b/mobile/packages/ui/lib/src/previews/email_input.dart @@ -0,0 +1,28 @@ +import 'package:flutter/material.dart'; +import 'package:immich_ui/src/components/email_input.dart'; +import 'package:immich_ui/src/previews.dart'; + +@ImmichPreview(group: 'EmailInput', name: 'Basic') +Widget previewEmailInput() => const _PreviewEmailInput(); + +class _PreviewEmailInput extends StatefulWidget { + const _PreviewEmailInput(); + + @override + State<_PreviewEmailInput> createState() => _PreviewEmailInputState(); +} + +class _PreviewEmailInputState extends State<_PreviewEmailInput> { + final _controller = TextEditingController(); + + @override + void dispose() { + _controller.dispose(); + super.dispose(); + } + + @override + Widget build(BuildContext context) { + return ImmichEmailInput(label: 'Email', hintText: 'user@immich.app', controller: _controller); + } +} diff --git a/mobile/packages/ui/lib/src/snackbar.dart b/mobile/packages/ui/lib/src/snackbar.dart index a44be8d513..1ede1124a8 100644 --- a/mobile/packages/ui/lib/src/snackbar.dart +++ b/mobile/packages/ui/lib/src/snackbar.dart @@ -6,18 +6,23 @@ final scaffoldMessengerKey = GlobalKey(); class SnackbarManager { const SnackbarManager(); - ScaffoldFeatureController? show(String message, SnackbarType type) { + ScaffoldFeatureController? show( + String message, + SnackbarType type, { + Duration? duration, + }) { final messenger = scaffoldMessengerKey.currentState; final context = scaffoldMessengerKey.currentContext; if (messenger == null || context == null) { return null; } + duration ??= const .new(seconds: 4); messenger.hideCurrentSnackBar(); - return messenger.showSnackBar(_build(context, message, type)); + return messenger.showSnackBar(_build(context, message, type, duration)); } - SnackBar _build(BuildContext context, String message, SnackbarType type) { + SnackBar _build(BuildContext context, String message, SnackbarType type, Duration duration) { final theme = Theme.of(context); final colors = theme.extension() ?? ImmichColors.harmonized(theme.colorScheme); final (IconData icon, Color background, Color foreground) = switch (type) { @@ -29,7 +34,7 @@ class SnackbarManager { return SnackBar( behavior: .floating, backgroundColor: background, - duration: const .new(seconds: 4), + duration: duration, shape: const RoundedRectangleBorder(borderRadius: .all(.circular(ImmichRadius.sm))), content: Row( children: [ @@ -48,11 +53,14 @@ class SnackbarManager { ); } - ScaffoldFeatureController? info(String message) => show(message, .info); + ScaffoldFeatureController? info(String message, {Duration? duration}) => + show(message, .info, duration: duration); - ScaffoldFeatureController? success(String message) => show(message, .success); + ScaffoldFeatureController? success(String message, {Duration? duration}) => + show(message, .success, duration: duration); - ScaffoldFeatureController? error(String message) => show(message, .error); + ScaffoldFeatureController? error(String message, {Duration? duration}) => + show(message, .error, duration: duration); } const snackbar = SnackbarManager(); diff --git a/mobile/packages/ui/test/formatted_text_test.dart b/mobile/packages/ui/test/formatted_text_test.dart index c3901cd802..5f26822855 100644 --- a/mobile/packages/ui/test/formatted_text_test.dart +++ b/mobile/packages/ui/test/formatted_text_test.dart @@ -59,7 +59,7 @@ void main() { ); final text = tester.widget(find.byType(Text)); - final richText = text.textSpan as TextSpan; + final richText = text.textSpan! as TextSpan; expect(richText.style?.fontSize, 16); expect(richText.style?.color, Colors.purple); diff --git a/mobile/packages/ui/test/smart_punctuation_test.dart b/mobile/packages/ui/test/smart_punctuation_test.dart new file mode 100644 index 0000000000..93f1f7a92d --- /dev/null +++ b/mobile/packages/ui/test/smart_punctuation_test.dart @@ -0,0 +1,32 @@ +import 'package:flutter/material.dart'; +import 'package:flutter_test/flutter_test.dart'; +import 'package:immich_ui/src/components/email_input.dart'; +import 'package:immich_ui/src/components/password_input.dart'; + +import 'test_utils.dart'; + +void main() { + EditableText editable(WidgetTester tester) => tester.widget(find.byType(EditableText)); + + testWidgets('ImmichEmailInput disables smart punctuation', (tester) async { + await tester.pumpTestWidget(const ImmichEmailInput()); + + expect(editable(tester).smartDashesType, SmartDashesType.disabled); + expect(editable(tester).smartQuotesType, SmartQuotesType.disabled); + }); + + testWidgets('ImmichPasswordInput disables smart punctuation', (tester) async { + await tester.pumpTestWidget(const ImmichPasswordInput()); + + expect(editable(tester).obscureText, isTrue); + expect(editable(tester).smartDashesType, SmartDashesType.disabled); + expect(editable(tester).smartQuotesType, SmartQuotesType.disabled); + + await tester.tap(find.byIcon(Icons.visibility_rounded)); + await tester.pump(); + + expect(editable(tester).obscureText, isFalse); + expect(editable(tester).smartDashesType, SmartDashesType.disabled); + expect(editable(tester).smartQuotesType, SmartQuotesType.disabled); + }); +} diff --git a/mobile/pigeon/remote_image_api.dart b/mobile/pigeon/remote_image_api.dart index 7f0135acb8..277b7016fd 100644 --- a/mobile/pigeon/remote_image_api.dart +++ b/mobile/pigeon/remote_image_api.dart @@ -13,8 +13,15 @@ import 'package:pigeon/pigeon.dart'; ) @HostApi() abstract class RemoteImageApi { + /// Width and height are the physical decode size, or null for the source size. @async - Map? requestImage(String url, {required int requestId, required bool preferEncoded}); + Map? requestImage( + String url, { + required int requestId, + required bool preferEncoded, + int? width, + int? height, + }); void cancelRequest(int requestId); diff --git a/mobile/pubspec.lock b/mobile/pubspec.lock index 406199185c..f84d672090 100644 --- a/mobile/pubspec.lock +++ b/mobile/pubspec.lock @@ -309,8 +309,8 @@ packages: dependency: "direct main" description: path: "pkgs/cupertino_http" - ref: a0a933358517c6d01cff37fc2a2752ee2d744a3c - resolved-ref: a0a933358517c6d01cff37fc2a2752ee2d744a3c + ref: "58b03c756b81d16b3975a8ae4b91d25360123bb5" + resolved-ref: "58b03c756b81d16b3975a8ae4b91d25360123bb5" url: "https://github.com/mertalev/http" source: git version: "3.0.0-wip" @@ -366,18 +366,18 @@ packages: dependency: "direct main" description: name: drift - sha256: "8033500116b24398fba0cca0369cc31678cd627c01e41753a61186911cea743e" + sha256: "6cc0b623c0e83f7080524d8396e9301b1d78b9c66a4fdceeb0f798211303254c" url: "https://pub.dev" source: hosted - version: "2.33.0" + version: "2.34.0" drift_dev: dependency: "direct dev" description: name: drift_dev - sha256: b3dd5b75e30522a91da8abda9f5bb17230cb038097f6d15fa75d42bb563428aa + sha256: "9cfff1576b49725da0d32c040651a41ae195e8c4af8d8da301593e41d7abc2f7" url: "https://pub.dev" source: hosted - version: "2.33.0" + version: "2.34.0" drift_sqlite_async: dependency: "direct main" description: @@ -512,10 +512,10 @@ packages: dependency: "direct dev" description: name: flutter_lints - sha256: "5398f14efa795ffb7a33e9b6a08798b26a180edac4ad7db3f231e40f82ce11e1" + sha256: "3105dc8492f6183fb076ccf1f351ac3d60564bff92e20bfc4af9cc1651f4e7e1" url: "https://pub.dev" source: hosted - version: "5.0.0" + version: "6.0.0" flutter_local_notifications: dependency: "direct main" description: @@ -667,6 +667,22 @@ packages: url: "https://pub.dev" source: hosted version: "8.2.14" + freezed: + dependency: "direct dev" + description: + name: freezed + sha256: f23ea33b3863f119b58ed1b586e881a46bd28715ddcc4dbc33104524e3434131 + url: "https://pub.dev" + source: hosted + version: "3.2.5" + freezed_annotation: + dependency: "direct main" + description: + name: freezed_annotation + sha256: "7294967ff0a6d98638e7acb774aac3af2550777accd8149c90af5b014e6d44d8" + url: "https://pub.dev" + source: hosted + version: "3.1.0" frontend_server_client: dependency: transitive description: @@ -772,10 +788,10 @@ packages: dependency: "direct main" description: name: home_widget - sha256: "908d033514a981f829fd98213909e11a428104327be3b422718aa643ac9d084a" + sha256: fece84c7464099873c3ace38394ad7053509a4b0e36e57a1105a6aa31f47f23c url: "https://pub.dev" source: hosted - version: "0.8.1" + version: "0.9.3" hooks: dependency: transitive description: @@ -1000,10 +1016,10 @@ packages: dependency: transitive description: name: lints - sha256: c35bb79562d980e9a453fc715854e1ed39e24e7d0297a880ef54e17f9874a9d7 + sha256: "12f842a479589fea194fe5c5a3095abc7be0c1f2ddfa9a0e76aed1dbd26a87df" url: "https://pub.dev" source: hosted - version: "5.1.1" + version: "6.1.0" local_auth: dependency: "direct main" description: @@ -1056,26 +1072,26 @@ packages: dependency: "direct main" description: name: maplibre_gl - sha256: "5c7b1008396b2a321bada7d986ed60f9423406fbc7bd16f7ce91b385dfa054cd" + sha256: b676f124a2fcf88c4dafedc7b462155e6396d61ce7af46354b4de11b45c9812f url: "https://pub.dev" source: hosted - version: "0.22.0" + version: "0.26.2" maplibre_gl_platform_interface: dependency: transitive description: name: maplibre_gl_platform_interface - sha256: "08ee0a2d0853ea945a0ab619d52c0c714f43144145cd67478fc6880b52f37509" + sha256: "1f0ca8a99f03fa9434618ee21f4e42dd615830a7dd973e632b11c73ffec993a8" url: "https://pub.dev" source: hosted - version: "0.22.0" + version: "0.26.2" maplibre_gl_web: dependency: transitive description: name: maplibre_gl_web - sha256: "2b13d4b1955a9a54e38a718f2324e56e4983c080fc6de316f6f4b5458baacb58" + sha256: bbf022f29ceef26d73f63e584819fbd02fbaf4eb1facf5234206c78936cf8f1c url: "https://pub.dev" source: hosted - version: "0.22.0" + version: "0.26.2" matcher: dependency: transitive description: @@ -1158,12 +1174,13 @@ packages: source: hosted version: "0.5.0" objective_c: - dependency: transitive + dependency: "direct overridden" description: - name: objective_c - sha256: "6cb691c686fa2838c6deb34980d426145c2a5d537491cb83d463c33cdbc726ed" - url: "https://pub.dev" - source: hosted + path: "pkgs/objective_c" + ref: "2915556701f4734a784222f290a82adb1b101682" + resolved-ref: "2915556701f4734a784222f290a82adb1b101682" + url: "https://github.com/mertalev/native" + source: git version: "9.4.1" octo_image: dependency: "direct main" @@ -1185,7 +1202,7 @@ packages: openapi: dependency: "direct main" description: - path: openapi + path: "generated/openapi" relative: true source: path version: "1.0.0" @@ -2013,4 +2030,4 @@ packages: version: "3.1.3" sdks: dart: ">=3.12.0 <4.0.0" - flutter: "3.44.1" + flutter: "3.44.9" diff --git a/mobile/pubspec.yaml b/mobile/pubspec.yaml index 380d5c1b1b..7a8d9ca32b 100644 --- a/mobile/pubspec.yaml +++ b/mobile/pubspec.yaml @@ -2,11 +2,11 @@ name: immich_mobile description: Immich - selfhosted backup media file on mobile phone publish_to: 'none' -version: 3.0.0-rc.3+3051 +version: 3.1.0+3057 environment: sdk: '>=3.12.0 <4.0.0' - flutter: 3.44.1 + flutter: 3.44.9 dependencies: async: ^2.13.1 @@ -19,7 +19,7 @@ dependencies: crypto: ^3.0.7 device_info_plus: ^12.4.0 diacritic: ^0.1.6 - drift: ^2.32.1 + drift: ^2.34.0 drift_sqlite_async: 0.3.1 dynamic_color: ^1.8.1 easy_localization: ^3.0.8 @@ -35,7 +35,7 @@ dependencies: flutter_web_auth_2: ^5.0.2 fluttertoast: ^8.2.14 geolocator: ^14.0.2 - home_widget: ^0.8.1 + home_widget: ^0.9.3 hooks_riverpod: ^2.6.1 http: ^1.6.0 image_picker: ^1.2.1 @@ -44,7 +44,7 @@ dependencies: intl: ^0.20.2 local_auth: ^2.3.0 logging: ^1.3.0 - maplibre_gl: ^0.22.0 + maplibre_gl: ^0.26.0 native_video_player: git: url: https://github.com/immich-app/native_video_player @@ -52,13 +52,13 @@ dependencies: network_info_plus: ^6.1.4 octo_image: ^2.1.0 openapi: - path: openapi + path: generated/openapi package_info_plus: ^8.3.1 path: ^1.9.1 path_provider: ^2.1.5 path_provider_foundation: ^2.6.0 permission_handler: ^11.4.0 - photo_manager: ^3.9.0 + photo_manager: 3.9.0 pinput: ^5.0.2 punycode: ^1.0.0 scroll_date_picker: ^3.8.0 @@ -84,26 +84,28 @@ dependencies: cupertino_http: git: url: https://github.com/mertalev/http - ref: 'a0a933358517c6d01cff37fc2a2752ee2d744a3c' # https://github.com/dart-lang/http/pull/1876 + ref: '58b03c756b81d16b3975a8ae4b91d25360123bb5' path: pkgs/cupertino_http/ ok_http: git: url: https://github.com/mertalev/http ref: '549c24b0a4d3881a9a44b70f4873450d43c1c4af' # https://github.com/dart-lang/http/pull/1877 path: pkgs/ok_http/ + freezed_annotation: ^3.1.0 dev_dependencies: auto_route_generator: ^10.5.0 build_runner: ^2.13.1 # Drift generator - drift_dev: ^2.32.1 + drift_dev: ^2.34.0 fake_async: ^1.3.3 file: ^7.0.1 # for MemoryFileSystem flutter_launcher_icons: ^0.14.4 - flutter_lints: ^5.0.0 + flutter_lints: ^6.0.0 flutter_native_splash: ^2.4.7 flutter_test: sdk: flutter + freezed: ^3.2.5 integration_test: sdk: flutter mocktail: ^1.0.5 @@ -114,11 +116,17 @@ dev_dependencies: # Pin bonsoir to 5.x until cast releases a version compatible with bonsoir 6.x. dependency_overrides: bonsoir: ^5.1.11 + objective_c: + git: + url: https://github.com/mertalev/native + ref: '2915556701f4734a784222f290a82adb1b101682' # https://github.com/dart-lang/native/pull/3458 + path: pkgs/objective_c/ flutter: uses-material-design: true assets: - assets/ + - assets/feature_message/ fonts: - family: GoogleSans fonts: @@ -151,4 +159,4 @@ flutter_launcher_icons: analyzer: exclude: - - openapi/** + - generated/** diff --git a/mobile/scripts/checkout_ios.sh b/mobile/scripts/checkout_ios.sh new file mode 100644 index 0000000000..74706e0d23 --- /dev/null +++ b/mobile/scripts/checkout_ios.sh @@ -0,0 +1,52 @@ +#!/usr/bin/env bash +# Reconciles the iOS project with the current Flutter setup +# +# `flutter build ios --config-only` is relatively expensive, so we attempt to avoid running it when possible + +set -euo pipefail + +stamp="build/ios_checkout.stamp" + +# All tracked files that can invalidate the Xcode + Flutter build state +inputs_digest() { + git ls-files -z ios pubspec.yaml pubspec.lock mise.toml mise.lock \ + | xargs -0 shasum \ + | shasum \ + | cut -d ' ' -f 1 +} + +# Echoes why the iOS project needs reconciling, or returns 1 if it does not. +# The first three cases can happen with no tracked file having changed at all, +# so comparing the digest alone is not enough. +staleness() { + local flutter_root + flutter_root="$(sed -n 's/^FLUTTER_ROOT=//p' ios/Flutter/Generated.xcconfig 2>/dev/null || true)" + + if [[ -z $flutter_root ]]; then + echo "misconfigured FLUTTER_ROOT" + elif [[ ! -d $flutter_root ]]; then + echo "the Flutter SDK has changed" + elif ! cmp -s ios/Podfile.lock ios/Pods/Manifest.lock; then + # This is also done by Xcode's "Check Pods Manifest.lock" build phase + echo "Cocoapods out of sync" + elif [[ ! -f $stamp ]]; then + echo "first checkout" + elif [[ $(<"$stamp") != "$(inputs_digest)" ]]; then + echo "tracked build state has changed" + else + return 1 + fi +} + +[[ $(uname) == Darwin ]] || exit 0 + +if ! reason="$(staleness)"; then + exit 0 +fi + +echo "Reconciling iOS project: $reason" +flutter build ios --config-only --debug + +# Save tracked files manifest +mkdir -p "$(dirname "$stamp")" +inputs_digest > "$stamp" diff --git a/mobile/test/api.mocks.dart b/mobile/test/api.mocks.dart index 91e27735ae..40cdd29143 100644 --- a/mobile/test/api.mocks.dart +++ b/mobile/test/api.mocks.dart @@ -1,3 +1,4 @@ +import 'package:immich_mobile/platform/connectivity_api.g.dart'; import 'package:immich_mobile/repositories/partner_api.repository.dart'; import 'package:mocktail/mocktail.dart'; import 'package:openapi/api.dart'; @@ -7,3 +8,5 @@ class MockSyncApi extends Mock implements SyncApi {} class MockServerApi extends Mock implements ServerApi {} class MockPartnerApiRepository extends Mock implements PartnerApiRepository {} + +class MockConnectivityApi extends Mock implements ConnectivityApi {} diff --git a/mobile/test/domain/models/base_asset_test.dart b/mobile/test/domain/models/base_asset_test.dart new file mode 100644 index 0000000000..6a6c836aa7 --- /dev/null +++ b/mobile/test/domain/models/base_asset_test.dart @@ -0,0 +1,73 @@ +import 'package:flutter_test/flutter_test.dart'; + +import '../../unit/factories/local_asset_factory.dart'; +import '../../unit/factories/remote_asset_factory.dart'; + +void main() { + group('BaseAsset.refersToSameAsset', () { + test('search/folder copy (localId null) matches the merged DB copy (localId set)', () { + // #29472: search and folder assets arrive with localId null, then the viewer + // watches the DB copy which fills localId. heroTag embeds localId, so it + // diverges for the same asset and isCurrent used to go false. + final searchCopy = RemoteAssetFactory.create(id: 'asset-1'); + final mergedCopy = searchCopy.copyWith(localId: 'local-1'); + + expect(searchCopy.localId, isNull); + expect(mergedCopy.localId, 'local-1'); + expect(searchCopy.heroTag, isNot(mergedCopy.heroTag)); + + expect(searchCopy.refersToSameAsset(mergedCopy), isTrue); + expect(mergedCopy.refersToSameAsset(searchCopy), isTrue); + }); + + test('different remote assets are not the same', () { + final a = RemoteAssetFactory.create(id: 'asset-1'); + final b = RemoteAssetFactory.create(id: 'asset-2'); + + expect(a.refersToSameAsset(b), isFalse); + }); + + test('same checksum but different remote ids are not the same (duplicate files)', () { + final a = RemoteAssetFactory.create(id: 'asset-1'); + final b = RemoteAssetFactory.create(id: 'asset-2').copyWith(checksum: a.checksum); + + expect(a.checksum, b.checksum); + expect(a.refersToSameAsset(b), isFalse); + }); + + test('falls back to checksum when only one side has an id (local-only vs remote-only)', () { + final remoteOnly = RemoteAssetFactory.create(id: 'asset-1'); + final localOnly = LocalAssetFactory.create(id: 'local-1').copyWith(checksum: remoteOnly.checksum); + + expect(remoteOnly.refersToSameAsset(localOnly), isTrue); + expect(localOnly.refersToSameAsset(remoteOnly), isTrue); + }); + }); + + group('BaseAsset.id', () { + test('survives the DB copy filling localId', () { + final searchCopy = RemoteAssetFactory.create(id: 'asset-1'); + final mergedCopy = searchCopy.copyWith(localId: 'local-1'); + + expect(searchCopy.heroTag, isNot(mergedCopy.heroTag)); + expect(mergedCopy.id, searchCopy.id); + }); + + test('survives a local asset gaining a remote id', () { + final localOnly = LocalAssetFactory.create(id: 'local-1'); + final uploaded = localOnly.copyWith(remoteId: 'asset-1'); + + expect(localOnly.heroTag, isNot(uploaded.heroTag)); + expect(uploaded.id, localOnly.id); + }); + + test('differs between assets', () { + final a = RemoteAssetFactory.create(id: 'asset-1'); + final b = RemoteAssetFactory.create(id: 'asset-2'); + final local = LocalAssetFactory.create(id: 'local-1'); + + expect(a.id, isNot(b.id)); + expect(local.id, isNot(a.id)); + }); + }); +} diff --git a/mobile/test/domain/service.mock.dart b/mobile/test/domain/service.mock.dart deleted file mode 100644 index 70f706f7fe..0000000000 --- a/mobile/test/domain/service.mock.dart +++ /dev/null @@ -1,22 +0,0 @@ -import 'package:immich_mobile/domain/services/asset.service.dart'; -import 'package:immich_mobile/domain/services/partner.service.dart'; -import 'package:immich_mobile/domain/services/store.service.dart'; -import 'package:immich_mobile/domain/services/user.service.dart'; -import 'package:immich_mobile/domain/utils/background_sync.dart'; -import 'package:immich_mobile/platform/native_sync_api.g.dart'; -import 'package:immich_mobile/services/app_settings.service.dart'; -import 'package:mocktail/mocktail.dart'; - -class MockStoreService extends Mock implements StoreService {} - -class MockBackgroundSyncManager extends Mock implements BackgroundSyncManager {} - -class MockNativeSyncApi extends Mock implements NativeSyncApi {} - -class MockAppSettingsService extends Mock implements AppSettingsService {} - -class MockPartnerService extends Mock implements PartnerService {} - -class MockAssetService extends Mock implements AssetService {} - -class MockUserService extends Mock implements UserService {} diff --git a/mobile/test/domain/services/local_sync_service_test.dart b/mobile/test/domain/services/local_sync_service_test.dart index e0e6b663a7..14277709da 100644 --- a/mobile/test/domain/services/local_sync_service_test.dart +++ b/mobile/test/domain/services/local_sync_service_test.dart @@ -16,10 +16,10 @@ import 'package:immich_mobile/platform/native_sync_api.g.dart'; import 'package:immich_mobile/repositories/asset_media.repository.dart'; import 'package:mocktail/mocktail.dart'; -import '../../domain/service.mock.dart'; import '../../fixtures/asset.stub.dart'; import '../../infrastructure/repository.mock.dart'; import '../../repository.mocks.dart'; +import '../../service.mocks.dart'; void main() { late LocalSyncService sut; diff --git a/mobile/test/domain/services/sync_linked_album_service_test.dart b/mobile/test/domain/services/sync_linked_album_service_test.dart index d4fc1396c5..e5f4c3b5dc 100644 --- a/mobile/test/domain/services/sync_linked_album_service_test.dart +++ b/mobile/test/domain/services/sync_linked_album_service_test.dart @@ -6,7 +6,7 @@ import 'package:immich_mobile/providers/infrastructure/store.provider.dart'; import 'package:immich_mobile/repositories/drift_album_api_repository.dart'; import '../../infrastructure/repository.mock.dart'; -import '../service.mock.dart'; +import '../../service.mocks.dart'; void main() { // A container with the service's deps overridden but cancellationProvider left diff --git a/mobile/test/domain/services/sync_stream_service_test.dart b/mobile/test/domain/services/sync_stream_service_test.dart index e033229408..5cd4104f91 100644 --- a/mobile/test/domain/services/sync_stream_service_test.dart +++ b/mobile/test/domain/services/sync_stream_service_test.dart @@ -36,7 +36,6 @@ class _AbortCallbackWrapper { class _MockAbortCallbackWrapper extends Mock implements _AbortCallbackWrapper {} - void main() { late SyncStreamService sut; late SyncStreamRepository mockSyncStreamRepo; @@ -70,7 +69,7 @@ void main() { await db.close(); }); - successHandler(Invocation _) async => true; + Future successHandler(Invocation _) async => true; setUp(() async { mockSyncStreamRepo = MockSyncStreamRepository(); diff --git a/mobile/test/domain/services/user_service_test.dart b/mobile/test/domain/services/user_service_test.dart index 80b6d80457..7b46a44339 100644 --- a/mobile/test/domain/services/user_service_test.dart +++ b/mobile/test/domain/services/user_service_test.dart @@ -9,7 +9,7 @@ import 'package:mocktail/mocktail.dart'; import '../../fixtures/user.stub.dart'; import '../../infrastructure/repository.mock.dart'; -import '../service.mock.dart'; +import '../../service.mocks.dart'; void main() { late UserService sut; diff --git a/mobile/test/drift/main/generated/schema.dart b/mobile/test/drift/main/generated/schema.dart deleted file mode 100644 index c0302f2805..0000000000 --- a/mobile/test/drift/main/generated/schema.dart +++ /dev/null @@ -1,139 +0,0 @@ -// dart format width=80 -// GENERATED BY drift_dev, DO NOT MODIFY. -// ignore_for_file: type=lint,unused_import -// -import 'package:drift/drift.dart'; -import 'package:drift/internal/migrations.dart'; -import 'schema_v1.dart' as v1; -import 'schema_v2.dart' as v2; -import 'schema_v3.dart' as v3; -import 'schema_v4.dart' as v4; -import 'schema_v5.dart' as v5; -import 'schema_v6.dart' as v6; -import 'schema_v7.dart' as v7; -import 'schema_v8.dart' as v8; -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; -import 'schema_v14.dart' as v14; -import 'schema_v15.dart' as v15; -import 'schema_v16.dart' as v16; -import 'schema_v17.dart' as v17; -import 'schema_v18.dart' as v18; -import 'schema_v19.dart' as v19; -import 'schema_v20.dart' as v20; -import 'schema_v21.dart' as v21; -import 'schema_v22.dart' as v22; -import 'schema_v23.dart' as v23; -import 'schema_v24.dart' as v24; -import 'schema_v25.dart' as v25; -import 'schema_v26.dart' as v26; -import 'schema_v27.dart' as v27; -import 'schema_v28.dart' as v28; -import 'schema_v29.dart' as v29; -import 'schema_v30.dart' as v30; - -class GeneratedHelper implements SchemaInstantiationHelper { - @override - GeneratedDatabase databaseForVersion(QueryExecutor db, int version) { - switch (version) { - case 1: - return v1.DatabaseAtV1(db); - case 2: - return v2.DatabaseAtV2(db); - case 3: - return v3.DatabaseAtV3(db); - case 4: - return v4.DatabaseAtV4(db); - case 5: - return v5.DatabaseAtV5(db); - case 6: - return v6.DatabaseAtV6(db); - case 7: - return v7.DatabaseAtV7(db); - case 8: - return v8.DatabaseAtV8(db); - case 9: - return v9.DatabaseAtV9(db); - case 10: - return v10.DatabaseAtV10(db); - case 11: - return v11.DatabaseAtV11(db); - case 12: - return v12.DatabaseAtV12(db); - case 13: - return v13.DatabaseAtV13(db); - case 14: - return v14.DatabaseAtV14(db); - case 15: - return v15.DatabaseAtV15(db); - case 16: - return v16.DatabaseAtV16(db); - case 17: - return v17.DatabaseAtV17(db); - case 18: - return v18.DatabaseAtV18(db); - case 19: - return v19.DatabaseAtV19(db); - case 20: - return v20.DatabaseAtV20(db); - case 21: - return v21.DatabaseAtV21(db); - case 22: - return v22.DatabaseAtV22(db); - case 23: - return v23.DatabaseAtV23(db); - case 24: - return v24.DatabaseAtV24(db); - case 25: - return v25.DatabaseAtV25(db); - case 26: - return v26.DatabaseAtV26(db); - case 27: - return v27.DatabaseAtV27(db); - case 28: - return v28.DatabaseAtV28(db); - case 29: - return v29.DatabaseAtV29(db); - case 30: - return v30.DatabaseAtV30(db); - default: - throw MissingSchemaException(version, versions); - } - } - - static const versions = const [ - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20, - 21, - 22, - 23, - 24, - 25, - 26, - 27, - 28, - 29, - 30, - ]; -} diff --git a/mobile/test/drift/main/generated/schema_v1.dart b/mobile/test/drift/main/generated/schema_v1.dart deleted file mode 100644 index 3755a2bd5c..0000000000 --- a/mobile/test/drift/main/generated/schema_v1.dart +++ /dev/null @@ -1,5998 +0,0 @@ -// dart format width=80 -import 'dart:typed_data' as i2; -// GENERATED BY drift_dev, DO NOT MODIFY. -// ignore_for_file: type=lint,unused_import -// -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 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 email = GeneratedColumn( - 'email', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn profileImagePath = GeneratedColumn( - 'profile_image_path', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn quotaSizeInBytes = GeneratedColumn( - 'quota_size_in_bytes', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn quotaUsageInBytes = GeneratedColumn( - 'quota_usage_in_bytes', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - defaultValue: const CustomExpression('0'), - ); - @override - List get $columns => [ - id, - name, - isAdmin, - email, - profileImagePath, - updatedAt, - quotaSizeInBytes, - quotaUsageInBytes, - ]; - @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'], - )!, - isAdmin: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}is_admin'], - )!, - email: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}email'], - )!, - profileImagePath: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}profile_image_path'], - ), - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}updated_at'], - )!, - quotaSizeInBytes: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}quota_size_in_bytes'], - ), - quotaUsageInBytes: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}quota_usage_in_bytes'], - )!, - ); - } - - @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 bool isAdmin; - final String email; - final String? profileImagePath; - final DateTime updatedAt; - final int? quotaSizeInBytes; - final int quotaUsageInBytes; - const UserEntityData({ - required this.id, - required this.name, - required this.isAdmin, - required this.email, - this.profileImagePath, - required this.updatedAt, - this.quotaSizeInBytes, - required this.quotaUsageInBytes, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['name'] = Variable(name); - map['is_admin'] = Variable(isAdmin); - map['email'] = Variable(email); - if (!nullToAbsent || profileImagePath != null) { - map['profile_image_path'] = Variable(profileImagePath); - } - map['updated_at'] = Variable(updatedAt); - if (!nullToAbsent || quotaSizeInBytes != null) { - map['quota_size_in_bytes'] = Variable(quotaSizeInBytes); - } - map['quota_usage_in_bytes'] = Variable(quotaUsageInBytes); - return map; - } - - factory UserEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return UserEntityData( - id: serializer.fromJson(json['id']), - name: serializer.fromJson(json['name']), - isAdmin: serializer.fromJson(json['isAdmin']), - email: serializer.fromJson(json['email']), - profileImagePath: serializer.fromJson(json['profileImagePath']), - updatedAt: serializer.fromJson(json['updatedAt']), - quotaSizeInBytes: serializer.fromJson(json['quotaSizeInBytes']), - quotaUsageInBytes: serializer.fromJson(json['quotaUsageInBytes']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'name': serializer.toJson(name), - 'isAdmin': serializer.toJson(isAdmin), - 'email': serializer.toJson(email), - 'profileImagePath': serializer.toJson(profileImagePath), - 'updatedAt': serializer.toJson(updatedAt), - 'quotaSizeInBytes': serializer.toJson(quotaSizeInBytes), - 'quotaUsageInBytes': serializer.toJson(quotaUsageInBytes), - }; - } - - UserEntityData copyWith({ - String? id, - String? name, - bool? isAdmin, - String? email, - Value profileImagePath = const Value.absent(), - DateTime? updatedAt, - Value quotaSizeInBytes = const Value.absent(), - int? quotaUsageInBytes, - }) => UserEntityData( - id: id ?? this.id, - name: name ?? this.name, - isAdmin: isAdmin ?? this.isAdmin, - email: email ?? this.email, - profileImagePath: profileImagePath.present - ? profileImagePath.value - : this.profileImagePath, - updatedAt: updatedAt ?? this.updatedAt, - quotaSizeInBytes: quotaSizeInBytes.present - ? quotaSizeInBytes.value - : this.quotaSizeInBytes, - quotaUsageInBytes: quotaUsageInBytes ?? this.quotaUsageInBytes, - ); - UserEntityData copyWithCompanion(UserEntityCompanion data) { - return UserEntityData( - id: data.id.present ? data.id.value : this.id, - name: data.name.present ? data.name.value : this.name, - isAdmin: data.isAdmin.present ? data.isAdmin.value : this.isAdmin, - email: data.email.present ? data.email.value : this.email, - profileImagePath: data.profileImagePath.present - ? data.profileImagePath.value - : this.profileImagePath, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - quotaSizeInBytes: data.quotaSizeInBytes.present - ? data.quotaSizeInBytes.value - : this.quotaSizeInBytes, - quotaUsageInBytes: data.quotaUsageInBytes.present - ? data.quotaUsageInBytes.value - : this.quotaUsageInBytes, - ); - } - - @override - String toString() { - return (StringBuffer('UserEntityData(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('isAdmin: $isAdmin, ') - ..write('email: $email, ') - ..write('profileImagePath: $profileImagePath, ') - ..write('updatedAt: $updatedAt, ') - ..write('quotaSizeInBytes: $quotaSizeInBytes, ') - ..write('quotaUsageInBytes: $quotaUsageInBytes') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - name, - isAdmin, - email, - profileImagePath, - updatedAt, - quotaSizeInBytes, - quotaUsageInBytes, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is UserEntityData && - other.id == this.id && - other.name == this.name && - other.isAdmin == this.isAdmin && - other.email == this.email && - other.profileImagePath == this.profileImagePath && - other.updatedAt == this.updatedAt && - other.quotaSizeInBytes == this.quotaSizeInBytes && - other.quotaUsageInBytes == this.quotaUsageInBytes); -} - -class UserEntityCompanion extends UpdateCompanion { - final Value id; - final Value name; - final Value isAdmin; - final Value email; - final Value profileImagePath; - final Value updatedAt; - final Value quotaSizeInBytes; - final Value quotaUsageInBytes; - const UserEntityCompanion({ - this.id = const Value.absent(), - this.name = const Value.absent(), - this.isAdmin = const Value.absent(), - this.email = const Value.absent(), - this.profileImagePath = const Value.absent(), - this.updatedAt = const Value.absent(), - this.quotaSizeInBytes = const Value.absent(), - this.quotaUsageInBytes = const Value.absent(), - }); - UserEntityCompanion.insert({ - required String id, - required String name, - this.isAdmin = const Value.absent(), - required String email, - this.profileImagePath = const Value.absent(), - this.updatedAt = const Value.absent(), - this.quotaSizeInBytes = const Value.absent(), - this.quotaUsageInBytes = const Value.absent(), - }) : id = Value(id), - name = Value(name), - email = Value(email); - static Insertable custom({ - Expression? id, - Expression? name, - Expression? isAdmin, - Expression? email, - Expression? profileImagePath, - Expression? updatedAt, - Expression? quotaSizeInBytes, - Expression? quotaUsageInBytes, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (name != null) 'name': name, - if (isAdmin != null) 'is_admin': isAdmin, - if (email != null) 'email': email, - if (profileImagePath != null) 'profile_image_path': profileImagePath, - if (updatedAt != null) 'updated_at': updatedAt, - if (quotaSizeInBytes != null) 'quota_size_in_bytes': quotaSizeInBytes, - if (quotaUsageInBytes != null) 'quota_usage_in_bytes': quotaUsageInBytes, - }); - } - - UserEntityCompanion copyWith({ - Value? id, - Value? name, - Value? isAdmin, - Value? email, - Value? profileImagePath, - Value? updatedAt, - Value? quotaSizeInBytes, - Value? quotaUsageInBytes, - }) { - return UserEntityCompanion( - id: id ?? this.id, - name: name ?? this.name, - isAdmin: isAdmin ?? this.isAdmin, - email: email ?? this.email, - profileImagePath: profileImagePath ?? this.profileImagePath, - updatedAt: updatedAt ?? this.updatedAt, - quotaSizeInBytes: quotaSizeInBytes ?? this.quotaSizeInBytes, - quotaUsageInBytes: quotaUsageInBytes ?? this.quotaUsageInBytes, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (name.present) { - map['name'] = Variable(name.value); - } - if (isAdmin.present) { - map['is_admin'] = Variable(isAdmin.value); - } - if (email.present) { - map['email'] = Variable(email.value); - } - if (profileImagePath.present) { - map['profile_image_path'] = Variable(profileImagePath.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (quotaSizeInBytes.present) { - map['quota_size_in_bytes'] = Variable(quotaSizeInBytes.value); - } - if (quotaUsageInBytes.present) { - map['quota_usage_in_bytes'] = Variable(quotaUsageInBytes.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('UserEntityCompanion(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('isAdmin: $isAdmin, ') - ..write('email: $email, ') - ..write('profileImagePath: $profileImagePath, ') - ..write('updatedAt: $updatedAt, ') - ..write('quotaSizeInBytes: $quotaSizeInBytes, ') - ..write('quotaUsageInBytes: $quotaUsageInBytes') - ..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, - ); - @override - List get $columns => [ - name, - type, - createdAt, - updatedAt, - width, - height, - durationInSeconds, - id, - checksum, - isFavorite, - ownerId, - localDateTime, - thumbHash, - deletedAt, - livePhotoVideoId, - visibility, - stackId, - ]; - @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'], - ), - ); - } - - @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; - 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, - }); - @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); - } - 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']), - ); - } - @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), - }; - } - - 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(), - }) => 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, - ); - 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, - ); - } - - @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(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - name, - type, - createdAt, - updatedAt, - width, - height, - durationInSeconds, - id, - checksum, - isFavorite, - ownerId, - localDateTime, - thumbHash, - deletedAt, - livePhotoVideoId, - visibility, - stackId, - ); - @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); -} - -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; - 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(), - }); - 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(), - }) : 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, - }) { - 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, - }); - } - - 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, - }) { - 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, - ); - } - - @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); - } - 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(')')) - .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 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, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES remote_asset_entity (id)', - ), - ); - @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 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 i2.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, - i2.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 i2.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 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 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, - 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'], - )!, - 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 bool? marker_; - const LocalAlbumEntityData({ - required this.id, - required this.name, - required this.updatedAt, - required this.backupSelection, - required this.isIosSharedAlbum, - 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 || 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']), - 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), - 'marker_': serializer.toJson(marker_), - }; - } - - LocalAlbumEntityData copyWith({ - String? id, - String? name, - DateTime? updatedAt, - int? backupSelection, - bool? isIosSharedAlbum, - 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, - 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, - 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('marker_: $marker_') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - name, - updatedAt, - backupSelection, - isIosSharedAlbum, - 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.marker_ == this.marker_); -} - -class LocalAlbumEntityCompanion extends UpdateCompanion { - final Value id; - final Value name; - final Value updatedAt; - final Value backupSelection; - final Value isIosSharedAlbum; - 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.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.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? 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 (marker_ != null) 'marker': marker_, - }); - } - - LocalAlbumEntityCompanion copyWith({ - Value? id, - Value? name, - Value? updatedAt, - Value? backupSelection, - Value? isIosSharedAlbum, - Value? marker_, - }) { - return LocalAlbumEntityCompanion( - id: id ?? this.id, - name: name ?? this.name, - updatedAt: updatedAt ?? this.updatedAt, - backupSelection: backupSelection ?? this.backupSelection, - isIosSharedAlbum: isIosSharedAlbum ?? this.isIosSharedAlbum, - 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 (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('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', - ), - ); - @override - List get $columns => [assetId, albumId]; - @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'], - )!, - ); - } - - @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; - const LocalAlbumAssetEntityData({ - 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 LocalAlbumAssetEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return LocalAlbumAssetEntityData( - 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), - }; - } - - LocalAlbumAssetEntityData copyWith({String? assetId, String? albumId}) => - LocalAlbumAssetEntityData( - assetId: assetId ?? this.assetId, - albumId: albumId ?? this.albumId, - ); - LocalAlbumAssetEntityData copyWithCompanion( - LocalAlbumAssetEntityCompanion data, - ) { - return LocalAlbumAssetEntityData( - assetId: data.assetId.present ? data.assetId.value : this.assetId, - albumId: data.albumId.present ? data.albumId.value : this.albumId, - ); - } - - @override - String toString() { - return (StringBuffer('LocalAlbumAssetEntityData(') - ..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 LocalAlbumAssetEntityData && - other.assetId == this.assetId && - other.albumId == this.albumId); -} - -class LocalAlbumAssetEntityCompanion - extends UpdateCompanion { - final Value assetId; - final Value albumId; - const LocalAlbumAssetEntityCompanion({ - this.assetId = const Value.absent(), - this.albumId = const Value.absent(), - }); - LocalAlbumAssetEntityCompanion.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, - }); - } - - LocalAlbumAssetEntityCompanion copyWith({ - Value? assetId, - Value? albumId, - }) { - return LocalAlbumAssetEntityCompanion( - 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('LocalAlbumAssetEntityCompanion(') - ..write('assetId: $assetId, ') - ..write('albumId: $albumId') - ..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 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 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 thumbnailPath = GeneratedColumn( - 'thumbnail_path', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - 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, - thumbnailPath, - 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'], - ), - thumbnailPath: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}thumbnail_path'], - )!, - 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 String thumbnailPath; - 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.thumbnailPath, - 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['thumbnail_path'] = Variable(thumbnailPath); - 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']), - thumbnailPath: serializer.fromJson(json['thumbnailPath']), - 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), - 'thumbnailPath': serializer.toJson(thumbnailPath), - '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(), - String? thumbnailPath, - 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, - thumbnailPath: thumbnailPath ?? this.thumbnailPath, - 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, - thumbnailPath: data.thumbnailPath.present - ? data.thumbnailPath.value - : this.thumbnailPath, - 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('thumbnailPath: $thumbnailPath, ') - ..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, - thumbnailPath, - 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.thumbnailPath == this.thumbnailPath && - 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 thumbnailPath; - 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.thumbnailPath = 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 String thumbnailPath, - 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), - thumbnailPath = Value(thumbnailPath), - isFavorite = Value(isFavorite), - isHidden = Value(isHidden); - static Insertable custom({ - Expression? id, - Expression? createdAt, - Expression? updatedAt, - Expression? ownerId, - Expression? name, - Expression? faceAssetId, - Expression? thumbnailPath, - 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 (thumbnailPath != null) 'thumbnail_path': thumbnailPath, - 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? thumbnailPath, - 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, - thumbnailPath: thumbnailPath ?? this.thumbnailPath, - 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 (thumbnailPath.present) { - map['thumbnail_path'] = Variable(thumbnailPath.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('thumbnailPath: $thumbnailPath, ') - ..write('isFavorite: $isFavorite, ') - ..write('isHidden: $isHidden, ') - ..write('color: $color, ') - ..write('birthDate: $birthDate') - ..write(')')) - .toString(); - } -} - -class DatabaseAtV1 extends GeneratedDatabase { - DatabaseAtV1(QueryExecutor e) : super(e); - late final UserEntity userEntity = UserEntity(this); - late final RemoteAssetEntity remoteAssetEntity = RemoteAssetEntity(this); - late final LocalAssetEntity localAssetEntity = LocalAssetEntity(this); - late final StackEntity stackEntity = StackEntity(this); - late final Index idxLocalAssetChecksum = Index( - 'idx_local_asset_checksum', - 'CREATE INDEX idx_local_asset_checksum ON local_asset_entity (checksum)', - ); - late final Index uQRemoteAssetOwnerChecksum = Index( - 'UQ_remote_asset_owner_checksum', - 'CREATE UNIQUE INDEX UQ_remote_asset_owner_checksum ON remote_asset_entity (checksum, owner_id)', - ); - late final Index idxRemoteAssetChecksum = Index( - 'idx_remote_asset_checksum', - 'CREATE INDEX idx_remote_asset_checksum ON remote_asset_entity (checksum)', - ); - late final UserMetadataEntity userMetadataEntity = UserMetadataEntity(this); - late final PartnerEntity partnerEntity = PartnerEntity(this); - late final LocalAlbumEntity localAlbumEntity = LocalAlbumEntity(this); - late final LocalAlbumAssetEntity localAlbumAssetEntity = - LocalAlbumAssetEntity(this); - late final RemoteExifEntity remoteExifEntity = RemoteExifEntity(this); - late final RemoteAlbumEntity remoteAlbumEntity = RemoteAlbumEntity(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); - @override - Iterable> get allTables => - allSchemaEntities.whereType>(); - @override - List get allSchemaEntities => [ - userEntity, - remoteAssetEntity, - localAssetEntity, - stackEntity, - idxLocalAssetChecksum, - uQRemoteAssetOwnerChecksum, - idxRemoteAssetChecksum, - userMetadataEntity, - partnerEntity, - localAlbumEntity, - localAlbumAssetEntity, - remoteExifEntity, - remoteAlbumEntity, - remoteAlbumAssetEntity, - remoteAlbumUserEntity, - memoryEntity, - memoryAssetEntity, - personEntity, - ]; - @override - int get schemaVersion => 1; - @override - DriftDatabaseOptions get options => - const DriftDatabaseOptions(storeDateTimeAsText: true); -} diff --git a/mobile/test/drift/main/generated/schema_v10.dart b/mobile/test/drift/main/generated/schema_v10.dart deleted file mode 100644 index c8d97eea37..0000000000 --- a/mobile/test/drift/main/generated/schema_v10.dart +++ /dev/null @@ -1,7162 +0,0 @@ -// dart format width=80 -import 'dart:typed_data' as i2; -// GENERATED BY drift_dev, DO NOT MODIFY. -// ignore_for_file: type=lint,unused_import -// -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', - ), - ); - @override - List get $columns => [assetId, albumId]; - @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'], - )!, - ); - } - - @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; - const LocalAlbumAssetEntityData({ - 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 LocalAlbumAssetEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return LocalAlbumAssetEntityData( - 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), - }; - } - - LocalAlbumAssetEntityData copyWith({String? assetId, String? albumId}) => - LocalAlbumAssetEntityData( - assetId: assetId ?? this.assetId, - albumId: albumId ?? this.albumId, - ); - LocalAlbumAssetEntityData copyWithCompanion( - LocalAlbumAssetEntityCompanion data, - ) { - return LocalAlbumAssetEntityData( - assetId: data.assetId.present ? data.assetId.value : this.assetId, - albumId: data.albumId.present ? data.albumId.value : this.albumId, - ); - } - - @override - String toString() { - return (StringBuffer('LocalAlbumAssetEntityData(') - ..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 LocalAlbumAssetEntityData && - other.assetId == this.assetId && - other.albumId == this.albumId); -} - -class LocalAlbumAssetEntityCompanion - extends UpdateCompanion { - final Value assetId; - final Value albumId; - const LocalAlbumAssetEntityCompanion({ - this.assetId = const Value.absent(), - this.albumId = const Value.absent(), - }); - LocalAlbumAssetEntityCompanion.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, - }); - } - - LocalAlbumAssetEntityCompanion copyWith({ - Value? assetId, - Value? albumId, - }) { - return LocalAlbumAssetEntityCompanion( - 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('LocalAlbumAssetEntityCompanion(') - ..write('assetId: $assetId, ') - ..write('albumId: $albumId') - ..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 i2.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, - i2.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 i2.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 DatabaseAtV10 extends GeneratedDatabase { - DatabaseAtV10(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 Index idxLatLng = Index( - 'idx_lat_lng', - 'CREATE INDEX IF NOT EXISTS idx_lat_lng ON remote_exif_entity (latitude, longitude)', - ); - @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, - idxLatLng, - ]; - @override - int get schemaVersion => 10; - @override - DriftDatabaseOptions get options => - const DriftDatabaseOptions(storeDateTimeAsText: true); -} diff --git a/mobile/test/drift/main/generated/schema_v11.dart b/mobile/test/drift/main/generated/schema_v11.dart deleted file mode 100644 index ce6508b2f7..0000000000 --- a/mobile/test/drift/main/generated/schema_v11.dart +++ /dev/null @@ -1,7201 +0,0 @@ -// dart format width=80 -import 'dart:typed_data' as i2; -// GENERATED BY drift_dev, DO NOT MODIFY. -// ignore_for_file: type=lint,unused_import -// -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 i2.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, - i2.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 i2.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 DatabaseAtV11 extends GeneratedDatabase { - DatabaseAtV11(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 Index idxLatLng = Index( - 'idx_lat_lng', - 'CREATE INDEX IF NOT EXISTS idx_lat_lng ON remote_exif_entity (latitude, longitude)', - ); - @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, - idxLatLng, - ]; - @override - int get schemaVersion => 11; - @override - DriftDatabaseOptions get options => - const DriftDatabaseOptions(storeDateTimeAsText: true); -} diff --git a/mobile/test/drift/main/generated/schema_v12.dart b/mobile/test/drift/main/generated/schema_v12.dart deleted file mode 100644 index 75ca519048..0000000000 --- a/mobile/test/drift/main/generated/schema_v12.dart +++ /dev/null @@ -1,7201 +0,0 @@ -// dart format width=80 -import 'dart:typed_data' as i2; -// GENERATED BY drift_dev, DO NOT MODIFY. -// ignore_for_file: type=lint,unused_import -// -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 i2.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, - i2.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 i2.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 DatabaseAtV12 extends GeneratedDatabase { - DatabaseAtV12(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 Index idxLatLng = Index( - 'idx_lat_lng', - 'CREATE INDEX IF NOT EXISTS idx_lat_lng ON remote_exif_entity (latitude, longitude)', - ); - @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, - idxLatLng, - ]; - @override - int get schemaVersion => 12; - @override - DriftDatabaseOptions get options => - const DriftDatabaseOptions(storeDateTimeAsText: true); -} diff --git a/mobile/test/drift/main/generated/schema_v13.dart b/mobile/test/drift/main/generated/schema_v13.dart deleted file mode 100644 index 2afc279f74..0000000000 --- a/mobile/test/drift/main/generated/schema_v13.dart +++ /dev/null @@ -1,7768 +0,0 @@ -// dart format width=80 -import 'dart:typed_data' as i2; -// GENERATED BY drift_dev, DO NOT MODIFY. -// ignore_for_file: type=lint,unused_import -// -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 i2.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, - i2.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 i2.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/drift/main/generated/schema_v14.dart b/mobile/test/drift/main/generated/schema_v14.dart deleted file mode 100644 index 69aac3360f..0000000000 --- a/mobile/test/drift/main/generated/schema_v14.dart +++ /dev/null @@ -1,7881 +0,0 @@ -// dart format width=80 -import 'dart:typed_data' as i2; -// GENERATED BY drift_dev, DO NOT MODIFY. -// ignore_for_file: type=lint,unused_import -// -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'), - ); - late final GeneratedColumn adjustmentTime = - GeneratedColumn( - 'adjustment_time', - aliasedName, - true, - type: DriftSqlType.dateTime, - 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, - ); - @override - List get $columns => [ - name, - type, - createdAt, - updatedAt, - width, - height, - durationInSeconds, - id, - checksum, - isFavorite, - orientation, - adjustmentTime, - latitude, - longitude, - ]; - @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'], - )!, - adjustmentTime: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}adjustment_time'], - ), - latitude: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}latitude'], - ), - longitude: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}longitude'], - ), - ); - } - - @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; - final DateTime? adjustmentTime; - final double? latitude; - final double? longitude; - 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, - this.adjustmentTime, - this.latitude, - this.longitude, - }); - @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); - if (!nullToAbsent || adjustmentTime != null) { - map['adjustment_time'] = Variable(adjustmentTime); - } - if (!nullToAbsent || latitude != null) { - map['latitude'] = Variable(latitude); - } - if (!nullToAbsent || longitude != null) { - map['longitude'] = Variable(longitude); - } - 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']), - adjustmentTime: serializer.fromJson(json['adjustmentTime']), - latitude: serializer.fromJson(json['latitude']), - longitude: serializer.fromJson(json['longitude']), - ); - } - @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), - 'adjustmentTime': serializer.toJson(adjustmentTime), - 'latitude': serializer.toJson(latitude), - 'longitude': serializer.toJson(longitude), - }; - } - - 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, - Value adjustmentTime = const Value.absent(), - Value latitude = const Value.absent(), - Value longitude = const Value.absent(), - }) => 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, - adjustmentTime: adjustmentTime.present - ? adjustmentTime.value - : this.adjustmentTime, - latitude: latitude.present ? latitude.value : this.latitude, - longitude: longitude.present ? longitude.value : this.longitude, - ); - 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, - adjustmentTime: data.adjustmentTime.present - ? data.adjustmentTime.value - : this.adjustmentTime, - latitude: data.latitude.present ? data.latitude.value : this.latitude, - longitude: data.longitude.present ? data.longitude.value : this.longitude, - ); - } - - @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('adjustmentTime: $adjustmentTime, ') - ..write('latitude: $latitude, ') - ..write('longitude: $longitude') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - name, - type, - createdAt, - updatedAt, - width, - height, - durationInSeconds, - id, - checksum, - isFavorite, - orientation, - adjustmentTime, - latitude, - longitude, - ); - @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 && - other.adjustmentTime == this.adjustmentTime && - other.latitude == this.latitude && - other.longitude == this.longitude); -} - -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; - final Value adjustmentTime; - final Value latitude; - final Value longitude; - 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(), - this.adjustmentTime = const Value.absent(), - this.latitude = const Value.absent(), - this.longitude = 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(), - this.adjustmentTime = const Value.absent(), - this.latitude = const Value.absent(), - this.longitude = 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, - Expression? adjustmentTime, - Expression? latitude, - Expression? longitude, - }) { - 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, - if (adjustmentTime != null) 'adjustment_time': adjustmentTime, - if (latitude != null) 'latitude': latitude, - if (longitude != null) 'longitude': longitude, - }); - } - - LocalAssetEntityCompanion copyWith({ - Value? name, - Value? type, - Value? createdAt, - Value? updatedAt, - Value? width, - Value? height, - Value? durationInSeconds, - Value? id, - Value? checksum, - Value? isFavorite, - Value? orientation, - Value? adjustmentTime, - Value? latitude, - Value? longitude, - }) { - 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, - adjustmentTime: adjustmentTime ?? this.adjustmentTime, - latitude: latitude ?? this.latitude, - longitude: longitude ?? this.longitude, - ); - } - - @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); - } - if (adjustmentTime.present) { - map['adjustment_time'] = Variable(adjustmentTime.value); - } - if (latitude.present) { - map['latitude'] = Variable(latitude.value); - } - if (longitude.present) { - map['longitude'] = Variable(longitude.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('adjustmentTime: $adjustmentTime, ') - ..write('latitude: $latitude, ') - ..write('longitude: $longitude') - ..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 i2.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, - i2.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 i2.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 DatabaseAtV14 extends GeneratedDatabase { - DatabaseAtV14(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 => 14; - @override - DriftDatabaseOptions get options => - const DriftDatabaseOptions(storeDateTimeAsText: true); -} diff --git a/mobile/test/drift/main/generated/schema_v15.dart b/mobile/test/drift/main/generated/schema_v15.dart deleted file mode 100644 index 01ac59162b..0000000000 --- a/mobile/test/drift/main/generated/schema_v15.dart +++ /dev/null @@ -1,7916 +0,0 @@ -// dart format width=80 -import 'dart:typed_data' as i2; -// GENERATED BY drift_dev, DO NOT MODIFY. -// ignore_for_file: type=lint,unused_import -// -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'), - ); - late final GeneratedColumn adjustmentTime = - GeneratedColumn( - 'adjustment_time', - aliasedName, - true, - type: DriftSqlType.dateTime, - 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, - ); - @override - List get $columns => [ - name, - type, - createdAt, - updatedAt, - width, - height, - durationInSeconds, - id, - checksum, - isFavorite, - orientation, - adjustmentTime, - latitude, - longitude, - ]; - @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'], - )!, - adjustmentTime: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}adjustment_time'], - ), - latitude: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}latitude'], - ), - longitude: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}longitude'], - ), - ); - } - - @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; - final DateTime? adjustmentTime; - final double? latitude; - final double? longitude; - 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, - this.adjustmentTime, - this.latitude, - this.longitude, - }); - @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); - if (!nullToAbsent || adjustmentTime != null) { - map['adjustment_time'] = Variable(adjustmentTime); - } - if (!nullToAbsent || latitude != null) { - map['latitude'] = Variable(latitude); - } - if (!nullToAbsent || longitude != null) { - map['longitude'] = Variable(longitude); - } - 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']), - adjustmentTime: serializer.fromJson(json['adjustmentTime']), - latitude: serializer.fromJson(json['latitude']), - longitude: serializer.fromJson(json['longitude']), - ); - } - @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), - 'adjustmentTime': serializer.toJson(adjustmentTime), - 'latitude': serializer.toJson(latitude), - 'longitude': serializer.toJson(longitude), - }; - } - - 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, - Value adjustmentTime = const Value.absent(), - Value latitude = const Value.absent(), - Value longitude = const Value.absent(), - }) => 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, - adjustmentTime: adjustmentTime.present - ? adjustmentTime.value - : this.adjustmentTime, - latitude: latitude.present ? latitude.value : this.latitude, - longitude: longitude.present ? longitude.value : this.longitude, - ); - 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, - adjustmentTime: data.adjustmentTime.present - ? data.adjustmentTime.value - : this.adjustmentTime, - latitude: data.latitude.present ? data.latitude.value : this.latitude, - longitude: data.longitude.present ? data.longitude.value : this.longitude, - ); - } - - @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('adjustmentTime: $adjustmentTime, ') - ..write('latitude: $latitude, ') - ..write('longitude: $longitude') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - name, - type, - createdAt, - updatedAt, - width, - height, - durationInSeconds, - id, - checksum, - isFavorite, - orientation, - adjustmentTime, - latitude, - longitude, - ); - @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 && - other.adjustmentTime == this.adjustmentTime && - other.latitude == this.latitude && - other.longitude == this.longitude); -} - -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; - final Value adjustmentTime; - final Value latitude; - final Value longitude; - 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(), - this.adjustmentTime = const Value.absent(), - this.latitude = const Value.absent(), - this.longitude = 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(), - this.adjustmentTime = const Value.absent(), - this.latitude = const Value.absent(), - this.longitude = 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, - Expression? adjustmentTime, - Expression? latitude, - Expression? longitude, - }) { - 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, - if (adjustmentTime != null) 'adjustment_time': adjustmentTime, - if (latitude != null) 'latitude': latitude, - if (longitude != null) 'longitude': longitude, - }); - } - - LocalAssetEntityCompanion copyWith({ - Value? name, - Value? type, - Value? createdAt, - Value? updatedAt, - Value? width, - Value? height, - Value? durationInSeconds, - Value? id, - Value? checksum, - Value? isFavorite, - Value? orientation, - Value? adjustmentTime, - Value? latitude, - Value? longitude, - }) { - 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, - adjustmentTime: adjustmentTime ?? this.adjustmentTime, - latitude: latitude ?? this.latitude, - longitude: longitude ?? this.longitude, - ); - } - - @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); - } - if (adjustmentTime.present) { - map['adjustment_time'] = Variable(adjustmentTime.value); - } - if (latitude.present) { - map['latitude'] = Variable(latitude.value); - } - if (longitude.present) { - map['longitude'] = Variable(longitude.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('adjustmentTime: $adjustmentTime, ') - ..write('latitude: $latitude, ') - ..write('longitude: $longitude') - ..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 i2.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, - i2.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 i2.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'), - ); - late final GeneratedColumn source = GeneratedColumn( - 'source', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - @override - List get $columns => [ - name, - type, - createdAt, - updatedAt, - width, - height, - durationInSeconds, - id, - albumId, - checksum, - isFavorite, - orientation, - source, - ]; - @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'], - )!, - source: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}source'], - )!, - ); - } - - @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; - final int source; - 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, - required this.source, - }); - @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); - map['source'] = Variable(source); - 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']), - source: serializer.fromJson(json['source']), - ); - } - @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), - 'source': serializer.toJson(source), - }; - } - - 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, - int? source, - }) => 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, - source: source ?? this.source, - ); - 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, - source: data.source.present ? data.source.value : this.source, - ); - } - - @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('source: $source') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - name, - type, - createdAt, - updatedAt, - width, - height, - durationInSeconds, - id, - albumId, - checksum, - isFavorite, - orientation, - source, - ); - @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 && - other.source == this.source); -} - -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; - final Value source; - 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(), - this.source = 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(), - required int source, - }) : name = Value(name), - type = Value(type), - id = Value(id), - albumId = Value(albumId), - source = Value(source); - 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, - Expression? source, - }) { - 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, - if (source != null) 'source': source, - }); - } - - 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, - Value? source, - }) { - 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, - source: source ?? this.source, - ); - } - - @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); - } - if (source.present) { - map['source'] = Variable(source.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('source: $source') - ..write(')')) - .toString(); - } -} - -class DatabaseAtV15 extends GeneratedDatabase { - DatabaseAtV15(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 => 15; - @override - DriftDatabaseOptions get options => - const DriftDatabaseOptions(storeDateTimeAsText: true); -} diff --git a/mobile/test/drift/main/generated/schema_v16.dart b/mobile/test/drift/main/generated/schema_v16.dart deleted file mode 100644 index be336a8dac..0000000000 --- a/mobile/test/drift/main/generated/schema_v16.dart +++ /dev/null @@ -1,8302 +0,0 @@ -// dart format width=80 -import 'dart:typed_data' as i2; -// GENERATED BY drift_dev, DO NOT MODIFY. -// ignore_for_file: type=lint,unused_import -// -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'), - ); - late final GeneratedColumn iCloudId = GeneratedColumn( - 'i_cloud_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn adjustmentTime = - GeneratedColumn( - 'adjustment_time', - aliasedName, - true, - type: DriftSqlType.dateTime, - 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, - ); - @override - List get $columns => [ - name, - type, - createdAt, - updatedAt, - width, - height, - durationInSeconds, - id, - checksum, - isFavorite, - orientation, - iCloudId, - adjustmentTime, - latitude, - longitude, - ]; - @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'], - )!, - iCloudId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}i_cloud_id'], - ), - adjustmentTime: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}adjustment_time'], - ), - latitude: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}latitude'], - ), - longitude: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}longitude'], - ), - ); - } - - @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; - final String? iCloudId; - final DateTime? adjustmentTime; - final double? latitude; - final double? longitude; - 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, - this.iCloudId, - this.adjustmentTime, - this.latitude, - this.longitude, - }); - @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); - if (!nullToAbsent || iCloudId != null) { - map['i_cloud_id'] = Variable(iCloudId); - } - if (!nullToAbsent || adjustmentTime != null) { - map['adjustment_time'] = Variable(adjustmentTime); - } - if (!nullToAbsent || latitude != null) { - map['latitude'] = Variable(latitude); - } - if (!nullToAbsent || longitude != null) { - map['longitude'] = Variable(longitude); - } - 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']), - iCloudId: serializer.fromJson(json['iCloudId']), - adjustmentTime: serializer.fromJson(json['adjustmentTime']), - latitude: serializer.fromJson(json['latitude']), - longitude: serializer.fromJson(json['longitude']), - ); - } - @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), - 'iCloudId': serializer.toJson(iCloudId), - 'adjustmentTime': serializer.toJson(adjustmentTime), - 'latitude': serializer.toJson(latitude), - 'longitude': serializer.toJson(longitude), - }; - } - - 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, - Value iCloudId = const Value.absent(), - Value adjustmentTime = const Value.absent(), - Value latitude = const Value.absent(), - Value longitude = const Value.absent(), - }) => 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, - iCloudId: iCloudId.present ? iCloudId.value : this.iCloudId, - adjustmentTime: adjustmentTime.present - ? adjustmentTime.value - : this.adjustmentTime, - latitude: latitude.present ? latitude.value : this.latitude, - longitude: longitude.present ? longitude.value : this.longitude, - ); - 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, - iCloudId: data.iCloudId.present ? data.iCloudId.value : this.iCloudId, - adjustmentTime: data.adjustmentTime.present - ? data.adjustmentTime.value - : this.adjustmentTime, - latitude: data.latitude.present ? data.latitude.value : this.latitude, - longitude: data.longitude.present ? data.longitude.value : this.longitude, - ); - } - - @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('iCloudId: $iCloudId, ') - ..write('adjustmentTime: $adjustmentTime, ') - ..write('latitude: $latitude, ') - ..write('longitude: $longitude') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - name, - type, - createdAt, - updatedAt, - width, - height, - durationInSeconds, - id, - checksum, - isFavorite, - orientation, - iCloudId, - adjustmentTime, - latitude, - longitude, - ); - @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 && - other.iCloudId == this.iCloudId && - other.adjustmentTime == this.adjustmentTime && - other.latitude == this.latitude && - other.longitude == this.longitude); -} - -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; - final Value iCloudId; - final Value adjustmentTime; - final Value latitude; - final Value longitude; - 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(), - this.iCloudId = const Value.absent(), - this.adjustmentTime = const Value.absent(), - this.latitude = const Value.absent(), - this.longitude = 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(), - this.iCloudId = const Value.absent(), - this.adjustmentTime = const Value.absent(), - this.latitude = const Value.absent(), - this.longitude = 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, - Expression? iCloudId, - Expression? adjustmentTime, - Expression? latitude, - Expression? longitude, - }) { - 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, - if (iCloudId != null) 'i_cloud_id': iCloudId, - if (adjustmentTime != null) 'adjustment_time': adjustmentTime, - if (latitude != null) 'latitude': latitude, - if (longitude != null) 'longitude': longitude, - }); - } - - LocalAssetEntityCompanion copyWith({ - Value? name, - Value? type, - Value? createdAt, - Value? updatedAt, - Value? width, - Value? height, - Value? durationInSeconds, - Value? id, - Value? checksum, - Value? isFavorite, - Value? orientation, - Value? iCloudId, - Value? adjustmentTime, - Value? latitude, - Value? longitude, - }) { - 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, - iCloudId: iCloudId ?? this.iCloudId, - adjustmentTime: adjustmentTime ?? this.adjustmentTime, - latitude: latitude ?? this.latitude, - longitude: longitude ?? this.longitude, - ); - } - - @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); - } - if (iCloudId.present) { - map['i_cloud_id'] = Variable(iCloudId.value); - } - if (adjustmentTime.present) { - map['adjustment_time'] = Variable(adjustmentTime.value); - } - if (latitude.present) { - map['latitude'] = Variable(latitude.value); - } - if (longitude.present) { - map['longitude'] = Variable(longitude.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('iCloudId: $iCloudId, ') - ..write('adjustmentTime: $adjustmentTime, ') - ..write('latitude: $latitude, ') - ..write('longitude: $longitude') - ..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 i2.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, - i2.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 i2.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 RemoteAssetCloudIdEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - RemoteAssetCloudIdEntity(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 cloudId = GeneratedColumn( - 'cloud_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - true, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - late final GeneratedColumn adjustmentTime = - GeneratedColumn( - 'adjustment_time', - aliasedName, - true, - type: DriftSqlType.dateTime, - 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, - ); - @override - List get $columns => [ - assetId, - cloudId, - createdAt, - adjustmentTime, - latitude, - longitude, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'remote_asset_cloud_id_entity'; - @override - Set get $primaryKey => {assetId}; - @override - RemoteAssetCloudIdEntityData map( - Map data, { - String? tablePrefix, - }) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return RemoteAssetCloudIdEntityData( - assetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}asset_id'], - )!, - cloudId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}cloud_id'], - ), - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}created_at'], - ), - adjustmentTime: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}adjustment_time'], - ), - latitude: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}latitude'], - ), - longitude: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}longitude'], - ), - ); - } - - @override - RemoteAssetCloudIdEntity createAlias(String alias) { - return RemoteAssetCloudIdEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class RemoteAssetCloudIdEntityData extends DataClass - implements Insertable { - final String assetId; - final String? cloudId; - final DateTime? createdAt; - final DateTime? adjustmentTime; - final double? latitude; - final double? longitude; - const RemoteAssetCloudIdEntityData({ - required this.assetId, - this.cloudId, - this.createdAt, - this.adjustmentTime, - this.latitude, - this.longitude, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['asset_id'] = Variable(assetId); - if (!nullToAbsent || cloudId != null) { - map['cloud_id'] = Variable(cloudId); - } - if (!nullToAbsent || createdAt != null) { - map['created_at'] = Variable(createdAt); - } - if (!nullToAbsent || adjustmentTime != null) { - map['adjustment_time'] = Variable(adjustmentTime); - } - if (!nullToAbsent || latitude != null) { - map['latitude'] = Variable(latitude); - } - if (!nullToAbsent || longitude != null) { - map['longitude'] = Variable(longitude); - } - return map; - } - - factory RemoteAssetCloudIdEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return RemoteAssetCloudIdEntityData( - assetId: serializer.fromJson(json['assetId']), - cloudId: serializer.fromJson(json['cloudId']), - createdAt: serializer.fromJson(json['createdAt']), - adjustmentTime: serializer.fromJson(json['adjustmentTime']), - latitude: serializer.fromJson(json['latitude']), - longitude: serializer.fromJson(json['longitude']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'assetId': serializer.toJson(assetId), - 'cloudId': serializer.toJson(cloudId), - 'createdAt': serializer.toJson(createdAt), - 'adjustmentTime': serializer.toJson(adjustmentTime), - 'latitude': serializer.toJson(latitude), - 'longitude': serializer.toJson(longitude), - }; - } - - RemoteAssetCloudIdEntityData copyWith({ - String? assetId, - Value cloudId = const Value.absent(), - Value createdAt = const Value.absent(), - Value adjustmentTime = const Value.absent(), - Value latitude = const Value.absent(), - Value longitude = const Value.absent(), - }) => RemoteAssetCloudIdEntityData( - assetId: assetId ?? this.assetId, - cloudId: cloudId.present ? cloudId.value : this.cloudId, - createdAt: createdAt.present ? createdAt.value : this.createdAt, - adjustmentTime: adjustmentTime.present - ? adjustmentTime.value - : this.adjustmentTime, - latitude: latitude.present ? latitude.value : this.latitude, - longitude: longitude.present ? longitude.value : this.longitude, - ); - RemoteAssetCloudIdEntityData copyWithCompanion( - RemoteAssetCloudIdEntityCompanion data, - ) { - return RemoteAssetCloudIdEntityData( - assetId: data.assetId.present ? data.assetId.value : this.assetId, - cloudId: data.cloudId.present ? data.cloudId.value : this.cloudId, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - adjustmentTime: data.adjustmentTime.present - ? data.adjustmentTime.value - : this.adjustmentTime, - latitude: data.latitude.present ? data.latitude.value : this.latitude, - longitude: data.longitude.present ? data.longitude.value : this.longitude, - ); - } - - @override - String toString() { - return (StringBuffer('RemoteAssetCloudIdEntityData(') - ..write('assetId: $assetId, ') - ..write('cloudId: $cloudId, ') - ..write('createdAt: $createdAt, ') - ..write('adjustmentTime: $adjustmentTime, ') - ..write('latitude: $latitude, ') - ..write('longitude: $longitude') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - assetId, - cloudId, - createdAt, - adjustmentTime, - latitude, - longitude, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is RemoteAssetCloudIdEntityData && - other.assetId == this.assetId && - other.cloudId == this.cloudId && - other.createdAt == this.createdAt && - other.adjustmentTime == this.adjustmentTime && - other.latitude == this.latitude && - other.longitude == this.longitude); -} - -class RemoteAssetCloudIdEntityCompanion - extends UpdateCompanion { - final Value assetId; - final Value cloudId; - final Value createdAt; - final Value adjustmentTime; - final Value latitude; - final Value longitude; - const RemoteAssetCloudIdEntityCompanion({ - this.assetId = const Value.absent(), - this.cloudId = const Value.absent(), - this.createdAt = const Value.absent(), - this.adjustmentTime = const Value.absent(), - this.latitude = const Value.absent(), - this.longitude = const Value.absent(), - }); - RemoteAssetCloudIdEntityCompanion.insert({ - required String assetId, - this.cloudId = const Value.absent(), - this.createdAt = const Value.absent(), - this.adjustmentTime = const Value.absent(), - this.latitude = const Value.absent(), - this.longitude = const Value.absent(), - }) : assetId = Value(assetId); - static Insertable custom({ - Expression? assetId, - Expression? cloudId, - Expression? createdAt, - Expression? adjustmentTime, - Expression? latitude, - Expression? longitude, - }) { - return RawValuesInsertable({ - if (assetId != null) 'asset_id': assetId, - if (cloudId != null) 'cloud_id': cloudId, - if (createdAt != null) 'created_at': createdAt, - if (adjustmentTime != null) 'adjustment_time': adjustmentTime, - if (latitude != null) 'latitude': latitude, - if (longitude != null) 'longitude': longitude, - }); - } - - RemoteAssetCloudIdEntityCompanion copyWith({ - Value? assetId, - Value? cloudId, - Value? createdAt, - Value? adjustmentTime, - Value? latitude, - Value? longitude, - }) { - return RemoteAssetCloudIdEntityCompanion( - assetId: assetId ?? this.assetId, - cloudId: cloudId ?? this.cloudId, - createdAt: createdAt ?? this.createdAt, - adjustmentTime: adjustmentTime ?? this.adjustmentTime, - latitude: latitude ?? this.latitude, - longitude: longitude ?? this.longitude, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (assetId.present) { - map['asset_id'] = Variable(assetId.value); - } - if (cloudId.present) { - map['cloud_id'] = Variable(cloudId.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (adjustmentTime.present) { - map['adjustment_time'] = Variable(adjustmentTime.value); - } - if (latitude.present) { - map['latitude'] = Variable(latitude.value); - } - if (longitude.present) { - map['longitude'] = Variable(longitude.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('RemoteAssetCloudIdEntityCompanion(') - ..write('assetId: $assetId, ') - ..write('cloudId: $cloudId, ') - ..write('createdAt: $createdAt, ') - ..write('adjustmentTime: $adjustmentTime, ') - ..write('latitude: $latitude, ') - ..write('longitude: $longitude') - ..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'), - ); - late final GeneratedColumn source = GeneratedColumn( - 'source', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - @override - List get $columns => [ - name, - type, - createdAt, - updatedAt, - width, - height, - durationInSeconds, - id, - albumId, - checksum, - isFavorite, - orientation, - source, - ]; - @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'], - )!, - source: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}source'], - )!, - ); - } - - @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; - final int source; - 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, - required this.source, - }); - @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); - map['source'] = Variable(source); - 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']), - source: serializer.fromJson(json['source']), - ); - } - @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), - 'source': serializer.toJson(source), - }; - } - - 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, - int? source, - }) => 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, - source: source ?? this.source, - ); - 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, - source: data.source.present ? data.source.value : this.source, - ); - } - - @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('source: $source') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - name, - type, - createdAt, - updatedAt, - width, - height, - durationInSeconds, - id, - albumId, - checksum, - isFavorite, - orientation, - source, - ); - @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 && - other.source == this.source); -} - -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; - final Value source; - 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(), - this.source = 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(), - required int source, - }) : name = Value(name), - type = Value(type), - id = Value(id), - albumId = Value(albumId), - source = Value(source); - 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, - Expression? source, - }) { - 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, - if (source != null) 'source': source, - }); - } - - 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, - Value? source, - }) { - 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, - source: source ?? this.source, - ); - } - - @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); - } - if (source.present) { - map['source'] = Variable(source.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('source: $source') - ..write(')')) - .toString(); - } -} - -class DatabaseAtV16 extends GeneratedDatabase { - DatabaseAtV16(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 idxLocalAssetCloudId = Index( - 'idx_local_asset_cloud_id', - 'CREATE INDEX IF NOT EXISTS idx_local_asset_cloud_id ON local_asset_entity (i_cloud_id)', - ); - 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 RemoteAssetCloudIdEntity remoteAssetCloudIdEntity = - RemoteAssetCloudIdEntity(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, - idxLocalAssetCloudId, - idxRemoteAssetOwnerChecksum, - uQRemoteAssetsOwnerChecksum, - uQRemoteAssetsOwnerLibraryChecksum, - idxRemoteAssetChecksum, - authUserEntity, - userMetadataEntity, - partnerEntity, - remoteExifEntity, - remoteAlbumAssetEntity, - remoteAlbumUserEntity, - remoteAssetCloudIdEntity, - memoryEntity, - memoryAssetEntity, - personEntity, - assetFaceEntity, - storeEntity, - trashedLocalAssetEntity, - idxLatLng, - idxTrashedLocalAssetChecksum, - idxTrashedLocalAssetAlbum, - ]; - @override - int get schemaVersion => 16; - @override - DriftDatabaseOptions get options => - const DriftDatabaseOptions(storeDateTimeAsText: true); -} diff --git a/mobile/test/drift/main/generated/schema_v17.dart b/mobile/test/drift/main/generated/schema_v17.dart deleted file mode 100644 index 2314eeac7c..0000000000 --- a/mobile/test/drift/main/generated/schema_v17.dart +++ /dev/null @@ -1,8340 +0,0 @@ -// dart format width=80 -import 'dart:typed_data' as i2; -// GENERATED BY drift_dev, DO NOT MODIFY. -// ignore_for_file: type=lint,unused_import -// -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, - ); - late final GeneratedColumn isEdited = GeneratedColumn( - 'is_edited', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("is_edited" IN (0, 1))', - ), - defaultValue: const CustomExpression('0'), - ); - @override - List get $columns => [ - name, - type, - createdAt, - updatedAt, - width, - height, - durationInSeconds, - id, - checksum, - isFavorite, - ownerId, - localDateTime, - thumbHash, - deletedAt, - livePhotoVideoId, - visibility, - stackId, - libraryId, - isEdited, - ]; - @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'], - ), - isEdited: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}is_edited'], - )!, - ); - } - - @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; - final bool isEdited; - 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, - required this.isEdited, - }); - @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); - } - map['is_edited'] = Variable(isEdited); - 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']), - isEdited: serializer.fromJson(json['isEdited']), - ); - } - @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), - 'isEdited': serializer.toJson(isEdited), - }; - } - - 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(), - bool? isEdited, - }) => 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, - isEdited: isEdited ?? this.isEdited, - ); - 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, - isEdited: data.isEdited.present ? data.isEdited.value : this.isEdited, - ); - } - - @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('isEdited: $isEdited') - ..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, - isEdited, - ); - @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 && - other.isEdited == this.isEdited); -} - -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; - final Value isEdited; - 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(), - this.isEdited = 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(), - this.isEdited = 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, - Expression? isEdited, - }) { - 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, - if (isEdited != null) 'is_edited': isEdited, - }); - } - - 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, - Value? isEdited, - }) { - 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, - isEdited: isEdited ?? this.isEdited, - ); - } - - @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); - } - if (isEdited.present) { - map['is_edited'] = Variable(isEdited.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('isEdited: $isEdited') - ..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'), - ); - late final GeneratedColumn iCloudId = GeneratedColumn( - 'i_cloud_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn adjustmentTime = - GeneratedColumn( - 'adjustment_time', - aliasedName, - true, - type: DriftSqlType.dateTime, - 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, - ); - @override - List get $columns => [ - name, - type, - createdAt, - updatedAt, - width, - height, - durationInSeconds, - id, - checksum, - isFavorite, - orientation, - iCloudId, - adjustmentTime, - latitude, - longitude, - ]; - @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'], - )!, - iCloudId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}i_cloud_id'], - ), - adjustmentTime: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}adjustment_time'], - ), - latitude: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}latitude'], - ), - longitude: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}longitude'], - ), - ); - } - - @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; - final String? iCloudId; - final DateTime? adjustmentTime; - final double? latitude; - final double? longitude; - 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, - this.iCloudId, - this.adjustmentTime, - this.latitude, - this.longitude, - }); - @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); - if (!nullToAbsent || iCloudId != null) { - map['i_cloud_id'] = Variable(iCloudId); - } - if (!nullToAbsent || adjustmentTime != null) { - map['adjustment_time'] = Variable(adjustmentTime); - } - if (!nullToAbsent || latitude != null) { - map['latitude'] = Variable(latitude); - } - if (!nullToAbsent || longitude != null) { - map['longitude'] = Variable(longitude); - } - 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']), - iCloudId: serializer.fromJson(json['iCloudId']), - adjustmentTime: serializer.fromJson(json['adjustmentTime']), - latitude: serializer.fromJson(json['latitude']), - longitude: serializer.fromJson(json['longitude']), - ); - } - @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), - 'iCloudId': serializer.toJson(iCloudId), - 'adjustmentTime': serializer.toJson(adjustmentTime), - 'latitude': serializer.toJson(latitude), - 'longitude': serializer.toJson(longitude), - }; - } - - 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, - Value iCloudId = const Value.absent(), - Value adjustmentTime = const Value.absent(), - Value latitude = const Value.absent(), - Value longitude = const Value.absent(), - }) => 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, - iCloudId: iCloudId.present ? iCloudId.value : this.iCloudId, - adjustmentTime: adjustmentTime.present - ? adjustmentTime.value - : this.adjustmentTime, - latitude: latitude.present ? latitude.value : this.latitude, - longitude: longitude.present ? longitude.value : this.longitude, - ); - 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, - iCloudId: data.iCloudId.present ? data.iCloudId.value : this.iCloudId, - adjustmentTime: data.adjustmentTime.present - ? data.adjustmentTime.value - : this.adjustmentTime, - latitude: data.latitude.present ? data.latitude.value : this.latitude, - longitude: data.longitude.present ? data.longitude.value : this.longitude, - ); - } - - @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('iCloudId: $iCloudId, ') - ..write('adjustmentTime: $adjustmentTime, ') - ..write('latitude: $latitude, ') - ..write('longitude: $longitude') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - name, - type, - createdAt, - updatedAt, - width, - height, - durationInSeconds, - id, - checksum, - isFavorite, - orientation, - iCloudId, - adjustmentTime, - latitude, - longitude, - ); - @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 && - other.iCloudId == this.iCloudId && - other.adjustmentTime == this.adjustmentTime && - other.latitude == this.latitude && - other.longitude == this.longitude); -} - -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; - final Value iCloudId; - final Value adjustmentTime; - final Value latitude; - final Value longitude; - 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(), - this.iCloudId = const Value.absent(), - this.adjustmentTime = const Value.absent(), - this.latitude = const Value.absent(), - this.longitude = 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(), - this.iCloudId = const Value.absent(), - this.adjustmentTime = const Value.absent(), - this.latitude = const Value.absent(), - this.longitude = 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, - Expression? iCloudId, - Expression? adjustmentTime, - Expression? latitude, - Expression? longitude, - }) { - 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, - if (iCloudId != null) 'i_cloud_id': iCloudId, - if (adjustmentTime != null) 'adjustment_time': adjustmentTime, - if (latitude != null) 'latitude': latitude, - if (longitude != null) 'longitude': longitude, - }); - } - - LocalAssetEntityCompanion copyWith({ - Value? name, - Value? type, - Value? createdAt, - Value? updatedAt, - Value? width, - Value? height, - Value? durationInSeconds, - Value? id, - Value? checksum, - Value? isFavorite, - Value? orientation, - Value? iCloudId, - Value? adjustmentTime, - Value? latitude, - Value? longitude, - }) { - 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, - iCloudId: iCloudId ?? this.iCloudId, - adjustmentTime: adjustmentTime ?? this.adjustmentTime, - latitude: latitude ?? this.latitude, - longitude: longitude ?? this.longitude, - ); - } - - @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); - } - if (iCloudId.present) { - map['i_cloud_id'] = Variable(iCloudId.value); - } - if (adjustmentTime.present) { - map['adjustment_time'] = Variable(adjustmentTime.value); - } - if (latitude.present) { - map['latitude'] = Variable(latitude.value); - } - if (longitude.present) { - map['longitude'] = Variable(longitude.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('iCloudId: $iCloudId, ') - ..write('adjustmentTime: $adjustmentTime, ') - ..write('latitude: $latitude, ') - ..write('longitude: $longitude') - ..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 i2.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, - i2.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 i2.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 RemoteAssetCloudIdEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - RemoteAssetCloudIdEntity(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 cloudId = GeneratedColumn( - 'cloud_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - true, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - late final GeneratedColumn adjustmentTime = - GeneratedColumn( - 'adjustment_time', - aliasedName, - true, - type: DriftSqlType.dateTime, - 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, - ); - @override - List get $columns => [ - assetId, - cloudId, - createdAt, - adjustmentTime, - latitude, - longitude, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'remote_asset_cloud_id_entity'; - @override - Set get $primaryKey => {assetId}; - @override - RemoteAssetCloudIdEntityData map( - Map data, { - String? tablePrefix, - }) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return RemoteAssetCloudIdEntityData( - assetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}asset_id'], - )!, - cloudId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}cloud_id'], - ), - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}created_at'], - ), - adjustmentTime: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}adjustment_time'], - ), - latitude: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}latitude'], - ), - longitude: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}longitude'], - ), - ); - } - - @override - RemoteAssetCloudIdEntity createAlias(String alias) { - return RemoteAssetCloudIdEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class RemoteAssetCloudIdEntityData extends DataClass - implements Insertable { - final String assetId; - final String? cloudId; - final DateTime? createdAt; - final DateTime? adjustmentTime; - final double? latitude; - final double? longitude; - const RemoteAssetCloudIdEntityData({ - required this.assetId, - this.cloudId, - this.createdAt, - this.adjustmentTime, - this.latitude, - this.longitude, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['asset_id'] = Variable(assetId); - if (!nullToAbsent || cloudId != null) { - map['cloud_id'] = Variable(cloudId); - } - if (!nullToAbsent || createdAt != null) { - map['created_at'] = Variable(createdAt); - } - if (!nullToAbsent || adjustmentTime != null) { - map['adjustment_time'] = Variable(adjustmentTime); - } - if (!nullToAbsent || latitude != null) { - map['latitude'] = Variable(latitude); - } - if (!nullToAbsent || longitude != null) { - map['longitude'] = Variable(longitude); - } - return map; - } - - factory RemoteAssetCloudIdEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return RemoteAssetCloudIdEntityData( - assetId: serializer.fromJson(json['assetId']), - cloudId: serializer.fromJson(json['cloudId']), - createdAt: serializer.fromJson(json['createdAt']), - adjustmentTime: serializer.fromJson(json['adjustmentTime']), - latitude: serializer.fromJson(json['latitude']), - longitude: serializer.fromJson(json['longitude']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'assetId': serializer.toJson(assetId), - 'cloudId': serializer.toJson(cloudId), - 'createdAt': serializer.toJson(createdAt), - 'adjustmentTime': serializer.toJson(adjustmentTime), - 'latitude': serializer.toJson(latitude), - 'longitude': serializer.toJson(longitude), - }; - } - - RemoteAssetCloudIdEntityData copyWith({ - String? assetId, - Value cloudId = const Value.absent(), - Value createdAt = const Value.absent(), - Value adjustmentTime = const Value.absent(), - Value latitude = const Value.absent(), - Value longitude = const Value.absent(), - }) => RemoteAssetCloudIdEntityData( - assetId: assetId ?? this.assetId, - cloudId: cloudId.present ? cloudId.value : this.cloudId, - createdAt: createdAt.present ? createdAt.value : this.createdAt, - adjustmentTime: adjustmentTime.present - ? adjustmentTime.value - : this.adjustmentTime, - latitude: latitude.present ? latitude.value : this.latitude, - longitude: longitude.present ? longitude.value : this.longitude, - ); - RemoteAssetCloudIdEntityData copyWithCompanion( - RemoteAssetCloudIdEntityCompanion data, - ) { - return RemoteAssetCloudIdEntityData( - assetId: data.assetId.present ? data.assetId.value : this.assetId, - cloudId: data.cloudId.present ? data.cloudId.value : this.cloudId, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - adjustmentTime: data.adjustmentTime.present - ? data.adjustmentTime.value - : this.adjustmentTime, - latitude: data.latitude.present ? data.latitude.value : this.latitude, - longitude: data.longitude.present ? data.longitude.value : this.longitude, - ); - } - - @override - String toString() { - return (StringBuffer('RemoteAssetCloudIdEntityData(') - ..write('assetId: $assetId, ') - ..write('cloudId: $cloudId, ') - ..write('createdAt: $createdAt, ') - ..write('adjustmentTime: $adjustmentTime, ') - ..write('latitude: $latitude, ') - ..write('longitude: $longitude') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - assetId, - cloudId, - createdAt, - adjustmentTime, - latitude, - longitude, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is RemoteAssetCloudIdEntityData && - other.assetId == this.assetId && - other.cloudId == this.cloudId && - other.createdAt == this.createdAt && - other.adjustmentTime == this.adjustmentTime && - other.latitude == this.latitude && - other.longitude == this.longitude); -} - -class RemoteAssetCloudIdEntityCompanion - extends UpdateCompanion { - final Value assetId; - final Value cloudId; - final Value createdAt; - final Value adjustmentTime; - final Value latitude; - final Value longitude; - const RemoteAssetCloudIdEntityCompanion({ - this.assetId = const Value.absent(), - this.cloudId = const Value.absent(), - this.createdAt = const Value.absent(), - this.adjustmentTime = const Value.absent(), - this.latitude = const Value.absent(), - this.longitude = const Value.absent(), - }); - RemoteAssetCloudIdEntityCompanion.insert({ - required String assetId, - this.cloudId = const Value.absent(), - this.createdAt = const Value.absent(), - this.adjustmentTime = const Value.absent(), - this.latitude = const Value.absent(), - this.longitude = const Value.absent(), - }) : assetId = Value(assetId); - static Insertable custom({ - Expression? assetId, - Expression? cloudId, - Expression? createdAt, - Expression? adjustmentTime, - Expression? latitude, - Expression? longitude, - }) { - return RawValuesInsertable({ - if (assetId != null) 'asset_id': assetId, - if (cloudId != null) 'cloud_id': cloudId, - if (createdAt != null) 'created_at': createdAt, - if (adjustmentTime != null) 'adjustment_time': adjustmentTime, - if (latitude != null) 'latitude': latitude, - if (longitude != null) 'longitude': longitude, - }); - } - - RemoteAssetCloudIdEntityCompanion copyWith({ - Value? assetId, - Value? cloudId, - Value? createdAt, - Value? adjustmentTime, - Value? latitude, - Value? longitude, - }) { - return RemoteAssetCloudIdEntityCompanion( - assetId: assetId ?? this.assetId, - cloudId: cloudId ?? this.cloudId, - createdAt: createdAt ?? this.createdAt, - adjustmentTime: adjustmentTime ?? this.adjustmentTime, - latitude: latitude ?? this.latitude, - longitude: longitude ?? this.longitude, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (assetId.present) { - map['asset_id'] = Variable(assetId.value); - } - if (cloudId.present) { - map['cloud_id'] = Variable(cloudId.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (adjustmentTime.present) { - map['adjustment_time'] = Variable(adjustmentTime.value); - } - if (latitude.present) { - map['latitude'] = Variable(latitude.value); - } - if (longitude.present) { - map['longitude'] = Variable(longitude.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('RemoteAssetCloudIdEntityCompanion(') - ..write('assetId: $assetId, ') - ..write('cloudId: $cloudId, ') - ..write('createdAt: $createdAt, ') - ..write('adjustmentTime: $adjustmentTime, ') - ..write('latitude: $latitude, ') - ..write('longitude: $longitude') - ..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'), - ); - late final GeneratedColumn source = GeneratedColumn( - 'source', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - @override - List get $columns => [ - name, - type, - createdAt, - updatedAt, - width, - height, - durationInSeconds, - id, - albumId, - checksum, - isFavorite, - orientation, - source, - ]; - @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'], - )!, - source: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}source'], - )!, - ); - } - - @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; - final int source; - 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, - required this.source, - }); - @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); - map['source'] = Variable(source); - 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']), - source: serializer.fromJson(json['source']), - ); - } - @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), - 'source': serializer.toJson(source), - }; - } - - 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, - int? source, - }) => 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, - source: source ?? this.source, - ); - 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, - source: data.source.present ? data.source.value : this.source, - ); - } - - @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('source: $source') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - name, - type, - createdAt, - updatedAt, - width, - height, - durationInSeconds, - id, - albumId, - checksum, - isFavorite, - orientation, - source, - ); - @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 && - other.source == this.source); -} - -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; - final Value source; - 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(), - this.source = 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(), - required int source, - }) : name = Value(name), - type = Value(type), - id = Value(id), - albumId = Value(albumId), - source = Value(source); - 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, - Expression? source, - }) { - 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, - if (source != null) 'source': source, - }); - } - - 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, - Value? source, - }) { - 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, - source: source ?? this.source, - ); - } - - @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); - } - if (source.present) { - map['source'] = Variable(source.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('source: $source') - ..write(')')) - .toString(); - } -} - -class DatabaseAtV17 extends GeneratedDatabase { - DatabaseAtV17(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 idxLocalAssetCloudId = Index( - 'idx_local_asset_cloud_id', - 'CREATE INDEX IF NOT EXISTS idx_local_asset_cloud_id ON local_asset_entity (i_cloud_id)', - ); - 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 RemoteAssetCloudIdEntity remoteAssetCloudIdEntity = - RemoteAssetCloudIdEntity(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, - idxLocalAssetCloudId, - idxRemoteAssetOwnerChecksum, - uQRemoteAssetsOwnerChecksum, - uQRemoteAssetsOwnerLibraryChecksum, - idxRemoteAssetChecksum, - authUserEntity, - userMetadataEntity, - partnerEntity, - remoteExifEntity, - remoteAlbumAssetEntity, - remoteAlbumUserEntity, - remoteAssetCloudIdEntity, - memoryEntity, - memoryAssetEntity, - personEntity, - assetFaceEntity, - storeEntity, - trashedLocalAssetEntity, - idxLatLng, - idxTrashedLocalAssetChecksum, - idxTrashedLocalAssetAlbum, - ]; - @override - int get schemaVersion => 17; - @override - DriftDatabaseOptions get options => - const DriftDatabaseOptions(storeDateTimeAsText: true); -} diff --git a/mobile/test/drift/main/generated/schema_v18.dart b/mobile/test/drift/main/generated/schema_v18.dart deleted file mode 100644 index 9265566c47..0000000000 --- a/mobile/test/drift/main/generated/schema_v18.dart +++ /dev/null @@ -1,8345 +0,0 @@ -// dart format width=80 -import 'dart:typed_data' as i2; -// GENERATED BY drift_dev, DO NOT MODIFY. -// ignore_for_file: type=lint,unused_import -// -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, - ); - late final GeneratedColumn isEdited = GeneratedColumn( - 'is_edited', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("is_edited" IN (0, 1))', - ), - defaultValue: const CustomExpression('0'), - ); - @override - List get $columns => [ - name, - type, - createdAt, - updatedAt, - width, - height, - durationInSeconds, - id, - checksum, - isFavorite, - ownerId, - localDateTime, - thumbHash, - deletedAt, - livePhotoVideoId, - visibility, - stackId, - libraryId, - isEdited, - ]; - @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'], - ), - isEdited: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}is_edited'], - )!, - ); - } - - @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; - final bool isEdited; - 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, - required this.isEdited, - }); - @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); - } - map['is_edited'] = Variable(isEdited); - 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']), - isEdited: serializer.fromJson(json['isEdited']), - ); - } - @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), - 'isEdited': serializer.toJson(isEdited), - }; - } - - 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(), - bool? isEdited, - }) => 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, - isEdited: isEdited ?? this.isEdited, - ); - 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, - isEdited: data.isEdited.present ? data.isEdited.value : this.isEdited, - ); - } - - @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('isEdited: $isEdited') - ..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, - isEdited, - ); - @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 && - other.isEdited == this.isEdited); -} - -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; - final Value isEdited; - 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(), - this.isEdited = 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(), - this.isEdited = 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, - Expression? isEdited, - }) { - 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, - if (isEdited != null) 'is_edited': isEdited, - }); - } - - 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, - Value? isEdited, - }) { - 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, - isEdited: isEdited ?? this.isEdited, - ); - } - - @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); - } - if (isEdited.present) { - map['is_edited'] = Variable(isEdited.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('isEdited: $isEdited') - ..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'), - ); - late final GeneratedColumn iCloudId = GeneratedColumn( - 'i_cloud_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn adjustmentTime = - GeneratedColumn( - 'adjustment_time', - aliasedName, - true, - type: DriftSqlType.dateTime, - 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, - ); - @override - List get $columns => [ - name, - type, - createdAt, - updatedAt, - width, - height, - durationInSeconds, - id, - checksum, - isFavorite, - orientation, - iCloudId, - adjustmentTime, - latitude, - longitude, - ]; - @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'], - )!, - iCloudId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}i_cloud_id'], - ), - adjustmentTime: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}adjustment_time'], - ), - latitude: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}latitude'], - ), - longitude: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}longitude'], - ), - ); - } - - @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; - final String? iCloudId; - final DateTime? adjustmentTime; - final double? latitude; - final double? longitude; - 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, - this.iCloudId, - this.adjustmentTime, - this.latitude, - this.longitude, - }); - @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); - if (!nullToAbsent || iCloudId != null) { - map['i_cloud_id'] = Variable(iCloudId); - } - if (!nullToAbsent || adjustmentTime != null) { - map['adjustment_time'] = Variable(adjustmentTime); - } - if (!nullToAbsent || latitude != null) { - map['latitude'] = Variable(latitude); - } - if (!nullToAbsent || longitude != null) { - map['longitude'] = Variable(longitude); - } - 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']), - iCloudId: serializer.fromJson(json['iCloudId']), - adjustmentTime: serializer.fromJson(json['adjustmentTime']), - latitude: serializer.fromJson(json['latitude']), - longitude: serializer.fromJson(json['longitude']), - ); - } - @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), - 'iCloudId': serializer.toJson(iCloudId), - 'adjustmentTime': serializer.toJson(adjustmentTime), - 'latitude': serializer.toJson(latitude), - 'longitude': serializer.toJson(longitude), - }; - } - - 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, - Value iCloudId = const Value.absent(), - Value adjustmentTime = const Value.absent(), - Value latitude = const Value.absent(), - Value longitude = const Value.absent(), - }) => 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, - iCloudId: iCloudId.present ? iCloudId.value : this.iCloudId, - adjustmentTime: adjustmentTime.present - ? adjustmentTime.value - : this.adjustmentTime, - latitude: latitude.present ? latitude.value : this.latitude, - longitude: longitude.present ? longitude.value : this.longitude, - ); - 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, - iCloudId: data.iCloudId.present ? data.iCloudId.value : this.iCloudId, - adjustmentTime: data.adjustmentTime.present - ? data.adjustmentTime.value - : this.adjustmentTime, - latitude: data.latitude.present ? data.latitude.value : this.latitude, - longitude: data.longitude.present ? data.longitude.value : this.longitude, - ); - } - - @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('iCloudId: $iCloudId, ') - ..write('adjustmentTime: $adjustmentTime, ') - ..write('latitude: $latitude, ') - ..write('longitude: $longitude') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - name, - type, - createdAt, - updatedAt, - width, - height, - durationInSeconds, - id, - checksum, - isFavorite, - orientation, - iCloudId, - adjustmentTime, - latitude, - longitude, - ); - @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 && - other.iCloudId == this.iCloudId && - other.adjustmentTime == this.adjustmentTime && - other.latitude == this.latitude && - other.longitude == this.longitude); -} - -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; - final Value iCloudId; - final Value adjustmentTime; - final Value latitude; - final Value longitude; - 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(), - this.iCloudId = const Value.absent(), - this.adjustmentTime = const Value.absent(), - this.latitude = const Value.absent(), - this.longitude = 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(), - this.iCloudId = const Value.absent(), - this.adjustmentTime = const Value.absent(), - this.latitude = const Value.absent(), - this.longitude = 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, - Expression? iCloudId, - Expression? adjustmentTime, - Expression? latitude, - Expression? longitude, - }) { - 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, - if (iCloudId != null) 'i_cloud_id': iCloudId, - if (adjustmentTime != null) 'adjustment_time': adjustmentTime, - if (latitude != null) 'latitude': latitude, - if (longitude != null) 'longitude': longitude, - }); - } - - LocalAssetEntityCompanion copyWith({ - Value? name, - Value? type, - Value? createdAt, - Value? updatedAt, - Value? width, - Value? height, - Value? durationInSeconds, - Value? id, - Value? checksum, - Value? isFavorite, - Value? orientation, - Value? iCloudId, - Value? adjustmentTime, - Value? latitude, - Value? longitude, - }) { - 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, - iCloudId: iCloudId ?? this.iCloudId, - adjustmentTime: adjustmentTime ?? this.adjustmentTime, - latitude: latitude ?? this.latitude, - longitude: longitude ?? this.longitude, - ); - } - - @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); - } - if (iCloudId.present) { - map['i_cloud_id'] = Variable(iCloudId.value); - } - if (adjustmentTime.present) { - map['adjustment_time'] = Variable(adjustmentTime.value); - } - if (latitude.present) { - map['latitude'] = Variable(latitude.value); - } - if (longitude.present) { - map['longitude'] = Variable(longitude.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('iCloudId: $iCloudId, ') - ..write('adjustmentTime: $adjustmentTime, ') - ..write('latitude: $latitude, ') - ..write('longitude: $longitude') - ..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 i2.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, - i2.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 i2.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 RemoteAssetCloudIdEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - RemoteAssetCloudIdEntity(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 cloudId = GeneratedColumn( - 'cloud_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - true, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - late final GeneratedColumn adjustmentTime = - GeneratedColumn( - 'adjustment_time', - aliasedName, - true, - type: DriftSqlType.dateTime, - 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, - ); - @override - List get $columns => [ - assetId, - cloudId, - createdAt, - adjustmentTime, - latitude, - longitude, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'remote_asset_cloud_id_entity'; - @override - Set get $primaryKey => {assetId}; - @override - RemoteAssetCloudIdEntityData map( - Map data, { - String? tablePrefix, - }) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return RemoteAssetCloudIdEntityData( - assetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}asset_id'], - )!, - cloudId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}cloud_id'], - ), - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}created_at'], - ), - adjustmentTime: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}adjustment_time'], - ), - latitude: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}latitude'], - ), - longitude: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}longitude'], - ), - ); - } - - @override - RemoteAssetCloudIdEntity createAlias(String alias) { - return RemoteAssetCloudIdEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class RemoteAssetCloudIdEntityData extends DataClass - implements Insertable { - final String assetId; - final String? cloudId; - final DateTime? createdAt; - final DateTime? adjustmentTime; - final double? latitude; - final double? longitude; - const RemoteAssetCloudIdEntityData({ - required this.assetId, - this.cloudId, - this.createdAt, - this.adjustmentTime, - this.latitude, - this.longitude, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['asset_id'] = Variable(assetId); - if (!nullToAbsent || cloudId != null) { - map['cloud_id'] = Variable(cloudId); - } - if (!nullToAbsent || createdAt != null) { - map['created_at'] = Variable(createdAt); - } - if (!nullToAbsent || adjustmentTime != null) { - map['adjustment_time'] = Variable(adjustmentTime); - } - if (!nullToAbsent || latitude != null) { - map['latitude'] = Variable(latitude); - } - if (!nullToAbsent || longitude != null) { - map['longitude'] = Variable(longitude); - } - return map; - } - - factory RemoteAssetCloudIdEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return RemoteAssetCloudIdEntityData( - assetId: serializer.fromJson(json['assetId']), - cloudId: serializer.fromJson(json['cloudId']), - createdAt: serializer.fromJson(json['createdAt']), - adjustmentTime: serializer.fromJson(json['adjustmentTime']), - latitude: serializer.fromJson(json['latitude']), - longitude: serializer.fromJson(json['longitude']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'assetId': serializer.toJson(assetId), - 'cloudId': serializer.toJson(cloudId), - 'createdAt': serializer.toJson(createdAt), - 'adjustmentTime': serializer.toJson(adjustmentTime), - 'latitude': serializer.toJson(latitude), - 'longitude': serializer.toJson(longitude), - }; - } - - RemoteAssetCloudIdEntityData copyWith({ - String? assetId, - Value cloudId = const Value.absent(), - Value createdAt = const Value.absent(), - Value adjustmentTime = const Value.absent(), - Value latitude = const Value.absent(), - Value longitude = const Value.absent(), - }) => RemoteAssetCloudIdEntityData( - assetId: assetId ?? this.assetId, - cloudId: cloudId.present ? cloudId.value : this.cloudId, - createdAt: createdAt.present ? createdAt.value : this.createdAt, - adjustmentTime: adjustmentTime.present - ? adjustmentTime.value - : this.adjustmentTime, - latitude: latitude.present ? latitude.value : this.latitude, - longitude: longitude.present ? longitude.value : this.longitude, - ); - RemoteAssetCloudIdEntityData copyWithCompanion( - RemoteAssetCloudIdEntityCompanion data, - ) { - return RemoteAssetCloudIdEntityData( - assetId: data.assetId.present ? data.assetId.value : this.assetId, - cloudId: data.cloudId.present ? data.cloudId.value : this.cloudId, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - adjustmentTime: data.adjustmentTime.present - ? data.adjustmentTime.value - : this.adjustmentTime, - latitude: data.latitude.present ? data.latitude.value : this.latitude, - longitude: data.longitude.present ? data.longitude.value : this.longitude, - ); - } - - @override - String toString() { - return (StringBuffer('RemoteAssetCloudIdEntityData(') - ..write('assetId: $assetId, ') - ..write('cloudId: $cloudId, ') - ..write('createdAt: $createdAt, ') - ..write('adjustmentTime: $adjustmentTime, ') - ..write('latitude: $latitude, ') - ..write('longitude: $longitude') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - assetId, - cloudId, - createdAt, - adjustmentTime, - latitude, - longitude, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is RemoteAssetCloudIdEntityData && - other.assetId == this.assetId && - other.cloudId == this.cloudId && - other.createdAt == this.createdAt && - other.adjustmentTime == this.adjustmentTime && - other.latitude == this.latitude && - other.longitude == this.longitude); -} - -class RemoteAssetCloudIdEntityCompanion - extends UpdateCompanion { - final Value assetId; - final Value cloudId; - final Value createdAt; - final Value adjustmentTime; - final Value latitude; - final Value longitude; - const RemoteAssetCloudIdEntityCompanion({ - this.assetId = const Value.absent(), - this.cloudId = const Value.absent(), - this.createdAt = const Value.absent(), - this.adjustmentTime = const Value.absent(), - this.latitude = const Value.absent(), - this.longitude = const Value.absent(), - }); - RemoteAssetCloudIdEntityCompanion.insert({ - required String assetId, - this.cloudId = const Value.absent(), - this.createdAt = const Value.absent(), - this.adjustmentTime = const Value.absent(), - this.latitude = const Value.absent(), - this.longitude = const Value.absent(), - }) : assetId = Value(assetId); - static Insertable custom({ - Expression? assetId, - Expression? cloudId, - Expression? createdAt, - Expression? adjustmentTime, - Expression? latitude, - Expression? longitude, - }) { - return RawValuesInsertable({ - if (assetId != null) 'asset_id': assetId, - if (cloudId != null) 'cloud_id': cloudId, - if (createdAt != null) 'created_at': createdAt, - if (adjustmentTime != null) 'adjustment_time': adjustmentTime, - if (latitude != null) 'latitude': latitude, - if (longitude != null) 'longitude': longitude, - }); - } - - RemoteAssetCloudIdEntityCompanion copyWith({ - Value? assetId, - Value? cloudId, - Value? createdAt, - Value? adjustmentTime, - Value? latitude, - Value? longitude, - }) { - return RemoteAssetCloudIdEntityCompanion( - assetId: assetId ?? this.assetId, - cloudId: cloudId ?? this.cloudId, - createdAt: createdAt ?? this.createdAt, - adjustmentTime: adjustmentTime ?? this.adjustmentTime, - latitude: latitude ?? this.latitude, - longitude: longitude ?? this.longitude, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (assetId.present) { - map['asset_id'] = Variable(assetId.value); - } - if (cloudId.present) { - map['cloud_id'] = Variable(cloudId.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (adjustmentTime.present) { - map['adjustment_time'] = Variable(adjustmentTime.value); - } - if (latitude.present) { - map['latitude'] = Variable(latitude.value); - } - if (longitude.present) { - map['longitude'] = Variable(longitude.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('RemoteAssetCloudIdEntityCompanion(') - ..write('assetId: $assetId, ') - ..write('cloudId: $cloudId, ') - ..write('createdAt: $createdAt, ') - ..write('adjustmentTime: $adjustmentTime, ') - ..write('latitude: $latitude, ') - ..write('longitude: $longitude') - ..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'), - ); - late final GeneratedColumn source = GeneratedColumn( - 'source', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - @override - List get $columns => [ - name, - type, - createdAt, - updatedAt, - width, - height, - durationInSeconds, - id, - albumId, - checksum, - isFavorite, - orientation, - source, - ]; - @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'], - )!, - source: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}source'], - )!, - ); - } - - @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; - final int source; - 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, - required this.source, - }); - @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); - map['source'] = Variable(source); - 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']), - source: serializer.fromJson(json['source']), - ); - } - @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), - 'source': serializer.toJson(source), - }; - } - - 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, - int? source, - }) => 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, - source: source ?? this.source, - ); - 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, - source: data.source.present ? data.source.value : this.source, - ); - } - - @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('source: $source') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - name, - type, - createdAt, - updatedAt, - width, - height, - durationInSeconds, - id, - albumId, - checksum, - isFavorite, - orientation, - source, - ); - @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 && - other.source == this.source); -} - -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; - final Value source; - 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(), - this.source = 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(), - required int source, - }) : name = Value(name), - type = Value(type), - id = Value(id), - albumId = Value(albumId), - source = Value(source); - 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, - Expression? source, - }) { - 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, - if (source != null) 'source': source, - }); - } - - 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, - Value? source, - }) { - 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, - source: source ?? this.source, - ); - } - - @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); - } - if (source.present) { - map['source'] = Variable(source.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('source: $source') - ..write(')')) - .toString(); - } -} - -class DatabaseAtV18 extends GeneratedDatabase { - DatabaseAtV18(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 idxLocalAssetCloudId = Index( - 'idx_local_asset_cloud_id', - 'CREATE INDEX IF NOT EXISTS idx_local_asset_cloud_id ON local_asset_entity (i_cloud_id)', - ); - 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 RemoteAssetCloudIdEntity remoteAssetCloudIdEntity = - RemoteAssetCloudIdEntity(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 idxRemoteAssetCloudId = Index( - 'idx_remote_asset_cloud_id', - 'CREATE INDEX IF NOT EXISTS idx_remote_asset_cloud_id ON remote_asset_cloud_id_entity (cloud_id)', - ); - 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, - idxLocalAssetCloudId, - idxRemoteAssetOwnerChecksum, - uQRemoteAssetsOwnerChecksum, - uQRemoteAssetsOwnerLibraryChecksum, - idxRemoteAssetChecksum, - authUserEntity, - userMetadataEntity, - partnerEntity, - remoteExifEntity, - remoteAlbumAssetEntity, - remoteAlbumUserEntity, - remoteAssetCloudIdEntity, - memoryEntity, - memoryAssetEntity, - personEntity, - assetFaceEntity, - storeEntity, - trashedLocalAssetEntity, - idxLatLng, - idxRemoteAssetCloudId, - idxTrashedLocalAssetChecksum, - idxTrashedLocalAssetAlbum, - ]; - @override - int get schemaVersion => 18; - @override - DriftDatabaseOptions get options => - const DriftDatabaseOptions(storeDateTimeAsText: true); -} diff --git a/mobile/test/drift/main/generated/schema_v19.dart b/mobile/test/drift/main/generated/schema_v19.dart deleted file mode 100644 index 1e80670893..0000000000 --- a/mobile/test/drift/main/generated/schema_v19.dart +++ /dev/null @@ -1,8400 +0,0 @@ -// dart format width=80 -import 'dart:typed_data' as i2; -// GENERATED BY drift_dev, DO NOT MODIFY. -// ignore_for_file: type=lint,unused_import -// -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, - ); - late final GeneratedColumn isEdited = GeneratedColumn( - 'is_edited', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("is_edited" IN (0, 1))', - ), - defaultValue: const CustomExpression('0'), - ); - @override - List get $columns => [ - name, - type, - createdAt, - updatedAt, - width, - height, - durationInSeconds, - id, - checksum, - isFavorite, - ownerId, - localDateTime, - thumbHash, - deletedAt, - livePhotoVideoId, - visibility, - stackId, - libraryId, - isEdited, - ]; - @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'], - ), - isEdited: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}is_edited'], - )!, - ); - } - - @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; - final bool isEdited; - 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, - required this.isEdited, - }); - @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); - } - map['is_edited'] = Variable(isEdited); - 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']), - isEdited: serializer.fromJson(json['isEdited']), - ); - } - @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), - 'isEdited': serializer.toJson(isEdited), - }; - } - - 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(), - bool? isEdited, - }) => 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, - isEdited: isEdited ?? this.isEdited, - ); - 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, - isEdited: data.isEdited.present ? data.isEdited.value : this.isEdited, - ); - } - - @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('isEdited: $isEdited') - ..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, - isEdited, - ); - @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 && - other.isEdited == this.isEdited); -} - -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; - final Value isEdited; - 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(), - this.isEdited = 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(), - this.isEdited = 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, - Expression? isEdited, - }) { - 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, - if (isEdited != null) 'is_edited': isEdited, - }); - } - - 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, - Value? isEdited, - }) { - 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, - isEdited: isEdited ?? this.isEdited, - ); - } - - @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); - } - if (isEdited.present) { - map['is_edited'] = Variable(isEdited.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('isEdited: $isEdited') - ..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'), - ); - late final GeneratedColumn iCloudId = GeneratedColumn( - 'i_cloud_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn adjustmentTime = - GeneratedColumn( - 'adjustment_time', - aliasedName, - true, - type: DriftSqlType.dateTime, - 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, - ); - @override - List get $columns => [ - name, - type, - createdAt, - updatedAt, - width, - height, - durationInSeconds, - id, - checksum, - isFavorite, - orientation, - iCloudId, - adjustmentTime, - latitude, - longitude, - ]; - @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'], - )!, - iCloudId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}i_cloud_id'], - ), - adjustmentTime: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}adjustment_time'], - ), - latitude: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}latitude'], - ), - longitude: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}longitude'], - ), - ); - } - - @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; - final String? iCloudId; - final DateTime? adjustmentTime; - final double? latitude; - final double? longitude; - 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, - this.iCloudId, - this.adjustmentTime, - this.latitude, - this.longitude, - }); - @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); - if (!nullToAbsent || iCloudId != null) { - map['i_cloud_id'] = Variable(iCloudId); - } - if (!nullToAbsent || adjustmentTime != null) { - map['adjustment_time'] = Variable(adjustmentTime); - } - if (!nullToAbsent || latitude != null) { - map['latitude'] = Variable(latitude); - } - if (!nullToAbsent || longitude != null) { - map['longitude'] = Variable(longitude); - } - 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']), - iCloudId: serializer.fromJson(json['iCloudId']), - adjustmentTime: serializer.fromJson(json['adjustmentTime']), - latitude: serializer.fromJson(json['latitude']), - longitude: serializer.fromJson(json['longitude']), - ); - } - @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), - 'iCloudId': serializer.toJson(iCloudId), - 'adjustmentTime': serializer.toJson(adjustmentTime), - 'latitude': serializer.toJson(latitude), - 'longitude': serializer.toJson(longitude), - }; - } - - 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, - Value iCloudId = const Value.absent(), - Value adjustmentTime = const Value.absent(), - Value latitude = const Value.absent(), - Value longitude = const Value.absent(), - }) => 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, - iCloudId: iCloudId.present ? iCloudId.value : this.iCloudId, - adjustmentTime: adjustmentTime.present - ? adjustmentTime.value - : this.adjustmentTime, - latitude: latitude.present ? latitude.value : this.latitude, - longitude: longitude.present ? longitude.value : this.longitude, - ); - 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, - iCloudId: data.iCloudId.present ? data.iCloudId.value : this.iCloudId, - adjustmentTime: data.adjustmentTime.present - ? data.adjustmentTime.value - : this.adjustmentTime, - latitude: data.latitude.present ? data.latitude.value : this.latitude, - longitude: data.longitude.present ? data.longitude.value : this.longitude, - ); - } - - @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('iCloudId: $iCloudId, ') - ..write('adjustmentTime: $adjustmentTime, ') - ..write('latitude: $latitude, ') - ..write('longitude: $longitude') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - name, - type, - createdAt, - updatedAt, - width, - height, - durationInSeconds, - id, - checksum, - isFavorite, - orientation, - iCloudId, - adjustmentTime, - latitude, - longitude, - ); - @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 && - other.iCloudId == this.iCloudId && - other.adjustmentTime == this.adjustmentTime && - other.latitude == this.latitude && - other.longitude == this.longitude); -} - -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; - final Value iCloudId; - final Value adjustmentTime; - final Value latitude; - final Value longitude; - 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(), - this.iCloudId = const Value.absent(), - this.adjustmentTime = const Value.absent(), - this.latitude = const Value.absent(), - this.longitude = 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(), - this.iCloudId = const Value.absent(), - this.adjustmentTime = const Value.absent(), - this.latitude = const Value.absent(), - this.longitude = 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, - Expression? iCloudId, - Expression? adjustmentTime, - Expression? latitude, - Expression? longitude, - }) { - 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, - if (iCloudId != null) 'i_cloud_id': iCloudId, - if (adjustmentTime != null) 'adjustment_time': adjustmentTime, - if (latitude != null) 'latitude': latitude, - if (longitude != null) 'longitude': longitude, - }); - } - - LocalAssetEntityCompanion copyWith({ - Value? name, - Value? type, - Value? createdAt, - Value? updatedAt, - Value? width, - Value? height, - Value? durationInSeconds, - Value? id, - Value? checksum, - Value? isFavorite, - Value? orientation, - Value? iCloudId, - Value? adjustmentTime, - Value? latitude, - Value? longitude, - }) { - 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, - iCloudId: iCloudId ?? this.iCloudId, - adjustmentTime: adjustmentTime ?? this.adjustmentTime, - latitude: latitude ?? this.latitude, - longitude: longitude ?? this.longitude, - ); - } - - @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); - } - if (iCloudId.present) { - map['i_cloud_id'] = Variable(iCloudId.value); - } - if (adjustmentTime.present) { - map['adjustment_time'] = Variable(adjustmentTime.value); - } - if (latitude.present) { - map['latitude'] = Variable(latitude.value); - } - if (longitude.present) { - map['longitude'] = Variable(longitude.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('iCloudId: $iCloudId, ') - ..write('adjustmentTime: $adjustmentTime, ') - ..write('latitude: $latitude, ') - ..write('longitude: $longitude') - ..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 i2.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, - i2.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 i2.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 RemoteAssetCloudIdEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - RemoteAssetCloudIdEntity(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 cloudId = GeneratedColumn( - 'cloud_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - true, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - late final GeneratedColumn adjustmentTime = - GeneratedColumn( - 'adjustment_time', - aliasedName, - true, - type: DriftSqlType.dateTime, - 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, - ); - @override - List get $columns => [ - assetId, - cloudId, - createdAt, - adjustmentTime, - latitude, - longitude, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'remote_asset_cloud_id_entity'; - @override - Set get $primaryKey => {assetId}; - @override - RemoteAssetCloudIdEntityData map( - Map data, { - String? tablePrefix, - }) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return RemoteAssetCloudIdEntityData( - assetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}asset_id'], - )!, - cloudId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}cloud_id'], - ), - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}created_at'], - ), - adjustmentTime: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}adjustment_time'], - ), - latitude: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}latitude'], - ), - longitude: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}longitude'], - ), - ); - } - - @override - RemoteAssetCloudIdEntity createAlias(String alias) { - return RemoteAssetCloudIdEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class RemoteAssetCloudIdEntityData extends DataClass - implements Insertable { - final String assetId; - final String? cloudId; - final DateTime? createdAt; - final DateTime? adjustmentTime; - final double? latitude; - final double? longitude; - const RemoteAssetCloudIdEntityData({ - required this.assetId, - this.cloudId, - this.createdAt, - this.adjustmentTime, - this.latitude, - this.longitude, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['asset_id'] = Variable(assetId); - if (!nullToAbsent || cloudId != null) { - map['cloud_id'] = Variable(cloudId); - } - if (!nullToAbsent || createdAt != null) { - map['created_at'] = Variable(createdAt); - } - if (!nullToAbsent || adjustmentTime != null) { - map['adjustment_time'] = Variable(adjustmentTime); - } - if (!nullToAbsent || latitude != null) { - map['latitude'] = Variable(latitude); - } - if (!nullToAbsent || longitude != null) { - map['longitude'] = Variable(longitude); - } - return map; - } - - factory RemoteAssetCloudIdEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return RemoteAssetCloudIdEntityData( - assetId: serializer.fromJson(json['assetId']), - cloudId: serializer.fromJson(json['cloudId']), - createdAt: serializer.fromJson(json['createdAt']), - adjustmentTime: serializer.fromJson(json['adjustmentTime']), - latitude: serializer.fromJson(json['latitude']), - longitude: serializer.fromJson(json['longitude']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'assetId': serializer.toJson(assetId), - 'cloudId': serializer.toJson(cloudId), - 'createdAt': serializer.toJson(createdAt), - 'adjustmentTime': serializer.toJson(adjustmentTime), - 'latitude': serializer.toJson(latitude), - 'longitude': serializer.toJson(longitude), - }; - } - - RemoteAssetCloudIdEntityData copyWith({ - String? assetId, - Value cloudId = const Value.absent(), - Value createdAt = const Value.absent(), - Value adjustmentTime = const Value.absent(), - Value latitude = const Value.absent(), - Value longitude = const Value.absent(), - }) => RemoteAssetCloudIdEntityData( - assetId: assetId ?? this.assetId, - cloudId: cloudId.present ? cloudId.value : this.cloudId, - createdAt: createdAt.present ? createdAt.value : this.createdAt, - adjustmentTime: adjustmentTime.present - ? adjustmentTime.value - : this.adjustmentTime, - latitude: latitude.present ? latitude.value : this.latitude, - longitude: longitude.present ? longitude.value : this.longitude, - ); - RemoteAssetCloudIdEntityData copyWithCompanion( - RemoteAssetCloudIdEntityCompanion data, - ) { - return RemoteAssetCloudIdEntityData( - assetId: data.assetId.present ? data.assetId.value : this.assetId, - cloudId: data.cloudId.present ? data.cloudId.value : this.cloudId, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - adjustmentTime: data.adjustmentTime.present - ? data.adjustmentTime.value - : this.adjustmentTime, - latitude: data.latitude.present ? data.latitude.value : this.latitude, - longitude: data.longitude.present ? data.longitude.value : this.longitude, - ); - } - - @override - String toString() { - return (StringBuffer('RemoteAssetCloudIdEntityData(') - ..write('assetId: $assetId, ') - ..write('cloudId: $cloudId, ') - ..write('createdAt: $createdAt, ') - ..write('adjustmentTime: $adjustmentTime, ') - ..write('latitude: $latitude, ') - ..write('longitude: $longitude') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - assetId, - cloudId, - createdAt, - adjustmentTime, - latitude, - longitude, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is RemoteAssetCloudIdEntityData && - other.assetId == this.assetId && - other.cloudId == this.cloudId && - other.createdAt == this.createdAt && - other.adjustmentTime == this.adjustmentTime && - other.latitude == this.latitude && - other.longitude == this.longitude); -} - -class RemoteAssetCloudIdEntityCompanion - extends UpdateCompanion { - final Value assetId; - final Value cloudId; - final Value createdAt; - final Value adjustmentTime; - final Value latitude; - final Value longitude; - const RemoteAssetCloudIdEntityCompanion({ - this.assetId = const Value.absent(), - this.cloudId = const Value.absent(), - this.createdAt = const Value.absent(), - this.adjustmentTime = const Value.absent(), - this.latitude = const Value.absent(), - this.longitude = const Value.absent(), - }); - RemoteAssetCloudIdEntityCompanion.insert({ - required String assetId, - this.cloudId = const Value.absent(), - this.createdAt = const Value.absent(), - this.adjustmentTime = const Value.absent(), - this.latitude = const Value.absent(), - this.longitude = const Value.absent(), - }) : assetId = Value(assetId); - static Insertable custom({ - Expression? assetId, - Expression? cloudId, - Expression? createdAt, - Expression? adjustmentTime, - Expression? latitude, - Expression? longitude, - }) { - return RawValuesInsertable({ - if (assetId != null) 'asset_id': assetId, - if (cloudId != null) 'cloud_id': cloudId, - if (createdAt != null) 'created_at': createdAt, - if (adjustmentTime != null) 'adjustment_time': adjustmentTime, - if (latitude != null) 'latitude': latitude, - if (longitude != null) 'longitude': longitude, - }); - } - - RemoteAssetCloudIdEntityCompanion copyWith({ - Value? assetId, - Value? cloudId, - Value? createdAt, - Value? adjustmentTime, - Value? latitude, - Value? longitude, - }) { - return RemoteAssetCloudIdEntityCompanion( - assetId: assetId ?? this.assetId, - cloudId: cloudId ?? this.cloudId, - createdAt: createdAt ?? this.createdAt, - adjustmentTime: adjustmentTime ?? this.adjustmentTime, - latitude: latitude ?? this.latitude, - longitude: longitude ?? this.longitude, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (assetId.present) { - map['asset_id'] = Variable(assetId.value); - } - if (cloudId.present) { - map['cloud_id'] = Variable(cloudId.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (adjustmentTime.present) { - map['adjustment_time'] = Variable(adjustmentTime.value); - } - if (latitude.present) { - map['latitude'] = Variable(latitude.value); - } - if (longitude.present) { - map['longitude'] = Variable(longitude.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('RemoteAssetCloudIdEntityCompanion(') - ..write('assetId: $assetId, ') - ..write('cloudId: $cloudId, ') - ..write('createdAt: $createdAt, ') - ..write('adjustmentTime: $adjustmentTime, ') - ..write('latitude: $latitude, ') - ..write('longitude: $longitude') - ..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'), - ); - late final GeneratedColumn source = GeneratedColumn( - 'source', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - @override - List get $columns => [ - name, - type, - createdAt, - updatedAt, - width, - height, - durationInSeconds, - id, - albumId, - checksum, - isFavorite, - orientation, - source, - ]; - @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'], - )!, - source: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}source'], - )!, - ); - } - - @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; - final int source; - 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, - required this.source, - }); - @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); - map['source'] = Variable(source); - 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']), - source: serializer.fromJson(json['source']), - ); - } - @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), - 'source': serializer.toJson(source), - }; - } - - 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, - int? source, - }) => 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, - source: source ?? this.source, - ); - 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, - source: data.source.present ? data.source.value : this.source, - ); - } - - @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('source: $source') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - name, - type, - createdAt, - updatedAt, - width, - height, - durationInSeconds, - id, - albumId, - checksum, - isFavorite, - orientation, - source, - ); - @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 && - other.source == this.source); -} - -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; - final Value source; - 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(), - this.source = 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(), - required int source, - }) : name = Value(name), - type = Value(type), - id = Value(id), - albumId = Value(albumId), - source = Value(source); - 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, - Expression? source, - }) { - 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, - if (source != null) 'source': source, - }); - } - - 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, - Value? source, - }) { - 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, - source: source ?? this.source, - ); - } - - @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); - } - if (source.present) { - map['source'] = Variable(source.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('source: $source') - ..write(')')) - .toString(); - } -} - -class DatabaseAtV19 extends GeneratedDatabase { - DatabaseAtV19(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 idxLocalAlbumAssetAlbumAsset = Index( - 'idx_local_album_asset_album_asset', - 'CREATE INDEX IF NOT EXISTS idx_local_album_asset_album_asset ON local_album_asset_entity (album_id, asset_id)', - ); - late final Index idxRemoteAlbumOwnerId = Index( - 'idx_remote_album_owner_id', - 'CREATE INDEX IF NOT EXISTS idx_remote_album_owner_id ON remote_album_entity (owner_id)', - ); - 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 idxLocalAssetCloudId = Index( - 'idx_local_asset_cloud_id', - 'CREATE INDEX IF NOT EXISTS idx_local_asset_cloud_id ON local_asset_entity (i_cloud_id)', - ); - late final Index idxStackPrimaryAssetId = Index( - 'idx_stack_primary_asset_id', - 'CREATE INDEX IF NOT EXISTS idx_stack_primary_asset_id ON stack_entity (primary_asset_id)', - ); - 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 Index idxRemoteAssetStackId = Index( - 'idx_remote_asset_stack_id', - 'CREATE INDEX IF NOT EXISTS idx_remote_asset_stack_id ON remote_asset_entity (stack_id)', - ); - late final Index idxRemoteAssetLocalDateTimeDay = Index( - 'idx_remote_asset_local_date_time_day', - 'CREATE INDEX IF NOT EXISTS idx_remote_asset_local_date_time_day ON remote_asset_entity (STRFTIME(\'%Y-%m-%d\', local_date_time))', - ); - late final Index idxRemoteAssetLocalDateTimeMonth = Index( - 'idx_remote_asset_local_date_time_month', - 'CREATE INDEX IF NOT EXISTS idx_remote_asset_local_date_time_month ON remote_asset_entity (STRFTIME(\'%Y-%m\', local_date_time))', - ); - 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 RemoteAssetCloudIdEntity remoteAssetCloudIdEntity = - RemoteAssetCloudIdEntity(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 idxPartnerSharedWithId = Index( - 'idx_partner_shared_with_id', - 'CREATE INDEX IF NOT EXISTS idx_partner_shared_with_id ON partner_entity (shared_with_id)', - ); - 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 idxRemoteAlbumAssetAlbumAsset = Index( - 'idx_remote_album_asset_album_asset', - 'CREATE INDEX IF NOT EXISTS idx_remote_album_asset_album_asset ON remote_album_asset_entity (album_id, asset_id)', - ); - late final Index idxRemoteAssetCloudId = Index( - 'idx_remote_asset_cloud_id', - 'CREATE INDEX IF NOT EXISTS idx_remote_asset_cloud_id ON remote_asset_cloud_id_entity (cloud_id)', - ); - late final Index idxPersonOwnerId = Index( - 'idx_person_owner_id', - 'CREATE INDEX IF NOT EXISTS idx_person_owner_id ON person_entity (owner_id)', - ); - late final Index idxAssetFacePersonId = Index( - 'idx_asset_face_person_id', - 'CREATE INDEX IF NOT EXISTS idx_asset_face_person_id ON asset_face_entity (person_id)', - ); - late final Index idxAssetFaceAssetId = Index( - 'idx_asset_face_asset_id', - 'CREATE INDEX IF NOT EXISTS idx_asset_face_asset_id ON asset_face_entity (asset_id)', - ); - 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, - idxLocalAlbumAssetAlbumAsset, - idxRemoteAlbumOwnerId, - idxLocalAssetChecksum, - idxLocalAssetCloudId, - idxStackPrimaryAssetId, - idxRemoteAssetOwnerChecksum, - uQRemoteAssetsOwnerChecksum, - uQRemoteAssetsOwnerLibraryChecksum, - idxRemoteAssetChecksum, - idxRemoteAssetStackId, - idxRemoteAssetLocalDateTimeDay, - idxRemoteAssetLocalDateTimeMonth, - authUserEntity, - userMetadataEntity, - partnerEntity, - remoteExifEntity, - remoteAlbumAssetEntity, - remoteAlbumUserEntity, - remoteAssetCloudIdEntity, - memoryEntity, - memoryAssetEntity, - personEntity, - assetFaceEntity, - storeEntity, - trashedLocalAssetEntity, - idxPartnerSharedWithId, - idxLatLng, - idxRemoteAlbumAssetAlbumAsset, - idxRemoteAssetCloudId, - idxPersonOwnerId, - idxAssetFacePersonId, - idxAssetFaceAssetId, - idxTrashedLocalAssetChecksum, - idxTrashedLocalAssetAlbum, - ]; - @override - int get schemaVersion => 19; - @override - DriftDatabaseOptions get options => - const DriftDatabaseOptions(storeDateTimeAsText: true); -} diff --git a/mobile/test/drift/main/generated/schema_v2.dart b/mobile/test/drift/main/generated/schema_v2.dart deleted file mode 100644 index 18fcc75002..0000000000 --- a/mobile/test/drift/main/generated/schema_v2.dart +++ /dev/null @@ -1,5998 +0,0 @@ -// dart format width=80 -import 'dart:typed_data' as i2; -// GENERATED BY drift_dev, DO NOT MODIFY. -// ignore_for_file: type=lint,unused_import -// -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 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 email = GeneratedColumn( - 'email', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn profileImagePath = GeneratedColumn( - 'profile_image_path', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn quotaSizeInBytes = GeneratedColumn( - 'quota_size_in_bytes', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn quotaUsageInBytes = GeneratedColumn( - 'quota_usage_in_bytes', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - defaultValue: const CustomExpression('0'), - ); - @override - List get $columns => [ - id, - name, - isAdmin, - email, - profileImagePath, - updatedAt, - quotaSizeInBytes, - quotaUsageInBytes, - ]; - @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'], - )!, - isAdmin: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}is_admin'], - )!, - email: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}email'], - )!, - profileImagePath: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}profile_image_path'], - ), - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}updated_at'], - )!, - quotaSizeInBytes: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}quota_size_in_bytes'], - ), - quotaUsageInBytes: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}quota_usage_in_bytes'], - )!, - ); - } - - @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 bool isAdmin; - final String email; - final String? profileImagePath; - final DateTime updatedAt; - final int? quotaSizeInBytes; - final int quotaUsageInBytes; - const UserEntityData({ - required this.id, - required this.name, - required this.isAdmin, - required this.email, - this.profileImagePath, - required this.updatedAt, - this.quotaSizeInBytes, - required this.quotaUsageInBytes, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['name'] = Variable(name); - map['is_admin'] = Variable(isAdmin); - map['email'] = Variable(email); - if (!nullToAbsent || profileImagePath != null) { - map['profile_image_path'] = Variable(profileImagePath); - } - map['updated_at'] = Variable(updatedAt); - if (!nullToAbsent || quotaSizeInBytes != null) { - map['quota_size_in_bytes'] = Variable(quotaSizeInBytes); - } - map['quota_usage_in_bytes'] = Variable(quotaUsageInBytes); - return map; - } - - factory UserEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return UserEntityData( - id: serializer.fromJson(json['id']), - name: serializer.fromJson(json['name']), - isAdmin: serializer.fromJson(json['isAdmin']), - email: serializer.fromJson(json['email']), - profileImagePath: serializer.fromJson(json['profileImagePath']), - updatedAt: serializer.fromJson(json['updatedAt']), - quotaSizeInBytes: serializer.fromJson(json['quotaSizeInBytes']), - quotaUsageInBytes: serializer.fromJson(json['quotaUsageInBytes']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'name': serializer.toJson(name), - 'isAdmin': serializer.toJson(isAdmin), - 'email': serializer.toJson(email), - 'profileImagePath': serializer.toJson(profileImagePath), - 'updatedAt': serializer.toJson(updatedAt), - 'quotaSizeInBytes': serializer.toJson(quotaSizeInBytes), - 'quotaUsageInBytes': serializer.toJson(quotaUsageInBytes), - }; - } - - UserEntityData copyWith({ - String? id, - String? name, - bool? isAdmin, - String? email, - Value profileImagePath = const Value.absent(), - DateTime? updatedAt, - Value quotaSizeInBytes = const Value.absent(), - int? quotaUsageInBytes, - }) => UserEntityData( - id: id ?? this.id, - name: name ?? this.name, - isAdmin: isAdmin ?? this.isAdmin, - email: email ?? this.email, - profileImagePath: profileImagePath.present - ? profileImagePath.value - : this.profileImagePath, - updatedAt: updatedAt ?? this.updatedAt, - quotaSizeInBytes: quotaSizeInBytes.present - ? quotaSizeInBytes.value - : this.quotaSizeInBytes, - quotaUsageInBytes: quotaUsageInBytes ?? this.quotaUsageInBytes, - ); - UserEntityData copyWithCompanion(UserEntityCompanion data) { - return UserEntityData( - id: data.id.present ? data.id.value : this.id, - name: data.name.present ? data.name.value : this.name, - isAdmin: data.isAdmin.present ? data.isAdmin.value : this.isAdmin, - email: data.email.present ? data.email.value : this.email, - profileImagePath: data.profileImagePath.present - ? data.profileImagePath.value - : this.profileImagePath, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - quotaSizeInBytes: data.quotaSizeInBytes.present - ? data.quotaSizeInBytes.value - : this.quotaSizeInBytes, - quotaUsageInBytes: data.quotaUsageInBytes.present - ? data.quotaUsageInBytes.value - : this.quotaUsageInBytes, - ); - } - - @override - String toString() { - return (StringBuffer('UserEntityData(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('isAdmin: $isAdmin, ') - ..write('email: $email, ') - ..write('profileImagePath: $profileImagePath, ') - ..write('updatedAt: $updatedAt, ') - ..write('quotaSizeInBytes: $quotaSizeInBytes, ') - ..write('quotaUsageInBytes: $quotaUsageInBytes') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - name, - isAdmin, - email, - profileImagePath, - updatedAt, - quotaSizeInBytes, - quotaUsageInBytes, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is UserEntityData && - other.id == this.id && - other.name == this.name && - other.isAdmin == this.isAdmin && - other.email == this.email && - other.profileImagePath == this.profileImagePath && - other.updatedAt == this.updatedAt && - other.quotaSizeInBytes == this.quotaSizeInBytes && - other.quotaUsageInBytes == this.quotaUsageInBytes); -} - -class UserEntityCompanion extends UpdateCompanion { - final Value id; - final Value name; - final Value isAdmin; - final Value email; - final Value profileImagePath; - final Value updatedAt; - final Value quotaSizeInBytes; - final Value quotaUsageInBytes; - const UserEntityCompanion({ - this.id = const Value.absent(), - this.name = const Value.absent(), - this.isAdmin = const Value.absent(), - this.email = const Value.absent(), - this.profileImagePath = const Value.absent(), - this.updatedAt = const Value.absent(), - this.quotaSizeInBytes = const Value.absent(), - this.quotaUsageInBytes = const Value.absent(), - }); - UserEntityCompanion.insert({ - required String id, - required String name, - this.isAdmin = const Value.absent(), - required String email, - this.profileImagePath = const Value.absent(), - this.updatedAt = const Value.absent(), - this.quotaSizeInBytes = const Value.absent(), - this.quotaUsageInBytes = const Value.absent(), - }) : id = Value(id), - name = Value(name), - email = Value(email); - static Insertable custom({ - Expression? id, - Expression? name, - Expression? isAdmin, - Expression? email, - Expression? profileImagePath, - Expression? updatedAt, - Expression? quotaSizeInBytes, - Expression? quotaUsageInBytes, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (name != null) 'name': name, - if (isAdmin != null) 'is_admin': isAdmin, - if (email != null) 'email': email, - if (profileImagePath != null) 'profile_image_path': profileImagePath, - if (updatedAt != null) 'updated_at': updatedAt, - if (quotaSizeInBytes != null) 'quota_size_in_bytes': quotaSizeInBytes, - if (quotaUsageInBytes != null) 'quota_usage_in_bytes': quotaUsageInBytes, - }); - } - - UserEntityCompanion copyWith({ - Value? id, - Value? name, - Value? isAdmin, - Value? email, - Value? profileImagePath, - Value? updatedAt, - Value? quotaSizeInBytes, - Value? quotaUsageInBytes, - }) { - return UserEntityCompanion( - id: id ?? this.id, - name: name ?? this.name, - isAdmin: isAdmin ?? this.isAdmin, - email: email ?? this.email, - profileImagePath: profileImagePath ?? this.profileImagePath, - updatedAt: updatedAt ?? this.updatedAt, - quotaSizeInBytes: quotaSizeInBytes ?? this.quotaSizeInBytes, - quotaUsageInBytes: quotaUsageInBytes ?? this.quotaUsageInBytes, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (name.present) { - map['name'] = Variable(name.value); - } - if (isAdmin.present) { - map['is_admin'] = Variable(isAdmin.value); - } - if (email.present) { - map['email'] = Variable(email.value); - } - if (profileImagePath.present) { - map['profile_image_path'] = Variable(profileImagePath.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (quotaSizeInBytes.present) { - map['quota_size_in_bytes'] = Variable(quotaSizeInBytes.value); - } - if (quotaUsageInBytes.present) { - map['quota_usage_in_bytes'] = Variable(quotaUsageInBytes.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('UserEntityCompanion(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('isAdmin: $isAdmin, ') - ..write('email: $email, ') - ..write('profileImagePath: $profileImagePath, ') - ..write('updatedAt: $updatedAt, ') - ..write('quotaSizeInBytes: $quotaSizeInBytes, ') - ..write('quotaUsageInBytes: $quotaUsageInBytes') - ..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, - ); - @override - List get $columns => [ - name, - type, - createdAt, - updatedAt, - width, - height, - durationInSeconds, - id, - checksum, - isFavorite, - ownerId, - localDateTime, - thumbHash, - deletedAt, - livePhotoVideoId, - visibility, - stackId, - ]; - @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'], - ), - ); - } - - @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; - 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, - }); - @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); - } - 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']), - ); - } - @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), - }; - } - - 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(), - }) => 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, - ); - 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, - ); - } - - @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(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - name, - type, - createdAt, - updatedAt, - width, - height, - durationInSeconds, - id, - checksum, - isFavorite, - ownerId, - localDateTime, - thumbHash, - deletedAt, - livePhotoVideoId, - visibility, - stackId, - ); - @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); -} - -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; - 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(), - }); - 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(), - }) : 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, - }) { - 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, - }); - } - - 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, - }) { - 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, - ); - } - - @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); - } - 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(')')) - .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 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, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES remote_asset_entity (id)', - ), - ); - @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 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 i2.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, - i2.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 i2.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 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 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, - 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'], - )!, - 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 bool? marker_; - const LocalAlbumEntityData({ - required this.id, - required this.name, - required this.updatedAt, - required this.backupSelection, - required this.isIosSharedAlbum, - 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 || 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']), - 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), - 'marker_': serializer.toJson(marker_), - }; - } - - LocalAlbumEntityData copyWith({ - String? id, - String? name, - DateTime? updatedAt, - int? backupSelection, - bool? isIosSharedAlbum, - 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, - 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, - 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('marker_: $marker_') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - name, - updatedAt, - backupSelection, - isIosSharedAlbum, - 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.marker_ == this.marker_); -} - -class LocalAlbumEntityCompanion extends UpdateCompanion { - final Value id; - final Value name; - final Value updatedAt; - final Value backupSelection; - final Value isIosSharedAlbum; - 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.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.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? 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 (marker_ != null) 'marker': marker_, - }); - } - - LocalAlbumEntityCompanion copyWith({ - Value? id, - Value? name, - Value? updatedAt, - Value? backupSelection, - Value? isIosSharedAlbum, - Value? marker_, - }) { - return LocalAlbumEntityCompanion( - id: id ?? this.id, - name: name ?? this.name, - updatedAt: updatedAt ?? this.updatedAt, - backupSelection: backupSelection ?? this.backupSelection, - isIosSharedAlbum: isIosSharedAlbum ?? this.isIosSharedAlbum, - 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 (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('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', - ), - ); - @override - List get $columns => [assetId, albumId]; - @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'], - )!, - ); - } - - @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; - const LocalAlbumAssetEntityData({ - 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 LocalAlbumAssetEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return LocalAlbumAssetEntityData( - 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), - }; - } - - LocalAlbumAssetEntityData copyWith({String? assetId, String? albumId}) => - LocalAlbumAssetEntityData( - assetId: assetId ?? this.assetId, - albumId: albumId ?? this.albumId, - ); - LocalAlbumAssetEntityData copyWithCompanion( - LocalAlbumAssetEntityCompanion data, - ) { - return LocalAlbumAssetEntityData( - assetId: data.assetId.present ? data.assetId.value : this.assetId, - albumId: data.albumId.present ? data.albumId.value : this.albumId, - ); - } - - @override - String toString() { - return (StringBuffer('LocalAlbumAssetEntityData(') - ..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 LocalAlbumAssetEntityData && - other.assetId == this.assetId && - other.albumId == this.albumId); -} - -class LocalAlbumAssetEntityCompanion - extends UpdateCompanion { - final Value assetId; - final Value albumId; - const LocalAlbumAssetEntityCompanion({ - this.assetId = const Value.absent(), - this.albumId = const Value.absent(), - }); - LocalAlbumAssetEntityCompanion.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, - }); - } - - LocalAlbumAssetEntityCompanion copyWith({ - Value? assetId, - Value? albumId, - }) { - return LocalAlbumAssetEntityCompanion( - 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('LocalAlbumAssetEntityCompanion(') - ..write('assetId: $assetId, ') - ..write('albumId: $albumId') - ..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 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 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 thumbnailPath = GeneratedColumn( - 'thumbnail_path', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - 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, - thumbnailPath, - 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'], - ), - thumbnailPath: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}thumbnail_path'], - )!, - 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 String thumbnailPath; - 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.thumbnailPath, - 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['thumbnail_path'] = Variable(thumbnailPath); - 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']), - thumbnailPath: serializer.fromJson(json['thumbnailPath']), - 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), - 'thumbnailPath': serializer.toJson(thumbnailPath), - '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(), - String? thumbnailPath, - 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, - thumbnailPath: thumbnailPath ?? this.thumbnailPath, - 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, - thumbnailPath: data.thumbnailPath.present - ? data.thumbnailPath.value - : this.thumbnailPath, - 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('thumbnailPath: $thumbnailPath, ') - ..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, - thumbnailPath, - 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.thumbnailPath == this.thumbnailPath && - 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 thumbnailPath; - 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.thumbnailPath = 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 String thumbnailPath, - 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), - thumbnailPath = Value(thumbnailPath), - isFavorite = Value(isFavorite), - isHidden = Value(isHidden); - static Insertable custom({ - Expression? id, - Expression? createdAt, - Expression? updatedAt, - Expression? ownerId, - Expression? name, - Expression? faceAssetId, - Expression? thumbnailPath, - 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 (thumbnailPath != null) 'thumbnail_path': thumbnailPath, - 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? thumbnailPath, - 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, - thumbnailPath: thumbnailPath ?? this.thumbnailPath, - 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 (thumbnailPath.present) { - map['thumbnail_path'] = Variable(thumbnailPath.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('thumbnailPath: $thumbnailPath, ') - ..write('isFavorite: $isFavorite, ') - ..write('isHidden: $isHidden, ') - ..write('color: $color, ') - ..write('birthDate: $birthDate') - ..write(')')) - .toString(); - } -} - -class DatabaseAtV2 extends GeneratedDatabase { - DatabaseAtV2(QueryExecutor e) : super(e); - late final UserEntity userEntity = UserEntity(this); - late final RemoteAssetEntity remoteAssetEntity = RemoteAssetEntity(this); - late final LocalAssetEntity localAssetEntity = LocalAssetEntity(this); - late final StackEntity stackEntity = StackEntity(this); - late final Index idxLocalAssetChecksum = Index( - 'idx_local_asset_checksum', - 'CREATE INDEX idx_local_asset_checksum ON local_asset_entity (checksum)', - ); - late final Index uQRemoteAssetOwnerChecksum = Index( - 'UQ_remote_asset_owner_checksum', - 'CREATE UNIQUE INDEX UQ_remote_asset_owner_checksum ON remote_asset_entity (checksum, owner_id)', - ); - late final Index idxRemoteAssetChecksum = Index( - 'idx_remote_asset_checksum', - 'CREATE INDEX idx_remote_asset_checksum ON remote_asset_entity (checksum)', - ); - late final UserMetadataEntity userMetadataEntity = UserMetadataEntity(this); - late final PartnerEntity partnerEntity = PartnerEntity(this); - late final LocalAlbumEntity localAlbumEntity = LocalAlbumEntity(this); - late final LocalAlbumAssetEntity localAlbumAssetEntity = - LocalAlbumAssetEntity(this); - late final RemoteExifEntity remoteExifEntity = RemoteExifEntity(this); - late final RemoteAlbumEntity remoteAlbumEntity = RemoteAlbumEntity(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); - @override - Iterable> get allTables => - allSchemaEntities.whereType>(); - @override - List get allSchemaEntities => [ - userEntity, - remoteAssetEntity, - localAssetEntity, - stackEntity, - idxLocalAssetChecksum, - uQRemoteAssetOwnerChecksum, - idxRemoteAssetChecksum, - userMetadataEntity, - partnerEntity, - localAlbumEntity, - localAlbumAssetEntity, - remoteExifEntity, - remoteAlbumEntity, - remoteAlbumAssetEntity, - remoteAlbumUserEntity, - memoryEntity, - memoryAssetEntity, - personEntity, - ]; - @override - int get schemaVersion => 2; - @override - DriftDatabaseOptions get options => - const DriftDatabaseOptions(storeDateTimeAsText: true); -} diff --git a/mobile/test/drift/main/generated/schema_v20.dart b/mobile/test/drift/main/generated/schema_v20.dart deleted file mode 100644 index 0cb8a46cac..0000000000 --- a/mobile/test/drift/main/generated/schema_v20.dart +++ /dev/null @@ -1,8474 +0,0 @@ -// dart format width=80 -import 'dart:typed_data' as i2; -// GENERATED BY drift_dev, DO NOT MODIFY. -// ignore_for_file: type=lint,unused_import -// -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, - ); - late final GeneratedColumn isEdited = GeneratedColumn( - 'is_edited', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("is_edited" IN (0, 1))', - ), - defaultValue: const CustomExpression('0'), - ); - @override - List get $columns => [ - name, - type, - createdAt, - updatedAt, - width, - height, - durationInSeconds, - id, - checksum, - isFavorite, - ownerId, - localDateTime, - thumbHash, - deletedAt, - livePhotoVideoId, - visibility, - stackId, - libraryId, - isEdited, - ]; - @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'], - ), - isEdited: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}is_edited'], - )!, - ); - } - - @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; - final bool isEdited; - 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, - required this.isEdited, - }); - @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); - } - map['is_edited'] = Variable(isEdited); - 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']), - isEdited: serializer.fromJson(json['isEdited']), - ); - } - @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), - 'isEdited': serializer.toJson(isEdited), - }; - } - - 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(), - bool? isEdited, - }) => 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, - isEdited: isEdited ?? this.isEdited, - ); - 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, - isEdited: data.isEdited.present ? data.isEdited.value : this.isEdited, - ); - } - - @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('isEdited: $isEdited') - ..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, - isEdited, - ); - @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 && - other.isEdited == this.isEdited); -} - -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; - final Value isEdited; - 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(), - this.isEdited = 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(), - this.isEdited = 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, - Expression? isEdited, - }) { - 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, - if (isEdited != null) 'is_edited': isEdited, - }); - } - - 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, - Value? isEdited, - }) { - 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, - isEdited: isEdited ?? this.isEdited, - ); - } - - @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); - } - if (isEdited.present) { - map['is_edited'] = Variable(isEdited.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('isEdited: $isEdited') - ..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'), - ); - late final GeneratedColumn iCloudId = GeneratedColumn( - 'i_cloud_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn adjustmentTime = - GeneratedColumn( - 'adjustment_time', - aliasedName, - true, - type: DriftSqlType.dateTime, - 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, - ); - @override - List get $columns => [ - name, - type, - createdAt, - updatedAt, - width, - height, - durationInSeconds, - id, - checksum, - isFavorite, - orientation, - iCloudId, - adjustmentTime, - latitude, - longitude, - ]; - @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'], - )!, - iCloudId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}i_cloud_id'], - ), - adjustmentTime: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}adjustment_time'], - ), - latitude: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}latitude'], - ), - longitude: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}longitude'], - ), - ); - } - - @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; - final String? iCloudId; - final DateTime? adjustmentTime; - final double? latitude; - final double? longitude; - 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, - this.iCloudId, - this.adjustmentTime, - this.latitude, - this.longitude, - }); - @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); - if (!nullToAbsent || iCloudId != null) { - map['i_cloud_id'] = Variable(iCloudId); - } - if (!nullToAbsent || adjustmentTime != null) { - map['adjustment_time'] = Variable(adjustmentTime); - } - if (!nullToAbsent || latitude != null) { - map['latitude'] = Variable(latitude); - } - if (!nullToAbsent || longitude != null) { - map['longitude'] = Variable(longitude); - } - 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']), - iCloudId: serializer.fromJson(json['iCloudId']), - adjustmentTime: serializer.fromJson(json['adjustmentTime']), - latitude: serializer.fromJson(json['latitude']), - longitude: serializer.fromJson(json['longitude']), - ); - } - @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), - 'iCloudId': serializer.toJson(iCloudId), - 'adjustmentTime': serializer.toJson(adjustmentTime), - 'latitude': serializer.toJson(latitude), - 'longitude': serializer.toJson(longitude), - }; - } - - 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, - Value iCloudId = const Value.absent(), - Value adjustmentTime = const Value.absent(), - Value latitude = const Value.absent(), - Value longitude = const Value.absent(), - }) => 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, - iCloudId: iCloudId.present ? iCloudId.value : this.iCloudId, - adjustmentTime: adjustmentTime.present - ? adjustmentTime.value - : this.adjustmentTime, - latitude: latitude.present ? latitude.value : this.latitude, - longitude: longitude.present ? longitude.value : this.longitude, - ); - 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, - iCloudId: data.iCloudId.present ? data.iCloudId.value : this.iCloudId, - adjustmentTime: data.adjustmentTime.present - ? data.adjustmentTime.value - : this.adjustmentTime, - latitude: data.latitude.present ? data.latitude.value : this.latitude, - longitude: data.longitude.present ? data.longitude.value : this.longitude, - ); - } - - @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('iCloudId: $iCloudId, ') - ..write('adjustmentTime: $adjustmentTime, ') - ..write('latitude: $latitude, ') - ..write('longitude: $longitude') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - name, - type, - createdAt, - updatedAt, - width, - height, - durationInSeconds, - id, - checksum, - isFavorite, - orientation, - iCloudId, - adjustmentTime, - latitude, - longitude, - ); - @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 && - other.iCloudId == this.iCloudId && - other.adjustmentTime == this.adjustmentTime && - other.latitude == this.latitude && - other.longitude == this.longitude); -} - -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; - final Value iCloudId; - final Value adjustmentTime; - final Value latitude; - final Value longitude; - 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(), - this.iCloudId = const Value.absent(), - this.adjustmentTime = const Value.absent(), - this.latitude = const Value.absent(), - this.longitude = 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(), - this.iCloudId = const Value.absent(), - this.adjustmentTime = const Value.absent(), - this.latitude = const Value.absent(), - this.longitude = 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, - Expression? iCloudId, - Expression? adjustmentTime, - Expression? latitude, - Expression? longitude, - }) { - 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, - if (iCloudId != null) 'i_cloud_id': iCloudId, - if (adjustmentTime != null) 'adjustment_time': adjustmentTime, - if (latitude != null) 'latitude': latitude, - if (longitude != null) 'longitude': longitude, - }); - } - - LocalAssetEntityCompanion copyWith({ - Value? name, - Value? type, - Value? createdAt, - Value? updatedAt, - Value? width, - Value? height, - Value? durationInSeconds, - Value? id, - Value? checksum, - Value? isFavorite, - Value? orientation, - Value? iCloudId, - Value? adjustmentTime, - Value? latitude, - Value? longitude, - }) { - 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, - iCloudId: iCloudId ?? this.iCloudId, - adjustmentTime: adjustmentTime ?? this.adjustmentTime, - latitude: latitude ?? this.latitude, - longitude: longitude ?? this.longitude, - ); - } - - @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); - } - if (iCloudId.present) { - map['i_cloud_id'] = Variable(iCloudId.value); - } - if (adjustmentTime.present) { - map['adjustment_time'] = Variable(adjustmentTime.value); - } - if (latitude.present) { - map['latitude'] = Variable(latitude.value); - } - if (longitude.present) { - map['longitude'] = Variable(longitude.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('iCloudId: $iCloudId, ') - ..write('adjustmentTime: $adjustmentTime, ') - ..write('latitude: $latitude, ') - ..write('longitude: $longitude') - ..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 i2.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, - i2.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 i2.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 RemoteAssetCloudIdEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - RemoteAssetCloudIdEntity(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 cloudId = GeneratedColumn( - 'cloud_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - true, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - late final GeneratedColumn adjustmentTime = - GeneratedColumn( - 'adjustment_time', - aliasedName, - true, - type: DriftSqlType.dateTime, - 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, - ); - @override - List get $columns => [ - assetId, - cloudId, - createdAt, - adjustmentTime, - latitude, - longitude, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'remote_asset_cloud_id_entity'; - @override - Set get $primaryKey => {assetId}; - @override - RemoteAssetCloudIdEntityData map( - Map data, { - String? tablePrefix, - }) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return RemoteAssetCloudIdEntityData( - assetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}asset_id'], - )!, - cloudId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}cloud_id'], - ), - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}created_at'], - ), - adjustmentTime: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}adjustment_time'], - ), - latitude: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}latitude'], - ), - longitude: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}longitude'], - ), - ); - } - - @override - RemoteAssetCloudIdEntity createAlias(String alias) { - return RemoteAssetCloudIdEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class RemoteAssetCloudIdEntityData extends DataClass - implements Insertable { - final String assetId; - final String? cloudId; - final DateTime? createdAt; - final DateTime? adjustmentTime; - final double? latitude; - final double? longitude; - const RemoteAssetCloudIdEntityData({ - required this.assetId, - this.cloudId, - this.createdAt, - this.adjustmentTime, - this.latitude, - this.longitude, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['asset_id'] = Variable(assetId); - if (!nullToAbsent || cloudId != null) { - map['cloud_id'] = Variable(cloudId); - } - if (!nullToAbsent || createdAt != null) { - map['created_at'] = Variable(createdAt); - } - if (!nullToAbsent || adjustmentTime != null) { - map['adjustment_time'] = Variable(adjustmentTime); - } - if (!nullToAbsent || latitude != null) { - map['latitude'] = Variable(latitude); - } - if (!nullToAbsent || longitude != null) { - map['longitude'] = Variable(longitude); - } - return map; - } - - factory RemoteAssetCloudIdEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return RemoteAssetCloudIdEntityData( - assetId: serializer.fromJson(json['assetId']), - cloudId: serializer.fromJson(json['cloudId']), - createdAt: serializer.fromJson(json['createdAt']), - adjustmentTime: serializer.fromJson(json['adjustmentTime']), - latitude: serializer.fromJson(json['latitude']), - longitude: serializer.fromJson(json['longitude']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'assetId': serializer.toJson(assetId), - 'cloudId': serializer.toJson(cloudId), - 'createdAt': serializer.toJson(createdAt), - 'adjustmentTime': serializer.toJson(adjustmentTime), - 'latitude': serializer.toJson(latitude), - 'longitude': serializer.toJson(longitude), - }; - } - - RemoteAssetCloudIdEntityData copyWith({ - String? assetId, - Value cloudId = const Value.absent(), - Value createdAt = const Value.absent(), - Value adjustmentTime = const Value.absent(), - Value latitude = const Value.absent(), - Value longitude = const Value.absent(), - }) => RemoteAssetCloudIdEntityData( - assetId: assetId ?? this.assetId, - cloudId: cloudId.present ? cloudId.value : this.cloudId, - createdAt: createdAt.present ? createdAt.value : this.createdAt, - adjustmentTime: adjustmentTime.present - ? adjustmentTime.value - : this.adjustmentTime, - latitude: latitude.present ? latitude.value : this.latitude, - longitude: longitude.present ? longitude.value : this.longitude, - ); - RemoteAssetCloudIdEntityData copyWithCompanion( - RemoteAssetCloudIdEntityCompanion data, - ) { - return RemoteAssetCloudIdEntityData( - assetId: data.assetId.present ? data.assetId.value : this.assetId, - cloudId: data.cloudId.present ? data.cloudId.value : this.cloudId, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - adjustmentTime: data.adjustmentTime.present - ? data.adjustmentTime.value - : this.adjustmentTime, - latitude: data.latitude.present ? data.latitude.value : this.latitude, - longitude: data.longitude.present ? data.longitude.value : this.longitude, - ); - } - - @override - String toString() { - return (StringBuffer('RemoteAssetCloudIdEntityData(') - ..write('assetId: $assetId, ') - ..write('cloudId: $cloudId, ') - ..write('createdAt: $createdAt, ') - ..write('adjustmentTime: $adjustmentTime, ') - ..write('latitude: $latitude, ') - ..write('longitude: $longitude') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - assetId, - cloudId, - createdAt, - adjustmentTime, - latitude, - longitude, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is RemoteAssetCloudIdEntityData && - other.assetId == this.assetId && - other.cloudId == this.cloudId && - other.createdAt == this.createdAt && - other.adjustmentTime == this.adjustmentTime && - other.latitude == this.latitude && - other.longitude == this.longitude); -} - -class RemoteAssetCloudIdEntityCompanion - extends UpdateCompanion { - final Value assetId; - final Value cloudId; - final Value createdAt; - final Value adjustmentTime; - final Value latitude; - final Value longitude; - const RemoteAssetCloudIdEntityCompanion({ - this.assetId = const Value.absent(), - this.cloudId = const Value.absent(), - this.createdAt = const Value.absent(), - this.adjustmentTime = const Value.absent(), - this.latitude = const Value.absent(), - this.longitude = const Value.absent(), - }); - RemoteAssetCloudIdEntityCompanion.insert({ - required String assetId, - this.cloudId = const Value.absent(), - this.createdAt = const Value.absent(), - this.adjustmentTime = const Value.absent(), - this.latitude = const Value.absent(), - this.longitude = const Value.absent(), - }) : assetId = Value(assetId); - static Insertable custom({ - Expression? assetId, - Expression? cloudId, - Expression? createdAt, - Expression? adjustmentTime, - Expression? latitude, - Expression? longitude, - }) { - return RawValuesInsertable({ - if (assetId != null) 'asset_id': assetId, - if (cloudId != null) 'cloud_id': cloudId, - if (createdAt != null) 'created_at': createdAt, - if (adjustmentTime != null) 'adjustment_time': adjustmentTime, - if (latitude != null) 'latitude': latitude, - if (longitude != null) 'longitude': longitude, - }); - } - - RemoteAssetCloudIdEntityCompanion copyWith({ - Value? assetId, - Value? cloudId, - Value? createdAt, - Value? adjustmentTime, - Value? latitude, - Value? longitude, - }) { - return RemoteAssetCloudIdEntityCompanion( - assetId: assetId ?? this.assetId, - cloudId: cloudId ?? this.cloudId, - createdAt: createdAt ?? this.createdAt, - adjustmentTime: adjustmentTime ?? this.adjustmentTime, - latitude: latitude ?? this.latitude, - longitude: longitude ?? this.longitude, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (assetId.present) { - map['asset_id'] = Variable(assetId.value); - } - if (cloudId.present) { - map['cloud_id'] = Variable(cloudId.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (adjustmentTime.present) { - map['adjustment_time'] = Variable(adjustmentTime.value); - } - if (latitude.present) { - map['latitude'] = Variable(latitude.value); - } - if (longitude.present) { - map['longitude'] = Variable(longitude.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('RemoteAssetCloudIdEntityCompanion(') - ..write('assetId: $assetId, ') - ..write('cloudId: $cloudId, ') - ..write('createdAt: $createdAt, ') - ..write('adjustmentTime: $adjustmentTime, ') - ..write('latitude: $latitude, ') - ..write('longitude: $longitude') - ..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, - ); - late final GeneratedColumn isVisible = GeneratedColumn( - 'is_visible', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("is_visible" IN (0, 1))', - ), - defaultValue: const CustomExpression('1'), - ); - late final GeneratedColumn deletedAt = GeneratedColumn( - 'deleted_at', - aliasedName, - true, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - @override - List get $columns => [ - id, - assetId, - personId, - imageWidth, - imageHeight, - boundingBoxX1, - boundingBoxY1, - boundingBoxX2, - boundingBoxY2, - sourceType, - isVisible, - deletedAt, - ]; - @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'], - )!, - isVisible: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}is_visible'], - )!, - deletedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}deleted_at'], - ), - ); - } - - @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; - final bool isVisible; - final DateTime? deletedAt; - 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, - required this.isVisible, - this.deletedAt, - }); - @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); - map['is_visible'] = Variable(isVisible); - if (!nullToAbsent || deletedAt != null) { - map['deleted_at'] = Variable(deletedAt); - } - 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']), - isVisible: serializer.fromJson(json['isVisible']), - deletedAt: serializer.fromJson(json['deletedAt']), - ); - } - @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), - 'isVisible': serializer.toJson(isVisible), - 'deletedAt': serializer.toJson(deletedAt), - }; - } - - 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, - bool? isVisible, - Value deletedAt = const Value.absent(), - }) => 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, - isVisible: isVisible ?? this.isVisible, - deletedAt: deletedAt.present ? deletedAt.value : this.deletedAt, - ); - 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, - isVisible: data.isVisible.present ? data.isVisible.value : this.isVisible, - deletedAt: data.deletedAt.present ? data.deletedAt.value : this.deletedAt, - ); - } - - @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('isVisible: $isVisible, ') - ..write('deletedAt: $deletedAt') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - assetId, - personId, - imageWidth, - imageHeight, - boundingBoxX1, - boundingBoxY1, - boundingBoxX2, - boundingBoxY2, - sourceType, - isVisible, - deletedAt, - ); - @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 && - other.isVisible == this.isVisible && - other.deletedAt == this.deletedAt); -} - -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; - final Value isVisible; - final Value deletedAt; - 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(), - this.isVisible = const Value.absent(), - this.deletedAt = 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, - this.isVisible = const Value.absent(), - this.deletedAt = const Value.absent(), - }) : 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, - Expression? isVisible, - Expression? deletedAt, - }) { - 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, - if (isVisible != null) 'is_visible': isVisible, - if (deletedAt != null) 'deleted_at': deletedAt, - }); - } - - AssetFaceEntityCompanion copyWith({ - Value? id, - Value? assetId, - Value? personId, - Value? imageWidth, - Value? imageHeight, - Value? boundingBoxX1, - Value? boundingBoxY1, - Value? boundingBoxX2, - Value? boundingBoxY2, - Value? sourceType, - Value? isVisible, - Value? deletedAt, - }) { - 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, - isVisible: isVisible ?? this.isVisible, - deletedAt: deletedAt ?? this.deletedAt, - ); - } - - @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); - } - if (isVisible.present) { - map['is_visible'] = Variable(isVisible.value); - } - if (deletedAt.present) { - map['deleted_at'] = Variable(deletedAt.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('isVisible: $isVisible, ') - ..write('deletedAt: $deletedAt') - ..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'), - ); - late final GeneratedColumn source = GeneratedColumn( - 'source', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - @override - List get $columns => [ - name, - type, - createdAt, - updatedAt, - width, - height, - durationInSeconds, - id, - albumId, - checksum, - isFavorite, - orientation, - source, - ]; - @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'], - )!, - source: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}source'], - )!, - ); - } - - @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; - final int source; - 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, - required this.source, - }); - @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); - map['source'] = Variable(source); - 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']), - source: serializer.fromJson(json['source']), - ); - } - @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), - 'source': serializer.toJson(source), - }; - } - - 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, - int? source, - }) => 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, - source: source ?? this.source, - ); - 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, - source: data.source.present ? data.source.value : this.source, - ); - } - - @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('source: $source') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - name, - type, - createdAt, - updatedAt, - width, - height, - durationInSeconds, - id, - albumId, - checksum, - isFavorite, - orientation, - source, - ); - @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 && - other.source == this.source); -} - -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; - final Value source; - 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(), - this.source = 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(), - required int source, - }) : name = Value(name), - type = Value(type), - id = Value(id), - albumId = Value(albumId), - source = Value(source); - 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, - Expression? source, - }) { - 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, - if (source != null) 'source': source, - }); - } - - 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, - Value? source, - }) { - 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, - source: source ?? this.source, - ); - } - - @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); - } - if (source.present) { - map['source'] = Variable(source.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('source: $source') - ..write(')')) - .toString(); - } -} - -class DatabaseAtV20 extends GeneratedDatabase { - DatabaseAtV20(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 idxLocalAlbumAssetAlbumAsset = Index( - 'idx_local_album_asset_album_asset', - 'CREATE INDEX IF NOT EXISTS idx_local_album_asset_album_asset ON local_album_asset_entity (album_id, asset_id)', - ); - late final Index idxRemoteAlbumOwnerId = Index( - 'idx_remote_album_owner_id', - 'CREATE INDEX IF NOT EXISTS idx_remote_album_owner_id ON remote_album_entity (owner_id)', - ); - 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 idxLocalAssetCloudId = Index( - 'idx_local_asset_cloud_id', - 'CREATE INDEX IF NOT EXISTS idx_local_asset_cloud_id ON local_asset_entity (i_cloud_id)', - ); - late final Index idxStackPrimaryAssetId = Index( - 'idx_stack_primary_asset_id', - 'CREATE INDEX IF NOT EXISTS idx_stack_primary_asset_id ON stack_entity (primary_asset_id)', - ); - 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 Index idxRemoteAssetStackId = Index( - 'idx_remote_asset_stack_id', - 'CREATE INDEX IF NOT EXISTS idx_remote_asset_stack_id ON remote_asset_entity (stack_id)', - ); - late final Index idxRemoteAssetLocalDateTimeDay = Index( - 'idx_remote_asset_local_date_time_day', - 'CREATE INDEX IF NOT EXISTS idx_remote_asset_local_date_time_day ON remote_asset_entity (STRFTIME(\'%Y-%m-%d\', local_date_time))', - ); - late final Index idxRemoteAssetLocalDateTimeMonth = Index( - 'idx_remote_asset_local_date_time_month', - 'CREATE INDEX IF NOT EXISTS idx_remote_asset_local_date_time_month ON remote_asset_entity (STRFTIME(\'%Y-%m\', local_date_time))', - ); - 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 RemoteAssetCloudIdEntity remoteAssetCloudIdEntity = - RemoteAssetCloudIdEntity(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 idxPartnerSharedWithId = Index( - 'idx_partner_shared_with_id', - 'CREATE INDEX IF NOT EXISTS idx_partner_shared_with_id ON partner_entity (shared_with_id)', - ); - 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 idxRemoteAlbumAssetAlbumAsset = Index( - 'idx_remote_album_asset_album_asset', - 'CREATE INDEX IF NOT EXISTS idx_remote_album_asset_album_asset ON remote_album_asset_entity (album_id, asset_id)', - ); - late final Index idxRemoteAssetCloudId = Index( - 'idx_remote_asset_cloud_id', - 'CREATE INDEX IF NOT EXISTS idx_remote_asset_cloud_id ON remote_asset_cloud_id_entity (cloud_id)', - ); - late final Index idxPersonOwnerId = Index( - 'idx_person_owner_id', - 'CREATE INDEX IF NOT EXISTS idx_person_owner_id ON person_entity (owner_id)', - ); - late final Index idxAssetFacePersonId = Index( - 'idx_asset_face_person_id', - 'CREATE INDEX IF NOT EXISTS idx_asset_face_person_id ON asset_face_entity (person_id)', - ); - late final Index idxAssetFaceAssetId = Index( - 'idx_asset_face_asset_id', - 'CREATE INDEX IF NOT EXISTS idx_asset_face_asset_id ON asset_face_entity (asset_id)', - ); - 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, - idxLocalAlbumAssetAlbumAsset, - idxRemoteAlbumOwnerId, - idxLocalAssetChecksum, - idxLocalAssetCloudId, - idxStackPrimaryAssetId, - idxRemoteAssetOwnerChecksum, - uQRemoteAssetsOwnerChecksum, - uQRemoteAssetsOwnerLibraryChecksum, - idxRemoteAssetChecksum, - idxRemoteAssetStackId, - idxRemoteAssetLocalDateTimeDay, - idxRemoteAssetLocalDateTimeMonth, - authUserEntity, - userMetadataEntity, - partnerEntity, - remoteExifEntity, - remoteAlbumAssetEntity, - remoteAlbumUserEntity, - remoteAssetCloudIdEntity, - memoryEntity, - memoryAssetEntity, - personEntity, - assetFaceEntity, - storeEntity, - trashedLocalAssetEntity, - idxPartnerSharedWithId, - idxLatLng, - idxRemoteAlbumAssetAlbumAsset, - idxRemoteAssetCloudId, - idxPersonOwnerId, - idxAssetFacePersonId, - idxAssetFaceAssetId, - idxTrashedLocalAssetChecksum, - idxTrashedLocalAssetAlbum, - ]; - @override - int get schemaVersion => 20; - @override - DriftDatabaseOptions get options => - const DriftDatabaseOptions(storeDateTimeAsText: true); -} diff --git a/mobile/test/drift/main/generated/schema_v21.dart b/mobile/test/drift/main/generated/schema_v21.dart deleted file mode 100644 index 5777b5f850..0000000000 --- a/mobile/test/drift/main/generated/schema_v21.dart +++ /dev/null @@ -1,8548 +0,0 @@ -// dart format width=80 -import 'dart:typed_data' as i2; -// GENERATED BY drift_dev, DO NOT MODIFY. -// ignore_for_file: type=lint,unused_import -// -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, - ); - late final GeneratedColumn isEdited = GeneratedColumn( - 'is_edited', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("is_edited" IN (0, 1))', - ), - defaultValue: const CustomExpression('0'), - ); - @override - List get $columns => [ - name, - type, - createdAt, - updatedAt, - width, - height, - durationInSeconds, - id, - checksum, - isFavorite, - ownerId, - localDateTime, - thumbHash, - deletedAt, - livePhotoVideoId, - visibility, - stackId, - libraryId, - isEdited, - ]; - @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'], - ), - isEdited: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}is_edited'], - )!, - ); - } - - @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; - final bool isEdited; - 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, - required this.isEdited, - }); - @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); - } - map['is_edited'] = Variable(isEdited); - 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']), - isEdited: serializer.fromJson(json['isEdited']), - ); - } - @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), - 'isEdited': serializer.toJson(isEdited), - }; - } - - 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(), - bool? isEdited, - }) => 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, - isEdited: isEdited ?? this.isEdited, - ); - 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, - isEdited: data.isEdited.present ? data.isEdited.value : this.isEdited, - ); - } - - @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('isEdited: $isEdited') - ..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, - isEdited, - ); - @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 && - other.isEdited == this.isEdited); -} - -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; - final Value isEdited; - 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(), - this.isEdited = 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(), - this.isEdited = 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, - Expression? isEdited, - }) { - 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, - if (isEdited != null) 'is_edited': isEdited, - }); - } - - 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, - Value? isEdited, - }) { - 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, - isEdited: isEdited ?? this.isEdited, - ); - } - - @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); - } - if (isEdited.present) { - map['is_edited'] = Variable(isEdited.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('isEdited: $isEdited') - ..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'), - ); - late final GeneratedColumn iCloudId = GeneratedColumn( - 'i_cloud_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn adjustmentTime = - GeneratedColumn( - 'adjustment_time', - aliasedName, - true, - type: DriftSqlType.dateTime, - 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 playbackStyle = GeneratedColumn( - 'playback_style', - 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, - iCloudId, - adjustmentTime, - latitude, - longitude, - playbackStyle, - ]; - @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'], - )!, - iCloudId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}i_cloud_id'], - ), - adjustmentTime: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}adjustment_time'], - ), - latitude: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}latitude'], - ), - longitude: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}longitude'], - ), - playbackStyle: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}playback_style'], - )!, - ); - } - - @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; - final String? iCloudId; - final DateTime? adjustmentTime; - final double? latitude; - final double? longitude; - final int playbackStyle; - 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, - this.iCloudId, - this.adjustmentTime, - this.latitude, - this.longitude, - required this.playbackStyle, - }); - @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); - if (!nullToAbsent || iCloudId != null) { - map['i_cloud_id'] = Variable(iCloudId); - } - if (!nullToAbsent || adjustmentTime != null) { - map['adjustment_time'] = Variable(adjustmentTime); - } - if (!nullToAbsent || latitude != null) { - map['latitude'] = Variable(latitude); - } - if (!nullToAbsent || longitude != null) { - map['longitude'] = Variable(longitude); - } - map['playback_style'] = Variable(playbackStyle); - 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']), - iCloudId: serializer.fromJson(json['iCloudId']), - adjustmentTime: serializer.fromJson(json['adjustmentTime']), - latitude: serializer.fromJson(json['latitude']), - longitude: serializer.fromJson(json['longitude']), - playbackStyle: serializer.fromJson(json['playbackStyle']), - ); - } - @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), - 'iCloudId': serializer.toJson(iCloudId), - 'adjustmentTime': serializer.toJson(adjustmentTime), - 'latitude': serializer.toJson(latitude), - 'longitude': serializer.toJson(longitude), - 'playbackStyle': serializer.toJson(playbackStyle), - }; - } - - 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, - Value iCloudId = const Value.absent(), - Value adjustmentTime = const Value.absent(), - Value latitude = const Value.absent(), - Value longitude = const Value.absent(), - int? playbackStyle, - }) => 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, - iCloudId: iCloudId.present ? iCloudId.value : this.iCloudId, - adjustmentTime: adjustmentTime.present - ? adjustmentTime.value - : this.adjustmentTime, - latitude: latitude.present ? latitude.value : this.latitude, - longitude: longitude.present ? longitude.value : this.longitude, - playbackStyle: playbackStyle ?? this.playbackStyle, - ); - 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, - iCloudId: data.iCloudId.present ? data.iCloudId.value : this.iCloudId, - adjustmentTime: data.adjustmentTime.present - ? data.adjustmentTime.value - : this.adjustmentTime, - latitude: data.latitude.present ? data.latitude.value : this.latitude, - longitude: data.longitude.present ? data.longitude.value : this.longitude, - playbackStyle: data.playbackStyle.present - ? data.playbackStyle.value - : this.playbackStyle, - ); - } - - @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('iCloudId: $iCloudId, ') - ..write('adjustmentTime: $adjustmentTime, ') - ..write('latitude: $latitude, ') - ..write('longitude: $longitude, ') - ..write('playbackStyle: $playbackStyle') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - name, - type, - createdAt, - updatedAt, - width, - height, - durationInSeconds, - id, - checksum, - isFavorite, - orientation, - iCloudId, - adjustmentTime, - latitude, - longitude, - playbackStyle, - ); - @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 && - other.iCloudId == this.iCloudId && - other.adjustmentTime == this.adjustmentTime && - other.latitude == this.latitude && - other.longitude == this.longitude && - other.playbackStyle == this.playbackStyle); -} - -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; - final Value iCloudId; - final Value adjustmentTime; - final Value latitude; - final Value longitude; - final Value playbackStyle; - 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(), - this.iCloudId = const Value.absent(), - this.adjustmentTime = const Value.absent(), - this.latitude = const Value.absent(), - this.longitude = const Value.absent(), - this.playbackStyle = 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(), - this.iCloudId = const Value.absent(), - this.adjustmentTime = const Value.absent(), - this.latitude = const Value.absent(), - this.longitude = const Value.absent(), - this.playbackStyle = 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, - Expression? iCloudId, - Expression? adjustmentTime, - Expression? latitude, - Expression? longitude, - Expression? playbackStyle, - }) { - 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, - if (iCloudId != null) 'i_cloud_id': iCloudId, - if (adjustmentTime != null) 'adjustment_time': adjustmentTime, - if (latitude != null) 'latitude': latitude, - if (longitude != null) 'longitude': longitude, - if (playbackStyle != null) 'playback_style': playbackStyle, - }); - } - - LocalAssetEntityCompanion copyWith({ - Value? name, - Value? type, - Value? createdAt, - Value? updatedAt, - Value? width, - Value? height, - Value? durationInSeconds, - Value? id, - Value? checksum, - Value? isFavorite, - Value? orientation, - Value? iCloudId, - Value? adjustmentTime, - Value? latitude, - Value? longitude, - Value? playbackStyle, - }) { - 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, - iCloudId: iCloudId ?? this.iCloudId, - adjustmentTime: adjustmentTime ?? this.adjustmentTime, - latitude: latitude ?? this.latitude, - longitude: longitude ?? this.longitude, - playbackStyle: playbackStyle ?? this.playbackStyle, - ); - } - - @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); - } - if (iCloudId.present) { - map['i_cloud_id'] = Variable(iCloudId.value); - } - if (adjustmentTime.present) { - map['adjustment_time'] = Variable(adjustmentTime.value); - } - if (latitude.present) { - map['latitude'] = Variable(latitude.value); - } - if (longitude.present) { - map['longitude'] = Variable(longitude.value); - } - if (playbackStyle.present) { - map['playback_style'] = Variable(playbackStyle.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('iCloudId: $iCloudId, ') - ..write('adjustmentTime: $adjustmentTime, ') - ..write('latitude: $latitude, ') - ..write('longitude: $longitude, ') - ..write('playbackStyle: $playbackStyle') - ..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 i2.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, - i2.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 i2.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 RemoteAssetCloudIdEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - RemoteAssetCloudIdEntity(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 cloudId = GeneratedColumn( - 'cloud_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - true, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - late final GeneratedColumn adjustmentTime = - GeneratedColumn( - 'adjustment_time', - aliasedName, - true, - type: DriftSqlType.dateTime, - 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, - ); - @override - List get $columns => [ - assetId, - cloudId, - createdAt, - adjustmentTime, - latitude, - longitude, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'remote_asset_cloud_id_entity'; - @override - Set get $primaryKey => {assetId}; - @override - RemoteAssetCloudIdEntityData map( - Map data, { - String? tablePrefix, - }) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return RemoteAssetCloudIdEntityData( - assetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}asset_id'], - )!, - cloudId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}cloud_id'], - ), - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}created_at'], - ), - adjustmentTime: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}adjustment_time'], - ), - latitude: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}latitude'], - ), - longitude: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}longitude'], - ), - ); - } - - @override - RemoteAssetCloudIdEntity createAlias(String alias) { - return RemoteAssetCloudIdEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class RemoteAssetCloudIdEntityData extends DataClass - implements Insertable { - final String assetId; - final String? cloudId; - final DateTime? createdAt; - final DateTime? adjustmentTime; - final double? latitude; - final double? longitude; - const RemoteAssetCloudIdEntityData({ - required this.assetId, - this.cloudId, - this.createdAt, - this.adjustmentTime, - this.latitude, - this.longitude, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['asset_id'] = Variable(assetId); - if (!nullToAbsent || cloudId != null) { - map['cloud_id'] = Variable(cloudId); - } - if (!nullToAbsent || createdAt != null) { - map['created_at'] = Variable(createdAt); - } - if (!nullToAbsent || adjustmentTime != null) { - map['adjustment_time'] = Variable(adjustmentTime); - } - if (!nullToAbsent || latitude != null) { - map['latitude'] = Variable(latitude); - } - if (!nullToAbsent || longitude != null) { - map['longitude'] = Variable(longitude); - } - return map; - } - - factory RemoteAssetCloudIdEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return RemoteAssetCloudIdEntityData( - assetId: serializer.fromJson(json['assetId']), - cloudId: serializer.fromJson(json['cloudId']), - createdAt: serializer.fromJson(json['createdAt']), - adjustmentTime: serializer.fromJson(json['adjustmentTime']), - latitude: serializer.fromJson(json['latitude']), - longitude: serializer.fromJson(json['longitude']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'assetId': serializer.toJson(assetId), - 'cloudId': serializer.toJson(cloudId), - 'createdAt': serializer.toJson(createdAt), - 'adjustmentTime': serializer.toJson(adjustmentTime), - 'latitude': serializer.toJson(latitude), - 'longitude': serializer.toJson(longitude), - }; - } - - RemoteAssetCloudIdEntityData copyWith({ - String? assetId, - Value cloudId = const Value.absent(), - Value createdAt = const Value.absent(), - Value adjustmentTime = const Value.absent(), - Value latitude = const Value.absent(), - Value longitude = const Value.absent(), - }) => RemoteAssetCloudIdEntityData( - assetId: assetId ?? this.assetId, - cloudId: cloudId.present ? cloudId.value : this.cloudId, - createdAt: createdAt.present ? createdAt.value : this.createdAt, - adjustmentTime: adjustmentTime.present - ? adjustmentTime.value - : this.adjustmentTime, - latitude: latitude.present ? latitude.value : this.latitude, - longitude: longitude.present ? longitude.value : this.longitude, - ); - RemoteAssetCloudIdEntityData copyWithCompanion( - RemoteAssetCloudIdEntityCompanion data, - ) { - return RemoteAssetCloudIdEntityData( - assetId: data.assetId.present ? data.assetId.value : this.assetId, - cloudId: data.cloudId.present ? data.cloudId.value : this.cloudId, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - adjustmentTime: data.adjustmentTime.present - ? data.adjustmentTime.value - : this.adjustmentTime, - latitude: data.latitude.present ? data.latitude.value : this.latitude, - longitude: data.longitude.present ? data.longitude.value : this.longitude, - ); - } - - @override - String toString() { - return (StringBuffer('RemoteAssetCloudIdEntityData(') - ..write('assetId: $assetId, ') - ..write('cloudId: $cloudId, ') - ..write('createdAt: $createdAt, ') - ..write('adjustmentTime: $adjustmentTime, ') - ..write('latitude: $latitude, ') - ..write('longitude: $longitude') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - assetId, - cloudId, - createdAt, - adjustmentTime, - latitude, - longitude, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is RemoteAssetCloudIdEntityData && - other.assetId == this.assetId && - other.cloudId == this.cloudId && - other.createdAt == this.createdAt && - other.adjustmentTime == this.adjustmentTime && - other.latitude == this.latitude && - other.longitude == this.longitude); -} - -class RemoteAssetCloudIdEntityCompanion - extends UpdateCompanion { - final Value assetId; - final Value cloudId; - final Value createdAt; - final Value adjustmentTime; - final Value latitude; - final Value longitude; - const RemoteAssetCloudIdEntityCompanion({ - this.assetId = const Value.absent(), - this.cloudId = const Value.absent(), - this.createdAt = const Value.absent(), - this.adjustmentTime = const Value.absent(), - this.latitude = const Value.absent(), - this.longitude = const Value.absent(), - }); - RemoteAssetCloudIdEntityCompanion.insert({ - required String assetId, - this.cloudId = const Value.absent(), - this.createdAt = const Value.absent(), - this.adjustmentTime = const Value.absent(), - this.latitude = const Value.absent(), - this.longitude = const Value.absent(), - }) : assetId = Value(assetId); - static Insertable custom({ - Expression? assetId, - Expression? cloudId, - Expression? createdAt, - Expression? adjustmentTime, - Expression? latitude, - Expression? longitude, - }) { - return RawValuesInsertable({ - if (assetId != null) 'asset_id': assetId, - if (cloudId != null) 'cloud_id': cloudId, - if (createdAt != null) 'created_at': createdAt, - if (adjustmentTime != null) 'adjustment_time': adjustmentTime, - if (latitude != null) 'latitude': latitude, - if (longitude != null) 'longitude': longitude, - }); - } - - RemoteAssetCloudIdEntityCompanion copyWith({ - Value? assetId, - Value? cloudId, - Value? createdAt, - Value? adjustmentTime, - Value? latitude, - Value? longitude, - }) { - return RemoteAssetCloudIdEntityCompanion( - assetId: assetId ?? this.assetId, - cloudId: cloudId ?? this.cloudId, - createdAt: createdAt ?? this.createdAt, - adjustmentTime: adjustmentTime ?? this.adjustmentTime, - latitude: latitude ?? this.latitude, - longitude: longitude ?? this.longitude, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (assetId.present) { - map['asset_id'] = Variable(assetId.value); - } - if (cloudId.present) { - map['cloud_id'] = Variable(cloudId.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (adjustmentTime.present) { - map['adjustment_time'] = Variable(adjustmentTime.value); - } - if (latitude.present) { - map['latitude'] = Variable(latitude.value); - } - if (longitude.present) { - map['longitude'] = Variable(longitude.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('RemoteAssetCloudIdEntityCompanion(') - ..write('assetId: $assetId, ') - ..write('cloudId: $cloudId, ') - ..write('createdAt: $createdAt, ') - ..write('adjustmentTime: $adjustmentTime, ') - ..write('latitude: $latitude, ') - ..write('longitude: $longitude') - ..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, - ); - late final GeneratedColumn isVisible = GeneratedColumn( - 'is_visible', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("is_visible" IN (0, 1))', - ), - defaultValue: const CustomExpression('1'), - ); - late final GeneratedColumn deletedAt = GeneratedColumn( - 'deleted_at', - aliasedName, - true, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - @override - List get $columns => [ - id, - assetId, - personId, - imageWidth, - imageHeight, - boundingBoxX1, - boundingBoxY1, - boundingBoxX2, - boundingBoxY2, - sourceType, - isVisible, - deletedAt, - ]; - @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'], - )!, - isVisible: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}is_visible'], - )!, - deletedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}deleted_at'], - ), - ); - } - - @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; - final bool isVisible; - final DateTime? deletedAt; - 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, - required this.isVisible, - this.deletedAt, - }); - @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); - map['is_visible'] = Variable(isVisible); - if (!nullToAbsent || deletedAt != null) { - map['deleted_at'] = Variable(deletedAt); - } - 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']), - isVisible: serializer.fromJson(json['isVisible']), - deletedAt: serializer.fromJson(json['deletedAt']), - ); - } - @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), - 'isVisible': serializer.toJson(isVisible), - 'deletedAt': serializer.toJson(deletedAt), - }; - } - - 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, - bool? isVisible, - Value deletedAt = const Value.absent(), - }) => 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, - isVisible: isVisible ?? this.isVisible, - deletedAt: deletedAt.present ? deletedAt.value : this.deletedAt, - ); - 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, - isVisible: data.isVisible.present ? data.isVisible.value : this.isVisible, - deletedAt: data.deletedAt.present ? data.deletedAt.value : this.deletedAt, - ); - } - - @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('isVisible: $isVisible, ') - ..write('deletedAt: $deletedAt') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - assetId, - personId, - imageWidth, - imageHeight, - boundingBoxX1, - boundingBoxY1, - boundingBoxX2, - boundingBoxY2, - sourceType, - isVisible, - deletedAt, - ); - @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 && - other.isVisible == this.isVisible && - other.deletedAt == this.deletedAt); -} - -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; - final Value isVisible; - final Value deletedAt; - 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(), - this.isVisible = const Value.absent(), - this.deletedAt = 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, - this.isVisible = const Value.absent(), - this.deletedAt = const Value.absent(), - }) : 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, - Expression? isVisible, - Expression? deletedAt, - }) { - 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, - if (isVisible != null) 'is_visible': isVisible, - if (deletedAt != null) 'deleted_at': deletedAt, - }); - } - - AssetFaceEntityCompanion copyWith({ - Value? id, - Value? assetId, - Value? personId, - Value? imageWidth, - Value? imageHeight, - Value? boundingBoxX1, - Value? boundingBoxY1, - Value? boundingBoxX2, - Value? boundingBoxY2, - Value? sourceType, - Value? isVisible, - Value? deletedAt, - }) { - 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, - isVisible: isVisible ?? this.isVisible, - deletedAt: deletedAt ?? this.deletedAt, - ); - } - - @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); - } - if (isVisible.present) { - map['is_visible'] = Variable(isVisible.value); - } - if (deletedAt.present) { - map['deleted_at'] = Variable(deletedAt.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('isVisible: $isVisible, ') - ..write('deletedAt: $deletedAt') - ..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'), - ); - late final GeneratedColumn source = GeneratedColumn( - 'source', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn playbackStyle = GeneratedColumn( - 'playback_style', - 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, - source, - playbackStyle, - ]; - @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'], - )!, - source: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}source'], - )!, - playbackStyle: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}playback_style'], - )!, - ); - } - - @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; - final int source; - final int playbackStyle; - 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, - required this.source, - required this.playbackStyle, - }); - @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); - map['source'] = Variable(source); - map['playback_style'] = Variable(playbackStyle); - 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']), - source: serializer.fromJson(json['source']), - playbackStyle: serializer.fromJson(json['playbackStyle']), - ); - } - @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), - 'source': serializer.toJson(source), - 'playbackStyle': serializer.toJson(playbackStyle), - }; - } - - 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, - int? source, - int? playbackStyle, - }) => 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, - source: source ?? this.source, - playbackStyle: playbackStyle ?? this.playbackStyle, - ); - 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, - source: data.source.present ? data.source.value : this.source, - playbackStyle: data.playbackStyle.present - ? data.playbackStyle.value - : this.playbackStyle, - ); - } - - @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('source: $source, ') - ..write('playbackStyle: $playbackStyle') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - name, - type, - createdAt, - updatedAt, - width, - height, - durationInSeconds, - id, - albumId, - checksum, - isFavorite, - orientation, - source, - playbackStyle, - ); - @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 && - other.source == this.source && - other.playbackStyle == this.playbackStyle); -} - -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; - final Value source; - final Value playbackStyle; - 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(), - this.source = const Value.absent(), - this.playbackStyle = 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(), - required int source, - this.playbackStyle = const Value.absent(), - }) : name = Value(name), - type = Value(type), - id = Value(id), - albumId = Value(albumId), - source = Value(source); - 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, - Expression? source, - Expression? playbackStyle, - }) { - 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, - if (source != null) 'source': source, - if (playbackStyle != null) 'playback_style': playbackStyle, - }); - } - - 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, - Value? source, - Value? playbackStyle, - }) { - 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, - source: source ?? this.source, - playbackStyle: playbackStyle ?? this.playbackStyle, - ); - } - - @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); - } - if (source.present) { - map['source'] = Variable(source.value); - } - if (playbackStyle.present) { - map['playback_style'] = Variable(playbackStyle.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('source: $source, ') - ..write('playbackStyle: $playbackStyle') - ..write(')')) - .toString(); - } -} - -class DatabaseAtV21 extends GeneratedDatabase { - DatabaseAtV21(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 idxLocalAlbumAssetAlbumAsset = Index( - 'idx_local_album_asset_album_asset', - 'CREATE INDEX IF NOT EXISTS idx_local_album_asset_album_asset ON local_album_asset_entity (album_id, asset_id)', - ); - late final Index idxRemoteAlbumOwnerId = Index( - 'idx_remote_album_owner_id', - 'CREATE INDEX IF NOT EXISTS idx_remote_album_owner_id ON remote_album_entity (owner_id)', - ); - 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 idxLocalAssetCloudId = Index( - 'idx_local_asset_cloud_id', - 'CREATE INDEX IF NOT EXISTS idx_local_asset_cloud_id ON local_asset_entity (i_cloud_id)', - ); - late final Index idxStackPrimaryAssetId = Index( - 'idx_stack_primary_asset_id', - 'CREATE INDEX IF NOT EXISTS idx_stack_primary_asset_id ON stack_entity (primary_asset_id)', - ); - 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 Index idxRemoteAssetStackId = Index( - 'idx_remote_asset_stack_id', - 'CREATE INDEX IF NOT EXISTS idx_remote_asset_stack_id ON remote_asset_entity (stack_id)', - ); - late final Index idxRemoteAssetLocalDateTimeDay = Index( - 'idx_remote_asset_local_date_time_day', - 'CREATE INDEX IF NOT EXISTS idx_remote_asset_local_date_time_day ON remote_asset_entity (STRFTIME(\'%Y-%m-%d\', local_date_time))', - ); - late final Index idxRemoteAssetLocalDateTimeMonth = Index( - 'idx_remote_asset_local_date_time_month', - 'CREATE INDEX IF NOT EXISTS idx_remote_asset_local_date_time_month ON remote_asset_entity (STRFTIME(\'%Y-%m\', local_date_time))', - ); - 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 RemoteAssetCloudIdEntity remoteAssetCloudIdEntity = - RemoteAssetCloudIdEntity(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 idxPartnerSharedWithId = Index( - 'idx_partner_shared_with_id', - 'CREATE INDEX IF NOT EXISTS idx_partner_shared_with_id ON partner_entity (shared_with_id)', - ); - 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 idxRemoteAlbumAssetAlbumAsset = Index( - 'idx_remote_album_asset_album_asset', - 'CREATE INDEX IF NOT EXISTS idx_remote_album_asset_album_asset ON remote_album_asset_entity (album_id, asset_id)', - ); - late final Index idxRemoteAssetCloudId = Index( - 'idx_remote_asset_cloud_id', - 'CREATE INDEX IF NOT EXISTS idx_remote_asset_cloud_id ON remote_asset_cloud_id_entity (cloud_id)', - ); - late final Index idxPersonOwnerId = Index( - 'idx_person_owner_id', - 'CREATE INDEX IF NOT EXISTS idx_person_owner_id ON person_entity (owner_id)', - ); - late final Index idxAssetFacePersonId = Index( - 'idx_asset_face_person_id', - 'CREATE INDEX IF NOT EXISTS idx_asset_face_person_id ON asset_face_entity (person_id)', - ); - late final Index idxAssetFaceAssetId = Index( - 'idx_asset_face_asset_id', - 'CREATE INDEX IF NOT EXISTS idx_asset_face_asset_id ON asset_face_entity (asset_id)', - ); - 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, - idxLocalAlbumAssetAlbumAsset, - idxRemoteAlbumOwnerId, - idxLocalAssetChecksum, - idxLocalAssetCloudId, - idxStackPrimaryAssetId, - idxRemoteAssetOwnerChecksum, - uQRemoteAssetsOwnerChecksum, - uQRemoteAssetsOwnerLibraryChecksum, - idxRemoteAssetChecksum, - idxRemoteAssetStackId, - idxRemoteAssetLocalDateTimeDay, - idxRemoteAssetLocalDateTimeMonth, - authUserEntity, - userMetadataEntity, - partnerEntity, - remoteExifEntity, - remoteAlbumAssetEntity, - remoteAlbumUserEntity, - remoteAssetCloudIdEntity, - memoryEntity, - memoryAssetEntity, - personEntity, - assetFaceEntity, - storeEntity, - trashedLocalAssetEntity, - idxPartnerSharedWithId, - idxLatLng, - idxRemoteAlbumAssetAlbumAsset, - idxRemoteAssetCloudId, - idxPersonOwnerId, - idxAssetFacePersonId, - idxAssetFaceAssetId, - idxTrashedLocalAssetChecksum, - idxTrashedLocalAssetAlbum, - ]; - @override - int get schemaVersion => 21; - @override - DriftDatabaseOptions get options => - const DriftDatabaseOptions(storeDateTimeAsText: true); -} diff --git a/mobile/test/drift/main/generated/schema_v22.dart b/mobile/test/drift/main/generated/schema_v22.dart deleted file mode 100644 index c1abad0d24..0000000000 --- a/mobile/test/drift/main/generated/schema_v22.dart +++ /dev/null @@ -1,8849 +0,0 @@ -// dart format width=80 -import 'dart:typed_data' as i2; -// GENERATED BY drift_dev, DO NOT MODIFY. -// ignore_for_file: type=lint,unused_import -// -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, - ); - late final GeneratedColumn isEdited = GeneratedColumn( - 'is_edited', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("is_edited" IN (0, 1))', - ), - defaultValue: const CustomExpression('0'), - ); - @override - List get $columns => [ - name, - type, - createdAt, - updatedAt, - width, - height, - durationInSeconds, - id, - checksum, - isFavorite, - ownerId, - localDateTime, - thumbHash, - deletedAt, - livePhotoVideoId, - visibility, - stackId, - libraryId, - isEdited, - ]; - @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'], - ), - isEdited: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}is_edited'], - )!, - ); - } - - @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; - final bool isEdited; - 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, - required this.isEdited, - }); - @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); - } - map['is_edited'] = Variable(isEdited); - 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']), - isEdited: serializer.fromJson(json['isEdited']), - ); - } - @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), - 'isEdited': serializer.toJson(isEdited), - }; - } - - 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(), - bool? isEdited, - }) => 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, - isEdited: isEdited ?? this.isEdited, - ); - 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, - isEdited: data.isEdited.present ? data.isEdited.value : this.isEdited, - ); - } - - @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('isEdited: $isEdited') - ..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, - isEdited, - ); - @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 && - other.isEdited == this.isEdited); -} - -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; - final Value isEdited; - 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(), - this.isEdited = 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(), - this.isEdited = 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, - Expression? isEdited, - }) { - 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, - if (isEdited != null) 'is_edited': isEdited, - }); - } - - 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, - Value? isEdited, - }) { - 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, - isEdited: isEdited ?? this.isEdited, - ); - } - - @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); - } - if (isEdited.present) { - map['is_edited'] = Variable(isEdited.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('isEdited: $isEdited') - ..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'), - ); - late final GeneratedColumn iCloudId = GeneratedColumn( - 'i_cloud_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn adjustmentTime = - GeneratedColumn( - 'adjustment_time', - aliasedName, - true, - type: DriftSqlType.dateTime, - 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 playbackStyle = GeneratedColumn( - 'playback_style', - 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, - iCloudId, - adjustmentTime, - latitude, - longitude, - playbackStyle, - ]; - @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'], - )!, - iCloudId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}i_cloud_id'], - ), - adjustmentTime: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}adjustment_time'], - ), - latitude: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}latitude'], - ), - longitude: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}longitude'], - ), - playbackStyle: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}playback_style'], - )!, - ); - } - - @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; - final String? iCloudId; - final DateTime? adjustmentTime; - final double? latitude; - final double? longitude; - final int playbackStyle; - 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, - this.iCloudId, - this.adjustmentTime, - this.latitude, - this.longitude, - required this.playbackStyle, - }); - @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); - if (!nullToAbsent || iCloudId != null) { - map['i_cloud_id'] = Variable(iCloudId); - } - if (!nullToAbsent || adjustmentTime != null) { - map['adjustment_time'] = Variable(adjustmentTime); - } - if (!nullToAbsent || latitude != null) { - map['latitude'] = Variable(latitude); - } - if (!nullToAbsent || longitude != null) { - map['longitude'] = Variable(longitude); - } - map['playback_style'] = Variable(playbackStyle); - 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']), - iCloudId: serializer.fromJson(json['iCloudId']), - adjustmentTime: serializer.fromJson(json['adjustmentTime']), - latitude: serializer.fromJson(json['latitude']), - longitude: serializer.fromJson(json['longitude']), - playbackStyle: serializer.fromJson(json['playbackStyle']), - ); - } - @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), - 'iCloudId': serializer.toJson(iCloudId), - 'adjustmentTime': serializer.toJson(adjustmentTime), - 'latitude': serializer.toJson(latitude), - 'longitude': serializer.toJson(longitude), - 'playbackStyle': serializer.toJson(playbackStyle), - }; - } - - 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, - Value iCloudId = const Value.absent(), - Value adjustmentTime = const Value.absent(), - Value latitude = const Value.absent(), - Value longitude = const Value.absent(), - int? playbackStyle, - }) => 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, - iCloudId: iCloudId.present ? iCloudId.value : this.iCloudId, - adjustmentTime: adjustmentTime.present - ? adjustmentTime.value - : this.adjustmentTime, - latitude: latitude.present ? latitude.value : this.latitude, - longitude: longitude.present ? longitude.value : this.longitude, - playbackStyle: playbackStyle ?? this.playbackStyle, - ); - 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, - iCloudId: data.iCloudId.present ? data.iCloudId.value : this.iCloudId, - adjustmentTime: data.adjustmentTime.present - ? data.adjustmentTime.value - : this.adjustmentTime, - latitude: data.latitude.present ? data.latitude.value : this.latitude, - longitude: data.longitude.present ? data.longitude.value : this.longitude, - playbackStyle: data.playbackStyle.present - ? data.playbackStyle.value - : this.playbackStyle, - ); - } - - @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('iCloudId: $iCloudId, ') - ..write('adjustmentTime: $adjustmentTime, ') - ..write('latitude: $latitude, ') - ..write('longitude: $longitude, ') - ..write('playbackStyle: $playbackStyle') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - name, - type, - createdAt, - updatedAt, - width, - height, - durationInSeconds, - id, - checksum, - isFavorite, - orientation, - iCloudId, - adjustmentTime, - latitude, - longitude, - playbackStyle, - ); - @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 && - other.iCloudId == this.iCloudId && - other.adjustmentTime == this.adjustmentTime && - other.latitude == this.latitude && - other.longitude == this.longitude && - other.playbackStyle == this.playbackStyle); -} - -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; - final Value iCloudId; - final Value adjustmentTime; - final Value latitude; - final Value longitude; - final Value playbackStyle; - 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(), - this.iCloudId = const Value.absent(), - this.adjustmentTime = const Value.absent(), - this.latitude = const Value.absent(), - this.longitude = const Value.absent(), - this.playbackStyle = 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(), - this.iCloudId = const Value.absent(), - this.adjustmentTime = const Value.absent(), - this.latitude = const Value.absent(), - this.longitude = const Value.absent(), - this.playbackStyle = 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, - Expression? iCloudId, - Expression? adjustmentTime, - Expression? latitude, - Expression? longitude, - Expression? playbackStyle, - }) { - 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, - if (iCloudId != null) 'i_cloud_id': iCloudId, - if (adjustmentTime != null) 'adjustment_time': adjustmentTime, - if (latitude != null) 'latitude': latitude, - if (longitude != null) 'longitude': longitude, - if (playbackStyle != null) 'playback_style': playbackStyle, - }); - } - - LocalAssetEntityCompanion copyWith({ - Value? name, - Value? type, - Value? createdAt, - Value? updatedAt, - Value? width, - Value? height, - Value? durationInSeconds, - Value? id, - Value? checksum, - Value? isFavorite, - Value? orientation, - Value? iCloudId, - Value? adjustmentTime, - Value? latitude, - Value? longitude, - Value? playbackStyle, - }) { - 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, - iCloudId: iCloudId ?? this.iCloudId, - adjustmentTime: adjustmentTime ?? this.adjustmentTime, - latitude: latitude ?? this.latitude, - longitude: longitude ?? this.longitude, - playbackStyle: playbackStyle ?? this.playbackStyle, - ); - } - - @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); - } - if (iCloudId.present) { - map['i_cloud_id'] = Variable(iCloudId.value); - } - if (adjustmentTime.present) { - map['adjustment_time'] = Variable(adjustmentTime.value); - } - if (latitude.present) { - map['latitude'] = Variable(latitude.value); - } - if (longitude.present) { - map['longitude'] = Variable(longitude.value); - } - if (playbackStyle.present) { - map['playback_style'] = Variable(playbackStyle.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('iCloudId: $iCloudId, ') - ..write('adjustmentTime: $adjustmentTime, ') - ..write('latitude: $latitude, ') - ..write('longitude: $longitude, ') - ..write('playbackStyle: $playbackStyle') - ..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 i2.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, - i2.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 i2.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 RemoteAssetCloudIdEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - RemoteAssetCloudIdEntity(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 cloudId = GeneratedColumn( - 'cloud_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - true, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - late final GeneratedColumn adjustmentTime = - GeneratedColumn( - 'adjustment_time', - aliasedName, - true, - type: DriftSqlType.dateTime, - 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, - ); - @override - List get $columns => [ - assetId, - cloudId, - createdAt, - adjustmentTime, - latitude, - longitude, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'remote_asset_cloud_id_entity'; - @override - Set get $primaryKey => {assetId}; - @override - RemoteAssetCloudIdEntityData map( - Map data, { - String? tablePrefix, - }) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return RemoteAssetCloudIdEntityData( - assetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}asset_id'], - )!, - cloudId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}cloud_id'], - ), - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}created_at'], - ), - adjustmentTime: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}adjustment_time'], - ), - latitude: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}latitude'], - ), - longitude: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}longitude'], - ), - ); - } - - @override - RemoteAssetCloudIdEntity createAlias(String alias) { - return RemoteAssetCloudIdEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class RemoteAssetCloudIdEntityData extends DataClass - implements Insertable { - final String assetId; - final String? cloudId; - final DateTime? createdAt; - final DateTime? adjustmentTime; - final double? latitude; - final double? longitude; - const RemoteAssetCloudIdEntityData({ - required this.assetId, - this.cloudId, - this.createdAt, - this.adjustmentTime, - this.latitude, - this.longitude, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['asset_id'] = Variable(assetId); - if (!nullToAbsent || cloudId != null) { - map['cloud_id'] = Variable(cloudId); - } - if (!nullToAbsent || createdAt != null) { - map['created_at'] = Variable(createdAt); - } - if (!nullToAbsent || adjustmentTime != null) { - map['adjustment_time'] = Variable(adjustmentTime); - } - if (!nullToAbsent || latitude != null) { - map['latitude'] = Variable(latitude); - } - if (!nullToAbsent || longitude != null) { - map['longitude'] = Variable(longitude); - } - return map; - } - - factory RemoteAssetCloudIdEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return RemoteAssetCloudIdEntityData( - assetId: serializer.fromJson(json['assetId']), - cloudId: serializer.fromJson(json['cloudId']), - createdAt: serializer.fromJson(json['createdAt']), - adjustmentTime: serializer.fromJson(json['adjustmentTime']), - latitude: serializer.fromJson(json['latitude']), - longitude: serializer.fromJson(json['longitude']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'assetId': serializer.toJson(assetId), - 'cloudId': serializer.toJson(cloudId), - 'createdAt': serializer.toJson(createdAt), - 'adjustmentTime': serializer.toJson(adjustmentTime), - 'latitude': serializer.toJson(latitude), - 'longitude': serializer.toJson(longitude), - }; - } - - RemoteAssetCloudIdEntityData copyWith({ - String? assetId, - Value cloudId = const Value.absent(), - Value createdAt = const Value.absent(), - Value adjustmentTime = const Value.absent(), - Value latitude = const Value.absent(), - Value longitude = const Value.absent(), - }) => RemoteAssetCloudIdEntityData( - assetId: assetId ?? this.assetId, - cloudId: cloudId.present ? cloudId.value : this.cloudId, - createdAt: createdAt.present ? createdAt.value : this.createdAt, - adjustmentTime: adjustmentTime.present - ? adjustmentTime.value - : this.adjustmentTime, - latitude: latitude.present ? latitude.value : this.latitude, - longitude: longitude.present ? longitude.value : this.longitude, - ); - RemoteAssetCloudIdEntityData copyWithCompanion( - RemoteAssetCloudIdEntityCompanion data, - ) { - return RemoteAssetCloudIdEntityData( - assetId: data.assetId.present ? data.assetId.value : this.assetId, - cloudId: data.cloudId.present ? data.cloudId.value : this.cloudId, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - adjustmentTime: data.adjustmentTime.present - ? data.adjustmentTime.value - : this.adjustmentTime, - latitude: data.latitude.present ? data.latitude.value : this.latitude, - longitude: data.longitude.present ? data.longitude.value : this.longitude, - ); - } - - @override - String toString() { - return (StringBuffer('RemoteAssetCloudIdEntityData(') - ..write('assetId: $assetId, ') - ..write('cloudId: $cloudId, ') - ..write('createdAt: $createdAt, ') - ..write('adjustmentTime: $adjustmentTime, ') - ..write('latitude: $latitude, ') - ..write('longitude: $longitude') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - assetId, - cloudId, - createdAt, - adjustmentTime, - latitude, - longitude, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is RemoteAssetCloudIdEntityData && - other.assetId == this.assetId && - other.cloudId == this.cloudId && - other.createdAt == this.createdAt && - other.adjustmentTime == this.adjustmentTime && - other.latitude == this.latitude && - other.longitude == this.longitude); -} - -class RemoteAssetCloudIdEntityCompanion - extends UpdateCompanion { - final Value assetId; - final Value cloudId; - final Value createdAt; - final Value adjustmentTime; - final Value latitude; - final Value longitude; - const RemoteAssetCloudIdEntityCompanion({ - this.assetId = const Value.absent(), - this.cloudId = const Value.absent(), - this.createdAt = const Value.absent(), - this.adjustmentTime = const Value.absent(), - this.latitude = const Value.absent(), - this.longitude = const Value.absent(), - }); - RemoteAssetCloudIdEntityCompanion.insert({ - required String assetId, - this.cloudId = const Value.absent(), - this.createdAt = const Value.absent(), - this.adjustmentTime = const Value.absent(), - this.latitude = const Value.absent(), - this.longitude = const Value.absent(), - }) : assetId = Value(assetId); - static Insertable custom({ - Expression? assetId, - Expression? cloudId, - Expression? createdAt, - Expression? adjustmentTime, - Expression? latitude, - Expression? longitude, - }) { - return RawValuesInsertable({ - if (assetId != null) 'asset_id': assetId, - if (cloudId != null) 'cloud_id': cloudId, - if (createdAt != null) 'created_at': createdAt, - if (adjustmentTime != null) 'adjustment_time': adjustmentTime, - if (latitude != null) 'latitude': latitude, - if (longitude != null) 'longitude': longitude, - }); - } - - RemoteAssetCloudIdEntityCompanion copyWith({ - Value? assetId, - Value? cloudId, - Value? createdAt, - Value? adjustmentTime, - Value? latitude, - Value? longitude, - }) { - return RemoteAssetCloudIdEntityCompanion( - assetId: assetId ?? this.assetId, - cloudId: cloudId ?? this.cloudId, - createdAt: createdAt ?? this.createdAt, - adjustmentTime: adjustmentTime ?? this.adjustmentTime, - latitude: latitude ?? this.latitude, - longitude: longitude ?? this.longitude, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (assetId.present) { - map['asset_id'] = Variable(assetId.value); - } - if (cloudId.present) { - map['cloud_id'] = Variable(cloudId.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (adjustmentTime.present) { - map['adjustment_time'] = Variable(adjustmentTime.value); - } - if (latitude.present) { - map['latitude'] = Variable(latitude.value); - } - if (longitude.present) { - map['longitude'] = Variable(longitude.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('RemoteAssetCloudIdEntityCompanion(') - ..write('assetId: $assetId, ') - ..write('cloudId: $cloudId, ') - ..write('createdAt: $createdAt, ') - ..write('adjustmentTime: $adjustmentTime, ') - ..write('latitude: $latitude, ') - ..write('longitude: $longitude') - ..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, - ); - late final GeneratedColumn isVisible = GeneratedColumn( - 'is_visible', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("is_visible" IN (0, 1))', - ), - defaultValue: const CustomExpression('1'), - ); - late final GeneratedColumn deletedAt = GeneratedColumn( - 'deleted_at', - aliasedName, - true, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - @override - List get $columns => [ - id, - assetId, - personId, - imageWidth, - imageHeight, - boundingBoxX1, - boundingBoxY1, - boundingBoxX2, - boundingBoxY2, - sourceType, - isVisible, - deletedAt, - ]; - @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'], - )!, - isVisible: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}is_visible'], - )!, - deletedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}deleted_at'], - ), - ); - } - - @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; - final bool isVisible; - final DateTime? deletedAt; - 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, - required this.isVisible, - this.deletedAt, - }); - @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); - map['is_visible'] = Variable(isVisible); - if (!nullToAbsent || deletedAt != null) { - map['deleted_at'] = Variable(deletedAt); - } - 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']), - isVisible: serializer.fromJson(json['isVisible']), - deletedAt: serializer.fromJson(json['deletedAt']), - ); - } - @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), - 'isVisible': serializer.toJson(isVisible), - 'deletedAt': serializer.toJson(deletedAt), - }; - } - - 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, - bool? isVisible, - Value deletedAt = const Value.absent(), - }) => 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, - isVisible: isVisible ?? this.isVisible, - deletedAt: deletedAt.present ? deletedAt.value : this.deletedAt, - ); - 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, - isVisible: data.isVisible.present ? data.isVisible.value : this.isVisible, - deletedAt: data.deletedAt.present ? data.deletedAt.value : this.deletedAt, - ); - } - - @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('isVisible: $isVisible, ') - ..write('deletedAt: $deletedAt') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - assetId, - personId, - imageWidth, - imageHeight, - boundingBoxX1, - boundingBoxY1, - boundingBoxX2, - boundingBoxY2, - sourceType, - isVisible, - deletedAt, - ); - @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 && - other.isVisible == this.isVisible && - other.deletedAt == this.deletedAt); -} - -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; - final Value isVisible; - final Value deletedAt; - 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(), - this.isVisible = const Value.absent(), - this.deletedAt = 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, - this.isVisible = const Value.absent(), - this.deletedAt = const Value.absent(), - }) : 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, - Expression? isVisible, - Expression? deletedAt, - }) { - 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, - if (isVisible != null) 'is_visible': isVisible, - if (deletedAt != null) 'deleted_at': deletedAt, - }); - } - - AssetFaceEntityCompanion copyWith({ - Value? id, - Value? assetId, - Value? personId, - Value? imageWidth, - Value? imageHeight, - Value? boundingBoxX1, - Value? boundingBoxY1, - Value? boundingBoxX2, - Value? boundingBoxY2, - Value? sourceType, - Value? isVisible, - Value? deletedAt, - }) { - 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, - isVisible: isVisible ?? this.isVisible, - deletedAt: deletedAt ?? this.deletedAt, - ); - } - - @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); - } - if (isVisible.present) { - map['is_visible'] = Variable(isVisible.value); - } - if (deletedAt.present) { - map['deleted_at'] = Variable(deletedAt.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('isVisible: $isVisible, ') - ..write('deletedAt: $deletedAt') - ..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'), - ); - late final GeneratedColumn source = GeneratedColumn( - 'source', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn playbackStyle = GeneratedColumn( - 'playback_style', - 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, - source, - playbackStyle, - ]; - @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'], - )!, - source: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}source'], - )!, - playbackStyle: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}playback_style'], - )!, - ); - } - - @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; - final int source; - final int playbackStyle; - 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, - required this.source, - required this.playbackStyle, - }); - @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); - map['source'] = Variable(source); - map['playback_style'] = Variable(playbackStyle); - 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']), - source: serializer.fromJson(json['source']), - playbackStyle: serializer.fromJson(json['playbackStyle']), - ); - } - @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), - 'source': serializer.toJson(source), - 'playbackStyle': serializer.toJson(playbackStyle), - }; - } - - 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, - int? source, - int? playbackStyle, - }) => 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, - source: source ?? this.source, - playbackStyle: playbackStyle ?? this.playbackStyle, - ); - 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, - source: data.source.present ? data.source.value : this.source, - playbackStyle: data.playbackStyle.present - ? data.playbackStyle.value - : this.playbackStyle, - ); - } - - @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('source: $source, ') - ..write('playbackStyle: $playbackStyle') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - name, - type, - createdAt, - updatedAt, - width, - height, - durationInSeconds, - id, - albumId, - checksum, - isFavorite, - orientation, - source, - playbackStyle, - ); - @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 && - other.source == this.source && - other.playbackStyle == this.playbackStyle); -} - -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; - final Value source; - final Value playbackStyle; - 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(), - this.source = const Value.absent(), - this.playbackStyle = 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(), - required int source, - this.playbackStyle = const Value.absent(), - }) : name = Value(name), - type = Value(type), - id = Value(id), - albumId = Value(albumId), - source = Value(source); - 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, - Expression? source, - Expression? playbackStyle, - }) { - 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, - if (source != null) 'source': source, - if (playbackStyle != null) 'playback_style': playbackStyle, - }); - } - - 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, - Value? source, - Value? playbackStyle, - }) { - 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, - source: source ?? this.source, - playbackStyle: playbackStyle ?? this.playbackStyle, - ); - } - - @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); - } - if (source.present) { - map['source'] = Variable(source.value); - } - if (playbackStyle.present) { - map['playback_style'] = Variable(playbackStyle.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('source: $source, ') - ..write('playbackStyle: $playbackStyle') - ..write(')')) - .toString(); - } -} - -class AssetEditEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - AssetEditEntity(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 action = GeneratedColumn( - 'action', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn parameters = - GeneratedColumn( - 'parameters', - aliasedName, - false, - type: DriftSqlType.blob, - requiredDuringInsert: true, - ); - late final GeneratedColumn sequence = GeneratedColumn( - 'sequence', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - @override - List get $columns => [ - id, - assetId, - action, - parameters, - sequence, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'asset_edit_entity'; - @override - Set get $primaryKey => {id}; - @override - AssetEditEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return AssetEditEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - assetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}asset_id'], - )!, - action: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}action'], - )!, - parameters: attachedDatabase.typeMapping.read( - DriftSqlType.blob, - data['${effectivePrefix}parameters'], - )!, - sequence: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}sequence'], - )!, - ); - } - - @override - AssetEditEntity createAlias(String alias) { - return AssetEditEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class AssetEditEntityData extends DataClass - implements Insertable { - final String id; - final String assetId; - final int action; - final i2.Uint8List parameters; - final int sequence; - const AssetEditEntityData({ - required this.id, - required this.assetId, - required this.action, - required this.parameters, - required this.sequence, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['asset_id'] = Variable(assetId); - map['action'] = Variable(action); - map['parameters'] = Variable(parameters); - map['sequence'] = Variable(sequence); - return map; - } - - factory AssetEditEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return AssetEditEntityData( - id: serializer.fromJson(json['id']), - assetId: serializer.fromJson(json['assetId']), - action: serializer.fromJson(json['action']), - parameters: serializer.fromJson(json['parameters']), - sequence: serializer.fromJson(json['sequence']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'assetId': serializer.toJson(assetId), - 'action': serializer.toJson(action), - 'parameters': serializer.toJson(parameters), - 'sequence': serializer.toJson(sequence), - }; - } - - AssetEditEntityData copyWith({ - String? id, - String? assetId, - int? action, - i2.Uint8List? parameters, - int? sequence, - }) => AssetEditEntityData( - id: id ?? this.id, - assetId: assetId ?? this.assetId, - action: action ?? this.action, - parameters: parameters ?? this.parameters, - sequence: sequence ?? this.sequence, - ); - AssetEditEntityData copyWithCompanion(AssetEditEntityCompanion data) { - return AssetEditEntityData( - id: data.id.present ? data.id.value : this.id, - assetId: data.assetId.present ? data.assetId.value : this.assetId, - action: data.action.present ? data.action.value : this.action, - parameters: data.parameters.present - ? data.parameters.value - : this.parameters, - sequence: data.sequence.present ? data.sequence.value : this.sequence, - ); - } - - @override - String toString() { - return (StringBuffer('AssetEditEntityData(') - ..write('id: $id, ') - ..write('assetId: $assetId, ') - ..write('action: $action, ') - ..write('parameters: $parameters, ') - ..write('sequence: $sequence') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - assetId, - action, - $driftBlobEquality.hash(parameters), - sequence, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is AssetEditEntityData && - other.id == this.id && - other.assetId == this.assetId && - other.action == this.action && - $driftBlobEquality.equals(other.parameters, this.parameters) && - other.sequence == this.sequence); -} - -class AssetEditEntityCompanion extends UpdateCompanion { - final Value id; - final Value assetId; - final Value action; - final Value parameters; - final Value sequence; - const AssetEditEntityCompanion({ - this.id = const Value.absent(), - this.assetId = const Value.absent(), - this.action = const Value.absent(), - this.parameters = const Value.absent(), - this.sequence = const Value.absent(), - }); - AssetEditEntityCompanion.insert({ - required String id, - required String assetId, - required int action, - required i2.Uint8List parameters, - required int sequence, - }) : id = Value(id), - assetId = Value(assetId), - action = Value(action), - parameters = Value(parameters), - sequence = Value(sequence); - static Insertable custom({ - Expression? id, - Expression? assetId, - Expression? action, - Expression? parameters, - Expression? sequence, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (assetId != null) 'asset_id': assetId, - if (action != null) 'action': action, - if (parameters != null) 'parameters': parameters, - if (sequence != null) 'sequence': sequence, - }); - } - - AssetEditEntityCompanion copyWith({ - Value? id, - Value? assetId, - Value? action, - Value? parameters, - Value? sequence, - }) { - return AssetEditEntityCompanion( - id: id ?? this.id, - assetId: assetId ?? this.assetId, - action: action ?? this.action, - parameters: parameters ?? this.parameters, - sequence: sequence ?? this.sequence, - ); - } - - @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 (action.present) { - map['action'] = Variable(action.value); - } - if (parameters.present) { - map['parameters'] = Variable(parameters.value); - } - if (sequence.present) { - map['sequence'] = Variable(sequence.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('AssetEditEntityCompanion(') - ..write('id: $id, ') - ..write('assetId: $assetId, ') - ..write('action: $action, ') - ..write('parameters: $parameters, ') - ..write('sequence: $sequence') - ..write(')')) - .toString(); - } -} - -class DatabaseAtV22 extends GeneratedDatabase { - DatabaseAtV22(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 idxLocalAlbumAssetAlbumAsset = Index( - 'idx_local_album_asset_album_asset', - 'CREATE INDEX IF NOT EXISTS idx_local_album_asset_album_asset ON local_album_asset_entity (album_id, asset_id)', - ); - late final Index idxRemoteAlbumOwnerId = Index( - 'idx_remote_album_owner_id', - 'CREATE INDEX IF NOT EXISTS idx_remote_album_owner_id ON remote_album_entity (owner_id)', - ); - 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 idxLocalAssetCloudId = Index( - 'idx_local_asset_cloud_id', - 'CREATE INDEX IF NOT EXISTS idx_local_asset_cloud_id ON local_asset_entity (i_cloud_id)', - ); - late final Index idxStackPrimaryAssetId = Index( - 'idx_stack_primary_asset_id', - 'CREATE INDEX IF NOT EXISTS idx_stack_primary_asset_id ON stack_entity (primary_asset_id)', - ); - 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 Index idxRemoteAssetStackId = Index( - 'idx_remote_asset_stack_id', - 'CREATE INDEX IF NOT EXISTS idx_remote_asset_stack_id ON remote_asset_entity (stack_id)', - ); - late final Index idxRemoteAssetLocalDateTimeDay = Index( - 'idx_remote_asset_local_date_time_day', - 'CREATE INDEX IF NOT EXISTS idx_remote_asset_local_date_time_day ON remote_asset_entity (STRFTIME(\'%Y-%m-%d\', local_date_time))', - ); - late final Index idxRemoteAssetLocalDateTimeMonth = Index( - 'idx_remote_asset_local_date_time_month', - 'CREATE INDEX IF NOT EXISTS idx_remote_asset_local_date_time_month ON remote_asset_entity (STRFTIME(\'%Y-%m\', local_date_time))', - ); - 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 RemoteAssetCloudIdEntity remoteAssetCloudIdEntity = - RemoteAssetCloudIdEntity(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 AssetEditEntity assetEditEntity = AssetEditEntity(this); - late final Index idxPartnerSharedWithId = Index( - 'idx_partner_shared_with_id', - 'CREATE INDEX IF NOT EXISTS idx_partner_shared_with_id ON partner_entity (shared_with_id)', - ); - 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 idxRemoteAlbumAssetAlbumAsset = Index( - 'idx_remote_album_asset_album_asset', - 'CREATE INDEX IF NOT EXISTS idx_remote_album_asset_album_asset ON remote_album_asset_entity (album_id, asset_id)', - ); - late final Index idxRemoteAssetCloudId = Index( - 'idx_remote_asset_cloud_id', - 'CREATE INDEX IF NOT EXISTS idx_remote_asset_cloud_id ON remote_asset_cloud_id_entity (cloud_id)', - ); - late final Index idxPersonOwnerId = Index( - 'idx_person_owner_id', - 'CREATE INDEX IF NOT EXISTS idx_person_owner_id ON person_entity (owner_id)', - ); - late final Index idxAssetFacePersonId = Index( - 'idx_asset_face_person_id', - 'CREATE INDEX IF NOT EXISTS idx_asset_face_person_id ON asset_face_entity (person_id)', - ); - late final Index idxAssetFaceAssetId = Index( - 'idx_asset_face_asset_id', - 'CREATE INDEX IF NOT EXISTS idx_asset_face_asset_id ON asset_face_entity (asset_id)', - ); - 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)', - ); - late final Index idxAssetEditAssetId = Index( - 'idx_asset_edit_asset_id', - 'CREATE INDEX IF NOT EXISTS idx_asset_edit_asset_id ON asset_edit_entity (asset_id)', - ); - @override - Iterable> get allTables => - allSchemaEntities.whereType>(); - @override - List get allSchemaEntities => [ - userEntity, - remoteAssetEntity, - stackEntity, - localAssetEntity, - remoteAlbumEntity, - localAlbumEntity, - localAlbumAssetEntity, - idxLocalAlbumAssetAlbumAsset, - idxRemoteAlbumOwnerId, - idxLocalAssetChecksum, - idxLocalAssetCloudId, - idxStackPrimaryAssetId, - idxRemoteAssetOwnerChecksum, - uQRemoteAssetsOwnerChecksum, - uQRemoteAssetsOwnerLibraryChecksum, - idxRemoteAssetChecksum, - idxRemoteAssetStackId, - idxRemoteAssetLocalDateTimeDay, - idxRemoteAssetLocalDateTimeMonth, - authUserEntity, - userMetadataEntity, - partnerEntity, - remoteExifEntity, - remoteAlbumAssetEntity, - remoteAlbumUserEntity, - remoteAssetCloudIdEntity, - memoryEntity, - memoryAssetEntity, - personEntity, - assetFaceEntity, - storeEntity, - trashedLocalAssetEntity, - assetEditEntity, - idxPartnerSharedWithId, - idxLatLng, - idxRemoteAlbumAssetAlbumAsset, - idxRemoteAssetCloudId, - idxPersonOwnerId, - idxAssetFacePersonId, - idxAssetFaceAssetId, - idxTrashedLocalAssetChecksum, - idxTrashedLocalAssetAlbum, - idxAssetEditAssetId, - ]; - @override - int get schemaVersion => 22; - @override - DriftDatabaseOptions get options => - const DriftDatabaseOptions(storeDateTimeAsText: true); -} diff --git a/mobile/test/drift/main/generated/schema_v23.dart b/mobile/test/drift/main/generated/schema_v23.dart deleted file mode 100644 index 35402af876..0000000000 --- a/mobile/test/drift/main/generated/schema_v23.dart +++ /dev/null @@ -1,9179 +0,0 @@ -// dart format width=80 -import 'dart:typed_data' as i2; -// GENERATED BY drift_dev, DO NOT MODIFY. -// ignore_for_file: type=lint,unused_import -// -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, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn email = GeneratedColumn( - 'email', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn hasProfileImage = GeneratedColumn( - 'has_profile_image', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: - 'NOT NULL DEFAULT 0 CHECK (has_profile_image IN (0, 1))', - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn profileChangedAt = GeneratedColumn( - 'profile_changed_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn avatarColor = GeneratedColumn( - 'avatar_color', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0', - 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.int, - data['${effectivePrefix}has_profile_image'], - )!, - profileChangedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - 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; - @override - List get customConstraints => const ['PRIMARY KEY(id)']; - @override - bool get dontWriteConstraints => true; -} - -class UserEntityData extends DataClass implements Insertable { - final String id; - final String name; - final String email; - final int hasProfileImage; - final String 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, - int? hasProfileImage, - String? 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, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn type = GeneratedColumn( - 'type', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn width = GeneratedColumn( - 'width', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn height = GeneratedColumn( - 'height', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn durationMs = GeneratedColumn( - 'duration_ms', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn checksum = GeneratedColumn( - 'checksum', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn isFavorite = GeneratedColumn( - 'is_favorite', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0 CHECK (is_favorite IN (0, 1))', - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn ownerId = GeneratedColumn( - 'owner_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL REFERENCES user_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn localDateTime = GeneratedColumn( - 'local_date_time', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn thumbHash = GeneratedColumn( - 'thumb_hash', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn deletedAt = GeneratedColumn( - 'deleted_at', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn livePhotoVideoId = GeneratedColumn( - 'live_photo_video_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn visibility = GeneratedColumn( - 'visibility', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn stackId = GeneratedColumn( - 'stack_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn libraryId = GeneratedColumn( - 'library_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn isEdited = GeneratedColumn( - 'is_edited', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0 CHECK (is_edited IN (0, 1))', - defaultValue: const CustomExpression('0'), - ); - @override - List get $columns => [ - name, - type, - createdAt, - updatedAt, - width, - height, - durationMs, - id, - checksum, - isFavorite, - ownerId, - localDateTime, - thumbHash, - deletedAt, - livePhotoVideoId, - visibility, - stackId, - libraryId, - isEdited, - ]; - @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.string, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}updated_at'], - )!, - width: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}width'], - ), - height: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}height'], - ), - durationMs: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}duration_ms'], - ), - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - checksum: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}checksum'], - )!, - isFavorite: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}is_favorite'], - )!, - ownerId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}owner_id'], - )!, - localDateTime: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}local_date_time'], - ), - thumbHash: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}thumb_hash'], - ), - deletedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - 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'], - ), - isEdited: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}is_edited'], - )!, - ); - } - - @override - RemoteAssetEntity createAlias(String alias) { - return RemoteAssetEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY(id)']; - @override - bool get dontWriteConstraints => true; -} - -class RemoteAssetEntityData extends DataClass - implements Insertable { - final String name; - final int type; - final String createdAt; - final String updatedAt; - final int? width; - final int? height; - final int? durationMs; - final String id; - final String checksum; - final int isFavorite; - final String ownerId; - final String? localDateTime; - final String? thumbHash; - final String? deletedAt; - final String? livePhotoVideoId; - final int visibility; - final String? stackId; - final String? libraryId; - final int isEdited; - const RemoteAssetEntityData({ - required this.name, - required this.type, - required this.createdAt, - required this.updatedAt, - this.width, - this.height, - this.durationMs, - 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, - required this.isEdited, - }); - @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 || durationMs != null) { - map['duration_ms'] = Variable(durationMs); - } - 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); - } - map['is_edited'] = Variable(isEdited); - 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']), - durationMs: serializer.fromJson(json['durationMs']), - 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']), - isEdited: serializer.fromJson(json['isEdited']), - ); - } - @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), - 'durationMs': serializer.toJson(durationMs), - '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), - 'isEdited': serializer.toJson(isEdited), - }; - } - - RemoteAssetEntityData copyWith({ - String? name, - int? type, - String? createdAt, - String? updatedAt, - Value width = const Value.absent(), - Value height = const Value.absent(), - Value durationMs = const Value.absent(), - String? id, - String? checksum, - int? 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(), - int? isEdited, - }) => 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, - durationMs: durationMs.present ? durationMs.value : this.durationMs, - 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, - isEdited: isEdited ?? this.isEdited, - ); - 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, - durationMs: data.durationMs.present - ? data.durationMs.value - : this.durationMs, - 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, - isEdited: data.isEdited.present ? data.isEdited.value : this.isEdited, - ); - } - - @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('durationMs: $durationMs, ') - ..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('isEdited: $isEdited') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - name, - type, - createdAt, - updatedAt, - width, - height, - durationMs, - id, - checksum, - isFavorite, - ownerId, - localDateTime, - thumbHash, - deletedAt, - livePhotoVideoId, - visibility, - stackId, - libraryId, - isEdited, - ); - @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.durationMs == this.durationMs && - 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 && - other.isEdited == this.isEdited); -} - -class RemoteAssetEntityCompanion - extends UpdateCompanion { - final Value name; - final Value type; - final Value createdAt; - final Value updatedAt; - final Value width; - final Value height; - final Value durationMs; - 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; - final Value isEdited; - 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.durationMs = 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(), - this.isEdited = 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.durationMs = 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(), - this.isEdited = 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? durationMs, - Expression? id, - Expression? checksum, - Expression? isFavorite, - Expression? ownerId, - Expression? localDateTime, - Expression? thumbHash, - Expression? deletedAt, - Expression? livePhotoVideoId, - Expression? visibility, - Expression? stackId, - Expression? libraryId, - Expression? isEdited, - }) { - 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 (durationMs != null) 'duration_ms': durationMs, - 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, - if (isEdited != null) 'is_edited': isEdited, - }); - } - - RemoteAssetEntityCompanion copyWith({ - Value? name, - Value? type, - Value? createdAt, - Value? updatedAt, - Value? width, - Value? height, - Value? durationMs, - Value? id, - Value? checksum, - Value? isFavorite, - Value? ownerId, - Value? localDateTime, - Value? thumbHash, - Value? deletedAt, - Value? livePhotoVideoId, - Value? visibility, - Value? stackId, - Value? libraryId, - Value? isEdited, - }) { - 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, - durationMs: durationMs ?? this.durationMs, - 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, - isEdited: isEdited ?? this.isEdited, - ); - } - - @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 (durationMs.present) { - map['duration_ms'] = Variable(durationMs.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); - } - if (isEdited.present) { - map['is_edited'] = Variable(isEdited.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('durationMs: $durationMs, ') - ..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('isEdited: $isEdited') - ..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, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn ownerId = GeneratedColumn( - 'owner_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL REFERENCES user_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn primaryAssetId = GeneratedColumn( - 'primary_asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - @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.string, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - 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; - @override - List get customConstraints => const ['PRIMARY KEY(id)']; - @override - bool get dontWriteConstraints => true; -} - -class StackEntityData extends DataClass implements Insertable { - final String id; - final String createdAt; - final String 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, - String? createdAt, - String? 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, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn type = GeneratedColumn( - 'type', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn width = GeneratedColumn( - 'width', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn height = GeneratedColumn( - 'height', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn durationMs = GeneratedColumn( - 'duration_ms', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn checksum = GeneratedColumn( - 'checksum', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn isFavorite = GeneratedColumn( - 'is_favorite', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0 CHECK (is_favorite IN (0, 1))', - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn orientation = GeneratedColumn( - 'orientation', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0', - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn iCloudId = GeneratedColumn( - 'i_cloud_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn adjustmentTime = GeneratedColumn( - 'adjustment_time', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn latitude = GeneratedColumn( - 'latitude', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn longitude = GeneratedColumn( - 'longitude', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn playbackStyle = GeneratedColumn( - 'playback_style', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0', - defaultValue: const CustomExpression('0'), - ); - @override - List get $columns => [ - name, - type, - createdAt, - updatedAt, - width, - height, - durationMs, - id, - checksum, - isFavorite, - orientation, - iCloudId, - adjustmentTime, - latitude, - longitude, - playbackStyle, - ]; - @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.string, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}updated_at'], - )!, - width: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}width'], - ), - height: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}height'], - ), - durationMs: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}duration_ms'], - ), - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - checksum: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}checksum'], - ), - isFavorite: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}is_favorite'], - )!, - orientation: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}orientation'], - )!, - iCloudId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}i_cloud_id'], - ), - adjustmentTime: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}adjustment_time'], - ), - latitude: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}latitude'], - ), - longitude: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}longitude'], - ), - playbackStyle: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}playback_style'], - )!, - ); - } - - @override - LocalAssetEntity createAlias(String alias) { - return LocalAssetEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY(id)']; - @override - bool get dontWriteConstraints => true; -} - -class LocalAssetEntityData extends DataClass - implements Insertable { - final String name; - final int type; - final String createdAt; - final String updatedAt; - final int? width; - final int? height; - final int? durationMs; - final String id; - final String? checksum; - final int isFavorite; - final int orientation; - final String? iCloudId; - final String? adjustmentTime; - final double? latitude; - final double? longitude; - final int playbackStyle; - const LocalAssetEntityData({ - required this.name, - required this.type, - required this.createdAt, - required this.updatedAt, - this.width, - this.height, - this.durationMs, - required this.id, - this.checksum, - required this.isFavorite, - required this.orientation, - this.iCloudId, - this.adjustmentTime, - this.latitude, - this.longitude, - required this.playbackStyle, - }); - @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 || durationMs != null) { - map['duration_ms'] = Variable(durationMs); - } - map['id'] = Variable(id); - if (!nullToAbsent || checksum != null) { - map['checksum'] = Variable(checksum); - } - map['is_favorite'] = Variable(isFavorite); - map['orientation'] = Variable(orientation); - if (!nullToAbsent || iCloudId != null) { - map['i_cloud_id'] = Variable(iCloudId); - } - if (!nullToAbsent || adjustmentTime != null) { - map['adjustment_time'] = Variable(adjustmentTime); - } - if (!nullToAbsent || latitude != null) { - map['latitude'] = Variable(latitude); - } - if (!nullToAbsent || longitude != null) { - map['longitude'] = Variable(longitude); - } - map['playback_style'] = Variable(playbackStyle); - 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']), - durationMs: serializer.fromJson(json['durationMs']), - id: serializer.fromJson(json['id']), - checksum: serializer.fromJson(json['checksum']), - isFavorite: serializer.fromJson(json['isFavorite']), - orientation: serializer.fromJson(json['orientation']), - iCloudId: serializer.fromJson(json['iCloudId']), - adjustmentTime: serializer.fromJson(json['adjustmentTime']), - latitude: serializer.fromJson(json['latitude']), - longitude: serializer.fromJson(json['longitude']), - playbackStyle: serializer.fromJson(json['playbackStyle']), - ); - } - @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), - 'durationMs': serializer.toJson(durationMs), - 'id': serializer.toJson(id), - 'checksum': serializer.toJson(checksum), - 'isFavorite': serializer.toJson(isFavorite), - 'orientation': serializer.toJson(orientation), - 'iCloudId': serializer.toJson(iCloudId), - 'adjustmentTime': serializer.toJson(adjustmentTime), - 'latitude': serializer.toJson(latitude), - 'longitude': serializer.toJson(longitude), - 'playbackStyle': serializer.toJson(playbackStyle), - }; - } - - LocalAssetEntityData copyWith({ - String? name, - int? type, - String? createdAt, - String? updatedAt, - Value width = const Value.absent(), - Value height = const Value.absent(), - Value durationMs = const Value.absent(), - String? id, - Value checksum = const Value.absent(), - int? isFavorite, - int? orientation, - Value iCloudId = const Value.absent(), - Value adjustmentTime = const Value.absent(), - Value latitude = const Value.absent(), - Value longitude = const Value.absent(), - int? playbackStyle, - }) => 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, - durationMs: durationMs.present ? durationMs.value : this.durationMs, - id: id ?? this.id, - checksum: checksum.present ? checksum.value : this.checksum, - isFavorite: isFavorite ?? this.isFavorite, - orientation: orientation ?? this.orientation, - iCloudId: iCloudId.present ? iCloudId.value : this.iCloudId, - adjustmentTime: adjustmentTime.present - ? adjustmentTime.value - : this.adjustmentTime, - latitude: latitude.present ? latitude.value : this.latitude, - longitude: longitude.present ? longitude.value : this.longitude, - playbackStyle: playbackStyle ?? this.playbackStyle, - ); - 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, - durationMs: data.durationMs.present - ? data.durationMs.value - : this.durationMs, - 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, - iCloudId: data.iCloudId.present ? data.iCloudId.value : this.iCloudId, - adjustmentTime: data.adjustmentTime.present - ? data.adjustmentTime.value - : this.adjustmentTime, - latitude: data.latitude.present ? data.latitude.value : this.latitude, - longitude: data.longitude.present ? data.longitude.value : this.longitude, - playbackStyle: data.playbackStyle.present - ? data.playbackStyle.value - : this.playbackStyle, - ); - } - - @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('durationMs: $durationMs, ') - ..write('id: $id, ') - ..write('checksum: $checksum, ') - ..write('isFavorite: $isFavorite, ') - ..write('orientation: $orientation, ') - ..write('iCloudId: $iCloudId, ') - ..write('adjustmentTime: $adjustmentTime, ') - ..write('latitude: $latitude, ') - ..write('longitude: $longitude, ') - ..write('playbackStyle: $playbackStyle') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - name, - type, - createdAt, - updatedAt, - width, - height, - durationMs, - id, - checksum, - isFavorite, - orientation, - iCloudId, - adjustmentTime, - latitude, - longitude, - playbackStyle, - ); - @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.durationMs == this.durationMs && - other.id == this.id && - other.checksum == this.checksum && - other.isFavorite == this.isFavorite && - other.orientation == this.orientation && - other.iCloudId == this.iCloudId && - other.adjustmentTime == this.adjustmentTime && - other.latitude == this.latitude && - other.longitude == this.longitude && - other.playbackStyle == this.playbackStyle); -} - -class LocalAssetEntityCompanion extends UpdateCompanion { - final Value name; - final Value type; - final Value createdAt; - final Value updatedAt; - final Value width; - final Value height; - final Value durationMs; - final Value id; - final Value checksum; - final Value isFavorite; - final Value orientation; - final Value iCloudId; - final Value adjustmentTime; - final Value latitude; - final Value longitude; - final Value playbackStyle; - 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.durationMs = const Value.absent(), - this.id = const Value.absent(), - this.checksum = const Value.absent(), - this.isFavorite = const Value.absent(), - this.orientation = const Value.absent(), - this.iCloudId = const Value.absent(), - this.adjustmentTime = const Value.absent(), - this.latitude = const Value.absent(), - this.longitude = const Value.absent(), - this.playbackStyle = 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.durationMs = const Value.absent(), - required String id, - this.checksum = const Value.absent(), - this.isFavorite = const Value.absent(), - this.orientation = const Value.absent(), - this.iCloudId = const Value.absent(), - this.adjustmentTime = const Value.absent(), - this.latitude = const Value.absent(), - this.longitude = const Value.absent(), - this.playbackStyle = 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? durationMs, - Expression? id, - Expression? checksum, - Expression? isFavorite, - Expression? orientation, - Expression? iCloudId, - Expression? adjustmentTime, - Expression? latitude, - Expression? longitude, - Expression? playbackStyle, - }) { - 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 (durationMs != null) 'duration_ms': durationMs, - if (id != null) 'id': id, - if (checksum != null) 'checksum': checksum, - if (isFavorite != null) 'is_favorite': isFavorite, - if (orientation != null) 'orientation': orientation, - if (iCloudId != null) 'i_cloud_id': iCloudId, - if (adjustmentTime != null) 'adjustment_time': adjustmentTime, - if (latitude != null) 'latitude': latitude, - if (longitude != null) 'longitude': longitude, - if (playbackStyle != null) 'playback_style': playbackStyle, - }); - } - - LocalAssetEntityCompanion copyWith({ - Value? name, - Value? type, - Value? createdAt, - Value? updatedAt, - Value? width, - Value? height, - Value? durationMs, - Value? id, - Value? checksum, - Value? isFavorite, - Value? orientation, - Value? iCloudId, - Value? adjustmentTime, - Value? latitude, - Value? longitude, - Value? playbackStyle, - }) { - 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, - durationMs: durationMs ?? this.durationMs, - id: id ?? this.id, - checksum: checksum ?? this.checksum, - isFavorite: isFavorite ?? this.isFavorite, - orientation: orientation ?? this.orientation, - iCloudId: iCloudId ?? this.iCloudId, - adjustmentTime: adjustmentTime ?? this.adjustmentTime, - latitude: latitude ?? this.latitude, - longitude: longitude ?? this.longitude, - playbackStyle: playbackStyle ?? this.playbackStyle, - ); - } - - @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 (durationMs.present) { - map['duration_ms'] = Variable(durationMs.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); - } - if (iCloudId.present) { - map['i_cloud_id'] = Variable(iCloudId.value); - } - if (adjustmentTime.present) { - map['adjustment_time'] = Variable(adjustmentTime.value); - } - if (latitude.present) { - map['latitude'] = Variable(latitude.value); - } - if (longitude.present) { - map['longitude'] = Variable(longitude.value); - } - if (playbackStyle.present) { - map['playback_style'] = Variable(playbackStyle.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('durationMs: $durationMs, ') - ..write('id: $id, ') - ..write('checksum: $checksum, ') - ..write('isFavorite: $isFavorite, ') - ..write('orientation: $orientation, ') - ..write('iCloudId: $iCloudId, ') - ..write('adjustmentTime: $adjustmentTime, ') - ..write('latitude: $latitude, ') - ..write('longitude: $longitude, ') - ..write('playbackStyle: $playbackStyle') - ..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, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn description = GeneratedColumn( - 'description', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT \'\'', - defaultValue: const CustomExpression('\'\''), - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn ownerId = GeneratedColumn( - 'owner_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL REFERENCES user_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn thumbnailAssetId = GeneratedColumn( - 'thumbnail_asset_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: - 'NULL REFERENCES remote_asset_entity(id)ON DELETE SET NULL', - ); - late final GeneratedColumn isActivityEnabled = GeneratedColumn( - 'is_activity_enabled', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: - 'NOT NULL DEFAULT 1 CHECK (is_activity_enabled IN (0, 1))', - defaultValue: const CustomExpression('1'), - ); - late final GeneratedColumn order = GeneratedColumn( - 'order', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - @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.string, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - 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.int, - 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; - @override - List get customConstraints => const ['PRIMARY KEY(id)']; - @override - bool get dontWriteConstraints => true; -} - -class RemoteAlbumEntityData extends DataClass - implements Insertable { - final String id; - final String name; - final String description; - final String createdAt; - final String updatedAt; - final String ownerId; - final String? thumbnailAssetId; - final int 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, - String? createdAt, - String? updatedAt, - String? ownerId, - Value thumbnailAssetId = const Value.absent(), - int? 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, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn backupSelection = GeneratedColumn( - 'backup_selection', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn isIosSharedAlbum = GeneratedColumn( - 'is_ios_shared_album', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: - 'NOT NULL DEFAULT 0 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, - $customConstraints: - 'NULL REFERENCES remote_album_entity(id)ON DELETE SET NULL', - ); - late final GeneratedColumn marker = GeneratedColumn( - 'marker', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL 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.string, - data['${effectivePrefix}updated_at'], - )!, - backupSelection: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}backup_selection'], - )!, - isIosSharedAlbum: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}is_ios_shared_album'], - )!, - linkedRemoteAlbumId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}linked_remote_album_id'], - ), - marker: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}marker'], - ), - ); - } - - @override - LocalAlbumEntity createAlias(String alias) { - return LocalAlbumEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY(id)']; - @override - bool get dontWriteConstraints => true; -} - -class LocalAlbumEntityData extends DataClass - implements Insertable { - final String id; - final String name; - final String updatedAt; - final int backupSelection; - final int isIosSharedAlbum; - final String? linkedRemoteAlbumId; - final int? 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, - String? updatedAt, - int? backupSelection, - int? 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, - $customConstraints: - 'NOT NULL REFERENCES local_asset_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn albumId = GeneratedColumn( - 'album_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: - 'NOT NULL REFERENCES local_album_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn marker = GeneratedColumn( - 'marker', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL 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.int, - data['${effectivePrefix}marker'], - ), - ); - } - - @override - LocalAlbumAssetEntity createAlias(String alias) { - return LocalAlbumAssetEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const [ - 'PRIMARY KEY(asset_id, album_id)', - ]; - @override - bool get dontWriteConstraints => true; -} - -class LocalAlbumAssetEntityData extends DataClass - implements Insertable { - final String assetId; - final String albumId; - final int? 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, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn email = GeneratedColumn( - 'email', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn isAdmin = GeneratedColumn( - 'is_admin', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0 CHECK (is_admin IN (0, 1))', - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn hasProfileImage = GeneratedColumn( - 'has_profile_image', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: - 'NOT NULL DEFAULT 0 CHECK (has_profile_image IN (0, 1))', - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn profileChangedAt = GeneratedColumn( - 'profile_changed_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn avatarColor = GeneratedColumn( - 'avatar_color', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn quotaSizeInBytes = GeneratedColumn( - 'quota_size_in_bytes', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0', - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn quotaUsageInBytes = GeneratedColumn( - 'quota_usage_in_bytes', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0', - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn pinCode = GeneratedColumn( - 'pin_code', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - @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.int, - data['${effectivePrefix}is_admin'], - )!, - hasProfileImage: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}has_profile_image'], - )!, - profileChangedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - 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; - @override - List get customConstraints => const ['PRIMARY KEY(id)']; - @override - bool get dontWriteConstraints => true; -} - -class AuthUserEntityData extends DataClass - implements Insertable { - final String id; - final String name; - final String email; - final int isAdmin; - final int hasProfileImage; - final String 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, - int? isAdmin, - int? hasProfileImage, - String? 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, - $customConstraints: 'NOT NULL REFERENCES user_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn key = GeneratedColumn( - 'key', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn value = - GeneratedColumn( - 'value', - aliasedName, - false, - type: DriftSqlType.blob, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - @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; - @override - List get customConstraints => const ['PRIMARY KEY(user_id, "key")']; - @override - bool get dontWriteConstraints => true; -} - -class UserMetadataEntityData extends DataClass - implements Insertable { - final String userId; - final int key; - final i2.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, - i2.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 i2.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, - $customConstraints: 'NOT NULL REFERENCES user_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn sharedWithId = GeneratedColumn( - 'shared_with_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL REFERENCES user_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn inTimeline = GeneratedColumn( - 'in_timeline', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0 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.int, - data['${effectivePrefix}in_timeline'], - )!, - ); - } - - @override - PartnerEntity createAlias(String alias) { - return PartnerEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const [ - 'PRIMARY KEY(shared_by_id, shared_with_id)', - ]; - @override - bool get dontWriteConstraints => true; -} - -class PartnerEntityData extends DataClass - implements Insertable { - final String sharedById; - final String sharedWithId; - final int 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, - int? 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, - $customConstraints: - 'NOT NULL REFERENCES remote_asset_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn city = GeneratedColumn( - 'city', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn state = GeneratedColumn( - 'state', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn country = GeneratedColumn( - 'country', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn dateTimeOriginal = GeneratedColumn( - 'date_time_original', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn description = GeneratedColumn( - 'description', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn height = GeneratedColumn( - 'height', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn width = GeneratedColumn( - 'width', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn exposureTime = GeneratedColumn( - 'exposure_time', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn fNumber = GeneratedColumn( - 'f_number', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn fileSize = GeneratedColumn( - 'file_size', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn focalLength = GeneratedColumn( - 'focal_length', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn latitude = GeneratedColumn( - 'latitude', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn longitude = GeneratedColumn( - 'longitude', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn iso = GeneratedColumn( - 'iso', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn make = GeneratedColumn( - 'make', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn model = GeneratedColumn( - 'model', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn lens = GeneratedColumn( - 'lens', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn orientation = GeneratedColumn( - 'orientation', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn timeZone = GeneratedColumn( - 'time_zone', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn rating = GeneratedColumn( - 'rating', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn projectionType = GeneratedColumn( - 'projection_type', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - @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.string, - 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; - @override - List get customConstraints => const ['PRIMARY KEY(asset_id)']; - @override - bool get dontWriteConstraints => true; -} - -class RemoteExifEntityData extends DataClass - implements Insertable { - final String assetId; - final String? city; - final String? state; - final String? country; - final String? 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, - $customConstraints: - 'NOT NULL REFERENCES remote_asset_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn albumId = GeneratedColumn( - 'album_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: - 'NOT NULL 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; - @override - List get customConstraints => const [ - 'PRIMARY KEY(asset_id, album_id)', - ]; - @override - bool get dontWriteConstraints => 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, - $customConstraints: - 'NOT NULL REFERENCES remote_album_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn userId = GeneratedColumn( - 'user_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL REFERENCES user_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn role = GeneratedColumn( - 'role', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - @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; - @override - List get customConstraints => const [ - 'PRIMARY KEY(album_id, user_id)', - ]; - @override - bool get dontWriteConstraints => 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 RemoteAssetCloudIdEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - RemoteAssetCloudIdEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn assetId = GeneratedColumn( - 'asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: - 'NOT NULL REFERENCES remote_asset_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn cloudId = GeneratedColumn( - 'cloud_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn adjustmentTime = GeneratedColumn( - 'adjustment_time', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn latitude = GeneratedColumn( - 'latitude', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn longitude = GeneratedColumn( - 'longitude', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - @override - List get $columns => [ - assetId, - cloudId, - createdAt, - adjustmentTime, - latitude, - longitude, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'remote_asset_cloud_id_entity'; - @override - Set get $primaryKey => {assetId}; - @override - RemoteAssetCloudIdEntityData map( - Map data, { - String? tablePrefix, - }) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return RemoteAssetCloudIdEntityData( - assetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}asset_id'], - )!, - cloudId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}cloud_id'], - ), - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}created_at'], - ), - adjustmentTime: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}adjustment_time'], - ), - latitude: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}latitude'], - ), - longitude: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}longitude'], - ), - ); - } - - @override - RemoteAssetCloudIdEntity createAlias(String alias) { - return RemoteAssetCloudIdEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY(asset_id)']; - @override - bool get dontWriteConstraints => true; -} - -class RemoteAssetCloudIdEntityData extends DataClass - implements Insertable { - final String assetId; - final String? cloudId; - final String? createdAt; - final String? adjustmentTime; - final double? latitude; - final double? longitude; - const RemoteAssetCloudIdEntityData({ - required this.assetId, - this.cloudId, - this.createdAt, - this.adjustmentTime, - this.latitude, - this.longitude, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['asset_id'] = Variable(assetId); - if (!nullToAbsent || cloudId != null) { - map['cloud_id'] = Variable(cloudId); - } - if (!nullToAbsent || createdAt != null) { - map['created_at'] = Variable(createdAt); - } - if (!nullToAbsent || adjustmentTime != null) { - map['adjustment_time'] = Variable(adjustmentTime); - } - if (!nullToAbsent || latitude != null) { - map['latitude'] = Variable(latitude); - } - if (!nullToAbsent || longitude != null) { - map['longitude'] = Variable(longitude); - } - return map; - } - - factory RemoteAssetCloudIdEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return RemoteAssetCloudIdEntityData( - assetId: serializer.fromJson(json['assetId']), - cloudId: serializer.fromJson(json['cloudId']), - createdAt: serializer.fromJson(json['createdAt']), - adjustmentTime: serializer.fromJson(json['adjustmentTime']), - latitude: serializer.fromJson(json['latitude']), - longitude: serializer.fromJson(json['longitude']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'assetId': serializer.toJson(assetId), - 'cloudId': serializer.toJson(cloudId), - 'createdAt': serializer.toJson(createdAt), - 'adjustmentTime': serializer.toJson(adjustmentTime), - 'latitude': serializer.toJson(latitude), - 'longitude': serializer.toJson(longitude), - }; - } - - RemoteAssetCloudIdEntityData copyWith({ - String? assetId, - Value cloudId = const Value.absent(), - Value createdAt = const Value.absent(), - Value adjustmentTime = const Value.absent(), - Value latitude = const Value.absent(), - Value longitude = const Value.absent(), - }) => RemoteAssetCloudIdEntityData( - assetId: assetId ?? this.assetId, - cloudId: cloudId.present ? cloudId.value : this.cloudId, - createdAt: createdAt.present ? createdAt.value : this.createdAt, - adjustmentTime: adjustmentTime.present - ? adjustmentTime.value - : this.adjustmentTime, - latitude: latitude.present ? latitude.value : this.latitude, - longitude: longitude.present ? longitude.value : this.longitude, - ); - RemoteAssetCloudIdEntityData copyWithCompanion( - RemoteAssetCloudIdEntityCompanion data, - ) { - return RemoteAssetCloudIdEntityData( - assetId: data.assetId.present ? data.assetId.value : this.assetId, - cloudId: data.cloudId.present ? data.cloudId.value : this.cloudId, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - adjustmentTime: data.adjustmentTime.present - ? data.adjustmentTime.value - : this.adjustmentTime, - latitude: data.latitude.present ? data.latitude.value : this.latitude, - longitude: data.longitude.present ? data.longitude.value : this.longitude, - ); - } - - @override - String toString() { - return (StringBuffer('RemoteAssetCloudIdEntityData(') - ..write('assetId: $assetId, ') - ..write('cloudId: $cloudId, ') - ..write('createdAt: $createdAt, ') - ..write('adjustmentTime: $adjustmentTime, ') - ..write('latitude: $latitude, ') - ..write('longitude: $longitude') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - assetId, - cloudId, - createdAt, - adjustmentTime, - latitude, - longitude, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is RemoteAssetCloudIdEntityData && - other.assetId == this.assetId && - other.cloudId == this.cloudId && - other.createdAt == this.createdAt && - other.adjustmentTime == this.adjustmentTime && - other.latitude == this.latitude && - other.longitude == this.longitude); -} - -class RemoteAssetCloudIdEntityCompanion - extends UpdateCompanion { - final Value assetId; - final Value cloudId; - final Value createdAt; - final Value adjustmentTime; - final Value latitude; - final Value longitude; - const RemoteAssetCloudIdEntityCompanion({ - this.assetId = const Value.absent(), - this.cloudId = const Value.absent(), - this.createdAt = const Value.absent(), - this.adjustmentTime = const Value.absent(), - this.latitude = const Value.absent(), - this.longitude = const Value.absent(), - }); - RemoteAssetCloudIdEntityCompanion.insert({ - required String assetId, - this.cloudId = const Value.absent(), - this.createdAt = const Value.absent(), - this.adjustmentTime = const Value.absent(), - this.latitude = const Value.absent(), - this.longitude = const Value.absent(), - }) : assetId = Value(assetId); - static Insertable custom({ - Expression? assetId, - Expression? cloudId, - Expression? createdAt, - Expression? adjustmentTime, - Expression? latitude, - Expression? longitude, - }) { - return RawValuesInsertable({ - if (assetId != null) 'asset_id': assetId, - if (cloudId != null) 'cloud_id': cloudId, - if (createdAt != null) 'created_at': createdAt, - if (adjustmentTime != null) 'adjustment_time': adjustmentTime, - if (latitude != null) 'latitude': latitude, - if (longitude != null) 'longitude': longitude, - }); - } - - RemoteAssetCloudIdEntityCompanion copyWith({ - Value? assetId, - Value? cloudId, - Value? createdAt, - Value? adjustmentTime, - Value? latitude, - Value? longitude, - }) { - return RemoteAssetCloudIdEntityCompanion( - assetId: assetId ?? this.assetId, - cloudId: cloudId ?? this.cloudId, - createdAt: createdAt ?? this.createdAt, - adjustmentTime: adjustmentTime ?? this.adjustmentTime, - latitude: latitude ?? this.latitude, - longitude: longitude ?? this.longitude, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (assetId.present) { - map['asset_id'] = Variable(assetId.value); - } - if (cloudId.present) { - map['cloud_id'] = Variable(cloudId.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (adjustmentTime.present) { - map['adjustment_time'] = Variable(adjustmentTime.value); - } - if (latitude.present) { - map['latitude'] = Variable(latitude.value); - } - if (longitude.present) { - map['longitude'] = Variable(longitude.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('RemoteAssetCloudIdEntityCompanion(') - ..write('assetId: $assetId, ') - ..write('cloudId: $cloudId, ') - ..write('createdAt: $createdAt, ') - ..write('adjustmentTime: $adjustmentTime, ') - ..write('latitude: $latitude, ') - ..write('longitude: $longitude') - ..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, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn deletedAt = GeneratedColumn( - 'deleted_at', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn ownerId = GeneratedColumn( - 'owner_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL REFERENCES user_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn type = GeneratedColumn( - 'type', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn data = GeneratedColumn( - 'data', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn isSaved = GeneratedColumn( - 'is_saved', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0 CHECK (is_saved IN (0, 1))', - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn memoryAt = GeneratedColumn( - 'memory_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn seenAt = GeneratedColumn( - 'seen_at', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn showAt = GeneratedColumn( - 'show_at', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn hideAt = GeneratedColumn( - 'hide_at', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - @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.string, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}updated_at'], - )!, - deletedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - 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.int, - data['${effectivePrefix}is_saved'], - )!, - memoryAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}memory_at'], - )!, - seenAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}seen_at'], - ), - showAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}show_at'], - ), - hideAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}hide_at'], - ), - ); - } - - @override - MemoryEntity createAlias(String alias) { - return MemoryEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY(id)']; - @override - bool get dontWriteConstraints => true; -} - -class MemoryEntityData extends DataClass - implements Insertable { - final String id; - final String createdAt; - final String updatedAt; - final String? deletedAt; - final String ownerId; - final int type; - final String data; - final int isSaved; - final String memoryAt; - final String? seenAt; - final String? showAt; - final String? 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, - String? createdAt, - String? updatedAt, - Value deletedAt = const Value.absent(), - String? ownerId, - int? type, - String? data, - int? isSaved, - String? 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 String 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, - $customConstraints: - 'NOT NULL REFERENCES remote_asset_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn memoryId = GeneratedColumn( - 'memory_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: - 'NOT NULL 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; - @override - List get customConstraints => const [ - 'PRIMARY KEY(asset_id, memory_id)', - ]; - @override - bool get dontWriteConstraints => 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, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn ownerId = GeneratedColumn( - 'owner_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL REFERENCES user_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn faceAssetId = GeneratedColumn( - 'face_asset_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn isFavorite = GeneratedColumn( - 'is_favorite', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL CHECK (is_favorite IN (0, 1))', - ); - late final GeneratedColumn isHidden = GeneratedColumn( - 'is_hidden', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL CHECK (is_hidden IN (0, 1))', - ); - late final GeneratedColumn color = GeneratedColumn( - 'color', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn birthDate = GeneratedColumn( - 'birth_date', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - @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.string, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - 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.int, - data['${effectivePrefix}is_favorite'], - )!, - isHidden: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}is_hidden'], - )!, - color: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}color'], - ), - birthDate: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}birth_date'], - ), - ); - } - - @override - PersonEntity createAlias(String alias) { - return PersonEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY(id)']; - @override - bool get dontWriteConstraints => true; -} - -class PersonEntityData extends DataClass - implements Insertable { - final String id; - final String createdAt; - final String updatedAt; - final String ownerId; - final String name; - final String? faceAssetId; - final int isFavorite; - final int isHidden; - final String? color; - final String? 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, - String? createdAt, - String? updatedAt, - String? ownerId, - String? name, - Value faceAssetId = const Value.absent(), - int? isFavorite, - int? 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 int isFavorite, - required int 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, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn assetId = GeneratedColumn( - 'asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: - 'NOT NULL REFERENCES remote_asset_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn personId = GeneratedColumn( - 'person_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL REFERENCES person_entity(id)ON DELETE SET NULL', - ); - late final GeneratedColumn imageWidth = GeneratedColumn( - 'image_width', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn imageHeight = GeneratedColumn( - 'image_height', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn boundingBoxX1 = GeneratedColumn( - 'bounding_box_x1', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn boundingBoxY1 = GeneratedColumn( - 'bounding_box_y1', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn boundingBoxX2 = GeneratedColumn( - 'bounding_box_x2', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn boundingBoxY2 = GeneratedColumn( - 'bounding_box_y2', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn sourceType = GeneratedColumn( - 'source_type', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn isVisible = GeneratedColumn( - 'is_visible', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 1 CHECK (is_visible IN (0, 1))', - defaultValue: const CustomExpression('1'), - ); - late final GeneratedColumn deletedAt = GeneratedColumn( - 'deleted_at', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - @override - List get $columns => [ - id, - assetId, - personId, - imageWidth, - imageHeight, - boundingBoxX1, - boundingBoxY1, - boundingBoxX2, - boundingBoxY2, - sourceType, - isVisible, - deletedAt, - ]; - @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'], - )!, - isVisible: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}is_visible'], - )!, - deletedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}deleted_at'], - ), - ); - } - - @override - AssetFaceEntity createAlias(String alias) { - return AssetFaceEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY(id)']; - @override - bool get dontWriteConstraints => 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; - final int isVisible; - final String? deletedAt; - 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, - required this.isVisible, - this.deletedAt, - }); - @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); - map['is_visible'] = Variable(isVisible); - if (!nullToAbsent || deletedAt != null) { - map['deleted_at'] = Variable(deletedAt); - } - 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']), - isVisible: serializer.fromJson(json['isVisible']), - deletedAt: serializer.fromJson(json['deletedAt']), - ); - } - @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), - 'isVisible': serializer.toJson(isVisible), - 'deletedAt': serializer.toJson(deletedAt), - }; - } - - 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, - int? isVisible, - Value deletedAt = const Value.absent(), - }) => 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, - isVisible: isVisible ?? this.isVisible, - deletedAt: deletedAt.present ? deletedAt.value : this.deletedAt, - ); - 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, - isVisible: data.isVisible.present ? data.isVisible.value : this.isVisible, - deletedAt: data.deletedAt.present ? data.deletedAt.value : this.deletedAt, - ); - } - - @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('isVisible: $isVisible, ') - ..write('deletedAt: $deletedAt') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - assetId, - personId, - imageWidth, - imageHeight, - boundingBoxX1, - boundingBoxY1, - boundingBoxX2, - boundingBoxY2, - sourceType, - isVisible, - deletedAt, - ); - @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 && - other.isVisible == this.isVisible && - other.deletedAt == this.deletedAt); -} - -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; - final Value isVisible; - final Value deletedAt; - 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(), - this.isVisible = const Value.absent(), - this.deletedAt = 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, - this.isVisible = const Value.absent(), - this.deletedAt = const Value.absent(), - }) : 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, - Expression? isVisible, - Expression? deletedAt, - }) { - 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, - if (isVisible != null) 'is_visible': isVisible, - if (deletedAt != null) 'deleted_at': deletedAt, - }); - } - - AssetFaceEntityCompanion copyWith({ - Value? id, - Value? assetId, - Value? personId, - Value? imageWidth, - Value? imageHeight, - Value? boundingBoxX1, - Value? boundingBoxY1, - Value? boundingBoxX2, - Value? boundingBoxY2, - Value? sourceType, - Value? isVisible, - Value? deletedAt, - }) { - 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, - isVisible: isVisible ?? this.isVisible, - deletedAt: deletedAt ?? this.deletedAt, - ); - } - - @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); - } - if (isVisible.present) { - map['is_visible'] = Variable(isVisible.value); - } - if (deletedAt.present) { - map['deleted_at'] = Variable(deletedAt.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('isVisible: $isVisible, ') - ..write('deletedAt: $deletedAt') - ..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, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn stringValue = GeneratedColumn( - 'string_value', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn intValue = GeneratedColumn( - 'int_value', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - @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; - @override - List get customConstraints => const ['PRIMARY KEY(id)']; - @override - bool get dontWriteConstraints => 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, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn type = GeneratedColumn( - 'type', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn width = GeneratedColumn( - 'width', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn height = GeneratedColumn( - 'height', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn durationMs = GeneratedColumn( - 'duration_ms', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn albumId = GeneratedColumn( - 'album_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn checksum = GeneratedColumn( - 'checksum', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn isFavorite = GeneratedColumn( - 'is_favorite', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0 CHECK (is_favorite IN (0, 1))', - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn orientation = GeneratedColumn( - 'orientation', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0', - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn source = GeneratedColumn( - 'source', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn playbackStyle = GeneratedColumn( - 'playback_style', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0', - defaultValue: const CustomExpression('0'), - ); - @override - List get $columns => [ - name, - type, - createdAt, - updatedAt, - width, - height, - durationMs, - id, - albumId, - checksum, - isFavorite, - orientation, - source, - playbackStyle, - ]; - @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.string, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}updated_at'], - )!, - width: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}width'], - ), - height: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}height'], - ), - durationMs: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}duration_ms'], - ), - 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.int, - data['${effectivePrefix}is_favorite'], - )!, - orientation: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}orientation'], - )!, - source: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}source'], - )!, - playbackStyle: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}playback_style'], - )!, - ); - } - - @override - TrashedLocalAssetEntity createAlias(String alias) { - return TrashedLocalAssetEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY(id, album_id)']; - @override - bool get dontWriteConstraints => true; -} - -class TrashedLocalAssetEntityData extends DataClass - implements Insertable { - final String name; - final int type; - final String createdAt; - final String updatedAt; - final int? width; - final int? height; - final int? durationMs; - final String id; - final String albumId; - final String? checksum; - final int isFavorite; - final int orientation; - final int source; - final int playbackStyle; - const TrashedLocalAssetEntityData({ - required this.name, - required this.type, - required this.createdAt, - required this.updatedAt, - this.width, - this.height, - this.durationMs, - required this.id, - required this.albumId, - this.checksum, - required this.isFavorite, - required this.orientation, - required this.source, - required this.playbackStyle, - }); - @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 || durationMs != null) { - map['duration_ms'] = Variable(durationMs); - } - 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); - map['source'] = Variable(source); - map['playback_style'] = Variable(playbackStyle); - 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']), - durationMs: serializer.fromJson(json['durationMs']), - 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']), - source: serializer.fromJson(json['source']), - playbackStyle: serializer.fromJson(json['playbackStyle']), - ); - } - @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), - 'durationMs': serializer.toJson(durationMs), - 'id': serializer.toJson(id), - 'albumId': serializer.toJson(albumId), - 'checksum': serializer.toJson(checksum), - 'isFavorite': serializer.toJson(isFavorite), - 'orientation': serializer.toJson(orientation), - 'source': serializer.toJson(source), - 'playbackStyle': serializer.toJson(playbackStyle), - }; - } - - TrashedLocalAssetEntityData copyWith({ - String? name, - int? type, - String? createdAt, - String? updatedAt, - Value width = const Value.absent(), - Value height = const Value.absent(), - Value durationMs = const Value.absent(), - String? id, - String? albumId, - Value checksum = const Value.absent(), - int? isFavorite, - int? orientation, - int? source, - int? playbackStyle, - }) => 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, - durationMs: durationMs.present ? durationMs.value : this.durationMs, - id: id ?? this.id, - albumId: albumId ?? this.albumId, - checksum: checksum.present ? checksum.value : this.checksum, - isFavorite: isFavorite ?? this.isFavorite, - orientation: orientation ?? this.orientation, - source: source ?? this.source, - playbackStyle: playbackStyle ?? this.playbackStyle, - ); - 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, - durationMs: data.durationMs.present - ? data.durationMs.value - : this.durationMs, - 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, - source: data.source.present ? data.source.value : this.source, - playbackStyle: data.playbackStyle.present - ? data.playbackStyle.value - : this.playbackStyle, - ); - } - - @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('durationMs: $durationMs, ') - ..write('id: $id, ') - ..write('albumId: $albumId, ') - ..write('checksum: $checksum, ') - ..write('isFavorite: $isFavorite, ') - ..write('orientation: $orientation, ') - ..write('source: $source, ') - ..write('playbackStyle: $playbackStyle') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - name, - type, - createdAt, - updatedAt, - width, - height, - durationMs, - id, - albumId, - checksum, - isFavorite, - orientation, - source, - playbackStyle, - ); - @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.durationMs == this.durationMs && - other.id == this.id && - other.albumId == this.albumId && - other.checksum == this.checksum && - other.isFavorite == this.isFavorite && - other.orientation == this.orientation && - other.source == this.source && - other.playbackStyle == this.playbackStyle); -} - -class TrashedLocalAssetEntityCompanion - extends UpdateCompanion { - final Value name; - final Value type; - final Value createdAt; - final Value updatedAt; - final Value width; - final Value height; - final Value durationMs; - final Value id; - final Value albumId; - final Value checksum; - final Value isFavorite; - final Value orientation; - final Value source; - final Value playbackStyle; - 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.durationMs = 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(), - this.source = const Value.absent(), - this.playbackStyle = 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.durationMs = const Value.absent(), - required String id, - required String albumId, - this.checksum = const Value.absent(), - this.isFavorite = const Value.absent(), - this.orientation = const Value.absent(), - required int source, - this.playbackStyle = const Value.absent(), - }) : name = Value(name), - type = Value(type), - id = Value(id), - albumId = Value(albumId), - source = Value(source); - static Insertable custom({ - Expression? name, - Expression? type, - Expression? createdAt, - Expression? updatedAt, - Expression? width, - Expression? height, - Expression? durationMs, - Expression? id, - Expression? albumId, - Expression? checksum, - Expression? isFavorite, - Expression? orientation, - Expression? source, - Expression? playbackStyle, - }) { - 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 (durationMs != null) 'duration_ms': durationMs, - 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, - if (source != null) 'source': source, - if (playbackStyle != null) 'playback_style': playbackStyle, - }); - } - - TrashedLocalAssetEntityCompanion copyWith({ - Value? name, - Value? type, - Value? createdAt, - Value? updatedAt, - Value? width, - Value? height, - Value? durationMs, - Value? id, - Value? albumId, - Value? checksum, - Value? isFavorite, - Value? orientation, - Value? source, - Value? playbackStyle, - }) { - 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, - durationMs: durationMs ?? this.durationMs, - id: id ?? this.id, - albumId: albumId ?? this.albumId, - checksum: checksum ?? this.checksum, - isFavorite: isFavorite ?? this.isFavorite, - orientation: orientation ?? this.orientation, - source: source ?? this.source, - playbackStyle: playbackStyle ?? this.playbackStyle, - ); - } - - @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 (durationMs.present) { - map['duration_ms'] = Variable(durationMs.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); - } - if (source.present) { - map['source'] = Variable(source.value); - } - if (playbackStyle.present) { - map['playback_style'] = Variable(playbackStyle.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('durationMs: $durationMs, ') - ..write('id: $id, ') - ..write('albumId: $albumId, ') - ..write('checksum: $checksum, ') - ..write('isFavorite: $isFavorite, ') - ..write('orientation: $orientation, ') - ..write('source: $source, ') - ..write('playbackStyle: $playbackStyle') - ..write(')')) - .toString(); - } -} - -class AssetEditEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - AssetEditEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn assetId = GeneratedColumn( - 'asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: - 'NOT NULL REFERENCES remote_asset_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn action = GeneratedColumn( - 'action', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn parameters = - GeneratedColumn( - 'parameters', - aliasedName, - false, - type: DriftSqlType.blob, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn sequence = GeneratedColumn( - 'sequence', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - @override - List get $columns => [ - id, - assetId, - action, - parameters, - sequence, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'asset_edit_entity'; - @override - Set get $primaryKey => {id}; - @override - AssetEditEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return AssetEditEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - assetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}asset_id'], - )!, - action: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}action'], - )!, - parameters: attachedDatabase.typeMapping.read( - DriftSqlType.blob, - data['${effectivePrefix}parameters'], - )!, - sequence: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}sequence'], - )!, - ); - } - - @override - AssetEditEntity createAlias(String alias) { - return AssetEditEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY(id)']; - @override - bool get dontWriteConstraints => true; -} - -class AssetEditEntityData extends DataClass - implements Insertable { - final String id; - final String assetId; - final int action; - final i2.Uint8List parameters; - final int sequence; - const AssetEditEntityData({ - required this.id, - required this.assetId, - required this.action, - required this.parameters, - required this.sequence, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['asset_id'] = Variable(assetId); - map['action'] = Variable(action); - map['parameters'] = Variable(parameters); - map['sequence'] = Variable(sequence); - return map; - } - - factory AssetEditEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return AssetEditEntityData( - id: serializer.fromJson(json['id']), - assetId: serializer.fromJson(json['assetId']), - action: serializer.fromJson(json['action']), - parameters: serializer.fromJson(json['parameters']), - sequence: serializer.fromJson(json['sequence']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'assetId': serializer.toJson(assetId), - 'action': serializer.toJson(action), - 'parameters': serializer.toJson(parameters), - 'sequence': serializer.toJson(sequence), - }; - } - - AssetEditEntityData copyWith({ - String? id, - String? assetId, - int? action, - i2.Uint8List? parameters, - int? sequence, - }) => AssetEditEntityData( - id: id ?? this.id, - assetId: assetId ?? this.assetId, - action: action ?? this.action, - parameters: parameters ?? this.parameters, - sequence: sequence ?? this.sequence, - ); - AssetEditEntityData copyWithCompanion(AssetEditEntityCompanion data) { - return AssetEditEntityData( - id: data.id.present ? data.id.value : this.id, - assetId: data.assetId.present ? data.assetId.value : this.assetId, - action: data.action.present ? data.action.value : this.action, - parameters: data.parameters.present - ? data.parameters.value - : this.parameters, - sequence: data.sequence.present ? data.sequence.value : this.sequence, - ); - } - - @override - String toString() { - return (StringBuffer('AssetEditEntityData(') - ..write('id: $id, ') - ..write('assetId: $assetId, ') - ..write('action: $action, ') - ..write('parameters: $parameters, ') - ..write('sequence: $sequence') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - assetId, - action, - $driftBlobEquality.hash(parameters), - sequence, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is AssetEditEntityData && - other.id == this.id && - other.assetId == this.assetId && - other.action == this.action && - $driftBlobEquality.equals(other.parameters, this.parameters) && - other.sequence == this.sequence); -} - -class AssetEditEntityCompanion extends UpdateCompanion { - final Value id; - final Value assetId; - final Value action; - final Value parameters; - final Value sequence; - const AssetEditEntityCompanion({ - this.id = const Value.absent(), - this.assetId = const Value.absent(), - this.action = const Value.absent(), - this.parameters = const Value.absent(), - this.sequence = const Value.absent(), - }); - AssetEditEntityCompanion.insert({ - required String id, - required String assetId, - required int action, - required i2.Uint8List parameters, - required int sequence, - }) : id = Value(id), - assetId = Value(assetId), - action = Value(action), - parameters = Value(parameters), - sequence = Value(sequence); - static Insertable custom({ - Expression? id, - Expression? assetId, - Expression? action, - Expression? parameters, - Expression? sequence, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (assetId != null) 'asset_id': assetId, - if (action != null) 'action': action, - if (parameters != null) 'parameters': parameters, - if (sequence != null) 'sequence': sequence, - }); - } - - AssetEditEntityCompanion copyWith({ - Value? id, - Value? assetId, - Value? action, - Value? parameters, - Value? sequence, - }) { - return AssetEditEntityCompanion( - id: id ?? this.id, - assetId: assetId ?? this.assetId, - action: action ?? this.action, - parameters: parameters ?? this.parameters, - sequence: sequence ?? this.sequence, - ); - } - - @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 (action.present) { - map['action'] = Variable(action.value); - } - if (parameters.present) { - map['parameters'] = Variable(parameters.value); - } - if (sequence.present) { - map['sequence'] = Variable(sequence.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('AssetEditEntityCompanion(') - ..write('id: $id, ') - ..write('assetId: $assetId, ') - ..write('action: $action, ') - ..write('parameters: $parameters, ') - ..write('sequence: $sequence') - ..write(')')) - .toString(); - } -} - -class DatabaseAtV23 extends GeneratedDatabase { - DatabaseAtV23(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 idxLocalAlbumAssetAlbumAsset = Index( - 'idx_local_album_asset_album_asset', - 'CREATE INDEX IF NOT EXISTS idx_local_album_asset_album_asset ON local_album_asset_entity (album_id, asset_id)', - ); - late final Index idxRemoteAlbumOwnerId = Index( - 'idx_remote_album_owner_id', - 'CREATE INDEX IF NOT EXISTS idx_remote_album_owner_id ON remote_album_entity (owner_id)', - ); - 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 idxLocalAssetCloudId = Index( - 'idx_local_asset_cloud_id', - 'CREATE INDEX IF NOT EXISTS idx_local_asset_cloud_id ON local_asset_entity (i_cloud_id)', - ); - late final Index idxStackPrimaryAssetId = Index( - 'idx_stack_primary_asset_id', - 'CREATE INDEX IF NOT EXISTS idx_stack_primary_asset_id ON stack_entity (primary_asset_id)', - ); - 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 Index idxRemoteAssetStackId = Index( - 'idx_remote_asset_stack_id', - 'CREATE INDEX IF NOT EXISTS idx_remote_asset_stack_id ON remote_asset_entity (stack_id)', - ); - late final Index idxRemoteAssetLocalDateTimeDay = Index( - 'idx_remote_asset_local_date_time_day', - 'CREATE INDEX IF NOT EXISTS idx_remote_asset_local_date_time_day ON remote_asset_entity (STRFTIME(\'%Y-%m-%d\', local_date_time))', - ); - late final Index idxRemoteAssetLocalDateTimeMonth = Index( - 'idx_remote_asset_local_date_time_month', - 'CREATE INDEX IF NOT EXISTS idx_remote_asset_local_date_time_month ON remote_asset_entity (STRFTIME(\'%Y-%m\', local_date_time))', - ); - 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 RemoteAssetCloudIdEntity remoteAssetCloudIdEntity = - RemoteAssetCloudIdEntity(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 AssetEditEntity assetEditEntity = AssetEditEntity(this); - late final Index idxPartnerSharedWithId = Index( - 'idx_partner_shared_with_id', - 'CREATE INDEX IF NOT EXISTS idx_partner_shared_with_id ON partner_entity (shared_with_id)', - ); - 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 idxRemoteAlbumAssetAlbumAsset = Index( - 'idx_remote_album_asset_album_asset', - 'CREATE INDEX IF NOT EXISTS idx_remote_album_asset_album_asset ON remote_album_asset_entity (album_id, asset_id)', - ); - late final Index idxRemoteAssetCloudId = Index( - 'idx_remote_asset_cloud_id', - 'CREATE INDEX IF NOT EXISTS idx_remote_asset_cloud_id ON remote_asset_cloud_id_entity (cloud_id)', - ); - late final Index idxPersonOwnerId = Index( - 'idx_person_owner_id', - 'CREATE INDEX IF NOT EXISTS idx_person_owner_id ON person_entity (owner_id)', - ); - late final Index idxAssetFacePersonId = Index( - 'idx_asset_face_person_id', - 'CREATE INDEX IF NOT EXISTS idx_asset_face_person_id ON asset_face_entity (person_id)', - ); - late final Index idxAssetFaceAssetId = Index( - 'idx_asset_face_asset_id', - 'CREATE INDEX IF NOT EXISTS idx_asset_face_asset_id ON asset_face_entity (asset_id)', - ); - 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)', - ); - late final Index idxAssetEditAssetId = Index( - 'idx_asset_edit_asset_id', - 'CREATE INDEX IF NOT EXISTS idx_asset_edit_asset_id ON asset_edit_entity (asset_id)', - ); - @override - Iterable> get allTables => - allSchemaEntities.whereType>(); - @override - List get allSchemaEntities => [ - userEntity, - remoteAssetEntity, - stackEntity, - localAssetEntity, - remoteAlbumEntity, - localAlbumEntity, - localAlbumAssetEntity, - idxLocalAlbumAssetAlbumAsset, - idxRemoteAlbumOwnerId, - idxLocalAssetChecksum, - idxLocalAssetCloudId, - idxStackPrimaryAssetId, - idxRemoteAssetOwnerChecksum, - uQRemoteAssetsOwnerChecksum, - uQRemoteAssetsOwnerLibraryChecksum, - idxRemoteAssetChecksum, - idxRemoteAssetStackId, - idxRemoteAssetLocalDateTimeDay, - idxRemoteAssetLocalDateTimeMonth, - authUserEntity, - userMetadataEntity, - partnerEntity, - remoteExifEntity, - remoteAlbumAssetEntity, - remoteAlbumUserEntity, - remoteAssetCloudIdEntity, - memoryEntity, - memoryAssetEntity, - personEntity, - assetFaceEntity, - storeEntity, - trashedLocalAssetEntity, - assetEditEntity, - idxPartnerSharedWithId, - idxLatLng, - idxRemoteAlbumAssetAlbumAsset, - idxRemoteAssetCloudId, - idxPersonOwnerId, - idxAssetFacePersonId, - idxAssetFaceAssetId, - idxTrashedLocalAssetChecksum, - idxTrashedLocalAssetAlbum, - idxAssetEditAssetId, - ]; - @override - StreamQueryUpdateRules get streamUpdateRules => const StreamQueryUpdateRules([ - WritePropagation( - on: TableUpdateQuery.onTableName( - 'user_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('remote_asset_entity', kind: UpdateKind.delete)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'user_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('stack_entity', kind: UpdateKind.delete)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'user_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('remote_album_entity', kind: UpdateKind.delete)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'remote_asset_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('remote_album_entity', kind: UpdateKind.update)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'remote_album_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('local_album_entity', kind: UpdateKind.update)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'local_asset_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [ - TableUpdate('local_album_asset_entity', kind: UpdateKind.delete), - ], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'local_album_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [ - TableUpdate('local_album_asset_entity', kind: UpdateKind.delete), - ], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'user_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('user_metadata_entity', kind: UpdateKind.delete)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'user_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('partner_entity', kind: UpdateKind.delete)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'user_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('partner_entity', kind: UpdateKind.delete)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'remote_asset_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('remote_exif_entity', kind: UpdateKind.delete)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'remote_asset_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [ - TableUpdate('remote_album_asset_entity', kind: UpdateKind.delete), - ], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'remote_album_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [ - TableUpdate('remote_album_asset_entity', kind: UpdateKind.delete), - ], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'remote_album_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [ - TableUpdate('remote_album_user_entity', kind: UpdateKind.delete), - ], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'user_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [ - TableUpdate('remote_album_user_entity', kind: UpdateKind.delete), - ], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'remote_asset_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [ - TableUpdate('remote_asset_cloud_id_entity', kind: UpdateKind.delete), - ], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'user_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('memory_entity', kind: UpdateKind.delete)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'remote_asset_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('memory_asset_entity', kind: UpdateKind.delete)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'memory_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('memory_asset_entity', kind: UpdateKind.delete)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'user_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('person_entity', kind: UpdateKind.delete)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'remote_asset_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('asset_face_entity', kind: UpdateKind.delete)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'person_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('asset_face_entity', kind: UpdateKind.update)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'remote_asset_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('asset_edit_entity', kind: UpdateKind.delete)], - ), - ]); - @override - int get schemaVersion => 23; - @override - DriftDatabaseOptions get options => - const DriftDatabaseOptions(storeDateTimeAsText: true); -} diff --git a/mobile/test/drift/main/generated/schema_v24.dart b/mobile/test/drift/main/generated/schema_v24.dart deleted file mode 100644 index 872731c31f..0000000000 --- a/mobile/test/drift/main/generated/schema_v24.dart +++ /dev/null @@ -1,9131 +0,0 @@ -// dart format width=80 -import 'dart:typed_data' as i2; -// GENERATED BY drift_dev, DO NOT MODIFY. -// ignore_for_file: type=lint,unused_import -// -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, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn email = GeneratedColumn( - 'email', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn hasProfileImage = GeneratedColumn( - 'has_profile_image', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: - 'NOT NULL DEFAULT 0 CHECK (has_profile_image IN (0, 1))', - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn profileChangedAt = GeneratedColumn( - 'profile_changed_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn avatarColor = GeneratedColumn( - 'avatar_color', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0', - 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.int, - data['${effectivePrefix}has_profile_image'], - )!, - profileChangedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - 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; - @override - List get customConstraints => const ['PRIMARY KEY(id)']; - @override - bool get dontWriteConstraints => true; -} - -class UserEntityData extends DataClass implements Insertable { - final String id; - final String name; - final String email; - final int hasProfileImage; - final String 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, - int? hasProfileImage, - String? 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, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn type = GeneratedColumn( - 'type', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn width = GeneratedColumn( - 'width', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn height = GeneratedColumn( - 'height', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn durationMs = GeneratedColumn( - 'duration_ms', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn checksum = GeneratedColumn( - 'checksum', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn isFavorite = GeneratedColumn( - 'is_favorite', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0 CHECK (is_favorite IN (0, 1))', - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn ownerId = GeneratedColumn( - 'owner_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL REFERENCES user_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn localDateTime = GeneratedColumn( - 'local_date_time', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn thumbHash = GeneratedColumn( - 'thumb_hash', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn deletedAt = GeneratedColumn( - 'deleted_at', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn livePhotoVideoId = GeneratedColumn( - 'live_photo_video_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn visibility = GeneratedColumn( - 'visibility', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn stackId = GeneratedColumn( - 'stack_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn libraryId = GeneratedColumn( - 'library_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn isEdited = GeneratedColumn( - 'is_edited', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0 CHECK (is_edited IN (0, 1))', - defaultValue: const CustomExpression('0'), - ); - @override - List get $columns => [ - name, - type, - createdAt, - updatedAt, - width, - height, - durationMs, - id, - checksum, - isFavorite, - ownerId, - localDateTime, - thumbHash, - deletedAt, - livePhotoVideoId, - visibility, - stackId, - libraryId, - isEdited, - ]; - @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.string, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}updated_at'], - )!, - width: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}width'], - ), - height: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}height'], - ), - durationMs: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}duration_ms'], - ), - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - checksum: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}checksum'], - )!, - isFavorite: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}is_favorite'], - )!, - ownerId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}owner_id'], - )!, - localDateTime: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}local_date_time'], - ), - thumbHash: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}thumb_hash'], - ), - deletedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - 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'], - ), - isEdited: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}is_edited'], - )!, - ); - } - - @override - RemoteAssetEntity createAlias(String alias) { - return RemoteAssetEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY(id)']; - @override - bool get dontWriteConstraints => true; -} - -class RemoteAssetEntityData extends DataClass - implements Insertable { - final String name; - final int type; - final String createdAt; - final String updatedAt; - final int? width; - final int? height; - final int? durationMs; - final String id; - final String checksum; - final int isFavorite; - final String ownerId; - final String? localDateTime; - final String? thumbHash; - final String? deletedAt; - final String? livePhotoVideoId; - final int visibility; - final String? stackId; - final String? libraryId; - final int isEdited; - const RemoteAssetEntityData({ - required this.name, - required this.type, - required this.createdAt, - required this.updatedAt, - this.width, - this.height, - this.durationMs, - 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, - required this.isEdited, - }); - @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 || durationMs != null) { - map['duration_ms'] = Variable(durationMs); - } - 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); - } - map['is_edited'] = Variable(isEdited); - 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']), - durationMs: serializer.fromJson(json['durationMs']), - 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']), - isEdited: serializer.fromJson(json['isEdited']), - ); - } - @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), - 'durationMs': serializer.toJson(durationMs), - '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), - 'isEdited': serializer.toJson(isEdited), - }; - } - - RemoteAssetEntityData copyWith({ - String? name, - int? type, - String? createdAt, - String? updatedAt, - Value width = const Value.absent(), - Value height = const Value.absent(), - Value durationMs = const Value.absent(), - String? id, - String? checksum, - int? 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(), - int? isEdited, - }) => 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, - durationMs: durationMs.present ? durationMs.value : this.durationMs, - 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, - isEdited: isEdited ?? this.isEdited, - ); - 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, - durationMs: data.durationMs.present - ? data.durationMs.value - : this.durationMs, - 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, - isEdited: data.isEdited.present ? data.isEdited.value : this.isEdited, - ); - } - - @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('durationMs: $durationMs, ') - ..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('isEdited: $isEdited') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - name, - type, - createdAt, - updatedAt, - width, - height, - durationMs, - id, - checksum, - isFavorite, - ownerId, - localDateTime, - thumbHash, - deletedAt, - livePhotoVideoId, - visibility, - stackId, - libraryId, - isEdited, - ); - @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.durationMs == this.durationMs && - 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 && - other.isEdited == this.isEdited); -} - -class RemoteAssetEntityCompanion - extends UpdateCompanion { - final Value name; - final Value type; - final Value createdAt; - final Value updatedAt; - final Value width; - final Value height; - final Value durationMs; - 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; - final Value isEdited; - 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.durationMs = 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(), - this.isEdited = 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.durationMs = 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(), - this.isEdited = 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? durationMs, - Expression? id, - Expression? checksum, - Expression? isFavorite, - Expression? ownerId, - Expression? localDateTime, - Expression? thumbHash, - Expression? deletedAt, - Expression? livePhotoVideoId, - Expression? visibility, - Expression? stackId, - Expression? libraryId, - Expression? isEdited, - }) { - 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 (durationMs != null) 'duration_ms': durationMs, - 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, - if (isEdited != null) 'is_edited': isEdited, - }); - } - - RemoteAssetEntityCompanion copyWith({ - Value? name, - Value? type, - Value? createdAt, - Value? updatedAt, - Value? width, - Value? height, - Value? durationMs, - Value? id, - Value? checksum, - Value? isFavorite, - Value? ownerId, - Value? localDateTime, - Value? thumbHash, - Value? deletedAt, - Value? livePhotoVideoId, - Value? visibility, - Value? stackId, - Value? libraryId, - Value? isEdited, - }) { - 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, - durationMs: durationMs ?? this.durationMs, - 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, - isEdited: isEdited ?? this.isEdited, - ); - } - - @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 (durationMs.present) { - map['duration_ms'] = Variable(durationMs.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); - } - if (isEdited.present) { - map['is_edited'] = Variable(isEdited.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('durationMs: $durationMs, ') - ..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('isEdited: $isEdited') - ..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, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn ownerId = GeneratedColumn( - 'owner_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL REFERENCES user_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn primaryAssetId = GeneratedColumn( - 'primary_asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - @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.string, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - 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; - @override - List get customConstraints => const ['PRIMARY KEY(id)']; - @override - bool get dontWriteConstraints => true; -} - -class StackEntityData extends DataClass implements Insertable { - final String id; - final String createdAt; - final String 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, - String? createdAt, - String? 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, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn type = GeneratedColumn( - 'type', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn width = GeneratedColumn( - 'width', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn height = GeneratedColumn( - 'height', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn durationMs = GeneratedColumn( - 'duration_ms', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn checksum = GeneratedColumn( - 'checksum', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn isFavorite = GeneratedColumn( - 'is_favorite', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0 CHECK (is_favorite IN (0, 1))', - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn orientation = GeneratedColumn( - 'orientation', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0', - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn iCloudId = GeneratedColumn( - 'i_cloud_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn adjustmentTime = GeneratedColumn( - 'adjustment_time', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn latitude = GeneratedColumn( - 'latitude', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn longitude = GeneratedColumn( - 'longitude', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn playbackStyle = GeneratedColumn( - 'playback_style', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0', - defaultValue: const CustomExpression('0'), - ); - @override - List get $columns => [ - name, - type, - createdAt, - updatedAt, - width, - height, - durationMs, - id, - checksum, - isFavorite, - orientation, - iCloudId, - adjustmentTime, - latitude, - longitude, - playbackStyle, - ]; - @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.string, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}updated_at'], - )!, - width: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}width'], - ), - height: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}height'], - ), - durationMs: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}duration_ms'], - ), - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - checksum: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}checksum'], - ), - isFavorite: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}is_favorite'], - )!, - orientation: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}orientation'], - )!, - iCloudId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}i_cloud_id'], - ), - adjustmentTime: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}adjustment_time'], - ), - latitude: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}latitude'], - ), - longitude: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}longitude'], - ), - playbackStyle: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}playback_style'], - )!, - ); - } - - @override - LocalAssetEntity createAlias(String alias) { - return LocalAssetEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY(id)']; - @override - bool get dontWriteConstraints => true; -} - -class LocalAssetEntityData extends DataClass - implements Insertable { - final String name; - final int type; - final String createdAt; - final String updatedAt; - final int? width; - final int? height; - final int? durationMs; - final String id; - final String? checksum; - final int isFavorite; - final int orientation; - final String? iCloudId; - final String? adjustmentTime; - final double? latitude; - final double? longitude; - final int playbackStyle; - const LocalAssetEntityData({ - required this.name, - required this.type, - required this.createdAt, - required this.updatedAt, - this.width, - this.height, - this.durationMs, - required this.id, - this.checksum, - required this.isFavorite, - required this.orientation, - this.iCloudId, - this.adjustmentTime, - this.latitude, - this.longitude, - required this.playbackStyle, - }); - @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 || durationMs != null) { - map['duration_ms'] = Variable(durationMs); - } - map['id'] = Variable(id); - if (!nullToAbsent || checksum != null) { - map['checksum'] = Variable(checksum); - } - map['is_favorite'] = Variable(isFavorite); - map['orientation'] = Variable(orientation); - if (!nullToAbsent || iCloudId != null) { - map['i_cloud_id'] = Variable(iCloudId); - } - if (!nullToAbsent || adjustmentTime != null) { - map['adjustment_time'] = Variable(adjustmentTime); - } - if (!nullToAbsent || latitude != null) { - map['latitude'] = Variable(latitude); - } - if (!nullToAbsent || longitude != null) { - map['longitude'] = Variable(longitude); - } - map['playback_style'] = Variable(playbackStyle); - 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']), - durationMs: serializer.fromJson(json['durationMs']), - id: serializer.fromJson(json['id']), - checksum: serializer.fromJson(json['checksum']), - isFavorite: serializer.fromJson(json['isFavorite']), - orientation: serializer.fromJson(json['orientation']), - iCloudId: serializer.fromJson(json['iCloudId']), - adjustmentTime: serializer.fromJson(json['adjustmentTime']), - latitude: serializer.fromJson(json['latitude']), - longitude: serializer.fromJson(json['longitude']), - playbackStyle: serializer.fromJson(json['playbackStyle']), - ); - } - @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), - 'durationMs': serializer.toJson(durationMs), - 'id': serializer.toJson(id), - 'checksum': serializer.toJson(checksum), - 'isFavorite': serializer.toJson(isFavorite), - 'orientation': serializer.toJson(orientation), - 'iCloudId': serializer.toJson(iCloudId), - 'adjustmentTime': serializer.toJson(adjustmentTime), - 'latitude': serializer.toJson(latitude), - 'longitude': serializer.toJson(longitude), - 'playbackStyle': serializer.toJson(playbackStyle), - }; - } - - LocalAssetEntityData copyWith({ - String? name, - int? type, - String? createdAt, - String? updatedAt, - Value width = const Value.absent(), - Value height = const Value.absent(), - Value durationMs = const Value.absent(), - String? id, - Value checksum = const Value.absent(), - int? isFavorite, - int? orientation, - Value iCloudId = const Value.absent(), - Value adjustmentTime = const Value.absent(), - Value latitude = const Value.absent(), - Value longitude = const Value.absent(), - int? playbackStyle, - }) => 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, - durationMs: durationMs.present ? durationMs.value : this.durationMs, - id: id ?? this.id, - checksum: checksum.present ? checksum.value : this.checksum, - isFavorite: isFavorite ?? this.isFavorite, - orientation: orientation ?? this.orientation, - iCloudId: iCloudId.present ? iCloudId.value : this.iCloudId, - adjustmentTime: adjustmentTime.present - ? adjustmentTime.value - : this.adjustmentTime, - latitude: latitude.present ? latitude.value : this.latitude, - longitude: longitude.present ? longitude.value : this.longitude, - playbackStyle: playbackStyle ?? this.playbackStyle, - ); - 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, - durationMs: data.durationMs.present - ? data.durationMs.value - : this.durationMs, - 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, - iCloudId: data.iCloudId.present ? data.iCloudId.value : this.iCloudId, - adjustmentTime: data.adjustmentTime.present - ? data.adjustmentTime.value - : this.adjustmentTime, - latitude: data.latitude.present ? data.latitude.value : this.latitude, - longitude: data.longitude.present ? data.longitude.value : this.longitude, - playbackStyle: data.playbackStyle.present - ? data.playbackStyle.value - : this.playbackStyle, - ); - } - - @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('durationMs: $durationMs, ') - ..write('id: $id, ') - ..write('checksum: $checksum, ') - ..write('isFavorite: $isFavorite, ') - ..write('orientation: $orientation, ') - ..write('iCloudId: $iCloudId, ') - ..write('adjustmentTime: $adjustmentTime, ') - ..write('latitude: $latitude, ') - ..write('longitude: $longitude, ') - ..write('playbackStyle: $playbackStyle') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - name, - type, - createdAt, - updatedAt, - width, - height, - durationMs, - id, - checksum, - isFavorite, - orientation, - iCloudId, - adjustmentTime, - latitude, - longitude, - playbackStyle, - ); - @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.durationMs == this.durationMs && - other.id == this.id && - other.checksum == this.checksum && - other.isFavorite == this.isFavorite && - other.orientation == this.orientation && - other.iCloudId == this.iCloudId && - other.adjustmentTime == this.adjustmentTime && - other.latitude == this.latitude && - other.longitude == this.longitude && - other.playbackStyle == this.playbackStyle); -} - -class LocalAssetEntityCompanion extends UpdateCompanion { - final Value name; - final Value type; - final Value createdAt; - final Value updatedAt; - final Value width; - final Value height; - final Value durationMs; - final Value id; - final Value checksum; - final Value isFavorite; - final Value orientation; - final Value iCloudId; - final Value adjustmentTime; - final Value latitude; - final Value longitude; - final Value playbackStyle; - 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.durationMs = const Value.absent(), - this.id = const Value.absent(), - this.checksum = const Value.absent(), - this.isFavorite = const Value.absent(), - this.orientation = const Value.absent(), - this.iCloudId = const Value.absent(), - this.adjustmentTime = const Value.absent(), - this.latitude = const Value.absent(), - this.longitude = const Value.absent(), - this.playbackStyle = 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.durationMs = const Value.absent(), - required String id, - this.checksum = const Value.absent(), - this.isFavorite = const Value.absent(), - this.orientation = const Value.absent(), - this.iCloudId = const Value.absent(), - this.adjustmentTime = const Value.absent(), - this.latitude = const Value.absent(), - this.longitude = const Value.absent(), - this.playbackStyle = 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? durationMs, - Expression? id, - Expression? checksum, - Expression? isFavorite, - Expression? orientation, - Expression? iCloudId, - Expression? adjustmentTime, - Expression? latitude, - Expression? longitude, - Expression? playbackStyle, - }) { - 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 (durationMs != null) 'duration_ms': durationMs, - if (id != null) 'id': id, - if (checksum != null) 'checksum': checksum, - if (isFavorite != null) 'is_favorite': isFavorite, - if (orientation != null) 'orientation': orientation, - if (iCloudId != null) 'i_cloud_id': iCloudId, - if (adjustmentTime != null) 'adjustment_time': adjustmentTime, - if (latitude != null) 'latitude': latitude, - if (longitude != null) 'longitude': longitude, - if (playbackStyle != null) 'playback_style': playbackStyle, - }); - } - - LocalAssetEntityCompanion copyWith({ - Value? name, - Value? type, - Value? createdAt, - Value? updatedAt, - Value? width, - Value? height, - Value? durationMs, - Value? id, - Value? checksum, - Value? isFavorite, - Value? orientation, - Value? iCloudId, - Value? adjustmentTime, - Value? latitude, - Value? longitude, - Value? playbackStyle, - }) { - 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, - durationMs: durationMs ?? this.durationMs, - id: id ?? this.id, - checksum: checksum ?? this.checksum, - isFavorite: isFavorite ?? this.isFavorite, - orientation: orientation ?? this.orientation, - iCloudId: iCloudId ?? this.iCloudId, - adjustmentTime: adjustmentTime ?? this.adjustmentTime, - latitude: latitude ?? this.latitude, - longitude: longitude ?? this.longitude, - playbackStyle: playbackStyle ?? this.playbackStyle, - ); - } - - @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 (durationMs.present) { - map['duration_ms'] = Variable(durationMs.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); - } - if (iCloudId.present) { - map['i_cloud_id'] = Variable(iCloudId.value); - } - if (adjustmentTime.present) { - map['adjustment_time'] = Variable(adjustmentTime.value); - } - if (latitude.present) { - map['latitude'] = Variable(latitude.value); - } - if (longitude.present) { - map['longitude'] = Variable(longitude.value); - } - if (playbackStyle.present) { - map['playback_style'] = Variable(playbackStyle.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('durationMs: $durationMs, ') - ..write('id: $id, ') - ..write('checksum: $checksum, ') - ..write('isFavorite: $isFavorite, ') - ..write('orientation: $orientation, ') - ..write('iCloudId: $iCloudId, ') - ..write('adjustmentTime: $adjustmentTime, ') - ..write('latitude: $latitude, ') - ..write('longitude: $longitude, ') - ..write('playbackStyle: $playbackStyle') - ..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, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn description = GeneratedColumn( - 'description', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT \'\'', - defaultValue: const CustomExpression('\'\''), - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn thumbnailAssetId = GeneratedColumn( - 'thumbnail_asset_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: - 'NULL REFERENCES remote_asset_entity(id)ON DELETE SET NULL', - ); - late final GeneratedColumn isActivityEnabled = GeneratedColumn( - 'is_activity_enabled', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: - 'NOT NULL DEFAULT 1 CHECK (is_activity_enabled IN (0, 1))', - defaultValue: const CustomExpression('1'), - ); - late final GeneratedColumn order = GeneratedColumn( - 'order', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - @override - List get $columns => [ - id, - name, - description, - createdAt, - updatedAt, - 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.string, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}updated_at'], - )!, - thumbnailAssetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}thumbnail_asset_id'], - ), - isActivityEnabled: attachedDatabase.typeMapping.read( - DriftSqlType.int, - 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; - @override - List get customConstraints => const ['PRIMARY KEY(id)']; - @override - bool get dontWriteConstraints => true; -} - -class RemoteAlbumEntityData extends DataClass - implements Insertable { - final String id; - final String name; - final String description; - final String createdAt; - final String updatedAt; - final String? thumbnailAssetId; - final int isActivityEnabled; - final int order; - const RemoteAlbumEntityData({ - required this.id, - required this.name, - required this.description, - required this.createdAt, - required this.updatedAt, - 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); - 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']), - 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), - 'thumbnailAssetId': serializer.toJson(thumbnailAssetId), - 'isActivityEnabled': serializer.toJson(isActivityEnabled), - 'order': serializer.toJson(order), - }; - } - - RemoteAlbumEntityData copyWith({ - String? id, - String? name, - String? description, - String? createdAt, - String? updatedAt, - Value thumbnailAssetId = const Value.absent(), - int? isActivityEnabled, - int? order, - }) => RemoteAlbumEntityData( - id: id ?? this.id, - name: name ?? this.name, - description: description ?? this.description, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - 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, - 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('thumbnailAssetId: $thumbnailAssetId, ') - ..write('isActivityEnabled: $isActivityEnabled, ') - ..write('order: $order') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - name, - description, - createdAt, - updatedAt, - 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.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 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.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(), - this.thumbnailAssetId = const Value.absent(), - this.isActivityEnabled = const Value.absent(), - required int order, - }) : id = Value(id), - name = Value(name), - order = Value(order); - static Insertable custom({ - Expression? id, - Expression? name, - Expression? description, - Expression? createdAt, - Expression? updatedAt, - 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 (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? 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, - 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 (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('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, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn backupSelection = GeneratedColumn( - 'backup_selection', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn isIosSharedAlbum = GeneratedColumn( - 'is_ios_shared_album', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: - 'NOT NULL DEFAULT 0 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, - $customConstraints: - 'NULL REFERENCES remote_album_entity(id)ON DELETE SET NULL', - ); - late final GeneratedColumn marker = GeneratedColumn( - 'marker', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL 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.string, - data['${effectivePrefix}updated_at'], - )!, - backupSelection: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}backup_selection'], - )!, - isIosSharedAlbum: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}is_ios_shared_album'], - )!, - linkedRemoteAlbumId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}linked_remote_album_id'], - ), - marker: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}marker'], - ), - ); - } - - @override - LocalAlbumEntity createAlias(String alias) { - return LocalAlbumEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY(id)']; - @override - bool get dontWriteConstraints => true; -} - -class LocalAlbumEntityData extends DataClass - implements Insertable { - final String id; - final String name; - final String updatedAt; - final int backupSelection; - final int isIosSharedAlbum; - final String? linkedRemoteAlbumId; - final int? 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, - String? updatedAt, - int? backupSelection, - int? 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, - $customConstraints: - 'NOT NULL REFERENCES local_asset_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn albumId = GeneratedColumn( - 'album_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: - 'NOT NULL REFERENCES local_album_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn marker = GeneratedColumn( - 'marker', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL 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.int, - data['${effectivePrefix}marker'], - ), - ); - } - - @override - LocalAlbumAssetEntity createAlias(String alias) { - return LocalAlbumAssetEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const [ - 'PRIMARY KEY(asset_id, album_id)', - ]; - @override - bool get dontWriteConstraints => true; -} - -class LocalAlbumAssetEntityData extends DataClass - implements Insertable { - final String assetId; - final String albumId; - final int? 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, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn email = GeneratedColumn( - 'email', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn isAdmin = GeneratedColumn( - 'is_admin', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0 CHECK (is_admin IN (0, 1))', - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn hasProfileImage = GeneratedColumn( - 'has_profile_image', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: - 'NOT NULL DEFAULT 0 CHECK (has_profile_image IN (0, 1))', - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn profileChangedAt = GeneratedColumn( - 'profile_changed_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn avatarColor = GeneratedColumn( - 'avatar_color', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn quotaSizeInBytes = GeneratedColumn( - 'quota_size_in_bytes', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0', - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn quotaUsageInBytes = GeneratedColumn( - 'quota_usage_in_bytes', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0', - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn pinCode = GeneratedColumn( - 'pin_code', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - @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.int, - data['${effectivePrefix}is_admin'], - )!, - hasProfileImage: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}has_profile_image'], - )!, - profileChangedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - 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; - @override - List get customConstraints => const ['PRIMARY KEY(id)']; - @override - bool get dontWriteConstraints => true; -} - -class AuthUserEntityData extends DataClass - implements Insertable { - final String id; - final String name; - final String email; - final int isAdmin; - final int hasProfileImage; - final String 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, - int? isAdmin, - int? hasProfileImage, - String? 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, - $customConstraints: 'NOT NULL REFERENCES user_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn key = GeneratedColumn( - 'key', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn value = - GeneratedColumn( - 'value', - aliasedName, - false, - type: DriftSqlType.blob, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - @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; - @override - List get customConstraints => const ['PRIMARY KEY(user_id, "key")']; - @override - bool get dontWriteConstraints => true; -} - -class UserMetadataEntityData extends DataClass - implements Insertable { - final String userId; - final int key; - final i2.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, - i2.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 i2.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, - $customConstraints: 'NOT NULL REFERENCES user_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn sharedWithId = GeneratedColumn( - 'shared_with_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL REFERENCES user_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn inTimeline = GeneratedColumn( - 'in_timeline', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0 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.int, - data['${effectivePrefix}in_timeline'], - )!, - ); - } - - @override - PartnerEntity createAlias(String alias) { - return PartnerEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const [ - 'PRIMARY KEY(shared_by_id, shared_with_id)', - ]; - @override - bool get dontWriteConstraints => true; -} - -class PartnerEntityData extends DataClass - implements Insertable { - final String sharedById; - final String sharedWithId; - final int 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, - int? 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, - $customConstraints: - 'NOT NULL REFERENCES remote_asset_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn city = GeneratedColumn( - 'city', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn state = GeneratedColumn( - 'state', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn country = GeneratedColumn( - 'country', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn dateTimeOriginal = GeneratedColumn( - 'date_time_original', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn description = GeneratedColumn( - 'description', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn height = GeneratedColumn( - 'height', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn width = GeneratedColumn( - 'width', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn exposureTime = GeneratedColumn( - 'exposure_time', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn fNumber = GeneratedColumn( - 'f_number', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn fileSize = GeneratedColumn( - 'file_size', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn focalLength = GeneratedColumn( - 'focal_length', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn latitude = GeneratedColumn( - 'latitude', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn longitude = GeneratedColumn( - 'longitude', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn iso = GeneratedColumn( - 'iso', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn make = GeneratedColumn( - 'make', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn model = GeneratedColumn( - 'model', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn lens = GeneratedColumn( - 'lens', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn orientation = GeneratedColumn( - 'orientation', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn timeZone = GeneratedColumn( - 'time_zone', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn rating = GeneratedColumn( - 'rating', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn projectionType = GeneratedColumn( - 'projection_type', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - @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.string, - 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; - @override - List get customConstraints => const ['PRIMARY KEY(asset_id)']; - @override - bool get dontWriteConstraints => true; -} - -class RemoteExifEntityData extends DataClass - implements Insertable { - final String assetId; - final String? city; - final String? state; - final String? country; - final String? 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, - $customConstraints: - 'NOT NULL REFERENCES remote_asset_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn albumId = GeneratedColumn( - 'album_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: - 'NOT NULL 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; - @override - List get customConstraints => const [ - 'PRIMARY KEY(asset_id, album_id)', - ]; - @override - bool get dontWriteConstraints => 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, - $customConstraints: - 'NOT NULL REFERENCES remote_album_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn userId = GeneratedColumn( - 'user_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL REFERENCES user_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn role = GeneratedColumn( - 'role', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - @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; - @override - List get customConstraints => const [ - 'PRIMARY KEY(album_id, user_id)', - ]; - @override - bool get dontWriteConstraints => 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 RemoteAssetCloudIdEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - RemoteAssetCloudIdEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn assetId = GeneratedColumn( - 'asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: - 'NOT NULL REFERENCES remote_asset_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn cloudId = GeneratedColumn( - 'cloud_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn adjustmentTime = GeneratedColumn( - 'adjustment_time', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn latitude = GeneratedColumn( - 'latitude', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn longitude = GeneratedColumn( - 'longitude', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - @override - List get $columns => [ - assetId, - cloudId, - createdAt, - adjustmentTime, - latitude, - longitude, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'remote_asset_cloud_id_entity'; - @override - Set get $primaryKey => {assetId}; - @override - RemoteAssetCloudIdEntityData map( - Map data, { - String? tablePrefix, - }) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return RemoteAssetCloudIdEntityData( - assetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}asset_id'], - )!, - cloudId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}cloud_id'], - ), - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}created_at'], - ), - adjustmentTime: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}adjustment_time'], - ), - latitude: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}latitude'], - ), - longitude: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}longitude'], - ), - ); - } - - @override - RemoteAssetCloudIdEntity createAlias(String alias) { - return RemoteAssetCloudIdEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY(asset_id)']; - @override - bool get dontWriteConstraints => true; -} - -class RemoteAssetCloudIdEntityData extends DataClass - implements Insertable { - final String assetId; - final String? cloudId; - final String? createdAt; - final String? adjustmentTime; - final double? latitude; - final double? longitude; - const RemoteAssetCloudIdEntityData({ - required this.assetId, - this.cloudId, - this.createdAt, - this.adjustmentTime, - this.latitude, - this.longitude, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['asset_id'] = Variable(assetId); - if (!nullToAbsent || cloudId != null) { - map['cloud_id'] = Variable(cloudId); - } - if (!nullToAbsent || createdAt != null) { - map['created_at'] = Variable(createdAt); - } - if (!nullToAbsent || adjustmentTime != null) { - map['adjustment_time'] = Variable(adjustmentTime); - } - if (!nullToAbsent || latitude != null) { - map['latitude'] = Variable(latitude); - } - if (!nullToAbsent || longitude != null) { - map['longitude'] = Variable(longitude); - } - return map; - } - - factory RemoteAssetCloudIdEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return RemoteAssetCloudIdEntityData( - assetId: serializer.fromJson(json['assetId']), - cloudId: serializer.fromJson(json['cloudId']), - createdAt: serializer.fromJson(json['createdAt']), - adjustmentTime: serializer.fromJson(json['adjustmentTime']), - latitude: serializer.fromJson(json['latitude']), - longitude: serializer.fromJson(json['longitude']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'assetId': serializer.toJson(assetId), - 'cloudId': serializer.toJson(cloudId), - 'createdAt': serializer.toJson(createdAt), - 'adjustmentTime': serializer.toJson(adjustmentTime), - 'latitude': serializer.toJson(latitude), - 'longitude': serializer.toJson(longitude), - }; - } - - RemoteAssetCloudIdEntityData copyWith({ - String? assetId, - Value cloudId = const Value.absent(), - Value createdAt = const Value.absent(), - Value adjustmentTime = const Value.absent(), - Value latitude = const Value.absent(), - Value longitude = const Value.absent(), - }) => RemoteAssetCloudIdEntityData( - assetId: assetId ?? this.assetId, - cloudId: cloudId.present ? cloudId.value : this.cloudId, - createdAt: createdAt.present ? createdAt.value : this.createdAt, - adjustmentTime: adjustmentTime.present - ? adjustmentTime.value - : this.adjustmentTime, - latitude: latitude.present ? latitude.value : this.latitude, - longitude: longitude.present ? longitude.value : this.longitude, - ); - RemoteAssetCloudIdEntityData copyWithCompanion( - RemoteAssetCloudIdEntityCompanion data, - ) { - return RemoteAssetCloudIdEntityData( - assetId: data.assetId.present ? data.assetId.value : this.assetId, - cloudId: data.cloudId.present ? data.cloudId.value : this.cloudId, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - adjustmentTime: data.adjustmentTime.present - ? data.adjustmentTime.value - : this.adjustmentTime, - latitude: data.latitude.present ? data.latitude.value : this.latitude, - longitude: data.longitude.present ? data.longitude.value : this.longitude, - ); - } - - @override - String toString() { - return (StringBuffer('RemoteAssetCloudIdEntityData(') - ..write('assetId: $assetId, ') - ..write('cloudId: $cloudId, ') - ..write('createdAt: $createdAt, ') - ..write('adjustmentTime: $adjustmentTime, ') - ..write('latitude: $latitude, ') - ..write('longitude: $longitude') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - assetId, - cloudId, - createdAt, - adjustmentTime, - latitude, - longitude, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is RemoteAssetCloudIdEntityData && - other.assetId == this.assetId && - other.cloudId == this.cloudId && - other.createdAt == this.createdAt && - other.adjustmentTime == this.adjustmentTime && - other.latitude == this.latitude && - other.longitude == this.longitude); -} - -class RemoteAssetCloudIdEntityCompanion - extends UpdateCompanion { - final Value assetId; - final Value cloudId; - final Value createdAt; - final Value adjustmentTime; - final Value latitude; - final Value longitude; - const RemoteAssetCloudIdEntityCompanion({ - this.assetId = const Value.absent(), - this.cloudId = const Value.absent(), - this.createdAt = const Value.absent(), - this.adjustmentTime = const Value.absent(), - this.latitude = const Value.absent(), - this.longitude = const Value.absent(), - }); - RemoteAssetCloudIdEntityCompanion.insert({ - required String assetId, - this.cloudId = const Value.absent(), - this.createdAt = const Value.absent(), - this.adjustmentTime = const Value.absent(), - this.latitude = const Value.absent(), - this.longitude = const Value.absent(), - }) : assetId = Value(assetId); - static Insertable custom({ - Expression? assetId, - Expression? cloudId, - Expression? createdAt, - Expression? adjustmentTime, - Expression? latitude, - Expression? longitude, - }) { - return RawValuesInsertable({ - if (assetId != null) 'asset_id': assetId, - if (cloudId != null) 'cloud_id': cloudId, - if (createdAt != null) 'created_at': createdAt, - if (adjustmentTime != null) 'adjustment_time': adjustmentTime, - if (latitude != null) 'latitude': latitude, - if (longitude != null) 'longitude': longitude, - }); - } - - RemoteAssetCloudIdEntityCompanion copyWith({ - Value? assetId, - Value? cloudId, - Value? createdAt, - Value? adjustmentTime, - Value? latitude, - Value? longitude, - }) { - return RemoteAssetCloudIdEntityCompanion( - assetId: assetId ?? this.assetId, - cloudId: cloudId ?? this.cloudId, - createdAt: createdAt ?? this.createdAt, - adjustmentTime: adjustmentTime ?? this.adjustmentTime, - latitude: latitude ?? this.latitude, - longitude: longitude ?? this.longitude, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (assetId.present) { - map['asset_id'] = Variable(assetId.value); - } - if (cloudId.present) { - map['cloud_id'] = Variable(cloudId.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (adjustmentTime.present) { - map['adjustment_time'] = Variable(adjustmentTime.value); - } - if (latitude.present) { - map['latitude'] = Variable(latitude.value); - } - if (longitude.present) { - map['longitude'] = Variable(longitude.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('RemoteAssetCloudIdEntityCompanion(') - ..write('assetId: $assetId, ') - ..write('cloudId: $cloudId, ') - ..write('createdAt: $createdAt, ') - ..write('adjustmentTime: $adjustmentTime, ') - ..write('latitude: $latitude, ') - ..write('longitude: $longitude') - ..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, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn deletedAt = GeneratedColumn( - 'deleted_at', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn ownerId = GeneratedColumn( - 'owner_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL REFERENCES user_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn type = GeneratedColumn( - 'type', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn data = GeneratedColumn( - 'data', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn isSaved = GeneratedColumn( - 'is_saved', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0 CHECK (is_saved IN (0, 1))', - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn memoryAt = GeneratedColumn( - 'memory_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn seenAt = GeneratedColumn( - 'seen_at', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn showAt = GeneratedColumn( - 'show_at', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn hideAt = GeneratedColumn( - 'hide_at', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - @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.string, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}updated_at'], - )!, - deletedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - 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.int, - data['${effectivePrefix}is_saved'], - )!, - memoryAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}memory_at'], - )!, - seenAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}seen_at'], - ), - showAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}show_at'], - ), - hideAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}hide_at'], - ), - ); - } - - @override - MemoryEntity createAlias(String alias) { - return MemoryEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY(id)']; - @override - bool get dontWriteConstraints => true; -} - -class MemoryEntityData extends DataClass - implements Insertable { - final String id; - final String createdAt; - final String updatedAt; - final String? deletedAt; - final String ownerId; - final int type; - final String data; - final int isSaved; - final String memoryAt; - final String? seenAt; - final String? showAt; - final String? 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, - String? createdAt, - String? updatedAt, - Value deletedAt = const Value.absent(), - String? ownerId, - int? type, - String? data, - int? isSaved, - String? 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 String 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, - $customConstraints: - 'NOT NULL REFERENCES remote_asset_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn memoryId = GeneratedColumn( - 'memory_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: - 'NOT NULL 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; - @override - List get customConstraints => const [ - 'PRIMARY KEY(asset_id, memory_id)', - ]; - @override - bool get dontWriteConstraints => 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, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn ownerId = GeneratedColumn( - 'owner_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL REFERENCES user_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn faceAssetId = GeneratedColumn( - 'face_asset_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn isFavorite = GeneratedColumn( - 'is_favorite', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL CHECK (is_favorite IN (0, 1))', - ); - late final GeneratedColumn isHidden = GeneratedColumn( - 'is_hidden', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL CHECK (is_hidden IN (0, 1))', - ); - late final GeneratedColumn color = GeneratedColumn( - 'color', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn birthDate = GeneratedColumn( - 'birth_date', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - @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.string, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - 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.int, - data['${effectivePrefix}is_favorite'], - )!, - isHidden: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}is_hidden'], - )!, - color: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}color'], - ), - birthDate: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}birth_date'], - ), - ); - } - - @override - PersonEntity createAlias(String alias) { - return PersonEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY(id)']; - @override - bool get dontWriteConstraints => true; -} - -class PersonEntityData extends DataClass - implements Insertable { - final String id; - final String createdAt; - final String updatedAt; - final String ownerId; - final String name; - final String? faceAssetId; - final int isFavorite; - final int isHidden; - final String? color; - final String? 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, - String? createdAt, - String? updatedAt, - String? ownerId, - String? name, - Value faceAssetId = const Value.absent(), - int? isFavorite, - int? 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 int isFavorite, - required int 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, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn assetId = GeneratedColumn( - 'asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: - 'NOT NULL REFERENCES remote_asset_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn personId = GeneratedColumn( - 'person_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL REFERENCES person_entity(id)ON DELETE SET NULL', - ); - late final GeneratedColumn imageWidth = GeneratedColumn( - 'image_width', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn imageHeight = GeneratedColumn( - 'image_height', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn boundingBoxX1 = GeneratedColumn( - 'bounding_box_x1', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn boundingBoxY1 = GeneratedColumn( - 'bounding_box_y1', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn boundingBoxX2 = GeneratedColumn( - 'bounding_box_x2', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn boundingBoxY2 = GeneratedColumn( - 'bounding_box_y2', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn sourceType = GeneratedColumn( - 'source_type', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn isVisible = GeneratedColumn( - 'is_visible', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 1 CHECK (is_visible IN (0, 1))', - defaultValue: const CustomExpression('1'), - ); - late final GeneratedColumn deletedAt = GeneratedColumn( - 'deleted_at', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - @override - List get $columns => [ - id, - assetId, - personId, - imageWidth, - imageHeight, - boundingBoxX1, - boundingBoxY1, - boundingBoxX2, - boundingBoxY2, - sourceType, - isVisible, - deletedAt, - ]; - @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'], - )!, - isVisible: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}is_visible'], - )!, - deletedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}deleted_at'], - ), - ); - } - - @override - AssetFaceEntity createAlias(String alias) { - return AssetFaceEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY(id)']; - @override - bool get dontWriteConstraints => 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; - final int isVisible; - final String? deletedAt; - 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, - required this.isVisible, - this.deletedAt, - }); - @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); - map['is_visible'] = Variable(isVisible); - if (!nullToAbsent || deletedAt != null) { - map['deleted_at'] = Variable(deletedAt); - } - 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']), - isVisible: serializer.fromJson(json['isVisible']), - deletedAt: serializer.fromJson(json['deletedAt']), - ); - } - @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), - 'isVisible': serializer.toJson(isVisible), - 'deletedAt': serializer.toJson(deletedAt), - }; - } - - 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, - int? isVisible, - Value deletedAt = const Value.absent(), - }) => 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, - isVisible: isVisible ?? this.isVisible, - deletedAt: deletedAt.present ? deletedAt.value : this.deletedAt, - ); - 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, - isVisible: data.isVisible.present ? data.isVisible.value : this.isVisible, - deletedAt: data.deletedAt.present ? data.deletedAt.value : this.deletedAt, - ); - } - - @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('isVisible: $isVisible, ') - ..write('deletedAt: $deletedAt') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - assetId, - personId, - imageWidth, - imageHeight, - boundingBoxX1, - boundingBoxY1, - boundingBoxX2, - boundingBoxY2, - sourceType, - isVisible, - deletedAt, - ); - @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 && - other.isVisible == this.isVisible && - other.deletedAt == this.deletedAt); -} - -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; - final Value isVisible; - final Value deletedAt; - 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(), - this.isVisible = const Value.absent(), - this.deletedAt = 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, - this.isVisible = const Value.absent(), - this.deletedAt = const Value.absent(), - }) : 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, - Expression? isVisible, - Expression? deletedAt, - }) { - 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, - if (isVisible != null) 'is_visible': isVisible, - if (deletedAt != null) 'deleted_at': deletedAt, - }); - } - - AssetFaceEntityCompanion copyWith({ - Value? id, - Value? assetId, - Value? personId, - Value? imageWidth, - Value? imageHeight, - Value? boundingBoxX1, - Value? boundingBoxY1, - Value? boundingBoxX2, - Value? boundingBoxY2, - Value? sourceType, - Value? isVisible, - Value? deletedAt, - }) { - 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, - isVisible: isVisible ?? this.isVisible, - deletedAt: deletedAt ?? this.deletedAt, - ); - } - - @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); - } - if (isVisible.present) { - map['is_visible'] = Variable(isVisible.value); - } - if (deletedAt.present) { - map['deleted_at'] = Variable(deletedAt.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('isVisible: $isVisible, ') - ..write('deletedAt: $deletedAt') - ..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, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn stringValue = GeneratedColumn( - 'string_value', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn intValue = GeneratedColumn( - 'int_value', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - @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; - @override - List get customConstraints => const ['PRIMARY KEY(id)']; - @override - bool get dontWriteConstraints => 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, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn type = GeneratedColumn( - 'type', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn width = GeneratedColumn( - 'width', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn height = GeneratedColumn( - 'height', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn durationMs = GeneratedColumn( - 'duration_ms', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn albumId = GeneratedColumn( - 'album_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn checksum = GeneratedColumn( - 'checksum', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn isFavorite = GeneratedColumn( - 'is_favorite', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0 CHECK (is_favorite IN (0, 1))', - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn orientation = GeneratedColumn( - 'orientation', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0', - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn source = GeneratedColumn( - 'source', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn playbackStyle = GeneratedColumn( - 'playback_style', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0', - defaultValue: const CustomExpression('0'), - ); - @override - List get $columns => [ - name, - type, - createdAt, - updatedAt, - width, - height, - durationMs, - id, - albumId, - checksum, - isFavorite, - orientation, - source, - playbackStyle, - ]; - @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.string, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}updated_at'], - )!, - width: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}width'], - ), - height: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}height'], - ), - durationMs: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}duration_ms'], - ), - 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.int, - data['${effectivePrefix}is_favorite'], - )!, - orientation: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}orientation'], - )!, - source: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}source'], - )!, - playbackStyle: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}playback_style'], - )!, - ); - } - - @override - TrashedLocalAssetEntity createAlias(String alias) { - return TrashedLocalAssetEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY(id, album_id)']; - @override - bool get dontWriteConstraints => true; -} - -class TrashedLocalAssetEntityData extends DataClass - implements Insertable { - final String name; - final int type; - final String createdAt; - final String updatedAt; - final int? width; - final int? height; - final int? durationMs; - final String id; - final String albumId; - final String? checksum; - final int isFavorite; - final int orientation; - final int source; - final int playbackStyle; - const TrashedLocalAssetEntityData({ - required this.name, - required this.type, - required this.createdAt, - required this.updatedAt, - this.width, - this.height, - this.durationMs, - required this.id, - required this.albumId, - this.checksum, - required this.isFavorite, - required this.orientation, - required this.source, - required this.playbackStyle, - }); - @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 || durationMs != null) { - map['duration_ms'] = Variable(durationMs); - } - 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); - map['source'] = Variable(source); - map['playback_style'] = Variable(playbackStyle); - 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']), - durationMs: serializer.fromJson(json['durationMs']), - 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']), - source: serializer.fromJson(json['source']), - playbackStyle: serializer.fromJson(json['playbackStyle']), - ); - } - @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), - 'durationMs': serializer.toJson(durationMs), - 'id': serializer.toJson(id), - 'albumId': serializer.toJson(albumId), - 'checksum': serializer.toJson(checksum), - 'isFavorite': serializer.toJson(isFavorite), - 'orientation': serializer.toJson(orientation), - 'source': serializer.toJson(source), - 'playbackStyle': serializer.toJson(playbackStyle), - }; - } - - TrashedLocalAssetEntityData copyWith({ - String? name, - int? type, - String? createdAt, - String? updatedAt, - Value width = const Value.absent(), - Value height = const Value.absent(), - Value durationMs = const Value.absent(), - String? id, - String? albumId, - Value checksum = const Value.absent(), - int? isFavorite, - int? orientation, - int? source, - int? playbackStyle, - }) => 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, - durationMs: durationMs.present ? durationMs.value : this.durationMs, - id: id ?? this.id, - albumId: albumId ?? this.albumId, - checksum: checksum.present ? checksum.value : this.checksum, - isFavorite: isFavorite ?? this.isFavorite, - orientation: orientation ?? this.orientation, - source: source ?? this.source, - playbackStyle: playbackStyle ?? this.playbackStyle, - ); - 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, - durationMs: data.durationMs.present - ? data.durationMs.value - : this.durationMs, - 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, - source: data.source.present ? data.source.value : this.source, - playbackStyle: data.playbackStyle.present - ? data.playbackStyle.value - : this.playbackStyle, - ); - } - - @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('durationMs: $durationMs, ') - ..write('id: $id, ') - ..write('albumId: $albumId, ') - ..write('checksum: $checksum, ') - ..write('isFavorite: $isFavorite, ') - ..write('orientation: $orientation, ') - ..write('source: $source, ') - ..write('playbackStyle: $playbackStyle') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - name, - type, - createdAt, - updatedAt, - width, - height, - durationMs, - id, - albumId, - checksum, - isFavorite, - orientation, - source, - playbackStyle, - ); - @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.durationMs == this.durationMs && - other.id == this.id && - other.albumId == this.albumId && - other.checksum == this.checksum && - other.isFavorite == this.isFavorite && - other.orientation == this.orientation && - other.source == this.source && - other.playbackStyle == this.playbackStyle); -} - -class TrashedLocalAssetEntityCompanion - extends UpdateCompanion { - final Value name; - final Value type; - final Value createdAt; - final Value updatedAt; - final Value width; - final Value height; - final Value durationMs; - final Value id; - final Value albumId; - final Value checksum; - final Value isFavorite; - final Value orientation; - final Value source; - final Value playbackStyle; - 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.durationMs = 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(), - this.source = const Value.absent(), - this.playbackStyle = 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.durationMs = const Value.absent(), - required String id, - required String albumId, - this.checksum = const Value.absent(), - this.isFavorite = const Value.absent(), - this.orientation = const Value.absent(), - required int source, - this.playbackStyle = const Value.absent(), - }) : name = Value(name), - type = Value(type), - id = Value(id), - albumId = Value(albumId), - source = Value(source); - static Insertable custom({ - Expression? name, - Expression? type, - Expression? createdAt, - Expression? updatedAt, - Expression? width, - Expression? height, - Expression? durationMs, - Expression? id, - Expression? albumId, - Expression? checksum, - Expression? isFavorite, - Expression? orientation, - Expression? source, - Expression? playbackStyle, - }) { - 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 (durationMs != null) 'duration_ms': durationMs, - 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, - if (source != null) 'source': source, - if (playbackStyle != null) 'playback_style': playbackStyle, - }); - } - - TrashedLocalAssetEntityCompanion copyWith({ - Value? name, - Value? type, - Value? createdAt, - Value? updatedAt, - Value? width, - Value? height, - Value? durationMs, - Value? id, - Value? albumId, - Value? checksum, - Value? isFavorite, - Value? orientation, - Value? source, - Value? playbackStyle, - }) { - 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, - durationMs: durationMs ?? this.durationMs, - id: id ?? this.id, - albumId: albumId ?? this.albumId, - checksum: checksum ?? this.checksum, - isFavorite: isFavorite ?? this.isFavorite, - orientation: orientation ?? this.orientation, - source: source ?? this.source, - playbackStyle: playbackStyle ?? this.playbackStyle, - ); - } - - @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 (durationMs.present) { - map['duration_ms'] = Variable(durationMs.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); - } - if (source.present) { - map['source'] = Variable(source.value); - } - if (playbackStyle.present) { - map['playback_style'] = Variable(playbackStyle.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('durationMs: $durationMs, ') - ..write('id: $id, ') - ..write('albumId: $albumId, ') - ..write('checksum: $checksum, ') - ..write('isFavorite: $isFavorite, ') - ..write('orientation: $orientation, ') - ..write('source: $source, ') - ..write('playbackStyle: $playbackStyle') - ..write(')')) - .toString(); - } -} - -class AssetEditEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - AssetEditEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn assetId = GeneratedColumn( - 'asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: - 'NOT NULL REFERENCES remote_asset_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn action = GeneratedColumn( - 'action', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn parameters = - GeneratedColumn( - 'parameters', - aliasedName, - false, - type: DriftSqlType.blob, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn sequence = GeneratedColumn( - 'sequence', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - @override - List get $columns => [ - id, - assetId, - action, - parameters, - sequence, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'asset_edit_entity'; - @override - Set get $primaryKey => {id}; - @override - AssetEditEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return AssetEditEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - assetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}asset_id'], - )!, - action: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}action'], - )!, - parameters: attachedDatabase.typeMapping.read( - DriftSqlType.blob, - data['${effectivePrefix}parameters'], - )!, - sequence: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}sequence'], - )!, - ); - } - - @override - AssetEditEntity createAlias(String alias) { - return AssetEditEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY(id)']; - @override - bool get dontWriteConstraints => true; -} - -class AssetEditEntityData extends DataClass - implements Insertable { - final String id; - final String assetId; - final int action; - final i2.Uint8List parameters; - final int sequence; - const AssetEditEntityData({ - required this.id, - required this.assetId, - required this.action, - required this.parameters, - required this.sequence, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['asset_id'] = Variable(assetId); - map['action'] = Variable(action); - map['parameters'] = Variable(parameters); - map['sequence'] = Variable(sequence); - return map; - } - - factory AssetEditEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return AssetEditEntityData( - id: serializer.fromJson(json['id']), - assetId: serializer.fromJson(json['assetId']), - action: serializer.fromJson(json['action']), - parameters: serializer.fromJson(json['parameters']), - sequence: serializer.fromJson(json['sequence']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'assetId': serializer.toJson(assetId), - 'action': serializer.toJson(action), - 'parameters': serializer.toJson(parameters), - 'sequence': serializer.toJson(sequence), - }; - } - - AssetEditEntityData copyWith({ - String? id, - String? assetId, - int? action, - i2.Uint8List? parameters, - int? sequence, - }) => AssetEditEntityData( - id: id ?? this.id, - assetId: assetId ?? this.assetId, - action: action ?? this.action, - parameters: parameters ?? this.parameters, - sequence: sequence ?? this.sequence, - ); - AssetEditEntityData copyWithCompanion(AssetEditEntityCompanion data) { - return AssetEditEntityData( - id: data.id.present ? data.id.value : this.id, - assetId: data.assetId.present ? data.assetId.value : this.assetId, - action: data.action.present ? data.action.value : this.action, - parameters: data.parameters.present - ? data.parameters.value - : this.parameters, - sequence: data.sequence.present ? data.sequence.value : this.sequence, - ); - } - - @override - String toString() { - return (StringBuffer('AssetEditEntityData(') - ..write('id: $id, ') - ..write('assetId: $assetId, ') - ..write('action: $action, ') - ..write('parameters: $parameters, ') - ..write('sequence: $sequence') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - assetId, - action, - $driftBlobEquality.hash(parameters), - sequence, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is AssetEditEntityData && - other.id == this.id && - other.assetId == this.assetId && - other.action == this.action && - $driftBlobEquality.equals(other.parameters, this.parameters) && - other.sequence == this.sequence); -} - -class AssetEditEntityCompanion extends UpdateCompanion { - final Value id; - final Value assetId; - final Value action; - final Value parameters; - final Value sequence; - const AssetEditEntityCompanion({ - this.id = const Value.absent(), - this.assetId = const Value.absent(), - this.action = const Value.absent(), - this.parameters = const Value.absent(), - this.sequence = const Value.absent(), - }); - AssetEditEntityCompanion.insert({ - required String id, - required String assetId, - required int action, - required i2.Uint8List parameters, - required int sequence, - }) : id = Value(id), - assetId = Value(assetId), - action = Value(action), - parameters = Value(parameters), - sequence = Value(sequence); - static Insertable custom({ - Expression? id, - Expression? assetId, - Expression? action, - Expression? parameters, - Expression? sequence, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (assetId != null) 'asset_id': assetId, - if (action != null) 'action': action, - if (parameters != null) 'parameters': parameters, - if (sequence != null) 'sequence': sequence, - }); - } - - AssetEditEntityCompanion copyWith({ - Value? id, - Value? assetId, - Value? action, - Value? parameters, - Value? sequence, - }) { - return AssetEditEntityCompanion( - id: id ?? this.id, - assetId: assetId ?? this.assetId, - action: action ?? this.action, - parameters: parameters ?? this.parameters, - sequence: sequence ?? this.sequence, - ); - } - - @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 (action.present) { - map['action'] = Variable(action.value); - } - if (parameters.present) { - map['parameters'] = Variable(parameters.value); - } - if (sequence.present) { - map['sequence'] = Variable(sequence.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('AssetEditEntityCompanion(') - ..write('id: $id, ') - ..write('assetId: $assetId, ') - ..write('action: $action, ') - ..write('parameters: $parameters, ') - ..write('sequence: $sequence') - ..write(')')) - .toString(); - } -} - -class DatabaseAtV24 extends GeneratedDatabase { - DatabaseAtV24(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 idxLocalAlbumAssetAlbumAsset = Index( - 'idx_local_album_asset_album_asset', - 'CREATE INDEX IF NOT EXISTS idx_local_album_asset_album_asset ON local_album_asset_entity (album_id, asset_id)', - ); - 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 idxLocalAssetCloudId = Index( - 'idx_local_asset_cloud_id', - 'CREATE INDEX IF NOT EXISTS idx_local_asset_cloud_id ON local_asset_entity (i_cloud_id)', - ); - late final Index idxStackPrimaryAssetId = Index( - 'idx_stack_primary_asset_id', - 'CREATE INDEX IF NOT EXISTS idx_stack_primary_asset_id ON stack_entity (primary_asset_id)', - ); - 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 Index idxRemoteAssetStackId = Index( - 'idx_remote_asset_stack_id', - 'CREATE INDEX IF NOT EXISTS idx_remote_asset_stack_id ON remote_asset_entity (stack_id)', - ); - late final Index idxRemoteAssetLocalDateTimeDay = Index( - 'idx_remote_asset_local_date_time_day', - 'CREATE INDEX IF NOT EXISTS idx_remote_asset_local_date_time_day ON remote_asset_entity (STRFTIME(\'%Y-%m-%d\', local_date_time))', - ); - late final Index idxRemoteAssetLocalDateTimeMonth = Index( - 'idx_remote_asset_local_date_time_month', - 'CREATE INDEX IF NOT EXISTS idx_remote_asset_local_date_time_month ON remote_asset_entity (STRFTIME(\'%Y-%m\', local_date_time))', - ); - 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 RemoteAssetCloudIdEntity remoteAssetCloudIdEntity = - RemoteAssetCloudIdEntity(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 AssetEditEntity assetEditEntity = AssetEditEntity(this); - late final Index idxPartnerSharedWithId = Index( - 'idx_partner_shared_with_id', - 'CREATE INDEX IF NOT EXISTS idx_partner_shared_with_id ON partner_entity (shared_with_id)', - ); - 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 idxRemoteAlbumAssetAlbumAsset = Index( - 'idx_remote_album_asset_album_asset', - 'CREATE INDEX IF NOT EXISTS idx_remote_album_asset_album_asset ON remote_album_asset_entity (album_id, asset_id)', - ); - late final Index idxRemoteAssetCloudId = Index( - 'idx_remote_asset_cloud_id', - 'CREATE INDEX IF NOT EXISTS idx_remote_asset_cloud_id ON remote_asset_cloud_id_entity (cloud_id)', - ); - late final Index idxPersonOwnerId = Index( - 'idx_person_owner_id', - 'CREATE INDEX IF NOT EXISTS idx_person_owner_id ON person_entity (owner_id)', - ); - late final Index idxAssetFacePersonId = Index( - 'idx_asset_face_person_id', - 'CREATE INDEX IF NOT EXISTS idx_asset_face_person_id ON asset_face_entity (person_id)', - ); - late final Index idxAssetFaceAssetId = Index( - 'idx_asset_face_asset_id', - 'CREATE INDEX IF NOT EXISTS idx_asset_face_asset_id ON asset_face_entity (asset_id)', - ); - 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)', - ); - late final Index idxAssetEditAssetId = Index( - 'idx_asset_edit_asset_id', - 'CREATE INDEX IF NOT EXISTS idx_asset_edit_asset_id ON asset_edit_entity (asset_id)', - ); - @override - Iterable> get allTables => - allSchemaEntities.whereType>(); - @override - List get allSchemaEntities => [ - userEntity, - remoteAssetEntity, - stackEntity, - localAssetEntity, - remoteAlbumEntity, - localAlbumEntity, - localAlbumAssetEntity, - idxLocalAlbumAssetAlbumAsset, - idxLocalAssetChecksum, - idxLocalAssetCloudId, - idxStackPrimaryAssetId, - idxRemoteAssetOwnerChecksum, - uQRemoteAssetsOwnerChecksum, - uQRemoteAssetsOwnerLibraryChecksum, - idxRemoteAssetChecksum, - idxRemoteAssetStackId, - idxRemoteAssetLocalDateTimeDay, - idxRemoteAssetLocalDateTimeMonth, - authUserEntity, - userMetadataEntity, - partnerEntity, - remoteExifEntity, - remoteAlbumAssetEntity, - remoteAlbumUserEntity, - remoteAssetCloudIdEntity, - memoryEntity, - memoryAssetEntity, - personEntity, - assetFaceEntity, - storeEntity, - trashedLocalAssetEntity, - assetEditEntity, - idxPartnerSharedWithId, - idxLatLng, - idxRemoteAlbumAssetAlbumAsset, - idxRemoteAssetCloudId, - idxPersonOwnerId, - idxAssetFacePersonId, - idxAssetFaceAssetId, - idxTrashedLocalAssetChecksum, - idxTrashedLocalAssetAlbum, - idxAssetEditAssetId, - ]; - @override - StreamQueryUpdateRules get streamUpdateRules => const StreamQueryUpdateRules([ - WritePropagation( - on: TableUpdateQuery.onTableName( - 'user_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('remote_asset_entity', kind: UpdateKind.delete)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'user_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('stack_entity', kind: UpdateKind.delete)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'remote_asset_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('remote_album_entity', kind: UpdateKind.update)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'remote_album_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('local_album_entity', kind: UpdateKind.update)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'local_asset_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [ - TableUpdate('local_album_asset_entity', kind: UpdateKind.delete), - ], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'local_album_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [ - TableUpdate('local_album_asset_entity', kind: UpdateKind.delete), - ], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'user_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('user_metadata_entity', kind: UpdateKind.delete)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'user_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('partner_entity', kind: UpdateKind.delete)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'user_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('partner_entity', kind: UpdateKind.delete)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'remote_asset_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('remote_exif_entity', kind: UpdateKind.delete)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'remote_asset_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [ - TableUpdate('remote_album_asset_entity', kind: UpdateKind.delete), - ], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'remote_album_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [ - TableUpdate('remote_album_asset_entity', kind: UpdateKind.delete), - ], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'remote_album_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [ - TableUpdate('remote_album_user_entity', kind: UpdateKind.delete), - ], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'user_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [ - TableUpdate('remote_album_user_entity', kind: UpdateKind.delete), - ], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'remote_asset_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [ - TableUpdate('remote_asset_cloud_id_entity', kind: UpdateKind.delete), - ], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'user_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('memory_entity', kind: UpdateKind.delete)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'remote_asset_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('memory_asset_entity', kind: UpdateKind.delete)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'memory_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('memory_asset_entity', kind: UpdateKind.delete)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'user_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('person_entity', kind: UpdateKind.delete)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'remote_asset_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('asset_face_entity', kind: UpdateKind.delete)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'person_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('asset_face_entity', kind: UpdateKind.update)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'remote_asset_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('asset_edit_entity', kind: UpdateKind.delete)], - ), - ]); - @override - int get schemaVersion => 24; - @override - DriftDatabaseOptions get options => - const DriftDatabaseOptions(storeDateTimeAsText: true); -} diff --git a/mobile/test/drift/main/generated/schema_v25.dart b/mobile/test/drift/main/generated/schema_v25.dart deleted file mode 100644 index aad45f0bd3..0000000000 --- a/mobile/test/drift/main/generated/schema_v25.dart +++ /dev/null @@ -1,9345 +0,0 @@ -// dart format width=80 -import 'dart:typed_data' as i2; -// GENERATED BY drift_dev, DO NOT MODIFY. -// ignore_for_file: type=lint,unused_import -// -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, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn email = GeneratedColumn( - 'email', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn hasProfileImage = GeneratedColumn( - 'has_profile_image', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: - 'NOT NULL DEFAULT 0 CHECK (has_profile_image IN (0, 1))', - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn profileChangedAt = GeneratedColumn( - 'profile_changed_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn avatarColor = GeneratedColumn( - 'avatar_color', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0', - 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.int, - data['${effectivePrefix}has_profile_image'], - )!, - profileChangedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - 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; - @override - List get customConstraints => const ['PRIMARY KEY(id)']; - @override - bool get dontWriteConstraints => true; -} - -class UserEntityData extends DataClass implements Insertable { - final String id; - final String name; - final String email; - final int hasProfileImage; - final String 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, - int? hasProfileImage, - String? 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, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn type = GeneratedColumn( - 'type', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn width = GeneratedColumn( - 'width', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn height = GeneratedColumn( - 'height', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn durationMs = GeneratedColumn( - 'duration_ms', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn checksum = GeneratedColumn( - 'checksum', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn isFavorite = GeneratedColumn( - 'is_favorite', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0 CHECK (is_favorite IN (0, 1))', - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn ownerId = GeneratedColumn( - 'owner_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL REFERENCES user_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn localDateTime = GeneratedColumn( - 'local_date_time', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn thumbHash = GeneratedColumn( - 'thumb_hash', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn deletedAt = GeneratedColumn( - 'deleted_at', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn livePhotoVideoId = GeneratedColumn( - 'live_photo_video_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn visibility = GeneratedColumn( - 'visibility', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn stackId = GeneratedColumn( - 'stack_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn libraryId = GeneratedColumn( - 'library_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn isEdited = GeneratedColumn( - 'is_edited', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0 CHECK (is_edited IN (0, 1))', - defaultValue: const CustomExpression('0'), - ); - @override - List get $columns => [ - name, - type, - createdAt, - updatedAt, - width, - height, - durationMs, - id, - checksum, - isFavorite, - ownerId, - localDateTime, - thumbHash, - deletedAt, - livePhotoVideoId, - visibility, - stackId, - libraryId, - isEdited, - ]; - @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.string, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}updated_at'], - )!, - width: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}width'], - ), - height: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}height'], - ), - durationMs: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}duration_ms'], - ), - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - checksum: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}checksum'], - )!, - isFavorite: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}is_favorite'], - )!, - ownerId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}owner_id'], - )!, - localDateTime: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}local_date_time'], - ), - thumbHash: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}thumb_hash'], - ), - deletedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - 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'], - ), - isEdited: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}is_edited'], - )!, - ); - } - - @override - RemoteAssetEntity createAlias(String alias) { - return RemoteAssetEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY(id)']; - @override - bool get dontWriteConstraints => true; -} - -class RemoteAssetEntityData extends DataClass - implements Insertable { - final String name; - final int type; - final String createdAt; - final String updatedAt; - final int? width; - final int? height; - final int? durationMs; - final String id; - final String checksum; - final int isFavorite; - final String ownerId; - final String? localDateTime; - final String? thumbHash; - final String? deletedAt; - final String? livePhotoVideoId; - final int visibility; - final String? stackId; - final String? libraryId; - final int isEdited; - const RemoteAssetEntityData({ - required this.name, - required this.type, - required this.createdAt, - required this.updatedAt, - this.width, - this.height, - this.durationMs, - 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, - required this.isEdited, - }); - @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 || durationMs != null) { - map['duration_ms'] = Variable(durationMs); - } - 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); - } - map['is_edited'] = Variable(isEdited); - 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']), - durationMs: serializer.fromJson(json['durationMs']), - 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']), - isEdited: serializer.fromJson(json['isEdited']), - ); - } - @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), - 'durationMs': serializer.toJson(durationMs), - '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), - 'isEdited': serializer.toJson(isEdited), - }; - } - - RemoteAssetEntityData copyWith({ - String? name, - int? type, - String? createdAt, - String? updatedAt, - Value width = const Value.absent(), - Value height = const Value.absent(), - Value durationMs = const Value.absent(), - String? id, - String? checksum, - int? 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(), - int? isEdited, - }) => 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, - durationMs: durationMs.present ? durationMs.value : this.durationMs, - 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, - isEdited: isEdited ?? this.isEdited, - ); - 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, - durationMs: data.durationMs.present - ? data.durationMs.value - : this.durationMs, - 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, - isEdited: data.isEdited.present ? data.isEdited.value : this.isEdited, - ); - } - - @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('durationMs: $durationMs, ') - ..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('isEdited: $isEdited') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - name, - type, - createdAt, - updatedAt, - width, - height, - durationMs, - id, - checksum, - isFavorite, - ownerId, - localDateTime, - thumbHash, - deletedAt, - livePhotoVideoId, - visibility, - stackId, - libraryId, - isEdited, - ); - @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.durationMs == this.durationMs && - 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 && - other.isEdited == this.isEdited); -} - -class RemoteAssetEntityCompanion - extends UpdateCompanion { - final Value name; - final Value type; - final Value createdAt; - final Value updatedAt; - final Value width; - final Value height; - final Value durationMs; - 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; - final Value isEdited; - 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.durationMs = 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(), - this.isEdited = 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.durationMs = 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(), - this.isEdited = 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? durationMs, - Expression? id, - Expression? checksum, - Expression? isFavorite, - Expression? ownerId, - Expression? localDateTime, - Expression? thumbHash, - Expression? deletedAt, - Expression? livePhotoVideoId, - Expression? visibility, - Expression? stackId, - Expression? libraryId, - Expression? isEdited, - }) { - 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 (durationMs != null) 'duration_ms': durationMs, - 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, - if (isEdited != null) 'is_edited': isEdited, - }); - } - - RemoteAssetEntityCompanion copyWith({ - Value? name, - Value? type, - Value? createdAt, - Value? updatedAt, - Value? width, - Value? height, - Value? durationMs, - Value? id, - Value? checksum, - Value? isFavorite, - Value? ownerId, - Value? localDateTime, - Value? thumbHash, - Value? deletedAt, - Value? livePhotoVideoId, - Value? visibility, - Value? stackId, - Value? libraryId, - Value? isEdited, - }) { - 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, - durationMs: durationMs ?? this.durationMs, - 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, - isEdited: isEdited ?? this.isEdited, - ); - } - - @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 (durationMs.present) { - map['duration_ms'] = Variable(durationMs.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); - } - if (isEdited.present) { - map['is_edited'] = Variable(isEdited.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('durationMs: $durationMs, ') - ..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('isEdited: $isEdited') - ..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, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn ownerId = GeneratedColumn( - 'owner_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL REFERENCES user_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn primaryAssetId = GeneratedColumn( - 'primary_asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - @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.string, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - 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; - @override - List get customConstraints => const ['PRIMARY KEY(id)']; - @override - bool get dontWriteConstraints => true; -} - -class StackEntityData extends DataClass implements Insertable { - final String id; - final String createdAt; - final String 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, - String? createdAt, - String? 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, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn type = GeneratedColumn( - 'type', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn width = GeneratedColumn( - 'width', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn height = GeneratedColumn( - 'height', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn durationMs = GeneratedColumn( - 'duration_ms', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn checksum = GeneratedColumn( - 'checksum', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn isFavorite = GeneratedColumn( - 'is_favorite', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0 CHECK (is_favorite IN (0, 1))', - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn orientation = GeneratedColumn( - 'orientation', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0', - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn iCloudId = GeneratedColumn( - 'i_cloud_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn adjustmentTime = GeneratedColumn( - 'adjustment_time', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn latitude = GeneratedColumn( - 'latitude', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn longitude = GeneratedColumn( - 'longitude', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn playbackStyle = GeneratedColumn( - 'playback_style', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0', - defaultValue: const CustomExpression('0'), - ); - @override - List get $columns => [ - name, - type, - createdAt, - updatedAt, - width, - height, - durationMs, - id, - checksum, - isFavorite, - orientation, - iCloudId, - adjustmentTime, - latitude, - longitude, - playbackStyle, - ]; - @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.string, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}updated_at'], - )!, - width: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}width'], - ), - height: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}height'], - ), - durationMs: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}duration_ms'], - ), - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - checksum: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}checksum'], - ), - isFavorite: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}is_favorite'], - )!, - orientation: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}orientation'], - )!, - iCloudId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}i_cloud_id'], - ), - adjustmentTime: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}adjustment_time'], - ), - latitude: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}latitude'], - ), - longitude: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}longitude'], - ), - playbackStyle: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}playback_style'], - )!, - ); - } - - @override - LocalAssetEntity createAlias(String alias) { - return LocalAssetEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY(id)']; - @override - bool get dontWriteConstraints => true; -} - -class LocalAssetEntityData extends DataClass - implements Insertable { - final String name; - final int type; - final String createdAt; - final String updatedAt; - final int? width; - final int? height; - final int? durationMs; - final String id; - final String? checksum; - final int isFavorite; - final int orientation; - final String? iCloudId; - final String? adjustmentTime; - final double? latitude; - final double? longitude; - final int playbackStyle; - const LocalAssetEntityData({ - required this.name, - required this.type, - required this.createdAt, - required this.updatedAt, - this.width, - this.height, - this.durationMs, - required this.id, - this.checksum, - required this.isFavorite, - required this.orientation, - this.iCloudId, - this.adjustmentTime, - this.latitude, - this.longitude, - required this.playbackStyle, - }); - @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 || durationMs != null) { - map['duration_ms'] = Variable(durationMs); - } - map['id'] = Variable(id); - if (!nullToAbsent || checksum != null) { - map['checksum'] = Variable(checksum); - } - map['is_favorite'] = Variable(isFavorite); - map['orientation'] = Variable(orientation); - if (!nullToAbsent || iCloudId != null) { - map['i_cloud_id'] = Variable(iCloudId); - } - if (!nullToAbsent || adjustmentTime != null) { - map['adjustment_time'] = Variable(adjustmentTime); - } - if (!nullToAbsent || latitude != null) { - map['latitude'] = Variable(latitude); - } - if (!nullToAbsent || longitude != null) { - map['longitude'] = Variable(longitude); - } - map['playback_style'] = Variable(playbackStyle); - 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']), - durationMs: serializer.fromJson(json['durationMs']), - id: serializer.fromJson(json['id']), - checksum: serializer.fromJson(json['checksum']), - isFavorite: serializer.fromJson(json['isFavorite']), - orientation: serializer.fromJson(json['orientation']), - iCloudId: serializer.fromJson(json['iCloudId']), - adjustmentTime: serializer.fromJson(json['adjustmentTime']), - latitude: serializer.fromJson(json['latitude']), - longitude: serializer.fromJson(json['longitude']), - playbackStyle: serializer.fromJson(json['playbackStyle']), - ); - } - @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), - 'durationMs': serializer.toJson(durationMs), - 'id': serializer.toJson(id), - 'checksum': serializer.toJson(checksum), - 'isFavorite': serializer.toJson(isFavorite), - 'orientation': serializer.toJson(orientation), - 'iCloudId': serializer.toJson(iCloudId), - 'adjustmentTime': serializer.toJson(adjustmentTime), - 'latitude': serializer.toJson(latitude), - 'longitude': serializer.toJson(longitude), - 'playbackStyle': serializer.toJson(playbackStyle), - }; - } - - LocalAssetEntityData copyWith({ - String? name, - int? type, - String? createdAt, - String? updatedAt, - Value width = const Value.absent(), - Value height = const Value.absent(), - Value durationMs = const Value.absent(), - String? id, - Value checksum = const Value.absent(), - int? isFavorite, - int? orientation, - Value iCloudId = const Value.absent(), - Value adjustmentTime = const Value.absent(), - Value latitude = const Value.absent(), - Value longitude = const Value.absent(), - int? playbackStyle, - }) => 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, - durationMs: durationMs.present ? durationMs.value : this.durationMs, - id: id ?? this.id, - checksum: checksum.present ? checksum.value : this.checksum, - isFavorite: isFavorite ?? this.isFavorite, - orientation: orientation ?? this.orientation, - iCloudId: iCloudId.present ? iCloudId.value : this.iCloudId, - adjustmentTime: adjustmentTime.present - ? adjustmentTime.value - : this.adjustmentTime, - latitude: latitude.present ? latitude.value : this.latitude, - longitude: longitude.present ? longitude.value : this.longitude, - playbackStyle: playbackStyle ?? this.playbackStyle, - ); - 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, - durationMs: data.durationMs.present - ? data.durationMs.value - : this.durationMs, - 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, - iCloudId: data.iCloudId.present ? data.iCloudId.value : this.iCloudId, - adjustmentTime: data.adjustmentTime.present - ? data.adjustmentTime.value - : this.adjustmentTime, - latitude: data.latitude.present ? data.latitude.value : this.latitude, - longitude: data.longitude.present ? data.longitude.value : this.longitude, - playbackStyle: data.playbackStyle.present - ? data.playbackStyle.value - : this.playbackStyle, - ); - } - - @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('durationMs: $durationMs, ') - ..write('id: $id, ') - ..write('checksum: $checksum, ') - ..write('isFavorite: $isFavorite, ') - ..write('orientation: $orientation, ') - ..write('iCloudId: $iCloudId, ') - ..write('adjustmentTime: $adjustmentTime, ') - ..write('latitude: $latitude, ') - ..write('longitude: $longitude, ') - ..write('playbackStyle: $playbackStyle') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - name, - type, - createdAt, - updatedAt, - width, - height, - durationMs, - id, - checksum, - isFavorite, - orientation, - iCloudId, - adjustmentTime, - latitude, - longitude, - playbackStyle, - ); - @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.durationMs == this.durationMs && - other.id == this.id && - other.checksum == this.checksum && - other.isFavorite == this.isFavorite && - other.orientation == this.orientation && - other.iCloudId == this.iCloudId && - other.adjustmentTime == this.adjustmentTime && - other.latitude == this.latitude && - other.longitude == this.longitude && - other.playbackStyle == this.playbackStyle); -} - -class LocalAssetEntityCompanion extends UpdateCompanion { - final Value name; - final Value type; - final Value createdAt; - final Value updatedAt; - final Value width; - final Value height; - final Value durationMs; - final Value id; - final Value checksum; - final Value isFavorite; - final Value orientation; - final Value iCloudId; - final Value adjustmentTime; - final Value latitude; - final Value longitude; - final Value playbackStyle; - 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.durationMs = const Value.absent(), - this.id = const Value.absent(), - this.checksum = const Value.absent(), - this.isFavorite = const Value.absent(), - this.orientation = const Value.absent(), - this.iCloudId = const Value.absent(), - this.adjustmentTime = const Value.absent(), - this.latitude = const Value.absent(), - this.longitude = const Value.absent(), - this.playbackStyle = 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.durationMs = const Value.absent(), - required String id, - this.checksum = const Value.absent(), - this.isFavorite = const Value.absent(), - this.orientation = const Value.absent(), - this.iCloudId = const Value.absent(), - this.adjustmentTime = const Value.absent(), - this.latitude = const Value.absent(), - this.longitude = const Value.absent(), - this.playbackStyle = 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? durationMs, - Expression? id, - Expression? checksum, - Expression? isFavorite, - Expression? orientation, - Expression? iCloudId, - Expression? adjustmentTime, - Expression? latitude, - Expression? longitude, - Expression? playbackStyle, - }) { - 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 (durationMs != null) 'duration_ms': durationMs, - if (id != null) 'id': id, - if (checksum != null) 'checksum': checksum, - if (isFavorite != null) 'is_favorite': isFavorite, - if (orientation != null) 'orientation': orientation, - if (iCloudId != null) 'i_cloud_id': iCloudId, - if (adjustmentTime != null) 'adjustment_time': adjustmentTime, - if (latitude != null) 'latitude': latitude, - if (longitude != null) 'longitude': longitude, - if (playbackStyle != null) 'playback_style': playbackStyle, - }); - } - - LocalAssetEntityCompanion copyWith({ - Value? name, - Value? type, - Value? createdAt, - Value? updatedAt, - Value? width, - Value? height, - Value? durationMs, - Value? id, - Value? checksum, - Value? isFavorite, - Value? orientation, - Value? iCloudId, - Value? adjustmentTime, - Value? latitude, - Value? longitude, - Value? playbackStyle, - }) { - 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, - durationMs: durationMs ?? this.durationMs, - id: id ?? this.id, - checksum: checksum ?? this.checksum, - isFavorite: isFavorite ?? this.isFavorite, - orientation: orientation ?? this.orientation, - iCloudId: iCloudId ?? this.iCloudId, - adjustmentTime: adjustmentTime ?? this.adjustmentTime, - latitude: latitude ?? this.latitude, - longitude: longitude ?? this.longitude, - playbackStyle: playbackStyle ?? this.playbackStyle, - ); - } - - @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 (durationMs.present) { - map['duration_ms'] = Variable(durationMs.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); - } - if (iCloudId.present) { - map['i_cloud_id'] = Variable(iCloudId.value); - } - if (adjustmentTime.present) { - map['adjustment_time'] = Variable(adjustmentTime.value); - } - if (latitude.present) { - map['latitude'] = Variable(latitude.value); - } - if (longitude.present) { - map['longitude'] = Variable(longitude.value); - } - if (playbackStyle.present) { - map['playback_style'] = Variable(playbackStyle.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('durationMs: $durationMs, ') - ..write('id: $id, ') - ..write('checksum: $checksum, ') - ..write('isFavorite: $isFavorite, ') - ..write('orientation: $orientation, ') - ..write('iCloudId: $iCloudId, ') - ..write('adjustmentTime: $adjustmentTime, ') - ..write('latitude: $latitude, ') - ..write('longitude: $longitude, ') - ..write('playbackStyle: $playbackStyle') - ..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, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn description = GeneratedColumn( - 'description', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT \'\'', - defaultValue: const CustomExpression('\'\''), - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn thumbnailAssetId = GeneratedColumn( - 'thumbnail_asset_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: - 'NULL REFERENCES remote_asset_entity(id)ON DELETE SET NULL', - ); - late final GeneratedColumn isActivityEnabled = GeneratedColumn( - 'is_activity_enabled', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: - 'NOT NULL DEFAULT 1 CHECK (is_activity_enabled IN (0, 1))', - defaultValue: const CustomExpression('1'), - ); - late final GeneratedColumn order = GeneratedColumn( - 'order', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - @override - List get $columns => [ - id, - name, - description, - createdAt, - updatedAt, - 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.string, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}updated_at'], - )!, - thumbnailAssetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}thumbnail_asset_id'], - ), - isActivityEnabled: attachedDatabase.typeMapping.read( - DriftSqlType.int, - 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; - @override - List get customConstraints => const ['PRIMARY KEY(id)']; - @override - bool get dontWriteConstraints => true; -} - -class RemoteAlbumEntityData extends DataClass - implements Insertable { - final String id; - final String name; - final String description; - final String createdAt; - final String updatedAt; - final String? thumbnailAssetId; - final int isActivityEnabled; - final int order; - const RemoteAlbumEntityData({ - required this.id, - required this.name, - required this.description, - required this.createdAt, - required this.updatedAt, - 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); - 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']), - 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), - 'thumbnailAssetId': serializer.toJson(thumbnailAssetId), - 'isActivityEnabled': serializer.toJson(isActivityEnabled), - 'order': serializer.toJson(order), - }; - } - - RemoteAlbumEntityData copyWith({ - String? id, - String? name, - String? description, - String? createdAt, - String? updatedAt, - Value thumbnailAssetId = const Value.absent(), - int? isActivityEnabled, - int? order, - }) => RemoteAlbumEntityData( - id: id ?? this.id, - name: name ?? this.name, - description: description ?? this.description, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - 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, - 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('thumbnailAssetId: $thumbnailAssetId, ') - ..write('isActivityEnabled: $isActivityEnabled, ') - ..write('order: $order') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - name, - description, - createdAt, - updatedAt, - 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.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 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.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(), - this.thumbnailAssetId = const Value.absent(), - this.isActivityEnabled = const Value.absent(), - required int order, - }) : id = Value(id), - name = Value(name), - order = Value(order); - static Insertable custom({ - Expression? id, - Expression? name, - Expression? description, - Expression? createdAt, - Expression? updatedAt, - 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 (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? 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, - 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 (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('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, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn backupSelection = GeneratedColumn( - 'backup_selection', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn isIosSharedAlbum = GeneratedColumn( - 'is_ios_shared_album', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: - 'NOT NULL DEFAULT 0 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, - $customConstraints: - 'NULL REFERENCES remote_album_entity(id)ON DELETE SET NULL', - ); - late final GeneratedColumn marker = GeneratedColumn( - 'marker', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL 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.string, - data['${effectivePrefix}updated_at'], - )!, - backupSelection: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}backup_selection'], - )!, - isIosSharedAlbum: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}is_ios_shared_album'], - )!, - linkedRemoteAlbumId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}linked_remote_album_id'], - ), - marker: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}marker'], - ), - ); - } - - @override - LocalAlbumEntity createAlias(String alias) { - return LocalAlbumEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY(id)']; - @override - bool get dontWriteConstraints => true; -} - -class LocalAlbumEntityData extends DataClass - implements Insertable { - final String id; - final String name; - final String updatedAt; - final int backupSelection; - final int isIosSharedAlbum; - final String? linkedRemoteAlbumId; - final int? 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, - String? updatedAt, - int? backupSelection, - int? 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, - $customConstraints: - 'NOT NULL REFERENCES local_asset_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn albumId = GeneratedColumn( - 'album_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: - 'NOT NULL REFERENCES local_album_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn marker = GeneratedColumn( - 'marker', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL 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.int, - data['${effectivePrefix}marker'], - ), - ); - } - - @override - LocalAlbumAssetEntity createAlias(String alias) { - return LocalAlbumAssetEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const [ - 'PRIMARY KEY(asset_id, album_id)', - ]; - @override - bool get dontWriteConstraints => true; -} - -class LocalAlbumAssetEntityData extends DataClass - implements Insertable { - final String assetId; - final String albumId; - final int? 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, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn email = GeneratedColumn( - 'email', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn isAdmin = GeneratedColumn( - 'is_admin', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0 CHECK (is_admin IN (0, 1))', - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn hasProfileImage = GeneratedColumn( - 'has_profile_image', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: - 'NOT NULL DEFAULT 0 CHECK (has_profile_image IN (0, 1))', - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn profileChangedAt = GeneratedColumn( - 'profile_changed_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn avatarColor = GeneratedColumn( - 'avatar_color', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn quotaSizeInBytes = GeneratedColumn( - 'quota_size_in_bytes', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0', - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn quotaUsageInBytes = GeneratedColumn( - 'quota_usage_in_bytes', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0', - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn pinCode = GeneratedColumn( - 'pin_code', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - @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.int, - data['${effectivePrefix}is_admin'], - )!, - hasProfileImage: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}has_profile_image'], - )!, - profileChangedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - 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; - @override - List get customConstraints => const ['PRIMARY KEY(id)']; - @override - bool get dontWriteConstraints => true; -} - -class AuthUserEntityData extends DataClass - implements Insertable { - final String id; - final String name; - final String email; - final int isAdmin; - final int hasProfileImage; - final String 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, - int? isAdmin, - int? hasProfileImage, - String? 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, - $customConstraints: 'NOT NULL REFERENCES user_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn key = GeneratedColumn( - 'key', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn value = - GeneratedColumn( - 'value', - aliasedName, - false, - type: DriftSqlType.blob, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - @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; - @override - List get customConstraints => const ['PRIMARY KEY(user_id, "key")']; - @override - bool get dontWriteConstraints => true; -} - -class UserMetadataEntityData extends DataClass - implements Insertable { - final String userId; - final int key; - final i2.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, - i2.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 i2.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, - $customConstraints: 'NOT NULL REFERENCES user_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn sharedWithId = GeneratedColumn( - 'shared_with_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL REFERENCES user_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn inTimeline = GeneratedColumn( - 'in_timeline', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0 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.int, - data['${effectivePrefix}in_timeline'], - )!, - ); - } - - @override - PartnerEntity createAlias(String alias) { - return PartnerEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const [ - 'PRIMARY KEY(shared_by_id, shared_with_id)', - ]; - @override - bool get dontWriteConstraints => true; -} - -class PartnerEntityData extends DataClass - implements Insertable { - final String sharedById; - final String sharedWithId; - final int 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, - int? 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, - $customConstraints: - 'NOT NULL REFERENCES remote_asset_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn city = GeneratedColumn( - 'city', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn state = GeneratedColumn( - 'state', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn country = GeneratedColumn( - 'country', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn dateTimeOriginal = GeneratedColumn( - 'date_time_original', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn description = GeneratedColumn( - 'description', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn height = GeneratedColumn( - 'height', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn width = GeneratedColumn( - 'width', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn exposureTime = GeneratedColumn( - 'exposure_time', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn fNumber = GeneratedColumn( - 'f_number', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn fileSize = GeneratedColumn( - 'file_size', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn focalLength = GeneratedColumn( - 'focal_length', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn latitude = GeneratedColumn( - 'latitude', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn longitude = GeneratedColumn( - 'longitude', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn iso = GeneratedColumn( - 'iso', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn make = GeneratedColumn( - 'make', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn model = GeneratedColumn( - 'model', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn lens = GeneratedColumn( - 'lens', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn orientation = GeneratedColumn( - 'orientation', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn timeZone = GeneratedColumn( - 'time_zone', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn rating = GeneratedColumn( - 'rating', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn projectionType = GeneratedColumn( - 'projection_type', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - @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.string, - 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; - @override - List get customConstraints => const ['PRIMARY KEY(asset_id)']; - @override - bool get dontWriteConstraints => true; -} - -class RemoteExifEntityData extends DataClass - implements Insertable { - final String assetId; - final String? city; - final String? state; - final String? country; - final String? 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, - $customConstraints: - 'NOT NULL REFERENCES remote_asset_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn albumId = GeneratedColumn( - 'album_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: - 'NOT NULL 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; - @override - List get customConstraints => const [ - 'PRIMARY KEY(asset_id, album_id)', - ]; - @override - bool get dontWriteConstraints => 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, - $customConstraints: - 'NOT NULL REFERENCES remote_album_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn userId = GeneratedColumn( - 'user_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL REFERENCES user_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn role = GeneratedColumn( - 'role', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - @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; - @override - List get customConstraints => const [ - 'PRIMARY KEY(album_id, user_id)', - ]; - @override - bool get dontWriteConstraints => 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 RemoteAssetCloudIdEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - RemoteAssetCloudIdEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn assetId = GeneratedColumn( - 'asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: - 'NOT NULL REFERENCES remote_asset_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn cloudId = GeneratedColumn( - 'cloud_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn adjustmentTime = GeneratedColumn( - 'adjustment_time', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn latitude = GeneratedColumn( - 'latitude', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn longitude = GeneratedColumn( - 'longitude', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - @override - List get $columns => [ - assetId, - cloudId, - createdAt, - adjustmentTime, - latitude, - longitude, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'remote_asset_cloud_id_entity'; - @override - Set get $primaryKey => {assetId}; - @override - RemoteAssetCloudIdEntityData map( - Map data, { - String? tablePrefix, - }) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return RemoteAssetCloudIdEntityData( - assetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}asset_id'], - )!, - cloudId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}cloud_id'], - ), - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}created_at'], - ), - adjustmentTime: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}adjustment_time'], - ), - latitude: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}latitude'], - ), - longitude: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}longitude'], - ), - ); - } - - @override - RemoteAssetCloudIdEntity createAlias(String alias) { - return RemoteAssetCloudIdEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY(asset_id)']; - @override - bool get dontWriteConstraints => true; -} - -class RemoteAssetCloudIdEntityData extends DataClass - implements Insertable { - final String assetId; - final String? cloudId; - final String? createdAt; - final String? adjustmentTime; - final double? latitude; - final double? longitude; - const RemoteAssetCloudIdEntityData({ - required this.assetId, - this.cloudId, - this.createdAt, - this.adjustmentTime, - this.latitude, - this.longitude, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['asset_id'] = Variable(assetId); - if (!nullToAbsent || cloudId != null) { - map['cloud_id'] = Variable(cloudId); - } - if (!nullToAbsent || createdAt != null) { - map['created_at'] = Variable(createdAt); - } - if (!nullToAbsent || adjustmentTime != null) { - map['adjustment_time'] = Variable(adjustmentTime); - } - if (!nullToAbsent || latitude != null) { - map['latitude'] = Variable(latitude); - } - if (!nullToAbsent || longitude != null) { - map['longitude'] = Variable(longitude); - } - return map; - } - - factory RemoteAssetCloudIdEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return RemoteAssetCloudIdEntityData( - assetId: serializer.fromJson(json['assetId']), - cloudId: serializer.fromJson(json['cloudId']), - createdAt: serializer.fromJson(json['createdAt']), - adjustmentTime: serializer.fromJson(json['adjustmentTime']), - latitude: serializer.fromJson(json['latitude']), - longitude: serializer.fromJson(json['longitude']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'assetId': serializer.toJson(assetId), - 'cloudId': serializer.toJson(cloudId), - 'createdAt': serializer.toJson(createdAt), - 'adjustmentTime': serializer.toJson(adjustmentTime), - 'latitude': serializer.toJson(latitude), - 'longitude': serializer.toJson(longitude), - }; - } - - RemoteAssetCloudIdEntityData copyWith({ - String? assetId, - Value cloudId = const Value.absent(), - Value createdAt = const Value.absent(), - Value adjustmentTime = const Value.absent(), - Value latitude = const Value.absent(), - Value longitude = const Value.absent(), - }) => RemoteAssetCloudIdEntityData( - assetId: assetId ?? this.assetId, - cloudId: cloudId.present ? cloudId.value : this.cloudId, - createdAt: createdAt.present ? createdAt.value : this.createdAt, - adjustmentTime: adjustmentTime.present - ? adjustmentTime.value - : this.adjustmentTime, - latitude: latitude.present ? latitude.value : this.latitude, - longitude: longitude.present ? longitude.value : this.longitude, - ); - RemoteAssetCloudIdEntityData copyWithCompanion( - RemoteAssetCloudIdEntityCompanion data, - ) { - return RemoteAssetCloudIdEntityData( - assetId: data.assetId.present ? data.assetId.value : this.assetId, - cloudId: data.cloudId.present ? data.cloudId.value : this.cloudId, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - adjustmentTime: data.adjustmentTime.present - ? data.adjustmentTime.value - : this.adjustmentTime, - latitude: data.latitude.present ? data.latitude.value : this.latitude, - longitude: data.longitude.present ? data.longitude.value : this.longitude, - ); - } - - @override - String toString() { - return (StringBuffer('RemoteAssetCloudIdEntityData(') - ..write('assetId: $assetId, ') - ..write('cloudId: $cloudId, ') - ..write('createdAt: $createdAt, ') - ..write('adjustmentTime: $adjustmentTime, ') - ..write('latitude: $latitude, ') - ..write('longitude: $longitude') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - assetId, - cloudId, - createdAt, - adjustmentTime, - latitude, - longitude, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is RemoteAssetCloudIdEntityData && - other.assetId == this.assetId && - other.cloudId == this.cloudId && - other.createdAt == this.createdAt && - other.adjustmentTime == this.adjustmentTime && - other.latitude == this.latitude && - other.longitude == this.longitude); -} - -class RemoteAssetCloudIdEntityCompanion - extends UpdateCompanion { - final Value assetId; - final Value cloudId; - final Value createdAt; - final Value adjustmentTime; - final Value latitude; - final Value longitude; - const RemoteAssetCloudIdEntityCompanion({ - this.assetId = const Value.absent(), - this.cloudId = const Value.absent(), - this.createdAt = const Value.absent(), - this.adjustmentTime = const Value.absent(), - this.latitude = const Value.absent(), - this.longitude = const Value.absent(), - }); - RemoteAssetCloudIdEntityCompanion.insert({ - required String assetId, - this.cloudId = const Value.absent(), - this.createdAt = const Value.absent(), - this.adjustmentTime = const Value.absent(), - this.latitude = const Value.absent(), - this.longitude = const Value.absent(), - }) : assetId = Value(assetId); - static Insertable custom({ - Expression? assetId, - Expression? cloudId, - Expression? createdAt, - Expression? adjustmentTime, - Expression? latitude, - Expression? longitude, - }) { - return RawValuesInsertable({ - if (assetId != null) 'asset_id': assetId, - if (cloudId != null) 'cloud_id': cloudId, - if (createdAt != null) 'created_at': createdAt, - if (adjustmentTime != null) 'adjustment_time': adjustmentTime, - if (latitude != null) 'latitude': latitude, - if (longitude != null) 'longitude': longitude, - }); - } - - RemoteAssetCloudIdEntityCompanion copyWith({ - Value? assetId, - Value? cloudId, - Value? createdAt, - Value? adjustmentTime, - Value? latitude, - Value? longitude, - }) { - return RemoteAssetCloudIdEntityCompanion( - assetId: assetId ?? this.assetId, - cloudId: cloudId ?? this.cloudId, - createdAt: createdAt ?? this.createdAt, - adjustmentTime: adjustmentTime ?? this.adjustmentTime, - latitude: latitude ?? this.latitude, - longitude: longitude ?? this.longitude, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (assetId.present) { - map['asset_id'] = Variable(assetId.value); - } - if (cloudId.present) { - map['cloud_id'] = Variable(cloudId.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (adjustmentTime.present) { - map['adjustment_time'] = Variable(adjustmentTime.value); - } - if (latitude.present) { - map['latitude'] = Variable(latitude.value); - } - if (longitude.present) { - map['longitude'] = Variable(longitude.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('RemoteAssetCloudIdEntityCompanion(') - ..write('assetId: $assetId, ') - ..write('cloudId: $cloudId, ') - ..write('createdAt: $createdAt, ') - ..write('adjustmentTime: $adjustmentTime, ') - ..write('latitude: $latitude, ') - ..write('longitude: $longitude') - ..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, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn deletedAt = GeneratedColumn( - 'deleted_at', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn ownerId = GeneratedColumn( - 'owner_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL REFERENCES user_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn type = GeneratedColumn( - 'type', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn data = GeneratedColumn( - 'data', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn isSaved = GeneratedColumn( - 'is_saved', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0 CHECK (is_saved IN (0, 1))', - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn memoryAt = GeneratedColumn( - 'memory_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn seenAt = GeneratedColumn( - 'seen_at', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn showAt = GeneratedColumn( - 'show_at', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn hideAt = GeneratedColumn( - 'hide_at', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - @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.string, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}updated_at'], - )!, - deletedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - 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.int, - data['${effectivePrefix}is_saved'], - )!, - memoryAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}memory_at'], - )!, - seenAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}seen_at'], - ), - showAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}show_at'], - ), - hideAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}hide_at'], - ), - ); - } - - @override - MemoryEntity createAlias(String alias) { - return MemoryEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY(id)']; - @override - bool get dontWriteConstraints => true; -} - -class MemoryEntityData extends DataClass - implements Insertable { - final String id; - final String createdAt; - final String updatedAt; - final String? deletedAt; - final String ownerId; - final int type; - final String data; - final int isSaved; - final String memoryAt; - final String? seenAt; - final String? showAt; - final String? 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, - String? createdAt, - String? updatedAt, - Value deletedAt = const Value.absent(), - String? ownerId, - int? type, - String? data, - int? isSaved, - String? 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 String 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, - $customConstraints: - 'NOT NULL REFERENCES remote_asset_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn memoryId = GeneratedColumn( - 'memory_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: - 'NOT NULL 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; - @override - List get customConstraints => const [ - 'PRIMARY KEY(asset_id, memory_id)', - ]; - @override - bool get dontWriteConstraints => 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, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn ownerId = GeneratedColumn( - 'owner_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL REFERENCES user_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn faceAssetId = GeneratedColumn( - 'face_asset_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn isFavorite = GeneratedColumn( - 'is_favorite', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL CHECK (is_favorite IN (0, 1))', - ); - late final GeneratedColumn isHidden = GeneratedColumn( - 'is_hidden', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL CHECK (is_hidden IN (0, 1))', - ); - late final GeneratedColumn color = GeneratedColumn( - 'color', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn birthDate = GeneratedColumn( - 'birth_date', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - @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.string, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - 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.int, - data['${effectivePrefix}is_favorite'], - )!, - isHidden: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}is_hidden'], - )!, - color: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}color'], - ), - birthDate: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}birth_date'], - ), - ); - } - - @override - PersonEntity createAlias(String alias) { - return PersonEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY(id)']; - @override - bool get dontWriteConstraints => true; -} - -class PersonEntityData extends DataClass - implements Insertable { - final String id; - final String createdAt; - final String updatedAt; - final String ownerId; - final String name; - final String? faceAssetId; - final int isFavorite; - final int isHidden; - final String? color; - final String? 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, - String? createdAt, - String? updatedAt, - String? ownerId, - String? name, - Value faceAssetId = const Value.absent(), - int? isFavorite, - int? 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 int isFavorite, - required int 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, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn assetId = GeneratedColumn( - 'asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: - 'NOT NULL REFERENCES remote_asset_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn personId = GeneratedColumn( - 'person_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL REFERENCES person_entity(id)ON DELETE SET NULL', - ); - late final GeneratedColumn imageWidth = GeneratedColumn( - 'image_width', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn imageHeight = GeneratedColumn( - 'image_height', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn boundingBoxX1 = GeneratedColumn( - 'bounding_box_x1', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn boundingBoxY1 = GeneratedColumn( - 'bounding_box_y1', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn boundingBoxX2 = GeneratedColumn( - 'bounding_box_x2', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn boundingBoxY2 = GeneratedColumn( - 'bounding_box_y2', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn sourceType = GeneratedColumn( - 'source_type', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn isVisible = GeneratedColumn( - 'is_visible', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 1 CHECK (is_visible IN (0, 1))', - defaultValue: const CustomExpression('1'), - ); - late final GeneratedColumn deletedAt = GeneratedColumn( - 'deleted_at', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - @override - List get $columns => [ - id, - assetId, - personId, - imageWidth, - imageHeight, - boundingBoxX1, - boundingBoxY1, - boundingBoxX2, - boundingBoxY2, - sourceType, - isVisible, - deletedAt, - ]; - @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'], - )!, - isVisible: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}is_visible'], - )!, - deletedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}deleted_at'], - ), - ); - } - - @override - AssetFaceEntity createAlias(String alias) { - return AssetFaceEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY(id)']; - @override - bool get dontWriteConstraints => 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; - final int isVisible; - final String? deletedAt; - 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, - required this.isVisible, - this.deletedAt, - }); - @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); - map['is_visible'] = Variable(isVisible); - if (!nullToAbsent || deletedAt != null) { - map['deleted_at'] = Variable(deletedAt); - } - 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']), - isVisible: serializer.fromJson(json['isVisible']), - deletedAt: serializer.fromJson(json['deletedAt']), - ); - } - @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), - 'isVisible': serializer.toJson(isVisible), - 'deletedAt': serializer.toJson(deletedAt), - }; - } - - 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, - int? isVisible, - Value deletedAt = const Value.absent(), - }) => 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, - isVisible: isVisible ?? this.isVisible, - deletedAt: deletedAt.present ? deletedAt.value : this.deletedAt, - ); - 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, - isVisible: data.isVisible.present ? data.isVisible.value : this.isVisible, - deletedAt: data.deletedAt.present ? data.deletedAt.value : this.deletedAt, - ); - } - - @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('isVisible: $isVisible, ') - ..write('deletedAt: $deletedAt') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - assetId, - personId, - imageWidth, - imageHeight, - boundingBoxX1, - boundingBoxY1, - boundingBoxX2, - boundingBoxY2, - sourceType, - isVisible, - deletedAt, - ); - @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 && - other.isVisible == this.isVisible && - other.deletedAt == this.deletedAt); -} - -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; - final Value isVisible; - final Value deletedAt; - 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(), - this.isVisible = const Value.absent(), - this.deletedAt = 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, - this.isVisible = const Value.absent(), - this.deletedAt = const Value.absent(), - }) : 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, - Expression? isVisible, - Expression? deletedAt, - }) { - 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, - if (isVisible != null) 'is_visible': isVisible, - if (deletedAt != null) 'deleted_at': deletedAt, - }); - } - - AssetFaceEntityCompanion copyWith({ - Value? id, - Value? assetId, - Value? personId, - Value? imageWidth, - Value? imageHeight, - Value? boundingBoxX1, - Value? boundingBoxY1, - Value? boundingBoxX2, - Value? boundingBoxY2, - Value? sourceType, - Value? isVisible, - Value? deletedAt, - }) { - 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, - isVisible: isVisible ?? this.isVisible, - deletedAt: deletedAt ?? this.deletedAt, - ); - } - - @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); - } - if (isVisible.present) { - map['is_visible'] = Variable(isVisible.value); - } - if (deletedAt.present) { - map['deleted_at'] = Variable(deletedAt.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('isVisible: $isVisible, ') - ..write('deletedAt: $deletedAt') - ..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, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn stringValue = GeneratedColumn( - 'string_value', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn intValue = GeneratedColumn( - 'int_value', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - @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; - @override - List get customConstraints => const ['PRIMARY KEY(id)']; - @override - bool get dontWriteConstraints => 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, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn type = GeneratedColumn( - 'type', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn width = GeneratedColumn( - 'width', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn height = GeneratedColumn( - 'height', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn durationMs = GeneratedColumn( - 'duration_ms', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn albumId = GeneratedColumn( - 'album_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn checksum = GeneratedColumn( - 'checksum', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn isFavorite = GeneratedColumn( - 'is_favorite', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0 CHECK (is_favorite IN (0, 1))', - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn orientation = GeneratedColumn( - 'orientation', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0', - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn source = GeneratedColumn( - 'source', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn playbackStyle = GeneratedColumn( - 'playback_style', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0', - defaultValue: const CustomExpression('0'), - ); - @override - List get $columns => [ - name, - type, - createdAt, - updatedAt, - width, - height, - durationMs, - id, - albumId, - checksum, - isFavorite, - orientation, - source, - playbackStyle, - ]; - @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.string, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}updated_at'], - )!, - width: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}width'], - ), - height: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}height'], - ), - durationMs: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}duration_ms'], - ), - 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.int, - data['${effectivePrefix}is_favorite'], - )!, - orientation: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}orientation'], - )!, - source: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}source'], - )!, - playbackStyle: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}playback_style'], - )!, - ); - } - - @override - TrashedLocalAssetEntity createAlias(String alias) { - return TrashedLocalAssetEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY(id, album_id)']; - @override - bool get dontWriteConstraints => true; -} - -class TrashedLocalAssetEntityData extends DataClass - implements Insertable { - final String name; - final int type; - final String createdAt; - final String updatedAt; - final int? width; - final int? height; - final int? durationMs; - final String id; - final String albumId; - final String? checksum; - final int isFavorite; - final int orientation; - final int source; - final int playbackStyle; - const TrashedLocalAssetEntityData({ - required this.name, - required this.type, - required this.createdAt, - required this.updatedAt, - this.width, - this.height, - this.durationMs, - required this.id, - required this.albumId, - this.checksum, - required this.isFavorite, - required this.orientation, - required this.source, - required this.playbackStyle, - }); - @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 || durationMs != null) { - map['duration_ms'] = Variable(durationMs); - } - 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); - map['source'] = Variable(source); - map['playback_style'] = Variable(playbackStyle); - 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']), - durationMs: serializer.fromJson(json['durationMs']), - 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']), - source: serializer.fromJson(json['source']), - playbackStyle: serializer.fromJson(json['playbackStyle']), - ); - } - @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), - 'durationMs': serializer.toJson(durationMs), - 'id': serializer.toJson(id), - 'albumId': serializer.toJson(albumId), - 'checksum': serializer.toJson(checksum), - 'isFavorite': serializer.toJson(isFavorite), - 'orientation': serializer.toJson(orientation), - 'source': serializer.toJson(source), - 'playbackStyle': serializer.toJson(playbackStyle), - }; - } - - TrashedLocalAssetEntityData copyWith({ - String? name, - int? type, - String? createdAt, - String? updatedAt, - Value width = const Value.absent(), - Value height = const Value.absent(), - Value durationMs = const Value.absent(), - String? id, - String? albumId, - Value checksum = const Value.absent(), - int? isFavorite, - int? orientation, - int? source, - int? playbackStyle, - }) => 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, - durationMs: durationMs.present ? durationMs.value : this.durationMs, - id: id ?? this.id, - albumId: albumId ?? this.albumId, - checksum: checksum.present ? checksum.value : this.checksum, - isFavorite: isFavorite ?? this.isFavorite, - orientation: orientation ?? this.orientation, - source: source ?? this.source, - playbackStyle: playbackStyle ?? this.playbackStyle, - ); - 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, - durationMs: data.durationMs.present - ? data.durationMs.value - : this.durationMs, - 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, - source: data.source.present ? data.source.value : this.source, - playbackStyle: data.playbackStyle.present - ? data.playbackStyle.value - : this.playbackStyle, - ); - } - - @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('durationMs: $durationMs, ') - ..write('id: $id, ') - ..write('albumId: $albumId, ') - ..write('checksum: $checksum, ') - ..write('isFavorite: $isFavorite, ') - ..write('orientation: $orientation, ') - ..write('source: $source, ') - ..write('playbackStyle: $playbackStyle') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - name, - type, - createdAt, - updatedAt, - width, - height, - durationMs, - id, - albumId, - checksum, - isFavorite, - orientation, - source, - playbackStyle, - ); - @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.durationMs == this.durationMs && - other.id == this.id && - other.albumId == this.albumId && - other.checksum == this.checksum && - other.isFavorite == this.isFavorite && - other.orientation == this.orientation && - other.source == this.source && - other.playbackStyle == this.playbackStyle); -} - -class TrashedLocalAssetEntityCompanion - extends UpdateCompanion { - final Value name; - final Value type; - final Value createdAt; - final Value updatedAt; - final Value width; - final Value height; - final Value durationMs; - final Value id; - final Value albumId; - final Value checksum; - final Value isFavorite; - final Value orientation; - final Value source; - final Value playbackStyle; - 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.durationMs = 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(), - this.source = const Value.absent(), - this.playbackStyle = 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.durationMs = const Value.absent(), - required String id, - required String albumId, - this.checksum = const Value.absent(), - this.isFavorite = const Value.absent(), - this.orientation = const Value.absent(), - required int source, - this.playbackStyle = const Value.absent(), - }) : name = Value(name), - type = Value(type), - id = Value(id), - albumId = Value(albumId), - source = Value(source); - static Insertable custom({ - Expression? name, - Expression? type, - Expression? createdAt, - Expression? updatedAt, - Expression? width, - Expression? height, - Expression? durationMs, - Expression? id, - Expression? albumId, - Expression? checksum, - Expression? isFavorite, - Expression? orientation, - Expression? source, - Expression? playbackStyle, - }) { - 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 (durationMs != null) 'duration_ms': durationMs, - 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, - if (source != null) 'source': source, - if (playbackStyle != null) 'playback_style': playbackStyle, - }); - } - - TrashedLocalAssetEntityCompanion copyWith({ - Value? name, - Value? type, - Value? createdAt, - Value? updatedAt, - Value? width, - Value? height, - Value? durationMs, - Value? id, - Value? albumId, - Value? checksum, - Value? isFavorite, - Value? orientation, - Value? source, - Value? playbackStyle, - }) { - 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, - durationMs: durationMs ?? this.durationMs, - id: id ?? this.id, - albumId: albumId ?? this.albumId, - checksum: checksum ?? this.checksum, - isFavorite: isFavorite ?? this.isFavorite, - orientation: orientation ?? this.orientation, - source: source ?? this.source, - playbackStyle: playbackStyle ?? this.playbackStyle, - ); - } - - @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 (durationMs.present) { - map['duration_ms'] = Variable(durationMs.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); - } - if (source.present) { - map['source'] = Variable(source.value); - } - if (playbackStyle.present) { - map['playback_style'] = Variable(playbackStyle.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('durationMs: $durationMs, ') - ..write('id: $id, ') - ..write('albumId: $albumId, ') - ..write('checksum: $checksum, ') - ..write('isFavorite: $isFavorite, ') - ..write('orientation: $orientation, ') - ..write('source: $source, ') - ..write('playbackStyle: $playbackStyle') - ..write(')')) - .toString(); - } -} - -class AssetEditEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - AssetEditEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn assetId = GeneratedColumn( - 'asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: - 'NOT NULL REFERENCES remote_asset_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn action = GeneratedColumn( - 'action', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn parameters = - GeneratedColumn( - 'parameters', - aliasedName, - false, - type: DriftSqlType.blob, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn sequence = GeneratedColumn( - 'sequence', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - @override - List get $columns => [ - id, - assetId, - action, - parameters, - sequence, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'asset_edit_entity'; - @override - Set get $primaryKey => {id}; - @override - AssetEditEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return AssetEditEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - assetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}asset_id'], - )!, - action: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}action'], - )!, - parameters: attachedDatabase.typeMapping.read( - DriftSqlType.blob, - data['${effectivePrefix}parameters'], - )!, - sequence: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}sequence'], - )!, - ); - } - - @override - AssetEditEntity createAlias(String alias) { - return AssetEditEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY(id)']; - @override - bool get dontWriteConstraints => true; -} - -class AssetEditEntityData extends DataClass - implements Insertable { - final String id; - final String assetId; - final int action; - final i2.Uint8List parameters; - final int sequence; - const AssetEditEntityData({ - required this.id, - required this.assetId, - required this.action, - required this.parameters, - required this.sequence, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['asset_id'] = Variable(assetId); - map['action'] = Variable(action); - map['parameters'] = Variable(parameters); - map['sequence'] = Variable(sequence); - return map; - } - - factory AssetEditEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return AssetEditEntityData( - id: serializer.fromJson(json['id']), - assetId: serializer.fromJson(json['assetId']), - action: serializer.fromJson(json['action']), - parameters: serializer.fromJson(json['parameters']), - sequence: serializer.fromJson(json['sequence']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'assetId': serializer.toJson(assetId), - 'action': serializer.toJson(action), - 'parameters': serializer.toJson(parameters), - 'sequence': serializer.toJson(sequence), - }; - } - - AssetEditEntityData copyWith({ - String? id, - String? assetId, - int? action, - i2.Uint8List? parameters, - int? sequence, - }) => AssetEditEntityData( - id: id ?? this.id, - assetId: assetId ?? this.assetId, - action: action ?? this.action, - parameters: parameters ?? this.parameters, - sequence: sequence ?? this.sequence, - ); - AssetEditEntityData copyWithCompanion(AssetEditEntityCompanion data) { - return AssetEditEntityData( - id: data.id.present ? data.id.value : this.id, - assetId: data.assetId.present ? data.assetId.value : this.assetId, - action: data.action.present ? data.action.value : this.action, - parameters: data.parameters.present - ? data.parameters.value - : this.parameters, - sequence: data.sequence.present ? data.sequence.value : this.sequence, - ); - } - - @override - String toString() { - return (StringBuffer('AssetEditEntityData(') - ..write('id: $id, ') - ..write('assetId: $assetId, ') - ..write('action: $action, ') - ..write('parameters: $parameters, ') - ..write('sequence: $sequence') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - assetId, - action, - $driftBlobEquality.hash(parameters), - sequence, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is AssetEditEntityData && - other.id == this.id && - other.assetId == this.assetId && - other.action == this.action && - $driftBlobEquality.equals(other.parameters, this.parameters) && - other.sequence == this.sequence); -} - -class AssetEditEntityCompanion extends UpdateCompanion { - final Value id; - final Value assetId; - final Value action; - final Value parameters; - final Value sequence; - const AssetEditEntityCompanion({ - this.id = const Value.absent(), - this.assetId = const Value.absent(), - this.action = const Value.absent(), - this.parameters = const Value.absent(), - this.sequence = const Value.absent(), - }); - AssetEditEntityCompanion.insert({ - required String id, - required String assetId, - required int action, - required i2.Uint8List parameters, - required int sequence, - }) : id = Value(id), - assetId = Value(assetId), - action = Value(action), - parameters = Value(parameters), - sequence = Value(sequence); - static Insertable custom({ - Expression? id, - Expression? assetId, - Expression? action, - Expression? parameters, - Expression? sequence, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (assetId != null) 'asset_id': assetId, - if (action != null) 'action': action, - if (parameters != null) 'parameters': parameters, - if (sequence != null) 'sequence': sequence, - }); - } - - AssetEditEntityCompanion copyWith({ - Value? id, - Value? assetId, - Value? action, - Value? parameters, - Value? sequence, - }) { - return AssetEditEntityCompanion( - id: id ?? this.id, - assetId: assetId ?? this.assetId, - action: action ?? this.action, - parameters: parameters ?? this.parameters, - sequence: sequence ?? this.sequence, - ); - } - - @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 (action.present) { - map['action'] = Variable(action.value); - } - if (parameters.present) { - map['parameters'] = Variable(parameters.value); - } - if (sequence.present) { - map['sequence'] = Variable(sequence.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('AssetEditEntityCompanion(') - ..write('id: $id, ') - ..write('assetId: $assetId, ') - ..write('action: $action, ') - ..write('parameters: $parameters, ') - ..write('sequence: $sequence') - ..write(')')) - .toString(); - } -} - -class Metadata extends Table with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - Metadata(this.attachedDatabase, [this._alias]); - late final GeneratedColumn key = GeneratedColumn( - 'key', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn value = GeneratedColumn( - 'value', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - @override - List get $columns => [key, value, updatedAt]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'metadata'; - @override - Set get $primaryKey => {key}; - @override - MetadataData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return MetadataData( - key: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}key'], - )!, - value: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}value'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}updated_at'], - )!, - ); - } - - @override - Metadata createAlias(String alias) { - return Metadata(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY("key")']; - @override - bool get dontWriteConstraints => true; -} - -class MetadataData extends DataClass implements Insertable { - final String key; - final String value; - final String updatedAt; - const MetadataData({ - required this.key, - required this.value, - required this.updatedAt, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['key'] = Variable(key); - map['value'] = Variable(value); - map['updated_at'] = Variable(updatedAt); - return map; - } - - factory MetadataData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return MetadataData( - key: serializer.fromJson(json['key']), - value: serializer.fromJson(json['value']), - updatedAt: serializer.fromJson(json['updatedAt']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'key': serializer.toJson(key), - 'value': serializer.toJson(value), - 'updatedAt': serializer.toJson(updatedAt), - }; - } - - MetadataData copyWith({String? key, String? value, String? updatedAt}) => - MetadataData( - key: key ?? this.key, - value: value ?? this.value, - updatedAt: updatedAt ?? this.updatedAt, - ); - MetadataData copyWithCompanion(MetadataCompanion data) { - return MetadataData( - key: data.key.present ? data.key.value : this.key, - value: data.value.present ? data.value.value : this.value, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - ); - } - - @override - String toString() { - return (StringBuffer('MetadataData(') - ..write('key: $key, ') - ..write('value: $value, ') - ..write('updatedAt: $updatedAt') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(key, value, updatedAt); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is MetadataData && - other.key == this.key && - other.value == this.value && - other.updatedAt == this.updatedAt); -} - -class MetadataCompanion extends UpdateCompanion { - final Value key; - final Value value; - final Value updatedAt; - const MetadataCompanion({ - this.key = const Value.absent(), - this.value = const Value.absent(), - this.updatedAt = const Value.absent(), - }); - MetadataCompanion.insert({ - required String key, - required String value, - this.updatedAt = const Value.absent(), - }) : key = Value(key), - value = Value(value); - static Insertable custom({ - Expression? key, - Expression? value, - Expression? updatedAt, - }) { - return RawValuesInsertable({ - if (key != null) 'key': key, - if (value != null) 'value': value, - if (updatedAt != null) 'updated_at': updatedAt, - }); - } - - MetadataCompanion copyWith({ - Value? key, - Value? value, - Value? updatedAt, - }) { - return MetadataCompanion( - key: key ?? this.key, - value: value ?? this.value, - updatedAt: updatedAt ?? this.updatedAt, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (key.present) { - map['key'] = Variable(key.value); - } - if (value.present) { - map['value'] = Variable(value.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('MetadataCompanion(') - ..write('key: $key, ') - ..write('value: $value, ') - ..write('updatedAt: $updatedAt') - ..write(')')) - .toString(); - } -} - -class DatabaseAtV25 extends GeneratedDatabase { - DatabaseAtV25(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 idxLocalAlbumAssetAlbumAsset = Index( - 'idx_local_album_asset_album_asset', - 'CREATE INDEX IF NOT EXISTS idx_local_album_asset_album_asset ON local_album_asset_entity (album_id, asset_id)', - ); - 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 idxLocalAssetCloudId = Index( - 'idx_local_asset_cloud_id', - 'CREATE INDEX IF NOT EXISTS idx_local_asset_cloud_id ON local_asset_entity (i_cloud_id)', - ); - late final Index idxStackPrimaryAssetId = Index( - 'idx_stack_primary_asset_id', - 'CREATE INDEX IF NOT EXISTS idx_stack_primary_asset_id ON stack_entity (primary_asset_id)', - ); - 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 Index idxRemoteAssetStackId = Index( - 'idx_remote_asset_stack_id', - 'CREATE INDEX IF NOT EXISTS idx_remote_asset_stack_id ON remote_asset_entity (stack_id)', - ); - late final Index idxRemoteAssetOwnerVisibilityDeletedCreated = Index( - 'idx_remote_asset_owner_visibility_deleted_created', - 'CREATE INDEX IF NOT EXISTS idx_remote_asset_owner_visibility_deleted_created ON remote_asset_entity (owner_id, visibility, deleted_at, created_at DESC)', - ); - 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 RemoteAssetCloudIdEntity remoteAssetCloudIdEntity = - RemoteAssetCloudIdEntity(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 AssetEditEntity assetEditEntity = AssetEditEntity(this); - late final Metadata metadata = Metadata(this); - late final Index idxPartnerSharedWithId = Index( - 'idx_partner_shared_with_id', - 'CREATE INDEX IF NOT EXISTS idx_partner_shared_with_id ON partner_entity (shared_with_id)', - ); - 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 idxRemoteExifCity = Index( - 'idx_remote_exif_city', - 'CREATE INDEX IF NOT EXISTS idx_remote_exif_city ON remote_exif_entity (city) WHERE city IS NOT NULL', - ); - late final Index idxRemoteAlbumAssetAlbumAsset = Index( - 'idx_remote_album_asset_album_asset', - 'CREATE INDEX IF NOT EXISTS idx_remote_album_asset_album_asset ON remote_album_asset_entity (album_id, asset_id)', - ); - late final Index idxRemoteAssetCloudId = Index( - 'idx_remote_asset_cloud_id', - 'CREATE INDEX IF NOT EXISTS idx_remote_asset_cloud_id ON remote_asset_cloud_id_entity (cloud_id)', - ); - late final Index idxPersonOwnerId = Index( - 'idx_person_owner_id', - 'CREATE INDEX IF NOT EXISTS idx_person_owner_id ON person_entity (owner_id)', - ); - late final Index idxAssetFacePersonId = Index( - 'idx_asset_face_person_id', - 'CREATE INDEX IF NOT EXISTS idx_asset_face_person_id ON asset_face_entity (person_id)', - ); - late final Index idxAssetFaceAssetId = Index( - 'idx_asset_face_asset_id', - 'CREATE INDEX IF NOT EXISTS idx_asset_face_asset_id ON asset_face_entity (asset_id)', - ); - late final Index idxAssetFaceVisiblePerson = Index( - 'idx_asset_face_visible_person', - 'CREATE INDEX IF NOT EXISTS idx_asset_face_visible_person ON asset_face_entity (person_id, asset_id) WHERE is_visible = 1 AND deleted_at IS NULL', - ); - 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)', - ); - late final Index idxAssetEditAssetId = Index( - 'idx_asset_edit_asset_id', - 'CREATE INDEX IF NOT EXISTS idx_asset_edit_asset_id ON asset_edit_entity (asset_id)', - ); - @override - Iterable> get allTables => - allSchemaEntities.whereType>(); - @override - List get allSchemaEntities => [ - userEntity, - remoteAssetEntity, - stackEntity, - localAssetEntity, - remoteAlbumEntity, - localAlbumEntity, - localAlbumAssetEntity, - idxLocalAlbumAssetAlbumAsset, - idxLocalAssetChecksum, - idxLocalAssetCloudId, - idxStackPrimaryAssetId, - uQRemoteAssetsOwnerChecksum, - uQRemoteAssetsOwnerLibraryChecksum, - idxRemoteAssetChecksum, - idxRemoteAssetStackId, - idxRemoteAssetOwnerVisibilityDeletedCreated, - authUserEntity, - userMetadataEntity, - partnerEntity, - remoteExifEntity, - remoteAlbumAssetEntity, - remoteAlbumUserEntity, - remoteAssetCloudIdEntity, - memoryEntity, - memoryAssetEntity, - personEntity, - assetFaceEntity, - storeEntity, - trashedLocalAssetEntity, - assetEditEntity, - metadata, - idxPartnerSharedWithId, - idxLatLng, - idxRemoteExifCity, - idxRemoteAlbumAssetAlbumAsset, - idxRemoteAssetCloudId, - idxPersonOwnerId, - idxAssetFacePersonId, - idxAssetFaceAssetId, - idxAssetFaceVisiblePerson, - idxTrashedLocalAssetChecksum, - idxTrashedLocalAssetAlbum, - idxAssetEditAssetId, - ]; - @override - StreamQueryUpdateRules get streamUpdateRules => const StreamQueryUpdateRules([ - WritePropagation( - on: TableUpdateQuery.onTableName( - 'user_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('remote_asset_entity', kind: UpdateKind.delete)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'user_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('stack_entity', kind: UpdateKind.delete)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'remote_asset_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('remote_album_entity', kind: UpdateKind.update)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'remote_album_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('local_album_entity', kind: UpdateKind.update)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'local_asset_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [ - TableUpdate('local_album_asset_entity', kind: UpdateKind.delete), - ], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'local_album_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [ - TableUpdate('local_album_asset_entity', kind: UpdateKind.delete), - ], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'user_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('user_metadata_entity', kind: UpdateKind.delete)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'user_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('partner_entity', kind: UpdateKind.delete)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'user_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('partner_entity', kind: UpdateKind.delete)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'remote_asset_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('remote_exif_entity', kind: UpdateKind.delete)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'remote_asset_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [ - TableUpdate('remote_album_asset_entity', kind: UpdateKind.delete), - ], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'remote_album_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [ - TableUpdate('remote_album_asset_entity', kind: UpdateKind.delete), - ], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'remote_album_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [ - TableUpdate('remote_album_user_entity', kind: UpdateKind.delete), - ], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'user_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [ - TableUpdate('remote_album_user_entity', kind: UpdateKind.delete), - ], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'remote_asset_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [ - TableUpdate('remote_asset_cloud_id_entity', kind: UpdateKind.delete), - ], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'user_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('memory_entity', kind: UpdateKind.delete)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'remote_asset_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('memory_asset_entity', kind: UpdateKind.delete)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'memory_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('memory_asset_entity', kind: UpdateKind.delete)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'user_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('person_entity', kind: UpdateKind.delete)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'remote_asset_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('asset_face_entity', kind: UpdateKind.delete)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'person_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('asset_face_entity', kind: UpdateKind.update)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'remote_asset_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('asset_edit_entity', kind: UpdateKind.delete)], - ), - ]); - @override - int get schemaVersion => 25; - @override - DriftDatabaseOptions get options => - const DriftDatabaseOptions(storeDateTimeAsText: true); -} diff --git a/mobile/test/drift/main/generated/schema_v26.dart b/mobile/test/drift/main/generated/schema_v26.dart deleted file mode 100644 index b91afd1b8a..0000000000 --- a/mobile/test/drift/main/generated/schema_v26.dart +++ /dev/null @@ -1,9384 +0,0 @@ -// dart format width=80 -import 'dart:typed_data' as i2; -// GENERATED BY drift_dev, DO NOT MODIFY. -// ignore_for_file: type=lint,unused_import -// -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, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn email = GeneratedColumn( - 'email', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn hasProfileImage = GeneratedColumn( - 'has_profile_image', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: - 'NOT NULL DEFAULT 0 CHECK (has_profile_image IN (0, 1))', - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn profileChangedAt = GeneratedColumn( - 'profile_changed_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn avatarColor = GeneratedColumn( - 'avatar_color', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0', - 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.int, - data['${effectivePrefix}has_profile_image'], - )!, - profileChangedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - 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; - @override - List get customConstraints => const ['PRIMARY KEY(id)']; - @override - bool get dontWriteConstraints => true; -} - -class UserEntityData extends DataClass implements Insertable { - final String id; - final String name; - final String email; - final int hasProfileImage; - final String 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, - int? hasProfileImage, - String? 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, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn type = GeneratedColumn( - 'type', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn width = GeneratedColumn( - 'width', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn height = GeneratedColumn( - 'height', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn durationMs = GeneratedColumn( - 'duration_ms', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn checksum = GeneratedColumn( - 'checksum', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn isFavorite = GeneratedColumn( - 'is_favorite', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0 CHECK (is_favorite IN (0, 1))', - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn ownerId = GeneratedColumn( - 'owner_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL REFERENCES user_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn localDateTime = GeneratedColumn( - 'local_date_time', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn thumbHash = GeneratedColumn( - 'thumb_hash', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn deletedAt = GeneratedColumn( - 'deleted_at', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn uploadedAt = GeneratedColumn( - 'uploaded_at', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn livePhotoVideoId = GeneratedColumn( - 'live_photo_video_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn visibility = GeneratedColumn( - 'visibility', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn stackId = GeneratedColumn( - 'stack_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn libraryId = GeneratedColumn( - 'library_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn isEdited = GeneratedColumn( - 'is_edited', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0 CHECK (is_edited IN (0, 1))', - defaultValue: const CustomExpression('0'), - ); - @override - List get $columns => [ - name, - type, - createdAt, - updatedAt, - width, - height, - durationMs, - id, - checksum, - isFavorite, - ownerId, - localDateTime, - thumbHash, - deletedAt, - uploadedAt, - livePhotoVideoId, - visibility, - stackId, - libraryId, - isEdited, - ]; - @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.string, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}updated_at'], - )!, - width: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}width'], - ), - height: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}height'], - ), - durationMs: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}duration_ms'], - ), - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - checksum: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}checksum'], - )!, - isFavorite: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}is_favorite'], - )!, - ownerId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}owner_id'], - )!, - localDateTime: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}local_date_time'], - ), - thumbHash: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}thumb_hash'], - ), - deletedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}deleted_at'], - ), - uploadedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}uploaded_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'], - ), - isEdited: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}is_edited'], - )!, - ); - } - - @override - RemoteAssetEntity createAlias(String alias) { - return RemoteAssetEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY(id)']; - @override - bool get dontWriteConstraints => true; -} - -class RemoteAssetEntityData extends DataClass - implements Insertable { - final String name; - final int type; - final String createdAt; - final String updatedAt; - final int? width; - final int? height; - final int? durationMs; - final String id; - final String checksum; - final int isFavorite; - final String ownerId; - final String? localDateTime; - final String? thumbHash; - final String? deletedAt; - final String? uploadedAt; - final String? livePhotoVideoId; - final int visibility; - final String? stackId; - final String? libraryId; - final int isEdited; - const RemoteAssetEntityData({ - required this.name, - required this.type, - required this.createdAt, - required this.updatedAt, - this.width, - this.height, - this.durationMs, - required this.id, - required this.checksum, - required this.isFavorite, - required this.ownerId, - this.localDateTime, - this.thumbHash, - this.deletedAt, - this.uploadedAt, - this.livePhotoVideoId, - required this.visibility, - this.stackId, - this.libraryId, - required this.isEdited, - }); - @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 || durationMs != null) { - map['duration_ms'] = Variable(durationMs); - } - 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 || uploadedAt != null) { - map['uploaded_at'] = Variable(uploadedAt); - } - 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); - } - map['is_edited'] = Variable(isEdited); - 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']), - durationMs: serializer.fromJson(json['durationMs']), - 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']), - uploadedAt: serializer.fromJson(json['uploadedAt']), - livePhotoVideoId: serializer.fromJson(json['livePhotoVideoId']), - visibility: serializer.fromJson(json['visibility']), - stackId: serializer.fromJson(json['stackId']), - libraryId: serializer.fromJson(json['libraryId']), - isEdited: serializer.fromJson(json['isEdited']), - ); - } - @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), - 'durationMs': serializer.toJson(durationMs), - '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), - 'uploadedAt': serializer.toJson(uploadedAt), - 'livePhotoVideoId': serializer.toJson(livePhotoVideoId), - 'visibility': serializer.toJson(visibility), - 'stackId': serializer.toJson(stackId), - 'libraryId': serializer.toJson(libraryId), - 'isEdited': serializer.toJson(isEdited), - }; - } - - RemoteAssetEntityData copyWith({ - String? name, - int? type, - String? createdAt, - String? updatedAt, - Value width = const Value.absent(), - Value height = const Value.absent(), - Value durationMs = const Value.absent(), - String? id, - String? checksum, - int? isFavorite, - String? ownerId, - Value localDateTime = const Value.absent(), - Value thumbHash = const Value.absent(), - Value deletedAt = const Value.absent(), - Value uploadedAt = const Value.absent(), - Value livePhotoVideoId = const Value.absent(), - int? visibility, - Value stackId = const Value.absent(), - Value libraryId = const Value.absent(), - int? isEdited, - }) => 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, - durationMs: durationMs.present ? durationMs.value : this.durationMs, - 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, - uploadedAt: uploadedAt.present ? uploadedAt.value : this.uploadedAt, - 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, - isEdited: isEdited ?? this.isEdited, - ); - 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, - durationMs: data.durationMs.present - ? data.durationMs.value - : this.durationMs, - 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, - uploadedAt: data.uploadedAt.present - ? data.uploadedAt.value - : this.uploadedAt, - 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, - isEdited: data.isEdited.present ? data.isEdited.value : this.isEdited, - ); - } - - @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('durationMs: $durationMs, ') - ..write('id: $id, ') - ..write('checksum: $checksum, ') - ..write('isFavorite: $isFavorite, ') - ..write('ownerId: $ownerId, ') - ..write('localDateTime: $localDateTime, ') - ..write('thumbHash: $thumbHash, ') - ..write('deletedAt: $deletedAt, ') - ..write('uploadedAt: $uploadedAt, ') - ..write('livePhotoVideoId: $livePhotoVideoId, ') - ..write('visibility: $visibility, ') - ..write('stackId: $stackId, ') - ..write('libraryId: $libraryId, ') - ..write('isEdited: $isEdited') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - name, - type, - createdAt, - updatedAt, - width, - height, - durationMs, - id, - checksum, - isFavorite, - ownerId, - localDateTime, - thumbHash, - deletedAt, - uploadedAt, - livePhotoVideoId, - visibility, - stackId, - libraryId, - isEdited, - ); - @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.durationMs == this.durationMs && - 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.uploadedAt == this.uploadedAt && - other.livePhotoVideoId == this.livePhotoVideoId && - other.visibility == this.visibility && - other.stackId == this.stackId && - other.libraryId == this.libraryId && - other.isEdited == this.isEdited); -} - -class RemoteAssetEntityCompanion - extends UpdateCompanion { - final Value name; - final Value type; - final Value createdAt; - final Value updatedAt; - final Value width; - final Value height; - final Value durationMs; - final Value id; - final Value checksum; - final Value isFavorite; - final Value ownerId; - final Value localDateTime; - final Value thumbHash; - final Value deletedAt; - final Value uploadedAt; - final Value livePhotoVideoId; - final Value visibility; - final Value stackId; - final Value libraryId; - final Value isEdited; - 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.durationMs = 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.uploadedAt = const Value.absent(), - this.livePhotoVideoId = const Value.absent(), - this.visibility = const Value.absent(), - this.stackId = const Value.absent(), - this.libraryId = const Value.absent(), - this.isEdited = 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.durationMs = 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.uploadedAt = const Value.absent(), - this.livePhotoVideoId = const Value.absent(), - required int visibility, - this.stackId = const Value.absent(), - this.libraryId = const Value.absent(), - this.isEdited = 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? durationMs, - Expression? id, - Expression? checksum, - Expression? isFavorite, - Expression? ownerId, - Expression? localDateTime, - Expression? thumbHash, - Expression? deletedAt, - Expression? uploadedAt, - Expression? livePhotoVideoId, - Expression? visibility, - Expression? stackId, - Expression? libraryId, - Expression? isEdited, - }) { - 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 (durationMs != null) 'duration_ms': durationMs, - 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 (uploadedAt != null) 'uploaded_at': uploadedAt, - 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, - if (isEdited != null) 'is_edited': isEdited, - }); - } - - RemoteAssetEntityCompanion copyWith({ - Value? name, - Value? type, - Value? createdAt, - Value? updatedAt, - Value? width, - Value? height, - Value? durationMs, - Value? id, - Value? checksum, - Value? isFavorite, - Value? ownerId, - Value? localDateTime, - Value? thumbHash, - Value? deletedAt, - Value? uploadedAt, - Value? livePhotoVideoId, - Value? visibility, - Value? stackId, - Value? libraryId, - Value? isEdited, - }) { - 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, - durationMs: durationMs ?? this.durationMs, - 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, - uploadedAt: uploadedAt ?? this.uploadedAt, - livePhotoVideoId: livePhotoVideoId ?? this.livePhotoVideoId, - visibility: visibility ?? this.visibility, - stackId: stackId ?? this.stackId, - libraryId: libraryId ?? this.libraryId, - isEdited: isEdited ?? this.isEdited, - ); - } - - @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 (durationMs.present) { - map['duration_ms'] = Variable(durationMs.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 (uploadedAt.present) { - map['uploaded_at'] = Variable(uploadedAt.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); - } - if (isEdited.present) { - map['is_edited'] = Variable(isEdited.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('durationMs: $durationMs, ') - ..write('id: $id, ') - ..write('checksum: $checksum, ') - ..write('isFavorite: $isFavorite, ') - ..write('ownerId: $ownerId, ') - ..write('localDateTime: $localDateTime, ') - ..write('thumbHash: $thumbHash, ') - ..write('deletedAt: $deletedAt, ') - ..write('uploadedAt: $uploadedAt, ') - ..write('livePhotoVideoId: $livePhotoVideoId, ') - ..write('visibility: $visibility, ') - ..write('stackId: $stackId, ') - ..write('libraryId: $libraryId, ') - ..write('isEdited: $isEdited') - ..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, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn ownerId = GeneratedColumn( - 'owner_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL REFERENCES user_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn primaryAssetId = GeneratedColumn( - 'primary_asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - @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.string, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - 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; - @override - List get customConstraints => const ['PRIMARY KEY(id)']; - @override - bool get dontWriteConstraints => true; -} - -class StackEntityData extends DataClass implements Insertable { - final String id; - final String createdAt; - final String 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, - String? createdAt, - String? 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, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn type = GeneratedColumn( - 'type', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn width = GeneratedColumn( - 'width', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn height = GeneratedColumn( - 'height', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn durationMs = GeneratedColumn( - 'duration_ms', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn checksum = GeneratedColumn( - 'checksum', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn isFavorite = GeneratedColumn( - 'is_favorite', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0 CHECK (is_favorite IN (0, 1))', - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn orientation = GeneratedColumn( - 'orientation', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0', - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn iCloudId = GeneratedColumn( - 'i_cloud_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn adjustmentTime = GeneratedColumn( - 'adjustment_time', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn latitude = GeneratedColumn( - 'latitude', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn longitude = GeneratedColumn( - 'longitude', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn playbackStyle = GeneratedColumn( - 'playback_style', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0', - defaultValue: const CustomExpression('0'), - ); - @override - List get $columns => [ - name, - type, - createdAt, - updatedAt, - width, - height, - durationMs, - id, - checksum, - isFavorite, - orientation, - iCloudId, - adjustmentTime, - latitude, - longitude, - playbackStyle, - ]; - @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.string, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}updated_at'], - )!, - width: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}width'], - ), - height: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}height'], - ), - durationMs: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}duration_ms'], - ), - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - checksum: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}checksum'], - ), - isFavorite: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}is_favorite'], - )!, - orientation: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}orientation'], - )!, - iCloudId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}i_cloud_id'], - ), - adjustmentTime: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}adjustment_time'], - ), - latitude: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}latitude'], - ), - longitude: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}longitude'], - ), - playbackStyle: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}playback_style'], - )!, - ); - } - - @override - LocalAssetEntity createAlias(String alias) { - return LocalAssetEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY(id)']; - @override - bool get dontWriteConstraints => true; -} - -class LocalAssetEntityData extends DataClass - implements Insertable { - final String name; - final int type; - final String createdAt; - final String updatedAt; - final int? width; - final int? height; - final int? durationMs; - final String id; - final String? checksum; - final int isFavorite; - final int orientation; - final String? iCloudId; - final String? adjustmentTime; - final double? latitude; - final double? longitude; - final int playbackStyle; - const LocalAssetEntityData({ - required this.name, - required this.type, - required this.createdAt, - required this.updatedAt, - this.width, - this.height, - this.durationMs, - required this.id, - this.checksum, - required this.isFavorite, - required this.orientation, - this.iCloudId, - this.adjustmentTime, - this.latitude, - this.longitude, - required this.playbackStyle, - }); - @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 || durationMs != null) { - map['duration_ms'] = Variable(durationMs); - } - map['id'] = Variable(id); - if (!nullToAbsent || checksum != null) { - map['checksum'] = Variable(checksum); - } - map['is_favorite'] = Variable(isFavorite); - map['orientation'] = Variable(orientation); - if (!nullToAbsent || iCloudId != null) { - map['i_cloud_id'] = Variable(iCloudId); - } - if (!nullToAbsent || adjustmentTime != null) { - map['adjustment_time'] = Variable(adjustmentTime); - } - if (!nullToAbsent || latitude != null) { - map['latitude'] = Variable(latitude); - } - if (!nullToAbsent || longitude != null) { - map['longitude'] = Variable(longitude); - } - map['playback_style'] = Variable(playbackStyle); - 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']), - durationMs: serializer.fromJson(json['durationMs']), - id: serializer.fromJson(json['id']), - checksum: serializer.fromJson(json['checksum']), - isFavorite: serializer.fromJson(json['isFavorite']), - orientation: serializer.fromJson(json['orientation']), - iCloudId: serializer.fromJson(json['iCloudId']), - adjustmentTime: serializer.fromJson(json['adjustmentTime']), - latitude: serializer.fromJson(json['latitude']), - longitude: serializer.fromJson(json['longitude']), - playbackStyle: serializer.fromJson(json['playbackStyle']), - ); - } - @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), - 'durationMs': serializer.toJson(durationMs), - 'id': serializer.toJson(id), - 'checksum': serializer.toJson(checksum), - 'isFavorite': serializer.toJson(isFavorite), - 'orientation': serializer.toJson(orientation), - 'iCloudId': serializer.toJson(iCloudId), - 'adjustmentTime': serializer.toJson(adjustmentTime), - 'latitude': serializer.toJson(latitude), - 'longitude': serializer.toJson(longitude), - 'playbackStyle': serializer.toJson(playbackStyle), - }; - } - - LocalAssetEntityData copyWith({ - String? name, - int? type, - String? createdAt, - String? updatedAt, - Value width = const Value.absent(), - Value height = const Value.absent(), - Value durationMs = const Value.absent(), - String? id, - Value checksum = const Value.absent(), - int? isFavorite, - int? orientation, - Value iCloudId = const Value.absent(), - Value adjustmentTime = const Value.absent(), - Value latitude = const Value.absent(), - Value longitude = const Value.absent(), - int? playbackStyle, - }) => 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, - durationMs: durationMs.present ? durationMs.value : this.durationMs, - id: id ?? this.id, - checksum: checksum.present ? checksum.value : this.checksum, - isFavorite: isFavorite ?? this.isFavorite, - orientation: orientation ?? this.orientation, - iCloudId: iCloudId.present ? iCloudId.value : this.iCloudId, - adjustmentTime: adjustmentTime.present - ? adjustmentTime.value - : this.adjustmentTime, - latitude: latitude.present ? latitude.value : this.latitude, - longitude: longitude.present ? longitude.value : this.longitude, - playbackStyle: playbackStyle ?? this.playbackStyle, - ); - 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, - durationMs: data.durationMs.present - ? data.durationMs.value - : this.durationMs, - 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, - iCloudId: data.iCloudId.present ? data.iCloudId.value : this.iCloudId, - adjustmentTime: data.adjustmentTime.present - ? data.adjustmentTime.value - : this.adjustmentTime, - latitude: data.latitude.present ? data.latitude.value : this.latitude, - longitude: data.longitude.present ? data.longitude.value : this.longitude, - playbackStyle: data.playbackStyle.present - ? data.playbackStyle.value - : this.playbackStyle, - ); - } - - @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('durationMs: $durationMs, ') - ..write('id: $id, ') - ..write('checksum: $checksum, ') - ..write('isFavorite: $isFavorite, ') - ..write('orientation: $orientation, ') - ..write('iCloudId: $iCloudId, ') - ..write('adjustmentTime: $adjustmentTime, ') - ..write('latitude: $latitude, ') - ..write('longitude: $longitude, ') - ..write('playbackStyle: $playbackStyle') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - name, - type, - createdAt, - updatedAt, - width, - height, - durationMs, - id, - checksum, - isFavorite, - orientation, - iCloudId, - adjustmentTime, - latitude, - longitude, - playbackStyle, - ); - @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.durationMs == this.durationMs && - other.id == this.id && - other.checksum == this.checksum && - other.isFavorite == this.isFavorite && - other.orientation == this.orientation && - other.iCloudId == this.iCloudId && - other.adjustmentTime == this.adjustmentTime && - other.latitude == this.latitude && - other.longitude == this.longitude && - other.playbackStyle == this.playbackStyle); -} - -class LocalAssetEntityCompanion extends UpdateCompanion { - final Value name; - final Value type; - final Value createdAt; - final Value updatedAt; - final Value width; - final Value height; - final Value durationMs; - final Value id; - final Value checksum; - final Value isFavorite; - final Value orientation; - final Value iCloudId; - final Value adjustmentTime; - final Value latitude; - final Value longitude; - final Value playbackStyle; - 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.durationMs = const Value.absent(), - this.id = const Value.absent(), - this.checksum = const Value.absent(), - this.isFavorite = const Value.absent(), - this.orientation = const Value.absent(), - this.iCloudId = const Value.absent(), - this.adjustmentTime = const Value.absent(), - this.latitude = const Value.absent(), - this.longitude = const Value.absent(), - this.playbackStyle = 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.durationMs = const Value.absent(), - required String id, - this.checksum = const Value.absent(), - this.isFavorite = const Value.absent(), - this.orientation = const Value.absent(), - this.iCloudId = const Value.absent(), - this.adjustmentTime = const Value.absent(), - this.latitude = const Value.absent(), - this.longitude = const Value.absent(), - this.playbackStyle = 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? durationMs, - Expression? id, - Expression? checksum, - Expression? isFavorite, - Expression? orientation, - Expression? iCloudId, - Expression? adjustmentTime, - Expression? latitude, - Expression? longitude, - Expression? playbackStyle, - }) { - 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 (durationMs != null) 'duration_ms': durationMs, - if (id != null) 'id': id, - if (checksum != null) 'checksum': checksum, - if (isFavorite != null) 'is_favorite': isFavorite, - if (orientation != null) 'orientation': orientation, - if (iCloudId != null) 'i_cloud_id': iCloudId, - if (adjustmentTime != null) 'adjustment_time': adjustmentTime, - if (latitude != null) 'latitude': latitude, - if (longitude != null) 'longitude': longitude, - if (playbackStyle != null) 'playback_style': playbackStyle, - }); - } - - LocalAssetEntityCompanion copyWith({ - Value? name, - Value? type, - Value? createdAt, - Value? updatedAt, - Value? width, - Value? height, - Value? durationMs, - Value? id, - Value? checksum, - Value? isFavorite, - Value? orientation, - Value? iCloudId, - Value? adjustmentTime, - Value? latitude, - Value? longitude, - Value? playbackStyle, - }) { - 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, - durationMs: durationMs ?? this.durationMs, - id: id ?? this.id, - checksum: checksum ?? this.checksum, - isFavorite: isFavorite ?? this.isFavorite, - orientation: orientation ?? this.orientation, - iCloudId: iCloudId ?? this.iCloudId, - adjustmentTime: adjustmentTime ?? this.adjustmentTime, - latitude: latitude ?? this.latitude, - longitude: longitude ?? this.longitude, - playbackStyle: playbackStyle ?? this.playbackStyle, - ); - } - - @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 (durationMs.present) { - map['duration_ms'] = Variable(durationMs.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); - } - if (iCloudId.present) { - map['i_cloud_id'] = Variable(iCloudId.value); - } - if (adjustmentTime.present) { - map['adjustment_time'] = Variable(adjustmentTime.value); - } - if (latitude.present) { - map['latitude'] = Variable(latitude.value); - } - if (longitude.present) { - map['longitude'] = Variable(longitude.value); - } - if (playbackStyle.present) { - map['playback_style'] = Variable(playbackStyle.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('durationMs: $durationMs, ') - ..write('id: $id, ') - ..write('checksum: $checksum, ') - ..write('isFavorite: $isFavorite, ') - ..write('orientation: $orientation, ') - ..write('iCloudId: $iCloudId, ') - ..write('adjustmentTime: $adjustmentTime, ') - ..write('latitude: $latitude, ') - ..write('longitude: $longitude, ') - ..write('playbackStyle: $playbackStyle') - ..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, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn description = GeneratedColumn( - 'description', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT \'\'', - defaultValue: const CustomExpression('\'\''), - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn thumbnailAssetId = GeneratedColumn( - 'thumbnail_asset_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: - 'NULL REFERENCES remote_asset_entity(id)ON DELETE SET NULL', - ); - late final GeneratedColumn isActivityEnabled = GeneratedColumn( - 'is_activity_enabled', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: - 'NOT NULL DEFAULT 1 CHECK (is_activity_enabled IN (0, 1))', - defaultValue: const CustomExpression('1'), - ); - late final GeneratedColumn order = GeneratedColumn( - 'order', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - @override - List get $columns => [ - id, - name, - description, - createdAt, - updatedAt, - 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.string, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}updated_at'], - )!, - thumbnailAssetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}thumbnail_asset_id'], - ), - isActivityEnabled: attachedDatabase.typeMapping.read( - DriftSqlType.int, - 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; - @override - List get customConstraints => const ['PRIMARY KEY(id)']; - @override - bool get dontWriteConstraints => true; -} - -class RemoteAlbumEntityData extends DataClass - implements Insertable { - final String id; - final String name; - final String description; - final String createdAt; - final String updatedAt; - final String? thumbnailAssetId; - final int isActivityEnabled; - final int order; - const RemoteAlbumEntityData({ - required this.id, - required this.name, - required this.description, - required this.createdAt, - required this.updatedAt, - 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); - 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']), - 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), - 'thumbnailAssetId': serializer.toJson(thumbnailAssetId), - 'isActivityEnabled': serializer.toJson(isActivityEnabled), - 'order': serializer.toJson(order), - }; - } - - RemoteAlbumEntityData copyWith({ - String? id, - String? name, - String? description, - String? createdAt, - String? updatedAt, - Value thumbnailAssetId = const Value.absent(), - int? isActivityEnabled, - int? order, - }) => RemoteAlbumEntityData( - id: id ?? this.id, - name: name ?? this.name, - description: description ?? this.description, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - 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, - 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('thumbnailAssetId: $thumbnailAssetId, ') - ..write('isActivityEnabled: $isActivityEnabled, ') - ..write('order: $order') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - name, - description, - createdAt, - updatedAt, - 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.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 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.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(), - this.thumbnailAssetId = const Value.absent(), - this.isActivityEnabled = const Value.absent(), - required int order, - }) : id = Value(id), - name = Value(name), - order = Value(order); - static Insertable custom({ - Expression? id, - Expression? name, - Expression? description, - Expression? createdAt, - Expression? updatedAt, - 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 (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? 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, - 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 (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('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, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn backupSelection = GeneratedColumn( - 'backup_selection', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn isIosSharedAlbum = GeneratedColumn( - 'is_ios_shared_album', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: - 'NOT NULL DEFAULT 0 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, - $customConstraints: - 'NULL REFERENCES remote_album_entity(id)ON DELETE SET NULL', - ); - late final GeneratedColumn marker = GeneratedColumn( - 'marker', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL 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.string, - data['${effectivePrefix}updated_at'], - )!, - backupSelection: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}backup_selection'], - )!, - isIosSharedAlbum: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}is_ios_shared_album'], - )!, - linkedRemoteAlbumId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}linked_remote_album_id'], - ), - marker: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}marker'], - ), - ); - } - - @override - LocalAlbumEntity createAlias(String alias) { - return LocalAlbumEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY(id)']; - @override - bool get dontWriteConstraints => true; -} - -class LocalAlbumEntityData extends DataClass - implements Insertable { - final String id; - final String name; - final String updatedAt; - final int backupSelection; - final int isIosSharedAlbum; - final String? linkedRemoteAlbumId; - final int? 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, - String? updatedAt, - int? backupSelection, - int? 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, - $customConstraints: - 'NOT NULL REFERENCES local_asset_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn albumId = GeneratedColumn( - 'album_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: - 'NOT NULL REFERENCES local_album_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn marker = GeneratedColumn( - 'marker', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL 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.int, - data['${effectivePrefix}marker'], - ), - ); - } - - @override - LocalAlbumAssetEntity createAlias(String alias) { - return LocalAlbumAssetEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const [ - 'PRIMARY KEY(asset_id, album_id)', - ]; - @override - bool get dontWriteConstraints => true; -} - -class LocalAlbumAssetEntityData extends DataClass - implements Insertable { - final String assetId; - final String albumId; - final int? 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, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn email = GeneratedColumn( - 'email', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn isAdmin = GeneratedColumn( - 'is_admin', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0 CHECK (is_admin IN (0, 1))', - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn hasProfileImage = GeneratedColumn( - 'has_profile_image', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: - 'NOT NULL DEFAULT 0 CHECK (has_profile_image IN (0, 1))', - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn profileChangedAt = GeneratedColumn( - 'profile_changed_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn avatarColor = GeneratedColumn( - 'avatar_color', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn quotaSizeInBytes = GeneratedColumn( - 'quota_size_in_bytes', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0', - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn quotaUsageInBytes = GeneratedColumn( - 'quota_usage_in_bytes', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0', - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn pinCode = GeneratedColumn( - 'pin_code', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - @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.int, - data['${effectivePrefix}is_admin'], - )!, - hasProfileImage: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}has_profile_image'], - )!, - profileChangedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - 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; - @override - List get customConstraints => const ['PRIMARY KEY(id)']; - @override - bool get dontWriteConstraints => true; -} - -class AuthUserEntityData extends DataClass - implements Insertable { - final String id; - final String name; - final String email; - final int isAdmin; - final int hasProfileImage; - final String 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, - int? isAdmin, - int? hasProfileImage, - String? 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, - $customConstraints: 'NOT NULL REFERENCES user_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn key = GeneratedColumn( - 'key', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn value = - GeneratedColumn( - 'value', - aliasedName, - false, - type: DriftSqlType.blob, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - @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; - @override - List get customConstraints => const ['PRIMARY KEY(user_id, "key")']; - @override - bool get dontWriteConstraints => true; -} - -class UserMetadataEntityData extends DataClass - implements Insertable { - final String userId; - final int key; - final i2.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, - i2.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 i2.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, - $customConstraints: 'NOT NULL REFERENCES user_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn sharedWithId = GeneratedColumn( - 'shared_with_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL REFERENCES user_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn inTimeline = GeneratedColumn( - 'in_timeline', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0 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.int, - data['${effectivePrefix}in_timeline'], - )!, - ); - } - - @override - PartnerEntity createAlias(String alias) { - return PartnerEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const [ - 'PRIMARY KEY(shared_by_id, shared_with_id)', - ]; - @override - bool get dontWriteConstraints => true; -} - -class PartnerEntityData extends DataClass - implements Insertable { - final String sharedById; - final String sharedWithId; - final int 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, - int? 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, - $customConstraints: - 'NOT NULL REFERENCES remote_asset_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn city = GeneratedColumn( - 'city', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn state = GeneratedColumn( - 'state', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn country = GeneratedColumn( - 'country', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn dateTimeOriginal = GeneratedColumn( - 'date_time_original', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn description = GeneratedColumn( - 'description', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn height = GeneratedColumn( - 'height', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn width = GeneratedColumn( - 'width', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn exposureTime = GeneratedColumn( - 'exposure_time', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn fNumber = GeneratedColumn( - 'f_number', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn fileSize = GeneratedColumn( - 'file_size', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn focalLength = GeneratedColumn( - 'focal_length', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn latitude = GeneratedColumn( - 'latitude', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn longitude = GeneratedColumn( - 'longitude', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn iso = GeneratedColumn( - 'iso', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn make = GeneratedColumn( - 'make', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn model = GeneratedColumn( - 'model', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn lens = GeneratedColumn( - 'lens', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn orientation = GeneratedColumn( - 'orientation', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn timeZone = GeneratedColumn( - 'time_zone', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn rating = GeneratedColumn( - 'rating', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn projectionType = GeneratedColumn( - 'projection_type', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - @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.string, - 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; - @override - List get customConstraints => const ['PRIMARY KEY(asset_id)']; - @override - bool get dontWriteConstraints => true; -} - -class RemoteExifEntityData extends DataClass - implements Insertable { - final String assetId; - final String? city; - final String? state; - final String? country; - final String? 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, - $customConstraints: - 'NOT NULL REFERENCES remote_asset_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn albumId = GeneratedColumn( - 'album_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: - 'NOT NULL 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; - @override - List get customConstraints => const [ - 'PRIMARY KEY(asset_id, album_id)', - ]; - @override - bool get dontWriteConstraints => 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, - $customConstraints: - 'NOT NULL REFERENCES remote_album_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn userId = GeneratedColumn( - 'user_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL REFERENCES user_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn role = GeneratedColumn( - 'role', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - @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; - @override - List get customConstraints => const [ - 'PRIMARY KEY(album_id, user_id)', - ]; - @override - bool get dontWriteConstraints => 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 RemoteAssetCloudIdEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - RemoteAssetCloudIdEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn assetId = GeneratedColumn( - 'asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: - 'NOT NULL REFERENCES remote_asset_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn cloudId = GeneratedColumn( - 'cloud_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn adjustmentTime = GeneratedColumn( - 'adjustment_time', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn latitude = GeneratedColumn( - 'latitude', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn longitude = GeneratedColumn( - 'longitude', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - @override - List get $columns => [ - assetId, - cloudId, - createdAt, - adjustmentTime, - latitude, - longitude, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'remote_asset_cloud_id_entity'; - @override - Set get $primaryKey => {assetId}; - @override - RemoteAssetCloudIdEntityData map( - Map data, { - String? tablePrefix, - }) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return RemoteAssetCloudIdEntityData( - assetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}asset_id'], - )!, - cloudId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}cloud_id'], - ), - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}created_at'], - ), - adjustmentTime: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}adjustment_time'], - ), - latitude: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}latitude'], - ), - longitude: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}longitude'], - ), - ); - } - - @override - RemoteAssetCloudIdEntity createAlias(String alias) { - return RemoteAssetCloudIdEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY(asset_id)']; - @override - bool get dontWriteConstraints => true; -} - -class RemoteAssetCloudIdEntityData extends DataClass - implements Insertable { - final String assetId; - final String? cloudId; - final String? createdAt; - final String? adjustmentTime; - final double? latitude; - final double? longitude; - const RemoteAssetCloudIdEntityData({ - required this.assetId, - this.cloudId, - this.createdAt, - this.adjustmentTime, - this.latitude, - this.longitude, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['asset_id'] = Variable(assetId); - if (!nullToAbsent || cloudId != null) { - map['cloud_id'] = Variable(cloudId); - } - if (!nullToAbsent || createdAt != null) { - map['created_at'] = Variable(createdAt); - } - if (!nullToAbsent || adjustmentTime != null) { - map['adjustment_time'] = Variable(adjustmentTime); - } - if (!nullToAbsent || latitude != null) { - map['latitude'] = Variable(latitude); - } - if (!nullToAbsent || longitude != null) { - map['longitude'] = Variable(longitude); - } - return map; - } - - factory RemoteAssetCloudIdEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return RemoteAssetCloudIdEntityData( - assetId: serializer.fromJson(json['assetId']), - cloudId: serializer.fromJson(json['cloudId']), - createdAt: serializer.fromJson(json['createdAt']), - adjustmentTime: serializer.fromJson(json['adjustmentTime']), - latitude: serializer.fromJson(json['latitude']), - longitude: serializer.fromJson(json['longitude']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'assetId': serializer.toJson(assetId), - 'cloudId': serializer.toJson(cloudId), - 'createdAt': serializer.toJson(createdAt), - 'adjustmentTime': serializer.toJson(adjustmentTime), - 'latitude': serializer.toJson(latitude), - 'longitude': serializer.toJson(longitude), - }; - } - - RemoteAssetCloudIdEntityData copyWith({ - String? assetId, - Value cloudId = const Value.absent(), - Value createdAt = const Value.absent(), - Value adjustmentTime = const Value.absent(), - Value latitude = const Value.absent(), - Value longitude = const Value.absent(), - }) => RemoteAssetCloudIdEntityData( - assetId: assetId ?? this.assetId, - cloudId: cloudId.present ? cloudId.value : this.cloudId, - createdAt: createdAt.present ? createdAt.value : this.createdAt, - adjustmentTime: adjustmentTime.present - ? adjustmentTime.value - : this.adjustmentTime, - latitude: latitude.present ? latitude.value : this.latitude, - longitude: longitude.present ? longitude.value : this.longitude, - ); - RemoteAssetCloudIdEntityData copyWithCompanion( - RemoteAssetCloudIdEntityCompanion data, - ) { - return RemoteAssetCloudIdEntityData( - assetId: data.assetId.present ? data.assetId.value : this.assetId, - cloudId: data.cloudId.present ? data.cloudId.value : this.cloudId, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - adjustmentTime: data.adjustmentTime.present - ? data.adjustmentTime.value - : this.adjustmentTime, - latitude: data.latitude.present ? data.latitude.value : this.latitude, - longitude: data.longitude.present ? data.longitude.value : this.longitude, - ); - } - - @override - String toString() { - return (StringBuffer('RemoteAssetCloudIdEntityData(') - ..write('assetId: $assetId, ') - ..write('cloudId: $cloudId, ') - ..write('createdAt: $createdAt, ') - ..write('adjustmentTime: $adjustmentTime, ') - ..write('latitude: $latitude, ') - ..write('longitude: $longitude') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - assetId, - cloudId, - createdAt, - adjustmentTime, - latitude, - longitude, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is RemoteAssetCloudIdEntityData && - other.assetId == this.assetId && - other.cloudId == this.cloudId && - other.createdAt == this.createdAt && - other.adjustmentTime == this.adjustmentTime && - other.latitude == this.latitude && - other.longitude == this.longitude); -} - -class RemoteAssetCloudIdEntityCompanion - extends UpdateCompanion { - final Value assetId; - final Value cloudId; - final Value createdAt; - final Value adjustmentTime; - final Value latitude; - final Value longitude; - const RemoteAssetCloudIdEntityCompanion({ - this.assetId = const Value.absent(), - this.cloudId = const Value.absent(), - this.createdAt = const Value.absent(), - this.adjustmentTime = const Value.absent(), - this.latitude = const Value.absent(), - this.longitude = const Value.absent(), - }); - RemoteAssetCloudIdEntityCompanion.insert({ - required String assetId, - this.cloudId = const Value.absent(), - this.createdAt = const Value.absent(), - this.adjustmentTime = const Value.absent(), - this.latitude = const Value.absent(), - this.longitude = const Value.absent(), - }) : assetId = Value(assetId); - static Insertable custom({ - Expression? assetId, - Expression? cloudId, - Expression? createdAt, - Expression? adjustmentTime, - Expression? latitude, - Expression? longitude, - }) { - return RawValuesInsertable({ - if (assetId != null) 'asset_id': assetId, - if (cloudId != null) 'cloud_id': cloudId, - if (createdAt != null) 'created_at': createdAt, - if (adjustmentTime != null) 'adjustment_time': adjustmentTime, - if (latitude != null) 'latitude': latitude, - if (longitude != null) 'longitude': longitude, - }); - } - - RemoteAssetCloudIdEntityCompanion copyWith({ - Value? assetId, - Value? cloudId, - Value? createdAt, - Value? adjustmentTime, - Value? latitude, - Value? longitude, - }) { - return RemoteAssetCloudIdEntityCompanion( - assetId: assetId ?? this.assetId, - cloudId: cloudId ?? this.cloudId, - createdAt: createdAt ?? this.createdAt, - adjustmentTime: adjustmentTime ?? this.adjustmentTime, - latitude: latitude ?? this.latitude, - longitude: longitude ?? this.longitude, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (assetId.present) { - map['asset_id'] = Variable(assetId.value); - } - if (cloudId.present) { - map['cloud_id'] = Variable(cloudId.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (adjustmentTime.present) { - map['adjustment_time'] = Variable(adjustmentTime.value); - } - if (latitude.present) { - map['latitude'] = Variable(latitude.value); - } - if (longitude.present) { - map['longitude'] = Variable(longitude.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('RemoteAssetCloudIdEntityCompanion(') - ..write('assetId: $assetId, ') - ..write('cloudId: $cloudId, ') - ..write('createdAt: $createdAt, ') - ..write('adjustmentTime: $adjustmentTime, ') - ..write('latitude: $latitude, ') - ..write('longitude: $longitude') - ..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, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn deletedAt = GeneratedColumn( - 'deleted_at', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn ownerId = GeneratedColumn( - 'owner_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL REFERENCES user_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn type = GeneratedColumn( - 'type', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn data = GeneratedColumn( - 'data', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn isSaved = GeneratedColumn( - 'is_saved', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0 CHECK (is_saved IN (0, 1))', - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn memoryAt = GeneratedColumn( - 'memory_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn seenAt = GeneratedColumn( - 'seen_at', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn showAt = GeneratedColumn( - 'show_at', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn hideAt = GeneratedColumn( - 'hide_at', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - @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.string, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}updated_at'], - )!, - deletedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - 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.int, - data['${effectivePrefix}is_saved'], - )!, - memoryAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}memory_at'], - )!, - seenAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}seen_at'], - ), - showAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}show_at'], - ), - hideAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}hide_at'], - ), - ); - } - - @override - MemoryEntity createAlias(String alias) { - return MemoryEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY(id)']; - @override - bool get dontWriteConstraints => true; -} - -class MemoryEntityData extends DataClass - implements Insertable { - final String id; - final String createdAt; - final String updatedAt; - final String? deletedAt; - final String ownerId; - final int type; - final String data; - final int isSaved; - final String memoryAt; - final String? seenAt; - final String? showAt; - final String? 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, - String? createdAt, - String? updatedAt, - Value deletedAt = const Value.absent(), - String? ownerId, - int? type, - String? data, - int? isSaved, - String? 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 String 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, - $customConstraints: - 'NOT NULL REFERENCES remote_asset_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn memoryId = GeneratedColumn( - 'memory_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: - 'NOT NULL 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; - @override - List get customConstraints => const [ - 'PRIMARY KEY(asset_id, memory_id)', - ]; - @override - bool get dontWriteConstraints => 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, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn ownerId = GeneratedColumn( - 'owner_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL REFERENCES user_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn faceAssetId = GeneratedColumn( - 'face_asset_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn isFavorite = GeneratedColumn( - 'is_favorite', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL CHECK (is_favorite IN (0, 1))', - ); - late final GeneratedColumn isHidden = GeneratedColumn( - 'is_hidden', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL CHECK (is_hidden IN (0, 1))', - ); - late final GeneratedColumn color = GeneratedColumn( - 'color', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn birthDate = GeneratedColumn( - 'birth_date', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - @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.string, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - 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.int, - data['${effectivePrefix}is_favorite'], - )!, - isHidden: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}is_hidden'], - )!, - color: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}color'], - ), - birthDate: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}birth_date'], - ), - ); - } - - @override - PersonEntity createAlias(String alias) { - return PersonEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY(id)']; - @override - bool get dontWriteConstraints => true; -} - -class PersonEntityData extends DataClass - implements Insertable { - final String id; - final String createdAt; - final String updatedAt; - final String ownerId; - final String name; - final String? faceAssetId; - final int isFavorite; - final int isHidden; - final String? color; - final String? 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, - String? createdAt, - String? updatedAt, - String? ownerId, - String? name, - Value faceAssetId = const Value.absent(), - int? isFavorite, - int? 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 int isFavorite, - required int 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, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn assetId = GeneratedColumn( - 'asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: - 'NOT NULL REFERENCES remote_asset_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn personId = GeneratedColumn( - 'person_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL REFERENCES person_entity(id)ON DELETE SET NULL', - ); - late final GeneratedColumn imageWidth = GeneratedColumn( - 'image_width', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn imageHeight = GeneratedColumn( - 'image_height', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn boundingBoxX1 = GeneratedColumn( - 'bounding_box_x1', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn boundingBoxY1 = GeneratedColumn( - 'bounding_box_y1', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn boundingBoxX2 = GeneratedColumn( - 'bounding_box_x2', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn boundingBoxY2 = GeneratedColumn( - 'bounding_box_y2', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn sourceType = GeneratedColumn( - 'source_type', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn isVisible = GeneratedColumn( - 'is_visible', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 1 CHECK (is_visible IN (0, 1))', - defaultValue: const CustomExpression('1'), - ); - late final GeneratedColumn deletedAt = GeneratedColumn( - 'deleted_at', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - @override - List get $columns => [ - id, - assetId, - personId, - imageWidth, - imageHeight, - boundingBoxX1, - boundingBoxY1, - boundingBoxX2, - boundingBoxY2, - sourceType, - isVisible, - deletedAt, - ]; - @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'], - )!, - isVisible: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}is_visible'], - )!, - deletedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}deleted_at'], - ), - ); - } - - @override - AssetFaceEntity createAlias(String alias) { - return AssetFaceEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY(id)']; - @override - bool get dontWriteConstraints => 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; - final int isVisible; - final String? deletedAt; - 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, - required this.isVisible, - this.deletedAt, - }); - @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); - map['is_visible'] = Variable(isVisible); - if (!nullToAbsent || deletedAt != null) { - map['deleted_at'] = Variable(deletedAt); - } - 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']), - isVisible: serializer.fromJson(json['isVisible']), - deletedAt: serializer.fromJson(json['deletedAt']), - ); - } - @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), - 'isVisible': serializer.toJson(isVisible), - 'deletedAt': serializer.toJson(deletedAt), - }; - } - - 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, - int? isVisible, - Value deletedAt = const Value.absent(), - }) => 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, - isVisible: isVisible ?? this.isVisible, - deletedAt: deletedAt.present ? deletedAt.value : this.deletedAt, - ); - 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, - isVisible: data.isVisible.present ? data.isVisible.value : this.isVisible, - deletedAt: data.deletedAt.present ? data.deletedAt.value : this.deletedAt, - ); - } - - @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('isVisible: $isVisible, ') - ..write('deletedAt: $deletedAt') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - assetId, - personId, - imageWidth, - imageHeight, - boundingBoxX1, - boundingBoxY1, - boundingBoxX2, - boundingBoxY2, - sourceType, - isVisible, - deletedAt, - ); - @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 && - other.isVisible == this.isVisible && - other.deletedAt == this.deletedAt); -} - -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; - final Value isVisible; - final Value deletedAt; - 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(), - this.isVisible = const Value.absent(), - this.deletedAt = 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, - this.isVisible = const Value.absent(), - this.deletedAt = const Value.absent(), - }) : 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, - Expression? isVisible, - Expression? deletedAt, - }) { - 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, - if (isVisible != null) 'is_visible': isVisible, - if (deletedAt != null) 'deleted_at': deletedAt, - }); - } - - AssetFaceEntityCompanion copyWith({ - Value? id, - Value? assetId, - Value? personId, - Value? imageWidth, - Value? imageHeight, - Value? boundingBoxX1, - Value? boundingBoxY1, - Value? boundingBoxX2, - Value? boundingBoxY2, - Value? sourceType, - Value? isVisible, - Value? deletedAt, - }) { - 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, - isVisible: isVisible ?? this.isVisible, - deletedAt: deletedAt ?? this.deletedAt, - ); - } - - @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); - } - if (isVisible.present) { - map['is_visible'] = Variable(isVisible.value); - } - if (deletedAt.present) { - map['deleted_at'] = Variable(deletedAt.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('isVisible: $isVisible, ') - ..write('deletedAt: $deletedAt') - ..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, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn stringValue = GeneratedColumn( - 'string_value', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn intValue = GeneratedColumn( - 'int_value', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - @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; - @override - List get customConstraints => const ['PRIMARY KEY(id)']; - @override - bool get dontWriteConstraints => 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, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn type = GeneratedColumn( - 'type', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn width = GeneratedColumn( - 'width', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn height = GeneratedColumn( - 'height', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn durationMs = GeneratedColumn( - 'duration_ms', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn albumId = GeneratedColumn( - 'album_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn checksum = GeneratedColumn( - 'checksum', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn isFavorite = GeneratedColumn( - 'is_favorite', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0 CHECK (is_favorite IN (0, 1))', - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn orientation = GeneratedColumn( - 'orientation', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0', - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn source = GeneratedColumn( - 'source', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn playbackStyle = GeneratedColumn( - 'playback_style', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0', - defaultValue: const CustomExpression('0'), - ); - @override - List get $columns => [ - name, - type, - createdAt, - updatedAt, - width, - height, - durationMs, - id, - albumId, - checksum, - isFavorite, - orientation, - source, - playbackStyle, - ]; - @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.string, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}updated_at'], - )!, - width: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}width'], - ), - height: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}height'], - ), - durationMs: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}duration_ms'], - ), - 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.int, - data['${effectivePrefix}is_favorite'], - )!, - orientation: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}orientation'], - )!, - source: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}source'], - )!, - playbackStyle: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}playback_style'], - )!, - ); - } - - @override - TrashedLocalAssetEntity createAlias(String alias) { - return TrashedLocalAssetEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY(id, album_id)']; - @override - bool get dontWriteConstraints => true; -} - -class TrashedLocalAssetEntityData extends DataClass - implements Insertable { - final String name; - final int type; - final String createdAt; - final String updatedAt; - final int? width; - final int? height; - final int? durationMs; - final String id; - final String albumId; - final String? checksum; - final int isFavorite; - final int orientation; - final int source; - final int playbackStyle; - const TrashedLocalAssetEntityData({ - required this.name, - required this.type, - required this.createdAt, - required this.updatedAt, - this.width, - this.height, - this.durationMs, - required this.id, - required this.albumId, - this.checksum, - required this.isFavorite, - required this.orientation, - required this.source, - required this.playbackStyle, - }); - @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 || durationMs != null) { - map['duration_ms'] = Variable(durationMs); - } - 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); - map['source'] = Variable(source); - map['playback_style'] = Variable(playbackStyle); - 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']), - durationMs: serializer.fromJson(json['durationMs']), - 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']), - source: serializer.fromJson(json['source']), - playbackStyle: serializer.fromJson(json['playbackStyle']), - ); - } - @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), - 'durationMs': serializer.toJson(durationMs), - 'id': serializer.toJson(id), - 'albumId': serializer.toJson(albumId), - 'checksum': serializer.toJson(checksum), - 'isFavorite': serializer.toJson(isFavorite), - 'orientation': serializer.toJson(orientation), - 'source': serializer.toJson(source), - 'playbackStyle': serializer.toJson(playbackStyle), - }; - } - - TrashedLocalAssetEntityData copyWith({ - String? name, - int? type, - String? createdAt, - String? updatedAt, - Value width = const Value.absent(), - Value height = const Value.absent(), - Value durationMs = const Value.absent(), - String? id, - String? albumId, - Value checksum = const Value.absent(), - int? isFavorite, - int? orientation, - int? source, - int? playbackStyle, - }) => 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, - durationMs: durationMs.present ? durationMs.value : this.durationMs, - id: id ?? this.id, - albumId: albumId ?? this.albumId, - checksum: checksum.present ? checksum.value : this.checksum, - isFavorite: isFavorite ?? this.isFavorite, - orientation: orientation ?? this.orientation, - source: source ?? this.source, - playbackStyle: playbackStyle ?? this.playbackStyle, - ); - 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, - durationMs: data.durationMs.present - ? data.durationMs.value - : this.durationMs, - 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, - source: data.source.present ? data.source.value : this.source, - playbackStyle: data.playbackStyle.present - ? data.playbackStyle.value - : this.playbackStyle, - ); - } - - @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('durationMs: $durationMs, ') - ..write('id: $id, ') - ..write('albumId: $albumId, ') - ..write('checksum: $checksum, ') - ..write('isFavorite: $isFavorite, ') - ..write('orientation: $orientation, ') - ..write('source: $source, ') - ..write('playbackStyle: $playbackStyle') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - name, - type, - createdAt, - updatedAt, - width, - height, - durationMs, - id, - albumId, - checksum, - isFavorite, - orientation, - source, - playbackStyle, - ); - @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.durationMs == this.durationMs && - other.id == this.id && - other.albumId == this.albumId && - other.checksum == this.checksum && - other.isFavorite == this.isFavorite && - other.orientation == this.orientation && - other.source == this.source && - other.playbackStyle == this.playbackStyle); -} - -class TrashedLocalAssetEntityCompanion - extends UpdateCompanion { - final Value name; - final Value type; - final Value createdAt; - final Value updatedAt; - final Value width; - final Value height; - final Value durationMs; - final Value id; - final Value albumId; - final Value checksum; - final Value isFavorite; - final Value orientation; - final Value source; - final Value playbackStyle; - 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.durationMs = 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(), - this.source = const Value.absent(), - this.playbackStyle = 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.durationMs = const Value.absent(), - required String id, - required String albumId, - this.checksum = const Value.absent(), - this.isFavorite = const Value.absent(), - this.orientation = const Value.absent(), - required int source, - this.playbackStyle = const Value.absent(), - }) : name = Value(name), - type = Value(type), - id = Value(id), - albumId = Value(albumId), - source = Value(source); - static Insertable custom({ - Expression? name, - Expression? type, - Expression? createdAt, - Expression? updatedAt, - Expression? width, - Expression? height, - Expression? durationMs, - Expression? id, - Expression? albumId, - Expression? checksum, - Expression? isFavorite, - Expression? orientation, - Expression? source, - Expression? playbackStyle, - }) { - 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 (durationMs != null) 'duration_ms': durationMs, - 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, - if (source != null) 'source': source, - if (playbackStyle != null) 'playback_style': playbackStyle, - }); - } - - TrashedLocalAssetEntityCompanion copyWith({ - Value? name, - Value? type, - Value? createdAt, - Value? updatedAt, - Value? width, - Value? height, - Value? durationMs, - Value? id, - Value? albumId, - Value? checksum, - Value? isFavorite, - Value? orientation, - Value? source, - Value? playbackStyle, - }) { - 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, - durationMs: durationMs ?? this.durationMs, - id: id ?? this.id, - albumId: albumId ?? this.albumId, - checksum: checksum ?? this.checksum, - isFavorite: isFavorite ?? this.isFavorite, - orientation: orientation ?? this.orientation, - source: source ?? this.source, - playbackStyle: playbackStyle ?? this.playbackStyle, - ); - } - - @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 (durationMs.present) { - map['duration_ms'] = Variable(durationMs.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); - } - if (source.present) { - map['source'] = Variable(source.value); - } - if (playbackStyle.present) { - map['playback_style'] = Variable(playbackStyle.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('durationMs: $durationMs, ') - ..write('id: $id, ') - ..write('albumId: $albumId, ') - ..write('checksum: $checksum, ') - ..write('isFavorite: $isFavorite, ') - ..write('orientation: $orientation, ') - ..write('source: $source, ') - ..write('playbackStyle: $playbackStyle') - ..write(')')) - .toString(); - } -} - -class AssetEditEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - AssetEditEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn assetId = GeneratedColumn( - 'asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: - 'NOT NULL REFERENCES remote_asset_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn action = GeneratedColumn( - 'action', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn parameters = - GeneratedColumn( - 'parameters', - aliasedName, - false, - type: DriftSqlType.blob, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn sequence = GeneratedColumn( - 'sequence', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - @override - List get $columns => [ - id, - assetId, - action, - parameters, - sequence, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'asset_edit_entity'; - @override - Set get $primaryKey => {id}; - @override - AssetEditEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return AssetEditEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - assetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}asset_id'], - )!, - action: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}action'], - )!, - parameters: attachedDatabase.typeMapping.read( - DriftSqlType.blob, - data['${effectivePrefix}parameters'], - )!, - sequence: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}sequence'], - )!, - ); - } - - @override - AssetEditEntity createAlias(String alias) { - return AssetEditEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY(id)']; - @override - bool get dontWriteConstraints => true; -} - -class AssetEditEntityData extends DataClass - implements Insertable { - final String id; - final String assetId; - final int action; - final i2.Uint8List parameters; - final int sequence; - const AssetEditEntityData({ - required this.id, - required this.assetId, - required this.action, - required this.parameters, - required this.sequence, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['asset_id'] = Variable(assetId); - map['action'] = Variable(action); - map['parameters'] = Variable(parameters); - map['sequence'] = Variable(sequence); - return map; - } - - factory AssetEditEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return AssetEditEntityData( - id: serializer.fromJson(json['id']), - assetId: serializer.fromJson(json['assetId']), - action: serializer.fromJson(json['action']), - parameters: serializer.fromJson(json['parameters']), - sequence: serializer.fromJson(json['sequence']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'assetId': serializer.toJson(assetId), - 'action': serializer.toJson(action), - 'parameters': serializer.toJson(parameters), - 'sequence': serializer.toJson(sequence), - }; - } - - AssetEditEntityData copyWith({ - String? id, - String? assetId, - int? action, - i2.Uint8List? parameters, - int? sequence, - }) => AssetEditEntityData( - id: id ?? this.id, - assetId: assetId ?? this.assetId, - action: action ?? this.action, - parameters: parameters ?? this.parameters, - sequence: sequence ?? this.sequence, - ); - AssetEditEntityData copyWithCompanion(AssetEditEntityCompanion data) { - return AssetEditEntityData( - id: data.id.present ? data.id.value : this.id, - assetId: data.assetId.present ? data.assetId.value : this.assetId, - action: data.action.present ? data.action.value : this.action, - parameters: data.parameters.present - ? data.parameters.value - : this.parameters, - sequence: data.sequence.present ? data.sequence.value : this.sequence, - ); - } - - @override - String toString() { - return (StringBuffer('AssetEditEntityData(') - ..write('id: $id, ') - ..write('assetId: $assetId, ') - ..write('action: $action, ') - ..write('parameters: $parameters, ') - ..write('sequence: $sequence') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - assetId, - action, - $driftBlobEquality.hash(parameters), - sequence, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is AssetEditEntityData && - other.id == this.id && - other.assetId == this.assetId && - other.action == this.action && - $driftBlobEquality.equals(other.parameters, this.parameters) && - other.sequence == this.sequence); -} - -class AssetEditEntityCompanion extends UpdateCompanion { - final Value id; - final Value assetId; - final Value action; - final Value parameters; - final Value sequence; - const AssetEditEntityCompanion({ - this.id = const Value.absent(), - this.assetId = const Value.absent(), - this.action = const Value.absent(), - this.parameters = const Value.absent(), - this.sequence = const Value.absent(), - }); - AssetEditEntityCompanion.insert({ - required String id, - required String assetId, - required int action, - required i2.Uint8List parameters, - required int sequence, - }) : id = Value(id), - assetId = Value(assetId), - action = Value(action), - parameters = Value(parameters), - sequence = Value(sequence); - static Insertable custom({ - Expression? id, - Expression? assetId, - Expression? action, - Expression? parameters, - Expression? sequence, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (assetId != null) 'asset_id': assetId, - if (action != null) 'action': action, - if (parameters != null) 'parameters': parameters, - if (sequence != null) 'sequence': sequence, - }); - } - - AssetEditEntityCompanion copyWith({ - Value? id, - Value? assetId, - Value? action, - Value? parameters, - Value? sequence, - }) { - return AssetEditEntityCompanion( - id: id ?? this.id, - assetId: assetId ?? this.assetId, - action: action ?? this.action, - parameters: parameters ?? this.parameters, - sequence: sequence ?? this.sequence, - ); - } - - @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 (action.present) { - map['action'] = Variable(action.value); - } - if (parameters.present) { - map['parameters'] = Variable(parameters.value); - } - if (sequence.present) { - map['sequence'] = Variable(sequence.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('AssetEditEntityCompanion(') - ..write('id: $id, ') - ..write('assetId: $assetId, ') - ..write('action: $action, ') - ..write('parameters: $parameters, ') - ..write('sequence: $sequence') - ..write(')')) - .toString(); - } -} - -class Metadata extends Table with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - Metadata(this.attachedDatabase, [this._alias]); - late final GeneratedColumn key = GeneratedColumn( - 'key', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn value = GeneratedColumn( - 'value', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - @override - List get $columns => [key, value, updatedAt]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'metadata'; - @override - Set get $primaryKey => {key}; - @override - MetadataData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return MetadataData( - key: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}key'], - )!, - value: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}value'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}updated_at'], - )!, - ); - } - - @override - Metadata createAlias(String alias) { - return Metadata(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY("key")']; - @override - bool get dontWriteConstraints => true; -} - -class MetadataData extends DataClass implements Insertable { - final String key; - final String value; - final String updatedAt; - const MetadataData({ - required this.key, - required this.value, - required this.updatedAt, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['key'] = Variable(key); - map['value'] = Variable(value); - map['updated_at'] = Variable(updatedAt); - return map; - } - - factory MetadataData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return MetadataData( - key: serializer.fromJson(json['key']), - value: serializer.fromJson(json['value']), - updatedAt: serializer.fromJson(json['updatedAt']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'key': serializer.toJson(key), - 'value': serializer.toJson(value), - 'updatedAt': serializer.toJson(updatedAt), - }; - } - - MetadataData copyWith({String? key, String? value, String? updatedAt}) => - MetadataData( - key: key ?? this.key, - value: value ?? this.value, - updatedAt: updatedAt ?? this.updatedAt, - ); - MetadataData copyWithCompanion(MetadataCompanion data) { - return MetadataData( - key: data.key.present ? data.key.value : this.key, - value: data.value.present ? data.value.value : this.value, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - ); - } - - @override - String toString() { - return (StringBuffer('MetadataData(') - ..write('key: $key, ') - ..write('value: $value, ') - ..write('updatedAt: $updatedAt') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(key, value, updatedAt); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is MetadataData && - other.key == this.key && - other.value == this.value && - other.updatedAt == this.updatedAt); -} - -class MetadataCompanion extends UpdateCompanion { - final Value key; - final Value value; - final Value updatedAt; - const MetadataCompanion({ - this.key = const Value.absent(), - this.value = const Value.absent(), - this.updatedAt = const Value.absent(), - }); - MetadataCompanion.insert({ - required String key, - required String value, - this.updatedAt = const Value.absent(), - }) : key = Value(key), - value = Value(value); - static Insertable custom({ - Expression? key, - Expression? value, - Expression? updatedAt, - }) { - return RawValuesInsertable({ - if (key != null) 'key': key, - if (value != null) 'value': value, - if (updatedAt != null) 'updated_at': updatedAt, - }); - } - - MetadataCompanion copyWith({ - Value? key, - Value? value, - Value? updatedAt, - }) { - return MetadataCompanion( - key: key ?? this.key, - value: value ?? this.value, - updatedAt: updatedAt ?? this.updatedAt, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (key.present) { - map['key'] = Variable(key.value); - } - if (value.present) { - map['value'] = Variable(value.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('MetadataCompanion(') - ..write('key: $key, ') - ..write('value: $value, ') - ..write('updatedAt: $updatedAt') - ..write(')')) - .toString(); - } -} - -class DatabaseAtV26 extends GeneratedDatabase { - DatabaseAtV26(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 idxLocalAlbumAssetAlbumAsset = Index( - 'idx_local_album_asset_album_asset', - 'CREATE INDEX IF NOT EXISTS idx_local_album_asset_album_asset ON local_album_asset_entity (album_id, asset_id)', - ); - 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 idxLocalAssetCloudId = Index( - 'idx_local_asset_cloud_id', - 'CREATE INDEX IF NOT EXISTS idx_local_asset_cloud_id ON local_asset_entity (i_cloud_id)', - ); - late final Index idxStackPrimaryAssetId = Index( - 'idx_stack_primary_asset_id', - 'CREATE INDEX IF NOT EXISTS idx_stack_primary_asset_id ON stack_entity (primary_asset_id)', - ); - 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 Index idxRemoteAssetStackId = Index( - 'idx_remote_asset_stack_id', - 'CREATE INDEX IF NOT EXISTS idx_remote_asset_stack_id ON remote_asset_entity (stack_id)', - ); - late final Index idxRemoteAssetOwnerVisibilityDeletedCreated = Index( - 'idx_remote_asset_owner_visibility_deleted_created', - 'CREATE INDEX IF NOT EXISTS idx_remote_asset_owner_visibility_deleted_created ON remote_asset_entity (owner_id, visibility, deleted_at, created_at DESC)', - ); - 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 RemoteAssetCloudIdEntity remoteAssetCloudIdEntity = - RemoteAssetCloudIdEntity(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 AssetEditEntity assetEditEntity = AssetEditEntity(this); - late final Metadata metadata = Metadata(this); - late final Index idxPartnerSharedWithId = Index( - 'idx_partner_shared_with_id', - 'CREATE INDEX IF NOT EXISTS idx_partner_shared_with_id ON partner_entity (shared_with_id)', - ); - 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 idxRemoteExifCity = Index( - 'idx_remote_exif_city', - 'CREATE INDEX IF NOT EXISTS idx_remote_exif_city ON remote_exif_entity (city) WHERE city IS NOT NULL', - ); - late final Index idxRemoteAlbumAssetAlbumAsset = Index( - 'idx_remote_album_asset_album_asset', - 'CREATE INDEX IF NOT EXISTS idx_remote_album_asset_album_asset ON remote_album_asset_entity (album_id, asset_id)', - ); - late final Index idxRemoteAssetCloudId = Index( - 'idx_remote_asset_cloud_id', - 'CREATE INDEX IF NOT EXISTS idx_remote_asset_cloud_id ON remote_asset_cloud_id_entity (cloud_id)', - ); - late final Index idxPersonOwnerId = Index( - 'idx_person_owner_id', - 'CREATE INDEX IF NOT EXISTS idx_person_owner_id ON person_entity (owner_id)', - ); - late final Index idxAssetFacePersonId = Index( - 'idx_asset_face_person_id', - 'CREATE INDEX IF NOT EXISTS idx_asset_face_person_id ON asset_face_entity (person_id)', - ); - late final Index idxAssetFaceAssetId = Index( - 'idx_asset_face_asset_id', - 'CREATE INDEX IF NOT EXISTS idx_asset_face_asset_id ON asset_face_entity (asset_id)', - ); - late final Index idxAssetFaceVisiblePerson = Index( - 'idx_asset_face_visible_person', - 'CREATE INDEX IF NOT EXISTS idx_asset_face_visible_person ON asset_face_entity (person_id, asset_id) WHERE is_visible = 1 AND deleted_at IS NULL', - ); - 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)', - ); - late final Index idxAssetEditAssetId = Index( - 'idx_asset_edit_asset_id', - 'CREATE INDEX IF NOT EXISTS idx_asset_edit_asset_id ON asset_edit_entity (asset_id)', - ); - @override - Iterable> get allTables => - allSchemaEntities.whereType>(); - @override - List get allSchemaEntities => [ - userEntity, - remoteAssetEntity, - stackEntity, - localAssetEntity, - remoteAlbumEntity, - localAlbumEntity, - localAlbumAssetEntity, - idxLocalAlbumAssetAlbumAsset, - idxLocalAssetChecksum, - idxLocalAssetCloudId, - idxStackPrimaryAssetId, - uQRemoteAssetsOwnerChecksum, - uQRemoteAssetsOwnerLibraryChecksum, - idxRemoteAssetChecksum, - idxRemoteAssetStackId, - idxRemoteAssetOwnerVisibilityDeletedCreated, - authUserEntity, - userMetadataEntity, - partnerEntity, - remoteExifEntity, - remoteAlbumAssetEntity, - remoteAlbumUserEntity, - remoteAssetCloudIdEntity, - memoryEntity, - memoryAssetEntity, - personEntity, - assetFaceEntity, - storeEntity, - trashedLocalAssetEntity, - assetEditEntity, - metadata, - idxPartnerSharedWithId, - idxLatLng, - idxRemoteExifCity, - idxRemoteAlbumAssetAlbumAsset, - idxRemoteAssetCloudId, - idxPersonOwnerId, - idxAssetFacePersonId, - idxAssetFaceAssetId, - idxAssetFaceVisiblePerson, - idxTrashedLocalAssetChecksum, - idxTrashedLocalAssetAlbum, - idxAssetEditAssetId, - ]; - @override - StreamQueryUpdateRules get streamUpdateRules => const StreamQueryUpdateRules([ - WritePropagation( - on: TableUpdateQuery.onTableName( - 'user_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('remote_asset_entity', kind: UpdateKind.delete)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'user_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('stack_entity', kind: UpdateKind.delete)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'remote_asset_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('remote_album_entity', kind: UpdateKind.update)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'remote_album_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('local_album_entity', kind: UpdateKind.update)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'local_asset_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [ - TableUpdate('local_album_asset_entity', kind: UpdateKind.delete), - ], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'local_album_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [ - TableUpdate('local_album_asset_entity', kind: UpdateKind.delete), - ], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'user_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('user_metadata_entity', kind: UpdateKind.delete)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'user_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('partner_entity', kind: UpdateKind.delete)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'user_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('partner_entity', kind: UpdateKind.delete)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'remote_asset_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('remote_exif_entity', kind: UpdateKind.delete)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'remote_asset_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [ - TableUpdate('remote_album_asset_entity', kind: UpdateKind.delete), - ], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'remote_album_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [ - TableUpdate('remote_album_asset_entity', kind: UpdateKind.delete), - ], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'remote_album_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [ - TableUpdate('remote_album_user_entity', kind: UpdateKind.delete), - ], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'user_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [ - TableUpdate('remote_album_user_entity', kind: UpdateKind.delete), - ], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'remote_asset_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [ - TableUpdate('remote_asset_cloud_id_entity', kind: UpdateKind.delete), - ], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'user_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('memory_entity', kind: UpdateKind.delete)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'remote_asset_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('memory_asset_entity', kind: UpdateKind.delete)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'memory_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('memory_asset_entity', kind: UpdateKind.delete)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'user_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('person_entity', kind: UpdateKind.delete)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'remote_asset_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('asset_face_entity', kind: UpdateKind.delete)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'person_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('asset_face_entity', kind: UpdateKind.update)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'remote_asset_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('asset_edit_entity', kind: UpdateKind.delete)], - ), - ]); - @override - int get schemaVersion => 26; - @override - DriftDatabaseOptions get options => - const DriftDatabaseOptions(storeDateTimeAsText: true); -} diff --git a/mobile/test/drift/main/generated/schema_v27.dart b/mobile/test/drift/main/generated/schema_v27.dart deleted file mode 100644 index 2b02946175..0000000000 --- a/mobile/test/drift/main/generated/schema_v27.dart +++ /dev/null @@ -1,9384 +0,0 @@ -// dart format width=80 -import 'dart:typed_data' as i2; -// GENERATED BY drift_dev, DO NOT MODIFY. -// ignore_for_file: type=lint,unused_import -// -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, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn email = GeneratedColumn( - 'email', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn hasProfileImage = GeneratedColumn( - 'has_profile_image', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: - 'NOT NULL DEFAULT 0 CHECK (has_profile_image IN (0, 1))', - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn profileChangedAt = GeneratedColumn( - 'profile_changed_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn avatarColor = GeneratedColumn( - 'avatar_color', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0', - 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.int, - data['${effectivePrefix}has_profile_image'], - )!, - profileChangedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - 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; - @override - List get customConstraints => const ['PRIMARY KEY(id)']; - @override - bool get dontWriteConstraints => true; -} - -class UserEntityData extends DataClass implements Insertable { - final String id; - final String name; - final String email; - final int hasProfileImage; - final String 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, - int? hasProfileImage, - String? 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, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn type = GeneratedColumn( - 'type', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn width = GeneratedColumn( - 'width', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn height = GeneratedColumn( - 'height', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn durationMs = GeneratedColumn( - 'duration_ms', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn checksum = GeneratedColumn( - 'checksum', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn isFavorite = GeneratedColumn( - 'is_favorite', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0 CHECK (is_favorite IN (0, 1))', - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn ownerId = GeneratedColumn( - 'owner_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL REFERENCES user_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn localDateTime = GeneratedColumn( - 'local_date_time', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn thumbHash = GeneratedColumn( - 'thumb_hash', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn deletedAt = GeneratedColumn( - 'deleted_at', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn uploadedAt = GeneratedColumn( - 'uploaded_at', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn livePhotoVideoId = GeneratedColumn( - 'live_photo_video_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn visibility = GeneratedColumn( - 'visibility', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn stackId = GeneratedColumn( - 'stack_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn libraryId = GeneratedColumn( - 'library_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn isEdited = GeneratedColumn( - 'is_edited', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0 CHECK (is_edited IN (0, 1))', - defaultValue: const CustomExpression('0'), - ); - @override - List get $columns => [ - name, - type, - createdAt, - updatedAt, - width, - height, - durationMs, - id, - checksum, - isFavorite, - ownerId, - localDateTime, - thumbHash, - deletedAt, - uploadedAt, - livePhotoVideoId, - visibility, - stackId, - libraryId, - isEdited, - ]; - @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.string, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}updated_at'], - )!, - width: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}width'], - ), - height: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}height'], - ), - durationMs: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}duration_ms'], - ), - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - checksum: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}checksum'], - )!, - isFavorite: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}is_favorite'], - )!, - ownerId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}owner_id'], - )!, - localDateTime: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}local_date_time'], - ), - thumbHash: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}thumb_hash'], - ), - deletedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}deleted_at'], - ), - uploadedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}uploaded_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'], - ), - isEdited: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}is_edited'], - )!, - ); - } - - @override - RemoteAssetEntity createAlias(String alias) { - return RemoteAssetEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY(id)']; - @override - bool get dontWriteConstraints => true; -} - -class RemoteAssetEntityData extends DataClass - implements Insertable { - final String name; - final int type; - final String createdAt; - final String updatedAt; - final int? width; - final int? height; - final int? durationMs; - final String id; - final String checksum; - final int isFavorite; - final String ownerId; - final String? localDateTime; - final String? thumbHash; - final String? deletedAt; - final String? uploadedAt; - final String? livePhotoVideoId; - final int visibility; - final String? stackId; - final String? libraryId; - final int isEdited; - const RemoteAssetEntityData({ - required this.name, - required this.type, - required this.createdAt, - required this.updatedAt, - this.width, - this.height, - this.durationMs, - required this.id, - required this.checksum, - required this.isFavorite, - required this.ownerId, - this.localDateTime, - this.thumbHash, - this.deletedAt, - this.uploadedAt, - this.livePhotoVideoId, - required this.visibility, - this.stackId, - this.libraryId, - required this.isEdited, - }); - @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 || durationMs != null) { - map['duration_ms'] = Variable(durationMs); - } - 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 || uploadedAt != null) { - map['uploaded_at'] = Variable(uploadedAt); - } - 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); - } - map['is_edited'] = Variable(isEdited); - 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']), - durationMs: serializer.fromJson(json['durationMs']), - 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']), - uploadedAt: serializer.fromJson(json['uploadedAt']), - livePhotoVideoId: serializer.fromJson(json['livePhotoVideoId']), - visibility: serializer.fromJson(json['visibility']), - stackId: serializer.fromJson(json['stackId']), - libraryId: serializer.fromJson(json['libraryId']), - isEdited: serializer.fromJson(json['isEdited']), - ); - } - @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), - 'durationMs': serializer.toJson(durationMs), - '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), - 'uploadedAt': serializer.toJson(uploadedAt), - 'livePhotoVideoId': serializer.toJson(livePhotoVideoId), - 'visibility': serializer.toJson(visibility), - 'stackId': serializer.toJson(stackId), - 'libraryId': serializer.toJson(libraryId), - 'isEdited': serializer.toJson(isEdited), - }; - } - - RemoteAssetEntityData copyWith({ - String? name, - int? type, - String? createdAt, - String? updatedAt, - Value width = const Value.absent(), - Value height = const Value.absent(), - Value durationMs = const Value.absent(), - String? id, - String? checksum, - int? isFavorite, - String? ownerId, - Value localDateTime = const Value.absent(), - Value thumbHash = const Value.absent(), - Value deletedAt = const Value.absent(), - Value uploadedAt = const Value.absent(), - Value livePhotoVideoId = const Value.absent(), - int? visibility, - Value stackId = const Value.absent(), - Value libraryId = const Value.absent(), - int? isEdited, - }) => 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, - durationMs: durationMs.present ? durationMs.value : this.durationMs, - 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, - uploadedAt: uploadedAt.present ? uploadedAt.value : this.uploadedAt, - 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, - isEdited: isEdited ?? this.isEdited, - ); - 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, - durationMs: data.durationMs.present - ? data.durationMs.value - : this.durationMs, - 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, - uploadedAt: data.uploadedAt.present - ? data.uploadedAt.value - : this.uploadedAt, - 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, - isEdited: data.isEdited.present ? data.isEdited.value : this.isEdited, - ); - } - - @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('durationMs: $durationMs, ') - ..write('id: $id, ') - ..write('checksum: $checksum, ') - ..write('isFavorite: $isFavorite, ') - ..write('ownerId: $ownerId, ') - ..write('localDateTime: $localDateTime, ') - ..write('thumbHash: $thumbHash, ') - ..write('deletedAt: $deletedAt, ') - ..write('uploadedAt: $uploadedAt, ') - ..write('livePhotoVideoId: $livePhotoVideoId, ') - ..write('visibility: $visibility, ') - ..write('stackId: $stackId, ') - ..write('libraryId: $libraryId, ') - ..write('isEdited: $isEdited') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - name, - type, - createdAt, - updatedAt, - width, - height, - durationMs, - id, - checksum, - isFavorite, - ownerId, - localDateTime, - thumbHash, - deletedAt, - uploadedAt, - livePhotoVideoId, - visibility, - stackId, - libraryId, - isEdited, - ); - @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.durationMs == this.durationMs && - 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.uploadedAt == this.uploadedAt && - other.livePhotoVideoId == this.livePhotoVideoId && - other.visibility == this.visibility && - other.stackId == this.stackId && - other.libraryId == this.libraryId && - other.isEdited == this.isEdited); -} - -class RemoteAssetEntityCompanion - extends UpdateCompanion { - final Value name; - final Value type; - final Value createdAt; - final Value updatedAt; - final Value width; - final Value height; - final Value durationMs; - final Value id; - final Value checksum; - final Value isFavorite; - final Value ownerId; - final Value localDateTime; - final Value thumbHash; - final Value deletedAt; - final Value uploadedAt; - final Value livePhotoVideoId; - final Value visibility; - final Value stackId; - final Value libraryId; - final Value isEdited; - 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.durationMs = 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.uploadedAt = const Value.absent(), - this.livePhotoVideoId = const Value.absent(), - this.visibility = const Value.absent(), - this.stackId = const Value.absent(), - this.libraryId = const Value.absent(), - this.isEdited = 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.durationMs = 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.uploadedAt = const Value.absent(), - this.livePhotoVideoId = const Value.absent(), - required int visibility, - this.stackId = const Value.absent(), - this.libraryId = const Value.absent(), - this.isEdited = 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? durationMs, - Expression? id, - Expression? checksum, - Expression? isFavorite, - Expression? ownerId, - Expression? localDateTime, - Expression? thumbHash, - Expression? deletedAt, - Expression? uploadedAt, - Expression? livePhotoVideoId, - Expression? visibility, - Expression? stackId, - Expression? libraryId, - Expression? isEdited, - }) { - 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 (durationMs != null) 'duration_ms': durationMs, - 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 (uploadedAt != null) 'uploaded_at': uploadedAt, - 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, - if (isEdited != null) 'is_edited': isEdited, - }); - } - - RemoteAssetEntityCompanion copyWith({ - Value? name, - Value? type, - Value? createdAt, - Value? updatedAt, - Value? width, - Value? height, - Value? durationMs, - Value? id, - Value? checksum, - Value? isFavorite, - Value? ownerId, - Value? localDateTime, - Value? thumbHash, - Value? deletedAt, - Value? uploadedAt, - Value? livePhotoVideoId, - Value? visibility, - Value? stackId, - Value? libraryId, - Value? isEdited, - }) { - 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, - durationMs: durationMs ?? this.durationMs, - 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, - uploadedAt: uploadedAt ?? this.uploadedAt, - livePhotoVideoId: livePhotoVideoId ?? this.livePhotoVideoId, - visibility: visibility ?? this.visibility, - stackId: stackId ?? this.stackId, - libraryId: libraryId ?? this.libraryId, - isEdited: isEdited ?? this.isEdited, - ); - } - - @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 (durationMs.present) { - map['duration_ms'] = Variable(durationMs.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 (uploadedAt.present) { - map['uploaded_at'] = Variable(uploadedAt.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); - } - if (isEdited.present) { - map['is_edited'] = Variable(isEdited.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('durationMs: $durationMs, ') - ..write('id: $id, ') - ..write('checksum: $checksum, ') - ..write('isFavorite: $isFavorite, ') - ..write('ownerId: $ownerId, ') - ..write('localDateTime: $localDateTime, ') - ..write('thumbHash: $thumbHash, ') - ..write('deletedAt: $deletedAt, ') - ..write('uploadedAt: $uploadedAt, ') - ..write('livePhotoVideoId: $livePhotoVideoId, ') - ..write('visibility: $visibility, ') - ..write('stackId: $stackId, ') - ..write('libraryId: $libraryId, ') - ..write('isEdited: $isEdited') - ..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, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn ownerId = GeneratedColumn( - 'owner_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL REFERENCES user_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn primaryAssetId = GeneratedColumn( - 'primary_asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - @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.string, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - 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; - @override - List get customConstraints => const ['PRIMARY KEY(id)']; - @override - bool get dontWriteConstraints => true; -} - -class StackEntityData extends DataClass implements Insertable { - final String id; - final String createdAt; - final String 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, - String? createdAt, - String? 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, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn type = GeneratedColumn( - 'type', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn width = GeneratedColumn( - 'width', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn height = GeneratedColumn( - 'height', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn durationMs = GeneratedColumn( - 'duration_ms', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn checksum = GeneratedColumn( - 'checksum', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn isFavorite = GeneratedColumn( - 'is_favorite', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0 CHECK (is_favorite IN (0, 1))', - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn orientation = GeneratedColumn( - 'orientation', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0', - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn iCloudId = GeneratedColumn( - 'i_cloud_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn adjustmentTime = GeneratedColumn( - 'adjustment_time', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn latitude = GeneratedColumn( - 'latitude', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn longitude = GeneratedColumn( - 'longitude', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn playbackStyle = GeneratedColumn( - 'playback_style', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0', - defaultValue: const CustomExpression('0'), - ); - @override - List get $columns => [ - name, - type, - createdAt, - updatedAt, - width, - height, - durationMs, - id, - checksum, - isFavorite, - orientation, - iCloudId, - adjustmentTime, - latitude, - longitude, - playbackStyle, - ]; - @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.string, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}updated_at'], - )!, - width: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}width'], - ), - height: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}height'], - ), - durationMs: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}duration_ms'], - ), - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - checksum: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}checksum'], - ), - isFavorite: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}is_favorite'], - )!, - orientation: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}orientation'], - )!, - iCloudId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}i_cloud_id'], - ), - adjustmentTime: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}adjustment_time'], - ), - latitude: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}latitude'], - ), - longitude: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}longitude'], - ), - playbackStyle: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}playback_style'], - )!, - ); - } - - @override - LocalAssetEntity createAlias(String alias) { - return LocalAssetEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY(id)']; - @override - bool get dontWriteConstraints => true; -} - -class LocalAssetEntityData extends DataClass - implements Insertable { - final String name; - final int type; - final String createdAt; - final String updatedAt; - final int? width; - final int? height; - final int? durationMs; - final String id; - final String? checksum; - final int isFavorite; - final int orientation; - final String? iCloudId; - final String? adjustmentTime; - final double? latitude; - final double? longitude; - final int playbackStyle; - const LocalAssetEntityData({ - required this.name, - required this.type, - required this.createdAt, - required this.updatedAt, - this.width, - this.height, - this.durationMs, - required this.id, - this.checksum, - required this.isFavorite, - required this.orientation, - this.iCloudId, - this.adjustmentTime, - this.latitude, - this.longitude, - required this.playbackStyle, - }); - @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 || durationMs != null) { - map['duration_ms'] = Variable(durationMs); - } - map['id'] = Variable(id); - if (!nullToAbsent || checksum != null) { - map['checksum'] = Variable(checksum); - } - map['is_favorite'] = Variable(isFavorite); - map['orientation'] = Variable(orientation); - if (!nullToAbsent || iCloudId != null) { - map['i_cloud_id'] = Variable(iCloudId); - } - if (!nullToAbsent || adjustmentTime != null) { - map['adjustment_time'] = Variable(adjustmentTime); - } - if (!nullToAbsent || latitude != null) { - map['latitude'] = Variable(latitude); - } - if (!nullToAbsent || longitude != null) { - map['longitude'] = Variable(longitude); - } - map['playback_style'] = Variable(playbackStyle); - 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']), - durationMs: serializer.fromJson(json['durationMs']), - id: serializer.fromJson(json['id']), - checksum: serializer.fromJson(json['checksum']), - isFavorite: serializer.fromJson(json['isFavorite']), - orientation: serializer.fromJson(json['orientation']), - iCloudId: serializer.fromJson(json['iCloudId']), - adjustmentTime: serializer.fromJson(json['adjustmentTime']), - latitude: serializer.fromJson(json['latitude']), - longitude: serializer.fromJson(json['longitude']), - playbackStyle: serializer.fromJson(json['playbackStyle']), - ); - } - @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), - 'durationMs': serializer.toJson(durationMs), - 'id': serializer.toJson(id), - 'checksum': serializer.toJson(checksum), - 'isFavorite': serializer.toJson(isFavorite), - 'orientation': serializer.toJson(orientation), - 'iCloudId': serializer.toJson(iCloudId), - 'adjustmentTime': serializer.toJson(adjustmentTime), - 'latitude': serializer.toJson(latitude), - 'longitude': serializer.toJson(longitude), - 'playbackStyle': serializer.toJson(playbackStyle), - }; - } - - LocalAssetEntityData copyWith({ - String? name, - int? type, - String? createdAt, - String? updatedAt, - Value width = const Value.absent(), - Value height = const Value.absent(), - Value durationMs = const Value.absent(), - String? id, - Value checksum = const Value.absent(), - int? isFavorite, - int? orientation, - Value iCloudId = const Value.absent(), - Value adjustmentTime = const Value.absent(), - Value latitude = const Value.absent(), - Value longitude = const Value.absent(), - int? playbackStyle, - }) => 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, - durationMs: durationMs.present ? durationMs.value : this.durationMs, - id: id ?? this.id, - checksum: checksum.present ? checksum.value : this.checksum, - isFavorite: isFavorite ?? this.isFavorite, - orientation: orientation ?? this.orientation, - iCloudId: iCloudId.present ? iCloudId.value : this.iCloudId, - adjustmentTime: adjustmentTime.present - ? adjustmentTime.value - : this.adjustmentTime, - latitude: latitude.present ? latitude.value : this.latitude, - longitude: longitude.present ? longitude.value : this.longitude, - playbackStyle: playbackStyle ?? this.playbackStyle, - ); - 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, - durationMs: data.durationMs.present - ? data.durationMs.value - : this.durationMs, - 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, - iCloudId: data.iCloudId.present ? data.iCloudId.value : this.iCloudId, - adjustmentTime: data.adjustmentTime.present - ? data.adjustmentTime.value - : this.adjustmentTime, - latitude: data.latitude.present ? data.latitude.value : this.latitude, - longitude: data.longitude.present ? data.longitude.value : this.longitude, - playbackStyle: data.playbackStyle.present - ? data.playbackStyle.value - : this.playbackStyle, - ); - } - - @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('durationMs: $durationMs, ') - ..write('id: $id, ') - ..write('checksum: $checksum, ') - ..write('isFavorite: $isFavorite, ') - ..write('orientation: $orientation, ') - ..write('iCloudId: $iCloudId, ') - ..write('adjustmentTime: $adjustmentTime, ') - ..write('latitude: $latitude, ') - ..write('longitude: $longitude, ') - ..write('playbackStyle: $playbackStyle') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - name, - type, - createdAt, - updatedAt, - width, - height, - durationMs, - id, - checksum, - isFavorite, - orientation, - iCloudId, - adjustmentTime, - latitude, - longitude, - playbackStyle, - ); - @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.durationMs == this.durationMs && - other.id == this.id && - other.checksum == this.checksum && - other.isFavorite == this.isFavorite && - other.orientation == this.orientation && - other.iCloudId == this.iCloudId && - other.adjustmentTime == this.adjustmentTime && - other.latitude == this.latitude && - other.longitude == this.longitude && - other.playbackStyle == this.playbackStyle); -} - -class LocalAssetEntityCompanion extends UpdateCompanion { - final Value name; - final Value type; - final Value createdAt; - final Value updatedAt; - final Value width; - final Value height; - final Value durationMs; - final Value id; - final Value checksum; - final Value isFavorite; - final Value orientation; - final Value iCloudId; - final Value adjustmentTime; - final Value latitude; - final Value longitude; - final Value playbackStyle; - 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.durationMs = const Value.absent(), - this.id = const Value.absent(), - this.checksum = const Value.absent(), - this.isFavorite = const Value.absent(), - this.orientation = const Value.absent(), - this.iCloudId = const Value.absent(), - this.adjustmentTime = const Value.absent(), - this.latitude = const Value.absent(), - this.longitude = const Value.absent(), - this.playbackStyle = 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.durationMs = const Value.absent(), - required String id, - this.checksum = const Value.absent(), - this.isFavorite = const Value.absent(), - this.orientation = const Value.absent(), - this.iCloudId = const Value.absent(), - this.adjustmentTime = const Value.absent(), - this.latitude = const Value.absent(), - this.longitude = const Value.absent(), - this.playbackStyle = 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? durationMs, - Expression? id, - Expression? checksum, - Expression? isFavorite, - Expression? orientation, - Expression? iCloudId, - Expression? adjustmentTime, - Expression? latitude, - Expression? longitude, - Expression? playbackStyle, - }) { - 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 (durationMs != null) 'duration_ms': durationMs, - if (id != null) 'id': id, - if (checksum != null) 'checksum': checksum, - if (isFavorite != null) 'is_favorite': isFavorite, - if (orientation != null) 'orientation': orientation, - if (iCloudId != null) 'i_cloud_id': iCloudId, - if (adjustmentTime != null) 'adjustment_time': adjustmentTime, - if (latitude != null) 'latitude': latitude, - if (longitude != null) 'longitude': longitude, - if (playbackStyle != null) 'playback_style': playbackStyle, - }); - } - - LocalAssetEntityCompanion copyWith({ - Value? name, - Value? type, - Value? createdAt, - Value? updatedAt, - Value? width, - Value? height, - Value? durationMs, - Value? id, - Value? checksum, - Value? isFavorite, - Value? orientation, - Value? iCloudId, - Value? adjustmentTime, - Value? latitude, - Value? longitude, - Value? playbackStyle, - }) { - 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, - durationMs: durationMs ?? this.durationMs, - id: id ?? this.id, - checksum: checksum ?? this.checksum, - isFavorite: isFavorite ?? this.isFavorite, - orientation: orientation ?? this.orientation, - iCloudId: iCloudId ?? this.iCloudId, - adjustmentTime: adjustmentTime ?? this.adjustmentTime, - latitude: latitude ?? this.latitude, - longitude: longitude ?? this.longitude, - playbackStyle: playbackStyle ?? this.playbackStyle, - ); - } - - @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 (durationMs.present) { - map['duration_ms'] = Variable(durationMs.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); - } - if (iCloudId.present) { - map['i_cloud_id'] = Variable(iCloudId.value); - } - if (adjustmentTime.present) { - map['adjustment_time'] = Variable(adjustmentTime.value); - } - if (latitude.present) { - map['latitude'] = Variable(latitude.value); - } - if (longitude.present) { - map['longitude'] = Variable(longitude.value); - } - if (playbackStyle.present) { - map['playback_style'] = Variable(playbackStyle.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('durationMs: $durationMs, ') - ..write('id: $id, ') - ..write('checksum: $checksum, ') - ..write('isFavorite: $isFavorite, ') - ..write('orientation: $orientation, ') - ..write('iCloudId: $iCloudId, ') - ..write('adjustmentTime: $adjustmentTime, ') - ..write('latitude: $latitude, ') - ..write('longitude: $longitude, ') - ..write('playbackStyle: $playbackStyle') - ..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, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn description = GeneratedColumn( - 'description', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT \'\'', - defaultValue: const CustomExpression('\'\''), - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn thumbnailAssetId = GeneratedColumn( - 'thumbnail_asset_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: - 'NULL REFERENCES remote_asset_entity(id)ON DELETE SET NULL', - ); - late final GeneratedColumn isActivityEnabled = GeneratedColumn( - 'is_activity_enabled', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: - 'NOT NULL DEFAULT 1 CHECK (is_activity_enabled IN (0, 1))', - defaultValue: const CustomExpression('1'), - ); - late final GeneratedColumn order = GeneratedColumn( - 'order', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - @override - List get $columns => [ - id, - name, - description, - createdAt, - updatedAt, - 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.string, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}updated_at'], - )!, - thumbnailAssetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}thumbnail_asset_id'], - ), - isActivityEnabled: attachedDatabase.typeMapping.read( - DriftSqlType.int, - 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; - @override - List get customConstraints => const ['PRIMARY KEY(id)']; - @override - bool get dontWriteConstraints => true; -} - -class RemoteAlbumEntityData extends DataClass - implements Insertable { - final String id; - final String name; - final String description; - final String createdAt; - final String updatedAt; - final String? thumbnailAssetId; - final int isActivityEnabled; - final int order; - const RemoteAlbumEntityData({ - required this.id, - required this.name, - required this.description, - required this.createdAt, - required this.updatedAt, - 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); - 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']), - 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), - 'thumbnailAssetId': serializer.toJson(thumbnailAssetId), - 'isActivityEnabled': serializer.toJson(isActivityEnabled), - 'order': serializer.toJson(order), - }; - } - - RemoteAlbumEntityData copyWith({ - String? id, - String? name, - String? description, - String? createdAt, - String? updatedAt, - Value thumbnailAssetId = const Value.absent(), - int? isActivityEnabled, - int? order, - }) => RemoteAlbumEntityData( - id: id ?? this.id, - name: name ?? this.name, - description: description ?? this.description, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - 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, - 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('thumbnailAssetId: $thumbnailAssetId, ') - ..write('isActivityEnabled: $isActivityEnabled, ') - ..write('order: $order') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - name, - description, - createdAt, - updatedAt, - 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.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 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.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(), - this.thumbnailAssetId = const Value.absent(), - this.isActivityEnabled = const Value.absent(), - required int order, - }) : id = Value(id), - name = Value(name), - order = Value(order); - static Insertable custom({ - Expression? id, - Expression? name, - Expression? description, - Expression? createdAt, - Expression? updatedAt, - 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 (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? 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, - 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 (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('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, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn backupSelection = GeneratedColumn( - 'backup_selection', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn isIosSharedAlbum = GeneratedColumn( - 'is_ios_shared_album', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: - 'NOT NULL DEFAULT 0 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, - $customConstraints: - 'NULL REFERENCES remote_album_entity(id)ON DELETE SET NULL', - ); - late final GeneratedColumn marker = GeneratedColumn( - 'marker', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL 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.string, - data['${effectivePrefix}updated_at'], - )!, - backupSelection: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}backup_selection'], - )!, - isIosSharedAlbum: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}is_ios_shared_album'], - )!, - linkedRemoteAlbumId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}linked_remote_album_id'], - ), - marker: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}marker'], - ), - ); - } - - @override - LocalAlbumEntity createAlias(String alias) { - return LocalAlbumEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY(id)']; - @override - bool get dontWriteConstraints => true; -} - -class LocalAlbumEntityData extends DataClass - implements Insertable { - final String id; - final String name; - final String updatedAt; - final int backupSelection; - final int isIosSharedAlbum; - final String? linkedRemoteAlbumId; - final int? 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, - String? updatedAt, - int? backupSelection, - int? 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, - $customConstraints: - 'NOT NULL REFERENCES local_asset_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn albumId = GeneratedColumn( - 'album_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: - 'NOT NULL REFERENCES local_album_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn marker = GeneratedColumn( - 'marker', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL 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.int, - data['${effectivePrefix}marker'], - ), - ); - } - - @override - LocalAlbumAssetEntity createAlias(String alias) { - return LocalAlbumAssetEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const [ - 'PRIMARY KEY(asset_id, album_id)', - ]; - @override - bool get dontWriteConstraints => true; -} - -class LocalAlbumAssetEntityData extends DataClass - implements Insertable { - final String assetId; - final String albumId; - final int? 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, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn email = GeneratedColumn( - 'email', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn isAdmin = GeneratedColumn( - 'is_admin', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0 CHECK (is_admin IN (0, 1))', - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn hasProfileImage = GeneratedColumn( - 'has_profile_image', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: - 'NOT NULL DEFAULT 0 CHECK (has_profile_image IN (0, 1))', - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn profileChangedAt = GeneratedColumn( - 'profile_changed_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn avatarColor = GeneratedColumn( - 'avatar_color', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn quotaSizeInBytes = GeneratedColumn( - 'quota_size_in_bytes', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0', - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn quotaUsageInBytes = GeneratedColumn( - 'quota_usage_in_bytes', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0', - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn pinCode = GeneratedColumn( - 'pin_code', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - @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.int, - data['${effectivePrefix}is_admin'], - )!, - hasProfileImage: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}has_profile_image'], - )!, - profileChangedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - 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; - @override - List get customConstraints => const ['PRIMARY KEY(id)']; - @override - bool get dontWriteConstraints => true; -} - -class AuthUserEntityData extends DataClass - implements Insertable { - final String id; - final String name; - final String email; - final int isAdmin; - final int hasProfileImage; - final String 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, - int? isAdmin, - int? hasProfileImage, - String? 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, - $customConstraints: 'NOT NULL REFERENCES user_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn key = GeneratedColumn( - 'key', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn value = - GeneratedColumn( - 'value', - aliasedName, - false, - type: DriftSqlType.blob, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - @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; - @override - List get customConstraints => const ['PRIMARY KEY(user_id, "key")']; - @override - bool get dontWriteConstraints => true; -} - -class UserMetadataEntityData extends DataClass - implements Insertable { - final String userId; - final int key; - final i2.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, - i2.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 i2.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, - $customConstraints: 'NOT NULL REFERENCES user_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn sharedWithId = GeneratedColumn( - 'shared_with_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL REFERENCES user_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn inTimeline = GeneratedColumn( - 'in_timeline', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0 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.int, - data['${effectivePrefix}in_timeline'], - )!, - ); - } - - @override - PartnerEntity createAlias(String alias) { - return PartnerEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const [ - 'PRIMARY KEY(shared_by_id, shared_with_id)', - ]; - @override - bool get dontWriteConstraints => true; -} - -class PartnerEntityData extends DataClass - implements Insertable { - final String sharedById; - final String sharedWithId; - final int 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, - int? 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, - $customConstraints: - 'NOT NULL REFERENCES remote_asset_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn city = GeneratedColumn( - 'city', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn state = GeneratedColumn( - 'state', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn country = GeneratedColumn( - 'country', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn dateTimeOriginal = GeneratedColumn( - 'date_time_original', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn description = GeneratedColumn( - 'description', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn height = GeneratedColumn( - 'height', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn width = GeneratedColumn( - 'width', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn exposureTime = GeneratedColumn( - 'exposure_time', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn fNumber = GeneratedColumn( - 'f_number', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn fileSize = GeneratedColumn( - 'file_size', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn focalLength = GeneratedColumn( - 'focal_length', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn latitude = GeneratedColumn( - 'latitude', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn longitude = GeneratedColumn( - 'longitude', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn iso = GeneratedColumn( - 'iso', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn make = GeneratedColumn( - 'make', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn model = GeneratedColumn( - 'model', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn lens = GeneratedColumn( - 'lens', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn orientation = GeneratedColumn( - 'orientation', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn timeZone = GeneratedColumn( - 'time_zone', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn rating = GeneratedColumn( - 'rating', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn projectionType = GeneratedColumn( - 'projection_type', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - @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.string, - 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; - @override - List get customConstraints => const ['PRIMARY KEY(asset_id)']; - @override - bool get dontWriteConstraints => true; -} - -class RemoteExifEntityData extends DataClass - implements Insertable { - final String assetId; - final String? city; - final String? state; - final String? country; - final String? 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, - $customConstraints: - 'NOT NULL REFERENCES remote_asset_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn albumId = GeneratedColumn( - 'album_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: - 'NOT NULL 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; - @override - List get customConstraints => const [ - 'PRIMARY KEY(asset_id, album_id)', - ]; - @override - bool get dontWriteConstraints => 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, - $customConstraints: - 'NOT NULL REFERENCES remote_album_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn userId = GeneratedColumn( - 'user_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL REFERENCES user_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn role = GeneratedColumn( - 'role', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - @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; - @override - List get customConstraints => const [ - 'PRIMARY KEY(album_id, user_id)', - ]; - @override - bool get dontWriteConstraints => 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 RemoteAssetCloudIdEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - RemoteAssetCloudIdEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn assetId = GeneratedColumn( - 'asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: - 'NOT NULL REFERENCES remote_asset_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn cloudId = GeneratedColumn( - 'cloud_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn adjustmentTime = GeneratedColumn( - 'adjustment_time', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn latitude = GeneratedColumn( - 'latitude', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn longitude = GeneratedColumn( - 'longitude', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - @override - List get $columns => [ - assetId, - cloudId, - createdAt, - adjustmentTime, - latitude, - longitude, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'remote_asset_cloud_id_entity'; - @override - Set get $primaryKey => {assetId}; - @override - RemoteAssetCloudIdEntityData map( - Map data, { - String? tablePrefix, - }) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return RemoteAssetCloudIdEntityData( - assetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}asset_id'], - )!, - cloudId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}cloud_id'], - ), - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}created_at'], - ), - adjustmentTime: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}adjustment_time'], - ), - latitude: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}latitude'], - ), - longitude: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}longitude'], - ), - ); - } - - @override - RemoteAssetCloudIdEntity createAlias(String alias) { - return RemoteAssetCloudIdEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY(asset_id)']; - @override - bool get dontWriteConstraints => true; -} - -class RemoteAssetCloudIdEntityData extends DataClass - implements Insertable { - final String assetId; - final String? cloudId; - final String? createdAt; - final String? adjustmentTime; - final double? latitude; - final double? longitude; - const RemoteAssetCloudIdEntityData({ - required this.assetId, - this.cloudId, - this.createdAt, - this.adjustmentTime, - this.latitude, - this.longitude, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['asset_id'] = Variable(assetId); - if (!nullToAbsent || cloudId != null) { - map['cloud_id'] = Variable(cloudId); - } - if (!nullToAbsent || createdAt != null) { - map['created_at'] = Variable(createdAt); - } - if (!nullToAbsent || adjustmentTime != null) { - map['adjustment_time'] = Variable(adjustmentTime); - } - if (!nullToAbsent || latitude != null) { - map['latitude'] = Variable(latitude); - } - if (!nullToAbsent || longitude != null) { - map['longitude'] = Variable(longitude); - } - return map; - } - - factory RemoteAssetCloudIdEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return RemoteAssetCloudIdEntityData( - assetId: serializer.fromJson(json['assetId']), - cloudId: serializer.fromJson(json['cloudId']), - createdAt: serializer.fromJson(json['createdAt']), - adjustmentTime: serializer.fromJson(json['adjustmentTime']), - latitude: serializer.fromJson(json['latitude']), - longitude: serializer.fromJson(json['longitude']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'assetId': serializer.toJson(assetId), - 'cloudId': serializer.toJson(cloudId), - 'createdAt': serializer.toJson(createdAt), - 'adjustmentTime': serializer.toJson(adjustmentTime), - 'latitude': serializer.toJson(latitude), - 'longitude': serializer.toJson(longitude), - }; - } - - RemoteAssetCloudIdEntityData copyWith({ - String? assetId, - Value cloudId = const Value.absent(), - Value createdAt = const Value.absent(), - Value adjustmentTime = const Value.absent(), - Value latitude = const Value.absent(), - Value longitude = const Value.absent(), - }) => RemoteAssetCloudIdEntityData( - assetId: assetId ?? this.assetId, - cloudId: cloudId.present ? cloudId.value : this.cloudId, - createdAt: createdAt.present ? createdAt.value : this.createdAt, - adjustmentTime: adjustmentTime.present - ? adjustmentTime.value - : this.adjustmentTime, - latitude: latitude.present ? latitude.value : this.latitude, - longitude: longitude.present ? longitude.value : this.longitude, - ); - RemoteAssetCloudIdEntityData copyWithCompanion( - RemoteAssetCloudIdEntityCompanion data, - ) { - return RemoteAssetCloudIdEntityData( - assetId: data.assetId.present ? data.assetId.value : this.assetId, - cloudId: data.cloudId.present ? data.cloudId.value : this.cloudId, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - adjustmentTime: data.adjustmentTime.present - ? data.adjustmentTime.value - : this.adjustmentTime, - latitude: data.latitude.present ? data.latitude.value : this.latitude, - longitude: data.longitude.present ? data.longitude.value : this.longitude, - ); - } - - @override - String toString() { - return (StringBuffer('RemoteAssetCloudIdEntityData(') - ..write('assetId: $assetId, ') - ..write('cloudId: $cloudId, ') - ..write('createdAt: $createdAt, ') - ..write('adjustmentTime: $adjustmentTime, ') - ..write('latitude: $latitude, ') - ..write('longitude: $longitude') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - assetId, - cloudId, - createdAt, - adjustmentTime, - latitude, - longitude, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is RemoteAssetCloudIdEntityData && - other.assetId == this.assetId && - other.cloudId == this.cloudId && - other.createdAt == this.createdAt && - other.adjustmentTime == this.adjustmentTime && - other.latitude == this.latitude && - other.longitude == this.longitude); -} - -class RemoteAssetCloudIdEntityCompanion - extends UpdateCompanion { - final Value assetId; - final Value cloudId; - final Value createdAt; - final Value adjustmentTime; - final Value latitude; - final Value longitude; - const RemoteAssetCloudIdEntityCompanion({ - this.assetId = const Value.absent(), - this.cloudId = const Value.absent(), - this.createdAt = const Value.absent(), - this.adjustmentTime = const Value.absent(), - this.latitude = const Value.absent(), - this.longitude = const Value.absent(), - }); - RemoteAssetCloudIdEntityCompanion.insert({ - required String assetId, - this.cloudId = const Value.absent(), - this.createdAt = const Value.absent(), - this.adjustmentTime = const Value.absent(), - this.latitude = const Value.absent(), - this.longitude = const Value.absent(), - }) : assetId = Value(assetId); - static Insertable custom({ - Expression? assetId, - Expression? cloudId, - Expression? createdAt, - Expression? adjustmentTime, - Expression? latitude, - Expression? longitude, - }) { - return RawValuesInsertable({ - if (assetId != null) 'asset_id': assetId, - if (cloudId != null) 'cloud_id': cloudId, - if (createdAt != null) 'created_at': createdAt, - if (adjustmentTime != null) 'adjustment_time': adjustmentTime, - if (latitude != null) 'latitude': latitude, - if (longitude != null) 'longitude': longitude, - }); - } - - RemoteAssetCloudIdEntityCompanion copyWith({ - Value? assetId, - Value? cloudId, - Value? createdAt, - Value? adjustmentTime, - Value? latitude, - Value? longitude, - }) { - return RemoteAssetCloudIdEntityCompanion( - assetId: assetId ?? this.assetId, - cloudId: cloudId ?? this.cloudId, - createdAt: createdAt ?? this.createdAt, - adjustmentTime: adjustmentTime ?? this.adjustmentTime, - latitude: latitude ?? this.latitude, - longitude: longitude ?? this.longitude, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (assetId.present) { - map['asset_id'] = Variable(assetId.value); - } - if (cloudId.present) { - map['cloud_id'] = Variable(cloudId.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (adjustmentTime.present) { - map['adjustment_time'] = Variable(adjustmentTime.value); - } - if (latitude.present) { - map['latitude'] = Variable(latitude.value); - } - if (longitude.present) { - map['longitude'] = Variable(longitude.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('RemoteAssetCloudIdEntityCompanion(') - ..write('assetId: $assetId, ') - ..write('cloudId: $cloudId, ') - ..write('createdAt: $createdAt, ') - ..write('adjustmentTime: $adjustmentTime, ') - ..write('latitude: $latitude, ') - ..write('longitude: $longitude') - ..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, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn deletedAt = GeneratedColumn( - 'deleted_at', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn ownerId = GeneratedColumn( - 'owner_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL REFERENCES user_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn type = GeneratedColumn( - 'type', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn data = GeneratedColumn( - 'data', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn isSaved = GeneratedColumn( - 'is_saved', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0 CHECK (is_saved IN (0, 1))', - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn memoryAt = GeneratedColumn( - 'memory_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn seenAt = GeneratedColumn( - 'seen_at', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn showAt = GeneratedColumn( - 'show_at', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn hideAt = GeneratedColumn( - 'hide_at', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - @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.string, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}updated_at'], - )!, - deletedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - 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.int, - data['${effectivePrefix}is_saved'], - )!, - memoryAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}memory_at'], - )!, - seenAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}seen_at'], - ), - showAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}show_at'], - ), - hideAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}hide_at'], - ), - ); - } - - @override - MemoryEntity createAlias(String alias) { - return MemoryEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY(id)']; - @override - bool get dontWriteConstraints => true; -} - -class MemoryEntityData extends DataClass - implements Insertable { - final String id; - final String createdAt; - final String updatedAt; - final String? deletedAt; - final String ownerId; - final int type; - final String data; - final int isSaved; - final String memoryAt; - final String? seenAt; - final String? showAt; - final String? 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, - String? createdAt, - String? updatedAt, - Value deletedAt = const Value.absent(), - String? ownerId, - int? type, - String? data, - int? isSaved, - String? 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 String 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, - $customConstraints: - 'NOT NULL REFERENCES remote_asset_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn memoryId = GeneratedColumn( - 'memory_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: - 'NOT NULL 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; - @override - List get customConstraints => const [ - 'PRIMARY KEY(asset_id, memory_id)', - ]; - @override - bool get dontWriteConstraints => 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, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn ownerId = GeneratedColumn( - 'owner_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL REFERENCES user_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn faceAssetId = GeneratedColumn( - 'face_asset_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn isFavorite = GeneratedColumn( - 'is_favorite', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL CHECK (is_favorite IN (0, 1))', - ); - late final GeneratedColumn isHidden = GeneratedColumn( - 'is_hidden', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL CHECK (is_hidden IN (0, 1))', - ); - late final GeneratedColumn color = GeneratedColumn( - 'color', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn birthDate = GeneratedColumn( - 'birth_date', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - @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.string, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - 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.int, - data['${effectivePrefix}is_favorite'], - )!, - isHidden: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}is_hidden'], - )!, - color: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}color'], - ), - birthDate: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}birth_date'], - ), - ); - } - - @override - PersonEntity createAlias(String alias) { - return PersonEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY(id)']; - @override - bool get dontWriteConstraints => true; -} - -class PersonEntityData extends DataClass - implements Insertable { - final String id; - final String createdAt; - final String updatedAt; - final String ownerId; - final String name; - final String? faceAssetId; - final int isFavorite; - final int isHidden; - final String? color; - final String? 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, - String? createdAt, - String? updatedAt, - String? ownerId, - String? name, - Value faceAssetId = const Value.absent(), - int? isFavorite, - int? 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 int isFavorite, - required int 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, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn assetId = GeneratedColumn( - 'asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: - 'NOT NULL REFERENCES remote_asset_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn personId = GeneratedColumn( - 'person_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL REFERENCES person_entity(id)ON DELETE SET NULL', - ); - late final GeneratedColumn imageWidth = GeneratedColumn( - 'image_width', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn imageHeight = GeneratedColumn( - 'image_height', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn boundingBoxX1 = GeneratedColumn( - 'bounding_box_x1', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn boundingBoxY1 = GeneratedColumn( - 'bounding_box_y1', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn boundingBoxX2 = GeneratedColumn( - 'bounding_box_x2', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn boundingBoxY2 = GeneratedColumn( - 'bounding_box_y2', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn sourceType = GeneratedColumn( - 'source_type', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn isVisible = GeneratedColumn( - 'is_visible', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 1 CHECK (is_visible IN (0, 1))', - defaultValue: const CustomExpression('1'), - ); - late final GeneratedColumn deletedAt = GeneratedColumn( - 'deleted_at', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - @override - List get $columns => [ - id, - assetId, - personId, - imageWidth, - imageHeight, - boundingBoxX1, - boundingBoxY1, - boundingBoxX2, - boundingBoxY2, - sourceType, - isVisible, - deletedAt, - ]; - @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'], - )!, - isVisible: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}is_visible'], - )!, - deletedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}deleted_at'], - ), - ); - } - - @override - AssetFaceEntity createAlias(String alias) { - return AssetFaceEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY(id)']; - @override - bool get dontWriteConstraints => 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; - final int isVisible; - final String? deletedAt; - 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, - required this.isVisible, - this.deletedAt, - }); - @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); - map['is_visible'] = Variable(isVisible); - if (!nullToAbsent || deletedAt != null) { - map['deleted_at'] = Variable(deletedAt); - } - 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']), - isVisible: serializer.fromJson(json['isVisible']), - deletedAt: serializer.fromJson(json['deletedAt']), - ); - } - @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), - 'isVisible': serializer.toJson(isVisible), - 'deletedAt': serializer.toJson(deletedAt), - }; - } - - 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, - int? isVisible, - Value deletedAt = const Value.absent(), - }) => 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, - isVisible: isVisible ?? this.isVisible, - deletedAt: deletedAt.present ? deletedAt.value : this.deletedAt, - ); - 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, - isVisible: data.isVisible.present ? data.isVisible.value : this.isVisible, - deletedAt: data.deletedAt.present ? data.deletedAt.value : this.deletedAt, - ); - } - - @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('isVisible: $isVisible, ') - ..write('deletedAt: $deletedAt') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - assetId, - personId, - imageWidth, - imageHeight, - boundingBoxX1, - boundingBoxY1, - boundingBoxX2, - boundingBoxY2, - sourceType, - isVisible, - deletedAt, - ); - @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 && - other.isVisible == this.isVisible && - other.deletedAt == this.deletedAt); -} - -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; - final Value isVisible; - final Value deletedAt; - 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(), - this.isVisible = const Value.absent(), - this.deletedAt = 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, - this.isVisible = const Value.absent(), - this.deletedAt = const Value.absent(), - }) : 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, - Expression? isVisible, - Expression? deletedAt, - }) { - 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, - if (isVisible != null) 'is_visible': isVisible, - if (deletedAt != null) 'deleted_at': deletedAt, - }); - } - - AssetFaceEntityCompanion copyWith({ - Value? id, - Value? assetId, - Value? personId, - Value? imageWidth, - Value? imageHeight, - Value? boundingBoxX1, - Value? boundingBoxY1, - Value? boundingBoxX2, - Value? boundingBoxY2, - Value? sourceType, - Value? isVisible, - Value? deletedAt, - }) { - 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, - isVisible: isVisible ?? this.isVisible, - deletedAt: deletedAt ?? this.deletedAt, - ); - } - - @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); - } - if (isVisible.present) { - map['is_visible'] = Variable(isVisible.value); - } - if (deletedAt.present) { - map['deleted_at'] = Variable(deletedAt.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('isVisible: $isVisible, ') - ..write('deletedAt: $deletedAt') - ..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, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn stringValue = GeneratedColumn( - 'string_value', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn intValue = GeneratedColumn( - 'int_value', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - @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; - @override - List get customConstraints => const ['PRIMARY KEY(id)']; - @override - bool get dontWriteConstraints => 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, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn type = GeneratedColumn( - 'type', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn width = GeneratedColumn( - 'width', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn height = GeneratedColumn( - 'height', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn durationMs = GeneratedColumn( - 'duration_ms', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn albumId = GeneratedColumn( - 'album_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn checksum = GeneratedColumn( - 'checksum', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn isFavorite = GeneratedColumn( - 'is_favorite', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0 CHECK (is_favorite IN (0, 1))', - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn orientation = GeneratedColumn( - 'orientation', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0', - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn source = GeneratedColumn( - 'source', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn playbackStyle = GeneratedColumn( - 'playback_style', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0', - defaultValue: const CustomExpression('0'), - ); - @override - List get $columns => [ - name, - type, - createdAt, - updatedAt, - width, - height, - durationMs, - id, - albumId, - checksum, - isFavorite, - orientation, - source, - playbackStyle, - ]; - @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.string, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}updated_at'], - )!, - width: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}width'], - ), - height: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}height'], - ), - durationMs: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}duration_ms'], - ), - 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.int, - data['${effectivePrefix}is_favorite'], - )!, - orientation: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}orientation'], - )!, - source: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}source'], - )!, - playbackStyle: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}playback_style'], - )!, - ); - } - - @override - TrashedLocalAssetEntity createAlias(String alias) { - return TrashedLocalAssetEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY(id, album_id)']; - @override - bool get dontWriteConstraints => true; -} - -class TrashedLocalAssetEntityData extends DataClass - implements Insertable { - final String name; - final int type; - final String createdAt; - final String updatedAt; - final int? width; - final int? height; - final int? durationMs; - final String id; - final String albumId; - final String? checksum; - final int isFavorite; - final int orientation; - final int source; - final int playbackStyle; - const TrashedLocalAssetEntityData({ - required this.name, - required this.type, - required this.createdAt, - required this.updatedAt, - this.width, - this.height, - this.durationMs, - required this.id, - required this.albumId, - this.checksum, - required this.isFavorite, - required this.orientation, - required this.source, - required this.playbackStyle, - }); - @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 || durationMs != null) { - map['duration_ms'] = Variable(durationMs); - } - 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); - map['source'] = Variable(source); - map['playback_style'] = Variable(playbackStyle); - 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']), - durationMs: serializer.fromJson(json['durationMs']), - 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']), - source: serializer.fromJson(json['source']), - playbackStyle: serializer.fromJson(json['playbackStyle']), - ); - } - @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), - 'durationMs': serializer.toJson(durationMs), - 'id': serializer.toJson(id), - 'albumId': serializer.toJson(albumId), - 'checksum': serializer.toJson(checksum), - 'isFavorite': serializer.toJson(isFavorite), - 'orientation': serializer.toJson(orientation), - 'source': serializer.toJson(source), - 'playbackStyle': serializer.toJson(playbackStyle), - }; - } - - TrashedLocalAssetEntityData copyWith({ - String? name, - int? type, - String? createdAt, - String? updatedAt, - Value width = const Value.absent(), - Value height = const Value.absent(), - Value durationMs = const Value.absent(), - String? id, - String? albumId, - Value checksum = const Value.absent(), - int? isFavorite, - int? orientation, - int? source, - int? playbackStyle, - }) => 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, - durationMs: durationMs.present ? durationMs.value : this.durationMs, - id: id ?? this.id, - albumId: albumId ?? this.albumId, - checksum: checksum.present ? checksum.value : this.checksum, - isFavorite: isFavorite ?? this.isFavorite, - orientation: orientation ?? this.orientation, - source: source ?? this.source, - playbackStyle: playbackStyle ?? this.playbackStyle, - ); - 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, - durationMs: data.durationMs.present - ? data.durationMs.value - : this.durationMs, - 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, - source: data.source.present ? data.source.value : this.source, - playbackStyle: data.playbackStyle.present - ? data.playbackStyle.value - : this.playbackStyle, - ); - } - - @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('durationMs: $durationMs, ') - ..write('id: $id, ') - ..write('albumId: $albumId, ') - ..write('checksum: $checksum, ') - ..write('isFavorite: $isFavorite, ') - ..write('orientation: $orientation, ') - ..write('source: $source, ') - ..write('playbackStyle: $playbackStyle') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - name, - type, - createdAt, - updatedAt, - width, - height, - durationMs, - id, - albumId, - checksum, - isFavorite, - orientation, - source, - playbackStyle, - ); - @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.durationMs == this.durationMs && - other.id == this.id && - other.albumId == this.albumId && - other.checksum == this.checksum && - other.isFavorite == this.isFavorite && - other.orientation == this.orientation && - other.source == this.source && - other.playbackStyle == this.playbackStyle); -} - -class TrashedLocalAssetEntityCompanion - extends UpdateCompanion { - final Value name; - final Value type; - final Value createdAt; - final Value updatedAt; - final Value width; - final Value height; - final Value durationMs; - final Value id; - final Value albumId; - final Value checksum; - final Value isFavorite; - final Value orientation; - final Value source; - final Value playbackStyle; - 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.durationMs = 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(), - this.source = const Value.absent(), - this.playbackStyle = 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.durationMs = const Value.absent(), - required String id, - required String albumId, - this.checksum = const Value.absent(), - this.isFavorite = const Value.absent(), - this.orientation = const Value.absent(), - required int source, - this.playbackStyle = const Value.absent(), - }) : name = Value(name), - type = Value(type), - id = Value(id), - albumId = Value(albumId), - source = Value(source); - static Insertable custom({ - Expression? name, - Expression? type, - Expression? createdAt, - Expression? updatedAt, - Expression? width, - Expression? height, - Expression? durationMs, - Expression? id, - Expression? albumId, - Expression? checksum, - Expression? isFavorite, - Expression? orientation, - Expression? source, - Expression? playbackStyle, - }) { - 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 (durationMs != null) 'duration_ms': durationMs, - 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, - if (source != null) 'source': source, - if (playbackStyle != null) 'playback_style': playbackStyle, - }); - } - - TrashedLocalAssetEntityCompanion copyWith({ - Value? name, - Value? type, - Value? createdAt, - Value? updatedAt, - Value? width, - Value? height, - Value? durationMs, - Value? id, - Value? albumId, - Value? checksum, - Value? isFavorite, - Value? orientation, - Value? source, - Value? playbackStyle, - }) { - 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, - durationMs: durationMs ?? this.durationMs, - id: id ?? this.id, - albumId: albumId ?? this.albumId, - checksum: checksum ?? this.checksum, - isFavorite: isFavorite ?? this.isFavorite, - orientation: orientation ?? this.orientation, - source: source ?? this.source, - playbackStyle: playbackStyle ?? this.playbackStyle, - ); - } - - @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 (durationMs.present) { - map['duration_ms'] = Variable(durationMs.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); - } - if (source.present) { - map['source'] = Variable(source.value); - } - if (playbackStyle.present) { - map['playback_style'] = Variable(playbackStyle.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('durationMs: $durationMs, ') - ..write('id: $id, ') - ..write('albumId: $albumId, ') - ..write('checksum: $checksum, ') - ..write('isFavorite: $isFavorite, ') - ..write('orientation: $orientation, ') - ..write('source: $source, ') - ..write('playbackStyle: $playbackStyle') - ..write(')')) - .toString(); - } -} - -class AssetEditEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - AssetEditEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn assetId = GeneratedColumn( - 'asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: - 'NOT NULL REFERENCES remote_asset_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn action = GeneratedColumn( - 'action', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn parameters = - GeneratedColumn( - 'parameters', - aliasedName, - false, - type: DriftSqlType.blob, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn sequence = GeneratedColumn( - 'sequence', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - @override - List get $columns => [ - id, - assetId, - action, - parameters, - sequence, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'asset_edit_entity'; - @override - Set get $primaryKey => {id}; - @override - AssetEditEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return AssetEditEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - assetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}asset_id'], - )!, - action: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}action'], - )!, - parameters: attachedDatabase.typeMapping.read( - DriftSqlType.blob, - data['${effectivePrefix}parameters'], - )!, - sequence: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}sequence'], - )!, - ); - } - - @override - AssetEditEntity createAlias(String alias) { - return AssetEditEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY(id)']; - @override - bool get dontWriteConstraints => true; -} - -class AssetEditEntityData extends DataClass - implements Insertable { - final String id; - final String assetId; - final int action; - final i2.Uint8List parameters; - final int sequence; - const AssetEditEntityData({ - required this.id, - required this.assetId, - required this.action, - required this.parameters, - required this.sequence, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['asset_id'] = Variable(assetId); - map['action'] = Variable(action); - map['parameters'] = Variable(parameters); - map['sequence'] = Variable(sequence); - return map; - } - - factory AssetEditEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return AssetEditEntityData( - id: serializer.fromJson(json['id']), - assetId: serializer.fromJson(json['assetId']), - action: serializer.fromJson(json['action']), - parameters: serializer.fromJson(json['parameters']), - sequence: serializer.fromJson(json['sequence']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'assetId': serializer.toJson(assetId), - 'action': serializer.toJson(action), - 'parameters': serializer.toJson(parameters), - 'sequence': serializer.toJson(sequence), - }; - } - - AssetEditEntityData copyWith({ - String? id, - String? assetId, - int? action, - i2.Uint8List? parameters, - int? sequence, - }) => AssetEditEntityData( - id: id ?? this.id, - assetId: assetId ?? this.assetId, - action: action ?? this.action, - parameters: parameters ?? this.parameters, - sequence: sequence ?? this.sequence, - ); - AssetEditEntityData copyWithCompanion(AssetEditEntityCompanion data) { - return AssetEditEntityData( - id: data.id.present ? data.id.value : this.id, - assetId: data.assetId.present ? data.assetId.value : this.assetId, - action: data.action.present ? data.action.value : this.action, - parameters: data.parameters.present - ? data.parameters.value - : this.parameters, - sequence: data.sequence.present ? data.sequence.value : this.sequence, - ); - } - - @override - String toString() { - return (StringBuffer('AssetEditEntityData(') - ..write('id: $id, ') - ..write('assetId: $assetId, ') - ..write('action: $action, ') - ..write('parameters: $parameters, ') - ..write('sequence: $sequence') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - assetId, - action, - $driftBlobEquality.hash(parameters), - sequence, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is AssetEditEntityData && - other.id == this.id && - other.assetId == this.assetId && - other.action == this.action && - $driftBlobEquality.equals(other.parameters, this.parameters) && - other.sequence == this.sequence); -} - -class AssetEditEntityCompanion extends UpdateCompanion { - final Value id; - final Value assetId; - final Value action; - final Value parameters; - final Value sequence; - const AssetEditEntityCompanion({ - this.id = const Value.absent(), - this.assetId = const Value.absent(), - this.action = const Value.absent(), - this.parameters = const Value.absent(), - this.sequence = const Value.absent(), - }); - AssetEditEntityCompanion.insert({ - required String id, - required String assetId, - required int action, - required i2.Uint8List parameters, - required int sequence, - }) : id = Value(id), - assetId = Value(assetId), - action = Value(action), - parameters = Value(parameters), - sequence = Value(sequence); - static Insertable custom({ - Expression? id, - Expression? assetId, - Expression? action, - Expression? parameters, - Expression? sequence, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (assetId != null) 'asset_id': assetId, - if (action != null) 'action': action, - if (parameters != null) 'parameters': parameters, - if (sequence != null) 'sequence': sequence, - }); - } - - AssetEditEntityCompanion copyWith({ - Value? id, - Value? assetId, - Value? action, - Value? parameters, - Value? sequence, - }) { - return AssetEditEntityCompanion( - id: id ?? this.id, - assetId: assetId ?? this.assetId, - action: action ?? this.action, - parameters: parameters ?? this.parameters, - sequence: sequence ?? this.sequence, - ); - } - - @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 (action.present) { - map['action'] = Variable(action.value); - } - if (parameters.present) { - map['parameters'] = Variable(parameters.value); - } - if (sequence.present) { - map['sequence'] = Variable(sequence.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('AssetEditEntityCompanion(') - ..write('id: $id, ') - ..write('assetId: $assetId, ') - ..write('action: $action, ') - ..write('parameters: $parameters, ') - ..write('sequence: $sequence') - ..write(')')) - .toString(); - } -} - -class Settings extends Table with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - Settings(this.attachedDatabase, [this._alias]); - late final GeneratedColumn key = GeneratedColumn( - 'key', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn value = GeneratedColumn( - 'value', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - @override - List get $columns => [key, value, updatedAt]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'settings'; - @override - Set get $primaryKey => {key}; - @override - SettingsData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return SettingsData( - key: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}key'], - )!, - value: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}value'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}updated_at'], - )!, - ); - } - - @override - Settings createAlias(String alias) { - return Settings(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY("key")']; - @override - bool get dontWriteConstraints => true; -} - -class SettingsData extends DataClass implements Insertable { - final String key; - final String value; - final String updatedAt; - const SettingsData({ - required this.key, - required this.value, - required this.updatedAt, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['key'] = Variable(key); - map['value'] = Variable(value); - map['updated_at'] = Variable(updatedAt); - return map; - } - - factory SettingsData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return SettingsData( - key: serializer.fromJson(json['key']), - value: serializer.fromJson(json['value']), - updatedAt: serializer.fromJson(json['updatedAt']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'key': serializer.toJson(key), - 'value': serializer.toJson(value), - 'updatedAt': serializer.toJson(updatedAt), - }; - } - - SettingsData copyWith({String? key, String? value, String? updatedAt}) => - SettingsData( - key: key ?? this.key, - value: value ?? this.value, - updatedAt: updatedAt ?? this.updatedAt, - ); - SettingsData copyWithCompanion(SettingsCompanion data) { - return SettingsData( - key: data.key.present ? data.key.value : this.key, - value: data.value.present ? data.value.value : this.value, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - ); - } - - @override - String toString() { - return (StringBuffer('SettingsData(') - ..write('key: $key, ') - ..write('value: $value, ') - ..write('updatedAt: $updatedAt') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(key, value, updatedAt); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is SettingsData && - other.key == this.key && - other.value == this.value && - other.updatedAt == this.updatedAt); -} - -class SettingsCompanion extends UpdateCompanion { - final Value key; - final Value value; - final Value updatedAt; - const SettingsCompanion({ - this.key = const Value.absent(), - this.value = const Value.absent(), - this.updatedAt = const Value.absent(), - }); - SettingsCompanion.insert({ - required String key, - required String value, - this.updatedAt = const Value.absent(), - }) : key = Value(key), - value = Value(value); - static Insertable custom({ - Expression? key, - Expression? value, - Expression? updatedAt, - }) { - return RawValuesInsertable({ - if (key != null) 'key': key, - if (value != null) 'value': value, - if (updatedAt != null) 'updated_at': updatedAt, - }); - } - - SettingsCompanion copyWith({ - Value? key, - Value? value, - Value? updatedAt, - }) { - return SettingsCompanion( - key: key ?? this.key, - value: value ?? this.value, - updatedAt: updatedAt ?? this.updatedAt, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (key.present) { - map['key'] = Variable(key.value); - } - if (value.present) { - map['value'] = Variable(value.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('SettingsCompanion(') - ..write('key: $key, ') - ..write('value: $value, ') - ..write('updatedAt: $updatedAt') - ..write(')')) - .toString(); - } -} - -class DatabaseAtV27 extends GeneratedDatabase { - DatabaseAtV27(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 idxLocalAlbumAssetAlbumAsset = Index( - 'idx_local_album_asset_album_asset', - 'CREATE INDEX IF NOT EXISTS idx_local_album_asset_album_asset ON local_album_asset_entity (album_id, asset_id)', - ); - 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 idxLocalAssetCloudId = Index( - 'idx_local_asset_cloud_id', - 'CREATE INDEX IF NOT EXISTS idx_local_asset_cloud_id ON local_asset_entity (i_cloud_id)', - ); - late final Index idxStackPrimaryAssetId = Index( - 'idx_stack_primary_asset_id', - 'CREATE INDEX IF NOT EXISTS idx_stack_primary_asset_id ON stack_entity (primary_asset_id)', - ); - 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 Index idxRemoteAssetStackId = Index( - 'idx_remote_asset_stack_id', - 'CREATE INDEX IF NOT EXISTS idx_remote_asset_stack_id ON remote_asset_entity (stack_id)', - ); - late final Index idxRemoteAssetOwnerVisibilityDeletedCreated = Index( - 'idx_remote_asset_owner_visibility_deleted_created', - 'CREATE INDEX IF NOT EXISTS idx_remote_asset_owner_visibility_deleted_created ON remote_asset_entity (owner_id, visibility, deleted_at, created_at DESC)', - ); - 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 RemoteAssetCloudIdEntity remoteAssetCloudIdEntity = - RemoteAssetCloudIdEntity(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 AssetEditEntity assetEditEntity = AssetEditEntity(this); - late final Settings settings = Settings(this); - late final Index idxPartnerSharedWithId = Index( - 'idx_partner_shared_with_id', - 'CREATE INDEX IF NOT EXISTS idx_partner_shared_with_id ON partner_entity (shared_with_id)', - ); - 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 idxRemoteExifCity = Index( - 'idx_remote_exif_city', - 'CREATE INDEX IF NOT EXISTS idx_remote_exif_city ON remote_exif_entity (city) WHERE city IS NOT NULL', - ); - late final Index idxRemoteAlbumAssetAlbumAsset = Index( - 'idx_remote_album_asset_album_asset', - 'CREATE INDEX IF NOT EXISTS idx_remote_album_asset_album_asset ON remote_album_asset_entity (album_id, asset_id)', - ); - late final Index idxRemoteAssetCloudId = Index( - 'idx_remote_asset_cloud_id', - 'CREATE INDEX IF NOT EXISTS idx_remote_asset_cloud_id ON remote_asset_cloud_id_entity (cloud_id)', - ); - late final Index idxPersonOwnerId = Index( - 'idx_person_owner_id', - 'CREATE INDEX IF NOT EXISTS idx_person_owner_id ON person_entity (owner_id)', - ); - late final Index idxAssetFacePersonId = Index( - 'idx_asset_face_person_id', - 'CREATE INDEX IF NOT EXISTS idx_asset_face_person_id ON asset_face_entity (person_id)', - ); - late final Index idxAssetFaceAssetId = Index( - 'idx_asset_face_asset_id', - 'CREATE INDEX IF NOT EXISTS idx_asset_face_asset_id ON asset_face_entity (asset_id)', - ); - late final Index idxAssetFaceVisiblePerson = Index( - 'idx_asset_face_visible_person', - 'CREATE INDEX IF NOT EXISTS idx_asset_face_visible_person ON asset_face_entity (person_id, asset_id) WHERE is_visible = 1 AND deleted_at IS NULL', - ); - 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)', - ); - late final Index idxAssetEditAssetId = Index( - 'idx_asset_edit_asset_id', - 'CREATE INDEX IF NOT EXISTS idx_asset_edit_asset_id ON asset_edit_entity (asset_id)', - ); - @override - Iterable> get allTables => - allSchemaEntities.whereType>(); - @override - List get allSchemaEntities => [ - userEntity, - remoteAssetEntity, - stackEntity, - localAssetEntity, - remoteAlbumEntity, - localAlbumEntity, - localAlbumAssetEntity, - idxLocalAlbumAssetAlbumAsset, - idxLocalAssetChecksum, - idxLocalAssetCloudId, - idxStackPrimaryAssetId, - uQRemoteAssetsOwnerChecksum, - uQRemoteAssetsOwnerLibraryChecksum, - idxRemoteAssetChecksum, - idxRemoteAssetStackId, - idxRemoteAssetOwnerVisibilityDeletedCreated, - authUserEntity, - userMetadataEntity, - partnerEntity, - remoteExifEntity, - remoteAlbumAssetEntity, - remoteAlbumUserEntity, - remoteAssetCloudIdEntity, - memoryEntity, - memoryAssetEntity, - personEntity, - assetFaceEntity, - storeEntity, - trashedLocalAssetEntity, - assetEditEntity, - settings, - idxPartnerSharedWithId, - idxLatLng, - idxRemoteExifCity, - idxRemoteAlbumAssetAlbumAsset, - idxRemoteAssetCloudId, - idxPersonOwnerId, - idxAssetFacePersonId, - idxAssetFaceAssetId, - idxAssetFaceVisiblePerson, - idxTrashedLocalAssetChecksum, - idxTrashedLocalAssetAlbum, - idxAssetEditAssetId, - ]; - @override - StreamQueryUpdateRules get streamUpdateRules => const StreamQueryUpdateRules([ - WritePropagation( - on: TableUpdateQuery.onTableName( - 'user_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('remote_asset_entity', kind: UpdateKind.delete)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'user_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('stack_entity', kind: UpdateKind.delete)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'remote_asset_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('remote_album_entity', kind: UpdateKind.update)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'remote_album_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('local_album_entity', kind: UpdateKind.update)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'local_asset_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [ - TableUpdate('local_album_asset_entity', kind: UpdateKind.delete), - ], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'local_album_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [ - TableUpdate('local_album_asset_entity', kind: UpdateKind.delete), - ], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'user_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('user_metadata_entity', kind: UpdateKind.delete)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'user_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('partner_entity', kind: UpdateKind.delete)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'user_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('partner_entity', kind: UpdateKind.delete)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'remote_asset_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('remote_exif_entity', kind: UpdateKind.delete)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'remote_asset_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [ - TableUpdate('remote_album_asset_entity', kind: UpdateKind.delete), - ], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'remote_album_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [ - TableUpdate('remote_album_asset_entity', kind: UpdateKind.delete), - ], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'remote_album_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [ - TableUpdate('remote_album_user_entity', kind: UpdateKind.delete), - ], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'user_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [ - TableUpdate('remote_album_user_entity', kind: UpdateKind.delete), - ], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'remote_asset_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [ - TableUpdate('remote_asset_cloud_id_entity', kind: UpdateKind.delete), - ], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'user_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('memory_entity', kind: UpdateKind.delete)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'remote_asset_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('memory_asset_entity', kind: UpdateKind.delete)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'memory_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('memory_asset_entity', kind: UpdateKind.delete)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'user_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('person_entity', kind: UpdateKind.delete)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'remote_asset_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('asset_face_entity', kind: UpdateKind.delete)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'person_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('asset_face_entity', kind: UpdateKind.update)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'remote_asset_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('asset_edit_entity', kind: UpdateKind.delete)], - ), - ]); - @override - int get schemaVersion => 27; - @override - DriftDatabaseOptions get options => - const DriftDatabaseOptions(storeDateTimeAsText: true); -} diff --git a/mobile/test/drift/main/generated/schema_v28.dart b/mobile/test/drift/main/generated/schema_v28.dart deleted file mode 100644 index a18199ed4f..0000000000 --- a/mobile/test/drift/main/generated/schema_v28.dart +++ /dev/null @@ -1,9389 +0,0 @@ -// dart format width=80 -import 'dart:typed_data' as i2; -// GENERATED BY drift_dev, DO NOT MODIFY. -// ignore_for_file: type=lint,unused_import -// -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, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn email = GeneratedColumn( - 'email', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn hasProfileImage = GeneratedColumn( - 'has_profile_image', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: - 'NOT NULL DEFAULT 0 CHECK (has_profile_image IN (0, 1))', - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn profileChangedAt = GeneratedColumn( - 'profile_changed_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn avatarColor = GeneratedColumn( - 'avatar_color', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0', - 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.int, - data['${effectivePrefix}has_profile_image'], - )!, - profileChangedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - 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; - @override - List get customConstraints => const ['PRIMARY KEY(id)']; - @override - bool get dontWriteConstraints => true; -} - -class UserEntityData extends DataClass implements Insertable { - final String id; - final String name; - final String email; - final int hasProfileImage; - final String 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, - int? hasProfileImage, - String? 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, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn type = GeneratedColumn( - 'type', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn width = GeneratedColumn( - 'width', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn height = GeneratedColumn( - 'height', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn durationMs = GeneratedColumn( - 'duration_ms', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn checksum = GeneratedColumn( - 'checksum', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn isFavorite = GeneratedColumn( - 'is_favorite', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0 CHECK (is_favorite IN (0, 1))', - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn ownerId = GeneratedColumn( - 'owner_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL REFERENCES user_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn localDateTime = GeneratedColumn( - 'local_date_time', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn thumbHash = GeneratedColumn( - 'thumb_hash', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn deletedAt = GeneratedColumn( - 'deleted_at', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn uploadedAt = GeneratedColumn( - 'uploaded_at', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn livePhotoVideoId = GeneratedColumn( - 'live_photo_video_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn visibility = GeneratedColumn( - 'visibility', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn stackId = GeneratedColumn( - 'stack_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn libraryId = GeneratedColumn( - 'library_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn isEdited = GeneratedColumn( - 'is_edited', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0 CHECK (is_edited IN (0, 1))', - defaultValue: const CustomExpression('0'), - ); - @override - List get $columns => [ - name, - type, - createdAt, - updatedAt, - width, - height, - durationMs, - id, - checksum, - isFavorite, - ownerId, - localDateTime, - thumbHash, - deletedAt, - uploadedAt, - livePhotoVideoId, - visibility, - stackId, - libraryId, - isEdited, - ]; - @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.string, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}updated_at'], - )!, - width: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}width'], - ), - height: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}height'], - ), - durationMs: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}duration_ms'], - ), - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - checksum: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}checksum'], - )!, - isFavorite: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}is_favorite'], - )!, - ownerId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}owner_id'], - )!, - localDateTime: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}local_date_time'], - ), - thumbHash: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}thumb_hash'], - ), - deletedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}deleted_at'], - ), - uploadedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}uploaded_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'], - ), - isEdited: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}is_edited'], - )!, - ); - } - - @override - RemoteAssetEntity createAlias(String alias) { - return RemoteAssetEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY(id)']; - @override - bool get dontWriteConstraints => true; -} - -class RemoteAssetEntityData extends DataClass - implements Insertable { - final String name; - final int type; - final String createdAt; - final String updatedAt; - final int? width; - final int? height; - final int? durationMs; - final String id; - final String checksum; - final int isFavorite; - final String ownerId; - final String? localDateTime; - final String? thumbHash; - final String? deletedAt; - final String? uploadedAt; - final String? livePhotoVideoId; - final int visibility; - final String? stackId; - final String? libraryId; - final int isEdited; - const RemoteAssetEntityData({ - required this.name, - required this.type, - required this.createdAt, - required this.updatedAt, - this.width, - this.height, - this.durationMs, - required this.id, - required this.checksum, - required this.isFavorite, - required this.ownerId, - this.localDateTime, - this.thumbHash, - this.deletedAt, - this.uploadedAt, - this.livePhotoVideoId, - required this.visibility, - this.stackId, - this.libraryId, - required this.isEdited, - }); - @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 || durationMs != null) { - map['duration_ms'] = Variable(durationMs); - } - 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 || uploadedAt != null) { - map['uploaded_at'] = Variable(uploadedAt); - } - 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); - } - map['is_edited'] = Variable(isEdited); - 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']), - durationMs: serializer.fromJson(json['durationMs']), - 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']), - uploadedAt: serializer.fromJson(json['uploadedAt']), - livePhotoVideoId: serializer.fromJson(json['livePhotoVideoId']), - visibility: serializer.fromJson(json['visibility']), - stackId: serializer.fromJson(json['stackId']), - libraryId: serializer.fromJson(json['libraryId']), - isEdited: serializer.fromJson(json['isEdited']), - ); - } - @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), - 'durationMs': serializer.toJson(durationMs), - '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), - 'uploadedAt': serializer.toJson(uploadedAt), - 'livePhotoVideoId': serializer.toJson(livePhotoVideoId), - 'visibility': serializer.toJson(visibility), - 'stackId': serializer.toJson(stackId), - 'libraryId': serializer.toJson(libraryId), - 'isEdited': serializer.toJson(isEdited), - }; - } - - RemoteAssetEntityData copyWith({ - String? name, - int? type, - String? createdAt, - String? updatedAt, - Value width = const Value.absent(), - Value height = const Value.absent(), - Value durationMs = const Value.absent(), - String? id, - String? checksum, - int? isFavorite, - String? ownerId, - Value localDateTime = const Value.absent(), - Value thumbHash = const Value.absent(), - Value deletedAt = const Value.absent(), - Value uploadedAt = const Value.absent(), - Value livePhotoVideoId = const Value.absent(), - int? visibility, - Value stackId = const Value.absent(), - Value libraryId = const Value.absent(), - int? isEdited, - }) => 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, - durationMs: durationMs.present ? durationMs.value : this.durationMs, - 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, - uploadedAt: uploadedAt.present ? uploadedAt.value : this.uploadedAt, - 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, - isEdited: isEdited ?? this.isEdited, - ); - 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, - durationMs: data.durationMs.present - ? data.durationMs.value - : this.durationMs, - 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, - uploadedAt: data.uploadedAt.present - ? data.uploadedAt.value - : this.uploadedAt, - 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, - isEdited: data.isEdited.present ? data.isEdited.value : this.isEdited, - ); - } - - @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('durationMs: $durationMs, ') - ..write('id: $id, ') - ..write('checksum: $checksum, ') - ..write('isFavorite: $isFavorite, ') - ..write('ownerId: $ownerId, ') - ..write('localDateTime: $localDateTime, ') - ..write('thumbHash: $thumbHash, ') - ..write('deletedAt: $deletedAt, ') - ..write('uploadedAt: $uploadedAt, ') - ..write('livePhotoVideoId: $livePhotoVideoId, ') - ..write('visibility: $visibility, ') - ..write('stackId: $stackId, ') - ..write('libraryId: $libraryId, ') - ..write('isEdited: $isEdited') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - name, - type, - createdAt, - updatedAt, - width, - height, - durationMs, - id, - checksum, - isFavorite, - ownerId, - localDateTime, - thumbHash, - deletedAt, - uploadedAt, - livePhotoVideoId, - visibility, - stackId, - libraryId, - isEdited, - ); - @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.durationMs == this.durationMs && - 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.uploadedAt == this.uploadedAt && - other.livePhotoVideoId == this.livePhotoVideoId && - other.visibility == this.visibility && - other.stackId == this.stackId && - other.libraryId == this.libraryId && - other.isEdited == this.isEdited); -} - -class RemoteAssetEntityCompanion - extends UpdateCompanion { - final Value name; - final Value type; - final Value createdAt; - final Value updatedAt; - final Value width; - final Value height; - final Value durationMs; - final Value id; - final Value checksum; - final Value isFavorite; - final Value ownerId; - final Value localDateTime; - final Value thumbHash; - final Value deletedAt; - final Value uploadedAt; - final Value livePhotoVideoId; - final Value visibility; - final Value stackId; - final Value libraryId; - final Value isEdited; - 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.durationMs = 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.uploadedAt = const Value.absent(), - this.livePhotoVideoId = const Value.absent(), - this.visibility = const Value.absent(), - this.stackId = const Value.absent(), - this.libraryId = const Value.absent(), - this.isEdited = 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.durationMs = 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.uploadedAt = const Value.absent(), - this.livePhotoVideoId = const Value.absent(), - required int visibility, - this.stackId = const Value.absent(), - this.libraryId = const Value.absent(), - this.isEdited = 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? durationMs, - Expression? id, - Expression? checksum, - Expression? isFavorite, - Expression? ownerId, - Expression? localDateTime, - Expression? thumbHash, - Expression? deletedAt, - Expression? uploadedAt, - Expression? livePhotoVideoId, - Expression? visibility, - Expression? stackId, - Expression? libraryId, - Expression? isEdited, - }) { - 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 (durationMs != null) 'duration_ms': durationMs, - 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 (uploadedAt != null) 'uploaded_at': uploadedAt, - 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, - if (isEdited != null) 'is_edited': isEdited, - }); - } - - RemoteAssetEntityCompanion copyWith({ - Value? name, - Value? type, - Value? createdAt, - Value? updatedAt, - Value? width, - Value? height, - Value? durationMs, - Value? id, - Value? checksum, - Value? isFavorite, - Value? ownerId, - Value? localDateTime, - Value? thumbHash, - Value? deletedAt, - Value? uploadedAt, - Value? livePhotoVideoId, - Value? visibility, - Value? stackId, - Value? libraryId, - Value? isEdited, - }) { - 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, - durationMs: durationMs ?? this.durationMs, - 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, - uploadedAt: uploadedAt ?? this.uploadedAt, - livePhotoVideoId: livePhotoVideoId ?? this.livePhotoVideoId, - visibility: visibility ?? this.visibility, - stackId: stackId ?? this.stackId, - libraryId: libraryId ?? this.libraryId, - isEdited: isEdited ?? this.isEdited, - ); - } - - @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 (durationMs.present) { - map['duration_ms'] = Variable(durationMs.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 (uploadedAt.present) { - map['uploaded_at'] = Variable(uploadedAt.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); - } - if (isEdited.present) { - map['is_edited'] = Variable(isEdited.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('durationMs: $durationMs, ') - ..write('id: $id, ') - ..write('checksum: $checksum, ') - ..write('isFavorite: $isFavorite, ') - ..write('ownerId: $ownerId, ') - ..write('localDateTime: $localDateTime, ') - ..write('thumbHash: $thumbHash, ') - ..write('deletedAt: $deletedAt, ') - ..write('uploadedAt: $uploadedAt, ') - ..write('livePhotoVideoId: $livePhotoVideoId, ') - ..write('visibility: $visibility, ') - ..write('stackId: $stackId, ') - ..write('libraryId: $libraryId, ') - ..write('isEdited: $isEdited') - ..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, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn ownerId = GeneratedColumn( - 'owner_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL REFERENCES user_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn primaryAssetId = GeneratedColumn( - 'primary_asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - @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.string, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - 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; - @override - List get customConstraints => const ['PRIMARY KEY(id)']; - @override - bool get dontWriteConstraints => true; -} - -class StackEntityData extends DataClass implements Insertable { - final String id; - final String createdAt; - final String 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, - String? createdAt, - String? 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, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn type = GeneratedColumn( - 'type', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn width = GeneratedColumn( - 'width', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn height = GeneratedColumn( - 'height', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn durationMs = GeneratedColumn( - 'duration_ms', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn checksum = GeneratedColumn( - 'checksum', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn isFavorite = GeneratedColumn( - 'is_favorite', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0 CHECK (is_favorite IN (0, 1))', - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn orientation = GeneratedColumn( - 'orientation', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0', - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn iCloudId = GeneratedColumn( - 'i_cloud_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn adjustmentTime = GeneratedColumn( - 'adjustment_time', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn latitude = GeneratedColumn( - 'latitude', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn longitude = GeneratedColumn( - 'longitude', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn playbackStyle = GeneratedColumn( - 'playback_style', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0', - defaultValue: const CustomExpression('0'), - ); - @override - List get $columns => [ - name, - type, - createdAt, - updatedAt, - width, - height, - durationMs, - id, - checksum, - isFavorite, - orientation, - iCloudId, - adjustmentTime, - latitude, - longitude, - playbackStyle, - ]; - @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.string, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}updated_at'], - )!, - width: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}width'], - ), - height: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}height'], - ), - durationMs: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}duration_ms'], - ), - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - checksum: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}checksum'], - ), - isFavorite: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}is_favorite'], - )!, - orientation: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}orientation'], - )!, - iCloudId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}i_cloud_id'], - ), - adjustmentTime: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}adjustment_time'], - ), - latitude: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}latitude'], - ), - longitude: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}longitude'], - ), - playbackStyle: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}playback_style'], - )!, - ); - } - - @override - LocalAssetEntity createAlias(String alias) { - return LocalAssetEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY(id)']; - @override - bool get dontWriteConstraints => true; -} - -class LocalAssetEntityData extends DataClass - implements Insertable { - final String name; - final int type; - final String createdAt; - final String updatedAt; - final int? width; - final int? height; - final int? durationMs; - final String id; - final String? checksum; - final int isFavorite; - final int orientation; - final String? iCloudId; - final String? adjustmentTime; - final double? latitude; - final double? longitude; - final int playbackStyle; - const LocalAssetEntityData({ - required this.name, - required this.type, - required this.createdAt, - required this.updatedAt, - this.width, - this.height, - this.durationMs, - required this.id, - this.checksum, - required this.isFavorite, - required this.orientation, - this.iCloudId, - this.adjustmentTime, - this.latitude, - this.longitude, - required this.playbackStyle, - }); - @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 || durationMs != null) { - map['duration_ms'] = Variable(durationMs); - } - map['id'] = Variable(id); - if (!nullToAbsent || checksum != null) { - map['checksum'] = Variable(checksum); - } - map['is_favorite'] = Variable(isFavorite); - map['orientation'] = Variable(orientation); - if (!nullToAbsent || iCloudId != null) { - map['i_cloud_id'] = Variable(iCloudId); - } - if (!nullToAbsent || adjustmentTime != null) { - map['adjustment_time'] = Variable(adjustmentTime); - } - if (!nullToAbsent || latitude != null) { - map['latitude'] = Variable(latitude); - } - if (!nullToAbsent || longitude != null) { - map['longitude'] = Variable(longitude); - } - map['playback_style'] = Variable(playbackStyle); - 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']), - durationMs: serializer.fromJson(json['durationMs']), - id: serializer.fromJson(json['id']), - checksum: serializer.fromJson(json['checksum']), - isFavorite: serializer.fromJson(json['isFavorite']), - orientation: serializer.fromJson(json['orientation']), - iCloudId: serializer.fromJson(json['iCloudId']), - adjustmentTime: serializer.fromJson(json['adjustmentTime']), - latitude: serializer.fromJson(json['latitude']), - longitude: serializer.fromJson(json['longitude']), - playbackStyle: serializer.fromJson(json['playbackStyle']), - ); - } - @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), - 'durationMs': serializer.toJson(durationMs), - 'id': serializer.toJson(id), - 'checksum': serializer.toJson(checksum), - 'isFavorite': serializer.toJson(isFavorite), - 'orientation': serializer.toJson(orientation), - 'iCloudId': serializer.toJson(iCloudId), - 'adjustmentTime': serializer.toJson(adjustmentTime), - 'latitude': serializer.toJson(latitude), - 'longitude': serializer.toJson(longitude), - 'playbackStyle': serializer.toJson(playbackStyle), - }; - } - - LocalAssetEntityData copyWith({ - String? name, - int? type, - String? createdAt, - String? updatedAt, - Value width = const Value.absent(), - Value height = const Value.absent(), - Value durationMs = const Value.absent(), - String? id, - Value checksum = const Value.absent(), - int? isFavorite, - int? orientation, - Value iCloudId = const Value.absent(), - Value adjustmentTime = const Value.absent(), - Value latitude = const Value.absent(), - Value longitude = const Value.absent(), - int? playbackStyle, - }) => 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, - durationMs: durationMs.present ? durationMs.value : this.durationMs, - id: id ?? this.id, - checksum: checksum.present ? checksum.value : this.checksum, - isFavorite: isFavorite ?? this.isFavorite, - orientation: orientation ?? this.orientation, - iCloudId: iCloudId.present ? iCloudId.value : this.iCloudId, - adjustmentTime: adjustmentTime.present - ? adjustmentTime.value - : this.adjustmentTime, - latitude: latitude.present ? latitude.value : this.latitude, - longitude: longitude.present ? longitude.value : this.longitude, - playbackStyle: playbackStyle ?? this.playbackStyle, - ); - 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, - durationMs: data.durationMs.present - ? data.durationMs.value - : this.durationMs, - 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, - iCloudId: data.iCloudId.present ? data.iCloudId.value : this.iCloudId, - adjustmentTime: data.adjustmentTime.present - ? data.adjustmentTime.value - : this.adjustmentTime, - latitude: data.latitude.present ? data.latitude.value : this.latitude, - longitude: data.longitude.present ? data.longitude.value : this.longitude, - playbackStyle: data.playbackStyle.present - ? data.playbackStyle.value - : this.playbackStyle, - ); - } - - @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('durationMs: $durationMs, ') - ..write('id: $id, ') - ..write('checksum: $checksum, ') - ..write('isFavorite: $isFavorite, ') - ..write('orientation: $orientation, ') - ..write('iCloudId: $iCloudId, ') - ..write('adjustmentTime: $adjustmentTime, ') - ..write('latitude: $latitude, ') - ..write('longitude: $longitude, ') - ..write('playbackStyle: $playbackStyle') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - name, - type, - createdAt, - updatedAt, - width, - height, - durationMs, - id, - checksum, - isFavorite, - orientation, - iCloudId, - adjustmentTime, - latitude, - longitude, - playbackStyle, - ); - @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.durationMs == this.durationMs && - other.id == this.id && - other.checksum == this.checksum && - other.isFavorite == this.isFavorite && - other.orientation == this.orientation && - other.iCloudId == this.iCloudId && - other.adjustmentTime == this.adjustmentTime && - other.latitude == this.latitude && - other.longitude == this.longitude && - other.playbackStyle == this.playbackStyle); -} - -class LocalAssetEntityCompanion extends UpdateCompanion { - final Value name; - final Value type; - final Value createdAt; - final Value updatedAt; - final Value width; - final Value height; - final Value durationMs; - final Value id; - final Value checksum; - final Value isFavorite; - final Value orientation; - final Value iCloudId; - final Value adjustmentTime; - final Value latitude; - final Value longitude; - final Value playbackStyle; - 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.durationMs = const Value.absent(), - this.id = const Value.absent(), - this.checksum = const Value.absent(), - this.isFavorite = const Value.absent(), - this.orientation = const Value.absent(), - this.iCloudId = const Value.absent(), - this.adjustmentTime = const Value.absent(), - this.latitude = const Value.absent(), - this.longitude = const Value.absent(), - this.playbackStyle = 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.durationMs = const Value.absent(), - required String id, - this.checksum = const Value.absent(), - this.isFavorite = const Value.absent(), - this.orientation = const Value.absent(), - this.iCloudId = const Value.absent(), - this.adjustmentTime = const Value.absent(), - this.latitude = const Value.absent(), - this.longitude = const Value.absent(), - this.playbackStyle = 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? durationMs, - Expression? id, - Expression? checksum, - Expression? isFavorite, - Expression? orientation, - Expression? iCloudId, - Expression? adjustmentTime, - Expression? latitude, - Expression? longitude, - Expression? playbackStyle, - }) { - 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 (durationMs != null) 'duration_ms': durationMs, - if (id != null) 'id': id, - if (checksum != null) 'checksum': checksum, - if (isFavorite != null) 'is_favorite': isFavorite, - if (orientation != null) 'orientation': orientation, - if (iCloudId != null) 'i_cloud_id': iCloudId, - if (adjustmentTime != null) 'adjustment_time': adjustmentTime, - if (latitude != null) 'latitude': latitude, - if (longitude != null) 'longitude': longitude, - if (playbackStyle != null) 'playback_style': playbackStyle, - }); - } - - LocalAssetEntityCompanion copyWith({ - Value? name, - Value? type, - Value? createdAt, - Value? updatedAt, - Value? width, - Value? height, - Value? durationMs, - Value? id, - Value? checksum, - Value? isFavorite, - Value? orientation, - Value? iCloudId, - Value? adjustmentTime, - Value? latitude, - Value? longitude, - Value? playbackStyle, - }) { - 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, - durationMs: durationMs ?? this.durationMs, - id: id ?? this.id, - checksum: checksum ?? this.checksum, - isFavorite: isFavorite ?? this.isFavorite, - orientation: orientation ?? this.orientation, - iCloudId: iCloudId ?? this.iCloudId, - adjustmentTime: adjustmentTime ?? this.adjustmentTime, - latitude: latitude ?? this.latitude, - longitude: longitude ?? this.longitude, - playbackStyle: playbackStyle ?? this.playbackStyle, - ); - } - - @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 (durationMs.present) { - map['duration_ms'] = Variable(durationMs.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); - } - if (iCloudId.present) { - map['i_cloud_id'] = Variable(iCloudId.value); - } - if (adjustmentTime.present) { - map['adjustment_time'] = Variable(adjustmentTime.value); - } - if (latitude.present) { - map['latitude'] = Variable(latitude.value); - } - if (longitude.present) { - map['longitude'] = Variable(longitude.value); - } - if (playbackStyle.present) { - map['playback_style'] = Variable(playbackStyle.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('durationMs: $durationMs, ') - ..write('id: $id, ') - ..write('checksum: $checksum, ') - ..write('isFavorite: $isFavorite, ') - ..write('orientation: $orientation, ') - ..write('iCloudId: $iCloudId, ') - ..write('adjustmentTime: $adjustmentTime, ') - ..write('latitude: $latitude, ') - ..write('longitude: $longitude, ') - ..write('playbackStyle: $playbackStyle') - ..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, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn description = GeneratedColumn( - 'description', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT \'\'', - defaultValue: const CustomExpression('\'\''), - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn thumbnailAssetId = GeneratedColumn( - 'thumbnail_asset_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: - 'NULL REFERENCES remote_asset_entity(id)ON DELETE SET NULL', - ); - late final GeneratedColumn isActivityEnabled = GeneratedColumn( - 'is_activity_enabled', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: - 'NOT NULL DEFAULT 1 CHECK (is_activity_enabled IN (0, 1))', - defaultValue: const CustomExpression('1'), - ); - late final GeneratedColumn order = GeneratedColumn( - 'order', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - @override - List get $columns => [ - id, - name, - description, - createdAt, - updatedAt, - 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.string, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}updated_at'], - )!, - thumbnailAssetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}thumbnail_asset_id'], - ), - isActivityEnabled: attachedDatabase.typeMapping.read( - DriftSqlType.int, - 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; - @override - List get customConstraints => const ['PRIMARY KEY(id)']; - @override - bool get dontWriteConstraints => true; -} - -class RemoteAlbumEntityData extends DataClass - implements Insertable { - final String id; - final String name; - final String description; - final String createdAt; - final String updatedAt; - final String? thumbnailAssetId; - final int isActivityEnabled; - final int order; - const RemoteAlbumEntityData({ - required this.id, - required this.name, - required this.description, - required this.createdAt, - required this.updatedAt, - 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); - 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']), - 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), - 'thumbnailAssetId': serializer.toJson(thumbnailAssetId), - 'isActivityEnabled': serializer.toJson(isActivityEnabled), - 'order': serializer.toJson(order), - }; - } - - RemoteAlbumEntityData copyWith({ - String? id, - String? name, - String? description, - String? createdAt, - String? updatedAt, - Value thumbnailAssetId = const Value.absent(), - int? isActivityEnabled, - int? order, - }) => RemoteAlbumEntityData( - id: id ?? this.id, - name: name ?? this.name, - description: description ?? this.description, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - 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, - 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('thumbnailAssetId: $thumbnailAssetId, ') - ..write('isActivityEnabled: $isActivityEnabled, ') - ..write('order: $order') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - name, - description, - createdAt, - updatedAt, - 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.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 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.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(), - this.thumbnailAssetId = const Value.absent(), - this.isActivityEnabled = const Value.absent(), - required int order, - }) : id = Value(id), - name = Value(name), - order = Value(order); - static Insertable custom({ - Expression? id, - Expression? name, - Expression? description, - Expression? createdAt, - Expression? updatedAt, - 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 (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? 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, - 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 (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('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, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn backupSelection = GeneratedColumn( - 'backup_selection', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn isIosSharedAlbum = GeneratedColumn( - 'is_ios_shared_album', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: - 'NOT NULL DEFAULT 0 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, - $customConstraints: - 'NULL REFERENCES remote_album_entity(id)ON DELETE SET NULL', - ); - late final GeneratedColumn marker = GeneratedColumn( - 'marker', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL 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.string, - data['${effectivePrefix}updated_at'], - )!, - backupSelection: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}backup_selection'], - )!, - isIosSharedAlbum: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}is_ios_shared_album'], - )!, - linkedRemoteAlbumId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}linked_remote_album_id'], - ), - marker: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}marker'], - ), - ); - } - - @override - LocalAlbumEntity createAlias(String alias) { - return LocalAlbumEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY(id)']; - @override - bool get dontWriteConstraints => true; -} - -class LocalAlbumEntityData extends DataClass - implements Insertable { - final String id; - final String name; - final String updatedAt; - final int backupSelection; - final int isIosSharedAlbum; - final String? linkedRemoteAlbumId; - final int? 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, - String? updatedAt, - int? backupSelection, - int? 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, - $customConstraints: - 'NOT NULL REFERENCES local_asset_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn albumId = GeneratedColumn( - 'album_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: - 'NOT NULL REFERENCES local_album_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn marker = GeneratedColumn( - 'marker', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL 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.int, - data['${effectivePrefix}marker'], - ), - ); - } - - @override - LocalAlbumAssetEntity createAlias(String alias) { - return LocalAlbumAssetEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const [ - 'PRIMARY KEY(asset_id, album_id)', - ]; - @override - bool get dontWriteConstraints => true; -} - -class LocalAlbumAssetEntityData extends DataClass - implements Insertable { - final String assetId; - final String albumId; - final int? 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, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn email = GeneratedColumn( - 'email', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn isAdmin = GeneratedColumn( - 'is_admin', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0 CHECK (is_admin IN (0, 1))', - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn hasProfileImage = GeneratedColumn( - 'has_profile_image', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: - 'NOT NULL DEFAULT 0 CHECK (has_profile_image IN (0, 1))', - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn profileChangedAt = GeneratedColumn( - 'profile_changed_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn avatarColor = GeneratedColumn( - 'avatar_color', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn quotaSizeInBytes = GeneratedColumn( - 'quota_size_in_bytes', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0', - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn quotaUsageInBytes = GeneratedColumn( - 'quota_usage_in_bytes', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0', - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn pinCode = GeneratedColumn( - 'pin_code', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - @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.int, - data['${effectivePrefix}is_admin'], - )!, - hasProfileImage: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}has_profile_image'], - )!, - profileChangedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - 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; - @override - List get customConstraints => const ['PRIMARY KEY(id)']; - @override - bool get dontWriteConstraints => true; -} - -class AuthUserEntityData extends DataClass - implements Insertable { - final String id; - final String name; - final String email; - final int isAdmin; - final int hasProfileImage; - final String 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, - int? isAdmin, - int? hasProfileImage, - String? 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, - $customConstraints: 'NOT NULL REFERENCES user_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn key = GeneratedColumn( - 'key', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn value = - GeneratedColumn( - 'value', - aliasedName, - false, - type: DriftSqlType.blob, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - @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; - @override - List get customConstraints => const ['PRIMARY KEY(user_id, "key")']; - @override - bool get dontWriteConstraints => true; -} - -class UserMetadataEntityData extends DataClass - implements Insertable { - final String userId; - final int key; - final i2.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, - i2.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 i2.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, - $customConstraints: 'NOT NULL REFERENCES user_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn sharedWithId = GeneratedColumn( - 'shared_with_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL REFERENCES user_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn inTimeline = GeneratedColumn( - 'in_timeline', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0 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.int, - data['${effectivePrefix}in_timeline'], - )!, - ); - } - - @override - PartnerEntity createAlias(String alias) { - return PartnerEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const [ - 'PRIMARY KEY(shared_by_id, shared_with_id)', - ]; - @override - bool get dontWriteConstraints => true; -} - -class PartnerEntityData extends DataClass - implements Insertable { - final String sharedById; - final String sharedWithId; - final int 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, - int? 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, - $customConstraints: - 'NOT NULL REFERENCES remote_asset_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn city = GeneratedColumn( - 'city', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn state = GeneratedColumn( - 'state', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn country = GeneratedColumn( - 'country', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn dateTimeOriginal = GeneratedColumn( - 'date_time_original', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn description = GeneratedColumn( - 'description', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn height = GeneratedColumn( - 'height', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn width = GeneratedColumn( - 'width', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn exposureTime = GeneratedColumn( - 'exposure_time', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn fNumber = GeneratedColumn( - 'f_number', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn fileSize = GeneratedColumn( - 'file_size', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn focalLength = GeneratedColumn( - 'focal_length', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn latitude = GeneratedColumn( - 'latitude', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn longitude = GeneratedColumn( - 'longitude', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn iso = GeneratedColumn( - 'iso', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn make = GeneratedColumn( - 'make', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn model = GeneratedColumn( - 'model', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn lens = GeneratedColumn( - 'lens', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn orientation = GeneratedColumn( - 'orientation', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn timeZone = GeneratedColumn( - 'time_zone', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn rating = GeneratedColumn( - 'rating', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn projectionType = GeneratedColumn( - 'projection_type', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - @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.string, - 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; - @override - List get customConstraints => const ['PRIMARY KEY(asset_id)']; - @override - bool get dontWriteConstraints => true; -} - -class RemoteExifEntityData extends DataClass - implements Insertable { - final String assetId; - final String? city; - final String? state; - final String? country; - final String? 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, - $customConstraints: - 'NOT NULL REFERENCES remote_asset_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn albumId = GeneratedColumn( - 'album_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: - 'NOT NULL 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; - @override - List get customConstraints => const [ - 'PRIMARY KEY(asset_id, album_id)', - ]; - @override - bool get dontWriteConstraints => 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, - $customConstraints: - 'NOT NULL REFERENCES remote_album_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn userId = GeneratedColumn( - 'user_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL REFERENCES user_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn role = GeneratedColumn( - 'role', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - @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; - @override - List get customConstraints => const [ - 'PRIMARY KEY(album_id, user_id)', - ]; - @override - bool get dontWriteConstraints => 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 RemoteAssetCloudIdEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - RemoteAssetCloudIdEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn assetId = GeneratedColumn( - 'asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: - 'NOT NULL REFERENCES remote_asset_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn cloudId = GeneratedColumn( - 'cloud_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn adjustmentTime = GeneratedColumn( - 'adjustment_time', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn latitude = GeneratedColumn( - 'latitude', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn longitude = GeneratedColumn( - 'longitude', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - @override - List get $columns => [ - assetId, - cloudId, - createdAt, - adjustmentTime, - latitude, - longitude, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'remote_asset_cloud_id_entity'; - @override - Set get $primaryKey => {assetId}; - @override - RemoteAssetCloudIdEntityData map( - Map data, { - String? tablePrefix, - }) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return RemoteAssetCloudIdEntityData( - assetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}asset_id'], - )!, - cloudId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}cloud_id'], - ), - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}created_at'], - ), - adjustmentTime: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}adjustment_time'], - ), - latitude: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}latitude'], - ), - longitude: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}longitude'], - ), - ); - } - - @override - RemoteAssetCloudIdEntity createAlias(String alias) { - return RemoteAssetCloudIdEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY(asset_id)']; - @override - bool get dontWriteConstraints => true; -} - -class RemoteAssetCloudIdEntityData extends DataClass - implements Insertable { - final String assetId; - final String? cloudId; - final String? createdAt; - final String? adjustmentTime; - final double? latitude; - final double? longitude; - const RemoteAssetCloudIdEntityData({ - required this.assetId, - this.cloudId, - this.createdAt, - this.adjustmentTime, - this.latitude, - this.longitude, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['asset_id'] = Variable(assetId); - if (!nullToAbsent || cloudId != null) { - map['cloud_id'] = Variable(cloudId); - } - if (!nullToAbsent || createdAt != null) { - map['created_at'] = Variable(createdAt); - } - if (!nullToAbsent || adjustmentTime != null) { - map['adjustment_time'] = Variable(adjustmentTime); - } - if (!nullToAbsent || latitude != null) { - map['latitude'] = Variable(latitude); - } - if (!nullToAbsent || longitude != null) { - map['longitude'] = Variable(longitude); - } - return map; - } - - factory RemoteAssetCloudIdEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return RemoteAssetCloudIdEntityData( - assetId: serializer.fromJson(json['assetId']), - cloudId: serializer.fromJson(json['cloudId']), - createdAt: serializer.fromJson(json['createdAt']), - adjustmentTime: serializer.fromJson(json['adjustmentTime']), - latitude: serializer.fromJson(json['latitude']), - longitude: serializer.fromJson(json['longitude']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'assetId': serializer.toJson(assetId), - 'cloudId': serializer.toJson(cloudId), - 'createdAt': serializer.toJson(createdAt), - 'adjustmentTime': serializer.toJson(adjustmentTime), - 'latitude': serializer.toJson(latitude), - 'longitude': serializer.toJson(longitude), - }; - } - - RemoteAssetCloudIdEntityData copyWith({ - String? assetId, - Value cloudId = const Value.absent(), - Value createdAt = const Value.absent(), - Value adjustmentTime = const Value.absent(), - Value latitude = const Value.absent(), - Value longitude = const Value.absent(), - }) => RemoteAssetCloudIdEntityData( - assetId: assetId ?? this.assetId, - cloudId: cloudId.present ? cloudId.value : this.cloudId, - createdAt: createdAt.present ? createdAt.value : this.createdAt, - adjustmentTime: adjustmentTime.present - ? adjustmentTime.value - : this.adjustmentTime, - latitude: latitude.present ? latitude.value : this.latitude, - longitude: longitude.present ? longitude.value : this.longitude, - ); - RemoteAssetCloudIdEntityData copyWithCompanion( - RemoteAssetCloudIdEntityCompanion data, - ) { - return RemoteAssetCloudIdEntityData( - assetId: data.assetId.present ? data.assetId.value : this.assetId, - cloudId: data.cloudId.present ? data.cloudId.value : this.cloudId, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - adjustmentTime: data.adjustmentTime.present - ? data.adjustmentTime.value - : this.adjustmentTime, - latitude: data.latitude.present ? data.latitude.value : this.latitude, - longitude: data.longitude.present ? data.longitude.value : this.longitude, - ); - } - - @override - String toString() { - return (StringBuffer('RemoteAssetCloudIdEntityData(') - ..write('assetId: $assetId, ') - ..write('cloudId: $cloudId, ') - ..write('createdAt: $createdAt, ') - ..write('adjustmentTime: $adjustmentTime, ') - ..write('latitude: $latitude, ') - ..write('longitude: $longitude') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - assetId, - cloudId, - createdAt, - adjustmentTime, - latitude, - longitude, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is RemoteAssetCloudIdEntityData && - other.assetId == this.assetId && - other.cloudId == this.cloudId && - other.createdAt == this.createdAt && - other.adjustmentTime == this.adjustmentTime && - other.latitude == this.latitude && - other.longitude == this.longitude); -} - -class RemoteAssetCloudIdEntityCompanion - extends UpdateCompanion { - final Value assetId; - final Value cloudId; - final Value createdAt; - final Value adjustmentTime; - final Value latitude; - final Value longitude; - const RemoteAssetCloudIdEntityCompanion({ - this.assetId = const Value.absent(), - this.cloudId = const Value.absent(), - this.createdAt = const Value.absent(), - this.adjustmentTime = const Value.absent(), - this.latitude = const Value.absent(), - this.longitude = const Value.absent(), - }); - RemoteAssetCloudIdEntityCompanion.insert({ - required String assetId, - this.cloudId = const Value.absent(), - this.createdAt = const Value.absent(), - this.adjustmentTime = const Value.absent(), - this.latitude = const Value.absent(), - this.longitude = const Value.absent(), - }) : assetId = Value(assetId); - static Insertable custom({ - Expression? assetId, - Expression? cloudId, - Expression? createdAt, - Expression? adjustmentTime, - Expression? latitude, - Expression? longitude, - }) { - return RawValuesInsertable({ - if (assetId != null) 'asset_id': assetId, - if (cloudId != null) 'cloud_id': cloudId, - if (createdAt != null) 'created_at': createdAt, - if (adjustmentTime != null) 'adjustment_time': adjustmentTime, - if (latitude != null) 'latitude': latitude, - if (longitude != null) 'longitude': longitude, - }); - } - - RemoteAssetCloudIdEntityCompanion copyWith({ - Value? assetId, - Value? cloudId, - Value? createdAt, - Value? adjustmentTime, - Value? latitude, - Value? longitude, - }) { - return RemoteAssetCloudIdEntityCompanion( - assetId: assetId ?? this.assetId, - cloudId: cloudId ?? this.cloudId, - createdAt: createdAt ?? this.createdAt, - adjustmentTime: adjustmentTime ?? this.adjustmentTime, - latitude: latitude ?? this.latitude, - longitude: longitude ?? this.longitude, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (assetId.present) { - map['asset_id'] = Variable(assetId.value); - } - if (cloudId.present) { - map['cloud_id'] = Variable(cloudId.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (adjustmentTime.present) { - map['adjustment_time'] = Variable(adjustmentTime.value); - } - if (latitude.present) { - map['latitude'] = Variable(latitude.value); - } - if (longitude.present) { - map['longitude'] = Variable(longitude.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('RemoteAssetCloudIdEntityCompanion(') - ..write('assetId: $assetId, ') - ..write('cloudId: $cloudId, ') - ..write('createdAt: $createdAt, ') - ..write('adjustmentTime: $adjustmentTime, ') - ..write('latitude: $latitude, ') - ..write('longitude: $longitude') - ..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, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn deletedAt = GeneratedColumn( - 'deleted_at', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn ownerId = GeneratedColumn( - 'owner_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL REFERENCES user_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn type = GeneratedColumn( - 'type', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn data = GeneratedColumn( - 'data', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn isSaved = GeneratedColumn( - 'is_saved', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0 CHECK (is_saved IN (0, 1))', - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn memoryAt = GeneratedColumn( - 'memory_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn seenAt = GeneratedColumn( - 'seen_at', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn showAt = GeneratedColumn( - 'show_at', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn hideAt = GeneratedColumn( - 'hide_at', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - @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.string, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}updated_at'], - )!, - deletedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - 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.int, - data['${effectivePrefix}is_saved'], - )!, - memoryAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}memory_at'], - )!, - seenAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}seen_at'], - ), - showAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}show_at'], - ), - hideAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}hide_at'], - ), - ); - } - - @override - MemoryEntity createAlias(String alias) { - return MemoryEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY(id)']; - @override - bool get dontWriteConstraints => true; -} - -class MemoryEntityData extends DataClass - implements Insertable { - final String id; - final String createdAt; - final String updatedAt; - final String? deletedAt; - final String ownerId; - final int type; - final String data; - final int isSaved; - final String memoryAt; - final String? seenAt; - final String? showAt; - final String? 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, - String? createdAt, - String? updatedAt, - Value deletedAt = const Value.absent(), - String? ownerId, - int? type, - String? data, - int? isSaved, - String? 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 String 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, - $customConstraints: - 'NOT NULL REFERENCES remote_asset_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn memoryId = GeneratedColumn( - 'memory_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: - 'NOT NULL 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; - @override - List get customConstraints => const [ - 'PRIMARY KEY(asset_id, memory_id)', - ]; - @override - bool get dontWriteConstraints => 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, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn ownerId = GeneratedColumn( - 'owner_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL REFERENCES user_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn faceAssetId = GeneratedColumn( - 'face_asset_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn isFavorite = GeneratedColumn( - 'is_favorite', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL CHECK (is_favorite IN (0, 1))', - ); - late final GeneratedColumn isHidden = GeneratedColumn( - 'is_hidden', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL CHECK (is_hidden IN (0, 1))', - ); - late final GeneratedColumn color = GeneratedColumn( - 'color', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn birthDate = GeneratedColumn( - 'birth_date', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - @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.string, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - 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.int, - data['${effectivePrefix}is_favorite'], - )!, - isHidden: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}is_hidden'], - )!, - color: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}color'], - ), - birthDate: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}birth_date'], - ), - ); - } - - @override - PersonEntity createAlias(String alias) { - return PersonEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY(id)']; - @override - bool get dontWriteConstraints => true; -} - -class PersonEntityData extends DataClass - implements Insertable { - final String id; - final String createdAt; - final String updatedAt; - final String ownerId; - final String name; - final String? faceAssetId; - final int isFavorite; - final int isHidden; - final String? color; - final String? 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, - String? createdAt, - String? updatedAt, - String? ownerId, - String? name, - Value faceAssetId = const Value.absent(), - int? isFavorite, - int? 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 int isFavorite, - required int 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, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn assetId = GeneratedColumn( - 'asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: - 'NOT NULL REFERENCES remote_asset_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn personId = GeneratedColumn( - 'person_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL REFERENCES person_entity(id)ON DELETE SET NULL', - ); - late final GeneratedColumn imageWidth = GeneratedColumn( - 'image_width', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn imageHeight = GeneratedColumn( - 'image_height', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn boundingBoxX1 = GeneratedColumn( - 'bounding_box_x1', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn boundingBoxY1 = GeneratedColumn( - 'bounding_box_y1', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn boundingBoxX2 = GeneratedColumn( - 'bounding_box_x2', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn boundingBoxY2 = GeneratedColumn( - 'bounding_box_y2', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn sourceType = GeneratedColumn( - 'source_type', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn isVisible = GeneratedColumn( - 'is_visible', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 1 CHECK (is_visible IN (0, 1))', - defaultValue: const CustomExpression('1'), - ); - late final GeneratedColumn deletedAt = GeneratedColumn( - 'deleted_at', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - @override - List get $columns => [ - id, - assetId, - personId, - imageWidth, - imageHeight, - boundingBoxX1, - boundingBoxY1, - boundingBoxX2, - boundingBoxY2, - sourceType, - isVisible, - deletedAt, - ]; - @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'], - )!, - isVisible: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}is_visible'], - )!, - deletedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}deleted_at'], - ), - ); - } - - @override - AssetFaceEntity createAlias(String alias) { - return AssetFaceEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY(id)']; - @override - bool get dontWriteConstraints => 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; - final int isVisible; - final String? deletedAt; - 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, - required this.isVisible, - this.deletedAt, - }); - @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); - map['is_visible'] = Variable(isVisible); - if (!nullToAbsent || deletedAt != null) { - map['deleted_at'] = Variable(deletedAt); - } - 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']), - isVisible: serializer.fromJson(json['isVisible']), - deletedAt: serializer.fromJson(json['deletedAt']), - ); - } - @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), - 'isVisible': serializer.toJson(isVisible), - 'deletedAt': serializer.toJson(deletedAt), - }; - } - - 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, - int? isVisible, - Value deletedAt = const Value.absent(), - }) => 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, - isVisible: isVisible ?? this.isVisible, - deletedAt: deletedAt.present ? deletedAt.value : this.deletedAt, - ); - 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, - isVisible: data.isVisible.present ? data.isVisible.value : this.isVisible, - deletedAt: data.deletedAt.present ? data.deletedAt.value : this.deletedAt, - ); - } - - @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('isVisible: $isVisible, ') - ..write('deletedAt: $deletedAt') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - assetId, - personId, - imageWidth, - imageHeight, - boundingBoxX1, - boundingBoxY1, - boundingBoxX2, - boundingBoxY2, - sourceType, - isVisible, - deletedAt, - ); - @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 && - other.isVisible == this.isVisible && - other.deletedAt == this.deletedAt); -} - -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; - final Value isVisible; - final Value deletedAt; - 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(), - this.isVisible = const Value.absent(), - this.deletedAt = 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, - this.isVisible = const Value.absent(), - this.deletedAt = const Value.absent(), - }) : 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, - Expression? isVisible, - Expression? deletedAt, - }) { - 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, - if (isVisible != null) 'is_visible': isVisible, - if (deletedAt != null) 'deleted_at': deletedAt, - }); - } - - AssetFaceEntityCompanion copyWith({ - Value? id, - Value? assetId, - Value? personId, - Value? imageWidth, - Value? imageHeight, - Value? boundingBoxX1, - Value? boundingBoxY1, - Value? boundingBoxX2, - Value? boundingBoxY2, - Value? sourceType, - Value? isVisible, - Value? deletedAt, - }) { - 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, - isVisible: isVisible ?? this.isVisible, - deletedAt: deletedAt ?? this.deletedAt, - ); - } - - @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); - } - if (isVisible.present) { - map['is_visible'] = Variable(isVisible.value); - } - if (deletedAt.present) { - map['deleted_at'] = Variable(deletedAt.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('isVisible: $isVisible, ') - ..write('deletedAt: $deletedAt') - ..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, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn stringValue = GeneratedColumn( - 'string_value', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn intValue = GeneratedColumn( - 'int_value', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - @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; - @override - List get customConstraints => const ['PRIMARY KEY(id)']; - @override - bool get dontWriteConstraints => 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, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn type = GeneratedColumn( - 'type', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn width = GeneratedColumn( - 'width', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn height = GeneratedColumn( - 'height', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn durationMs = GeneratedColumn( - 'duration_ms', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn albumId = GeneratedColumn( - 'album_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn checksum = GeneratedColumn( - 'checksum', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn isFavorite = GeneratedColumn( - 'is_favorite', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0 CHECK (is_favorite IN (0, 1))', - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn orientation = GeneratedColumn( - 'orientation', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0', - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn source = GeneratedColumn( - 'source', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn playbackStyle = GeneratedColumn( - 'playback_style', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0', - defaultValue: const CustomExpression('0'), - ); - @override - List get $columns => [ - name, - type, - createdAt, - updatedAt, - width, - height, - durationMs, - id, - albumId, - checksum, - isFavorite, - orientation, - source, - playbackStyle, - ]; - @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.string, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}updated_at'], - )!, - width: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}width'], - ), - height: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}height'], - ), - durationMs: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}duration_ms'], - ), - 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.int, - data['${effectivePrefix}is_favorite'], - )!, - orientation: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}orientation'], - )!, - source: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}source'], - )!, - playbackStyle: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}playback_style'], - )!, - ); - } - - @override - TrashedLocalAssetEntity createAlias(String alias) { - return TrashedLocalAssetEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY(id, album_id)']; - @override - bool get dontWriteConstraints => true; -} - -class TrashedLocalAssetEntityData extends DataClass - implements Insertable { - final String name; - final int type; - final String createdAt; - final String updatedAt; - final int? width; - final int? height; - final int? durationMs; - final String id; - final String albumId; - final String? checksum; - final int isFavorite; - final int orientation; - final int source; - final int playbackStyle; - const TrashedLocalAssetEntityData({ - required this.name, - required this.type, - required this.createdAt, - required this.updatedAt, - this.width, - this.height, - this.durationMs, - required this.id, - required this.albumId, - this.checksum, - required this.isFavorite, - required this.orientation, - required this.source, - required this.playbackStyle, - }); - @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 || durationMs != null) { - map['duration_ms'] = Variable(durationMs); - } - 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); - map['source'] = Variable(source); - map['playback_style'] = Variable(playbackStyle); - 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']), - durationMs: serializer.fromJson(json['durationMs']), - 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']), - source: serializer.fromJson(json['source']), - playbackStyle: serializer.fromJson(json['playbackStyle']), - ); - } - @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), - 'durationMs': serializer.toJson(durationMs), - 'id': serializer.toJson(id), - 'albumId': serializer.toJson(albumId), - 'checksum': serializer.toJson(checksum), - 'isFavorite': serializer.toJson(isFavorite), - 'orientation': serializer.toJson(orientation), - 'source': serializer.toJson(source), - 'playbackStyle': serializer.toJson(playbackStyle), - }; - } - - TrashedLocalAssetEntityData copyWith({ - String? name, - int? type, - String? createdAt, - String? updatedAt, - Value width = const Value.absent(), - Value height = const Value.absent(), - Value durationMs = const Value.absent(), - String? id, - String? albumId, - Value checksum = const Value.absent(), - int? isFavorite, - int? orientation, - int? source, - int? playbackStyle, - }) => 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, - durationMs: durationMs.present ? durationMs.value : this.durationMs, - id: id ?? this.id, - albumId: albumId ?? this.albumId, - checksum: checksum.present ? checksum.value : this.checksum, - isFavorite: isFavorite ?? this.isFavorite, - orientation: orientation ?? this.orientation, - source: source ?? this.source, - playbackStyle: playbackStyle ?? this.playbackStyle, - ); - 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, - durationMs: data.durationMs.present - ? data.durationMs.value - : this.durationMs, - 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, - source: data.source.present ? data.source.value : this.source, - playbackStyle: data.playbackStyle.present - ? data.playbackStyle.value - : this.playbackStyle, - ); - } - - @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('durationMs: $durationMs, ') - ..write('id: $id, ') - ..write('albumId: $albumId, ') - ..write('checksum: $checksum, ') - ..write('isFavorite: $isFavorite, ') - ..write('orientation: $orientation, ') - ..write('source: $source, ') - ..write('playbackStyle: $playbackStyle') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - name, - type, - createdAt, - updatedAt, - width, - height, - durationMs, - id, - albumId, - checksum, - isFavorite, - orientation, - source, - playbackStyle, - ); - @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.durationMs == this.durationMs && - other.id == this.id && - other.albumId == this.albumId && - other.checksum == this.checksum && - other.isFavorite == this.isFavorite && - other.orientation == this.orientation && - other.source == this.source && - other.playbackStyle == this.playbackStyle); -} - -class TrashedLocalAssetEntityCompanion - extends UpdateCompanion { - final Value name; - final Value type; - final Value createdAt; - final Value updatedAt; - final Value width; - final Value height; - final Value durationMs; - final Value id; - final Value albumId; - final Value checksum; - final Value isFavorite; - final Value orientation; - final Value source; - final Value playbackStyle; - 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.durationMs = 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(), - this.source = const Value.absent(), - this.playbackStyle = 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.durationMs = const Value.absent(), - required String id, - required String albumId, - this.checksum = const Value.absent(), - this.isFavorite = const Value.absent(), - this.orientation = const Value.absent(), - required int source, - this.playbackStyle = const Value.absent(), - }) : name = Value(name), - type = Value(type), - id = Value(id), - albumId = Value(albumId), - source = Value(source); - static Insertable custom({ - Expression? name, - Expression? type, - Expression? createdAt, - Expression? updatedAt, - Expression? width, - Expression? height, - Expression? durationMs, - Expression? id, - Expression? albumId, - Expression? checksum, - Expression? isFavorite, - Expression? orientation, - Expression? source, - Expression? playbackStyle, - }) { - 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 (durationMs != null) 'duration_ms': durationMs, - 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, - if (source != null) 'source': source, - if (playbackStyle != null) 'playback_style': playbackStyle, - }); - } - - TrashedLocalAssetEntityCompanion copyWith({ - Value? name, - Value? type, - Value? createdAt, - Value? updatedAt, - Value? width, - Value? height, - Value? durationMs, - Value? id, - Value? albumId, - Value? checksum, - Value? isFavorite, - Value? orientation, - Value? source, - Value? playbackStyle, - }) { - 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, - durationMs: durationMs ?? this.durationMs, - id: id ?? this.id, - albumId: albumId ?? this.albumId, - checksum: checksum ?? this.checksum, - isFavorite: isFavorite ?? this.isFavorite, - orientation: orientation ?? this.orientation, - source: source ?? this.source, - playbackStyle: playbackStyle ?? this.playbackStyle, - ); - } - - @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 (durationMs.present) { - map['duration_ms'] = Variable(durationMs.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); - } - if (source.present) { - map['source'] = Variable(source.value); - } - if (playbackStyle.present) { - map['playback_style'] = Variable(playbackStyle.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('durationMs: $durationMs, ') - ..write('id: $id, ') - ..write('albumId: $albumId, ') - ..write('checksum: $checksum, ') - ..write('isFavorite: $isFavorite, ') - ..write('orientation: $orientation, ') - ..write('source: $source, ') - ..write('playbackStyle: $playbackStyle') - ..write(')')) - .toString(); - } -} - -class AssetEditEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - AssetEditEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn assetId = GeneratedColumn( - 'asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: - 'NOT NULL REFERENCES remote_asset_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn action = GeneratedColumn( - 'action', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn parameters = - GeneratedColumn( - 'parameters', - aliasedName, - false, - type: DriftSqlType.blob, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn sequence = GeneratedColumn( - 'sequence', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - @override - List get $columns => [ - id, - assetId, - action, - parameters, - sequence, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'asset_edit_entity'; - @override - Set get $primaryKey => {id}; - @override - AssetEditEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return AssetEditEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - assetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}asset_id'], - )!, - action: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}action'], - )!, - parameters: attachedDatabase.typeMapping.read( - DriftSqlType.blob, - data['${effectivePrefix}parameters'], - )!, - sequence: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}sequence'], - )!, - ); - } - - @override - AssetEditEntity createAlias(String alias) { - return AssetEditEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY(id)']; - @override - bool get dontWriteConstraints => true; -} - -class AssetEditEntityData extends DataClass - implements Insertable { - final String id; - final String assetId; - final int action; - final i2.Uint8List parameters; - final int sequence; - const AssetEditEntityData({ - required this.id, - required this.assetId, - required this.action, - required this.parameters, - required this.sequence, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['asset_id'] = Variable(assetId); - map['action'] = Variable(action); - map['parameters'] = Variable(parameters); - map['sequence'] = Variable(sequence); - return map; - } - - factory AssetEditEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return AssetEditEntityData( - id: serializer.fromJson(json['id']), - assetId: serializer.fromJson(json['assetId']), - action: serializer.fromJson(json['action']), - parameters: serializer.fromJson(json['parameters']), - sequence: serializer.fromJson(json['sequence']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'assetId': serializer.toJson(assetId), - 'action': serializer.toJson(action), - 'parameters': serializer.toJson(parameters), - 'sequence': serializer.toJson(sequence), - }; - } - - AssetEditEntityData copyWith({ - String? id, - String? assetId, - int? action, - i2.Uint8List? parameters, - int? sequence, - }) => AssetEditEntityData( - id: id ?? this.id, - assetId: assetId ?? this.assetId, - action: action ?? this.action, - parameters: parameters ?? this.parameters, - sequence: sequence ?? this.sequence, - ); - AssetEditEntityData copyWithCompanion(AssetEditEntityCompanion data) { - return AssetEditEntityData( - id: data.id.present ? data.id.value : this.id, - assetId: data.assetId.present ? data.assetId.value : this.assetId, - action: data.action.present ? data.action.value : this.action, - parameters: data.parameters.present - ? data.parameters.value - : this.parameters, - sequence: data.sequence.present ? data.sequence.value : this.sequence, - ); - } - - @override - String toString() { - return (StringBuffer('AssetEditEntityData(') - ..write('id: $id, ') - ..write('assetId: $assetId, ') - ..write('action: $action, ') - ..write('parameters: $parameters, ') - ..write('sequence: $sequence') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - assetId, - action, - $driftBlobEquality.hash(parameters), - sequence, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is AssetEditEntityData && - other.id == this.id && - other.assetId == this.assetId && - other.action == this.action && - $driftBlobEquality.equals(other.parameters, this.parameters) && - other.sequence == this.sequence); -} - -class AssetEditEntityCompanion extends UpdateCompanion { - final Value id; - final Value assetId; - final Value action; - final Value parameters; - final Value sequence; - const AssetEditEntityCompanion({ - this.id = const Value.absent(), - this.assetId = const Value.absent(), - this.action = const Value.absent(), - this.parameters = const Value.absent(), - this.sequence = const Value.absent(), - }); - AssetEditEntityCompanion.insert({ - required String id, - required String assetId, - required int action, - required i2.Uint8List parameters, - required int sequence, - }) : id = Value(id), - assetId = Value(assetId), - action = Value(action), - parameters = Value(parameters), - sequence = Value(sequence); - static Insertable custom({ - Expression? id, - Expression? assetId, - Expression? action, - Expression? parameters, - Expression? sequence, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (assetId != null) 'asset_id': assetId, - if (action != null) 'action': action, - if (parameters != null) 'parameters': parameters, - if (sequence != null) 'sequence': sequence, - }); - } - - AssetEditEntityCompanion copyWith({ - Value? id, - Value? assetId, - Value? action, - Value? parameters, - Value? sequence, - }) { - return AssetEditEntityCompanion( - id: id ?? this.id, - assetId: assetId ?? this.assetId, - action: action ?? this.action, - parameters: parameters ?? this.parameters, - sequence: sequence ?? this.sequence, - ); - } - - @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 (action.present) { - map['action'] = Variable(action.value); - } - if (parameters.present) { - map['parameters'] = Variable(parameters.value); - } - if (sequence.present) { - map['sequence'] = Variable(sequence.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('AssetEditEntityCompanion(') - ..write('id: $id, ') - ..write('assetId: $assetId, ') - ..write('action: $action, ') - ..write('parameters: $parameters, ') - ..write('sequence: $sequence') - ..write(')')) - .toString(); - } -} - -class Settings extends Table with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - Settings(this.attachedDatabase, [this._alias]); - late final GeneratedColumn key = GeneratedColumn( - 'key', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn value = GeneratedColumn( - 'value', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - @override - List get $columns => [key, value, updatedAt]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'settings'; - @override - Set get $primaryKey => {key}; - @override - SettingsData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return SettingsData( - key: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}key'], - )!, - value: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}value'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}updated_at'], - )!, - ); - } - - @override - Settings createAlias(String alias) { - return Settings(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY("key")']; - @override - bool get dontWriteConstraints => true; -} - -class SettingsData extends DataClass implements Insertable { - final String key; - final String value; - final String updatedAt; - const SettingsData({ - required this.key, - required this.value, - required this.updatedAt, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['key'] = Variable(key); - map['value'] = Variable(value); - map['updated_at'] = Variable(updatedAt); - return map; - } - - factory SettingsData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return SettingsData( - key: serializer.fromJson(json['key']), - value: serializer.fromJson(json['value']), - updatedAt: serializer.fromJson(json['updatedAt']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'key': serializer.toJson(key), - 'value': serializer.toJson(value), - 'updatedAt': serializer.toJson(updatedAt), - }; - } - - SettingsData copyWith({String? key, String? value, String? updatedAt}) => - SettingsData( - key: key ?? this.key, - value: value ?? this.value, - updatedAt: updatedAt ?? this.updatedAt, - ); - SettingsData copyWithCompanion(SettingsCompanion data) { - return SettingsData( - key: data.key.present ? data.key.value : this.key, - value: data.value.present ? data.value.value : this.value, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - ); - } - - @override - String toString() { - return (StringBuffer('SettingsData(') - ..write('key: $key, ') - ..write('value: $value, ') - ..write('updatedAt: $updatedAt') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(key, value, updatedAt); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is SettingsData && - other.key == this.key && - other.value == this.value && - other.updatedAt == this.updatedAt); -} - -class SettingsCompanion extends UpdateCompanion { - final Value key; - final Value value; - final Value updatedAt; - const SettingsCompanion({ - this.key = const Value.absent(), - this.value = const Value.absent(), - this.updatedAt = const Value.absent(), - }); - SettingsCompanion.insert({ - required String key, - required String value, - this.updatedAt = const Value.absent(), - }) : key = Value(key), - value = Value(value); - static Insertable custom({ - Expression? key, - Expression? value, - Expression? updatedAt, - }) { - return RawValuesInsertable({ - if (key != null) 'key': key, - if (value != null) 'value': value, - if (updatedAt != null) 'updated_at': updatedAt, - }); - } - - SettingsCompanion copyWith({ - Value? key, - Value? value, - Value? updatedAt, - }) { - return SettingsCompanion( - key: key ?? this.key, - value: value ?? this.value, - updatedAt: updatedAt ?? this.updatedAt, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (key.present) { - map['key'] = Variable(key.value); - } - if (value.present) { - map['value'] = Variable(value.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('SettingsCompanion(') - ..write('key: $key, ') - ..write('value: $value, ') - ..write('updatedAt: $updatedAt') - ..write(')')) - .toString(); - } -} - -class DatabaseAtV28 extends GeneratedDatabase { - DatabaseAtV28(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 idxLocalAlbumAssetAlbumAsset = Index( - 'idx_local_album_asset_album_asset', - 'CREATE INDEX IF NOT EXISTS idx_local_album_asset_album_asset ON local_album_asset_entity (album_id, asset_id)', - ); - 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 idxLocalAssetCloudId = Index( - 'idx_local_asset_cloud_id', - 'CREATE INDEX IF NOT EXISTS idx_local_asset_cloud_id ON local_asset_entity (i_cloud_id)', - ); - late final Index idxLocalAssetCreatedAt = Index( - 'idx_local_asset_created_at', - 'CREATE INDEX IF NOT EXISTS idx_local_asset_created_at ON local_asset_entity (created_at)', - ); - late final Index idxStackPrimaryAssetId = Index( - 'idx_stack_primary_asset_id', - 'CREATE INDEX IF NOT EXISTS idx_stack_primary_asset_id ON stack_entity (primary_asset_id)', - ); - 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 Index idxRemoteAssetStackId = Index( - 'idx_remote_asset_stack_id', - 'CREATE INDEX IF NOT EXISTS idx_remote_asset_stack_id ON remote_asset_entity (stack_id)', - ); - late final Index idxRemoteAssetOwnerVisibilityDeletedCreated = Index( - 'idx_remote_asset_owner_visibility_deleted_created', - 'CREATE INDEX IF NOT EXISTS idx_remote_asset_owner_visibility_deleted_created ON remote_asset_entity (owner_id, visibility, deleted_at, created_at DESC)', - ); - 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 RemoteAssetCloudIdEntity remoteAssetCloudIdEntity = - RemoteAssetCloudIdEntity(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 AssetEditEntity assetEditEntity = AssetEditEntity(this); - late final Settings settings = Settings(this); - late final Index idxPartnerSharedWithId = Index( - 'idx_partner_shared_with_id', - 'CREATE INDEX IF NOT EXISTS idx_partner_shared_with_id ON partner_entity (shared_with_id)', - ); - 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 idxRemoteExifCity = Index( - 'idx_remote_exif_city', - 'CREATE INDEX IF NOT EXISTS idx_remote_exif_city ON remote_exif_entity (city) WHERE city IS NOT NULL', - ); - late final Index idxRemoteAlbumAssetAlbumAsset = Index( - 'idx_remote_album_asset_album_asset', - 'CREATE INDEX IF NOT EXISTS idx_remote_album_asset_album_asset ON remote_album_asset_entity (album_id, asset_id)', - ); - late final Index idxRemoteAssetCloudId = Index( - 'idx_remote_asset_cloud_id', - 'CREATE INDEX IF NOT EXISTS idx_remote_asset_cloud_id ON remote_asset_cloud_id_entity (cloud_id)', - ); - late final Index idxPersonOwnerId = Index( - 'idx_person_owner_id', - 'CREATE INDEX IF NOT EXISTS idx_person_owner_id ON person_entity (owner_id)', - ); - late final Index idxAssetFacePersonId = Index( - 'idx_asset_face_person_id', - 'CREATE INDEX IF NOT EXISTS idx_asset_face_person_id ON asset_face_entity (person_id)', - ); - late final Index idxAssetFaceAssetId = Index( - 'idx_asset_face_asset_id', - 'CREATE INDEX IF NOT EXISTS idx_asset_face_asset_id ON asset_face_entity (asset_id)', - ); - late final Index idxAssetFaceVisiblePerson = Index( - 'idx_asset_face_visible_person', - 'CREATE INDEX IF NOT EXISTS idx_asset_face_visible_person ON asset_face_entity (person_id, asset_id) WHERE is_visible = 1 AND deleted_at IS NULL', - ); - 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)', - ); - late final Index idxAssetEditAssetId = Index( - 'idx_asset_edit_asset_id', - 'CREATE INDEX IF NOT EXISTS idx_asset_edit_asset_id ON asset_edit_entity (asset_id)', - ); - @override - Iterable> get allTables => - allSchemaEntities.whereType>(); - @override - List get allSchemaEntities => [ - userEntity, - remoteAssetEntity, - stackEntity, - localAssetEntity, - remoteAlbumEntity, - localAlbumEntity, - localAlbumAssetEntity, - idxLocalAlbumAssetAlbumAsset, - idxLocalAssetChecksum, - idxLocalAssetCloudId, - idxLocalAssetCreatedAt, - idxStackPrimaryAssetId, - uQRemoteAssetsOwnerChecksum, - uQRemoteAssetsOwnerLibraryChecksum, - idxRemoteAssetChecksum, - idxRemoteAssetStackId, - idxRemoteAssetOwnerVisibilityDeletedCreated, - authUserEntity, - userMetadataEntity, - partnerEntity, - remoteExifEntity, - remoteAlbumAssetEntity, - remoteAlbumUserEntity, - remoteAssetCloudIdEntity, - memoryEntity, - memoryAssetEntity, - personEntity, - assetFaceEntity, - storeEntity, - trashedLocalAssetEntity, - assetEditEntity, - settings, - idxPartnerSharedWithId, - idxLatLng, - idxRemoteExifCity, - idxRemoteAlbumAssetAlbumAsset, - idxRemoteAssetCloudId, - idxPersonOwnerId, - idxAssetFacePersonId, - idxAssetFaceAssetId, - idxAssetFaceVisiblePerson, - idxTrashedLocalAssetChecksum, - idxTrashedLocalAssetAlbum, - idxAssetEditAssetId, - ]; - @override - StreamQueryUpdateRules get streamUpdateRules => const StreamQueryUpdateRules([ - WritePropagation( - on: TableUpdateQuery.onTableName( - 'user_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('remote_asset_entity', kind: UpdateKind.delete)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'user_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('stack_entity', kind: UpdateKind.delete)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'remote_asset_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('remote_album_entity', kind: UpdateKind.update)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'remote_album_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('local_album_entity', kind: UpdateKind.update)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'local_asset_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [ - TableUpdate('local_album_asset_entity', kind: UpdateKind.delete), - ], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'local_album_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [ - TableUpdate('local_album_asset_entity', kind: UpdateKind.delete), - ], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'user_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('user_metadata_entity', kind: UpdateKind.delete)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'user_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('partner_entity', kind: UpdateKind.delete)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'user_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('partner_entity', kind: UpdateKind.delete)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'remote_asset_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('remote_exif_entity', kind: UpdateKind.delete)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'remote_asset_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [ - TableUpdate('remote_album_asset_entity', kind: UpdateKind.delete), - ], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'remote_album_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [ - TableUpdate('remote_album_asset_entity', kind: UpdateKind.delete), - ], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'remote_album_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [ - TableUpdate('remote_album_user_entity', kind: UpdateKind.delete), - ], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'user_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [ - TableUpdate('remote_album_user_entity', kind: UpdateKind.delete), - ], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'remote_asset_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [ - TableUpdate('remote_asset_cloud_id_entity', kind: UpdateKind.delete), - ], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'user_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('memory_entity', kind: UpdateKind.delete)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'remote_asset_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('memory_asset_entity', kind: UpdateKind.delete)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'memory_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('memory_asset_entity', kind: UpdateKind.delete)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'user_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('person_entity', kind: UpdateKind.delete)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'remote_asset_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('asset_face_entity', kind: UpdateKind.delete)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'person_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('asset_face_entity', kind: UpdateKind.update)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'remote_asset_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('asset_edit_entity', kind: UpdateKind.delete)], - ), - ]); - @override - int get schemaVersion => 28; - @override - DriftDatabaseOptions get options => - const DriftDatabaseOptions(storeDateTimeAsText: true); -} diff --git a/mobile/test/drift/main/generated/schema_v29.dart b/mobile/test/drift/main/generated/schema_v29.dart deleted file mode 100644 index ed721e3fe8..0000000000 --- a/mobile/test/drift/main/generated/schema_v29.dart +++ /dev/null @@ -1,10027 +0,0 @@ -// dart format width=80 -import 'dart:typed_data' as i2; -// GENERATED BY drift_dev, DO NOT MODIFY. -// ignore_for_file: type=lint,unused_import -// -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, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn email = GeneratedColumn( - 'email', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn hasProfileImage = GeneratedColumn( - 'has_profile_image', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: - 'NOT NULL DEFAULT 0 CHECK (has_profile_image IN (0, 1))', - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn profileChangedAt = GeneratedColumn( - 'profile_changed_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn avatarColor = GeneratedColumn( - 'avatar_color', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0', - 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.int, - data['${effectivePrefix}has_profile_image'], - )!, - profileChangedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - 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; - @override - List get customConstraints => const ['PRIMARY KEY(id)']; - @override - bool get dontWriteConstraints => true; -} - -class UserEntityData extends DataClass implements Insertable { - final String id; - final String name; - final String email; - final int hasProfileImage; - final String 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, - int? hasProfileImage, - String? 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, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn type = GeneratedColumn( - 'type', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn width = GeneratedColumn( - 'width', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn height = GeneratedColumn( - 'height', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn durationMs = GeneratedColumn( - 'duration_ms', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn checksum = GeneratedColumn( - 'checksum', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn isFavorite = GeneratedColumn( - 'is_favorite', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0 CHECK (is_favorite IN (0, 1))', - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn ownerId = GeneratedColumn( - 'owner_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL REFERENCES user_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn localDateTime = GeneratedColumn( - 'local_date_time', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn thumbHash = GeneratedColumn( - 'thumb_hash', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn deletedAt = GeneratedColumn( - 'deleted_at', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn uploadedAt = GeneratedColumn( - 'uploaded_at', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn livePhotoVideoId = GeneratedColumn( - 'live_photo_video_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn visibility = GeneratedColumn( - 'visibility', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn stackId = GeneratedColumn( - 'stack_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn libraryId = GeneratedColumn( - 'library_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn isEdited = GeneratedColumn( - 'is_edited', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0 CHECK (is_edited IN (0, 1))', - defaultValue: const CustomExpression('0'), - ); - @override - List get $columns => [ - name, - type, - createdAt, - updatedAt, - width, - height, - durationMs, - id, - checksum, - isFavorite, - ownerId, - localDateTime, - thumbHash, - deletedAt, - uploadedAt, - livePhotoVideoId, - visibility, - stackId, - libraryId, - isEdited, - ]; - @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.string, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}updated_at'], - )!, - width: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}width'], - ), - height: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}height'], - ), - durationMs: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}duration_ms'], - ), - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - checksum: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}checksum'], - )!, - isFavorite: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}is_favorite'], - )!, - ownerId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}owner_id'], - )!, - localDateTime: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}local_date_time'], - ), - thumbHash: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}thumb_hash'], - ), - deletedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}deleted_at'], - ), - uploadedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}uploaded_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'], - ), - isEdited: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}is_edited'], - )!, - ); - } - - @override - RemoteAssetEntity createAlias(String alias) { - return RemoteAssetEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY(id)']; - @override - bool get dontWriteConstraints => true; -} - -class RemoteAssetEntityData extends DataClass - implements Insertable { - final String name; - final int type; - final String createdAt; - final String updatedAt; - final int? width; - final int? height; - final int? durationMs; - final String id; - final String checksum; - final int isFavorite; - final String ownerId; - final String? localDateTime; - final String? thumbHash; - final String? deletedAt; - final String? uploadedAt; - final String? livePhotoVideoId; - final int visibility; - final String? stackId; - final String? libraryId; - final int isEdited; - const RemoteAssetEntityData({ - required this.name, - required this.type, - required this.createdAt, - required this.updatedAt, - this.width, - this.height, - this.durationMs, - required this.id, - required this.checksum, - required this.isFavorite, - required this.ownerId, - this.localDateTime, - this.thumbHash, - this.deletedAt, - this.uploadedAt, - this.livePhotoVideoId, - required this.visibility, - this.stackId, - this.libraryId, - required this.isEdited, - }); - @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 || durationMs != null) { - map['duration_ms'] = Variable(durationMs); - } - 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 || uploadedAt != null) { - map['uploaded_at'] = Variable(uploadedAt); - } - 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); - } - map['is_edited'] = Variable(isEdited); - 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']), - durationMs: serializer.fromJson(json['durationMs']), - 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']), - uploadedAt: serializer.fromJson(json['uploadedAt']), - livePhotoVideoId: serializer.fromJson(json['livePhotoVideoId']), - visibility: serializer.fromJson(json['visibility']), - stackId: serializer.fromJson(json['stackId']), - libraryId: serializer.fromJson(json['libraryId']), - isEdited: serializer.fromJson(json['isEdited']), - ); - } - @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), - 'durationMs': serializer.toJson(durationMs), - '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), - 'uploadedAt': serializer.toJson(uploadedAt), - 'livePhotoVideoId': serializer.toJson(livePhotoVideoId), - 'visibility': serializer.toJson(visibility), - 'stackId': serializer.toJson(stackId), - 'libraryId': serializer.toJson(libraryId), - 'isEdited': serializer.toJson(isEdited), - }; - } - - RemoteAssetEntityData copyWith({ - String? name, - int? type, - String? createdAt, - String? updatedAt, - Value width = const Value.absent(), - Value height = const Value.absent(), - Value durationMs = const Value.absent(), - String? id, - String? checksum, - int? isFavorite, - String? ownerId, - Value localDateTime = const Value.absent(), - Value thumbHash = const Value.absent(), - Value deletedAt = const Value.absent(), - Value uploadedAt = const Value.absent(), - Value livePhotoVideoId = const Value.absent(), - int? visibility, - Value stackId = const Value.absent(), - Value libraryId = const Value.absent(), - int? isEdited, - }) => 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, - durationMs: durationMs.present ? durationMs.value : this.durationMs, - 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, - uploadedAt: uploadedAt.present ? uploadedAt.value : this.uploadedAt, - 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, - isEdited: isEdited ?? this.isEdited, - ); - 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, - durationMs: data.durationMs.present - ? data.durationMs.value - : this.durationMs, - 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, - uploadedAt: data.uploadedAt.present - ? data.uploadedAt.value - : this.uploadedAt, - 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, - isEdited: data.isEdited.present ? data.isEdited.value : this.isEdited, - ); - } - - @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('durationMs: $durationMs, ') - ..write('id: $id, ') - ..write('checksum: $checksum, ') - ..write('isFavorite: $isFavorite, ') - ..write('ownerId: $ownerId, ') - ..write('localDateTime: $localDateTime, ') - ..write('thumbHash: $thumbHash, ') - ..write('deletedAt: $deletedAt, ') - ..write('uploadedAt: $uploadedAt, ') - ..write('livePhotoVideoId: $livePhotoVideoId, ') - ..write('visibility: $visibility, ') - ..write('stackId: $stackId, ') - ..write('libraryId: $libraryId, ') - ..write('isEdited: $isEdited') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - name, - type, - createdAt, - updatedAt, - width, - height, - durationMs, - id, - checksum, - isFavorite, - ownerId, - localDateTime, - thumbHash, - deletedAt, - uploadedAt, - livePhotoVideoId, - visibility, - stackId, - libraryId, - isEdited, - ); - @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.durationMs == this.durationMs && - 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.uploadedAt == this.uploadedAt && - other.livePhotoVideoId == this.livePhotoVideoId && - other.visibility == this.visibility && - other.stackId == this.stackId && - other.libraryId == this.libraryId && - other.isEdited == this.isEdited); -} - -class RemoteAssetEntityCompanion - extends UpdateCompanion { - final Value name; - final Value type; - final Value createdAt; - final Value updatedAt; - final Value width; - final Value height; - final Value durationMs; - final Value id; - final Value checksum; - final Value isFavorite; - final Value ownerId; - final Value localDateTime; - final Value thumbHash; - final Value deletedAt; - final Value uploadedAt; - final Value livePhotoVideoId; - final Value visibility; - final Value stackId; - final Value libraryId; - final Value isEdited; - 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.durationMs = 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.uploadedAt = const Value.absent(), - this.livePhotoVideoId = const Value.absent(), - this.visibility = const Value.absent(), - this.stackId = const Value.absent(), - this.libraryId = const Value.absent(), - this.isEdited = 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.durationMs = 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.uploadedAt = const Value.absent(), - this.livePhotoVideoId = const Value.absent(), - required int visibility, - this.stackId = const Value.absent(), - this.libraryId = const Value.absent(), - this.isEdited = 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? durationMs, - Expression? id, - Expression? checksum, - Expression? isFavorite, - Expression? ownerId, - Expression? localDateTime, - Expression? thumbHash, - Expression? deletedAt, - Expression? uploadedAt, - Expression? livePhotoVideoId, - Expression? visibility, - Expression? stackId, - Expression? libraryId, - Expression? isEdited, - }) { - 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 (durationMs != null) 'duration_ms': durationMs, - 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 (uploadedAt != null) 'uploaded_at': uploadedAt, - 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, - if (isEdited != null) 'is_edited': isEdited, - }); - } - - RemoteAssetEntityCompanion copyWith({ - Value? name, - Value? type, - Value? createdAt, - Value? updatedAt, - Value? width, - Value? height, - Value? durationMs, - Value? id, - Value? checksum, - Value? isFavorite, - Value? ownerId, - Value? localDateTime, - Value? thumbHash, - Value? deletedAt, - Value? uploadedAt, - Value? livePhotoVideoId, - Value? visibility, - Value? stackId, - Value? libraryId, - Value? isEdited, - }) { - 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, - durationMs: durationMs ?? this.durationMs, - 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, - uploadedAt: uploadedAt ?? this.uploadedAt, - livePhotoVideoId: livePhotoVideoId ?? this.livePhotoVideoId, - visibility: visibility ?? this.visibility, - stackId: stackId ?? this.stackId, - libraryId: libraryId ?? this.libraryId, - isEdited: isEdited ?? this.isEdited, - ); - } - - @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 (durationMs.present) { - map['duration_ms'] = Variable(durationMs.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 (uploadedAt.present) { - map['uploaded_at'] = Variable(uploadedAt.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); - } - if (isEdited.present) { - map['is_edited'] = Variable(isEdited.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('durationMs: $durationMs, ') - ..write('id: $id, ') - ..write('checksum: $checksum, ') - ..write('isFavorite: $isFavorite, ') - ..write('ownerId: $ownerId, ') - ..write('localDateTime: $localDateTime, ') - ..write('thumbHash: $thumbHash, ') - ..write('deletedAt: $deletedAt, ') - ..write('uploadedAt: $uploadedAt, ') - ..write('livePhotoVideoId: $livePhotoVideoId, ') - ..write('visibility: $visibility, ') - ..write('stackId: $stackId, ') - ..write('libraryId: $libraryId, ') - ..write('isEdited: $isEdited') - ..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, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn ownerId = GeneratedColumn( - 'owner_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL REFERENCES user_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn primaryAssetId = GeneratedColumn( - 'primary_asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - @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.string, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - 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; - @override - List get customConstraints => const ['PRIMARY KEY(id)']; - @override - bool get dontWriteConstraints => true; -} - -class StackEntityData extends DataClass implements Insertable { - final String id; - final String createdAt; - final String 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, - String? createdAt, - String? 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, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn type = GeneratedColumn( - 'type', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn width = GeneratedColumn( - 'width', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn height = GeneratedColumn( - 'height', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn durationMs = GeneratedColumn( - 'duration_ms', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn checksum = GeneratedColumn( - 'checksum', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn isFavorite = GeneratedColumn( - 'is_favorite', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0 CHECK (is_favorite IN (0, 1))', - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn orientation = GeneratedColumn( - 'orientation', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0', - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn iCloudId = GeneratedColumn( - 'i_cloud_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn adjustmentTime = GeneratedColumn( - 'adjustment_time', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn latitude = GeneratedColumn( - 'latitude', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn longitude = GeneratedColumn( - 'longitude', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn playbackStyle = GeneratedColumn( - 'playback_style', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0', - defaultValue: const CustomExpression('0'), - ); - @override - List get $columns => [ - name, - type, - createdAt, - updatedAt, - width, - height, - durationMs, - id, - checksum, - isFavorite, - orientation, - iCloudId, - adjustmentTime, - latitude, - longitude, - playbackStyle, - ]; - @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.string, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}updated_at'], - )!, - width: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}width'], - ), - height: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}height'], - ), - durationMs: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}duration_ms'], - ), - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - checksum: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}checksum'], - ), - isFavorite: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}is_favorite'], - )!, - orientation: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}orientation'], - )!, - iCloudId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}i_cloud_id'], - ), - adjustmentTime: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}adjustment_time'], - ), - latitude: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}latitude'], - ), - longitude: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}longitude'], - ), - playbackStyle: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}playback_style'], - )!, - ); - } - - @override - LocalAssetEntity createAlias(String alias) { - return LocalAssetEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY(id)']; - @override - bool get dontWriteConstraints => true; -} - -class LocalAssetEntityData extends DataClass - implements Insertable { - final String name; - final int type; - final String createdAt; - final String updatedAt; - final int? width; - final int? height; - final int? durationMs; - final String id; - final String? checksum; - final int isFavorite; - final int orientation; - final String? iCloudId; - final String? adjustmentTime; - final double? latitude; - final double? longitude; - final int playbackStyle; - const LocalAssetEntityData({ - required this.name, - required this.type, - required this.createdAt, - required this.updatedAt, - this.width, - this.height, - this.durationMs, - required this.id, - this.checksum, - required this.isFavorite, - required this.orientation, - this.iCloudId, - this.adjustmentTime, - this.latitude, - this.longitude, - required this.playbackStyle, - }); - @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 || durationMs != null) { - map['duration_ms'] = Variable(durationMs); - } - map['id'] = Variable(id); - if (!nullToAbsent || checksum != null) { - map['checksum'] = Variable(checksum); - } - map['is_favorite'] = Variable(isFavorite); - map['orientation'] = Variable(orientation); - if (!nullToAbsent || iCloudId != null) { - map['i_cloud_id'] = Variable(iCloudId); - } - if (!nullToAbsent || adjustmentTime != null) { - map['adjustment_time'] = Variable(adjustmentTime); - } - if (!nullToAbsent || latitude != null) { - map['latitude'] = Variable(latitude); - } - if (!nullToAbsent || longitude != null) { - map['longitude'] = Variable(longitude); - } - map['playback_style'] = Variable(playbackStyle); - 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']), - durationMs: serializer.fromJson(json['durationMs']), - id: serializer.fromJson(json['id']), - checksum: serializer.fromJson(json['checksum']), - isFavorite: serializer.fromJson(json['isFavorite']), - orientation: serializer.fromJson(json['orientation']), - iCloudId: serializer.fromJson(json['iCloudId']), - adjustmentTime: serializer.fromJson(json['adjustmentTime']), - latitude: serializer.fromJson(json['latitude']), - longitude: serializer.fromJson(json['longitude']), - playbackStyle: serializer.fromJson(json['playbackStyle']), - ); - } - @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), - 'durationMs': serializer.toJson(durationMs), - 'id': serializer.toJson(id), - 'checksum': serializer.toJson(checksum), - 'isFavorite': serializer.toJson(isFavorite), - 'orientation': serializer.toJson(orientation), - 'iCloudId': serializer.toJson(iCloudId), - 'adjustmentTime': serializer.toJson(adjustmentTime), - 'latitude': serializer.toJson(latitude), - 'longitude': serializer.toJson(longitude), - 'playbackStyle': serializer.toJson(playbackStyle), - }; - } - - LocalAssetEntityData copyWith({ - String? name, - int? type, - String? createdAt, - String? updatedAt, - Value width = const Value.absent(), - Value height = const Value.absent(), - Value durationMs = const Value.absent(), - String? id, - Value checksum = const Value.absent(), - int? isFavorite, - int? orientation, - Value iCloudId = const Value.absent(), - Value adjustmentTime = const Value.absent(), - Value latitude = const Value.absent(), - Value longitude = const Value.absent(), - int? playbackStyle, - }) => 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, - durationMs: durationMs.present ? durationMs.value : this.durationMs, - id: id ?? this.id, - checksum: checksum.present ? checksum.value : this.checksum, - isFavorite: isFavorite ?? this.isFavorite, - orientation: orientation ?? this.orientation, - iCloudId: iCloudId.present ? iCloudId.value : this.iCloudId, - adjustmentTime: adjustmentTime.present - ? adjustmentTime.value - : this.adjustmentTime, - latitude: latitude.present ? latitude.value : this.latitude, - longitude: longitude.present ? longitude.value : this.longitude, - playbackStyle: playbackStyle ?? this.playbackStyle, - ); - 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, - durationMs: data.durationMs.present - ? data.durationMs.value - : this.durationMs, - 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, - iCloudId: data.iCloudId.present ? data.iCloudId.value : this.iCloudId, - adjustmentTime: data.adjustmentTime.present - ? data.adjustmentTime.value - : this.adjustmentTime, - latitude: data.latitude.present ? data.latitude.value : this.latitude, - longitude: data.longitude.present ? data.longitude.value : this.longitude, - playbackStyle: data.playbackStyle.present - ? data.playbackStyle.value - : this.playbackStyle, - ); - } - - @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('durationMs: $durationMs, ') - ..write('id: $id, ') - ..write('checksum: $checksum, ') - ..write('isFavorite: $isFavorite, ') - ..write('orientation: $orientation, ') - ..write('iCloudId: $iCloudId, ') - ..write('adjustmentTime: $adjustmentTime, ') - ..write('latitude: $latitude, ') - ..write('longitude: $longitude, ') - ..write('playbackStyle: $playbackStyle') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - name, - type, - createdAt, - updatedAt, - width, - height, - durationMs, - id, - checksum, - isFavorite, - orientation, - iCloudId, - adjustmentTime, - latitude, - longitude, - playbackStyle, - ); - @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.durationMs == this.durationMs && - other.id == this.id && - other.checksum == this.checksum && - other.isFavorite == this.isFavorite && - other.orientation == this.orientation && - other.iCloudId == this.iCloudId && - other.adjustmentTime == this.adjustmentTime && - other.latitude == this.latitude && - other.longitude == this.longitude && - other.playbackStyle == this.playbackStyle); -} - -class LocalAssetEntityCompanion extends UpdateCompanion { - final Value name; - final Value type; - final Value createdAt; - final Value updatedAt; - final Value width; - final Value height; - final Value durationMs; - final Value id; - final Value checksum; - final Value isFavorite; - final Value orientation; - final Value iCloudId; - final Value adjustmentTime; - final Value latitude; - final Value longitude; - final Value playbackStyle; - 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.durationMs = const Value.absent(), - this.id = const Value.absent(), - this.checksum = const Value.absent(), - this.isFavorite = const Value.absent(), - this.orientation = const Value.absent(), - this.iCloudId = const Value.absent(), - this.adjustmentTime = const Value.absent(), - this.latitude = const Value.absent(), - this.longitude = const Value.absent(), - this.playbackStyle = 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.durationMs = const Value.absent(), - required String id, - this.checksum = const Value.absent(), - this.isFavorite = const Value.absent(), - this.orientation = const Value.absent(), - this.iCloudId = const Value.absent(), - this.adjustmentTime = const Value.absent(), - this.latitude = const Value.absent(), - this.longitude = const Value.absent(), - this.playbackStyle = 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? durationMs, - Expression? id, - Expression? checksum, - Expression? isFavorite, - Expression? orientation, - Expression? iCloudId, - Expression? adjustmentTime, - Expression? latitude, - Expression? longitude, - Expression? playbackStyle, - }) { - 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 (durationMs != null) 'duration_ms': durationMs, - if (id != null) 'id': id, - if (checksum != null) 'checksum': checksum, - if (isFavorite != null) 'is_favorite': isFavorite, - if (orientation != null) 'orientation': orientation, - if (iCloudId != null) 'i_cloud_id': iCloudId, - if (adjustmentTime != null) 'adjustment_time': adjustmentTime, - if (latitude != null) 'latitude': latitude, - if (longitude != null) 'longitude': longitude, - if (playbackStyle != null) 'playback_style': playbackStyle, - }); - } - - LocalAssetEntityCompanion copyWith({ - Value? name, - Value? type, - Value? createdAt, - Value? updatedAt, - Value? width, - Value? height, - Value? durationMs, - Value? id, - Value? checksum, - Value? isFavorite, - Value? orientation, - Value? iCloudId, - Value? adjustmentTime, - Value? latitude, - Value? longitude, - Value? playbackStyle, - }) { - 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, - durationMs: durationMs ?? this.durationMs, - id: id ?? this.id, - checksum: checksum ?? this.checksum, - isFavorite: isFavorite ?? this.isFavorite, - orientation: orientation ?? this.orientation, - iCloudId: iCloudId ?? this.iCloudId, - adjustmentTime: adjustmentTime ?? this.adjustmentTime, - latitude: latitude ?? this.latitude, - longitude: longitude ?? this.longitude, - playbackStyle: playbackStyle ?? this.playbackStyle, - ); - } - - @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 (durationMs.present) { - map['duration_ms'] = Variable(durationMs.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); - } - if (iCloudId.present) { - map['i_cloud_id'] = Variable(iCloudId.value); - } - if (adjustmentTime.present) { - map['adjustment_time'] = Variable(adjustmentTime.value); - } - if (latitude.present) { - map['latitude'] = Variable(latitude.value); - } - if (longitude.present) { - map['longitude'] = Variable(longitude.value); - } - if (playbackStyle.present) { - map['playback_style'] = Variable(playbackStyle.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('durationMs: $durationMs, ') - ..write('id: $id, ') - ..write('checksum: $checksum, ') - ..write('isFavorite: $isFavorite, ') - ..write('orientation: $orientation, ') - ..write('iCloudId: $iCloudId, ') - ..write('adjustmentTime: $adjustmentTime, ') - ..write('latitude: $latitude, ') - ..write('longitude: $longitude, ') - ..write('playbackStyle: $playbackStyle') - ..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, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn description = GeneratedColumn( - 'description', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT \'\'', - defaultValue: const CustomExpression('\'\''), - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn thumbnailAssetId = GeneratedColumn( - 'thumbnail_asset_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: - 'NULL REFERENCES remote_asset_entity(id)ON DELETE SET NULL', - ); - late final GeneratedColumn isActivityEnabled = GeneratedColumn( - 'is_activity_enabled', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: - 'NOT NULL DEFAULT 1 CHECK (is_activity_enabled IN (0, 1))', - defaultValue: const CustomExpression('1'), - ); - late final GeneratedColumn order = GeneratedColumn( - 'order', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - @override - List get $columns => [ - id, - name, - description, - createdAt, - updatedAt, - 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.string, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}updated_at'], - )!, - thumbnailAssetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}thumbnail_asset_id'], - ), - isActivityEnabled: attachedDatabase.typeMapping.read( - DriftSqlType.int, - 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; - @override - List get customConstraints => const ['PRIMARY KEY(id)']; - @override - bool get dontWriteConstraints => true; -} - -class RemoteAlbumEntityData extends DataClass - implements Insertable { - final String id; - final String name; - final String description; - final String createdAt; - final String updatedAt; - final String? thumbnailAssetId; - final int isActivityEnabled; - final int order; - const RemoteAlbumEntityData({ - required this.id, - required this.name, - required this.description, - required this.createdAt, - required this.updatedAt, - 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); - 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']), - 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), - 'thumbnailAssetId': serializer.toJson(thumbnailAssetId), - 'isActivityEnabled': serializer.toJson(isActivityEnabled), - 'order': serializer.toJson(order), - }; - } - - RemoteAlbumEntityData copyWith({ - String? id, - String? name, - String? description, - String? createdAt, - String? updatedAt, - Value thumbnailAssetId = const Value.absent(), - int? isActivityEnabled, - int? order, - }) => RemoteAlbumEntityData( - id: id ?? this.id, - name: name ?? this.name, - description: description ?? this.description, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - 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, - 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('thumbnailAssetId: $thumbnailAssetId, ') - ..write('isActivityEnabled: $isActivityEnabled, ') - ..write('order: $order') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - name, - description, - createdAt, - updatedAt, - 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.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 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.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(), - this.thumbnailAssetId = const Value.absent(), - this.isActivityEnabled = const Value.absent(), - required int order, - }) : id = Value(id), - name = Value(name), - order = Value(order); - static Insertable custom({ - Expression? id, - Expression? name, - Expression? description, - Expression? createdAt, - Expression? updatedAt, - 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 (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? 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, - 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 (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('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, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn backupSelection = GeneratedColumn( - 'backup_selection', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn isIosSharedAlbum = GeneratedColumn( - 'is_ios_shared_album', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: - 'NOT NULL DEFAULT 0 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, - $customConstraints: - 'NULL REFERENCES remote_album_entity(id)ON DELETE SET NULL', - ); - late final GeneratedColumn marker = GeneratedColumn( - 'marker', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL 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.string, - data['${effectivePrefix}updated_at'], - )!, - backupSelection: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}backup_selection'], - )!, - isIosSharedAlbum: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}is_ios_shared_album'], - )!, - linkedRemoteAlbumId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}linked_remote_album_id'], - ), - marker: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}marker'], - ), - ); - } - - @override - LocalAlbumEntity createAlias(String alias) { - return LocalAlbumEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY(id)']; - @override - bool get dontWriteConstraints => true; -} - -class LocalAlbumEntityData extends DataClass - implements Insertable { - final String id; - final String name; - final String updatedAt; - final int backupSelection; - final int isIosSharedAlbum; - final String? linkedRemoteAlbumId; - final int? 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, - String? updatedAt, - int? backupSelection, - int? 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, - $customConstraints: - 'NOT NULL REFERENCES local_asset_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn albumId = GeneratedColumn( - 'album_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: - 'NOT NULL REFERENCES local_album_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn marker = GeneratedColumn( - 'marker', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL 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.int, - data['${effectivePrefix}marker'], - ), - ); - } - - @override - LocalAlbumAssetEntity createAlias(String alias) { - return LocalAlbumAssetEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const [ - 'PRIMARY KEY(asset_id, album_id)', - ]; - @override - bool get dontWriteConstraints => true; -} - -class LocalAlbumAssetEntityData extends DataClass - implements Insertable { - final String assetId; - final String albumId; - final int? 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, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn email = GeneratedColumn( - 'email', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn isAdmin = GeneratedColumn( - 'is_admin', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0 CHECK (is_admin IN (0, 1))', - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn hasProfileImage = GeneratedColumn( - 'has_profile_image', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: - 'NOT NULL DEFAULT 0 CHECK (has_profile_image IN (0, 1))', - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn profileChangedAt = GeneratedColumn( - 'profile_changed_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn avatarColor = GeneratedColumn( - 'avatar_color', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn quotaSizeInBytes = GeneratedColumn( - 'quota_size_in_bytes', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0', - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn quotaUsageInBytes = GeneratedColumn( - 'quota_usage_in_bytes', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0', - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn pinCode = GeneratedColumn( - 'pin_code', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - @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.int, - data['${effectivePrefix}is_admin'], - )!, - hasProfileImage: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}has_profile_image'], - )!, - profileChangedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - 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; - @override - List get customConstraints => const ['PRIMARY KEY(id)']; - @override - bool get dontWriteConstraints => true; -} - -class AuthUserEntityData extends DataClass - implements Insertable { - final String id; - final String name; - final String email; - final int isAdmin; - final int hasProfileImage; - final String 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, - int? isAdmin, - int? hasProfileImage, - String? 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, - $customConstraints: 'NOT NULL REFERENCES user_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn key = GeneratedColumn( - 'key', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn value = - GeneratedColumn( - 'value', - aliasedName, - false, - type: DriftSqlType.blob, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - @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; - @override - List get customConstraints => const ['PRIMARY KEY(user_id, "key")']; - @override - bool get dontWriteConstraints => true; -} - -class UserMetadataEntityData extends DataClass - implements Insertable { - final String userId; - final int key; - final i2.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, - i2.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 i2.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, - $customConstraints: 'NOT NULL REFERENCES user_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn sharedWithId = GeneratedColumn( - 'shared_with_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL REFERENCES user_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn inTimeline = GeneratedColumn( - 'in_timeline', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0 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.int, - data['${effectivePrefix}in_timeline'], - )!, - ); - } - - @override - PartnerEntity createAlias(String alias) { - return PartnerEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const [ - 'PRIMARY KEY(shared_by_id, shared_with_id)', - ]; - @override - bool get dontWriteConstraints => true; -} - -class PartnerEntityData extends DataClass - implements Insertable { - final String sharedById; - final String sharedWithId; - final int 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, - int? 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, - $customConstraints: - 'NOT NULL REFERENCES remote_asset_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn city = GeneratedColumn( - 'city', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn state = GeneratedColumn( - 'state', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn country = GeneratedColumn( - 'country', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn dateTimeOriginal = GeneratedColumn( - 'date_time_original', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn description = GeneratedColumn( - 'description', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn height = GeneratedColumn( - 'height', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn width = GeneratedColumn( - 'width', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn exposureTime = GeneratedColumn( - 'exposure_time', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn fNumber = GeneratedColumn( - 'f_number', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn fileSize = GeneratedColumn( - 'file_size', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn focalLength = GeneratedColumn( - 'focal_length', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn latitude = GeneratedColumn( - 'latitude', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn longitude = GeneratedColumn( - 'longitude', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn iso = GeneratedColumn( - 'iso', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn make = GeneratedColumn( - 'make', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn model = GeneratedColumn( - 'model', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn lens = GeneratedColumn( - 'lens', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn orientation = GeneratedColumn( - 'orientation', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn timeZone = GeneratedColumn( - 'time_zone', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn rating = GeneratedColumn( - 'rating', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn projectionType = GeneratedColumn( - 'projection_type', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - @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.string, - 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; - @override - List get customConstraints => const ['PRIMARY KEY(asset_id)']; - @override - bool get dontWriteConstraints => true; -} - -class RemoteExifEntityData extends DataClass - implements Insertable { - final String assetId; - final String? city; - final String? state; - final String? country; - final String? 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, - $customConstraints: - 'NOT NULL REFERENCES remote_asset_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn albumId = GeneratedColumn( - 'album_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: - 'NOT NULL 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; - @override - List get customConstraints => const [ - 'PRIMARY KEY(asset_id, album_id)', - ]; - @override - bool get dontWriteConstraints => 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, - $customConstraints: - 'NOT NULL REFERENCES remote_album_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn userId = GeneratedColumn( - 'user_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL REFERENCES user_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn role = GeneratedColumn( - 'role', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - @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; - @override - List get customConstraints => const [ - 'PRIMARY KEY(album_id, user_id)', - ]; - @override - bool get dontWriteConstraints => 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 RemoteAssetCloudIdEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - RemoteAssetCloudIdEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn assetId = GeneratedColumn( - 'asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: - 'NOT NULL REFERENCES remote_asset_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn cloudId = GeneratedColumn( - 'cloud_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn adjustmentTime = GeneratedColumn( - 'adjustment_time', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn latitude = GeneratedColumn( - 'latitude', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn longitude = GeneratedColumn( - 'longitude', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - @override - List get $columns => [ - assetId, - cloudId, - createdAt, - adjustmentTime, - latitude, - longitude, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'remote_asset_cloud_id_entity'; - @override - Set get $primaryKey => {assetId}; - @override - RemoteAssetCloudIdEntityData map( - Map data, { - String? tablePrefix, - }) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return RemoteAssetCloudIdEntityData( - assetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}asset_id'], - )!, - cloudId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}cloud_id'], - ), - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}created_at'], - ), - adjustmentTime: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}adjustment_time'], - ), - latitude: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}latitude'], - ), - longitude: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}longitude'], - ), - ); - } - - @override - RemoteAssetCloudIdEntity createAlias(String alias) { - return RemoteAssetCloudIdEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY(asset_id)']; - @override - bool get dontWriteConstraints => true; -} - -class RemoteAssetCloudIdEntityData extends DataClass - implements Insertable { - final String assetId; - final String? cloudId; - final String? createdAt; - final String? adjustmentTime; - final double? latitude; - final double? longitude; - const RemoteAssetCloudIdEntityData({ - required this.assetId, - this.cloudId, - this.createdAt, - this.adjustmentTime, - this.latitude, - this.longitude, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['asset_id'] = Variable(assetId); - if (!nullToAbsent || cloudId != null) { - map['cloud_id'] = Variable(cloudId); - } - if (!nullToAbsent || createdAt != null) { - map['created_at'] = Variable(createdAt); - } - if (!nullToAbsent || adjustmentTime != null) { - map['adjustment_time'] = Variable(adjustmentTime); - } - if (!nullToAbsent || latitude != null) { - map['latitude'] = Variable(latitude); - } - if (!nullToAbsent || longitude != null) { - map['longitude'] = Variable(longitude); - } - return map; - } - - factory RemoteAssetCloudIdEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return RemoteAssetCloudIdEntityData( - assetId: serializer.fromJson(json['assetId']), - cloudId: serializer.fromJson(json['cloudId']), - createdAt: serializer.fromJson(json['createdAt']), - adjustmentTime: serializer.fromJson(json['adjustmentTime']), - latitude: serializer.fromJson(json['latitude']), - longitude: serializer.fromJson(json['longitude']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'assetId': serializer.toJson(assetId), - 'cloudId': serializer.toJson(cloudId), - 'createdAt': serializer.toJson(createdAt), - 'adjustmentTime': serializer.toJson(adjustmentTime), - 'latitude': serializer.toJson(latitude), - 'longitude': serializer.toJson(longitude), - }; - } - - RemoteAssetCloudIdEntityData copyWith({ - String? assetId, - Value cloudId = const Value.absent(), - Value createdAt = const Value.absent(), - Value adjustmentTime = const Value.absent(), - Value latitude = const Value.absent(), - Value longitude = const Value.absent(), - }) => RemoteAssetCloudIdEntityData( - assetId: assetId ?? this.assetId, - cloudId: cloudId.present ? cloudId.value : this.cloudId, - createdAt: createdAt.present ? createdAt.value : this.createdAt, - adjustmentTime: adjustmentTime.present - ? adjustmentTime.value - : this.adjustmentTime, - latitude: latitude.present ? latitude.value : this.latitude, - longitude: longitude.present ? longitude.value : this.longitude, - ); - RemoteAssetCloudIdEntityData copyWithCompanion( - RemoteAssetCloudIdEntityCompanion data, - ) { - return RemoteAssetCloudIdEntityData( - assetId: data.assetId.present ? data.assetId.value : this.assetId, - cloudId: data.cloudId.present ? data.cloudId.value : this.cloudId, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - adjustmentTime: data.adjustmentTime.present - ? data.adjustmentTime.value - : this.adjustmentTime, - latitude: data.latitude.present ? data.latitude.value : this.latitude, - longitude: data.longitude.present ? data.longitude.value : this.longitude, - ); - } - - @override - String toString() { - return (StringBuffer('RemoteAssetCloudIdEntityData(') - ..write('assetId: $assetId, ') - ..write('cloudId: $cloudId, ') - ..write('createdAt: $createdAt, ') - ..write('adjustmentTime: $adjustmentTime, ') - ..write('latitude: $latitude, ') - ..write('longitude: $longitude') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - assetId, - cloudId, - createdAt, - adjustmentTime, - latitude, - longitude, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is RemoteAssetCloudIdEntityData && - other.assetId == this.assetId && - other.cloudId == this.cloudId && - other.createdAt == this.createdAt && - other.adjustmentTime == this.adjustmentTime && - other.latitude == this.latitude && - other.longitude == this.longitude); -} - -class RemoteAssetCloudIdEntityCompanion - extends UpdateCompanion { - final Value assetId; - final Value cloudId; - final Value createdAt; - final Value adjustmentTime; - final Value latitude; - final Value longitude; - const RemoteAssetCloudIdEntityCompanion({ - this.assetId = const Value.absent(), - this.cloudId = const Value.absent(), - this.createdAt = const Value.absent(), - this.adjustmentTime = const Value.absent(), - this.latitude = const Value.absent(), - this.longitude = const Value.absent(), - }); - RemoteAssetCloudIdEntityCompanion.insert({ - required String assetId, - this.cloudId = const Value.absent(), - this.createdAt = const Value.absent(), - this.adjustmentTime = const Value.absent(), - this.latitude = const Value.absent(), - this.longitude = const Value.absent(), - }) : assetId = Value(assetId); - static Insertable custom({ - Expression? assetId, - Expression? cloudId, - Expression? createdAt, - Expression? adjustmentTime, - Expression? latitude, - Expression? longitude, - }) { - return RawValuesInsertable({ - if (assetId != null) 'asset_id': assetId, - if (cloudId != null) 'cloud_id': cloudId, - if (createdAt != null) 'created_at': createdAt, - if (adjustmentTime != null) 'adjustment_time': adjustmentTime, - if (latitude != null) 'latitude': latitude, - if (longitude != null) 'longitude': longitude, - }); - } - - RemoteAssetCloudIdEntityCompanion copyWith({ - Value? assetId, - Value? cloudId, - Value? createdAt, - Value? adjustmentTime, - Value? latitude, - Value? longitude, - }) { - return RemoteAssetCloudIdEntityCompanion( - assetId: assetId ?? this.assetId, - cloudId: cloudId ?? this.cloudId, - createdAt: createdAt ?? this.createdAt, - adjustmentTime: adjustmentTime ?? this.adjustmentTime, - latitude: latitude ?? this.latitude, - longitude: longitude ?? this.longitude, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (assetId.present) { - map['asset_id'] = Variable(assetId.value); - } - if (cloudId.present) { - map['cloud_id'] = Variable(cloudId.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (adjustmentTime.present) { - map['adjustment_time'] = Variable(adjustmentTime.value); - } - if (latitude.present) { - map['latitude'] = Variable(latitude.value); - } - if (longitude.present) { - map['longitude'] = Variable(longitude.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('RemoteAssetCloudIdEntityCompanion(') - ..write('assetId: $assetId, ') - ..write('cloudId: $cloudId, ') - ..write('createdAt: $createdAt, ') - ..write('adjustmentTime: $adjustmentTime, ') - ..write('latitude: $latitude, ') - ..write('longitude: $longitude') - ..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, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn deletedAt = GeneratedColumn( - 'deleted_at', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn ownerId = GeneratedColumn( - 'owner_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL REFERENCES user_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn type = GeneratedColumn( - 'type', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn data = GeneratedColumn( - 'data', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn isSaved = GeneratedColumn( - 'is_saved', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0 CHECK (is_saved IN (0, 1))', - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn memoryAt = GeneratedColumn( - 'memory_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn seenAt = GeneratedColumn( - 'seen_at', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn showAt = GeneratedColumn( - 'show_at', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn hideAt = GeneratedColumn( - 'hide_at', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - @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.string, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}updated_at'], - )!, - deletedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - 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.int, - data['${effectivePrefix}is_saved'], - )!, - memoryAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}memory_at'], - )!, - seenAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}seen_at'], - ), - showAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}show_at'], - ), - hideAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}hide_at'], - ), - ); - } - - @override - MemoryEntity createAlias(String alias) { - return MemoryEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY(id)']; - @override - bool get dontWriteConstraints => true; -} - -class MemoryEntityData extends DataClass - implements Insertable { - final String id; - final String createdAt; - final String updatedAt; - final String? deletedAt; - final String ownerId; - final int type; - final String data; - final int isSaved; - final String memoryAt; - final String? seenAt; - final String? showAt; - final String? 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, - String? createdAt, - String? updatedAt, - Value deletedAt = const Value.absent(), - String? ownerId, - int? type, - String? data, - int? isSaved, - String? 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 String 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, - $customConstraints: - 'NOT NULL REFERENCES remote_asset_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn memoryId = GeneratedColumn( - 'memory_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: - 'NOT NULL 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; - @override - List get customConstraints => const [ - 'PRIMARY KEY(asset_id, memory_id)', - ]; - @override - bool get dontWriteConstraints => 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, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn ownerId = GeneratedColumn( - 'owner_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL REFERENCES user_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn faceAssetId = GeneratedColumn( - 'face_asset_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn isFavorite = GeneratedColumn( - 'is_favorite', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL CHECK (is_favorite IN (0, 1))', - ); - late final GeneratedColumn isHidden = GeneratedColumn( - 'is_hidden', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL CHECK (is_hidden IN (0, 1))', - ); - late final GeneratedColumn color = GeneratedColumn( - 'color', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn birthDate = GeneratedColumn( - 'birth_date', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - @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.string, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - 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.int, - data['${effectivePrefix}is_favorite'], - )!, - isHidden: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}is_hidden'], - )!, - color: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}color'], - ), - birthDate: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}birth_date'], - ), - ); - } - - @override - PersonEntity createAlias(String alias) { - return PersonEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY(id)']; - @override - bool get dontWriteConstraints => true; -} - -class PersonEntityData extends DataClass - implements Insertable { - final String id; - final String createdAt; - final String updatedAt; - final String ownerId; - final String name; - final String? faceAssetId; - final int isFavorite; - final int isHidden; - final String? color; - final String? 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, - String? createdAt, - String? updatedAt, - String? ownerId, - String? name, - Value faceAssetId = const Value.absent(), - int? isFavorite, - int? 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 int isFavorite, - required int 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, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn assetId = GeneratedColumn( - 'asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: - 'NOT NULL REFERENCES remote_asset_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn personId = GeneratedColumn( - 'person_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL REFERENCES person_entity(id)ON DELETE SET NULL', - ); - late final GeneratedColumn imageWidth = GeneratedColumn( - 'image_width', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn imageHeight = GeneratedColumn( - 'image_height', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn boundingBoxX1 = GeneratedColumn( - 'bounding_box_x1', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn boundingBoxY1 = GeneratedColumn( - 'bounding_box_y1', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn boundingBoxX2 = GeneratedColumn( - 'bounding_box_x2', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn boundingBoxY2 = GeneratedColumn( - 'bounding_box_y2', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn sourceType = GeneratedColumn( - 'source_type', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn isVisible = GeneratedColumn( - 'is_visible', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 1 CHECK (is_visible IN (0, 1))', - defaultValue: const CustomExpression('1'), - ); - late final GeneratedColumn deletedAt = GeneratedColumn( - 'deleted_at', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - @override - List get $columns => [ - id, - assetId, - personId, - imageWidth, - imageHeight, - boundingBoxX1, - boundingBoxY1, - boundingBoxX2, - boundingBoxY2, - sourceType, - isVisible, - deletedAt, - ]; - @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'], - )!, - isVisible: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}is_visible'], - )!, - deletedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}deleted_at'], - ), - ); - } - - @override - AssetFaceEntity createAlias(String alias) { - return AssetFaceEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY(id)']; - @override - bool get dontWriteConstraints => 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; - final int isVisible; - final String? deletedAt; - 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, - required this.isVisible, - this.deletedAt, - }); - @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); - map['is_visible'] = Variable(isVisible); - if (!nullToAbsent || deletedAt != null) { - map['deleted_at'] = Variable(deletedAt); - } - 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']), - isVisible: serializer.fromJson(json['isVisible']), - deletedAt: serializer.fromJson(json['deletedAt']), - ); - } - @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), - 'isVisible': serializer.toJson(isVisible), - 'deletedAt': serializer.toJson(deletedAt), - }; - } - - 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, - int? isVisible, - Value deletedAt = const Value.absent(), - }) => 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, - isVisible: isVisible ?? this.isVisible, - deletedAt: deletedAt.present ? deletedAt.value : this.deletedAt, - ); - 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, - isVisible: data.isVisible.present ? data.isVisible.value : this.isVisible, - deletedAt: data.deletedAt.present ? data.deletedAt.value : this.deletedAt, - ); - } - - @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('isVisible: $isVisible, ') - ..write('deletedAt: $deletedAt') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - assetId, - personId, - imageWidth, - imageHeight, - boundingBoxX1, - boundingBoxY1, - boundingBoxX2, - boundingBoxY2, - sourceType, - isVisible, - deletedAt, - ); - @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 && - other.isVisible == this.isVisible && - other.deletedAt == this.deletedAt); -} - -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; - final Value isVisible; - final Value deletedAt; - 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(), - this.isVisible = const Value.absent(), - this.deletedAt = 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, - this.isVisible = const Value.absent(), - this.deletedAt = const Value.absent(), - }) : 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, - Expression? isVisible, - Expression? deletedAt, - }) { - 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, - if (isVisible != null) 'is_visible': isVisible, - if (deletedAt != null) 'deleted_at': deletedAt, - }); - } - - AssetFaceEntityCompanion copyWith({ - Value? id, - Value? assetId, - Value? personId, - Value? imageWidth, - Value? imageHeight, - Value? boundingBoxX1, - Value? boundingBoxY1, - Value? boundingBoxX2, - Value? boundingBoxY2, - Value? sourceType, - Value? isVisible, - Value? deletedAt, - }) { - 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, - isVisible: isVisible ?? this.isVisible, - deletedAt: deletedAt ?? this.deletedAt, - ); - } - - @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); - } - if (isVisible.present) { - map['is_visible'] = Variable(isVisible.value); - } - if (deletedAt.present) { - map['deleted_at'] = Variable(deletedAt.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('isVisible: $isVisible, ') - ..write('deletedAt: $deletedAt') - ..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, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn stringValue = GeneratedColumn( - 'string_value', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn intValue = GeneratedColumn( - 'int_value', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - @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; - @override - List get customConstraints => const ['PRIMARY KEY(id)']; - @override - bool get dontWriteConstraints => 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, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn type = GeneratedColumn( - 'type', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn width = GeneratedColumn( - 'width', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn height = GeneratedColumn( - 'height', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn durationMs = GeneratedColumn( - 'duration_ms', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn albumId = GeneratedColumn( - 'album_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn checksum = GeneratedColumn( - 'checksum', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn isFavorite = GeneratedColumn( - 'is_favorite', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0 CHECK (is_favorite IN (0, 1))', - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn orientation = GeneratedColumn( - 'orientation', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0', - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn source = GeneratedColumn( - 'source', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn playbackStyle = GeneratedColumn( - 'playback_style', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0', - defaultValue: const CustomExpression('0'), - ); - @override - List get $columns => [ - name, - type, - createdAt, - updatedAt, - width, - height, - durationMs, - id, - albumId, - checksum, - isFavorite, - orientation, - source, - playbackStyle, - ]; - @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.string, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}updated_at'], - )!, - width: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}width'], - ), - height: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}height'], - ), - durationMs: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}duration_ms'], - ), - 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.int, - data['${effectivePrefix}is_favorite'], - )!, - orientation: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}orientation'], - )!, - source: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}source'], - )!, - playbackStyle: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}playback_style'], - )!, - ); - } - - @override - TrashedLocalAssetEntity createAlias(String alias) { - return TrashedLocalAssetEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY(id, album_id)']; - @override - bool get dontWriteConstraints => true; -} - -class TrashedLocalAssetEntityData extends DataClass - implements Insertable { - final String name; - final int type; - final String createdAt; - final String updatedAt; - final int? width; - final int? height; - final int? durationMs; - final String id; - final String albumId; - final String? checksum; - final int isFavorite; - final int orientation; - final int source; - final int playbackStyle; - const TrashedLocalAssetEntityData({ - required this.name, - required this.type, - required this.createdAt, - required this.updatedAt, - this.width, - this.height, - this.durationMs, - required this.id, - required this.albumId, - this.checksum, - required this.isFavorite, - required this.orientation, - required this.source, - required this.playbackStyle, - }); - @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 || durationMs != null) { - map['duration_ms'] = Variable(durationMs); - } - 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); - map['source'] = Variable(source); - map['playback_style'] = Variable(playbackStyle); - 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']), - durationMs: serializer.fromJson(json['durationMs']), - 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']), - source: serializer.fromJson(json['source']), - playbackStyle: serializer.fromJson(json['playbackStyle']), - ); - } - @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), - 'durationMs': serializer.toJson(durationMs), - 'id': serializer.toJson(id), - 'albumId': serializer.toJson(albumId), - 'checksum': serializer.toJson(checksum), - 'isFavorite': serializer.toJson(isFavorite), - 'orientation': serializer.toJson(orientation), - 'source': serializer.toJson(source), - 'playbackStyle': serializer.toJson(playbackStyle), - }; - } - - TrashedLocalAssetEntityData copyWith({ - String? name, - int? type, - String? createdAt, - String? updatedAt, - Value width = const Value.absent(), - Value height = const Value.absent(), - Value durationMs = const Value.absent(), - String? id, - String? albumId, - Value checksum = const Value.absent(), - int? isFavorite, - int? orientation, - int? source, - int? playbackStyle, - }) => 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, - durationMs: durationMs.present ? durationMs.value : this.durationMs, - id: id ?? this.id, - albumId: albumId ?? this.albumId, - checksum: checksum.present ? checksum.value : this.checksum, - isFavorite: isFavorite ?? this.isFavorite, - orientation: orientation ?? this.orientation, - source: source ?? this.source, - playbackStyle: playbackStyle ?? this.playbackStyle, - ); - 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, - durationMs: data.durationMs.present - ? data.durationMs.value - : this.durationMs, - 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, - source: data.source.present ? data.source.value : this.source, - playbackStyle: data.playbackStyle.present - ? data.playbackStyle.value - : this.playbackStyle, - ); - } - - @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('durationMs: $durationMs, ') - ..write('id: $id, ') - ..write('albumId: $albumId, ') - ..write('checksum: $checksum, ') - ..write('isFavorite: $isFavorite, ') - ..write('orientation: $orientation, ') - ..write('source: $source, ') - ..write('playbackStyle: $playbackStyle') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - name, - type, - createdAt, - updatedAt, - width, - height, - durationMs, - id, - albumId, - checksum, - isFavorite, - orientation, - source, - playbackStyle, - ); - @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.durationMs == this.durationMs && - other.id == this.id && - other.albumId == this.albumId && - other.checksum == this.checksum && - other.isFavorite == this.isFavorite && - other.orientation == this.orientation && - other.source == this.source && - other.playbackStyle == this.playbackStyle); -} - -class TrashedLocalAssetEntityCompanion - extends UpdateCompanion { - final Value name; - final Value type; - final Value createdAt; - final Value updatedAt; - final Value width; - final Value height; - final Value durationMs; - final Value id; - final Value albumId; - final Value checksum; - final Value isFavorite; - final Value orientation; - final Value source; - final Value playbackStyle; - 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.durationMs = 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(), - this.source = const Value.absent(), - this.playbackStyle = 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.durationMs = const Value.absent(), - required String id, - required String albumId, - this.checksum = const Value.absent(), - this.isFavorite = const Value.absent(), - this.orientation = const Value.absent(), - required int source, - this.playbackStyle = const Value.absent(), - }) : name = Value(name), - type = Value(type), - id = Value(id), - albumId = Value(albumId), - source = Value(source); - static Insertable custom({ - Expression? name, - Expression? type, - Expression? createdAt, - Expression? updatedAt, - Expression? width, - Expression? height, - Expression? durationMs, - Expression? id, - Expression? albumId, - Expression? checksum, - Expression? isFavorite, - Expression? orientation, - Expression? source, - Expression? playbackStyle, - }) { - 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 (durationMs != null) 'duration_ms': durationMs, - 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, - if (source != null) 'source': source, - if (playbackStyle != null) 'playback_style': playbackStyle, - }); - } - - TrashedLocalAssetEntityCompanion copyWith({ - Value? name, - Value? type, - Value? createdAt, - Value? updatedAt, - Value? width, - Value? height, - Value? durationMs, - Value? id, - Value? albumId, - Value? checksum, - Value? isFavorite, - Value? orientation, - Value? source, - Value? playbackStyle, - }) { - 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, - durationMs: durationMs ?? this.durationMs, - id: id ?? this.id, - albumId: albumId ?? this.albumId, - checksum: checksum ?? this.checksum, - isFavorite: isFavorite ?? this.isFavorite, - orientation: orientation ?? this.orientation, - source: source ?? this.source, - playbackStyle: playbackStyle ?? this.playbackStyle, - ); - } - - @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 (durationMs.present) { - map['duration_ms'] = Variable(durationMs.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); - } - if (source.present) { - map['source'] = Variable(source.value); - } - if (playbackStyle.present) { - map['playback_style'] = Variable(playbackStyle.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('durationMs: $durationMs, ') - ..write('id: $id, ') - ..write('albumId: $albumId, ') - ..write('checksum: $checksum, ') - ..write('isFavorite: $isFavorite, ') - ..write('orientation: $orientation, ') - ..write('source: $source, ') - ..write('playbackStyle: $playbackStyle') - ..write(')')) - .toString(); - } -} - -class AssetEditEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - AssetEditEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn assetId = GeneratedColumn( - 'asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: - 'NOT NULL REFERENCES remote_asset_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn action = GeneratedColumn( - 'action', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn parameters = - GeneratedColumn( - 'parameters', - aliasedName, - false, - type: DriftSqlType.blob, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn sequence = GeneratedColumn( - 'sequence', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - @override - List get $columns => [ - id, - assetId, - action, - parameters, - sequence, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'asset_edit_entity'; - @override - Set get $primaryKey => {id}; - @override - AssetEditEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return AssetEditEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - assetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}asset_id'], - )!, - action: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}action'], - )!, - parameters: attachedDatabase.typeMapping.read( - DriftSqlType.blob, - data['${effectivePrefix}parameters'], - )!, - sequence: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}sequence'], - )!, - ); - } - - @override - AssetEditEntity createAlias(String alias) { - return AssetEditEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY(id)']; - @override - bool get dontWriteConstraints => true; -} - -class AssetEditEntityData extends DataClass - implements Insertable { - final String id; - final String assetId; - final int action; - final i2.Uint8List parameters; - final int sequence; - const AssetEditEntityData({ - required this.id, - required this.assetId, - required this.action, - required this.parameters, - required this.sequence, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['asset_id'] = Variable(assetId); - map['action'] = Variable(action); - map['parameters'] = Variable(parameters); - map['sequence'] = Variable(sequence); - return map; - } - - factory AssetEditEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return AssetEditEntityData( - id: serializer.fromJson(json['id']), - assetId: serializer.fromJson(json['assetId']), - action: serializer.fromJson(json['action']), - parameters: serializer.fromJson(json['parameters']), - sequence: serializer.fromJson(json['sequence']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'assetId': serializer.toJson(assetId), - 'action': serializer.toJson(action), - 'parameters': serializer.toJson(parameters), - 'sequence': serializer.toJson(sequence), - }; - } - - AssetEditEntityData copyWith({ - String? id, - String? assetId, - int? action, - i2.Uint8List? parameters, - int? sequence, - }) => AssetEditEntityData( - id: id ?? this.id, - assetId: assetId ?? this.assetId, - action: action ?? this.action, - parameters: parameters ?? this.parameters, - sequence: sequence ?? this.sequence, - ); - AssetEditEntityData copyWithCompanion(AssetEditEntityCompanion data) { - return AssetEditEntityData( - id: data.id.present ? data.id.value : this.id, - assetId: data.assetId.present ? data.assetId.value : this.assetId, - action: data.action.present ? data.action.value : this.action, - parameters: data.parameters.present - ? data.parameters.value - : this.parameters, - sequence: data.sequence.present ? data.sequence.value : this.sequence, - ); - } - - @override - String toString() { - return (StringBuffer('AssetEditEntityData(') - ..write('id: $id, ') - ..write('assetId: $assetId, ') - ..write('action: $action, ') - ..write('parameters: $parameters, ') - ..write('sequence: $sequence') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - assetId, - action, - $driftBlobEquality.hash(parameters), - sequence, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is AssetEditEntityData && - other.id == this.id && - other.assetId == this.assetId && - other.action == this.action && - $driftBlobEquality.equals(other.parameters, this.parameters) && - other.sequence == this.sequence); -} - -class AssetEditEntityCompanion extends UpdateCompanion { - final Value id; - final Value assetId; - final Value action; - final Value parameters; - final Value sequence; - const AssetEditEntityCompanion({ - this.id = const Value.absent(), - this.assetId = const Value.absent(), - this.action = const Value.absent(), - this.parameters = const Value.absent(), - this.sequence = const Value.absent(), - }); - AssetEditEntityCompanion.insert({ - required String id, - required String assetId, - required int action, - required i2.Uint8List parameters, - required int sequence, - }) : id = Value(id), - assetId = Value(assetId), - action = Value(action), - parameters = Value(parameters), - sequence = Value(sequence); - static Insertable custom({ - Expression? id, - Expression? assetId, - Expression? action, - Expression? parameters, - Expression? sequence, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (assetId != null) 'asset_id': assetId, - if (action != null) 'action': action, - if (parameters != null) 'parameters': parameters, - if (sequence != null) 'sequence': sequence, - }); - } - - AssetEditEntityCompanion copyWith({ - Value? id, - Value? assetId, - Value? action, - Value? parameters, - Value? sequence, - }) { - return AssetEditEntityCompanion( - id: id ?? this.id, - assetId: assetId ?? this.assetId, - action: action ?? this.action, - parameters: parameters ?? this.parameters, - sequence: sequence ?? this.sequence, - ); - } - - @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 (action.present) { - map['action'] = Variable(action.value); - } - if (parameters.present) { - map['parameters'] = Variable(parameters.value); - } - if (sequence.present) { - map['sequence'] = Variable(sequence.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('AssetEditEntityCompanion(') - ..write('id: $id, ') - ..write('assetId: $assetId, ') - ..write('action: $action, ') - ..write('parameters: $parameters, ') - ..write('sequence: $sequence') - ..write(')')) - .toString(); - } -} - -class Settings extends Table with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - Settings(this.attachedDatabase, [this._alias]); - late final GeneratedColumn key = GeneratedColumn( - 'key', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn value = GeneratedColumn( - 'value', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - @override - List get $columns => [key, value, updatedAt]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'settings'; - @override - Set get $primaryKey => {key}; - @override - SettingsData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return SettingsData( - key: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}key'], - )!, - value: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}value'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}updated_at'], - )!, - ); - } - - @override - Settings createAlias(String alias) { - return Settings(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY("key")']; - @override - bool get dontWriteConstraints => true; -} - -class SettingsData extends DataClass implements Insertable { - final String key; - final String value; - final String updatedAt; - const SettingsData({ - required this.key, - required this.value, - required this.updatedAt, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['key'] = Variable(key); - map['value'] = Variable(value); - map['updated_at'] = Variable(updatedAt); - return map; - } - - factory SettingsData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return SettingsData( - key: serializer.fromJson(json['key']), - value: serializer.fromJson(json['value']), - updatedAt: serializer.fromJson(json['updatedAt']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'key': serializer.toJson(key), - 'value': serializer.toJson(value), - 'updatedAt': serializer.toJson(updatedAt), - }; - } - - SettingsData copyWith({String? key, String? value, String? updatedAt}) => - SettingsData( - key: key ?? this.key, - value: value ?? this.value, - updatedAt: updatedAt ?? this.updatedAt, - ); - SettingsData copyWithCompanion(SettingsCompanion data) { - return SettingsData( - key: data.key.present ? data.key.value : this.key, - value: data.value.present ? data.value.value : this.value, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - ); - } - - @override - String toString() { - return (StringBuffer('SettingsData(') - ..write('key: $key, ') - ..write('value: $value, ') - ..write('updatedAt: $updatedAt') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(key, value, updatedAt); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is SettingsData && - other.key == this.key && - other.value == this.value && - other.updatedAt == this.updatedAt); -} - -class SettingsCompanion extends UpdateCompanion { - final Value key; - final Value value; - final Value updatedAt; - const SettingsCompanion({ - this.key = const Value.absent(), - this.value = const Value.absent(), - this.updatedAt = const Value.absent(), - }); - SettingsCompanion.insert({ - required String key, - required String value, - this.updatedAt = const Value.absent(), - }) : key = Value(key), - value = Value(value); - static Insertable custom({ - Expression? key, - Expression? value, - Expression? updatedAt, - }) { - return RawValuesInsertable({ - if (key != null) 'key': key, - if (value != null) 'value': value, - if (updatedAt != null) 'updated_at': updatedAt, - }); - } - - SettingsCompanion copyWith({ - Value? key, - Value? value, - Value? updatedAt, - }) { - return SettingsCompanion( - key: key ?? this.key, - value: value ?? this.value, - updatedAt: updatedAt ?? this.updatedAt, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (key.present) { - map['key'] = Variable(key.value); - } - if (value.present) { - map['value'] = Variable(value.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('SettingsCompanion(') - ..write('key: $key, ') - ..write('value: $value, ') - ..write('updatedAt: $updatedAt') - ..write(')')) - .toString(); - } -} - -class AssetOcrEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - AssetOcrEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn assetId = GeneratedColumn( - 'asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: - 'NOT NULL REFERENCES remote_asset_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn x1 = GeneratedColumn( - 'x1', - aliasedName, - false, - type: DriftSqlType.double, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn y1 = GeneratedColumn( - 'y1', - aliasedName, - false, - type: DriftSqlType.double, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn x2 = GeneratedColumn( - 'x2', - aliasedName, - false, - type: DriftSqlType.double, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn y2 = GeneratedColumn( - 'y2', - aliasedName, - false, - type: DriftSqlType.double, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn x3 = GeneratedColumn( - 'x3', - aliasedName, - false, - type: DriftSqlType.double, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn y3 = GeneratedColumn( - 'y3', - aliasedName, - false, - type: DriftSqlType.double, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn x4 = GeneratedColumn( - 'x4', - aliasedName, - false, - type: DriftSqlType.double, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn y4 = GeneratedColumn( - 'y4', - aliasedName, - false, - type: DriftSqlType.double, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn boxScore = GeneratedColumn( - 'box_score', - aliasedName, - false, - type: DriftSqlType.double, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn textScore = GeneratedColumn( - 'text_score', - aliasedName, - false, - type: DriftSqlType.double, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn recognizedText = GeneratedColumn( - 'recognized_text', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn isVisible = GeneratedColumn( - 'is_visible', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 1 CHECK (is_visible IN (0, 1))', - defaultValue: const CustomExpression('1'), - ); - @override - List get $columns => [ - id, - assetId, - x1, - y1, - x2, - y2, - x3, - y3, - x4, - y4, - boxScore, - textScore, - recognizedText, - isVisible, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'asset_ocr_entity'; - @override - Set get $primaryKey => {id}; - @override - AssetOcrEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return AssetOcrEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - assetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}asset_id'], - )!, - x1: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}x1'], - )!, - y1: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}y1'], - )!, - x2: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}x2'], - )!, - y2: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}y2'], - )!, - x3: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}x3'], - )!, - y3: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}y3'], - )!, - x4: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}x4'], - )!, - y4: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}y4'], - )!, - boxScore: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}box_score'], - )!, - textScore: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}text_score'], - )!, - recognizedText: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}recognized_text'], - )!, - isVisible: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}is_visible'], - )!, - ); - } - - @override - AssetOcrEntity createAlias(String alias) { - return AssetOcrEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY(id)']; - @override - bool get dontWriteConstraints => true; -} - -class AssetOcrEntityData extends DataClass - implements Insertable { - final String id; - final String assetId; - final double x1; - final double y1; - final double x2; - final double y2; - final double x3; - final double y3; - final double x4; - final double y4; - final double boxScore; - final double textScore; - final String recognizedText; - final int isVisible; - const AssetOcrEntityData({ - required this.id, - required this.assetId, - required this.x1, - required this.y1, - required this.x2, - required this.y2, - required this.x3, - required this.y3, - required this.x4, - required this.y4, - required this.boxScore, - required this.textScore, - required this.recognizedText, - required this.isVisible, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['asset_id'] = Variable(assetId); - map['x1'] = Variable(x1); - map['y1'] = Variable(y1); - map['x2'] = Variable(x2); - map['y2'] = Variable(y2); - map['x3'] = Variable(x3); - map['y3'] = Variable(y3); - map['x4'] = Variable(x4); - map['y4'] = Variable(y4); - map['box_score'] = Variable(boxScore); - map['text_score'] = Variable(textScore); - map['recognized_text'] = Variable(recognizedText); - map['is_visible'] = Variable(isVisible); - return map; - } - - factory AssetOcrEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return AssetOcrEntityData( - id: serializer.fromJson(json['id']), - assetId: serializer.fromJson(json['assetId']), - x1: serializer.fromJson(json['x1']), - y1: serializer.fromJson(json['y1']), - x2: serializer.fromJson(json['x2']), - y2: serializer.fromJson(json['y2']), - x3: serializer.fromJson(json['x3']), - y3: serializer.fromJson(json['y3']), - x4: serializer.fromJson(json['x4']), - y4: serializer.fromJson(json['y4']), - boxScore: serializer.fromJson(json['boxScore']), - textScore: serializer.fromJson(json['textScore']), - recognizedText: serializer.fromJson(json['recognizedText']), - isVisible: serializer.fromJson(json['isVisible']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'assetId': serializer.toJson(assetId), - 'x1': serializer.toJson(x1), - 'y1': serializer.toJson(y1), - 'x2': serializer.toJson(x2), - 'y2': serializer.toJson(y2), - 'x3': serializer.toJson(x3), - 'y3': serializer.toJson(y3), - 'x4': serializer.toJson(x4), - 'y4': serializer.toJson(y4), - 'boxScore': serializer.toJson(boxScore), - 'textScore': serializer.toJson(textScore), - 'recognizedText': serializer.toJson(recognizedText), - 'isVisible': serializer.toJson(isVisible), - }; - } - - AssetOcrEntityData copyWith({ - String? id, - String? assetId, - double? x1, - double? y1, - double? x2, - double? y2, - double? x3, - double? y3, - double? x4, - double? y4, - double? boxScore, - double? textScore, - String? recognizedText, - int? isVisible, - }) => AssetOcrEntityData( - id: id ?? this.id, - assetId: assetId ?? this.assetId, - x1: x1 ?? this.x1, - y1: y1 ?? this.y1, - x2: x2 ?? this.x2, - y2: y2 ?? this.y2, - x3: x3 ?? this.x3, - y3: y3 ?? this.y3, - x4: x4 ?? this.x4, - y4: y4 ?? this.y4, - boxScore: boxScore ?? this.boxScore, - textScore: textScore ?? this.textScore, - recognizedText: recognizedText ?? this.recognizedText, - isVisible: isVisible ?? this.isVisible, - ); - AssetOcrEntityData copyWithCompanion(AssetOcrEntityCompanion data) { - return AssetOcrEntityData( - id: data.id.present ? data.id.value : this.id, - assetId: data.assetId.present ? data.assetId.value : this.assetId, - x1: data.x1.present ? data.x1.value : this.x1, - y1: data.y1.present ? data.y1.value : this.y1, - x2: data.x2.present ? data.x2.value : this.x2, - y2: data.y2.present ? data.y2.value : this.y2, - x3: data.x3.present ? data.x3.value : this.x3, - y3: data.y3.present ? data.y3.value : this.y3, - x4: data.x4.present ? data.x4.value : this.x4, - y4: data.y4.present ? data.y4.value : this.y4, - boxScore: data.boxScore.present ? data.boxScore.value : this.boxScore, - textScore: data.textScore.present ? data.textScore.value : this.textScore, - recognizedText: data.recognizedText.present - ? data.recognizedText.value - : this.recognizedText, - isVisible: data.isVisible.present ? data.isVisible.value : this.isVisible, - ); - } - - @override - String toString() { - return (StringBuffer('AssetOcrEntityData(') - ..write('id: $id, ') - ..write('assetId: $assetId, ') - ..write('x1: $x1, ') - ..write('y1: $y1, ') - ..write('x2: $x2, ') - ..write('y2: $y2, ') - ..write('x3: $x3, ') - ..write('y3: $y3, ') - ..write('x4: $x4, ') - ..write('y4: $y4, ') - ..write('boxScore: $boxScore, ') - ..write('textScore: $textScore, ') - ..write('recognizedText: $recognizedText, ') - ..write('isVisible: $isVisible') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - assetId, - x1, - y1, - x2, - y2, - x3, - y3, - x4, - y4, - boxScore, - textScore, - recognizedText, - isVisible, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is AssetOcrEntityData && - other.id == this.id && - other.assetId == this.assetId && - other.x1 == this.x1 && - other.y1 == this.y1 && - other.x2 == this.x2 && - other.y2 == this.y2 && - other.x3 == this.x3 && - other.y3 == this.y3 && - other.x4 == this.x4 && - other.y4 == this.y4 && - other.boxScore == this.boxScore && - other.textScore == this.textScore && - other.recognizedText == this.recognizedText && - other.isVisible == this.isVisible); -} - -class AssetOcrEntityCompanion extends UpdateCompanion { - final Value id; - final Value assetId; - final Value x1; - final Value y1; - final Value x2; - final Value y2; - final Value x3; - final Value y3; - final Value x4; - final Value y4; - final Value boxScore; - final Value textScore; - final Value recognizedText; - final Value isVisible; - const AssetOcrEntityCompanion({ - this.id = const Value.absent(), - this.assetId = const Value.absent(), - this.x1 = const Value.absent(), - this.y1 = const Value.absent(), - this.x2 = const Value.absent(), - this.y2 = const Value.absent(), - this.x3 = const Value.absent(), - this.y3 = const Value.absent(), - this.x4 = const Value.absent(), - this.y4 = const Value.absent(), - this.boxScore = const Value.absent(), - this.textScore = const Value.absent(), - this.recognizedText = const Value.absent(), - this.isVisible = const Value.absent(), - }); - AssetOcrEntityCompanion.insert({ - required String id, - required String assetId, - required double x1, - required double y1, - required double x2, - required double y2, - required double x3, - required double y3, - required double x4, - required double y4, - required double boxScore, - required double textScore, - required String recognizedText, - this.isVisible = const Value.absent(), - }) : id = Value(id), - assetId = Value(assetId), - x1 = Value(x1), - y1 = Value(y1), - x2 = Value(x2), - y2 = Value(y2), - x3 = Value(x3), - y3 = Value(y3), - x4 = Value(x4), - y4 = Value(y4), - boxScore = Value(boxScore), - textScore = Value(textScore), - recognizedText = Value(recognizedText); - static Insertable custom({ - Expression? id, - Expression? assetId, - Expression? x1, - Expression? y1, - Expression? x2, - Expression? y2, - Expression? x3, - Expression? y3, - Expression? x4, - Expression? y4, - Expression? boxScore, - Expression? textScore, - Expression? recognizedText, - Expression? isVisible, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (assetId != null) 'asset_id': assetId, - if (x1 != null) 'x1': x1, - if (y1 != null) 'y1': y1, - if (x2 != null) 'x2': x2, - if (y2 != null) 'y2': y2, - if (x3 != null) 'x3': x3, - if (y3 != null) 'y3': y3, - if (x4 != null) 'x4': x4, - if (y4 != null) 'y4': y4, - if (boxScore != null) 'box_score': boxScore, - if (textScore != null) 'text_score': textScore, - if (recognizedText != null) 'recognized_text': recognizedText, - if (isVisible != null) 'is_visible': isVisible, - }); - } - - AssetOcrEntityCompanion copyWith({ - Value? id, - Value? assetId, - Value? x1, - Value? y1, - Value? x2, - Value? y2, - Value? x3, - Value? y3, - Value? x4, - Value? y4, - Value? boxScore, - Value? textScore, - Value? recognizedText, - Value? isVisible, - }) { - return AssetOcrEntityCompanion( - id: id ?? this.id, - assetId: assetId ?? this.assetId, - x1: x1 ?? this.x1, - y1: y1 ?? this.y1, - x2: x2 ?? this.x2, - y2: y2 ?? this.y2, - x3: x3 ?? this.x3, - y3: y3 ?? this.y3, - x4: x4 ?? this.x4, - y4: y4 ?? this.y4, - boxScore: boxScore ?? this.boxScore, - textScore: textScore ?? this.textScore, - recognizedText: recognizedText ?? this.recognizedText, - isVisible: isVisible ?? this.isVisible, - ); - } - - @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 (x1.present) { - map['x1'] = Variable(x1.value); - } - if (y1.present) { - map['y1'] = Variable(y1.value); - } - if (x2.present) { - map['x2'] = Variable(x2.value); - } - if (y2.present) { - map['y2'] = Variable(y2.value); - } - if (x3.present) { - map['x3'] = Variable(x3.value); - } - if (y3.present) { - map['y3'] = Variable(y3.value); - } - if (x4.present) { - map['x4'] = Variable(x4.value); - } - if (y4.present) { - map['y4'] = Variable(y4.value); - } - if (boxScore.present) { - map['box_score'] = Variable(boxScore.value); - } - if (textScore.present) { - map['text_score'] = Variable(textScore.value); - } - if (recognizedText.present) { - map['recognized_text'] = Variable(recognizedText.value); - } - if (isVisible.present) { - map['is_visible'] = Variable(isVisible.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('AssetOcrEntityCompanion(') - ..write('id: $id, ') - ..write('assetId: $assetId, ') - ..write('x1: $x1, ') - ..write('y1: $y1, ') - ..write('x2: $x2, ') - ..write('y2: $y2, ') - ..write('x3: $x3, ') - ..write('y3: $y3, ') - ..write('x4: $x4, ') - ..write('y4: $y4, ') - ..write('boxScore: $boxScore, ') - ..write('textScore: $textScore, ') - ..write('recognizedText: $recognizedText, ') - ..write('isVisible: $isVisible') - ..write(')')) - .toString(); - } -} - -class DatabaseAtV29 extends GeneratedDatabase { - DatabaseAtV29(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 idxLocalAlbumAssetAlbumAsset = Index( - 'idx_local_album_asset_album_asset', - 'CREATE INDEX IF NOT EXISTS idx_local_album_asset_album_asset ON local_album_asset_entity (album_id, asset_id)', - ); - 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 idxLocalAssetCloudId = Index( - 'idx_local_asset_cloud_id', - 'CREATE INDEX IF NOT EXISTS idx_local_asset_cloud_id ON local_asset_entity (i_cloud_id)', - ); - late final Index idxLocalAssetCreatedAt = Index( - 'idx_local_asset_created_at', - 'CREATE INDEX IF NOT EXISTS idx_local_asset_created_at ON local_asset_entity (created_at)', - ); - late final Index idxStackPrimaryAssetId = Index( - 'idx_stack_primary_asset_id', - 'CREATE INDEX IF NOT EXISTS idx_stack_primary_asset_id ON stack_entity (primary_asset_id)', - ); - 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 Index idxRemoteAssetStackId = Index( - 'idx_remote_asset_stack_id', - 'CREATE INDEX IF NOT EXISTS idx_remote_asset_stack_id ON remote_asset_entity (stack_id)', - ); - late final Index idxRemoteAssetOwnerVisibilityDeletedCreated = Index( - 'idx_remote_asset_owner_visibility_deleted_created', - 'CREATE INDEX IF NOT EXISTS idx_remote_asset_owner_visibility_deleted_created ON remote_asset_entity (owner_id, visibility, deleted_at, created_at DESC)', - ); - 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 RemoteAssetCloudIdEntity remoteAssetCloudIdEntity = - RemoteAssetCloudIdEntity(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 AssetEditEntity assetEditEntity = AssetEditEntity(this); - late final Settings settings = Settings(this); - late final AssetOcrEntity assetOcrEntity = AssetOcrEntity(this); - late final Index idxPartnerSharedWithId = Index( - 'idx_partner_shared_with_id', - 'CREATE INDEX IF NOT EXISTS idx_partner_shared_with_id ON partner_entity (shared_with_id)', - ); - 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 idxRemoteExifCity = Index( - 'idx_remote_exif_city', - 'CREATE INDEX IF NOT EXISTS idx_remote_exif_city ON remote_exif_entity (city) WHERE city IS NOT NULL', - ); - late final Index idxRemoteAlbumAssetAlbumAsset = Index( - 'idx_remote_album_asset_album_asset', - 'CREATE INDEX IF NOT EXISTS idx_remote_album_asset_album_asset ON remote_album_asset_entity (album_id, asset_id)', - ); - late final Index idxRemoteAssetCloudId = Index( - 'idx_remote_asset_cloud_id', - 'CREATE INDEX IF NOT EXISTS idx_remote_asset_cloud_id ON remote_asset_cloud_id_entity (cloud_id)', - ); - late final Index idxPersonOwnerId = Index( - 'idx_person_owner_id', - 'CREATE INDEX IF NOT EXISTS idx_person_owner_id ON person_entity (owner_id)', - ); - late final Index idxAssetFacePersonId = Index( - 'idx_asset_face_person_id', - 'CREATE INDEX IF NOT EXISTS idx_asset_face_person_id ON asset_face_entity (person_id)', - ); - late final Index idxAssetFaceAssetId = Index( - 'idx_asset_face_asset_id', - 'CREATE INDEX IF NOT EXISTS idx_asset_face_asset_id ON asset_face_entity (asset_id)', - ); - late final Index idxAssetFaceVisiblePerson = Index( - 'idx_asset_face_visible_person', - 'CREATE INDEX IF NOT EXISTS idx_asset_face_visible_person ON asset_face_entity (person_id, asset_id) WHERE is_visible = 1 AND deleted_at IS NULL', - ); - 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)', - ); - late final Index idxAssetEditAssetId = Index( - 'idx_asset_edit_asset_id', - 'CREATE INDEX IF NOT EXISTS idx_asset_edit_asset_id ON asset_edit_entity (asset_id)', - ); - late final Index idxAssetOcrAssetId = Index( - 'idx_asset_ocr_asset_id', - 'CREATE INDEX IF NOT EXISTS idx_asset_ocr_asset_id ON asset_ocr_entity (asset_id)', - ); - @override - Iterable> get allTables => - allSchemaEntities.whereType>(); - @override - List get allSchemaEntities => [ - userEntity, - remoteAssetEntity, - stackEntity, - localAssetEntity, - remoteAlbumEntity, - localAlbumEntity, - localAlbumAssetEntity, - idxLocalAlbumAssetAlbumAsset, - idxLocalAssetChecksum, - idxLocalAssetCloudId, - idxLocalAssetCreatedAt, - idxStackPrimaryAssetId, - uQRemoteAssetsOwnerChecksum, - uQRemoteAssetsOwnerLibraryChecksum, - idxRemoteAssetChecksum, - idxRemoteAssetStackId, - idxRemoteAssetOwnerVisibilityDeletedCreated, - authUserEntity, - userMetadataEntity, - partnerEntity, - remoteExifEntity, - remoteAlbumAssetEntity, - remoteAlbumUserEntity, - remoteAssetCloudIdEntity, - memoryEntity, - memoryAssetEntity, - personEntity, - assetFaceEntity, - storeEntity, - trashedLocalAssetEntity, - assetEditEntity, - settings, - assetOcrEntity, - idxPartnerSharedWithId, - idxLatLng, - idxRemoteExifCity, - idxRemoteAlbumAssetAlbumAsset, - idxRemoteAssetCloudId, - idxPersonOwnerId, - idxAssetFacePersonId, - idxAssetFaceAssetId, - idxAssetFaceVisiblePerson, - idxTrashedLocalAssetChecksum, - idxTrashedLocalAssetAlbum, - idxAssetEditAssetId, - idxAssetOcrAssetId, - ]; - @override - StreamQueryUpdateRules get streamUpdateRules => const StreamQueryUpdateRules([ - WritePropagation( - on: TableUpdateQuery.onTableName( - 'user_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('remote_asset_entity', kind: UpdateKind.delete)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'user_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('stack_entity', kind: UpdateKind.delete)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'remote_asset_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('remote_album_entity', kind: UpdateKind.update)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'remote_album_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('local_album_entity', kind: UpdateKind.update)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'local_asset_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [ - TableUpdate('local_album_asset_entity', kind: UpdateKind.delete), - ], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'local_album_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [ - TableUpdate('local_album_asset_entity', kind: UpdateKind.delete), - ], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'user_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('user_metadata_entity', kind: UpdateKind.delete)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'user_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('partner_entity', kind: UpdateKind.delete)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'user_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('partner_entity', kind: UpdateKind.delete)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'remote_asset_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('remote_exif_entity', kind: UpdateKind.delete)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'remote_asset_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [ - TableUpdate('remote_album_asset_entity', kind: UpdateKind.delete), - ], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'remote_album_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [ - TableUpdate('remote_album_asset_entity', kind: UpdateKind.delete), - ], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'remote_album_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [ - TableUpdate('remote_album_user_entity', kind: UpdateKind.delete), - ], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'user_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [ - TableUpdate('remote_album_user_entity', kind: UpdateKind.delete), - ], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'remote_asset_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [ - TableUpdate('remote_asset_cloud_id_entity', kind: UpdateKind.delete), - ], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'user_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('memory_entity', kind: UpdateKind.delete)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'remote_asset_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('memory_asset_entity', kind: UpdateKind.delete)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'memory_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('memory_asset_entity', kind: UpdateKind.delete)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'user_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('person_entity', kind: UpdateKind.delete)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'remote_asset_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('asset_face_entity', kind: UpdateKind.delete)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'person_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('asset_face_entity', kind: UpdateKind.update)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'remote_asset_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('asset_edit_entity', kind: UpdateKind.delete)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'remote_asset_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('asset_ocr_entity', kind: UpdateKind.delete)], - ), - ]); - @override - int get schemaVersion => 29; - @override - DriftDatabaseOptions get options => - const DriftDatabaseOptions(storeDateTimeAsText: true); -} diff --git a/mobile/test/drift/main/generated/schema_v3.dart b/mobile/test/drift/main/generated/schema_v3.dart deleted file mode 100644 index ecfe09dfd7..0000000000 --- a/mobile/test/drift/main/generated/schema_v3.dart +++ /dev/null @@ -1,5995 +0,0 @@ -// dart format width=80 -import 'dart:typed_data' as i2; -// GENERATED BY drift_dev, DO NOT MODIFY. -// ignore_for_file: type=lint,unused_import -// -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 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 email = GeneratedColumn( - 'email', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn profileImagePath = GeneratedColumn( - 'profile_image_path', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn quotaSizeInBytes = GeneratedColumn( - 'quota_size_in_bytes', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn quotaUsageInBytes = GeneratedColumn( - 'quota_usage_in_bytes', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - defaultValue: const CustomExpression('0'), - ); - @override - List get $columns => [ - id, - name, - isAdmin, - email, - profileImagePath, - updatedAt, - quotaSizeInBytes, - quotaUsageInBytes, - ]; - @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'], - )!, - isAdmin: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}is_admin'], - )!, - email: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}email'], - )!, - profileImagePath: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}profile_image_path'], - ), - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}updated_at'], - )!, - quotaSizeInBytes: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}quota_size_in_bytes'], - ), - quotaUsageInBytes: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}quota_usage_in_bytes'], - )!, - ); - } - - @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 bool isAdmin; - final String email; - final String? profileImagePath; - final DateTime updatedAt; - final int? quotaSizeInBytes; - final int quotaUsageInBytes; - const UserEntityData({ - required this.id, - required this.name, - required this.isAdmin, - required this.email, - this.profileImagePath, - required this.updatedAt, - this.quotaSizeInBytes, - required this.quotaUsageInBytes, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['name'] = Variable(name); - map['is_admin'] = Variable(isAdmin); - map['email'] = Variable(email); - if (!nullToAbsent || profileImagePath != null) { - map['profile_image_path'] = Variable(profileImagePath); - } - map['updated_at'] = Variable(updatedAt); - if (!nullToAbsent || quotaSizeInBytes != null) { - map['quota_size_in_bytes'] = Variable(quotaSizeInBytes); - } - map['quota_usage_in_bytes'] = Variable(quotaUsageInBytes); - return map; - } - - factory UserEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return UserEntityData( - id: serializer.fromJson(json['id']), - name: serializer.fromJson(json['name']), - isAdmin: serializer.fromJson(json['isAdmin']), - email: serializer.fromJson(json['email']), - profileImagePath: serializer.fromJson(json['profileImagePath']), - updatedAt: serializer.fromJson(json['updatedAt']), - quotaSizeInBytes: serializer.fromJson(json['quotaSizeInBytes']), - quotaUsageInBytes: serializer.fromJson(json['quotaUsageInBytes']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'name': serializer.toJson(name), - 'isAdmin': serializer.toJson(isAdmin), - 'email': serializer.toJson(email), - 'profileImagePath': serializer.toJson(profileImagePath), - 'updatedAt': serializer.toJson(updatedAt), - 'quotaSizeInBytes': serializer.toJson(quotaSizeInBytes), - 'quotaUsageInBytes': serializer.toJson(quotaUsageInBytes), - }; - } - - UserEntityData copyWith({ - String? id, - String? name, - bool? isAdmin, - String? email, - Value profileImagePath = const Value.absent(), - DateTime? updatedAt, - Value quotaSizeInBytes = const Value.absent(), - int? quotaUsageInBytes, - }) => UserEntityData( - id: id ?? this.id, - name: name ?? this.name, - isAdmin: isAdmin ?? this.isAdmin, - email: email ?? this.email, - profileImagePath: profileImagePath.present - ? profileImagePath.value - : this.profileImagePath, - updatedAt: updatedAt ?? this.updatedAt, - quotaSizeInBytes: quotaSizeInBytes.present - ? quotaSizeInBytes.value - : this.quotaSizeInBytes, - quotaUsageInBytes: quotaUsageInBytes ?? this.quotaUsageInBytes, - ); - UserEntityData copyWithCompanion(UserEntityCompanion data) { - return UserEntityData( - id: data.id.present ? data.id.value : this.id, - name: data.name.present ? data.name.value : this.name, - isAdmin: data.isAdmin.present ? data.isAdmin.value : this.isAdmin, - email: data.email.present ? data.email.value : this.email, - profileImagePath: data.profileImagePath.present - ? data.profileImagePath.value - : this.profileImagePath, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - quotaSizeInBytes: data.quotaSizeInBytes.present - ? data.quotaSizeInBytes.value - : this.quotaSizeInBytes, - quotaUsageInBytes: data.quotaUsageInBytes.present - ? data.quotaUsageInBytes.value - : this.quotaUsageInBytes, - ); - } - - @override - String toString() { - return (StringBuffer('UserEntityData(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('isAdmin: $isAdmin, ') - ..write('email: $email, ') - ..write('profileImagePath: $profileImagePath, ') - ..write('updatedAt: $updatedAt, ') - ..write('quotaSizeInBytes: $quotaSizeInBytes, ') - ..write('quotaUsageInBytes: $quotaUsageInBytes') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - name, - isAdmin, - email, - profileImagePath, - updatedAt, - quotaSizeInBytes, - quotaUsageInBytes, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is UserEntityData && - other.id == this.id && - other.name == this.name && - other.isAdmin == this.isAdmin && - other.email == this.email && - other.profileImagePath == this.profileImagePath && - other.updatedAt == this.updatedAt && - other.quotaSizeInBytes == this.quotaSizeInBytes && - other.quotaUsageInBytes == this.quotaUsageInBytes); -} - -class UserEntityCompanion extends UpdateCompanion { - final Value id; - final Value name; - final Value isAdmin; - final Value email; - final Value profileImagePath; - final Value updatedAt; - final Value quotaSizeInBytes; - final Value quotaUsageInBytes; - const UserEntityCompanion({ - this.id = const Value.absent(), - this.name = const Value.absent(), - this.isAdmin = const Value.absent(), - this.email = const Value.absent(), - this.profileImagePath = const Value.absent(), - this.updatedAt = const Value.absent(), - this.quotaSizeInBytes = const Value.absent(), - this.quotaUsageInBytes = const Value.absent(), - }); - UserEntityCompanion.insert({ - required String id, - required String name, - this.isAdmin = const Value.absent(), - required String email, - this.profileImagePath = const Value.absent(), - this.updatedAt = const Value.absent(), - this.quotaSizeInBytes = const Value.absent(), - this.quotaUsageInBytes = const Value.absent(), - }) : id = Value(id), - name = Value(name), - email = Value(email); - static Insertable custom({ - Expression? id, - Expression? name, - Expression? isAdmin, - Expression? email, - Expression? profileImagePath, - Expression? updatedAt, - Expression? quotaSizeInBytes, - Expression? quotaUsageInBytes, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (name != null) 'name': name, - if (isAdmin != null) 'is_admin': isAdmin, - if (email != null) 'email': email, - if (profileImagePath != null) 'profile_image_path': profileImagePath, - if (updatedAt != null) 'updated_at': updatedAt, - if (quotaSizeInBytes != null) 'quota_size_in_bytes': quotaSizeInBytes, - if (quotaUsageInBytes != null) 'quota_usage_in_bytes': quotaUsageInBytes, - }); - } - - UserEntityCompanion copyWith({ - Value? id, - Value? name, - Value? isAdmin, - Value? email, - Value? profileImagePath, - Value? updatedAt, - Value? quotaSizeInBytes, - Value? quotaUsageInBytes, - }) { - return UserEntityCompanion( - id: id ?? this.id, - name: name ?? this.name, - isAdmin: isAdmin ?? this.isAdmin, - email: email ?? this.email, - profileImagePath: profileImagePath ?? this.profileImagePath, - updatedAt: updatedAt ?? this.updatedAt, - quotaSizeInBytes: quotaSizeInBytes ?? this.quotaSizeInBytes, - quotaUsageInBytes: quotaUsageInBytes ?? this.quotaUsageInBytes, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (name.present) { - map['name'] = Variable(name.value); - } - if (isAdmin.present) { - map['is_admin'] = Variable(isAdmin.value); - } - if (email.present) { - map['email'] = Variable(email.value); - } - if (profileImagePath.present) { - map['profile_image_path'] = Variable(profileImagePath.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (quotaSizeInBytes.present) { - map['quota_size_in_bytes'] = Variable(quotaSizeInBytes.value); - } - if (quotaUsageInBytes.present) { - map['quota_usage_in_bytes'] = Variable(quotaUsageInBytes.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('UserEntityCompanion(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('isAdmin: $isAdmin, ') - ..write('email: $email, ') - ..write('profileImagePath: $profileImagePath, ') - ..write('updatedAt: $updatedAt, ') - ..write('quotaSizeInBytes: $quotaSizeInBytes, ') - ..write('quotaUsageInBytes: $quotaUsageInBytes') - ..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, - ); - @override - List get $columns => [ - name, - type, - createdAt, - updatedAt, - width, - height, - durationInSeconds, - id, - checksum, - isFavorite, - ownerId, - localDateTime, - thumbHash, - deletedAt, - livePhotoVideoId, - visibility, - stackId, - ]; - @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'], - ), - ); - } - - @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; - 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, - }); - @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); - } - 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']), - ); - } - @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), - }; - } - - 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(), - }) => 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, - ); - 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, - ); - } - - @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(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - name, - type, - createdAt, - updatedAt, - width, - height, - durationInSeconds, - id, - checksum, - isFavorite, - ownerId, - localDateTime, - thumbHash, - deletedAt, - livePhotoVideoId, - visibility, - stackId, - ); - @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); -} - -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; - 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(), - }); - 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(), - }) : 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, - }) { - 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, - }); - } - - 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, - }) { - 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, - ); - } - - @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); - } - 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(')')) - .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 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 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 i2.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, - i2.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 i2.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 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 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, - 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'], - )!, - 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 bool? marker_; - const LocalAlbumEntityData({ - required this.id, - required this.name, - required this.updatedAt, - required this.backupSelection, - required this.isIosSharedAlbum, - 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 || 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']), - 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), - 'marker_': serializer.toJson(marker_), - }; - } - - LocalAlbumEntityData copyWith({ - String? id, - String? name, - DateTime? updatedAt, - int? backupSelection, - bool? isIosSharedAlbum, - 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, - 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, - 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('marker_: $marker_') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - name, - updatedAt, - backupSelection, - isIosSharedAlbum, - 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.marker_ == this.marker_); -} - -class LocalAlbumEntityCompanion extends UpdateCompanion { - final Value id; - final Value name; - final Value updatedAt; - final Value backupSelection; - final Value isIosSharedAlbum; - 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.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.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? 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 (marker_ != null) 'marker': marker_, - }); - } - - LocalAlbumEntityCompanion copyWith({ - Value? id, - Value? name, - Value? updatedAt, - Value? backupSelection, - Value? isIosSharedAlbum, - Value? marker_, - }) { - return LocalAlbumEntityCompanion( - id: id ?? this.id, - name: name ?? this.name, - updatedAt: updatedAt ?? this.updatedAt, - backupSelection: backupSelection ?? this.backupSelection, - isIosSharedAlbum: isIosSharedAlbum ?? this.isIosSharedAlbum, - 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 (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('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', - ), - ); - @override - List get $columns => [assetId, albumId]; - @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'], - )!, - ); - } - - @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; - const LocalAlbumAssetEntityData({ - 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 LocalAlbumAssetEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return LocalAlbumAssetEntityData( - 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), - }; - } - - LocalAlbumAssetEntityData copyWith({String? assetId, String? albumId}) => - LocalAlbumAssetEntityData( - assetId: assetId ?? this.assetId, - albumId: albumId ?? this.albumId, - ); - LocalAlbumAssetEntityData copyWithCompanion( - LocalAlbumAssetEntityCompanion data, - ) { - return LocalAlbumAssetEntityData( - assetId: data.assetId.present ? data.assetId.value : this.assetId, - albumId: data.albumId.present ? data.albumId.value : this.albumId, - ); - } - - @override - String toString() { - return (StringBuffer('LocalAlbumAssetEntityData(') - ..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 LocalAlbumAssetEntityData && - other.assetId == this.assetId && - other.albumId == this.albumId); -} - -class LocalAlbumAssetEntityCompanion - extends UpdateCompanion { - final Value assetId; - final Value albumId; - const LocalAlbumAssetEntityCompanion({ - this.assetId = const Value.absent(), - this.albumId = const Value.absent(), - }); - LocalAlbumAssetEntityCompanion.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, - }); - } - - LocalAlbumAssetEntityCompanion copyWith({ - Value? assetId, - Value? albumId, - }) { - return LocalAlbumAssetEntityCompanion( - 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('LocalAlbumAssetEntityCompanion(') - ..write('assetId: $assetId, ') - ..write('albumId: $albumId') - ..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 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 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 thumbnailPath = GeneratedColumn( - 'thumbnail_path', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - 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, - thumbnailPath, - 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'], - ), - thumbnailPath: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}thumbnail_path'], - )!, - 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 String thumbnailPath; - 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.thumbnailPath, - 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['thumbnail_path'] = Variable(thumbnailPath); - 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']), - thumbnailPath: serializer.fromJson(json['thumbnailPath']), - 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), - 'thumbnailPath': serializer.toJson(thumbnailPath), - '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(), - String? thumbnailPath, - 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, - thumbnailPath: thumbnailPath ?? this.thumbnailPath, - 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, - thumbnailPath: data.thumbnailPath.present - ? data.thumbnailPath.value - : this.thumbnailPath, - 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('thumbnailPath: $thumbnailPath, ') - ..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, - thumbnailPath, - 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.thumbnailPath == this.thumbnailPath && - 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 thumbnailPath; - 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.thumbnailPath = 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 String thumbnailPath, - 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), - thumbnailPath = Value(thumbnailPath), - isFavorite = Value(isFavorite), - isHidden = Value(isHidden); - static Insertable custom({ - Expression? id, - Expression? createdAt, - Expression? updatedAt, - Expression? ownerId, - Expression? name, - Expression? faceAssetId, - Expression? thumbnailPath, - 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 (thumbnailPath != null) 'thumbnail_path': thumbnailPath, - 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? thumbnailPath, - 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, - thumbnailPath: thumbnailPath ?? this.thumbnailPath, - 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 (thumbnailPath.present) { - map['thumbnail_path'] = Variable(thumbnailPath.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('thumbnailPath: $thumbnailPath, ') - ..write('isFavorite: $isFavorite, ') - ..write('isHidden: $isHidden, ') - ..write('color: $color, ') - ..write('birthDate: $birthDate') - ..write(')')) - .toString(); - } -} - -class DatabaseAtV3 extends GeneratedDatabase { - DatabaseAtV3(QueryExecutor e) : super(e); - late final UserEntity userEntity = UserEntity(this); - late final RemoteAssetEntity remoteAssetEntity = RemoteAssetEntity(this); - late final LocalAssetEntity localAssetEntity = LocalAssetEntity(this); - late final StackEntity stackEntity = StackEntity(this); - late final Index idxLocalAssetChecksum = Index( - 'idx_local_asset_checksum', - 'CREATE INDEX idx_local_asset_checksum ON local_asset_entity (checksum)', - ); - late final Index uQRemoteAssetOwnerChecksum = Index( - 'UQ_remote_asset_owner_checksum', - 'CREATE UNIQUE INDEX UQ_remote_asset_owner_checksum ON remote_asset_entity (checksum, owner_id)', - ); - late final Index idxRemoteAssetChecksum = Index( - 'idx_remote_asset_checksum', - 'CREATE INDEX idx_remote_asset_checksum ON remote_asset_entity (checksum)', - ); - late final UserMetadataEntity userMetadataEntity = UserMetadataEntity(this); - late final PartnerEntity partnerEntity = PartnerEntity(this); - late final LocalAlbumEntity localAlbumEntity = LocalAlbumEntity(this); - late final LocalAlbumAssetEntity localAlbumAssetEntity = - LocalAlbumAssetEntity(this); - late final RemoteExifEntity remoteExifEntity = RemoteExifEntity(this); - late final RemoteAlbumEntity remoteAlbumEntity = RemoteAlbumEntity(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); - @override - Iterable> get allTables => - allSchemaEntities.whereType>(); - @override - List get allSchemaEntities => [ - userEntity, - remoteAssetEntity, - localAssetEntity, - stackEntity, - idxLocalAssetChecksum, - uQRemoteAssetOwnerChecksum, - idxRemoteAssetChecksum, - userMetadataEntity, - partnerEntity, - localAlbumEntity, - localAlbumAssetEntity, - remoteExifEntity, - remoteAlbumEntity, - remoteAlbumAssetEntity, - remoteAlbumUserEntity, - memoryEntity, - memoryAssetEntity, - personEntity, - ]; - @override - int get schemaVersion => 3; - @override - DriftDatabaseOptions get options => - const DriftDatabaseOptions(storeDateTimeAsText: true); -} diff --git a/mobile/test/drift/main/generated/schema_v30.dart b/mobile/test/drift/main/generated/schema_v30.dart deleted file mode 100644 index 642bd4aadd..0000000000 --- a/mobile/test/drift/main/generated/schema_v30.dart +++ /dev/null @@ -1,10027 +0,0 @@ -// dart format width=80 -import 'dart:typed_data' as i2; -// GENERATED BY drift_dev, DO NOT MODIFY. -// ignore_for_file: type=lint,unused_import -// -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, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn email = GeneratedColumn( - 'email', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn hasProfileImage = GeneratedColumn( - 'has_profile_image', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: - 'NOT NULL DEFAULT 0 CHECK (has_profile_image IN (0, 1))', - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn profileChangedAt = GeneratedColumn( - 'profile_changed_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn avatarColor = GeneratedColumn( - 'avatar_color', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0', - 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.int, - data['${effectivePrefix}has_profile_image'], - )!, - profileChangedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - 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; - @override - List get customConstraints => const ['PRIMARY KEY(id)']; - @override - bool get dontWriteConstraints => true; -} - -class UserEntityData extends DataClass implements Insertable { - final String id; - final String name; - final String email; - final int hasProfileImage; - final String 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, - int? hasProfileImage, - String? 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, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn type = GeneratedColumn( - 'type', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn width = GeneratedColumn( - 'width', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn height = GeneratedColumn( - 'height', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn durationMs = GeneratedColumn( - 'duration_ms', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn checksum = GeneratedColumn( - 'checksum', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn isFavorite = GeneratedColumn( - 'is_favorite', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0 CHECK (is_favorite IN (0, 1))', - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn ownerId = GeneratedColumn( - 'owner_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL REFERENCES user_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn localDateTime = GeneratedColumn( - 'local_date_time', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn thumbHash = GeneratedColumn( - 'thumb_hash', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn deletedAt = GeneratedColumn( - 'deleted_at', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn uploadedAt = GeneratedColumn( - 'uploaded_at', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn livePhotoVideoId = GeneratedColumn( - 'live_photo_video_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn visibility = GeneratedColumn( - 'visibility', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn stackId = GeneratedColumn( - 'stack_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn libraryId = GeneratedColumn( - 'library_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn isEdited = GeneratedColumn( - 'is_edited', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0 CHECK (is_edited IN (0, 1))', - defaultValue: const CustomExpression('0'), - ); - @override - List get $columns => [ - name, - type, - createdAt, - updatedAt, - width, - height, - durationMs, - id, - checksum, - isFavorite, - ownerId, - localDateTime, - thumbHash, - deletedAt, - uploadedAt, - livePhotoVideoId, - visibility, - stackId, - libraryId, - isEdited, - ]; - @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.string, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}updated_at'], - )!, - width: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}width'], - ), - height: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}height'], - ), - durationMs: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}duration_ms'], - ), - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - checksum: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}checksum'], - )!, - isFavorite: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}is_favorite'], - )!, - ownerId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}owner_id'], - )!, - localDateTime: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}local_date_time'], - ), - thumbHash: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}thumb_hash'], - ), - deletedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}deleted_at'], - ), - uploadedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}uploaded_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'], - ), - isEdited: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}is_edited'], - )!, - ); - } - - @override - RemoteAssetEntity createAlias(String alias) { - return RemoteAssetEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY(id)']; - @override - bool get dontWriteConstraints => true; -} - -class RemoteAssetEntityData extends DataClass - implements Insertable { - final String name; - final int type; - final String createdAt; - final String updatedAt; - final int? width; - final int? height; - final int? durationMs; - final String id; - final String checksum; - final int isFavorite; - final String ownerId; - final String? localDateTime; - final String? thumbHash; - final String? deletedAt; - final String? uploadedAt; - final String? livePhotoVideoId; - final int visibility; - final String? stackId; - final String? libraryId; - final int isEdited; - const RemoteAssetEntityData({ - required this.name, - required this.type, - required this.createdAt, - required this.updatedAt, - this.width, - this.height, - this.durationMs, - required this.id, - required this.checksum, - required this.isFavorite, - required this.ownerId, - this.localDateTime, - this.thumbHash, - this.deletedAt, - this.uploadedAt, - this.livePhotoVideoId, - required this.visibility, - this.stackId, - this.libraryId, - required this.isEdited, - }); - @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 || durationMs != null) { - map['duration_ms'] = Variable(durationMs); - } - 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 || uploadedAt != null) { - map['uploaded_at'] = Variable(uploadedAt); - } - 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); - } - map['is_edited'] = Variable(isEdited); - 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']), - durationMs: serializer.fromJson(json['durationMs']), - 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']), - uploadedAt: serializer.fromJson(json['uploadedAt']), - livePhotoVideoId: serializer.fromJson(json['livePhotoVideoId']), - visibility: serializer.fromJson(json['visibility']), - stackId: serializer.fromJson(json['stackId']), - libraryId: serializer.fromJson(json['libraryId']), - isEdited: serializer.fromJson(json['isEdited']), - ); - } - @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), - 'durationMs': serializer.toJson(durationMs), - '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), - 'uploadedAt': serializer.toJson(uploadedAt), - 'livePhotoVideoId': serializer.toJson(livePhotoVideoId), - 'visibility': serializer.toJson(visibility), - 'stackId': serializer.toJson(stackId), - 'libraryId': serializer.toJson(libraryId), - 'isEdited': serializer.toJson(isEdited), - }; - } - - RemoteAssetEntityData copyWith({ - String? name, - int? type, - String? createdAt, - String? updatedAt, - Value width = const Value.absent(), - Value height = const Value.absent(), - Value durationMs = const Value.absent(), - String? id, - String? checksum, - int? isFavorite, - String? ownerId, - Value localDateTime = const Value.absent(), - Value thumbHash = const Value.absent(), - Value deletedAt = const Value.absent(), - Value uploadedAt = const Value.absent(), - Value livePhotoVideoId = const Value.absent(), - int? visibility, - Value stackId = const Value.absent(), - Value libraryId = const Value.absent(), - int? isEdited, - }) => 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, - durationMs: durationMs.present ? durationMs.value : this.durationMs, - 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, - uploadedAt: uploadedAt.present ? uploadedAt.value : this.uploadedAt, - 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, - isEdited: isEdited ?? this.isEdited, - ); - 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, - durationMs: data.durationMs.present - ? data.durationMs.value - : this.durationMs, - 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, - uploadedAt: data.uploadedAt.present - ? data.uploadedAt.value - : this.uploadedAt, - 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, - isEdited: data.isEdited.present ? data.isEdited.value : this.isEdited, - ); - } - - @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('durationMs: $durationMs, ') - ..write('id: $id, ') - ..write('checksum: $checksum, ') - ..write('isFavorite: $isFavorite, ') - ..write('ownerId: $ownerId, ') - ..write('localDateTime: $localDateTime, ') - ..write('thumbHash: $thumbHash, ') - ..write('deletedAt: $deletedAt, ') - ..write('uploadedAt: $uploadedAt, ') - ..write('livePhotoVideoId: $livePhotoVideoId, ') - ..write('visibility: $visibility, ') - ..write('stackId: $stackId, ') - ..write('libraryId: $libraryId, ') - ..write('isEdited: $isEdited') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - name, - type, - createdAt, - updatedAt, - width, - height, - durationMs, - id, - checksum, - isFavorite, - ownerId, - localDateTime, - thumbHash, - deletedAt, - uploadedAt, - livePhotoVideoId, - visibility, - stackId, - libraryId, - isEdited, - ); - @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.durationMs == this.durationMs && - 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.uploadedAt == this.uploadedAt && - other.livePhotoVideoId == this.livePhotoVideoId && - other.visibility == this.visibility && - other.stackId == this.stackId && - other.libraryId == this.libraryId && - other.isEdited == this.isEdited); -} - -class RemoteAssetEntityCompanion - extends UpdateCompanion { - final Value name; - final Value type; - final Value createdAt; - final Value updatedAt; - final Value width; - final Value height; - final Value durationMs; - final Value id; - final Value checksum; - final Value isFavorite; - final Value ownerId; - final Value localDateTime; - final Value thumbHash; - final Value deletedAt; - final Value uploadedAt; - final Value livePhotoVideoId; - final Value visibility; - final Value stackId; - final Value libraryId; - final Value isEdited; - 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.durationMs = 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.uploadedAt = const Value.absent(), - this.livePhotoVideoId = const Value.absent(), - this.visibility = const Value.absent(), - this.stackId = const Value.absent(), - this.libraryId = const Value.absent(), - this.isEdited = 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.durationMs = 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.uploadedAt = const Value.absent(), - this.livePhotoVideoId = const Value.absent(), - required int visibility, - this.stackId = const Value.absent(), - this.libraryId = const Value.absent(), - this.isEdited = 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? durationMs, - Expression? id, - Expression? checksum, - Expression? isFavorite, - Expression? ownerId, - Expression? localDateTime, - Expression? thumbHash, - Expression? deletedAt, - Expression? uploadedAt, - Expression? livePhotoVideoId, - Expression? visibility, - Expression? stackId, - Expression? libraryId, - Expression? isEdited, - }) { - 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 (durationMs != null) 'duration_ms': durationMs, - 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 (uploadedAt != null) 'uploaded_at': uploadedAt, - 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, - if (isEdited != null) 'is_edited': isEdited, - }); - } - - RemoteAssetEntityCompanion copyWith({ - Value? name, - Value? type, - Value? createdAt, - Value? updatedAt, - Value? width, - Value? height, - Value? durationMs, - Value? id, - Value? checksum, - Value? isFavorite, - Value? ownerId, - Value? localDateTime, - Value? thumbHash, - Value? deletedAt, - Value? uploadedAt, - Value? livePhotoVideoId, - Value? visibility, - Value? stackId, - Value? libraryId, - Value? isEdited, - }) { - 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, - durationMs: durationMs ?? this.durationMs, - 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, - uploadedAt: uploadedAt ?? this.uploadedAt, - livePhotoVideoId: livePhotoVideoId ?? this.livePhotoVideoId, - visibility: visibility ?? this.visibility, - stackId: stackId ?? this.stackId, - libraryId: libraryId ?? this.libraryId, - isEdited: isEdited ?? this.isEdited, - ); - } - - @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 (durationMs.present) { - map['duration_ms'] = Variable(durationMs.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 (uploadedAt.present) { - map['uploaded_at'] = Variable(uploadedAt.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); - } - if (isEdited.present) { - map['is_edited'] = Variable(isEdited.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('durationMs: $durationMs, ') - ..write('id: $id, ') - ..write('checksum: $checksum, ') - ..write('isFavorite: $isFavorite, ') - ..write('ownerId: $ownerId, ') - ..write('localDateTime: $localDateTime, ') - ..write('thumbHash: $thumbHash, ') - ..write('deletedAt: $deletedAt, ') - ..write('uploadedAt: $uploadedAt, ') - ..write('livePhotoVideoId: $livePhotoVideoId, ') - ..write('visibility: $visibility, ') - ..write('stackId: $stackId, ') - ..write('libraryId: $libraryId, ') - ..write('isEdited: $isEdited') - ..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, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn ownerId = GeneratedColumn( - 'owner_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL REFERENCES user_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn primaryAssetId = GeneratedColumn( - 'primary_asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - @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.string, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - 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; - @override - List get customConstraints => const ['PRIMARY KEY(id)']; - @override - bool get dontWriteConstraints => true; -} - -class StackEntityData extends DataClass implements Insertable { - final String id; - final String createdAt; - final String 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, - String? createdAt, - String? 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, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn type = GeneratedColumn( - 'type', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn width = GeneratedColumn( - 'width', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn height = GeneratedColumn( - 'height', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn durationMs = GeneratedColumn( - 'duration_ms', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn checksum = GeneratedColumn( - 'checksum', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn isFavorite = GeneratedColumn( - 'is_favorite', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0 CHECK (is_favorite IN (0, 1))', - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn orientation = GeneratedColumn( - 'orientation', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0', - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn iCloudId = GeneratedColumn( - 'i_cloud_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn adjustmentTime = GeneratedColumn( - 'adjustment_time', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn latitude = GeneratedColumn( - 'latitude', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn longitude = GeneratedColumn( - 'longitude', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn playbackStyle = GeneratedColumn( - 'playback_style', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0', - defaultValue: const CustomExpression('0'), - ); - @override - List get $columns => [ - name, - type, - createdAt, - updatedAt, - width, - height, - durationMs, - id, - checksum, - isFavorite, - orientation, - iCloudId, - adjustmentTime, - latitude, - longitude, - playbackStyle, - ]; - @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.string, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}updated_at'], - )!, - width: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}width'], - ), - height: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}height'], - ), - durationMs: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}duration_ms'], - ), - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - checksum: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}checksum'], - ), - isFavorite: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}is_favorite'], - )!, - orientation: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}orientation'], - )!, - iCloudId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}i_cloud_id'], - ), - adjustmentTime: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}adjustment_time'], - ), - latitude: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}latitude'], - ), - longitude: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}longitude'], - ), - playbackStyle: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}playback_style'], - )!, - ); - } - - @override - LocalAssetEntity createAlias(String alias) { - return LocalAssetEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY(id)']; - @override - bool get dontWriteConstraints => true; -} - -class LocalAssetEntityData extends DataClass - implements Insertable { - final String name; - final int type; - final String createdAt; - final String updatedAt; - final int? width; - final int? height; - final int? durationMs; - final String id; - final String? checksum; - final int isFavorite; - final int orientation; - final String? iCloudId; - final String? adjustmentTime; - final double? latitude; - final double? longitude; - final int playbackStyle; - const LocalAssetEntityData({ - required this.name, - required this.type, - required this.createdAt, - required this.updatedAt, - this.width, - this.height, - this.durationMs, - required this.id, - this.checksum, - required this.isFavorite, - required this.orientation, - this.iCloudId, - this.adjustmentTime, - this.latitude, - this.longitude, - required this.playbackStyle, - }); - @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 || durationMs != null) { - map['duration_ms'] = Variable(durationMs); - } - map['id'] = Variable(id); - if (!nullToAbsent || checksum != null) { - map['checksum'] = Variable(checksum); - } - map['is_favorite'] = Variable(isFavorite); - map['orientation'] = Variable(orientation); - if (!nullToAbsent || iCloudId != null) { - map['i_cloud_id'] = Variable(iCloudId); - } - if (!nullToAbsent || adjustmentTime != null) { - map['adjustment_time'] = Variable(adjustmentTime); - } - if (!nullToAbsent || latitude != null) { - map['latitude'] = Variable(latitude); - } - if (!nullToAbsent || longitude != null) { - map['longitude'] = Variable(longitude); - } - map['playback_style'] = Variable(playbackStyle); - 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']), - durationMs: serializer.fromJson(json['durationMs']), - id: serializer.fromJson(json['id']), - checksum: serializer.fromJson(json['checksum']), - isFavorite: serializer.fromJson(json['isFavorite']), - orientation: serializer.fromJson(json['orientation']), - iCloudId: serializer.fromJson(json['iCloudId']), - adjustmentTime: serializer.fromJson(json['adjustmentTime']), - latitude: serializer.fromJson(json['latitude']), - longitude: serializer.fromJson(json['longitude']), - playbackStyle: serializer.fromJson(json['playbackStyle']), - ); - } - @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), - 'durationMs': serializer.toJson(durationMs), - 'id': serializer.toJson(id), - 'checksum': serializer.toJson(checksum), - 'isFavorite': serializer.toJson(isFavorite), - 'orientation': serializer.toJson(orientation), - 'iCloudId': serializer.toJson(iCloudId), - 'adjustmentTime': serializer.toJson(adjustmentTime), - 'latitude': serializer.toJson(latitude), - 'longitude': serializer.toJson(longitude), - 'playbackStyle': serializer.toJson(playbackStyle), - }; - } - - LocalAssetEntityData copyWith({ - String? name, - int? type, - String? createdAt, - String? updatedAt, - Value width = const Value.absent(), - Value height = const Value.absent(), - Value durationMs = const Value.absent(), - String? id, - Value checksum = const Value.absent(), - int? isFavorite, - int? orientation, - Value iCloudId = const Value.absent(), - Value adjustmentTime = const Value.absent(), - Value latitude = const Value.absent(), - Value longitude = const Value.absent(), - int? playbackStyle, - }) => 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, - durationMs: durationMs.present ? durationMs.value : this.durationMs, - id: id ?? this.id, - checksum: checksum.present ? checksum.value : this.checksum, - isFavorite: isFavorite ?? this.isFavorite, - orientation: orientation ?? this.orientation, - iCloudId: iCloudId.present ? iCloudId.value : this.iCloudId, - adjustmentTime: adjustmentTime.present - ? adjustmentTime.value - : this.adjustmentTime, - latitude: latitude.present ? latitude.value : this.latitude, - longitude: longitude.present ? longitude.value : this.longitude, - playbackStyle: playbackStyle ?? this.playbackStyle, - ); - 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, - durationMs: data.durationMs.present - ? data.durationMs.value - : this.durationMs, - 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, - iCloudId: data.iCloudId.present ? data.iCloudId.value : this.iCloudId, - adjustmentTime: data.adjustmentTime.present - ? data.adjustmentTime.value - : this.adjustmentTime, - latitude: data.latitude.present ? data.latitude.value : this.latitude, - longitude: data.longitude.present ? data.longitude.value : this.longitude, - playbackStyle: data.playbackStyle.present - ? data.playbackStyle.value - : this.playbackStyle, - ); - } - - @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('durationMs: $durationMs, ') - ..write('id: $id, ') - ..write('checksum: $checksum, ') - ..write('isFavorite: $isFavorite, ') - ..write('orientation: $orientation, ') - ..write('iCloudId: $iCloudId, ') - ..write('adjustmentTime: $adjustmentTime, ') - ..write('latitude: $latitude, ') - ..write('longitude: $longitude, ') - ..write('playbackStyle: $playbackStyle') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - name, - type, - createdAt, - updatedAt, - width, - height, - durationMs, - id, - checksum, - isFavorite, - orientation, - iCloudId, - adjustmentTime, - latitude, - longitude, - playbackStyle, - ); - @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.durationMs == this.durationMs && - other.id == this.id && - other.checksum == this.checksum && - other.isFavorite == this.isFavorite && - other.orientation == this.orientation && - other.iCloudId == this.iCloudId && - other.adjustmentTime == this.adjustmentTime && - other.latitude == this.latitude && - other.longitude == this.longitude && - other.playbackStyle == this.playbackStyle); -} - -class LocalAssetEntityCompanion extends UpdateCompanion { - final Value name; - final Value type; - final Value createdAt; - final Value updatedAt; - final Value width; - final Value height; - final Value durationMs; - final Value id; - final Value checksum; - final Value isFavorite; - final Value orientation; - final Value iCloudId; - final Value adjustmentTime; - final Value latitude; - final Value longitude; - final Value playbackStyle; - 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.durationMs = const Value.absent(), - this.id = const Value.absent(), - this.checksum = const Value.absent(), - this.isFavorite = const Value.absent(), - this.orientation = const Value.absent(), - this.iCloudId = const Value.absent(), - this.adjustmentTime = const Value.absent(), - this.latitude = const Value.absent(), - this.longitude = const Value.absent(), - this.playbackStyle = 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.durationMs = const Value.absent(), - required String id, - this.checksum = const Value.absent(), - this.isFavorite = const Value.absent(), - this.orientation = const Value.absent(), - this.iCloudId = const Value.absent(), - this.adjustmentTime = const Value.absent(), - this.latitude = const Value.absent(), - this.longitude = const Value.absent(), - this.playbackStyle = 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? durationMs, - Expression? id, - Expression? checksum, - Expression? isFavorite, - Expression? orientation, - Expression? iCloudId, - Expression? adjustmentTime, - Expression? latitude, - Expression? longitude, - Expression? playbackStyle, - }) { - 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 (durationMs != null) 'duration_ms': durationMs, - if (id != null) 'id': id, - if (checksum != null) 'checksum': checksum, - if (isFavorite != null) 'is_favorite': isFavorite, - if (orientation != null) 'orientation': orientation, - if (iCloudId != null) 'i_cloud_id': iCloudId, - if (adjustmentTime != null) 'adjustment_time': adjustmentTime, - if (latitude != null) 'latitude': latitude, - if (longitude != null) 'longitude': longitude, - if (playbackStyle != null) 'playback_style': playbackStyle, - }); - } - - LocalAssetEntityCompanion copyWith({ - Value? name, - Value? type, - Value? createdAt, - Value? updatedAt, - Value? width, - Value? height, - Value? durationMs, - Value? id, - Value? checksum, - Value? isFavorite, - Value? orientation, - Value? iCloudId, - Value? adjustmentTime, - Value? latitude, - Value? longitude, - Value? playbackStyle, - }) { - 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, - durationMs: durationMs ?? this.durationMs, - id: id ?? this.id, - checksum: checksum ?? this.checksum, - isFavorite: isFavorite ?? this.isFavorite, - orientation: orientation ?? this.orientation, - iCloudId: iCloudId ?? this.iCloudId, - adjustmentTime: adjustmentTime ?? this.adjustmentTime, - latitude: latitude ?? this.latitude, - longitude: longitude ?? this.longitude, - playbackStyle: playbackStyle ?? this.playbackStyle, - ); - } - - @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 (durationMs.present) { - map['duration_ms'] = Variable(durationMs.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); - } - if (iCloudId.present) { - map['i_cloud_id'] = Variable(iCloudId.value); - } - if (adjustmentTime.present) { - map['adjustment_time'] = Variable(adjustmentTime.value); - } - if (latitude.present) { - map['latitude'] = Variable(latitude.value); - } - if (longitude.present) { - map['longitude'] = Variable(longitude.value); - } - if (playbackStyle.present) { - map['playback_style'] = Variable(playbackStyle.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('durationMs: $durationMs, ') - ..write('id: $id, ') - ..write('checksum: $checksum, ') - ..write('isFavorite: $isFavorite, ') - ..write('orientation: $orientation, ') - ..write('iCloudId: $iCloudId, ') - ..write('adjustmentTime: $adjustmentTime, ') - ..write('latitude: $latitude, ') - ..write('longitude: $longitude, ') - ..write('playbackStyle: $playbackStyle') - ..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, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn description = GeneratedColumn( - 'description', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT \'\'', - defaultValue: const CustomExpression('\'\''), - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn thumbnailAssetId = GeneratedColumn( - 'thumbnail_asset_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: - 'NULL REFERENCES remote_asset_entity(id)ON DELETE SET NULL', - ); - late final GeneratedColumn isActivityEnabled = GeneratedColumn( - 'is_activity_enabled', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: - 'NOT NULL DEFAULT 1 CHECK (is_activity_enabled IN (0, 1))', - defaultValue: const CustomExpression('1'), - ); - late final GeneratedColumn order = GeneratedColumn( - 'order', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - @override - List get $columns => [ - id, - name, - description, - createdAt, - updatedAt, - 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.string, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}updated_at'], - )!, - thumbnailAssetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}thumbnail_asset_id'], - ), - isActivityEnabled: attachedDatabase.typeMapping.read( - DriftSqlType.int, - 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; - @override - List get customConstraints => const ['PRIMARY KEY(id)']; - @override - bool get dontWriteConstraints => true; -} - -class RemoteAlbumEntityData extends DataClass - implements Insertable { - final String id; - final String name; - final String description; - final String createdAt; - final String updatedAt; - final String? thumbnailAssetId; - final int isActivityEnabled; - final int order; - const RemoteAlbumEntityData({ - required this.id, - required this.name, - required this.description, - required this.createdAt, - required this.updatedAt, - 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); - 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']), - 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), - 'thumbnailAssetId': serializer.toJson(thumbnailAssetId), - 'isActivityEnabled': serializer.toJson(isActivityEnabled), - 'order': serializer.toJson(order), - }; - } - - RemoteAlbumEntityData copyWith({ - String? id, - String? name, - String? description, - String? createdAt, - String? updatedAt, - Value thumbnailAssetId = const Value.absent(), - int? isActivityEnabled, - int? order, - }) => RemoteAlbumEntityData( - id: id ?? this.id, - name: name ?? this.name, - description: description ?? this.description, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - 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, - 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('thumbnailAssetId: $thumbnailAssetId, ') - ..write('isActivityEnabled: $isActivityEnabled, ') - ..write('order: $order') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - name, - description, - createdAt, - updatedAt, - 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.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 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.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(), - this.thumbnailAssetId = const Value.absent(), - this.isActivityEnabled = const Value.absent(), - required int order, - }) : id = Value(id), - name = Value(name), - order = Value(order); - static Insertable custom({ - Expression? id, - Expression? name, - Expression? description, - Expression? createdAt, - Expression? updatedAt, - 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 (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? 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, - 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 (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('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, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn backupSelection = GeneratedColumn( - 'backup_selection', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn isIosSharedAlbum = GeneratedColumn( - 'is_ios_shared_album', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: - 'NOT NULL DEFAULT 0 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, - $customConstraints: - 'NULL REFERENCES remote_album_entity(id)ON DELETE SET NULL', - ); - late final GeneratedColumn marker = GeneratedColumn( - 'marker', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL 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.string, - data['${effectivePrefix}updated_at'], - )!, - backupSelection: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}backup_selection'], - )!, - isIosSharedAlbum: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}is_ios_shared_album'], - )!, - linkedRemoteAlbumId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}linked_remote_album_id'], - ), - marker: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}marker'], - ), - ); - } - - @override - LocalAlbumEntity createAlias(String alias) { - return LocalAlbumEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY(id)']; - @override - bool get dontWriteConstraints => true; -} - -class LocalAlbumEntityData extends DataClass - implements Insertable { - final String id; - final String name; - final String updatedAt; - final int backupSelection; - final int isIosSharedAlbum; - final String? linkedRemoteAlbumId; - final int? 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, - String? updatedAt, - int? backupSelection, - int? 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, - $customConstraints: - 'NOT NULL REFERENCES local_asset_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn albumId = GeneratedColumn( - 'album_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: - 'NOT NULL REFERENCES local_album_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn marker = GeneratedColumn( - 'marker', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL 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.int, - data['${effectivePrefix}marker'], - ), - ); - } - - @override - LocalAlbumAssetEntity createAlias(String alias) { - return LocalAlbumAssetEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const [ - 'PRIMARY KEY(asset_id, album_id)', - ]; - @override - bool get dontWriteConstraints => true; -} - -class LocalAlbumAssetEntityData extends DataClass - implements Insertable { - final String assetId; - final String albumId; - final int? 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, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn email = GeneratedColumn( - 'email', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn isAdmin = GeneratedColumn( - 'is_admin', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0 CHECK (is_admin IN (0, 1))', - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn hasProfileImage = GeneratedColumn( - 'has_profile_image', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: - 'NOT NULL DEFAULT 0 CHECK (has_profile_image IN (0, 1))', - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn profileChangedAt = GeneratedColumn( - 'profile_changed_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn avatarColor = GeneratedColumn( - 'avatar_color', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn quotaSizeInBytes = GeneratedColumn( - 'quota_size_in_bytes', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0', - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn quotaUsageInBytes = GeneratedColumn( - 'quota_usage_in_bytes', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0', - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn pinCode = GeneratedColumn( - 'pin_code', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - @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.int, - data['${effectivePrefix}is_admin'], - )!, - hasProfileImage: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}has_profile_image'], - )!, - profileChangedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - 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; - @override - List get customConstraints => const ['PRIMARY KEY(id)']; - @override - bool get dontWriteConstraints => true; -} - -class AuthUserEntityData extends DataClass - implements Insertable { - final String id; - final String name; - final String email; - final int isAdmin; - final int hasProfileImage; - final String 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, - int? isAdmin, - int? hasProfileImage, - String? 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, - $customConstraints: 'NOT NULL REFERENCES user_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn key = GeneratedColumn( - 'key', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn value = - GeneratedColumn( - 'value', - aliasedName, - false, - type: DriftSqlType.blob, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - @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; - @override - List get customConstraints => const ['PRIMARY KEY(user_id, "key")']; - @override - bool get dontWriteConstraints => true; -} - -class UserMetadataEntityData extends DataClass - implements Insertable { - final String userId; - final int key; - final i2.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, - i2.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 i2.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, - $customConstraints: 'NOT NULL REFERENCES user_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn sharedWithId = GeneratedColumn( - 'shared_with_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL REFERENCES user_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn inTimeline = GeneratedColumn( - 'in_timeline', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0 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.int, - data['${effectivePrefix}in_timeline'], - )!, - ); - } - - @override - PartnerEntity createAlias(String alias) { - return PartnerEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const [ - 'PRIMARY KEY(shared_by_id, shared_with_id)', - ]; - @override - bool get dontWriteConstraints => true; -} - -class PartnerEntityData extends DataClass - implements Insertable { - final String sharedById; - final String sharedWithId; - final int 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, - int? 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, - $customConstraints: - 'NOT NULL REFERENCES remote_asset_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn city = GeneratedColumn( - 'city', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn state = GeneratedColumn( - 'state', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn country = GeneratedColumn( - 'country', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn dateTimeOriginal = GeneratedColumn( - 'date_time_original', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn description = GeneratedColumn( - 'description', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn height = GeneratedColumn( - 'height', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn width = GeneratedColumn( - 'width', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn exposureTime = GeneratedColumn( - 'exposure_time', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn fNumber = GeneratedColumn( - 'f_number', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn fileSize = GeneratedColumn( - 'file_size', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn focalLength = GeneratedColumn( - 'focal_length', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn latitude = GeneratedColumn( - 'latitude', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn longitude = GeneratedColumn( - 'longitude', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn iso = GeneratedColumn( - 'iso', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn make = GeneratedColumn( - 'make', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn model = GeneratedColumn( - 'model', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn lens = GeneratedColumn( - 'lens', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn orientation = GeneratedColumn( - 'orientation', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn timeZone = GeneratedColumn( - 'time_zone', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn rating = GeneratedColumn( - 'rating', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn projectionType = GeneratedColumn( - 'projection_type', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - @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.string, - 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; - @override - List get customConstraints => const ['PRIMARY KEY(asset_id)']; - @override - bool get dontWriteConstraints => true; -} - -class RemoteExifEntityData extends DataClass - implements Insertable { - final String assetId; - final String? city; - final String? state; - final String? country; - final String? 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, - $customConstraints: - 'NOT NULL REFERENCES remote_asset_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn albumId = GeneratedColumn( - 'album_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: - 'NOT NULL 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; - @override - List get customConstraints => const [ - 'PRIMARY KEY(asset_id, album_id)', - ]; - @override - bool get dontWriteConstraints => 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, - $customConstraints: - 'NOT NULL REFERENCES remote_album_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn userId = GeneratedColumn( - 'user_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL REFERENCES user_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn role = GeneratedColumn( - 'role', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - @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; - @override - List get customConstraints => const [ - 'PRIMARY KEY(album_id, user_id)', - ]; - @override - bool get dontWriteConstraints => 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 RemoteAssetCloudIdEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - RemoteAssetCloudIdEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn assetId = GeneratedColumn( - 'asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: - 'NOT NULL REFERENCES remote_asset_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn cloudId = GeneratedColumn( - 'cloud_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn adjustmentTime = GeneratedColumn( - 'adjustment_time', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn latitude = GeneratedColumn( - 'latitude', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn longitude = GeneratedColumn( - 'longitude', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - @override - List get $columns => [ - assetId, - cloudId, - createdAt, - adjustmentTime, - latitude, - longitude, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'remote_asset_cloud_id_entity'; - @override - Set get $primaryKey => {assetId}; - @override - RemoteAssetCloudIdEntityData map( - Map data, { - String? tablePrefix, - }) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return RemoteAssetCloudIdEntityData( - assetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}asset_id'], - )!, - cloudId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}cloud_id'], - ), - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}created_at'], - ), - adjustmentTime: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}adjustment_time'], - ), - latitude: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}latitude'], - ), - longitude: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}longitude'], - ), - ); - } - - @override - RemoteAssetCloudIdEntity createAlias(String alias) { - return RemoteAssetCloudIdEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY(asset_id)']; - @override - bool get dontWriteConstraints => true; -} - -class RemoteAssetCloudIdEntityData extends DataClass - implements Insertable { - final String assetId; - final String? cloudId; - final String? createdAt; - final String? adjustmentTime; - final double? latitude; - final double? longitude; - const RemoteAssetCloudIdEntityData({ - required this.assetId, - this.cloudId, - this.createdAt, - this.adjustmentTime, - this.latitude, - this.longitude, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['asset_id'] = Variable(assetId); - if (!nullToAbsent || cloudId != null) { - map['cloud_id'] = Variable(cloudId); - } - if (!nullToAbsent || createdAt != null) { - map['created_at'] = Variable(createdAt); - } - if (!nullToAbsent || adjustmentTime != null) { - map['adjustment_time'] = Variable(adjustmentTime); - } - if (!nullToAbsent || latitude != null) { - map['latitude'] = Variable(latitude); - } - if (!nullToAbsent || longitude != null) { - map['longitude'] = Variable(longitude); - } - return map; - } - - factory RemoteAssetCloudIdEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return RemoteAssetCloudIdEntityData( - assetId: serializer.fromJson(json['assetId']), - cloudId: serializer.fromJson(json['cloudId']), - createdAt: serializer.fromJson(json['createdAt']), - adjustmentTime: serializer.fromJson(json['adjustmentTime']), - latitude: serializer.fromJson(json['latitude']), - longitude: serializer.fromJson(json['longitude']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'assetId': serializer.toJson(assetId), - 'cloudId': serializer.toJson(cloudId), - 'createdAt': serializer.toJson(createdAt), - 'adjustmentTime': serializer.toJson(adjustmentTime), - 'latitude': serializer.toJson(latitude), - 'longitude': serializer.toJson(longitude), - }; - } - - RemoteAssetCloudIdEntityData copyWith({ - String? assetId, - Value cloudId = const Value.absent(), - Value createdAt = const Value.absent(), - Value adjustmentTime = const Value.absent(), - Value latitude = const Value.absent(), - Value longitude = const Value.absent(), - }) => RemoteAssetCloudIdEntityData( - assetId: assetId ?? this.assetId, - cloudId: cloudId.present ? cloudId.value : this.cloudId, - createdAt: createdAt.present ? createdAt.value : this.createdAt, - adjustmentTime: adjustmentTime.present - ? adjustmentTime.value - : this.adjustmentTime, - latitude: latitude.present ? latitude.value : this.latitude, - longitude: longitude.present ? longitude.value : this.longitude, - ); - RemoteAssetCloudIdEntityData copyWithCompanion( - RemoteAssetCloudIdEntityCompanion data, - ) { - return RemoteAssetCloudIdEntityData( - assetId: data.assetId.present ? data.assetId.value : this.assetId, - cloudId: data.cloudId.present ? data.cloudId.value : this.cloudId, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - adjustmentTime: data.adjustmentTime.present - ? data.adjustmentTime.value - : this.adjustmentTime, - latitude: data.latitude.present ? data.latitude.value : this.latitude, - longitude: data.longitude.present ? data.longitude.value : this.longitude, - ); - } - - @override - String toString() { - return (StringBuffer('RemoteAssetCloudIdEntityData(') - ..write('assetId: $assetId, ') - ..write('cloudId: $cloudId, ') - ..write('createdAt: $createdAt, ') - ..write('adjustmentTime: $adjustmentTime, ') - ..write('latitude: $latitude, ') - ..write('longitude: $longitude') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - assetId, - cloudId, - createdAt, - adjustmentTime, - latitude, - longitude, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is RemoteAssetCloudIdEntityData && - other.assetId == this.assetId && - other.cloudId == this.cloudId && - other.createdAt == this.createdAt && - other.adjustmentTime == this.adjustmentTime && - other.latitude == this.latitude && - other.longitude == this.longitude); -} - -class RemoteAssetCloudIdEntityCompanion - extends UpdateCompanion { - final Value assetId; - final Value cloudId; - final Value createdAt; - final Value adjustmentTime; - final Value latitude; - final Value longitude; - const RemoteAssetCloudIdEntityCompanion({ - this.assetId = const Value.absent(), - this.cloudId = const Value.absent(), - this.createdAt = const Value.absent(), - this.adjustmentTime = const Value.absent(), - this.latitude = const Value.absent(), - this.longitude = const Value.absent(), - }); - RemoteAssetCloudIdEntityCompanion.insert({ - required String assetId, - this.cloudId = const Value.absent(), - this.createdAt = const Value.absent(), - this.adjustmentTime = const Value.absent(), - this.latitude = const Value.absent(), - this.longitude = const Value.absent(), - }) : assetId = Value(assetId); - static Insertable custom({ - Expression? assetId, - Expression? cloudId, - Expression? createdAt, - Expression? adjustmentTime, - Expression? latitude, - Expression? longitude, - }) { - return RawValuesInsertable({ - if (assetId != null) 'asset_id': assetId, - if (cloudId != null) 'cloud_id': cloudId, - if (createdAt != null) 'created_at': createdAt, - if (adjustmentTime != null) 'adjustment_time': adjustmentTime, - if (latitude != null) 'latitude': latitude, - if (longitude != null) 'longitude': longitude, - }); - } - - RemoteAssetCloudIdEntityCompanion copyWith({ - Value? assetId, - Value? cloudId, - Value? createdAt, - Value? adjustmentTime, - Value? latitude, - Value? longitude, - }) { - return RemoteAssetCloudIdEntityCompanion( - assetId: assetId ?? this.assetId, - cloudId: cloudId ?? this.cloudId, - createdAt: createdAt ?? this.createdAt, - adjustmentTime: adjustmentTime ?? this.adjustmentTime, - latitude: latitude ?? this.latitude, - longitude: longitude ?? this.longitude, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (assetId.present) { - map['asset_id'] = Variable(assetId.value); - } - if (cloudId.present) { - map['cloud_id'] = Variable(cloudId.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (adjustmentTime.present) { - map['adjustment_time'] = Variable(adjustmentTime.value); - } - if (latitude.present) { - map['latitude'] = Variable(latitude.value); - } - if (longitude.present) { - map['longitude'] = Variable(longitude.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('RemoteAssetCloudIdEntityCompanion(') - ..write('assetId: $assetId, ') - ..write('cloudId: $cloudId, ') - ..write('createdAt: $createdAt, ') - ..write('adjustmentTime: $adjustmentTime, ') - ..write('latitude: $latitude, ') - ..write('longitude: $longitude') - ..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, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn deletedAt = GeneratedColumn( - 'deleted_at', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn ownerId = GeneratedColumn( - 'owner_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL REFERENCES user_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn type = GeneratedColumn( - 'type', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn data = GeneratedColumn( - 'data', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn isSaved = GeneratedColumn( - 'is_saved', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0 CHECK (is_saved IN (0, 1))', - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn memoryAt = GeneratedColumn( - 'memory_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn seenAt = GeneratedColumn( - 'seen_at', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn showAt = GeneratedColumn( - 'show_at', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn hideAt = GeneratedColumn( - 'hide_at', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - @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.string, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}updated_at'], - )!, - deletedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - 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.int, - data['${effectivePrefix}is_saved'], - )!, - memoryAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}memory_at'], - )!, - seenAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}seen_at'], - ), - showAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}show_at'], - ), - hideAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}hide_at'], - ), - ); - } - - @override - MemoryEntity createAlias(String alias) { - return MemoryEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY(id)']; - @override - bool get dontWriteConstraints => true; -} - -class MemoryEntityData extends DataClass - implements Insertable { - final String id; - final String createdAt; - final String updatedAt; - final String? deletedAt; - final String ownerId; - final int type; - final String data; - final int isSaved; - final String memoryAt; - final String? seenAt; - final String? showAt; - final String? 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, - String? createdAt, - String? updatedAt, - Value deletedAt = const Value.absent(), - String? ownerId, - int? type, - String? data, - int? isSaved, - String? 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 String 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, - $customConstraints: - 'NOT NULL REFERENCES remote_asset_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn memoryId = GeneratedColumn( - 'memory_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: - 'NOT NULL 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; - @override - List get customConstraints => const [ - 'PRIMARY KEY(asset_id, memory_id)', - ]; - @override - bool get dontWriteConstraints => 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, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn ownerId = GeneratedColumn( - 'owner_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL REFERENCES user_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn faceAssetId = GeneratedColumn( - 'face_asset_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn isFavorite = GeneratedColumn( - 'is_favorite', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL CHECK (is_favorite IN (0, 1))', - ); - late final GeneratedColumn isHidden = GeneratedColumn( - 'is_hidden', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL CHECK (is_hidden IN (0, 1))', - ); - late final GeneratedColumn color = GeneratedColumn( - 'color', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn birthDate = GeneratedColumn( - 'birth_date', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - @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.string, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - 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.int, - data['${effectivePrefix}is_favorite'], - )!, - isHidden: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}is_hidden'], - )!, - color: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}color'], - ), - birthDate: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}birth_date'], - ), - ); - } - - @override - PersonEntity createAlias(String alias) { - return PersonEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY(id)']; - @override - bool get dontWriteConstraints => true; -} - -class PersonEntityData extends DataClass - implements Insertable { - final String id; - final String createdAt; - final String updatedAt; - final String ownerId; - final String name; - final String? faceAssetId; - final int isFavorite; - final int isHidden; - final String? color; - final String? 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, - String? createdAt, - String? updatedAt, - String? ownerId, - String? name, - Value faceAssetId = const Value.absent(), - int? isFavorite, - int? 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 int isFavorite, - required int 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, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn assetId = GeneratedColumn( - 'asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: - 'NOT NULL REFERENCES remote_asset_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn personId = GeneratedColumn( - 'person_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL REFERENCES person_entity(id)ON DELETE SET NULL', - ); - late final GeneratedColumn imageWidth = GeneratedColumn( - 'image_width', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn imageHeight = GeneratedColumn( - 'image_height', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn boundingBoxX1 = GeneratedColumn( - 'bounding_box_x1', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn boundingBoxY1 = GeneratedColumn( - 'bounding_box_y1', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn boundingBoxX2 = GeneratedColumn( - 'bounding_box_x2', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn boundingBoxY2 = GeneratedColumn( - 'bounding_box_y2', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn sourceType = GeneratedColumn( - 'source_type', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn isVisible = GeneratedColumn( - 'is_visible', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 1 CHECK (is_visible IN (0, 1))', - defaultValue: const CustomExpression('1'), - ); - late final GeneratedColumn deletedAt = GeneratedColumn( - 'deleted_at', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - @override - List get $columns => [ - id, - assetId, - personId, - imageWidth, - imageHeight, - boundingBoxX1, - boundingBoxY1, - boundingBoxX2, - boundingBoxY2, - sourceType, - isVisible, - deletedAt, - ]; - @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'], - )!, - isVisible: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}is_visible'], - )!, - deletedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}deleted_at'], - ), - ); - } - - @override - AssetFaceEntity createAlias(String alias) { - return AssetFaceEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY(id)']; - @override - bool get dontWriteConstraints => 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; - final int isVisible; - final String? deletedAt; - 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, - required this.isVisible, - this.deletedAt, - }); - @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); - map['is_visible'] = Variable(isVisible); - if (!nullToAbsent || deletedAt != null) { - map['deleted_at'] = Variable(deletedAt); - } - 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']), - isVisible: serializer.fromJson(json['isVisible']), - deletedAt: serializer.fromJson(json['deletedAt']), - ); - } - @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), - 'isVisible': serializer.toJson(isVisible), - 'deletedAt': serializer.toJson(deletedAt), - }; - } - - 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, - int? isVisible, - Value deletedAt = const Value.absent(), - }) => 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, - isVisible: isVisible ?? this.isVisible, - deletedAt: deletedAt.present ? deletedAt.value : this.deletedAt, - ); - 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, - isVisible: data.isVisible.present ? data.isVisible.value : this.isVisible, - deletedAt: data.deletedAt.present ? data.deletedAt.value : this.deletedAt, - ); - } - - @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('isVisible: $isVisible, ') - ..write('deletedAt: $deletedAt') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - assetId, - personId, - imageWidth, - imageHeight, - boundingBoxX1, - boundingBoxY1, - boundingBoxX2, - boundingBoxY2, - sourceType, - isVisible, - deletedAt, - ); - @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 && - other.isVisible == this.isVisible && - other.deletedAt == this.deletedAt); -} - -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; - final Value isVisible; - final Value deletedAt; - 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(), - this.isVisible = const Value.absent(), - this.deletedAt = 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, - this.isVisible = const Value.absent(), - this.deletedAt = const Value.absent(), - }) : 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, - Expression? isVisible, - Expression? deletedAt, - }) { - 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, - if (isVisible != null) 'is_visible': isVisible, - if (deletedAt != null) 'deleted_at': deletedAt, - }); - } - - AssetFaceEntityCompanion copyWith({ - Value? id, - Value? assetId, - Value? personId, - Value? imageWidth, - Value? imageHeight, - Value? boundingBoxX1, - Value? boundingBoxY1, - Value? boundingBoxX2, - Value? boundingBoxY2, - Value? sourceType, - Value? isVisible, - Value? deletedAt, - }) { - 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, - isVisible: isVisible ?? this.isVisible, - deletedAt: deletedAt ?? this.deletedAt, - ); - } - - @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); - } - if (isVisible.present) { - map['is_visible'] = Variable(isVisible.value); - } - if (deletedAt.present) { - map['deleted_at'] = Variable(deletedAt.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('isVisible: $isVisible, ') - ..write('deletedAt: $deletedAt') - ..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, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn stringValue = GeneratedColumn( - 'string_value', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn intValue = GeneratedColumn( - 'int_value', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - @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; - @override - List get customConstraints => const ['PRIMARY KEY(id)']; - @override - bool get dontWriteConstraints => 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, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn type = GeneratedColumn( - 'type', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn width = GeneratedColumn( - 'width', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn height = GeneratedColumn( - 'height', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn durationMs = GeneratedColumn( - 'duration_ms', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn albumId = GeneratedColumn( - 'album_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn checksum = GeneratedColumn( - 'checksum', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn isFavorite = GeneratedColumn( - 'is_favorite', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0 CHECK (is_favorite IN (0, 1))', - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn orientation = GeneratedColumn( - 'orientation', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0', - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn source = GeneratedColumn( - 'source', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn playbackStyle = GeneratedColumn( - 'playback_style', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0', - defaultValue: const CustomExpression('0'), - ); - @override - List get $columns => [ - name, - type, - createdAt, - updatedAt, - width, - height, - durationMs, - id, - albumId, - checksum, - isFavorite, - orientation, - source, - playbackStyle, - ]; - @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.string, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}updated_at'], - )!, - width: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}width'], - ), - height: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}height'], - ), - durationMs: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}duration_ms'], - ), - 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.int, - data['${effectivePrefix}is_favorite'], - )!, - orientation: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}orientation'], - )!, - source: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}source'], - )!, - playbackStyle: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}playback_style'], - )!, - ); - } - - @override - TrashedLocalAssetEntity createAlias(String alias) { - return TrashedLocalAssetEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY(id, album_id)']; - @override - bool get dontWriteConstraints => true; -} - -class TrashedLocalAssetEntityData extends DataClass - implements Insertable { - final String name; - final int type; - final String createdAt; - final String updatedAt; - final int? width; - final int? height; - final int? durationMs; - final String id; - final String albumId; - final String? checksum; - final int isFavorite; - final int orientation; - final int source; - final int playbackStyle; - const TrashedLocalAssetEntityData({ - required this.name, - required this.type, - required this.createdAt, - required this.updatedAt, - this.width, - this.height, - this.durationMs, - required this.id, - required this.albumId, - this.checksum, - required this.isFavorite, - required this.orientation, - required this.source, - required this.playbackStyle, - }); - @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 || durationMs != null) { - map['duration_ms'] = Variable(durationMs); - } - 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); - map['source'] = Variable(source); - map['playback_style'] = Variable(playbackStyle); - 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']), - durationMs: serializer.fromJson(json['durationMs']), - 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']), - source: serializer.fromJson(json['source']), - playbackStyle: serializer.fromJson(json['playbackStyle']), - ); - } - @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), - 'durationMs': serializer.toJson(durationMs), - 'id': serializer.toJson(id), - 'albumId': serializer.toJson(albumId), - 'checksum': serializer.toJson(checksum), - 'isFavorite': serializer.toJson(isFavorite), - 'orientation': serializer.toJson(orientation), - 'source': serializer.toJson(source), - 'playbackStyle': serializer.toJson(playbackStyle), - }; - } - - TrashedLocalAssetEntityData copyWith({ - String? name, - int? type, - String? createdAt, - String? updatedAt, - Value width = const Value.absent(), - Value height = const Value.absent(), - Value durationMs = const Value.absent(), - String? id, - String? albumId, - Value checksum = const Value.absent(), - int? isFavorite, - int? orientation, - int? source, - int? playbackStyle, - }) => 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, - durationMs: durationMs.present ? durationMs.value : this.durationMs, - id: id ?? this.id, - albumId: albumId ?? this.albumId, - checksum: checksum.present ? checksum.value : this.checksum, - isFavorite: isFavorite ?? this.isFavorite, - orientation: orientation ?? this.orientation, - source: source ?? this.source, - playbackStyle: playbackStyle ?? this.playbackStyle, - ); - 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, - durationMs: data.durationMs.present - ? data.durationMs.value - : this.durationMs, - 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, - source: data.source.present ? data.source.value : this.source, - playbackStyle: data.playbackStyle.present - ? data.playbackStyle.value - : this.playbackStyle, - ); - } - - @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('durationMs: $durationMs, ') - ..write('id: $id, ') - ..write('albumId: $albumId, ') - ..write('checksum: $checksum, ') - ..write('isFavorite: $isFavorite, ') - ..write('orientation: $orientation, ') - ..write('source: $source, ') - ..write('playbackStyle: $playbackStyle') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - name, - type, - createdAt, - updatedAt, - width, - height, - durationMs, - id, - albumId, - checksum, - isFavorite, - orientation, - source, - playbackStyle, - ); - @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.durationMs == this.durationMs && - other.id == this.id && - other.albumId == this.albumId && - other.checksum == this.checksum && - other.isFavorite == this.isFavorite && - other.orientation == this.orientation && - other.source == this.source && - other.playbackStyle == this.playbackStyle); -} - -class TrashedLocalAssetEntityCompanion - extends UpdateCompanion { - final Value name; - final Value type; - final Value createdAt; - final Value updatedAt; - final Value width; - final Value height; - final Value durationMs; - final Value id; - final Value albumId; - final Value checksum; - final Value isFavorite; - final Value orientation; - final Value source; - final Value playbackStyle; - 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.durationMs = 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(), - this.source = const Value.absent(), - this.playbackStyle = 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.durationMs = const Value.absent(), - required String id, - required String albumId, - this.checksum = const Value.absent(), - this.isFavorite = const Value.absent(), - this.orientation = const Value.absent(), - required int source, - this.playbackStyle = const Value.absent(), - }) : name = Value(name), - type = Value(type), - id = Value(id), - albumId = Value(albumId), - source = Value(source); - static Insertable custom({ - Expression? name, - Expression? type, - Expression? createdAt, - Expression? updatedAt, - Expression? width, - Expression? height, - Expression? durationMs, - Expression? id, - Expression? albumId, - Expression? checksum, - Expression? isFavorite, - Expression? orientation, - Expression? source, - Expression? playbackStyle, - }) { - 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 (durationMs != null) 'duration_ms': durationMs, - 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, - if (source != null) 'source': source, - if (playbackStyle != null) 'playback_style': playbackStyle, - }); - } - - TrashedLocalAssetEntityCompanion copyWith({ - Value? name, - Value? type, - Value? createdAt, - Value? updatedAt, - Value? width, - Value? height, - Value? durationMs, - Value? id, - Value? albumId, - Value? checksum, - Value? isFavorite, - Value? orientation, - Value? source, - Value? playbackStyle, - }) { - 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, - durationMs: durationMs ?? this.durationMs, - id: id ?? this.id, - albumId: albumId ?? this.albumId, - checksum: checksum ?? this.checksum, - isFavorite: isFavorite ?? this.isFavorite, - orientation: orientation ?? this.orientation, - source: source ?? this.source, - playbackStyle: playbackStyle ?? this.playbackStyle, - ); - } - - @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 (durationMs.present) { - map['duration_ms'] = Variable(durationMs.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); - } - if (source.present) { - map['source'] = Variable(source.value); - } - if (playbackStyle.present) { - map['playback_style'] = Variable(playbackStyle.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('durationMs: $durationMs, ') - ..write('id: $id, ') - ..write('albumId: $albumId, ') - ..write('checksum: $checksum, ') - ..write('isFavorite: $isFavorite, ') - ..write('orientation: $orientation, ') - ..write('source: $source, ') - ..write('playbackStyle: $playbackStyle') - ..write(')')) - .toString(); - } -} - -class AssetEditEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - AssetEditEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn assetId = GeneratedColumn( - 'asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: - 'NOT NULL REFERENCES remote_asset_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn action = GeneratedColumn( - 'action', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn parameters = - GeneratedColumn( - 'parameters', - aliasedName, - false, - type: DriftSqlType.blob, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn sequence = GeneratedColumn( - 'sequence', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - @override - List get $columns => [ - id, - assetId, - action, - parameters, - sequence, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'asset_edit_entity'; - @override - Set get $primaryKey => {id}; - @override - AssetEditEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return AssetEditEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - assetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}asset_id'], - )!, - action: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}action'], - )!, - parameters: attachedDatabase.typeMapping.read( - DriftSqlType.blob, - data['${effectivePrefix}parameters'], - )!, - sequence: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}sequence'], - )!, - ); - } - - @override - AssetEditEntity createAlias(String alias) { - return AssetEditEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY(id)']; - @override - bool get dontWriteConstraints => true; -} - -class AssetEditEntityData extends DataClass - implements Insertable { - final String id; - final String assetId; - final int action; - final i2.Uint8List parameters; - final int sequence; - const AssetEditEntityData({ - required this.id, - required this.assetId, - required this.action, - required this.parameters, - required this.sequence, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['asset_id'] = Variable(assetId); - map['action'] = Variable(action); - map['parameters'] = Variable(parameters); - map['sequence'] = Variable(sequence); - return map; - } - - factory AssetEditEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return AssetEditEntityData( - id: serializer.fromJson(json['id']), - assetId: serializer.fromJson(json['assetId']), - action: serializer.fromJson(json['action']), - parameters: serializer.fromJson(json['parameters']), - sequence: serializer.fromJson(json['sequence']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'assetId': serializer.toJson(assetId), - 'action': serializer.toJson(action), - 'parameters': serializer.toJson(parameters), - 'sequence': serializer.toJson(sequence), - }; - } - - AssetEditEntityData copyWith({ - String? id, - String? assetId, - int? action, - i2.Uint8List? parameters, - int? sequence, - }) => AssetEditEntityData( - id: id ?? this.id, - assetId: assetId ?? this.assetId, - action: action ?? this.action, - parameters: parameters ?? this.parameters, - sequence: sequence ?? this.sequence, - ); - AssetEditEntityData copyWithCompanion(AssetEditEntityCompanion data) { - return AssetEditEntityData( - id: data.id.present ? data.id.value : this.id, - assetId: data.assetId.present ? data.assetId.value : this.assetId, - action: data.action.present ? data.action.value : this.action, - parameters: data.parameters.present - ? data.parameters.value - : this.parameters, - sequence: data.sequence.present ? data.sequence.value : this.sequence, - ); - } - - @override - String toString() { - return (StringBuffer('AssetEditEntityData(') - ..write('id: $id, ') - ..write('assetId: $assetId, ') - ..write('action: $action, ') - ..write('parameters: $parameters, ') - ..write('sequence: $sequence') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - assetId, - action, - $driftBlobEquality.hash(parameters), - sequence, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is AssetEditEntityData && - other.id == this.id && - other.assetId == this.assetId && - other.action == this.action && - $driftBlobEquality.equals(other.parameters, this.parameters) && - other.sequence == this.sequence); -} - -class AssetEditEntityCompanion extends UpdateCompanion { - final Value id; - final Value assetId; - final Value action; - final Value parameters; - final Value sequence; - const AssetEditEntityCompanion({ - this.id = const Value.absent(), - this.assetId = const Value.absent(), - this.action = const Value.absent(), - this.parameters = const Value.absent(), - this.sequence = const Value.absent(), - }); - AssetEditEntityCompanion.insert({ - required String id, - required String assetId, - required int action, - required i2.Uint8List parameters, - required int sequence, - }) : id = Value(id), - assetId = Value(assetId), - action = Value(action), - parameters = Value(parameters), - sequence = Value(sequence); - static Insertable custom({ - Expression? id, - Expression? assetId, - Expression? action, - Expression? parameters, - Expression? sequence, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (assetId != null) 'asset_id': assetId, - if (action != null) 'action': action, - if (parameters != null) 'parameters': parameters, - if (sequence != null) 'sequence': sequence, - }); - } - - AssetEditEntityCompanion copyWith({ - Value? id, - Value? assetId, - Value? action, - Value? parameters, - Value? sequence, - }) { - return AssetEditEntityCompanion( - id: id ?? this.id, - assetId: assetId ?? this.assetId, - action: action ?? this.action, - parameters: parameters ?? this.parameters, - sequence: sequence ?? this.sequence, - ); - } - - @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 (action.present) { - map['action'] = Variable(action.value); - } - if (parameters.present) { - map['parameters'] = Variable(parameters.value); - } - if (sequence.present) { - map['sequence'] = Variable(sequence.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('AssetEditEntityCompanion(') - ..write('id: $id, ') - ..write('assetId: $assetId, ') - ..write('action: $action, ') - ..write('parameters: $parameters, ') - ..write('sequence: $sequence') - ..write(')')) - .toString(); - } -} - -class Settings extends Table with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - Settings(this.attachedDatabase, [this._alias]); - late final GeneratedColumn key = GeneratedColumn( - 'key', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn value = GeneratedColumn( - 'value', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - @override - List get $columns => [key, value, updatedAt]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'settings'; - @override - Set get $primaryKey => {key}; - @override - SettingsData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return SettingsData( - key: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}key'], - )!, - value: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}value'], - ), - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}updated_at'], - )!, - ); - } - - @override - Settings createAlias(String alias) { - return Settings(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY("key")']; - @override - bool get dontWriteConstraints => true; -} - -class SettingsData extends DataClass implements Insertable { - final String key; - final String? value; - final String updatedAt; - const SettingsData({required this.key, this.value, required this.updatedAt}); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['key'] = Variable(key); - if (!nullToAbsent || value != null) { - map['value'] = Variable(value); - } - map['updated_at'] = Variable(updatedAt); - return map; - } - - factory SettingsData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return SettingsData( - key: serializer.fromJson(json['key']), - value: serializer.fromJson(json['value']), - updatedAt: serializer.fromJson(json['updatedAt']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'key': serializer.toJson(key), - 'value': serializer.toJson(value), - 'updatedAt': serializer.toJson(updatedAt), - }; - } - - SettingsData copyWith({ - String? key, - Value value = const Value.absent(), - String? updatedAt, - }) => SettingsData( - key: key ?? this.key, - value: value.present ? value.value : this.value, - updatedAt: updatedAt ?? this.updatedAt, - ); - SettingsData copyWithCompanion(SettingsCompanion data) { - return SettingsData( - key: data.key.present ? data.key.value : this.key, - value: data.value.present ? data.value.value : this.value, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - ); - } - - @override - String toString() { - return (StringBuffer('SettingsData(') - ..write('key: $key, ') - ..write('value: $value, ') - ..write('updatedAt: $updatedAt') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(key, value, updatedAt); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is SettingsData && - other.key == this.key && - other.value == this.value && - other.updatedAt == this.updatedAt); -} - -class SettingsCompanion extends UpdateCompanion { - final Value key; - final Value value; - final Value updatedAt; - const SettingsCompanion({ - this.key = const Value.absent(), - this.value = const Value.absent(), - this.updatedAt = const Value.absent(), - }); - SettingsCompanion.insert({ - required String key, - this.value = const Value.absent(), - this.updatedAt = const Value.absent(), - }) : key = Value(key); - static Insertable custom({ - Expression? key, - Expression? value, - Expression? updatedAt, - }) { - return RawValuesInsertable({ - if (key != null) 'key': key, - if (value != null) 'value': value, - if (updatedAt != null) 'updated_at': updatedAt, - }); - } - - SettingsCompanion copyWith({ - Value? key, - Value? value, - Value? updatedAt, - }) { - return SettingsCompanion( - key: key ?? this.key, - value: value ?? this.value, - updatedAt: updatedAt ?? this.updatedAt, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (key.present) { - map['key'] = Variable(key.value); - } - if (value.present) { - map['value'] = Variable(value.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('SettingsCompanion(') - ..write('key: $key, ') - ..write('value: $value, ') - ..write('updatedAt: $updatedAt') - ..write(')')) - .toString(); - } -} - -class AssetOcrEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - AssetOcrEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn assetId = GeneratedColumn( - 'asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: - 'NOT NULL REFERENCES remote_asset_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn x1 = GeneratedColumn( - 'x1', - aliasedName, - false, - type: DriftSqlType.double, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn y1 = GeneratedColumn( - 'y1', - aliasedName, - false, - type: DriftSqlType.double, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn x2 = GeneratedColumn( - 'x2', - aliasedName, - false, - type: DriftSqlType.double, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn y2 = GeneratedColumn( - 'y2', - aliasedName, - false, - type: DriftSqlType.double, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn x3 = GeneratedColumn( - 'x3', - aliasedName, - false, - type: DriftSqlType.double, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn y3 = GeneratedColumn( - 'y3', - aliasedName, - false, - type: DriftSqlType.double, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn x4 = GeneratedColumn( - 'x4', - aliasedName, - false, - type: DriftSqlType.double, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn y4 = GeneratedColumn( - 'y4', - aliasedName, - false, - type: DriftSqlType.double, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn boxScore = GeneratedColumn( - 'box_score', - aliasedName, - false, - type: DriftSqlType.double, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn textScore = GeneratedColumn( - 'text_score', - aliasedName, - false, - type: DriftSqlType.double, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn recognizedText = GeneratedColumn( - 'recognized_text', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn isVisible = GeneratedColumn( - 'is_visible', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 1 CHECK (is_visible IN (0, 1))', - defaultValue: const CustomExpression('1'), - ); - @override - List get $columns => [ - id, - assetId, - x1, - y1, - x2, - y2, - x3, - y3, - x4, - y4, - boxScore, - textScore, - recognizedText, - isVisible, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'asset_ocr_entity'; - @override - Set get $primaryKey => {id}; - @override - AssetOcrEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return AssetOcrEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - assetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}asset_id'], - )!, - x1: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}x1'], - )!, - y1: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}y1'], - )!, - x2: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}x2'], - )!, - y2: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}y2'], - )!, - x3: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}x3'], - )!, - y3: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}y3'], - )!, - x4: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}x4'], - )!, - y4: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}y4'], - )!, - boxScore: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}box_score'], - )!, - textScore: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}text_score'], - )!, - recognizedText: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}recognized_text'], - )!, - isVisible: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}is_visible'], - )!, - ); - } - - @override - AssetOcrEntity createAlias(String alias) { - return AssetOcrEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY(id)']; - @override - bool get dontWriteConstraints => true; -} - -class AssetOcrEntityData extends DataClass - implements Insertable { - final String id; - final String assetId; - final double x1; - final double y1; - final double x2; - final double y2; - final double x3; - final double y3; - final double x4; - final double y4; - final double boxScore; - final double textScore; - final String recognizedText; - final int isVisible; - const AssetOcrEntityData({ - required this.id, - required this.assetId, - required this.x1, - required this.y1, - required this.x2, - required this.y2, - required this.x3, - required this.y3, - required this.x4, - required this.y4, - required this.boxScore, - required this.textScore, - required this.recognizedText, - required this.isVisible, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['asset_id'] = Variable(assetId); - map['x1'] = Variable(x1); - map['y1'] = Variable(y1); - map['x2'] = Variable(x2); - map['y2'] = Variable(y2); - map['x3'] = Variable(x3); - map['y3'] = Variable(y3); - map['x4'] = Variable(x4); - map['y4'] = Variable(y4); - map['box_score'] = Variable(boxScore); - map['text_score'] = Variable(textScore); - map['recognized_text'] = Variable(recognizedText); - map['is_visible'] = Variable(isVisible); - return map; - } - - factory AssetOcrEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return AssetOcrEntityData( - id: serializer.fromJson(json['id']), - assetId: serializer.fromJson(json['assetId']), - x1: serializer.fromJson(json['x1']), - y1: serializer.fromJson(json['y1']), - x2: serializer.fromJson(json['x2']), - y2: serializer.fromJson(json['y2']), - x3: serializer.fromJson(json['x3']), - y3: serializer.fromJson(json['y3']), - x4: serializer.fromJson(json['x4']), - y4: serializer.fromJson(json['y4']), - boxScore: serializer.fromJson(json['boxScore']), - textScore: serializer.fromJson(json['textScore']), - recognizedText: serializer.fromJson(json['recognizedText']), - isVisible: serializer.fromJson(json['isVisible']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'assetId': serializer.toJson(assetId), - 'x1': serializer.toJson(x1), - 'y1': serializer.toJson(y1), - 'x2': serializer.toJson(x2), - 'y2': serializer.toJson(y2), - 'x3': serializer.toJson(x3), - 'y3': serializer.toJson(y3), - 'x4': serializer.toJson(x4), - 'y4': serializer.toJson(y4), - 'boxScore': serializer.toJson(boxScore), - 'textScore': serializer.toJson(textScore), - 'recognizedText': serializer.toJson(recognizedText), - 'isVisible': serializer.toJson(isVisible), - }; - } - - AssetOcrEntityData copyWith({ - String? id, - String? assetId, - double? x1, - double? y1, - double? x2, - double? y2, - double? x3, - double? y3, - double? x4, - double? y4, - double? boxScore, - double? textScore, - String? recognizedText, - int? isVisible, - }) => AssetOcrEntityData( - id: id ?? this.id, - assetId: assetId ?? this.assetId, - x1: x1 ?? this.x1, - y1: y1 ?? this.y1, - x2: x2 ?? this.x2, - y2: y2 ?? this.y2, - x3: x3 ?? this.x3, - y3: y3 ?? this.y3, - x4: x4 ?? this.x4, - y4: y4 ?? this.y4, - boxScore: boxScore ?? this.boxScore, - textScore: textScore ?? this.textScore, - recognizedText: recognizedText ?? this.recognizedText, - isVisible: isVisible ?? this.isVisible, - ); - AssetOcrEntityData copyWithCompanion(AssetOcrEntityCompanion data) { - return AssetOcrEntityData( - id: data.id.present ? data.id.value : this.id, - assetId: data.assetId.present ? data.assetId.value : this.assetId, - x1: data.x1.present ? data.x1.value : this.x1, - y1: data.y1.present ? data.y1.value : this.y1, - x2: data.x2.present ? data.x2.value : this.x2, - y2: data.y2.present ? data.y2.value : this.y2, - x3: data.x3.present ? data.x3.value : this.x3, - y3: data.y3.present ? data.y3.value : this.y3, - x4: data.x4.present ? data.x4.value : this.x4, - y4: data.y4.present ? data.y4.value : this.y4, - boxScore: data.boxScore.present ? data.boxScore.value : this.boxScore, - textScore: data.textScore.present ? data.textScore.value : this.textScore, - recognizedText: data.recognizedText.present - ? data.recognizedText.value - : this.recognizedText, - isVisible: data.isVisible.present ? data.isVisible.value : this.isVisible, - ); - } - - @override - String toString() { - return (StringBuffer('AssetOcrEntityData(') - ..write('id: $id, ') - ..write('assetId: $assetId, ') - ..write('x1: $x1, ') - ..write('y1: $y1, ') - ..write('x2: $x2, ') - ..write('y2: $y2, ') - ..write('x3: $x3, ') - ..write('y3: $y3, ') - ..write('x4: $x4, ') - ..write('y4: $y4, ') - ..write('boxScore: $boxScore, ') - ..write('textScore: $textScore, ') - ..write('recognizedText: $recognizedText, ') - ..write('isVisible: $isVisible') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - assetId, - x1, - y1, - x2, - y2, - x3, - y3, - x4, - y4, - boxScore, - textScore, - recognizedText, - isVisible, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is AssetOcrEntityData && - other.id == this.id && - other.assetId == this.assetId && - other.x1 == this.x1 && - other.y1 == this.y1 && - other.x2 == this.x2 && - other.y2 == this.y2 && - other.x3 == this.x3 && - other.y3 == this.y3 && - other.x4 == this.x4 && - other.y4 == this.y4 && - other.boxScore == this.boxScore && - other.textScore == this.textScore && - other.recognizedText == this.recognizedText && - other.isVisible == this.isVisible); -} - -class AssetOcrEntityCompanion extends UpdateCompanion { - final Value id; - final Value assetId; - final Value x1; - final Value y1; - final Value x2; - final Value y2; - final Value x3; - final Value y3; - final Value x4; - final Value y4; - final Value boxScore; - final Value textScore; - final Value recognizedText; - final Value isVisible; - const AssetOcrEntityCompanion({ - this.id = const Value.absent(), - this.assetId = const Value.absent(), - this.x1 = const Value.absent(), - this.y1 = const Value.absent(), - this.x2 = const Value.absent(), - this.y2 = const Value.absent(), - this.x3 = const Value.absent(), - this.y3 = const Value.absent(), - this.x4 = const Value.absent(), - this.y4 = const Value.absent(), - this.boxScore = const Value.absent(), - this.textScore = const Value.absent(), - this.recognizedText = const Value.absent(), - this.isVisible = const Value.absent(), - }); - AssetOcrEntityCompanion.insert({ - required String id, - required String assetId, - required double x1, - required double y1, - required double x2, - required double y2, - required double x3, - required double y3, - required double x4, - required double y4, - required double boxScore, - required double textScore, - required String recognizedText, - this.isVisible = const Value.absent(), - }) : id = Value(id), - assetId = Value(assetId), - x1 = Value(x1), - y1 = Value(y1), - x2 = Value(x2), - y2 = Value(y2), - x3 = Value(x3), - y3 = Value(y3), - x4 = Value(x4), - y4 = Value(y4), - boxScore = Value(boxScore), - textScore = Value(textScore), - recognizedText = Value(recognizedText); - static Insertable custom({ - Expression? id, - Expression? assetId, - Expression? x1, - Expression? y1, - Expression? x2, - Expression? y2, - Expression? x3, - Expression? y3, - Expression? x4, - Expression? y4, - Expression? boxScore, - Expression? textScore, - Expression? recognizedText, - Expression? isVisible, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (assetId != null) 'asset_id': assetId, - if (x1 != null) 'x1': x1, - if (y1 != null) 'y1': y1, - if (x2 != null) 'x2': x2, - if (y2 != null) 'y2': y2, - if (x3 != null) 'x3': x3, - if (y3 != null) 'y3': y3, - if (x4 != null) 'x4': x4, - if (y4 != null) 'y4': y4, - if (boxScore != null) 'box_score': boxScore, - if (textScore != null) 'text_score': textScore, - if (recognizedText != null) 'recognized_text': recognizedText, - if (isVisible != null) 'is_visible': isVisible, - }); - } - - AssetOcrEntityCompanion copyWith({ - Value? id, - Value? assetId, - Value? x1, - Value? y1, - Value? x2, - Value? y2, - Value? x3, - Value? y3, - Value? x4, - Value? y4, - Value? boxScore, - Value? textScore, - Value? recognizedText, - Value? isVisible, - }) { - return AssetOcrEntityCompanion( - id: id ?? this.id, - assetId: assetId ?? this.assetId, - x1: x1 ?? this.x1, - y1: y1 ?? this.y1, - x2: x2 ?? this.x2, - y2: y2 ?? this.y2, - x3: x3 ?? this.x3, - y3: y3 ?? this.y3, - x4: x4 ?? this.x4, - y4: y4 ?? this.y4, - boxScore: boxScore ?? this.boxScore, - textScore: textScore ?? this.textScore, - recognizedText: recognizedText ?? this.recognizedText, - isVisible: isVisible ?? this.isVisible, - ); - } - - @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 (x1.present) { - map['x1'] = Variable(x1.value); - } - if (y1.present) { - map['y1'] = Variable(y1.value); - } - if (x2.present) { - map['x2'] = Variable(x2.value); - } - if (y2.present) { - map['y2'] = Variable(y2.value); - } - if (x3.present) { - map['x3'] = Variable(x3.value); - } - if (y3.present) { - map['y3'] = Variable(y3.value); - } - if (x4.present) { - map['x4'] = Variable(x4.value); - } - if (y4.present) { - map['y4'] = Variable(y4.value); - } - if (boxScore.present) { - map['box_score'] = Variable(boxScore.value); - } - if (textScore.present) { - map['text_score'] = Variable(textScore.value); - } - if (recognizedText.present) { - map['recognized_text'] = Variable(recognizedText.value); - } - if (isVisible.present) { - map['is_visible'] = Variable(isVisible.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('AssetOcrEntityCompanion(') - ..write('id: $id, ') - ..write('assetId: $assetId, ') - ..write('x1: $x1, ') - ..write('y1: $y1, ') - ..write('x2: $x2, ') - ..write('y2: $y2, ') - ..write('x3: $x3, ') - ..write('y3: $y3, ') - ..write('x4: $x4, ') - ..write('y4: $y4, ') - ..write('boxScore: $boxScore, ') - ..write('textScore: $textScore, ') - ..write('recognizedText: $recognizedText, ') - ..write('isVisible: $isVisible') - ..write(')')) - .toString(); - } -} - -class DatabaseAtV30 extends GeneratedDatabase { - DatabaseAtV30(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 idxLocalAlbumAssetAlbumAsset = Index( - 'idx_local_album_asset_album_asset', - 'CREATE INDEX IF NOT EXISTS idx_local_album_asset_album_asset ON local_album_asset_entity (album_id, asset_id)', - ); - 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 idxLocalAssetCloudId = Index( - 'idx_local_asset_cloud_id', - 'CREATE INDEX IF NOT EXISTS idx_local_asset_cloud_id ON local_asset_entity (i_cloud_id)', - ); - late final Index idxLocalAssetCreatedAt = Index( - 'idx_local_asset_created_at', - 'CREATE INDEX IF NOT EXISTS idx_local_asset_created_at ON local_asset_entity (created_at)', - ); - late final Index idxStackPrimaryAssetId = Index( - 'idx_stack_primary_asset_id', - 'CREATE INDEX IF NOT EXISTS idx_stack_primary_asset_id ON stack_entity (primary_asset_id)', - ); - 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 Index idxRemoteAssetStackId = Index( - 'idx_remote_asset_stack_id', - 'CREATE INDEX IF NOT EXISTS idx_remote_asset_stack_id ON remote_asset_entity (stack_id)', - ); - late final Index idxRemoteAssetOwnerVisibilityDeletedCreated = Index( - 'idx_remote_asset_owner_visibility_deleted_created', - 'CREATE INDEX IF NOT EXISTS idx_remote_asset_owner_visibility_deleted_created ON remote_asset_entity (owner_id, visibility, deleted_at, created_at DESC)', - ); - 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 RemoteAssetCloudIdEntity remoteAssetCloudIdEntity = - RemoteAssetCloudIdEntity(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 AssetEditEntity assetEditEntity = AssetEditEntity(this); - late final Settings settings = Settings(this); - late final AssetOcrEntity assetOcrEntity = AssetOcrEntity(this); - late final Index idxPartnerSharedWithId = Index( - 'idx_partner_shared_with_id', - 'CREATE INDEX IF NOT EXISTS idx_partner_shared_with_id ON partner_entity (shared_with_id)', - ); - 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 idxRemoteExifCity = Index( - 'idx_remote_exif_city', - 'CREATE INDEX IF NOT EXISTS idx_remote_exif_city ON remote_exif_entity (city) WHERE city IS NOT NULL', - ); - late final Index idxRemoteAlbumAssetAlbumAsset = Index( - 'idx_remote_album_asset_album_asset', - 'CREATE INDEX IF NOT EXISTS idx_remote_album_asset_album_asset ON remote_album_asset_entity (album_id, asset_id)', - ); - late final Index idxRemoteAssetCloudId = Index( - 'idx_remote_asset_cloud_id', - 'CREATE INDEX IF NOT EXISTS idx_remote_asset_cloud_id ON remote_asset_cloud_id_entity (cloud_id)', - ); - late final Index idxPersonOwnerId = Index( - 'idx_person_owner_id', - 'CREATE INDEX IF NOT EXISTS idx_person_owner_id ON person_entity (owner_id)', - ); - late final Index idxAssetFacePersonId = Index( - 'idx_asset_face_person_id', - 'CREATE INDEX IF NOT EXISTS idx_asset_face_person_id ON asset_face_entity (person_id)', - ); - late final Index idxAssetFaceAssetId = Index( - 'idx_asset_face_asset_id', - 'CREATE INDEX IF NOT EXISTS idx_asset_face_asset_id ON asset_face_entity (asset_id)', - ); - late final Index idxAssetFaceVisiblePerson = Index( - 'idx_asset_face_visible_person', - 'CREATE INDEX IF NOT EXISTS idx_asset_face_visible_person ON asset_face_entity (person_id, asset_id) WHERE is_visible = 1 AND deleted_at IS NULL', - ); - 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)', - ); - late final Index idxAssetEditAssetId = Index( - 'idx_asset_edit_asset_id', - 'CREATE INDEX IF NOT EXISTS idx_asset_edit_asset_id ON asset_edit_entity (asset_id)', - ); - late final Index idxAssetOcrAssetId = Index( - 'idx_asset_ocr_asset_id', - 'CREATE INDEX IF NOT EXISTS idx_asset_ocr_asset_id ON asset_ocr_entity (asset_id)', - ); - @override - Iterable> get allTables => - allSchemaEntities.whereType>(); - @override - List get allSchemaEntities => [ - userEntity, - remoteAssetEntity, - stackEntity, - localAssetEntity, - remoteAlbumEntity, - localAlbumEntity, - localAlbumAssetEntity, - idxLocalAlbumAssetAlbumAsset, - idxLocalAssetChecksum, - idxLocalAssetCloudId, - idxLocalAssetCreatedAt, - idxStackPrimaryAssetId, - uQRemoteAssetsOwnerChecksum, - uQRemoteAssetsOwnerLibraryChecksum, - idxRemoteAssetChecksum, - idxRemoteAssetStackId, - idxRemoteAssetOwnerVisibilityDeletedCreated, - authUserEntity, - userMetadataEntity, - partnerEntity, - remoteExifEntity, - remoteAlbumAssetEntity, - remoteAlbumUserEntity, - remoteAssetCloudIdEntity, - memoryEntity, - memoryAssetEntity, - personEntity, - assetFaceEntity, - storeEntity, - trashedLocalAssetEntity, - assetEditEntity, - settings, - assetOcrEntity, - idxPartnerSharedWithId, - idxLatLng, - idxRemoteExifCity, - idxRemoteAlbumAssetAlbumAsset, - idxRemoteAssetCloudId, - idxPersonOwnerId, - idxAssetFacePersonId, - idxAssetFaceAssetId, - idxAssetFaceVisiblePerson, - idxTrashedLocalAssetChecksum, - idxTrashedLocalAssetAlbum, - idxAssetEditAssetId, - idxAssetOcrAssetId, - ]; - @override - StreamQueryUpdateRules get streamUpdateRules => const StreamQueryUpdateRules([ - WritePropagation( - on: TableUpdateQuery.onTableName( - 'user_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('remote_asset_entity', kind: UpdateKind.delete)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'user_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('stack_entity', kind: UpdateKind.delete)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'remote_asset_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('remote_album_entity', kind: UpdateKind.update)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'remote_album_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('local_album_entity', kind: UpdateKind.update)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'local_asset_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [ - TableUpdate('local_album_asset_entity', kind: UpdateKind.delete), - ], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'local_album_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [ - TableUpdate('local_album_asset_entity', kind: UpdateKind.delete), - ], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'user_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('user_metadata_entity', kind: UpdateKind.delete)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'user_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('partner_entity', kind: UpdateKind.delete)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'user_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('partner_entity', kind: UpdateKind.delete)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'remote_asset_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('remote_exif_entity', kind: UpdateKind.delete)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'remote_asset_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [ - TableUpdate('remote_album_asset_entity', kind: UpdateKind.delete), - ], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'remote_album_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [ - TableUpdate('remote_album_asset_entity', kind: UpdateKind.delete), - ], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'remote_album_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [ - TableUpdate('remote_album_user_entity', kind: UpdateKind.delete), - ], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'user_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [ - TableUpdate('remote_album_user_entity', kind: UpdateKind.delete), - ], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'remote_asset_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [ - TableUpdate('remote_asset_cloud_id_entity', kind: UpdateKind.delete), - ], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'user_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('memory_entity', kind: UpdateKind.delete)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'remote_asset_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('memory_asset_entity', kind: UpdateKind.delete)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'memory_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('memory_asset_entity', kind: UpdateKind.delete)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'user_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('person_entity', kind: UpdateKind.delete)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'remote_asset_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('asset_face_entity', kind: UpdateKind.delete)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'person_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('asset_face_entity', kind: UpdateKind.update)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'remote_asset_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('asset_edit_entity', kind: UpdateKind.delete)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'remote_asset_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('asset_ocr_entity', kind: UpdateKind.delete)], - ), - ]); - @override - int get schemaVersion => 30; - @override - DriftDatabaseOptions get options => - const DriftDatabaseOptions(storeDateTimeAsText: true); -} diff --git a/mobile/test/drift/main/generated/schema_v4.dart b/mobile/test/drift/main/generated/schema_v4.dart deleted file mode 100644 index 8321f23a0d..0000000000 --- a/mobile/test/drift/main/generated/schema_v4.dart +++ /dev/null @@ -1,6444 +0,0 @@ -// dart format width=80 -import 'dart:typed_data' as i2; -// GENERATED BY drift_dev, DO NOT MODIFY. -// ignore_for_file: type=lint,unused_import -// -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 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 email = GeneratedColumn( - 'email', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn profileImagePath = GeneratedColumn( - 'profile_image_path', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn quotaSizeInBytes = GeneratedColumn( - 'quota_size_in_bytes', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn quotaUsageInBytes = GeneratedColumn( - 'quota_usage_in_bytes', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - defaultValue: const CustomExpression('0'), - ); - @override - List get $columns => [ - id, - name, - isAdmin, - email, - profileImagePath, - updatedAt, - quotaSizeInBytes, - quotaUsageInBytes, - ]; - @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'], - )!, - isAdmin: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}is_admin'], - )!, - email: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}email'], - )!, - profileImagePath: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}profile_image_path'], - ), - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}updated_at'], - )!, - quotaSizeInBytes: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}quota_size_in_bytes'], - ), - quotaUsageInBytes: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}quota_usage_in_bytes'], - )!, - ); - } - - @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 bool isAdmin; - final String email; - final String? profileImagePath; - final DateTime updatedAt; - final int? quotaSizeInBytes; - final int quotaUsageInBytes; - const UserEntityData({ - required this.id, - required this.name, - required this.isAdmin, - required this.email, - this.profileImagePath, - required this.updatedAt, - this.quotaSizeInBytes, - required this.quotaUsageInBytes, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['name'] = Variable(name); - map['is_admin'] = Variable(isAdmin); - map['email'] = Variable(email); - if (!nullToAbsent || profileImagePath != null) { - map['profile_image_path'] = Variable(profileImagePath); - } - map['updated_at'] = Variable(updatedAt); - if (!nullToAbsent || quotaSizeInBytes != null) { - map['quota_size_in_bytes'] = Variable(quotaSizeInBytes); - } - map['quota_usage_in_bytes'] = Variable(quotaUsageInBytes); - return map; - } - - factory UserEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return UserEntityData( - id: serializer.fromJson(json['id']), - name: serializer.fromJson(json['name']), - isAdmin: serializer.fromJson(json['isAdmin']), - email: serializer.fromJson(json['email']), - profileImagePath: serializer.fromJson(json['profileImagePath']), - updatedAt: serializer.fromJson(json['updatedAt']), - quotaSizeInBytes: serializer.fromJson(json['quotaSizeInBytes']), - quotaUsageInBytes: serializer.fromJson(json['quotaUsageInBytes']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'name': serializer.toJson(name), - 'isAdmin': serializer.toJson(isAdmin), - 'email': serializer.toJson(email), - 'profileImagePath': serializer.toJson(profileImagePath), - 'updatedAt': serializer.toJson(updatedAt), - 'quotaSizeInBytes': serializer.toJson(quotaSizeInBytes), - 'quotaUsageInBytes': serializer.toJson(quotaUsageInBytes), - }; - } - - UserEntityData copyWith({ - String? id, - String? name, - bool? isAdmin, - String? email, - Value profileImagePath = const Value.absent(), - DateTime? updatedAt, - Value quotaSizeInBytes = const Value.absent(), - int? quotaUsageInBytes, - }) => UserEntityData( - id: id ?? this.id, - name: name ?? this.name, - isAdmin: isAdmin ?? this.isAdmin, - email: email ?? this.email, - profileImagePath: profileImagePath.present - ? profileImagePath.value - : this.profileImagePath, - updatedAt: updatedAt ?? this.updatedAt, - quotaSizeInBytes: quotaSizeInBytes.present - ? quotaSizeInBytes.value - : this.quotaSizeInBytes, - quotaUsageInBytes: quotaUsageInBytes ?? this.quotaUsageInBytes, - ); - UserEntityData copyWithCompanion(UserEntityCompanion data) { - return UserEntityData( - id: data.id.present ? data.id.value : this.id, - name: data.name.present ? data.name.value : this.name, - isAdmin: data.isAdmin.present ? data.isAdmin.value : this.isAdmin, - email: data.email.present ? data.email.value : this.email, - profileImagePath: data.profileImagePath.present - ? data.profileImagePath.value - : this.profileImagePath, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - quotaSizeInBytes: data.quotaSizeInBytes.present - ? data.quotaSizeInBytes.value - : this.quotaSizeInBytes, - quotaUsageInBytes: data.quotaUsageInBytes.present - ? data.quotaUsageInBytes.value - : this.quotaUsageInBytes, - ); - } - - @override - String toString() { - return (StringBuffer('UserEntityData(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('isAdmin: $isAdmin, ') - ..write('email: $email, ') - ..write('profileImagePath: $profileImagePath, ') - ..write('updatedAt: $updatedAt, ') - ..write('quotaSizeInBytes: $quotaSizeInBytes, ') - ..write('quotaUsageInBytes: $quotaUsageInBytes') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - name, - isAdmin, - email, - profileImagePath, - updatedAt, - quotaSizeInBytes, - quotaUsageInBytes, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is UserEntityData && - other.id == this.id && - other.name == this.name && - other.isAdmin == this.isAdmin && - other.email == this.email && - other.profileImagePath == this.profileImagePath && - other.updatedAt == this.updatedAt && - other.quotaSizeInBytes == this.quotaSizeInBytes && - other.quotaUsageInBytes == this.quotaUsageInBytes); -} - -class UserEntityCompanion extends UpdateCompanion { - final Value id; - final Value name; - final Value isAdmin; - final Value email; - final Value profileImagePath; - final Value updatedAt; - final Value quotaSizeInBytes; - final Value quotaUsageInBytes; - const UserEntityCompanion({ - this.id = const Value.absent(), - this.name = const Value.absent(), - this.isAdmin = const Value.absent(), - this.email = const Value.absent(), - this.profileImagePath = const Value.absent(), - this.updatedAt = const Value.absent(), - this.quotaSizeInBytes = const Value.absent(), - this.quotaUsageInBytes = const Value.absent(), - }); - UserEntityCompanion.insert({ - required String id, - required String name, - this.isAdmin = const Value.absent(), - required String email, - this.profileImagePath = const Value.absent(), - this.updatedAt = const Value.absent(), - this.quotaSizeInBytes = const Value.absent(), - this.quotaUsageInBytes = const Value.absent(), - }) : id = Value(id), - name = Value(name), - email = Value(email); - static Insertable custom({ - Expression? id, - Expression? name, - Expression? isAdmin, - Expression? email, - Expression? profileImagePath, - Expression? updatedAt, - Expression? quotaSizeInBytes, - Expression? quotaUsageInBytes, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (name != null) 'name': name, - if (isAdmin != null) 'is_admin': isAdmin, - if (email != null) 'email': email, - if (profileImagePath != null) 'profile_image_path': profileImagePath, - if (updatedAt != null) 'updated_at': updatedAt, - if (quotaSizeInBytes != null) 'quota_size_in_bytes': quotaSizeInBytes, - if (quotaUsageInBytes != null) 'quota_usage_in_bytes': quotaUsageInBytes, - }); - } - - UserEntityCompanion copyWith({ - Value? id, - Value? name, - Value? isAdmin, - Value? email, - Value? profileImagePath, - Value? updatedAt, - Value? quotaSizeInBytes, - Value? quotaUsageInBytes, - }) { - return UserEntityCompanion( - id: id ?? this.id, - name: name ?? this.name, - isAdmin: isAdmin ?? this.isAdmin, - email: email ?? this.email, - profileImagePath: profileImagePath ?? this.profileImagePath, - updatedAt: updatedAt ?? this.updatedAt, - quotaSizeInBytes: quotaSizeInBytes ?? this.quotaSizeInBytes, - quotaUsageInBytes: quotaUsageInBytes ?? this.quotaUsageInBytes, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (name.present) { - map['name'] = Variable(name.value); - } - if (isAdmin.present) { - map['is_admin'] = Variable(isAdmin.value); - } - if (email.present) { - map['email'] = Variable(email.value); - } - if (profileImagePath.present) { - map['profile_image_path'] = Variable(profileImagePath.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (quotaSizeInBytes.present) { - map['quota_size_in_bytes'] = Variable(quotaSizeInBytes.value); - } - if (quotaUsageInBytes.present) { - map['quota_usage_in_bytes'] = Variable(quotaUsageInBytes.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('UserEntityCompanion(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('isAdmin: $isAdmin, ') - ..write('email: $email, ') - ..write('profileImagePath: $profileImagePath, ') - ..write('updatedAt: $updatedAt, ') - ..write('quotaSizeInBytes: $quotaSizeInBytes, ') - ..write('quotaUsageInBytes: $quotaUsageInBytes') - ..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, - ); - @override - List get $columns => [ - name, - type, - createdAt, - updatedAt, - width, - height, - durationInSeconds, - id, - checksum, - isFavorite, - ownerId, - localDateTime, - thumbHash, - deletedAt, - livePhotoVideoId, - visibility, - stackId, - ]; - @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'], - ), - ); - } - - @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; - 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, - }); - @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); - } - 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']), - ); - } - @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), - }; - } - - 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(), - }) => 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, - ); - 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, - ); - } - - @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(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - name, - type, - createdAt, - updatedAt, - width, - height, - durationInSeconds, - id, - checksum, - isFavorite, - ownerId, - localDateTime, - thumbHash, - deletedAt, - livePhotoVideoId, - visibility, - stackId, - ); - @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); -} - -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; - 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(), - }); - 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(), - }) : 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, - }) { - 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, - }); - } - - 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, - }) { - 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, - ); - } - - @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); - } - 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(')')) - .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 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 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, - 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'], - )!, - 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 bool? marker_; - const LocalAlbumEntityData({ - required this.id, - required this.name, - required this.updatedAt, - required this.backupSelection, - required this.isIosSharedAlbum, - 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 || 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']), - 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), - 'marker_': serializer.toJson(marker_), - }; - } - - LocalAlbumEntityData copyWith({ - String? id, - String? name, - DateTime? updatedAt, - int? backupSelection, - bool? isIosSharedAlbum, - 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, - 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, - 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('marker_: $marker_') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - name, - updatedAt, - backupSelection, - isIosSharedAlbum, - 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.marker_ == this.marker_); -} - -class LocalAlbumEntityCompanion extends UpdateCompanion { - final Value id; - final Value name; - final Value updatedAt; - final Value backupSelection; - final Value isIosSharedAlbum; - 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.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.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? 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 (marker_ != null) 'marker': marker_, - }); - } - - LocalAlbumEntityCompanion copyWith({ - Value? id, - Value? name, - Value? updatedAt, - Value? backupSelection, - Value? isIosSharedAlbum, - Value? marker_, - }) { - return LocalAlbumEntityCompanion( - id: id ?? this.id, - name: name ?? this.name, - updatedAt: updatedAt ?? this.updatedAt, - backupSelection: backupSelection ?? this.backupSelection, - isIosSharedAlbum: isIosSharedAlbum ?? this.isIosSharedAlbum, - 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 (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('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', - ), - ); - @override - List get $columns => [assetId, albumId]; - @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'], - )!, - ); - } - - @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; - const LocalAlbumAssetEntityData({ - 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 LocalAlbumAssetEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return LocalAlbumAssetEntityData( - 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), - }; - } - - LocalAlbumAssetEntityData copyWith({String? assetId, String? albumId}) => - LocalAlbumAssetEntityData( - assetId: assetId ?? this.assetId, - albumId: albumId ?? this.albumId, - ); - LocalAlbumAssetEntityData copyWithCompanion( - LocalAlbumAssetEntityCompanion data, - ) { - return LocalAlbumAssetEntityData( - assetId: data.assetId.present ? data.assetId.value : this.assetId, - albumId: data.albumId.present ? data.albumId.value : this.albumId, - ); - } - - @override - String toString() { - return (StringBuffer('LocalAlbumAssetEntityData(') - ..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 LocalAlbumAssetEntityData && - other.assetId == this.assetId && - other.albumId == this.albumId); -} - -class LocalAlbumAssetEntityCompanion - extends UpdateCompanion { - final Value assetId; - final Value albumId; - const LocalAlbumAssetEntityCompanion({ - this.assetId = const Value.absent(), - this.albumId = const Value.absent(), - }); - LocalAlbumAssetEntityCompanion.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, - }); - } - - LocalAlbumAssetEntityCompanion copyWith({ - Value? assetId, - Value? albumId, - }) { - return LocalAlbumAssetEntityCompanion( - 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('LocalAlbumAssetEntityCompanion(') - ..write('assetId: $assetId, ') - ..write('albumId: $albumId') - ..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 i2.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, - i2.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 i2.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 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 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 DatabaseAtV4 extends GeneratedDatabase { - DatabaseAtV4(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 LocalAlbumEntity localAlbumEntity = LocalAlbumEntity(this); - late final LocalAlbumAssetEntity localAlbumAssetEntity = - LocalAlbumAssetEntity(this); - late final Index idxLocalAssetChecksum = Index( - 'idx_local_asset_checksum', - 'CREATE INDEX idx_local_asset_checksum ON local_asset_entity (checksum)', - ); - late final Index uQRemoteAssetOwnerChecksum = Index( - 'UQ_remote_asset_owner_checksum', - 'CREATE UNIQUE INDEX UQ_remote_asset_owner_checksum ON remote_asset_entity (checksum, owner_id)', - ); - late final Index idxRemoteAssetChecksum = Index( - 'idx_remote_asset_checksum', - 'CREATE INDEX idx_remote_asset_checksum ON remote_asset_entity (checksum)', - ); - late final UserMetadataEntity userMetadataEntity = UserMetadataEntity(this); - late final PartnerEntity partnerEntity = PartnerEntity(this); - late final RemoteExifEntity remoteExifEntity = RemoteExifEntity(this); - late final RemoteAlbumEntity remoteAlbumEntity = RemoteAlbumEntity(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); - @override - Iterable> get allTables => - allSchemaEntities.whereType>(); - @override - List get allSchemaEntities => [ - userEntity, - remoteAssetEntity, - stackEntity, - localAssetEntity, - localAlbumEntity, - localAlbumAssetEntity, - idxLocalAssetChecksum, - uQRemoteAssetOwnerChecksum, - idxRemoteAssetChecksum, - userMetadataEntity, - partnerEntity, - remoteExifEntity, - remoteAlbumEntity, - remoteAlbumAssetEntity, - remoteAlbumUserEntity, - memoryEntity, - memoryAssetEntity, - personEntity, - assetFaceEntity, - ]; - @override - int get schemaVersion => 4; - @override - DriftDatabaseOptions get options => - const DriftDatabaseOptions(storeDateTimeAsText: true); -} diff --git a/mobile/test/drift/main/generated/schema_v5.dart b/mobile/test/drift/main/generated/schema_v5.dart deleted file mode 100644 index e9f276c6bc..0000000000 --- a/mobile/test/drift/main/generated/schema_v5.dart +++ /dev/null @@ -1,6405 +0,0 @@ -// dart format width=80 -import 'dart:typed_data' as i2; -// GENERATED BY drift_dev, DO NOT MODIFY. -// ignore_for_file: type=lint,unused_import -// -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 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 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 updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - @override - List get $columns => [ - id, - name, - isAdmin, - email, - hasProfileImage, - profileChangedAt, - updatedAt, - ]; - @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'], - )!, - isAdmin: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}is_admin'], - )!, - 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'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}updated_at'], - )!, - ); - } - - @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 bool isAdmin; - final String email; - final bool hasProfileImage; - final DateTime profileChangedAt; - final DateTime updatedAt; - const UserEntityData({ - required this.id, - required this.name, - required this.isAdmin, - required this.email, - required this.hasProfileImage, - required this.profileChangedAt, - required this.updatedAt, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['name'] = Variable(name); - map['is_admin'] = Variable(isAdmin); - map['email'] = Variable(email); - map['has_profile_image'] = Variable(hasProfileImage); - map['profile_changed_at'] = Variable(profileChangedAt); - map['updated_at'] = Variable(updatedAt); - return map; - } - - factory UserEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return UserEntityData( - id: serializer.fromJson(json['id']), - name: serializer.fromJson(json['name']), - isAdmin: serializer.fromJson(json['isAdmin']), - email: serializer.fromJson(json['email']), - hasProfileImage: serializer.fromJson(json['hasProfileImage']), - profileChangedAt: serializer.fromJson(json['profileChangedAt']), - updatedAt: serializer.fromJson(json['updatedAt']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'name': serializer.toJson(name), - 'isAdmin': serializer.toJson(isAdmin), - 'email': serializer.toJson(email), - 'hasProfileImage': serializer.toJson(hasProfileImage), - 'profileChangedAt': serializer.toJson(profileChangedAt), - 'updatedAt': serializer.toJson(updatedAt), - }; - } - - UserEntityData copyWith({ - String? id, - String? name, - bool? isAdmin, - String? email, - bool? hasProfileImage, - DateTime? profileChangedAt, - DateTime? updatedAt, - }) => UserEntityData( - id: id ?? this.id, - name: name ?? this.name, - isAdmin: isAdmin ?? this.isAdmin, - email: email ?? this.email, - hasProfileImage: hasProfileImage ?? this.hasProfileImage, - profileChangedAt: profileChangedAt ?? this.profileChangedAt, - updatedAt: updatedAt ?? this.updatedAt, - ); - UserEntityData copyWithCompanion(UserEntityCompanion data) { - return UserEntityData( - id: data.id.present ? data.id.value : this.id, - name: data.name.present ? data.name.value : this.name, - isAdmin: data.isAdmin.present ? data.isAdmin.value : this.isAdmin, - 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, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - ); - } - - @override - String toString() { - return (StringBuffer('UserEntityData(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('isAdmin: $isAdmin, ') - ..write('email: $email, ') - ..write('hasProfileImage: $hasProfileImage, ') - ..write('profileChangedAt: $profileChangedAt, ') - ..write('updatedAt: $updatedAt') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - name, - isAdmin, - email, - hasProfileImage, - profileChangedAt, - updatedAt, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is UserEntityData && - other.id == this.id && - other.name == this.name && - other.isAdmin == this.isAdmin && - other.email == this.email && - other.hasProfileImage == this.hasProfileImage && - other.profileChangedAt == this.profileChangedAt && - other.updatedAt == this.updatedAt); -} - -class UserEntityCompanion extends UpdateCompanion { - final Value id; - final Value name; - final Value isAdmin; - final Value email; - final Value hasProfileImage; - final Value profileChangedAt; - final Value updatedAt; - const UserEntityCompanion({ - this.id = const Value.absent(), - this.name = const Value.absent(), - this.isAdmin = const Value.absent(), - this.email = const Value.absent(), - this.hasProfileImage = const Value.absent(), - this.profileChangedAt = const Value.absent(), - this.updatedAt = const Value.absent(), - }); - UserEntityCompanion.insert({ - required String id, - required String name, - this.isAdmin = const Value.absent(), - required String email, - this.hasProfileImage = const Value.absent(), - this.profileChangedAt = const Value.absent(), - this.updatedAt = const Value.absent(), - }) : id = Value(id), - name = Value(name), - email = Value(email); - static Insertable custom({ - Expression? id, - Expression? name, - Expression? isAdmin, - Expression? email, - Expression? hasProfileImage, - Expression? profileChangedAt, - Expression? updatedAt, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (name != null) 'name': name, - if (isAdmin != null) 'is_admin': isAdmin, - if (email != null) 'email': email, - if (hasProfileImage != null) 'has_profile_image': hasProfileImage, - if (profileChangedAt != null) 'profile_changed_at': profileChangedAt, - if (updatedAt != null) 'updated_at': updatedAt, - }); - } - - UserEntityCompanion copyWith({ - Value? id, - Value? name, - Value? isAdmin, - Value? email, - Value? hasProfileImage, - Value? profileChangedAt, - Value? updatedAt, - }) { - return UserEntityCompanion( - id: id ?? this.id, - name: name ?? this.name, - isAdmin: isAdmin ?? this.isAdmin, - email: email ?? this.email, - hasProfileImage: hasProfileImage ?? this.hasProfileImage, - profileChangedAt: profileChangedAt ?? this.profileChangedAt, - updatedAt: updatedAt ?? this.updatedAt, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (name.present) { - map['name'] = Variable(name.value); - } - if (isAdmin.present) { - map['is_admin'] = Variable(isAdmin.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 (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('UserEntityCompanion(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('isAdmin: $isAdmin, ') - ..write('email: $email, ') - ..write('hasProfileImage: $hasProfileImage, ') - ..write('profileChangedAt: $profileChangedAt, ') - ..write('updatedAt: $updatedAt') - ..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, - ); - @override - List get $columns => [ - name, - type, - createdAt, - updatedAt, - width, - height, - durationInSeconds, - id, - checksum, - isFavorite, - ownerId, - localDateTime, - thumbHash, - deletedAt, - livePhotoVideoId, - visibility, - stackId, - ]; - @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'], - ), - ); - } - - @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; - 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, - }); - @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); - } - 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']), - ); - } - @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), - }; - } - - 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(), - }) => 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, - ); - 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, - ); - } - - @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(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - name, - type, - createdAt, - updatedAt, - width, - height, - durationInSeconds, - id, - checksum, - isFavorite, - ownerId, - localDateTime, - thumbHash, - deletedAt, - livePhotoVideoId, - visibility, - stackId, - ); - @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); -} - -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; - 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(), - }); - 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(), - }) : 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, - }) { - 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, - }); - } - - 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, - }) { - 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, - ); - } - - @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); - } - 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(')')) - .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 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 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, - 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'], - )!, - 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 bool? marker_; - const LocalAlbumEntityData({ - required this.id, - required this.name, - required this.updatedAt, - required this.backupSelection, - required this.isIosSharedAlbum, - 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 || 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']), - 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), - 'marker_': serializer.toJson(marker_), - }; - } - - LocalAlbumEntityData copyWith({ - String? id, - String? name, - DateTime? updatedAt, - int? backupSelection, - bool? isIosSharedAlbum, - 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, - 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, - 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('marker_: $marker_') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - name, - updatedAt, - backupSelection, - isIosSharedAlbum, - 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.marker_ == this.marker_); -} - -class LocalAlbumEntityCompanion extends UpdateCompanion { - final Value id; - final Value name; - final Value updatedAt; - final Value backupSelection; - final Value isIosSharedAlbum; - 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.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.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? 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 (marker_ != null) 'marker': marker_, - }); - } - - LocalAlbumEntityCompanion copyWith({ - Value? id, - Value? name, - Value? updatedAt, - Value? backupSelection, - Value? isIosSharedAlbum, - Value? marker_, - }) { - return LocalAlbumEntityCompanion( - id: id ?? this.id, - name: name ?? this.name, - updatedAt: updatedAt ?? this.updatedAt, - backupSelection: backupSelection ?? this.backupSelection, - isIosSharedAlbum: isIosSharedAlbum ?? this.isIosSharedAlbum, - 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 (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('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', - ), - ); - @override - List get $columns => [assetId, albumId]; - @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'], - )!, - ); - } - - @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; - const LocalAlbumAssetEntityData({ - 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 LocalAlbumAssetEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return LocalAlbumAssetEntityData( - 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), - }; - } - - LocalAlbumAssetEntityData copyWith({String? assetId, String? albumId}) => - LocalAlbumAssetEntityData( - assetId: assetId ?? this.assetId, - albumId: albumId ?? this.albumId, - ); - LocalAlbumAssetEntityData copyWithCompanion( - LocalAlbumAssetEntityCompanion data, - ) { - return LocalAlbumAssetEntityData( - assetId: data.assetId.present ? data.assetId.value : this.assetId, - albumId: data.albumId.present ? data.albumId.value : this.albumId, - ); - } - - @override - String toString() { - return (StringBuffer('LocalAlbumAssetEntityData(') - ..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 LocalAlbumAssetEntityData && - other.assetId == this.assetId && - other.albumId == this.albumId); -} - -class LocalAlbumAssetEntityCompanion - extends UpdateCompanion { - final Value assetId; - final Value albumId; - const LocalAlbumAssetEntityCompanion({ - this.assetId = const Value.absent(), - this.albumId = const Value.absent(), - }); - LocalAlbumAssetEntityCompanion.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, - }); - } - - LocalAlbumAssetEntityCompanion copyWith({ - Value? assetId, - Value? albumId, - }) { - return LocalAlbumAssetEntityCompanion( - 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('LocalAlbumAssetEntityCompanion(') - ..write('assetId: $assetId, ') - ..write('albumId: $albumId') - ..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 i2.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, - i2.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 i2.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 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 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 DatabaseAtV5 extends GeneratedDatabase { - DatabaseAtV5(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 LocalAlbumEntity localAlbumEntity = LocalAlbumEntity(this); - late final LocalAlbumAssetEntity localAlbumAssetEntity = - LocalAlbumAssetEntity(this); - late final Index idxLocalAssetChecksum = Index( - 'idx_local_asset_checksum', - 'CREATE INDEX idx_local_asset_checksum ON local_asset_entity (checksum)', - ); - late final Index uQRemoteAssetOwnerChecksum = Index( - 'UQ_remote_asset_owner_checksum', - 'CREATE UNIQUE INDEX UQ_remote_asset_owner_checksum ON remote_asset_entity (checksum, owner_id)', - ); - late final Index idxRemoteAssetChecksum = Index( - 'idx_remote_asset_checksum', - 'CREATE INDEX idx_remote_asset_checksum ON remote_asset_entity (checksum)', - ); - late final UserMetadataEntity userMetadataEntity = UserMetadataEntity(this); - late final PartnerEntity partnerEntity = PartnerEntity(this); - late final RemoteExifEntity remoteExifEntity = RemoteExifEntity(this); - late final RemoteAlbumEntity remoteAlbumEntity = RemoteAlbumEntity(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); - @override - Iterable> get allTables => - allSchemaEntities.whereType>(); - @override - List get allSchemaEntities => [ - userEntity, - remoteAssetEntity, - stackEntity, - localAssetEntity, - localAlbumEntity, - localAlbumAssetEntity, - idxLocalAssetChecksum, - uQRemoteAssetOwnerChecksum, - idxRemoteAssetChecksum, - userMetadataEntity, - partnerEntity, - remoteExifEntity, - remoteAlbumEntity, - remoteAlbumAssetEntity, - remoteAlbumUserEntity, - memoryEntity, - memoryAssetEntity, - personEntity, - assetFaceEntity, - ]; - @override - int get schemaVersion => 5; - @override - DriftDatabaseOptions get options => - const DriftDatabaseOptions(storeDateTimeAsText: true); -} diff --git a/mobile/test/drift/main/generated/schema_v6.dart b/mobile/test/drift/main/generated/schema_v6.dart deleted file mode 100644 index 0a3fe51fb9..0000000000 --- a/mobile/test/drift/main/generated/schema_v6.dart +++ /dev/null @@ -1,6451 +0,0 @@ -// dart format width=80 -import 'dart:typed_data' as i2; -// GENERATED BY drift_dev, DO NOT MODIFY. -// ignore_for_file: type=lint,unused_import -// -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 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 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 updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - @override - List get $columns => [ - id, - name, - isAdmin, - email, - hasProfileImage, - profileChangedAt, - updatedAt, - ]; - @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'], - )!, - isAdmin: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}is_admin'], - )!, - 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'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}updated_at'], - )!, - ); - } - - @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 bool isAdmin; - final String email; - final bool hasProfileImage; - final DateTime profileChangedAt; - final DateTime updatedAt; - const UserEntityData({ - required this.id, - required this.name, - required this.isAdmin, - required this.email, - required this.hasProfileImage, - required this.profileChangedAt, - required this.updatedAt, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['name'] = Variable(name); - map['is_admin'] = Variable(isAdmin); - map['email'] = Variable(email); - map['has_profile_image'] = Variable(hasProfileImage); - map['profile_changed_at'] = Variable(profileChangedAt); - map['updated_at'] = Variable(updatedAt); - return map; - } - - factory UserEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return UserEntityData( - id: serializer.fromJson(json['id']), - name: serializer.fromJson(json['name']), - isAdmin: serializer.fromJson(json['isAdmin']), - email: serializer.fromJson(json['email']), - hasProfileImage: serializer.fromJson(json['hasProfileImage']), - profileChangedAt: serializer.fromJson(json['profileChangedAt']), - updatedAt: serializer.fromJson(json['updatedAt']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'name': serializer.toJson(name), - 'isAdmin': serializer.toJson(isAdmin), - 'email': serializer.toJson(email), - 'hasProfileImage': serializer.toJson(hasProfileImage), - 'profileChangedAt': serializer.toJson(profileChangedAt), - 'updatedAt': serializer.toJson(updatedAt), - }; - } - - UserEntityData copyWith({ - String? id, - String? name, - bool? isAdmin, - String? email, - bool? hasProfileImage, - DateTime? profileChangedAt, - DateTime? updatedAt, - }) => UserEntityData( - id: id ?? this.id, - name: name ?? this.name, - isAdmin: isAdmin ?? this.isAdmin, - email: email ?? this.email, - hasProfileImage: hasProfileImage ?? this.hasProfileImage, - profileChangedAt: profileChangedAt ?? this.profileChangedAt, - updatedAt: updatedAt ?? this.updatedAt, - ); - UserEntityData copyWithCompanion(UserEntityCompanion data) { - return UserEntityData( - id: data.id.present ? data.id.value : this.id, - name: data.name.present ? data.name.value : this.name, - isAdmin: data.isAdmin.present ? data.isAdmin.value : this.isAdmin, - 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, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - ); - } - - @override - String toString() { - return (StringBuffer('UserEntityData(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('isAdmin: $isAdmin, ') - ..write('email: $email, ') - ..write('hasProfileImage: $hasProfileImage, ') - ..write('profileChangedAt: $profileChangedAt, ') - ..write('updatedAt: $updatedAt') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - name, - isAdmin, - email, - hasProfileImage, - profileChangedAt, - updatedAt, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is UserEntityData && - other.id == this.id && - other.name == this.name && - other.isAdmin == this.isAdmin && - other.email == this.email && - other.hasProfileImage == this.hasProfileImage && - other.profileChangedAt == this.profileChangedAt && - other.updatedAt == this.updatedAt); -} - -class UserEntityCompanion extends UpdateCompanion { - final Value id; - final Value name; - final Value isAdmin; - final Value email; - final Value hasProfileImage; - final Value profileChangedAt; - final Value updatedAt; - const UserEntityCompanion({ - this.id = const Value.absent(), - this.name = const Value.absent(), - this.isAdmin = const Value.absent(), - this.email = const Value.absent(), - this.hasProfileImage = const Value.absent(), - this.profileChangedAt = const Value.absent(), - this.updatedAt = const Value.absent(), - }); - UserEntityCompanion.insert({ - required String id, - required String name, - this.isAdmin = const Value.absent(), - required String email, - this.hasProfileImage = const Value.absent(), - this.profileChangedAt = const Value.absent(), - this.updatedAt = const Value.absent(), - }) : id = Value(id), - name = Value(name), - email = Value(email); - static Insertable custom({ - Expression? id, - Expression? name, - Expression? isAdmin, - Expression? email, - Expression? hasProfileImage, - Expression? profileChangedAt, - Expression? updatedAt, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (name != null) 'name': name, - if (isAdmin != null) 'is_admin': isAdmin, - if (email != null) 'email': email, - if (hasProfileImage != null) 'has_profile_image': hasProfileImage, - if (profileChangedAt != null) 'profile_changed_at': profileChangedAt, - if (updatedAt != null) 'updated_at': updatedAt, - }); - } - - UserEntityCompanion copyWith({ - Value? id, - Value? name, - Value? isAdmin, - Value? email, - Value? hasProfileImage, - Value? profileChangedAt, - Value? updatedAt, - }) { - return UserEntityCompanion( - id: id ?? this.id, - name: name ?? this.name, - isAdmin: isAdmin ?? this.isAdmin, - email: email ?? this.email, - hasProfileImage: hasProfileImage ?? this.hasProfileImage, - profileChangedAt: profileChangedAt ?? this.profileChangedAt, - updatedAt: updatedAt ?? this.updatedAt, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (name.present) { - map['name'] = Variable(name.value); - } - if (isAdmin.present) { - map['is_admin'] = Variable(isAdmin.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 (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('UserEntityCompanion(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('isAdmin: $isAdmin, ') - ..write('email: $email, ') - ..write('hasProfileImage: $hasProfileImage, ') - ..write('profileChangedAt: $profileChangedAt, ') - ..write('updatedAt: $updatedAt') - ..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 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 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, - 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'], - )!, - 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 bool? marker_; - const LocalAlbumEntityData({ - required this.id, - required this.name, - required this.updatedAt, - required this.backupSelection, - required this.isIosSharedAlbum, - 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 || 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']), - 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), - 'marker_': serializer.toJson(marker_), - }; - } - - LocalAlbumEntityData copyWith({ - String? id, - String? name, - DateTime? updatedAt, - int? backupSelection, - bool? isIosSharedAlbum, - 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, - 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, - 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('marker_: $marker_') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - name, - updatedAt, - backupSelection, - isIosSharedAlbum, - 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.marker_ == this.marker_); -} - -class LocalAlbumEntityCompanion extends UpdateCompanion { - final Value id; - final Value name; - final Value updatedAt; - final Value backupSelection; - final Value isIosSharedAlbum; - 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.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.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? 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 (marker_ != null) 'marker': marker_, - }); - } - - LocalAlbumEntityCompanion copyWith({ - Value? id, - Value? name, - Value? updatedAt, - Value? backupSelection, - Value? isIosSharedAlbum, - Value? marker_, - }) { - return LocalAlbumEntityCompanion( - id: id ?? this.id, - name: name ?? this.name, - updatedAt: updatedAt ?? this.updatedAt, - backupSelection: backupSelection ?? this.backupSelection, - isIosSharedAlbum: isIosSharedAlbum ?? this.isIosSharedAlbum, - 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 (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('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', - ), - ); - @override - List get $columns => [assetId, albumId]; - @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'], - )!, - ); - } - - @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; - const LocalAlbumAssetEntityData({ - 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 LocalAlbumAssetEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return LocalAlbumAssetEntityData( - 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), - }; - } - - LocalAlbumAssetEntityData copyWith({String? assetId, String? albumId}) => - LocalAlbumAssetEntityData( - assetId: assetId ?? this.assetId, - albumId: albumId ?? this.albumId, - ); - LocalAlbumAssetEntityData copyWithCompanion( - LocalAlbumAssetEntityCompanion data, - ) { - return LocalAlbumAssetEntityData( - assetId: data.assetId.present ? data.assetId.value : this.assetId, - albumId: data.albumId.present ? data.albumId.value : this.albumId, - ); - } - - @override - String toString() { - return (StringBuffer('LocalAlbumAssetEntityData(') - ..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 LocalAlbumAssetEntityData && - other.assetId == this.assetId && - other.albumId == this.albumId); -} - -class LocalAlbumAssetEntityCompanion - extends UpdateCompanion { - final Value assetId; - final Value albumId; - const LocalAlbumAssetEntityCompanion({ - this.assetId = const Value.absent(), - this.albumId = const Value.absent(), - }); - LocalAlbumAssetEntityCompanion.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, - }); - } - - LocalAlbumAssetEntityCompanion copyWith({ - Value? assetId, - Value? albumId, - }) { - return LocalAlbumAssetEntityCompanion( - 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('LocalAlbumAssetEntityCompanion(') - ..write('assetId: $assetId, ') - ..write('albumId: $albumId') - ..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 i2.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, - i2.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 i2.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 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 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 DatabaseAtV6 extends GeneratedDatabase { - DatabaseAtV6(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 LocalAlbumEntity localAlbumEntity = LocalAlbumEntity(this); - late final LocalAlbumAssetEntity localAlbumAssetEntity = - LocalAlbumAssetEntity(this); - late final Index idxLocalAssetChecksum = Index( - 'idx_local_asset_checksum', - 'CREATE INDEX idx_local_asset_checksum ON local_asset_entity (checksum)', - ); - late final Index idxRemoteAssetOwnerChecksum = Index( - 'idx_remote_asset_owner_checksum', - 'CREATE INDEX 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 idx_remote_asset_checksum ON remote_asset_entity (checksum)', - ); - late final UserMetadataEntity userMetadataEntity = UserMetadataEntity(this); - late final PartnerEntity partnerEntity = PartnerEntity(this); - late final RemoteExifEntity remoteExifEntity = RemoteExifEntity(this); - late final RemoteAlbumEntity remoteAlbumEntity = RemoteAlbumEntity(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); - @override - Iterable> get allTables => - allSchemaEntities.whereType>(); - @override - List get allSchemaEntities => [ - userEntity, - remoteAssetEntity, - stackEntity, - localAssetEntity, - localAlbumEntity, - localAlbumAssetEntity, - idxLocalAssetChecksum, - idxRemoteAssetOwnerChecksum, - uQRemoteAssetsOwnerChecksum, - uQRemoteAssetsOwnerLibraryChecksum, - idxRemoteAssetChecksum, - userMetadataEntity, - partnerEntity, - remoteExifEntity, - remoteAlbumEntity, - remoteAlbumAssetEntity, - remoteAlbumUserEntity, - memoryEntity, - memoryAssetEntity, - personEntity, - assetFaceEntity, - ]; - @override - int get schemaVersion => 6; - @override - DriftDatabaseOptions get options => - const DriftDatabaseOptions(storeDateTimeAsText: true); -} diff --git a/mobile/test/drift/main/generated/schema_v7.dart b/mobile/test/drift/main/generated/schema_v7.dart deleted file mode 100644 index e08c1ca445..0000000000 --- a/mobile/test/drift/main/generated/schema_v7.dart +++ /dev/null @@ -1,6456 +0,0 @@ -// dart format width=80 -import 'dart:typed_data' as i2; -// GENERATED BY drift_dev, DO NOT MODIFY. -// ignore_for_file: type=lint,unused_import -// -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 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 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 updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - @override - List get $columns => [ - id, - name, - isAdmin, - email, - hasProfileImage, - profileChangedAt, - updatedAt, - ]; - @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'], - )!, - isAdmin: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}is_admin'], - )!, - 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'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}updated_at'], - )!, - ); - } - - @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 bool isAdmin; - final String email; - final bool hasProfileImage; - final DateTime profileChangedAt; - final DateTime updatedAt; - const UserEntityData({ - required this.id, - required this.name, - required this.isAdmin, - required this.email, - required this.hasProfileImage, - required this.profileChangedAt, - required this.updatedAt, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['name'] = Variable(name); - map['is_admin'] = Variable(isAdmin); - map['email'] = Variable(email); - map['has_profile_image'] = Variable(hasProfileImage); - map['profile_changed_at'] = Variable(profileChangedAt); - map['updated_at'] = Variable(updatedAt); - return map; - } - - factory UserEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return UserEntityData( - id: serializer.fromJson(json['id']), - name: serializer.fromJson(json['name']), - isAdmin: serializer.fromJson(json['isAdmin']), - email: serializer.fromJson(json['email']), - hasProfileImage: serializer.fromJson(json['hasProfileImage']), - profileChangedAt: serializer.fromJson(json['profileChangedAt']), - updatedAt: serializer.fromJson(json['updatedAt']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'name': serializer.toJson(name), - 'isAdmin': serializer.toJson(isAdmin), - 'email': serializer.toJson(email), - 'hasProfileImage': serializer.toJson(hasProfileImage), - 'profileChangedAt': serializer.toJson(profileChangedAt), - 'updatedAt': serializer.toJson(updatedAt), - }; - } - - UserEntityData copyWith({ - String? id, - String? name, - bool? isAdmin, - String? email, - bool? hasProfileImage, - DateTime? profileChangedAt, - DateTime? updatedAt, - }) => UserEntityData( - id: id ?? this.id, - name: name ?? this.name, - isAdmin: isAdmin ?? this.isAdmin, - email: email ?? this.email, - hasProfileImage: hasProfileImage ?? this.hasProfileImage, - profileChangedAt: profileChangedAt ?? this.profileChangedAt, - updatedAt: updatedAt ?? this.updatedAt, - ); - UserEntityData copyWithCompanion(UserEntityCompanion data) { - return UserEntityData( - id: data.id.present ? data.id.value : this.id, - name: data.name.present ? data.name.value : this.name, - isAdmin: data.isAdmin.present ? data.isAdmin.value : this.isAdmin, - 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, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - ); - } - - @override - String toString() { - return (StringBuffer('UserEntityData(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('isAdmin: $isAdmin, ') - ..write('email: $email, ') - ..write('hasProfileImage: $hasProfileImage, ') - ..write('profileChangedAt: $profileChangedAt, ') - ..write('updatedAt: $updatedAt') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - name, - isAdmin, - email, - hasProfileImage, - profileChangedAt, - updatedAt, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is UserEntityData && - other.id == this.id && - other.name == this.name && - other.isAdmin == this.isAdmin && - other.email == this.email && - other.hasProfileImage == this.hasProfileImage && - other.profileChangedAt == this.profileChangedAt && - other.updatedAt == this.updatedAt); -} - -class UserEntityCompanion extends UpdateCompanion { - final Value id; - final Value name; - final Value isAdmin; - final Value email; - final Value hasProfileImage; - final Value profileChangedAt; - final Value updatedAt; - const UserEntityCompanion({ - this.id = const Value.absent(), - this.name = const Value.absent(), - this.isAdmin = const Value.absent(), - this.email = const Value.absent(), - this.hasProfileImage = const Value.absent(), - this.profileChangedAt = const Value.absent(), - this.updatedAt = const Value.absent(), - }); - UserEntityCompanion.insert({ - required String id, - required String name, - this.isAdmin = const Value.absent(), - required String email, - this.hasProfileImage = const Value.absent(), - this.profileChangedAt = const Value.absent(), - this.updatedAt = const Value.absent(), - }) : id = Value(id), - name = Value(name), - email = Value(email); - static Insertable custom({ - Expression? id, - Expression? name, - Expression? isAdmin, - Expression? email, - Expression? hasProfileImage, - Expression? profileChangedAt, - Expression? updatedAt, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (name != null) 'name': name, - if (isAdmin != null) 'is_admin': isAdmin, - if (email != null) 'email': email, - if (hasProfileImage != null) 'has_profile_image': hasProfileImage, - if (profileChangedAt != null) 'profile_changed_at': profileChangedAt, - if (updatedAt != null) 'updated_at': updatedAt, - }); - } - - UserEntityCompanion copyWith({ - Value? id, - Value? name, - Value? isAdmin, - Value? email, - Value? hasProfileImage, - Value? profileChangedAt, - Value? updatedAt, - }) { - return UserEntityCompanion( - id: id ?? this.id, - name: name ?? this.name, - isAdmin: isAdmin ?? this.isAdmin, - email: email ?? this.email, - hasProfileImage: hasProfileImage ?? this.hasProfileImage, - profileChangedAt: profileChangedAt ?? this.profileChangedAt, - updatedAt: updatedAt ?? this.updatedAt, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (name.present) { - map['name'] = Variable(name.value); - } - if (isAdmin.present) { - map['is_admin'] = Variable(isAdmin.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 (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('UserEntityCompanion(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('isAdmin: $isAdmin, ') - ..write('email: $email, ') - ..write('hasProfileImage: $hasProfileImage, ') - ..write('profileChangedAt: $profileChangedAt, ') - ..write('updatedAt: $updatedAt') - ..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 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 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, - 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'], - )!, - 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 bool? marker_; - const LocalAlbumEntityData({ - required this.id, - required this.name, - required this.updatedAt, - required this.backupSelection, - required this.isIosSharedAlbum, - 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 || 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']), - 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), - 'marker_': serializer.toJson(marker_), - }; - } - - LocalAlbumEntityData copyWith({ - String? id, - String? name, - DateTime? updatedAt, - int? backupSelection, - bool? isIosSharedAlbum, - 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, - 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, - 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('marker_: $marker_') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - name, - updatedAt, - backupSelection, - isIosSharedAlbum, - 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.marker_ == this.marker_); -} - -class LocalAlbumEntityCompanion extends UpdateCompanion { - final Value id; - final Value name; - final Value updatedAt; - final Value backupSelection; - final Value isIosSharedAlbum; - 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.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.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? 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 (marker_ != null) 'marker': marker_, - }); - } - - LocalAlbumEntityCompanion copyWith({ - Value? id, - Value? name, - Value? updatedAt, - Value? backupSelection, - Value? isIosSharedAlbum, - Value? marker_, - }) { - return LocalAlbumEntityCompanion( - id: id ?? this.id, - name: name ?? this.name, - updatedAt: updatedAt ?? this.updatedAt, - backupSelection: backupSelection ?? this.backupSelection, - isIosSharedAlbum: isIosSharedAlbum ?? this.isIosSharedAlbum, - 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 (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('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', - ), - ); - @override - List get $columns => [assetId, albumId]; - @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'], - )!, - ); - } - - @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; - const LocalAlbumAssetEntityData({ - 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 LocalAlbumAssetEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return LocalAlbumAssetEntityData( - 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), - }; - } - - LocalAlbumAssetEntityData copyWith({String? assetId, String? albumId}) => - LocalAlbumAssetEntityData( - assetId: assetId ?? this.assetId, - albumId: albumId ?? this.albumId, - ); - LocalAlbumAssetEntityData copyWithCompanion( - LocalAlbumAssetEntityCompanion data, - ) { - return LocalAlbumAssetEntityData( - assetId: data.assetId.present ? data.assetId.value : this.assetId, - albumId: data.albumId.present ? data.albumId.value : this.albumId, - ); - } - - @override - String toString() { - return (StringBuffer('LocalAlbumAssetEntityData(') - ..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 LocalAlbumAssetEntityData && - other.assetId == this.assetId && - other.albumId == this.albumId); -} - -class LocalAlbumAssetEntityCompanion - extends UpdateCompanion { - final Value assetId; - final Value albumId; - const LocalAlbumAssetEntityCompanion({ - this.assetId = const Value.absent(), - this.albumId = const Value.absent(), - }); - LocalAlbumAssetEntityCompanion.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, - }); - } - - LocalAlbumAssetEntityCompanion copyWith({ - Value? assetId, - Value? albumId, - }) { - return LocalAlbumAssetEntityCompanion( - 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('LocalAlbumAssetEntityCompanion(') - ..write('assetId: $assetId, ') - ..write('albumId: $albumId') - ..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 i2.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, - i2.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 i2.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 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 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 DatabaseAtV7 extends GeneratedDatabase { - DatabaseAtV7(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 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 UserMetadataEntity userMetadataEntity = UserMetadataEntity(this); - late final PartnerEntity partnerEntity = PartnerEntity(this); - late final RemoteExifEntity remoteExifEntity = RemoteExifEntity(this); - late final RemoteAlbumEntity remoteAlbumEntity = RemoteAlbumEntity(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 Index idxLatLng = Index( - 'idx_lat_lng', - 'CREATE INDEX IF NOT EXISTS idx_lat_lng ON remote_exif_entity (latitude, longitude)', - ); - @override - Iterable> get allTables => - allSchemaEntities.whereType>(); - @override - List get allSchemaEntities => [ - userEntity, - remoteAssetEntity, - stackEntity, - localAssetEntity, - localAlbumEntity, - localAlbumAssetEntity, - idxLocalAssetChecksum, - idxRemoteAssetOwnerChecksum, - uQRemoteAssetsOwnerChecksum, - uQRemoteAssetsOwnerLibraryChecksum, - idxRemoteAssetChecksum, - userMetadataEntity, - partnerEntity, - remoteExifEntity, - remoteAlbumEntity, - remoteAlbumAssetEntity, - remoteAlbumUserEntity, - memoryEntity, - memoryAssetEntity, - personEntity, - assetFaceEntity, - idxLatLng, - ]; - @override - int get schemaVersion => 7; - @override - DriftDatabaseOptions get options => - const DriftDatabaseOptions(storeDateTimeAsText: true); -} diff --git a/mobile/test/drift/main/generated/schema_v8.dart b/mobile/test/drift/main/generated/schema_v8.dart deleted file mode 100644 index 55a9d3ef4f..0000000000 --- a/mobile/test/drift/main/generated/schema_v8.dart +++ /dev/null @@ -1,6666 +0,0 @@ -// dart format width=80 -import 'dart:typed_data' as i2; -// GENERATED BY drift_dev, DO NOT MODIFY. -// ignore_for_file: type=lint,unused_import -// -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 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 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 updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - @override - List get $columns => [ - id, - name, - isAdmin, - email, - hasProfileImage, - profileChangedAt, - updatedAt, - ]; - @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'], - )!, - isAdmin: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}is_admin'], - )!, - 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'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}updated_at'], - )!, - ); - } - - @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 bool isAdmin; - final String email; - final bool hasProfileImage; - final DateTime profileChangedAt; - final DateTime updatedAt; - const UserEntityData({ - required this.id, - required this.name, - required this.isAdmin, - required this.email, - required this.hasProfileImage, - required this.profileChangedAt, - required this.updatedAt, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['name'] = Variable(name); - map['is_admin'] = Variable(isAdmin); - map['email'] = Variable(email); - map['has_profile_image'] = Variable(hasProfileImage); - map['profile_changed_at'] = Variable(profileChangedAt); - map['updated_at'] = Variable(updatedAt); - return map; - } - - factory UserEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return UserEntityData( - id: serializer.fromJson(json['id']), - name: serializer.fromJson(json['name']), - isAdmin: serializer.fromJson(json['isAdmin']), - email: serializer.fromJson(json['email']), - hasProfileImage: serializer.fromJson(json['hasProfileImage']), - profileChangedAt: serializer.fromJson(json['profileChangedAt']), - updatedAt: serializer.fromJson(json['updatedAt']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'name': serializer.toJson(name), - 'isAdmin': serializer.toJson(isAdmin), - 'email': serializer.toJson(email), - 'hasProfileImage': serializer.toJson(hasProfileImage), - 'profileChangedAt': serializer.toJson(profileChangedAt), - 'updatedAt': serializer.toJson(updatedAt), - }; - } - - UserEntityData copyWith({ - String? id, - String? name, - bool? isAdmin, - String? email, - bool? hasProfileImage, - DateTime? profileChangedAt, - DateTime? updatedAt, - }) => UserEntityData( - id: id ?? this.id, - name: name ?? this.name, - isAdmin: isAdmin ?? this.isAdmin, - email: email ?? this.email, - hasProfileImage: hasProfileImage ?? this.hasProfileImage, - profileChangedAt: profileChangedAt ?? this.profileChangedAt, - updatedAt: updatedAt ?? this.updatedAt, - ); - UserEntityData copyWithCompanion(UserEntityCompanion data) { - return UserEntityData( - id: data.id.present ? data.id.value : this.id, - name: data.name.present ? data.name.value : this.name, - isAdmin: data.isAdmin.present ? data.isAdmin.value : this.isAdmin, - 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, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - ); - } - - @override - String toString() { - return (StringBuffer('UserEntityData(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('isAdmin: $isAdmin, ') - ..write('email: $email, ') - ..write('hasProfileImage: $hasProfileImage, ') - ..write('profileChangedAt: $profileChangedAt, ') - ..write('updatedAt: $updatedAt') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - name, - isAdmin, - email, - hasProfileImage, - profileChangedAt, - updatedAt, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is UserEntityData && - other.id == this.id && - other.name == this.name && - other.isAdmin == this.isAdmin && - other.email == this.email && - other.hasProfileImage == this.hasProfileImage && - other.profileChangedAt == this.profileChangedAt && - other.updatedAt == this.updatedAt); -} - -class UserEntityCompanion extends UpdateCompanion { - final Value id; - final Value name; - final Value isAdmin; - final Value email; - final Value hasProfileImage; - final Value profileChangedAt; - final Value updatedAt; - const UserEntityCompanion({ - this.id = const Value.absent(), - this.name = const Value.absent(), - this.isAdmin = const Value.absent(), - this.email = const Value.absent(), - this.hasProfileImage = const Value.absent(), - this.profileChangedAt = const Value.absent(), - this.updatedAt = const Value.absent(), - }); - UserEntityCompanion.insert({ - required String id, - required String name, - this.isAdmin = const Value.absent(), - required String email, - this.hasProfileImage = const Value.absent(), - this.profileChangedAt = const Value.absent(), - this.updatedAt = const Value.absent(), - }) : id = Value(id), - name = Value(name), - email = Value(email); - static Insertable custom({ - Expression? id, - Expression? name, - Expression? isAdmin, - Expression? email, - Expression? hasProfileImage, - Expression? profileChangedAt, - Expression? updatedAt, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (name != null) 'name': name, - if (isAdmin != null) 'is_admin': isAdmin, - if (email != null) 'email': email, - if (hasProfileImage != null) 'has_profile_image': hasProfileImage, - if (profileChangedAt != null) 'profile_changed_at': profileChangedAt, - if (updatedAt != null) 'updated_at': updatedAt, - }); - } - - UserEntityCompanion copyWith({ - Value? id, - Value? name, - Value? isAdmin, - Value? email, - Value? hasProfileImage, - Value? profileChangedAt, - Value? updatedAt, - }) { - return UserEntityCompanion( - id: id ?? this.id, - name: name ?? this.name, - isAdmin: isAdmin ?? this.isAdmin, - email: email ?? this.email, - hasProfileImage: hasProfileImage ?? this.hasProfileImage, - profileChangedAt: profileChangedAt ?? this.profileChangedAt, - updatedAt: updatedAt ?? this.updatedAt, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (name.present) { - map['name'] = Variable(name.value); - } - if (isAdmin.present) { - map['is_admin'] = Variable(isAdmin.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 (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('UserEntityCompanion(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('isAdmin: $isAdmin, ') - ..write('email: $email, ') - ..write('hasProfileImage: $hasProfileImage, ') - ..write('profileChangedAt: $profileChangedAt, ') - ..write('updatedAt: $updatedAt') - ..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 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 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, - 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'], - )!, - 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 bool? marker_; - const LocalAlbumEntityData({ - required this.id, - required this.name, - required this.updatedAt, - required this.backupSelection, - required this.isIosSharedAlbum, - 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 || 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']), - 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), - 'marker_': serializer.toJson(marker_), - }; - } - - LocalAlbumEntityData copyWith({ - String? id, - String? name, - DateTime? updatedAt, - int? backupSelection, - bool? isIosSharedAlbum, - 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, - 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, - 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('marker_: $marker_') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - name, - updatedAt, - backupSelection, - isIosSharedAlbum, - 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.marker_ == this.marker_); -} - -class LocalAlbumEntityCompanion extends UpdateCompanion { - final Value id; - final Value name; - final Value updatedAt; - final Value backupSelection; - final Value isIosSharedAlbum; - 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.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.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? 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 (marker_ != null) 'marker': marker_, - }); - } - - LocalAlbumEntityCompanion copyWith({ - Value? id, - Value? name, - Value? updatedAt, - Value? backupSelection, - Value? isIosSharedAlbum, - Value? marker_, - }) { - return LocalAlbumEntityCompanion( - id: id ?? this.id, - name: name ?? this.name, - updatedAt: updatedAt ?? this.updatedAt, - backupSelection: backupSelection ?? this.backupSelection, - isIosSharedAlbum: isIosSharedAlbum ?? this.isIosSharedAlbum, - 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 (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('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', - ), - ); - @override - List get $columns => [assetId, albumId]; - @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'], - )!, - ); - } - - @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; - const LocalAlbumAssetEntityData({ - 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 LocalAlbumAssetEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return LocalAlbumAssetEntityData( - 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), - }; - } - - LocalAlbumAssetEntityData copyWith({String? assetId, String? albumId}) => - LocalAlbumAssetEntityData( - assetId: assetId ?? this.assetId, - albumId: albumId ?? this.albumId, - ); - LocalAlbumAssetEntityData copyWithCompanion( - LocalAlbumAssetEntityCompanion data, - ) { - return LocalAlbumAssetEntityData( - assetId: data.assetId.present ? data.assetId.value : this.assetId, - albumId: data.albumId.present ? data.albumId.value : this.albumId, - ); - } - - @override - String toString() { - return (StringBuffer('LocalAlbumAssetEntityData(') - ..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 LocalAlbumAssetEntityData && - other.assetId == this.assetId && - other.albumId == this.albumId); -} - -class LocalAlbumAssetEntityCompanion - extends UpdateCompanion { - final Value assetId; - final Value albumId; - const LocalAlbumAssetEntityCompanion({ - this.assetId = const Value.absent(), - this.albumId = const Value.absent(), - }); - LocalAlbumAssetEntityCompanion.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, - }); - } - - LocalAlbumAssetEntityCompanion copyWith({ - Value? assetId, - Value? albumId, - }) { - return LocalAlbumAssetEntityCompanion( - 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('LocalAlbumAssetEntityCompanion(') - ..write('assetId: $assetId, ') - ..write('albumId: $albumId') - ..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 i2.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, - i2.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 i2.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 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 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 DatabaseAtV8 extends GeneratedDatabase { - DatabaseAtV8(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 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 UserMetadataEntity userMetadataEntity = UserMetadataEntity(this); - late final PartnerEntity partnerEntity = PartnerEntity(this); - late final RemoteExifEntity remoteExifEntity = RemoteExifEntity(this); - late final RemoteAlbumEntity remoteAlbumEntity = RemoteAlbumEntity(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 Index idxLatLng = Index( - 'idx_lat_lng', - 'CREATE INDEX IF NOT EXISTS idx_lat_lng ON remote_exif_entity (latitude, longitude)', - ); - @override - Iterable> get allTables => - allSchemaEntities.whereType>(); - @override - List get allSchemaEntities => [ - userEntity, - remoteAssetEntity, - stackEntity, - localAssetEntity, - localAlbumEntity, - localAlbumAssetEntity, - idxLocalAssetChecksum, - idxRemoteAssetOwnerChecksum, - uQRemoteAssetsOwnerChecksum, - uQRemoteAssetsOwnerLibraryChecksum, - idxRemoteAssetChecksum, - userMetadataEntity, - partnerEntity, - remoteExifEntity, - remoteAlbumEntity, - remoteAlbumAssetEntity, - remoteAlbumUserEntity, - memoryEntity, - memoryAssetEntity, - personEntity, - assetFaceEntity, - storeEntity, - idxLatLng, - ]; - @override - int get schemaVersion => 8; - @override - DriftDatabaseOptions get options => - const DriftDatabaseOptions(storeDateTimeAsText: true); -} diff --git a/mobile/test/drift/main/generated/schema_v9.dart b/mobile/test/drift/main/generated/schema_v9.dart deleted file mode 100644 index f09db1a378..0000000000 --- a/mobile/test/drift/main/generated/schema_v9.dart +++ /dev/null @@ -1,6715 +0,0 @@ -// dart format width=80 -import 'dart:typed_data' as i2; -// GENERATED BY drift_dev, DO NOT MODIFY. -// ignore_for_file: type=lint,unused_import -// -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 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 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 updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - @override - List get $columns => [ - id, - name, - isAdmin, - email, - hasProfileImage, - profileChangedAt, - updatedAt, - ]; - @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'], - )!, - isAdmin: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}is_admin'], - )!, - 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'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}updated_at'], - )!, - ); - } - - @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 bool isAdmin; - final String email; - final bool hasProfileImage; - final DateTime profileChangedAt; - final DateTime updatedAt; - const UserEntityData({ - required this.id, - required this.name, - required this.isAdmin, - required this.email, - required this.hasProfileImage, - required this.profileChangedAt, - required this.updatedAt, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['name'] = Variable(name); - map['is_admin'] = Variable(isAdmin); - map['email'] = Variable(email); - map['has_profile_image'] = Variable(hasProfileImage); - map['profile_changed_at'] = Variable(profileChangedAt); - map['updated_at'] = Variable(updatedAt); - return map; - } - - factory UserEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return UserEntityData( - id: serializer.fromJson(json['id']), - name: serializer.fromJson(json['name']), - isAdmin: serializer.fromJson(json['isAdmin']), - email: serializer.fromJson(json['email']), - hasProfileImage: serializer.fromJson(json['hasProfileImage']), - profileChangedAt: serializer.fromJson(json['profileChangedAt']), - updatedAt: serializer.fromJson(json['updatedAt']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'name': serializer.toJson(name), - 'isAdmin': serializer.toJson(isAdmin), - 'email': serializer.toJson(email), - 'hasProfileImage': serializer.toJson(hasProfileImage), - 'profileChangedAt': serializer.toJson(profileChangedAt), - 'updatedAt': serializer.toJson(updatedAt), - }; - } - - UserEntityData copyWith({ - String? id, - String? name, - bool? isAdmin, - String? email, - bool? hasProfileImage, - DateTime? profileChangedAt, - DateTime? updatedAt, - }) => UserEntityData( - id: id ?? this.id, - name: name ?? this.name, - isAdmin: isAdmin ?? this.isAdmin, - email: email ?? this.email, - hasProfileImage: hasProfileImage ?? this.hasProfileImage, - profileChangedAt: profileChangedAt ?? this.profileChangedAt, - updatedAt: updatedAt ?? this.updatedAt, - ); - UserEntityData copyWithCompanion(UserEntityCompanion data) { - return UserEntityData( - id: data.id.present ? data.id.value : this.id, - name: data.name.present ? data.name.value : this.name, - isAdmin: data.isAdmin.present ? data.isAdmin.value : this.isAdmin, - 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, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - ); - } - - @override - String toString() { - return (StringBuffer('UserEntityData(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('isAdmin: $isAdmin, ') - ..write('email: $email, ') - ..write('hasProfileImage: $hasProfileImage, ') - ..write('profileChangedAt: $profileChangedAt, ') - ..write('updatedAt: $updatedAt') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - name, - isAdmin, - email, - hasProfileImage, - profileChangedAt, - updatedAt, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is UserEntityData && - other.id == this.id && - other.name == this.name && - other.isAdmin == this.isAdmin && - other.email == this.email && - other.hasProfileImage == this.hasProfileImage && - other.profileChangedAt == this.profileChangedAt && - other.updatedAt == this.updatedAt); -} - -class UserEntityCompanion extends UpdateCompanion { - final Value id; - final Value name; - final Value isAdmin; - final Value email; - final Value hasProfileImage; - final Value profileChangedAt; - final Value updatedAt; - const UserEntityCompanion({ - this.id = const Value.absent(), - this.name = const Value.absent(), - this.isAdmin = const Value.absent(), - this.email = const Value.absent(), - this.hasProfileImage = const Value.absent(), - this.profileChangedAt = const Value.absent(), - this.updatedAt = const Value.absent(), - }); - UserEntityCompanion.insert({ - required String id, - required String name, - this.isAdmin = const Value.absent(), - required String email, - this.hasProfileImage = const Value.absent(), - this.profileChangedAt = const Value.absent(), - this.updatedAt = const Value.absent(), - }) : id = Value(id), - name = Value(name), - email = Value(email); - static Insertable custom({ - Expression? id, - Expression? name, - Expression? isAdmin, - Expression? email, - Expression? hasProfileImage, - Expression? profileChangedAt, - Expression? updatedAt, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (name != null) 'name': name, - if (isAdmin != null) 'is_admin': isAdmin, - if (email != null) 'email': email, - if (hasProfileImage != null) 'has_profile_image': hasProfileImage, - if (profileChangedAt != null) 'profile_changed_at': profileChangedAt, - if (updatedAt != null) 'updated_at': updatedAt, - }); - } - - UserEntityCompanion copyWith({ - Value? id, - Value? name, - Value? isAdmin, - Value? email, - Value? hasProfileImage, - Value? profileChangedAt, - Value? updatedAt, - }) { - return UserEntityCompanion( - id: id ?? this.id, - name: name ?? this.name, - isAdmin: isAdmin ?? this.isAdmin, - email: email ?? this.email, - hasProfileImage: hasProfileImage ?? this.hasProfileImage, - profileChangedAt: profileChangedAt ?? this.profileChangedAt, - updatedAt: updatedAt ?? this.updatedAt, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (name.present) { - map['name'] = Variable(name.value); - } - if (isAdmin.present) { - map['is_admin'] = Variable(isAdmin.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 (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('UserEntityCompanion(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('isAdmin: $isAdmin, ') - ..write('email: $email, ') - ..write('hasProfileImage: $hasProfileImage, ') - ..write('profileChangedAt: $profileChangedAt, ') - ..write('updatedAt: $updatedAt') - ..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', - ), - ); - @override - List get $columns => [assetId, albumId]; - @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'], - )!, - ); - } - - @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; - const LocalAlbumAssetEntityData({ - 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 LocalAlbumAssetEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return LocalAlbumAssetEntityData( - 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), - }; - } - - LocalAlbumAssetEntityData copyWith({String? assetId, String? albumId}) => - LocalAlbumAssetEntityData( - assetId: assetId ?? this.assetId, - albumId: albumId ?? this.albumId, - ); - LocalAlbumAssetEntityData copyWithCompanion( - LocalAlbumAssetEntityCompanion data, - ) { - return LocalAlbumAssetEntityData( - assetId: data.assetId.present ? data.assetId.value : this.assetId, - albumId: data.albumId.present ? data.albumId.value : this.albumId, - ); - } - - @override - String toString() { - return (StringBuffer('LocalAlbumAssetEntityData(') - ..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 LocalAlbumAssetEntityData && - other.assetId == this.assetId && - other.albumId == this.albumId); -} - -class LocalAlbumAssetEntityCompanion - extends UpdateCompanion { - final Value assetId; - final Value albumId; - const LocalAlbumAssetEntityCompanion({ - this.assetId = const Value.absent(), - this.albumId = const Value.absent(), - }); - LocalAlbumAssetEntityCompanion.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, - }); - } - - LocalAlbumAssetEntityCompanion copyWith({ - Value? assetId, - Value? albumId, - }) { - return LocalAlbumAssetEntityCompanion( - 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('LocalAlbumAssetEntityCompanion(') - ..write('assetId: $assetId, ') - ..write('albumId: $albumId') - ..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 i2.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, - i2.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 i2.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 DatabaseAtV9 extends GeneratedDatabase { - DatabaseAtV9(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 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 Index idxLatLng = Index( - 'idx_lat_lng', - 'CREATE INDEX IF NOT EXISTS idx_lat_lng ON remote_exif_entity (latitude, longitude)', - ); - @override - Iterable> get allTables => - allSchemaEntities.whereType>(); - @override - List get allSchemaEntities => [ - userEntity, - remoteAssetEntity, - stackEntity, - localAssetEntity, - remoteAlbumEntity, - localAlbumEntity, - localAlbumAssetEntity, - idxLocalAssetChecksum, - idxRemoteAssetOwnerChecksum, - uQRemoteAssetsOwnerChecksum, - uQRemoteAssetsOwnerLibraryChecksum, - idxRemoteAssetChecksum, - userMetadataEntity, - partnerEntity, - remoteExifEntity, - remoteAlbumAssetEntity, - remoteAlbumUserEntity, - memoryEntity, - memoryAssetEntity, - personEntity, - assetFaceEntity, - storeEntity, - idxLatLng, - ]; - @override - int get schemaVersion => 9; - @override - DriftDatabaseOptions get options => - const DriftDatabaseOptions(storeDateTimeAsText: true); -} diff --git a/mobile/test/drift/main/migration_test.dart b/mobile/test/drift/main/migration_test.dart index 74467492ae..ce3f644b98 100644 --- a/mobile/test/drift/main/migration_test.dart +++ b/mobile/test/drift/main/migration_test.dart @@ -1,5 +1,5 @@ // dart format width=80 -// ignore_for_file: unused_local_variable, unused_import +// ignore_for_file: unused_import import 'package:drift/drift.dart'; import 'package:drift_dev/api/migrations_native.dart'; import 'package:flutter_test/flutter_test.dart'; diff --git a/mobile/test/flutter_test_config.dart b/mobile/test/flutter_test_config.dart new file mode 100644 index 0000000000..afee643fe7 --- /dev/null +++ b/mobile/test/flutter_test_config.dart @@ -0,0 +1,13 @@ +import 'dart:async'; + +import 'package:easy_localization/easy_localization.dart'; +import 'package:flutter/foundation.dart'; +import 'package:logging/logging.dart'; + +Future testExecutable(FutureOr Function() testMain) async { + Logger.root.level = Level.OFF; + EasyLocalization.logger.enableBuildModes = []; + // ignore: banned-usage + debugPrint = (String? message, {int? wrapWidth}) {}; + return testMain(); +} diff --git a/mobile/test/infrastructure/loaders/remote_image_request_test.dart b/mobile/test/infrastructure/loaders/remote_image_request_test.dart new file mode 100644 index 0000000000..97bdf3e2bf --- /dev/null +++ b/mobile/test/infrastructure/loaders/remote_image_request_test.dart @@ -0,0 +1,117 @@ +import 'dart:ffi'; +import 'dart:io'; +import 'dart:ui' as ui; + +import 'package:ffi/ffi.dart'; +import 'package:flutter/services.dart'; +import 'package:flutter_test/flutter_test.dart'; +import 'package:immich_mobile/infrastructure/loaders/image_request.dart'; +import 'package:immich_mobile/platform/remote_image_api.g.dart'; +import 'package:immich_mobile/presentation/widgets/images/remote_image_provider.dart'; + +void main() { + TestWidgetsFlutterBinding.ensureInitialized(); + + const channel = BasicMessageChannel( + 'dev.flutter.pigeon.immich_mobile.RemoteImageApi.requestImage', + RemoteImageApi.pigeonChannelCodec, + ); + late List args; + + setUp(() { + TestDefaultBinaryMessengerBinding.instance.defaultBinaryMessenger.setMockDecodedMessageHandler(channel, ( + message, + ) async { + args = message! as List; + return [null]; + }); + }); + + tearDown(() { + TestDefaultBinaryMessengerBinding.instance.defaultBinaryMessenger.setMockDecodedMessageHandler(channel, null); + }); + + Future loadEncoded(String path, ui.Size decodeSize) async { + final bytes = await File(path).readAsBytes(); + final pointer = malloc(bytes.length)..asTypedList(bytes.length).setAll(0, bytes); + TestDefaultBinaryMessengerBinding.instance.defaultBinaryMessenger.setMockDecodedMessageHandler(channel, ( + message, + ) async { + return [ + {'pointer': pointer.address, 'length': bytes.length}, + ]; + }); + final request = RemoteImageRequest(uri: 'https://example.test/fallback', decodeSize: decodeSize); + + return (await request.load((_, {getTargetSize}) => throw UnimplementedError()))!.image; + } + + test('passes the requested decode size to the platform', () async { + final request = RemoteImageRequest(uri: 'https://example.test/thumbnail', decodeSize: const ui.Size(319.1, 179.1)); + + await request.load((_, {getTargetSize}) => throw UnimplementedError()); + + expect(args[0], 'https://example.test/thumbnail'); + expect(args[2], isFalse); + expect(args[3], 320); + expect(args[4], 180); + }); + + test('leaves requests without a size unbounded', () async { + final request = RemoteImageRequest(uri: 'https://example.test/thumbnail'); + + await request.load((_, {getTargetSize}) => throw UnimplementedError()); + + expect(args[3], isNull); + expect(args[4], isNull); + }); + + test('leaves encoded animation requests unbounded', () async { + final request = RemoteImageRequest(uri: 'https://example.test/animation', decodeSize: const ui.Size(320, 180)); + + await request.loadCodec(); + + expect(args[2], isTrue); + expect(args[3], isNull); + expect(args[4], isNull); + }); + + test('keeps portrait cover quality in a wide tile', () async { + final image = await loadEncoded('assets/feature_message/ocr.webp', const ui.Size(963, 642)); + + expect(image.width, 963); + expect(image.height, 1453); + image.dispose(); + }); + + test('preserves cover quality for extreme aspect ratios', () async { + final image = await loadEncoded('assets/immich-logo-inline-light.png', const ui.Size.square(320)); + + expect(image.width, 1311); + expect(image.height, 320); + image.dispose(); + }); + + test('does not upscale encoded fallback', () async { + final image = await loadEncoded('assets/feature_message/ocr.webp', const ui.Size.square(2000)); + + expect(image.width, 1206); + expect(image.height, 1819); + image.dispose(); + }); + + test('uses the decode size in the provider cache key', () { + final small = RemoteImageProvider(url: 'https://example.test/thumbnail', decodeSize: const ui.Size.square(160)); + final large = RemoteImageProvider(url: 'https://example.test/thumbnail', decodeSize: const ui.Size.square(320)); + + expect(small, isNot(large)); + }); + + test('shares the cache key when no decode size is set', () { + final first = RemoteImageProvider(url: 'https://example.test/thumbnail'); + final second = RemoteImageProvider(url: 'https://example.test/thumbnail'); + + expect(first, second); + expect(first.hashCode, second.hashCode); + }); +} diff --git a/mobile/test/infrastructure/repositories/local_album_repository_test.dart b/mobile/test/infrastructure/repositories/local_album_repository_test.dart index fae0e09171..ada4281e2a 100644 --- a/mobile/test/infrastructure/repositories/local_album_repository_test.dart +++ b/mobile/test/infrastructure/repositories/local_album_repository_test.dart @@ -2,6 +2,7 @@ import 'package:drift/drift.dart'; import 'package:drift/native.dart'; import 'package:flutter_test/flutter_test.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/repositories/db.repository.dart'; import 'package:immich_mobile/infrastructure/repositories/local_album.repository.dart'; @@ -16,6 +17,10 @@ void main() { mediumFactory = MediumFactory(db); }); + tearDown(() async { + await db.close(); + }); + group('getAll', () { test('sorts albums by backupSelection & isIosSharedAlbum', () async { final localAlbumRepo = mediumFactory.getRepository(); @@ -35,4 +40,75 @@ void main() { expect(albums[3].id, '2'); // excluded }); }); + + group('processDelta', () { + // Regression for #22844: an asset moved (not copied) into a backup album on + // Android was dropped. The delta reports only the asset's new album, and the + // stale link to its old album made the per-album delete sweep wipe the asset. + test('keeps an asset moved to another album that still holds other assets', () async { + final localAlbumRepo = mediumFactory.getRepository(); + + final moved = _localAsset('moved'); + final other = _localAsset('other'); + await localAlbumRepo.upsert( + mediumFactory.localAlbum(id: 'src', backupSelection: BackupSelection.none), + toUpsert: [moved, other], + ); + final anchor = _localAsset('anchor'); + await localAlbumRepo.upsert( + mediumFactory.localAlbum(id: 'dst', backupSelection: BackupSelection.selected), + toUpsert: [anchor], + ); + + // Delta reports the moved asset now living only in the destination album. + await localAlbumRepo.processDelta( + updates: [moved], + deletes: [], + assetAlbums: { + 'moved': ['dst'], + }, + ); + + // Per-album delete sweep, as sync() runs on Android. src now physically + // holds only `other`; dst holds `anchor` and the moved asset. + await localAlbumRepo.syncDeletes('src', ['other']); + await localAlbumRepo.syncDeletes('dst', ['anchor', 'moved']); + + final dstIds = (await localAlbumRepo.getAssets('dst')).map((a) => a.id).toSet(); + final srcIds = await localAlbumRepo.getAssetIds('src'); + + expect(dstIds, contains('moved')); // survived and linked to the backed-up album + expect(srcIds, isNot(contains('moved'))); // stale source link cleared + expect(srcIds, contains('other')); // untouched asset stays put + }); + + test('replaces album membership with exactly what the delta reports', () async { + final localAlbumRepo = mediumFactory.getRepository(); + + final moved = _localAsset('moved'); + await localAlbumRepo.upsert(mediumFactory.localAlbum(id: 'src'), toUpsert: [moved]); + await localAlbumRepo.upsert(mediumFactory.localAlbum(id: 'dst')); + + await localAlbumRepo.processDelta( + updates: [moved], + deletes: [], + assetAlbums: { + 'moved': ['dst'], + }, + ); + + expect(await localAlbumRepo.getAssetIds('src'), isEmpty); + expect(await localAlbumRepo.getAssetIds('dst'), ['moved']); + }); + }); } + +LocalAsset _localAsset(String id) => LocalAsset( + id: id, + name: '$id.jpg', + type: AssetType.image, + createdAt: DateTime(2024), + updatedAt: DateTime(2024), + playbackStyle: AssetPlaybackStyle.image, + isEdited: false, +); diff --git a/mobile/test/infrastructure/repositories/sync_api_repository_test.dart b/mobile/test/infrastructure/repositories/sync_api_repository_test.dart index d538b567bd..798a5b7f28 100644 --- a/mobile/test/infrastructure/repositories/sync_api_repository_test.dart +++ b/mobile/test/infrastructure/repositories/sync_api_repository_test.dart @@ -37,7 +37,7 @@ void main() { late MockHttpClient mockHttpClient; late MockStreamedResponse mockStreamedResponse; late StreamController> responseStreamController; - late int testBatchSize = 3; + const int testBatchSize = 3; setUpAll(() async { final db = Drift(DatabaseConnection(NativeDatabase.memory(), closeStreamsSynchronously: true)); @@ -189,7 +189,7 @@ void main() { final Completer firstBatchReceived = Completer(); final Completer secondBatchReceived = Completer(); - Future onDataCallback(List events, Function() _, Function() __) async { + Future onDataCallback(List events, Function() _, Function() _) async { onDataCallCount++; if (onDataCallCount == 1) { receivedEventsBatch1 = events; @@ -244,7 +244,7 @@ void main() { final streamError = Exception("Network Error"); int onDataCallCount = 0; - Future onDataCallback(List _, Function() _, Function() __) async { + Future onDataCallback(List _, Function() _, Function() _) async { onDataCallCount++; } @@ -270,7 +270,7 @@ void main() { when(() => mockStreamedResponse.stream).thenAnswer((_) => http.ByteStream(errorBodyController.stream)); int onDataCallCount = 0; - Future onDataCallback(List _, Function() _, Function() __) async { + Future onDataCallback(List _, Function() _, Function() _) async { onDataCallCount++; } diff --git a/mobile/test/infrastructure/repository.mock.dart b/mobile/test/infrastructure/repository.mock.dart index 0688576682..355e128fc0 100644 --- a/mobile/test/infrastructure/repository.mock.dart +++ b/mobile/test/infrastructure/repository.mock.dart @@ -3,9 +3,9 @@ import 'package:immich_mobile/infrastructure/repositories/local_album.repository import 'package:immich_mobile/infrastructure/repositories/local_asset.repository.dart'; import 'package:immich_mobile/infrastructure/repositories/log.repository.dart'; import 'package:immich_mobile/infrastructure/repositories/partner.repository.dart'; -import 'package:immich_mobile/infrastructure/repositories/settings.repository.dart'; import 'package:immich_mobile/infrastructure/repositories/remote_album.repository.dart'; import 'package:immich_mobile/infrastructure/repositories/remote_asset.repository.dart'; +import 'package:immich_mobile/infrastructure/repositories/settings.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'; diff --git a/mobile/test/medium/repositories/local_asset_repository_test.dart b/mobile/test/medium/repositories/local_asset_repository_test.dart index bc74728346..2376445d1a 100644 --- a/mobile/test/medium/repositories/local_asset_repository_test.dart +++ b/mobile/test/medium/repositories/local_asset_repository_test.dart @@ -19,6 +19,73 @@ void main() { await ctx.dispose(); }); + group('get', () { + late String userId; + + setUp(() async { + final user = await ctx.newUser(); + userId = user.id; + // Owner-scoped queries resolve the current user via authUserEntity. + await ctx.newAuthUser(id: userId); + }); + + test('allows the same checksum to exist for multiple owners (#29973)', () async { + const checksum = 'some-shared-checksum'; + final mine = await ctx.newRemoteAsset(ownerId: userId, checksum: checksum); + final partner = await ctx.newUser(); + await ctx.newRemoteAsset(ownerId: partner.id, checksum: checksum); + final local = await ctx.newLocalAsset(checksum: checksum); + + final result = await sut.get(local.id); + + expect(result, isNotNull); + expect(result!.id, local.id); + // We must explicitly get OUR asset, not the partner's + expect(result.remoteId, mine.id); + }); + + test('reports local-only when only a partner has a remote copy (#29973)', () async { + // The current user has NOT uploaded this file; only a partner owns an identical-checksum remote asset + const checksum = 'partner-only'; + final partner = await ctx.newUser(); + await ctx.newRemoteAsset(ownerId: partner.id, checksum: checksum); + final local = await ctx.newLocalAsset(checksum: checksum); + + final result = await sut.get(local.id); + + expect(result, isNotNull); + expect(result!.remoteId, isNull); + expect(result.storage, AssetState.local); + }); + + test('allows the current user to have access to multiple remote rows for one checksum (#29973)', () async { + // A single user can have their own remote asset, a partner's remote asset, and a local asset all with the same checksum + const checksum = 'multi-library'; + final partner = await ctx.newUser(); + await ctx.newRemoteAsset(ownerId: partner.id, checksum: checksum); + await ctx.newRemoteAsset(ownerId: userId, checksum: checksum); + final local = await ctx.newLocalAsset(checksum: checksum); + + final result = await sut.get(local.id); + + expect(result, isNotNull); + expect(result!.id, local.id); + expect(result.remoteId, isNotNull); + }); + + test('attaches remoteId to local asset automatically in simple scenarios', () async { + const checksum = 'simple'; + final remote = await ctx.newRemoteAsset(ownerId: userId, checksum: checksum); + final local = await ctx.newLocalAsset(checksum: checksum); + + final result = await sut.get(local.id); + + expect(result, isNotNull); + expect(result!.remoteId, remote.id); + expect(result.storage, AssetState.merged); + }); + }); + group('getRemovalCandidates', () { final cutoffDate = DateTime(2024, 1, 1); final beforeCutoff = DateTime(2023, 12, 31); @@ -456,7 +523,7 @@ void main() { test('does not update when longitude does not match', () async { final remoteAsset = await ctx.newRemoteAsset(ownerId: userId); - final cloudIdAsset = await ctx.newRemoteAssetCloudId(id: remoteAsset.id, longitude: .fromNullable((-74.006))); + final cloudIdAsset = await ctx.newRemoteAssetCloudId(id: remoteAsset.id, longitude: .fromNullable(-74.006)); final localAsset = await ctx.newLocalAsset( checksumOption: const Option.none(), iCloudId: cloudIdAsset.cloudId, diff --git a/mobile/test/medium/repositories/remote_asset_repository_test.dart b/mobile/test/medium/repositories/remote_asset_repository_test.dart new file mode 100644 index 0000000000..f534355d99 --- /dev/null +++ b/mobile/test/medium/repositories/remote_asset_repository_test.dart @@ -0,0 +1,67 @@ +import 'package:flutter_test/flutter_test.dart'; +import 'package:immich_mobile/infrastructure/repositories/remote_asset.repository.dart'; + +import '../repository_context.dart'; + +void main() { + late MediumRepositoryContext ctx; + late RemoteAssetRepository sut; + + setUp(() { + ctx = MediumRepositoryContext(); + sut = RemoteAssetRepository(ctx.db); + }); + + tearDown(() async { + await ctx.dispose(); + }); + + group('getByChecksum', () { + late String userId; + + setUp(() async { + final user = await ctx.newUser(); + userId = user.id; + await ctx.newAuthUser(id: userId); + }); + + test('returns all assets when a partner shares the checksum', () async { + const checksum = 'shared-partner-checksum'; + final mine = await ctx.newRemoteAsset(ownerId: userId, checksum: checksum); + final partner = await ctx.newUser(); + final theirs = await ctx.newRemoteAsset(ownerId: partner.id, checksum: checksum); + + final result = await sut.getAllDebugForChecksum(checksum); + final mineResult = result.firstWhere((asset) => asset.id == mine.id); + final theirResult = result.firstWhere((asset) => asset.id == theirs.id); + + expect(result, isNotEmpty); + expect(mineResult.id, mine.id); + expect(mineResult.ownerId, userId); + + expect(theirResult.id, theirs.id); + expect(theirResult.ownerId, partner.id); + }); + + test('returns partner asset only if there is no matching user asset', () async { + const checksum = 'partner-only'; + final partner = await ctx.newUser(); + final theirs = await ctx.newRemoteAsset(ownerId: partner.id, checksum: checksum); + + final result = await sut.getAllDebugForChecksum(checksum); + + expect(result.length, 1); + expect(result[0].id, theirs.id); + }); + + test('returns the current user\'s asset', () async { + const checksum = 'simple'; + final remote = await ctx.newRemoteAsset(ownerId: userId, checksum: checksum); + + final result = await sut.getAllDebugForChecksum(checksum); + + expect(result.length, 1); + expect(result[0].id, remote.id); + }); + }); +} diff --git a/mobile/test/medium/repositories/timeline_repository_test.dart b/mobile/test/medium/repositories/timeline_repository_test.dart index f604f53c3e..502a65d45b 100644 --- a/mobile/test/medium/repositories/timeline_repository_test.dart +++ b/mobile/test/medium/repositories/timeline_repository_test.dart @@ -27,7 +27,7 @@ void main() { // Regression check for #23273: a LEFT OUTER JOIN on checksum would fan out and create duplicates // happens when same photo exists in multiple albums on device final user = await ctx.newUser(); - final checksum = 'yolo'; + const checksum = 'yolo'; final album = await ctx.newRemoteAlbum(ownerId: user.id); final remoteAsset = await ctx.newRemoteAsset(ownerId: user.id, checksum: checksum); await ctx.newRemoteAlbumAsset(albumId: album.id, assetId: remoteAsset.id); @@ -70,4 +70,80 @@ void main() { expect((assets.first as RemoteAsset).id, asset.id); }); }); + + group('live photos', () { + test('remote-only live photo contains livePhotoVideoId and is marked as a motion photo', () async { + final user = await ctx.newUser(); + final asset = await ctx.newRemoteAsset(ownerId: user.id, livePhotoVideoId: 'motion-photo-1'); + + final assets = await sut.main([user.id], .day).assetSource(0, 10); + + expect(assets, hasLength(1)); + final remote = assets.single as RemoteAsset; + expect(remote.id, asset.id); + expect(remote.livePhotoVideoId, 'motion-photo-1'); + expect(remote.isMotionPhoto, isTrue); + expect(remote.localId, isNull); + }); + + test('merged live photo resolves localId and is marked as a motion photo', () async { + final user = await ctx.newUser(); + const checksum = 'shared-live-photo-checksum'; + final asset = await ctx.newRemoteAsset(ownerId: user.id, checksum: checksum, livePhotoVideoId: 'motion-photo-2'); + final local = await ctx.newLocalAsset(checksum: checksum); + + final assets = await sut.main([user.id], .day).assetSource(0, 10); + + expect(assets, hasLength(1)); + final remote = assets.single as RemoteAsset; + expect(remote.id, asset.id); + expect(remote.livePhotoVideoId, 'motion-photo-2'); + expect(remote.isMotionPhoto, isTrue); + expect(remote.localId, local.id); + }); + }); + + group('localAlbum assets', () { + late String userId; + late String otherUserId; + + setUp(() async { + final user = await ctx.newUser(); + userId = user.id; + await ctx.newAuthUser(id: userId); + final other = await ctx.newUser(); + otherUserId = other.id; + }); + + test('does not duplicate assets when a partner shares the checksum', () async { + const checksum = 'shared-partner-checksum'; + final album = await ctx.newLocalAlbum(); + final local = await ctx.newLocalAsset(checksum: checksum); + await ctx.newLocalAlbumAsset(albumId: album.id, assetId: local.id); + final myRemote = await ctx.newRemoteAsset(ownerId: userId, checksum: checksum); + await ctx.newRemoteAsset(ownerId: otherUserId, checksum: checksum); + + final assets = await sut.localAlbum(album.id, .day).assetSource(0, 10); + + expect(assets, hasLength(1)); + final asset = assets.single as LocalAsset; + expect(asset.id, local.id); + // Must resolve the current user's remote id + expect(asset.remoteId, myRemote.id); + }); + + test('bucket count ignores a partner sharing the checksum', () async { + const checksum = 'shared-partner-checksum'; + final album = await ctx.newLocalAlbum(); + final local = await ctx.newLocalAsset(checksum: checksum); + await ctx.newLocalAlbumAsset(albumId: album.id, assetId: local.id); + await ctx.newRemoteAsset(ownerId: userId, checksum: checksum); + await ctx.newRemoteAsset(ownerId: otherUserId, checksum: checksum); + + final buckets = await sut.localAlbum(album.id, .day).bucketSource().first; + + expect(buckets, hasLength(1)); + expect(buckets.single.assetCount, 1); + }); + }); } diff --git a/mobile/test/medium/repositories/trashed_local_asset_repository_test.dart b/mobile/test/medium/repositories/trashed_local_asset_repository_test.dart new file mode 100644 index 0000000000..0af09715c7 --- /dev/null +++ b/mobile/test/medium/repositories/trashed_local_asset_repository_test.dart @@ -0,0 +1,100 @@ +import 'package:flutter_test/flutter_test.dart'; +import 'package:immich_mobile/domain/models/album/local_album.model.dart'; +import 'package:immich_mobile/infrastructure/repositories/trashed_local_asset.repository.dart'; + +import '../repository_context.dart'; + +void main() { + late MediumRepositoryContext ctx; + late DriftTrashedLocalAssetRepository sut; + + setUp(() { + ctx = MediumRepositoryContext(); + sut = DriftTrashedLocalAssetRepository(ctx.db); + }); + + tearDown(() async { + await ctx.dispose(); + }); + + group('getToRestore', () { + late String userId; + + setUp(() async { + final user = await ctx.newUser(); + userId = user.id; + await ctx.newAuthUser(id: userId); + }); + + test('does not restore based on a partner\'s live remote copy', () async { + const checksum = 'shared-partner-checksum'; + final album = await ctx.newLocalAlbum(backupSelection: BackupSelection.selected); + final trashed = await ctx.newTrashedLocalAsset(albumId: album.id, checksum: checksum); + + // Current user's own remote copy is deleted; only a partner has an active copy. + await ctx.newRemoteAsset(ownerId: userId, checksum: checksum, deletedAt: DateTime(2020, 1, 1)); + final partner = await ctx.newUser(); + await ctx.newRemoteAsset(ownerId: partner.id, checksum: checksum); + + final result = await sut.getToRestore(); + + final ids = result.map((a) => a.id); + expect(ids, isNot(contains(trashed.id))); + }); + + test('restores when the current user\'s own remote copy is live', () async { + const checksum = 'my-live-copy'; + final album = await ctx.newLocalAlbum(backupSelection: BackupSelection.selected); + final trashed = await ctx.newTrashedLocalAsset(albumId: album.id, checksum: checksum); + await ctx.newRemoteAsset(ownerId: userId, checksum: checksum); + + final result = await sut.getToRestore(); + + final ids = result.map((a) => a.id); + expect(ids, contains(trashed.id)); + }); + }); + + group('getToTrash', () { + late String userId; + + setUp(() async { + final user = await ctx.newUser(); + userId = user.id; + await ctx.newAuthUser(id: userId); + }); + + Future addLocalAssetToBackupAlbum(String checksum) async { + final album = await ctx.newLocalAlbum(backupSelection: BackupSelection.selected); + final local = await ctx.newLocalAsset(checksum: checksum); + await ctx.newLocalAlbumAsset(albumId: album.id, assetId: local.id); + return local.id; + } + + test('does not trash when only a partner\'s remote copy is deleted', () async { + const checksum = 'shared-partner-checksum'; + final localId = await addLocalAssetToBackupAlbum(checksum); + + // Current user's own remote copy is live but a partner deleted theirs + await ctx.newRemoteAsset(ownerId: userId, checksum: checksum); + final partner = await ctx.newUser(); + await ctx.newRemoteAsset(ownerId: partner.id, checksum: checksum, deletedAt: DateTime(2020, 1, 1)); + + final result = await sut.getToTrash(); + + final ids = result.values.expand((assets) => assets).map((a) => a.id); + expect(ids, isNot(contains(localId))); + }); + + test('trashes when the current user\'s own remote copy is deleted', () async { + const checksum = 'my-deleted-copy'; + final localId = await addLocalAssetToBackupAlbum(checksum); + await ctx.newRemoteAsset(ownerId: userId, checksum: checksum, deletedAt: DateTime(2020, 1, 1)); + + final result = await sut.getToTrash(); + + final ids = result.values.expand((assets) => assets).map((a) => a.id); + expect(ids, contains(localId)); + }); + }); +} diff --git a/mobile/test/medium/repository_context.dart b/mobile/test/medium/repository_context.dart index ed06774e82..09b8e2c7eb 100644 --- a/mobile/test/medium/repository_context.dart +++ b/mobile/test/medium/repository_context.dart @@ -6,6 +6,7 @@ import 'package:immich_mobile/domain/models/asset/base_asset.model.dart'; import 'package:immich_mobile/domain/models/memory.model.dart'; import 'package:immich_mobile/domain/models/user.model.dart'; import 'package:immich_mobile/infrastructure/entities/asset_face.entity.drift.dart'; +import 'package:immich_mobile/infrastructure/entities/auth_user.entity.drift.dart'; import 'package:immich_mobile/infrastructure/entities/local_album.entity.drift.dart'; import 'package:immich_mobile/infrastructure/entities/local_album_asset.entity.drift.dart'; import 'package:immich_mobile/infrastructure/entities/local_asset.entity.drift.dart'; @@ -18,6 +19,8 @@ import 'package:immich_mobile/infrastructure/entities/remote_album_asset.entity. import 'package:immich_mobile/infrastructure/entities/remote_album_user.entity.drift.dart'; import 'package:immich_mobile/infrastructure/entities/remote_asset.entity.drift.dart'; import 'package:immich_mobile/infrastructure/entities/remote_asset_cloud_id.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/entities/user.entity.drift.dart'; import 'package:immich_mobile/infrastructure/repositories/db.repository.dart'; import 'package:immich_mobile/utils/option.dart'; @@ -72,6 +75,22 @@ class MediumRepositoryContext { ); } + /// Seeds a user into `authUserEntity` as the currently authenticated user + Future newAuthUser({String? id, String? email, bool? isAdmin, AvatarColor? avatarColor}) async { + id ??= TestUtils.uuid(); + return db + .into(db.authUserEntity) + .insertReturning( + AuthUserEntityCompanion( + id: .new(id), + email: .new(email ?? '$id@test.com'), + name: .new('user_$id'), + isAdmin: .new(isAdmin ?? false), + avatarColor: .new(avatarColor ?? TestUtils.randElement(AvatarColor.values)), + ), + ); + } + Future newPartner({required String sharedById, required String sharedWithId, bool? inTimeline}) { return db .into(db.partnerEntity) @@ -286,6 +305,33 @@ class MediumRepositoryContext { ); } + /// Seeds a trashed local asset into `trashedLocalAssetEntity` + Future newTrashedLocalAsset({ + String? id, + required String albumId, + String? checksum, + TrashOrigin? source, + AssetType? type, + DateTime? createdAt, + bool? isFavorite, + }) async { + id ??= TestUtils.uuid(); + return db + .into(db.trashedLocalAssetEntity) + .insertReturning( + TrashedLocalAssetEntityCompanion( + id: .new(id), + albumId: .new(albumId), + name: .new('trashed_$id.jpg'), + type: .new(type ?? .image), + checksum: .new(checksum), + source: .new(source ?? TrashOrigin.remoteSync), + isFavorite: .new(isFavorite ?? false), + createdAt: .new(TestUtils.date(createdAt)), + ), + ); + } + Future newLocalAlbum({ String? id, String? name, diff --git a/mobile/test/modules/map/map_theme_override_test.dart b/mobile/test/modules/map/map_theme_override_test.dart index 56efde98dd..817ce0c4b1 100644 --- a/mobile/test/modules/map/map_theme_override_test.dart +++ b/mobile/test/modules/map/map_theme_override_test.dart @@ -1,5 +1,4 @@ @Skip('Flaky test, needs investigation') -@Tags(['widget']) library; import 'package:drift/drift.dart'; diff --git a/mobile/test/modules/utils/async_mutex_test.dart b/mobile/test/modules/utils/async_mutex_test.dart index 08cafeb307..10fdcbad5e 100644 --- a/mobile/test/modules/utils/async_mutex_test.dart +++ b/mobile/test/modules/utils/async_mutex_test.dart @@ -6,8 +6,8 @@ import 'package:immich_mobile/utils/async_mutex.dart'; void main() { group('Test AsyncMutex grouped', () { test('test ordered execution', () async { - AsyncMutex lock = AsyncMutex(); - List events = []; + final AsyncMutex lock = AsyncMutex(); + final List events = []; expect(0, lock.enqueued); unawaited(lock.run(() => Future.delayed(const Duration(milliseconds: 10), () => events.add(1)))); expect(1, lock.enqueued); diff --git a/mobile/test/modules/utils/datetime_helpers_test.dart b/mobile/test/modules/utils/datetime_helpers_test.dart index dfe83b4925..ca196224a0 100644 --- a/mobile/test/modules/utils/datetime_helpers_test.dart +++ b/mobile/test/modules/utils/datetime_helpers_test.dart @@ -10,38 +10,38 @@ void main() { test('returns null for value below minimum allowed range', () { // _minMillisecondsSinceEpoch = -62135596800000 - final seconds = -62135596800000 ~/ 1000 - 1; // One second before min allowed + const seconds = -62135596800000 ~/ 1000 - 1; // One second before min allowed final result = tryFromSecondsSinceEpoch(seconds); expect(result, isNull); }); test('returns null for value above maximum allowed range', () { // _maxMillisecondsSinceEpoch = 8640000000000000 - final seconds = 8640000000000000 ~/ 1000 + 1; // One second after max allowed + const seconds = 8640000000000000 ~/ 1000 + 1; // One second after max allowed final result = tryFromSecondsSinceEpoch(seconds); expect(result, isNull); }); test('returns correct DateTime for minimum allowed value', () { - final seconds = -62135596800000 ~/ 1000; // Minimum allowed timestamp + const seconds = -62135596800000 ~/ 1000; // Minimum allowed timestamp final result = tryFromSecondsSinceEpoch(seconds); expect(result, DateTime.fromMillisecondsSinceEpoch(-62135596800000)); }); test('returns correct DateTime for maximum allowed value', () { - final seconds = 8640000000000000 ~/ 1000; // Maximum allowed timestamp + const seconds = 8640000000000000 ~/ 1000; // Maximum allowed timestamp final result = tryFromSecondsSinceEpoch(seconds); expect(result, DateTime.fromMillisecondsSinceEpoch(8640000000000000)); }); test('returns correct DateTime for negative timestamp', () { - final seconds = -1577836800; // Dec 31, 1919 (pre-epoch) + const seconds = -1577836800; // Dec 31, 1919 (pre-epoch) final result = tryFromSecondsSinceEpoch(seconds); expect(result, DateTime.fromMillisecondsSinceEpoch(-1577836800 * 1000)); }); test('returns correct DateTime for zero timestamp', () { - final seconds = 0; // Jan 1, 1970 (epoch) + const seconds = 0; // Jan 1, 1970 (epoch) final result = tryFromSecondsSinceEpoch(seconds); expect(result, DateTime.fromMillisecondsSinceEpoch(0)); }); diff --git a/mobile/test/modules/utils/debouncer_test.dart b/mobile/test/modules/utils/debouncer_test.dart index 7aa13842d6..036c538f03 100644 --- a/mobile/test/modules/utils/debouncer_test.dart +++ b/mobile/test/modules/utils/debouncer_test.dart @@ -11,7 +11,7 @@ class _Counter { void main() { test('Executes the method after the interval', () async { - var counter = _Counter(); + final counter = _Counter(); final debouncer = Debouncer(interval: const Duration(milliseconds: 300)); debouncer.run(() => counter.increment()); expect(counter.count, 0); @@ -20,17 +20,17 @@ void main() { }); test('Executes the method immediately if zero interval', () async { - var counter = _Counter(); - final debouncer = Debouncer(interval: const Duration(milliseconds: 0)); + final counter = _Counter(); + final debouncer = Debouncer(interval: Duration.zero); debouncer.run(() => counter.increment()); // Even though it is supposed to be executed immediately, it is added to the async queue and so // we need this delay to make sure the actual debounced method is called - await Future.delayed(const Duration(milliseconds: 0)); + await Future.delayed(Duration.zero); expect(counter.count, 1); }); test('Delayes method execution after all the calls are completed', () async { - var counter = _Counter(); + final counter = _Counter(); final debouncer = Debouncer(interval: const Duration(milliseconds: 100)); debouncer.run(() => counter.increment()); debouncer.run(() => counter.increment()); diff --git a/mobile/test/modules/utils/openapi_patching_test.dart b/mobile/test/modules/utils/openapi_patching_test.dart index 18ab07b3a9..15d42c34f2 100644 --- a/mobile/test/modules/utils/openapi_patching_test.dart +++ b/mobile/test/modules/utils/openapi_patching_test.dart @@ -1,8 +1,8 @@ import 'dart:convert'; import 'package:flutter_test/flutter_test.dart'; -import 'package:openapi/api.dart'; import 'package:immich_mobile/utils/openapi_patching.dart'; +import 'package:openapi/api.dart'; void main() { group('Test OpenApi Patching', () { @@ -26,7 +26,7 @@ void main() { }); test('addDefault', () { - dynamic value = jsonDecode(""" + final dynamic value = jsonDecode(""" { "download": { "archiveSize": 4294967296, @@ -47,7 +47,7 @@ void main() { }); test('addDefault with null', () { - dynamic value = jsonDecode(""" + final dynamic value = jsonDecode(""" { "download": { "archiveSize": 4294967296, diff --git a/mobile/test/modules/utils/url_helper_test.dart b/mobile/test/modules/utils/url_helper_test.dart index 0e8a8e2aa0..245f68e767 100644 --- a/mobile/test/modules/utils/url_helper_test.dart +++ b/mobile/test/modules/utils/url_helper_test.dart @@ -77,6 +77,40 @@ void main() { }); }); + group('normalizeAndValidateServerUrl', () { + test('should treat null as valid', () { + expect(normalizeAndValidateServerUrl(null), isTrue); + }); + + test('should treat empty string as valid', () { + expect(normalizeAndValidateServerUrl(''), isTrue); + }); + + test('should accept a bare host', () { + expect(normalizeAndValidateServerUrl('demo.immich.app'), isTrue); + }); + + test('should accept a bare host with a port', () { + expect(normalizeAndValidateServerUrl('192.168.1.1:2283'), isTrue); + }); + + test('should accept an http URL', () { + expect(normalizeAndValidateServerUrl('http://demo.immich.app'), isTrue); + }); + + test('should accept an https URL', () { + expect(normalizeAndValidateServerUrl('https://demo.immich.app:2283/api'), isTrue); + }); + + test('should reject a non-http scheme', () { + expect(normalizeAndValidateServerUrl('ftp://demo.immich.app'), isFalse); + }); + + test('should reject scheme only input', () { + expect(normalizeAndValidateServerUrl('https://'), isFalse); + }); + }); + group('punycodeDecodeUrl', () { test('should return null for null input', () { expect(punycodeDecodeUrl(null), isNull); diff --git a/mobile/test/modules/utils/version_compatibility_test.dart b/mobile/test/modules/utils/version_compatibility_test.dart index 70f3d9ef8c..c4fcada67d 100644 --- a/mobile/test/modules/utils/version_compatibility_test.dart +++ b/mobile/test/modules/utils/version_compatibility_test.dart @@ -9,16 +9,16 @@ void main() { test('returns message when app major is behind server major', () { final result = getVersionCompatibilityMessage( - const SemVer(major: 2, minor: 0, patch: 0), - const SemVer(major: 1, minor: 200, patch: 0), + serverVersion: const SemVer(major: 2, minor: 0, patch: 0), + appVersion: const SemVer(major: 1, minor: 200, patch: 0), ); expect(result, message); }); test('returns null when app major matches server major', () { final result = getVersionCompatibilityMessage( - const SemVer(major: 2, minor: 0, patch: 0), - const SemVer(major: 2, minor: 0, patch: 0), + serverVersion: const SemVer(major: 2, minor: 0, patch: 0), + appVersion: const SemVer(major: 2, minor: 0, patch: 0), ); expect(result, null); }); @@ -30,16 +30,16 @@ void main() { test('returns message when app major is more than one ahead of server', () { final result = getVersionCompatibilityMessage( - const SemVer(major: 1, minor: 200, patch: 0), - const SemVer(major: 3, minor: 0, patch: 0), + serverVersion: const SemVer(major: 1, minor: 200, patch: 0), + appVersion: const SemVer(major: 3, minor: 0, patch: 0), ); expect(result, message); }); test('returns null when app major is exactly one ahead of server', () { final result = getVersionCompatibilityMessage( - const SemVer(major: 1, minor: 200, patch: 0), - const SemVer(major: 2, minor: 0, patch: 0), + serverVersion: const SemVer(major: 1, minor: 200, patch: 0), + appVersion: const SemVer(major: 2, minor: 0, patch: 0), ); expect(result, null); }); diff --git a/mobile/test/presentation/widgets/asset_viewer/asset_page_zoom_reset_test.dart b/mobile/test/presentation/widgets/asset_viewer/asset_page_zoom_reset_test.dart new file mode 100644 index 0000000000..f4ee4f353c --- /dev/null +++ b/mobile/test/presentation/widgets/asset_viewer/asset_page_zoom_reset_test.dart @@ -0,0 +1,91 @@ +import 'package:easy_localization/easy_localization.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_test/flutter_test.dart'; +import 'package:hooks_riverpod/hooks_riverpod.dart'; +import 'package:immich_mobile/constants/locales.dart'; +import 'package:immich_mobile/domain/models/asset/base_asset.model.dart'; +import 'package:immich_mobile/domain/models/events.model.dart'; +import 'package:immich_mobile/domain/models/timeline.model.dart'; +import 'package:immich_mobile/domain/services/timeline.service.dart'; +import 'package:immich_mobile/domain/utils/event_stream.dart'; +import 'package:immich_mobile/generated/codegen_loader.g.dart'; +import 'package:immich_mobile/presentation/widgets/asset_viewer/asset_page.widget.dart'; +import 'package:immich_mobile/providers/asset_viewer/asset_viewer.provider.dart'; +import 'package:immich_mobile/providers/infrastructure/timeline.provider.dart'; + +import '../../../fixtures/asset.stub.dart'; + +/// Timeline displaying a single asset that we can swap +class _SwappableTimelineService extends TimelineService { + BaseAsset asset; + _SwappableTimelineService(this.asset) + : super(( + assetSource: (_, _) async => [], + bucketSource: () => Stream.value(const [Bucket(assetCount: 1)]), + origin: TimelineOrigin.main, + )); + + @override + int get totalAssets => 1; + @override + BaseAsset? getAssetSafe(int index) => index == 0 ? asset : null; +} + +class _ZoomedNotifier extends AssetViewerStateNotifier { + @override + AssetViewerState build() { + super.build(); + return AssetViewerState(currentAsset: LocalAssetStub.image1, isZoomed: true); + } +} + +void main() { + testWidgets('resets zoom when the displayed asset is replaced on reload', (tester) async { + final timeline = _SwappableTimelineService(LocalAssetStub.image1); + final container = ProviderContainer( + overrides: [ + timelineServiceProvider.overrideWithValue(timeline), + assetViewerProvider.overrideWith(_ZoomedNotifier.new), + ], + ); + addTearDown(container.dispose); + + await tester.pumpWidget( + UncontrolledProviderScope( + container: container, + child: EasyLocalization( + supportedLocales: locales.values.toList(), + path: translationsPath, + startLocale: locales.values.first, + fallbackLocale: locales.values.first, + saveLocale: false, + useFallbackTranslations: true, + assetLoader: const CodegenLoader(), + child: Builder( + builder: (context) => MaterialApp( + localizationsDelegates: context.localizationDelegates, + supportedLocales: context.supportedLocales, + locale: context.locale, + home: const Material(child: AssetPage(index: 0, heroOffset: 0)), + ), + ), + ), + ), + ); + await tester.pump(const Duration(milliseconds: 600)); + // Ignore any image load errors + tester.takeException(); + + expect(container.read(assetViewerProvider).isZoomed, isTrue); + + // Swap the asset, simulating a delete + timeline.asset = LocalAssetStub.image2; + EventStream.shared.emit(const TimelineReloadEvent()); + + await tester.idle(); + await tester.pump(); + tester.takeException(); + + expect(container.read(assetViewerProvider).isZoomed, isFalse); + }); +} diff --git a/mobile/test/presentation/widgets/asset_viewer/asset_viewer_system_ui_test.dart b/mobile/test/presentation/widgets/asset_viewer/asset_viewer_system_ui_test.dart new file mode 100644 index 0000000000..3ec55bb515 --- /dev/null +++ b/mobile/test/presentation/widgets/asset_viewer/asset_viewer_system_ui_test.dart @@ -0,0 +1,97 @@ +import 'dart:async'; + +import 'package:easy_localization/easy_localization.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; +import 'package:flutter_test/flutter_test.dart'; +import 'package:hooks_riverpod/hooks_riverpod.dart'; +import 'package:immich_mobile/constants/locales.dart'; +import 'package:immich_mobile/domain/models/timeline.model.dart'; +import 'package:immich_mobile/domain/services/timeline.service.dart'; +import 'package:immich_mobile/generated/codegen_loader.g.dart'; +import 'package:immich_mobile/presentation/widgets/asset_viewer/asset_viewer.page.dart'; +import 'package:immich_mobile/providers/asset_viewer/asset_viewer.provider.dart'; +import 'package:immich_mobile/providers/infrastructure/timeline.provider.dart'; + +import '../../../fixtures/asset.stub.dart'; +import '../../../unit/presentation/presentation_context.dart'; + +class _SeededAssetViewerNotifier extends AssetViewerStateNotifier { + @override + AssetViewerState build() { + super.build(); + return AssetViewerState(currentAsset: LocalAssetStub.image1); + } +} + +TimelineService _stubTimelineService() { + return TimelineService(( + assetSource: (index, count) async => [LocalAssetStub.image1], + bucketSource: () => Stream.value(const [Bucket(assetCount: 1)]), + origin: TimelineOrigin.main, + )); +} + +void main() { + late PresentationContext context; + + setUp(() async { + context = await PresentationContext.create(); + }); + + tearDown(() async { + await context.dispose(); + }); + + testWidgets('status bar icons are light while the asset viewer is open in light mode', (tester) async { + // Emulate arriving from a light-themed page whose AppBar set dark status + // bar icons (the state the viewer is opened from in light mode). + SystemChrome.setSystemUIOverlayStyle(SystemUiOverlayStyle.dark); + + await tester.pumpWidget( + EasyLocalization( + supportedLocales: locales.values.toList(), + path: translationsPath, + startLocale: locales.values.first, + fallbackLocale: locales.values.first, + saveLocale: false, + useFallbackTranslations: true, + assetLoader: const CodegenLoader(), + child: ProviderScope( + overrides: [ + ...context.overrides, + timelineServiceProvider.overrideWithValue(_stubTimelineService()), + assetViewerProvider.overrideWith(_SeededAssetViewerNotifier.new), + ], + child: Builder( + builder: (context) => MaterialApp( + debugShowCheckedModeBanner: false, + localizationsDelegates: context.localizationDelegates, + supportedLocales: context.supportedLocales, + locale: context.locale, + home: const Material(child: AssetViewer(initialIndex: 0)), + ), + ), + ), + ), + ); + + // Let post-frame callbacks and the initial frames run without waiting for + // infinite animations (loading spinners) to settle. + await tester.pump(); + await tester.pump(const Duration(milliseconds: 600)); + + // Asset thumbnails cannot load in the test environment (no platform + // channels / real HTTP). Those image errors are irrelevant to the system + // chrome behaviour under test, so drain them. + tester.takeException(); + + expect( + SystemChrome.latestStyle?.statusBarIconBrightness, + Brightness.light, + reason: + 'The asset viewer draws over a black background, so status bar ' + 'icons must be light regardless of the app theme', + ); + }); +} diff --git a/mobile/test/presentation/widgets/asset_viewer/bottom_bar_test.dart b/mobile/test/presentation/widgets/asset_viewer/bottom_bar_test.dart new file mode 100644 index 0000000000..f2463c090d --- /dev/null +++ b/mobile/test/presentation/widgets/asset_viewer/bottom_bar_test.dart @@ -0,0 +1,85 @@ +import 'dart:async'; + +import 'package:flutter/material.dart'; +import 'package:flutter_test/flutter_test.dart'; +import 'package:hooks_riverpod/hooks_riverpod.dart'; +import 'package:immich_mobile/constants/enums.dart'; +import 'package:immich_mobile/domain/models/asset/base_asset.model.dart'; +import 'package:immich_mobile/domain/services/timeline.service.dart'; +import 'package:immich_mobile/presentation/actions/action.dart'; +import 'package:immich_mobile/presentation/widgets/asset_viewer/bottom_bar.widget.dart'; +import 'package:immich_mobile/providers/asset_viewer/asset_viewer.provider.dart'; +import 'package:immich_mobile/providers/asset_viewer/video_player_provider.dart'; +import 'package:immich_mobile/providers/infrastructure/asset.provider.dart'; +import 'package:immich_mobile/providers/infrastructure/readonly_mode.provider.dart'; +import 'package:immich_mobile/providers/infrastructure/timeline.provider.dart'; +import 'package:immich_mobile/providers/routes.provider.dart'; +import 'package:immich_mobile/services/gcast.service.dart'; +import 'package:immich_mobile/utils/asset_filter.dart'; +import 'package:mocktail/mocktail.dart'; +import 'package:native_video_player/native_video_player.dart'; + +import '../../../service.mocks.dart'; +import '../../../unit/factories/remote_asset_factory.dart'; +import '../../../widget_tester_extensions.dart'; + +class MockNativeVideoPlayerController extends Mock implements NativeVideoPlayerController {} + +class MockTimelineService extends Mock implements TimelineService {} + +class TestReadOnlyModeNotifier extends ReadOnlyModeNotifier { + @override + bool build() => true; +} + +void main() { + testWidgets('player stays bound after local id arrives', (tester) async { + final searchCopy = RemoteAssetFactory.create(type: .video); + final mergedCopy = searchCopy.copyWith(localId: 'local-1', isFavorite: true); + final assetService = MockAssetService(); + final controller = MockNativeVideoPlayerController(); + final timeline = MockTimelineService(); + final updates = StreamController(sync: true); + when(() => assetService.watchAsset(searchCopy)).thenAnswer((_) => updates.stream); + when(controller.play).thenAnswer((_) async {}); + when(controller.pause).thenAnswer((_) async {}); + when(() => timeline.origin).thenReturn(.search); + + late WidgetRef ref; + + await tester.pumpConsumerWidget( + Consumer( + builder: (context, widgetRef, _) { + ref = widgetRef; + return const ViewerBottomBar(); + }, + ), + overrides: [ + assetServiceProvider.overrideWithValue(assetService), + assetsActionProvider(ActionSource.viewer).overrideWithValue(const AssetFilter({})), + gCastServiceProvider.overrideWithValue(MockGCastService()), + inLockedViewProvider.overrideWithValue(true), + ownedAssetsActionProvider(ActionSource.viewer).overrideWithValue(const AssetFilter({})), + readonlyModeProvider.overrideWith(TestReadOnlyModeNotifier.new), + timelineServiceProvider.overrideWithValue(timeline), + ], + ); + + final viewer = ref.read(assetViewerProvider.notifier); + viewer.setAsset(searchCopy); + await tester.pump(); + ref.read(videoPlayerProvider(searchCopy.id).notifier).attachController(controller); + updates.add(mergedCopy); + await tester.pump(); + await tester.tap(find.byType(IconButton)); + await tester.pump(); + + verify(controller.play).called(1); + viewer.setShowingDetails(true); + await tester.pump(); + verify(controller.pause).called(1); + + await tester.pumpWidget(const SizedBox.shrink()); + unawaited(updates.close()); + }); +} diff --git a/mobile/test/presentation/widgets/images/cache_aware_listener_tracker_mixin_test.dart b/mobile/test/presentation/widgets/images/cache_aware_listener_tracker_mixin_test.dart index 02bb0c1053..3a5ad159b5 100644 --- a/mobile/test/presentation/widgets/images/cache_aware_listener_tracker_mixin_test.dart +++ b/mobile/test/presentation/widgets/images/cache_aware_listener_tracker_mixin_test.dart @@ -29,7 +29,7 @@ void main() { setUp(() { // Create a fresh, real Flutter ImageCache for every test cache = ImageCache(); - uiListener = ImageStreamListener((_, __) {}); + uiListener = ImageStreamListener((_, _) {}); }); group('CacheAwareListenerTrackerMixin with Real ImageCache', () { @@ -130,7 +130,7 @@ void main() { final stream = cache.putIfAbsent(key, () => completer)!; - final uiListener2 = ImageStreamListener((_, __) {}); + final uiListener2 = ImageStreamListener((_, _) {}); stream.addListener(uiListener); stream.addListener(uiListener2); @@ -157,7 +157,7 @@ void main() { expect(completer.wasCancelled, isFalse); // A second UI listener attaches — must NOT be treated as cache - final uiListener2 = ImageStreamListener((_, __) {}); + final uiListener2 = ImageStreamListener((_, _) {}); stream.addListener(uiListener2); // Remove first UI listener; second UI still active → no cancel diff --git a/mobile/test/presentation/widgets/images/local_image_provider_test.dart b/mobile/test/presentation/widgets/images/local_image_provider_test.dart new file mode 100644 index 0000000000..5b556f8a41 --- /dev/null +++ b/mobile/test/presentation/widgets/images/local_image_provider_test.dart @@ -0,0 +1,141 @@ +import 'package:flutter/painting.dart'; +import 'package:flutter_test/flutter_test.dart'; +import 'package:immich_mobile/domain/models/asset/base_asset.model.dart'; +import 'package:immich_mobile/presentation/widgets/images/image_provider.dart'; +import 'package:immich_mobile/presentation/widgets/images/local_image_provider.dart'; + +import '../../../unit/factories/local_asset_factory.dart'; + +class _StubCompleter extends ImageStreamCompleter {} + +void main() { + late ImageCache cache; + late int loads; + + ImageStreamCompleter load() { + loads++; + return _StubCompleter(); + } + + setUp(() { + cache = ImageCache(); + loads = 0; + }); + + group('LocalFullImageProvider.previewTargetSize', () { + const box = Size(1179, 2556); + const cases = <(String, Size, int?, int?, bool, Size)>[ + ('normal', box, 4032, 3024, true, box), + ('missing dimensions', box, null, null, true, box), + ('invalid dimensions', box, 1000, 0, true, box), + ('long final preview', box, 1000, 30000, true, Size(16384 / 30, 16384)), + ('long first preview', box, 30000, 1000, false, Size(2556, 2556 / 30)), + ('ultra-thin preview', box, 10, 50000, false, Size(1, 2556)), + ('small source', box, 50, 2000, true, Size(50, 2000)), + ('at limit', Size(16384, 100), 1000, 1000, true, Size(16384, 100)), + ('over limit', Size(16385, 100), 1000, 1000, true, Size(1000, 1000)), + ]; + + for (final (name, box, width, height, previewIsFinal, expected) in cases) { + test(name, () { + final actual = LocalFullImageProvider.previewTargetSize( + box.width, + box.height, + width, + height, + previewIsFinal: previewIsFinal, + ); + expect(actual.width, closeTo(expected.width, 1e-6)); + expect(actual.height, closeTo(expected.height, 1e-6)); + }); + } + }); + + group('LocalFullImageProvider equality', () { + LocalFullImageProvider make({int? width, int? height}) => LocalFullImageProvider( + id: 'a', + assetType: AssetType.image, + size: const Size(100, 200), + isAnimated: false, + width: width, + height: height, + ); + + test('uses dimensions in the cache key', () { + final a = make(width: 100, height: 200); + final b = make(width: 100, height: 200); + expect(a, b); + expect(a.hashCode, b.hashCode); + expect(a == make(width: 200, height: 100), isFalse); + }); + }); + + group('LocalThumbProvider caching', () { + test('editing on device re-renders the thumbnail', () { + cache.putIfAbsent(LocalThumbProvider(id: 'asset-1', assetType: AssetType.image, checksum: 'before'), load); + cache.putIfAbsent(LocalThumbProvider(id: 'asset-1', assetType: AssetType.image, checksum: 'after'), load); + + expect(loads, 2); + }); + + test('an unchanged thumbnail still comes from the cache', () { + cache.putIfAbsent(LocalThumbProvider(id: 'asset-1', assetType: AssetType.image, checksum: 'same'), load); + cache.putIfAbsent(LocalThumbProvider(id: 'asset-1', assetType: AssetType.image, checksum: 'same'), load); + + expect(loads, 1); + }); + + // The rehash clears the checksum before writing the new one, so the tile has to + // follow that step too or it waits for the hash to land before showing the edit. + test('re-renders while the checksum is still being recomputed', () { + cache.putIfAbsent(LocalThumbProvider(id: 'asset-1', assetType: AssetType.image, checksum: 'before'), load); + cache.putIfAbsent(LocalThumbProvider(id: 'asset-1', assetType: AssetType.image), load); + + expect(loads, 2); + }); + + test('stays cached while the checksum is missing', () { + cache.putIfAbsent(LocalThumbProvider(id: 'asset-1', assetType: AssetType.image), load); + cache.putIfAbsent(LocalThumbProvider(id: 'asset-1', assetType: AssetType.image), load); + + expect(loads, 1); + }); + }); + + group('factories', () { + test('thumbnails are keyed by the asset checksum', () { + final asset = LocalAssetFactory.create().copyWith(checksum: 'abc'); + + final provider = getThumbnailImageProvider(asset)! as LocalThumbProvider; + + expect(provider.checksum, 'abc'); + }); + }); + + group('LocalFullImageProvider caching', () { + test('editing on device re-renders the full image', () { + cache.putIfAbsent( + LocalFullImageProvider( + id: 'asset-1', + assetType: AssetType.image, + size: const Size(100, 100), + isAnimated: false, + checksum: 'before', + ), + load, + ); + cache.putIfAbsent( + LocalFullImageProvider( + id: 'asset-1', + assetType: AssetType.image, + size: const Size(100, 100), + isAnimated: false, + checksum: 'after', + ), + load, + ); + + expect(loads, 2); + }); + }); +} diff --git a/mobile/test/presentation/widgets/people/person_edit_birthday_modal_test.dart b/mobile/test/presentation/widgets/people/person_edit_birthday_modal_test.dart new file mode 100644 index 0000000000..387b0ee903 --- /dev/null +++ b/mobile/test/presentation/widgets/people/person_edit_birthday_modal_test.dart @@ -0,0 +1,69 @@ +import 'package:flutter_test/flutter_test.dart'; +import 'package:immich_mobile/presentation/widgets/people/person_edit_birthday_modal.widget.dart'; +import 'package:intl/date_symbol_data_local.dart'; +import 'package:intl/intl.dart'; +import 'package:scroll_date_picker/scroll_date_picker.dart'; + +void main() { + group('datePickerColumnOrder', () { + test('month first (en_US)', () { + expect( + datePickerColumnOrder('M/d/y'), + orderedEquals([DatePickerViewType.month, DatePickerViewType.day, DatePickerViewType.year]), + ); + }); + + test('day first (pl)', () { + expect( + datePickerColumnOrder('dd.MM.y'), + orderedEquals([DatePickerViewType.day, DatePickerViewType.month, DatePickerViewType.year]), + ); + }); + + test('year first (ko)', () { + expect( + datePickerColumnOrder('y. M. d.'), + orderedEquals([DatePickerViewType.year, DatePickerViewType.month, DatePickerViewType.day]), + ); + }); + + test('null pattern falls back to package default', () { + expect(datePickerColumnOrder(null), isNull); + }); + + test('missing field falls back to package default', () { + expect(datePickerColumnOrder('M/y'), isNull); + }); + }); + + group('datePickerColumnOrder with real locale patterns', () { + setUpAll(() async { + await initializeDateFormatting(); + }); + + for (final (locales, order, name) in const [ + ( + ['en', 'en-US', 'en-PH'], + [DatePickerViewType.month, DatePickerViewType.day, DatePickerViewType.year], + 'month/day/year', + ), + ( + ['en-GB', 'fr', 'fr-FR', 'de', 'de-DE', 'pl'], + [DatePickerViewType.day, DatePickerViewType.month, DatePickerViewType.year], + 'day/month/year', + ), + ( + ['ja', 'ja-JP', 'zh', 'zh-CN', 'ko', 'ko-KR'], + [DatePickerViewType.year, DatePickerViewType.month, DatePickerViewType.day], + 'year/month/day', + ), + (['ky'], [DatePickerViewType.year, DatePickerViewType.day, DatePickerViewType.month], 'year/day/month'), + ]) { + for (final locale in locales) { + test('$locale uses $name', () { + expect(datePickerColumnOrder(DateFormat.yMd(locale).pattern), orderedEquals(order)); + }); + } + } + }); +} diff --git a/mobile/test/presentation/widgets/timeline/timeline_args_test.dart b/mobile/test/presentation/widgets/timeline/timeline_args_test.dart new file mode 100644 index 0000000000..439ae9ecf1 --- /dev/null +++ b/mobile/test/presentation/widgets/timeline/timeline_args_test.dart @@ -0,0 +1,194 @@ +// ignore_for_file: close_sinks + +import 'dart:async'; + +import 'package:flutter/material.dart'; +import 'package:flutter_test/flutter_test.dart'; +import 'package:hooks_riverpod/hooks_riverpod.dart'; +import 'package:immich_mobile/domain/models/config/app_config.dart'; +import 'package:immich_mobile/domain/models/timeline.model.dart'; +import 'package:immich_mobile/domain/services/timeline.service.dart'; +import 'package:immich_mobile/presentation/widgets/timeline/timeline.state.dart'; +import 'package:immich_mobile/presentation/widgets/timeline/timeline.widget.dart'; +import 'package:immich_mobile/providers/infrastructure/settings.provider.dart'; +import 'package:immich_mobile/providers/infrastructure/timeline.provider.dart'; + +// A first fetch that never delivers - the state a suspended or storm-starved +// bucket watch is stuck in when the timeline mounts on a zero-sized first frame +class _FrozenBucketService implements TimelineService { + final _ctrl = StreamController>.broadcast(); + + @override + Stream> Function() get watchBuckets => + () => _ctrl.stream; + + @override + dynamic noSuchMethod(Invocation invocation) => super.noSuchMethod(invocation); +} + +class _EmptyBucketService implements TimelineService { + const _EmptyBucketService(); + + @override + Stream> Function() get watchBuckets => + () => Stream.value(const []); + + @override + dynamic noSuchMethod(Invocation invocation) => super.noSuchMethod(invocation); +} + +// Counts how many times the bucket stream is subscribed. Each subscription is a +// fresh photo query, so the count is our proxy for "did the relayout re-run the +// segment query for an input it does not use". +class _CountingBucketService implements TimelineService { + int watchCount = 0; + final _ctrl = StreamController>.broadcast(); + + @override + Stream> Function() get watchBuckets => () { + watchCount++; + return _ctrl.stream; + }; + + @override + dynamic noSuchMethod(Invocation invocation) => super.noSuchMethod(invocation); +} + +void main() { + testWidgets('timeline args follow constraints after a zero-sized first frame while buckets are still loading', ( + tester, + ) async { + tester.view.physicalSize = Size.zero; + tester.view.devicePixelRatio = 3.0; + addTearDown(tester.view.reset); + + TimelineArgs? probed; + final probe = Consumer( + builder: (_, ref, _) { + probed = ref.watch(timelineArgsProvider); + return const SizedBox.shrink(); + }, + ); + + await tester.pumpWidget( + ProviderScope( + overrides: [ + timelineServiceProvider.overrideWithValue(_FrozenBucketService()), + appConfigProvider.overrideWithValue(const AppConfig()), + ], + child: MaterialApp(home: Timeline(withScrubber: false, readOnly: true, loadingWidget: probe)), + ), + ); + await tester.pump(); + + expect(probed, isNotNull); + expect(probed!.maxWidth, 0.0); + + tester.view.physicalSize = const Size(1206, 2622); + await tester.pump(); + await tester.pump(); + + expect( + probed!.maxWidth, + 402.0, + reason: 'args locked to the zero-sized first frame leave the timeline blank for the whole session', + ); + }); + + testWidgets('timeline args follow constraints after a zero-sized first frame once buckets resolve', (tester) async { + tester.view.physicalSize = Size.zero; + tester.view.devicePixelRatio = 3.0; + addTearDown(tester.view.reset); + + TimelineArgs? probed; + final probe = SliverToBoxAdapter( + child: Consumer( + builder: (_, ref, _) { + probed = ref.watch(timelineArgsProvider); + return const SizedBox.shrink(); + }, + ), + ); + + await tester.pumpWidget( + ProviderScope( + overrides: [ + timelineServiceProvider.overrideWithValue(const _EmptyBucketService()), + appConfigProvider.overrideWithValue(const AppConfig()), + ], + child: MaterialApp( + home: Timeline( + withScrubber: false, + readOnly: true, + appBar: const SliverToBoxAdapter(child: SizedBox.shrink()), + topSliverWidget: probe, + ), + ), + ), + ); + await tester.pump(); + await tester.pump(); + + tester.view.physicalSize = const Size(1206, 2622); + await tester.pump(); + await tester.pump(); + await tester.pump(); + + expect(probed, isNotNull); + expect(probed!.maxWidth, 402.0); + }); + + testWidgets('a height-only relayout (multiselect app bar toggle) keeps the timeline, a width change refreshes it', ( + tester, + ) async { + final service = _CountingBucketService(); + tester.view.devicePixelRatio = 3.0; + tester.view.physicalSize = const Size(1206, 2622); + addTearDown(tester.view.reset); + + TimelineArgs? probed; + final probe = Consumer( + builder: (_, ref, _) { + probed = ref.watch(timelineArgsProvider); + return const SizedBox.shrink(); + }, + ); + + await tester.pumpWidget( + ProviderScope( + overrides: [ + timelineServiceProvider.overrideWithValue(service), + appConfigProvider.overrideWithValue(const AppConfig()), + ], + child: MaterialApp(home: Timeline(withScrubber: false, readOnly: true, loadingWidget: probe)), + ), + ); + await tester.pump(); + + final initialSubscriptions = service.watchCount; + final initialWidth = probed!.maxWidth; + final initialHeight = probed!.maxHeight; + expect(initialSubscriptions, greaterThan(0)); + + // toggling multiselect changes the app bar, so only the available height moves + tester.view.physicalSize = const Size(1206, 2000); + await tester.pump(); + await tester.pump(); + + expect(probed!.maxHeight, isNot(initialHeight), reason: 'the height should have actually changed'); + expect(probed!.maxWidth, initialWidth); + expect( + service.watchCount, + initialSubscriptions, + reason: 'a height-only change must not re-run the bucket query for an input the segments do not use', + ); + + // a real width change (rotation, fold, split screen) should refresh the tiles + tester.view.physicalSize = const Size(1000, 2000); + await tester.pump(); + await tester.pump(); + + expect(probed!.maxWidth, lessThan(initialWidth)); + expect(service.watchCount, greaterThan(initialSubscriptions)); + }); +} diff --git a/mobile/test/presentation/widgets/timeline/timeline_scroll_to_top_test.dart b/mobile/test/presentation/widgets/timeline/timeline_scroll_to_top_test.dart new file mode 100644 index 0000000000..e85ced8fb1 --- /dev/null +++ b/mobile/test/presentation/widgets/timeline/timeline_scroll_to_top_test.dart @@ -0,0 +1,114 @@ +import 'dart:async'; +import 'dart:math' as math; + +import 'package:auto_route/auto_route.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; +import 'package:flutter_test/flutter_test.dart'; +import 'package:hooks_riverpod/hooks_riverpod.dart'; +import 'package:immich_mobile/domain/models/asset/base_asset.model.dart'; +import 'package:immich_mobile/domain/models/config/app_config.dart'; +import 'package:immich_mobile/domain/models/timeline.model.dart'; +import 'package:immich_mobile/domain/services/timeline.service.dart'; +import 'package:immich_mobile/presentation/widgets/timeline/timeline.widget.dart'; +import 'package:immich_mobile/providers/infrastructure/settings.provider.dart'; +import 'package:immich_mobile/providers/infrastructure/timeline.provider.dart'; +import 'package:immich_mobile/routing/app_navigation_observer.dart'; + +import '../../../fixtures/asset.stub.dart'; + +void main() { + testWidgets('status bar tap only scrolls the timeline when it is the visible page', (tester) async { + tester.view.devicePixelRatio = 3.0; + tester.view.physicalSize = const Size(1206, 2622); + addTearDown(tester.view.reset); + + // Many assets for a tall viewport + final assets = List.generate(200, (i) => LocalAssetStub.image1.copyWith(id: 'a$i')); + final service = TimelineService(( + assetSource: (i, n) async => assets.sublist(i, math.min(i + n, assets.length)), + bucketSource: () => Stream.value([TimeBucket(date: DateTime(2025), assetCount: assets.length)]), + origin: TimelineOrigin.main, + )); + addTearDown(service.dispose); + + final router = RootStackRouter.build( + routes: [ + AutoRoute( + initial: true, + page: PageInfo( + 'Timeline', + builder: (_) => const Timeline( + withScrubber: false, + readOnly: true, + groupBy: GroupAssetsBy.none, + appBar: SliverToBoxAdapter(child: SizedBox.shrink()), + ), + ), + ), + AutoRoute( + path: '/overlay', + page: PageInfo('Overlay', builder: (_) => const Scaffold(body: SizedBox.shrink())), + type: RouteType.custom( + customRouteBuilder: (_, child, page) => + PageRouteBuilder(settings: page, opaque: false, pageBuilder: (_, _, _) => child), + ), + ), + ], + ); + + await tester.pumpWidget( + ProviderScope( + overrides: [ + timelineServiceProvider.overrideWithValue(service), + appConfigProvider.overrideWithValue(const AppConfig()), + ], + child: MaterialApp.router( + routerConfig: router.config(navigatorObservers: () => [TransitioningRouteObserver()]), + ), + ), + ); + // Segment stream resolves + await tester.pump(); + // Asset buffer settles + await tester.pump(); + // Thumbnails will fail to load + tester.takeException(); + + final position = tester + .state(find.descendant(of: find.byType(Timeline), matching: find.byType(Scrollable)).first) + .position; + + // Closure mimicking the framework making a status bar tap call + Future tapStatusBar() => tester.binding.defaultBinaryMessenger.handlePlatformMessage( + SystemChannels.statusBar.name, + SystemChannels.statusBar.codec.encodeMethodCall(const MethodCall('handleScrollToTop')), + null, + ); + + // Scroll down + await tester.drag(find.byType(Timeline), const Offset(0, -1500)); + await tester.pumpAndSettle(); + final initialScrolledPosition = position.pixels; + expect(initialScrolledPosition, greaterThan(200)); + + // Push a subroute. Taps on this status bar should be ignored + unawaited(router.pushPath('/overlay')); + await tester.pumpAndSettle(); + await tapStatusBar(); + await tester.pumpAndSettle(); + expect(position.pixels, initialScrolledPosition, reason: 'ignored while behind a pushed route'); + + // The tap is async, so it can arrive while a pushed route is transitioning to popped + unawaited(router.maybePop()); + await tester.pump(); + await tapStatusBar(); + await tester.pumpAndSettle(); + expect(position.pixels, initialScrolledPosition, reason: 'ignored while the pushed route pops'); + + // Once the timeline is visible, taps on the status bar should scroll to the top + await tapStatusBar(); + await tester.pumpAndSettle(); + expect(position.pixels, 0, reason: 'scrolls the foreground timeline'); + }); +} diff --git a/mobile/test/providers/app_life_cycle_provider_test.dart b/mobile/test/providers/app_life_cycle_provider_test.dart new file mode 100644 index 0000000000..d4489a58ba --- /dev/null +++ b/mobile/test/providers/app_life_cycle_provider_test.dart @@ -0,0 +1,180 @@ +import 'dart:async'; + +import 'package:flutter_test/flutter_test.dart'; +import 'package:hooks_riverpod/hooks_riverpod.dart'; +import 'package:immich_mobile/domain/models/config/app_config.dart'; +import 'package:immich_mobile/domain/models/log.model.dart'; +import 'package:immich_mobile/domain/services/log.service.dart'; +import 'package:immich_mobile/models/auth/auth_state.model.dart'; +import 'package:immich_mobile/models/server_info/server_version.model.dart'; +import 'package:immich_mobile/providers/app_life_cycle.provider.dart'; +import 'package:immich_mobile/providers/auth.provider.dart'; +import 'package:immich_mobile/providers/backup/drift_backup.provider.dart'; +import 'package:immich_mobile/providers/infrastructure/platform.provider.dart'; +import 'package:immich_mobile/providers/server_info.provider.dart'; +import 'package:immich_mobile/providers/websocket.provider.dart'; +import 'package:immich_mobile/utils/upload_speed_calculator.dart'; +import 'package:mocktail/mocktail.dart'; + +import '../infrastructure/repository.mock.dart'; +import '../service.mocks.dart'; + +class FakeLogMessage extends Fake implements LogMessage {} + +class TestAuthNotifier extends AuthNotifier { + TestAuthNotifier(Ref ref) + : super( + MockAuthService(), + MockApiService(), + MockUserService(), + MockSecureStorageService(), + MockWidgetService(), + ref, + ) { + state = const AuthState( + deviceId: 'device-1', + userId: 'user-1', + userEmail: 'user@example.com', + name: 'User', + profileImagePath: '', + isAdmin: false, + isAuthenticated: true, + ); + } + + @override + Future setOpenApiServiceEndpoint() async => 'http://test-server.com'; +} + +class TestWebsocketNotifier extends WebsocketNotifier { + TestWebsocketNotifier(super.ref); + + int connectCount = 0; + int disconnectCount = 0; + final connectCalled = Completer(); + + @override + void connect() { + connectCount++; + if (!connectCalled.isCompleted) { + connectCalled.complete(); + } + throw StateError('unexpected websocket connection'); + } + + @override + void disconnect() => disconnectCount++; +} + +class TestDriftBackupNotifier extends DriftBackupNotifier { + TestDriftBackupNotifier() : super(MockForegroundUploadService(), MockBackgroundUploadService(), UploadSpeedManager()); +} + +void main() { + late LogService logService; + late Completer serverVersion; + late MockServerInfoService serverInfoService; + late MockBackgroundWorkerLockService lockService; + late ProviderContainer container; + late TestWebsocketNotifier websocket; + late AppLifeCycleNotifier lifeCycle; + late int serverVersionCount; + + setUpAll(() async { + final logRepository = MockLogRepository(); + final settingsRepository = MockSettingsRepository(); + registerFallbackValue(FakeLogMessage()); + when(() => logRepository.truncate(limit: any(named: 'limit'))).thenAnswer((_) async {}); + when(() => logRepository.insert(any())).thenAnswer((_) async => true); + when(() => settingsRepository.appConfig).thenReturn(const AppConfig(logLevel: LogLevel.info)); + logService = await LogService.init( + logRepository: logRepository, + settingsRepository: settingsRepository, + shouldBuffer: false, + ); + }); + + tearDownAll(() => logService.dispose()); + + setUp(() { + serverVersion = Completer(); + serverInfoService = MockServerInfoService(); + lockService = MockBackgroundWorkerLockService(); + serverVersionCount = 0; + + when(() => serverInfoService.getServerVersion()).thenAnswer((_) { + serverVersionCount++; + return serverVersionCount == 1 ? serverVersion.future : Future.value(); + }); + when(() => lockService.lock()).thenAnswer((_) async {}); + when(() => lockService.unlock()).thenAnswer((_) async {}); + + container = ProviderContainer( + overrides: [ + authProvider.overrideWith(TestAuthNotifier.new), + serverInfoProvider.overrideWith((_) => ServerInfoNotifier(serverInfoService)), + websocketProvider.overrideWith((ref) { + return websocket = TestWebsocketNotifier(ref); + }), + driftBackupProvider.overrideWith((_) => TestDriftBackupNotifier()), + backgroundWorkerLockServiceProvider.overrideWithValue(lockService), + ], + ); + lifeCycle = container.read(appStateProvider.notifier); + }); + + tearDown(() => container.dispose()); + + Future startResume() async { + await lifeCycle.handleAppPause(); + unawaited(lifeCycle.handleAppResume()); + await untilCalled(() => serverInfoService.getServerVersion()); + } + + Future releaseResume() async { + serverVersion.complete(); + await Future.delayed(Duration.zero); + } + + test('pause during resume does not reconnect websocket', () async { + await startResume(); + await lifeCycle.handleAppPause(); + await releaseResume(); + + expect(lifeCycle.getAppState(), AppLifeCycleEnum.paused); + expect(serverVersionCount, 1); + expect(websocket.disconnectCount, 2); + expect(websocket.connectCount, 0); + }); + + test('inactive resume retries when the app resumes again', () async { + await startResume(); + lifeCycle.handleAppInactivity(); + await releaseResume(); + + unawaited(lifeCycle.handleAppResume()); + await websocket.connectCalled.future; + + expect(lifeCycle.getAppState(), AppLifeCycleEnum.resumed); + expect(serverVersionCount, 2); + expect(websocket.disconnectCount, 1); + expect(websocket.connectCount, 1); + }); + + test('pause after an inactive abort resumes once', () async { + await startResume(); + lifeCycle.handleAppInactivity(); + await releaseResume(); + await lifeCycle.handleAppPause(); + + unawaited(lifeCycle.handleAppResume()); + await websocket.connectCalled.future; + unawaited(lifeCycle.handleAppResume()); + await Future.delayed(Duration.zero); + + expect(lifeCycle.getAppState(), AppLifeCycleEnum.resumed); + expect(serverVersionCount, 2); + expect(websocket.disconnectCount, 2); + expect(websocket.connectCount, 1); + }); +} diff --git a/mobile/test/providers/asset_viewer/asset_viewer_provider_test.dart b/mobile/test/providers/asset_viewer/asset_viewer_provider_test.dart index 67eb1dd9d1..454923affa 100644 --- a/mobile/test/providers/asset_viewer/asset_viewer_provider_test.dart +++ b/mobile/test/providers/asset_viewer/asset_viewer_provider_test.dart @@ -1,4 +1,5 @@ import 'dart:async'; +import 'dart:ui'; import 'package:flutter_test/flutter_test.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; @@ -7,7 +8,7 @@ import 'package:immich_mobile/providers/asset_viewer/asset_viewer.provider.dart' import 'package:immich_mobile/providers/infrastructure/asset.provider.dart'; import 'package:mocktail/mocktail.dart'; -import '../../domain/service.mock.dart'; +import '../../service.mocks.dart'; import '../../unit/factories/remote_asset_factory.dart'; void main() { @@ -107,5 +108,20 @@ void main() { await pumpEventQueue(); expect(container.read(assetViewerProvider).currentAsset, updatedTwo); }); + + test('keeps the tapped tile size while swiping', () { + final first = RemoteAssetFactory.create(); + final second = RemoteAssetFactory.create(); + final notifier = container.read(assetViewerProvider.notifier); + + notifier.setAsset(first, thumbnailSize: const Size.square(642)); + expect(container.read(assetViewerProvider).thumbnailSize, const Size.square(642)); + + notifier.setAsset(second); + expect(container.read(assetViewerProvider).thumbnailSize, const Size.square(642)); + + notifier.reset(); + expect(container.read(assetViewerProvider).thumbnailSize, isNull); + }); }); } diff --git a/mobile/test/providers/backup/drift_backup_provider_test.dart b/mobile/test/providers/backup/drift_backup_provider_test.dart new file mode 100644 index 0000000000..205f564cd9 --- /dev/null +++ b/mobile/test/providers/backup/drift_backup_provider_test.dart @@ -0,0 +1,109 @@ +import 'dart:async'; + +import 'package:flutter_test/flutter_test.dart'; +import 'package:immich_mobile/providers/backup/drift_backup.provider.dart'; +import 'package:immich_mobile/services/background_upload.service.dart'; +import 'package:immich_mobile/services/foreground_upload.service.dart'; +import 'package:immich_mobile/utils/upload_speed_calculator.dart'; +import 'package:mocktail/mocktail.dart'; + +class MockForegroundUploadService extends Mock implements ForegroundUploadService {} + +class MockBackgroundUploadService extends Mock implements BackgroundUploadService {} + +void main() { + late MockForegroundUploadService foregroundUploadService; + late MockBackgroundUploadService backgroundUploadService; + late DriftBackupNotifier notifier; + + setUpAll(() { + registerFallbackValue(Completer()); + registerFallbackValue(const UploadCallbacks()); + }); + + setUp(() { + foregroundUploadService = MockForegroundUploadService(); + backgroundUploadService = MockBackgroundUploadService(); + notifier = DriftBackupNotifier(foregroundUploadService, backgroundUploadService, UploadSpeedManager()); + addTearDown(() { + if (notifier.mounted) { + notifier.dispose(); + } + }); + }); + + void mockCounts({required int total, required int remainder, int processing = 0}) { + when( + () => foregroundUploadService.getBackupCounts('user-1'), + ).thenAnswer((_) async => (total: total, remainder: remainder, processing: processing)); + } + + // Drives a backup run so we can grab the onSuccess callback the notifier wires up. + Future startAndCaptureOnSuccess() async { + void Function(String, String)? onSuccess; + when(() => foregroundUploadService.uploadCandidates(any(), any(), callbacks: any(named: 'callbacks'))).thenAnswer(( + invocation, + ) async { + onSuccess = (invocation.namedArguments[#callbacks] as UploadCallbacks).onSuccess; + }); + await notifier.startForegroundBackup('user-1'); + return onSuccess!; + } + + group('foreground backup counts', () { + test('successes move one asset from remainder to backup', () async { + mockCounts(total: 25, remainder: 25); + final onSuccess = await startAndCaptureOnSuccess(); + + for (var i = 0; i < 10; i++) { + onSuccess('asset-$i', 'remote-$i'); + } + + expect(notifier.state.remainderCount, 15); + expect(notifier.state.backupCount, 10); + expect(notifier.state.backupCount + notifier.state.remainderCount, notifier.state.totalCount); + }); + + test('a duplicate success after pause and resume cannot go below zero', () async { + // #26215: app pauses mid-backup, sync has not recorded the upload yet, so the + // resumed run re-uploads the same asset and the server answers 200 duplicate. + // The start of each run re-baselines the counters from the DB, so the duplicate + // success is counted against a baseline that includes the asset again. + mockCounts(total: 1, remainder: 1); + + final firstRun = await startAndCaptureOnSuccess(); + expect(notifier.state.remainderCount, 1); + firstRun('asset-1', 'remote-1'); + expect(notifier.state.remainderCount, 0); + + notifier.stopForegroundBackup(reason: "test"); + + final resumedRun = await startAndCaptureOnSuccess(); + expect(notifier.state.remainderCount, 1); + verify(() => foregroundUploadService.getBackupCounts('user-1')).called(2); + + resumedRun('asset-1', 'remote-1'); + expect(notifier.state.remainderCount, 0); + expect(notifier.state.backupCount, 1); + }); + + test('a drifted counter state heals at run start', () async { + mockCounts(total: 91, remainder: 7); + notifier.state = notifier.state.copyWith(totalCount: 91, backupCount: 103, remainderCount: -12); + + await startAndCaptureOnSuccess(); + + expect(notifier.state.totalCount, 91); + expect(notifier.state.remainderCount, 7); + expect(notifier.state.backupCount, 84); + }); + + test('a late success after dispose does not throw', () async { + mockCounts(total: 2, remainder: 2); + final onSuccess = await startAndCaptureOnSuccess(); + notifier.dispose(); + + onSuccess('asset-1', 'remote-1'); + }); + }); +} diff --git a/mobile/test/providers/infrastructure/action_provider_test.dart b/mobile/test/providers/infrastructure/action_provider_test.dart deleted file mode 100644 index be13e58f73..0000000000 --- a/mobile/test/providers/infrastructure/action_provider_test.dart +++ /dev/null @@ -1,116 +0,0 @@ -import 'package:flutter/widgets.dart'; -import 'package:flutter_test/flutter_test.dart'; -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:immich_mobile/constants/enums.dart'; -import 'package:immich_mobile/domain/models/asset/base_asset.model.dart'; -import 'package:immich_mobile/domain/models/user.model.dart'; -import 'package:immich_mobile/domain/services/asset.service.dart'; -import 'package:immich_mobile/domain/services/user.service.dart'; -import 'package:immich_mobile/providers/asset_viewer/asset_viewer.provider.dart'; -import 'package:immich_mobile/providers/infrastructure/action.provider.dart'; -import 'package:immich_mobile/providers/infrastructure/asset.provider.dart'; -import 'package:immich_mobile/providers/infrastructure/asset_viewer/asset.provider.dart'; -import 'package:immich_mobile/providers/user.provider.dart'; -import 'package:immich_mobile/services/action.service.dart'; -import 'package:immich_mobile/services/download.service.dart'; -import 'package:immich_mobile/services/foreground_upload.service.dart'; -import 'package:mocktail/mocktail.dart'; - -class MockActionService extends Mock implements ActionService {} - -class MockAssetService extends Mock implements AssetService {} - -class MockDownloadService extends Mock implements DownloadService {} - -class MockForegroundUploadService extends Mock implements ForegroundUploadService {} - -class MockUserService extends Mock implements UserService {} - -class FakeBuildContext extends Fake implements BuildContext {} - -final _user = UserDto(id: 'user-1', email: 'user@test.dev', name: 'user', profileChangedAt: DateTime(2026)); - -final _asset = RemoteAsset( - id: 'asset-1', - name: 'photo.jpg', - ownerId: 'user-1', - checksum: 'checksum-1', - type: AssetType.image, - createdAt: DateTime(2026, 6, 10, 10, 27), - updatedAt: DateTime(2026, 6, 10, 10, 27), - isEdited: false, -); - -void main() { - late ProviderContainer container; - late MockActionService actionService; - late MockAssetService assetService; - - setUpAll(() { - registerFallbackValue(FakeBuildContext()); - registerFallbackValue(_asset); - registerFallbackValue([]); - }); - - setUp(() { - actionService = MockActionService(); - assetService = MockAssetService(); - final userService = MockUserService(); - - when(() => actionService.editDateTime(any(), any())).thenAnswer((_) async => true); - when(() => assetService.watchAsset(any())).thenAnswer((_) => const Stream.empty()); - when(() => assetService.getExif(any())).thenAnswer((_) async => null); - when(() => userService.tryGetMyUser()).thenReturn(_user); - when(() => userService.watchMyUser()).thenAnswer((_) => const Stream.empty()); - - container = ProviderContainer( - overrides: [ - actionServiceProvider.overrideWithValue(actionService), - assetServiceProvider.overrideWithValue(assetService), - downloadServiceProvider.overrideWithValue(MockDownloadService()), - foregroundUploadServiceProvider.overrideWithValue(MockForegroundUploadService()), - currentUserProvider.overrideWith((ref) => CurrentUserProvider(userService)), - ], - ); - addTearDown(container.dispose); - }); - - group('editDateTime', () { - test('refreshes the exif provider when editing from the viewer', () async { - container.read(assetViewerProvider.notifier).setAsset(_asset); - container.listen(assetExifProvider(_asset), (_, __) {}); - await container.read(assetExifProvider(_asset).future); - - final result = await container.read(actionProvider.notifier).editDateTime(ActionSource.viewer, FakeBuildContext()); - - expect(result?.success, isTrue); - await container.read(assetExifProvider(_asset).future); - verify(() => assetService.getExif(_asset)).called(2); - }); - - test('leaves the exif provider cached when editing from the timeline', () async { - container.read(assetViewerProvider.notifier).setAsset(_asset); - container.listen(assetExifProvider(_asset), (_, __) {}); - await container.read(assetExifProvider(_asset).future); - - final result = await container.read(actionProvider.notifier).editDateTime(ActionSource.timeline, FakeBuildContext()); - - expect(result?.success, isTrue); - await container.read(assetExifProvider(_asset).future); - verify(() => assetService.getExif(_asset)).called(1); - }); - - test('does not refresh the exif provider when the edit is cancelled', () async { - when(() => actionService.editDateTime(any(), any())).thenAnswer((_) async => false); - container.read(assetViewerProvider.notifier).setAsset(_asset); - container.listen(assetExifProvider(_asset), (_, __) {}); - await container.read(assetExifProvider(_asset).future); - - final result = await container.read(actionProvider.notifier).editDateTime(ActionSource.viewer, FakeBuildContext()); - - expect(result, isNull); - await container.read(assetExifProvider(_asset).future); - verify(() => assetService.getExif(_asset)).called(1); - }); - }); -} diff --git a/mobile/test/providers/infrastructure/memory_provider_test.dart b/mobile/test/providers/infrastructure/memory_provider_test.dart index e588153fc9..60b84c5aad 100644 --- a/mobile/test/providers/infrastructure/memory_provider_test.dart +++ b/mobile/test/providers/infrastructure/memory_provider_test.dart @@ -48,7 +48,7 @@ void main() { test('re-queries after local midnight', () { fakeAsync((async) { final container = makeContainer(); - container.listen(driftMemoryFutureProvider, (_, __) {}); + container.listen(driftMemoryFutureProvider, (_, _) {}); async.flushMicrotasks(); verify(() => memoryService.getMemoryLane('user-1')).called(1); @@ -66,7 +66,7 @@ void main() { test('cancels the midnight timer when disposed', () { fakeAsync((async) { final container = makeContainer(); - final subscription = container.listen(driftMemoryFutureProvider, (_, __) {}); + final subscription = container.listen(driftMemoryFutureProvider, (_, _) {}); async.flushMicrotasks(); verify(() => memoryService.getMemoryLane('user-1')).called(1); @@ -83,7 +83,7 @@ void main() { fakeAsync((async) { final container = makeContainer(); - container.listen(driftMemoryFutureProvider, (_, __) {}); + container.listen(driftMemoryFutureProvider, (_, _) {}); async.flushMicrotasks(); async.elapse(const Duration(hours: 25)); diff --git a/mobile/test/repositories/drift_album_api_repository_test.dart b/mobile/test/repositories/drift_album_api_repository_test.dart new file mode 100644 index 0000000000..93c45c6687 --- /dev/null +++ b/mobile/test/repositories/drift_album_api_repository_test.dart @@ -0,0 +1,82 @@ +import 'package:flutter_test/flutter_test.dart'; +import 'package:immich_mobile/repositories/drift_album_api_repository.dart'; +import 'package:mocktail/mocktail.dart'; +import 'package:openapi/api.dart'; + +class _MockAlbumsApi extends Mock implements AlbumsApi {} + +void main() { + late _MockAlbumsApi api; + late DriftAlbumApiRepository repo; + + setUpAll(() { + registerFallbackValue(BulkIdsDto(ids: const [])); + }); + + setUp(() { + api = _MockAlbumsApi(); + repo = DriftAlbumApiRepository(api); + }); + + void stubResponse(List response) { + when( + () => api.addAssetsToAlbum(any(), any(), abortTrigger: any(named: 'abortTrigger')), + ).thenAnswer((_) async => response); + } + + test('no_permission failure surfaces as failed, not added (the #22342 bug)', () async { + stubResponse([ + BulkIdResponseDto(id: 'a1', success: false, error: const Optional.present(BulkIdErrorReason.noPermission)), + ]); + + final result = await repo.addAssets('album1', ['a1']); + + expect(result.added, isEmpty); + expect(result.failed, ['a1']); + }); + + test('duplicate is neither added nor failed (genuinely already in album)', () async { + stubResponse([ + BulkIdResponseDto(id: 'a1', success: false, error: const Optional.present(BulkIdErrorReason.duplicate)), + ]); + + final result = await repo.addAssets('album1', ['a1']); + + expect(result.added, isEmpty); + expect(result.failed, isEmpty); + }); + + test('success is added', () async { + stubResponse([BulkIdResponseDto(id: 'a1', success: true)]); + + final result = await repo.addAssets('album1', ['a1']); + + expect(result.added, ['a1']); + expect(result.failed, isEmpty); + }); + + test('not_found and unknown count as failures', () async { + stubResponse([ + BulkIdResponseDto(id: 'a1', success: false, error: const Optional.present(BulkIdErrorReason.notFound)), + BulkIdResponseDto(id: 'a2', success: false, error: const Optional.present(BulkIdErrorReason.unknown)), + ]); + + final result = await repo.addAssets('album1', ['a1', 'a2']); + + expect(result.added, isEmpty); + expect(result.failed, ['a1', 'a2']); + }); + + test('mixed: added kept, no_permission failed, duplicate dropped', () async { + stubResponse([ + BulkIdResponseDto(id: 'ok', success: true), + BulkIdResponseDto(id: 'perm', success: false, error: const Optional.present(BulkIdErrorReason.noPermission)), + BulkIdResponseDto(id: 'dup', success: false, error: const Optional.present(BulkIdErrorReason.duplicate)), + ]); + + final result = await repo.addAssets('album1', ['ok', 'perm', 'dup']); + + expect(result.added, ['ok']); + expect(result.failed, ['perm']); + }); +} diff --git a/mobile/test/repository.mocks.dart b/mobile/test/repository.mocks.dart index 80786420fd..164e7fe062 100644 --- a/mobile/test/repository.mocks.dart +++ b/mobile/test/repository.mocks.dart @@ -1,8 +1,10 @@ +import 'package:immich_mobile/domain/services/tag.service.dart'; +import 'package:immich_mobile/infrastructure/repositories/remote_exif.repository.dart'; import 'package:immich_mobile/repositories/asset_api.repository.dart'; import 'package:immich_mobile/repositories/asset_media.repository.dart'; import 'package:immich_mobile/repositories/auth.repository.dart'; import 'package:immich_mobile/repositories/auth_api.repository.dart'; -import 'package:immich_mobile/domain/services/tag.service.dart'; +import 'package:immich_mobile/repositories/download.repository.dart'; import 'package:immich_mobile/repositories/permission.repository.dart'; import 'package:mocktail/mocktail.dart'; @@ -10,10 +12,14 @@ class MockAssetApiRepository extends Mock implements AssetApiRepository {} class MockAssetMediaRepository extends Mock implements AssetMediaRepository {} -class MockPermissionRepository extends Mock implements IPermissionRepository {} +class MockPermissionRepository extends Mock implements DevicePermissionRepository {} class MockAuthApiRepository extends Mock implements AuthApiRepository {} class MockAuthRepository extends Mock implements AuthRepository {} class MockTagService extends Mock implements TagService {} + +class MockDownloadRepository extends Mock implements DownloadRepository {} + +class MockRemoteExifRepository extends Mock implements RemoteExifRepository {} diff --git a/mobile/test/riverpod_mocks.dart b/mobile/test/riverpod_mocks.dart new file mode 100644 index 0000000000..24867b226e --- /dev/null +++ b/mobile/test/riverpod_mocks.dart @@ -0,0 +1,8 @@ +import 'package:immich_mobile/models/server_info/server_version.model.dart'; +import 'package:immich_mobile/providers/server_info.provider.dart'; + +class StubServerInfoNotifier extends ServerInfoNotifier { + StubServerInfoNotifier(super.serverInfoService, {required ServerVersion version}) { + state = state.copyWith(serverVersion: version); + } +} diff --git a/mobile/test/service.mocks.dart b/mobile/test/service.mocks.dart index 4591dd845d..ecf9c771bc 100644 --- a/mobile/test/service.mocks.dart +++ b/mobile/test/service.mocks.dart @@ -1,6 +1,23 @@ +import 'package:immich_mobile/domain/services/asset.service.dart'; +import 'package:immich_mobile/domain/services/background_worker.service.dart'; +import 'package:immich_mobile/domain/services/partner.service.dart'; +import 'package:immich_mobile/domain/services/remote_album.service.dart'; +import 'package:immich_mobile/domain/services/store.service.dart'; +import 'package:immich_mobile/domain/services/user.service.dart'; +import 'package:immich_mobile/domain/utils/background_sync.dart'; +import 'package:immich_mobile/platform/native_sync_api.g.dart'; import 'package:immich_mobile/services/api.service.dart'; import 'package:immich_mobile/services/app_settings.service.dart'; +import 'package:immich_mobile/services/auth.service.dart'; +import 'package:immich_mobile/services/background_upload.service.dart'; +import 'package:immich_mobile/services/cleanup.service.dart'; +import 'package:immich_mobile/services/foreground_upload.service.dart'; +import 'package:immich_mobile/services/gcast.service.dart'; import 'package:immich_mobile/services/network.service.dart'; +import 'package:immich_mobile/services/secure_storage.service.dart'; +import 'package:immich_mobile/services/server_info.service.dart'; +import 'package:immich_mobile/services/toast.service.dart'; +import 'package:immich_mobile/services/widget.service.dart'; import 'package:mocktail/mocktail.dart'; class MockApiService extends Mock implements ApiService {} @@ -8,3 +25,39 @@ class MockApiService extends Mock implements ApiService {} class MockNetworkService extends Mock implements NetworkService {} class MockAppSettingService extends Mock implements AppSettingsService {} + +class MockStoreService extends Mock implements StoreService {} + +class MockNativeSyncApi extends Mock implements NativeSyncApi {} + +class MockAppSettingsService extends Mock implements AppSettingsService {} + +class MockPartnerService extends Mock implements PartnerService {} + +class MockAssetService extends Mock implements AssetService {} + +class MockUserService extends Mock implements UserService {} + +class MockRemoteAlbumService extends Mock implements RemoteAlbumService {} + +class MockGCastService extends Mock implements GCastService {} + +class MockForegroundUploadService extends Mock implements ForegroundUploadService {} + +class MockServerInfoService extends Mock implements ServerInfoService {} + +class MockCleanupService extends Mock implements CleanupService {} + +class MockBackgroundSyncManager extends Mock implements BackgroundSyncManager {} + +class MockToastService extends Mock implements ToastService {} + +class MockAuthService extends Mock implements AuthService {} + +class MockSecureStorageService extends Mock implements SecureStorageService {} + +class MockWidgetService extends Mock implements WidgetService {} + +class MockBackgroundUploadService extends Mock implements BackgroundUploadService {} + +class MockBackgroundWorkerLockService extends Mock implements BackgroundWorkerLockService {} diff --git a/mobile/test/services/action.service_test.dart b/mobile/test/services/action.service_test.dart index ef5ece38e9..2d90e24503 100644 --- a/mobile/test/services/action.service_test.dart +++ b/mobile/test/services/action.service_test.dart @@ -2,32 +2,21 @@ 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/store.model.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/store.repository.dart'; -import 'package:immich_mobile/repositories/download.repository.dart'; import 'package:immich_mobile/services/action.service.dart'; import 'package:mocktail/mocktail.dart'; import '../infrastructure/repository.mock.dart'; import '../repository.mocks.dart'; -class MockDownloadRepository extends Mock implements DownloadRepository {} - void main() { late ActionService sut; late MockAssetApiRepository assetApiRepository; late MockRemoteAssetRepository remoteAssetRepository; - late MockDriftLocalAssetRepository localAssetRepository; - late MockDriftAlbumApiRepository albumApiRepository; - late MockRemoteAlbumRepository remoteAlbumRepository; - late MockTrashedLocalAssetRepository trashedLocalAssetRepository; - late MockAssetMediaRepository assetMediaRepository; - late MockDownloadRepository downloadRepository; - late MockTagService tagService; late Drift db; @@ -48,25 +37,8 @@ void main() { setUp(() { assetApiRepository = MockAssetApiRepository(); remoteAssetRepository = MockRemoteAssetRepository(); - localAssetRepository = MockDriftLocalAssetRepository(); - albumApiRepository = MockDriftAlbumApiRepository(); - remoteAlbumRepository = MockRemoteAlbumRepository(); - trashedLocalAssetRepository = MockTrashedLocalAssetRepository(); - assetMediaRepository = MockAssetMediaRepository(); - downloadRepository = MockDownloadRepository(); - tagService = MockTagService(); - sut = ActionService( - assetApiRepository, - remoteAssetRepository, - localAssetRepository, - albumApiRepository, - remoteAlbumRepository, - trashedLocalAssetRepository, - assetMediaRepository, - downloadRepository, - tagService, - ); + sut = ActionService(assetApiRepository, remoteAssetRepository); }); tearDown(() async { @@ -98,93 +70,4 @@ void main() { verify(() => remoteAssetRepository.updateRating(assetId, null)).called(1); }); }); - - group('ActionService.applyDateTime', () { - const ids = ['asset_id_1']; - - test('sends the picked value to the api with its offset intact', () async { - const picked = '2026-06-10T19:15:00.000+06:00'; - when(() => assetApiRepository.updateDateTime(ids, picked)).thenAnswer((_) async {}); - when( - () => remoteAssetRepository.updateDateTime(ids, DateTime.parse(picked), timeZone: 'UTC+06:00'), - ).thenAnswer((_) async {}); - - await sut.applyDateTime(ids, picked); - - verify(() => assetApiRepository.updateDateTime(ids, picked)).called(1); - verify(() => remoteAssetRepository.updateDateTime(ids, DateTime.parse(picked), timeZone: 'UTC+06:00')).called(1); - }); - - test('handles negative offsets', () async { - const picked = '2026-01-05T08:00:00.000-05:30'; - when(() => assetApiRepository.updateDateTime(ids, picked)).thenAnswer((_) async {}); - when( - () => remoteAssetRepository.updateDateTime(ids, DateTime.parse(picked), timeZone: 'UTC-05:30'), - ).thenAnswer((_) async {}); - - await sut.applyDateTime(ids, picked); - - verify(() => assetApiRepository.updateDateTime(ids, picked)).called(1); - verify(() => remoteAssetRepository.updateDateTime(ids, DateTime.parse(picked), timeZone: 'UTC-05:30')).called(1); - }); - - test('writes no timezone when the value has no offset', () async { - const picked = '2026-06-10T13:15:00.000Z'; - when(() => assetApiRepository.updateDateTime(ids, picked)).thenAnswer((_) async {}); - when( - () => remoteAssetRepository.updateDateTime(ids, DateTime.parse(picked), timeZone: null), - ).thenAnswer((_) async {}); - - await sut.applyDateTime(ids, picked); - - verify(() => assetApiRepository.updateDateTime(ids, picked)).called(1); - verify(() => remoteAssetRepository.updateDateTime(ids, DateTime.parse(picked), timeZone: null)).called(1); - }); - }); - - group('ActionService.deleteLocal', () { - test('routes deleted ids to trashed repository when Android trash handling is enabled', () async { - await Store.put(StoreKey.manageLocalMediaAndroid, true); - const ids = ['a', 'b']; - - when(() => assetMediaRepository.deleteAll(ids)).thenAnswer((_) async => ids); - when(() => trashedLocalAssetRepository.applyTrashedAssets(ids)).thenAnswer((_) async {}); - - final result = await sut.deleteLocal(ids); - - expect(result, ids.length); - verify(() => assetMediaRepository.deleteAll(ids)).called(1); - verify(() => trashedLocalAssetRepository.applyTrashedAssets(ids)).called(1); - verifyNever(() => localAssetRepository.delete(any())); - }); - - test('deletes locally when Android trash handling is disabled', () async { - await Store.put(StoreKey.manageLocalMediaAndroid, false); - const ids = ['c']; - - when(() => assetMediaRepository.deleteAll(ids)).thenAnswer((_) async => ids); - when(() => localAssetRepository.delete(ids)).thenAnswer((_) async {}); - - final result = await sut.deleteLocal(ids); - - expect(result, ids.length); - verify(() => assetMediaRepository.deleteAll(ids)).called(1); - verify(() => localAssetRepository.delete(ids)).called(1); - verifyNever(() => trashedLocalAssetRepository.applyTrashedAssets(any())); - }); - - test('short-circuits when nothing was deleted', () async { - await Store.put(StoreKey.manageLocalMediaAndroid, true); - const ids = ['x']; - - when(() => assetMediaRepository.deleteAll(ids)).thenAnswer((_) async => []); - - final result = await sut.deleteLocal(ids); - - expect(result, 0); - verify(() => assetMediaRepository.deleteAll(ids)).called(1); - verifyNever(() => trashedLocalAssetRepository.applyTrashedAssets(any())); - verifyNever(() => localAssetRepository.delete(any())); - }); - }); } diff --git a/mobile/test/services/auth.service_test.dart b/mobile/test/services/auth.service_test.dart index 584ea57027..b62ad3ad2c 100644 --- a/mobile/test/services/auth.service_test.dart +++ b/mobile/test/services/auth.service_test.dart @@ -10,7 +10,6 @@ import 'package:immich_mobile/services/auth.service.dart'; import 'package:mocktail/mocktail.dart'; import 'package:openapi/api.dart'; -import '../domain/service.mock.dart'; import '../repository.mocks.dart'; import '../service.mocks.dart'; @@ -29,13 +28,7 @@ void main() { apiService = MockApiService(); networkService = MockNetworkService(); backgroundSyncManager = MockBackgroundSyncManager(); - sut = AuthService( - authApiRepository, - authRepository, - apiService, - networkService, - backgroundSyncManager, - ); + sut = AuthService(authApiRepository, authRepository, apiService, networkService, backgroundSyncManager); registerFallbackValue(Uri()); }); @@ -110,7 +103,7 @@ void main() { }); test('Should return null if auto endpoint switching is disabled', () async { - when(() => authRepository.getEndpointSwitchingFeature()).thenReturn((false)); + when(() => authRepository.getEndpointSwitchingFeature()).thenReturn(false); final result = await sut.setOpenApiServiceEndpoint(); diff --git a/mobile/test/services/background_upload.service_test.dart b/mobile/test/services/background_upload.service_test.dart index 310f2f4d49..aa46bd9de3 100644 --- a/mobile/test/services/background_upload.service_test.dart +++ b/mobile/test/services/background_upload.service_test.dart @@ -1,7 +1,7 @@ import 'dart:convert'; import 'dart:io'; -import 'package:drift/drift.dart' hide isNull, isNotNull; +import 'package:drift/drift.dart' hide isNotNull, isNull; import 'package:drift/native.dart'; import 'package:flutter/foundation.dart'; import 'package:flutter/services.dart'; @@ -118,8 +118,69 @@ void main() { expect(task, isNotNull); // For live photos, extension should be changed to match the video file expect(task!.fields['filename'], equals('OriginalLivePhoto.mov')); + expect(task.fields['visibility'], equals('hidden')); verify(() => mockAssetMediaRepository.getOriginalFilename(asset.id)).called(1); }); + + test('should not set visibility for a regular photo', () async { + final asset = LocalAssetStub.image1; + final mockEntity = MockAssetEntity(); + final mockFile = File('/path/to/file.jpg'); + + when(() => mockEntity.isLivePhoto).thenReturn(false); + when(() => mockStorageRepository.getAssetEntityForAsset(asset)).thenAnswer((_) async => mockEntity); + when(() => mockStorageRepository.getFileForAsset(asset.id)).thenAnswer((_) async => mockFile); + when(() => mockAssetMediaRepository.getOriginalFilename(asset.id)).thenAnswer((_) async => 'Regular.jpg'); + + final task = await sut.getUploadTask(asset); + expect(task, isNotNull); + expect(task!.fields.containsKey('visibility'), isFalse); + }); + + test('corrects the extension when iOS returns a rendered file for a .dng asset', () async { + final asset = LocalAssetStub.image1; + final mockEntity = MockAssetEntity(); + final mockFile = File('/path/to/IMG_6499.jpg'); + + when(() => mockEntity.isLivePhoto).thenReturn(false); + when(() => mockStorageRepository.getAssetEntityForAsset(asset)).thenAnswer((_) async => mockEntity); + when(() => mockStorageRepository.getFileForAsset(asset.id)).thenAnswer((_) async => mockFile); + when(() => mockAssetMediaRepository.getOriginalFilename(asset.id)).thenAnswer((_) async => 'IMG_6499.dng'); + + final task = await sut.getUploadTask(asset); + expect(task, isNotNull); + expect(task!.fields['filename'], equals('IMG_6499.jpg')); + }); + + test('keeps the .dng extension for a genuine RAW original', () async { + final asset = LocalAssetStub.image1; + final mockEntity = MockAssetEntity(); + final mockFile = File('/path/to/IMG_5210.dng'); + + when(() => mockEntity.isLivePhoto).thenReturn(false); + when(() => mockStorageRepository.getAssetEntityForAsset(asset)).thenAnswer((_) async => mockEntity); + when(() => mockStorageRepository.getFileForAsset(asset.id)).thenAnswer((_) async => mockFile); + when(() => mockAssetMediaRepository.getOriginalFilename(asset.id)).thenAnswer((_) async => 'IMG_5210.dng'); + + final task = await sut.getUploadTask(asset); + expect(task, isNotNull); + expect(task!.fields['filename'], equals('IMG_5210.dng')); + }); + + test('borrows the extension from the asset name for an extensionless name (DJI/Fusion)', () async { + final asset = LocalAssetStub.image1; + final mockEntity = MockAssetEntity(); + final mockFile = File('/path/to/DJI_0001'); + + when(() => mockEntity.isLivePhoto).thenReturn(false); + when(() => mockStorageRepository.getAssetEntityForAsset(asset)).thenAnswer((_) async => mockEntity); + when(() => mockStorageRepository.getFileForAsset(asset.id)).thenAnswer((_) async => mockFile); + when(() => mockAssetMediaRepository.getOriginalFilename(asset.id)).thenAnswer((_) async => 'DJI_0001'); + + final task = await sut.getUploadTask(asset); + expect(task, isNotNull); + expect(task!.fields['filename'], equals('DJI_0001.jpg')); + }); }); group('getLivePhotoUploadTask', () { @@ -140,6 +201,7 @@ void main() { expect(task, isNotNull); expect(task!.fields['filename'], equals('OriginalLivePhoto.HEIC')); expect(task.fields['livePhotoVideoId'], equals('video-id-123')); + expect(task.fields.containsKey('visibility'), isFalse); verify(() => mockAssetMediaRepository.getOriginalFilename(asset.id)).called(1); }); @@ -333,6 +395,7 @@ void main() { expect(task, isNotNull); expect(task!.fields.containsKey('metadata'), isTrue); expect(task.fields['livePhotoVideoId'], equals('video-123')); + expect(task.fields.containsKey('visibility'), isFalse); final metadata = jsonDecode(task.fields['metadata']!) as List; expect(metadata, hasLength(1)); diff --git a/mobile/test/services/deep_link_service_test.dart b/mobile/test/services/deep_link_service_test.dart index ff090367ea..16fa392f27 100644 --- a/mobile/test/services/deep_link_service_test.dart +++ b/mobile/test/services/deep_link_service_test.dart @@ -115,7 +115,7 @@ void main() { final route = await sut.handleMyImmichApp(link('/albums/$_albumId/photos/$_assetId'), ref); expect(route, isA()); - expect((route!.args as AssetViewerRouteArgs).currentAlbum, _album); + expect((route!.args! as AssetViewerRouteArgs).currentAlbum, _album); }); test('still opens the viewer when the album cannot be resolved', () async { @@ -125,7 +125,7 @@ void main() { final route = await sut.handleMyImmichApp(link('/albums/$_albumId/photos/$_assetId'), ref); expect(route, isA()); - expect((route!.args as AssetViewerRouteArgs).currentAlbum, isNull); + expect((route!.args! as AssetViewerRouteArgs).currentAlbum, isNull); }); test('plain photo link has no album', () async { @@ -134,7 +134,7 @@ void main() { final route = await sut.handleMyImmichApp(link('/photos/$_assetId'), ref); expect(route, isA()); - expect((route!.args as AssetViewerRouteArgs).currentAlbum, isNull); + expect((route!.args! as AssetViewerRouteArgs).currentAlbum, isNull); verifyNever(() => remoteAlbumService.get(any())); }); } diff --git a/mobile/test/services/foreground_upload.service_test.dart b/mobile/test/services/foreground_upload.service_test.dart new file mode 100644 index 0000000000..d4344ed77e --- /dev/null +++ b/mobile/test/services/foreground_upload.service_test.dart @@ -0,0 +1,200 @@ +import 'dart:io'; + +import 'package:drift/drift.dart' hide isNotNull, isNull; +import 'package:drift/native.dart'; +import 'package:flutter/services.dart'; +import 'package:flutter_test/flutter_test.dart'; +import 'package:immich_mobile/domain/models/store.model.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/settings.repository.dart'; +import 'package:immich_mobile/infrastructure/repositories/store.repository.dart'; +import 'package:immich_mobile/repositories/upload.repository.dart'; +import 'package:immich_mobile/services/foreground_upload.service.dart'; +import 'package:mocktail/mocktail.dart'; + +import '../api.mocks.dart'; +import '../fixtures/asset.stub.dart'; +import '../infrastructure/repository.mock.dart'; +import '../mocks/asset_entity.mock.dart'; +import '../repository.mocks.dart'; + +void main() { + late ForegroundUploadService sut; + late MockUploadRepository mockUploadRepository; + late MockStorageRepository mockStorageRepository; + late MockDriftBackupRepository mockBackupRepository; + late MockConnectivityApi mockConnectivityApi; + late MockAssetMediaRepository mockAssetMediaRepository; + late Drift db; + + setUpAll(() async { + TestWidgetsFlutterBinding.ensureInitialized(); + TestDefaultBinaryMessengerBinding.instance.defaultBinaryMessenger.setMockMethodCallHandler( + const MethodChannel('plugins.flutter.io/path_provider'), + (MethodCall methodCall) async => 'test', + ); + db = Drift(DatabaseConnection(NativeDatabase.memory(), closeStreamsSynchronously: true)); + await StoreService.init(storeRepository: DriftStoreRepository(db)); + await SettingsRepository.ensureInitialized(db); + + await Store.put(StoreKey.serverEndpoint, 'http://demo.immich.app'); + await Store.put(StoreKey.deviceId, 'device-id'); + + registerFallbackValue(File('file')); + registerFallbackValue({}); + }); + + setUp(() { + mockUploadRepository = MockUploadRepository(); + mockStorageRepository = MockStorageRepository(); + mockBackupRepository = MockDriftBackupRepository(); + mockConnectivityApi = MockConnectivityApi(); + mockAssetMediaRepository = MockAssetMediaRepository(); + + sut = ForegroundUploadService( + mockUploadRepository, + mockStorageRepository, + mockBackupRepository, + mockConnectivityApi, + mockAssetMediaRepository, + ); + }); + + List> captureFields() { + final captured = >[]; + when( + () => mockUploadRepository.uploadFile( + file: any(named: 'file'), + originalFileName: any(named: 'originalFileName'), + fields: any(named: 'fields'), + cancelToken: any(named: 'cancelToken'), + onProgress: any(named: 'onProgress'), + logContext: any(named: 'logContext'), + ), + ).thenAnswer((invocation) async { + final fields = invocation.namedArguments[#fields] as Map; + captured.add(Map.of(fields)); + return UploadResult.success(remoteAssetId: 'remote-${captured.length}'); + }); + return captured; + } + + List captureOriginalFileNames() { + final captured = []; + when( + () => mockUploadRepository.uploadFile( + file: any(named: 'file'), + originalFileName: any(named: 'originalFileName'), + fields: any(named: 'fields'), + cancelToken: any(named: 'cancelToken'), + onProgress: any(named: 'onProgress'), + logContext: any(named: 'logContext'), + ), + ).thenAnswer((invocation) async { + captured.add(invocation.namedArguments[#originalFileName] as String); + return UploadResult.success(remoteAssetId: 'remote-${captured.length}'); + }); + return captured; + } + + group('uploadSingleAsset', () { + test('should upload the motion part hidden and keep the still image visible', () async { + final asset = LocalAssetStub.image1; + final mockEntity = MockAssetEntity(); + final stillFile = File('/path/to/still.heic'); + final videoFile = File('/path/to/motion.mov'); + + when(() => mockEntity.isLivePhoto).thenReturn(true); + when(() => mockStorageRepository.getAssetEntityForAsset(asset)).thenAnswer((_) async => mockEntity); + when(() => mockStorageRepository.isAssetAvailableLocally(asset.id)).thenAnswer((_) async => true); + when(() => mockStorageRepository.getFileForAsset(asset.id)).thenAnswer((_) async => stillFile); + when(() => mockStorageRepository.getMotionFileForAsset(asset)).thenAnswer((_) async => videoFile); + when(() => mockAssetMediaRepository.getOriginalFilename(asset.id)).thenAnswer((_) async => 'live.heic'); + + final captured = captureFields(); + + await sut.uploadSingleAsset(asset, null, callbacks: const UploadCallbacks()); + + expect(captured, hasLength(2)); + expect(captured[0]['visibility'], equals('hidden')); + expect(captured[0].containsKey('livePhotoVideoId'), isFalse); + expect(captured[1].containsKey('visibility'), isFalse); + expect(captured[1]['livePhotoVideoId'], equals('remote-1')); + }); + + test('should not set visibility for a regular photo', () async { + final asset = LocalAssetStub.image1; + final mockEntity = MockAssetEntity(); + final stillFile = File('/path/to/photo.jpg'); + + when(() => mockEntity.isLivePhoto).thenReturn(false); + when(() => mockStorageRepository.getAssetEntityForAsset(asset)).thenAnswer((_) async => mockEntity); + when(() => mockStorageRepository.isAssetAvailableLocally(asset.id)).thenAnswer((_) async => true); + when(() => mockStorageRepository.getFileForAsset(asset.id)).thenAnswer((_) async => stillFile); + when(() => mockAssetMediaRepository.getOriginalFilename(asset.id)).thenAnswer((_) async => 'photo.jpg'); + + final captured = captureFields(); + + await sut.uploadSingleAsset(asset, null, callbacks: const UploadCallbacks()); + + expect(captured, hasLength(1)); + expect(captured[0].containsKey('visibility'), isFalse); + }); + + test('corrects the extension when iOS returns a rendered file for a .dng asset', () async { + final asset = LocalAssetStub.image1; + final mockEntity = MockAssetEntity(); + final stillFile = File('/path/to/IMG_6499.jpg'); + + when(() => mockEntity.isLivePhoto).thenReturn(false); + when(() => mockStorageRepository.getAssetEntityForAsset(asset)).thenAnswer((_) async => mockEntity); + when(() => mockStorageRepository.isAssetAvailableLocally(asset.id)).thenAnswer((_) async => true); + when(() => mockStorageRepository.getFileForAsset(asset.id)).thenAnswer((_) async => stillFile); + when(() => mockAssetMediaRepository.getOriginalFilename(asset.id)).thenAnswer((_) async => 'IMG_6499.dng'); + + final names = captureOriginalFileNames(); + + await sut.uploadSingleAsset(asset, null, callbacks: const UploadCallbacks()); + + expect(names, equals(['IMG_6499.jpg'])); + }); + + test('keeps the .dng extension for a genuine RAW original', () async { + final asset = LocalAssetStub.image1; + final mockEntity = MockAssetEntity(); + final stillFile = File('/path/to/IMG_5210.dng'); + + when(() => mockEntity.isLivePhoto).thenReturn(false); + when(() => mockStorageRepository.getAssetEntityForAsset(asset)).thenAnswer((_) async => mockEntity); + when(() => mockStorageRepository.isAssetAvailableLocally(asset.id)).thenAnswer((_) async => true); + when(() => mockStorageRepository.getFileForAsset(asset.id)).thenAnswer((_) async => stillFile); + when(() => mockAssetMediaRepository.getOriginalFilename(asset.id)).thenAnswer((_) async => 'IMG_5210.dng'); + + final names = captureOriginalFileNames(); + + await sut.uploadSingleAsset(asset, null, callbacks: const UploadCallbacks()); + + expect(names, equals(['IMG_5210.dng'])); + }); + + test('borrows the extension from the asset name for an extensionless name (DJI/Fusion)', () async { + final asset = LocalAssetStub.image1; + final mockEntity = MockAssetEntity(); + final stillFile = File('/path/to/DJI_0001'); + + when(() => mockEntity.isLivePhoto).thenReturn(false); + when(() => mockStorageRepository.getAssetEntityForAsset(asset)).thenAnswer((_) async => mockEntity); + when(() => mockStorageRepository.isAssetAvailableLocally(asset.id)).thenAnswer((_) async => true); + when(() => mockStorageRepository.getFileForAsset(asset.id)).thenAnswer((_) async => stillFile); + when(() => mockAssetMediaRepository.getOriginalFilename(asset.id)).thenAnswer((_) async => 'DJI_0001'); + + final names = captureOriginalFileNames(); + + await sut.uploadSingleAsset(asset, null, callbacks: const UploadCallbacks()); + + expect(names, equals(['DJI_0001.jpg'])); + }); + }); +} diff --git a/mobile/test/services/view_intent_service_test.dart b/mobile/test/services/view_intent_service_test.dart index 7b3d0b85e7..fd8f5f725c 100644 --- a/mobile/test/services/view_intent_service_test.dart +++ b/mobile/test/services/view_intent_service_test.dart @@ -1,3 +1,5 @@ +// ignore_for_file: avoid_slow_async_io + import 'dart:io'; import 'package:flutter_test/flutter_test.dart'; @@ -13,11 +15,7 @@ void main() { late Directory tempRoot; late Directory cacheDir; - final attachment = ViewIntentPayload( - path: '/tmp/file.jpg', - mimeType: 'image/jpeg', - localAssetId: '42', - ); + final attachment = ViewIntentPayload(path: '/tmp/file.jpg', mimeType: 'image/jpeg', localAssetId: '42'); setUp(() { hostApi = MockViewIntentHostApi(); diff --git a/mobile/test/unit/factories/local_album_factory.dart b/mobile/test/unit/factories/local_album_factory.dart index 447001f971..639237c858 100644 --- a/mobile/test/unit/factories/local_album_factory.dart +++ b/mobile/test/unit/factories/local_album_factory.dart @@ -14,10 +14,10 @@ class LocalAlbumFactory { String? linkedRemoteAlbumId, int? assetCount, }) { - id = TestUtils.uuid(id); + final albumId = TestUtils.uuid(id); return LocalAlbum( - id: id, - name: name ?? 'local_album_$id', + id: albumId, + name: name ?? 'local_album_$albumId', updatedAt: TestUtils.date(updatedAt), backupSelection: backupSelection ?? .none, isIosSharedAlbum: isIosSharedAlbum ?? false, diff --git a/mobile/test/unit/factories/local_asset_factory.dart b/mobile/test/unit/factories/local_asset_factory.dart index 2f4391813f..5b16635d48 100644 --- a/mobile/test/unit/factories/local_asset_factory.dart +++ b/mobile/test/unit/factories/local_asset_factory.dart @@ -5,12 +5,13 @@ import '../../utils.dart'; class LocalAssetFactory { const LocalAssetFactory(); - static LocalAsset create({String? id, String? name}) { - id = TestUtils.uuid(id); + static LocalAsset create({String? id, String? name, String? remoteId}) { + final assetId = TestUtils.uuid(id); return LocalAsset( - id: id, - name: name ?? 'local_$id.jpg', + id: assetId, + name: name ?? 'local_$assetId.jpg', + remoteId: remoteId, type: AssetType.image, createdAt: TestUtils.yesterday(), updatedAt: TestUtils.now(), diff --git a/mobile/test/unit/factories/partner_user_factory.dart b/mobile/test/unit/factories/partner_user_factory.dart index 63f94608ad..2ee0fa0773 100644 --- a/mobile/test/unit/factories/partner_user_factory.dart +++ b/mobile/test/unit/factories/partner_user_factory.dart @@ -6,11 +6,11 @@ class PartnerFactory { const PartnerFactory(); static Partner create({String? id, String? email, String? name, bool? inTimeline}) { - id = TestUtils.uuid(id); + final partnerId = TestUtils.uuid(id); return Partner( - id: id, - email: email ?? '$id@test.com', - name: name ?? 'user_$id', + id: partnerId, + email: email ?? '$partnerId@test.com', + name: name ?? 'user_$partnerId', inTimeline: inTimeline ?? false, hasProfileImage: false, profileChangedAt: DateTime.now(), diff --git a/mobile/test/unit/factories/remote_album_factory.dart b/mobile/test/unit/factories/remote_album_factory.dart new file mode 100644 index 0000000000..70976b4485 --- /dev/null +++ b/mobile/test/unit/factories/remote_album_factory.dart @@ -0,0 +1,38 @@ +import 'package:immich_mobile/domain/models/album/album.model.dart'; + +import '../../utils.dart'; + +class RemoteAlbumFactory { + const RemoteAlbumFactory(); + + static RemoteAlbum create({ + String? id, + String? name, + String? ownerId, + String? description, + DateTime? createdAt, + DateTime? updatedAt, + String? thumbnailAssetId, + bool isActivityEnabled = false, + AlbumAssetOrder order = AlbumAssetOrder.desc, + int assetCount = 0, + String? ownerName, + bool isShared = false, + }) { + final albumId = TestUtils.uuid(id); + return RemoteAlbum( + id: albumId, + name: name ?? 'remote_album_$albumId', + ownerId: TestUtils.uuid(ownerId), + description: description ?? '', + createdAt: TestUtils.date(createdAt), + updatedAt: TestUtils.date(updatedAt), + thumbnailAssetId: thumbnailAssetId, + isActivityEnabled: isActivityEnabled, + order: order, + assetCount: assetCount, + ownerName: ownerName ?? 'owner_$albumId', + isShared: isShared, + ); + } +} diff --git a/mobile/test/unit/factories/remote_asset_factory.dart b/mobile/test/unit/factories/remote_asset_factory.dart index 669eb3998a..2936708ab4 100644 --- a/mobile/test/unit/factories/remote_asset_factory.dart +++ b/mobile/test/unit/factories/remote_asset_factory.dart @@ -5,19 +5,33 @@ import '../../utils.dart'; class RemoteAssetFactory { const RemoteAssetFactory(); - static RemoteAsset create({String? id, String? name, String? ownerId, bool isFavorite = false}) { - id = TestUtils.uuid(id); + static RemoteAsset create({ + String? id, + String? name, + String? ownerId, + bool isFavorite = false, + AssetVisibility visibility = .timeline, + AssetType type = .image, + String? stackId, + DateTime? deletedAt, + String? localId, + }) { + final assetId = TestUtils.uuid(id); return RemoteAsset( - id: id, - name: name ?? 'remote_$id.jpg', + id: assetId, + name: name ?? 'remote_$assetId.jpg', ownerId: TestUtils.uuid(ownerId), - checksum: 'checksum-$id', - type: .image, + checksum: 'checksum-$assetId', + type: type, createdAt: TestUtils.yesterday(), updatedAt: TestUtils.now(), isFavorite: isFavorite, + visibility: visibility, + stackId: stackId, isEdited: false, + deletedAt: deletedAt, + localId: localId, ); } } diff --git a/mobile/test/unit/factories/user_factory.dart b/mobile/test/unit/factories/user_factory.dart index 248e98dc69..d3df9556ef 100644 --- a/mobile/test/unit/factories/user_factory.dart +++ b/mobile/test/unit/factories/user_factory.dart @@ -13,11 +13,11 @@ class UserFactory { bool? hasProfileImage, AvatarColor? avatarColor, }) { - id = TestUtils.uuid(id); + final userId = TestUtils.uuid(id); return User( - id: id, - name: name ?? 'user_$id', - email: email ?? '$id@test.com', + id: userId, + name: name ?? 'user_$userId', + email: email ?? '$userId@test.com', profileChangedAt: TestUtils.date(profileChangedAt), hasProfileImage: hasProfileImage ?? false, avatarColor: avatarColor ?? .primary, @@ -32,11 +32,11 @@ class UserFactory { bool? hasProfileImage, AvatarColor? avatarColor, }) { - id = TestUtils.uuid(id); + final userId = TestUtils.uuid(id); return UserDto( - id: id, - name: name ?? 'user_$id', - email: email ?? '$id@test.com', + id: userId, + name: name ?? 'user_$userId', + email: email ?? '$userId@test.com', profileChangedAt: TestUtils.date(profileChangedAt), hasProfileImage: hasProfileImage ?? false, avatarColor: avatarColor ?? .primary, diff --git a/mobile/test/unit/mocks.dart b/mobile/test/unit/mocks.dart index 49bab00704..6c41320a85 100644 --- a/mobile/test/unit/mocks.dart +++ b/mobile/test/unit/mocks.dart @@ -1,22 +1,43 @@ import 'dart:typed_data'; +import 'package:flutter/widgets.dart'; import 'package:immich_mobile/constants/enums.dart'; +import 'package:immich_mobile/domain/models/album/album.model.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/asset_edit.model.dart'; +import 'package:immich_mobile/domain/models/exif.model.dart'; +import 'package:immich_mobile/domain/models/tag.model.dart'; import 'package:immich_mobile/domain/models/user.model.dart'; +import 'package:immich_mobile/platform/native_sync_api.g.dart'; +import 'package:immich_mobile/services/foreground_upload.service.dart'; +import 'package:immich_mobile/utils/option.dart'; +import 'package:maplibre_gl/maplibre_gl.dart'; import 'package:mocktail/mocktail.dart' as mock; import 'package:mocktail/mocktail.dart'; -import '../domain/service.mock.dart'; import '../infrastructure/repository.mock.dart'; +import '../repository.mocks.dart'; +import '../service.mocks.dart'; import 'factories/local_album_factory.dart'; import 'factories/local_asset_factory.dart'; +import 'factories/remote_album_factory.dart'; import 'factories/user_factory.dart'; class RepositoryMocks { - final localAlbum = MockLocalAlbumRepository(); - final localAsset = MockDriftLocalAssetRepository(); + final localAlbum = LocalAlbumRepositoryStub(MockLocalAlbumRepository()); + final localAsset = LocalAssetRepositoryStub(MockDriftLocalAssetRepository()); + final remoteAsset = RemoteAssetRepositoryStub(MockRemoteAssetRepository()); + final remoteExif = RemoteExifRepositoryStub(MockRemoteExifRepository()); final trashedAsset = MockTrashedLocalAssetRepository(); + final remoteAlbum = MockRemoteAlbumRepository(); + final albumApi = MockDriftAlbumApiRepository(); + final permission = PermissionRepositoryStub(MockPermissionRepository()); - final nativeApi = MockNativeSyncApi(); + final nativeApi = NativeSyncApiStub(MockNativeSyncApi()); + final assetApi = AssetApiRepositoryStub(MockAssetApiRepository()); + final assetMedia = AssetMediaRepositoryStub(MockAssetMediaRepository()); + final download = DownloadRepositoryStub(MockDownloadRepository()); RepositoryMocks() { resetAll(); @@ -24,17 +45,85 @@ class RepositoryMocks { void resetAll() { _registerFallbacks(); - reset(localAlbum); - reset(localAsset); + localAlbum.reset(); + localAsset.reset(); + remoteAsset.reset(); + remoteExif.reset(); reset(trashedAsset); - reset(nativeApi); + reset(remoteAlbum); + reset(albumApi); + nativeApi.reset(); + assetApi.reset(); + assetMedia.reset(); + download.reset(); + permission.reset(); + _stubLocalAlbumRepository(); + _stubLocalAssetRepository(); + _stubRemoteAssetRepository(); + _stubRemoteExifRepository(); + _stubNativeSyncApi(); + _stubAssetApiRepository(); + _stubAssetMediaRepository(); + _stubDownloadRepository(); + _stubPermissionRepository(); + } + + void _stubRemoteAssetRepository() { + when(remoteAsset.getExif).thenAnswer((_) async => null); + when(remoteAsset.getAssetEdits).thenAnswer((_) async => const []); + when(remoteAsset.update).thenAnswer((_) async {}); + } + + void _stubRemoteExifRepository() { + when(remoteExif.update).thenAnswer((_) async {}); + } + + void _stubLocalAlbumRepository() { + when(localAlbum.getBackupAlbums).thenAnswer((_) async => []); + when(localAlbum.getAssetsToHash).thenAnswer((_) async => []); + } + + void _stubLocalAssetRepository() { + when(localAsset.reconcileHashesFromCloudId).thenAnswer((_) async => {}); + when(localAsset.updateHashes).thenAnswer((_) async => {}); + } + + void _stubNativeSyncApi() { + when(nativeApi.hashAssets).thenAnswer((_) async => []); + } + + void _stubAssetApiRepository() { + when(assetApi.update).thenAnswer((_) async => {}); + } + + void _stubAssetMediaRepository() { + when(assetMedia.shareAssets).thenAnswer((_) async => 1); + when(assetMedia.getOriginalFilename).thenAnswer((_) async => null); + } + + void _stubDownloadRepository() { + when(download.downloadAllAssets).thenAnswer((_) async => const []); + } + + void _stubPermissionRepository() { + when(permission.getStatus).thenAnswer((_) async => DevicePermissionStatus.denied); + when(permission.request).thenAnswer((_) async => DevicePermissionStatus.denied); + when(permission.getAndroidSdkVersion).thenAnswer((_) async => 34); } } class ServiceMocks { - final PartnerStub partner = PartnerStub(MockPartnerService()); - final UserStub user = UserStub(MockUserService()); - final asset = AssetStub(MockAssetService()); + final partner = PartnerServiceStub(MockPartnerService()); + final user = UserServiceStub(MockUserService()); + final asset = AssetServiceStub(MockAssetService()); + final album = RemoteAlbumServiceStub(MockRemoteAlbumService()); + final cleanup = CleanupServiceStub(MockCleanupService()); + final tag = TagServiceStub(MockTagService()); + final backgroundSync = MockBackgroundSyncManager(); + final upload = MockForegroundUploadService(); + final cast = MockGCastService(); + final serverInfo = MockServerInfoService(); + final toast = MockToastService(); ServiceMocks() { resetAll(); @@ -45,9 +134,22 @@ class ServiceMocks { partner.reset(); user.reset(); asset.reset(); + album.reset(); + cleanup.reset(); + tag.reset(); + reset(cast); + reset(serverInfo); + reset(backgroundSync); + reset(upload); + reset(toast); _stubUserService(); _stubPartnerService(); _stubAssetService(); + _stubRemoteAlbumService(); + _stubCleanupService(); + _stubTagService(); + _stubBackgroundSync(); + _stubForegroundUpload(); } void _stubUserService() { @@ -68,7 +170,44 @@ class ServiceMocks { } void _stubAssetService() { - when(asset.updateFavorite).thenAnswer((_) async {}); + when(asset.update).thenAnswer((_) async {}); + when(asset.stack).thenAnswer((_) async {}); + when(asset.unstack).thenAnswer((_) async {}); + when(asset.restoreTrash).thenAnswer((_) async {}); + when(asset.trash).thenAnswer((_) async {}); + when(asset.delete).thenAnswer((_) async {}); + when(asset.applyEdits).thenAnswer((_) async {}); + when(asset.deleteLocal).thenAnswer((_) async => 0); + } + + void _stubRemoteAlbumService() { + when(album.removeAssets).thenAnswer((_) async => 0); + when(album.updateAlbum).thenAnswer((_) async => RemoteAlbumFactory.create()); + } + + void _stubCleanupService() { + when(cleanup.deleteLocalAssets).thenAnswer((_) async => 0); + } + + void _stubTagService() { + when(tag.bulkTagAssets).thenAnswer((_) async => 0); + when(tag.upsertTags).thenAnswer((_) async => const []); + when(tag.getAllTags).thenAnswer((_) async => const {}); + } + + void _stubBackgroundSync() { + when(() => backgroundSync.syncLocal()).thenAnswer((_) async {}); + when(() => backgroundSync.hashAssets()).thenAnswer((_) async {}); + } + + void _stubForegroundUpload() { + when( + () => upload.uploadManual( + any(), + cancelToken: any(named: 'cancelToken'), + callbacks: any(named: 'callbacks'), + ), + ).thenAnswer((_) async {}); } } @@ -76,13 +215,75 @@ void _registerFallbacks() { registerFallbackValue(LocalAlbumFactory.create()); registerFallbackValue(LocalAssetFactory.create()); registerFallbackValue(Uint8List(0)); + registerFallbackValue(AssetVisibility.timeline); + registerFallbackValue(const LatLng(0, 0)); + registerFallbackValue([]); + registerFallbackValue(const Option.none()); + registerFallbackValue(const Option.none()); + registerFallbackValue(const Option.none()); + registerFallbackValue(const Option.none()); + registerFallbackValue(const Option.none()); + registerFallbackValue([]); + registerFallbackValue([]); + registerFallbackValue([]); + registerFallbackValue(ShareAssetType.original); + registerFallbackValue(const UploadCallbacks()); + registerFallbackValue(_FakeBuildContext()); + registerFallbackValue(DevicePermissionStatus.granted); + registerFallbackValue(DevicePermission.photos); } -extension type const Stub(T mockedService) { - void reset() => mock.reset(mockedService); +class _FakeBuildContext extends Fake implements BuildContext {} + +extension type const Stub(T mockedClass) { + void reset() => mock.reset(mockedClass); } -extension type const PartnerStub(MockPartnerService service) implements Stub { +extension type const LocalAlbumRepositoryStub(MockLocalAlbumRepository repo) implements Stub { + Future> Function() get getBackupAlbums => + () => repo.getBackupAlbums(); + + Future> Function() get getAssetsToHash => + () => repo.getAssetsToHash(any()); +} + +extension type const LocalAssetRepositoryStub(MockDriftLocalAssetRepository repo) + implements Stub { + Future Function() get reconcileHashesFromCloudId => + () => repo.reconcileHashesFromCloudId(); + + Future Function() get updateHashes => + () => repo.updateHashes(any()); +} + +extension type const RemoteAssetRepositoryStub(MockRemoteAssetRepository repo) + implements Stub { + Future Function() get getExif => + () => repo.getExif(any()); + + Future> Function() get getAssetEdits => + () => repo.getAssetEdits(any()); + + Future Function() get update => + () => repo.update( + any(), + isFavorite: any(named: 'isFavorite'), + visibility: any(named: 'visibility'), + createdAt: any(named: 'createdAt'), + ); +} + +extension type const RemoteExifRepositoryStub(MockRemoteExifRepository repo) implements Stub { + Future Function() get update => + () => repo.update( + any(), + dateTimeOriginal: any(named: 'dateTimeOriginal'), + timeZone: any(named: 'timeZone'), + location: any(named: 'location'), + ); +} + +extension type const PartnerServiceStub(MockPartnerService service) implements Stub { Stream> Function() get getCandidates => () => service.getCandidates(any()); @@ -110,7 +311,7 @@ extension type const PartnerStub(MockPartnerService service) implements Stub { +extension type const UserServiceStub(MockUserService service) implements Stub { UserDto Function() get getMyUser => () => service.getMyUser(); @@ -127,7 +328,107 @@ extension type const UserStub(MockUserService service) implements Stub service.createProfileImage(any(), any()); } -extension type const AssetStub(MockAssetService service) implements Stub { - Future Function() get updateFavorite => - () => service.updateFavorite(any(), any()); +extension type const AssetServiceStub(MockAssetService service) implements Stub { + Future Function() get update => + () => service.update( + any(), + isFavorite: any(named: 'isFavorite'), + visibility: any(named: 'visibility'), + dateTime: any(named: 'dateTime'), + location: any(named: 'location'), + ); + + Future Function() get stack => + () => service.stack(any(), any()); + + Future Function() get unstack => + () => service.unstack(any()); + + Future Function() get restoreTrash => + () => service.restoreTrash(any()); + + Future Function() get trash => + () => service.trash(any()); + + Future Function() get delete => + () => service.delete(any()); + + Future Function() get applyEdits => + () => service.applyEdits(any(), any()); + + Future Function() get deleteLocal => + () => service.deleteLocal(any()); +} + +extension type const RemoteAlbumServiceStub(MockRemoteAlbumService service) implements Stub { + Future Function() get removeAssets => + () => service.removeAssets( + albumId: any(named: 'albumId'), + assetIds: any(named: 'assetIds'), + ); + + Future Function() get updateAlbum => + () => service.updateAlbum(any(), thumbnailAssetId: any(named: 'thumbnailAssetId')); +} + +extension type const CleanupServiceStub(MockCleanupService service) implements Stub { + Future Function() get deleteLocalAssets => + () => service.deleteLocalAssets(any()); +} + +extension type const NativeSyncApiStub(MockNativeSyncApi api) implements Stub { + Future> Function() get hashAssets => + () => api.hashAssets(any(), allowNetworkAccess: any(named: 'allowNetworkAccess')); +} + +extension type const AssetApiRepositoryStub(MockAssetApiRepository api) implements Stub { + Future Function() get update => + () => api.update( + any(), + isFavorite: any(named: 'isFavorite'), + visibility: any(named: 'visibility'), + dateTimeOriginal: any(named: 'dateTimeOriginal'), + location: any(named: 'location'), + ); +} + +extension type const AssetMediaRepositoryStub(MockAssetMediaRepository api) implements Stub { + Future Function() get shareAssets => + () => api.shareAssets( + any(), + any(), + fileType: any(named: 'fileType'), + cancelCompleter: any(named: 'cancelCompleter'), + onAssetDownloadProgress: any(named: 'onAssetDownloadProgress'), + ); + + Future Function() get getOriginalFilename => + () => api.getOriginalFilename(any()); +} + +extension type const DownloadRepositoryStub(MockDownloadRepository repo) implements Stub { + Future> Function() get downloadAllAssets => + () => repo.downloadAllAssets(any()); +} + +extension type const PermissionRepositoryStub(MockPermissionRepository repo) implements Stub { + Future Function() get getStatus => + () => repo.getStatus(any()); + + Future Function() get request => + () => repo.request(any()); + + Future Function() get getAndroidSdkVersion => + () => repo.getAndroidSdkVersion(); +} + +extension type const TagServiceStub(MockTagService service) implements Stub { + Future Function() get bulkTagAssets => + () => service.bulkTagAssets(any(), any()); + + Future> Function() get upsertTags => + () => service.upsertTags(any()); + + Future> Function() get getAllTags => + () => service.getAllTags(); } diff --git a/mobile/test/unit/presentation/actions/album_action_test.dart b/mobile/test/unit/presentation/actions/album_action_test.dart new file mode 100644 index 0000000000..7baa14a4eb --- /dev/null +++ b/mobile/test/unit/presentation/actions/album_action_test.dart @@ -0,0 +1,127 @@ +import 'package:flutter_test/flutter_test.dart'; +import 'package:hooks_riverpod/hooks_riverpod.dart'; +import 'package:immich_mobile/domain/models/asset/base_asset.model.dart'; +import 'package:immich_mobile/generated/translations.g.dart'; +import 'package:immich_mobile/presentation/actions/action.widget.dart'; +import 'package:immich_mobile/presentation/actions/remove_from_album.action.dart'; +import 'package:immich_mobile/presentation/actions/set_album_cover.action.dart'; +import 'package:immich_mobile/providers/infrastructure/toast.provider.dart'; +import 'package:immich_ui/immich_ui.dart'; +import 'package:mocktail/mocktail.dart'; + +import '../../../service.mocks.dart'; +import '../../factories/local_asset_factory.dart'; +import '../../factories/remote_album_factory.dart'; +import '../../factories/remote_asset_factory.dart'; +import '../presentation_context.dart'; + +void main() { + const albumId = 'album-1'; + + late PresentationContext context; + late MockRemoteAlbumService albumService; + + setUp(() async { + context = await PresentationContext.create(); + albumService = context.service.album.service; + }); + + tearDown(() async { + await context.dispose(); + }); + + List withMockToast() => [toastServiceProvider.overrideWithValue(context.service.toast)]; + + group('RemoveFromAlbumAction', () { + Future pumpRemove(WidgetTester tester, Set selection) => tester.pumpTestAction( + context, + const RemoveFromAlbumAction(source: .timeline, albumId: albumId), + overrides: [...context.selected(selection), ...withMockToast()], + ); + + testWidgets('removes every selected remote asset from the album', (tester) async { + final first = RemoteAssetFactory.create(); + final second = RemoteAssetFactory.create(); + + await pumpRemove(tester, {first, second}); + await tester.pumpAndSettle(); + + verify(() => albumService.removeAssets(albumId: albumId, assetIds: [first.id, second.id])).called(1); + }); + + testWidgets('reports the count the server actually removed', (tester) async { + when( + () => albumService.removeAssets( + albumId: any(named: 'albumId'), + assetIds: any(named: 'assetIds'), + ), + ).thenAnswer((_) async => 1); + + await pumpRemove(tester, {RemoteAssetFactory.create(), RemoteAssetFactory.create()}); + await tester.pumpAndSettle(); + + final message = verify(() => context.service.toast.success(captureAny())).captured.single as String; + expect(message, StaticTranslations.instance.remove_from_album_action_prompt(count: 1)); + }); + + testWidgets('is hidden for a local-only asset', (tester) async { + await tester.pumpTestWidget( + context, + const ActionIconButton( + action: RemoveFromAlbumAction(source: .timeline, albumId: albumId), + ), + overrides: context.selected({LocalAssetFactory.create()}), + ); + + expect(find.byType(ImmichIconButton), findsNothing); + }); + }); + + group('SetAlbumCoverAction', () { + testWidgets('sets the single selected asset as the cover', (tester) async { + final asset = RemoteAssetFactory.create(); + when( + () => albumService.updateAlbum(any(), thumbnailAssetId: any(named: 'thumbnailAssetId')), + ).thenAnswer((_) async => RemoteAlbumFactory.create(id: albumId)); + + await tester.pumpTestAction( + context, + const SetAlbumCoverAction(source: .timeline, albumId: albumId), + overrides: [ + ...context.selected({asset}), + ...withMockToast(), + ], + ); + await tester.pumpAndSettle(); + + verify(() => albumService.updateAlbum(albumId, thumbnailAssetId: asset.id)).called(1); + + final message = verify(() => context.service.toast.success(captureAny())).captured.single as String; + expect(message, StaticTranslations.instance.album_cover_updated); + }); + + testWidgets('is hidden for more than one asset', (tester) async { + await tester.pumpTestWidget( + context, + const ActionIconButton( + action: SetAlbumCoverAction(source: .timeline, albumId: albumId), + ), + overrides: context.selected({RemoteAssetFactory.create(), RemoteAssetFactory.create()}), + ); + + expect(find.byType(ImmichIconButton), findsNothing); + }); + + testWidgets('is hidden for a local-only asset', (tester) async { + await tester.pumpTestWidget( + context, + const ActionIconButton( + action: SetAlbumCoverAction(source: .timeline, albumId: albumId), + ), + overrides: context.selected({LocalAssetFactory.create()}), + ); + + expect(find.byType(ImmichIconButton), findsNothing); + }); + }); +} diff --git a/mobile/test/unit/presentation/actions/archive_action_test.dart b/mobile/test/unit/presentation/actions/archive_action_test.dart new file mode 100644 index 0000000000..555d6af2ff --- /dev/null +++ b/mobile/test/unit/presentation/actions/archive_action_test.dart @@ -0,0 +1,118 @@ +import 'package:flutter_test/flutter_test.dart'; +import 'package:immich_mobile/domain/models/asset/base_asset.model.dart'; +import 'package:immich_mobile/presentation/actions/action.widget.dart'; +import 'package:immich_mobile/presentation/actions/archive.action.dart'; +import 'package:immich_mobile/providers/routes.provider.dart'; +import 'package:immich_mobile/utils/option.dart'; +import 'package:immich_ui/immich_ui.dart'; +import 'package:mocktail/mocktail.dart'; + +import '../../../service.mocks.dart'; +import '../../factories/remote_asset_factory.dart'; +import '../presentation_context.dart'; + +void main() { + late PresentationContext context; + late MockAssetService assetService; + + setUp(() async { + context = await PresentationContext.create(); + assetService = context.service.asset.service; + }); + + tearDown(() async { + await context.dispose(); + }); + + RemoteAsset owned({AssetVisibility visibility = .timeline}) => + RemoteAssetFactory.create(ownerId: context.currentUser.id, visibility: visibility); + + Future pumpArchive(WidgetTester tester, Set selection) => + tester.pumpTestAction(context, const ArchiveAction(source: .timeline), overrides: context.selected(selection)); + + group('ArchiveAction', () { + testWidgets('archives the eligible owned assets', (tester) async { + final asset = owned(); + + await pumpArchive(tester, {asset}); + + verify(() => assetService.update([asset.id], visibility: const Option.some(AssetVisibility.archive))).called(1); + }); + + testWidgets('unarchive the eligible owned assets', (tester) async { + final asset = owned(visibility: .archive); + + await pumpArchive(tester, {asset}); + + verify(() => assetService.update([asset.id], visibility: const .some(.timeline))).called(1); + }); + + testWidgets('prioritizes archive when mixed state', (tester) async { + final onTimeline = owned(); + final archived = owned(visibility: .archive); + + await pumpArchive(tester, {onTimeline, archived}); + + verify(() => assetService.update([onTimeline.id], visibility: const .some(.archive))).called(1); + verifyNever(() => assetService.update(any(), visibility: const .some(.timeline))); + }); + + testWidgets('ignores assets owned by someone else', (tester) async { + final mine = owned(); + final theirs = RemoteAssetFactory.create(); + + await pumpArchive(tester, {mine, theirs}); + + verify(() => assetService.update([mine.id], visibility: const .some(.archive))).called(1); + }); + + testWidgets('skips owned assets already in the target state', (tester) async { + final stale = owned(); + final alreadyArchived = owned(visibility: .archive); + + await pumpArchive(tester, {stale, alreadyArchived}); + + verify(() => assetService.update([stale.id], visibility: const .some(.archive))).called(1); + }); + + testWidgets('clears the selection once the update succeeds', (tester) async { + await pumpArchive(tester, {owned()}); + await tester.pumpAndSettle(); + + expect(find.byType(ImmichIconButton), findsNothing, reason: 'an empty selection hides the action'); + }); + + testWidgets('is hidden for locked assets, which belong to neither direction', (tester) async { + await tester.pumpTestWidget( + context, + const ActionIconButton(action: ArchiveAction(source: .timeline)), + overrides: context.selected({owned(visibility: .locked)}), + ); + + expect(find.byType(ImmichIconButton), findsNothing); + }); + + testWidgets('is hidden inside the locked folder view', (tester) async { + await tester.pumpTestWidget( + context, + const ActionIconButton(action: ArchiveAction(source: .timeline)), + overrides: [ + ...context.selected({owned()}), + inLockedViewProvider.overrideWithValue(true), + ], + ); + + expect(find.byType(ImmichIconButton), findsNothing); + }); + + testWidgets('is hidden when none of the selected assets are owned', (tester) async { + await tester.pumpTestWidget( + context, + const ActionIconButton(action: ArchiveAction(source: .timeline)), + overrides: context.selected({RemoteAssetFactory.create()}), + ); + + expect(find.byType(ImmichIconButton), findsNothing); + }); + }); +} diff --git a/mobile/test/unit/presentation/actions/asset_debug_action_test.dart b/mobile/test/unit/presentation/actions/asset_debug_action_test.dart index b720c8720e..f545075809 100644 --- a/mobile/test/unit/presentation/actions/asset_debug_action_test.dart +++ b/mobile/test/unit/presentation/actions/asset_debug_action_test.dart @@ -6,7 +6,7 @@ import 'package:immich_mobile/presentation/actions/asset_debug.action.dart'; import 'package:immich_ui/immich_ui.dart'; import '../../factories/remote_asset_factory.dart'; -import '../../presentation_context.dart'; +import '../presentation_context.dart'; void main() { late PresentationContext context; @@ -16,15 +16,16 @@ void main() { await StoreService.I.put(StoreKey.advancedTroubleshooting, true); }); - tearDown(() { - context.dispose(); + tearDown(() async { + await context.dispose(); }); group('AssetDebugAction', () { testWidgets('visible for a single asset when advanced troubleshooting is on', (tester) async { await tester.pumpTestWidget( - ActionIconButtonWidget(action: AssetDebugAction(assets: [RemoteAssetFactory.create()])), - overrides: context.overrides, + context, + const ActionIconButton(action: AssetDebugAction(source: .timeline)), + overrides: context.selected({RemoteAssetFactory.create()}), ); expect(find.byType(ImmichIconButton), findsOneWidget); @@ -32,10 +33,9 @@ void main() { testWidgets('hidden for multiple assets', (tester) async { await tester.pumpTestWidget( - ActionIconButtonWidget( - action: AssetDebugAction(assets: [RemoteAssetFactory.create(), RemoteAssetFactory.create()]), - ), - overrides: context.overrides, + context, + const ActionIconButton(action: AssetDebugAction(source: .timeline)), + overrides: context.selected({RemoteAssetFactory.create(), RemoteAssetFactory.create()}), ); expect(find.byType(ImmichIconButton), findsNothing); @@ -43,9 +43,11 @@ void main() { testWidgets('hidden when advanced troubleshooting is off', (tester) async { await StoreService.I.put(StoreKey.advancedTroubleshooting, false); + await tester.pumpTestWidget( - ActionIconButtonWidget(action: AssetDebugAction(assets: [RemoteAssetFactory.create()])), - overrides: context.overrides, + context, + const ActionIconButton(action: AssetDebugAction(source: .timeline)), + overrides: context.selected({RemoteAssetFactory.create()}), ); expect(find.byType(ImmichIconButton), findsNothing); diff --git a/mobile/test/unit/presentation/actions/cast_action_test.dart b/mobile/test/unit/presentation/actions/cast_action_test.dart new file mode 100644 index 0000000000..7c16ea398e --- /dev/null +++ b/mobile/test/unit/presentation/actions/cast_action_test.dart @@ -0,0 +1,52 @@ +import 'package:flutter/material.dart'; +import 'package:flutter_test/flutter_test.dart'; +import 'package:immich_mobile/presentation/actions/action.widget.dart'; +import 'package:immich_mobile/presentation/actions/cast.action.dart'; +import 'package:mocktail/mocktail.dart'; + +import '../presentation_context.dart'; + +void main() { + late PresentationContext context; + + setUp(() async { + context = await PresentationContext.create(); + }); + + tearDown(() async { + await context.dispose(); + }); + + void Function(bool) captureConnectionListener() => + verify(() => context.service.cast.onConnectionState = captureAny()).captured.single as void Function(bool); + + group('CastAction', () { + testWidgets('offers to cast when nothing is connected', (tester) async { + await tester.pumpTestWidget(context, const ActionIconButton(action: CastAction())); + + expect(find.byIcon(Icons.cast_rounded), findsOneWidget); + }); + + testWidgets('switches to the connected icon once casting starts', (tester) async { + await tester.pumpTestWidget(context, const ActionIconButton(action: CastAction())); + + captureConnectionListener()(true); + await tester.pump(); + + expect(find.byIcon(Icons.cast_connected_rounded), findsOneWidget); + expect(find.byIcon(Icons.cast_rounded), findsNothing); + }); + + testWidgets('switches back when casting stops', (tester) async { + await tester.pumpTestWidget(context, const ActionIconButton(action: CastAction())); + + final onConnectionState = captureConnectionListener(); + onConnectionState(true); + await tester.pump(); + onConnectionState(false); + await tester.pump(); + + expect(find.byIcon(Icons.cast_rounded), findsOneWidget); + }); + }); +} diff --git a/mobile/test/unit/presentation/actions/delete_action_test.dart b/mobile/test/unit/presentation/actions/delete_action_test.dart new file mode 100644 index 0000000000..4c1bf9306c --- /dev/null +++ b/mobile/test/unit/presentation/actions/delete_action_test.dart @@ -0,0 +1,268 @@ +import 'package:flutter/foundation.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_test/flutter_test.dart'; +import 'package:hooks_riverpod/hooks_riverpod.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/store.service.dart'; +import 'package:immich_mobile/generated/translations.g.dart'; +import 'package:immich_mobile/presentation/actions/action.widget.dart'; +import 'package:immich_mobile/presentation/actions/delete.action.dart'; +import 'package:immich_mobile/providers/server_info.provider.dart'; +import 'package:immich_mobile/widgets/common/confirm_dialog.dart'; +import 'package:immich_ui/immich_ui.dart'; +import 'package:mocktail/mocktail.dart'; + +import '../../../service.mocks.dart'; +import '../../factories/local_asset_factory.dart'; +import '../../factories/remote_asset_factory.dart'; +import '../presentation_context.dart'; + +void main() { + late PresentationContext context; + late MockAssetService assetService; + late MockCleanupService cleanupService; + + setUp(() async { + context = await PresentationContext.create(); + assetService = context.service.asset.service; + cleanupService = context.service.cleanup.service; + }); + + tearDown(() async { + debugDefaultTargetPlatformOverride = null; + await StoreService.I.put(StoreKey.manageLocalMediaAndroid, false); + await context.dispose(); + }); + + RemoteAsset owned({AssetVisibility visibility = .timeline, DateTime? deletedAt, String? localId}) => + RemoteAssetFactory.create( + ownerId: context.currentUser.id, + visibility: visibility, + deletedAt: deletedAt, + localId: localId, + ); + + Future pumpDelete(WidgetTester tester, Set selection, {bool trashEnabled = true}) async { + if (!trashEnabled) { + when( + () => context.service.serverInfo.getServerFeatures(), + ).thenAnswer((_) async => const .new(trash: false, map: true, oauthEnabled: false, passwordLogin: true)); + } + + await tester.pumpTestWidget( + context, + const ActionIconButton(action: DeleteAction(source: .timeline)), + overrides: context.selected(selection), + ); + + if (!trashEnabled) { + final scope = ProviderScope.containerOf(tester.element(find.byType(ActionIconButton)), listen: false); + await scope.read(serverInfoProvider.notifier).getServerFeatures(); + await tester.pumpAndSettle(); + } + + await tester.tap(find.byType(ImmichIconButton)); + await tester.pump(); + } + + Future respondToDialog(WidgetTester tester, {required bool confirm}) async { + await tester.pump(const Duration(milliseconds: 300)); + expect(find.byType(ConfirmDialog), findsOneWidget); + await tester.tap(find.byType(TextButton).at(confirm ? 1 : 0)); // [cancel, ok] + await tester.pumpAndSettle(); + } + + group('DeleteAction', () { + group('trash', () { + testWidgets('trashes a remote-only owned asset', (tester) async { + final asset = owned(); + + await pumpDelete(tester, {asset}); + await tester.pumpAndSettle(); + + verify(() => assetService.trash([asset.id])).called(1); + verifyNever(() => assetService.delete(any())); + verifyNever(() => cleanupService.deleteLocalAssets(any())); + }); + + testWidgets('ignores assets owned by someone else', (tester) async { + final mine = owned(); + final theirs = RemoteAssetFactory.create(); + + await pumpDelete(tester, {mine, theirs}); + await tester.pumpAndSettle(); + + verify(() => assetService.trash([mine.id])).called(1); + }); + + testWidgets('trashes a merged asset and removes its device copy', (tester) async { + final asset = owned(localId: 'local'); + + await pumpDelete(tester, {asset}); + await tester.pumpAndSettle(); + + verify(() => cleanupService.deleteLocalAssets(['local'])).called(1); + verify(() => assetService.trash([asset.id])).called(1); + }); + }); + + group('permanent', () { + testWidgets('permanently deletes when the trash feature is disabled', (tester) async { + final asset = owned(); + + await pumpDelete(tester, {asset}, trashEnabled: false); + await respondToDialog(tester, confirm: true); + + verify(() => assetService.delete([asset.id])).called(1); + verifyNever(() => assetService.trash(any())); + }); + + testWidgets('permanently deletes a merged asset and removes its device copy', (tester) async { + final asset = owned(localId: 'local'); + + await pumpDelete(tester, {asset}, trashEnabled: false); + await respondToDialog(tester, confirm: true); + + verify(() => assetService.delete([asset.id])).called(1); + verify(() => cleanupService.deleteLocalAssets(['local'])).called(1); + }); + + testWidgets('permanently deletes already trashed assets even with trash enabled', (tester) async { + final asset = owned(deletedAt: DateTime(2024)); + + await pumpDelete(tester, {asset}); + await respondToDialog(tester, confirm: true); + + verify(() => assetService.delete([asset.id])).called(1); + verifyNever(() => assetService.trash(any())); + }); + + testWidgets('permanently deletes locked folder assets even with trash enabled', (tester) async { + final asset = owned(visibility: .locked, localId: 'local'); + + await pumpDelete(tester, {asset}); + await respondToDialog(tester, confirm: true); + + verify(() => assetService.delete([asset.id])).called(1); + verify(() => cleanupService.deleteLocalAssets(['local'])).called(1); + }); + + testWidgets('does nothing when the confirmation is cancelled', (tester) async { + final asset = owned(visibility: .locked, localId: 'local'); + + await pumpDelete(tester, {asset}); + await respondToDialog(tester, confirm: false); + + verifyNever(() => assetService.delete(any())); + verifyNever(() => cleanupService.deleteLocalAssets(any())); + }); + }); + + group('local only', () { + testWidgets('removes the device copy with no remote call', (tester) async { + final asset = LocalAssetFactory.create(); + + await pumpDelete(tester, {asset}); + await tester.pumpAndSettle(); + + verify(() => cleanupService.deleteLocalAssets([asset.id])).called(1); + verifyNever(() => assetService.trash(any())); + verifyNever(() => assetService.delete(any())); + }); + + testWidgets('is labelled trash', (tester) async { + await tester.pumpTestWidget( + context, + const ActionButton(action: DeleteAction(source: .timeline)), + overrides: context.selected({LocalAssetFactory.create()}), + ); + + expect(find.text(StaticTranslations.instance.trash), findsOneWidget); + expect(find.text(StaticTranslations.instance.delete), findsNothing); + }); + }); + + group('prompt handling', () { + testWidgets('permanent delete shows a single app dialog', (tester) async { + final asset = owned(localId: 'local'); + + await pumpDelete(tester, {asset}, trashEnabled: false); + await tester.pump(const Duration(milliseconds: 300)); + + expect(find.text(StaticTranslations.instance.delete_dialog_title), findsOneWidget); + await tester.tap(find.byType(TextButton).at(1)); + await tester.pumpAndSettle(); + + expect(find.text(StaticTranslations.instance.move_to_device_trash), findsNothing); + verify(() => assetService.delete([asset.id])).called(1); + verify(() => cleanupService.deleteLocalAssets(['local'])).called(1); + }); + + testWidgets('local only delete on Android with MANAGE_MEDIA shows the prompt', (tester) async { + debugDefaultTargetPlatformOverride = TargetPlatform.android; + await StoreService.I.put(StoreKey.manageLocalMediaAndroid, true); + final asset = LocalAssetFactory.create(); + + await pumpDelete(tester, {asset}); + await tester.pump(const Duration(milliseconds: 300)); + + expect(find.text(StaticTranslations.instance.move_to_device_trash), findsOneWidget); + await tester.tap(find.byType(TextButton).at(1)); // confirm + await tester.pumpAndSettle(); + + verify(() => cleanupService.deleteLocalAssets([asset.id])).called(1); + // Has to be cleared inside the body; the framework asserts on it before tearDown runs. + debugDefaultTargetPlatformOverride = null; + }); + + testWidgets('local only delete on Android with MANAGE_MEDIA deletes nothing when cancelled', (tester) async { + debugDefaultTargetPlatformOverride = TargetPlatform.android; + await StoreService.I.put(StoreKey.manageLocalMediaAndroid, true); + final asset = LocalAssetFactory.create(); + + await pumpDelete(tester, {asset}); + await respondToDialog(tester, confirm: false); + + verifyNever(() => cleanupService.deleteLocalAssets(any())); + debugDefaultTargetPlatformOverride = null; + }); + }); + + testWidgets('is hidden when nothing can be deleted', (tester) async { + await tester.pumpTestWidget( + context, + const ActionIconButton(action: DeleteAction(source: .timeline)), + overrides: context.selected({RemoteAssetFactory.create()}), + ); + + expect(find.byType(ImmichIconButton), findsNothing); + }); + }); + + group('CleanupLocalAction', () { + testWidgets('deletes only backed up device copies', (tester) async { + final backedUp = LocalAssetFactory.create(remoteId: 'remote'); + final localOnly = LocalAssetFactory.create(); + + await tester.pumpTestAction( + context, + const CleanupLocalAction(source: .timeline), + overrides: context.selected({backedUp, localOnly}), + ); + await tester.pumpAndSettle(); + + verify(() => cleanupService.deleteLocalAssets([backedUp.id])).called(1); + }); + + testWidgets('is hidden when no backed up assets are selected', (tester) async { + await tester.pumpTestWidget( + context, + const ActionIconButton(action: CleanupLocalAction(source: .timeline)), + overrides: context.selected({LocalAssetFactory.create()}), + ); + + expect(find.byType(ImmichIconButton), findsNothing); + }); + }); +} diff --git a/mobile/test/unit/presentation/actions/download_tag_action_test.dart b/mobile/test/unit/presentation/actions/download_tag_action_test.dart new file mode 100644 index 0000000000..de003ffed5 --- /dev/null +++ b/mobile/test/unit/presentation/actions/download_tag_action_test.dart @@ -0,0 +1,159 @@ +import 'package:flutter/material.dart'; +import 'package:flutter_test/flutter_test.dart'; +import 'package:hooks_riverpod/hooks_riverpod.dart'; +import 'package:immich_mobile/domain/models/asset/base_asset.model.dart'; +import 'package:immich_mobile/domain/models/tag.model.dart'; +import 'package:immich_mobile/domain/services/tag.service.dart'; +import 'package:immich_mobile/generated/translations.g.dart'; +import 'package:immich_mobile/presentation/actions/action.widget.dart'; +import 'package:immich_mobile/presentation/actions/download.action.dart'; +import 'package:immich_mobile/presentation/actions/tag.action.dart'; +import 'package:immich_mobile/providers/background_sync.provider.dart'; +import 'package:immich_mobile/providers/infrastructure/toast.provider.dart'; +import 'package:immich_mobile/providers/infrastructure/user_metadata.provider.dart'; +import 'package:immich_mobile/repositories/download.repository.dart'; +import 'package:immich_ui/immich_ui.dart'; +import 'package:mocktail/mocktail.dart'; + +import '../../../repository.mocks.dart'; +import '../../factories/local_asset_factory.dart'; +import '../../factories/remote_asset_factory.dart'; +import '../presentation_context.dart'; + +void main() { + late PresentationContext context; + late MockTagService tagService; + + setUp(() async { + context = await PresentationContext.create(); + tagService = context.service.tag.service; + }); + + tearDown(() async { + await context.dispose(); + }); + + RemoteAsset owned() => RemoteAssetFactory.create(ownerId: context.currentUser.id); + + group('DownloadAction', () { + Future pumpDownload(WidgetTester tester, Set selection) => tester.pumpTestAction( + context, + const DownloadAction(source: .timeline), + overrides: [ + ...context.selected(selection), + downloadRepositoryProvider.overrideWithValue(context.repository.download.repo), + backgroundSyncProvider.overrideWithValue(context.service.backgroundSync), + ], + ); + + Future settleDownload(WidgetTester tester) async { + await tester.pump(); + await tester.pump(const .new(seconds: 1)); + await tester.pumpAndSettle(); + } + + testWidgets('downloads every selected remote asset', (tester) async { + final asset = owned(); + + await pumpDownload(tester, {asset}); + await settleDownload(tester); + + verify(() => context.repository.download.repo.downloadAllAssets([asset])).called(1); + }); + + testWidgets('ignores local-only assets, which are already on the device', (tester) async { + final remote = owned(); + + await pumpDownload(tester, {remote, LocalAssetFactory.create()}); + await settleDownload(tester); + + verify(() => context.repository.download.repo.downloadAllAssets([remote])).called(1); + }); + + testWidgets('is hidden when nothing remote is selected', (tester) async { + await tester.pumpTestWidget( + context, + const ActionIconButton(action: DownloadAction(source: .timeline)), + overrides: context.selected({LocalAssetFactory.create()}), + ); + + expect(find.byType(ImmichIconButton), findsNothing); + }); + }); + + group('TagAction', () { + late BuildContext actionContext; + late WidgetRef actionRef; + + Future pumpTag(WidgetTester tester, Set selection) => tester.pumpTestWidget( + context, + Consumer( + builder: (widgetContext, ref, _) { + actionContext = widgetContext; + actionRef = ref; + return const ActionIconButton(action: TagAction(source: .timeline)); + }, + ), + overrides: [ + ...context.selected(selection), + toastServiceProvider.overrideWithValue(context.service.toast), + tagServiceProvider.overrideWithValue(tagService), + userMetadataPreferencesProvider.overrideWith((ref) async => const .new(tagsEnabled: true)), + ], + ); + + Future applyTags(List assetIds, {Set selected = const {}, Set created = const {}}) => + tagAssets(actionContext, actionRef, assetIds, selected: selected, created: created); + + testWidgets('offers tagging for an owned asset', (tester) async { + await pumpTag(tester, {owned()}); + + expect(find.byType(ImmichIconButton), findsOneWidget); + }); + + testWidgets('is hidden without any owned asset', (tester) async { + await pumpTag(tester, {RemoteAssetFactory.create()}); + + expect(find.byType(ImmichIconButton), findsNothing); + }); + + testWidgets('applies the picked tags and reports the count', (tester) async { + final asset = owned(); + when(() => tagService.bulkTagAssets(any(), any())).thenAnswer((_) async => 1); + + await pumpTag(tester, {asset}); + await applyTags([asset.id], selected: {'tag-1'}); + await tester.pumpAndSettle(); + + verify(() => tagService.bulkTagAssets([asset.id], ['tag-1'])).called(1); + + final message = verify(() => context.service.toast.success(captureAny())).captured.single as String; + expect(message, StaticTranslations.instance.tagged_assets(count: 1)); + }); + + testWidgets('creates new tags first and applies them alongside the picked ones', (tester) async { + final asset = owned(); + when(() => tagService.upsertTags(any())).thenAnswer((_) async => [const Tag(id: 'made-1', value: 'brand new')]); + when(() => tagService.bulkTagAssets(any(), any())).thenAnswer((_) async => 1); + + await pumpTag(tester, {asset}); + await applyTags([asset.id], selected: {'tag-1'}, created: {'brand new'}); + await tester.pumpAndSettle(); + + verify(() => tagService.upsertTags(['brand new'])).called(1); + final tagIds = verify(() => tagService.bulkTagAssets([asset.id], captureAny())).captured.single as List; + expect(tagIds, containsAll(['tag-1', 'made-1'])); + }); + + testWidgets('does nothing when no tag was chosen or created', (tester) async { + final asset = owned(); + + await pumpTag(tester, {asset}); + await applyTags([asset.id]); + await tester.pumpAndSettle(); + + verifyNever(() => tagService.bulkTagAssets(any(), any())); + verifyNever(() => context.service.toast.success(any())); + }); + }); +} diff --git a/mobile/test/unit/presentation/actions/edit_action_test.dart b/mobile/test/unit/presentation/actions/edit_action_test.dart new file mode 100644 index 0000000000..9e8dcfb4b2 --- /dev/null +++ b/mobile/test/unit/presentation/actions/edit_action_test.dart @@ -0,0 +1,172 @@ +import 'package:flutter/material.dart'; +import 'package:flutter_test/flutter_test.dart'; +import 'package:hooks_riverpod/hooks_riverpod.dart'; +import 'package:immich_mobile/domain/models/asset/base_asset.model.dart'; +import 'package:immich_mobile/models/server_info/server_version.model.dart'; +import 'package:immich_mobile/presentation/actions/action.dart'; +import 'package:immich_mobile/presentation/actions/action.widget.dart'; +import 'package:immich_mobile/presentation/actions/edit_asset.action.dart'; +import 'package:immich_mobile/presentation/actions/edit_datetime.action.dart'; +import 'package:immich_mobile/presentation/actions/edit_location.action.dart'; +import 'package:immich_mobile/providers/server_info.provider.dart'; +import 'package:immich_mobile/utils/option.dart'; +import 'package:immich_ui/immich_ui.dart'; +import 'package:maplibre_gl/maplibre_gl.dart'; +import 'package:mocktail/mocktail.dart'; + +import '../../../riverpod_mocks.dart'; +import '../../../service.mocks.dart'; +import '../../factories/remote_asset_factory.dart'; +import '../presentation_context.dart'; + +void main() { + late PresentationContext context; + late MockAssetService assetService; + + setUp(() async { + context = await PresentationContext.create(); + assetService = context.service.asset.service; + }); + + tearDown(() async { + await context.dispose(); + }); + + RemoteAsset owned({AssetType type = .image}) => + RemoteAssetFactory.create(ownerId: context.currentUser.id, type: type); + + const supportedVersion = ServerVersion(major: 2, minor: 6, patch: 0); + + List reportedVersion(ServerVersion version) => [ + serverInfoProvider.overrideWith((ref) => StubServerInfoNotifier(context.service.serverInfo, version: version)), + ]; + + late BuildContext actionContext; + late WidgetRef actionRef; + + Future pumpAction( + WidgetTester tester, + ActionBuilder action, + Set selection, { + List overrides = const [], + }) => tester.pumpTestWidget( + context, + Consumer( + builder: (widgetContext, ref, _) { + actionContext = widgetContext; + actionRef = ref; + return ActionIconButton(action: action); + }, + ), + overrides: [...context.selected(selection), ...overrides], + ); + + group('EditAssetAction', () { + Future pumpEditAsset( + WidgetTester tester, + Set selection, { + ServerVersion version = supportedVersion, + }) => pumpAction( + tester, + const EditAssetAction(source: .timeline), + selection, + overrides: [...reportedVersion(version)], + ); + + testWidgets('offers to edit a single owned editable asset', (tester) async { + await pumpEditAsset(tester, {owned()}); + + expect(find.byType(ImmichIconButton), findsOneWidget); + }); + + testWidgets('is hidden when the server predates edit sync', (tester) async { + await pumpEditAsset(tester, {owned()}, version: const ServerVersion(major: 2, minor: 5, patch: 9)); + + expect(find.byType(ImmichIconButton), findsNothing); + }); + + testWidgets('is hidden for more than one asset', (tester) async { + await pumpEditAsset(tester, {owned(), owned()}); + + expect(find.byType(ImmichIconButton), findsNothing); + }); + + testWidgets('is hidden for an asset owned by someone else', (tester) async { + await pumpEditAsset(tester, {RemoteAssetFactory.create()}); + + expect(find.byType(ImmichIconButton), findsNothing); + }); + + testWidgets('is hidden for a non-editable asset', (tester) async { + await pumpEditAsset(tester, {owned(type: .video)}); + + expect(find.byType(ImmichIconButton), findsNothing); + }); + + testWidgets('reads the edits and exif for the asset it is about to open', (tester) async { + final asset = owned(); + + await pumpEditAsset(tester, {asset}); + await tester.tap(find.byType(ImmichIconButton)); + await tester.pump(); + + verify(() => context.repository.remoteAsset.repo.getAssetEdits(asset.id)).called(1); + verify(() => context.repository.remoteAsset.repo.getExif(asset.id)).called(1); + }); + }); + + group('EditLocationAction', () { + testWidgets('offers to edit an owned remote asset', (tester) async { + await pumpAction(tester, const EditLocationAction(source: .timeline), {owned()}); + + expect(find.byType(ImmichIconButton), findsOneWidget); + }); + + testWidgets('is hidden without any owned remote asset', (tester) async { + await pumpAction(tester, const EditLocationAction(source: .timeline), {RemoteAssetFactory.create()}); + + expect(find.byType(ImmichIconButton), findsNothing); + }); + + testWidgets('saves the location against every owned asset and toasts the count', (tester) async { + final mine = owned(); + final theirs = RemoteAssetFactory.create(); + + await pumpAction(tester, const EditLocationAction(source: .timeline), {mine, theirs}); + await saveLocation(actionContext, actionRef, [mine.id], const LatLng(1, 2)); + await tester.pumpAndSettle(); + + final location = + verify(() => assetService.update([mine.id], location: captureAny(named: 'location'))).captured.single + as Option; + expect(location.unwrapOrNull?.latitude, 1); + expect(location.unwrapOrNull?.longitude, 2); + }); + }); + + group('EditDateTimeAction', () { + testWidgets('offers to edit an owned remote asset', (tester) async { + await pumpAction(tester, const EditDateTimeAction(source: .timeline), {owned()}); + + expect(find.byType(ImmichIconButton), findsOneWidget); + }); + + testWidgets('is hidden without any owned remote asset', (tester) async { + await pumpAction(tester, const EditDateTimeAction(source: .timeline), {RemoteAssetFactory.create()}); + + expect(find.byType(ImmichIconButton), findsNothing); + }); + + testWidgets('saves the date against every owned asset and toasts the count', (tester) async { + const picked = '2026-06-10T19:15:00.000+06:00'; + final mine = owned(); + final theirs = RemoteAssetFactory.create(); + + await pumpAction(tester, const EditDateTimeAction(source: .timeline), {mine, theirs}); + await saveDateTime(actionContext, actionRef, [mine.id], picked); + await tester.pumpAndSettle(); + + verify(() => assetService.update([mine.id], dateTime: const Some(picked))).called(1); + }); + }); +} diff --git a/mobile/test/unit/presentation/actions/favorite_action_test.dart b/mobile/test/unit/presentation/actions/favorite_action_test.dart index cc8a2fc66c..4d61965b1f 100644 --- a/mobile/test/unit/presentation/actions/favorite_action_test.dart +++ b/mobile/test/unit/presentation/actions/favorite_action_test.dart @@ -1,82 +1,92 @@ import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; -import 'package:hooks_riverpod/hooks_riverpod.dart'; import 'package:immich_mobile/domain/models/asset/base_asset.model.dart'; +import 'package:immich_mobile/presentation/actions/action.widget.dart'; import 'package:immich_mobile/presentation/actions/favorite.action.dart'; -import 'package:immich_mobile/providers/infrastructure/asset.provider.dart'; +import 'package:immich_mobile/utils/option.dart'; +import 'package:immich_ui/immich_ui.dart'; import 'package:mocktail/mocktail.dart'; +import '../../../service.mocks.dart'; import '../../factories/remote_asset_factory.dart'; -import '../../presentation_context.dart'; +import '../presentation_context.dart'; void main() { late PresentationContext context; + late MockAssetService assetService; setUp(() async { context = await PresentationContext.create(); + assetService = context.service.asset.service; }); - tearDown(() { - context.dispose(); + tearDown(() async { + await context.dispose(); }); - List overrides() => [ - ...context.overrides, - assetServiceProvider.overrideWithValue(context.mocks.asset.service), - ]; - RemoteAsset owned({bool isFavorite = false}) => RemoteAssetFactory.create(ownerId: context.currentUser.id, isFavorite: isFavorite); + Future pumpFavorite(WidgetTester tester, Set selection) => + tester.pumpTestAction(context, const FavoriteAction(source: .timeline), overrides: context.selected(selection)); + group('FavoriteAction', () { testWidgets('favorites the eligible owned assets', (tester) async { final asset = owned(); - await tester.pumpTestAction(FavoriteAction(assets: [asset]), overrides: overrides()); + await pumpFavorite(tester, {asset}); - verify(() => context.mocks.asset.service.updateFavorite([asset.id], true)).called(1); + verify(() => assetService.update([asset.id], isFavorite: const Option.some(true))).called(1); }); testWidgets('unfavorite the eligible owned assets', (tester) async { final asset = owned(isFavorite: true); - await tester.pumpTestAction(FavoriteAction(assets: [asset]), overrides: overrides()); + await pumpFavorite(tester, {asset}); - verify(() => context.mocks.asset.service.updateFavorite([asset.id], false)).called(1); + verify(() => assetService.update([asset.id], isFavorite: const Option.some(false))).called(1); }); testWidgets('ignores assets owned by someone else', (tester) async { final mine = owned(); final theirs = RemoteAssetFactory.create(); - await tester.pumpTestAction(FavoriteAction(assets: [mine, theirs]), overrides: overrides()); + await pumpFavorite(tester, {mine, theirs}); - verify(() => context.mocks.asset.service.updateFavorite([mine.id], true)).called(1); - }); - - testWidgets('batches every eligible owned asset into a single call', (tester) async { - final first = owned(); - final second = owned(); - - await tester.pumpTestAction(FavoriteAction(assets: [first, second]), overrides: overrides()); - - verify(() => context.mocks.asset.service.updateFavorite([first.id, second.id], true)).called(1); + verify(() => assetService.update([mine.id], isFavorite: const Option.some(true))).called(1); }); testWidgets('skips owned assets already in the target state', (tester) async { final stale = owned(); final alreadyFavorite = owned(isFavorite: true); - await tester.pumpTestAction(FavoriteAction(assets: [stale, alreadyFavorite]), overrides: overrides()); + await pumpFavorite(tester, {stale, alreadyFavorite}); - verify(() => context.mocks.asset.service.updateFavorite([stale.id], true)).called(1); + verify(() => assetService.update([stale.id], isFavorite: const Option.some(true))).called(1); }); testWidgets('shows a confirmation snackbar on success', (tester) async { - await tester.pumpTestAction(FavoriteAction(assets: [owned()]), overrides: overrides()); + await pumpFavorite(tester, {owned()}); await tester.pumpUntilFound(find.byType(SnackBar)); expect(find.byType(SnackBar), findsOneWidget); }); + + testWidgets('clears the selection once the update succeeds', (tester) async { + await pumpFavorite(tester, {owned()}); + await tester.pumpAndSettle(); + + expect(find.byType(ImmichIconButton), findsNothing, reason: 'an empty selection hides the action'); + }); + + testWidgets('is hidden when none of the selected assets are owned', (tester) async { + await tester.pumpTestWidget( + context, + const ActionIconButton(action: FavoriteAction(source: .timeline)), + overrides: context.selected({RemoteAssetFactory.create()}), + ); + + expect(find.byType(ImmichIconButton), findsNothing); + }); }); } diff --git a/mobile/test/unit/presentation/actions/lock_action_test.dart b/mobile/test/unit/presentation/actions/lock_action_test.dart new file mode 100644 index 0000000000..9bad0f5a43 --- /dev/null +++ b/mobile/test/unit/presentation/actions/lock_action_test.dart @@ -0,0 +1,114 @@ +import 'package:flutter_test/flutter_test.dart'; +import 'package:immich_mobile/domain/models/asset/base_asset.model.dart'; +import 'package:immich_mobile/presentation/actions/action.widget.dart'; +import 'package:immich_mobile/presentation/actions/lock.action.dart'; +import 'package:immich_ui/immich_ui.dart'; +import 'package:mocktail/mocktail.dart'; + +import '../../../service.mocks.dart'; +import '../../factories/remote_asset_factory.dart'; +import '../presentation_context.dart'; + +void main() { + late PresentationContext context; + late MockAssetService assetService; + + setUp(() async { + context = await PresentationContext.create(); + assetService = context.service.asset.service; + }); + + tearDown(() async { + await context.dispose(); + }); + + RemoteAsset owned({AssetVisibility visibility = .timeline}) => + RemoteAssetFactory.create(ownerId: context.currentUser.id, visibility: visibility); + + Future pumpLock(WidgetTester tester, Set selection) => + tester.pumpTestAction(context, const LockAction(source: .timeline), overrides: context.selected(selection)); + + group('LockAction', () { + testWidgets('locks the eligible owned assets', (tester) async { + final asset = owned(); + + await pumpLock(tester, {asset}); + + verify(() => assetService.update([asset.id], visibility: const .some(.locked))).called(1); + }); + + testWidgets('unlocks the eligible owned assets', (tester) async { + final asset = owned(visibility: .locked); + + await pumpLock(tester, {asset}); + + verify(() => assetService.update([asset.id], visibility: const .some(.timeline))).called(1); + }); + + testWidgets('prioritizes lock when mixed state', (tester) async { + final unlocked = owned(); + final locked = owned(visibility: .locked); + + await pumpLock(tester, {unlocked, locked}); + + verify(() => assetService.update([unlocked.id], visibility: const .some(.locked))).called(1); + verifyNever(() => assetService.update(any(), visibility: const .some(.timeline))); + }); + + testWidgets('ignores assets owned by someone else', (tester) async { + final mine = owned(); + final theirs = RemoteAssetFactory.create(); + + await pumpLock(tester, {mine, theirs}); + + verify(() => assetService.update([mine.id], visibility: const .some(.locked))).called(1); + }); + + testWidgets('locks only the owned assets not already locked', (tester) async { + final stale = owned(); + final alreadyLocked = owned(visibility: .locked); + + await pumpLock(tester, {stale, alreadyLocked}); + + verify(() => assetService.update([stale.id], visibility: const .some(.locked))).called(1); + }); + + testWidgets('removes the local copies of the assets it locks', (tester) async { + final merged = RemoteAssetFactory.create(ownerId: context.currentUser.id, localId: 'local-1'); + final remoteOnly = owned(); + + await pumpLock(tester, {merged, remoteOnly}); + + verify(() => assetService.deleteLocal(['local-1'])).called(1); + }); + + testWidgets('leaves the local copies alone when unlocking', (tester) async { + final merged = RemoteAssetFactory.create( + ownerId: context.currentUser.id, + localId: 'local-1', + visibility: .locked, + ); + + await pumpLock(tester, {merged}); + + verifyNever(() => assetService.deleteLocal(any())); + }); + + testWidgets('clears the selection once the update succeeds', (tester) async { + await pumpLock(tester, {owned()}); + await tester.pumpAndSettle(); + + expect(find.byType(ImmichIconButton), findsNothing, reason: 'an empty selection hides the action'); + }); + + testWidgets('is hidden when none of the selected assets are owned', (tester) async { + await tester.pumpTestWidget( + context, + const ActionIconButton(action: LockAction(source: .timeline)), + overrides: context.selected({RemoteAssetFactory.create()}), + ); + + expect(find.byType(ImmichIconButton), findsNothing); + }); + }); +} diff --git a/mobile/test/unit/presentation/actions/open_in_browser_action_test.dart b/mobile/test/unit/presentation/actions/open_in_browser_action_test.dart new file mode 100644 index 0000000000..edd9ec4a7c --- /dev/null +++ b/mobile/test/unit/presentation/actions/open_in_browser_action_test.dart @@ -0,0 +1,48 @@ +import 'package:flutter_test/flutter_test.dart'; +import 'package:immich_mobile/domain/services/timeline.service.dart'; +import 'package:immich_mobile/presentation/actions/action.widget.dart'; +import 'package:immich_mobile/presentation/actions/open_in_browser.action.dart'; +import 'package:immich_ui/immich_ui.dart'; + +import '../presentation_context.dart'; + +void main() { + late PresentationContext context; + + setUp(() async { + context = await PresentationContext.create(); + }); + + tearDown(() async { + await context.dispose(); + }); + + group('webPathFor', () { + const dedicatedPages = { + TimelineOrigin.favorite: '/favorites', + TimelineOrigin.trash: '/trash', + TimelineOrigin.archive: '/archive', + }; + + for (final origin in TimelineOrigin.values) { + final expected = dedicatedPages[origin] ?? ''; + + test('opens ${origin.name} on ${expected.isEmpty ? 'the main timeline' : expected}', () { + expect(webPathFor(origin), expected); + }); + } + }); + + group('OpenInBrowserAction', () { + testWidgets('always renders, since the kebab menu decides whether to offer it', (tester) async { + await tester.pumpTestWidget( + context, + const ActionIconButton( + action: OpenInBrowserAction(remoteId: 'remote-1', origin: .main), + ), + ); + + expect(find.byType(ImmichIconButton), findsOneWidget); + }); + }); +} diff --git a/mobile/test/unit/presentation/actions/partner_action_test.dart b/mobile/test/unit/presentation/actions/partner_action_test.dart index 0284371c91..786d2d7f60 100644 --- a/mobile/test/unit/presentation/actions/partner_action_test.dart +++ b/mobile/test/unit/presentation/actions/partner_action_test.dart @@ -4,26 +4,26 @@ import 'package:flutter_test/flutter_test.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; import 'package:immich_mobile/domain/models/user.model.dart'; import 'package:immich_mobile/presentation/actions/partner.action.dart'; -import 'package:immich_mobile/providers/infrastructure/user.provider.dart'; import 'package:mocktail/mocktail.dart'; +import '../../../service.mocks.dart'; import '../../factories/user_factory.dart'; -import '../../presentation_context.dart'; +import '../presentation_context.dart'; void main() { late PresentationContext context; + late MockPartnerService partnerService; setUp(() async { context = await PresentationContext.create(); + partnerService = context.service.partner.service; }); - tearDown(() { - context.dispose(); + tearDown(() async { + await context.dispose(); }); List overrides({List candidates = const []}) => [ - ...context.overrides, - partnerServiceProvider.overrideWithValue(context.mocks.partner.service), candidatesStateProvider.overrideWith((ref) => Stream>.value(candidates)), ]; @@ -31,22 +31,24 @@ void main() { testWidgets('creates a partner for the selected candidate', (tester) async { final candidate = UserFactory.create(); - await tester.pumpTestAction(const PartnerAddAction(), overrides: overrides(candidates: [candidate])); + await tester.pumpTestAction(context, const PartnerAddAction(), overrides: overrides(candidates: [candidate])); await tester.pumpUntilFound(find.text(candidate.name)); await tester.tap(find.text(candidate.name)); await tester.pumpAndSettle(); - verify( - () => context.mocks.partner.service.create(sharedById: context.currentUser.id, sharedWithId: candidate.id), - ).called(1); + verify(() => partnerService.create(sharedById: context.currentUser.id, sharedWithId: candidate.id)).called(1); }); testWidgets('creates nothing when the selection dialog is dismissed', (tester) async { - await tester.pumpTestAction(const PartnerAddAction(), overrides: overrides(candidates: [UserFactory.create()])); + await tester.pumpTestAction( + context, + const PartnerAddAction(), + overrides: overrides(candidates: [UserFactory.create()]), + ); await tester.sendKeyEvent(LogicalKeyboardKey.escape); // dismiss without selecting await tester.pumpAndSettle(); - verifyNever(context.mocks.partner.create); + verifyNever(context.service.partner.create); }); }); @@ -54,27 +56,27 @@ void main() { testWidgets('deletes the partner after confirmation', (tester) async { final partner = UserFactory.create(); await tester.pumpTestAction( + context, PartnerRemoveAction(sharedWithId: partner.id, partnerName: partner.name), overrides: overrides(), ); await tester.tap(find.byType(TextButton).last); // confirm await tester.pumpAndSettle(); - verify( - () => context.mocks.partner.service.delete(sharedById: context.currentUser.id, sharedWithId: partner.id), - ).called(1); + verify(() => partnerService.delete(sharedById: context.currentUser.id, sharedWithId: partner.id)).called(1); }); testWidgets('deletes nothing when the confirmation is cancelled', (tester) async { final partner = UserFactory.create(); await tester.pumpTestAction( + context, PartnerRemoveAction(sharedWithId: partner.id, partnerName: partner.name), overrides: overrides(), ); await tester.tap(find.byType(TextButton).first); // cancel await tester.pumpAndSettle(); - verifyNever(context.mocks.partner.delete); + verifyNever(context.service.partner.delete); }); }); } diff --git a/mobile/test/unit/presentation/actions/restore_action_test.dart b/mobile/test/unit/presentation/actions/restore_action_test.dart new file mode 100644 index 0000000000..530e1b76e9 --- /dev/null +++ b/mobile/test/unit/presentation/actions/restore_action_test.dart @@ -0,0 +1,75 @@ +import 'package:flutter_test/flutter_test.dart'; +import 'package:immich_mobile/domain/models/asset/base_asset.model.dart'; +import 'package:immich_mobile/presentation/actions/action.widget.dart'; +import 'package:immich_mobile/presentation/actions/restore.action.dart'; +import 'package:immich_ui/immich_ui.dart'; +import 'package:mocktail/mocktail.dart'; + +import '../../../service.mocks.dart'; +import '../../factories/remote_asset_factory.dart'; +import '../presentation_context.dart'; + +void main() { + late PresentationContext context; + late MockAssetService assetService; + + setUp(() async { + context = await PresentationContext.create(); + assetService = context.service.asset.service; + }); + + tearDown(() async { + await context.dispose(); + }); + + RemoteAsset owned({bool trashed = true}) => + RemoteAssetFactory.create(ownerId: context.currentUser.id, deletedAt: trashed ? .new(2020) : null); + + Future pumpRestore(WidgetTester tester, Set selection) => + tester.pumpTestAction(context, const RestoreAction(source: .timeline), overrides: context.selected(selection)); + + group('RestoreAction', () { + testWidgets('restores the eligible owned trashed assets', (tester) async { + final asset = owned(); + + await pumpRestore(tester, {asset}); + + verify(() => assetService.restoreTrash([asset.id])).called(1); + }); + + testWidgets('ignores assets owned by someone else', (tester) async { + final mine = owned(); + final theirs = RemoteAssetFactory.create(deletedAt: .new(2020)); + + await pumpRestore(tester, {mine, theirs}); + + verify(() => assetService.restoreTrash([mine.id])).called(1); + }); + + testWidgets('skips owned assets that are not trashed', (tester) async { + final trashed = owned(); + final live = owned(trashed: false); + + await pumpRestore(tester, {trashed, live}); + + verify(() => assetService.restoreTrash([trashed.id])).called(1); + }); + + testWidgets('clears the selection once the restore succeeds', (tester) async { + await pumpRestore(tester, {owned()}); + await tester.pumpAndSettle(); + + expect(find.byType(ImmichIconButton), findsNothing, reason: 'an empty selection hides the action'); + }); + + testWidgets('is hidden when no owned asset is trashed', (tester) async { + await tester.pumpTestWidget( + context, + const ActionIconButton(action: RestoreAction(source: .timeline)), + overrides: context.selected({owned(trashed: false)}), + ); + + expect(find.byType(ImmichIconButton), findsNothing); + }); + }); +} diff --git a/mobile/test/unit/presentation/actions/share_action_test.dart b/mobile/test/unit/presentation/actions/share_action_test.dart new file mode 100644 index 0000000000..20cc25b73b --- /dev/null +++ b/mobile/test/unit/presentation/actions/share_action_test.dart @@ -0,0 +1,149 @@ +import 'package:flutter/material.dart'; +import 'package:flutter_test/flutter_test.dart'; +import 'package:hooks_riverpod/hooks_riverpod.dart'; +import 'package:immich_mobile/constants/enums.dart'; +import 'package:immich_mobile/domain/models/asset/base_asset.model.dart'; +import 'package:immich_mobile/infrastructure/repositories/settings.repository.dart'; +import 'package:immich_mobile/presentation/actions/action.widget.dart'; +import 'package:immich_mobile/presentation/actions/share.action.dart'; +import 'package:immich_mobile/presentation/actions/share_link.action.dart'; +import 'package:immich_ui/immich_ui.dart'; +import 'package:mocktail/mocktail.dart'; + +import '../../factories/local_asset_factory.dart'; +import '../../factories/remote_asset_factory.dart'; +import '../presentation_context.dart'; + +void main() { + late PresentationContext context; + + setUp(() async { + context = await PresentationContext.create(); + }); + + tearDown(() async { + await context.dispose(); + }); + + late BuildContext actionContext; + late WidgetRef actionRef; + + Future pumpShare(WidgetTester tester, {Set? selection}) => tester.pumpTestWidget( + context, + Consumer( + builder: (widgetContext, ref, _) { + actionContext = widgetContext; + actionRef = ref; + return const ActionIconButton(action: ShareAction(source: .timeline)); + }, + ), + overrides: [ + ...context.selected(selection ?? {RemoteAssetFactory.create(ownerId: context.currentUser.id)}), + ], + ); + + // TODO: Replace with button tap once long press support in ui is merged + Future invokeSecondaryAction() async { + final resolved = const ShareAction(source: .timeline).create(actionContext, actionRef); + await resolved!.onSecondaryAction!(); + } + + List sharedFileTypes() => verify( + () => context.repository.assetMedia.api.shareAssets( + any(), + any(), + fileType: captureAny(named: 'fileType'), + cancelCompleter: any(named: 'cancelCompleter'), + onAssetDownloadProgress: any(named: 'onAssetDownloadProgress'), + ), + ).captured.cast(); + + Future settle(WidgetTester tester) async { + await tester.pump(); + await tester.pump(const .new(milliseconds: 300)); + } + + Future pickPreviewQuality(WidgetTester tester) async { + final shared = invokeSecondaryAction(); + await settle(tester); + await tester.tap(find.byIcon(Icons.photo_size_select_large_rounded)); + await settle(tester); + await shared; + } + + group('ShareAction', () { + testWidgets('single press shares with the configured default quality', (tester) async { + await pumpShare(tester); + + await tester.tap(find.byType(ImmichIconButton)); + await settle(tester); + + expect(sharedFileTypes(), [ShareAssetType.original]); + }); + + testWidgets('the secondary action shares with the quality picked in the dialog', (tester) async { + await pumpShare(tester); + + await pickPreviewQuality(tester); + + expect(sharedFileTypes(), [ShareAssetType.preview]); + }); + + testWidgets('quality picked there is a one-time choice and does not change the default', (tester) async { + await pumpShare(tester); + + await pickPreviewQuality(tester); + await tester.tap(find.byType(ImmichIconButton)); + await settle(tester); + + expect(sharedFileTypes(), [ShareAssetType.preview, ShareAssetType.original]); + expect(SettingsRepository.instance.appConfig.share.fileType, ShareAssetType.original); + }); + + testWidgets('offers no preview option for a video, which has none to share', (tester) async { + await pumpShare( + tester, + selection: {RemoteAssetFactory.create(ownerId: context.currentUser.id, type: .video)}, + ); + + final shared = invokeSecondaryAction(); + await settle(tester); + + expect(find.byIcon(Icons.high_quality_rounded), findsOneWidget); + expect(find.byIcon(Icons.photo_size_select_large_rounded), findsNothing); + + await tester.tap(find.byIcon(Icons.high_quality_rounded)); + await settle(tester); + await shared; + expect(find.byIcon(Icons.photo_size_select_large_rounded), findsNothing); + }); + + testWidgets('is hidden when nothing is selected', (tester) async { + await pumpShare(tester, selection: const {}); + + expect(find.byType(ImmichIconButton), findsNothing); + }); + }); + + group('ShareLinkAction', () { + testWidgets('offers a link for a remote asset', (tester) async { + await tester.pumpTestWidget( + context, + const ActionIconButton(action: ShareLinkAction(source: .timeline)), + overrides: context.selected({RemoteAssetFactory.create()}), + ); + + expect(find.byType(ImmichIconButton), findsOneWidget); + }); + + testWidgets('is hidden for a local-only asset', (tester) async { + await tester.pumpTestWidget( + context, + const ActionIconButton(action: ShareLinkAction(source: .timeline)), + overrides: context.selected({LocalAssetFactory.create()}), + ); + + expect(find.byType(ImmichIconButton), findsNothing); + }); + }); +} diff --git a/mobile/test/unit/presentation/actions/stack_action_test.dart b/mobile/test/unit/presentation/actions/stack_action_test.dart new file mode 100644 index 0000000000..11321c28af --- /dev/null +++ b/mobile/test/unit/presentation/actions/stack_action_test.dart @@ -0,0 +1,94 @@ +import 'package:flutter_test/flutter_test.dart'; +import 'package:immich_mobile/domain/models/asset/base_asset.model.dart'; +import 'package:immich_mobile/presentation/actions/action.widget.dart'; +import 'package:immich_mobile/presentation/actions/stack.action.dart'; +import 'package:immich_ui/immich_ui.dart'; +import 'package:mocktail/mocktail.dart'; + +import '../../../service.mocks.dart'; +import '../../factories/remote_asset_factory.dart'; +import '../presentation_context.dart'; + +void main() { + late PresentationContext context; + late MockAssetService assetService; + + setUp(() async { + context = await PresentationContext.create(); + assetService = context.service.asset.service; + }); + + tearDown(() async { + await context.dispose(); + }); + + RemoteAsset owned({String? stackId}) => RemoteAssetFactory.create(ownerId: context.currentUser.id, stackId: stackId); + + Future pumpStack(WidgetTester tester, Set selection) => + tester.pumpTestAction(context, const StackAction(source: .timeline), overrides: context.selected(selection)); + + group('StackAction', () { + testWidgets('stacks the eligible owned assets', (tester) async { + final first = owned(); + final second = owned(); + + await pumpStack(tester, {first, second}); + + verify(() => assetService.stack(context.currentUser.id, [first.id, second.id])).called(1); + }); + + testWidgets('unstacks the eligible owned assets', (tester) async { + final asset = owned(stackId: 'stack'); + + await pumpStack(tester, {asset}); + + verify(() => assetService.unstack(['stack'])).called(1); + }); + + testWidgets('prioritizes stack when mixed state', (tester) async { + final first = owned(); + final second = owned(stackId: 'stack'); + + await pumpStack(tester, {first, second}); + + verify(() => assetService.stack(context.currentUser.id, [first.id, second.id])).called(1); + }); + + testWidgets('ignores assets owned by someone else', (tester) async { + final mine = owned(); + final other = owned(); + final theirs = RemoteAssetFactory.create(); + + await pumpStack(tester, {mine, other, theirs}); + + verify(() => assetService.stack(context.currentUser.id, [mine.id, other.id])).called(1); + }); + + testWidgets('clears the selection once the stack succeeds', (tester) async { + await pumpStack(tester, {owned(), owned()}); + await tester.pumpAndSettle(); + + expect(find.byType(ImmichIconButton), findsNothing, reason: 'an empty selection hides the action'); + }); + + testWidgets('is hidden when a unstacked asset has nothing to stack onto', (tester) async { + await tester.pumpTestWidget( + context, + const ActionIconButton(action: StackAction(source: .timeline)), + overrides: context.selected({owned()}), + ); + + expect(find.byType(ImmichIconButton), findsNothing); + }); + + testWidgets('is hidden when none of the selected assets are owned', (tester) async { + await tester.pumpTestWidget( + context, + const ActionIconButton(action: StackAction(source: .timeline)), + overrides: context.selected({RemoteAssetFactory.create(), RemoteAssetFactory.create()}), + ); + + expect(find.byType(ImmichIconButton), findsNothing); + }); + }); +} diff --git a/mobile/test/unit/presentation/actions/timeline_action_test.dart b/mobile/test/unit/presentation/actions/timeline_action_test.dart deleted file mode 100644 index 6c14053317..0000000000 --- a/mobile/test/unit/presentation/actions/timeline_action_test.dart +++ /dev/null @@ -1,108 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:flutter_test/flutter_test.dart'; -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:immich_mobile/presentation/actions/action.dart'; -import 'package:immich_mobile/presentation/actions/action.widget.dart'; -import 'package:immich_mobile/presentation/actions/timeline.action.dart'; -import 'package:immich_mobile/providers/timeline/multiselect.provider.dart'; - -import '../../factories/remote_asset_factory.dart'; -import '../../presentation_context.dart'; - -class _FakeAction extends BaseAction { - _FakeAction({this.visible = true, this.error}); - - final bool visible; - final Object? error; - - bool ran = false; - bool? selectionDuringOnAction; - - @override - IconData get icon => Icons.bolt; - - @override - String label(ActionScope scope) => 'fake'; - - @override - bool isVisible(ActionScope scope) => visible; - - @override - Future onAction(ActionScope scope) async { - ran = true; - selectionDuringOnAction = scope.ref.read(multiSelectProvider).isEnabled; - if (error != null) { - throw error!; - } - } -} - -void main() { - late PresentationContext context; - - setUp(() async { - context = await PresentationContext.create(); - }); - - tearDown(() { - context.dispose(); - }); - - List seededOverrides() => [ - ...context.overrides, - multiSelectProvider.overrideWith( - () => MultiSelectNotifier( - MultiSelectState(selectedAssets: {RemoteAssetFactory.create()}, lockedSelectionAssets: const {}), - ), - ), - ]; - - Future<(ActionScope, ProviderContainer)> pumpScope(WidgetTester tester) async { - late ActionScope scope; - late ProviderContainer container; - await tester.pumpTestWidget( - Consumer( - builder: (innerContext, ref, _) { - scope = ActionScope(context: innerContext, ref: ref, authUser: context.currentUser); - container = ProviderScope.containerOf(innerContext, listen: false); - return const SizedBox.shrink(); - }, - ), - overrides: seededOverrides(), - ); - return (scope, container); - } - - group('TimelineAction', () { - testWidgets('runs the wrapped action and then clears the selection', (tester) async { - final inner = _FakeAction(); - final (scope, container) = await pumpScope(tester); - await TimelineAction(action: inner).onAction(scope); - - expect(inner.ran, isTrue); - expect(inner.selectionDuringOnAction, isTrue, reason: 'reset must run after the inner action, not before'); - expect(container.read(multiSelectProvider).isEnabled, isFalse); - }); - - testWidgets('rethrows and keeps the selection when the wrapped action throws', (tester) async { - final error = Exception('boom'); - final inner = _FakeAction(error: error); - final (scope, container) = await pumpScope(tester); - - await expectLater(TimelineAction(action: inner).onAction(scope), throwsA(same(error))); - - expect(inner.ran, isTrue); - expect(container.read(multiSelectProvider).isEnabled, isTrue); - }); - - testWidgets('delegates visibility to the wrapped action', (tester) async { - await tester.pumpTestWidget( - ActionIconButtonWidget(action: TimelineAction(action: _FakeAction(visible: false))), - overrides: context.overrides, - ); - - expect(find.byType(ActionIconButtonWidget), findsOneWidget); - expect(find.byIcon(Icons.bolt), findsNothing); - }); - }); -} diff --git a/mobile/test/unit/presentation/actions/upload_action_test.dart b/mobile/test/unit/presentation/actions/upload_action_test.dart new file mode 100644 index 0000000000..8aeb7a915f --- /dev/null +++ b/mobile/test/unit/presentation/actions/upload_action_test.dart @@ -0,0 +1,213 @@ +import 'dart:async'; + +import 'package:flutter/material.dart'; +import 'package:flutter_test/flutter_test.dart'; +import 'package:hooks_riverpod/hooks_riverpod.dart'; +import 'package:immich_mobile/domain/models/asset/base_asset.model.dart'; +import 'package:immich_mobile/generated/translations.g.dart'; +import 'package:immich_mobile/presentation/actions/action.widget.dart'; +import 'package:immich_mobile/presentation/actions/upload.action.dart'; +import 'package:immich_mobile/providers/backup/asset_upload_progress.provider.dart'; +import 'package:immich_mobile/providers/infrastructure/toast.provider.dart'; +import 'package:immich_mobile/services/foreground_upload.service.dart'; +import 'package:immich_ui/immich_ui.dart'; +import 'package:mocktail/mocktail.dart'; + +import '../../../service.mocks.dart'; +import '../../factories/local_asset_factory.dart'; +import '../../factories/remote_asset_factory.dart'; +import '../presentation_context.dart'; + +void main() { + late PresentationContext context; + late MockForegroundUploadService uploadService; + + setUp(() async { + context = await PresentationContext.create(); + uploadService = context.service.upload; + }); + + tearDown(() async { + await context.dispose(); + }); + + List uploadOverrides() => [ + foregroundUploadServiceProvider.overrideWithValue(uploadService), + toastServiceProvider.overrideWithValue(context.service.toast), + ]; + + Future pumpUpload(WidgetTester tester, Set selection, {bool showProgress = false}) => + tester.pumpTestWidget( + context, + ActionIconButton( + action: UploadAction(source: .timeline, showProgress: showProgress), + ), + overrides: [...context.selected(selection), ...uploadOverrides()], + ); + + Future settleUpload(WidgetTester tester) async { + await tester.pump(); + await tester.pump(const .new(seconds: 2)); + await tester.pumpAndSettle(); + } + + void answerUploadWith({Set succeeded = const {}, Set failed = const {}, Completer? until}) { + when( + () => uploadService.uploadManual( + any(), + cancelToken: any(named: 'cancelToken'), + callbacks: any(named: 'callbacks'), + ), + ).thenAnswer((invocation) async { + if (until != null) { + await until.future; + } + final callbacks = invocation.namedArguments[#callbacks] as UploadCallbacks; + for (final id in succeeded) { + callbacks.onSuccess?.call(id, id); + } + for (final id in failed) { + callbacks.onError?.call(id, 'boom'); + } + }); + } + + group('UploadAction', () { + testWidgets('uploads the selected local assets', (tester) async { + final asset = LocalAssetFactory.create(); + answerUploadWith(succeeded: {asset.id}); + + await pumpUpload(tester, {asset}); + await tester.tap(find.byType(ImmichIconButton)); + await settleUpload(tester); + + final uploaded = + verify( + () => uploadService.uploadManual( + captureAny(), + cancelToken: any(named: 'cancelToken'), + callbacks: any(named: 'callbacks'), + ), + ).captured.single + as List; + expect(uploaded.map((a) => a.id), [asset.id]); + }); + + testWidgets('ignores assets that are already backed up', (tester) async { + final notBackedUp = LocalAssetFactory.create(); + answerUploadWith(succeeded: {notBackedUp.id}); + + await pumpUpload(tester, {notBackedUp, LocalAssetFactory.create(remoteId: 'already-there')}); + await tester.tap(find.byType(ImmichIconButton)); + await settleUpload(tester); + + final uploaded = + verify( + () => uploadService.uploadManual( + captureAny(), + cancelToken: any(named: 'cancelToken'), + callbacks: any(named: 'callbacks'), + ), + ).captured.single + as List; + expect(uploaded.map((a) => a.id), [notBackedUp.id]); + }); + + testWidgets('reports an error when an asset fails to upload', (tester) async { + final asset = LocalAssetFactory.create(); + answerUploadWith(failed: {asset.id}); + + await pumpUpload(tester, {asset}); + await tester.tap(find.byType(ImmichIconButton)); + await settleUpload(tester); + + final message = verify(() => context.service.toast.error(captureAny())).captured.single as String; + expect(message, StaticTranslations.instance.scaffold_body_error_occurred); + }); + + testWidgets('treats a cancelled upload as deliberate, not a failure', (tester) async { + final asset = LocalAssetFactory.create(); + when( + () => uploadService.uploadManual( + any(), + cancelToken: any(named: 'cancelToken'), + callbacks: any(named: 'callbacks'), + ), + ).thenAnswer((invocation) async { + (invocation.namedArguments[#cancelToken] as Completer).complete(); + }); + + await pumpUpload(tester, {asset}); + await tester.tap(find.byType(ImmichIconButton)); + await settleUpload(tester); + + verifyNever(() => context.service.toast.error(any())); + }); + + testWidgets('shows the progress dialog while uploading and closes it after', (tester) async { + final asset = LocalAssetFactory.create(); + final uploading = Completer(); + answerUploadWith(succeeded: {asset.id}, until: uploading); + + await pumpUpload(tester, {asset}, showProgress: true); + await tester.tap(find.byType(ImmichIconButton)); + await tester.pump(); + + expect(find.text(StaticTranslations.instance.uploading), findsOneWidget); + + uploading.complete(); + await settleUpload(tester); + + expect(find.text(StaticTranslations.instance.uploading), findsNothing); + }); + + testWidgets('shows no dialog when not asked to', (tester) async { + final asset = LocalAssetFactory.create(); + answerUploadWith(succeeded: {asset.id}); + + await pumpUpload(tester, {asset}); + await tester.tap(find.byType(ImmichIconButton)); + await tester.pump(); + + expect(find.text(StaticTranslations.instance.uploading), findsNothing); + await settleUpload(tester); + }); + + testWidgets('is hidden for a remote asset, which has nothing to upload', (tester) async { + await pumpUpload(tester, {RemoteAssetFactory.create()}); + + expect(find.byType(ImmichIconButton), findsNothing); + }); + + testWidgets('is hidden when every local asset is already backed up', (tester) async { + await pumpUpload(tester, {LocalAssetFactory.create(remoteId: 'already-there')}); + + expect(find.byType(ImmichIconButton), findsNothing); + }); + }); + + group('uploadAssets', () { + testWidgets('clears the tracked progress once the upload settles', (tester) async { + final asset = LocalAssetFactory.create(); + answerUploadWith(succeeded: {asset.id}); + + late WidgetRef capturedRef; + await tester.pumpTestWidget( + context, + Consumer( + builder: (_, ref, _) { + capturedRef = ref; + return const SizedBox.shrink(); + }, + ), + overrides: uploadOverrides(), + ); + + await uploadAssets(tester.element(find.byType(SizedBox)), capturedRef, [asset]); + await settleUpload(tester); + + expect(capturedRef.read(assetUploadProgressProvider), isEmpty); + expect(capturedRef.read(manualUploadCancelTokenProvider), isNull); + }); + }); +} diff --git a/mobile/test/unit/presentation/partner_page_test.dart b/mobile/test/unit/presentation/partner_page_test.dart index 6575b4a15c..2cabbb9d4c 100644 --- a/mobile/test/unit/presentation/partner_page_test.dart +++ b/mobile/test/unit/presentation/partner_page_test.dart @@ -3,33 +3,32 @@ import 'package:flutter_test/flutter_test.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; import 'package:immich_mobile/domain/models/user.model.dart'; import 'package:immich_mobile/pages/library/partner/partner.page.dart'; +import 'package:immich_mobile/presentation/actions/action.widget.dart'; import 'package:immich_mobile/presentation/actions/partner.action.dart'; +import 'package:immich_ui/immich_ui.dart'; import '../factories/partner_user_factory.dart'; import '../factories/user_factory.dart'; -import '../presentation_context.dart'; +import 'presentation_context.dart'; void main() { late PresentationContext context; setUp(() async => context = await PresentationContext.create()); - tearDown(() => context.dispose()); + tearDown(() async => await context.dispose()); group('PartnerSharedByList', () { testWidgets('shows the empty-state add button when there are no partners', (tester) async { - final action = const PartnerAddAction(); - - await tester.pumpTestWidget(const PartnerSharedByList(partners: []), overrides: context.overrides); + await tester.pumpTestWidget(context, const PartnerSharedByList(partners: [])); expect(find.byType(ListView), findsNothing); - expect(find.widgetWithIcon(TextButton, action.icon), findsOneWidget); + expect(find.descendant(of: find.byType(ActionButton), matching: find.byType(ImmichTextButton)), findsOneWidget); }); testWidgets('renders a tile per partner with name and email', (tester) async { final partner1 = PartnerFactory.create(); final partner2 = PartnerFactory.create(); - await tester.pumpTestWidget(PartnerSharedByList(partners: [partner1, partner2]), overrides: context.overrides); - + await tester.pumpTestWidget(context, PartnerSharedByList(partners: [partner1, partner2])); expect(find.byType(ListTile), findsNWidgets(2)); expect(find.text(partner1.name), findsOneWidget); expect(find.text(partner1.email), findsOneWidget); @@ -40,9 +39,11 @@ void main() { testWidgets('renders a remove action for each partner', (tester) async { final partner1 = PartnerFactory.create(inTimeline: true); final partner2 = PartnerFactory.create(); - final action = const PartnerRemoveAction(sharedWithId: '', partnerName: ''); - await tester.pumpTestWidget(PartnerSharedByList(partners: [partner1, partner2]), overrides: context.overrides); - expect(find.byIcon(action.icon), findsNWidgets(2)); + await tester.pumpTestWidget(context, PartnerSharedByList(partners: [partner1, partner2])); + expect( + find.descendant(of: find.byType(ActionIconButton), matching: find.byType(ImmichIconButton)), + findsNWidgets(2), + ); }); }); @@ -62,13 +63,12 @@ void main() { } List withCandidates(List candidates) => [ - ...context.overrides, candidatesStateProvider.overrideWith((ref) => Stream>.value(candidates)), ]; testWidgets('renders an option per candidate fetched from the provider', (tester) async { final user = UserFactory.create(); - await tester.pumpTestWidget(dialogWidget(), overrides: withCandidates([user])); + await tester.pumpTestWidget(context, dialogWidget(), overrides: withCandidates([user])); await tester.tap(find.byKey(dialogButtonKey)); await tester.pumpAndSettle(); @@ -78,7 +78,7 @@ void main() { }); testWidgets('shows no options when the provider returns no candidates', (tester) async { - await tester.pumpTestWidget(dialogWidget(), overrides: withCandidates(const [])); + await tester.pumpTestWidget(context, dialogWidget(), overrides: withCandidates(const [])); await tester.tap(find.byKey(dialogButtonKey)); await tester.pumpAndSettle(); @@ -89,7 +89,11 @@ void main() { testWidgets('pops the selected candidate when an option is tapped', (tester) async { final user = UserFactory.create(); User? selected; - await tester.pumpTestWidget(dialogWidget(onClosed: (user) => selected = user), overrides: withCandidates([user])); + await tester.pumpTestWidget( + context, + dialogWidget(onClosed: (user) => selected = user), + overrides: withCandidates([user]), + ); await tester.tap(find.byKey(dialogButtonKey)); await tester.pumpAndSettle(); diff --git a/mobile/test/unit/presentation/presentation_context.dart b/mobile/test/unit/presentation/presentation_context.dart new file mode 100644 index 0000000000..36ae8d087d --- /dev/null +++ b/mobile/test/unit/presentation/presentation_context.dart @@ -0,0 +1,143 @@ +import 'package:drift/drift.dart'; +import 'package:drift/native.dart'; +import 'package:easy_localization/easy_localization.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_test/flutter_test.dart'; +import 'package:hooks_riverpod/hooks_riverpod.dart'; +import 'package:immich_mobile/constants/locales.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/user.model.dart'; +import 'package:immich_mobile/domain/services/store.service.dart'; +import 'package:immich_mobile/generated/codegen_loader.g.dart'; +import 'package:immich_mobile/infrastructure/repositories/db.repository.dart'; +import 'package:immich_mobile/infrastructure/repositories/settings.repository.dart'; +import 'package:immich_mobile/infrastructure/repositories/store.repository.dart'; +import 'package:immich_mobile/presentation/actions/action.dart'; +import 'package:immich_mobile/presentation/actions/action.widget.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/user.provider.dart'; +import 'package:immich_mobile/providers/routes.provider.dart'; +import 'package:immich_mobile/providers/timeline/multiselect.provider.dart'; +import 'package:immich_mobile/providers/user.provider.dart'; +import 'package:immich_mobile/repositories/asset_media.repository.dart'; +import 'package:immich_mobile/services/cleanup.service.dart'; +import 'package:immich_mobile/services/gcast.service.dart'; +import 'package:immich_mobile/services/server_info.service.dart'; +import 'package:immich_ui/immich_ui.dart'; +import 'package:mocktail/mocktail.dart'; + +import '../../test_utils.dart'; +import '../factories/user_factory.dart'; +import '../mocks.dart'; + +class PresentationContext { + PresentationContext._({required UserDto user}) + : currentUser = user, + service = ServiceMocks(), + repository = RepositoryMocks() { + setup(); + } + + static const String serverEndpoint = 'http://localhost:3000'; + + static Drift? _db; + + final UserDto currentUser; + final ServiceMocks service; + final RepositoryMocks repository; + + List get overrides => [ + currentUserProvider.overrideWith((ref) => CurrentUserProvider(service.user.service)), + assetServiceProvider.overrideWithValue(service.asset.service), + cleanupServiceProvider.overrideWithValue(service.cleanup.service), + remoteAlbumServiceProvider.overrideWithValue(service.album.service), + partnerServiceProvider.overrideWithValue(service.partner.service), + gCastServiceProvider.overrideWithValue(service.cast), + serverInfoServiceProvider.overrideWithValue(service.serverInfo), + inLockedViewProvider.overrideWithValue(false), + remoteAssetRepositoryProvider.overrideWithValue(repository.remoteAsset.repo), + assetMediaRepositoryProvider.overrideWithValue(repository.assetMedia.api), + ]; + + List selected(Set assets) => [ + multiSelectProvider.overrideWith( + () => MultiSelectNotifier(MultiSelectState(selectedAssets: assets, lockedSelectionAssets: const {})), + ), + ]; + + static Future create() async { + TestUtils.init(); + if (_db == null) { + final db = Drift(DatabaseConnection(NativeDatabase.memory(), closeStreamsSynchronously: true)); + await StoreService.init(storeRepository: DriftStoreRepository(db), listenUpdates: false); + await StoreService.I.put(StoreKey.serverEndpoint, serverEndpoint); + _db = db; + } + await SettingsRepository.ensureInitialized(_db!); + return PresentationContext._(user: UserFactory.createDto()); + } + + void setup() { + when(service.user.tryGetMyUser).thenReturn(currentUser); + } + + Future dispose() async { + await SettingsRepository.reset(); + service.resetAll(); + } +} + +extension PumpPresentationWidget on WidgetTester { + Future pumpTestWidget(PresentationContext context, Widget widget, {List overrides = const []}) async { + await pumpWidget( + EasyLocalization( + supportedLocales: locales.values.toList(), + path: translationsPath, + startLocale: locales.values.first, + fallbackLocale: locales.values.first, + saveLocale: false, + useFallbackTranslations: true, + assetLoader: const CodegenLoader(), + child: ProviderScope( + overrides: context.overrides, + child: Builder( + builder: (context) => ProviderScope( + overrides: overrides, + child: MaterialApp( + debugShowCheckedModeBanner: false, + scaffoldMessengerKey: scaffoldMessengerKey, + localizationsDelegates: context.localizationDelegates, + supportedLocales: context.supportedLocales, + locale: context.locale, + home: Scaffold(body: widget), + ), + ), + ), + ), + ), + ); + await pumpAndSettle(); + } + + Future pumpTestAction( + PresentationContext context, + ActionBuilder action, { + List overrides = const [], + }) async { + await pumpTestWidget(context, ActionIconButton(action: action), overrides: overrides); + await tap(find.byType(ImmichIconButton)); + await pump(); + } + + Future pumpUntilFound(Finder finder, {int maxFrames = 10}) async { + for (var i = 0; i < maxFrames; i++) { + await pump(); + if (finder.evaluate().isNotEmpty) { + return; + } + } + throw StateError('pumpUntilFound: $finder not found within $maxFrames frames'); + } +} diff --git a/mobile/test/unit/presentation_context.dart b/mobile/test/unit/presentation_context.dart deleted file mode 100644 index d3998994c9..0000000000 --- a/mobile/test/unit/presentation_context.dart +++ /dev/null @@ -1,104 +0,0 @@ -import 'package:drift/drift.dart'; -import 'package:drift/native.dart'; -import 'package:easy_localization/easy_localization.dart'; -import 'package:flutter/material.dart'; -import 'package:flutter_test/flutter_test.dart'; -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:immich_mobile/constants/locales.dart'; -import 'package:immich_mobile/domain/models/store.model.dart'; -import 'package:immich_mobile/domain/models/user.model.dart'; -import 'package:immich_mobile/domain/services/store.service.dart'; -import 'package:immich_mobile/generated/codegen_loader.g.dart'; -import 'package:immich_mobile/infrastructure/repositories/db.repository.dart'; -import 'package:immich_mobile/infrastructure/repositories/store.repository.dart'; -import 'package:immich_mobile/presentation/actions/action.dart'; -import 'package:immich_mobile/presentation/actions/action.widget.dart'; -import 'package:immich_mobile/providers/user.provider.dart'; -import 'package:immich_ui/immich_ui.dart'; -import 'package:mocktail/mocktail.dart'; - -import '../test_utils.dart'; -import 'factories/user_factory.dart'; -import 'mocks.dart'; - -class PresentationContext { - PresentationContext._({required UserDto user}) : currentUser = user, mocks = ServiceMocks() { - setup(); - } - - static const String serverEndpoint = 'http://localhost:3000'; - - static Drift? _db; - - final UserDto currentUser; - final ServiceMocks mocks; - - List get overrides => [currentUserProvider.overrideWith((ref) => CurrentUserProvider(mocks.user.service))]; - - static Future create() async { - TestUtils.init(); - if (_db == null) { - final db = Drift(DatabaseConnection(NativeDatabase.memory(), closeStreamsSynchronously: true)); - await StoreService.init(storeRepository: DriftStoreRepository(db), listenUpdates: false); - await StoreService.I.put(StoreKey.serverEndpoint, serverEndpoint); - _db = db; - } - return PresentationContext._(user: UserFactory.createDto()); - } - - void setup() { - when(mocks.user.tryGetMyUser).thenReturn(currentUser); - } - - void dispose() { - addTearDown(() { - mocks.resetAll(); - }); - } -} - -extension PumpPresentationWidget on WidgetTester { - Future pumpTestWidget(Widget widget, {List overrides = const []}) async { - await pumpWidget( - EasyLocalization( - supportedLocales: locales.values.toList(), - path: translationsPath, - startLocale: locales.values.first, - fallbackLocale: locales.values.first, - saveLocale: false, - useFallbackTranslations: true, - assetLoader: const CodegenLoader(), - child: ProviderScope( - overrides: overrides, - child: Builder( - builder: (context) => MaterialApp( - debugShowCheckedModeBanner: false, - scaffoldMessengerKey: scaffoldMessengerKey, - localizationsDelegates: context.localizationDelegates, - supportedLocales: context.supportedLocales, - locale: context.locale, - home: Scaffold(body: widget), - ), - ), - ), - ), - ); - await pumpAndSettle(); - } - - Future pumpTestAction(BaseAction action, {List overrides = const []}) async { - await pumpTestWidget(ActionIconButtonWidget(action: action), overrides: overrides); - await tap(find.byType(ImmichIconButton)); - await pump(); - } - - Future pumpUntilFound(Finder finder, {int maxFrames = 10}) async { - for (var i = 0; i < maxFrames; i++) { - await pump(); - if (finder.evaluate().isNotEmpty) { - return; - } - } - throw StateError('pumpUntilFound: $finder not found within $maxFrames frames'); - } -} diff --git a/mobile/test/unit/services/asset_service_test.dart b/mobile/test/unit/services/asset_service_test.dart new file mode 100644 index 0000000000..a09465701b --- /dev/null +++ b/mobile/test/unit/services/asset_service_test.dart @@ -0,0 +1,81 @@ +import 'package:flutter_test/flutter_test.dart'; +import 'package:immich_mobile/domain/services/asset.service.dart'; +import 'package:mocktail/mocktail.dart'; + +import '../../infrastructure/repository.mock.dart'; +import '../../repository.mocks.dart'; +import '../mocks.dart'; + +void main() { + late AssetService sut; + late RepositoryMocks mocks; + late MockAssetApiRepository apiRepository; + late MockRemoteAssetRepository remoteRepository; + late MockRemoteExifRepository exifRepository; + + setUp(() { + mocks = RepositoryMocks(); + apiRepository = mocks.assetApi.api; + remoteRepository = mocks.remoteAsset.repo; + exifRepository = mocks.remoteExif.repo; + + sut = AssetService( + remoteRepository: remoteRepository, + exifRepository: exifRepository, + localRepository: MockDriftLocalAssetRepository(), + apiRepository: apiRepository, + mediaRepository: mocks.assetMedia.api, + trashedLocalRepository: mocks.trashedAsset, + ); + }); + + group('AssetService.updateDateTime', () { + const ids = ['asset_id_1']; + + test('sends the picked value to the api with its offset intact', () async { + const picked = '2026-06-10T19:15:00.000+06:00'; + await sut.update(ids, dateTime: const .some(picked)); + + verify(() => apiRepository.update(ids, dateTimeOriginal: const .some(picked))).called(1); + verify(() => remoteRepository.update(ids, createdAt: .some(DateTime.parse(picked)))).called(1); + verify( + () => exifRepository.update( + ids, + dateTimeOriginal: .some(DateTime.parse(picked)), + timeZone: const .some('UTC+06:00'), + ), + ).called(1); + }); + + test('handles negative offsets', () async { + const picked = '2026-01-05T08:00:00.000-05:30'; + await sut.update(ids, dateTime: const .some(picked)); + + verify(() => remoteRepository.update(ids, createdAt: .some(DateTime.parse(picked)))).called(1); + verify( + () => exifRepository.update( + ids, + dateTimeOriginal: .some(DateTime.parse(picked)), + timeZone: const .some('UTC-05:30'), + ), + ).called(1); + }); + + test('writes no timezone when the value has no offset', () async { + const picked = '2026-06-10T13:15:00.000Z'; + await sut.update(ids, dateTime: const .some(picked)); + + verify(() => remoteRepository.update(ids, createdAt: .some(DateTime.parse(picked)))).called(1); + verify( + () => exifRepository.update(ids, dateTimeOriginal: .some(DateTime.parse(picked)), timeZone: const .none()), + ).called(1); + }); + + test('is a no-op when there are no asset ids', () async { + await sut.update(const [], dateTime: const .some('2026-06-10T19:15:00.000+06:00')); + + verifyZeroInteractions(apiRepository); + verifyZeroInteractions(remoteRepository); + }); + }); +} diff --git a/mobile/test/unit/services/gallery_permission_service_test.dart b/mobile/test/unit/services/gallery_permission_service_test.dart new file mode 100644 index 0000000000..9a399f9948 --- /dev/null +++ b/mobile/test/unit/services/gallery_permission_service_test.dart @@ -0,0 +1,118 @@ +import 'package:flutter/foundation.dart'; +import 'package:flutter_test/flutter_test.dart'; +import 'package:immich_mobile/constants/enums.dart'; +import 'package:immich_mobile/domain/services/device_permission.service.dart'; +import 'package:mocktail/mocktail.dart'; + +import '../mocks.dart'; + +void main() { + late RepositoryMocks mocks; + late DevicePermissionService sut; + + void stubPermissions(Map statuses) { + DevicePermissionStatus answer(Invocation i) => statuses[i.positionalArguments.first] ?? .denied; + when(mocks.permission.getStatus).thenAnswer((i) async => answer(i)); + when(mocks.permission.request).thenAnswer((i) async => answer(i)); + } + + setUp(() { + debugDefaultTargetPlatformOverride = .android; + mocks = .new(); + sut = .new(mocks.permission.repo); + }); + + tearDown(() { + debugDefaultTargetPlatformOverride = null; + }); + + group('DevicePermissionService', () { + group('Gallery', () { + test('is denied when media location is missing but photos and videos are granted', () async { + when(mocks.permission.getAndroidSdkVersion).thenAnswer((_) async => 34); + stubPermissions({.photos: .granted, .videos: .granted, .mediaLocation: .denied}); + expect(await sut.galleryStatus(), DevicePermissionStatus.denied); + verify(() => mocks.permission.repo.getStatus(DevicePermission.mediaLocation)).called(1); + }); + + test('is granted when media location is granted', () async { + when(mocks.permission.getAndroidSdkVersion).thenAnswer((_) async => 34); + stubPermissions({.photos: .granted, .videos: .granted, .mediaLocation: .granted}); + expect(await sut.galleryStatus(), DevicePermissionStatus.granted); + verify(() => mocks.permission.repo.getStatus(DevicePermission.mediaLocation)).called(1); + }); + + test('checks media location on the legacy storage path', () async { + when(mocks.permission.getAndroidSdkVersion).thenAnswer((_) async => 30); + stubPermissions({.storage: .granted, .mediaLocation: .denied}); + expect(await sut.galleryStatus(), DevicePermissionStatus.denied); + verify(() => mocks.permission.repo.getStatus(DevicePermission.mediaLocation)).called(1); + }); + + test('ignores media location below SDK 29', () async { + when(mocks.permission.getAndroidSdkVersion).thenAnswer((_) async => 28); + stubPermissions({.storage: .granted, .mediaLocation: .denied}); + expect(await sut.galleryStatus(), DevicePermissionStatus.granted); + verifyNever(() => mocks.permission.repo.getStatus(.mediaLocation)); + }); + + test('ignores media location on iOS', () async { + debugDefaultTargetPlatformOverride = .iOS; + stubPermissions({.photos: .granted, .mediaLocation: .denied}); + expect(await sut.galleryStatus(), DevicePermissionStatus.granted); + verifyNever(() => mocks.permission.repo.getStatus(.mediaLocation)); + }); + + test('is limited when only one of photos and videos is limited', () async { + stubPermissions({.photos: .granted, .videos: .limited, .mediaLocation: .granted}); + expect(await sut.galleryStatus(), DevicePermissionStatus.limited); + + stubPermissions({.photos: .limited, .videos: .granted, .mediaLocation: .granted}); + expect(await sut.galleryStatus(), DevicePermissionStatus.limited); + + stubPermissions({.photos: .limited, .videos: .limited, .mediaLocation: .granted}); + expect(await sut.galleryStatus(), DevicePermissionStatus.limited); + }); + + test('is denied when only one of photos and videos is denied', () async { + stubPermissions({.photos: .granted, .videos: .denied, .mediaLocation: .granted}); + expect(await sut.galleryStatus(), DevicePermissionStatus.denied); + + stubPermissions({.photos: .denied, .videos: .granted, .mediaLocation: .granted}); + expect(await sut.galleryStatus(), DevicePermissionStatus.denied); + + stubPermissions({.photos: .limited, .videos: .denied, .mediaLocation: .granted}); + expect(await sut.galleryStatus(), DevicePermissionStatus.denied); + }); + + test('is permanently denied when only one of photos and videos is permanently denied', () async { + stubPermissions({.photos: .granted, .videos: .permanentlyDenied, .mediaLocation: .granted}); + expect(await sut.galleryStatus(), DevicePermissionStatus.permanentlyDenied); + + stubPermissions({.photos: .permanentlyDenied, .videos: .denied, .mediaLocation: .granted}); + expect(await sut.galleryStatus(), DevicePermissionStatus.permanentlyDenied); + + stubPermissions({.photos: .permanentlyDenied, .videos: .granted, .mediaLocation: .granted}); + expect(await sut.galleryStatus(), DevicePermissionStatus.permanentlyDenied); + }); + + test('checks media location when access is only partial', () async { + stubPermissions({.photos: .limited, .videos: .limited, .mediaLocation: .denied}); + expect(await sut.galleryStatus(), DevicePermissionStatus.denied); + verify(() => mocks.permission.repo.getStatus(DevicePermission.mediaLocation)).called(1); + }); + + test('stays limited when media location is granted, but photos or video is limited', () async { + stubPermissions({.photos: .granted, .videos: .limited, .mediaLocation: .granted}); + expect(await sut.galleryStatus(), DevicePermissionStatus.limited); + }); + }); + + test('does not ask for videos when photos was refused', () async { + stubPermissions({.photos: .permanentlyDenied}); + + expect(await sut.requestGallery(), DevicePermissionStatus.permanentlyDenied); + verifyNever(() => mocks.permission.repo.request(.videos)); + }); + }); +} diff --git a/mobile/test/unit/services/hash_service_test.dart b/mobile/test/unit/services/hash_service_test.dart index 07cf2badf9..2623042f4b 100644 --- a/mobile/test/unit/services/hash_service_test.dart +++ b/mobile/test/unit/services/hash_service_test.dart @@ -14,14 +14,11 @@ void main() { setUp(() { sut = HashService( - localAlbumRepository: mocks.localAlbum, - localAssetRepository: mocks.localAsset, - nativeSyncApi: mocks.nativeApi, + localAlbumRepository: mocks.localAlbum.repo, + localAssetRepository: mocks.localAsset.repo, + nativeSyncApi: mocks.nativeApi.api, trashedLocalAssetRepository: mocks.trashedAsset, ); - - when(() => mocks.localAsset.reconcileHashesFromCloudId()).thenAnswer((_) async => {}); - when(() => mocks.localAsset.updateHashes(any())).thenAnswer((_) async => {}); }); tearDown(() { @@ -32,22 +29,20 @@ void main() { group('hashAssets', () { test('skips albums with no assets to hash', () async { final album = LocalAlbumFactory.create(assetCount: 0); - when(() => mocks.localAlbum.getBackupAlbums()).thenAnswer((_) async => [album]); - when(() => mocks.localAlbum.getAssetsToHash(album.id)).thenAnswer((_) async => []); + when(mocks.localAlbum.getBackupAlbums).thenAnswer((_) async => [album]); await sut.hashAssets(); - verifyNever(() => mocks.nativeApi.hashAssets(any(), allowNetworkAccess: any(named: 'allowNetworkAccess'))); + verifyNever(mocks.nativeApi.hashAssets); }); test('skips empty batches', () async { final album = LocalAlbumFactory.create(); - when(() => mocks.localAlbum.getBackupAlbums()).thenAnswer((_) async => [album]); - when(() => mocks.localAlbum.getAssetsToHash(album.id)).thenAnswer((_) async => []); + when(mocks.localAlbum.getBackupAlbums).thenAnswer((_) async => [album]); await sut.hashAssets(); - verifyNever(() => mocks.nativeApi.hashAssets(any(), allowNetworkAccess: any(named: 'allowNetworkAccess'))); + verifyNever(mocks.nativeApi.hashAssets); }); test('processes assets when available', () async { @@ -55,15 +50,17 @@ void main() { final asset = LocalAssetFactory.create(); final result = HashResult(assetId: asset.id, hash: 'test-hash'); - when(() => mocks.localAlbum.getBackupAlbums()).thenAnswer((_) async => [album]); - when(() => mocks.localAlbum.getAssetsToHash(album.id)).thenAnswer((_) async => [asset]); - when(() => mocks.nativeApi.hashAssets([asset.id], allowNetworkAccess: false)).thenAnswer((_) async => [result]); + when(mocks.localAlbum.getBackupAlbums).thenAnswer((_) async => [album]); + when(() => mocks.localAlbum.repo.getAssetsToHash(album.id)).thenAnswer((_) async => [asset]); + when( + () => mocks.nativeApi.api.hashAssets([asset.id], allowNetworkAccess: false), + ).thenAnswer((_) async => [result]); await sut.hashAssets(); - verify(() => mocks.nativeApi.hashAssets([asset.id], allowNetworkAccess: false)).called(1); + verify(() => mocks.nativeApi.api.hashAssets([asset.id], allowNetworkAccess: false)).called(1); final captured = - verify(() => mocks.localAsset.updateHashes(captureAny())).captured.first as Map; + verify(() => mocks.localAsset.repo.updateHashes(captureAny())).captured.first as Map; expect(captured.length, 1); expect(captured[asset.id], result.hash); }); @@ -72,16 +69,16 @@ void main() { final album = LocalAlbumFactory.create(); final asset = LocalAssetFactory.create(); - when(() => mocks.localAlbum.getBackupAlbums()).thenAnswer((_) async => [album]); - when(() => mocks.localAlbum.getAssetsToHash(album.id)).thenAnswer((_) async => [asset]); + when(mocks.localAlbum.getBackupAlbums).thenAnswer((_) async => [album]); + when(() => mocks.localAlbum.repo.getAssetsToHash(album.id)).thenAnswer((_) async => [asset]); when( - () => mocks.nativeApi.hashAssets([asset.id], allowNetworkAccess: false), + () => mocks.nativeApi.api.hashAssets([asset.id], allowNetworkAccess: false), ).thenAnswer((_) async => [HashResult(assetId: asset.id, error: 'Failed to hash')]); await sut.hashAssets(); final captured = - verify(() => mocks.localAsset.updateHashes(captureAny())).captured.first as Map; + verify(() => mocks.localAsset.repo.updateHashes(captureAny())).captured.first as Map; expect(captured.length, 0); }); @@ -89,25 +86,25 @@ void main() { final album = LocalAlbumFactory.create(); final asset = LocalAssetFactory.create(); - when(() => mocks.localAlbum.getBackupAlbums()).thenAnswer((_) async => [album]); - when(() => mocks.localAlbum.getAssetsToHash(album.id)).thenAnswer((_) async => [asset]); + when(mocks.localAlbum.getBackupAlbums).thenAnswer((_) async => [album]); + when(() => mocks.localAlbum.repo.getAssetsToHash(album.id)).thenAnswer((_) async => [asset]); when( - () => mocks.nativeApi.hashAssets([asset.id], allowNetworkAccess: false), + () => mocks.nativeApi.api.hashAssets([asset.id], allowNetworkAccess: false), ).thenAnswer((_) async => [HashResult(assetId: asset.id, hash: null)]); await sut.hashAssets(); final captured = - verify(() => mocks.localAsset.updateHashes(captureAny())).captured.first as Map; + verify(() => mocks.localAsset.repo.updateHashes(captureAny())).captured.first as Map; expect(captured.length, 0); }); test('batches by size limit', () async { const batchSize = 2; final sut = HashService( - localAlbumRepository: mocks.localAlbum, - localAssetRepository: mocks.localAsset, - nativeSyncApi: mocks.nativeApi, + localAlbumRepository: mocks.localAlbum.repo, + localAssetRepository: mocks.localAsset.repo, + nativeSyncApi: mocks.nativeApi.api, batchSize: batchSize, trashedLocalAssetRepository: mocks.trashedAsset, ); @@ -119,12 +116,9 @@ void main() { final capturedCalls = >[]; - when(() => mocks.localAsset.updateHashes(any())).thenAnswer((_) async => {}); - when(() => mocks.localAlbum.getBackupAlbums()).thenAnswer((_) async => [album]); - when(() => mocks.localAlbum.getAssetsToHash(album.id)).thenAnswer((_) async => [asset1, asset2, asset3]); - when(() => mocks.nativeApi.hashAssets(any(), allowNetworkAccess: any(named: 'allowNetworkAccess'))).thenAnswer(( - invocation, - ) async { + when(mocks.localAlbum.getBackupAlbums).thenAnswer((_) async => [album]); + when(() => mocks.localAlbum.repo.getAssetsToHash(album.id)).thenAnswer((_) async => [asset1, asset2, asset3]); + when(mocks.nativeApi.hashAssets).thenAnswer((invocation) async { final assetIds = invocation.positionalArguments[0] as List; capturedCalls.add(List.from(assetIds)); return assetIds.map((id) => HashResult(assetId: id, hash: '$id-hash')).toList(); @@ -136,7 +130,7 @@ void main() { expect(capturedCalls[0], [asset1.id, asset2.id], reason: 'First call should batch the first two assets'); expect(capturedCalls[1], [asset3.id], reason: 'Second call should have the remaining asset'); - verify(() => mocks.localAsset.updateHashes(any())).called(2); + verify(() => mocks.localAsset.repo.updateHashes(any())).called(2); }); test('handles mixed success and failure in batch', () async { @@ -144,9 +138,9 @@ void main() { final asset1 = LocalAssetFactory.create(); final asset2 = LocalAssetFactory.create(); - when(() => mocks.localAlbum.getBackupAlbums()).thenAnswer((_) async => [album]); - when(() => mocks.localAlbum.getAssetsToHash(album.id)).thenAnswer((_) async => [asset1, asset2]); - when(() => mocks.nativeApi.hashAssets([asset1.id, asset2.id], allowNetworkAccess: false)).thenAnswer( + when(mocks.localAlbum.getBackupAlbums).thenAnswer((_) async => [album]); + when(() => mocks.localAlbum.repo.getAssetsToHash(album.id)).thenAnswer((_) async => [asset1, asset2]); + when(() => mocks.nativeApi.api.hashAssets([asset1.id, asset2.id], allowNetworkAccess: false)).thenAnswer( (_) async => [ HashResult(assetId: asset1.id, hash: 'asset1-hash'), HashResult(assetId: asset2.id, error: 'Failed to hash asset2'), @@ -156,7 +150,7 @@ void main() { await sut.hashAssets(); final captured = - verify(() => mocks.localAsset.updateHashes(captureAny())).captured.first as Map; + verify(() => mocks.localAsset.repo.updateHashes(captureAny())).captured.first as Map; expect(captured.length, 1); expect(captured[asset1.id], 'asset1-hash'); }); @@ -167,20 +161,18 @@ void main() { final asset1 = LocalAssetFactory.create(); final asset2 = LocalAssetFactory.create(); - when(() => mocks.localAlbum.getBackupAlbums()).thenAnswer((_) async => [selectedAlbum, nonSelectedAlbum]); - when(() => mocks.localAlbum.getAssetsToHash(selectedAlbum.id)).thenAnswer((_) async => [asset1]); - when(() => mocks.localAlbum.getAssetsToHash(nonSelectedAlbum.id)).thenAnswer((_) async => [asset2]); - when(() => mocks.nativeApi.hashAssets(any(), allowNetworkAccess: any(named: 'allowNetworkAccess'))).thenAnswer(( - invocation, - ) async { + when(mocks.localAlbum.getBackupAlbums).thenAnswer((_) async => [selectedAlbum, nonSelectedAlbum]); + when(() => mocks.localAlbum.repo.getAssetsToHash(selectedAlbum.id)).thenAnswer((_) async => [asset1]); + when(() => mocks.localAlbum.repo.getAssetsToHash(nonSelectedAlbum.id)).thenAnswer((_) async => [asset2]); + when(mocks.nativeApi.hashAssets).thenAnswer((invocation) async { final assetIds = invocation.positionalArguments[0] as List; return assetIds.map((id) => HashResult(assetId: id, hash: '$id-hash')).toList(); }); await sut.hashAssets(); - verify(() => mocks.nativeApi.hashAssets([asset1.id], allowNetworkAccess: true)).called(1); - verify(() => mocks.nativeApi.hashAssets([asset2.id], allowNetworkAccess: false)).called(1); + verify(() => mocks.nativeApi.api.hashAssets([asset1.id], allowNetworkAccess: true)).called(1); + verify(() => mocks.nativeApi.api.hashAssets([asset2.id], allowNetworkAccess: false)).called(1); }); }); }); diff --git a/mobile/test/unit/services/remote_album_service_test.dart b/mobile/test/unit/services/remote_album_service_test.dart new file mode 100644 index 0000000000..9417f14653 --- /dev/null +++ b/mobile/test/unit/services/remote_album_service_test.dart @@ -0,0 +1,48 @@ +import 'package:flutter_test/flutter_test.dart'; +import 'package:immich_mobile/domain/services/remote_album.service.dart'; +import 'package:mocktail/mocktail.dart'; + +import '../../service.mocks.dart'; +import '../mocks.dart'; + +void main() { + late RemoteAlbumService sut; + final mocks = RepositoryMocks(); + + setUpAll(() { + registerFallbackValue([]); + }); + + setUp(() { + sut = RemoteAlbumService(mocks.remoteAlbum, mocks.albumApi, MockForegroundUploadService()); + }); + + tearDown(() { + mocks.resetAll(); + }); + + group('RemoteAlbumService', () { + group('removeAssets', () { + test('persists only the assets the server actually removed, not the whole request', () async { + const albumId = 'album-1'; + const requested = ['asset-1', 'asset-2', 'asset-3']; + const removed = ['asset-1', 'asset-3']; + + // The server rejected 'asset-2' + when( + () => mocks.albumApi.removeAssets(albumId, requested), + ).thenAnswer((_) async => (removed: removed, failed: ['asset-2'])); + when(() => mocks.remoteAlbum.removeAssets(albumId, any())).thenAnswer((_) async {}); + + final count = await sut.removeAssets(albumId: albumId, assetIds: requested); + + final persisted = + verify(() => mocks.remoteAlbum.removeAssets(albumId, captureAny())).captured.single as List; + expect(persisted, removed); + expect(persisted, isNot(contains('asset-2'))); + + expect(count, removed.length); + }); + }); + }); +} diff --git a/mobile/test/unit/utils/asset_filter_test.dart b/mobile/test/unit/utils/asset_filter_test.dart new file mode 100644 index 0000000000..1db287b346 --- /dev/null +++ b/mobile/test/unit/utils/asset_filter_test.dart @@ -0,0 +1,200 @@ +import 'package:flutter_test/flutter_test.dart'; +import 'package:immich_mobile/domain/models/asset/base_asset.model.dart'; +import 'package:immich_mobile/utils/asset_filter.dart'; + +import '../factories/local_asset_factory.dart'; +import '../factories/remote_asset_factory.dart'; + +void main() { + group('AssetFilter', () { + group('type promotion', () { + test('a bare filter retains every BaseAsset', () { + final remoteAsset = RemoteAssetFactory.create(); + final localAsset = LocalAssetFactory.create(); + + final AssetFilter filter = AssetFilter([remoteAsset, localAsset]); + + expect(filter.toList(), [remoteAsset, localAsset]); + }); + + test('remote keeps only remote assets', () { + final remoteAsset = RemoteAssetFactory.create(); + final localAsset = LocalAssetFactory.create(); + + final AssetFilter remoteOnly = AssetFilter([remoteAsset, localAsset]).remote(); + + expect(remoteOnly.toList(), [remoteAsset]); + }); + + test('local keeps only local assets', () { + final remoteAsset = RemoteAssetFactory.create(); + final localAsset = LocalAssetFactory.create(); + + final AssetFilter localOnly = AssetFilter([remoteAsset, localAsset]).local(); + + expect(localOnly.toList(), [localAsset]); + }); + + test('owned promotes to RemoteAsset and drops local assets', () { + final remoteAsset = RemoteAssetFactory.create(); + final localAsset = LocalAssetFactory.create(); + + final AssetFilter remoteOnly = AssetFilter([ + remoteAsset, + localAsset, + ]).owned(remoteAsset.ownerId); + + expect(remoteOnly.toList(), [remoteAsset]); + }); + + test('backedUp promotes to LocalAsset and drops remote assets', () { + final syncedPhoto = LocalAssetFactory.create().copyWith(remoteId: 'remote'); + final offlinePhoto = LocalAssetFactory.create(); + final remotePhoto = RemoteAssetFactory.create(); + + final AssetFilter syncedPhotos = AssetFilter([ + syncedPhoto, + offlinePhoto, + remotePhoto, + ]).backedUp(); + + expect(syncedPhotos.toList(), [syncedPhoto]); + }); + }); + + group('named filters', () { + test('owned keeps only assets of the given owner', () { + final asset1 = RemoteAssetFactory.create(); + final asset2 = RemoteAssetFactory.create(); + + final alexPhotos = AssetFilter([asset1, asset2]).owned(asset1.ownerId); + + expect(alexPhotos.toList(), [asset1]); + }); + + test('favorites keeps only favorite assets', () { + final asset1 = RemoteAssetFactory.create(isFavorite: true); + final asset2 = RemoteAssetFactory.create(ownerId: asset1.ownerId); + + final favorites = AssetFilter([asset1, asset2]).favorite(); + + expect(favorites.toList(), [asset1]); + }); + + test('type keeps only assets of the given type', () { + final image = RemoteAssetFactory.create(); + final video = RemoteAssetFactory.create(ownerId: image.ownerId).copyWith(type: .video); + + final videos = AssetFilter([image, video]).type(.video); + + expect(videos.toList(), [video]); + }); + + test('visibility keeps only assets with the given visibility', () { + final locked = RemoteAssetFactory.create(visibility: AssetVisibility.locked); + final onTimeline = RemoteAssetFactory.create(ownerId: locked.ownerId); + + final lockedPhotos = AssetFilter([locked, onTimeline]).visibility(.locked); + + expect(lockedPhotos.toList(), [locked]); + }); + + test('archived keeps only archived assets', () { + final archived = RemoteAssetFactory.create(visibility: AssetVisibility.archive); + final onTimeline = RemoteAssetFactory.create(ownerId: archived.ownerId); + + final archivedPhotos = AssetFilter([archived, onTimeline]).archived(); + + expect(archivedPhotos.toList(), [archived]); + }); + + test('stacked keeps only assets belonging to a stack', () { + final stacked = RemoteAssetFactory.create(stackId: 'stack'); + final loose = RemoteAssetFactory.create(ownerId: stacked.ownerId); + + final stackedPhotos = AssetFilter([stacked, loose]).stacked(); + + expect(stackedPhotos.toList(), [stacked]); + }); + }); + + group('inversion', () { + test('notArchived keeps every non-archived visibility', () { + final archived = RemoteAssetFactory.create(visibility: AssetVisibility.archive); + final onTimeline = RemoteAssetFactory.create(ownerId: archived.ownerId, visibility: AssetVisibility.timeline); + final hidden = RemoteAssetFactory.create(ownerId: archived.ownerId, visibility: AssetVisibility.hidden); + final locked = RemoteAssetFactory.create(ownerId: archived.ownerId, visibility: AssetVisibility.locked); + + final visiblePhotos = AssetFilter([archived, onTimeline, hidden, locked]).archived(isArchived: false); + + expect(visiblePhotos.toSet(), {onTimeline, hidden, locked}); + }); + + test('notVisibility keeps every asset not at the target visibility', () { + final archived = RemoteAssetFactory.create(visibility: AssetVisibility.archive); + final onTimeline = RemoteAssetFactory.create(ownerId: archived.ownerId, visibility: AssetVisibility.timeline); + final locked = RemoteAssetFactory.create(ownerId: archived.ownerId, visibility: AssetVisibility.locked); + + final toArchive = AssetFilter([archived, onTimeline, locked]).notVisibility(.archive); + + expect(toArchive.toSet(), {onTimeline, locked}); + }); + + test('notStacked keeps only assets without a stack', () { + final stacked = RemoteAssetFactory.create(stackId: 'stack'); + final loose = RemoteAssetFactory.create(ownerId: stacked.ownerId); + + final loosePhotos = AssetFilter([stacked, loose]).stacked(isStacked: false); + + expect(loosePhotos.toList(), [loose]); + }); + + test('whereNot inverts an arbitrary predicate', () { + final favorite = RemoteAssetFactory.create(isFavorite: true); + final regular = RemoteAssetFactory.create(ownerId: favorite.ownerId); + + final nonFavorites = AssetFilter([favorite, regular]).whereNot((asset) => asset.isFavorite); + + expect(nonFavorites.toList(), [regular]); + }); + + test('notFavorites keeps only non-favorite assets', () { + final favorite = RemoteAssetFactory.create(isFavorite: true); + final regular = RemoteAssetFactory.create(ownerId: favorite.ownerId); + + final nonFavorites = AssetFilter([favorite, regular]).favorite(isFavorite: false); + + expect(nonFavorites.toList(), [regular]); + }); + }); + + group('chaining', () { + test('combines predicates across owner, visibility and stack', () { + final asset = RemoteAssetFactory.create(); + final wrongOwner = RemoteAssetFactory.create(); + final archived = RemoteAssetFactory.create(ownerId: asset.ownerId, visibility: AssetVisibility.archive); + final stacked = RemoteAssetFactory.create(ownerId: asset.ownerId, stackId: 'stack-1'); + final localPhoto = LocalAssetFactory.create(); + + final result = AssetFilter([ + asset, + wrongOwner, + archived, + stacked, + localPhoto, + ]).owned(asset.ownerId).archived(isArchived: false).stacked(isStacked: false); + + expect(result.toList(), [asset]); + }); + + test('a base filter after a promotion retains the promoted type', () { + final favorite = RemoteAssetFactory.create(isFavorite: true); + final regular = RemoteAssetFactory.create(ownerId: favorite.ownerId); + + final AssetFilter result = AssetFilter([favorite, regular]).owned(favorite.ownerId).favorite(); + + expect(result.toList(), [favorite]); + }); + }); + }); +} diff --git a/mobile/test/unit/utils/editor_test.dart b/mobile/test/unit/utils/editor_test.dart index 82cf584f76..6f3f41f374 100644 --- a/mobile/test/unit/utils/editor_test.dart +++ b/mobile/test/unit/utils/editor_test.dart @@ -4,7 +4,7 @@ import 'package:immich_mobile/utils/editor.utils.dart'; import 'package:openapi/api.dart' show MirrorAxis, MirrorParameters, RotateParameters; List normalizedToEdits(NormalizedTransform transform) { - List edits = []; + final List edits = []; if (transform.mirrorHorizontal) { edits.add(MirrorEdit(MirrorParameters(axis: MirrorAxis.horizontal))); @@ -25,10 +25,10 @@ bool compareEditAffines(List editsA, List editsB) { final normA = buildAffineFromEdits(editsA); final normB = buildAffineFromEdits(editsB); - return ((normA.a - normB.a).abs() < 0.0001 && + return (normA.a - normB.a).abs() < 0.0001 && (normA.b - normB.b).abs() < 0.0001 && (normA.c - normB.c).abs() < 0.0001 && - (normA.d - normB.d).abs() < 0.0001); + (normA.d - normB.d).abs() < 0.0001; } void main() { diff --git a/mobile/test/unit/utils/value_codec_test.dart b/mobile/test/unit/utils/value_codec_test.dart new file mode 100644 index 0000000000..8754af1e95 --- /dev/null +++ b/mobile/test/unit/utils/value_codec_test.dart @@ -0,0 +1,99 @@ +import 'package:flutter_test/flutter_test.dart'; +import 'package:immich_mobile/domain/models/value_codec.dart'; + +enum _Fruit { apple, banana, cherry } + +void main() { + group('MapCodec', () { + group('encode', () { + test('serializes an empty map to an empty JSON object', () { + const codec = MapCodec(PrimitiveCodec.string, PrimitiveCodec.string); + expect(codec.encode({}), '{}'); + }); + + test('encodes a string-to-string map as a JSON object', () { + const codec = MapCodec(PrimitiveCodec.string, PrimitiveCodec.string); + expect(codec.encode({'a': '1', 'b': '2'}), '{"a":"1","b":"2"}'); + }); + + test('stringifies non-string values via the value codec', () { + const codec = MapCodec(PrimitiveCodec.string, PrimitiveCodec.integer); + expect(codec.encode({'x': 10, 'y': 20}), '{"x":"10","y":"20"}'); + }); + + test('stringifies non-string keys via the key codec', () { + const codec = MapCodec(PrimitiveCodec.integer, PrimitiveCodec.string); + expect(codec.encode({1: 'one', 2: 'two'}), '{"1":"one","2":"two"}'); + }); + }); + + group('decode', () { + test('reconstructs a string-to-string map', () { + const codec = MapCodec(PrimitiveCodec.string, PrimitiveCodec.string); + expect(codec.decode('{"a":"1","b":"2"}'), {'a': '1', 'b': '2'}); + }); + + test('parses values back to their domain type', () { + const codec = MapCodec(PrimitiveCodec.string, PrimitiveCodec.integer); + expect(codec.decode('{"x":"10","y":"20"}'), {'x': 10, 'y': 20}); + }); + + test('parses keys back to their domain type', () { + const codec = MapCodec(PrimitiveCodec.integer, PrimitiveCodec.string); + expect(codec.decode('{"1":"one","2":"two"}'), {1: 'one', 2: 'two'}); + }); + + test('returns an empty map for an empty JSON object', () { + const codec = MapCodec(PrimitiveCodec.string, PrimitiveCodec.string); + expect(codec.decode('{}'), isEmpty); + }); + + test('returns an empty map when the payload is not valid JSON', () { + const codec = MapCodec(PrimitiveCodec.string, PrimitiveCodec.string); + expect(codec.decode('not json'), isEmpty); + }); + + test('returns an empty map when the JSON root is not an object', () { + const codec = MapCodec(PrimitiveCodec.string, PrimitiveCodec.string); + expect(codec.decode('[]'), isEmpty); + expect(codec.decode('"a string"'), isEmpty); + expect(codec.decode('42'), isEmpty); + }); + + test('skips entries whose value is not a JSON string, keeping the rest', () { + const codec = MapCodec(PrimitiveCodec.string, PrimitiveCodec.integer); + expect(codec.decode('{"x":1,"y":"20"}'), {'y': 20}); + }); + + test('skips entries whose value is a nested object, keeping the rest', () { + const codec = MapCodec(PrimitiveCodec.string, PrimitiveCodec.string); + expect(codec.decode('{"a":{"nested":"value"},"b":"ok"}'), {'b': 'ok'}); + }); + + test('returns an empty map when every entry is malformed', () { + const codec = MapCodec(PrimitiveCodec.string, PrimitiveCodec.integer); + expect(codec.decode('{"x":1,"y":2}'), isEmpty); + }); + }); + + group('round trip', () { + test('preserves a primitive map through encode then decode', () { + const codec = MapCodec(PrimitiveCodec.string, PrimitiveCodec.integer); + const original = {'one': 1, 'two': 2, 'three': 3}; + expect(codec.decode(codec.encode(original)), original); + }); + + test('preserves an enum-valued map by composing with EnumCodec', () { + const codec = MapCodec(PrimitiveCodec.string, EnumCodec(_Fruit.values)); + const original = {'breakfast': _Fruit.banana, 'snack': _Fruit.apple}; + expect(codec.decode(codec.encode(original)), original); + }); + + test('preserves a DateTime-valued map by composing with DateTimeCodec', () { + const codec = MapCodec(PrimitiveCodec.string, DateTimeCodec()); + final original = {'created': DateTime.utc(2024, 1, 1, 12, 30)}; + expect(codec.decode(codec.encode(original)), original); + }); + }); + }); +} diff --git a/mobile/test/utils/image_url_builder_test.dart b/mobile/test/utils/image_url_builder_test.dart new file mode 100644 index 0000000000..1845d38eeb --- /dev/null +++ b/mobile/test/utils/image_url_builder_test.dart @@ -0,0 +1,35 @@ +import 'package:drift/drift.dart'; +import 'package:drift/native.dart'; +import 'package:flutter_test/flutter_test.dart'; +import 'package:immich_mobile/domain/models/store.model.dart'; +import 'package:immich_mobile/domain/services/store.service.dart'; +import 'package:immich_mobile/infrastructure/repositories/db.repository.dart'; +import 'package:immich_mobile/infrastructure/repositories/store.repository.dart'; +import 'package:immich_mobile/utils/image_url_builder.dart'; + +void main() { + const endpoint = 'http://localhost:3000'; + + setUpAll(() async { + final db = Drift(DatabaseConnection(NativeDatabase.memory(), closeStreamsSynchronously: true)); + await StoreService.init(storeRepository: DriftStoreRepository(db), listenUpdates: false); + await StoreService.I.put(StoreKey.serverEndpoint, endpoint); + }); + + group('getFaceThumbnailUrl', () { + test('omits the cache buster when updatedAt is null', () { + expect(getFaceThumbnailUrl('person-1'), '$endpoint/people/person-1/thumbnail'); + }); + + test('appends the updatedAt cache buster so a changed featured photo busts the cache (#27434)', () { + final url = getFaceThumbnailUrl('person-1', updatedAt: DateTime.fromMillisecondsSinceEpoch(1717000000000)); + expect(url, '$endpoint/people/person-1/thumbnail?c=1717000000000'); + }); + + test('a newer updatedAt yields a different url so the image cache key changes', () { + final before = getFaceThumbnailUrl('person-1', updatedAt: DateTime.fromMillisecondsSinceEpoch(1)); + final after = getFaceThumbnailUrl('person-1', updatedAt: DateTime.fromMillisecondsSinceEpoch(2)); + expect(before, isNot(after)); + }); + }); +} diff --git a/mobile/test/utils_legacy/action_button_utils_test.dart b/mobile/test/utils_legacy/action_button_utils_test.dart index 0a6020762a..65e1cad7f7 100644 --- a/mobile/test/utils_legacy/action_button_utils_test.dart +++ b/mobile/test/utils_legacy/action_button_utils_test.dart @@ -427,60 +427,6 @@ void main() { }); }); - group('trash button', () { - test('should show when owner, not locked, has remote, and trash enabled', () { - final remoteAsset = createRemoteAsset(); - final context = ActionButtonContext( - asset: remoteAsset, - isOwner: true, - isArchived: false, - isTrashEnabled: true, - isInLockedView: false, - currentAlbum: null, - advancedTroubleshooting: false, - isStacked: false, - source: ActionSource.timeline, - ); - - expect(ActionButtonType.trash.shouldShow(context), isTrue); - }); - - test('should not show when trash disabled', () { - final remoteAsset = createRemoteAsset(); - final context = ActionButtonContext( - asset: remoteAsset, - isOwner: true, - isArchived: false, - isTrashEnabled: false, - isInLockedView: false, - currentAlbum: null, - advancedTroubleshooting: false, - isStacked: false, - source: ActionSource.timeline, - ); - - expect(ActionButtonType.trash.shouldShow(context), isFalse); - }); - - test('should not show when asset is already trashed', () { - final remoteAsset = createRemoteAsset(deletedAt: DateTime(2024)); - final context = ActionButtonContext( - asset: remoteAsset, - isOwner: true, - isArchived: false, - isTrashEnabled: true, - isInLockedView: false, - currentAlbum: null, - advancedTroubleshooting: false, - isStacked: false, - source: ActionSource.viewer, - timelineOrigin: TimelineOrigin.trash, - ); - - expect(ActionButtonType.trash.shouldShow(context), isFalse); - }); - }); - group('restoreTrash button', () { test('should show when owner, not locked, has remote, and is in trash timeline', () { final remoteAsset = createRemoteAsset(); @@ -519,60 +465,6 @@ void main() { }); }); - group('deletePermanent button', () { - test('should show when owner, not locked, has remote, and trash disabled', () { - final remoteAsset = createRemoteAsset(); - final context = ActionButtonContext( - asset: remoteAsset, - isOwner: true, - isArchived: false, - isTrashEnabled: false, - isInLockedView: false, - currentAlbum: null, - advancedTroubleshooting: false, - isStacked: false, - source: ActionSource.timeline, - ); - - expect(ActionButtonType.deletePermanent.shouldShow(context), isTrue); - }); - - test('should not show when trash enabled', () { - final remoteAsset = createRemoteAsset(); - final context = ActionButtonContext( - asset: remoteAsset, - isOwner: true, - isArchived: false, - isTrashEnabled: true, - isInLockedView: false, - currentAlbum: null, - advancedTroubleshooting: false, - isStacked: false, - source: ActionSource.timeline, - ); - - expect(ActionButtonType.deletePermanent.shouldShow(context), isFalse); - }); - - test('should show when asset is trashed even with trash enabled', () { - final remoteAsset = createRemoteAsset(deletedAt: DateTime(2024)); - final context = ActionButtonContext( - asset: remoteAsset, - isOwner: true, - isArchived: false, - isTrashEnabled: true, - isInLockedView: false, - currentAlbum: null, - advancedTroubleshooting: false, - isStacked: false, - source: ActionSource.viewer, - timelineOrigin: TimelineOrigin.trash, - ); - - expect(ActionButtonType.deletePermanent.shouldShow(context), isTrue); - }); - }); - group('delete button', () { test('should show when owner, not locked, and has remote', () { final remoteAsset = createRemoteAsset(); @@ -612,7 +504,7 @@ void main() { }); group('deleteLocal button', () { - test('should show when not locked and asset is local only', () { + test('should not show when asset is local only, as there is no backup to fall back on', () { final localAsset = createLocalAsset(); final context = ActionButtonContext( asset: localAsset, @@ -626,7 +518,7 @@ void main() { source: ActionSource.timeline, ); - expect(ActionButtonType.deleteLocal.shouldShow(context), isTrue); + expect(ActionButtonType.deleteLocal.shouldShow(context), isFalse); }); test('should not show when asset is not local only', () { @@ -1074,7 +966,7 @@ void main() { test('should build correct widget for each button type', () { for (final buttonType in ActionButtonType.values) { - var buttonContext = context; + final buttonContext = context; if (buttonType == ActionButtonType.removeFromAlbum) { final album = createRemoteAlbum(); diff --git a/mobile/test/widget_tester_extensions.dart b/mobile/test/widget_tester_extensions.dart index bb3fc3f418..5f43a80b89 100644 --- a/mobile/test/widget_tester_extensions.dart +++ b/mobile/test/widget_tester_extensions.dart @@ -1,27 +1,51 @@ +import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; +import 'package:immich_mobile/constants/locales.dart'; +import 'package:immich_mobile/generated/codegen_loader.g.dart'; extension PumpConsumerWidget on WidgetTester { - /// Wraps the provided [widget] with Material app such that it becomes: + /// Wraps the provided [widget] with a localized Material app such that it + /// becomes: + /// + /// EasyLocalization + /// |-ProviderScope + /// |-MaterialApp (localization delegates wired up) + /// |-Material + /// |-[widget] /// - /// ProviderScope - /// |-MaterialApp - /// |-Material - /// |-[widget] Future pumpConsumerWidget( Widget widget, { Duration? duration, EnginePhase phase = EnginePhase.sendSemanticsUpdate, List overrides = const [], }) async { - return pumpWidget( - ProviderScope( - overrides: overrides, - child: MaterialApp(debugShowCheckedModeBanner: false, home: Material(child: widget)), + await pumpWidget( + EasyLocalization( + supportedLocales: locales.values.toList(), + path: translationsPath, + startLocale: locales.values.first, + fallbackLocale: locales.values.first, + saveLocale: false, + useFallbackTranslations: true, + assetLoader: const CodegenLoader(), + child: ProviderScope( + overrides: overrides, + child: Builder( + builder: (context) => MaterialApp( + debugShowCheckedModeBanner: false, + localizationsDelegates: context.localizationDelegates, + supportedLocales: context.supportedLocales, + locale: context.locale, + home: Material(child: widget), + ), + ), + ), ), duration: duration, phase: phase, ); + await pumpAndSettle(); } } diff --git a/open-api/bin/generate-dart-sdk.sh b/open-api/bin/generate-dart-sdk.sh index 793c1f8df3..200926afdf 100755 --- a/open-api/bin/generate-dart-sdk.sh +++ b/open-api/bin/generate-dart-sdk.sh @@ -1,29 +1,25 @@ #!/usr/bin/env bash -OPENAPI_GENERATOR_VERSION=v7.22.0 - set -euo pipefail # usage: ./bin/generate-dart-sdk.sh -rm -rf ../mobile/openapi +TEMPLATE_DIR=$(mktemp -d) +trap 'rm -rf "$TEMPLATE_DIR"' EXIT -cd ./templates/mobile/serialization/native -wget -O native_class.mustache https://raw.githubusercontent.com/OpenAPITools/openapi-generator/$OPENAPI_GENERATOR_VERSION/modules/openapi-generator/src/main/resources/dart2/serialization/native/native_class.mustache -patch --no-backup-if-mismatch -u native_class.mustache headerParams, - Map formParams, -- String? contentType, -- ) async { -+ String? contentType, { -+ Future? abortTrigger, -+ }) async { - await authentication?.applyToParams(queryParams, headerParams); - - headerParams.addAll(_defaultHeaderMap); -@@ -63,7 +64,7 @@ - body is MultipartFile && (contentType == null || - !contentType.toLowerCase().startsWith('multipart/form-data')) - ) { -- final request = StreamedRequest(method, uri); -+ final request = AbortableStreamedRequest(method, uri, abortTrigger: abortTrigger); - request.headers.addAll(headerParams); - request.contentLength = body.length; - body.finalize().listen( -@@ -78,7 +79,7 @@ - } - - if (body is MultipartRequest) { -- final request = MultipartRequest(method, uri); -+ final request = AbortableMultipartRequest(method, uri, abortTrigger: abortTrigger); - request.fields.addAll(body.fields); - request.files.addAll(body.files); - request.headers.addAll(body.headers); -@@ -92,14 +93,19 @@ - : await serializeAsync(body); - final nullableHeaderParams = headerParams.isEmpty ? null : headerParams; - -- switch(method) { -- case 'POST': return await _client.post(uri, headers: nullableHeaderParams, body: msgBody,); -- case 'PUT': return await _client.put(uri, headers: nullableHeaderParams, body: msgBody,); -- case 'DELETE': return await _client.delete(uri, headers: nullableHeaderParams, body: msgBody,); -- case 'PATCH': return await _client.patch(uri, headers: nullableHeaderParams, body: msgBody,); -- case 'HEAD': return await _client.head(uri, headers: nullableHeaderParams,); -- case 'GET': return await _client.get(uri, headers: nullableHeaderParams,); -+ final request = AbortableRequest(method, uri, abortTrigger: abortTrigger); -+ if (nullableHeaderParams != null) { -+ request.headers.addAll(nullableHeaderParams); - } -+ if (msgBody is String) { -+ request.body = msgBody; -+ } else if (msgBody is List) { -+ request.bodyBytes = msgBody; -+ } else if (msgBody is Map) { -+ request.bodyFields = msgBody; -+ } -+ final response = await _client.send(request); -+ return Response.fromStream(response); - } on SocketException catch (error, trace) { - throw ApiException.withInner( - HttpStatus.badRequest, -@@ -136,26 +146,21 @@ - trace, - ); - } -- -- throw ApiException( -- HttpStatus.badRequest, -- 'Invalid HTTP operation: $method $path', -- ); +@@ -143,19 +143,19 @@ + ); } - + - Future deserializeAsync(String value, String targetType, {bool growable = false,}) async => + Future deserializeAsync(String value, String targetType, {bool growable = false,}) => // ignore: deprecated_member_use_from_same_package deserialize(value, targetType, growable: growable); - + @Deprecated('Scheduled for removal in OpenAPI Generator 6.x. Use deserializeAsync() instead.') - dynamic deserialize(String value, String targetType, {bool growable = false,}) { + Future deserialize(String value, String targetType, {bool growable = false,}) async { // Remove all spaces. Necessary for regular expressions as well. targetType = targetType.replaceAll(' ', ''); // ignore: parameter_assignments - + // If the expected target type is String, nothing to do... return targetType == 'String' ? value - : fromJson(json.decode(value), targetType, growable: growable); + : fromJson(await compute((String j) => json.decode(j), value), targetType, growable: growable); } - - // ignore: deprecated_member_use_from_same_package diff --git a/open-api/patch/pubspec_immich_mobile.yaml.patch b/open-api/patch/pubspec_immich_mobile.yaml.patch index ad3bbc2edd..be210f864f 100644 --- a/open-api/patch/pubspec_immich_mobile.yaml.patch +++ b/open-api/patch/pubspec_immich_mobile.yaml.patch @@ -6,4 +6,4 @@ -dev_dependencies: - test: '>=1.21.6 <1.22.0' + immich_mobile: -+ path: ../ ++ path: ../../ diff --git a/open-api/patch/time_bucket_asset_response_dto.dart.patch b/open-api/patch/time_bucket_asset_response_dto.dart.patch deleted file mode 100644 index 0ff420c4eb..0000000000 --- a/open-api/patch/time_bucket_asset_response_dto.dart.patch +++ /dev/null @@ -1,9 +0,0 @@ -@@ -83,7 +83,7 @@ - List ratio; - - /// Array of stack information as [stackId, assetCount] tuples (null for non-stacked assets) -- Optional>?> stack; -+ Optional?>?> stack; - - /// Array of BlurHash strings for generating asset previews (base64 encoded) - List thumbhash; diff --git a/open-api/templates/mobile/api.mustache b/open-api/templates/mobile/api.mustache deleted file mode 100644 index 8c6d2bb96e..0000000000 --- a/open-api/templates/mobile/api.mustache +++ /dev/null @@ -1,196 +0,0 @@ -{{>header}} -{{>part_of}} - -{{#operations}} - -class {{{classname}}} { - {{{classname}}}([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient; - - final ApiClient apiClient; - {{#operation}} - - {{#summary}} - /// {{{.}}} - {{/summary}} - {{#notes}} - {{#summary}} - /// - {{/summary}} - /// {{{notes}}} - /// - /// Note: This method returns the HTTP [Response]. - {{/notes}} - {{^notes}} - {{#summary}} - /// - /// Note: This method returns the HTTP [Response]. - {{/summary}} - {{^summary}} - /// Performs an HTTP '{{{httpMethod}}} {{{path}}}' operation and returns the [Response]. - {{/summary}} - {{/notes}} - {{#hasParams}} - {{#summary}} - /// - {{/summary}} - {{^summary}} - {{#notes}} - /// - {{/notes}} - {{/summary}} - /// Parameters: - /// - {{/hasParams}} - {{#allParams}} - /// * [{{{dataType}}}] {{{paramName}}}{{#required}} (required){{/required}}{{#optional}} (optional){{/optional}}: - {{#description}} - /// {{{.}}} - {{/description}} - {{^-last}} - /// - {{/-last}} - {{/allParams}} - Future {{{nickname}}}WithHttpInfo({{#allParams}}{{#required}}{{{dataType}}} {{{paramName}}}, {{/required}}{{/allParams}}{ {{#allParams}}{{^required}}{{{dataType}}}? {{{paramName}}}, {{/required}}{{/allParams}}Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'{{{path}}}'{{#pathParams}} - .replaceAll({{=<% %>=}}'{<% baseName %>}'<%={{ }}=%>, {{{paramName}}}{{^isString}}.toString(){{/isString}}){{/pathParams}}; - - // ignore: prefer_final_locals - Object? postBody{{#bodyParam}} = {{{paramName}}}{{/bodyParam}}; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - {{#hasQueryParams}} - - {{#queryParams}} - {{^required}} - if ({{{paramName}}} != null) { - {{/required}} - queryParams.addAll(_queryParams('{{{collectionFormat}}}', '{{{baseName}}}', {{{paramName}}})); - {{^required}} - } - {{/required}} - {{/queryParams}} - {{/hasQueryParams}} - {{#hasHeaderParams}} - - {{#headerParams}} - {{#required}} - headerParams[r'{{{baseName}}}'] = parameterToString({{{paramName}}}); - {{/required}} - {{^required}} - if ({{{paramName}}} != null) { - headerParams[r'{{{baseName}}}'] = parameterToString({{{paramName}}}); - } - {{/required}} - {{/headerParams}} - {{/hasHeaderParams}} - - const contentTypes = [{{#prioritizedContentTypes}}'{{{mediaType}}}'{{^-last}}, {{/-last}}{{/prioritizedContentTypes}}]; - - {{#isMultipart}} - bool hasFields = false; - final mp = MultipartRequest('{{{httpMethod}}}', Uri.parse(apiPath)); - {{#formParams}} - {{^isFile}} - if ({{{paramName}}} != null) { - hasFields = true; - mp.fields[r'{{{baseName}}}'] = parameterToString({{{paramName}}}); - } - {{/isFile}} - {{#isFile}} - if ({{{paramName}}} != null) { - hasFields = true; - mp.fields[r'{{{baseName}}}'] = {{{paramName}}}.field; - mp.files.add({{{paramName}}}); - } - {{/isFile}} - {{/formParams}} - if (hasFields) { - postBody = mp; - } - {{/isMultipart}} - {{^isMultipart}} - {{#formParams}} - {{^isFile}} - if ({{{paramName}}} != null) { - formParams[r'{{{baseName}}}'] = parameterToString({{{paramName}}}); - } - {{/isFile}} - {{/formParams}} - {{/isMultipart}} - - return apiClient.invokeAPI( - apiPath, - '{{{httpMethod}}}', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - {{#summary}} - /// {{{.}}} - {{/summary}} - {{#notes}} - {{#summary}} - /// - {{/summary}} - /// {{{notes}}} - {{/notes}} - {{#hasParams}} - {{#summary}} - /// - {{/summary}} - {{^summary}} - {{#notes}} - /// - {{/notes}} - {{/summary}} - /// Parameters: - /// - {{/hasParams}} - {{#allParams}} - /// * [{{{dataType}}}] {{{paramName}}}{{#required}} (required){{/required}}{{#optional}} (optional){{/optional}}: - {{#description}} - /// {{{.}}} - {{/description}} - {{^-last}} - /// - {{/-last}} - {{/allParams}} - Future<{{#returnType}}{{{.}}}?{{/returnType}}{{^returnType}}void{{/returnType}}> {{{nickname}}}({{#allParams}}{{#required}}{{{dataType}}} {{{paramName}}}, {{/required}}{{/allParams}}{ {{#allParams}}{{^required}}{{{dataType}}}? {{{paramName}}}, {{/required}}{{/allParams}}Future? abortTrigger, }) async { - final response = await {{{nickname}}}WithHttpInfo({{#allParams}}{{#required}}{{{paramName}}}, {{/required}}{{/allParams}}{{#allParams}}{{^required}}{{{paramName}}}: {{{paramName}}}, {{/required}}{{/allParams}}abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - {{#returnType}} - // 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) { - {{#native_serialization}} - {{#isArray}} - final responseBody = await _decodeBodyBytes(response); - return (await apiClient.deserializeAsync(responseBody, '{{{returnType}}}') as List) - .cast<{{{returnBaseType}}}>() - .{{#uniqueItems}}toSet(){{/uniqueItems}}{{^uniqueItems}}toList(growable: false){{/uniqueItems}}; - {{/isArray}} - {{^isArray}} - {{#isMap}} - return {{{returnType}}}.from(await apiClient.deserializeAsync(await _decodeBodyBytes(response), '{{{returnType}}}'),); - {{/isMap}} - {{^isMap}} - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), '{{{returnType}}}',) as {{{returnType}}}; - {{/isMap}}{{/isArray}}{{/native_serialization}} - } - return null; - {{/returnType}} - } - {{/operation}} -} -{{/operations}} diff --git a/open-api/templates/mobile/api.mustache.patch b/open-api/templates/mobile/api.mustache.patch index feb5f40047..8222ca4c2e 100644 --- a/open-api/templates/mobile/api.mustache.patch +++ b/open-api/templates/mobile/api.mustache.patch @@ -1,11 +1,8 @@ --- api.mustache +++ api.mustache.modified -@@ -49,9 +49,9 @@ - /// - {{/-last}} +@@ -51,7 +51,7 @@ {{/allParams}} -- Future {{{nickname}}}WithHttpInfo({{#allParams}}{{#required}}{{{dataType}}} {{{paramName}}},{{^-last}} {{/-last}}{{/required}}{{/allParams}}{{#hasOptionalParams}}{ {{#allParams}}{{^required}}{{{dataType}}}? {{{paramName}}},{{^-last}} {{/-last}}{{/required}}{{/allParams}} }{{/hasOptionalParams}}) async { -+ Future {{{nickname}}}WithHttpInfo({{#allParams}}{{#required}}{{{dataType}}} {{{paramName}}}, {{/required}}{{/allParams}}{ {{#allParams}}{{^required}}{{{dataType}}}? {{{paramName}}}, {{/required}}{{/allParams}}Future? abortTrigger, }) async { + Future {{{nickname}}}WithHttpInfo({{#allParams}}{{#required}}{{{dataType}}} {{{paramName}}},{{^-last}} {{/-last}}{{/required}}{{/allParams}}{{#hasOptionalParams}}{ {{#allParams}}{{^required}}{{{dataType}}}? {{{paramName}}},{{^-last}} {{/-last}}{{/required}}{{/allParams}} }{{/hasOptionalParams}}) async { // ignore: prefer_const_declarations - final path = r'{{{path}}}'{{#pathParams}} + final apiPath = r'{{{path}}}'{{#pathParams}} @@ -21,7 +18,7 @@ {{#formParams}} {{^isFile}} if ({{{paramName}}} != null) { -@@ -121,13 +121,14 @@ +@@ -121,7 +121,7 @@ {{/isMultipart}} return apiClient.invokeAPI( @@ -30,21 +27,3 @@ '{{{httpMethod}}}', queryParams, postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, -+ abortTrigger: abortTrigger, - ); - } - -@@ -161,8 +162,8 @@ - /// - {{/-last}} - {{/allParams}} -- Future<{{#returnType}}{{{.}}}?{{/returnType}}{{^returnType}}void{{/returnType}}> {{{nickname}}}({{#allParams}}{{#required}}{{{dataType}}} {{{paramName}}},{{^-last}} {{/-last}}{{/required}}{{/allParams}}{{#hasOptionalParams}}{ {{#allParams}}{{^required}}{{{dataType}}}? {{{paramName}}},{{^-last}} {{/-last}}{{/required}}{{/allParams}} }{{/hasOptionalParams}}) async { -- final response = await {{{nickname}}}WithHttpInfo({{#allParams}}{{#required}}{{{paramName}}},{{^-last}} {{/-last}}{{/required}}{{/allParams}}{{#hasOptionalParams}} {{#allParams}}{{^required}}{{{paramName}}}: {{{paramName}}},{{^-last}} {{/-last}}{{/required}}{{/allParams}} {{/hasOptionalParams}}); -+ Future<{{#returnType}}{{{.}}}?{{/returnType}}{{^returnType}}void{{/returnType}}> {{{nickname}}}({{#allParams}}{{#required}}{{{dataType}}} {{{paramName}}}, {{/required}}{{/allParams}}{ {{#allParams}}{{^required}}{{{dataType}}}? {{{paramName}}}, {{/required}}{{/allParams}}Future? abortTrigger, }) async { -+ final response = await {{{nickname}}}WithHttpInfo({{#allParams}}{{#required}}{{{paramName}}}, {{/required}}{{/allParams}}{{#allParams}}{{^required}}{{{paramName}}}: {{{paramName}}}, {{/required}}{{/allParams}}abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } diff --git a/open-api/templates/mobile/serialization/native/native_class.mustache b/open-api/templates/mobile/serialization/native/native_class.mustache deleted file mode 100644 index 973c5d9462..0000000000 --- a/open-api/templates/mobile/serialization/native/native_class.mustache +++ /dev/null @@ -1,443 +0,0 @@ -class {{{classname}}} { -{{>dart_constructor}} - -{{#vars}} - {{#description}} - /// {{{.}}} - {{/description}} - {{^isEnum}} - {{#minimum}} - {{#description}} - /// - {{/description}} - /// Minimum value: {{{.}}} - {{/minimum}} - {{#maximum}} - {{#description}} - {{^minimum}} - /// - {{/minimum}} - {{/description}} - /// Maximum value: {{{.}}} - {{/maximum}} - {{^isNullable}} - {{^required}} - {{^defaultValue}} - /// - /// 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. - /// - {{/defaultValue}} - {{/required}} - {{/isNullable}} - {{/isEnum}} - {{#required}} - {{{datatypeWithEnum}}}{{#isNullable}}?{{/isNullable}} {{{name}}}; - {{/required}} - {{^required}} - {{#vendorExtensions.x-is-optional}} - {{{datatypeWithEnum}}} {{{name}}}; - {{/vendorExtensions.x-is-optional}} - {{^vendorExtensions.x-is-optional}} - {{{datatypeWithEnum}}}{{#isNullable}}?{{/isNullable}}{{^isNullable}}{{^defaultValue}}?{{/defaultValue}}{{/isNullable}} {{{name}}}; - {{/vendorExtensions.x-is-optional}} - {{/required}} - -{{/vars}} - @override - bool operator ==(Object other) => identical(this, other) || other is {{{classname}}} && - {{#vars}} - {{#isMap}}_deepEquality.equals(other.{{{name}}}, {{{name}}}){{/isMap}}{{^isMap}}{{#isArray}}_deepEquality.equals(other.{{{name}}}, {{{name}}}){{/isArray}}{{^isArray}}other.{{{name}}} == {{{name}}}{{/isArray}}{{/isMap}}{{^-last}} &&{{/-last}}{{#-last}};{{/-last}} - {{/vars}} - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - {{#vars}} - ({{#isNullable}}{{{name}}} == null ? 0 : {{/isNullable}}{{^isNullable}}{{^required}}{{^defaultValue}}{{{name}}} == null ? 0 : {{/defaultValue}}{{/required}}{{/isNullable}}{{{name}}}{{#isNullable}}!{{/isNullable}}{{^isNullable}}{{^required}}{{^defaultValue}}!{{/defaultValue}}{{/required}}{{/isNullable}}.hashCode){{^-last}} +{{/-last}}{{#-last}};{{/-last}} - {{/vars}} - - @override - String toString() => '{{{classname}}}[{{#vars}}{{{name}}}=${{{name}}}{{^-last}}, {{/-last}}{{/vars}}]'; - - Map toJson() { - final json = {}; - {{#vars}} - {{#vendorExtensions.x-is-optional}} - if (this.{{{name}}}.isPresent) { - final value = this.{{{name}}}.value; - {{#isDateTime}} - {{#pattern}} - json[r'{{{baseName}}}'] = value == null ? null : (_isEpochMarker(r'{{{pattern}}}') - ? value.millisecondsSinceEpoch - : value.toUtc().toIso8601String()); - {{/pattern}} - {{^pattern}} - json[r'{{{baseName}}}'] = value == null ? null : value.toUtc().toIso8601String(); - {{/pattern}} - {{/isDateTime}} - {{#isDate}} - {{#pattern}} - json[r'{{{baseName}}}'] = value == null ? null : (_isEpochMarker(r'{{{pattern}}}') - ? value.millisecondsSinceEpoch - : _dateFormatter.format(value.toUtc())); - {{/pattern}} - {{^pattern}} - json[r'{{{baseName}}}'] = value == null ? null : _dateFormatter.format(value.toUtc()); - {{/pattern}} - {{/isDate}} - {{^isDateTime}} - {{^isDate}} - json[r'{{{baseName}}}'] = value{{#isArray}}{{#uniqueItems}} == null ? null : value.toList(growable: false){{/uniqueItems}}{{/isArray}}; - {{/isDate}} - {{/isDateTime}} - } - {{/vendorExtensions.x-is-optional}} - {{^vendorExtensions.x-is-optional}} - {{#isNullable}} - if (this.{{{name}}} != null) { - {{/isNullable}} - {{^isNullable}} - {{^required}} - {{^defaultValue}} - if (this.{{{name}}} != null) { - {{/defaultValue}} - {{/required}} - {{/isNullable}} - {{#isDateTime}} - {{#pattern}} - json[r'{{{baseName}}}'] = _isEpochMarker(r'{{{pattern}}}') - ? this.{{{name}}}{{#isNullable}}!{{/isNullable}}{{^isNullable}}{{^required}}{{^defaultValue}}!{{/defaultValue}}{{/required}}{{/isNullable}}.millisecondsSinceEpoch - : this.{{{name}}}{{#isNullable}}!{{/isNullable}}{{^isNullable}}{{^required}}{{^defaultValue}}!{{/defaultValue}}{{/required}}{{/isNullable}}.toUtc().toIso8601String(); - {{/pattern}} - {{^pattern}} - json[r'{{{baseName}}}'] = this.{{{name}}}{{#isNullable}}!{{/isNullable}}{{^isNullable}}{{^required}}{{^defaultValue}}!{{/defaultValue}}{{/required}}{{/isNullable}}.toUtc().toIso8601String(); - {{/pattern}} - {{/isDateTime}} - {{#isDate}} - {{#pattern}} - json[r'{{{baseName}}}'] = _isEpochMarker(r'{{{pattern}}}') - ? this.{{{name}}}{{#isNullable}}!{{/isNullable}}{{^isNullable}}{{^required}}{{^defaultValue}}!{{/defaultValue}}{{/required}}{{/isNullable}}.millisecondsSinceEpoch - : _dateFormatter.format(this.{{{name}}}{{#isNullable}}!{{/isNullable}}{{^isNullable}}{{^required}}{{^defaultValue}}!{{/defaultValue}}{{/required}}{{/isNullable}}.toUtc()); - {{/pattern}} - {{^pattern}} - json[r'{{{baseName}}}'] = _dateFormatter.format(this.{{{name}}}{{#isNullable}}!{{/isNullable}}{{^isNullable}}{{^required}}{{^defaultValue}}!{{/defaultValue}}{{/required}}{{/isNullable}}.toUtc()); - {{/pattern}} - {{/isDate}} - {{^isDateTime}} - {{^isDate}} - json[r'{{{baseName}}}'] = this.{{{name}}}{{#isArray}}{{#uniqueItems}}{{#isNullable}}!{{/isNullable}}.toList(growable: false){{/uniqueItems}}{{/isArray}}; - {{/isDate}} - {{/isDateTime}} - {{#isNullable}} - } else { - json[r'{{{baseName}}}'] = null; - } - {{/isNullable}} - {{^isNullable}} - {{^required}} - {{^defaultValue}} - } else { - json[r'{{{baseName}}}'] = null; - } - {{/defaultValue}} - {{/required}} - {{/isNullable}} - {{/vendorExtensions.x-is-optional}} - {{/vars}} - return json; - } - - /// Returns a new [{{{classname}}}] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static {{{classname}}}? fromJson(dynamic value) { - upgradeDto(value, "{{{classname}}}"); - if (value is Map) { - final json = value.cast(); - - return {{{classname}}}( - {{#vars}} - {{#isDateTime}} - {{#vendorExtensions.x-is-optional}} - {{{name}}}: json.containsKey(r'{{{baseName}}}') ? Optional.present(mapDateTime(json, r'{{{baseName}}}', r'{{{pattern}}}')) : const Optional.absent(), - {{/vendorExtensions.x-is-optional}} - {{^vendorExtensions.x-is-optional}} - {{{name}}}: mapDateTime(json, r'{{{baseName}}}', r'{{{pattern}}}'){{#required}}{{^isNullable}}!{{/isNullable}}{{/required}}{{^required}}{{#defaultValue}} ?? {{{.}}}{{/defaultValue}}{{/required}}, - {{/vendorExtensions.x-is-optional}} - {{/isDateTime}} - {{#isDate}} - {{#vendorExtensions.x-is-optional}} - {{{name}}}: json.containsKey(r'{{{baseName}}}') ? Optional.present(mapDateTime(json, r'{{{baseName}}}', r'{{{pattern}}}')) : const Optional.absent(), - {{/vendorExtensions.x-is-optional}} - {{^vendorExtensions.x-is-optional}} - {{{name}}}: mapDateTime(json, r'{{{baseName}}}', r'{{{pattern}}}'){{#required}}{{^isNullable}}!{{/isNullable}}{{/required}}{{^required}}{{#defaultValue}} ?? {{{.}}}{{/defaultValue}}{{/required}}, - {{/vendorExtensions.x-is-optional}} - {{/isDate}} - {{^isDateTime}} - {{^isDate}} - {{#complexType}} - {{#isArray}} - {{#items.isArray}} - {{#vendorExtensions.x-is-optional}} - {{{name}}}: json.containsKey(r'{{{baseName}}}') ? Optional.present(json[r'{{{baseName}}}'] is List - ? (json[r'{{{baseName}}}'] as List).map((e) => - {{#items.complexType}} - e == null ? {{#items.isNullable}}null{{/items.isNullable}}{{^items.isNullable}}const <{{items.complexType}}>[]{{/items.isNullable}} : {{items.complexType}}.listFromJson(e){{#uniqueItems}}.toSet(){{/uniqueItems}} - {{/items.complexType}} - {{^items.complexType}} - e == null ? {{#items.isNullable}}null{{/items.isNullable}}{{^items.isNullable}}const <{{items.items.dataType}}{{#items.items.isNullable}}?{{/items.items.isNullable}}>[]{{/items.isNullable}} : (e as List).map((value) => value as {{items.items.dataType}}{{#items.items.isNullable}}?{{/items.items.isNullable}}).toList(growable: false) - {{/items.complexType}} - ).toList() - : {{#isNullable}}null{{/isNullable}}{{^isNullable}}const []{{/isNullable}}) : const Optional.absent(), - {{/vendorExtensions.x-is-optional}} - {{^vendorExtensions.x-is-optional}} - {{{name}}}: json[r'{{{baseName}}}'] is List - ? (json[r'{{{baseName}}}'] as List).map((e) => - {{#items.complexType}} - e == null ? {{#items.isNullable}}null{{/items.isNullable}}{{^items.isNullable}}const <{{items.complexType}}>[]{{/items.isNullable}} : {{items.complexType}}.listFromJson(e){{#uniqueItems}}.toSet(){{/uniqueItems}} - {{/items.complexType}} - {{^items.complexType}} - e == null ? {{#items.isNullable}}null{{/items.isNullable}}{{^items.isNullable}}const <{{items.items.dataType}}{{#items.items.isNullable}}?{{/items.items.isNullable}}>[]{{/items.isNullable}} : (e as List).map((value) => value as {{items.items.dataType}}{{#items.items.isNullable}}?{{/items.items.isNullable}}).toList(growable: false) - {{/items.complexType}} - ).toList() - : {{#isNullable}}null{{/isNullable}}{{^isNullable}}const []{{/isNullable}}, - {{/vendorExtensions.x-is-optional}} - {{/items.isArray}} - {{^items.isArray}} - {{#vendorExtensions.x-is-optional}} - {{{name}}}: json.containsKey(r'{{{baseName}}}') ? Optional.present({{{complexType}}}.listFromJson(json[r'{{{baseName}}}']){{#uniqueItems}}.toSet(){{/uniqueItems}}) : const Optional.absent(), - {{/vendorExtensions.x-is-optional}} - {{^vendorExtensions.x-is-optional}} - {{{name}}}: {{{complexType}}}.listFromJson(json[r'{{{baseName}}}']){{#uniqueItems}}.toSet(){{/uniqueItems}}, - {{/vendorExtensions.x-is-optional}} - {{/items.isArray}} - {{/isArray}} - {{^isArray}} - {{#isMap}} - {{#items.isArray}} - {{#vendorExtensions.x-is-optional}} - {{{name}}}: json.containsKey(r'{{{baseName}}}') ? Optional.present(json[r'{{{baseName}}}'] == null ? null - {{#items.complexType}} - : {{items.complexType}}.mapListFromJson(json[r'{{{baseName}}}'])) : const Optional.absent(), - {{/items.complexType}} - {{^items.complexType}} - : (json[r'{{{baseName}}}'] as Map).map((k, v) => MapEntry(k, v == null ? {{#items.isNullable}}null{{/items.isNullable}}{{^items.isNullable}}const <{{items.items.dataType}}{{#items.items.isNullable}}?{{/items.items.isNullable}}>[]{{/items.isNullable}} : (v as List).map((value) => value as {{items.items.dataType}}{{#items.items.isNullable}}?{{/items.items.isNullable}}).toList(growable: false)))) : const Optional.absent(), - {{/items.complexType}} - {{/vendorExtensions.x-is-optional}} - {{^vendorExtensions.x-is-optional}} - {{{name}}}: json[r'{{{baseName}}}'] == null - ? {{#defaultValue}}{{{.}}}{{/defaultValue}}{{^defaultValue}}null{{/defaultValue}} - {{#items.complexType}} - : {{items.complexType}}.mapListFromJson(json[r'{{{baseName}}}']), - {{/items.complexType}} - {{^items.complexType}} - : (json[r'{{{baseName}}}'] as Map).map((k, v) => MapEntry(k, v == null ? {{#items.isNullable}}null{{/items.isNullable}}{{^items.isNullable}}const <{{items.items.dataType}}{{#items.items.isNullable}}?{{/items.items.isNullable}}>[]{{/items.isNullable}} : (v as List).map((value) => value as {{items.items.dataType}}{{#items.items.isNullable}}?{{/items.items.isNullable}}).toList(growable: false))), - {{/items.complexType}} - {{/vendorExtensions.x-is-optional}} - {{/items.isArray}} - {{^items.isArray}} - {{#items.isMap}} - {{#items.complexType}} - {{#vendorExtensions.x-is-optional}} - {{{name}}}: json.containsKey(r'{{{baseName}}}') ? Optional.present({{items.complexType}}.mapFromJson(json[r'{{{baseName}}}'])) : const Optional.absent(), - {{/vendorExtensions.x-is-optional}} - {{^vendorExtensions.x-is-optional}} - {{{name}}}: {{items.complexType}}.mapFromJson(json[r'{{{baseName}}}']), - {{/vendorExtensions.x-is-optional}} - {{/items.complexType}} - {{^items.complexType}} - {{#vendorExtensions.x-is-optional}} - {{{name}}}: json.containsKey(r'{{{baseName}}}') ? Optional.present(mapCastOfType(json, r'{{{baseName}}}')) : const Optional.absent(), - {{/vendorExtensions.x-is-optional}} - {{^vendorExtensions.x-is-optional}} - {{{name}}}: mapCastOfType(json, r'{{{baseName}}}'){{#required}}{{^isNullable}}!{{/isNullable}}{{/required}}{{^required}}{{#defaultValue}} ?? {{{.}}}{{/defaultValue}}{{/required}}, - {{/vendorExtensions.x-is-optional}} - {{/items.complexType}} - {{/items.isMap}} - {{^items.isMap}} - {{#items.complexType}} - {{#vendorExtensions.x-is-optional}} - {{{name}}}: json.containsKey(r'{{{baseName}}}') ? Optional.present({{{items.complexType}}}.mapFromJson(json[r'{{{baseName}}}'])) : const Optional.absent(), - {{/vendorExtensions.x-is-optional}} - {{^vendorExtensions.x-is-optional}} - {{{name}}}: {{{items.complexType}}}.mapFromJson(json[r'{{{baseName}}}']), - {{/vendorExtensions.x-is-optional}} - {{/items.complexType}} - {{^items.complexType}} - {{#vendorExtensions.x-is-optional}} - {{{name}}}: json.containsKey(r'{{{baseName}}}') ? Optional.present(mapCastOfType(json, r'{{{baseName}}}')) : const Optional.absent(), - {{/vendorExtensions.x-is-optional}} - {{^vendorExtensions.x-is-optional}} - {{{name}}}: mapCastOfType(json, r'{{{baseName}}}'){{#required}}{{^isNullable}}!{{/isNullable}}{{/required}}{{^required}}{{#defaultValue}} ?? {{{.}}}{{/defaultValue}}{{/required}}, - {{/vendorExtensions.x-is-optional}} - {{/items.complexType}} - {{/items.isMap}} - {{/items.isArray}} - {{/isMap}} - {{^isMap}} - {{#isBinary}} - {{{name}}}: null, // No support for decoding binary content from JSON - {{/isBinary}} - {{^isBinary}} - {{#vendorExtensions.x-is-optional}} - {{{name}}}: json.containsKey(r'{{{baseName}}}') ? Optional.present({{{complexType}}}.fromJson(json[r'{{{baseName}}}'])) : const Optional.absent(), - {{/vendorExtensions.x-is-optional}} - {{^vendorExtensions.x-is-optional}} - {{{name}}}: {{{complexType}}}.fromJson(json[r'{{{baseName}}}']){{#required}}{{^isNullable}}!{{/isNullable}}{{/required}}{{^required}}{{#defaultValue}} ?? {{{.}}}{{/defaultValue}}{{/required}}, - {{/vendorExtensions.x-is-optional}} - {{/isBinary}} - {{/isMap}} - {{/isArray}} - {{/complexType}} - {{^complexType}} - {{#isArray}} - {{#isEnum}} - {{#vendorExtensions.x-is-optional}} - {{{name}}}: json.containsKey(r'{{{baseName}}}') ? Optional.present({{{items.datatypeWithEnum}}}.listFromJson(json[r'{{{baseName}}}']){{#uniqueItems}}.toSet(){{/uniqueItems}}) : const Optional.absent(), - {{/vendorExtensions.x-is-optional}} - {{^vendorExtensions.x-is-optional}} - {{{name}}}: {{{items.datatypeWithEnum}}}.listFromJson(json[r'{{{baseName}}}']){{#uniqueItems}}.toSet(){{/uniqueItems}}, - {{/vendorExtensions.x-is-optional}} - {{/isEnum}} - {{^isEnum}} - {{#vendorExtensions.x-is-optional}} - {{{name}}}: json.containsKey(r'{{{baseName}}}') ? Optional.present(json[r'{{{baseName}}}'] is Iterable - ? (json[r'{{{baseName}}}'] as Iterable).cast<{{{items.datatype}}}>().{{#uniqueItems}}toSet(){{/uniqueItems}}{{^uniqueItems}}toList(growable: false){{/uniqueItems}} - : {{#defaultValue}}{{{.}}}{{/defaultValue}}{{^defaultValue}}null{{/defaultValue}}) : const Optional.absent(), - {{/vendorExtensions.x-is-optional}} - {{^vendorExtensions.x-is-optional}} - {{{name}}}: json[r'{{{baseName}}}'] is Iterable - ? (json[r'{{{baseName}}}'] as Iterable).cast<{{{items.datatype}}}>().{{#uniqueItems}}toSet(){{/uniqueItems}}{{^uniqueItems}}toList(growable: false){{/uniqueItems}} - : {{#defaultValue}}{{{.}}}{{/defaultValue}}{{^defaultValue}}null{{/defaultValue}}, - {{/vendorExtensions.x-is-optional}} - {{/isEnum}} - {{/isArray}} - {{^isArray}} - {{#isMap}} - {{#vendorExtensions.x-is-optional}} - {{{name}}}: json.containsKey(r'{{{baseName}}}') ? Optional.present(mapCastOfType(json, r'{{{baseName}}}')) : const Optional.absent(), - {{/vendorExtensions.x-is-optional}} - {{^vendorExtensions.x-is-optional}} - {{{name}}}: mapCastOfType(json, r'{{{baseName}}}'){{#required}}{{^isNullable}}!{{/isNullable}}{{/required}}{{^required}}{{#defaultValue}} ?? {{{.}}}{{/defaultValue}}{{/required}}, - {{/vendorExtensions.x-is-optional}} - {{/isMap}} - {{^isMap}} - {{#isNumber}} - {{#vendorExtensions.x-is-optional}} - {{{name}}}: json.containsKey(r'{{{baseName}}}') ? Optional.present(json[r'{{{baseName}}}'] == null ? null : num.parse('${json[r'{{{baseName}}}']}')) : const Optional.absent(), - {{/vendorExtensions.x-is-optional}} - {{^vendorExtensions.x-is-optional}} - {{{name}}}: {{#isNullable}}json[r'{{{baseName}}}'] == null - ? {{#defaultValue}}{{{.}}}{{/defaultValue}}{{^defaultValue}}null{{/defaultValue}} - : {{/isNullable}}{{{datatypeWithEnum}}}.parse('${json[r'{{{baseName}}}']}'), - {{/vendorExtensions.x-is-optional}} - {{/isNumber}} - {{^isNumber}} - {{#vendorExtensions.x-original-is-integer}} - {{{name}}}: json.containsKey(r'{{{baseName}}}') ? Optional.present(json[r'{{{baseName}}}'] == null ? null : int.parse('${json[r'{{{baseName}}}']}')) : const Optional.absent(), - {{/vendorExtensions.x-original-is-integer}} - {{^vendorExtensions.x-original-is-integer}} - {{#vendorExtensions.x-original-is-number}} - {{{name}}}: json.containsKey(r'{{{baseName}}}') ? Optional.present(json[r'{{{baseName}}}'] == null ? null : num.parse('${json[r'{{{baseName}}}']}')) : const Optional.absent(), - {{/vendorExtensions.x-original-is-number}} - {{^vendorExtensions.x-original-is-number}} - {{^isEnum}} - {{#vendorExtensions.x-is-optional}} - {{{name}}}: json.containsKey(r'{{{baseName}}}') ? Optional.present(mapValueOfType<{{#vendorExtensions.x-unwrapped-datatype}}{{{vendorExtensions.x-unwrapped-datatype}}}{{/vendorExtensions.x-unwrapped-datatype}}{{^vendorExtensions.x-unwrapped-datatype}}{{{datatypeWithEnum}}}{{/vendorExtensions.x-unwrapped-datatype}}>(json, r'{{{baseName}}}')) : const Optional.absent(), - {{/vendorExtensions.x-is-optional}} - {{^vendorExtensions.x-is-optional}} - {{{name}}}: mapValueOfType<{{{datatypeWithEnum}}}>(json, r'{{{baseName}}}'){{#required}}{{^isNullable}}!{{/isNullable}}{{/required}}{{^required}}{{#defaultValue}} ?? {{{.}}}{{/defaultValue}}{{/required}}, - {{/vendorExtensions.x-is-optional}} - {{/isEnum}} - {{#isEnum}} - {{#vendorExtensions.x-is-optional}} - {{{name}}}: json.containsKey(r'{{{baseName}}}') ? Optional.present({{{enumName}}}.fromJson(json[r'{{{baseName}}}'])) : const Optional.absent(), - {{/vendorExtensions.x-is-optional}} - {{^vendorExtensions.x-is-optional}} - {{{name}}}: {{{enumName}}}.fromJson(json[r'{{{baseName}}}']){{#required}}{{^isNullable}}!{{/isNullable}}{{/required}}{{^required}}{{#defaultValue}} ?? const {{{enumName}}}._({{{.}}}){{/defaultValue}}{{/required}}, - {{/vendorExtensions.x-is-optional}} - {{/isEnum}} - {{/vendorExtensions.x-original-is-number}} - {{/vendorExtensions.x-original-is-integer}} - {{/isNumber}} - {{/isMap}} - {{/isArray}} - {{/complexType}} - {{/isDate}} - {{/isDateTime}} - {{/vars}} - ); - } - return null; - } - - static List<{{{classname}}}> listFromJson(dynamic json, {bool growable = false,}) { - final result = <{{{classname}}}>[]; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = {{{classname}}}.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = {{{classname}}}.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of {{{classname}}}-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = {{{classname}}}.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { -{{#vars}} - {{#required}} - '{{{baseName}}}', - {{/required}} -{{/vars}} - }; -} -{{#vars}} - {{^isModel}} - {{#isEnum}} - {{^isContainer}} - -{{>serialization/native/native_enum_inline}} - - {{/isContainer}} - {{#isContainer}} - {{#mostInnerItems}} - -{{>serialization/native/native_enum_inline}} - - {{/mostInnerItems}} - {{/isContainer}} - {{/isEnum}} - {{/isModel}} -{{/vars}} diff --git a/open-api/templates/mobile/serialization/native/native_class.mustache.patch b/open-api/templates/mobile/serialization/native/native_class.mustache.patch index 6ab7a5228f..9894869a4a 100644 --- a/open-api/templates/mobile/serialization/native/native_class.mustache.patch +++ b/open-api/templates/mobile/serialization/native/native_class.mustache.patch @@ -26,155 +26,3 @@ return {{{classname}}}( {{#vars}} {{#isDateTime}} -@@ -195,48 +181,98 @@ - {{#complexType}} - {{#isArray}} - {{#items.isArray}} -+ {{#vendorExtensions.x-is-optional}} -+ {{{name}}}: json.containsKey(r'{{{baseName}}}') ? Optional.present(json[r'{{{baseName}}}'] is List -+ ? (json[r'{{{baseName}}}'] as List).map((e) => -+ {{#items.complexType}} -+ e == null ? {{#items.isNullable}}null{{/items.isNullable}}{{^items.isNullable}}const <{{items.complexType}}>[]{{/items.isNullable}} : {{items.complexType}}.listFromJson(e){{#uniqueItems}}.toSet(){{/uniqueItems}} -+ {{/items.complexType}} -+ {{^items.complexType}} -+ e == null ? {{#items.isNullable}}null{{/items.isNullable}}{{^items.isNullable}}const <{{items.items.dataType}}{{#items.items.isNullable}}?{{/items.items.isNullable}}>[]{{/items.isNullable}} : (e as List).map((value) => value as {{items.items.dataType}}{{#items.items.isNullable}}?{{/items.items.isNullable}}).toList(growable: false) -+ {{/items.complexType}} -+ ).toList() -+ : {{#isNullable}}null{{/isNullable}}{{^isNullable}}const []{{/isNullable}}) : const Optional.absent(), -+ {{/vendorExtensions.x-is-optional}} -+ {{^vendorExtensions.x-is-optional}} - {{{name}}}: json[r'{{{baseName}}}'] is List - ? (json[r'{{{baseName}}}'] as List).map((e) => - {{#items.complexType}} -- {{items.complexType}}.listFromJson(json[r'{{{baseName}}}']){{#uniqueItems}}.toSet(){{/uniqueItems}} -+ e == null ? {{#items.isNullable}}null{{/items.isNullable}}{{^items.isNullable}}const <{{items.complexType}}>[]{{/items.isNullable}} : {{items.complexType}}.listFromJson(e){{#uniqueItems}}.toSet(){{/uniqueItems}} - {{/items.complexType}} - {{^items.complexType}} -- e == null ? {{#items.isNullable}}null{{/items.isNullable}}{{^items.isNullable}}const <{{items.items.dataType}}>[]{{/items.isNullable}} : (e as List).cast<{{items.items.dataType}}>() -+ e == null ? {{#items.isNullable}}null{{/items.isNullable}}{{^items.isNullable}}const <{{items.items.dataType}}{{#items.items.isNullable}}?{{/items.items.isNullable}}>[]{{/items.isNullable}} : (e as List).map((value) => value as {{items.items.dataType}}{{#items.items.isNullable}}?{{/items.items.isNullable}}).toList(growable: false) - {{/items.complexType}} - ).toList() - : {{#isNullable}}null{{/isNullable}}{{^isNullable}}const []{{/isNullable}}, -+ {{/vendorExtensions.x-is-optional}} - {{/items.isArray}} - {{^items.isArray}} -+ {{#vendorExtensions.x-is-optional}} -+ {{{name}}}: json.containsKey(r'{{{baseName}}}') ? Optional.present({{{complexType}}}.listFromJson(json[r'{{{baseName}}}']){{#uniqueItems}}.toSet(){{/uniqueItems}}) : const Optional.absent(), -+ {{/vendorExtensions.x-is-optional}} -+ {{^vendorExtensions.x-is-optional}} - {{{name}}}: {{{complexType}}}.listFromJson(json[r'{{{baseName}}}']){{#uniqueItems}}.toSet(){{/uniqueItems}}, -+ {{/vendorExtensions.x-is-optional}} - {{/items.isArray}} - {{/isArray}} - {{^isArray}} - {{#isMap}} - {{#items.isArray}} -+ {{#vendorExtensions.x-is-optional}} -+ {{{name}}}: json.containsKey(r'{{{baseName}}}') ? Optional.present(json[r'{{{baseName}}}'] == null ? null -+ {{#items.complexType}} -+ : {{items.complexType}}.mapListFromJson(json[r'{{{baseName}}}'])) : const Optional.absent(), -+ {{/items.complexType}} -+ {{^items.complexType}} -+ : (json[r'{{{baseName}}}'] as Map).map((k, v) => MapEntry(k, v == null ? {{#items.isNullable}}null{{/items.isNullable}}{{^items.isNullable}}const <{{items.items.dataType}}{{#items.items.isNullable}}?{{/items.items.isNullable}}>[]{{/items.isNullable}} : (v as List).map((value) => value as {{items.items.dataType}}{{#items.items.isNullable}}?{{/items.items.isNullable}}).toList(growable: false)))) : const Optional.absent(), -+ {{/items.complexType}} -+ {{/vendorExtensions.x-is-optional}} -+ {{^vendorExtensions.x-is-optional}} - {{{name}}}: json[r'{{{baseName}}}'] == null - ? {{#defaultValue}}{{{.}}}{{/defaultValue}}{{^defaultValue}}null{{/defaultValue}} -- {{#items.complexType}} -+ {{#items.complexType}} - : {{items.complexType}}.mapListFromJson(json[r'{{{baseName}}}']), -- {{/items.complexType}} -- {{^items.complexType}} -- : (json[r'{{{baseName}}}'] as Map).map((k, v) => MapEntry(k, v == null ? {{#items.isNullable}}null{{/items.isNullable}}{{^items.isNullable}}const <{{items.items.dataType}}>[]{{/items.isNullable}} : (v as List).cast<{{items.items.dataType}}>())), -- {{/items.complexType}} -+ {{/items.complexType}} -+ {{^items.complexType}} -+ : (json[r'{{{baseName}}}'] as Map).map((k, v) => MapEntry(k, v == null ? {{#items.isNullable}}null{{/items.isNullable}}{{^items.isNullable}}const <{{items.items.dataType}}{{#items.items.isNullable}}?{{/items.items.isNullable}}>[]{{/items.isNullable}} : (v as List).map((value) => value as {{items.items.dataType}}{{#items.items.isNullable}}?{{/items.items.isNullable}}).toList(growable: false))), -+ {{/items.complexType}} -+ {{/vendorExtensions.x-is-optional}} - {{/items.isArray}} - {{^items.isArray}} - {{#items.isMap}} - {{#items.complexType}} -+ {{#vendorExtensions.x-is-optional}} -+ {{{name}}}: json.containsKey(r'{{{baseName}}}') ? Optional.present({{items.complexType}}.mapFromJson(json[r'{{{baseName}}}'])) : const Optional.absent(), -+ {{/vendorExtensions.x-is-optional}} -+ {{^vendorExtensions.x-is-optional}} - {{{name}}}: {{items.complexType}}.mapFromJson(json[r'{{{baseName}}}']), -+ {{/vendorExtensions.x-is-optional}} - {{/items.complexType}} - {{^items.complexType}} -+ {{#vendorExtensions.x-is-optional}} -+ {{{name}}}: json.containsKey(r'{{{baseName}}}') ? Optional.present(mapCastOfType(json, r'{{{baseName}}}')) : const Optional.absent(), -+ {{/vendorExtensions.x-is-optional}} -+ {{^vendorExtensions.x-is-optional}} - {{{name}}}: mapCastOfType(json, r'{{{baseName}}}'){{#required}}{{^isNullable}}!{{/isNullable}}{{/required}}{{^required}}{{#defaultValue}} ?? {{{.}}}{{/defaultValue}}{{/required}}, -+ {{/vendorExtensions.x-is-optional}} - {{/items.complexType}} - {{/items.isMap}} - {{^items.isMap}} - {{#items.complexType}} -+ {{#vendorExtensions.x-is-optional}} -+ {{{name}}}: json.containsKey(r'{{{baseName}}}') ? Optional.present({{{items.complexType}}}.mapFromJson(json[r'{{{baseName}}}'])) : const Optional.absent(), -+ {{/vendorExtensions.x-is-optional}} -+ {{^vendorExtensions.x-is-optional}} - {{{name}}}: {{{items.complexType}}}.mapFromJson(json[r'{{{baseName}}}']), -+ {{/vendorExtensions.x-is-optional}} - {{/items.complexType}} - {{^items.complexType}} -+ {{#vendorExtensions.x-is-optional}} -+ {{{name}}}: json.containsKey(r'{{{baseName}}}') ? Optional.present(mapCastOfType(json, r'{{{baseName}}}')) : const Optional.absent(), -+ {{/vendorExtensions.x-is-optional}} -+ {{^vendorExtensions.x-is-optional}} - {{{name}}}: mapCastOfType(json, r'{{{baseName}}}'){{#required}}{{^isNullable}}!{{/isNullable}}{{/required}}{{^required}}{{#defaultValue}} ?? {{{.}}}{{/defaultValue}}{{/required}}, -+ {{/vendorExtensions.x-is-optional}} - {{/items.complexType}} - {{/items.isMap}} - {{/items.isArray}} -@@ -259,23 +295,45 @@ - {{^complexType}} - {{#isArray}} - {{#isEnum}} -+ {{#vendorExtensions.x-is-optional}} -+ {{{name}}}: json.containsKey(r'{{{baseName}}}') ? Optional.present({{{items.datatypeWithEnum}}}.listFromJson(json[r'{{{baseName}}}']){{#uniqueItems}}.toSet(){{/uniqueItems}}) : const Optional.absent(), -+ {{/vendorExtensions.x-is-optional}} -+ {{^vendorExtensions.x-is-optional}} - {{{name}}}: {{{items.datatypeWithEnum}}}.listFromJson(json[r'{{{baseName}}}']){{#uniqueItems}}.toSet(){{/uniqueItems}}, -+ {{/vendorExtensions.x-is-optional}} - {{/isEnum}} - {{^isEnum}} -+ {{#vendorExtensions.x-is-optional}} -+ {{{name}}}: json.containsKey(r'{{{baseName}}}') ? Optional.present(json[r'{{{baseName}}}'] is Iterable -+ ? (json[r'{{{baseName}}}'] as Iterable).cast<{{{items.datatype}}}>().{{#uniqueItems}}toSet(){{/uniqueItems}}{{^uniqueItems}}toList(growable: false){{/uniqueItems}} -+ : {{#defaultValue}}{{{.}}}{{/defaultValue}}{{^defaultValue}}null{{/defaultValue}}) : const Optional.absent(), -+ {{/vendorExtensions.x-is-optional}} -+ {{^vendorExtensions.x-is-optional}} - {{{name}}}: json[r'{{{baseName}}}'] is Iterable - ? (json[r'{{{baseName}}}'] as Iterable).cast<{{{items.datatype}}}>().{{#uniqueItems}}toSet(){{/uniqueItems}}{{^uniqueItems}}toList(growable: false){{/uniqueItems}} - : {{#defaultValue}}{{{.}}}{{/defaultValue}}{{^defaultValue}}null{{/defaultValue}}, -+ {{/vendorExtensions.x-is-optional}} - {{/isEnum}} - {{/isArray}} - {{^isArray}} - {{#isMap}} -+ {{#vendorExtensions.x-is-optional}} -+ {{{name}}}: json.containsKey(r'{{{baseName}}}') ? Optional.present(mapCastOfType(json, r'{{{baseName}}}')) : const Optional.absent(), -+ {{/vendorExtensions.x-is-optional}} -+ {{^vendorExtensions.x-is-optional}} - {{{name}}}: mapCastOfType(json, r'{{{baseName}}}'){{#required}}{{^isNullable}}!{{/isNullable}}{{/required}}{{^required}}{{#defaultValue}} ?? {{{.}}}{{/defaultValue}}{{/required}}, -+ {{/vendorExtensions.x-is-optional}} - {{/isMap}} - {{^isMap}} - {{#isNumber}} -+ {{#vendorExtensions.x-is-optional}} -+ {{{name}}}: json.containsKey(r'{{{baseName}}}') ? Optional.present(json[r'{{{baseName}}}'] == null ? null : num.parse('${json[r'{{{baseName}}}']}')) : const Optional.absent(), -+ {{/vendorExtensions.x-is-optional}} -+ {{^vendorExtensions.x-is-optional}} - {{{name}}}: {{#isNullable}}json[r'{{{baseName}}}'] == null - ? {{#defaultValue}}{{{.}}}{{/defaultValue}}{{^defaultValue}}null{{/defaultValue}} - : {{/isNullable}}{{{datatypeWithEnum}}}.parse('${json[r'{{{baseName}}}']}'), -+ {{/vendorExtensions.x-is-optional}} - {{/isNumber}} - {{^isNumber}} - {{#vendorExtensions.x-original-is-integer}} diff --git a/package.json b/package.json index 16d32fb5da..75222c8220 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "immich-monorepo", - "version": "3.0.0-rc.3", + "version": "3.1.0", "description": "Monorepo for Immich", "type": "module", "private": true, @@ -8,7 +8,7 @@ "format": "prettier --cache --check i18n/", "format:fix": "prettier --cache --write --list-different i18n" }, - "packageManager": "pnpm@11.6.0", + "packageManager": "pnpm@11.20.0", "engines": { "pnpm": ">=10.0.0" }, diff --git a/packages/cli/Dockerfile b/packages/cli/Dockerfile index ee2a4294bd..c1c320fc11 100644 --- a/packages/cli/Dockerfile +++ b/packages/cli/Dockerfile @@ -1,4 +1,4 @@ -FROM node:24.1.0-alpine3.20@sha256:8fe019e0d57dbdce5f5c27c0b63d2775cf34b00e3755a7dea969802d7e0c2b25 AS core +FROM node:24.19.0-trixie-slim@sha256:0711b541c1c33a8a530ac4f0d391baa9a15b3d804695b1b24a47daa5fb60e74d AS core WORKDIR /usr/src/app COPY package* pnpm* .pnpmfile.cjs ./ diff --git a/packages/cli/eslint.config.mjs b/packages/cli/eslint.config.mjs index 101d91bea4..cd32bf6023 100644 --- a/packages/cli/eslint.config.mjs +++ b/packages/cli/eslint.config.mjs @@ -2,13 +2,8 @@ import js from '@eslint/js'; import eslintPluginPrettierRecommended from 'eslint-plugin-prettier/recommended'; import eslintPluginUnicorn from 'eslint-plugin-unicorn'; import globals from 'globals'; -import path from 'node:path'; -import { fileURLToPath } from 'node:url'; import typescriptEslint from 'typescript-eslint'; -const __filename = fileURLToPath(import.meta.url); -const __dirname = path.dirname(__filename); - export default typescriptEslint.config([ eslintPluginUnicorn.configs.recommended, eslintPluginPrettierRecommended, @@ -29,7 +24,7 @@ export default typescriptEslint.config([ parserOptions: { project: 'tsconfig.json', - tsconfigRootDir: __dirname, + tsconfigRootDir: import.meta.dirname, }, }, @@ -40,10 +35,17 @@ export default typescriptEslint.config([ '@typescript-eslint/no-explicit-any': 'off', '@typescript-eslint/no-floating-promises': 'error', 'unicorn/prefer-module': 'off', - 'unicorn/prevent-abbreviations': 'off', + 'unicorn/name-replacements': 'off', + 'unicorn/no-unreadable-for-of-expression': 'off', + 'unicorn/no-declarations-before-early-exit': 'off', 'unicorn/no-process-exit': 'off', 'unicorn/import-style': 'off', + 'unicorn/consistent-class-member-order': 'off', + 'unicorn/prefer-simple-condition-first': 'off', curly: 2, + // prefer the typescript-eslint type-aware version + 'unicorn/require-array-sort-compare': 'off', + '@typescript-eslint/require-array-sort-compare': 'error', 'prettier/prettier': 0, 'object-shorthand': ['error', 'always'], }, diff --git a/packages/cli/mise.toml b/packages/cli/mise.toml index 28d5e1858f..320ce001d8 100644 --- a/packages/cli/mise.toml +++ b/packages/cli/mise.toml @@ -29,16 +29,18 @@ env._.path = "./node_modules/.bin" run = "tsc --noEmit" [tasks.ci-publish] -depends = ["//:sdk:install", "//:sdk:build"] run = [ + { task = "//:sdk:install" }, + { task = "//:sdk:build" }, { task = ":install" }, { task = ":build" }, "pnpm publish --provenance --no-git-checks", ] [tasks.ci-unit] -depends = ["//:sdk:install", "//:sdk:build"] run = [ + { task = "//:sdk:install" }, + { task = "//:sdk:build" }, { task = ":install" }, { task = ":format" }, { task = ":lint" }, diff --git a/packages/cli/package.json b/packages/cli/package.json index 499d3783c4..9540cefd4c 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -1,6 +1,6 @@ { "name": "@immich/cli", - "version": "3.0.0-rc.3", + "version": "3.1.0", "description": "Command Line Interface (CLI) for Immich", "repository": { "type": "git", @@ -25,7 +25,7 @@ "@types/lodash-es": "^4.17.12", "@types/micromatch": "^4.0.9", "@types/mock-fs": "^4.13.1", - "@types/node": "^24.13.2", + "@types/node": "^24.13.3", "@vitest/coverage-v8": "^4.0.0", "byte-size": "^9.0.0", "cli-progress": "^3.12.0", @@ -33,12 +33,13 @@ "eslint": "^10.0.0", "eslint-config-prettier": "^10.1.8", "eslint-plugin-prettier": "^5.1.3", - "eslint-plugin-unicorn": "^64.0.0", + "eslint-plugin-unicorn": "^72.0.0", "globals": "^17.0.0", "mock-fs": "^5.2.0", "prettier": "^3.7.4", "prettier-plugin-organize-imports": "^4.0.0", - "typescript": "^6.0.0", + "@typescript/native": "npm:typescript@^7.0.2", + "typescript": "npm:@typescript/typescript6@^6.0.2", "typescript-eslint": "^8.58.0", "vite": "^8.0.0", "vitest": "^4.0.0", diff --git a/packages/cli/src/commands/asset.spec.ts b/packages/cli/src/commands/asset.spec.ts index f179b350c9..7e582039ba 100644 --- a/packages/cli/src/commands/asset.spec.ts +++ b/packages/cli/src/commands/asset.spec.ts @@ -4,7 +4,14 @@ import path from 'node:path'; import { setTimeout as sleep } from 'node:timers/promises'; import { describe, expect, it, MockedFunction, vi } from 'vitest'; -import { AssetRejectReason, AssetUploadAction, checkBulkUpload, defaults, getSupportedMediaTypes } from '@immich/sdk'; +import { + AssetRejectReason, + AssetUploadAction, + AssetVisibility, + checkBulkUpload, + defaults, + getSupportedMediaTypes, +} from '@immich/sdk'; import createFetchMock from 'vitest-fetch-mock'; import { @@ -39,7 +46,7 @@ describe('uploadFiles', () => { const testDir = fs.mkdtempSync(path.join(os.tmpdir(), 'test-')); const testFilePath = path.join(testDir, 'test.png'); const testFileData = 'test'; - const baseUrl = 'http://example.com'; + const baseUrl = 'https://example.com'; const apiKey = 'key'; const retry = 3; @@ -102,6 +109,20 @@ describe('uploadFiles', () => { await expect(uploadFiles([testFilePath], { concurrency: 1 })).resolves.toEqual([]); }); + + it('uploads assets with the specified visibility', async () => { + fetchMocker.doMockIf(new RegExp(`${baseUrl}/assets$`), function () { + return { + status: 200, + body: JSON.stringify({ id: 'fc5621b1-86f6-44a1-9905-403e607df9f5', status: 'created' }), + }; + }); + + await uploadFiles([testFilePath], { concurrency: 1, visibility: AssetVisibility.Hidden }); + + const formData = fetchMocker.mock.calls[0]?.[1]?.body as FormData; + expect(formData.get('visibility')).toBe('hidden'); + }); }); describe('checkForDuplicates', () => { diff --git a/packages/cli/src/commands/asset.ts b/packages/cli/src/commands/asset.ts index b0a9037289..f1dfdaec8e 100644 --- a/packages/cli/src/commands/asset.ts +++ b/packages/cli/src/commands/asset.ts @@ -4,6 +4,7 @@ import { AssetMediaResponseDto, AssetMediaStatus, AssetUploadAction, + AssetVisibility, Permission, addAssetsToAlbum, checkBulkUpload, @@ -39,6 +40,7 @@ export interface UploadOptionsDto { deleteDuplicates?: boolean; album?: boolean; albumName?: string; + visibility?: AssetVisibility; includeHidden?: boolean; concurrency: number; progress?: boolean; @@ -54,6 +56,7 @@ class UploadFile extends File { super([], basename(filepath)); } + // @ts-expect-error size is already a property on the new File interface get size() { return this._size; } @@ -306,10 +309,8 @@ export const checkForDuplicates = async (files: string[], { concurrency, skipHas return { newFiles, duplicates }; }; -export const uploadFiles = async ( - files: string[], - { dryRun, concurrency, progress }: UploadOptionsDto, -): Promise => { +export const uploadFiles = async (files: string[], options: UploadOptionsDto): Promise => { + const { dryRun, concurrency, progress } = options; if (files.length === 0) { console.log('All assets were already uploaded, nothing to do.'); return []; @@ -358,7 +359,7 @@ export const uploadFiles = async ( throw new Error(`Stats not found for ${filepath}`); } - const response = await uploadFile(filepath, stats); + const response = await uploadFile(filepath, stats, options); newAssets.push({ id: response.id, filepath }); if (response.status === AssetMediaStatus.Duplicate) { duplicateCount++; @@ -400,7 +401,11 @@ export const uploadFiles = async ( return newAssets; }; -const uploadFile = async (input: string, stats: Stats): Promise => { +const uploadFile = async ( + input: string, + stats: Stats, + { visibility }: UploadOptionsDto, +): Promise => { const { baseUrl, headers } = defaults; const formData = new FormData(); @@ -409,6 +414,9 @@ const uploadFile = async (input: string, stats: Stats): Promise; }; export const findSidecar = (filepath: string): string | undefined => { @@ -570,7 +578,7 @@ const updateAlbums = async (assets: Asset[], options: UploadOptionsDto) => { albumUpdateProgress.start(assets.length, 0); try { - for (const [albumId, assets] of albumToAssets.entries()) { + for (const [albumId, assets] of albumToAssets) { for (const assetBatch of chunk(assets, Math.min(1000 * concurrency, 65_000))) { await addAssetsToAlbum({ id: albumId, bulkIdsDto: { ids: assetBatch } }); albumUpdateProgress.increment(assetBatch.length); diff --git a/packages/cli/src/index.ts b/packages/cli/src/index.ts index 0bc2e5de37..deef7d8c8c 100644 --- a/packages/cli/src/index.ts +++ b/packages/cli/src/index.ts @@ -1,4 +1,5 @@ #! /usr/bin/env node +import { AssetVisibility } from '@immich/sdk'; import { Command, Option } from 'commander'; import os from 'node:os'; import path from 'node:path'; @@ -46,7 +47,7 @@ program .usage('[paths...] [options]') .addOption(new Option('-r, --recursive', 'Recursive').env('IMMICH_RECURSIVE').default(false)) .addOption(new Option('-i, --ignore ', 'Pattern to ignore').env('IMMICH_IGNORE_PATHS')) - .addOption(new Option('-h, --skip-hash', "Don't hash files before upload").env('IMMICH_SKIP_HASH').default(false)) + .addOption(new Option('--skip-hash', "Don't hash files before upload").env('IMMICH_SKIP_HASH').default(false)) .addOption(new Option('-H, --include-hidden', 'Include hidden folders').env('IMMICH_INCLUDE_HIDDEN').default(false)) .addOption( new Option('-a, --album', 'Automatically create albums based on folder name') @@ -58,6 +59,11 @@ program .env('IMMICH_ALBUM_NAME') .conflicts('album'), ) + .addOption( + new Option('--visibility ', 'Set the visibility of uploaded assets') + .choices(Object.values(AssetVisibility)) + .env('IMMICH_VISIBILITY'), + ) .addOption( new Option('-n, --dry-run', "Don't perform any actions, just show what will be done") .env('IMMICH_DRY_RUN') diff --git a/packages/cli/src/queue.ts b/packages/cli/src/queue.ts index 0b6d628146..45e1c454f7 100644 --- a/packages/cli/src/queue.ts +++ b/packages/cli/src/queue.ts @@ -52,10 +52,7 @@ export class Queue { } get tasks(): Task[] { - const tasks: Task[] = []; - for (const task of this.store.values()) { - tasks.push(task); - } + const tasks: Task[] = this.store.values().toArray(); return tasks; } diff --git a/packages/cli/src/utils.ts b/packages/cli/src/utils.ts index b60f5e3715..d8a567a230 100644 --- a/packages/cli/src/utils.ts +++ b/packages/cli/src/utils.ts @@ -39,6 +39,7 @@ export const s = (count: number) => (count === 1 ? '' : 's'); let _apiKey: ApiKeyResponseDto; export const requirePermissions = async (permissions: Permission[]) => { if (!_apiKey) { + // eslint-disable-next-line unicorn/no-top-level-assignment-in-function _apiKey = await getMyApiKey(); } @@ -67,8 +68,9 @@ Please make sure your API key has the correct permissions.`, export const connect = async (url: string, key: string) => { const wellKnownUrl = new URL('.well-known/immich', url); try { - const wellKnown = await fetch(wellKnownUrl).then((response) => response.json()); - const endpoint = new URL(wellKnown.api.endpoint, url).toString(); + // eslint-disable-next-line unicorn/prefer-await + const wellKnown = (await fetch(wellKnownUrl).then((response) => response.json())) as { api: { endpoint: string } }; + const endpoint = new URL(wellKnown.api.endpoint, url).href; if (endpoint !== url) { console.debug(`Discovered API at ${endpoint}`); } @@ -178,7 +180,7 @@ export const crawl = async (options: CrawlOptions): Promise => { const searchPatterns = patterns.map((pattern) => { let escapedPattern = pattern.replaceAll("'", "[']").replaceAll('"', '["]').replaceAll('`', '[`]'); if (recursive) { - escapedPattern = escapedPattern + '/**'; + escapedPattern += '/**'; } return `${escapedPattern}/*.{${extensions.join(',')}}`; }); @@ -238,10 +240,12 @@ export class Batcher { } private clearDebounceTimer() { - if (this.debounceTimer) { - clearTimeout(this.debounceTimer); - this.debounceTimer = undefined; + if (!this.debounceTimer) { + return; } + + clearTimeout(this.debounceTimer); + this.debounceTimer = undefined; } add(item: T) { diff --git a/packages/cli/tsconfig.json b/packages/cli/tsconfig.json index f2d8d61a5f..26331e32f5 100644 --- a/packages/cli/tsconfig.json +++ b/packages/cli/tsconfig.json @@ -10,6 +10,7 @@ "allowSyntheticDefaultImports": true, "resolveJsonModule": true, "target": "es2023", + "lib": ["ESNext"], "sourceMap": true, "outDir": "./dist", "incremental": true, diff --git a/packages/e2e-auth-server/Dockerfile b/packages/e2e-auth-server/Dockerfile index 3a49307316..087fa45d23 100644 --- a/packages/e2e-auth-server/Dockerfile +++ b/packages/e2e-auth-server/Dockerfile @@ -1,4 +1,4 @@ -FROM node:24.1.0-alpine3.20@sha256:8fe019e0d57dbdce5f5c27c0b63d2775cf34b00e3755a7dea969802d7e0c2b25 +FROM node:24.19.0-trixie-slim@sha256:0711b541c1c33a8a530ac4f0d391baa9a15b3d804695b1b24a47daa5fb60e74d WORKDIR /usr/src/app COPY package* pnpm* .pnpmfile.cjs ./ COPY ./packages ./packages/ diff --git a/packages/e2e-auth-server/package.json b/packages/e2e-auth-server/package.json index 0cfaab1da0..eae4fd3e04 100644 --- a/packages/e2e-auth-server/package.json +++ b/packages/e2e-auth-server/package.json @@ -13,5 +13,5 @@ "oidc-provider": "^9.0.0", "tsx": "^4.20.6" }, - "packageManager": "pnpm@11.6.0" + "packageManager": "pnpm@11.20.0" } diff --git a/packages/plugin-core/manifest.json b/packages/plugin-core/manifest.json index 3508a3ece9..d7f7830a0e 100644 --- a/packages/plugin-core/manifest.json +++ b/packages/plugin-core/manifest.json @@ -103,6 +103,12 @@ "default": false, "title": "Case sensitive", "description": "Whether matching should be case-sensitive" + }, + "usePath": { + "type": "boolean", + "default": false, + "title": "Use path", + "description": "Match the full path on the server instead of the original filename" } }, "required": ["pattern"] @@ -163,19 +169,26 @@ "description": "Filter by distance to a coordinate", "properties": { "latitude": { - "type": "string", + "type": "number", "title": "Latitude", - "description": "GPS latitude of a coordinate which the asset must be close to" + "description": "GPS latitude of a coordinate which the asset must be close to", + "minimum": -90, + "maximum": 90, + "precision": 0.000001 }, "longitude": { - "type": "string", + "type": "number", "title": "Longitude", - "description": "GPS longitude of a coordinate which the asset must be close to" + "description": "GPS longitude of a coordinate which the asset must be close to", + "minimum": -180, + "maximum": 180, + "precision": 0.000001 }, "radius": { "type": "number", "title": "Maximum distance", - "description": "How close in kilometres the asset must be to the given point" + "description": "How close in kilometres the asset must be to the given point", + "minimum": 0 } } } @@ -183,6 +196,98 @@ }, "uiHints": ["Filter"] }, + { + "name": "assetDateFilter", + "title": "Filter by date", + "description": "Filter assets by date taken", + "types": ["AssetV1"], + "schema": { + "type": "object", + "properties": { + "startDate": { + "type": "object", + "title": "Start date", + "description": "Earliest date of assets to include", + "properties": { + "day": { + "type": "number", + "title": "Day", + "description": "Day of the year to match", + "uiHint": { + "order": 1 + } + }, + "month": { + "type": "number", + "title": "Month", + "description": "Month of the year to match", + "uiHint": { + "order": 2 + } + }, + "year": { + "type": "number", + "title": "Year", + "description": "Year to match", + "uiHint": { + "order": 3 + } + } + }, + "uiHint": { + "order": 1 + }, + "required": ["day", "month", "year"] + }, + "endDate": { + "type": "object", + "title": "End date", + "description": "Latest date of assets to include", + "properties": { + "day": { + "type": "number", + "title": "Day", + "description": "Day of the year to match", + "uiHint": { + "order": 1 + } + }, + "month": { + "type": "number", + "title": "Month", + "description": "Month of the year to match", + "uiHint": { + "order": 2 + } + }, + "year": { + "type": "number", + "title": "Year", + "description": "Year to match", + "uiHint": { + "order": 3 + } + } + }, + "uiHint": { + "order": 2 + }, + "required": ["day", "month", "year"] + }, + "recurring": { + "type": "boolean", + "default": false, + "title": "Match recurring dates", + "description": "Allow any assets with matching months/days regardless of the year", + "uiHint": { + "order": 3 + } + } + }, + "required": ["recurring", "startDate", "endDate"] + }, + "uiHints": ["Filter"] + }, { "name": "assetTypeFilter", "title": "Filter by asset type", @@ -203,6 +308,126 @@ }, "uiHints": ["Filter"] }, + { + "name": "assetAddTags", + "title": "Add Tags", + "description": "Add tags to an asset", + "types": ["AssetV1"], + "hostFunctions": true, + "schema": { + "type": "object", + "properties": { + "tags": { + "title": "Tags", + "description": "Tags to add to the asset", + "type": "string", + "array": true, + "uiHint": { + "type": "TagId" + } + } + }, + "required": ["tags"] + } + }, + { + "name": "assetTagFilter", + "title": "Filter by tags", + "description": "Filter assets by which tags they have", + "types": ["AssetV1"], + "schema": { + "type": "object", + "properties": { + "tags": { + "title": "Tags", + "description": "Which tags the asset must have", + "type": "string", + "array": true, + "uiHint": { + "type": "TagId" + } + }, + "matching": { + "title": "Matching", + "description": "Whether assets must have all, any, or none of the listed tags", + "type": "string", + "enum": ["all", "any", "none"] + } + }, + "required": ["tags", "matching"] + }, + "uiHints": ["Filter"] + }, + { + "name": "assetExifFilter", + "title": "Filter by EXIF metadata", + "description": "Filter assets by their EXIF properties", + "types": ["AssetV1"], + "schema": { + "type": "object", + "properties": { + "property": { + "title": "Property", + "description": "EXIF property to match", + "type": "string", + "enum": [ + "make", + "model", + "exifImageWidth", + "exifImageHeight", + "fileSizeInByte", + "orientation", + "lensModel", + "fNumber", + "focalLength", + "iso", + "description", + "fps", + "exposureTime", + "livePhotoCID", + "timeZone", + "projectionType", + "profileDescription", + "colorspace", + "bitsPerSample", + "rating" + ], + "uiHint": { + "order": 1 + } + }, + "pattern": { + "type": "string", + "title": "Pattern", + "description": "Text or regex pattern to match against property value", + "uiHint": { + "order": 2 + } + }, + "matchType": { + "type": "string", + "title": "Match type", + "enum": ["contains", "startsWith", "exact", "regex"], + "default": "contains", + "description": "Type of pattern matching to perform", + "uiHint": { + "order": 3 + } + }, + "caseSensitive": { + "type": "boolean", + "default": false, + "title": "Case sensitive", + "description": "Whether matching should be case-sensitive", + "uiHint": { + "order": 4 + } + } + }, + "required": ["property", "pattern"] + }, + "uiHints": ["Filter"] + }, { "name": "assetArchive", "title": "Archive asset", diff --git a/packages/plugin-core/package.json b/packages/plugin-core/package.json index 5e4812bb1c..4fba4f4128 100644 --- a/packages/plugin-core/package.json +++ b/packages/plugin-core/package.json @@ -16,6 +16,6 @@ "@immich/sdk": "workspace:*", "@immich/plugin-sdk": "workspace:*", "esbuild": "^0.28.0", - "typescript": "^6.0.0" + "typescript": "^7.0.0" } } diff --git a/packages/plugin-core/src/index.ts b/packages/plugin-core/src/index.ts index 90083ab689..251393ace5 100644 --- a/packages/plugin-core/src/index.ts +++ b/packages/plugin-core/src/index.ts @@ -2,7 +2,48 @@ import { wrapper } from '@immich/plugin-sdk'; import { AssetVisibility } from '@immich/sdk'; import type { Manifest } from '../dist/index.d.ts'; +type MatchValueConfig = { + pattern: string; + matchType?: 'contains' | 'exact' | 'regex' | 'startsWith'; + caseSensitive?: boolean; +}; + +const matchValueResult = (value: string, config: MatchValueConfig) => { + const { pattern, matchType = 'contains', caseSensitive = false } = config; + const searchName = caseSensitive ? value : value.toLowerCase(); + const searchPattern = caseSensitive ? pattern : pattern.toLowerCase(); + + switch (matchType) { + case 'contains': { + return { workflow: { continue: searchName.includes(searchPattern) } }; + } + + case 'exact': { + return { workflow: { continue: searchName === searchPattern } }; + } + + case 'startsWith': { + return { workflow: { continue: searchName.startsWith(searchPattern) } }; + } + + case 'regex': { + const flags = caseSensitive ? '' : 'i'; + const regex = new RegExp(searchPattern, flags); + return { workflow: { continue: regex.test(value) } }; + } + + default: { + return {}; + } + } +}; + const methods = wrapper({ + assetAddTags: ({ config, data, functions }) => { + functions.bulkTagAssets({ assetIds: [data.asset.id], tagIds: config.tags }); + return {}; + }, + assetAddToAlbums: ({ config, data, functions }) => { const assetId = data.asset.id; @@ -53,39 +94,8 @@ const methods = wrapper({ } }, - assetFileFilter: ({ data, config }) => { - const { pattern, matchType = 'contains', caseSensitive = false } = config; - - const { asset } = data; - - const fileName = asset.originalFileName || ''; - const searchName = caseSensitive ? fileName : fileName.toLowerCase(); - const searchPattern = caseSensitive ? pattern : pattern.toLowerCase(); - - switch (matchType) { - case 'contains': { - return { workflow: { continue: searchName.includes(searchPattern) } }; - } - - case 'exact': { - return { workflow: { continue: searchName === searchPattern } }; - } - - case 'startsWith': { - return { workflow: { continue: searchName.startsWith(searchPattern) } }; - } - - case 'regex': { - const flags = caseSensitive ? '' : 'i'; - const regex = new RegExp(searchPattern, flags); - return { workflow: { continue: regex.test(fileName) } }; - } - - default: { - return {}; - } - } - }, + assetFileFilter: ({ data, config }) => + matchValueResult(config.usePath ? data.asset.originalPath : data.asset.originalFileName, config), assetLocationFilter: ({ config, data }) => { if ( @@ -96,10 +106,10 @@ const methods = wrapper({ return { workflow: { continue: false } }; } - const configLat = Number.parseFloat(config.coordinate?.latitude ?? ''); - const configLon = Number.parseFloat(config.coordinate?.longitude ?? ''); + const configLat = config.coordinate?.latitude; + const configLon = config.coordinate?.longitude; - if (Number.isNaN(configLat) || Number.isNaN(configLat)) { + if (configLat === undefined || configLon === undefined) { return { workflow: { continue: true } }; } @@ -124,6 +134,35 @@ const methods = wrapper({ return { workflow: { continue: earthDiameter * delta <= (config.coordinate?.radius ?? 0) } }; }, + assetExifFilter: ({ config, data }) => { + if (!data.asset.exifInfo || data.asset.exifInfo[config.property] === null) { + return { workflow: { continue: false } }; + } + + return matchValueResult(String(data.asset.exifInfo[config.property]), config); + }, + + assetDateFilter: ({ config, data }) => { + const assetDate = new Date(data.asset.localDateTime); + let startDate = new Date(config.startDate.year, config.startDate.month - 1, config.startDate.day); + let endDate = new Date(config.endDate.year, config.endDate.month - 1, config.endDate.day + 1); + + if (config.recurring) { + startDate.setFullYear(assetDate.getFullYear()); + endDate.setFullYear(assetDate.getFullYear()); + + if (endDate < startDate) { + if (assetDate > endDate) { + endDate.setFullYear(endDate.getFullYear() + 1); + } else { + startDate.setFullYear(startDate.getFullYear() - 1); + } + } + } + + return { workflow: { continue: assetDate >= startDate && assetDate < endDate } }; + }, + assetLock: ({ config, data }) => { if (!config.inverse && data.asset.visibility !== AssetVisibility.Locked) { return { changes: { asset: { visibility: AssetVisibility.Locked } } }; @@ -142,6 +181,24 @@ const methods = wrapper({ return { workflow: { continue: hasTimeZone === needsTimeZone } }; }, + assetTagFilter: ({ config, data }) => { + const assetTags = data.asset.tags.map((tag) => tag.id); + + for (const tag of config.tags) { + if (assetTags.includes(tag)) { + if (config.matching === 'any') { + break; + } else if (config.matching === 'none') { + return { workflow: { continue: false } }; + } + } else if (config.matching === 'all') { + return { workflow: { continue: false } }; + } + } + + return { workflow: { continue: true } }; + }, + assetTypeFilter: ({ config, data }) => { return { workflow: { continue: config.allowedTypes.includes(data.asset.type) } }; }, @@ -150,18 +207,22 @@ const methods = wrapper({ changes: { asset: { visibility: config.visibility as AssetVisibility } }, }), - webhook: ({ config, data, functions }) => { - const headers: Record = { - 'Content-Type': 'application/json', - }; + webhook: ({ config, data, functions, type, trigger }) => { + const headers: Record = {}; if (config.headerName && config.headerValue) { headers[config.headerName] = config.headerValue; } + headers['Content-Type'] = 'application/json'; + functions.httpRequest(config.url, { method: config.method ?? 'POST', - body: JSON.stringify(data.asset), + body: JSON.stringify({ + type, + trigger, + data, + }), headers, }); @@ -170,13 +231,17 @@ const methods = wrapper({ }); const { + assetAddTags, assetAddToAlbums, assetArchive, assetFavorite, assetFileFilter, assetLocationFilter, + assetExifFilter, + assetDateFilter, assetLock, assetMissingTimeZoneFilter, + assetTagFilter, assetTypeFilter, assetVisibility, webhook, @@ -186,13 +251,17 @@ const { } = methods; export { + assetAddTags, assetAddToAlbums, assetArchive, assetFavorite, assetFileFilter, assetLocationFilter, + assetExifFilter, + assetDateFilter, assetLock, assetMissingTimeZoneFilter, + assetTagFilter, assetTypeFilter, assetVisibility, webhook, diff --git a/packages/plugin-sdk/package.json b/packages/plugin-sdk/package.json index 37fe066ea6..4ae3ca76a7 100644 --- a/packages/plugin-sdk/package.json +++ b/packages/plugin-sdk/package.json @@ -27,14 +27,14 @@ "keywords": [], "author": "", "license": "GNU Affero General Public License version 3", - "packageManager": "pnpm@11.6.0", + "packageManager": "pnpm@11.20.0", "devDependencies": { "@extism/js-pdk": "^1.1.1", "@immich/sdk": "workspace:*", - "@types/node": "^24.13.2", + "@types/node": "^24.13.3", "esbuild": "^0.28.0", "tsc-alias": "^1.8.16", - "typescript": "^6.0.0" + "typescript": "^7.0.0" }, "peerDependencies": { "@extism/js-pdk": "^1.1.1" diff --git a/packages/plugin-sdk/src/host-functions.ts b/packages/plugin-sdk/src/host-functions.ts index 9d52630438..e0b6e34da9 100644 --- a/packages/plugin-sdk/src/host-functions.ts +++ b/packages/plugin-sdk/src/host-functions.ts @@ -4,6 +4,8 @@ import { type BulkIdResponseDto, type BulkIdsDto, type CreateAlbumDto, + type TagBulkAssetsDto, + type TagBulkAssetsResponseDto, } from '@immich/sdk'; declare module 'extism:host' { @@ -47,6 +49,7 @@ export const availableFunctions = [ 'addAssetsToAlbum', 'addAssetsToAlbums', 'httpRequest', + 'bulkTagAssets', ] as const; export const hostFunctions = (authToken: string) => { @@ -96,5 +99,11 @@ export const hostFunctions = (authToken: string) => { authToken, [url, options], ), + bulkTagAssets: (dto: TagBulkAssetsDto) => + call<[TagBulkAssetsDto], TagBulkAssetsResponseDto>( + 'bulkTagAssets', + authToken, + [dto], + ), } satisfies Record<(typeof availableFunctions)[number], unknown>; }; diff --git a/packages/plugin-sdk/src/types.ts b/packages/plugin-sdk/src/types.ts index 9756d652c3..94c968978d 100644 --- a/packages/plugin-sdk/src/types.ts +++ b/packages/plugin-sdk/src/types.ts @@ -1,4 +1,9 @@ -import type { AssetTypeEnum, AssetVisibility, WorkflowType } from '@immich/sdk'; +import type { + AssetTypeEnum, + AssetVisibility, + TagResponseDto, + WorkflowType, +} from '@immich/sdk'; type DeepPartial = T extends Date ? T @@ -18,6 +23,7 @@ export type WorkflowEventData = WorkflowEventMap[T]; export enum WorkflowTrigger { AssetCreate = 'AssetCreate', AssetMetadataExtraction = 'AssetMetadataExtraction', + AssetTagged = 'AssetTagged', // PersonRecognized = 'PersonRecognized', } @@ -88,6 +94,7 @@ export type AssetV1 = { duplicateId: string | null; visibility: AssetVisibility; isEdited: boolean; + tags: TagResponseDto[]; exifInfo: { make: string | null; model: string | null; diff --git a/packages/scripts/package.json b/packages/scripts/package.json index c87dc8747a..ca08f10759 100644 --- a/packages/scripts/package.json +++ b/packages/scripts/package.json @@ -27,10 +27,10 @@ "semver": "^7.8.1" }, "devDependencies": { - "@types/node": "^24.13.2", + "@types/node": "^24.13.3", "@types/semver": "^7.7.1", "vite": "^8.0.16", "vitest": "^4.1.8" }, - "packageManager": "pnpm@11.6.0" + "packageManager": "pnpm@11.20.0" } diff --git a/packages/scripts/src/cli.ts b/packages/scripts/src/cli.ts index c89a0f142c..95e50e9770 100644 --- a/packages/scripts/src/cli.ts +++ b/packages/scripts/src/cli.ts @@ -23,32 +23,25 @@ export const cli = (argv: string[]) => { .choices(RELEASE_TYPES) .makeOptionMandatory(), ) - .addOption( - new Option('-m, --mobile ', 'pump mobile build number') - .choices(['true', 'false']) - .default('false'), - ) - .action( - ({ type, mobile }: { type: ReleaseType; mobile: 'true' | 'false' }) => { - try { - console.log(handleRelease({ type, mobile: mobile === 'true' })); - } catch (error) { - if (error instanceof ReleaseInputError) { - console.log(program.usage()); - process.exit(1); - } - - if (error instanceof ReleaseError) { - console.log( - `Invalid pump: ${type}. Pumping from ${error.version} to ${error.newVersion} is not allowed.`, - ); - process.exit(1); - } - - throw error; + .action(({ type }: { type: ReleaseType }) => { + try { + console.log(handleRelease({ type })); + } catch (error) { + if (error instanceof ReleaseInputError) { + console.log(program.usage()); + process.exit(1); } - }, - ); + + if (error instanceof ReleaseError) { + console.log( + `Invalid pump: ${type}. Pumping from ${error.version} to ${error.newVersion} is not allowed.`, + ); + process.exit(1); + } + + throw error; + } + }); return program.parse(argv); }; diff --git a/packages/scripts/src/commands/release.spec.ts b/packages/scripts/src/commands/release.spec.ts index de769ebdc6..dc3f82517d 100644 --- a/packages/scripts/src/commands/release.spec.ts +++ b/packages/scripts/src/commands/release.spec.ts @@ -1,17 +1,9 @@ -import { beforeEach, describe, expect, it, vi } from 'vitest'; -import { - resolveArchivedVersions, - ArchivedVersion, - getNewVersion, - ReleaseError, -} from './release'; +import semver from 'semver'; +import { describe, expect, it } from 'vitest'; +import { getMobileBuild, getNewVersion, ReleaseError } from './release'; -const archived = (label: string): ArchivedVersion => ({ - label, - url: `https://docs.${label}.archive.immich.app`, -}); - -const labels = (versions: ArchivedVersion[]) => versions.map((v) => v.label); +const mobileBuild = (version: string) => + getMobileBuild(semver.parse(version) as semver.SemVer); describe(getNewVersion.name, () => { describe('transitions', () => { @@ -77,63 +69,55 @@ describe(getNewVersion.name, () => { }); }); -describe(resolveArchivedVersions.name, () => { - beforeEach(() => { - // silence the "Removed ..." progress logging - vi.spyOn(console, 'log').mockImplementation(() => {}); +describe(getMobileBuild.name, () => { + it('should encode the version', () => { + expect(mobileBuild('3.1.0')).toBe(3_010_099); + expect(mobileBuild('3.1.4')).toBe(3_010_499); + expect(mobileBuild('3.2.0-rc.0')).toBe(3_020_000); + expect(mobileBuild('3.2.0-rc.3')).toBe(3_020_003); }); - it('should prepend the new version to the front', () => { - const result = resolveArchivedVersions([archived('v2.9.0')], '3.0.0'); - - expect(result[0]).toEqual({ - label: 'v3.0.0', - url: 'https://docs.v3.0.0.archive.immich.app', - }); - expect(labels(result)).toEqual(['v3.0.0', 'v2.9.0']); + it('should be above the last hand-maintained build number', () => { + expect(mobileBuild('3.1.0')).toBeGreaterThan(3057); }); - it('should handle an empty list', () => { - expect(labels(resolveArchivedVersions([], '3.0.0'))).toEqual(['v3.0.0']); + it('should stay under the play store limit', () => { + expect(mobileBuild('99.99.99')).toBeLessThan(2_100_000_000); }); - it('should drop older patch releases of the new version minor', () => { - const versions = ['v3.0.4', 'v3.0.3', 'v3.0.2'].map(archived); + it('should increase across a release cycle', () => { + const versions = [ + '3.1.0', + '3.1.1', + '3.2.0-rc.0', + '3.2.0-rc.1', + '3.2.0', + '3.2.1', + '3.3.0-rc.0', + '4.0.0-rc.0', + '4.0.0', + ]; - expect(labels(resolveArchivedVersions(versions, '3.0.5'))).toEqual([ - 'v3.0.5', - ]); + const builds = versions.map((version) => mobileBuild(version)); + expect(builds).toEqual([...builds].sort((a, b) => a - b)); + expect(new Set(builds).size).toBe(builds.length); }); - it('should keep the latest patch of each older minor', () => { - const versions = ['v3.1.2', 'v3.1.1', 'v3.0.9', 'v2.0.0'].map(archived); - - expect(labels(resolveArchivedVersions(versions, '3.2.0'))).toEqual([ - 'v3.2.0', - 'v3.1.2', - 'v3.0.9', - 'v2.0.0', - ]); + it('should rank a release above its own candidates', () => { + expect(mobileBuild('3.2.0')).toBeGreaterThan(mobileBuild('3.2.0-rc.98')); }); - it('should keep an older minor when bumping a patch', () => { - const versions = ['v3.0.4', 'v3.0.3', 'v2.9.1', 'v2.9.0', 'v1.5.0'].map( - archived, - ); - - expect(labels(resolveArchivedVersions(versions, '3.0.5'))).toEqual([ - 'v3.0.5', - 'v2.9.1', - 'v1.5.0', - ]); + it('should rank a patch on an older line below the newer line', () => { + expect(mobileBuild('3.1.5')).toBeLessThan(mobileBuild('3.2.0')); }); - it('should replace a prerelease with its release', () => { - const versions = ['v3.0.0-rc.2', 'v3.0.0-rc.1', 'v2.9.0'].map(archived); - - expect(labels(resolveArchivedVersions(versions, '3.0.0'))).toEqual([ - 'v3.0.0', - 'v2.9.0', - ]); + it('should refuse versions it cannot encode', () => { + expect(() => mobileBuild('100.0.0')).toThrow('Cannot derive'); + expect(() => mobileBuild('3.100.0')).toThrow('Cannot derive'); + expect(() => mobileBuild('3.1.100')).toThrow('Cannot derive'); + expect(() => mobileBuild('3.1.0-rc.99')).toThrow('Cannot derive'); + expect(() => mobileBuild('3.1.0-beta')).toThrow('Cannot derive'); + expect(() => mobileBuild('3.1.0-rc.-1')).toThrow('Cannot derive'); + expect(() => mobileBuild('3.1.0-rc.x')).toThrow('Cannot derive'); }); }); diff --git a/packages/scripts/src/commands/release.ts b/packages/scripts/src/commands/release.ts index 68ef1dbf0e..2c0d82d5f6 100644 --- a/packages/scripts/src/commands/release.ts +++ b/packages/scripts/src/commands/release.ts @@ -26,7 +26,6 @@ const Files = { Docs: { Env: join(root, 'docs/docs/install/environment-variables.md'), Upgrading: join(root, 'docs/docs/install/upgrading.md'), - ArchivedVersions: join(root, 'docs/static/archived-versions.json'), }, Mobile: { Pubspec: join(root, 'mobile/pubspec.yaml'), @@ -35,7 +34,7 @@ const Files = { }, }; -export const handleRelease = ({ type, mobile }: ReleaseOptions) => { +export const handleRelease = ({ type }: ReleaseOptions) => { const versionRaw = getVersion(); const newVersionRaw = getNewVersion(versionRaw, type); const newVersion = semver.parse(normalize(newVersionRaw)); @@ -43,8 +42,7 @@ export const handleRelease = ({ type, mobile }: ReleaseOptions) => { throw new ReleaseInputError(); } const newVersionNoRc = `${newVersion.major}.${newVersion.minor}.${newVersion.patch}`; - const mobileBuild = getMobileBuild(); - const newMobileBuild = mobile ? mobileBuild + 1 : mobileBuild; + const newMobileBuild = getMobileBuild(newVersion); // pump versions everywhere @@ -93,13 +91,6 @@ export const handleRelease = ({ type, mobile }: ReleaseOptions) => { pump(Files.Docs.Upgrading, /:v\d+/, `:${major}`); } - // update archived versions list - const archivedFile = new JsonFile( - Files.Docs.ArchivedVersions, - ); - const versions = archivedFile.read(); - archivedFile.write(resolveArchivedVersions(versions, newVersionRaw)); - if (process.env.GITHUB_ENV) { // make available for following steps appendFileSync( @@ -189,14 +180,32 @@ export const getNewVersion = (versionRaw: string, type: string) => { return newVersionRaw; }; -const getMobileBuild = () => { - const pubspec = new TextFile(Files.Mobile.Pubspec).read(); - const match = pubspec.match(/^version: .*\+(\d+)$/m); - if (!match) { - throw new Error('Could not find mobile build number in pubspec.yaml'); +const RADIX = 100; +const STABLE = RADIX - 1; + +export const getMobileBuild = (version: SemVer) => { + const { major, minor, patch, prerelease } = version; + const candidate = prerelease[1]; + const digit = typeof candidate === 'number' ? candidate : STABLE; + + const valid = + major < RADIX && + minor < RADIX && + patch < RADIX && + (prerelease.length === 0 || digit < STABLE); + + if (!valid) { + throw new Error( + `Cannot derive a mobile build number from ${version.format()}`, + ); } - return Number(match[1]); + return ( + major * Math.pow(RADIX, 3) + + minor * Math.pow(RADIX, 2) + + patch * RADIX + + digit + ); }; const pump = (path: string, pattern: RegExp, replacement: string) => { @@ -205,50 +214,6 @@ const pump = (path: string, pattern: RegExp, replacement: string) => { file.write(update); }; -export interface ArchivedVersion { - label: string; - url: string; -} - -export const resolveArchivedVersions = ( - versions: ArchivedVersion[], - nextVersion: string, -): ArchivedVersion[] => { - const newVersion: ArchivedVersion = { - label: `v${nextVersion}`, - url: `https://docs.v${nextVersion}.archive.immich.app`, - }; - - let result = versions; - let lastVersion = asVersion(newVersion); - for (const item of versions) { - const version = asVersion(item); - // only keep the latest patch version for each minor release - if ( - lastVersion.major === version.major && - lastVersion.minor === version.minor && - lastVersion.patch >= version.patch - ) { - result = result.filter((item) => item.label !== version.label); - console.log( - `Removed ${version.label} (replaced with ${lastVersion.label})`, - ); - continue; - } - - lastVersion = version; - } - - return [newVersion, ...result]; -}; - -const asVersion = (item: ArchivedVersion) => { - const { label, url } = item; - const [version] = label.substring(1).split('-'); - const [major, minor, patch] = version.split('.').map(Number); - return { major, minor, patch, label, url }; -}; - const isPrerelease = (version: SemVer) => version.prerelease.length > 0; /** diff --git a/packages/scripts/src/types.ts b/packages/scripts/src/types.ts index 9bc23f87b5..586fdb8763 100644 --- a/packages/scripts/src/types.ts +++ b/packages/scripts/src/types.ts @@ -11,7 +11,7 @@ export const RELEASE_TYPES = [ ] as const; export type ReleaseType = (typeof RELEASE_TYPES)[number]; -export type ReleaseOptions = { type: string; mobile: boolean }; +export type ReleaseOptions = { type: string }; export class TextFile { constructor(private file: string) {} diff --git a/packages/sdk/package.json b/packages/sdk/package.json index a1dc517097..7a640979f9 100644 --- a/packages/sdk/package.json +++ b/packages/sdk/package.json @@ -1,6 +1,6 @@ { "name": "@immich/sdk", - "version": "3.0.0-rc.3", + "version": "3.1.0", "description": "Auto-generated TypeScript SDK for the Immich API", "repository": { "type": "git", @@ -24,7 +24,7 @@ "@oazapfts/runtime": "^1.0.2" }, "devDependencies": { - "@types/node": "^24.13.2", - "typescript": "^6.0.0" + "@types/node": "^24.13.3", + "typescript": "^7.0.0" } } diff --git a/packages/sdk/src/fetch-client.ts b/packages/sdk/src/fetch-client.ts index a280d99fad..b2f98b58ef 100644 --- a/packages/sdk/src/fetch-client.ts +++ b/packages/sdk/src/fetch-client.ts @@ -1,6 +1,6 @@ /** * Immich - * 3.0.0-rc.3 + * 3.1.0 * DO NOT MODIFY - This file has been generated using oazapfts. * See https://www.npmjs.com/package/oazapfts */ @@ -342,6 +342,10 @@ export type RatingsResponse = { /** Whether ratings are enabled */ enabled: boolean; }; +export type RecentlyAddedResponse = { + /** Whether the recently added page appears in the web sidebar */ + sidebarWeb: boolean; +}; export type SharedLinksResponse = { /** Whether shared links are enabled */ enabled: boolean; @@ -364,6 +368,7 @@ export type UserPreferencesResponseDto = { people: PeopleResponse; purchase: PurchaseResponse; ratings: RatingsResponse; + recentlyAdded: RecentlyAddedResponse; sharedLinks: SharedLinksResponse; tags: TagsResponse; }; @@ -421,6 +426,10 @@ export type RatingsUpdate = { /** Whether ratings are enabled */ enabled?: boolean; }; +export type RecentlyAddedUpdate = { + /** Whether the recently added page appears in the web sidebar */ + sidebarWeb?: boolean; +}; export type SharedLinksUpdate = { /** Whether shared links are enabled */ enabled?: boolean; @@ -444,6 +453,7 @@ export type UserPreferencesUpdateDto = { people?: PeopleUpdate; purchase?: PurchaseUpdate; ratings?: RatingsUpdate; + recentlyAdded?: RecentlyAddedUpdate; sharedLinks?: SharedLinksUpdate; tags?: TagsUpdate; }; @@ -530,7 +540,7 @@ export type CreateAlbumDto = { /** Initial asset IDs */ assetIds?: string[]; /** Album description */ - description?: string; + description?: string | null; }; export type AlbumsAddAssetsDto = { /** Album IDs */ @@ -557,7 +567,7 @@ export type UpdateAlbumDto = { /** Album thumbnail asset ID */ albumThumbnailAssetId?: string; /** Album description */ - description?: string; + description?: string | null; /** Enable activity feed */ isActivityEnabled?: boolean; order?: AssetOrder; @@ -2292,6 +2302,10 @@ export type SystemConfigBackupsDto = { export type SystemConfigFFmpegRealtimeDto = { /** Enable real-time HLS transcoding (alpha) */ enabled: boolean; + /** Resolutions to use for real-time HLS transcoding */ + resolutions: HlsVideoResolution[]; + /** Video codecs to use for real-time HLS transcoding */ + videoCodecs: VideoCodec[]; }; export type SystemConfigFFmpegDto = { accel: TranscodeHWAccel; @@ -2777,6 +2791,8 @@ export type WorkflowResponseDto = { enabled: boolean; /** Workflow ID */ id: string; + /** Workflow logs run results */ + logging: boolean; /** Workflow name */ name: string | null; /** Workflow steps */ @@ -2791,6 +2807,8 @@ export type WorkflowCreateDto = { description?: string | null; /** Workflow enabled */ enabled?: boolean; + /** Workflow logs run results */ + logging?: boolean; /** Workflow name */ name?: string | null; steps?: WorkflowStepDto[]; @@ -2808,12 +2826,30 @@ export type WorkflowUpdateDto = { description?: string | null; /** Workflow enabled */ enabled?: boolean; + /** Workflow logs run results */ + logging?: boolean; /** Workflow name */ name?: string | null; steps?: WorkflowStepDto[]; /** Workflow trigger type */ trigger?: WorkflowTrigger; }; +export type WorkflowLogEntryDto = { + /** Workflow run date/time */ + at: string; + /** Workflow log entry ID */ + id: string; + /** Last step ran, if the workflow ended early */ + lastStep?: { + /** Index of the step in the workflow */ + index: number; + /** Method of the step */ + method: string; + }; + result: WorkflowResult; + /** Workflow trigger data ID */ + triggerDataId?: string; +}; export type WorkflowShareStepDto = { /** Step configuration */ config: { @@ -5750,13 +5786,18 @@ export function searchLargeAssets({ albumIds, city, country, createdAfter, creat /** * Search assets by metadata */ -export function searchAssets({ metadataSearchDto }: { +export function searchAssets({ key, slug, metadataSearchDto }: { + key?: string; + slug?: string; metadataSearchDto: MetadataSearchDto; }, opts?: Oazapfts.RequestOpts) { return oazapfts.ok(oazapfts.fetchJson<{ status: 200; data: SearchResponseDto; - }>("/search/metadata", oazapfts.json({ + }>(`/search/metadata${QS.query(QS.explode({ + key, + slug + }))}`, oazapfts.json({ ...opts, method: "POST", body: metadataSearchDto @@ -6958,10 +6999,11 @@ export function getUniqueOriginalPaths(opts?: Oazapfts.RequestOpts) { /** * List all workflows */ -export function searchWorkflows({ description, enabled, id, name, trigger }: { +export function searchWorkflows({ description, enabled, id, logging, name, trigger }: { description?: string; enabled?: boolean; id?: string; + logging?: boolean; name?: string; trigger?: WorkflowTrigger; }, opts?: Oazapfts.RequestOpts) { @@ -6972,6 +7014,7 @@ export function searchWorkflows({ description, enabled, id, name, trigger }: { description, enabled, id, + logging, name, trigger }))}`, { @@ -7044,6 +7087,26 @@ export function updateWorkflow({ id, workflowUpdateDto }: { body: workflowUpdateDto }))); } +/** + * Retrieve workflow logs + */ +export function getWorkflowLogs({ before, id, limit, result }: { + before?: string; + id: string; + limit?: number; + result?: WorkflowResult; +}, opts?: Oazapfts.RequestOpts) { + return oazapfts.ok(oazapfts.fetchJson<{ + status: 200; + data: WorkflowLogEntryDto[]; + }>(`/workflows/${encodeURIComponent(id)}/logs${QS.query(QS.explode({ + before, + limit, + result + }))}`, { + ...opts + })); +} /** * Retrieve a workflow */ @@ -7291,6 +7354,7 @@ export enum Permission { WorkflowRead = "workflow.read", WorkflowUpdate = "workflow.update", WorkflowDelete = "workflow.delete", + WorkflowLogs = "workflow.logs", AdminUserCreate = "adminUser.create", AdminUserRead = "adminUser.read", AdminUserUpdate = "adminUser.update", @@ -7404,7 +7468,8 @@ export enum WorkflowType { } export enum WorkflowTrigger { AssetCreate = "AssetCreate", - AssetMetadataExtraction = "AssetMetadataExtraction" + AssetMetadataExtraction = "AssetMetadataExtraction", + AssetTagged = "AssetTagged" } export enum QueueJobStatus { Active = "active", @@ -7619,6 +7684,13 @@ export enum CQMode { Cqp = "cqp", Icq = "icq" } +export enum HlsVideoResolution { + $480 = 480, + $720 = 720, + $1080 = 1080, + $1440 = 1440, + $2160 = 2160 +} export enum ToneMapping { Hable = "hable", Mobius = "mobius", @@ -7660,6 +7732,11 @@ export enum AssetOrderBy { TakenAt = "takenAt", CreatedAt = "createdAt" } +export enum WorkflowResult { + Completed = "completed", + Halted = "halted", + Error = "error" +} export enum ReleaseType { Major = "major", Premajor = "premajor", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index c6cebb0d5e..1e147c2502 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -19,31 +19,31 @@ importers: devDependencies: prettier: specifier: ^3.8.3 - version: 3.8.4 + version: 3.9.6 prettier-plugin-sort-json: specifier: ^4.2.0 - version: 4.2.0(prettier@3.8.4) + version: 4.2.0(prettier@3.9.6) .github: devDependencies: prettier: specifier: ^3.7.4 - version: 3.8.4 + version: 3.9.6 docs: dependencies: '@docusaurus/core': specifier: ~3.10.0 - version: 3.10.1(@mdx-js/react@3.1.1(@types/react@19.2.17)(react@19.2.7))(esbuild@0.28.1)(postcss@8.5.15)(react-dom@19.2.7(react@19.2.7))(react@19.2.7)(typescript@6.0.3) + version: 3.10.2(@mdx-js/react@3.1.1(@types/react@19.2.18)(react@19.2.8))(@swc/core@1.15.47(@swc/helpers@0.5.23))(@typescript/typescript6@6.0.2)(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(debug@4.4.3(supports-color@8.1.1))(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3) '@docusaurus/preset-classic': specifier: ~3.10.0 - version: 3.10.1(@algolia/client-search@5.54.0)(@mdx-js/react@3.1.1(@types/react@19.2.17)(react@19.2.7))(@types/react@19.2.17)(postcss@8.5.15)(react-dom@19.2.7(react@19.2.7))(react@19.2.7)(search-insights@2.17.3)(typescript@6.0.3) + version: 3.10.2(@algolia/client-search@5.56.0)(@mdx-js/react@3.1.1(@types/react@19.2.18)(react@19.2.8))(@swc/core@1.15.47(@swc/helpers@0.5.23))(@types/react@19.2.18)(@typescript/typescript6@6.0.2)(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(debug@4.4.3(supports-color@8.1.1))(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(search-insights@2.17.3)(supports-color@8.1.1)(uglify-js@3.19.3) '@docusaurus/theme-common': specifier: ~3.10.0 - version: 3.10.1(@docusaurus/plugin-content-docs@3.10.1(@mdx-js/react@3.1.1(@types/react@19.2.17)(react@19.2.7))(postcss@8.5.15)(react-dom@19.2.7(react@19.2.7))(react@19.2.7)(typescript@6.0.3))(postcss@8.5.15)(react-dom@19.2.7(react@19.2.7))(react@19.2.7) + version: 3.10.2(@docusaurus/plugin-content-docs@3.10.2(@mdx-js/react@3.1.1(@types/react@19.2.18)(react@19.2.8))(@swc/core@1.15.47(@swc/helpers@0.5.23))(@typescript/typescript6@6.0.2)(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(debug@4.4.3(supports-color@8.1.1))(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3))(@swc/core@1.15.47(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3) '@docusaurus/theme-mermaid': specifier: ~3.10.0 - version: 3.10.1(@docusaurus/plugin-content-docs@3.10.1(@mdx-js/react@3.1.1(@types/react@19.2.17)(react@19.2.7))(postcss@8.5.15)(react-dom@19.2.7(react@19.2.7))(react@19.2.7)(typescript@6.0.3))(@mdx-js/react@3.1.1(@types/react@19.2.17)(react@19.2.7))(postcss@8.5.15)(react-dom@19.2.7(react@19.2.7))(react@19.2.7)(typescript@6.0.3) + version: 3.10.2(@docusaurus/plugin-content-docs@3.10.2(@mdx-js/react@3.1.1(@types/react@19.2.18)(react@19.2.8))(@swc/core@1.15.47(@swc/helpers@0.5.23))(@typescript/typescript6@6.0.2)(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(debug@4.4.3(supports-color@8.1.1))(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3))(@mdx-js/react@3.1.1(@types/react@19.2.18)(react@19.2.8))(@swc/core@1.15.47(@swc/helpers@0.5.23))(@typescript/typescript6@6.0.2)(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(debug@4.4.3(supports-color@8.1.1))(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3) '@mdi/js': specifier: ^7.3.67 version: 7.4.47 @@ -52,62 +52,65 @@ importers: version: 1.6.1 '@mdx-js/react': specifier: ^3.0.0 - version: 3.1.1(@types/react@19.2.17)(react@19.2.7) + version: 3.1.1(@types/react@19.2.18)(react@19.2.8) autoprefixer: specifier: ^10.4.17 - version: 10.5.0(postcss@8.5.15) + version: 10.5.4(postcss@8.5.26) docusaurus-lunr-search: specifier: ^3.3.2 - version: 3.6.0(@docusaurus/core@3.10.1(@mdx-js/react@3.1.1(@types/react@19.2.17)(react@19.2.7))(esbuild@0.28.1)(postcss@8.5.15)(react-dom@19.2.7(react@19.2.7))(react@19.2.7)(typescript@6.0.3))(react-dom@19.2.7(react@19.2.7))(react@19.2.7) + version: 3.6.0(@docusaurus/core@3.10.2(@mdx-js/react@3.1.1(@types/react@19.2.18)(react@19.2.8))(@swc/core@1.15.47(@swc/helpers@0.5.23))(@typescript/typescript6@6.0.2)(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(debug@4.4.3(supports-color@8.1.1))(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3))(react-dom@19.2.8(react@19.2.8))(react@19.2.8) lunr: specifier: ^2.3.9 version: 2.3.9 postcss: specifier: ^8.4.25 - version: 8.5.15 + version: 8.5.26 prism-react-renderer: specifier: ^2.3.1 - version: 2.4.1(react@19.2.7) + version: 2.4.1(react@19.2.8) raw-loader: specifier: ^4.0.2 - version: 4.0.2(webpack@5.107.2(postcss@8.5.15)) + version: 4.0.2(webpack@5.108.4(@swc/core@1.15.47(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(uglify-js@3.19.3)) react: specifier: ^19.0.0 - version: 19.2.7 + version: 19.2.8 react-dom: specifier: ^19.0.0 - version: 19.2.7(react@19.2.7) + version: 19.2.8(react@19.2.8) tailwindcss: specifier: ^3.2.4 - version: 3.4.19(tsx@4.22.4)(yaml@2.9.0) + version: 3.4.19(tsx@4.23.9)(yaml@2.9.0) url: specifier: ^0.11.0 version: 0.11.4 devDependencies: '@docusaurus/module-type-aliases': specifier: ~3.10.0 - version: 3.10.1(postcss@8.5.15)(react-dom@19.2.7(react@19.2.7))(react@19.2.7) + version: 3.10.2(@swc/core@1.15.47(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3) '@docusaurus/tsconfig': specifier: ^3.10.0 - version: 3.10.1 + version: 3.10.2 '@docusaurus/types': specifier: ^3.10.0 - version: 3.10.1(postcss@8.5.15)(react-dom@19.2.7(react@19.2.7))(react@19.2.7) + version: 3.10.2(@swc/core@1.15.47(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3) + '@typescript/native': + specifier: npm:typescript@^7.0.2 + version: typescript@7.0.2 prettier: specifier: ^3.7.4 - version: 3.8.4 + version: 3.9.6 typescript: - specifier: ^6.0.0 - version: 6.0.3 + specifier: npm:@typescript/typescript6@^6.0.2 + version: '@typescript/typescript6@6.0.2' e2e: devDependencies: '@eslint/js': specifier: ^10.0.0 - version: 10.0.1(eslint@10.5.0(jiti@2.7.0)) + version: 10.0.1(eslint@10.8.0(jiti@2.7.0)(supports-color@8.1.1)) '@faker-js/faker': specifier: ^10.1.0 - version: 10.4.0 + version: 10.5.0 '@immich/cli': specifier: workspace:* version: link:../packages/cli @@ -119,82 +122,85 @@ importers: version: link:../packages/sdk '@playwright/test': specifier: ^1.44.1 - version: 1.60.0 + version: 1.62.1 '@socket.io/component-emitter': specifier: ^3.1.2 version: 3.1.2 '@types/luxon': specifier: ^3.4.2 - version: 3.7.1 + version: 3.7.3 '@types/node': - specifier: ^24.13.2 - version: 24.13.2 + specifier: ^24.13.3 + version: 24.13.3 '@types/pg': specifier: ^8.15.1 - version: 8.20.0 + version: 8.20.4 '@types/pngjs': specifier: ^6.0.4 version: 6.0.5 '@types/supertest': specifier: ^7.0.0 - version: 7.2.0 + version: 7.2.1 + '@typescript/native': + specifier: npm:typescript@^7.0.2 + version: typescript@7.0.2 dotenv: specifier: ^17.2.3 version: 17.4.2 eslint: specifier: ^10.0.0 - version: 10.5.0(jiti@2.7.0) + version: 10.8.0(jiti@2.7.0)(supports-color@8.1.1) eslint-config-prettier: specifier: ^10.1.8 - version: 10.1.8(eslint@10.5.0(jiti@2.7.0)) + version: 10.1.8(eslint@10.8.0(jiti@2.7.0)(supports-color@8.1.1)) eslint-plugin-prettier: specifier: ^5.1.3 - version: 5.5.6(@types/eslint@9.6.1)(eslint-config-prettier@10.1.8(eslint@10.5.0(jiti@2.7.0)))(eslint@10.5.0(jiti@2.7.0))(prettier@3.8.4) + version: 5.5.6(@types/eslint@9.6.1)(eslint-config-prettier@10.1.8(eslint@10.8.0(jiti@2.7.0)(supports-color@8.1.1)))(eslint@10.8.0(jiti@2.7.0)(supports-color@8.1.1))(prettier@3.9.6) eslint-plugin-unicorn: - specifier: ^64.0.0 - version: 64.0.0(eslint@10.5.0(jiti@2.7.0)) + specifier: ^72.0.0 + version: 72.0.0(eslint@10.8.0(jiti@2.7.0)(supports-color@8.1.1)) exiftool-vendored: specifier: ^35.0.0 version: 35.21.0 globals: specifier: ^17.0.0 - version: 17.6.0 + version: 17.9.0 luxon: specifier: ^3.4.4 version: 3.7.2 pg: specifier: ^8.11.3 - version: 8.21.0 + version: 8.22.0 pngjs: specifier: ^7.0.0 version: 7.0.0 prettier: specifier: ^3.7.4 - version: 3.8.4 + version: 3.9.6 prettier-plugin-organize-imports: specifier: ^4.0.0 - version: 4.3.0(prettier@3.8.4)(typescript@6.0.3) + version: 4.3.0(@typescript/typescript6@6.0.2)(prettier@3.9.6) sharp: specifier: ^0.34.5 version: 0.34.5 socket.io-client: specifier: ^4.7.4 - version: 4.8.3 + version: 4.8.3(supports-color@8.1.1) supertest: specifier: ^7.0.0 - version: 7.2.2 + version: 7.2.2(supports-color@8.1.1) typescript: - specifier: ^6.0.0 - version: 6.0.3 + specifier: npm:@typescript/typescript6@^6.0.2 + version: '@typescript/typescript6@6.0.2' typescript-eslint: specifier: ^8.28.0 - version: 8.61.0(eslint@10.5.0(jiti@2.7.0))(typescript@6.0.3) + version: 8.66.0(@typescript/typescript6@6.0.2)(eslint@10.8.0(jiti@2.7.0)(supports-color@8.1.1))(supports-color@8.1.1) utimes: specifier: ^5.2.1 - version: 5.2.1 + version: 5.2.1(supports-color@8.1.1) vitest: specifier: ^4.0.0 - version: 4.1.9(@opentelemetry/api@1.9.1)(@types/node@24.13.2)(@vitest/coverage-v8@4.1.9)(happy-dom@20.10.3)(jsdom@26.1.0(canvas@3.2.3))(vite@8.0.16(@types/node@24.13.2)(esbuild@0.28.1)(jiti@2.7.0)(sass@1.101.0)(terser@5.48.0)(tsx@4.22.4)(yaml@2.9.0)) + version: 4.1.10(@opentelemetry/api@1.9.1)(@types/node@24.13.3)(@vitest/coverage-v8@4.1.10)(happy-dom@20.11.1)(jsdom@26.1.0(canvas@3.2.3)(supports-color@8.1.1))(vite@8.2.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(sass@1.102.0)(terser@5.49.0)(tsx@4.23.9)(yaml@2.9.0)) packages/cli: dependencies: @@ -216,7 +222,7 @@ importers: devDependencies: '@eslint/js': specifier: ^10.0.0 - version: 10.0.1(eslint@10.5.0(jiti@2.7.0)) + version: 10.0.1(eslint@10.8.0(jiti@2.7.0)(supports-color@8.1.1)) '@immich/sdk': specifier: workspace:* version: link:../sdk @@ -236,11 +242,14 @@ importers: specifier: ^4.13.1 version: 4.13.4 '@types/node': - specifier: ^24.13.2 - version: 24.13.2 + specifier: ^24.13.3 + version: 24.13.3 + '@typescript/native': + specifier: npm:typescript@^7.0.2 + version: typescript@7.0.2 '@vitest/coverage-v8': specifier: ^4.0.0 - version: 4.1.9(vitest@4.1.9) + version: 4.1.10(vitest@4.1.10) byte-size: specifier: ^9.0.0 version: 9.0.1 @@ -252,43 +261,43 @@ importers: version: 15.0.0 eslint: specifier: ^10.0.0 - version: 10.5.0(jiti@2.7.0) + version: 10.8.0(jiti@2.7.0)(supports-color@8.1.1) eslint-config-prettier: specifier: ^10.1.8 - version: 10.1.8(eslint@10.5.0(jiti@2.7.0)) + version: 10.1.8(eslint@10.8.0(jiti@2.7.0)(supports-color@8.1.1)) eslint-plugin-prettier: specifier: ^5.1.3 - version: 5.5.6(@types/eslint@9.6.1)(eslint-config-prettier@10.1.8(eslint@10.5.0(jiti@2.7.0)))(eslint@10.5.0(jiti@2.7.0))(prettier@3.8.4) + version: 5.5.6(@types/eslint@9.6.1)(eslint-config-prettier@10.1.8(eslint@10.8.0(jiti@2.7.0)(supports-color@8.1.1)))(eslint@10.8.0(jiti@2.7.0)(supports-color@8.1.1))(prettier@3.9.6) eslint-plugin-unicorn: - specifier: ^64.0.0 - version: 64.0.0(eslint@10.5.0(jiti@2.7.0)) + specifier: ^72.0.0 + version: 72.0.0(eslint@10.8.0(jiti@2.7.0)(supports-color@8.1.1)) globals: specifier: ^17.0.0 - version: 17.6.0 + version: 17.9.0 mock-fs: specifier: ^5.2.0 version: 5.5.0 prettier: specifier: ^3.7.4 - version: 3.8.4 + version: 3.9.6 prettier-plugin-organize-imports: specifier: ^4.0.0 - version: 4.3.0(prettier@3.8.4)(typescript@6.0.3) + version: 4.3.0(@typescript/typescript6@6.0.2)(prettier@3.9.6) typescript: - specifier: ^6.0.0 - version: 6.0.3 + specifier: npm:@typescript/typescript6@^6.0.2 + version: '@typescript/typescript6@6.0.2' typescript-eslint: specifier: ^8.58.0 - version: 8.61.0(eslint@10.5.0(jiti@2.7.0))(typescript@6.0.3) + version: 8.66.0(@typescript/typescript6@6.0.2)(eslint@10.8.0(jiti@2.7.0)(supports-color@8.1.1))(supports-color@8.1.1) vite: specifier: ^8.0.0 - version: 8.0.16(@types/node@24.13.2)(esbuild@0.28.1)(jiti@2.7.0)(sass@1.101.0)(terser@5.48.0)(tsx@4.22.4)(yaml@2.9.0) + version: 8.2.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(sass@1.102.0)(terser@5.49.0)(tsx@4.23.9)(yaml@2.9.0) vitest: specifier: ^4.0.0 - version: 4.1.9(@opentelemetry/api@1.9.1)(@types/node@24.13.2)(@vitest/coverage-v8@4.1.9)(happy-dom@20.10.3)(jsdom@26.1.0(canvas@3.2.3))(vite@8.0.16(@types/node@24.13.2)(esbuild@0.28.1)(jiti@2.7.0)(sass@1.101.0)(terser@5.48.0)(tsx@4.22.4)(yaml@2.9.0)) + version: 4.1.10(@opentelemetry/api@1.9.1)(@types/node@24.13.3)(@vitest/coverage-v8@4.1.10)(happy-dom@20.11.1)(jsdom@26.1.0(canvas@3.2.3)(supports-color@8.1.1))(vite@8.2.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(sass@1.102.0)(terser@5.49.0)(tsx@4.23.9)(yaml@2.9.0)) vitest-fetch-mock: specifier: ^0.4.0 - version: 0.4.5(vitest@4.1.9) + version: 0.4.5(vitest@4.1.10) yaml: specifier: ^2.3.1 version: 2.9.0 @@ -297,16 +306,16 @@ importers: devDependencies: '@types/oidc-provider': specifier: ^9.0.0 - version: 9.5.0 + version: 9.11.0 jose: specifier: ^6.0.0 - version: 6.2.3 + version: 6.2.8 oidc-provider: specifier: ^9.0.0 - version: 9.8.4 + version: 9.11.2(supports-color@8.1.1) tsx: specifier: ^4.20.6 - version: 4.22.4 + version: 4.23.9 packages/plugin-core: devDependencies: @@ -321,10 +330,10 @@ importers: version: link:../sdk esbuild: specifier: ^0.28.0 - version: 0.28.1 + version: 0.28.2 typescript: - specifier: ^6.0.0 - version: 6.0.3 + specifier: ^7.0.0 + version: 7.0.2 packages/plugin-sdk: dependencies: @@ -339,17 +348,17 @@ importers: specifier: workspace:* version: link:../sdk '@types/node': - specifier: ^24.13.2 - version: 24.13.2 + specifier: ^24.13.3 + version: 24.13.3 esbuild: specifier: ^0.28.0 - version: 0.28.1 + version: 0.28.2 tsc-alias: specifier: ^1.8.16 - version: 1.8.17 + version: 1.9.1 typescript: - specifier: ^6.0.0 - version: 6.0.3 + specifier: ^7.0.0 + version: 7.0.2 packages/scripts: dependencies: @@ -358,20 +367,20 @@ importers: version: 15.0.0 semver: specifier: ^7.8.1 - version: 7.8.4 + version: 7.8.5 devDependencies: '@types/node': - specifier: ^24.13.2 - version: 24.13.2 + specifier: ^24.13.3 + version: 24.13.3 '@types/semver': specifier: ^7.7.1 - version: 7.7.1 + version: 7.8.0 vite: specifier: ^8.0.16 - version: 8.0.16(@types/node@24.13.2)(esbuild@0.28.1)(jiti@2.7.0)(sass@1.101.0)(terser@5.48.0)(tsx@4.22.4)(yaml@2.9.0) + version: 8.2.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(sass@1.102.0)(terser@5.49.0)(tsx@4.23.9)(yaml@2.9.0) vitest: specifier: ^4.1.8 - version: 4.1.9(@opentelemetry/api@1.9.1)(@types/node@24.13.2)(@vitest/coverage-v8@4.1.9)(happy-dom@20.10.3)(jsdom@26.1.0(canvas@3.2.3))(vite@8.0.16(@types/node@24.13.2)(esbuild@0.28.1)(jiti@2.7.0)(sass@1.101.0)(terser@5.48.0)(tsx@4.22.4)(yaml@2.9.0)) + version: 4.1.10(@opentelemetry/api@1.9.1)(@types/node@24.13.3)(@vitest/coverage-v8@4.1.10)(happy-dom@20.11.1)(jsdom@26.1.0(canvas@3.2.3))(vite@8.2.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(sass@1.102.0)(terser@5.49.0)(tsx@4.23.9)(yaml@2.9.0)) packages/sdk: dependencies: @@ -380,11 +389,11 @@ importers: version: 1.2.0 devDependencies: '@types/node': - specifier: ^24.13.2 - version: 24.13.2 + specifier: ^24.13.3 + version: 24.13.3 typescript: - specifier: ^6.0.0 - version: 6.0.3 + specifier: ^7.0.0 + version: 7.0.2 server: dependencies: @@ -399,70 +408,70 @@ importers: version: 0.5.2 '@nestjs/bullmq': specifier: ^11.0.1 - version: 11.0.4(@nestjs/common@11.1.27(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/core@11.1.27)(bullmq@5.78.1) + version: 11.0.4(@nestjs/common@11.1.28(reflect-metadata@0.2.2)(rxjs@7.8.2)(supports-color@8.1.1))(@nestjs/core@11.1.28)(bullmq@5.81.3(supports-color@8.1.1)) '@nestjs/common': specifier: ^11.0.4 - version: 11.1.27(reflect-metadata@0.2.2)(rxjs@7.8.2) + version: 11.1.28(reflect-metadata@0.2.2)(rxjs@7.8.2)(supports-color@8.1.1) '@nestjs/core': specifier: ^11.0.4 - version: 11.1.27(@nestjs/common@11.1.27(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/platform-express@11.1.27)(@nestjs/websockets@11.1.27)(reflect-metadata@0.2.2)(rxjs@7.8.2) + version: 11.1.28(@nestjs/common@11.1.28(reflect-metadata@0.2.2)(rxjs@7.8.2)(supports-color@8.1.1))(@nestjs/platform-express@11.1.28)(@nestjs/websockets@11.1.28)(reflect-metadata@0.2.2)(rxjs@7.8.2) '@nestjs/platform-express': specifier: ^11.0.4 - version: 11.1.27(@nestjs/common@11.1.27(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/core@11.1.27) + version: 11.1.28(@nestjs/common@11.1.28(reflect-metadata@0.2.2)(rxjs@7.8.2)(supports-color@8.1.1))(@nestjs/core@11.1.28)(supports-color@8.1.1) '@nestjs/platform-socket.io': specifier: ^11.0.4 - version: 11.1.27(@nestjs/common@11.1.27(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/websockets@11.1.27)(rxjs@7.8.2) + version: 11.1.28(@nestjs/common@11.1.28(reflect-metadata@0.2.2)(rxjs@7.8.2)(supports-color@8.1.1))(@nestjs/websockets@11.1.28)(rxjs@7.8.2)(supports-color@8.1.1) '@nestjs/schedule': specifier: ^6.0.0 - version: 6.1.3(@nestjs/common@11.1.27(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/core@11.1.27) + version: 6.1.3(@nestjs/common@11.1.28(reflect-metadata@0.2.2)(rxjs@7.8.2)(supports-color@8.1.1))(@nestjs/core@11.1.28) '@nestjs/swagger': specifier: ^11.4.2 - version: 11.4.4(@nestjs/common@11.1.27(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/core@11.1.27)(reflect-metadata@0.2.2)(typescript@6.0.3) + version: 11.4.6(@nestjs/common@11.1.28(reflect-metadata@0.2.2)(rxjs@7.8.2)(supports-color@8.1.1))(@nestjs/core@11.1.28)(@typescript/typescript6@6.0.2)(reflect-metadata@0.2.2) '@nestjs/websockets': specifier: ^11.0.4 - version: 11.1.27(@nestjs/common@11.1.27(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/core@11.1.27)(@nestjs/platform-socket.io@11.1.27)(reflect-metadata@0.2.2)(rxjs@7.8.2) + version: 11.1.28(@nestjs/common@11.1.28(reflect-metadata@0.2.2)(rxjs@7.8.2)(supports-color@8.1.1))(@nestjs/core@11.1.28)(@nestjs/platform-socket.io@11.1.28)(reflect-metadata@0.2.2)(rxjs@7.8.2) '@opentelemetry/api': specifier: ^1.9.0 version: 1.9.1 '@opentelemetry/context-async-hooks': specifier: ^2.0.0 - version: 2.8.0(@opentelemetry/api@1.9.1) + version: 2.10.0(@opentelemetry/api@1.9.1) '@opentelemetry/exporter-prometheus': - specifier: ^0.219.0 - version: 0.219.0(@opentelemetry/api@1.9.1) + specifier: ^0.221.0 + version: 0.221.0(@opentelemetry/api@1.9.1) '@opentelemetry/instrumentation-http': - specifier: ^0.219.0 - version: 0.219.0(@opentelemetry/api@1.9.1) + specifier: ^0.221.0 + version: 0.221.0(@opentelemetry/api@1.9.1)(supports-color@8.1.1) '@opentelemetry/instrumentation-ioredis': - specifier: ^0.67.0 - version: 0.67.0(@opentelemetry/api@1.9.1) + specifier: ^0.69.0 + version: 0.69.0(@opentelemetry/api@1.9.1)(supports-color@8.1.1) '@opentelemetry/instrumentation-nestjs-core': - specifier: ^0.65.0 - version: 0.65.0(@opentelemetry/api@1.9.1) + specifier: ^0.67.0 + version: 0.67.0(@opentelemetry/api@1.9.1)(supports-color@8.1.1) '@opentelemetry/instrumentation-pg': - specifier: ^0.71.0 - version: 0.71.0(@opentelemetry/api@1.9.1) + specifier: ^0.73.0 + version: 0.73.0(@opentelemetry/api@1.9.1)(supports-color@8.1.1) '@opentelemetry/resources': specifier: ^2.0.1 - version: 2.8.0(@opentelemetry/api@1.9.1) + version: 2.10.0(@opentelemetry/api@1.9.1) '@opentelemetry/sdk-metrics': specifier: ^2.0.1 - version: 2.8.0(@opentelemetry/api@1.9.1) + version: 2.10.0(@opentelemetry/api@1.9.1) '@opentelemetry/sdk-node': - specifier: ^0.219.0 - version: 0.219.0(@opentelemetry/api@1.9.1) + specifier: ^0.221.0 + version: 0.221.0(@opentelemetry/api@1.9.1)(supports-color@8.1.1) '@opentelemetry/semantic-conventions': specifier: ^1.34.0 - version: 1.41.1 + version: 1.43.0 '@react-email/components': specifier: ^1.0.0 - version: 1.0.12(react-dom@19.2.7(react@19.2.7))(react@19.2.7) + version: 1.0.12(react-dom@19.2.8(react@19.2.8))(react@19.2.8) '@react-email/render': specifier: ^2.0.0 - version: 2.0.8(react-dom@19.2.7(react@19.2.7))(react@19.2.7) + version: 2.1.0(react-dom@19.2.8(react@19.2.8))(react@19.2.8) '@socket.io/redis-adapter': specifier: ^8.3.0 - version: 8.3.0(socket.io-adapter@2.5.7) + version: 8.3.0(socket.io-adapter@2.5.7(supports-color@8.1.1))(supports-color@8.1.1) archiver: specifier: ^7.0.0 version: 7.0.1 @@ -474,16 +483,16 @@ importers: version: 6.0.0 body-parser: specifier: ^2.2.0 - version: 2.2.2 + version: 2.3.0(supports-color@8.1.1) bullmq: specifier: ^5.51.0 - version: 5.78.1 + version: 5.81.3(supports-color@8.1.1) chokidar: specifier: ^4.0.3 version: 4.0.3 compression: specifier: ^1.8.0 - version: 1.8.1 + version: 1.8.1(supports-color@8.1.1) cookie: specifier: ^1.0.2 version: 1.1.1 @@ -498,7 +507,7 @@ importers: version: 35.21.0 express: specifier: ^5.1.0 - version: 5.2.1 + version: 5.2.1(supports-color@8.1.1) fast-glob: specifier: ^3.3.2 version: 3.3.3 @@ -510,25 +519,25 @@ importers: version: 3.9.0 geo-tz: specifier: ^8.0.0 - version: 8.1.7 + version: 8.1.8 handlebars: specifier: ^4.7.8 version: 4.7.9 helmet: specifier: ^8.1.0 - version: 8.2.0 + version: 8.3.0 i18n-iso-countries: specifier: ^7.6.0 version: 7.14.0 ioredis: specifier: ^5.8.2 - version: 5.11.1 + version: 5.11.1(supports-color@8.1.1) jose: specifier: ^6.0.0 - version: 6.2.3 + version: 6.2.8 js-yaml: - specifier: ^4.1.0 - version: 4.2.0 + specifier: ^5.0.0 + version: 5.2.3 jsonwebtoken: specifier: ^9.0.2 version: 9.0.3 @@ -552,43 +561,43 @@ importers: version: 2.2.0 nest-commander: specifier: ^3.16.0 - version: 3.20.1(@nestjs/common@11.1.27(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/core@11.1.27)(@types/inquirer@8.2.13)(@types/node@24.13.2)(typescript@6.0.3) + version: 3.20.1(@nestjs/common@11.1.28(reflect-metadata@0.2.2)(rxjs@7.8.2)(supports-color@8.1.1))(@nestjs/core@11.1.28)(@types/inquirer@8.2.13)(@types/node@24.13.3)(@typescript/typescript6@6.0.2) nestjs-cls: specifier: ^6.0.0 - version: 6.2.1(@nestjs/common@11.1.27(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/core@11.1.27)(reflect-metadata@0.2.2)(rxjs@7.8.2) + version: 6.2.1(@nestjs/common@11.1.28(reflect-metadata@0.2.2)(rxjs@7.8.2)(supports-color@8.1.1))(@nestjs/core@11.1.28)(reflect-metadata@0.2.2)(rxjs@7.8.2) nestjs-kysely: specifier: 3.1.2 - version: 3.1.2(@nestjs/common@11.1.27(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/core@11.1.27)(kysely@0.28.17)(reflect-metadata@0.2.2) + version: 3.1.2(@nestjs/common@11.1.28(reflect-metadata@0.2.2)(rxjs@7.8.2)(supports-color@8.1.1))(@nestjs/core@11.1.28)(kysely@0.28.17)(reflect-metadata@0.2.2) nestjs-otel: specifier: ^8.0.0 - version: 8.0.3(@nestjs/common@11.1.27(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/core@11.1.27) + version: 8.1.0(@nestjs/common@11.1.28(reflect-metadata@0.2.2)(rxjs@7.8.2)(supports-color@8.1.1))(@nestjs/core@11.1.28)(rxjs@7.8.2) nestjs-zod: specifier: ^5.3.0 - version: 5.4.0(@nestjs/common@11.1.27(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/swagger@11.4.4(@nestjs/common@11.1.27(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/core@11.1.27)(reflect-metadata@0.2.2)(typescript@6.0.3))(rxjs@7.8.2)(zod@4.3.6) + version: 5.5.0(@nestjs/common@11.1.28(reflect-metadata@0.2.2)(rxjs@7.8.2)(supports-color@8.1.1))(@nestjs/swagger@11.4.6(@nestjs/common@11.1.28(reflect-metadata@0.2.2)(rxjs@7.8.2)(supports-color@8.1.1))(@nestjs/core@11.1.28)(@typescript/typescript6@6.0.2)(reflect-metadata@0.2.2))(rxjs@7.8.2)(zod@4.3.6) nodemailer: specifier: ^9.0.0 - version: 9.0.1 + version: 9.0.4 openid-client: specifier: ^6.3.3 version: 6.8.4 pg: specifier: ^8.11.3 - version: 8.21.0 + version: 8.22.0 picomatch: specifier: ^4.0.2 - version: 4.0.4 + version: 4.0.5 postgres: specifier: 3.4.9 version: 3.4.9 react: specifier: ^19.0.0 - version: 19.2.7 + version: 19.2.8 react-dom: specifier: ^19.0.0 - version: 19.2.7(react@19.2.7) + version: 19.2.8(react@19.2.8) react-email: specifier: ^5.0.0 - version: 5.2.11 + version: 5.2.11(supports-color@8.1.1) reflect-metadata: specifier: ^0.2.0 version: 0.2.2 @@ -600,7 +609,7 @@ importers: version: 1.6.4 semver: specifier: ^7.8.1 - version: 7.8.4 + version: 7.8.5 sharp: specifier: ^0.34.5 version: 0.34.5 @@ -609,10 +618,10 @@ importers: version: 3.0.2 socket.io: specifier: ^4.8.1 - version: 4.8.3 + version: 4.8.3(supports-color@8.1.1) tailwindcss-preset-email: specifier: ^1.4.0 - version: 1.4.1(tailwindcss@3.4.19(tsx@4.22.4)(yaml@2.9.0)) + version: 1.4.1(tailwindcss@3.4.19(tsx@4.23.9)(yaml@2.9.0)) thumbhash: specifier: ^0.1.1 version: 0.1.1 @@ -624,7 +633,7 @@ importers: version: 2.0.10 uuid: specifier: ^14.0.0 - version: 14.0.0 + version: 14.0.1 validator: specifier: ^13.12.0 version: 13.15.35 @@ -634,19 +643,19 @@ importers: devDependencies: '@eslint/js': specifier: ^10.0.0 - version: 10.0.1(eslint@10.5.0(jiti@2.7.0)) + version: 10.0.1(eslint@10.8.0(jiti@2.7.0)(supports-color@8.1.1)) '@nestjs/cli': specifier: ^11.0.2 - version: 11.0.23(@swc/core@1.15.41(@swc/helpers@0.5.23))(@types/node@24.13.2)(esbuild@0.28.1)(lightningcss@1.32.0)(prettier@3.8.4) + version: 11.0.24(@swc/core@1.15.47(@swc/helpers@0.5.23))(@types/node@24.13.3)(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(prettier@3.9.6)(uglify-js@3.19.3) '@nestjs/schematics': specifier: ^11.0.0 - version: 11.1.0(chokidar@4.0.3)(prettier@3.8.4)(typescript@6.0.3) + version: 11.1.0(@typescript/typescript6@6.0.2)(chokidar@4.0.3)(prettier@3.9.6) '@nestjs/testing': specifier: ^11.0.4 - version: 11.1.27(@nestjs/common@11.1.27(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/core@11.1.27)(@nestjs/platform-express@11.1.27) + version: 11.1.28(@nestjs/common@11.1.28(reflect-metadata@0.2.2)(rxjs@7.8.2)(supports-color@8.1.1))(@nestjs/core@11.1.28)(@nestjs/platform-express@11.1.28) '@swc/core': specifier: ^1.4.14 - version: 1.15.41(@swc/helpers@0.5.23) + version: 1.15.47(@swc/helpers@0.5.23) '@types/archiver': specifier: ^7.0.0 version: 7.0.0 @@ -679,19 +688,19 @@ importers: version: 9.0.10 '@types/lodash': specifier: ^4.14.197 - version: 4.17.24 + version: 4.17.25 '@types/luxon': specifier: ^3.6.2 - version: 3.7.1 + version: 3.7.3 '@types/mock-fs': specifier: ^4.13.1 version: 4.13.4 '@types/multer': specifier: ^2.0.0 - version: 2.1.0 + version: 2.2.0 '@types/node': - specifier: ^24.13.2 - version: 24.13.2 + specifier: ^24.13.3 + version: 24.13.3 '@types/nodemailer': specifier: ^8.0.0 version: 8.0.1 @@ -703,37 +712,40 @@ importers: version: 6.0.5 '@types/react': specifier: ^19.0.0 - version: 19.2.17 + version: 19.2.18 '@types/semver': specifier: ^7.5.8 - version: 7.7.1 + version: 7.8.0 '@types/supertest': specifier: ^7.0.0 - version: 7.2.0 + version: 7.2.1 '@types/ua-parser-js': specifier: ^0.7.36 version: 0.7.39 '@types/validator': specifier: ^13.15.2 version: 13.15.10 + '@typescript/native': + specifier: npm:typescript@^7.0.2 + version: typescript@7.0.2 '@vitest/coverage-v8': specifier: ^4.0.0 - version: 4.1.9(vitest@3.2.6(@types/debug@4.1.13)(@types/node@24.13.2)(happy-dom@20.10.3)(jiti@2.7.0)(jsdom@26.1.0(canvas@3.2.3))(lightningcss@1.32.0)(sass@1.101.0)(terser@5.48.0)(tsx@4.22.4)(yaml@2.9.0)) + version: 4.1.10(vitest@3.2.7(@types/debug@4.1.13)(@types/node@24.13.3)(happy-dom@20.11.1)(jiti@2.7.0)(jsdom@26.1.0(canvas@3.2.3)(supports-color@8.1.1))(lightningcss@1.33.0)(sass@1.102.0)(supports-color@8.1.1)(terser@5.49.0)(tsx@4.23.9)(yaml@2.9.0)) eslint: specifier: ^10.0.0 - version: 10.5.0(jiti@2.7.0) + version: 10.8.0(jiti@2.7.0)(supports-color@8.1.1) eslint-config-prettier: specifier: ^10.1.8 - version: 10.1.8(eslint@10.5.0(jiti@2.7.0)) + version: 10.1.8(eslint@10.8.0(jiti@2.7.0)(supports-color@8.1.1)) eslint-plugin-prettier: specifier: ^5.1.3 - version: 5.5.6(@types/eslint@9.6.1)(eslint-config-prettier@10.1.8(eslint@10.5.0(jiti@2.7.0)))(eslint@10.5.0(jiti@2.7.0))(prettier@3.8.4) + version: 5.5.6(@types/eslint@9.6.1)(eslint-config-prettier@10.1.8(eslint@10.8.0(jiti@2.7.0)(supports-color@8.1.1)))(eslint@10.8.0(jiti@2.7.0)(supports-color@8.1.1))(prettier@3.9.6) eslint-plugin-unicorn: - specifier: ^64.0.0 - version: 64.0.0(eslint@10.5.0(jiti@2.7.0)) + specifier: ^72.0.0 + version: 72.0.0(eslint@10.8.0(jiti@2.7.0)(supports-color@8.1.1)) globals: specifier: ^17.0.0 - version: 17.6.0 + version: 17.9.0 mock-fs: specifier: ^5.2.0 version: 5.5.0 @@ -742,43 +754,43 @@ importers: version: 7.0.0 prettier: specifier: ^3.7.4 - version: 3.8.4 + version: 3.9.6 prettier-plugin-organize-imports: specifier: ^4.0.0 - version: 4.3.0(prettier@3.8.4)(typescript@6.0.3) + version: 4.3.0(@typescript/typescript6@6.0.2)(prettier@3.9.6) sql-formatter: specifier: ^15.0.0 - version: 15.8.1 + version: 15.8.2 supertest: specifier: ^7.1.0 - version: 7.2.2 + version: 7.2.2(supports-color@8.1.1) tailwindcss: specifier: ^3.4.0 - version: 3.4.19(tsx@4.22.4)(yaml@2.9.0) + version: 3.4.19(tsx@4.23.9)(yaml@2.9.0) testcontainers: specifier: ^12.0.0 - version: 12.0.2 + version: 12.1.0(supports-color@8.1.1) typescript: - specifier: ^6.0.0 - version: 6.0.3 + specifier: npm:@typescript/typescript6@^6.0.2 + version: '@typescript/typescript6@6.0.2' typescript-eslint: specifier: ^8.28.0 - version: 8.61.0(eslint@10.5.0(jiti@2.7.0))(typescript@6.0.3) + version: 8.66.0(@typescript/typescript6@6.0.2)(eslint@10.8.0(jiti@2.7.0)(supports-color@8.1.1))(supports-color@8.1.1) unplugin-swc: specifier: ^1.4.5 - version: 1.5.9(@swc/core@1.15.41(@swc/helpers@0.5.23))(rollup@4.62.0) + version: 1.5.10(@swc/core@1.15.47(@swc/helpers@0.5.23))(rollup@4.62.0) vite-tsconfig-paths: specifier: ^6.0.0 - version: 6.1.1(typescript@6.0.3)(vite@8.0.16(@types/node@24.13.2)(esbuild@0.28.1)(jiti@2.7.0)(sass@1.101.0)(terser@5.48.0)(tsx@4.22.4)(yaml@2.9.0)) + version: 6.1.1(@typescript/typescript6@6.0.2)(supports-color@8.1.1)(vite@8.2.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(sass@1.102.0)(terser@5.49.0)(tsx@4.23.9)(yaml@2.9.0)) vitest: specifier: ^3.0.0 - version: 3.2.6(@types/debug@4.1.13)(@types/node@24.13.2)(happy-dom@20.10.3)(jiti@2.7.0)(jsdom@26.1.0(canvas@3.2.3))(lightningcss@1.32.0)(sass@1.101.0)(terser@5.48.0)(tsx@4.22.4)(yaml@2.9.0) + version: 3.2.7(@types/debug@4.1.13)(@types/node@24.13.3)(happy-dom@20.11.1)(jiti@2.7.0)(jsdom@26.1.0(canvas@3.2.3)(supports-color@8.1.1))(lightningcss@1.33.0)(sass@1.102.0)(supports-color@8.1.1)(terser@5.49.0)(tsx@4.23.9)(yaml@2.9.0) web: dependencies: '@formatjs/icu-messageformat-parser': specifier: ^3.0.0 - version: 3.5.11 + version: 3.5.16 '@immich/justified-layout-wasm': specifier: ^0.4.3 version: 0.4.3 @@ -786,8 +798,8 @@ importers: specifier: workspace:* version: link:../packages/sdk '@immich/ui': - specifier: ^0.81.1 - version: 0.81.1(@sveltejs/kit@2.65.1(@opentelemetry/api@1.9.1)(@sveltejs/vite-plugin-svelte@7.1.2(svelte@5.56.3(@typescript-eslint/types@8.61.0))(vite@8.0.16(@types/node@24.13.2)(esbuild@0.28.1)(jiti@2.7.0)(sass@1.101.0)(terser@5.48.0)(tsx@4.22.4)(yaml@2.9.0)))(svelte@5.56.3(@typescript-eslint/types@8.61.0))(typescript@6.0.3)(vite@8.0.16(@types/node@24.13.2)(esbuild@0.28.1)(jiti@2.7.0)(sass@1.101.0)(terser@5.48.0)(tsx@4.22.4)(yaml@2.9.0)))(svelte@5.56.3(@typescript-eslint/types@8.61.0)) + specifier: ^0.85.0 + version: 0.85.0(@sveltejs/kit@2.70.2(@opentelemetry/api@1.9.1)(@sveltejs/vite-plugin-svelte@7.2.0(svelte@5.56.8(@typescript-eslint/types@8.66.0))(vite@8.2.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(sass@1.102.0)(terser@5.49.0)(tsx@4.23.9)(yaml@2.9.0)))(@typescript/typescript6@6.0.2)(svelte@5.56.8(@typescript-eslint/types@8.66.0))(vite@8.2.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(sass@1.102.0)(terser@5.49.0)(tsx@4.23.9)(yaml@2.9.0)))(svelte@5.56.8(@typescript-eslint/types@8.66.0)) '@mapbox/mapbox-gl-rtl-text': specifier: 0.4.0 version: 0.4.0 @@ -796,25 +808,25 @@ importers: version: 7.4.47 '@noble/hashes': specifier: ^2.2.0 - version: 2.2.0 + version: 2.3.0 '@photo-sphere-viewer/core': specifier: ^5.14.0 - version: 5.14.1 + version: 5.15.1 '@photo-sphere-viewer/equirectangular-video-adapter': specifier: ^5.14.0 - version: 5.14.1(@photo-sphere-viewer/core@5.14.1)(@photo-sphere-viewer/video-plugin@5.14.1(@photo-sphere-viewer/core@5.14.1)) + version: 5.15.1(@photo-sphere-viewer/core@5.15.1)(@photo-sphere-viewer/video-plugin@5.15.1(@photo-sphere-viewer/core@5.15.1)) '@photo-sphere-viewer/markers-plugin': specifier: ^5.14.0 - version: 5.14.1(@photo-sphere-viewer/core@5.14.1) + version: 5.15.1(@photo-sphere-viewer/core@5.15.1) '@photo-sphere-viewer/resolution-plugin': specifier: ^5.14.0 - version: 5.14.1(@photo-sphere-viewer/core@5.14.1)(@photo-sphere-viewer/settings-plugin@5.14.1(@photo-sphere-viewer/core@5.14.1)) + version: 5.15.1(@photo-sphere-viewer/core@5.15.1)(@photo-sphere-viewer/settings-plugin@5.15.1(@photo-sphere-viewer/core@5.15.1)) '@photo-sphere-viewer/settings-plugin': specifier: ^5.14.0 - version: 5.14.1(@photo-sphere-viewer/core@5.14.1) + version: 5.15.1(@photo-sphere-viewer/core@5.15.1) '@photo-sphere-viewer/video-plugin': specifier: ^5.14.0 - version: 5.14.1(@photo-sphere-viewer/core@5.14.1) + version: 5.15.1(@photo-sphere-viewer/core@5.15.1) '@types/geojson': specifier: ^7946.0.16 version: 7946.0.16 @@ -823,13 +835,13 @@ importers: version: 0.42.0 '@zoom-image/svelte': specifier: ^0.3.0 - version: 0.3.9(svelte@5.56.3(@typescript-eslint/types@8.61.0)) + version: 0.3.9(svelte@5.56.8(@typescript-eslint/types@8.66.0)) dom-to-image: specifier: ^2.6.0 version: 2.6.0 fabric: specifier: ^7.0.0 - version: 7.4.0 + version: 7.4.0(supports-color@8.1.1) geo-coordinates-parser: specifier: ^1.7.4 version: 1.7.4 @@ -841,16 +853,16 @@ importers: version: 4.7.9 happy-dom: specifier: ^20.0.0 - version: 20.10.3 + version: 20.11.1 hls-video-element: specifier: ^1.5.11 version: 1.5.11 hls.js: specifier: ^1.6.16 - version: 1.6.16 + version: 1.6.17 intl-messageformat: specifier: ^11.0.0 - version: 11.2.8 + version: 11.2.13 justified-layout: specifier: ^4.1.0 version: 4.1.0 @@ -865,7 +877,7 @@ importers: version: 5.24.0 media-chrome: specifier: ^4.19.0 - version: 4.19.2(react@19.2.7) + version: 4.19.2(react@19.2.8) pmtiles: specifier: ^4.3.0 version: 4.4.1 @@ -874,34 +886,34 @@ importers: version: 1.5.4 simple-icons: specifier: ^16.0.0 - version: 16.23.0 + version: 16.28.0 socket.io-client: specifier: ~4.8.0 - version: 4.8.3 + version: 4.8.3(supports-color@8.1.1) svelte-gestures: specifier: ^5.2.2 version: 5.2.2 svelte-i18n: specifier: ^4.0.1 - version: 4.0.1(svelte@5.56.3(@typescript-eslint/types@8.61.0)) + version: 4.0.1(svelte@5.56.8(@typescript-eslint/types@8.66.0)) svelte-jsoneditor: specifier: ^3.10.0 - version: 3.12.0(svelte@5.56.3(@typescript-eslint/types@8.61.0)) + version: 3.13.0(svelte@5.56.8(@typescript-eslint/types@8.66.0)) svelte-maplibre: specifier: ^1.2.5 - version: 1.3.0(svelte@5.56.3(@typescript-eslint/types@8.61.0)) + version: 1.3.0(svelte@5.56.8(@typescript-eslint/types@8.66.0)) svelte-persisted-store: specifier: ^0.12.0 - version: 0.12.0(svelte@5.56.3(@typescript-eslint/types@8.61.0)) + version: 0.12.0(svelte@5.56.8(@typescript-eslint/types@8.66.0)) tabbable: specifier: ^6.2.0 - version: 6.4.0 + version: 6.5.0 tailwind-merge: specifier: ^3.5.0 version: 3.6.0 tailwind-variants: specifier: ^3.2.2 - version: 3.2.2(tailwind-merge@3.6.0)(tailwindcss@4.3.1) + version: 3.3.1(tailwind-merge@3.6.0)(tailwindcss@4.3.3) thumbhash: specifier: ^0.1.1 version: 0.1.1 @@ -914,43 +926,43 @@ importers: devDependencies: '@eslint/js': specifier: ^10.0.0 - version: 10.0.1(eslint@10.5.0(jiti@2.7.0)) + version: 10.0.1(eslint@10.8.0(jiti@2.7.0)(supports-color@8.1.1)) '@faker-js/faker': specifier: ^10.0.0 - version: 10.4.0 + version: 10.5.0 '@koddsson/eslint-plugin-tscompat': specifier: ^0.2.0 - version: 0.2.0(eslint@10.5.0(jiti@2.7.0))(typescript@6.0.3) + version: 0.2.0(@typescript/typescript6@6.0.2)(eslint@10.8.0(jiti@2.7.0)(supports-color@8.1.1))(supports-color@8.1.1) '@socket.io/component-emitter': specifier: ^3.1.0 version: 3.1.2 '@sveltejs/adapter-static': specifier: ^3.0.8 - version: 3.0.10(@sveltejs/kit@2.65.1(@opentelemetry/api@1.9.1)(@sveltejs/vite-plugin-svelte@7.1.2(svelte@5.56.3(@typescript-eslint/types@8.61.0))(vite@8.0.16(@types/node@24.13.2)(esbuild@0.28.1)(jiti@2.7.0)(sass@1.101.0)(terser@5.48.0)(tsx@4.22.4)(yaml@2.9.0)))(svelte@5.56.3(@typescript-eslint/types@8.61.0))(typescript@6.0.3)(vite@8.0.16(@types/node@24.13.2)(esbuild@0.28.1)(jiti@2.7.0)(sass@1.101.0)(terser@5.48.0)(tsx@4.22.4)(yaml@2.9.0))) + version: 3.0.10(@sveltejs/kit@2.70.2(@opentelemetry/api@1.9.1)(@sveltejs/vite-plugin-svelte@7.2.0(svelte@5.56.8(@typescript-eslint/types@8.66.0))(vite@8.2.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(sass@1.102.0)(terser@5.49.0)(tsx@4.23.9)(yaml@2.9.0)))(@typescript/typescript6@6.0.2)(svelte@5.56.8(@typescript-eslint/types@8.66.0))(vite@8.2.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(sass@1.102.0)(terser@5.49.0)(tsx@4.23.9)(yaml@2.9.0))) '@sveltejs/enhanced-img': - specifier: ^0.10.4 - version: 0.10.4(@sveltejs/vite-plugin-svelte@7.1.2(svelte@5.56.3(@typescript-eslint/types@8.61.0))(vite@8.0.16(@types/node@24.13.2)(esbuild@0.28.1)(jiti@2.7.0)(sass@1.101.0)(terser@5.48.0)(tsx@4.22.4)(yaml@2.9.0)))(rollup@4.62.0)(svelte@5.56.3(@typescript-eslint/types@8.61.0))(vite@8.0.16(@types/node@24.13.2)(esbuild@0.28.1)(jiti@2.7.0)(sass@1.101.0)(terser@5.48.0)(tsx@4.22.4)(yaml@2.9.0)) + specifier: ^0.11.0 + version: 0.11.0(@sveltejs/vite-plugin-svelte@7.2.0(svelte@5.56.8(@typescript-eslint/types@8.66.0))(vite@8.2.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(sass@1.102.0)(terser@5.49.0)(tsx@4.23.9)(yaml@2.9.0)))(rollup@4.62.0)(svelte@5.56.8(@typescript-eslint/types@8.66.0))(vite@8.2.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(sass@1.102.0)(terser@5.49.0)(tsx@4.23.9)(yaml@2.9.0)) '@sveltejs/kit': specifier: ^2.56.1 - version: 2.65.1(@opentelemetry/api@1.9.1)(@sveltejs/vite-plugin-svelte@7.1.2(svelte@5.56.3(@typescript-eslint/types@8.61.0))(vite@8.0.16(@types/node@24.13.2)(esbuild@0.28.1)(jiti@2.7.0)(sass@1.101.0)(terser@5.48.0)(tsx@4.22.4)(yaml@2.9.0)))(svelte@5.56.3(@typescript-eslint/types@8.61.0))(typescript@6.0.3)(vite@8.0.16(@types/node@24.13.2)(esbuild@0.28.1)(jiti@2.7.0)(sass@1.101.0)(terser@5.48.0)(tsx@4.22.4)(yaml@2.9.0)) + version: 2.70.2(@opentelemetry/api@1.9.1)(@sveltejs/vite-plugin-svelte@7.2.0(svelte@5.56.8(@typescript-eslint/types@8.66.0))(vite@8.2.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(sass@1.102.0)(terser@5.49.0)(tsx@4.23.9)(yaml@2.9.0)))(@typescript/typescript6@6.0.2)(svelte@5.56.8(@typescript-eslint/types@8.66.0))(vite@8.2.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(sass@1.102.0)(terser@5.49.0)(tsx@4.23.9)(yaml@2.9.0)) '@sveltejs/vite-plugin-svelte': - specifier: 7.1.2 - version: 7.1.2(svelte@5.56.3(@typescript-eslint/types@8.61.0))(vite@8.0.16(@types/node@24.13.2)(esbuild@0.28.1)(jiti@2.7.0)(sass@1.101.0)(terser@5.48.0)(tsx@4.22.4)(yaml@2.9.0)) + specifier: 7.2.0 + version: 7.2.0(svelte@5.56.8(@typescript-eslint/types@8.66.0))(vite@8.2.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(sass@1.102.0)(terser@5.49.0)(tsx@4.23.9)(yaml@2.9.0)) '@tailwindcss/vite': specifier: ^4.2.4 - version: 4.3.1(vite@8.0.16(@types/node@24.13.2)(esbuild@0.28.1)(jiti@2.7.0)(sass@1.101.0)(terser@5.48.0)(tsx@4.22.4)(yaml@2.9.0)) + version: 4.3.3(vite@8.2.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(sass@1.102.0)(terser@5.49.0)(tsx@4.23.9)(yaml@2.9.0)) '@testing-library/jest-dom': - specifier: ^6.4.2 - version: 6.9.1 + specifier: ^7.0.0 + version: 7.0.0(@testing-library/dom@10.4.1) '@testing-library/svelte': specifier: ^5.2.8 - version: 5.3.1(svelte@5.56.3(@typescript-eslint/types@8.61.0))(vite@8.0.16(@types/node@24.13.2)(esbuild@0.28.1)(jiti@2.7.0)(sass@1.101.0)(terser@5.48.0)(tsx@4.22.4)(yaml@2.9.0))(vitest@4.1.9) + version: 5.4.2(svelte@5.56.8(@typescript-eslint/types@8.66.0))(vite@8.2.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(sass@1.102.0)(terser@5.49.0)(tsx@4.23.9)(yaml@2.9.0))(vitest@4.1.10) '@testing-library/user-event': specifier: ^14.5.2 - version: 14.6.1(@testing-library/dom@10.4.1) + version: 14.6.3(@testing-library/dom@10.4.1) '@trivago/prettier-plugin-sort-imports': specifier: ^6.0.2 - version: 6.0.2(prettier-plugin-svelte@4.1.0(prettier@3.8.4)(svelte@5.56.3(@typescript-eslint/types@8.61.0)))(prettier@3.8.4)(svelte@5.56.3(@typescript-eslint/types@8.61.0)) + version: 6.0.2(prettier-plugin-svelte@4.1.1(prettier@3.9.6)(svelte@5.56.8(@typescript-eslint/types@8.66.0)))(prettier@3.9.6)(supports-color@8.1.1)(svelte@5.56.8(@typescript-eslint/types@8.66.0)) '@types/chromecast-caf-sender': specifier: ^1.0.11 version: 1.0.11 @@ -965,99 +977,106 @@ importers: version: 4.17.12 '@types/luxon': specifier: ^3.4.2 - version: 3.7.1 + version: 3.7.3 '@types/qrcode': specifier: ^1.5.5 version: 1.5.6 + '@typescript/native': + specifier: npm:typescript@^7.0.2 + version: typescript@7.0.2 '@vitest/coverage-v8': specifier: ^4.0.0 - version: 4.1.9(vitest@4.1.9) + version: 4.1.10(vitest@4.1.10) dotenv: specifier: ^17.0.0 version: 17.4.2 eslint: specifier: ^10.2.1 - version: 10.5.0(jiti@2.7.0) + version: 10.8.0(jiti@2.7.0)(supports-color@8.1.1) eslint-config-prettier: specifier: ^10.1.8 - version: 10.1.8(eslint@10.5.0(jiti@2.7.0)) + version: 10.1.8(eslint@10.8.0(jiti@2.7.0)(supports-color@8.1.1)) eslint-plugin-better-tailwindcss: specifier: ^4.5.0 - version: 4.6.0(eslint@10.5.0(jiti@2.7.0))(tailwindcss@4.3.1)(typescript@6.0.3) + version: 4.7.0(@typescript/typescript6@6.0.2)(eslint@10.8.0(jiti@2.7.0)(supports-color@8.1.1))(tailwindcss@4.3.3) eslint-plugin-compat: specifier: ^7.0.0 - version: 7.0.2(eslint@10.5.0(jiti@2.7.0)) + version: 7.0.2(eslint@10.8.0(jiti@2.7.0)(supports-color@8.1.1)) eslint-plugin-svelte: specifier: ^3.12.4 - version: 3.19.0(eslint@10.5.0(jiti@2.7.0))(svelte@5.56.3(@typescript-eslint/types@8.61.0)) + version: 3.22.0(eslint@10.8.0(jiti@2.7.0)(supports-color@8.1.1))(svelte@5.56.8(@typescript-eslint/types@8.66.0)) eslint-plugin-unicorn: - specifier: ^64.0.0 - version: 64.0.0(eslint@10.5.0(jiti@2.7.0)) + specifier: ^72.0.0 + version: 72.0.0(eslint@10.8.0(jiti@2.7.0)(supports-color@8.1.1)) factory.ts: specifier: ^1.4.1 version: 1.4.2 globals: specifier: ^17.0.0 - version: 17.6.0 + version: 17.9.0 prettier: specifier: ^3.7.4 - version: 3.8.4 + version: 3.9.6 prettier-plugin-sort-json: specifier: ^4.1.1 - version: 4.2.0(prettier@3.8.4) + version: 4.2.0(prettier@3.9.6) prettier-plugin-svelte: specifier: ^4.0.0 - version: 4.1.0(prettier@3.8.4)(svelte@5.56.3(@typescript-eslint/types@8.61.0)) + version: 4.1.1(prettier@3.9.6)(svelte@5.56.8(@typescript-eslint/types@8.66.0)) rollup-plugin-visualizer: specifier: ^7.0.0 - version: 7.0.1(rolldown@1.0.3)(rollup@4.62.0) + version: 7.0.1(rolldown@1.2.3)(rollup@4.62.0) svelte: - specifier: 5.56.3 - version: 5.56.3(@typescript-eslint/types@8.61.0) + specifier: 5.56.8 + version: 5.56.8(@typescript-eslint/types@8.66.0) svelte-check: specifier: ^4.4.6 - version: 4.6.0(picomatch@4.0.4)(svelte@5.56.3(@typescript-eslint/types@8.61.0))(typescript@6.0.3) + version: 4.7.4(@typescript/typescript6@6.0.2)(picomatch@4.0.5)(svelte@5.56.8(@typescript-eslint/types@8.66.0)) svelte-eslint-parser: specifier: ^1.3.3 - version: 1.8.0(svelte@5.56.3(@typescript-eslint/types@8.61.0)) + version: 1.8.0(svelte@5.56.8(@typescript-eslint/types@8.66.0)) tailwindcss: specifier: ^4.2.4 - version: 4.3.1 + version: 4.3.3 typescript: - specifier: ^6.0.0 - version: 6.0.3 + specifier: npm:@typescript/typescript6@^6.0.2 + version: '@typescript/typescript6@6.0.2' typescript-eslint: specifier: ^8.45.0 - version: 8.61.0(eslint@10.5.0(jiti@2.7.0))(typescript@6.0.3) + version: 8.66.0(@typescript/typescript6@6.0.2)(eslint@10.8.0(jiti@2.7.0)(supports-color@8.1.1))(supports-color@8.1.1) vite: specifier: ^8.0.0 - version: 8.0.16(@types/node@24.13.2)(esbuild@0.28.1)(jiti@2.7.0)(sass@1.101.0)(terser@5.48.0)(tsx@4.22.4)(yaml@2.9.0) + version: 8.2.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(sass@1.102.0)(terser@5.49.0)(tsx@4.23.9)(yaml@2.9.0) vitest: specifier: ^4.0.0 - version: 4.1.9(@opentelemetry/api@1.9.1)(@types/node@24.13.2)(@vitest/coverage-v8@4.1.9)(happy-dom@20.10.3)(jsdom@26.1.0(canvas@3.2.3))(vite@8.0.16(@types/node@24.13.2)(esbuild@0.28.1)(jiti@2.7.0)(sass@1.101.0)(terser@5.48.0)(tsx@4.22.4)(yaml@2.9.0)) + version: 4.1.10(@opentelemetry/api@1.9.1)(@types/node@24.13.3)(@vitest/coverage-v8@4.1.10)(happy-dom@20.11.1)(jsdom@26.1.0(canvas@3.2.3)(supports-color@8.1.1))(vite@8.2.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(sass@1.102.0)(terser@5.49.0)(tsx@4.23.9)(yaml@2.9.0)) packages: + '@11ty/gray-matter@1.0.0': + resolution: {integrity: sha512-7mJJl+wf1AByoT0PknQiQfOPnVNT4fevGrUBVWO4HXsnYn1aQPyRyrELYrNUFleUBM++KzMKN6QaxHPk0t/6/g==} + engines: {node: '>=11'} + '@adobe/css-tools@4.5.0': resolution: {integrity: sha512-6OzddxPio9UiWTCemp4N8cYLV2ZN1ncRnV1cVGtve7dhPOtRkleRyx32GQCYSwDYgaHU3USMm84tNsvKzRCa1Q==} - '@algolia/abtesting@1.20.0': - resolution: {integrity: sha512-5CqkS592H3+24b6H6CQ2RVpphdmAuIElZzv0Hngqo/ZEZpUZJ+KGLcueBhx33fv2wYBXyuuvskG5aQ7Ti+lR0g==} + '@algolia/abtesting@1.22.0': + resolution: {integrity: sha512-BFR6zNowNKcY7Ou7TaJc9QWexES4YKPbmf/OTFofpdsdhz4x6q0lbxp3duO0EHnyrN7rE4ba/TSXuY+BDGu4+g==} engines: {node: '>= 14.0.0'} '@algolia/autocomplete-core@1.19.2': resolution: {integrity: sha512-mKv7RyuAzXvwmq+0XRK8HqZXt9iZ5Kkm2huLjgn5JoCPtDy+oh9yxUMfDDaVCw0oyzZ1isdJBc7l9nuCyyR7Nw==} - '@algolia/autocomplete-core@1.19.8': - resolution: {integrity: sha512-3YEorYg44niXcm7gkft3nXYItHd44e8tmh4D33CTszPgP0QWkaLEaFywiNyJBo7UL/mqObA/G9RYuU7R8tN1IA==} + '@algolia/autocomplete-core@1.19.9': + resolution: {integrity: sha512-4U2JKLMWlDu0CotYyUkWakDxr8AIav3QtIUXXRpfavYN29aVWfzlwJp9T0rPKEf/dO2QCPAUc0Kq1Tj1GJxo2A==} '@algolia/autocomplete-plugin-algolia-insights@1.19.2': resolution: {integrity: sha512-TjxbcC/r4vwmnZaPwrHtkXNeqvlpdyR+oR9Wi2XyfORkiGkLTVhX2j+O9SaCCINbKoDfc+c2PB8NjfOnz7+oKg==} peerDependencies: search-insights: '>= 1 < 3' - '@algolia/autocomplete-plugin-algolia-insights@1.19.8': - resolution: {integrity: sha512-ZvJWO8ZZJDpc1LNM2TTBdmQsZBLMR4rU5iNR2OYvEeFBiaf/0ESnRSSLQbryarJY4SVxtoz6A2ZtDMNM+iQEAA==} + '@algolia/autocomplete-plugin-algolia-insights@1.19.9': + resolution: {integrity: sha512-6mExC6X7762s2SV3eJy3QOkB8bdMmnUhQ2agvGVDuzwoGyr3PquGSY/0vPQXCfiAiCaXUz1rXn+lwghgSi0l0w==} peerDependencies: search-insights: '>= 1 < 3' @@ -1067,65 +1086,65 @@ packages: '@algolia/client-search': '>= 4.9.1 < 6' algoliasearch: '>= 4.9.1 < 6' - '@algolia/autocomplete-shared@1.19.8': - resolution: {integrity: sha512-h5hf2t8ejF6vlOgvLaZzQbWs5SyH2z4PAWygNAvvD/2RI29hdQ54ldUGwqVuj9Srs+n8XUKTPUqb7fvhBhQrnQ==} + '@algolia/autocomplete-shared@1.19.9': + resolution: {integrity: sha512-YosP9Uoek6y/Ur1r1qeogk4biMe/hzkyNcgMCciw0//3XpCM7VlYLSHnyt/vOnEOGhCCc0+3v+unEiH6zz+Z1A==} peerDependencies: '@algolia/client-search': '>= 4.9.1 < 6' algoliasearch: '>= 4.9.1 < 6' - '@algolia/client-abtesting@5.54.0': - resolution: {integrity: sha512-IXnH1x3DBsPQA4/FRO0Pvkfy79tKy5Qr+ugAV9jdcGkpzHc476D0WV1MFJ+pZxtbts0xh2JqzUVmYEqA6LkOpA==} + '@algolia/client-abtesting@5.56.0': + resolution: {integrity: sha512-7r4Z3NC7yU1oAQVWJNA2HX7tX481F3pJvCGyLIXiTdBcthz4Q/o21jwcMYDFkuI92UWTNBQQmHYgwHo1zS5dzg==} engines: {node: '>= 14.0.0'} - '@algolia/client-analytics@5.54.0': - resolution: {integrity: sha512-pBpRqm1wpE0GnGy2rNLk9rjDn0Le4iywNRtnAWblLeqfjxpWKg8lWnk7nmSoTShFO31sz2jatXXzxK2lz8ipbA==} + '@algolia/client-analytics@5.56.0': + resolution: {integrity: sha512-avmjXQSq+jadFO8Xl2em05/uQdQnEmHsJyOAdVbZkmVgpMfxL12aJwVVfGNwYr9nulcpuJN1X0lTaQ5wxuNGcA==} engines: {node: '>= 14.0.0'} - '@algolia/client-common@5.54.0': - resolution: {integrity: sha512-WbuwRUlFvSOsuxqTDjSSmgusuF5KFt+oFPzobvPDvodra6EWnVwUXjz0elkNSsnsIlZGtcXlX3LhxkO7rF90jw==} + '@algolia/client-common@5.56.0': + resolution: {integrity: sha512-v2TPStUhY//ripPjIVclZ8AWc7DEGooXULZGFlFu37zNatgHjw34oZZ+OSbbc/YHO+xZwPl62I1k8xH1m4S2eg==} engines: {node: '>= 14.0.0'} - '@algolia/client-insights@5.54.0': - resolution: {integrity: sha512-/HNLVi3kPI+JhO59WbglLjPM2c4uECU+x4gk1iADseKtE5eYqJ/RJ+FIwM8xzPFKhFJaw+8hVq4lkd0nn8HDDg==} + '@algolia/client-insights@5.56.0': + resolution: {integrity: sha512-P0ehROpM4Sem3Sqo5x2cKPgj67D3G3jy0rh1Amwkcvsfr6tkvIcdCmerieanqTF7NxUMPNFLkpIFeMO8Rpa50w==} engines: {node: '>= 14.0.0'} - '@algolia/client-personalization@5.54.0': - resolution: {integrity: sha512-6TolyyDRumIKeLGBGSFAZsSIJ8hrm6NFCGR1jO7pQTiOtSWgAIxcFE5/JRpZ3g+unG4OkNOFy+I0dUEquIDbig==} + '@algolia/client-personalization@5.56.0': + resolution: {integrity: sha512-SXK3Vn3WVxyzbm31oePZBJkp1wpOyuWdd4B/Pv7n0aXDxmeSWhC1R1FC1517mMrFAIaPH4Rt0x6RUe7ZNjz8FA==} engines: {node: '>= 14.0.0'} - '@algolia/client-query-suggestions@5.54.0': - resolution: {integrity: sha512-AxW2MLBhjBtGX5kIZrVLO2SP2vRkZxJw5qHGxnQJfLcYhA04mFNP0fWRtHshlcVnDk9M8L9lwfr2lGpf3Er+hw==} + '@algolia/client-query-suggestions@5.56.0': + resolution: {integrity: sha512-5+ZdX8garFnmycnZgKhtXHePEaLj5zqDxI/0lkhhluzCcvTn0/PvvTirTg8hHYetQHvn7GDyeAiqTAieMvMW4A==} engines: {node: '>= 14.0.0'} - '@algolia/client-search@5.54.0': - resolution: {integrity: sha512-ngdgVGp05lJzUyA+sUzr0MDZ7AMtANcJpwIzq4ZsfpZL5B3S7A4XYfMcU2sECZc3bx3ysOhYcdbbaTjc3ve0WQ==} + '@algolia/client-search@5.56.0': + resolution: {integrity: sha512-+mKUdYvqOi0BcvpAEyCEw49vSBptufIcfibtHz2bdr1pI789M46Yt0uQEk/sxtK3teh71OQvVFHaTDzShUWewQ==} engines: {node: '>= 14.0.0'} '@algolia/events@4.0.1': resolution: {integrity: sha512-FQzvOCgoFXAbf5Y6mYozw2aj5KCJoA3m4heImceldzPSMbdyS4atVjJzXKMsfX3wnZTFYwkkt8/z8UesLHlSBQ==} - '@algolia/ingestion@1.54.0': - resolution: {integrity: sha512-hee59Z7FgZ6/13FYL05ANPwRJY1pfvIlrwC8eBZYdiRFXTJVvf94IyTWOxLqRVpbseDP6eQQTW+PT7/DxTZIng==} + '@algolia/ingestion@1.56.0': + resolution: {integrity: sha512-9g/zj+AZx5moFcdFIrYQoVrueXivjUcc3MQHtCYT8WhIuk1lUh1AyEhvJCS0XBZld09cLvd1AZ3BvDBpVpX2UA==} engines: {node: '>= 14.0.0'} - '@algolia/monitoring@1.54.0': - resolution: {integrity: sha512-diCjZVbIO7Pzw98tEKqLWIAgmQBI3Zt1sHsXyAPNGZgn32derpIXTnjjpJbZl+uAhSSznd6SfxFGdC9uYdN1TA==} + '@algolia/monitoring@1.56.0': + resolution: {integrity: sha512-Qf3Sr6f9A9uxCZUf3MXS0d2b877uYzEB5yxqpVGXAhcJnBCQjrRRon0KvefpGkxy+BshrIJs96OUoMtGqXTFDA==} engines: {node: '>= 14.0.0'} - '@algolia/recommend@5.54.0': - resolution: {integrity: sha512-6zeslypRAGWDgVJEJYAPuqmyquHvnw4MQwG+XXdrw5dTNDjXYIcCJdQQcCY06xPF9tUvmzy/1vHiH9QxhgwuOQ==} + '@algolia/recommend@5.56.0': + resolution: {integrity: sha512-GXWG1rWc5wu8hY4N33Y3b6ernY6sAdAvmKWN/zHAiACOx40WnpG0TVX5YazCAr/9gOYGInSiM2A0y2jy2xbiDA==} engines: {node: '>= 14.0.0'} - '@algolia/requester-browser-xhr@5.54.0': - resolution: {integrity: sha512-iHZax214LPXd7XizQ4BNnTsegl8f3IeKm8JcrmSNZ/5x1rZ5xLkbG/anltAWtLpoRNnfpr4Z80YdYeVVPpx6wQ==} + '@algolia/requester-browser-xhr@5.56.0': + resolution: {integrity: sha512-7t24cBxaInS3mZb7ddEaZT/tp6q+/aR4YttsQVyP1/i+LmwPR34atO35KjaLFCcRVrlP7sYOAqkCfg6lIRB+ew==} engines: {node: '>= 14.0.0'} - '@algolia/requester-fetch@5.54.0': - resolution: {integrity: sha512-YKtuG5YwPxZ+kkfd4HmUO7Z9aICPUSMlHslzKTmtMMhxGnetxEqGj9T/v2r/PdcuOUC5oW0CHe8akJk8cpS3gQ==} + '@algolia/requester-fetch@5.56.0': + resolution: {integrity: sha512-R7ePHgVYmDFjZpvrsVAfbDz/d4RxKAYZ5/vgLfIsCVRZRryjWl/3INOxpOICzitehQ5FjNtNjcLQTrmHPTcHBQ==} engines: {node: '>= 14.0.0'} - '@algolia/requester-node-http@5.54.0': - resolution: {integrity: sha512-zyZDJ4WS5TnjZZ5pqywTBFO9olW7QMtY2kf2dbLnu+UTzfc9ri/HGf27jRN2NTbX9FcRPxSqPqzUhF/BZIx0VA==} + '@algolia/requester-node-http@5.56.0': + resolution: {integrity: sha512-PIOUXlSnrqM0S+WOgDRb4RzotydJH7ZoT6tOyL7tAO7qJOfvX5wsEW8Pe+PMKMwvuI4/gIyK9cg2H7lJXqnc4Q==} engines: {node: '>= 14.0.0'} '@alloc/quick-lru@5.2.0': @@ -1769,26 +1788,26 @@ packages: '@codemirror/autocomplete@6.20.3': resolution: {integrity: sha512-tlosUqb+3BbxCxZdu4tKeRghPFC+QM7q4X5YhKV2eCmPG+1r2F3f4AaSz5sCrFqUtX4Jh20VFTKecl16MgiV9g==} - '@codemirror/commands@6.10.3': - resolution: {integrity: sha512-JFRiqhKu+bvSkDLI+rUhJwSxQxYb759W5GBezE8Uc8mHLqC9aV/9aTC7yJSqCtB3F00pylrLCwnyS91Ap5ej4Q==} + '@codemirror/commands@6.10.4': + resolution: {integrity: sha512-Ryk9y9T0FFVF0cUGhAknveAyUOl/A1qReTFi+qPKtOh2Z9F4AUBz3XOrYD4ZEgZirdugVzHvd/2/Wcwy5OliTg==} '@codemirror/lang-json@6.0.2': resolution: {integrity: sha512-x2OtO+AvwEHrEwR0FyyPtfDUiloG3rnVTSZV1W8UteaLL8/MajQd8DpvUb2YVzC+/T18aSDv0H9mu+xw0EStoQ==} - '@codemirror/language@6.12.3': - resolution: {integrity: sha512-QwCZW6Tt1siP37Jet9Tb02Zs81TQt6qQrZR2H+eGMcFsL1zMrk2/b9CLC7/9ieP1fjIUMgviLWMmgiHoJrj+ZA==} + '@codemirror/language@6.12.4': + resolution: {integrity: sha512-1q4PaT+o6PbgpkJt4Q8Fv5XJxTy4FUZ4MWETtyiDw3J0Pyr9E2vqcKL+k9wcvjNTIsauxvE7OfmWj3FRPHQ76A==} '@codemirror/lint@6.9.7': resolution: {integrity: sha512-28/+iWLYxKxsvGYhSYL7zaCZqLz5+FFFDq9tVsvGv9kv8RY4fFAchJ5WX9M3YrrRlTIsECjsXPqeNgnSmNP2dg==} - '@codemirror/search@6.7.0': - resolution: {integrity: sha512-ZvGm99wc/s2cITtMT15LFdn8aH/aS+V+DqyGq/N5ZlV5vWtH+nILvC2nw0zX7ByNoHHDZ2IxxdW38O0tc5nVHg==} + '@codemirror/search@6.7.1': + resolution: {integrity: sha512-uMe5UO6PamJtSHrXhhHOzSX3ReWtiJrva6GnPMwSOrZtiExb5X5eExhr2OUZQVvdxPsKpY3Ro2mFbQadpPWmHA==} - '@codemirror/state@6.6.0': - resolution: {integrity: sha512-4nbvra5R5EtiCzr9BTHiTLc+MLXK2QGiAVYMyi8PkQd3SR+6ixar/Q/01Fa21TBIDOZXgeWV4WppsQolSreAPQ==} + '@codemirror/state@6.7.1': + resolution: {integrity: sha512-9QzNDgE4EYDnAHfrTlR2lwiPciiOymLtwKK+8yHQzCc7GXhAP9xdEbEJFy2IWB1j9UGUl9BsgMmTo/ImA02T7A==} - '@codemirror/view@6.43.1': - resolution: {integrity: sha512-+BIjw/AG3tDQ4pJgTLPYdAW25eDE66YsvM4LKyVPgGzVgZ4a9Wj1SRX8kPVKgBDdPt8oHtZ15F0qx7p0oOHdHw==} + '@codemirror/view@6.43.7': + resolution: {integrity: sha512-FZsExxkoxnAN+d9TgqXLg5g4A1oQwzX9WlkOT5i2PKkcW7xx3Bmu0vs90g6fo9Mpdsb/l96dnAraQ8932aO4/g==} '@colors/colors@1.5.0': resolution: {integrity: sha512-ooWCrlZP11i8GImSjTHYHLkvFDP48nS4+204nGb1RiX/WXYHmJA2III9/e2DWVabCESdW7hBAEzHRqUn9OUVvQ==} @@ -2132,12 +2151,12 @@ packages: search-insights: optional: true - '@docusaurus/babel@3.10.1': - resolution: {integrity: sha512-DZzFO1K3v/GoEt1fx1DiYHF4en+PuhtQf1AkQJa5zu3CoeKSpr5cpQRUlz3jr0m44wyzmSXu9bVpfir+N4+8bg==} + '@docusaurus/babel@3.10.2': + resolution: {integrity: sha512-aJ1hpGyvfkte3dDAfNbWM4biW4yWZBVz7TIGLZP+v+tWOBgxX3e0N5ZIXHIvmfNNXTI77pcHUx3KmtOk05Ze3Q==} engines: {node: '>=20.0'} - '@docusaurus/bundler@3.10.1': - resolution: {integrity: sha512-HIqQPvbqnnQRe4NsBd1774KRarjXqS6wHsWELtyuSs1gCfvixJO2jUGH/OEBtr1Gvzpw+ze5CjGMvSJ8UE1KUw==} + '@docusaurus/bundler@3.10.2': + resolution: {integrity: sha512-i0ZNcy0f0WhaOlYVgzLsWhIoEXO9kS3HRoKPtgE6vQtZUq7arKZaYdNBudr3mqCmd+TyOkwtwfHgs1ENj07r5g==} engines: {node: '>=20.0'} peerDependencies: '@docusaurus/faster': '*' @@ -2145,8 +2164,8 @@ packages: '@docusaurus/faster': optional: true - '@docusaurus/core@3.10.1': - resolution: {integrity: sha512-3pf2fXXw0eVk8WnC3T4LIigRDupcpvngpKo9Vy7mYyBhuddc0klDUuZAIfzMoK6z05pdlk6EFC/vBSX43+1O5w==} + '@docusaurus/core@3.10.2': + resolution: {integrity: sha512-EYByj6nk+aD9KeVxV6Hmo2/nAAT79P21Y82ycTBOBtrmqilloIbIEhgL2/8Xpt2Jz/pgNqHAwyusOGwmbKeJmA==} engines: {node: '>=20.0'} hasBin: true peerDependencies: @@ -2158,97 +2177,97 @@ packages: '@docusaurus/faster': optional: true - '@docusaurus/cssnano-preset@3.10.1': - resolution: {integrity: sha512-eNfHGcTKCSq6xmcavAkX3RRclHaE2xRCMParlDXLdXVP01/a2e/jKXMj/0ULnLFQSNwwuI62L0Ge8J+nZsR7UQ==} + '@docusaurus/cssnano-preset@3.10.2': + resolution: {integrity: sha512-4gCnHRbJLTloiwfvFAa92tgb2gI4KYhvjfQVYnEaiMO/EgvWfCo1LwytHXen+1oZAN0VAlS0JAPxp3MsvKDa3A==} engines: {node: '>=20.0'} - '@docusaurus/logger@3.10.1': - resolution: {integrity: sha512-oPjNFnfJsRCkePVjkGrxWGq4MvJKRQT0r9jOP0eRBTZ7Wr9FAbzdP/Gjs0I2Ss6YRkPoEgygKG112OkE6skvJw==} + '@docusaurus/logger@3.10.2': + resolution: {integrity: sha512-gSEwqtPfCAnC3ZSJY6xL7tcIfgg0vFD39jbv93eakuweyvO2864xR0K+kmKwBhkTCtWRNjuGGnb5rdmkD/ndqw==} engines: {node: '>=20.0'} - '@docusaurus/mdx-loader@3.10.1': - resolution: {integrity: sha512-GRmeb/wQ+iXRrFwcHBfgQhrJxGElgCsoTWZYDhccjsZVne1p8MK/EpQVIloXttz76TCe78kKD5AEG9n1xc1oxQ==} + '@docusaurus/mdx-loader@3.10.2': + resolution: {integrity: sha512-9Fd4V/SFjfrVQ0JH5EN0+iPWyFunvTeQE3gfyFeetqPaXMP0OylIjOw16dCuXG4NZJrYdBqwzjh18/h3gRi47w==} engines: {node: '>=20.0'} peerDependencies: react: ^18.0.0 || ^19.0.0 react-dom: ^18.0.0 || ^19.0.0 - '@docusaurus/module-type-aliases@3.10.1': - resolution: {integrity: sha512-YoOZKUdGlp8xSYhuAkGdSo5Ydkbq4V4eK3sD8v0a2hloxCWdQbNBhkc+Ko9QyjpESc0BYcIGM5iHVAy5hdFV6w==} + '@docusaurus/module-type-aliases@3.10.2': + resolution: {integrity: sha512-h/I5e4jaAhDHW4vaLENi1i2hnOEnXY1t9R+nnRTbgUl7ymVRzN/HF7dDfj8rKYGj8gfIge+Ef+iYRAMtbGvsrQ==} peerDependencies: react: '*' react-dom: '*' - '@docusaurus/plugin-content-blog@3.10.1': - resolution: {integrity: sha512-mmkgE6Q2+K74tnkou7tXlpDLvoCU/qkSa2GSQ3XUiHWvcebCoDQzS670RR3tO8PmaWlIyWWISYWzZLuMfxunRA==} + '@docusaurus/plugin-content-blog@3.10.2': + resolution: {integrity: sha512-0cbEnNKf0InmLkhj/+nVRmqEnWEoOE8Mh+2x1qOXI0qYpCnphq4RXknVJ8BvybKRXqYVvbmdMfiJSup+k4tm5w==} engines: {node: '>=20.0'} peerDependencies: '@docusaurus/plugin-content-docs': '*' react: ^18.0.0 || ^19.0.0 react-dom: ^18.0.0 || ^19.0.0 - '@docusaurus/plugin-content-docs@3.10.1': - resolution: {integrity: sha512-2jRVrtzjf8LClGTHQlwlwuD3wQXRx3WEoF7XUarJ8Ou+0onV+SLtejsyfY9JLpfUh9hPhXM4pbBGkyAY4Bi3HQ==} + '@docusaurus/plugin-content-docs@3.10.2': + resolution: {integrity: sha512-Sqwl4FPoZBDrlY8I2VU2H8O0M91CHp9T8ToMSkTZmjvHCif+1laqfXi6sTk8IfyVS/trN5yNjcWd1bFsGB6W5Q==} engines: {node: '>=20.0'} peerDependencies: react: ^18.0.0 || ^19.0.0 react-dom: ^18.0.0 || ^19.0.0 - '@docusaurus/plugin-content-pages@3.10.1': - resolution: {integrity: sha512-huJpaRPMl42nsFwuCXvV8bVDj2MazuwRJIUylI/RSlmZeJssVoZXeCjVf1y+1Drtpa9SKcdGn8yoJ76IRJijtw==} + '@docusaurus/plugin-content-pages@3.10.2': + resolution: {integrity: sha512-h5R12sZ/vV9EPiVjvIl9YFCOwkpwXes7dQMYt3EvP6Pphu4amHxxTqWxf08Fl5DR8h+oZMbWpFTNw5vKEYfvzQ==} engines: {node: '>=20.0'} peerDependencies: react: ^18.0.0 || ^19.0.0 react-dom: ^18.0.0 || ^19.0.0 - '@docusaurus/plugin-css-cascade-layers@3.10.1': - resolution: {integrity: sha512-r//fn+MNHkE1wCof8T29VAQezt1enGCpsFxoziBbvLgBM4JfXN2P3rxrBaavHmvLvm7lYkpJeitcDthwnmWCTw==} + '@docusaurus/plugin-css-cascade-layers@3.10.2': + resolution: {integrity: sha512-UkdvQby5OQUKWrw3lLnSTJXQ6VETaUVTuPQX9AABtmFm5h+ifEBx1OQ+LN726Q4byuwBf2ElHkf4qU4hTxdvRg==} engines: {node: '>=20.0'} - '@docusaurus/plugin-debug@3.10.1': - resolution: {integrity: sha512-9KqOpKNfAyqGZykRb9LhIT/vyRF6sm/ykhjj/39JvaJahDS+jZJE0Z1Wfz9q3DUNDTMNN0Q7u/kk4rKKU+IJuA==} + '@docusaurus/plugin-debug@3.10.2': + resolution: {integrity: sha512-8vbZNOSCpnsT57EY6CgN7sgRVmx3KTYwO8Uvo2pbxOyb8tbqAwtT9SslqaQ41HbA1v1hpn5RP7u5s2KvRwAFpQ==} engines: {node: '>=20.0'} peerDependencies: react: ^18.0.0 || ^19.0.0 react-dom: ^18.0.0 || ^19.0.0 - '@docusaurus/plugin-google-analytics@3.10.1': - resolution: {integrity: sha512-8o0P1KtmgdYQHH+oInitPpRWI0Of5XednAX4+DMhQNSmGSRNrsEEHg1ebv35m9AgRClfAytCJ5jA9KvcASTyuA==} + '@docusaurus/plugin-google-analytics@3.10.2': + resolution: {integrity: sha512-kMHMBK9j4VAtgd5owwrRLRIi0EjkrpXlX7ePj1+y68XfVZV9I1T4S+koPDm+Hfw2TtnyHvh0uNrDvjz+DjQGVA==} engines: {node: '>=20.0'} peerDependencies: react: ^18.0.0 || ^19.0.0 react-dom: ^18.0.0 || ^19.0.0 - '@docusaurus/plugin-google-gtag@3.10.1': - resolution: {integrity: sha512-pu3xIUo5o/zCMLfUY9BO5KOwSH0zIsAGyFRPvXHayFSA5XIhCU/SFuB0g0ZNjFn9niZLCaNvoeAuOGFJZq0fdw==} + '@docusaurus/plugin-google-gtag@3.10.2': + resolution: {integrity: sha512-Vt90nNFhtAChRe9+it1hcHFgFvETdSnOkL5Bma+p6E/yU2tAYrvvyk+gv+LJGM2ZUkyKuKXLRsZ2Lb0bO7+Vog==} engines: {node: '>=20.0'} peerDependencies: react: ^18.0.0 || ^19.0.0 react-dom: ^18.0.0 || ^19.0.0 - '@docusaurus/plugin-google-tag-manager@3.10.1': - resolution: {integrity: sha512-f6fyGHiCm7kJHBtAisGQS5oNBnpnMTYQZxDXeVrnw/3zWU+LMA22pr6UHGYkBKDbN+qPC5QHG3NuOfzQLq3+Lw==} + '@docusaurus/plugin-google-tag-manager@3.10.2': + resolution: {integrity: sha512-MLCffCldysi/R0nzJQP7ZWd0xAoGNnSTiVOo6TTR6mKVGFhE+/XArGe67ZcaZv1uytgQXoXs92VJrgVDrz80rQ==} engines: {node: '>=20.0'} peerDependencies: react: ^18.0.0 || ^19.0.0 react-dom: ^18.0.0 || ^19.0.0 - '@docusaurus/plugin-sitemap@3.10.1': - resolution: {integrity: sha512-C26MbmmqgdjkDq1htaZ3aD7LzEDKFWXfpyQpt0EOUThuq5nV77zDaedV20yHcVo9p+3ey9aZ4pbHA0D3QcZTzg==} + '@docusaurus/plugin-sitemap@3.10.2': + resolution: {integrity: sha512-PODkwg5XetLML3hU/3xpCKJUZ9cqExLaBnD/Fzzwj2VHogLeqnDisLIujae87zuze7T4mCm2A6KEqZkyiz07EQ==} engines: {node: '>=20.0'} peerDependencies: react: ^18.0.0 || ^19.0.0 react-dom: ^18.0.0 || ^19.0.0 - '@docusaurus/plugin-svgr@3.10.1': - resolution: {integrity: sha512-6SFxsmjWFkVLDmBUvFK6i72QjUwqyQFe4Ovz+SUJophJjOyVG3ZZG5IQpBC/kX/Gfv1yWeU9nWauH6F6Q7QX/Q==} + '@docusaurus/plugin-svgr@3.10.2': + resolution: {integrity: sha512-JgfT3jWM0TJ8Uw0cEcqxHpybngQY1vlBYpuuNO+gEh5iPh5Ar+vxq/u9CFrYsWeXy48BN7Db76Pzp2edNXUQ8A==} engines: {node: '>=20.0'} peerDependencies: react: ^18.0.0 || ^19.0.0 react-dom: ^18.0.0 || ^19.0.0 - '@docusaurus/preset-classic@3.10.1': - resolution: {integrity: sha512-YO/FL8v1zmbxoTso6mjMz/RDjhaTJxb1UpFFTDdY5847LLDCeyYiYlrhyTbgN1RIN3xnkLKZ9Lj1x8hUzI4JOg==} + '@docusaurus/preset-classic@3.10.2': + resolution: {integrity: sha512-a4B3VczmDl99zK0EufDQYomdJ186WDingjmDXxhN2PNPS9Ty/Y2M5CLFX1KQMRKqRTLiRDKfutzG5IY1FC/ceg==} engines: {node: '>=20.0'} peerDependencies: react: ^18.0.0 || ^19.0.0 @@ -2259,23 +2278,23 @@ packages: peerDependencies: react: '*' - '@docusaurus/theme-classic@3.10.1': - resolution: {integrity: sha512-VU1RK0qb2pab0si4r7HFK37cYco8VzqLj3u1PspVipSr/z/GPVKHO4/HXbnePqHoWDk8urjyGSeatH0NIMBM1A==} + '@docusaurus/theme-classic@3.10.2': + resolution: {integrity: sha512-JqTSLQmqmA9uKWZsD5iwBGJ4JyKB4/yTw6PsSXVPRJG/6GAm/u+add9Iip+hvwP12/AnPNztrdxsI14NJW4KeA==} engines: {node: '>=20.0'} peerDependencies: react: ^18.0.0 || ^19.0.0 react-dom: ^18.0.0 || ^19.0.0 - '@docusaurus/theme-common@3.10.1': - resolution: {integrity: sha512-0YtmIeoNo1fIw65LO8+/1dPgmDV86UmhMkow37gzjytuiCSQm9xob6PJy0L4kuQEMTLfUOGvkXvZr7GPrHquMA==} + '@docusaurus/theme-common@3.10.2': + resolution: {integrity: sha512-R9b/vMpK1yye6hNZTA6x/ivRv+at6GhxnXcxkpzCGzO1R1RwiquqiFg2wMFh6aqlJTpWRFKpFD2TzCDQcyOU0A==} engines: {node: '>=20.0'} peerDependencies: '@docusaurus/plugin-content-docs': '*' react: ^18.0.0 || ^19.0.0 react-dom: ^18.0.0 || ^19.0.0 - '@docusaurus/theme-mermaid@3.10.1': - resolution: {integrity: sha512-2gxpmln8Pc4EN1oWzshQEx2HTs67jk14v7MmgqGs8ZU7Nm8oihg+fTouof2u4vN8DtB3Fln4cDJu4UprSX1S3Q==} + '@docusaurus/theme-mermaid@3.10.2': + resolution: {integrity: sha512-Stssh5MYQJ+EdYugUXf+ZcpeJFQPKXf0KCd/SWp10o3CmXNaOoh5IEgVjVqY1e1XhQf3on4+Y4BnrMiD95E2SQ==} engines: {node: '>=20.0'} peerDependencies: '@mermaid-js/layout-elk': ^0.1.9 @@ -2285,50 +2304,41 @@ packages: '@mermaid-js/layout-elk': optional: true - '@docusaurus/theme-search-algolia@3.10.1': - resolution: {integrity: sha512-OTaARARVZj2GvkJQjB+1jOIxntRaXea+G+fMsNqrZBAU1O1vJKDW22R7kECOHW27oJCLFN9HKaZeRrfAUyviug==} + '@docusaurus/theme-search-algolia@3.10.2': + resolution: {integrity: sha512-1msxllyhi/5m77JukXtp5UFnUAriwZIC1oJ7MTnpQpCwLTbclJi5BK5n28CTZuSXpQN2ewbbnqRgAhMM6c6ihg==} engines: {node: '>=20.0'} peerDependencies: react: ^18.0.0 || ^19.0.0 react-dom: ^18.0.0 || ^19.0.0 - '@docusaurus/theme-translations@3.10.1': - resolution: {integrity: sha512-cLMyaKivjBVWKMJuWqyFVVgtqe8DPJNPkog0bn8W1MDVAKcPdxRFycBfC1We1RaNp7Rdk513bmtW78RR6OBxBw==} + '@docusaurus/theme-translations@3.10.2': + resolution: {integrity: sha512-iv20wrxnyXkY89LM3TzRlzGlt5fIGO5UnaR6UL1ZVfB9RRFjxQFQ6awDrwAc6Km8Y5gD8pInuwYPF+6/TiCxXA==} engines: {node: '>=20.0'} - '@docusaurus/tsconfig@3.10.1': - resolution: {integrity: sha512-rYvB7yqkdqWIpAbDzQljGfM4cDBkLTbhmagZBEcsyj6oPUsz47lmW2pYdN1j+7sGFgltbAmQH62xfbrij4Eh6Q==} + '@docusaurus/tsconfig@3.10.2': + resolution: {integrity: sha512-5GiB7h/nFsMFPO9mCqcRNE1yA5TSXXNCshNIgHPL6fCPOjcTDixs6qjQBu8ddkgPcicwCvOA7n3jeK2rGdJk6g==} - '@docusaurus/types@3.10.1': - resolution: {integrity: sha512-XYMK8k1szDCFMw2V+Xyen0g7Kee1sP3dtFnl7vkGkZOkeAJ/oPDQPL8iz4HBKOo/cwU8QeV6onVjMqtP+tFzsw==} + '@docusaurus/types@3.10.2': + resolution: {integrity: sha512-B6rvfwIFSapUqUJjMriZswX13K8l5Z7AcmVE6uTEJpYddQieSTR12DsGaFtcZAIDsQd4p+0WTl0Vc6jmZK0Trw==} peerDependencies: react: ^18.0.0 || ^19.0.0 react-dom: ^18.0.0 || ^19.0.0 - '@docusaurus/utils-common@3.10.1': - resolution: {integrity: sha512-5mFSgEADtnFxFH7RLw02QA5MpU5JVUCj0MPeIvi/aF4Fi45tQRIuTwXoXDqJ+1VfQJuYJGz3SI63wmGz4HvXzA==} + '@docusaurus/utils-common@3.10.2': + resolution: {integrity: sha512-x3Dz6jv6iQKBNjBmVTu8p57abMp/VNTUgKBMgRVXJc5444orBTsArv0+cdfrXTiz/VMmHfDRVkPbL7GH2B7T7w==} engines: {node: '>=20.0'} - '@docusaurus/utils-validation@3.10.1': - resolution: {integrity: sha512-cRv1X69jwaWv47waglllgZVWzeBFLhl53XT/XED/83BerVBTC5FTP8WTcVl8Z6sZOegDSwitu/wpCSPCDOT6lg==} + '@docusaurus/utils-validation@3.10.2': + resolution: {integrity: sha512-sn8unbDfUL585NtR3cwHefPicOyaHvPaX7VD0aOg/siIxUBoKyKKaGEqzJZDS64mM43TnxurkYDtmB1wsJlZsw==} engines: {node: '>=20.0'} - '@docusaurus/utils@3.10.1': - resolution: {integrity: sha512-3ojeJry9xBYdJO6qoyyzqeJFSJBVx2mXhyDzSdjwL2+URFQMf+h25gG38iswGImicK0ELjTd1EL2xzk8hf3QPw==} + '@docusaurus/utils@3.10.2': + resolution: {integrity: sha512-xx0W3eav2uW1NRIpuHJWNwLTC15xPNjU4Uxi9NSnd3swYC96BE3vFiT93SD8s24kmAAWNwgZwfZ2fghGZ01Lcw==} engines: {node: '>=20.0'} - '@emnapi/core@1.10.0': - resolution: {integrity: sha512-yq6OkJ4p82CAfPl0u9mQebQHKPJkY7WrIuk205cTYnYe+k2Z8YBh11FrbRG/H6ihirqcacOgl2BIO8oyMQLeXw==} - - '@emnapi/runtime@1.10.0': - resolution: {integrity: sha512-ewvYlk86xUoGI0zQRNq/mC+16R1QeDlKQy21Ki3oSYXNgLb45GV1P6A0M+/s6nyCuNDqe5VpaY84BzXGwVbwFA==} - '@emnapi/runtime@1.11.1': resolution: {integrity: sha512-vgj7R3y3Wgx24IQaGPA/R6YFXLHVMOZ0uVEyIQPaWs+rd1AzfEMXlAC22FYwO1XkKR6NPsq7mUandH8oIRdZFw==} - '@emnapi/wasi-threads@1.2.1': - resolution: {integrity: sha512-uTII7OYF+/Mes/MrcIOYp5yOtSMLBWSIoLPpcgwipoiKbli6k322tcoFsxoIIxPDqW01SQGAgko4EzZi2BNv2w==} - '@esbuild/aix-ppc64@0.19.12': resolution: {integrity: sha512-bmoCYyWdEL3wDQIVbcyzRyeKLgk2WtWLTWz1ZIAZF/EGbNOwSA6ew3PftJ1PqMiOOGu0OyFMzG53L0zqIpPeNA==} engines: {node: '>=12'} @@ -2341,14 +2351,8 @@ packages: cpu: [ppc64] os: [aix] - '@esbuild/aix-ppc64@0.27.7': - resolution: {integrity: sha512-EKX3Qwmhz1eMdEJokhALr0YiD0lhQNwDqkPYyPhiSwKrh7/4KRjQc04sZ8db+5DVVnZ1LmbNDI1uAMPEUBnQPg==} - engines: {node: '>=18'} - cpu: [ppc64] - os: [aix] - - '@esbuild/aix-ppc64@0.28.1': - resolution: {integrity: sha512-Svl7tq8k/08+p6CXPpRjQ1fKX+1odH/BQbb48fV6fj3CWHhsoIOoY87w1oHXm0qEpkIK3ZfVgp0hed3XBXzXMQ==} + '@esbuild/aix-ppc64@0.28.2': + resolution: {integrity: sha512-XExcO+dvLKvVtNTibSTBej1NCAbaGhWn9Ww1ZPx80qsahhPFe/8jgWP0IchNe0F3HwkU7n8ejhH8bjonqht8mQ==} engines: {node: '>=18'} cpu: [ppc64] os: [aix] @@ -2365,14 +2369,8 @@ packages: cpu: [arm64] os: [android] - '@esbuild/android-arm64@0.27.7': - resolution: {integrity: sha512-62dPZHpIXzvChfvfLJow3q5dDtiNMkwiRzPylSCfriLvZeq0a1bWChrGx/BbUbPwOrsWKMn8idSllklzBy+dgQ==} - engines: {node: '>=18'} - cpu: [arm64] - os: [android] - - '@esbuild/android-arm64@0.28.1': - resolution: {integrity: sha512-34EGEbCIAgosYz6goLcopX6Mo7NyGv9tfwEM2/7Ce2VcVRk568iSvniGWcUXIy7wEDR1wzolcxcriFVrWYcwBg==} + '@esbuild/android-arm64@0.28.2': + resolution: {integrity: sha512-5YfKeeI8qWfBZIX+u2xZC3Zlb3Os/gLS2sbEKM+I4ZOcsWmHS2WLysCcQZDAFRslDUU5Oiq44gf6PYN1vGwG5A==} engines: {node: '>=18'} cpu: [arm64] os: [android] @@ -2389,14 +2387,8 @@ packages: cpu: [arm] os: [android] - '@esbuild/android-arm@0.27.7': - resolution: {integrity: sha512-jbPXvB4Yj2yBV7HUfE2KHe4GJX51QplCN1pGbYjvsyCZbQmies29EoJbkEc+vYuU5o45AfQn37vZlyXy4YJ8RQ==} - engines: {node: '>=18'} - cpu: [arm] - os: [android] - - '@esbuild/android-arm@0.28.1': - resolution: {integrity: sha512-0k2F129Xdio1TdJfzJ8sy1Q47vUD2NnwdhiAf7drUN1EBTfPf4hsFCtmMgu/6m8JSzsBrlmVjudMBQqOfG8usQ==} + '@esbuild/android-arm@0.28.2': + resolution: {integrity: sha512-kXXoiPVVGQcnIYGOeaovwOURpniDBpSq4A03qkQ+BMQqtGG6HYap3xne9C1O1yo4TR3qxlCX5IqqmX6fFo2Lqg==} engines: {node: '>=18'} cpu: [arm] os: [android] @@ -2413,14 +2405,8 @@ packages: cpu: [x64] os: [android] - '@esbuild/android-x64@0.27.7': - resolution: {integrity: sha512-x5VpMODneVDb70PYV2VQOmIUUiBtY3D3mPBG8NxVk5CogneYhkR7MmM3yR/uMdITLrC1ml/NV1rj4bMJuy9MCg==} - engines: {node: '>=18'} - cpu: [x64] - os: [android] - - '@esbuild/android-x64@0.28.1': - resolution: {integrity: sha512-dbwY7ltSMDWsRatcRpCnES4F+im88OCUgGZjy52shC7GqHRE/cYlxNbB4Z4UpJswpcc4Qxd2oE/ufM0p61IKng==} + '@esbuild/android-x64@0.28.2': + resolution: {integrity: sha512-O387ite7SzUyCcy3JQX4P4bLtEA7bLLkx+esve5JHnyYfNTxcVpXZo9jhdB0lTKN44gztELTdU7nS8Nr16Fs1Q==} engines: {node: '>=18'} cpu: [x64] os: [android] @@ -2437,14 +2423,8 @@ packages: cpu: [arm64] os: [darwin] - '@esbuild/darwin-arm64@0.27.7': - resolution: {integrity: sha512-5lckdqeuBPlKUwvoCXIgI2D9/ABmPq3Rdp7IfL70393YgaASt7tbju3Ac+ePVi3KDH6N2RqePfHnXkaDtY9fkw==} - engines: {node: '>=18'} - cpu: [arm64] - os: [darwin] - - '@esbuild/darwin-arm64@0.28.1': - resolution: {integrity: sha512-TZbWkQY7kvTAXbXUT7uVACR5cMHsDiSz9z7ZKAX/RTq/WJEk3QyRr0wZpNhBDX+/0CtdqUIJlOiodQcta6tY3Q==} + '@esbuild/darwin-arm64@0.28.2': + resolution: {integrity: sha512-n4KqkOQrraxHJcgjM1RvwbigfQKIKJVpM7xp+KsxiyUSrRdIXnt73VhrPAx0fV44hgfmIVKjxMN9J1t5jySVkw==} engines: {node: '>=18'} cpu: [arm64] os: [darwin] @@ -2461,14 +2441,8 @@ packages: cpu: [x64] os: [darwin] - '@esbuild/darwin-x64@0.27.7': - resolution: {integrity: sha512-rYnXrKcXuT7Z+WL5K980jVFdvVKhCHhUwid+dDYQpH+qu+TefcomiMAJpIiC2EM3Rjtq0sO3StMV/+3w3MyyqQ==} - engines: {node: '>=18'} - cpu: [x64] - os: [darwin] - - '@esbuild/darwin-x64@0.28.1': - resolution: {integrity: sha512-zfdzgK9ACBNZLI/CyHTOx81SyNbM6YXn7rxSgX97VjyiPl9W1i4Ka4fgKECEoFCKGpvBj5qArWIGgQjOwkgskQ==} + '@esbuild/darwin-x64@0.28.2': + resolution: {integrity: sha512-uq6suIWYP37qzGddBKPw5QEQPi6HiLGsO7UmkpfyaYNQ3D+rN6w6WfwH+nuqcGXWvawGwxOEroO4YGnFh95azw==} engines: {node: '>=18'} cpu: [x64] os: [darwin] @@ -2485,14 +2459,8 @@ packages: cpu: [arm64] os: [freebsd] - '@esbuild/freebsd-arm64@0.27.7': - resolution: {integrity: sha512-B48PqeCsEgOtzME2GbNM2roU29AMTuOIN91dsMO30t+Ydis3z/3Ngoj5hhnsOSSwNzS+6JppqWsuhTp6E82l2w==} - engines: {node: '>=18'} - cpu: [arm64] - os: [freebsd] - - '@esbuild/freebsd-arm64@0.28.1': - resolution: {integrity: sha512-wG2EA8ENdEI0qhkSZMjfqrdY+ziCYCPMmtZjjIwOmXFjmyzEHn+UUxk5of+SYsjtfs3VpnlC7QLzSI5hY/rOAw==} + '@esbuild/freebsd-arm64@0.28.2': + resolution: {integrity: sha512-n+I0BTSRIoy+d6RPKnEVwql5UwBJolytvY4mAOIEJorKlqgPII8ix6slVVrfZ5Tnj7glIZvloylbB/EJPMWEXw==} engines: {node: '>=18'} cpu: [arm64] os: [freebsd] @@ -2509,14 +2477,8 @@ packages: cpu: [x64] os: [freebsd] - '@esbuild/freebsd-x64@0.27.7': - resolution: {integrity: sha512-jOBDK5XEjA4m5IJK3bpAQF9/Lelu/Z9ZcdhTRLf4cajlB+8VEhFFRjWgfy3M1O4rO2GQ/b2dLwCUGpiF/eATNQ==} - engines: {node: '>=18'} - cpu: [x64] - os: [freebsd] - - '@esbuild/freebsd-x64@0.28.1': - resolution: {integrity: sha512-i7dZ9vQgnvSCzi/rYCXNgtF/U+eKZNJBzu3eTQbRgHnM7tNSizLOkRFAl3qzVc/Op/u5YkHHa4pf/3DOYHthLQ==} + '@esbuild/freebsd-x64@0.28.2': + resolution: {integrity: sha512-78XJTJkvPs0kz2w61301PJjXl4g7q3JqiYMZ/M/yVI73EHBrCRTgkhu9oqG7vPqq+a/yadEW8aD+agKlk5xrmg==} engines: {node: '>=18'} cpu: [x64] os: [freebsd] @@ -2533,14 +2495,8 @@ packages: cpu: [arm64] os: [linux] - '@esbuild/linux-arm64@0.27.7': - resolution: {integrity: sha512-RZPHBoxXuNnPQO9rvjh5jdkRmVizktkT7TCDkDmQ0W2SwHInKCAV95GRuvdSvA7w4VMwfCjUiPwDi0ZO6Nfe9A==} - engines: {node: '>=18'} - cpu: [arm64] - os: [linux] - - '@esbuild/linux-arm64@0.28.1': - resolution: {integrity: sha512-yHs+0uc8+nvEAfAfxrWQKK5peSNzBc4PegcMO0EJ2hT71uA7vB8Ihg2e77R2P7SG5uYjPbHlLLmve4LLLRCf0g==} + '@esbuild/linux-arm64@0.28.2': + resolution: {integrity: sha512-pW4AC0P3it8c7do9MVM4p51FzHzdM/TZrerurgRcHJ2WTa1VQ1CIq18xncfpBJw4ojkiZZrKW2yIBWBP92j6Ug==} engines: {node: '>=18'} cpu: [arm64] os: [linux] @@ -2557,14 +2513,8 @@ packages: cpu: [arm] os: [linux] - '@esbuild/linux-arm@0.27.7': - resolution: {integrity: sha512-RkT/YXYBTSULo3+af8Ib0ykH8u2MBh57o7q/DAs3lTJlyVQkgQvlrPTnjIzzRPQyavxtPtfg0EopvDyIt0j1rA==} - engines: {node: '>=18'} - cpu: [arm] - os: [linux] - - '@esbuild/linux-arm@0.28.1': - resolution: {integrity: sha512-qVXBOHQS+d5Y722GwJzJUtOLlX7km3CraOaGormF1pDtPd2C/l1SHRPgjLunLGe51Sh5YYWKMFDyV4SxgMQYTQ==} + '@esbuild/linux-arm@0.28.2': + resolution: {integrity: sha512-XlDnu2q5yoqems+xay6wSAcg9DDD7K9RLKZEBOMZm3ckNpJBvOX20tSfby8KfrrhINDyv9V2YVZKY/SpoGJI8w==} engines: {node: '>=18'} cpu: [arm] os: [linux] @@ -2581,14 +2531,8 @@ packages: cpu: [ia32] os: [linux] - '@esbuild/linux-ia32@0.27.7': - resolution: {integrity: sha512-GA48aKNkyQDbd3KtkplYWT102C5sn/EZTY4XROkxONgruHPU72l+gW+FfF8tf2cFjeHaRbWpOYa/uRBz/Xq1Pg==} - engines: {node: '>=18'} - cpu: [ia32] - os: [linux] - - '@esbuild/linux-ia32@0.28.1': - resolution: {integrity: sha512-d1z4ZuP0ajrfz/FhGT4vv278rX8KnPPJx8i5+AtK7TYbx9Le9F1hyzurZpkEyjkGa9dUGhQow4C1NmeGvqxN2w==} + '@esbuild/linux-ia32@0.28.2': + resolution: {integrity: sha512-CYbnj78HsIeA+DhgUKgFCfvNsTHFhMMrinUrMZpDXJXKN8T3XViTZ/+wtHeVxEWY8ewSzTFN+nRmSwO2tZaLUQ==} engines: {node: '>=18'} cpu: [ia32] os: [linux] @@ -2605,14 +2549,8 @@ packages: cpu: [loong64] os: [linux] - '@esbuild/linux-loong64@0.27.7': - resolution: {integrity: sha512-a4POruNM2oWsD4WKvBSEKGIiWQF8fZOAsycHOt6JBpZ+JN2n2JH9WAv56SOyu9X5IqAjqSIPTaJkqN8F7XOQ5Q==} - engines: {node: '>=18'} - cpu: [loong64] - os: [linux] - - '@esbuild/linux-loong64@0.28.1': - resolution: {integrity: sha512-M5sRjUVZrkm1OAPR3dlOYzNmN+loZKGVi1VUQGrwuqLcbR6qeAz+famMhjASeH3YVKvZz+zT1jlh/keC3Rj/lg==} + '@esbuild/linux-loong64@0.28.2': + resolution: {integrity: sha512-buwkd8nsph4R+ajRvw0qM5Hja/TXQow3ptzWO2EbG/cqcIkHloRrdlBtQlshyYGTNFvfkfJ5tpPLVkY4DtsPfQ==} engines: {node: '>=18'} cpu: [loong64] os: [linux] @@ -2629,14 +2567,8 @@ packages: cpu: [mips64el] os: [linux] - '@esbuild/linux-mips64el@0.27.7': - resolution: {integrity: sha512-KabT5I6StirGfIz0FMgl1I+R1H73Gp0ofL9A3nG3i/cYFJzKHhouBV5VWK1CSgKvVaG4q1RNpCTR2LuTVB3fIw==} - engines: {node: '>=18'} - cpu: [mips64el] - os: [linux] - - '@esbuild/linux-mips64el@0.28.1': - resolution: {integrity: sha512-mRObBZeHh2OxcBFPWE/FjylkRgZdYuiTR3vaTozquCGOH14iP9oN4x4Ge81CoIDYQrXmIxpFumJBu5MtZpnQJQ==} + '@esbuild/linux-mips64el@0.28.2': + resolution: {integrity: sha512-ZVykbDyk7519VwiNb9Lcj9m8XM6v5V9uKPvrEMkkEedVewf+0itkhahp4HDpgERXhwLRpWFypsGbG/J8s0QjJA==} engines: {node: '>=18'} cpu: [mips64el] os: [linux] @@ -2653,14 +2585,8 @@ packages: cpu: [ppc64] os: [linux] - '@esbuild/linux-ppc64@0.27.7': - resolution: {integrity: sha512-gRsL4x6wsGHGRqhtI+ifpN/vpOFTQtnbsupUF5R5YTAg+y/lKelYR1hXbnBdzDjGbMYjVJLJTd2OFmMewAgwlQ==} - engines: {node: '>=18'} - cpu: [ppc64] - os: [linux] - - '@esbuild/linux-ppc64@0.28.1': - resolution: {integrity: sha512-slScBsMAb3GFDcdrCgLwZtPYRoH2H/youv10QiZyRjmsP48fznoveWytSgCI/R0ZcUgpc0ZhIUEx6LHts8yrfQ==} + '@esbuild/linux-ppc64@0.28.2': + resolution: {integrity: sha512-CAXl+Dtd9UUuJd8pKKdwh6MLm3MUMiqMPmhZ3tTSXPqfyQ3vDl6R5hZdZ/kYojK4ofXtdfSv1tFq8XzWx3heNQ==} engines: {node: '>=18'} cpu: [ppc64] os: [linux] @@ -2677,14 +2603,8 @@ packages: cpu: [riscv64] os: [linux] - '@esbuild/linux-riscv64@0.27.7': - resolution: {integrity: sha512-hL25LbxO1QOngGzu2U5xeXtxXcW+/GvMN3ejANqXkxZ/opySAZMrc+9LY/WyjAan41unrR3YrmtTsUpwT66InQ==} - engines: {node: '>=18'} - cpu: [riscv64] - os: [linux] - - '@esbuild/linux-riscv64@0.28.1': - resolution: {integrity: sha512-kw0owk1o0GFETUJyW0jc0G4Yzs0BHZn0JDZ8JRT088vjJYX777BAs1fDGxAC+q831qOs2DTC96mNsG2opdfyyQ==} + '@esbuild/linux-riscv64@0.28.2': + resolution: {integrity: sha512-GeXCej4IQtU1B+QlDV8W/RRvbzI3O/Stss+/bCXv4lZls5WGRtu2a+3JkA3i4qIUlMXpcHebWpF8AkJhATowuA==} engines: {node: '>=18'} cpu: [riscv64] os: [linux] @@ -2701,14 +2621,8 @@ packages: cpu: [s390x] os: [linux] - '@esbuild/linux-s390x@0.27.7': - resolution: {integrity: sha512-2k8go8Ycu1Kb46vEelhu1vqEP+UeRVj2zY1pSuPdgvbd5ykAw82Lrro28vXUrRmzEsUV0NzCf54yARIK8r0fdw==} - engines: {node: '>=18'} - cpu: [s390x] - os: [linux] - - '@esbuild/linux-s390x@0.28.1': - resolution: {integrity: sha512-/lAIjX8aYFRByhh6L5rYtPEDRqa9de/4V/juOXcta5frjvzXO4/sqEtyytse0g3zZFuWu5cDN0MkLz2qRDD2Ag==} + '@esbuild/linux-s390x@0.28.2': + resolution: {integrity: sha512-3H1weTYZPxt/WOhByszQZybS9w5lKzUn1FDMsgEChbHWQwHYQQRfBxgCcZvPhjHfKyJjIievvMmEUawJrdY9Dg==} engines: {node: '>=18'} cpu: [s390x] os: [linux] @@ -2725,14 +2639,8 @@ packages: cpu: [x64] os: [linux] - '@esbuild/linux-x64@0.27.7': - resolution: {integrity: sha512-hzznmADPt+OmsYzw1EE33ccA+HPdIqiCRq7cQeL1Jlq2gb1+OyWBkMCrYGBJ+sxVzve2ZJEVeePbLM2iEIZSxA==} - engines: {node: '>=18'} - cpu: [x64] - os: [linux] - - '@esbuild/linux-x64@0.28.1': - resolution: {integrity: sha512-u/anNYF2mmVOEDwLtnQ1wOr3EZ9sTNGLWrsYGYwHWzGA3Si84IOkHXlbWTD1NB+9/1lcnweYKO54uhxZydNzfA==} + '@esbuild/linux-x64@0.28.2': + resolution: {integrity: sha512-4xTZr1FUmSoQW4XIWmit3tzQrUTZM+N3P0XV8xROKYF50XfI7xeO90+1bZvNwxIufQ9hDQVRJH5YhgPVF8A/HQ==} engines: {node: '>=18'} cpu: [x64] os: [linux] @@ -2743,14 +2651,8 @@ packages: cpu: [arm64] os: [netbsd] - '@esbuild/netbsd-arm64@0.27.7': - resolution: {integrity: sha512-b6pqtrQdigZBwZxAn1UpazEisvwaIDvdbMbmrly7cDTMFnw/+3lVxxCTGOrkPVnsYIosJJXAsILG9XcQS+Yu6w==} - engines: {node: '>=18'} - cpu: [arm64] - os: [netbsd] - - '@esbuild/netbsd-arm64@0.28.1': - resolution: {integrity: sha512-oks0DYbLwWMmaakTsCb+zL4E+aHRVLom9IJZOAthMQEPiQmydXHkziYEsGYRx0uNV/IjEKGAV941JzH02pflqw==} + '@esbuild/netbsd-arm64@0.28.2': + resolution: {integrity: sha512-sSATRjPeDBg3pdgHoQfoYBob11Kk1FGa9lui5RIHZCoCkJa9QKlvl3/vKz2usCmYYjs7ymJR/2Nnsqe+Hjt5nw==} engines: {node: '>=18'} cpu: [arm64] os: [netbsd] @@ -2767,14 +2669,8 @@ packages: cpu: [x64] os: [netbsd] - '@esbuild/netbsd-x64@0.27.7': - resolution: {integrity: sha512-OfatkLojr6U+WN5EDYuoQhtM+1xco+/6FSzJJnuWiUw5eVcicbyK3dq5EeV/QHT1uy6GoDhGbFpprUiHUYggrw==} - engines: {node: '>=18'} - cpu: [x64] - os: [netbsd] - - '@esbuild/netbsd-x64@0.28.1': - resolution: {integrity: sha512-aeL6lAnN89Hz43Mlh1G8ARasbuoYvSITDEx0tHh5b7jJnHcssqgjy9Yx430GDpmCa6OyrKoS0aNRjKundRizGg==} + '@esbuild/netbsd-x64@0.28.2': + resolution: {integrity: sha512-lqnzCV+mM0gIADaKihiCg6ifgfU2L3h5E33rNQBN1Y4MaVGnzryzmvvf7UHxprpQdE8hpqLolJ9Rl+SkIRDpyw==} engines: {node: '>=18'} cpu: [x64] os: [netbsd] @@ -2785,14 +2681,8 @@ packages: cpu: [arm64] os: [openbsd] - '@esbuild/openbsd-arm64@0.27.7': - resolution: {integrity: sha512-AFuojMQTxAz75Fo8idVcqoQWEHIXFRbOc1TrVcFSgCZtQfSdc1RXgB3tjOn/krRHENUB4j00bfGjyl2mJrU37A==} - engines: {node: '>=18'} - cpu: [arm64] - os: [openbsd] - - '@esbuild/openbsd-arm64@0.28.1': - resolution: {integrity: sha512-MEFJe5C3R8pwXdZ5Y21oo6m7ePiS0d9pWucn99O/wvyJZChoIQKrQDxKrGeW8F5+T0okTHesAmDeiHDTIq0V/Q==} + '@esbuild/openbsd-arm64@0.28.2': + resolution: {integrity: sha512-AL2qJILH7lNjrDmCQDvdxMfAUIv8KMNZOvrwAQ8i8//ntL9FflhOyMJ8OZSMBb8/AWXe3/5v5S20y3zCoZWKoQ==} engines: {node: '>=18'} cpu: [arm64] os: [openbsd] @@ -2809,14 +2699,8 @@ packages: cpu: [x64] os: [openbsd] - '@esbuild/openbsd-x64@0.27.7': - resolution: {integrity: sha512-+A1NJmfM8WNDv5CLVQYJ5PshuRm/4cI6WMZRg1by1GwPIQPCTs1GLEUHwiiQGT5zDdyLiRM/l1G0Pv54gvtKIg==} - engines: {node: '>=18'} - cpu: [x64] - os: [openbsd] - - '@esbuild/openbsd-x64@0.28.1': - resolution: {integrity: sha512-i/ZLIOafE0Z8cI/XANJAixoJL/uRAoS2xOA3rb0xN+KK0K177cMAsQYkzHtBrtMXAKuAc7HGgcWiZ/sRC1Nxgw==} + '@esbuild/openbsd-x64@0.28.2': + resolution: {integrity: sha512-QtiuPytchRyC4rwUKhexJdQKvDuZ6hWloi3igqPQNUJCS1/v9EiO3UTOXR6A3FoMo4fnAKbWJdqaIwhOzh8qEw==} engines: {node: '>=18'} cpu: [x64] os: [openbsd] @@ -2827,14 +2711,8 @@ packages: cpu: [arm64] os: [openharmony] - '@esbuild/openharmony-arm64@0.27.7': - resolution: {integrity: sha512-+KrvYb/C8zA9CU/g0sR6w2RBw7IGc5J2BPnc3dYc5VJxHCSF1yNMxTV5LQ7GuKteQXZtspjFbiuW5/dOj7H4Yw==} - engines: {node: '>=18'} - cpu: [arm64] - os: [openharmony] - - '@esbuild/openharmony-arm64@0.28.1': - resolution: {integrity: sha512-ge+Z7EXFNt2BO1oAMsVpiQ8EwndV9i1xXerAeTIK7AtPs3bKFXQM7nlRxDSIUIMeueR1CNXxqztLzdNeReKBJg==} + '@esbuild/openharmony-arm64@0.28.2': + resolution: {integrity: sha512-WkhYDmpTjLvGlScA1rwjRUmhl4k8oXR3cIbtqWmELgU/dFeHHlEllxDvdWcNJV9rbzCexB5vz8gtNewWLgCT7Q==} engines: {node: '>=18'} cpu: [arm64] os: [openharmony] @@ -2851,14 +2729,8 @@ packages: cpu: [x64] os: [sunos] - '@esbuild/sunos-x64@0.27.7': - resolution: {integrity: sha512-ikktIhFBzQNt/QDyOL580ti9+5mL/YZeUPKU2ivGtGjdTYoqz6jObj6nOMfhASpS4GU4Q/Clh1QtxWAvcYKamA==} - engines: {node: '>=18'} - cpu: [x64] - os: [sunos] - - '@esbuild/sunos-x64@0.28.1': - resolution: {integrity: sha512-BEjgtECkL3vY+SaSQ6nzVfiALUeFxpawyp8Jmf5PtYhf1Ug40N1h/hxlhts+f1FvSvarEigdxS3BlSMI2PJLcQ==} + '@esbuild/sunos-x64@0.28.2': + resolution: {integrity: sha512-GPMSkTOtMnv2U2F8gxe4Io6qmVs+YKyp832Etqqxr0hFngmXQ3rzwytelm3GIn7T4VviRUlf3sOgBOiTdvaf7g==} engines: {node: '>=18'} cpu: [x64] os: [sunos] @@ -2875,14 +2747,8 @@ packages: cpu: [arm64] os: [win32] - '@esbuild/win32-arm64@0.27.7': - resolution: {integrity: sha512-7yRhbHvPqSpRUV7Q20VuDwbjW5kIMwTHpptuUzV+AA46kiPze5Z7qgt6CLCK3pWFrHeNfDd1VKgyP4O+ng17CA==} - engines: {node: '>=18'} - cpu: [arm64] - os: [win32] - - '@esbuild/win32-arm64@0.28.1': - resolution: {integrity: sha512-lCv9eK/H6ZJWbE7bh2nw54CZ9M2nupBxJcTsdk/QQnWkdSjKGuxmmH8/GWrlT1eMmZfn4dGcCjRte397WqfQXA==} + '@esbuild/win32-arm64@0.28.2': + resolution: {integrity: sha512-PIhhEkE9uPBleRBrQEJpUn7MBnibZzbGzYWPmY3x+YoVg/95zbjB4CxPPOQ8l5tYYM4mMaCthF8/1DIfBQQyWQ==} engines: {node: '>=18'} cpu: [arm64] os: [win32] @@ -2899,14 +2765,8 @@ packages: cpu: [ia32] os: [win32] - '@esbuild/win32-ia32@0.27.7': - resolution: {integrity: sha512-SmwKXe6VHIyZYbBLJrhOoCJRB/Z1tckzmgTLfFYOfpMAx63BJEaL9ExI8x7v0oAO3Zh6D/Oi1gVxEYr5oUCFhw==} - engines: {node: '>=18'} - cpu: [ia32] - os: [win32] - - '@esbuild/win32-ia32@0.28.1': - resolution: {integrity: sha512-zvb/mB2bSCoJOpoCBgYKKpX6YM6mJBlBUVUtVj41DlZJVEB6/0CKlRYxP5wWl1C1ILiCoAU5wZZ4q1P3qeS6Eg==} + '@esbuild/win32-ia32@0.28.2': + resolution: {integrity: sha512-YmJbfTlvU7Sdn9BB+4PRES4oB6pxgS37MAONj+hBr/cpXS1aBPKXxNnDbu+QCWPj0o9dgyxeq79g6c5P8KeuYA==} engines: {node: '>=18'} cpu: [ia32] os: [win32] @@ -2923,20 +2783,14 @@ packages: cpu: [x64] os: [win32] - '@esbuild/win32-x64@0.27.7': - resolution: {integrity: sha512-56hiAJPhwQ1R4i+21FVF7V8kSD5zZTdHcVuRFMW0hn753vVfQN8xlx4uOPT4xoGH0Z/oVATuR82AiqSTDIpaHg==} + '@esbuild/win32-x64@0.28.2': + resolution: {integrity: sha512-5ebpxr3nWMzrL/rnUI755Jkuee0bHL/Gq0WTF9lvcpv73wAp5eu8MfBUgWK9bhWvZjj7yX8etf/8tI8Ney695g==} engines: {node: '>=18'} cpu: [x64] os: [win32] - '@esbuild/win32-x64@0.28.1': - resolution: {integrity: sha512-bm4Mowrv+GXMlpWX++EcXw/iLyd1o3+bJkC2DkWXYVvgZCqD/bSj9ctZeAMC3cIxgjRVR2Dufaiu4YPxr5gW1A==} - engines: {node: '>=18'} - cpu: [x64] - os: [win32] - - '@eslint-community/eslint-utils@4.9.1': - resolution: {integrity: sha512-phrYmNiYppR7znFEdqgfWHXR6NCkZEK7hwWDHZUjit/2/U0r6XvkDl0SYnoM51Hq7FhCGdLDT6zxCCOY1hexsQ==} + '@eslint-community/eslint-utils@4.10.1': + resolution: {integrity: sha512-cuadcxVFE8sDK6iWJbs8Sn0av2Nrh2QSGQhVlBW9AaAHqHwjWsZHT8LJ4hFGPh7ASBV2deFdM7H/DPjulmh8rg==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: eslint: ^6.0.0 || ^7.0.0 || >=8.0.0 @@ -2949,16 +2803,16 @@ packages: resolution: {integrity: sha512-Y3kKLvC1dvTOT+oGlqNQ1XLqK6D1HU2YXPc52NmAlJZbMMWDzGYXMiPRJ8TYD39muD/OTjlZmNJ4ib7dvSrMBA==} engines: {node: ^20.19.0 || ^22.13.0 || >=24} - '@eslint/config-helpers@0.6.0': - resolution: {integrity: sha512-ii6Bw9jJ2zi2cWA2Z+9/QZ/+3DX6kwaV5Q986D/CdP3Lap3w/pgQZ373FV7byY/i7L4IRH/G43I5dz1ClsCbpA==} + '@eslint/config-helpers@0.7.0': + resolution: {integrity: sha512-DObd/KKUsU+FaFv4PLxSRenpXfQWmPXXP3pPZ6/K1PCrMu2vQpMDMuQe/BqYeoLcz8ro0bVDF1RxOJgfVEdhUw==} engines: {node: ^20.19.0 || ^22.13.0 || >=24} '@eslint/core@1.2.1': resolution: {integrity: sha512-MwcE1P+AZ4C6DWlpin/OmOA54mmIZ/+xZuJiQd4SyB29oAJjN30UW9wkKNptW2ctp4cEsvhlLY/CsQ1uoHDloQ==} engines: {node: ^20.19.0 || ^22.13.0 || >=24} - '@eslint/css-tree@4.0.4': - resolution: {integrity: sha512-nxMparyhqVWQvadx9x8dIfubfIPOE+X2b2waua8fzdnM9vdp9rgVtwEZlG0TmCwEUz/d/f40fzvO/eqBwdxz0A==} + '@eslint/css-tree@4.0.5': + resolution: {integrity: sha512-iPmijIAq4hlIJB86PYmY/fcZORHtjphSqICDbwuw32A/JmkhZQ/K/6TjHE03zqf3n5yABpVcbRAMG8Mi9ojy8g==} engines: {node: ^20.19.0 || ^22.13.0 || >=24} '@eslint/js@10.0.1': @@ -2984,8 +2838,8 @@ packages: '@extism/js-pdk@1.1.1': resolution: {integrity: sha512-VZLn/dX0ttA1uKk2PZeR/FL3N+nA1S5Vc7E5gdjkR60LuUIwCZT9cYON245V4HowHlBA7YOegh0TLjkx+wNbrA==} - '@faker-js/faker@10.4.0': - resolution: {integrity: sha512-sDBWI3yLy8EcDzgobvJTWq1MJYzAkQdpjXuPukga9wXonhpMRvd1Izuo2Qgwey2OiEoRIBr35RMU9HJRoOHzpw==} + '@faker-js/faker@10.5.0': + resolution: {integrity: sha512-bsxD8WLS5lIj7aaoCx1YJkktqYj5vlBUE6HWzu2Q51ksrGJ0H737ECCKlFU7Yf8Br45z9t99frBp/J7kzbMPAg==} engines: {node: ^20.19.0 || ^22.13.0 || ^23.5.0 || >=24.0.0, npm: '>=10'} '@fig/complete-commander@3.2.0': @@ -2993,14 +2847,14 @@ packages: peerDependencies: commander: ^11.1.0 - '@floating-ui/core@1.7.5': - resolution: {integrity: sha512-1Ih4WTWyw0+lKyFMcBHGbb5U5FtuHJuujoyyr5zTaWS5EYMeT6Jb2AuDeftsCsEuchO+mM2ij5+q9crhydzLhQ==} + '@floating-ui/core@1.8.0': + resolution: {integrity: sha512-0CIZ5itps/8x7BG8dEIhs53BvCUH2PCoogtakwRTut+Arm58sJooJ0AuZhLw2HJYIR5cMLNPBSS728sPho2khQ==} - '@floating-ui/dom@1.7.6': - resolution: {integrity: sha512-9gZSAI5XM36880PPMm//9dfiEngYoC6Am2izES1FF406YFsjvyBMmeJ2g4SAju3xWwtuynNRFL2s9hgxpLI5SQ==} + '@floating-ui/dom@1.8.0': + resolution: {integrity: sha512-yXSrzeHZBTZadLOlfyhCkJHNeLJnHRnRInwdZ40L7ZiaAtrBwoYlsDrX3v5zB1Utk7CLfzcOVnVVWoXEky7Ceg==} - '@floating-ui/utils@0.2.11': - resolution: {integrity: sha512-RiB/yIh78pcIxl6lLMG0CgBXAZ2Y0eVHqMPYugu+9U0AeT6YBeiJpf7lbdJNIugFP5SIjwNRgo4DhR1Qxi26Gg==} + '@floating-ui/utils@0.2.12': + resolution: {integrity: sha512-HpCo8tmWzLVad5s2d19EhAz5zqrrQ6s69qd6moPMQvkOuSwDT1YgRfWSVuc4ennqrgv3OHppiOGMQ7oC13yIww==} '@formatjs/ecma402-abstract@2.3.6': resolution: {integrity: sha512-HJnTFeRM2kVFVr5gr5kH1XP6K0JcJtE7Lzvtr3FS/so5f1kpsqqqxy5JF+FRaO6H2qmcMfAUIox7AJteieRtVw==} @@ -3008,34 +2862,34 @@ packages: '@formatjs/fast-memoize@2.2.7': resolution: {integrity: sha512-Yabmi9nSvyOMrlSeGGWDiH7rf3a7sIwplbvo/dlz9WCIjzIQAfy1RMf4S0X3yG724n5Ghu2GmEl5NJIV6O9sZQ==} - '@formatjs/fast-memoize@3.1.6': - resolution: {integrity: sha512-H5aexk1Le7T9TPmscacZ+1pR6CTa2n1wq+HDVGXhH8TzUlQQpeXzZs91dRtmFHrbeNbjPFPfQujUqm7MHgVoXQ==} + '@formatjs/fast-memoize@3.1.7': + resolution: {integrity: sha512-zXfhLpvA6T7+efdt9JLbBwZ00tT7NsBMDVnDu8rpHeNNv8KfRZAMo2gkG0k9lK/Nzc//3kJ9pImsfuJxk3KhUA==} '@formatjs/icu-messageformat-parser@2.11.4': resolution: {integrity: sha512-7kR78cRrPNB4fjGFZg3Rmj5aah8rQj9KPzuLsmcSn4ipLXQvC04keycTI1F7kJYDwIXtT2+7IDEto842CfZBtw==} - '@formatjs/icu-messageformat-parser@3.5.11': - resolution: {integrity: sha512-NVsuNsc2dUVG9+4HBJ/srScxtA/18LqGgwtop/tuN/OIBjVl6QA+0KhfZQddDD9sEh2LeVjLFPGVU3ixa3blcA==} + '@formatjs/icu-messageformat-parser@3.5.16': + resolution: {integrity: sha512-kl6b/4D56gjGZi4ZewSmvXbalHwjOUI5ogEHPZqw42goeXTTrL7/yuPzvdrvr0QigDtvaOeb+UeMf62jks43Yg==} '@formatjs/icu-skeleton-parser@1.8.16': resolution: {integrity: sha512-H13E9Xl+PxBd8D5/6TVUluSpxGNvFSlN/b3coUp0e0JpuWXXnQDiavIpY3NnvSp4xhEMoXyyBvVfdFX8jglOHQ==} - '@formatjs/icu-skeleton-parser@2.1.10': - resolution: {integrity: sha512-XuSva+8ZGawk8VnD5VD6UeH8KarQ/Z022zgjHDoHmlNiAewstXuuzXc0Hk5pGFSdG+nNw5bfJKXqj1ZXHn9yUA==} + '@formatjs/icu-skeleton-parser@2.1.11': + resolution: {integrity: sha512-j8cUmOJzVgkHuS0QiQ6ga76UIoLOFSAMWhs7aZJztH3aAdCOAE6vpC8KVvFB4cU10ON0y2/5oOVmPJ43s2lTwA==} '@formatjs/intl-localematcher@0.6.2': resolution: {integrity: sha512-XOMO2Hupl0wdd172Y06h6kLpBz6Dv+J4okPLl4LPtzbr8f66WbIoy4ev98EBuZ6ZK4h5ydTN6XneT4QVpD7cdA==} - '@fortawesome/fontawesome-common-types@7.2.0': - resolution: {integrity: sha512-IpR0bER9FY25p+e7BmFH25MZKEwFHTfRAfhOyJubgiDnoJNsSvJ7nigLraHtp4VOG/cy8D7uiV0dLkHOne5Fhw==} + '@fortawesome/fontawesome-common-types@7.3.1': + resolution: {integrity: sha512-k0C0sdHmZtAo6dRDtd1Z/qcpyHbL0CKsjV8seMY/21xGhY5Wsv0XRmiI/xEEH4y2c9b1+jvgNs/3EqhV27yUEA==} engines: {node: '>=6'} - '@fortawesome/free-regular-svg-icons@7.2.0': - resolution: {integrity: sha512-iycmlN51EULlQ4D/UU9WZnHiN0CvjJ2TuuCrAh+1MVdzD+4ViKYH2deNAll4XAAYlZa8WAefHR5taSK8hYmSMw==} + '@fortawesome/free-regular-svg-icons@7.3.1': + resolution: {integrity: sha512-q1EsmL7Q8DDnkRBUjSvrxbq7c9oVwwVjCn/xa5apKmdp65YSgzUg2y0Ltnd5aDbT6GdAQQdXql5Ha90ArqIReQ==} engines: {node: '>=6'} - '@fortawesome/free-solid-svg-icons@7.2.0': - resolution: {integrity: sha512-YTVITFGN0/24PxzXrwqCgnyd7njDuzp5ZvaCx5nq/jg55kUYd94Nj8UTchBdBofi/L0nwRfjGOg0E41d2u9T1w==} + '@fortawesome/free-solid-svg-icons@7.3.1': + resolution: {integrity: sha512-v0BLa0eqg7ubvVWeNSHVBs8fWH/GJicERZoJaxJ3FE/lj67VSqzoMg9pzfZVOfLMX10y0pGwQAuxoRVVH2patg==} engines: {node: '>=6'} '@golevelup/nestjs-discovery@5.0.0': @@ -3087,8 +2941,8 @@ packages: '@iconify/types@2.0.0': resolution: {integrity: sha512-+wluvCrRhXrhyOmRDJ3q8mux9JkKy5SJ/v8ol2tu4FVjyYvtEzkc/3pK15ET6RKg4b4w4BmTk1+gsCUhf21Ykg==} - '@iconify/utils@3.1.3': - resolution: {integrity: sha512-LPKOXPn/zV+zis1oOfGWogaXVpqUybF3ZS6SCZIsz8vg0ivVp9+fVqyYB7xq0aiST/VhUQYGO1qo6uoYSiEJqw==} + '@iconify/utils@3.1.4': + resolution: {integrity: sha512-b1S7B1k9ohZ+iNTi2ATxbRYG9fTrJmUT0rc46bvVnNxqNRGW7dyo/vRREwyniI5IRN2RSJHDcm+s3BjWrSAjHw==} '@img/colour@1.1.0': resolution: {integrity: sha512-Td76q7j57o/tLVdgS746cYARfSyxk8iEfRxewL9h4OMzYhbW4TAcppl0mT4eyqXddh6L/jwoM75mo7ixa/pCeQ==} @@ -3250,8 +3104,8 @@ packages: resolution: {integrity: sha512-O1SJ+BbeFVsUTF4af1MfagJZM+lPgLjI8lQ3SZNjpo8SGJReSbUl2ii03OKuGni/G0yp2GnRLpOTNSHYGtVrcg==} hasBin: true - '@immich/ui@0.81.1': - resolution: {integrity: sha512-7g173hArs7OS5CfHUG+ZJVQp1iCvFZzBmm+f2uH1WChlFdcwty5DLilYrDBszWuPIvu8wTX2AXTneS/KYBCUxw==} + '@immich/ui@0.85.0': + resolution: {integrity: sha512-KCAEtVGexZ1G+nuT25bv1QS6Rc2wOlLymp4qDBZVqMxu3o3RWpUzafRHvZt5g4FnlAgfHZdXAIHVVrhJzkrlDA==} peerDependencies: '@sveltejs/kit': ^2.13.0 svelte: ^5.0.0 @@ -3405,9 +3259,6 @@ packages: '@ioredis/commands@1.10.0': resolution: {integrity: sha512-UmeW7z4LfctwoQ5wkhVzgq8tXkreED2xZGpX+Bg+zA+WJFZCT6c062AfCK/Dfk81xZnnwdhJCUMkitihRaoC2Q==} - '@ioredis/commands@1.5.1': - resolution: {integrity: sha512-JH8ZL/ywcJyR9MmJ5BNqZllXNZQqQbnVZOqpPQqE1vHiFgAw4NHbvE0FOduNU8IX9babitBT46571OnPTT0Zcw==} - '@isaacs/cliui@8.0.2': resolution: {integrity: sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==} engines: {node: '>=12'} @@ -3494,50 +3345,50 @@ packages: peerDependencies: tslib: '2' - '@jsonjoy.com/fs-core@4.57.7': - resolution: {integrity: sha512-GDKuYHjP7vAI1kjBo73V+STKr9XIMZknW/xirpRW/EcShX0IKSev/ALafeRfC8Q331nodrXUFu04PugPB0MAhw==} + '@jsonjoy.com/fs-core@4.64.0': + resolution: {integrity: sha512-zs2TAq7Six5jgMuoMNjpspAvOP3mhtgq/k1UyQodEzCtQi/N83y2/y+zcvnZSGp/Rxq96DBN+bValOBQAyn/ew==} engines: {node: '>=10.0'} peerDependencies: tslib: '2' - '@jsonjoy.com/fs-fsa@4.57.7': - resolution: {integrity: sha512-1rWsah2nZtRbNeP+c61QcfGfVrJXBmBD0Hm7Akvv4C9MKEasXnbiOS//iH3T3HwUSSBATGrfSp0Xi8nlNhATeQ==} + '@jsonjoy.com/fs-fsa@4.64.0': + resolution: {integrity: sha512-nMWOVbkLFyEgmXZih3wyvxA9XpgyyqyfrINMHvEFqhi7uqfRl7c9ERJt6yX7vgMPrB9Uo+OJO+Spa0cFzPD01w==} engines: {node: '>=10.0'} peerDependencies: tslib: '2' - '@jsonjoy.com/fs-node-builtins@4.57.7': - resolution: {integrity: sha512-LWqfY1m+uAosjwM1RrKhMkUnP9jcq1RUczHsNO779ovm1E9v8I/pmj04eBAcoBjhC7ltcPbNFGyRJ5JqSJ7Jdg==} + '@jsonjoy.com/fs-node-builtins@4.64.0': + resolution: {integrity: sha512-/o7WRFhUWaM/fOrslwLZGnzn4RmRILykn+lAL+mNObqqRNw+CQSiij6hpCeZ+C7buhdoVo7go/OYqzaSUfDYmA==} engines: {node: '>=10.0'} peerDependencies: tslib: '2' - '@jsonjoy.com/fs-node-to-fsa@4.57.7': - resolution: {integrity: sha512-9T0zC9LKcAWXDoTLRdLMoJ0seOvJ5bgDKq1tSBoQAFQpPDstQUeV1Oe7PLypdu7F2D3ddRstmwgeNUEN/VaZ4Q==} + '@jsonjoy.com/fs-node-to-fsa@4.64.0': + resolution: {integrity: sha512-WDD9WVs0hb7UAEKTgZW2f66WDrbj7gIIWwpP3spbLyXa0rghtUaFTB8L4gdR3ZCWwiKIsj38/CNijpVmpnuPUw==} engines: {node: '>=10.0'} peerDependencies: tslib: '2' - '@jsonjoy.com/fs-node-utils@4.57.7': - resolution: {integrity: sha512-jjWSDOsfcog2cZnUCwX5AHmlIq6b6wx5Pz/2LAcNjJ62Rajwg89Fy7ubN+lDHew0/1reLDa9Z5urybYadhh37g==} + '@jsonjoy.com/fs-node-utils@4.64.0': + resolution: {integrity: sha512-k5Indsx9hWW9xSF7Y6oSKKwtCUNhzZxadub3owhIlitc+iMRVlPPdX2duTKQWBL3qNWpXya8jykgaaWpheeS4w==} engines: {node: '>=10.0'} peerDependencies: tslib: '2' - '@jsonjoy.com/fs-node@4.57.7': - resolution: {integrity: sha512-xhnyeyEVTiIOibFvda/5n89nChMLCPKHHM2WQ+GGDf6+U/IrQBW3Qx6x+Uq1bkDbxBkybLOdIGoBtVBrE8Nngg==} + '@jsonjoy.com/fs-node@4.64.0': + resolution: {integrity: sha512-dO+NNkODbUli4uV42bcNrrLvq5rE7SNpdZ5TNd0dtbLsAaNK3MDiIC9lUi+brboGoIjW6vd2fB1qao60nrk5xA==} engines: {node: '>=10.0'} peerDependencies: tslib: '2' - '@jsonjoy.com/fs-print@4.57.7': - resolution: {integrity: sha512-mFM4P4Gjq0QQHkLnXzPYPEMFrAoe6a5Myedgb6+CmL+nGd3MKvTxYPuD7N1dLIH9RBy1fLdzxd80qvuK8xrx3Q==} + '@jsonjoy.com/fs-print@4.64.0': + resolution: {integrity: sha512-PHZFccchvkhWrwPWHjmVAhbC3vSHCtyZvlZfJJ3ho2bnzl450hXri6/8e6pbkWdH+SkmLXNml0sV8e5HDAfxKw==} engines: {node: '>=10.0'} peerDependencies: tslib: '2' - '@jsonjoy.com/fs-snapshot@4.57.7': - resolution: {integrity: sha512-1GS3+plfm2giB3PqokiqyydyqYTPLcCQIKSkp0TdMNRh3KVk7rqRM6U785FLlVRG7XLmkc0KWr215OY+22K3QA==} + '@jsonjoy.com/fs-snapshot@4.64.0': + resolution: {integrity: sha512-oM7UDeL83q6NBzzsfKAsYKXKVXlykKFqqOLh4xZZKAzzROTlInkPbc6LTDGThEOnPiFiUzA7tYziHG9xavd76Q==} engines: {node: '>=10.0'} peerDependencies: tslib: '2' @@ -3586,8 +3437,8 @@ packages: resolution: {integrity: sha512-x/iUDjcS90W69PryLDIMgFyV21YLTnG9zOpPXS7Bkt2b8AsY3zZsIpOLBkYr9fBcF3HbkKaER5hOBZLfpLgYNw==} engines: {node: '>= 14.0.0'} - '@koa/router@15.6.0': - resolution: {integrity: sha512-iEOXlvGIBqSNkGXrg0XtMARAOm5zA24oedXxiTGEkrD4JgwVjfRDddCQvW1s4WEcwDYvyecRbf8BikXsuEEj8w==} + '@koa/router@15.7.0': + resolution: {integrity: sha512-WaAlk4TOl/O0rhTpOR0l052gz03syPMmI6Pe2gd7v3ubjfv5UcSGcnb0Y/J5NNC/ln+5FiUqPJTc/a15I+XqAA==} engines: {node: '>= 20'} peerDependencies: koa: ^2.0.0 || ^3.0.0 @@ -3660,8 +3511,8 @@ packages: '@maplibre/vt-pbf@4.3.2': resolution: {integrity: sha512-j6p0AdjvAR19Z3XaCysle7A4ZSo08tYOzxD0Y9NQylwPAkwJJeYub5b2eVucdeDh7erhv69DahoLOevDRERRUw==} - '@marijn/find-cluster-break@1.0.2': - resolution: {integrity: sha512-l0h88YhZFyKdXIFNfSWpyjStDjGHwZ/U7iobcK1cQQD8sejsONdQtTVU+1wVN1PBw40PiiHB1vA5S7VTfQiP9g==} + '@marijn/find-cluster-break@1.0.3': + resolution: {integrity: sha512-FY+MKLBoTsLNJF/eLWaOsXGdz6uh3Iu1axjPf6TUq92IYumcTcXWHoS747JARLkcdlJ/Waiaxc5wQfFO8jC6NA==} '@mdi/js@7.4.47': resolution: {integrity: sha512-KPnNOtm5i2pMabqZxpUz7iQf+mfrYZyKCZ8QNz85czgEt7cuHcGorWfdzUMWYA0SD+a6Hn4FmJ+YhzzzjkTZrQ==} @@ -3684,8 +3535,8 @@ packages: '@types/react': '>=16' react: '>=16' - '@mermaid-js/parser@1.1.1': - resolution: {integrity: sha512-VuHdsYMK1bT6X2JbcAaWAhugTRvRBRyuZgd+c22swUeI9g/ntaxF7CY7dYarhZovofCbUNO0G7JesfmNtjYOCw==} + '@mermaid-js/parser@1.2.0': + resolution: {integrity: sha512-oYPyv8A4As1yH5Bx+04iQEQxXuIQDe0GKCNSRgao6z8AM9jixXIfP0vsppRLvGf+nKIOb9/LdpWA4YuJiVvESA==} '@microsoft/tsdoc@0.16.0': resolution: {integrity: sha512-xgAyonlVVS+q7Vc7qLW0UrJU7rSFcETRWsqdXZtjzRU8dF+6CkozTK4V4y1LwOX7j8r/vHphjDeMeGI4tNGeGA==} @@ -3723,12 +3574,6 @@ packages: '@namnode/store@0.1.0': resolution: {integrity: sha512-4NGTldxKcmY0UuZ7OEkvCjs8ZEoeYB6M2UwMu74pdLiFMKxXbj9HdNk1Qn213bxX1O7bY5h+PLh5DZsTURZkYA==} - '@napi-rs/wasm-runtime@1.1.5': - resolution: {integrity: sha512-AWPoBRJ9tsnVhor4sjO7rkni+7p+2IAEFj6cx06UgP10jkQHqay/36uRV/bFkgrh18D9vb4cr8Q0Pthskgzy+Q==} - peerDependencies: - '@emnapi/core': ^1.7.1 - '@emnapi/runtime': ^1.7.1 - '@nestjs/bull-shared@11.0.4': resolution: {integrity: sha512-VBJcDHSAzxQnpcDfA0kt9MTGUD1XZzfByV70su0W0eDCQ9aqIEBlzWRW21tv9FG9dIut22ysgDidshdjlnczLw==} peerDependencies: @@ -3742,8 +3587,8 @@ packages: '@nestjs/core': ^10.0.0 || ^11.0.0 bullmq: ^3.0.0 || ^4.0.0 || ^5.0.0 - '@nestjs/cli@11.0.23': - resolution: {integrity: sha512-2V0Bf5jz0KXhUZk3eJi9GljIyqH04otwsE/mYLbqJR+X0iiYx+6bkNJ2Qz28uHNFj1cpHgimf9xDzHkqarie0g==} + '@nestjs/cli@11.0.24': + resolution: {integrity: sha512-aIHxQLSYtXShifA3zwWIeznEsZnNa3Iz2QRykFj+sl9IcbERBHr5nH87FRgywM+He3NxoF5WazHfR8FsmVeWxw==} engines: {node: '>= 20.11'} hasBin: true peerDependencies: @@ -3755,8 +3600,8 @@ packages: '@swc/core': optional: true - '@nestjs/common@11.1.27': - resolution: {integrity: sha512-kEGSzqM2lWr4whh4Ubflw+oPZSEzxvRMu9WL+LveZploJWTjec5bBlCiRVlVzTPg2kIwBiLwWSvCCW7Wnin1gg==} + '@nestjs/common@11.1.28': + resolution: {integrity: sha512-bRImsxibie+AM7xjdwcrm/gr5YeacI65kSBNzTufa1Ib5iwziaY/lqMtRh9THq6pbV4e1HP9aI2ZxGUumnmaoQ==} peerDependencies: class-transformer: '>=0.4.1' class-validator: '>=0.13.2' @@ -3768,8 +3613,8 @@ packages: class-validator: optional: true - '@nestjs/core@11.1.27': - resolution: {integrity: sha512-K6DX7hcqmZdeXkv7tsPakKBRCgqL19a4mtbX4FluY0hWtFdtPKp6lbe+lb8gWPfvLdbOWr/CPScn7BSjBX+Ecg==} + '@nestjs/core@11.1.28': + resolution: {integrity: sha512-06m63xIRj8+l8uOeh/8LnYupGubkyu4f+bPKIadaSui6vK9KpXgoz7HveT1yOVLcEt0M0oCOEW5EuEXZkEmBBQ==} engines: {node: '>= 20'} peerDependencies: '@nestjs/common': ^11.0.0 @@ -3799,14 +3644,14 @@ packages: class-validator: optional: true - '@nestjs/platform-express@11.1.27': - resolution: {integrity: sha512-0ZFhz6H6EdGh4xQVbUNwjoAwBuz73P7FvUAl67h9CTdMqQlJDaQYJApBv8pKfVZ1fGjMCbl0m9DcC6pXaZPWSQ==} + '@nestjs/platform-express@11.1.28': + resolution: {integrity: sha512-hU+9Sz4m+onHrR5AmelI59QKmY/Re546bPnygnpqqeQdHDiJpBgjWbL4t6Jr73CBpS60cpyng7WzjgphNB9iwA==} peerDependencies: '@nestjs/common': ^11.0.0 '@nestjs/core': ^11.0.0 - '@nestjs/platform-socket.io@11.1.27': - resolution: {integrity: sha512-xgpLzaIDGOCC6xOAtHnRAz8sqieFgGxxu3MN5ID026Jt6oeL3efp29N5QHhPr7UlqBfy/Jd02uj0POkZq6Au3Q==} + '@nestjs/platform-socket.io@11.1.28': + resolution: {integrity: sha512-vY+GmU2jBcymvgm5rEnftUx4qNxK8cDJmXjl1/1NcpITTNJo0vg07xYR43MwXHcMqe7b0jwqt5+UCTzxqQFIqA==} peerDependencies: '@nestjs/common': ^11.0.0 '@nestjs/websockets': ^11.0.0 @@ -3827,10 +3672,10 @@ packages: prettier: optional: true - '@nestjs/swagger@11.4.4': - resolution: {integrity: sha512-VaIo1ruV2G7b+f2zPzkBSUNy9a/WQ9sg8TLKhWlrTfg4O6U10M/PA7Xi6XMXadOVhwOqoesijba8jH3i/3adrA==} + '@nestjs/swagger@11.4.6': + resolution: {integrity: sha512-Le136h2WC7HGsd70+WyK1qrm+Zq7kFxBLkYC1JgAVqNRCt8kNh7bMF7Qkn65D5j2t/aks0+VbWmUVlYIwPrs3A==} peerDependencies: - '@fastify/static': ^8.0.0 || ^9.0.0 + '@fastify/static': ^8.0.0 || ^9.0.0 || ^10.0.0 '@nestjs/common': ^11.0.1 '@nestjs/core': ^11.0.1 class-transformer: '*' @@ -3845,8 +3690,8 @@ packages: class-validator: optional: true - '@nestjs/testing@11.1.27': - resolution: {integrity: sha512-I35po13UHZZeGenLWJ3QYwh77RsLau5RcFKWBZ4waVHeARpwjtC7v7n7lGh98swLQdGmZgTnbvKaZ0B5dsUIKA==} + '@nestjs/testing@11.1.28': + resolution: {integrity: sha512-B+VgRxeLaH7jkOMgAyUP3N3rpFlisQ7JRxixRbgHvG6a0VgKbbkNSofKExexCgKmQQak80undb3+2kE1lUBmRQ==} peerDependencies: '@nestjs/common': ^11.0.0 '@nestjs/core': ^11.0.0 @@ -3858,8 +3703,8 @@ packages: '@nestjs/platform-express': optional: true - '@nestjs/websockets@11.1.27': - resolution: {integrity: sha512-X3OgJt9KgYTvt9D7sNz9SOj3A1daAHy7DZrYhM1pky8Fh+erlKQH5IQ/tKm+GaJKA5M0srBUr1CMqjak/qNxOw==} + '@nestjs/websockets@11.1.28': + resolution: {integrity: sha512-jeyclAURCJTN8S8lctDhfLdiJeDKjZmYWWLav653Fb9hl9c+zx5jPhavI8Xk5++R8u+lX9qzaRxtsjEoxTtjyw==} peerDependencies: '@nestjs/common': ^11.0.0 '@nestjs/core': ^11.0.0 @@ -3878,8 +3723,8 @@ packages: resolution: {integrity: sha512-jCs9ldd7NwzpgXDIf6P3+NrHh9/sD6CQdxHyjQI+h/6rDNo88ypBxxz45UDuZHz9r3tNz7N/VInSVoVdtXEI4A==} engines: {node: ^14.21.3 || >=16} - '@noble/hashes@2.2.0': - resolution: {integrity: sha512-IYqDGiTXab6FniAgnSdZwgWbomxpy9FtYvLKs7wCUs2a8RkITG+DFGO1DM9cr+E3/RgADRpFjrKVaJ1z6sjtEg==} + '@noble/hashes@2.3.0': + resolution: {integrity: sha512-oN+QwyX7VSHotibwubG3kpzbwKrfnyR6OOO+3Nk/53ADL7FmgHHz4TgrbaYKvvOw09u6QTx0oiH1cNCIOuN0CQ==} engines: {node: '>= 20.19.0'} '@nodelib/fs.scandir@2.1.5': @@ -3897,94 +3742,94 @@ packages: '@oazapfts/runtime@1.2.0': resolution: {integrity: sha512-fi7dp7dNayyh/vzqhf0ZdoPfC7tJvYfjaE8MBL1yR+iIsH7cFoqHt+DV70VU49OMCqLc7wQa+yVJcSmIRnV4wA==} - '@opentelemetry/api-logs@0.219.0': - resolution: {integrity: sha512-FFx7YnaYJlIjqWW/AG/yAZ0L/NEY724PipXXXQLdtZPbLwBGbUMTGL1i/esI56TWfTUXxhLfpgrnWJCG8aUJyg==} + '@opentelemetry/api-logs@0.221.0': + resolution: {integrity: sha512-OlanaW1vv7ufTqQ3/fPLI4arGt5ZoM+P8abOMki6uEYnpRazepSWDwDnnw+la7kE26SHVC18//SMccrDvLKOXQ==} engines: {node: '>=8.0.0'} '@opentelemetry/api@1.9.1': resolution: {integrity: sha512-gLyJlPHPZYdAk1JENA9LeHejZe1Ti77/pTeFm/nMXmQH/HFZlcS/O2XJB+L8fkbrNSqhdtlvjBVjxwUYanNH5Q==} engines: {node: '>=8.0.0'} - '@opentelemetry/configuration@0.219.0': - resolution: {integrity: sha512-wXZUYv4ngu43nA4WEhuXNacm46LW+17LRM8nKyIhBzroRA24PBYjMnakwzR/w777nFUB5xlgsYTTeuXxumZM1Q==} + '@opentelemetry/configuration@0.221.0': + resolution: {integrity: sha512-uE9y56Zdi9Gt/RdxYnVOo3YmFZkKJJMA0gqtBe8wh8gdtF5Asqe+Oh/TWiDtFb1s+31jNY4CWgnfIB1KOITfFA==} engines: {node: ^18.19.0 || >=20.6.0} peerDependencies: '@opentelemetry/api': ^1.9.0 - '@opentelemetry/context-async-hooks@2.8.0': - resolution: {integrity: sha512-/3FIraneMcng67SUJCxvyInk/oxzwsxyadufk0wwfOBLf5wqtAGX4MoQASwSbndBPeARzBryUM9Azr5kHIdWLw==} + '@opentelemetry/context-async-hooks@2.10.0': + resolution: {integrity: sha512-bvyMcgLEkozzSzpEEEo1OMoeQ97bxj6Qs2uN3mPrSdDvObMI1myffD/BPqcLlzZO9//d1SqQA/WPw7Cz2AiqhA==} engines: {node: ^18.19.0 || >=20.6.0} peerDependencies: '@opentelemetry/api': '>=1.0.0 <1.10.0' - '@opentelemetry/core@2.8.0': - resolution: {integrity: sha512-hd1Lfh8p545nNz+jq1Ejfz+Mn1hyLuxYn1YzTfFNrxr8urEWMNQLPf1Th8kjOH+HxwawCrtgBp8JpBUR4ZSgww==} + '@opentelemetry/core@2.10.0': + resolution: {integrity: sha512-/wNZ8twnEQQA4HoHu22+vcsdru6pWPWxW+7w+FlxT6Id7PE/WIbZmVKkte+PF72e0F2dnImFeHD2syyE1Mw6MQ==} engines: {node: ^18.19.0 || >=20.6.0} peerDependencies: '@opentelemetry/api': '>=1.0.0 <1.10.0' - '@opentelemetry/exporter-logs-otlp-grpc@0.219.0': - resolution: {integrity: sha512-7SvzDCIclHWAcCwZ1MTOLcwn4BVNPGI3QxS/DJraPNe1TTL+4TvUBq5zeQV8tsnYvtDN7wKW2qocVmaCP2l7sQ==} + '@opentelemetry/exporter-logs-otlp-grpc@0.221.0': + resolution: {integrity: sha512-txG1G0IrYSsKKMeiWZfj/i5cQmWB+h+hf3HzPpF3RqZVwp+iQQEIsv8Vtmzy6RWVdHdJZfygmVrBI39YTBvWcw==} engines: {node: ^18.19.0 || >=20.6.0} peerDependencies: '@opentelemetry/api': ^1.3.0 - '@opentelemetry/exporter-logs-otlp-http@0.219.0': - resolution: {integrity: sha512-mhl2HL6GmZI8b8PwPfqMws/5ovJfbRTxwc9Y5agVVHiQ+e5SL1btsFr/kJDgt7YCexDtsUn5HAreHQO9szFS0A==} + '@opentelemetry/exporter-logs-otlp-http@0.221.0': + resolution: {integrity: sha512-nKXkr4Tomi6fjYVOf+ytcW3dZAVr4v4Bv5gsT6dr2gvpUPJpKgHB4XbMufMsPotRE3g0XH2GwVVCkN2w6SON+Q==} engines: {node: ^18.19.0 || >=20.6.0} peerDependencies: '@opentelemetry/api': ^1.3.0 - '@opentelemetry/exporter-logs-otlp-proto@0.219.0': - resolution: {integrity: sha512-Ayw4Gf71PS9jhBVaYywa4WsajnqfDehMkTdVH3TSAVHqPcsAv/AhH/wTNRYNt99szeYr6Gbd/D6RjZD77wAxHg==} + '@opentelemetry/exporter-logs-otlp-proto@0.221.0': + resolution: {integrity: sha512-AH6EY+47gXFaWYgG3hfeOneGiE9xIZGtDBk+9g0sM8NZWzsQhhmqPbQQXJzS7pyCh5jRRr2nYNXVrkCmoojRvQ==} engines: {node: ^18.19.0 || >=20.6.0} peerDependencies: '@opentelemetry/api': ^1.3.0 - '@opentelemetry/exporter-metrics-otlp-grpc@0.219.0': - resolution: {integrity: sha512-6LaaSrPxK5L55bXevWajvOMxGOpNm0n12tG53TeZaUeNzXwLPg6d2KCC1zAlGsojan+xRG71mA4Qqs9K2VVrKQ==} + '@opentelemetry/exporter-metrics-otlp-grpc@0.221.0': + resolution: {integrity: sha512-KOgCtO15FC6C1T/xOqBcr7EyUs7B+7yomGNb5Y97d3s38rPbCCk5sewkmE2b0/itOkQ/PptX8CLlD+kn2mEtTg==} engines: {node: ^18.19.0 || >=20.6.0} peerDependencies: '@opentelemetry/api': ^1.3.0 - '@opentelemetry/exporter-metrics-otlp-http@0.219.0': - resolution: {integrity: sha512-6CaDRbMVHZSDWzNXwrR8y/H4B/Z1eMNnkHiPQlTx3Ojz2OHY4X/aff/UC4P/3pHUQSuTfi3oh2UsPPZppw+Vrg==} + '@opentelemetry/exporter-metrics-otlp-http@0.221.0': + resolution: {integrity: sha512-sRfCKbOzgy8xZQV2as0RzIZlnCmCseCKZGLfRcrpo2CBngJDr+rPtX0zkG0+oUCV5kfQPUoW3W3C96Ag3Y/Clg==} engines: {node: ^18.19.0 || >=20.6.0} peerDependencies: '@opentelemetry/api': ^1.3.0 - '@opentelemetry/exporter-metrics-otlp-proto@0.219.0': - resolution: {integrity: sha512-DUS7XyIiEnoeccQUvuKy0G2/YqeKhpN8FVIrGbrLNIVMj10yeIFLRzRv0tibCI2kXXvlTTABVexGAk78wHk2ug==} + '@opentelemetry/exporter-metrics-otlp-proto@0.221.0': + resolution: {integrity: sha512-YMF4LveY2I3yhw61rn6nmC9FE8U24IZHPeKU1Duc5+sbwjMd8FwZAwba318ImdThCg/HuVQvhm2y6bfgNPnfYg==} engines: {node: ^18.19.0 || >=20.6.0} peerDependencies: '@opentelemetry/api': ^1.3.0 - '@opentelemetry/exporter-prometheus@0.219.0': - resolution: {integrity: sha512-TxOnJ85eWJY5JyOJsNMXiRTYlkDcOv0u3KbXEzWCc+tUS9sjL/BC6BcdxZ0B9r2OFVqsrZFXUzSD2sZUy42Ucw==} + '@opentelemetry/exporter-prometheus@0.221.0': + resolution: {integrity: sha512-kW79a20qWESIuAdDrxzg9WKM98twV/NBWBFRAH57ap/+ssZhiCo0hckzKT0zpuwR/gSHrFAQhJL0bYDrnEM34g==} engines: {node: ^18.19.0 || >=20.6.0} peerDependencies: '@opentelemetry/api': ^1.3.0 - '@opentelemetry/exporter-trace-otlp-grpc@0.219.0': - resolution: {integrity: sha512-BkDNv1UD6BscW19MxbAxVmSYSSFuyeqR6buV2/HTYqA7GrR0EbTFzqG6h86T3PtXmpdbsWjMGLDdjG2rikG27Q==} + '@opentelemetry/exporter-trace-otlp-grpc@0.221.0': + resolution: {integrity: sha512-zXminlZedtq9LvOW64CnNkOqk15zV75k8JgtdTuWFge6+jk2m4GmAUm6L2eIiG1o2a2bZxXw2PDrszm+bps0IA==} engines: {node: ^18.19.0 || >=20.6.0} peerDependencies: '@opentelemetry/api': ^1.3.0 - '@opentelemetry/exporter-trace-otlp-http@0.219.0': - resolution: {integrity: sha512-9t6SvBXXBEjOBcIzgozvBbd3jWrv3Gt3ngGhl1fhdZ/zRc7oZDVOFEqbi2zlBpW9BXhgDMKv422J0DL/3iQWfw==} + '@opentelemetry/exporter-trace-otlp-http@0.221.0': + resolution: {integrity: sha512-AySXiKoC+meiWm6zdVj5T2LnPDZuatveBby1cMOeQteIWsYXAUxs8Sru13G2pVSPrUXz6vF+og7QVBX6GdC/oQ==} engines: {node: ^18.19.0 || >=20.6.0} peerDependencies: '@opentelemetry/api': ^1.3.0 - '@opentelemetry/exporter-trace-otlp-proto@0.219.0': - resolution: {integrity: sha512-lF/LUBfhOFmxJa+SQsLN7ziV4MHa2pyKgOM6JNehSOfU+npjM4gwm9oIKEJrzrWcexMcqydiyoFy0XCb1Ql3wQ==} + '@opentelemetry/exporter-trace-otlp-proto@0.221.0': + resolution: {integrity: sha512-Z9i2T7vgZbWe9rSLYxXVIbeW+XyzUq4rZanW3ZyVNwVDqCsh0EJKUgBWWQ0CZfeuUA+RQPzKgJQHMuWAUnKqXw==} engines: {node: ^18.19.0 || >=20.6.0} peerDependencies: '@opentelemetry/api': ^1.3.0 - '@opentelemetry/exporter-zipkin@2.8.0': - resolution: {integrity: sha512-Mj84UkEa17BK2o903VTXW3wM8CrSZexGs4tRGVZVIMM9ni1T6TuGx5IrRfoWKAbshx42D5/kc7YV+axypLPYyA==} + '@opentelemetry/exporter-zipkin@2.10.0': + resolution: {integrity: sha512-7gsvgf0UDoJ4l9ObrwBmz5G/ZogiPk+lq+g5GpLp24YQF/vPM/BSsnOfcLnfinast5ASUgLo78uSC/ObjlnXgg==} engines: {node: ^18.19.0 || >=20.6.0} peerDependencies: '@opentelemetry/api': ^1.0.0 @@ -3995,62 +3840,62 @@ packages: peerDependencies: '@opentelemetry/api': ^1.3.0 - '@opentelemetry/instrumentation-http@0.219.0': - resolution: {integrity: sha512-nNt1fqpyah/OKjNHdEOu8xLwISppRU2qJuF8aR+fCcftVwdFkPgtworBLA+TI1HU2iF508jcQBF2gerWczJAXg==} + '@opentelemetry/instrumentation-http@0.221.0': + resolution: {integrity: sha512-oIP91CPIANuYr09tGFElPFKAh6JUar+awJf1kBRYlaeo9b0gDwZHEB2zBfFlvdNFHm0wAVutMZODVi5smKT30g==} engines: {node: ^18.19.0 || >=20.6.0} peerDependencies: '@opentelemetry/api': ^1.3.0 - '@opentelemetry/instrumentation-ioredis@0.67.0': - resolution: {integrity: sha512-dv64vQ4aXbJvRMMAFrMUSzDeJrNv/uQMLjfaav4LHAOar7Xn08W3pkoYoYEnzq/n2+fGgG96rp9S0gQ+VnLDiw==} + '@opentelemetry/instrumentation-ioredis@0.69.0': + resolution: {integrity: sha512-I9sZtxXWZ1tRXtRNTEVxpokGtXy6RL1SZhtPVh7zxH78t8ar71V5Dx4bnQiUjKTDzItpC73krD8c0/cEWA9oLg==} engines: {node: ^18.19.0 || >=20.6.0} peerDependencies: '@opentelemetry/api': ^1.3.0 - '@opentelemetry/instrumentation-nestjs-core@0.65.0': - resolution: {integrity: sha512-/q8fN2M2zGl+gQRaF79dzqvyvVqHAI11c7xAQZy9W1eAtQScNwaQtPm0EUo5+aOgakaTksBrsiHUF0rQS24NsQ==} + '@opentelemetry/instrumentation-nestjs-core@0.67.0': + resolution: {integrity: sha512-lXb7pjobd2i/9Gmihf9wrOM0MgnDYBxOJq7uWEhZOqULodNFLyPCRUnWxSIbPQdUzlU36QtHjuAeaEBUJnqXkA==} engines: {node: ^18.19.0 || >=20.6.0} peerDependencies: '@opentelemetry/api': ^1.3.0 - '@opentelemetry/instrumentation-pg@0.71.0': - resolution: {integrity: sha512-jAhfyZeOkEKh3cQ5nm1tNWqHg7HFARyAe+p4BSoDHnB79c1woyEvDKqS11Hj/DjtceP+vrurIfcDs7Fqiy11mQ==} + '@opentelemetry/instrumentation-pg@0.73.0': + resolution: {integrity: sha512-yf3tBVwLHB9cZNNPSToNrthx36ouPe4FctFxy7ya6vSJ6gaiKjNfA/IgFFeuBpZflEQhy6aesPqzZo8ZjFkvNg==} engines: {node: ^18.19.0 || >=20.6.0} peerDependencies: '@opentelemetry/api': ^1.3.0 - '@opentelemetry/instrumentation@0.219.0': - resolution: {integrity: sha512-X5t7I8GyIO9rmGHwoedZLREpQqrF1WW2nxzNNym6HOKpFiE+rvqV3ngC0xcZVO2YwIGf3KKmRdWrYwdwz3H9RQ==} + '@opentelemetry/instrumentation@0.221.0': + resolution: {integrity: sha512-cCk80Z/iRDf/5gfsKMB4f74LqVA5yKETB/9ojPzVW/6/f70iu89nJvGxsFCxx4XfSohaOofkU19kiYm84AiAlw==} engines: {node: ^18.19.0 || >=20.6.0} peerDependencies: '@opentelemetry/api': ^1.3.0 - '@opentelemetry/otlp-exporter-base@0.219.0': - resolution: {integrity: sha512-zvIxQX/AZUVKDU+hCuYx+7UkiP7GRdnk1ZbFQRYzHvYp47cAWR4j3IhoPhV9KaeXEv2xdGq3IA6PnpzDmLcmSA==} + '@opentelemetry/otlp-exporter-base@0.221.0': + resolution: {integrity: sha512-UFPIq80OH3Ns/oPFHRj14d4DTOxUo+MUFU8hUiCq5jTqFhdeJnfVSANHT+xp92409cA+oxzvlZCe6NM1wvCuBA==} engines: {node: ^18.19.0 || >=20.6.0} peerDependencies: '@opentelemetry/api': ^1.3.0 - '@opentelemetry/otlp-grpc-exporter-base@0.219.0': - resolution: {integrity: sha512-iIk/s8QQu39zpTrRRmsW/Eg3SE2+Hg8tLWepr2FLRgmwUpNd0IpCTLJEHJ77hpt4hgIS8MAh44UYI4xQPZwWlw==} + '@opentelemetry/otlp-grpc-exporter-base@0.221.0': + resolution: {integrity: sha512-rQDmNgyiGCTrescjnzH2ntVyUKVIq6I2UjuK8+stT/Xg0ZOT71FVJqwjFdspQl6Yol/Yqsut9bDo+ame8oTmDQ==} engines: {node: ^18.19.0 || >=20.6.0} peerDependencies: '@opentelemetry/api': ^1.3.0 - '@opentelemetry/otlp-transformer@0.219.0': - resolution: {integrity: sha512-aaYKAyXhw9VchKZVGOopD3Gw/kPsyrX2c6IQ0AW32mTjqmZOh5Y6Gf5OYqTNqVktAeBjmFinhyFaCwW6GYK9YQ==} + '@opentelemetry/otlp-transformer@0.221.0': + resolution: {integrity: sha512-lg6lkOU08Az23jVcn/0Els9HP+V8PnR4Km6p0KgpTggS0n/WuhnmY64rSh83Of9iR9nD+dpWr6adlcX8KzAwjg==} engines: {node: ^18.19.0 || >=20.6.0} peerDependencies: '@opentelemetry/api': ^1.3.0 - '@opentelemetry/propagator-b3@2.8.0': - resolution: {integrity: sha512-SazlvuSKi5533rPHTW2TwBwdMakhjZST4SYs0YauuvfGDkT13KbG1gJS75hV0uWVeevhtVP9sAIlaZLTHdSbMg==} + '@opentelemetry/propagator-b3@2.10.0': + resolution: {integrity: sha512-GnA5B24H+1w8BO21J0q+IWNB0z1v+AGbcquTdIt/dufibhnhgxaA8YKvz0I3akRZhB1jHT+/tlzK+qlAjEDybQ==} engines: {node: ^18.19.0 || >=20.6.0} peerDependencies: '@opentelemetry/api': '>=1.0.0 <1.10.0' - '@opentelemetry/propagator-jaeger@2.8.0': - resolution: {integrity: sha512-Xnz9zZvvQzUw+9DrOn0MomR7BxFCkA2pcfXBQuHC28ndJpSbjLs7knzYb05kw5SyCjSsEWombkZMgGcJSk8JVg==} + '@opentelemetry/propagator-jaeger@2.10.0': + resolution: {integrity: sha512-yw/IX8DL470dSMZJoE82ScfYGp7JWZ/G8kFJo35ZILUVTB2jFPTOaioN+8s09pH0RHsWNhweVZb+ZnjJJpCChg==} engines: {node: ^18.19.0 || >=20.6.0} peerDependencies: '@opentelemetry/api': '>=1.0.0 <1.10.0' @@ -4059,44 +3904,50 @@ packages: resolution: {integrity: sha512-VCghU1JYs/4gP6Gqf/xro9MEsZ7LrMv2uONVsaESKL38ZOB9BqnI98FfS23wjMnHlpuE+TTaWSoAVNpTwYXzjw==} engines: {node: ^18.19.0 || >=20.6.0} - '@opentelemetry/resources@2.8.0': - resolution: {integrity: sha512-qmXQ27ilDbUK/vGMqwL8D4/rhn76C+sherM4wTbjlfknR8Nvfc/hCxjRJPhkzZzUsPiNg16SA31NxMabwttRjg==} + '@opentelemetry/resources@2.10.0': + resolution: {integrity: sha512-q6MMm2zhggzsHVNbabYwut+a6nbuQQe3URUoxaojM/8K1IBfwwPzvxIjNi2/lI1TFe+fMHMW9MWhrtDLEXEnkA==} engines: {node: ^18.19.0 || >=20.6.0} peerDependencies: '@opentelemetry/api': '>=1.3.0 <1.10.0' - '@opentelemetry/sdk-logs@0.219.0': - resolution: {integrity: sha512-s6lTKRakaPClvKoWHRChxnXjDMkM/TQ30ff78jN6EBGf7MI7VzANE5PU3f4z9qDUudWjvZjOLHG0rBnBKYvoXA==} + '@opentelemetry/sdk-logs@0.221.0': + resolution: {integrity: sha512-FaDcazjyMp7TZZZAsqbo4IkovP0UegoCu0EBkiNt+qCqvUf7FPAsfcrZ3+ZEkKgXZ/jHafop+JoGPDk3A0SmLg==} engines: {node: ^18.19.0 || >=20.6.0} peerDependencies: '@opentelemetry/api': '>=1.4.0 <1.10.0' - '@opentelemetry/sdk-metrics@2.8.0': - resolution: {integrity: sha512-UDBGaj6W0Rgy5rTTaoxs8gVGF/aGkAKyjurJv7se6wjRxJu7FoquTLT/vt54DZfo4crbprYfhX/SOK9+BPw1qg==} + '@opentelemetry/sdk-metrics@2.10.0': + resolution: {integrity: sha512-t6r1VSvXNtSDnPXU1FbZeetJb7yyovHmgu0wRSoftxtE0g2rSNhQZQUy69sRUCL+iioJpX8SN/S6wq6ZtvLySQ==} engines: {node: ^18.19.0 || >=20.6.0} peerDependencies: '@opentelemetry/api': '>=1.9.0 <1.10.0' - '@opentelemetry/sdk-node@0.219.0': - resolution: {integrity: sha512-NWLpWLEb8gV3+JBHYoIrktbM385wyHpRJoh3J/4Q52d4PR+AlPMNGJT3DzBUrDSUEVbKAXoHR+EDAPxtiNcj8g==} + '@opentelemetry/sdk-node@0.221.0': + resolution: {integrity: sha512-UbYuvtBrQQB5Prsh9KOKy4kxzexFxfMs5MkteHeWMoswsEB7kiNhyUVkAOFW/qsEzNHtrkgyghrD2ilZJa+5YA==} engines: {node: ^18.19.0 || >=20.6.0} peerDependencies: '@opentelemetry/api': '>=1.3.0 <1.10.0' - '@opentelemetry/sdk-trace-base@2.8.0': - resolution: {integrity: sha512-mhU4jp+vW0mGbFRd+GeXHvmfA4aDqWjBjLC3pE5XMpLs0IE2ryYb019Ts2AQrOq67gaTF25D91+fgvEHDZEnuQ==} + '@opentelemetry/sdk-trace-base@2.10.0': + resolution: {integrity: sha512-GuYQQT7QD2EeO8lcZLRQzcbOyhqAzL+6WWTKTU9mSUBYBazkEDl+VrQcXQhbB08OWM9anD1aHleVadzulpOaUQ==} engines: {node: ^18.19.0 || >=20.6.0} peerDependencies: '@opentelemetry/api': '>=1.3.0 <1.10.0' - '@opentelemetry/sdk-trace-node@2.8.0': - resolution: {integrity: sha512-nZt9OGufioAc3AfoLTqA9bsAeaMJAictYDdI2VcNQ+PmT+3rfKjAZDZvgPfd8VPX0O5Bw1hdQF6kDK8VSpZiWg==} + '@opentelemetry/sdk-trace-node@2.10.0': + resolution: {integrity: sha512-GZK/G6oZyBLGlH1pUgeDch7D91KoHd2uotUGIkWCPi9GI5T9X0p4L7nNAMDR1BQjkRYoDqo+ddfVx9t5Uhys+Q==} engines: {node: ^18.19.0 || >=20.6.0} peerDependencies: '@opentelemetry/api': '>=1.0.0 <1.10.0' - '@opentelemetry/semantic-conventions@1.41.1': - resolution: {integrity: sha512-/UhIkaZgPutTFmQ7RnIJGgDXZmtEJ7Dvi86xNTFWcnRxVRNk/aotsqDJYeEvDP+FSMB2SdW+pQzNMcWP0rwuNA==} + '@opentelemetry/sdk-trace@2.10.0': + resolution: {integrity: sha512-MfQGq3GRmTh5fM/y+OjaO0vj6+luCB1XO2gfXCalKCfgKw0eHL++sm75DNweC6ohlp+aFvACqeE0fYayqdRaoQ==} + engines: {node: ^18.19.0 || >=20.6.0} + peerDependencies: + '@opentelemetry/api': '>=1.3.0 <1.10.0' + + '@opentelemetry/semantic-conventions@1.43.0': + resolution: {integrity: sha512-eSYWTm620tTk45EKSedaUL8MFYI8hW164hIXsgIHyxu3VobUB3fFCu5t0hQby6OoWRPsG1KkKUG2M5UadiLiVg==} engines: {node: '>=14'} '@opentelemetry/sql-common@0.42.0': @@ -4105,8 +3956,8 @@ packages: peerDependencies: '@opentelemetry/api': ^1.1.0 - '@oxc-project/types@0.133.0': - resolution: {integrity: sha512-KzkdCd6Uxqnf6l3HOw1xfatAlUURA0g14cvBYFyJ5SaNOQbOUvBr9PKArcPcrNIeRsBdgcUzOGrhKveVpvOIGA==} + '@oxc-project/types@0.143.0': + resolution: {integrity: sha512-u6JZdLBTLotrNC9Vd6vPssINdzcCzleKAH6EJKImQb7GtYvX5keN2dxkoK44stCc4tffE6QQRtZTXVSzsLUlWA==} '@paralleldrive/cuid2@2.3.1': resolution: {integrity: sha512-XO7cAxhnTZl0Yggq6jOgjiOHhbgcO4NqFqwSmQpjK3b6TEE6Uj/jfSk6wzYyemh3+I0sHirKSetjQwn5cZktFw==} @@ -4236,35 +4087,35 @@ packages: resolution: {integrity: sha512-C2Xj8FZ0uHWeCXXqX5B4/gVFQmtSkiuOolzAgutjTfseNOHT3pUjljDZsTSxXFGgio54bCzVFqmEOUrIVk8RDA==} engines: {node: '>=20.0.0'} - '@photo-sphere-viewer/core@5.14.1': - resolution: {integrity: sha512-qrwUudrX9YZms4c2shlY/H3jUP0oh9FyGEqIDr/95ulNZgKbhQ6C/i8zDQ4j8ooFR4+z5FDORQtGvLgPyX8VCA==} + '@photo-sphere-viewer/core@5.15.1': + resolution: {integrity: sha512-nhJviczUB1xiAT/I7mGba9iDIw7DvsiK34hbR9t7kIrg9MySG33uA+a4QUk2dEOP5PjcKMj58wod8I/dQ7ePiw==} - '@photo-sphere-viewer/equirectangular-video-adapter@5.14.1': - resolution: {integrity: sha512-rZ6igEy1TEfgHB8Ak/8N0rZNYQLbNEGLVmhwNxDMWESCJ9nrNx3tJHFn7k6eZYjj9zJA73xF5YdY6XWUCpZDzg==} + '@photo-sphere-viewer/equirectangular-video-adapter@5.15.1': + resolution: {integrity: sha512-510h1cDBAe+qoHVrR5IwUE/jnmzz0lA9mXHN7yzJDsrixPRh67gXEB3KIEc2Cgj/B1u1D2WK2W7OwhkQ40AX0A==} peerDependencies: - '@photo-sphere-viewer/core': 5.14.1 - '@photo-sphere-viewer/video-plugin': 5.14.1 + '@photo-sphere-viewer/core': 5.15.1 + '@photo-sphere-viewer/video-plugin': 5.15.1 - '@photo-sphere-viewer/markers-plugin@5.14.1': - resolution: {integrity: sha512-tKMrVem19sZFVQwH6IlubEIucDD2EtwxzmWClHCEojM/+ajucuTDvO2N+I6HEqJClBcNsdHAUwA/zyY6MGOu2Q==} + '@photo-sphere-viewer/markers-plugin@5.15.1': + resolution: {integrity: sha512-57WiHy8fcQfwid9x07ADiQJGxzcFxclbR2yIqeggzfPDguwJlCKwX5tj8brTRqwouUiHpkb80QWxHByxt45LcA==} peerDependencies: - '@photo-sphere-viewer/core': 5.14.1 + '@photo-sphere-viewer/core': 5.15.1 - '@photo-sphere-viewer/resolution-plugin@5.14.1': - resolution: {integrity: sha512-OiNie5psqEFSQYCSe8wIlE8slnoh2Lk7oBGEQxJXtj/j08J5E5xg46uTmKgN+lWxQd0+LM3pgY7U7tTUqeH6ZQ==} + '@photo-sphere-viewer/resolution-plugin@5.15.1': + resolution: {integrity: sha512-Sp14tgFv1XRkXbsFO+dWSgfwGjxB4ibsB+wXe64M4RI/NSDu+1Uzqtxj85Vbz7gOw3CaP1e8acXrd/IEg6CEHg==} peerDependencies: - '@photo-sphere-viewer/core': 5.14.1 - '@photo-sphere-viewer/settings-plugin': 5.14.1 + '@photo-sphere-viewer/core': 5.15.1 + '@photo-sphere-viewer/settings-plugin': 5.15.1 - '@photo-sphere-viewer/settings-plugin@5.14.1': - resolution: {integrity: sha512-urVNMe/E+uffoe1Z8oMIt0e/6Wpf5mTnSJVJ65405trQKEGAIqJ57FlpxVp4UKPulstwpa1fRw5u1C1lzdanJA==} + '@photo-sphere-viewer/settings-plugin@5.15.1': + resolution: {integrity: sha512-0FkCUUEsdTa4iLZu9nVLsjuh459hKKZeh+JiXfPzfrGLcLODLUwJugDjFHe/4KH7mmW9n7KbSUWBD8POvkUqqA==} peerDependencies: - '@photo-sphere-viewer/core': 5.14.1 + '@photo-sphere-viewer/core': 5.15.1 - '@photo-sphere-viewer/video-plugin@5.14.1': - resolution: {integrity: sha512-7yItXiD+eS/+9lgtaE9+wXSIpdYVU0kBsBN4vNtChaoJZF3JB8WUXjYLbszKp1yhwsvZ6eNxDcMBUgYdK6CrQA==} + '@photo-sphere-viewer/video-plugin@5.15.1': + resolution: {integrity: sha512-jrZh2BGZA8BGzNj+gzDntfX8bd4kt0vIBsyAslSgPpkJUTRKxZ2nTIp2aP1OQ4EtpP3g4kbqrIAe6Avdn6pr0A==} peerDependencies: - '@photo-sphere-viewer/core': 5.14.1 + '@photo-sphere-viewer/core': 5.15.1 '@photostructure/tz-lookup@11.5.0': resolution: {integrity: sha512-0DVFriinZ7TeOnm9ytXeSL3NMFU87ZqMjgbPNkd8LgHFLcPg1BDyM1eewFYs+pPM+62S4fSP9Mtgijmn+6y95w==} @@ -4277,9 +4128,9 @@ packages: resolution: {integrity: sha512-SEeaJLb3qBNF/OaXnaR1NmmBbFYk1zC0ZH/52fATcRPLFg/p791YrcyFFy44Bo9sLaGuSuLp5Q6axbb/O+v/RA==} engines: {node: ^14.18.0 || >=16.0.0} - '@playwright/test@1.60.0': - resolution: {integrity: sha512-O71yZIbAh/PxDMNGns37GHBIfrVkEVyn+AXyIa5dOTfb4/xNvRWV+Vv/NMbNCtODB/pO7vLlF2OTmMVLhmr7Ag==} - engines: {node: '>=18'} + '@playwright/test@1.62.1': + resolution: {integrity: sha512-DTcUc8qii+cpHvtOwggMtBRMjKZHXYWdw8syRYu2vtzuq4Wxphqq4NfCs5Zt44L6mA8rfDfj+PHnxFc/FeK6mQ==} + engines: {node: '>=20'} hasBin: true '@pnpm/config.env-replace@1.1.0': @@ -4321,8 +4172,8 @@ packages: '@protobufjs/pool@1.1.0': resolution: {integrity: sha512-0kELaGSIDBKvcgS4zkjz1PeddatrjYcmMWOlAuAPwAeccUrPHdUqo/J6LiymHHEiJT5NrF1UVwxY14f+fy4WQw==} - '@protobufjs/utf8@1.1.1': - resolution: {integrity: sha512-oOAWABowe8EAbMyWKM0tYDKi8Yaox52D+HWZhAIJqQXbqe0xI/GV7FhLWqlEKreMkfDjshR5FKgi3mnle0h6Eg==} + '@protobufjs/utf8@1.1.2': + resolution: {integrity: sha512-b1UQwcEZ4yCnMCD8DAL1VlbvBJE9/IX4FTIp7BG1xYpf29SLazLSrqUkj4w7Y5y7cCVP6E5tcqqcI0xemPkHug==} '@react-email/body@0.3.0': resolution: {integrity: sha512-uGo0BOOzjbMUo3lu+BIDWayvn5o6Xyfmnlla5VGf05n8gHMvO1ll7U4FtzWe3hxMLwt53pmc4iE0M+B5slG+Ug==} @@ -4443,8 +4294,8 @@ packages: react: ^18.0 || ^19.0 || ^19.0.0-rc react-dom: ^18.0 || ^19.0 || ^19.0.0-rc - '@react-email/render@2.0.8': - resolution: {integrity: sha512-5udvVr3U/WuGJZfLdLBOhkzrqRWd2Q5ZYmF7ppcy7FzWcwgshdqLMNqJOXcVzAXJXg/2bm7D+WGJzTtZOZMQnQ==} + '@react-email/render@2.1.0': + resolution: {integrity: sha512-F+zE3O6d6sW6Aj2UjvZAA17R7tJKM7kcq2mgV6k4HCT8jeLLFaVP2txMtH1lgqYFRMZ0Gxsd37q2PRyiXLXXxA==} engines: {node: '>=20.0.0'} peerDependencies: react: ^18.0 || ^19.0 || ^19.0.0-rc @@ -4517,97 +4368,92 @@ packages: '@codemirror/state': ^6.0.0 '@codemirror/view': ^6.0.0 - '@rolldown/binding-android-arm64@1.0.3': - resolution: {integrity: sha512-454rs7jHngixp/NMxd5srYD57OnzSlZ/eFTETjORQHLwJG1lRtmNOJcBerZlfu4GjKqeq8aCCIQrMdHyhI51Hw==} + '@rolldown/binding-android-arm64@1.2.3': + resolution: {integrity: sha512-zrJtHDcaZJ1Fp7xf4hNl+7seH9Cn/N5TwLYkhgXREtBwAd/jaqW3uqeHxpDugJLVICWg4eW44kOQEGJ1r6jCGw==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm64] os: [android] - '@rolldown/binding-darwin-arm64@1.0.3': - resolution: {integrity: sha512-PcAhP+ynjURNyy8SKGl5DQP94aGuB/7JrXJb/t7P+hanXvQVMWzUvRRhBAcg/lNRadBhoUPqSoP4xw5tR/KBEA==} + '@rolldown/binding-darwin-arm64@1.2.3': + resolution: {integrity: sha512-ieIiibVCp0tX7TLu2cafoNPv8wJyYi01ekXpbf8q2j7F4rGAhhXb/eQh7ge9DRBY78GwmRQtvjZDux7EDbA8kA==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm64] os: [darwin] - '@rolldown/binding-darwin-x64@1.0.3': - resolution: {integrity: sha512-9YpfeUvSE2RS7wysJ81uOZkXJz7f7Q55H2Gvp3VEw/EsahqDtrphrZ0EwDLK5vvKOzaCrBsjF8JmnMLcUt78Gg==} + '@rolldown/binding-darwin-x64@1.2.3': + resolution: {integrity: sha512-Zh9tCon19eDXJoihx0rqKhMUlMYqzwj3aPsSuHmI4RWZh62dWUL+DJN4C5YQya5TcQBJU/Fe8+rY0jhXTQITqA==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [x64] os: [darwin] - '@rolldown/binding-freebsd-x64@1.0.3': - resolution: {integrity: sha512-yB1IlAsSNHncV6SCTL27/MVGR5htvQsoGxIv5KMGXALp+Ll1wYsn+x98M9MW7qa+NdSbvrrY7ANI4wLJ0n1e6g==} + '@rolldown/binding-freebsd-x64@1.2.3': + resolution: {integrity: sha512-nGbJWewA1wrXXZiQhjAT5rhibGfns5ZNkDVqxsO6zJ3f3YvpoDNNmGMSbbhLuXKjNScaBJVOAboztAWVespQMg==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [x64] os: [freebsd] - '@rolldown/binding-linux-arm-gnueabihf@1.0.3': - resolution: {integrity: sha512-Yi30IVAAfLUCy2MseFjbB1jAMDl1VMCAas5StnYp8da9+CKvMd2H2cbEjWcw5NPaPqzvYkVIaF1nNUG+b7u/sw==} + '@rolldown/binding-linux-arm-gnueabihf@1.2.3': + resolution: {integrity: sha512-QNniJr5Kml0kDEB98jiDOJjXNroxIIi0IXIbdYzY26Xt1pVbeP62+KnoIZLwirOymX/0jDk/2gI/bNUv7A7OIw==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm] os: [linux] - '@rolldown/binding-linux-arm64-gnu@1.0.3': - resolution: {integrity: sha512-jsO7R8To+AdlYgUmN5sHSCZbfhtMBkO0WUx8iORQnPcMMdgr7qM2DQmMwgabs3GhNztdmoKkMKQFHD6DTMCIQw==} + '@rolldown/binding-linux-arm64-gnu@1.2.3': + resolution: {integrity: sha512-TkqEAcmmvH3I/q4114NB4RVt6241Dao48pF45uLcFGrwAaIn0iITgTAKP/dLjbN0R4buJjGb91+UHSoFmpgIWw==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm64] os: [linux] libc: [glibc] - '@rolldown/binding-linux-arm64-musl@1.0.3': - resolution: {integrity: sha512-VWkUHwWriDciit80wleYwKILoR/KMvxh/IdwS/paX+ZgpuRpCrKLUdadJbc0NpBEiyhpYawsJ73j9aCvOH+f7Q==} + '@rolldown/binding-linux-arm64-musl@1.2.3': + resolution: {integrity: sha512-NHqjnxpsndf4MPymxteFAWHHfkTL8HjWh1KB7z23ofZ6QO2euONuxDXjat69dKZRALnGypg8k8SsK8vZJoXv1Q==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm64] os: [linux] libc: [musl] - '@rolldown/binding-linux-ppc64-gnu@1.0.3': - resolution: {integrity: sha512-5f1laC0SlIR0yDbFCd8acUhvJIag6N3zC5P7oUPN6wX0aOma+uKJ0wBDH5aq7I1PVI2ttTlhJwzwRIBnLiSGEg==} + '@rolldown/binding-linux-ppc64-gnu@1.2.3': + resolution: {integrity: sha512-6tbrbwfz5GB9DQ4Jwo6hy9v+vR31xZlvzZ6n5Xut6Hhx5PvrA9q/HsK8KMaYQp063iqZGXwNvZtYNLD7EM/x0w==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [ppc64] os: [linux] libc: [glibc] - '@rolldown/binding-linux-s390x-gnu@1.0.3': - resolution: {integrity: sha512-Iq4ko0r4XsgbrF/LunNgHtAGLRRVE2kXonAXQ/MV0mC6jQpMOhW1SvtZja2EhC/kd05++bP78dsqBeIQyYJ6Yg==} + '@rolldown/binding-linux-s390x-gnu@1.2.3': + resolution: {integrity: sha512-oyuXxXmoZHjXC917IAPFAAv4wWAa0cM9afk8nx1+9/jNNOX1uPf8yDA6p7G0RypOfw/X0PQt5IfoquY1um+zSg==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [s390x] os: [linux] libc: [glibc] - '@rolldown/binding-linux-x64-gnu@1.0.3': - resolution: {integrity: sha512-B8m6tD5+/N5FeNQFbKlLA/2yVq9ycQP1SeedyEYYKWBNR3ZQbkvIUcNnDNM03lO1l5F2roiiFJGgvoLLyZXtSg==} + '@rolldown/binding-linux-x64-gnu@1.2.3': + resolution: {integrity: sha512-TytMwF2KVGqP2tgd0I1OY0PAv78dZRAYcF5ssDzjM34SUXCED3uXvSd5+lHoC0bTD6eEdFz7LdQNCO1y0oVk9w==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [x64] os: [linux] libc: [glibc] - '@rolldown/binding-linux-x64-musl@1.0.3': - resolution: {integrity: sha512-pSdpdUJHkuCxun9LE7jvgUB9qsRgaiyNNCX7m/AvHTcq67AiT/Yhoxvw5zPfhrM8k/BfP8ce/hMOpthKDpEUow==} + '@rolldown/binding-linux-x64-musl@1.2.3': + resolution: {integrity: sha512-/E9m3qstrJFVPoULV25mVQblSNExY2+kBsYe4sy0Tn0yOOgJ8wZbZt3KnRbF/XeU2Gl1STKUQnDNTqhIE5MD4A==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [x64] os: [linux] libc: [musl] - '@rolldown/binding-openharmony-arm64@1.0.3': - resolution: {integrity: sha512-OXXS3RKJgX2uLwM+gYyuH5omcH8fL1LJs96pZGgtetVCahON57+d4SJHzTgZiOjxgGkSnpXpOsWuPDGAKAigEg==} + '@rolldown/binding-openharmony-arm64@1.2.3': + resolution: {integrity: sha512-Kr0OcsoQI816i6HOl3vFHpd1K0eZyh76zgfj4c1nTyaTsd5r2Mj1lwM4R90y/qaCfmTn9eHy0SKwi98eitRxug==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm64] os: [openharmony] - '@rolldown/binding-wasm32-wasi@1.0.3': - resolution: {integrity: sha512-JTtb8BWFynicNSoPrehsCzBtOKjZ6jhMiPFEmOiuXg1Fl8dn2KHQob+GuPSGR0dryQa1PQJbzjF3dqO/whhjLg==} - engines: {node: ^20.19.0 || >=22.12.0} - cpu: [wasm32] - - '@rolldown/binding-win32-arm64-msvc@1.0.3': - resolution: {integrity: sha512-gEdFFEN70A/jxb2svrWsN3aDL7OUtmvlOy+6fa2jxG8K0wQ1ZbdeLGnidov6Yu5/733dI5ySfzFlQ/cb0bSz1g==} + '@rolldown/binding-win32-arm64-msvc@1.2.3': + resolution: {integrity: sha512-hOtMwTqnME+/gJcH/PCZ0wn0zPUjiWOgkHpxbSJpfGKMezHltx1S7/k1SitzVa7Ww2cqrDDaFbZEhcJZO8o+Jw==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm64] os: [win32] - '@rolldown/binding-win32-x64-msvc@1.0.3': - resolution: {integrity: sha512-eXB7CHuaQdqmJcc3koCNtNPmT/bj2gc999kUFgBxG8Ac0NdgXc4rkCHhqrgrhN3zddvvvrgzj1e90SuSfmyIXA==} + '@rolldown/binding-win32-x64-msvc@1.2.3': + resolution: {integrity: sha512-ekcqMMkI2PlhYnfzQnB/cEdYUVVJViWvoUyLrbzgDoi3Snfc1mVBwdnc306ufA5ejy8JSPjT2RlW1nQSjW7efg==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [x64] os: [win32] @@ -4812,8 +4658,8 @@ packages: '@standard-schema/spec@1.1.0': resolution: {integrity: sha512-l2aFy5jALhniG5HgqrD6jXLi/rUWrKvqN/qJx6yoJsgKhblVd+iqqU4RCXavm/jPityDo5TCvKMnpjKnOriy0w==} - '@sveltejs/acorn-typescript@1.0.10': - resolution: {integrity: sha512-4WfKk68eTih+MiJD4fSbxN7E8kVBmTMPWHUPYjvl2N0rMs53YLTT8/YjKU5Dtnz5LqDjl7LEw4U7lXR2W3J5WA==} + '@sveltejs/acorn-typescript@1.0.12': + resolution: {integrity: sha512-J1jNYG23QWd67UfrQSFHtjhV37r9mVi0gdc12A3MWPldOjRK35Xk+um+qACPVjgw3AleiqoyEAhok8Wm3q46NA==} peerDependencies: acorn: ^8.9.0 @@ -4822,15 +4668,15 @@ packages: peerDependencies: '@sveltejs/kit': ^2.0.0 - '@sveltejs/enhanced-img@0.10.4': - resolution: {integrity: sha512-Am5nmAKUo7Nboqq7Dhtfn7dcXA087d7gIz6Vecn1opB41aJ680+0q9U9KvEcMgduOyeiwckTIOQOx4Mmq9GcvA==} + '@sveltejs/enhanced-img@0.11.0': + resolution: {integrity: sha512-TN7VzGoqwFqvA4Faj1brUPHLtcEkyFa08nrn9bfm98yVrzr0g4bOZHjlBoPYHHX+sZNGE+cxznhTVgarECPQsA==} peerDependencies: '@sveltejs/vite-plugin-svelte': ^6.0.0 || ^7.0.0 svelte: ^5.0.0 vite: ^6.3.0 || >=7.0.0 - '@sveltejs/kit@2.65.1': - resolution: {integrity: sha512-Sa1rFYYqBB+zv3rIxAg/CsFskR/x4aj5BY/hvLxBd9r/mqbipxM945As1K3PqsDicJAyekPR0BlWoVIiw2OHYg==} + '@sveltejs/kit@2.70.2': + resolution: {integrity: sha512-RzRoRpuR2KXqc5yMO0akQHDZeT4AslOlznGITURsqHaVbtyYP4Wn3eE3gxj9JcDyNYO0crkxhdwFHc+2vkVm6w==} engines: {node: '>=18.13'} hasBin: true peerDependencies: @@ -4845,12 +4691,12 @@ packages: typescript: optional: true - '@sveltejs/load-config@0.1.1': - resolution: {integrity: sha512-BXXm+VOH/9X4N7Dd1iZ2MqA1h7M+9i2noI8QYuLDY8QcN2WHYn7D/VK/+IJNfcAmRw7ACNJ538UT9GXIhnBTiA==} + '@sveltejs/load-config@0.2.2': + resolution: {integrity: sha512-K7dsJDQxBOF+f+epuhMactcjK2VP4MRkLKtwSykNtEI+cKVEyzrmmhQ1pmoxI800m4JKcyJ05L2M4yPwAGiBNw==} engines: {node: '>= 18.0.0'} - '@sveltejs/vite-plugin-svelte@7.1.2': - resolution: {integrity: sha512-DrUBA2UXRfDmUX/ZTiEopd3X40yavsJF1FX2RygcuIScHL7o5YX1fMvoYnDhjeJQC4weCOklirpNWlcb2NiSeA==} + '@sveltejs/vite-plugin-svelte@7.2.0': + resolution: {integrity: sha512-1SpkuMSRLfugrVX+IrKfE1RUegzo8AQzKQ6qQPfVzbcWi5IhuTPaKb5ZrLpucleFznkc4/RTeSPoRnGWFxX+EQ==} engines: {node: ^20.19 || ^22.12 || >=24} peerDependencies: svelte: ^5.46.4 @@ -4934,86 +4780,86 @@ packages: resolution: {integrity: sha512-LnhVjMWyMQV9ZmeEy26maJk+8HTIbd59cH4F2MJ439k9DqejRisfFNGAPvRYlKETuh9LrImlS8aKsBgKjMA8WA==} engines: {node: '>=14'} - '@swc/core-darwin-arm64@1.15.41': - resolution: {integrity: sha512-kREh6J5paQFvP3i7f/4FbqRNOJREutVFVOkder4GVyCBQ39YmER55cW/y1NNjwrchzFqgYswFn0mMDCqbqKzrw==} + '@swc/core-darwin-arm64@1.15.47': + resolution: {integrity: sha512-GsoMtan3ojGGMGFbl31mmRu5ctZ56re8grGE8mO/OHJ8O+JRkzod02fe7X6ZQ8JvamA3imkEkx/h3u+vsOgPgA==} engines: {node: '>=10'} cpu: [arm64] os: [darwin] - '@swc/core-darwin-x64@1.15.41': - resolution: {integrity: sha512-N8B56ESFazZAWZyIkecADSPCwlLEinW7QLMEeotCpv4J7VXwfH+OLkmRL8o96UZ+1355fwHxDTS6/wK7yucvkA==} + '@swc/core-darwin-x64@1.15.47': + resolution: {integrity: sha512-leTi7Rx3KF4zcC637iqWgk9SoV8VXAD8ppQYXsep63px5A/UftOcxLN1pmr8Z1si/YvX90ompP/rHgpYkgwXWg==} engines: {node: '>=10'} cpu: [x64] os: [darwin] - '@swc/core-linux-arm-gnueabihf@1.15.41': - resolution: {integrity: sha512-6XrId2fyle0mS5xxON8rU84mPd2Cq1kDJRj+4BnQKTd7u+2kSA6Ww+JkOP0iTNqOqt9OXhPOEAjBHAuonWcdCg==} + '@swc/core-linux-arm-gnueabihf@1.15.47': + resolution: {integrity: sha512-hBqHuoWKKIsKmDBn9qVeWqj5GWZhtlcczVaqQmNRXsDfq+voR5CxKRfamA367QjJXtceYuliLFfEL8QsskRM2g==} engines: {node: '>=10'} cpu: [arm] os: [linux] - '@swc/core-linux-arm64-gnu@1.15.41': - resolution: {integrity: sha512-ynLIarxlkVnqHn1D0fKOVht6mNU5ks6lrH+MY3kkS+XFaGGgDxFZVjWKJlkYTKm3RCvBTfA8Ng5fLufXheMRKQ==} + '@swc/core-linux-arm64-gnu@1.15.47': + resolution: {integrity: sha512-TBxvRz+B4K205TWHHZxWVxkC2RFNP/Mz3PNcECBos5PsKwxjg3QSJzdoebr0VCf0Bfh8HOPldKxAP/8XkFe9gA==} engines: {node: '>=10'} cpu: [arm64] os: [linux] libc: [glibc] - '@swc/core-linux-arm64-musl@1.15.41': - resolution: {integrity: sha512-dXu/5vd4gh8symyhRF+4G7gOPkjmb4pONhh7sl+6GSiW0LOKZlfu5kXmyFbTz9smOT7jgr002qY9b1nujjXt2A==} + '@swc/core-linux-arm64-musl@1.15.47': + resolution: {integrity: sha512-3Yu3Uq/VgytqsPjTMbkPU1ExADytbdWbruJYhA584E9jrpE2Ki+R6VVPoZCeAVk1Cb7QxcRTgblw6bSa6a/R+w==} engines: {node: '>=10'} cpu: [arm64] os: [linux] libc: [musl] - '@swc/core-linux-ppc64-gnu@1.15.41': - resolution: {integrity: sha512-XGO6zVPXoPE0gf/XnI4jBbafNT13AYgoh6ns0JCSdOetI/kqVf0vhpz7NuNgAzZrMVCsmieqjPoTwViDgh4mOQ==} + '@swc/core-linux-ppc64-gnu@1.15.47': + resolution: {integrity: sha512-wfdMi5IaOaNtmh2/6geRoxIdNfqylUZFdtzTKS655y1axWfIWyx7As74vv0wVdjeCIZ3WmCI9odDd4rUttXOSQ==} engines: {node: '>=10'} cpu: [ppc64] os: [linux] libc: [glibc] - '@swc/core-linux-s390x-gnu@1.15.41': - resolution: {integrity: sha512-0WUglRwyZtW+iMi7J3iFdrCxreZZIKf4egTwEQfIYRsqFax69A0OrFj+NIoFSE03xBT/IFRrg+S8K6f9Ky+4hA==} + '@swc/core-linux-s390x-gnu@1.15.47': + resolution: {integrity: sha512-3hHYBY0yx8Ez7GMRrkhXHQzMdR5IZA6Wq5Ee4svlgwvSECLpnAJ9+0AimEGUFDvuLwE7nV/2+PYe8+Nm4rvNcQ==} engines: {node: '>=10'} cpu: [s390x] os: [linux] libc: [glibc] - '@swc/core-linux-x64-gnu@1.15.41': - resolution: {integrity: sha512-VxkuQK59c0tHm6uJZCUrS3cyA2JhGGfdU6e41SZz0x/JS+4Sm7C1mIc97In14vkZJopEt7yXA2TouCqZDSygEA==} + '@swc/core-linux-x64-gnu@1.15.47': + resolution: {integrity: sha512-TjfhjgP/jGCfFHYC3JQPhJA1HwErbIJ9JfREDc1KNkvY6P0LodCgKVIlQ5deeTbkG7ih3bF5PHJLuLpaZjdRyQ==} engines: {node: '>=10'} cpu: [x64] os: [linux] libc: [glibc] - '@swc/core-linux-x64-musl@1.15.41': - resolution: {integrity: sha512-/0qXIu1ZxggLuovLb22vFfKHq2AA4n6Whw5UwmVCHk4pkw7KWnPIQpMCEqUMPsNkFJig7PPp/TSYFu8ZEb2rtQ==} + '@swc/core-linux-x64-musl@1.15.47': + resolution: {integrity: sha512-CQpS8Ge/avfjZd0UEwG/sds83Uu32deQXcV1Jo3jD0mmvQQqtYAjpsDZXugmheeAwmt+YIuoVtVHro8LMYHqsQ==} engines: {node: '>=10'} cpu: [x64] os: [linux] libc: [musl] - '@swc/core-win32-arm64-msvc@1.15.41': - resolution: {integrity: sha512-Y481sMNZM6rECh9VO4+y26N1lWEDAyxnBZskUf37fl90uHE946VHfmiVQWT0uMFOhyJJFovGTRuF4W82dwewUg==} + '@swc/core-win32-arm64-msvc@1.15.47': + resolution: {integrity: sha512-0W8IKHsUTYiT7G2RqtOoVWk+89yzZikIiDUb/sCK6BmQDBhN91hQSfyUtW12jhEWLzYgcfmisfsZrmZE+84U1A==} engines: {node: '>=10'} cpu: [arm64] os: [win32] - '@swc/core-win32-ia32-msvc@1.15.41': - resolution: {integrity: sha512-BAchBD5qeUzy3hiPSLJtaaoSm4blCLyYffOF1bGE4ETcV+OisqjUAwDQMJj++4bTpvMCDzwC+Bj3PmQyBCtscw==} + '@swc/core-win32-ia32-msvc@1.15.47': + resolution: {integrity: sha512-ZIp49d2Z4/ka2jO9otOg4hDvTdPmp86kVOgS2M5FCPI7eKKZ1W0boxWn+8XeZrfERtFGW0AlMRm4JhlJa7l3NA==} engines: {node: '>=10'} cpu: [ia32] os: [win32] - '@swc/core-win32-x64-msvc@1.15.41': - resolution: {integrity: sha512-WOkA+fJ/ViVBQDsSV9JC52NACTe5PhlurA6viASDZGb7HR3KS01ZG7RZ+Bg6SVQFIoq3gSbTsskQVe6EbHFAYw==} + '@swc/core-win32-x64-msvc@1.15.47': + resolution: {integrity: sha512-2h8Iek95vnixkBRCo+H8p09+Q5ll2NgSMFrWTy0iKt7+/t+8/T5mBpiT6c0ZxSS7wcWjwZ9sGZkK70tTSYHdDw==} engines: {node: '>=10'} cpu: [x64] os: [win32] - '@swc/core@1.15.41': - resolution: {integrity: sha512-03nQq/082QRJJiOvp3FGbgxTGyyxMxohPTjhk/W9bD2J0tk4ukITI7goOhOO2WbaHn/lsPmo/zf8+DIXhwpgYQ==} + '@swc/core@1.15.47': + resolution: {integrity: sha512-FbsO5JcfOjfH38W/rohBRBweJeERsAuIP4f377lmkmxTcq9exjtx4SkRuZY5CdfhR2CBVwDIJegBpJDffwNsOg==} engines: {node: '>=10'} peerDependencies: '@swc/helpers': '>=0.5.17' @@ -5027,76 +4873,76 @@ packages: '@swc/helpers@0.5.23': resolution: {integrity: sha512-5lSsMOTXURePglDfvuAQUqkGek9Hg2kksOYay2m0+XR++b2NWYL/4sWyuvVBIs8oKnJaxkdi9whaL/sqN13afw==} - '@swc/types@0.1.26': - resolution: {integrity: sha512-lyMwd7WGgG79RS7EERZV3T8wMdmPq3xwyg+1nmAM64kIhx5yl+juO2PYIHb7vTiPgPCj8LYjsNV2T5wiQHUEaw==} + '@swc/types@0.1.27': + resolution: {integrity: sha512-K6h3iUlqeM946U4sXFYeahefR1YBbXJvko+hv8WS8/0BNJ4OHiHRywMnQUJCqkR7Y9+hqQ1TvEpiKqUhz7NEFg==} '@szmarczak/http-timer@5.0.1': resolution: {integrity: sha512-+PmQX0PiAYPMeVYe237LJAYvOMYW1j2rH5YROyS3b4CTVJum34HfRvKvAzozHAQG0TnHNdUfY9nCeUyRAs//cw==} engines: {node: '>=14.16'} - '@tailwindcss/node@4.3.1': - resolution: {integrity: sha512-6NDaqRoAMSXD1mr/RXu0HBvNE9a2n5tHPsxu9XHLws8o4Twes5rBM2205SUUiJ9goAtadrN6xTGX0UDEwp/N4A==} + '@tailwindcss/node@4.3.3': + resolution: {integrity: sha512-/T8IKEsf9VTU6tLjgC7+sv2mOPtQxzE2jMw7u4Tt40Tx+QSZxpzh95/H6cMKoja9XuW7iMdLJYBB0o9G1CaAgg==} - '@tailwindcss/oxide-android-arm64@4.3.1': - resolution: {integrity: sha512-SVlyf61g374l5cHyg8x9kf5xmLcOaxvOTsbsqDnSsDJaKOEFZ7GCvi84VAVGpxojYOs1+3K6M0UjXfqPU8vmOQ==} + '@tailwindcss/oxide-android-arm64@4.3.3': + resolution: {integrity: sha512-Y85A2gmPSkl5Ve5qR86GL4HT509cFqQh1aes9p3sSkyTPwt0Pppf3GkwGe4JPACcRYjgJIEhQgM6dBClnr0NYw==} engines: {node: '>= 20'} cpu: [arm64] os: [android] - '@tailwindcss/oxide-darwin-arm64@4.3.1': - resolution: {integrity: sha512-hVnWLwv+e/l7c4WKyVtHVrIPvYdqWHjRB3MDIqARynzFtnQg85kmQEFCbV9Ja0VVx4xXTIiDWY60Y7iz/iNoDA==} + '@tailwindcss/oxide-darwin-arm64@4.3.3': + resolution: {integrity: sha512-BiaWatpBcERQFDlOjRDpIVXuFK5PJez5SA4JMg6VYZdBYU+qKfV/vqjcIs+IYmtitf1xYQZTwXvU/8y4lfZUGw==} engines: {node: '>= 20'} cpu: [arm64] os: [darwin] - '@tailwindcss/oxide-darwin-x64@4.3.1': - resolution: {integrity: sha512-Cf7abu0WVgbhU7ANgPUnSAvm7nCvMweusHb8FnaHlLfv/Caq4GYaEZg7ZImzzmjx4lIAfuS8q+eLIS7A7IzxIg==} + '@tailwindcss/oxide-darwin-x64@4.3.3': + resolution: {integrity: sha512-fAeUqfV5ndhxRwai8cXGzdLvul9utWOmeTkv69unv4ZXixjn61Z+p9lCWdwOwA3TYboG3BwdVuN/RDjhBRl0mw==} engines: {node: '>= 20'} cpu: [x64] os: [darwin] - '@tailwindcss/oxide-freebsd-x64@4.3.1': - resolution: {integrity: sha512-ZZqzX2Y+GXtXXfqSfpJhDm60OoZfvLHLCgm+J7NVqgHHJjG/m9ugZI77RwTsVd4fnBJuCFP6Ae6kTJb71UdS8g==} + '@tailwindcss/oxide-freebsd-x64@4.3.3': + resolution: {integrity: sha512-iyf5bV6+wnAlflVeEy7R25dupxTNECZN5QMI0qNT6eT+EgaGdZcKhGkr5SdoaWiLJ3spLqIY9VCeSGrwmtg4kw==} engines: {node: '>= 20'} cpu: [x64] os: [freebsd] - '@tailwindcss/oxide-linux-arm-gnueabihf@4.3.1': - resolution: {integrity: sha512-/Ah/xik0LaMYfv9DZ0S/t4pBlBNYOcqtRwusjgovHkvT8ixueWCLyJjsaF5kQIckjb4IT8Q6K6p/iPmZMixYgg==} + '@tailwindcss/oxide-linux-arm-gnueabihf@4.3.3': + resolution: {integrity: sha512-aAYUprJAJQWWbRrPvtjdroZ56Md+JM8pMiopS6xGEwDfLhqj+2ver2p4nU4Mb3CRqcMmNBjo8KkUgcxhkzVQGQ==} engines: {node: '>= 20'} cpu: [arm] os: [linux] - '@tailwindcss/oxide-linux-arm64-gnu@4.3.1': - resolution: {integrity: sha512-gqdFoVJlw444GvpnheZLHmvTzSxI/cOUUh2KSNejQjTcYkW062SVD+En0rUgD+QV91bz1XGIGtt1HJd48xUGbQ==} + '@tailwindcss/oxide-linux-arm64-gnu@4.3.3': + resolution: {integrity: sha512-nDxldcEENOxZRzC2uu9jrutZdAAQtb+8WWDCSnWL1zvBk1+FN+x6MtDViPB5AJMfttVCUhehGWus3XBPgatM/w==} engines: {node: '>= 20'} cpu: [arm64] os: [linux] libc: [glibc] - '@tailwindcss/oxide-linux-arm64-musl@4.3.1': - resolution: {integrity: sha512-Bwv9KwOvE0VKa86xPFif9b9c3Y1NxOV1P0gLti/IYaWEsQYZXDlxfGEtA8mdDZ7SG3wyNXAWYT5SIn3giL57oA==} + '@tailwindcss/oxide-linux-arm64-musl@4.3.3': + resolution: {integrity: sha512-Md44bD6veX/PC5iyF8cDVnw4HBIANZepRZZ7a8DQOvkfo5WUBwcp6iAuCUz23u+4SUkhJlD3eL7hNdW8ezd/kA==} engines: {node: '>= 20'} cpu: [arm64] os: [linux] libc: [musl] - '@tailwindcss/oxide-linux-x64-gnu@4.3.1': - resolution: {integrity: sha512-Ymi8O8T15HYQdOUWUtTI6ldN0neHP85FC+Qz32xTcZ7iJXtem/x8ITev0o1e9e5rkqj4lONZfTRLvkmin1+tKg==} + '@tailwindcss/oxide-linux-x64-gnu@4.3.3': + resolution: {integrity: sha512-tx7us1muwOKAKWao2v/GaafFeQboE6aj88vC6ziN2NCGcRm8gWUhwjzg+YdVB1e4boAtdtma4L43onunI6NS4w==} engines: {node: '>= 20'} cpu: [x64] os: [linux] libc: [glibc] - '@tailwindcss/oxide-linux-x64-musl@4.3.1': - resolution: {integrity: sha512-M+P/91qJ6uILLw4k2G93GMDRAXj61SMvFQYt39AqvUqYgExXpLL5aepfns7sj4HiAQeolirQF9E0lzRvdf4zPQ==} + '@tailwindcss/oxide-linux-x64-musl@4.3.3': + resolution: {integrity: sha512-SJxX60smvHgasZoBy11dX6YRjXJFovwWBoedhbQPOBzgFWBHGB+TVPWB9BxzR7TTxU8FQZAI2AyiNCMzFm8Img==} engines: {node: '>= 20'} cpu: [x64] os: [linux] libc: [musl] - '@tailwindcss/oxide-wasm32-wasi@4.3.1': - resolution: {integrity: sha512-zsM8uOeqvVGHsAXsJxsT28ttosFahLJKCLOTUBqRAtKnVgGSRitds9T432QiT8b77Yga7JIBkulIRRlJPtYhRA==} + '@tailwindcss/oxide-wasm32-wasi@4.3.3': + resolution: {integrity: sha512-jx1+rPhY/5Ympkktd656HBWEBLxP7dH06losBLjjf5vgCODXvi9KhtftWcMIwTFIDqBr7cRnQkdLnAG+IOlGvQ==} engines: {node: '>=14.0.0'} cpu: [wasm32] bundledDependencies: @@ -5107,24 +4953,24 @@ packages: - '@emnapi/wasi-threads' - tslib - '@tailwindcss/oxide-win32-arm64-msvc@4.3.1': - resolution: {integrity: sha512-aiNvSq9BsVk8V513lDKlrCFAgf8qBMPZTpgEhInL+NwQqs97mYmupVMrPrgBBSL8Pv/0zXu9MrMF9rMun1ZeNg==} + '@tailwindcss/oxide-win32-arm64-msvc@4.3.3': + resolution: {integrity: sha512-3rc292Ca2ceK6Ulcc/bAVnTs/3nDtoPhyEKlgPv+yQJQi/JS/AMJlqzxvlDacL1nekbrcf6bTqp/jV4qgnPxNQ==} engines: {node: '>= 20'} cpu: [arm64] os: [win32] - '@tailwindcss/oxide-win32-x64-msvc@4.3.1': - resolution: {integrity: sha512-xDEyu1rg290472FEGaKHnzyDyh5QH+AlWvsU5hMoMtPpzmKlRI0jaYKCgSHDYtaQWZOYbMaduSyCwFwY4n1HmA==} + '@tailwindcss/oxide-win32-x64-msvc@4.3.3': + resolution: {integrity: sha512-yJ0pwIVc/nYeGoV02WtsN8KYyLQv7kyI2wDnkezyJlGGjkd4QLwDGAwl47YpPJeuI0M0ObaXGSPjvWDPeTPggw==} engines: {node: '>= 20'} cpu: [x64] os: [win32] - '@tailwindcss/oxide@4.3.1': - resolution: {integrity: sha512-yVPyo8RNkabVr3O2EhHEE0Rewu7YKzc1DhIqfL46LKveFrmu9XbDazNOJY7/GRuvw1h6u3utWnR29H/p5JPlgA==} + '@tailwindcss/oxide@4.3.3': + resolution: {integrity: sha512-krXjAikiaFSPaK/FkAQT5UTx3VormQaiZ5hBFlJZ9UFQGB/rwg1MZIhHAG9smMQRTdyJxP6Qt5MwMtdyU5FWrA==} engines: {node: '>= 20'} - '@tailwindcss/vite@4.3.1': - resolution: {integrity: sha512-hItDHuIIlEV61R+faXu66s1K36aTurO/Qw0e45Vskz57gXl9pWOT6eg3zmcEui6CZXddbN7zd41bwmvag4JGwQ==} + '@tailwindcss/vite@4.3.3': + resolution: {integrity: sha512-yYU8cogLeSh/ms2jh8Fj7jaba/EWa7Ja6GoUqYZaraEuCI5YS6ms6ObZgjjedm+jm6XZjdNRWBpPP6Z86oOxcw==} peerDependencies: vite: ^5.2.0 || ^6 || ^7 || ^8 @@ -5132,18 +4978,20 @@ packages: resolution: {integrity: sha512-o4PXJQidqJl82ckFaXUeoAW+XysPLauYI43Abki5hABd853iMhitooc6znOnczgbTYmEP6U6/y1ZyKAIsvMKGg==} engines: {node: '>=18'} - '@testing-library/jest-dom@6.9.1': - resolution: {integrity: sha512-zIcONa+hVtVSSep9UT3jZ5rizo2BsxgyDYU7WFD5eICBE7no3881HGeb/QkGfsJs6JTkY1aQhT7rIPC7e+0nnA==} - engines: {node: '>=14', npm: '>=6', yarn: '>=1'} + '@testing-library/jest-dom@7.0.0': + resolution: {integrity: sha512-HKAH9C6mBo5yBG6yRO5i43L2iisencAo5z+o5P/saHUoY+miC5ivXRxHBJcFyB5ypPNxHJdK3BoF/3O4DIptMg==} + engines: {node: '>=22', npm: '>=6', yarn: '>=1'} + peerDependencies: + '@testing-library/dom': '>=10 <11' - '@testing-library/svelte-core@1.0.0': - resolution: {integrity: sha512-VkUePoLV6oOYwSUvX6ShA8KLnJqZiYMIbP2JW2t0GLWLkJxKGvuH5qrrZBV/X7cXFnLGuFQEC7RheYiZOW68KQ==} + '@testing-library/svelte-core@1.1.3': + resolution: {integrity: sha512-KkMAvXeWorxN2Yn0kdC1lfoAItxpoj4uOWzxK5leDrNxonLvS5nwBFvztrroyTszQ0Wf/EU6iLT8JhY5qcn22g==} engines: {node: '>=16'} peerDependencies: svelte: ^3 || ^4 || ^5 || ^5.0.0-next.0 - '@testing-library/svelte@5.3.1': - resolution: {integrity: sha512-8Ez7ZOqW5geRf9PF5rkuopODe5RGy3I9XR+kc7zHh26gBiktLaxTfKmhlGaSHYUOTQE7wFsLMN9xCJVCszw47w==} + '@testing-library/svelte@5.4.2': + resolution: {integrity: sha512-4o31E4HGo5BU5KwPkulNRocEden+7Tt9JYm9uhln5ajF7DULeyFA46BBWVfKJ8Ms9B3JmOFPTIiVamH7n3KpuQ==} engines: {node: '>= 10'} peerDependencies: svelte: ^3 || ^4 || ^5 || ^5.0.0-next.0 @@ -5155,8 +5003,8 @@ packages: vitest: optional: true - '@testing-library/user-event@14.6.1': - resolution: {integrity: sha512-vq7fv0rnt+QTXgPxr5Hjc210p6YKq2kmdziLgnsZGgLJ9e6VAShx1pACLuRjd/AS/sr7phAR58OIIpf0LlmQNw==} + '@testing-library/user-event@14.6.3': + resolution: {integrity: sha512-6dBq67jT8lE+JTE8Exm02Kt6ze43hz1jdiSpSJwtTZiT1xQQ6b7nZYTTQ9njdArdU8XklOwaDp/AbT/eYSKF4g==} engines: {node: '>=12', npm: '>=6'} peerDependencies: '@testing-library/dom': '>=7.21.4' @@ -5196,9 +5044,6 @@ packages: '@turf/invariant@7.3.5': resolution: {integrity: sha512-ZVIvsBvjr8lO7WxC5zYNjRsjSDvyGvWkJMjuWaJjTU8x+1tmfNnw3gDX/TI2Sit83gcRYLYkNo23lB/udqx/Hg==} - '@tybys/wasm-util@0.10.2': - resolution: {integrity: sha512-RoBvJ2X0wuKlWFIjrwffGw1IqZHKQqzIchKaadZZfnNpsAYp2mM0h36JtPCjNDAHGgYez/15uMBpfGwchhiMgg==} - '@types/accepts@1.3.7': resolution: {integrity: sha512-Pay9fq2lM2wXPWbteBsRAGiWH2hig4ZE2asK+mm7kUzlxRTfL961rj89I6zV/E3PcIkDqyuBEcMxFT7rccugeQ==} @@ -5327,8 +5172,8 @@ packages: '@types/d3-quadtree@3.0.6': resolution: {integrity: sha512-oUzyO1/Zm6rsxKRHA1vH0NEDG58HrT5icx/azi9MF1TWdtttWl0UIUsjEQBBh+SIkrpd21ZjEv7ptxWys1ncsg==} - '@types/d3-random@3.0.3': - resolution: {integrity: sha512-Imagg1vJ3y76Y2ea0871wpabqp613+8/r0mCLEBfdtqC7xMSfj9idOnmBYyMoULfHePJyxMAw3nWhJxzc+LFwQ==} + '@types/d3-random@3.0.4': + resolution: {integrity: sha512-UHYId5WTCx4L4YNel7NU00XUXXgvgpgZOvp10PuvsQENjMDXhh2RyFc0KBjO7B45ne4Ha1yVH7ii0vnzKkuzWA==} '@types/d3-scale-chromatic@3.1.0': resolution: {integrity: sha512-iWMJgwkK7yTRmWqRB5plb1kadXyQ5Sj8V/zYlFGMUBbIPKQScw+Dku9cAAMgJG+z5GYDoMjWGLVOvjghDEFnKQ==} @@ -5390,8 +5235,8 @@ packages: '@types/estree@1.0.9': resolution: {integrity: sha512-GhdPgy1el4/ImP05X05Uw4cw2/M93BCUmnEvWZNStlCzEKME4Fkk+YpoA5OiHNQmoS7Cafb8Xa3Pya8m1Qrzeg==} - '@types/express-serve-static-core@4.19.8': - resolution: {integrity: sha512-02S5fmqeoKzVZCHPZid4b8JH2eM5HzQLZWN2FohQEy/0eXTq8VXZfSN6Pcr3F6N9R/vNrj7cpgbhjie6m/1tCA==} + '@types/express-serve-static-core@4.19.9': + resolution: {integrity: sha512-QP2ESEe/ImWY0HDwNAnK9PvEffUyhLTnWkk7KXzHfyeWAnlrDe1fN77bXl6ia8KT3wPlmA7t9/VPRpnf4Ex9sg==} '@types/express-serve-static-core@5.1.1': resolution: {integrity: sha512-v4zIMr/cX7/d2BpAEX3KNKL/JrT1s43s96lLvvdTmza1oEvDudCqK9aF/djc/SWgy8Yh0h30TZx5VpzqFCxk5A==} @@ -5414,17 +5259,14 @@ packages: '@types/geojson@7946.0.16': resolution: {integrity: sha512-6C8nqWur3j98U6+lXDfTUWIfgvZU+EumvpHKcYjujKH7woYyLj2sUmff0tRhrqM7BohUw7Pz3ZB1jj2gW9Fvmg==} - '@types/gtag.js@0.0.20': - resolution: {integrity: sha512-wwAbk3SA2QeU67unN7zPxjEHmPmlXwZXZvQEpbEUQuMCRGgKyE1m6XDuTUA9b6pCGb/GqJmdfMOY5LuDjJSbbg==} - '@types/har-format@1.2.16': resolution: {integrity: sha512-fluxdy7ryD3MV6h8pTfTYpy/xQzCFC7m89nOH9y94cNqJ1mDIDPut7MnRHI3F6qRmh/cT2fUjG1MLdCNb4hE9A==} '@types/hast@2.3.10': resolution: {integrity: sha512-McWspRw8xx8J9HurkVBfYj0xKoE25tOFlHGdx4MJ5xORQrMGZNqJhVQWaIbm6Oyla5kYOXtDiopzKRJzEOkwJw==} - '@types/hast@3.0.4': - resolution: {integrity: sha512-WPs+bbQw5aCj+x6laNGWLH3wviHtoCv/P3+otBhbOhJgG8qtpdAMlTCxLtsTWA7LH1Oh/bFCHsBn0TPS5m30EQ==} + '@types/hast@3.0.5': + resolution: {integrity: sha512-rp/ezSWaD1m44dPKICGhiskI13nVr7qTloFwDa/IYkhhf5nzwP+zIQcIJh3WIFSBOy/H1PzB40jPjMDksN4F+g==} '@types/history@4.7.11': resolution: {integrity: sha512-qjDJRrmvBMiTx+jyLxvLfJU7UznFuokDv4f3WRuriHKERccVpFU+8XMQUAbDzoiJCsmexxRExQeMwwCdamSKDA==} @@ -5483,11 +5325,11 @@ packages: '@types/lodash-es@4.17.12': resolution: {integrity: sha512-0NgftHUcV4v34VhXm8QBSftKVXtbkBG3ViCjs6+eJ5a6y6Mi/jiFGPc1sC7QK+9BFhWrURE3EOggmWaSxL9OzQ==} - '@types/lodash@4.17.24': - resolution: {integrity: sha512-gIW7lQLZbue7lRSWEFql49QJJWThrTFFeIMJdp3eH4tKoxm1OvEPg02rm4wCCSHS0cL3/Fizimb35b7k8atwsQ==} + '@types/lodash@4.17.25': + resolution: {integrity: sha512-+K1NIO8I+F9/wNulfVvu23QYd0Pe9/OCqRrim4NoYIf1VoEDL90Ve4ClzpyqBLc7NpGGWRvYNCKZ1BE/Jpf8dQ==} - '@types/luxon@3.7.1': - resolution: {integrity: sha512-H3iskjFIAn5SlJU7OuxUmTEpebK6TKB8rxZShDslBMZJ5u9S//KM1sbdAisiSrqwLQncVjnpi2OK2J51h+4lsg==} + '@types/luxon@3.7.3': + resolution: {integrity: sha512-pE7BSbKHiojpl4v7iEzdfFLXXJaH5RPJxI3Wr4x3HU59l83PJfhcUx4mGPWq245+DCAENAzRF/+ZoYr2tJCe/g==} '@types/mdast@4.0.4': resolution: {integrity: sha512-kGaNbPh1k7AFzgpud/gMdvIm5xuECykRR+JnWKQno9TAXVa6WIVCGTPvYGekIDL4uwCZQSYbUxNBSb1aUo79oA==} @@ -5510,8 +5352,8 @@ packages: '@types/ms@2.1.0': resolution: {integrity: sha512-GsCCIZDE/p3i96vtEqx+7dBUGXrc7zeSK3wwPHIaRThS+9OhWIXRqzs4d6k1SVU8g91DrNRWxWUGhp5KXQb2VA==} - '@types/multer@2.1.0': - resolution: {integrity: sha512-zYZb0+nJhOHtPpGDb3vqPjwpdeGlGC157VpkqNQL+UU2qwoacoQ7MpsAmUptI/0Oa127X32JzWDqQVEXp2RcIA==} + '@types/multer@2.2.0': + resolution: {integrity: sha512-3U1troeqGV8Ntp7Q3klwf4zr23VEoqYVocYXaswm9+8z3O9UHDYAqLxjJ/h550iRADTjKdOdhhasXw6gD6kYtg==} '@types/node@17.0.45': resolution: {integrity: sha512-w+tIMs3rq2afQdsPJlODhoUEKzFP1ayaoyl1CcnwtIlsVe7K7bA1NGm4s3PraqTLlXnbIN84zuBlxBWo1u9BLw==} @@ -5519,14 +5361,14 @@ packages: '@types/node@18.19.130': resolution: {integrity: sha512-GRaXQx6jGfL8sKfaIDD6OupbIHBr9jv7Jnaml9tB7l4v068PAOXqfcujMMo5PhbIs6ggR1XODELqahT2R8v0fg==} - '@types/node@24.13.2': - resolution: {integrity: sha512-fRa09kZTgu8o71KFcDjUFuc7F+dEbZYZmkI0mg5YBTRs0yMKjYHsq/c0urDKeDb+D5qVgXOdFcuu+DZPKOITwA==} + '@types/node@24.13.3': + resolution: {integrity: sha512-Dh8vAsV36ig5wa9OX4pXvMc9D3Veibfw2wix0CUwYODLD8nkj9UsLjASr49nPg+2eKzxhBV+v7L8pXvT4e639Q==} '@types/nodemailer@8.0.1': resolution: {integrity: sha512-PxpaInm8V1JQDd4j0ds5HfvWQk8JupS1C0Picb96QJsrrRDjBH+DlK7L4ZdNSqNULhiZRQHc40nLVShaGxXAMw==} - '@types/oidc-provider@9.5.0': - resolution: {integrity: sha512-eEzCRVTSqIHD9Bo/qRJ4XQWQ5Z/zBcG+Z2cGJluRsSuWx1RJihqRyPxhIEpMXTwPzHYRTQkVp7hwisQOwzzSAg==} + '@types/oidc-provider@9.11.0': + resolution: {integrity: sha512-wZMEmCGh8WGKYSUpxJgpPLIKTe4972OJUlWXaNzy5+vvnU097i8ijzApgHLihdg56cQ+PV+USYYcnh3W8kVISA==} '@types/parse5@5.0.3': resolution: {integrity: sha512-kUNnecmtkunAoQ3CnjmMkzNU/gtxG8guhi+Fk2U/kOpIKjIMKnXGp4IJCgQJrXSgMsWYimYG4TGjz/UzbGEBTw==} @@ -5537,8 +5379,8 @@ packages: '@types/pg@8.15.6': resolution: {integrity: sha512-NoaMtzhxOrubeL/7UZuNTrejB4MPAJ0RpxZqXQf2qXuVlTPuG6Y8p4u9dKRaue4yjmC7ZhzVO2/Yyyn25znrPQ==} - '@types/pg@8.20.0': - resolution: {integrity: sha512-bEPFOaMAHTEP1EzpvHTbmwR8UsFyHSKsRisLIHVMXnpNefSbGA1bD6CVy+qKjGSqmZqNqBDV2azOBo8TgkcVow==} + '@types/pg@8.20.4': + resolution: {integrity: sha512-Jz7UDOlIiFJuacC0TlBoLyNtmwlA/wpIyPDd3tvUqlRM+HzkWy2xUgpFpaXtbfTAFF6sIGq5lsCDBdJnhky1Xg==} '@types/picomatch@4.0.3': resolution: {integrity: sha512-iG0T6+nYJ9FAPmx9SsUlnwcq1ZVRuCXcVEvWnntoPlrOpwtSTKNDC9uVAxTsC3PUvJ+99n4RpAcNgBbHX3JSnQ==} @@ -5567,8 +5409,8 @@ packages: '@types/react-router@5.1.20': resolution: {integrity: sha512-jGjmu/ZqS7FjSH6owMcD5qpq19+1RS9DeVRqfl1FeBMxTDQAGwlMWOcs52NDoXaNKyG3d1cYQFMs9rCrb88o9Q==} - '@types/react@19.2.17': - resolution: {integrity: sha512-MXfmqaVPEVgkBT/aY0aGCkRWWtByiYQXo3xdQ8r5RzuFrPiRn8Gar2tQdXSUQ2GKV3bkXckek89V8wQBY2Q/Aw==} + '@types/react@19.2.18': + resolution: {integrity: sha512-AnzbBERsrLKtk2XSfTbYRLjQPdy116Sty4q+T+Bp3IC4l6jNBvreVPAHmpq9qhXQM7CXZPjLVmGMw9sy+hxQ3w==} '@types/readdir-glob@1.1.5': resolution: {integrity: sha512-raiuEPUYqXu+nvtY2Pe8s8FEmZ3x5yAH4VkLdihcPdalvsHltomrRC9BzuStrJ9yk06470hS0Crw0f1pXqD+Hg==} @@ -5579,8 +5421,8 @@ packages: '@types/sax@1.2.7': resolution: {integrity: sha512-rO73L89PJxeYM3s3pPPjiPgVVcymqU490g0YO5n5By0k2Erzj6tay/4lr1CHAAU4JyOWd1rpQ8bCf6cZfHU96A==} - '@types/semver@7.7.1': - resolution: {integrity: sha512-FmgJfu+MOcQ370SD0ev7EI8TlCAfKYU+B4m5T3yXc1CiRN94g/SZPtsCkk506aUDtlMnFZvasDwHHUcZUEaYuA==} + '@types/semver@7.8.0': + resolution: {integrity: sha512-1mAINjtQCXXeLkJ9ehXkwOcBpqtLxiVtKhpUf83DdRNdQKV0iXZpaHYqRr7nj+wvxuJzoAmAwXI+sCNMv1CzLQ==} '@types/send@0.17.6': resolution: {integrity: sha512-Uqt8rPBE8SY0RK8JB1EzVOIZ32uqy8HwdxCnoCOsYrvnswqmFZ/k+9Ikidlk/ImhsdvBsloHbAlewb2IEBV/Og==} @@ -5609,11 +5451,11 @@ packages: '@types/ssh2@1.15.5': resolution: {integrity: sha512-N1ASjp/nXH3ovBHddRJpli4ozpk6UdDYIX4RJWFa9L1YKnzdhTlVmiGHm4DZnj/jLbqZpes4aeR30EFGQtvhQQ==} - '@types/superagent@8.1.10': - resolution: {integrity: sha512-nbt4IWXABhW0jGmmpRzCFNlbmwCTzZ2gTUsNIr+X+ItdqPms+PAJZbWsNzpS2USqXjcoNLQcO6nXo60zcPQiIg==} + '@types/superagent@8.1.11': + resolution: {integrity: sha512-KA7srSW/HENDtOw9DOqaFLgWuMqN9WgjEw62lh9dpvRaZDkhdOkazASd7X7i2eMUYLHa1U37ZttnePsH5zTDHw==} - '@types/supertest@7.2.0': - resolution: {integrity: sha512-uh2Lv57xvggst6lCqNdFAmDSvoMG7M/HDtX4iUCquxQ5EGPtaPM5PL5Hmi7LCvOG8db7YaCPNJEeoI8s/WzIQw==} + '@types/supertest@7.2.1': + resolution: {integrity: sha512-4CbBvoYVLHL7+yhbYrZET0vsvuyXTC05aRe7dNQkwMzm56auceoy6Yu3K50uZmwfHna1os3CMSgM/3QVkUtPTw==} '@types/through@0.0.33': resolution: {integrity: sha512-HsJ+z3QuETzP3cswwtzt2vEIiHBk/dCcHGhbmG5X3ecnwFD/lPrMpliGXxSCg03L9AhrdwA4Oz/qfspkDW+xGQ==} @@ -5645,67 +5487,191 @@ packages: '@types/yargs@17.0.35': resolution: {integrity: sha512-qUHkeCyQFxMXg79wQfTtfndEC+N9ZZg76HJftDJp+qH2tV7Gj4OJi7l+PiWwJ+pWtW8GwSmqsDj/oymhrTWXjg==} - '@typescript-eslint/eslint-plugin@8.61.0': - resolution: {integrity: sha512-bFNvl9ZczlVb+wR2Akszf3gHfKVj/8WanXaGJ3UstTA7brNKg0cNdk6X1Psu5V7MZ2oQtzZKOEzIUehaoxbDGw==} + '@typescript-eslint/eslint-plugin@8.66.0': + resolution: {integrity: sha512-p088eaGrzYz1s+7cov0aMOCkNGTJlVxF4jgubf28c8L0Cv9Rloj8YBHnv4hXLq6IIEE1AsjNWavO+k+8kP2Y0A==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: - '@typescript-eslint/parser': ^8.61.0 + '@typescript-eslint/parser': ^8.66.0 eslint: ^8.57.0 || ^9.0.0 || ^10.0.0 typescript: '>=4.8.4 <6.1.0' - '@typescript-eslint/parser@8.61.0': - resolution: {integrity: sha512-5B7PfA2e1NQGCnDHd/0lW7W3gvp3d59Ryw54FYO8Uswxo9f6ikw3AZV+Xj/TvpImmpsiYyUqAfhC6kJID1jF6w==} + '@typescript-eslint/parser@8.66.0': + resolution: {integrity: sha512-X6ypGChaWYk6PBtUg2BwuTZEFFcHJAtGTVJ9/lCTOufhZ4i9fNolQNnktq+kkMCwMj7V8Svsq7+TxSDslmhE0g==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: eslint: ^8.57.0 || ^9.0.0 || ^10.0.0 typescript: '>=4.8.4 <6.1.0' - '@typescript-eslint/project-service@8.61.0': - resolution: {integrity: sha512-DV42F7MLJO6Rax7SK1yg43tcnEfGUrurSpSxKuVX+a3RCTzBlH3fuxprrOJXKCJGAaw82xXocikJ0uQaqwXgGA==} + '@typescript-eslint/project-service@8.66.0': + resolution: {integrity: sha512-7MthGPTt4BP69lSryqpqq8HQqxuzynssckL/jyDyk3+TNMQ3y2jFWkptCrktWvBrP+EH787Nl5N5Qpw7WZg+5g==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: typescript: '>=4.8.4 <6.1.0' - '@typescript-eslint/scope-manager@8.61.0': - resolution: {integrity: sha512-IWdXFHFSb6mlC3HPc7QsLDm5zYEbUla6trDEHf32D3/dnuUyXd87plScSNXSbm0/RxMvObpI17sv/EDTGrGZkA==} + '@typescript-eslint/scope-manager@8.66.0': + resolution: {integrity: sha512-8TGcH25j9zqJ/IULB/ppyhRvxA8QYfFEZ7nfbg6/BN9spDgb8fPWQXlE5l8TWBL50EtUx007uZ1o9VOwrq2/9g==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@typescript-eslint/tsconfig-utils@8.61.0': - resolution: {integrity: sha512-O5Amvdv9ztMpxpf+vmFULGG78IE6Qwdr3bCGvqwG4nwc9H2qXkOYJJnRbRHyMkQTjv1d03olqwwwzHLMqpFePQ==} + '@typescript-eslint/tsconfig-utils@8.66.0': + resolution: {integrity: sha512-9D5gLYZG4rOjcoag8MQ/fWI8WqA9wcPDyOGyWtWFhvM1lHRbliqUSPIY5J3zqCU1tvSwzXxnnjhQhz5Ne7mJ4g==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: typescript: '>=4.8.4 <6.1.0' - '@typescript-eslint/type-utils@8.61.0': - resolution: {integrity: sha512-TuBiQYIkd97yBfInHCTKVYMbX4kvEmpOEuixIuzCU9p8BGT1SfyyO0d0IfDMbPIHcjn/hWnusUX5e8v5Xg+X8A==} + '@typescript-eslint/type-utils@8.66.0': + resolution: {integrity: sha512-LG2dWfjZQQp0ADtAu/EWJVayefGL2UEZ3CDeI44D9v3rXB/WYUqE/jpO28KrEKul5AySrmI+Zh1v6v+xW2U9+g==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: eslint: ^8.57.0 || ^9.0.0 || ^10.0.0 typescript: '>=4.8.4 <6.1.0' - '@typescript-eslint/types@8.61.0': - resolution: {integrity: sha512-9QTQpZ5Iin4CdIodfbDQFSeiSJKidgYJYug1P9CC2xWgUTvlmixViqDZNciMjwLBZyJnG4tGmPl97rVAFb1AJg==} + '@typescript-eslint/types@8.66.0': + resolution: {integrity: sha512-H6gcYaSDOyvL3AD/jHUtUFo2jqGgn/F6nuyuZSu0QTesxL+cP4dQoIMrODRofuJC09g64+WgZ6tE19Y1N2YIFQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@typescript-eslint/typescript-estree@8.61.0': - resolution: {integrity: sha512-42zatd5qSvvcV1JdDBCLxYRznvP4eIHpPoZXdkPFnAmanA4FuZ5dibSnCBggY8hQnqajPpoGjXFdZ7fIJKQnlA==} + '@typescript-eslint/typescript-estree@8.66.0': + resolution: {integrity: sha512-8/x4INiiQb10jGgXYD7116/zQ+OL84ZIFn0za68wwFHCanT/VLbBEroWht8RV8fn0/ZCAoazHLQgwUC0UQcDfg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: typescript: '>=4.8.4 <6.1.0' - '@typescript-eslint/utils@8.61.0': - resolution: {integrity: sha512-3bzFt7ImFMW/jVYwJamDoe/dMOdFLSC6pom6rRjdh4SZJEYupyMzem8e7vKZLclLfpHjlwSAXOUxtKxGXUiLqA==} + '@typescript-eslint/utils@8.66.0': + resolution: {integrity: sha512-jasearZPolBw5NJNYGMwxzHMF83niVWmMU1VdHzG1CyfI2VS7f7nZltnKtHcg20hW+7Uo5GfK4MeDPoU3qI8EA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: eslint: ^8.57.0 || ^9.0.0 || ^10.0.0 typescript: '>=4.8.4 <6.1.0' - '@typescript-eslint/visitor-keys@8.61.0': - resolution: {integrity: sha512-QVLZu3ZPQEE+HICQyAMZ2yLQhxf0meY/wx6Hx14YcTNj13JB3qHlX3lJ02L3fLGHgERRH71kvYDwiXIguT3AjQ==} + '@typescript-eslint/visitor-keys@8.66.0': + resolution: {integrity: sha512-dkKR8q+lKciskj1Y3vthHktl+3cMLWGyVUP23bRiPZ5O9BRT++4EqDDV+TVeIKBL1VXVEqrJlz8MYbcnvJcAlg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@ungap/structured-clone@1.3.1': - resolution: {integrity: sha512-mUFwbeTqrVgDQxFveS+df2yfap6iuP20NAKAsBt5jDEoOTDew+zwLAOilHCeQJOVSvmgCX4ogqIrA0mnyr08yQ==} + '@typescript/typescript-aix-ppc64@7.0.2': + resolution: {integrity: sha512-MTKKkWB7p/0E9xi1d1tHtZ5PiLkGEMIq88pK2CubZjOsLtYTLqhgIgi6zepFa+9GHZ6h05NMCkQxGKiPXMxXtQ==} + engines: {node: '>=16.20.0'} + cpu: [ppc64] + os: [aix] + + '@typescript/typescript-darwin-arm64@7.0.2': + resolution: {integrity: sha512-gowzar9MwS/aRWp6f3a4KUqzRjAZjOsmGNCM6LcTgXum+dBfgsBVMN+AgvOCCbguXyick6LJhpBszxMebJ8syA==} + engines: {node: '>=16.20.0'} + cpu: [arm64] + os: [darwin] + + '@typescript/typescript-darwin-x64@7.0.2': + resolution: {integrity: sha512-SZ9xZInqApNlNGc9s0W1VSsktYSOe9cFqNOIqmN1Gs8SmkjKZYFt017G4VwPxASInODuAdbTW7sXiFUf893RgA==} + engines: {node: '>=16.20.0'} + cpu: [x64] + os: [darwin] + + '@typescript/typescript-freebsd-arm64@7.0.2': + resolution: {integrity: sha512-W5NH4y/J0plIIS5b2xvTEkU7JFxyqdMAOgf+Ilhl0vHQXKO5dZoxd+C/jEtq56c4F3wk71RB4BMRQ2XdI+bwYQ==} + engines: {node: '>=16.20.0'} + cpu: [arm64] + os: [freebsd] + + '@typescript/typescript-freebsd-x64@7.0.2': + resolution: {integrity: sha512-UMGDx5sTpzNw3WiPebH7l90IWfJggEd+egHt/q6p7/Cm3zqoV7VxkGXt+3DxPIw8CcmvAB0j3sVVfbhX+M4Tpw==} + engines: {node: '>=16.20.0'} + cpu: [x64] + os: [freebsd] + + '@typescript/typescript-linux-arm64@7.0.2': + resolution: {integrity: sha512-Qh4eU4/y3yDjnfjjyPYihMj5/ODIlmt+Bzu17OI+fiSRDW57QmU5SiN63exPRNJPKUzcc1INa1NXdrJ+MqHjUQ==} + engines: {node: '>=16.20.0'} + cpu: [arm64] + os: [linux] + + '@typescript/typescript-linux-arm@7.0.2': + resolution: {integrity: sha512-gffT3xPz9sR7j/YJExkyPntrI0P2EP9XbOyWzth2/Gs0RstK+90RBcO0ncXoXy/beYll1SXw846Nf2zdnEz0QQ==} + engines: {node: '>=16.20.0'} + cpu: [arm] + os: [linux] + + '@typescript/typescript-linux-loong64@7.0.2': + resolution: {integrity: sha512-uEHck9i8hoAzXPiYRib1O7miOnz23SxIeVl6F4LXox+qov1K35jHcEW6VHKvZI+pyvl7fZEP4MCU5LYvIq1GuQ==} + engines: {node: '>=16.20.0'} + cpu: [loong64] + os: [linux] + + '@typescript/typescript-linux-mips64el@7.0.2': + resolution: {integrity: sha512-R4KvAMnE43W5Qeqb0Ly56O3mWMWIAgsMyz36DCaycd5nbg/9kzm0liw3JocfRqyJY0KPmzFjbswozXyW0DnIYA==} + engines: {node: '>=16.20.0'} + cpu: [mips64el] + os: [linux] + + '@typescript/typescript-linux-ppc64@7.0.2': + resolution: {integrity: sha512-DORx5b3sd/4S7eayxm4FQv+A7CrkUIGRaHiwI8oiHTAI1fAPWhF4J0vAlkC8biAlHSVVwxMQ3tjZ2/DVbnQiiA==} + engines: {node: '>=16.20.0'} + cpu: [ppc64] + os: [linux] + + '@typescript/typescript-linux-riscv64@7.0.2': + resolution: {integrity: sha512-wf0jqEDOjrPRnKwYRyyJDRo11KMbvMFrU+q4zqKyChODBzvlkbhNQfKvLxQCcwTpdDaXSHZTVuh0JoCrKCUMHQ==} + engines: {node: '>=16.20.0'} + cpu: [riscv64] + os: [linux] + + '@typescript/typescript-linux-s390x@7.0.2': + resolution: {integrity: sha512-IkwJc3L7yhytWd/ewjyxNDfOmswCm9GWMJT/ue/dU4aZNbwZeYAetq42VyLmsmSjvoX7z74X6ZaYCtzAr0EuGw==} + engines: {node: '>=16.20.0'} + cpu: [s390x] + os: [linux] + + '@typescript/typescript-linux-x64@7.0.2': + resolution: {integrity: sha512-EYdf2cNg7rgCWJnxCdJ+F3V39O8ihb37eHAu1LK8oAFizgTQbPOK7zHHXbPt8rX24COqODXeI3sIf0fCXG7H/A==} + engines: {node: '>=16.20.0'} + cpu: [x64] + os: [linux] + + '@typescript/typescript-netbsd-arm64@7.0.2': + resolution: {integrity: sha512-+polYF4MF04aPpO5FTkHran9yUQDSXqy5GiSDKpsll5jy3l3+g9QLhpf39T+ePtefhXLOGrLl0QIjkQP6VnelA==} + engines: {node: '>=16.20.0'} + cpu: [arm64] + os: [netbsd] + + '@typescript/typescript-netbsd-x64@7.0.2': + resolution: {integrity: sha512-8YIT0EHM/3dq10ZOVF/A7pc/YSMtbcecct4rWtexrnSCHOPcpC2KTLXfTCR6vDpnSiY12heNb1GiN/wu+T/FyA==} + engines: {node: '>=16.20.0'} + cpu: [x64] + os: [netbsd] + + '@typescript/typescript-openbsd-arm64@7.0.2': + resolution: {integrity: sha512-APT8+ClYnuYm1u9+kgGXoMj2VzWzcymwh2gNSQVySHfkRDGOTVkoWLjCmOQSaO+PoqQ57B0flRp9SA+7GnnkzQ==} + engines: {node: '>=16.20.0'} + cpu: [arm64] + os: [openbsd] + + '@typescript/typescript-openbsd-x64@7.0.2': + resolution: {integrity: sha512-yX7s+Q0Dln0Dt9tEzZsAjXXR/+ytBM7AlglaqyeMPxQszJ1JhlJdZ6jLA+IzldHtflX81em7lDao1xXu+aRRkg==} + engines: {node: '>=16.20.0'} + cpu: [x64] + os: [openbsd] + + '@typescript/typescript-sunos-x64@7.0.2': + resolution: {integrity: sha512-dLJDGaLZ1D4HPQn62u1n8mBDkJREwMsAkCdkwd4Ieqw+x3TUyTsqY0YiBCtE6H6OzzgGk3iuZ3vFWRS+E8/d1g==} + engines: {node: '>=16.20.0'} + cpu: [x64] + os: [sunos] + + '@typescript/typescript-win32-arm64@7.0.2': + resolution: {integrity: sha512-Gyl1Vy6OsWesLzmq+EP0Fb7b4Nid5232AvcA2SFcdYreldpNtYFFofPjnt62y9hQy7VTaZp65ICJjuAQRaVcIQ==} + engines: {node: '>=16.20.0'} + cpu: [arm64] + os: [win32] + + '@typescript/typescript-win32-x64@7.0.2': + resolution: {integrity: sha512-0BQ3HkAHHlKLSp1qRvf3SUhGpGsDuhB/jgFw75guyqbxJqEaS0Cw/VFO8i2nHglJUzQCRtMMR/IBAKE3ETMC4g==} + engines: {node: '>=16.20.0'} + cpu: [x64] + os: [win32] + + '@typescript/typescript6@6.0.2': + resolution: {integrity: sha512-mbCddXd+jm7hfx7w2YU64/Av4/NqqeG3GoRZgxPcgoTxYjhrcfJRw9ULch71SS4G+Q3bOXFhRvPqjguN0Hyp5w==} + hasBin: true + + '@ungap/structured-clone@1.3.3': + resolution: {integrity: sha512-60YRaenCQcVjYEKOcG824+DRGGIQ3VKErcBoAEDJZz5bKIs2ZG+X/H9Nk+Q6EVkwJk5QNApxbrc5QtBSwtrXAg==} '@upsetjs/venn.js@2.0.0': resolution: {integrity: sha512-WbBhLrooyePuQ1VZxrJjtLvTc4NVfpOyKx0sKqioq9bX1C1m7Jgykkn8gLrtwumBioXIqam8DLxp88Adbue6Hw==} @@ -5715,23 +5681,23 @@ packages: peerDependencies: valibot: ^1.4.0 - '@vitest/coverage-v8@4.1.9': - resolution: {integrity: sha512-G9/lgqibheLVBDRuya45EbsEXTYcWoSG+TLg7i2axuzx0Eq62eXn+aWXyaVdV5vKvFSWd6ywcX8hA7la9Pvu8g==} + '@vitest/coverage-v8@4.1.10': + resolution: {integrity: sha512-IM49HmthevbgAO4anp1hwtoT9wYe59w0LR00gr+eagHE+ZJ5lK4sLPeO0ubgoJcwLk6dehU3R24N+FbEEKDc8g==} peerDependencies: - '@vitest/browser': 4.1.9 - vitest: 4.1.9 + '@vitest/browser': 4.1.10 + vitest: 4.1.10 peerDependenciesMeta: '@vitest/browser': optional: true - '@vitest/expect@3.2.6': - resolution: {integrity: sha512-1+7q9BtaKzEmO+fmNT3kYvoNn5Y71XWAx2Q5HRim4tTVRQVRv4uJFAQ5FbK0OPUeNP/WmVCpxYxoJdvuHVjzBQ==} + '@vitest/expect@3.2.7': + resolution: {integrity: sha512-E8eBXaKibuvH2pSZErOjdVb5vF4PbKYcrnluBTYxEk1l/VhhwZg1kZQsdtjq+CsF5CFydf2Rdkz7jDHKSisi3w==} - '@vitest/expect@4.1.9': - resolution: {integrity: sha512-vl/rYsUKcBr3SnQn166+XR5ZQcgMx3DQhFWdfli/cWpLnLUmbxZvyrJZotLFUryib+LtArYMSTJ5RbQ57ZqrlA==} + '@vitest/expect@4.1.10': + resolution: {integrity: sha512-YsCn+qAk1GWjQOWFEsEcL2gNQ0zmVmQu3T03qP6UyjhtmdtwtbuI+DASn/7iQB3HGTXkdBwGddzxPlmiql5vlA==} - '@vitest/mocker@3.2.6': - resolution: {integrity: sha512-EZOrpDbkKotFAP7wPAQV1UIyoGOk4oX7ynWhBhLB7v+meMHbQhU16oPpIYGTTe4oFlhpryGpgpcZP/sin3hYuw==} + '@vitest/mocker@3.2.7': + resolution: {integrity: sha512-Trr0hYO9CM3Wj6ksWHRhK9IZpIY6wTMO5u/MqXurMxT57sWBaOPEtP3Oq60ihZuh5JsiagKfz95OcxdEP6dBrA==} peerDependencies: msw: ^2.4.9 vite: ^5.0.0 || ^6.0.0 || ^7.0.0-0 @@ -5741,8 +5707,8 @@ packages: vite: optional: true - '@vitest/mocker@4.1.9': - resolution: {integrity: sha512-EVkXzBjrPGM+cK8/ANWgBrkUCfJfb38/EfTSO8h7pWvKkyPkpWxvR7BkD2MyItMF62C97zAEoqdpUixwR/e+Rw==} + '@vitest/mocker@4.1.10': + resolution: {integrity: sha512-v0xaezt+DKEmKfaxg133ldzADrwLGd7Ze1MfQQTYfvs8OqZIwbxyxaYURivwV7sWy5fqn3rH5uOrSp07bp44Ow==} peerDependencies: msw: ^2.4.9 vite: ^6.0.0 || ^7.0.0 || ^8.0.0 @@ -5752,35 +5718,35 @@ packages: vite: optional: true - '@vitest/pretty-format@3.2.6': - resolution: {integrity: sha512-lb7XXXzmm2h2ASzFnRvQpDo6onT1NmMJA3tkGTWiBFtRJ9lxGY3d3mm/Apt36gej2bkkOVLL/yTOtufDaFa/jA==} + '@vitest/pretty-format@3.2.7': + resolution: {integrity: sha512-KUHlwqVu0sRlhCdyPdQ/wBoTfRahjUky1MubOmYw9fWfIZy1gNoHpuaaQBPAaMaVYdQYHJLurzj8ECCj5OwTqA==} - '@vitest/pretty-format@4.1.9': - resolution: {integrity: sha512-s0iufns3iIFitdgm+YR7g1whCAaGtXz459VS9/PqyKDEEFgYIhsHOQmXgIgDuYCt7DeQmiZT0Qe2OA2p4ZPu5A==} + '@vitest/pretty-format@4.1.10': + resolution: {integrity: sha512-W1HsjSH4MXQ9YfmmhLAoIYf1HRfekQCGngeIgcei6MP5QQGWUe0gkopdZQaVCFO+JDJMrAJGwa5pRpNpvy4P8Q==} - '@vitest/runner@3.2.6': - resolution: {integrity: sha512-HYcoSj1w5tcgUnzoF0HcyaAQjpA1gj9ftUJ7iSJSuipc02jW9gKkigwZbjFldAfYHA1fa8UZVRftdMY5msWM9Q==} + '@vitest/runner@3.2.7': + resolution: {integrity: sha512-sB9y4ovltoQP+WaUPwmSxO9WIg9Ig694Di5PalVPsYHklAdE027mehpWF2SQSVq+k6sFgaivbTjTJwZLSHbedA==} - '@vitest/runner@4.1.9': - resolution: {integrity: sha512-KXLMDtc7oe70+3mJfGrPUWPesswH+3sTxAMAMl8DG7I8IUQT4XW718dY5ID3vPUcmlu27CcKfY4P3h3I29SLJg==} + '@vitest/runner@4.1.10': + resolution: {integrity: sha512-IKI6kpIH+LmpROplyLwBBaCfMgOZOMsygVa6BARD6ahA04VRuJSa6OaVG7kRvSEMD870Vd91rSSw0eegtWyLGg==} - '@vitest/snapshot@3.2.6': - resolution: {integrity: sha512-H+ZjNTWGpObenh0YnlBctAPnJSI20P81PL8BPzWpx54YXLLTm8hEsWawtcYLMrwvpK48hGxLLbCS+1KRXhsKhw==} + '@vitest/snapshot@3.2.7': + resolution: {integrity: sha512-7C+MwShwtBSI5Buwoyg3s/iY1eHL9PKAf+O1wVh/TdnjXUtkoL/9YQtre90i4MtNXM6edP1wJ2zOBpfCyhIS7g==} - '@vitest/snapshot@4.1.9': - resolution: {integrity: sha512-Jc7RKGNBo8Z28WYIm0Niej4xdSPByRf6mU58VpHQkd6Zh05rlnA+twjbK5HyeIGHxrzsc3mJgS43uM0CZKzaIA==} + '@vitest/snapshot@4.1.10': + resolution: {integrity: sha512-xRkfOT1qpTAi/Ti4Y1LtfRc3kEuqxGw59eN2jN9pRWMtS/XDevekhcFSqvQqjUNGksfjMJu3Y+oJ+4Ypn2OaJw==} - '@vitest/spy@3.2.6': - resolution: {integrity: sha512-oq6BbH68WzcWmwtBrU9nqLeaXTR4XwJF7FSLkKEZo4i6eoXcrxjcwSuTvWBIRUTC6VC72nXYunzqgZA+IKdtxg==} + '@vitest/spy@3.2.7': + resolution: {integrity: sha512-Q2eQGI6d2L/hBtZ0qNuKcAGid68XK6cv1xsoaIma6PaJhHPoqcEJhYpXZ/5myCMqkNgtP6UKuBhbc0nHKnrkuQ==} - '@vitest/spy@4.1.9': - resolution: {integrity: sha512-fHpsS6mIi+PiEW+vcRVOMkX1oSaPKne3VOclSFICPcGOmfKgXPU5iAah+wcNcj2xPrCCmfq99IDGf+EojhhvhA==} + '@vitest/spy@4.1.10': + resolution: {integrity: sha512-PLf/Ugvoq5wO/b4rwYCR1h2PSIdXz7wnkQFMiUpLdtM7l6pqVFcQIBEHyT1+l+cj7mNwAfZHzqXqDyjvOuwbDw==} - '@vitest/utils@3.2.6': - resolution: {integrity: sha512-lI23nIs4bnT3T8NIoh+vFaz5s2/DdP0Jgt2jxwgWljvwn82cLJtyi/If+fjFyoLMGIOz0U/fKvWE0d4jsNQEfg==} + '@vitest/utils@3.2.7': + resolution: {integrity: sha512-x6BDOd7dyo3PFLY3I9/HJ25X/6OurhGXk2/B9gOZNPF7XDVjeBK4k01lQE5uvDpbuheErh91qYuE1E2OEjK3Rw==} - '@vitest/utils@4.1.9': - resolution: {integrity: sha512-A51o8ymO5PpqlWNnBP9ZHPXDIpuMtTLlGSjN7la4US+LJzoUMyhwjA5QXlm39JexgwHKW4Xjs8Z2d3dLCXOeuA==} + '@vitest/utils@4.1.10': + resolution: {integrity: sha512-fy9am/HWxbaGt/Sawrp90vt6Y6jQwf1RX77cz3uwoJwJVMli/e1IEwRPnMNJ7vKfPTwo0diXifkpPvwH9v7nGA==} '@webassemblyjs/ast@1.14.1': resolution: {integrity: sha512-nuBEDgQfm1ccRp/8bCQrx1frohyufl4JlbMMZ4P1wpeOfDhF6FQkxZJ1b/e+PLwr6X1Nhw6OLme5usuBWYBvuQ==} @@ -5880,14 +5846,14 @@ packages: resolution: {integrity: sha512-HEHNfbars9v4pgpW6SO1KSPkfoS0xVOM/9UzkJltjlsHZmJasxg8aXkuZa7SMf8vKGIBhpUsPluQSqhJFCqebw==} engines: {node: '>=0.4.0'} - acorn@8.17.0: - resolution: {integrity: sha512-xRQbDb9BnwDafYNn6Vwl839DYVjqXYb1XVGtWAZ1kcDc6iwAL4hg3B1dZlRiuENFeO2H53gFG3in621AdERVAg==} + acorn@8.18.0: + resolution: {integrity: sha512-lGq+9yr1/GuAWaVYIHRjvvySG5/4VfKIvC8EWxStPdcDh/Ka7FG3twP6v4d5BkravUilhIAsG4Qj83t02LWUPQ==} engines: {node: '>=0.4.0'} hasBin: true - address@1.2.2: - resolution: {integrity: sha512-4B/qKCfeE/ODUaAUpSwfzazo5x29WD4r3vXiWsB7I2mSDAihwEqKO+g8GELZUQSSAo5e1XTYh3ZVfLyxBc12nA==} - engines: {node: '>= 10.0.0'} + address@2.0.3: + resolution: {integrity: sha512-XNAb/a6TCqou+TufU8/u11HCu9x1gYvOoxLwtlXgIqmkrYQADVv6ljyW2zwiPhHz9R1gItAWpuDrdJMmrOBFEA==} + engines: {node: '>= 16.0.0'} agent-base@6.0.2: resolution: {integrity: sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==} @@ -5936,13 +5902,13 @@ packages: ajv@8.20.0: resolution: {integrity: sha512-Thbli+OlOj+iMPYFBVBfJ3OmCAnaSyNn4M1vz9T6Gka5Jt9ba/HIR56joy65tY6kx/FCF5VXNB819Y7/GUrBGA==} - algoliasearch-helper@3.29.1: - resolution: {integrity: sha512-6ck2YFudF2Pje7szQoPBiRFTGfd+1I+0I/WfLPGn0bj1kvrFoOQmNyedNiDxTk3/r4IfSLDYk+RA4G7u8H6+yA==} + algoliasearch-helper@3.29.2: + resolution: {integrity: sha512-SaV+rZM3drExb0punEYYjT+sNcH74YFwN8ocjya7IDOyQvKWeQpEaSMVG3+IGTVos+feuatj7ljQ4BXlXdUp3w==} peerDependencies: algoliasearch: '>= 3.1 < 6' - algoliasearch@5.54.0: - resolution: {integrity: sha512-APAX4ajIOgsmYoUlGe++oNZkSTBgmXYM4maHC0OxC+Yo7xkaKQElV0ATZYCZA7jzrSJX1OBiqEs7mk+ZxXgYqA==} + algoliasearch@5.56.0: + resolution: {integrity: sha512-PrqppUmhT4ENdas2pH9caE7efUcxy6EcSFhWzosiVuQBzu2tQ5yLTI6jwomT/1cuBnivzGfxiJCqDNN9FRRh+Q==} engines: {node: '>= 14.0.0'} ansi-align@3.0.1: @@ -6010,10 +5976,6 @@ packages: resolution: {integrity: sha512-ZcbTaIqJOfCc03QwD468Unz/5Ir8ATtvAHsK+FdXbDIbGfihqh9mrvdcYunQzqn4HrvWWaFyaxJhGZagaJJpPQ==} engines: {node: '>= 14'} - archiver@8.0.0: - resolution: {integrity: sha512-fV1orZfsnPn9BaSByR/qE67rJCLJEy2Ox5bq7nJh+jquWaNh6Sfec75kJ2T6PtdGUbPQlrVoSVCEOa5SdiTQ1g==} - engines: {node: '>=18'} - are-we-there-yet@2.0.0: resolution: {integrity: sha512-Ci/qENmwHnsYo9xKIcUJN5LeDKdJ6R1Z1j9V/J5wyq8nh/mYPEpIKJbBZXtZjG04HiK7zV/p6Vs9952MrMeUIw==} engines: {node: '>=10'} @@ -6022,9 +5984,6 @@ packages: arg@5.0.2: resolution: {integrity: sha512-PYjyFOLKQ9y57JvQ6QLo8dAgNqswh8M1RMJYdQduT6xbWSgK36P/Z/v+p888pM69jMMfS8Xd8F6I1kQ/I9HUGg==} - argparse@1.0.10: - resolution: {integrity: sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==} - argparse@2.0.1: resolution: {integrity: sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==} @@ -6090,8 +6049,8 @@ packages: autocomplete.js@0.37.1: resolution: {integrity: sha512-PgSe9fHYhZEsm/9jggbjtVsGXJkPLvd+9mC7gZJ662vVL5CRWEtm/mIrrzCx0MrNxHVwxD5d00UOn6NsmL2LUQ==} - autoprefixer@10.5.0: - resolution: {integrity: sha512-FMhOoZV4+qR6aTUALKX2rEqGG+oyATvwBt9IIzVR5rMa2HRWPkxf+P+PAJLD1I/H5/II+HuZcBJYEFBpq39ong==} + autoprefixer@10.5.4: + resolution: {integrity: sha512-MaU0U/za7N3r6brxD4YB/l4NSrFzLPlANv6wEuQVaIPlD3L4W9rFcQPbL/EilY9BHhHvhfcz3gInDLrEtWT4EA==} engines: {node: ^10 || ^12 || >=14} hasBin: true peerDependencies: @@ -6160,21 +6119,17 @@ packages: bare-abort-controller: optional: true - bare-fs@4.7.2: - resolution: {integrity: sha512-aTvMFUWkBmjzKtEQMDGGDNF8bkfpD5N1b/FCwt7A3wrU4t1o/e/85Wzkluh6JlODCjqVESYCkQCdTXqZ9G7VFg==} - engines: {bare: '>=1.16.0'} + bare-fs@4.8.0: + resolution: {integrity: sha512-fM+MhCvdQhZ7NV6S95a07gPSqjIYKn6mFaXfx266wN3ajZGl/+1AzH+ubkXQ0fFZvOe2nk9VHkzdYkQE5zMV3Q==} + engines: {bare: '>=1.28.0'} peerDependencies: bare-buffer: '*' peerDependenciesMeta: bare-buffer: optional: true - bare-os@3.9.1: - resolution: {integrity: sha512-6M5XjcnsygQNPMCMPXSK379xrJFiZ/AEMNBmFEmQW8d/789VQATvriyi5r0HYTL9TkQ26rn3kgdTG3aisbrXkQ==} - engines: {bare: '>=1.14.0'} - - bare-path@3.0.1: - resolution: {integrity: sha512-ghj2DSK/2e99a1anTVPCV4m4YIYtrbXhfM7V3D7XZLOTsybnYyaJloymGqssQc8l/or0UoDyRtNQkmkEF/ysgQ==} + bare-path@3.1.1: + resolution: {integrity: sha512-JprUlveX3QjApC1cTpsUOiscADftCGVWkzitbHsRqv84hzYwYHw2mbluddsq5TvI8mH/8Ov1f4BiMAdcB0oYnQ==} bare-stream@2.13.3: resolution: {integrity: sha512-Kc+brLqvEqGkjyfiwJmImAOqLZL7OsoLKuavx+hJjgVV3nLTOjloJyPMFxjUPerGGHrNH0fLU06jjykMLWrERQ==} @@ -6190,8 +6145,8 @@ packages: bare-events: optional: true - bare-url@2.4.5: - resolution: {integrity: sha512-K+y9xF1tN+CdPu4qWwr0QiK1Al07eFPGYK5M2pDXcmHdMdgC/tT/bpmMe1hrmRHaidKLkXrC+cRNYf3XVDUhSQ==} + bare-url@2.5.1: + resolution: {integrity: sha512-cD5ciQuKlx+eumTCfqbfiL+fhQm+dHbVNB/cX4+d+I/nx4JsVop9VoFEPAs5RJ6I84QR6bZIBjpd2kjDOYeWcg==} base64-js@1.5.1: resolution: {integrity: sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==} @@ -6200,8 +6155,8 @@ packages: resolution: {integrity: sha512-lGe34o6EHj9y3Kts9R4ZYs/Gr+6N7MCaMlIFA3F1R2O5/m7K06AxfSeO5530PEERE6/WyEg3lsuyw4GHlPZHog==} engines: {node: ^4.5.0 || >= 5.9} - baseline-browser-mapping@2.10.37: - resolution: {integrity: sha512-girxaJ7WZssDOFhzCGZTDKoTa1gk6A1TbflaYTpykLJ4UU9Fz9kx1aREM8JCuoVHbL8X8T/mJg7w2oYSq72Oig==} + baseline-browser-mapping@2.10.43: + resolution: {integrity: sha512-AjYpR78kDWAY3Efj+cDTFH9t9SCoL7OoTp1BOb0mQV7S+6CiLwnWM3FyxhJtdPufDFKzmCSFoUncKjWgJEZTCQ==} engines: {node: '>=6.0.0'} hasBin: true @@ -6239,16 +6194,16 @@ packages: bl@4.1.0: resolution: {integrity: sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==} - body-parser@1.20.5: - resolution: {integrity: sha512-3grm+/2tUOvu2cjJkvsIxrv/wVpfXQW4PsQHYm7yk4vfpu7Ekl6nEsYBoJUL6qDwZUx8wUhQ8tR2qz+ad9c9OA==} + body-parser@1.20.6: + resolution: {integrity: sha512-p5tAzS57i5MV9fZFDj9LeIiTZEufbSe2eDozP+ElheSUq1m74CRq1jI4mYNDdVs9vQztXFLuk/Gd6BWTdwRJ5g==} engines: {node: '>= 0.8', npm: 1.2.8000 || >= 1.4.16} - body-parser@2.2.2: - resolution: {integrity: sha512-oP5VkATKlNwcgvxi0vM0p/D3n2C3EReYVX+DNYs5TjZFn/oQt2j+4sVJtSMr18pdRr8wjTcBl6LoV+FUwzPmNA==} + body-parser@2.3.0: + resolution: {integrity: sha512-2cGmJupaNgg+QUwVLAucDuWuoMZ6EX9iHDRswZ5lsNYEmwPaRknMPCLZz07yTzVq/83p4o/wzbDZbBrTvGGTIw==} engines: {node: '>=18'} - bonjour-service@1.4.1: - resolution: {integrity: sha512-9KM4QMPKnaJqaja1v7gYO/+TXZGLtzPA05NmUTqDAJjcsWeVoOXKMvU9g0gfuuoYTQqJZ924hivICd5R/bCJbA==} + bonjour-service@1.4.3: + resolution: {integrity: sha512-2Kd5UYlFUVgAKMTyuBLl6w49wqfOnbxHqmuH0oCl/n7TfAikR0zoowNOP5BU4dfXmm+Vr9JyEN370auSMx+CNg==} boolbase@1.0.0: resolution: {integrity: sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww==} @@ -6267,16 +6222,16 @@ packages: brace-expansion@2.1.1: resolution: {integrity: sha512-WR1cURNjuvBLMZBMbqM0UoE+WAfdUcEV1ccD8PVBVOI+Z3ND4+SZbN8RsfT2bMuG1qwz5RFvPukSZm5fF2D5eA==} - brace-expansion@5.0.6: - resolution: {integrity: sha512-kLpxurY4Z4r9sgMsyG0Z9uzsBlgiU/EFKhj/h91/8yHu0edo7XuixOIH3VcJ8kkxs6/jPzoI6U9Vj3WqbMQ94g==} - engines: {node: 18 || 20 || >=22} + brace-expansion@5.0.8: + resolution: {integrity: sha512-JZyDyq3D4AUifKTPOB7DELf6XsB3WdPuNxCtob1vFXPsSXhdAiHBWJ/tJ8HAc9aH84BK+5JFZLNkJKx3G9kzQg==} + engines: {node: 20 || >=22} braces@3.0.3: resolution: {integrity: sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==} engines: {node: '>=8'} - browserslist@4.28.2: - resolution: {integrity: sha512-48xSriZYYg+8qXna9kwqjIVzuQxi+KYWp2+5nCYnYKPTr0LvD89Jqk2Or5ogxz0NUMfIjhh2lIUX/LyX9B4oIg==} + browserslist@4.28.6: + resolution: {integrity: sha512-FQBYNK15VMslhLHpA7+n+n1GOlF1kId2xcCg7/j95f24AOF6VDYMNH4mFxF7KuaTdv627faazpOAjFzMrfJOUw==} engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} hasBin: true @@ -6308,8 +6263,8 @@ packages: resolution: {integrity: sha512-02yxLeyxF4dNl6SlY6/5HfRSrSdZ/sCPoxy2kZNP5dZZX8LSAD9aE2gtJIUgWrsQTiMPl3mxESyrobSwvRGisQ==} engines: {node: '>=18.20'} - bullmq@5.78.1: - resolution: {integrity: sha512-zD5IT+qMqbMgPFPdL9FwnZka1bz6nckM+5lXj4N0vsXqdzoVO6wizmXpwsg/4GnHmXJsL7XOKeWA64tYUdPrOA==} + bullmq@5.81.3: + resolution: {integrity: sha512-Q7uEH2G92rVjX3Yl2qw3+6VEO15uxehC6DfeTHQBQTehddcRDSDuquD9zuvDjxiCffXsPUaBwrRlvlbVcgKs7g==} engines: {node: '>=12.22.0'} peerDependencies: redis: '>=5.0.0' @@ -6400,8 +6355,8 @@ packages: caniuse-api@3.0.0: resolution: {integrity: sha512-bsTwuIg/BZZK/vreVTYYbSWoe2F+71P7K5QGEX+pT250DZbfU1MQ5prOKpPR+LL6uWKK3KMwMCAS74QB3Um1uw==} - caniuse-lite@1.0.30001799: - resolution: {integrity: sha512-hG1bReV+OUU+MOqK4t/ZWI0tZOyz3rqS9XuhOUz1cIcbwBKjOyJEJuw9ER5JuNyqxNk8u/JUVbGibBOL1yrjFw==} + caniuse-lite@1.0.30001806: + resolution: {integrity: sha512-72Cuvd95zbSYPKq6Fhg8eDJRlzgWDf7/mtoZv6Qe/DYNCEBdNxoA3+rZAU2ZhGCpZlns3EssFavaZomckT5Uuw==} canvas@3.2.3: resolution: {integrity: sha512-PzE5nJZPz72YUAfo8oTp0u3fqqY7IzlTubneAihqDYAUcBk7ryeCmBbdJBEdaH0bptSOe2VT2Zwcb3UaFyaSWw==} @@ -6509,10 +6464,6 @@ packages: resolution: {integrity: sha512-D5J+kHaVb/wKSFcyyV75uCn8fiY4sV38XJoe4CUyGQ+mOU/fMVYUdH1hJC+CJQ5uY3EnW27SbJYS4X8BiLrAFg==} engines: {node: '>= 10.0'} - clean-regexp@1.0.0: - resolution: {integrity: sha512-GfisEZEJvzKrmGWkvfhgzcz/BllN1USeqD2V6tg14OAOgaCD2Z/PUEuxnAZ/nPvmaHRG7a8y77p1T/IRQ4D1Hw==} - engines: {node: '>=4'} - clean-stack@2.2.0: resolution: {integrity: sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==} engines: {node: '>=6'} @@ -6580,10 +6531,6 @@ packages: resolution: {integrity: sha512-rwHwUfXL40Chm1r08yrhU3qpUvdVlgkKNeyeGPOxnW8/SyVDvgRaed/Uz54AqWNaTCAThlj6QAs3TZcKI0xDEw==} engines: {node: '>=0.10.0'} - cluster-key-slot@1.1.2: - resolution: {integrity: sha512-RMr0FhtfXemyinomL4hrWcYJxmX6deFdCxpJzhDttxgO1+bcCnkk+9drydLVDmAMG7NE6aN/fl4F7ucU/90gAA==} - engines: {node: '>=0.10.0'} - codemirror-wrapped-line-indent@1.0.9: resolution: {integrity: sha512-oc976hHLt35u6Ojbhub+IWOxEpapZSqYieLEdGhsgFZ4rtYQtdb5KjxzgjCCyVe3t0yk+a6hmaIOEsjU/tZRxQ==} peerDependencies: @@ -6682,10 +6629,6 @@ packages: resolution: {integrity: sha512-6FqVXeETqWPoGcfzrXb37E50NP0LXT8kAMu5ooZayhWWdgEY4lBEEcbQNXtkuKQsGduxiIcI4gOTsxTmuq/bSg==} engines: {node: '>= 14'} - compress-commons@7.0.1: - resolution: {integrity: sha512-g0S8KAD8qf4+V//pr3BfB1aBnARLXNz2Gx+jmHU0LEriUuoQUOPOulVquHKTJ8+EAIIO7fhseNDr9wK5Q9FKBQ==} - engines: {node: '>=18'} - compressible@2.0.18: resolution: {integrity: sha512-AF3r7P5dWxL8MxyITRMlORQNaOA2IkAFaTr4k7BUumjPtRpGDTZpl0Pb1XCO6JeDCBdp126Cgs9sMxqSjgYyRg==} engines: {node: '>= 0.6'} @@ -6747,6 +6690,10 @@ packages: resolution: {integrity: sha512-j/O/d7GcZCyNl7/hwZAb606rzqkyvaDctLmckbxLzHvFBzTJHuGEdodATcP3yIRoDrLHkIATJuvzbFlp/ki2cQ==} engines: {node: '>=18'} + convert-hrtime@5.0.0: + resolution: {integrity: sha512-lOETlkIeYSJWcbbcvjRKGxVMXJR+8+OQb/mTPbA4ObPMytYIsUbuOE0Jzy60hjARYszq1id0j8KgVhC+WGZVTg==} + engines: {node: '>=12'} + convert-source-map@2.0.0: resolution: {integrity: sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==} @@ -6834,16 +6781,13 @@ packages: resolution: {integrity: sha512-piICUB6ei4IlTv1+653yq5+KoqfBYmj9bw6LqXoOneTMDXk5nM1qt12mFW1caG3LlJXEKW1Bp0WggEmIfQB34g==} engines: {node: '>= 14'} - crc32-stream@7.0.1: - resolution: {integrity: sha512-IBWsY8xznyQrcHn8h4bC8/4ErNke5elzgG8GcqF4RFPw6aHkWWRc7Tgw6upjaTX/CT/yQgqYENkxYsTYN+hW2g==} - engines: {node: '>=18'} - - crelt@1.0.6: - resolution: {integrity: sha512-VQ2MBenTq1fWZUH9DJNGti7kKv6EeAuYr3cLwxUWhIu1baTaXh4Ib5W2CqHVqib4/MqbYGJqiL3Zb8GJZr3l4g==} + crelt@1.0.7: + resolution: {integrity: sha512-aK6BbWfhf4U/wCcLHKPJl/xa6VkVstRaPywWtMKGwuOLc/wZTyQYuoxgvZnNsBvv7Kg3YTBQYYBCggcviQczuA==} cron-parser@4.9.0: resolution: {integrity: sha512-p0SaNjrHOnQeR8/VnfGbmg9te2kfyYSQ7Sc/j/6DtPL3JQvKxmjO9TSjNFpujqV3vEYYBvNNvXSxzyksBWAx1Q==} engines: {node: '>=12.0.0'} + deprecated: v4 is no longer maintained, upgrade to v5 cron@4.4.0: resolution: {integrity: sha512-fkdfq+b+AHI4cKdhZlppHveI/mgz2qpiYxcm+t5E5TsxX7QrLS1VE0+7GENEk9z0EeGPcpSciGv6ez24duWhwQ==} @@ -7288,6 +7232,10 @@ packages: detect-europe-js@0.1.2: resolution: {integrity: sha512-lgdERlL3u0aUdHocoouzT10d9I89VVhk0qNRmll7mXdGfJT1/wqZ2ZLA4oJAjeACPY5fT1wsbq2AT+GkuInsow==} + detect-indent@7.0.2: + resolution: {integrity: sha512-y+8xyqdGLL+6sh0tVeHcfP/QDd8gUgbasolJJpY7NgeQGSZ739bDtSiaiDgtoicy+mtYB81dKLxO9xRhCyIB3A==} + engines: {node: '>=12.20'} + detect-libc@2.1.2: resolution: {integrity: sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ==} engines: {node: '>=8'} @@ -7295,13 +7243,13 @@ packages: detect-node@2.1.0: resolution: {integrity: sha512-T0NIuQpnTvFDATNuHN5roPwSBG83rFsuO+MXXH9/3N1eFbn4wcPjttvjMLEPWJ0RGUYgQE7cGgS3tNxbqCGM7g==} - detect-port@1.6.1: - resolution: {integrity: sha512-CmnVc+Hek2egPx1PeTFVta2W78xy2K/9Rkf6cC4T59S50tVnzKj+tnx5mmx5lwvCkujZ4uRrpRSuV+IVs3f90Q==} - engines: {node: '>= 4.0.0'} + detect-port@2.1.0: + resolution: {integrity: sha512-epZuWb/6Q62L+nDHJc/hQAqf8pylsqgk3BpZXVBx1CDnr3nkrVNn73Uu1rXcFzkNcc+hkP3whuOg7JZYaQB65Q==} + engines: {node: '>= 16.0.0'} hasBin: true - devalue@5.8.1: - resolution: {integrity: sha512-4CXDYRBGqN+57wVJkuXBYmpAVUSg3L6JAQa/DFqm238G73E1wuyc/JhGQJzN7vUf/CMphYau2zXbfWzDR5aTEw==} + devalue@5.9.0: + resolution: {integrity: sha512-RWrqdArjvPbsATEhOPUo6Wndc/iWnkWKlhIrdlF3zMMYo/c3CVtoaVAyLtWxz5h8nSlkHzxnzV2uLydPXmtF+A==} devlop@1.1.0: resolution: {integrity: sha512-RWmIqhcFf1lRYBvNmr7qTNuyCt/7/ns2jbpp1+PalgE/rDQcBT0fioSMUpJ93irlUhC5hrg4cYqe6U+0ImW0rA==} @@ -7348,8 +7296,8 @@ packages: resolution: {integrity: sha512-XJgGhoR/CLpqshm4d3L7rzH6t8NgDFUIIpztYlLHIApeJjMZKYJMz2zxPsYxnejq5h3ELYSw/RBsi3t5h7gNTA==} engines: {node: '>= 8.0'} - dockerode@5.0.0: - resolution: {integrity: sha512-C52mvJ+7lcyhWNfrzVfFsbTrBfy/ezE9FGEYLpu17FUeBcCkxERk9nN7uDl/478ynDiQ4U+5DbQC2vENHkVEtQ==} + dockerode@5.0.1: + resolution: {integrity: sha512-avsq/xk4YPIrn0CgleX5bjT9Y8IT1p9PxrNQ++RBQ2WEyFfHCTDsT9kmyxz+H/axnjAwg8wJWEIuPGOUuNupiA==} engines: {node: '>= 14.17'} docusaurus-lunr-search@3.6.0: @@ -7389,8 +7337,8 @@ packages: resolution: {integrity: sha512-cgwlv/1iFQiFnU96XXgROh8xTeetsnJiDsTc7TYCLFd9+/WNkIqPTxiM/8pSd8VIrhXGTf1Ny1q1hquVqDJB5w==} engines: {node: '>= 4'} - dompurify@3.4.10: - resolution: {integrity: sha512-0xzNv0e7oYC6yyuOGZIABPM4qtg3QxLFniDNPP4ZP90wR8Yq3zgwpRbrNiT4N3IKqDbbYFEJLV+JWEs19aZ//w==} + dompurify@3.4.12: + resolution: {integrity: sha512-zQvGet8Z2sWbQhCmfFz/T5QWH2oBmjnqK3qvOjaqaNLrLEF912WamU+ohnTp0TCep/MFVHpdJuCZEdFOdTnEFg==} domutils@2.8.0: resolution: {integrity: sha512-w96Cjofp72M5IIhpjgobBimYEfoPjx1Vx0BSX9P30WBdZW2WIKU0T1Bd0kz2eNZ9ikjKgHbEyKx8BB6H1L3h3A==} @@ -7432,8 +7380,8 @@ packages: ee-first@1.1.1: resolution: {integrity: sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==} - electron-to-chromium@1.5.372: - resolution: {integrity: sha512-M3yhbAlilnwqC8D21t28UCDGHyitShTmmLRU/H+b74P6Ski16Nb9HONYEaVpMj/pwC7BEo5B95FpjODLCWbtfA==} + electron-to-chromium@1.5.392: + resolution: {integrity: sha512-1yQq3VQCZRwsnYc67Oc+1fge6Lwtn0hzi6zmEVkB61Zx21kTbwJAW4dFLadl5Rc1tKhG/kSpYXnfiAhu0f0a1g==} emoji-regex@10.6.0: resolution: {integrity: sha512-toUI84YS5YmxW219erniWD0CIVOo46xGKColeNQRgOzDorgBi1v4D71/OFzgD9GO2UGKIv1C3Sp8DAn0+j5w7A==} @@ -7472,12 +7420,8 @@ packages: resolution: {integrity: sha512-2agL3ueZhqxoVrfmntO8yuVj+uNSlIOnhykYHk3Cq0ShYPdUjjUiSJrQvXjq01I9jAuI0Zl2YO8Evv5Mqytm5g==} engines: {node: '>=10.2.0'} - enhanced-resolve@5.21.6: - resolution: {integrity: sha512-aNnGCvbJ/RIyWo1IuhNdVjnNF+EjH9wpzpNHt+ci/m9He9LJvUN8wrCcXjp9cWsGNAuvSpVFTx/vraAFQ8qGjQ==} - engines: {node: '>=10.13.0'} - - enhanced-resolve@5.24.0: - resolution: {integrity: sha512-SkE2t82KlkkxQRVMVLAGKxLfORGQfrkx5dkj+vlgXRVNEdPc4eZcR+J/Fvj8C+yKSFH5L0q3NFlyufOVQnCcYQ==} + enhanced-resolve@5.24.4: + resolution: {integrity: sha512-GVoi+ICHocoOIU7qVVM48wOJziRsqrsyqlI0Ce0LdowRn6v3bcH2zUa9kp85ncx0nwIb9/HOCOLS3fdThDG/XQ==} engines: {node: '>=10.13.0'} entities@2.2.0: @@ -7517,8 +7461,8 @@ packages: es-module-lexer@1.7.0: resolution: {integrity: sha512-jEQoCwk8hyb2AZziIOLhDqpm5+2ww5uIE6lkO/6jcOCusfk6LhMHpXXfBLXTZ7Ydyt0j4VoUQv6uGNYbdW+kBA==} - es-module-lexer@2.1.0: - resolution: {integrity: sha512-n27zTYMjYu1aj4MjCWzSP7G9r75utsaoc8m61weK+W8JMBGGQybd43GstCXZ3WNmSFtGT9wi59qQTW6mhTR5LQ==} + es-module-lexer@2.3.1: + resolution: {integrity: sha512-shc1dbU90Yl/xq1QrC7QRtfcwURZuVRfPhZbDoldJ1cn1gzDvBaBWlv0eFolj5+0znnPJz5TXLxsN77X/12KTA==} es-object-atoms@1.1.2: resolution: {integrity: sha512-HWcBoN6NileqtSydK2FqHbS/LoDd2pqrnQHLyJzBj4kOp/ky2MWMN694xOfkK8/SnUsW2DH7EfyVlydKCsm1Zw==} @@ -7528,8 +7472,8 @@ packages: resolution: {integrity: sha512-j6vWzfrGVfyXxge+O0x5sh6cvxAog0a/4Rdd2K36zCMV5eJ+/+tOAngRO8cODMNWbVRdVlmGZQL2YS3yR8bIUA==} engines: {node: '>= 0.4'} - es-toolkit@1.47.1: - resolution: {integrity: sha512-5RAqEwf4P4E17p+W75KLOWw/nOvKZzSQpxM32IpI2KZLaVonjTrZ0Ai5ghMaVI9eKC2p8eoQgcBdkEDgzFk6+Q==} + es-toolkit@1.49.0: + resolution: {integrity: sha512-G5iZ6Pc/FNRY/soKZHC+TxGDD83rHUDXxzaWhGCX44vAv/tMs56WMusnm/KMNK+luUPsgA9U28cGr4RDlSzL2g==} es5-ext@0.10.64: resolution: {integrity: sha512-p2snDhiLaXe6dahss1LddxqEm+SkuDvV8dnIQG0MWjyHpcMNfXKPE+/Cc0y+PhxJX3A4xGNeFCj5oc0BUh6deg==} @@ -7561,13 +7505,8 @@ packages: engines: {node: '>=18'} hasBin: true - esbuild@0.27.7: - resolution: {integrity: sha512-IxpibTjyVnmrIQo5aqNpCgoACA/dTKLTlhMHihVHhdkxKyPO1uBBthumT0rdHmcsk9uMonIWS0m4FljWzILh3w==} - engines: {node: '>=18'} - hasBin: true - - esbuild@0.28.1: - resolution: {integrity: sha512-HrJrvZv5ayxBzPfwphOoNzkzOIIlifzk0KJrGK2c8R4+LKpMtpYLQeUdjnwjWv/LZlkH2laZk+4w78pi99D4Vw==} + esbuild@0.28.2: + resolution: {integrity: sha512-HKVLS8dvII+xoKW9kmqxbRKrnWEXfJJr/FZhhJmiqIB0e053QNYFqOBouTMO/k5sID4MvCiUCvv8b9M4h32wIA==} engines: {node: '>=18'} hasBin: true @@ -7600,8 +7539,8 @@ packages: peerDependencies: eslint: '>=7.0.0' - eslint-plugin-better-tailwindcss@4.6.0: - resolution: {integrity: sha512-Xeh/6KzLeays6jXSqTKx6iCdJL1qo5ant/mAabbz7dJqADYebKUUPR2zXp1xuiqqJ3HIm+MN+Ql2m4Jp0BxkMQ==} + eslint-plugin-better-tailwindcss@4.7.0: + resolution: {integrity: sha512-lrdlVW4pzLPj/zX5HRqMhKPesGijDfRhnSRJMlNcsrCyJHsndmHCLKTiRNa1eREUZ6G3D3QjdLc+G4tlfGrmkw==} engines: {node: ^20.19.0 || ^22.12.0 || >=23.0.0} peerDependencies: eslint: ^7.0.0 || ^8.0.0 || ^9.0.0 || ^10.0.0 @@ -7633,8 +7572,8 @@ packages: eslint-config-prettier: optional: true - eslint-plugin-svelte@3.19.0: - resolution: {integrity: sha512-t3rNaZeXz4d2gG4uJyMEYfJCFKf22+SWbSizIIXIWKu4wM+XPLiMWuSSr/C5821JmFeN9ogK+eExbG+z+twyxw==} + eslint-plugin-svelte@3.22.0: + resolution: {integrity: sha512-O3qn0NePTWta+1o25dIThqeEP/hEQ3VxDK2LVO8SQ5wG9umLMvulK+m1yQ4JGOb2Pkl8IB0G1lpRV/HXDXSLTQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: eslint: ^8.57.1 || ^9.0.0 || ^10.0.0 @@ -7643,11 +7582,11 @@ packages: svelte: optional: true - eslint-plugin-unicorn@64.0.0: - resolution: {integrity: sha512-rNZwalHh8i0UfPlhNwg5BTUO1CMdKNmjqe+TgzOTZnpKoi8VBgsW7u9qCHIdpxEzZ1uwrJrPF0uRb7l//K38gA==} - engines: {node: ^20.10.0 || >=21.0.0} + eslint-plugin-unicorn@72.0.0: + resolution: {integrity: sha512-hqO6ksoOHO+ZhdseTuKRVQbx9U7PRO/cv8qAR1mctwzdVO2hYud8uS9luAhp43RJgziYgHAph8eHyipT8GL0ng==} + engines: {node: '>=22'} peerDependencies: - eslint: '>=9.38.0' + eslint: '>=10.4' eslint-scope@5.1.1: resolution: {integrity: sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==} @@ -7673,8 +7612,8 @@ packages: resolution: {integrity: sha512-tD40eHxA35h0PEIZNeIjkHoDR4YjjJp34biM0mDvplBe//mB+IHCqHDGV7pxF+7MklTvighcCPPZC7ynWyjdTA==} engines: {node: ^20.19.0 || ^22.13.0 || >=24} - eslint@10.5.0: - resolution: {integrity: sha512-1y+7C+vi12bUK1IpZeaV3gsH9fHLBmPvYmPx42pvT/E9yG0IC8g3PUZZgp0+JLJl7ZDK0flc2gc+Aw9dpCvIsQ==} + eslint@10.8.0: + resolution: {integrity: sha512-nuKKvN+oIBO0koN7Tm7dlkmnkc21mtt0QJLwAKzjLq14y6lRTdVG36MZHJ8eQHwdJMwZbQNMlPOYedMq/oVJvQ==} engines: {node: ^20.19.0 || ^22.13.0 || >=24} hasBin: true peerDependencies: @@ -7707,8 +7646,8 @@ packages: resolution: {integrity: sha512-Ap6G0WQwcU/LHsvLwON1fAQX9Zp0A2Y6Y/cJBl9r/JbW90Zyg4/zbG6zzKa2OTALELarYHmKu0GhpM5EO+7T0g==} engines: {node: '>=0.10'} - esrap@2.2.11: - resolution: {integrity: sha512-gPdx+I+BjYEinNMQaBXFjbaJVyoPMU4ZODg5mE+M4DqVG9VusAVHHjcBX+zqyITlI0DIARwDMMzZwAWj36dRoQ==} + esrap@2.2.13: + resolution: {integrity: sha512-m8jH5hZgJE2RRUK/jjkGPcJEDAV+dYnZYFkosQaPTcE+Yw4xynXHOo6FUdwaWBtdR3b1MMa7wEDTSHeR2VWsGA==} peerDependencies: '@typescript-eslint/types': ^8.2.0 peerDependenciesMeta: @@ -7812,8 +7751,8 @@ packages: resolution: {integrity: sha512-XYfuKMvj4O35f/pOXLObndIRvyQ+/+6AhODh+OKWj9S9498pHHn/IMszH+gt0fBCRWMNfk1ZSp5x3AifmnI2vg==} engines: {node: '>=6'} - expect-type@1.3.0: - resolution: {integrity: sha512-knvyeauYhqjOYvQ66MznSMs83wmHrCycNEN6Ao+2AeYEfxUIkuiVxdEa1qlGEPK+We3n0THiDciYSsCcgW/DoA==} + expect-type@1.4.0: + resolution: {integrity: sha512-KfYbmpRm0VbLjEvVa9yGwCi9GI34xvi7A/HXYWQO65CSD2u3MczUJSuwXKFIxlGsgBQizV9q5J9NHj4VG0n+pA==} engines: {node: '>=12.0.0'} exponential-backoff@3.1.3: @@ -7867,8 +7806,8 @@ packages: fast-safe-stringify@2.1.1: resolution: {integrity: sha512-W+KJc2dmILlPplD/H4K9l9LcAHAfPtP6BY84uVLXQ6Evcz9Lcg33Y2z1IVblT6xdY54PXYVHEv+0Wpq8Io6zkA==} - fast-uri@3.1.2: - resolution: {integrity: sha512-rVjf7ArG3LTk+FS6Yw81V1DLuZl1bRbNrev6Tmd/9RaroeeRRJhAt7jg/6YFxbvAQXUCavSoZhPPj6oOx+5KjQ==} + fast-uri@3.1.4: + resolution: {integrity: sha512-8JnbkQ4juDyvYs4mgFGQqg4yCYtFDtUtmp2QIQq11ZZe5CFQ5wcqm1rqDgAh/QdMySuBnPzMUiJUNZG5N/AiQw==} fastq@1.20.1: resolution: {integrity: sha512-GGToxJ/w1x32s/D2EKND7kTil4n8OVk/9mycTc4VDza13lOvpUZTGX3mFSCtV9ksdGBVzvsyAVLM6mHFThxXxw==} @@ -7957,8 +7896,8 @@ packages: resolution: {integrity: sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==} hasBin: true - flatted@3.4.2: - resolution: {integrity: sha512-PjDse7RzhcPkIJwy5t7KPWQSZ9cAbzQXcafsetQoD7sOJRQlGikNbx7yZp2OotDnJyrDcbyRq3Ttb18iYOqkxA==} + flatted@3.4.3: + resolution: {integrity: sha512-/zipXxyO6rGvuNGDiULY9MvEGSkb2gaG4GGH4ygMi0ZZzyMHdUZBmntJmx5x1G2VuPytCwGN4xsJP6cw+sK+vQ==} fluent-ffmpeg@2.1.3: resolution: {integrity: sha512-Be3narBNt2s6bsaqP6Jzq91heDgOEaDCJAXcE3qcma/EJBSy5FB4cvO31XBInuAuKBx8Kptf8dkhjK0IOru39Q==} @@ -8026,8 +7965,8 @@ packages: resolution: {integrity: sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ==} engines: {node: '>=12'} - fs-extra@11.3.5: - resolution: {integrity: sha512-eKpRKAovdpZtR1WopLHxlBWvAgPny3c4gX1G5Jhwmmw4XJj0ifSD5qB5TOo8hmA0wlRKDAOAhEE1yVPgs6Fgcg==} + fs-extra@11.3.6: + resolution: {integrity: sha512-w8ZNZr2mKIc7qeNaQ9AVPT1+iFaI+Avd4xudVOvdDJ8VytREi1Ft5Ih7hd9jjehod8vAM5GMsfQ/TpPf4EyoEA==} engines: {node: '>=14.14'} fs-minipass@2.1.0: @@ -8053,6 +7992,14 @@ packages: function-bind@1.1.2: resolution: {integrity: sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==} + function-timeout@1.0.2: + resolution: {integrity: sha512-939eZS4gJ3htTHAldmyyuzlrD58P03fHG49v2JfFXbV6OhvZKRC9j2yAtdHw/zrp2zXHuv05zMIy40F0ge7spA==} + engines: {node: '>=18'} + + fuse.js@7.5.0: + resolution: {integrity: sha512-sQtrEfA+ez/3G0cCZecF70oqpCRttCexYUG4mUrtWL49ULUzUyxokt5kyqwtKzj1270RaKih+hcP3qLcumccow==} + engines: {node: '>=10'} + gauge@3.0.2: resolution: {integrity: sha512-+5J6MS/5XksCuXq++uFRsnUd7Ovu1XenbeuIuNRJxYWjgQbPuFhT14lAvsWfqfAmnwluf1OwMjz39HjfLPci0Q==} engines: {node: '>=10'} @@ -8069,8 +8016,8 @@ packages: geo-coordinates-parser@1.7.4: resolution: {integrity: sha512-gVGxBW+s1csexXVMf5bIwz3TH9n4sCEglOOOqmrPk8YazUI5f79jCowKjTw05m/0h1//3+Z2m/nv8IIozgZyUw==} - geo-tz@8.1.7: - resolution: {integrity: sha512-skkwQunTD1hpixwESUv8GeLLl8DElpUmnZfp9trQVgVGVIRTeQJHmCcWELCr8lsiVKdu661TWzR9hsdlGCEEKA==} + geo-tz@8.1.8: + resolution: {integrity: sha512-i+5koPn3/fzDkEROczIu3QqCEg0uQi2xugDjaVaarK0djuJorLeKHtWrscIGhnsbpPMHc5cLluaRxu3HXtU1ZA==} engines: {node: '>=16'} geobuf@3.0.2: @@ -8096,9 +8043,9 @@ packages: get-own-enumerable-property-symbols@3.0.2: resolution: {integrity: sha512-I0UBV/XOz1XkIJHEUDMZAbzCThU/H8DxmSfmdGcKPnVhu2VfFqr34jr9777IyaTYvxjedWhqVIilEDsCdP5G6g==} - get-port@7.2.0: - resolution: {integrity: sha512-afP4W205ONCuMoPBqcR6PSXnzX35KTcJygfJfcp+QY+uwm3p20p1YczWXhlICIzGMCxYBQcySEcOgsJcrkyobg==} - engines: {node: '>=16'} + get-port@5.1.1: + resolution: {integrity: sha512-g/Q1aTSDOxFpchXC4i8ZWvxA1lnPqx/JHqcpIw0/LX9T8x/GBbi6YnlN5nhaKIFkT8oFsscUKgDJYxfwfS6QsQ==} + engines: {node: '>=8'} get-proto@1.0.1: resolution: {integrity: sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==} @@ -8166,8 +8113,8 @@ packages: resolution: {integrity: sha512-c/c15i26VrJ4IRt5Z89DnIzCGDn9EcebibhAOjw5ibqEHsE1wLUgkPn9RDmNcUKyU87GeaL633nyJ+pplFR2ZQ==} engines: {node: '>=18'} - globals@17.6.0: - resolution: {integrity: sha512-sepffkT8stwnIYbsMBpoCHJuJM5l98FUF2AnE07hfvE0m/qp3R586hw4jF4uadbhvg1ooIdzuu7CsfD2jzCaNA==} + globals@17.9.0: + resolution: {integrity: sha512-m/MvAW61QVU5VDNF1Vj8axt016h8w7L5TU1e9zlab7XIttAT2YAlCwl75K1fOqvMM9apmD7lbCIRhpfkhmxhCg==} engines: {node: '>=18'} globalyzer@0.1.0: @@ -8201,10 +8148,6 @@ packages: graph-data-structure@4.5.0: resolution: {integrity: sha512-OCeIzpK9JnV5js4gtDJgwebRbcOsZpoN9CNIwEooHkV/FNol+OykWPOugSTXBH/QICEW2N6U+6L2d9DcK4YBcw==} - gray-matter@4.0.3: - resolution: {integrity: sha512-5v6yZd4JK3eMI3FqqCouswVqwugaA9r4dNZB1wwcmrD02QkV5H0y7XBQW8QwQqEaZY1pM9aqORSORhJRdNK44Q==} - engines: {node: '>=6.0'} - gzip-size@6.0.0: resolution: {integrity: sha512-ax7ZYomf6jqPTQ4+XCpUGyXKHk5WweS+e05MBO4/y3WJ5RkmPXNKvX+bx1behVILVwr6JSQvZAku021CHPXG3Q==} engines: {node: '>=10'} @@ -8220,8 +8163,8 @@ packages: engines: {node: '>=0.4.7'} hasBin: true - happy-dom@20.10.3: - resolution: {integrity: sha512-Hjdiy8RziuCcn5z04QI/rlsNuQoG8P0xxjgvsSMpi89cvIXIOcucQtiHS1yHSShxoBcSCeYqAskINmTiy/mlfw==} + happy-dom@20.11.1: + resolution: {integrity: sha512-XSt8tMzbW9ymE7687xztkO1ckR7qJNQ3LywY9vlYGhGi3zXrGBHuUo2Cl1ztZaICW+1eAGdkLbj6iwVqDT33kg==} engines: {node: '>=20.0.0'} has-flag@4.0.0: @@ -8305,8 +8248,8 @@ packages: resolution: {integrity: sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==} hasBin: true - helmet@8.2.0: - resolution: {integrity: sha512-DRgTIUgnWcJ62KyarxxziuqYxKGnR6Rgg19BlbucN/dpmJbl1XOit6qvoOX0ZT+HhWe5OUVhU/a1zpGyc1xA0Q==} + helmet@8.3.0: + resolution: {integrity: sha512-Qgpiaws3Sm30Av8Eah6sjMCZZwjlBu+E68rhpCWBshY1lb09HtLwj5GviX0OyQIn+ulUS0iX0AxN5n3tLZzz1w==} engines: {node: '>=18.0.0'} highlight.js@11.11.1: @@ -8319,8 +8262,8 @@ packages: hls-video-element@1.5.11: resolution: {integrity: sha512-tJJ65/52CDxj8XFyIve6zT9nVVdUIc6mqvKR25X0ycPKHk07rpjp4xxVteeCefDUBSf/tFLhlICFmn3KWj37xA==} - hls.js@1.6.16: - resolution: {integrity: sha512-VSIRpLfRwlAAdGL4wiTucx2ScRipo0ed1FBatWkyt832jC4CReKstga6yIhYVwGu9LOBjuX9wzmRMeQdBJtzEA==} + hls.js@1.6.17: + resolution: {integrity: sha512-NUplVGVuc1hSPwdB/9/cbRkUmLrYi75/hqiXKdA+l300pJNxDu96R7jRb2imDzWJqIUF4I5ThmAdp9GvOCXsuQ==} hogan.js@3.0.2: resolution: {integrity: sha512-RqGs4wavGYJWE07t35JQccByczmNUXQT0E12ZYV1VKYu5UiAU9lsos/yBAcf840+zrUQQxgVduCR5/B8nNtibg==} @@ -8372,6 +8315,9 @@ packages: webpack: optional: true + html5parser@3.0.0: + resolution: {integrity: sha512-iNpSopa+4YHX50UOk825tBy7MghmXHo/ZpLskBYN0kAr1xhH8GlIMk5bLRXcZlfP3AnLUcSuFMu8C4MdOUxA8A==} + htmlparser2@6.1.0: resolution: {integrity: sha512-gyyPk6rgonLFEDGoeRgQNaEUvdJ4ktTmmUh/h2t7s+M8oPpIPxgNACWa+6ESR57kXstwqPiCut0V8NRpcwgU7A==} @@ -8403,8 +8349,8 @@ packages: resolution: {integrity: sha512-T1gkAiYYDWYx3V5Bmyu7HcfcvL7mUrTWiM6yOfa3PIphViJ/gFPbvidQ+veqSOHci/PxBcDabeUNCzpOODJZig==} engines: {node: '>= 14'} - http-proxy-middleware@2.0.9: - resolution: {integrity: sha512-c1IyJYLYppU574+YI7R4QyX2ystMtVXZwIdzazUIPIJsHuWNd+mho2j+bKoHftndicGj9yh+xjd+l0yj7VeT1Q==} + http-proxy-middleware@2.0.10: + resolution: {integrity: sha512-RKzRWNPxUZqbuk3BC5mGVJbBnWgr+diEnjJexIOytFbBzDy88Fbh/YvBr3DsNrl1jYAfjWfpATEv0NO35FDuPQ==} engines: {node: '>=12.0.0'} peerDependencies: '@types/express': ^4.17.13 @@ -8448,8 +8394,8 @@ packages: resolution: {integrity: sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==} engines: {node: '>=0.10.0'} - iconv-lite@0.7.2: - resolution: {integrity: sha512-im9DjEDQ55s9fL4EYzOAv0yMqmMBSZp6G0VvFyTMPKWxiSBHUj9NW/qqLmXUwXrrM7AvqSlTCfvqRb0cM8yYqw==} + iconv-lite@0.7.3: + resolution: {integrity: sha512-IKXpvIzjnC9XTAUbVBcMfGS0EPaIXtW6v+zr+RRp+hqULEpo0owZax6wyRwPOJbWbzjYspQwusTsfVr0ifh4uQ==} engines: {node: '>=0.10.0'} icss-utils@5.1.0: @@ -8458,6 +8404,10 @@ packages: peerDependencies: postcss: ^8.1.0 + identifier-regex@1.1.0: + resolution: {integrity: sha512-SLX4H/vtcYlYnL7XqnuJKHU7Z8517TgsW9nmQiGOgMCjQ8V/deLYu6bEmbGoXe7WMMhc9+EUGyFFneHja8KabA==} + engines: {node: '>=18'} + ieee754@1.2.1: resolution: {integrity: sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==} @@ -8465,8 +8415,8 @@ packages: resolution: {integrity: sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==} engines: {node: '>= 4'} - ignore@7.0.5: - resolution: {integrity: sha512-Hs59xBNfUIunMFgWAbGX5cq6893IbWg4KnrjbYwX3tx0ztorVgTDA6B2sxf8ejHJ4wz8BqGUMYlnzNBer5NvGg==} + ignore@7.0.6: + resolution: {integrity: sha512-BAg6QkE8W+TuQLrrw0Ugr7HegXduRuuj8/ti2kSOc+jz1dmx8/WNcjr6XGnq5YpDWxFwwaavqD0+jIUOKelTsw==} engines: {node: '>= 4'} image-size@2.0.2: @@ -8481,8 +8431,8 @@ packages: immediate@3.3.0: resolution: {integrity: sha512-HR7EVodfFUdQCTIeySw+WDRFJlPcLOJbXfwwZ7Oom6tjsvZ3bOkCDJHehQC3nxJrv7+f9XecwazynjU8e4Vw3Q==} - immutable-json-patch@6.0.2: - resolution: {integrity: sha512-KwCA5DXJiyldda8SPha1zB+6+vbEi5/jRRcYii/6yFXlyu9ZjiSH/wPq8Ri2Hk8iGjjTMcHW3Z21S4MOpl7sOw==} + immutable-json-patch@6.0.3: + resolution: {integrity: sha512-qFLRzQLjteiTGy5tRJcYqvuu0r/GdQ1fE27IyNBrJ/k7yGSO0xFr6QX62TtmIqSvjQF3afcNFUHsGPYW7ydaHQ==} immutable@5.1.6: resolution: {integrity: sha512-q1swsS8K7L8usSHuOqF2TAoCCkonYz0SG38wLAggaa4Wml70zixIvt2ql4coQ2C2B3hTjltJry4r6bULwgAXLQ==} @@ -8549,16 +8499,12 @@ packages: intl-messageformat@10.7.18: resolution: {integrity: sha512-m3Ofv/X/tV8Y3tHXLohcuVuhWKo7BBq62cqY15etqmLxg2DZ34AGGgQDeR+SCta2+zICb1NX83af0GJmbQ1++g==} - intl-messageformat@11.2.8: - resolution: {integrity: sha512-l323RCl3qJDVQ8U9j74ut/hVMdg3VPsOHpVMDvFfz9qiq4dPO5ooVYFNVUzzrpgG39a+RLzcXyJb8VFgIU+tUA==} + intl-messageformat@11.2.13: + resolution: {integrity: sha512-JaPaE6TIX+TAS5XLhDUh41geLw4QfBHX4s5pW8Km+L9fVC8HzB9yOuhbh4EMR/F1+8C6b9qk4763Cv+LdOG1kg==} invariant@2.2.4: resolution: {integrity: sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA==} - ioredis@5.10.1: - resolution: {integrity: sha512-HuEDBTI70aYdx1v6U97SbNx9F1+svQKBDo30o0b9fw055LMepzpOOd0Ccg9Q6tbqmBSJaMuY0fB7yw9/vjBYCA==} - engines: {node: '>=12.22.0'} - ioredis@5.11.1: resolution: {integrity: sha512-ehuGcf94bQXhfagULNXrJdfnWO38v070jxSx/qE87Kjzmu2fU7ro5EFAb+OPituLqgfyuQaym5DlrNydW2sJ9A==} engines: {node: '>=12.22.0'} @@ -8632,6 +8578,10 @@ packages: is-hexadecimal@2.0.1: resolution: {integrity: sha512-DgZQp241c8oO6cA1SbTEWiXeoxV42vlcJxgH+B3hi1AiqqKruZR3ZGF8In3fj4+/y/7rHvlOZLZtgJ/4ttYGZg==} + is-identifier@1.1.0: + resolution: {integrity: sha512-NhOds0mDx9lJu+1lBRO0xbwFo5nobA7GCk/0e5xjr6+6XugX985+0OyGX35BNrTkPAsdLcIKg02HUQJOK8D8kw==} + engines: {node: '>=18'} + is-in-ssh@1.0.0: resolution: {integrity: sha512-jYa6Q9rH90kR1vKB6NM7qqd1mge3Fx4Dhw5TVlK1MUBqhEOuCagrEHMevNuCcbECmXZ0ThXkRm+Ymr51HwEPAw==} engines: {node: '>=20'} @@ -8716,10 +8666,6 @@ packages: resolution: {integrity: sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==} engines: {node: '>=8'} - is-stream@4.0.1: - resolution: {integrity: sha512-Dnz92NInDqYckGEUJv689RbRiTSEHCQ7wOVeALbkOz999YpqT46yMRIGtSNl2iCL1waAZSx40+h59NV/EwzV/A==} - engines: {node: '>=18'} - is-typedarray@1.0.0: resolution: {integrity: sha512-cyA56iCMHAh5CdzjJIa4aohJyeO1YbwLi3Jc35MmRU6poroFjIGZzUzupGiRPOjgHg9TLu43xbpwXk523fMxKA==} @@ -8817,8 +8763,8 @@ packages: joi@17.13.4: resolution: {integrity: sha512-1RuuER6kmt8K8I3nIWvPZKi5RQCb568ZPyY4Pwjlua+yo+63ZTmIwxLZH0heBmiKN4uxjvCiarDrjaeH84xicQ==} - jose@6.2.3: - resolution: {integrity: sha512-YYVDInQKFJfR/xa3ojUTl8c2KoTwiL1R5Wg9YCydwH0x0B9grbzlg5HC7mMjCtUJjbQ/YnGEZIhI5tCgfTb4Hw==} + jose@6.2.8: + resolution: {integrity: sha512-Bsdjwm3Qsd/P0jR+BHDe3LytDfY7WBq2HmCCLIwuVRHMuEC9ae7/R474GIUdF1NgCyZjzVo/A9DOiOBtXq8ZoQ==} js-tokens@10.0.0: resolution: {integrity: sha512-lM/UBzQmfJRo9ABXbPWemivdCW8V2G8FHaHdypQaIy523snUjog0W71ayWXTjiR+ixeMyVHN2XcpnTd/liPg/Q==} @@ -8829,16 +8775,16 @@ packages: js-tokens@9.0.1: resolution: {integrity: sha512-mxa9E9ITFOt0ban3j6L5MpjwegGz6lBQmM1IJkWeBZGcMxto50+eWdjC/52xDbS2vy0k7vIMK0Fe2wfL9OQSpQ==} - js-yaml@3.14.2: - resolution: {integrity: sha512-PMSmkqxr106Xa156c2M265Z+FTrPl+oxd/rgOQy2tijQeK5TxQ43psO1ZCwhVOSdnn+RzkzlRz/eY4BgJBYVpg==} + js-yaml@4.3.0: + resolution: {integrity: sha512-1td788aAnnZ5qs7V2QIRl1owjtYpbKt749Y3xauqQgwIIGF/xXWz1wMTEBx5O3LK3lXLVuqXPdPxj2BoFHaW9Q==} hasBin: true - js-yaml@4.1.1: - resolution: {integrity: sha512-qQKT4zQxXl8lLwBtHMWwaTcGfFOZviOJet3Oy/xmGk2gZH677CJM9EvtfdSkgWcATZhj/55JZ0rmy3myCT5lsA==} + js-yaml@5.2.1: + resolution: {integrity: sha512-zfLtNfQqxVqq3uaTqSkh4x4hZw3KHobGUA0fJUj4wawW8bsQLTVqpHdXSIzidh7o+4lEW36tANuAGdaFx6Zgnw==} hasBin: true - js-yaml@4.2.0: - resolution: {integrity: sha512-ePWsvanv0DWuDRsW8dnt+R4jQ31SCRCQ7hhNcPXZPsoBZiemuZNYGf7adZdqX2D86j6rvKp3RpCxVTSb8WQlOw==} + js-yaml@5.2.3: + resolution: {integrity: sha512-n+mUVyUX5bVv7G/G2zyIHOhdxfuU1dY2NOFzTQUWiMUbFss8b57NFlgCCaggU78wSw5KVS9cllzeLyzyR+n5nw==} hasBin: true jsdom@26.1.0: @@ -8899,8 +8845,8 @@ packages: engines: {node: '>=18.0.0'} hasBin: true - jsonrepair@3.14.0: - resolution: {integrity: sha512-tWPGKMZf/8UPim+fcW2EfcQ/d/7aKUrP6IECz9G3Tu6Q5dX0orSleqJ9z6sSw7qrQkjF8/Edo4DvsWBZ8H+HNg==} + jsonrepair@3.15.0: + resolution: {integrity: sha512-wy8OTjwsJwQRnQJkKnMJJ9vcytRdBPAgIF/Hy6+s1dAj42BHMKiyL8JzEieIl3JY7idt8eyHwBWTO8mh/+mtwA==} hasBin: true jsonwebtoken@9.0.3: @@ -9006,30 +8952,60 @@ packages: cpu: [arm64] os: [android] + lightningcss-android-arm64@1.33.0: + resolution: {integrity: sha512-gEpRTalKdosp4Bb8qWtc2iOgE5SeIHlpS1up9bFq2wAyYhl1UdTObYiHe98zEM9SQvSoqQZ1IQD0JNpg3Ml5pg==} + engines: {node: '>= 12.0.0'} + cpu: [arm64] + os: [android] + lightningcss-darwin-arm64@1.32.0: resolution: {integrity: sha512-RzeG9Ju5bag2Bv1/lwlVJvBE3q6TtXskdZLLCyfg5pt+HLz9BqlICO7LZM7VHNTTn/5PRhHFBSjk5lc4cmscPQ==} engines: {node: '>= 12.0.0'} cpu: [arm64] os: [darwin] + lightningcss-darwin-arm64@1.33.0: + resolution: {integrity: sha512-Sciaz8eenNTKn9b3t7+xr0ipTp9YxKQY4npwQ3mrRuL0BAVHBLyZxofhaKBAVtzmtRZ/zTyo0/to4B1uWG/Djg==} + engines: {node: '>= 12.0.0'} + cpu: [arm64] + os: [darwin] + lightningcss-darwin-x64@1.32.0: resolution: {integrity: sha512-U+QsBp2m/s2wqpUYT/6wnlagdZbtZdndSmut/NJqlCcMLTWp5muCrID+K5UJ6jqD2BFshejCYXniPDbNh73V8w==} engines: {node: '>= 12.0.0'} cpu: [x64] os: [darwin] + lightningcss-darwin-x64@1.33.0: + resolution: {integrity: sha512-Z5UPAxzrjlWNNyGy6i65cJzzvgJ5D3T6wMvs+gWpY9d7qRhANrxqAp6LhxIgZhWEw18RfJTGcRxjuLIBr+m8XQ==} + engines: {node: '>= 12.0.0'} + cpu: [x64] + os: [darwin] + lightningcss-freebsd-x64@1.32.0: resolution: {integrity: sha512-JCTigedEksZk3tHTTthnMdVfGf61Fky8Ji2E4YjUTEQX14xiy/lTzXnu1vwiZe3bYe0q+SpsSH/CTeDXK6WHig==} engines: {node: '>= 12.0.0'} cpu: [x64] os: [freebsd] + lightningcss-freebsd-x64@1.33.0: + resolution: {integrity: sha512-QQM/Ti/hQajJwCY+RiWuCZ9sdtI/XQk7nDK5vC8kkdwixezOlDgvDx7+RT+QjK6FcFT4MpsuoBnHIo/O3StRRg==} + engines: {node: '>= 12.0.0'} + cpu: [x64] + os: [freebsd] + lightningcss-linux-arm-gnueabihf@1.32.0: resolution: {integrity: sha512-x6rnnpRa2GL0zQOkt6rts3YDPzduLpWvwAF6EMhXFVZXD4tPrBkEFqzGowzCsIWsPjqSK+tyNEODUBXeeVHSkw==} engines: {node: '>= 12.0.0'} cpu: [arm] os: [linux] + lightningcss-linux-arm-gnueabihf@1.33.0: + resolution: {integrity: sha512-N7FVBe6iS24MlM6R/4RBTxGhQheZGs7tiQ9U32UtF75NzP5Q7xWPRqLBCKxlRQRk3rY1jCIPLzx7WzOhuUIRLQ==} + engines: {node: '>= 12.0.0'} + cpu: [arm] + os: [linux] + lightningcss-linux-arm64-gnu@1.32.0: resolution: {integrity: sha512-0nnMyoyOLRJXfbMOilaSRcLH3Jw5z9HDNGfT/gwCPgaDjnx0i8w7vBzFLFR1f6CMLKF8gVbebmkUN3fa/kQJpQ==} engines: {node: '>= 12.0.0'} @@ -9037,6 +9013,13 @@ packages: os: [linux] libc: [glibc] + lightningcss-linux-arm64-gnu@1.33.0: + resolution: {integrity: sha512-j2v/itmy4HlNxlc6voKXYgBqNi0Ng2LShg4z7GufpEgs05P+2suBVyi9I6YHq5uoVFx9ETin3eCEhLVyXGQnKg==} + engines: {node: '>= 12.0.0'} + cpu: [arm64] + os: [linux] + libc: [glibc] + lightningcss-linux-arm64-musl@1.32.0: resolution: {integrity: sha512-UpQkoenr4UJEzgVIYpI80lDFvRmPVg6oqboNHfoH4CQIfNA+HOrZ7Mo7KZP02dC6LjghPQJeBsvXhJod/wnIBg==} engines: {node: '>= 12.0.0'} @@ -9044,6 +9027,13 @@ packages: os: [linux] libc: [musl] + lightningcss-linux-arm64-musl@1.33.0: + resolution: {integrity: sha512-yiO5ROMuYQgXbC60yjZU5CYSFZGKXL0HFATXt9mHJn1+zW55oCtMI9NfcVhYLMFDL7gV7oBPon/EmMMGg2OvtQ==} + engines: {node: '>= 12.0.0'} + cpu: [arm64] + os: [linux] + libc: [musl] + lightningcss-linux-x64-gnu@1.32.0: resolution: {integrity: sha512-V7Qr52IhZmdKPVr+Vtw8o+WLsQJYCTd8loIfpDaMRWGUZfBOYEJeyJIkqGIDMZPwPx24pUMfwSxxI8phr/MbOA==} engines: {node: '>= 12.0.0'} @@ -9051,6 +9041,13 @@ packages: os: [linux] libc: [glibc] + lightningcss-linux-x64-gnu@1.33.0: + resolution: {integrity: sha512-ar+Ju7LmcN0Jo4FpL4hpFybwNG9/3A/Br5KW2n2jyODg3MEZXaDYADdemoNS+BDNfMgKvylJLj4S5tyRActuAg==} + engines: {node: '>= 12.0.0'} + cpu: [x64] + os: [linux] + libc: [glibc] + lightningcss-linux-x64-musl@1.32.0: resolution: {integrity: sha512-bYcLp+Vb0awsiXg/80uCRezCYHNg1/l3mt0gzHnWV9XP1W5sKa5/TCdGWaR/zBM2PeF/HbsQv/j2URNOiVuxWg==} engines: {node: '>= 12.0.0'} @@ -9058,22 +9055,45 @@ packages: os: [linux] libc: [musl] + lightningcss-linux-x64-musl@1.33.0: + resolution: {integrity: sha512-RYiYbkokw0trfKqqzfF55lginwEPrD3OJDfTuJzFs1MK6iFnDenaz1fqLLtX4ITG3OktJQXOeTaw1awrBAlZPw==} + engines: {node: '>= 12.0.0'} + cpu: [x64] + os: [linux] + libc: [musl] + lightningcss-win32-arm64-msvc@1.32.0: resolution: {integrity: sha512-8SbC8BR40pS6baCM8sbtYDSwEVQd4JlFTOlaD3gWGHfThTcABnNDBda6eTZeqbofalIJhFx0qKzgHJmcPTnGdw==} engines: {node: '>= 12.0.0'} cpu: [arm64] os: [win32] + lightningcss-win32-arm64-msvc@1.33.0: + resolution: {integrity: sha512-1K+MPfLSFVpphzpdbfkhlWk6wBrTObBzS2T6db10PNOZgR9GoVsAWzwNyuhUYYbTp23j+4RrncfujZ4uAzXvwA==} + engines: {node: '>= 12.0.0'} + cpu: [arm64] + os: [win32] + lightningcss-win32-x64-msvc@1.32.0: resolution: {integrity: sha512-Amq9B/SoZYdDi1kFrojnoqPLxYhQ4Wo5XiL8EVJrVsB8ARoC1PWW6VGtT0WKCemjy8aC+louJnjS7U18x3b06Q==} engines: {node: '>= 12.0.0'} cpu: [x64] os: [win32] + lightningcss-win32-x64-msvc@1.33.0: + resolution: {integrity: sha512-OlEICDx/Xl0FqSp4bry8zFnCvGpig3Gl4gCquvYwHuqJKEC1+n9NgDniFvqHGmMv1ZkqDJrDqKKSykTDX+ehuA==} + engines: {node: '>= 12.0.0'} + cpu: [x64] + os: [win32] + lightningcss@1.32.0: resolution: {integrity: sha512-NXYBzinNrblfraPGyrbPoD19C1h9lfI/1mzgWYvXUTe414Gz/X1FD2XBZSZM7rRTrMA8JL3OtAaGifrIKhQ5yQ==} engines: {node: '>= 12.0.0'} + lightningcss@1.33.0: + resolution: {integrity: sha512-WkUDrojuJs0xkgGf2udWxa3yGBRxPtxUkB79i6aCZLRgc7PM8fZe9TosfPDcvEpQZbuFASnHYmRLBLUbmLOIIA==} + engines: {node: '>= 12.0.0'} + lilconfig@2.1.0: resolution: {integrity: sha512-utWOt/GHzuUxnLKxB6dk81RoOeoNeHgbrXiuGk4yyF5qlRz+iIVWu56E2fqGHFrXz0QNUhLB/8nKqvRH66JKGQ==} engines: {node: '>=10'} @@ -9125,15 +9145,9 @@ packages: lodash.debounce@4.0.8: resolution: {integrity: sha512-FT1yDzDYEoYWhnSGnpE/4Kj1fLZkDFyqRb7fNt6FdYOSxlUWAtp42Eh6Wb0rGIv/m9Bgo7x4GhQbm5Ys4SG5ow==} - lodash.defaults@4.2.0: - resolution: {integrity: sha512-qjxPLHd3r5DnsdGacqOMU6pb/avJzdh9tFX2ymgoZE27BmjXrNy/y4LoaiTeAb+O3gL8AfpJGtqfX/ae2leYYQ==} - lodash.includes@4.3.0: resolution: {integrity: sha512-W3Bx6mdkRTGtlJISOvVD/lbqjTlPPUDTMnlXZFnVwi9NKJ6tiAk6LVdlhZMm17VZisqhKcgzpO5Wz91PCt5b0w==} - lodash.isarguments@3.1.0: - resolution: {integrity: sha512-chi4NHZlZqZD18a0imDHnZPrDeBbTtVN7GXMwuGdRH9qotxAjYs3aVLKc7zNOG9eddR5Ksd8rvFEBc9SsggPpg==} - lodash.isboolean@3.0.3: resolution: {integrity: sha512-Bz5mupy2SVbPHURB98VAcw+aHh4vRV5IPNhILUCsOzRmsTmSQ17jIuqopAentWoehktxGd9e/hbIXq980/1QJg==} @@ -9196,8 +9210,8 @@ packages: lru-cache@10.4.3: resolution: {integrity: sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==} - lru-cache@11.5.1: - resolution: {integrity: sha512-RPimw/7aMdv2oqRrxKwvZXcPfwBrn/JZ2xYcY9Hus/6LaS3VOAKVWKWgNLCFSiOm1ESXinjsDlidVU7JlnCN2A==} + lru-cache@11.5.2: + resolution: {integrity: sha512-4pfM1Ff0x50o0tQwb5ucw/RzNyD0/YJME6IVcStalZuMWxdt3sR3huStTtxz4PUmvZfRguvDejasvQ2kifR11g==} engines: {node: 20 || >=22} lru-cache@5.1.1: @@ -9229,6 +9243,10 @@ packages: magicast@0.5.3: resolution: {integrity: sha512-pVKE4UdSQ7DvHzivsCIFx2BJn1mHG6KsyrFcaxFx6tONdneEuThrDx0Cj3AMg58KyN4pzYT+LHOotxDQDjNvkw==} + make-asynchronous@1.1.0: + resolution: {integrity: sha512-ayF7iT+44LXdxJLTrTd3TLQpFDDvPCBxXxbv+pMUSuHA5Q8zyAfwkRP6aHHwNVFBUFWtxAHqwNJxF8vMZLAbVg==} + engines: {node: '>=18'} + make-dir@3.1.0: resolution: {integrity: sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==} engines: {node: '>=8'} @@ -9325,8 +9343,8 @@ packages: mdn-data@2.0.30: resolution: {integrity: sha512-GaqWWShW4kv/G9IEucWScBx9G1/vsFZZJUO+tD26M8J8z3Kw5RDQjaoZe03YAClgeS/SWPOcb4nkFBTEi5DUEA==} - mdn-data@2.28.1: - resolution: {integrity: sha512-U9w+PzSZ00Z5m9rZ5ARVFL5xOfuCHdKYi/1RRwDCJsboFgJDNT3zT6PIPD7mZQYaQLhsZM3GfDRgSMRHhSmVng==} + mdn-data@2.29.0: + resolution: {integrity: sha512-pVxQFCcaYUEAH853+v7yoI/qzhxXSq1bTb9obMYGYAN1c3Hen+XDCEvr296XhstrwlSTNgOR7mCSD4JPjbJe5A==} media-chrome@4.19.2: resolution: {integrity: sha512-4ai1ITN8wBhwugQcRgqe3tN0z6OSKGOXqHLNrS04MgKFfsLqu6Dm8MPq02pI9Y9ZKoXtFjIl85jOryIW9es3BA==} @@ -9346,8 +9364,8 @@ packages: resolution: {integrity: sha512-UERzLsxzllchadvbPs5aolHh65ISpKpM+ccLbOJ8/vvpBKmAWf+la7dXFy7Mr0ySHbdHrFv5kGFCUHHe6GFEmw==} engines: {node: '>= 4.0.0'} - memfs@4.57.7: - resolution: {integrity: sha512-YZPphUQZSRGk6ddPlsNuMbztrLwsbUATFNZcqKscSbSJZ4g0+Y3vSZLJ/rfnGZaB1FFhC7SrywZXev6i8lnHgg==} + memfs@4.64.0: + resolution: {integrity: sha512-Kw72fgY7Wn+sD8KmtNWSafl1dz0UvAsE/PHs3YVfLiaZuA3HxNm9sRLqAu0ATiBGJvME1PxZXbBZPv5GycDeAw==} peerDependencies: tslib: '2' @@ -9372,8 +9390,8 @@ packages: resolution: {integrity: sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==} engines: {node: '>= 8'} - mermaid@11.15.0: - resolution: {integrity: sha512-pTMbcf3rWdtLiYGpmoTjHEpeY8seiy6sR+9nD7LOs8KfUbHE4lOUAprTRqRAcWSQ6MQpdX+YEsxShtGsINtPtw==} + mermaid@11.16.0: + resolution: {integrity: sha512-Zvm3kbstgdpvIJPPItlL7fppIZ3kibvc1oZIGxdvk9t6UFz6flv+Jw7FtRGKwfcI8OckmH04LqG6LlS6X4B1pA==} methods@1.1.2: resolution: {integrity: sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==} @@ -9569,8 +9587,8 @@ packages: minimalistic-assert@1.0.1: resolution: {integrity: sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==} - minimatch@10.2.5: - resolution: {integrity: sha512-MULkVLfKGYDFYejP07QOurDLLQpcjk7Fw+7jXS2R2czRQzR56yHRveU5NDJEOviH+hETZKSkIk5c+T23GjFUMg==} + minimatch@10.2.6: + resolution: {integrity: sha512-vpLQEs+VLCr1nU0BXS07maYoFwlDAH0gngQuuttxIwutDFEMHq2blX+8vpgxDdK3J1PwjCJiep77OitTZ4Ll1A==} engines: {node: 18 || 20 || >=22} minimatch@3.1.5: @@ -9587,6 +9605,49 @@ packages: minimist@1.2.8: resolution: {integrity: sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==} + minimizer-webpack-plugin@5.6.1: + resolution: {integrity: sha512-DoeAZz8Q1C1znwsUzej1fdoi4jCf7/+Em27ouLqfK/+3m8G+D7yDhUwrc3CNhjSzGUN1kn7Iv4sWmjflQHenpw==} + engines: {node: '>= 10.13.0'} + peerDependencies: + '@minify-html/node': '*' + '@swc/core': '*' + '@swc/css': '*' + '@swc/html': '*' + clean-css: '*' + cssnano: '*' + csso: '*' + esbuild: '*' + html-minifier-terser: '*' + lightningcss: '*' + postcss: '*' + uglify-js: '*' + webpack: ^5.1.0 + peerDependenciesMeta: + '@minify-html/node': + optional: true + '@swc/core': + optional: true + '@swc/css': + optional: true + '@swc/html': + optional: true + clean-css: + optional: true + cssnano: + optional: true + csso: + optional: true + esbuild: + optional: true + html-minifier-terser: + optional: true + lightningcss: + optional: true + postcss: + optional: true + uglify-js: + optional: true + minipass@3.3.6: resolution: {integrity: sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==} engines: {node: '>=8'} @@ -9655,12 +9716,8 @@ packages: resolution: {integrity: sha512-4kmO/MdyUIkLIvTPr8VHLil4AtoKIoniWPIEk5+CDy0xnWC84azhSFmuJ7PxZdsYtiP5kEeQsORAVIeMgxT+Hw==} hasBin: true - msgpackr@2.0.2: - resolution: {integrity: sha512-c5hYOXFbP79Slh6Dzd2wzk+jnV7mX1UxfMYtilnY1NmalXPqG8DGb5cYCMBrW4AsH3zekBBZd4QrKz9NhtvYLQ==} - - multer@2.1.1: - resolution: {integrity: sha512-mo+QTzKlx8R7E5ylSXxWzGoXoZbOsRMpyitcht8By2KHvMbf3tjwosZ/Mu/XYU6UuJ3VZnODIrak5ZrPiPyB6A==} - engines: {node: '>= 10.16.0'} + msgpackr@2.0.5: + resolution: {integrity: sha512-cef05H/dSYpLpqp3sj/qyZh5vhUYCalnaLO7j1yOmpsR0y/XwLVtK7r5gn+U/F7CTEfMowcGhlUQJDLcLf7jcA==} multer@2.2.0: resolution: {integrity: sha512-6rdyFg2kLrMh9Jee7/BMPuV9lEAd7lLW2YUpF9/YxR7njyoUwwQ0ZPh3TaIY50Sw6vlyD2HW3wGOkTS4P79xrQ==} @@ -9687,17 +9744,17 @@ packages: mz@2.7.0: resolution: {integrity: sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q==} - nan@2.27.0: - resolution: {integrity: sha512-hC+0LidcL3XE4rp1C4H54KujgXKzbfyTngZTwBByQxsOxCEKZT0MPQ4hOKUH2jU1OYstqdDH4onyHPDzcV0XdQ==} + nan@2.28.0: + resolution: {integrity: sha512-fTsDz99OTq2sVePhGdp4qQhggZFtKr64ZNVyVajRKtMOkJxYekplBh577PiJB12v/D3s2E5cGtOI45LWp6rnLQ==} - nanoid@3.3.15: - resolution: {integrity: sha512-y7Wygv/7mEOvxTuEQDB8StXdMRBWf1kR/tlhAzBRUFkB2jfcLOAxO/SHmOO2zgz1pVgK29/kyupn059/bCHdjA==} + nanoid@3.3.18: + resolution: {integrity: sha512-DTg4MJbGMWkfi6VZFdNt2/caMbQy4Ou+Op/hJQvGEWcnVfoA1QA+xzRKAzw9jD6+GVOOeYr/mIcuDSdug6F6+w==} engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} hasBin: true - nanoid@5.1.11: - resolution: {integrity: sha512-v+KEsUv2ps74PaSKv0gHTxTCgMXOIfBEbaqa6w6ISIGC7ZsvHN4N9oJ8d4cmf0n5oTzQz2SLmThbQWhjd/8eKg==} - engines: {node: ^18 || >=20} + nanoid@6.0.1: + resolution: {integrity: sha512-3wVS3i51pE2pi1k5FFL/95BGfVS0kSsvDVuGXHOtxox/TywUmtgq+3qiTOTbs9J7KfHaXPiN171k/A6dBnaXFw==} + engines: {node: ^22 || ^24 || >=26} hasBin: true napi-build-utils@2.0.0: @@ -9752,15 +9809,16 @@ packages: kysely: 0.x reflect-metadata: ^0.1.13 || ^0.2.2 - nestjs-otel@8.0.3: - resolution: {integrity: sha512-48W0ksSnvRZSO7GUY3R76TeHtPwThAhjPOeyH7EOzhLnsrPQ7Msk8nPrU5FpTiIzUapoubdx+jfolRlJC8L21g==} + nestjs-otel@8.1.0: + resolution: {integrity: sha512-sT/Fj+ZDiDQiKAqlL11M7VwTZKr7r/M3wtK57AkFqWNDwCvViKfUU54ZKuNJphQFcM3fDuIWAUjVhpcVnHU9Jw==} engines: {node: '>= 22'} peerDependencies: '@nestjs/common': '>= 11 < 12' '@nestjs/core': '>= 11 < 12' + rxjs: ^7.1.0 - nestjs-zod@5.4.0: - resolution: {integrity: sha512-dxVpy1fjfK4kp+ztK+7xQP46fpvZxkeR/jcEdIvEGh/2o71iwXuy/hrKOWSPhJ1nQXV4iBdHqMizndn2GTaXDg==} + nestjs-zod@5.5.0: + resolution: {integrity: sha512-V0WMtmICygYE2RoMKk8ExEeoetkC7PoUmUlZNP4JNk1YgrnUnG1vgkRn2DBNqsDi+Obv3c9AOssmXe/k/AvBOg==} peerDependencies: '@nestjs/common': ^10.0.0 || ^11.0.0 '@nestjs/swagger': ^7.4.2 || ^8.0.0 || ^11.0.0 @@ -9822,12 +9880,12 @@ packages: engines: {node: ^22.22.2 || ^24.15.0 || >=26.0.0} hasBin: true - node-releases@2.0.47: - resolution: {integrity: sha512-Uzmd6LXpouKo8EUK68IjH4+E01w/hXyV3R3g/geCJo+rXLNfh1xucB+LOzYEOQPSiUK3h/xZf0cQGcSsmyL2Og==} + node-releases@2.0.51: + resolution: {integrity: sha512-wRNIrw4DmVLKQlbgOMdkMx27Wrpzes2hh5Jtbi2bjPd+4wJstWIqP5A+lscnqbm0xxmT5Bpg8Lec5ItEBwx6BQ==} engines: {node: '>=18'} - nodemailer@9.0.1: - resolution: {integrity: sha512-Gwv8SQewT616ZM/URn0H54b8PWo/Wum7md3EW2aWy1lO27+WZCX+Xyak3J+NlmHUjDh5ME+uesJUDRbR3Ye8Bw==} + nodemailer@9.0.4: + resolution: {integrity: sha512-LmJNRVRtfSCULxcZpy0Cpg4WWenlUZ9+zbmTO+S7v9wD6XreYLjXRFtDjtV/4F0HT5p1GyZfA0Ux/myxHb18CQ==} engines: {node: '>=6.0.0'} nopt@1.0.10: @@ -9919,8 +9977,8 @@ packages: resolution: {integrity: sha512-9miFgM2OFba7hB+pRgvtV84pYTBaoTHohvmIgiRt6dRIzbwEOIaNaP+dIlGs2fNFoB0SeISs0Jz5WFVRid6Xyg==} engines: {node: '>=12.20.0'} - oidc-provider@9.8.4: - resolution: {integrity: sha512-i8qe+wvhUQ7BSj6DxssIFAdpREouuqK91j2jGdAN78NIxTB5rxvU4ZniXELhUHIM4mzABeSGlp5wE6WTa8CY1Q==} + oidc-provider@9.11.2: + resolution: {integrity: sha512-Z7CZzWtBfcNMSaIoNJwHmEbla6h4mW73soOAJM4Qo9XDALMgQ1J+amMg/FBZJD1BHoec1KLL5BHFDkvlgeUZqw==} on-finished@2.4.1: resolution: {integrity: sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==} @@ -9976,6 +10034,10 @@ packages: resolution: {integrity: sha512-mlVgR3PGuzlo0MmTdk4cXqXWlwQDLnONTAg6sm62XkMJEiRxN3GL3SffkYvqwonbkJBcrI7Uvv5Zh9yjvn2iUw==} engines: {node: '>=12.20'} + p-event@6.0.1: + resolution: {integrity: sha512-Q6Bekk5wpzW5qIyUP4gdMEujObYstZl6DMMOSenwBvV0BlE5LkDwkjs5yHbZmdCEq2o4RJx4tE1vwxFVf2FG1w==} + engines: {node: '>=16.17'} + p-finally@1.0.0: resolution: {integrity: sha512-LICb2p9CB7FS+0eR1oqWnHhp0FljGLZCWBE9aix0Uye9W8LTQPwMTYVGWQWIw9RdQiDg4+epXQODwIYJtSJaow==} engines: {node: '>=4'} @@ -10020,6 +10082,10 @@ packages: resolution: {integrity: sha512-rhIwUycgwwKcP9yTOOFK/AKsAopjjCakVqLHePO3CC6Mir1Z99xT+R63jZxAT5lFZLa2inS5h+ZS2GvR99/FBg==} engines: {node: '>=8'} + p-timeout@6.1.4: + resolution: {integrity: sha512-MyIV3ZA/PmyBN/ud8vV9XzwTrNtR4jFrObymZYnZqMmW0zA8Z17vnT0rBgFE/TlohB+YCHqXMgZzb3Csp49vqg==} + engines: {node: '>=14.16'} + p-try@2.2.0: resolution: {integrity: sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==} engines: {node: '>=6'} @@ -10031,8 +10097,8 @@ packages: resolution: {integrity: sha512-cbH9IAIJHNj9uXi196JVsRlt7cHKak6u/e6AkL/bkRelZ7rlL3X1YKxsZwa36xipOEKAsdtmaG6aAJoM1fx2zA==} engines: {node: '>=14.16'} - package-manager-detector@1.6.0: - resolution: {integrity: sha512-61A5ThoTiDG/C8s8UMZwSorAGwMJ0ERVGj2OjoW5pAalsNOg15+iQiPzrLJ4jhZ1HJzmC2PIHT2oEiH3R5fzNA==} + package-manager-detector@1.7.0: + resolution: {integrity: sha512-xg1eHpwYL/D/HEdWw2goFZP6vV0FH7W+PZ5rFkGjdIDLtxq7EkzBUeT3m+lndYCt8wKbmofUu1MUdMCXkCk9ZQ==} param-case@3.0.4: resolution: {integrity: sha512-RXlj7zCYokReqWpOPH9oYivUzLYZ5vAPIfEmCTNViosC78F8F0H9y7T7gG2M39ymgutxF5gcFEsyZQSph9Bp3A==} @@ -10153,8 +10219,8 @@ packages: pg-cloudflare@1.4.0: resolution: {integrity: sha512-Vo7z/6rrQYxpNRylp4Tlob2elzbh+N/MOQbxFVWCxS7oEx6jF53GTJFxK2WWpKuBRkmiin4Mt+xofFDjx09R0A==} - pg-connection-string@2.13.0: - resolution: {integrity: sha512-EMnU9E2fSULdsbErBbMaXJvFeD9B4+nPcM3f+4lsiCR0BHLPrLVjv3DbyM2hgQQviKJaTWIRRTjKjWlHg3p2ig==} + pg-connection-string@2.14.0: + resolution: {integrity: sha512-XwWDGcLRGCXAR8F/AM5bG7Q+A3Wm2s6QeEjlOKZLlH3UYcguiqCWKyWXVag5TLTIjR7oOJUY8kcADaZgWPyLeg==} pg-int8@1.0.1: resolution: {integrity: sha512-WCtabS6t3c8SkpDBUlb1kjOs7l66xsGdKpIPZsg4wR+B3+u9UAum2odSsF9tnvxg80h4ZxLWMy4pRjOsFIqQpw==} @@ -10165,15 +10231,15 @@ packages: peerDependencies: pg: '>=8.0' - pg-protocol@1.14.0: - resolution: {integrity: sha512-n5taZ1kO3s9ngDTVxsEznOqCyToTgz0FLuPq0B33COy5pPpuWJpY3/2oRBVETuOgzdqRXfWpM9HIhp2LBBT1BA==} + pg-protocol@1.16.0: + resolution: {integrity: sha512-sILXutLVjCLjcDuOmvhX5e2Z4cS5qG/6Bu3VkpFwdf/633ElGLpEh9bgmuI5I4sqKqkifQiGyiCcx1HdtrK7tg==} pg-types@2.2.0: resolution: {integrity: sha512-qTAAlrEsl8s4OiEQY69wDvcMIdQN6wdz5ojQiOy6YRMuynxenON0O5oCpJI6lshc6scgAY8qvJ2On/p+CXY0GA==} engines: {node: '>=4'} - pg@8.21.0: - resolution: {integrity: sha512-AUP1EYJuHraQGsVoCQVIcM7TEJVGtDzxWtGFZd8rds9d+CCXlU5Js1rYgfLNvxy9iJrpHjGrRjoi/3BT9fRyiA==} + pg@8.22.0: + resolution: {integrity: sha512-8wih1vVIBMxoUM2oB4soJsD9tDnDpLv4OXBJ+EJzFsvycD+lfyIreC2gGHq78f8jbLLt+bvlPTFdFZfJkOuzAA==} engines: {node: '>= 16.0.0'} peerDependencies: pg-native: '>=3.0.1' @@ -10195,6 +10261,10 @@ packages: resolution: {integrity: sha512-QP88BAKvMam/3NxH6vj2o21R6MjxZUAd6nlwAS/pnGvN9IVLocLHxGYIzFhg6fUQ+5th6P4dv4eW9jX3DSIj7A==} engines: {node: '>=12'} + picomatch@4.0.5: + resolution: {integrity: sha512-RvwwcruNjI1ncT5xRakeyS9Lf8lcItv34KD+aif+VH9kduAyfYBipGh12274xtenIPZ119/R9BdTBa8gAwSh0A==} + engines: {node: '>=12'} + pify@2.3.0: resolution: {integrity: sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog==} engines: {node: '>=0.10.0'} @@ -10211,14 +10281,14 @@ packages: resolution: {integrity: sha512-emEcLuomt2j03vxD54giVB4SxTjnsqkU692xZOZXHDVoYyypEm+b3jpiTcc+Cf+myooc+/Ly0z01jqeNHVgJGw==} engines: {node: '>=16.0.0'} - playwright-core@1.60.0: - resolution: {integrity: sha512-9bW6zvX/m0lEbgTKJ6YppOKx8H3VOPBMOCFh2irXFOT4BbHgrx5hPjwJYLT40Lu+4qtD36qKc/Hn56StUW57IA==} - engines: {node: '>=18'} + playwright-core@1.62.1: + resolution: {integrity: sha512-wPYSwEBJY9GHraISXqyqtx0na0LpO3XEX7jNDhntbex7tzUS7kLnZsOlFruFJB4Hi/rhDMjXGqHewDZ68nYZVw==} + engines: {node: '>=20'} hasBin: true - playwright@1.60.0: - resolution: {integrity: sha512-hheHdokM8cdqCb0lcE3s+zT4t4W+vvjpGxsZlDnikarzx8tSzMebh3UiFtgqwFwnTnjYQcsyMF8ei2mCO/tpeA==} - engines: {node: '>=18'} + playwright@1.62.1: + resolution: {integrity: sha512-0M+L3LAD8/nm554LOla9Ayx0j0tmFZ0FBcoQ7F1VuVHpM/XpiC8RcDzBQB8W5+hA8L22THxELzeF+2WcUzvcLg==} + engines: {node: '>=20'} hasBin: true plimit-lit@1.6.1: @@ -10699,8 +10769,8 @@ packages: peerDependencies: postcss: ^8.4.31 - postcss@8.5.15: - resolution: {integrity: sha512-FfR8sjd4em2T6fb3I2MwAJU7HWVMr9zba+enmQeeWFfCbm+UOC/0X4DS8XtpUTMwWMGbjKYP7xjfNekzyGmB3A==} + postcss@8.5.26: + resolution: {integrity: sha512-u82N74LFzG8ca+dD8puPnplTXoGH4fTPpVGuIbt36G3qvNlkvfD0lEAZSxaly3KX8TS/L1A1gsCEmvKmBcVbkQ==} engines: {node: ^10 || ^12 || >=14} postgres-array@2.0.0: @@ -10760,15 +10830,15 @@ packages: peerDependencies: prettier: ^3.0.0 - prettier-plugin-svelte@4.1.0: - resolution: {integrity: sha512-YZkhA2Q9oOerFFG9tq+2f98WYT7Z2JgrybJrAyrB78jpsH9i/DdgplXemehuFPgsldetFNCcR/yCcYlDjPy94Q==} + prettier-plugin-svelte@4.1.1: + resolution: {integrity: sha512-wXvbXMjSvb4C9ENWTHXyd+ihakKCsJ6rJhLP6/8HFNj4GkZr48jqL9PoKsl2sk7SyCZRTnJ7O2TTowUpOxP/KA==} engines: {node: '>=20'} peerDependencies: prettier: ^3.0.0 svelte: ^5.0.0 - prettier@3.8.4: - resolution: {integrity: sha512-N2MylSdi48+5N/6S5j+maeHbUSIzzZ5uOcX5Hm4QpV8Dkb1HFjfAKTKX6yNPJQD9AhcT3ifHNB66tWTTJDi11Q==} + prettier@3.9.6: + resolution: {integrity: sha512-OpN0zzVdiaiAhxpuuj5efpIS4sY9j7bY6uR5mnj5yPzGkdkjNKSJeUThPb60Jw29QuAZgA4o+/iB49kFiaBX6g==} engines: {node: '>=14'} hasBin: true @@ -10826,8 +10896,8 @@ packages: proto-list@1.2.4: resolution: {integrity: sha512-vtK/94akxsTMhe0/cbfpR+syPuszcuwhqVjJq26CuNDgFGj682oRBXOP5MJpv2r7JtE8MsiepGIqvvOTBwn2vA==} - protobufjs@7.6.4: - resolution: {integrity: sha512-RJJPTTpvFfHcWLkIa2JFWK4XvtSzS0yEWDmunqHXli1h3JlkbcQZXDZdcWxv+JK3Xsl5/UFDPZ0iGm7DAengYw==} + protobufjs@7.6.5: + resolution: {integrity: sha512-/FPD0nUc9jH6rfFjji9IBqOz4pcSE3CsT1m7Ep6Mdb0LxSUMj8hgl6GomOvZzpNpAqqGaXA0P3VSrZLFzIhQrw==} engines: {node: '>=12.0.0'} protocol-buffers-schema@3.6.1: @@ -10863,8 +10933,8 @@ packages: engines: {node: '>=10.13.0'} hasBin: true - qs@6.15.2: - resolution: {integrity: sha512-Rzq0KEyX/w/tEybncDgdkZrJgVUsUMk3xjh3t5bv3S1HTAtg+uOYt72+ZfwiQwKdysThkTBdL/rTi6HDmX9Ddw==} + qs@6.15.3: + resolution: {integrity: sha512-O9gl3zCl5h5blw1KGUzQKhA5oUXSl8rwUIM5o0S3nCXMliSvy5Dzx7/DJcI+SwgICv+IneSZwhBh1oSyEHA71A==} engines: {node: '>=0.6'} queue-lit@1.5.2: @@ -10885,6 +10955,10 @@ packages: quickselect@3.0.0: resolution: {integrity: sha512-XdjUArbK4Bm5fLLvlm5KpTFOiOThgfWWI4axAZDWg4E/0mKdZyI9tNEfds27qCi1ze/vwTR16kvmmGhRra3c2g==} + quote-js-string@0.1.0: + resolution: {integrity: sha512-Y3NoRtprEEZQD8RfxMCfS0ZTqc4e+i18OrXEXAvpM6TfC/3y+0L5rNbZiSnbBBEkDfFzbpd8o+cE8q3/anjMGA==} + engines: {node: '>=22'} + railroad-diagrams@1.0.0: resolution: {integrity: sha512-cz93DjNeLY0idrCNOH6PviZGRN9GJhsdm9hpn1YCS879fj4W+x5IFJhhkRZcwVgMmFF7R82UA/7Oh+R8lLZg6A==} @@ -10903,6 +10977,10 @@ packages: resolution: {integrity: sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==} engines: {node: '>= 0.6'} + range-parser@1.3.0: + resolution: {integrity: sha512-hek2mFQpPuI4E1BBKrSto+BU3e3x4xuarsbiwr3+lf7p44juvFMV0XFWQAP3xUyqXA4RrXLIoaSUGbSt056ZMw==} + engines: {node: '>= 0.6'} + raw-body@2.5.3: resolution: {integrity: sha512-s4VSOf6yN0rvbRZGxs8Om5CWj6seneMwK3oDb4lWDH0UPhWcxwOWw5+qk24bxq87szX1ydrwylIOp2uG1ojUpA==} engines: {node: '>= 0.8'} @@ -10911,6 +10989,10 @@ packages: resolution: {integrity: sha512-K5zQjDllxWkf7Z5xJdV0/B0WTNqx6vxG70zJE4N0kBs4LovmEYWJzQGxC9bS9RAKu3bgM40lrd5zoLJ12MQ5BA==} engines: {node: '>= 0.10'} + raw-body@4.0.0: + resolution: {integrity: sha512-TMHtwexrgOt9VJ2E5JF9RO8mRXGNgC5wXvKkc5AVSJUt1L5gxvjg7eiCQl96EqUEpCWrnNEkCnbAplYtyuq1IA==} + engines: {node: '>=22'} + raw-loader@4.0.2: resolution: {integrity: sha512-ZnScIV3ag9A4wPX/ZayxL/jZH+euYb6FcUinPcgiQW0+UBtEv0O6Q3lGd3cqJ+GHH+rksEv3Pj99oxJ3u3VIKA==} engines: {node: '>= 10.13.0'} @@ -10921,10 +11003,10 @@ packages: resolution: {integrity: sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==} hasBin: true - react-dom@19.2.7: - resolution: {integrity: sha512-t0BRVXvbiE/o20Hfw669rLbMCDWtYZLvmJigy2f0MxsXF+71pxhR3xOkspmsO8h3ZlNzyibAmtCa3l4lYKk6gQ==} + react-dom@19.2.8: + resolution: {integrity: sha512-rVprimfGBG3DR+Tq0IQG2DT5PxKth1WIGDmj5yPmlzr4YBe7uyE+Du4oVqTDXZSHGGGXRtTJEGSSePyQCMBglQ==} peerDependencies: - react: ^19.2.7 + react: ^19.2.8 react-email@5.2.11: resolution: {integrity: sha512-9TzTGRGeavli/iv1RICVOePnFOeG2YRyr8kAyXj6Zgudteq60uA0txDwe4q1zIjQ+08fcbzBkSnI9HgPkSK5OA==} @@ -10969,8 +11051,8 @@ packages: peerDependencies: react: '>=15' - react@19.2.7: - resolution: {integrity: sha512-HNe9WslTbXmFK8o8cmwgAeJFSBvt1bPdHCVKtaaV+WlAN36mpT4hcRpwbf3fY56ar2oIXzsBpOAiIRHAdY0OlQ==} + react@19.2.8: + resolution: {integrity: sha512-PWaYA1L/q9u2u7xYQi+Y3L3Yfnie7XyLeaJICV1MGD6LprsBxcAqGjYyr0eY3p+QdsA+x/Irkt4Qif8D63+Sbw==} engines: {node: '>=0.10.0'} read-cache@1.0.0: @@ -10990,10 +11072,6 @@ packages: readdir-glob@1.1.3: resolution: {integrity: sha512-v05I2k7xN8zXvPD9N+z/uhXPaj0sUFCe2rcWZIpBsqxfP7xXFQ0tipAd/wjj1YxWyWtUS5IDJpOG82JKt2EAVA==} - readdir-glob@3.0.0: - resolution: {integrity: sha512-AhNB2KgKeVJr16nK9LLZbJNWnYoT23ZrumNKFDebHBdkC8KHSqWo871JAUhoWC/RtjEVdqNMFpM6qrwRbaUqpw==} - engines: {node: '>=18'} - readdirp@3.6.0: resolution: {integrity: sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==} engines: {node: '>=8.10.0'} @@ -11042,10 +11120,6 @@ packages: regenerate@1.4.2: resolution: {integrity: sha512-zrceR/XhGYU/d/opr2EKO7aRHUeiBI8qjtfHqADTwZd6Szfy16la6kqD0MIUs5z5hx6AaKa+PixpPrR289+I0A==} - regexp-tree@0.1.27: - resolution: {integrity: sha512-iETxpjK6YoRWJG5o6hXLwvjYAoW+FEZn9os0PD/b6AP6xQwsa/Y7lCVgIixBbUPMfhu+i2LtdeAqVTgGlQarfA==} - hasBin: true - regexpu-core@6.4.0: resolution: {integrity: sha512-0ghuzq67LI9bLXpOX/ISfve/Mq33a4aFRzoQYhnnok1JOFpmE/A2TBGkNVenOGEeSBCjIiWcc6MVOG5HEQv0sA==} engines: {node: '>=4'} @@ -11131,6 +11205,10 @@ packages: requires-port@1.0.0: resolution: {integrity: sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ==} + reserved-identifiers@1.2.0: + resolution: {integrity: sha512-yE7KUfFvaBFzGPs5H3Ops1RevfUEsDc5Iz65rOwWg4lE8HJSYtle77uul3+573457oHvBKuHYDl/xqUkKpEEdw==} + engines: {node: '>=18'} + resolve-alpn@1.2.1: resolution: {integrity: sha512-0a1F4l73/ZFZOakJnQ3FvkJ2+gSTQWz/r2KE5OdDY0TxPm5h4GkqkWWfM47T7HsbnOtcJVEF4epCVy6u7Q3K+g==} @@ -11188,8 +11266,8 @@ packages: robust-predicates@3.0.3: resolution: {integrity: sha512-NS3levdsRIUOmiJ8FZWCP7LG3QpJyrs/TE0Zpf1yvZu8cAJJ6QMW92H1c7kWpdIHo8RvmLxN/o2JXTKHp74lUA==} - rolldown@1.0.3: - resolution: {integrity: sha512-i00lAJ2ks1BYr7rjNjKC7BcqAS7nVfiT3QX1SI5aY+AFHblCmaUf9OE9dbdzDvW6dJxbi2ZCZiy9v3CcwOiX3g==} + rolldown@1.2.3: + resolution: {integrity: sha512-rn9wpmxplLf7NLNyCk9FyWh3FM43DbY8jOzCdEPzH7uflhTftRbCEpqi6Ly2osgoU8OwObtmavMbWLaWy4LX7A==} engines: {node: ^20.19.0 || >=22.12.0} hasBin: true @@ -11271,8 +11349,8 @@ packages: sanitize-filename@1.6.4: resolution: {integrity: sha512-9ZyI08PsvdQl2r/bBIGubpVdR3RR9sY6RDiWFPreA21C/EFlQhmgo20UZlNjZMMZNubusLhAQozkA0Od5J21Eg==} - sass@1.101.0: - resolution: {integrity: sha512-OL3GoQyoUdDt843DpVmDO6y2k1sc5IhUDSpu8XucEI+35neq5QivZ1iuegnpraEVTJXlQGK1gl27zKcTLEPbQw==} + sass@1.102.0: + resolution: {integrity: sha512-NSOyTnaQF7rTAEOtI2fwb386vL+akyiQLBZu8Na7hXCb+umJy0GAqlcMIaqACZ6Z1VgTBS4K9PG6B3IdjHGJsw==} engines: {node: '>=20.19.0'} hasBin: true @@ -11323,13 +11401,8 @@ packages: resolution: {integrity: sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==} hasBin: true - semver@7.8.1: - resolution: {integrity: sha512-rkVq3IXh+4FDGch+KwzX3aV9W3kO54GyEgpvBzSyctDA6Xtd7RJQV1xmXbeQp5v7+VzLOfVqiutSE6GICgPFvg==} - engines: {node: '>=10'} - hasBin: true - - semver@7.8.4: - resolution: {integrity: sha512-rUCObTnP32Q08R2uuIrt7r9PlEonuTmtuXYcW6s5kjdlj3xbnwe+21yXptAUYcMAABLkYYTtnmzb3w3EDZfueA==} + semver@7.8.5: + resolution: {integrity: sha512-Y7/KDsb8LjooZpwaqGyulO6DQlksgCncchHGk+sZIY4SBvUocMBEFH5Ur1fI4dV+Jvl0w6cjvucaIi40puRioA==} engines: {node: '>=10'} hasBin: true @@ -11362,8 +11435,8 @@ packages: set-blocking@2.0.0: resolution: {integrity: sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==} - set-cookie-parser@3.1.0: - resolution: {integrity: sha512-kjnC1DXBHcxaOaOXBHBeRtltsDG2nUiUni+jP92M9gYdW12rsmx92UsfpH7o5tDRs7I1ZZPSQJQGv3UaRfCiuw==} + set-cookie-parser@3.1.2: + resolution: {integrity: sha512-5/r/lTwbJ3zQ+qwdUFZYeRNqda7P5HD8zQKqlSjdGt1/S0cjLAphHusj4Y58ahDtWn/g32xrIS58/ikOvwl0Lw==} set-function-length@1.2.2: resolution: {integrity: sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==} @@ -11395,8 +11468,8 @@ packages: resolution: {integrity: sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==} engines: {node: '>=8'} - shell-quote@1.8.4: - resolution: {integrity: sha512-VsC6n6vz1ihYYyZZwX7YZSF5l5x36ca17OC+a69h94YqB7X6XLwf+5MOgynYir2SLFUbl8gIYvBo8K8RoNQ6bQ==} + shell-quote@1.10.0: + resolution: {integrity: sha512-w1aiOKwKuRgtwAReIIj89puqg+I7GvX4IbLrvmhXbzQsj1+Zwi4VO3+fa6ZF91TWSjIxoEkKnMeHcLEODK5ZXA==} engines: {node: '>= 0.4'} side-channel-list@1.0.1: @@ -11431,8 +11504,8 @@ packages: simple-get@4.0.1: resolution: {integrity: sha512-brv7p5WgH0jmQJr1ZDDfKDOSeWWg+OVypG99A/5vYGPqJ6pxiaHLy8nxtFjBA7oMa01ebA9gfh1uMCFqOuXxvA==} - simple-icons@16.23.0: - resolution: {integrity: sha512-08MaTpxj9zGYUIe38tfELYkaHiGE1YgbrbXmTBf+GPxi5mEqLSORQqOXrP0QKPdaFuzEDSmW5o4xkbLlFhmdCw==} + simple-icons@16.28.0: + resolution: {integrity: sha512-sQPR5AtK/ijRjou7zw7mlLp08oB6FH7i0lOy5XJ2zp9mJs/yejgiOn7KvQoe2q4YJIx6VmgUSW5AOefebPt5kg==} engines: {node: '>=0.12.18'} sirv@2.0.4: @@ -11530,11 +11603,8 @@ packages: resolution: {integrity: sha512-UcjcJOWknrNkF6PLX83qcHM6KHgVKNkV62Y8a5uYDVv9ydGQVwAHMKqHdJje1VTWpljG0WYpCDhrCdAOYH4TWg==} engines: {node: '>= 10.x'} - sprintf-js@1.0.3: - resolution: {integrity: sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==} - - sql-formatter@15.8.1: - resolution: {integrity: sha512-nT2r90kTEYBuse9fe4r1Rp78v1mOBD35KsGc07Vo9eQSVa1TcTSnCS0zouf6BCmdzvmqBsBW+cYuBoYkHO/OWg==} + sql-formatter@15.8.2: + resolution: {integrity: sha512-kTYRg5FIcvsDtYUG2Qn9pYT6xKwiLJN5TTIvc5Mur6hIg4pSfdpHu8Yyu5bqESLHnVM3mXzD446cb2+uEaKZXg==} hasBin: true srcset@4.0.0: @@ -11565,8 +11635,8 @@ packages: std-env@3.10.0: resolution: {integrity: sha512-5GS12FdOZNliM5mAOxFRg7Ir0pWz8MdpYm6AY6VPkGpbA7ZzmbzNcBJQ0GPvvyWgcY7QAhCgf9Uy89I03faLkg==} - std-env@4.1.0: - resolution: {integrity: sha512-Rq7ybcX2RuC55r9oaPVEW7/xu3tj8u4GeBYHBWCychFtzMIr86A7e3PPEBPT37sHStKX3+TiX/Fr/ACmJLVlLQ==} + std-env@4.2.0: + resolution: {integrity: sha512-oCUKSupKTHX53EyjDtuZQ64pjLJ6yYCtpmEw0goYxtjG9KpbRe8KAsl2tBUGU9DyMcJ0RwJ8GqJAFzMXcXW1Rw==} stdin-discarder@0.2.2: resolution: {integrity: sha512-UhDfHmA92YAlNnCfhmq0VeNL5bDbiZGg7sZ2IvPsXubGkiNa9EC+tUTsjBRsYUAz87btI6/1wf4XoVvQ3uRnmQ==} @@ -11679,6 +11749,10 @@ packages: engines: {node: '>=16 || 14 >=14.17'} hasBin: true + super-regex@1.1.0: + resolution: {integrity: sha512-WHkws2ZflZe41zj6AolvvmaTrWds/VuyeYr9iPVv/oQeaIoVxMKaushfFWpOGDT+GuBrM/sVqF8KUCYQlSSTdQ==} + engines: {node: '>=18'} + superagent@10.3.0: resolution: {integrity: sha512-B+4Ik7ROgVKrQsXTV0Jwp2u+PXYLSlqtDAhYnkkD+zn3yg8s/zjA2MeGayPoY/KICrbitwneDHrjSotxKL+0XQ==} engines: {node: '>=14.18.0'} @@ -11704,13 +11778,13 @@ packages: peerDependencies: svelte: '>= 3.43.1 < 6' - svelte-check@4.6.0: - resolution: {integrity: sha512-KhVnDFDSid57mmZtHz8gfW8AAGylOZ0vPnOIzVmAL+urzwK8sBYXRss953gD8T0OdgAQ11mdWhE6uadmtOz8TQ==} + svelte-check@4.7.4: + resolution: {integrity: sha512-IW9ot9YqAoyv8FvyN+eb4ZTe8zgcKZrJLNYU6dzSKkGwEBsSPc4K7lmQ8bKn8W2YMXM6WDfZSSVOaGtekyUfOQ==} engines: {node: '>= 18.0.0'} hasBin: true peerDependencies: svelte: ^4.0.0 || ^5.0.0-next.0 - typescript: '>=5.0.0' + typescript: ^5.0.0 || ^6.0.0 svelte-eslint-parser@1.8.0: resolution: {integrity: sha512-mikR1qwIVy3t5WthUoAXkMwxkXvabZP9FJgdx35Ei7EbGWmctva1Pih16Koeor/bdNNq8NXHlwKGS6NkYTawLg==} @@ -11737,8 +11811,8 @@ packages: peerDependencies: svelte: ^3 || ^4 || ^5 - svelte-jsoneditor@3.12.0: - resolution: {integrity: sha512-BUWsAmmDbQTs4AAMvVGA09X1aP8l1kr7dDdzbLVPX8895Ov52PVoAlAsCXERPh+GIan+qZTEBqwSqbM3VRMBaw==} + svelte-jsoneditor@3.13.0: + resolution: {integrity: sha512-4L7jqVulv180NytA12jQfFguUKrkHjQ0KJkrSbxhC7mWZL6tDzcsRKqXNtfCgy9c5CKC340xJmUClVF3VIsONg==} peerDependencies: svelte: ^5.0.0 @@ -11780,20 +11854,20 @@ packages: peerDependencies: svelte: ^5.30.2 - svelte@5.56.3: - resolution: {integrity: sha512-w7JvrM5IFl5cmfbY0TLik9o7mjRUJmRMhOR51tBPu708Gr/MjbGs7VnJnr/B0CaXeI4vtnOh7RKxDr0cwhMdDA==} + svelte@5.56.8: + resolution: {integrity: sha512-PY8LOw7xP6c8IOiVqdo0sbbZVYhXRSfklOQLAUyGBKqjTX0wx/z4l/9J+PmBpmlLnxzEb1NqltxQ5/wZme/Cmg==} engines: {node: '>=18'} svg-parser@2.0.4: resolution: {integrity: sha512-e4hG1hRwoOdRb37cIMSgzNsxyzKfayW6VOflrwvR+/bzrkyxY/31WkbgnQpgtrNp1SdpJvpUAGTa/ZoiPNDuRQ==} - svgo@3.3.3: - resolution: {integrity: sha512-+wn7I4p7YgJhHs38k2TNjy1vCfPIfLIJWR5MnCStsN8WuuTcBnRKcMHQLMM2ijxGZmDoZwNv8ipl5aTTen62ng==} + svgo@3.3.4: + resolution: {integrity: sha512-GsNRis4e8jxn2Y9ENz/8lbJ93CstG8svtMnuRaHbiF2LTJ5tK0/q3t/URPq9Zc7zVWBJnNnJMIp6bevK7bSmNg==} engines: {node: '>=14.0.0'} hasBin: true - swagger-ui-dist@5.32.6: - resolution: {integrity: sha512-75ttZNaYCLoFPnozPZcTUU6mS3wKT8l7WLjU5zJSHFeJa23i5vtnze6IiCl4jDMPeQTXVXIgovq4M11NNfQvSA==} + swagger-ui-dist@5.32.8: + resolution: {integrity: sha512-dgMdWXIgnI4zX4OPhKEdWnlDODbgm8W3AX0Ivn/BBqcUh6xZsBxhZMnvk6DJyRz1BTrj8dPxtarmEGgkz30oyA==} symbol-observable@4.0.0: resolution: {integrity: sha512-b19dMThMV4HVFynSAM1++gBHAbk2Tc/osgLIBZMKsyqh34jb2e8Os7T6ZW/Bt3pJFdBTd2JwAnAAEQV7rSNvcQ==} @@ -11806,14 +11880,14 @@ packages: resolution: {integrity: sha512-eNRKgb3z66Yp3D2CixVujOUvXLFUTij/zVnV8KRyvFdQwpz7I5DS8UfRkTeLzb64u+dkzDSdelE24izu+zSSUg==} engines: {node: ^14.18.0 || >=16.0.0} - systeminformation@5.31.7: - resolution: {integrity: sha512-/8NC53e5nP9nmhn42/ncdOkyJnOoue/Vy+tJOyUGd1Yv66G069wK4rrziwhrqDETgk78CudTQupw5z19S5uoZw==} + systeminformation@5.31.17: + resolution: {integrity: sha512-TvFA9iwDWlMjqZVlKIJ0Cy+Zgm9ttlMx0SMRwJDMNKyhlEKWBMb3+WRwDi/3dvHdWbexpos4Osp4U49p5WjB5g==} engines: {node: '>=8.0.0'} os: [darwin, linux, win32, freebsd, openbsd, netbsd, sunos, android] hasBin: true - tabbable@6.4.0: - resolution: {integrity: sha512-05PUHKSNE8ou2dwIxTngl4EzcnsCDZGJ/iCLtDflR/SHB/ny14rXc+qU5P4mG9JkusiV7EivzY9Mhm55AzAvCg==} + tabbable@6.5.0: + resolution: {integrity: sha512-wieBHXygIm7OyQOu5hQlkk62/WyCFYGlWg7L6/ZCUZwx0o398Zkn4pVmMyfYhfMG8kGrj/Krt8eIk6UKC6VzwA==} tagged-tag@1.0.0: resolution: {integrity: sha512-yEFYrVhod+hdNyx7g5Bnkkb0G6si8HJurOoOEgC8B/O0uXLHlaey/65KRv6cuWBNhBgHKAROVpc7QyYqE5gFng==} @@ -11831,15 +11905,17 @@ packages: tailwind-merge@3.6.0: resolution: {integrity: sha512-uxL7qAVQriqRQPAyK3pj66VqskWqoZ37PW94jwOTwNfq/z9oyu1V+eqrZqtR2+fCiXdYOZe/Modt8GtvqNzu+w==} - tailwind-variants@3.2.2: - resolution: {integrity: sha512-Mi4kHeMTLvKlM98XPnK+7HoBPmf4gygdFmqQPaDivc3DpYS6aIY6KiG/PgThrGvii5YZJqRsPz0aPyhoFzmZgg==} - engines: {node: '>=16.x', pnpm: '>=7.x'} + tailwind-variants@3.3.1: + resolution: {integrity: sha512-4pAvwUtM4HKBiRZftncAbpn6V9Hhwoa5Fl7O2u5zbp7Z5Cvu+/o/6+176WY3WCEES209543quG8zFIcXCsc5Jw==} + engines: {node: '>=16.9.x', pnpm: '>=7.x'} peerDependencies: tailwind-merge: '>=3.0.0' tailwindcss: '*' peerDependenciesMeta: tailwind-merge: optional: true + tailwindcss: + optional: true tailwindcss-email-variants@3.0.5: resolution: {integrity: sha512-BbULkY0/0VLXwSzAZP0wxyO0siXJARatreZTSW+U6dM+LuTzPsfG/SfxxuouINM1xtIoPGGU++jKkMyfYKJe7Q==} @@ -11863,18 +11939,18 @@ packages: engines: {node: '>=14.0.0'} hasBin: true - tailwindcss@4.3.1: - resolution: {integrity: sha512-hk+TB1m+K8CYNrP6rjQaq/Y+4Zylwpa87mLYBKCunwnnQ9p+fHb7kmSfGqyEJoxF/O6CDyABWVFEafNSYKll+Q==} + tailwindcss@4.3.3: + resolution: {integrity: sha512-gOhV3P7ufE62QDGg1zVaTgCR+EtPv92k2nIhVcVKcLmxT1sUBsQGhnZj175j+MqRt4zLF7ic+sCYjfhxMxj7YQ==} tapable@2.3.3: resolution: {integrity: sha512-uxc/zpqFg6x7C8vOE7lh6Lbda8eEL9zmVm/PLeTPBRhh1xCgdWaQ+J1CUieGpIfm2HdtsUpRv+HshiasBMcc6A==} engines: {node: '>=6'} - tar-fs@2.1.4: - resolution: {integrity: sha512-mDAjwmZdh7LTT6pNleZ05Yt65HC3E+NiQzl672vQG38jIrehtJk/J3mNwIg+vShQPcLF/LV7CMnDW6vjj6sfYQ==} + tar-fs@2.1.5: + resolution: {integrity: sha512-OboTd8mmMhZDNPV+UjQcK9yKAatXu2aJ+r1w4im1Otd4M4fl2hwvdoXUxIYHFTHWK/3y3FarBP70v3vwmGlOxw==} - tar-fs@3.1.2: - resolution: {integrity: sha512-QGxxTxxyleAdyM3kpFs14ymbYmNFrfY+pHj7Z8FgtbZ7w2//VAgLMac7sT6nRpIHjppXO2AwwEOg0bPFVRcmXw==} + tar-fs@3.1.3: + resolution: {integrity: sha512-/hU4AXnIdZu+Gvl1pk0oI5f5HxWsCJRtY2aFaJdk9VvyL48DWU6iU5WAIPG+wIi1YvWA6eTJvIviP/tMAZZNwQ==} tar-stream@2.2.0: resolution: {integrity: sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ==} @@ -11938,13 +12014,14 @@ packages: uglify-js: optional: true - terser@5.48.0: - resolution: {integrity: sha512-J/9An6vs9Us6wKRriSFXBWdRZapREHqFzdNUKk0pmu804EMR6dr6winwo7e5JDxN4xahxQsuysyYFwlwj4XN/Q==} + terser@5.49.0: + resolution: {integrity: sha512-SNiDnXyHSrxVcIOtVbULzcTmniUiwcV7Nwdyj1twVubeTmbjoa8p69KKDpfkdoOavuM4/GRm1+ykI8qqnavHoA==} engines: {node: '>=10'} hasBin: true - testcontainers@12.0.2: - resolution: {integrity: sha512-UNkC3cSGrsNyyDShaES1/tUHqPNQiH7aUXBPYMO2iAY4tdCI2uVdEagBCrLN0RQ1qxDPWU733OuEaDNQs0vanw==} + testcontainers@12.1.0: + resolution: {integrity: sha512-YjDLqIITuhGLMnM10yhg3oV6lIG5IMpz1R1DPBZoOOks83q7i7IVpeSWRTiyl7roozjiyLmwIoLK/KY8OnZmIA==} + engines: {node: '>= 22.22'} text-decoder@1.2.7: resolution: {integrity: sha512-vlLytXkeP4xvEq2otHeJfSQIRyWxo/oZGEbXrtEEF9Hnmrdly59sUbzZ/QgyWuLYHctCHxFF4tRQZNQ9k60ExQ==} @@ -11966,11 +12043,8 @@ packages: peerDependencies: tslib: ^2 - three@0.179.1: - resolution: {integrity: sha512-5y/elSIQbrvKOISxpwXCR4sQqHtGiOI+MKLc3SsBdDXA2hz3Mdp3X59aUp8DyybMa34aeBwbFTpdoLJaUDEWSw==} - - three@0.184.0: - resolution: {integrity: sha512-wtTRjG92pM5eUg/KuUnHsqSAlPM296brTOcLgMRqEeylYTh/CdtvKUvCyyCQTzFuStieWxvZb8mVTMvdPyUpxg==} + three@0.185.1: + resolution: {integrity: sha512-5aojFCXKwnjBRZvUnt3WFfEcvUJgkN5LlijRFN95hMy8WVkG4I0QNcJE+OuWvuJ0bOdStrbfXn0pkd6/QyiAlg==} through@2.3.8: resolution: {integrity: sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==} @@ -11981,6 +12055,10 @@ packages: thunky@1.1.0: resolution: {integrity: sha512-eHY7nBftgThBqOyHGVN+l8gF0BucP09fMo0oO/Lb0w1OF80dJv+lDVpXG60WMQvkcxAkNybKsrEIE3ZtKGmPrA==} + time-span@5.1.0: + resolution: {integrity: sha512-75voc/9G4rDIJleOo4jPvN4/YC4GRZrY8yy1uU4lwrB3XEQbWve8zXoO5No4eFrGcTAMYyoY67p8jRQdtA1HbA==} + engines: {node: '>=12'} + timers-ext@0.1.8: resolution: {integrity: sha512-wFH7+SEAcKfJpfLPkrgMPvvwnEtj8W4IurvEyrKsDleXnKLCDw71w8jltvfLa8Rm4qQxxT4jmDBYbJG/z7qoww==} engines: {node: '>=0.12'} @@ -12102,8 +12180,8 @@ packages: ts-interface-checker@0.1.13: resolution: {integrity: sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA==} - tsc-alias@1.8.17: - resolution: {integrity: sha512-EIduCZHqbNwPm8BZYfq1aD7BQ697A4h6uSGMOFQfYGoQwfrYFTKwYfy9Bv42YxHkduVBcn9Zx0DkX111DKskyg==} + tsc-alias@1.9.1: + resolution: {integrity: sha512-sFZdVFthH8uvdplPJrOYGOHcxu6UPtcAcY678JPwEQiMzgLZYFO7Qc/rzELp7ingTc+OxtzH6n+8Pn2eVQep6w==} engines: {node: '>=16.20.2'} hasBin: true @@ -12136,8 +12214,8 @@ packages: resolution: {integrity: sha512-LxhtAkPDTkVCMQjt2h6eBVY28KCjikZqZfMcC15YBeNjkgUpdCfBu5HoiOTDu86v6smE8yOjyEktJ8hlbANHQA==} engines: {node: '>=0.6.x'} - tsx@4.22.4: - resolution: {integrity: sha512-X8EX+XV4QR5xCsrgxaED954zTDfY8KqlDtskKEL0cHhyS/P8b4IFOvGDQpsC9Q1XnLq915wEfwwY/zzskCtmhg==} + tsx@4.23.9: + resolution: {integrity: sha512-6q8uTORRGauQVjqMQnKUucLFoeXZAfw6zKvG35GLbdKWbLdeOtZ3H4mhyA5mxuUd2o2cRTskhj59nLLQseUvUw==} engines: {node: '>=18.0.0'} hasBin: true @@ -12167,6 +12245,10 @@ packages: resolution: {integrity: sha512-RAH822pAdBgcNMAfWnCBU3CFZcfZ/i1eZjwFU/dsLKumyuuP3niueg2UAukXYF0E2AAoc82ZSSf9J0WQBinzHA==} engines: {node: '>=12.20'} + type-fest@4.41.0: + resolution: {integrity: sha512-TeTSQ6H5YHvpqVwBRcnLDCBnDOHWYu7IvGbHT6N8AOymcr9PJGjc1GTtiWZTYg0NCgYwvnYWEkVChQAr9bjfwA==} + engines: {node: '>=16'} + type-fest@5.7.0: resolution: {integrity: sha512-1URUxUqfHFM1c+zfSPsa3gnkO7Aq21qyH75SIduNYz4SzY964rn1X2vCMQaHSHhktiw+0kPa2iyb6PUpXqB6Vg==} engines: {node: '>=20'} @@ -12188,8 +12270,8 @@ packages: typedarray@0.0.6: resolution: {integrity: sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA==} - typescript-eslint@8.61.0: - resolution: {integrity: sha512-8y31Rd0eGTrDKqhy6vT0HtzhN+YLjQizwX3aA3hPXP/ynSfnrBXcQY5IzsP9/DM7+klX4IUncZZjkchP0z+rUw==} + typescript-eslint@8.66.0: + resolution: {integrity: sha512-QlEbBPz/RuJ1XUHj29nm3t0F/O/cSlEnntozqPOYHnnTGAXFamnMBu5i9Vn6vhUPHGAjR+Vl+5J8vPN/BMUrJw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: eslint: ^8.57.0 || ^9.0.0 || ^10.0.0 @@ -12205,6 +12287,11 @@ packages: engines: {node: '>=14.17'} hasBin: true + typescript@7.0.2: + resolution: {integrity: sha512-8FYau96o3NKOhbjKi/qNvG/W5jhzxkbdm5sj9AbZ/5T5sWqn3hJgLfGx27sRKZWTvyzCP8dLRBTf5tBTSRVUNA==} + engines: {node: '>=16.20.0'} + hasBin: true + ua-is-frozen@0.1.2: resolution: {integrity: sha512-RwKDW2p3iyWn4UbaxpP2+VxwqXh0jpvdxsYpZ5j/MLLiQOfbsV5shpgQiw93+KMYQPcteeMQ289MaAFzs3G9pw==} @@ -12239,8 +12326,8 @@ packages: resolution: {integrity: sha512-4yqz8a3n5HmGTlsbADNtr/dJlhkh/55Rq798G6ibiULcXbDtaLpTl1pvdqcbFfeoj3iSi52lePFM7h9H21cw/A==} engines: {node: '>=18.17'} - undici@8.4.1: - resolution: {integrity: sha512-RNHlB4fxZK0IrkhBsxhlbx7s8kFWwr7rzzOqj5nvZugw3ig3RsB7KW3zVlV0eu8POl+rx5d1hmL7rRg0z1owow==} + undici@8.10.0: + resolution: {integrity: sha512-HvltHd7avK13QIw/oLe4qoOLyoVSoafqJ2jYOrtMRBkbYT31eiBQ8O0ehRKZiEZCMEyLFQNIADpgCWC5fALvYQ==} engines: {node: '>=22.19.0'} unicode-canonical-property-names-ecmascript@2.0.1: @@ -12314,8 +12401,8 @@ packages: resolution: {integrity: sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==} engines: {node: '>= 0.8'} - unplugin-swc@1.5.9: - resolution: {integrity: sha512-RKwK3yf0M+MN17xZfF14bdKqfx0zMXYdtOdxLiE6jHAoidupKq3jGdJYANyIM1X/VmABhh1WpdO+/f4+Ol89+g==} + unplugin-swc@1.5.10: + resolution: {integrity: sha512-aNvKH601KYzc/fXyDQJPAk8obNPzA4GdGqx+qSjQoyweMLDMLs5VRbunjL4skIv/hyyAnSgrbxMwXHdRTzhmew==} peerDependencies: '@swc/core': ^1.2.108 @@ -12377,8 +12464,8 @@ packages: resolution: {integrity: sha512-6S5mCapmzcxetOD/2UEjL0GF5e4+gB07Dh8qs63xylw5ay4XuyW6iQs70FOJo/puf10LCkvhp4jYMQSDUBYEFg==} engines: {node: '>=10.0.0'} - uuid@14.0.0: - resolution: {integrity: sha512-Qo+uWgilfSmAhXCMav1uYFynlQO7fMFiMVZsQqZRMIXp0O7rR7qjkj+cPvBHLgBqi960QCoo/PH2/6ZtVqKvrg==} + uuid@14.0.1: + resolution: {integrity: sha512-6ZxzVpzDXDa3bJWaHilVayA+BH/1zmxCJoVgvmqJnid/gPoKHxUrS/aC/T6LGQtNHT+XHG9fXPJB4d+IrU30Ew==} hasBin: true uuid@8.3.2: @@ -12386,8 +12473,8 @@ packages: deprecated: uuid@10 and below is no longer supported. For ESM codebases, update to uuid@latest. For CommonJS codebases, use uuid@11 (but be aware this version will likely be deprecated in 2028). hasBin: true - valibot@1.4.1: - resolution: {integrity: sha512-klCmFTz2jeDluy9RwX+F884TCiogtdBJ/YaxSx1EOBYXa3NXNWj8kR1jjN8rzluwojJVWWaHJ4r1U5LfICnM3g==} + valibot@1.4.2: + resolution: {integrity: sha512-gjdCvJ6d3RyHAneqxMYMW9QMCwYMb3jpOO0IyHZV1bnRHFBHrX3VkIILt5XYR0WhwHiH7Mty8ovuPZ/O3gamrg==} peerDependencies: typescript: '>=5' peerDependenciesMeta: @@ -12440,8 +12527,8 @@ packages: peerDependencies: vite: '*' - vite@7.3.5: - resolution: {integrity: sha512-KuOaNhcnGFN2zIPGA7wRmzF+lJA1sea7rHq17aiJ++9lzY1WWG6Jpwqwe1KNbRVPIqHmr8GLYx7jbrQcN/7/ww==} + vite@7.3.6: + resolution: {integrity: sha512-4XP60spRGjSZFf1qYH+dJIkK2znL3zQfl9KkOV9MkkRR/3Dls0dxaBsQPTloEc5BLXWPL9vsOxopxyKoMmDueg==} engines: {node: ^20.19.0 || >=22.12.0} hasBin: true peerDependencies: @@ -12480,13 +12567,13 @@ packages: yaml: optional: true - vite@8.0.16: - resolution: {integrity: sha512-h9bXPmJichP5fLmVQo3PyaGSDE2n3aPuomeAlVRm0JLmt4rY6zmPKd59HYI4LNW8oTK7tlTsuC7l/m7awx9Jcw==} + vite@8.2.0: + resolution: {integrity: sha512-pn+CFpM0lwDeKwmOq1ZaBK/9sjorZcgqxki6MbY/jPEVd9vichIlmlD4HmQ5wdP5EgqQCFRaACBxMC7uEGc6lQ==} engines: {node: ^20.19.0 || >=22.12.0} hasBin: true peerDependencies: '@types/node': ^20.19.0 || >=22.12.0 - '@vitejs/devtools': ^0.1.18 + '@vitejs/devtools': ^0.4.0 esbuild: ^0.27.0 || ^0.28.0 jiti: '>=1.21.0' less: ^4.0.0 @@ -12537,16 +12624,16 @@ packages: peerDependencies: vitest: '>=2.0.0' - vitest@3.2.6: - resolution: {integrity: sha512-xejya+bT/j/+R/AGa1XOfRxLmNUlLtlwjRsFUILF+xHfzElmGcmFydy2gqqIrd62ptIEfwVMofd19uNWD9L7Nw==} + vitest@3.2.7: + resolution: {integrity: sha512-KrxIJ62Fd89gfysR4WotlgZABiz2dqFPgqGzX7s+CwsqLFomRH7777ZcrOD6+WVAh7khPQP41A+BKbpcJFrdEg==} engines: {node: ^18.0.0 || ^20.0.0 || >=22.0.0} hasBin: true peerDependencies: '@edge-runtime/vm': '*' '@types/debug': ^4.1.12 '@types/node': ^18.0.0 || ^20.0.0 || >=22.0.0 - '@vitest/browser': 3.2.6 - '@vitest/ui': 3.2.6 + '@vitest/browser': 3.2.7 + '@vitest/ui': 3.2.7 happy-dom: '*' jsdom: '*' peerDependenciesMeta: @@ -12565,20 +12652,20 @@ packages: jsdom: optional: true - vitest@4.1.9: - resolution: {integrity: sha512-nE3/LEyc0z87uHYLZebqCUOaJr2hdtuPp7BQ4BosVFnfltxgAvMG08NyrSGlPpOUWvR27c5flSmYFTNr78L9GQ==} + vitest@4.1.10: + resolution: {integrity: sha512-R9jUTe5S4Qb0HCd4TNqpC7oGcrMssMRGXLW80ubjWsW9VH5GF8y1Y0SFLY9AbqSk6nt0PnOx4H4WNJYZ13GUPw==} engines: {node: ^20.0.0 || ^22.0.0 || >=24.0.0} hasBin: true peerDependencies: '@edge-runtime/vm': '*' '@opentelemetry/api': ^1.9.0 '@types/node': ^20.0.0 || ^22.0.0 || >=24.0.0 - '@vitest/browser-playwright': 4.1.9 - '@vitest/browser-preview': 4.1.9 - '@vitest/browser-webdriverio': 4.1.9 - '@vitest/coverage-istanbul': 4.1.9 - '@vitest/coverage-v8': 4.1.9 - '@vitest/ui': 4.1.9 + '@vitest/browser-playwright': 4.1.10 + '@vitest/browser-preview': 4.1.10 + '@vitest/browser-webdriverio': 4.1.10 + '@vitest/coverage-istanbul': 4.1.10 + '@vitest/coverage-v8': 4.1.10 + '@vitest/ui': 4.1.10 happy-dom: '*' jsdom: '*' vite: ^6.0.0 || ^7.0.0 || ^8.0.0 @@ -12629,6 +12716,9 @@ packages: web-namespaces@2.0.1: resolution: {integrity: sha512-bKr1DkiNa2krS7qxNtdrtHAmzuYGFQLiQ13TsorsdT6ULTkPLKuu5+GsFpDlg6JFjUTwX2DyhMPG2be8uPrqsQ==} + web-worker@1.5.0: + resolution: {integrity: sha512-RiMReJrTAiA+mBjGONMnjVDP2u3p9R1vkcGz6gDIrOMT3oGuYwX2WRMYI9ipkphSuE5XKEhydbhNEJh4NY9mlw==} + webidl-conversions@3.0.1: resolution: {integrity: sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==} @@ -12650,8 +12740,8 @@ packages: webpack: optional: true - webpack-dev-server@5.2.5: - resolution: {integrity: sha512-4wZtCquSuv9CKX8oybo+mqxtxZqWz47uM1Ch94lxowBztOhWCbhqvRbfC/mODOwxgV2brY+JGZpHq58/SuVFYg==} + webpack-dev-server@5.2.6: + resolution: {integrity: sha512-HNLRmamRvVavZQ+avceZifmv8hmdUjg43t6MI4SqJDwFdW7RPQwH5vzGhDRZSX59SgfbeHhLnq3g+uooWo7pVw==} engines: {node: '>= 18.12.0'} hasBin: true peerDependencies: @@ -12675,8 +12765,8 @@ packages: resolution: {integrity: sha512-LnL6Z3GGDPht/AigwRh2dvL9PQPFQ8skEpVrWZXLWBYmqcaojHNN0onvHzie6rq7EWKrrBfPYqNEzTJgiwEQDQ==} engines: {node: '>=6'} - webpack-sources@3.5.0: - resolution: {integrity: sha512-HPuy+uuoTCaaoEoI1LQ3JN9+vrPBvEesnnX1jADHy728cHSMlq4wUc4afYqahq2B1mhQVZxCXOkNTnXltr+2vQ==} + webpack-sources@3.5.1: + resolution: {integrity: sha512-jyuiGJdtvY434z5bUZrjz67v76/ePNvFZTp9Mdz29IlH4+GPsgyGjiv0fKI+M7BdkU6ADjulUcKAd3tUK3WlEw==} engines: {node: '>=10.13.0'} webpack-virtual-modules@0.6.2: @@ -12692,8 +12782,8 @@ packages: webpack-cli: optional: true - webpack@5.107.2: - resolution: {integrity: sha512-v7RhXaJbpMlV0D7hC7lb2EbnxkoeUqf9qhKr6lozx3Q48pmFrqqNRmZFUEGmi7pSwm6fCQ2H1IjvCkHqdpVdjQ==} + webpack@5.108.4: + resolution: {integrity: sha512-yur8LyJoeiWh47dErD+Ok7vlbmDsJ3UbbRPAoxbGJ54WpE2y5yVo5G/inUzujnYgw3tPmBRdn+G7PoxXaYC33w==} engines: {node: '>=10.13.0'} hasBin: true peerDependencies: @@ -12806,8 +12896,8 @@ packages: write-file-atomic@3.0.3: resolution: {integrity: sha512-AvHcyZ5JnSfq3ioSyjrBkH9yW4m7Ayk8/9My/DD9onKeu/94fwrMocemO2QAJFAlnnDN+ZDS+ZjAR5ua1/PV/Q==} - ws@7.5.11: - resolution: {integrity: sha512-zS54Oen9bITtp7kp2XM3AydrCIq1D+HwJOuH+c+e4LfpL/lotP5osijd+UoMnxwAam1GN8R4KtLAyIrIcBNpiA==} + ws@7.5.12: + resolution: {integrity: sha512-1xGnbYN3zbog9CwuNDQULNRrTCLIn46/WmpR1f0w6PsCYQHkylZr5vkd6kfMZYV6pRnQkcPNRyiA8LsrNKyhpg==} engines: {node: '>=8.3.0'} peerDependencies: bufferutil: ^4.0.1 @@ -12830,8 +12920,8 @@ packages: utf-8-validate: optional: true - ws@8.21.0: - resolution: {integrity: sha512-Vsp28b7DRcimFQvrqu2Wek3z1iYxDCWqHYB8Qsnk/S4RfaCQzPGPyBNuVjJV3cd6UiKtUtp6sNM77gWvzcCH+g==} + ws@8.21.1: + resolution: {integrity: sha512-+0NTnW77fFN/DjQi6k/Sq/Yvk4Sgajw7urW8V+asjXnRgDs9gyGkdb7EzgfhA4goXsRIZKE28fzIXBHEzhuiWw==} engines: {node: '>=10.0.0'} peerDependencies: bufferutil: ^4.0.1 @@ -12915,8 +13005,8 @@ packages: resolution: {integrity: sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A==} engines: {node: '>=8'} - yargs@17.7.2: - resolution: {integrity: sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==} + yargs@17.7.3: + resolution: {integrity: sha512-GZtjxm/J/4TSxuL3FNYjCmLktBTnIw/rVmKSIyKeYAZpmJB2ig9VauCC5xsa82GNKVKDAqpOn3KVzNt0zmrU0g==} engines: {node: '>=12'} yargs@18.0.0: @@ -12946,10 +13036,6 @@ packages: resolution: {integrity: sha512-zK7YHHz4ZXpW89AHXUPbQVGKI7uvkd3hzusTdotCg1UxyaVtg0zFJSTfW/Dq5f7OBBVnq6cZIaC8Ti4hb6dtCA==} engines: {node: '>= 14'} - zip-stream@7.0.5: - resolution: {integrity: sha512-dSvYKdvLsAHCDqPOhIwk/q5CvuWtTB3Dgpoe0uVEFjTzIOAmsQpprX25InCvrvJsirEbu1OHyy67n/kAj1Sw/w==} - engines: {node: '>=18'} - zod@4.3.6: resolution: {integrity: sha512-rftlrkhHZOcjDwkGlnUtZZkvaPHCsDATp4pGpuOOMDaTdDDXF91wuVDJoWoPsKX/3YPQ5fHuF3STjcYyKr+Qhg==} @@ -12961,137 +13047,144 @@ packages: snapshots: + '@11ty/gray-matter@1.0.0': + dependencies: + js-yaml: 4.3.0 + kind-of: 6.0.3 + section-matter: 1.0.0 + strip-bom-string: 1.0.0 + '@adobe/css-tools@4.5.0': {} - '@algolia/abtesting@1.20.0': + '@algolia/abtesting@1.22.0': dependencies: - '@algolia/client-common': 5.54.0 - '@algolia/requester-browser-xhr': 5.54.0 - '@algolia/requester-fetch': 5.54.0 - '@algolia/requester-node-http': 5.54.0 + '@algolia/client-common': 5.56.0 + '@algolia/requester-browser-xhr': 5.56.0 + '@algolia/requester-fetch': 5.56.0 + '@algolia/requester-node-http': 5.56.0 - '@algolia/autocomplete-core@1.19.2(@algolia/client-search@5.54.0)(algoliasearch@5.54.0)(search-insights@2.17.3)': + '@algolia/autocomplete-core@1.19.2(@algolia/client-search@5.56.0)(algoliasearch@5.56.0)(search-insights@2.17.3)': dependencies: - '@algolia/autocomplete-plugin-algolia-insights': 1.19.2(@algolia/client-search@5.54.0)(algoliasearch@5.54.0)(search-insights@2.17.3) - '@algolia/autocomplete-shared': 1.19.2(@algolia/client-search@5.54.0)(algoliasearch@5.54.0) + '@algolia/autocomplete-plugin-algolia-insights': 1.19.2(@algolia/client-search@5.56.0)(algoliasearch@5.56.0)(search-insights@2.17.3) + '@algolia/autocomplete-shared': 1.19.2(@algolia/client-search@5.56.0)(algoliasearch@5.56.0) transitivePeerDependencies: - '@algolia/client-search' - algoliasearch - search-insights - '@algolia/autocomplete-core@1.19.8(@algolia/client-search@5.54.0)(algoliasearch@5.54.0)(search-insights@2.17.3)': + '@algolia/autocomplete-core@1.19.9(@algolia/client-search@5.56.0)(algoliasearch@5.56.0)(search-insights@2.17.3)': dependencies: - '@algolia/autocomplete-plugin-algolia-insights': 1.19.8(@algolia/client-search@5.54.0)(algoliasearch@5.54.0)(search-insights@2.17.3) - '@algolia/autocomplete-shared': 1.19.8(@algolia/client-search@5.54.0)(algoliasearch@5.54.0) + '@algolia/autocomplete-plugin-algolia-insights': 1.19.9(@algolia/client-search@5.56.0)(algoliasearch@5.56.0)(search-insights@2.17.3) + '@algolia/autocomplete-shared': 1.19.9(@algolia/client-search@5.56.0)(algoliasearch@5.56.0) transitivePeerDependencies: - '@algolia/client-search' - algoliasearch - search-insights - '@algolia/autocomplete-plugin-algolia-insights@1.19.2(@algolia/client-search@5.54.0)(algoliasearch@5.54.0)(search-insights@2.17.3)': + '@algolia/autocomplete-plugin-algolia-insights@1.19.2(@algolia/client-search@5.56.0)(algoliasearch@5.56.0)(search-insights@2.17.3)': dependencies: - '@algolia/autocomplete-shared': 1.19.2(@algolia/client-search@5.54.0)(algoliasearch@5.54.0) + '@algolia/autocomplete-shared': 1.19.2(@algolia/client-search@5.56.0)(algoliasearch@5.56.0) search-insights: 2.17.3 transitivePeerDependencies: - '@algolia/client-search' - algoliasearch - '@algolia/autocomplete-plugin-algolia-insights@1.19.8(@algolia/client-search@5.54.0)(algoliasearch@5.54.0)(search-insights@2.17.3)': + '@algolia/autocomplete-plugin-algolia-insights@1.19.9(@algolia/client-search@5.56.0)(algoliasearch@5.56.0)(search-insights@2.17.3)': dependencies: - '@algolia/autocomplete-shared': 1.19.8(@algolia/client-search@5.54.0)(algoliasearch@5.54.0) + '@algolia/autocomplete-shared': 1.19.9(@algolia/client-search@5.56.0)(algoliasearch@5.56.0) search-insights: 2.17.3 transitivePeerDependencies: - '@algolia/client-search' - algoliasearch - '@algolia/autocomplete-shared@1.19.2(@algolia/client-search@5.54.0)(algoliasearch@5.54.0)': + '@algolia/autocomplete-shared@1.19.2(@algolia/client-search@5.56.0)(algoliasearch@5.56.0)': dependencies: - '@algolia/client-search': 5.54.0 - algoliasearch: 5.54.0 + '@algolia/client-search': 5.56.0 + algoliasearch: 5.56.0 - '@algolia/autocomplete-shared@1.19.8(@algolia/client-search@5.54.0)(algoliasearch@5.54.0)': + '@algolia/autocomplete-shared@1.19.9(@algolia/client-search@5.56.0)(algoliasearch@5.56.0)': dependencies: - '@algolia/client-search': 5.54.0 - algoliasearch: 5.54.0 + '@algolia/client-search': 5.56.0 + algoliasearch: 5.56.0 - '@algolia/client-abtesting@5.54.0': + '@algolia/client-abtesting@5.56.0': dependencies: - '@algolia/client-common': 5.54.0 - '@algolia/requester-browser-xhr': 5.54.0 - '@algolia/requester-fetch': 5.54.0 - '@algolia/requester-node-http': 5.54.0 + '@algolia/client-common': 5.56.0 + '@algolia/requester-browser-xhr': 5.56.0 + '@algolia/requester-fetch': 5.56.0 + '@algolia/requester-node-http': 5.56.0 - '@algolia/client-analytics@5.54.0': + '@algolia/client-analytics@5.56.0': dependencies: - '@algolia/client-common': 5.54.0 - '@algolia/requester-browser-xhr': 5.54.0 - '@algolia/requester-fetch': 5.54.0 - '@algolia/requester-node-http': 5.54.0 + '@algolia/client-common': 5.56.0 + '@algolia/requester-browser-xhr': 5.56.0 + '@algolia/requester-fetch': 5.56.0 + '@algolia/requester-node-http': 5.56.0 - '@algolia/client-common@5.54.0': {} + '@algolia/client-common@5.56.0': {} - '@algolia/client-insights@5.54.0': + '@algolia/client-insights@5.56.0': dependencies: - '@algolia/client-common': 5.54.0 - '@algolia/requester-browser-xhr': 5.54.0 - '@algolia/requester-fetch': 5.54.0 - '@algolia/requester-node-http': 5.54.0 + '@algolia/client-common': 5.56.0 + '@algolia/requester-browser-xhr': 5.56.0 + '@algolia/requester-fetch': 5.56.0 + '@algolia/requester-node-http': 5.56.0 - '@algolia/client-personalization@5.54.0': + '@algolia/client-personalization@5.56.0': dependencies: - '@algolia/client-common': 5.54.0 - '@algolia/requester-browser-xhr': 5.54.0 - '@algolia/requester-fetch': 5.54.0 - '@algolia/requester-node-http': 5.54.0 + '@algolia/client-common': 5.56.0 + '@algolia/requester-browser-xhr': 5.56.0 + '@algolia/requester-fetch': 5.56.0 + '@algolia/requester-node-http': 5.56.0 - '@algolia/client-query-suggestions@5.54.0': + '@algolia/client-query-suggestions@5.56.0': dependencies: - '@algolia/client-common': 5.54.0 - '@algolia/requester-browser-xhr': 5.54.0 - '@algolia/requester-fetch': 5.54.0 - '@algolia/requester-node-http': 5.54.0 + '@algolia/client-common': 5.56.0 + '@algolia/requester-browser-xhr': 5.56.0 + '@algolia/requester-fetch': 5.56.0 + '@algolia/requester-node-http': 5.56.0 - '@algolia/client-search@5.54.0': + '@algolia/client-search@5.56.0': dependencies: - '@algolia/client-common': 5.54.0 - '@algolia/requester-browser-xhr': 5.54.0 - '@algolia/requester-fetch': 5.54.0 - '@algolia/requester-node-http': 5.54.0 + '@algolia/client-common': 5.56.0 + '@algolia/requester-browser-xhr': 5.56.0 + '@algolia/requester-fetch': 5.56.0 + '@algolia/requester-node-http': 5.56.0 '@algolia/events@4.0.1': {} - '@algolia/ingestion@1.54.0': + '@algolia/ingestion@1.56.0': dependencies: - '@algolia/client-common': 5.54.0 - '@algolia/requester-browser-xhr': 5.54.0 - '@algolia/requester-fetch': 5.54.0 - '@algolia/requester-node-http': 5.54.0 + '@algolia/client-common': 5.56.0 + '@algolia/requester-browser-xhr': 5.56.0 + '@algolia/requester-fetch': 5.56.0 + '@algolia/requester-node-http': 5.56.0 - '@algolia/monitoring@1.54.0': + '@algolia/monitoring@1.56.0': dependencies: - '@algolia/client-common': 5.54.0 - '@algolia/requester-browser-xhr': 5.54.0 - '@algolia/requester-fetch': 5.54.0 - '@algolia/requester-node-http': 5.54.0 + '@algolia/client-common': 5.56.0 + '@algolia/requester-browser-xhr': 5.56.0 + '@algolia/requester-fetch': 5.56.0 + '@algolia/requester-node-http': 5.56.0 - '@algolia/recommend@5.54.0': + '@algolia/recommend@5.56.0': dependencies: - '@algolia/client-common': 5.54.0 - '@algolia/requester-browser-xhr': 5.54.0 - '@algolia/requester-fetch': 5.54.0 - '@algolia/requester-node-http': 5.54.0 + '@algolia/client-common': 5.56.0 + '@algolia/requester-browser-xhr': 5.56.0 + '@algolia/requester-fetch': 5.56.0 + '@algolia/requester-node-http': 5.56.0 - '@algolia/requester-browser-xhr@5.54.0': + '@algolia/requester-browser-xhr@5.56.0': dependencies: - '@algolia/client-common': 5.54.0 + '@algolia/client-common': 5.56.0 - '@algolia/requester-fetch@5.54.0': + '@algolia/requester-fetch@5.56.0': dependencies: - '@algolia/client-common': 5.54.0 + '@algolia/client-common': 5.56.0 - '@algolia/requester-node-http@5.54.0': + '@algolia/requester-node-http@5.56.0': dependencies: - '@algolia/client-common': 5.54.0 + '@algolia/client-common': 5.56.0 '@alloc/quick-lru@5.2.0': {} @@ -13117,11 +13210,11 @@ snapshots: optionalDependencies: chokidar: 4.0.3 - '@angular-devkit/schematics-cli@19.2.27(@types/node@24.13.2)(chokidar@4.0.3)': + '@angular-devkit/schematics-cli@19.2.27(@types/node@24.13.3)(chokidar@4.0.3)': dependencies: '@angular-devkit/core': 19.2.27(chokidar@4.0.3) '@angular-devkit/schematics': 19.2.27(chokidar@4.0.3) - '@inquirer/prompts': 7.3.2(@types/node@24.13.2) + '@inquirer/prompts': 7.3.2(@types/node@24.13.3) ansi-colors: 4.1.3 symbol-observable: 4.0.0 yargs-parser: 21.1.1 @@ -13151,7 +13244,7 @@ snapshots: '@antfu/install-pkg@1.1.0': dependencies: - package-manager-detector: 1.6.0 + package-manager-detector: 1.7.0 tinyexec: 1.2.4 '@asamuzakjp/css-color@3.2.0': @@ -13171,20 +13264,20 @@ snapshots: '@babel/compat-data@7.29.7': {} - '@babel/core@7.29.7': + '@babel/core@7.29.7(supports-color@8.1.1)': dependencies: '@babel/code-frame': 7.29.7 '@babel/generator': 7.29.7 '@babel/helper-compilation-targets': 7.29.7 - '@babel/helper-module-transforms': 7.29.7(@babel/core@7.29.7) + '@babel/helper-module-transforms': 7.29.7(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1) '@babel/helpers': 7.29.7 '@babel/parser': 7.29.7 '@babel/template': 7.29.7 - '@babel/traverse': 7.29.7 + '@babel/traverse': 7.29.7(supports-color@8.1.1) '@babel/types': 7.29.7 '@jridgewell/remapping': 2.3.5 convert-source-map: 2.0.0 - debug: 4.4.3 + debug: 4.4.3(supports-color@8.1.1) gensync: 1.0.0-beta.2 json5: 2.2.3 semver: 6.3.1 @@ -13207,36 +13300,36 @@ snapshots: dependencies: '@babel/compat-data': 7.29.7 '@babel/helper-validator-option': 7.29.7 - browserslist: 4.28.2 + browserslist: 4.28.6 lru-cache: 5.1.1 semver: 6.3.1 - '@babel/helper-create-class-features-plugin@7.29.7(@babel/core@7.29.7)': + '@babel/helper-create-class-features-plugin@7.29.7(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1)': dependencies: - '@babel/core': 7.29.7 + '@babel/core': 7.29.7(supports-color@8.1.1) '@babel/helper-annotate-as-pure': 7.29.7 - '@babel/helper-member-expression-to-functions': 7.29.7 + '@babel/helper-member-expression-to-functions': 7.29.7(supports-color@8.1.1) '@babel/helper-optimise-call-expression': 7.29.7 - '@babel/helper-replace-supers': 7.29.7(@babel/core@7.29.7) - '@babel/helper-skip-transparent-expression-wrappers': 7.29.7 - '@babel/traverse': 7.29.7 + '@babel/helper-replace-supers': 7.29.7(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1) + '@babel/helper-skip-transparent-expression-wrappers': 7.29.7(supports-color@8.1.1) + '@babel/traverse': 7.29.7(supports-color@8.1.1) semver: 6.3.1 transitivePeerDependencies: - supports-color - '@babel/helper-create-regexp-features-plugin@7.29.7(@babel/core@7.29.7)': + '@babel/helper-create-regexp-features-plugin@7.29.7(@babel/core@7.29.7(supports-color@8.1.1))': dependencies: - '@babel/core': 7.29.7 + '@babel/core': 7.29.7(supports-color@8.1.1) '@babel/helper-annotate-as-pure': 7.29.7 regexpu-core: 6.4.0 semver: 6.3.1 - '@babel/helper-define-polyfill-provider@0.6.8(@babel/core@7.29.7)': + '@babel/helper-define-polyfill-provider@0.6.8(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1)': dependencies: - '@babel/core': 7.29.7 + '@babel/core': 7.29.7(supports-color@8.1.1) '@babel/helper-compilation-targets': 7.29.7 '@babel/helper-plugin-utils': 7.29.7 - debug: 4.4.3 + debug: 4.4.3(supports-color@8.1.1) lodash.debounce: 4.0.8 resolve: 1.22.12 transitivePeerDependencies: @@ -13244,26 +13337,26 @@ snapshots: '@babel/helper-globals@7.29.7': {} - '@babel/helper-member-expression-to-functions@7.29.7': + '@babel/helper-member-expression-to-functions@7.29.7(supports-color@8.1.1)': dependencies: - '@babel/traverse': 7.29.7 + '@babel/traverse': 7.29.7(supports-color@8.1.1) '@babel/types': 7.29.7 transitivePeerDependencies: - supports-color - '@babel/helper-module-imports@7.29.7': + '@babel/helper-module-imports@7.29.7(supports-color@8.1.1)': dependencies: - '@babel/traverse': 7.29.7 + '@babel/traverse': 7.29.7(supports-color@8.1.1) '@babel/types': 7.29.7 transitivePeerDependencies: - supports-color - '@babel/helper-module-transforms@7.29.7(@babel/core@7.29.7)': + '@babel/helper-module-transforms@7.29.7(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1)': dependencies: - '@babel/core': 7.29.7 - '@babel/helper-module-imports': 7.29.7 + '@babel/core': 7.29.7(supports-color@8.1.1) + '@babel/helper-module-imports': 7.29.7(supports-color@8.1.1) '@babel/helper-validator-identifier': 7.29.7 - '@babel/traverse': 7.29.7 + '@babel/traverse': 7.29.7(supports-color@8.1.1) transitivePeerDependencies: - supports-color @@ -13273,27 +13366,27 @@ snapshots: '@babel/helper-plugin-utils@7.29.7': {} - '@babel/helper-remap-async-to-generator@7.29.7(@babel/core@7.29.7)': + '@babel/helper-remap-async-to-generator@7.29.7(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1)': dependencies: - '@babel/core': 7.29.7 + '@babel/core': 7.29.7(supports-color@8.1.1) '@babel/helper-annotate-as-pure': 7.29.7 - '@babel/helper-wrap-function': 7.29.7 - '@babel/traverse': 7.29.7 + '@babel/helper-wrap-function': 7.29.7(supports-color@8.1.1) + '@babel/traverse': 7.29.7(supports-color@8.1.1) transitivePeerDependencies: - supports-color - '@babel/helper-replace-supers@7.29.7(@babel/core@7.29.7)': + '@babel/helper-replace-supers@7.29.7(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1)': dependencies: - '@babel/core': 7.29.7 - '@babel/helper-member-expression-to-functions': 7.29.7 + '@babel/core': 7.29.7(supports-color@8.1.1) + '@babel/helper-member-expression-to-functions': 7.29.7(supports-color@8.1.1) '@babel/helper-optimise-call-expression': 7.29.7 - '@babel/traverse': 7.29.7 + '@babel/traverse': 7.29.7(supports-color@8.1.1) transitivePeerDependencies: - supports-color - '@babel/helper-skip-transparent-expression-wrappers@7.29.7': + '@babel/helper-skip-transparent-expression-wrappers@7.29.7(supports-color@8.1.1)': dependencies: - '@babel/traverse': 7.29.7 + '@babel/traverse': 7.29.7(supports-color@8.1.1) '@babel/types': 7.29.7 transitivePeerDependencies: - supports-color @@ -13304,10 +13397,10 @@ snapshots: '@babel/helper-validator-option@7.29.7': {} - '@babel/helper-wrap-function@7.29.7': + '@babel/helper-wrap-function@7.29.7(supports-color@8.1.1)': dependencies: '@babel/template': 7.29.7 - '@babel/traverse': 7.29.7 + '@babel/traverse': 7.29.7(supports-color@8.1.1) '@babel/types': 7.29.7 transitivePeerDependencies: - supports-color @@ -13325,578 +13418,578 @@ snapshots: dependencies: '@babel/types': 7.29.7 - '@babel/plugin-bugfix-firefox-class-in-computed-class-key@7.29.7(@babel/core@7.29.7)': + '@babel/plugin-bugfix-firefox-class-in-computed-class-key@7.29.7(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1)': dependencies: - '@babel/core': 7.29.7 + '@babel/core': 7.29.7(supports-color@8.1.1) '@babel/helper-plugin-utils': 7.29.7 - '@babel/traverse': 7.29.7 + '@babel/traverse': 7.29.7(supports-color@8.1.1) transitivePeerDependencies: - supports-color - '@babel/plugin-bugfix-safari-class-field-initializer-scope@7.29.7(@babel/core@7.29.7)': + '@babel/plugin-bugfix-safari-class-field-initializer-scope@7.29.7(@babel/core@7.29.7(supports-color@8.1.1))': dependencies: - '@babel/core': 7.29.7 + '@babel/core': 7.29.7(supports-color@8.1.1) '@babel/helper-plugin-utils': 7.29.7 - '@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@7.29.7(@babel/core@7.29.7)': + '@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@7.29.7(@babel/core@7.29.7(supports-color@8.1.1))': dependencies: - '@babel/core': 7.29.7 + '@babel/core': 7.29.7(supports-color@8.1.1) '@babel/helper-plugin-utils': 7.29.7 - '@babel/plugin-bugfix-safari-rest-destructuring-rhs-array@7.29.7(@babel/core@7.29.7)': + '@babel/plugin-bugfix-safari-rest-destructuring-rhs-array@7.29.7(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1)': dependencies: - '@babel/core': 7.29.7 + '@babel/core': 7.29.7(supports-color@8.1.1) '@babel/helper-plugin-utils': 7.29.7 - '@babel/helper-skip-transparent-expression-wrappers': 7.29.7 + '@babel/helper-skip-transparent-expression-wrappers': 7.29.7(supports-color@8.1.1) transitivePeerDependencies: - supports-color - '@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining@7.29.7(@babel/core@7.29.7)': + '@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining@7.29.7(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1)': dependencies: - '@babel/core': 7.29.7 + '@babel/core': 7.29.7(supports-color@8.1.1) '@babel/helper-plugin-utils': 7.29.7 - '@babel/helper-skip-transparent-expression-wrappers': 7.29.7 - '@babel/plugin-transform-optional-chaining': 7.29.7(@babel/core@7.29.7) + '@babel/helper-skip-transparent-expression-wrappers': 7.29.7(supports-color@8.1.1) + '@babel/plugin-transform-optional-chaining': 7.29.7(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1) transitivePeerDependencies: - supports-color - '@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly@7.29.7(@babel/core@7.29.7)': + '@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly@7.29.7(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1)': dependencies: - '@babel/core': 7.29.7 + '@babel/core': 7.29.7(supports-color@8.1.1) '@babel/helper-plugin-utils': 7.29.7 - '@babel/traverse': 7.29.7 + '@babel/traverse': 7.29.7(supports-color@8.1.1) transitivePeerDependencies: - supports-color - '@babel/plugin-proposal-private-property-in-object@7.21.0-placeholder-for-preset-env.2(@babel/core@7.29.7)': + '@babel/plugin-proposal-private-property-in-object@7.21.0-placeholder-for-preset-env.2(@babel/core@7.29.7(supports-color@8.1.1))': dependencies: - '@babel/core': 7.29.7 + '@babel/core': 7.29.7(supports-color@8.1.1) - '@babel/plugin-syntax-dynamic-import@7.8.3(@babel/core@7.29.7)': + '@babel/plugin-syntax-dynamic-import@7.8.3(@babel/core@7.29.7(supports-color@8.1.1))': dependencies: - '@babel/core': 7.29.7 + '@babel/core': 7.29.7(supports-color@8.1.1) '@babel/helper-plugin-utils': 7.29.7 - '@babel/plugin-syntax-import-assertions@7.29.7(@babel/core@7.29.7)': + '@babel/plugin-syntax-import-assertions@7.29.7(@babel/core@7.29.7(supports-color@8.1.1))': dependencies: - '@babel/core': 7.29.7 + '@babel/core': 7.29.7(supports-color@8.1.1) '@babel/helper-plugin-utils': 7.29.7 - '@babel/plugin-syntax-import-attributes@7.29.7(@babel/core@7.29.7)': + '@babel/plugin-syntax-import-attributes@7.29.7(@babel/core@7.29.7(supports-color@8.1.1))': dependencies: - '@babel/core': 7.29.7 + '@babel/core': 7.29.7(supports-color@8.1.1) '@babel/helper-plugin-utils': 7.29.7 - '@babel/plugin-syntax-jsx@7.29.7(@babel/core@7.29.7)': + '@babel/plugin-syntax-jsx@7.29.7(@babel/core@7.29.7(supports-color@8.1.1))': dependencies: - '@babel/core': 7.29.7 + '@babel/core': 7.29.7(supports-color@8.1.1) '@babel/helper-plugin-utils': 7.29.7 - '@babel/plugin-syntax-typescript@7.29.7(@babel/core@7.29.7)': + '@babel/plugin-syntax-typescript@7.29.7(@babel/core@7.29.7(supports-color@8.1.1))': dependencies: - '@babel/core': 7.29.7 + '@babel/core': 7.29.7(supports-color@8.1.1) '@babel/helper-plugin-utils': 7.29.7 - '@babel/plugin-syntax-unicode-sets-regex@7.18.6(@babel/core@7.29.7)': + '@babel/plugin-syntax-unicode-sets-regex@7.18.6(@babel/core@7.29.7(supports-color@8.1.1))': dependencies: - '@babel/core': 7.29.7 - '@babel/helper-create-regexp-features-plugin': 7.29.7(@babel/core@7.29.7) + '@babel/core': 7.29.7(supports-color@8.1.1) + '@babel/helper-create-regexp-features-plugin': 7.29.7(@babel/core@7.29.7(supports-color@8.1.1)) '@babel/helper-plugin-utils': 7.29.7 - '@babel/plugin-transform-arrow-functions@7.29.7(@babel/core@7.29.7)': + '@babel/plugin-transform-arrow-functions@7.29.7(@babel/core@7.29.7(supports-color@8.1.1))': dependencies: - '@babel/core': 7.29.7 + '@babel/core': 7.29.7(supports-color@8.1.1) '@babel/helper-plugin-utils': 7.29.7 - '@babel/plugin-transform-async-generator-functions@7.29.7(@babel/core@7.29.7)': + '@babel/plugin-transform-async-generator-functions@7.29.7(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1)': dependencies: - '@babel/core': 7.29.7 + '@babel/core': 7.29.7(supports-color@8.1.1) '@babel/helper-plugin-utils': 7.29.7 - '@babel/helper-remap-async-to-generator': 7.29.7(@babel/core@7.29.7) - '@babel/traverse': 7.29.7 + '@babel/helper-remap-async-to-generator': 7.29.7(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1) + '@babel/traverse': 7.29.7(supports-color@8.1.1) transitivePeerDependencies: - supports-color - '@babel/plugin-transform-async-to-generator@7.29.7(@babel/core@7.29.7)': + '@babel/plugin-transform-async-to-generator@7.29.7(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1)': dependencies: - '@babel/core': 7.29.7 - '@babel/helper-module-imports': 7.29.7 + '@babel/core': 7.29.7(supports-color@8.1.1) + '@babel/helper-module-imports': 7.29.7(supports-color@8.1.1) '@babel/helper-plugin-utils': 7.29.7 - '@babel/helper-remap-async-to-generator': 7.29.7(@babel/core@7.29.7) + '@babel/helper-remap-async-to-generator': 7.29.7(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1) transitivePeerDependencies: - supports-color - '@babel/plugin-transform-block-scoped-functions@7.29.7(@babel/core@7.29.7)': + '@babel/plugin-transform-block-scoped-functions@7.29.7(@babel/core@7.29.7(supports-color@8.1.1))': dependencies: - '@babel/core': 7.29.7 + '@babel/core': 7.29.7(supports-color@8.1.1) '@babel/helper-plugin-utils': 7.29.7 - '@babel/plugin-transform-block-scoping@7.29.7(@babel/core@7.29.7)': + '@babel/plugin-transform-block-scoping@7.29.7(@babel/core@7.29.7(supports-color@8.1.1))': dependencies: - '@babel/core': 7.29.7 + '@babel/core': 7.29.7(supports-color@8.1.1) '@babel/helper-plugin-utils': 7.29.7 - '@babel/plugin-transform-class-properties@7.29.7(@babel/core@7.29.7)': + '@babel/plugin-transform-class-properties@7.29.7(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1)': dependencies: - '@babel/core': 7.29.7 - '@babel/helper-create-class-features-plugin': 7.29.7(@babel/core@7.29.7) + '@babel/core': 7.29.7(supports-color@8.1.1) + '@babel/helper-create-class-features-plugin': 7.29.7(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1) '@babel/helper-plugin-utils': 7.29.7 transitivePeerDependencies: - supports-color - '@babel/plugin-transform-class-static-block@7.29.7(@babel/core@7.29.7)': + '@babel/plugin-transform-class-static-block@7.29.7(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1)': dependencies: - '@babel/core': 7.29.7 - '@babel/helper-create-class-features-plugin': 7.29.7(@babel/core@7.29.7) + '@babel/core': 7.29.7(supports-color@8.1.1) + '@babel/helper-create-class-features-plugin': 7.29.7(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1) '@babel/helper-plugin-utils': 7.29.7 transitivePeerDependencies: - supports-color - '@babel/plugin-transform-classes@7.29.7(@babel/core@7.29.7)': + '@babel/plugin-transform-classes@7.29.7(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1)': dependencies: - '@babel/core': 7.29.7 + '@babel/core': 7.29.7(supports-color@8.1.1) '@babel/helper-annotate-as-pure': 7.29.7 '@babel/helper-compilation-targets': 7.29.7 '@babel/helper-globals': 7.29.7 '@babel/helper-plugin-utils': 7.29.7 - '@babel/helper-replace-supers': 7.29.7(@babel/core@7.29.7) - '@babel/traverse': 7.29.7 + '@babel/helper-replace-supers': 7.29.7(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1) + '@babel/traverse': 7.29.7(supports-color@8.1.1) transitivePeerDependencies: - supports-color - '@babel/plugin-transform-computed-properties@7.29.7(@babel/core@7.29.7)': + '@babel/plugin-transform-computed-properties@7.29.7(@babel/core@7.29.7(supports-color@8.1.1))': dependencies: - '@babel/core': 7.29.7 + '@babel/core': 7.29.7(supports-color@8.1.1) '@babel/helper-plugin-utils': 7.29.7 '@babel/template': 7.29.7 - '@babel/plugin-transform-destructuring@7.29.7(@babel/core@7.29.7)': + '@babel/plugin-transform-destructuring@7.29.7(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1)': dependencies: - '@babel/core': 7.29.7 + '@babel/core': 7.29.7(supports-color@8.1.1) '@babel/helper-plugin-utils': 7.29.7 - '@babel/traverse': 7.29.7 + '@babel/traverse': 7.29.7(supports-color@8.1.1) transitivePeerDependencies: - supports-color - '@babel/plugin-transform-dotall-regex@7.29.7(@babel/core@7.29.7)': + '@babel/plugin-transform-dotall-regex@7.29.7(@babel/core@7.29.7(supports-color@8.1.1))': dependencies: - '@babel/core': 7.29.7 - '@babel/helper-create-regexp-features-plugin': 7.29.7(@babel/core@7.29.7) + '@babel/core': 7.29.7(supports-color@8.1.1) + '@babel/helper-create-regexp-features-plugin': 7.29.7(@babel/core@7.29.7(supports-color@8.1.1)) '@babel/helper-plugin-utils': 7.29.7 - '@babel/plugin-transform-duplicate-keys@7.29.7(@babel/core@7.29.7)': + '@babel/plugin-transform-duplicate-keys@7.29.7(@babel/core@7.29.7(supports-color@8.1.1))': dependencies: - '@babel/core': 7.29.7 + '@babel/core': 7.29.7(supports-color@8.1.1) '@babel/helper-plugin-utils': 7.29.7 - '@babel/plugin-transform-duplicate-named-capturing-groups-regex@7.29.7(@babel/core@7.29.7)': + '@babel/plugin-transform-duplicate-named-capturing-groups-regex@7.29.7(@babel/core@7.29.7(supports-color@8.1.1))': dependencies: - '@babel/core': 7.29.7 - '@babel/helper-create-regexp-features-plugin': 7.29.7(@babel/core@7.29.7) + '@babel/core': 7.29.7(supports-color@8.1.1) + '@babel/helper-create-regexp-features-plugin': 7.29.7(@babel/core@7.29.7(supports-color@8.1.1)) '@babel/helper-plugin-utils': 7.29.7 - '@babel/plugin-transform-dynamic-import@7.29.7(@babel/core@7.29.7)': + '@babel/plugin-transform-dynamic-import@7.29.7(@babel/core@7.29.7(supports-color@8.1.1))': dependencies: - '@babel/core': 7.29.7 + '@babel/core': 7.29.7(supports-color@8.1.1) '@babel/helper-plugin-utils': 7.29.7 - '@babel/plugin-transform-explicit-resource-management@7.29.7(@babel/core@7.29.7)': + '@babel/plugin-transform-explicit-resource-management@7.29.7(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1)': dependencies: - '@babel/core': 7.29.7 + '@babel/core': 7.29.7(supports-color@8.1.1) '@babel/helper-plugin-utils': 7.29.7 - '@babel/plugin-transform-destructuring': 7.29.7(@babel/core@7.29.7) + '@babel/plugin-transform-destructuring': 7.29.7(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1) transitivePeerDependencies: - supports-color - '@babel/plugin-transform-exponentiation-operator@7.29.7(@babel/core@7.29.7)': + '@babel/plugin-transform-exponentiation-operator@7.29.7(@babel/core@7.29.7(supports-color@8.1.1))': dependencies: - '@babel/core': 7.29.7 + '@babel/core': 7.29.7(supports-color@8.1.1) '@babel/helper-plugin-utils': 7.29.7 - '@babel/plugin-transform-export-namespace-from@7.29.7(@babel/core@7.29.7)': + '@babel/plugin-transform-export-namespace-from@7.29.7(@babel/core@7.29.7(supports-color@8.1.1))': dependencies: - '@babel/core': 7.29.7 + '@babel/core': 7.29.7(supports-color@8.1.1) '@babel/helper-plugin-utils': 7.29.7 - '@babel/plugin-transform-for-of@7.29.7(@babel/core@7.29.7)': + '@babel/plugin-transform-for-of@7.29.7(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1)': dependencies: - '@babel/core': 7.29.7 + '@babel/core': 7.29.7(supports-color@8.1.1) '@babel/helper-plugin-utils': 7.29.7 - '@babel/helper-skip-transparent-expression-wrappers': 7.29.7 + '@babel/helper-skip-transparent-expression-wrappers': 7.29.7(supports-color@8.1.1) transitivePeerDependencies: - supports-color - '@babel/plugin-transform-function-name@7.29.7(@babel/core@7.29.7)': + '@babel/plugin-transform-function-name@7.29.7(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1)': dependencies: - '@babel/core': 7.29.7 + '@babel/core': 7.29.7(supports-color@8.1.1) '@babel/helper-compilation-targets': 7.29.7 '@babel/helper-plugin-utils': 7.29.7 - '@babel/traverse': 7.29.7 + '@babel/traverse': 7.29.7(supports-color@8.1.1) transitivePeerDependencies: - supports-color - '@babel/plugin-transform-json-strings@7.29.7(@babel/core@7.29.7)': + '@babel/plugin-transform-json-strings@7.29.7(@babel/core@7.29.7(supports-color@8.1.1))': dependencies: - '@babel/core': 7.29.7 + '@babel/core': 7.29.7(supports-color@8.1.1) '@babel/helper-plugin-utils': 7.29.7 - '@babel/plugin-transform-literals@7.29.7(@babel/core@7.29.7)': + '@babel/plugin-transform-literals@7.29.7(@babel/core@7.29.7(supports-color@8.1.1))': dependencies: - '@babel/core': 7.29.7 + '@babel/core': 7.29.7(supports-color@8.1.1) '@babel/helper-plugin-utils': 7.29.7 - '@babel/plugin-transform-logical-assignment-operators@7.29.7(@babel/core@7.29.7)': + '@babel/plugin-transform-logical-assignment-operators@7.29.7(@babel/core@7.29.7(supports-color@8.1.1))': dependencies: - '@babel/core': 7.29.7 + '@babel/core': 7.29.7(supports-color@8.1.1) '@babel/helper-plugin-utils': 7.29.7 - '@babel/plugin-transform-member-expression-literals@7.29.7(@babel/core@7.29.7)': + '@babel/plugin-transform-member-expression-literals@7.29.7(@babel/core@7.29.7(supports-color@8.1.1))': dependencies: - '@babel/core': 7.29.7 + '@babel/core': 7.29.7(supports-color@8.1.1) '@babel/helper-plugin-utils': 7.29.7 - '@babel/plugin-transform-modules-amd@7.29.7(@babel/core@7.29.7)': + '@babel/plugin-transform-modules-amd@7.29.7(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1)': dependencies: - '@babel/core': 7.29.7 - '@babel/helper-module-transforms': 7.29.7(@babel/core@7.29.7) + '@babel/core': 7.29.7(supports-color@8.1.1) + '@babel/helper-module-transforms': 7.29.7(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1) '@babel/helper-plugin-utils': 7.29.7 transitivePeerDependencies: - supports-color - '@babel/plugin-transform-modules-commonjs@7.29.7(@babel/core@7.29.7)': + '@babel/plugin-transform-modules-commonjs@7.29.7(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1)': dependencies: - '@babel/core': 7.29.7 - '@babel/helper-module-transforms': 7.29.7(@babel/core@7.29.7) + '@babel/core': 7.29.7(supports-color@8.1.1) + '@babel/helper-module-transforms': 7.29.7(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1) '@babel/helper-plugin-utils': 7.29.7 transitivePeerDependencies: - supports-color - '@babel/plugin-transform-modules-systemjs@7.29.7(@babel/core@7.29.7)': + '@babel/plugin-transform-modules-systemjs@7.29.7(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1)': dependencies: - '@babel/core': 7.29.7 - '@babel/helper-module-transforms': 7.29.7(@babel/core@7.29.7) + '@babel/core': 7.29.7(supports-color@8.1.1) + '@babel/helper-module-transforms': 7.29.7(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1) '@babel/helper-plugin-utils': 7.29.7 '@babel/helper-validator-identifier': 7.29.7 - '@babel/traverse': 7.29.7 + '@babel/traverse': 7.29.7(supports-color@8.1.1) transitivePeerDependencies: - supports-color - '@babel/plugin-transform-modules-umd@7.29.7(@babel/core@7.29.7)': + '@babel/plugin-transform-modules-umd@7.29.7(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1)': dependencies: - '@babel/core': 7.29.7 - '@babel/helper-module-transforms': 7.29.7(@babel/core@7.29.7) + '@babel/core': 7.29.7(supports-color@8.1.1) + '@babel/helper-module-transforms': 7.29.7(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1) '@babel/helper-plugin-utils': 7.29.7 transitivePeerDependencies: - supports-color - '@babel/plugin-transform-named-capturing-groups-regex@7.29.7(@babel/core@7.29.7)': + '@babel/plugin-transform-named-capturing-groups-regex@7.29.7(@babel/core@7.29.7(supports-color@8.1.1))': dependencies: - '@babel/core': 7.29.7 - '@babel/helper-create-regexp-features-plugin': 7.29.7(@babel/core@7.29.7) + '@babel/core': 7.29.7(supports-color@8.1.1) + '@babel/helper-create-regexp-features-plugin': 7.29.7(@babel/core@7.29.7(supports-color@8.1.1)) '@babel/helper-plugin-utils': 7.29.7 - '@babel/plugin-transform-new-target@7.29.7(@babel/core@7.29.7)': + '@babel/plugin-transform-new-target@7.29.7(@babel/core@7.29.7(supports-color@8.1.1))': dependencies: - '@babel/core': 7.29.7 + '@babel/core': 7.29.7(supports-color@8.1.1) '@babel/helper-plugin-utils': 7.29.7 - '@babel/plugin-transform-nullish-coalescing-operator@7.29.7(@babel/core@7.29.7)': + '@babel/plugin-transform-nullish-coalescing-operator@7.29.7(@babel/core@7.29.7(supports-color@8.1.1))': dependencies: - '@babel/core': 7.29.7 + '@babel/core': 7.29.7(supports-color@8.1.1) '@babel/helper-plugin-utils': 7.29.7 - '@babel/plugin-transform-numeric-separator@7.29.7(@babel/core@7.29.7)': + '@babel/plugin-transform-numeric-separator@7.29.7(@babel/core@7.29.7(supports-color@8.1.1))': dependencies: - '@babel/core': 7.29.7 + '@babel/core': 7.29.7(supports-color@8.1.1) '@babel/helper-plugin-utils': 7.29.7 - '@babel/plugin-transform-object-rest-spread@7.29.7(@babel/core@7.29.7)': + '@babel/plugin-transform-object-rest-spread@7.29.7(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1)': dependencies: - '@babel/core': 7.29.7 + '@babel/core': 7.29.7(supports-color@8.1.1) '@babel/helper-compilation-targets': 7.29.7 '@babel/helper-plugin-utils': 7.29.7 - '@babel/plugin-transform-destructuring': 7.29.7(@babel/core@7.29.7) - '@babel/plugin-transform-parameters': 7.29.7(@babel/core@7.29.7) - '@babel/traverse': 7.29.7 + '@babel/plugin-transform-destructuring': 7.29.7(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1) + '@babel/plugin-transform-parameters': 7.29.7(@babel/core@7.29.7(supports-color@8.1.1)) + '@babel/traverse': 7.29.7(supports-color@8.1.1) transitivePeerDependencies: - supports-color - '@babel/plugin-transform-object-super@7.29.7(@babel/core@7.29.7)': + '@babel/plugin-transform-object-super@7.29.7(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1)': dependencies: - '@babel/core': 7.29.7 + '@babel/core': 7.29.7(supports-color@8.1.1) '@babel/helper-plugin-utils': 7.29.7 - '@babel/helper-replace-supers': 7.29.7(@babel/core@7.29.7) + '@babel/helper-replace-supers': 7.29.7(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1) transitivePeerDependencies: - supports-color - '@babel/plugin-transform-optional-catch-binding@7.29.7(@babel/core@7.29.7)': + '@babel/plugin-transform-optional-catch-binding@7.29.7(@babel/core@7.29.7(supports-color@8.1.1))': dependencies: - '@babel/core': 7.29.7 + '@babel/core': 7.29.7(supports-color@8.1.1) '@babel/helper-plugin-utils': 7.29.7 - '@babel/plugin-transform-optional-chaining@7.29.7(@babel/core@7.29.7)': + '@babel/plugin-transform-optional-chaining@7.29.7(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1)': dependencies: - '@babel/core': 7.29.7 + '@babel/core': 7.29.7(supports-color@8.1.1) '@babel/helper-plugin-utils': 7.29.7 - '@babel/helper-skip-transparent-expression-wrappers': 7.29.7 + '@babel/helper-skip-transparent-expression-wrappers': 7.29.7(supports-color@8.1.1) transitivePeerDependencies: - supports-color - '@babel/plugin-transform-parameters@7.29.7(@babel/core@7.29.7)': + '@babel/plugin-transform-parameters@7.29.7(@babel/core@7.29.7(supports-color@8.1.1))': dependencies: - '@babel/core': 7.29.7 + '@babel/core': 7.29.7(supports-color@8.1.1) '@babel/helper-plugin-utils': 7.29.7 - '@babel/plugin-transform-private-methods@7.29.7(@babel/core@7.29.7)': + '@babel/plugin-transform-private-methods@7.29.7(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1)': dependencies: - '@babel/core': 7.29.7 - '@babel/helper-create-class-features-plugin': 7.29.7(@babel/core@7.29.7) + '@babel/core': 7.29.7(supports-color@8.1.1) + '@babel/helper-create-class-features-plugin': 7.29.7(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1) '@babel/helper-plugin-utils': 7.29.7 transitivePeerDependencies: - supports-color - '@babel/plugin-transform-private-property-in-object@7.29.7(@babel/core@7.29.7)': + '@babel/plugin-transform-private-property-in-object@7.29.7(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1)': dependencies: - '@babel/core': 7.29.7 + '@babel/core': 7.29.7(supports-color@8.1.1) '@babel/helper-annotate-as-pure': 7.29.7 - '@babel/helper-create-class-features-plugin': 7.29.7(@babel/core@7.29.7) + '@babel/helper-create-class-features-plugin': 7.29.7(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1) '@babel/helper-plugin-utils': 7.29.7 transitivePeerDependencies: - supports-color - '@babel/plugin-transform-property-literals@7.29.7(@babel/core@7.29.7)': + '@babel/plugin-transform-property-literals@7.29.7(@babel/core@7.29.7(supports-color@8.1.1))': dependencies: - '@babel/core': 7.29.7 + '@babel/core': 7.29.7(supports-color@8.1.1) '@babel/helper-plugin-utils': 7.29.7 - '@babel/plugin-transform-react-constant-elements@7.29.7(@babel/core@7.29.7)': + '@babel/plugin-transform-react-constant-elements@7.29.7(@babel/core@7.29.7(supports-color@8.1.1))': dependencies: - '@babel/core': 7.29.7 + '@babel/core': 7.29.7(supports-color@8.1.1) '@babel/helper-plugin-utils': 7.29.7 - '@babel/plugin-transform-react-display-name@7.29.7(@babel/core@7.29.7)': + '@babel/plugin-transform-react-display-name@7.29.7(@babel/core@7.29.7(supports-color@8.1.1))': dependencies: - '@babel/core': 7.29.7 + '@babel/core': 7.29.7(supports-color@8.1.1) '@babel/helper-plugin-utils': 7.29.7 - '@babel/plugin-transform-react-jsx-development@7.29.7(@babel/core@7.29.7)': + '@babel/plugin-transform-react-jsx-development@7.29.7(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1)': dependencies: - '@babel/core': 7.29.7 - '@babel/plugin-transform-react-jsx': 7.29.7(@babel/core@7.29.7) + '@babel/core': 7.29.7(supports-color@8.1.1) + '@babel/plugin-transform-react-jsx': 7.29.7(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1) transitivePeerDependencies: - supports-color - '@babel/plugin-transform-react-jsx@7.29.7(@babel/core@7.29.7)': + '@babel/plugin-transform-react-jsx@7.29.7(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1)': dependencies: - '@babel/core': 7.29.7 + '@babel/core': 7.29.7(supports-color@8.1.1) '@babel/helper-annotate-as-pure': 7.29.7 - '@babel/helper-module-imports': 7.29.7 + '@babel/helper-module-imports': 7.29.7(supports-color@8.1.1) '@babel/helper-plugin-utils': 7.29.7 - '@babel/plugin-syntax-jsx': 7.29.7(@babel/core@7.29.7) + '@babel/plugin-syntax-jsx': 7.29.7(@babel/core@7.29.7(supports-color@8.1.1)) '@babel/types': 7.29.7 transitivePeerDependencies: - supports-color - '@babel/plugin-transform-react-pure-annotations@7.29.7(@babel/core@7.29.7)': + '@babel/plugin-transform-react-pure-annotations@7.29.7(@babel/core@7.29.7(supports-color@8.1.1))': dependencies: - '@babel/core': 7.29.7 + '@babel/core': 7.29.7(supports-color@8.1.1) '@babel/helper-annotate-as-pure': 7.29.7 '@babel/helper-plugin-utils': 7.29.7 - '@babel/plugin-transform-regenerator@7.29.7(@babel/core@7.29.7)': + '@babel/plugin-transform-regenerator@7.29.7(@babel/core@7.29.7(supports-color@8.1.1))': dependencies: - '@babel/core': 7.29.7 + '@babel/core': 7.29.7(supports-color@8.1.1) '@babel/helper-plugin-utils': 7.29.7 - '@babel/plugin-transform-regexp-modifiers@7.29.7(@babel/core@7.29.7)': + '@babel/plugin-transform-regexp-modifiers@7.29.7(@babel/core@7.29.7(supports-color@8.1.1))': dependencies: - '@babel/core': 7.29.7 - '@babel/helper-create-regexp-features-plugin': 7.29.7(@babel/core@7.29.7) + '@babel/core': 7.29.7(supports-color@8.1.1) + '@babel/helper-create-regexp-features-plugin': 7.29.7(@babel/core@7.29.7(supports-color@8.1.1)) '@babel/helper-plugin-utils': 7.29.7 - '@babel/plugin-transform-reserved-words@7.29.7(@babel/core@7.29.7)': + '@babel/plugin-transform-reserved-words@7.29.7(@babel/core@7.29.7(supports-color@8.1.1))': dependencies: - '@babel/core': 7.29.7 + '@babel/core': 7.29.7(supports-color@8.1.1) '@babel/helper-plugin-utils': 7.29.7 - '@babel/plugin-transform-runtime@7.29.7(@babel/core@7.29.7)': + '@babel/plugin-transform-runtime@7.29.7(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1)': dependencies: - '@babel/core': 7.29.7 - '@babel/helper-module-imports': 7.29.7 + '@babel/core': 7.29.7(supports-color@8.1.1) + '@babel/helper-module-imports': 7.29.7(supports-color@8.1.1) '@babel/helper-plugin-utils': 7.29.7 - babel-plugin-polyfill-corejs2: 0.4.17(@babel/core@7.29.7) - babel-plugin-polyfill-corejs3: 0.13.0(@babel/core@7.29.7) - babel-plugin-polyfill-regenerator: 0.6.8(@babel/core@7.29.7) + babel-plugin-polyfill-corejs2: 0.4.17(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1) + babel-plugin-polyfill-corejs3: 0.13.0(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1) + babel-plugin-polyfill-regenerator: 0.6.8(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1) semver: 6.3.1 transitivePeerDependencies: - supports-color - '@babel/plugin-transform-shorthand-properties@7.29.7(@babel/core@7.29.7)': + '@babel/plugin-transform-shorthand-properties@7.29.7(@babel/core@7.29.7(supports-color@8.1.1))': dependencies: - '@babel/core': 7.29.7 + '@babel/core': 7.29.7(supports-color@8.1.1) '@babel/helper-plugin-utils': 7.29.7 - '@babel/plugin-transform-spread@7.29.7(@babel/core@7.29.7)': + '@babel/plugin-transform-spread@7.29.7(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1)': dependencies: - '@babel/core': 7.29.7 + '@babel/core': 7.29.7(supports-color@8.1.1) '@babel/helper-plugin-utils': 7.29.7 - '@babel/helper-skip-transparent-expression-wrappers': 7.29.7 + '@babel/helper-skip-transparent-expression-wrappers': 7.29.7(supports-color@8.1.1) transitivePeerDependencies: - supports-color - '@babel/plugin-transform-sticky-regex@7.29.7(@babel/core@7.29.7)': + '@babel/plugin-transform-sticky-regex@7.29.7(@babel/core@7.29.7(supports-color@8.1.1))': dependencies: - '@babel/core': 7.29.7 + '@babel/core': 7.29.7(supports-color@8.1.1) '@babel/helper-plugin-utils': 7.29.7 - '@babel/plugin-transform-template-literals@7.29.7(@babel/core@7.29.7)': + '@babel/plugin-transform-template-literals@7.29.7(@babel/core@7.29.7(supports-color@8.1.1))': dependencies: - '@babel/core': 7.29.7 + '@babel/core': 7.29.7(supports-color@8.1.1) '@babel/helper-plugin-utils': 7.29.7 - '@babel/plugin-transform-typeof-symbol@7.29.7(@babel/core@7.29.7)': + '@babel/plugin-transform-typeof-symbol@7.29.7(@babel/core@7.29.7(supports-color@8.1.1))': dependencies: - '@babel/core': 7.29.7 + '@babel/core': 7.29.7(supports-color@8.1.1) '@babel/helper-plugin-utils': 7.29.7 - '@babel/plugin-transform-typescript@7.29.7(@babel/core@7.29.7)': + '@babel/plugin-transform-typescript@7.29.7(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1)': dependencies: - '@babel/core': 7.29.7 + '@babel/core': 7.29.7(supports-color@8.1.1) '@babel/helper-annotate-as-pure': 7.29.7 - '@babel/helper-create-class-features-plugin': 7.29.7(@babel/core@7.29.7) + '@babel/helper-create-class-features-plugin': 7.29.7(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1) '@babel/helper-plugin-utils': 7.29.7 - '@babel/helper-skip-transparent-expression-wrappers': 7.29.7 - '@babel/plugin-syntax-typescript': 7.29.7(@babel/core@7.29.7) + '@babel/helper-skip-transparent-expression-wrappers': 7.29.7(supports-color@8.1.1) + '@babel/plugin-syntax-typescript': 7.29.7(@babel/core@7.29.7(supports-color@8.1.1)) transitivePeerDependencies: - supports-color - '@babel/plugin-transform-unicode-escapes@7.29.7(@babel/core@7.29.7)': + '@babel/plugin-transform-unicode-escapes@7.29.7(@babel/core@7.29.7(supports-color@8.1.1))': dependencies: - '@babel/core': 7.29.7 + '@babel/core': 7.29.7(supports-color@8.1.1) '@babel/helper-plugin-utils': 7.29.7 - '@babel/plugin-transform-unicode-property-regex@7.29.7(@babel/core@7.29.7)': + '@babel/plugin-transform-unicode-property-regex@7.29.7(@babel/core@7.29.7(supports-color@8.1.1))': dependencies: - '@babel/core': 7.29.7 - '@babel/helper-create-regexp-features-plugin': 7.29.7(@babel/core@7.29.7) + '@babel/core': 7.29.7(supports-color@8.1.1) + '@babel/helper-create-regexp-features-plugin': 7.29.7(@babel/core@7.29.7(supports-color@8.1.1)) '@babel/helper-plugin-utils': 7.29.7 - '@babel/plugin-transform-unicode-regex@7.29.7(@babel/core@7.29.7)': + '@babel/plugin-transform-unicode-regex@7.29.7(@babel/core@7.29.7(supports-color@8.1.1))': dependencies: - '@babel/core': 7.29.7 - '@babel/helper-create-regexp-features-plugin': 7.29.7(@babel/core@7.29.7) + '@babel/core': 7.29.7(supports-color@8.1.1) + '@babel/helper-create-regexp-features-plugin': 7.29.7(@babel/core@7.29.7(supports-color@8.1.1)) '@babel/helper-plugin-utils': 7.29.7 - '@babel/plugin-transform-unicode-sets-regex@7.29.7(@babel/core@7.29.7)': + '@babel/plugin-transform-unicode-sets-regex@7.29.7(@babel/core@7.29.7(supports-color@8.1.1))': dependencies: - '@babel/core': 7.29.7 - '@babel/helper-create-regexp-features-plugin': 7.29.7(@babel/core@7.29.7) + '@babel/core': 7.29.7(supports-color@8.1.1) + '@babel/helper-create-regexp-features-plugin': 7.29.7(@babel/core@7.29.7(supports-color@8.1.1)) '@babel/helper-plugin-utils': 7.29.7 - '@babel/preset-env@7.29.7(@babel/core@7.29.7)': + '@babel/preset-env@7.29.7(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1)': dependencies: '@babel/compat-data': 7.29.7 - '@babel/core': 7.29.7 + '@babel/core': 7.29.7(supports-color@8.1.1) '@babel/helper-compilation-targets': 7.29.7 '@babel/helper-plugin-utils': 7.29.7 '@babel/helper-validator-option': 7.29.7 - '@babel/plugin-bugfix-firefox-class-in-computed-class-key': 7.29.7(@babel/core@7.29.7) - '@babel/plugin-bugfix-safari-class-field-initializer-scope': 7.29.7(@babel/core@7.29.7) - '@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression': 7.29.7(@babel/core@7.29.7) - '@babel/plugin-bugfix-safari-rest-destructuring-rhs-array': 7.29.7(@babel/core@7.29.7) - '@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining': 7.29.7(@babel/core@7.29.7) - '@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly': 7.29.7(@babel/core@7.29.7) - '@babel/plugin-proposal-private-property-in-object': 7.21.0-placeholder-for-preset-env.2(@babel/core@7.29.7) - '@babel/plugin-syntax-import-assertions': 7.29.7(@babel/core@7.29.7) - '@babel/plugin-syntax-import-attributes': 7.29.7(@babel/core@7.29.7) - '@babel/plugin-syntax-unicode-sets-regex': 7.18.6(@babel/core@7.29.7) - '@babel/plugin-transform-arrow-functions': 7.29.7(@babel/core@7.29.7) - '@babel/plugin-transform-async-generator-functions': 7.29.7(@babel/core@7.29.7) - '@babel/plugin-transform-async-to-generator': 7.29.7(@babel/core@7.29.7) - '@babel/plugin-transform-block-scoped-functions': 7.29.7(@babel/core@7.29.7) - '@babel/plugin-transform-block-scoping': 7.29.7(@babel/core@7.29.7) - '@babel/plugin-transform-class-properties': 7.29.7(@babel/core@7.29.7) - '@babel/plugin-transform-class-static-block': 7.29.7(@babel/core@7.29.7) - '@babel/plugin-transform-classes': 7.29.7(@babel/core@7.29.7) - '@babel/plugin-transform-computed-properties': 7.29.7(@babel/core@7.29.7) - '@babel/plugin-transform-destructuring': 7.29.7(@babel/core@7.29.7) - '@babel/plugin-transform-dotall-regex': 7.29.7(@babel/core@7.29.7) - '@babel/plugin-transform-duplicate-keys': 7.29.7(@babel/core@7.29.7) - '@babel/plugin-transform-duplicate-named-capturing-groups-regex': 7.29.7(@babel/core@7.29.7) - '@babel/plugin-transform-dynamic-import': 7.29.7(@babel/core@7.29.7) - '@babel/plugin-transform-explicit-resource-management': 7.29.7(@babel/core@7.29.7) - '@babel/plugin-transform-exponentiation-operator': 7.29.7(@babel/core@7.29.7) - '@babel/plugin-transform-export-namespace-from': 7.29.7(@babel/core@7.29.7) - '@babel/plugin-transform-for-of': 7.29.7(@babel/core@7.29.7) - '@babel/plugin-transform-function-name': 7.29.7(@babel/core@7.29.7) - '@babel/plugin-transform-json-strings': 7.29.7(@babel/core@7.29.7) - '@babel/plugin-transform-literals': 7.29.7(@babel/core@7.29.7) - '@babel/plugin-transform-logical-assignment-operators': 7.29.7(@babel/core@7.29.7) - '@babel/plugin-transform-member-expression-literals': 7.29.7(@babel/core@7.29.7) - '@babel/plugin-transform-modules-amd': 7.29.7(@babel/core@7.29.7) - '@babel/plugin-transform-modules-commonjs': 7.29.7(@babel/core@7.29.7) - '@babel/plugin-transform-modules-systemjs': 7.29.7(@babel/core@7.29.7) - '@babel/plugin-transform-modules-umd': 7.29.7(@babel/core@7.29.7) - '@babel/plugin-transform-named-capturing-groups-regex': 7.29.7(@babel/core@7.29.7) - '@babel/plugin-transform-new-target': 7.29.7(@babel/core@7.29.7) - '@babel/plugin-transform-nullish-coalescing-operator': 7.29.7(@babel/core@7.29.7) - '@babel/plugin-transform-numeric-separator': 7.29.7(@babel/core@7.29.7) - '@babel/plugin-transform-object-rest-spread': 7.29.7(@babel/core@7.29.7) - '@babel/plugin-transform-object-super': 7.29.7(@babel/core@7.29.7) - '@babel/plugin-transform-optional-catch-binding': 7.29.7(@babel/core@7.29.7) - '@babel/plugin-transform-optional-chaining': 7.29.7(@babel/core@7.29.7) - '@babel/plugin-transform-parameters': 7.29.7(@babel/core@7.29.7) - '@babel/plugin-transform-private-methods': 7.29.7(@babel/core@7.29.7) - '@babel/plugin-transform-private-property-in-object': 7.29.7(@babel/core@7.29.7) - '@babel/plugin-transform-property-literals': 7.29.7(@babel/core@7.29.7) - '@babel/plugin-transform-regenerator': 7.29.7(@babel/core@7.29.7) - '@babel/plugin-transform-regexp-modifiers': 7.29.7(@babel/core@7.29.7) - '@babel/plugin-transform-reserved-words': 7.29.7(@babel/core@7.29.7) - '@babel/plugin-transform-shorthand-properties': 7.29.7(@babel/core@7.29.7) - '@babel/plugin-transform-spread': 7.29.7(@babel/core@7.29.7) - '@babel/plugin-transform-sticky-regex': 7.29.7(@babel/core@7.29.7) - '@babel/plugin-transform-template-literals': 7.29.7(@babel/core@7.29.7) - '@babel/plugin-transform-typeof-symbol': 7.29.7(@babel/core@7.29.7) - '@babel/plugin-transform-unicode-escapes': 7.29.7(@babel/core@7.29.7) - '@babel/plugin-transform-unicode-property-regex': 7.29.7(@babel/core@7.29.7) - '@babel/plugin-transform-unicode-regex': 7.29.7(@babel/core@7.29.7) - '@babel/plugin-transform-unicode-sets-regex': 7.29.7(@babel/core@7.29.7) - '@babel/preset-modules': 0.1.6-no-external-plugins(@babel/core@7.29.7) - babel-plugin-polyfill-corejs2: 0.4.17(@babel/core@7.29.7) - babel-plugin-polyfill-corejs3: 0.14.2(@babel/core@7.29.7) - babel-plugin-polyfill-regenerator: 0.6.8(@babel/core@7.29.7) + '@babel/plugin-bugfix-firefox-class-in-computed-class-key': 7.29.7(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1) + '@babel/plugin-bugfix-safari-class-field-initializer-scope': 7.29.7(@babel/core@7.29.7(supports-color@8.1.1)) + '@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression': 7.29.7(@babel/core@7.29.7(supports-color@8.1.1)) + '@babel/plugin-bugfix-safari-rest-destructuring-rhs-array': 7.29.7(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1) + '@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining': 7.29.7(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1) + '@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly': 7.29.7(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1) + '@babel/plugin-proposal-private-property-in-object': 7.21.0-placeholder-for-preset-env.2(@babel/core@7.29.7(supports-color@8.1.1)) + '@babel/plugin-syntax-import-assertions': 7.29.7(@babel/core@7.29.7(supports-color@8.1.1)) + '@babel/plugin-syntax-import-attributes': 7.29.7(@babel/core@7.29.7(supports-color@8.1.1)) + '@babel/plugin-syntax-unicode-sets-regex': 7.18.6(@babel/core@7.29.7(supports-color@8.1.1)) + '@babel/plugin-transform-arrow-functions': 7.29.7(@babel/core@7.29.7(supports-color@8.1.1)) + '@babel/plugin-transform-async-generator-functions': 7.29.7(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1) + '@babel/plugin-transform-async-to-generator': 7.29.7(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1) + '@babel/plugin-transform-block-scoped-functions': 7.29.7(@babel/core@7.29.7(supports-color@8.1.1)) + '@babel/plugin-transform-block-scoping': 7.29.7(@babel/core@7.29.7(supports-color@8.1.1)) + '@babel/plugin-transform-class-properties': 7.29.7(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1) + '@babel/plugin-transform-class-static-block': 7.29.7(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1) + '@babel/plugin-transform-classes': 7.29.7(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1) + '@babel/plugin-transform-computed-properties': 7.29.7(@babel/core@7.29.7(supports-color@8.1.1)) + '@babel/plugin-transform-destructuring': 7.29.7(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1) + '@babel/plugin-transform-dotall-regex': 7.29.7(@babel/core@7.29.7(supports-color@8.1.1)) + '@babel/plugin-transform-duplicate-keys': 7.29.7(@babel/core@7.29.7(supports-color@8.1.1)) + '@babel/plugin-transform-duplicate-named-capturing-groups-regex': 7.29.7(@babel/core@7.29.7(supports-color@8.1.1)) + '@babel/plugin-transform-dynamic-import': 7.29.7(@babel/core@7.29.7(supports-color@8.1.1)) + '@babel/plugin-transform-explicit-resource-management': 7.29.7(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1) + '@babel/plugin-transform-exponentiation-operator': 7.29.7(@babel/core@7.29.7(supports-color@8.1.1)) + '@babel/plugin-transform-export-namespace-from': 7.29.7(@babel/core@7.29.7(supports-color@8.1.1)) + '@babel/plugin-transform-for-of': 7.29.7(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1) + '@babel/plugin-transform-function-name': 7.29.7(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1) + '@babel/plugin-transform-json-strings': 7.29.7(@babel/core@7.29.7(supports-color@8.1.1)) + '@babel/plugin-transform-literals': 7.29.7(@babel/core@7.29.7(supports-color@8.1.1)) + '@babel/plugin-transform-logical-assignment-operators': 7.29.7(@babel/core@7.29.7(supports-color@8.1.1)) + '@babel/plugin-transform-member-expression-literals': 7.29.7(@babel/core@7.29.7(supports-color@8.1.1)) + '@babel/plugin-transform-modules-amd': 7.29.7(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1) + '@babel/plugin-transform-modules-commonjs': 7.29.7(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1) + '@babel/plugin-transform-modules-systemjs': 7.29.7(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1) + '@babel/plugin-transform-modules-umd': 7.29.7(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1) + '@babel/plugin-transform-named-capturing-groups-regex': 7.29.7(@babel/core@7.29.7(supports-color@8.1.1)) + '@babel/plugin-transform-new-target': 7.29.7(@babel/core@7.29.7(supports-color@8.1.1)) + '@babel/plugin-transform-nullish-coalescing-operator': 7.29.7(@babel/core@7.29.7(supports-color@8.1.1)) + '@babel/plugin-transform-numeric-separator': 7.29.7(@babel/core@7.29.7(supports-color@8.1.1)) + '@babel/plugin-transform-object-rest-spread': 7.29.7(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1) + '@babel/plugin-transform-object-super': 7.29.7(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1) + '@babel/plugin-transform-optional-catch-binding': 7.29.7(@babel/core@7.29.7(supports-color@8.1.1)) + '@babel/plugin-transform-optional-chaining': 7.29.7(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1) + '@babel/plugin-transform-parameters': 7.29.7(@babel/core@7.29.7(supports-color@8.1.1)) + '@babel/plugin-transform-private-methods': 7.29.7(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1) + '@babel/plugin-transform-private-property-in-object': 7.29.7(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1) + '@babel/plugin-transform-property-literals': 7.29.7(@babel/core@7.29.7(supports-color@8.1.1)) + '@babel/plugin-transform-regenerator': 7.29.7(@babel/core@7.29.7(supports-color@8.1.1)) + '@babel/plugin-transform-regexp-modifiers': 7.29.7(@babel/core@7.29.7(supports-color@8.1.1)) + '@babel/plugin-transform-reserved-words': 7.29.7(@babel/core@7.29.7(supports-color@8.1.1)) + '@babel/plugin-transform-shorthand-properties': 7.29.7(@babel/core@7.29.7(supports-color@8.1.1)) + '@babel/plugin-transform-spread': 7.29.7(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1) + '@babel/plugin-transform-sticky-regex': 7.29.7(@babel/core@7.29.7(supports-color@8.1.1)) + '@babel/plugin-transform-template-literals': 7.29.7(@babel/core@7.29.7(supports-color@8.1.1)) + '@babel/plugin-transform-typeof-symbol': 7.29.7(@babel/core@7.29.7(supports-color@8.1.1)) + '@babel/plugin-transform-unicode-escapes': 7.29.7(@babel/core@7.29.7(supports-color@8.1.1)) + '@babel/plugin-transform-unicode-property-regex': 7.29.7(@babel/core@7.29.7(supports-color@8.1.1)) + '@babel/plugin-transform-unicode-regex': 7.29.7(@babel/core@7.29.7(supports-color@8.1.1)) + '@babel/plugin-transform-unicode-sets-regex': 7.29.7(@babel/core@7.29.7(supports-color@8.1.1)) + '@babel/preset-modules': 0.1.6-no-external-plugins(@babel/core@7.29.7(supports-color@8.1.1)) + babel-plugin-polyfill-corejs2: 0.4.17(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1) + babel-plugin-polyfill-corejs3: 0.14.2(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1) + babel-plugin-polyfill-regenerator: 0.6.8(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1) core-js-compat: 3.49.0 semver: 6.3.1 transitivePeerDependencies: - supports-color - '@babel/preset-modules@0.1.6-no-external-plugins(@babel/core@7.29.7)': + '@babel/preset-modules@0.1.6-no-external-plugins(@babel/core@7.29.7(supports-color@8.1.1))': dependencies: - '@babel/core': 7.29.7 + '@babel/core': 7.29.7(supports-color@8.1.1) '@babel/helper-plugin-utils': 7.29.7 '@babel/types': 7.29.7 esutils: 2.0.3 - '@babel/preset-react@7.29.7(@babel/core@7.29.7)': + '@babel/preset-react@7.29.7(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1)': dependencies: - '@babel/core': 7.29.7 + '@babel/core': 7.29.7(supports-color@8.1.1) '@babel/helper-plugin-utils': 7.29.7 '@babel/helper-validator-option': 7.29.7 - '@babel/plugin-transform-react-display-name': 7.29.7(@babel/core@7.29.7) - '@babel/plugin-transform-react-jsx': 7.29.7(@babel/core@7.29.7) - '@babel/plugin-transform-react-jsx-development': 7.29.7(@babel/core@7.29.7) - '@babel/plugin-transform-react-pure-annotations': 7.29.7(@babel/core@7.29.7) + '@babel/plugin-transform-react-display-name': 7.29.7(@babel/core@7.29.7(supports-color@8.1.1)) + '@babel/plugin-transform-react-jsx': 7.29.7(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1) + '@babel/plugin-transform-react-jsx-development': 7.29.7(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1) + '@babel/plugin-transform-react-pure-annotations': 7.29.7(@babel/core@7.29.7(supports-color@8.1.1)) transitivePeerDependencies: - supports-color - '@babel/preset-typescript@7.29.7(@babel/core@7.29.7)': + '@babel/preset-typescript@7.29.7(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1)': dependencies: - '@babel/core': 7.29.7 + '@babel/core': 7.29.7(supports-color@8.1.1) '@babel/helper-plugin-utils': 7.29.7 '@babel/helper-validator-option': 7.29.7 - '@babel/plugin-syntax-jsx': 7.29.7(@babel/core@7.29.7) - '@babel/plugin-transform-modules-commonjs': 7.29.7(@babel/core@7.29.7) - '@babel/plugin-transform-typescript': 7.29.7(@babel/core@7.29.7) + '@babel/plugin-syntax-jsx': 7.29.7(@babel/core@7.29.7(supports-color@8.1.1)) + '@babel/plugin-transform-modules-commonjs': 7.29.7(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1) + '@babel/plugin-transform-typescript': 7.29.7(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1) transitivePeerDependencies: - supports-color @@ -13908,19 +14001,19 @@ snapshots: '@babel/parser': 7.29.7 '@babel/types': 7.29.7 - '@babel/traverse@7.27.0': + '@babel/traverse@7.27.0(supports-color@8.1.1)': dependencies: '@babel/code-frame': 7.29.7 '@babel/generator': 7.29.7 '@babel/parser': 7.29.7 '@babel/template': 7.29.7 '@babel/types': 7.29.7 - debug: 4.4.3 + debug: 4.4.3(supports-color@8.1.1) globals: 11.12.0 transitivePeerDependencies: - supports-color - '@babel/traverse@7.29.7': + '@babel/traverse@7.29.7(supports-color@8.1.1)': dependencies: '@babel/code-frame': 7.29.7 '@babel/generator': 7.29.7 @@ -13928,7 +14021,7 @@ snapshots: '@babel/parser': 7.29.7 '@babel/template': 7.29.7 '@babel/types': 7.29.7 - debug: 4.4.3 + debug: 4.4.3(supports-color@8.1.1) transitivePeerDependencies: - supports-color @@ -13949,27 +14042,27 @@ snapshots: '@codemirror/autocomplete@6.20.3': dependencies: - '@codemirror/language': 6.12.3 - '@codemirror/state': 6.6.0 - '@codemirror/view': 6.43.1 + '@codemirror/language': 6.12.4 + '@codemirror/state': 6.7.1 + '@codemirror/view': 6.43.7 '@lezer/common': 1.5.2 - '@codemirror/commands@6.10.3': + '@codemirror/commands@6.10.4': dependencies: - '@codemirror/language': 6.12.3 - '@codemirror/state': 6.6.0 - '@codemirror/view': 6.43.1 + '@codemirror/language': 6.12.4 + '@codemirror/state': 6.7.1 + '@codemirror/view': 6.43.7 '@lezer/common': 1.5.2 '@codemirror/lang-json@6.0.2': dependencies: - '@codemirror/language': 6.12.3 + '@codemirror/language': 6.12.4 '@lezer/json': 1.0.3 - '@codemirror/language@6.12.3': + '@codemirror/language@6.12.4': dependencies: - '@codemirror/state': 6.6.0 - '@codemirror/view': 6.43.1 + '@codemirror/state': 6.7.1 + '@codemirror/view': 6.43.7 '@lezer/common': 1.5.2 '@lezer/highlight': 1.2.3 '@lezer/lr': 1.4.10 @@ -13977,24 +14070,24 @@ snapshots: '@codemirror/lint@6.9.7': dependencies: - '@codemirror/state': 6.6.0 - '@codemirror/view': 6.43.1 - crelt: 1.0.6 + '@codemirror/state': 6.7.1 + '@codemirror/view': 6.43.7 + crelt: 1.0.7 - '@codemirror/search@6.7.0': + '@codemirror/search@6.7.1': dependencies: - '@codemirror/state': 6.6.0 - '@codemirror/view': 6.43.1 - crelt: 1.0.6 + '@codemirror/state': 6.7.1 + '@codemirror/view': 6.43.7 + crelt: 1.0.7 - '@codemirror/state@6.6.0': + '@codemirror/state@6.7.1': dependencies: - '@marijn/find-cluster-break': 1.0.2 + '@marijn/find-cluster-break': 1.0.3 - '@codemirror/view@6.43.1': + '@codemirror/view@6.43.7': dependencies: - '@codemirror/state': 6.6.0 - crelt: 1.0.6 + '@codemirror/state': 6.7.1 + crelt: 1.0.7 style-mod: 4.1.3 w3c-keyname: 2.2.8 @@ -14031,272 +14124,272 @@ snapshots: '@csstools/css-parser-algorithms': 3.0.5(@csstools/css-tokenizer@3.0.4) '@csstools/css-tokenizer': 3.0.4 - '@csstools/postcss-alpha-function@1.0.1(postcss@8.5.15)': + '@csstools/postcss-alpha-function@1.0.1(postcss@8.5.26)': dependencies: '@csstools/css-color-parser': 3.1.0(@csstools/css-parser-algorithms@3.0.5(@csstools/css-tokenizer@3.0.4))(@csstools/css-tokenizer@3.0.4) '@csstools/css-parser-algorithms': 3.0.5(@csstools/css-tokenizer@3.0.4) '@csstools/css-tokenizer': 3.0.4 - '@csstools/postcss-progressive-custom-properties': 4.2.1(postcss@8.5.15) - '@csstools/utilities': 2.0.0(postcss@8.5.15) - postcss: 8.5.15 + '@csstools/postcss-progressive-custom-properties': 4.2.1(postcss@8.5.26) + '@csstools/utilities': 2.0.0(postcss@8.5.26) + postcss: 8.5.26 - '@csstools/postcss-cascade-layers@5.0.2(postcss@8.5.15)': + '@csstools/postcss-cascade-layers@5.0.2(postcss@8.5.26)': dependencies: '@csstools/selector-specificity': 5.0.0(postcss-selector-parser@7.1.4) - postcss: 8.5.15 + postcss: 8.5.26 postcss-selector-parser: 7.1.4 - '@csstools/postcss-color-function-display-p3-linear@1.0.1(postcss@8.5.15)': + '@csstools/postcss-color-function-display-p3-linear@1.0.1(postcss@8.5.26)': dependencies: '@csstools/css-color-parser': 3.1.0(@csstools/css-parser-algorithms@3.0.5(@csstools/css-tokenizer@3.0.4))(@csstools/css-tokenizer@3.0.4) '@csstools/css-parser-algorithms': 3.0.5(@csstools/css-tokenizer@3.0.4) '@csstools/css-tokenizer': 3.0.4 - '@csstools/postcss-progressive-custom-properties': 4.2.1(postcss@8.5.15) - '@csstools/utilities': 2.0.0(postcss@8.5.15) - postcss: 8.5.15 + '@csstools/postcss-progressive-custom-properties': 4.2.1(postcss@8.5.26) + '@csstools/utilities': 2.0.0(postcss@8.5.26) + postcss: 8.5.26 - '@csstools/postcss-color-function@4.0.12(postcss@8.5.15)': + '@csstools/postcss-color-function@4.0.12(postcss@8.5.26)': dependencies: '@csstools/css-color-parser': 3.1.0(@csstools/css-parser-algorithms@3.0.5(@csstools/css-tokenizer@3.0.4))(@csstools/css-tokenizer@3.0.4) '@csstools/css-parser-algorithms': 3.0.5(@csstools/css-tokenizer@3.0.4) '@csstools/css-tokenizer': 3.0.4 - '@csstools/postcss-progressive-custom-properties': 4.2.1(postcss@8.5.15) - '@csstools/utilities': 2.0.0(postcss@8.5.15) - postcss: 8.5.15 + '@csstools/postcss-progressive-custom-properties': 4.2.1(postcss@8.5.26) + '@csstools/utilities': 2.0.0(postcss@8.5.26) + postcss: 8.5.26 - '@csstools/postcss-color-mix-function@3.0.12(postcss@8.5.15)': + '@csstools/postcss-color-mix-function@3.0.12(postcss@8.5.26)': dependencies: '@csstools/css-color-parser': 3.1.0(@csstools/css-parser-algorithms@3.0.5(@csstools/css-tokenizer@3.0.4))(@csstools/css-tokenizer@3.0.4) '@csstools/css-parser-algorithms': 3.0.5(@csstools/css-tokenizer@3.0.4) '@csstools/css-tokenizer': 3.0.4 - '@csstools/postcss-progressive-custom-properties': 4.2.1(postcss@8.5.15) - '@csstools/utilities': 2.0.0(postcss@8.5.15) - postcss: 8.5.15 + '@csstools/postcss-progressive-custom-properties': 4.2.1(postcss@8.5.26) + '@csstools/utilities': 2.0.0(postcss@8.5.26) + postcss: 8.5.26 - '@csstools/postcss-color-mix-variadic-function-arguments@1.0.2(postcss@8.5.15)': + '@csstools/postcss-color-mix-variadic-function-arguments@1.0.2(postcss@8.5.26)': dependencies: '@csstools/css-color-parser': 3.1.0(@csstools/css-parser-algorithms@3.0.5(@csstools/css-tokenizer@3.0.4))(@csstools/css-tokenizer@3.0.4) '@csstools/css-parser-algorithms': 3.0.5(@csstools/css-tokenizer@3.0.4) '@csstools/css-tokenizer': 3.0.4 - '@csstools/postcss-progressive-custom-properties': 4.2.1(postcss@8.5.15) - '@csstools/utilities': 2.0.0(postcss@8.5.15) - postcss: 8.5.15 + '@csstools/postcss-progressive-custom-properties': 4.2.1(postcss@8.5.26) + '@csstools/utilities': 2.0.0(postcss@8.5.26) + postcss: 8.5.26 - '@csstools/postcss-content-alt-text@2.0.8(postcss@8.5.15)': + '@csstools/postcss-content-alt-text@2.0.8(postcss@8.5.26)': dependencies: '@csstools/css-parser-algorithms': 3.0.5(@csstools/css-tokenizer@3.0.4) '@csstools/css-tokenizer': 3.0.4 - '@csstools/postcss-progressive-custom-properties': 4.2.1(postcss@8.5.15) - '@csstools/utilities': 2.0.0(postcss@8.5.15) - postcss: 8.5.15 + '@csstools/postcss-progressive-custom-properties': 4.2.1(postcss@8.5.26) + '@csstools/utilities': 2.0.0(postcss@8.5.26) + postcss: 8.5.26 - '@csstools/postcss-contrast-color-function@2.0.12(postcss@8.5.15)': + '@csstools/postcss-contrast-color-function@2.0.12(postcss@8.5.26)': dependencies: '@csstools/css-color-parser': 3.1.0(@csstools/css-parser-algorithms@3.0.5(@csstools/css-tokenizer@3.0.4))(@csstools/css-tokenizer@3.0.4) '@csstools/css-parser-algorithms': 3.0.5(@csstools/css-tokenizer@3.0.4) '@csstools/css-tokenizer': 3.0.4 - '@csstools/postcss-progressive-custom-properties': 4.2.1(postcss@8.5.15) - '@csstools/utilities': 2.0.0(postcss@8.5.15) - postcss: 8.5.15 + '@csstools/postcss-progressive-custom-properties': 4.2.1(postcss@8.5.26) + '@csstools/utilities': 2.0.0(postcss@8.5.26) + postcss: 8.5.26 - '@csstools/postcss-exponential-functions@2.0.9(postcss@8.5.15)': + '@csstools/postcss-exponential-functions@2.0.9(postcss@8.5.26)': dependencies: '@csstools/css-calc': 2.1.4(@csstools/css-parser-algorithms@3.0.5(@csstools/css-tokenizer@3.0.4))(@csstools/css-tokenizer@3.0.4) '@csstools/css-parser-algorithms': 3.0.5(@csstools/css-tokenizer@3.0.4) '@csstools/css-tokenizer': 3.0.4 - postcss: 8.5.15 + postcss: 8.5.26 - '@csstools/postcss-font-format-keywords@4.0.0(postcss@8.5.15)': + '@csstools/postcss-font-format-keywords@4.0.0(postcss@8.5.26)': dependencies: - '@csstools/utilities': 2.0.0(postcss@8.5.15) - postcss: 8.5.15 + '@csstools/utilities': 2.0.0(postcss@8.5.26) + postcss: 8.5.26 postcss-value-parser: 4.2.0 - '@csstools/postcss-gamut-mapping@2.0.11(postcss@8.5.15)': + '@csstools/postcss-gamut-mapping@2.0.11(postcss@8.5.26)': dependencies: '@csstools/css-color-parser': 3.1.0(@csstools/css-parser-algorithms@3.0.5(@csstools/css-tokenizer@3.0.4))(@csstools/css-tokenizer@3.0.4) '@csstools/css-parser-algorithms': 3.0.5(@csstools/css-tokenizer@3.0.4) '@csstools/css-tokenizer': 3.0.4 - postcss: 8.5.15 + postcss: 8.5.26 - '@csstools/postcss-gradients-interpolation-method@5.0.12(postcss@8.5.15)': + '@csstools/postcss-gradients-interpolation-method@5.0.12(postcss@8.5.26)': dependencies: '@csstools/css-color-parser': 3.1.0(@csstools/css-parser-algorithms@3.0.5(@csstools/css-tokenizer@3.0.4))(@csstools/css-tokenizer@3.0.4) '@csstools/css-parser-algorithms': 3.0.5(@csstools/css-tokenizer@3.0.4) '@csstools/css-tokenizer': 3.0.4 - '@csstools/postcss-progressive-custom-properties': 4.2.1(postcss@8.5.15) - '@csstools/utilities': 2.0.0(postcss@8.5.15) - postcss: 8.5.15 + '@csstools/postcss-progressive-custom-properties': 4.2.1(postcss@8.5.26) + '@csstools/utilities': 2.0.0(postcss@8.5.26) + postcss: 8.5.26 - '@csstools/postcss-hwb-function@4.0.12(postcss@8.5.15)': + '@csstools/postcss-hwb-function@4.0.12(postcss@8.5.26)': dependencies: '@csstools/css-color-parser': 3.1.0(@csstools/css-parser-algorithms@3.0.5(@csstools/css-tokenizer@3.0.4))(@csstools/css-tokenizer@3.0.4) '@csstools/css-parser-algorithms': 3.0.5(@csstools/css-tokenizer@3.0.4) '@csstools/css-tokenizer': 3.0.4 - '@csstools/postcss-progressive-custom-properties': 4.2.1(postcss@8.5.15) - '@csstools/utilities': 2.0.0(postcss@8.5.15) - postcss: 8.5.15 + '@csstools/postcss-progressive-custom-properties': 4.2.1(postcss@8.5.26) + '@csstools/utilities': 2.0.0(postcss@8.5.26) + postcss: 8.5.26 - '@csstools/postcss-ic-unit@4.0.4(postcss@8.5.15)': + '@csstools/postcss-ic-unit@4.0.4(postcss@8.5.26)': dependencies: - '@csstools/postcss-progressive-custom-properties': 4.2.1(postcss@8.5.15) - '@csstools/utilities': 2.0.0(postcss@8.5.15) - postcss: 8.5.15 + '@csstools/postcss-progressive-custom-properties': 4.2.1(postcss@8.5.26) + '@csstools/utilities': 2.0.0(postcss@8.5.26) + postcss: 8.5.26 postcss-value-parser: 4.2.0 - '@csstools/postcss-initial@2.0.1(postcss@8.5.15)': + '@csstools/postcss-initial@2.0.1(postcss@8.5.26)': dependencies: - postcss: 8.5.15 + postcss: 8.5.26 - '@csstools/postcss-is-pseudo-class@5.0.3(postcss@8.5.15)': + '@csstools/postcss-is-pseudo-class@5.0.3(postcss@8.5.26)': dependencies: '@csstools/selector-specificity': 5.0.0(postcss-selector-parser@7.1.4) - postcss: 8.5.15 + postcss: 8.5.26 postcss-selector-parser: 7.1.4 - '@csstools/postcss-light-dark-function@2.0.11(postcss@8.5.15)': + '@csstools/postcss-light-dark-function@2.0.11(postcss@8.5.26)': dependencies: '@csstools/css-parser-algorithms': 3.0.5(@csstools/css-tokenizer@3.0.4) '@csstools/css-tokenizer': 3.0.4 - '@csstools/postcss-progressive-custom-properties': 4.2.1(postcss@8.5.15) - '@csstools/utilities': 2.0.0(postcss@8.5.15) - postcss: 8.5.15 + '@csstools/postcss-progressive-custom-properties': 4.2.1(postcss@8.5.26) + '@csstools/utilities': 2.0.0(postcss@8.5.26) + postcss: 8.5.26 - '@csstools/postcss-logical-float-and-clear@3.0.0(postcss@8.5.15)': + '@csstools/postcss-logical-float-and-clear@3.0.0(postcss@8.5.26)': dependencies: - postcss: 8.5.15 + postcss: 8.5.26 - '@csstools/postcss-logical-overflow@2.0.0(postcss@8.5.15)': + '@csstools/postcss-logical-overflow@2.0.0(postcss@8.5.26)': dependencies: - postcss: 8.5.15 + postcss: 8.5.26 - '@csstools/postcss-logical-overscroll-behavior@2.0.0(postcss@8.5.15)': + '@csstools/postcss-logical-overscroll-behavior@2.0.0(postcss@8.5.26)': dependencies: - postcss: 8.5.15 + postcss: 8.5.26 - '@csstools/postcss-logical-resize@3.0.0(postcss@8.5.15)': + '@csstools/postcss-logical-resize@3.0.0(postcss@8.5.26)': dependencies: - postcss: 8.5.15 + postcss: 8.5.26 postcss-value-parser: 4.2.0 - '@csstools/postcss-logical-viewport-units@3.0.4(postcss@8.5.15)': + '@csstools/postcss-logical-viewport-units@3.0.4(postcss@8.5.26)': dependencies: '@csstools/css-tokenizer': 3.0.4 - '@csstools/utilities': 2.0.0(postcss@8.5.15) - postcss: 8.5.15 + '@csstools/utilities': 2.0.0(postcss@8.5.26) + postcss: 8.5.26 - '@csstools/postcss-media-minmax@2.0.9(postcss@8.5.15)': + '@csstools/postcss-media-minmax@2.0.9(postcss@8.5.26)': dependencies: '@csstools/css-calc': 2.1.4(@csstools/css-parser-algorithms@3.0.5(@csstools/css-tokenizer@3.0.4))(@csstools/css-tokenizer@3.0.4) '@csstools/css-parser-algorithms': 3.0.5(@csstools/css-tokenizer@3.0.4) '@csstools/css-tokenizer': 3.0.4 '@csstools/media-query-list-parser': 4.0.3(@csstools/css-parser-algorithms@3.0.5(@csstools/css-tokenizer@3.0.4))(@csstools/css-tokenizer@3.0.4) - postcss: 8.5.15 + postcss: 8.5.26 - '@csstools/postcss-media-queries-aspect-ratio-number-values@3.0.5(postcss@8.5.15)': + '@csstools/postcss-media-queries-aspect-ratio-number-values@3.0.5(postcss@8.5.26)': dependencies: '@csstools/css-parser-algorithms': 3.0.5(@csstools/css-tokenizer@3.0.4) '@csstools/css-tokenizer': 3.0.4 '@csstools/media-query-list-parser': 4.0.3(@csstools/css-parser-algorithms@3.0.5(@csstools/css-tokenizer@3.0.4))(@csstools/css-tokenizer@3.0.4) - postcss: 8.5.15 + postcss: 8.5.26 - '@csstools/postcss-nested-calc@4.0.0(postcss@8.5.15)': + '@csstools/postcss-nested-calc@4.0.0(postcss@8.5.26)': dependencies: - '@csstools/utilities': 2.0.0(postcss@8.5.15) - postcss: 8.5.15 + '@csstools/utilities': 2.0.0(postcss@8.5.26) + postcss: 8.5.26 postcss-value-parser: 4.2.0 - '@csstools/postcss-normalize-display-values@4.0.1(postcss@8.5.15)': + '@csstools/postcss-normalize-display-values@4.0.1(postcss@8.5.26)': dependencies: - postcss: 8.5.15 + postcss: 8.5.26 postcss-value-parser: 4.2.0 - '@csstools/postcss-oklab-function@4.0.12(postcss@8.5.15)': + '@csstools/postcss-oklab-function@4.0.12(postcss@8.5.26)': dependencies: '@csstools/css-color-parser': 3.1.0(@csstools/css-parser-algorithms@3.0.5(@csstools/css-tokenizer@3.0.4))(@csstools/css-tokenizer@3.0.4) '@csstools/css-parser-algorithms': 3.0.5(@csstools/css-tokenizer@3.0.4) '@csstools/css-tokenizer': 3.0.4 - '@csstools/postcss-progressive-custom-properties': 4.2.1(postcss@8.5.15) - '@csstools/utilities': 2.0.0(postcss@8.5.15) - postcss: 8.5.15 + '@csstools/postcss-progressive-custom-properties': 4.2.1(postcss@8.5.26) + '@csstools/utilities': 2.0.0(postcss@8.5.26) + postcss: 8.5.26 - '@csstools/postcss-position-area-property@1.0.0(postcss@8.5.15)': + '@csstools/postcss-position-area-property@1.0.0(postcss@8.5.26)': dependencies: - postcss: 8.5.15 + postcss: 8.5.26 - '@csstools/postcss-progressive-custom-properties@4.2.1(postcss@8.5.15)': + '@csstools/postcss-progressive-custom-properties@4.2.1(postcss@8.5.26)': dependencies: - postcss: 8.5.15 + postcss: 8.5.26 postcss-value-parser: 4.2.0 - '@csstools/postcss-property-rule-prelude-list@1.0.0(postcss@8.5.15)': + '@csstools/postcss-property-rule-prelude-list@1.0.0(postcss@8.5.26)': dependencies: '@csstools/css-parser-algorithms': 3.0.5(@csstools/css-tokenizer@3.0.4) '@csstools/css-tokenizer': 3.0.4 - postcss: 8.5.15 + postcss: 8.5.26 - '@csstools/postcss-random-function@2.0.1(postcss@8.5.15)': + '@csstools/postcss-random-function@2.0.1(postcss@8.5.26)': dependencies: '@csstools/css-calc': 2.1.4(@csstools/css-parser-algorithms@3.0.5(@csstools/css-tokenizer@3.0.4))(@csstools/css-tokenizer@3.0.4) '@csstools/css-parser-algorithms': 3.0.5(@csstools/css-tokenizer@3.0.4) '@csstools/css-tokenizer': 3.0.4 - postcss: 8.5.15 + postcss: 8.5.26 - '@csstools/postcss-relative-color-syntax@3.0.12(postcss@8.5.15)': + '@csstools/postcss-relative-color-syntax@3.0.12(postcss@8.5.26)': dependencies: '@csstools/css-color-parser': 3.1.0(@csstools/css-parser-algorithms@3.0.5(@csstools/css-tokenizer@3.0.4))(@csstools/css-tokenizer@3.0.4) '@csstools/css-parser-algorithms': 3.0.5(@csstools/css-tokenizer@3.0.4) '@csstools/css-tokenizer': 3.0.4 - '@csstools/postcss-progressive-custom-properties': 4.2.1(postcss@8.5.15) - '@csstools/utilities': 2.0.0(postcss@8.5.15) - postcss: 8.5.15 + '@csstools/postcss-progressive-custom-properties': 4.2.1(postcss@8.5.26) + '@csstools/utilities': 2.0.0(postcss@8.5.26) + postcss: 8.5.26 - '@csstools/postcss-scope-pseudo-class@4.0.1(postcss@8.5.15)': + '@csstools/postcss-scope-pseudo-class@4.0.1(postcss@8.5.26)': dependencies: - postcss: 8.5.15 + postcss: 8.5.26 postcss-selector-parser: 7.1.4 - '@csstools/postcss-sign-functions@1.1.4(postcss@8.5.15)': + '@csstools/postcss-sign-functions@1.1.4(postcss@8.5.26)': dependencies: '@csstools/css-calc': 2.1.4(@csstools/css-parser-algorithms@3.0.5(@csstools/css-tokenizer@3.0.4))(@csstools/css-tokenizer@3.0.4) '@csstools/css-parser-algorithms': 3.0.5(@csstools/css-tokenizer@3.0.4) '@csstools/css-tokenizer': 3.0.4 - postcss: 8.5.15 + postcss: 8.5.26 - '@csstools/postcss-stepped-value-functions@4.0.9(postcss@8.5.15)': + '@csstools/postcss-stepped-value-functions@4.0.9(postcss@8.5.26)': dependencies: '@csstools/css-calc': 2.1.4(@csstools/css-parser-algorithms@3.0.5(@csstools/css-tokenizer@3.0.4))(@csstools/css-tokenizer@3.0.4) '@csstools/css-parser-algorithms': 3.0.5(@csstools/css-tokenizer@3.0.4) '@csstools/css-tokenizer': 3.0.4 - postcss: 8.5.15 + postcss: 8.5.26 - '@csstools/postcss-syntax-descriptor-syntax-production@1.0.1(postcss@8.5.15)': + '@csstools/postcss-syntax-descriptor-syntax-production@1.0.1(postcss@8.5.26)': dependencies: '@csstools/css-tokenizer': 3.0.4 - postcss: 8.5.15 + postcss: 8.5.26 - '@csstools/postcss-system-ui-font-family@1.0.0(postcss@8.5.15)': + '@csstools/postcss-system-ui-font-family@1.0.0(postcss@8.5.26)': dependencies: '@csstools/css-parser-algorithms': 3.0.5(@csstools/css-tokenizer@3.0.4) '@csstools/css-tokenizer': 3.0.4 - postcss: 8.5.15 + postcss: 8.5.26 - '@csstools/postcss-text-decoration-shorthand@4.0.3(postcss@8.5.15)': + '@csstools/postcss-text-decoration-shorthand@4.0.3(postcss@8.5.26)': dependencies: '@csstools/color-helpers': 5.1.0 - postcss: 8.5.15 + postcss: 8.5.26 postcss-value-parser: 4.2.0 - '@csstools/postcss-trigonometric-functions@4.0.9(postcss@8.5.15)': + '@csstools/postcss-trigonometric-functions@4.0.9(postcss@8.5.26)': dependencies: '@csstools/css-calc': 2.1.4(@csstools/css-parser-algorithms@3.0.5(@csstools/css-tokenizer@3.0.4))(@csstools/css-tokenizer@3.0.4) '@csstools/css-parser-algorithms': 3.0.5(@csstools/css-tokenizer@3.0.4) '@csstools/css-tokenizer': 3.0.4 - postcss: 8.5.15 + postcss: 8.5.26 - '@csstools/postcss-unset-value@4.0.0(postcss@8.5.15)': + '@csstools/postcss-unset-value@4.0.0(postcss@8.5.26)': dependencies: - postcss: 8.5.15 + postcss: 8.5.26 '@csstools/selector-resolve-nested@3.1.0(postcss-selector-parser@7.1.4)': dependencies: @@ -14306,49 +14399,49 @@ snapshots: dependencies: postcss-selector-parser: 7.1.4 - '@csstools/utilities@2.0.0(postcss@8.5.15)': + '@csstools/utilities@2.0.0(postcss@8.5.26)': dependencies: - postcss: 8.5.15 + postcss: 8.5.26 '@discoveryjs/json-ext@0.5.7': {} - '@docsearch/core@4.6.3(@types/react@19.2.17)(react-dom@19.2.7(react@19.2.7))(react@19.2.7)': + '@docsearch/core@4.6.3(@types/react@19.2.18)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)': optionalDependencies: - '@types/react': 19.2.17 - react: 19.2.7 - react-dom: 19.2.7(react@19.2.7) + '@types/react': 19.2.18 + react: 19.2.8 + react-dom: 19.2.8(react@19.2.8) '@docsearch/css@4.6.3': {} - '@docsearch/react@4.6.3(@algolia/client-search@5.54.0)(@types/react@19.2.17)(algoliasearch@5.54.0)(react-dom@19.2.7(react@19.2.7))(react@19.2.7)(search-insights@2.17.3)': + '@docsearch/react@4.6.3(@algolia/client-search@5.56.0)(@types/react@19.2.18)(algoliasearch@5.56.0)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(search-insights@2.17.3)': dependencies: - '@algolia/autocomplete-core': 1.19.2(@algolia/client-search@5.54.0)(algoliasearch@5.54.0)(search-insights@2.17.3) - '@docsearch/core': 4.6.3(@types/react@19.2.17)(react-dom@19.2.7(react@19.2.7))(react@19.2.7) + '@algolia/autocomplete-core': 1.19.2(@algolia/client-search@5.56.0)(algoliasearch@5.56.0)(search-insights@2.17.3) + '@docsearch/core': 4.6.3(@types/react@19.2.18)(react-dom@19.2.8(react@19.2.8))(react@19.2.8) '@docsearch/css': 4.6.3 optionalDependencies: - '@types/react': 19.2.17 - react: 19.2.7 - react-dom: 19.2.7(react@19.2.7) + '@types/react': 19.2.18 + react: 19.2.8 + react-dom: 19.2.8(react@19.2.8) search-insights: 2.17.3 transitivePeerDependencies: - '@algolia/client-search' - algoliasearch - '@docusaurus/babel@3.10.1(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.15))(html-minifier-terser@7.2.0)(postcss@8.5.15)(react-dom@19.2.7(react@19.2.7))(react@19.2.7)': + '@docusaurus/babel@3.10.2(@swc/core@1.15.47(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3)': dependencies: - '@babel/core': 7.29.7 + '@babel/core': 7.29.7(supports-color@8.1.1) '@babel/generator': 7.29.7 - '@babel/plugin-syntax-dynamic-import': 7.8.3(@babel/core@7.29.7) - '@babel/plugin-transform-runtime': 7.29.7(@babel/core@7.29.7) - '@babel/preset-env': 7.29.7(@babel/core@7.29.7) - '@babel/preset-react': 7.29.7(@babel/core@7.29.7) - '@babel/preset-typescript': 7.29.7(@babel/core@7.29.7) + '@babel/plugin-syntax-dynamic-import': 7.8.3(@babel/core@7.29.7(supports-color@8.1.1)) + '@babel/plugin-transform-runtime': 7.29.7(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1) + '@babel/preset-env': 7.29.7(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1) + '@babel/preset-react': 7.29.7(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1) + '@babel/preset-typescript': 7.29.7(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1) '@babel/runtime': 7.29.7 - '@babel/traverse': 7.29.7 - '@docusaurus/logger': 3.10.1 - '@docusaurus/utils': 3.10.1(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.15))(html-minifier-terser@7.2.0)(postcss@8.5.15)(react-dom@19.2.7(react@19.2.7))(react@19.2.7) + '@babel/traverse': 7.29.7(supports-color@8.1.1) + '@docusaurus/logger': 3.10.2 + '@docusaurus/utils': 3.10.2(@swc/core@1.15.47(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3) babel-plugin-dynamic-import-node: 2.3.3 - fs-extra: 11.3.5 + fs-extra: 11.3.6 tslib: 2.8.1 transitivePeerDependencies: - '@minify-html/node' @@ -14368,66 +14461,32 @@ snapshots: - uglify-js - webpack-cli - '@docusaurus/babel@3.10.1(postcss@8.5.15)(react-dom@19.2.7(react@19.2.7))(react@19.2.7)': + '@docusaurus/bundler@3.10.2(@swc/core@1.15.47(@swc/helpers@0.5.23))(@typescript/typescript6@6.0.2)(csso@5.0.5)(esbuild@0.28.2)(lightningcss@1.33.0)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3)': dependencies: - '@babel/core': 7.29.7 - '@babel/generator': 7.29.7 - '@babel/plugin-syntax-dynamic-import': 7.8.3(@babel/core@7.29.7) - '@babel/plugin-transform-runtime': 7.29.7(@babel/core@7.29.7) - '@babel/preset-env': 7.29.7(@babel/core@7.29.7) - '@babel/preset-react': 7.29.7(@babel/core@7.29.7) - '@babel/preset-typescript': 7.29.7(@babel/core@7.29.7) - '@babel/runtime': 7.29.7 - '@babel/traverse': 7.29.7 - '@docusaurus/logger': 3.10.1 - '@docusaurus/utils': 3.10.1(postcss@8.5.15)(react-dom@19.2.7(react@19.2.7))(react@19.2.7) - babel-plugin-dynamic-import-node: 2.3.3 - fs-extra: 11.3.5 - tslib: 2.8.1 - transitivePeerDependencies: - - '@minify-html/node' - - '@swc/core' - - '@swc/css' - - '@swc/html' - - clean-css - - cssnano - - csso - - esbuild - - html-minifier-terser - - lightningcss - - postcss - - react - - react-dom - - supports-color - - uglify-js - - webpack-cli - - '@docusaurus/bundler@3.10.1(esbuild@0.28.1)(react-dom@19.2.7(react@19.2.7))(react@19.2.7)(typescript@6.0.3)': - dependencies: - '@babel/core': 7.29.7 - '@docusaurus/babel': 3.10.1(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.15))(html-minifier-terser@7.2.0)(postcss@8.5.15)(react-dom@19.2.7(react@19.2.7))(react@19.2.7) - '@docusaurus/cssnano-preset': 3.10.1 - '@docusaurus/logger': 3.10.1 - '@docusaurus/types': 3.10.1(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.15))(html-minifier-terser@7.2.0)(postcss@8.5.15)(react-dom@19.2.7(react@19.2.7))(react@19.2.7) - '@docusaurus/utils': 3.10.1(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.15))(html-minifier-terser@7.2.0)(postcss@8.5.15)(react-dom@19.2.7(react@19.2.7))(react@19.2.7) - babel-loader: 9.2.1(@babel/core@7.29.7)(webpack@5.107.2(postcss@8.5.15)) + '@babel/core': 7.29.7(supports-color@8.1.1) + '@docusaurus/babel': 3.10.2(@swc/core@1.15.47(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3) + '@docusaurus/cssnano-preset': 3.10.2 + '@docusaurus/logger': 3.10.2 + '@docusaurus/types': 3.10.2(@swc/core@1.15.47(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3) + '@docusaurus/utils': 3.10.2(@swc/core@1.15.47(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3) + babel-loader: 9.2.1(@babel/core@7.29.7(supports-color@8.1.1))(webpack@5.108.4(@swc/core@1.15.47(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(uglify-js@3.19.3)) clean-css: 5.3.3 - copy-webpack-plugin: 11.0.0(webpack@5.107.2(postcss@8.5.15)) - css-loader: 6.11.0(webpack@5.107.2(postcss@8.5.15)) - css-minimizer-webpack-plugin: 5.0.1(clean-css@5.3.3)(esbuild@0.28.1)(webpack@5.107.2(postcss@8.5.15)) - cssnano: 6.1.2(postcss@8.5.15) - file-loader: 6.2.0(webpack@5.107.2(postcss@8.5.15)) + copy-webpack-plugin: 11.0.0(webpack@5.108.4(@swc/core@1.15.47(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(uglify-js@3.19.3)) + css-loader: 6.11.0(webpack@5.108.4(@swc/core@1.15.47(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(uglify-js@3.19.3)) + css-minimizer-webpack-plugin: 5.0.1(clean-css@5.3.3)(csso@5.0.5)(esbuild@0.28.2)(lightningcss@1.33.0)(webpack@5.108.4(@swc/core@1.15.47(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(uglify-js@3.19.3)) + cssnano: 6.1.2(postcss@8.5.26) + file-loader: 6.2.0(webpack@5.108.4(@swc/core@1.15.47(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(uglify-js@3.19.3)) html-minifier-terser: 7.2.0 - mini-css-extract-plugin: 2.10.2(webpack@5.107.2(postcss@8.5.15)) - null-loader: 4.0.1(webpack@5.107.2(postcss@8.5.15)) - postcss: 8.5.15 - postcss-loader: 7.3.4(postcss@8.5.15)(typescript@6.0.3)(webpack@5.107.2(postcss@8.5.15)) - postcss-preset-env: 10.6.1(postcss@8.5.15) - terser-webpack-plugin: 5.6.1(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.15))(esbuild@0.28.1)(html-minifier-terser@7.2.0)(postcss@8.5.15)(webpack@5.107.2(postcss@8.5.15)) + mini-css-extract-plugin: 2.10.2(webpack@5.108.4(@swc/core@1.15.47(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(uglify-js@3.19.3)) + null-loader: 4.0.1(webpack@5.108.4(@swc/core@1.15.47(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(uglify-js@3.19.3)) + postcss: 8.5.26 + postcss-loader: 7.3.4(@typescript/typescript6@6.0.2)(postcss@8.5.26)(webpack@5.108.4(@swc/core@1.15.47(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(uglify-js@3.19.3)) + postcss-preset-env: 10.6.1(postcss@8.5.26) + terser-webpack-plugin: 5.6.1(@swc/core@1.15.47(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(uglify-js@3.19.3)(webpack@5.108.4(@swc/core@1.15.47(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(uglify-js@3.19.3)) tslib: 2.8.1 - url-loader: 4.1.1(file-loader@6.2.0(webpack@5.107.2(postcss@8.5.15)))(webpack@5.107.2(postcss@8.5.15)) - webpack: 5.107.2(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.15))(html-minifier-terser@7.2.0)(postcss@8.5.15) - webpackbar: 7.0.0(webpack@5.107.2(postcss@8.5.15)) + url-loader: 4.1.1(file-loader@6.2.0(webpack@5.108.4(@swc/core@1.15.47(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(uglify-js@3.19.3)))(webpack@5.108.4(@swc/core@1.15.47(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(uglify-js@3.19.3)) + webpack: 5.108.4(@swc/core@1.15.47(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(uglify-js@3.19.3) + webpackbar: 7.0.0(webpack@5.108.4(@swc/core@1.15.47(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(uglify-js@3.19.3)) transitivePeerDependencies: - '@minify-html/node' - '@parcel/css' @@ -14445,59 +14504,16 @@ snapshots: - uglify-js - webpack-cli - '@docusaurus/bundler@3.10.1(react-dom@19.2.7(react@19.2.7))(react@19.2.7)(typescript@6.0.3)': + '@docusaurus/core@3.10.2(@mdx-js/react@3.1.1(@types/react@19.2.18)(react@19.2.8))(@swc/core@1.15.47(@swc/helpers@0.5.23))(@typescript/typescript6@6.0.2)(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(debug@4.4.3(supports-color@8.1.1))(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3)': dependencies: - '@babel/core': 7.29.7 - '@docusaurus/babel': 3.10.1(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.15))(html-minifier-terser@7.2.0)(postcss@8.5.15)(react-dom@19.2.7(react@19.2.7))(react@19.2.7) - '@docusaurus/cssnano-preset': 3.10.1 - '@docusaurus/logger': 3.10.1 - '@docusaurus/types': 3.10.1(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.15))(html-minifier-terser@7.2.0)(postcss@8.5.15)(react-dom@19.2.7(react@19.2.7))(react@19.2.7) - '@docusaurus/utils': 3.10.1(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.15))(html-minifier-terser@7.2.0)(postcss@8.5.15)(react-dom@19.2.7(react@19.2.7))(react@19.2.7) - babel-loader: 9.2.1(@babel/core@7.29.7)(webpack@5.107.2(postcss@8.5.15)) - clean-css: 5.3.3 - copy-webpack-plugin: 11.0.0(webpack@5.107.2(postcss@8.5.15)) - css-loader: 6.11.0(webpack@5.107.2(postcss@8.5.15)) - css-minimizer-webpack-plugin: 5.0.1(clean-css@5.3.3)(webpack@5.107.2(postcss@8.5.15)) - cssnano: 6.1.2(postcss@8.5.15) - file-loader: 6.2.0(webpack@5.107.2(postcss@8.5.15)) - html-minifier-terser: 7.2.0 - mini-css-extract-plugin: 2.10.2(webpack@5.107.2(postcss@8.5.15)) - null-loader: 4.0.1(webpack@5.107.2(postcss@8.5.15)) - postcss: 8.5.15 - postcss-loader: 7.3.4(postcss@8.5.15)(typescript@6.0.3)(webpack@5.107.2(postcss@8.5.15)) - postcss-preset-env: 10.6.1(postcss@8.5.15) - terser-webpack-plugin: 5.6.1(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.15))(html-minifier-terser@7.2.0)(postcss@8.5.15)(webpack@5.107.2(postcss@8.5.15)) - tslib: 2.8.1 - url-loader: 4.1.1(file-loader@6.2.0(webpack@5.107.2(postcss@8.5.15)))(webpack@5.107.2(postcss@8.5.15)) - webpack: 5.107.2(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.15))(html-minifier-terser@7.2.0)(postcss@8.5.15) - webpackbar: 7.0.0(webpack@5.107.2(postcss@8.5.15)) - transitivePeerDependencies: - - '@minify-html/node' - - '@parcel/css' - - '@rspack/core' - - '@swc/core' - - '@swc/css' - - '@swc/html' - - csso - - esbuild - - lightningcss - - react - - react-dom - - supports-color - - typescript - - uglify-js - - webpack-cli - - '@docusaurus/core@3.10.1(@mdx-js/react@3.1.1(@types/react@19.2.17)(react@19.2.7))(esbuild@0.28.1)(postcss@8.5.15)(react-dom@19.2.7(react@19.2.7))(react@19.2.7)(typescript@6.0.3)': - dependencies: - '@docusaurus/babel': 3.10.1(postcss@8.5.15)(react-dom@19.2.7(react@19.2.7))(react@19.2.7) - '@docusaurus/bundler': 3.10.1(esbuild@0.28.1)(react-dom@19.2.7(react@19.2.7))(react@19.2.7)(typescript@6.0.3) - '@docusaurus/logger': 3.10.1 - '@docusaurus/mdx-loader': 3.10.1(postcss@8.5.15)(react-dom@19.2.7(react@19.2.7))(react@19.2.7) - '@docusaurus/utils': 3.10.1(postcss@8.5.15)(react-dom@19.2.7(react@19.2.7))(react@19.2.7) - '@docusaurus/utils-common': 3.10.1(postcss@8.5.15)(react-dom@19.2.7(react@19.2.7))(react@19.2.7) - '@docusaurus/utils-validation': 3.10.1(postcss@8.5.15)(react-dom@19.2.7(react@19.2.7))(react@19.2.7) - '@mdx-js/react': 3.1.1(@types/react@19.2.17)(react@19.2.7) + '@docusaurus/babel': 3.10.2(@swc/core@1.15.47(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3) + '@docusaurus/bundler': 3.10.2(@swc/core@1.15.47(@swc/helpers@0.5.23))(@typescript/typescript6@6.0.2)(csso@5.0.5)(esbuild@0.28.2)(lightningcss@1.33.0)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3) + '@docusaurus/logger': 3.10.2 + '@docusaurus/mdx-loader': 3.10.2(@swc/core@1.15.47(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3) + '@docusaurus/utils': 3.10.2(@swc/core@1.15.47(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3) + '@docusaurus/utils-common': 3.10.2(@swc/core@1.15.47(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3) + '@docusaurus/utils-validation': 3.10.2(@swc/core@1.15.47(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3) + '@mdx-js/react': 3.1.1(@types/react@19.2.18)(react@19.2.8) boxen: 6.2.1 chalk: 4.1.2 chokidar: 3.6.0 @@ -14505,35 +14521,35 @@ snapshots: combine-promises: 1.2.0 commander: 5.1.0 core-js: 3.49.0 - detect-port: 1.6.1 + detect-port: 2.1.0 escape-html: 1.0.3 eta: 2.2.0 eval: 0.1.8 execa: 5.1.1 - fs-extra: 11.3.5 + fs-extra: 11.3.6 html-tags: 3.3.1 - html-webpack-plugin: 5.6.7(webpack@5.107.2(postcss@8.5.15)) + html-webpack-plugin: 5.6.7(webpack@5.108.4(@swc/core@1.15.47(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(uglify-js@3.19.3)) leven: 3.1.0 lodash: 4.18.1 open: 8.4.2 p-map: 4.0.0 prompts: 2.4.2 - react: 19.2.7 - react-dom: 19.2.7(react@19.2.7) - react-helmet-async: '@slorber/react-helmet-async@1.3.0(react-dom@19.2.7(react@19.2.7))(react@19.2.7)' - react-loadable: '@docusaurus/react-loadable@6.0.0(react@19.2.7)' - react-loadable-ssr-addon-v5-slorber: 1.0.3(@docusaurus/react-loadable@6.0.0(react@19.2.7))(webpack@5.107.2(postcss@8.5.15)) - react-router: 5.3.4(react@19.2.7) - react-router-config: 5.1.1(react-router@5.3.4(react@19.2.7))(react@19.2.7) - react-router-dom: 5.3.4(react@19.2.7) - semver: 7.8.4 + react: 19.2.8 + react-dom: 19.2.8(react@19.2.8) + react-helmet-async: '@slorber/react-helmet-async@1.3.0(react-dom@19.2.8(react@19.2.8))(react@19.2.8)' + react-loadable: '@docusaurus/react-loadable@6.0.0(react@19.2.8)' + react-loadable-ssr-addon-v5-slorber: 1.0.3(@docusaurus/react-loadable@6.0.0(react@19.2.8))(webpack@5.108.4(@swc/core@1.15.47(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(uglify-js@3.19.3)) + react-router: 5.3.4(react@19.2.8) + react-router-config: 5.1.1(react-router@5.3.4(react@19.2.8))(react@19.2.8) + react-router-dom: 5.3.4(react@19.2.8) + semver: 7.8.5 serve-handler: 6.1.7 tinypool: 1.1.1 tslib: 2.8.1 update-notifier: 6.0.2 - webpack: 5.107.2(postcss@8.5.15) + webpack: 5.108.4(@swc/core@1.15.47(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(uglify-js@3.19.3) webpack-bundle-analyzer: 4.10.2 - webpack-dev-server: 5.2.5(tslib@2.8.1)(webpack@5.107.2(postcss@8.5.15)) + webpack-dev-server: 5.2.6(debug@4.4.3(supports-color@8.1.1))(supports-color@8.1.1)(tslib@2.8.1)(webpack@5.108.4(@swc/core@1.15.47(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(uglify-js@3.19.3)) webpack-merge: 6.0.1 transitivePeerDependencies: - '@minify-html/node' @@ -14557,115 +14573,46 @@ snapshots: - utf-8-validate - webpack-cli - '@docusaurus/core@3.10.1(@mdx-js/react@3.1.1(@types/react@19.2.17)(react@19.2.7))(postcss@8.5.15)(react-dom@19.2.7(react@19.2.7))(react@19.2.7)(typescript@6.0.3)': + '@docusaurus/cssnano-preset@3.10.2': dependencies: - '@docusaurus/babel': 3.10.1(postcss@8.5.15)(react-dom@19.2.7(react@19.2.7))(react@19.2.7) - '@docusaurus/bundler': 3.10.1(react-dom@19.2.7(react@19.2.7))(react@19.2.7)(typescript@6.0.3) - '@docusaurus/logger': 3.10.1 - '@docusaurus/mdx-loader': 3.10.1(postcss@8.5.15)(react-dom@19.2.7(react@19.2.7))(react@19.2.7) - '@docusaurus/utils': 3.10.1(postcss@8.5.15)(react-dom@19.2.7(react@19.2.7))(react@19.2.7) - '@docusaurus/utils-common': 3.10.1(postcss@8.5.15)(react-dom@19.2.7(react@19.2.7))(react@19.2.7) - '@docusaurus/utils-validation': 3.10.1(postcss@8.5.15)(react-dom@19.2.7(react@19.2.7))(react@19.2.7) - '@mdx-js/react': 3.1.1(@types/react@19.2.17)(react@19.2.7) - boxen: 6.2.1 - chalk: 4.1.2 - chokidar: 3.6.0 - cli-table3: 0.6.5 - combine-promises: 1.2.0 - commander: 5.1.0 - core-js: 3.49.0 - detect-port: 1.6.1 - escape-html: 1.0.3 - eta: 2.2.0 - eval: 0.1.8 - execa: 5.1.1 - fs-extra: 11.3.5 - html-tags: 3.3.1 - html-webpack-plugin: 5.6.7(webpack@5.107.2(postcss@8.5.15)) - leven: 3.1.0 - lodash: 4.18.1 - open: 8.4.2 - p-map: 4.0.0 - prompts: 2.4.2 - react: 19.2.7 - react-dom: 19.2.7(react@19.2.7) - react-helmet-async: '@slorber/react-helmet-async@1.3.0(react-dom@19.2.7(react@19.2.7))(react@19.2.7)' - react-loadable: '@docusaurus/react-loadable@6.0.0(react@19.2.7)' - react-loadable-ssr-addon-v5-slorber: 1.0.3(@docusaurus/react-loadable@6.0.0(react@19.2.7))(webpack@5.107.2(postcss@8.5.15)) - react-router: 5.3.4(react@19.2.7) - react-router-config: 5.1.1(react-router@5.3.4(react@19.2.7))(react@19.2.7) - react-router-dom: 5.3.4(react@19.2.7) - semver: 7.8.4 - serve-handler: 6.1.7 - tinypool: 1.1.1 - tslib: 2.8.1 - update-notifier: 6.0.2 - webpack: 5.107.2(postcss@8.5.15) - webpack-bundle-analyzer: 4.10.2 - webpack-dev-server: 5.2.5(tslib@2.8.1)(webpack@5.107.2(postcss@8.5.15)) - webpack-merge: 6.0.1 - transitivePeerDependencies: - - '@minify-html/node' - - '@parcel/css' - - '@rspack/core' - - '@swc/core' - - '@swc/css' - - '@swc/html' - - bufferutil - - clean-css - - cssnano - - csso - - debug - - esbuild - - html-minifier-terser - - lightningcss - - postcss - - supports-color - - typescript - - uglify-js - - utf-8-validate - - webpack-cli - - '@docusaurus/cssnano-preset@3.10.1': - dependencies: - cssnano-preset-advanced: 6.1.2(postcss@8.5.15) - postcss: 8.5.15 - postcss-sort-media-queries: 5.2.0(postcss@8.5.15) + cssnano-preset-advanced: 6.1.2(postcss@8.5.26) + postcss: 8.5.26 + postcss-sort-media-queries: 5.2.0(postcss@8.5.26) tslib: 2.8.1 - '@docusaurus/logger@3.10.1': + '@docusaurus/logger@3.10.2': dependencies: chalk: 4.1.2 tslib: 2.8.1 - '@docusaurus/mdx-loader@3.10.1(postcss@8.5.15)(react-dom@19.2.7(react@19.2.7))(react@19.2.7)': + '@docusaurus/mdx-loader@3.10.2(@swc/core@1.15.47(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3)': dependencies: - '@docusaurus/logger': 3.10.1 - '@docusaurus/utils': 3.10.1(postcss@8.5.15)(react-dom@19.2.7(react@19.2.7))(react@19.2.7) - '@docusaurus/utils-validation': 3.10.1(postcss@8.5.15)(react-dom@19.2.7(react@19.2.7))(react@19.2.7) - '@mdx-js/mdx': 3.1.1 + '@docusaurus/logger': 3.10.2 + '@docusaurus/utils': 3.10.2(@swc/core@1.15.47(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3) + '@docusaurus/utils-validation': 3.10.2(@swc/core@1.15.47(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3) + '@mdx-js/mdx': 3.1.1(supports-color@8.1.1) '@slorber/remark-comment': 1.0.0 escape-html: 1.0.3 estree-util-value-to-estree: 3.5.0 - file-loader: 6.2.0(webpack@5.107.2(postcss@8.5.15)) - fs-extra: 11.3.5 + file-loader: 6.2.0(webpack@5.108.4(@swc/core@1.15.47(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(uglify-js@3.19.3)) + fs-extra: 11.3.6 image-size: 2.0.2 - mdast-util-mdx: 3.0.0 + mdast-util-mdx: 3.0.0(supports-color@8.1.1) mdast-util-to-string: 4.0.0 - react: 19.2.7 - react-dom: 19.2.7(react@19.2.7) + react: 19.2.8 + react-dom: 19.2.8(react@19.2.8) rehype-raw: 7.0.0 - remark-directive: 3.0.1 + remark-directive: 3.0.1(supports-color@8.1.1) remark-emoji: 4.0.1 - remark-frontmatter: 5.0.0 - remark-gfm: 4.0.1 + remark-frontmatter: 5.0.0(supports-color@8.1.1) + remark-gfm: 4.0.1(supports-color@8.1.1) stringify-object: 3.3.0 tslib: 2.8.1 unified: 11.0.5 unist-util-visit: 5.1.0 - url-loader: 4.1.1(file-loader@6.2.0(webpack@5.107.2(postcss@8.5.15)))(webpack@5.107.2(postcss@8.5.15)) + url-loader: 4.1.1(file-loader@6.2.0(webpack@5.108.4(@swc/core@1.15.47(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(uglify-js@3.19.3)))(webpack@5.108.4(@swc/core@1.15.47(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(uglify-js@3.19.3)) vfile: 6.0.3 - webpack: 5.107.2(postcss@8.5.15) + webpack: 5.108.4(@swc/core@1.15.47(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(uglify-js@3.19.3) transitivePeerDependencies: - '@minify-html/node' - '@swc/core' @@ -14682,17 +14629,17 @@ snapshots: - uglify-js - webpack-cli - '@docusaurus/module-type-aliases@3.10.1(postcss@8.5.15)(react-dom@19.2.7(react@19.2.7))(react@19.2.7)': + '@docusaurus/module-type-aliases@3.10.2(@swc/core@1.15.47(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3)': dependencies: - '@docusaurus/types': 3.10.1(postcss@8.5.15)(react-dom@19.2.7(react@19.2.7))(react@19.2.7) + '@docusaurus/types': 3.10.2(@swc/core@1.15.47(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3) '@types/history': 4.7.11 - '@types/react': 19.2.17 + '@types/react': 19.2.18 '@types/react-router-config': 5.0.11 '@types/react-router-dom': 5.3.3 - react: 19.2.7 - react-dom: 19.2.7(react@19.2.7) - react-helmet-async: '@slorber/react-helmet-async@1.3.0(react-dom@19.2.7(react@19.2.7))(react@19.2.7)' - react-loadable: '@docusaurus/react-loadable@6.0.0(react@19.2.7)' + react: 19.2.8 + react-dom: 19.2.8(react@19.2.8) + react-helmet-async: '@slorber/react-helmet-async@1.3.0(react-dom@19.2.8(react@19.2.8))(react@19.2.8)' + react-loadable: '@docusaurus/react-loadable@6.0.0(react@19.2.8)' transitivePeerDependencies: - '@minify-html/node' - '@swc/core' @@ -14709,30 +14656,30 @@ snapshots: - uglify-js - webpack-cli - '@docusaurus/plugin-content-blog@3.10.1(@docusaurus/plugin-content-docs@3.10.1(@mdx-js/react@3.1.1(@types/react@19.2.17)(react@19.2.7))(postcss@8.5.15)(react-dom@19.2.7(react@19.2.7))(react@19.2.7)(typescript@6.0.3))(@mdx-js/react@3.1.1(@types/react@19.2.17)(react@19.2.7))(postcss@8.5.15)(react-dom@19.2.7(react@19.2.7))(react@19.2.7)(typescript@6.0.3)': + '@docusaurus/plugin-content-blog@3.10.2(@docusaurus/plugin-content-docs@3.10.2(@mdx-js/react@3.1.1(@types/react@19.2.18)(react@19.2.8))(@swc/core@1.15.47(@swc/helpers@0.5.23))(@typescript/typescript6@6.0.2)(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(debug@4.4.3(supports-color@8.1.1))(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3))(@mdx-js/react@3.1.1(@types/react@19.2.18)(react@19.2.8))(@swc/core@1.15.47(@swc/helpers@0.5.23))(@typescript/typescript6@6.0.2)(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(debug@4.4.3(supports-color@8.1.1))(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3)': dependencies: - '@docusaurus/core': 3.10.1(@mdx-js/react@3.1.1(@types/react@19.2.17)(react@19.2.7))(postcss@8.5.15)(react-dom@19.2.7(react@19.2.7))(react@19.2.7)(typescript@6.0.3) - '@docusaurus/logger': 3.10.1 - '@docusaurus/mdx-loader': 3.10.1(postcss@8.5.15)(react-dom@19.2.7(react@19.2.7))(react@19.2.7) - '@docusaurus/plugin-content-docs': 3.10.1(@mdx-js/react@3.1.1(@types/react@19.2.17)(react@19.2.7))(postcss@8.5.15)(react-dom@19.2.7(react@19.2.7))(react@19.2.7)(typescript@6.0.3) - '@docusaurus/theme-common': 3.10.1(@docusaurus/plugin-content-docs@3.10.1(@mdx-js/react@3.1.1(@types/react@19.2.17)(react@19.2.7))(postcss@8.5.15)(react-dom@19.2.7(react@19.2.7))(react@19.2.7)(typescript@6.0.3))(postcss@8.5.15)(react-dom@19.2.7(react@19.2.7))(react@19.2.7) - '@docusaurus/types': 3.10.1(postcss@8.5.15)(react-dom@19.2.7(react@19.2.7))(react@19.2.7) - '@docusaurus/utils': 3.10.1(postcss@8.5.15)(react-dom@19.2.7(react@19.2.7))(react@19.2.7) - '@docusaurus/utils-common': 3.10.1(postcss@8.5.15)(react-dom@19.2.7(react@19.2.7))(react@19.2.7) - '@docusaurus/utils-validation': 3.10.1(postcss@8.5.15)(react-dom@19.2.7(react@19.2.7))(react@19.2.7) + '@docusaurus/core': 3.10.2(@mdx-js/react@3.1.1(@types/react@19.2.18)(react@19.2.8))(@swc/core@1.15.47(@swc/helpers@0.5.23))(@typescript/typescript6@6.0.2)(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(debug@4.4.3(supports-color@8.1.1))(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3) + '@docusaurus/logger': 3.10.2 + '@docusaurus/mdx-loader': 3.10.2(@swc/core@1.15.47(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3) + '@docusaurus/plugin-content-docs': 3.10.2(@mdx-js/react@3.1.1(@types/react@19.2.18)(react@19.2.8))(@swc/core@1.15.47(@swc/helpers@0.5.23))(@typescript/typescript6@6.0.2)(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(debug@4.4.3(supports-color@8.1.1))(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3) + '@docusaurus/theme-common': 3.10.2(@docusaurus/plugin-content-docs@3.10.2(@mdx-js/react@3.1.1(@types/react@19.2.18)(react@19.2.8))(@swc/core@1.15.47(@swc/helpers@0.5.23))(@typescript/typescript6@6.0.2)(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(debug@4.4.3(supports-color@8.1.1))(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3))(@swc/core@1.15.47(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3) + '@docusaurus/types': 3.10.2(@swc/core@1.15.47(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3) + '@docusaurus/utils': 3.10.2(@swc/core@1.15.47(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3) + '@docusaurus/utils-common': 3.10.2(@swc/core@1.15.47(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3) + '@docusaurus/utils-validation': 3.10.2(@swc/core@1.15.47(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3) cheerio: 1.0.0-rc.12 combine-promises: 1.2.0 feed: 4.2.2 - fs-extra: 11.3.5 + fs-extra: 11.3.6 lodash: 4.18.1 - react: 19.2.7 - react-dom: 19.2.7(react@19.2.7) + react: 19.2.8 + react-dom: 19.2.8(react@19.2.8) schema-dts: 1.1.5 srcset: 4.0.0 tslib: 2.8.1 unist-util-visit: 5.1.0 utility-types: 3.11.0 - webpack: 5.107.2(postcss@8.5.15) + webpack: 5.108.4(@swc/core@1.15.47(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(uglify-js@3.19.3) transitivePeerDependencies: - '@docusaurus/faster' - '@mdx-js/react' @@ -14757,28 +14704,28 @@ snapshots: - utf-8-validate - webpack-cli - '@docusaurus/plugin-content-docs@3.10.1(@mdx-js/react@3.1.1(@types/react@19.2.17)(react@19.2.7))(postcss@8.5.15)(react-dom@19.2.7(react@19.2.7))(react@19.2.7)(typescript@6.0.3)': + '@docusaurus/plugin-content-docs@3.10.2(@mdx-js/react@3.1.1(@types/react@19.2.18)(react@19.2.8))(@swc/core@1.15.47(@swc/helpers@0.5.23))(@typescript/typescript6@6.0.2)(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(debug@4.4.3(supports-color@8.1.1))(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3)': dependencies: - '@docusaurus/core': 3.10.1(@mdx-js/react@3.1.1(@types/react@19.2.17)(react@19.2.7))(postcss@8.5.15)(react-dom@19.2.7(react@19.2.7))(react@19.2.7)(typescript@6.0.3) - '@docusaurus/logger': 3.10.1 - '@docusaurus/mdx-loader': 3.10.1(postcss@8.5.15)(react-dom@19.2.7(react@19.2.7))(react@19.2.7) - '@docusaurus/module-type-aliases': 3.10.1(postcss@8.5.15)(react-dom@19.2.7(react@19.2.7))(react@19.2.7) - '@docusaurus/theme-common': 3.10.1(@docusaurus/plugin-content-docs@3.10.1(@mdx-js/react@3.1.1(@types/react@19.2.17)(react@19.2.7))(postcss@8.5.15)(react-dom@19.2.7(react@19.2.7))(react@19.2.7)(typescript@6.0.3))(postcss@8.5.15)(react-dom@19.2.7(react@19.2.7))(react@19.2.7) - '@docusaurus/types': 3.10.1(postcss@8.5.15)(react-dom@19.2.7(react@19.2.7))(react@19.2.7) - '@docusaurus/utils': 3.10.1(postcss@8.5.15)(react-dom@19.2.7(react@19.2.7))(react@19.2.7) - '@docusaurus/utils-common': 3.10.1(postcss@8.5.15)(react-dom@19.2.7(react@19.2.7))(react@19.2.7) - '@docusaurus/utils-validation': 3.10.1(postcss@8.5.15)(react-dom@19.2.7(react@19.2.7))(react@19.2.7) + '@docusaurus/core': 3.10.2(@mdx-js/react@3.1.1(@types/react@19.2.18)(react@19.2.8))(@swc/core@1.15.47(@swc/helpers@0.5.23))(@typescript/typescript6@6.0.2)(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(debug@4.4.3(supports-color@8.1.1))(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3) + '@docusaurus/logger': 3.10.2 + '@docusaurus/mdx-loader': 3.10.2(@swc/core@1.15.47(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3) + '@docusaurus/module-type-aliases': 3.10.2(@swc/core@1.15.47(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3) + '@docusaurus/theme-common': 3.10.2(@docusaurus/plugin-content-docs@3.10.2(@mdx-js/react@3.1.1(@types/react@19.2.18)(react@19.2.8))(@swc/core@1.15.47(@swc/helpers@0.5.23))(@typescript/typescript6@6.0.2)(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(debug@4.4.3(supports-color@8.1.1))(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3))(@swc/core@1.15.47(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3) + '@docusaurus/types': 3.10.2(@swc/core@1.15.47(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3) + '@docusaurus/utils': 3.10.2(@swc/core@1.15.47(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3) + '@docusaurus/utils-common': 3.10.2(@swc/core@1.15.47(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3) + '@docusaurus/utils-validation': 3.10.2(@swc/core@1.15.47(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3) '@types/react-router-config': 5.0.11 combine-promises: 1.2.0 - fs-extra: 11.3.5 - js-yaml: 4.2.0 + fs-extra: 11.3.6 + js-yaml: 4.3.0 lodash: 4.18.1 - react: 19.2.7 - react-dom: 19.2.7(react@19.2.7) + react: 19.2.8 + react-dom: 19.2.8(react@19.2.8) schema-dts: 1.1.5 tslib: 2.8.1 utility-types: 3.11.0 - webpack: 5.107.2(postcss@8.5.15) + webpack: 5.108.4(@swc/core@1.15.47(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(uglify-js@3.19.3) transitivePeerDependencies: - '@docusaurus/faster' - '@mdx-js/react' @@ -14803,18 +14750,18 @@ snapshots: - utf-8-validate - webpack-cli - '@docusaurus/plugin-content-pages@3.10.1(@mdx-js/react@3.1.1(@types/react@19.2.17)(react@19.2.7))(postcss@8.5.15)(react-dom@19.2.7(react@19.2.7))(react@19.2.7)(typescript@6.0.3)': + '@docusaurus/plugin-content-pages@3.10.2(@mdx-js/react@3.1.1(@types/react@19.2.18)(react@19.2.8))(@swc/core@1.15.47(@swc/helpers@0.5.23))(@typescript/typescript6@6.0.2)(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(debug@4.4.3(supports-color@8.1.1))(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3)': dependencies: - '@docusaurus/core': 3.10.1(@mdx-js/react@3.1.1(@types/react@19.2.17)(react@19.2.7))(postcss@8.5.15)(react-dom@19.2.7(react@19.2.7))(react@19.2.7)(typescript@6.0.3) - '@docusaurus/mdx-loader': 3.10.1(postcss@8.5.15)(react-dom@19.2.7(react@19.2.7))(react@19.2.7) - '@docusaurus/types': 3.10.1(postcss@8.5.15)(react-dom@19.2.7(react@19.2.7))(react@19.2.7) - '@docusaurus/utils': 3.10.1(postcss@8.5.15)(react-dom@19.2.7(react@19.2.7))(react@19.2.7) - '@docusaurus/utils-validation': 3.10.1(postcss@8.5.15)(react-dom@19.2.7(react@19.2.7))(react@19.2.7) - fs-extra: 11.3.5 - react: 19.2.7 - react-dom: 19.2.7(react@19.2.7) + '@docusaurus/core': 3.10.2(@mdx-js/react@3.1.1(@types/react@19.2.18)(react@19.2.8))(@swc/core@1.15.47(@swc/helpers@0.5.23))(@typescript/typescript6@6.0.2)(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(debug@4.4.3(supports-color@8.1.1))(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3) + '@docusaurus/mdx-loader': 3.10.2(@swc/core@1.15.47(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3) + '@docusaurus/types': 3.10.2(@swc/core@1.15.47(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3) + '@docusaurus/utils': 3.10.2(@swc/core@1.15.47(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3) + '@docusaurus/utils-validation': 3.10.2(@swc/core@1.15.47(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3) + fs-extra: 11.3.6 + react: 19.2.8 + react-dom: 19.2.8(react@19.2.8) tslib: 2.8.1 - webpack: 5.107.2(postcss@8.5.15) + webpack: 5.108.4(@swc/core@1.15.47(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(uglify-js@3.19.3) transitivePeerDependencies: - '@docusaurus/faster' - '@mdx-js/react' @@ -14839,12 +14786,12 @@ snapshots: - utf-8-validate - webpack-cli - '@docusaurus/plugin-css-cascade-layers@3.10.1(@mdx-js/react@3.1.1(@types/react@19.2.17)(react@19.2.7))(postcss@8.5.15)(react-dom@19.2.7(react@19.2.7))(react@19.2.7)(typescript@6.0.3)': + '@docusaurus/plugin-css-cascade-layers@3.10.2(@mdx-js/react@3.1.1(@types/react@19.2.18)(react@19.2.8))(@swc/core@1.15.47(@swc/helpers@0.5.23))(@typescript/typescript6@6.0.2)(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(debug@4.4.3(supports-color@8.1.1))(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3)': dependencies: - '@docusaurus/core': 3.10.1(@mdx-js/react@3.1.1(@types/react@19.2.17)(react@19.2.7))(postcss@8.5.15)(react-dom@19.2.7(react@19.2.7))(react@19.2.7)(typescript@6.0.3) - '@docusaurus/types': 3.10.1(postcss@8.5.15)(react-dom@19.2.7(react@19.2.7))(react@19.2.7) - '@docusaurus/utils': 3.10.1(postcss@8.5.15)(react-dom@19.2.7(react@19.2.7))(react@19.2.7) - '@docusaurus/utils-validation': 3.10.1(postcss@8.5.15)(react-dom@19.2.7(react@19.2.7))(react@19.2.7) + '@docusaurus/core': 3.10.2(@mdx-js/react@3.1.1(@types/react@19.2.18)(react@19.2.8))(@swc/core@1.15.47(@swc/helpers@0.5.23))(@typescript/typescript6@6.0.2)(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(debug@4.4.3(supports-color@8.1.1))(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3) + '@docusaurus/types': 3.10.2(@swc/core@1.15.47(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3) + '@docusaurus/utils': 3.10.2(@swc/core@1.15.47(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3) + '@docusaurus/utils-validation': 3.10.2(@swc/core@1.15.47(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3) tslib: 2.8.1 transitivePeerDependencies: - '@docusaurus/faster' @@ -14872,15 +14819,15 @@ snapshots: - utf-8-validate - webpack-cli - '@docusaurus/plugin-debug@3.10.1(@mdx-js/react@3.1.1(@types/react@19.2.17)(react@19.2.7))(postcss@8.5.15)(react-dom@19.2.7(react@19.2.7))(react@19.2.7)(typescript@6.0.3)': + '@docusaurus/plugin-debug@3.10.2(@mdx-js/react@3.1.1(@types/react@19.2.18)(react@19.2.8))(@swc/core@1.15.47(@swc/helpers@0.5.23))(@typescript/typescript6@6.0.2)(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(debug@4.4.3(supports-color@8.1.1))(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3)': dependencies: - '@docusaurus/core': 3.10.1(@mdx-js/react@3.1.1(@types/react@19.2.17)(react@19.2.7))(postcss@8.5.15)(react-dom@19.2.7(react@19.2.7))(react@19.2.7)(typescript@6.0.3) - '@docusaurus/types': 3.10.1(postcss@8.5.15)(react-dom@19.2.7(react@19.2.7))(react@19.2.7) - '@docusaurus/utils': 3.10.1(postcss@8.5.15)(react-dom@19.2.7(react@19.2.7))(react@19.2.7) - fs-extra: 11.3.5 - react: 19.2.7 - react-dom: 19.2.7(react@19.2.7) - react-json-view-lite: 2.5.0(react@19.2.7) + '@docusaurus/core': 3.10.2(@mdx-js/react@3.1.1(@types/react@19.2.18)(react@19.2.8))(@swc/core@1.15.47(@swc/helpers@0.5.23))(@typescript/typescript6@6.0.2)(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(debug@4.4.3(supports-color@8.1.1))(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3) + '@docusaurus/types': 3.10.2(@swc/core@1.15.47(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3) + '@docusaurus/utils': 3.10.2(@swc/core@1.15.47(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3) + fs-extra: 11.3.6 + react: 19.2.8 + react-dom: 19.2.8(react@19.2.8) + react-json-view-lite: 2.5.0(react@19.2.8) tslib: 2.8.1 transitivePeerDependencies: - '@docusaurus/faster' @@ -14906,13 +14853,13 @@ snapshots: - utf-8-validate - webpack-cli - '@docusaurus/plugin-google-analytics@3.10.1(@mdx-js/react@3.1.1(@types/react@19.2.17)(react@19.2.7))(postcss@8.5.15)(react-dom@19.2.7(react@19.2.7))(react@19.2.7)(typescript@6.0.3)': + '@docusaurus/plugin-google-analytics@3.10.2(@mdx-js/react@3.1.1(@types/react@19.2.18)(react@19.2.8))(@swc/core@1.15.47(@swc/helpers@0.5.23))(@typescript/typescript6@6.0.2)(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(debug@4.4.3(supports-color@8.1.1))(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3)': dependencies: - '@docusaurus/core': 3.10.1(@mdx-js/react@3.1.1(@types/react@19.2.17)(react@19.2.7))(postcss@8.5.15)(react-dom@19.2.7(react@19.2.7))(react@19.2.7)(typescript@6.0.3) - '@docusaurus/types': 3.10.1(postcss@8.5.15)(react-dom@19.2.7(react@19.2.7))(react@19.2.7) - '@docusaurus/utils-validation': 3.10.1(postcss@8.5.15)(react-dom@19.2.7(react@19.2.7))(react@19.2.7) - react: 19.2.7 - react-dom: 19.2.7(react@19.2.7) + '@docusaurus/core': 3.10.2(@mdx-js/react@3.1.1(@types/react@19.2.18)(react@19.2.8))(@swc/core@1.15.47(@swc/helpers@0.5.23))(@typescript/typescript6@6.0.2)(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(debug@4.4.3(supports-color@8.1.1))(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3) + '@docusaurus/types': 3.10.2(@swc/core@1.15.47(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3) + '@docusaurus/utils-validation': 3.10.2(@swc/core@1.15.47(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3) + react: 19.2.8 + react-dom: 19.2.8(react@19.2.8) tslib: 2.8.1 transitivePeerDependencies: - '@docusaurus/faster' @@ -14938,14 +14885,13 @@ snapshots: - utf-8-validate - webpack-cli - '@docusaurus/plugin-google-gtag@3.10.1(@mdx-js/react@3.1.1(@types/react@19.2.17)(react@19.2.7))(postcss@8.5.15)(react-dom@19.2.7(react@19.2.7))(react@19.2.7)(typescript@6.0.3)': + '@docusaurus/plugin-google-gtag@3.10.2(@mdx-js/react@3.1.1(@types/react@19.2.18)(react@19.2.8))(@swc/core@1.15.47(@swc/helpers@0.5.23))(@typescript/typescript6@6.0.2)(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(debug@4.4.3(supports-color@8.1.1))(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3)': dependencies: - '@docusaurus/core': 3.10.1(@mdx-js/react@3.1.1(@types/react@19.2.17)(react@19.2.7))(postcss@8.5.15)(react-dom@19.2.7(react@19.2.7))(react@19.2.7)(typescript@6.0.3) - '@docusaurus/types': 3.10.1(postcss@8.5.15)(react-dom@19.2.7(react@19.2.7))(react@19.2.7) - '@docusaurus/utils-validation': 3.10.1(postcss@8.5.15)(react-dom@19.2.7(react@19.2.7))(react@19.2.7) - '@types/gtag.js': 0.0.20 - react: 19.2.7 - react-dom: 19.2.7(react@19.2.7) + '@docusaurus/core': 3.10.2(@mdx-js/react@3.1.1(@types/react@19.2.18)(react@19.2.8))(@swc/core@1.15.47(@swc/helpers@0.5.23))(@typescript/typescript6@6.0.2)(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(debug@4.4.3(supports-color@8.1.1))(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3) + '@docusaurus/types': 3.10.2(@swc/core@1.15.47(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3) + '@docusaurus/utils-validation': 3.10.2(@swc/core@1.15.47(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3) + react: 19.2.8 + react-dom: 19.2.8(react@19.2.8) tslib: 2.8.1 transitivePeerDependencies: - '@docusaurus/faster' @@ -14971,13 +14917,13 @@ snapshots: - utf-8-validate - webpack-cli - '@docusaurus/plugin-google-tag-manager@3.10.1(@mdx-js/react@3.1.1(@types/react@19.2.17)(react@19.2.7))(postcss@8.5.15)(react-dom@19.2.7(react@19.2.7))(react@19.2.7)(typescript@6.0.3)': + '@docusaurus/plugin-google-tag-manager@3.10.2(@mdx-js/react@3.1.1(@types/react@19.2.18)(react@19.2.8))(@swc/core@1.15.47(@swc/helpers@0.5.23))(@typescript/typescript6@6.0.2)(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(debug@4.4.3(supports-color@8.1.1))(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3)': dependencies: - '@docusaurus/core': 3.10.1(@mdx-js/react@3.1.1(@types/react@19.2.17)(react@19.2.7))(postcss@8.5.15)(react-dom@19.2.7(react@19.2.7))(react@19.2.7)(typescript@6.0.3) - '@docusaurus/types': 3.10.1(postcss@8.5.15)(react-dom@19.2.7(react@19.2.7))(react@19.2.7) - '@docusaurus/utils-validation': 3.10.1(postcss@8.5.15)(react-dom@19.2.7(react@19.2.7))(react@19.2.7) - react: 19.2.7 - react-dom: 19.2.7(react@19.2.7) + '@docusaurus/core': 3.10.2(@mdx-js/react@3.1.1(@types/react@19.2.18)(react@19.2.8))(@swc/core@1.15.47(@swc/helpers@0.5.23))(@typescript/typescript6@6.0.2)(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(debug@4.4.3(supports-color@8.1.1))(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3) + '@docusaurus/types': 3.10.2(@swc/core@1.15.47(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3) + '@docusaurus/utils-validation': 3.10.2(@swc/core@1.15.47(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3) + react: 19.2.8 + react-dom: 19.2.8(react@19.2.8) tslib: 2.8.1 transitivePeerDependencies: - '@docusaurus/faster' @@ -15003,17 +14949,17 @@ snapshots: - utf-8-validate - webpack-cli - '@docusaurus/plugin-sitemap@3.10.1(@mdx-js/react@3.1.1(@types/react@19.2.17)(react@19.2.7))(postcss@8.5.15)(react-dom@19.2.7(react@19.2.7))(react@19.2.7)(typescript@6.0.3)': + '@docusaurus/plugin-sitemap@3.10.2(@mdx-js/react@3.1.1(@types/react@19.2.18)(react@19.2.8))(@swc/core@1.15.47(@swc/helpers@0.5.23))(@typescript/typescript6@6.0.2)(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(debug@4.4.3(supports-color@8.1.1))(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3)': dependencies: - '@docusaurus/core': 3.10.1(@mdx-js/react@3.1.1(@types/react@19.2.17)(react@19.2.7))(postcss@8.5.15)(react-dom@19.2.7(react@19.2.7))(react@19.2.7)(typescript@6.0.3) - '@docusaurus/logger': 3.10.1 - '@docusaurus/types': 3.10.1(postcss@8.5.15)(react-dom@19.2.7(react@19.2.7))(react@19.2.7) - '@docusaurus/utils': 3.10.1(postcss@8.5.15)(react-dom@19.2.7(react@19.2.7))(react@19.2.7) - '@docusaurus/utils-common': 3.10.1(postcss@8.5.15)(react-dom@19.2.7(react@19.2.7))(react@19.2.7) - '@docusaurus/utils-validation': 3.10.1(postcss@8.5.15)(react-dom@19.2.7(react@19.2.7))(react@19.2.7) - fs-extra: 11.3.5 - react: 19.2.7 - react-dom: 19.2.7(react@19.2.7) + '@docusaurus/core': 3.10.2(@mdx-js/react@3.1.1(@types/react@19.2.18)(react@19.2.8))(@swc/core@1.15.47(@swc/helpers@0.5.23))(@typescript/typescript6@6.0.2)(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(debug@4.4.3(supports-color@8.1.1))(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3) + '@docusaurus/logger': 3.10.2 + '@docusaurus/types': 3.10.2(@swc/core@1.15.47(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3) + '@docusaurus/utils': 3.10.2(@swc/core@1.15.47(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3) + '@docusaurus/utils-common': 3.10.2(@swc/core@1.15.47(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3) + '@docusaurus/utils-validation': 3.10.2(@swc/core@1.15.47(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3) + fs-extra: 11.3.6 + react: 19.2.8 + react-dom: 19.2.8(react@19.2.8) sitemap: 7.1.3 tslib: 2.8.1 transitivePeerDependencies: @@ -15040,18 +14986,18 @@ snapshots: - utf-8-validate - webpack-cli - '@docusaurus/plugin-svgr@3.10.1(@mdx-js/react@3.1.1(@types/react@19.2.17)(react@19.2.7))(postcss@8.5.15)(react-dom@19.2.7(react@19.2.7))(react@19.2.7)(typescript@6.0.3)': + '@docusaurus/plugin-svgr@3.10.2(@mdx-js/react@3.1.1(@types/react@19.2.18)(react@19.2.8))(@swc/core@1.15.47(@swc/helpers@0.5.23))(@typescript/typescript6@6.0.2)(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(debug@4.4.3(supports-color@8.1.1))(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3)': dependencies: - '@docusaurus/core': 3.10.1(@mdx-js/react@3.1.1(@types/react@19.2.17)(react@19.2.7))(postcss@8.5.15)(react-dom@19.2.7(react@19.2.7))(react@19.2.7)(typescript@6.0.3) - '@docusaurus/types': 3.10.1(postcss@8.5.15)(react-dom@19.2.7(react@19.2.7))(react@19.2.7) - '@docusaurus/utils': 3.10.1(postcss@8.5.15)(react-dom@19.2.7(react@19.2.7))(react@19.2.7) - '@docusaurus/utils-validation': 3.10.1(postcss@8.5.15)(react-dom@19.2.7(react@19.2.7))(react@19.2.7) - '@svgr/core': 8.1.0(typescript@6.0.3) - '@svgr/webpack': 8.1.0(typescript@6.0.3) - react: 19.2.7 - react-dom: 19.2.7(react@19.2.7) + '@docusaurus/core': 3.10.2(@mdx-js/react@3.1.1(@types/react@19.2.18)(react@19.2.8))(@swc/core@1.15.47(@swc/helpers@0.5.23))(@typescript/typescript6@6.0.2)(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(debug@4.4.3(supports-color@8.1.1))(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3) + '@docusaurus/types': 3.10.2(@swc/core@1.15.47(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3) + '@docusaurus/utils': 3.10.2(@swc/core@1.15.47(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3) + '@docusaurus/utils-validation': 3.10.2(@swc/core@1.15.47(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3) + '@svgr/core': 8.1.0(@typescript/typescript6@6.0.2)(supports-color@8.1.1) + '@svgr/webpack': 8.1.0(@typescript/typescript6@6.0.2)(supports-color@8.1.1) + react: 19.2.8 + react-dom: 19.2.8(react@19.2.8) tslib: 2.8.1 - webpack: 5.107.2(postcss@8.5.15) + webpack: 5.108.4(@swc/core@1.15.47(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(uglify-js@3.19.3) transitivePeerDependencies: - '@docusaurus/faster' - '@mdx-js/react' @@ -15076,25 +15022,25 @@ snapshots: - utf-8-validate - webpack-cli - '@docusaurus/preset-classic@3.10.1(@algolia/client-search@5.54.0)(@mdx-js/react@3.1.1(@types/react@19.2.17)(react@19.2.7))(@types/react@19.2.17)(postcss@8.5.15)(react-dom@19.2.7(react@19.2.7))(react@19.2.7)(search-insights@2.17.3)(typescript@6.0.3)': + '@docusaurus/preset-classic@3.10.2(@algolia/client-search@5.56.0)(@mdx-js/react@3.1.1(@types/react@19.2.18)(react@19.2.8))(@swc/core@1.15.47(@swc/helpers@0.5.23))(@types/react@19.2.18)(@typescript/typescript6@6.0.2)(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(debug@4.4.3(supports-color@8.1.1))(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(search-insights@2.17.3)(supports-color@8.1.1)(uglify-js@3.19.3)': dependencies: - '@docusaurus/core': 3.10.1(@mdx-js/react@3.1.1(@types/react@19.2.17)(react@19.2.7))(postcss@8.5.15)(react-dom@19.2.7(react@19.2.7))(react@19.2.7)(typescript@6.0.3) - '@docusaurus/plugin-content-blog': 3.10.1(@docusaurus/plugin-content-docs@3.10.1(@mdx-js/react@3.1.1(@types/react@19.2.17)(react@19.2.7))(postcss@8.5.15)(react-dom@19.2.7(react@19.2.7))(react@19.2.7)(typescript@6.0.3))(@mdx-js/react@3.1.1(@types/react@19.2.17)(react@19.2.7))(postcss@8.5.15)(react-dom@19.2.7(react@19.2.7))(react@19.2.7)(typescript@6.0.3) - '@docusaurus/plugin-content-docs': 3.10.1(@mdx-js/react@3.1.1(@types/react@19.2.17)(react@19.2.7))(postcss@8.5.15)(react-dom@19.2.7(react@19.2.7))(react@19.2.7)(typescript@6.0.3) - '@docusaurus/plugin-content-pages': 3.10.1(@mdx-js/react@3.1.1(@types/react@19.2.17)(react@19.2.7))(postcss@8.5.15)(react-dom@19.2.7(react@19.2.7))(react@19.2.7)(typescript@6.0.3) - '@docusaurus/plugin-css-cascade-layers': 3.10.1(@mdx-js/react@3.1.1(@types/react@19.2.17)(react@19.2.7))(postcss@8.5.15)(react-dom@19.2.7(react@19.2.7))(react@19.2.7)(typescript@6.0.3) - '@docusaurus/plugin-debug': 3.10.1(@mdx-js/react@3.1.1(@types/react@19.2.17)(react@19.2.7))(postcss@8.5.15)(react-dom@19.2.7(react@19.2.7))(react@19.2.7)(typescript@6.0.3) - '@docusaurus/plugin-google-analytics': 3.10.1(@mdx-js/react@3.1.1(@types/react@19.2.17)(react@19.2.7))(postcss@8.5.15)(react-dom@19.2.7(react@19.2.7))(react@19.2.7)(typescript@6.0.3) - '@docusaurus/plugin-google-gtag': 3.10.1(@mdx-js/react@3.1.1(@types/react@19.2.17)(react@19.2.7))(postcss@8.5.15)(react-dom@19.2.7(react@19.2.7))(react@19.2.7)(typescript@6.0.3) - '@docusaurus/plugin-google-tag-manager': 3.10.1(@mdx-js/react@3.1.1(@types/react@19.2.17)(react@19.2.7))(postcss@8.5.15)(react-dom@19.2.7(react@19.2.7))(react@19.2.7)(typescript@6.0.3) - '@docusaurus/plugin-sitemap': 3.10.1(@mdx-js/react@3.1.1(@types/react@19.2.17)(react@19.2.7))(postcss@8.5.15)(react-dom@19.2.7(react@19.2.7))(react@19.2.7)(typescript@6.0.3) - '@docusaurus/plugin-svgr': 3.10.1(@mdx-js/react@3.1.1(@types/react@19.2.17)(react@19.2.7))(postcss@8.5.15)(react-dom@19.2.7(react@19.2.7))(react@19.2.7)(typescript@6.0.3) - '@docusaurus/theme-classic': 3.10.1(@types/react@19.2.17)(react-dom@19.2.7(react@19.2.7))(react@19.2.7)(typescript@6.0.3) - '@docusaurus/theme-common': 3.10.1(@docusaurus/plugin-content-docs@3.10.1(@mdx-js/react@3.1.1(@types/react@19.2.17)(react@19.2.7))(postcss@8.5.15)(react-dom@19.2.7(react@19.2.7))(react@19.2.7)(typescript@6.0.3))(postcss@8.5.15)(react-dom@19.2.7(react@19.2.7))(react@19.2.7) - '@docusaurus/theme-search-algolia': 3.10.1(@algolia/client-search@5.54.0)(@mdx-js/react@3.1.1(@types/react@19.2.17)(react@19.2.7))(@types/react@19.2.17)(postcss@8.5.15)(react-dom@19.2.7(react@19.2.7))(react@19.2.7)(search-insights@2.17.3)(typescript@6.0.3) - '@docusaurus/types': 3.10.1(postcss@8.5.15)(react-dom@19.2.7(react@19.2.7))(react@19.2.7) - react: 19.2.7 - react-dom: 19.2.7(react@19.2.7) + '@docusaurus/core': 3.10.2(@mdx-js/react@3.1.1(@types/react@19.2.18)(react@19.2.8))(@swc/core@1.15.47(@swc/helpers@0.5.23))(@typescript/typescript6@6.0.2)(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(debug@4.4.3(supports-color@8.1.1))(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3) + '@docusaurus/plugin-content-blog': 3.10.2(@docusaurus/plugin-content-docs@3.10.2(@mdx-js/react@3.1.1(@types/react@19.2.18)(react@19.2.8))(@swc/core@1.15.47(@swc/helpers@0.5.23))(@typescript/typescript6@6.0.2)(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(debug@4.4.3(supports-color@8.1.1))(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3))(@mdx-js/react@3.1.1(@types/react@19.2.18)(react@19.2.8))(@swc/core@1.15.47(@swc/helpers@0.5.23))(@typescript/typescript6@6.0.2)(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(debug@4.4.3(supports-color@8.1.1))(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3) + '@docusaurus/plugin-content-docs': 3.10.2(@mdx-js/react@3.1.1(@types/react@19.2.18)(react@19.2.8))(@swc/core@1.15.47(@swc/helpers@0.5.23))(@typescript/typescript6@6.0.2)(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(debug@4.4.3(supports-color@8.1.1))(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3) + '@docusaurus/plugin-content-pages': 3.10.2(@mdx-js/react@3.1.1(@types/react@19.2.18)(react@19.2.8))(@swc/core@1.15.47(@swc/helpers@0.5.23))(@typescript/typescript6@6.0.2)(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(debug@4.4.3(supports-color@8.1.1))(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3) + '@docusaurus/plugin-css-cascade-layers': 3.10.2(@mdx-js/react@3.1.1(@types/react@19.2.18)(react@19.2.8))(@swc/core@1.15.47(@swc/helpers@0.5.23))(@typescript/typescript6@6.0.2)(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(debug@4.4.3(supports-color@8.1.1))(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3) + '@docusaurus/plugin-debug': 3.10.2(@mdx-js/react@3.1.1(@types/react@19.2.18)(react@19.2.8))(@swc/core@1.15.47(@swc/helpers@0.5.23))(@typescript/typescript6@6.0.2)(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(debug@4.4.3(supports-color@8.1.1))(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3) + '@docusaurus/plugin-google-analytics': 3.10.2(@mdx-js/react@3.1.1(@types/react@19.2.18)(react@19.2.8))(@swc/core@1.15.47(@swc/helpers@0.5.23))(@typescript/typescript6@6.0.2)(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(debug@4.4.3(supports-color@8.1.1))(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3) + '@docusaurus/plugin-google-gtag': 3.10.2(@mdx-js/react@3.1.1(@types/react@19.2.18)(react@19.2.8))(@swc/core@1.15.47(@swc/helpers@0.5.23))(@typescript/typescript6@6.0.2)(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(debug@4.4.3(supports-color@8.1.1))(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3) + '@docusaurus/plugin-google-tag-manager': 3.10.2(@mdx-js/react@3.1.1(@types/react@19.2.18)(react@19.2.8))(@swc/core@1.15.47(@swc/helpers@0.5.23))(@typescript/typescript6@6.0.2)(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(debug@4.4.3(supports-color@8.1.1))(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3) + '@docusaurus/plugin-sitemap': 3.10.2(@mdx-js/react@3.1.1(@types/react@19.2.18)(react@19.2.8))(@swc/core@1.15.47(@swc/helpers@0.5.23))(@typescript/typescript6@6.0.2)(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(debug@4.4.3(supports-color@8.1.1))(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3) + '@docusaurus/plugin-svgr': 3.10.2(@mdx-js/react@3.1.1(@types/react@19.2.18)(react@19.2.8))(@swc/core@1.15.47(@swc/helpers@0.5.23))(@typescript/typescript6@6.0.2)(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(debug@4.4.3(supports-color@8.1.1))(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3) + '@docusaurus/theme-classic': 3.10.2(@swc/core@1.15.47(@swc/helpers@0.5.23))(@types/react@19.2.18)(@typescript/typescript6@6.0.2)(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(debug@4.4.3(supports-color@8.1.1))(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3) + '@docusaurus/theme-common': 3.10.2(@docusaurus/plugin-content-docs@3.10.2(@mdx-js/react@3.1.1(@types/react@19.2.18)(react@19.2.8))(@swc/core@1.15.47(@swc/helpers@0.5.23))(@typescript/typescript6@6.0.2)(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(debug@4.4.3(supports-color@8.1.1))(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3))(@swc/core@1.15.47(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3) + '@docusaurus/theme-search-algolia': 3.10.2(@algolia/client-search@5.56.0)(@mdx-js/react@3.1.1(@types/react@19.2.18)(react@19.2.8))(@swc/core@1.15.47(@swc/helpers@0.5.23))(@types/react@19.2.18)(@typescript/typescript6@6.0.2)(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(debug@4.4.3(supports-color@8.1.1))(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(search-insights@2.17.3)(supports-color@8.1.1)(uglify-js@3.19.3) + '@docusaurus/types': 3.10.2(@swc/core@1.15.47(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3) + react: 19.2.8 + react-dom: 19.2.8(react@19.2.8) transitivePeerDependencies: - '@algolia/client-search' - '@docusaurus/faster' @@ -15122,38 +15068,38 @@ snapshots: - utf-8-validate - webpack-cli - '@docusaurus/react-loadable@6.0.0(react@19.2.7)': + '@docusaurus/react-loadable@6.0.0(react@19.2.8)': dependencies: - '@types/react': 19.2.17 - react: 19.2.7 + '@types/react': 19.2.18 + react: 19.2.8 - '@docusaurus/theme-classic@3.10.1(@types/react@19.2.17)(react-dom@19.2.7(react@19.2.7))(react@19.2.7)(typescript@6.0.3)': + '@docusaurus/theme-classic@3.10.2(@swc/core@1.15.47(@swc/helpers@0.5.23))(@types/react@19.2.18)(@typescript/typescript6@6.0.2)(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(debug@4.4.3(supports-color@8.1.1))(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3)': dependencies: - '@docusaurus/core': 3.10.1(@mdx-js/react@3.1.1(@types/react@19.2.17)(react@19.2.7))(postcss@8.5.15)(react-dom@19.2.7(react@19.2.7))(react@19.2.7)(typescript@6.0.3) - '@docusaurus/logger': 3.10.1 - '@docusaurus/mdx-loader': 3.10.1(postcss@8.5.15)(react-dom@19.2.7(react@19.2.7))(react@19.2.7) - '@docusaurus/module-type-aliases': 3.10.1(postcss@8.5.15)(react-dom@19.2.7(react@19.2.7))(react@19.2.7) - '@docusaurus/plugin-content-blog': 3.10.1(@docusaurus/plugin-content-docs@3.10.1(@mdx-js/react@3.1.1(@types/react@19.2.17)(react@19.2.7))(postcss@8.5.15)(react-dom@19.2.7(react@19.2.7))(react@19.2.7)(typescript@6.0.3))(@mdx-js/react@3.1.1(@types/react@19.2.17)(react@19.2.7))(postcss@8.5.15)(react-dom@19.2.7(react@19.2.7))(react@19.2.7)(typescript@6.0.3) - '@docusaurus/plugin-content-docs': 3.10.1(@mdx-js/react@3.1.1(@types/react@19.2.17)(react@19.2.7))(postcss@8.5.15)(react-dom@19.2.7(react@19.2.7))(react@19.2.7)(typescript@6.0.3) - '@docusaurus/plugin-content-pages': 3.10.1(@mdx-js/react@3.1.1(@types/react@19.2.17)(react@19.2.7))(postcss@8.5.15)(react-dom@19.2.7(react@19.2.7))(react@19.2.7)(typescript@6.0.3) - '@docusaurus/theme-common': 3.10.1(@docusaurus/plugin-content-docs@3.10.1(@mdx-js/react@3.1.1(@types/react@19.2.17)(react@19.2.7))(postcss@8.5.15)(react-dom@19.2.7(react@19.2.7))(react@19.2.7)(typescript@6.0.3))(postcss@8.5.15)(react-dom@19.2.7(react@19.2.7))(react@19.2.7) - '@docusaurus/theme-translations': 3.10.1 - '@docusaurus/types': 3.10.1(postcss@8.5.15)(react-dom@19.2.7(react@19.2.7))(react@19.2.7) - '@docusaurus/utils': 3.10.1(postcss@8.5.15)(react-dom@19.2.7(react@19.2.7))(react@19.2.7) - '@docusaurus/utils-common': 3.10.1(postcss@8.5.15)(react-dom@19.2.7(react@19.2.7))(react@19.2.7) - '@docusaurus/utils-validation': 3.10.1(postcss@8.5.15)(react-dom@19.2.7(react@19.2.7))(react@19.2.7) - '@mdx-js/react': 3.1.1(@types/react@19.2.17)(react@19.2.7) + '@docusaurus/core': 3.10.2(@mdx-js/react@3.1.1(@types/react@19.2.18)(react@19.2.8))(@swc/core@1.15.47(@swc/helpers@0.5.23))(@typescript/typescript6@6.0.2)(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(debug@4.4.3(supports-color@8.1.1))(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3) + '@docusaurus/logger': 3.10.2 + '@docusaurus/mdx-loader': 3.10.2(@swc/core@1.15.47(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3) + '@docusaurus/module-type-aliases': 3.10.2(@swc/core@1.15.47(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3) + '@docusaurus/plugin-content-blog': 3.10.2(@docusaurus/plugin-content-docs@3.10.2(@mdx-js/react@3.1.1(@types/react@19.2.18)(react@19.2.8))(@swc/core@1.15.47(@swc/helpers@0.5.23))(@typescript/typescript6@6.0.2)(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(debug@4.4.3(supports-color@8.1.1))(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3))(@mdx-js/react@3.1.1(@types/react@19.2.18)(react@19.2.8))(@swc/core@1.15.47(@swc/helpers@0.5.23))(@typescript/typescript6@6.0.2)(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(debug@4.4.3(supports-color@8.1.1))(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3) + '@docusaurus/plugin-content-docs': 3.10.2(@mdx-js/react@3.1.1(@types/react@19.2.18)(react@19.2.8))(@swc/core@1.15.47(@swc/helpers@0.5.23))(@typescript/typescript6@6.0.2)(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(debug@4.4.3(supports-color@8.1.1))(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3) + '@docusaurus/plugin-content-pages': 3.10.2(@mdx-js/react@3.1.1(@types/react@19.2.18)(react@19.2.8))(@swc/core@1.15.47(@swc/helpers@0.5.23))(@typescript/typescript6@6.0.2)(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(debug@4.4.3(supports-color@8.1.1))(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3) + '@docusaurus/theme-common': 3.10.2(@docusaurus/plugin-content-docs@3.10.2(@mdx-js/react@3.1.1(@types/react@19.2.18)(react@19.2.8))(@swc/core@1.15.47(@swc/helpers@0.5.23))(@typescript/typescript6@6.0.2)(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(debug@4.4.3(supports-color@8.1.1))(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3))(@swc/core@1.15.47(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3) + '@docusaurus/theme-translations': 3.10.2 + '@docusaurus/types': 3.10.2(@swc/core@1.15.47(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3) + '@docusaurus/utils': 3.10.2(@swc/core@1.15.47(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3) + '@docusaurus/utils-common': 3.10.2(@swc/core@1.15.47(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3) + '@docusaurus/utils-validation': 3.10.2(@swc/core@1.15.47(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3) + '@mdx-js/react': 3.1.1(@types/react@19.2.18)(react@19.2.8) clsx: 2.1.1 copy-text-to-clipboard: 3.2.2 infima: 0.2.0-alpha.45 lodash: 4.18.1 nprogress: 0.2.0 - postcss: 8.5.15 - prism-react-renderer: 2.4.1(react@19.2.7) + postcss: 8.5.26 + prism-react-renderer: 2.4.1(react@19.2.8) prismjs: 1.30.0 - react: 19.2.7 - react-dom: 19.2.7(react@19.2.7) - react-router-dom: 5.3.4(react@19.2.7) + react: 19.2.8 + react-dom: 19.2.8(react@19.2.8) + react-router-dom: 5.3.4(react@19.2.8) rtlcss: 4.3.0 tslib: 2.8.1 utility-types: 3.11.0 @@ -15180,21 +15126,21 @@ snapshots: - utf-8-validate - webpack-cli - '@docusaurus/theme-common@3.10.1(@docusaurus/plugin-content-docs@3.10.1(@mdx-js/react@3.1.1(@types/react@19.2.17)(react@19.2.7))(postcss@8.5.15)(react-dom@19.2.7(react@19.2.7))(react@19.2.7)(typescript@6.0.3))(postcss@8.5.15)(react-dom@19.2.7(react@19.2.7))(react@19.2.7)': + '@docusaurus/theme-common@3.10.2(@docusaurus/plugin-content-docs@3.10.2(@mdx-js/react@3.1.1(@types/react@19.2.18)(react@19.2.8))(@swc/core@1.15.47(@swc/helpers@0.5.23))(@typescript/typescript6@6.0.2)(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(debug@4.4.3(supports-color@8.1.1))(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3))(@swc/core@1.15.47(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3)': dependencies: - '@docusaurus/mdx-loader': 3.10.1(postcss@8.5.15)(react-dom@19.2.7(react@19.2.7))(react@19.2.7) - '@docusaurus/module-type-aliases': 3.10.1(postcss@8.5.15)(react-dom@19.2.7(react@19.2.7))(react@19.2.7) - '@docusaurus/plugin-content-docs': 3.10.1(@mdx-js/react@3.1.1(@types/react@19.2.17)(react@19.2.7))(postcss@8.5.15)(react-dom@19.2.7(react@19.2.7))(react@19.2.7)(typescript@6.0.3) - '@docusaurus/utils': 3.10.1(postcss@8.5.15)(react-dom@19.2.7(react@19.2.7))(react@19.2.7) - '@docusaurus/utils-common': 3.10.1(postcss@8.5.15)(react-dom@19.2.7(react@19.2.7))(react@19.2.7) + '@docusaurus/mdx-loader': 3.10.2(@swc/core@1.15.47(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3) + '@docusaurus/module-type-aliases': 3.10.2(@swc/core@1.15.47(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3) + '@docusaurus/plugin-content-docs': 3.10.2(@mdx-js/react@3.1.1(@types/react@19.2.18)(react@19.2.8))(@swc/core@1.15.47(@swc/helpers@0.5.23))(@typescript/typescript6@6.0.2)(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(debug@4.4.3(supports-color@8.1.1))(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3) + '@docusaurus/utils': 3.10.2(@swc/core@1.15.47(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3) + '@docusaurus/utils-common': 3.10.2(@swc/core@1.15.47(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3) '@types/history': 4.7.11 - '@types/react': 19.2.17 + '@types/react': 19.2.18 '@types/react-router-config': 5.0.11 clsx: 2.1.1 parse-numeric-range: 1.3.0 - prism-react-renderer: 2.4.1(react@19.2.7) - react: 19.2.7 - react-dom: 19.2.7(react@19.2.7) + prism-react-renderer: 2.4.1(react@19.2.8) + react: 19.2.8 + react-dom: 19.2.8(react@19.2.8) tslib: 2.8.1 utility-types: 3.11.0 transitivePeerDependencies: @@ -15213,16 +15159,16 @@ snapshots: - uglify-js - webpack-cli - '@docusaurus/theme-mermaid@3.10.1(@docusaurus/plugin-content-docs@3.10.1(@mdx-js/react@3.1.1(@types/react@19.2.17)(react@19.2.7))(postcss@8.5.15)(react-dom@19.2.7(react@19.2.7))(react@19.2.7)(typescript@6.0.3))(@mdx-js/react@3.1.1(@types/react@19.2.17)(react@19.2.7))(postcss@8.5.15)(react-dom@19.2.7(react@19.2.7))(react@19.2.7)(typescript@6.0.3)': + '@docusaurus/theme-mermaid@3.10.2(@docusaurus/plugin-content-docs@3.10.2(@mdx-js/react@3.1.1(@types/react@19.2.18)(react@19.2.8))(@swc/core@1.15.47(@swc/helpers@0.5.23))(@typescript/typescript6@6.0.2)(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(debug@4.4.3(supports-color@8.1.1))(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3))(@mdx-js/react@3.1.1(@types/react@19.2.18)(react@19.2.8))(@swc/core@1.15.47(@swc/helpers@0.5.23))(@typescript/typescript6@6.0.2)(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(debug@4.4.3(supports-color@8.1.1))(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3)': dependencies: - '@docusaurus/core': 3.10.1(@mdx-js/react@3.1.1(@types/react@19.2.17)(react@19.2.7))(postcss@8.5.15)(react-dom@19.2.7(react@19.2.7))(react@19.2.7)(typescript@6.0.3) - '@docusaurus/module-type-aliases': 3.10.1(postcss@8.5.15)(react-dom@19.2.7(react@19.2.7))(react@19.2.7) - '@docusaurus/theme-common': 3.10.1(@docusaurus/plugin-content-docs@3.10.1(@mdx-js/react@3.1.1(@types/react@19.2.17)(react@19.2.7))(postcss@8.5.15)(react-dom@19.2.7(react@19.2.7))(react@19.2.7)(typescript@6.0.3))(postcss@8.5.15)(react-dom@19.2.7(react@19.2.7))(react@19.2.7) - '@docusaurus/types': 3.10.1(postcss@8.5.15)(react-dom@19.2.7(react@19.2.7))(react@19.2.7) - '@docusaurus/utils-validation': 3.10.1(postcss@8.5.15)(react-dom@19.2.7(react@19.2.7))(react@19.2.7) - mermaid: 11.15.0 - react: 19.2.7 - react-dom: 19.2.7(react@19.2.7) + '@docusaurus/core': 3.10.2(@mdx-js/react@3.1.1(@types/react@19.2.18)(react@19.2.8))(@swc/core@1.15.47(@swc/helpers@0.5.23))(@typescript/typescript6@6.0.2)(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(debug@4.4.3(supports-color@8.1.1))(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3) + '@docusaurus/module-type-aliases': 3.10.2(@swc/core@1.15.47(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3) + '@docusaurus/theme-common': 3.10.2(@docusaurus/plugin-content-docs@3.10.2(@mdx-js/react@3.1.1(@types/react@19.2.18)(react@19.2.8))(@swc/core@1.15.47(@swc/helpers@0.5.23))(@typescript/typescript6@6.0.2)(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(debug@4.4.3(supports-color@8.1.1))(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3))(@swc/core@1.15.47(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3) + '@docusaurus/types': 3.10.2(@swc/core@1.15.47(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3) + '@docusaurus/utils-validation': 3.10.2(@swc/core@1.15.47(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3) + mermaid: 11.16.0 + react: 19.2.8 + react-dom: 19.2.8(react@19.2.8) tslib: 2.8.1 transitivePeerDependencies: - '@docusaurus/faster' @@ -15249,25 +15195,25 @@ snapshots: - utf-8-validate - webpack-cli - '@docusaurus/theme-search-algolia@3.10.1(@algolia/client-search@5.54.0)(@mdx-js/react@3.1.1(@types/react@19.2.17)(react@19.2.7))(@types/react@19.2.17)(postcss@8.5.15)(react-dom@19.2.7(react@19.2.7))(react@19.2.7)(search-insights@2.17.3)(typescript@6.0.3)': + '@docusaurus/theme-search-algolia@3.10.2(@algolia/client-search@5.56.0)(@mdx-js/react@3.1.1(@types/react@19.2.18)(react@19.2.8))(@swc/core@1.15.47(@swc/helpers@0.5.23))(@types/react@19.2.18)(@typescript/typescript6@6.0.2)(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(debug@4.4.3(supports-color@8.1.1))(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(search-insights@2.17.3)(supports-color@8.1.1)(uglify-js@3.19.3)': dependencies: - '@algolia/autocomplete-core': 1.19.8(@algolia/client-search@5.54.0)(algoliasearch@5.54.0)(search-insights@2.17.3) - '@docsearch/react': 4.6.3(@algolia/client-search@5.54.0)(@types/react@19.2.17)(algoliasearch@5.54.0)(react-dom@19.2.7(react@19.2.7))(react@19.2.7)(search-insights@2.17.3) - '@docusaurus/core': 3.10.1(@mdx-js/react@3.1.1(@types/react@19.2.17)(react@19.2.7))(postcss@8.5.15)(react-dom@19.2.7(react@19.2.7))(react@19.2.7)(typescript@6.0.3) - '@docusaurus/logger': 3.10.1 - '@docusaurus/plugin-content-docs': 3.10.1(@mdx-js/react@3.1.1(@types/react@19.2.17)(react@19.2.7))(postcss@8.5.15)(react-dom@19.2.7(react@19.2.7))(react@19.2.7)(typescript@6.0.3) - '@docusaurus/theme-common': 3.10.1(@docusaurus/plugin-content-docs@3.10.1(@mdx-js/react@3.1.1(@types/react@19.2.17)(react@19.2.7))(postcss@8.5.15)(react-dom@19.2.7(react@19.2.7))(react@19.2.7)(typescript@6.0.3))(postcss@8.5.15)(react-dom@19.2.7(react@19.2.7))(react@19.2.7) - '@docusaurus/theme-translations': 3.10.1 - '@docusaurus/utils': 3.10.1(postcss@8.5.15)(react-dom@19.2.7(react@19.2.7))(react@19.2.7) - '@docusaurus/utils-validation': 3.10.1(postcss@8.5.15)(react-dom@19.2.7(react@19.2.7))(react@19.2.7) - algoliasearch: 5.54.0 - algoliasearch-helper: 3.29.1(algoliasearch@5.54.0) + '@algolia/autocomplete-core': 1.19.9(@algolia/client-search@5.56.0)(algoliasearch@5.56.0)(search-insights@2.17.3) + '@docsearch/react': 4.6.3(@algolia/client-search@5.56.0)(@types/react@19.2.18)(algoliasearch@5.56.0)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(search-insights@2.17.3) + '@docusaurus/core': 3.10.2(@mdx-js/react@3.1.1(@types/react@19.2.18)(react@19.2.8))(@swc/core@1.15.47(@swc/helpers@0.5.23))(@typescript/typescript6@6.0.2)(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(debug@4.4.3(supports-color@8.1.1))(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3) + '@docusaurus/logger': 3.10.2 + '@docusaurus/plugin-content-docs': 3.10.2(@mdx-js/react@3.1.1(@types/react@19.2.18)(react@19.2.8))(@swc/core@1.15.47(@swc/helpers@0.5.23))(@typescript/typescript6@6.0.2)(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(debug@4.4.3(supports-color@8.1.1))(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3) + '@docusaurus/theme-common': 3.10.2(@docusaurus/plugin-content-docs@3.10.2(@mdx-js/react@3.1.1(@types/react@19.2.18)(react@19.2.8))(@swc/core@1.15.47(@swc/helpers@0.5.23))(@typescript/typescript6@6.0.2)(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(debug@4.4.3(supports-color@8.1.1))(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3))(@swc/core@1.15.47(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3) + '@docusaurus/theme-translations': 3.10.2 + '@docusaurus/utils': 3.10.2(@swc/core@1.15.47(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3) + '@docusaurus/utils-validation': 3.10.2(@swc/core@1.15.47(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3) + algoliasearch: 5.56.0 + algoliasearch-helper: 3.29.2(algoliasearch@5.56.0) clsx: 2.1.1 eta: 2.2.0 - fs-extra: 11.3.5 + fs-extra: 11.3.6 lodash: 4.18.1 - react: 19.2.7 - react-dom: 19.2.7(react@19.2.7) + react: 19.2.8 + react-dom: 19.2.8(react@19.2.8) tslib: 2.8.1 utility-types: 3.11.0 transitivePeerDependencies: @@ -15297,26 +15243,26 @@ snapshots: - utf-8-validate - webpack-cli - '@docusaurus/theme-translations@3.10.1': + '@docusaurus/theme-translations@3.10.2': dependencies: - fs-extra: 11.3.5 + fs-extra: 11.3.6 tslib: 2.8.1 - '@docusaurus/tsconfig@3.10.1': {} + '@docusaurus/tsconfig@3.10.2': {} - '@docusaurus/types@3.10.1(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.15))(html-minifier-terser@7.2.0)(postcss@8.5.15)(react-dom@19.2.7(react@19.2.7))(react@19.2.7)': + '@docusaurus/types@3.10.2(@swc/core@1.15.47(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3)': dependencies: - '@mdx-js/mdx': 3.1.1 + '@mdx-js/mdx': 3.1.1(supports-color@8.1.1) '@types/history': 4.7.11 '@types/mdast': 4.0.4 - '@types/react': 19.2.17 + '@types/react': 19.2.18 commander: 5.1.0 joi: 17.13.4 - react: 19.2.7 - react-dom: 19.2.7(react@19.2.7) - react-helmet-async: '@slorber/react-helmet-async@1.3.0(react-dom@19.2.7(react@19.2.7))(react@19.2.7)' + react: 19.2.8 + react-dom: 19.2.8(react@19.2.8) + react-helmet-async: '@slorber/react-helmet-async@1.3.0(react-dom@19.2.8(react@19.2.8))(react@19.2.8)' utility-types: 3.11.0 - webpack: 5.107.2(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.15))(html-minifier-terser@7.2.0)(postcss@8.5.15) + webpack: 5.108.4(@swc/core@1.15.47(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(uglify-js@3.19.3) webpack-merge: 5.10.0 transitivePeerDependencies: - '@minify-html/node' @@ -15334,39 +15280,9 @@ snapshots: - uglify-js - webpack-cli - '@docusaurus/types@3.10.1(postcss@8.5.15)(react-dom@19.2.7(react@19.2.7))(react@19.2.7)': + '@docusaurus/utils-common@3.10.2(@swc/core@1.15.47(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3)': dependencies: - '@mdx-js/mdx': 3.1.1 - '@types/history': 4.7.11 - '@types/mdast': 4.0.4 - '@types/react': 19.2.17 - commander: 5.1.0 - joi: 17.13.4 - react: 19.2.7 - react-dom: 19.2.7(react@19.2.7) - react-helmet-async: '@slorber/react-helmet-async@1.3.0(react-dom@19.2.7(react@19.2.7))(react@19.2.7)' - utility-types: 3.11.0 - webpack: 5.107.2(postcss@8.5.15) - webpack-merge: 5.10.0 - transitivePeerDependencies: - - '@minify-html/node' - - '@swc/core' - - '@swc/css' - - '@swc/html' - - clean-css - - cssnano - - csso - - esbuild - - html-minifier-terser - - lightningcss - - postcss - - supports-color - - uglify-js - - webpack-cli - - '@docusaurus/utils-common@3.10.1(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.15))(html-minifier-terser@7.2.0)(postcss@8.5.15)(react-dom@19.2.7(react@19.2.7))(react@19.2.7)': - dependencies: - '@docusaurus/types': 3.10.1(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.15))(html-minifier-terser@7.2.0)(postcss@8.5.15)(react-dom@19.2.7(react@19.2.7))(react@19.2.7) + '@docusaurus/types': 3.10.2(@swc/core@1.15.47(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3) tslib: 2.8.1 transitivePeerDependencies: - '@minify-html/node' @@ -15386,36 +15302,14 @@ snapshots: - uglify-js - webpack-cli - '@docusaurus/utils-common@3.10.1(postcss@8.5.15)(react-dom@19.2.7(react@19.2.7))(react@19.2.7)': + '@docusaurus/utils-validation@3.10.2(@swc/core@1.15.47(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3)': dependencies: - '@docusaurus/types': 3.10.1(postcss@8.5.15)(react-dom@19.2.7(react@19.2.7))(react@19.2.7) - tslib: 2.8.1 - transitivePeerDependencies: - - '@minify-html/node' - - '@swc/core' - - '@swc/css' - - '@swc/html' - - clean-css - - cssnano - - csso - - esbuild - - html-minifier-terser - - lightningcss - - postcss - - react - - react-dom - - supports-color - - uglify-js - - webpack-cli - - '@docusaurus/utils-validation@3.10.1(postcss@8.5.15)(react-dom@19.2.7(react@19.2.7))(react@19.2.7)': - dependencies: - '@docusaurus/logger': 3.10.1 - '@docusaurus/utils': 3.10.1(postcss@8.5.15)(react-dom@19.2.7(react@19.2.7))(react@19.2.7) - '@docusaurus/utils-common': 3.10.1(postcss@8.5.15)(react-dom@19.2.7(react@19.2.7))(react@19.2.7) - fs-extra: 11.3.5 + '@docusaurus/logger': 3.10.2 + '@docusaurus/utils': 3.10.2(@swc/core@1.15.47(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3) + '@docusaurus/utils-common': 3.10.2(@swc/core@1.15.47(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3) + fs-extra: 11.3.6 joi: 17.13.4 - js-yaml: 4.2.0 + js-yaml: 4.3.0 lodash: 4.18.1 tslib: 2.8.1 transitivePeerDependencies: @@ -15436,29 +15330,29 @@ snapshots: - uglify-js - webpack-cli - '@docusaurus/utils@3.10.1(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.15))(html-minifier-terser@7.2.0)(postcss@8.5.15)(react-dom@19.2.7(react@19.2.7))(react@19.2.7)': + '@docusaurus/utils@3.10.2(@swc/core@1.15.47(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3)': dependencies: - '@docusaurus/logger': 3.10.1 - '@docusaurus/types': 3.10.1(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.15))(html-minifier-terser@7.2.0)(postcss@8.5.15)(react-dom@19.2.7(react@19.2.7))(react@19.2.7) - '@docusaurus/utils-common': 3.10.1(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.15))(html-minifier-terser@7.2.0)(postcss@8.5.15)(react-dom@19.2.7(react@19.2.7))(react@19.2.7) + '@11ty/gray-matter': 1.0.0 + '@docusaurus/logger': 3.10.2 + '@docusaurus/types': 3.10.2(@swc/core@1.15.47(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3) + '@docusaurus/utils-common': 3.10.2(@swc/core@1.15.47(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3) escape-string-regexp: 4.0.0 execa: 5.1.1 - file-loader: 6.2.0(webpack@5.107.2(postcss@8.5.15)) - fs-extra: 11.3.5 + file-loader: 6.2.0(webpack@5.108.4(@swc/core@1.15.47(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(uglify-js@3.19.3)) + fs-extra: 11.3.6 github-slugger: 1.5.0 globby: 11.1.0 - gray-matter: 4.0.3 jiti: 1.21.7 - js-yaml: 4.2.0 + js-yaml: 4.3.0 lodash: 4.18.1 micromatch: 4.0.8 p-queue: 6.6.2 prompts: 2.4.2 resolve-pathname: 3.0.0 tslib: 2.8.1 - url-loader: 4.1.1(file-loader@6.2.0(webpack@5.107.2(postcss@8.5.15)))(webpack@5.107.2(postcss@8.5.15)) + url-loader: 4.1.1(file-loader@6.2.0(webpack@5.108.4(@swc/core@1.15.47(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(uglify-js@3.19.3)))(webpack@5.108.4(@swc/core@1.15.47(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(uglify-js@3.19.3)) utility-types: 3.11.0 - webpack: 5.107.2(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.15))(html-minifier-terser@7.2.0)(postcss@8.5.15) + webpack: 5.108.4(@swc/core@1.15.47(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(uglify-js@3.19.3) transitivePeerDependencies: - '@minify-html/node' - '@swc/core' @@ -15477,78 +15371,18 @@ snapshots: - uglify-js - webpack-cli - '@docusaurus/utils@3.10.1(postcss@8.5.15)(react-dom@19.2.7(react@19.2.7))(react@19.2.7)': - dependencies: - '@docusaurus/logger': 3.10.1 - '@docusaurus/types': 3.10.1(postcss@8.5.15)(react-dom@19.2.7(react@19.2.7))(react@19.2.7) - '@docusaurus/utils-common': 3.10.1(postcss@8.5.15)(react-dom@19.2.7(react@19.2.7))(react@19.2.7) - escape-string-regexp: 4.0.0 - execa: 5.1.1 - file-loader: 6.2.0(webpack@5.107.2(postcss@8.5.15)) - fs-extra: 11.3.5 - github-slugger: 1.5.0 - globby: 11.1.0 - gray-matter: 4.0.3 - jiti: 1.21.7 - js-yaml: 4.2.0 - lodash: 4.18.1 - micromatch: 4.0.8 - p-queue: 6.6.2 - prompts: 2.4.2 - resolve-pathname: 3.0.0 - tslib: 2.8.1 - url-loader: 4.1.1(file-loader@6.2.0(webpack@5.107.2(postcss@8.5.15)))(webpack@5.107.2(postcss@8.5.15)) - utility-types: 3.11.0 - webpack: 5.107.2(postcss@8.5.15) - transitivePeerDependencies: - - '@minify-html/node' - - '@swc/core' - - '@swc/css' - - '@swc/html' - - clean-css - - cssnano - - csso - - esbuild - - html-minifier-terser - - lightningcss - - postcss - - react - - react-dom - - supports-color - - uglify-js - - webpack-cli - - '@emnapi/core@1.10.0': - dependencies: - '@emnapi/wasi-threads': 1.2.1 - tslib: 2.8.1 - optional: true - - '@emnapi/runtime@1.10.0': - dependencies: - tslib: 2.8.1 - optional: true - '@emnapi/runtime@1.11.1': dependencies: tslib: 2.8.1 optional: true - '@emnapi/wasi-threads@1.2.1': - dependencies: - tslib: 2.8.1 - optional: true - '@esbuild/aix-ppc64@0.19.12': optional: true '@esbuild/aix-ppc64@0.27.4': optional: true - '@esbuild/aix-ppc64@0.27.7': - optional: true - - '@esbuild/aix-ppc64@0.28.1': + '@esbuild/aix-ppc64@0.28.2': optional: true '@esbuild/android-arm64@0.19.12': @@ -15557,10 +15391,7 @@ snapshots: '@esbuild/android-arm64@0.27.4': optional: true - '@esbuild/android-arm64@0.27.7': - optional: true - - '@esbuild/android-arm64@0.28.1': + '@esbuild/android-arm64@0.28.2': optional: true '@esbuild/android-arm@0.19.12': @@ -15569,10 +15400,7 @@ snapshots: '@esbuild/android-arm@0.27.4': optional: true - '@esbuild/android-arm@0.27.7': - optional: true - - '@esbuild/android-arm@0.28.1': + '@esbuild/android-arm@0.28.2': optional: true '@esbuild/android-x64@0.19.12': @@ -15581,10 +15409,7 @@ snapshots: '@esbuild/android-x64@0.27.4': optional: true - '@esbuild/android-x64@0.27.7': - optional: true - - '@esbuild/android-x64@0.28.1': + '@esbuild/android-x64@0.28.2': optional: true '@esbuild/darwin-arm64@0.19.12': @@ -15593,10 +15418,7 @@ snapshots: '@esbuild/darwin-arm64@0.27.4': optional: true - '@esbuild/darwin-arm64@0.27.7': - optional: true - - '@esbuild/darwin-arm64@0.28.1': + '@esbuild/darwin-arm64@0.28.2': optional: true '@esbuild/darwin-x64@0.19.12': @@ -15605,10 +15427,7 @@ snapshots: '@esbuild/darwin-x64@0.27.4': optional: true - '@esbuild/darwin-x64@0.27.7': - optional: true - - '@esbuild/darwin-x64@0.28.1': + '@esbuild/darwin-x64@0.28.2': optional: true '@esbuild/freebsd-arm64@0.19.12': @@ -15617,10 +15436,7 @@ snapshots: '@esbuild/freebsd-arm64@0.27.4': optional: true - '@esbuild/freebsd-arm64@0.27.7': - optional: true - - '@esbuild/freebsd-arm64@0.28.1': + '@esbuild/freebsd-arm64@0.28.2': optional: true '@esbuild/freebsd-x64@0.19.12': @@ -15629,10 +15445,7 @@ snapshots: '@esbuild/freebsd-x64@0.27.4': optional: true - '@esbuild/freebsd-x64@0.27.7': - optional: true - - '@esbuild/freebsd-x64@0.28.1': + '@esbuild/freebsd-x64@0.28.2': optional: true '@esbuild/linux-arm64@0.19.12': @@ -15641,10 +15454,7 @@ snapshots: '@esbuild/linux-arm64@0.27.4': optional: true - '@esbuild/linux-arm64@0.27.7': - optional: true - - '@esbuild/linux-arm64@0.28.1': + '@esbuild/linux-arm64@0.28.2': optional: true '@esbuild/linux-arm@0.19.12': @@ -15653,10 +15463,7 @@ snapshots: '@esbuild/linux-arm@0.27.4': optional: true - '@esbuild/linux-arm@0.27.7': - optional: true - - '@esbuild/linux-arm@0.28.1': + '@esbuild/linux-arm@0.28.2': optional: true '@esbuild/linux-ia32@0.19.12': @@ -15665,10 +15472,7 @@ snapshots: '@esbuild/linux-ia32@0.27.4': optional: true - '@esbuild/linux-ia32@0.27.7': - optional: true - - '@esbuild/linux-ia32@0.28.1': + '@esbuild/linux-ia32@0.28.2': optional: true '@esbuild/linux-loong64@0.19.12': @@ -15677,10 +15481,7 @@ snapshots: '@esbuild/linux-loong64@0.27.4': optional: true - '@esbuild/linux-loong64@0.27.7': - optional: true - - '@esbuild/linux-loong64@0.28.1': + '@esbuild/linux-loong64@0.28.2': optional: true '@esbuild/linux-mips64el@0.19.12': @@ -15689,10 +15490,7 @@ snapshots: '@esbuild/linux-mips64el@0.27.4': optional: true - '@esbuild/linux-mips64el@0.27.7': - optional: true - - '@esbuild/linux-mips64el@0.28.1': + '@esbuild/linux-mips64el@0.28.2': optional: true '@esbuild/linux-ppc64@0.19.12': @@ -15701,10 +15499,7 @@ snapshots: '@esbuild/linux-ppc64@0.27.4': optional: true - '@esbuild/linux-ppc64@0.27.7': - optional: true - - '@esbuild/linux-ppc64@0.28.1': + '@esbuild/linux-ppc64@0.28.2': optional: true '@esbuild/linux-riscv64@0.19.12': @@ -15713,10 +15508,7 @@ snapshots: '@esbuild/linux-riscv64@0.27.4': optional: true - '@esbuild/linux-riscv64@0.27.7': - optional: true - - '@esbuild/linux-riscv64@0.28.1': + '@esbuild/linux-riscv64@0.28.2': optional: true '@esbuild/linux-s390x@0.19.12': @@ -15725,10 +15517,7 @@ snapshots: '@esbuild/linux-s390x@0.27.4': optional: true - '@esbuild/linux-s390x@0.27.7': - optional: true - - '@esbuild/linux-s390x@0.28.1': + '@esbuild/linux-s390x@0.28.2': optional: true '@esbuild/linux-x64@0.19.12': @@ -15737,19 +15526,13 @@ snapshots: '@esbuild/linux-x64@0.27.4': optional: true - '@esbuild/linux-x64@0.27.7': - optional: true - - '@esbuild/linux-x64@0.28.1': + '@esbuild/linux-x64@0.28.2': optional: true '@esbuild/netbsd-arm64@0.27.4': optional: true - '@esbuild/netbsd-arm64@0.27.7': - optional: true - - '@esbuild/netbsd-arm64@0.28.1': + '@esbuild/netbsd-arm64@0.28.2': optional: true '@esbuild/netbsd-x64@0.19.12': @@ -15758,19 +15541,13 @@ snapshots: '@esbuild/netbsd-x64@0.27.4': optional: true - '@esbuild/netbsd-x64@0.27.7': - optional: true - - '@esbuild/netbsd-x64@0.28.1': + '@esbuild/netbsd-x64@0.28.2': optional: true '@esbuild/openbsd-arm64@0.27.4': optional: true - '@esbuild/openbsd-arm64@0.27.7': - optional: true - - '@esbuild/openbsd-arm64@0.28.1': + '@esbuild/openbsd-arm64@0.28.2': optional: true '@esbuild/openbsd-x64@0.19.12': @@ -15779,19 +15556,13 @@ snapshots: '@esbuild/openbsd-x64@0.27.4': optional: true - '@esbuild/openbsd-x64@0.27.7': - optional: true - - '@esbuild/openbsd-x64@0.28.1': + '@esbuild/openbsd-x64@0.28.2': optional: true '@esbuild/openharmony-arm64@0.27.4': optional: true - '@esbuild/openharmony-arm64@0.27.7': - optional: true - - '@esbuild/openharmony-arm64@0.28.1': + '@esbuild/openharmony-arm64@0.28.2': optional: true '@esbuild/sunos-x64@0.19.12': @@ -15800,10 +15571,7 @@ snapshots: '@esbuild/sunos-x64@0.27.4': optional: true - '@esbuild/sunos-x64@0.27.7': - optional: true - - '@esbuild/sunos-x64@0.28.1': + '@esbuild/sunos-x64@0.28.2': optional: true '@esbuild/win32-arm64@0.19.12': @@ -15812,10 +15580,7 @@ snapshots: '@esbuild/win32-arm64@0.27.4': optional: true - '@esbuild/win32-arm64@0.27.7': - optional: true - - '@esbuild/win32-arm64@0.28.1': + '@esbuild/win32-arm64@0.28.2': optional: true '@esbuild/win32-ia32@0.19.12': @@ -15824,10 +15589,7 @@ snapshots: '@esbuild/win32-ia32@0.27.4': optional: true - '@esbuild/win32-ia32@0.27.7': - optional: true - - '@esbuild/win32-ia32@0.28.1': + '@esbuild/win32-ia32@0.28.2': optional: true '@esbuild/win32-x64@0.19.12': @@ -15836,28 +15598,25 @@ snapshots: '@esbuild/win32-x64@0.27.4': optional: true - '@esbuild/win32-x64@0.27.7': + '@esbuild/win32-x64@0.28.2': optional: true - '@esbuild/win32-x64@0.28.1': - optional: true - - '@eslint-community/eslint-utils@4.9.1(eslint@10.5.0(jiti@2.7.0))': + '@eslint-community/eslint-utils@4.10.1(eslint@10.8.0(jiti@2.7.0)(supports-color@8.1.1))': dependencies: - eslint: 10.5.0(jiti@2.7.0) + eslint: 10.8.0(jiti@2.7.0)(supports-color@8.1.1) eslint-visitor-keys: 3.4.3 '@eslint-community/regexpp@4.12.2': {} - '@eslint/config-array@0.23.5': + '@eslint/config-array@0.23.5(supports-color@8.1.1)': dependencies: '@eslint/object-schema': 3.0.5 - debug: 4.4.3 - minimatch: 10.2.5 + debug: 4.4.3(supports-color@8.1.1) + minimatch: 10.2.6 transitivePeerDependencies: - supports-color - '@eslint/config-helpers@0.6.0': + '@eslint/config-helpers@0.7.0': dependencies: '@eslint/core': 1.2.1 @@ -15865,14 +15624,14 @@ snapshots: dependencies: '@types/json-schema': 7.0.15 - '@eslint/css-tree@4.0.4': + '@eslint/css-tree@4.0.5': dependencies: - mdn-data: 2.28.1 + mdn-data: 2.29.0 source-map-js: 1.2.1 - '@eslint/js@10.0.1(eslint@10.5.0(jiti@2.7.0))': + '@eslint/js@10.0.1(eslint@10.8.0(jiti@2.7.0)(supports-color@8.1.1))': optionalDependencies: - eslint: 10.5.0(jiti@2.7.0) + eslint: 10.8.0(jiti@2.7.0)(supports-color@8.1.1) '@eslint/object-schema@3.0.5': {} @@ -15887,23 +15646,23 @@ snapshots: dependencies: urlpattern-polyfill: 8.0.2 - '@faker-js/faker@10.4.0': {} + '@faker-js/faker@10.5.0': {} '@fig/complete-commander@3.2.0(commander@11.1.0)': dependencies: commander: 11.1.0 - prettier: 3.8.4 + prettier: 3.9.6 - '@floating-ui/core@1.7.5': + '@floating-ui/core@1.8.0': dependencies: - '@floating-ui/utils': 0.2.11 + '@floating-ui/utils': 0.2.12 - '@floating-ui/dom@1.7.6': + '@floating-ui/dom@1.8.0': dependencies: - '@floating-ui/core': 1.7.5 - '@floating-ui/utils': 0.2.11 + '@floating-ui/core': 1.8.0 + '@floating-ui/utils': 0.2.12 - '@floating-ui/utils@0.2.11': {} + '@floating-ui/utils@0.2.12': {} '@formatjs/ecma402-abstract@2.3.6': dependencies: @@ -15916,7 +15675,7 @@ snapshots: dependencies: tslib: 2.8.1 - '@formatjs/fast-memoize@3.1.6': {} + '@formatjs/fast-memoize@3.1.7': {} '@formatjs/icu-messageformat-parser@2.11.4': dependencies: @@ -15924,35 +15683,35 @@ snapshots: '@formatjs/icu-skeleton-parser': 1.8.16 tslib: 2.8.1 - '@formatjs/icu-messageformat-parser@3.5.11': + '@formatjs/icu-messageformat-parser@3.5.16': dependencies: - '@formatjs/icu-skeleton-parser': 2.1.10 + '@formatjs/icu-skeleton-parser': 2.1.11 '@formatjs/icu-skeleton-parser@1.8.16': dependencies: '@formatjs/ecma402-abstract': 2.3.6 tslib: 2.8.1 - '@formatjs/icu-skeleton-parser@2.1.10': {} + '@formatjs/icu-skeleton-parser@2.1.11': {} '@formatjs/intl-localematcher@0.6.2': dependencies: tslib: 2.8.1 - '@fortawesome/fontawesome-common-types@7.2.0': {} + '@fortawesome/fontawesome-common-types@7.3.1': {} - '@fortawesome/free-regular-svg-icons@7.2.0': + '@fortawesome/free-regular-svg-icons@7.3.1': dependencies: - '@fortawesome/fontawesome-common-types': 7.2.0 + '@fortawesome/fontawesome-common-types': 7.3.1 - '@fortawesome/free-solid-svg-icons@7.2.0': + '@fortawesome/free-solid-svg-icons@7.3.1': dependencies: - '@fortawesome/fontawesome-common-types': 7.2.0 + '@fortawesome/fontawesome-common-types': 7.3.1 - '@golevelup/nestjs-discovery@5.0.0(@nestjs/common@11.1.27(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/core@11.1.27)': + '@golevelup/nestjs-discovery@5.0.0(@nestjs/common@11.1.28(reflect-metadata@0.2.2)(rxjs@7.8.2)(supports-color@8.1.1))(@nestjs/core@11.1.28)': dependencies: - '@nestjs/common': 11.1.27(reflect-metadata@0.2.2)(rxjs@7.8.2) - '@nestjs/core': 11.1.27(@nestjs/common@11.1.27(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/platform-express@11.1.27)(@nestjs/websockets@11.1.27)(reflect-metadata@0.2.2)(rxjs@7.8.2) + '@nestjs/common': 11.1.28(reflect-metadata@0.2.2)(rxjs@7.8.2)(supports-color@8.1.1) + '@nestjs/core': 11.1.28(@nestjs/common@11.1.28(reflect-metadata@0.2.2)(rxjs@7.8.2)(supports-color@8.1.1))(@nestjs/platform-express@11.1.28)(@nestjs/websockets@11.1.28)(reflect-metadata@0.2.2)(rxjs@7.8.2) lodash: 4.18.1 '@grpc/grpc-js@1.14.4': @@ -15964,15 +15723,15 @@ snapshots: dependencies: lodash.camelcase: 4.3.0 long: 5.3.2 - protobufjs: 7.6.4 - yargs: 17.7.2 + protobufjs: 7.6.5 + yargs: 17.7.3 '@grpc/proto-loader@0.8.1': dependencies: lodash.camelcase: 4.3.0 long: 5.3.2 - protobufjs: 7.6.4 - yargs: 17.7.2 + protobufjs: 7.6.5 + yargs: 17.7.3 '@hapi/hoek@9.3.0': {} @@ -15998,7 +15757,7 @@ snapshots: '@iconify/types@2.0.0': {} - '@iconify/utils@3.1.3': + '@iconify/utils@3.1.4': dependencies: '@antfu/install-pkg': 1.1.0 '@iconify/types': 2.0.0 @@ -16108,162 +15867,163 @@ snapshots: graph-data-structure: 4.5.0 kysely: 0.28.17 kysely-postgres-js: 3.0.0(kysely@0.28.17)(postgres@3.4.9) - pg-connection-string: 2.13.0 + pg-connection-string: 2.14.0 postgres: 3.4.9 - '@immich/ui@0.81.1(@sveltejs/kit@2.65.1(@opentelemetry/api@1.9.1)(@sveltejs/vite-plugin-svelte@7.1.2(svelte@5.56.3(@typescript-eslint/types@8.61.0))(vite@8.0.16(@types/node@24.13.2)(esbuild@0.28.1)(jiti@2.7.0)(sass@1.101.0)(terser@5.48.0)(tsx@4.22.4)(yaml@2.9.0)))(svelte@5.56.3(@typescript-eslint/types@8.61.0))(typescript@6.0.3)(vite@8.0.16(@types/node@24.13.2)(esbuild@0.28.1)(jiti@2.7.0)(sass@1.101.0)(terser@5.48.0)(tsx@4.22.4)(yaml@2.9.0)))(svelte@5.56.3(@typescript-eslint/types@8.61.0))': + '@immich/ui@0.85.0(@sveltejs/kit@2.70.2(@opentelemetry/api@1.9.1)(@sveltejs/vite-plugin-svelte@7.2.0(svelte@5.56.8(@typescript-eslint/types@8.66.0))(vite@8.2.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(sass@1.102.0)(terser@5.49.0)(tsx@4.23.9)(yaml@2.9.0)))(@typescript/typescript6@6.0.2)(svelte@5.56.8(@typescript-eslint/types@8.66.0))(vite@8.2.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(sass@1.102.0)(terser@5.49.0)(tsx@4.23.9)(yaml@2.9.0)))(svelte@5.56.8(@typescript-eslint/types@8.66.0))': dependencies: '@internationalized/date': 3.12.2 '@mdi/js': 7.4.47 - '@sveltejs/kit': 2.65.1(@opentelemetry/api@1.9.1)(@sveltejs/vite-plugin-svelte@7.1.2(svelte@5.56.3(@typescript-eslint/types@8.61.0))(vite@8.0.16(@types/node@24.13.2)(esbuild@0.28.1)(jiti@2.7.0)(sass@1.101.0)(terser@5.48.0)(tsx@4.22.4)(yaml@2.9.0)))(svelte@5.56.3(@typescript-eslint/types@8.61.0))(typescript@6.0.3)(vite@8.0.16(@types/node@24.13.2)(esbuild@0.28.1)(jiti@2.7.0)(sass@1.101.0)(terser@5.48.0)(tsx@4.22.4)(yaml@2.9.0)) - bits-ui: 2.18.1(@internationalized/date@3.12.2)(@sveltejs/kit@2.65.1(@opentelemetry/api@1.9.1)(@sveltejs/vite-plugin-svelte@7.1.2(svelte@5.56.3(@typescript-eslint/types@8.61.0))(vite@8.0.16(@types/node@24.13.2)(esbuild@0.28.1)(jiti@2.7.0)(sass@1.101.0)(terser@5.48.0)(tsx@4.22.4)(yaml@2.9.0)))(svelte@5.56.3(@typescript-eslint/types@8.61.0))(typescript@6.0.3)(vite@8.0.16(@types/node@24.13.2)(esbuild@0.28.1)(jiti@2.7.0)(sass@1.101.0)(terser@5.48.0)(tsx@4.22.4)(yaml@2.9.0)))(svelte@5.56.3(@typescript-eslint/types@8.61.0)) + '@sveltejs/kit': 2.70.2(@opentelemetry/api@1.9.1)(@sveltejs/vite-plugin-svelte@7.2.0(svelte@5.56.8(@typescript-eslint/types@8.66.0))(vite@8.2.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(sass@1.102.0)(terser@5.49.0)(tsx@4.23.9)(yaml@2.9.0)))(@typescript/typescript6@6.0.2)(svelte@5.56.8(@typescript-eslint/types@8.66.0))(vite@8.2.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(sass@1.102.0)(terser@5.49.0)(tsx@4.23.9)(yaml@2.9.0)) + bits-ui: 2.18.1(@internationalized/date@3.12.2)(@sveltejs/kit@2.70.2(@opentelemetry/api@1.9.1)(@sveltejs/vite-plugin-svelte@7.2.0(svelte@5.56.8(@typescript-eslint/types@8.66.0))(vite@8.2.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(sass@1.102.0)(terser@5.49.0)(tsx@4.23.9)(yaml@2.9.0)))(@typescript/typescript6@6.0.2)(svelte@5.56.8(@typescript-eslint/types@8.66.0))(vite@8.2.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(sass@1.102.0)(terser@5.49.0)(tsx@4.23.9)(yaml@2.9.0)))(svelte@5.56.8(@typescript-eslint/types@8.66.0)) + fuse.js: 7.5.0 luxon: 3.7.2 - simple-icons: 16.23.0 - svelte: 5.56.3(@typescript-eslint/types@8.61.0) + simple-icons: 16.28.0 + svelte: 5.56.8(@typescript-eslint/types@8.66.0) svelte-highlight: 7.11.0 tailwind-merge: 3.6.0 - tailwind-variants: 3.2.2(tailwind-merge@3.6.0)(tailwindcss@4.3.1) - tailwindcss: 4.3.1 + tailwind-variants: 3.3.1(tailwind-merge@3.6.0)(tailwindcss@4.3.3) + tailwindcss: 4.3.3 '@inquirer/ansi@1.0.2': {} - '@inquirer/checkbox@4.3.2(@types/node@24.13.2)': + '@inquirer/checkbox@4.3.2(@types/node@24.13.3)': dependencies: '@inquirer/ansi': 1.0.2 - '@inquirer/core': 10.3.2(@types/node@24.13.2) + '@inquirer/core': 10.3.2(@types/node@24.13.3) '@inquirer/figures': 1.0.15 - '@inquirer/type': 3.0.10(@types/node@24.13.2) + '@inquirer/type': 3.0.10(@types/node@24.13.3) yoctocolors-cjs: 2.1.3 optionalDependencies: - '@types/node': 24.13.2 + '@types/node': 24.13.3 - '@inquirer/confirm@5.1.21(@types/node@24.13.2)': + '@inquirer/confirm@5.1.21(@types/node@24.13.3)': dependencies: - '@inquirer/core': 10.3.2(@types/node@24.13.2) - '@inquirer/type': 3.0.10(@types/node@24.13.2) + '@inquirer/core': 10.3.2(@types/node@24.13.3) + '@inquirer/type': 3.0.10(@types/node@24.13.3) optionalDependencies: - '@types/node': 24.13.2 + '@types/node': 24.13.3 - '@inquirer/core@10.3.2(@types/node@24.13.2)': + '@inquirer/core@10.3.2(@types/node@24.13.3)': dependencies: '@inquirer/ansi': 1.0.2 '@inquirer/figures': 1.0.15 - '@inquirer/type': 3.0.10(@types/node@24.13.2) + '@inquirer/type': 3.0.10(@types/node@24.13.3) cli-width: 4.1.0 mute-stream: 2.0.0 signal-exit: 4.1.0 wrap-ansi: 6.2.0 yoctocolors-cjs: 2.1.3 optionalDependencies: - '@types/node': 24.13.2 + '@types/node': 24.13.3 - '@inquirer/editor@4.2.23(@types/node@24.13.2)': + '@inquirer/editor@4.2.23(@types/node@24.13.3)': dependencies: - '@inquirer/core': 10.3.2(@types/node@24.13.2) - '@inquirer/external-editor': 1.0.3(@types/node@24.13.2) - '@inquirer/type': 3.0.10(@types/node@24.13.2) + '@inquirer/core': 10.3.2(@types/node@24.13.3) + '@inquirer/external-editor': 1.0.3(@types/node@24.13.3) + '@inquirer/type': 3.0.10(@types/node@24.13.3) optionalDependencies: - '@types/node': 24.13.2 + '@types/node': 24.13.3 - '@inquirer/expand@4.0.23(@types/node@24.13.2)': + '@inquirer/expand@4.0.23(@types/node@24.13.3)': dependencies: - '@inquirer/core': 10.3.2(@types/node@24.13.2) - '@inquirer/type': 3.0.10(@types/node@24.13.2) + '@inquirer/core': 10.3.2(@types/node@24.13.3) + '@inquirer/type': 3.0.10(@types/node@24.13.3) yoctocolors-cjs: 2.1.3 optionalDependencies: - '@types/node': 24.13.2 + '@types/node': 24.13.3 - '@inquirer/external-editor@1.0.3(@types/node@24.13.2)': + '@inquirer/external-editor@1.0.3(@types/node@24.13.3)': dependencies: chardet: 2.1.1 - iconv-lite: 0.7.2 + iconv-lite: 0.7.3 optionalDependencies: - '@types/node': 24.13.2 + '@types/node': 24.13.3 '@inquirer/figures@1.0.15': {} - '@inquirer/input@4.3.1(@types/node@24.13.2)': + '@inquirer/input@4.3.1(@types/node@24.13.3)': dependencies: - '@inquirer/core': 10.3.2(@types/node@24.13.2) - '@inquirer/type': 3.0.10(@types/node@24.13.2) + '@inquirer/core': 10.3.2(@types/node@24.13.3) + '@inquirer/type': 3.0.10(@types/node@24.13.3) optionalDependencies: - '@types/node': 24.13.2 + '@types/node': 24.13.3 - '@inquirer/number@3.0.23(@types/node@24.13.2)': + '@inquirer/number@3.0.23(@types/node@24.13.3)': dependencies: - '@inquirer/core': 10.3.2(@types/node@24.13.2) - '@inquirer/type': 3.0.10(@types/node@24.13.2) + '@inquirer/core': 10.3.2(@types/node@24.13.3) + '@inquirer/type': 3.0.10(@types/node@24.13.3) optionalDependencies: - '@types/node': 24.13.2 + '@types/node': 24.13.3 - '@inquirer/password@4.0.23(@types/node@24.13.2)': + '@inquirer/password@4.0.23(@types/node@24.13.3)': dependencies: '@inquirer/ansi': 1.0.2 - '@inquirer/core': 10.3.2(@types/node@24.13.2) - '@inquirer/type': 3.0.10(@types/node@24.13.2) + '@inquirer/core': 10.3.2(@types/node@24.13.3) + '@inquirer/type': 3.0.10(@types/node@24.13.3) optionalDependencies: - '@types/node': 24.13.2 + '@types/node': 24.13.3 - '@inquirer/prompts@7.10.1(@types/node@24.13.2)': + '@inquirer/prompts@7.10.1(@types/node@24.13.3)': dependencies: - '@inquirer/checkbox': 4.3.2(@types/node@24.13.2) - '@inquirer/confirm': 5.1.21(@types/node@24.13.2) - '@inquirer/editor': 4.2.23(@types/node@24.13.2) - '@inquirer/expand': 4.0.23(@types/node@24.13.2) - '@inquirer/input': 4.3.1(@types/node@24.13.2) - '@inquirer/number': 3.0.23(@types/node@24.13.2) - '@inquirer/password': 4.0.23(@types/node@24.13.2) - '@inquirer/rawlist': 4.1.11(@types/node@24.13.2) - '@inquirer/search': 3.2.2(@types/node@24.13.2) - '@inquirer/select': 4.4.2(@types/node@24.13.2) + '@inquirer/checkbox': 4.3.2(@types/node@24.13.3) + '@inquirer/confirm': 5.1.21(@types/node@24.13.3) + '@inquirer/editor': 4.2.23(@types/node@24.13.3) + '@inquirer/expand': 4.0.23(@types/node@24.13.3) + '@inquirer/input': 4.3.1(@types/node@24.13.3) + '@inquirer/number': 3.0.23(@types/node@24.13.3) + '@inquirer/password': 4.0.23(@types/node@24.13.3) + '@inquirer/rawlist': 4.1.11(@types/node@24.13.3) + '@inquirer/search': 3.2.2(@types/node@24.13.3) + '@inquirer/select': 4.4.2(@types/node@24.13.3) optionalDependencies: - '@types/node': 24.13.2 + '@types/node': 24.13.3 - '@inquirer/prompts@7.3.2(@types/node@24.13.2)': + '@inquirer/prompts@7.3.2(@types/node@24.13.3)': dependencies: - '@inquirer/checkbox': 4.3.2(@types/node@24.13.2) - '@inquirer/confirm': 5.1.21(@types/node@24.13.2) - '@inquirer/editor': 4.2.23(@types/node@24.13.2) - '@inquirer/expand': 4.0.23(@types/node@24.13.2) - '@inquirer/input': 4.3.1(@types/node@24.13.2) - '@inquirer/number': 3.0.23(@types/node@24.13.2) - '@inquirer/password': 4.0.23(@types/node@24.13.2) - '@inquirer/rawlist': 4.1.11(@types/node@24.13.2) - '@inquirer/search': 3.2.2(@types/node@24.13.2) - '@inquirer/select': 4.4.2(@types/node@24.13.2) + '@inquirer/checkbox': 4.3.2(@types/node@24.13.3) + '@inquirer/confirm': 5.1.21(@types/node@24.13.3) + '@inquirer/editor': 4.2.23(@types/node@24.13.3) + '@inquirer/expand': 4.0.23(@types/node@24.13.3) + '@inquirer/input': 4.3.1(@types/node@24.13.3) + '@inquirer/number': 3.0.23(@types/node@24.13.3) + '@inquirer/password': 4.0.23(@types/node@24.13.3) + '@inquirer/rawlist': 4.1.11(@types/node@24.13.3) + '@inquirer/search': 3.2.2(@types/node@24.13.3) + '@inquirer/select': 4.4.2(@types/node@24.13.3) optionalDependencies: - '@types/node': 24.13.2 + '@types/node': 24.13.3 - '@inquirer/rawlist@4.1.11(@types/node@24.13.2)': + '@inquirer/rawlist@4.1.11(@types/node@24.13.3)': dependencies: - '@inquirer/core': 10.3.2(@types/node@24.13.2) - '@inquirer/type': 3.0.10(@types/node@24.13.2) + '@inquirer/core': 10.3.2(@types/node@24.13.3) + '@inquirer/type': 3.0.10(@types/node@24.13.3) yoctocolors-cjs: 2.1.3 optionalDependencies: - '@types/node': 24.13.2 + '@types/node': 24.13.3 - '@inquirer/search@3.2.2(@types/node@24.13.2)': + '@inquirer/search@3.2.2(@types/node@24.13.3)': dependencies: - '@inquirer/core': 10.3.2(@types/node@24.13.2) + '@inquirer/core': 10.3.2(@types/node@24.13.3) '@inquirer/figures': 1.0.15 - '@inquirer/type': 3.0.10(@types/node@24.13.2) + '@inquirer/type': 3.0.10(@types/node@24.13.3) yoctocolors-cjs: 2.1.3 optionalDependencies: - '@types/node': 24.13.2 + '@types/node': 24.13.3 - '@inquirer/select@4.4.2(@types/node@24.13.2)': + '@inquirer/select@4.4.2(@types/node@24.13.3)': dependencies: '@inquirer/ansi': 1.0.2 - '@inquirer/core': 10.3.2(@types/node@24.13.2) + '@inquirer/core': 10.3.2(@types/node@24.13.3) '@inquirer/figures': 1.0.15 - '@inquirer/type': 3.0.10(@types/node@24.13.2) + '@inquirer/type': 3.0.10(@types/node@24.13.3) yoctocolors-cjs: 2.1.3 optionalDependencies: - '@types/node': 24.13.2 + '@types/node': 24.13.3 - '@inquirer/type@3.0.10(@types/node@24.13.2)': + '@inquirer/type@3.0.10(@types/node@24.13.3)': optionalDependencies: - '@types/node': 24.13.2 + '@types/node': 24.13.3 '@internationalized/date@3.12.2': dependencies: @@ -16271,8 +16031,6 @@ snapshots: '@ioredis/commands@1.10.0': {} - '@ioredis/commands@1.5.1': {} - '@isaacs/cliui@8.0.2': dependencies: string-width: 5.1.2 @@ -16295,7 +16053,7 @@ snapshots: '@jest/schemas': 29.6.3 '@types/istanbul-lib-coverage': 2.0.6 '@types/istanbul-reports': 3.0.4 - '@types/node': 24.13.2 + '@types/node': 24.13.3 '@types/yargs': 17.0.35 chalk: 4.1.2 @@ -16357,58 +16115,59 @@ snapshots: dependencies: tslib: 2.8.1 - '@jsonjoy.com/fs-core@4.57.7(tslib@2.8.1)': + '@jsonjoy.com/fs-core@4.64.0(tslib@2.8.1)': dependencies: - '@jsonjoy.com/fs-node-builtins': 4.57.7(tslib@2.8.1) - '@jsonjoy.com/fs-node-utils': 4.57.7(tslib@2.8.1) + '@jsonjoy.com/fs-node-builtins': 4.64.0(tslib@2.8.1) + '@jsonjoy.com/fs-node-utils': 4.64.0(tslib@2.8.1) thingies: 2.6.0(tslib@2.8.1) tslib: 2.8.1 - '@jsonjoy.com/fs-fsa@4.57.7(tslib@2.8.1)': + '@jsonjoy.com/fs-fsa@4.64.0(tslib@2.8.1)': dependencies: - '@jsonjoy.com/fs-core': 4.57.7(tslib@2.8.1) - '@jsonjoy.com/fs-node-builtins': 4.57.7(tslib@2.8.1) - '@jsonjoy.com/fs-node-utils': 4.57.7(tslib@2.8.1) + '@jsonjoy.com/fs-core': 4.64.0(tslib@2.8.1) + '@jsonjoy.com/fs-node-builtins': 4.64.0(tslib@2.8.1) + '@jsonjoy.com/fs-node-utils': 4.64.0(tslib@2.8.1) thingies: 2.6.0(tslib@2.8.1) tslib: 2.8.1 - '@jsonjoy.com/fs-node-builtins@4.57.7(tslib@2.8.1)': + '@jsonjoy.com/fs-node-builtins@4.64.0(tslib@2.8.1)': dependencies: tslib: 2.8.1 - '@jsonjoy.com/fs-node-to-fsa@4.57.7(tslib@2.8.1)': + '@jsonjoy.com/fs-node-to-fsa@4.64.0(tslib@2.8.1)': dependencies: - '@jsonjoy.com/fs-fsa': 4.57.7(tslib@2.8.1) - '@jsonjoy.com/fs-node-builtins': 4.57.7(tslib@2.8.1) - '@jsonjoy.com/fs-node-utils': 4.57.7(tslib@2.8.1) + '@jsonjoy.com/fs-fsa': 4.64.0(tslib@2.8.1) + '@jsonjoy.com/fs-node-builtins': 4.64.0(tslib@2.8.1) + '@jsonjoy.com/fs-node-utils': 4.64.0(tslib@2.8.1) tslib: 2.8.1 - '@jsonjoy.com/fs-node-utils@4.57.7(tslib@2.8.1)': + '@jsonjoy.com/fs-node-utils@4.64.0(tslib@2.8.1)': dependencies: - '@jsonjoy.com/fs-node-builtins': 4.57.7(tslib@2.8.1) + '@jsonjoy.com/fs-node-builtins': 4.64.0(tslib@2.8.1) + glob-to-regex.js: 1.2.0(tslib@2.8.1) tslib: 2.8.1 - '@jsonjoy.com/fs-node@4.57.7(tslib@2.8.1)': + '@jsonjoy.com/fs-node@4.64.0(tslib@2.8.1)': dependencies: - '@jsonjoy.com/fs-core': 4.57.7(tslib@2.8.1) - '@jsonjoy.com/fs-node-builtins': 4.57.7(tslib@2.8.1) - '@jsonjoy.com/fs-node-utils': 4.57.7(tslib@2.8.1) - '@jsonjoy.com/fs-print': 4.57.7(tslib@2.8.1) - '@jsonjoy.com/fs-snapshot': 4.57.7(tslib@2.8.1) + '@jsonjoy.com/fs-core': 4.64.0(tslib@2.8.1) + '@jsonjoy.com/fs-node-builtins': 4.64.0(tslib@2.8.1) + '@jsonjoy.com/fs-node-utils': 4.64.0(tslib@2.8.1) + '@jsonjoy.com/fs-print': 4.64.0(tslib@2.8.1) + '@jsonjoy.com/fs-snapshot': 4.64.0(tslib@2.8.1) glob-to-regex.js: 1.2.0(tslib@2.8.1) thingies: 2.6.0(tslib@2.8.1) tslib: 2.8.1 - '@jsonjoy.com/fs-print@4.57.7(tslib@2.8.1)': + '@jsonjoy.com/fs-print@4.64.0(tslib@2.8.1)': dependencies: - '@jsonjoy.com/fs-node-utils': 4.57.7(tslib@2.8.1) + '@jsonjoy.com/fs-node-utils': 4.64.0(tslib@2.8.1) tree-dump: 1.1.0(tslib@2.8.1) tslib: 2.8.1 - '@jsonjoy.com/fs-snapshot@4.57.7(tslib@2.8.1)': + '@jsonjoy.com/fs-snapshot@4.64.0(tslib@2.8.1)': dependencies: '@jsonjoy.com/buffers': 17.67.0(tslib@2.8.1) - '@jsonjoy.com/fs-node-utils': 4.57.7(tslib@2.8.1) + '@jsonjoy.com/fs-node-utils': 4.64.0(tslib@2.8.1) '@jsonjoy.com/json-pack': 17.67.0(tslib@2.8.1) '@jsonjoy.com/util': 17.67.0(tslib@2.8.1) tslib: 2.8.1 @@ -16466,9 +16225,9 @@ snapshots: dependencies: vary: 1.1.2 - '@koa/router@15.6.0(koa@3.2.1)': + '@koa/router@15.7.0(koa@3.2.1)(supports-color@8.1.1)': dependencies: - debug: 4.4.3 + debug: 4.4.3(supports-color@8.1.1) http-errors: 2.0.1 koa: 3.2.1 koa-compose: 4.1.0 @@ -16476,20 +16235,20 @@ snapshots: transitivePeerDependencies: - supports-color - '@koddsson/eslint-plugin-tscompat@0.2.0(eslint@10.5.0(jiti@2.7.0))(typescript@6.0.3)': + '@koddsson/eslint-plugin-tscompat@0.2.0(@typescript/typescript6@6.0.2)(eslint@10.8.0(jiti@2.7.0)(supports-color@8.1.1))(supports-color@8.1.1)': dependencies: '@mdn/browser-compat-data': 6.1.5 - '@typescript-eslint/type-utils': 8.61.0(eslint@10.5.0(jiti@2.7.0))(typescript@6.0.3) - '@typescript-eslint/utils': 8.61.0(eslint@10.5.0(jiti@2.7.0))(typescript@6.0.3) - browserslist: 4.28.2 + '@typescript-eslint/type-utils': 8.66.0(@typescript/typescript6@6.0.2)(eslint@10.8.0(jiti@2.7.0)(supports-color@8.1.1))(supports-color@8.1.1) + '@typescript-eslint/utils': 8.66.0(@typescript/typescript6@6.0.2)(eslint@10.8.0(jiti@2.7.0)(supports-color@8.1.1))(supports-color@8.1.1) + browserslist: 4.28.6 transitivePeerDependencies: - eslint - supports-color - typescript - '@kwsites/file-exists@1.1.1': + '@kwsites/file-exists@1.1.1(supports-color@8.1.1)': dependencies: - debug: 4.4.3 + debug: 4.4.3(supports-color@8.1.1) transitivePeerDependencies: - supports-color @@ -16517,16 +16276,16 @@ snapshots: '@mapbox/mapbox-gl-rtl-text@0.4.0': {} - '@mapbox/node-pre-gyp@1.0.11': + '@mapbox/node-pre-gyp@1.0.11(supports-color@8.1.1)': dependencies: detect-libc: 2.1.2 - https-proxy-agent: 5.0.1 + https-proxy-agent: 5.0.1(supports-color@8.1.1) make-dir: 3.1.0 node-fetch: 2.7.0 nopt: 5.0.0 npmlog: 5.0.1 rimraf: 3.0.2 - semver: 7.8.4 + semver: 7.8.5 tar: 6.2.1 transitivePeerDependencies: - encoding @@ -16571,7 +16330,7 @@ snapshots: '@types/geojson': 7946.0.16 pbf: 5.1.0 - '@marijn/find-cluster-break@1.0.2': {} + '@marijn/find-cluster-break@1.0.3': {} '@mdi/js@7.4.47': {} @@ -16583,26 +16342,26 @@ snapshots: '@mdn/browser-compat-data@6.1.5': {} - '@mdx-js/mdx@3.1.1': + '@mdx-js/mdx@3.1.1(supports-color@8.1.1)': dependencies: '@types/estree': 1.0.9 '@types/estree-jsx': 1.0.5 - '@types/hast': 3.0.4 + '@types/hast': 3.0.5 '@types/mdx': 2.0.14 - acorn: 8.17.0 + acorn: 8.18.0 collapse-white-space: 2.1.0 devlop: 1.1.0 estree-util-is-identifier-name: 3.0.0 estree-util-scope: 1.0.0 estree-walker: 3.0.3 - hast-util-to-jsx-runtime: 2.3.6 + hast-util-to-jsx-runtime: 2.3.6(supports-color@8.1.1) markdown-extensions: 2.0.0 recma-build-jsx: 1.0.0 - recma-jsx: 1.0.1(acorn@8.17.0) + recma-jsx: 1.0.1(acorn@8.18.0) recma-stringify: 1.0.0 - rehype-recma: 1.0.0 - remark-mdx: 3.1.1 - remark-parse: 11.0.0 + rehype-recma: 1.0.0(supports-color@8.1.1) + remark-mdx: 3.1.1(supports-color@8.1.1) + remark-parse: 11.0.0(supports-color@8.1.1) remark-rehype: 11.1.2 source-map: 0.7.6 unified: 11.0.5 @@ -16613,13 +16372,13 @@ snapshots: transitivePeerDependencies: - supports-color - '@mdx-js/react@3.1.1(@types/react@19.2.17)(react@19.2.7)': + '@mdx-js/react@3.1.1(@types/react@19.2.18)(react@19.2.8)': dependencies: '@types/mdx': 2.0.14 - '@types/react': 19.2.17 - react: 19.2.7 + '@types/react': 19.2.18 + react: 19.2.8 - '@mermaid-js/parser@1.1.1': + '@mermaid-js/parser@1.2.0': dependencies: '@chevrotain/types': 11.1.2 @@ -16645,49 +16404,42 @@ snapshots: '@namnode/store@0.1.0': {} - '@napi-rs/wasm-runtime@1.1.5(@emnapi/core@1.10.0)(@emnapi/runtime@1.10.0)': + '@nestjs/bull-shared@11.0.4(@nestjs/common@11.1.28(reflect-metadata@0.2.2)(rxjs@7.8.2)(supports-color@8.1.1))(@nestjs/core@11.1.28)': dependencies: - '@emnapi/core': 1.10.0 - '@emnapi/runtime': 1.10.0 - '@tybys/wasm-util': 0.10.2 - optional: true - - '@nestjs/bull-shared@11.0.4(@nestjs/common@11.1.27(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/core@11.1.27)': - dependencies: - '@nestjs/common': 11.1.27(reflect-metadata@0.2.2)(rxjs@7.8.2) - '@nestjs/core': 11.1.27(@nestjs/common@11.1.27(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/platform-express@11.1.27)(@nestjs/websockets@11.1.27)(reflect-metadata@0.2.2)(rxjs@7.8.2) + '@nestjs/common': 11.1.28(reflect-metadata@0.2.2)(rxjs@7.8.2)(supports-color@8.1.1) + '@nestjs/core': 11.1.28(@nestjs/common@11.1.28(reflect-metadata@0.2.2)(rxjs@7.8.2)(supports-color@8.1.1))(@nestjs/platform-express@11.1.28)(@nestjs/websockets@11.1.28)(reflect-metadata@0.2.2)(rxjs@7.8.2) tslib: 2.8.1 - '@nestjs/bullmq@11.0.4(@nestjs/common@11.1.27(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/core@11.1.27)(bullmq@5.78.1)': + '@nestjs/bullmq@11.0.4(@nestjs/common@11.1.28(reflect-metadata@0.2.2)(rxjs@7.8.2)(supports-color@8.1.1))(@nestjs/core@11.1.28)(bullmq@5.81.3(supports-color@8.1.1))': dependencies: - '@nestjs/bull-shared': 11.0.4(@nestjs/common@11.1.27(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/core@11.1.27) - '@nestjs/common': 11.1.27(reflect-metadata@0.2.2)(rxjs@7.8.2) - '@nestjs/core': 11.1.27(@nestjs/common@11.1.27(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/platform-express@11.1.27)(@nestjs/websockets@11.1.27)(reflect-metadata@0.2.2)(rxjs@7.8.2) - bullmq: 5.78.1 + '@nestjs/bull-shared': 11.0.4(@nestjs/common@11.1.28(reflect-metadata@0.2.2)(rxjs@7.8.2)(supports-color@8.1.1))(@nestjs/core@11.1.28) + '@nestjs/common': 11.1.28(reflect-metadata@0.2.2)(rxjs@7.8.2)(supports-color@8.1.1) + '@nestjs/core': 11.1.28(@nestjs/common@11.1.28(reflect-metadata@0.2.2)(rxjs@7.8.2)(supports-color@8.1.1))(@nestjs/platform-express@11.1.28)(@nestjs/websockets@11.1.28)(reflect-metadata@0.2.2)(rxjs@7.8.2) + bullmq: 5.81.3(supports-color@8.1.1) tslib: 2.8.1 - '@nestjs/cli@11.0.23(@swc/core@1.15.41(@swc/helpers@0.5.23))(@types/node@24.13.2)(esbuild@0.28.1)(lightningcss@1.32.0)(prettier@3.8.4)': + '@nestjs/cli@11.0.24(@swc/core@1.15.47(@swc/helpers@0.5.23))(@types/node@24.13.3)(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(prettier@3.9.6)(uglify-js@3.19.3)': dependencies: '@angular-devkit/core': 19.2.27(chokidar@4.0.3) '@angular-devkit/schematics': 19.2.27(chokidar@4.0.3) - '@angular-devkit/schematics-cli': 19.2.27(@types/node@24.13.2)(chokidar@4.0.3) - '@inquirer/prompts': 7.10.1(@types/node@24.13.2) - '@nestjs/schematics': 11.1.0(chokidar@4.0.3)(prettier@3.8.4)(typescript@5.9.3) + '@angular-devkit/schematics-cli': 19.2.27(@types/node@24.13.3)(chokidar@4.0.3) + '@inquirer/prompts': 7.10.1(@types/node@24.13.3) + '@nestjs/schematics': 11.1.0(chokidar@4.0.3)(prettier@3.9.6)(typescript@5.9.3) ansis: 4.2.0 chokidar: 4.0.3 cli-table3: 0.6.5 commander: 4.1.1 - fork-ts-checker-webpack-plugin: 9.1.0(typescript@5.9.3)(webpack@5.106.2(@swc/core@1.15.41(@swc/helpers@0.5.23))(esbuild@0.28.1)(lightningcss@1.32.0)) + fork-ts-checker-webpack-plugin: 9.1.0(typescript@5.9.3)(webpack@5.106.2(@swc/core@1.15.47(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(uglify-js@3.19.3)) glob: 13.0.6 node-emoji: 1.11.0 ora: 5.4.1 tsconfig-paths: 4.2.0 tsconfig-paths-webpack-plugin: 4.2.0 typescript: 5.9.3 - webpack: 5.106.2(@swc/core@1.15.41(@swc/helpers@0.5.23))(esbuild@0.28.1)(lightningcss@1.32.0) + webpack: 5.106.2(@swc/core@1.15.47(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(uglify-js@3.19.3) webpack-node-externals: 3.0.0 optionalDependencies: - '@swc/core': 1.15.41(@swc/helpers@0.5.23) + '@swc/core': 1.15.47(@swc/helpers@0.5.23) transitivePeerDependencies: - '@minify-html/node' - '@swc/css' @@ -16704,9 +16456,9 @@ snapshots: - uglify-js - webpack-cli - '@nestjs/common@11.1.27(reflect-metadata@0.2.2)(rxjs@7.8.2)': + '@nestjs/common@11.1.28(reflect-metadata@0.2.2)(rxjs@7.8.2)(supports-color@8.1.1)': dependencies: - file-type: 21.3.4 + file-type: 21.3.4(supports-color@8.1.1) iterare: 1.2.1 load-esm: 1.0.3 reflect-metadata: 0.2.2 @@ -16716,9 +16468,9 @@ snapshots: transitivePeerDependencies: - supports-color - '@nestjs/core@11.1.27(@nestjs/common@11.1.27(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/platform-express@11.1.27)(@nestjs/websockets@11.1.27)(reflect-metadata@0.2.2)(rxjs@7.8.2)': + '@nestjs/core@11.1.28(@nestjs/common@11.1.28(reflect-metadata@0.2.2)(rxjs@7.8.2)(supports-color@8.1.1))(@nestjs/platform-express@11.1.28)(@nestjs/websockets@11.1.28)(reflect-metadata@0.2.2)(rxjs@7.8.2)': dependencies: - '@nestjs/common': 11.1.27(reflect-metadata@0.2.2)(rxjs@7.8.2) + '@nestjs/common': 11.1.28(reflect-metadata@0.2.2)(rxjs@7.8.2)(supports-color@8.1.1) fast-safe-stringify: 2.1.1 iterare: 1.2.1 path-to-regexp: 8.4.2 @@ -16727,45 +16479,58 @@ snapshots: tslib: 2.8.1 uid: 2.0.2 optionalDependencies: - '@nestjs/platform-express': 11.1.27(@nestjs/common@11.1.27(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/core@11.1.27) - '@nestjs/websockets': 11.1.27(@nestjs/common@11.1.27(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/core@11.1.27)(@nestjs/platform-socket.io@11.1.27)(reflect-metadata@0.2.2)(rxjs@7.8.2) + '@nestjs/platform-express': 11.1.28(@nestjs/common@11.1.28(reflect-metadata@0.2.2)(rxjs@7.8.2)(supports-color@8.1.1))(@nestjs/core@11.1.28)(supports-color@8.1.1) + '@nestjs/websockets': 11.1.28(@nestjs/common@11.1.28(reflect-metadata@0.2.2)(rxjs@7.8.2)(supports-color@8.1.1))(@nestjs/core@11.1.28)(@nestjs/platform-socket.io@11.1.28)(reflect-metadata@0.2.2)(rxjs@7.8.2) - '@nestjs/mapped-types@2.1.1(@nestjs/common@11.1.27(reflect-metadata@0.2.2)(rxjs@7.8.2))(reflect-metadata@0.2.2)': + '@nestjs/mapped-types@2.1.1(@nestjs/common@11.1.28(reflect-metadata@0.2.2)(rxjs@7.8.2)(supports-color@8.1.1))(reflect-metadata@0.2.2)': dependencies: - '@nestjs/common': 11.1.27(reflect-metadata@0.2.2)(rxjs@7.8.2) + '@nestjs/common': 11.1.28(reflect-metadata@0.2.2)(rxjs@7.8.2)(supports-color@8.1.1) reflect-metadata: 0.2.2 - '@nestjs/platform-express@11.1.27(@nestjs/common@11.1.27(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/core@11.1.27)': + '@nestjs/platform-express@11.1.28(@nestjs/common@11.1.28(reflect-metadata@0.2.2)(rxjs@7.8.2)(supports-color@8.1.1))(@nestjs/core@11.1.28)(supports-color@8.1.1)': dependencies: - '@nestjs/common': 11.1.27(reflect-metadata@0.2.2)(rxjs@7.8.2) - '@nestjs/core': 11.1.27(@nestjs/common@11.1.27(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/platform-express@11.1.27)(@nestjs/websockets@11.1.27)(reflect-metadata@0.2.2)(rxjs@7.8.2) + '@nestjs/common': 11.1.28(reflect-metadata@0.2.2)(rxjs@7.8.2)(supports-color@8.1.1) + '@nestjs/core': 11.1.28(@nestjs/common@11.1.28(reflect-metadata@0.2.2)(rxjs@7.8.2)(supports-color@8.1.1))(@nestjs/platform-express@11.1.28)(@nestjs/websockets@11.1.28)(reflect-metadata@0.2.2)(rxjs@7.8.2) cors: 2.8.6 - express: 5.2.1 - multer: 2.1.1 + express: 5.2.1(supports-color@8.1.1) + multer: 2.2.0 path-to-regexp: 8.4.2 tslib: 2.8.1 transitivePeerDependencies: - supports-color - '@nestjs/platform-socket.io@11.1.27(@nestjs/common@11.1.27(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/websockets@11.1.27)(rxjs@7.8.2)': + '@nestjs/platform-socket.io@11.1.28(@nestjs/common@11.1.28(reflect-metadata@0.2.2)(rxjs@7.8.2)(supports-color@8.1.1))(@nestjs/websockets@11.1.28)(rxjs@7.8.2)(supports-color@8.1.1)': dependencies: - '@nestjs/common': 11.1.27(reflect-metadata@0.2.2)(rxjs@7.8.2) - '@nestjs/websockets': 11.1.27(@nestjs/common@11.1.27(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/core@11.1.27)(@nestjs/platform-socket.io@11.1.27)(reflect-metadata@0.2.2)(rxjs@7.8.2) + '@nestjs/common': 11.1.28(reflect-metadata@0.2.2)(rxjs@7.8.2)(supports-color@8.1.1) + '@nestjs/websockets': 11.1.28(@nestjs/common@11.1.28(reflect-metadata@0.2.2)(rxjs@7.8.2)(supports-color@8.1.1))(@nestjs/core@11.1.28)(@nestjs/platform-socket.io@11.1.28)(reflect-metadata@0.2.2)(rxjs@7.8.2) rxjs: 7.8.2 - socket.io: 4.8.3 + socket.io: 4.8.3(supports-color@8.1.1) tslib: 2.8.1 transitivePeerDependencies: - bufferutil - supports-color - utf-8-validate - '@nestjs/schedule@6.1.3(@nestjs/common@11.1.27(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/core@11.1.27)': + '@nestjs/schedule@6.1.3(@nestjs/common@11.1.28(reflect-metadata@0.2.2)(rxjs@7.8.2)(supports-color@8.1.1))(@nestjs/core@11.1.28)': dependencies: - '@nestjs/common': 11.1.27(reflect-metadata@0.2.2)(rxjs@7.8.2) - '@nestjs/core': 11.1.27(@nestjs/common@11.1.27(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/platform-express@11.1.27)(@nestjs/websockets@11.1.27)(reflect-metadata@0.2.2)(rxjs@7.8.2) + '@nestjs/common': 11.1.28(reflect-metadata@0.2.2)(rxjs@7.8.2)(supports-color@8.1.1) + '@nestjs/core': 11.1.28(@nestjs/common@11.1.28(reflect-metadata@0.2.2)(rxjs@7.8.2)(supports-color@8.1.1))(@nestjs/platform-express@11.1.28)(@nestjs/websockets@11.1.28)(reflect-metadata@0.2.2)(rxjs@7.8.2) cron: 4.4.0 - '@nestjs/schematics@11.1.0(chokidar@4.0.3)(prettier@3.8.4)(typescript@5.9.3)': + '@nestjs/schematics@11.1.0(@typescript/typescript6@6.0.2)(chokidar@4.0.3)(prettier@3.9.6)': + dependencies: + '@angular-devkit/core': 19.2.24(chokidar@4.0.3) + '@angular-devkit/schematics': 19.2.24(chokidar@4.0.3) + comment-json: 5.0.0 + jsonc-parser: 3.3.1 + pluralize: 8.0.0 + typescript: '@typescript/typescript6@6.0.2' + optionalDependencies: + prettier: 3.9.6 + transitivePeerDependencies: + - chokidar + + '@nestjs/schematics@11.1.0(chokidar@4.0.3)(prettier@3.9.6)(typescript@5.9.3)': dependencies: '@angular-devkit/core': 19.2.24(chokidar@4.0.3) '@angular-devkit/schematics': 19.2.24(chokidar@4.0.3) @@ -16774,61 +16539,48 @@ snapshots: pluralize: 8.0.0 typescript: 5.9.3 optionalDependencies: - prettier: 3.8.4 + prettier: 3.9.6 transitivePeerDependencies: - chokidar - '@nestjs/schematics@11.1.0(chokidar@4.0.3)(prettier@3.8.4)(typescript@6.0.3)': - dependencies: - '@angular-devkit/core': 19.2.24(chokidar@4.0.3) - '@angular-devkit/schematics': 19.2.24(chokidar@4.0.3) - comment-json: 5.0.0 - jsonc-parser: 3.3.1 - pluralize: 8.0.0 - typescript: 6.0.3 - optionalDependencies: - prettier: 3.8.4 - transitivePeerDependencies: - - chokidar - - '@nestjs/swagger@11.4.4(@nestjs/common@11.1.27(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/core@11.1.27)(reflect-metadata@0.2.2)(typescript@6.0.3)': + '@nestjs/swagger@11.4.6(@nestjs/common@11.1.28(reflect-metadata@0.2.2)(rxjs@7.8.2)(supports-color@8.1.1))(@nestjs/core@11.1.28)(@typescript/typescript6@6.0.2)(reflect-metadata@0.2.2)': dependencies: '@microsoft/tsdoc': 0.16.0 - '@nestjs/common': 11.1.27(reflect-metadata@0.2.2)(rxjs@7.8.2) - '@nestjs/core': 11.1.27(@nestjs/common@11.1.27(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/platform-express@11.1.27)(@nestjs/websockets@11.1.27)(reflect-metadata@0.2.2)(rxjs@7.8.2) - '@nestjs/mapped-types': 2.1.1(@nestjs/common@11.1.27(reflect-metadata@0.2.2)(rxjs@7.8.2))(reflect-metadata@0.2.2) - js-yaml: 4.1.1 + '@nestjs/common': 11.1.28(reflect-metadata@0.2.2)(rxjs@7.8.2)(supports-color@8.1.1) + '@nestjs/core': 11.1.28(@nestjs/common@11.1.28(reflect-metadata@0.2.2)(rxjs@7.8.2)(supports-color@8.1.1))(@nestjs/platform-express@11.1.28)(@nestjs/websockets@11.1.28)(reflect-metadata@0.2.2)(rxjs@7.8.2) + '@nestjs/mapped-types': 2.1.1(@nestjs/common@11.1.28(reflect-metadata@0.2.2)(rxjs@7.8.2)(supports-color@8.1.1))(reflect-metadata@0.2.2) + js-yaml: 5.2.1 lodash: 4.18.1 path-to-regexp: 8.4.2 reflect-metadata: 0.2.2 - swagger-ui-dist: 5.32.6 - typescript: 6.0.3 + swagger-ui-dist: 5.32.8 + typescript: '@typescript/typescript6@6.0.2' - '@nestjs/testing@11.1.27(@nestjs/common@11.1.27(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/core@11.1.27)(@nestjs/platform-express@11.1.27)': + '@nestjs/testing@11.1.28(@nestjs/common@11.1.28(reflect-metadata@0.2.2)(rxjs@7.8.2)(supports-color@8.1.1))(@nestjs/core@11.1.28)(@nestjs/platform-express@11.1.28)': dependencies: - '@nestjs/common': 11.1.27(reflect-metadata@0.2.2)(rxjs@7.8.2) - '@nestjs/core': 11.1.27(@nestjs/common@11.1.27(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/platform-express@11.1.27)(@nestjs/websockets@11.1.27)(reflect-metadata@0.2.2)(rxjs@7.8.2) + '@nestjs/common': 11.1.28(reflect-metadata@0.2.2)(rxjs@7.8.2)(supports-color@8.1.1) + '@nestjs/core': 11.1.28(@nestjs/common@11.1.28(reflect-metadata@0.2.2)(rxjs@7.8.2)(supports-color@8.1.1))(@nestjs/platform-express@11.1.28)(@nestjs/websockets@11.1.28)(reflect-metadata@0.2.2)(rxjs@7.8.2) tslib: 2.8.1 optionalDependencies: - '@nestjs/platform-express': 11.1.27(@nestjs/common@11.1.27(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/core@11.1.27) + '@nestjs/platform-express': 11.1.28(@nestjs/common@11.1.28(reflect-metadata@0.2.2)(rxjs@7.8.2)(supports-color@8.1.1))(@nestjs/core@11.1.28)(supports-color@8.1.1) - '@nestjs/websockets@11.1.27(@nestjs/common@11.1.27(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/core@11.1.27)(@nestjs/platform-socket.io@11.1.27)(reflect-metadata@0.2.2)(rxjs@7.8.2)': + '@nestjs/websockets@11.1.28(@nestjs/common@11.1.28(reflect-metadata@0.2.2)(rxjs@7.8.2)(supports-color@8.1.1))(@nestjs/core@11.1.28)(@nestjs/platform-socket.io@11.1.28)(reflect-metadata@0.2.2)(rxjs@7.8.2)': dependencies: - '@nestjs/common': 11.1.27(reflect-metadata@0.2.2)(rxjs@7.8.2) - '@nestjs/core': 11.1.27(@nestjs/common@11.1.27(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/platform-express@11.1.27)(@nestjs/websockets@11.1.27)(reflect-metadata@0.2.2)(rxjs@7.8.2) + '@nestjs/common': 11.1.28(reflect-metadata@0.2.2)(rxjs@7.8.2)(supports-color@8.1.1) + '@nestjs/core': 11.1.28(@nestjs/common@11.1.28(reflect-metadata@0.2.2)(rxjs@7.8.2)(supports-color@8.1.1))(@nestjs/platform-express@11.1.28)(@nestjs/websockets@11.1.28)(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.27(@nestjs/common@11.1.27(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/websockets@11.1.27)(rxjs@7.8.2) + '@nestjs/platform-socket.io': 11.1.28(@nestjs/common@11.1.28(reflect-metadata@0.2.2)(rxjs@7.8.2)(supports-color@8.1.1))(@nestjs/websockets@11.1.28)(rxjs@7.8.2)(supports-color@8.1.1) '@noble/hashes@1.4.0': {} '@noble/hashes@1.8.0': {} - '@noble/hashes@2.2.0': {} + '@noble/hashes@2.3.0': {} '@nodelib/fs.scandir@2.1.5': dependencies: @@ -16844,296 +16596,282 @@ snapshots: '@oazapfts/runtime@1.2.0': {} - '@opentelemetry/api-logs@0.219.0': + '@opentelemetry/api-logs@0.221.0': dependencies: '@opentelemetry/api': 1.9.1 '@opentelemetry/api@1.9.1': {} - '@opentelemetry/configuration@0.219.0(@opentelemetry/api@1.9.1)': + '@opentelemetry/configuration@0.221.0(@opentelemetry/api@1.9.1)': dependencies: '@opentelemetry/api': 1.9.1 - '@opentelemetry/core': 2.8.0(@opentelemetry/api@1.9.1) + '@opentelemetry/core': 2.10.0(@opentelemetry/api@1.9.1) yaml: 2.9.0 - '@opentelemetry/context-async-hooks@2.8.0(@opentelemetry/api@1.9.1)': + '@opentelemetry/context-async-hooks@2.10.0(@opentelemetry/api@1.9.1)': dependencies: '@opentelemetry/api': 1.9.1 - '@opentelemetry/core@2.8.0(@opentelemetry/api@1.9.1)': + '@opentelemetry/core@2.10.0(@opentelemetry/api@1.9.1)': dependencies: '@opentelemetry/api': 1.9.1 - '@opentelemetry/semantic-conventions': 1.41.1 + '@opentelemetry/semantic-conventions': 1.43.0 - '@opentelemetry/exporter-logs-otlp-grpc@0.219.0(@opentelemetry/api@1.9.1)': + '@opentelemetry/exporter-logs-otlp-grpc@0.221.0(@opentelemetry/api@1.9.1)': dependencies: - '@grpc/grpc-js': 1.14.4 '@opentelemetry/api': 1.9.1 - '@opentelemetry/core': 2.8.0(@opentelemetry/api@1.9.1) - '@opentelemetry/otlp-exporter-base': 0.219.0(@opentelemetry/api@1.9.1) - '@opentelemetry/otlp-grpc-exporter-base': 0.219.0(@opentelemetry/api@1.9.1) - '@opentelemetry/otlp-transformer': 0.219.0(@opentelemetry/api@1.9.1) - '@opentelemetry/sdk-logs': 0.219.0(@opentelemetry/api@1.9.1) + '@opentelemetry/otlp-exporter-base': 0.221.0(@opentelemetry/api@1.9.1) + '@opentelemetry/otlp-grpc-exporter-base': 0.221.0(@opentelemetry/api@1.9.1) + '@opentelemetry/otlp-transformer': 0.221.0(@opentelemetry/api@1.9.1) + '@opentelemetry/sdk-logs': 0.221.0(@opentelemetry/api@1.9.1) - '@opentelemetry/exporter-logs-otlp-http@0.219.0(@opentelemetry/api@1.9.1)': + '@opentelemetry/exporter-logs-otlp-http@0.221.0(@opentelemetry/api@1.9.1)': dependencies: '@opentelemetry/api': 1.9.1 - '@opentelemetry/api-logs': 0.219.0 - '@opentelemetry/core': 2.8.0(@opentelemetry/api@1.9.1) - '@opentelemetry/otlp-exporter-base': 0.219.0(@opentelemetry/api@1.9.1) - '@opentelemetry/otlp-transformer': 0.219.0(@opentelemetry/api@1.9.1) - '@opentelemetry/sdk-logs': 0.219.0(@opentelemetry/api@1.9.1) + '@opentelemetry/otlp-exporter-base': 0.221.0(@opentelemetry/api@1.9.1) + '@opentelemetry/otlp-transformer': 0.221.0(@opentelemetry/api@1.9.1) + '@opentelemetry/sdk-logs': 0.221.0(@opentelemetry/api@1.9.1) - '@opentelemetry/exporter-logs-otlp-proto@0.219.0(@opentelemetry/api@1.9.1)': + '@opentelemetry/exporter-logs-otlp-proto@0.221.0(@opentelemetry/api@1.9.1)': dependencies: '@opentelemetry/api': 1.9.1 - '@opentelemetry/api-logs': 0.219.0 - '@opentelemetry/core': 2.8.0(@opentelemetry/api@1.9.1) - '@opentelemetry/otlp-exporter-base': 0.219.0(@opentelemetry/api@1.9.1) - '@opentelemetry/otlp-transformer': 0.219.0(@opentelemetry/api@1.9.1) - '@opentelemetry/resources': 2.8.0(@opentelemetry/api@1.9.1) - '@opentelemetry/sdk-logs': 0.219.0(@opentelemetry/api@1.9.1) - '@opentelemetry/sdk-trace-base': 2.8.0(@opentelemetry/api@1.9.1) + '@opentelemetry/otlp-exporter-base': 0.221.0(@opentelemetry/api@1.9.1) + '@opentelemetry/otlp-transformer': 0.221.0(@opentelemetry/api@1.9.1) + '@opentelemetry/sdk-logs': 0.221.0(@opentelemetry/api@1.9.1) - '@opentelemetry/exporter-metrics-otlp-grpc@0.219.0(@opentelemetry/api@1.9.1)': + '@opentelemetry/exporter-metrics-otlp-grpc@0.221.0(@opentelemetry/api@1.9.1)': dependencies: - '@grpc/grpc-js': 1.14.4 '@opentelemetry/api': 1.9.1 - '@opentelemetry/core': 2.8.0(@opentelemetry/api@1.9.1) - '@opentelemetry/exporter-metrics-otlp-http': 0.219.0(@opentelemetry/api@1.9.1) - '@opentelemetry/otlp-exporter-base': 0.219.0(@opentelemetry/api@1.9.1) - '@opentelemetry/otlp-grpc-exporter-base': 0.219.0(@opentelemetry/api@1.9.1) - '@opentelemetry/otlp-transformer': 0.219.0(@opentelemetry/api@1.9.1) - '@opentelemetry/resources': 2.8.0(@opentelemetry/api@1.9.1) - '@opentelemetry/sdk-metrics': 2.8.0(@opentelemetry/api@1.9.1) + '@opentelemetry/exporter-metrics-otlp-http': 0.221.0(@opentelemetry/api@1.9.1) + '@opentelemetry/otlp-grpc-exporter-base': 0.221.0(@opentelemetry/api@1.9.1) + '@opentelemetry/otlp-transformer': 0.221.0(@opentelemetry/api@1.9.1) - '@opentelemetry/exporter-metrics-otlp-http@0.219.0(@opentelemetry/api@1.9.1)': + '@opentelemetry/exporter-metrics-otlp-http@0.221.0(@opentelemetry/api@1.9.1)': dependencies: '@opentelemetry/api': 1.9.1 - '@opentelemetry/core': 2.8.0(@opentelemetry/api@1.9.1) - '@opentelemetry/otlp-exporter-base': 0.219.0(@opentelemetry/api@1.9.1) - '@opentelemetry/otlp-transformer': 0.219.0(@opentelemetry/api@1.9.1) - '@opentelemetry/resources': 2.8.0(@opentelemetry/api@1.9.1) - '@opentelemetry/sdk-metrics': 2.8.0(@opentelemetry/api@1.9.1) + '@opentelemetry/core': 2.10.0(@opentelemetry/api@1.9.1) + '@opentelemetry/otlp-exporter-base': 0.221.0(@opentelemetry/api@1.9.1) + '@opentelemetry/otlp-transformer': 0.221.0(@opentelemetry/api@1.9.1) + '@opentelemetry/resources': 2.10.0(@opentelemetry/api@1.9.1) + '@opentelemetry/sdk-metrics': 2.10.0(@opentelemetry/api@1.9.1) - '@opentelemetry/exporter-metrics-otlp-proto@0.219.0(@opentelemetry/api@1.9.1)': + '@opentelemetry/exporter-metrics-otlp-proto@0.221.0(@opentelemetry/api@1.9.1)': dependencies: '@opentelemetry/api': 1.9.1 - '@opentelemetry/core': 2.8.0(@opentelemetry/api@1.9.1) - '@opentelemetry/exporter-metrics-otlp-http': 0.219.0(@opentelemetry/api@1.9.1) - '@opentelemetry/otlp-exporter-base': 0.219.0(@opentelemetry/api@1.9.1) - '@opentelemetry/otlp-transformer': 0.219.0(@opentelemetry/api@1.9.1) - '@opentelemetry/resources': 2.8.0(@opentelemetry/api@1.9.1) - '@opentelemetry/sdk-metrics': 2.8.0(@opentelemetry/api@1.9.1) + '@opentelemetry/exporter-metrics-otlp-http': 0.221.0(@opentelemetry/api@1.9.1) + '@opentelemetry/otlp-exporter-base': 0.221.0(@opentelemetry/api@1.9.1) + '@opentelemetry/otlp-transformer': 0.221.0(@opentelemetry/api@1.9.1) - '@opentelemetry/exporter-prometheus@0.219.0(@opentelemetry/api@1.9.1)': + '@opentelemetry/exporter-prometheus@0.221.0(@opentelemetry/api@1.9.1)': dependencies: '@opentelemetry/api': 1.9.1 - '@opentelemetry/core': 2.8.0(@opentelemetry/api@1.9.1) - '@opentelemetry/resources': 2.8.0(@opentelemetry/api@1.9.1) - '@opentelemetry/sdk-metrics': 2.8.0(@opentelemetry/api@1.9.1) - '@opentelemetry/semantic-conventions': 1.41.1 + '@opentelemetry/core': 2.10.0(@opentelemetry/api@1.9.1) + '@opentelemetry/resources': 2.10.0(@opentelemetry/api@1.9.1) + '@opentelemetry/sdk-metrics': 2.10.0(@opentelemetry/api@1.9.1) + '@opentelemetry/semantic-conventions': 1.43.0 - '@opentelemetry/exporter-trace-otlp-grpc@0.219.0(@opentelemetry/api@1.9.1)': + '@opentelemetry/exporter-trace-otlp-grpc@0.221.0(@opentelemetry/api@1.9.1)': dependencies: - '@grpc/grpc-js': 1.14.4 '@opentelemetry/api': 1.9.1 - '@opentelemetry/core': 2.8.0(@opentelemetry/api@1.9.1) - '@opentelemetry/otlp-exporter-base': 0.219.0(@opentelemetry/api@1.9.1) - '@opentelemetry/otlp-grpc-exporter-base': 0.219.0(@opentelemetry/api@1.9.1) - '@opentelemetry/otlp-transformer': 0.219.0(@opentelemetry/api@1.9.1) - '@opentelemetry/resources': 2.8.0(@opentelemetry/api@1.9.1) - '@opentelemetry/sdk-trace-base': 2.8.0(@opentelemetry/api@1.9.1) + '@opentelemetry/otlp-exporter-base': 0.221.0(@opentelemetry/api@1.9.1) + '@opentelemetry/otlp-grpc-exporter-base': 0.221.0(@opentelemetry/api@1.9.1) + '@opentelemetry/otlp-transformer': 0.221.0(@opentelemetry/api@1.9.1) + '@opentelemetry/sdk-trace': 2.10.0(@opentelemetry/api@1.9.1) - '@opentelemetry/exporter-trace-otlp-http@0.219.0(@opentelemetry/api@1.9.1)': + '@opentelemetry/exporter-trace-otlp-http@0.221.0(@opentelemetry/api@1.9.1)': dependencies: '@opentelemetry/api': 1.9.1 - '@opentelemetry/core': 2.8.0(@opentelemetry/api@1.9.1) - '@opentelemetry/otlp-exporter-base': 0.219.0(@opentelemetry/api@1.9.1) - '@opentelemetry/otlp-transformer': 0.219.0(@opentelemetry/api@1.9.1) - '@opentelemetry/resources': 2.8.0(@opentelemetry/api@1.9.1) - '@opentelemetry/sdk-trace-base': 2.8.0(@opentelemetry/api@1.9.1) + '@opentelemetry/otlp-exporter-base': 0.221.0(@opentelemetry/api@1.9.1) + '@opentelemetry/otlp-transformer': 0.221.0(@opentelemetry/api@1.9.1) + '@opentelemetry/sdk-trace': 2.10.0(@opentelemetry/api@1.9.1) - '@opentelemetry/exporter-trace-otlp-proto@0.219.0(@opentelemetry/api@1.9.1)': + '@opentelemetry/exporter-trace-otlp-proto@0.221.0(@opentelemetry/api@1.9.1)': dependencies: '@opentelemetry/api': 1.9.1 - '@opentelemetry/core': 2.8.0(@opentelemetry/api@1.9.1) - '@opentelemetry/otlp-exporter-base': 0.219.0(@opentelemetry/api@1.9.1) - '@opentelemetry/otlp-transformer': 0.219.0(@opentelemetry/api@1.9.1) - '@opentelemetry/resources': 2.8.0(@opentelemetry/api@1.9.1) - '@opentelemetry/sdk-trace-base': 2.8.0(@opentelemetry/api@1.9.1) + '@opentelemetry/otlp-exporter-base': 0.221.0(@opentelemetry/api@1.9.1) + '@opentelemetry/otlp-transformer': 0.221.0(@opentelemetry/api@1.9.1) + '@opentelemetry/sdk-trace': 2.10.0(@opentelemetry/api@1.9.1) - '@opentelemetry/exporter-zipkin@2.8.0(@opentelemetry/api@1.9.1)': + '@opentelemetry/exporter-zipkin@2.10.0(@opentelemetry/api@1.9.1)': dependencies: '@opentelemetry/api': 1.9.1 - '@opentelemetry/core': 2.8.0(@opentelemetry/api@1.9.1) - '@opentelemetry/resources': 2.8.0(@opentelemetry/api@1.9.1) - '@opentelemetry/sdk-trace-base': 2.8.0(@opentelemetry/api@1.9.1) - '@opentelemetry/semantic-conventions': 1.41.1 + '@opentelemetry/core': 2.10.0(@opentelemetry/api@1.9.1) + '@opentelemetry/resources': 2.10.0(@opentelemetry/api@1.9.1) + '@opentelemetry/sdk-trace': 2.10.0(@opentelemetry/api@1.9.1) + '@opentelemetry/semantic-conventions': 1.43.0 '@opentelemetry/host-metrics@0.38.3(@opentelemetry/api@1.9.1)': dependencies: '@opentelemetry/api': 1.9.1 - systeminformation: 5.31.7 + systeminformation: 5.31.17 - '@opentelemetry/instrumentation-http@0.219.0(@opentelemetry/api@1.9.1)': + '@opentelemetry/instrumentation-http@0.221.0(@opentelemetry/api@1.9.1)(supports-color@8.1.1)': dependencies: '@opentelemetry/api': 1.9.1 - '@opentelemetry/core': 2.8.0(@opentelemetry/api@1.9.1) - '@opentelemetry/instrumentation': 0.219.0(@opentelemetry/api@1.9.1) - '@opentelemetry/semantic-conventions': 1.41.1 + '@opentelemetry/core': 2.10.0(@opentelemetry/api@1.9.1) + '@opentelemetry/instrumentation': 0.221.0(@opentelemetry/api@1.9.1)(supports-color@8.1.1) + '@opentelemetry/semantic-conventions': 1.43.0 forwarded-parse: 2.1.2 transitivePeerDependencies: - supports-color - '@opentelemetry/instrumentation-ioredis@0.67.0(@opentelemetry/api@1.9.1)': + '@opentelemetry/instrumentation-ioredis@0.69.0(@opentelemetry/api@1.9.1)(supports-color@8.1.1)': dependencies: '@opentelemetry/api': 1.9.1 - '@opentelemetry/instrumentation': 0.219.0(@opentelemetry/api@1.9.1) + '@opentelemetry/instrumentation': 0.221.0(@opentelemetry/api@1.9.1)(supports-color@8.1.1) '@opentelemetry/redis-common': 0.38.3 - '@opentelemetry/semantic-conventions': 1.41.1 + '@opentelemetry/semantic-conventions': 1.43.0 transitivePeerDependencies: - supports-color - '@opentelemetry/instrumentation-nestjs-core@0.65.0(@opentelemetry/api@1.9.1)': + '@opentelemetry/instrumentation-nestjs-core@0.67.0(@opentelemetry/api@1.9.1)(supports-color@8.1.1)': dependencies: '@opentelemetry/api': 1.9.1 - '@opentelemetry/instrumentation': 0.219.0(@opentelemetry/api@1.9.1) - '@opentelemetry/semantic-conventions': 1.41.1 + '@opentelemetry/instrumentation': 0.221.0(@opentelemetry/api@1.9.1)(supports-color@8.1.1) + '@opentelemetry/semantic-conventions': 1.43.0 transitivePeerDependencies: - supports-color - '@opentelemetry/instrumentation-pg@0.71.0(@opentelemetry/api@1.9.1)': + '@opentelemetry/instrumentation-pg@0.73.0(@opentelemetry/api@1.9.1)(supports-color@8.1.1)': dependencies: '@opentelemetry/api': 1.9.1 - '@opentelemetry/core': 2.8.0(@opentelemetry/api@1.9.1) - '@opentelemetry/instrumentation': 0.219.0(@opentelemetry/api@1.9.1) - '@opentelemetry/semantic-conventions': 1.41.1 + '@opentelemetry/core': 2.10.0(@opentelemetry/api@1.9.1) + '@opentelemetry/instrumentation': 0.221.0(@opentelemetry/api@1.9.1)(supports-color@8.1.1) + '@opentelemetry/semantic-conventions': 1.43.0 '@opentelemetry/sql-common': 0.42.0(@opentelemetry/api@1.9.1) '@types/pg': 8.15.6 '@types/pg-pool': 2.0.7 transitivePeerDependencies: - supports-color - '@opentelemetry/instrumentation@0.219.0(@opentelemetry/api@1.9.1)': + '@opentelemetry/instrumentation@0.221.0(@opentelemetry/api@1.9.1)(supports-color@8.1.1)': dependencies: '@opentelemetry/api': 1.9.1 - '@opentelemetry/api-logs': 0.219.0 + '@opentelemetry/api-logs': 0.221.0 import-in-the-middle: 3.0.2 - require-in-the-middle: 8.0.1 + require-in-the-middle: 8.0.1(supports-color@8.1.1) transitivePeerDependencies: - supports-color - '@opentelemetry/otlp-exporter-base@0.219.0(@opentelemetry/api@1.9.1)': + '@opentelemetry/otlp-exporter-base@0.221.0(@opentelemetry/api@1.9.1)': dependencies: '@opentelemetry/api': 1.9.1 - '@opentelemetry/core': 2.8.0(@opentelemetry/api@1.9.1) - '@opentelemetry/otlp-transformer': 0.219.0(@opentelemetry/api@1.9.1) + '@opentelemetry/core': 2.10.0(@opentelemetry/api@1.9.1) + '@opentelemetry/otlp-transformer': 0.221.0(@opentelemetry/api@1.9.1) - '@opentelemetry/otlp-grpc-exporter-base@0.219.0(@opentelemetry/api@1.9.1)': + '@opentelemetry/otlp-grpc-exporter-base@0.221.0(@opentelemetry/api@1.9.1)': dependencies: '@grpc/grpc-js': 1.14.4 '@opentelemetry/api': 1.9.1 - '@opentelemetry/core': 2.8.0(@opentelemetry/api@1.9.1) - '@opentelemetry/otlp-exporter-base': 0.219.0(@opentelemetry/api@1.9.1) - '@opentelemetry/otlp-transformer': 0.219.0(@opentelemetry/api@1.9.1) + '@opentelemetry/core': 2.10.0(@opentelemetry/api@1.9.1) + '@opentelemetry/otlp-exporter-base': 0.221.0(@opentelemetry/api@1.9.1) + '@opentelemetry/otlp-transformer': 0.221.0(@opentelemetry/api@1.9.1) - '@opentelemetry/otlp-transformer@0.219.0(@opentelemetry/api@1.9.1)': + '@opentelemetry/otlp-transformer@0.221.0(@opentelemetry/api@1.9.1)': dependencies: '@opentelemetry/api': 1.9.1 - '@opentelemetry/api-logs': 0.219.0 - '@opentelemetry/core': 2.8.0(@opentelemetry/api@1.9.1) - '@opentelemetry/resources': 2.8.0(@opentelemetry/api@1.9.1) - '@opentelemetry/sdk-logs': 0.219.0(@opentelemetry/api@1.9.1) - '@opentelemetry/sdk-metrics': 2.8.0(@opentelemetry/api@1.9.1) - '@opentelemetry/sdk-trace-base': 2.8.0(@opentelemetry/api@1.9.1) + '@opentelemetry/api-logs': 0.221.0 + '@opentelemetry/core': 2.10.0(@opentelemetry/api@1.9.1) + '@opentelemetry/resources': 2.10.0(@opentelemetry/api@1.9.1) + '@opentelemetry/sdk-logs': 0.221.0(@opentelemetry/api@1.9.1) + '@opentelemetry/sdk-metrics': 2.10.0(@opentelemetry/api@1.9.1) + '@opentelemetry/sdk-trace': 2.10.0(@opentelemetry/api@1.9.1) - '@opentelemetry/propagator-b3@2.8.0(@opentelemetry/api@1.9.1)': + '@opentelemetry/propagator-b3@2.10.0(@opentelemetry/api@1.9.1)': dependencies: '@opentelemetry/api': 1.9.1 - '@opentelemetry/core': 2.8.0(@opentelemetry/api@1.9.1) + '@opentelemetry/core': 2.10.0(@opentelemetry/api@1.9.1) - '@opentelemetry/propagator-jaeger@2.8.0(@opentelemetry/api@1.9.1)': + '@opentelemetry/propagator-jaeger@2.10.0(@opentelemetry/api@1.9.1)': dependencies: '@opentelemetry/api': 1.9.1 - '@opentelemetry/core': 2.8.0(@opentelemetry/api@1.9.1) + '@opentelemetry/core': 2.10.0(@opentelemetry/api@1.9.1) '@opentelemetry/redis-common@0.38.3': {} - '@opentelemetry/resources@2.8.0(@opentelemetry/api@1.9.1)': + '@opentelemetry/resources@2.10.0(@opentelemetry/api@1.9.1)': dependencies: '@opentelemetry/api': 1.9.1 - '@opentelemetry/core': 2.8.0(@opentelemetry/api@1.9.1) - '@opentelemetry/semantic-conventions': 1.41.1 + '@opentelemetry/core': 2.10.0(@opentelemetry/api@1.9.1) + '@opentelemetry/semantic-conventions': 1.43.0 - '@opentelemetry/sdk-logs@0.219.0(@opentelemetry/api@1.9.1)': + '@opentelemetry/sdk-logs@0.221.0(@opentelemetry/api@1.9.1)': dependencies: '@opentelemetry/api': 1.9.1 - '@opentelemetry/api-logs': 0.219.0 - '@opentelemetry/core': 2.8.0(@opentelemetry/api@1.9.1) - '@opentelemetry/resources': 2.8.0(@opentelemetry/api@1.9.1) - '@opentelemetry/semantic-conventions': 1.41.1 + '@opentelemetry/api-logs': 0.221.0 + '@opentelemetry/core': 2.10.0(@opentelemetry/api@1.9.1) + '@opentelemetry/resources': 2.10.0(@opentelemetry/api@1.9.1) + '@opentelemetry/semantic-conventions': 1.43.0 - '@opentelemetry/sdk-metrics@2.8.0(@opentelemetry/api@1.9.1)': + '@opentelemetry/sdk-metrics@2.10.0(@opentelemetry/api@1.9.1)': dependencies: '@opentelemetry/api': 1.9.1 - '@opentelemetry/core': 2.8.0(@opentelemetry/api@1.9.1) - '@opentelemetry/resources': 2.8.0(@opentelemetry/api@1.9.1) + '@opentelemetry/core': 2.10.0(@opentelemetry/api@1.9.1) + '@opentelemetry/resources': 2.10.0(@opentelemetry/api@1.9.1) - '@opentelemetry/sdk-node@0.219.0(@opentelemetry/api@1.9.1)': + '@opentelemetry/sdk-node@0.221.0(@opentelemetry/api@1.9.1)(supports-color@8.1.1)': dependencies: '@opentelemetry/api': 1.9.1 - '@opentelemetry/api-logs': 0.219.0 - '@opentelemetry/configuration': 0.219.0(@opentelemetry/api@1.9.1) - '@opentelemetry/context-async-hooks': 2.8.0(@opentelemetry/api@1.9.1) - '@opentelemetry/core': 2.8.0(@opentelemetry/api@1.9.1) - '@opentelemetry/exporter-logs-otlp-grpc': 0.219.0(@opentelemetry/api@1.9.1) - '@opentelemetry/exporter-logs-otlp-http': 0.219.0(@opentelemetry/api@1.9.1) - '@opentelemetry/exporter-logs-otlp-proto': 0.219.0(@opentelemetry/api@1.9.1) - '@opentelemetry/exporter-metrics-otlp-grpc': 0.219.0(@opentelemetry/api@1.9.1) - '@opentelemetry/exporter-metrics-otlp-http': 0.219.0(@opentelemetry/api@1.9.1) - '@opentelemetry/exporter-metrics-otlp-proto': 0.219.0(@opentelemetry/api@1.9.1) - '@opentelemetry/exporter-prometheus': 0.219.0(@opentelemetry/api@1.9.1) - '@opentelemetry/exporter-trace-otlp-grpc': 0.219.0(@opentelemetry/api@1.9.1) - '@opentelemetry/exporter-trace-otlp-http': 0.219.0(@opentelemetry/api@1.9.1) - '@opentelemetry/exporter-trace-otlp-proto': 0.219.0(@opentelemetry/api@1.9.1) - '@opentelemetry/exporter-zipkin': 2.8.0(@opentelemetry/api@1.9.1) - '@opentelemetry/instrumentation': 0.219.0(@opentelemetry/api@1.9.1) - '@opentelemetry/otlp-exporter-base': 0.219.0(@opentelemetry/api@1.9.1) - '@opentelemetry/otlp-grpc-exporter-base': 0.219.0(@opentelemetry/api@1.9.1) - '@opentelemetry/propagator-b3': 2.8.0(@opentelemetry/api@1.9.1) - '@opentelemetry/propagator-jaeger': 2.8.0(@opentelemetry/api@1.9.1) - '@opentelemetry/resources': 2.8.0(@opentelemetry/api@1.9.1) - '@opentelemetry/sdk-logs': 0.219.0(@opentelemetry/api@1.9.1) - '@opentelemetry/sdk-metrics': 2.8.0(@opentelemetry/api@1.9.1) - '@opentelemetry/sdk-trace-base': 2.8.0(@opentelemetry/api@1.9.1) - '@opentelemetry/sdk-trace-node': 2.8.0(@opentelemetry/api@1.9.1) - '@opentelemetry/semantic-conventions': 1.41.1 + '@opentelemetry/api-logs': 0.221.0 + '@opentelemetry/configuration': 0.221.0(@opentelemetry/api@1.9.1) + '@opentelemetry/context-async-hooks': 2.10.0(@opentelemetry/api@1.9.1) + '@opentelemetry/core': 2.10.0(@opentelemetry/api@1.9.1) + '@opentelemetry/exporter-logs-otlp-grpc': 0.221.0(@opentelemetry/api@1.9.1) + '@opentelemetry/exporter-logs-otlp-http': 0.221.0(@opentelemetry/api@1.9.1) + '@opentelemetry/exporter-logs-otlp-proto': 0.221.0(@opentelemetry/api@1.9.1) + '@opentelemetry/exporter-metrics-otlp-grpc': 0.221.0(@opentelemetry/api@1.9.1) + '@opentelemetry/exporter-metrics-otlp-http': 0.221.0(@opentelemetry/api@1.9.1) + '@opentelemetry/exporter-metrics-otlp-proto': 0.221.0(@opentelemetry/api@1.9.1) + '@opentelemetry/exporter-prometheus': 0.221.0(@opentelemetry/api@1.9.1) + '@opentelemetry/exporter-trace-otlp-grpc': 0.221.0(@opentelemetry/api@1.9.1) + '@opentelemetry/exporter-trace-otlp-http': 0.221.0(@opentelemetry/api@1.9.1) + '@opentelemetry/exporter-trace-otlp-proto': 0.221.0(@opentelemetry/api@1.9.1) + '@opentelemetry/exporter-zipkin': 2.10.0(@opentelemetry/api@1.9.1) + '@opentelemetry/instrumentation': 0.221.0(@opentelemetry/api@1.9.1)(supports-color@8.1.1) + '@opentelemetry/otlp-exporter-base': 0.221.0(@opentelemetry/api@1.9.1) + '@opentelemetry/otlp-grpc-exporter-base': 0.221.0(@opentelemetry/api@1.9.1) + '@opentelemetry/propagator-b3': 2.10.0(@opentelemetry/api@1.9.1) + '@opentelemetry/propagator-jaeger': 2.10.0(@opentelemetry/api@1.9.1) + '@opentelemetry/resources': 2.10.0(@opentelemetry/api@1.9.1) + '@opentelemetry/sdk-logs': 0.221.0(@opentelemetry/api@1.9.1) + '@opentelemetry/sdk-metrics': 2.10.0(@opentelemetry/api@1.9.1) + '@opentelemetry/sdk-trace': 2.10.0(@opentelemetry/api@1.9.1) + '@opentelemetry/sdk-trace-base': 2.10.0(@opentelemetry/api@1.9.1) + '@opentelemetry/sdk-trace-node': 2.10.0(@opentelemetry/api@1.9.1) + '@opentelemetry/semantic-conventions': 1.43.0 transitivePeerDependencies: - supports-color - '@opentelemetry/sdk-trace-base@2.8.0(@opentelemetry/api@1.9.1)': + '@opentelemetry/sdk-trace-base@2.10.0(@opentelemetry/api@1.9.1)': dependencies: '@opentelemetry/api': 1.9.1 - '@opentelemetry/core': 2.8.0(@opentelemetry/api@1.9.1) - '@opentelemetry/resources': 2.8.0(@opentelemetry/api@1.9.1) - '@opentelemetry/semantic-conventions': 1.41.1 + '@opentelemetry/core': 2.10.0(@opentelemetry/api@1.9.1) + '@opentelemetry/resources': 2.10.0(@opentelemetry/api@1.9.1) + '@opentelemetry/sdk-trace': 2.10.0(@opentelemetry/api@1.9.1) + '@opentelemetry/semantic-conventions': 1.43.0 - '@opentelemetry/sdk-trace-node@2.8.0(@opentelemetry/api@1.9.1)': + '@opentelemetry/sdk-trace-node@2.10.0(@opentelemetry/api@1.9.1)': dependencies: '@opentelemetry/api': 1.9.1 - '@opentelemetry/context-async-hooks': 2.8.0(@opentelemetry/api@1.9.1) - '@opentelemetry/core': 2.8.0(@opentelemetry/api@1.9.1) - '@opentelemetry/sdk-trace-base': 2.8.0(@opentelemetry/api@1.9.1) + '@opentelemetry/context-async-hooks': 2.10.0(@opentelemetry/api@1.9.1) + '@opentelemetry/core': 2.10.0(@opentelemetry/api@1.9.1) + '@opentelemetry/sdk-trace-base': 2.10.0(@opentelemetry/api@1.9.1) - '@opentelemetry/semantic-conventions@1.41.1': {} + '@opentelemetry/sdk-trace@2.10.0(@opentelemetry/api@1.9.1)': + dependencies: + '@opentelemetry/api': 1.9.1 + '@opentelemetry/core': 2.10.0(@opentelemetry/api@1.9.1) + '@opentelemetry/resources': 2.10.0(@opentelemetry/api@1.9.1) + '@opentelemetry/semantic-conventions': 1.43.0 + + '@opentelemetry/semantic-conventions@1.43.0': {} '@opentelemetry/sql-common@0.42.0(@opentelemetry/api@1.9.1)': dependencies: '@opentelemetry/api': 1.9.1 - '@opentelemetry/core': 2.8.0(@opentelemetry/api@1.9.1) + '@opentelemetry/core': 2.10.0(@opentelemetry/api@1.9.1) - '@oxc-project/types@0.133.0': {} + '@oxc-project/types@0.143.0': {} '@paralleldrive/cuid2@2.3.1': dependencies: @@ -17183,7 +16921,7 @@ snapshots: detect-libc: 2.1.2 is-glob: 4.0.3 node-addon-api: 7.1.1 - picomatch: 4.0.4 + picomatch: 4.0.5 optionalDependencies: '@parcel/watcher-android-arm64': 2.5.6 '@parcel/watcher-darwin-arm64': 2.5.6 @@ -17294,33 +17032,33 @@ snapshots: tslib: 2.8.1 tsyringe: 4.10.0 - '@photo-sphere-viewer/core@5.14.1': + '@photo-sphere-viewer/core@5.15.1': dependencies: - three: 0.179.1 + three: 0.185.1 - '@photo-sphere-viewer/equirectangular-video-adapter@5.14.1(@photo-sphere-viewer/core@5.14.1)(@photo-sphere-viewer/video-plugin@5.14.1(@photo-sphere-viewer/core@5.14.1))': + '@photo-sphere-viewer/equirectangular-video-adapter@5.15.1(@photo-sphere-viewer/core@5.15.1)(@photo-sphere-viewer/video-plugin@5.15.1(@photo-sphere-viewer/core@5.15.1))': dependencies: - '@photo-sphere-viewer/core': 5.14.1 - '@photo-sphere-viewer/video-plugin': 5.14.1(@photo-sphere-viewer/core@5.14.1) - three: 0.184.0 + '@photo-sphere-viewer/core': 5.15.1 + '@photo-sphere-viewer/video-plugin': 5.15.1(@photo-sphere-viewer/core@5.15.1) + three: 0.185.1 - '@photo-sphere-viewer/markers-plugin@5.14.1(@photo-sphere-viewer/core@5.14.1)': + '@photo-sphere-viewer/markers-plugin@5.15.1(@photo-sphere-viewer/core@5.15.1)': dependencies: - '@photo-sphere-viewer/core': 5.14.1 + '@photo-sphere-viewer/core': 5.15.1 - '@photo-sphere-viewer/resolution-plugin@5.14.1(@photo-sphere-viewer/core@5.14.1)(@photo-sphere-viewer/settings-plugin@5.14.1(@photo-sphere-viewer/core@5.14.1))': + '@photo-sphere-viewer/resolution-plugin@5.15.1(@photo-sphere-viewer/core@5.15.1)(@photo-sphere-viewer/settings-plugin@5.15.1(@photo-sphere-viewer/core@5.15.1))': dependencies: - '@photo-sphere-viewer/core': 5.14.1 - '@photo-sphere-viewer/settings-plugin': 5.14.1(@photo-sphere-viewer/core@5.14.1) + '@photo-sphere-viewer/core': 5.15.1 + '@photo-sphere-viewer/settings-plugin': 5.15.1(@photo-sphere-viewer/core@5.15.1) - '@photo-sphere-viewer/settings-plugin@5.14.1(@photo-sphere-viewer/core@5.14.1)': + '@photo-sphere-viewer/settings-plugin@5.15.1(@photo-sphere-viewer/core@5.15.1)': dependencies: - '@photo-sphere-viewer/core': 5.14.1 + '@photo-sphere-viewer/core': 5.15.1 - '@photo-sphere-viewer/video-plugin@5.14.1(@photo-sphere-viewer/core@5.14.1)': + '@photo-sphere-viewer/video-plugin@5.15.1(@photo-sphere-viewer/core@5.15.1)': dependencies: - '@photo-sphere-viewer/core': 5.14.1 - three: 0.184.0 + '@photo-sphere-viewer/core': 5.15.1 + three: 0.185.1 '@photostructure/tz-lookup@11.5.0': {} @@ -17329,9 +17067,9 @@ snapshots: '@pkgr/core@0.3.6': {} - '@playwright/test@1.60.0': + '@playwright/test@1.62.1': dependencies: - playwright: 1.60.0 + playwright: 1.62.1 '@pnpm/config.env-replace@1.1.0': {} @@ -17365,192 +17103,187 @@ snapshots: '@protobufjs/pool@1.1.0': {} - '@protobufjs/utf8@1.1.1': {} + '@protobufjs/utf8@1.1.2': {} - '@react-email/body@0.3.0(react@19.2.7)': + '@react-email/body@0.3.0(react@19.2.8)': dependencies: - react: 19.2.7 + react: 19.2.8 - '@react-email/button@0.2.1(react@19.2.7)': + '@react-email/button@0.2.1(react@19.2.8)': dependencies: - react: 19.2.7 + react: 19.2.8 - '@react-email/code-block@0.2.1(react@19.2.7)': + '@react-email/code-block@0.2.1(react@19.2.8)': dependencies: prismjs: 1.30.0 - react: 19.2.7 + react: 19.2.8 - '@react-email/code-inline@0.0.6(react@19.2.7)': + '@react-email/code-inline@0.0.6(react@19.2.8)': dependencies: - react: 19.2.7 + react: 19.2.8 - '@react-email/column@0.0.14(react@19.2.7)': + '@react-email/column@0.0.14(react@19.2.8)': dependencies: - react: 19.2.7 + react: 19.2.8 - '@react-email/components@1.0.12(react-dom@19.2.7(react@19.2.7))(react@19.2.7)': + '@react-email/components@1.0.12(react-dom@19.2.8(react@19.2.8))(react@19.2.8)': dependencies: - '@react-email/body': 0.3.0(react@19.2.7) - '@react-email/button': 0.2.1(react@19.2.7) - '@react-email/code-block': 0.2.1(react@19.2.7) - '@react-email/code-inline': 0.0.6(react@19.2.7) - '@react-email/column': 0.0.14(react@19.2.7) - '@react-email/container': 0.0.16(react@19.2.7) - '@react-email/font': 0.0.10(react@19.2.7) - '@react-email/head': 0.0.13(react@19.2.7) - '@react-email/heading': 0.0.16(react@19.2.7) - '@react-email/hr': 0.0.12(react@19.2.7) - '@react-email/html': 0.0.12(react@19.2.7) - '@react-email/img': 0.0.12(react@19.2.7) - '@react-email/link': 0.0.13(react@19.2.7) - '@react-email/markdown': 0.0.18(react@19.2.7) - '@react-email/preview': 0.0.14(react@19.2.7) - '@react-email/render': 2.0.6(react-dom@19.2.7(react@19.2.7))(react@19.2.7) - '@react-email/row': 0.0.13(react@19.2.7) - '@react-email/section': 0.0.17(react@19.2.7) - '@react-email/tailwind': 2.0.7(@react-email/body@0.3.0(react@19.2.7))(@react-email/button@0.2.1(react@19.2.7))(@react-email/code-block@0.2.1(react@19.2.7))(@react-email/code-inline@0.0.6(react@19.2.7))(@react-email/container@0.0.16(react@19.2.7))(@react-email/heading@0.0.16(react@19.2.7))(@react-email/hr@0.0.12(react@19.2.7))(@react-email/img@0.0.12(react@19.2.7))(@react-email/link@0.0.13(react@19.2.7))(@react-email/preview@0.0.14(react@19.2.7))(@react-email/text@0.1.6(react@19.2.7))(react@19.2.7) - '@react-email/text': 0.1.6(react@19.2.7) - react: 19.2.7 + '@react-email/body': 0.3.0(react@19.2.8) + '@react-email/button': 0.2.1(react@19.2.8) + '@react-email/code-block': 0.2.1(react@19.2.8) + '@react-email/code-inline': 0.0.6(react@19.2.8) + '@react-email/column': 0.0.14(react@19.2.8) + '@react-email/container': 0.0.16(react@19.2.8) + '@react-email/font': 0.0.10(react@19.2.8) + '@react-email/head': 0.0.13(react@19.2.8) + '@react-email/heading': 0.0.16(react@19.2.8) + '@react-email/hr': 0.0.12(react@19.2.8) + '@react-email/html': 0.0.12(react@19.2.8) + '@react-email/img': 0.0.12(react@19.2.8) + '@react-email/link': 0.0.13(react@19.2.8) + '@react-email/markdown': 0.0.18(react@19.2.8) + '@react-email/preview': 0.0.14(react@19.2.8) + '@react-email/render': 2.0.6(react-dom@19.2.8(react@19.2.8))(react@19.2.8) + '@react-email/row': 0.0.13(react@19.2.8) + '@react-email/section': 0.0.17(react@19.2.8) + '@react-email/tailwind': 2.0.7(@react-email/body@0.3.0(react@19.2.8))(@react-email/button@0.2.1(react@19.2.8))(@react-email/code-block@0.2.1(react@19.2.8))(@react-email/code-inline@0.0.6(react@19.2.8))(@react-email/container@0.0.16(react@19.2.8))(@react-email/heading@0.0.16(react@19.2.8))(@react-email/hr@0.0.12(react@19.2.8))(@react-email/img@0.0.12(react@19.2.8))(@react-email/link@0.0.13(react@19.2.8))(@react-email/preview@0.0.14(react@19.2.8))(@react-email/text@0.1.6(react@19.2.8))(react@19.2.8) + '@react-email/text': 0.1.6(react@19.2.8) + react: 19.2.8 transitivePeerDependencies: - react-dom - '@react-email/container@0.0.16(react@19.2.7)': + '@react-email/container@0.0.16(react@19.2.8)': dependencies: - react: 19.2.7 + react: 19.2.8 - '@react-email/font@0.0.10(react@19.2.7)': + '@react-email/font@0.0.10(react@19.2.8)': dependencies: - react: 19.2.7 + react: 19.2.8 - '@react-email/head@0.0.13(react@19.2.7)': + '@react-email/head@0.0.13(react@19.2.8)': dependencies: - react: 19.2.7 + react: 19.2.8 - '@react-email/heading@0.0.16(react@19.2.7)': + '@react-email/heading@0.0.16(react@19.2.8)': dependencies: - react: 19.2.7 + react: 19.2.8 - '@react-email/hr@0.0.12(react@19.2.7)': + '@react-email/hr@0.0.12(react@19.2.8)': dependencies: - react: 19.2.7 + react: 19.2.8 - '@react-email/html@0.0.12(react@19.2.7)': + '@react-email/html@0.0.12(react@19.2.8)': dependencies: - react: 19.2.7 + react: 19.2.8 - '@react-email/img@0.0.12(react@19.2.7)': + '@react-email/img@0.0.12(react@19.2.8)': dependencies: - react: 19.2.7 + react: 19.2.8 - '@react-email/link@0.0.13(react@19.2.7)': + '@react-email/link@0.0.13(react@19.2.8)': dependencies: - react: 19.2.7 + react: 19.2.8 - '@react-email/markdown@0.0.18(react@19.2.7)': + '@react-email/markdown@0.0.18(react@19.2.8)': dependencies: marked: 15.0.12 - react: 19.2.7 + react: 19.2.8 - '@react-email/preview@0.0.14(react@19.2.7)': + '@react-email/preview@0.0.14(react@19.2.8)': dependencies: - react: 19.2.7 + react: 19.2.8 - '@react-email/render@2.0.6(react-dom@19.2.7(react@19.2.7))(react@19.2.7)': + '@react-email/render@2.0.6(react-dom@19.2.8(react@19.2.8))(react@19.2.8)': dependencies: html-to-text: 9.0.5 - prettier: 3.8.4 - react: 19.2.7 - react-dom: 19.2.7(react@19.2.7) + prettier: 3.9.6 + react: 19.2.8 + react-dom: 19.2.8(react@19.2.8) - '@react-email/render@2.0.8(react-dom@19.2.7(react@19.2.7))(react@19.2.7)': + '@react-email/render@2.1.0(react-dom@19.2.8(react@19.2.8))(react@19.2.8)': dependencies: + entities: 4.5.0 html-to-text: 9.0.5 - prettier: 3.8.4 - react: 19.2.7 - react-dom: 19.2.7(react@19.2.7) + html5parser: 3.0.0 + prettier: 3.9.6 + react: 19.2.8 + react-dom: 19.2.8(react@19.2.8) - '@react-email/row@0.0.13(react@19.2.7)': + '@react-email/row@0.0.13(react@19.2.8)': dependencies: - react: 19.2.7 + react: 19.2.8 - '@react-email/section@0.0.17(react@19.2.7)': + '@react-email/section@0.0.17(react@19.2.8)': dependencies: - react: 19.2.7 + react: 19.2.8 - '@react-email/tailwind@2.0.7(@react-email/body@0.3.0(react@19.2.7))(@react-email/button@0.2.1(react@19.2.7))(@react-email/code-block@0.2.1(react@19.2.7))(@react-email/code-inline@0.0.6(react@19.2.7))(@react-email/container@0.0.16(react@19.2.7))(@react-email/heading@0.0.16(react@19.2.7))(@react-email/hr@0.0.12(react@19.2.7))(@react-email/img@0.0.12(react@19.2.7))(@react-email/link@0.0.13(react@19.2.7))(@react-email/preview@0.0.14(react@19.2.7))(@react-email/text@0.1.6(react@19.2.7))(react@19.2.7)': + '@react-email/tailwind@2.0.7(@react-email/body@0.3.0(react@19.2.8))(@react-email/button@0.2.1(react@19.2.8))(@react-email/code-block@0.2.1(react@19.2.8))(@react-email/code-inline@0.0.6(react@19.2.8))(@react-email/container@0.0.16(react@19.2.8))(@react-email/heading@0.0.16(react@19.2.8))(@react-email/hr@0.0.12(react@19.2.8))(@react-email/img@0.0.12(react@19.2.8))(@react-email/link@0.0.13(react@19.2.8))(@react-email/preview@0.0.14(react@19.2.8))(@react-email/text@0.1.6(react@19.2.8))(react@19.2.8)': dependencies: - '@react-email/text': 0.1.6(react@19.2.7) - react: 19.2.7 - tailwindcss: 4.3.1 + '@react-email/text': 0.1.6(react@19.2.8) + react: 19.2.8 + tailwindcss: 4.3.3 optionalDependencies: - '@react-email/body': 0.3.0(react@19.2.7) - '@react-email/button': 0.2.1(react@19.2.7) - '@react-email/code-block': 0.2.1(react@19.2.7) - '@react-email/code-inline': 0.0.6(react@19.2.7) - '@react-email/container': 0.0.16(react@19.2.7) - '@react-email/heading': 0.0.16(react@19.2.7) - '@react-email/hr': 0.0.12(react@19.2.7) - '@react-email/img': 0.0.12(react@19.2.7) - '@react-email/link': 0.0.13(react@19.2.7) - '@react-email/preview': 0.0.14(react@19.2.7) + '@react-email/body': 0.3.0(react@19.2.8) + '@react-email/button': 0.2.1(react@19.2.8) + '@react-email/code-block': 0.2.1(react@19.2.8) + '@react-email/code-inline': 0.0.6(react@19.2.8) + '@react-email/container': 0.0.16(react@19.2.8) + '@react-email/heading': 0.0.16(react@19.2.8) + '@react-email/hr': 0.0.12(react@19.2.8) + '@react-email/img': 0.0.12(react@19.2.8) + '@react-email/link': 0.0.13(react@19.2.8) + '@react-email/preview': 0.0.14(react@19.2.8) - '@react-email/text@0.1.6(react@19.2.7)': + '@react-email/text@0.1.6(react@19.2.8)': dependencies: - react: 19.2.7 + react: 19.2.8 - '@replit/codemirror-indentation-markers@6.5.3(@codemirror/language@6.12.3)(@codemirror/state@6.6.0)(@codemirror/view@6.43.1)': + '@replit/codemirror-indentation-markers@6.5.3(@codemirror/language@6.12.4)(@codemirror/state@6.7.1)(@codemirror/view@6.43.7)': dependencies: - '@codemirror/language': 6.12.3 - '@codemirror/state': 6.6.0 - '@codemirror/view': 6.43.1 + '@codemirror/language': 6.12.4 + '@codemirror/state': 6.7.1 + '@codemirror/view': 6.43.7 - '@rolldown/binding-android-arm64@1.0.3': + '@rolldown/binding-android-arm64@1.2.3': optional: true - '@rolldown/binding-darwin-arm64@1.0.3': + '@rolldown/binding-darwin-arm64@1.2.3': optional: true - '@rolldown/binding-darwin-x64@1.0.3': + '@rolldown/binding-darwin-x64@1.2.3': optional: true - '@rolldown/binding-freebsd-x64@1.0.3': + '@rolldown/binding-freebsd-x64@1.2.3': optional: true - '@rolldown/binding-linux-arm-gnueabihf@1.0.3': + '@rolldown/binding-linux-arm-gnueabihf@1.2.3': optional: true - '@rolldown/binding-linux-arm64-gnu@1.0.3': + '@rolldown/binding-linux-arm64-gnu@1.2.3': optional: true - '@rolldown/binding-linux-arm64-musl@1.0.3': + '@rolldown/binding-linux-arm64-musl@1.2.3': optional: true - '@rolldown/binding-linux-ppc64-gnu@1.0.3': + '@rolldown/binding-linux-ppc64-gnu@1.2.3': optional: true - '@rolldown/binding-linux-s390x-gnu@1.0.3': + '@rolldown/binding-linux-s390x-gnu@1.2.3': optional: true - '@rolldown/binding-linux-x64-gnu@1.0.3': + '@rolldown/binding-linux-x64-gnu@1.2.3': optional: true - '@rolldown/binding-linux-x64-musl@1.0.3': + '@rolldown/binding-linux-x64-musl@1.2.3': optional: true - '@rolldown/binding-openharmony-arm64@1.0.3': + '@rolldown/binding-openharmony-arm64@1.2.3': optional: true - '@rolldown/binding-wasm32-wasi@1.0.3': - dependencies: - '@emnapi/core': 1.10.0 - '@emnapi/runtime': 1.10.0 - '@napi-rs/wasm-runtime': 1.1.5(@emnapi/core@1.10.0)(@emnapi/runtime@1.10.0) + '@rolldown/binding-win32-arm64-msvc@1.2.3': optional: true - '@rolldown/binding-win32-arm64-msvc@1.0.3': - optional: true - - '@rolldown/binding-win32-x64-msvc@1.0.3': + '@rolldown/binding-win32-x64-msvc@1.2.3': optional: true '@rolldown/pluginutils@1.0.1': {} @@ -17559,7 +17292,7 @@ snapshots: dependencies: '@types/estree': 1.0.9 estree-walker: 2.0.2 - picomatch: 4.0.4 + picomatch: 4.0.5 optionalDependencies: rollup: 4.62.0 @@ -17659,13 +17392,13 @@ snapshots: '@sindresorhus/is@5.6.0': {} - '@slorber/react-helmet-async@1.3.0(react-dom@19.2.7(react@19.2.7))(react@19.2.7)': + '@slorber/react-helmet-async@1.3.0(react-dom@19.2.8(react@19.2.8))(react@19.2.8)': dependencies: '@babel/runtime': 7.29.7 invariant: 2.2.4 prop-types: 15.8.1 - react: 19.2.7 - react-dom: 19.2.7(react@19.2.7) + react: 19.2.8 + react-dom: 19.2.8(react@19.2.8) react-fast-compare: 3.2.2 shallowequal: 1.1.0 @@ -17677,11 +17410,11 @@ snapshots: '@socket.io/component-emitter@3.1.2': {} - '@socket.io/redis-adapter@8.3.0(socket.io-adapter@2.5.7)': + '@socket.io/redis-adapter@8.3.0(socket.io-adapter@2.5.7(supports-color@8.1.1))(supports-color@8.1.1)': dependencies: - debug: 4.3.7 + debug: 4.3.7(supports-color@8.1.1) notepack.io: 3.0.1 - socket.io-adapter: 2.5.7 + socket.io-adapter: 2.5.7(supports-color@8.1.1) uid2: 1.0.0 transitivePeerDependencies: - supports-color @@ -17690,109 +17423,109 @@ snapshots: '@standard-schema/spec@1.1.0': {} - '@sveltejs/acorn-typescript@1.0.10(acorn@8.17.0)': + '@sveltejs/acorn-typescript@1.0.12(acorn@8.18.0)': dependencies: - acorn: 8.17.0 + acorn: 8.18.0 - '@sveltejs/adapter-static@3.0.10(@sveltejs/kit@2.65.1(@opentelemetry/api@1.9.1)(@sveltejs/vite-plugin-svelte@7.1.2(svelte@5.56.3(@typescript-eslint/types@8.61.0))(vite@8.0.16(@types/node@24.13.2)(esbuild@0.28.1)(jiti@2.7.0)(sass@1.101.0)(terser@5.48.0)(tsx@4.22.4)(yaml@2.9.0)))(svelte@5.56.3(@typescript-eslint/types@8.61.0))(typescript@6.0.3)(vite@8.0.16(@types/node@24.13.2)(esbuild@0.28.1)(jiti@2.7.0)(sass@1.101.0)(terser@5.48.0)(tsx@4.22.4)(yaml@2.9.0)))': + '@sveltejs/adapter-static@3.0.10(@sveltejs/kit@2.70.2(@opentelemetry/api@1.9.1)(@sveltejs/vite-plugin-svelte@7.2.0(svelte@5.56.8(@typescript-eslint/types@8.66.0))(vite@8.2.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(sass@1.102.0)(terser@5.49.0)(tsx@4.23.9)(yaml@2.9.0)))(@typescript/typescript6@6.0.2)(svelte@5.56.8(@typescript-eslint/types@8.66.0))(vite@8.2.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(sass@1.102.0)(terser@5.49.0)(tsx@4.23.9)(yaml@2.9.0)))': dependencies: - '@sveltejs/kit': 2.65.1(@opentelemetry/api@1.9.1)(@sveltejs/vite-plugin-svelte@7.1.2(svelte@5.56.3(@typescript-eslint/types@8.61.0))(vite@8.0.16(@types/node@24.13.2)(esbuild@0.28.1)(jiti@2.7.0)(sass@1.101.0)(terser@5.48.0)(tsx@4.22.4)(yaml@2.9.0)))(svelte@5.56.3(@typescript-eslint/types@8.61.0))(typescript@6.0.3)(vite@8.0.16(@types/node@24.13.2)(esbuild@0.28.1)(jiti@2.7.0)(sass@1.101.0)(terser@5.48.0)(tsx@4.22.4)(yaml@2.9.0)) + '@sveltejs/kit': 2.70.2(@opentelemetry/api@1.9.1)(@sveltejs/vite-plugin-svelte@7.2.0(svelte@5.56.8(@typescript-eslint/types@8.66.0))(vite@8.2.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(sass@1.102.0)(terser@5.49.0)(tsx@4.23.9)(yaml@2.9.0)))(@typescript/typescript6@6.0.2)(svelte@5.56.8(@typescript-eslint/types@8.66.0))(vite@8.2.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(sass@1.102.0)(terser@5.49.0)(tsx@4.23.9)(yaml@2.9.0)) - '@sveltejs/enhanced-img@0.10.4(@sveltejs/vite-plugin-svelte@7.1.2(svelte@5.56.3(@typescript-eslint/types@8.61.0))(vite@8.0.16(@types/node@24.13.2)(esbuild@0.28.1)(jiti@2.7.0)(sass@1.101.0)(terser@5.48.0)(tsx@4.22.4)(yaml@2.9.0)))(rollup@4.62.0)(svelte@5.56.3(@typescript-eslint/types@8.61.0))(vite@8.0.16(@types/node@24.13.2)(esbuild@0.28.1)(jiti@2.7.0)(sass@1.101.0)(terser@5.48.0)(tsx@4.22.4)(yaml@2.9.0))': + '@sveltejs/enhanced-img@0.11.0(@sveltejs/vite-plugin-svelte@7.2.0(svelte@5.56.8(@typescript-eslint/types@8.66.0))(vite@8.2.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(sass@1.102.0)(terser@5.49.0)(tsx@4.23.9)(yaml@2.9.0)))(rollup@4.62.0)(svelte@5.56.8(@typescript-eslint/types@8.66.0))(vite@8.2.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(sass@1.102.0)(terser@5.49.0)(tsx@4.23.9)(yaml@2.9.0))': dependencies: - '@sveltejs/vite-plugin-svelte': 7.1.2(svelte@5.56.3(@typescript-eslint/types@8.61.0))(vite@8.0.16(@types/node@24.13.2)(esbuild@0.28.1)(jiti@2.7.0)(sass@1.101.0)(terser@5.48.0)(tsx@4.22.4)(yaml@2.9.0)) + '@sveltejs/vite-plugin-svelte': 7.2.0(svelte@5.56.8(@typescript-eslint/types@8.66.0))(vite@8.2.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(sass@1.102.0)(terser@5.49.0)(tsx@4.23.9)(yaml@2.9.0)) magic-string: 0.30.21 sharp: 0.34.5 - svelte: 5.56.3(@typescript-eslint/types@8.61.0) - svelte-parse-markup: 0.1.5(svelte@5.56.3(@typescript-eslint/types@8.61.0)) - vite: 8.0.16(@types/node@24.13.2)(esbuild@0.28.1)(jiti@2.7.0)(sass@1.101.0)(terser@5.48.0)(tsx@4.22.4)(yaml@2.9.0) + svelte: 5.56.8(@typescript-eslint/types@8.66.0) + svelte-parse-markup: 0.1.5(svelte@5.56.8(@typescript-eslint/types@8.66.0)) + vite: 8.2.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(sass@1.102.0)(terser@5.49.0)(tsx@4.23.9)(yaml@2.9.0) vite-imagetools: 9.0.3(rollup@4.62.0) zimmerframe: 1.1.4 transitivePeerDependencies: - rollup - '@sveltejs/kit@2.65.1(@opentelemetry/api@1.9.1)(@sveltejs/vite-plugin-svelte@7.1.2(svelte@5.56.3(@typescript-eslint/types@8.61.0))(vite@8.0.16(@types/node@24.13.2)(esbuild@0.28.1)(jiti@2.7.0)(sass@1.101.0)(terser@5.48.0)(tsx@4.22.4)(yaml@2.9.0)))(svelte@5.56.3(@typescript-eslint/types@8.61.0))(typescript@6.0.3)(vite@8.0.16(@types/node@24.13.2)(esbuild@0.28.1)(jiti@2.7.0)(sass@1.101.0)(terser@5.48.0)(tsx@4.22.4)(yaml@2.9.0))': + '@sveltejs/kit@2.70.2(@opentelemetry/api@1.9.1)(@sveltejs/vite-plugin-svelte@7.2.0(svelte@5.56.8(@typescript-eslint/types@8.66.0))(vite@8.2.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(sass@1.102.0)(terser@5.49.0)(tsx@4.23.9)(yaml@2.9.0)))(@typescript/typescript6@6.0.2)(svelte@5.56.8(@typescript-eslint/types@8.66.0))(vite@8.2.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(sass@1.102.0)(terser@5.49.0)(tsx@4.23.9)(yaml@2.9.0))': dependencies: '@standard-schema/spec': 1.1.0 - '@sveltejs/acorn-typescript': 1.0.10(acorn@8.17.0) - '@sveltejs/vite-plugin-svelte': 7.1.2(svelte@5.56.3(@typescript-eslint/types@8.61.0))(vite@8.0.16(@types/node@24.13.2)(esbuild@0.28.1)(jiti@2.7.0)(sass@1.101.0)(terser@5.48.0)(tsx@4.22.4)(yaml@2.9.0)) + '@sveltejs/acorn-typescript': 1.0.12(acorn@8.18.0) + '@sveltejs/vite-plugin-svelte': 7.2.0(svelte@5.56.8(@typescript-eslint/types@8.66.0))(vite@8.2.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(sass@1.102.0)(terser@5.49.0)(tsx@4.23.9)(yaml@2.9.0)) '@types/cookie': 0.6.0 - acorn: 8.17.0 + acorn: 8.18.0 cookie: 0.6.0 - devalue: 5.8.1 + devalue: 5.9.0 esm-env: 1.2.2 kleur: 4.1.5 magic-string: 0.30.21 mrmime: 2.0.1 - set-cookie-parser: 3.1.0 + set-cookie-parser: 3.1.2 sirv: 3.0.2 - svelte: 5.56.3(@typescript-eslint/types@8.61.0) - vite: 8.0.16(@types/node@24.13.2)(esbuild@0.28.1)(jiti@2.7.0)(sass@1.101.0)(terser@5.48.0)(tsx@4.22.4)(yaml@2.9.0) + svelte: 5.56.8(@typescript-eslint/types@8.66.0) + vite: 8.2.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(sass@1.102.0)(terser@5.49.0)(tsx@4.23.9)(yaml@2.9.0) optionalDependencies: '@opentelemetry/api': 1.9.1 - typescript: 6.0.3 + typescript: '@typescript/typescript6@6.0.2' - '@sveltejs/load-config@0.1.1': {} + '@sveltejs/load-config@0.2.2': {} - '@sveltejs/vite-plugin-svelte@7.1.2(svelte@5.56.3(@typescript-eslint/types@8.61.0))(vite@8.0.16(@types/node@24.13.2)(esbuild@0.28.1)(jiti@2.7.0)(sass@1.101.0)(terser@5.48.0)(tsx@4.22.4)(yaml@2.9.0))': + '@sveltejs/vite-plugin-svelte@7.2.0(svelte@5.56.8(@typescript-eslint/types@8.66.0))(vite@8.2.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(sass@1.102.0)(terser@5.49.0)(tsx@4.23.9)(yaml@2.9.0))': dependencies: deepmerge: 4.3.1 magic-string: 0.30.21 obug: 2.1.3 - svelte: 5.56.3(@typescript-eslint/types@8.61.0) - vite: 8.0.16(@types/node@24.13.2)(esbuild@0.28.1)(jiti@2.7.0)(sass@1.101.0)(terser@5.48.0)(tsx@4.22.4)(yaml@2.9.0) - vitefu: 1.1.3(vite@8.0.16(@types/node@24.13.2)(esbuild@0.28.1)(jiti@2.7.0)(sass@1.101.0)(terser@5.48.0)(tsx@4.22.4)(yaml@2.9.0)) + svelte: 5.56.8(@typescript-eslint/types@8.66.0) + vite: 8.2.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(sass@1.102.0)(terser@5.49.0)(tsx@4.23.9)(yaml@2.9.0) + vitefu: 1.1.3(vite@8.2.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(sass@1.102.0)(terser@5.49.0)(tsx@4.23.9)(yaml@2.9.0)) - '@svgr/babel-plugin-add-jsx-attribute@8.0.0(@babel/core@7.29.7)': + '@svgr/babel-plugin-add-jsx-attribute@8.0.0(@babel/core@7.29.7(supports-color@8.1.1))': dependencies: - '@babel/core': 7.29.7 + '@babel/core': 7.29.7(supports-color@8.1.1) - '@svgr/babel-plugin-remove-jsx-attribute@8.0.0(@babel/core@7.29.7)': + '@svgr/babel-plugin-remove-jsx-attribute@8.0.0(@babel/core@7.29.7(supports-color@8.1.1))': dependencies: - '@babel/core': 7.29.7 + '@babel/core': 7.29.7(supports-color@8.1.1) - '@svgr/babel-plugin-remove-jsx-empty-expression@8.0.0(@babel/core@7.29.7)': + '@svgr/babel-plugin-remove-jsx-empty-expression@8.0.0(@babel/core@7.29.7(supports-color@8.1.1))': dependencies: - '@babel/core': 7.29.7 + '@babel/core': 7.29.7(supports-color@8.1.1) - '@svgr/babel-plugin-replace-jsx-attribute-value@8.0.0(@babel/core@7.29.7)': + '@svgr/babel-plugin-replace-jsx-attribute-value@8.0.0(@babel/core@7.29.7(supports-color@8.1.1))': dependencies: - '@babel/core': 7.29.7 + '@babel/core': 7.29.7(supports-color@8.1.1) - '@svgr/babel-plugin-svg-dynamic-title@8.0.0(@babel/core@7.29.7)': + '@svgr/babel-plugin-svg-dynamic-title@8.0.0(@babel/core@7.29.7(supports-color@8.1.1))': dependencies: - '@babel/core': 7.29.7 + '@babel/core': 7.29.7(supports-color@8.1.1) - '@svgr/babel-plugin-svg-em-dimensions@8.0.0(@babel/core@7.29.7)': + '@svgr/babel-plugin-svg-em-dimensions@8.0.0(@babel/core@7.29.7(supports-color@8.1.1))': dependencies: - '@babel/core': 7.29.7 + '@babel/core': 7.29.7(supports-color@8.1.1) - '@svgr/babel-plugin-transform-react-native-svg@8.1.0(@babel/core@7.29.7)': + '@svgr/babel-plugin-transform-react-native-svg@8.1.0(@babel/core@7.29.7(supports-color@8.1.1))': dependencies: - '@babel/core': 7.29.7 + '@babel/core': 7.29.7(supports-color@8.1.1) - '@svgr/babel-plugin-transform-svg-component@8.0.0(@babel/core@7.29.7)': + '@svgr/babel-plugin-transform-svg-component@8.0.0(@babel/core@7.29.7(supports-color@8.1.1))': dependencies: - '@babel/core': 7.29.7 + '@babel/core': 7.29.7(supports-color@8.1.1) - '@svgr/babel-preset@8.1.0(@babel/core@7.29.7)': + '@svgr/babel-preset@8.1.0(@babel/core@7.29.7(supports-color@8.1.1))': dependencies: - '@babel/core': 7.29.7 - '@svgr/babel-plugin-add-jsx-attribute': 8.0.0(@babel/core@7.29.7) - '@svgr/babel-plugin-remove-jsx-attribute': 8.0.0(@babel/core@7.29.7) - '@svgr/babel-plugin-remove-jsx-empty-expression': 8.0.0(@babel/core@7.29.7) - '@svgr/babel-plugin-replace-jsx-attribute-value': 8.0.0(@babel/core@7.29.7) - '@svgr/babel-plugin-svg-dynamic-title': 8.0.0(@babel/core@7.29.7) - '@svgr/babel-plugin-svg-em-dimensions': 8.0.0(@babel/core@7.29.7) - '@svgr/babel-plugin-transform-react-native-svg': 8.1.0(@babel/core@7.29.7) - '@svgr/babel-plugin-transform-svg-component': 8.0.0(@babel/core@7.29.7) + '@babel/core': 7.29.7(supports-color@8.1.1) + '@svgr/babel-plugin-add-jsx-attribute': 8.0.0(@babel/core@7.29.7(supports-color@8.1.1)) + '@svgr/babel-plugin-remove-jsx-attribute': 8.0.0(@babel/core@7.29.7(supports-color@8.1.1)) + '@svgr/babel-plugin-remove-jsx-empty-expression': 8.0.0(@babel/core@7.29.7(supports-color@8.1.1)) + '@svgr/babel-plugin-replace-jsx-attribute-value': 8.0.0(@babel/core@7.29.7(supports-color@8.1.1)) + '@svgr/babel-plugin-svg-dynamic-title': 8.0.0(@babel/core@7.29.7(supports-color@8.1.1)) + '@svgr/babel-plugin-svg-em-dimensions': 8.0.0(@babel/core@7.29.7(supports-color@8.1.1)) + '@svgr/babel-plugin-transform-react-native-svg': 8.1.0(@babel/core@7.29.7(supports-color@8.1.1)) + '@svgr/babel-plugin-transform-svg-component': 8.0.0(@babel/core@7.29.7(supports-color@8.1.1)) - '@svgr/core@8.1.0(typescript@6.0.3)': + '@svgr/core@8.1.0(@typescript/typescript6@6.0.2)(supports-color@8.1.1)': dependencies: - '@babel/core': 7.29.7 - '@svgr/babel-preset': 8.1.0(@babel/core@7.29.7) + '@babel/core': 7.29.7(supports-color@8.1.1) + '@svgr/babel-preset': 8.1.0(@babel/core@7.29.7(supports-color@8.1.1)) camelcase: 6.3.0 - cosmiconfig: 8.3.6(typescript@6.0.3) + cosmiconfig: 8.3.6(@typescript/typescript6@6.0.2) snake-case: 3.0.4 transitivePeerDependencies: - supports-color @@ -17803,92 +17536,92 @@ snapshots: '@babel/types': 7.29.7 entities: 4.5.0 - '@svgr/plugin-jsx@8.1.0(@svgr/core@8.1.0(typescript@6.0.3))': + '@svgr/plugin-jsx@8.1.0(@svgr/core@8.1.0(@typescript/typescript6@6.0.2)(supports-color@8.1.1))(supports-color@8.1.1)': dependencies: - '@babel/core': 7.29.7 - '@svgr/babel-preset': 8.1.0(@babel/core@7.29.7) - '@svgr/core': 8.1.0(typescript@6.0.3) + '@babel/core': 7.29.7(supports-color@8.1.1) + '@svgr/babel-preset': 8.1.0(@babel/core@7.29.7(supports-color@8.1.1)) + '@svgr/core': 8.1.0(@typescript/typescript6@6.0.2)(supports-color@8.1.1) '@svgr/hast-util-to-babel-ast': 8.0.0 svg-parser: 2.0.4 transitivePeerDependencies: - supports-color - '@svgr/plugin-svgo@8.1.0(@svgr/core@8.1.0(typescript@6.0.3))(typescript@6.0.3)': + '@svgr/plugin-svgo@8.1.0(@svgr/core@8.1.0(@typescript/typescript6@6.0.2)(supports-color@8.1.1))(@typescript/typescript6@6.0.2)': dependencies: - '@svgr/core': 8.1.0(typescript@6.0.3) - cosmiconfig: 8.3.6(typescript@6.0.3) + '@svgr/core': 8.1.0(@typescript/typescript6@6.0.2)(supports-color@8.1.1) + cosmiconfig: 8.3.6(@typescript/typescript6@6.0.2) deepmerge: 4.3.1 - svgo: 3.3.3 + svgo: 3.3.4 transitivePeerDependencies: - typescript - '@svgr/webpack@8.1.0(typescript@6.0.3)': + '@svgr/webpack@8.1.0(@typescript/typescript6@6.0.2)(supports-color@8.1.1)': dependencies: - '@babel/core': 7.29.7 - '@babel/plugin-transform-react-constant-elements': 7.29.7(@babel/core@7.29.7) - '@babel/preset-env': 7.29.7(@babel/core@7.29.7) - '@babel/preset-react': 7.29.7(@babel/core@7.29.7) - '@babel/preset-typescript': 7.29.7(@babel/core@7.29.7) - '@svgr/core': 8.1.0(typescript@6.0.3) - '@svgr/plugin-jsx': 8.1.0(@svgr/core@8.1.0(typescript@6.0.3)) - '@svgr/plugin-svgo': 8.1.0(@svgr/core@8.1.0(typescript@6.0.3))(typescript@6.0.3) + '@babel/core': 7.29.7(supports-color@8.1.1) + '@babel/plugin-transform-react-constant-elements': 7.29.7(@babel/core@7.29.7(supports-color@8.1.1)) + '@babel/preset-env': 7.29.7(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1) + '@babel/preset-react': 7.29.7(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1) + '@babel/preset-typescript': 7.29.7(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1) + '@svgr/core': 8.1.0(@typescript/typescript6@6.0.2)(supports-color@8.1.1) + '@svgr/plugin-jsx': 8.1.0(@svgr/core@8.1.0(@typescript/typescript6@6.0.2)(supports-color@8.1.1))(supports-color@8.1.1) + '@svgr/plugin-svgo': 8.1.0(@svgr/core@8.1.0(@typescript/typescript6@6.0.2)(supports-color@8.1.1))(@typescript/typescript6@6.0.2) transitivePeerDependencies: - supports-color - typescript - '@swc/core-darwin-arm64@1.15.41': + '@swc/core-darwin-arm64@1.15.47': optional: true - '@swc/core-darwin-x64@1.15.41': + '@swc/core-darwin-x64@1.15.47': optional: true - '@swc/core-linux-arm-gnueabihf@1.15.41': + '@swc/core-linux-arm-gnueabihf@1.15.47': optional: true - '@swc/core-linux-arm64-gnu@1.15.41': + '@swc/core-linux-arm64-gnu@1.15.47': optional: true - '@swc/core-linux-arm64-musl@1.15.41': + '@swc/core-linux-arm64-musl@1.15.47': optional: true - '@swc/core-linux-ppc64-gnu@1.15.41': + '@swc/core-linux-ppc64-gnu@1.15.47': optional: true - '@swc/core-linux-s390x-gnu@1.15.41': + '@swc/core-linux-s390x-gnu@1.15.47': optional: true - '@swc/core-linux-x64-gnu@1.15.41': + '@swc/core-linux-x64-gnu@1.15.47': optional: true - '@swc/core-linux-x64-musl@1.15.41': + '@swc/core-linux-x64-musl@1.15.47': optional: true - '@swc/core-win32-arm64-msvc@1.15.41': + '@swc/core-win32-arm64-msvc@1.15.47': optional: true - '@swc/core-win32-ia32-msvc@1.15.41': + '@swc/core-win32-ia32-msvc@1.15.47': optional: true - '@swc/core-win32-x64-msvc@1.15.41': + '@swc/core-win32-x64-msvc@1.15.47': optional: true - '@swc/core@1.15.41(@swc/helpers@0.5.23)': + '@swc/core@1.15.47(@swc/helpers@0.5.23)': dependencies: '@swc/counter': 0.1.3 - '@swc/types': 0.1.26 + '@swc/types': 0.1.27 optionalDependencies: - '@swc/core-darwin-arm64': 1.15.41 - '@swc/core-darwin-x64': 1.15.41 - '@swc/core-linux-arm-gnueabihf': 1.15.41 - '@swc/core-linux-arm64-gnu': 1.15.41 - '@swc/core-linux-arm64-musl': 1.15.41 - '@swc/core-linux-ppc64-gnu': 1.15.41 - '@swc/core-linux-s390x-gnu': 1.15.41 - '@swc/core-linux-x64-gnu': 1.15.41 - '@swc/core-linux-x64-musl': 1.15.41 - '@swc/core-win32-arm64-msvc': 1.15.41 - '@swc/core-win32-ia32-msvc': 1.15.41 - '@swc/core-win32-x64-msvc': 1.15.41 + '@swc/core-darwin-arm64': 1.15.47 + '@swc/core-darwin-x64': 1.15.47 + '@swc/core-linux-arm-gnueabihf': 1.15.47 + '@swc/core-linux-arm64-gnu': 1.15.47 + '@swc/core-linux-arm64-musl': 1.15.47 + '@swc/core-linux-ppc64-gnu': 1.15.47 + '@swc/core-linux-s390x-gnu': 1.15.47 + '@swc/core-linux-x64-gnu': 1.15.47 + '@swc/core-linux-x64-musl': 1.15.47 + '@swc/core-win32-arm64-msvc': 1.15.47 + '@swc/core-win32-ia32-msvc': 1.15.47 + '@swc/core-win32-x64-msvc': 1.15.47 '@swc/helpers': 0.5.23 '@swc/counter@0.1.3': {} @@ -17897,7 +17630,7 @@ snapshots: dependencies: tslib: 2.8.1 - '@swc/types@0.1.26': + '@swc/types@0.1.27': dependencies: '@swc/counter': 0.1.3 @@ -17905,73 +17638,73 @@ snapshots: dependencies: defer-to-connect: 2.0.1 - '@tailwindcss/node@4.3.1': + '@tailwindcss/node@4.3.3': dependencies: '@jridgewell/remapping': 2.3.5 - enhanced-resolve: 5.21.6 + enhanced-resolve: 5.24.4 jiti: 2.7.0 lightningcss: 1.32.0 magic-string: 0.30.21 source-map-js: 1.2.1 - tailwindcss: 4.3.1 + tailwindcss: 4.3.3 - '@tailwindcss/oxide-android-arm64@4.3.1': + '@tailwindcss/oxide-android-arm64@4.3.3': optional: true - '@tailwindcss/oxide-darwin-arm64@4.3.1': + '@tailwindcss/oxide-darwin-arm64@4.3.3': optional: true - '@tailwindcss/oxide-darwin-x64@4.3.1': + '@tailwindcss/oxide-darwin-x64@4.3.3': optional: true - '@tailwindcss/oxide-freebsd-x64@4.3.1': + '@tailwindcss/oxide-freebsd-x64@4.3.3': optional: true - '@tailwindcss/oxide-linux-arm-gnueabihf@4.3.1': + '@tailwindcss/oxide-linux-arm-gnueabihf@4.3.3': optional: true - '@tailwindcss/oxide-linux-arm64-gnu@4.3.1': + '@tailwindcss/oxide-linux-arm64-gnu@4.3.3': optional: true - '@tailwindcss/oxide-linux-arm64-musl@4.3.1': + '@tailwindcss/oxide-linux-arm64-musl@4.3.3': optional: true - '@tailwindcss/oxide-linux-x64-gnu@4.3.1': + '@tailwindcss/oxide-linux-x64-gnu@4.3.3': optional: true - '@tailwindcss/oxide-linux-x64-musl@4.3.1': + '@tailwindcss/oxide-linux-x64-musl@4.3.3': optional: true - '@tailwindcss/oxide-wasm32-wasi@4.3.1': + '@tailwindcss/oxide-wasm32-wasi@4.3.3': optional: true - '@tailwindcss/oxide-win32-arm64-msvc@4.3.1': + '@tailwindcss/oxide-win32-arm64-msvc@4.3.3': optional: true - '@tailwindcss/oxide-win32-x64-msvc@4.3.1': + '@tailwindcss/oxide-win32-x64-msvc@4.3.3': optional: true - '@tailwindcss/oxide@4.3.1': + '@tailwindcss/oxide@4.3.3': optionalDependencies: - '@tailwindcss/oxide-android-arm64': 4.3.1 - '@tailwindcss/oxide-darwin-arm64': 4.3.1 - '@tailwindcss/oxide-darwin-x64': 4.3.1 - '@tailwindcss/oxide-freebsd-x64': 4.3.1 - '@tailwindcss/oxide-linux-arm-gnueabihf': 4.3.1 - '@tailwindcss/oxide-linux-arm64-gnu': 4.3.1 - '@tailwindcss/oxide-linux-arm64-musl': 4.3.1 - '@tailwindcss/oxide-linux-x64-gnu': 4.3.1 - '@tailwindcss/oxide-linux-x64-musl': 4.3.1 - '@tailwindcss/oxide-wasm32-wasi': 4.3.1 - '@tailwindcss/oxide-win32-arm64-msvc': 4.3.1 - '@tailwindcss/oxide-win32-x64-msvc': 4.3.1 + '@tailwindcss/oxide-android-arm64': 4.3.3 + '@tailwindcss/oxide-darwin-arm64': 4.3.3 + '@tailwindcss/oxide-darwin-x64': 4.3.3 + '@tailwindcss/oxide-freebsd-x64': 4.3.3 + '@tailwindcss/oxide-linux-arm-gnueabihf': 4.3.3 + '@tailwindcss/oxide-linux-arm64-gnu': 4.3.3 + '@tailwindcss/oxide-linux-arm64-musl': 4.3.3 + '@tailwindcss/oxide-linux-x64-gnu': 4.3.3 + '@tailwindcss/oxide-linux-x64-musl': 4.3.3 + '@tailwindcss/oxide-wasm32-wasi': 4.3.3 + '@tailwindcss/oxide-win32-arm64-msvc': 4.3.3 + '@tailwindcss/oxide-win32-x64-msvc': 4.3.3 - '@tailwindcss/vite@4.3.1(vite@8.0.16(@types/node@24.13.2)(esbuild@0.28.1)(jiti@2.7.0)(sass@1.101.0)(terser@5.48.0)(tsx@4.22.4)(yaml@2.9.0))': + '@tailwindcss/vite@4.3.3(vite@8.2.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(sass@1.102.0)(terser@5.49.0)(tsx@4.23.9)(yaml@2.9.0))': dependencies: - '@tailwindcss/node': 4.3.1 - '@tailwindcss/oxide': 4.3.1 - tailwindcss: 4.3.1 - vite: 8.0.16(@types/node@24.13.2)(esbuild@0.28.1)(jiti@2.7.0)(sass@1.101.0)(terser@5.48.0)(tsx@4.22.4)(yaml@2.9.0) + '@tailwindcss/node': 4.3.3 + '@tailwindcss/oxide': 4.3.3 + tailwindcss: 4.3.3 + vite: 8.2.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(sass@1.102.0)(terser@5.49.0)(tsx@4.23.9)(yaml@2.9.0) '@testing-library/dom@10.4.1': dependencies: @@ -17984,55 +17717,56 @@ snapshots: picocolors: 1.1.1 pretty-format: 27.5.1 - '@testing-library/jest-dom@6.9.1': + '@testing-library/jest-dom@7.0.0(@testing-library/dom@10.4.1)': dependencies: '@adobe/css-tools': 4.5.0 + '@testing-library/dom': 10.4.1 aria-query: 5.3.1 css.escape: 1.5.1 dom-accessibility-api: 0.6.3 picocolors: 1.1.1 redent: 3.0.0 - '@testing-library/svelte-core@1.0.0(svelte@5.56.3(@typescript-eslint/types@8.61.0))': + '@testing-library/svelte-core@1.1.3(svelte@5.56.8(@typescript-eslint/types@8.66.0))': dependencies: - svelte: 5.56.3(@typescript-eslint/types@8.61.0) + svelte: 5.56.8(@typescript-eslint/types@8.66.0) - '@testing-library/svelte@5.3.1(svelte@5.56.3(@typescript-eslint/types@8.61.0))(vite@8.0.16(@types/node@24.13.2)(esbuild@0.28.1)(jiti@2.7.0)(sass@1.101.0)(terser@5.48.0)(tsx@4.22.4)(yaml@2.9.0))(vitest@4.1.9)': + '@testing-library/svelte@5.4.2(svelte@5.56.8(@typescript-eslint/types@8.66.0))(vite@8.2.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(sass@1.102.0)(terser@5.49.0)(tsx@4.23.9)(yaml@2.9.0))(vitest@4.1.10)': dependencies: '@testing-library/dom': 10.4.1 - '@testing-library/svelte-core': 1.0.0(svelte@5.56.3(@typescript-eslint/types@8.61.0)) - svelte: 5.56.3(@typescript-eslint/types@8.61.0) + '@testing-library/svelte-core': 1.1.3(svelte@5.56.8(@typescript-eslint/types@8.66.0)) + svelte: 5.56.8(@typescript-eslint/types@8.66.0) optionalDependencies: - vite: 8.0.16(@types/node@24.13.2)(esbuild@0.28.1)(jiti@2.7.0)(sass@1.101.0)(terser@5.48.0)(tsx@4.22.4)(yaml@2.9.0) - vitest: 4.1.9(@opentelemetry/api@1.9.1)(@types/node@24.13.2)(@vitest/coverage-v8@4.1.9)(happy-dom@20.10.3)(jsdom@26.1.0(canvas@3.2.3))(vite@8.0.16(@types/node@24.13.2)(esbuild@0.28.1)(jiti@2.7.0)(sass@1.101.0)(terser@5.48.0)(tsx@4.22.4)(yaml@2.9.0)) + vite: 8.2.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(sass@1.102.0)(terser@5.49.0)(tsx@4.23.9)(yaml@2.9.0) + vitest: 4.1.10(@opentelemetry/api@1.9.1)(@types/node@24.13.3)(@vitest/coverage-v8@4.1.10)(happy-dom@20.11.1)(jsdom@26.1.0(canvas@3.2.3)(supports-color@8.1.1))(vite@8.2.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(sass@1.102.0)(terser@5.49.0)(tsx@4.23.9)(yaml@2.9.0)) - '@testing-library/user-event@14.6.1(@testing-library/dom@10.4.1)': + '@testing-library/user-event@14.6.3(@testing-library/dom@10.4.1)': dependencies: '@testing-library/dom': 10.4.1 - '@tokenizer/inflate@0.4.1': + '@tokenizer/inflate@0.4.1(supports-color@8.1.1)': dependencies: - debug: 4.4.3 + debug: 4.4.3(supports-color@8.1.1) token-types: 6.1.2 transitivePeerDependencies: - supports-color '@tokenizer/token@0.3.0': {} - '@trivago/prettier-plugin-sort-imports@6.0.2(prettier-plugin-svelte@4.1.0(prettier@3.8.4)(svelte@5.56.3(@typescript-eslint/types@8.61.0)))(prettier@3.8.4)(svelte@5.56.3(@typescript-eslint/types@8.61.0))': + '@trivago/prettier-plugin-sort-imports@6.0.2(prettier-plugin-svelte@4.1.1(prettier@3.9.6)(svelte@5.56.8(@typescript-eslint/types@8.66.0)))(prettier@3.9.6)(supports-color@8.1.1)(svelte@5.56.8(@typescript-eslint/types@8.66.0))': dependencies: '@babel/generator': 7.29.7 '@babel/parser': 7.29.7 - '@babel/traverse': 7.29.7 + '@babel/traverse': 7.29.7(supports-color@8.1.1) '@babel/types': 7.29.7 javascript-natural-sort: 0.7.1 lodash-es: 4.18.1 minimatch: 9.0.9 parse-imports-exports: 0.2.4 - prettier: 3.8.4 + prettier: 3.9.6 optionalDependencies: - prettier-plugin-svelte: 4.1.0(prettier@3.8.4)(svelte@5.56.3(@typescript-eslint/types@8.61.0)) - svelte: 5.56.3(@typescript-eslint/types@8.61.0) + prettier-plugin-svelte: 4.1.1(prettier@3.9.6)(svelte@5.56.8(@typescript-eslint/types@8.66.0)) + svelte: 5.56.8(@typescript-eslint/types@8.66.0) transitivePeerDependencies: - supports-color @@ -18055,14 +17789,9 @@ snapshots: '@types/geojson': 7946.0.16 tslib: 2.8.1 - '@tybys/wasm-util@0.10.2': - dependencies: - tslib: 2.8.1 - optional: true - '@types/accepts@1.3.7': dependencies: - '@types/node': 24.13.2 + '@types/node': 24.13.3 '@types/archiver@7.0.0': dependencies: @@ -18074,16 +17803,16 @@ snapshots: '@types/bcrypt@6.0.0': dependencies: - '@types/node': 24.13.2 + '@types/node': 24.13.3 '@types/body-parser@1.19.6': dependencies: '@types/connect': 3.4.38 - '@types/node': 24.13.2 + '@types/node': 24.13.3 '@types/bonjour@3.5.13': dependencies: - '@types/node': 24.13.2 + '@types/node': 24.13.3 '@types/braces@3.0.5': {} @@ -18105,21 +17834,21 @@ snapshots: '@types/cli-progress@3.11.6': dependencies: - '@types/node': 24.13.2 + '@types/node': 24.13.3 '@types/compression@1.8.1': dependencies: '@types/express': 5.0.6 - '@types/node': 24.13.2 + '@types/node': 24.13.3 '@types/connect-history-api-fallback@1.5.4': dependencies: '@types/express-serve-static-core': 5.1.1 - '@types/node': 24.13.2 + '@types/node': 24.13.3 '@types/connect@3.4.38': dependencies: - '@types/node': 24.13.2 + '@types/node': 24.13.3 '@types/content-disposition@0.5.9': {} @@ -18136,11 +17865,11 @@ snapshots: '@types/connect': 3.4.38 '@types/express': 5.0.6 '@types/keygrip': 1.0.6 - '@types/node': 24.13.2 + '@types/node': 24.13.3 '@types/cors@2.8.19': dependencies: - '@types/node': 24.13.2 + '@types/node': 24.13.3 '@types/d3-array@3.2.2': {} @@ -18197,7 +17926,7 @@ snapshots: '@types/d3-quadtree@3.0.6': {} - '@types/d3-random@3.0.3': {} + '@types/d3-random@3.0.4': {} '@types/d3-scale-chromatic@3.1.0': {} @@ -18248,7 +17977,7 @@ snapshots: '@types/d3-path': 3.1.1 '@types/d3-polygon': 3.0.2 '@types/d3-quadtree': 3.0.6 - '@types/d3-random': 3.0.3 + '@types/d3-random': 3.0.4 '@types/d3-scale': 4.0.9 '@types/d3-scale-chromatic': 3.1.0 '@types/d3-selection': 3.0.11 @@ -18267,13 +17996,13 @@ snapshots: '@types/docker-modem@3.0.6': dependencies: - '@types/node': 24.13.2 + '@types/node': 24.13.3 '@types/ssh2': 1.15.5 '@types/dockerode@4.0.1': dependencies: '@types/docker-modem': 3.0.6 - '@types/node': 24.13.2 + '@types/node': 24.13.3 '@types/ssh2': 1.15.5 '@types/dom-to-image@2.6.7': {} @@ -18296,16 +18025,16 @@ snapshots: '@types/estree@1.0.9': {} - '@types/express-serve-static-core@4.19.8': + '@types/express-serve-static-core@4.19.9': dependencies: - '@types/node': 24.13.2 + '@types/node': 24.13.3 '@types/qs': 6.15.1 '@types/range-parser': 1.2.7 '@types/send': 1.2.1 '@types/express-serve-static-core@5.1.1': dependencies: - '@types/node': 24.13.2 + '@types/node': 24.13.3 '@types/qs': 6.15.1 '@types/range-parser': 1.2.7 '@types/send': 1.2.1 @@ -18313,7 +18042,7 @@ snapshots: '@types/express@4.17.25': dependencies: '@types/body-parser': 1.19.6 - '@types/express-serve-static-core': 4.19.8 + '@types/express-serve-static-core': 4.19.9 '@types/qs': 6.15.1 '@types/serve-static': 1.15.10 @@ -18331,19 +18060,17 @@ snapshots: '@types/fluent-ffmpeg@2.1.28': dependencies: - '@types/node': 24.13.2 + '@types/node': 24.13.3 '@types/geojson@7946.0.16': {} - '@types/gtag.js@0.0.20': {} - '@types/har-format@1.2.16': {} '@types/hast@2.3.10': dependencies: '@types/unist': 2.0.11 - '@types/hast@3.0.4': + '@types/hast@3.0.5': dependencies: '@types/unist': 3.0.3 @@ -18359,7 +18086,7 @@ snapshots: '@types/http-proxy@1.17.17': dependencies: - '@types/node': 24.13.2 + '@types/node': 24.13.3 '@types/inquirer@8.2.13': dependencies: @@ -18383,7 +18110,7 @@ snapshots: '@types/jsonwebtoken@9.0.10': dependencies: '@types/ms': 2.1.0 - '@types/node': 24.13.2 + '@types/node': 24.13.3 '@types/justified-layout@4.1.4': {} @@ -18402,7 +18129,7 @@ snapshots: '@types/http-errors': 2.0.5 '@types/keygrip': 1.0.6 '@types/koa-compose': 3.2.9 - '@types/node': 24.13.2 + '@types/node': 24.13.3 '@types/leaflet@1.9.21': dependencies: @@ -18410,11 +18137,11 @@ snapshots: '@types/lodash-es@4.17.12': dependencies: - '@types/lodash': 4.17.24 + '@types/lodash': 4.17.25 - '@types/lodash@4.17.24': {} + '@types/lodash@4.17.25': {} - '@types/luxon@3.7.1': {} + '@types/luxon@3.7.3': {} '@types/mdast@4.0.4': dependencies: @@ -18432,11 +18159,11 @@ snapshots: '@types/mock-fs@4.13.4': dependencies: - '@types/node': 24.13.2 + '@types/node': 24.13.3 '@types/ms@2.1.0': {} - '@types/multer@2.1.0': + '@types/multer@2.2.0': dependencies: '@types/express': 5.0.6 @@ -18446,49 +18173,49 @@ snapshots: dependencies: undici-types: 5.26.5 - '@types/node@24.13.2': + '@types/node@24.13.3': dependencies: undici-types: 7.18.2 '@types/nodemailer@8.0.1': dependencies: - '@types/node': 24.13.2 + '@types/node': 24.13.3 - '@types/oidc-provider@9.5.0': + '@types/oidc-provider@9.11.0': dependencies: '@types/keygrip': 1.0.6 '@types/koa': 3.0.3 - '@types/node': 24.13.2 + '@types/node': 24.13.3 '@types/parse5@5.0.3': {} '@types/pg-pool@2.0.7': dependencies: - '@types/pg': 8.20.0 + '@types/pg': 8.20.4 '@types/pg@8.15.6': dependencies: - '@types/node': 24.13.2 - pg-protocol: 1.14.0 + '@types/node': 24.13.3 + pg-protocol: 1.16.0 pg-types: 2.2.0 - '@types/pg@8.20.0': + '@types/pg@8.20.4': dependencies: - '@types/node': 24.13.2 - pg-protocol: 1.14.0 + '@types/node': 24.13.3 + pg-protocol: 1.16.0 pg-types: 2.2.0 '@types/picomatch@4.0.3': {} '@types/pngjs@6.0.5': dependencies: - '@types/node': 24.13.2 + '@types/node': 24.13.3 '@types/prismjs@1.26.6': {} '@types/qrcode@1.5.6': dependencies: - '@types/node': 24.13.2 + '@types/node': 24.13.3 '@types/qs@6.15.1': {} @@ -18497,44 +18224,44 @@ snapshots: '@types/react-router-config@5.0.11': dependencies: '@types/history': 4.7.11 - '@types/react': 19.2.17 + '@types/react': 19.2.18 '@types/react-router': 5.1.20 '@types/react-router-dom@5.3.3': dependencies: '@types/history': 4.7.11 - '@types/react': 19.2.17 + '@types/react': 19.2.18 '@types/react-router': 5.1.20 '@types/react-router@5.1.20': dependencies: '@types/history': 4.7.11 - '@types/react': 19.2.17 + '@types/react': 19.2.18 - '@types/react@19.2.17': + '@types/react@19.2.18': dependencies: csstype: 3.2.3 '@types/readdir-glob@1.1.5': dependencies: - '@types/node': 24.13.2 + '@types/node': 24.13.3 '@types/retry@0.12.2': {} '@types/sax@1.2.7': dependencies: - '@types/node': 24.13.2 + '@types/node': 24.13.3 - '@types/semver@7.7.1': {} + '@types/semver@7.8.0': {} '@types/send@0.17.6': dependencies: '@types/mime': 1.3.5 - '@types/node': 24.13.2 + '@types/node': 24.13.3 '@types/send@1.2.1': dependencies: - '@types/node': 24.13.2 + '@types/node': 24.13.3 '@types/serve-index@1.9.4': dependencies: @@ -18543,46 +18270,46 @@ snapshots: '@types/serve-static@1.15.10': dependencies: '@types/http-errors': 2.0.5 - '@types/node': 24.13.2 + '@types/node': 24.13.3 '@types/send': 0.17.6 '@types/serve-static@2.2.0': dependencies: '@types/http-errors': 2.0.5 - '@types/node': 24.13.2 + '@types/node': 24.13.3 '@types/sockjs@0.3.36': dependencies: - '@types/node': 24.13.2 + '@types/node': 24.13.3 '@types/ssh2-streams@0.1.13': dependencies: - '@types/node': 24.13.2 + '@types/node': 24.13.3 '@types/ssh2@0.5.52': dependencies: - '@types/node': 24.13.2 + '@types/node': 24.13.3 '@types/ssh2-streams': 0.1.13 '@types/ssh2@1.15.5': dependencies: '@types/node': 18.19.130 - '@types/superagent@8.1.10': + '@types/superagent@8.1.11': dependencies: '@types/cookiejar': 2.1.5 '@types/methods': 1.1.4 - '@types/node': 24.13.2 + '@types/node': 24.13.3 form-data: 4.0.6 - '@types/supertest@7.2.0': + '@types/supertest@7.2.1': dependencies: '@types/methods': 1.1.4 - '@types/superagent': 8.1.10 + '@types/superagent': 8.1.11 '@types/through@0.0.33': dependencies: - '@types/node': 24.13.2 + '@types/node': 24.13.3 '@types/trusted-types@2.0.7': {} @@ -18598,7 +18325,7 @@ snapshots: '@types/ws@8.18.1': dependencies: - '@types/node': 24.13.2 + '@types/node': 24.13.3 '@types/yargs-parser@21.0.3': {} @@ -18606,216 +18333,280 @@ snapshots: dependencies: '@types/yargs-parser': 21.0.3 - '@typescript-eslint/eslint-plugin@8.61.0(@typescript-eslint/parser@8.61.0(eslint@10.5.0(jiti@2.7.0))(typescript@6.0.3))(eslint@10.5.0(jiti@2.7.0))(typescript@6.0.3)': + '@typescript-eslint/eslint-plugin@8.66.0(@typescript-eslint/parser@8.66.0(@typescript/typescript6@6.0.2)(eslint@10.8.0(jiti@2.7.0)(supports-color@8.1.1))(supports-color@8.1.1))(@typescript/typescript6@6.0.2)(eslint@10.8.0(jiti@2.7.0)(supports-color@8.1.1))(supports-color@8.1.1)': dependencies: '@eslint-community/regexpp': 4.12.2 - '@typescript-eslint/parser': 8.61.0(eslint@10.5.0(jiti@2.7.0))(typescript@6.0.3) - '@typescript-eslint/scope-manager': 8.61.0 - '@typescript-eslint/type-utils': 8.61.0(eslint@10.5.0(jiti@2.7.0))(typescript@6.0.3) - '@typescript-eslint/utils': 8.61.0(eslint@10.5.0(jiti@2.7.0))(typescript@6.0.3) - '@typescript-eslint/visitor-keys': 8.61.0 - eslint: 10.5.0(jiti@2.7.0) - ignore: 7.0.5 + '@typescript-eslint/parser': 8.66.0(@typescript/typescript6@6.0.2)(eslint@10.8.0(jiti@2.7.0)(supports-color@8.1.1))(supports-color@8.1.1) + '@typescript-eslint/scope-manager': 8.66.0 + '@typescript-eslint/type-utils': 8.66.0(@typescript/typescript6@6.0.2)(eslint@10.8.0(jiti@2.7.0)(supports-color@8.1.1))(supports-color@8.1.1) + '@typescript-eslint/utils': 8.66.0(@typescript/typescript6@6.0.2)(eslint@10.8.0(jiti@2.7.0)(supports-color@8.1.1))(supports-color@8.1.1) + '@typescript-eslint/visitor-keys': 8.66.0 + eslint: 10.8.0(jiti@2.7.0)(supports-color@8.1.1) + ignore: 7.0.6 natural-compare: 1.4.0 - ts-api-utils: 2.5.0(typescript@6.0.3) - typescript: 6.0.3 + ts-api-utils: 2.5.0(@typescript/typescript6@6.0.2) + typescript: '@typescript/typescript6@6.0.2' transitivePeerDependencies: - supports-color - '@typescript-eslint/parser@8.61.0(eslint@10.5.0(jiti@2.7.0))(typescript@6.0.3)': + '@typescript-eslint/parser@8.66.0(@typescript/typescript6@6.0.2)(eslint@10.8.0(jiti@2.7.0)(supports-color@8.1.1))(supports-color@8.1.1)': dependencies: - '@typescript-eslint/scope-manager': 8.61.0 - '@typescript-eslint/types': 8.61.0 - '@typescript-eslint/typescript-estree': 8.61.0(typescript@6.0.3) - '@typescript-eslint/visitor-keys': 8.61.0 - debug: 4.4.3 - eslint: 10.5.0(jiti@2.7.0) - typescript: 6.0.3 + '@typescript-eslint/scope-manager': 8.66.0 + '@typescript-eslint/types': 8.66.0 + '@typescript-eslint/typescript-estree': 8.66.0(@typescript/typescript6@6.0.2)(supports-color@8.1.1) + '@typescript-eslint/visitor-keys': 8.66.0 + debug: 4.4.3(supports-color@8.1.1) + eslint: 10.8.0(jiti@2.7.0)(supports-color@8.1.1) + typescript: '@typescript/typescript6@6.0.2' transitivePeerDependencies: - supports-color - '@typescript-eslint/project-service@8.61.0(typescript@6.0.3)': + '@typescript-eslint/project-service@8.66.0(@typescript/typescript6@6.0.2)(supports-color@8.1.1)': dependencies: - '@typescript-eslint/tsconfig-utils': 8.61.0(typescript@6.0.3) - '@typescript-eslint/types': 8.61.0 - debug: 4.4.3 - typescript: 6.0.3 + '@typescript-eslint/tsconfig-utils': 8.66.0(@typescript/typescript6@6.0.2) + '@typescript-eslint/types': 8.66.0 + debug: 4.4.3(supports-color@8.1.1) + typescript: '@typescript/typescript6@6.0.2' transitivePeerDependencies: - supports-color - '@typescript-eslint/scope-manager@8.61.0': + '@typescript-eslint/scope-manager@8.66.0': dependencies: - '@typescript-eslint/types': 8.61.0 - '@typescript-eslint/visitor-keys': 8.61.0 + '@typescript-eslint/types': 8.66.0 + '@typescript-eslint/visitor-keys': 8.66.0 - '@typescript-eslint/tsconfig-utils@8.61.0(typescript@6.0.3)': + '@typescript-eslint/tsconfig-utils@8.66.0(@typescript/typescript6@6.0.2)': dependencies: - typescript: 6.0.3 + typescript: '@typescript/typescript6@6.0.2' - '@typescript-eslint/type-utils@8.61.0(eslint@10.5.0(jiti@2.7.0))(typescript@6.0.3)': + '@typescript-eslint/type-utils@8.66.0(@typescript/typescript6@6.0.2)(eslint@10.8.0(jiti@2.7.0)(supports-color@8.1.1))(supports-color@8.1.1)': dependencies: - '@typescript-eslint/types': 8.61.0 - '@typescript-eslint/typescript-estree': 8.61.0(typescript@6.0.3) - '@typescript-eslint/utils': 8.61.0(eslint@10.5.0(jiti@2.7.0))(typescript@6.0.3) - debug: 4.4.3 - eslint: 10.5.0(jiti@2.7.0) - ts-api-utils: 2.5.0(typescript@6.0.3) - typescript: 6.0.3 + '@typescript-eslint/types': 8.66.0 + '@typescript-eslint/typescript-estree': 8.66.0(@typescript/typescript6@6.0.2)(supports-color@8.1.1) + '@typescript-eslint/utils': 8.66.0(@typescript/typescript6@6.0.2)(eslint@10.8.0(jiti@2.7.0)(supports-color@8.1.1))(supports-color@8.1.1) + debug: 4.4.3(supports-color@8.1.1) + eslint: 10.8.0(jiti@2.7.0)(supports-color@8.1.1) + ts-api-utils: 2.5.0(@typescript/typescript6@6.0.2) + typescript: '@typescript/typescript6@6.0.2' transitivePeerDependencies: - supports-color - '@typescript-eslint/types@8.61.0': {} + '@typescript-eslint/types@8.66.0': {} - '@typescript-eslint/typescript-estree@8.61.0(typescript@6.0.3)': + '@typescript-eslint/typescript-estree@8.66.0(@typescript/typescript6@6.0.2)(supports-color@8.1.1)': dependencies: - '@typescript-eslint/project-service': 8.61.0(typescript@6.0.3) - '@typescript-eslint/tsconfig-utils': 8.61.0(typescript@6.0.3) - '@typescript-eslint/types': 8.61.0 - '@typescript-eslint/visitor-keys': 8.61.0 - debug: 4.4.3 - minimatch: 10.2.5 - semver: 7.8.4 + '@typescript-eslint/project-service': 8.66.0(@typescript/typescript6@6.0.2)(supports-color@8.1.1) + '@typescript-eslint/tsconfig-utils': 8.66.0(@typescript/typescript6@6.0.2) + '@typescript-eslint/types': 8.66.0 + '@typescript-eslint/visitor-keys': 8.66.0 + debug: 4.4.3(supports-color@8.1.1) + minimatch: 10.2.6 + semver: 7.8.5 tinyglobby: 0.2.17 - ts-api-utils: 2.5.0(typescript@6.0.3) - typescript: 6.0.3 + ts-api-utils: 2.5.0(@typescript/typescript6@6.0.2) + typescript: '@typescript/typescript6@6.0.2' transitivePeerDependencies: - supports-color - '@typescript-eslint/utils@8.61.0(eslint@10.5.0(jiti@2.7.0))(typescript@6.0.3)': + '@typescript-eslint/utils@8.66.0(@typescript/typescript6@6.0.2)(eslint@10.8.0(jiti@2.7.0)(supports-color@8.1.1))(supports-color@8.1.1)': dependencies: - '@eslint-community/eslint-utils': 4.9.1(eslint@10.5.0(jiti@2.7.0)) - '@typescript-eslint/scope-manager': 8.61.0 - '@typescript-eslint/types': 8.61.0 - '@typescript-eslint/typescript-estree': 8.61.0(typescript@6.0.3) - eslint: 10.5.0(jiti@2.7.0) - typescript: 6.0.3 + '@eslint-community/eslint-utils': 4.10.1(eslint@10.8.0(jiti@2.7.0)(supports-color@8.1.1)) + '@typescript-eslint/scope-manager': 8.66.0 + '@typescript-eslint/types': 8.66.0 + '@typescript-eslint/typescript-estree': 8.66.0(@typescript/typescript6@6.0.2)(supports-color@8.1.1) + eslint: 10.8.0(jiti@2.7.0)(supports-color@8.1.1) + typescript: '@typescript/typescript6@6.0.2' transitivePeerDependencies: - supports-color - '@typescript-eslint/visitor-keys@8.61.0': + '@typescript-eslint/visitor-keys@8.66.0': dependencies: - '@typescript-eslint/types': 8.61.0 + '@typescript-eslint/types': 8.66.0 eslint-visitor-keys: 5.0.1 - '@ungap/structured-clone@1.3.1': {} + '@typescript/typescript-aix-ppc64@7.0.2': + optional: true + + '@typescript/typescript-darwin-arm64@7.0.2': + optional: true + + '@typescript/typescript-darwin-x64@7.0.2': + optional: true + + '@typescript/typescript-freebsd-arm64@7.0.2': + optional: true + + '@typescript/typescript-freebsd-x64@7.0.2': + optional: true + + '@typescript/typescript-linux-arm64@7.0.2': + optional: true + + '@typescript/typescript-linux-arm@7.0.2': + optional: true + + '@typescript/typescript-linux-loong64@7.0.2': + optional: true + + '@typescript/typescript-linux-mips64el@7.0.2': + optional: true + + '@typescript/typescript-linux-ppc64@7.0.2': + optional: true + + '@typescript/typescript-linux-riscv64@7.0.2': + optional: true + + '@typescript/typescript-linux-s390x@7.0.2': + optional: true + + '@typescript/typescript-linux-x64@7.0.2': + optional: true + + '@typescript/typescript-netbsd-arm64@7.0.2': + optional: true + + '@typescript/typescript-netbsd-x64@7.0.2': + optional: true + + '@typescript/typescript-openbsd-arm64@7.0.2': + optional: true + + '@typescript/typescript-openbsd-x64@7.0.2': + optional: true + + '@typescript/typescript-sunos-x64@7.0.2': + optional: true + + '@typescript/typescript-win32-arm64@7.0.2': + optional: true + + '@typescript/typescript-win32-x64@7.0.2': + optional: true + + '@typescript/typescript6@6.0.2': + dependencies: + '@typescript/old': typescript@6.0.3 + + '@ungap/structured-clone@1.3.3': {} '@upsetjs/venn.js@2.0.0': optionalDependencies: d3-selection: 3.0.0 d3-transition: 3.0.1(d3-selection@3.0.0) - '@valibot/to-json-schema@1.7.1(valibot@1.4.1(typescript@6.0.3))': + '@valibot/to-json-schema@1.7.1(valibot@1.4.2(@typescript/typescript6@6.0.2))': dependencies: - valibot: 1.4.1(typescript@6.0.3) + valibot: 1.4.2(@typescript/typescript6@6.0.2) - '@vitest/coverage-v8@4.1.9(vitest@3.2.6(@types/debug@4.1.13)(@types/node@24.13.2)(happy-dom@20.10.3)(jiti@2.7.0)(jsdom@26.1.0(canvas@3.2.3))(lightningcss@1.32.0)(sass@1.101.0)(terser@5.48.0)(tsx@4.22.4)(yaml@2.9.0))': + '@vitest/coverage-v8@4.1.10(vitest@3.2.7(@types/debug@4.1.13)(@types/node@24.13.3)(happy-dom@20.11.1)(jiti@2.7.0)(jsdom@26.1.0(canvas@3.2.3)(supports-color@8.1.1))(lightningcss@1.33.0)(sass@1.102.0)(supports-color@8.1.1)(terser@5.49.0)(tsx@4.23.9)(yaml@2.9.0))': dependencies: '@bcoe/v8-coverage': 1.0.2 - '@vitest/utils': 4.1.9 + '@vitest/utils': 4.1.10 ast-v8-to-istanbul: 1.0.4 istanbul-lib-coverage: 3.2.2 istanbul-lib-report: 3.0.1 istanbul-reports: 3.2.0 magicast: 0.5.3 obug: 2.1.3 - std-env: 4.1.0 + std-env: 4.2.0 tinyrainbow: 3.1.0 - vitest: 3.2.6(@types/debug@4.1.13)(@types/node@24.13.2)(happy-dom@20.10.3)(jiti@2.7.0)(jsdom@26.1.0(canvas@3.2.3))(lightningcss@1.32.0)(sass@1.101.0)(terser@5.48.0)(tsx@4.22.4)(yaml@2.9.0) + vitest: 3.2.7(@types/debug@4.1.13)(@types/node@24.13.3)(happy-dom@20.11.1)(jiti@2.7.0)(jsdom@26.1.0(canvas@3.2.3)(supports-color@8.1.1))(lightningcss@1.33.0)(sass@1.102.0)(supports-color@8.1.1)(terser@5.49.0)(tsx@4.23.9)(yaml@2.9.0) - '@vitest/coverage-v8@4.1.9(vitest@4.1.9)': + '@vitest/coverage-v8@4.1.10(vitest@4.1.10)': dependencies: '@bcoe/v8-coverage': 1.0.2 - '@vitest/utils': 4.1.9 + '@vitest/utils': 4.1.10 ast-v8-to-istanbul: 1.0.4 istanbul-lib-coverage: 3.2.2 istanbul-lib-report: 3.0.1 istanbul-reports: 3.2.0 magicast: 0.5.3 obug: 2.1.3 - std-env: 4.1.0 + std-env: 4.2.0 tinyrainbow: 3.1.0 - vitest: 4.1.9(@opentelemetry/api@1.9.1)(@types/node@24.13.2)(@vitest/coverage-v8@4.1.9)(happy-dom@20.10.3)(jsdom@26.1.0(canvas@3.2.3))(vite@8.0.16(@types/node@24.13.2)(esbuild@0.28.1)(jiti@2.7.0)(sass@1.101.0)(terser@5.48.0)(tsx@4.22.4)(yaml@2.9.0)) + vitest: 4.1.10(@opentelemetry/api@1.9.1)(@types/node@24.13.3)(@vitest/coverage-v8@4.1.10)(happy-dom@20.11.1)(jsdom@26.1.0(canvas@3.2.3)(supports-color@8.1.1))(vite@8.2.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(sass@1.102.0)(terser@5.49.0)(tsx@4.23.9)(yaml@2.9.0)) - '@vitest/expect@3.2.6': + '@vitest/expect@3.2.7': dependencies: '@types/chai': 5.2.3 - '@vitest/spy': 3.2.6 - '@vitest/utils': 3.2.6 + '@vitest/spy': 3.2.7 + '@vitest/utils': 3.2.7 chai: 5.3.3 tinyrainbow: 2.0.0 - '@vitest/expect@4.1.9': + '@vitest/expect@4.1.10': dependencies: '@standard-schema/spec': 1.1.0 '@types/chai': 5.2.3 - '@vitest/spy': 4.1.9 - '@vitest/utils': 4.1.9 + '@vitest/spy': 4.1.10 + '@vitest/utils': 4.1.10 chai: 6.2.2 tinyrainbow: 3.1.0 - '@vitest/mocker@3.2.6(vite@7.3.5(@types/node@24.13.2)(jiti@2.7.0)(lightningcss@1.32.0)(sass@1.101.0)(terser@5.48.0)(tsx@4.22.4)(yaml@2.9.0))': + '@vitest/mocker@3.2.7(vite@7.3.6(@types/node@24.13.3)(jiti@2.7.0)(lightningcss@1.33.0)(sass@1.102.0)(terser@5.49.0)(tsx@4.23.9)(yaml@2.9.0))': dependencies: - '@vitest/spy': 3.2.6 + '@vitest/spy': 3.2.7 estree-walker: 3.0.3 magic-string: 0.30.21 optionalDependencies: - vite: 7.3.5(@types/node@24.13.2)(jiti@2.7.0)(lightningcss@1.32.0)(sass@1.101.0)(terser@5.48.0)(tsx@4.22.4)(yaml@2.9.0) + vite: 7.3.6(@types/node@24.13.3)(jiti@2.7.0)(lightningcss@1.33.0)(sass@1.102.0)(terser@5.49.0)(tsx@4.23.9)(yaml@2.9.0) - '@vitest/mocker@4.1.9(vite@8.0.16(@types/node@24.13.2)(esbuild@0.28.1)(jiti@2.7.0)(sass@1.101.0)(terser@5.48.0)(tsx@4.22.4)(yaml@2.9.0))': + '@vitest/mocker@4.1.10(vite@8.2.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(sass@1.102.0)(terser@5.49.0)(tsx@4.23.9)(yaml@2.9.0))': dependencies: - '@vitest/spy': 4.1.9 + '@vitest/spy': 4.1.10 estree-walker: 3.0.3 magic-string: 0.30.21 optionalDependencies: - vite: 8.0.16(@types/node@24.13.2)(esbuild@0.28.1)(jiti@2.7.0)(sass@1.101.0)(terser@5.48.0)(tsx@4.22.4)(yaml@2.9.0) + vite: 8.2.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(sass@1.102.0)(terser@5.49.0)(tsx@4.23.9)(yaml@2.9.0) - '@vitest/pretty-format@3.2.6': + '@vitest/pretty-format@3.2.7': dependencies: tinyrainbow: 2.0.0 - '@vitest/pretty-format@4.1.9': + '@vitest/pretty-format@4.1.10': dependencies: tinyrainbow: 3.1.0 - '@vitest/runner@3.2.6': + '@vitest/runner@3.2.7': dependencies: - '@vitest/utils': 3.2.6 + '@vitest/utils': 3.2.7 pathe: 2.0.3 strip-literal: 3.1.0 - '@vitest/runner@4.1.9': + '@vitest/runner@4.1.10': dependencies: - '@vitest/utils': 4.1.9 + '@vitest/utils': 4.1.10 pathe: 2.0.3 - '@vitest/snapshot@3.2.6': + '@vitest/snapshot@3.2.7': dependencies: - '@vitest/pretty-format': 3.2.6 + '@vitest/pretty-format': 3.2.7 magic-string: 0.30.21 pathe: 2.0.3 - '@vitest/snapshot@4.1.9': + '@vitest/snapshot@4.1.10': dependencies: - '@vitest/pretty-format': 4.1.9 - '@vitest/utils': 4.1.9 + '@vitest/pretty-format': 4.1.10 + '@vitest/utils': 4.1.10 magic-string: 0.30.21 pathe: 2.0.3 - '@vitest/spy@3.2.6': + '@vitest/spy@3.2.7': dependencies: tinyspy: 4.0.4 - '@vitest/spy@4.1.9': {} + '@vitest/spy@4.1.10': {} - '@vitest/utils@3.2.6': + '@vitest/utils@3.2.7': dependencies: - '@vitest/pretty-format': 3.2.6 + '@vitest/pretty-format': 3.2.7 loupe: 3.2.1 tinyrainbow: 2.0.0 - '@vitest/utils@4.1.9': + '@vitest/utils@4.1.10': dependencies: - '@vitest/pretty-format': 4.1.9 + '@vitest/pretty-format': 4.1.10 convert-source-map: 2.0.0 tinyrainbow: 3.1.0 @@ -18903,10 +18694,10 @@ snapshots: dependencies: '@namnode/store': 0.1.0 - '@zoom-image/svelte@0.3.9(svelte@5.56.3(@typescript-eslint/types@8.61.0))': + '@zoom-image/svelte@0.3.9(svelte@5.56.8(@typescript-eslint/types@8.66.0))': dependencies: '@zoom-image/core': 0.42.0 - svelte: 5.56.3(@typescript-eslint/types@8.61.0) + svelte: 5.56.8(@typescript-eslint/types@8.66.0) abbrev@1.1.1: {} @@ -18926,29 +18717,29 @@ snapshots: mime-types: 3.0.2 negotiator: 1.0.0 - acorn-import-attributes@1.9.5(acorn@8.17.0): + acorn-import-attributes@1.9.5(acorn@8.18.0): dependencies: - acorn: 8.17.0 + acorn: 8.18.0 - acorn-import-phases@1.0.4(acorn@8.17.0): + acorn-import-phases@1.0.4(acorn@8.18.0): dependencies: - acorn: 8.17.0 + acorn: 8.18.0 - acorn-jsx@5.3.2(acorn@8.17.0): + acorn-jsx@5.3.2(acorn@8.18.0): dependencies: - acorn: 8.17.0 + acorn: 8.18.0 acorn-walk@8.3.5: dependencies: - acorn: 8.17.0 + acorn: 8.18.0 - acorn@8.17.0: {} + acorn@8.18.0: {} - address@1.2.2: {} + address@2.0.3: {} - agent-base@6.0.2: + agent-base@6.0.2(supports-color@8.1.1): dependencies: - debug: 4.4.3 + debug: 4.4.3(supports-color@8.1.1) transitivePeerDependencies: - supports-color @@ -18991,38 +18782,38 @@ snapshots: ajv@8.18.0: dependencies: fast-deep-equal: 3.1.3 - fast-uri: 3.1.2 + fast-uri: 3.1.4 json-schema-traverse: 1.0.0 require-from-string: 2.0.2 ajv@8.20.0: dependencies: fast-deep-equal: 3.1.3 - fast-uri: 3.1.2 + fast-uri: 3.1.4 json-schema-traverse: 1.0.0 require-from-string: 2.0.2 - algoliasearch-helper@3.29.1(algoliasearch@5.54.0): + algoliasearch-helper@3.29.2(algoliasearch@5.56.0): dependencies: '@algolia/events': 4.0.1 - algoliasearch: 5.54.0 + algoliasearch: 5.56.0 - algoliasearch@5.54.0: + algoliasearch@5.56.0: dependencies: - '@algolia/abtesting': 1.20.0 - '@algolia/client-abtesting': 5.54.0 - '@algolia/client-analytics': 5.54.0 - '@algolia/client-common': 5.54.0 - '@algolia/client-insights': 5.54.0 - '@algolia/client-personalization': 5.54.0 - '@algolia/client-query-suggestions': 5.54.0 - '@algolia/client-search': 5.54.0 - '@algolia/ingestion': 1.54.0 - '@algolia/monitoring': 1.54.0 - '@algolia/recommend': 5.54.0 - '@algolia/requester-browser-xhr': 5.54.0 - '@algolia/requester-fetch': 5.54.0 - '@algolia/requester-node-http': 5.54.0 + '@algolia/abtesting': 1.22.0 + '@algolia/client-abtesting': 5.56.0 + '@algolia/client-analytics': 5.56.0 + '@algolia/client-common': 5.56.0 + '@algolia/client-insights': 5.56.0 + '@algolia/client-personalization': 5.56.0 + '@algolia/client-query-suggestions': 5.56.0 + '@algolia/client-search': 5.56.0 + '@algolia/ingestion': 1.56.0 + '@algolia/monitoring': 1.56.0 + '@algolia/recommend': 5.56.0 + '@algolia/requester-browser-xhr': 5.56.0 + '@algolia/requester-fetch': 5.56.0 + '@algolia/requester-node-http': 5.56.0 ansi-align@3.0.1: dependencies: @@ -19087,22 +18878,6 @@ snapshots: - bare-buffer - react-native-b4a - archiver@8.0.0: - dependencies: - async: 3.2.6 - buffer-crc32: 1.0.0 - is-stream: 4.0.1 - lazystream: 1.0.1 - normalize-path: 3.0.0 - readable-stream: 4.7.0 - readdir-glob: 3.0.0 - tar-stream: 3.2.0 - zip-stream: 7.0.5 - transitivePeerDependencies: - - bare-abort-controller - - bare-buffer - - react-native-b4a - are-we-there-yet@2.0.0: dependencies: delegates: 1.0.0 @@ -19110,10 +18885,6 @@ snapshots: arg@5.0.2: {} - argparse@1.0.10: - dependencies: - sprintf-js: 1.0.3 - argparse@2.0.1: {} aria-query@5.3.0: @@ -19173,59 +18944,59 @@ snapshots: dependencies: immediate: 3.3.0 - autoprefixer@10.5.0(postcss@8.5.15): + autoprefixer@10.5.4(postcss@8.5.26): dependencies: - browserslist: 4.28.2 - caniuse-lite: 1.0.30001799 + browserslist: 4.28.6 + caniuse-lite: 1.0.30001806 fraction.js: 5.3.4 picocolors: 1.1.1 - postcss: 8.5.15 + postcss: 8.5.26 postcss-value-parser: 4.2.0 axobject-query@4.1.0: {} b4a@1.8.1: {} - babel-loader@9.2.1(@babel/core@7.29.7)(webpack@5.107.2(postcss@8.5.15)): + babel-loader@9.2.1(@babel/core@7.29.7(supports-color@8.1.1))(webpack@5.108.4(@swc/core@1.15.47(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(uglify-js@3.19.3)): dependencies: - '@babel/core': 7.29.7 + '@babel/core': 7.29.7(supports-color@8.1.1) find-cache-dir: 4.0.0 schema-utils: 4.3.3 - webpack: 5.107.2(postcss@8.5.15) + webpack: 5.108.4(@swc/core@1.15.47(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(uglify-js@3.19.3) babel-plugin-dynamic-import-node@2.3.3: dependencies: object.assign: 4.1.7 - babel-plugin-polyfill-corejs2@0.4.17(@babel/core@7.29.7): + babel-plugin-polyfill-corejs2@0.4.17(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1): dependencies: '@babel/compat-data': 7.29.7 - '@babel/core': 7.29.7 - '@babel/helper-define-polyfill-provider': 0.6.8(@babel/core@7.29.7) + '@babel/core': 7.29.7(supports-color@8.1.1) + '@babel/helper-define-polyfill-provider': 0.6.8(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1) semver: 6.3.1 transitivePeerDependencies: - supports-color - babel-plugin-polyfill-corejs3@0.13.0(@babel/core@7.29.7): + babel-plugin-polyfill-corejs3@0.13.0(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1): dependencies: - '@babel/core': 7.29.7 - '@babel/helper-define-polyfill-provider': 0.6.8(@babel/core@7.29.7) + '@babel/core': 7.29.7(supports-color@8.1.1) + '@babel/helper-define-polyfill-provider': 0.6.8(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1) core-js-compat: 3.49.0 transitivePeerDependencies: - supports-color - babel-plugin-polyfill-corejs3@0.14.2(@babel/core@7.29.7): + babel-plugin-polyfill-corejs3@0.14.2(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1): dependencies: - '@babel/core': 7.29.7 - '@babel/helper-define-polyfill-provider': 0.6.8(@babel/core@7.29.7) + '@babel/core': 7.29.7(supports-color@8.1.1) + '@babel/helper-define-polyfill-provider': 0.6.8(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1) core-js-compat: 3.49.0 transitivePeerDependencies: - supports-color - babel-plugin-polyfill-regenerator@0.6.8(@babel/core@7.29.7): + babel-plugin-polyfill-regenerator@0.6.8(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1): dependencies: - '@babel/core': 7.29.7 - '@babel/helper-define-polyfill-provider': 0.6.8(@babel/core@7.29.7) + '@babel/core': 7.29.7(supports-color@8.1.1) + '@babel/helper-define-polyfill-provider': 0.6.8(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1) transitivePeerDependencies: - supports-color @@ -19239,22 +19010,18 @@ snapshots: bare-events@2.9.1: {} - bare-fs@4.7.2: + bare-fs@4.8.0: dependencies: bare-events: 2.9.1 - bare-path: 3.0.1 + bare-path: 3.1.1 bare-stream: 2.13.3(bare-events@2.9.1) - bare-url: 2.4.5 + bare-url: 2.5.1 fast-fifo: 1.3.2 transitivePeerDependencies: - bare-abort-controller - react-native-b4a - bare-os@3.9.1: {} - - bare-path@3.0.1: - dependencies: - bare-os: 3.9.1 + bare-path@3.1.1: {} bare-stream@2.13.3(bare-events@2.9.1): dependencies: @@ -19266,15 +19033,15 @@ snapshots: transitivePeerDependencies: - react-native-b4a - bare-url@2.4.5: + bare-url@2.5.1: dependencies: - bare-path: 3.0.1 + bare-path: 3.1.1 base64-js@1.5.1: {} base64id@2.0.0: {} - baseline-browser-mapping@2.10.37: {} + baseline-browser-mapping@2.10.43: {} batch-cluster@17.3.1: {} @@ -19296,16 +19063,16 @@ snapshots: binary-extensions@2.3.0: {} - bits-ui@2.18.1(@internationalized/date@3.12.2)(@sveltejs/kit@2.65.1(@opentelemetry/api@1.9.1)(@sveltejs/vite-plugin-svelte@7.1.2(svelte@5.56.3(@typescript-eslint/types@8.61.0))(vite@8.0.16(@types/node@24.13.2)(esbuild@0.28.1)(jiti@2.7.0)(sass@1.101.0)(terser@5.48.0)(tsx@4.22.4)(yaml@2.9.0)))(svelte@5.56.3(@typescript-eslint/types@8.61.0))(typescript@6.0.3)(vite@8.0.16(@types/node@24.13.2)(esbuild@0.28.1)(jiti@2.7.0)(sass@1.101.0)(terser@5.48.0)(tsx@4.22.4)(yaml@2.9.0)))(svelte@5.56.3(@typescript-eslint/types@8.61.0)): + bits-ui@2.18.1(@internationalized/date@3.12.2)(@sveltejs/kit@2.70.2(@opentelemetry/api@1.9.1)(@sveltejs/vite-plugin-svelte@7.2.0(svelte@5.56.8(@typescript-eslint/types@8.66.0))(vite@8.2.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(sass@1.102.0)(terser@5.49.0)(tsx@4.23.9)(yaml@2.9.0)))(@typescript/typescript6@6.0.2)(svelte@5.56.8(@typescript-eslint/types@8.66.0))(vite@8.2.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(sass@1.102.0)(terser@5.49.0)(tsx@4.23.9)(yaml@2.9.0)))(svelte@5.56.8(@typescript-eslint/types@8.66.0)): dependencies: - '@floating-ui/core': 1.7.5 - '@floating-ui/dom': 1.7.6 + '@floating-ui/core': 1.8.0 + '@floating-ui/dom': 1.8.0 '@internationalized/date': 3.12.2 esm-env: 1.2.2 - runed: 0.35.1(@sveltejs/kit@2.65.1(@opentelemetry/api@1.9.1)(@sveltejs/vite-plugin-svelte@7.1.2(svelte@5.56.3(@typescript-eslint/types@8.61.0))(vite@8.0.16(@types/node@24.13.2)(esbuild@0.28.1)(jiti@2.7.0)(sass@1.101.0)(terser@5.48.0)(tsx@4.22.4)(yaml@2.9.0)))(svelte@5.56.3(@typescript-eslint/types@8.61.0))(typescript@6.0.3)(vite@8.0.16(@types/node@24.13.2)(esbuild@0.28.1)(jiti@2.7.0)(sass@1.101.0)(terser@5.48.0)(tsx@4.22.4)(yaml@2.9.0)))(svelte@5.56.3(@typescript-eslint/types@8.61.0)) - svelte: 5.56.3(@typescript-eslint/types@8.61.0) - svelte-toolbelt: 0.10.6(@sveltejs/kit@2.65.1(@opentelemetry/api@1.9.1)(@sveltejs/vite-plugin-svelte@7.1.2(svelte@5.56.3(@typescript-eslint/types@8.61.0))(vite@8.0.16(@types/node@24.13.2)(esbuild@0.28.1)(jiti@2.7.0)(sass@1.101.0)(terser@5.48.0)(tsx@4.22.4)(yaml@2.9.0)))(svelte@5.56.3(@typescript-eslint/types@8.61.0))(typescript@6.0.3)(vite@8.0.16(@types/node@24.13.2)(esbuild@0.28.1)(jiti@2.7.0)(sass@1.101.0)(terser@5.48.0)(tsx@4.22.4)(yaml@2.9.0)))(svelte@5.56.3(@typescript-eslint/types@8.61.0)) - tabbable: 6.4.0 + runed: 0.35.1(@sveltejs/kit@2.70.2(@opentelemetry/api@1.9.1)(@sveltejs/vite-plugin-svelte@7.2.0(svelte@5.56.8(@typescript-eslint/types@8.66.0))(vite@8.2.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(sass@1.102.0)(terser@5.49.0)(tsx@4.23.9)(yaml@2.9.0)))(@typescript/typescript6@6.0.2)(svelte@5.56.8(@typescript-eslint/types@8.66.0))(vite@8.2.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(sass@1.102.0)(terser@5.49.0)(tsx@4.23.9)(yaml@2.9.0)))(svelte@5.56.8(@typescript-eslint/types@8.66.0)) + svelte: 5.56.8(@typescript-eslint/types@8.66.0) + svelte-toolbelt: 0.10.6(@sveltejs/kit@2.70.2(@opentelemetry/api@1.9.1)(@sveltejs/vite-plugin-svelte@7.2.0(svelte@5.56.8(@typescript-eslint/types@8.66.0))(vite@8.2.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(sass@1.102.0)(terser@5.49.0)(tsx@4.23.9)(yaml@2.9.0)))(@typescript/typescript6@6.0.2)(svelte@5.56.8(@typescript-eslint/types@8.66.0))(vite@8.2.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(sass@1.102.0)(terser@5.49.0)(tsx@4.23.9)(yaml@2.9.0)))(svelte@5.56.8(@typescript-eslint/types@8.66.0)) + tabbable: 6.5.0 transitivePeerDependencies: - '@sveltejs/kit' @@ -19315,38 +19082,38 @@ snapshots: inherits: 2.0.4 readable-stream: 3.6.2 - body-parser@1.20.5: + body-parser@1.20.6(supports-color@8.1.1): dependencies: bytes: 3.1.2 content-type: 1.0.5 - debug: 2.6.9 + debug: 2.6.9(supports-color@8.1.1) depd: 2.0.0 destroy: 1.2.0 http-errors: 2.0.1 iconv-lite: 0.4.24 on-finished: 2.4.1 - qs: 6.15.2 + qs: 6.15.3 raw-body: 2.5.3 type-is: 1.6.18 unpipe: 1.0.0 transitivePeerDependencies: - supports-color - body-parser@2.2.2: + body-parser@2.3.0(supports-color@8.1.1): dependencies: bytes: 3.1.2 - content-type: 1.0.5 - debug: 4.4.3 + content-type: 2.0.0 + debug: 4.4.3(supports-color@8.1.1) http-errors: 2.0.1 - iconv-lite: 0.7.2 + iconv-lite: 0.7.3 on-finished: 2.4.1 - qs: 6.15.2 + qs: 6.15.3 raw-body: 3.0.2 type-is: 2.1.0 transitivePeerDependencies: - supports-color - bonjour-service@1.4.1: + bonjour-service@1.4.3: dependencies: fast-deep-equal: 3.1.3 multicast-dns: 7.2.5 @@ -19384,7 +19151,7 @@ snapshots: dependencies: balanced-match: 1.0.2 - brace-expansion@5.0.6: + brace-expansion@5.0.8: dependencies: balanced-match: 4.0.4 @@ -19392,13 +19159,13 @@ snapshots: dependencies: fill-range: 7.1.1 - browserslist@4.28.2: + browserslist@4.28.6: dependencies: - baseline-browser-mapping: 2.10.37 - caniuse-lite: 1.0.30001799 - electron-to-chromium: 1.5.372 - node-releases: 2.0.47 - update-browserslist-db: 1.2.3(browserslist@4.28.2) + baseline-browser-mapping: 2.10.43 + caniuse-lite: 1.0.30001806 + electron-to-chromium: 1.5.392 + node-releases: 2.0.51 + update-browserslist-db: 1.2.3(browserslist@4.28.6) buffer-crc32@1.0.0: {} @@ -19408,7 +19175,7 @@ snapshots: buffer-image-size@0.6.4: dependencies: - '@types/node': 24.13.2 + '@types/node': 24.13.3 buffer@5.7.1: dependencies: @@ -19425,13 +19192,13 @@ snapshots: builtin-modules@5.2.0: {} - bullmq@5.78.1: + bullmq@5.81.3(supports-color@8.1.1): dependencies: cron-parser: 4.9.0 - ioredis: 5.10.1 - msgpackr: 2.0.2 + ioredis: 5.11.1(supports-color@8.1.1) + msgpackr: 2.0.5 node-abort-controller: 3.1.1 - semver: 7.8.1 + semver: 7.8.5 tslib: 2.8.1 transitivePeerDependencies: - supports-color @@ -19502,12 +19269,12 @@ snapshots: caniuse-api@3.0.0: dependencies: - browserslist: 4.28.2 - caniuse-lite: 1.0.30001799 + browserslist: 4.28.6 + caniuse-lite: 1.0.30001806 lodash.memoize: 4.1.2 lodash.uniq: 4.5.0 - caniuse-lite@1.0.30001799: {} + caniuse-lite@1.0.30001806: {} canvas@3.2.3: dependencies: @@ -19517,9 +19284,9 @@ snapshots: ccount@2.0.1: {} - ce-la-react@0.3.2(react@19.2.7): + ce-la-react@0.3.2(react@19.2.8): dependencies: - react: 19.2.7 + react: 19.2.8 chai@5.3.3: dependencies: @@ -19613,10 +19380,6 @@ snapshots: dependencies: source-map: 0.6.1 - clean-regexp@1.0.0: - dependencies: - escape-string-regexp: 1.0.5 - clean-stack@2.2.0: {} cli-boxes@3.0.0: {} @@ -19683,13 +19446,11 @@ snapshots: cluster-key-slot@1.1.1: {} - cluster-key-slot@1.1.2: {} - - codemirror-wrapped-line-indent@1.0.9(@codemirror/language@6.12.3)(@codemirror/state@6.6.0)(@codemirror/view@6.43.1): + codemirror-wrapped-line-indent@1.0.9(@codemirror/language@6.12.4)(@codemirror/state@6.7.1)(@codemirror/view@6.43.7): dependencies: - '@codemirror/language': 6.12.3 - '@codemirror/state': 6.6.0 - '@codemirror/view': 6.43.1 + '@codemirror/language': 6.12.4 + '@codemirror/state': 6.7.1 + '@codemirror/view': 6.43.7 collapse-white-space@2.1.0: {} @@ -19754,23 +19515,15 @@ snapshots: normalize-path: 3.0.0 readable-stream: 4.7.0 - compress-commons@7.0.1: - dependencies: - crc-32: 1.2.2 - crc32-stream: 7.0.1 - is-stream: 4.0.1 - normalize-path: 3.0.0 - readable-stream: 4.7.0 - compressible@2.0.18: dependencies: mime-db: 1.54.0 - compression@1.8.1: + compression@1.8.1(supports-color@8.1.1): dependencies: bytes: 3.1.2 compressible: 2.0.18 - debug: 2.6.9 + debug: 2.6.9(supports-color@8.1.1) negotiator: 0.6.4 on-headers: 1.1.0 safe-buffer: 5.2.1 @@ -19796,7 +19549,7 @@ snapshots: dot-prop: 10.1.0 env-paths: 3.0.0 json-schema-typed: 8.0.2 - semver: 7.8.4 + semver: 7.8.5 uint8array-extras: 1.5.0 config-chain@1.1.13: @@ -19832,6 +19585,8 @@ snapshots: content-type@2.0.0: {} + convert-hrtime@5.0.0: {} + convert-source-map@2.0.0: {} cookie-parser@1.4.7: @@ -19860,7 +19615,7 @@ snapshots: copy-text-to-clipboard@3.2.2: {} - copy-webpack-plugin@11.0.0(webpack@5.107.2(postcss@8.5.15)): + copy-webpack-plugin@11.0.0(webpack@5.108.4(@swc/core@1.15.47(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(uglify-js@3.19.3)): dependencies: fast-glob: 3.3.3 glob-parent: 6.0.2 @@ -19868,11 +19623,11 @@ snapshots: normalize-path: 3.0.0 schema-utils: 4.3.3 serialize-javascript: 6.0.2 - webpack: 5.107.2(postcss@8.5.15) + webpack: 5.108.4(@swc/core@1.15.47(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(uglify-js@3.19.3) core-js-compat@3.49.0: dependencies: - browserslist: 4.28.2 + browserslist: 4.28.6 core-js@3.49.0: {} @@ -19891,28 +19646,28 @@ snapshots: dependencies: layout-base: 2.0.1 + cosmiconfig@8.3.6(@typescript/typescript6@6.0.2): + dependencies: + import-fresh: 3.3.1 + js-yaml: 4.3.0 + parse-json: 5.2.0 + path-type: 4.0.0 + optionalDependencies: + typescript: '@typescript/typescript6@6.0.2' + cosmiconfig@8.3.6(typescript@5.9.3): dependencies: import-fresh: 3.3.1 - js-yaml: 4.2.0 + js-yaml: 4.3.0 parse-json: 5.2.0 path-type: 4.0.0 optionalDependencies: typescript: 5.9.3 - cosmiconfig@8.3.6(typescript@6.0.3): - dependencies: - import-fresh: 3.3.1 - js-yaml: 4.2.0 - parse-json: 5.2.0 - path-type: 4.0.0 - optionalDependencies: - typescript: 6.0.3 - cpu-features@0.0.10: dependencies: buildcheck: 0.0.7 - nan: 2.27.0 + nan: 2.28.0 optional: true crc-32@1.2.2: {} @@ -19922,12 +19677,7 @@ snapshots: crc-32: 1.2.2 readable-stream: 4.7.0 - crc32-stream@7.0.1: - dependencies: - crc-32: 1.2.2 - readable-stream: 4.7.0 - - crelt@1.0.6: {} + crelt@1.0.7: {} cron-parser@4.9.0: dependencies: @@ -19935,7 +19685,7 @@ snapshots: cron@4.4.0: dependencies: - '@types/luxon': 3.7.1 + '@types/luxon': 3.7.3 luxon: 3.7.2 cross-spawn@7.0.6: @@ -19948,63 +19698,53 @@ snapshots: dependencies: type-fest: 1.4.0 - css-blank-pseudo@7.0.1(postcss@8.5.15): + css-blank-pseudo@7.0.1(postcss@8.5.26): dependencies: - postcss: 8.5.15 + postcss: 8.5.26 postcss-selector-parser: 7.1.4 - css-declaration-sorter@7.4.0(postcss@8.5.15): + css-declaration-sorter@7.4.0(postcss@8.5.26): dependencies: - postcss: 8.5.15 + postcss: 8.5.26 - css-has-pseudo@7.0.3(postcss@8.5.15): + css-has-pseudo@7.0.3(postcss@8.5.26): dependencies: '@csstools/selector-specificity': 5.0.0(postcss-selector-parser@7.1.4) - postcss: 8.5.15 + postcss: 8.5.26 postcss-selector-parser: 7.1.4 postcss-value-parser: 4.2.0 - css-loader@6.11.0(webpack@5.107.2(postcss@8.5.15)): + css-loader@6.11.0(webpack@5.108.4(@swc/core@1.15.47(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(uglify-js@3.19.3)): dependencies: - icss-utils: 5.1.0(postcss@8.5.15) - postcss: 8.5.15 - postcss-modules-extract-imports: 3.1.0(postcss@8.5.15) - postcss-modules-local-by-default: 4.2.0(postcss@8.5.15) - postcss-modules-scope: 3.2.1(postcss@8.5.15) - postcss-modules-values: 4.0.0(postcss@8.5.15) + icss-utils: 5.1.0(postcss@8.5.26) + postcss: 8.5.26 + postcss-modules-extract-imports: 3.1.0(postcss@8.5.26) + postcss-modules-local-by-default: 4.2.0(postcss@8.5.26) + postcss-modules-scope: 3.2.1(postcss@8.5.26) + postcss-modules-values: 4.0.0(postcss@8.5.26) postcss-value-parser: 4.2.0 - semver: 7.8.4 + semver: 7.8.5 optionalDependencies: - webpack: 5.107.2(postcss@8.5.15) + webpack: 5.108.4(@swc/core@1.15.47(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(uglify-js@3.19.3) - css-minimizer-webpack-plugin@5.0.1(clean-css@5.3.3)(esbuild@0.28.1)(webpack@5.107.2(postcss@8.5.15)): + css-minimizer-webpack-plugin@5.0.1(clean-css@5.3.3)(csso@5.0.5)(esbuild@0.28.2)(lightningcss@1.33.0)(webpack@5.108.4(@swc/core@1.15.47(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(uglify-js@3.19.3)): dependencies: '@jridgewell/trace-mapping': 0.3.31 - cssnano: 6.1.2(postcss@8.5.15) + cssnano: 6.1.2(postcss@8.5.26) jest-worker: 29.7.0 - postcss: 8.5.15 + postcss: 8.5.26 schema-utils: 4.3.3 serialize-javascript: 6.0.2 - webpack: 5.107.2(postcss@8.5.15) + webpack: 5.108.4(@swc/core@1.15.47(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(uglify-js@3.19.3) optionalDependencies: clean-css: 5.3.3 - esbuild: 0.28.1 + csso: 5.0.5 + esbuild: 0.28.2 + lightningcss: 1.33.0 - css-minimizer-webpack-plugin@5.0.1(clean-css@5.3.3)(webpack@5.107.2(postcss@8.5.15)): + css-prefers-color-scheme@10.0.0(postcss@8.5.26): dependencies: - '@jridgewell/trace-mapping': 0.3.31 - cssnano: 6.1.2(postcss@8.5.15) - jest-worker: 29.7.0 - postcss: 8.5.15 - schema-utils: 4.3.3 - serialize-javascript: 6.0.2 - webpack: 5.107.2(postcss@8.5.15) - optionalDependencies: - clean-css: 5.3.3 - - css-prefers-color-scheme@10.0.0(postcss@8.5.15): - dependencies: - postcss: 8.5.15 + postcss: 8.5.26 css-select@4.3.0: dependencies: @@ -20042,60 +19782,60 @@ snapshots: cssesc@3.0.0: {} - cssnano-preset-advanced@6.1.2(postcss@8.5.15): + cssnano-preset-advanced@6.1.2(postcss@8.5.26): dependencies: - autoprefixer: 10.5.0(postcss@8.5.15) - browserslist: 4.28.2 - cssnano-preset-default: 6.1.2(postcss@8.5.15) - postcss: 8.5.15 - postcss-discard-unused: 6.0.5(postcss@8.5.15) - postcss-merge-idents: 6.0.3(postcss@8.5.15) - postcss-reduce-idents: 6.0.3(postcss@8.5.15) - postcss-zindex: 6.0.2(postcss@8.5.15) + autoprefixer: 10.5.4(postcss@8.5.26) + browserslist: 4.28.6 + cssnano-preset-default: 6.1.2(postcss@8.5.26) + postcss: 8.5.26 + postcss-discard-unused: 6.0.5(postcss@8.5.26) + postcss-merge-idents: 6.0.3(postcss@8.5.26) + postcss-reduce-idents: 6.0.3(postcss@8.5.26) + postcss-zindex: 6.0.2(postcss@8.5.26) - cssnano-preset-default@6.1.2(postcss@8.5.15): + cssnano-preset-default@6.1.2(postcss@8.5.26): dependencies: - browserslist: 4.28.2 - css-declaration-sorter: 7.4.0(postcss@8.5.15) - cssnano-utils: 4.0.2(postcss@8.5.15) - postcss: 8.5.15 - postcss-calc: 9.0.1(postcss@8.5.15) - postcss-colormin: 6.1.0(postcss@8.5.15) - postcss-convert-values: 6.1.0(postcss@8.5.15) - postcss-discard-comments: 6.0.2(postcss@8.5.15) - postcss-discard-duplicates: 6.0.3(postcss@8.5.15) - postcss-discard-empty: 6.0.3(postcss@8.5.15) - postcss-discard-overridden: 6.0.2(postcss@8.5.15) - postcss-merge-longhand: 6.0.5(postcss@8.5.15) - postcss-merge-rules: 6.1.1(postcss@8.5.15) - postcss-minify-font-values: 6.1.0(postcss@8.5.15) - postcss-minify-gradients: 6.0.3(postcss@8.5.15) - postcss-minify-params: 6.1.0(postcss@8.5.15) - postcss-minify-selectors: 6.0.4(postcss@8.5.15) - postcss-normalize-charset: 6.0.2(postcss@8.5.15) - postcss-normalize-display-values: 6.0.2(postcss@8.5.15) - postcss-normalize-positions: 6.0.2(postcss@8.5.15) - postcss-normalize-repeat-style: 6.0.2(postcss@8.5.15) - postcss-normalize-string: 6.0.2(postcss@8.5.15) - postcss-normalize-timing-functions: 6.0.2(postcss@8.5.15) - postcss-normalize-unicode: 6.1.0(postcss@8.5.15) - postcss-normalize-url: 6.0.2(postcss@8.5.15) - postcss-normalize-whitespace: 6.0.2(postcss@8.5.15) - postcss-ordered-values: 6.0.2(postcss@8.5.15) - postcss-reduce-initial: 6.1.0(postcss@8.5.15) - postcss-reduce-transforms: 6.0.2(postcss@8.5.15) - postcss-svgo: 6.0.3(postcss@8.5.15) - postcss-unique-selectors: 6.0.4(postcss@8.5.15) + browserslist: 4.28.6 + css-declaration-sorter: 7.4.0(postcss@8.5.26) + cssnano-utils: 4.0.2(postcss@8.5.26) + postcss: 8.5.26 + postcss-calc: 9.0.1(postcss@8.5.26) + postcss-colormin: 6.1.0(postcss@8.5.26) + postcss-convert-values: 6.1.0(postcss@8.5.26) + postcss-discard-comments: 6.0.2(postcss@8.5.26) + postcss-discard-duplicates: 6.0.3(postcss@8.5.26) + postcss-discard-empty: 6.0.3(postcss@8.5.26) + postcss-discard-overridden: 6.0.2(postcss@8.5.26) + postcss-merge-longhand: 6.0.5(postcss@8.5.26) + postcss-merge-rules: 6.1.1(postcss@8.5.26) + postcss-minify-font-values: 6.1.0(postcss@8.5.26) + postcss-minify-gradients: 6.0.3(postcss@8.5.26) + postcss-minify-params: 6.1.0(postcss@8.5.26) + postcss-minify-selectors: 6.0.4(postcss@8.5.26) + postcss-normalize-charset: 6.0.2(postcss@8.5.26) + postcss-normalize-display-values: 6.0.2(postcss@8.5.26) + postcss-normalize-positions: 6.0.2(postcss@8.5.26) + postcss-normalize-repeat-style: 6.0.2(postcss@8.5.26) + postcss-normalize-string: 6.0.2(postcss@8.5.26) + postcss-normalize-timing-functions: 6.0.2(postcss@8.5.26) + postcss-normalize-unicode: 6.1.0(postcss@8.5.26) + postcss-normalize-url: 6.0.2(postcss@8.5.26) + postcss-normalize-whitespace: 6.0.2(postcss@8.5.26) + postcss-ordered-values: 6.0.2(postcss@8.5.26) + postcss-reduce-initial: 6.1.0(postcss@8.5.26) + postcss-reduce-transforms: 6.0.2(postcss@8.5.26) + postcss-svgo: 6.0.3(postcss@8.5.26) + postcss-unique-selectors: 6.0.4(postcss@8.5.26) - cssnano-utils@4.0.2(postcss@8.5.15): + cssnano-utils@4.0.2(postcss@8.5.26): dependencies: - postcss: 8.5.15 + postcss: 8.5.26 - cssnano@6.1.2(postcss@8.5.15): + cssnano@6.1.2(postcss@8.5.26): dependencies: - cssnano-preset-default: 6.1.2(postcss@8.5.15) + cssnano-preset-default: 6.1.2(postcss@8.5.26) lilconfig: 3.1.3 - postcss: 8.5.15 + postcss: 8.5.26 csso@5.0.5: dependencies: @@ -20316,17 +20056,28 @@ snapshots: debounce@2.2.0: {} - debug@2.6.9: + debug@2.6.9(supports-color@8.1.1): dependencies: ms: 2.0.0 + optionalDependencies: + supports-color: 8.1.1 - debug@4.3.7: + debug@4.3.7(supports-color@8.1.1): dependencies: ms: 2.1.3 + optionalDependencies: + supports-color: 8.1.1 debug@4.4.3: dependencies: ms: 2.1.3 + optional: true + + debug@4.4.3(supports-color@8.1.1): + dependencies: + ms: 2.1.3 + optionalDependencies: + supports-color: 8.1.1 decamelize@1.2.0: {} @@ -20399,18 +20150,17 @@ snapshots: detect-europe-js@0.1.2: {} + detect-indent@7.0.2: {} + detect-libc@2.1.2: {} detect-node@2.1.0: {} - detect-port@1.6.1: + detect-port@2.1.0: dependencies: - address: 1.2.2 - debug: 4.4.3 - transitivePeerDependencies: - - supports-color + address: 2.0.3 - devalue@5.8.1: {} + devalue@5.9.0: {} devlop@1.1.0: dependencies: @@ -20447,29 +20197,29 @@ snapshots: dependencies: yaml: 2.9.0 - docker-modem@5.0.7: + docker-modem@5.0.7(supports-color@8.1.1): dependencies: - debug: 4.4.3 + debug: 4.4.3(supports-color@8.1.1) readable-stream: 3.6.2 split-ca: 1.0.1 ssh2: 1.17.0 transitivePeerDependencies: - supports-color - dockerode@5.0.0: + dockerode@5.0.1(supports-color@8.1.1): dependencies: '@balena/dockerignore': 1.0.2 '@grpc/grpc-js': 1.14.4 '@grpc/proto-loader': 0.7.15 - docker-modem: 5.0.7 - protobufjs: 7.6.4 - tar-fs: 2.1.4 + docker-modem: 5.0.7(supports-color@8.1.1) + protobufjs: 7.6.5 + tar-fs: 2.1.5 transitivePeerDependencies: - supports-color - docusaurus-lunr-search@3.6.0(@docusaurus/core@3.10.1(@mdx-js/react@3.1.1(@types/react@19.2.17)(react@19.2.7))(esbuild@0.28.1)(postcss@8.5.15)(react-dom@19.2.7(react@19.2.7))(react@19.2.7)(typescript@6.0.3))(react-dom@19.2.7(react@19.2.7))(react@19.2.7): + docusaurus-lunr-search@3.6.0(@docusaurus/core@3.10.2(@mdx-js/react@3.1.1(@types/react@19.2.18)(react@19.2.8))(@swc/core@1.15.47(@swc/helpers@0.5.23))(@typescript/typescript6@6.0.2)(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(debug@4.4.3(supports-color@8.1.1))(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3))(react-dom@19.2.8(react@19.2.8))(react@19.2.8): dependencies: - '@docusaurus/core': 3.10.1(@mdx-js/react@3.1.1(@types/react@19.2.17)(react@19.2.7))(esbuild@0.28.1)(postcss@8.5.15)(react-dom@19.2.7(react@19.2.7))(react@19.2.7)(typescript@6.0.3) + '@docusaurus/core': 3.10.2(@mdx-js/react@3.1.1(@types/react@19.2.18)(react@19.2.8))(@swc/core@1.15.47(@swc/helpers@0.5.23))(@typescript/typescript6@6.0.2)(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(debug@4.4.3(supports-color@8.1.1))(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3) autocomplete.js: 0.37.1 clsx: 2.1.1 gauge: 3.0.2 @@ -20480,8 +20230,8 @@ snapshots: lunr-languages: 1.20.0 mark.js: 8.11.1 minimatch: 3.1.5 - react: 19.2.7 - react-dom: 19.2.7(react@19.2.7) + react: 19.2.8 + react-dom: 19.2.8(react@19.2.8) rehype-parse: 7.0.1 to-vfile: 6.1.0 unified: 9.2.2 @@ -20519,7 +20269,7 @@ snapshots: dependencies: domelementtype: 2.3.0 - dompurify@3.4.10: + dompurify@3.4.12: optionalDependencies: '@types/trusted-types': 2.0.7 @@ -20568,7 +20318,7 @@ snapshots: ee-first@1.1.1: {} - electron-to-chromium@1.5.372: {} + electron-to-chromium@1.5.392: {} emoji-regex@10.6.0: {} @@ -20588,10 +20338,10 @@ snapshots: dependencies: once: 1.4.0 - engine.io-client@6.6.5: + engine.io-client@6.6.5(supports-color@8.1.1): dependencies: '@socket.io/component-emitter': 3.1.2 - debug: 4.4.3 + debug: 4.4.3(supports-color@8.1.1) engine.io-parser: 5.2.3 ws: 8.20.1 xmlhttprequest-ssl: 2.1.2 @@ -20602,16 +20352,16 @@ snapshots: engine.io-parser@5.2.3: {} - engine.io@6.6.8: + engine.io@6.6.8(supports-color@8.1.1): dependencies: '@types/cors': 2.8.19 - '@types/node': 24.13.2 + '@types/node': 24.13.3 '@types/ws': 8.18.1 accepts: 1.3.8 base64id: 2.0.0 cookie: 0.7.2 cors: 2.8.6 - debug: 4.4.3 + debug: 4.4.3(supports-color@8.1.1) engine.io-parser: 5.2.3 ws: 8.20.1 transitivePeerDependencies: @@ -20619,12 +20369,7 @@ snapshots: - supports-color - utf-8-validate - enhanced-resolve@5.21.6: - dependencies: - graceful-fs: 4.2.11 - tapable: 2.3.3 - - enhanced-resolve@5.24.0: + enhanced-resolve@5.24.4: dependencies: graceful-fs: 4.2.11 tapable: 2.3.3 @@ -20651,7 +20396,7 @@ snapshots: es-module-lexer@1.7.0: {} - es-module-lexer@2.1.0: {} + es-module-lexer@2.3.1: {} es-object-atoms@1.1.2: dependencies: @@ -20664,7 +20409,7 @@ snapshots: has-tostringtag: 1.0.2 hasown: 2.0.4 - es-toolkit@1.47.1: {} + es-toolkit@1.49.0: {} es5-ext@0.10.64: dependencies: @@ -20701,7 +20446,7 @@ snapshots: esast-util-from-js@2.0.1: dependencies: '@types/estree-jsx': 1.0.5 - acorn: 8.17.0 + acorn: 8.18.0 esast-util-from-estree: 2.0.0 vfile-message: 4.0.3 @@ -20760,63 +20505,34 @@ snapshots: '@esbuild/win32-ia32': 0.27.4 '@esbuild/win32-x64': 0.27.4 - esbuild@0.27.7: + esbuild@0.28.2: optionalDependencies: - '@esbuild/aix-ppc64': 0.27.7 - '@esbuild/android-arm': 0.27.7 - '@esbuild/android-arm64': 0.27.7 - '@esbuild/android-x64': 0.27.7 - '@esbuild/darwin-arm64': 0.27.7 - '@esbuild/darwin-x64': 0.27.7 - '@esbuild/freebsd-arm64': 0.27.7 - '@esbuild/freebsd-x64': 0.27.7 - '@esbuild/linux-arm': 0.27.7 - '@esbuild/linux-arm64': 0.27.7 - '@esbuild/linux-ia32': 0.27.7 - '@esbuild/linux-loong64': 0.27.7 - '@esbuild/linux-mips64el': 0.27.7 - '@esbuild/linux-ppc64': 0.27.7 - '@esbuild/linux-riscv64': 0.27.7 - '@esbuild/linux-s390x': 0.27.7 - '@esbuild/linux-x64': 0.27.7 - '@esbuild/netbsd-arm64': 0.27.7 - '@esbuild/netbsd-x64': 0.27.7 - '@esbuild/openbsd-arm64': 0.27.7 - '@esbuild/openbsd-x64': 0.27.7 - '@esbuild/openharmony-arm64': 0.27.7 - '@esbuild/sunos-x64': 0.27.7 - '@esbuild/win32-arm64': 0.27.7 - '@esbuild/win32-ia32': 0.27.7 - '@esbuild/win32-x64': 0.27.7 - - esbuild@0.28.1: - optionalDependencies: - '@esbuild/aix-ppc64': 0.28.1 - '@esbuild/android-arm': 0.28.1 - '@esbuild/android-arm64': 0.28.1 - '@esbuild/android-x64': 0.28.1 - '@esbuild/darwin-arm64': 0.28.1 - '@esbuild/darwin-x64': 0.28.1 - '@esbuild/freebsd-arm64': 0.28.1 - '@esbuild/freebsd-x64': 0.28.1 - '@esbuild/linux-arm': 0.28.1 - '@esbuild/linux-arm64': 0.28.1 - '@esbuild/linux-ia32': 0.28.1 - '@esbuild/linux-loong64': 0.28.1 - '@esbuild/linux-mips64el': 0.28.1 - '@esbuild/linux-ppc64': 0.28.1 - '@esbuild/linux-riscv64': 0.28.1 - '@esbuild/linux-s390x': 0.28.1 - '@esbuild/linux-x64': 0.28.1 - '@esbuild/netbsd-arm64': 0.28.1 - '@esbuild/netbsd-x64': 0.28.1 - '@esbuild/openbsd-arm64': 0.28.1 - '@esbuild/openbsd-x64': 0.28.1 - '@esbuild/openharmony-arm64': 0.28.1 - '@esbuild/sunos-x64': 0.28.1 - '@esbuild/win32-arm64': 0.28.1 - '@esbuild/win32-ia32': 0.28.1 - '@esbuild/win32-x64': 0.28.1 + '@esbuild/aix-ppc64': 0.28.2 + '@esbuild/android-arm': 0.28.2 + '@esbuild/android-arm64': 0.28.2 + '@esbuild/android-x64': 0.28.2 + '@esbuild/darwin-arm64': 0.28.2 + '@esbuild/darwin-x64': 0.28.2 + '@esbuild/freebsd-arm64': 0.28.2 + '@esbuild/freebsd-x64': 0.28.2 + '@esbuild/linux-arm': 0.28.2 + '@esbuild/linux-arm64': 0.28.2 + '@esbuild/linux-ia32': 0.28.2 + '@esbuild/linux-loong64': 0.28.2 + '@esbuild/linux-mips64el': 0.28.2 + '@esbuild/linux-ppc64': 0.28.2 + '@esbuild/linux-riscv64': 0.28.2 + '@esbuild/linux-s390x': 0.28.2 + '@esbuild/linux-x64': 0.28.2 + '@esbuild/netbsd-arm64': 0.28.2 + '@esbuild/netbsd-x64': 0.28.2 + '@esbuild/openbsd-arm64': 0.28.2 + '@esbuild/openbsd-x64': 0.28.2 + '@esbuild/openharmony-arm64': 0.28.2 + '@esbuild/sunos-x64': 0.28.2 + '@esbuild/win32-arm64': 0.28.2 + '@esbuild/win32-ia32': 0.28.2 + '@esbuild/win32-x64': 0.28.2 escalade@3.2.0: {} @@ -20830,85 +20546,89 @@ snapshots: escape-string-regexp@5.0.0: {} - eslint-config-prettier@10.1.8(eslint@10.5.0(jiti@2.7.0)): + eslint-config-prettier@10.1.8(eslint@10.8.0(jiti@2.7.0)(supports-color@8.1.1)): dependencies: - eslint: 10.5.0(jiti@2.7.0) + eslint: 10.8.0(jiti@2.7.0)(supports-color@8.1.1) - eslint-plugin-better-tailwindcss@4.6.0(eslint@10.5.0(jiti@2.7.0))(tailwindcss@4.3.1)(typescript@6.0.3): + eslint-plugin-better-tailwindcss@4.7.0(@typescript/typescript6@6.0.2)(eslint@10.8.0(jiti@2.7.0)(supports-color@8.1.1))(tailwindcss@4.3.3): dependencies: - '@eslint/css-tree': 4.0.4 - '@valibot/to-json-schema': 1.7.1(valibot@1.4.1(typescript@6.0.3)) - enhanced-resolve: 5.24.0 + '@eslint/css-tree': 4.0.5 + '@valibot/to-json-schema': 1.7.1(valibot@1.4.2(@typescript/typescript6@6.0.2)) + enhanced-resolve: 5.24.4 jiti: 2.7.0 synckit: 0.11.13 tailwind-csstree: 0.3.3 - tailwindcss: 4.3.1 + tailwindcss: 4.3.3 tsconfig-paths-webpack-plugin: 4.2.0 - valibot: 1.4.1(typescript@6.0.3) + valibot: 1.4.2(@typescript/typescript6@6.0.2) optionalDependencies: - eslint: 10.5.0(jiti@2.7.0) + eslint: 10.8.0(jiti@2.7.0)(supports-color@8.1.1) transitivePeerDependencies: - '@eslint/css' - typescript - eslint-plugin-compat@7.0.2(eslint@10.5.0(jiti@2.7.0)): + eslint-plugin-compat@7.0.2(eslint@10.8.0(jiti@2.7.0)(supports-color@8.1.1)): dependencies: '@mdn/browser-compat-data': 6.1.5 ast-metadata-inferer: 0.8.1 - browserslist: 4.28.2 - eslint: 10.5.0(jiti@2.7.0) + browserslist: 4.28.6 + eslint: 10.8.0(jiti@2.7.0)(supports-color@8.1.1) find-up: 5.0.0 globals: 15.15.0 lodash.memoize: 4.1.2 - semver: 7.8.4 + semver: 7.8.5 - eslint-plugin-prettier@5.5.6(@types/eslint@9.6.1)(eslint-config-prettier@10.1.8(eslint@10.5.0(jiti@2.7.0)))(eslint@10.5.0(jiti@2.7.0))(prettier@3.8.4): + eslint-plugin-prettier@5.5.6(@types/eslint@9.6.1)(eslint-config-prettier@10.1.8(eslint@10.8.0(jiti@2.7.0)(supports-color@8.1.1)))(eslint@10.8.0(jiti@2.7.0)(supports-color@8.1.1))(prettier@3.9.6): dependencies: - eslint: 10.5.0(jiti@2.7.0) - prettier: 3.8.4 + eslint: 10.8.0(jiti@2.7.0)(supports-color@8.1.1) + prettier: 3.9.6 prettier-linter-helpers: 1.0.1 synckit: 0.11.13 optionalDependencies: '@types/eslint': 9.6.1 - eslint-config-prettier: 10.1.8(eslint@10.5.0(jiti@2.7.0)) + eslint-config-prettier: 10.1.8(eslint@10.8.0(jiti@2.7.0)(supports-color@8.1.1)) - eslint-plugin-svelte@3.19.0(eslint@10.5.0(jiti@2.7.0))(svelte@5.56.3(@typescript-eslint/types@8.61.0)): + eslint-plugin-svelte@3.22.0(eslint@10.8.0(jiti@2.7.0)(supports-color@8.1.1))(svelte@5.56.8(@typescript-eslint/types@8.66.0)): dependencies: - '@eslint-community/eslint-utils': 4.9.1(eslint@10.5.0(jiti@2.7.0)) + '@eslint-community/eslint-utils': 4.10.1(eslint@10.8.0(jiti@2.7.0)(supports-color@8.1.1)) '@jridgewell/sourcemap-codec': 1.5.5 - eslint: 10.5.0(jiti@2.7.0) + eslint: 10.8.0(jiti@2.7.0)(supports-color@8.1.1) esutils: 2.0.3 globals: 16.5.0 known-css-properties: 0.37.0 - postcss: 8.5.15 - postcss-load-config: 3.1.4(postcss@8.5.15) - postcss-safe-parser: 7.0.1(postcss@8.5.15) - semver: 7.8.4 - svelte-eslint-parser: 1.8.0(svelte@5.56.3(@typescript-eslint/types@8.61.0)) + postcss: 8.5.26 + postcss-load-config: 3.1.4(postcss@8.5.26) + postcss-safe-parser: 7.0.1(postcss@8.5.26) + semver: 7.8.5 + svelte-eslint-parser: 1.8.0(svelte@5.56.8(@typescript-eslint/types@8.66.0)) optionalDependencies: - svelte: 5.56.3(@typescript-eslint/types@8.61.0) + svelte: 5.56.8(@typescript-eslint/types@8.66.0) transitivePeerDependencies: - ts-node - eslint-plugin-unicorn@64.0.0(eslint@10.5.0(jiti@2.7.0)): + eslint-plugin-unicorn@72.0.0(eslint@10.8.0(jiti@2.7.0)(supports-color@8.1.1)): dependencies: - '@babel/helper-validator-identifier': 7.29.7 - '@eslint-community/eslint-utils': 4.9.1(eslint@10.5.0(jiti@2.7.0)) + '@eslint-community/eslint-utils': 4.10.1(eslint@10.8.0(jiti@2.7.0)(supports-color@8.1.1)) + '@eslint/css-tree': 4.0.5 + browserslist: 4.28.6 change-case: 5.4.4 ci-info: 4.4.0 - clean-regexp: 1.0.0 core-js-compat: 3.49.0 - eslint: 10.5.0(jiti@2.7.0) + detect-indent: 7.0.2 + entities: 4.5.0 + eslint: 10.8.0(jiti@2.7.0)(supports-color@8.1.1) find-up-simple: 1.0.1 - globals: 17.6.0 + globals: 17.9.0 indent-string: 5.0.0 is-builtin-module: 5.0.0 - jsesc: 3.1.0 + is-identifier: 1.1.0 pluralize: 8.0.0 - regexp-tree: 0.1.27 + quote-js-string: 0.1.0 regjsparser: 0.13.2 - semver: 7.8.4 + reserved-identifiers: 1.2.0 + semver: 7.8.5 strip-indent: 4.1.1 + yaml: 2.9.0 eslint-scope@5.1.1: dependencies: @@ -20933,12 +20653,12 @@ snapshots: eslint-visitor-keys@5.0.1: {} - eslint@10.5.0(jiti@2.7.0): + eslint@10.8.0(jiti@2.7.0)(supports-color@8.1.1): dependencies: - '@eslint-community/eslint-utils': 4.9.1(eslint@10.5.0(jiti@2.7.0)) + '@eslint-community/eslint-utils': 4.10.1(eslint@10.8.0(jiti@2.7.0)(supports-color@8.1.1)) '@eslint-community/regexpp': 4.12.2 - '@eslint/config-array': 0.23.5 - '@eslint/config-helpers': 0.6.0 + '@eslint/config-array': 0.23.5(supports-color@8.1.1) + '@eslint/config-helpers': 0.7.0 '@eslint/core': 1.2.1 '@eslint/plugin-kit': 0.7.2 '@humanfs/node': 0.16.8 @@ -20947,7 +20667,7 @@ snapshots: '@types/estree': 1.0.9 ajv: 6.15.0 cross-spawn: 7.0.6 - debug: 4.4.3 + debug: 4.4.3(supports-color@8.1.1) escape-string-regexp: 4.0.0 eslint-scope: 9.1.2 eslint-visitor-keys: 5.0.1 @@ -20962,7 +20682,7 @@ snapshots: imurmurhash: 0.1.4 is-glob: 4.0.3 json-stable-stringify-without-jsonify: 1.0.1 - minimatch: 10.2.5 + minimatch: 10.2.6 natural-compare: 1.4.0 optionator: 0.9.4 optionalDependencies: @@ -20981,14 +20701,14 @@ snapshots: espree@10.4.0: dependencies: - acorn: 8.17.0 - acorn-jsx: 5.3.2(acorn@8.17.0) + acorn: 8.18.0 + acorn-jsx: 5.3.2(acorn@8.18.0) eslint-visitor-keys: 4.2.1 espree@11.2.0: dependencies: - acorn: 8.17.0 - acorn-jsx: 5.3.2(acorn@8.17.0) + acorn: 8.18.0 + acorn-jsx: 5.3.2(acorn@8.18.0) eslint-visitor-keys: 5.0.1 esprima@4.0.1: {} @@ -20997,11 +20717,11 @@ snapshots: dependencies: estraverse: 5.3.0 - esrap@2.2.11(@typescript-eslint/types@8.61.0): + esrap@2.2.13(@typescript-eslint/types@8.66.0): dependencies: '@jridgewell/sourcemap-codec': 1.5.5 optionalDependencies: - '@typescript-eslint/types': 8.61.0 + '@typescript-eslint/types': 8.66.0 esrecurse@4.3.0: dependencies: @@ -21060,7 +20780,7 @@ snapshots: eval@0.1.8: dependencies: - '@types/node': 24.13.2 + '@types/node': 24.13.3 require-like: 0.1.2 event-emitter@0.3.5: @@ -21100,7 +20820,7 @@ snapshots: exiftool-vendored@35.21.0: dependencies: '@photostructure/tz-lookup': 11.5.0 - '@types/luxon': 3.7.1 + '@types/luxon': 3.7.3 batch-cluster: 17.3.1 exiftool-vendored.pl: 13.59.0 he: 1.2.0 @@ -21111,25 +20831,25 @@ snapshots: expand-template@2.0.3: optional: true - expect-type@1.3.0: {} + expect-type@1.4.0: {} exponential-backoff@3.1.3: {} - express@4.22.2: + express@4.22.2(supports-color@8.1.1): dependencies: accepts: 1.3.8 array-flatten: 1.1.1 - body-parser: 1.20.5 + body-parser: 1.20.6(supports-color@8.1.1) content-disposition: 0.5.4 content-type: 1.0.5 cookie: 0.7.2 cookie-signature: 1.0.7 - debug: 2.6.9 + debug: 2.6.9(supports-color@8.1.1) depd: 2.0.0 encodeurl: 2.0.0 escape-html: 1.0.3 etag: 1.8.1 - finalhandler: 1.3.2 + finalhandler: 1.3.2(supports-color@8.1.1) fresh: 0.5.2 http-errors: 2.0.1 merge-descriptors: 1.0.3 @@ -21138,11 +20858,11 @@ snapshots: parseurl: 1.3.3 path-to-regexp: 0.1.13 proxy-addr: 2.0.7 - qs: 6.15.2 + qs: 6.15.3 range-parser: 1.2.1 safe-buffer: 5.2.1 - send: 0.19.2 - serve-static: 1.16.3 + send: 0.19.2(supports-color@8.1.1) + serve-static: 1.16.3(supports-color@8.1.1) setprototypeof: 1.2.0 statuses: 2.0.2 type-is: 1.6.18 @@ -21151,20 +20871,20 @@ snapshots: transitivePeerDependencies: - supports-color - express@5.2.1: + express@5.2.1(supports-color@8.1.1): dependencies: accepts: 2.0.0 - body-parser: 2.2.2 + body-parser: 2.3.0(supports-color@8.1.1) content-disposition: 1.1.0 content-type: 1.0.5 cookie: 0.7.2 cookie-signature: 1.2.2 - debug: 4.4.3 + debug: 4.4.3(supports-color@8.1.1) depd: 2.0.0 encodeurl: 2.0.0 escape-html: 1.0.3 etag: 1.8.1 - finalhandler: 2.1.1 + finalhandler: 2.1.1(supports-color@8.1.1) fresh: 2.0.0 http-errors: 2.0.1 merge-descriptors: 2.0.0 @@ -21173,11 +20893,11 @@ snapshots: once: 1.4.0 parseurl: 1.3.3 proxy-addr: 2.0.7 - qs: 6.15.2 - range-parser: 1.2.1 - router: 2.2.0 - send: 1.2.1 - serve-static: 2.2.1 + qs: 6.15.3 + range-parser: 1.3.0 + router: 2.2.0(supports-color@8.1.1) + send: 1.2.1(supports-color@8.1.1) + serve-static: 2.2.1(supports-color@8.1.1) statuses: 2.0.2 type-is: 2.1.0 vary: 1.1.2 @@ -21194,10 +20914,10 @@ snapshots: extend@3.0.2: {} - fabric@7.4.0: + fabric@7.4.0(supports-color@8.1.1): optionalDependencies: canvas: 3.2.3 - jsdom: 26.1.0(canvas@3.2.3) + jsdom: 26.1.0(canvas@3.2.3)(supports-color@8.1.1) transitivePeerDependencies: - bufferutil - supports-color @@ -21228,7 +20948,7 @@ snapshots: fast-safe-stringify@2.1.1: {} - fast-uri@3.1.2: {} + fast-uri@3.1.4: {} fastq@1.20.1: dependencies: @@ -21242,9 +20962,9 @@ snapshots: dependencies: websocket-driver: 0.7.5 - fdir@6.5.0(picomatch@4.0.4): + fdir@6.5.0(picomatch@4.0.5): optionalDependencies: - picomatch: 4.0.4 + picomatch: 4.0.5 feed@4.2.2: dependencies: @@ -21260,19 +20980,19 @@ snapshots: dependencies: flat-cache: 4.0.1 - file-loader@6.2.0(webpack@5.107.2(postcss@8.5.15)): + file-loader@6.2.0(webpack@5.108.4(@swc/core@1.15.47(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(uglify-js@3.19.3)): dependencies: loader-utils: 2.0.4 schema-utils: 3.3.0 - webpack: 5.107.2(postcss@8.5.15) + webpack: 5.108.4(@swc/core@1.15.47(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(uglify-js@3.19.3) file-source@0.6.1: dependencies: stream-source: 0.3.5 - file-type@21.3.4: + file-type@21.3.4(supports-color@8.1.1): dependencies: - '@tokenizer/inflate': 0.4.1 + '@tokenizer/inflate': 0.4.1(supports-color@8.1.1) strtok3: 10.3.5 token-types: 6.1.2 uint8array-extras: 1.5.0 @@ -21283,9 +21003,9 @@ snapshots: dependencies: to-regex-range: 5.0.1 - finalhandler@1.3.2: + finalhandler@1.3.2(supports-color@8.1.1): dependencies: - debug: 2.6.9 + debug: 2.6.9(supports-color@8.1.1) encodeurl: 2.0.0 escape-html: 1.0.3 on-finished: 2.4.1 @@ -21295,9 +21015,9 @@ snapshots: transitivePeerDependencies: - supports-color - finalhandler@2.1.1: + finalhandler@2.1.1(supports-color@8.1.1): dependencies: - debug: 4.4.3 + debug: 4.4.3(supports-color@8.1.1) encodeurl: 2.0.0 escape-html: 1.0.3 on-finished: 2.4.1 @@ -21330,26 +21050,28 @@ snapshots: flat-cache@4.0.1: dependencies: - flatted: 3.4.2 + flatted: 3.4.3 keyv: 4.5.4 flat@5.0.2: {} - flatted@3.4.2: {} + flatted@3.4.3: {} fluent-ffmpeg@2.1.3: dependencies: async: 0.2.10 which: 1.3.1 - follow-redirects@1.16.0: {} + follow-redirects@1.16.0(debug@4.4.3(supports-color@8.1.1)): + optionalDependencies: + debug: 4.4.3(supports-color@8.1.1) foreground-child@3.3.1: dependencies: cross-spawn: 7.0.6 signal-exit: 4.1.0 - fork-ts-checker-webpack-plugin@9.1.0(typescript@5.9.3)(webpack@5.106.2(@swc/core@1.15.41(@swc/helpers@0.5.23))(esbuild@0.28.1)(lightningcss@1.32.0)): + fork-ts-checker-webpack-plugin@9.1.0(typescript@5.9.3)(webpack@5.106.2(@swc/core@1.15.47(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(uglify-js@3.19.3)): dependencies: '@babel/code-frame': 7.29.7 chalk: 4.1.2 @@ -21361,10 +21083,10 @@ snapshots: minimatch: 3.1.5 node-abort-controller: 3.1.1 schema-utils: 3.3.0 - semver: 7.8.4 + semver: 7.8.5 tapable: 2.3.3 typescript: 5.9.3 - webpack: 5.106.2(@swc/core@1.15.41(@swc/helpers@0.5.23))(esbuild@0.28.1)(lightningcss@1.32.0) + webpack: 5.106.2(@swc/core@1.15.47(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(uglify-js@3.19.3) form-data-encoder@2.1.4: {} @@ -21402,7 +21124,7 @@ snapshots: jsonfile: 6.2.1 universalify: 2.0.1 - fs-extra@11.3.5: + fs-extra@11.3.6: dependencies: graceful-fs: 4.2.11 jsonfile: 6.2.1 @@ -21424,6 +21146,10 @@ snapshots: function-bind@1.1.2: {} + function-timeout@1.0.2: {} + + fuse.js@7.5.0: {} + gauge@3.0.2: dependencies: aproba: 2.1.0 @@ -21442,7 +21168,7 @@ snapshots: geo-coordinates-parser@1.7.4: {} - geo-tz@8.1.7: + geo-tz@8.1.8: dependencies: '@turf/boolean-point-in-polygon': 7.3.5 '@turf/helpers': 7.3.5 @@ -21476,7 +21202,7 @@ snapshots: get-own-enumerable-property-symbols@3.0.2: {} - get-port@7.2.0: {} + get-port@5.1.1: {} get-proto@1.0.1: dependencies: @@ -21521,7 +21247,7 @@ snapshots: glob@13.0.6: dependencies: - minimatch: 10.2.5 + minimatch: 10.2.6 minipass: 7.1.3 path-scurry: 2.0.2 @@ -21544,7 +21270,7 @@ snapshots: globals@16.5.0: {} - globals@17.6.0: {} + globals@17.9.0: {} globalyzer@0.1.0: {} @@ -21589,13 +21315,6 @@ snapshots: graph-data-structure@4.5.0: {} - gray-matter@4.0.3: - dependencies: - js-yaml: 3.14.2 - kind-of: 6.0.3 - section-matter: 1.0.0 - strip-bom-string: 1.0.0 - gzip-size@6.0.0: dependencies: duplexer: 0.1.2 @@ -21613,15 +21332,15 @@ snapshots: optionalDependencies: uglify-js: 3.19.3 - happy-dom@20.10.3: + happy-dom@20.11.1: dependencies: - '@types/node': 24.13.2 + '@types/node': 24.13.3 '@types/whatwg-mimetype': 3.0.2 '@types/ws': 8.18.1 buffer-image-size: 0.6.4 entities: 7.0.1 whatwg-mimetype: 3.0.0 - ws: 8.21.0 + ws: 8.21.1 transitivePeerDependencies: - bufferutil - utf-8-validate @@ -21657,7 +21376,7 @@ snapshots: hast-util-from-parse5@8.0.3: dependencies: - '@types/hast': 3.0.4 + '@types/hast': 3.0.5 '@types/unist': 3.0.3 devlop: 1.1.0 hastscript: 9.0.1 @@ -21674,13 +21393,13 @@ snapshots: hast-util-parse-selector@4.0.0: dependencies: - '@types/hast': 3.0.4 + '@types/hast': 3.0.5 hast-util-raw@9.1.0: dependencies: - '@types/hast': 3.0.4 + '@types/hast': 3.0.5 '@types/unist': 3.0.3 - '@ungap/structured-clone': 1.3.1 + '@ungap/structured-clone': 1.3.3 hast-util-from-parse5: 8.0.3 hast-util-to-parse5: 8.0.1 html-void-elements: 3.0.0 @@ -21709,19 +21428,19 @@ snapshots: unist-util-visit: 2.0.3 zwitch: 1.0.5 - hast-util-to-estree@3.1.3: + hast-util-to-estree@3.1.3(supports-color@8.1.1): dependencies: '@types/estree': 1.0.9 '@types/estree-jsx': 1.0.5 - '@types/hast': 3.0.4 + '@types/hast': 3.0.5 comma-separated-tokens: 2.0.3 devlop: 1.1.0 estree-util-attach-comments: 3.0.0 estree-util-is-identifier-name: 3.0.0 hast-util-whitespace: 3.0.0 - mdast-util-mdx-expression: 2.0.1 - mdast-util-mdx-jsx: 3.2.0 - mdast-util-mdxjs-esm: 2.0.1 + mdast-util-mdx-expression: 2.0.1(supports-color@8.1.1) + mdast-util-mdx-jsx: 3.2.0(supports-color@8.1.1) + mdast-util-mdxjs-esm: 2.0.1(supports-color@8.1.1) property-information: 7.2.0 space-separated-tokens: 2.0.2 style-to-js: 1.1.21 @@ -21730,18 +21449,18 @@ snapshots: transitivePeerDependencies: - supports-color - hast-util-to-jsx-runtime@2.3.6: + hast-util-to-jsx-runtime@2.3.6(supports-color@8.1.1): dependencies: '@types/estree': 1.0.9 - '@types/hast': 3.0.4 + '@types/hast': 3.0.5 '@types/unist': 3.0.3 comma-separated-tokens: 2.0.3 devlop: 1.1.0 estree-util-is-identifier-name: 3.0.0 hast-util-whitespace: 3.0.0 - mdast-util-mdx-expression: 2.0.1 - mdast-util-mdx-jsx: 3.2.0 - mdast-util-mdxjs-esm: 2.0.1 + mdast-util-mdx-expression: 2.0.1(supports-color@8.1.1) + mdast-util-mdx-jsx: 3.2.0(supports-color@8.1.1) + mdast-util-mdxjs-esm: 2.0.1(supports-color@8.1.1) property-information: 7.2.0 space-separated-tokens: 2.0.2 style-to-js: 1.1.21 @@ -21752,7 +21471,7 @@ snapshots: hast-util-to-parse5@8.0.1: dependencies: - '@types/hast': 3.0.4 + '@types/hast': 3.0.5 comma-separated-tokens: 2.0.3 devlop: 1.1.0 property-information: 7.2.0 @@ -21772,7 +21491,7 @@ snapshots: hast-util-whitespace@3.0.0: dependencies: - '@types/hast': 3.0.4 + '@types/hast': 3.0.5 hastscript@6.0.0: dependencies: @@ -21784,7 +21503,7 @@ snapshots: hastscript@9.0.1: dependencies: - '@types/hast': 3.0.4 + '@types/hast': 3.0.5 comma-separated-tokens: 2.0.3 hast-util-parse-selector: 4.0.0 property-information: 7.2.0 @@ -21792,7 +21511,7 @@ snapshots: he@1.2.0: {} - helmet@8.2.0: {} + helmet@8.3.0: {} highlight.js@11.11.1: {} @@ -21808,10 +21527,10 @@ snapshots: hls-video-element@1.5.11: dependencies: custom-media-element: 1.4.6 - hls.js: 1.6.16 + hls.js: 1.6.17 media-tracks: 0.3.5 - hls.js@1.6.16: {} + hls.js@1.6.17: {} hogan.js@3.0.2: dependencies: @@ -21844,7 +21563,7 @@ snapshots: he: 1.2.0 param-case: 3.0.4 relateurl: 0.2.7 - terser: 5.48.0 + terser: 5.49.0 html-minifier-terser@7.2.0: dependencies: @@ -21854,7 +21573,7 @@ snapshots: entities: 4.5.0 param-case: 3.0.4 relateurl: 0.2.7 - terser: 5.48.0 + terser: 5.49.0 html-tags@3.3.1: {} @@ -21868,7 +21587,7 @@ snapshots: html-void-elements@3.0.0: {} - html-webpack-plugin@5.6.7(webpack@5.107.2(postcss@8.5.15)): + html-webpack-plugin@5.6.7(webpack@5.108.4(@swc/core@1.15.47(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(uglify-js@3.19.3)): dependencies: '@types/html-minifier-terser': 6.1.0 html-minifier-terser: 6.1.0 @@ -21876,7 +21595,9 @@ snapshots: pretty-error: 4.0.0 tapable: 2.3.3 optionalDependencies: - webpack: 5.107.2(postcss@8.5.15) + webpack: 5.108.4(@swc/core@1.15.47(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(uglify-js@3.19.3) + + html5parser@3.0.0: {} htmlparser2@6.1.0: dependencies: @@ -21927,10 +21648,18 @@ snapshots: - supports-color optional: true - http-proxy-middleware@2.0.9(@types/express@4.17.25): + http-proxy-agent@7.0.2(supports-color@8.1.1): + dependencies: + agent-base: 7.1.4 + debug: 4.4.3(supports-color@8.1.1) + transitivePeerDependencies: + - supports-color + optional: true + + http-proxy-middleware@2.0.10(@types/express@4.17.25)(debug@4.4.3(supports-color@8.1.1)): dependencies: '@types/http-proxy': 1.17.17 - http-proxy: 1.18.1 + http-proxy: 1.18.1(debug@4.4.3(supports-color@8.1.1)) is-glob: 4.0.3 is-plain-obj: 3.0.0 micromatch: 4.0.8 @@ -21939,10 +21668,10 @@ snapshots: transitivePeerDependencies: - debug - http-proxy@1.18.1: + http-proxy@1.18.1(debug@4.4.3(supports-color@8.1.1)): dependencies: eventemitter3: 4.0.7 - follow-redirects: 1.16.0 + follow-redirects: 1.16.0(debug@4.4.3(supports-color@8.1.1)) requires-port: 1.0.0 transitivePeerDependencies: - debug @@ -21952,10 +21681,10 @@ snapshots: quick-lru: 5.1.1 resolve-alpn: 1.2.1 - https-proxy-agent@5.0.1: + https-proxy-agent@5.0.1(supports-color@8.1.1): dependencies: - agent-base: 6.0.2 - debug: 4.4.3 + agent-base: 6.0.2(supports-color@8.1.1) + debug: 4.4.3(supports-color@8.1.1) transitivePeerDependencies: - supports-color @@ -21967,6 +21696,14 @@ snapshots: - supports-color optional: true + https-proxy-agent@7.0.6(supports-color@8.1.1): + dependencies: + agent-base: 7.1.4 + debug: 4.4.3(supports-color@8.1.1) + transitivePeerDependencies: + - supports-color + optional: true + human-signals@2.1.0: {} hyperdyperid@1.2.0: {} @@ -21983,19 +21720,23 @@ snapshots: dependencies: safer-buffer: 2.1.2 - iconv-lite@0.7.2: + iconv-lite@0.7.3: dependencies: safer-buffer: 2.1.2 - icss-utils@5.1.0(postcss@8.5.15): + icss-utils@5.1.0(postcss@8.5.26): dependencies: - postcss: 8.5.15 + postcss: 8.5.26 + + identifier-regex@1.1.0: + dependencies: + reserved-identifiers: 1.2.0 ieee754@1.2.1: {} ignore@5.3.2: {} - ignore@7.0.5: {} + ignore@7.0.6: {} image-size@2.0.2: {} @@ -22003,7 +21744,7 @@ snapshots: immediate@3.3.0: {} - immutable-json-patch@6.0.2: {} + immutable-json-patch@6.0.3: {} immutable@5.1.6: {} @@ -22014,8 +21755,8 @@ snapshots: import-in-the-middle@3.0.2: dependencies: - acorn: 8.17.0 - acorn-import-attributes: 1.9.5(acorn@8.17.0) + acorn: 8.18.0 + acorn-import-attributes: 1.9.5(acorn@8.18.0) cjs-module-lexer: 2.2.0 module-details-from-path: 1.0.4 @@ -22044,9 +21785,9 @@ snapshots: inline-style-parser@0.2.7: {} - inquirer@8.2.7(@types/node@24.13.2): + inquirer@8.2.7(@types/node@24.13.3): dependencies: - '@inquirer/external-editor': 1.0.3(@types/node@24.13.2) + '@inquirer/external-editor': 1.0.3(@types/node@24.13.3) ansi-escapes: 4.3.2 chalk: 4.1.2 cli-cursor: 3.1.0 @@ -22075,34 +21816,20 @@ snapshots: '@formatjs/icu-messageformat-parser': 2.11.4 tslib: 2.8.1 - intl-messageformat@11.2.8: + intl-messageformat@11.2.13: dependencies: - '@formatjs/fast-memoize': 3.1.6 - '@formatjs/icu-messageformat-parser': 3.5.11 + '@formatjs/fast-memoize': 3.1.7 + '@formatjs/icu-messageformat-parser': 3.5.16 invariant@2.2.4: dependencies: loose-envify: 1.4.0 - ioredis@5.10.1: - dependencies: - '@ioredis/commands': 1.5.1 - cluster-key-slot: 1.1.2 - debug: 4.4.3 - denque: 2.1.0 - lodash.defaults: 4.2.0 - lodash.isarguments: 3.1.0 - redis-errors: 1.2.0 - redis-parser: 3.0.0 - standard-as-callback: 2.1.0 - transitivePeerDependencies: - - supports-color - - ioredis@5.11.1: + ioredis@5.11.1(supports-color@8.1.1): dependencies: '@ioredis/commands': 1.10.0 cluster-key-slot: 1.1.1 - debug: 4.4.3 + debug: 4.4.3(supports-color@8.1.1) denque: 2.1.0 redis-errors: 1.2.0 redis-parser: 3.0.0 @@ -22159,6 +21886,11 @@ snapshots: is-hexadecimal@2.0.1: {} + is-identifier@1.1.0: + dependencies: + identifier-regex: 1.1.0 + super-regex: 1.1.0 + is-in-ssh@1.0.0: {} is-inside-container@1.0.0: @@ -22213,8 +21945,6 @@ snapshots: is-stream@2.0.1: {} - is-stream@4.0.1: {} - is-typedarray@1.0.0: {} is-unicode-supported@0.1.0: {} @@ -22269,7 +21999,7 @@ snapshots: jest-util@29.7.0: dependencies: '@jest/types': 29.6.3 - '@types/node': 24.13.2 + '@types/node': 24.13.3 chalk: 4.1.2 ci-info: 3.9.0 graceful-fs: 4.2.11 @@ -22277,13 +22007,13 @@ snapshots: jest-worker@27.5.1: dependencies: - '@types/node': 24.13.2 + '@types/node': 24.13.3 merge-stream: 2.0.0 supports-color: 8.1.1 jest-worker@29.7.0: dependencies: - '@types/node': 24.13.2 + '@types/node': 24.13.3 jest-util: 29.7.0 merge-stream: 2.0.0 supports-color: 8.1.1 @@ -22304,7 +22034,7 @@ snapshots: '@sideway/formula': 3.0.1 '@sideway/pinpoint': 2.0.0 - jose@6.2.3: {} + jose@6.2.8: {} js-tokens@10.0.0: {} @@ -22312,16 +22042,15 @@ snapshots: js-tokens@9.0.1: {} - js-yaml@3.14.2: - dependencies: - argparse: 1.0.10 - esprima: 4.0.1 - - js-yaml@4.1.1: + js-yaml@4.3.0: dependencies: argparse: 2.0.1 - js-yaml@4.2.0: + js-yaml@5.2.1: + dependencies: + argparse: 2.0.1 + + js-yaml@5.2.3: dependencies: argparse: 2.0.1 @@ -22345,7 +22074,37 @@ snapshots: whatwg-encoding: 3.1.1 whatwg-mimetype: 4.0.0 whatwg-url: 14.2.0 - ws: 8.21.0 + ws: 8.21.1 + xml-name-validator: 5.0.0 + optionalDependencies: + canvas: 3.2.3 + transitivePeerDependencies: + - bufferutil + - supports-color + - utf-8-validate + optional: true + + jsdom@26.1.0(canvas@3.2.3)(supports-color@8.1.1): + dependencies: + cssstyle: 4.6.0 + data-urls: 5.0.0 + decimal.js: 10.6.0 + html-encoding-sniffer: 4.0.0 + http-proxy-agent: 7.0.2(supports-color@8.1.1) + https-proxy-agent: 7.0.6(supports-color@8.1.1) + is-potential-custom-element-name: 1.0.1 + nwsapi: 2.2.24 + parse5: 7.3.0 + rrweb-cssom: 0.8.0 + saxes: 6.0.0 + symbol-tree: 3.2.4 + tough-cookie: 5.1.2 + w3c-xmlserializer: 5.0.0 + webidl-conversions: 7.0.0 + whatwg-encoding: 3.1.1 + whatwg-mimetype: 4.0.0 + whatwg-url: 14.2.0 + ws: 8.21.1 xml-name-validator: 5.0.0 optionalDependencies: canvas: 3.2.3 @@ -22391,7 +22150,7 @@ snapshots: '@jsep-plugin/regex': 1.0.4(jsep@1.4.0) jsep: 1.4.0 - jsonrepair@3.14.0: {} + jsonrepair@3.15.0: {} jsonwebtoken@9.0.3: dependencies: @@ -22404,7 +22163,7 @@ snapshots: lodash.isstring: 4.0.1 lodash.once: 4.1.1 ms: 2.1.3 - semver: 7.8.4 + semver: 7.8.5 just-compare@2.3.0: {} @@ -22483,7 +22242,7 @@ snapshots: launch-editor@2.14.1: dependencies: picocolors: 1.1.1 - shell-quote: 1.8.4 + shell-quote: 1.10.0 layout-base@1.0.2: {} @@ -22505,36 +22264,69 @@ snapshots: lightningcss-android-arm64@1.32.0: optional: true + lightningcss-android-arm64@1.33.0: + optional: true + lightningcss-darwin-arm64@1.32.0: optional: true + lightningcss-darwin-arm64@1.33.0: + optional: true + lightningcss-darwin-x64@1.32.0: optional: true + lightningcss-darwin-x64@1.33.0: + optional: true + lightningcss-freebsd-x64@1.32.0: optional: true + lightningcss-freebsd-x64@1.33.0: + optional: true + lightningcss-linux-arm-gnueabihf@1.32.0: optional: true + lightningcss-linux-arm-gnueabihf@1.33.0: + optional: true + lightningcss-linux-arm64-gnu@1.32.0: optional: true + lightningcss-linux-arm64-gnu@1.33.0: + optional: true + lightningcss-linux-arm64-musl@1.32.0: optional: true + lightningcss-linux-arm64-musl@1.33.0: + optional: true + lightningcss-linux-x64-gnu@1.32.0: optional: true + lightningcss-linux-x64-gnu@1.33.0: + optional: true + lightningcss-linux-x64-musl@1.32.0: optional: true + lightningcss-linux-x64-musl@1.33.0: + optional: true + lightningcss-win32-arm64-msvc@1.32.0: optional: true + lightningcss-win32-arm64-msvc@1.33.0: + optional: true + lightningcss-win32-x64-msvc@1.32.0: optional: true + lightningcss-win32-x64-msvc@1.33.0: + optional: true + lightningcss@1.32.0: dependencies: detect-libc: 2.1.2 @@ -22551,6 +22343,22 @@ snapshots: lightningcss-win32-arm64-msvc: 1.32.0 lightningcss-win32-x64-msvc: 1.32.0 + lightningcss@1.33.0: + dependencies: + detect-libc: 2.1.2 + optionalDependencies: + lightningcss-android-arm64: 1.33.0 + lightningcss-darwin-arm64: 1.33.0 + lightningcss-darwin-x64: 1.33.0 + lightningcss-freebsd-x64: 1.33.0 + lightningcss-linux-arm-gnueabihf: 1.33.0 + lightningcss-linux-arm64-gnu: 1.33.0 + lightningcss-linux-arm64-musl: 1.33.0 + lightningcss-linux-x64-gnu: 1.33.0 + lightningcss-linux-x64-musl: 1.33.0 + lightningcss-win32-arm64-msvc: 1.33.0 + lightningcss-win32-x64-msvc: 1.33.0 + lilconfig@2.1.0: {} lilconfig@3.1.3: {} @@ -22589,12 +22397,8 @@ snapshots: lodash.debounce@4.0.8: {} - lodash.defaults@4.2.0: {} - lodash.includes@4.3.0: {} - lodash.isarguments@3.1.0: {} - lodash.isboolean@3.0.3: {} lodash.isinteger@4.0.4: {} @@ -22646,7 +22450,7 @@ snapshots: lru-cache@10.4.3: {} - lru-cache@11.5.1: {} + lru-cache@11.5.2: {} lru-cache@5.1.1: dependencies: @@ -22678,13 +22482,19 @@ snapshots: '@babel/types': 7.29.7 source-map-js: 1.2.1 + make-asynchronous@1.1.0: + dependencies: + p-event: 6.0.1 + type-fest: 4.41.0 + web-worker: 1.5.0 + make-dir@3.1.0: dependencies: semver: 6.3.1 make-dir@4.0.0: dependencies: - semver: 7.8.4 + semver: 7.8.5 maplibre-gl@5.24.0: dependencies: @@ -22720,13 +22530,13 @@ snapshots: math-intrinsics@1.1.0: {} - mdast-util-directive@3.1.0: + mdast-util-directive@3.1.0(supports-color@8.1.1): dependencies: '@types/mdast': 4.0.4 '@types/unist': 3.0.3 ccount: 2.0.1 devlop: 1.1.0 - mdast-util-from-markdown: 2.0.3 + mdast-util-from-markdown: 2.0.3(supports-color@8.1.1) mdast-util-to-markdown: 2.1.2 parse-entities: 4.0.2 stringify-entities: 4.0.4 @@ -22741,14 +22551,14 @@ snapshots: unist-util-is: 6.0.1 unist-util-visit-parents: 6.0.2 - mdast-util-from-markdown@2.0.3: + mdast-util-from-markdown@2.0.3(supports-color@8.1.1): dependencies: '@types/mdast': 4.0.4 '@types/unist': 3.0.3 decode-named-character-reference: 1.3.0 devlop: 1.1.0 mdast-util-to-string: 4.0.0 - micromark: 4.0.2 + micromark: 4.0.2(supports-color@8.1.1) micromark-util-decode-numeric-character-reference: 2.0.2 micromark-util-decode-string: 2.0.1 micromark-util-normalize-identifier: 2.0.1 @@ -22758,12 +22568,12 @@ snapshots: transitivePeerDependencies: - supports-color - mdast-util-frontmatter@2.0.1: + mdast-util-frontmatter@2.0.1(supports-color@8.1.1): dependencies: '@types/mdast': 4.0.4 devlop: 1.1.0 escape-string-regexp: 5.0.0 - mdast-util-from-markdown: 2.0.3 + mdast-util-from-markdown: 2.0.3(supports-color@8.1.1) mdast-util-to-markdown: 2.1.2 micromark-extension-frontmatter: 2.0.0 transitivePeerDependencies: @@ -22777,75 +22587,75 @@ snapshots: mdast-util-find-and-replace: 3.0.2 micromark-util-character: 2.1.1 - mdast-util-gfm-footnote@2.1.0: + mdast-util-gfm-footnote@2.1.0(supports-color@8.1.1): dependencies: '@types/mdast': 4.0.4 devlop: 1.1.0 - mdast-util-from-markdown: 2.0.3 + mdast-util-from-markdown: 2.0.3(supports-color@8.1.1) mdast-util-to-markdown: 2.1.2 micromark-util-normalize-identifier: 2.0.1 transitivePeerDependencies: - supports-color - mdast-util-gfm-strikethrough@2.0.0: + mdast-util-gfm-strikethrough@2.0.0(supports-color@8.1.1): dependencies: '@types/mdast': 4.0.4 - mdast-util-from-markdown: 2.0.3 + mdast-util-from-markdown: 2.0.3(supports-color@8.1.1) mdast-util-to-markdown: 2.1.2 transitivePeerDependencies: - supports-color - mdast-util-gfm-table@2.0.0: + mdast-util-gfm-table@2.0.0(supports-color@8.1.1): dependencies: '@types/mdast': 4.0.4 devlop: 1.1.0 markdown-table: 3.0.4 - mdast-util-from-markdown: 2.0.3 + mdast-util-from-markdown: 2.0.3(supports-color@8.1.1) mdast-util-to-markdown: 2.1.2 transitivePeerDependencies: - supports-color - mdast-util-gfm-task-list-item@2.0.0: + mdast-util-gfm-task-list-item@2.0.0(supports-color@8.1.1): dependencies: '@types/mdast': 4.0.4 devlop: 1.1.0 - mdast-util-from-markdown: 2.0.3 + mdast-util-from-markdown: 2.0.3(supports-color@8.1.1) mdast-util-to-markdown: 2.1.2 transitivePeerDependencies: - supports-color - mdast-util-gfm@3.1.0: + mdast-util-gfm@3.1.0(supports-color@8.1.1): dependencies: - mdast-util-from-markdown: 2.0.3 + mdast-util-from-markdown: 2.0.3(supports-color@8.1.1) mdast-util-gfm-autolink-literal: 2.0.1 - mdast-util-gfm-footnote: 2.1.0 - mdast-util-gfm-strikethrough: 2.0.0 - mdast-util-gfm-table: 2.0.0 - mdast-util-gfm-task-list-item: 2.0.0 + mdast-util-gfm-footnote: 2.1.0(supports-color@8.1.1) + mdast-util-gfm-strikethrough: 2.0.0(supports-color@8.1.1) + mdast-util-gfm-table: 2.0.0(supports-color@8.1.1) + mdast-util-gfm-task-list-item: 2.0.0(supports-color@8.1.1) mdast-util-to-markdown: 2.1.2 transitivePeerDependencies: - supports-color - mdast-util-mdx-expression@2.0.1: + mdast-util-mdx-expression@2.0.1(supports-color@8.1.1): dependencies: '@types/estree-jsx': 1.0.5 - '@types/hast': 3.0.4 + '@types/hast': 3.0.5 '@types/mdast': 4.0.4 devlop: 1.1.0 - mdast-util-from-markdown: 2.0.3 + mdast-util-from-markdown: 2.0.3(supports-color@8.1.1) mdast-util-to-markdown: 2.1.2 transitivePeerDependencies: - supports-color - mdast-util-mdx-jsx@3.2.0: + mdast-util-mdx-jsx@3.2.0(supports-color@8.1.1): dependencies: '@types/estree-jsx': 1.0.5 - '@types/hast': 3.0.4 + '@types/hast': 3.0.5 '@types/mdast': 4.0.4 '@types/unist': 3.0.3 ccount: 2.0.1 devlop: 1.1.0 - mdast-util-from-markdown: 2.0.3 + mdast-util-from-markdown: 2.0.3(supports-color@8.1.1) mdast-util-to-markdown: 2.1.2 parse-entities: 4.0.2 stringify-entities: 4.0.4 @@ -22854,23 +22664,23 @@ snapshots: transitivePeerDependencies: - supports-color - mdast-util-mdx@3.0.0: + mdast-util-mdx@3.0.0(supports-color@8.1.1): dependencies: - mdast-util-from-markdown: 2.0.3 - mdast-util-mdx-expression: 2.0.1 - mdast-util-mdx-jsx: 3.2.0 - mdast-util-mdxjs-esm: 2.0.1 + mdast-util-from-markdown: 2.0.3(supports-color@8.1.1) + mdast-util-mdx-expression: 2.0.1(supports-color@8.1.1) + mdast-util-mdx-jsx: 3.2.0(supports-color@8.1.1) + mdast-util-mdxjs-esm: 2.0.1(supports-color@8.1.1) mdast-util-to-markdown: 2.1.2 transitivePeerDependencies: - supports-color - mdast-util-mdxjs-esm@2.0.1: + mdast-util-mdxjs-esm@2.0.1(supports-color@8.1.1): dependencies: '@types/estree-jsx': 1.0.5 - '@types/hast': 3.0.4 + '@types/hast': 3.0.5 '@types/mdast': 4.0.4 devlop: 1.1.0 - mdast-util-from-markdown: 2.0.3 + mdast-util-from-markdown: 2.0.3(supports-color@8.1.1) mdast-util-to-markdown: 2.1.2 transitivePeerDependencies: - supports-color @@ -22882,9 +22692,9 @@ snapshots: mdast-util-to-hast@13.2.1: dependencies: - '@types/hast': 3.0.4 + '@types/hast': 3.0.5 '@types/mdast': 4.0.4 - '@ungap/structured-clone': 1.3.1 + '@ungap/structured-clone': 1.3.3 devlop: 1.1.0 micromark-util-sanitize-uri: 2.0.1 trim-lines: 3.0.1 @@ -22912,11 +22722,11 @@ snapshots: mdn-data@2.0.30: {} - mdn-data@2.28.1: {} + mdn-data@2.29.0: {} - media-chrome@4.19.2(react@19.2.7): + media-chrome@4.19.2(react@19.2.8): dependencies: - ce-la-react: 0.3.2(react@19.2.7) + ce-la-react: 0.3.2(react@19.2.8) transitivePeerDependencies: - react @@ -22930,16 +22740,16 @@ snapshots: dependencies: fs-monkey: 1.1.0 - memfs@4.57.7(tslib@2.8.1): + memfs@4.64.0(tslib@2.8.1): dependencies: - '@jsonjoy.com/fs-core': 4.57.7(tslib@2.8.1) - '@jsonjoy.com/fs-fsa': 4.57.7(tslib@2.8.1) - '@jsonjoy.com/fs-node': 4.57.7(tslib@2.8.1) - '@jsonjoy.com/fs-node-builtins': 4.57.7(tslib@2.8.1) - '@jsonjoy.com/fs-node-to-fsa': 4.57.7(tslib@2.8.1) - '@jsonjoy.com/fs-node-utils': 4.57.7(tslib@2.8.1) - '@jsonjoy.com/fs-print': 4.57.7(tslib@2.8.1) - '@jsonjoy.com/fs-snapshot': 4.57.7(tslib@2.8.1) + '@jsonjoy.com/fs-core': 4.64.0(tslib@2.8.1) + '@jsonjoy.com/fs-fsa': 4.64.0(tslib@2.8.1) + '@jsonjoy.com/fs-node': 4.64.0(tslib@2.8.1) + '@jsonjoy.com/fs-node-builtins': 4.64.0(tslib@2.8.1) + '@jsonjoy.com/fs-node-to-fsa': 4.64.0(tslib@2.8.1) + '@jsonjoy.com/fs-node-utils': 4.64.0(tslib@2.8.1) + '@jsonjoy.com/fs-print': 4.64.0(tslib@2.8.1) + '@jsonjoy.com/fs-snapshot': 4.64.0(tslib@2.8.1) '@jsonjoy.com/json-pack': 1.21.0(tslib@2.8.1) '@jsonjoy.com/util': 1.9.0(tslib@2.8.1) glob-to-regex.js: 1.2.0(tslib@2.8.1) @@ -22968,11 +22778,11 @@ snapshots: merge2@1.4.1: {} - mermaid@11.15.0: + mermaid@11.16.0: dependencies: '@braintree/sanitize-url': 7.1.2 - '@iconify/utils': 3.1.3 - '@mermaid-js/parser': 1.1.1 + '@iconify/utils': 3.1.4 + '@mermaid-js/parser': 1.2.0 '@types/d3': 7.4.3 '@upsetjs/venn.js': 2.0.0 cytoscape: 3.34.0 @@ -22982,15 +22792,15 @@ snapshots: d3-sankey: 0.12.3 dagre-d3-es: 7.0.14 dayjs: 1.11.21 - dompurify: 3.4.10 - es-toolkit: 1.47.1 + dompurify: 3.4.12 + es-toolkit: 1.49.0 katex: 0.16.47 khroma: 2.1.0 marked: 16.4.2 roughjs: 4.6.6 stylis: 4.4.0 ts-dedent: 2.3.0 - uuid: 14.0.0 + uuid: 14.0.1 methods@1.1.2: {} @@ -23130,8 +22940,8 @@ snapshots: micromark-extension-mdxjs@3.0.0: dependencies: - acorn: 8.17.0 - acorn-jsx: 5.3.2(acorn@8.17.0) + acorn: 8.18.0 + acorn-jsx: 5.3.2(acorn@8.18.0) micromark-extension-mdx-expression: 3.0.1 micromark-extension-mdx-jsx: 3.0.2 micromark-extension-mdx-md: 2.0.0 @@ -23267,10 +23077,10 @@ snapshots: micromark-util-types@2.0.2: {} - micromark@4.0.2: + micromark@4.0.2(supports-color@8.1.1): dependencies: '@types/debug': 4.1.13 - debug: 4.4.3 + debug: 4.4.3(supports-color@8.1.1) decode-named-character-reference: 1.3.0 devlop: 1.1.0 micromark-core-commonmark: 2.0.3 @@ -23326,17 +23136,17 @@ snapshots: min-indent@1.0.1: {} - mini-css-extract-plugin@2.10.2(webpack@5.107.2(postcss@8.5.15)): + mini-css-extract-plugin@2.10.2(webpack@5.108.4(@swc/core@1.15.47(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(uglify-js@3.19.3)): dependencies: schema-utils: 4.3.3 tapable: 2.3.3 - webpack: 5.107.2(postcss@8.5.15) + webpack: 5.108.4(@swc/core@1.15.47(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(uglify-js@3.19.3) minimalistic-assert@1.0.1: {} - minimatch@10.2.5: + minimatch@10.2.6: dependencies: - brace-expansion: 5.0.6 + brace-expansion: 5.0.8 minimatch@3.1.5: dependencies: @@ -23352,6 +23162,24 @@ snapshots: minimist@1.2.8: {} + minimizer-webpack-plugin@5.6.1(@swc/core@1.15.47(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(uglify-js@3.19.3)(webpack@5.108.4(@swc/core@1.15.47(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(uglify-js@3.19.3)): + dependencies: + '@jridgewell/trace-mapping': 0.3.31 + jest-worker: 27.5.1 + schema-utils: 4.3.3 + terser: 5.49.0 + webpack: 5.108.4(@swc/core@1.15.47(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(uglify-js@3.19.3) + optionalDependencies: + '@swc/core': 1.15.47(@swc/helpers@0.5.23) + clean-css: 5.3.3 + cssnano: 6.1.2(postcss@8.5.26) + csso: 5.0.5 + esbuild: 0.28.2 + html-minifier-terser: 7.2.0 + lightningcss: 1.33.0 + postcss: 8.5.26 + uglify-js: 3.19.3 + minipass@3.3.6: dependencies: yallist: 4.0.0 @@ -23407,17 +23235,10 @@ snapshots: '@msgpackr-extract/msgpackr-extract-win32-x64': 3.0.4 optional: true - msgpackr@2.0.2: + msgpackr@2.0.5: optionalDependencies: msgpackr-extract: 3.0.4 - multer@2.1.1: - dependencies: - append-field: 1.0.0 - busboy: 1.6.0 - concat-stream: 2.0.0 - type-is: 1.6.18 - multer@2.2.0: dependencies: append-field: 1.0.0 @@ -23444,12 +23265,12 @@ snapshots: object-assign: 4.1.1 thenify-all: 1.6.0 - nan@2.27.0: + nan@2.28.0: optional: true - nanoid@3.3.15: {} + nanoid@3.3.18: {} - nanoid@5.1.11: {} + nanoid@6.0.1: {} napi-build-utils@2.0.0: optional: true @@ -23473,51 +23294,52 @@ snapshots: neo-async@2.6.2: {} - nest-commander@3.20.1(@nestjs/common@11.1.27(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/core@11.1.27)(@types/inquirer@8.2.13)(@types/node@24.13.2)(typescript@6.0.3): + nest-commander@3.20.1(@nestjs/common@11.1.28(reflect-metadata@0.2.2)(rxjs@7.8.2)(supports-color@8.1.1))(@nestjs/core@11.1.28)(@types/inquirer@8.2.13)(@types/node@24.13.3)(@typescript/typescript6@6.0.2): dependencies: '@fig/complete-commander': 3.2.0(commander@11.1.0) - '@golevelup/nestjs-discovery': 5.0.0(@nestjs/common@11.1.27(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/core@11.1.27) - '@nestjs/common': 11.1.27(reflect-metadata@0.2.2)(rxjs@7.8.2) - '@nestjs/core': 11.1.27(@nestjs/common@11.1.27(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/platform-express@11.1.27)(@nestjs/websockets@11.1.27)(reflect-metadata@0.2.2)(rxjs@7.8.2) + '@golevelup/nestjs-discovery': 5.0.0(@nestjs/common@11.1.28(reflect-metadata@0.2.2)(rxjs@7.8.2)(supports-color@8.1.1))(@nestjs/core@11.1.28) + '@nestjs/common': 11.1.28(reflect-metadata@0.2.2)(rxjs@7.8.2)(supports-color@8.1.1) + '@nestjs/core': 11.1.28(@nestjs/common@11.1.28(reflect-metadata@0.2.2)(rxjs@7.8.2)(supports-color@8.1.1))(@nestjs/platform-express@11.1.28)(@nestjs/websockets@11.1.28)(reflect-metadata@0.2.2)(rxjs@7.8.2) '@types/inquirer': 8.2.13 commander: 11.1.0 - cosmiconfig: 8.3.6(typescript@6.0.3) - inquirer: 8.2.7(@types/node@24.13.2) + cosmiconfig: 8.3.6(@typescript/typescript6@6.0.2) + inquirer: 8.2.7(@types/node@24.13.3) transitivePeerDependencies: - '@types/node' - typescript - nestjs-cls@6.2.1(@nestjs/common@11.1.27(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/core@11.1.27)(reflect-metadata@0.2.2)(rxjs@7.8.2): + nestjs-cls@6.2.1(@nestjs/common@11.1.28(reflect-metadata@0.2.2)(rxjs@7.8.2)(supports-color@8.1.1))(@nestjs/core@11.1.28)(reflect-metadata@0.2.2)(rxjs@7.8.2): dependencies: - '@nestjs/common': 11.1.27(reflect-metadata@0.2.2)(rxjs@7.8.2) - '@nestjs/core': 11.1.27(@nestjs/common@11.1.27(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/platform-express@11.1.27)(@nestjs/websockets@11.1.27)(reflect-metadata@0.2.2)(rxjs@7.8.2) + '@nestjs/common': 11.1.28(reflect-metadata@0.2.2)(rxjs@7.8.2)(supports-color@8.1.1) + '@nestjs/core': 11.1.28(@nestjs/common@11.1.28(reflect-metadata@0.2.2)(rxjs@7.8.2)(supports-color@8.1.1))(@nestjs/platform-express@11.1.28)(@nestjs/websockets@11.1.28)(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.27(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/core@11.1.27)(kysely@0.28.17)(reflect-metadata@0.2.2): + nestjs-kysely@3.1.2(@nestjs/common@11.1.28(reflect-metadata@0.2.2)(rxjs@7.8.2)(supports-color@8.1.1))(@nestjs/core@11.1.28)(kysely@0.28.17)(reflect-metadata@0.2.2): dependencies: - '@nestjs/common': 11.1.27(reflect-metadata@0.2.2)(rxjs@7.8.2) - '@nestjs/core': 11.1.27(@nestjs/common@11.1.27(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/platform-express@11.1.27)(@nestjs/websockets@11.1.27)(reflect-metadata@0.2.2)(rxjs@7.8.2) + '@nestjs/common': 11.1.28(reflect-metadata@0.2.2)(rxjs@7.8.2)(supports-color@8.1.1) + '@nestjs/core': 11.1.28(@nestjs/common@11.1.28(reflect-metadata@0.2.2)(rxjs@7.8.2)(supports-color@8.1.1))(@nestjs/platform-express@11.1.28)(@nestjs/websockets@11.1.28)(reflect-metadata@0.2.2)(rxjs@7.8.2) kysely: 0.28.17 reflect-metadata: 0.2.2 tslib: 2.8.1 - nestjs-otel@8.0.3(@nestjs/common@11.1.27(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/core@11.1.27): + nestjs-otel@8.1.0(@nestjs/common@11.1.28(reflect-metadata@0.2.2)(rxjs@7.8.2)(supports-color@8.1.1))(@nestjs/core@11.1.28)(rxjs@7.8.2): dependencies: - '@nestjs/common': 11.1.27(reflect-metadata@0.2.2)(rxjs@7.8.2) - '@nestjs/core': 11.1.27(@nestjs/common@11.1.27(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/platform-express@11.1.27)(@nestjs/websockets@11.1.27)(reflect-metadata@0.2.2)(rxjs@7.8.2) + '@nestjs/common': 11.1.28(reflect-metadata@0.2.2)(rxjs@7.8.2)(supports-color@8.1.1) + '@nestjs/core': 11.1.28(@nestjs/common@11.1.28(reflect-metadata@0.2.2)(rxjs@7.8.2)(supports-color@8.1.1))(@nestjs/platform-express@11.1.28)(@nestjs/websockets@11.1.28)(reflect-metadata@0.2.2)(rxjs@7.8.2) '@opentelemetry/api': 1.9.1 '@opentelemetry/host-metrics': 0.38.3(@opentelemetry/api@1.9.1) + rxjs: 7.8.2 tslib: 2.8.1 - nestjs-zod@5.4.0(@nestjs/common@11.1.27(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/swagger@11.4.4(@nestjs/common@11.1.27(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/core@11.1.27)(reflect-metadata@0.2.2)(typescript@6.0.3))(rxjs@7.8.2)(zod@4.3.6): + nestjs-zod@5.5.0(@nestjs/common@11.1.28(reflect-metadata@0.2.2)(rxjs@7.8.2)(supports-color@8.1.1))(@nestjs/swagger@11.4.6(@nestjs/common@11.1.28(reflect-metadata@0.2.2)(rxjs@7.8.2)(supports-color@8.1.1))(@nestjs/core@11.1.28)(@typescript/typescript6@6.0.2)(reflect-metadata@0.2.2))(rxjs@7.8.2)(zod@4.3.6): dependencies: - '@nestjs/common': 11.1.27(reflect-metadata@0.2.2)(rxjs@7.8.2) + '@nestjs/common': 11.1.28(reflect-metadata@0.2.2)(rxjs@7.8.2)(supports-color@8.1.1) deepmerge: 4.3.1 rxjs: 7.8.2 zod: 4.3.6 optionalDependencies: - '@nestjs/swagger': 11.4.4(@nestjs/common@11.1.27(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/core@11.1.27)(reflect-metadata@0.2.2)(typescript@6.0.3) + '@nestjs/swagger': 11.4.6(@nestjs/common@11.1.28(reflect-metadata@0.2.2)(rxjs@7.8.2)(supports-color@8.1.1))(@nestjs/core@11.1.28)(@typescript/typescript6@6.0.2)(reflect-metadata@0.2.2) next-tick@1.1.0: {} @@ -23528,7 +23350,7 @@ snapshots: node-abi@3.92.0: dependencies: - semver: 7.8.4 + semver: 7.8.5 optional: true node-abort-controller@3.1.1: {} @@ -23569,15 +23391,15 @@ snapshots: graceful-fs: 4.2.11 nopt: 10.0.1 proc-log: 7.0.0 - semver: 7.8.4 + semver: 7.8.5 tar: 7.5.16 tinyglobby: 0.2.17 undici: 6.26.0 which: 7.0.0 - node-releases@2.0.47: {} + node-releases@2.0.51: {} - nodemailer@9.0.1: {} + nodemailer@9.0.4: {} nopt@1.0.10: dependencies: @@ -23616,11 +23438,11 @@ snapshots: dependencies: boolbase: 1.0.0 - null-loader@4.0.1(webpack@5.107.2(postcss@8.5.15)): + null-loader@4.0.1(webpack@5.108.4(@swc/core@1.15.47(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(uglify-js@3.19.3)): dependencies: loader-utils: 2.0.4 schema-utils: 3.3.0 - webpack: 5.107.2(postcss@8.5.15) + webpack: 5.108.4(@swc/core@1.15.47(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(uglify-js@3.19.3) nwsapi@2.2.24: optional: true @@ -23656,18 +23478,18 @@ snapshots: obug@2.1.3: {} - oidc-provider@9.8.4: + oidc-provider@9.11.2(supports-color@8.1.1): dependencies: '@koa/cors': 5.0.0 - '@koa/router': 15.6.0(koa@3.2.1) - debug: 4.4.3 + '@koa/router': 15.7.0(koa@3.2.1)(supports-color@8.1.1) + debug: 4.4.3(supports-color@8.1.1) eta: 4.6.0 - jose: 6.2.3 + jose: 6.2.8 jsesc: 3.1.0 koa: 3.2.1 - nanoid: 5.1.11 + nanoid: 6.0.1 quick-lru: 7.3.0 - raw-body: 3.0.2 + raw-body: 4.0.0 transitivePeerDependencies: - supports-color @@ -23715,7 +23537,7 @@ snapshots: openid-client@6.8.4: dependencies: - jose: 6.2.3 + jose: 6.2.8 oauth4webapi: 3.8.6 optionator@0.9.4: @@ -23753,6 +23575,10 @@ snapshots: p-cancelable@3.0.0: {} + p-event@6.0.1: + dependencies: + p-timeout: 6.1.4 + p-finally@1.0.0: {} p-limit@2.3.0: @@ -23798,6 +23624,8 @@ snapshots: dependencies: p-finally: 1.0.0 + p-timeout@6.1.4: {} + p-try@2.2.0: {} package-json-from-dist@1.0.1: {} @@ -23807,9 +23635,9 @@ snapshots: got: 12.6.1 registry-auth-token: 5.1.1 registry-url: 6.0.1 - semver: 7.8.4 + semver: 7.8.5 - package-manager-detector@1.6.0: {} + package-manager-detector@1.7.0: {} param-case@3.0.4: dependencies: @@ -23889,7 +23717,7 @@ snapshots: path-scurry@2.0.2: dependencies: - lru-cache: 11.5.1 + lru-cache: 11.5.2 minipass: 7.1.3 path-source@0.1.3: @@ -23931,15 +23759,15 @@ snapshots: pg-cloudflare@1.4.0: optional: true - pg-connection-string@2.13.0: {} + pg-connection-string@2.14.0: {} pg-int8@1.0.1: {} - pg-pool@3.14.0(pg@8.21.0): + pg-pool@3.14.0(pg@8.22.0): dependencies: - pg: 8.21.0 + pg: 8.22.0 - pg-protocol@1.14.0: {} + pg-protocol@1.16.0: {} pg-types@2.2.0: dependencies: @@ -23949,11 +23777,11 @@ snapshots: postgres-date: 1.0.7 postgres-interval: 1.2.0 - pg@8.21.0: + pg@8.22.0: dependencies: - pg-connection-string: 2.13.0 - pg-pool: 3.14.0(pg@8.21.0) - pg-protocol: 1.14.0 + pg-connection-string: 2.14.0 + pg-pool: 3.14.0(pg@8.22.0) + pg-protocol: 1.16.0 pg-types: 2.2.0 pgpass: 1.0.5 optionalDependencies: @@ -23969,6 +23797,8 @@ snapshots: picomatch@4.0.4: {} + picomatch@4.0.5: {} + pify@2.3.0: {} pirates@4.0.7: {} @@ -23986,11 +23816,11 @@ snapshots: pvutils: 1.1.5 tslib: 2.8.1 - playwright-core@1.60.0: {} + playwright-core@1.62.1: {} - playwright@1.60.0: + playwright@1.62.1: dependencies: - playwright-core: 1.60.0 + playwright-core: 1.62.1 optionalDependencies: fsevents: 2.3.2 @@ -24024,448 +23854,448 @@ snapshots: path-data-parser: 0.1.0 points-on-curve: 0.2.0 - postcss-attribute-case-insensitive@7.0.1(postcss@8.5.15): + postcss-attribute-case-insensitive@7.0.1(postcss@8.5.26): dependencies: - postcss: 8.5.15 + postcss: 8.5.26 postcss-selector-parser: 7.1.4 - postcss-calc@9.0.1(postcss@8.5.15): + postcss-calc@9.0.1(postcss@8.5.26): dependencies: - postcss: 8.5.15 + postcss: 8.5.26 postcss-selector-parser: 6.1.4 postcss-value-parser: 4.2.0 - postcss-clamp@4.1.0(postcss@8.5.15): + postcss-clamp@4.1.0(postcss@8.5.26): dependencies: - postcss: 8.5.15 + postcss: 8.5.26 postcss-value-parser: 4.2.0 - postcss-color-functional-notation@7.0.12(postcss@8.5.15): + postcss-color-functional-notation@7.0.12(postcss@8.5.26): dependencies: '@csstools/css-color-parser': 3.1.0(@csstools/css-parser-algorithms@3.0.5(@csstools/css-tokenizer@3.0.4))(@csstools/css-tokenizer@3.0.4) '@csstools/css-parser-algorithms': 3.0.5(@csstools/css-tokenizer@3.0.4) '@csstools/css-tokenizer': 3.0.4 - '@csstools/postcss-progressive-custom-properties': 4.2.1(postcss@8.5.15) - '@csstools/utilities': 2.0.0(postcss@8.5.15) - postcss: 8.5.15 + '@csstools/postcss-progressive-custom-properties': 4.2.1(postcss@8.5.26) + '@csstools/utilities': 2.0.0(postcss@8.5.26) + postcss: 8.5.26 - postcss-color-hex-alpha@10.0.0(postcss@8.5.15): + postcss-color-hex-alpha@10.0.0(postcss@8.5.26): dependencies: - '@csstools/utilities': 2.0.0(postcss@8.5.15) - postcss: 8.5.15 + '@csstools/utilities': 2.0.0(postcss@8.5.26) + postcss: 8.5.26 postcss-value-parser: 4.2.0 - postcss-color-rebeccapurple@10.0.0(postcss@8.5.15): + postcss-color-rebeccapurple@10.0.0(postcss@8.5.26): dependencies: - '@csstools/utilities': 2.0.0(postcss@8.5.15) - postcss: 8.5.15 + '@csstools/utilities': 2.0.0(postcss@8.5.26) + postcss: 8.5.26 postcss-value-parser: 4.2.0 - postcss-colormin@6.1.0(postcss@8.5.15): + postcss-colormin@6.1.0(postcss@8.5.26): dependencies: - browserslist: 4.28.2 + browserslist: 4.28.6 caniuse-api: 3.0.0 colord: 2.9.3 - postcss: 8.5.15 + postcss: 8.5.26 postcss-value-parser: 4.2.0 - postcss-convert-values@6.1.0(postcss@8.5.15): + postcss-convert-values@6.1.0(postcss@8.5.26): dependencies: - browserslist: 4.28.2 - postcss: 8.5.15 + browserslist: 4.28.6 + postcss: 8.5.26 postcss-value-parser: 4.2.0 - postcss-custom-media@11.0.6(postcss@8.5.15): + postcss-custom-media@11.0.6(postcss@8.5.26): dependencies: '@csstools/cascade-layer-name-parser': 2.0.5(@csstools/css-parser-algorithms@3.0.5(@csstools/css-tokenizer@3.0.4))(@csstools/css-tokenizer@3.0.4) '@csstools/css-parser-algorithms': 3.0.5(@csstools/css-tokenizer@3.0.4) '@csstools/css-tokenizer': 3.0.4 '@csstools/media-query-list-parser': 4.0.3(@csstools/css-parser-algorithms@3.0.5(@csstools/css-tokenizer@3.0.4))(@csstools/css-tokenizer@3.0.4) - postcss: 8.5.15 + postcss: 8.5.26 - postcss-custom-properties@14.0.6(postcss@8.5.15): + postcss-custom-properties@14.0.6(postcss@8.5.26): dependencies: '@csstools/cascade-layer-name-parser': 2.0.5(@csstools/css-parser-algorithms@3.0.5(@csstools/css-tokenizer@3.0.4))(@csstools/css-tokenizer@3.0.4) '@csstools/css-parser-algorithms': 3.0.5(@csstools/css-tokenizer@3.0.4) '@csstools/css-tokenizer': 3.0.4 - '@csstools/utilities': 2.0.0(postcss@8.5.15) - postcss: 8.5.15 + '@csstools/utilities': 2.0.0(postcss@8.5.26) + postcss: 8.5.26 postcss-value-parser: 4.2.0 - postcss-custom-selectors@8.0.5(postcss@8.5.15): + postcss-custom-selectors@8.0.5(postcss@8.5.26): dependencies: '@csstools/cascade-layer-name-parser': 2.0.5(@csstools/css-parser-algorithms@3.0.5(@csstools/css-tokenizer@3.0.4))(@csstools/css-tokenizer@3.0.4) '@csstools/css-parser-algorithms': 3.0.5(@csstools/css-tokenizer@3.0.4) '@csstools/css-tokenizer': 3.0.4 - postcss: 8.5.15 + postcss: 8.5.26 postcss-selector-parser: 7.1.4 - postcss-dir-pseudo-class@9.0.1(postcss@8.5.15): + postcss-dir-pseudo-class@9.0.1(postcss@8.5.26): dependencies: - postcss: 8.5.15 + postcss: 8.5.26 postcss-selector-parser: 7.1.4 - postcss-discard-comments@6.0.2(postcss@8.5.15): + postcss-discard-comments@6.0.2(postcss@8.5.26): dependencies: - postcss: 8.5.15 + postcss: 8.5.26 - postcss-discard-duplicates@6.0.3(postcss@8.5.15): + postcss-discard-duplicates@6.0.3(postcss@8.5.26): dependencies: - postcss: 8.5.15 + postcss: 8.5.26 - postcss-discard-empty@6.0.3(postcss@8.5.15): + postcss-discard-empty@6.0.3(postcss@8.5.26): dependencies: - postcss: 8.5.15 + postcss: 8.5.26 - postcss-discard-overridden@6.0.2(postcss@8.5.15): + postcss-discard-overridden@6.0.2(postcss@8.5.26): dependencies: - postcss: 8.5.15 + postcss: 8.5.26 - postcss-discard-unused@6.0.5(postcss@8.5.15): + postcss-discard-unused@6.0.5(postcss@8.5.26): dependencies: - postcss: 8.5.15 + postcss: 8.5.26 postcss-selector-parser: 6.1.4 - postcss-double-position-gradients@6.0.4(postcss@8.5.15): + postcss-double-position-gradients@6.0.4(postcss@8.5.26): dependencies: - '@csstools/postcss-progressive-custom-properties': 4.2.1(postcss@8.5.15) - '@csstools/utilities': 2.0.0(postcss@8.5.15) - postcss: 8.5.15 + '@csstools/postcss-progressive-custom-properties': 4.2.1(postcss@8.5.26) + '@csstools/utilities': 2.0.0(postcss@8.5.26) + postcss: 8.5.26 postcss-value-parser: 4.2.0 - postcss-focus-visible@10.0.1(postcss@8.5.15): + postcss-focus-visible@10.0.1(postcss@8.5.26): dependencies: - postcss: 8.5.15 + postcss: 8.5.26 postcss-selector-parser: 7.1.4 - postcss-focus-within@9.0.1(postcss@8.5.15): + postcss-focus-within@9.0.1(postcss@8.5.26): dependencies: - postcss: 8.5.15 + postcss: 8.5.26 postcss-selector-parser: 7.1.4 - postcss-font-variant@5.0.0(postcss@8.5.15): + postcss-font-variant@5.0.0(postcss@8.5.26): dependencies: - postcss: 8.5.15 + postcss: 8.5.26 - postcss-gap-properties@6.0.0(postcss@8.5.15): + postcss-gap-properties@6.0.0(postcss@8.5.26): dependencies: - postcss: 8.5.15 + postcss: 8.5.26 - postcss-image-set-function@7.0.0(postcss@8.5.15): + postcss-image-set-function@7.0.0(postcss@8.5.26): dependencies: - '@csstools/utilities': 2.0.0(postcss@8.5.15) - postcss: 8.5.15 + '@csstools/utilities': 2.0.0(postcss@8.5.26) + postcss: 8.5.26 postcss-value-parser: 4.2.0 - postcss-import@15.1.0(postcss@8.5.15): + postcss-import@15.1.0(postcss@8.5.26): dependencies: - postcss: 8.5.15 + postcss: 8.5.26 postcss-value-parser: 4.2.0 read-cache: 1.0.0 resolve: 1.22.12 - postcss-js@4.1.0(postcss@8.5.15): + postcss-js@4.1.0(postcss@8.5.26): dependencies: camelcase-css: 2.0.1 - postcss: 8.5.15 + postcss: 8.5.26 - postcss-lab-function@7.0.12(postcss@8.5.15): + postcss-lab-function@7.0.12(postcss@8.5.26): dependencies: '@csstools/css-color-parser': 3.1.0(@csstools/css-parser-algorithms@3.0.5(@csstools/css-tokenizer@3.0.4))(@csstools/css-tokenizer@3.0.4) '@csstools/css-parser-algorithms': 3.0.5(@csstools/css-tokenizer@3.0.4) '@csstools/css-tokenizer': 3.0.4 - '@csstools/postcss-progressive-custom-properties': 4.2.1(postcss@8.5.15) - '@csstools/utilities': 2.0.0(postcss@8.5.15) - postcss: 8.5.15 + '@csstools/postcss-progressive-custom-properties': 4.2.1(postcss@8.5.26) + '@csstools/utilities': 2.0.0(postcss@8.5.26) + postcss: 8.5.26 - postcss-load-config@3.1.4(postcss@8.5.15): + postcss-load-config@3.1.4(postcss@8.5.26): dependencies: lilconfig: 2.1.0 yaml: 1.10.3 optionalDependencies: - postcss: 8.5.15 + postcss: 8.5.26 - postcss-load-config@6.0.1(jiti@1.21.7)(postcss@8.5.15)(tsx@4.22.4)(yaml@2.9.0): + postcss-load-config@6.0.1(jiti@1.21.7)(postcss@8.5.26)(tsx@4.23.9)(yaml@2.9.0): dependencies: lilconfig: 3.1.3 optionalDependencies: jiti: 1.21.7 - postcss: 8.5.15 - tsx: 4.22.4 + postcss: 8.5.26 + tsx: 4.23.9 yaml: 2.9.0 - postcss-loader@7.3.4(postcss@8.5.15)(typescript@6.0.3)(webpack@5.107.2(postcss@8.5.15)): + postcss-loader@7.3.4(@typescript/typescript6@6.0.2)(postcss@8.5.26)(webpack@5.108.4(@swc/core@1.15.47(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(uglify-js@3.19.3)): dependencies: - cosmiconfig: 8.3.6(typescript@6.0.3) + cosmiconfig: 8.3.6(@typescript/typescript6@6.0.2) jiti: 1.21.7 - postcss: 8.5.15 - semver: 7.8.4 - webpack: 5.107.2(postcss@8.5.15) + postcss: 8.5.26 + semver: 7.8.5 + webpack: 5.108.4(@swc/core@1.15.47(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(uglify-js@3.19.3) transitivePeerDependencies: - typescript - postcss-logical@8.1.0(postcss@8.5.15): + postcss-logical@8.1.0(postcss@8.5.26): dependencies: - postcss: 8.5.15 + postcss: 8.5.26 postcss-value-parser: 4.2.0 - postcss-merge-idents@6.0.3(postcss@8.5.15): + postcss-merge-idents@6.0.3(postcss@8.5.26): dependencies: - cssnano-utils: 4.0.2(postcss@8.5.15) - postcss: 8.5.15 + cssnano-utils: 4.0.2(postcss@8.5.26) + postcss: 8.5.26 postcss-value-parser: 4.2.0 - postcss-merge-longhand@6.0.5(postcss@8.5.15): + postcss-merge-longhand@6.0.5(postcss@8.5.26): dependencies: - postcss: 8.5.15 + postcss: 8.5.26 postcss-value-parser: 4.2.0 - stylehacks: 6.1.1(postcss@8.5.15) + stylehacks: 6.1.1(postcss@8.5.26) - postcss-merge-rules@6.1.1(postcss@8.5.15): + postcss-merge-rules@6.1.1(postcss@8.5.26): dependencies: - browserslist: 4.28.2 + browserslist: 4.28.6 caniuse-api: 3.0.0 - cssnano-utils: 4.0.2(postcss@8.5.15) - postcss: 8.5.15 + cssnano-utils: 4.0.2(postcss@8.5.26) + postcss: 8.5.26 postcss-selector-parser: 6.1.4 - postcss-minify-font-values@6.1.0(postcss@8.5.15): + postcss-minify-font-values@6.1.0(postcss@8.5.26): dependencies: - postcss: 8.5.15 + postcss: 8.5.26 postcss-value-parser: 4.2.0 - postcss-minify-gradients@6.0.3(postcss@8.5.15): + postcss-minify-gradients@6.0.3(postcss@8.5.26): dependencies: colord: 2.9.3 - cssnano-utils: 4.0.2(postcss@8.5.15) - postcss: 8.5.15 + cssnano-utils: 4.0.2(postcss@8.5.26) + postcss: 8.5.26 postcss-value-parser: 4.2.0 - postcss-minify-params@6.1.0(postcss@8.5.15): + postcss-minify-params@6.1.0(postcss@8.5.26): dependencies: - browserslist: 4.28.2 - cssnano-utils: 4.0.2(postcss@8.5.15) - postcss: 8.5.15 + browserslist: 4.28.6 + cssnano-utils: 4.0.2(postcss@8.5.26) + postcss: 8.5.26 postcss-value-parser: 4.2.0 - postcss-minify-selectors@6.0.4(postcss@8.5.15): + postcss-minify-selectors@6.0.4(postcss@8.5.26): dependencies: - postcss: 8.5.15 + postcss: 8.5.26 postcss-selector-parser: 6.1.4 - postcss-modules-extract-imports@3.1.0(postcss@8.5.15): + postcss-modules-extract-imports@3.1.0(postcss@8.5.26): dependencies: - postcss: 8.5.15 + postcss: 8.5.26 - postcss-modules-local-by-default@4.2.0(postcss@8.5.15): + postcss-modules-local-by-default@4.2.0(postcss@8.5.26): dependencies: - icss-utils: 5.1.0(postcss@8.5.15) - postcss: 8.5.15 + icss-utils: 5.1.0(postcss@8.5.26) + postcss: 8.5.26 postcss-selector-parser: 7.1.4 postcss-value-parser: 4.2.0 - postcss-modules-scope@3.2.1(postcss@8.5.15): + postcss-modules-scope@3.2.1(postcss@8.5.26): dependencies: - postcss: 8.5.15 + postcss: 8.5.26 postcss-selector-parser: 7.1.4 - postcss-modules-values@4.0.0(postcss@8.5.15): + postcss-modules-values@4.0.0(postcss@8.5.26): dependencies: - icss-utils: 5.1.0(postcss@8.5.15) - postcss: 8.5.15 + icss-utils: 5.1.0(postcss@8.5.26) + postcss: 8.5.26 - postcss-nested@6.2.0(postcss@8.5.15): + postcss-nested@6.2.0(postcss@8.5.26): dependencies: - postcss: 8.5.15 + postcss: 8.5.26 postcss-selector-parser: 6.1.4 - postcss-nesting@13.0.2(postcss@8.5.15): + postcss-nesting@13.0.2(postcss@8.5.26): dependencies: '@csstools/selector-resolve-nested': 3.1.0(postcss-selector-parser@7.1.4) '@csstools/selector-specificity': 5.0.0(postcss-selector-parser@7.1.4) - postcss: 8.5.15 + postcss: 8.5.26 postcss-selector-parser: 7.1.4 - postcss-normalize-charset@6.0.2(postcss@8.5.15): + postcss-normalize-charset@6.0.2(postcss@8.5.26): dependencies: - postcss: 8.5.15 + postcss: 8.5.26 - postcss-normalize-display-values@6.0.2(postcss@8.5.15): + postcss-normalize-display-values@6.0.2(postcss@8.5.26): dependencies: - postcss: 8.5.15 + postcss: 8.5.26 postcss-value-parser: 4.2.0 - postcss-normalize-positions@6.0.2(postcss@8.5.15): + postcss-normalize-positions@6.0.2(postcss@8.5.26): dependencies: - postcss: 8.5.15 + postcss: 8.5.26 postcss-value-parser: 4.2.0 - postcss-normalize-repeat-style@6.0.2(postcss@8.5.15): + postcss-normalize-repeat-style@6.0.2(postcss@8.5.26): dependencies: - postcss: 8.5.15 + postcss: 8.5.26 postcss-value-parser: 4.2.0 - postcss-normalize-string@6.0.2(postcss@8.5.15): + postcss-normalize-string@6.0.2(postcss@8.5.26): dependencies: - postcss: 8.5.15 + postcss: 8.5.26 postcss-value-parser: 4.2.0 - postcss-normalize-timing-functions@6.0.2(postcss@8.5.15): + postcss-normalize-timing-functions@6.0.2(postcss@8.5.26): dependencies: - postcss: 8.5.15 + postcss: 8.5.26 postcss-value-parser: 4.2.0 - postcss-normalize-unicode@6.1.0(postcss@8.5.15): + postcss-normalize-unicode@6.1.0(postcss@8.5.26): dependencies: - browserslist: 4.28.2 - postcss: 8.5.15 + browserslist: 4.28.6 + postcss: 8.5.26 postcss-value-parser: 4.2.0 - postcss-normalize-url@6.0.2(postcss@8.5.15): + postcss-normalize-url@6.0.2(postcss@8.5.26): dependencies: - postcss: 8.5.15 + postcss: 8.5.26 postcss-value-parser: 4.2.0 - postcss-normalize-whitespace@6.0.2(postcss@8.5.15): + postcss-normalize-whitespace@6.0.2(postcss@8.5.26): dependencies: - postcss: 8.5.15 + postcss: 8.5.26 postcss-value-parser: 4.2.0 - postcss-opacity-percentage@3.0.0(postcss@8.5.15): + postcss-opacity-percentage@3.0.0(postcss@8.5.26): dependencies: - postcss: 8.5.15 + postcss: 8.5.26 - postcss-ordered-values@6.0.2(postcss@8.5.15): + postcss-ordered-values@6.0.2(postcss@8.5.26): dependencies: - cssnano-utils: 4.0.2(postcss@8.5.15) - postcss: 8.5.15 + cssnano-utils: 4.0.2(postcss@8.5.26) + postcss: 8.5.26 postcss-value-parser: 4.2.0 - postcss-overflow-shorthand@6.0.0(postcss@8.5.15): + postcss-overflow-shorthand@6.0.0(postcss@8.5.26): dependencies: - postcss: 8.5.15 + postcss: 8.5.26 postcss-value-parser: 4.2.0 - postcss-page-break@3.0.4(postcss@8.5.15): + postcss-page-break@3.0.4(postcss@8.5.26): dependencies: - postcss: 8.5.15 + postcss: 8.5.26 - postcss-place@10.0.0(postcss@8.5.15): + postcss-place@10.0.0(postcss@8.5.26): dependencies: - postcss: 8.5.15 + postcss: 8.5.26 postcss-value-parser: 4.2.0 - postcss-preset-env@10.6.1(postcss@8.5.15): + postcss-preset-env@10.6.1(postcss@8.5.26): dependencies: - '@csstools/postcss-alpha-function': 1.0.1(postcss@8.5.15) - '@csstools/postcss-cascade-layers': 5.0.2(postcss@8.5.15) - '@csstools/postcss-color-function': 4.0.12(postcss@8.5.15) - '@csstools/postcss-color-function-display-p3-linear': 1.0.1(postcss@8.5.15) - '@csstools/postcss-color-mix-function': 3.0.12(postcss@8.5.15) - '@csstools/postcss-color-mix-variadic-function-arguments': 1.0.2(postcss@8.5.15) - '@csstools/postcss-content-alt-text': 2.0.8(postcss@8.5.15) - '@csstools/postcss-contrast-color-function': 2.0.12(postcss@8.5.15) - '@csstools/postcss-exponential-functions': 2.0.9(postcss@8.5.15) - '@csstools/postcss-font-format-keywords': 4.0.0(postcss@8.5.15) - '@csstools/postcss-gamut-mapping': 2.0.11(postcss@8.5.15) - '@csstools/postcss-gradients-interpolation-method': 5.0.12(postcss@8.5.15) - '@csstools/postcss-hwb-function': 4.0.12(postcss@8.5.15) - '@csstools/postcss-ic-unit': 4.0.4(postcss@8.5.15) - '@csstools/postcss-initial': 2.0.1(postcss@8.5.15) - '@csstools/postcss-is-pseudo-class': 5.0.3(postcss@8.5.15) - '@csstools/postcss-light-dark-function': 2.0.11(postcss@8.5.15) - '@csstools/postcss-logical-float-and-clear': 3.0.0(postcss@8.5.15) - '@csstools/postcss-logical-overflow': 2.0.0(postcss@8.5.15) - '@csstools/postcss-logical-overscroll-behavior': 2.0.0(postcss@8.5.15) - '@csstools/postcss-logical-resize': 3.0.0(postcss@8.5.15) - '@csstools/postcss-logical-viewport-units': 3.0.4(postcss@8.5.15) - '@csstools/postcss-media-minmax': 2.0.9(postcss@8.5.15) - '@csstools/postcss-media-queries-aspect-ratio-number-values': 3.0.5(postcss@8.5.15) - '@csstools/postcss-nested-calc': 4.0.0(postcss@8.5.15) - '@csstools/postcss-normalize-display-values': 4.0.1(postcss@8.5.15) - '@csstools/postcss-oklab-function': 4.0.12(postcss@8.5.15) - '@csstools/postcss-position-area-property': 1.0.0(postcss@8.5.15) - '@csstools/postcss-progressive-custom-properties': 4.2.1(postcss@8.5.15) - '@csstools/postcss-property-rule-prelude-list': 1.0.0(postcss@8.5.15) - '@csstools/postcss-random-function': 2.0.1(postcss@8.5.15) - '@csstools/postcss-relative-color-syntax': 3.0.12(postcss@8.5.15) - '@csstools/postcss-scope-pseudo-class': 4.0.1(postcss@8.5.15) - '@csstools/postcss-sign-functions': 1.1.4(postcss@8.5.15) - '@csstools/postcss-stepped-value-functions': 4.0.9(postcss@8.5.15) - '@csstools/postcss-syntax-descriptor-syntax-production': 1.0.1(postcss@8.5.15) - '@csstools/postcss-system-ui-font-family': 1.0.0(postcss@8.5.15) - '@csstools/postcss-text-decoration-shorthand': 4.0.3(postcss@8.5.15) - '@csstools/postcss-trigonometric-functions': 4.0.9(postcss@8.5.15) - '@csstools/postcss-unset-value': 4.0.0(postcss@8.5.15) - autoprefixer: 10.5.0(postcss@8.5.15) - browserslist: 4.28.2 - css-blank-pseudo: 7.0.1(postcss@8.5.15) - css-has-pseudo: 7.0.3(postcss@8.5.15) - css-prefers-color-scheme: 10.0.0(postcss@8.5.15) + '@csstools/postcss-alpha-function': 1.0.1(postcss@8.5.26) + '@csstools/postcss-cascade-layers': 5.0.2(postcss@8.5.26) + '@csstools/postcss-color-function': 4.0.12(postcss@8.5.26) + '@csstools/postcss-color-function-display-p3-linear': 1.0.1(postcss@8.5.26) + '@csstools/postcss-color-mix-function': 3.0.12(postcss@8.5.26) + '@csstools/postcss-color-mix-variadic-function-arguments': 1.0.2(postcss@8.5.26) + '@csstools/postcss-content-alt-text': 2.0.8(postcss@8.5.26) + '@csstools/postcss-contrast-color-function': 2.0.12(postcss@8.5.26) + '@csstools/postcss-exponential-functions': 2.0.9(postcss@8.5.26) + '@csstools/postcss-font-format-keywords': 4.0.0(postcss@8.5.26) + '@csstools/postcss-gamut-mapping': 2.0.11(postcss@8.5.26) + '@csstools/postcss-gradients-interpolation-method': 5.0.12(postcss@8.5.26) + '@csstools/postcss-hwb-function': 4.0.12(postcss@8.5.26) + '@csstools/postcss-ic-unit': 4.0.4(postcss@8.5.26) + '@csstools/postcss-initial': 2.0.1(postcss@8.5.26) + '@csstools/postcss-is-pseudo-class': 5.0.3(postcss@8.5.26) + '@csstools/postcss-light-dark-function': 2.0.11(postcss@8.5.26) + '@csstools/postcss-logical-float-and-clear': 3.0.0(postcss@8.5.26) + '@csstools/postcss-logical-overflow': 2.0.0(postcss@8.5.26) + '@csstools/postcss-logical-overscroll-behavior': 2.0.0(postcss@8.5.26) + '@csstools/postcss-logical-resize': 3.0.0(postcss@8.5.26) + '@csstools/postcss-logical-viewport-units': 3.0.4(postcss@8.5.26) + '@csstools/postcss-media-minmax': 2.0.9(postcss@8.5.26) + '@csstools/postcss-media-queries-aspect-ratio-number-values': 3.0.5(postcss@8.5.26) + '@csstools/postcss-nested-calc': 4.0.0(postcss@8.5.26) + '@csstools/postcss-normalize-display-values': 4.0.1(postcss@8.5.26) + '@csstools/postcss-oklab-function': 4.0.12(postcss@8.5.26) + '@csstools/postcss-position-area-property': 1.0.0(postcss@8.5.26) + '@csstools/postcss-progressive-custom-properties': 4.2.1(postcss@8.5.26) + '@csstools/postcss-property-rule-prelude-list': 1.0.0(postcss@8.5.26) + '@csstools/postcss-random-function': 2.0.1(postcss@8.5.26) + '@csstools/postcss-relative-color-syntax': 3.0.12(postcss@8.5.26) + '@csstools/postcss-scope-pseudo-class': 4.0.1(postcss@8.5.26) + '@csstools/postcss-sign-functions': 1.1.4(postcss@8.5.26) + '@csstools/postcss-stepped-value-functions': 4.0.9(postcss@8.5.26) + '@csstools/postcss-syntax-descriptor-syntax-production': 1.0.1(postcss@8.5.26) + '@csstools/postcss-system-ui-font-family': 1.0.0(postcss@8.5.26) + '@csstools/postcss-text-decoration-shorthand': 4.0.3(postcss@8.5.26) + '@csstools/postcss-trigonometric-functions': 4.0.9(postcss@8.5.26) + '@csstools/postcss-unset-value': 4.0.0(postcss@8.5.26) + autoprefixer: 10.5.4(postcss@8.5.26) + browserslist: 4.28.6 + css-blank-pseudo: 7.0.1(postcss@8.5.26) + css-has-pseudo: 7.0.3(postcss@8.5.26) + css-prefers-color-scheme: 10.0.0(postcss@8.5.26) cssdb: 8.9.0 - postcss: 8.5.15 - postcss-attribute-case-insensitive: 7.0.1(postcss@8.5.15) - postcss-clamp: 4.1.0(postcss@8.5.15) - postcss-color-functional-notation: 7.0.12(postcss@8.5.15) - postcss-color-hex-alpha: 10.0.0(postcss@8.5.15) - postcss-color-rebeccapurple: 10.0.0(postcss@8.5.15) - postcss-custom-media: 11.0.6(postcss@8.5.15) - postcss-custom-properties: 14.0.6(postcss@8.5.15) - postcss-custom-selectors: 8.0.5(postcss@8.5.15) - postcss-dir-pseudo-class: 9.0.1(postcss@8.5.15) - postcss-double-position-gradients: 6.0.4(postcss@8.5.15) - postcss-focus-visible: 10.0.1(postcss@8.5.15) - postcss-focus-within: 9.0.1(postcss@8.5.15) - postcss-font-variant: 5.0.0(postcss@8.5.15) - postcss-gap-properties: 6.0.0(postcss@8.5.15) - postcss-image-set-function: 7.0.0(postcss@8.5.15) - postcss-lab-function: 7.0.12(postcss@8.5.15) - postcss-logical: 8.1.0(postcss@8.5.15) - postcss-nesting: 13.0.2(postcss@8.5.15) - postcss-opacity-percentage: 3.0.0(postcss@8.5.15) - postcss-overflow-shorthand: 6.0.0(postcss@8.5.15) - postcss-page-break: 3.0.4(postcss@8.5.15) - postcss-place: 10.0.0(postcss@8.5.15) - postcss-pseudo-class-any-link: 10.0.1(postcss@8.5.15) - postcss-replace-overflow-wrap: 4.0.0(postcss@8.5.15) - postcss-selector-not: 8.0.1(postcss@8.5.15) + postcss: 8.5.26 + postcss-attribute-case-insensitive: 7.0.1(postcss@8.5.26) + postcss-clamp: 4.1.0(postcss@8.5.26) + postcss-color-functional-notation: 7.0.12(postcss@8.5.26) + postcss-color-hex-alpha: 10.0.0(postcss@8.5.26) + postcss-color-rebeccapurple: 10.0.0(postcss@8.5.26) + postcss-custom-media: 11.0.6(postcss@8.5.26) + postcss-custom-properties: 14.0.6(postcss@8.5.26) + postcss-custom-selectors: 8.0.5(postcss@8.5.26) + postcss-dir-pseudo-class: 9.0.1(postcss@8.5.26) + postcss-double-position-gradients: 6.0.4(postcss@8.5.26) + postcss-focus-visible: 10.0.1(postcss@8.5.26) + postcss-focus-within: 9.0.1(postcss@8.5.26) + postcss-font-variant: 5.0.0(postcss@8.5.26) + postcss-gap-properties: 6.0.0(postcss@8.5.26) + postcss-image-set-function: 7.0.0(postcss@8.5.26) + postcss-lab-function: 7.0.12(postcss@8.5.26) + postcss-logical: 8.1.0(postcss@8.5.26) + postcss-nesting: 13.0.2(postcss@8.5.26) + postcss-opacity-percentage: 3.0.0(postcss@8.5.26) + postcss-overflow-shorthand: 6.0.0(postcss@8.5.26) + postcss-page-break: 3.0.4(postcss@8.5.26) + postcss-place: 10.0.0(postcss@8.5.26) + postcss-pseudo-class-any-link: 10.0.1(postcss@8.5.26) + postcss-replace-overflow-wrap: 4.0.0(postcss@8.5.26) + postcss-selector-not: 8.0.1(postcss@8.5.26) - postcss-pseudo-class-any-link@10.0.1(postcss@8.5.15): + postcss-pseudo-class-any-link@10.0.1(postcss@8.5.26): dependencies: - postcss: 8.5.15 + postcss: 8.5.26 postcss-selector-parser: 7.1.4 - postcss-reduce-idents@6.0.3(postcss@8.5.15): + postcss-reduce-idents@6.0.3(postcss@8.5.26): dependencies: - postcss: 8.5.15 + postcss: 8.5.26 postcss-value-parser: 4.2.0 - postcss-reduce-initial@6.1.0(postcss@8.5.15): + postcss-reduce-initial@6.1.0(postcss@8.5.26): dependencies: - browserslist: 4.28.2 + browserslist: 4.28.6 caniuse-api: 3.0.0 - postcss: 8.5.15 + postcss: 8.5.26 - postcss-reduce-transforms@6.0.2(postcss@8.5.15): + postcss-reduce-transforms@6.0.2(postcss@8.5.26): dependencies: - postcss: 8.5.15 + postcss: 8.5.26 postcss-value-parser: 4.2.0 - postcss-replace-overflow-wrap@4.0.0(postcss@8.5.15): + postcss-replace-overflow-wrap@4.0.0(postcss@8.5.26): dependencies: - postcss: 8.5.15 + postcss: 8.5.26 - postcss-safe-parser@7.0.1(postcss@8.5.15): + postcss-safe-parser@7.0.1(postcss@8.5.26): dependencies: - postcss: 8.5.15 + postcss: 8.5.26 - postcss-scss@4.0.9(postcss@8.5.15): + postcss-scss@4.0.9(postcss@8.5.26): dependencies: - postcss: 8.5.15 + postcss: 8.5.26 - postcss-selector-not@8.0.1(postcss@8.5.15): + postcss-selector-not@8.0.1(postcss@8.5.26): dependencies: - postcss: 8.5.15 + postcss: 8.5.26 postcss-selector-parser: 7.1.4 postcss-selector-parser@6.1.4: @@ -24478,31 +24308,31 @@ snapshots: cssesc: 3.0.0 util-deprecate: 1.0.2 - postcss-sort-media-queries@5.2.0(postcss@8.5.15): + postcss-sort-media-queries@5.2.0(postcss@8.5.26): dependencies: - postcss: 8.5.15 + postcss: 8.5.26 sort-css-media-queries: 2.2.0 - postcss-svgo@6.0.3(postcss@8.5.15): + postcss-svgo@6.0.3(postcss@8.5.26): dependencies: - postcss: 8.5.15 + postcss: 8.5.26 postcss-value-parser: 4.2.0 - svgo: 3.3.3 + svgo: 3.3.4 - postcss-unique-selectors@6.0.4(postcss@8.5.15): + postcss-unique-selectors@6.0.4(postcss@8.5.26): dependencies: - postcss: 8.5.15 + postcss: 8.5.26 postcss-selector-parser: 6.1.4 postcss-value-parser@4.2.0: {} - postcss-zindex@6.0.2(postcss@8.5.15): + postcss-zindex@6.0.2(postcss@8.5.26): dependencies: - postcss: 8.5.15 + postcss: 8.5.26 - postcss@8.5.15: + postcss@8.5.26: dependencies: - nanoid: 3.3.15 + nanoid: 3.3.18 picocolors: 1.1.1 source-map-js: 1.2.1 @@ -24534,7 +24364,7 @@ snapshots: pump: 3.0.4 rc: 1.2.8 simple-get: 4.0.1 - tar-fs: 2.1.4 + tar-fs: 2.1.5 tunnel-agent: 0.6.0 optional: true @@ -24544,21 +24374,21 @@ snapshots: dependencies: fast-diff: 1.3.0 - prettier-plugin-organize-imports@4.3.0(prettier@3.8.4)(typescript@6.0.3): + prettier-plugin-organize-imports@4.3.0(@typescript/typescript6@6.0.2)(prettier@3.9.6): dependencies: - prettier: 3.8.4 - typescript: 6.0.3 + prettier: 3.9.6 + typescript: '@typescript/typescript6@6.0.2' - prettier-plugin-sort-json@4.2.0(prettier@3.8.4): + prettier-plugin-sort-json@4.2.0(prettier@3.9.6): dependencies: - prettier: 3.8.4 + prettier: 3.9.6 - prettier-plugin-svelte@4.1.0(prettier@3.8.4)(svelte@5.56.3(@typescript-eslint/types@8.61.0)): + prettier-plugin-svelte@4.1.1(prettier@3.9.6)(svelte@5.56.8(@typescript-eslint/types@8.66.0)): dependencies: - prettier: 3.8.4 - svelte: 5.56.3(@typescript-eslint/types@8.61.0) + prettier: 3.9.6 + svelte: 5.56.8(@typescript-eslint/types@8.66.0) - prettier@3.8.4: {} + prettier@3.9.6: {} pretty-error@4.0.0: dependencies: @@ -24573,11 +24403,11 @@ snapshots: pretty-time@1.1.0: {} - prism-react-renderer@2.4.1(react@19.2.7): + prism-react-renderer@2.4.1(react@19.2.8): dependencies: '@types/prismjs': 1.26.6 clsx: 2.1.1 - react: 19.2.7 + react: 19.2.8 prismjs@1.30.0: {} @@ -24604,9 +24434,9 @@ snapshots: retry: 0.12.0 signal-exit: 3.0.7 - properties-reader@3.0.1: + properties-reader@3.0.1(supports-color@8.1.1): dependencies: - '@kwsites/file-exists': 1.1.1 + '@kwsites/file-exists': 1.1.1(supports-color@8.1.1) mkdirp: 3.0.1 transitivePeerDependencies: - supports-color @@ -24619,7 +24449,7 @@ snapshots: proto-list@1.2.4: {} - protobufjs@7.6.4: + protobufjs@7.6.5: dependencies: '@protobufjs/aspromise': 1.1.2 '@protobufjs/base64': 1.1.2 @@ -24629,8 +24459,8 @@ snapshots: '@protobufjs/float': 1.0.2 '@protobufjs/path': 1.1.2 '@protobufjs/pool': 1.1.0 - '@protobufjs/utf8': 1.1.1 - '@types/node': 24.13.2 + '@protobufjs/utf8': 1.1.2 + '@types/node': 24.13.3 long: 5.3.2 protocol-buffers-schema@3.6.1: {} @@ -24665,8 +24495,9 @@ snapshots: pngjs: 5.0.0 yargs: 15.4.1 - qs@6.15.2: + qs@6.15.3: dependencies: + es-define-property: 1.0.1 side-channel: 1.1.1 queue-lit@1.5.2: {} @@ -24679,6 +24510,8 @@ snapshots: quickselect@3.0.0: {} + quote-js-string@0.1.0: {} + railroad-diagrams@1.0.0: {} randexp@0.4.6: @@ -24694,6 +24527,8 @@ snapshots: range-parser@1.2.1: {} + range-parser@1.3.0: {} + raw-body@2.5.3: dependencies: bytes: 3.1.2 @@ -24705,14 +24540,19 @@ snapshots: dependencies: bytes: 3.1.2 http-errors: 2.0.1 - iconv-lite: 0.7.2 + iconv-lite: 0.7.3 unpipe: 1.0.0 - raw-loader@4.0.2(webpack@5.107.2(postcss@8.5.15)): + raw-body@4.0.0: + dependencies: + bytes: 3.1.2 + http-errors: 2.0.1 + + raw-loader@4.0.2(webpack@5.108.4(@swc/core@1.15.47(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(uglify-js@3.19.3)): dependencies: loader-utils: 2.0.4 schema-utils: 3.3.0 - webpack: 5.107.2(postcss@8.5.15) + webpack: 5.108.4(@swc/core@1.15.47(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(uglify-js@3.19.3) rc@1.2.8: dependencies: @@ -24721,15 +24561,15 @@ snapshots: minimist: 1.2.8 strip-json-comments: 2.0.1 - react-dom@19.2.7(react@19.2.7): + react-dom@19.2.8(react@19.2.8): dependencies: - react: 19.2.7 + react: 19.2.8 scheduler: 0.27.0 - react-email@5.2.11: + react-email@5.2.11(supports-color@8.1.1): dependencies: '@babel/parser': 7.27.0 - '@babel/traverse': 7.27.0 + '@babel/traverse': 7.27.0(supports-color@8.1.1) chokidar: 4.0.3 commander: 13.1.0 conf: 15.1.0 @@ -24743,7 +24583,7 @@ snapshots: nypm: 0.6.5 ora: 8.2.0 prompts: 2.4.2 - socket.io: 4.8.3 + socket.io: 4.8.3(supports-color@8.1.1) tsconfig-paths: 4.2.0 transitivePeerDependencies: - bufferutil @@ -24756,34 +24596,34 @@ snapshots: react-is@17.0.2: {} - react-json-view-lite@2.5.0(react@19.2.7): + react-json-view-lite@2.5.0(react@19.2.8): dependencies: - react: 19.2.7 + react: 19.2.8 - react-loadable-ssr-addon-v5-slorber@1.0.3(@docusaurus/react-loadable@6.0.0(react@19.2.7))(webpack@5.107.2(postcss@8.5.15)): + react-loadable-ssr-addon-v5-slorber@1.0.3(@docusaurus/react-loadable@6.0.0(react@19.2.8))(webpack@5.108.4(@swc/core@1.15.47(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(uglify-js@3.19.3)): dependencies: '@babel/runtime': 7.29.7 - react-loadable: '@docusaurus/react-loadable@6.0.0(react@19.2.7)' - webpack: 5.107.2(postcss@8.5.15) + react-loadable: '@docusaurus/react-loadable@6.0.0(react@19.2.8)' + webpack: 5.108.4(@swc/core@1.15.47(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(uglify-js@3.19.3) - react-router-config@5.1.1(react-router@5.3.4(react@19.2.7))(react@19.2.7): + react-router-config@5.1.1(react-router@5.3.4(react@19.2.8))(react@19.2.8): dependencies: '@babel/runtime': 7.29.7 - react: 19.2.7 - react-router: 5.3.4(react@19.2.7) + react: 19.2.8 + react-router: 5.3.4(react@19.2.8) - react-router-dom@5.3.4(react@19.2.7): + react-router-dom@5.3.4(react@19.2.8): dependencies: '@babel/runtime': 7.29.7 history: 4.10.1 loose-envify: 1.4.0 prop-types: 15.8.1 - react: 19.2.7 - react-router: 5.3.4(react@19.2.7) + react: 19.2.8 + react-router: 5.3.4(react@19.2.8) tiny-invariant: 1.3.3 tiny-warning: 1.0.3 - react-router@5.3.4(react@19.2.7): + react-router@5.3.4(react@19.2.8): dependencies: '@babel/runtime': 7.29.7 history: 4.10.1 @@ -24791,12 +24631,12 @@ snapshots: loose-envify: 1.4.0 path-to-regexp: 1.9.0 prop-types: 15.8.1 - react: 19.2.7 + react: 19.2.8 react-is: 16.13.1 tiny-invariant: 1.3.3 tiny-warning: 1.0.3 - react@19.2.7: {} + react@19.2.8: {} read-cache@1.0.0: dependencies: @@ -24830,10 +24670,6 @@ snapshots: dependencies: minimatch: 5.1.9 - readdir-glob@3.0.0: - dependencies: - minimatch: 10.2.5 - readdirp@3.6.0: dependencies: picomatch: 2.3.2 @@ -24848,10 +24684,10 @@ snapshots: estree-util-build-jsx: 3.0.1 vfile: 6.0.3 - recma-jsx@1.0.1(acorn@8.17.0): + recma-jsx@1.0.1(acorn@8.18.0): dependencies: - acorn: 8.17.0 - acorn-jsx: 5.3.2(acorn@8.17.0) + acorn: 8.18.0 + acorn-jsx: 5.3.2(acorn@8.18.0) estree-util-to-js: 2.0.0 recma-parse: 1.0.0 recma-stringify: 1.0.0 @@ -24890,8 +24726,6 @@ snapshots: regenerate@1.4.2: {} - regexp-tree@0.1.27: {} - regexpu-core@6.4.0: dependencies: regenerate: 1.4.2 @@ -24922,24 +24756,24 @@ snapshots: rehype-raw@7.0.0: dependencies: - '@types/hast': 3.0.4 + '@types/hast': 3.0.5 hast-util-raw: 9.1.0 vfile: 6.0.3 - rehype-recma@1.0.0: + rehype-recma@1.0.0(supports-color@8.1.1): dependencies: '@types/estree': 1.0.9 - '@types/hast': 3.0.4 - hast-util-to-estree: 3.1.3 + '@types/hast': 3.0.5 + hast-util-to-estree: 3.1.3(supports-color@8.1.1) transitivePeerDependencies: - supports-color relateurl@0.2.7: {} - remark-directive@3.0.1: + remark-directive@3.0.1(supports-color@8.1.1): dependencies: '@types/mdast': 4.0.4 - mdast-util-directive: 3.1.0 + mdast-util-directive: 3.1.0(supports-color@8.1.1) micromark-extension-directive: 3.0.2 unified: 11.0.5 transitivePeerDependencies: @@ -24953,37 +24787,37 @@ snapshots: node-emoji: 2.2.0 unified: 11.0.5 - remark-frontmatter@5.0.0: + remark-frontmatter@5.0.0(supports-color@8.1.1): dependencies: '@types/mdast': 4.0.4 - mdast-util-frontmatter: 2.0.1 + mdast-util-frontmatter: 2.0.1(supports-color@8.1.1) micromark-extension-frontmatter: 2.0.0 unified: 11.0.5 transitivePeerDependencies: - supports-color - remark-gfm@4.0.1: + remark-gfm@4.0.1(supports-color@8.1.1): dependencies: '@types/mdast': 4.0.4 - mdast-util-gfm: 3.1.0 + mdast-util-gfm: 3.1.0(supports-color@8.1.1) micromark-extension-gfm: 3.0.0 - remark-parse: 11.0.0 + remark-parse: 11.0.0(supports-color@8.1.1) remark-stringify: 11.0.0 unified: 11.0.5 transitivePeerDependencies: - supports-color - remark-mdx@3.1.1: + remark-mdx@3.1.1(supports-color@8.1.1): dependencies: - mdast-util-mdx: 3.0.0 + mdast-util-mdx: 3.0.0(supports-color@8.1.1) micromark-extension-mdxjs: 3.0.0 transitivePeerDependencies: - supports-color - remark-parse@11.0.0: + remark-parse@11.0.0(supports-color@8.1.1): dependencies: '@types/mdast': 4.0.4 - mdast-util-from-markdown: 2.0.3 + mdast-util-from-markdown: 2.0.3(supports-color@8.1.1) micromark-util-types: 2.0.2 unified: 11.0.5 transitivePeerDependencies: @@ -24991,7 +24825,7 @@ snapshots: remark-rehype@11.1.2: dependencies: - '@types/hast': 3.0.4 + '@types/hast': 3.0.5 '@types/mdast': 4.0.4 mdast-util-to-hast: 13.2.1 unified: 11.0.5 @@ -25017,9 +24851,9 @@ snapshots: require-from-string@2.0.2: {} - require-in-the-middle@8.0.1: + require-in-the-middle@8.0.1(supports-color@8.1.1): dependencies: - debug: 4.4.3 + debug: 4.4.3(supports-color@8.1.1) module-details-from-path: 1.0.4 transitivePeerDependencies: - supports-color @@ -25030,6 +24864,8 @@ snapshots: requires-port@1.0.0: {} + reserved-identifiers@1.2.0: {} + resolve-alpn@1.2.1: {} resolve-from@4.0.0: {} @@ -25077,35 +24913,34 @@ snapshots: robust-predicates@3.0.3: {} - rolldown@1.0.3: + rolldown@1.2.3: dependencies: - '@oxc-project/types': 0.133.0 + '@oxc-project/types': 0.143.0 '@rolldown/pluginutils': 1.0.1 optionalDependencies: - '@rolldown/binding-android-arm64': 1.0.3 - '@rolldown/binding-darwin-arm64': 1.0.3 - '@rolldown/binding-darwin-x64': 1.0.3 - '@rolldown/binding-freebsd-x64': 1.0.3 - '@rolldown/binding-linux-arm-gnueabihf': 1.0.3 - '@rolldown/binding-linux-arm64-gnu': 1.0.3 - '@rolldown/binding-linux-arm64-musl': 1.0.3 - '@rolldown/binding-linux-ppc64-gnu': 1.0.3 - '@rolldown/binding-linux-s390x-gnu': 1.0.3 - '@rolldown/binding-linux-x64-gnu': 1.0.3 - '@rolldown/binding-linux-x64-musl': 1.0.3 - '@rolldown/binding-openharmony-arm64': 1.0.3 - '@rolldown/binding-wasm32-wasi': 1.0.3 - '@rolldown/binding-win32-arm64-msvc': 1.0.3 - '@rolldown/binding-win32-x64-msvc': 1.0.3 + '@rolldown/binding-android-arm64': 1.2.3 + '@rolldown/binding-darwin-arm64': 1.2.3 + '@rolldown/binding-darwin-x64': 1.2.3 + '@rolldown/binding-freebsd-x64': 1.2.3 + '@rolldown/binding-linux-arm-gnueabihf': 1.2.3 + '@rolldown/binding-linux-arm64-gnu': 1.2.3 + '@rolldown/binding-linux-arm64-musl': 1.2.3 + '@rolldown/binding-linux-ppc64-gnu': 1.2.3 + '@rolldown/binding-linux-s390x-gnu': 1.2.3 + '@rolldown/binding-linux-x64-gnu': 1.2.3 + '@rolldown/binding-linux-x64-musl': 1.2.3 + '@rolldown/binding-openharmony-arm64': 1.2.3 + '@rolldown/binding-win32-arm64-msvc': 1.2.3 + '@rolldown/binding-win32-x64-msvc': 1.2.3 - rollup-plugin-visualizer@7.0.1(rolldown@1.0.3)(rollup@4.62.0): + rollup-plugin-visualizer@7.0.1(rolldown@1.2.3)(rollup@4.62.0): dependencies: open: 11.0.0 - picomatch: 4.0.4 + picomatch: 4.0.5 source-map: 0.7.6 yargs: 18.0.0 optionalDependencies: - rolldown: 1.0.3 + rolldown: 1.2.3 rollup: 4.62.0 rollup@4.62.0: @@ -25146,9 +24981,9 @@ snapshots: points-on-curve: 0.2.0 points-on-path: 0.2.1 - router@2.2.0: + router@2.2.0(supports-color@8.1.1): dependencies: - debug: 4.4.3 + debug: 4.4.3(supports-color@8.1.1) depd: 2.0.0 is-promise: 4.0.0 parseurl: 1.3.3 @@ -25163,7 +24998,7 @@ snapshots: dependencies: escalade: 3.2.0 picocolors: 1.1.1 - postcss: 8.5.15 + postcss: 8.5.26 strip-json-comments: 3.1.1 run-applescript@7.1.0: {} @@ -25174,14 +25009,14 @@ snapshots: dependencies: queue-microtask: 1.2.3 - runed@0.35.1(@sveltejs/kit@2.65.1(@opentelemetry/api@1.9.1)(@sveltejs/vite-plugin-svelte@7.1.2(svelte@5.56.3(@typescript-eslint/types@8.61.0))(vite@8.0.16(@types/node@24.13.2)(esbuild@0.28.1)(jiti@2.7.0)(sass@1.101.0)(terser@5.48.0)(tsx@4.22.4)(yaml@2.9.0)))(svelte@5.56.3(@typescript-eslint/types@8.61.0))(typescript@6.0.3)(vite@8.0.16(@types/node@24.13.2)(esbuild@0.28.1)(jiti@2.7.0)(sass@1.101.0)(terser@5.48.0)(tsx@4.22.4)(yaml@2.9.0)))(svelte@5.56.3(@typescript-eslint/types@8.61.0)): + runed@0.35.1(@sveltejs/kit@2.70.2(@opentelemetry/api@1.9.1)(@sveltejs/vite-plugin-svelte@7.2.0(svelte@5.56.8(@typescript-eslint/types@8.66.0))(vite@8.2.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(sass@1.102.0)(terser@5.49.0)(tsx@4.23.9)(yaml@2.9.0)))(@typescript/typescript6@6.0.2)(svelte@5.56.8(@typescript-eslint/types@8.66.0))(vite@8.2.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(sass@1.102.0)(terser@5.49.0)(tsx@4.23.9)(yaml@2.9.0)))(svelte@5.56.8(@typescript-eslint/types@8.66.0)): dependencies: dequal: 2.0.3 esm-env: 1.2.2 lz-string: 1.5.0 - svelte: 5.56.3(@typescript-eslint/types@8.61.0) + svelte: 5.56.8(@typescript-eslint/types@8.66.0) optionalDependencies: - '@sveltejs/kit': 2.65.1(@opentelemetry/api@1.9.1)(@sveltejs/vite-plugin-svelte@7.1.2(svelte@5.56.3(@typescript-eslint/types@8.61.0))(vite@8.0.16(@types/node@24.13.2)(esbuild@0.28.1)(jiti@2.7.0)(sass@1.101.0)(terser@5.48.0)(tsx@4.22.4)(yaml@2.9.0)))(svelte@5.56.3(@typescript-eslint/types@8.61.0))(typescript@6.0.3)(vite@8.0.16(@types/node@24.13.2)(esbuild@0.28.1)(jiti@2.7.0)(sass@1.101.0)(terser@5.48.0)(tsx@4.22.4)(yaml@2.9.0)) + '@sveltejs/kit': 2.70.2(@opentelemetry/api@1.9.1)(@sveltejs/vite-plugin-svelte@7.2.0(svelte@5.56.8(@typescript-eslint/types@8.66.0))(vite@8.2.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(sass@1.102.0)(terser@5.49.0)(tsx@4.23.9)(yaml@2.9.0)))(@typescript/typescript6@6.0.2)(svelte@5.56.8(@typescript-eslint/types@8.66.0))(vite@8.2.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(sass@1.102.0)(terser@5.49.0)(tsx@4.23.9)(yaml@2.9.0)) rw@1.3.3: {} @@ -25207,7 +25042,7 @@ snapshots: dependencies: truncate-utf8-bytes: 1.0.2 - sass@1.101.0: + sass@1.102.0: dependencies: chokidar: 5.0.0 immutable: 5.1.6 @@ -25259,17 +25094,15 @@ snapshots: semver-diff@4.0.0: dependencies: - semver: 7.8.4 + semver: 7.8.5 semver@6.3.1: {} - semver@7.8.1: {} + semver@7.8.5: {} - semver@7.8.4: {} - - send@0.19.2: + send@0.19.2(supports-color@8.1.1): dependencies: - debug: 2.6.9 + debug: 2.6.9(supports-color@8.1.1) depd: 2.0.0 destroy: 1.2.0 encodeurl: 2.0.0 @@ -25285,9 +25118,9 @@ snapshots: transitivePeerDependencies: - supports-color - send@1.2.1: + send@1.2.1(supports-color@8.1.1): dependencies: - debug: 4.4.3 + debug: 4.4.3(supports-color@8.1.1) encodeurl: 2.0.0 escape-html: 1.0.3 etag: 1.8.1 @@ -25296,7 +25129,7 @@ snapshots: mime-types: 3.0.2 ms: 2.1.3 on-finished: 2.4.1 - range-parser: 1.2.1 + range-parser: 1.3.0 statuses: 2.0.2 transitivePeerDependencies: - supports-color @@ -25315,11 +25148,11 @@ snapshots: path-to-regexp: 3.3.0 range-parser: 1.2.0 - serve-index@1.9.2: + serve-index@1.9.2(supports-color@8.1.1): dependencies: accepts: 1.3.8 batch: 0.6.1 - debug: 2.6.9 + debug: 2.6.9(supports-color@8.1.1) escape-html: 1.0.3 http-errors: 1.8.1 mime-types: 2.1.35 @@ -25327,27 +25160,27 @@ snapshots: transitivePeerDependencies: - supports-color - serve-static@1.16.3: + serve-static@1.16.3(supports-color@8.1.1): dependencies: encodeurl: 2.0.0 escape-html: 1.0.3 parseurl: 1.3.3 - send: 0.19.2 + send: 0.19.2(supports-color@8.1.1) transitivePeerDependencies: - supports-color - serve-static@2.2.1: + serve-static@2.2.1(supports-color@8.1.1): dependencies: encodeurl: 2.0.0 escape-html: 1.0.3 parseurl: 1.3.3 - send: 1.2.1 + send: 1.2.1(supports-color@8.1.1) transitivePeerDependencies: - supports-color set-blocking@2.0.0: {} - set-cookie-parser@3.1.0: {} + set-cookie-parser@3.1.2: {} set-function-length@1.2.2: dependencies: @@ -25381,7 +25214,7 @@ snapshots: detect-libc: 2.1.2 node-addon-api: 8.8.0 node-gyp: 13.0.0 - semver: 7.8.4 + semver: 7.8.5 optionalDependencies: '@img/sharp-darwin-arm64': 0.34.5 '@img/sharp-darwin-x64': 0.34.5 @@ -25414,7 +25247,7 @@ snapshots: shebang-regex@3.0.0: {} - shell-quote@1.8.4: {} + shell-quote@1.10.0: {} side-channel-list@1.0.1: dependencies: @@ -25460,7 +25293,7 @@ snapshots: simple-concat: 1.0.1 optional: true - simple-icons@16.23.0: {} + simple-icons@16.28.0: {} sirv@2.0.4: dependencies: @@ -25498,42 +25331,42 @@ snapshots: dot-case: 3.0.4 tslib: 2.8.1 - socket.io-adapter@2.5.7: + socket.io-adapter@2.5.7(supports-color@8.1.1): dependencies: - debug: 4.4.3 + debug: 4.4.3(supports-color@8.1.1) ws: 8.20.1 transitivePeerDependencies: - bufferutil - supports-color - utf-8-validate - socket.io-client@4.8.3: + socket.io-client@4.8.3(supports-color@8.1.1): dependencies: '@socket.io/component-emitter': 3.1.2 - debug: 4.4.3 - engine.io-client: 6.6.5 - socket.io-parser: 4.2.6 + debug: 4.4.3(supports-color@8.1.1) + engine.io-client: 6.6.5(supports-color@8.1.1) + socket.io-parser: 4.2.6(supports-color@8.1.1) transitivePeerDependencies: - bufferutil - supports-color - utf-8-validate - socket.io-parser@4.2.6: + socket.io-parser@4.2.6(supports-color@8.1.1): dependencies: '@socket.io/component-emitter': 3.1.2 - debug: 4.4.3 + debug: 4.4.3(supports-color@8.1.1) transitivePeerDependencies: - supports-color - socket.io@4.8.3: + socket.io@4.8.3(supports-color@8.1.1): dependencies: accepts: 1.3.8 base64id: 2.0.0 cors: 2.8.6 - debug: 4.4.3 - engine.io: 6.6.8 - socket.io-adapter: 2.5.7 - socket.io-parser: 4.2.6 + debug: 4.4.3(supports-color@8.1.1) + engine.io: 6.6.8(supports-color@8.1.1) + socket.io-adapter: 2.5.7(supports-color@8.1.1) + socket.io-parser: 4.2.6(supports-color@8.1.1) transitivePeerDependencies: - bufferutil - supports-color @@ -25564,9 +25397,9 @@ snapshots: space-separated-tokens@2.0.2: {} - spdy-transport@3.0.0: + spdy-transport@3.0.0(supports-color@8.1.1): dependencies: - debug: 4.4.3 + debug: 4.4.3(supports-color@8.1.1) detect-node: 2.1.0 hpack.js: 2.1.6 obuf: 1.1.2 @@ -25575,13 +25408,13 @@ snapshots: transitivePeerDependencies: - supports-color - spdy@4.0.2: + spdy@4.0.2(supports-color@8.1.1): dependencies: - debug: 4.4.3 + debug: 4.4.3(supports-color@8.1.1) handle-thing: 2.0.1 http-deceiver: 1.2.7 select-hose: 2.0.0 - spdy-transport: 3.0.0 + spdy-transport: 3.0.0(supports-color@8.1.1) transitivePeerDependencies: - supports-color @@ -25589,9 +25422,7 @@ snapshots: split2@4.2.0: {} - sprintf-js@1.0.3: {} - - sql-formatter@15.8.1: + sql-formatter@15.8.2: dependencies: argparse: 2.0.1 nearley: 2.20.1 @@ -25609,7 +25440,7 @@ snapshots: bcrypt-pbkdf: 1.0.2 optionalDependencies: cpu-features: 0.0.10 - nan: 2.27.0 + nan: 2.28.0 stackback@0.0.2: {} @@ -25621,7 +25452,7 @@ snapshots: std-env@3.10.0: {} - std-env@4.1.0: {} + std-env@4.2.0: {} stdin-discarder@0.2.2: {} @@ -25723,10 +25554,10 @@ snapshots: dependencies: inline-style-parser: 0.2.7 - stylehacks@6.1.1(postcss@8.5.15): + stylehacks@6.1.1(postcss@8.5.26): dependencies: - browserslist: 4.28.2 - postcss: 8.5.15 + browserslist: 4.28.6 + postcss: 8.5.26 postcss-selector-parser: 6.1.4 stylis@4.4.0: {} @@ -25741,25 +25572,31 @@ snapshots: tinyglobby: 0.2.17 ts-interface-checker: 0.1.13 - superagent@10.3.0: + super-regex@1.1.0: + dependencies: + function-timeout: 1.0.2 + make-asynchronous: 1.1.0 + time-span: 5.1.0 + + superagent@10.3.0(supports-color@8.1.1): dependencies: component-emitter: 1.3.1 cookiejar: 2.1.4 - debug: 4.4.3 + debug: 4.4.3(supports-color@8.1.1) fast-safe-stringify: 2.1.1 form-data: 4.0.6 formidable: 3.5.4 methods: 1.1.2 mime: 2.6.0 - qs: 6.15.2 + qs: 6.15.3 transitivePeerDependencies: - supports-color - supertest@7.2.2: + supertest@7.2.2(supports-color@8.1.1): dependencies: cookie-signature: 1.2.2 methods: 1.1.2 - superagent: 10.3.0 + superagent: 10.3.0(supports-color@8.1.1) transitivePeerDependencies: - supports-color @@ -25773,39 +25610,39 @@ snapshots: supports-preserve-symlinks-flag@1.0.0: {} - svelte-awesome@3.3.5(svelte@5.56.3(@typescript-eslint/types@8.61.0)): + svelte-awesome@3.3.5(svelte@5.56.8(@typescript-eslint/types@8.66.0)): dependencies: - svelte: 5.56.3(@typescript-eslint/types@8.61.0) + svelte: 5.56.8(@typescript-eslint/types@8.66.0) - svelte-check@4.6.0(picomatch@4.0.4)(svelte@5.56.3(@typescript-eslint/types@8.61.0))(typescript@6.0.3): + svelte-check@4.7.4(@typescript/typescript6@6.0.2)(picomatch@4.0.5)(svelte@5.56.8(@typescript-eslint/types@8.66.0)): dependencies: '@jridgewell/trace-mapping': 0.3.31 - '@sveltejs/load-config': 0.1.1 + '@sveltejs/load-config': 0.2.2 chokidar: 4.0.3 - fdir: 6.5.0(picomatch@4.0.4) + fdir: 6.5.0(picomatch@4.0.5) picocolors: 1.1.1 sade: 1.8.1 - svelte: 5.56.3(@typescript-eslint/types@8.61.0) - typescript: 6.0.3 + svelte: 5.56.8(@typescript-eslint/types@8.66.0) + typescript: '@typescript/typescript6@6.0.2' transitivePeerDependencies: - picomatch - svelte-eslint-parser@1.8.0(svelte@5.56.3(@typescript-eslint/types@8.61.0)): + svelte-eslint-parser@1.8.0(svelte@5.56.8(@typescript-eslint/types@8.66.0)): dependencies: eslint-scope: 8.4.0 eslint-visitor-keys: 4.2.1 espree: 10.4.0 - postcss: 8.5.15 - postcss-scss: 4.0.9(postcss@8.5.15) + postcss: 8.5.26 + postcss-scss: 4.0.9(postcss@8.5.26) postcss-selector-parser: 7.1.4 - semver: 7.8.4 + semver: 7.8.5 optionalDependencies: - svelte: 5.56.3(@typescript-eslint/types@8.61.0) + svelte: 5.56.8(@typescript-eslint/types@8.66.0) svelte-floating-ui@1.5.8: dependencies: - '@floating-ui/core': 1.7.5 - '@floating-ui/dom': 1.7.6 + '@floating-ui/core': 1.8.0 + '@floating-ui/dom': 1.8.0 svelte-gestures@5.2.2: {} @@ -25813,7 +25650,7 @@ snapshots: dependencies: highlight.js: 11.11.1 - svelte-i18n@4.0.1(svelte@5.56.3(@typescript-eslint/types@8.61.0)): + svelte-i18n@4.0.1(svelte@5.56.8(@typescript-eslint/types@8.66.0)): dependencies: cli-color: 2.0.4 deepmerge: 4.3.1 @@ -25821,85 +25658,85 @@ snapshots: estree-walker: 2.0.2 intl-messageformat: 10.7.18 sade: 1.8.1 - svelte: 5.56.3(@typescript-eslint/types@8.61.0) + svelte: 5.56.8(@typescript-eslint/types@8.66.0) tiny-glob: 0.2.9 - svelte-jsoneditor@3.12.0(svelte@5.56.3(@typescript-eslint/types@8.61.0)): + svelte-jsoneditor@3.13.0(svelte@5.56.8(@typescript-eslint/types@8.66.0)): dependencies: '@codemirror/autocomplete': 6.20.3 - '@codemirror/commands': 6.10.3 + '@codemirror/commands': 6.10.4 '@codemirror/lang-json': 6.0.2 - '@codemirror/language': 6.12.3 + '@codemirror/language': 6.12.4 '@codemirror/lint': 6.9.7 - '@codemirror/search': 6.7.0 - '@codemirror/state': 6.6.0 - '@codemirror/view': 6.43.1 - '@fortawesome/free-regular-svg-icons': 7.2.0 - '@fortawesome/free-solid-svg-icons': 7.2.0 + '@codemirror/search': 6.7.1 + '@codemirror/state': 6.7.1 + '@codemirror/view': 6.43.7 + '@fortawesome/free-regular-svg-icons': 7.3.1 + '@fortawesome/free-solid-svg-icons': 7.3.1 '@jsonquerylang/jsonquery': 5.1.1 '@lezer/highlight': 1.2.3 - '@replit/codemirror-indentation-markers': 6.5.3(@codemirror/language@6.12.3)(@codemirror/state@6.6.0)(@codemirror/view@6.43.1) + '@replit/codemirror-indentation-markers': 6.5.3(@codemirror/language@6.12.4)(@codemirror/state@6.7.1)(@codemirror/view@6.43.7) ajv: 8.20.0 - codemirror-wrapped-line-indent: 1.0.9(@codemirror/language@6.12.3)(@codemirror/state@6.6.0)(@codemirror/view@6.43.1) + codemirror-wrapped-line-indent: 1.0.9(@codemirror/language@6.12.4)(@codemirror/state@6.7.1)(@codemirror/view@6.43.7) diff-sequences: 29.6.3 - immutable-json-patch: 6.0.2 + immutable-json-patch: 6.0.3 jmespath: 0.16.0 json-source-map: 0.6.1 jsonpath-plus: 10.4.0 - jsonrepair: 3.14.0 + jsonrepair: 3.15.0 lodash-es: 4.18.1 memoize-one: 6.0.0 natural-compare-lite: 1.4.0 - sass: 1.101.0 - svelte: 5.56.3(@typescript-eslint/types@8.61.0) - svelte-awesome: 3.3.5(svelte@5.56.3(@typescript-eslint/types@8.61.0)) + sass: 1.102.0 + svelte: 5.56.8(@typescript-eslint/types@8.66.0) + svelte-awesome: 3.3.5(svelte@5.56.8(@typescript-eslint/types@8.66.0)) svelte-select: 5.8.3 vanilla-picker: 2.12.3 - svelte-maplibre@1.3.0(svelte@5.56.3(@typescript-eslint/types@8.61.0)): + svelte-maplibre@1.3.0(svelte@5.56.8(@typescript-eslint/types@8.66.0)): dependencies: d3-geo: 3.1.1 dequal: 2.0.3 just-compare: 2.3.0 maplibre-gl: 5.24.0 pmtiles: 3.2.1 - svelte: 5.56.3(@typescript-eslint/types@8.61.0) + svelte: 5.56.8(@typescript-eslint/types@8.66.0) - svelte-parse-markup@0.1.5(svelte@5.56.3(@typescript-eslint/types@8.61.0)): + svelte-parse-markup@0.1.5(svelte@5.56.8(@typescript-eslint/types@8.66.0)): dependencies: - svelte: 5.56.3(@typescript-eslint/types@8.61.0) + svelte: 5.56.8(@typescript-eslint/types@8.66.0) - svelte-persisted-store@0.12.0(svelte@5.56.3(@typescript-eslint/types@8.61.0)): + svelte-persisted-store@0.12.0(svelte@5.56.8(@typescript-eslint/types@8.66.0)): dependencies: - svelte: 5.56.3(@typescript-eslint/types@8.61.0) + svelte: 5.56.8(@typescript-eslint/types@8.66.0) svelte-select@5.8.3: dependencies: svelte-floating-ui: 1.5.8 - svelte-toolbelt@0.10.6(@sveltejs/kit@2.65.1(@opentelemetry/api@1.9.1)(@sveltejs/vite-plugin-svelte@7.1.2(svelte@5.56.3(@typescript-eslint/types@8.61.0))(vite@8.0.16(@types/node@24.13.2)(esbuild@0.28.1)(jiti@2.7.0)(sass@1.101.0)(terser@5.48.0)(tsx@4.22.4)(yaml@2.9.0)))(svelte@5.56.3(@typescript-eslint/types@8.61.0))(typescript@6.0.3)(vite@8.0.16(@types/node@24.13.2)(esbuild@0.28.1)(jiti@2.7.0)(sass@1.101.0)(terser@5.48.0)(tsx@4.22.4)(yaml@2.9.0)))(svelte@5.56.3(@typescript-eslint/types@8.61.0)): + svelte-toolbelt@0.10.6(@sveltejs/kit@2.70.2(@opentelemetry/api@1.9.1)(@sveltejs/vite-plugin-svelte@7.2.0(svelte@5.56.8(@typescript-eslint/types@8.66.0))(vite@8.2.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(sass@1.102.0)(terser@5.49.0)(tsx@4.23.9)(yaml@2.9.0)))(@typescript/typescript6@6.0.2)(svelte@5.56.8(@typescript-eslint/types@8.66.0))(vite@8.2.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(sass@1.102.0)(terser@5.49.0)(tsx@4.23.9)(yaml@2.9.0)))(svelte@5.56.8(@typescript-eslint/types@8.66.0)): dependencies: clsx: 2.1.1 - runed: 0.35.1(@sveltejs/kit@2.65.1(@opentelemetry/api@1.9.1)(@sveltejs/vite-plugin-svelte@7.1.2(svelte@5.56.3(@typescript-eslint/types@8.61.0))(vite@8.0.16(@types/node@24.13.2)(esbuild@0.28.1)(jiti@2.7.0)(sass@1.101.0)(terser@5.48.0)(tsx@4.22.4)(yaml@2.9.0)))(svelte@5.56.3(@typescript-eslint/types@8.61.0))(typescript@6.0.3)(vite@8.0.16(@types/node@24.13.2)(esbuild@0.28.1)(jiti@2.7.0)(sass@1.101.0)(terser@5.48.0)(tsx@4.22.4)(yaml@2.9.0)))(svelte@5.56.3(@typescript-eslint/types@8.61.0)) + runed: 0.35.1(@sveltejs/kit@2.70.2(@opentelemetry/api@1.9.1)(@sveltejs/vite-plugin-svelte@7.2.0(svelte@5.56.8(@typescript-eslint/types@8.66.0))(vite@8.2.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(sass@1.102.0)(terser@5.49.0)(tsx@4.23.9)(yaml@2.9.0)))(@typescript/typescript6@6.0.2)(svelte@5.56.8(@typescript-eslint/types@8.66.0))(vite@8.2.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(sass@1.102.0)(terser@5.49.0)(tsx@4.23.9)(yaml@2.9.0)))(svelte@5.56.8(@typescript-eslint/types@8.66.0)) style-to-object: 1.0.14 - svelte: 5.56.3(@typescript-eslint/types@8.61.0) + svelte: 5.56.8(@typescript-eslint/types@8.66.0) transitivePeerDependencies: - '@sveltejs/kit' - svelte@5.56.3(@typescript-eslint/types@8.61.0): + svelte@5.56.8(@typescript-eslint/types@8.66.0): dependencies: '@jridgewell/remapping': 2.3.5 '@jridgewell/sourcemap-codec': 1.5.5 - '@sveltejs/acorn-typescript': 1.0.10(acorn@8.17.0) + '@sveltejs/acorn-typescript': 1.0.12(acorn@8.18.0) '@types/estree': 1.0.9 '@types/trusted-types': 2.0.7 - acorn: 8.17.0 + acorn: 8.18.0 aria-query: 5.3.1 axobject-query: 4.1.0 clsx: 2.1.1 - devalue: 5.8.1 + devalue: 5.9.0 esm-env: 1.2.2 - esrap: 2.2.11(@typescript-eslint/types@8.61.0) + esrap: 2.2.13(@typescript-eslint/types@8.66.0) is-reference: 3.0.3 locate-character: 3.0.0 magic-string: 0.30.21 @@ -25909,7 +25746,7 @@ snapshots: svg-parser@2.0.4: {} - svgo@3.3.3: + svgo@3.3.4: dependencies: commander: 7.2.0 css-select: 5.2.2 @@ -25919,7 +25756,7 @@ snapshots: picocolors: 1.1.1 sax: 1.6.0 - swagger-ui-dist@5.32.6: + swagger-ui-dist@5.32.8: dependencies: '@scarf/scarf': 1.4.0 @@ -25932,9 +25769,9 @@ snapshots: dependencies: '@pkgr/core': 0.3.6 - systeminformation@5.31.7: {} + systeminformation@5.31.17: {} - tabbable@6.4.0: {} + tabbable@6.5.0: {} tagged-tag@1.0.0: {} @@ -25942,27 +25779,26 @@ snapshots: tailwind-merge@3.6.0: {} - tailwind-variants@3.2.2(tailwind-merge@3.6.0)(tailwindcss@4.3.1): - dependencies: - tailwindcss: 4.3.1 + tailwind-variants@3.3.1(tailwind-merge@3.6.0)(tailwindcss@4.3.3): optionalDependencies: tailwind-merge: 3.6.0 + tailwindcss: 4.3.3 - tailwindcss-email-variants@3.0.5(tailwindcss@3.4.19(tsx@4.22.4)(yaml@2.9.0)): + tailwindcss-email-variants@3.0.5(tailwindcss@3.4.19(tsx@4.23.9)(yaml@2.9.0)): dependencies: - tailwindcss: 3.4.19(tsx@4.22.4)(yaml@2.9.0) + tailwindcss: 3.4.19(tsx@4.23.9)(yaml@2.9.0) - tailwindcss-mso@2.0.3(tailwindcss@3.4.19(tsx@4.22.4)(yaml@2.9.0)): + tailwindcss-mso@2.0.3(tailwindcss@3.4.19(tsx@4.23.9)(yaml@2.9.0)): dependencies: - tailwindcss: 3.4.19(tsx@4.22.4)(yaml@2.9.0) + tailwindcss: 3.4.19(tsx@4.23.9)(yaml@2.9.0) - tailwindcss-preset-email@1.4.1(tailwindcss@3.4.19(tsx@4.22.4)(yaml@2.9.0)): + tailwindcss-preset-email@1.4.1(tailwindcss@3.4.19(tsx@4.23.9)(yaml@2.9.0)): dependencies: - tailwindcss: 3.4.19(tsx@4.22.4)(yaml@2.9.0) - tailwindcss-email-variants: 3.0.5(tailwindcss@3.4.19(tsx@4.22.4)(yaml@2.9.0)) - tailwindcss-mso: 2.0.3(tailwindcss@3.4.19(tsx@4.22.4)(yaml@2.9.0)) + tailwindcss: 3.4.19(tsx@4.23.9)(yaml@2.9.0) + tailwindcss-email-variants: 3.0.5(tailwindcss@3.4.19(tsx@4.23.9)(yaml@2.9.0)) + tailwindcss-mso: 2.0.3(tailwindcss@3.4.19(tsx@4.23.9)(yaml@2.9.0)) - tailwindcss@3.4.19(tsx@4.22.4)(yaml@2.9.0): + tailwindcss@3.4.19(tsx@4.23.9)(yaml@2.9.0): dependencies: '@alloc/quick-lru': 5.2.0 arg: 5.0.2 @@ -25978,11 +25814,11 @@ snapshots: normalize-path: 3.0.0 object-hash: 3.0.0 picocolors: 1.1.1 - postcss: 8.5.15 - postcss-import: 15.1.0(postcss@8.5.15) - postcss-js: 4.1.0(postcss@8.5.15) - postcss-load-config: 6.0.1(jiti@1.21.7)(postcss@8.5.15)(tsx@4.22.4)(yaml@2.9.0) - postcss-nested: 6.2.0(postcss@8.5.15) + postcss: 8.5.26 + postcss-import: 15.1.0(postcss@8.5.26) + postcss-js: 4.1.0(postcss@8.5.26) + postcss-load-config: 6.0.1(jiti@1.21.7)(postcss@8.5.26)(tsx@4.23.9)(yaml@2.9.0) + postcss-nested: 6.2.0(postcss@8.5.26) postcss-selector-parser: 6.1.4 resolve: 1.22.12 sucrase: 3.35.1 @@ -25990,24 +25826,24 @@ snapshots: - tsx - yaml - tailwindcss@4.3.1: {} + tailwindcss@4.3.3: {} tapable@2.3.3: {} - tar-fs@2.1.4: + tar-fs@2.1.5: dependencies: chownr: 1.1.4 mkdirp-classic: 0.5.3 pump: 3.0.4 tar-stream: 2.2.0 - tar-fs@3.1.2: + tar-fs@3.1.3: dependencies: pump: 3.0.4 tar-stream: 3.2.0 optionalDependencies: - bare-fs: 4.7.2 - bare-path: 3.0.1 + bare-fs: 4.8.0 + bare-path: 3.1.1 transitivePeerDependencies: - bare-abort-controller - bare-buffer @@ -26024,7 +25860,7 @@ snapshots: tar-stream@3.2.0: dependencies: b4a: 1.8.1 - bare-fs: 4.7.2 + bare-fs: 4.8.0 fast-fifo: 1.3.2 streamx: 2.28.0 transitivePeerDependencies: @@ -26056,79 +25892,66 @@ snapshots: - bare-abort-controller - react-native-b4a - terser-webpack-plugin@5.6.1(@swc/core@1.15.41(@swc/helpers@0.5.23))(esbuild@0.28.1)(lightningcss@1.32.0)(webpack@5.106.2(@swc/core@1.15.41(@swc/helpers@0.5.23))(esbuild@0.28.1)(lightningcss@1.32.0)): + terser-webpack-plugin@5.6.1(@swc/core@1.15.47(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(uglify-js@3.19.3)(webpack@5.106.2(@swc/core@1.15.47(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(uglify-js@3.19.3)): dependencies: '@jridgewell/trace-mapping': 0.3.31 jest-worker: 27.5.1 schema-utils: 4.3.3 - terser: 5.48.0 - webpack: 5.106.2(@swc/core@1.15.41(@swc/helpers@0.5.23))(esbuild@0.28.1)(lightningcss@1.32.0) - optionalDependencies: - '@swc/core': 1.15.41(@swc/helpers@0.5.23) - esbuild: 0.28.1 - lightningcss: 1.32.0 - - terser-webpack-plugin@5.6.1(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.15))(esbuild@0.28.1)(html-minifier-terser@7.2.0)(postcss@8.5.15)(webpack@5.107.2(postcss@8.5.15)): - dependencies: - '@jridgewell/trace-mapping': 0.3.31 - jest-worker: 27.5.1 - schema-utils: 4.3.3 - terser: 5.48.0 - webpack: 5.107.2(postcss@8.5.15) + terser: 5.49.0 + webpack: 5.106.2(@swc/core@1.15.47(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(uglify-js@3.19.3) optionalDependencies: + '@swc/core': 1.15.47(@swc/helpers@0.5.23) clean-css: 5.3.3 - cssnano: 6.1.2(postcss@8.5.15) - esbuild: 0.28.1 + cssnano: 6.1.2(postcss@8.5.26) + csso: 5.0.5 + esbuild: 0.28.2 html-minifier-terser: 7.2.0 - postcss: 8.5.15 + lightningcss: 1.33.0 + postcss: 8.5.26 + uglify-js: 3.19.3 - terser-webpack-plugin@5.6.1(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.15))(html-minifier-terser@7.2.0)(postcss@8.5.15)(webpack@5.107.2(postcss@8.5.15)): + terser-webpack-plugin@5.6.1(@swc/core@1.15.47(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(uglify-js@3.19.3)(webpack@5.108.4(@swc/core@1.15.47(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(uglify-js@3.19.3)): dependencies: '@jridgewell/trace-mapping': 0.3.31 jest-worker: 27.5.1 schema-utils: 4.3.3 - terser: 5.48.0 - webpack: 5.107.2(postcss@8.5.15) + terser: 5.49.0 + webpack: 5.108.4(@swc/core@1.15.47(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(uglify-js@3.19.3) optionalDependencies: + '@swc/core': 1.15.47(@swc/helpers@0.5.23) clean-css: 5.3.3 - cssnano: 6.1.2(postcss@8.5.15) + cssnano: 6.1.2(postcss@8.5.26) + csso: 5.0.5 + esbuild: 0.28.2 html-minifier-terser: 7.2.0 - postcss: 8.5.15 + lightningcss: 1.33.0 + postcss: 8.5.26 + uglify-js: 3.19.3 - terser-webpack-plugin@5.6.1(postcss@8.5.15)(webpack@5.107.2(postcss@8.5.15)): - dependencies: - '@jridgewell/trace-mapping': 0.3.31 - jest-worker: 27.5.1 - schema-utils: 4.3.3 - terser: 5.48.0 - webpack: 5.107.2(postcss@8.5.15) - optionalDependencies: - postcss: 8.5.15 - - terser@5.48.0: + terser@5.49.0: dependencies: '@jridgewell/source-map': 0.3.11 - acorn: 8.17.0 + acorn: 8.18.0 commander: 2.20.3 source-map-support: 0.5.21 - testcontainers@12.0.2: + testcontainers@12.1.0(supports-color@8.1.1): dependencies: '@balena/dockerignore': 1.0.2 '@types/dockerode': 4.0.1 - archiver: 8.0.0 + archiver: 7.0.1 async-lock: 1.4.1 byline: 5.0.0 - debug: 4.4.3 + debug: 4.4.3(supports-color@8.1.1) docker-compose: 1.4.2 - dockerode: 5.0.0 - get-port: 7.2.0 + dockerode: 5.0.1(supports-color@8.1.1) + get-port: 5.1.1 proper-lockfile: 4.1.2 - properties-reader: 3.0.1 + properties-reader: 3.0.1(supports-color@8.1.1) ssh-remote-port-forward: 1.0.4 - tar-fs: 3.1.2 + tar-fs: 3.1.3 tmp: 0.2.7 - undici: 8.4.1 + undici: 8.10.0 transitivePeerDependencies: - bare-abort-controller - bare-buffer @@ -26155,9 +25978,7 @@ snapshots: dependencies: tslib: 2.8.1 - three@0.179.1: {} - - three@0.184.0: {} + three@0.185.1: {} through@2.3.8: {} @@ -26165,6 +25986,10 @@ snapshots: thunky@1.1.0: {} + time-span@5.1.0: + dependencies: + convert-hrtime: 5.0.0 + timers-ext@0.1.8: dependencies: es5-ext: 0.10.64 @@ -26187,8 +26012,8 @@ snapshots: tinyglobby@0.2.17: dependencies: - fdir: 6.5.0(picomatch@4.0.4) - picomatch: 4.0.4 + fdir: 6.5.0(picomatch@4.0.5) + picomatch: 4.0.5 tinypool@1.1.1: {} @@ -26257,15 +26082,15 @@ snapshots: dependencies: utf8-byte-length: 1.0.5 - ts-api-utils@2.5.0(typescript@6.0.3): + ts-api-utils@2.5.0(@typescript/typescript6@6.0.2): dependencies: - typescript: 6.0.3 + typescript: '@typescript/typescript6@6.0.2' ts-dedent@2.3.0: {} ts-interface-checker@0.1.13: {} - tsc-alias@1.8.17: + tsc-alias@1.9.1: dependencies: chokidar: 3.6.0 commander: 9.5.0 @@ -26275,14 +26100,14 @@ snapshots: normalize-path: 3.0.0 plimit-lit: 1.6.1 - tsconfck@3.1.6(typescript@6.0.3): + tsconfck@3.1.6(@typescript/typescript6@6.0.2): optionalDependencies: - typescript: 6.0.3 + typescript: '@typescript/typescript6@6.0.2' tsconfig-paths-webpack-plugin@4.2.0: dependencies: chalk: 4.1.2 - enhanced-resolve: 5.24.0 + enhanced-resolve: 5.24.4 tapable: 2.3.3 tsconfig-paths: 4.2.0 @@ -26298,9 +26123,9 @@ snapshots: tsscmp@1.0.6: {} - tsx@4.22.4: + tsx@4.23.9: dependencies: - esbuild: 0.28.1 + esbuild: 0.28.2 optionalDependencies: fsevents: 2.3.3 @@ -26325,6 +26150,8 @@ snapshots: type-fest@2.19.0: {} + type-fest@4.41.0: {} + type-fest@5.7.0: dependencies: tagged-tag: 1.0.0 @@ -26348,14 +26175,14 @@ snapshots: typedarray@0.0.6: {} - typescript-eslint@8.61.0(eslint@10.5.0(jiti@2.7.0))(typescript@6.0.3): + typescript-eslint@8.66.0(@typescript/typescript6@6.0.2)(eslint@10.8.0(jiti@2.7.0)(supports-color@8.1.1))(supports-color@8.1.1): dependencies: - '@typescript-eslint/eslint-plugin': 8.61.0(@typescript-eslint/parser@8.61.0(eslint@10.5.0(jiti@2.7.0))(typescript@6.0.3))(eslint@10.5.0(jiti@2.7.0))(typescript@6.0.3) - '@typescript-eslint/parser': 8.61.0(eslint@10.5.0(jiti@2.7.0))(typescript@6.0.3) - '@typescript-eslint/typescript-estree': 8.61.0(typescript@6.0.3) - '@typescript-eslint/utils': 8.61.0(eslint@10.5.0(jiti@2.7.0))(typescript@6.0.3) - eslint: 10.5.0(jiti@2.7.0) - typescript: 6.0.3 + '@typescript-eslint/eslint-plugin': 8.66.0(@typescript-eslint/parser@8.66.0(@typescript/typescript6@6.0.2)(eslint@10.8.0(jiti@2.7.0)(supports-color@8.1.1))(supports-color@8.1.1))(@typescript/typescript6@6.0.2)(eslint@10.8.0(jiti@2.7.0)(supports-color@8.1.1))(supports-color@8.1.1) + '@typescript-eslint/parser': 8.66.0(@typescript/typescript6@6.0.2)(eslint@10.8.0(jiti@2.7.0)(supports-color@8.1.1))(supports-color@8.1.1) + '@typescript-eslint/typescript-estree': 8.66.0(@typescript/typescript6@6.0.2)(supports-color@8.1.1) + '@typescript-eslint/utils': 8.66.0(@typescript/typescript6@6.0.2)(eslint@10.8.0(jiti@2.7.0)(supports-color@8.1.1))(supports-color@8.1.1) + eslint: 10.8.0(jiti@2.7.0)(supports-color@8.1.1) + typescript: '@typescript/typescript6@6.0.2' transitivePeerDependencies: - supports-color @@ -26363,6 +26190,29 @@ snapshots: typescript@6.0.3: {} + typescript@7.0.2: + optionalDependencies: + '@typescript/typescript-aix-ppc64': 7.0.2 + '@typescript/typescript-darwin-arm64': 7.0.2 + '@typescript/typescript-darwin-x64': 7.0.2 + '@typescript/typescript-freebsd-arm64': 7.0.2 + '@typescript/typescript-freebsd-x64': 7.0.2 + '@typescript/typescript-linux-arm': 7.0.2 + '@typescript/typescript-linux-arm64': 7.0.2 + '@typescript/typescript-linux-loong64': 7.0.2 + '@typescript/typescript-linux-mips64el': 7.0.2 + '@typescript/typescript-linux-ppc64': 7.0.2 + '@typescript/typescript-linux-riscv64': 7.0.2 + '@typescript/typescript-linux-s390x': 7.0.2 + '@typescript/typescript-linux-x64': 7.0.2 + '@typescript/typescript-netbsd-arm64': 7.0.2 + '@typescript/typescript-netbsd-x64': 7.0.2 + '@typescript/typescript-openbsd-arm64': 7.0.2 + '@typescript/typescript-openbsd-x64': 7.0.2 + '@typescript/typescript-sunos-x64': 7.0.2 + '@typescript/typescript-win32-arm64': 7.0.2 + '@typescript/typescript-win32-x64': 7.0.2 + ua-is-frozen@0.1.2: {} ua-parser-js@2.0.10: @@ -26388,7 +26238,7 @@ snapshots: undici@6.26.0: {} - undici@8.4.1: {} + undici@8.10.0: {} unicode-canonical-property-names-ecmascript@2.0.1: {} @@ -26479,10 +26329,10 @@ snapshots: unpipe@1.0.0: {} - unplugin-swc@1.5.9(@swc/core@1.15.41(@swc/helpers@0.5.23))(rollup@4.62.0): + unplugin-swc@1.5.10(@swc/core@1.15.47(@swc/helpers@0.5.23))(rollup@4.62.0): dependencies: '@rollup/pluginutils': 5.4.0(rollup@4.62.0) - '@swc/core': 1.15.41(@swc/helpers@0.5.23) + '@swc/core': 1.15.47(@swc/helpers@0.5.23) load-tsconfig: 0.2.5 unplugin: 2.3.11 transitivePeerDependencies: @@ -26491,13 +26341,13 @@ snapshots: unplugin@2.3.11: dependencies: '@jridgewell/remapping': 2.3.5 - acorn: 8.17.0 - picomatch: 4.0.4 + acorn: 8.18.0 + picomatch: 4.0.5 webpack-virtual-modules: 0.6.2 - update-browserslist-db@1.2.3(browserslist@4.28.2): + update-browserslist-db@1.2.3(browserslist@4.28.6): dependencies: - browserslist: 4.28.2 + browserslist: 4.28.6 escalade: 3.2.0 picocolors: 1.1.1 @@ -26514,7 +26364,7 @@ snapshots: is-yarn-global: 0.4.1 latest-version: 7.0.0 pupa: 3.3.0 - semver: 7.8.4 + semver: 7.8.5 semver-diff: 4.0.0 xdg-basedir: 5.1.0 @@ -26524,19 +26374,19 @@ snapshots: dependencies: punycode: 2.3.1 - url-loader@4.1.1(file-loader@6.2.0(webpack@5.107.2(postcss@8.5.15)))(webpack@5.107.2(postcss@8.5.15)): + url-loader@4.1.1(file-loader@6.2.0(webpack@5.108.4(@swc/core@1.15.47(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(uglify-js@3.19.3)))(webpack@5.108.4(@swc/core@1.15.47(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(uglify-js@3.19.3)): dependencies: loader-utils: 2.0.4 mime-types: 2.1.35 schema-utils: 3.3.0 - webpack: 5.107.2(postcss@8.5.15) + webpack: 5.108.4(@swc/core@1.15.47(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(uglify-js@3.19.3) optionalDependencies: - file-loader: 6.2.0(webpack@5.107.2(postcss@8.5.15)) + file-loader: 6.2.0(webpack@5.108.4(@swc/core@1.15.47(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(uglify-js@3.19.3)) url@0.11.4: dependencies: punycode: 1.4.1 - qs: 6.15.2 + qs: 6.15.3 urlpattern-polyfill@8.0.2: {} @@ -26550,21 +26400,21 @@ snapshots: utils-merge@1.0.1: {} - utimes@5.2.1: + utimes@5.2.1(supports-color@8.1.1): dependencies: - '@mapbox/node-pre-gyp': 1.0.11 + '@mapbox/node-pre-gyp': 1.0.11(supports-color@8.1.1) node-addon-api: 4.3.0 transitivePeerDependencies: - encoding - supports-color - uuid@14.0.0: {} + uuid@14.0.1: {} uuid@8.3.2: {} - valibot@1.4.1(typescript@6.0.3): + valibot@1.4.2(@typescript/typescript6@6.0.2): optionalDependencies: - typescript: 6.0.3 + typescript: '@typescript/typescript6@6.0.2' validator@13.15.35: {} @@ -26613,13 +26463,13 @@ snapshots: transitivePeerDependencies: - rollup - vite-node@3.2.4(@types/node@24.13.2)(jiti@2.7.0)(lightningcss@1.32.0)(sass@1.101.0)(terser@5.48.0)(tsx@4.22.4)(yaml@2.9.0): + vite-node@3.2.4(@types/node@24.13.3)(jiti@2.7.0)(lightningcss@1.33.0)(sass@1.102.0)(supports-color@8.1.1)(terser@5.49.0)(tsx@4.23.9)(yaml@2.9.0): dependencies: cac: 6.7.14 - debug: 4.4.3 + debug: 4.4.3(supports-color@8.1.1) es-module-lexer: 1.7.0 pathe: 2.0.3 - vite: 7.3.5(@types/node@24.13.2)(jiti@2.7.0)(lightningcss@1.32.0)(sass@1.101.0)(terser@5.48.0)(tsx@4.22.4)(yaml@2.9.0) + vite: 7.3.6(@types/node@24.13.3)(jiti@2.7.0)(lightningcss@1.33.0)(sass@1.102.0)(terser@5.49.0)(tsx@4.23.9)(yaml@2.9.0) transitivePeerDependencies: - '@types/node' - jiti @@ -26634,89 +26484,89 @@ snapshots: - tsx - yaml - vite-tsconfig-paths@6.1.1(typescript@6.0.3)(vite@8.0.16(@types/node@24.13.2)(esbuild@0.28.1)(jiti@2.7.0)(sass@1.101.0)(terser@5.48.0)(tsx@4.22.4)(yaml@2.9.0)): + vite-tsconfig-paths@6.1.1(@typescript/typescript6@6.0.2)(supports-color@8.1.1)(vite@8.2.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(sass@1.102.0)(terser@5.49.0)(tsx@4.23.9)(yaml@2.9.0)): dependencies: - debug: 4.4.3 + debug: 4.4.3(supports-color@8.1.1) globrex: 0.1.2 - tsconfck: 3.1.6(typescript@6.0.3) - vite: 8.0.16(@types/node@24.13.2)(esbuild@0.28.1)(jiti@2.7.0)(sass@1.101.0)(terser@5.48.0)(tsx@4.22.4)(yaml@2.9.0) + tsconfck: 3.1.6(@typescript/typescript6@6.0.2) + vite: 8.2.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(sass@1.102.0)(terser@5.49.0)(tsx@4.23.9)(yaml@2.9.0) transitivePeerDependencies: - supports-color - typescript - vite@7.3.5(@types/node@24.13.2)(jiti@2.7.0)(lightningcss@1.32.0)(sass@1.101.0)(terser@5.48.0)(tsx@4.22.4)(yaml@2.9.0): + vite@7.3.6(@types/node@24.13.3)(jiti@2.7.0)(lightningcss@1.33.0)(sass@1.102.0)(terser@5.49.0)(tsx@4.23.9)(yaml@2.9.0): dependencies: - esbuild: 0.27.7 - fdir: 6.5.0(picomatch@4.0.4) - picomatch: 4.0.4 - postcss: 8.5.15 + esbuild: 0.28.2 + fdir: 6.5.0(picomatch@4.0.5) + picomatch: 4.0.5 + postcss: 8.5.26 rollup: 4.62.0 tinyglobby: 0.2.17 optionalDependencies: - '@types/node': 24.13.2 + '@types/node': 24.13.3 fsevents: 2.3.3 jiti: 2.7.0 - lightningcss: 1.32.0 - sass: 1.101.0 - terser: 5.48.0 - tsx: 4.22.4 + lightningcss: 1.33.0 + sass: 1.102.0 + terser: 5.49.0 + tsx: 4.23.9 yaml: 2.9.0 - vite@8.0.16(@types/node@24.13.2)(esbuild@0.28.1)(jiti@2.7.0)(sass@1.101.0)(terser@5.48.0)(tsx@4.22.4)(yaml@2.9.0): + vite@8.2.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(sass@1.102.0)(terser@5.49.0)(tsx@4.23.9)(yaml@2.9.0): dependencies: - lightningcss: 1.32.0 - picomatch: 4.0.4 - postcss: 8.5.15 - rolldown: 1.0.3 + lightningcss: 1.33.0 + picomatch: 4.0.5 + postcss: 8.5.26 + rolldown: 1.2.3 tinyglobby: 0.2.17 optionalDependencies: - '@types/node': 24.13.2 - esbuild: 0.28.1 + '@types/node': 24.13.3 + esbuild: 0.28.2 fsevents: 2.3.3 jiti: 2.7.0 - sass: 1.101.0 - terser: 5.48.0 - tsx: 4.22.4 + sass: 1.102.0 + terser: 5.49.0 + tsx: 4.23.9 yaml: 2.9.0 - vitefu@1.1.3(vite@8.0.16(@types/node@24.13.2)(esbuild@0.28.1)(jiti@2.7.0)(sass@1.101.0)(terser@5.48.0)(tsx@4.22.4)(yaml@2.9.0)): + vitefu@1.1.3(vite@8.2.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(sass@1.102.0)(terser@5.49.0)(tsx@4.23.9)(yaml@2.9.0)): optionalDependencies: - vite: 8.0.16(@types/node@24.13.2)(esbuild@0.28.1)(jiti@2.7.0)(sass@1.101.0)(terser@5.48.0)(tsx@4.22.4)(yaml@2.9.0) + vite: 8.2.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(sass@1.102.0)(terser@5.49.0)(tsx@4.23.9)(yaml@2.9.0) - vitest-fetch-mock@0.4.5(vitest@4.1.9): + vitest-fetch-mock@0.4.5(vitest@4.1.10): dependencies: - vitest: 4.1.9(@opentelemetry/api@1.9.1)(@types/node@24.13.2)(@vitest/coverage-v8@4.1.9)(happy-dom@20.10.3)(jsdom@26.1.0(canvas@3.2.3))(vite@8.0.16(@types/node@24.13.2)(esbuild@0.28.1)(jiti@2.7.0)(sass@1.101.0)(terser@5.48.0)(tsx@4.22.4)(yaml@2.9.0)) + vitest: 4.1.10(@opentelemetry/api@1.9.1)(@types/node@24.13.3)(@vitest/coverage-v8@4.1.10)(happy-dom@20.11.1)(jsdom@26.1.0(canvas@3.2.3)(supports-color@8.1.1))(vite@8.2.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(sass@1.102.0)(terser@5.49.0)(tsx@4.23.9)(yaml@2.9.0)) - vitest@3.2.6(@types/debug@4.1.13)(@types/node@24.13.2)(happy-dom@20.10.3)(jiti@2.7.0)(jsdom@26.1.0(canvas@3.2.3))(lightningcss@1.32.0)(sass@1.101.0)(terser@5.48.0)(tsx@4.22.4)(yaml@2.9.0): + vitest@3.2.7(@types/debug@4.1.13)(@types/node@24.13.3)(happy-dom@20.11.1)(jiti@2.7.0)(jsdom@26.1.0(canvas@3.2.3)(supports-color@8.1.1))(lightningcss@1.33.0)(sass@1.102.0)(supports-color@8.1.1)(terser@5.49.0)(tsx@4.23.9)(yaml@2.9.0): dependencies: '@types/chai': 5.2.3 - '@vitest/expect': 3.2.6 - '@vitest/mocker': 3.2.6(vite@7.3.5(@types/node@24.13.2)(jiti@2.7.0)(lightningcss@1.32.0)(sass@1.101.0)(terser@5.48.0)(tsx@4.22.4)(yaml@2.9.0)) - '@vitest/pretty-format': 3.2.6 - '@vitest/runner': 3.2.6 - '@vitest/snapshot': 3.2.6 - '@vitest/spy': 3.2.6 - '@vitest/utils': 3.2.6 + '@vitest/expect': 3.2.7 + '@vitest/mocker': 3.2.7(vite@7.3.6(@types/node@24.13.3)(jiti@2.7.0)(lightningcss@1.33.0)(sass@1.102.0)(terser@5.49.0)(tsx@4.23.9)(yaml@2.9.0)) + '@vitest/pretty-format': 3.2.7 + '@vitest/runner': 3.2.7 + '@vitest/snapshot': 3.2.7 + '@vitest/spy': 3.2.7 + '@vitest/utils': 3.2.7 chai: 5.3.3 - debug: 4.4.3 - expect-type: 1.3.0 + debug: 4.4.3(supports-color@8.1.1) + expect-type: 1.4.0 magic-string: 0.30.21 pathe: 2.0.3 - picomatch: 4.0.4 + picomatch: 4.0.5 std-env: 3.10.0 tinybench: 2.9.0 tinyexec: 0.3.2 tinyglobby: 0.2.17 tinypool: 1.1.1 tinyrainbow: 2.0.0 - vite: 7.3.5(@types/node@24.13.2)(jiti@2.7.0)(lightningcss@1.32.0)(sass@1.101.0)(terser@5.48.0)(tsx@4.22.4)(yaml@2.9.0) - vite-node: 3.2.4(@types/node@24.13.2)(jiti@2.7.0)(lightningcss@1.32.0)(sass@1.101.0)(terser@5.48.0)(tsx@4.22.4)(yaml@2.9.0) + vite: 7.3.6(@types/node@24.13.3)(jiti@2.7.0)(lightningcss@1.33.0)(sass@1.102.0)(terser@5.49.0)(tsx@4.23.9)(yaml@2.9.0) + vite-node: 3.2.4(@types/node@24.13.3)(jiti@2.7.0)(lightningcss@1.33.0)(sass@1.102.0)(supports-color@8.1.1)(terser@5.49.0)(tsx@4.23.9)(yaml@2.9.0) why-is-node-running: 2.3.0 optionalDependencies: '@types/debug': 4.1.13 - '@types/node': 24.13.2 - happy-dom: 20.10.3 - jsdom: 26.1.0(canvas@3.2.3) + '@types/node': 24.13.3 + happy-dom: 20.11.1 + jsdom: 26.1.0(canvas@3.2.3)(supports-color@8.1.1) transitivePeerDependencies: - jiti - less @@ -26731,33 +26581,64 @@ snapshots: - tsx - yaml - vitest@4.1.9(@opentelemetry/api@1.9.1)(@types/node@24.13.2)(@vitest/coverage-v8@4.1.9)(happy-dom@20.10.3)(jsdom@26.1.0(canvas@3.2.3))(vite@8.0.16(@types/node@24.13.2)(esbuild@0.28.1)(jiti@2.7.0)(sass@1.101.0)(terser@5.48.0)(tsx@4.22.4)(yaml@2.9.0)): + vitest@4.1.10(@opentelemetry/api@1.9.1)(@types/node@24.13.3)(@vitest/coverage-v8@4.1.10)(happy-dom@20.11.1)(jsdom@26.1.0(canvas@3.2.3)(supports-color@8.1.1))(vite@8.2.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(sass@1.102.0)(terser@5.49.0)(tsx@4.23.9)(yaml@2.9.0)): dependencies: - '@vitest/expect': 4.1.9 - '@vitest/mocker': 4.1.9(vite@8.0.16(@types/node@24.13.2)(esbuild@0.28.1)(jiti@2.7.0)(sass@1.101.0)(terser@5.48.0)(tsx@4.22.4)(yaml@2.9.0)) - '@vitest/pretty-format': 4.1.9 - '@vitest/runner': 4.1.9 - '@vitest/snapshot': 4.1.9 - '@vitest/spy': 4.1.9 - '@vitest/utils': 4.1.9 - es-module-lexer: 2.1.0 - expect-type: 1.3.0 + '@vitest/expect': 4.1.10 + '@vitest/mocker': 4.1.10(vite@8.2.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(sass@1.102.0)(terser@5.49.0)(tsx@4.23.9)(yaml@2.9.0)) + '@vitest/pretty-format': 4.1.10 + '@vitest/runner': 4.1.10 + '@vitest/snapshot': 4.1.10 + '@vitest/spy': 4.1.10 + '@vitest/utils': 4.1.10 + es-module-lexer: 2.3.1 + expect-type: 1.4.0 magic-string: 0.30.21 obug: 2.1.3 pathe: 2.0.3 - picomatch: 4.0.4 - std-env: 4.1.0 + picomatch: 4.0.5 + std-env: 4.2.0 tinybench: 2.9.0 tinyexec: 1.2.4 tinyglobby: 0.2.17 tinyrainbow: 3.1.0 - vite: 8.0.16(@types/node@24.13.2)(esbuild@0.28.1)(jiti@2.7.0)(sass@1.101.0)(terser@5.48.0)(tsx@4.22.4)(yaml@2.9.0) + vite: 8.2.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(sass@1.102.0)(terser@5.49.0)(tsx@4.23.9)(yaml@2.9.0) why-is-node-running: 2.3.0 optionalDependencies: '@opentelemetry/api': 1.9.1 - '@types/node': 24.13.2 - '@vitest/coverage-v8': 4.1.9(vitest@4.1.9) - happy-dom: 20.10.3 + '@types/node': 24.13.3 + '@vitest/coverage-v8': 4.1.10(vitest@4.1.10) + happy-dom: 20.11.1 + jsdom: 26.1.0(canvas@3.2.3)(supports-color@8.1.1) + transitivePeerDependencies: + - msw + + vitest@4.1.10(@opentelemetry/api@1.9.1)(@types/node@24.13.3)(@vitest/coverage-v8@4.1.10)(happy-dom@20.11.1)(jsdom@26.1.0(canvas@3.2.3))(vite@8.2.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(sass@1.102.0)(terser@5.49.0)(tsx@4.23.9)(yaml@2.9.0)): + dependencies: + '@vitest/expect': 4.1.10 + '@vitest/mocker': 4.1.10(vite@8.2.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(sass@1.102.0)(terser@5.49.0)(tsx@4.23.9)(yaml@2.9.0)) + '@vitest/pretty-format': 4.1.10 + '@vitest/runner': 4.1.10 + '@vitest/snapshot': 4.1.10 + '@vitest/spy': 4.1.10 + '@vitest/utils': 4.1.10 + es-module-lexer: 2.3.1 + expect-type: 1.4.0 + magic-string: 0.30.21 + obug: 2.1.3 + pathe: 2.0.3 + picomatch: 4.0.5 + std-env: 4.2.0 + tinybench: 2.9.0 + tinyexec: 1.2.4 + tinyglobby: 0.2.17 + tinyrainbow: 3.1.0 + vite: 8.2.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(sass@1.102.0)(terser@5.49.0)(tsx@4.23.9)(yaml@2.9.0) + why-is-node-running: 2.3.0 + optionalDependencies: + '@opentelemetry/api': 1.9.1 + '@types/node': 24.13.3 + '@vitest/coverage-v8': 4.1.10(vitest@4.1.10) + happy-dom: 20.11.1 jsdom: 26.1.0(canvas@3.2.3) transitivePeerDependencies: - msw @@ -26785,6 +26666,8 @@ snapshots: web-namespaces@2.0.1: {} + web-worker@1.5.0: {} + webidl-conversions@3.0.1: {} webidl-conversions@7.0.0: @@ -26793,7 +26676,7 @@ snapshots: webpack-bundle-analyzer@4.10.2: dependencies: '@discoveryjs/json-ext': 0.5.7 - acorn: 8.17.0 + acorn: 8.18.0 acorn-walk: 8.3.5 commander: 7.2.0 debounce: 1.2.1 @@ -26803,56 +26686,56 @@ snapshots: opener: 1.5.2 picocolors: 1.1.1 sirv: 2.0.4 - ws: 7.5.11 + ws: 7.5.12 transitivePeerDependencies: - bufferutil - utf-8-validate - webpack-dev-middleware@7.4.5(tslib@2.8.1)(webpack@5.107.2(postcss@8.5.15)): + webpack-dev-middleware@7.4.5(tslib@2.8.1)(webpack@5.108.4(@swc/core@1.15.47(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(uglify-js@3.19.3)): dependencies: colorette: 2.0.20 - memfs: 4.57.7(tslib@2.8.1) + memfs: 4.64.0(tslib@2.8.1) mime-types: 3.0.2 on-finished: 2.4.1 - range-parser: 1.2.1 + range-parser: 1.3.0 schema-utils: 4.3.3 optionalDependencies: - webpack: 5.107.2(postcss@8.5.15) + webpack: 5.108.4(@swc/core@1.15.47(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(uglify-js@3.19.3) transitivePeerDependencies: - tslib - webpack-dev-server@5.2.5(tslib@2.8.1)(webpack@5.107.2(postcss@8.5.15)): + webpack-dev-server@5.2.6(debug@4.4.3(supports-color@8.1.1))(supports-color@8.1.1)(tslib@2.8.1)(webpack@5.108.4(@swc/core@1.15.47(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(uglify-js@3.19.3)): dependencies: '@types/bonjour': 3.5.13 '@types/connect-history-api-fallback': 1.5.4 '@types/express': 4.17.25 - '@types/express-serve-static-core': 4.19.8 + '@types/express-serve-static-core': 4.19.9 '@types/serve-index': 1.9.4 '@types/serve-static': 1.15.10 '@types/sockjs': 0.3.36 '@types/ws': 8.18.1 ansi-html-community: 0.0.8 - bonjour-service: 1.4.1 + bonjour-service: 1.4.3 chokidar: 3.6.0 colorette: 2.0.20 - compression: 1.8.1 + compression: 1.8.1(supports-color@8.1.1) connect-history-api-fallback: 2.0.0 - express: 4.22.2 + express: 4.22.2(supports-color@8.1.1) graceful-fs: 4.2.11 - http-proxy-middleware: 2.0.9(@types/express@4.17.25) + http-proxy-middleware: 2.0.10(@types/express@4.17.25)(debug@4.4.3(supports-color@8.1.1)) ipaddr.js: 2.4.0 launch-editor: 2.14.1 open: 10.2.0 p-retry: 6.2.1 schema-utils: 4.3.3 selfsigned: 5.5.0 - serve-index: 1.9.2 + serve-index: 1.9.2(supports-color@8.1.1) sockjs: 0.3.24 - spdy: 4.0.2 - webpack-dev-middleware: 7.4.5(tslib@2.8.1)(webpack@5.107.2(postcss@8.5.15)) - ws: 8.21.0 + spdy: 4.0.2(supports-color@8.1.1) + webpack-dev-middleware: 7.4.5(tslib@2.8.1)(webpack@5.108.4(@swc/core@1.15.47(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(uglify-js@3.19.3)) + ws: 8.21.1 optionalDependencies: - webpack: 5.107.2(postcss@8.5.15) + webpack: 5.108.4(@swc/core@1.15.47(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(uglify-js@3.19.3) transitivePeerDependencies: - bufferutil - debug @@ -26874,11 +26757,11 @@ snapshots: webpack-node-externals@3.0.0: {} - webpack-sources@3.5.0: {} + webpack-sources@3.5.1: {} webpack-virtual-modules@0.6.2: {} - webpack@5.106.2(@swc/core@1.15.41(@swc/helpers@0.5.23))(esbuild@0.28.1)(lightningcss@1.32.0): + webpack@5.106.2(@swc/core@1.15.47(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(uglify-js@3.19.3): dependencies: '@types/eslint-scope': 3.7.7 '@types/estree': 1.0.9 @@ -26886,12 +26769,12 @@ snapshots: '@webassemblyjs/ast': 1.14.1 '@webassemblyjs/wasm-edit': 1.14.1 '@webassemblyjs/wasm-parser': 1.14.1 - acorn: 8.17.0 - acorn-import-phases: 1.0.4(acorn@8.17.0) - browserslist: 4.28.2 + acorn: 8.18.0 + acorn-import-phases: 1.0.4(acorn@8.18.0) + browserslist: 4.28.6 chrome-trace-event: 1.0.4 - enhanced-resolve: 5.24.0 - es-module-lexer: 2.1.0 + enhanced-resolve: 5.24.4 + es-module-lexer: 2.3.1 eslint-scope: 5.1.1 events: 3.3.0 glob-to-regexp: 0.4.1 @@ -26901,9 +26784,9 @@ snapshots: neo-async: 2.6.2 schema-utils: 4.3.3 tapable: 2.3.3 - terser-webpack-plugin: 5.6.1(@swc/core@1.15.41(@swc/helpers@0.5.23))(esbuild@0.28.1)(lightningcss@1.32.0)(webpack@5.106.2(@swc/core@1.15.41(@swc/helpers@0.5.23))(esbuild@0.28.1)(lightningcss@1.32.0)) + terser-webpack-plugin: 5.6.1(@swc/core@1.15.47(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(uglify-js@3.19.3)(webpack@5.106.2(@swc/core@1.15.47(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(uglify-js@3.19.3)) watchpack: 2.5.2 - webpack-sources: 3.5.0 + webpack-sources: 3.5.1 transitivePeerDependencies: - '@minify-html/node' - '@swc/core' @@ -26918,31 +26801,30 @@ snapshots: - postcss - uglify-js - webpack@5.107.2(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.15))(html-minifier-terser@7.2.0)(postcss@8.5.15): + webpack@5.108.4(@swc/core@1.15.47(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(uglify-js@3.19.3): dependencies: '@types/estree': 1.0.9 '@types/json-schema': 7.0.15 '@webassemblyjs/ast': 1.14.1 '@webassemblyjs/wasm-edit': 1.14.1 '@webassemblyjs/wasm-parser': 1.14.1 - acorn: 8.17.0 - acorn-import-phases: 1.0.4(acorn@8.17.0) - browserslist: 4.28.2 + acorn: 8.18.0 + acorn-import-phases: 1.0.4(acorn@8.18.0) + browserslist: 4.28.6 chrome-trace-event: 1.0.4 - enhanced-resolve: 5.24.0 - es-module-lexer: 2.1.0 + enhanced-resolve: 5.24.4 + es-module-lexer: 2.3.1 eslint-scope: 5.1.1 events: 3.3.0 - glob-to-regexp: 0.4.1 graceful-fs: 4.2.11 loader-runner: 4.3.2 mime-db: 1.54.0 + minimizer-webpack-plugin: 5.6.1(@swc/core@1.15.47(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(uglify-js@3.19.3)(webpack@5.108.4(@swc/core@1.15.47(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(uglify-js@3.19.3)) neo-async: 2.6.2 schema-utils: 4.3.3 tapable: 2.3.3 - terser-webpack-plugin: 5.6.1(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.15))(html-minifier-terser@7.2.0)(postcss@8.5.15)(webpack@5.107.2(postcss@8.5.15)) watchpack: 2.5.2 - webpack-sources: 3.5.0 + webpack-sources: 3.5.1 transitivePeerDependencies: - '@minify-html/node' - '@swc/core' @@ -26957,53 +26839,14 @@ snapshots: - postcss - uglify-js - webpack@5.107.2(postcss@8.5.15): - dependencies: - '@types/estree': 1.0.9 - '@types/json-schema': 7.0.15 - '@webassemblyjs/ast': 1.14.1 - '@webassemblyjs/wasm-edit': 1.14.1 - '@webassemblyjs/wasm-parser': 1.14.1 - acorn: 8.17.0 - acorn-import-phases: 1.0.4(acorn@8.17.0) - browserslist: 4.28.2 - chrome-trace-event: 1.0.4 - enhanced-resolve: 5.24.0 - es-module-lexer: 2.1.0 - eslint-scope: 5.1.1 - events: 3.3.0 - glob-to-regexp: 0.4.1 - graceful-fs: 4.2.11 - loader-runner: 4.3.2 - mime-db: 1.54.0 - neo-async: 2.6.2 - schema-utils: 4.3.3 - tapable: 2.3.3 - terser-webpack-plugin: 5.6.1(postcss@8.5.15)(webpack@5.107.2(postcss@8.5.15)) - watchpack: 2.5.2 - webpack-sources: 3.5.0 - transitivePeerDependencies: - - '@minify-html/node' - - '@swc/core' - - '@swc/css' - - '@swc/html' - - clean-css - - cssnano - - csso - - esbuild - - html-minifier-terser - - lightningcss - - postcss - - uglify-js - - webpackbar@7.0.0(webpack@5.107.2(postcss@8.5.15)): + webpackbar@7.0.0(webpack@5.108.4(@swc/core@1.15.47(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(uglify-js@3.19.3)): dependencies: ansis: 3.17.0 consola: 3.4.2 pretty-time: 1.1.0 std-env: 3.10.0 optionalDependencies: - webpack: 5.107.2(postcss@8.5.15) + webpack: 5.108.4(@swc/core@1.15.47(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.26))(csso@5.0.5)(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.26)(uglify-js@3.19.3) websocket-driver@0.7.5: dependencies: @@ -27102,11 +26945,11 @@ snapshots: signal-exit: 3.0.7 typedarray-to-buffer: 3.1.5 - ws@7.5.11: {} + ws@7.5.12: {} ws@8.20.1: {} - ws@8.21.0: {} + ws@8.21.1: {} wsl-utils@0.1.0: dependencies: @@ -27170,7 +27013,7 @@ snapshots: y18n: 4.0.3 yargs-parser: 18.1.3 - yargs@17.7.2: + yargs@17.7.3: dependencies: cliui: 8.0.1 escalade: 3.2.0 @@ -27205,12 +27048,6 @@ snapshots: compress-commons: 6.0.2 readable-stream: 4.7.0 - zip-stream@7.0.5: - dependencies: - compress-commons: 7.0.1 - normalize-path: 3.0.0 - readable-stream: 4.7.0 - zod@4.3.6: {} zwitch@1.0.5: {} diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index b46b452fd1..884a4b5b7f 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -66,4 +66,4 @@ injectWorkspacePackages: true shamefullyHoist: false verifyDepsBeforeRun: install minimumReleaseAgeExclude: - - '@immich/ui@0.81.1' + - '@immich/ui@0.83.0' diff --git a/readme_i18n/README_ar_JO.md b/readme_i18n/README_ar_JO.md index 860ba24eaf..b28f9bbf1b 100644 --- a/readme_i18n/README_ar_JO.md +++ b/readme_i18n/README_ar_JO.md @@ -32,9 +32,11 @@ 正體中文 Українська Русский + Български Português Brasileiro Svenska ภาษาไทย + മലയാളം

> [!WARNING] diff --git a/readme_i18n/README_bg_BG.md b/readme_i18n/README_bg_BG.md new file mode 100644 index 0000000000..7870bb23b8 --- /dev/null +++ b/readme_i18n/README_bg_BG.md @@ -0,0 +1,131 @@ +

+
+ Лиценз: MIT + + Discord + +
+
+

+ +

+ +

+

Високопроизводително самостоятелно хоствано решение за управление на снимки и видеа

+
+ + + +
+

+ English + Català + Español + Français + Italiano + 日本語 + 한국어 + Deutsch + Nederlands + Türkçe + 简体中文 + 正體中文 + Українська + Русский + Português Brasileiro + Svenska + العربية + Tiếng Việt + ภาษาไทย +

+ +> [!WARNING] +> ⚠️ Винаги следвайте [плана за резервно копие 3-2-1](https://www.backblaze.com/blog/the-3-2-1-backup-strategy/) за вашите ценни снимки и видеа! +> + +> [!NOTE] +> Основната документация, включително ръководства за инсталиране, е на [https://immich.app/](https://immich.app/). + +## Връзки + +- [Документация](https://docs.immich.app) +- [За проекта](https://docs.immich.app/overview/introduction) +- [Инсталиране](https://docs.immich.app/install/requirements) +- [Пътна карта](https://immich.app/roadmap) +- [Демо](#демо) +- [Функции](#функции) +- [Преводи](https://docs.immich.app/developer/translations) +- [Принос към проекта](https://docs.immich.app/overview/support-the-project) + +## Демо + +Достъп до демото [тук](https://demo.immich.app). За мобилното приложение използвайте `https://demo.immich.app` като `Server Endpoint URL`. + +### Данни за вход + +| Имейл | Парола | +| --------------- | ------ | +| demo@immich.app | demo | + +## Функции + +| Функции | Мобилно | Уеб | +| :-------------------------------------------------------- | ------- | --- | +| Качване и преглед на видеа и снимки | Да | Да | +| Автоматично резервно копие при отваряне на приложението | Да | N/A | +| Предотвратяване на дублиране на файлове | Да | Да | +| Избор на албум(и) за резервно копие | Да | N/A | +| Изтегляне на снимки и видеа на локалното устройство | Да | Да | +| Поддръжка на множество потребители | Да | Да | +| Албуми и споделени албуми | Да | Да | +| Интерактивен плъзгач за превъртане | Да | Да | +| Поддръжка на RAW формати | Да | Да | +| Преглед на метаданни (EXIF, карта) | Да | Да | +| Търсене по метаданни, обекти, лица и CLIP | Да | Да | +| Административни функции (управление на потребители) | Не | Да | +| Фоново резервно копие | Да | N/A | +| Виртуално превъртане | Да | Да | +| Поддръжка на OAuth | Да | Да | +| API ключове | N/A | Да | +| Резервно копие и възпроизвеждане на LivePhoto/MotionPhoto | Да | Да | +| Поддръжка на 360-градусови изображения | Не | Да | +| Потребителска структура на съхранение | Да | Да | +| Публично споделяне | Да | Да | +| Архив и любими | Да | Да | +| Глобална карта | Да | Да | +| Споделяне с партньор | Да | Да | +| Разпознаване и групиране на лица | Да | Да | +| Спомени (преди x години) | Да | Да | +| Офлайн поддръжка | Да | Не | +| Галерия само за четене | Да | Да | +| Подредени снимки | Да | Да | +| Тагове | Не | Да | +| Преглед по папки | Да | Да | + +## Преводи + +Повече за преводите [тук](https://docs.immich.app/developer/translations). + + +Translation status + + +## Активност в хранилището + +![Activities](https://repobeats.axiom.co/api/embed/9e86d9dc3ddd137161f2f6d2e758d7863b1789cb.svg "Repobeats analytics image") + +## История на звездите + + + + + + Star History Chart + + + +## Сътрудници + + + + diff --git a/readme_i18n/README_ca_ES.md b/readme_i18n/README_ca_ES.md index 49aebd9c10..68a3b3cf6f 100644 --- a/readme_i18n/README_ca_ES.md +++ b/readme_i18n/README_ca_ES.md @@ -31,10 +31,12 @@ 正體中文 Українська Русский + Български Português Brasileiro Svenska العربية ภาษาไทย + മലയാളം

> [!WARNING] diff --git a/readme_i18n/README_de_DE.md b/readme_i18n/README_de_DE.md index 11f9e24686..80f432071b 100644 --- a/readme_i18n/README_de_DE.md +++ b/readme_i18n/README_de_DE.md @@ -31,11 +31,13 @@ 正體中文 Українська Русский + Български Português Brasileiro Svenska العربية Tiếng Việt ภาษาไทย + മലയാളം

> [!WARNING] diff --git a/readme_i18n/README_es_ES.md b/readme_i18n/README_es_ES.md index 2aa4d16ecf..e35e7b938e 100644 --- a/readme_i18n/README_es_ES.md +++ b/readme_i18n/README_es_ES.md @@ -31,10 +31,12 @@ 正體中文 Українська Русский + Български Português Brasileiro Svenska العربية ภาษาไทย + മലയാളം

> [!WARNING] diff --git a/readme_i18n/README_fr_FR.md b/readme_i18n/README_fr_FR.md index e4fef66525..9ae59b414f 100644 --- a/readme_i18n/README_fr_FR.md +++ b/readme_i18n/README_fr_FR.md @@ -31,10 +31,12 @@ 正體中文 Українська Русский + Български Português Brasileiro Svenska العربية ภาษาไทย + മലയാളം

> [!WARNING] diff --git a/readme_i18n/README_it_IT.md b/readme_i18n/README_it_IT.md index 5d8d8b0880..96e720856c 100644 --- a/readme_i18n/README_it_IT.md +++ b/readme_i18n/README_it_IT.md @@ -32,10 +32,12 @@ 正體中文 Українська Русский + Български Português Brasileiro Svenska العربية ภาษาไทย + മലയാളം

> [!WARNING] diff --git a/readme_i18n/README_ja_JP.md b/readme_i18n/README_ja_JP.md index 8c2088247a..1b7ab98dfb 100644 --- a/readme_i18n/README_ja_JP.md +++ b/readme_i18n/README_ja_JP.md @@ -30,10 +30,12 @@ 简体中文 正體中文 Русский + Български Português Brasileiro Svenska العربية ภาษาไทย + മലയാളം

> [!WARNING] diff --git a/readme_i18n/README_ko_KR.md b/readme_i18n/README_ko_KR.md index 66ff4c79c3..4bd0b24a2c 100644 --- a/readme_i18n/README_ko_KR.md +++ b/readme_i18n/README_ko_KR.md @@ -32,10 +32,12 @@ 正體中文 Українська Русский +Български Português Brasileiro Svenska العربية ภาษาไทย + മലയാളം

diff --git a/readme_i18n/README_ml_IN.md b/readme_i18n/README_ml_IN.md new file mode 100644 index 0000000000..238cfa9a6a --- /dev/null +++ b/readme_i18n/README_ml_IN.md @@ -0,0 +1,133 @@ +

+
+ License: AGPLv3 + + Discord + +
+
+

+ +

+ +

+

ഫോട്ടോകളും വീഡിയോകളും കൈകാര്യം ചെയ്യുന്നതിനുള്ള ഉയർന്ന കാര്യക്ഷമതയുള്ള സെൽഫ്-ഹോസ്റ്റഡ് ആപ്ലിക്കേഷൻ

+
+ + + +
+ +

+ English + Català + Español + Français + Italiano + 日本語 + 한국어 + Deutsch + Nederlands + Türkçe + 简体中文 + 正體中文 + Українська + Русский + Português Brasileiro + Svenska + العربية + Tiếng Việt + ภาษาไทย +

+ + +> [!WARNING] +> ⚠️ നിങ്ങളുടെ വിലയേറിയ ഫോട്ടോകൾക്കും വീഡിയോകൾക്കും എല്ലായ്പ്പോഴും [3-2-1](https://www.backblaze.com/blog/the-3-2-1-backup-strategy/) ബാക്കപ്പ് പ്ലാൻ പിന്തുടരുക! +> + +> [!NOTE] +> ഇൻസ്റ്റാളേഷൻ ഗൈഡുകൾ ഉൾപ്പെടെയുള്ള പ്രധാന ഡോക്യുമെന്റേഷൻ https://immich.app/ എന്ന വെബ്സൈറ്റിൽ നിങ്ങൾക്ക് കണ്ടെത്താം. + +## ലിങ്കുകൾ + +- [ഡോക്യുമെന്റേഷൻ](https://docs.immich.app/) +- [വിവരങ്ങൾ](https://docs.immich.app/overview/introduction) +- [ഇൻസ്റ്റാളേഷൻ](https://docs.immich.app/install/requirements) +- [റോഡ്മാപ്പ്](https://immich.app/roadmap) +- [ഡെമോ](#ഡെമോ) +- [സവിശേഷതകൾ](#സവിശേഷതകൾ) +- [വിവർത്തനങ്ങൾ](https://docs.immich.app/developer/translations) +- [സംഭാവന നൽകൽ](https://docs.immich.app/overview/support-the-project) + +## ഡെമോ + +ഡെമോ വെബ്സൈറ്റ് [ഇവിടെ](https://demo.immich.app) ആക്സസ് ചെയ്യാം. മൊബൈൽ ആപ്പിന്റെ ഡെമോ കാണാൻ ആപ്പ് ഇൻസ്റ്റാൾ ചെയ്ത ശേഷം, `Server Endpoint URL` എന്ന സെറ്റിങ്ങിൽ നിങ്ങൾക്ക് `https://demo.immich.app` ഉപയോഗിക്കാം. + +### ലോഗിൻ വിവരങ്ങൾ + +| ഇമെയിൽ | പാസ്‌വേഡ് | +| --------------- | -------- | +| demo@immich.app | demo | + +## സവിശേഷതകൾ + +| സവിശേഷതകൾ | മൊബൈൽ | വെബ് | +| :-------------------------------------------------- | ------ | --- | +| ഫോട്ടോകളും വീഡിയോകളും അപ്‌ലോഡ് ചെയ്യാനും കാണാനും സാധിക്കും | ഉണ്ട് | ഉണ്ട് | +| ആപ്പ് തുറക്കുമ്പോൾ ഓട്ടോമാറ്റിക് ബാക്കപ്പ് | ഉണ്ട് | N/A | +| ഫയലുകളുടെ ഇരട്ടിപ്പ് (duplication) തടയുന്നു | ഉണ്ട് | ഉണ്ട് | +| ബാക്കപ്പിനായി നിർദ്ദിഷ്ട ആൽബങ്ങൾ തിരഞ്ഞെടുക്കാം | ഉണ്ട് | N/A | +| ഫോട്ടോകളും വീഡിയോകളും ലോക്കൽ ഡിവൈസിലേക്ക് ഡൗൺലോഡ് ചെയ്യാം | ഉണ്ട് | ഉണ്ട് | +| ഒന്നിലധികം ഉപയോക്താക്കൾക്കുള്ള പിന്തുണ (Multi-user) | ഉണ്ട് | ഉണ്ട് | +| ആൽബങ്ങളും പങ്കിട്ട ആൽബങ്ങളും | ഉണ്ട് | ഉണ്ട് | +| സ്ക്രബ്ബ് ചെയ്യാവുന്ന/വലിച്ചിഴക്കാവുന്ന സ്ക്രോൾബാർ | ഉണ്ട് | ഉണ്ട് | +| റോ (RAW) ഫോർമാറ്റുകൾക്കുള്ള പിന്തുണ | ഉണ്ട് | ഉണ്ട് | +| മെറ്റാഡാറ്റ കാഴ്‌ച (EXIF, മാപ്പ്) | ഉണ്ട് | ഉണ്ട് | +| മെറ്റാഡാറ്റ, ഒബ്‌ജക്റ്റുകൾ, മുഖങ്ങൾ, CLIP എന്നിവ ഉപയോഗിച്ച് തിരയാം | ഉണ്ട് | ഉണ്ട് | +| അഡ്മിനിസ്ട്രേറ്റീവ് പ്രവർത്തനങ്ങൾ (യൂസർ മാനേജ്‌മെന്റ്) | ഇല്ല | ഉണ്ട് | +| ബാക്ക്ഗ്രൗണ്ട് ബാക്കപ്പ് | ഉണ്ട് | N/A | +| വിർച്വൽ സ്ക്രോൾ | ഉണ്ട് | ഉണ്ട് | +| OAuth സപ്പോർട്ട് | ഉണ്ട് | ഉണ്ട് | +| API കീകൾ | N/A | ഉണ്ട് | +| ലൈവ് ഫോട്ടോ/മോഷൻ ഫോട്ടോ ബാക്കപ്പും പ്ലേബാക്കും | ഉണ്ട് | ഉണ്ട് | +| 360 ഡിഗ്രി ഇമേജ് ഡിസ്‌പ്ലേ പിന്തുണ | ഇല്ല | ഉണ്ട് | +| ഉപയോക്താവ് നിർവചിക്കുന്ന സ്റ്റോറേജ് ഘടന | ഉണ്ട് | ഉണ്ട് | +| പബ്ലിക് ഷെയറിംഗ് | ഉണ്ട് | ഉണ്ട് | +| ആർക്കൈവും പ്രിയപ്പെട്ടവയും (Favorites) | ഉണ്ട് | ഉണ്ട് | +| ആഗോള മാപ്പ് (Global Map) | ഉണ്ട് | ഉണ്ട് | +| പങ്കാളി പങ്കിടൽ (Partner Sharing) | ഉണ്ട് | ഉണ്ട് | +| മുഖം തിരിച്ചറിയലും ക്ലസ്റ്ററിംഗും | ഉണ്ട് | ഉണ്ട് | +| ഓർമ്മകൾ (Memories - x വർഷങ്ങൾക്ക് മുമ്പ്) | ഉണ്ട് | ഉണ്ട് | +| ഓഫ്‌ലൈൻ പിന്തുണ | ഉണ്ട് | ഇല്ല | +| റീഡ്-ഒൺലി ഗാലറി | ഉണ്ട് | ഉണ്ട് | +| അടുക്കിവെച്ച ഫോട്ടോകൾ (Stacked Photos) | ഉണ്ട് | ഉണ്ട് | +| ടാഗുകൾ | ഇല്ല | ഉണ്ട് | +| ഫോൾഡർ കാഴ്‌ച | ഉണ്ട് | ഉണ്ട് | + +## വിവർത്തനങ്ങൾ + +വിവർത്തനങ്ങളെക്കുറിച്ച് കൂടുതൽ [ഇവിടെ](https://docs.immich.app/developer/translations) വായിക്കാം. + + +Translation status + + +## റെപ്പോസിറ്ററി പ്രവർത്തനം + +![Activities](https://repobeats.axiom.co/api/embed/9e86d9dc3ddd137161f2f6d2e758d7863b1789cb.svg "Repobeats analytics image") + +## സ്റ്റാർ ചരിത്രം + + + + + + Star History Chart + + + +## സംഭാവന ചെയ്തവർ + + + + diff --git a/readme_i18n/README_nl_NL.md b/readme_i18n/README_nl_NL.md index ef7591b618..062938c9b0 100644 --- a/readme_i18n/README_nl_NL.md +++ b/readme_i18n/README_nl_NL.md @@ -31,10 +31,12 @@ 正體中文 Українська Русский + Български Português Brasileiro Svenska العربية ภาษาไทย + മലയാളം

> [!WARNING] diff --git a/readme_i18n/README_pt_BR.md b/readme_i18n/README_pt_BR.md index 1e1861a797..360c05dee0 100644 --- a/readme_i18n/README_pt_BR.md +++ b/readme_i18n/README_pt_BR.md @@ -33,10 +33,12 @@ 正體中文 Українська Русский +Български Svenska العربية Tiếng Việt ภาษาไทย + മലയാളം

diff --git a/readme_i18n/README_ru_RU.md b/readme_i18n/README_ru_RU.md index 765e876f37..4ada3c0a54 100644 --- a/readme_i18n/README_ru_RU.md +++ b/readme_i18n/README_ru_RU.md @@ -31,12 +31,14 @@ 简体中文 正體中文 Українська + Български Português Brasileiro Svenska
العربية Tiếng Việt ภาษาไทย + മലയാളം

> [!WARNING] diff --git a/readme_i18n/README_sv_SE.md b/readme_i18n/README_sv_SE.md index b3a3cc804f..2d85ac4c71 100644 --- a/readme_i18n/README_sv_SE.md +++ b/readme_i18n/README_sv_SE.md @@ -33,9 +33,11 @@ 正體中文 Українська Русский + Български Português Brasileiro العربية ภาษาไทย + മലയാളം

> [!WARNING] diff --git a/readme_i18n/README_th_TH.md b/readme_i18n/README_th_TH.md index 22a7f6a501..ed2b70e336 100644 --- a/readme_i18n/README_th_TH.md +++ b/readme_i18n/README_th_TH.md @@ -35,10 +35,12 @@ 正體中文 Українська Русский + Български Português Brasileiro Svenska العربية Tiếng Việt + മലയാളം

diff --git a/readme_i18n/README_tr_TR.md b/readme_i18n/README_tr_TR.md index 7cafb48025..a279c23614 100644 --- a/readme_i18n/README_tr_TR.md +++ b/readme_i18n/README_tr_TR.md @@ -31,10 +31,12 @@ 正體中文 Українська Русский + Български Português Brasileiro Svenska العربية ภาษาไทย + മലയാളം

> [!WARNING] diff --git a/readme_i18n/README_uk_UA.md b/readme_i18n/README_uk_UA.md index 6b5849b01c..0fa6bdf21a 100644 --- a/readme_i18n/README_uk_UA.md +++ b/readme_i18n/README_uk_UA.md @@ -32,11 +32,13 @@ 简体中文 正體中文 Русский + Български Português Brasileiro Svenska العربية Tiếng Việt ภาษาไทย + മലയാളം

> [!WARNING] diff --git a/readme_i18n/README_vi_VN.md b/readme_i18n/README_vi_VN.md index 54e8a9bb90..6ceb27b24d 100644 --- a/readme_i18n/README_vi_VN.md +++ b/readme_i18n/README_vi_VN.md @@ -33,11 +33,13 @@ 正體中文 Українська Русский +Български Português Brasileiro Svenska العربية Tiếng Việt ภาษาไทย + മലയാളം

diff --git a/readme_i18n/README_zh_CN.md b/readme_i18n/README_zh_CN.md index 6bd82b13e2..e704054678 100644 --- a/readme_i18n/README_zh_CN.md +++ b/readme_i18n/README_zh_CN.md @@ -35,11 +35,13 @@ 正體中文 Українська Русский + Български Português Brasileiro Svenska العربية Tiếng Việt ภาษาไทย + മലയാളം

diff --git a/readme_i18n/README_zh_TW.md b/readme_i18n/README_zh_TW.md index bf14ce2dc0..5ddfbdbd43 100644 --- a/readme_i18n/README_zh_TW.md +++ b/readme_i18n/README_zh_TW.md @@ -33,11 +33,13 @@ 正體中文 Українська Русский + Български Português Brasileiro Svenska العربية Tiếng Việt ภาษาไทย + മലയാളം

> [!WARNING] diff --git a/renovate.json b/renovate.json index 0fdf5a7f69..f6be970701 100644 --- a/renovate.json +++ b/renovate.json @@ -39,7 +39,6 @@ } ], "ignorePaths": [ - "mobile/openapi/pubspec.yaml", "mobile/ios", "mobile/android" ], diff --git a/server/Dockerfile b/server/Dockerfile index 1df476dccd..9d5eb1cccb 100644 --- a/server/Dockerfile +++ b/server/Dockerfile @@ -1,4 +1,4 @@ -FROM ghcr.io/immich-app/base-server-dev:202606161235@sha256:9f88b07acc8b7bf37a1dd3d5a19193f664443eaaab4e08e9f9341414c5e4b23f AS builder +FROM ghcr.io/immich-app/base-server-dev:202607211135@sha256:83c9ff3f7390111596a2dcd24a746c3f8618d58259dbc7aae36618d153462f18 AS builder ENV COREPACK_ENABLE_DOWNLOAD_PROMPT=0 \ CI=1 \ COREPACK_HOME=/tmp \ @@ -56,16 +56,17 @@ FROM builder AS plugins ARG TARGETPLATFORM -COPY --from=ghcr.io/jdx/mise:2026.6.10@sha256:f57ac375a262f52f8ac3f9101348dbff2187d5e4b59612154f2f2808dbe46ef6 /usr/local/bin/mise /usr/local/bin/mise +COPY --from=ghcr.io/jdx/mise:2026.8.3@sha256:92dbc3f2573926d8974e4641ad8449f16c323130b9f41c39aff19b7b2f500ef6 /usr/local/bin/mise /usr/local/bin/mise WORKDIR /app COPY ./mise.toml ./mise.toml +COPY ./mise.lock ./mise.lock COPY ./packages/plugin-core/mise.toml ./packages/plugin-core/ ENV MISE_TRUSTED_CONFIG_PATHS=/app/mise.toml ENV MISE_DATA_DIR=/buildcache/mise ENV MISE_DISABLE_TOOLS=flutter RUN --mount=type=cache,id=mise-tools-${TARGETPLATFORM},target=/buildcache/mise \ - mise install + mise install --locked COPY ./packages/sdk ./packages/sdk/ COPY ./packages/plugin-core ./packages/plugin-core/ @@ -80,7 +81,7 @@ RUN --mount=type=cache,id=pnpm-packages,target=/buildcache/pnpm-store \ --mount=type=cache,id=mise-tools-${TARGETPLATFORM},target=/buildcache/mise \ mise //:plugins -FROM ghcr.io/immich-app/base-server-prod:202606161235@sha256:c6d59e3923f548d29a212b4dc51b6281a722cfa1da7972a009c0f3830f5762d6 +FROM ghcr.io/immich-app/base-server-prod:202607211135@sha256:ced131da7523544fe975cfd25abd67386e712e39496340b437cd95a08d0a18f3 WORKDIR /usr/src/app ENV NODE_ENV=production \ diff --git a/server/Dockerfile.dev b/server/Dockerfile.dev index b54e10831c..9a46f41b4e 100644 --- a/server/Dockerfile.dev +++ b/server/Dockerfile.dev @@ -1,8 +1,8 @@ # dev build -FROM ghcr.io/immich-app/base-server-dev:202606161235@sha256:9f88b07acc8b7bf37a1dd3d5a19193f664443eaaab4e08e9f9341414c5e4b23f AS dev +FROM ghcr.io/immich-app/base-server-dev:202607211135@sha256:83c9ff3f7390111596a2dcd24a746c3f8618d58259dbc7aae36618d153462f18 AS dev -COPY --from=ghcr.io/jdx/mise:2026.6.10@sha256:f57ac375a262f52f8ac3f9101348dbff2187d5e4b59612154f2f2808dbe46ef6 /usr/local/bin/mise /usr/local/bin/mise +COPY --from=ghcr.io/jdx/mise:2026.8.3@sha256:92dbc3f2573926d8974e4641ad8449f16c323130b9f41c39aff19b7b2f500ef6 /usr/local/bin/mise /usr/local/bin/mise RUN echo "devdir=/buildcache/node-gyp" >> /usr/local/etc/npmrc && \ echo "store-dir=/buildcache/pnpm-store" >> /usr/local/etc/npmrc && \ diff --git a/server/eslint.config.mjs b/server/eslint.config.mjs index c86bc3d72f..949acaf139 100644 --- a/server/eslint.config.mjs +++ b/server/eslint.config.mjs @@ -2,13 +2,8 @@ import js from '@eslint/js'; import eslintPluginPrettierRecommended from 'eslint-plugin-prettier/recommended'; import eslintPluginUnicorn from 'eslint-plugin-unicorn'; import globals from 'globals'; -import path from 'node:path'; -import { fileURLToPath } from 'node:url'; import typescriptEslint from 'typescript-eslint'; -const __filename = fileURLToPath(import.meta.url); -const __dirname = path.dirname(__filename); - export default typescriptEslint.config([ eslintPluginUnicorn.configs.recommended, eslintPluginPrettierRecommended, @@ -29,7 +24,7 @@ export default typescriptEslint.config([ parserOptions: { project: 'tsconfig.json', - tsconfigRootDir: __dirname, + tsconfigRootDir: import.meta.dirname, }, }, @@ -39,7 +34,7 @@ export default typescriptEslint.config([ '@typescript-eslint/explicit-module-boundary-types': 'off', '@typescript-eslint/no-explicit-any': 'off', '@typescript-eslint/no-floating-promises': 'error', - 'unicorn/prevent-abbreviations': 'off', + 'unicorn/name-replacements': 'off', 'unicorn/filename-case': 'off', 'unicorn/no-null': 'off', 'unicorn/prefer-top-level-await': 'off', @@ -49,6 +44,25 @@ export default typescriptEslint.config([ 'unicorn/prefer-structured-clone': 'off', 'unicorn/no-for-loop': 'off', 'unicorn/no-array-sort': 'off', + 'unicorn/no-unreadable-for-of-expression': 'off', + 'unicorn/no-break-in-nested-loop': 'off', + 'unicorn/no-top-level-assignment-in-function': 'off', + 'unicorn/prefer-uint8array-base64': 'off', + 'unicorn/max-nested-calls': 'off', + 'unicorn/no-declarations-before-early-exit': 'off', + 'unicorn/no-unreadable-object-destructuring': 'off', + // maybe we do want to enable this later. TBD + 'unicorn/prefer-await': 'off', + 'unicorn/consistent-class-member-order': 'off', + 'unicorn/class-reference-in-static-methods': ['error', { preferThis: false, preferSuper: false }], + 'unicorn/no-unsafe-property-key': 'off', + 'unicorn/consistent-boolean-name': 'off', + 'unicorn/no-computed-property-existence-check': 'off', + 'unicorn/no-non-function-verb-prefix': 'off', + 'unicorn/prefer-simple-condition-first': 'off', + // prefer the typescript-eslint type-aware version + 'unicorn/require-array-sort-compare': 'off', + '@typescript-eslint/require-array-sort-compare': 'error', '@typescript-eslint/await-thenable': 'error', '@typescript-eslint/no-misused-promises': 'error', '@typescript-eslint/switch-exhaustiveness-check': ['error', { considerDefaultExhaustiveForUnions: true }], @@ -57,6 +71,7 @@ export default typescriptEslint.config([ curly: 2, 'prettier/prettier': 0, 'object-shorthand': ['error', 'always'], + eqeqeq: 'error', 'no-restricted-imports': [ 'error', diff --git a/server/helmet.json b/server/helmet.json index 1cd301d813..29b74d2244 100644 --- a/server/helmet.json +++ b/server/helmet.json @@ -5,6 +5,7 @@ "script-src": ["'self'", "'wasm-unsafe-eval'", "'unsafe-inline'", "https://www.gstatic.com"], "style-src": ["'self'", "'unsafe-inline'"], "img-src": ["'self'", "data:", "blob:"], + "media-src": ["'self'", "data:", "blob:"], "connect-src": [ "'self'", "blob:", diff --git a/server/package.json b/server/package.json index 3e06287b8a..7d5f73cc61 100644 --- a/server/package.json +++ b/server/package.json @@ -1,6 +1,6 @@ { "name": "immich", - "version": "3.0.0-rc.3", + "version": "3.1.0", "description": "", "author": "", "private": true, @@ -49,14 +49,14 @@ "@nestjs/websockets": "^11.0.4", "@opentelemetry/api": "^1.9.0", "@opentelemetry/context-async-hooks": "^2.0.0", - "@opentelemetry/exporter-prometheus": "^0.219.0", - "@opentelemetry/instrumentation-http": "^0.219.0", - "@opentelemetry/instrumentation-ioredis": "^0.67.0", - "@opentelemetry/instrumentation-nestjs-core": "^0.65.0", - "@opentelemetry/instrumentation-pg": "^0.71.0", + "@opentelemetry/exporter-prometheus": "^0.221.0", + "@opentelemetry/instrumentation-http": "^0.221.0", + "@opentelemetry/instrumentation-ioredis": "^0.69.0", + "@opentelemetry/instrumentation-nestjs-core": "^0.67.0", + "@opentelemetry/instrumentation-pg": "^0.73.0", "@opentelemetry/resources": "^2.0.1", "@opentelemetry/sdk-metrics": "^2.0.1", - "@opentelemetry/sdk-node": "^0.219.0", + "@opentelemetry/sdk-node": "^0.221.0", "@opentelemetry/semantic-conventions": "^1.34.0", "@react-email/components": "^1.0.0", "@react-email/render": "^2.0.0", @@ -82,7 +82,7 @@ "i18n-iso-countries": "^7.6.0", "ioredis": "^5.8.2", "jose": "^6.0.0", - "js-yaml": "^4.1.0", + "js-yaml": "^5.0.0", "jsonwebtoken": "^9.0.2", "kysely": "0.28.17", "kysely-postgres-js": "^3.0.0", @@ -138,7 +138,7 @@ "@types/luxon": "^3.6.2", "@types/mock-fs": "^4.13.1", "@types/multer": "^2.0.0", - "@types/node": "^24.13.2", + "@types/node": "^24.13.3", "@types/nodemailer": "^8.0.0", "@types/picomatch": "^4.0.0", "@types/pngjs": "^6.0.5", @@ -151,7 +151,7 @@ "eslint": "^10.0.0", "eslint-config-prettier": "^10.1.8", "eslint-plugin-prettier": "^5.1.3", - "eslint-plugin-unicorn": "^64.0.0", + "eslint-plugin-unicorn": "^72.0.0", "globals": "^17.0.0", "mock-fs": "^5.2.0", "pngjs": "^7.0.0", @@ -161,7 +161,8 @@ "supertest": "^7.1.0", "tailwindcss": "^3.4.0", "testcontainers": "^12.0.0", - "typescript": "^6.0.0", + "@typescript/native": "npm:typescript@^7.0.2", + "typescript": "npm:@typescript/typescript6@^6.0.2", "typescript-eslint": "^8.28.0", "unplugin-swc": "^1.4.5", "vite-tsconfig-paths": "^6.0.0", diff --git a/server/src/app.module.ts b/server/src/app.module.ts index ae930762d0..a4e8ac27c6 100644 --- a/server/src/app.module.ts +++ b/server/src/app.module.ts @@ -63,6 +63,7 @@ const commonImports = [ const bullImports = [BullModule.forRoot(bull.config), BullModule.registerQueue(...bull.queues)]; +// eslint-disable-next-line unicorn/no-top-level-side-effects configureUserAgent(); export class BaseModule implements OnModuleInit, OnModuleDestroy { diff --git a/server/src/bin/sync-sql.ts b/server/src/bin/sync-sql.ts index 5be9ae29b9..528941e0b2 100644 --- a/server/src/bin/sync-sql.ts +++ b/server/src/bin/sync-sql.ts @@ -23,6 +23,7 @@ const handleError = (label: string, error: Error | any) => { console.error(`${label} error: ${error}`); }; +// eslint-disable-next-line unicorn/no-exports-in-scripts export class SqlLogger { queries: string[] = []; errors: Array<{ error: string | Error; query: string }> = []; @@ -109,10 +110,12 @@ class SqlGenerator { const instance = this.app.get(Repository); // normal repositories - data.push(...(await this.runTargets(instance, `${Repository.name}`))); + data.push(...(await this.runTargets(instance, Repository.name))); // nested repositories if (Repository.name === AccessRepository.name || Repository.name === SyncRepository.name) { + // probably a bug that this fails linting? + // eslint-disable-next-line unicorn/prefer-object-iterable-methods for (const key of Object.keys(instance)) { const subInstance = (instance as any)[key]; data.push(...(await this.runTargets(subInstance, `${Repository.name}.${key}`))); @@ -127,7 +130,7 @@ class SqlGenerator { for (const key of this.getPropertyNames(instance)) { const target = instance[key]; - if (!(typeof target === 'function')) { + if (typeof target !== 'function') { continue; } diff --git a/server/src/commands/index.ts b/server/src/commands/index.ts index 2a2dd1857d..0d03e4cd95 100644 --- a/server/src/commands/index.ts +++ b/server/src/commands/index.ts @@ -8,13 +8,13 @@ import { } from 'src/commands/media-location.command'; import { DisableOAuthLogin, EnableOAuthLogin } from 'src/commands/oauth-login'; import { DisablePasswordLoginCommand, EnablePasswordLoginCommand } from 'src/commands/password-login'; -import { PromptPasswordQuestions, ResetAdminPasswordCommand } from 'src/commands/reset-admin-password.command'; +import { PromptPasswordResetQuestions, ResetAdminPasswordCommand } from 'src/commands/reset-admin-password.command'; import { SchemaCheck } from 'src/commands/schema-check'; import { VersionCommand } from 'src/commands/version.command'; export const commandsAndQuestions = [ ResetAdminPasswordCommand, - PromptPasswordQuestions, + PromptPasswordResetQuestions, PromptEmailQuestion, EnablePasswordLoginCommand, DisablePasswordLoginCommand, diff --git a/server/src/commands/media-location.command.ts b/server/src/commands/media-location.command.ts index 0d32749c02..5a4e9bbe33 100644 --- a/server/src/commands/media-location.command.ts +++ b/server/src/commands/media-location.command.ts @@ -36,7 +36,7 @@ export class ChangeMediaLocationCommand extends CommandRunner { {}, ); - const success = await this.service.migrateFilePaths({ + const isSuccess = await this.service.migrateFilePaths({ oldValue, newValue, confirm: async ({ sourceFolder, targetFolder }) => { @@ -65,7 +65,7 @@ export class ChangeMediaLocationCommand extends CommandRunner { ... )`; - console.log(`\n ${success ? successMessage : 'No rows were updated'}\n`); + console.log(`\n ${isSuccess ? successMessage : 'No rows were updated'}\n`); await this.showSamplePaths('after'); } catch (error) { diff --git a/server/src/commands/reset-admin-password.command.ts b/server/src/commands/reset-admin-password.command.ts index e5dee49837..703f693326 100644 --- a/server/src/commands/reset-admin-password.command.ts +++ b/server/src/commands/reset-admin-password.command.ts @@ -3,7 +3,7 @@ import { UserAdminResponseDto } from 'src/dtos/user.dto'; import { CliService } from 'src/services/cli.service'; const prompt = (inquirer: InquirerService) => { - return function ask(admin: UserAdminResponseDto) { + return (admin: UserAdminResponseDto) => { const { id, oauthId, email, name } = admin; console.log(`Found Admin: - ID=${id} @@ -11,7 +11,7 @@ const prompt = (inquirer: InquirerService) => { - Email=${email} - Name=${name}`); - return inquirer.ask<{ password: string }>('prompt-password', {}).then(({ password }) => password); + return inquirer.ask<{ newPassword: string; invalidateSessions: boolean }>('prompt-password-reset', {}); }; }; @@ -43,13 +43,23 @@ export class ResetAdminPasswordCommand extends CommandRunner { } } -@QuestionSet({ name: 'prompt-password' }) -export class PromptPasswordQuestions { +@QuestionSet({ name: 'prompt-password-reset' }) +export class PromptPasswordResetQuestions { @Question({ message: 'Please choose a new password (optional)', - name: 'password', + name: 'newPassword', }) parsePassword(value: string) { return value; } + + @Question({ + type: 'confirm', + message: 'Invalidate existing sessions?', + default: true, + name: 'invalidateSessions', + }) + parseInvalidate(value: boolean): boolean { + return value; + } } diff --git a/server/src/config.ts b/server/src/config.ts index 723e7e564e..55304080a3 100644 --- a/server/src/config.ts +++ b/server/src/config.ts @@ -4,6 +4,7 @@ import { AudioCodec, Colorspace, CQMode, + HlsVideoResolution, ImageFormat, LogLevel, OAuthTokenEndpointAuthMethod, @@ -48,6 +49,8 @@ export type SystemConfig = { tonemap: ToneMapping; realtime: { enabled: boolean; + videoCodecs: VideoCodec[]; + resolutions: HlsVideoResolution[]; }; }; integrityChecks: { @@ -247,6 +250,8 @@ export const defaults = Object.freeze({ accelDecode: true, realtime: { enabled: false, + videoCodecs: [VideoCodec.H264, VideoCodec.Hevc], + resolutions: [HlsVideoResolution.p480, HlsVideoResolution.p720, HlsVideoResolution.p1080], }, }, integrityChecks: { diff --git a/server/src/constants.ts b/server/src/constants.ts index e0a6296e64..815a400ed8 100644 --- a/server/src/constants.ts +++ b/server/src/constants.ts @@ -235,14 +235,65 @@ export const HLS_PLAYLIST_CONTENT_TYPE = 'application/vnd.apple.mpegurl'; export const HLS_SEGMENT_DURATION = 2; export const HLS_SEGMENT_FILENAME_REGEX = /^seg_(\d+)\.m4s$/; export const HLS_VARIANTS = [ - { resolution: 480, codec: VideoCodec.Av1, bitrate: 1_000_000, codecString: 'av01.0.04M.08' }, - { resolution: 480, codec: VideoCodec.Hevc, bitrate: 1_200_000, codecString: 'hvc1.1.6.L90.B0' }, - { resolution: 480, codec: VideoCodec.H264, bitrate: 2_500_000, codecString: 'avc1.64001e' }, - { resolution: 720, codec: VideoCodec.Av1, bitrate: 2_000_000, codecString: 'av01.0.08M.08' }, - { resolution: 720, codec: VideoCodec.Hevc, bitrate: 2_500_000, codecString: 'hvc1.1.6.L93.B0' }, - { resolution: 720, codec: VideoCodec.H264, bitrate: 5_000_000, codecString: 'avc1.64001f' }, - { resolution: 1080, codec: VideoCodec.Av1, bitrate: 4_000_000, codecString: 'av01.0.09M.08' }, - { resolution: 1080, codec: VideoCodec.Hevc, bitrate: 4_500_000, codecString: 'hvc1.1.6.L120.B0' }, - { resolution: 1080, codec: VideoCodec.H264, bitrate: 8_000_000, codecString: 'avc1.640028' }, + { resolution: 480, codec: VideoCodec.Av1, bitrate: 1_000_000 }, + { resolution: 480, codec: VideoCodec.Hevc, bitrate: 1_200_000 }, + { resolution: 480, codec: VideoCodec.H264, bitrate: 2_500_000 }, + { resolution: 720, codec: VideoCodec.Av1, bitrate: 2_000_000 }, + { resolution: 720, codec: VideoCodec.Hevc, bitrate: 2_500_000 }, + { resolution: 720, codec: VideoCodec.H264, bitrate: 5_000_000 }, + { resolution: 1080, codec: VideoCodec.Av1, bitrate: 4_000_000 }, + { resolution: 1080, codec: VideoCodec.Hevc, bitrate: 4_500_000 }, + { resolution: 1080, codec: VideoCodec.H264, bitrate: 8_000_000 }, + { resolution: 1440, codec: VideoCodec.Av1, bitrate: 7_000_000 }, + { resolution: 1440, codec: VideoCodec.Hevc, bitrate: 8_000_000 }, + { resolution: 1440, codec: VideoCodec.H264, bitrate: 14_000_000 }, + { resolution: 2160, codec: VideoCodec.Av1, bitrate: 12_000_000 }, + { resolution: 2160, codec: VideoCodec.Hevc, bitrate: 14_000_000 }, + { resolution: 2160, codec: VideoCodec.H264, bitrate: 25_000_000 }, ]; export const HLS_VERSION = 7; + +export type CodecLevel = { maxFrame: number; maxRate: number; token: string }; + +// H.264 High profile: token is the hex level_idc. +export const H264_LEVELS: CodecLevel[] = [ + { maxFrame: 1620, maxRate: 40_500, token: '1e' }, // 3.0 + { maxFrame: 3600, maxRate: 108_000, token: '1f' }, // 3.1 + { maxFrame: 5120, maxRate: 216_000, token: '20' }, // 3.2 + { maxFrame: 8192, maxRate: 245_760, token: '28' }, // 4.0 + { maxFrame: 8704, maxRate: 522_240, token: '2a' }, // 4.2 + { maxFrame: 22_080, maxRate: 589_824, token: '32' }, // 5.0 + { maxFrame: 36_864, maxRate: 983_040, token: '33' }, // 5.1 + { maxFrame: 36_864, maxRate: 2_073_600, token: '34' }, // 5.2 + { maxFrame: 139_264, maxRate: 4_177_920, token: '3c' }, // 6.0 + { maxFrame: 139_264, maxRate: 8_355_840, token: '3d' }, // 6.1 + { maxFrame: 139_264, maxRate: 16_711_680, token: '3e' }, // 6.2 +]; + +// HEVC Main profile, Main tier: token is `L` + level_idc (level × 30). +export const HEVC_LEVELS: CodecLevel[] = [ + { maxFrame: 552_960, maxRate: 16_588_800, token: 'L90' }, // 3.0 + { maxFrame: 983_040, maxRate: 33_177_600, token: 'L93' }, // 3.1 + { maxFrame: 2_228_224, maxRate: 66_846_720, token: 'L120' }, // 4.0 + { maxFrame: 2_228_224, maxRate: 133_693_440, token: 'L123' }, // 4.1 + { maxFrame: 8_912_896, maxRate: 267_386_880, token: 'L150' }, // 5.0 + { maxFrame: 8_912_896, maxRate: 534_773_760, token: 'L153' }, // 5.1 + { maxFrame: 8_912_896, maxRate: 1_069_547_520, token: 'L156' }, // 5.2 + { maxFrame: 35_651_584, maxRate: 1_069_547_520, token: 'L180' }, // 6.0 + { maxFrame: 35_651_584, maxRate: 2_139_095_040, token: 'L183' }, // 6.1 + { maxFrame: 35_651_584, maxRate: 4_278_190_080, token: 'L186' }, // 6.2 +]; + +// AV1 Main profile (0), Main tier (M): token is the two-digit seq_level_idx + `M`. +export const AV1_LEVELS: CodecLevel[] = [ + { maxFrame: 665_856, maxRate: 19_975_168, token: '04M' }, // 3.0 + { maxFrame: 1_065_024, maxRate: 31_950_336, token: '05M' }, // 3.1 + { maxFrame: 2_359_296, maxRate: 70_778_880, token: '08M' }, // 4.0 + { maxFrame: 2_359_296, maxRate: 141_557_760, token: '09M' }, // 4.1 + { maxFrame: 8_912_896, maxRate: 267_386_880, token: '12M' }, // 5.0 + { maxFrame: 8_912_896, maxRate: 534_773_760, token: '13M' }, // 5.1 + { maxFrame: 8_912_896, maxRate: 1_069_547_520, token: '14M' }, // 5.2 + { maxFrame: 35_651_584, maxRate: 1_069_547_520, token: '16M' }, // 6.0 + { maxFrame: 35_651_584, maxRate: 2_139_095_040, token: '17M' }, // 6.1 + { maxFrame: 35_651_584, maxRate: 4_278_190_080, token: '18M' }, // 6.2 +]; diff --git a/server/src/controllers/activity.controller.spec.ts b/server/src/controllers/activity.controller.spec.ts index 0b677b83fa..899c7257d6 100644 --- a/server/src/controllers/activity.controller.spec.ts +++ b/server/src/controllers/activity.controller.spec.ts @@ -19,11 +19,6 @@ describe(ActivityController.name, () => { }); describe('GET /activities', () => { - it('should be an authenticated route', async () => { - await request(ctx.getHttpServer()).get('/activities'); - expect(ctx.authenticate).toHaveBeenCalled(); - }); - it('should require an albumId', async () => { const { status, body } = await request(ctx.getHttpServer()).get('/activities'); expect(status).toEqual(400); @@ -50,11 +45,6 @@ describe(ActivityController.name, () => { }); describe('POST /activities', () => { - it('should be an authenticated route', async () => { - await request(ctx.getHttpServer()).post('/activities'); - expect(ctx.authenticate).toHaveBeenCalled(); - }); - it('should require an albumId', async () => { const { status, body } = await request(ctx.getHttpServer()) .post('/activities') @@ -77,11 +67,6 @@ describe(ActivityController.name, () => { }); describe('DELETE /activities/:id', () => { - it('should be an authenticated route', async () => { - await request(ctx.getHttpServer()).delete(`/activities/${factory.uuid()}`); - expect(ctx.authenticate).toHaveBeenCalled(); - }); - it('should require a valid uuid', async () => { const { status, body } = await request(ctx.getHttpServer()).delete(`/activities/123`); expect(status).toBe(400); diff --git a/server/src/controllers/album.controller.spec.ts b/server/src/controllers/album.controller.spec.ts index 2ab7b08ceb..239a602100 100644 --- a/server/src/controllers/album.controller.spec.ts +++ b/server/src/controllers/album.controller.spec.ts @@ -19,11 +19,6 @@ describe(AlbumController.name, () => { }); describe('GET /albums', () => { - it('should be an authenticated route', async () => { - await request(ctx.getHttpServer()).post('/albums'); - expect(ctx.authenticate).toHaveBeenCalled(); - }); - it('should reject an invalid shared param', async () => { const { status, body } = await request(ctx.getHttpServer()).get('/albums?isShared=invalid'); expect(status).toEqual(400); @@ -40,60 +35,4 @@ describe(AlbumController.name, () => { expect(body).toEqual(factory.responses.validationError([{ path: ['assetId'], message: 'Invalid UUID' }])); }); }); - - describe('GET /albums/:id', () => { - it('should be an authenticated route', async () => { - await request(ctx.getHttpServer()).get(`/albums/${factory.uuid()}`); - expect(ctx.authenticate).toHaveBeenCalled(); - }); - }); - - describe('GET /albums/statistics', () => { - it('should be an authenticated route', async () => { - await request(ctx.getHttpServer()).get('/albums/statistics'); - expect(ctx.authenticate).toHaveBeenCalled(); - }); - }); - - describe('POST /albums', () => { - it('should be an authenticated route', async () => { - await request(ctx.getHttpServer()).post('/albums').send({ albumName: 'New album' }); - expect(ctx.authenticate).toHaveBeenCalled(); - }); - }); - - describe('PUT /albums/:id/assets', () => { - it('should be an authenticated route', async () => { - await request(ctx.getHttpServer()).put(`/albums/${factory.uuid()}/assets`); - expect(ctx.authenticate).toHaveBeenCalled(); - }); - }); - - describe('PUT /albums/assets', () => { - it('should be an authenticated route', async () => { - await request(ctx.getHttpServer()).put(`/albums/assets`); - expect(ctx.authenticate).toHaveBeenCalled(); - }); - }); - - describe('PATCH /albums/:id', () => { - it('should be an authenticated route', async () => { - await request(ctx.getHttpServer()).patch(`/albums/${factory.uuid()}`).send({ albumName: 'New album name' }); - expect(ctx.authenticate).toHaveBeenCalled(); - }); - }); - - describe('DELETE /albums/:id/assets', () => { - it('should be an authenticated route', async () => { - await request(ctx.getHttpServer()).delete(`/albums/${factory.uuid()}/assets`); - expect(ctx.authenticate).toHaveBeenCalled(); - }); - }); - - describe('PUT :id/users', () => { - it('should be an authenticated route', async () => { - await request(ctx.getHttpServer()).put(`/albums/${factory.uuid()}/users`); - expect(ctx.authenticate).toHaveBeenCalled(); - }); - }); }); diff --git a/server/src/controllers/album.controller.ts b/server/src/controllers/album.controller.ts index 90a8fa5a25..4101309dbb 100644 --- a/server/src/controllers/album.controller.ts +++ b/server/src/controllers/album.controller.ts @@ -7,6 +7,7 @@ import { AlbumsAddAssetsDto, AlbumsAddAssetsResponseDto, AlbumStatisticsResponseDto, + AlbumUserParamDto, CreateAlbumDto, GetAlbumsDto, UpdateAlbumDto, @@ -18,7 +19,7 @@ import { MapMarkerResponseDto } from 'src/dtos/map.dto'; 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'; +import { UUIDParamDto } from 'src/validation'; @ApiTags(ApiTag.Albums) @Controller('albums') @@ -175,8 +176,7 @@ export class AlbumController { }) updateAlbumUser( @Auth() auth: AuthDto, - @Param() { id }: UUIDParamDto, - @Param('userId', new ParseMeUUIDPipe({ version: '4' })) userId: string, + @Param() { id, userId }: AlbumUserParamDto, @Body() dto: UpdateAlbumUserDto, ): Promise { return this.service.updateUser(auth, id, userId, dto); @@ -190,11 +190,7 @@ export class AlbumController { description: 'Remove a user from an album. Use an ID of "me" to leave a shared album.', history: new HistoryBuilder().added('v1').beta('v1').stable('v2'), }) - removeUserFromAlbum( - @Auth() auth: AuthDto, - @Param() { id }: UUIDParamDto, - @Param('userId', new ParseMeUUIDPipe({ version: '4' })) userId: string, - ): Promise { + removeUserFromAlbum(@Auth() auth: AuthDto, @Param() { id, userId }: AlbumUserParamDto): Promise { return this.service.removeUser(auth, id, userId); } } diff --git a/server/src/controllers/api-key.controller.spec.ts b/server/src/controllers/api-key.controller.spec.ts index 91a7c43a2d..08963362b6 100644 --- a/server/src/controllers/api-key.controller.spec.ts +++ b/server/src/controllers/api-key.controller.spec.ts @@ -19,33 +19,7 @@ describe(ApiKeyController.name, () => { ctx.reset(); }); - describe('POST /api-keys', () => { - it('should be an authenticated route', async () => { - await request(ctx.getHttpServer()).post('/api-keys').send({ name: 'API Key' }); - expect(ctx.authenticate).toHaveBeenCalled(); - }); - }); - - describe('GET /api-keys', () => { - it('should be an authenticated route', async () => { - await request(ctx.getHttpServer()).get('/api-keys'); - expect(ctx.authenticate).toHaveBeenCalled(); - }); - }); - - describe('GET /api-keys/me', () => { - it('should be an authenticated route', async () => { - await request(ctx.getHttpServer()).get(`/api-keys/me`); - expect(ctx.authenticate).toHaveBeenCalled(); - }); - }); - describe('GET /api-keys/:id', () => { - it('should be an authenticated route', async () => { - await request(ctx.getHttpServer()).get(`/api-keys/${factory.uuid()}`); - expect(ctx.authenticate).toHaveBeenCalled(); - }); - it('should require a valid uuid', async () => { const { status, body } = await request(ctx.getHttpServer()).get(`/api-keys/123`); expect(status).toBe(400); @@ -54,11 +28,6 @@ describe(ApiKeyController.name, () => { }); describe('PUT /api-keys/:id', () => { - it('should be an authenticated route', async () => { - await request(ctx.getHttpServer()).put(`/api-keys/${factory.uuid()}`).send({ name: 'new name' }); - expect(ctx.authenticate).toHaveBeenCalled(); - }); - it('should require a valid uuid', async () => { const { status, body } = await request(ctx.getHttpServer()) .put(`/api-keys/123`) @@ -76,11 +45,6 @@ describe(ApiKeyController.name, () => { }); describe('DELETE /api-keys/:id', () => { - it('should be an authenticated route', async () => { - await request(ctx.getHttpServer()).delete(`/api-keys/${factory.uuid()}`); - expect(ctx.authenticate).toHaveBeenCalled(); - }); - it('should require a valid uuid', async () => { const { status, body } = await request(ctx.getHttpServer()).delete(`/api-keys/123`); expect(status).toBe(400); diff --git a/server/src/controllers/app.controller.ts b/server/src/controllers/app.controller.ts index 3fe9b49368..eca7e5bcb5 100644 --- a/server/src/controllers/app.controller.ts +++ b/server/src/controllers/app.controller.ts @@ -1,5 +1,6 @@ import { Controller, Get, Header } from '@nestjs/common'; import { ApiExcludeEndpoint } from '@nestjs/swagger'; +import { Authenticated } from 'src/middleware/auth.guard'; import { SystemConfigService } from 'src/services/system-config.service'; @Controller() @@ -8,6 +9,7 @@ export class AppController { @ApiExcludeEndpoint() @Get('.well-known/immich') + @Authenticated({ public: true }) getImmichWellKnown() { return { api: { @@ -18,6 +20,7 @@ export class AppController { @ApiExcludeEndpoint() @Get('custom.css') + @Authenticated({ public: true }) @Header('Content-Type', 'text/css') getCustomCss() { return this.service.getCustomCss(); diff --git a/server/src/controllers/asset-media.controller.spec.ts b/server/src/controllers/asset-media.controller.spec.ts index 668d88acbf..43d9a97780 100644 --- a/server/src/controllers/asset-media.controller.spec.ts +++ b/server/src/controllers/asset-media.controller.spec.ts @@ -44,11 +44,6 @@ describe(AssetMediaController.name, () => { }); describe('POST /assets', () => { - it('should be an authenticated route', async () => { - await request(ctx.getHttpServer()).post(`/assets`); - expect(ctx.authenticate).toHaveBeenCalled(); - }); - it('should accept metadata', async () => { const mobileMetadata = { key: AssetMetadataKey.MobileApp, value: { iCloudId: '123' } }; const { status } = await request(ctx.getHttpServer()) @@ -171,20 +166,9 @@ describe(AssetMediaController.name, () => { }); // TODO figure out how to deal with `sendFile` - describe.skip('GET /assets/:id/original', () => { - it('should be an authenticated route', async () => { - await request(ctx.getHttpServer()).get(`/assets/${factory.uuid()}/original`); - expect(ctx.authenticate).toHaveBeenCalled(); - }); - }); // TODO figure out how to deal with `sendFile` describe('GET /assets/:id/thumbnail', () => { - it.skip('should be an authenticated route', async () => { - await request(ctx.getHttpServer()).get(`/assets/${factory.uuid()}/thumbnail`); - expect(ctx.authenticate).toHaveBeenCalled(); - }); - it('should redirect if size=original is requested', async () => { const { status } = await request(ctx.getHttpServer()).get(`/assets/${factory.uuid()}/thumbnail?size=original`); expect(status).toBe(302); diff --git a/server/src/controllers/asset-media.controller.ts b/server/src/controllers/asset-media.controller.ts index 240e5b8b3c..c357c13430 100644 --- a/server/src/controllers/asset-media.controller.ts +++ b/server/src/controllers/asset-media.controller.ts @@ -128,10 +128,10 @@ export class AssetMediaController { this.logger.deprecate( 'Calling the thumbnail endpoint with size=original is deprecated. Use the :id/original endpoint instead', ); - const [_, reqSearch] = req.url.split('?'); + const [_, reqSearch] = req.url.split('?', 2); const redirSearchParams = new URLSearchParams(reqSearch); redirSearchParams.delete('size'); - return res.redirect('original' + '?' + redirSearchParams.toString()); + return res.redirect('original?' + redirSearchParams.toString()); } const viewThumbnailRes = await this.service.viewThumbnail(auth, id, dto); @@ -142,7 +142,7 @@ export class AssetMediaController { // viewThumbnailRes is a AssetMediaRedirectResponse // which redirects to the original asset or a specific size to make better use of caching const { targetSize } = viewThumbnailRes; - const [reqPath, reqSearch] = req.url.split('?'); + const [reqPath, reqSearch] = req.url.split('?', 2); let redirPath: string; const redirSearchParams = new URLSearchParams(reqSearch); if (targetSize === 'original') { diff --git a/server/src/controllers/asset.controller.spec.ts b/server/src/controllers/asset.controller.spec.ts index 8ee6995b1f..92710d6ffc 100644 --- a/server/src/controllers/asset.controller.spec.ts +++ b/server/src/controllers/asset.controller.spec.ts @@ -20,11 +20,6 @@ describe(AssetController.name, () => { }); describe('PUT /assets', () => { - it('should be an authenticated route', async () => { - await request(ctx.getHttpServer()).put(`/assets`); - expect(ctx.authenticate).toHaveBeenCalled(); - }); - it('should require a valid uuid', async () => { const { status, body } = await request(ctx.getHttpServer()) .put(`/assets`) @@ -59,13 +54,6 @@ describe(AssetController.name, () => { }); describe('DELETE /assets', () => { - it('should be an authenticated route', async () => { - await request(ctx.getHttpServer()) - .delete(`/assets`) - .send({ ids: [factory.uuid()] }); - expect(ctx.authenticate).toHaveBeenCalled(); - }); - it('should require a valid uuid', async () => { const { status, body } = await request(ctx.getHttpServer()) .delete(`/assets`) @@ -77,11 +65,6 @@ describe(AssetController.name, () => { }); describe('GET /assets/:id', () => { - it('should be an authenticated route', async () => { - await request(ctx.getHttpServer()).get(`/assets/${factory.uuid()}`); - expect(ctx.authenticate).toHaveBeenCalled(); - }); - it('should require a valid id', async () => { const { status, body } = await request(ctx.getHttpServer()).get(`/assets/123`); expect(status).toBe(400); @@ -90,11 +73,6 @@ describe(AssetController.name, () => { }); describe('PUT /assets/copy', () => { - it('should be an authenticated route', async () => { - await request(ctx.getHttpServer()).get(`/assets/copy`); - expect(ctx.authenticate).toHaveBeenCalled(); - }); - it('should require target and source id', async () => { const { status, body } = await request(ctx.getHttpServer()).put('/assets/copy').send({}); expect(status).toBe(400); @@ -115,11 +93,6 @@ describe(AssetController.name, () => { }); describe('PUT /assets/metadata', () => { - it('should be an authenticated route', async () => { - await request(ctx.getHttpServer()).put(`/assets/metadata`); - expect(ctx.authenticate).toHaveBeenCalled(); - }); - it('should require a valid assetId', async () => { const { status, body } = await request(ctx.getHttpServer()) .put('/assets/metadata') @@ -151,11 +124,6 @@ describe(AssetController.name, () => { }); describe('DELETE /assets/metadata', () => { - it('should be an authenticated route', async () => { - await request(ctx.getHttpServer()).delete(`/assets/metadata`); - expect(ctx.authenticate).toHaveBeenCalled(); - }); - it('should require a valid assetId', async () => { const { status, body } = await request(ctx.getHttpServer()) .delete('/assets/metadata') @@ -187,11 +155,6 @@ describe(AssetController.name, () => { }); describe('PUT /assets/:id', () => { - it('should be an authenticated route', async () => { - await request(ctx.getHttpServer()).get(`/assets/123`); - expect(ctx.authenticate).toHaveBeenCalled(); - }); - it('should require a valid id', async () => { const { status, body } = await request(ctx.getHttpServer()).put(`/assets/123`); expect(status).toBe(400); @@ -267,26 +230,7 @@ describe(AssetController.name, () => { }); }); - describe('GET /assets/statistics', () => { - it('should be an authenticated route', async () => { - await request(ctx.getHttpServer()).get(`/assets/statistics`); - expect(ctx.authenticate).toHaveBeenCalled(); - }); - }); - - describe('GET /assets/:id/metadata', () => { - it('should be an authenticated route', async () => { - await request(ctx.getHttpServer()).get(`/assets/${factory.uuid()}/metadata`); - expect(ctx.authenticate).toHaveBeenCalled(); - }); - }); - describe('PUT /assets/:id/metadata', () => { - it('should be an authenticated route', async () => { - await request(ctx.getHttpServer()).put(`/assets/${factory.uuid()}/metadata`).send({ items: [] }); - expect(ctx.authenticate).toHaveBeenCalled(); - }); - it('should require a valid id', async () => { const { status, body } = await request(ctx.getHttpServer()).put(`/assets/123/metadata`).send({ items: [] }); expect(status).toBe(400); @@ -353,11 +297,6 @@ describe(AssetController.name, () => { }); describe('GET /assets/:id/metadata/:key', () => { - it('should be an authenticated route', async () => { - await request(ctx.getHttpServer()).get(`/assets/${factory.uuid()}/metadata/mobile-app`); - expect(ctx.authenticate).toHaveBeenCalled(); - }); - it('should require a valid id', async () => { const { status, body } = await request(ctx.getHttpServer()).get(`/assets/123/metadata/mobile-app`); expect(status).toBe(400); @@ -366,11 +305,6 @@ describe(AssetController.name, () => { }); describe('PUT /assets/:id/edits', () => { - it('should be an authenticated route', async () => { - await request(ctx.getHttpServer()).put(`/assets/${factory.uuid()}/edits`).send({ edits: [] }); - expect(ctx.authenticate).toHaveBeenCalled(); - }); - it('should accept valid edits and pass to service correctly', async () => { const edits = [ { @@ -456,11 +390,6 @@ describe(AssetController.name, () => { }); describe('DELETE /assets/:id/metadata/:key', () => { - it('should be an authenticated route', async () => { - await request(ctx.getHttpServer()).delete(`/assets/${factory.uuid()}/metadata/mobile-app`); - expect(ctx.authenticate).toHaveBeenCalled(); - }); - it('should require a valid id', async () => { const { status, body } = await request(ctx.getHttpServer()).delete(`/assets/123/metadata/mobile-app`); expect(status).toBe(400); diff --git a/server/src/controllers/auth.controller.spec.ts b/server/src/controllers/auth.controller.spec.ts index d105dd90b9..832547776d 100644 --- a/server/src/controllers/auth.controller.spec.ts +++ b/server/src/controllers/auth.controller.spec.ts @@ -1,3 +1,4 @@ +import { BadRequestException } from '@nestjs/common'; import { AuthController } from 'src/controllers/auth.controller'; import { LoginResponseDto } from 'src/dtos/auth.dto'; import { AuthService } from 'src/services/auth.service'; @@ -76,6 +77,18 @@ describe(AuthController.name, () => { .send({ name: 'admin', password: 'password', email: 'admin@local' }); expect(status).toEqual(201); }); + + it('should not sign up an admin when setup is unavailable', async () => { + ctx.requireSetupAvailable.mockRejectedValue(new BadRequestException('Admin setup is not available')); + + const { status, body } = await request(ctx.getHttpServer()) + .post('/auth/admin-sign-up') + .send({ name, email, password }); + + expect(status).toEqual(400); + expect(body).toEqual(errorDto.badRequest('Admin setup is not available')); + expect(service.adminSignUp).not.toHaveBeenCalled(); + }); }); describe('POST /auth/login', () => { @@ -186,28 +199,7 @@ describe(AuthController.name, () => { }); }); - describe('POST /auth/logout', () => { - it('should be an authenticated route', async () => { - await request(ctx.getHttpServer()).post('/auth/logout'); - expect(ctx.authenticate).toHaveBeenCalled(); - }); - }); - - describe('POST /auth/change-password', () => { - it('should be an authenticated route', async () => { - await request(ctx.getHttpServer()) - .post('/auth/change-password') - .send({ password: 'password', newPassword: 'Password1234', invalidateSessions: false }); - expect(ctx.authenticate).toHaveBeenCalled(); - }); - }); - describe('POST /auth/pin-code', () => { - it('should be an authenticated route', async () => { - await request(ctx.getHttpServer()).post('/auth/pin-code').send({ pinCode: '123456' }); - expect(ctx.authenticate).toHaveBeenCalled(); - }); - it('should reject 5 digits', async () => { const { status, body } = await request(ctx.getHttpServer()).post('/auth/pin-code').send({ pinCode: '12345' }); expect(status).toEqual(400); @@ -238,25 +230,4 @@ describe(AuthController.name, () => { ); }); }); - - describe('PUT /auth/pin-code', () => { - it('should be an authenticated route', async () => { - await request(ctx.getHttpServer()).put('/auth/pin-code').send({ pinCode: '123456', newPinCode: '654321' }); - expect(ctx.authenticate).toHaveBeenCalled(); - }); - }); - - describe('DELETE /auth/pin-code', () => { - it('should be an authenticated route', async () => { - await request(ctx.getHttpServer()).delete('/auth/pin-code').send({ pinCode: '123456' }); - expect(ctx.authenticate).toHaveBeenCalled(); - }); - }); - - describe('GET /auth/status', () => { - it('should be an authenticated route', async () => { - await request(ctx.getHttpServer()).get('/auth/status'); - expect(ctx.authenticate).toHaveBeenCalled(); - }); - }); }); diff --git a/server/src/controllers/auth.controller.ts b/server/src/controllers/auth.controller.ts index 63cdce4f32..b96ba4dee3 100644 --- a/server/src/controllers/auth.controller.ts +++ b/server/src/controllers/auth.controller.ts @@ -33,6 +33,7 @@ export class AuthController { description: 'Login with username and password and receive a session token.', history: new HistoryBuilder().added('v1').beta('v1').stable('v2'), }) + @Authenticated({ public: true }) async login( @Res({ passthrough: true }) res: Response, @Body() loginCredential: LoginCredentialDto, @@ -55,6 +56,7 @@ export class AuthController { description: 'Create the first admin user in the system.', history: new HistoryBuilder().added('v1').beta('v1').stable('v2'), }) + @Authenticated({ public: true, setup: true }) signUpAdmin(@Body() dto: SignUpDto): Promise { return this.service.adminSignUp(dto); } diff --git a/server/src/controllers/database-backup.controller.spec.ts b/server/src/controllers/database-backup.controller.spec.ts new file mode 100644 index 0000000000..57a7ecc310 --- /dev/null +++ b/server/src/controllers/database-backup.controller.spec.ts @@ -0,0 +1,48 @@ +import { BadRequestException } from '@nestjs/common'; +import { DatabaseBackupController } from 'src/controllers/database-backup.controller'; +import { DatabaseBackupService } from 'src/services/database-backup.service'; +import { MaintenanceService } from 'src/services/maintenance.service'; +import request from 'supertest'; +import { errorDto } from 'test/medium/responses'; +import { automock, ControllerContext, controllerSetup, mockBaseService } from 'test/utils'; + +describe(DatabaseBackupController.name, () => { + let ctx: ControllerContext; + const service = automock(DatabaseBackupService, { args: [{ setContext: () => {} }], strict: false }); + const maintenanceService = mockBaseService(MaintenanceService); + + beforeAll(async () => { + ctx = await controllerSetup(DatabaseBackupController, [ + { provide: DatabaseBackupService, useValue: service }, + { provide: MaintenanceService, useValue: maintenanceService }, + ]); + return () => ctx.close(); + }); + + beforeEach(() => { + service.resetAllMocks(); + maintenanceService.resetAllMocks(); + ctx.reset(); + }); + + describe('POST /admin/database-backups/start-restore', () => { + it('should not be an authenticated route', async () => { + maintenanceService.startRestoreFlow.mockResolvedValue({ jwt: 'jwt' }); + + await request(ctx.getHttpServer()).post('/admin/database-backups/start-restore').send(); + + expect(ctx.authenticate).not.toHaveBeenCalled(); + expect(ctx.requireSetupAvailable).toHaveBeenCalled(); + }); + + it('should not start a restore when setup is unavailable', async () => { + ctx.requireSetupAvailable.mockRejectedValue(new BadRequestException('Admin setup is not available')); + + const { status, body } = await request(ctx.getHttpServer()).post('/admin/database-backups/start-restore').send(); + + expect(status).toEqual(400); + expect(body).toEqual(errorDto.badRequest('Admin setup is not available')); + expect(maintenanceService.startRestoreFlow).not.toHaveBeenCalled(); + }); + }); +}); diff --git a/server/src/controllers/database-backup.controller.ts b/server/src/controllers/database-backup.controller.ts index 737c8f3958..4cb2092d1b 100644 --- a/server/src/controllers/database-backup.controller.ts +++ b/server/src/controllers/database-backup.controller.ts @@ -71,6 +71,7 @@ export class DatabaseBackupController { description: 'Put Immich into maintenance mode to restore a backup (Immich must not be configured)', history: new HistoryBuilder().added('v2.5.0').alpha('v2.5.0'), }) + @Authenticated({ public: true, setup: true }) async startDatabaseRestoreFlow( @GetLoginDetails() loginDetails: LoginDetails, @Res({ passthrough: true }) res: Response, diff --git a/server/src/controllers/download.controller.spec.ts b/server/src/controllers/download.controller.spec.ts deleted file mode 100644 index 00d03fc46f..0000000000 --- a/server/src/controllers/download.controller.spec.ts +++ /dev/null @@ -1,46 +0,0 @@ -import { Readable } from 'node:stream'; -import { DownloadController } from 'src/controllers/download.controller'; -import { DownloadService } from 'src/services/download.service'; -import request from 'supertest'; -import { factory } from 'test/small.factory'; -import { ControllerContext, controllerSetup, mockBaseService } from 'test/utils'; - -describe(DownloadController.name, () => { - let ctx: ControllerContext; - const service = mockBaseService(DownloadService); - - beforeAll(async () => { - ctx = await controllerSetup(DownloadController, [{ provide: DownloadService, useValue: service }]); - return () => ctx.close(); - }); - - beforeEach(() => { - service.resetAllMocks(); - ctx.reset(); - }); - - describe('POST /download/info', () => { - it('should be an authenticated route', async () => { - await request(ctx.getHttpServer()) - .post('/download/info') - .send({ assetIds: [factory.uuid()] }); - expect(ctx.authenticate).toHaveBeenCalled(); - }); - }); - - describe('POST /download/archive', () => { - it('should be an authenticated route', async () => { - const stream = new Readable({ - read() { - this.push('test'); - this.push(null); - }, - }); - service.downloadArchive.mockResolvedValue({ stream }); - await request(ctx.getHttpServer()) - .post('/download/archive') - .send({ assetIds: [factory.uuid()] }); - expect(ctx.authenticate).toHaveBeenCalled(); - }); - }); -}); diff --git a/server/src/controllers/duplicate.controller.spec.ts b/server/src/controllers/duplicate.controller.spec.ts index 7bbafb4665..c8ca0e5793 100644 --- a/server/src/controllers/duplicate.controller.spec.ts +++ b/server/src/controllers/duplicate.controller.spec.ts @@ -18,26 +18,7 @@ describe(DuplicateController.name, () => { ctx.reset(); }); - describe('GET /duplicates', () => { - it('should be an authenticated route', async () => { - await request(ctx.getHttpServer()).get('/duplicates'); - expect(ctx.authenticate).toHaveBeenCalled(); - }); - }); - - describe('DELETE /duplicates', () => { - it('should be an authenticated route', async () => { - await request(ctx.getHttpServer()).delete('/duplicates'); - expect(ctx.authenticate).toHaveBeenCalled(); - }); - }); - describe('DELETE /duplicates/:id', () => { - it('should be an authenticated route', async () => { - await request(ctx.getHttpServer()).delete(`/duplicates/${factory.uuid()}`); - expect(ctx.authenticate).toHaveBeenCalled(); - }); - it('should require a valid uuid', async () => { const { status, body } = await request(ctx.getHttpServer()).delete(`/duplicates/123`); expect(status).toBe(400); diff --git a/server/src/controllers/index.spec.ts b/server/src/controllers/index.spec.ts new file mode 100644 index 0000000000..3d39a4dd3d --- /dev/null +++ b/server/src/controllers/index.spec.ts @@ -0,0 +1,69 @@ +import { RequestMethod } from '@nestjs/common'; +import { METHOD_METADATA, PATH_METADATA } from '@nestjs/common/constants'; +import { Reflector } from '@nestjs/core'; +import { controllers } from 'src/controllers'; +import { AuthenticatedOptions, getAuthenticatedOptions } from 'src/middleware/auth.guard'; + +const UNAUTHENTICATED_ADMIN_ROUTES = new Set([ + 'GET admin/maintenance/status', + 'POST admin/maintenance/login', + 'POST admin/database-backups/start-restore', +]); + +const isAdminPermission = (permission: AuthenticatedOptions['permission']) => + typeof permission === 'string' && permission.startsWith('admin'); + +const getRoutes = () => { + const reflector = new Reflector(); + + return controllers.flatMap((Controller) => { + const prefix = reflector.get(PATH_METADATA, Controller); + + return Object.getOwnPropertyNames(Controller.prototype).flatMap((name) => { + const handler = Object.getOwnPropertyDescriptor(Controller.prototype, name)?.value; + if (typeof handler !== 'function') { + return []; + } + + const requestMethod = reflector.get(METHOD_METADATA, handler); + if (requestMethod === undefined) { + return []; + } + + const method = RequestMethod[requestMethod]; + const path = [prefix, reflector.get(PATH_METADATA, handler)].filter((part) => part !== '/').join('/'); + + return { + id: `${method} ${path}`, + label: `${Controller.name}.${name} (${method} /${path})`, + path, + auth: getAuthenticatedOptions(reflector, handler), + }; + }); + }); +}; + +describe('controllers', () => { + const routes = getRoutes(); + const adminRoutes = routes.filter((route) => route.path === 'admin' || route.path.startsWith('admin/')); + + it('should only allow non-admin access to bootstrap routes under admin/', () => { + const reachableByNonAdmins = adminRoutes.filter((route) => !route.auth?.admin).map((route) => route.id); + + expect(new Set(reachableByNonAdmins)).toEqual(UNAUTHENTICATED_ADMIN_ROUTES); + }); + + it('should declare authentication on every route', () => { + const undeclared = routes.filter((route) => route.auth === undefined).map((route) => route.label); + + expect(undeclared).toEqual([]); + }); + + it('should require admin access for routes with an admin permission', () => { + const offenders = routes + .filter((route) => isAdminPermission(route.auth?.permission) && !route.auth?.admin) + .map((route) => route.label); + + expect(offenders).toEqual([]); + }); +}); diff --git a/server/src/controllers/maintenance.controller.spec.ts b/server/src/controllers/maintenance.controller.spec.ts index 630bb7c8b8..59b00b8aec 100644 --- a/server/src/controllers/maintenance.controller.spec.ts +++ b/server/src/controllers/maintenance.controller.spec.ts @@ -20,11 +20,6 @@ describe(MaintenanceController.name, () => { }); describe('POST /admin/maintenance', () => { - it('should be an authenticated route', async () => { - await request(ctx.getHttpServer()).post('/admin/maintenance').send(); - expect(ctx.authenticate).toHaveBeenCalled(); - }); - it('should require a backup file when action is restore', async () => { const { status, body } = await request(ctx.getHttpServer()).post('/admin/maintenance').send({ action: MaintenanceAction.RestoreDatabase, diff --git a/server/src/controllers/maintenance.controller.ts b/server/src/controllers/maintenance.controller.ts index 169fec7890..3d8c6c1194 100644 --- a/server/src/controllers/maintenance.controller.ts +++ b/server/src/controllers/maintenance.controller.ts @@ -27,6 +27,7 @@ export class MaintenanceController { description: 'Fetch information about the currently running maintenance action.', history: new HistoryBuilder().added('v2.5.0').alpha('v2.5.0'), }) + @Authenticated({ public: true }) getMaintenanceStatus(): MaintenanceStatusResponseDto { return this.service.getMaintenanceStatus(); } @@ -48,6 +49,7 @@ export class MaintenanceController { description: 'Login with maintenance token or cookie to receive current information and perform further actions.', history: new HistoryBuilder().added('v2.3.0').alpha('v2.3.0'), }) + @Authenticated({ public: true }) maintenanceLogin(@Body() _dto: MaintenanceLoginDto): MaintenanceAuthDto { throw new BadRequestException('Not in maintenance mode'); } @@ -65,12 +67,14 @@ export class MaintenanceController { @GetLoginDetails() loginDetails: LoginDetails, @Res({ passthrough: true }) res: Response, ): Promise { - if (dto.action !== MaintenanceAction.End) { - const { jwt } = await this.service.startMaintenance(dto, auth.user.name); - return respondWithCookie(res, undefined, { - isSecure: loginDetails.isSecure, - values: [{ key: ImmichCookie.MaintenanceToken, value: jwt }], - }); + if (dto.action === MaintenanceAction.End) { + return; } + + const { jwt } = await this.service.startMaintenance(dto, auth.user.name); + return respondWithCookie(res, undefined, { + isSecure: loginDetails.isSecure, + values: [{ key: ImmichCookie.MaintenanceToken, value: jwt }], + }); } } diff --git a/server/src/controllers/memory.controller.spec.ts b/server/src/controllers/memory.controller.spec.ts index 64d225f155..b717ee966c 100644 --- a/server/src/controllers/memory.controller.spec.ts +++ b/server/src/controllers/memory.controller.spec.ts @@ -20,11 +20,6 @@ describe(MemoryController.name, () => { }); describe('GET /memories', () => { - it('should be an authenticated route', async () => { - await request(ctx.getHttpServer()).get('/memories'); - expect(ctx.authenticate).toHaveBeenCalled(); - }); - it('should not require any parameters', async () => { await request(ctx.getHttpServer()).get('/memories').query({}); expect(service.search).toHaveBeenCalled(); @@ -32,11 +27,6 @@ describe(MemoryController.name, () => { }); describe('POST /memories', () => { - it('should be an authenticated route', async () => { - await request(ctx.getHttpServer()).post('/memories'); - expect(ctx.authenticate).toHaveBeenCalled(); - }); - it('should validate data when type is on this day', async () => { const { status, body } = await request(ctx.getHttpServer()) .post('/memories') @@ -69,19 +59,7 @@ describe(MemoryController.name, () => { }); }); - describe('GET /memories/statistics', () => { - it('should be an authenticated route', async () => { - await request(ctx.getHttpServer()).get('/memories/statistics'); - expect(ctx.authenticate).toHaveBeenCalled(); - }); - }); - describe('GET /memories/:id', () => { - it('should be an authenticated route', async () => { - await request(ctx.getHttpServer()).get(`/memories/${factory.uuid()}`); - expect(ctx.authenticate).toHaveBeenCalled(); - }); - it('should require a valid id', async () => { const { status, body } = await request(ctx.getHttpServer()).get(`/memories/invalid`); expect(status).toBe(400); @@ -90,11 +68,6 @@ describe(MemoryController.name, () => { }); describe('PUT /memories/:id', () => { - it('should be an authenticated route', async () => { - await request(ctx.getHttpServer()).put(`/memories/${factory.uuid()}`); - expect(ctx.authenticate).toHaveBeenCalled(); - }); - it('should require a valid id', async () => { const { status, body } = await request(ctx.getHttpServer()).put(`/memories/invalid`); expect(status).toBe(400); @@ -106,23 +79,15 @@ describe(MemoryController.name, () => { it('should require at least one field', async () => { const { status, body } = await request(ctx.getHttpServer()).put(`/memories/${factory.uuid()}`).send({}); expect(status).toBe(400); - expect(body).toEqual(errorDto.validationError([{ path: [], message: 'At least one field must be provided' }])); - }); - }); - - describe('DELETE /memories/:id', () => { - it('should be an authenticated route', async () => { - await request(ctx.getHttpServer()).delete(`/memories/${factory.uuid()}`); - expect(ctx.authenticate).toHaveBeenCalled(); + expect(body).toEqual( + errorDto.validationError([ + { path: [], message: 'At least one of the following fields is required: isSaved, seenAt, memoryAt' }, + ]), + ); }); }); describe('PUT /memories/:id/assets', () => { - it('should be an authenticated route', async () => { - await request(ctx.getHttpServer()).put(`/memories/${factory.uuid()}/assets`); - expect(ctx.authenticate).toHaveBeenCalled(); - }); - it('should require a valid id', async () => { const { status, body } = await request(ctx.getHttpServer()).put(`/memories/invalid/assets`).send({ ids: [] }); expect(status).toBe(400); @@ -139,11 +104,6 @@ describe(MemoryController.name, () => { }); describe('DELETE /memories/:id/assets', () => { - it('should be an authenticated route', async () => { - await request(ctx.getHttpServer()).delete(`/memories/${factory.uuid()}/assets`); - expect(ctx.authenticate).toHaveBeenCalled(); - }); - it('should require a valid id', async () => { const { status, body } = await request(ctx.getHttpServer()).delete(`/memories/invalid/assets`); expect(status).toBe(400); diff --git a/server/src/controllers/notification-admin.controller.spec.ts b/server/src/controllers/notification-admin.controller.spec.ts index b93726eb32..e440f5bcf6 100644 --- a/server/src/controllers/notification-admin.controller.spec.ts +++ b/server/src/controllers/notification-admin.controller.spec.ts @@ -21,11 +21,6 @@ describe(NotificationAdminController.name, () => { }); describe('POST /admin/notifications', () => { - it('should be an authenticated route', async () => { - await request(ctx.getHttpServer()).post('/admin/notifications'); - expect(ctx.authenticate).toHaveBeenCalled(); - }); - it('should accept a null readAt', async () => { await request(ctx.getHttpServer()) .post(`/admin/notifications`) diff --git a/server/src/controllers/notification.controller.spec.ts b/server/src/controllers/notification.controller.spec.ts index 1759e13404..f65537cbba 100644 --- a/server/src/controllers/notification.controller.spec.ts +++ b/server/src/controllers/notification.controller.spec.ts @@ -20,11 +20,6 @@ describe(NotificationController.name, () => { }); describe('GET /notifications', () => { - it('should be an authenticated route', async () => { - await request(ctx.getHttpServer()).get('/notifications'); - expect(ctx.authenticate).toHaveBeenCalled(); - }); - it(`should reject an invalid notification level`, async () => { const { status, body } = await request(ctx.getHttpServer()) .get(`/notifications`) @@ -40,11 +35,6 @@ describe(NotificationController.name, () => { }); describe('PUT /notifications', () => { - it('should be an authenticated route', async () => { - await request(ctx.getHttpServer()).put('/notifications'); - expect(ctx.authenticate).toHaveBeenCalled(); - }); - describe('ids', () => { it('should require a list', async () => { const { status, body } = await request(ctx.getHttpServer()).put(`/notifications`).send({ ids: true }); @@ -75,11 +65,6 @@ describe(NotificationController.name, () => { }); describe('GET /notifications/:id', () => { - it('should be an authenticated route', async () => { - await request(ctx.getHttpServer()).get(`/notifications/${factory.uuid()}`); - expect(ctx.authenticate).toHaveBeenCalled(); - }); - it('should require a valid uuid', async () => { const { status, body } = await request(ctx.getHttpServer()).get(`/notifications/123`); expect(status).toBe(400); @@ -88,11 +73,6 @@ describe(NotificationController.name, () => { }); describe('PUT /notifications/:id', () => { - it('should be an authenticated route', async () => { - await request(ctx.getHttpServer()).put(`/notifications/${factory.uuid()}`).send({ readAt: factory.date() }); - expect(ctx.authenticate).toHaveBeenCalled(); - }); - it('should accept a null readAt', async () => { const id = factory.uuid(); await request(ctx.getHttpServer()).put(`/notifications/${id}`).send({ readAt: null }); diff --git a/server/src/controllers/oauth.controller.ts b/server/src/controllers/oauth.controller.ts index 7f2313a058..54f5c1f10b 100644 --- a/server/src/controllers/oauth.controller.ts +++ b/server/src/controllers/oauth.controller.ts @@ -22,6 +22,7 @@ export class OAuthController { constructor(private service: AuthService) {} @Get('mobile-redirect') + @Authenticated({ public: true }) @Redirect() @Endpoint({ summary: 'Redirect OAuth to mobile', @@ -37,6 +38,7 @@ export class OAuthController { } @Post('authorize') + @Authenticated({ public: true }) @Endpoint({ summary: 'Start OAuth', description: 'Initiate the OAuth authorization process.', @@ -62,6 +64,7 @@ export class OAuthController { } @Post('callback') + @Authenticated({ public: true }) @Endpoint({ summary: 'Finish OAuth', description: 'Complete the OAuth authorization process by exchanging the authorization code for a session token.', @@ -115,6 +118,7 @@ export class OAuthController { } @Post('backchannel-logout') + @Authenticated({ public: true }) @HttpCode(HttpStatus.OK) @ApiConsumes('application/x-www-form-urlencoded') @Endpoint({ diff --git a/server/src/controllers/partner.controller.spec.ts b/server/src/controllers/partner.controller.spec.ts index d6541411b8..38cb717bea 100644 --- a/server/src/controllers/partner.controller.spec.ts +++ b/server/src/controllers/partner.controller.spec.ts @@ -3,7 +3,6 @@ import { LoggingRepository } from 'src/repositories/logging.repository'; import { PartnerService } from 'src/services/partner.service'; import request from 'supertest'; import { errorDto } from 'test/medium/responses'; -import { factory } from 'test/small.factory'; import { automock, ControllerContext, controllerSetup, mockBaseService } from 'test/utils'; describe(PartnerController.name, () => { @@ -24,11 +23,6 @@ describe(PartnerController.name, () => { }); describe('GET /partners', () => { - it('should be an authenticated route', async () => { - await request(ctx.getHttpServer()).get('/partners'); - expect(ctx.authenticate).toHaveBeenCalled(); - }); - it(`should require a direction`, async () => { const { status, body } = await request(ctx.getHttpServer()).get(`/partners`).set('Authorization', `Bearer token`); expect(status).toBe(400); @@ -54,11 +48,6 @@ describe(PartnerController.name, () => { }); describe('POST /partners', () => { - it('should be an authenticated route', async () => { - await request(ctx.getHttpServer()).post('/partners'); - expect(ctx.authenticate).toHaveBeenCalled(); - }); - it(`should require sharedWithId to be a uuid`, async () => { const { status, body } = await request(ctx.getHttpServer()) .post(`/partners`) @@ -70,11 +59,6 @@ describe(PartnerController.name, () => { }); describe('PUT /partners/:id', () => { - it('should be an authenticated route', async () => { - await request(ctx.getHttpServer()).put(`/partners/${factory.uuid()}`); - expect(ctx.authenticate).toHaveBeenCalled(); - }); - it(`should require id to be a uuid`, async () => { const { status, body } = await request(ctx.getHttpServer()) .put(`/partners/invalid`) @@ -86,11 +70,6 @@ describe(PartnerController.name, () => { }); describe('DELETE /partners/:id', () => { - it('should be an authenticated route', async () => { - await request(ctx.getHttpServer()).delete(`/partners/${factory.uuid()}`); - expect(ctx.authenticate).toHaveBeenCalled(); - }); - it(`should require id to be a uuid`, async () => { const { status, body } = await request(ctx.getHttpServer()) .delete(`/partners/invalid`) diff --git a/server/src/controllers/person.controller.spec.ts b/server/src/controllers/person.controller.spec.ts index 64fe4f3554..0d3d3eea4a 100644 --- a/server/src/controllers/person.controller.spec.ts +++ b/server/src/controllers/person.controller.spec.ts @@ -24,11 +24,6 @@ describe(PersonController.name, () => { }); describe('GET /people', () => { - it('should be an authenticated route', async () => { - await request(ctx.getHttpServer()).get('/people'); - expect(ctx.authenticate).toHaveBeenCalled(); - }); - it(`should require closestPersonId to be a uuid`, async () => { const { status, body } = await request(ctx.getHttpServer()) .get(`/people`) @@ -48,19 +43,7 @@ describe(PersonController.name, () => { }); }); - describe('POST /people', () => { - it('should be an authenticated route', async () => { - await request(ctx.getHttpServer()).post('/people'); - expect(ctx.authenticate).toHaveBeenCalled(); - }); - }); - describe('DELETE /people', () => { - it('should be an authenticated route', async () => { - await request(ctx.getHttpServer()).delete('/people'); - expect(ctx.authenticate).toHaveBeenCalled(); - }); - it('should require uuids in the body', async () => { const { status, body } = await request(ctx.getHttpServer()) .delete('/people') @@ -78,19 +61,7 @@ describe(PersonController.name, () => { }); }); - describe('GET /people/:id', () => { - it('should be an authenticated route', async () => { - await request(ctx.getHttpServer()).get(`/people/${factory.uuid()}`); - expect(ctx.authenticate).toHaveBeenCalled(); - }); - }); - describe('PUT /people/:id', () => { - it('should be an authenticated route', async () => { - await request(ctx.getHttpServer()).get(`/people/${factory.uuid()}`); - expect(ctx.authenticate).toHaveBeenCalled(); - }); - it('should require a valid uuid', async () => { const { status, body } = await request(ctx.getHttpServer()).put(`/people/123`); expect(status).toBe(400); @@ -177,11 +148,6 @@ describe(PersonController.name, () => { }); describe('DELETE /people/:id', () => { - it('should be an authenticated route', async () => { - await request(ctx.getHttpServer()).delete(`/people/${factory.uuid()}`); - expect(ctx.authenticate).toHaveBeenCalled(); - }); - it('should require a valid uuid', async () => { const { status, body } = await request(ctx.getHttpServer()).delete(`/people/invalid`); expect(status).toBe(400); @@ -194,18 +160,4 @@ describe(PersonController.name, () => { expect(service.delete).toHaveBeenCalled(); }); }); - - describe('POST /people/:id/merge', () => { - it('should be an authenticated route', async () => { - await request(ctx.getHttpServer()).post(`/people/${factory.uuid()}/merge`); - expect(ctx.authenticate).toHaveBeenCalled(); - }); - }); - - describe('GET /people/:id/statistics', () => { - it('should be an authenticated route', async () => { - await request(ctx.getHttpServer()).get(`/people/${factory.uuid()}/statistics`); - expect(ctx.authenticate).toHaveBeenCalled(); - }); - }); }); diff --git a/server/src/controllers/plugin.controller.spec.ts b/server/src/controllers/plugin.controller.spec.ts index 881a7dd953..bc42a4f75b 100644 --- a/server/src/controllers/plugin.controller.spec.ts +++ b/server/src/controllers/plugin.controller.spec.ts @@ -3,7 +3,6 @@ import { LoggingRepository } from 'src/repositories/logging.repository'; import { PluginService } from 'src/services/plugin.service'; import request from 'supertest'; import { errorDto } from 'test/medium/responses'; -import { factory } from 'test/small.factory'; import { automock, ControllerContext, controllerSetup, mockBaseService } from 'test/utils'; describe(PluginController.name, () => { @@ -24,11 +23,6 @@ describe(PluginController.name, () => { }); describe('GET /plugins', () => { - it('should be an authenticated route', async () => { - await request(ctx.getHttpServer()).get('/plugins'); - expect(ctx.authenticate).toHaveBeenCalled(); - }); - it(`should require id to be a uuid`, async () => { const { status, body } = await request(ctx.getHttpServer()) .get(`/plugins`) @@ -40,11 +34,6 @@ describe(PluginController.name, () => { }); describe('GET /plugins/:id', () => { - it('should be an authenticated route', async () => { - await request(ctx.getHttpServer()).get(`/plugins/${factory.uuid()}`); - expect(ctx.authenticate).toHaveBeenCalled(); - }); - it(`should require id to be a uuid`, async () => { const { status, body } = await request(ctx.getHttpServer()) .get(`/plugins/invalid`) diff --git a/server/src/controllers/search.controller.spec.ts b/server/src/controllers/search.controller.spec.ts index a1fed4c7ae..f1ac01ed41 100644 --- a/server/src/controllers/search.controller.spec.ts +++ b/server/src/controllers/search.controller.spec.ts @@ -19,11 +19,6 @@ describe(SearchController.name, () => { }); describe('POST /search/metadata', () => { - it('should be an authenticated route', async () => { - await request(ctx.getHttpServer()).post('/search/metadata'); - expect(ctx.authenticate).toHaveBeenCalled(); - }); - it('should reject page as a string', async () => { const { status, body } = await request(ctx.getHttpServer()).post('/search/metadata').send({ page: 'abc' }); expect(status).toBe(400); @@ -121,11 +116,6 @@ describe(SearchController.name, () => { }); describe('POST /search/random', () => { - it('should be an authenticated route', async () => { - await request(ctx.getHttpServer()).post('/search/random'); - expect(ctx.authenticate).toHaveBeenCalled(); - }); - it('should reject if withStacked is not a boolean', async () => { const { status, body } = await request(ctx.getHttpServer()) .post('/search/random') @@ -151,26 +141,7 @@ describe(SearchController.name, () => { }); }); - describe('POST /search/smart', () => { - it('should be an authenticated route', async () => { - await request(ctx.getHttpServer()).post('/search/smart'); - expect(ctx.authenticate).toHaveBeenCalled(); - }); - }); - - describe('GET /search/explore', () => { - it('should be an authenticated route', async () => { - await request(ctx.getHttpServer()).get('/search/explore'); - expect(ctx.authenticate).toHaveBeenCalled(); - }); - }); - describe('POST /search/person', () => { - it('should be an authenticated route', async () => { - await request(ctx.getHttpServer()).get('/search/person'); - expect(ctx.authenticate).toHaveBeenCalled(); - }); - it('should require a name', async () => { const { status, body } = await request(ctx.getHttpServer()).get('/search/person').send({}); expect(status).toBe(400); @@ -181,11 +152,6 @@ describe(SearchController.name, () => { }); describe('GET /search/places', () => { - it('should be an authenticated route', async () => { - await request(ctx.getHttpServer()).get('/search/places'); - expect(ctx.authenticate).toHaveBeenCalled(); - }); - it('should require a name', async () => { const { status, body } = await request(ctx.getHttpServer()).get('/search/places').send({}); expect(status).toBe(400); @@ -195,19 +161,7 @@ describe(SearchController.name, () => { }); }); - describe('GET /search/cities', () => { - it('should be an authenticated route', async () => { - await request(ctx.getHttpServer()).get('/search/cities'); - expect(ctx.authenticate).toHaveBeenCalled(); - }); - }); - describe('GET /search/suggestions', () => { - it('should be an authenticated route', async () => { - await request(ctx.getHttpServer()).get('/search/suggestions'); - expect(ctx.authenticate).toHaveBeenCalled(); - }); - it('should require a type', async () => { const { status, body } = await request(ctx.getHttpServer()).get('/search/suggestions').send({}); expect(status).toBe(400); diff --git a/server/src/controllers/search.controller.ts b/server/src/controllers/search.controller.ts index 439a7a5118..30feecbe10 100644 --- a/server/src/controllers/search.controller.ts +++ b/server/src/controllers/search.controller.ts @@ -28,7 +28,7 @@ export class SearchController { constructor(private service: SearchService) {} @Post('metadata') - @Authenticated({ permission: Permission.AssetRead }) + @Authenticated({ permission: Permission.AssetRead, sharedLink: true }) @HttpCode(HttpStatus.OK) @Endpoint({ summary: 'Search assets by metadata', diff --git a/server/src/controllers/server.controller.spec.ts b/server/src/controllers/server.controller.spec.ts deleted file mode 100644 index 6b00490d28..0000000000 --- a/server/src/controllers/server.controller.spec.ts +++ /dev/null @@ -1,35 +0,0 @@ -import { ServerController } from 'src/controllers/server.controller'; -import { ServerService } from 'src/services/server.service'; -import { SystemMetadataService } from 'src/services/system-metadata.service'; -import { VersionService } from 'src/services/version.service'; -import request from 'supertest'; -import { ControllerContext, controllerSetup, mockBaseService } from 'test/utils'; - -describe(ServerController.name, () => { - let ctx: ControllerContext; - const serverService = mockBaseService(ServerService); - const systemMetadataService = mockBaseService(SystemMetadataService); - const versionService = mockBaseService(VersionService); - - beforeAll(async () => { - ctx = await controllerSetup(ServerController, [ - { provide: ServerService, useValue: serverService }, - { provide: SystemMetadataService, useValue: systemMetadataService }, - { provide: VersionService, useValue: versionService }, - ]); - return () => ctx.close(); - }); - - beforeEach(() => { - serverService.resetAllMocks(); - versionService.resetAllMocks(); - ctx.reset(); - }); - - describe('GET /server/license', () => { - it('should be an authenticated route', async () => { - await request(ctx.getHttpServer()).get('/server/license'); - expect(ctx.authenticate).toHaveBeenCalled(); - }); - }); -}); diff --git a/server/src/controllers/server.controller.ts b/server/src/controllers/server.controller.ts index f5ce4b851c..6407155492 100644 --- a/server/src/controllers/server.controller.ts +++ b/server/src/controllers/server.controller.ts @@ -64,6 +64,7 @@ export class ServerController { } @Get('ping') + @Authenticated({ public: true }) @Endpoint({ summary: 'Ping', description: 'Pong', @@ -74,6 +75,7 @@ export class ServerController { } @Get('version') + @Authenticated({ public: true }) @Endpoint({ summary: 'Get server version', description: 'Retrieve the current server version in semantic versioning (semver) format.', @@ -84,6 +86,7 @@ export class ServerController { } @Get('version-history') + @Authenticated({ public: true }) @Endpoint({ summary: 'Get version history', description: 'Retrieve a list of past versions the server has been on.', @@ -94,6 +97,7 @@ export class ServerController { } @Get('features') + @Authenticated({ public: true }) @Endpoint({ summary: 'Get features', description: 'Retrieve available features supported by this server.', @@ -104,6 +108,7 @@ export class ServerController { } @Get('config') + @Authenticated({ public: true }) @Endpoint({ summary: 'Get config', description: 'Retrieve the current server configuration.', @@ -125,6 +130,7 @@ export class ServerController { } @Get('media-types') + @Authenticated({ public: true }) @Endpoint({ summary: 'Get supported media types', description: 'Retrieve all media types supported by the server.', diff --git a/server/src/controllers/shared-link.controller.spec.ts b/server/src/controllers/shared-link.controller.spec.ts index d8b89d0029..731baa673f 100644 --- a/server/src/controllers/shared-link.controller.spec.ts +++ b/server/src/controllers/shared-link.controller.spec.ts @@ -2,7 +2,8 @@ import { SharedLinkController } from 'src/controllers/shared-link.controller'; import { Permission, SharedLinkType } from 'src/enum'; import { SharedLinkService } from 'src/services/shared-link.service'; import request from 'supertest'; -import { factory } from 'test/small.factory'; +import { errorDto } from 'test/medium/responses'; +import { factory, newUuid } from 'test/small.factory'; import { ControllerContext, controllerSetup, mockBaseService } from 'test/utils'; describe(SharedLinkController.name, () => { @@ -19,18 +20,54 @@ describe(SharedLinkController.name, () => { ctx.reset(); }); + describe('GET /shared-links/me', () => { + it('should be a shared link route', async () => { + await request(ctx.getHttpServer()).get('/shared-links/me'); + expect(ctx.authenticate).toHaveBeenCalledWith( + expect.objectContaining({ metadata: expect.objectContaining({ sharedLinkRoute: true }) }), + ); + }); + }); + describe('POST /shared-links', () => { - it('should be an authenticated route', async () => { - await request(ctx.getHttpServer()).post('/shared-links'); - expect(ctx.authenticate).toHaveBeenCalled(); + it('should require a type and the correspondent asset/album id', async () => { + const { status, body } = await request(ctx.getHttpServer()) + .post('/shared-links') + .set('Authorization', `Bearer token`); + expect(status).toBe(400); + expect(body).toEqual( + errorDto.validationError([{ path: [], message: 'Invalid input: expected object, received undefined' }]), + ); }); it('should allow an null expiresAt', async () => { await request(ctx.getHttpServer()) .post('/shared-links') - .send({ expiresAt: null, type: SharedLinkType.Individual }); + .send({ expiresAt: null, type: SharedLinkType.Individual, assetIds: [newUuid()] }); expect(service.create).toHaveBeenCalledWith(undefined, expect.objectContaining({ expiresAt: null })); }); + + it('should not allow an albumId for share type Individual', async () => { + const { status, body } = await request(ctx.getHttpServer()) + .post('/shared-links') + .send({ type: SharedLinkType.Individual, assetIds: [newUuid()], albumId: newUuid() }); + expect(status).toBe(400); + expect(body).toEqual( + errorDto.validationError([{ path: [], message: 'albumId can only be used with type ALBUM' }]), + ); + expect(service.create).not.toHaveBeenCalled(); + }); + + it('should not allow assetIds for share type Album', async () => { + const { status, body } = await request(ctx.getHttpServer()) + .post('/shared-links') + .send({ type: SharedLinkType.Album, assetIds: [newUuid()], albumId: newUuid() }); + expect(status).toBe(400); + expect(body).toEqual( + errorDto.validationError([{ path: [], message: 'assetIds can only be used with type INDIVIDUAL' }]), + ); + expect(service.create).not.toHaveBeenCalled(); + }); }); describe('DELETE /shared-links/:id/assets', () => { diff --git a/server/src/controllers/stack.controller.spec.ts b/server/src/controllers/stack.controller.spec.ts new file mode 100644 index 0000000000..bc9c87da14 --- /dev/null +++ b/server/src/controllers/stack.controller.spec.ts @@ -0,0 +1,46 @@ +import { StackController } from 'src/controllers/stack.controller'; +import { StackService } from 'src/services/stack.service'; +import request from 'supertest'; +import { errorDto } from 'test/medium/responses'; +import { factory } from 'test/small.factory'; +import { ControllerContext, controllerSetup, mockBaseService } from 'test/utils'; + +describe(StackController.name, () => { + let ctx: ControllerContext; + const service = mockBaseService(StackService); + + beforeAll(async () => { + ctx = await controllerSetup(StackController, [{ provide: StackService, useValue: service }]); + return () => ctx.close(); + }); + + beforeEach(() => { + service.resetAllMocks(); + ctx.reset(); + }); + + describe('POST /stacks', () => { + it('should require at least two assets', async () => { + const { status, body } = await request(ctx.getHttpServer()) + .post('/stacks') + .send({ assetIds: [factory.uuid()] }); + expect(status).toBe(400); + expect(body).toEqual( + errorDto.validationError([{ path: ['assetIds'], message: 'Too small: expected array to have >=2 items' }]), + ); + }); + + it('should require a valid id', async () => { + const { status, body } = await request(ctx.getHttpServer()) + .post('/stacks') + .send({ assetIds: ['invalid', 'invalid'] }); + expect(status).toBe(400); + expect(body).toEqual( + errorDto.validationError([ + { path: ['assetIds', 0], message: 'Invalid UUID' }, + { path: ['assetIds', 1], message: 'Invalid UUID' }, + ]), + ); + }); + }); +}); diff --git a/server/src/controllers/sync.controller.spec.ts b/server/src/controllers/sync.controller.spec.ts index cae7650d9a..1f2c0f137a 100644 --- a/server/src/controllers/sync.controller.spec.ts +++ b/server/src/controllers/sync.controller.spec.ts @@ -25,11 +25,6 @@ describe(SyncController.name, () => { }); describe('POST /sync/stream', () => { - it('should be an authenticated route', async () => { - await request(ctx.getHttpServer()).post('/sync/stream'); - expect(ctx.authenticate).toHaveBeenCalled(); - }); - it('should require sync request type enums', async () => { const { status, body } = await request(ctx.getHttpServer()) .post('/sync/stream') @@ -44,19 +39,7 @@ describe(SyncController.name, () => { }); }); - describe('GET /sync/ack', () => { - it('should be an authenticated route', async () => { - await request(ctx.getHttpServer()).get('/sync/ack'); - expect(ctx.authenticate).toHaveBeenCalled(); - }); - }); - describe('POST /sync/ack', () => { - it('should be an authenticated route', async () => { - await request(ctx.getHttpServer()).post('/sync/ack'); - expect(ctx.authenticate).toHaveBeenCalled(); - }); - it('should not allow more than 1,000 entries', async () => { const acks = Array.from({ length: 1001 }, (_, i) => `ack-${i}`); const { status, body } = await request(ctx.getHttpServer()).post('/sync/ack').send({ acks }); @@ -69,11 +52,6 @@ describe(SyncController.name, () => { }); describe('DELETE /sync/ack', () => { - it('should be an authenticated route', async () => { - await request(ctx.getHttpServer()).delete('/sync/ack'); - expect(ctx.authenticate).toHaveBeenCalled(); - }); - it('should require sync response type enums', async () => { const { status, body } = await request(ctx.getHttpServer()) .delete('/sync/ack') diff --git a/server/src/controllers/system-config.controller.spec.ts b/server/src/controllers/system-config.controller.spec.ts index 1770bdd89e..7d40f12583 100644 --- a/server/src/controllers/system-config.controller.spec.ts +++ b/server/src/controllers/system-config.controller.spec.ts @@ -14,10 +14,10 @@ function validConfig() { notifications: { smtp: { from: string; transport: { host: string } } }; server: { externalDomain: string }; }; - config.oauth.mobileRedirectUri = config.oauth.mobileRedirectUri || 'https://example.com'; - config.server.externalDomain = config.server.externalDomain || 'https://example.com'; - config.notifications.smtp.from = config.notifications.smtp.from || 'noreply@example.com'; - config.notifications.smtp.transport.host = config.notifications.smtp.transport.host || 'localhost'; + config.oauth.mobileRedirectUri ||= 'https://example.com'; + config.server.externalDomain ||= 'https://example.com'; + config.notifications.smtp.from ||= 'noreply@example.com'; + config.notifications.smtp.transport.host ||= 'localhost'; return config; } @@ -40,26 +40,7 @@ describe(SystemConfigController.name, () => { ctx.reset(); }); - describe('GET /system-config', () => { - it('should be an authenticated route', async () => { - await request(ctx.getHttpServer()).get('/system-config'); - expect(ctx.authenticate).toHaveBeenCalled(); - }); - }); - - describe('GET /system-config/defaults', () => { - it('should be an authenticated route', async () => { - await request(ctx.getHttpServer()).get('/system-config/defaults'); - expect(ctx.authenticate).toHaveBeenCalled(); - }); - }); - describe('PUT /system-config', () => { - it('should be an authenticated route', async () => { - await request(ctx.getHttpServer()).put('/system-config'); - expect(ctx.authenticate).toHaveBeenCalled(); - }); - describe('nightlyTasks', () => { it('should validate nightly jobs start time', async () => { const config = validConfig(); diff --git a/server/src/controllers/tag.controller.spec.ts b/server/src/controllers/tag.controller.spec.ts index c2a2de95bd..a89ce14dda 100644 --- a/server/src/controllers/tag.controller.spec.ts +++ b/server/src/controllers/tag.controller.spec.ts @@ -2,7 +2,6 @@ import { TagController } from 'src/controllers/tag.controller'; import { TagService } from 'src/services/tag.service'; import request from 'supertest'; import { errorDto } from 'test/medium/responses'; -import { factory } from 'test/small.factory'; import { ControllerContext, controllerSetup, mockBaseService } from 'test/utils'; describe(TagController.name, () => { @@ -19,38 +18,14 @@ describe(TagController.name, () => { ctx.reset(); }); - describe('GET /tags', () => { - it('should be an authenticated route', async () => { - await request(ctx.getHttpServer()).get('/tags'); - expect(ctx.authenticate).toHaveBeenCalled(); - }); - }); - describe('POST /tags', () => { - it('should be an authenticated route', async () => { - await request(ctx.getHttpServer()).post('/tags'); - expect(ctx.authenticate).toHaveBeenCalled(); - }); - it('should a null parentId', async () => { await request(ctx.getHttpServer()).post(`/tags`).send({ name: 'tag', parentId: null }); expect(service.create).toHaveBeenCalledWith(undefined, expect.objectContaining({ parentId: null })); }); }); - describe('PUT /tags', () => { - it('should be an authenticated route', async () => { - await request(ctx.getHttpServer()).put('/tags'); - expect(ctx.authenticate).toHaveBeenCalled(); - }); - }); - describe('GET /tags/:id', () => { - it('should be an authenticated route', async () => { - await request(ctx.getHttpServer()).get(`/tags/${factory.uuid()}`); - expect(ctx.authenticate).toHaveBeenCalled(); - }); - it('should require a valid uuid', async () => { const { status, body } = await request(ctx.getHttpServer()).get(`/tags/123`); expect(status).toBe(400); @@ -58,10 +33,11 @@ describe(TagController.name, () => { }); }); - describe('PUT /tags/:id', () => { - it('should be an authenticated route', async () => { - await request(ctx.getHttpServer()).put(`/tags/${factory.uuid()}`); - expect(ctx.authenticate).toHaveBeenCalled(); + describe('DELETE /tags/:id', () => { + it('should require a valid uuid', async () => { + const { status, body } = await request(ctx.getHttpServer()).delete(`/tags/123`); + expect(status).toBe(400); + expect(body).toEqual(errorDto.validationError([{ path: ['id'], message: 'Invalid UUID' }])); }); }); }); diff --git a/server/src/controllers/timeline.controller.spec.ts b/server/src/controllers/timeline.controller.spec.ts index b07eb5a78c..288945ee97 100644 --- a/server/src/controllers/timeline.controller.spec.ts +++ b/server/src/controllers/timeline.controller.spec.ts @@ -19,11 +19,6 @@ describe(TimelineController.name, () => { }); describe('GET /timeline/buckets', () => { - it('should be an authenticated route', async () => { - await request(ctx.getHttpServer()).get('/timeline/buckets'); - expect(ctx.authenticate).toHaveBeenCalled(); - }); - it('should parse bbox query string into an object', async () => { const { status } = await request(ctx.getHttpServer()) .get('/timeline/buckets') @@ -33,7 +28,7 @@ describe(TimelineController.name, () => { expect(service.getTimeBuckets).toHaveBeenCalledWith( undefined, expect.objectContaining({ - bbox: { west: 11.075_683, south: 49.416_711, east: 11.117_589, north: 49.454_875 }, + bbox: { west: 11.075683, south: 49.416711, east: 11.117589, north: 49.454875 }, }), ); }); @@ -58,11 +53,6 @@ describe(TimelineController.name, () => { }); describe('GET /timeline/bucket', () => { - it('should be an authenticated route', async () => { - await request(ctx.getHttpServer()).get('/timeline/bucket?timeBucket=1900-01-01'); - expect(ctx.authenticate).toHaveBeenCalled(); - }); - // TODO enable date string validation while still accepting 5 digit years it.fails('should fail if time bucket is invalid', async () => { const { status, body } = await request(ctx.getHttpServer()).get('/timeline/bucket').query({ timeBucket: 'foo' }); diff --git a/server/src/controllers/user-admin.controller.spec.ts b/server/src/controllers/user-admin.controller.spec.ts index b5840a33e1..3fa423f9b3 100644 --- a/server/src/controllers/user-admin.controller.spec.ts +++ b/server/src/controllers/user-admin.controller.spec.ts @@ -24,26 +24,7 @@ describe(UserAdminController.name, () => { ctx.reset(); }); - describe('GET /admin/users', () => { - it('should be an authenticated route', async () => { - await request(ctx.getHttpServer()).get('/admin/users'); - expect(ctx.authenticate).toHaveBeenCalled(); - }); - }); - - describe('PUT /admin/users/:id', () => { - it('should be an authenticated route', async () => { - await request(ctx.getHttpServer()).put(`/admin/users/${factory.uuid()}`); - expect(ctx.authenticate).toHaveBeenCalled(); - }); - }); - describe('POST /admin/users', () => { - it('should be an authenticated route', async () => { - await request(ctx.getHttpServer()).post('/admin/users'); - expect(ctx.authenticate).toHaveBeenCalled(); - }); - it('should allow a null pinCode', async () => { await request(ctx.getHttpServer()).post(`/admin/users`).send({ name: 'Test user', @@ -64,25 +45,22 @@ describe(UserAdminController.name, () => { expect(service.create).toHaveBeenCalledWith(expect.objectContaining({ avatarColor: null })); }); - it(`should `, async () => { - const dto: UserAdminCreateDto = { - email: 'user@immich.app', - password: 'test', - name: 'Test User', - quotaSizeInBytes: 1.2, - }; - - const { status, body } = await request(ctx.getHttpServer()) - .post(`/admin/users`) - .set('Authorization', `Bearer token`) - .send(dto); - expect(status).toBe(400); - expect(body).toEqual( - errorDto.validationError([ - { path: ['quotaSizeInBytes'], message: 'Invalid input: expected int, received number' }, - ]), - ); - }); + for (const [key, message] of [ + ['password', 'Invalid input: expected string, received null'], + ['email', 'Invalid input: expected email, received object'], + ['name', 'Invalid input: expected string, received null'], + ['shouldChangePassword', 'Invalid input: expected boolean, received null'], + ['notify', 'Invalid input: expected boolean, received null'], + ] as const) { + it(`should not allow null ${key}`, async () => { + const { status, body } = await request(ctx.getHttpServer()) + .post(`/admin/users`) + .set('Authorization', `Bearer token`) + .send({ email: 'user@immich.app', password: 'test', name: 'Test User', [key]: null }); + expect(status).toBe(400); + expect(body).toEqual(errorDto.validationError([{ path: [key], message }])); + }); + } it(`should not allow decimal quota`, async () => { const dto: UserAdminCreateDto = { @@ -105,19 +83,7 @@ describe(UserAdminController.name, () => { }); }); - describe('GET /admin/users/:id', () => { - it('should be an authenticated route', async () => { - await request(ctx.getHttpServer()).get(`/admin/users/${factory.uuid()}`); - expect(ctx.authenticate).toHaveBeenCalled(); - }); - }); - describe('PUT /admin/users/:id', () => { - it('should be an authenticated route', async () => { - await request(ctx.getHttpServer()).put(`/admin/users/${factory.uuid()}`); - expect(ctx.authenticate).toHaveBeenCalled(); - }); - it(`should not allow decimal quota`, async () => { const { status, body } = await request(ctx.getHttpServer()) .put(`/admin/users/${factory.uuid()}`) @@ -142,5 +108,21 @@ describe(UserAdminController.name, () => { await request(ctx.getHttpServer()).put(`/admin/users/${id}`).send({ avatarColor: null }); expect(service.update).toHaveBeenCalledWith(undefined, id, expect.objectContaining({ avatarColor: null })); }); + + for (const [key, message] of [ + ['password', 'Invalid input: expected string, received null'], + ['email', 'Invalid input: expected email, received object'], + ['name', 'Invalid input: expected string, received null'], + ['shouldChangePassword', 'Invalid input: expected boolean, received null'], + ] as const) { + it(`should not allow null ${key}`, async () => { + const { status, body } = await request(ctx.getHttpServer()) + .put(`/admin/users/${factory.uuid()}`) + .set('Authorization', `Bearer token`) + .send({ [key]: null }); + expect(status).toBe(400); + expect(body).toEqual(errorDto.validationError([{ path: [key], message }])); + }); + } }); }); diff --git a/server/src/controllers/user-admin.controller.ts b/server/src/controllers/user-admin.controller.ts index fbc18478ab..18798c00cb 100644 --- a/server/src/controllers/user-admin.controller.ts +++ b/server/src/controllers/user-admin.controller.ts @@ -102,7 +102,7 @@ export class UserAdminController { } @Get(':id/calendar-heatmap') - @Authenticated({ permission: Permission.UserRead }) + @Authenticated({ permission: Permission.AdminUserRead, admin: true }) @Endpoint({ summary: 'Retrieve calendar heatmap activity', description: 'Retrieve activity counts for a specified period, in a calendar heatmap format.', diff --git a/server/src/controllers/user.controller.spec.ts b/server/src/controllers/user.controller.spec.ts index f512e2de39..d15eda31dc 100644 --- a/server/src/controllers/user.controller.spec.ts +++ b/server/src/controllers/user.controller.spec.ts @@ -3,7 +3,6 @@ import { LoggingRepository } from 'src/repositories/logging.repository'; import { UserService } from 'src/services/user.service'; import request from 'supertest'; import { errorDto } from 'test/medium/responses'; -import { factory } from 'test/small.factory'; import { automock, ControllerContext, controllerSetup, mockBaseService } from 'test/utils'; describe(UserController.name, () => { @@ -23,26 +22,7 @@ describe(UserController.name, () => { ctx.reset(); }); - describe('GET /users', () => { - it('should be an authenticated route', async () => { - await request(ctx.getHttpServer()).get('/users'); - expect(ctx.authenticate).toHaveBeenCalled(); - }); - }); - - describe('GET /users/me', () => { - it('should be an authenticated route', async () => { - await request(ctx.getHttpServer()).get('/users/me'); - expect(ctx.authenticate).toHaveBeenCalled(); - }); - }); - describe('PUT /users/me', () => { - it('should be an authenticated route', async () => { - await request(ctx.getHttpServer()).put('/users/me'); - expect(ctx.authenticate).toHaveBeenCalled(); - }); - for (const [key, message] of [ ['email', 'Invalid input: expected email, received object'], ['name', 'Invalid input: expected string, received null'], @@ -66,24 +46,31 @@ describe(UserController.name, () => { }); }); - describe('GET /users/:id', () => { - it('should be an authenticated route', async () => { - await request(ctx.getHttpServer()).get(`/users/${factory.uuid()}`); - expect(ctx.authenticate).toHaveBeenCalled(); + describe('PUT /users/me/preferences', () => { + it('should require an integer for download archive size', async () => { + const { status, body } = await request(ctx.getHttpServer()) + .put(`/users/me/preferences`) + .set('Authorization', `Bearer token`) + .send({ download: { archiveSize: 1_234_567.89 } }); + expect(status).toBe(400); + expect(body).toEqual( + errorDto.validationError([ + { path: ['download', 'archiveSize'], message: 'Invalid input: expected int, received number' }, + ]), + ); }); - }); - describe('PUT /users/me/license', () => { - it('should be an authenticated route', async () => { - await request(ctx.getHttpServer()).put('/users/me/license'); - expect(ctx.authenticate).toHaveBeenCalled(); - }); - }); - - describe('DELETE /users/me/license', () => { - it('should be an authenticated route', async () => { - await request(ctx.getHttpServer()).delete('/users/me/license'); - expect(ctx.authenticate).toHaveBeenCalled(); + it('should require a boolean for download include embedded videos', async () => { + const { status, body } = await request(ctx.getHttpServer()) + .put(`/users/me/preferences`) + .set('Authorization', `Bearer token`) + .send({ download: { includeEmbeddedVideos: 1_234_567.89 } }); + expect(status).toBe(400); + expect(body).toEqual( + errorDto.validationError([ + { path: ['download', 'includeEmbeddedVideos'], message: 'Invalid input: expected boolean, received number' }, + ]), + ); }); }); }); diff --git a/server/src/controllers/workflow.controller.spec.ts b/server/src/controllers/workflow.controller.spec.ts index ad0dc4982d..0b91667671 100644 --- a/server/src/controllers/workflow.controller.spec.ts +++ b/server/src/controllers/workflow.controller.spec.ts @@ -4,7 +4,6 @@ import { LoggingRepository } from 'src/repositories/logging.repository'; import { WorkflowService } from 'src/services/workflow.service'; import request from 'supertest'; import { errorDto } from 'test/medium/responses'; -import { factory } from 'test/small.factory'; import { automock, ControllerContext, controllerSetup, mockBaseService } from 'test/utils'; describe(WorkflowController.name, () => { @@ -25,11 +24,6 @@ describe(WorkflowController.name, () => { }); describe('POST /workflows', () => { - it('should be an authenticated route', async () => { - await request(ctx.getHttpServer()).post('/workflows').send({}); - expect(ctx.authenticate).toHaveBeenCalled(); - }); - it(`should require a valid trigger`, async () => { const { status, body } = await request(ctx.getHttpServer()) .post(`/workflows`) @@ -65,11 +59,6 @@ describe(WorkflowController.name, () => { }); describe('GET /workflows', () => { - it('should be an authenticated route', async () => { - await request(ctx.getHttpServer()).get('/workflows'); - expect(ctx.authenticate).toHaveBeenCalled(); - }); - it(`should require id to be a uuid`, async () => { const { status, body } = await request(ctx.getHttpServer()) .get(`/workflows`) @@ -81,11 +70,6 @@ describe(WorkflowController.name, () => { }); describe('GET /workflows/:id', () => { - it('should be an authenticated route', async () => { - await request(ctx.getHttpServer()).get(`/workflows/${factory.uuid()}`); - expect(ctx.authenticate).toHaveBeenCalled(); - }); - it(`should require id to be a uuid`, async () => { const { status, body } = await request(ctx.getHttpServer()) .get(`/workflows/invalid`) @@ -96,11 +80,6 @@ describe(WorkflowController.name, () => { }); describe('PATCH /workflows/:id', () => { - it('should be an authenticated route', async () => { - await request(ctx.getHttpServer()).patch(`/workflows/${factory.uuid()}`).send({}); - expect(ctx.authenticate).toHaveBeenCalled(); - }); - it(`should require id to be a uuid`, async () => { const { status, body } = await request(ctx.getHttpServer()) .patch(`/workflows/invalid`) diff --git a/server/src/controllers/workflow.controller.ts b/server/src/controllers/workflow.controller.ts index b8d9fd2b93..b0d025763e 100644 --- a/server/src/controllers/workflow.controller.ts +++ b/server/src/controllers/workflow.controller.ts @@ -4,6 +4,8 @@ import { Endpoint, HistoryBuilder } from 'src/decorators'; import { AuthDto } from 'src/dtos/auth.dto'; import { WorkflowCreateDto, + WorkflowGetLogsDto, + WorkflowLogEntryDto, WorkflowResponseDto, WorkflowSearchDto, WorkflowShareResponseDto, @@ -113,4 +115,19 @@ export class WorkflowController { deleteWorkflow(@Auth() auth: AuthDto, @Param() { id }: UUIDParamDto): Promise { return this.service.delete(auth, id); } + + @Get(':id/logs') + @Authenticated({ permission: Permission.WorkflowLogs }) + @Endpoint({ + summary: 'Retrieve workflow logs', + description: 'Retrieve logs of a workflows runs by ID', + history: HistoryBuilder.v3(), + }) + getWorkflowLogs( + @Auth() auth: AuthDto, + @Param() { id }: UUIDParamDto, + @Query() dto: WorkflowGetLogsDto, + ): Promise { + return this.service.getLogs(auth, id, dto); + } } diff --git a/server/src/cores/storage.core.ts b/server/src/cores/storage.core.ts index 6c7d6f0e3e..07b753f820 100644 --- a/server/src/cores/storage.core.ts +++ b/server/src/cores/storage.core.ts @@ -1,4 +1,3 @@ -import { randomUUID } from 'node:crypto'; import { dirname, join, resolve } from 'node:path'; import { StorageAsset } from 'src/database'; import { @@ -202,20 +201,20 @@ export class StorageCore { let move = await this.moveRepository.getByEntity(entityId, pathType); if (move) { this.logger.log(`Attempting to finish incomplete move: ${move.oldPath} => ${move.newPath}`); - const oldPathExists = await this.storageRepository.checkFileExists(move.oldPath); - const newPathExists = await this.storageRepository.checkFileExists(move.newPath); - const newPathCheck = newPathExists ? move.newPath : null; - const actualPath = oldPathExists ? move.oldPath : newPathCheck; + const isOldPathExists = await this.storageRepository.checkFileExists(move.oldPath); + const isNewPathExists = await this.storageRepository.checkFileExists(move.newPath); + const newPathCheck = isNewPathExists ? move.newPath : null; + const actualPath = isOldPathExists ? move.oldPath : newPathCheck; if (!actualPath) { this.logger.warn('Unable to complete move. File does not exist at either location.'); return; } - const fileAtNewLocation = actualPath === move.newPath; - this.logger.log(`Found file at ${fileAtNewLocation ? 'new' : 'old'} location`); + const isFileAtNewLocation = actualPath === move.newPath; + this.logger.log(`Found file at ${isFileAtNewLocation ? 'new' : 'old'} location`); if ( - fileAtNewLocation && + isFileAtNewLocation && !(await this.verifyNewPathContentsMatchesExpected(move.oldPath, move.newPath, assetInfo)) ) { this.logger.fatal( @@ -349,11 +348,7 @@ export class StorageCore { } static getNestedPath(folder: StorageFolder, ownerId: string, filename: string): string { - return join(this.getNestedFolder(folder, ownerId, filename), filename); - } - - static getTempPathInDir(dir: string): string { - return join(dir, `${randomUUID()}.tmp`); + return join(StorageCore.getNestedFolder(folder, ownerId, filename), filename); } private async getDevices() { diff --git a/server/src/database.ts b/server/src/database.ts index 1770b9d720..100ba451e7 100644 --- a/server/src/database.ts +++ b/server/src/database.ts @@ -304,6 +304,36 @@ export const columns = { 'asset.height', 'asset.isEdited', ], + searchAsset: [ + 'asset.id', + 'asset.updateId', + 'asset.createdAt', + 'asset.updatedAt', + 'asset.deletedAt', + 'asset.status', + 'asset.checksum', + 'asset.checksumAlgorithm', + 'asset.duplicateId', + 'asset.duration', + 'asset.fileCreatedAt', + 'asset.fileModifiedAt', + 'asset.isExternal', + 'asset.isFavorite', + 'asset.isOffline', + 'asset.isEdited', + 'asset.visibility', + 'asset.libraryId', + 'asset.livePhotoVideoId', + 'asset.localDateTime', + 'asset.originalFileName', + 'asset.originalPath', + 'asset.ownerId', + 'asset.stackId', + 'asset.thumbhash', + 'asset.type', + 'asset.width', + 'asset.height', + ], workflowAssetV1: [ 'asset.id', 'asset.ownerId', diff --git a/server/src/decorators.ts b/server/src/decorators.ts index 513ae36c9f..07398b0058 100644 --- a/server/src/decorators.ts +++ b/server/src/decorators.ts @@ -54,9 +54,8 @@ function chunks(collection: Array | Set, size: number): Array> result.push(chunk); } return result; - } else { - return _.chunk(collection, size); } + return _.chunk(collection, size); } /** @@ -82,11 +81,13 @@ export function Chunked( (Array.isArray(argument) && argument.length <= chunkSize) || (argument instanceof Set && argument.size <= chunkSize) ) { + // eslint-disable-next-line unicorn/no-this-outside-of-class return originalMethod.apply(this, arguments_); } return Promise.all( chunks(argument, chunkSize).map((chunk) => { + // eslint-disable-next-line unicorn/no-this-outside-of-class return Reflect.apply(originalMethod, this, [ ...arguments_.slice(0, parameterIndex), chunk, @@ -107,9 +108,11 @@ export function ChunkedSet(options?: { paramIndex?: number; chunkSize?: number } } const UUID = '00000000-0000-4000-a000-000000000000'; +const UUID_1 = '00000000-0000-4000-a000-000000000001'; export const DummyValue = { UUID, + UUID_1, UUID_SET: new Set([UUID]), PAGINATION: { take: 10, skip: 0 }, EMAIL: 'user@immich.app', @@ -190,11 +193,11 @@ type CustomExtensions = { }; enum ApiState { - 'Stable' = 'Stable', - 'Alpha' = 'Alpha', - 'Beta' = 'Beta', - 'Internal' = 'Internal', - 'Deprecated' = 'Deprecated', + Stable = 'Stable', + Alpha = 'Alpha', + Beta = 'Beta', + Internal = 'Internal', + Deprecated = 'Deprecated', } export class HistoryBuilder { private hasDeprecated = false; diff --git a/server/src/dtos/album.dto.ts b/server/src/dtos/album.dto.ts index a66f912972..1e3b3b6193 100644 --- a/server/src/dtos/album.dto.ts +++ b/server/src/dtos/album.dto.ts @@ -1,6 +1,7 @@ import { ShallowDehydrateObject } from 'kysely'; import { createZodDto } from 'nestjs-zod'; import { AlbumUser, AuthSharedLink } from 'src/database'; +import { HistoryBuilder } from 'src/decorators'; import { BulkIdErrorReasonSchema } from 'src/dtos/asset-ids.response.dto'; import { MapAsset } from 'src/dtos/asset-response.dto'; import { UserResponseSchema, mapUser } from 'src/dtos/user.dto'; @@ -33,7 +34,22 @@ const AlbumUserCreateSchema = z const CreateAlbumSchema = z .object({ albumName: z.string().describe('Album name'), - description: z.string().optional().describe('Album description'), + // TODO: drop the empty-string-to-null transform in v4 (clients should send null) + description: z + .string() + .nullable() + .transform((value) => (value === '' ? null : value)) + .optional() + .describe('Album description') + .meta({ + ...new HistoryBuilder() + .added('v1') + .updated( + 'v3', + 'Sending an empty string is deprecated; send null instead. Empty strings will no longer be coerced to null in v4.', + ) + .getExtensions(), + }), albumUsers: z.array(AlbumUserCreateSchema).optional().describe('Album users'), assetIds: z.array(z.uuidv4()).optional().describe('Initial asset IDs'), }) @@ -56,7 +72,22 @@ const AlbumsAddAssetsResponseSchema = z const UpdateAlbumSchema = z .object({ albumName: z.string().optional().describe('Album name'), - description: z.string().optional().describe('Album description'), + // TODO: drop the empty-string-to-null transform in v4 (clients should send null) + description: z + .string() + .nullable() + .transform((value) => (value === '' ? null : value)) + .optional() + .describe('Album description') + .meta({ + ...new HistoryBuilder() + .added('v1') + .updated( + 'v3', + 'Sending an empty string is deprecated; send null instead. Empty strings will no longer be coerced to null in v4.', + ) + .getExtensions(), + }), albumThumbnailAssetId: z.uuidv4().optional().describe('Album thumbnail asset ID'), isActivityEnabled: z.boolean().optional().describe('Enable activity feed'), order: AssetOrderSchema.optional(), @@ -109,7 +140,18 @@ export const AlbumResponseSchema = z .object({ id: z.uuidv4().describe('Album ID'), albumName: z.string().describe('Album name'), - description: z.string().describe('Album description'), + description: z + .string() + .describe('Album description') + .meta({ + ...new HistoryBuilder() + .added('v1') + .updated( + 'v3', + 'An empty string is returned instead of null for backwards compatibility; null will be returned in v4.', + ) + .getExtensions(), + }), // TODO: use `isoDatetimeToDate` when using `ZodSerializerDto` on the controllers. createdAt: z.string().meta({ format: 'date-time' }).describe('Creation date'), // TODO: use `isoDatetimeToDate` when using `ZodSerializerDto` on the controllers. @@ -140,6 +182,19 @@ export const AlbumResponseSchema = z }) .meta({ id: 'AlbumResponseDto' }); +const AlbumUserParamSchema = z.object({ + id: z.uuidv4().describe('Album ID'), + // TODO: disallow 'me' as a shortcut in v4 and type userId as uuidv4 + userId: z + .string() + .refine((value) => value === 'me' || z.uuidv4().safeParse(value).success, { + error: 'Must be a UUID v4 or "me"', + }) + .describe('Album user ID, or "me" to reference the current user.') + .meta(new HistoryBuilder().updated('v3', '"me" as a value is deprecated').getExtensions()), +}); + +export class AlbumUserParamDto extends createZodDto(AlbumUserParamSchema) {} export class AddUsersDto extends createZodDto(AddUsersSchema) {} export class AlbumUserCreateDto extends createZodDto(AlbumUserCreateSchema) {} export class CreateAlbumDto extends createZodDto(CreateAlbumSchema) {} @@ -157,7 +212,7 @@ export type MapAlbumDto = { assets?: ShallowDehydrateObject[]; sharedLinks?: ShallowDehydrateObject[]; albumName: string; - description: string; + description: string | null; albumThumbnailAssetId: string | null; createdAt: Date; updatedAt: Date; @@ -193,7 +248,8 @@ export const mapAlbum = (entity: MaybeDehydrated): AlbumResponseDto return { albumName: entity.albumName, - description: entity.description, + // TODO: return null instead of '' in v4 + description: entity.description ?? '', albumThumbnailAssetId: entity.albumThumbnailAssetId, createdAt: asDateTimeString(entity.createdAt), updatedAt: asDateTimeString(entity.updatedAt), diff --git a/server/src/dtos/asset-response.dto.ts b/server/src/dtos/asset-response.dto.ts index ba64286647..c54ce1cbab 100644 --- a/server/src/dtos/asset-response.dto.ts +++ b/server/src/dtos/asset-response.dto.ts @@ -175,7 +175,7 @@ const peopleFromFaces = (faces?: MaybeDehydrated[]): PersonResponseDt } } - return [...peopleMap.values()]; + return peopleMap.values().toArray(); }; const mapStack = (entity: { stack?: Stack | null }) => { diff --git a/server/src/dtos/json-schema.dto.ts b/server/src/dtos/json-schema.dto.ts index 81b14ad62a..7811a08ecf 100644 --- a/server/src/dtos/json-schema.dto.ts +++ b/server/src/dtos/json-schema.dto.ts @@ -12,6 +12,9 @@ const JsonSchemaPropertySchema = z description: z.string().describe('Description'), default: z.any().optional().describe('Default value'), enum: z.array(z.string()).optional().describe('Valid choices for enum types'), + minimum: z.number().optional().describe('Minimum value for number types'), + maximum: z.number().optional().describe('Maximum value for number types'), + precision: z.number().default(1).optional().describe('Smallest interval (granularity) for number types'), array: z.boolean().optional().describe('Type is an array type'), required: z.array(z.string()).optional().describe('A list of required properties'), uiHint: z diff --git a/server/src/dtos/library.dto.ts b/server/src/dtos/library.dto.ts index 0819be278e..906a6e6635 100644 --- a/server/src/dtos/library.dto.ts +++ b/server/src/dtos/library.dto.ts @@ -92,10 +92,7 @@ export class LibraryResponseDto extends createZodDto(LibraryResponseSchema) {} export class LibraryStatsResponseDto extends createZodDto(LibraryStatsResponseSchema) {} export function mapLibrary(entity: Library): LibraryResponseDto { - let assetCount = 0; - if (entity.assets) { - assetCount = entity.assets.length; - } + const assetCount = entity.assets ? entity.assets.length : 0; return { id: entity.id, ownerId: entity.ownerId, diff --git a/server/src/dtos/memory.dto.ts b/server/src/dtos/memory.dto.ts index 324474a1e1..7e2bdf0df8 100644 --- a/server/src/dtos/memory.dto.ts +++ b/server/src/dtos/memory.dto.ts @@ -4,13 +4,13 @@ import { HistoryBuilder } from 'src/decorators'; import { AssetResponseSchema, mapAsset } from 'src/dtos/asset-response.dto'; import { AuthDto } from 'src/dtos/auth.dto'; import { AssetOrderWithRandomSchema, MemoryType, MemoryTypeSchema } from 'src/enum'; -import { isoDatetimeToDate, nonEmptyPartial, stringToBool } from 'src/validation'; +import { isoDatetimeToDate, isoDateToDate, nonEmptyPartial, stringToBool } from 'src/validation'; import z from 'zod'; const MemorySearchSchema = z .object({ type: MemoryTypeSchema.optional(), - for: isoDatetimeToDate.optional().describe('Filter by date'), + for: isoDateToDate.optional().describe('Filter by date'), isTrashed: stringToBool.optional().describe('Include trashed memories'), isSaved: stringToBool.optional().describe('Filter by saved status'), size: z.coerce.number().int().min(1).optional().describe('Number of memories to return'), diff --git a/server/src/dtos/search.dto.ts b/server/src/dtos/search.dto.ts index ec4d58dae3..7911f92f44 100644 --- a/server/src/dtos/search.dto.ts +++ b/server/src/dtos/search.dto.ts @@ -3,8 +3,15 @@ import { Place } from 'src/database'; import { HistoryBuilder } from 'src/decorators'; import { AlbumResponseSchema } from 'src/dtos/album.dto'; import { AssetResponseSchema } from 'src/dtos/asset-response.dto'; -import { AssetOrder, AssetOrderSchema, AssetTypeSchema, AssetVisibilitySchema } from 'src/enum'; -import { isoDatetimeToDate, stringToBool } from 'src/validation'; +import { + AssetOrder, + AssetOrderSchema, + AssetTypeSchema, + AssetVisibilitySchema, + SearchOrderField, + SearchOrderFieldSchema, +} from 'src/enum'; +import { isoDatetimeToDate, nonEmptyPartial, stringToBool } from 'src/validation'; import z from 'zod'; const BaseSearchSchema = z.object({ @@ -142,6 +149,176 @@ const SearchSuggestionRequestSchema = z }) .meta({ id: 'SearchSuggestionRequestDto' }); +const IdFilterSchema = nonEmptyPartial({ + eq: z.uuidv4(), + ne: z.uuidv4(), +}).meta({ id: 'IdFilter' }); + +const IdFilterNullableSchema = nonEmptyPartial({ + eq: z.uuidv4().nullable(), + ne: z.uuidv4().nullable(), +}).meta({ id: 'IdFilterNullable' }); + +const IdsFilterSchema = nonEmptyPartial({ + any: z.array(z.uuidv4()).min(1), + all: z.array(z.uuidv4()).min(1), + none: z.array(z.uuidv4()).min(1), +}).meta({ id: 'IdsFilter' }); + +const stringListShape = { + in: z.array(z.string()).min(1), + notIn: z.array(z.string()).min(1), +}; + +const StringFilterSchema = nonEmptyPartial({ + eq: z.string(), + ne: z.string(), + ...stringListShape, +}).meta({ id: 'StringFilter' }); + +const stringNullableShape = { + eq: z.string().nullable(), + ne: z.string().nullable(), + ...stringListShape, +}; + +const StringFilterNullableSchema = nonEmptyPartial(stringNullableShape).meta({ id: 'StringFilterNullable' }); + +const StringPatternFilterSchema = nonEmptyPartial({ + ...stringNullableShape, + like: z.string().min(1), + notLike: z.string().min(1), + startsWith: z.string().min(1), + endsWith: z.string().min(1), +}).meta({ id: 'StringPatternFilter' }); + +const numberRangeShape = { + lt: z.number(), + lte: z.number(), + gt: z.number(), + gte: z.number(), + in: z.array(z.number()).min(1), + notIn: z.array(z.number()).min(1), +}; + +const NumberFilterSchema = nonEmptyPartial({ + eq: z.number(), + ne: z.number(), + ...numberRangeShape, +}).meta({ id: 'NumberFilter' }); + +const NumberFilterNullableSchema = nonEmptyPartial({ + eq: z.number().nullable(), + ne: z.number().nullable(), + ...numberRangeShape, +}).meta({ id: 'NumberFilterNullable' }); + +const dateRangeShape = { + gt: isoDatetimeToDate, + gte: isoDatetimeToDate, + lt: isoDatetimeToDate, + lte: isoDatetimeToDate, +}; + +const DateFilterSchema = nonEmptyPartial({ + eq: isoDatetimeToDate, + ne: isoDatetimeToDate, + ...dateRangeShape, +}).meta({ id: 'DateFilter' }); + +const DateFilterNullableSchema = nonEmptyPartial({ + eq: isoDatetimeToDate.nullable(), + ne: isoDatetimeToDate.nullable(), + ...dateRangeShape, +}).meta({ id: 'DateFilterNullable' }); + +const BoolFilterSchema = z.object({ eq: z.boolean() }).meta({ id: 'BoolFilter' }); + +const enumFilterSchema = (values: z.ZodEnum, id: string) => + nonEmptyPartial({ + eq: values, + ne: values, + in: z.array(values).min(1), + notIn: z.array(values).min(1), + }).meta({ id }); + +const EnumFilterAssetTypeSchema = enumFilterSchema(AssetTypeSchema, 'EnumFilterAssetType'); +const EnumFilterAssetVisibilitySchema = enumFilterSchema(AssetVisibilitySchema, 'EnumFilterAssetVisibility'); + +const StringSimilarityFilterSchema = z + .object({ + matches: z.string().min(1), + }) + .meta({ id: 'StringSimilarityFilter' }); + +export const DEFAULT_SEARCH_ORDER = { + field: SearchOrderField.FileCreatedAt, + direction: AssetOrder.Desc, +}; + +export const SearchOrderSchema = z + .object({ + field: SearchOrderFieldSchema.default(DEFAULT_SEARCH_ORDER.field), + direction: AssetOrderSchema.default(DEFAULT_SEARCH_ORDER.direction), + }) + .meta({ id: 'SearchOrder' }); + +const SearchFilterBranchSchema = z + .object({ + id: IdFilterSchema, + libraryId: IdFilterNullableSchema, + type: EnumFilterAssetTypeSchema, + visibility: EnumFilterAssetVisibilitySchema, + isFavorite: BoolFilterSchema, + isMotion: BoolFilterSchema, + isOffline: BoolFilterSchema, + isEncoded: BoolFilterSchema, + hasAlbums: BoolFilterSchema, + hasPeople: BoolFilterSchema, + hasTags: BoolFilterSchema, + city: StringFilterNullableSchema, + state: StringFilterNullableSchema, + country: StringFilterNullableSchema, + make: StringFilterNullableSchema, + model: StringFilterNullableSchema, + lensModel: StringFilterNullableSchema, + description: StringPatternFilterSchema, + originalFileName: StringPatternFilterSchema, + originalPath: StringPatternFilterSchema, + ocr: StringSimilarityFilterSchema, + rating: NumberFilterNullableSchema, + fileSizeInBytes: NumberFilterSchema, + takenAt: DateFilterSchema, + createdAt: DateFilterSchema, + updatedAt: DateFilterSchema, + trashedAt: DateFilterNullableSchema, + personIds: IdsFilterSchema, + tagIds: IdsFilterSchema, + albumIds: IdsFilterSchema, + checksum: StringFilterSchema, + encodedVideoPath: StringFilterSchema, + }) + .partial() + .meta({ id: 'SearchFilterBranch' }); + +export const SearchFilterSchema = SearchFilterBranchSchema.extend({ + or: z.array(SearchFilterBranchSchema).min(1).optional(), +}).meta({ id: 'SearchFilter' }); + +export type IdFilter = z.infer; +export type IdFilterNullable = z.infer; +export type IdsFilter = z.infer; +export type StringFilter = z.infer; +export type StringFilterNullable = z.infer; +export type StringPatternFilter = z.infer; +export type NumberFilter = z.infer; +export type NumberFilterNullable = z.infer; +export type DateFilter = z.infer; +export type DateFilterNullable = z.infer; +export type SearchOrder = z.infer; +export type SearchFilter = z.infer; +export type SearchFilterBranch = z.infer; + export class RandomSearchDto extends createZodDto(RandomSearchSchema) {} export class LargeAssetSearchDto extends createZodDto(LargeAssetSearchSchema) {} export class MetadataSearchDto extends createZodDto(MetadataSearchSchema) {} diff --git a/server/src/dtos/shared-link.dto.ts b/server/src/dtos/shared-link.dto.ts index 6763f6ab74..d22875f286 100644 --- a/server/src/dtos/shared-link.dto.ts +++ b/server/src/dtos/shared-link.dto.ts @@ -3,7 +3,7 @@ import { SharedLink } from 'src/database'; import { HistoryBuilder } from 'src/decorators'; import { AlbumResponseSchema, mapAlbum } from 'src/dtos/album.dto'; import { AssetResponseSchema, mapAsset } from 'src/dtos/asset-response.dto'; -import { SharedLinkTypeSchema } from 'src/enum'; +import { SharedLinkType, SharedLinkTypeSchema } from 'src/enum'; import { isoDatetimeToDate } from 'src/validation'; import z from 'zod'; @@ -31,6 +31,29 @@ const SharedLinkCreateSchema = z allowDownload: z.boolean().default(true).optional().describe('Allow downloads'), showMetadata: z.boolean().default(true).optional().describe('Show metadata'), }) + .superRefine(({ type, albumId, assetIds }, ctx) => { + switch (type) { + case SharedLinkType.Album: { + if (!albumId) { + ctx.addIssue(`albumId is required for type ${SharedLinkType.Album}`); + } + if (assetIds) { + ctx.addIssue(`assetIds can only be used with type ${SharedLinkType.Individual}`); + } + return; + } + case SharedLinkType.Individual: { + if (!assetIds || assetIds.length === 0) { + ctx.addIssue(`assetIds are required for type ${SharedLinkType.Individual}`); + } + + if (albumId) { + ctx.addIssue(`albumId can only be used with type ${SharedLinkType.Album}`); + } + return; + } + } + }) .meta({ id: 'SharedLinkCreateDto' }); const SharedLinkEditSchema = z diff --git a/server/src/dtos/system-config.dto.ts b/server/src/dtos/system-config.dto.ts index 85618723b2..a50b7abe87 100644 --- a/server/src/dtos/system-config.dto.ts +++ b/server/src/dtos/system-config.dto.ts @@ -11,6 +11,7 @@ import { AudioCodecSchema, ColorspaceSchema, CQModeSchema, + HlsVideoResolutionSchema, ImageFormatSchema, LogLevelSchema, OAuthTokenEndpointAuthMethodSchema, @@ -73,7 +74,12 @@ const SystemConfigIntegrityJobSchema = z const SystemConfigIntegrityChecksumJobSchema = SystemConfigIntegrityJobSchema.extend({ timeLimit: z.int().nonnegative().describe('How long the integrity checksum job may run for'), - percentageLimit: z.int().nonnegative().describe('Percentage limit of the integrity checksum job'), + percentageLimit: z + .float32() + .nonnegative() + .max(1) + .describe('Percentage limit of the integrity checksum job') + .meta({ format: 'double' }), }) .describe('Integrity checksum job config') .meta({ id: 'SystemConfigIntegrityChecksumJob' }); @@ -115,6 +121,8 @@ const SystemConfigFFmpegSchema = z realtime: z .object({ enabled: configBool.describe('Enable real-time HLS transcoding (alpha)'), + videoCodecs: z.array(VideoCodecSchema).describe('Video codecs to use for real-time HLS transcoding'), + resolutions: z.array(HlsVideoResolutionSchema).describe('Resolutions to use for real-time HLS transcoding'), }) .meta({ id: 'SystemConfigFFmpegRealtimeDto' }), }) diff --git a/server/src/dtos/user-preferences.dto.ts b/server/src/dtos/user-preferences.dto.ts index b8894e4d51..adaa37d1ac 100644 --- a/server/src/dtos/user-preferences.dto.ts +++ b/server/src/dtos/user-preferences.dto.ts @@ -98,6 +98,13 @@ const CastUpdateSchema = z .optional() .meta({ id: 'CastUpdate' }); +const RecentlyAddedUpdateSchema = z + .object({ + sidebarWeb: z.boolean().optional().describe('Whether the recently added page appears in the web sidebar'), + }) + .optional() + .meta({ id: 'RecentlyAddedUpdate' }); + const UserPreferencesUpdateSchema = z .object({ albums: AlbumsUpdateSchema, @@ -112,6 +119,7 @@ const UserPreferencesUpdateSchema = z ratings: RatingsUpdateSchema, sharedLinks: SharedLinksUpdateSchema, tags: TagsUpdateSchema, + recentlyAdded: RecentlyAddedUpdateSchema, }) .meta({ id: 'UserPreferencesUpdateDto' }); @@ -191,6 +199,12 @@ const CastResponseSchema = z }) .meta({ id: 'CastResponse' }); +const RecentlyAddedResponseSchema = z + .object({ + sidebarWeb: z.boolean().describe('Whether the recently added page appears in the web sidebar'), + }) + .meta({ id: 'RecentlyAddedResponse' }); + const UserPreferencesResponseSchema = z .object({ albums: AlbumsResponseSchema, @@ -204,6 +218,7 @@ const UserPreferencesResponseSchema = z download: DownloadResponseSchema, purchase: PurchaseResponseSchema, cast: CastResponseSchema, + recentlyAdded: RecentlyAddedResponseSchema, }) .meta({ id: 'UserPreferencesResponseDto' }); diff --git a/server/src/dtos/workflow.dto.ts b/server/src/dtos/workflow.dto.ts index b4269ea0c9..990cae79a1 100644 --- a/server/src/dtos/workflow.dto.ts +++ b/server/src/dtos/workflow.dto.ts @@ -1,6 +1,7 @@ import type { WorkflowStepConfig, WorkflowTrigger } from '@immich/plugin-sdk'; import { createZodDto } from 'nestjs-zod'; -import { WorkflowTriggerSchema, WorkflowTypeSchema } from 'src/enum'; +import { WorkflowResultSchema, WorkflowTriggerSchema, WorkflowTypeSchema } from 'src/enum'; +import { isoDatetimeToDate } from 'src/validation'; import z from 'zod'; const WorkflowTriggerResponseSchema = z @@ -17,6 +18,7 @@ const WorkflowSearchSchema = z name: z.string().optional().describe('Workflow name'), description: z.string().optional().describe('Workflow description'), enabled: z.boolean().optional().describe('Workflow enabled'), + logging: z.boolean().optional().describe('Workflow logs run results'), }) .meta({ id: 'WorkflowSearchDto' }); @@ -42,6 +44,7 @@ const WorkflowCreateSchema = z name: z.string().nullable().optional().describe('Workflow name'), description: z.string().nullable().optional().describe('Workflow description'), enabled: z.boolean().optional().describe('Workflow enabled'), + logging: z.boolean().optional().describe('Workflow logs run results'), steps: z.array(WorkflowStepSchema).optional(), }) .meta({ id: 'WorkflowCreateDto' }); @@ -52,6 +55,7 @@ const WorkflowUpdateSchema = z name: z.string().nullable().optional().describe('Workflow name'), description: z.string().nullable().optional().describe('Workflow description'), enabled: z.boolean().optional().describe('Workflow enabled'), + logging: z.boolean().optional().describe('Workflow logs run results'), steps: z.array(WorkflowStepSchema).optional(), }) .meta({ id: 'WorkflowUpdateDto' }); @@ -65,6 +69,7 @@ const WorkflowResponseSchema = z createdAt: z.string().describe('Creation date'), updatedAt: z.string().describe('Update date'), enabled: z.boolean().describe('Workflow enabled'), + logging: z.boolean().describe('Workflow logs run results'), steps: z.array(WorkflowStepSchema).describe('Workflow steps'), }) .meta({ id: 'WorkflowResponseDto' }); @@ -78,12 +83,36 @@ const WorkflowShareResponseSchema = z }) .meta({ id: 'WorkflowShareResponseDto' }); +const WorkflowLogEntrySchema = z + .object({ + id: z.uuidv4().describe('Workflow log entry ID'), + at: isoDatetimeToDate.describe('Workflow run date/time'), + result: WorkflowResultSchema.describe('Workflow run result'), + triggerDataId: z.uuid().optional().describe('Workflow trigger data ID'), + lastStep: z + .object({ + method: z.string().describe('Method of the step'), + index: z.int().positive().describe('Index of the step in the workflow'), + }) + .optional() + .describe('Last step ran, if the workflow ended early'), + }) + .meta({ id: 'WorkflowLogEntryDto' }); + +const WorkflowGetLogsSchema = z.object({ + result: WorkflowResultSchema.optional().describe('Filter by run result'), + before: isoDatetimeToDate.optional().describe('Filter by runs before a date/time'), + limit: z.coerce.number().int().positive().default(50).describe('Maximum number of logs'), +}); + export class WorkflowTriggerResponseDto extends createZodDto(WorkflowTriggerResponseSchema) {} export class WorkflowSearchDto extends createZodDto(WorkflowSearchSchema) {} export class WorkflowCreateDto extends createZodDto(WorkflowCreateSchema) {} export class WorkflowUpdateDto extends createZodDto(WorkflowUpdateSchema) {} export class WorkflowResponseDto extends createZodDto(WorkflowResponseSchema) {} export class WorkflowShareResponseDto extends createZodDto(WorkflowShareResponseSchema) {} +export class WorkflowLogEntryDto extends createZodDto(WorkflowLogEntrySchema) {} +export class WorkflowGetLogsDto extends createZodDto(WorkflowGetLogsSchema) {} type Workflow = { id: string; @@ -93,6 +122,7 @@ type Workflow = { name: string | null; description: string | null; enabled: boolean; + logging: boolean; }; type WorkflowStep = { @@ -107,6 +137,7 @@ export const mapWorkflow = (workflow: Workflow & { steps: WorkflowStep[] }): Wor id: workflow.id, enabled: workflow.enabled, trigger: workflow.trigger, + logging: workflow.logging, name: workflow.name, description: workflow.description, createdAt: workflow.createdAt.toISOString(), diff --git a/server/src/enum.ts b/server/src/enum.ts index 491beca10b..e88a9a667c 100644 --- a/server/src/enum.ts +++ b/server/src/enum.ts @@ -298,6 +298,7 @@ export enum Permission { WorkflowRead = 'workflow.read', WorkflowUpdate = 'workflow.update', WorkflowDelete = 'workflow.delete', + WorkflowLogs = 'workflow.logs', AdminUserCreate = 'adminUser.create', AdminUserRead = 'adminUser.read', @@ -529,6 +530,19 @@ export enum CQMode { export const CQModeSchema = z.enum(CQMode).describe('CQ mode').meta({ id: 'CQMode' }); +export enum HlsVideoResolution { + p480 = 480, + p720 = 720, + p1080 = 1080, + p1440 = 1440, + p2160 = 2160, +} + +export const HlsVideoResolutionSchema = z + .enum(HlsVideoResolution) + .describe('HLS video resolution') + .meta({ id: 'HlsVideoResolution', type: 'integer' }); + export enum Colorspace { Srgb = 'srgb', P3 = 'p3', @@ -1197,14 +1211,6 @@ export enum ApiTag { Workflows = 'Workflows', } -export enum PluginContext { - Asset = 'asset', - Album = 'album', - Person = 'person', -} - -export const PluginContextSchema = z.enum(PluginContext).describe('Plugin context').meta({ id: 'PluginContextType' }); - export const WorkflowTriggerSchema = z .enum(WorkflowTrigger) .describe('Plugin trigger type') @@ -1221,3 +1227,23 @@ export enum CalendarHeatmapType { Upload = 'Upload', Taken = 'Taken', } + +export enum WorkflowResult { + Completed = 'completed', + Halted = 'halted', + Error = 'error', +} + +export const WorkflowResultSchema = z + .enum(WorkflowResult) + .describe('Workflow run result') + .meta({ id: 'WorkflowResult' }); + +export enum SearchOrderField { + FileCreatedAt = 'fileCreatedAt', + LocalDateTime = 'localDateTime', + FileSizeInBytes = 'fileSizeInBytes', + Rating = 'rating', +} + +export const SearchOrderFieldSchema = z.enum(SearchOrderField).meta({ id: 'SearchOrderField' }); diff --git a/server/src/main.ts b/server/src/main.ts index f2491f07bc..5876d2fe58 100644 --- a/server/src/main.ts +++ b/server/src/main.ts @@ -68,9 +68,9 @@ class Workers { const { database } = new ConfigRepository().getEnv(); const kysely = new Kysely(getKyselyConfig(database.config)); - let locked = false; - while (!locked) { - locked = await kysely.connection().execute(async (conn) => { + let isLocked = false; + while (!isLocked) { + isLocked = await kysely.connection().execute(async (conn) => { const { rows } = await sql<{ pg_try_advisory_lock: boolean; }>`SELECT pg_try_advisory_lock(${DatabaseLock.MaintenanceOperation})`.execute(conn); @@ -110,6 +110,7 @@ class Workers { }); kill = (signal) => void worker.kill(signal); + // eslint-disable-next-line unicorn/prefer-hoisting-branch-code anyWorker = worker; } else { const worker = new Worker(workerFile); @@ -151,9 +152,9 @@ class Workers { if (exitCode !== 0) { console.error(`${name} worker exited with code ${exitCode}`); - if (this.workers[ImmichWorker.Api] && name !== ImmichWorker.Api) { + if (Object.hasOwn(this.workers, ImmichWorker.Api) && name !== ImmichWorker.Api) { console.error('Killing api process'); - void this.workers[ImmichWorker.Api].kill('SIGTERM'); + void this.workers[ImmichWorker.Api]!.kill('SIGTERM'); } } diff --git a/server/src/maintenance/maintenance-auth.guard.ts b/server/src/maintenance/maintenance-auth.guard.ts index 08aaad516b..e2c472ff71 100644 --- a/server/src/maintenance/maintenance-auth.guard.ts +++ b/server/src/maintenance/maintenance-auth.guard.ts @@ -1,11 +1,4 @@ -import { - CanActivate, - ExecutionContext, - Injectable, - SetMetadata, - applyDecorators, - createParamDecorator, -} from '@nestjs/common'; +import { CanActivate, ExecutionContext, Injectable, SetMetadata, applyDecorators } from '@nestjs/common'; import { Reflector } from '@nestjs/core'; import { Request } from 'express'; import { MaintenanceAuthDto } from 'src/dtos/maintenance.dto'; @@ -22,14 +15,6 @@ export interface MaintenanceAuthRequest extends Request { auth?: MaintenanceAuthDto; } -export interface MaintenanceAuthenticatedRequest extends Request { - auth: MaintenanceAuthDto; -} - -export const MaintenanceAuth = createParamDecorator((data, context: ExecutionContext): MaintenanceAuthDto => { - return context.switchToHttp().getRequest().auth; -}); - @Injectable() export class MaintenanceAuthGuard implements CanActivate { constructor( diff --git a/server/src/maintenance/maintenance-health.repository.ts b/server/src/maintenance/maintenance-health.repository.ts index c76cc23b1c..9253892041 100644 --- a/server/src/maintenance/maintenance-health.repository.ts +++ b/server/src/maintenance/maintenance-health.repository.ts @@ -42,10 +42,12 @@ export class MaintenanceHealthRepository { worker.on('error', (error) => reject(new Error(`Server health check failed, process threw: ${error}`))); setTimeout(() => { - if (worker.exitCode === null) { - reject(new Error('Server health check failed, took too long to start.')); - worker.kill('SIGTERM'); + if (worker.exitCode !== null) { + return; } + + reject(new Error('Server health check failed, took too long to start.')); + worker.kill('SIGTERM'); }, 180_000); }); } diff --git a/server/src/maintenance/maintenance-worker.service.ts b/server/src/maintenance/maintenance-worker.service.ts index f2c9086e87..f088637a57 100644 --- a/server/src/maintenance/maintenance-worker.service.ts +++ b/server/src/maintenance/maintenance-worker.service.ts @@ -171,8 +171,8 @@ export class MaintenanceWorkerService { const candidates = ['/data', '/usr/src/app/upload']; for (const candidate of candidates) { - const exists = this.storageRepository.existsSync(candidate); - if (exists) { + const isExists = this.storageRepository.existsSync(candidate); + if (isExists) { targets.push(candidate); } } @@ -295,8 +295,8 @@ export class MaintenanceWorkerService { } async runRestoreDatabase(action: SetMaintenanceModeDto) { - const lock = await this.databaseRepository.tryLock(DatabaseLock.MaintenanceOperation); - if (!lock) { + const isLock = await this.databaseRepository.tryLock(DatabaseLock.MaintenanceOperation); + if (!isLock) { return; } diff --git a/server/src/middleware/auth.guard.spec.ts b/server/src/middleware/auth.guard.spec.ts new file mode 100644 index 0000000000..5b094c03c1 --- /dev/null +++ b/server/src/middleware/auth.guard.spec.ts @@ -0,0 +1,82 @@ +import { ExecutionContext } from '@nestjs/common'; +import { Reflector } from '@nestjs/core'; +import { Authenticated, AuthGuard } from 'src/middleware/auth.guard'; +import { LoggingRepository } from 'src/repositories/logging.repository'; +import { AuthService } from 'src/services/auth.service'; +import { mockEnvData } from 'test/repositories/config.repository.mock'; +import { newTestService, ServiceMocks } from 'test/utils'; + +class TestController { + @Authenticated({ public: true, setup: true }) + setupRoute() {} + + @Authenticated({ public: true }) + publicRoute() {} + + undecoratedRoute() {} +} + +const contextFor = (handler: () => void) => + ({ + getHandler: () => handler, + switchToHttp: () => ({ getRequest: () => ({ headers: {}, query: {}, path: '/' }) }), + }) as unknown as ExecutionContext; + +describe(AuthGuard.name, () => { + let sut: AuthGuard; + let authService: AuthService; + let mocks: ServiceMocks; + + beforeEach(() => { + ({ sut: authService, mocks } = newTestService(AuthService)); + sut = new AuthGuard(mocks.logger as unknown as LoggingRepository, new Reflector(), authService); + }); + + describe('setup routes', () => { + it('should allow access while the server is awaiting its first admin', async () => { + mocks.user.hasAdmin.mockResolvedValue(false); + const authenticate = vitest.spyOn(authService, 'authenticate'); + + await expect(sut.canActivate(contextFor(TestController.prototype.setupRoute))).resolves.toBe(true); + + expect(authenticate).not.toHaveBeenCalled(); + }); + + it('should reject when setup is disabled', async () => { + mocks.config.getEnv.mockReturnValue(mockEnvData({ setup: { allow: false } })); + mocks.user.hasAdmin.mockResolvedValue(false); + + await expect(sut.canActivate(contextFor(TestController.prototype.setupRoute))).rejects.toThrowError( + 'Admin setup is not available', + ); + }); + + it('should reject when the server already has an admin', async () => { + mocks.user.hasAdmin.mockResolvedValue(true); + + await expect(sut.canActivate(contextFor(TestController.prototype.setupRoute))).rejects.toThrowError( + 'Admin setup is not available', + ); + }); + }); + + describe('public routes', () => { + it('should not require setup availability', async () => { + mocks.user.hasAdmin.mockResolvedValue(true); + + await expect(sut.canActivate(contextFor(TestController.prototype.publicRoute))).resolves.toBe(true); + }); + }); + + describe('undecorated routes', () => { + it('should be rejected', async () => { + const authenticate = vitest.spyOn(authService, 'authenticate'); + + await expect(sut.canActivate(contextFor(TestController.prototype.undecoratedRoute))).rejects.toThrowError( + 'does not declare @Authenticated()', + ); + + expect(authenticate).not.toHaveBeenCalled(); + }); + }); +}); diff --git a/server/src/middleware/auth.guard.ts b/server/src/middleware/auth.guard.ts index 4964fefbbc..93bcfe26e7 100644 --- a/server/src/middleware/auth.guard.ts +++ b/server/src/middleware/auth.guard.ts @@ -17,15 +17,26 @@ import { getUserAgentDetails } from 'src/utils/request'; type AdminRoute = { admin?: true }; type SharedLinkRoute = { sharedLink?: true }; -type AuthenticatedOptions = { permission?: Permission | false } & (AdminRoute | SharedLinkRoute); +type AuthorizedRoute = { permission?: Permission | false; public?: never; setup?: never } & ( + AdminRoute | SharedLinkRoute +); +type PublicRoute = { public: true; setup?: true; permission?: never; admin?: never; sharedLink?: never }; +export type AuthenticatedOptions = AuthorizedRoute | PublicRoute; + +type ReflectorTarget = Parameters[1]; + +/** Resolves the `@Authenticated()` options of a route handler, with the defaults applied. */ +export const getAuthenticatedOptions = (reflector: Reflector, target: ReflectorTarget) => { + const options = reflector.getAllAndOverride(MetadataKey.AuthRoute, [target]); + return options && { sharedLink: false, admin: false, public: false, setup: false, ...options }; +}; export const Authenticated = (options: AuthenticatedOptions = {}): MethodDecorator => { - const decorators: MethodDecorator[] = [ - ApiBearerAuth(), - ApiCookieAuth(), - ApiSecurity(MetadataKey.ApiKeySecurity), - SetMetadata(MetadataKey.AuthRoute, options), - ]; + const decorators: MethodDecorator[] = [SetMetadata(MetadataKey.AuthRoute, options)]; + + if (!options.public) { + decorators.push(ApiBearerAuth(), ApiCookieAuth(), ApiSecurity(MetadataKey.ApiKeySecurity)); + } if ((options as AdminRoute).admin) { decorators.push(ApiExtension(ApiCustomExtension.AdminOnly, true)); @@ -86,17 +97,20 @@ export class AuthGuard implements CanActivate { } async canActivate(context: ExecutionContext): Promise { - const targets = [context.getHandler()]; - const options = this.reflector.getAllAndOverride(MetadataKey.AuthRoute, targets); + const options = getAuthenticatedOptions(this.reflector, context.getHandler()); if (!options) { + throw new Error(`Route ${context.getHandler().name} does not declare @Authenticated()`); + } + + if (options.setup) { + await this.authService.requireSetupAvailable(); + } + + if (options.public) { return true; } - const { - admin: adminRoute, - sharedLink: sharedLinkRoute, - permission, - } = { sharedLink: false, admin: false, ...options }; + const { admin: adminRoute, sharedLink: sharedLinkRoute, permission } = options; const request = context.switchToHttp().getRequest(); request.user = await this.authService.authenticate({ diff --git a/server/src/middleware/file-upload.interceptor.ts b/server/src/middleware/file-upload.interceptor.ts index 1bbab36a87..cd95590019 100644 --- a/server/src/middleware/file-upload.interceptor.ts +++ b/server/src/middleware/file-upload.interceptor.ts @@ -1,4 +1,4 @@ -import { CallHandler, ExecutionContext, Injectable, NestInterceptor } from '@nestjs/common'; +import { BadRequestException, CallHandler, ExecutionContext, Injectable, NestInterceptor } from '@nestjs/common'; import { PATH_METADATA } from '@nestjs/common/constants'; import { Reflector } from '@nestjs/core'; import { transformException } from '@nestjs/platform-express/multer/multer/multer.utils'; @@ -129,6 +129,9 @@ export class FileUploadInterceptor implements NestInterceptor { hash?.destroy(); return callback(error); } + if (size === 0) { + return callback(new BadRequestException('File is empty')); + } callback(null, { path, size, diff --git a/server/src/queries/integrity.repository.sql b/server/src/queries/integrity.repository.sql index d9940970d9..8d8461e700 100644 --- a/server/src/queries/integrity.repository.sql +++ b/server/src/queries/integrity.repository.sql @@ -86,7 +86,7 @@ select from "asset_file" --- IntegrityRepository.streamAssetPaths +-- IntegrityRepository.streamAssetPathsForMissingFiles select "allPaths"."path" as "path", "allPaths"."assetId", @@ -130,10 +130,9 @@ from where "asset"."deletedAt" is null and "asset"."isExternal" = false - and "integrity_report"."createdAt" >= $2 - and "integrity_report"."createdAt" <= $3 + and "asset"."createdAt" >= $2 order by - "integrity_report"."createdAt" asc + "asset"."createdAt" asc -- IntegrityRepository.streamIntegrityReports select diff --git a/server/src/queries/search.repository.sql b/server/src/queries/search.repository.sql index 3e75d88af8..efd7236bb5 100644 --- a/server/src/queries/search.repository.sql +++ b/server/src/queries/search.repository.sql @@ -2,23 +2,50 @@ -- SearchRepository.searchMetadata select - "asset".* + "asset"."id", + "asset"."updateId", + "asset"."createdAt", + "asset"."updatedAt", + "asset"."deletedAt", + "asset"."status", + "asset"."checksum", + "asset"."checksumAlgorithm", + "asset"."duplicateId", + "asset"."duration", + "asset"."fileCreatedAt", + "asset"."fileModifiedAt", + "asset"."isExternal", + "asset"."isFavorite", + "asset"."isOffline", + "asset"."isEdited", + "asset"."visibility", + "asset"."libraryId", + "asset"."livePhotoVideoId", + "asset"."localDateTime", + "asset"."originalFileName", + "asset"."originalPath", + "asset"."ownerId", + "asset"."stackId", + "asset"."thumbhash", + "asset"."type", + "asset"."width", + "asset"."height" from "asset" inner join "asset_exif" on "asset"."id" = "asset_exif"."assetId" where - "asset"."visibility" = $1 - and "asset"."fileCreatedAt" >= $2 - and "asset_exif"."lensModel" = $3 - and "asset"."ownerId" = any ($4::uuid[]) - and "asset"."isFavorite" = $5 + "asset"."fileCreatedAt" >= $1 + and "asset_exif"."lensModel" = $2 + and "asset"."ownerId" = any ($3::uuid[]) + and "asset"."isFavorite" = $4 and "asset"."deletedAt" is null order by - "asset"."fileCreatedAt" desc + "asset"."fileCreatedAt" desc, + "asset"."id" desc limit - $6 + $5 offset - $7 + $6 -- SearchRepository.searchStatistics select @@ -27,74 +54,152 @@ from "asset" inner join "asset_exif" on "asset"."id" = "asset_exif"."assetId" where - "asset"."visibility" = $1 - and "asset"."fileCreatedAt" >= $2 - and "asset_exif"."lensModel" = $3 - and "asset"."ownerId" = any ($4::uuid[]) - and "asset"."isFavorite" = $5 + "asset"."fileCreatedAt" >= $1 + and "asset_exif"."lensModel" = $2 + and "asset"."ownerId" = any ($3::uuid[]) + and "asset"."isFavorite" = $4 and "asset"."deletedAt" is null -- SearchRepository.searchRandom select - "asset".* + "asset"."id", + "asset"."updateId", + "asset"."createdAt", + "asset"."updatedAt", + "asset"."deletedAt", + "asset"."status", + "asset"."checksum", + "asset"."checksumAlgorithm", + "asset"."duplicateId", + "asset"."duration", + "asset"."fileCreatedAt", + "asset"."fileModifiedAt", + "asset"."isExternal", + "asset"."isFavorite", + "asset"."isOffline", + "asset"."isEdited", + "asset"."visibility", + "asset"."libraryId", + "asset"."livePhotoVideoId", + "asset"."localDateTime", + "asset"."originalFileName", + "asset"."originalPath", + "asset"."ownerId", + "asset"."stackId", + "asset"."thumbhash", + "asset"."type", + "asset"."width", + "asset"."height" from "asset" inner join "asset_exif" on "asset"."id" = "asset_exif"."assetId" where - "asset"."visibility" = $1 - and "asset"."fileCreatedAt" >= $2 - and "asset_exif"."lensModel" = $3 - and "asset"."ownerId" = any ($4::uuid[]) - and "asset"."isFavorite" = $5 + "asset"."fileCreatedAt" >= $1 + and "asset_exif"."lensModel" = $2 + and "asset"."ownerId" = any ($3::uuid[]) + and "asset"."isFavorite" = $4 and "asset"."deletedAt" is null order by random() limit - $6 + $5 -- SearchRepository.searchLargeAssets select - "asset".*, + "asset"."id", + "asset"."updateId", + "asset"."createdAt", + "asset"."updatedAt", + "asset"."deletedAt", + "asset"."status", + "asset"."checksum", + "asset"."checksumAlgorithm", + "asset"."duplicateId", + "asset"."duration", + "asset"."fileCreatedAt", + "asset"."fileModifiedAt", + "asset"."isExternal", + "asset"."isFavorite", + "asset"."isOffline", + "asset"."isEdited", + "asset"."visibility", + "asset"."libraryId", + "asset"."livePhotoVideoId", + "asset"."localDateTime", + "asset"."originalFileName", + "asset"."originalPath", + "asset"."ownerId", + "asset"."stackId", + "asset"."thumbhash", + "asset"."type", + "asset"."width", + "asset"."height", to_json("asset_exif") as "exifInfo" from "asset" inner join "asset_exif" on "asset"."id" = "asset_exif"."assetId" where - "asset"."visibility" = $1 - and "asset"."fileCreatedAt" >= $2 - and "asset_exif"."lensModel" = $3 - and "asset"."ownerId" = any ($4::uuid[]) - and "asset"."isFavorite" = $5 + "asset"."fileCreatedAt" >= $1 + and "asset_exif"."lensModel" = $2 + and "asset"."ownerId" = any ($3::uuid[]) + and "asset"."isFavorite" = $4 and "asset"."deletedAt" is null - and "asset_exif"."fileSizeInByte" > $6 + and "asset_exif"."fileSizeInByte" > $5 order by "asset_exif"."fileSizeInByte" desc limit - $7 + $6 -- SearchRepository.searchSmart begin set local vchordrq.probes = 1 select - "asset".* + "asset"."id", + "asset"."updateId", + "asset"."createdAt", + "asset"."updatedAt", + "asset"."deletedAt", + "asset"."status", + "asset"."checksum", + "asset"."checksumAlgorithm", + "asset"."duplicateId", + "asset"."duration", + "asset"."fileCreatedAt", + "asset"."fileModifiedAt", + "asset"."isExternal", + "asset"."isFavorite", + "asset"."isOffline", + "asset"."isEdited", + "asset"."visibility", + "asset"."libraryId", + "asset"."livePhotoVideoId", + "asset"."localDateTime", + "asset"."originalFileName", + "asset"."originalPath", + "asset"."ownerId", + "asset"."stackId", + "asset"."thumbhash", + "asset"."type", + "asset"."width", + "asset"."height" from "asset" inner join "asset_exif" on "asset"."id" = "asset_exif"."assetId" inner join "smart_search" on "asset"."id" = "smart_search"."assetId" where - "asset"."visibility" = $1 - and "asset"."fileCreatedAt" >= $2 - and "asset_exif"."lensModel" = $3 - and "asset"."ownerId" = any ($4::uuid[]) - and "asset"."isFavorite" = $5 + "asset"."fileCreatedAt" >= $1 + and "asset_exif"."lensModel" = $2 + and "asset"."ownerId" = any ($3::uuid[]) + and "asset"."isFavorite" = $4 and "asset"."deletedAt" is null order by - smart_search.embedding <=> $6 + smart_search.embedding <=> $5, + "asset"."id" asc limit - $7 + $6 offset - $8 + $7 commit -- SearchRepository.getEmbedding @@ -208,7 +313,34 @@ with recursive ) ) select - "asset".*, + "asset"."id", + "asset"."updateId", + "asset"."createdAt", + "asset"."updatedAt", + "asset"."deletedAt", + "asset"."status", + "asset"."checksum", + "asset"."checksumAlgorithm", + "asset"."duplicateId", + "asset"."duration", + "asset"."fileCreatedAt", + "asset"."fileModifiedAt", + "asset"."isExternal", + "asset"."isFavorite", + "asset"."isOffline", + "asset"."isEdited", + "asset"."visibility", + "asset"."libraryId", + "asset"."livePhotoVideoId", + "asset"."localDateTime", + "asset"."originalFileName", + "asset"."originalPath", + "asset"."ownerId", + "asset"."stackId", + "asset"."thumbhash", + "asset"."type", + "asset"."width", + "asset"."height", to_jsonb("asset_exif") as "exifInfo" from "asset" @@ -281,3 +413,1071 @@ where and "deletedAt" is null and "lensModel" is not null and "lensModel" != $3 + +-- SearchRepository.searchMetadataV3 (baseline) +select + "asset"."id", + "asset"."updateId", + "asset"."createdAt", + "asset"."updatedAt", + "asset"."deletedAt", + "asset"."status", + "asset"."checksum", + "asset"."checksumAlgorithm", + "asset"."duplicateId", + "asset"."duration", + "asset"."fileCreatedAt", + "asset"."fileModifiedAt", + "asset"."isExternal", + "asset"."isFavorite", + "asset"."isOffline", + "asset"."isEdited", + "asset"."visibility", + "asset"."libraryId", + "asset"."livePhotoVideoId", + "asset"."localDateTime", + "asset"."originalFileName", + "asset"."originalPath", + "asset"."ownerId", + "asset"."stackId", + "asset"."thumbhash", + "asset"."type", + "asset"."width", + "asset"."height" +from + "asset" + left join "asset_exif" on "asset"."id" = "asset_exif"."assetId" +where + "asset"."ownerId" = any ($1::uuid[]) + and true +order by + "asset"."fileCreatedAt" desc, + "asset"."id" desc +limit + $2 + +-- SearchRepository.searchMetadataV3 (empty) +select + "asset"."id", + "asset"."updateId", + "asset"."createdAt", + "asset"."updatedAt", + "asset"."deletedAt", + "asset"."status", + "asset"."checksum", + "asset"."checksumAlgorithm", + "asset"."duplicateId", + "asset"."duration", + "asset"."fileCreatedAt", + "asset"."fileModifiedAt", + "asset"."isExternal", + "asset"."isFavorite", + "asset"."isOffline", + "asset"."isEdited", + "asset"."visibility", + "asset"."libraryId", + "asset"."livePhotoVideoId", + "asset"."localDateTime", + "asset"."originalFileName", + "asset"."originalPath", + "asset"."ownerId", + "asset"."stackId", + "asset"."thumbhash", + "asset"."type", + "asset"."width", + "asset"."height" +from + "asset" + left join "asset_exif" on "asset"."id" = "asset_exif"."assetId" +where + true +order by + "asset"."fileCreatedAt" desc, + "asset"."id" desc +limit + $1 + +-- SearchRepository.searchMetadataV3 (or-exif-only) +select + "asset"."id", + "asset"."updateId", + "asset"."createdAt", + "asset"."updatedAt", + "asset"."deletedAt", + "asset"."status", + "asset"."checksum", + "asset"."checksumAlgorithm", + "asset"."duplicateId", + "asset"."duration", + "asset"."fileCreatedAt", + "asset"."fileModifiedAt", + "asset"."isExternal", + "asset"."isFavorite", + "asset"."isOffline", + "asset"."isEdited", + "asset"."visibility", + "asset"."libraryId", + "asset"."livePhotoVideoId", + "asset"."localDateTime", + "asset"."originalFileName", + "asset"."originalPath", + "asset"."ownerId", + "asset"."stackId", + "asset"."thumbhash", + "asset"."type", + "asset"."width", + "asset"."height" +from + "asset" + left join "asset_exif" on "asset"."id" = "asset_exif"."assetId" +where + "asset"."ownerId" = any ($1::uuid[]) + and "asset_exif"."city" = $2 +order by + "asset"."fileCreatedAt" desc, + "asset"."id" desc +limit + $3 + +-- SearchRepository.searchMetadataV3 (string-eq-null) +select + "asset"."id", + "asset"."updateId", + "asset"."createdAt", + "asset"."updatedAt", + "asset"."deletedAt", + "asset"."status", + "asset"."checksum", + "asset"."checksumAlgorithm", + "asset"."duplicateId", + "asset"."duration", + "asset"."fileCreatedAt", + "asset"."fileModifiedAt", + "asset"."isExternal", + "asset"."isFavorite", + "asset"."isOffline", + "asset"."isEdited", + "asset"."visibility", + "asset"."libraryId", + "asset"."livePhotoVideoId", + "asset"."localDateTime", + "asset"."originalFileName", + "asset"."originalPath", + "asset"."ownerId", + "asset"."stackId", + "asset"."thumbhash", + "asset"."type", + "asset"."width", + "asset"."height" +from + "asset" + left join "asset_exif" on "asset"."id" = "asset_exif"."assetId" +where + "asset"."ownerId" = any ($1::uuid[]) + and "asset_exif"."city" is null +order by + "asset"."fileCreatedAt" desc, + "asset"."id" desc +limit + $2 + +-- SearchRepository.searchMetadataV3 (string-pattern-like) +select + "asset"."id", + "asset"."updateId", + "asset"."createdAt", + "asset"."updatedAt", + "asset"."deletedAt", + "asset"."status", + "asset"."checksum", + "asset"."checksumAlgorithm", + "asset"."duplicateId", + "asset"."duration", + "asset"."fileCreatedAt", + "asset"."fileModifiedAt", + "asset"."isExternal", + "asset"."isFavorite", + "asset"."isOffline", + "asset"."isEdited", + "asset"."visibility", + "asset"."libraryId", + "asset"."livePhotoVideoId", + "asset"."localDateTime", + "asset"."originalFileName", + "asset"."originalPath", + "asset"."ownerId", + "asset"."stackId", + "asset"."thumbhash", + "asset"."type", + "asset"."width", + "asset"."height" +from + "asset" + left join "asset_exif" on "asset"."id" = "asset_exif"."assetId" +where + "asset"."ownerId" = any ($1::uuid[]) + and f_unaccent ("asset_exif"."description") ilike ('%' || f_unaccent ($2) || '%') +order by + "asset"."fileCreatedAt" desc, + "asset"."id" desc +limit + $3 + +-- SearchRepository.searchMetadataV3 (string-pattern-notLike) +select + "asset"."id", + "asset"."updateId", + "asset"."createdAt", + "asset"."updatedAt", + "asset"."deletedAt", + "asset"."status", + "asset"."checksum", + "asset"."checksumAlgorithm", + "asset"."duplicateId", + "asset"."duration", + "asset"."fileCreatedAt", + "asset"."fileModifiedAt", + "asset"."isExternal", + "asset"."isFavorite", + "asset"."isOffline", + "asset"."isEdited", + "asset"."visibility", + "asset"."libraryId", + "asset"."livePhotoVideoId", + "asset"."localDateTime", + "asset"."originalFileName", + "asset"."originalPath", + "asset"."ownerId", + "asset"."stackId", + "asset"."thumbhash", + "asset"."type", + "asset"."width", + "asset"."height" +from + "asset" + left join "asset_exif" on "asset"."id" = "asset_exif"."assetId" +where + "asset"."ownerId" = any ($1::uuid[]) + and f_unaccent ("asset_exif"."description") not ilike ('%' || f_unaccent ($2) || '%') +order by + "asset"."fileCreatedAt" desc, + "asset"."id" desc +limit + $3 + +-- SearchRepository.searchMetadataV3 (string-pattern-startsWith) +select + "asset"."id", + "asset"."updateId", + "asset"."createdAt", + "asset"."updatedAt", + "asset"."deletedAt", + "asset"."status", + "asset"."checksum", + "asset"."checksumAlgorithm", + "asset"."duplicateId", + "asset"."duration", + "asset"."fileCreatedAt", + "asset"."fileModifiedAt", + "asset"."isExternal", + "asset"."isFavorite", + "asset"."isOffline", + "asset"."isEdited", + "asset"."visibility", + "asset"."libraryId", + "asset"."livePhotoVideoId", + "asset"."localDateTime", + "asset"."originalFileName", + "asset"."originalPath", + "asset"."ownerId", + "asset"."stackId", + "asset"."thumbhash", + "asset"."type", + "asset"."width", + "asset"."height" +from + "asset" + left join "asset_exif" on "asset"."id" = "asset_exif"."assetId" +where + "asset"."ownerId" = any ($1::uuid[]) + and f_unaccent ("asset"."originalFileName") ilike (f_unaccent ($2) || '%') +order by + "asset"."fileCreatedAt" desc, + "asset"."id" desc +limit + $3 + +-- SearchRepository.searchMetadataV3 (string-similarity-ocr) +select + "asset"."id", + "asset"."updateId", + "asset"."createdAt", + "asset"."updatedAt", + "asset"."deletedAt", + "asset"."status", + "asset"."checksum", + "asset"."checksumAlgorithm", + "asset"."duplicateId", + "asset"."duration", + "asset"."fileCreatedAt", + "asset"."fileModifiedAt", + "asset"."isExternal", + "asset"."isFavorite", + "asset"."isOffline", + "asset"."isEdited", + "asset"."visibility", + "asset"."libraryId", + "asset"."livePhotoVideoId", + "asset"."localDateTime", + "asset"."originalFileName", + "asset"."originalPath", + "asset"."ownerId", + "asset"."stackId", + "asset"."thumbhash", + "asset"."type", + "asset"."width", + "asset"."height" +from + "asset" + left join "asset_exif" on "asset"."id" = "asset_exif"."assetId" +where + "asset"."ownerId" = any ($1::uuid[]) + and exists ( + select + from + "ocr_search" + where + "ocr_search"."assetId" = "asset"."id" + and f_unaccent (ocr_search.text) %>> f_unaccent ($2) + ) +order by + "asset"."fileCreatedAt" desc, + "asset"."id" desc +limit + $3 + +-- SearchRepository.searchMetadataV3 (ids-any) +select + "asset"."id", + "asset"."updateId", + "asset"."createdAt", + "asset"."updatedAt", + "asset"."deletedAt", + "asset"."status", + "asset"."checksum", + "asset"."checksumAlgorithm", + "asset"."duplicateId", + "asset"."duration", + "asset"."fileCreatedAt", + "asset"."fileModifiedAt", + "asset"."isExternal", + "asset"."isFavorite", + "asset"."isOffline", + "asset"."isEdited", + "asset"."visibility", + "asset"."libraryId", + "asset"."livePhotoVideoId", + "asset"."localDateTime", + "asset"."originalFileName", + "asset"."originalPath", + "asset"."ownerId", + "asset"."stackId", + "asset"."thumbhash", + "asset"."type", + "asset"."width", + "asset"."height" +from + "asset" + left join "asset_exif" on "asset"."id" = "asset_exif"."assetId" +where + "asset"."ownerId" = any ($1::uuid[]) + and exists ( + select + from + "album_asset" + where + "album_asset"."assetId" = "asset"."id" + and "album_asset"."albumId" = any ($2::uuid[]) + ) +order by + "asset"."fileCreatedAt" desc, + "asset"."id" desc +limit + $3 + +-- SearchRepository.searchMetadataV3 (ids-all) +select + "asset"."id", + "asset"."updateId", + "asset"."createdAt", + "asset"."updatedAt", + "asset"."deletedAt", + "asset"."status", + "asset"."checksum", + "asset"."checksumAlgorithm", + "asset"."duplicateId", + "asset"."duration", + "asset"."fileCreatedAt", + "asset"."fileModifiedAt", + "asset"."isExternal", + "asset"."isFavorite", + "asset"."isOffline", + "asset"."isEdited", + "asset"."visibility", + "asset"."libraryId", + "asset"."livePhotoVideoId", + "asset"."localDateTime", + "asset"."originalFileName", + "asset"."originalPath", + "asset"."ownerId", + "asset"."stackId", + "asset"."thumbhash", + "asset"."type", + "asset"."width", + "asset"."height" +from + "asset" + left join "asset_exif" on "asset"."id" = "asset_exif"."assetId" +where + "asset"."ownerId" = any ($1::uuid[]) + and exists ( + select + "asset_face"."assetId" + from + "asset_face" + where + "asset_face"."assetId" = "asset"."id" + and "asset_face"."deletedAt" is null + and "asset_face"."isVisible" = $2 + and "asset_face"."personId" = any ($3::uuid[]) + group by + "asset_face"."assetId" + having + count(distinct "asset_face"."personId") = $4 + ) +order by + "asset"."fileCreatedAt" desc, + "asset"."id" desc +limit + $5 + +-- SearchRepository.searchMetadataV3 (ids-all-single) +select + "asset"."id", + "asset"."updateId", + "asset"."createdAt", + "asset"."updatedAt", + "asset"."deletedAt", + "asset"."status", + "asset"."checksum", + "asset"."checksumAlgorithm", + "asset"."duplicateId", + "asset"."duration", + "asset"."fileCreatedAt", + "asset"."fileModifiedAt", + "asset"."isExternal", + "asset"."isFavorite", + "asset"."isOffline", + "asset"."isEdited", + "asset"."visibility", + "asset"."libraryId", + "asset"."livePhotoVideoId", + "asset"."localDateTime", + "asset"."originalFileName", + "asset"."originalPath", + "asset"."ownerId", + "asset"."stackId", + "asset"."thumbhash", + "asset"."type", + "asset"."width", + "asset"."height" +from + "asset" + left join "asset_exif" on "asset"."id" = "asset_exif"."assetId" +where + "asset"."ownerId" = any ($1::uuid[]) + and exists ( + select + from + "album_asset" + where + "album_asset"."assetId" = "asset"."id" + and "album_asset"."albumId" = any ($2::uuid[]) + ) +order by + "asset"."fileCreatedAt" desc, + "asset"."id" desc +limit + $3 + +-- SearchRepository.searchMetadataV3 (ids-none) +select + "asset"."id", + "asset"."updateId", + "asset"."createdAt", + "asset"."updatedAt", + "asset"."deletedAt", + "asset"."status", + "asset"."checksum", + "asset"."checksumAlgorithm", + "asset"."duplicateId", + "asset"."duration", + "asset"."fileCreatedAt", + "asset"."fileModifiedAt", + "asset"."isExternal", + "asset"."isFavorite", + "asset"."isOffline", + "asset"."isEdited", + "asset"."visibility", + "asset"."libraryId", + "asset"."livePhotoVideoId", + "asset"."localDateTime", + "asset"."originalFileName", + "asset"."originalPath", + "asset"."ownerId", + "asset"."stackId", + "asset"."thumbhash", + "asset"."type", + "asset"."width", + "asset"."height" +from + "asset" + left join "asset_exif" on "asset"."id" = "asset_exif"."assetId" +where + "asset"."ownerId" = any ($1::uuid[]) + and not exists ( + select + from + "tag_asset" + inner join "tag_closure" on "tag_asset"."tagId" = "tag_closure"."id_descendant" + where + "tag_asset"."assetId" = "asset"."id" + and "tag_closure"."id_ancestor" = any ($2::uuid[]) + ) +order by + "asset"."fileCreatedAt" desc, + "asset"."id" desc +limit + $3 + +-- SearchRepository.searchMetadataV3 (ids-tags-all) +select + "asset"."id", + "asset"."updateId", + "asset"."createdAt", + "asset"."updatedAt", + "asset"."deletedAt", + "asset"."status", + "asset"."checksum", + "asset"."checksumAlgorithm", + "asset"."duplicateId", + "asset"."duration", + "asset"."fileCreatedAt", + "asset"."fileModifiedAt", + "asset"."isExternal", + "asset"."isFavorite", + "asset"."isOffline", + "asset"."isEdited", + "asset"."visibility", + "asset"."libraryId", + "asset"."livePhotoVideoId", + "asset"."localDateTime", + "asset"."originalFileName", + "asset"."originalPath", + "asset"."ownerId", + "asset"."stackId", + "asset"."thumbhash", + "asset"."type", + "asset"."width", + "asset"."height" +from + "asset" + left join "asset_exif" on "asset"."id" = "asset_exif"."assetId" +where + "asset"."ownerId" = any ($1::uuid[]) + and exists ( + select + "tag_asset"."assetId" + from + "tag_asset" + inner join "tag_closure" on "tag_asset"."tagId" = "tag_closure"."id_descendant" + where + "tag_asset"."assetId" = "asset"."id" + and "tag_closure"."id_ancestor" = any ($2::uuid[]) + group by + "tag_asset"."assetId" + having + count(distinct "tag_closure"."id_ancestor") = $3 + ) +order by + "asset"."fileCreatedAt" desc, + "asset"."id" desc +limit + $4 + +-- SearchRepository.searchMetadataV3 (has-albums-false) +select + "asset"."id", + "asset"."updateId", + "asset"."createdAt", + "asset"."updatedAt", + "asset"."deletedAt", + "asset"."status", + "asset"."checksum", + "asset"."checksumAlgorithm", + "asset"."duplicateId", + "asset"."duration", + "asset"."fileCreatedAt", + "asset"."fileModifiedAt", + "asset"."isExternal", + "asset"."isFavorite", + "asset"."isOffline", + "asset"."isEdited", + "asset"."visibility", + "asset"."libraryId", + "asset"."livePhotoVideoId", + "asset"."localDateTime", + "asset"."originalFileName", + "asset"."originalPath", + "asset"."ownerId", + "asset"."stackId", + "asset"."thumbhash", + "asset"."type", + "asset"."width", + "asset"."height" +from + "asset" + left join "asset_exif" on "asset"."id" = "asset_exif"."assetId" +where + "asset"."ownerId" = any ($1::uuid[]) + and not exists ( + select + from + "album_asset" + where + "album_asset"."assetId" = "asset"."id" + ) +order by + "asset"."fileCreatedAt" desc, + "asset"."id" desc +limit + $2 + +-- SearchRepository.searchMetadataV3 (is-encoded) +select + "asset"."id", + "asset"."updateId", + "asset"."createdAt", + "asset"."updatedAt", + "asset"."deletedAt", + "asset"."status", + "asset"."checksum", + "asset"."checksumAlgorithm", + "asset"."duplicateId", + "asset"."duration", + "asset"."fileCreatedAt", + "asset"."fileModifiedAt", + "asset"."isExternal", + "asset"."isFavorite", + "asset"."isOffline", + "asset"."isEdited", + "asset"."visibility", + "asset"."libraryId", + "asset"."livePhotoVideoId", + "asset"."localDateTime", + "asset"."originalFileName", + "asset"."originalPath", + "asset"."ownerId", + "asset"."stackId", + "asset"."thumbhash", + "asset"."type", + "asset"."width", + "asset"."height" +from + "asset" + left join "asset_exif" on "asset"."id" = "asset_exif"."assetId" +where + "asset"."ownerId" = any ($1::uuid[]) + and exists ( + select + from + "asset_file" + where + "asset_file"."assetId" = "asset"."id" + and "asset_file"."type" = $2 + ) +order by + "asset"."fileCreatedAt" desc, + "asset"."id" desc +limit + $3 + +-- SearchRepository.searchMetadataV3 (number-range) +select + "asset"."id", + "asset"."updateId", + "asset"."createdAt", + "asset"."updatedAt", + "asset"."deletedAt", + "asset"."status", + "asset"."checksum", + "asset"."checksumAlgorithm", + "asset"."duplicateId", + "asset"."duration", + "asset"."fileCreatedAt", + "asset"."fileModifiedAt", + "asset"."isExternal", + "asset"."isFavorite", + "asset"."isOffline", + "asset"."isEdited", + "asset"."visibility", + "asset"."libraryId", + "asset"."livePhotoVideoId", + "asset"."localDateTime", + "asset"."originalFileName", + "asset"."originalPath", + "asset"."ownerId", + "asset"."stackId", + "asset"."thumbhash", + "asset"."type", + "asset"."width", + "asset"."height" +from + "asset" + left join "asset_exif" on "asset"."id" = "asset_exif"."assetId" +where + "asset"."ownerId" = any ($1::uuid[]) + and ( + "asset_exif"."fileSizeInByte" <= $2 + and "asset_exif"."fileSizeInByte" >= $3 + ) +order by + "asset"."fileCreatedAt" desc, + "asset"."id" desc +limit + $4 + +-- SearchRepository.searchMetadataV3 (date-eq) +select + "asset"."id", + "asset"."updateId", + "asset"."createdAt", + "asset"."updatedAt", + "asset"."deletedAt", + "asset"."status", + "asset"."checksum", + "asset"."checksumAlgorithm", + "asset"."duplicateId", + "asset"."duration", + "asset"."fileCreatedAt", + "asset"."fileModifiedAt", + "asset"."isExternal", + "asset"."isFavorite", + "asset"."isOffline", + "asset"."isEdited", + "asset"."visibility", + "asset"."libraryId", + "asset"."livePhotoVideoId", + "asset"."localDateTime", + "asset"."originalFileName", + "asset"."originalPath", + "asset"."ownerId", + "asset"."stackId", + "asset"."thumbhash", + "asset"."type", + "asset"."width", + "asset"."height" +from + "asset" + left join "asset_exif" on "asset"."id" = "asset_exif"."assetId" +where + "asset"."ownerId" = any ($1::uuid[]) + and "asset"."fileCreatedAt" = $2 +order by + "asset"."fileCreatedAt" desc, + "asset"."id" desc +limit + $3 + +-- SearchRepository.searchMetadataV3 (date-range) +select + "asset"."id", + "asset"."updateId", + "asset"."createdAt", + "asset"."updatedAt", + "asset"."deletedAt", + "asset"."status", + "asset"."checksum", + "asset"."checksumAlgorithm", + "asset"."duplicateId", + "asset"."duration", + "asset"."fileCreatedAt", + "asset"."fileModifiedAt", + "asset"."isExternal", + "asset"."isFavorite", + "asset"."isOffline", + "asset"."isEdited", + "asset"."visibility", + "asset"."libraryId", + "asset"."livePhotoVideoId", + "asset"."localDateTime", + "asset"."originalFileName", + "asset"."originalPath", + "asset"."ownerId", + "asset"."stackId", + "asset"."thumbhash", + "asset"."type", + "asset"."width", + "asset"."height" +from + "asset" + left join "asset_exif" on "asset"."id" = "asset_exif"."assetId" +where + "asset"."ownerId" = any ($1::uuid[]) + and ( + "asset"."fileCreatedAt" < $2 + and "asset"."fileCreatedAt" >= $3 + ) +order by + "asset"."fileCreatedAt" desc, + "asset"."id" desc +limit + $4 + +-- SearchRepository.searchMetadataV3 (order-fileSize-noExif) +select + "asset"."id", + "asset"."updateId", + "asset"."createdAt", + "asset"."updatedAt", + "asset"."deletedAt", + "asset"."status", + "asset"."checksum", + "asset"."checksumAlgorithm", + "asset"."duplicateId", + "asset"."duration", + "asset"."fileCreatedAt", + "asset"."fileModifiedAt", + "asset"."isExternal", + "asset"."isFavorite", + "asset"."isOffline", + "asset"."isEdited", + "asset"."visibility", + "asset"."libraryId", + "asset"."livePhotoVideoId", + "asset"."localDateTime", + "asset"."originalFileName", + "asset"."originalPath", + "asset"."ownerId", + "asset"."stackId", + "asset"."thumbhash", + "asset"."type", + "asset"."width", + "asset"."height" +from + "asset" + left join "asset_exif" on "asset"."id" = "asset_exif"."assetId" +where + "asset"."ownerId" = any ($1::uuid[]) + and true +order by + "asset_exif"."fileSizeInByte" desc nulls last, + "asset"."id" desc +limit + $2 + +-- SearchRepository.searchMetadataV3 (order-rating-withExif) +select + to_json("asset_exif") as "exifInfo", + "asset"."id", + "asset"."updateId", + "asset"."createdAt", + "asset"."updatedAt", + "asset"."deletedAt", + "asset"."status", + "asset"."checksum", + "asset"."checksumAlgorithm", + "asset"."duplicateId", + "asset"."duration", + "asset"."fileCreatedAt", + "asset"."fileModifiedAt", + "asset"."isExternal", + "asset"."isFavorite", + "asset"."isOffline", + "asset"."isEdited", + "asset"."visibility", + "asset"."libraryId", + "asset"."livePhotoVideoId", + "asset"."localDateTime", + "asset"."originalFileName", + "asset"."originalPath", + "asset"."ownerId", + "asset"."stackId", + "asset"."thumbhash", + "asset"."type", + "asset"."width", + "asset"."height" +from + "asset" + left join "asset_exif" on "asset"."id" = "asset_exif"."assetId" +where + "asset"."ownerId" = any ($1::uuid[]) + and true +order by + "asset_exif"."rating" asc nulls last, + "asset"."id" asc +limit + $2 + +-- SearchRepository.searchMetadataV3 (or-branches) +select + "asset"."id", + "asset"."updateId", + "asset"."createdAt", + "asset"."updatedAt", + "asset"."deletedAt", + "asset"."status", + "asset"."checksum", + "asset"."checksumAlgorithm", + "asset"."duplicateId", + "asset"."duration", + "asset"."fileCreatedAt", + "asset"."fileModifiedAt", + "asset"."isExternal", + "asset"."isFavorite", + "asset"."isOffline", + "asset"."isEdited", + "asset"."visibility", + "asset"."libraryId", + "asset"."livePhotoVideoId", + "asset"."localDateTime", + "asset"."originalFileName", + "asset"."originalPath", + "asset"."ownerId", + "asset"."stackId", + "asset"."thumbhash", + "asset"."type", + "asset"."width", + "asset"."height" +from + "asset" + left join "asset_exif" on "asset"."id" = "asset_exif"."assetId" +where + "asset"."ownerId" = any ($1::uuid[]) + and ( + "asset"."isFavorite" = $2 + or exists ( + select + from + "asset_face" + where + "asset_face"."assetId" = "asset"."id" + and "asset_face"."deletedAt" is null + and "asset_face"."isVisible" = $3 + and "asset_face"."personId" = any ($4::uuid[]) + ) + ) +order by + "asset"."fileCreatedAt" desc, + "asset"."id" desc +limit + $5 + +-- SearchRepository.searchMetadataV3 (or-with-top-level) +select + "asset"."id", + "asset"."updateId", + "asset"."createdAt", + "asset"."updatedAt", + "asset"."deletedAt", + "asset"."status", + "asset"."checksum", + "asset"."checksumAlgorithm", + "asset"."duplicateId", + "asset"."duration", + "asset"."fileCreatedAt", + "asset"."fileModifiedAt", + "asset"."isExternal", + "asset"."isFavorite", + "asset"."isOffline", + "asset"."isEdited", + "asset"."visibility", + "asset"."libraryId", + "asset"."livePhotoVideoId", + "asset"."localDateTime", + "asset"."originalFileName", + "asset"."originalPath", + "asset"."ownerId", + "asset"."stackId", + "asset"."thumbhash", + "asset"."type", + "asset"."width", + "asset"."height" +from + "asset" + left join "asset_exif" on "asset"."id" = "asset_exif"."assetId" +where + "asset"."ownerId" = any ($1::uuid[]) + and ( + "asset"."fileCreatedAt" < $2 + and "asset"."fileCreatedAt" >= $3 + and ( + "asset"."isFavorite" = $4 + or exists ( + select + from + "album_asset" + where + "album_asset"."assetId" = "asset"."id" + and "album_asset"."albumId" = any ($5::uuid[]) + ) + ) + ) +order by + "asset"."fileCreatedAt" desc, + "asset"."id" desc +limit + $6 + +-- SearchRepository.searchStatisticsV3 (baseline) +select + count(*) as "total" +from + "asset" + left join "asset_exif" on "asset"."id" = "asset_exif"."assetId" +where + "asset"."ownerId" = any ($1::uuid[]) + and true + +-- SearchRepository.searchStatisticsV3 (with-filter) +select + count(*) as "total" +from + "asset" + left join "asset_exif" on "asset"."id" = "asset_exif"."assetId" +where + "asset"."ownerId" = any ($1::uuid[]) + and ( + "asset_exif"."fileSizeInByte" >= $2 + and "asset"."fileCreatedAt" < $3 + and "asset"."fileCreatedAt" >= $4 + ) + +-- SearchRepository.searchStatisticsV3 (with-or) +select + count(*) as "total" +from + "asset" + left join "asset_exif" on "asset"."id" = "asset_exif"."assetId" +where + "asset"."ownerId" = any ($1::uuid[]) + and ( + "asset"."isFavorite" = $2 + or not exists ( + select + from + "album_asset" + where + "album_asset"."assetId" = "asset"."id" + ) + ) diff --git a/server/src/queries/session.repository.sql b/server/src/queries/session.repository.sql index a29b6f7cc3..f68f2dbe95 100644 --- a/server/src/queries/session.repository.sql +++ b/server/src/queries/session.repository.sql @@ -4,7 +4,8 @@ select "id", "expiresAt", - "pinExpiresAt" + "pinExpiresAt", + "oauthBearerToken" from "session" where diff --git a/server/src/queries/workflow.repository.sql b/server/src/queries/workflow.repository.sql index 86c26f5360..293d053d81 100644 --- a/server/src/queries/workflow.repository.sql +++ b/server/src/queries/workflow.repository.sql @@ -9,6 +9,7 @@ select "workflow"."enabled", "workflow"."createdAt", "workflow"."updatedAt", + "workflow"."logging", ( select coalesce(json_agg(agg), '[]') @@ -25,6 +26,8 @@ select inner join "plugin" on "plugin"."id" = "plugin_method"."pluginId" where "workflow"."id" = "workflow_step"."workflowId" + order by + "workflow_step"."order" asc ) as agg ) as "steps" from @@ -41,6 +44,7 @@ select "workflow"."enabled", "workflow"."createdAt", "workflow"."updatedAt", + "workflow"."logging", ( select coalesce(json_agg(agg), '[]') @@ -57,6 +61,8 @@ select inner join "plugin" on "plugin"."id" = "plugin_method"."pluginId" where "workflow"."id" = "workflow_step"."workflowId" + order by + "workflow_step"."order" asc ) as agg ) as "steps" from @@ -69,6 +75,7 @@ select "workflow"."id", "workflow"."name", "workflow"."trigger", + "workflow"."logging", ( select coalesce(json_agg(agg), '[]') @@ -96,6 +103,39 @@ where "id" = $2 and "enabled" = $3 +-- WorkflowRepository.getLogs +select + "workflow_log"."id", + "workflow_log"."createdAt", + "workflow_log"."result", + "workflow_log"."workflowId", + "workflow_log"."workflowStepId", + "workflow_log"."triggerDataId", + ( + select + to_json(obj) + from + ( + select + "plugin_method"."pluginId", + "plugin_method"."name" as "methodName", + "workflow_step"."order" + from + "workflow_step" + inner join "plugin_method" on "plugin_method"."id" = "workflow_step"."pluginMethodId" + where + "workflow_step"."id" = "workflow_log"."workflowStepId" + ) as obj + ) as "step" +from + "workflow_log" +where + "workflow_log"."workflowId" = $1 +order by + "workflow_log"."createdAt" desc +limit + $2 + -- WorkflowRepository.delete delete from "workflow" where diff --git a/server/src/repositories/access.repository.ts b/server/src/repositories/access.repository.ts index 5752b70863..b315538bf9 100644 --- a/server/src/repositories/access.repository.ts +++ b/server/src/repositories/access.repository.ts @@ -130,7 +130,10 @@ class AlbumAccess { .where('shared_link.albumId', 'in', [...albumIds]) .execute() .then( - (sharedLinks) => new Set(sharedLinks.flatMap((sharedLink) => (sharedLink.albumId ? [sharedLink.albumId] : []))), + (sharedLinks) => + new Set( + sharedLinks.filter((sharedLink) => sharedLink.albumId).map((sharedLink) => sharedLink.albumId), + ) as Set, ); } } diff --git a/server/src/repositories/album.repository.ts b/server/src/repositories/album.repository.ts index 724788fa74..ced4357ffe 100644 --- a/server/src/repositories/album.repository.ts +++ b/server/src/repositories/album.repository.ts @@ -314,7 +314,7 @@ export class AlbumRepository { albumUsers: AlbumUserCreateDto[], authUserId: string, ) { - if (!albumUsers.some((u) => u.role === AlbumUserRole.Owner)) { + if (albumUsers.every((u) => u.role !== AlbumUserRole.Owner)) { throw new Error('Album must have an owner'); } diff --git a/server/src/repositories/asset.repository.ts b/server/src/repositories/asset.repository.ts index ca00245c27..add3f0a24d 100644 --- a/server/src/repositories/asset.repository.ts +++ b/server/src/repositories/asset.repository.ts @@ -838,7 +838,7 @@ export class AssetRepository { ) .$if(!!options.withCoordinates, (qb) => qb.select(['asset_exif.latitude', 'asset_exif.longitude'])) .where('asset.deletedAt', options.isTrashed ? 'is not' : 'is', null) - .$if(options.visibility == undefined, withDefaultVisibility) + .$if(options.visibility === undefined, withDefaultVisibility) .$if(!!options.visibility, (qb) => qb.where('asset.visibility', '=', options.visibility!)) .$if(!!options.bbox, (qb) => { const bbox = options.bbox!; @@ -899,7 +899,7 @@ export class AssetRepository { .$if(!!options.isTrashed, (qb) => qb.where('asset.status', '!=', AssetStatus.Deleted)) .$if(!!options.tagId, (qb) => withTagId(qb, options.tagId!)) .orderBy( - options.orderBy == AssetOrderBy.CreatedAt + options.orderBy === AssetOrderBy.CreatedAt ? sql`"createdAt"` : sql`(asset."localDateTime" AT TIME ZONE 'UTC')::date`, order, diff --git a/server/src/repositories/database.repository.ts b/server/src/repositories/database.repository.ts index a4e58c52ec..165752783a 100644 --- a/server/src/repositories/database.repository.ts +++ b/server/src/repositories/database.repository.ts @@ -9,6 +9,7 @@ import semver from 'semver'; import { EXTENSION_NAMES, POSTGRES_VERSION_RANGE, + serverVersion, VECTOR_EXTENSIONS, VECTOR_INDEX_TABLES, VECTOR_VERSION_RANGE, @@ -192,9 +193,8 @@ export class DatabaseRepository { ) { probes[indexName] = this.targetProbeCount(targetLists); return this.reindexVectors(indexName, { lists: targetLists }); - } else { - probes[indexName] = this.targetProbeCount(lists); } + probes[indexName] = this.targetProbeCount(lists); }), ); break; @@ -228,7 +228,7 @@ export class DatabaseRepository { if (table === 'smart_search') { await sql`ALTER TABLE ${sql.raw(table)} DROP CONSTRAINT IF EXISTS dim_size_constraint`.execute(tx); } - if (!rows.some((row) => row.columnName === 'embedding')) { + if (rows.every((row) => row.columnName !== 'embedding')) { this.logger.warn(`Column 'embedding' does not exist in table '${table}', truncating and adding column.`); await sql`TRUNCATE TABLE ${sql.raw(table)}`.execute(tx); await sql`ALTER TABLE ${sql.raw(table)} ADD COLUMN embedding real[] NOT NULL`.execute(tx); @@ -349,11 +349,9 @@ export class DatabaseRepository { private targetListCount(count: number) { if (count < 128_000) { return 1; - } else if (count < 2_048_000) { - return 1 << (32 - Math.clz32(count / 1000)); - } else { - return 1 << (33 - Math.clz32(Math.sqrt(count))); } + // eslint-disable-next-line unicorn/prefer-minimal-ternary + return count < 2_048_000 ? 1 << (32 - Math.clz32(count / 1000)) : 1 << (33 - Math.clz32(Math.sqrt(count))); } private targetProbeCount(lists: number) { @@ -378,15 +376,24 @@ export class DatabaseRepository { for (const result of results ?? []) { if (result.status === 'Success') { this.logger.log(`Migration "${result.migrationName}" succeeded`); - } - - if (result.status === 'Error') { + } else if (result.status === 'Error') { this.logger.warn(`Migration "${result.migrationName}" failed`); } } if (error) { this.logger.error(`Migrations failed: ${error}`); + + const missing = + error instanceof Error ? error.message.match(/previously executed migration (.+) is missing/u) : null; + if (missing) { + throw new Error( + `Migration "${missing[1]}" was already applied to this database but is not in this version of Immich (${serverVersion}). ` + + `This usually means the database was migrated by a newer version. Downgrades are not supported.`, + { cause: error }, + ); + } + throw error; } @@ -476,37 +483,6 @@ export class DatabaseRepository { await sql`SELECT pg_advisory_unlock(${lock})`.execute(connection); } - async revertLastMigration(): Promise { - this.logger.debug('Reverting last migration'); - - const migrator = this.createMigrator(); - const { error, results } = await migrator.migrateDown(); - - for (const result of results ?? []) { - if (result.status === 'Success') { - this.logger.log(`Reverted migration "${result.migrationName}"`); - } - - if (result.status === 'Error') { - this.logger.warn(`Failed to revert migration "${result.migrationName}"`); - } - } - - if (error) { - this.logger.error(`Failed to revert migrations: ${error}`); - throw error; - } - - const reverted = results?.find((result) => result.direction === 'Down' && result.status === 'Success'); - if (!reverted) { - this.logger.debug('No migrations to revert'); - return undefined; - } - - this.logger.debug('Finished reverting migration'); - return reverted.migrationName; - } - private createMigrator(): Migrator { return new Migrator({ db: this.db, diff --git a/server/src/repositories/event.repository.ts b/server/src/repositories/event.repository.ts index b4d968599b..7fedc4eb3a 100644 --- a/server/src/repositories/event.repository.ts +++ b/server/src/repositories/event.repository.ts @@ -38,12 +38,12 @@ type EventMap = { ConfigValidate: [{ newConfig: SystemConfig; oldConfig: SystemConfig }]; // album events - AlbumUpdate: [{ id: string; recipientId: string }]; + AlbumUpdate: [{ id: string; userIds: string[]; recipientIds: string[] }]; AlbumInvite: [{ id: string; userId: string; senderName: string }]; // asset events - AssetCreate: [{ asset: Asset; file: UploadFile }]; - AssetTag: [{ assetId: string }]; + AssetCreate: [{ asset: Pick; file?: UploadFile }]; + AssetTag: [{ assetId: string; userId: string }]; AssetUntag: [{ assetId: string }]; AssetHide: [{ assetId: string; userId: string }]; AssetShow: [{ assetId: string; userId: string }]; @@ -213,11 +213,11 @@ export class EventRepository { private addHandler(item: Item): void { const event = item.event; - if (!this.emitHandlers[event]) { + if (!Object.hasOwn(this.emitHandlers, event)) { this.emitHandlers[event] = []; } - this.emitHandlers[event].push(item); + this.emitHandlers[event]!.push(item); } emit(event: T, ...args: ArgsOf): Promise { diff --git a/server/src/repositories/integrity.repository.ts b/server/src/repositories/integrity.repository.ts index 12f0b98634..227e69a074 100644 --- a/server/src/repositories/integrity.repository.ts +++ b/server/src/repositories/integrity.repository.ts @@ -119,7 +119,7 @@ export class IntegrityRepository { } @GenerateSql({ params: [], stream: true }) - streamAssetPaths() { + streamAssetPathsForMissingFiles() { return this.db .selectFrom((eb) => eb @@ -143,7 +143,7 @@ export class IntegrityRepository { ) .leftJoin('integrity_report', (join) => join - .on('integrity_report.type', '=', IntegrityReport.UntrackedFile) + .on('integrity_report.type', '=', IntegrityReport.MissingFile) .on((eb) => eb.or([ eb('integrity_report.assetId', '=', eb.ref('allPaths.assetId')), @@ -154,14 +154,13 @@ export class IntegrityRepository { .select(['allPaths.path as path', 'allPaths.assetId', 'allPaths.fileAssetId', 'integrity_report.id as reportId']) .stream() as AsyncIterableIterator< { path: string; reportId: string | null } & ( - | { assetId: string; fileAssetId: null } - | { assetId: null; fileAssetId: string } + { assetId: string; fileAssetId: null } | { assetId: null; fileAssetId: string } ) >; } - @GenerateSql({ params: [DummyValue.DATE, DummyValue.DATE], stream: true }) - streamAssetChecksums(startMarker?: Date, endMarker?: Date) { + @GenerateSql({ params: [DummyValue.DATE], stream: true }) + streamAssetChecksums(startMarker?: Date) { return this.db .selectFrom('asset') .where('asset.deletedAt', 'is', null) @@ -178,9 +177,8 @@ export class IntegrityRepository { 'integrity_report.id as reportId', ]) .where('asset.isExternal', '=', sql.lit(false)) - .$if(startMarker !== undefined, (qb) => qb.where('integrity_report.createdAt', '>=', startMarker!)) - .$if(endMarker !== undefined, (qb) => qb.where('integrity_report.createdAt', '<=', endMarker!)) - .orderBy('integrity_report.createdAt', 'asc') + .$if(startMarker !== undefined, (qb) => qb.where('asset.createdAt', '>=', startMarker!)) + .orderBy('asset.createdAt', 'asc') .stream(); } diff --git a/server/src/repositories/job.repository.ts b/server/src/repositories/job.repository.ts index 14a242e63b..e925bd5030 100644 --- a/server/src/repositories/job.repository.ts +++ b/server/src/repositories/job.repository.ts @@ -54,11 +54,11 @@ export class JobRepository { const label = `${Service.name}.${handler.name}`; // one handler per job - if (this.handlers[jobName]) { + if (Object.hasOwn(this.handlers, jobName)) { const jobKey = getKeyByValue(JobName, jobName); const errorMessage = `Failed to add job handler for ${label}`; this.logger.error( - `${errorMessage}. JobName.${jobKey} is already handled by ${this.handlers[jobName].label}.`, + `${errorMessage}. JobName.${jobKey} is already handled by ${this.handlers[jobName]!.label}.`, ); throw new ImmichStartupError(errorMessage); } @@ -104,24 +104,26 @@ export class JobRepository { } teardown() { - if (this.workerWatcher) { - clearInterval(this.workerWatcher); - this.workerWatcher = undefined; + if (!this.workerWatcher) { + return; } + + clearInterval(this.workerWatcher); + this.workerWatcher = undefined; } private async checkWorkers() { - let present: boolean; + let isPresent: boolean; try { const suffix = `:w:${ImmichWorker.Microservices}`; const workers = await this.getQueue(QueueName.BackgroundTask).getWorkers(); - present = workers.some((worker) => worker.rawname?.endsWith(suffix)); + isPresent = workers.some((worker) => worker.rawname?.endsWith(suffix)); } catch { return; } - if (this.microservicesPresent !== present) { - if (present) { + if (this.microservicesPresent !== isPresent) { + if (isPresent) { this.logger.log('Microservices worker connected.'); } else { this.logger.warn( @@ -129,7 +131,7 @@ export class JobRepository { ); } } - this.microservicesPresent = present; + this.microservicesPresent = isPresent; } async run({ name, data }: JobItem) { @@ -212,7 +214,7 @@ export class JobRepository { // need to use add() instead of addBulk() for jobId/deduplication to take effect promises.push(this.getQueue(queueName).add(item.name, item.data, job.options)); } else { - itemsByQueue[queueName] = itemsByQueue[queueName] || []; + itemsByQueue[queueName] ||= []; itemsByQueue[queueName].push(job); } } diff --git a/server/src/repositories/logging.repository.spec.ts b/server/src/repositories/logging.repository.spec.ts index 99bb1dbf18..9e7317cbbd 100644 --- a/server/src/repositories/logging.repository.spec.ts +++ b/server/src/repositories/logging.repository.spec.ts @@ -26,7 +26,7 @@ describe(LoggingRepository.name, () => { const logger = new MyConsoleLogger(clsMock, { color: true }); - expect(logger.formatContext('context')).toBe('\u001B[33m[Api:context]\u001B[39m '); + expect(logger.formatContext('context')).toBe('\u{1B}[33m[Api:context]\u{1B}[39m '); }); it('should not use colors when color is false', () => { diff --git a/server/src/repositories/logging.repository.ts b/server/src/repositories/logging.repository.ts index c1df648f09..f3da39c97c 100644 --- a/server/src/repositories/logging.repository.ts +++ b/server/src/repositories/logging.repository.ts @@ -67,7 +67,7 @@ export class MyConsoleLogger extends ConsoleLogger { }; private withColor(text: string, color: LogColor) { - return this.isColorEnabled ? `\u001B[${color}m${text}\u001B[39m` : text; + return this.isColorEnabled ? `\u{1B}[${color}m${text}\u{1B}[39m` : text; } } @@ -80,17 +80,17 @@ export class LoggingRepository { @Inject(ClsService) cls: ClsService | undefined, @Inject(ConfigRepository) configRepository: ConfigRepository | undefined, ) { - let noColor = false; + let isNoColor = false; let logFormat = LogFormat.Console; if (configRepository) { const env = configRepository.getEnv(); - noColor = env.noColor; + isNoColor = env.noColor; logFormat = env.logFormat ?? logFormat; } this.logger = new MyConsoleLogger(cls, { context: LoggingRepository.name, json: logFormat === LogFormat.Json, - color: !noColor, + color: !isNoColor, }); } diff --git a/server/src/repositories/machine-learning.repository.ts b/server/src/repositories/machine-learning.repository.ts index 6792e8ecf4..a05ddbc866 100644 --- a/server/src/repositories/machine-learning.repository.ts +++ b/server/src/repositories/machine-learning.repository.ts @@ -73,7 +73,6 @@ export interface Face { } export type FacialRecognitionResponse = { [ModelTask.FACIAL_RECOGNITION]: Face[] } & VisualResponse; -export type DetectedFaces = { faces: Face[] } & VisualResponse; export type MachineLearningRequest = ClipVisualRequest | ClipTextualRequest | FacialRecognitionRequest | OcrRequest; export type TextEncodingOptions = ModelOptions & { language?: string }; @@ -130,19 +129,19 @@ export class MachineLearningRepository { } private async check(url: string) { - let healthy = false; + let isHealthy = false; try { const response = await fetch(new URL('ping', url), { signal: AbortSignal.timeout(this.config.availabilityChecks.timeout), }); if (response.ok) { - healthy = true; + isHealthy = true; } } catch { // nothing to do here } - this.setHealthy(url, healthy); + this.setHealthy(url, isHealthy); } private setHealthy(url: string, healthy: boolean) { diff --git a/server/src/repositories/map.repository.ts b/server/src/repositories/map.repository.ts index 87cf30b618..3d01474434 100644 --- a/server/src/repositories/map.repository.ts +++ b/server/src/repositories/map.repository.ts @@ -291,8 +291,8 @@ export class MapRepository { id: Number.parseInt(lineSplit[0]), name: lineSplit[1], alternateNames: lineSplit[3], - latitude: Number.parseFloat(lineSplit[4]), - longitude: Number.parseFloat(lineSplit[5]), + latitude: Number(lineSplit[4]), + longitude: Number(lineSplit[5]), countryCode: lineSplit[8], admin1Code: lineSplit[10], admin2Code: lineSplit[11], @@ -308,6 +308,7 @@ export class MapRepository { .insertInto('geodata_places') .values(bufferGeodata) .execute() + .then(() => { count += curLength; if (count % 10_000 === 0) { diff --git a/server/src/repositories/media.repository.ts b/server/src/repositories/media.repository.ts index 5f8449e692..c1e8cfd234 100644 --- a/server/src/repositories/media.repository.ts +++ b/server/src/repositories/media.repository.ts @@ -3,10 +3,9 @@ import { ExifDateTime, exiftool, WriteTags } from 'exiftool-vendored'; import ffmpeg, { FfprobeData, FfprobeStream } from 'fluent-ffmpeg'; import _ from 'lodash'; import { Duration } from 'luxon'; -import { execFile as execFileCb } from 'node:child_process'; +import { spawn } from 'node:child_process'; import fs from 'node:fs/promises'; import { Writable } from 'node:stream'; -import { promisify } from 'node:util'; import sharp from 'sharp'; import { ORIENTATION_TO_SHARP_ROTATION } from 'src/constants'; import { Exif } from 'src/database'; @@ -44,11 +43,6 @@ const probe = (input: string, options: string[]): Promise => ffmpeg.ffprobe(input, options, (error, data) => (error ? reject(error) : resolve(data))), ); -const execFile = promisify(execFileCb); - -sharp.concurrency(0); -sharp.cache({ files: 0 }); - const pascalCase = (str: string) => _.upperFirst(_.camelCase(str.toLowerCase())); type ProgressEvent = { @@ -69,6 +63,8 @@ export type ExtractResult = { export class MediaRepository { constructor(private logger: LoggingRepository) { this.logger.setContext(MediaRepository.name); + sharp.concurrency(0); + sharp.cache({ files: 0 }); } /** @@ -85,6 +81,7 @@ export class MediaRepository { ]) { try { const buffer = await exiftool.extractBinaryTagToBuffer(tag, input); + this.logger.debug(`Successfully extracted ${tag} buffer from image`); return { buffer, format }; } catch (error: any) { this.logger.debug(`Could not extract ${tag} buffer from image: ${error}`); @@ -291,33 +288,37 @@ export class MediaRepository { * Needed for accurate segments, especially when remuxing, seeking and/or VFR is involved. * Scanning packets for keyframes in JS is much faster than -skip_frame nokey since it avoids decoding the video. */ - async probePackets(input: string, streamIndex: number): Promise { - const { stdout } = await execFile('ffprobe', [ - '-v', - 'error', - '-select_streams', - String(streamIndex), - '-show_entries', - 'packet=pts,duration,flags', - '-of', - 'csv=p=0', - input, - ]); + probePackets(input: string, streamIndex: number): Promise { + const ffprobe = spawn( + 'ffprobe', + [ + '-v', + 'error', + '-select_streams', + String(streamIndex), + '-show_entries', + 'packet=pts,duration,flags', + '-of', + 'csv=p=0', + input, + ], + { stdio: ['ignore', 'pipe', 'pipe'] }, + ); let totalDuration = 0; const keyframePts: number[] = []; const keyframeAccDuration: number[] = []; const keyframeOwnDuration: number[] = []; const postDiscard: { pts: number; duration: number }[] = []; - for (const line of stdout.split('\n')) { + const parseLine = (line: string) => { if (!line) { - continue; + return; } - const [ptsStr, durationStr, flags] = line.split(','); + const [ptsStr, durationStr, flags] = line.split(',', 3); const pts = Number.parseInt(ptsStr); const duration = Number.parseInt(durationStr); - if (Number.isNaN(pts) || Number.isNaN(duration)) { - continue; + if (Number.isNaN(pts) || Number.isNaN(duration) || !flags) { + return; } // Discarded packets don't contribute to packet count, but still contribute to video duration totalDuration += duration; @@ -332,20 +333,43 @@ export class MediaRepository { // Non-keyframes are accounted for in totalDuration. keyframeOwnDuration.push(duration); } - } - - if (postDiscard.length === 0) { - return null; - } - - return { - totalDuration, - packetCount: postDiscard.length, - outputFrames: this.cfrOutputFrames(postDiscard, postDiscard.length / totalDuration), - keyframePts, - keyframeAccDuration, - keyframeOwnDuration, }; + + let stderr = ''; + let remainder = ''; + ffprobe.stderr.setEncoding('utf8'); + ffprobe.stderr.on('data', (chunk: string) => (stderr += chunk)); + ffprobe.stdout.setEncoding('utf8'); + ffprobe.stdout.on('data', (chunk: string) => { + const lines = chunk.split('\n'); + lines[0] = remainder + lines[0]; + remainder = lines.pop() as string; + for (const line of lines) { + parseLine(line); + } + }); + + return new Promise((resolve, reject) => { + ffprobe.on('error', reject); + ffprobe.on('close', (code) => { + if (code !== 0) { + return reject(new Error(`ffprobe exited with code ${code}: ${stderr.trim()}`)); + } + parseLine(remainder); + if (postDiscard.length === 0) { + return resolve(null); + } + + resolve({ + totalDuration, + packetCount: postDiscard.length, + outputFrames: this.cfrOutputFrames(postDiscard, postDiscard.length / totalDuration), + keyframePts, + keyframeAccDuration, + keyframeOwnDuration, + }); + }); + }); } transcode(input: string, output: string | Writable, options: TranscodeCommand): Promise { @@ -387,7 +411,7 @@ export class MediaRepository { } async getImageMetadata(input: string | Buffer): Promise { - const { width = 0, height = 0, hasAlpha = false } = await sharp(input).metadata(); + const { width = 0, height = 0, hasAlpha = false } = await sharp(input, { unlimited: true }).metadata(); return { width, height, isTransparent: hasAlpha }; } @@ -427,6 +451,7 @@ export class MediaRepository { } private parseFloat(value: string | number | undefined): number { + // eslint-disable-next-line unicorn/prefer-number-coercion return Number.parseFloat(value as string) || 0; } diff --git a/server/src/repositories/metadata.repository.ts b/server/src/repositories/metadata.repository.ts index 93a91c26d7..1d504f6c71 100644 --- a/server/src/repositories/metadata.repository.ts +++ b/server/src/repositories/metadata.repository.ts @@ -20,7 +20,8 @@ type TagsWithWrongTypes = | 'TagsList' | 'Keywords' | 'HierarchicalSubject' - | 'ISO'; + | 'ISO' + | 'LensModel'; export interface ImmichTags extends Omit { ContentIdentifier?: string; @@ -43,6 +44,9 @@ export interface ImmichTags extends Omit { Description?: StringOrNumber; ImageDescription?: StringOrNumber; + // Apparently LensModel can also be a float: https://github.com/immich-app/immich/issues/30492 + LensModel?: StringOrNumber; + // Extended properties for image regions, such as faces RegionInfo?: { AppliedToDimensions: { @@ -53,10 +57,10 @@ export interface ImmichTags extends Omit { RegionList: { Area: { // (X,Y) // center of the rectangle - X: number; - Y: number; - W: number; - H: number; + X: number | string; + Y: number | string; + W: number | string; + H: number | string; Unit: string; }; Rotation?: number; @@ -108,6 +112,7 @@ export class MetadataRepository { readTags(path: string): Promise { const options: ReadTaskOptions | undefined = mimeTypes.isVideo(path) ? { readArgs: ['-ee'] } : undefined; + return this.exiftool.read(path, options).catch((error) => { this.logger.warn(`Error reading exif data (${path}): ${error}\n${error?.stack}`); return {}; diff --git a/server/src/repositories/oauth.repository.ts b/server/src/repositories/oauth.repository.ts index a22c9d56e2..1a09fff70d 100644 --- a/server/src/repositories/oauth.repository.ts +++ b/server/src/repositories/oauth.repository.ts @@ -68,7 +68,7 @@ export class OAuthRepository { params.code_challenge_method = 'S256'; } - const url = buildAuthorizationUrl(client, params).toString(); + const url = buildAuthorizationUrl(client, params).href; return { url, state, codeVerifier }; } @@ -83,7 +83,7 @@ export class OAuthRepository { url: string, expectedState: string, codeVerifier: string, - ): Promise<{ profile: OAuthProfile; sid?: string }> { + ): Promise<{ profile: OAuthProfile; sid?: string; idToken?: string }> { const client = await this.getClient(config); const pkceCodeVerifier = client.serverMetadata().supportsPKCE() ? codeVerifier : undefined; @@ -111,7 +111,7 @@ export class OAuthRepository { } } - return { profile, sid }; + return { profile, sid, idToken: tokens.id_token }; } catch (error: Error | any) { if (error.message.includes('unexpected JWT alg received')) { this.logger.warn( @@ -173,6 +173,7 @@ export class OAuthRepository { // Validate specific Logout Token claims (RFC 8963): // "events" claim must exist and contain the backchannel-logout event const events = payload.events as Record | undefined; + // eslint-disable-next-line unicorn/prefer-https if (!events || !events['http://schemas.openid.net/event/backchannel-logout']) { throw new Error('Missing backchannel-logout event claim'); } diff --git a/server/src/repositories/person.repository.ts b/server/src/repositories/person.repository.ts index 0db03a18c7..8ea6ed50fb 100644 --- a/server/src/repositories/person.repository.ts +++ b/server/src/repositories/person.repository.ts @@ -1,5 +1,5 @@ import { Injectable } from '@nestjs/common'; -import { ExpressionBuilder, Insertable, Kysely, Selectable, sql, Updateable } from 'kysely'; +import { ExpressionBuilder, Insertable, Kysely, sql, Updateable } from 'kysely'; import { jsonObjectFrom } from 'kysely/helpers/postgres'; import { InjectKysely } from 'nestjs-kysely'; import { AssetFace } from 'src/database'; @@ -60,8 +60,6 @@ export interface GetAllFacesOptions { export type UnassignFacesOptions = DeleteFacesOptions; -export type SelectFaceOptions = (keyof Selectable)[]; - const withPerson = (eb: ExpressionBuilder) => { return jsonObjectFrom( eb.selectFrom('person').selectAll('person').whereRef('person.id', '=', 'asset_face.personId'), diff --git a/server/src/repositories/process.repository.ts b/server/src/repositories/process.repository.ts index 928531408f..f5e761a965 100644 --- a/server/src/repositories/process.repository.ts +++ b/server/src/repositories/process.repository.ts @@ -7,7 +7,7 @@ export class ProcessRepository { spawn = spawn; spawnDuplexStream(command: string, args?: readonly string[], options?: SpawnOptionsWithoutStdio): Duplex { - let stdinClosed = false; + let isStdinClosed = false; let drainCallback: undefined | (() => void); const process = this.spawn(command, args, options); @@ -15,7 +15,7 @@ export class ProcessRepository { // duplex -> stdin write(chunk, encoding, callback) { // drain the input if process dies - if (stdinClosed) { + if (isStdinClosed) { return callback(); } @@ -36,7 +36,7 @@ export class ProcessRepository { }, final(callback) { - if (stdinClosed) { + if (isStdinClosed) { callback(); } else { process.stdin.end(callback); @@ -55,19 +55,19 @@ export class ProcessRepository { duplex.on('resume', () => process.stdout.resume()); // end handling - let stdoutClosed = false; + let isStdoutClosed = false; function close(error?: Error) { - stdinClosed = true; + isStdinClosed = true; if (error) { duplex.destroy(error); - } else if (stdoutClosed && typeof process.exitCode === 'number') { + } else if (isStdoutClosed && typeof process.exitCode === 'number') { duplex.push(null); } } process.stdout.on('close', () => { - stdoutClosed = true; + isStdoutClosed = true; close(); }); diff --git a/server/src/repositories/search.repository.ts b/server/src/repositories/search.repository.ts index da3f31555a..4bde10f165 100644 --- a/server/src/repositories/search.repository.ts +++ b/server/src/repositories/search.repository.ts @@ -1,12 +1,23 @@ import { Injectable } from '@nestjs/common'; import { Kysely, OrderByDirection, Selectable, ShallowDehydrateObject, sql } from 'kysely'; import { InjectKysely } from 'nestjs-kysely'; +import { columns } from 'src/database'; import { DummyValue, GenerateSql } from 'src/decorators'; +import { MapAsset } from 'src/dtos/asset-response.dto'; +import { SearchFilter, SearchOrder } from 'src/dtos/search.dto'; import { AssetStatus, AssetType, AssetVisibility, VectorIndex } from 'src/enum'; import { probes } from 'src/repositories/database.repository'; import { DB } from 'src/schema'; import { AssetExifTable } from 'src/schema/tables/asset-exif.table'; -import { anyUuid, searchAssetBuilder, withExifInner } from 'src/utils/database'; +import { + anyUuid, + searchAssetBuilder, + searchAssetBuilderLegacy, + searchMetadataV3Examples, + searchStatisticsV3Examples, + withExifInner, + withSearchOrder, +} from 'src/utils/database'; import { paginationHelper } from 'src/utils/pagination'; import z from 'zod'; @@ -117,21 +128,35 @@ type BaseAssetSearchOptions = SearchDateOptions & SearchAlbumOptions & SearchOcrOptions; -export type AssetSearchOptions = BaseAssetSearchOptions & SearchRelationOptions; +export type AssetSearchOptions = Omit & + SearchRelationOptions & { visibility?: AssetVisibility | 'not-locked' }; export type AssetSearchBuilderOptions = Omit; +export interface AssetSearchBuilderV3Options { + filter?: SearchFilter; + /** Server-derived ownership scope. Never client-controlled. */ + userIds?: string[]; + withExif?: boolean; + withFaces?: boolean; + withPeople?: boolean; + withStacked?: boolean; + order?: SearchOrder; +} + +export interface AssetSearchPaginationV3Options { + size: number; +} + export type SmartSearchOptions = SearchDateOptions & SearchEmbeddingOptions & SearchExifOptions & SearchOneToOneRelationOptions & - SearchStatusOptions & + Omit & SearchUserIdOptions & SearchPeopleOptions & SearchTagOptions & - SearchOcrOptions; - -export type OcrSearchOptions = SearchDateOptions & SearchOcrOptions; + SearchOcrOptions & { visibility?: AssetVisibility | 'not-locked' }; export type LargeAssetSearchOptions = AssetSearchOptions & { minFileSize?: number }; @@ -195,9 +220,10 @@ export class SearchRepository { }) async searchMetadata(pagination: SearchPaginationOptions, options: AssetSearchOptions) { const orderDirection = (options.orderDirection?.toLowerCase() || 'desc') as OrderByDirection; - const items = await searchAssetBuilder(this.db, options) - .selectAll('asset') + const items = await searchAssetBuilderLegacy(this.db, options) + .select(columns.searchAsset) .orderBy('asset.fileCreatedAt', orderDirection) + .orderBy('asset.id', orderDirection) .limit(pagination.size + 1) .offset((pagination.page - 1) * pagination.size) .execute(); @@ -216,7 +242,7 @@ export class SearchRepository { ], }) searchStatistics(options: AssetSearchOptions) { - return searchAssetBuilder(this.db, options) + return searchAssetBuilderLegacy(this.db, options) .select((qb) => qb.fn.countAll().as('total')) .executeTakeFirstOrThrow(); } @@ -234,8 +260,8 @@ export class SearchRepository { ], }) async searchRandom(size: number, options: AssetSearchOptions) { - return searchAssetBuilder(this.db, options) - .selectAll('asset') + return searchAssetBuilderLegacy(this.db, options) + .select(columns.searchAsset) .orderBy(sql`random()`) .limit(size) .execute(); @@ -255,8 +281,8 @@ export class SearchRepository { }) searchLargeAssets(size: number, options: LargeAssetSearchOptions) { const orderDirection = (options.orderDirection?.toLowerCase() || 'desc') as OrderByDirection; - return searchAssetBuilder(this.db, options) - .selectAll('asset') + return searchAssetBuilderLegacy(this.db, options) + .select(columns.searchAsset) .$call(withExifInner) .where('asset_exif.fileSizeInByte', '>', options.minFileSize || 0) .orderBy('asset_exif.fileSizeInByte', orderDirection) @@ -284,10 +310,11 @@ export class SearchRepository { return this.db.transaction().execute(async (trx) => { await sql`set local vchordrq.probes = ${sql.lit(probes[VectorIndex.Clip])}`.execute(trx); - const items = await searchAssetBuilder(trx, options) - .selectAll('asset') + const items = await searchAssetBuilderLegacy(trx, options) + .select(columns.searchAsset) .innerJoin('smart_search', 'asset.id', 'smart_search.assetId') .orderBy(sql`smart_search.embedding <=> ${options.embedding}`) + .orderBy('asset.id', 'asc') .limit(pagination.size + 1) .offset((pagination.page - 1) * pagination.size) .execute(); @@ -416,7 +443,7 @@ export class SearchRepository { .selectFrom('asset') .innerJoin('asset_exif', 'asset.id', 'asset_exif.assetId') .innerJoin('cte', 'asset.id', 'cte.assetId') - .selectAll('asset') + .select(columns.searchAsset) .select((eb) => eb .fn('to_jsonb', [eb.table('asset_exif')]) @@ -489,6 +516,24 @@ export class SearchRepository { return res.map((row) => row.lensModel!); } + @GenerateSql(...searchMetadataV3Examples) + searchMetadataV3( + pagination: AssetSearchPaginationV3Options, + options: AssetSearchBuilderV3Options, + ): Promise { + return withSearchOrder(searchAssetBuilder(this.db, options), options.order) + .select(columns.searchAsset) + .limit(pagination.size) + .execute(); + } + + @GenerateSql(...searchStatisticsV3Examples) + searchStatisticsV3(options: AssetSearchBuilderV3Options) { + return searchAssetBuilder(this.db, options) + .select((qb) => qb.fn.countAll().as('total')) + .executeTakeFirstOrThrow(); + } + private getExifField(field: 'city' | 'state' | 'country' | 'make' | 'model' | 'lensModel', userIds: string[]) { return this.db .selectFrom('asset_exif') diff --git a/server/src/repositories/server-info.repository.ts b/server/src/repositories/server-info.repository.ts index 0570c9d2cc..5cfded148d 100644 --- a/server/src/repositories/server-info.repository.ts +++ b/server/src/repositories/server-info.repository.ts @@ -8,16 +8,6 @@ import { ReleaseChannel } from 'src/dtos/system-config.dto'; import { ConfigRepository } from 'src/repositories/config.repository'; import { LoggingRepository } from 'src/repositories/logging.repository'; -export interface GitHubRelease { - id: number; - url: string; - tag_name: string; - name: string; - created_at: string; - published_at: string; - body: string; -} - export interface VersionResponse { version: string; published_at: string; @@ -35,7 +25,7 @@ const exec = promisify(execCallback); const maybeFirstLine = async (command: string): Promise => { try { const { stdout } = await exec(command); - return stdout.trim().split('\n')[0] || ''; + return stdout.trim().split('\n', 1)[0] || ''; } catch { return ''; } @@ -111,6 +101,7 @@ export class ServerInfoRepository { const lockfile: BuildLockfile | undefined = await readFile(resourcePaths.lockFile) .then((buffer) => JSON.parse(buffer.toString())) + .catch(() => this.logger.warn(`Failed to read ${resourcePaths.lockFile}`)); const [nodejsVersion, ffmpegVersion, magickVersion, exiftoolVersion] = await Promise.all([ diff --git a/server/src/repositories/session.repository.ts b/server/src/repositories/session.repository.ts index 451b2263e5..58a5e721c0 100644 --- a/server/src/repositories/session.repository.ts +++ b/server/src/repositories/session.repository.ts @@ -9,8 +9,6 @@ import { DB } from 'src/schema'; import { SessionTable } from 'src/schema/tables/session.table'; import { asUuid } from 'src/utils/database'; -export type SessionSearchOptions = { updatedBefore: Date }; - @Injectable() export class SessionRepository { constructor(@InjectKysely() private db: Kysely) {} @@ -32,7 +30,7 @@ export class SessionRepository { get(id: string) { return this.db .selectFrom('session') - .select(['id', 'expiresAt', 'pinExpiresAt']) + .select(['id', 'expiresAt', 'pinExpiresAt', 'oauthBearerToken']) .where('id', '=', id) .executeTakeFirst(); } diff --git a/server/src/repositories/telemetry.repository.ts b/server/src/repositories/telemetry.repository.ts index 036a1f9fab..146eaa30d7 100644 --- a/server/src/repositories/telemetry.repository.ts +++ b/server/src/repositories/telemetry.repository.ts @@ -95,10 +95,12 @@ export const bootstrapTelemetry = (port: number) => { }; export const teardownTelemetry = async () => { - if (instance) { - await instance.shutdown(); - instance = undefined; + if (!instance) { + return; } + + await instance.shutdown(); + instance = undefined; }; @Injectable() @@ -147,13 +149,13 @@ export class TelemetryRepository { const unit = 'ms'; for (const [propName, descriptor] of Object.entries(descriptors)) { - const isMethod = typeof descriptor.value == 'function' && propName !== 'constructor'; + const isMethod = typeof descriptor.value === 'function' && propName !== 'constructor'; if (!isMethod) { continue; } const method = descriptor.value; - const propertyName = snakeCase(String(propName)); + const propertyName = snakeCase(propName); const metricName = `${snakeCase(className).replaceAll(/_(?=(repository)|(controller)|(provider)|(service)|(module))/g, '.')}.${propertyName}.duration`; const histogram = this.metricService.getHistogram(metricName, { @@ -165,6 +167,7 @@ export class TelemetryRepository { descriptor.value = function (...args: any[]) { const start = performance.now(); + // eslint-disable-next-line unicorn/no-this-outside-of-class const result = method.apply(this, args); void Promise.resolve(result) diff --git a/server/src/repositories/user.repository.ts b/server/src/repositories/user.repository.ts index 20b41c80f8..afe14fb499 100644 --- a/server/src/repositories/user.repository.ts +++ b/server/src/repositories/user.repository.ts @@ -46,7 +46,7 @@ export class UserRepository { @GenerateSql({ params: [DummyValue.UUID, DummyValue.BOOLEAN] }) get(userId: string, options: UserFindOptions) { - options = options || {}; + options ||= {}; return this.db .selectFrom('user') @@ -321,7 +321,7 @@ export class UserRepository { updatedAt: new Date(), }) .where('user.deletedAt', 'is', null) - .$if(id != undefined, (eb) => eb.where('user.id', '=', asUuid(id!))); + .$if(id !== undefined, (eb) => eb.where('user.id', '=', asUuid(id!))); await query.execute(); } diff --git a/server/src/repositories/websocket.repository.ts b/server/src/repositories/websocket.repository.ts index d79e1563e3..3b4328563a 100644 --- a/server/src/repositories/websocket.repository.ts +++ b/server/src/repositories/websocket.repository.ts @@ -37,6 +37,7 @@ export interface ClientEventMap { on_asset_hidden: [string]; on_asset_restore: [string[]]; on_asset_stack_update: string[]; + on_album_update: [string]; on_person_thumbnail: [string]; on_server_version: [ServerVersionResponseDto]; on_config_update: []; diff --git a/server/src/repositories/workflow.repository.ts b/server/src/repositories/workflow.repository.ts index 7a39e78ce9..8344896199 100644 --- a/server/src/repositories/workflow.repository.ts +++ b/server/src/repositories/workflow.repository.ts @@ -4,10 +4,12 @@ import { jsonArrayFrom, jsonObjectFrom } from 'kysely/helpers/postgres'; import { InjectKysely } from 'nestjs-kysely'; import { columns } from 'src/database'; import { DummyValue, GenerateSql } from 'src/decorators'; -import { WorkflowSearchDto } from 'src/dtos/workflow.dto'; +import { WorkflowGetLogsDto, WorkflowSearchDto } from 'src/dtos/workflow.dto'; import { DB } from 'src/schema'; +import { WorkflowLogTable } from 'src/schema/tables/workflow-log.table'; import { WorkflowStepTable } from 'src/schema/tables/workflow-step.table'; import { WorkflowTable } from 'src/schema/tables/workflow.table'; +import { withTags } from 'src/utils/database'; export type WorkflowStepUpsert = Omit, 'workflowId' | 'order'>; @@ -26,6 +28,7 @@ export class WorkflowRepository { 'workflow.enabled', 'workflow.createdAt', 'workflow.updatedAt', + 'workflow.logging', ]) .select((eb) => [ jsonArrayFrom( @@ -39,7 +42,8 @@ export class WorkflowRepository { 'plugin_method.name as methodName', 'workflow_step.config', 'workflow_step.enabled', - ]), + ]) + .orderBy('workflow_step.order', 'asc'), ).as('steps'), ]); } @@ -64,7 +68,7 @@ export class WorkflowRepository { getForWorkflowRun(id: string) { return this.db .selectFrom('workflow') - .select(['workflow.id', 'workflow.name', 'workflow.trigger']) + .select(['workflow.id', 'workflow.name', 'workflow.trigger', 'workflow.logging']) .select((eb) => [ jsonArrayFrom( eb @@ -97,6 +101,9 @@ export class WorkflowRepository { update(id: string, dto: Updateable, steps?: WorkflowStepUpsert[]) { return this.db.transaction().execute(async (tx) => { + if (dto.logging === false) { + await tx.deleteFrom('workflow_log').where('workflowId', '=', id).execute(); + } if (Object.values(dto).some((prop) => prop !== undefined)) { await tx.updateTable('workflow').set(dto).where('id', '=', id).executeTakeFirstOrThrow(); } @@ -104,6 +111,39 @@ export class WorkflowRepository { }); } + @GenerateSql({ params: [DummyValue.UUID, { result: undefined }] }) + getLogs(id: string, dto: WorkflowGetLogsDto) { + return this.db + .selectFrom('workflow_log') + .select([ + 'workflow_log.id', + 'workflow_log.createdAt', + 'workflow_log.result', + 'workflow_log.workflowId', + 'workflow_log.workflowStepId', + 'workflow_log.triggerDataId', + ]) + .where('workflow_log.workflowId', '=', id) + .select((eb) => [ + jsonObjectFrom( + eb + .selectFrom('workflow_step') + .whereRef('workflow_step.id', '=', 'workflow_log.workflowStepId') + .innerJoin('plugin_method', 'plugin_method.id', 'workflow_step.pluginMethodId') + .select(['plugin_method.pluginId', 'plugin_method.name as methodName', 'workflow_step.order']), + ).as('step'), + ]) + .$if(dto.result !== undefined, (qb) => qb.where('workflow_log.result', '=', dto.result!)) + .$if(dto.before !== undefined, (qb) => qb.where('workflow_log.createdAt', '<', dto.before!)) + .orderBy('workflow_log.createdAt', 'desc') + .limit(dto.limit) + .execute(); + } + + log(dto: Insertable) { + return this.db.insertInto('workflow_log').values(dto).execute(); + } + async updateStep(id: string, dto: Updateable) { await this.db.updateTable('workflow_step').where('workflow_step.id', '=', id).set(dto).execute(); } @@ -142,6 +182,7 @@ export class WorkflowRepository { .leftJoin('asset_exif', 'asset_exif.assetId', 'asset.id') .select((eb) => [ ...columns.workflowAssetV1, + withTags, jsonObjectFrom( eb .selectFrom('asset_exif') diff --git a/server/src/schema/functions.ts b/server/src/schema/functions.ts index 230f22478d..2ee61d82dd 100644 --- a/server/src/schema/functions.ts +++ b/server/src/schema/functions.ts @@ -133,6 +133,20 @@ export const album_asset_delete_audit = registerFunction({ END`, }); +export const album_user_delete = registerFunction({ + name: 'album_user_delete', + returnType: 'TRIGGER', + language: 'PLPGSQL', + body: ` + BEGIN + DELETE FROM "album" + WHERE "album"."id" = OLD."albumId" + AND NOT EXISTS (SELECT "albumId" FROM "album_user" WHERE "album_user"."albumId" = "album"."id" AND "album_user"."role" = 'owner'); + + RETURN NULL; + END`, +}); + export const album_user_delete_audit = registerFunction({ name: 'album_user_delete_audit', returnType: 'TRIGGER', diff --git a/server/src/schema/index.ts b/server/src/schema/index.ts index 4e55ff4cf6..45423f7c40 100644 --- a/server/src/schema/index.ts +++ b/server/src/schema/index.ts @@ -7,6 +7,7 @@ import { } from 'src/schema/enums'; import { album_user_after_insert, + album_user_delete, album_user_delete_audit, asset_delete_audit, asset_face_audit, @@ -86,6 +87,7 @@ import { VideoStreamSessionTable, VideoStreamVariantTable, } from 'src/schema/tables/video-stream.table'; +import { WorkflowLogTable } from 'src/schema/tables/workflow-log.table'; import { WorkflowStepTable } from 'src/schema/tables/workflow-step.table'; import { WorkflowTable } from 'src/schema/tables/workflow.table'; @@ -174,6 +176,7 @@ export class ImmichDatabase { asset_metadata_audit, asset_face_audit, asset_ocr_delete_audit, + album_user_delete, ]; enum = [album_user_role_enum, assets_status_enum, asset_face_source_type, asset_visibility_enum]; @@ -277,4 +280,5 @@ export interface DB { workflow: WorkflowTable; workflow_step: WorkflowStepTable; + workflow_log: WorkflowLogTable; } diff --git a/server/src/schema/migrations/1782500000000-RestoreLivePhotoStillVisibility.ts b/server/src/schema/migrations/1782500000000-RestoreLivePhotoStillVisibility.ts new file mode 100644 index 0000000000..f8525b51c6 --- /dev/null +++ b/server/src/schema/migrations/1782500000000-RestoreLivePhotoStillVisibility.ts @@ -0,0 +1,16 @@ +import { Kysely, sql } from 'kysely'; + +export async function up(db: Kysely): Promise { + // (#29836) Reset the visibility of any still images that are hidden and have a motion part + await sql` + UPDATE "asset" + SET "visibility" = 'timeline' + WHERE "type" = 'IMAGE' + AND "visibility" = 'hidden' + AND "livePhotoVideoId" IS NOT NULL + `.execute(db); +} + +export async function down(): Promise { + // Not implemented: the previous 'hidden' value was itself the bug. +} diff --git a/server/src/schema/migrations/1784647658615-AddOAuthBearerTokenToSession.ts b/server/src/schema/migrations/1784647658615-AddOAuthBearerTokenToSession.ts new file mode 100644 index 0000000000..01994a2ab5 --- /dev/null +++ b/server/src/schema/migrations/1784647658615-AddOAuthBearerTokenToSession.ts @@ -0,0 +1,9 @@ +import { Kysely, sql } from 'kysely'; + +export async function up(db: Kysely): Promise { + await sql`ALTER TABLE "session" ADD "oauthBearerToken" character varying;`.execute(db); +} + +export async function down(db: Kysely): Promise { + await sql`ALTER TABLE "session" DROP COLUMN "oauthBearerToken";`.execute(db); +} diff --git a/server/src/schema/migrations/1784836013770-MinFacePreferenceMigration.ts b/server/src/schema/migrations/1784836013770-MinFacePreferenceMigration.ts new file mode 100644 index 0000000000..74d28768e1 --- /dev/null +++ b/server/src/schema/migrations/1784836013770-MinFacePreferenceMigration.ts @@ -0,0 +1,25 @@ +import { Kysely, sql } from 'kysely'; + +export async function up(db: Kysely): Promise { + await sql` + INSERT INTO "user_metadata" ("userId", "key", "value") + SELECT "user"."id", 'preferences', jsonb_build_object('people', jsonb_build_object('minimumFaces', "config"."minFaces")) + FROM "user" + CROSS JOIN ( + SELECT "value"->'machineLearning'->'facialRecognition'->'minFaces' AS "minFaces" + FROM "system_metadata" + WHERE "key" = 'system-config' + AND "value"->'machineLearning'->'facialRecognition'->'minFaces' IS NOT NULL + ) AS "config" + ON CONFLICT ("userId", "key") DO UPDATE + SET "value" = "user_metadata"."value" || jsonb_build_object( + 'people', + COALESCE("user_metadata"."value"->'people', '{}'::jsonb) || (EXCLUDED."value"->'people') + ) + WHERE "user_metadata"."value"->'people'->'minimumFaces' IS NULL + `.execute(db); +} + +export async function down(): Promise { + // not supported +} diff --git a/server/src/schema/migrations/1784986754473-ConvertUserPasswordEmptyStringToNull.ts b/server/src/schema/migrations/1784986754473-ConvertUserPasswordEmptyStringToNull.ts new file mode 100644 index 0000000000..82f742c90a --- /dev/null +++ b/server/src/schema/migrations/1784986754473-ConvertUserPasswordEmptyStringToNull.ts @@ -0,0 +1,13 @@ +import { Kysely, sql } from 'kysely'; + +export async function up(db: Kysely): Promise { + await sql`ALTER TABLE "user" ALTER COLUMN "password" DROP NOT NULL;`.execute(db); + await sql`ALTER TABLE "user" ALTER COLUMN "password" SET DEFAULT NULL;`.execute(db); + await sql`UPDATE "user" SET "password" = NULL WHERE "password" = '';`.execute(db); +} + +export async function down(db: Kysely): Promise { + await sql`UPDATE "user" SET "password" = '' WHERE "password" IS NULL;`.execute(db); + await sql`ALTER TABLE "user" ALTER COLUMN "password" SET DEFAULT '';`.execute(db); + await sql`ALTER TABLE "user" ALTER COLUMN "password" SET NOT NULL;`.execute(db); +} diff --git a/server/src/schema/migrations/1784986754474-AlbumDescriptionNullable.ts b/server/src/schema/migrations/1784986754474-AlbumDescriptionNullable.ts new file mode 100644 index 0000000000..3be799f498 --- /dev/null +++ b/server/src/schema/migrations/1784986754474-AlbumDescriptionNullable.ts @@ -0,0 +1,13 @@ +import { Kysely, sql } from 'kysely'; + +export async function up(db: Kysely): Promise { + await sql`ALTER TABLE "album" ALTER COLUMN "description" DROP NOT NULL;`.execute(db); + await sql`ALTER TABLE "album" ALTER COLUMN "description" SET DEFAULT NULL;`.execute(db); + await sql`UPDATE "album" SET "description" = NULL WHERE "description" = '';`.execute(db); +} + +export async function down(db: Kysely): Promise { + await sql`UPDATE "album" SET "description" = '' WHERE "description" IS NULL;`.execute(db); + await sql`ALTER TABLE "album" ALTER COLUMN "description" SET DEFAULT ''::text;`.execute(db); + await sql`ALTER TABLE "album" ALTER COLUMN "description" SET NOT NULL;`.execute(db); +} diff --git a/server/src/schema/migrations/1786385711807-AlbumOwnerDeleteTrigger.ts b/server/src/schema/migrations/1786385711807-AlbumOwnerDeleteTrigger.ts new file mode 100644 index 0000000000..082e43ff23 --- /dev/null +++ b/server/src/schema/migrations/1786385711807-AlbumOwnerDeleteTrigger.ts @@ -0,0 +1,31 @@ +import { Kysely, sql } from 'kysely'; + +export async function up(db: Kysely): Promise { + await sql`DELETE FROM "album" WHERE NOT EXISTS (SELECT * FROM "album_user" WHERE "album_user"."albumId" = "album"."id" AND "album_user"."role" = 'owner');`.execute(db); + await sql`CREATE OR REPLACE FUNCTION album_user_delete() + RETURNS TRIGGER + LANGUAGE PLPGSQL + AS $$ + BEGIN + DELETE FROM "album" + WHERE "album"."id" = OLD."albumId" + AND NOT EXISTS (SELECT "albumId" FROM "album_user" WHERE "album_user"."albumId" = "album"."id" AND "album_user"."role" = 'owner'); + + RETURN NULL; + END + $$;`.execute(db); + await sql`CREATE OR REPLACE TRIGGER "album_user_delete" + AFTER DELETE ON "album_user" + REFERENCING OLD TABLE AS "old" + FOR EACH ROW + EXECUTE FUNCTION album_user_delete();`.execute(db); + await sql`INSERT INTO "migration_overrides" ("name", "value") VALUES ('function_album_user_delete', '{"type":"function","name":"album_user_delete","sql":"CREATE OR REPLACE FUNCTION album_user_delete()\\n RETURNS TRIGGER\\n LANGUAGE PLPGSQL\\n AS $$\\n BEGIN\\n DELETE FROM \\"album\\"\\n WHERE \\"album\\".\\"id\\" = OLD.\\"albumId\\"\\n AND NOT EXISTS (SELECT \\"albumId\\" FROM \\"album_user\\" WHERE \\"album_user\\".\\"albumId\\" = \\"album\\".\\"id\\" AND \\"album_user\\".\\"role\\" = ''owner'');\\n\\n RETURN NULL;\\n END\\n $$;"}'::jsonb);`.execute(db); + await sql`INSERT INTO "migration_overrides" ("name", "value") VALUES ('trigger_album_user_delete', '{"type":"trigger","name":"album_user_delete","sql":"CREATE OR REPLACE TRIGGER \\"album_user_delete\\"\\n AFTER DELETE ON \\"album_user\\"\\n REFERENCING OLD TABLE AS \\"old\\"\\n FOR EACH ROW\\n EXECUTE FUNCTION album_user_delete();"}'::jsonb);`.execute(db); +} + +export async function down(db: Kysely): Promise { + await sql`DROP TRIGGER "album_user_delete" ON "album_user";`.execute(db); + await sql`DROP FUNCTION album_user_delete;`.execute(db); + await sql`DELETE FROM "migration_overrides" WHERE "name" = 'function_album_user_delete';`.execute(db); + await sql`DELETE FROM "migration_overrides" WHERE "name" = 'trigger_album_user_delete';`.execute(db); +} diff --git a/server/src/schema/migrations/1786741078327-AddWorkflowLogsTable.ts b/server/src/schema/migrations/1786741078327-AddWorkflowLogsTable.ts new file mode 100644 index 0000000000..13fa5f5f97 --- /dev/null +++ b/server/src/schema/migrations/1786741078327-AddWorkflowLogsTable.ts @@ -0,0 +1,24 @@ +import { Kysely, sql } from 'kysely'; + +export async function up(db: Kysely): Promise { + await sql`ALTER TABLE "workflow" ADD "logging" boolean NOT NULL DEFAULT false;`.execute(db); + await sql`CREATE TABLE "workflow_log" ( + "id" uuid NOT NULL DEFAULT uuid_generate_v4(), + "createdAt" timestamp with time zone NOT NULL DEFAULT now(), + "workflowId" uuid NOT NULL, + "result" character varying NOT NULL, + "workflowStepId" uuid, + "triggerDataId" uuid, + "runId" uuid NOT NULL, + CONSTRAINT "workflow_log_workflowId_fkey" FOREIGN KEY ("workflowId") REFERENCES "workflow" ("id") ON UPDATE CASCADE ON DELETE CASCADE, + CONSTRAINT "workflow_log_workflowStepId_fkey" FOREIGN KEY ("workflowStepId") REFERENCES "workflow_step" ("id") ON UPDATE CASCADE ON DELETE SET NULL, + CONSTRAINT "workflow_log_pkey" PRIMARY KEY ("id") +);`.execute(db); + await sql`CREATE INDEX "workflow_log_workflowId_idx" ON "workflow_log" ("workflowId");`.execute(db); + await sql`CREATE INDEX "workflow_log_workflowStepId_idx" ON "workflow_log" ("workflowStepId");`.execute(db); +} + +export async function down(db: Kysely): Promise { + await sql`ALTER TABLE "workflow" DROP COLUMN "logging";`.execute(db); + await sql`DROP TABLE "workflow_log";`.execute(db); +} diff --git a/server/src/schema/tables/album-user.table.ts b/server/src/schema/tables/album-user.table.ts index 677d6ca2f2..c015c1354d 100644 --- a/server/src/schema/tables/album-user.table.ts +++ b/server/src/schema/tables/album-user.table.ts @@ -13,7 +13,7 @@ import { import { CreateIdColumn, UpdatedAtTrigger, UpdateIdColumn } from 'src/decorators'; import { AlbumUserRole } from 'src/enum'; import { album_user_role_enum } from 'src/schema/enums'; -import { album_user_after_insert, album_user_delete_audit } from 'src/schema/functions'; +import { album_user_after_insert, album_user_delete, album_user_delete_audit } from 'src/schema/functions'; import { AlbumTable } from 'src/schema/tables/album.table'; import { UserTable } from 'src/schema/tables/user.table'; @@ -38,6 +38,7 @@ import { UserTable } from 'src/schema/tables/user.table'; referencingOldTableAs: 'old', when: 'pg_trigger_depth() <= 1', }) +@AfterDeleteTrigger({ scope: 'row', function: album_user_delete, referencingOldTableAs: 'old' }) export class AlbumUserTable { @ForeignKeyColumn(() => AlbumTable, { onDelete: 'CASCADE', diff --git a/server/src/schema/tables/album.table.ts b/server/src/schema/tables/album.table.ts index f54658be65..c0d13d4902 100644 --- a/server/src/schema/tables/album.table.ts +++ b/server/src/schema/tables/album.table.ts @@ -36,8 +36,8 @@ export class AlbumTable { @UpdateDateColumn() updatedAt!: Generated; - @Column({ type: 'text', default: '' }) - description!: Generated; + @Column({ type: 'text', nullable: true }) + description!: string | null; @DeleteDateColumn() deletedAt!: Timestamp | null; diff --git a/server/src/schema/tables/session.table.ts b/server/src/schema/tables/session.table.ts index 950c1eeffd..68381b7f8e 100644 --- a/server/src/schema/tables/session.table.ts +++ b/server/src/schema/tables/session.table.ts @@ -55,4 +55,7 @@ export class SessionTable { @Column({ nullable: true, index: true }) oauthSid!: string | null; + + @Column({ nullable: true }) + oauthBearerToken!: string | null; } diff --git a/server/src/schema/tables/user.table.ts b/server/src/schema/tables/user.table.ts index 0839924d2a..50d56d9067 100644 --- a/server/src/schema/tables/user.table.ts +++ b/server/src/schema/tables/user.table.ts @@ -31,8 +31,8 @@ export class UserTable { @Column({ unique: true }) email!: string; - @Column({ default: '' }) - password!: Generated; + @Column({ nullable: true, default: null }) + password!: string | null; @Column({ nullable: true }) pinCode!: string | null; diff --git a/server/src/schema/tables/workflow-log.table.ts b/server/src/schema/tables/workflow-log.table.ts new file mode 100644 index 0000000000..e720cb2a37 --- /dev/null +++ b/server/src/schema/tables/workflow-log.table.ts @@ -0,0 +1,36 @@ +import { + Column, + CreateDateColumn, + ForeignKeyColumn, + Generated, + PrimaryGeneratedColumn, + Table, + Timestamp, +} from '@immich/sql-tools'; +import { WorkflowResult } from 'src/enum'; +import { WorkflowStepTable } from 'src/schema/tables/workflow-step.table'; +import { WorkflowTable } from 'src/schema/tables/workflow.table'; + +@Table('workflow_log') +export class WorkflowLogTable { + @PrimaryGeneratedColumn() + id!: Generated; + + @CreateDateColumn() + createdAt!: Generated; + + @ForeignKeyColumn(() => WorkflowTable, { onUpdate: 'CASCADE', onDelete: 'CASCADE', index: true }) + workflowId!: string; + + @Column() + result!: WorkflowResult; + + @ForeignKeyColumn(() => WorkflowStepTable, { onDelete: 'SET NULL', onUpdate: 'CASCADE', nullable: true }) + workflowStepId!: string | null; + + @Column({ type: 'uuid', nullable: true }) + triggerDataId!: string | null; + + @Column({ type: 'uuid' }) + runId!: string; +} diff --git a/server/src/schema/tables/workflow.table.ts b/server/src/schema/tables/workflow.table.ts index 944fffd9d5..c0c9dc94e4 100644 --- a/server/src/schema/tables/workflow.table.ts +++ b/server/src/schema/tables/workflow.table.ts @@ -41,4 +41,7 @@ export class WorkflowTable { @Column({ type: 'boolean', default: true }) enabled!: Generated; + + @Column({ type: 'boolean', default: false }) + logging!: Generated; } diff --git a/server/src/services/activity.service.ts b/server/src/services/activity.service.ts index b1c25f8286..6e179f10f2 100644 --- a/server/src/services/activity.service.ts +++ b/server/src/services/activity.service.ts @@ -44,7 +44,7 @@ export class ActivityService extends BaseService { }; let activity: Activity | undefined; - let duplicate = false; + let isDuplicate = false; if (dto.type === ReactionType.LIKE) { delete dto.comment; @@ -54,7 +54,7 @@ export class ActivityService extends BaseService { assetId: dto.assetId ?? null, isLiked: true, }); - duplicate = !!activity; + isDuplicate = !!activity; } if (!activity) { @@ -65,7 +65,7 @@ export class ActivityService extends BaseService { }); } - return { duplicate, value: mapActivity(activity) }; + return { duplicate: isDuplicate, value: mapActivity(activity) }; } async delete(auth: AuthDto, id: string): Promise { diff --git a/server/src/services/album.service.spec.ts b/server/src/services/album.service.spec.ts index f1d125993c..a97407b2d9 100644 --- a/server/src/services/album.service.spec.ts +++ b/server/src/services/album.service.spec.ts @@ -663,6 +663,7 @@ describe(AlbumService.name, () => { const album = AlbumFactory.from().albumUser({ userId: user.id }).build(); const { user: owner } = album.albumUsers.find(({ role }) => role === AlbumUserRole.Owner)!; mocks.access.album.checkOwnerAccess.mockResolvedValue(new Set([album.id])); + mocks.album.getById.mockResolvedValue(getForAlbum(album)); mocks.albumUser.update.mockResolvedValue(); await sut.updateUser(AuthFactory.create(owner), album.id, user.id, { role: AlbumUserRole.Viewer }); @@ -840,7 +841,8 @@ describe(AlbumService.name, () => { expect(mocks.album.addAssetIds).toHaveBeenCalledWith(album.id, [asset1.id, asset2.id, asset3.id]); expect(mocks.event.emit).toHaveBeenCalledWith('AlbumUpdate', { id: album.id, - recipientId: owner.id, + userIds: album.albumUsers.map(({ user }) => user.id), + recipientIds: [owner.id], }); }); @@ -1090,11 +1092,13 @@ describe(AlbumService.name, () => { ]); expect(mocks.event.emit).toHaveBeenCalledWith('AlbumUpdate', { id: album1.id, - recipientId: owner1.id, + userIds: album1.albumUsers.map(({ user }) => user.id), + recipientIds: [owner1.id], }); expect(mocks.event.emit).toHaveBeenCalledWith('AlbumUpdate', { id: album2.id, - recipientId: owner2.id, + userIds: album2.albumUsers.map(({ user }) => user.id), + recipientIds: [owner2.id], }); }); diff --git a/server/src/services/album.service.ts b/server/src/services/album.service.ts index 5f4bc56d98..a94049bbd2 100644 --- a/server/src/services/album.service.ts +++ b/server/src/services/album.service.ts @@ -19,6 +19,7 @@ import { AlbumAssetCount, AlbumInfoOptions } from 'src/repositories/album.reposi import { BaseService } from 'src/services/base.service'; import { addAssets, removeAssets } from 'src/utils/asset.util'; import { asDateTimeString } from 'src/utils/date'; +import { findOrFail } from 'src/utils/misc'; import { getPreferences } from 'src/utils/preferences'; @Injectable() @@ -190,11 +191,9 @@ export class AlbumService extends BaseService { auth.user.id, ); - const allUsersExceptUs = album.albumUsers.map(({ user }) => user.id).filter((userId) => userId !== auth.user.id); - - for (const recipientId of allUsersExceptUs) { - await this.eventRepository.emit('AlbumUpdate', { id, recipientId }); - } + const userIds = album.albumUsers.map(({ user }) => user.id); + const recipientIds = userIds.filter((userId) => userId !== auth.user.id); + await this.eventRepository.emit('AlbumUpdate', { id, userIds, recipientIds }); } return results; @@ -223,10 +222,10 @@ export class AlbumService extends BaseService { } const albumAssetValues: { albumId: string; assetId: string }[] = []; - const events: { id: string; recipients: string[] }[] = []; + const events: { id: string; userIds: string[]; recipientIds: string[] }[] = []; for (const albumId of allowedAlbumIds) { const existingAssetIds = await this.albumRepository.getAssetIds(albumId, [...allowedAssetIds]); - const notPresentAssetIds = [...allowedAssetIds].filter((id) => !existingAssetIds.has(id)); + const notPresentAssetIds = [...allowedAssetIds.difference(existingAssetIds)]; if (notPresentAssetIds.length === 0) { continue; } @@ -246,15 +245,14 @@ export class AlbumService extends BaseService { }, auth.user.id, ); - const allUsersExceptUs = album.albumUsers.map(({ user }) => user.id).filter((userId) => userId !== auth.user.id); - events.push({ id: albumId, recipients: allUsersExceptUs }); + const userIds = album.albumUsers.map(({ user }) => user.id); + const recipientIds = userIds.filter((userId) => userId !== auth.user.id); + events.push({ id: albumId, userIds, recipientIds }); } await this.albumRepository.addAssetIdsToAlbums(albumAssetValues); for (const event of events) { - for (const recipientId of event.recipients) { - await this.eventRepository.emit('AlbumUpdate', { id: event.id, recipientId }); - } + await this.eventRepository.emit('AlbumUpdate', event); } return results; @@ -271,8 +269,16 @@ export class AlbumService extends BaseService { ); const removedIds = results.filter(({ success }) => success).map(({ id }) => id); - if (removedIds.length > 0 && album.albumThumbnailAssetId && removedIds.includes(album.albumThumbnailAssetId)) { - await this.albumRepository.updateThumbnails(); + if (removedIds.length > 0) { + if (album.albumThumbnailAssetId && removedIds.includes(album.albumThumbnailAssetId)) { + await this.albumRepository.updateThumbnails(); + } + + await this.eventRepository.emit('AlbumUpdate', { + id, + userIds: album.albumUsers.map(({ user }) => user.id), + recipientIds: [], + }); } return results; @@ -288,7 +294,7 @@ export class AlbumService extends BaseService { throw new BadRequestException('Cannot add another owner'); } - const exists = album.albumUsers.find(({ user: { id } }) => id === userId); + const exists = album.albumUsers.some(({ user: { id } }) => id === userId); if (exists) { continue; } @@ -303,7 +309,7 @@ export class AlbumService extends BaseService { await this.eventRepository.emit('AlbumInvite', { id, userId, senderName: auth.user.name }); } - return this.findOrFail(id, auth.user.id, { withAssets: true }).then(mapAlbum); + return mapAlbum(await this.findOrFail(id, auth.user.id, { withAssets: true })); } async removeUser(auth: AuthDto, id: string, userId: string | 'me'): Promise { @@ -335,14 +341,18 @@ export class AlbumService extends BaseService { async updateUser(auth: AuthDto, id: string, userId: string, dto: UpdateAlbumUserDto): Promise { await this.requireAccess({ auth, permission: Permission.AlbumShare, ids: [id] }); + + const album = await this.findOrFail(id, userId, { withAssets: false }); + const owner = album.albumUsers[0]; + + if (owner.user.id === userId) { + throw new BadRequestException('User is owner'); + } + await this.albumUserRepository.update({ albumId: id, userId }, { role: dto.role }); } - private async findOrFail(id: string, authUserId: string, options: AlbumInfoOptions) { - const album = await this.albumRepository.getById(id, options, authUserId); - if (!album) { - throw new BadRequestException('Album not found'); - } - return album; + private findOrFail(id: string, authUserId: string, options: AlbumInfoOptions) { + return findOrFail(() => this.albumRepository.getById(id, options, authUserId), 'Album'); } } diff --git a/server/src/services/api.service.ts b/server/src/services/api.service.ts index c8e6b39b21..29e84eda7b 100644 --- a/server/src/services/api.service.ts +++ b/server/src/services/api.service.ts @@ -20,16 +20,9 @@ export const render = (index: string, meta: OpenGraphTags) => { - ${imageUrl ? `` : ''} + ${imageUrl ? `` : ''}`; - - - - - - ${imageUrl ? `` : ''}`; - - return index.replace('', tags); + return index.replace('', () => tags); }; @Injectable() diff --git a/server/src/services/asset-media.service.spec.ts b/server/src/services/asset-media.service.spec.ts index 9ef72a0897..14527debba 100644 --- a/server/src/services/asset-media.service.spec.ts +++ b/server/src/services/asset-media.service.spec.ts @@ -163,8 +163,8 @@ const assetEntity = Object.freeze({ duration: null, files: [] as AssetFile[], exifInfo: { - latitude: 49.533_547, - longitude: 10.703_075, + latitude: 49.533547, + longitude: 10.703075, }, livePhotoVideoId: null, } as MapAsset); @@ -269,6 +269,10 @@ describe(AssetMediaService.name, () => { 'random-uuid.jpg', ); }); + + it('should accept filenames with just an extension', () => { + expect(sut.getUploadFilename(uploadFile.filename(UploadFieldName.ASSET_DATA, '.jpg'))).toEqual('random-uuid.jpg'); + }); }); describe('getUploadFolder', () => { @@ -313,6 +317,12 @@ describe(AssetMediaService.name, () => { ).rejects.toBeInstanceOf(BadRequestException); expect(mocks.asset.create).not.toHaveBeenCalled(); + expect(mocks.asset.remove).not.toHaveBeenCalled(); + expect(mocks.job.queue).toHaveBeenCalledWith({ + name: JobName.FileDelete, + data: { files: [file.originalPath, undefined] }, + }); + expect(mocks.event.emit).not.toHaveBeenCalled(); expect(mocks.user.updateUsage).not.toHaveBeenCalledWith(authStub.user1.user.id, file.size); expect(mocks.storage.utimes).not.toHaveBeenCalledWith( file.originalPath, diff --git a/server/src/services/asset-media.service.ts b/server/src/services/asset-media.service.ts index de8c2bbc91..1bb9d1e5b6 100644 --- a/server/src/services/asset-media.service.ts +++ b/server/src/services/asset-media.service.ts @@ -1,8 +1,7 @@ import { BadRequestException, Injectable, InternalServerErrorException, NotFoundException } from '@nestjs/common'; -import { extname } from 'node:path'; import sanitize from 'sanitize-filename'; import { StorageCore } from 'src/cores/storage.core'; -import { AuthSharedLink } from 'src/database'; +import { Asset, AuthSharedLink } from 'src/database'; import { AssetBulkUploadCheckResponseDto, AssetMediaResponseDto, @@ -92,8 +91,7 @@ export class AssetMediaService extends BaseService { getUploadFilename({ auth, fieldName, file, body }: UploadRequest): string { requireUploadAccess(auth); - const extension = extname(body.filename || file.originalName); - + const extension = getFilenameExtension(body.filename || file.originalName); const lookup = { [UploadFieldName.ASSET_DATA]: extension, [UploadFieldName.SIDECAR_DATA]: '.xmp', @@ -130,6 +128,7 @@ export class AssetMediaService extends BaseService { file: UploadFile, sidecarFile?: UploadFile, ): Promise { + let asset: Asset | undefined; try { await this.requireAccess({ auth, @@ -147,7 +146,7 @@ export class AssetMediaService extends BaseService { ); } - const asset = await this.assetRepository.create({ + asset = await this.assetRepository.create({ ownerId: auth.user.id, libraryId: null, @@ -217,6 +216,11 @@ export class AssetMediaService extends BaseService { return { status: AssetMediaStatus.DUPLICATE, id: duplicateId }; } + // clean up the asset row if one was created + if (asset) { + await this.assetRepository.remove({ id: asset.id }); + } + this.logger.error(`Error uploading file ${error}`, error?.stack); throw error; } @@ -342,9 +346,23 @@ export class AssetMediaService extends BaseService { } private async addToSharedLink(sharedLink: AuthSharedLink, assetId: string) { - await (sharedLink.albumId - ? this.albumRepository.addAssetIds(sharedLink.albumId, [assetId]) - : this.sharedLinkRepository.addAssets(sharedLink.id, [assetId])); + if (!sharedLink.albumId) { + await this.sharedLinkRepository.addAssets(sharedLink.id, [assetId]); + return; + } + + const album = await this.albumRepository.getById(sharedLink.albumId, { withAssets: false }); + if (!album) { + return; + } + + await this.albumRepository.addAssetIds(album.id, [assetId]); + const userIds = album.albumUsers.map(({ user }) => user.id); + await this.eventRepository.emit('AlbumUpdate', { + id: album.id, + userIds, + recipientIds: userIds, + }); } private requireQuota(auth: AuthDto, size: number) { diff --git a/server/src/services/asset.service.spec.ts b/server/src/services/asset.service.spec.ts index 75e7fc5e87..0264484bfc 100755 --- a/server/src/services/asset.service.spec.ts +++ b/server/src/services/asset.service.spec.ts @@ -568,6 +568,34 @@ describe(AssetService.name, () => { expect(mocks.stack.delete).toHaveBeenCalledWith(asset.stackId); }); + it('should delete the stack when a non-primary asset is deleted and only the primary would remain', async () => { + const asset = AssetFactory.from().build(); + const deletionAsset = { + ...getForAssetDeletion(asset), + stack: { id: newUuid(), primaryAssetId: newUuid(), assets: [{ id: asset.id }] }, + }; + mocks.stack.delete.mockResolvedValue(); + mocks.assetJob.getForAssetDeletion.mockResolvedValue(deletionAsset); + + await sut.handleAssetDeletion({ id: asset.id, deleteOnDisk: true }); + + expect(mocks.stack.delete).toHaveBeenCalledWith(deletionAsset.stack.id); + }); + + it('should keep the stack when a non-primary asset is deleted and the primary plus another asset remain', async () => { + const asset = AssetFactory.from().build(); + const deletionAsset = { + ...getForAssetDeletion(asset), + stack: { id: newUuid(), primaryAssetId: newUuid(), assets: [{ id: asset.id }, { id: newUuid() }] }, + }; + mocks.assetJob.getForAssetDeletion.mockResolvedValue(deletionAsset); + + await sut.handleAssetDeletion({ id: asset.id, deleteOnDisk: true }); + + expect(mocks.stack.delete).not.toHaveBeenCalled(); + expect(mocks.stack.update).not.toHaveBeenCalled(); + }); + it('should delete a live photo', async () => { const motionAsset = AssetFactory.from({ type: AssetType.Video, visibility: AssetVisibility.Hidden }).build(); const asset = AssetFactory.create({ livePhotoVideoId: motionAsset.id }); diff --git a/server/src/services/asset.service.ts b/server/src/services/asset.service.ts index e2d2d95f81..15385df0e0 100644 --- a/server/src/services/asset.service.ts +++ b/server/src/services/asset.service.ts @@ -1,7 +1,6 @@ import { BadRequestException, Injectable } from '@nestjs/common'; import _ from 'lodash'; import { DateTime, Duration } from 'luxon'; -import { JOBS_ASSET_PAGINATION_SIZE } from 'src/constants'; import { AssetFile } from 'src/database'; import { OnJob } from 'src/decorators'; import { AssetResponseDto, SanitizedAssetResponseDto, mapAsset } from 'src/dtos/asset-response.dto'; @@ -46,6 +45,7 @@ import { } from 'src/utils/asset.util'; import { updateLockedColumns } from 'src/utils/database'; import { extractTimeZone } from 'src/utils/date'; +import { batched, findOrFail } from 'src/utils/misc'; import { transformOcrBoundingBox } from 'src/utils/transform'; @Injectable() @@ -278,29 +278,12 @@ export class AssetService extends BaseService { .minus(Duration.fromObject({ days: trashedDays })) .toJSDate(); - let chunk: Array<{ id: string; isOffline: boolean }> = []; - const queueChunk = async () => { - if (chunk.length > 0) { - await this.jobRepository.queueAll( - chunk.map(({ id, isOffline }) => ({ - name: JobName.AssetDelete, - data: { id, deleteOnDisk: !isOffline }, - })), - ); - chunk = []; - } - }; - - const assets = this.assetJobRepository.streamForDeletedJob(trashedBefore); - for await (const asset of assets) { - chunk.push(asset); - if (chunk.length >= JOBS_ASSET_PAGINATION_SIZE) { - await queueChunk(); - } + for await (const assets of batched(this.assetJobRepository.streamForDeletedJob(trashedBefore))) { + await this.jobRepository.queueAll( + assets.map(({ id, isOffline }) => ({ name: JobName.AssetDelete, data: { id, deleteOnDisk: !isOffline } })), + ); } - await queueChunk(); - return JobStatus.Success; } @@ -314,18 +297,25 @@ export class AssetService extends BaseService { return JobStatus.Failed; } - // replace the parent of the stack children with a new asset - if (asset.stack?.primaryAssetId === id) { - // this only includes timeline visible assets and excludes the primary asset - const stackAssetIds = asset.stack.assets.map((a) => a.id); - if (stackAssetIds.length >= 2) { - const newPrimaryAssetId = stackAssetIds.find((a) => a !== id)!; + if (asset.stack) { + // asset.stack.assets only includes timeline visible assets and excludes the primary asset + const remainingStackAssetIds = asset.stack.assets.map((a) => a.id).filter((assetId) => assetId !== id); + + // the primary survives unless it is the asset being deleted + let remainingCount = remainingStackAssetIds.length; + if (asset.stack.primaryAssetId !== id) { + remainingCount++; + } + + if (remainingCount < 2) { + // 0 or 1 asset would remain: dissolve the stack so it does not linger as a single-asset stack + await this.stackRepository.delete(asset.stack.id); + } else if (asset.stack.primaryAssetId === id) { + // the primary is being deleted but others remain: promote a new primary await this.stackRepository.update(asset.stack.id, { id: asset.stack.id, - primaryAssetId: newPrimaryAssetId, + primaryAssetId: remainingStackAssetIds[0], }); - } else { - await this.stackRepository.delete(asset.stack.id); } } @@ -487,12 +477,8 @@ export class AssetService extends BaseService { await this.jobRepository.queueAll(jobs); } - private async findOrFail(id: string) { - const asset = await this.assetRepository.getById(id); - if (!asset) { - throw new BadRequestException('Asset not found'); - } - return asset; + private findOrFail(id: string) { + return findOrFail(() => this.assetRepository.getById(id), 'Asset'); } private async updateExif(dto: { diff --git a/server/src/services/auth.service.spec.ts b/server/src/services/auth.service.spec.ts index a824b68814..48dcf5a509 100644 --- a/server/src/services/auth.service.spec.ts +++ b/server/src/services/auth.service.spec.ts @@ -160,7 +160,25 @@ describe(AuthService.name, () => { await expect(sut.logout(auth, AuthType.OAuth)).resolves.toEqual({ successful: true, - redirectUri: 'http://end-session-endpoint', + redirectUri: 'http://end-session-endpoint/', + }); + }); + + it('should include the id token hint for OAuth sessions', async () => { + const auth = AuthFactory.from().session().build(); + + mocks.systemMetadata.get.mockResolvedValue(systemConfigStub.enabled); + mocks.session.get.mockResolvedValue({ + id: auth.session!.id, + expiresAt: null, + oauthBearerToken: 'id-token', + pinExpiresAt: null, + }); + mocks.session.delete.mockResolvedValue(); + + await expect(sut.logout(auth, AuthType.OAuth)).resolves.toEqual({ + successful: true, + redirectUri: 'http://end-session-endpoint/?id_token_hint=id-token', }); }); @@ -173,7 +191,7 @@ describe(AuthService.name, () => { await expect(sut.logout(auth, AuthType.OAuth)).resolves.toEqual({ successful: true, - redirectUri: 'http://custom-logout-url', + redirectUri: 'http://custom-logout-url/', }); }); @@ -186,7 +204,7 @@ describe(AuthService.name, () => { await expect(sut.logout(auth, AuthType.OAuth)).resolves.toEqual({ successful: true, - redirectUri: 'http://end-session-endpoint', + redirectUri: 'http://end-session-endpoint/', }); }); @@ -201,6 +219,12 @@ describe(AuthService.name, () => { it('should delete the access token', async () => { const auth = { user: { id: '123' }, session: { id: 'token123' } } as AuthDto; + mocks.session.get.mockResolvedValue({ + id: auth.session!.id, + expiresAt: null, + oauthBearerToken: null, + pinExpiresAt: null, + }); mocks.session.delete.mockResolvedValue(); await expect(sut.logout(auth, AuthType.Password)).resolves.toEqual({ @@ -283,16 +307,7 @@ describe(AuthService.name, () => { describe('adminSignUp', () => { const dto: SignUpDto = { email: 'test@immich.com', password: 'password', name: 'immich admin' }; - it('should only allow one admin', async () => { - mocks.user.getAdmin.mockResolvedValue({} as UserAdmin); - - await expect(sut.adminSignUp(dto)).rejects.toBeInstanceOf(BadRequestException); - - expect(mocks.user.getAdmin).toHaveBeenCalled(); - }); - it('should sign up the admin', async () => { - mocks.user.getAdmin.mockResolvedValue(void 0); mocks.user.create.mockResolvedValue({ ...userStub.admin, ...dto, @@ -310,7 +325,6 @@ describe(AuthService.name, () => { name: 'immich admin', }); - expect(mocks.user.getAdmin).toHaveBeenCalled(); expect(mocks.user.create).toHaveBeenCalled(); }); }); @@ -653,13 +667,13 @@ describe(AuthService.name, () => { describe('getMobileRedirect', () => { it('should pass along the query params', () => { - expect(sut.getMobileRedirect('http://immich.app?code=123&state=456')).toEqual( + expect(sut.getMobileRedirect('https://immich.app?code=123&state=456')).toEqual( 'app.immich:///oauth-callback?code=123&state=456', ); }); it('should work if called without query params', () => { - expect(sut.getMobileRedirect('http://immich.app')).toEqual('app.immich:///oauth-callback?'); + expect(sut.getMobileRedirect('https://immich.app')).toEqual('app.immich:///oauth-callback?'); }); }); @@ -722,6 +736,27 @@ describe(AuthService.name, () => { expect(mocks.user.update).toHaveBeenCalledWith(user.id, { oauthId: profile.sub }); }); + it('should store the OAuth bearer token on the new session', async () => { + const user = UserFactory.create(); + const profile = OAuthProfileFactory.create(); + + mocks.systemMetadata.get.mockResolvedValue(systemConfigStub.oauthEnabled); + mocks.oauth.getProfileAndOAuthSid.mockResolvedValue({ profile, sid: 'oauth-sid', idToken: 'oauth-bearer-token' }); + mocks.user.getByEmail.mockResolvedValue(user); + mocks.user.update.mockResolvedValue(user); + mocks.session.create.mockResolvedValue(SessionFactory.create()); + + await sut.callback( + { url: 'http://immich/auth/login?code=abc123', state: 'xyz789', codeVerifier: 'foobar' }, + {}, + loginDetails, + ); + + expect(mocks.session.create).toHaveBeenCalledWith( + expect.objectContaining({ oauthSid: 'oauth-sid', oauthBearerToken: 'oauth-bearer-token' }), + ); + }); + it('should normalize the email from the OAuth profile before linking', async () => { const user = UserFactory.create(); const profile = OAuthProfileFactory.create({ email: ' TEST@IMMICH.CLOUD ' }); @@ -979,7 +1014,7 @@ describe(AuthService.name, () => { }); expect(mocks.oauth.getProfilePicture).toHaveBeenCalledWith(profile.picture); expect(mocks.media.generateThumbnail).toHaveBeenCalledWith( - Buffer.from(pictureBytes.buffer), + Buffer.from(pictureBytes.buffer, pictureBytes.byteOffset, pictureBytes.byteLength), expect.objectContaining({ format: 'webp', processInvalidImages: false }), expect.stringContaining(`/data/profile/${user.id}/${fileId}.webp`), ); @@ -1095,6 +1130,125 @@ describe(AuthService.name, () => { expect(mocks.user.create).toHaveBeenCalledWith(expect.objectContaining({ isAdmin: true })); }); + + it('should create an admin user if the role claim is an array containing admin', async () => { + mocks.systemMetadata.get.mockResolvedValue(systemConfigStub.oauthWithAutoRegister); + mocks.oauth.getProfileAndOAuthSid.mockResolvedValue({ + profile: OAuthProfileFactory.create({ immich_role: ['user', 'admin'] }), + }); + mocks.user.getByEmail.mockResolvedValue(void 0); + mocks.user.getByOAuthId.mockResolvedValue(void 0); + mocks.user.create.mockResolvedValue(UserFactory.create({ oauthId: 'oauth-id' })); + mocks.session.create.mockResolvedValue(SessionFactory.create()); + + await sut.callback( + { url: 'http://immich/auth/login?code=abc123', state: 'xyz789', codeVerifier: 'foo' }, + {}, + loginDetails, + ); + + expect(mocks.user.create).toHaveBeenCalledWith(expect.objectContaining({ isAdmin: true })); + }); + + it('should create a standard user if the role claim is an array containing only user', async () => { + mocks.systemMetadata.get.mockResolvedValue(systemConfigStub.oauthWithAutoRegister); + mocks.oauth.getProfileAndOAuthSid.mockResolvedValue({ + profile: OAuthProfileFactory.create({ immich_role: ['user'] }), + }); + mocks.user.getByEmail.mockResolvedValue(void 0); + mocks.user.getByOAuthId.mockResolvedValue(void 0); + mocks.user.getAdmin.mockResolvedValue(UserFactory.create({ isAdmin: true })); + mocks.user.create.mockResolvedValue(UserFactory.create({ oauthId: 'oauth-id' })); + mocks.session.create.mockResolvedValue(SessionFactory.create()); + + await sut.callback( + { url: 'http://immich/auth/login?code=abc123', state: 'xyz789', codeVerifier: 'foo' }, + {}, + loginDetails, + ); + + expect(mocks.user.create).toHaveBeenCalledWith(expect.objectContaining({ isAdmin: false })); + }); + + it('should promote an existing user to admin if the role claim contains admin on login', async () => { + const user = UserFactory.create({ isAdmin: false, oauthId: 'oauth-id' }); + + mocks.systemMetadata.get.mockResolvedValue(systemConfigStub.oauthEnabled); + mocks.oauth.getProfileAndOAuthSid.mockResolvedValue({ + profile: OAuthProfileFactory.create({ sub: user.oauthId, immich_role: 'admin' }), + }); + mocks.user.getByOAuthId.mockResolvedValue(user); + mocks.user.update.mockResolvedValue({ ...user, isAdmin: true }); + mocks.session.create.mockResolvedValue(SessionFactory.create()); + + await sut.callback( + { url: 'http://immich/auth/login?code=abc123', state: 'xyz789', codeVerifier: 'foo' }, + {}, + loginDetails, + ); + + expect(mocks.user.update).toHaveBeenCalledWith(user.id, { isAdmin: true }); + }); + + it('should demote an existing admin if the role claim only contains user on login', async () => { + const user = UserFactory.create({ isAdmin: true, oauthId: 'oauth-id' }); + + mocks.systemMetadata.get.mockResolvedValue(systemConfigStub.oauthEnabled); + mocks.oauth.getProfileAndOAuthSid.mockResolvedValue({ + profile: OAuthProfileFactory.create({ sub: user.oauthId, immich_role: ['user'] }), + }); + mocks.user.getByOAuthId.mockResolvedValue(user); + mocks.user.update.mockResolvedValue({ ...user, isAdmin: false }); + mocks.session.create.mockResolvedValue(SessionFactory.create()); + + await sut.callback( + { url: 'http://immich/auth/login?code=abc123', state: 'xyz789', codeVerifier: 'foo' }, + {}, + loginDetails, + ); + + expect(mocks.user.update).toHaveBeenCalledWith(user.id, { isAdmin: false }); + }); + + it('should not change isAdmin for an existing user if the role claim is blank', async () => { + const user = UserFactory.create({ isAdmin: true, oauthId: 'oauth-id' }); + + mocks.systemMetadata.get.mockResolvedValue(systemConfigStub.oauthEnabled); + mocks.oauth.getProfileAndOAuthSid.mockResolvedValue({ + profile: OAuthProfileFactory.create({ sub: user.oauthId }), + }); + mocks.user.getByOAuthId.mockResolvedValue(user); + mocks.session.create.mockResolvedValue(SessionFactory.create()); + + await sut.callback( + { url: 'http://immich/auth/login?code=abc123', state: 'xyz789', codeVerifier: 'foo' }, + {}, + loginDetails, + ); + + expect(mocks.user.update).not.toHaveBeenCalled(); + }); + + it('should re-evaluate the role claim for a user linked by email', async () => { + const user = UserFactory.create({ isAdmin: false }); + const profile = OAuthProfileFactory.create({ immich_role: 'admin' }); + + mocks.systemMetadata.get.mockResolvedValue(systemConfigStub.oauthEnabled); + mocks.oauth.getProfileAndOAuthSid.mockResolvedValue({ profile }); + mocks.user.getByEmail.mockResolvedValue(user); + mocks.user.update.mockResolvedValueOnce({ ...user, oauthId: profile.sub }); + mocks.user.update.mockResolvedValueOnce({ ...user, oauthId: profile.sub, isAdmin: true }); + mocks.session.create.mockResolvedValue(SessionFactory.create()); + + await sut.callback( + { url: 'http://immich/auth/login?code=abc123', state: 'xyz789', codeVerifier: 'foobar' }, + {}, + loginDetails, + ); + + expect(mocks.user.update).toHaveBeenCalledWith(user.id, { oauthId: profile.sub }); + expect(mocks.user.update).toHaveBeenCalledWith(user.id, { isAdmin: true }); + }); }); describe('link', () => { @@ -1125,6 +1279,7 @@ describe(AuthService.name, () => { mocks.oauth.getProfileAndOAuthSid.mockResolvedValue({ profile: { sub: 'sub' }, sid: session.oauthSid ?? undefined, + idToken: session.oauthBearerToken ?? undefined, }); mocks.user.update.mockResolvedValue(user); mocks.session.update.mockResolvedValue(session); @@ -1135,7 +1290,10 @@ describe(AuthService.name, () => { {}, ); - expect(mocks.session.update).toHaveBeenCalledWith(session.id, { oauthSid: session.oauthSid }); + expect(mocks.session.update).toHaveBeenCalledWith(session.id, { + oauthSid: session.oauthSid, + oauthBearerToken: session.oauthBearerToken, + }); expect(mocks.user.update).toHaveBeenCalledWith(auth.user.id, { oauthId: 'sub' }); }); @@ -1169,7 +1327,7 @@ describe(AuthService.name, () => { expect(mocks.user.update).toHaveBeenCalledWith(auth.user.id, { oauthId: '' }); }); - it('should unlink an account and remove the oauthSid from the session', async () => { + it('should unlink an account and remove the OAuth data from the session', async () => { const user = UserFactory.create(); const session = SessionFactory.create(); const auth = AuthFactory.from(user).session(session).build(); @@ -1180,7 +1338,7 @@ describe(AuthService.name, () => { await sut.unlink(auth); - expect(mocks.session.update).toHaveBeenCalledWith(session.id, { oauthSid: null }); + expect(mocks.session.update).toHaveBeenCalledWith(session.id, { oauthSid: null, oauthBearerToken: null }); expect(mocks.user.update).toHaveBeenCalledWith(auth.user.id, { oauthId: '' }); }); }); diff --git a/server/src/services/auth.service.ts b/server/src/services/auth.service.ts index 5323252738..5603819212 100644 --- a/server/src/services/auth.service.ts +++ b/server/src/services/auth.service.ts @@ -65,9 +65,9 @@ export class AuthService extends BaseService { const user = await this.userRepository.getByEmail(dto.email, { withPassword: true }); // Always run bcrypt so response time is constant regardless of whether the email // is registered, preventing timing-based user enumeration. - const authenticated = this.cryptoRepository.compareBcrypt(dto.password, user?.password ?? LOGIN_DUMMY_HASH); + const isAuthenticated = this.cryptoRepository.compareBcrypt(dto.password, user?.password ?? LOGIN_DUMMY_HASH); - if (!user || !user.password || !authenticated) { + if (!user || !user.password || !isAuthenticated) { this.logger.warn(`Failed login attempt for user ${dto.email} from ip address ${details.clientIp}`); throw new UnauthorizedException('Incorrect email or password'); } @@ -76,14 +76,17 @@ export class AuthService extends BaseService { } async logout(auth: AuthDto, authType: AuthType): Promise { + let oauthBearerToken: string | undefined; if (auth.session) { + const session = await this.sessionRepository.get(auth.session.id); + oauthBearerToken = session?.oauthBearerToken ?? undefined; await this.sessionRepository.delete(auth.session.id); await this.eventRepository.emit('SessionDelete', { sessionId: auth.session.id }); } return { successful: true, - redirectUri: await this.getLogoutEndpoint(authType), + redirectUri: await this.getLogoutEndpoint(authType, oauthBearerToken), }; } @@ -124,8 +127,8 @@ export class AuthService extends BaseService { async changePassword(auth: AuthDto, dto: ChangePasswordDto): Promise { const { password, newPassword } = dto; const user = await this.userRepository.getForChangePassword(auth.user.id); - const valid = this.validateSecret(password, user.password); - if (!valid) { + const isValid = this.validateSecret(password, user.password); + if (!isValid) { throw new BadRequestException('Wrong password'); } @@ -194,16 +197,6 @@ export class AuthService extends BaseService { } async adminSignUp(dto: SignUpDto): Promise { - const { setup } = this.configRepository.getEnv(); - if (!setup.allow) { - throw new BadRequestException('Admin setup is disabled'); - } - - const adminUser = await this.userRepository.getAdmin(); - if (adminUser) { - throw new BadRequestException('The server already has an admin'); - } - const admin = await this.createUser({ isAdmin: true, email: dto.email, @@ -271,7 +264,7 @@ export class AuthService extends BaseService { } getMobileRedirect(url: string) { - return `${MOBILE_REDIRECT}?${url.split('?')[1] || ''}`; + return `${MOBILE_REDIRECT}?${url.split('?', 2)[1] || ''}`; } async authorize(dto: OAuthConfigDto) { @@ -306,12 +299,11 @@ export class AuthService extends BaseService { } const url = this.resolveRedirectUri(oauth, dto.url); - const { profile, sid: oauthSid } = await this.oauthRepository.getProfileAndOAuthSid( - oauth, - url, - expectedState, - codeVerifier, - ); + const { + profile, + sid: oauthSid, + idToken: oauthBearerToken, + } = await this.oauthRepository.getProfileAndOAuthSid(oauth, url, expectedState, codeVerifier); const normalizedEmail = profile.email ? profile.email.trim().toLowerCase() : undefined; const { autoRegister, defaultStorageQuota, storageLabelClaim, storageQuotaClaim, roleClaim } = oauth; this.logger.debug(`Logging in with OAuth: ${JSON.stringify(profile)}`); @@ -329,6 +321,13 @@ export class AuthService extends BaseService { } } + const role = this.getRoleClaim(profile, roleClaim); + const isAdmin = role === 'admin'; + + if (user && role && isAdmin !== user.isAdmin) { + user = await this.userRepository.update(user.id, { isAdmin }); + } + // register new user if (!user) { if (!autoRegister) { @@ -354,11 +353,6 @@ export class AuthService extends BaseService { default: defaultStorageQuota, isValid: (value: unknown) => Number(value) >= 0, }); - const role = this.getClaim<'admin' | 'user'>(profile, { - key: roleClaim, - default: 'user', - isValid: (value: unknown) => typeof value === 'string' && ['admin', 'user'].includes(value), - }); user = await this.createUser({ name: @@ -370,7 +364,7 @@ export class AuthService extends BaseService { oauthId: profile.sub, quotaSizeInBytes: storageQuota === null ? null : storageQuota * HumanReadableSize.GiB, storageLabel: storageLabel || null, - isAdmin: role === 'admin', + isAdmin, }); } @@ -378,7 +372,7 @@ export class AuthService extends BaseService { await this.syncProfilePicture(user, profile.picture); } - return this.createLoginResponse(user, loginDetails, oauthSid); + return this.createLoginResponse(user, loginDetails, oauthSid, oauthBearerToken); } private async syncProfilePicture(user: UserAdmin, url: string) { @@ -419,6 +413,7 @@ export class AuthService extends BaseService { const { profile: { sub: oauthId }, sid, + idToken, } = await this.oauthRepository.getProfileAndOAuthSid(oauth, dto.url, expectedState, codeVerifier); const duplicate = await this.userRepository.getByOAuthId(oauthId); if (duplicate && duplicate.id !== auth.user.id) { @@ -426,8 +421,11 @@ export class AuthService extends BaseService { throw new BadRequestException('This OAuth account has already been linked to another user.'); } - if (auth.session) { - await this.sessionRepository.update(auth.session.id, { oauthSid: sid }); + if (auth.session && (sid || idToken)) { + await this.sessionRepository.update(auth.session.id, { + oauthSid: sid, + oauthBearerToken: idToken, + }); } const user = await this.userRepository.update(auth.user.id, { oauthId }); @@ -436,14 +434,14 @@ export class AuthService extends BaseService { async unlink(auth: AuthDto): Promise { if (auth.session) { - await this.sessionRepository.update(auth.session.id, { oauthSid: null }); + await this.sessionRepository.update(auth.session.id, { oauthSid: null, oauthBearerToken: null }); } const user = await this.userRepository.update(auth.user.id, { oauthId: '' }); return mapUserAdmin(user); } - private async getLogoutEndpoint(authType: AuthType): Promise { + private async getLogoutEndpoint(authType: AuthType, oauthBearerToken?: string | null): Promise { if (authType !== AuthType.OAuth) { return LOGIN_URL; } @@ -453,15 +451,24 @@ export class AuthService extends BaseService { return LOGIN_URL; } - if (config.oauth.endSessionEndpoint) { - return config.oauth.endSessionEndpoint; + const endSessionEndpoint = + config.oauth.endSessionEndpoint || (await this.oauthRepository.getLogoutEndpoint(config.oauth)); + + if (!endSessionEndpoint) { + return LOGIN_URL; } - return (await this.oauthRepository.getLogoutEndpoint(config.oauth)) || LOGIN_URL; + const url = new URL(endSessionEndpoint); + + if (oauthBearerToken) { + url.searchParams.set('id_token_hint', oauthBearerToken); + } + + return url.href; } private getBearerToken(headers: IncomingHttpHeaders): string | null { - const [type, token] = (headers.authorization || '').split(' '); + const [type, token] = (headers.authorization || '').split(' ', 2); if (type.toLowerCase() === 'bearer') { return token; } @@ -542,7 +549,7 @@ export class AuthService extends BaseService { const now = DateTime.now(); const updatedAt = DateTime.fromJSDate(session.updatedAt); const diff = now.diff(updatedAt, ['hours']); - if (diff.hours > 1 || appVersion != session.appVersion) { + if (diff.hours > 1 || appVersion !== session.appVersion) { await this.sessionRepository.update(session.id, { id: session.id, updatedAt: new Date(), @@ -599,7 +606,12 @@ export class AuthService extends BaseService { await this.sessionRepository.update(auth.session.id, { pinExpiresAt: null }); } - private async createLoginResponse(user: UserAdmin, loginDetails: LoginDetails, oauthSid?: string) { + private async createLoginResponse( + user: UserAdmin, + loginDetails: LoginDetails, + oauthSid?: string, + oauthBearerToken?: string, + ) { const token = this.cryptoRepository.randomBytesAsText(32); const hashed = this.cryptoRepository.hashSha256(token); @@ -610,6 +622,7 @@ export class AuthService extends BaseService { appVersion: loginDetails.appVersion, userId: user.id, oauthSid: oauthSid ?? null, + oauthBearerToken: oauthBearerToken ?? null, }); return mapLoginResponse(user, token); @@ -620,12 +633,25 @@ export class AuthService extends BaseService { return options.isValid(value) ? (value as T) : options.default; } + private getRoleClaim(profile: OAuthProfile, roleClaim: string): 'admin' | 'user' | undefined { + const value = profile[roleClaim as keyof OAuthProfile]; + const roles = Array.isArray(value) ? value : [value]; + const isRole = (role: string) => roles.includes(role); + + if (isRole('admin')) { + return 'admin'; + } + if (isRole('user')) { + return 'user'; + } + } + private resolveRedirectUri( { mobileRedirectUri, mobileOverrideEnabled }: { mobileRedirectUri: string; mobileOverrideEnabled: boolean }, url: string, ) { if (mobileOverrideEnabled && mobileRedirectUri) { - return url.replace(/app\.immich:\/+oauth-callback/, mobileRedirectUri); + return url.replace(/app\.immich:\/+oauth-callback/, () => mobileRedirectUri); } return url; } diff --git a/server/src/services/base.service.ts b/server/src/services/base.service.ts index 62a0de8b56..6ed8ce925a 100644 --- a/server/src/services/base.service.ts +++ b/server/src/services/base.service.ts @@ -117,7 +117,7 @@ export const BASE_SERVICE_DEPENDENCIES = [ ViewRepository, WebsocketRepository, WorkflowRepository, -]; +] as const; @Injectable() export class BaseService { @@ -191,7 +191,7 @@ export class BaseService { ); } - static create(Service: ClassConstructor, ctx: BaseService) { + static create>(Service: T, ctx: BaseService) { const service = new Service( LoggingRepository.create(), ctx.accessRepository, @@ -242,14 +242,15 @@ export class BaseService { ctx.trashRepository, ctx.userRepository, ctx.versionRepository, + ctx.videoStreamRepository, ctx.viewRepository, ctx.websocketRepository, ctx.workflowRepository, ); - service.logger.setContext(this.name); + service.logger.setContext(BaseService.name); - return service as T; + return service as InstanceType; } get worker() { @@ -280,6 +281,17 @@ export class BaseService { return checkAccess(this.accessRepository, request); } + async isSetupAvailable(): Promise { + const { setup } = this.configRepository.getEnv(); + return setup.allow && !(await this.userRepository.hasAdmin()); + } + + async requireSetupAvailable(): Promise { + if (!(await this.isSetupAvailable())) { + throw new BadRequestException('Admin setup is not available'); + } + } + async createUser(dto: Insertable & { email: string }): Promise { const exists = await this.userRepository.getByEmail(dto.email); if (exists) { diff --git a/server/src/services/cli.service.spec.ts b/server/src/services/cli.service.spec.ts index 347d9eef00..29c62d258f 100644 --- a/server/src/services/cli.service.spec.ts +++ b/server/src/services/cli.service.spec.ts @@ -37,7 +37,7 @@ describe(CliService.name, () => { mocks.user.getAdmin.mockResolvedValue(admin); mocks.user.update.mockResolvedValue(UserFactory.create({ isAdmin: true })); - const ask = vitest.fn().mockImplementation(() => {}); + const ask = vitest.fn().mockResolvedValue({ newPassword: undefined, invalidateSessions: false }); const response = await sut.resetAdminPassword(ask); @@ -47,6 +47,7 @@ describe(CliService.name, () => { expect(ask).toHaveBeenCalled(); expect(id).toEqual(admin.id); expect(update.password).toBeDefined(); + expect(mocks.session.invalidateAll).not.toHaveBeenCalled(); }); it('should use the supplied password', async () => { @@ -55,7 +56,7 @@ describe(CliService.name, () => { mocks.user.getAdmin.mockResolvedValue(admin); mocks.user.update.mockResolvedValue(admin); - const ask = vitest.fn().mockResolvedValue('new-password'); + const ask = vitest.fn().mockResolvedValue({ newPassword: 'new-password', invalidateSessions: false }); const response = await sut.resetAdminPassword(ask); @@ -66,6 +67,20 @@ describe(CliService.name, () => { expect(id).toEqual(admin.id); expect(update.password).toBeDefined(); }); + + it('should invalidate existing sessions when requested', async () => { + const admin = UserFactory.create({ isAdmin: true }); + + mocks.user.getAdmin.mockResolvedValue(admin); + mocks.user.update.mockResolvedValue(admin); + mocks.session.invalidateAll.mockResolvedValue(void 0); + + const ask = vitest.fn().mockResolvedValue({ newPassword: 'new-password', invalidateSessions: true }); + + await sut.resetAdminPassword(ask); + + expect(mocks.session.invalidateAll).toHaveBeenCalledWith({ userId: admin.id }); + }); }); describe('disablePasswordLogin', () => { diff --git a/server/src/services/cli.service.ts b/server/src/services/cli.service.ts index 22f06e2ed9..f37353d7a1 100644 --- a/server/src/services/cli.service.ts +++ b/server/src/services/cli.service.ts @@ -45,7 +45,6 @@ export class CliService extends BaseService { if (!filesSet.has(name) && rowsSet.has(name)) { migrations.push({ name, status: 'deleted' }); - continue; } } @@ -59,18 +58,24 @@ export class CliService extends BaseService { return users.map((user) => mapUserAdmin(user)); } - async resetAdminPassword(ask: (admin: UserAdminResponseDto) => Promise) { + async resetAdminPassword( + ask: (admin: UserAdminResponseDto) => Promise<{ newPassword: string | undefined; invalidateSessions: boolean }>, + ) { const admin = await this.userRepository.getAdmin(); if (!admin) { throw new Error('Admin account does not exist'); } - const providedPassword = await ask(mapUserAdmin(admin)); + const { newPassword: providedPassword, invalidateSessions } = await ask(mapUserAdmin(admin)); const password = providedPassword || this.cryptoRepository.randomBytesAsText(24); const hashedPassword = await this.cryptoRepository.hashBcrypt(password, SALT_ROUNDS); await this.userRepository.update(admin.id, { password: hashedPassword }); + if (invalidateSessions) { + await this.sessionRepository.invalidateAll({ userId: admin.id }); + } + return { admin, password, provided: !!providedPassword }; } @@ -87,9 +92,9 @@ export class CliService extends BaseService { } async disableMaintenanceMode(): Promise<{ alreadyDisabled: boolean }> { - const currentState = await this.systemMetadataRepository - .get(SystemMetadataKey.MaintenanceMode) - .then((state) => state ?? { isMaintenanceMode: false as const }); + const currentState = (await this.systemMetadataRepository.get(SystemMetadataKey.MaintenanceMode)) ?? { + isMaintenanceMode: false as const, + }; if (!currentState.isMaintenanceMode) { return { @@ -114,9 +119,9 @@ export class CliService extends BaseService { username: 'cli-admin', }; - const state = await this.systemMetadataRepository - .get(SystemMetadataKey.MaintenanceMode) - .then((state) => state ?? { isMaintenanceMode: false as const }); + const state = (await this.systemMetadataRepository.get(SystemMetadataKey.MaintenanceMode)) ?? { + isMaintenanceMode: false as const, + }; if (state.isMaintenanceMode) { return { @@ -182,11 +187,7 @@ export class CliService extends BaseService { this.userRepository.getFileSamples(), ]); - const paths = []; - - for (const person of people) { - paths.push(person.thumbnailPath); - } + const paths = Array.from(people, (person) => person.thumbnailPath); for (const user of users) { paths.push(user.profileImagePath); diff --git a/server/src/services/database-backup.service.ts b/server/src/services/database-backup.service.ts index 55d69d37b7..a277b028a5 100644 --- a/server/src/services/database-backup.service.ts +++ b/server/src/services/database-backup.service.ts @@ -143,7 +143,7 @@ export class DatabaseBackupService { databaseUsername = parsedUrl.username || parsedUrl.searchParams.get('user'); - url = parsedUrl.toString(); + url = parsedUrl.href; } // assume typical values if we can't parse URL or not present @@ -228,7 +228,7 @@ export class DatabaseBackupService { this.logger.log(`Database Backup Starting. Database Version: ${databaseMajorVersion}`); - const filename = `${filenamePrefix}immich-db-backup-${DateTime.now().toFormat("yyyyLLdd'T'HHmmss")}-v${serverVersion.toString()}-pg${databaseVersion.split(' ')[0]}.sql.gz`; + const filename = `${filenamePrefix}immich-db-backup-${DateTime.now().toFormat("yyyyLLdd'T'HHmmss")}-v${serverVersion.toString()}-pg${databaseVersion.split(' ', 1)[0]}.sql.gz`; const backupFilePath = path.join(StorageCore.getBaseFolder(StorageFolder.Backups), filename); const temporaryFilePath = `${backupFilePath}.tmp`; @@ -249,6 +249,7 @@ export class DatabaseBackupService { this.logger.error(`Database Backup Failure: ${error}`); await this.storageRepository .unlink(temporaryFilePath) + .catch((error) => this.logger.error(`Failed to delete failed backup file: ${error}`)); throw error; } @@ -354,7 +355,7 @@ export class DatabaseBackupService { ): Promise { this.logger.debug(`Database Restore Started`); - let complete = false; + let isComplete = false; try { if (!isValidDatabaseBackupName(filename)) { throw new Error('Invalid backup file format!'); @@ -399,7 +400,7 @@ export class DatabaseBackupService { }); const [progressSource, progressSink] = createSqlProgressStreams((progress) => { - if (complete) { + if (isComplete) { return; } @@ -407,7 +408,7 @@ export class DatabaseBackupService { progressCb?.('restore', progress); }); - await pipeline(sqlStream, progressSource, psql, progressSink); + await pipeline(sqlStream, createSqlOwnerTransformStream(databaseUsername), progressSource, psql, progressSink); try { progressCb?.('migrations', 0.9); @@ -437,7 +438,7 @@ export class DatabaseBackupService { }); const [progressSource, progressSink] = createSqlProgressStreams((progress) => { - if (complete) { + if (isComplete) { return; } @@ -453,7 +454,7 @@ export class DatabaseBackupService { this.logger.error(`Database Restore Failure: ${error}`); throw error; } finally { - complete = true; + isComplete = true; } this.logger.log(`Database Restore Success`); @@ -507,7 +508,7 @@ function createSqlProgressStreams(cb: (progress: number) => void) { const STDIN_START_MARKER = new TextEncoder().encode('FROM stdin'); const STDIN_END_MARKER = new TextEncoder().encode(String.raw`\.`); - let readingStdin = false; + let isReadingStdin = false; let sequenceIdx = 0; let linesSent = 0; @@ -532,19 +533,19 @@ function createSqlProgressStreams(cb: (progress: number) => void) { const source = new PassThrough({ transform(chunk, _encoding, callback) { for (const byte of chunk) { - if (!readingStdin && byte === 10 && lastByte !== 10) { + if (!isReadingStdin && byte === 10 && lastByte !== 10) { linesSent += 1; } lastByte = byte; - const sequence = readingStdin ? STDIN_END_MARKER : STDIN_START_MARKER; + const sequence = isReadingStdin ? STDIN_END_MARKER : STDIN_START_MARKER; if (sequence[sequenceIdx] === byte) { sequenceIdx += 1; if (sequence.length === sequenceIdx) { sequenceIdx = 0; - readingStdin = !readingStdin; + isReadingStdin = !isReadingStdin; } } else { sequenceIdx = 0; @@ -552,6 +553,7 @@ function createSqlProgressStreams(cb: (progress: number) => void) { } cbDebounced(); + // eslint-disable-next-line unicorn/no-this-outside-of-class this.push(chunk); callback(); }, @@ -572,3 +574,70 @@ function createSqlProgressStreams(cb: (progress: number) => void) { return [source, sink]; } + +function createSqlOwnerTransformStream(databaseUsername: string) { + const OWNER_MARKER_START = new TextEncoder().encode('OWNER TO '); + const DATA_MARKER_START = new TextEncoder().encode('FROM stdin'); + const LINE_END = new TextEncoder().encode(';'); + + const owner = new TextEncoder().encode(databaseUsername); + + let ownerSequenceIndex = 0; + + let replacingOwnerIndex = 0; + let replacingOwner = false; + + let readingDataIndex = 0; + + let dataPart = false; + + return new PassThrough({ + transform(chunk, _encoding, callback) { + let result = chunk; + if (!dataPart) { + for (let index = 0; index < result.length; index++) { + if (replacingOwner) { + if (result[index] === LINE_END[0]) { + result = Buffer.concat([result.slice(0, index), owner.slice(replacingOwnerIndex), result.slice(index)]); + replacingOwnerIndex = owner.length; + } else { + result[index] = owner[replacingOwnerIndex]; + replacingOwnerIndex++; + } + } + + if (replacingOwnerIndex === owner.length) { + replacingOwner = false; + } + + if (result[index] === OWNER_MARKER_START[ownerSequenceIndex]) { + ownerSequenceIndex++; + } else { + ownerSequenceIndex = 0; + } + + if (ownerSequenceIndex === OWNER_MARKER_START.length) { + ownerSequenceIndex = 0; + replacingOwner = true; + replacingOwnerIndex = 0; + } + + if (result[index] === DATA_MARKER_START[readingDataIndex]) { + readingDataIndex++; + } else { + readingDataIndex = 0; + } + + if (readingDataIndex === DATA_MARKER_START.length) { + dataPart = true; + break; + } + } + } + + // eslint-disable-next-line unicorn/no-this-outside-of-class + this.push(result); + callback(); + }, + }); +} diff --git a/server/src/services/duplicate.service.ts b/server/src/services/duplicate.service.ts index 7ea300f88a..08c7630f91 100644 --- a/server/src/services/duplicate.service.ts +++ b/server/src/services/duplicate.service.ts @@ -1,5 +1,4 @@ import { Injectable } from '@nestjs/common'; -import { JOBS_ASSET_PAGINATION_SIZE } from 'src/constants'; import { OnJob } from 'src/decorators'; import { BulkIdErrorReason, BulkIdResponseDto, BulkIdsDto } from 'src/dtos/asset-ids.response.dto'; import { MapAsset, mapAsset } from 'src/dtos/asset-response.dto'; @@ -8,9 +7,9 @@ import { DuplicateResolveDto, DuplicateResolveGroupDto, DuplicateResponseDto } f import { AssetStatus, AssetVisibility, JobName, JobStatus, Permission, QueueName } from 'src/enum'; import { AssetDuplicateResult } from 'src/repositories/search.repository'; import { BaseService } from 'src/services/base.service'; -import { JobItem, JobOf } from 'src/types'; +import { JobOf } from 'src/types'; import { suggestDuplicateKeepAssetIds } from 'src/utils/duplicate'; -import { isDuplicateDetectionEnabled } from 'src/utils/misc'; +import { batched, isDuplicateDetectionEnabled } from 'src/utils/misc'; type ResolveRequest = { assetUpdate: { @@ -220,15 +219,15 @@ export class DuplicateService extends BaseService { if (idsToTrash.length > 0) { // TODO: this is duplicated with AssetService.deleteAssets const { trash } = await this.getConfig({ withCache: true }); - const force = !trash.enabled; + const isForce = !trash.enabled; await this.assetRepository.updateAll(idsToTrash, { deletedAt: new Date(), - status: force ? AssetStatus.Deleted : AssetStatus.Trashed, + status: isForce ? AssetStatus.Deleted : AssetStatus.Trashed, duplicateId: null, }); - await this.eventRepository.emit(force ? 'AssetDeleteAll' : 'AssetTrashAll', { + await this.eventRepository.emit(isForce ? 'AssetDeleteAll' : 'AssetTrashAll', { assetIds: idsToTrash, userId: auth.user.id, }); @@ -307,22 +306,12 @@ export class DuplicateService extends BaseService { return JobStatus.Skipped; } - let jobs: JobItem[] = []; - const queueAll = async () => { - await this.jobRepository.queueAll(jobs); - jobs = []; - }; - - const assets = this.assetJobRepository.streamForSearchDuplicates(force); - for await (const asset of assets) { - jobs.push({ name: JobName.AssetDetectDuplicates, data: { id: asset.id } }); - if (jobs.length >= JOBS_ASSET_PAGINATION_SIZE) { - await queueAll(); - } + for await (const assets of batched(this.assetJobRepository.streamForSearchDuplicates(force))) { + await this.jobRepository.queueAll( + assets.map((asset) => ({ name: JobName.AssetDetectDuplicates, data: { id: asset.id } })), + ); } - await queueAll(); - return JobStatus.Success; } diff --git a/server/src/services/hls.service.spec.ts b/server/src/services/hls.service.spec.ts index a18f7c6d22..5badd6c93a 100644 --- a/server/src/services/hls.service.spec.ts +++ b/server/src/services/hls.service.spec.ts @@ -1,5 +1,5 @@ import { BadRequestException, NotFoundException } from '@nestjs/common'; -import { TranscodeHardwareAcceleration } from 'src/enum'; +import { HlsVideoResolution, VideoCodec } from 'src/enum'; import { HlsService } from 'src/services/hls.service'; import { eiffelTower, train, waterfall } from 'test/fixtures/media.stub'; import { factory } from 'test/small.factory'; @@ -96,67 +96,79 @@ seg_10.m4s const sessionId = '00000000-0000-0000-0000-000000000000'; -const eiffelExpectedMasterDisabled = `#EXTM3U +const eiffelExpectedMasterAv1 = `#EXTM3U #EXT-X-VERSION:7 #EXT-X-INDEPENDENT-SEGMENTS -#EXT-X-STREAM-INF:BANDWIDTH=1000000,RESOLUTION=480x852,CODECS="av01.0.04M.08,mp4a.40.2",VIDEO-RANGE=SDR,FRAME-RATE=24.910 +#EXT-X-STREAM-INF:BANDWIDTH=1350000,RESOLUTION=480x852,CODECS="av01.0.04M.08,mp4a.40.2",VIDEO-RANGE=SDR,FRAME-RATE=24.910 ${sessionId}/0/playlist.m3u8 -#EXT-X-STREAM-INF:BANDWIDTH=1200000,RESOLUTION=480x852,CODECS="hvc1.1.6.L90.B0,mp4a.40.2",VIDEO-RANGE=SDR,FRAME-RATE=24.910 +#EXT-X-STREAM-INF:BANDWIDTH=1620000,RESOLUTION=480x852,CODECS="hvc1.1.6.L90.B0,mp4a.40.2",VIDEO-RANGE=SDR,FRAME-RATE=24.910 ${sessionId}/1/playlist.m3u8 -#EXT-X-STREAM-INF:BANDWIDTH=2500000,RESOLUTION=480x852,CODECS="avc1.64001e,mp4a.40.2",VIDEO-RANGE=SDR,FRAME-RATE=24.910 +#EXT-X-STREAM-INF:BANDWIDTH=3375000,RESOLUTION=480x852,CODECS="avc1.64001e,mp4a.40.2",VIDEO-RANGE=SDR,FRAME-RATE=24.910 ${sessionId}/2/playlist.m3u8 -#EXT-X-STREAM-INF:BANDWIDTH=2000000,RESOLUTION=720x1280,CODECS="av01.0.08M.08,mp4a.40.2",VIDEO-RANGE=SDR,FRAME-RATE=24.910 +#EXT-X-STREAM-INF:BANDWIDTH=2700000,RESOLUTION=720x1280,CODECS="av01.0.05M.08,mp4a.40.2",VIDEO-RANGE=SDR,FRAME-RATE=24.910 ${sessionId}/3/playlist.m3u8 -#EXT-X-STREAM-INF:BANDWIDTH=2500000,RESOLUTION=720x1280,CODECS="hvc1.1.6.L93.B0,mp4a.40.2",VIDEO-RANGE=SDR,FRAME-RATE=24.910 +#EXT-X-STREAM-INF:BANDWIDTH=3375000,RESOLUTION=720x1280,CODECS="hvc1.1.6.L93.B0,mp4a.40.2",VIDEO-RANGE=SDR,FRAME-RATE=24.910 ${sessionId}/4/playlist.m3u8 -#EXT-X-STREAM-INF:BANDWIDTH=5000000,RESOLUTION=720x1280,CODECS="avc1.64001f,mp4a.40.2",VIDEO-RANGE=SDR,FRAME-RATE=24.910 +#EXT-X-STREAM-INF:BANDWIDTH=6750000,RESOLUTION=720x1280,CODECS="avc1.64001f,mp4a.40.2",VIDEO-RANGE=SDR,FRAME-RATE=24.910 ${sessionId}/5/playlist.m3u8 -#EXT-X-STREAM-INF:BANDWIDTH=4000000,RESOLUTION=1080x1920,CODECS="av01.0.09M.08,mp4a.40.2",VIDEO-RANGE=SDR,FRAME-RATE=24.910 +#EXT-X-STREAM-INF:BANDWIDTH=5400000,RESOLUTION=1080x1920,CODECS="av01.0.08M.08,mp4a.40.2",VIDEO-RANGE=SDR,FRAME-RATE=24.910 ${sessionId}/6/playlist.m3u8 -#EXT-X-STREAM-INF:BANDWIDTH=4500000,RESOLUTION=1080x1920,CODECS="hvc1.1.6.L120.B0,mp4a.40.2",VIDEO-RANGE=SDR,FRAME-RATE=24.910 +#EXT-X-STREAM-INF:BANDWIDTH=6075000,RESOLUTION=1080x1920,CODECS="hvc1.1.6.L120.B0,mp4a.40.2",VIDEO-RANGE=SDR,FRAME-RATE=24.910 ${sessionId}/7/playlist.m3u8 -#EXT-X-STREAM-INF:BANDWIDTH=8000000,RESOLUTION=1080x1920,CODECS="avc1.640028,mp4a.40.2",VIDEO-RANGE=SDR,FRAME-RATE=24.910 +#EXT-X-STREAM-INF:BANDWIDTH=10800000,RESOLUTION=1080x1920,CODECS="avc1.640028,mp4a.40.2",VIDEO-RANGE=SDR,FRAME-RATE=24.910 ${sessionId}/8/playlist.m3u8 `; -const eiffelExpectedMasterRkmpp = `#EXTM3U +const eiffelExpectedMasterNoAv1 = `#EXTM3U #EXT-X-VERSION:7 #EXT-X-INDEPENDENT-SEGMENTS -#EXT-X-STREAM-INF:BANDWIDTH=1200000,RESOLUTION=480x852,CODECS="hvc1.1.6.L90.B0,mp4a.40.2",VIDEO-RANGE=SDR,FRAME-RATE=24.910 +#EXT-X-STREAM-INF:BANDWIDTH=1620000,RESOLUTION=480x852,CODECS="hvc1.1.6.L90.B0,mp4a.40.2",VIDEO-RANGE=SDR,FRAME-RATE=24.910 ${sessionId}/1/playlist.m3u8 -#EXT-X-STREAM-INF:BANDWIDTH=2500000,RESOLUTION=480x852,CODECS="avc1.64001e,mp4a.40.2",VIDEO-RANGE=SDR,FRAME-RATE=24.910 +#EXT-X-STREAM-INF:BANDWIDTH=3375000,RESOLUTION=480x852,CODECS="avc1.64001e,mp4a.40.2",VIDEO-RANGE=SDR,FRAME-RATE=24.910 ${sessionId}/2/playlist.m3u8 -#EXT-X-STREAM-INF:BANDWIDTH=2500000,RESOLUTION=720x1280,CODECS="hvc1.1.6.L93.B0,mp4a.40.2",VIDEO-RANGE=SDR,FRAME-RATE=24.910 +#EXT-X-STREAM-INF:BANDWIDTH=3375000,RESOLUTION=720x1280,CODECS="hvc1.1.6.L93.B0,mp4a.40.2",VIDEO-RANGE=SDR,FRAME-RATE=24.910 ${sessionId}/4/playlist.m3u8 -#EXT-X-STREAM-INF:BANDWIDTH=5000000,RESOLUTION=720x1280,CODECS="avc1.64001f,mp4a.40.2",VIDEO-RANGE=SDR,FRAME-RATE=24.910 +#EXT-X-STREAM-INF:BANDWIDTH=6750000,RESOLUTION=720x1280,CODECS="avc1.64001f,mp4a.40.2",VIDEO-RANGE=SDR,FRAME-RATE=24.910 ${sessionId}/5/playlist.m3u8 -#EXT-X-STREAM-INF:BANDWIDTH=4500000,RESOLUTION=1080x1920,CODECS="hvc1.1.6.L120.B0,mp4a.40.2",VIDEO-RANGE=SDR,FRAME-RATE=24.910 +#EXT-X-STREAM-INF:BANDWIDTH=6075000,RESOLUTION=1080x1920,CODECS="hvc1.1.6.L120.B0,mp4a.40.2",VIDEO-RANGE=SDR,FRAME-RATE=24.910 ${sessionId}/7/playlist.m3u8 -#EXT-X-STREAM-INF:BANDWIDTH=8000000,RESOLUTION=1080x1920,CODECS="avc1.640028,mp4a.40.2",VIDEO-RANGE=SDR,FRAME-RATE=24.910 +#EXT-X-STREAM-INF:BANDWIDTH=10800000,RESOLUTION=1080x1920,CODECS="avc1.640028,mp4a.40.2",VIDEO-RANGE=SDR,FRAME-RATE=24.910 ${sessionId}/8/playlist.m3u8 `; -const waterfallExpectedMasterDisabled = `#EXTM3U +const waterfallExpectedMasterAv1 = `#EXTM3U #EXT-X-VERSION:7 #EXT-X-INDEPENDENT-SEGMENTS -#EXT-X-STREAM-INF:BANDWIDTH=1000000,RESOLUTION=480x852,CODECS="av01.0.04M.08,mp4a.40.2",VIDEO-RANGE=SDR,FRAME-RATE=29.830 +#EXT-X-STREAM-INF:BANDWIDTH=1350000,RESOLUTION=480x852,CODECS="av01.0.04M.08,mp4a.40.2",VIDEO-RANGE=SDR,FRAME-RATE=29.830 ${sessionId}/0/playlist.m3u8 -#EXT-X-STREAM-INF:BANDWIDTH=1200000,RESOLUTION=480x852,CODECS="hvc1.1.6.L90.B0,mp4a.40.2",VIDEO-RANGE=SDR,FRAME-RATE=29.830 +#EXT-X-STREAM-INF:BANDWIDTH=1620000,RESOLUTION=480x852,CODECS="hvc1.1.6.L90.B0,mp4a.40.2",VIDEO-RANGE=SDR,FRAME-RATE=29.830 ${sessionId}/1/playlist.m3u8 -#EXT-X-STREAM-INF:BANDWIDTH=2500000,RESOLUTION=480x852,CODECS="avc1.64001e,mp4a.40.2",VIDEO-RANGE=SDR,FRAME-RATE=29.830 +#EXT-X-STREAM-INF:BANDWIDTH=3375000,RESOLUTION=480x852,CODECS="avc1.64001f,mp4a.40.2",VIDEO-RANGE=SDR,FRAME-RATE=29.830 ${sessionId}/2/playlist.m3u8 -#EXT-X-STREAM-INF:BANDWIDTH=2000000,RESOLUTION=720x1280,CODECS="av01.0.08M.08,mp4a.40.2",VIDEO-RANGE=SDR,FRAME-RATE=29.830 +#EXT-X-STREAM-INF:BANDWIDTH=2700000,RESOLUTION=720x1280,CODECS="av01.0.05M.08,mp4a.40.2",VIDEO-RANGE=SDR,FRAME-RATE=29.830 ${sessionId}/3/playlist.m3u8 -#EXT-X-STREAM-INF:BANDWIDTH=2500000,RESOLUTION=720x1280,CODECS="hvc1.1.6.L93.B0,mp4a.40.2",VIDEO-RANGE=SDR,FRAME-RATE=29.830 +#EXT-X-STREAM-INF:BANDWIDTH=3375000,RESOLUTION=720x1280,CODECS="hvc1.1.6.L93.B0,mp4a.40.2",VIDEO-RANGE=SDR,FRAME-RATE=29.830 ${sessionId}/4/playlist.m3u8 -#EXT-X-STREAM-INF:BANDWIDTH=5000000,RESOLUTION=720x1280,CODECS="avc1.64001f,mp4a.40.2",VIDEO-RANGE=SDR,FRAME-RATE=29.830 +#EXT-X-STREAM-INF:BANDWIDTH=6750000,RESOLUTION=720x1280,CODECS="avc1.64001f,mp4a.40.2",VIDEO-RANGE=SDR,FRAME-RATE=29.830 ${sessionId}/5/playlist.m3u8 -#EXT-X-STREAM-INF:BANDWIDTH=4000000,RESOLUTION=1080x1920,CODECS="av01.0.09M.08,mp4a.40.2",VIDEO-RANGE=SDR,FRAME-RATE=29.830 +#EXT-X-STREAM-INF:BANDWIDTH=5400000,RESOLUTION=1080x1920,CODECS="av01.0.08M.08,mp4a.40.2",VIDEO-RANGE=SDR,FRAME-RATE=29.830 ${sessionId}/6/playlist.m3u8 -#EXT-X-STREAM-INF:BANDWIDTH=4500000,RESOLUTION=1080x1920,CODECS="hvc1.1.6.L120.B0,mp4a.40.2",VIDEO-RANGE=SDR,FRAME-RATE=29.830 +#EXT-X-STREAM-INF:BANDWIDTH=6075000,RESOLUTION=1080x1920,CODECS="hvc1.1.6.L120.B0,mp4a.40.2",VIDEO-RANGE=SDR,FRAME-RATE=29.830 ${sessionId}/7/playlist.m3u8 -#EXT-X-STREAM-INF:BANDWIDTH=8000000,RESOLUTION=1080x1920,CODECS="avc1.640028,mp4a.40.2",VIDEO-RANGE=SDR,FRAME-RATE=29.830 +#EXT-X-STREAM-INF:BANDWIDTH=10800000,RESOLUTION=1080x1920,CODECS="avc1.640028,mp4a.40.2",VIDEO-RANGE=SDR,FRAME-RATE=29.830 ${sessionId}/8/playlist.m3u8 +#EXT-X-STREAM-INF:BANDWIDTH=9450000,RESOLUTION=1440x2560,CODECS="av01.0.12M.08,mp4a.40.2",VIDEO-RANGE=SDR,FRAME-RATE=29.830 +${sessionId}/9/playlist.m3u8 +#EXT-X-STREAM-INF:BANDWIDTH=10800000,RESOLUTION=1440x2560,CODECS="hvc1.1.6.L150.B0,mp4a.40.2",VIDEO-RANGE=SDR,FRAME-RATE=29.830 +${sessionId}/10/playlist.m3u8 +#EXT-X-STREAM-INF:BANDWIDTH=18900000,RESOLUTION=1440x2560,CODECS="avc1.640032,mp4a.40.2",VIDEO-RANGE=SDR,FRAME-RATE=29.830 +${sessionId}/11/playlist.m3u8 +#EXT-X-STREAM-INF:BANDWIDTH=16200000,RESOLUTION=2160x3840,CODECS="av01.0.12M.08,mp4a.40.2",VIDEO-RANGE=SDR,FRAME-RATE=29.830 +${sessionId}/12/playlist.m3u8 +#EXT-X-STREAM-INF:BANDWIDTH=18900000,RESOLUTION=2160x3840,CODECS="hvc1.1.6.L150.B0,mp4a.40.2",VIDEO-RANGE=SDR,FRAME-RATE=29.830 +${sessionId}/13/playlist.m3u8 +#EXT-X-STREAM-INF:BANDWIDTH=33750000,RESOLUTION=2160x3840,CODECS="avc1.640033,mp4a.40.2",VIDEO-RANGE=SDR,FRAME-RATE=29.830 +${sessionId}/14/playlist.m3u8 `; describe(HlsService.name, () => { @@ -171,32 +183,49 @@ describe(HlsService.name, () => { const auth = factory.auth(); const assetId = 'asset-1'; - const setup = (asset: typeof eiffelTower | typeof waterfall, accel: TranscodeHardwareAcceleration) => { + const allCodecs = [VideoCodec.Av1, VideoCodec.Hevc, VideoCodec.H264]; + const allResolutions = [ + HlsVideoResolution.p480, + HlsVideoResolution.p720, + HlsVideoResolution.p1080, + HlsVideoResolution.p1440, + HlsVideoResolution.p2160, + ]; + + const setup = ( + asset: typeof eiffelTower | typeof waterfall, + videoCodecs?: VideoCodec[], + resolutions?: HlsVideoResolution[], + ) => { mocks.access.asset.checkOwnerAccess.mockResolvedValue(new Set([assetId])); - mocks.systemMetadata.get.mockResolvedValue({ ffmpeg: { realtime: { enabled: true }, accel } }); + mocks.systemMetadata.get.mockResolvedValue({ + ffmpeg: { realtime: { enabled: true, videoCodecs, resolutions } }, + }); mocks.videoStream.getForMainPlaylist.mockResolvedValue(asset); mocks.crypto.randomUUID.mockReturnValue(sessionId); mocks.websocket.serverSend.mockImplementation((event, ...rest) => { - if (event === 'HlsSessionRequest') { - const { sessionId: id } = rest[0] as { sessionId: string }; - queueMicrotask(() => sut.onSessionResult({ sessionId: id })); + if (event !== 'HlsSessionRequest') { + return; } + + const { sessionId: id } = rest[0] as { sessionId: string }; + queueMicrotask(() => sut.onSessionResult({ sessionId: id })); }); }; - it('returns main playlist for eiffel-tower (1080p portrait, no acceleration)', async () => { - setup(eiffelTower, TranscodeHardwareAcceleration.Disabled); - await expect(sut.getMainPlaylist(auth, assetId)).resolves.toBe(eiffelExpectedMasterDisabled); + it('offers AV1, HEVC, and H.264 when AV1 is configured and the accelerator supports it', async () => { + setup(eiffelTower, allCodecs); + await expect(sut.getMainPlaylist(auth, assetId)).resolves.toBe(eiffelExpectedMasterAv1); }); - it('returns main playlist for eiffel-tower with RKMPP (no AV1 variants)', async () => { - setup(eiffelTower, TranscodeHardwareAcceleration.Rkmpp); - await expect(sut.getMainPlaylist(auth, assetId)).resolves.toBe(eiffelExpectedMasterRkmpp); + it('omits AV1 when it is not in the configured codecs', async () => { + setup(eiffelTower); + await expect(sut.getMainPlaylist(auth, assetId)).resolves.toBe(eiffelExpectedMasterNoAv1); }); - it('returns main playlist for waterfall (4K landscape) with no acceleration', async () => { - setup(waterfall, TranscodeHardwareAcceleration.Disabled); - await expect(sut.getMainPlaylist(auth, assetId)).resolves.toBe(waterfallExpectedMasterDisabled); + it('offers every resolution up to the source and derives 4K codec levels (waterfall, 4K, 29.83fps)', async () => { + setup(waterfall, allCodecs, allResolutions); + await expect(sut.getMainPlaylist(auth, assetId)).resolves.toBe(waterfallExpectedMasterAv1); }); it('throws BadRequestException when realtime transcoding is disabled', async () => { diff --git a/server/src/services/hls.service.ts b/server/src/services/hls.service.ts index 0cbb53e1cd..94a8a46ace 100644 --- a/server/src/services/hls.service.ts +++ b/server/src/services/hls.service.ts @@ -1,13 +1,7 @@ import { BadRequestException, Injectable, NotFoundException } from '@nestjs/common'; import { constants } from 'node:fs'; import { join } from 'node:path'; -import { - HLS_SEGMENT_DURATION, - HLS_SEGMENT_FILENAME_REGEX, - HLS_VARIANTS, - HLS_VERSION, - SUPPORTED_HWA_CODECS, -} from 'src/constants'; +import { HLS_SEGMENT_DURATION, HLS_SEGMENT_FILENAME_REGEX, HLS_VARIANTS, HLS_VERSION } from 'src/constants'; import { StorageCore } from 'src/cores/storage.core'; import { OnEvent } from 'src/decorators'; import { AuthDto } from 'src/dtos/auth.dto'; @@ -18,7 +12,7 @@ import { BaseService } from 'src/services/base.service'; import { VideoPacketInfo, VideoStreamInfo } from 'src/types'; import { PendingEvents } from 'src/utils/event'; import { ImmichFileResponse } from 'src/utils/file'; -import { getOutputSize } from 'src/utils/media'; +import { getCodecString, getOutputSize } from 'src/utils/media'; type AssetWithStreamInfo = { videoStream: VideoStreamInfo & { timeBase: number }; packets: VideoPacketInfo }; type Segmentation = { fps: number; framesPerSegment: number; segmentCount: number; segmentDuration: number }; @@ -131,18 +125,21 @@ export class HlsService extends BaseService { } private generateMainPlaylist(sessionId: string, ffmpeg: SystemConfigFFmpegDto, asset: AssetWithStreamInfo) { - const fps = ((asset.packets.packetCount * asset.videoStream.timeBase) / asset.packets.totalDuration).toFixed(3); + const fps = (asset.packets.packetCount * asset.videoStream.timeBase) / asset.packets.totalDuration; + const roundedFps = fps.toFixed(3); const sourceResolution = Math.min(asset.videoStream.height, asset.videoStream.width); const targetResolution = Math.max(sourceResolution, HLS_VARIANTS[0].resolution); const lines = ['#EXTM3U', `#EXT-X-VERSION:${HLS_VERSION}`, '#EXT-X-INDEPENDENT-SEGMENTS']; + const { videoCodecs, resolutions } = ffmpeg.realtime; for (let i = 0; i < HLS_VARIANTS.length; i++) { - const { resolution, bitrate, codec, codecString } = HLS_VARIANTS[i]; - if (resolution > targetResolution || !SUPPORTED_HWA_CODECS[ffmpeg.accel].includes(codec)) { + const { resolution, bitrate, codec } = HLS_VARIANTS[i]; + if (resolution > targetResolution || !videoCodecs.includes(codec) || !resolutions.includes(resolution)) { continue; } const { width, height } = getOutputSize(asset.videoStream, resolution); + const codecString = getCodecString(codec, width, height, fps); lines.push( - `#EXT-X-STREAM-INF:BANDWIDTH=${bitrate},RESOLUTION=${width}x${height},CODECS="${codecString},mp4a.40.2",VIDEO-RANGE=SDR,FRAME-RATE=${fps}`, + `#EXT-X-STREAM-INF:BANDWIDTH=${Math.round(bitrate * 1.35)},RESOLUTION=${width}x${height},CODECS="${codecString},mp4a.40.2",VIDEO-RANGE=SDR,FRAME-RATE=${roundedFps}`, `${sessionId}/${i}/playlist.m3u8`, ); } diff --git a/server/src/services/integrity.service.ts b/server/src/services/integrity.service.ts index a2c603fde1..6c7a505812 100644 --- a/server/src/services/integrity.service.ts +++ b/server/src/services/integrity.service.ts @@ -35,7 +35,7 @@ import { IIntegrityUntrackedFilesJob, } from 'src/types'; import { ImmichFileResponse } from 'src/utils/file'; -import { handlePromiseError } from 'src/utils/misc'; +import { batched, handlePromiseError } from 'src/utils/misc'; /** * Untracked Files: @@ -201,7 +201,7 @@ export class IntegrityService extends BaseService { const reports = this.integrityRepository.streamIntegrityReportsWithAssetChecksum(IntegrityReport.UntrackedFile); let total = 0; - for await (const batchReports of chunk(reports, JOBS_LIBRARY_PAGINATION_SIZE)) { + for await (const batchReports of batched(reports, JOBS_LIBRARY_PAGINATION_SIZE)) { await this.jobRepository.queue({ name: JobName.IntegrityUntrackedFilesRefresh, data: { @@ -312,12 +312,14 @@ export class IntegrityService extends BaseService { this.logger.log(`Processing batch of ${items.length} reports to check if they are out of date.`); const results = await Promise.all( - items.map(({ reportId, path }) => - this.storageRepository - .stat(path) - .then(() => void 0) - .catch(() => reportId), - ), + items.map(async ({ reportId, path }) => { + try { + await this.storageRepository.stat(path); + return; + } catch { + return reportId; + } + }), ); const reportIds = results.filter(Boolean) as string[]; @@ -336,7 +338,7 @@ export class IntegrityService extends BaseService { const reports = this.integrityRepository.streamIntegrityReportsWithAssetChecksum(IntegrityReport.MissingFile); let total = 0; - for await (const batchReports of chunk(reports, JOBS_LIBRARY_PAGINATION_SIZE)) { + for await (const batchReports of batched(reports, JOBS_LIBRARY_PAGINATION_SIZE)) { await this.jobRepository.queue({ name: JobName.IntegrityMissingFilesRefresh, data: { @@ -360,10 +362,10 @@ export class IntegrityService extends BaseService { this.logger.log(`Scanning for missing files...`); - const assetPaths = this.integrityRepository.streamAssetPaths(); + const assetPaths = this.integrityRepository.streamAssetPathsForMissingFiles(); let total = 0; - for await (const batchPaths of chunk(assetPaths, JOBS_LIBRARY_PAGINATION_SIZE)) { + for await (const batchPaths of batched(assetPaths, JOBS_LIBRARY_PAGINATION_SIZE)) { await this.jobRepository.queue({ name: JobName.IntegrityMissingFiles, data: { @@ -383,12 +385,14 @@ export class IntegrityService extends BaseService { this.logger.log(`Processing batch of ${items.length} files to check if they are missing.`); const results = await Promise.all( - items.map((item) => - this.storageRepository - .stat(item.path) - .then(() => ({ ...item, exists: true })) - .catch(() => ({ ...item, exists: false })), - ), + items.map(async (item) => { + try { + await this.storageRepository.stat(item.path); + return { ...item, exists: true }; + } catch { + return { ...item, exists: false }; + } + }), ); const outdatedReports = results @@ -420,12 +424,14 @@ export class IntegrityService extends BaseService { this.logger.log(`Processing batch of ${paths.length} reports to check if they are out of date.`); const results = await Promise.all( - paths.map(({ reportId, path }) => - this.storageRepository - .stat(path) - .then(() => reportId) - .catch(() => void 0), - ), + paths.map(async ({ reportId, path }) => { + try { + await this.storageRepository.stat(path); + return reportId; + } catch { + return; + } + }), ); const reportIds = results.filter(Boolean) as string[]; @@ -444,7 +450,7 @@ export class IntegrityService extends BaseService { const reports = this.integrityRepository.streamIntegrityReportsWithAssetChecksum(IntegrityReport.ChecksumFail); let total = 0; - for await (const batchReports of chunk(reports, JOBS_LIBRARY_PAGINATION_SIZE)) { + for await (const batchReports of batched(reports, JOBS_LIBRARY_PAGINATION_SIZE)) { await this.jobRepository.queue({ name: JobName.IntegrityChecksumFilesRefresh, data: { @@ -532,8 +538,7 @@ export class IntegrityService extends BaseService { const { count } = await this.integrityRepository.getAssetCount(); const checkpoint = await this.systemMetadataRepository.get(SystemMetadataKey.IntegrityChecksumCheckpoint); - let startMarker: Date | undefined = checkpoint?.date ? new Date(checkpoint.date) : undefined; - let endMarker: Date | undefined; + const startMarker = checkpoint?.date ? new Date(checkpoint.date) : undefined; const printStats = () => { const averageTime = ((Date.now() - startedAt) / processed).toFixed(2); @@ -546,31 +551,25 @@ export class IntegrityService extends BaseService { let lastCreatedAt: Date | undefined; - finishEarly: do { - this.logger.log( - `Processing assets in range [${startMarker?.toISOString() ?? 'beginning'}, ${endMarker?.toISOString() ?? 'end'}]`, - ); + this.logger.log(`Processing assets from ${startMarker?.toISOString() ?? 'beginning'}`); - const assets = this.integrityRepository.streamAssetChecksums(startMarker, endMarker); - endMarker = startMarker; - startMarker = undefined; + const assets = this.integrityRepository.streamAssetChecksums(startMarker); - for await (const { originalPath, checksum, createdAt, assetId, reportId } of assets) { - await this.checkAssetChecksum(originalPath, checksum, assetId, reportId); + for await (const { originalPath, checksum, createdAt, assetId, reportId } of assets) { + await this.checkAssetChecksum(originalPath, checksum, assetId, reportId); - processed++; + processed++; - if (processed % 100 === 0) { - printStats(); - } - - if (Date.now() > startedAt + timeLimit || processed > count * percentageLimit) { - this.logger.log('Reached stop criteria.'); - lastCreatedAt = createdAt; - break finishEarly; - } + if (processed % 100 === 0) { + printStats(); } - } while (endMarker); + + if (Date.now() > startedAt + timeLimit || processed > count * percentageLimit) { + this.logger.log('Reached stop criteria.'); + lastCreatedAt = createdAt; + break; + } + } await this.systemMetadataRepository.set(SystemMetadataKey.IntegrityChecksumCheckpoint, { date: lastCreatedAt?.toISOString(), @@ -657,7 +656,7 @@ export class IntegrityService extends BaseService { for (const property of properties) { const reports = this.integrityRepository.streamIntegrityReportsByProperty(property, type); - for await (const batch of chunk(reports, JOBS_LIBRARY_PAGINATION_SIZE)) { + for await (const batch of batched(reports, JOBS_LIBRARY_PAGINATION_SIZE)) { await this.jobRepository.queue({ name: JobName.IntegrityDeleteReports, data: { @@ -706,19 +705,3 @@ export class IntegrityService extends BaseService { return JobStatus.Success; } } - -async function* chunk(generator: AsyncIterableIterator, n: number) { - let chunk: T[] = []; - for await (const item of generator) { - chunk.push(item); - - if (chunk.length === n) { - yield chunk; - chunk = []; - } - } - - if (chunk.length > 0) { - yield chunk; - } -} diff --git a/server/src/services/library.service.spec.ts b/server/src/services/library.service.spec.ts index 5b43ed9f61..ae06232605 100644 --- a/server/src/services/library.service.spec.ts +++ b/server/src/services/library.service.spec.ts @@ -15,6 +15,7 @@ import { makeStream, newTestService, ServiceMocks } from 'test/utils'; import { vitest } from 'vitest'; async function* mockWalk() { + // eslint-disable-next-line unicorn/no-useless-promise-resolve-reject yield await Promise.resolve(['/data/user1/photo.jpg']); } @@ -576,6 +577,10 @@ describe(LibraryService.name, () => { }), ]); + expect(mocks.event.emit).toHaveBeenCalledWith('AssetCreate', { + asset: { id: asset.id, ownerId: library.ownerId }, + }); + expect(mocks.job.queueAll).toHaveBeenCalledWith([ { name: JobName.SidecarCheck, diff --git a/server/src/services/library.service.ts b/server/src/services/library.service.ts index 7e84a8ec52..fa405b9d22 100644 --- a/server/src/services/library.service.ts +++ b/server/src/services/library.service.ts @@ -34,7 +34,7 @@ import { AssetTable } from 'src/schema/tables/asset.table'; import { BaseService } from 'src/services/base.service'; import { JobOf } from 'src/types'; import { mimeTypes } from 'src/utils/mime-types'; -import { handlePromiseError } from 'src/utils/misc'; +import { batched, findOrFail, handlePromiseError } from 'src/utils/misc'; @Injectable() export class LibraryService extends BaseService { @@ -110,7 +110,7 @@ export class LibraryService extends BaseService { const handler = async (event: string, path: string) => { if (matcher(path)) { - this.logger.debug(`File ${event} event received for ${path} in library ${library.id}}`); + this.logger.debug(`File ${event} event received for ${path} in library ${library.id}`); await this.jobRepository.queue({ name: JobName.LibrarySyncFiles, data: { libraryId: library.id, paths: [path] }, @@ -121,7 +121,7 @@ export class LibraryService extends BaseService { }; const deletionHandler = async (path: string) => { - this.logger.debug(`File unlink event received for ${path} in library ${library.id}}`); + this.logger.debug(`File unlink event received for ${path} in library ${library.id}`); await this.jobRepository.queue({ name: JobName.LibraryRemoveAsset, data: { libraryId: library.id, paths: [path] }, @@ -162,10 +162,12 @@ export class LibraryService extends BaseService { } async unwatch(id: string) { - if (this.watchers[id]) { - await this.watchers[id](); - delete this.watchers[id]; + if (!Object.hasOwn(this.watchers, id)) { + return; } + + await this.watchers[id](); + delete this.watchers[id]; } @OnEvent({ name: 'AppShutdown' }) @@ -252,18 +254,22 @@ export class LibraryService extends BaseService { if (!library) { this.logger.debug(`Library ${job.libraryId} not found, skipping file import`); return JobStatus.Failed; - } else if (library.deletedAt) { + } + if (library.deletedAt) { this.logger.debug(`Library ${job.libraryId} is deleted, won't import assets into it`); return JobStatus.Failed; } const assetImports: Insertable[] = []; await Promise.all( - job.paths.map((path) => - this.processEntity(path, library.ownerId, job.libraryId) - .then((asset) => assetImports.push(asset)) - .catch((error: any) => this.logger.error(`Error processing ${path} for library ${job.libraryId}: ${error}`)), - ), + job.paths.map(async (path) => { + try { + const asset = await this.processEntity(path, library.ownerId, job.libraryId); + assetImports.push(asset); + } catch (error) { + this.logger.error(`Error processing ${path} for library ${job.libraryId}: ${error}`); + } + }), ); const assetIds = await this.assetRepository.createAll(assetImports); @@ -275,6 +281,12 @@ export class LibraryService extends BaseService { this.logger.log(`Imported ${assetIds.length} ${progressMessage} file(s) into library ${job.libraryId}`); + await Promise.all( + assetIds.map((assetId) => + this.eventRepository.emit('AssetCreate', { asset: { id: assetId, ownerId: library.ownerId } }), + ), + ); + await this.queuePostSyncJobs(assetIds); return JobStatus.Success; @@ -310,9 +322,9 @@ export class LibraryService extends BaseService { return validation; } - const access = await this.storageRepository.checkFileExists(importPath, R_OK); + const isAccess = await this.storageRepository.checkFileExists(importPath, R_OK); - if (!access) { + if (!isAccess) { validation.message = 'Lacking read permission for folder'; return validation; } @@ -363,33 +375,20 @@ export class LibraryService extends BaseService { await this.assetRepository.updateByLibraryId(libraryId, { deletedAt: new Date() }); - let assetsFound = false; - let chunk: string[] = []; - - const queueChunk = async () => { - if (chunk.length > 0) { - assetsFound = true; - this.logger.debug(`Queueing deletion of ${chunk.length} asset(s) in library ${libraryId}`); - await this.jobRepository.queueAll( - chunk.map((id) => ({ name: JobName.AssetDelete, data: { id, deleteOnDisk: false } })), - ); - chunk = []; - } - }; - this.logger.debug(`Will delete all assets in library ${libraryId}`); - const assets = this.libraryRepository.streamAssetIds(libraryId); - for await (const asset of assets) { - chunk.push(asset.id); - - if (chunk.length >= JOBS_LIBRARY_PAGINATION_SIZE) { - await queueChunk(); - } + let hasAssets = false; + for await (const assets of batched( + this.libraryRepository.streamAssetIds(libraryId), + JOBS_LIBRARY_PAGINATION_SIZE, + )) { + this.logger.debug(`Queueing deletion of ${assets.length} asset(s) in library ${libraryId}`); + await this.jobRepository.queueAll( + assets.map((asset) => ({ name: JobName.AssetDelete, data: { id: asset.id, deleteOnDisk: false } })), + ); + hasAssets = true; } - await queueChunk(); - - if (!assetsFound) { + if (!hasAssets) { this.logger.log(`Deleting library ${libraryId}`); await this.libraryRepository.delete(libraryId); } @@ -445,10 +444,6 @@ export class LibraryService extends BaseService { await this.jobRepository.queue({ name: JobName.LibrarySyncAssetsQueueAll, data: { id } }); } - async queueScanAll() { - await this.jobRepository.queue({ name: JobName.LibraryScanQueueAll, data: {} }); - } - @OnJob({ name: JobName.LibraryScanQueueAll, queue: QueueName.Library }) async handleQueueScanAll(): Promise { this.logger.log(`Initiating scan of all external libraries...`); @@ -514,7 +509,7 @@ export class LibraryService extends BaseService { break; } case AssetSyncResult.CHECK_OFFLINE: { - const isInImportPath = job.importPaths.find((path) => asset.originalPath.startsWith(path)); + const isInImportPath = job.importPaths.some((path) => asset.originalPath.startsWith(path)); if (!isInImportPath) { this.logger.verbose( @@ -732,56 +727,38 @@ export class LibraryService extends BaseService { return JobStatus.Success; } - let chunk: string[] = []; - let count = 0; - - const queueChunk = async () => { - if (chunk.length > 0) { - count += chunk.length; - - await this.jobRepository.queue({ - name: JobName.LibrarySyncAssets, - data: { - libraryId: library.id, - importPaths: library.importPaths, - exclusionPatterns: library.exclusionPatterns, - assetIds: chunk.map((id) => id), - progressCounter: count, - totalAssets: assetCount, - }, - }); - chunk = []; - - const completePercentage = ((100 * count) / assetCount).toFixed(1); - - this.logger.log( - `Queued check of ${count} of ${assetCount} (${completePercentage} %) existing asset(s) so far in library ${library.id}`, - ); - } - }; - this.logger.log(`Scanning library ${library.id} for assets missing from disk...`); + + let count = 0; const existingAssets = this.libraryRepository.streamAssetIds(library.id); + for await (const assets of batched(existingAssets, JOBS_LIBRARY_PAGINATION_SIZE)) { + count += assets.length; - for await (const asset of existingAssets) { - chunk.push(asset.id); - if (chunk.length === JOBS_LIBRARY_PAGINATION_SIZE) { - await queueChunk(); - } + await this.jobRepository.queue({ + name: JobName.LibrarySyncAssets, + data: { + libraryId: library.id, + importPaths: library.importPaths, + exclusionPatterns: library.exclusionPatterns, + assetIds: assets.map(({ id }) => id), + progressCounter: count, + totalAssets: assetCount, + }, + }); + + const completePercentage = ((100 * count) / assetCount).toFixed(1); + + this.logger.log( + `Queued check of ${count} of ${assetCount} (${completePercentage} %) existing asset(s) so far in library ${library.id}`, + ); } - await queueChunk(); - this.logger.log(`Finished queuing ${count} asset check(s) for library ${library.id}`); return JobStatus.Success; } - private async findOrFail(id: string) { - const library = await this.libraryRepository.get(id); - if (!library) { - throw new BadRequestException('Library not found'); - } - return library; + private findOrFail(id: string) { + return findOrFail(() => this.libraryRepository.get(id), 'Library'); } } diff --git a/server/src/services/maintenance.service.spec.ts b/server/src/services/maintenance.service.spec.ts index e598f1c71d..1eaefb689d 100644 --- a/server/src/services/maintenance.service.spec.ts +++ b/server/src/services/maintenance.service.spec.ts @@ -134,6 +134,22 @@ describe(MaintenanceService.name, () => { }); }); + describe('startRestoreFlow', () => { + it('should start maintenance mode and return a jwt', async () => { + mocks.systemMetadata.get.mockResolvedValue({ isMaintenanceMode: false }); + + await expect(sut.startRestoreFlow()).resolves.toMatchObject({ jwt: expect.any(String) }); + + expect(mocks.systemMetadata.set).toHaveBeenCalledWith(SystemMetadataKey.MaintenanceMode, { + isMaintenanceMode: true, + secret: expect.stringMatching(/^\w{128}$/), + action: { + action: MaintenanceAction.SelectDatabaseRestore, + }, + }); + }); + }); + describe('createLoginUrl', () => { it('should fail outside of maintenance mode without secret', async () => { mocks.systemMetadata.get.mockResolvedValue({ isMaintenanceMode: false }); diff --git a/server/src/services/maintenance.service.ts b/server/src/services/maintenance.service.ts index 8e711ef380..bcd6f2e834 100644 --- a/server/src/services/maintenance.service.ts +++ b/server/src/services/maintenance.service.ts @@ -1,4 +1,4 @@ -import { BadRequestException, Injectable } from '@nestjs/common'; +import { Injectable } from '@nestjs/common'; import { OnEvent } from 'src/decorators'; import { MaintenanceAuthDto, @@ -26,6 +26,7 @@ export class MaintenanceService extends BaseService { getMaintenanceMode(): Promise { return this.systemMetadataRepository .get(SystemMetadataKey.MaintenanceMode) + .then((state) => state ?? { isMaintenanceMode: false }); } @@ -58,11 +59,6 @@ export class MaintenanceService extends BaseService { } async startRestoreFlow(): Promise<{ jwt: string }> { - const adminUser = await this.userRepository.getAdmin(); - if (adminUser) { - throw new BadRequestException('The server already has an admin'); - } - return this.startMaintenance( { action: MaintenanceAction.SelectDatabaseRestore, diff --git a/server/src/services/media.service.spec.ts b/server/src/services/media.service.spec.ts index b453082574..d64e0088eb 100644 --- a/server/src/services/media.service.spec.ts +++ b/server/src/services/media.service.spec.ts @@ -207,8 +207,7 @@ describe(MediaService.name, () => { await sut.handleQueueGenerateThumbnails({ force: false }); expect(mocks.assetJob.streamForThumbnailJob).toHaveBeenCalledWith({ force: false, fullsizeEnabled: false }); - expect(mocks.job.queueAll).toHaveBeenCalledWith([]); - + expect(mocks.job.queueAll).toHaveBeenCalledTimes(1); expect(mocks.person.getAll).toHaveBeenCalledWith({ thumbnailPath: '' }); }); @@ -237,7 +236,10 @@ describe(MediaService.name, () => { await sut.handleQueueGenerateThumbnails({ force: false }); expect(mocks.assetJob.streamForThumbnailJob).toHaveBeenCalledWith({ force: false, fullsizeEnabled: false }); - expect(mocks.job.queueAll).toHaveBeenCalledWith([]); + expect(mocks.job.queueAll).toHaveBeenCalledTimes(1); + expect(mocks.job.queueAll).toHaveBeenCalledWith([ + { name: JobName.AssetEditThumbnailGeneration, data: { id: asset.id } }, + ]); expect(mocks.person.getAll).toHaveBeenCalledWith({ thumbnailPath: '' }); }); @@ -1507,12 +1509,17 @@ describe(MediaService.name, () => { }); describe('handleGeneratePersonThumbnail', () => { - it('should skip if machine learning is disabled', async () => { + it('should generate a thumbnail even if machine learning is disabled', async () => { mocks.systemMetadata.get.mockResolvedValue(systemConfigStub.machineLearningDisabled); + mocks.person.getDataForThumbnailGenerationJob.mockResolvedValue(personThumbnailStub.newThumbnailMiddle); + mocks.media.generateThumbnail.mockResolvedValue(); + mocks.media.decodeImage.mockResolvedValue({ + data: Buffer.from(''), + info: { width: 1000, height: 1000 } as OutputInfo, + }); - await expect(sut.handleGeneratePersonThumbnail({ id: 'person-1' })).resolves.toBe(JobStatus.Skipped); - expect(mocks.asset.getByIds).not.toHaveBeenCalled(); - expect(mocks.systemMetadata.get).toHaveBeenCalled(); + await expect(sut.handleGeneratePersonThumbnail({ id: 'person-1' })).resolves.toBe(JobStatus.Success); + expect(mocks.media.generateThumbnail).toHaveBeenCalled(); }); it('should skip a person not found', async () => { @@ -2232,6 +2239,26 @@ describe(MediaService.name, () => { ); }); + it('should include hevc tag when target is hevc and using hwa', async () => { + mocks.assetJob.getForVideoConversion.mockResolvedValue({ ...asset, ...probeStub.videoStreamHDR10 }); + mocks.systemMetadata.get.mockResolvedValue({ + ffmpeg: { + targetVideoCodec: VideoCodec.Hevc, + accel: TranscodeHardwareAcceleration.Nvenc, + }, + }); + await sut.handleVideoConversion({ id: 'video-id' }); + expect(mocks.media.transcode).toHaveBeenCalledWith( + '/original/path.ext', + expect.any(String), + expect.objectContaining({ + inputOptions: expect.any(Array), + outputOptions: expect.arrayContaining(['-c:v', 'hevc_nvenc', '-tag:v', 'hvc1']), + twoPass: false, + }), + ); + }); + it('should copy audio stream when audio matches target', async () => { mocks.assetJob.getForVideoConversion.mockResolvedValue({ ...asset, ...probeStub.audioStreamAac }); mocks.systemMetadata.get.mockResolvedValue({ ffmpeg: { transcode: TranscodePolicy.Optimal } }); diff --git a/server/src/services/media.service.ts b/server/src/services/media.service.ts index a73eb3e22e..19b1688e88 100644 --- a/server/src/services/media.service.ts +++ b/server/src/services/media.service.ts @@ -1,6 +1,6 @@ import { Injectable } from '@nestjs/common'; import { SystemConfig } from 'src/config'; -import { FACE_THUMBNAIL_SIZE, JOBS_ASSET_PAGINATION_SIZE } from 'src/constants'; +import { FACE_THUMBNAIL_SIZE } from 'src/constants'; import { ImagePathOptions, StorageCore, ThumbnailPathEntity } from 'src/cores/storage.core'; import { AssetFile } from 'src/database'; import { OnEvent, OnJob } from 'src/decorators'; @@ -43,7 +43,7 @@ import { getAssetFile, getDimensions } from 'src/utils/asset.util'; import { checkFaceVisibility, checkOcrVisibility } from 'src/utils/editor'; import { BaseConfig, ThumbnailConfig } from 'src/utils/media'; import { mimeTypes } from 'src/utils/mime-types'; -import { clamp, isFaceImportEnabled, isFacialRecognitionEnabled } from 'src/utils/misc'; +import { batched, clamp } from 'src/utils/misc'; import { getOutputDimensions } from 'src/utils/transform'; interface UpsertFileOptions { @@ -69,49 +69,42 @@ export class MediaService extends BaseService { @OnJob({ name: JobName.AssetGenerateThumbnailsQueueAll, queue: QueueName.ThumbnailGeneration }) async handleQueueGenerateThumbnails({ force }: JobOf): Promise { const config = await this.getConfig({ withCache: true }); - let jobs: JobItem[] = []; - const queueAll = async () => { - await this.jobRepository.queueAll(jobs); - jobs = []; - }; - - const fullsizeEnabled = config.image.fullsize.enabled; - for await (const asset of this.assetJobRepository.streamForThumbnailJob({ force, fullsizeEnabled })) { - if (force || !asset.isEdited) { - jobs.push({ name: JobName.AssetGenerateThumbnails, data: { id: asset.id } }); - } - - if (asset.isEdited) { - jobs.push({ name: JobName.AssetEditThumbnailGeneration, data: { id: asset.id } }); - } - - if (jobs.length >= JOBS_ASSET_PAGINATION_SIZE) { - await queueAll(); - } - } - - await queueAll(); - - const people = this.personRepository.getAll(force ? undefined : { thumbnailPath: '' }); - - for await (const person of people) { - if (!person.faceAssetId) { - const face = await this.personRepository.getRandomFace(person.id); - if (!face) { - continue; + const isFullsizeEnabled = config.image.fullsize.enabled; + for await (const assets of batched( + this.assetJobRepository.streamForThumbnailJob({ force, fullsizeEnabled: isFullsizeEnabled }), + )) { + const jobs: JobItem[] = []; + for (const asset of assets) { + if (force || !asset.isEdited) { + jobs.push({ name: JobName.AssetGenerateThumbnails, data: { id: asset.id } }); } - await this.personRepository.update({ id: person.id, faceAssetId: face.id }); + if (asset.isEdited) { + jobs.push({ name: JobName.AssetEditThumbnailGeneration, data: { id: asset.id } }); + } } - jobs.push({ name: JobName.PersonGenerateThumbnail, data: { id: person.id } }); - if (jobs.length >= JOBS_ASSET_PAGINATION_SIZE) { - await queueAll(); - } + await this.jobRepository.queueAll(jobs); } - await queueAll(); + for await (const people of batched(this.personRepository.getAll(force ? undefined : { thumbnailPath: '' }))) { + const jobs: JobItem[] = []; + for (const person of people) { + if (!person.faceAssetId) { + const face = await this.personRepository.getRandomFace(person.id); + if (!face) { + continue; + } + + await this.personRepository.update({ id: person.id, faceAssetId: face.id }); + } + + jobs.push({ name: JobName.PersonGenerateThumbnail, data: { id: person.id } }); + } + + await this.jobRepository.queueAll(jobs); + } return JobStatus.Success; } @@ -124,30 +117,18 @@ export class MediaService extends BaseService { await this.storageCore.removeEmptyDirs(StorageFolder.EncodedVideo); } - let jobs: JobItem[] = []; - const assets = this.assetJobRepository.streamForMigrationJob(); - for await (const asset of assets) { - jobs.push({ name: JobName.AssetFileMigration, data: { id: asset.id } }); - if (jobs.length >= JOBS_ASSET_PAGINATION_SIZE) { - await this.jobRepository.queueAll(jobs); - jobs = []; - } + for await (const assets of batched(this.assetJobRepository.streamForMigrationJob())) { + await this.jobRepository.queueAll( + assets.map((asset) => ({ name: JobName.AssetFileMigration, data: { id: asset.id } })), + ); } - await this.jobRepository.queueAll(jobs); - jobs = []; - - for await (const person of this.personRepository.getAll()) { - jobs.push({ name: JobName.PersonFileMigration, data: { id: person.id } }); - - if (jobs.length === JOBS_ASSET_PAGINATION_SIZE) { - await this.jobRepository.queueAll(jobs); - jobs = []; - } + for await (const people of batched(this.personRepository.getAll())) { + await this.jobRepository.queueAll( + people.map((person) => ({ name: JobName.PersonFileMigration, data: { id: person.id } })), + ); } - await this.jobRepository.queueAll(jobs); - return JobStatus.Success; } @@ -272,13 +253,14 @@ export class MediaService extends BaseService { } private async extractOriginalImage(asset: ThumbnailAsset, image: SystemConfig['image'], useEdits = false) { - const extractEmbedded = image.extractEmbedded && mimeTypes.isRaw(asset.originalFileName); - const extracted = extractEmbedded ? await this.extractImage(asset.originalPath, image.preview.size) : null; - const generateFullsize = + const isExtractEmbedded = image.extractEmbedded && mimeTypes.isRaw(asset.originalFileName); + const extracted = isExtractEmbedded ? await this.extractImage(asset.originalPath, image.preview.size) : null; + const isGenerateFullsize = ((image.fullsize.enabled || asset.exifInfo.projectionType === 'EQUIRECTANGULAR') && !mimeTypes.isWebSupportedImage(asset.originalPath)) || useEdits; - const convertFullsize = generateFullsize && (!extracted || !mimeTypes.isWebSupportedImage(` .${extracted.format}`)); + const isConvertFullsize = + isGenerateFullsize && (!extracted || !mimeTypes.isWebSupportedImage(` .${extracted.format}`)); const thumbSource = extracted ? extracted.buffer : asset.originalPath; const { data, info, colorspace } = await this.decodeImage( @@ -286,7 +268,7 @@ export class MediaService extends BaseService { // only specify orientation to extracted images which don't have EXIF orientation data // or it can double rotate the image extracted ? asset.exifInfo : { ...asset.exifInfo, orientation: null }, - convertFullsize ? undefined : image.preview.size, + isConvertFullsize ? undefined : image.preview.size, ); let isTransparent = false; @@ -299,8 +281,8 @@ export class MediaService extends BaseService { data, info, colorspace, - convertFullsize, - generateFullsize, + convertFullsize: isConvertFullsize, + generateFullsize: isGenerateFullsize, isTransparent, }; } @@ -406,11 +388,7 @@ export class MediaService extends BaseService { @OnJob({ name: JobName.PersonGenerateThumbnail, queue: QueueName.ThumbnailGeneration }) async handleGeneratePersonThumbnail({ id }: JobOf): Promise { - const { machineLearning, metadata, image } = await this.getConfig({ withCache: true }); - if (!isFacialRecognitionEnabled(machineLearning) && !isFaceImportEnabled(metadata)) { - return JobStatus.Skipped; - } - + const { image } = await this.getConfig({ withCache: true }); const data = await this.personRepository.getDataForThumbnailGenerationJob(id); if (!data) { this.logger.error(`Could not generate person thumbnail for ${id}: missing data`); @@ -551,18 +529,12 @@ export class MediaService extends BaseService { async handleQueueVideoConversion(job: JobOf): Promise { const { force } = job; - let queue: { name: JobName.AssetEncodeVideo; data: { id: string } }[] = []; - for await (const asset of this.assetJobRepository.streamForVideoConversion(force)) { - queue.push({ name: JobName.AssetEncodeVideo, data: { id: asset.id } }); - - if (queue.length >= JOBS_ASSET_PAGINATION_SIZE) { - await this.jobRepository.queueAll(queue); - queue = []; - } + for await (const assets of batched(this.assetJobRepository.streamForVideoConversion(force))) { + await this.jobRepository.queueAll( + assets.map((asset) => ({ name: JobName.AssetEncodeVideo, data: { id: asset.id } })), + ); } - await this.jobRepository.queueAll(queue); - return JobStatus.Success; } @@ -620,20 +592,20 @@ export class MediaService extends BaseService { return JobStatus.Failed; } - let partialFallbackSuccess = false; + let isPartialFallbackSuccess = false; if (ffmpeg.accelDecode) { try { this.logger.error(`Retrying with ${ffmpeg.accel.toUpperCase()}-accelerated encoding and software decoding`); ffmpeg = { ...ffmpeg, accelDecode: false }; const command = BaseConfig.create(ffmpeg, this.videoInterfaces).getCommand(target, videoStream, audioStream); await this.mediaRepository.transcode(input, output, command); - partialFallbackSuccess = true; + isPartialFallbackSuccess = true; } catch (error: any) { this.logger.error(`Error occurred during transcoding: ${error.message}`); } } - if (!partialFallbackSuccess) { + if (!isPartialFallbackSuccess) { this.logger.error(`Retrying with ${ffmpeg.accel.toUpperCase()} acceleration disabled`); ffmpeg = { ...ffmpeg, accel: TranscodeHardwareAcceleration.Disabled }; const command = BaseConfig.create(ffmpeg, this.videoInterfaces).getCommand(target, videoStream, audioStream); @@ -700,9 +672,9 @@ export class MediaService extends BaseService { } private isVideoTranscodeRequired(ffmpegConfig: SystemConfigFFmpegDto, stream: VideoStreamInfo): boolean { - const scalingEnabled = ffmpegConfig.targetResolution !== 'original'; + const isScalingEnabled = ffmpegConfig.targetResolution !== 'original'; const targetRes = Number.parseInt(ffmpegConfig.targetResolution); - const isLargerThanTargetRes = scalingEnabled && Math.min(stream.height, stream.width) > targetRes; + const isLargerThanTargetRes = isScalingEnabled && Math.min(stream.height, stream.width) > targetRes; const maxBitrate = this.parseBitrateToBps(ffmpegConfig.maxBitrate); const isLargerThanTargetBitrate = maxBitrate > 0 && stream.bitrate > maxBitrate; @@ -757,13 +729,13 @@ export class MediaService extends BaseService { }): boolean { if (colorspace || profileDescription) { return [colorspace, profileDescription].some((s) => s?.toLowerCase().includes('srgb')); - } else if (bitsPerSample) { + } + if (bitsPerSample) { // assume sRGB for 8-bit images with no color profile or colorspace metadata return bitsPerSample === 8; - } else { - // assume sRGB for images with no relevant metadata - return true; } + // assume sRGB for images with no relevant metadata + return true; } private parseBitrateToBps(bitrateString: string) { @@ -776,11 +748,11 @@ export class MediaService extends BaseService { if (bitrateString.toLowerCase().endsWith('k')) { return bitrateValue * 1000; // Kilobits per second to bits per second - } else if (bitrateString.toLowerCase().endsWith('m')) { - return bitrateValue * 1_000_000; // Megabits per second to bits per second - } else { - return bitrateValue; } + if (bitrateString.toLowerCase().endsWith('m')) { + return bitrateValue * 1_000_000; // Megabits per second to bits per second + } + return bitrateValue; } private async shouldUseExtractedImage(extractedPathOrBuffer: string | Buffer, targetSize: number) { diff --git a/server/src/services/memory.service.ts b/server/src/services/memory.service.ts index ac8f88ad87..1175a11af4 100644 --- a/server/src/services/memory.service.ts +++ b/server/src/services/memory.service.ts @@ -1,4 +1,4 @@ -import { BadRequestException, Injectable } from '@nestjs/common'; +import { Injectable } from '@nestjs/common'; import { DateTime } from 'luxon'; import { Memory } from 'src/database'; import { OnJob } from 'src/decorators'; @@ -8,6 +8,7 @@ import { MemoryCreateDto, MemoryResponseDto, MemorySearchDto, MemoryUpdateDto, m import { DatabaseLock, JobName, MemoryType, Permission, QueueName, SystemMetadataKey } from 'src/enum'; import { BaseService } from 'src/services/base.service'; import { addAssets, removeAssets } from 'src/utils/asset.util'; +import { findOrFail } from 'src/utils/misc'; const DAYS = 3; @@ -136,7 +137,7 @@ export class MemoryService extends BaseService { const repos = { access: this.accessRepository, bulk: this.memoryRepository }; const results = await addAssets(auth, repos, { parentId: id, assetIds: dto.ids }); - const hasSuccess = results.find(({ success }) => success); + const hasSuccess = results.some(({ success }) => success); if (hasSuccess) { await this.memoryRepository.update(id, { updatedAt: new Date() }); } @@ -154,7 +155,7 @@ export class MemoryService extends BaseService { canAlwaysRemove: Permission.MemoryDelete, }); - const hasSuccess = results.find(({ success }) => success); + const hasSuccess = results.some(({ success }) => success); if (hasSuccess) { await this.memoryRepository.update(id, { id, updatedAt: new Date() }); } @@ -162,11 +163,7 @@ export class MemoryService extends BaseService { return results; } - private async findOrFail(id: string) { - const memory = await this.memoryRepository.get(id); - if (!memory) { - throw new BadRequestException('Memory not found'); - } - return memory; + private findOrFail(id: string) { + return findOrFail(() => this.memoryRepository.get(id), 'Memory'); } } diff --git a/server/src/services/metadata.service.spec.ts b/server/src/services/metadata.service.spec.ts index ffb92f3e00..57c029961e 100644 --- a/server/src/services/metadata.service.spec.ts +++ b/server/src/services/metadata.service.spec.ts @@ -39,7 +39,10 @@ const forSidecarJob = ( }; }; -const makeFaceTags = (face: Partial<{ Name: string }> = {}, orientation?: ImmichTags['Orientation']) => ({ +const makeFaceTags = ( + face: Partial<{ Name: string }> = {}, + orientation?: ImmichTags['Orientation'], +): Partial => ({ Orientation: orientation, RegionInfo: { AppliedToDimensions: { W: 1000, H: 100, Unit: 'pixel' }, @@ -1371,6 +1374,35 @@ describe(MetadataService.name, () => { expect(mocks.person.updateAll).not.toHaveBeenCalled(); }); + it('should handle string coordinates in face region bounding box calculation by limiting to 16 decimal places', async () => { + const asset = AssetFactory.create(); + const person = PersonFactory.create(); + + mocks.assetJob.getForMetadataExtraction.mockResolvedValue(getForMetadataExtraction(asset)); + mocks.systemMetadata.get.mockResolvedValue({ metadata: { faces: { import: true } } }); + const faceTags = makeFaceTags({ Name: person.name }); + + // Simulating EXIF returning a string with >16 decimal places + faceTags.RegionInfo!.RegionList[0].Area.X = '0.48564814814814824'; + faceTags.RegionInfo!.RegionList[0].Area.W = '0.2'; + + mockReadTags(faceTags); + mocks.person.getDistinctNames.mockResolvedValue([]); + mocks.person.createAll.mockResolvedValue([person.id]); + mocks.person.update.mockResolvedValue(person); + + await sut.handleMetadataExtraction({ id: asset.id }); + + expect(mocks.person.refreshFaces).toHaveBeenCalledWith( + [ + expect.objectContaining({ + boundingBoxX1: Math.floor((0.4856481481481482 - 0.2 / 2) * 1000), + }), + ], + [], + ); + }); + it('should apply metadata face tags creating new people', async () => { const asset = AssetFactory.create(); const person = PersonFactory.create(); diff --git a/server/src/services/metadata.service.ts b/server/src/services/metadata.service.ts index a4639db262..a95d1f1497 100644 --- a/server/src/services/metadata.service.ts +++ b/server/src/services/metadata.service.ts @@ -6,7 +6,7 @@ import { DateTime, Duration } from 'luxon'; import { Stats } from 'node:fs'; import { constants } from 'node:fs/promises'; import { join, parse } from 'node:path'; -import { JOBS_ASSET_PAGINATION_SIZE } from 'src/constants'; + import { StorageCore } from 'src/cores/storage.core'; import { Asset, AssetFile } from 'src/database'; import { OnEvent, OnJob } from 'src/decorators'; @@ -30,12 +30,12 @@ import { AssetExifTable } from 'src/schema/tables/asset-exif.table'; import { AssetFaceTable } from 'src/schema/tables/asset-face.table'; import { PersonTable } from 'src/schema/tables/person.table'; import { BaseService } from 'src/services/base.service'; -import { JobItem, JobOf } from 'src/types'; +import { JobOf } from 'src/types'; import { getAssetFiles } from 'src/utils/asset.util'; import { isAssetChecksumConstraint } from 'src/utils/database'; import { mergeTimeZone } from 'src/utils/date'; import { mimeTypes } from 'src/utils/mime-types'; -import { isFaceImportEnabled } from 'src/utils/misc'; +import { batched, isFaceImportEnabled } from 'src/utils/misc'; import { upsertTags } from 'src/utils/tag'; import { Tasks } from 'src/utils/tasks'; @@ -109,7 +109,7 @@ const validateRange = (value: number | undefined, min: number, max: number): Non const val = validate(value); // check if the value is within the range - if (val == null || val < min || val > max) { + if (val === null || val < min || val > max) { return null; } @@ -218,17 +218,12 @@ export class MetadataService extends BaseService { async handleQueueMetadataExtraction(job: JobOf): Promise { const { force } = job; - let queue: { name: JobName.AssetExtractMetadata; data: { id: string } }[] = []; - for await (const asset of this.assetJobRepository.streamForMetadataExtraction(force)) { - queue.push({ name: JobName.AssetExtractMetadata, data: { id: asset.id } }); - - if (queue.length >= JOBS_ASSET_PAGINATION_SIZE) { - await this.jobRepository.queueAll(queue); - queue = []; - } + for await (const assets of batched(this.assetJobRepository.streamForMetadataExtraction(force))) { + await this.jobRepository.queueAll( + assets.map((asset) => ({ name: JobName.AssetExtractMetadata, data: { id: asset.id } })), + ); } - await this.jobRepository.queueAll(queue); return JobStatus.Success; } @@ -286,7 +281,7 @@ export class MetadataService extends BaseService { exifImageHeight: validate(height), exifImageWidth: validate(width), orientation: validate(exifTags.Orientation)?.toString() ?? null, - projectionType: exifTags.ProjectionType ? String(exifTags.ProjectionType).toUpperCase() : null, + projectionType: exifTags.ProjectionType ? exifTags.ProjectionType.toUpperCase() : null, bitsPerSample: this.getBitsPerSample(exifTags), colorspace: exifTags.ColorSpace === undefined ? null : String(exifTags.ColorSpace), @@ -295,7 +290,7 @@ export class MetadataService extends BaseService { exifTags.Make ?? exifTags.Device?.Manufacturer ?? exifTags.AndroidMake ?? (exifTags.DeviceManufacturer || null), model: exifTags.Model ?? exifTags.Device?.ModelName ?? exifTags.AndroidModel ?? (exifTags.DeviceModelName || null), - fps: video?.frameRate ?? validate(Number.parseFloat(exifTags.VideoFrameRate!)), + fps: video?.frameRate ?? validate(Number(exifTags.VideoFrameRate!)), iso: validate(exifTags.ISO) as number, exposureTime: exifTags.ExposureTime ?? null, lensModel: getLensModel(exifTags), @@ -326,7 +321,7 @@ export class MetadataService extends BaseService { : undefined; const videoData = - format?.formatName && format?.formatLongName && video?.codecName && video?.timeBase + format?.formatName && format.formatLongName && video?.codecName && video?.timeBase ? { assetId: asset.id, bitrate: video.bitrate, @@ -362,8 +357,8 @@ export class MetadataService extends BaseService { : undefined; const isSidewards = exifTags.Orientation && this.isOrientationSidewards(exifTags.Orientation); - const assetWidth = isSidewards ? validate(height) : validate(width); - const assetHeight = isSidewards ? validate(width) : validate(height); + const assetWidth = validate(isSidewards ? height : width); + const assetHeight = validate(isSidewards ? width : height); const tasks = new Tasks(); @@ -377,8 +372,8 @@ export class MetadataService extends BaseService { fileModifiedAt: stats.mtime, // Keep unedited assets in sync with the file on disk, but don't overwrite edited dimensions. - width: !asset.isEdited || asset.width == null ? assetWidth : undefined, - height: !asset.isEdited || asset.height == null ? assetHeight : undefined, + width: !asset.isEdited || asset.width === null ? assetWidth : undefined, + height: !asset.isEdited || asset.height === null ? assetHeight : undefined, }), async () => { await this.assetRepository.upsertExif({ @@ -417,22 +412,12 @@ export class MetadataService extends BaseService { @OnJob({ name: JobName.SidecarQueueAll, queue: QueueName.Sidecar }) async handleQueueSidecar({ force }: JobOf): Promise { - let jobs: JobItem[] = []; - const queueAll = async () => { - await this.jobRepository.queueAll(jobs); - jobs = []; - }; - - const assets = this.assetJobRepository.streamForSidecar(force); - for await (const asset of assets) { - jobs.push({ name: JobName.SidecarCheck, data: { id: asset.id } }); - if (jobs.length >= JOBS_ASSET_PAGINATION_SIZE) { - await queueAll(); - } + for await (const assets of batched(this.assetJobRepository.streamForSidecar(force))) { + await this.jobRepository.queueAll( + assets.map((asset) => ({ name: JobName.SidecarCheck, data: { id: asset.id } })), + ); } - await queueAll(); - return JobStatus.Success; } @@ -445,8 +430,8 @@ export class MetadataService extends BaseService { let sidecarPath = null; for (const candidate of this.getSidecarCandidates(asset)) { - const exists = await this.storageRepository.checkFileExists(candidate, constants.R_OK); - if (!exists) { + const isExists = await this.storageRepository.checkFileExists(candidate, constants.R_OK); + if (!isExists) { continue; } @@ -806,8 +791,8 @@ export class MetadataService extends BaseService { } // write extracted motion video to disk, especially if the encoded-video folder has been deleted - const existsOnDisk = await this.storageRepository.checkFileExists(motionAsset.originalPath); - if (!existsOnDisk) { + const isExistsOnDisk = await this.storageRepository.checkFileExists(motionAsset.originalPath); + if (!isExistsOnDisk) { this.storageCore.ensureFolders(motionAsset.originalPath); await this.storageRepository.createFile(motionAsset.originalPath, video); this.logger.log(`Wrote motion photo video to ${motionAsset.originalPath}`); @@ -854,6 +839,13 @@ export class MetadataService extends BaseService { // update area coordinates and dimensions in RegionList assuming "normalized" unit as per MWG guidelines const adjustedRegionList = regionInfo.RegionList.map((region) => { let { X, Y, W, H } = region.Area; + + // EXIF floats with >16 decimals are serialized as strings. Ensure they are numbers. + X = Number(X); + Y = Number(Y); + W = Number(W); + H = Number(H); + switch (orientation) { case ExifOrientation.MirrorHorizontal: { X = 1 - X; @@ -926,16 +918,21 @@ export class MetadataService extends BaseService { const loweredName = region.Name.toLowerCase(); const personId = existingNameMap.get(loweredName) || this.cryptoRepository.randomUUID(); + const X = Number(region.Area.X); + const Y = Number(region.Area.Y); + const W = Number(region.Area.W); + const H = Number(region.Area.H); + const face = { id: this.cryptoRepository.randomUUID(), personId, assetId: asset.id, imageWidth, imageHeight, - boundingBoxX1: Math.floor((region.Area.X - region.Area.W / 2) * imageWidth), - boundingBoxY1: Math.floor((region.Area.Y - region.Area.H / 2) * imageHeight), - boundingBoxX2: Math.floor((region.Area.X + region.Area.W / 2) * imageWidth), - boundingBoxY2: Math.floor((region.Area.Y + region.Area.H / 2) * imageHeight), + boundingBoxX1: Math.floor((X - W / 2) * imageWidth), + boundingBoxY1: Math.floor((Y - H / 2) * imageHeight), + boundingBoxX2: Math.floor((X + W / 2) * imageWidth), + boundingBoxY2: Math.floor((Y + H / 2) * imageHeight), sourceType: SourceType.Exif, }; @@ -991,7 +988,7 @@ export class MetadataService extends BaseService { // timezone let timeZone = exifTags.zone ?? null; - if (timeZone == null && (dateTime?.rawValue?.endsWith('Z') || dateTime?.rawValue?.endsWith('+00:00'))) { + if (timeZone === null && (dateTime?.rawValue?.endsWith('Z') || dateTime?.rawValue?.endsWith('+00:00'))) { // exiftool-vendored returns "no timezone" information even though "+00:00" might be set explicitly // https://github.com/photostructure/exiftool-vendored.js/issues/203 timeZone = 'UTC+0'; @@ -1075,6 +1072,7 @@ export class MetadataService extends BaseService { private getDuration(tags: ImmichTags): number | null { const duration = tags.Duration; + // eslint-disable-next-line unicorn/prefer-number-coercion const seconds = typeof duration === 'number' ? duration : Number.parseFloat(duration as string); return Number.isFinite(seconds) ? Math.round(Duration.fromObject({ seconds }).toMillis()) : null; } diff --git a/server/src/services/notification.service.spec.ts b/server/src/services/notification.service.spec.ts index 0d51db7ac8..d6fcefbe6a 100644 --- a/server/src/services/notification.service.spec.ts +++ b/server/src/services/notification.service.spec.ts @@ -2,7 +2,6 @@ import { defaults, SystemConfig } from 'src/config'; import { SystemConfigDto } from 'src/dtos/system-config.dto'; import { AssetFileType, JobName, JobStatus, UserMetadataKey } from 'src/enum'; import { NotificationService } from 'src/services/notification.service'; -import { INotifyAlbumUpdateJob } from 'src/types'; import { AlbumFactory } from 'test/factories/album.factory'; import { AssetFileFactory } from 'test/factories/asset-file.factory'; import { AssetFactory } from 'test/factories/asset.factory'; @@ -157,13 +156,21 @@ describe(NotificationService.name, () => { }); describe('onAlbumUpdateEvent', () => { - it('should queue notify album update event', async () => { - await sut.onAlbumUpdate({ id: 'album', recipientId: '42' }); - expect(mocks.job.queue).toHaveBeenCalledWith({ + it('should send a websocket event to every user and queue notify jobs for recipients', async () => { + await sut.onAlbumUpdate({ id: 'album', userIds: ['1', '42'], recipientIds: ['42'] }); + expect(mocks.websocket.clientSend).toHaveBeenCalledWith('on_album_update', '1', 'album'); + expect(mocks.websocket.clientSend).toHaveBeenCalledWith('on_album_update', '42', 'album'); + expect(mocks.job.queue).toHaveBeenCalledExactlyOnceWith({ name: JobName.NotifyAlbumUpdate, data: { id: 'album', recipientId: '42', delay: 300_000 }, }); }); + + it('should not queue email jobs when there are no recipients', async () => { + await sut.onAlbumUpdate({ id: 'album', userIds: ['1'], recipientIds: [] }); + expect(mocks.websocket.clientSend).toHaveBeenCalledWith('on_album_update', '1', 'album'); + expect(mocks.job.queue).not.toHaveBeenCalled(); + }); }); describe('onAlbumInviteEvent', () => { @@ -522,7 +529,7 @@ describe(NotificationService.name, () => { }); it('should add new recipients for new images if job is already queued', async () => { - await sut.onAlbumUpdate({ id: '1', recipientId: '2' } as INotifyAlbumUpdateJob); + await sut.onAlbumUpdate({ id: '1', userIds: ['2'], recipientIds: ['2'] }); expect(mocks.job.removeJob).toHaveBeenCalledWith(JobName.NotifyAlbumUpdate, '1/2'); expect(mocks.job.queue).toHaveBeenCalledWith({ name: JobName.NotifyAlbumUpdate, diff --git a/server/src/services/notification.service.ts b/server/src/services/notification.service.ts index e688f7dc7f..a650b466ba 100644 --- a/server/src/services/notification.service.ts +++ b/server/src/services/notification.service.ts @@ -217,12 +217,18 @@ export class NotificationService extends BaseService { } @OnEvent({ name: 'AlbumUpdate' }) - async onAlbumUpdate({ id, recipientId }: ArgOf<'AlbumUpdate'>) { - await this.jobRepository.removeJob(JobName.NotifyAlbumUpdate, `${id}/${recipientId}`); - await this.jobRepository.queue({ - name: JobName.NotifyAlbumUpdate, - data: { id, recipientId, delay: NotificationService.albumUpdateEmailDelayMs }, - }); + async onAlbumUpdate({ id, userIds, recipientIds }: ArgOf<'AlbumUpdate'>) { + for (const userId of userIds) { + this.websocketRepository.clientSend('on_album_update', userId, id); + } + + for (const recipientId of recipientIds) { + await this.jobRepository.removeJob(JobName.NotifyAlbumUpdate, `${id}/${recipientId}`); + await this.jobRepository.queue({ + name: JobName.NotifyAlbumUpdate, + data: { id, recipientId, delay: NotificationService.albumUpdateEmailDelayMs }, + }); + } } @OnEvent({ name: 'AlbumInvite' }) diff --git a/server/src/services/ocr.service.ts b/server/src/services/ocr.service.ts index d92d399dba..8e32a44376 100644 --- a/server/src/services/ocr.service.ts +++ b/server/src/services/ocr.service.ts @@ -1,12 +1,12 @@ import { Injectable } from '@nestjs/common'; -import { JOBS_ASSET_PAGINATION_SIZE } from 'src/constants'; + import { OnJob } from 'src/decorators'; import { AssetVisibility, JobName, JobStatus, QueueName } from 'src/enum'; import { OCR } from 'src/repositories/machine-learning.repository'; import { BaseService } from 'src/services/base.service'; -import { JobItem, JobOf } from 'src/types'; +import { JobOf } from 'src/types'; import { tokenizeForSearch } from 'src/utils/database'; -import { isOcrEnabled } from 'src/utils/misc'; +import { batched, isOcrEnabled } from 'src/utils/misc'; @Injectable() export class OcrService extends BaseService { @@ -21,19 +21,10 @@ export class OcrService extends BaseService { await this.ocrRepository.deleteAll(); } - let jobs: JobItem[] = []; - const assets = this.assetJobRepository.streamForOcrJob(force); - - for await (const asset of assets) { - jobs.push({ name: JobName.Ocr, data: { id: asset.id } }); - - if (jobs.length >= JOBS_ASSET_PAGINATION_SIZE) { - await this.jobRepository.queueAll(jobs); - jobs = []; - } + for await (const assets of batched(this.assetJobRepository.streamForOcrJob(force))) { + await this.jobRepository.queueAll(assets.map((asset) => ({ name: JobName.Ocr, data: { id: asset.id } }))); } - await this.jobRepository.queueAll(jobs); return JobStatus.Success; } diff --git a/server/src/services/partner.service.spec.ts b/server/src/services/partner.service.spec.ts index 029462a865..b947f3795a 100644 --- a/server/src/services/partner.service.spec.ts +++ b/server/src/services/partner.service.spec.ts @@ -54,6 +54,7 @@ describe(PartnerService.name, () => { const auth = AuthFactory.create({ id: user1.id }); mocks.partner.get.mockResolvedValue(void 0); + mocks.user.get.mockResolvedValue(user2); mocks.partner.create.mockResolvedValue(getForPartner(partner)); await expect(sut.create(auth, { sharedWithId: user2.id })).resolves.toBeDefined(); @@ -76,6 +77,19 @@ describe(PartnerService.name, () => { expect(mocks.partner.create).not.toHaveBeenCalled(); }); + + it('should throw an error when sharedWithId does not resolve to an existing (non-deleted) user', async () => { + const user1 = UserFactory.create(); + const user2 = UserFactory.create(); + const auth = AuthFactory.create({ id: user1.id }); + + mocks.partner.get.mockResolvedValue(void 0); + mocks.user.get.mockResolvedValue(void 0); + + await expect(sut.create(auth, { sharedWithId: user2.id })).rejects.toBeInstanceOf(BadRequestException); + + expect(mocks.partner.create).not.toHaveBeenCalled(); + }); }); describe('remove', () => { diff --git a/server/src/services/partner.service.ts b/server/src/services/partner.service.ts index cc950edb5b..26d7701077 100644 --- a/server/src/services/partner.service.ts +++ b/server/src/services/partner.service.ts @@ -16,6 +16,12 @@ export class PartnerService extends BaseService { throw new BadRequestException(`Partner already exists`); } + const user = await this.userRepository.get(sharedWithId, {}); + if (!user) { + this.logger.debug('Partner creation failed: user not found'); + throw new BadRequestException('Invalid user'); + } + const partner = await this.partnerRepository.create(partnerId); return this.mapPartner(partner, PartnerDirection.SharedBy); } diff --git a/server/src/services/person.service.ts b/server/src/services/person.service.ts index bb17590795..7c08c36e17 100644 --- a/server/src/services/person.service.ts +++ b/server/src/services/person.service.ts @@ -1,6 +1,5 @@ import { BadRequestException, Injectable, NotFoundException } from '@nestjs/common'; import { Insertable, Updateable } from 'kysely'; -import { JOBS_ASSET_PAGINATION_SIZE } from 'src/constants'; import { Person } from 'src/database'; import { Chunked, OnJob } from 'src/decorators'; import { BulkIdErrorReason, BulkIdResponseDto, BulkIdsDto } from 'src/dtos/asset-ids.response.dto'; @@ -43,7 +42,7 @@ import { JobItem, JobOf } from 'src/types'; import { getDimensions } from 'src/utils/asset.util'; import { ImmichFileResponse } from 'src/utils/file'; import { mimeTypes } from 'src/utils/mime-types'; -import { isFacialRecognitionEnabled } from 'src/utils/misc'; +import { batched, findOrFail, isFacialRecognitionEnabled } from 'src/utils/misc'; import { Point, transformPoints } from 'src/utils/transform'; @Injectable() @@ -120,7 +119,7 @@ export class PersonService extends BaseService { await this.createNewFeaturePhoto([face.person.id]); } - return await this.findOrFail(personId).then(mapPerson); + return mapPerson(await this.findOrFail(personId)); } async getFacesById(auth: AuthDto, dto: FaceDto): Promise { @@ -152,7 +151,7 @@ export class PersonService extends BaseService { async getById(auth: AuthDto, id: string): Promise { await this.requireAccess({ auth, permission: Permission.PersonRead, ids: [id] }); - return this.findOrFail(id).then(mapPerson); + return mapPerson(await this.findOrFail(id)); } async getStatistics(auth: AuthDto, id: string): Promise { @@ -192,7 +191,7 @@ export class PersonService extends BaseService { const { name, birthDate, isHidden, featureFaceAssetId: assetId, isFavorite, color } = dto; // TODO: set by faceId directly - let faceId: string | undefined = undefined; + let faceId: string | undefined; if (assetId) { await this.requireAccess({ auth, permission: Permission.AssetRead, ids: [assetId] }); const face = await this.personRepository.getForFeatureFaceUpdate({ personId: id, assetId }); @@ -277,19 +276,12 @@ export class PersonService extends BaseService { await this.personRepository.vacuum({ reindexVectors: true }); } - let jobs: JobItem[] = []; - const assets = this.assetJobRepository.streamForDetectFacesJob(force); - for await (const asset of assets) { - jobs.push({ name: JobName.AssetDetectFaces, data: { id: asset.id } }); - - if (jobs.length >= JOBS_ASSET_PAGINATION_SIZE) { - await this.jobRepository.queueAll(jobs); - jobs = []; - } + for await (const assets of batched(this.assetJobRepository.streamForDetectFacesJob(force))) { + await this.jobRepository.queueAll( + assets.map((asset) => ({ name: JobName.AssetDetectFaces, data: { id: asset.id } })), + ); } - await this.jobRepository.queueAll(jobs); - if (force === undefined) { await this.jobRepository.queue({ name: JobName.PersonCleanup }); } @@ -435,22 +427,16 @@ export class PersonService extends BaseService { await this.databaseRepository.prewarm(VectorIndex.Face); const lastRun = new Date().toISOString(); - const facePagination = this.personRepository.getAllFaces( + + const faces = this.personRepository.getAllFaces( force ? undefined : { personId: null, sourceType: SourceType.MachineLearning }, ); - - let jobs: { name: JobName.FacialRecognition; data: { id: string; deferred: false } }[] = []; - for await (const face of facePagination) { - jobs.push({ name: JobName.FacialRecognition, data: { id: face.id, deferred: false } }); - - if (jobs.length === JOBS_ASSET_PAGINATION_SIZE) { - await this.jobRepository.queueAll(jobs); - jobs = []; - } + for await (const batch of batched(faces)) { + await this.jobRepository.queueAll( + batch.map((face) => ({ name: JobName.FacialRecognition, data: { id: face.id, deferred: false } })), + ); } - await this.jobRepository.queueAll(jobs); - await this.systemMetadataRepository.set(SystemMetadataKey.FacialRecognitionState, { lastRun }); return JobStatus.Success; @@ -614,12 +600,8 @@ export class PersonService extends BaseService { return results; } - private async findOrFail(id: string) { - const person = await this.personRepository.getById(id); - if (!person) { - throw new BadRequestException('Person not found'); - } - return person; + private findOrFail(id: string) { + return findOrFail(() => this.personRepository.getById(id), 'Person'); } // TODO return a asset face response @@ -655,14 +637,12 @@ export class PersonService extends BaseService { topLeft = { x: topLeft.x * scaleFactor, y: topLeft.y * scaleFactor }; bottomRight = { x: bottomRight.x * scaleFactor, y: bottomRight.y * scaleFactor }; - const { - points: [invertedTopLeft, invertedBottomRight], - } = transformPoints( + const [invertedTopLeft, invertedBottomRight] = transformPoints( [topLeft, bottomRight], edits, { width: asset.width, height: asset.height }, { inverse: true }, - ); + ).points; // make sure topLeft is top-left and bottomRight is bottom-right topLeft = { diff --git a/server/src/services/queue.service.ts b/server/src/services/queue.service.ts index bf744aa01d..1f0bf6c76b 100644 --- a/server/src/services/queue.service.ts +++ b/server/src/services/queue.service.ts @@ -93,10 +93,7 @@ export class QueueService extends BaseService { private updateConcurrency(config: SystemConfig) { this.logger.debug(`Updating queue concurrency settings`); for (const queueName of Object.values(QueueName)) { - let concurrency = 1; - if (this.isConcurrentQueue(queueName)) { - concurrency = config.job[queueName].concurrency; - } + const concurrency = this.isConcurrentQueue(queueName) ? config.job[queueName].concurrency : 1; this.logger.debug(`Setting ${queueName} concurrency to ${concurrency}`); this.jobRepository.setConcurrency(queueName, concurrency); } @@ -161,9 +158,7 @@ export class QueueService extends BaseService { throw new BadRequestException(`The BackgroundTask queue cannot be paused`); } await this.jobRepository.pause(name); - } - - if (dto.isPaused === false) { + } else if (dto.isPaused === false) { await this.jobRepository.resume(name); } diff --git a/server/src/services/search.service.spec.ts b/server/src/services/search.service.spec.ts index 4680b4c9de..c0f5a3614d 100644 --- a/server/src/services/search.service.spec.ts +++ b/server/src/services/search.service.spec.ts @@ -250,7 +250,7 @@ describe(SearchService.name, () => { ); expect(mocks.search.searchSmart).toHaveBeenCalledWith( { page: 1, size: 100 }, - { query: 'test', embedding: '[1, 2, 3]', userIds: [authStub.user1.user.id] }, + { query: 'test', embedding: '[1, 2, 3]', userIds: [authStub.user1.user.id], visibility: 'not-locked' }, ); }); diff --git a/server/src/services/search.service.ts b/server/src/services/search.service.ts index bd50ab3083..c99b340dae 100644 --- a/server/src/services/search.service.ts +++ b/server/src/services/search.service.ts @@ -73,14 +73,24 @@ export class SearchService extends BaseService { checksum = Buffer.from(dto.checksum, encoding); } + let userIds: string[] | undefined; + + if (dto.albumIds && dto.albumIds.length > 0) { + await this.requireAccess({ auth, ids: dto.albumIds, permission: Permission.AlbumRead }); + } else if (auth.sharedLink) { + throw new BadRequestException('Shared link access is only allowed in combination with an albumIds filter'); + } else { + userIds = await this.getUserIdsToSearch(auth, dto.visibility); + } + const page = dto.page ?? 1; const size = dto.size || 250; - const userIds = await this.getUserIdsToSearch(auth, dto.visibility); const { hasNextPage, items } = await this.searchRepository.searchMetadata( { page, size }, { ...dto, checksum, + visibility: dto.visibility ?? (auth.session?.hasElevatedPermission ? undefined : 'not-locked'), userIds, orderDirection: dto.order ?? AssetOrder.Desc, }, @@ -90,10 +100,14 @@ export class SearchService extends BaseService { } async searchStatistics(auth: AuthDto, dto: StatisticsSearchDto): Promise { - const userIds = await this.getUserIdsToSearch(auth); + const userIds = await this.getUserIdsToSearch(auth, dto.visibility); + if (dto.visibility === AssetVisibility.Locked) { + requireElevatedPermission(auth); + } return await this.searchRepository.searchStatistics({ ...dto, + visibility: dto.visibility ?? (auth.session?.hasElevatedPermission ? undefined : 'not-locked'), userIds, }); } @@ -104,7 +118,11 @@ export class SearchService extends BaseService { } const userIds = await this.getUserIdsToSearch(auth, dto.visibility); - const items = await this.searchRepository.searchRandom(dto.size || 250, { ...dto, userIds }); + const items = await this.searchRepository.searchRandom(dto.size || 250, { + ...dto, + visibility: dto.visibility ?? (auth.session?.hasElevatedPermission ? undefined : 'not-locked'), + userIds, + }); return items.map((item) => mapAsset(item, { auth })); } @@ -114,7 +132,11 @@ export class SearchService extends BaseService { } const userIds = await this.getUserIdsToSearch(auth, dto.visibility); - const items = await this.searchRepository.searchLargeAssets(dto.size || 250, { ...dto, userIds }); + const items = await this.searchRepository.searchLargeAssets(dto.size || 250, { + ...dto, + visibility: dto.visibility ?? (auth.session?.hasElevatedPermission ? undefined : 'not-locked'), + userIds, + }); return items.map((item) => mapAsset(item, { auth })); } @@ -155,7 +177,12 @@ export class SearchService extends BaseService { const size = dto.size || 100; const { hasNextPage, items } = await this.searchRepository.searchSmart( { page, size }, - { ...dto, userIds: await userIds, embedding }, + { + ...dto, + userIds: await userIds, + embedding, + visibility: dto.visibility ?? (auth.session?.hasElevatedPermission ? undefined : 'not-locked'), + }, ); return this.mapResponse(items, hasNextPage ? (page + 1).toString() : null, { auth }); diff --git a/server/src/services/server.service.spec.ts b/server/src/services/server.service.spec.ts index e1575a496a..b4b1af35d6 100644 --- a/server/src/services/server.service.spec.ts +++ b/server/src/services/server.service.spec.ts @@ -1,5 +1,6 @@ import { SystemMetadataKey } from 'src/enum'; import { ServerService } from 'src/services/server.service'; +import { mockEnvData } from 'test/repositories/config.repository.mock'; import { newTestService, ServiceMocks } from 'test/utils'; describe(ServerService.name, () => { @@ -161,7 +162,7 @@ describe(ServerService.name, () => { oauthButtonText: 'Login with OAuth', trashDays: 30, userDeleteDelay: 7, - isInitialized: undefined, + isInitialized: false, isOnboarded: false, externalDomain: '', publicUsers: true, @@ -172,6 +173,19 @@ describe(ServerService.name, () => { }); expect(mocks.systemMetadata.get).toHaveBeenCalled(); }); + + it('should be initialized once an admin exists', async () => { + mocks.user.hasAdmin.mockResolvedValue(true); + + await expect(sut.getSystemConfig()).resolves.toMatchObject({ isInitialized: true }); + }); + + it('should be initialized when setup is disabled', async () => { + mocks.config.getEnv.mockReturnValue(mockEnvData({ setup: { allow: false } })); + mocks.user.hasAdmin.mockResolvedValue(false); + + await expect(sut.getSystemConfig()).resolves.toMatchObject({ isInitialized: true }); + }); }); describe('getStats', () => { diff --git a/server/src/services/server.service.ts b/server/src/services/server.service.ts index 3b66b677a5..57342f9509 100644 --- a/server/src/services/server.service.ts +++ b/server/src/services/server.service.ts @@ -77,7 +77,7 @@ export class ServerService extends BaseService { serverInfo.diskAvailableRaw = diskInfo.available; serverInfo.diskSizeRaw = diskInfo.total; serverInfo.diskUseRaw = diskInfo.total - diskInfo.free; - serverInfo.diskUsagePercentage = Number.parseFloat(usagePercentage); + serverInfo.diskUsagePercentage = Number(usagePercentage); return serverInfo; } @@ -111,9 +111,8 @@ export class ServerService extends BaseService { } async getSystemConfig(): Promise { - const { setup } = this.configRepository.getEnv(); const config = await this.getConfig({ withCache: false }); - const isInitialized = !setup.allow || (await this.userRepository.hasAdmin()); + const isInitialized = !(await this.isSetupAvailable()); const onboarding = await this.systemMetadataRepository.get(SystemMetadataKey.AdminOnboarding); return { @@ -190,8 +189,12 @@ export class ServerService extends BaseService { throw new BadRequestException('Invalid license key'); } const { licensePublicKey } = this.configRepository.getEnv(); - const licenseValid = this.cryptoRepository.verifySha256(dto.licenseKey, dto.activationKey, licensePublicKey.server); - if (!licenseValid) { + const isLicenseValid = this.cryptoRepository.verifySha256( + dto.licenseKey, + dto.activationKey, + licensePublicKey.server, + ); + if (!isLicenseValid) { throw new BadRequestException('Invalid license key'); } diff --git a/server/src/services/shared-link.service.ts b/server/src/services/shared-link.service.ts index 79e4b23e6a..31ca32f552 100644 --- a/server/src/services/shared-link.service.ts +++ b/server/src/services/shared-link.service.ts @@ -13,13 +13,14 @@ import { } from 'src/dtos/shared-link.dto'; import { Permission, SharedLinkType } from 'src/enum'; import { BaseService } from 'src/services/base.service'; -import { getExternalDomain, OpenGraphTags } from 'src/utils/misc'; +import { findOrFail, getExternalDomain, OpenGraphTags } from 'src/utils/misc'; @Injectable() export class SharedLinkService extends BaseService { async getAll(auth: AuthDto, { id, albumId }: SharedLinkSearchDto): Promise { return this.sharedLinkRepository .getAll({ userId: auth.user.id, id, albumId }) + .then((links) => links.map((link) => mapSharedLink(link, { stripAssetMetadata: false }))); } @@ -142,12 +143,8 @@ export class SharedLinkService extends BaseService { } // TODO: replace `userId` with permissions and access control checks - private async findOrFail(userId: string, id: string) { - const sharedLink = await this.sharedLinkRepository.get(userId, id); - if (!sharedLink) { - throw new BadRequestException('Shared link not found'); - } - return sharedLink; + private findOrFail(userId: string, id: string) { + return findOrFail(() => this.sharedLinkRepository.get(userId, id), 'Shared link'); } async addAssets(auth: AuthDto, id: string, dto: AssetIdsDto): Promise { @@ -200,7 +197,7 @@ export class SharedLinkService extends BaseService { const results: AssetIdsResponseDto[] = []; for (const assetId of dto.assetIds) { - const wasRemoved = removedAssetIds.find((id) => id === assetId); + const wasRemoved = removedAssetIds.includes(assetId); if (!wasRemoved) { results.push({ assetId, success: false, error: AssetIdErrorReason.NOT_FOUND }); continue; diff --git a/server/src/services/smart-info.service.ts b/server/src/services/smart-info.service.ts index d484fe8b6a..19a1774492 100644 --- a/server/src/services/smart-info.service.ts +++ b/server/src/services/smart-info.service.ts @@ -1,12 +1,12 @@ import { Injectable } from '@nestjs/common'; import { SystemConfig } from 'src/config'; -import { JOBS_ASSET_PAGINATION_SIZE } from 'src/constants'; + import { OnEvent, OnJob } from 'src/decorators'; import { AssetVisibility, DatabaseLock, ImmichWorker, JobName, JobStatus, QueueName } from 'src/enum'; import { ArgOf } from 'src/repositories/event.repository'; import { BaseService } from 'src/services/base.service'; -import { JobItem, JobOf } from 'src/types'; -import { getCLIPModelInfo, isSmartSearchEnabled } from 'src/utils/misc'; +import { JobOf } from 'src/types'; +import { batched, getCLIPModelInfo, isSmartSearchEnabled } from 'src/utils/misc'; @Injectable() export class SmartInfoService extends BaseService { @@ -43,12 +43,12 @@ export class SmartInfoService extends BaseService { const modelChange = oldConfig && oldConfig.machineLearning.clip.modelName !== newConfig.machineLearning.clip.modelName; - const dimSizeChange = dbDimSize !== dimSize; - if (!modelChange && !dimSizeChange) { + const isDimSizeChange = dbDimSize !== dimSize; + if (!modelChange && !isDimSizeChange) { return; } - if (dimSizeChange) { + if (isDimSizeChange) { this.logger.log( `Dimension size of model ${newConfig.machineLearning.clip.modelName} is ${dimSize}, but database expects ${dbDimSize}.`, ); @@ -77,18 +77,10 @@ export class SmartInfoService extends BaseService { await this.databaseRepository.setDimensionSize(dimSize); } - let queue: JobItem[] = []; - const assets = this.assetJobRepository.streamForEncodeClip(force); - for await (const asset of assets) { - queue.push({ name: JobName.SmartSearch, data: { id: asset.id } }); - if (queue.length >= JOBS_ASSET_PAGINATION_SIZE) { - await this.jobRepository.queueAll(queue); - queue = []; - } + for await (const assets of batched(this.assetJobRepository.streamForEncodeClip(force))) { + await this.jobRepository.queueAll(assets.map((asset) => ({ name: JobName.SmartSearch, data: { id: asset.id } }))); } - await this.jobRepository.queueAll(queue); - return JobStatus.Success; } diff --git a/server/src/services/stack.service.spec.ts b/server/src/services/stack.service.spec.ts index d47d634f4f..933c7f39c5 100644 --- a/server/src/services/stack.service.spec.ts +++ b/server/src/services/stack.service.spec.ts @@ -85,8 +85,9 @@ describe(StackService.name, () => { it('should fail if stack could not be found', async () => { mocks.access.stack.checkOwnerAccess.mockResolvedValue(new Set(['stack-id'])); + mocks.stack.getById.mockResolvedValue(void 0); - await expect(sut.get(authStub.admin, 'stack-id')).rejects.toBeInstanceOf(Error); + await expect(sut.get(authStub.admin, 'stack-id')).rejects.toBeInstanceOf(BadRequestException); expect(mocks.access.stack.checkOwnerAccess).toHaveBeenCalled(); expect(mocks.stack.getById).toHaveBeenCalledWith('stack-id'); @@ -124,8 +125,9 @@ describe(StackService.name, () => { it('should fail if stack could not be found', async () => { mocks.access.stack.checkOwnerAccess.mockResolvedValue(new Set(['stack-id'])); + mocks.stack.getById.mockResolvedValue(void 0); - await expect(sut.update(AuthFactory.create(), 'stack-id', {})).rejects.toBeInstanceOf(Error); + await expect(sut.update(AuthFactory.create(), 'stack-id', {})).rejects.toBeInstanceOf(BadRequestException); expect(mocks.stack.getById).toHaveBeenCalledWith('stack-id'); expect(mocks.stack.update).not.toHaveBeenCalled(); diff --git a/server/src/services/stack.service.ts b/server/src/services/stack.service.ts index c84ec70fbf..9dc47a97bf 100644 --- a/server/src/services/stack.service.ts +++ b/server/src/services/stack.service.ts @@ -4,6 +4,7 @@ import { AuthDto } from 'src/dtos/auth.dto'; import { StackCreateDto, StackResponseDto, StackSearchDto, StackUpdateDto, mapStack } from 'src/dtos/stack.dto'; import { Permission } from 'src/enum'; import { BaseService } from 'src/services/base.service'; +import { findOrFail } from 'src/utils/misc'; import { UUIDAssetIDParamDto } from 'src/validation'; @Injectable() @@ -36,7 +37,7 @@ export class StackService extends BaseService { async update(auth: AuthDto, id: string, dto: StackUpdateDto): Promise { await this.requireAccess({ auth, permission: Permission.StackUpdate, ids: [id] }); const stack = await this.findOrFail(id); - if (dto.primaryAssetId && !stack.assets.some(({ id }) => id === dto.primaryAssetId)) { + if (dto.primaryAssetId && stack.assets.every(({ id }) => id !== dto.primaryAssetId)) { throw new BadRequestException('Primary asset must be in the stack'); } @@ -77,12 +78,7 @@ export class StackService extends BaseService { await this.eventRepository.emit('StackUpdate', { stackId, userId: auth.user.id }); } - private async findOrFail(id: string) { - const stack = await this.stackRepository.getById(id); - if (!stack) { - throw new Error('Asset stack not found'); - } - - return stack; + private findOrFail(id: string) { + return findOrFail(() => this.stackRepository.getById(id), 'Asset stack'); } } diff --git a/server/src/services/storage-template.service.ts b/server/src/services/storage-template.service.ts index acdcc868b2..de731f46c6 100644 --- a/server/src/services/storage-template.service.ts +++ b/server/src/services/storage-template.service.ts @@ -20,7 +20,7 @@ import { ArgOf } from 'src/repositories/event.repository'; import { BaseService } from 'src/services/base.service'; import { JobOf, StorageAsset } from 'src/types'; import { getAssetFile } from 'src/utils/asset.util'; -import { getLivePhotoMotionFilename } from 'src/utils/file'; +import { getFilenameExtension, getLivePhotoMotionFilename } from 'src/utils/file'; const storageTokens = { secondOptions: ['s', 'ss', 'SSS'], @@ -141,8 +141,8 @@ export class StorageTemplateService extends BaseService { @OnJob({ name: JobName.StorageTemplateMigrationSingle, queue: QueueName.StorageTemplateMigration }) async handleMigrationSingle({ id }: JobOf): Promise { const config = await this.getConfig({ withCache: true }); - const storageTemplateEnabled = config.storageTemplate.enabled; - if (!storageTemplateEnabled) { + const isStorageTemplateEnabled = config.storageTemplate.enabled; + if (!isStorageTemplateEnabled) { return JobStatus.Skipped; } @@ -267,10 +267,10 @@ export class StorageTemplateService extends BaseService { const { storageLabel, filename } = metadata; try { - const filenameWithoutExtension = path.basename(filename, path.extname(filename)); + const filenameWithoutExtension = path.basename(filename, getFilenameExtension(filename)); const source = asset.originalPath; - let extension = path.extname(source).split('.').pop() as string; + let extension = getFilenameExtension(source).split('.').pop() as string; const sanitized = sanitize(path.basename(filenameWithoutExtension, `.${extension}`)); extension = extension?.toLowerCase(); const rootPath = StorageCore.getLibraryFolder({ id: asset.ownerId, storageLabel }); @@ -372,8 +372,8 @@ export class StorageTemplateService extends BaseService { let duplicateCount = 0; while (true) { - const exists = await this.storageRepository.checkFileExists(destination); - if (!exists) { + const isExists = await this.storageRepository.checkFileExists(destination); + if (!isExists) { break; } @@ -402,8 +402,8 @@ export class StorageTemplateService extends BaseService { const substitutions: Record = { filename, ext: extension, - filetype: asset.type == AssetType.Image ? 'IMG' : 'VID', - filetypefull: asset.type == AssetType.Image ? 'IMAGE' : 'VIDEO', + filetype: asset.type === AssetType.Image ? 'IMG' : 'VID', + filetypefull: asset.type === AssetType.Image ? 'IMAGE' : 'VIDEO', assetId: asset.id, assetIdShort: asset.id.slice(-12), //just throw into the root if it doesn't belong to an album diff --git a/server/src/services/storage.service.ts b/server/src/services/storage.service.ts index b443d31c7f..95926d6509 100644 --- a/server/src/services/storage.service.ts +++ b/server/src/services/storage.service.ts @@ -30,8 +30,8 @@ export class StorageService extends BaseService { const candidates = ['/data', '/usr/src/app/upload']; for (const candidate of candidates) { - const exists = this.storageRepository.existsSync(candidate); - if (exists) { + const isExists = this.storageRepository.existsSync(candidate); + if (isExists) { targets.push(candidate); } } @@ -56,7 +56,7 @@ export class StorageService extends BaseService { flags.mountChecks = {}; } - let updated = false; + let isUpdated = false; this.logger.log(`Verifying system mount folder checks, current state: ${JSON.stringify(flags)}`); @@ -73,11 +73,11 @@ export class StorageService extends BaseService { if (!flags.mountChecks[folder]) { flags.mountChecks[folder] = true; - updated = true; + isUpdated = true; } } - if (updated) { + if (isUpdated) { await this.systemMetadataRepository.set(SystemMetadataKey.SystemFlags, flags); this.logger.log('Successfully enabled system mount folders checks'); } @@ -166,7 +166,7 @@ export class StorageService extends BaseService { const { folderPath, internalPath, externalPath } = this.getMountFilePaths(folder); try { this.storageRepository.mkdirSync(folderPath); - await this.storageRepository.createFile(internalPath, Buffer.from(`${Date.now()}`)); + await this.storageRepository.createFile(internalPath, Buffer.from(Date.now().toString())); } catch (error) { if ((error as NodeJS.ErrnoException).code === 'EEXIST') { this.logger.warn('Found existing mount file, skipping creation'); @@ -180,7 +180,7 @@ export class StorageService extends BaseService { private async verifyWriteAccess(folder: StorageFolder) { const { internalPath, externalPath } = this.getMountFilePaths(folder); try { - await this.storageRepository.overwriteFile(internalPath, Buffer.from(`${Date.now()}`)); + await this.storageRepository.overwriteFile(internalPath, Buffer.from(Date.now().toString())); } catch (error) { this.logger.error(`Failed to write ${internalPath}: ${error}`); throw new ImmichStartupError(`Failed to write "${externalPath} - ${docsMessage}"`); diff --git a/server/src/services/sync.service.ts b/server/src/services/sync.service.ts index 376ba126e8..e3842b1503 100644 --- a/server/src/services/sync.service.ts +++ b/server/src/services/sync.service.ts @@ -192,7 +192,11 @@ export class SyncService extends BaseService { [SyncRequestType.AssetOcrV1]: () => this.syncAssetOcrV1(options, response, checkpointMap, auth), } as const; - for (const type of SYNC_TYPES_ORDER.filter((type) => dto.types.includes(type))) { + for (const type of SYNC_TYPES_ORDER) { + if (!dto.types.includes(type)) { + continue; + } + const handler = handlers[type as keyof typeof handlers]; await handler(); } @@ -437,7 +441,12 @@ export class SyncService extends BaseService { const upserts = this.syncRepository.album.getUpserts({ ...options, ack: checkpointMap[upsertType] }); for await (const { updateId, ...data } of upserts) { const albumUsers = await this.syncRepository.album.getAlbumUsers(data.id); - send(response, { type: upsertType, ids: [updateId], data: syncAlbumV2ToV1(data, albumUsers) }); + send(response, { + type: upsertType, + ids: [updateId], + // TODO: return null instead of '' in v4 + data: syncAlbumV2ToV1({ ...data, description: data.description ?? '' }, albumUsers), + }); } } @@ -451,7 +460,8 @@ export class SyncService extends BaseService { const upsertType = SyncEntityType.AlbumV2; const upserts = this.syncRepository.album.getUpserts({ ...options, ack: checkpointMap[upsertType] }); for await (const { updateId, ...data } of upserts) { - send(response, { type: upsertType, ids: [updateId], data }); + // TODO: return null instead of '' in v4 + send(response, { type: upsertType, ids: [updateId], data: { ...data, description: data.description ?? '' } }); } } @@ -573,16 +583,16 @@ export class SyncService extends BaseService { } const creates = this.syncRepository.albumAsset.getCreates({ ...options, ack: createCheckpoint }); - let first = true; + let isFirst = true; for await (const { updateId, ...data } of creates) { - if (first) { + if (isFirst) { send(response, { type: SyncEntityType.SyncAckV1, data: {}, ackType: SyncEntityType.AlbumAssetUpdateV2, ids: [options.nowId], }); - first = false; + isFirst = false; } send(response, { type: createType, ids: [updateId], data: mapSyncAssetV2(data) }); } @@ -644,16 +654,16 @@ export class SyncService extends BaseService { } const creates = this.syncRepository.albumAssetExif.getCreates({ ...options, ack: createCheckpoint }); - let first = true; + let isFirst = true; for await (const { updateId, ...data } of creates) { - if (first) { + if (isFirst) { send(response, { type: SyncEntityType.SyncAckV1, data: {}, ackType: SyncEntityType.AlbumAssetExifUpdateV1, ids: [options.nowId], }); - first = false; + isFirst = false; } send(response, { type: createType, ids: [updateId], data }); } diff --git a/server/src/services/system-config.service.spec.ts b/server/src/services/system-config.service.spec.ts index 920b9b9346..08851da96a 100644 --- a/server/src/services/system-config.service.spec.ts +++ b/server/src/services/system-config.service.spec.ts @@ -5,6 +5,7 @@ import { AudioCodec, Colorspace, CQMode, + HlsVideoResolution, ImageFormat, LogLevel, OAuthTokenEndpointAuthMethod, @@ -76,6 +77,8 @@ const updatedConfig = Object.freeze({ tonemap: ToneMapping.Hable, realtime: { enabled: false, + videoCodecs: [VideoCodec.H264, VideoCodec.Hevc], + resolutions: [HlsVideoResolution.p480, HlsVideoResolution.p720, HlsVideoResolution.p1080], }, }, integrityChecks: { @@ -359,7 +362,7 @@ describe(SystemConfigService.name, () => { expect(mocks.logger.error).toHaveBeenCalledTimes(2); expect(mocks.logger.error.mock.calls[0][0]).toEqual('Unable to load configuration file: immich-config.json'); expect(mocks.logger.error.mock.calls[1][0].toString()).toEqual( - expect.stringContaining('YAMLException: duplicated mapping key (1:20)'), + expect.stringContaining('YAMLException: duplicated mapping key (1:21)'), ); }); diff --git a/server/src/services/system-config.service.ts b/server/src/services/system-config.service.ts index 2762b9e754..faa4f8d423 100644 --- a/server/src/services/system-config.service.ts +++ b/server/src/services/system-config.service.ts @@ -51,7 +51,7 @@ export class SystemConfigService extends BaseService { @OnEvent({ name: 'ConfigValidate' }) onConfigValidate({ newConfig, oldConfig }: ArgOf<'ConfigValidate'>) { const { logLevel } = this.configRepository.getEnv(); - if (!_.isEqual(toPlainObject(newConfig.logging), oldConfig.logging) && logLevel) { + if (logLevel && !_.isEqual(toPlainObject(newConfig.logging), oldConfig.logging)) { throw new Error('Logging cannot be changed while the environment variable IMMICH_LOG_LEVEL is set.'); } } diff --git a/server/src/services/tag.service.ts b/server/src/services/tag.service.ts index 8b92d3abf8..08a9b00104 100644 --- a/server/src/services/tag.service.ts +++ b/server/src/services/tag.service.ts @@ -17,6 +17,7 @@ import { TagAssetTable } from 'src/schema/tables/tag-asset.table'; import { BaseService } from 'src/services/base.service'; import { addAssets, removeAssets } from 'src/utils/asset.util'; import { updateLockedColumns } from 'src/utils/database'; +import { findOrFail } from 'src/utils/misc'; import { upsertTags } from 'src/utils/tag'; @Injectable() @@ -92,7 +93,7 @@ export class TagService extends BaseService { const results = await this.tagRepository.upsertAssetIds(items); for (const assetId of new Set(results.map((item) => item.assetId))) { await this.updateTags(assetId); - await this.eventRepository.emit('AssetTag', { assetId }); + await this.eventRepository.emit('AssetTag', { assetId, userId: auth.user.id }); } return { count: results.length }; @@ -108,10 +109,12 @@ export class TagService extends BaseService { ); for (const { id: assetId, success } of results) { - if (success) { - await this.updateTags(assetId); - await this.eventRepository.emit('AssetTag', { assetId }); + if (!success) { + continue; } + + await this.updateTags(assetId); + await this.eventRepository.emit('AssetTag', { assetId, userId: auth.user.id }); } return results; @@ -127,10 +130,12 @@ export class TagService extends BaseService { ); for (const { id: assetId, success } of results) { - if (success) { - await this.updateTags(assetId); - await this.eventRepository.emit('AssetUntag', { assetId }); + if (!success) { + continue; } + + await this.updateTags(assetId); + await this.eventRepository.emit('AssetUntag', { assetId }); } return results; @@ -142,12 +147,8 @@ export class TagService extends BaseService { return JobStatus.Success; } - private async findOrFail(id: string) { - const tag = await this.tagRepository.get(id); - if (!tag) { - throw new BadRequestException('Tag not found'); - } - return tag; + private findOrFail(id: string) { + return findOrFail(() => this.tagRepository.get(id), 'Tag'); } private async updateTags(assetId: string) { diff --git a/server/src/services/telemetry.service.ts b/server/src/services/telemetry.service.ts index 7c4fe43214..51945bede3 100644 --- a/server/src/services/telemetry.service.ts +++ b/server/src/services/telemetry.service.ts @@ -34,10 +34,12 @@ export class TelemetryService extends BaseService { @OnEvent({ name: 'JobSuccess' }) onJobSuccess({ job, response }: ArgOf<'JobSuccess'>) { - if (response && Object.values(JobStatus).includes(response as JobStatus)) { - const jobMetric = `immich.jobs.${snakeCase(job.name)}.${response}`; - this.telemetryRepository.jobs.addToCounter(jobMetric, 1); + if (!(response && Object.values(JobStatus).includes(response as JobStatus))) { + return; } + + const jobMetric = `immich.jobs.${snakeCase(job.name)}.${response}`; + this.telemetryRepository.jobs.addToCounter(jobMetric, 1); } @OnEvent({ name: 'JobError' }) diff --git a/server/src/services/timeline.service.ts b/server/src/services/timeline.service.ts index b7ecbad9a9..d043267745 100644 --- a/server/src/services/timeline.service.ts +++ b/server/src/services/timeline.service.ts @@ -27,7 +27,7 @@ export class TimelineService extends BaseService { private async buildTimeBucketOptions(auth: AuthDto, dto: TimeBucketDto): Promise { const { userId, ...options } = dto; - let userIds: string[] | undefined = undefined; + let userIds: string[] | undefined; if (userId) { userIds = [userId]; @@ -52,7 +52,7 @@ export class TimelineService extends BaseService { if (dto.albumId) { await this.requireAccess({ auth, permission: Permission.AlbumRead, ids: [dto.albumId] }); } else { - dto.userId = dto.userId || auth.user.id; + dto.userId ||= auth.user.id; } if (dto.userId) { @@ -60,6 +60,9 @@ export class TimelineService extends BaseService { if (dto.visibility === AssetVisibility.Archive) { await this.requireAccess({ auth, permission: Permission.ArchiveRead, ids: [dto.userId] }); } + if (dto.visibility === AssetVisibility.Locked && dto.userId !== auth.user.id) { + throw new BadRequestException("You may not access another user's locked timeline"); + } } if (dto.tagId) { @@ -71,12 +74,12 @@ export class TimelineService extends BaseService { } if (dto.withPartners) { - const requestedLocked = dto.visibility === AssetVisibility.Locked; - const requestedArchived = dto.visibility === AssetVisibility.Archive || dto.visibility === undefined; - const requestedFavorite = dto.isFavorite === true || dto.isFavorite === false; - const requestedTrash = dto.isTrashed === true; + const isRequestedLocked = dto.visibility === AssetVisibility.Locked; + const isRequestedArchived = dto.visibility === AssetVisibility.Archive || dto.visibility === undefined; + const isRequestedFavorite = dto.isFavorite === true || dto.isFavorite === false; + const isRequestedTrash = dto.isTrashed === true; - if (requestedLocked || requestedArchived || requestedFavorite || requestedTrash) { + if (isRequestedLocked || isRequestedArchived || isRequestedFavorite || isRequestedTrash) { throw new BadRequestException( 'withPartners is only supported for non-archived, non-trashed, non-favorited, non-locked assets', ); diff --git a/server/src/services/transcoding.service.spec.ts b/server/src/services/transcoding.service.spec.ts index 8909a43342..5980b7078a 100644 --- a/server/src/services/transcoding.service.spec.ts +++ b/server/src/services/transcoding.service.spec.ts @@ -381,6 +381,8 @@ describe(TranscodingService.name, () => { '50', '-keyint_min', '50', + '-ac', + '2', '-copyts', '-r', '50130000/2012441', @@ -488,18 +490,15 @@ describe(TranscodingService.name, () => { describe('FFmpeg seek per segment', () => { const eiffelSeeks = [ - 0, 1.987_15, 3.994_372_222_222_222, 6.001_594_444_444_444, 8.008_816_666_666_666, 10.016_038_888_888_888, - 12.023_261_111_111_111, 14.030_483_333_333_333, 16.037_705_555_555_554, 18.044_927_777_777_776, - 20.052_149_999_999_997, 22.059_372_222_222_223, + 0, 1.98715, 3.994372222222222, 6.001594444444444, 8.008816666666666, 10.016038888888888, 12.023261111111111, + 14.030483333333333, 16.037705555555554, 18.044927777777776, 20.052149999999997, 22.059372222222223, ]; const waterfallSeeks = [ - 0, 1.994_642_826_321_467, 4.006_047_357_065_803, 6.017_451_887_810_139_5, 8.028_856_418_554_476, - 10.040_260_949_298_812, + 0, 1.994642826321467, 4.006047357065803, 6.0174518878101395, 8.028856418554476, 10.040260949298812, ]; const trainSeeks = [ - 0, 1.991_666_666_666_666_7, 3.991_666_666_666_666_7, 5.991_666_666_666_666, 7.991_666_666_666_666, - 9.991_666_666_666_667, 11.991_666_666_666_667, 13.991_666_666_666_667, 15.991_666_666_666_667, - 17.991_666_666_666_667, 19.991_666_666_666_667, + 0, 1.9916666666666667, 3.9916666666666667, 5.991666666666666, 7.991666666666666, 9.991666666666667, + 11.991666666666667, 13.991666666666667, 15.991666666666667, 17.991666666666667, 19.991666666666667, ]; const cases = [ ...eiffelSeeks.map((expected, segmentIndex) => ({ diff --git a/server/src/services/transcoding.service.ts b/server/src/services/transcoding.service.ts index c79eec7884..8b083bfaf0 100644 --- a/server/src/services/transcoding.service.ts +++ b/server/src/services/transcoding.service.ts @@ -54,7 +54,7 @@ export class TranscodingService extends BaseService { clearInterval(this.cleanupInterval); this.cleanupInterval = null; } - return Promise.all([...this.sessions.values()].map(({ id }) => this.onSessionEnd({ sessionId: id }))); + return Promise.all(this.sessions.values().map(({ id }) => this.onSessionEnd({ sessionId: id }))); } @OnJob({ name: JobName.HlsSessionCleanup, queue: QueueName.BackgroundTask }) @@ -139,9 +139,9 @@ export class TranscodingService extends BaseService { session.variantIndex ??= variantIndex; session.startSegment ??= segmentIndex; const curSegment = session.lastCompletedSegment === null ? session.startSegment : session.lastCompletedSegment + 1; - const needsRestart = + const isNeedsRestart = session.variantIndex !== variantIndex || segmentIndex < session.startSegment || segmentIndex > curSegment + 1; - if (needsRestart) { + if (isNeedsRestart) { this.stopTranscode(session); session.variantIndex = variantIndex; session.startSegment = segmentIndex; @@ -372,7 +372,7 @@ export class TranscodingService extends BaseService { private removeInactiveSessions() { const cutoff = Date.now() - HLS_INACTIVITY_TIMEOUT_MS; - const inactiveSessions = [...this.sessions.values()].filter((s) => s.lastActivityTime.getTime() < cutoff); + const inactiveSessions = this.sessions.values().filter((s) => s.lastActivityTime.getTime() < cutoff); return Promise.all( inactiveSessions.map(async (session) => { try { diff --git a/server/src/services/trash.service.ts b/server/src/services/trash.service.ts index f1d368111e..368e16beb5 100644 --- a/server/src/services/trash.service.ts +++ b/server/src/services/trash.service.ts @@ -1,11 +1,11 @@ import { Injectable } from '@nestjs/common'; -import { JOBS_ASSET_PAGINATION_SIZE } from 'src/constants'; import { OnEvent, OnJob } from 'src/decorators'; import { BulkIdsDto } from 'src/dtos/asset-ids.response.dto'; import { AuthDto } from 'src/dtos/auth.dto'; import { TrashResponseDto } from 'src/dtos/trash.dto'; import { JobName, JobStatus, Permission, QueueName } from 'src/enum'; import { BaseService } from 'src/services/base.service'; +import { batched } from 'src/utils/misc'; @Injectable() export class TrashService extends BaseService { @@ -47,39 +47,16 @@ export class TrashService extends BaseService { @OnJob({ name: JobName.AssetEmptyTrash, queue: QueueName.BackgroundTask }) async handleEmptyTrash() { - const assets = this.trashRepository.getDeletedIds(); - let count = 0; - const batch: string[] = []; - for await (const { id } of assets) { - batch.push(id); - - if (batch.length === JOBS_ASSET_PAGINATION_SIZE) { - await this.handleBatch(batch); - count += batch.length; - batch.length = 0; - } + for await (const assets of batched(this.trashRepository.getDeletedIds())) { + await this.jobRepository.queueAll( + assets.map(({ id }) => ({ name: JobName.AssetDelete, data: { id, deleteOnDisk: true } })), + ); + count += assets.length; } - await this.handleBatch(batch); - count += batch.length; - batch.length = 0; - this.logger.log(`Queued ${count} asset(s) for deletion from the trash`); return JobStatus.Success; } - - private async handleBatch(ids: string[]) { - this.logger.debug(`Queueing ${ids.length} asset(s) for deletion from the trash`); - await this.jobRepository.queueAll( - ids.map((assetId) => ({ - name: JobName.AssetDelete, - data: { - id: assetId, - deleteOnDisk: true, - }, - })), - ); - } } diff --git a/server/src/services/user-admin.service.ts b/server/src/services/user-admin.service.ts index 15ea8c0598..f80a810616 100644 --- a/server/src/services/user-admin.service.ts +++ b/server/src/services/user-admin.service.ts @@ -17,6 +17,7 @@ import { JobName, UserMetadataKey, UserStatus } from 'src/enum'; import { UserFindOptions } from 'src/repositories/user.repository'; import { BaseService } from 'src/services/base.service'; import { getCalendarHeatmap } from 'src/services/shared/user-methods'; +import { findOrFail } from 'src/utils/misc'; import { getPreferences, getPreferencesPartial, mergePreferences } from 'src/utils/preferences'; @Injectable() @@ -158,11 +159,7 @@ export class UserAdminService extends BaseService { return mapPreferences(newPreferences); } - private async findOrFail(id: string, options: UserFindOptions) { - const user = await this.userRepository.get(id, options); - if (!user) { - throw new BadRequestException('User not found'); - } - return user; + private findOrFail(id: string, options: UserFindOptions) { + return findOrFail(() => this.userRepository.get(id, options), 'User'); } } diff --git a/server/src/services/user.service.ts b/server/src/services/user.service.ts index 0ec4ab4a7b..1630fd9dd9 100644 --- a/server/src/services/user.service.ts +++ b/server/src/services/user.service.ts @@ -20,6 +20,7 @@ import { getCalendarHeatmap } from 'src/services/shared/user-methods'; import { JobOf, UserMetadataItem } from 'src/types'; import { ImmichFileResponse } from 'src/utils/file'; import { mimeTypes } from 'src/utils/mime-types'; +import { findOrFail } from 'src/utils/misc'; import { getPreferences, getPreferencesPartial, mergePreferences } from 'src/utils/preferences'; import { generateProfileImage } from 'src/utils/profile-image'; @@ -178,19 +179,19 @@ export class UserService extends BaseService { const { licensePublicKey } = this.configRepository.getEnv(); - const clientLicenseValid = this.cryptoRepository.verifySha256( + const isClientLicenseValid = this.cryptoRepository.verifySha256( license.licenseKey, license.activationKey, licensePublicKey.client, ); - const serverLicenseValid = this.cryptoRepository.verifySha256( + const isServerLicenseValid = this.cryptoRepository.verifySha256( license.licenseKey, license.activationKey, licensePublicKey.server, ); - if (!clientLicenseValid && !serverLicenseValid) { + if (!isClientLicenseValid && !isServerLicenseValid) { throw new BadRequestException('Invalid license key'); } @@ -239,7 +240,9 @@ export class UserService extends BaseService { @OnEvent({ name: 'AssetCreate' }) async onAssetCreate({ asset, file }: ArgOf<'AssetCreate'>) { - await this.userRepository.updateUsage(asset.ownerId, file.size); + if (file) { + await this.userRepository.updateUsage(asset.ownerId, file.size); + } } @OnJob({ name: JobName.UserSyncUsage, queue: QueueName.BackgroundTask }) @@ -292,19 +295,15 @@ export class UserService extends BaseService { await this.eventRepository.emit('UserDelete', user); } - private isReadyForDeletion(user: { id: string; deletedAt?: Date | null }, deleteDelay: number): boolean { + private isReadyForDeletion(user: { id: string; deletedAt?: Date | null }, delayUntilDeletion: number): boolean { if (!user.deletedAt) { return false; } - return DateTime.now().minus({ days: deleteDelay }) > DateTime.fromJSDate(user.deletedAt); + return DateTime.now().minus({ days: delayUntilDeletion }) > DateTime.fromJSDate(user.deletedAt); } - private async findOrFail(id: string, options: UserFindOptions) { - const user = await this.userRepository.get(id, options); - if (!user) { - throw new BadRequestException('User not found'); - } - return user; + private findOrFail(id: string, options: UserFindOptions) { + return findOrFail(() => this.userRepository.get(id, options), 'User'); } } diff --git a/server/src/services/version.service.ts b/server/src/services/version.service.ts index 37010db5e7..f1abeedb30 100644 --- a/server/src/services/version.service.ts +++ b/server/src/services/version.service.ts @@ -17,7 +17,7 @@ const asNotification = ( ): ReleaseEventV1 => { return { // can't use gt because it's broken for release candidates F https://github.com/npm/node-semver/issues/483 - isAvailable: semver.intersects(`>${serverVersion}`, releaseVersion.toString(), { + isAvailable: semver.intersects(`>${serverVersion}`, releaseVersion, { includePrerelease: channel === ReleaseChannel.ReleaseCandidate, }), checkedAt, @@ -60,8 +60,8 @@ export class VersionService extends BaseService { this.logger.log(`Adding ${current} to upgrade history`); await this.versionRepository.create({ version: current }); - const needsNewMemories = semver.lt(previousVersion, '1.129.0'); - if (needsNewMemories) { + const isNeedsNewMemories = semver.lt(previousVersion, '1.129.0'); + if (isNeedsNewMemories) { await this.jobRepository.queue({ name: JobName.MemoryGenerate }); } } @@ -115,7 +115,7 @@ export class VersionService extends BaseService { // can't use gt because it's broken for release candidates F https://github.com/npm/node-semver/issues/483 if ( - semver.intersects(`>${serverVersion}`, releaseVersion.toString(), { + semver.intersects(`>${serverVersion}`, releaseVersion, { includePrerelease: newVersionCheck.channel === ReleaseChannel.ReleaseCandidate, }) ) { diff --git a/server/src/services/workflow-execution.service.ts b/server/src/services/workflow-execution.service.ts index 372bf04e71..193fab16de 100644 --- a/server/src/services/workflow-execution.service.ts +++ b/server/src/services/workflow-execution.service.ts @@ -13,6 +13,7 @@ import { AlbumsAddAssetsDto, CreateAlbumDto, GetAlbumsDto } from 'src/dtos/album import { BulkIdsDto } from 'src/dtos/asset-ids.response.dto'; import { AuthDto } from 'src/dtos/auth.dto'; import { PluginManifestDto } from 'src/dtos/plugin-manifest.dto'; +import { TagBulkAssetsDto } from 'src/dtos/tag.dto'; import { BootstrapEventPriority, DatabaseLock, @@ -21,12 +22,14 @@ import { JobName, JobStatus, QueueName, + WorkflowResult, WorkflowType, } from 'src/enum'; import { ArgOf } from 'src/repositories/event.repository'; import { AlbumService } from 'src/services/album.service'; import { AssetService } from 'src/services/asset.service'; import { BaseService } from 'src/services/base.service'; +import { TagService } from 'src/services/tag.service'; import { JobOf } from 'src/types'; const dummy = () => { @@ -36,7 +39,7 @@ const dummy = () => { }; type ExecuteOptions = { - read: (type: T) => Promise<{ authUserId: string; data: WorkflowEventData }>; + read: (type: T) => Promise<{ authUserId: string; data: WorkflowEventData; entityId?: string }>; write: (auth: AuthDto, changes: WorkflowChanges) => Promise; }; @@ -69,6 +72,7 @@ export class WorkflowExecutionService extends BaseService { this.jwtSecret = this.cryptoRepository.randomBytesAsText(32); const albumService = BaseService.create(AlbumService, this); + const tagService = BaseService.create(TagService, this); const searchAlbums = this.wrap<[dto: GetAlbumsDto]>((authDto, ctx, args) => albumService.getAll(authDto, ...args)); const createAlbum = this.wrap<[dto: CreateAlbumDto]>((authDto, ctx, args) => albumService.create(authDto, ...args)); @@ -93,6 +97,7 @@ export class WorkflowExecutionService extends BaseService { for (const pattern of context.allowedHosts) { const regex = new RegExp(pattern.replaceAll('.', String.raw`\.`).replaceAll('*', '.*')); if (regex.test(hostname)) { + // eslint-disable-next-line unicorn/no-invalid-argument-count const res = await fetch(...args); return { @@ -105,6 +110,9 @@ export class WorkflowExecutionService extends BaseService { throw new Error('Hostname did not match any listed in methods[].allowedHosts in the plugin manifest'); }); + const bulkTagAssets = this.wrap<[dto: TagBulkAssetsDto]>((authDto, ctx, args) => + tagService.bulkTagAssets(authDto, ...args), + ); const functions = { searchAlbums, @@ -112,6 +120,7 @@ export class WorkflowExecutionService extends BaseService { addAssetsToAlbum, addAssetsToAlbums, httpRequest, + bulkTagAssets, }; const stubs: typeof functions = { @@ -120,12 +129,13 @@ export class WorkflowExecutionService extends BaseService { addAssetsToAlbum: dummy, addAssetsToAlbums: dummy, httpRequest: dummy, + bulkTagAssets: dummy, }; const plugins = await this.pluginRepository.getForLoad(); for (const { id, name, version, wasmBytes, methods } of plugins) { - const method = methods.some(({ hostFunctions }) => !hostFunctions); - if (method) { + const isMethod = methods.some(({ hostFunctions }) => !hostFunctions); + if (isMethod) { const label = `${name}@${version}`; const key = this.getPluginKey({ id, hostFunctions: false }); try { @@ -136,8 +146,8 @@ export class WorkflowExecutionService extends BaseService { } } - const methodWithFunction = methods.some(({ hostFunctions }) => hostFunctions); - if (methodWithFunction) { + const isMethodWithFunction = methods.some(({ hostFunctions }) => hostFunctions); + if (isMethodWithFunction) { const label = `${name}@${version}/worker`; const key = this.getPluginKey({ id, hostFunctions: true }); try { @@ -308,6 +318,11 @@ export class WorkflowExecutionService extends BaseService { return this.onAssetTrigger({ userId, assetId, trigger: WorkflowTrigger.AssetMetadataExtraction }); } + @OnEvent({ name: 'AssetTag' }) + onAssetTagged({ assetId, userId }: ArgOf<'AssetTag'>) { + return this.onAssetTrigger({ userId, assetId, trigger: WorkflowTrigger.AssetTagged }); + } + private async onAssetTrigger({ userId, assetId, trigger }: AssetTrigger) { const items = await this.workflowRepository.search({ userId, trigger }); await this.jobRepository.queueAll( @@ -331,6 +346,7 @@ export class WorkflowExecutionService extends BaseService { return { data: { asset } as any, authUserId: asset.ownerId, + entityId: asset.id, }; }, write: async (auth, changes) => { @@ -381,8 +397,8 @@ export class WorkflowExecutionService extends BaseService { // TODO infer from steps let type: T | undefined; for (const targetType of Object.values(WorkflowType)) { - const missing = workflow.steps.some((step) => !step.types.includes(targetType)); - if (!missing) { + const isMissing = workflow.steps.some((step) => !step.types.includes(targetType)); + if (!isMissing) { type = targetType as unknown as T; break; } @@ -398,11 +414,13 @@ export class WorkflowExecutionService extends BaseService { return; } - try { - const { read, write } = handler; - const readResult = await read(type); - let data = readResult.data; - for (const step of workflow.steps) { + const { read, write } = handler; + const readResult = await read(type); + let data = readResult.data; + const runId = crypto.randomUUID(); + + for (const step of workflow.steps) { + try { const payload: WorkflowEventPayload = { trigger: workflow.trigger, type, @@ -453,14 +471,45 @@ export class WorkflowExecutionService extends BaseService { const shouldContinue = result?.workflow?.continue ?? true; if (!shouldContinue) { - break; - } - } + if (workflow.logging) { + await this.workflowRepository.log({ + workflowId, + result: WorkflowResult.Halted, + workflowStepId: step.id, + triggerDataId: readResult.entityId, + runId, + }); + } - this.logger.debug(`Workflow ${workflowId} executed successfully`); - } catch (error) { - this.logger.error(`Error executing workflow ${workflowId}:`, error); - return JobStatus.Failed; + this.logger.debug(`Workflow ${workflowId} run ${runId} stopped on step ${step.id}`); + return; + } + } catch (error) { + this.logger.error(`Error executing workflow ${workflowId} run ${runId}:`, error); + + if (workflow.logging) { + await this.workflowRepository.log({ + workflowId, + result: WorkflowResult.Error, + workflowStepId: step.id, + triggerDataId: readResult.entityId, + runId, + }); + } + + return JobStatus.Failed; + } } + + if (workflow.logging) { + await this.workflowRepository.log({ + workflowId, + result: WorkflowResult.Completed, + triggerDataId: readResult.entityId, + runId, + }); + } + + this.logger.debug(`Workflow ${workflowId} run ${runId} executed successfully`); } } diff --git a/server/src/services/workflow.service.ts b/server/src/services/workflow.service.ts index 850b4ac086..e68e6aa94e 100644 --- a/server/src/services/workflow.service.ts +++ b/server/src/services/workflow.service.ts @@ -5,6 +5,8 @@ import { mapWorkflow, mapWorkflowShare, WorkflowCreateDto, + WorkflowGetLogsDto, + WorkflowLogEntryDto, WorkflowResponseDto, WorkflowSearchDto, WorkflowShareResponseDto, @@ -14,6 +16,7 @@ import { import { Permission } from 'src/enum'; import { PluginMethodSearchResponse } from 'src/repositories/plugin.repository'; import { BaseService } from 'src/services/base.service'; +import { findOrFail } from 'src/utils/misc'; import { getWorkflowTriggers, isMethodCompatible, resolveMethod } from 'src/utils/workflow'; @Injectable() @@ -82,6 +85,23 @@ export class WorkflowService extends BaseService { await this.workflowRepository.delete(id); } + async getLogs(auth: AuthDto, id: string, dto: WorkflowGetLogsDto): Promise { + await this.requireAccess({ auth, permission: Permission.WorkflowLogs, ids: [id] }); + const logs = await this.workflowRepository.getLogs(id, dto); + return logs.map((entry) => ({ + id: entry.id, + at: entry.createdAt, + result: entry.result, + triggerDataId: entry.triggerDataId ?? undefined, + lastStep: entry.step + ? { + index: entry.step.order, + method: `${entry.step.pluginId}#${entry.step.methodName}`, + } + : undefined, + })); + } + private async resolveAndValidateSteps(steps: T[], trigger: WorkflowTrigger) { const methods = await this.pluginRepository.getForValidation(); const results: Array = []; @@ -104,11 +124,7 @@ export class WorkflowService extends BaseService { return results; } - private async findOrFail(id: string) { - const workflow = await this.workflowRepository.get(id); - if (!workflow) { - throw new BadRequestException('Workflow not found'); - } - return workflow; + private findOrFail(id: string) { + return findOrFail(() => this.workflowRepository.get(id), 'Workflow'); } } diff --git a/server/src/types.ts b/server/src/types.ts index 598d900e70..d31841ffd3 100644 --- a/server/src/types.ts +++ b/server/src/types.ts @@ -1,4 +1,3 @@ -import { WorkflowTrigger } from '@immich/plugin-sdk'; import { ShallowDehydrateObject } from 'kysely'; import { SystemConfig } from 'src/config'; import { VECTOR_EXTENSIONS } from 'src/constants'; @@ -30,8 +29,8 @@ import { SystemMetadataKey, TranscodeTarget, UserMetadataKey, - WorkflowType, } from 'src/enum'; +import { Mocked } from 'vitest'; export type DeepPartial = T extends Date ? T @@ -78,14 +77,6 @@ export interface DecodeToBufferOptions extends DecodeImageOptions { export type GenerateThumbnailOptions = Pick & DecodeToBufferOptions; export type GenerateThumbhashOptions = DecodeImageOptions; -export interface GenerateThumbnailsOptions { - colorspace: string; - preview?: ImageOptions; - processInvalidImages: boolean; - thumbhash?: boolean; - thumbnail?: ImageOptions; -} - export interface VideoStreamInfo { index: number; height: number; @@ -142,10 +133,6 @@ export interface ImageDimensions { height: number; } -export interface InputDimensions extends ImageDimensions { - inputPath: string; -} - export interface VideoInfo { format: VideoFormat; videoStreams: VideoStreamInfo[]; @@ -188,11 +175,6 @@ export interface BitrateDistribution { unit: string; } -export interface ImageBuffer { - data: Buffer; - info: RawImageInfo; -} - export interface VideoCodecSWConfig { getCommand( target: TranscodeTarget, @@ -259,18 +241,10 @@ export interface ILibraryBulkIdsJob { totalAssets: number; } -export interface IBulkEntityJob { - ids: string[]; -} - export interface IDeleteFilesJob extends IBaseJob { files: Array; } -export interface ISidecarWriteJob extends IEntityJob { - tags?: true; -} - export interface IDeferrableJob extends IEntityJob { deferred?: boolean; } @@ -306,12 +280,6 @@ export interface INotifyAlbumUpdateJob extends IEntityJob, IDelayedJob { recipientId: string; } -export type IWorkflowJob = { - id: string; - trigger: WorkflowTrigger; - type: T; -}; - export interface IIntegrityJob { refreshOnly?: boolean; } @@ -336,8 +304,7 @@ export interface IIntegrityUntrackedFilesJob { export interface IIntegrityMissingFilesJob { items: ({ path: string; reportId: string | null } & ( - | { assetId: string; fileAssetId: null } - | { assetId: null; fileAssetId: string } + { assetId: string; fileAssetId: null } | { assetId: null; fileAssetId: string } ))[]; } @@ -553,8 +520,7 @@ export interface MemoryData { export type VersionCheckMetadata = { checkedAt: string; releaseVersion: string }; export type SystemFlags = { mountChecks: Record }; export type MaintenanceModeState = - | { isMaintenanceMode: true; secret: string; action?: SetMaintenanceModeDto } - | { isMaintenanceMode: false }; + { isMaintenanceMode: true; secret: string; action?: SetMaintenanceModeDto } | { isMaintenanceMode: false }; export type MemoriesState = { /** memories have already been created through this date */ lastOnThisDayDate: string; @@ -619,6 +585,9 @@ export type UserPreferences = { cast: { gCastEnabled: boolean; }; + recentlyAdded: { + sidebarWeb: boolean; + }; }; export type UserMetadataItem = { @@ -646,7 +615,10 @@ export type JSONSchemaProperty = { required?: string[]; }; -// eslint-disable-next-line @typescript-eslint/no-unsafe-function-type -export interface ClassConstructor extends Function { - new (...args: any[]): T; -} +export type ClassConstructor = T extends new (...args: infer R) => infer L + ? new (...args: R) => L + : new (...args: any[]) => unknown; + +export type ClassConstructorsToInstances[]> = { + [K in keyof T]: InstanceType | Mocked>; +}; diff --git a/server/src/utils/access.ts b/server/src/utils/access.ts index b8e7733772..0d6f4b4eeb 100644 --- a/server/src/utils/access.ts +++ b/server/src/utils/access.ts @@ -3,7 +3,7 @@ import { AuthSharedLink } from 'src/database'; import { AuthDto } from 'src/dtos/auth.dto'; import { AlbumUserRole, Permission } from 'src/enum'; import { AccessRepository } from 'src/repositories/access.repository'; -import { setDifference, setIsEqual, setIsSuperset, setUnion } from 'src/utils/set'; +import { areSetsEqual, isSetSuperset, setDifference, setUnion } from 'src/utils/set'; export type GrantedRequest = { requested: Permission[]; @@ -15,7 +15,7 @@ export const isGranted = ({ requested, current }: GrantedRequest) => { return true; } - return setIsSuperset(new Set(current), new Set(requested)); + return isSetSuperset(new Set(current), new Set(requested)); }; export type AccessRequest = { @@ -36,7 +36,7 @@ export const requireUploadAccess = (auth: AuthDto | null): AuthDto => { export const requireAccess = async (access: AccessRepository, request: AccessRequest) => { const allowedIds = await checkAccess(access, request); - if (!setIsEqual(new Set(request.ids), allowedIds)) { + if (!areSetsEqual(new Set(request.ids), allowedIds)) { throw new BadRequestException(`Not found or no ${request.permission} access`); } }; @@ -324,7 +324,8 @@ const checkOtherAccess = async (access: AccessRepository, request: OtherAccessRe case Permission.WorkflowRead: case Permission.WorkflowUpdate: - case Permission.WorkflowDelete: { + case Permission.WorkflowDelete: + case Permission.WorkflowLogs: { return access.workflow.checkOwnerAccess(auth.user.id, ids); } diff --git a/server/src/utils/bytes.ts b/server/src/utils/bytes.ts index 5e476f4dea..67e94c7aca 100644 --- a/server/src/utils/bytes.ts +++ b/server/src/utils/bytes.ts @@ -20,7 +20,7 @@ export function asHumanReadable(bytes: number, precision = 1): string { } } - return `${remainder.toFixed(magnitude == 0 ? 0 : precision)} ${units[magnitude]}`; + return `${remainder.toFixed(magnitude === 0 ? 0 : precision)} ${units[magnitude]}`; } // if an asset is jsonified in the DB before being returned, its buffer fields will be hex-encoded strings diff --git a/server/src/utils/config.ts b/server/src/utils/config.ts index 62f37128d8..a6073471d1 100644 --- a/server/src/utils/config.ts +++ b/server/src/utils/config.ts @@ -29,10 +29,12 @@ export const getConfig = async (repos: RepoDeps, { withCache }: { withCache: boo if (!withCache || !config) { const timestamp = lastUpdated; await asyncLock.acquire(DatabaseLock[DatabaseLock.GetSystemConfig], async () => { - if (timestamp === lastUpdated) { - config = await buildConfig(repos); - lastUpdated = Date.now(); + if (timestamp !== lastUpdated) { + return; } + + config = await buildConfig(repos); + lastUpdated = Date.now(); }); } @@ -45,7 +47,7 @@ export const updateConfig = async (repos: RepoDeps, newConfig: SystemConfig): Pr const partialConfig: DeepPartial = {}; for (const property of getKeysDeep(defaults)) { const newValue = _.get(newConfig, property); - const isEmpty = newValue === undefined || newValue === null || newValue === ''; + const isEmpty = [undefined, null, ''].includes(newValue); const defaultValue = _.get(defaults, property); const isEqual = newValue === defaultValue || _.isEqual(newValue, defaultValue); @@ -64,7 +66,7 @@ export const updateConfig = async (repos: RepoDeps, newConfig: SystemConfig): Pr const loadFromFile = async ({ metadataRepo, logger }: RepoDeps, filepath: string) => { try { const file = await metadataRepo.readFile(filepath); - return loadYaml(file.toString()) as unknown; + return loadYaml(file) as unknown; } catch (error: Error | any) { logger.error(`Unable to load configuration file: ${filepath}`); logger.error(error); @@ -107,9 +109,8 @@ const buildConfig = async (repos: RepoDeps) => { } if (configFile) { throw new Error(messages.join('\n')); - } else { - logger.error('Validation error', messages); } + logger.error('Validation error', messages); } const config = (result.success ? result.data : rawConfig) as SystemConfig; @@ -117,10 +118,10 @@ const buildConfig = async (repos: RepoDeps) => { if (config.server.externalDomain.length > 0) { const domain = new URL(config.server.externalDomain); - let externalDomain = domain.origin; - if (domain.password && domain.username) { - externalDomain = `${domain.protocol}//${domain.username}:${domain.password}@${domain.host}`; - } + const externalDomain = + domain.password && domain.username + ? `${domain.protocol}//${domain.username}:${domain.password}@${domain.host}` + : domain.origin; config.server.externalDomain = externalDomain; } diff --git a/server/src/utils/database.ts b/server/src/utils/database.ts index a187c25913..5122b0a9d4 100644 --- a/server/src/utils/database.ts +++ b/server/src/utils/database.ts @@ -7,21 +7,42 @@ import { Kysely, KyselyConfig, NotNull, + OperandValueExpression, + ReferenceExpression, Selectable, SelectQueryBuilder, ShallowDehydrateObject, sql, + SqlBool, } from 'kysely'; import { PostgresJSDialect } from 'kysely-postgres-js'; import { jsonArrayFrom, jsonObjectFrom } from 'kysely/helpers/postgres'; import { Notice, PostgresError } from 'postgres'; import { columns, lockableProperties, LockableProperty, Person } from 'src/database'; +import { DummyValue, GenerateSqlQueries } from 'src/decorators'; import { AssetEditActionItem } from 'src/dtos/editing.dto'; -import { AssetFileType, AssetOrderBy, AssetVisibility, DatabaseExtension, ExifOrientation } from 'src/enum'; -import { AssetSearchBuilderOptions } from 'src/repositories/search.repository'; +import { + DEFAULT_SEARCH_ORDER, + IdsFilter, + SearchFilterBranch, + SearchOrder, + StringFilter, + StringPatternFilter, +} from 'src/dtos/search.dto'; +import { + AssetFileType, + AssetOrder, + AssetOrderBy, + AssetVisibility, + DatabaseExtension, + ExifOrientation, + SearchOrderField, +} from 'src/enum'; +import { AssetSearchBuilderOptions, AssetSearchBuilderV3Options } from 'src/repositories/search.repository'; import { DB } from 'src/schema'; import { AssetExifTable } from 'src/schema/tables/asset-exif.table'; import { AudioStreamInfo, VectorExtension, VideoFormat, VideoPacketInfo, VideoStreamInfo } from 'src/types'; +import { fromChecksum } from 'src/utils/request'; export const getKyselyConfig = (connection: DatabaseConnectionParams): KyselyConfig => { return { @@ -36,28 +57,30 @@ export const getKyselyConfig = (connection: DatabaseConnectionParams): KyselyCon }), }), log(event) { - if (event.level === 'error') { - if (isAssetChecksumConstraint(event.error)) { - return; - } - - console.error('Query failed :', { - durationMs: event.queryDurationMillis, - error: event.error, - sql: event.query.sql, - params: event.query.parameters, - }); + if (event.level !== 'error') { + return; } + + if (isAssetChecksumConstraint(event.error)) { + return; + } + + console.error('Query failed :', { + durationMs: event.queryDurationMillis, + error: event.error, + sql: event.query.sql, + params: event.query.parameters, + }); }, }; }; +const uniqueIds = (ids: string[]) => [...new Set(ids)]; + export const asUuid = (id: string | Expression) => sql`${id}::uuid`; export const anyUuid = (ids: string[]) => sql`any(${`{${ids}}`}::uuid[])`; -export const asVector = (embedding: number[]) => sql`${`[${embedding}]`}::vector`; - export const unnest = (array: string[]) => sql>`unnest(array[${sql.join(array)}]::text[])`; export const removeUndefinedKeys = (update: T, template: unknown) => { @@ -83,16 +106,15 @@ export function withDefaultVisibility(qb: SelectQueryBuilder) return qb.where('asset.visibility', 'in', [sql.lit(AssetVisibility.Archive), sql.lit(AssetVisibility.Timeline)]); } +const selectExifInfo = (eb: AssetExpressionBuilder) => + eb.fn + .toJson(eb.table('asset_exif')) + .$castTo> | null>() + .as('exifInfo'); + // TODO come up with a better query that only selects the fields we need export function withExif(qb: SelectQueryBuilder) { - return qb - .leftJoin('asset_exif', 'asset.id', 'asset_exif.assetId') - .select((eb) => - eb.fn - .toJson(eb.table('asset_exif')) - .$castTo> | null>() - .as('exifInfo'), - ); + return qb.leftJoin('asset_exif', 'asset.id', 'asset_exif.assetId').select(selectExifInfo); } export function withExifInner(qb: SelectQueryBuilder) { @@ -371,14 +393,17 @@ export function withEdits(eb: ExpressionBuilder): AliasedEditAction const joinDeduplicationPlugin = new DeduplicateJoinsPlugin(); /** TODO: This should only be used for search-related queries, not as a general purpose query builder */ -export function searchAssetBuilder(kysely: Kysely, options: AssetSearchBuilderOptions) { +export function searchAssetBuilderLegacy(kysely: Kysely, options: AssetSearchBuilderOptions) { options.withDeleted ||= !!(options.trashedAfter || options.trashedBefore || options.isOffline); - const visibility = options.visibility == null ? AssetVisibility.Timeline : options.visibility; return kysely .withPlugin(joinDeduplicationPlugin) .selectFrom('asset') - .where('asset.visibility', '=', visibility) + .$if(!!options.visibility, (qb) => + options.visibility === 'not-locked' + ? qb.where('asset.visibility', '!=', AssetVisibility.Locked) + : qb.where('asset.visibility', '=', options.visibility!), + ) .$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) => @@ -488,6 +513,458 @@ export function searchAssetBuilder(kysely: Kysely, options: AssetSearchBuild .$if(!options.withDeleted, (qb) => qb.where('asset.deletedAt', 'is', null)); } +type AssetExpressionBuilder = ExpressionBuilder; + +const albumAssets = (eb: AssetExpressionBuilder) => + eb.selectFrom('album_asset').whereRef('album_asset.assetId', '=', 'asset.id'); + +const visibleFaces = (eb: AssetExpressionBuilder) => + eb + .selectFrom('asset_face') + .whereRef('asset_face.assetId', '=', 'asset.id') + .where('asset_face.deletedAt', 'is', null) + .where('asset_face.isVisible', '=', true); + +const tagAssets = (eb: AssetExpressionBuilder) => + eb.selectFrom('tag_asset').whereRef('tag_asset.assetId', '=', 'asset.id'); + +// shared any/all/none mechanics; `matchesAll` only receives deduplicated multi-id lists, +// so its `count(distinct id) = ids.length` check stays satisfiable +function idsPredicates( + eb: AssetExpressionBuilder, + { any, all, none }: IdsFilter = {}, + ops: { + matchesAny: (ids: string[]) => Expression; + matchesAll: (ids: string[]) => Expression; + }, +) { + const predicates: Expression[] = []; + if (any) { + predicates.push(ops.matchesAny(any)); + } + if (all) { + const ids = uniqueIds(all); + predicates.push(ids.length === 1 ? ops.matchesAny(ids) : ops.matchesAll(ids)); + } + if (none) { + predicates.push(eb.not(ops.matchesAny(none))); + } + return predicates; +} + +function albumIdsPredicates(eb: AssetExpressionBuilder, filter?: IdsFilter) { + const matching = (ids: string[]) => albumAssets(eb).where('album_asset.albumId', '=', anyUuid(ids)); + return idsPredicates(eb, filter, { + matchesAny: (ids) => eb.exists(matching(ids)), + matchesAll: (ids) => + eb.exists( + matching(ids) + .select('album_asset.assetId') + .groupBy('album_asset.assetId') + .having((eb) => eb.fn.count('album_asset.albumId').distinct(), '=', ids.length), + ), + }); +} + +function personIdsPredicates(eb: AssetExpressionBuilder, filter?: IdsFilter) { + const matching = (ids: string[]) => visibleFaces(eb).where('asset_face.personId', '=', anyUuid(ids)); + return idsPredicates(eb, filter, { + matchesAny: (ids) => eb.exists(matching(ids)), + matchesAll: (ids) => + eb.exists( + matching(ids) + .select('asset_face.assetId') + .groupBy('asset_face.assetId') + .having((eb) => eb.fn.count('asset_face.personId').distinct(), '=', ids.length), + ), + }); +} + +function tagIdsPredicates(eb: AssetExpressionBuilder, filter?: IdsFilter) { + const matching = (ids: string[]) => + tagAssets(eb) + .innerJoin('tag_closure', 'tag_asset.tagId', 'tag_closure.id_descendant') + .where('tag_closure.id_ancestor', '=', anyUuid(ids)); + return idsPredicates(eb, filter, { + matchesAny: (ids) => eb.exists(matching(ids)), + matchesAll: (ids) => + eb.exists( + matching(ids) + .select('tag_asset.assetId') + .groupBy('tag_asset.assetId') + .having((eb) => eb.fn.count('tag_closure.id_ancestor').distinct(), '=', ids.length), + ), + }); +} + +type ComparisonFilter = { + eq?: T | null; + ne?: T | null; + lt?: T; + lte?: T; + gt?: T; + gte?: T; + in?: T[]; + notIn?: T[]; +}; + +// one operator dispatch for every filter shape; the DTO schemas constrain which +// operators (and null literals) each filter can actually carry +function comparisonPredicates>( + eb: ExpressionBuilder, + column: RE, + filter: ComparisonFilter> = {}, +) { + const predicates: Expression[] = []; + if (filter.eq !== undefined) { + predicates.push(filter.eq === null ? eb(column, 'is', null) : eb(column, '=', filter.eq)); + } + if (filter.ne !== undefined) { + predicates.push(filter.ne === null ? eb(column, 'is not', null) : eb(column, '!=', filter.ne)); + } + if (filter.lt !== undefined) { + predicates.push(eb(column, '<', filter.lt)); + } + if (filter.lte !== undefined) { + predicates.push(eb(column, '<=', filter.lte)); + } + if (filter.gt !== undefined) { + predicates.push(eb(column, '>', filter.gt)); + } + if (filter.gte !== undefined) { + predicates.push(eb(column, '>=', filter.gte)); + } + if (filter.in !== undefined) { + predicates.push(eb(column, 'in', filter.in)); + } + if (filter.notIn !== undefined) { + predicates.push(eb(column, 'not in', filter.notIn)); + } + return predicates; +} + +type StringColumn = + | 'asset_exif.city' + | 'asset_exif.state' + | 'asset_exif.country' + | 'asset_exif.make' + | 'asset_exif.model' + | 'asset_exif.lensModel' + | 'asset_exif.description' + | 'asset.originalFileName' + | 'asset.originalPath'; + +function stringPatternPredicates(eb: AssetExpressionBuilder, column: StringColumn, filter: StringPatternFilter = {}) { + const ref = sql.ref(column); + const predicates = comparisonPredicates(eb, column, filter); + if (filter.like !== undefined) { + predicates.push(sql`f_unaccent(${ref}) ilike ('%' || f_unaccent(${filter.like}) || '%')`); + } + if (filter.notLike !== undefined) { + predicates.push(sql`f_unaccent(${ref}) not ilike ('%' || f_unaccent(${filter.notLike}) || '%')`); + } + if (filter.startsWith !== undefined) { + predicates.push(sql`f_unaccent(${ref}) ilike (f_unaccent(${filter.startsWith}) || '%')`); + } + if (filter.endsWith !== undefined) { + predicates.push(sql`f_unaccent(${ref}) ilike ('%' || f_unaccent(${filter.endsWith}))`); + } + return predicates; +} + +function checksumPredicates(eb: AssetExpressionBuilder, filter: StringFilter = {}) { + return comparisonPredicates(eb, 'asset.checksum', { + eq: filter.eq === undefined ? undefined : fromChecksum(filter.eq), + ne: filter.ne === undefined ? undefined : fromChecksum(filter.ne), + in: filter.in?.map((checksum) => fromChecksum(checksum)), + notIn: filter.notIn?.map((checksum) => fromChecksum(checksum)), + }); +} + +const encodedVideoFiles = (eb: AssetExpressionBuilder) => + eb + .selectFrom('asset_file') + .whereRef('asset_file.assetId', '=', 'asset.id') + .where('asset_file.type', '=', AssetFileType.EncodedVideo); + +function existsPredicates( + eb: AssetExpressionBuilder, + filter: { eq: boolean } | undefined, + subquery: () => Expression, +): Expression[] { + if (!filter) { + return []; + } + const exists = eb.exists(subquery()); + return [filter.eq ? exists : eb.not(exists)]; +} + +// predicates are collected as expressions rather than chained `where` calls so the same +// helpers can build each `or` branch, which must compose into eb.and/eb.or +function branchPredicates(eb: AssetExpressionBuilder, branch: SearchFilterBranch) { + const { encodedVideoPath } = branch; + return [ + ...comparisonPredicates(eb, 'asset.id', branch.id), + ...comparisonPredicates(eb, 'asset.libraryId', branch.libraryId), + ...comparisonPredicates(eb, 'asset.type', branch.type), + ...comparisonPredicates(eb, 'asset.visibility', branch.visibility), + ...(branch.isFavorite ? [eb('asset.isFavorite', '=', branch.isFavorite.eq)] : []), + ...(branch.isOffline ? [eb('asset.isOffline', '=', branch.isOffline.eq)] : []), + ...(branch.isMotion ? [eb('asset.livePhotoVideoId', branch.isMotion.eq ? 'is not' : 'is', null)] : []), + ...existsPredicates(eb, branch.isEncoded, () => encodedVideoFiles(eb)), + ...existsPredicates(eb, branch.hasAlbums, () => albumAssets(eb)), + ...existsPredicates(eb, branch.hasPeople, () => visibleFaces(eb)), + ...existsPredicates(eb, branch.hasTags, () => tagAssets(eb)), + ...comparisonPredicates(eb, 'asset_exif.city', branch.city), + ...comparisonPredicates(eb, 'asset_exif.state', branch.state), + ...comparisonPredicates(eb, 'asset_exif.country', branch.country), + ...comparisonPredicates(eb, 'asset_exif.make', branch.make), + ...comparisonPredicates(eb, 'asset_exif.model', branch.model), + ...comparisonPredicates(eb, 'asset_exif.lensModel', branch.lensModel), + ...stringPatternPredicates(eb, 'asset_exif.description', branch.description), + ...stringPatternPredicates(eb, 'asset.originalFileName', branch.originalFileName), + ...stringPatternPredicates(eb, 'asset.originalPath', branch.originalPath), + ...(branch.ocr + ? [ + eb.exists( + eb + .selectFrom('ocr_search') + .whereRef('ocr_search.assetId', '=', 'asset.id') + .where( + sql`f_unaccent(ocr_search.text) %>> f_unaccent(${tokenizeForSearch(branch.ocr.matches).join(' ')})`, + ), + ), + ] + : []), + ...comparisonPredicates(eb, 'asset_exif.rating', branch.rating), + ...comparisonPredicates(eb, 'asset_exif.fileSizeInByte', branch.fileSizeInBytes), + ...comparisonPredicates(eb, 'asset.fileCreatedAt', branch.takenAt), + ...comparisonPredicates(eb, 'asset.createdAt', branch.createdAt), + ...comparisonPredicates(eb, 'asset.updatedAt', branch.updatedAt), + ...comparisonPredicates(eb, 'asset.deletedAt', branch.trashedAt), + ...albumIdsPredicates(eb, branch.albumIds), + ...personIdsPredicates(eb, branch.personIds), + ...tagIdsPredicates(eb, branch.tagIds), + ...checksumPredicates(eb, branch.checksum), + ...(encodedVideoPath + ? [ + eb.exists( + encodedVideoFiles(eb) + .where('asset_file.isEdited', '=', false) + .where((eb) => eb.and(comparisonPredicates(eb, 'asset_file.path', encodedVideoPath))), + ), + ] + : []), + ]; +} + +// ordering is deliberately left to the caller so aggregate-only consumers (counts, stats) +// can compose the same filters without stripping an order by +export function searchAssetBuilder(kysely: Kysely, options: AssetSearchBuilderV3Options) { + const filter = options.filter ?? {}; + + return ( + kysely + .withPlugin(joinDeduplicationPlugin) + .selectFrom('asset') + // postgres eliminates the left join when no exif column is referenced, so unused joins are free + .leftJoin('asset_exif', 'asset.id', 'asset_exif.assetId') + .$if(!!options.withExif, (qb) => qb.select(selectExifInfo)) + .$if(!!options.userIds && options.userIds.length > 0, (qb) => + qb.where('asset.ownerId', '=', anyUuid(options.userIds!)), + ) + .$if(!!(options.withFaces || options.withPeople), (qb) => qb.select(withFacesAndPeople)) + .$if(options.withStacked === false, (qb) => qb.where('asset.stackId', 'is', null)) + .where((eb) => { + const predicates = branchPredicates(eb, filter); + if (filter.or && filter.or.length > 0) { + predicates.push(eb.or(filter.or.map((branch) => eb.and(branchPredicates(eb, branch))))); + } + return predicates.length > 0 ? eb.and(predicates) : eb.lit(true); + }) + ); +} + +const searchOrderColumns = { + [SearchOrderField.FileCreatedAt]: { column: 'asset.fileCreatedAt', nullable: false }, + [SearchOrderField.LocalDateTime]: { column: 'asset.localDateTime', nullable: false }, + [SearchOrderField.FileSizeInBytes]: { column: 'asset_exif.fileSizeInByte', nullable: true }, + [SearchOrderField.Rating]: { column: 'asset_exif.rating', nullable: true }, +} as const; + +export function withSearchOrder(qb: ReturnType, order?: SearchOrder) { + const { field, direction } = order ?? DEFAULT_SEARCH_ORDER; + const { column, nullable } = searchOrderColumns[field]; + return ( + qb + .orderBy(column, (ob) => { + const ordered = direction === AssetOrder.Asc ? ob.asc() : ob.desc(); + // nulls last: assets without an asset_exif row would otherwise lead descending results + return nullable ? ordered.nullsLast() : ordered; + }) + // id tie-break for deterministic pagination + .orderBy('asset.id', direction) + ); +} + +export const searchMetadataV3Examples: GenerateSqlQueries[] = [ + { name: 'baseline', params: [{ size: 100 }, { userIds: [DummyValue.UUID] }] }, + { name: 'empty', params: [{ size: 100 }, {}] }, + { + name: 'or-exif-only', + params: [{ size: 100 }, { userIds: [DummyValue.UUID], filter: { or: [{ city: { eq: DummyValue.STRING } }] } }], + }, + { + name: 'string-eq-null', + params: [{ size: 100 }, { userIds: [DummyValue.UUID], filter: { city: { eq: null } } }], + }, + { + name: 'string-pattern-like', + params: [{ size: 100 }, { userIds: [DummyValue.UUID], filter: { description: { like: DummyValue.STRING } } }], + }, + { + name: 'string-pattern-notLike', + params: [{ size: 100 }, { userIds: [DummyValue.UUID], filter: { description: { notLike: DummyValue.STRING } } }], + }, + { + name: 'string-pattern-startsWith', + params: [ + { size: 100 }, + { userIds: [DummyValue.UUID], filter: { originalFileName: { startsWith: DummyValue.STRING } } }, + ], + }, + { + name: 'string-similarity-ocr', + params: [{ size: 100 }, { userIds: [DummyValue.UUID], filter: { ocr: { matches: DummyValue.STRING } } }], + }, + { + name: 'ids-any', + params: [{ size: 100 }, { userIds: [DummyValue.UUID], filter: { albumIds: { any: [DummyValue.UUID] } } }], + }, + { + name: 'ids-all', + params: [ + { size: 100 }, + { userIds: [DummyValue.UUID], filter: { personIds: { all: [DummyValue.UUID, DummyValue.UUID_1] } } }, + ], + }, + { + name: 'ids-all-single', + params: [{ size: 100 }, { userIds: [DummyValue.UUID], filter: { albumIds: { all: [DummyValue.UUID] } } }], + }, + { + name: 'ids-none', + params: [{ size: 100 }, { userIds: [DummyValue.UUID], filter: { tagIds: { none: [DummyValue.UUID] } } }], + }, + { + name: 'ids-tags-all', + params: [ + { size: 100 }, + { userIds: [DummyValue.UUID], filter: { tagIds: { all: [DummyValue.UUID, DummyValue.UUID_1] } } }, + ], + }, + { + name: 'has-albums-false', + params: [{ size: 100 }, { userIds: [DummyValue.UUID], filter: { hasAlbums: { eq: false } } }], + }, + { + name: 'is-encoded', + params: [{ size: 100 }, { userIds: [DummyValue.UUID], filter: { isEncoded: { eq: true } } }], + }, + { + name: 'number-range', + params: [{ size: 100 }, { userIds: [DummyValue.UUID], filter: { fileSizeInBytes: { gte: 100, lte: 1000 } } }], + }, + { + name: 'date-eq', + params: [{ size: 100 }, { userIds: [DummyValue.UUID], filter: { takenAt: { eq: DummyValue.DATE } } }], + }, + { + name: 'date-range', + params: [ + { size: 100 }, + { + userIds: [DummyValue.UUID], + filter: { takenAt: { gte: DummyValue.DATE, lt: DummyValue.DATE } }, + }, + ], + }, + { + name: 'order-fileSize-noExif', + params: [ + { size: 100 }, + { + userIds: [DummyValue.UUID], + order: { field: SearchOrderField.FileSizeInBytes, direction: AssetOrder.Desc }, + withExif: false, + }, + ], + }, + { + name: 'order-rating-withExif', + params: [ + { size: 100 }, + { + userIds: [DummyValue.UUID], + order: { field: SearchOrderField.Rating, direction: AssetOrder.Asc }, + withExif: true, + }, + ], + }, + { + name: 'or-branches', + params: [ + { size: 100 }, + { + userIds: [DummyValue.UUID], + filter: { + or: [{ isFavorite: { eq: true } }, { personIds: { any: [DummyValue.UUID] } }], + }, + }, + ], + }, + { + name: 'or-with-top-level', + params: [ + { size: 100 }, + { + userIds: [DummyValue.UUID], + filter: { + takenAt: { gte: DummyValue.DATE, lt: DummyValue.DATE }, + or: [{ isFavorite: { eq: true } }, { albumIds: { any: [DummyValue.UUID] } }], + }, + }, + ], + }, +]; + +export const searchStatisticsV3Examples: GenerateSqlQueries[] = [ + { name: 'baseline', params: [{ userIds: [DummyValue.UUID] }] }, + { + name: 'with-filter', + params: [ + { + userIds: [DummyValue.UUID], + filter: { + takenAt: { gte: DummyValue.DATE, lt: DummyValue.DATE }, + fileSizeInBytes: { gte: 100 }, + }, + }, + ], + }, + { + name: 'with-or', + params: [ + { + userIds: [DummyValue.UUID], + filter: { + or: [{ isFavorite: { eq: true } }, { hasAlbums: { eq: false } }], + }, + }, + ], + }, +]; + export type ReindexVectorIndexOptions = { indexName: string; lists?: number }; type VectorIndexQueryOptions = { table: string; vectorExtension: VectorExtension } & ReindexVectorIndexOptions; @@ -520,6 +997,6 @@ export function vectorIndexQuery({ vectorExtension, table, indexName, lists }: V export const updateLockedColumns = & { lockedProperties?: LockableProperty[] }>( exif: T, ) => { - exif.lockedProperties = lockableProperties.filter((property) => property in exif); + exif.lockedProperties = lockableProperties.filter((property) => Object.hasOwn(exif, property)); return exif; }; diff --git a/server/src/utils/date.spec.ts b/server/src/utils/date.spec.ts index 729b515467..476b5cb526 100644 --- a/server/src/utils/date.spec.ts +++ b/server/src/utils/date.spec.ts @@ -14,6 +14,10 @@ describe('asDateString', () => { const date = new Date(2000, 0, 15); // 15 Jan 2000, local midnight expect(asDateString(date)).toBe('2000-01-15'); }); + + it('should correctly pad years with a leading 0', () => { + expect(asDateString(new Date('280-12-12'))).toBe('0280-12-12'); + }); }); describe('asDateTimeString', () => { diff --git a/server/src/utils/fetch.spec.ts b/server/src/utils/fetch.spec.ts index 2189e6f626..4cd532e889 100644 --- a/server/src/utils/fetch.spec.ts +++ b/server/src/utils/fetch.spec.ts @@ -4,15 +4,14 @@ import { configureUserAgent } from 'src/utils/fetch'; describe('fetch', () => { it('should set the default user-agent header', async () => { const spy = vi.fn().mockResolvedValue(new Response()); - const original = globalThis.fetch; - globalThis.fetch = spy; + vi.stubGlobal('fetch', spy); configureUserAgent(); - await globalThis.fetch('http://test.local'); + await fetch('https://test.local'); const headers: Headers = spy.mock.calls[0][1].headers; expect(headers.get('User-Agent')).toBe(`immich-server/${serverVersion}`); - globalThis.fetch = original; + vi.unstubAllGlobals(); }); }); diff --git a/server/src/utils/fetch.ts b/server/src/utils/fetch.ts index e753b29725..33bd087907 100644 --- a/server/src/utils/fetch.ts +++ b/server/src/utils/fetch.ts @@ -1,7 +1,8 @@ import { serverVersion } from 'src/constants'; export function configureUserAgent() { - const originalFetch = globalThis.fetch; + const originalFetch = fetch; + // eslint-disable-next-line unicorn/no-global-object-property-assignment globalThis.fetch = (input, init) => { const headers = new Headers(init?.headers); if (!headers.has('User-Agent')) { diff --git a/server/src/utils/file.ts b/server/src/utils/file.ts index edd411dd40..24d555f2fe 100644 --- a/server/src/utils/file.ts +++ b/server/src/utils/file.ts @@ -9,15 +9,19 @@ import { ImmichReadStream } from 'src/repositories/storage.repository'; import { isConnectionAborted } from 'src/utils/misc'; export function getFileNameWithoutExtension(path: string): string { - return basename(path, extname(path)); + return basename(path, getFilenameExtension(path)); } -export function getFilenameExtension(path: string): string { - return extname(path); +export function getFilenameExtension(path: string) { + const extension = extname(path); + if (!extension && path.startsWith('.') && !path.includes('.', 1)) { + return path; + } + return extension; } export function getLivePhotoMotionFilename(stillName: string, motionName: string) { - return getFileNameWithoutExtension(stillName) + extname(motionName); + return getFileNameWithoutExtension(stillName) + getFilenameExtension(motionName); } export class ImmichFileResponse { @@ -74,7 +78,7 @@ export const sendFile = async ( } // log non-http errors - if (error instanceof HttpException === false) { + if (!(error instanceof HttpException)) { logger.error(`Unable to send file: ${error}`, error.stack); } diff --git a/server/src/utils/logger.ts b/server/src/utils/logger.ts index df321f24c2..bfb0202469 100644 --- a/server/src/utils/logger.ts +++ b/server/src/utils/logger.ts @@ -2,7 +2,7 @@ import { HttpException } from '@nestjs/common'; import { Request } from 'express'; import { LoggingRepository } from 'src/repositories/logging.repository'; -const isRequestAborted = (request: Request) => request.destroyed === true && request.complete === false; +const isRequestAborted = (request: Request) => request.destroyed && !request.complete; export const isHttpException = (error: Error): error is HttpException => error instanceof HttpException; export const onRequestError = (req: Request, error: Error, logger: LoggingRepository) => { diff --git a/server/src/utils/maintenance.ts b/server/src/utils/maintenance.ts index 44b98f3f75..d970b5ebf2 100644 --- a/server/src/utils/maintenance.ts +++ b/server/src/utils/maintenance.ts @@ -38,23 +38,23 @@ export async function detectPriorInstall( const files = await storageRepository.readdir(path); const filename = join(StorageCore.getBaseFolder(folder), '.immich'); - let readable = false, - writable = false; + let isReadable = false, + isWritable = false; try { await storageRepository.readFile(filename); - readable = true; + isReadable = true; - await storageRepository.overwriteFile(filename, Buffer.from(`${Date.now()}`)); - writable = true; + await storageRepository.overwriteFile(filename, Buffer.from(Date.now().toString())); + isWritable = true; } catch { // no-op } return { folder, - readable, - writable, + readable: isReadable, + writable: isWritable, files: files.filter((fn) => fn !== '.immich').length, }; }), diff --git a/server/src/utils/media.ts b/server/src/utils/media.ts index eb775e20d3..656e5bf441 100644 --- a/server/src/utils/media.ts +++ b/server/src/utils/media.ts @@ -1,4 +1,4 @@ -import { AUDIO_ENCODER, SUPPORTED_HWA_CODECS } from 'src/constants'; +import { AUDIO_ENCODER, AV1_LEVELS, CodecLevel, H264_LEVELS, HEVC_LEVELS, SUPPORTED_HWA_CODECS } from 'src/constants'; import { SystemConfigFFmpegDto } from 'src/dtos/system-config.dto'; import { ColorMatrix, @@ -36,6 +36,29 @@ export const getOutputSize = (videoStream: VideoStreamInfo, targetRes: number) = return isVideoVertical(videoStream) ? { width: targetRes, height: larger } : { width: larger, height: targetRes }; }; +const pickLevel = (levels: CodecLevel[], frame: number, rate: number) => + levels.find((level) => frame <= level.maxFrame && rate <= level.maxRate) ?? levels.at(-1)!; + +export const getCodecString = (codec: VideoCodec, width: number, height: number, fps: number): string => { + switch (codec) { + case VideoCodec.H264: { + const macroblocks = Math.ceil(width / 16) * Math.ceil(height / 16); + return `avc1.6400${pickLevel(H264_LEVELS, macroblocks, macroblocks * fps).token}`; + } + case VideoCodec.Hevc: { + const samples = width * height; + return `hvc1.1.6.${pickLevel(HEVC_LEVELS, samples, samples * fps).token}.B0`; + } + case VideoCodec.Av1: { + const samples = width * height; + return `av01.0.${pickLevel(AV1_LEVELS, samples, samples * fps).token}.08`; + } + default: { + throw new Error(`Codec '${codec}' does not support HLS codec strings`); + } + } +}; + export class BaseConfig implements VideoCodecSWConfig { readonly presets = ['veryslow', 'slower', 'slow', 'medium', 'fast', 'faster', 'veryfast', 'superfast', 'ultrafast']; protected constructor( @@ -45,9 +68,9 @@ export class BaseConfig implements VideoCodecSWConfig { static create(config: SystemConfigFFmpegDto, interfaces: VideoInterfaces, tune?: VideoTuning) { if (config.accel === TranscodeHardwareAcceleration.Disabled) { - return this.getSWCodecConfig(config, tune); + return BaseConfig.getSWCodecConfig(config, tune); } - return this.getHWCodecConfig(config, interfaces, tune); + return BaseConfig.getHWCodecConfig(config, interfaces, tune); } private static getSWCodecConfig(config: SystemConfigFFmpegDto, tune?: VideoTuning): VideoCodecSWConfig { @@ -200,20 +223,26 @@ export class BaseConfig implements VideoCodecSWConfig { const options = ['-c:v', videoCodec, '-c:a', audioCodec, '-map', `0:${videoStream.index}`, '-map_metadata', '-1']; if (audioStream) { options.push('-map', `0:${audioStream.index}`); - } - if (this.getBFrames() > -1) { - options.push('-bf', `${this.getBFrames()}`); - } - if (this.getRefs() > 0) { - options.push('-refs', `${this.getRefs()}`); - } - if (this.getGopSize() > 0) { - options.push('-g', `${this.getGopSize()}`); - if (this.tune.strictGop) { - options.push('-keyint_min', `${this.getGopSize()}`); + // If there are more than 2 channels sometimes the channel config is broken when re-encoded + // TODO: Store the number of channels in the db and then set it during the transcoding: -channel_layout 5.1 + if ([TranscodeTarget.All, TranscodeTarget.Audio].includes(target)) { + options.push('-ac', '2'); } } - const isHvc = (videoCodec === 'copy' ? videoStream.codecName : videoCodec) === VideoCodec.Hevc; + if (this.getBFrames() > -1) { + options.push('-bf', String(this.getBFrames())); + } + if (this.getRefs() > 0) { + options.push('-refs', String(this.getRefs())); + } + if (this.getGopSize() > 0) { + options.push('-g', String(this.getGopSize())); + if (this.tune.strictGop) { + options.push('-keyint_min', String(this.getGopSize())); + } + } + const isHvc = + this.config.targetVideoCodec === VideoCodec.Hevc && (videoCodec !== 'copy' || videoStream.codecName === 'hevc'); if (isHvc) { options.push('-tag:v', 'hvc1'); } @@ -256,19 +285,19 @@ export class BaseConfig implements VideoCodecSWConfig { '-maxrate', `${bitrates.max}${bitrates.unit}`, ]; - } else if (bitrates.max > 0) { + } + if (bitrates.max > 0) { // -bufsize is the peak possible bitrate at any moment, while -maxrate is the max rolling average bitrate return [ `-${this.useCQP() ? 'q:v' : 'crf'}`, - `${this.config.crf}`, + String(this.config.crf), '-maxrate', `${bitrates.max}${bitrates.unit}`, '-bufsize', `${bitrates.max * 2}${bitrates.unit}`, ]; - } else { - return [`-${this.useCQP() ? 'q:v' : 'crf'}`, `${this.config.crf}`]; } + return [`-${this.useCQP() ? 'q:v' : 'crf'}`, String(this.config.crf)]; } getInputThreadOptions(): Array { @@ -279,7 +308,7 @@ export class BaseConfig implements VideoCodecSWConfig { if (this.config.threads <= 0) { return []; } - return ['-threads', `${this.config.threads}`]; + return ['-threads', String(this.config.threads)]; } eligibleForTwoPass() { @@ -314,9 +343,9 @@ export class BaseConfig implements VideoCodecSWConfig { } shouldScale(videoStream: VideoStreamInfo) { - const oddDimensions = videoStream.height % 2 !== 0 || videoStream.width % 2 !== 0; - const largerThanTarget = Math.min(videoStream.height, videoStream.width) > this.getTargetResolution(videoStream); - return oddDimensions || largerThanTarget; + const isOddDimensions = videoStream.height % 2 !== 0 || videoStream.width % 2 !== 0; + const isLargerThanTarget = Math.min(videoStream.height, videoStream.width) > this.getTargetResolution(videoStream); + return isOddDimensions || isLargerThanTarget; } shouldToneMap(videoStream: VideoStreamInfo) { @@ -540,7 +569,7 @@ export class VP9Config extends BaseConfig { getPresetOptions() { const speed = Math.min(this.getPresetIndex(), 5); // values over 5 require realtime mode, which is its own can of worms since it overrides -crf and -threads if (speed >= 0) { - return ['-cpu-used', `${speed}`]; + return ['-cpu-used', String(speed)]; } return []; } @@ -558,7 +587,7 @@ export class VP9Config extends BaseConfig { ]; } - return [`-${this.useCQP() ? 'q:v' : 'crf'}`, `${this.config.crf}`, '-b:v', `${bitrates.max}${bitrates.unit}`]; + return [`-${this.useCQP() ? 'q:v' : 'crf'}`, String(this.config.crf), '-b:v', `${bitrates.max}${bitrates.unit}`]; } getEncoderOptions(): string[] { @@ -578,13 +607,13 @@ export class AV1Config extends BaseConfig { getPresetOptions() { const speed = this.getPresetIndex() + 4; // Use 4 as slowest, giving us an effective range of 4-12 which is far more useful than 0-8 if (speed >= 0) { - return ['-preset', `${speed}`]; + return ['-preset', String(speed)]; } return []; } getBitrateOptions() { - return ['-crf', `${this.config.crf}`]; + return ['-crf', String(this.config.crf)]; } getEncoderOptions(): string[] { @@ -670,22 +699,17 @@ export class NvencSwDecodeConfig extends BaseHWConfig { '-multipass', '2', ]; - } else if (bitrates.max > 0) { - return [ - '-cq:v', - `${this.config.crf}`, - '-maxrate', - `${bitrates.max}${bitrates.unit}`, - '-bufsize', - `${bitrates.target}${bitrates.unit}`, - ]; - } else { - return ['-cq:v', `${this.config.crf}`]; } - } - - getThreadOptions() { - return []; + return bitrates.max > 0 + ? [ + '-cq:v', + String(this.config.crf), + '-maxrate', + `${bitrates.max}${bitrates.unit}`, + '-bufsize', + `${bitrates.target}${bitrates.unit}`, + ] + : ['-cq:v', String(this.config.crf)]; } getEncoderOptions(): string[] { @@ -781,11 +805,11 @@ export class QsvSwDecodeConfig extends BaseHWConfig { return []; } presetIndex = Math.min(6, presetIndex) + 1; // 1 to 7 - return ['-preset', `${presetIndex}`]; + return ['-preset', String(presetIndex)]; } getBitrateOptions() { - const options = [`-${this.useCQP() ? 'q:v' : 'global_quality:v'}`, `${this.config.crf}`]; + const options = [`-${this.useCQP() ? 'q:v' : 'global_quality:v'}`, String(this.config.crf)]; const bitrates = this.getBitrateDistribution(); if (bitrates.max > 0) { // Workaround for https://github.com/immich-app/immich/issues/29220, to be revisited @@ -910,7 +934,7 @@ export class VaapiSwDecodeConfig extends BaseHWConfig { return []; } presetIndex = Math.min(6, presetIndex) + 1; // 1 to 7 - return ['-compression_level', `${presetIndex}`]; + return ['-compression_level', String(presetIndex)]; } getBitrateOptions() { @@ -934,9 +958,9 @@ export class VaapiSwDecodeConfig extends BaseHWConfig { '3', ); // variable bitrate } else if (this.useCQP()) { - options.push('-qp:v', `${this.config.crf}`, '-global_quality:v', `${this.config.crf}`, '-rc_mode', '1'); + options.push('-qp:v', String(this.config.crf), '-global_quality:v', String(this.config.crf), '-rc_mode', '1'); } else { - options.push('-global_quality:v', `${this.config.crf}`, '-rc_mode', '4'); + options.push('-global_quality:v', String(this.config.crf), '-rc_mode', '4'); } return options; @@ -1043,7 +1067,7 @@ export class RkmppSwDecodeConfig extends BaseHWConfig { return ['-rc_mode', 'AVBR', '-b:v', `${bitrate}${this.getBitrateUnit()}`]; } // use CRF value as QP value - return ['-rc_mode', 'CQP', '-qp_init', `${this.config.crf}`]; + return ['-rc_mode', 'CQP', '-qp_init', String(this.config.crf)]; } getVideoCodec(): string { @@ -1077,7 +1101,8 @@ export class RkmppHwDecodeConfig extends RkmppSwDecodeConfig { `tonemapx=tonemap=${this.config.tonemap}:desat=0:p=${primaries}:t=${transfer}:m=${matrix}:r=pc:peak=100:format=yuv420p`, 'hwupload', ]; - } else if (this.shouldScale(videoStream)) { + } + if (this.shouldScale(videoStream)) { return [`scale_rkrga=${this.getScaling(videoStream)}:format=nv12:afbc=1:async_depth=4`]; } return []; diff --git a/server/src/utils/mime-types.ts b/server/src/utils/mime-types.ts index 346124df32..bb5e7be95b 100644 --- a/server/src/utils/mime-types.ts +++ b/server/src/utils/mime-types.ts @@ -1,5 +1,5 @@ -import { extname } from 'node:path'; import { AssetType } from 'src/enum'; +import { getFilenameExtension } from 'src/utils/file'; const raw = { '.3fr': ['image/3fr', 'image/x-hasselblad-3fr'], @@ -132,9 +132,12 @@ const sidecar: Record = { const types = { ...image, ...video, ...sidecar }; -const isType = (filename: string, r: Record) => extname(filename).toLowerCase() in r; +const isType = (filename: string, r: Record) => + Object.hasOwn(r, getFilenameExtension(filename).toLowerCase()); + +const lookup = (filename: string) => + types[getFilenameExtension(filename).toLowerCase()]?.[0] ?? 'application/octet-stream'; -const lookup = (filename: string) => types[extname(filename).toLowerCase()]?.[0] ?? 'application/octet-stream'; const toExtension = (mimeType: string) => { return ( extensionOverrides[mimeType] || Object.entries(types).find(([, mimeTypes]) => mimeTypes.includes(mimeType))?.[0] @@ -157,7 +160,8 @@ export const mimeTypes = { isProfile: (filename: string) => isType(filename, profile), isSidecar: (filename: string) => isType(filename, sidecar), isVideo: (filename: string) => isType(filename, video), - canBeTransparent: (filename: string) => transparentCapableExtensions.has(extname(filename).toLowerCase()), + canBeTransparent: (filename: string) => + transparentCapableExtensions.has(getFilenameExtension(filename).toLowerCase()), isRaw: (filename: string) => isType(filename, raw), lookup, /** return an extension (including a leading `.`) for a mime-type */ @@ -168,7 +172,7 @@ export const mimeTypes = { return AssetType.Image; } - if (contentType.startsWith('video/') || contentType === 'application/mxf') { + if (contentType === 'application/mxf' || contentType.startsWith('video/')) { return AssetType.Video; } diff --git a/server/src/utils/misc.ts b/server/src/utils/misc.ts index efcb509941..a514007987 100644 --- a/server/src/utils/misc.ts +++ b/server/src/utils/misc.ts @@ -1,4 +1,4 @@ -import { INestApplication } from '@nestjs/common'; +import { BadRequestException, INestApplication } from '@nestjs/common'; import { ApiBodyOptions, DocumentBuilder, @@ -14,7 +14,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, endpointTags, serverVersion } from 'src/constants'; +import { CLIP_MODEL_INFO, JOBS_ASSET_PAGINATION_SIZE, endpointTags, serverVersion } from 'src/constants'; import { extraModels } from 'src/decorators'; import { ApiCustomExtension, ImmichCookie, ImmichHeader, MetadataKey } from 'src/enum'; import { LoggingRepository } from 'src/repositories/logging.repository'; @@ -111,6 +111,32 @@ export const handlePromiseError = (promise: Promise, logger: LoggingReposi promise.catch((error: Error | any) => logger.error(`Promise error: ${error}`, error?.stack)); }; +export const findOrFail = async (find: () => Promise, entity: string): Promise> => { + const value = await find(); + if (!value) { + throw new BadRequestException(`${entity} not found`); + } + + return value; +}; + +export async function* batched(items: AsyncIterable, size = JOBS_ASSET_PAGINATION_SIZE): AsyncGenerator { + let batch: T[] = []; + + for await (const item of items) { + batch.push(item); + + if (batch.length >= size) { + yield batch; + batch = []; + } + } + + if (batch.length > 0) { + yield batch; + } +} + export interface OpenGraphTags { title: string; description: string; @@ -152,11 +178,7 @@ export const routeToErrorMessage = (methodName: string) => 'Failed to ' + methodName.replaceAll(/[A-Z]+/g, (letter) => ` ${letter.toLowerCase()}`); const isSchema = (schema: string | ReferenceObject | SchemaObject): schema is SchemaObject => { - if (typeof schema === 'string' || '$ref' in schema) { - return false; - } - - return true; + return !(typeof schema === 'string' || '$ref' in schema); }; const patchOpenAPI = (document: OpenAPIObject) => { @@ -195,20 +217,22 @@ const patchOpenAPI = (document: OpenAPIObject) => { document.components.schemas = sortKeys(schemas); for (const [schemaName, schema] of Object.entries(schemas)) { - if (schema.properties) { - schema.properties = sortKeys(schema.properties); - - for (const [key, value] of Object.entries(schema.properties)) { - if (typeof value === 'string') { - continue; - } - - if (isSchema(value) && value.type === 'number' && value.format === 'float') { - throw new Error(`Invalid number format: ${schemaName}.${key}=float (use double instead). `); - } - } - schema.required?.sort(); + if (!schema.properties) { + continue; } + + schema.properties = sortKeys(schema.properties); + + for (const [key, value] of Object.entries(schema.properties)) { + if (typeof value === 'string') { + continue; + } + + if (isSchema(value) && value.type === 'number' && value.format === 'float') { + throw new Error(`Invalid number format: ${schemaName}.${key}=float (use double instead). `); + } + } + schema.required?.sort(); } } diff --git a/server/src/utils/preferences.ts b/server/src/utils/preferences.ts index 6b67398d23..9cb294727c 100644 --- a/server/src/utils/preferences.ts +++ b/server/src/utils/preferences.ts @@ -50,6 +50,9 @@ const getDefaultPreferences = (): UserPreferences => { cast: { gCastEnabled: false, }, + recentlyAdded: { + sidebarWeb: false, + }, }; }; @@ -69,7 +72,7 @@ export const getPreferencesPartial = (newPreferences: UserPreferences) => { const partial: DeepPartial = {}; for (const property of getKeysDeep(defaultPreferences)) { const newValue = _.get(newPreferences, property); - const isEmpty = newValue === undefined || newValue === null || newValue === ''; + const isEmpty = [undefined, null, ''].includes(newValue); const defaultValue = _.get(defaultPreferences, property); const isEqual = newValue === defaultValue || _.isEqual(newValue, defaultValue); diff --git a/server/src/utils/set.ts b/server/src/utils/set.ts index 971d3f7e5d..cc6ded93cc 100644 --- a/server/src/utils/set.ts +++ b/server/src/utils/set.ts @@ -22,7 +22,7 @@ export const setDifference = (setA: Set, ...sets: Set[]): Set => { return difference; }; -export const setIsSuperset = (set: Set, subset: Set): boolean => { +export const isSetSuperset = (set: Set, subset: Set): boolean => { for (const element of subset) { if (!set.has(element)) { return false; @@ -31,6 +31,6 @@ export const setIsSuperset = (set: Set, subset: Set): boolean => { return true; }; -export const setIsEqual = (setA: Set, setB: Set): boolean => { - return setA.size === setB.size && setIsSuperset(setA, setB); +export const areSetsEqual = (setA: Set, setB: Set): boolean => { + return setA.size === setB.size && isSetSuperset(setA, setB); }; diff --git a/server/src/utils/sync.ts b/server/src/utils/sync.ts index 82222708af..51c62862eb 100644 --- a/server/src/utils/sync.ts +++ b/server/src/utils/sync.ts @@ -9,7 +9,7 @@ type Impossible = { type Exact = U & Impossible>; export const fromAck = (ack: string): SyncAck => { - const [type, updateId, extraId] = ack.split('|'); + const [type, updateId, extraId] = ack.split('|', 3); return { type: type as SyncEntityType, updateId, extraId }; }; diff --git a/server/src/utils/transform.ts b/server/src/utils/transform.ts index 1c849322a1..76d5247de3 100644 --- a/server/src/utils/transform.ts +++ b/server/src/utils/transform.ts @@ -16,11 +16,13 @@ export const getOutputDimensions = ( } for (const edit of edits) { - if (edit.action === AssetEditAction.Rotate) { - const angleDegrees = edit.parameters.angle; - if (angleDegrees === 90 || angleDegrees === 270) { - [width, height] = [height, width]; - } + if (edit.action !== AssetEditAction.Rotate) { + continue; + } + + const angleDegrees = edit.parameters.angle; + if (angleDegrees === 90 || angleDegrees === 270) { + [width, height] = [height, width]; } } @@ -225,7 +227,7 @@ export const transformOcrBoundingBox = ( const { points: transformedPoints, currentWidth, currentHeight } = transformPoints(points, edits, imageDimensions); // Reorder points to maintain semantic ordering (topLeft, topRight, bottomRight, bottomLeft) - const netRotation = edits.find((e) => e.action == AssetEditAction.Rotate)?.parameters.angle ?? 0 % 360; + const netRotation = edits.find((e) => e.action === AssetEditAction.Rotate)?.parameters.angle ?? 0 % 360; const reorderedPoints = reorderQuadPointsForRotation(transformedPoints, netRotation); const [p1, p2, p3, p4] = reorderedPoints; diff --git a/server/src/utils/workflow.ts b/server/src/utils/workflow.ts index c892239c80..a3a9d56c42 100644 --- a/server/src/utils/workflow.ts +++ b/server/src/utils/workflow.ts @@ -6,6 +6,7 @@ export const triggerMap: Record = { [WorkflowTrigger.AssetCreate]: [WorkflowType.AssetV1], // [WorkflowTrigger.PersonRecognized]: [WorkflowType.AssetPersonV1], [WorkflowTrigger.AssetMetadataExtraction]: [WorkflowType.AssetV1], + [WorkflowTrigger.AssetTagged]: [WorkflowType.AssetV1], }; export const getWorkflowTriggers = () => diff --git a/server/src/validation.ts b/server/src/validation.ts index 220d89e4a0..f8de2a68ff 100644 --- a/server/src/validation.ts +++ b/server/src/validation.ts @@ -1,4 +1,5 @@ -import { ArgumentMetadata, FileValidator, Injectable, ParseUUIDPipe } from '@nestjs/common'; +import { FileValidator, Injectable } from '@nestjs/common'; +import { DateTime } from 'luxon'; import { createZodDto } from 'nestjs-zod'; import sanitize from 'sanitize-filename'; import { isIP, isIPRange } from 'validator'; @@ -11,10 +12,7 @@ function isIPOrRange(value: string, options?: IsIPRangeOptions): boolean { if (isIPRange(value)) { return true; } - if (!requireCIDR && isIP(value)) { - return true; - } - return false; + return !requireCIDR && isIP(value); } /** @@ -44,7 +42,7 @@ export function nonEmptyPartial(shape: T) { .object(shape) .partial() .refine((data) => Object.values(data as Record).some((value) => value !== undefined), { - message: 'At least one field must be provided', + message: `At least one of the following fields is required: ${Object.keys(shape).join(', ')}`, }); } @@ -62,7 +60,7 @@ export function IsNotSiblingOf< TKey extends z.infer> & keyof z.infer, >(_schema: TSchema, property: TKey, siblings: TKey[]) { type T = z.infer; - const message = `${String(property)} cannot exist alongside ${siblings.join(' or ')}`; + const message = `${property} cannot exist alongside ${siblings.join(' or ')}`; return z.custom().refine( (data) => { if (data[property] === undefined) { @@ -74,16 +72,6 @@ export function IsNotSiblingOf< ); } -@Injectable() -export class ParseMeUUIDPipe extends ParseUUIDPipe { - async transform(value: string, metadata: ArgumentMetadata) { - if (value == 'me') { - return value; - } - return super.transform(value, metadata); - } -} - @Injectable() export class FileNotEmptyValidator extends FileValidator { constructor(private requiredFields: string[]) { @@ -173,12 +161,7 @@ export const isoDateToDate = z z.date(), { decode: (isoString) => new Date(isoString), - encode: (date) => { - const y = date.getFullYear(); - const m = String(date.getMonth() + 1).padStart(2, '0'); - const d = String(date.getDate()).padStart(2, '0'); - return `${y}-${m}-${d}`; - }, + encode: (date) => DateTime.fromJSDate(date).toFormat('yyyy-MM-dd'), }, ) .meta({ example: '2024-01-01' }); diff --git a/server/test/factories/asset-exif.factory.ts b/server/test/factories/asset-exif.factory.ts index da4d689ebf..ada83d5099 100644 --- a/server/test/factories/asset-exif.factory.ts +++ b/server/test/factories/asset-exif.factory.ts @@ -30,8 +30,8 @@ export class AssetExifFactory { focalLength: 4.38, fps: null, iso: 947, - latitude: 30.267_334_570_570_195, - longitude: -97.789_833_534_282_07, + latitude: 30.267334570570195, + longitude: -97.78983353428207, lensModel: null, livePhotoCID: null, make: 'Google', diff --git a/server/test/factories/session.factory.ts b/server/test/factories/session.factory.ts index 44a25edcfa..188b8b638c 100644 --- a/server/test/factories/session.factory.ts +++ b/server/test/factories/session.factory.ts @@ -26,6 +26,7 @@ export class SessionFactory { updatedAt: newDate(), userId: newUuid(), oauthSid: newUuid(), + oauthBearerToken: 'oauth-bearer-token', ...dto, }); } diff --git a/server/test/fixtures/auth.stub.ts b/server/test/fixtures/auth.stub.ts index 88a2278898..7ac7c14978 100644 --- a/server/test/fixtures/auth.stub.ts +++ b/server/test/fixtures/auth.stub.ts @@ -28,19 +28,6 @@ export const authStub = { id: 'token-id', } as AuthSession, }), - user2: Object.freeze({ - user: { - id: 'user-2', - name: 'User 2', - email: 'user2@immich.cloud', - isAdmin: false, - quotaSizeInBytes: null, - quotaUsageInBytes: 0, - }, - session: { - id: 'token-id', - } as AuthSession, - }), adminWithElevatedPermission: Object.freeze({ user: authUser.admin, session: { diff --git a/server/test/fixtures/file.stub.ts b/server/test/fixtures/file.stub.ts index f63d2d10fb..e64b769496 100644 --- a/server/test/fixtures/file.stub.ts +++ b/server/test/fixtures/file.stub.ts @@ -6,13 +6,6 @@ export const fileStub = { originalName: 'asset_1.jpeg', size: 42, }), - livePhotoMotion: Object.freeze({ - uuid: 'live-photo-motion-asset', - originalPath: 'fake_path/asset_1.mp4', - checksum: Buffer.from('live photo file hash', 'utf8'), - originalName: 'asset_1.mp4', - size: 69, - }), photo: Object.freeze({ uuid: 'photo', originalPath: 'fake_path/photo1.jpeg', diff --git a/server/test/fixtures/media.stub.ts b/server/test/fixtures/media.stub.ts index 7edd1c2dee..4421a09801 100644 --- a/server/test/fixtures/media.stub.ts +++ b/server/test/fixtures/media.stub.ts @@ -451,28 +451,6 @@ export const videoInfoStub = { }, ], }), - videoStreamWithProfileLevel: Object.freeze({ - ...probeStubDefault, - videoStreams: [ - { - ...probeStubDefaultVideoStream[0], - codecName: 'h264', - profile: 100, - level: 40, - }, - ], - }), - audioStreamAAC: Object.freeze({ - ...probeStubDefault, - audioStreams: [ - { - index: 1, - codecName: 'aac', - profile: 2, - bitrate: 128_000, - }, - ], - }), }; interface SelectedStreams { @@ -502,7 +480,7 @@ export const eiffelTower = { profile: H264Profile.High, level: 40, frameCount: 557, - frameRate: 24.908_004_845_459_07, + frameRate: 24.90800484545907, timeBase: 90_000, bitrate: 5_128_622, pixelFormat: 'yuv420p', @@ -541,7 +519,7 @@ export const waterfall = { profile: HevcProfile.Main, level: 156, frameCount: 309, - frameRate: 29.829_901_982_867_92, + frameRate: 29.82990198286792, timeBase: 90_000, bitrate: 43_363_499, pixelFormat: 'yuvj420p', @@ -582,7 +560,7 @@ export const train = { profile: HevcProfile.Main10, level: 123, frameCount: 1229, - frameRate: 56.536_072_989_342_94, + frameRate: 56.53607298934294, timeBase: 600, bitrate: 12_595_191, pixelFormat: 'yuv420p10le', diff --git a/server/test/fixtures/shared-link.stub.ts b/server/test/fixtures/shared-link.stub.ts index 7a3adc0437..c29bdf631a 100644 --- a/server/test/fixtures/shared-link.stub.ts +++ b/server/test/fixtures/shared-link.stub.ts @@ -1,3 +1,4 @@ +import { DateTime } from 'luxon'; import { MapAsset } from 'src/dtos/asset-response.dto'; import { SharedLinkType } from 'src/enum'; import { AssetFactory } from 'test/factories/asset.factory'; @@ -5,10 +6,8 @@ import { authStub } from 'test/fixtures/auth.stub'; import { userStub } from 'test/fixtures/user.stub'; const today = new Date(); -const tomorrow = new Date(); -const yesterday = new Date(); -tomorrow.setDate(today.getDate() + 1); -yesterday.setDate(yesterday.getDate() - 1); +const tomorrow = DateTime.now().plus({ days: 1 }).toJSDate(); +const yesterday = DateTime.now().minus({ days: 1 }).toJSDate(); const sharedLinkBytes = Buffer.from( '2c2b646895f84753bff43fb696ad124f3b0faf2a0bd547406f26fa4a76b5c71990092baa536275654b2ab7a191fb21a6d6cd', diff --git a/server/test/mappers.ts b/server/test/mappers.ts index 6ee7e52ac6..40ae78fe26 100644 --- a/server/test/mappers.ts +++ b/server/test/mappers.ts @@ -68,7 +68,6 @@ export const getDehydrated = >(entity: T) => { for (const [key, value] of Object.entries(copiedEntity)) { if (value instanceof Date) { Object.assign(copiedEntity, { [key]: value.toISOString() }); - continue; } } diff --git a/server/test/medium.factory.ts b/server/test/medium.factory.ts index 599cfe7cc2..860189d9a9 100644 --- a/server/test/medium.factory.ts +++ b/server/test/medium.factory.ts @@ -4,6 +4,7 @@ import { createHash, randomBytes } from 'node:crypto'; import { Stats } from 'node:fs'; import { resolve } from 'node:path'; import { Writable } from 'node:stream'; +import { SystemConfig } from 'src/config'; import { AssetFace } from 'src/database'; import { AuthDto, LoginResponseDto } from 'src/dtos/auth.dto'; import { AssetEditActionItem, AssetEditsCreateDto } from 'src/dtos/editing.dto'; @@ -28,6 +29,7 @@ import { ConfigRepository } from 'src/repositories/config.repository'; import { CronRepository } from 'src/repositories/cron.repository'; import { CryptoRepository } from 'src/repositories/crypto.repository'; import { DatabaseRepository } from 'src/repositories/database.repository'; +import { DuplicateRepository } from 'src/repositories/duplicate.repository'; import { EmailRepository } from 'src/repositories/email.repository'; import { EventRepository } from 'src/repositories/event.repository'; import { IntegrityRepository } from 'src/repositories/integrity.repository'; @@ -75,7 +77,8 @@ 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 { ClassConstructor, UploadFile } from 'src/types'; +import { ClassConstructor, ClassConstructorsToInstances, UploadFile } from 'src/types'; +import { getConfig, updateConfig } from 'src/utils/config'; 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'; @@ -86,29 +89,34 @@ import { Mocked } from 'vitest'; export const testAssetsDir = resolve(__dirname, '../../e2e/test-assets'); type MediumTestOptions = { - mock: ClassConstructor[]; - real: ClassConstructor[]; + mock: Array<(typeof BASE_SERVICE_DEPENDENCIES)[number]>; + real: Array<(typeof BASE_SERVICE_DEPENDENCIES)[number]>; database: Kysely; }; -export const newMediumService = (Service: ClassConstructor, options: MediumTestOptions) => { +type BaseServiceDeps = typeof BASE_SERVICE_DEPENDENCIES; + +export const newMediumService = >( + Service: S, + options: MediumTestOptions, +) => { const ctx = new MediumTestContext(Service, options); return { sut: ctx.sut, ctx }; }; -export class MediumTestContext { +export class MediumTestContext = ClassConstructor> { private repoCache: Record = {}; - private sutDeps: any[]; + private sutDeps: ClassConstructorsToInstances; - sut: S; + sut: InstanceType; database: Kysely; constructor( - Service: ClassConstructor, + Service: S, private options: MediumTestOptions, ) { this.sutDeps = this.makeDeps(options); - this.sut = new Service(...this.sutDeps); + this.sut = new Service(...this.sutDeps) as InstanceType; this.database = options.database; } @@ -126,7 +134,7 @@ export class MediumTestContext { throw new Error(`Real repository ${dep.name} is not a valid dependency`); } } - return (deps as ClassConstructor[]).map((dep) => { + return deps.map((dep) => { if (options.real.includes(dep)) { return this.get(dep); } @@ -134,11 +142,11 @@ export class MediumTestContext { if (options.mock.includes(dep)) { return newMockRepository(dep); } - }); + }) as unknown as ClassConstructorsToInstances; } - get(key: ClassConstructor): T { - if (!this.repoCache[key.name]) { + get(key: T): InstanceType { + if (!Object.hasOwn(this.repoCache, key.name)) { const real = newRealRepository(key, this.options.database); this.repoCache[key.name] = real; } @@ -146,8 +154,8 @@ export class MediumTestContext { return this.repoCache[key.name]; } - getMock>(key: ClassConstructor): R { - const index = BASE_SERVICE_DEPENDENCIES.indexOf(key as any); + getMock>>(key: T): R { + const index = BASE_SERVICE_DEPENDENCIES.indexOf(key); if (index === -1 || !this.options.mock.includes(key)) { throw new Error(`getMock called with a key that is not a mock: ${key.name}`); } @@ -302,9 +310,31 @@ export class MediumTestContext { const edits = await this.get(AssetEditRepository).replaceAll(assetId, dto.edits as AssetEditActionItem[]); return { edits }; } + + async getConfig({ withCache = true }: { withCache?: boolean } = {}) { + return getConfig( + { + configRepo: this.get(ConfigRepository), + metadataRepo: this.get(SystemMetadataRepository), + logger: this.get(LoggingRepository), + }, + { withCache }, + ); + } + + async updateConfig(config: SystemConfig) { + return updateConfig( + { + configRepo: this.get(ConfigRepository), + metadataRepo: this.get(SystemMetadataRepository), + logger: this.get(LoggingRepository), + }, + config, + ); + } } -export class SyncTestContext extends MediumTestContext { +export class SyncTestContext extends MediumTestContext { constructor(database: Kysely) { super(SyncService, { database, @@ -313,11 +343,11 @@ export class SyncTestContext extends MediumTestContext { }); } - async syncStream(auth: AuthDto, types: SyncRequestType[], reset?: boolean) { + async syncStream(auth: AuthDto, types: SyncRequestType[], shouldReset?: boolean) { const stream = mediumFactory.syncStream(); // Wait for 2ms to ensure all updates are available and account for setTimeout inaccuracy await wait(2); - await this.sut.stream(auth, stream, { types, reset }); + await this.sut.stream(auth, stream, { types, reset: shouldReset }); return stream.getResponse(); } @@ -355,7 +385,7 @@ const mockStats = { birthtimeMs: 0, }; -export class ExifTestContext extends MediumTestContext { +export class ExifTestContext extends MediumTestContext { constructor(database: Kysely) { super(MetadataService, { database, @@ -407,7 +437,7 @@ export class ExifTestContext extends MediumTestContext { } } -const newRealRepository = (key: ClassConstructor, db: Kysely): T => { +const newRealRepository = (key: T, db: Kysely): InstanceType => { switch (key) { case AccessRepository: case AlbumRepository: @@ -416,6 +446,7 @@ const newRealRepository = (key: ClassConstructor, db: Kysely): T => { case AssetRepository: case AssetEditRepository: case AssetJobRepository: + case DuplicateRepository: case IntegrityRepository: case MemoryRepository: case NotificationRepository: @@ -433,41 +464,41 @@ const newRealRepository = (key: ClassConstructor, db: Kysely): T => { case UserRepository: case VersionHistoryRepository: case WorkflowRepository: { - return new key(db); + return new key(db) as InstanceType; } case ConfigRepository: case CryptoRepository: { - return new key(); + return new key() as InstanceType; } case DatabaseRepository: { - return new key(db, LoggingRepository.create(), new ConfigRepository()); + return new key(db, LoggingRepository.create(), new ConfigRepository()) as InstanceType; } case EmailRepository: { - return new key(LoggingRepository.create()); + return new key(LoggingRepository.create()) as InstanceType; } case MediaRepository: case MetadataRepository: { - return new key(LoggingRepository.create()); + return new key(LoggingRepository.create()) as InstanceType; } case PluginRepository: { - return new key(db, LoggingRepository.create()); + return new key(db, LoggingRepository.create()) as InstanceType; } case StorageRepository: { - return new key(LoggingRepository.create()); + return new key(LoggingRepository.create()) as InstanceType; } case TagRepository: { - return new key(db, LoggingRepository.create()); + return new key(db, LoggingRepository.create()) as InstanceType; } - case LoggingRepository as unknown as ClassConstructor: { - return new key() as unknown as T; + case LoggingRepository: { + return new key(undefined, undefined) as InstanceType; } default: { @@ -750,6 +781,8 @@ const tagInsert = (tag: Partial>) => { class CustomWritable extends Writable { private data = ''; + // determined by Writable interface + // eslint-disable-next-line unicorn/prefer-private-class-fields _write(chunk: any, encoding: string, callback: () => void) { this.data += chunk.toString(); callback(); diff --git a/server/test/medium/responses.ts b/server/test/medium/responses.ts index b416b3b904..e8509e339b 100644 --- a/server/test/medium/responses.ts +++ b/server/test/medium/responses.ts @@ -1,27 +1,6 @@ import { expect } from 'vitest'; export const errorDto = { - unauthorized: { - message: 'Authentication required', - }, - forbidden: { - message: expect.any(String), - }, - missingPermission: (permission: string) => ({ - message: `Missing required permission: ${permission}`, - }), - wrongPassword: { - message: 'Wrong password', - }, - invalidToken: { - message: 'Invalid user token', - }, - invalidShareKey: { - message: 'Invalid share key', - }, - invalidSharePassword: { - message: 'Invalid password', - }, badRequest: (message: any = null) => ({ message: message ?? expect.anything(), }), @@ -29,13 +8,4 @@ export const errorDto = { message: 'Validation failed', errors: errors ? expect.arrayContaining(errors.map((e) => expect.objectContaining(e))) : expect.any(Array), }), - noPermission: { - message: expect.stringContaining('Not found or no'), - }, - incorrectLogin: { - message: 'Incorrect email or password', - }, - alreadyHasAdmin: { - message: 'The server already has an admin', - }, }; diff --git a/server/test/medium/specs/repositories/asset-job.repository.spec.ts b/server/test/medium/specs/repositories/asset-job.repository.spec.ts index 023ed8774e..7b36958661 100644 --- a/server/test/medium/specs/repositories/asset-job.repository.spec.ts +++ b/server/test/medium/specs/repositories/asset-job.repository.spec.ts @@ -8,11 +8,7 @@ import { newMediumService } from 'test/medium.factory'; import { getKyselyDB } from 'test/utils'; const consume = async (generator: AsyncIterableIterator) => { - const values: T[] = []; - - for await (const value of generator) { - values.push(value); - } + const values: T[] = await Array.fromAsync(generator); return values; }; diff --git a/server/test/medium/specs/repositories/person.repository.spec.ts b/server/test/medium/specs/repositories/person.repository.spec.ts index 30f0fd33c0..1ff9ade1d1 100644 --- a/server/test/medium/specs/repositories/person.repository.spec.ts +++ b/server/test/medium/specs/repositories/person.repository.spec.ts @@ -40,7 +40,7 @@ describe(PersonRepository.name, () => { boundingBoxY2: 90, }); - // theres a circular dependency between assetFace and person, so we need to update the person after creating the assetFace + // there's a circular dependency between assetFace and person, so we need to update the person after creating the assetFace await ctx.database.updateTable('person').set({ faceAssetId: assetFace.id }).where('id', '=', person.id).execute(); await ctx.newAssetFile({ diff --git a/server/test/medium/specs/services/album.service.spec.ts b/server/test/medium/specs/services/album.service.spec.ts new file mode 100644 index 0000000000..bc73007593 --- /dev/null +++ b/server/test/medium/specs/services/album.service.spec.ts @@ -0,0 +1,37 @@ +import { Kysely } from 'kysely'; +import { AlbumRepository } from 'src/repositories/album.repository'; +import { LoggingRepository } from 'src/repositories/logging.repository'; +import { UserRepository } from 'src/repositories/user.repository'; +import { DB } from 'src/schema'; +import { AlbumService } from 'src/services/album.service'; +import { newMediumService } from 'test/medium.factory'; +import { getKyselyDB } from 'test/utils'; + +let defaultDatabase: Kysely; + +const setup = (db?: Kysely) => { + return newMediumService(AlbumService, { + database: db || defaultDatabase, + real: [AlbumRepository, UserRepository], + mock: [LoggingRepository], + }); +}; + +beforeAll(async () => { + defaultDatabase = await getKyselyDB(); +}); + +describe(AlbumService.name, () => { + describe('database triggers', () => { + it('should cascade delete an album when the owner is deleted', async () => { + const { ctx } = setup(); + const { user } = await ctx.newUser(); + await ctx.newAlbum({ ownerId: user.id }); + + await ctx.get(UserRepository).delete({ id: user.id }, true); + + await expect(ctx.database.selectFrom('album').selectAll().execute()).resolves.toEqual([]); + await expect(ctx.database.selectFrom('album_user').selectAll().execute()).resolves.toEqual([]); + }); + }); +}); diff --git a/server/test/medium/specs/services/asset-media.service.spec.ts b/server/test/medium/specs/services/asset-media.service.spec.ts index e9395bfebf..52ec8e12dc 100644 --- a/server/test/medium/specs/services/asset-media.service.spec.ts +++ b/server/test/medium/specs/services/asset-media.service.spec.ts @@ -213,6 +213,12 @@ describe(AssetService.name, () => { const assets = [...result]; expect(assets).toHaveLength(1); expect(assets[0]).toEqual(response.id); + + expect(ctx.getMock(EventRepository).emit).toHaveBeenCalledWith('AlbumUpdate', { + id: album.id, + userIds: [user.id], + recipientIds: [user.id], + }); }); it('should handle adding a duplicate asset to an album shared link', async () => { diff --git a/server/test/medium/specs/services/auth.service.spec.ts b/server/test/medium/specs/services/auth.service.spec.ts index 1fc306f790..5e5c880955 100644 --- a/server/test/medium/specs/services/auth.service.spec.ts +++ b/server/test/medium/specs/services/auth.service.spec.ts @@ -57,16 +57,6 @@ describe(AuthService.name, () => { }), ); }); - - it('should not allow a second admin to sign up', async () => { - const { sut, ctx } = setup(); - await ctx.newUser({ isAdmin: true }); - const dto = { name: 'Admin', email: 'admin@immich.cloud', password: 'password' }; - - const response = sut.adminSignUp(dto); - await expect(response).rejects.toThrow(BadRequestException); - await expect(response).rejects.toThrow('The server already has an admin'); - }); }); describe('login', () => { diff --git a/server/test/medium/specs/services/duplicate.service.spec.ts b/server/test/medium/specs/services/duplicate.service.spec.ts new file mode 100644 index 0000000000..6afae277cb --- /dev/null +++ b/server/test/medium/specs/services/duplicate.service.spec.ts @@ -0,0 +1,622 @@ +import { Kysely } from 'kysely'; +import { BulkIdErrorReason, BulkIdResponseDto } from 'src/dtos/asset-ids.response.dto'; +import { AssetStatus, AssetVisibility } from 'src/enum'; +import { AccessRepository } from 'src/repositories/access.repository'; +import { AlbumRepository } from 'src/repositories/album.repository'; +import { AssetRepository } from 'src/repositories/asset.repository'; +import { ConfigRepository } from 'src/repositories/config.repository'; +import { DuplicateRepository } from 'src/repositories/duplicate.repository'; +import { EventRepository } from 'src/repositories/event.repository'; +import { JobRepository } from 'src/repositories/job.repository'; +import { LoggingRepository } from 'src/repositories/logging.repository'; +import { SystemMetadataRepository } from 'src/repositories/system-metadata.repository'; +import { TagRepository } from 'src/repositories/tag.repository'; +import { DB } from 'src/schema'; +import { DuplicateService } from 'src/services/duplicate.service'; +import { clearConfigCache } from 'src/utils/config'; +import { MediumTestContext, newMediumService } from 'test/medium.factory'; +import { factory } from 'test/small.factory'; +import { getKyselyDB } from 'test/utils'; + +let defaultDatabase: Kysely; + +const setup = (db?: Kysely) => { + const { sut, ctx } = newMediumService(DuplicateService, { + database: db || defaultDatabase, + real: [ + AccessRepository, + AlbumRepository, + AssetRepository, + ConfigRepository, + DuplicateRepository, + SystemMetadataRepository, + TagRepository, + ], + mock: [EventRepository, JobRepository, LoggingRepository], + }); + + ctx.getMock(EventRepository).emit.mockResolvedValue(); + ctx.getMock(JobRepository).queueAll.mockResolvedValue(); + + return { sut, ctx }; +}; + +const newDuplicateAsset = async ( + ctx: MediumTestContext, + { + ownerId, + duplicateId, + ...dto + }: { ownerId: string; duplicateId?: string; isFavorite?: boolean; visibility?: AssetVisibility }, + exif: { rating?: number; description?: string; latitude?: number; longitude?: number; fileSizeInByte?: number } = {}, +) => { + const { asset } = await ctx.newAsset({ ownerId, duplicateId, ...dto }); + await ctx.newExif({ assetId: asset.id, fileSizeInByte: 1000, ...exif }); + return asset; +}; + +const newTag = async (ctx: MediumTestContext, userId: string, value: string) => { + return ctx.get(TagRepository).create({ userId, value }); +}; + +const expectSuccess = (results: BulkIdResponseDto[], duplicateId: string) => { + expect(results).toEqual([{ id: duplicateId, success: true }]); +}; + +beforeAll(async () => { + defaultDatabase = await getKyselyDB(); +}); + +beforeEach(() => { + clearConfigCache(); +}); + +describe(DuplicateService.name, () => { + describe('getDuplicates', () => { + it('should return an empty list when the user has no duplicates', async () => { + const { sut, ctx } = setup(); + const { user } = await ctx.newUser(); + const auth = factory.auth({ user: { id: user.id } }); + + await expect(sut.getDuplicates(auth)).resolves.toEqual([]); + }); + + it('should return a duplicate group with a suggested keeper', async () => { + const { sut, ctx } = setup(); + const { user } = await ctx.newUser(); + const duplicateId = factory.uuid(); + + const small = await newDuplicateAsset(ctx, { ownerId: user.id, duplicateId }, { fileSizeInByte: 1000 }); + const large = await newDuplicateAsset(ctx, { ownerId: user.id, duplicateId }, { fileSizeInByte: 2000 }); + + const auth = factory.auth({ user: { id: user.id } }); + const duplicates = await sut.getDuplicates(auth); + + expect(duplicates).toHaveLength(1); + expect(duplicates[0].duplicateId).toBe(duplicateId); + expect(duplicates[0].assets.map(({ id }) => id).sort()).toEqual([small.id, large.id].sort()); + // largest file size wins + expect(duplicates[0].suggestedKeepAssetIds).toEqual([large.id]); + }); + + it('should not return duplicates owned by someone else', async () => { + const { sut, ctx } = setup(); + const { user: owner } = await ctx.newUser(); + const { user: other } = await ctx.newUser(); + const duplicateId = factory.uuid(); + + await newDuplicateAsset(ctx, { ownerId: owner.id, duplicateId }); + await newDuplicateAsset(ctx, { ownerId: owner.id, duplicateId }); + + const auth = factory.auth({ user: { id: other.id } }); + await expect(sut.getDuplicates(auth)).resolves.toEqual([]); + }); + + it('should clear the duplicateId of a singleton group', async () => { + const { sut, ctx } = setup(); + const { user } = await ctx.newUser(); + const duplicateId = factory.uuid(); + + const asset = await newDuplicateAsset(ctx, { ownerId: user.id, duplicateId }); + + const auth = factory.auth({ user: { id: user.id } }); + await expect(sut.getDuplicates(auth)).resolves.toEqual([]); + + await expect(ctx.get(AssetRepository).getById(asset.id)).resolves.toMatchObject({ duplicateId: null }); + }); + }); + + describe('resolve', () => { + it('should throw when the duplicate group does not exist', async () => { + const { sut, ctx } = setup(); + const { user } = await ctx.newUser(); + const auth = factory.auth({ user: { id: user.id } }); + + await expect( + sut.resolve(auth, { groups: [{ duplicateId: factory.uuid(), keepAssetIds: [], trashAssetIds: [] }] }), + ).rejects.toThrow('Not found or no duplicate.delete access'); + }); + + it('should throw when the duplicate group belongs to another user', async () => { + const { sut, ctx } = setup(); + const { user: owner } = await ctx.newUser(); + const { user: other } = await ctx.newUser(); + const duplicateId = factory.uuid(); + + const asset1 = await newDuplicateAsset(ctx, { ownerId: owner.id, duplicateId }); + const asset2 = await newDuplicateAsset(ctx, { ownerId: owner.id, duplicateId }); + + const auth = factory.auth({ user: { id: other.id } }); + await expect( + sut.resolve(auth, { groups: [{ duplicateId, keepAssetIds: [asset1.id], trashAssetIds: [asset2.id] }] }), + ).rejects.toThrow('Not found or no duplicate.delete access'); + }); + + it('should clear the duplicateId of the keeper and trash the rest', async () => { + const { sut, ctx } = setup(); + const { user } = await ctx.newUser(); + const duplicateId = factory.uuid(); + + const keeper = await newDuplicateAsset(ctx, { ownerId: user.id, duplicateId }); + const trashed = await newDuplicateAsset(ctx, { ownerId: user.id, duplicateId }); + + const auth = factory.auth({ user: { id: user.id } }); + await expect( + sut.resolve(auth, { groups: [{ duplicateId, keepAssetIds: [keeper.id], trashAssetIds: [trashed.id] }] }), + ).resolves.toEqual([{ id: duplicateId, success: true }]); + + const assetRepo = ctx.get(AssetRepository); + await expect(assetRepo.getById(keeper.id)).resolves.toMatchObject({ + duplicateId: null, + deletedAt: null, + }); + await expect(assetRepo.getById(trashed.id)).resolves.toMatchObject({ + duplicateId: null, + status: AssetStatus.Trashed, + }); + }); + + it('should emit AssetTrashAll for the trashed assets', async () => { + const { sut, ctx } = setup(); + const { user } = await ctx.newUser(); + const duplicateId = factory.uuid(); + + const keeper = await newDuplicateAsset(ctx, { ownerId: user.id, duplicateId }); + const trashed = await newDuplicateAsset(ctx, { ownerId: user.id, duplicateId }); + + const auth = factory.auth({ user: { id: user.id } }); + expectSuccess( + await sut.resolve(auth, { groups: [{ duplicateId, keepAssetIds: [keeper.id], trashAssetIds: [trashed.id] }] }), + duplicateId, + ); + + expect(ctx.getMock(EventRepository).emit).toHaveBeenCalledWith('AssetTrashAll', { + assetIds: [trashed.id], + userId: user.id, + }); + }); + + it('should fail when an asset is in both keepAssetIds and trashAssetIds', async () => { + const { sut, ctx } = setup(); + const { user } = await ctx.newUser(); + const duplicateId = factory.uuid(); + + const asset1 = await newDuplicateAsset(ctx, { ownerId: user.id, duplicateId }); + await newDuplicateAsset(ctx, { ownerId: user.id, duplicateId }); + + const auth = factory.auth({ user: { id: user.id } }); + await expect( + sut.resolve(auth, { groups: [{ duplicateId, keepAssetIds: [asset1.id], trashAssetIds: [asset1.id] }] }), + ).resolves.toEqual([ + { + id: duplicateId, + success: false, + error: BulkIdErrorReason.VALIDATION, + errorMessage: 'An asset cannot be in both keepAssetIds and trashAssetIds', + }, + ]); + }); + + it('should fail when the group is only partially covered', async () => { + const { sut, ctx } = setup(); + const { user } = await ctx.newUser(); + const duplicateId = factory.uuid(); + + const asset1 = await newDuplicateAsset(ctx, { ownerId: user.id, duplicateId }); + const asset2 = await newDuplicateAsset(ctx, { ownerId: user.id, duplicateId }); + await newDuplicateAsset(ctx, { ownerId: user.id, duplicateId }); + + const auth = factory.auth({ user: { id: user.id } }); + await expect( + sut.resolve(auth, { groups: [{ duplicateId, keepAssetIds: [asset1.id], trashAssetIds: [asset2.id] }] }), + ).resolves.toEqual([ + { + id: duplicateId, + success: false, + error: BulkIdErrorReason.VALIDATION, + errorMessage: 'Every asset must be in either keepAssetIds or trashAssetIds', + }, + ]); + }); + + it('should ignore ids that are not members of the group', async () => { + const { sut, ctx } = setup(); + const { user } = await ctx.newUser(); + const duplicateId = factory.uuid(); + + const asset1 = await newDuplicateAsset(ctx, { ownerId: user.id, duplicateId }); + await newDuplicateAsset(ctx, { ownerId: user.id, duplicateId }); + const outsider = await newDuplicateAsset(ctx, { ownerId: user.id }); + + // the outsider is filtered out, which leaves asset2 uncovered + const auth = factory.auth({ user: { id: user.id } }); + await expect( + sut.resolve(auth, { groups: [{ duplicateId, keepAssetIds: [asset1.id], trashAssetIds: [outsider.id] }] }), + ).resolves.toEqual([ + { + id: duplicateId, + success: false, + error: BulkIdErrorReason.VALIDATION, + errorMessage: 'Every asset must be in either keepAssetIds or trashAssetIds', + }, + ]); + + await expect(ctx.get(AssetRepository).getById(outsider.id)).resolves.toMatchObject({ deletedAt: null }); + }); + + it('should trash every asset when no keepers are given', async () => { + const { sut, ctx } = setup(); + const { user } = await ctx.newUser(); + const duplicateId = factory.uuid(); + + const asset1 = await newDuplicateAsset(ctx, { ownerId: user.id, duplicateId }); + const asset2 = await newDuplicateAsset(ctx, { ownerId: user.id, duplicateId }); + + const auth = factory.auth({ user: { id: user.id } }); + await expect( + sut.resolve(auth, { + groups: [{ duplicateId, keepAssetIds: [], trashAssetIds: [asset1.id, asset2.id] }], + }), + ).resolves.toEqual([{ id: duplicateId, success: true }]); + + const assetRepo = ctx.get(AssetRepository); + for (const { id } of [asset1, asset2]) { + await expect(assetRepo.getById(id)).resolves.toMatchObject({ + duplicateId: null, + status: AssetStatus.Trashed, + }); + } + }); + + it('should fail without permission to delete an asset owned by someone else', async () => { + const { sut, ctx } = setup(); + const { user } = await ctx.newUser(); + const { user: other } = await ctx.newUser(); + const duplicateId = factory.uuid(); + + const mine = await newDuplicateAsset(ctx, { ownerId: user.id, duplicateId }); + const theirs = await newDuplicateAsset(ctx, { ownerId: other.id, duplicateId }); + + const auth = factory.auth({ user: { id: user.id } }); + await expect( + sut.resolve(auth, { groups: [{ duplicateId, keepAssetIds: [mine.id], trashAssetIds: [theirs.id] }] }), + ).resolves.toEqual([ + { + id: duplicateId, + success: false, + error: BulkIdErrorReason.NO_PERMISSION, + errorMessage: 'No permission to delete assets', + }, + ]); + + await expect(ctx.get(AssetRepository).getById(theirs.id)).resolves.toMatchObject({ deletedAt: null }); + }); + + it('should resolve several groups in one request', async () => { + const { sut, ctx } = setup(); + const { user } = await ctx.newUser(); + const duplicateId1 = factory.uuid(); + const duplicateId2 = factory.uuid(); + + const keeper1 = await newDuplicateAsset(ctx, { ownerId: user.id, duplicateId: duplicateId1 }); + const trashed1 = await newDuplicateAsset(ctx, { ownerId: user.id, duplicateId: duplicateId1 }); + const keeper2 = await newDuplicateAsset(ctx, { ownerId: user.id, duplicateId: duplicateId2 }); + const trashed2 = await newDuplicateAsset(ctx, { ownerId: user.id, duplicateId: duplicateId2 }); + + const auth = factory.auth({ user: { id: user.id } }); + await expect( + sut.resolve(auth, { + groups: [ + { duplicateId: duplicateId1, keepAssetIds: [keeper1.id], trashAssetIds: [trashed1.id] }, + { duplicateId: duplicateId2, keepAssetIds: [keeper2.id], trashAssetIds: [trashed2.id] }, + ], + }), + ).resolves.toEqual([ + { id: duplicateId1, success: true }, + { id: duplicateId2, success: true }, + ]); + + const assetRepo = ctx.get(AssetRepository); + await expect(assetRepo.getById(trashed1.id)).resolves.toMatchObject({ status: AssetStatus.Trashed }); + await expect(assetRepo.getById(trashed2.id)).resolves.toMatchObject({ status: AssetStatus.Trashed }); + }); + + it('should report per-group failures without abandoning the valid groups', async () => { + const { sut, ctx } = setup(); + const { user } = await ctx.newUser(); + const goodId = factory.uuid(); + const badId = factory.uuid(); + + const keeper = await newDuplicateAsset(ctx, { ownerId: user.id, duplicateId: goodId }); + const trashed = await newDuplicateAsset(ctx, { ownerId: user.id, duplicateId: goodId }); + // the bad group exists (so access passes) but is left partially covered + const badKeeper = await newDuplicateAsset(ctx, { ownerId: user.id, duplicateId: badId }); + await newDuplicateAsset(ctx, { ownerId: user.id, duplicateId: badId }); + + const auth = factory.auth({ user: { id: user.id } }); + const results = await sut.resolve(auth, { + groups: [ + { duplicateId: goodId, keepAssetIds: [keeper.id], trashAssetIds: [trashed.id] }, + { duplicateId: badId, keepAssetIds: [badKeeper.id], trashAssetIds: [] }, + ], + }); + + expect(results).toEqual([ + { id: goodId, success: true }, + { + id: badId, + success: false, + error: BulkIdErrorReason.VALIDATION, + errorMessage: 'Every asset must be in either keepAssetIds or trashAssetIds', + }, + ]); + + // the good group still went through + await expect(ctx.get(AssetRepository).getById(trashed.id)).resolves.toMatchObject({ + status: AssetStatus.Trashed, + }); + }); + + describe('metadata merging', () => { + it('should merge isFavorite into the keeper', async () => { + const { sut, ctx } = setup(); + const { user } = await ctx.newUser(); + const duplicateId = factory.uuid(); + + const keeper = await newDuplicateAsset(ctx, { ownerId: user.id, duplicateId, isFavorite: false }); + const trashed = await newDuplicateAsset(ctx, { ownerId: user.id, duplicateId, isFavorite: true }); + + const auth = factory.auth({ user: { id: user.id } }); + expectSuccess( + await sut.resolve(auth, { + groups: [{ duplicateId, keepAssetIds: [keeper.id], trashAssetIds: [trashed.id] }], + }), + duplicateId, + ); + + await expect(ctx.get(AssetRepository).getById(keeper.id)).resolves.toMatchObject({ + isFavorite: true, + duplicateId: null, + }); + }); + + it('should merge the most restrictive visibility into the keeper', async () => { + const { sut, ctx } = setup(); + const { user } = await ctx.newUser(); + const duplicateId = factory.uuid(); + + const keeperAsset = await newDuplicateAsset(ctx, { + ownerId: user.id, + duplicateId, + visibility: AssetVisibility.Timeline, + }); + const trashedAsset = await newDuplicateAsset(ctx, { + ownerId: user.id, + duplicateId, + visibility: AssetVisibility.Archive, + }); + + const auth = factory.auth({ user: { id: user.id } }); + expectSuccess( + await sut.resolve(auth, { + groups: [{ duplicateId, keepAssetIds: [keeperAsset.id], trashAssetIds: [trashedAsset.id] }], + }), + duplicateId, + ); + + await expect(ctx.get(AssetRepository).getById(keeperAsset.id)).resolves.toMatchObject({ + visibility: AssetVisibility.Archive, + duplicateId: null, + }); + }); + + it('should merge the highest rating into the keeper', async () => { + const { sut, ctx } = setup(); + const { user } = await ctx.newUser(); + const duplicateId = factory.uuid(); + + const keeper = await newDuplicateAsset(ctx, { ownerId: user.id, duplicateId }, { rating: 1 }); + const trashed = await newDuplicateAsset(ctx, { ownerId: user.id, duplicateId }, { rating: 5 }); + + const auth = factory.auth({ user: { id: user.id } }); + expectSuccess( + await sut.resolve(auth, { + groups: [{ duplicateId, keepAssetIds: [keeper.id], trashAssetIds: [trashed.id] }], + }), + duplicateId, + ); + + const result = await ctx.get(AssetRepository).getById(keeper.id, { exifInfo: true }); + expect(result?.exifInfo).toMatchObject({ rating: 5 }); + }); + + it('should merge distinct description lines into the keeper', async () => { + const { sut, ctx } = setup(); + const { user } = await ctx.newUser(); + const duplicateId = factory.uuid(); + + const keeper = await newDuplicateAsset(ctx, { ownerId: user.id, duplicateId }, { description: 'from keeper' }); + const trashed = await newDuplicateAsset( + ctx, + { ownerId: user.id, duplicateId }, + { description: 'from trashed' }, + ); + + const auth = factory.auth({ user: { id: user.id } }); + expectSuccess( + await sut.resolve(auth, { + groups: [{ duplicateId, keepAssetIds: [keeper.id], trashAssetIds: [trashed.id] }], + }), + duplicateId, + ); + + const result = await ctx.get(AssetRepository).getById(keeper.id, { exifInfo: true }); + expect(result?.exifInfo?.description?.split('\n').sort()).toEqual(['from keeper', 'from trashed']); + }); + + it('should merge a location that both assets agree on', async () => { + const { sut, ctx } = setup(); + const { user } = await ctx.newUser(); + const duplicateId = factory.uuid(); + + const keeper = await newDuplicateAsset(ctx, { ownerId: user.id, duplicateId }); + const trashed = await newDuplicateAsset( + ctx, + { ownerId: user.id, duplicateId }, + { latitude: 40.7128, longitude: -74.006 }, + ); + + const auth = factory.auth({ user: { id: user.id } }); + expectSuccess( + await sut.resolve(auth, { + groups: [{ duplicateId, keepAssetIds: [keeper.id], trashAssetIds: [trashed.id] }], + }), + duplicateId, + ); + + const result = await ctx.get(AssetRepository).getById(keeper.id, { exifInfo: true }); + expect(result?.exifInfo).toMatchObject({ latitude: 40.7128, longitude: -74.006 }); + }); + + it('should not merge a location the assets disagree on', async () => { + const { sut, ctx } = setup(); + const { user } = await ctx.newUser(); + const duplicateId = factory.uuid(); + + const keeper = await newDuplicateAsset(ctx, { ownerId: user.id, duplicateId }, { latitude: 1, longitude: 1 }); + const trashed = await newDuplicateAsset(ctx, { ownerId: user.id, duplicateId }, { latitude: 2, longitude: 2 }); + + const auth = factory.auth({ user: { id: user.id } }); + expectSuccess( + await sut.resolve(auth, { + groups: [{ duplicateId, keepAssetIds: [keeper.id], trashAssetIds: [trashed.id] }], + }), + duplicateId, + ); + + const result = await ctx.get(AssetRepository).getById(keeper.id, { exifInfo: true }); + expect(result?.exifInfo).toMatchObject({ latitude: 1, longitude: 1 }); + }); + + it('should add the keeper to every album the group belonged to', async () => { + const { sut, ctx } = setup(); + const { user } = await ctx.newUser(); + const duplicateId = factory.uuid(); + + const keeper = await newDuplicateAsset(ctx, { ownerId: user.id, duplicateId }); + const trashed = await newDuplicateAsset(ctx, { ownerId: user.id, duplicateId }); + + const { album: album1 } = await ctx.newAlbum({ ownerId: user.id }, [keeper.id]); + const { album: album2 } = await ctx.newAlbum({ ownerId: user.id }, [trashed.id]); + + const auth = factory.auth({ user: { id: user.id } }); + expectSuccess( + await sut.resolve(auth, { + groups: [{ duplicateId, keepAssetIds: [keeper.id], trashAssetIds: [trashed.id] }], + }), + duplicateId, + ); + + const albumRepo = ctx.get(AlbumRepository); + await expect(albumRepo.getAssetIds(album1.id, [keeper.id])).resolves.toEqual(new Set([keeper.id])); + await expect(albumRepo.getAssetIds(album2.id, [keeper.id])).resolves.toEqual(new Set([keeper.id])); + }); + + it('should merge the tags of the group onto the keeper', async () => { + const { sut, ctx } = setup(); + const { user } = await ctx.newUser(); + const duplicateId = factory.uuid(); + + const keeper = await newDuplicateAsset(ctx, { ownerId: user.id, duplicateId }); + const trashed = await newDuplicateAsset(ctx, { ownerId: user.id, duplicateId }); + + const tag1 = await newTag(ctx, user.id, 'tag1'); + const tag2 = await newTag(ctx, user.id, 'tag2'); + await ctx.newTagAsset({ tagIds: [tag1.id], assetIds: [keeper.id] }); + await ctx.newTagAsset({ tagIds: [tag2.id], assetIds: [trashed.id] }); + + const auth = factory.auth({ user: { id: user.id } }); + expectSuccess( + await sut.resolve(auth, { + groups: [{ duplicateId, keepAssetIds: [keeper.id], trashAssetIds: [trashed.id] }], + }), + duplicateId, + ); + + const result = await ctx.get(AssetRepository).getById(keeper.id, { tags: true }); + expect(result?.tags?.map(({ id }) => id).sort()).toEqual([tag1.id, tag2.id].sort()); + }); + + it('should not merge metadata when there is more than one keeper', async () => { + const { sut, ctx } = setup(); + const { user } = await ctx.newUser(); + const duplicateId = factory.uuid(); + + const keeper1 = await newDuplicateAsset(ctx, { ownerId: user.id, duplicateId, isFavorite: false }); + const keeper2 = await newDuplicateAsset(ctx, { ownerId: user.id, duplicateId, isFavorite: true }); + + const auth = factory.auth({ user: { id: user.id } }); + await expect( + sut.resolve(auth, { + groups: [{ duplicateId, keepAssetIds: [keeper1.id, keeper2.id], trashAssetIds: [] }], + }), + ).resolves.toEqual([{ id: duplicateId, success: true }]); + + await expect(ctx.get(AssetRepository).getById(keeper1.id)).resolves.toMatchObject({ + isFavorite: false, + duplicateId: null, + }); + }); + }); + + describe('when trash is disabled', () => { + it('should delete instead of trash', async () => { + const { sut, ctx } = setup(); + const { user } = await ctx.newUser(); + const duplicateId = factory.uuid(); + + const keeper = await newDuplicateAsset(ctx, { ownerId: user.id, duplicateId }); + const trashed = await newDuplicateAsset(ctx, { ownerId: user.id, duplicateId }); + + const config = await ctx.getConfig(); + await ctx.updateConfig({ ...config, trash: { ...config.trash, enabled: false } }); + clearConfigCache(); + + const auth = factory.auth({ user: { id: user.id } }); + await expect( + sut.resolve(auth, { groups: [{ duplicateId, keepAssetIds: [keeper.id], trashAssetIds: [trashed.id] }] }), + ).resolves.toEqual([{ id: duplicateId, success: true }]); + + await expect(ctx.get(AssetRepository).getById(trashed.id)).resolves.toMatchObject({ + duplicateId: null, + status: AssetStatus.Deleted, + }); + + expect(ctx.getMock(EventRepository).emit).toHaveBeenCalledWith('AssetDeleteAll', { + assetIds: [trashed.id], + userId: user.id, + }); + }); + }); + }); +}); diff --git a/server/test/medium/specs/services/integrity.service.spec.ts b/server/test/medium/specs/services/integrity.service.spec.ts index db0f6f3ff2..919b009479 100644 --- a/server/test/medium/specs/services/integrity.service.spec.ts +++ b/server/test/medium/specs/services/integrity.service.spec.ts @@ -1,9 +1,10 @@ import { Kysely } from 'kysely'; +import { DateTime } from 'luxon'; import { createHash, randomUUID } from 'node:crypto'; import { Readable } from 'node:stream'; import { text } from 'node:stream/consumers'; import { StorageCore } from 'src/cores/storage.core'; -import { AssetFileType, IntegrityReport, JobName, JobStatus } from 'src/enum'; +import { AssetFileType, IntegrityReport, JobName, JobStatus, SystemMetadataKey } from 'src/enum'; import { AssetRepository } from 'src/repositories/asset.repository'; import { ConfigRepository } from 'src/repositories/config.repository'; import { EventRepository } from 'src/repositories/event.repository'; @@ -407,7 +408,7 @@ describe(IntegrityService.name, () => { } = await ctx.newAsset({ ownerId, originalPath: '/path/to/file2' }); const { id: reportId } = await ctx.get(IntegrityRepository).create({ - type: IntegrityReport.UntrackedFile, + type: IntegrityReport.MissingFile, path: '/path/to/file2', assetId: assetId2, }); @@ -702,6 +703,30 @@ describe(IntegrityService.name, () => { ctx.get(IntegrityRepository).getIntegrityReport({ limit: 100 }, IntegrityReport.ChecksumFail), ).resolves.toEqual({ items: [], nextCursor: undefined }); }); + + it('should continue from checkpoint', async () => { + const { sut, ctx } = setup(); + const job = ctx.getMock(JobRepository); + job.queue.mockResolvedValue(); + + const { user } = await ctx.newUser(); + + await ctx.newAsset({ + ownerId: user.id, + createdAt: DateTime.now().minus({ days: 1 }).toISO(), + originalPath: '/foo/bar', + }); + await ctx.newAsset({ ownerId: user.id, originalPath: '/foo/baz' }); + + await ctx + .get(SystemMetadataRepository) + .set(SystemMetadataKey.IntegrityChecksumCheckpoint, { date: DateTime.now().minus({ minutes: 5 }).toISO() }); + + await sut.handleChecksumFiles({ refreshOnly: false }); + + expect(ctx.getMock(StorageRepository).createPlainReadStream).not.toHaveBeenCalledWith('/foo/bar'); + expect(ctx.getMock(StorageRepository).createPlainReadStream).toHaveBeenCalledWith('/foo/baz'); + }); }); describe('handleChecksumRefresh', () => { diff --git a/server/test/medium/specs/services/metadata.service.spec.ts b/server/test/medium/specs/services/metadata.service.spec.ts index 6dc66e3ed5..37603520f7 100644 --- a/server/test/medium/specs/services/metadata.service.spec.ts +++ b/server/test/medium/specs/services/metadata.service.spec.ts @@ -152,4 +152,23 @@ describe(MetadataService.name, () => { ).resolves.toEqual({ dateTimeOriginal: new Date('4260-03-05T04:04:12.000Z') }); }); }); + + it('should handle float lens models (#30492)', async () => { + const { sut, ctx } = setup(); + ctx.getMock(EventRepository).emit.mockResolvedValue(); + const { filePath } = await createTestFile({ LensModel: 1.8 }); + const { user } = await ctx.newUser(); + const { asset } = await ctx.newAsset({ originalPath: filePath, ownerId: user.id }); + await ctx.newExif({ assetId: asset.id, description: '' }); + + await sut.handleMetadataExtraction({ id: asset.id }); + + await expect( + ctx.database + .selectFrom('asset_exif') + .where('assetId', '=', asset.id) + .select('lensModel') + .executeTakeFirstOrThrow(), + ).resolves.toEqual({ lensModel: '1.8' }); + }); }); diff --git a/server/test/medium/specs/services/search.service.spec.ts b/server/test/medium/specs/services/search.service.spec.ts index 18e03b2e48..044cd8d4f5 100644 --- a/server/test/medium/specs/services/search.service.spec.ts +++ b/server/test/medium/specs/services/search.service.spec.ts @@ -1,5 +1,6 @@ import { Kysely } from 'kysely'; import { SearchSuggestionType } from 'src/dtos/search.dto'; +import { AlbumUserRole, AssetVisibility } from 'src/enum'; import { AccessRepository } from 'src/repositories/access.repository'; import { AssetRepository } from 'src/repositories/asset.repository'; import { DatabaseRepository } from 'src/repositories/database.repository'; @@ -88,6 +89,22 @@ describe(SearchService.name, () => { expect(result).toEqual({ total: 0 }); }); + + it('should not return locked assets of partner in elevated session', async () => { + const { sut, ctx } = setup(); + const { user } = await ctx.newUser(); + const { user: partner } = await ctx.newUser(); + + await ctx.newPartner({ sharedById: partner.id, sharedWithId: user.id }); + + await ctx.newAsset({ ownerId: partner.id, visibility: AssetVisibility.Locked }); + + const auth = factory.auth({ user: { id: user.id }, session: { hasElevatedPermission: true } }); + + const result = await sut.searchStatistics(auth, { visibility: AssetVisibility.Locked }); + + expect(result).toEqual({ total: 0 }); + }); }); describe('withStacked option', () => { @@ -108,6 +125,71 @@ describe(SearchService.name, () => { expect(response.assets.items.length).toBe(1); expect(response.assets.items[0].id).toBe(unstackedAsset.id); }); + + describe('visibility', () => { + it('should filter out locked assets in a default session', async () => { + const { sut, ctx } = setup(); + const { user } = await ctx.newUser(); + + await ctx.newAsset({ ownerId: user.id, visibility: AssetVisibility.Locked }); + + const auth = factory.auth({ user: { id: user.id } }); + + const response = await sut.searchMetadata(auth, { withStacked: false }); + + expect(response.assets.items.length).toBe(0); + }); + + it('should return locked assets in an elevated session', async () => { + const { sut, ctx } = setup(); + const { user } = await ctx.newUser(); + + await ctx.newAsset({ ownerId: user.id, visibility: AssetVisibility.Locked }); + + const auth = factory.auth({ user: { id: user.id }, session: { hasElevatedPermission: true } }); + + const response = await sut.searchMetadata(auth, { withStacked: false }); + + expect(response.assets.items.length).toBe(1); + }); + }); + }); + + describe('albumIds option', () => { + it('should return assets from shared album', async () => { + const { sut, ctx } = setup(); + const { user } = await ctx.newUser(); + const { user: otherUser } = await ctx.newUser(); + + const { asset } = await ctx.newAsset({ ownerId: otherUser.id }); + const { album } = await ctx.newAlbum({ ownerId: otherUser.id }); + await ctx.newAlbumAsset({ albumId: album.id, assetId: asset.id }); + await ctx.newAlbumUser({ albumId: album.id, userId: user.id, role: AlbumUserRole.Editor }); + + const auth = factory.auth({ user: { id: user.id } }); + + const response = await sut.searchMetadata(auth, { albumIds: [album.id] }); + + expect(response.assets.items.length).toBe(1); + }); + + it('should not return assets for album, a user is not in, when partner sharing is enabled', async () => { + const { sut, ctx } = setup(); + const { user } = await ctx.newUser(); + const { user: otherUser } = await ctx.newUser(); + + await ctx.newPartner({ sharedById: otherUser.id, sharedWithId: user.id }); + + const { asset } = await ctx.newAsset({ ownerId: otherUser.id }); + const { album } = await ctx.newAlbum({ ownerId: otherUser.id }); + await ctx.newAlbumAsset({ albumId: album.id, assetId: asset.id }); + + const auth = factory.auth({ user: { id: user.id } }); + + await expect(sut.searchMetadata(auth, { albumIds: [album.id] })).rejects.toThrow( + 'Not found or no album.read access', + ); + }); }); describe('getSearchSuggestions', () => { @@ -130,4 +212,19 @@ describe(SearchService.name, () => { expect(suggestions).toEqual(['Canon', null]); }); }); + + describe('searchRandom', () => { + it('should filter out locked assets in a default session', async () => { + const { sut, ctx } = setup(); + const { user } = await ctx.newUser(); + + await ctx.newAsset({ ownerId: user.id, visibility: AssetVisibility.Locked }); + + const auth = factory.auth({ user: { id: user.id } }); + + const response = await sut.searchRandom(auth, {}); + + expect(response.length).toBe(0); + }); + }); }); diff --git a/server/test/medium/specs/services/timeline.service.spec.ts b/server/test/medium/specs/services/timeline.service.spec.ts index d7013b84be..032305c262 100644 --- a/server/test/medium/specs/services/timeline.service.spec.ts +++ b/server/test/medium/specs/services/timeline.service.spec.ts @@ -87,6 +87,18 @@ describe(TimelineService.name, () => { ); }); + it('should return error if time bucket is requested with locked visibility for partner', async () => { + const { sut, ctx } = setup(); + const { user } = await ctx.newUser(); + const { user: partner } = await ctx.newUser(); + await ctx.newPartner({ sharedById: partner.id, sharedWithId: user.id }); + + const auth = factory.auth({ user, session: { hasElevatedPermission: true } }); + + const response = sut.getTimeBuckets(auth, { userId: partner.id, visibility: AssetVisibility.Locked }); + await expect(response).rejects.toThrow("You may not access another user's locked timeline"); + }); + it('should not allow access for unrelated shared links', async () => { const { sut } = setup(); const auth = factory.auth({ sharedLink: {} }); @@ -172,6 +184,7 @@ describe(TimelineService.name, () => { await ctx.newExif({ assetId: result.asset.id, make: 'Canon' }); return result; }), + ctx.newUser().then(async ({ user }) => { const result = await ctx.newAsset({ ownerId: user.id, diff --git a/server/test/medium/specs/services/user.service.spec.ts b/server/test/medium/specs/services/user.service.spec.ts index c8c990a8da..85ab9a8c0d 100644 --- a/server/test/medium/specs/services/user.service.spec.ts +++ b/server/test/medium/specs/services/user.service.spec.ts @@ -1,6 +1,6 @@ import { Kysely } from 'kysely'; import { DateTime } from 'luxon'; -import { ImmichEnvironment, JobName, JobStatus } from 'src/enum'; +import { ImmichEnvironment, JobName, JobStatus, UserAvatarColor } from 'src/enum'; import { ConfigRepository } from 'src/repositories/config.repository'; import { CryptoRepository } from 'src/repositories/crypto.repository'; import { EventRepository } from 'src/repositories/event.repository'; @@ -10,10 +10,17 @@ import { SystemMetadataRepository } from 'src/repositories/system-metadata.repos import { UserRepository } from 'src/repositories/user.repository'; import { DB } from 'src/schema'; import { UserService } from 'src/services/user.service'; +import { HumanReadableSize } from 'src/utils/bytes'; import { mediumFactory, newMediumService } from 'test/medium.factory'; import { factory } from 'test/small.factory'; import { getKyselyDB } from 'test/utils'; +const userLicense = { + licenseKey: 'IMCL-FF69-TUK1-RWZU-V9Q8-QGQS-S5GC-X4R2-UFK4', + activationKey: + 'KuX8KsktrBSiXpQMAH0zLgA5SpijXVr_PDkzLdWUlAogCTMBZ0I3KCHXK0eE9EEd7harxup8_EHMeqAWeHo5VQzol6LGECpFv585U9asXD4Zc-UXt3mhJr2uhazqipBIBwJA2YhmUCDy8hiyiGsukDQNu9Rg9C77UeoKuZBWVjWUBWG0mc1iRqfvF0faVM20w53czAzlhaMxzVGc3Oimbd7xi_CAMSujF_2y8QpA3X2fOVkQkzdcH9lV0COejl7IyH27zQQ9HrlrXv3Lai5Hw67kNkaSjmunVBxC5PS0TpKoc9SfBJMaAGWnaDbjhjYUrm-8nIDQnoeEAidDXVAdPw', +}; + let defaultDatabase: Kysely; const setup = (db?: Kysely) => { @@ -38,9 +45,10 @@ describe(UserService.name, () => { const { sut, ctx } = setup(); ctx.getMock(EventRepository).emit.mockResolvedValue(); const user = mediumFactory.userInsert(); - await expect(sut.createUser({ name: user.name, email: user.email })).resolves.toEqual( - expect.objectContaining({ name: user.name, email: user.email }), - ); + const created = await sut.createUser({ name: user.name, email: user.email }); + expect(created).toEqual(expect.objectContaining({ name: user.name, email: user.email })); + + await expect(sut.get(created.id)).resolves.toMatchObject({ name: user.name, email: user.email }); }); it('should reject user with duplicate email', async () => { @@ -97,6 +105,38 @@ describe(UserService.name, () => { expect((result as any).password).toBeUndefined(); }); + + it('should not expose private fields', async () => { + const { sut, ctx } = setup(); + const { user } = await ctx.newUser(); + + await expect(sut.get(user.id)).resolves.not.toMatchObject({ + shouldChangePassword: expect.anything(), + storageLabel: expect.anything(), + }); + }); + }); + + describe('getMe', () => { + it('should get my user', async () => { + const { sut, ctx } = setup(); + const { user } = await ctx.newUser(); + const auth = factory.auth({ user }); + + await expect(sut.getMe(auth)).resolves.toEqual( + expect.objectContaining({ id: user.id, email: user.email, quotaUsageInBytes: 0 }), + ); + }); + + it('should include license info', async () => { + const { sut, ctx } = setup(); + const { user } = await ctx.newUser(); + const auth = factory.auth({ user: { id: user.id } }); + + await sut.setLicense(auth, userLicense); + + await expect(sut.getMe(auth)).resolves.toMatchObject({ license: userLicense }); + }); }); describe('updateMe', () => { @@ -109,25 +149,169 @@ describe(UserService.name, () => { expect(before.updatedAt).toBeDefined(); expect(after.updatedAt).toBeDefined(); expect(before.updatedAt).not.toEqual(after.updatedAt); + + await expect(sut.getMe(auth)).resolves.toMatchObject({ + name: `${before.name} Updated`, + updatedAt: after.updatedAt, + }); + }); + + it('should update the name', async () => { + const { sut, ctx } = setup(); + const { user } = await ctx.newUser(); + const auth = factory.auth({ user: { id: user.id } }); + + const dto = { name: 'Name' }; + + await expect(sut.updateMe(auth, dto)).resolves.toMatchObject(dto); + await expect(sut.getMe(auth)).resolves.toMatchObject(dto); + }); + + it('should update the email', async () => { + const { sut, ctx } = setup(); + const { user } = await ctx.newUser(); + const auth = factory.auth({ user: { id: user.id } }); + + const dto = { email: 'updated@immich.cloud' }; + + await expect(sut.updateMe(auth, dto)).resolves.toMatchObject(dto); + await expect(sut.getMe(auth)).resolves.toMatchObject(dto); + }); + + it('should not allow an email that is already taken', async () => { + const { sut, ctx } = setup(); + const { user: user1 } = await ctx.newUser(); + const { user: user2 } = await ctx.newUser(); + const auth = factory.auth({ user: { id: user2.id } }); + + await expect(sut.updateMe(auth, { email: user1.email })).rejects.toThrow('Email is not available'); + }); + + it('should update the avatar color', async () => { + const { sut, ctx } = setup(); + const { user } = await ctx.newUser(); + const auth = factory.auth({ user: { id: user.id } }); + + const dto = { avatarColor: UserAvatarColor.Blue }; + + await expect(sut.updateMe(auth, dto)).resolves.toMatchObject(dto); + await expect(sut.getMe(auth)).resolves.toMatchObject(dto); + }); + + it('should clear shouldChangePassword when the password is updated', async () => { + const { sut, ctx } = setup(); + const { user } = await ctx.newUser({ shouldChangePassword: true }); + const auth = factory.auth({ user: { id: user.id } }); + + await expect(sut.updateMe(auth, { password: 'super-secret' })).resolves.toMatchObject({ + shouldChangePassword: false, + }); + await expect(sut.getMe(auth)).resolves.toMatchObject({ shouldChangePassword: false }); + }); + }); + + describe('updateMyPreferences', () => { + it('should update memories enabled', async () => { + const { sut, ctx } = setup(); + const { user } = await ctx.newUser(); + const auth = factory.auth({ user: { id: user.id } }); + + const dto = { memories: { enabled: false } }; + + await expect(sut.getMyPreferences(auth)).resolves.toMatchObject({ memories: { enabled: true } }); + await expect(sut.updateMyPreferences(auth, dto)).resolves.toMatchObject(dto); + await expect(sut.getMyPreferences(auth)).resolves.toMatchObject(dto); + }); + + it('should update the download archive size', async () => { + const { sut, ctx } = setup(); + const { user } = await ctx.newUser(); + const auth = factory.auth({ user: { id: user.id } }); + + const dto = { download: { archiveSize: 1_234_567 } }; + + await expect(sut.getMyPreferences(auth)).resolves.toMatchObject({ + download: { archiveSize: 4 * HumanReadableSize.GiB }, + }); + await expect(sut.updateMyPreferences(auth, dto)).resolves.toMatchObject(dto); + await expect(sut.getMyPreferences(auth)).resolves.toMatchObject(dto); + }); + + it('should update download include embedded videos', async () => { + const { sut, ctx } = setup(); + const { user } = await ctx.newUser(); + const auth = factory.auth({ user: { id: user.id } }); + + const dto = { download: { includeEmbeddedVideos: true } }; + + await expect(sut.getMyPreferences(auth)).resolves.toMatchObject({ + download: { includeEmbeddedVideos: false }, + }); + await expect(sut.updateMyPreferences(auth, dto)).resolves.toMatchObject(dto); + await expect(sut.getMyPreferences(auth)).resolves.toMatchObject(dto); + }); + + it('should update the minimum face count', async () => { + const { sut, ctx } = setup(); + const { user } = await ctx.newUser(); + const auth = factory.auth({ user: { id: user.id } }); + + const dto = { people: { minimumFaces: 2 } }; + + await expect(sut.getMyPreferences(auth)).resolves.toMatchObject({ people: { minimumFaces: 3 } }); + await expect(sut.updateMyPreferences(auth, dto)).resolves.toMatchObject(dto); + await expect(sut.getMyPreferences(auth)).resolves.toMatchObject(dto); }); }); describe('setLicense', () => { it('should set a license', async () => { - const license = { - licenseKey: 'IMCL-FF69-TUK1-RWZU-V9Q8-QGQS-S5GC-X4R2-UFK4', - activationKey: - 'KuX8KsktrBSiXpQMAH0zLgA5SpijXVr_PDkzLdWUlAogCTMBZ0I3KCHXK0eE9EEd7harxup8_EHMeqAWeHo5VQzol6LGECpFv585U9asXD4Zc-UXt3mhJr2uhazqipBIBwJA2YhmUCDy8hiyiGsukDQNu9Rg9C77UeoKuZBWVjWUBWG0mc1iRqfvF0faVM20w53czAzlhaMxzVGc3Oimbd7xi_CAMSujF_2y8QpA3X2fOVkQkzdcH9lV0COejl7IyH27zQQ9HrlrXv3Lai5Hw67kNkaSjmunVBxC5PS0TpKoc9SfBJMaAGWnaDbjhjYUrm-8nIDQnoeEAidDXVAdPw', - }; const { sut, ctx } = setup(); const { user } = await ctx.newUser(); const auth = factory.auth({ user: { id: user.id } }); await expect(sut.getLicense(auth)).rejects.toThrowError(); - const after = await sut.setLicense(auth, license); - expect(after.licenseKey).toEqual(license.licenseKey); - expect(after.activationKey).toEqual(license.activationKey); - const getResponse = await sut.getLicense(auth); - expect(getResponse).toEqual(after); + const after = await sut.setLicense(auth, userLicense); + expect(after.licenseKey).toEqual(userLicense.licenseKey); + expect(after.activationKey).toEqual(userLicense.activationKey); + const response = await sut.getLicense(auth); + expect(response).toEqual(after); + await expect(sut.getMe(auth)).resolves.toMatchObject({ license: after }); + }); + + it('should reject a license key that does not start with IMCL-', async () => { + const { sut, ctx } = setup(); + const { user } = await ctx.newUser(); + const auth = factory.auth({ user: { id: user.id } }); + + await expect( + sut.setLicense(auth, { + licenseKey: 'IMSV-ABCD-ABCD-ABCD-ABCD-ABCD-ABCD-ABCD-ABCD', + activationKey: 'activationKey', + }), + ).rejects.toThrow('Invalid license key'); + }); + + it('should reject an invalid activation key', async () => { + const { sut, ctx } = setup(); + const { user } = await ctx.newUser(); + const auth = factory.auth({ user: { id: user.id } }); + + await expect( + sut.setLicense(auth, { ...userLicense, activationKey: `invalid${userLicense.activationKey}` }), + ).rejects.toThrow('Invalid license key'); + }); + }); + + describe('deleteLicense', () => { + it('should delete the license', async () => { + const { sut, ctx } = setup(); + const { user } = await ctx.newUser(); + const auth = factory.auth({ user: { id: user.id } }); + + await sut.setLicense(auth, userLicense); + await sut.deleteLicense(auth); + + await expect(sut.getLicense(auth)).rejects.toThrowError(); }); }); diff --git a/server/test/medium/specs/sync/sync-album-to-asset.spec.ts b/server/test/medium/specs/sync/sync-album-to-asset.spec.ts index a0802abe73..0fd58c527c 100644 --- a/server/test/medium/specs/sync/sync-album-to-asset.spec.ts +++ b/server/test/medium/specs/sync/sync-album-to-asset.spec.ts @@ -161,12 +161,14 @@ describe(SyncRequestType.AlbumToAssetsV1, () => { // backfill needs assets with an older updateId const { asset: sharedAsset1 } = await ctx.newAsset({ ownerId: user2.id }); + await wait(2); const { asset: sharedAsset2 } = await ctx.newAsset({ ownerId: user2.id }); await wait(2); const { album: sharedAlbum } = await ctx.newAlbum({ ownerId: user2.id }); await ctx.newAlbumAsset({ albumId: sharedAlbum.id, assetId: sharedAsset1.id }); + await wait(2); await ctx.newAlbumAsset({ albumId: sharedAlbum.id, assetId: sharedAsset2.id }); await wait(2); diff --git a/server/test/medium/specs/sync/sync-types.spec.ts b/server/test/medium/specs/sync/sync-types.spec.ts index 737db068ba..24eadf70c8 100644 --- a/server/test/medium/specs/sync/sync-types.spec.ts +++ b/server/test/medium/specs/sync/sync-types.spec.ts @@ -4,7 +4,7 @@ import { SYNC_TYPES_ORDER } from 'src/services/sync.service'; describe('types', () => { it('should have all the types in the ordering variable', () => { for (const key in SyncRequestType) { - expect(SYNC_TYPES_ORDER).includes(key); + expect(SYNC_TYPES_ORDER.includes(key as SyncRequestType)).toBe(true); } expect(SYNC_TYPES_ORDER.length).toBe(Object.keys(SyncRequestType).length); diff --git a/server/test/medium/specs/workflow/workflow-core-plugin.spec.ts b/server/test/medium/specs/workflow/workflow-core-plugin.spec.ts index 970ed4f222..dfb4868c0d 100644 --- a/server/test/medium/specs/workflow/workflow-core-plugin.spec.ts +++ b/server/test/medium/specs/workflow/workflow-core-plugin.spec.ts @@ -9,6 +9,7 @@ import { AssetRepository } from 'src/repositories/asset.repository'; import { ConfigRepository } from 'src/repositories/config.repository'; import { CryptoRepository } from 'src/repositories/crypto.repository'; import { DatabaseRepository } from 'src/repositories/database.repository'; +import { EventRepository } from 'src/repositories/event.repository'; import { LoggingRepository } from 'src/repositories/logging.repository'; import { PluginRepository } from 'src/repositories/plugin.repository'; import { StorageRepository } from 'src/repositories/storage.repository'; @@ -21,9 +22,9 @@ import { MediumTestContext } from 'test/medium.factory'; import { mockEnvData } from 'test/repositories/config.repository.mock'; import { getKyselyDB } from 'test/utils'; -let initialized = false; +let isInitialized = false; -class WorkflowTestContext extends MediumTestContext { +class WorkflowTestContext extends MediumTestContext { constructor(database: Kysely) { super(WorkflowExecutionService, { database, @@ -39,12 +40,12 @@ class WorkflowTestContext extends MediumTestContext { UserRepository, WorkflowRepository, ], - mock: [ConfigRepository], + mock: [ConfigRepository, EventRepository], }); } async init() { - if (initialized) { + if (isInitialized) { return; } @@ -52,12 +53,13 @@ class WorkflowTestContext extends MediumTestContext { mockData.resourcePaths.corePlugin = '../packages/plugin-core'; mockData.plugins.external.allow = false; this.getMock(ConfigRepository).getEnv.mockReturnValue(mockData); + this.getMock(EventRepository).emit.mockResolvedValue(); this.get(LoggingRepository).setLogLevel(LogLevel.Verbose); await this.sut.onPluginSync(); await this.sut.onPluginLoad(); - initialized = true; + isInitialized = true; } } @@ -337,7 +339,7 @@ describe('core plugin', () => { it('should favorite an asset within a given radius', async () => { const { user } = await ctx.newUser(); const { asset } = await ctx.newAsset({ ownerId: user.id }); - await ctx.newExif({ assetId: asset.id, latitude: 49.273_353_221_145_36, longitude: -123.103_871_440_787_64 }); + await ctx.newExif({ assetId: asset.id, latitude: 49.27335322114536, longitude: -123.10387144078764 }); const workflow = await createWorkflow({ ownerId: user.id, @@ -345,7 +347,7 @@ describe('core plugin', () => { steps: [ { method: 'immich-plugin-core#assetLocationFilter', - config: { coordinate: { latitude: 49.288_821_679_949_29, longitude: -123.111_153_098_813_7, radius: 2 } }, + config: { coordinate: { latitude: 49.28882167994929, longitude: -123.1111530988137, radius: 2 } }, }, { method: 'immich-plugin-core#assetFavorite', @@ -360,7 +362,7 @@ describe('core plugin', () => { it('should not favorite asset outside a given radius', async () => { const { user } = await ctx.newUser(); const { asset } = await ctx.newAsset({ ownerId: user.id }); - await ctx.newExif({ assetId: asset.id, latitude: 49.261_266_052_570_35, longitude: -123.248_959_390_781_96 }); + await ctx.newExif({ assetId: asset.id, latitude: 49.26126605257035, longitude: -123.24895939078196 }); const workflow = await createWorkflow({ ownerId: user.id, @@ -368,7 +370,7 @@ describe('core plugin', () => { steps: [ { method: 'immich-plugin-core#assetLocationFilter', - config: { coordinate: { latitude: 49.288_821_679_949_29, longitude: -123.111_153_098_813_7, radius: 10 } }, + config: { coordinate: { latitude: 49.28882167994929, longitude: -123.1111530988137, radius: 10 } }, }, { method: 'immich-plugin-core#assetFavorite', @@ -404,6 +406,101 @@ describe('core plugin', () => { }); }); + describe('assetFileFilter', () => { + it('should match assets case-insensitively', async () => { + const { user } = await ctx.newUser(); + const [{ asset: asset1 }, { asset: asset2 }] = await Promise.all([ + ctx.newAsset({ ownerId: user.id, originalFileName: 'exampleFile.png' }), + ctx.newAsset({ ownerId: user.id, originalFileName: 'anotherfile.jpg' }), + ]); + + const workflow = await createWorkflow({ + ownerId: user.id, + trigger: WorkflowTrigger.AssetCreate, + steps: [ + { + method: 'immich-plugin-core#assetFileFilter', + config: { matchType: 'contains', pattern: 'File' }, + }, + { + method: 'immich-plugin-core#assetFavorite', + }, + ], + }); + + await expect( + ctx.sut.handleAssetTrigger({ workflowId: workflow.id, assetId: asset1.id }), + ).resolves.toBeUndefined(); + await expect( + ctx.sut.handleAssetTrigger({ workflowId: workflow.id, assetId: asset2.id }), + ).resolves.toBeUndefined(); + await expect(ctx.get(AssetRepository).getById(asset1.id)).resolves.toMatchObject({ isFavorite: true }); + await expect(ctx.get(AssetRepository).getById(asset2.id)).resolves.toMatchObject({ isFavorite: true }); + }); + + it('should match assets by regex', async () => { + const { user } = await ctx.newUser(); + const [{ asset: asset1 }, { asset: asset2 }] = await Promise.all([ + ctx.newAsset({ ownerId: user.id, originalFileName: 'exampleFile.png' }), + ctx.newAsset({ ownerId: user.id, originalFileName: 'anotherfile.jpg' }), + ]); + + const workflow = await createWorkflow({ + ownerId: user.id, + trigger: WorkflowTrigger.AssetCreate, + steps: [ + { + method: 'immich-plugin-core#assetFileFilter', + config: { matchType: 'regex', pattern: '.+png' }, + }, + { + method: 'immich-plugin-core#assetFavorite', + }, + ], + }); + + await expect( + ctx.sut.handleAssetTrigger({ workflowId: workflow.id, assetId: asset1.id }), + ).resolves.toBeUndefined(); + await expect( + ctx.sut.handleAssetTrigger({ workflowId: workflow.id, assetId: asset2.id }), + ).resolves.toBeUndefined(); + await expect(ctx.get(AssetRepository).getById(asset1.id)).resolves.toMatchObject({ isFavorite: true }); + await expect(ctx.get(AssetRepository).getById(asset2.id)).resolves.toMatchObject({ isFavorite: false }); + }); + + it('should filter assets by path if specified', async () => { + const { user } = await ctx.newUser(); + const [{ asset: asset1 }, { asset: asset2 }] = await Promise.all([ + ctx.newAsset({ ownerId: user.id, originalPath: '/library/folder/file1.png' }), + ctx.newAsset({ ownerId: user.id, originalPath: '/library/file2.png' }), + ]); + + const workflow = await createWorkflow({ + ownerId: user.id, + trigger: WorkflowTrigger.AssetCreate, + steps: [ + { + method: 'immich-plugin-core#assetFileFilter', + config: { matchType: 'contains', pattern: 'folder', usePath: true }, + }, + { + method: 'immich-plugin-core#assetFavorite', + }, + ], + }); + + await expect( + ctx.sut.handleAssetTrigger({ workflowId: workflow.id, assetId: asset1.id }), + ).resolves.toBeUndefined(); + await expect( + ctx.sut.handleAssetTrigger({ workflowId: workflow.id, assetId: asset2.id }), + ).resolves.toBeUndefined(); + await expect(ctx.get(AssetRepository).getById(asset1.id)).resolves.toMatchObject({ isFavorite: true }); + await expect(ctx.get(AssetRepository).getById(asset2.id)).resolves.toMatchObject({ isFavorite: false }); + }); + }); + describe('assetTypeFilter', () => { it('should favorite asset if it is a video', async () => { const { user } = await ctx.newUser(); @@ -428,6 +525,81 @@ describe('core plugin', () => { }); }); + describe('assetDateFilter', () => { + it('should favorite assets created during the first 7 days of a specific year and month', async () => { + const { user } = await ctx.newUser(); + const [{ asset: asset1 }, { asset: asset2 }, { asset: asset3 }] = await Promise.all([ + ctx.newAsset({ ownerId: user.id, localDateTime: new Date('2000-04-01') }), + ctx.newAsset({ ownerId: user.id, localDateTime: new Date('2000-04-07T23:59:59Z') }), + ctx.newAsset({ ownerId: user.id, localDateTime: new Date('2000-04-08T00:00:00Z') }), + ]); + + const workflow = await createWorkflow({ + ownerId: user.id, + trigger: WorkflowTrigger.AssetCreate, + steps: [ + { + method: 'immich-plugin-core#assetDateFilter', + config: { + startDate: { day: 1, month: 4, year: 2000 }, + endDate: { day: 7, month: 4, year: 2000 }, + recurring: false, + }, + }, + { + method: 'immich-plugin-core#assetFavorite', + }, + ], + }); + + await ctx.sut.handleAssetTrigger({ workflowId: workflow.id, assetId: asset1.id }); + await expect(ctx.get(AssetRepository).getById(asset1.id)).resolves.toMatchObject({ isFavorite: true }); + + await ctx.sut.handleAssetTrigger({ workflowId: workflow.id, assetId: asset2.id }); + await expect(ctx.get(AssetRepository).getById(asset2.id)).resolves.toMatchObject({ isFavorite: true }); + + await ctx.sut.handleAssetTrigger({ workflowId: workflow.id, assetId: asset3.id }); + await expect(ctx.get(AssetRepository).getById(asset3.id)).resolves.toMatchObject({ isFavorite: false }); + }); + + it('should match recurring dates regardless of the year', async () => { + const { user } = await ctx.newUser(); + const [{ asset: asset1 }, { asset: asset2 }, { asset: asset3 }] = await Promise.all([ + ctx.newAsset({ ownerId: user.id, localDateTime: new Date('2026-03-01') }), + ctx.newAsset({ ownerId: user.id, localDateTime: new Date('1998-12-21') }), + ctx.newAsset({ ownerId: user.id, localDateTime: new Date('2000-04-08T00:00:00Z') }), + ]); + await ctx.newAsset({ ownerId: user.id, localDateTime: new Date('2010-06-15') }); + + const workflow = await createWorkflow({ + ownerId: user.id, + trigger: WorkflowTrigger.AssetCreate, + steps: [ + { + method: 'immich-plugin-core#assetDateFilter', + config: { + startDate: { day: 12, month: 12, year: 2000 }, + endDate: { day: 30, month: 3, year: 2001 }, + recurring: true, + }, + }, + { + method: 'immich-plugin-core#assetFavorite', + }, + ], + }); + + await ctx.sut.handleAssetTrigger({ workflowId: workflow.id, assetId: asset1.id }); + await expect(ctx.get(AssetRepository).getById(asset1.id)).resolves.toMatchObject({ isFavorite: true }); + + await ctx.sut.handleAssetTrigger({ workflowId: workflow.id, assetId: asset2.id }); + await expect(ctx.get(AssetRepository).getById(asset2.id)).resolves.toMatchObject({ isFavorite: true }); + + await ctx.sut.handleAssetTrigger({ workflowId: workflow.id, assetId: asset3.id }); + await expect(ctx.get(AssetRepository).getById(asset3.id)).resolves.toMatchObject({ isFavorite: false }); + }); + }); + describe('webhook', () => { it('should trigger a webhook on asset upload', async () => { const { user } = await ctx.newUser(); diff --git a/server/test/repositories/storage.repository.mock.ts b/server/test/repositories/storage.repository.mock.ts index f05826a424..f810793ce8 100644 --- a/server/test/repositories/storage.repository.mock.ts +++ b/server/test/repositories/storage.repository.mock.ts @@ -13,7 +13,7 @@ export const makeMockWatcher = ({ items, close }: MockWatcherOptions) => (paths: string[], options: ChokidarOptions, events: Partial) => { events.onReady?.(); - for (const item of items || []) { + for (const item of items ?? []) { switch (item.event) { case 'add': { events.onAdd?.(item.value); diff --git a/server/test/small.factory.ts b/server/test/small.factory.ts index 5a1a8310b3..545c05e881 100644 --- a/server/test/small.factory.ts +++ b/server/test/small.factory.ts @@ -1,22 +1,17 @@ -import { AuthApiKey, AuthSharedLink, AuthUser, Exif, Library, UserAdmin } from 'src/database'; +import { AuthApiKey, AuthSharedLink, AuthUser, Library, UserAdmin } from 'src/database'; import { AuthDto } from 'src/dtos/auth.dto'; import { QueueStatisticsDto } from 'src/dtos/queue.dto'; -import { AssetFileType, Permission, UserStatus } from 'src/enum'; +import { Permission, UserStatus } from 'src/enum'; import { v4, v7 } from 'uuid'; import { expect } from 'vitest'; export const newUuid = () => v4(); -export const newUuids = () => - Array.from({ length: 100 }) - .fill(0) - .map(() => newUuid()); +export const newUuids = () => Array.from({ length: 100 }, () => 0).map(() => newUuid()); export const newDate = () => new Date(); export const newUuidV7 = () => v7(); export const newSha1 = () => Buffer.from('this is a fake hash'); export const newEmbedding = () => { - const embedding = Array.from({ length: 512 }) - .fill(0) - .map(() => Math.random()); + const embedding = Array.from({ length: 512 }, () => 0).map(() => Math.random()); return '[' + embedding + ']'; }; @@ -27,7 +22,7 @@ const authFactory = ({ user, }: { apiKey?: Partial; - session?: { id: string }; + session?: { id?: string; hasElevatedPermission?: boolean; oauthBearerToken?: string | null }; user?: Omit< Partial, 'createdAt' | 'updatedAt' | 'deletedAt' | 'fileCreatedAt' | 'fileModifiedAt' | 'localDateTime' | 'profileChangedAt' @@ -46,8 +41,8 @@ const authFactory = ({ if (session) { auth.session = { - id: session.id, - hasElevatedPermission: false, + id: session.id ?? newUuid(), + hasElevatedPermission: session.hasElevatedPermission ?? false, }; } @@ -173,31 +168,6 @@ const versionHistoryFactory = () => ({ version: '1.123.45', }); -const assetSidecarWriteFactory = () => { - const id = newUuid(); - return { - id, - originalPath: '/path/to/original-path.jpg.xmp', - tags: [], - files: [ - { - id: newUuid(), - path: '/path/to/original-path.jpg.xmp', - type: AssetFileType.Sidecar, - isEdited: false, - }, - ], - exifInfo: { - assetId: id, - description: 'this is a description', - latitude: 12, - longitude: 12, - dateTimeOriginal: '2023-11-22T04:56:12.196Z', - timeZone: 'UTC-6', - } as unknown as Exif, - }; -}; - const assetOcrFactory = ( ocr: { id?: string; @@ -241,9 +211,6 @@ export const factory = { library: libraryFactory, queueStatistics: queueStatisticsFactory, versionHistory: versionHistoryFactory, - jobAssets: { - sidecarWrite: assetSidecarWriteFactory, - }, uuid: newUuid, buffer: () => Buffer.from('this is a fake buffer'), date: newDate, diff --git a/server/test/utils.ts b/server/test/utils.ts index 1d87b71a2e..e1920a4a79 100644 --- a/server/test/utils.ts +++ b/server/test/utils.ts @@ -1,3 +1,4 @@ +/* eslint-disable unicorn/no-this-outside-of-class */ import { createPostgres, DatabaseConnectionParams } from '@immich/sql-tools'; import { CallHandler, ExecutionContext, Provider } from '@nestjs/common'; import { APP_FILTER, APP_GUARD, APP_INTERCEPTOR, APP_PIPE } from '@nestjs/core'; @@ -88,6 +89,7 @@ import { assert, Mock, Mocked, vitest } from 'vitest'; export type ControllerContext = { authenticate: Mock; + requireSetupAvailable: Mock; getHttpServer: () => any; reset: () => void; close: () => Promise; @@ -107,6 +109,7 @@ export const controllerSetup = async (controller: new (...args: any[]) => unknow await new Promise((resolve, reject) => { const next: NextFunction = (error) => (error ? reject(transformException(error)) : resolve()); const maybePromise = handler(context.getRequest(), context.getResponse(), next); + Promise.resolve(maybePromise).catch((error) => reject(error)); }); @@ -122,7 +125,7 @@ export const controllerSetup = async (controller: new (...args: any[]) => unknow { provide: APP_GUARD, useClass: AuthGuard }, { provide: LoggingRepository, useValue: LoggingRepository.create() }, { provide: ClsService, useValue: { getId: vi.fn() } }, - { provide: AuthService, useValue: { authenticate: vi.fn() } }, + { provide: AuthService, useValue: { authenticate: vi.fn(), requireSetupAvailable: vi.fn() } }, ...providers, ], }) @@ -135,13 +138,17 @@ export const controllerSetup = async (controller: new (...args: any[]) => unknow await app.init(); // allow the AuthController to override the AuthService itself - const authenticate = app.get>(AuthService).authenticate as Mock; + const resolvedAuthService = app.get>(AuthService); + const authenticate = resolvedAuthService.authenticate as Mock; + const requireSetupAvailable = resolvedAuthService.requireSetupAvailable as Mock; return { authenticate, + requireSetupAvailable, getHttpServer: () => app.getHttpServer(), reset: () => { authenticate.mockReset(); + requireSetupAvailable.mockReset(); }, close: async () => { await app.close(); @@ -176,16 +183,18 @@ export const automock = ( }, ): AutoMocked => { const mock: Record = {}; - const strict = options?.strict ?? true; + const isStrict = options?.strict ?? true; const args = options?.args ?? []; const mocks: Mock[] = []; const instance = new Dependency(...args); - const propertyNames = new Set([ - ...Object.getOwnPropertyNames(Dependency.prototype), - ...Object.getOwnPropertyNames(instance), - ]); + const propertyNames = new Set(Object.getOwnPropertyNames(instance)); + for (let proto = Dependency.prototype; proto && proto !== Object.prototype; proto = Object.getPrototypeOf(proto)) { + for (const property of Object.getOwnPropertyNames(proto)) { + propertyNames.add(property); + } + } for (const property of propertyNames) { if (property === 'constructor') { continue; @@ -197,7 +206,7 @@ export const automock = ( const target = instance[property as keyof T]; if (typeof target === 'function') { - const mockImplementation = mockFn(label, { strict }); + const mockImplementation = mockFn(label, { strict: isStrict }); mock[property] = mockImplementation; mocks.push(mockImplementation); continue; @@ -454,7 +463,7 @@ const pngFactory = newPngFactory(); const templateName = 'mich'; -const withDatabase = (url: string, name: string) => url.replace(`/${templateName}`, `/${name}`); +const withDatabase = (url: string, name: string) => url.replace(`/${templateName}`, () => `/${name}`); export const getKyselyDB = async (suffix?: string): Promise> => { const testUrl = process.env.IMMICH_TEST_POSTGRES_URL!; @@ -544,43 +553,6 @@ export const mockDuplex = return duplex; }; -export const mockFork = vitest.fn((exitCode: number, stdout: string, stderr: string, error?: unknown) => { - const stdoutStream = new Readable({ - read() { - this.push(stdout); // write mock data to stdout - this.push(null); // end stream - }, - }); - - return { - stdout: stdoutStream, - stderr: new Readable({ - read() { - this.push(stderr); // write mock data to stderr - this.push(null); // end stream - }, - }), - stdin: new Writable({ - write(chunk, encoding, callback) { - callback(); - }, - }), - exitCode, - on: vitest.fn((event, callback: any) => { - if (event === 'close') { - stdoutStream.once('end', () => callback(0)); - } - if (event === 'error' && error) { - stdoutStream.once('end', () => callback(error)); - } - if (event === 'exit') { - stdoutStream.once('end', () => callback(exitCode)); - } - }), - kill: vitest.fn(), - } as unknown as ChildProcessWithoutNullStreams; -}); - export async function* makeStream(items: T[] = []): AsyncGenerator { for (const item of items) { await Promise.resolve(); diff --git a/server/tsconfig.json b/server/tsconfig.json index c3aede3e5b..18ad4305f5 100644 --- a/server/tsconfig.json +++ b/server/tsconfig.json @@ -10,7 +10,7 @@ "resolveJsonModule": true, "target": "es2024", "moduleResolution": "node16", - "lib": ["dom", "es2024"], + "lib": ["dom", "esnext"], "sourceMap": true, "outDir": "./dist", "incremental": true, diff --git a/web/eslint.config.js b/web/eslint.config.js index 8fc49581a9..fc69385c93 100644 --- a/web/eslint.config.js +++ b/web/eslint.config.js @@ -10,15 +10,12 @@ import parser from 'svelte-eslint-parser'; import typescriptEslint from 'typescript-eslint'; import fs from 'node:fs'; import path from 'node:path'; -import { fileURLToPath } from 'node:url'; - -const __filename = fileURLToPath(import.meta.url); -const __dirname = path.dirname(__filename); export default typescriptEslint.config( ...eslintPluginSvelte.configs.recommended, eslintPluginUnicorn.configs.recommended, js.configs.recommended, + prettier, { plugins: { tscompat: tslintPluginCompat, @@ -28,7 +25,7 @@ export default typescriptEslint.config( 'error', { browserslist: fs - .readFileSync(path.join(__dirname, '.browserslistrc'), 'utf8') + .readFileSync(path.join(import.meta.dirname, '.browserslistrc'), 'utf8') .split('\n') .map((line) => line.trim()) .filter((line) => line && !line.startsWith('#')), @@ -39,10 +36,10 @@ export default typescriptEslint.config( parser, parserOptions: { project: ['./tsconfig.json'], - tsconfigRootDir: __dirname, + tsconfigRootDir: import.meta.dirname, }, }, - ignores: ['**/service-worker/**'], + // ignores: ['**/service-worker/**'], }, { plugins: { @@ -95,7 +92,7 @@ export default typescriptEslint.config( parserOptions: { extraFileExtensions: ['.svelte'], - tsconfigRootDir: __dirname, + tsconfigRootDir: import.meta.dirname, project: ['./tsconfig.json'], }, }, @@ -116,7 +113,7 @@ export default typescriptEslint.config( 'unicorn/no-useless-undefined': 'off', 'unicorn/prefer-spread': 'off', 'unicorn/no-null': 'off', - 'unicorn/prevent-abbreviations': 'off', + 'unicorn/name-replacements': 'off', 'unicorn/no-nested-ternary': 'off', 'unicorn/consistent-function-scoping': 'off', 'unicorn/filename-case': 'off', @@ -124,14 +121,41 @@ export default typescriptEslint.config( 'unicorn/import-style': 'off', 'unicorn/no-array-sort': 'off', 'unicorn/no-for-loop': 'off', - 'svelte/button-has-type': 'error', + 'unicorn/no-unreadable-for-of-expression': 'off', + 'unicorn/no-break-in-nested-loop': 'off', + 'unicorn/no-top-level-assignment-in-function': 'off', + 'unicorn/prefer-uint8array-base64': 'off', + 'unicorn/max-nested-calls': 'off', + 'unicorn/no-declarations-before-early-exit': 'off', + 'unicorn/no-unreadable-object-destructuring': 'off', + // not yet compatible with all our supported browsers + 'unicorn/prefer-promise-with-resolvers': 'off', + // not yet compatible with all our supported browsers + 'unicorn/prefer-iterator-to-array': 'off', + // not yet compatible with all our supported browsers + 'unicorn/prefer-array-from-async': 'off', + // maybe we do want to enable this later. TBD + 'unicorn/prefer-await': 'off', + 'unicorn/consistent-class-member-order': 'off', + 'unicorn/class-reference-in-static-methods': ['error', { preferThis: false, preferSuper: false }], + 'unicorn/no-unsafe-property-key': 'off', + 'unicorn/consistent-boolean-name': 'off', + 'unicorn/no-non-function-verb-prefix': 'off', + 'unicorn/prefer-minimal-ternary': 'off', + 'unicorn/no-empty-file': 'off', + 'unicorn/prefer-simple-condition-first': 'off', + // prefer the typescript-eslint type-aware version + 'unicorn/require-array-sort-compare': 'off', + '@typescript-eslint/require-array-sort-compare': 'error', '@typescript-eslint/await-thenable': 'error', '@typescript-eslint/no-floating-promises': 'error', '@typescript-eslint/no-misused-promises': 'error', '@typescript-eslint/require-await': 'error', '@typescript-eslint/switch-exhaustiveness-check': ['error', { considerDefaultExhaustiveForUnions: true }], + 'svelte/button-has-type': 'error', 'object-shorthand': ['error', 'always'], 'svelte/no-navigation-without-resolve': 'off', + eqeqeq: 'error', }, }, { diff --git a/web/mise.toml b/web/mise.toml index b0d41317cb..7b9e3c2f3b 100644 --- a/web/mise.toml +++ b/web/mise.toml @@ -11,8 +11,12 @@ run = "pnpm run build:stats" run = "pnpm run preview" [tasks.start] -depends = [":install", "//:sdk:install", "//:sdk:build"] -run = "pnpm run dev" +run = [ + { task = ":install" }, + { task = "//:sdk:install" }, + { task = "//:sdk:build" }, + "pnpm run dev", +] [tasks."start-demo"] env.IMMICH_SERVER_URL = "https://demo.immich.app" @@ -43,8 +47,9 @@ run = "pnpm run check:svelte" run = { tasks = [":check-typescript", ":check-svelte"] } [tasks.ci-unit] -depends = ["//:sdk:install", "//:sdk:build"] run = [ + { task = "//:sdk:install" }, + { task = "//:sdk:build" }, { task = ":install" }, { task = ":format" }, { task = ":check" }, diff --git a/web/package.json b/web/package.json index b02df43191..d709ca0de6 100644 --- a/web/package.json +++ b/web/package.json @@ -1,6 +1,6 @@ { "name": "immich-web", - "version": "3.0.0-rc.3", + "version": "3.1.0", "license": "GNU Affero General Public License version 3", "type": "module", "scripts": { @@ -27,7 +27,7 @@ "@formatjs/icu-messageformat-parser": "^3.0.0", "@immich/justified-layout-wasm": "^0.4.3", "@immich/sdk": "workspace:*", - "@immich/ui": "^0.81.1", + "@immich/ui": "^0.85.0", "@mapbox/mapbox-gl-rtl-text": "0.4.0", "@mdi/js": "^7.4.47", "@noble/hashes": "^2.2.0", @@ -76,11 +76,11 @@ "@koddsson/eslint-plugin-tscompat": "^0.2.0", "@socket.io/component-emitter": "^3.1.0", "@sveltejs/adapter-static": "^3.0.8", - "@sveltejs/enhanced-img": "^0.10.4", + "@sveltejs/enhanced-img": "^0.11.0", "@sveltejs/kit": "^2.56.1", - "@sveltejs/vite-plugin-svelte": "7.1.2", + "@sveltejs/vite-plugin-svelte": "7.2.0", "@tailwindcss/vite": "^4.2.4", - "@testing-library/jest-dom": "^6.4.2", + "@testing-library/jest-dom": "^7.0.0", "@testing-library/svelte": "^5.2.8", "@testing-library/user-event": "^14.5.2", "@trivago/prettier-plugin-sort-imports": "^6.0.2", @@ -97,7 +97,7 @@ "eslint-plugin-better-tailwindcss": "^4.5.0", "eslint-plugin-compat": "^7.0.0", "eslint-plugin-svelte": "^3.12.4", - "eslint-plugin-unicorn": "^64.0.0", + "eslint-plugin-unicorn": "^72.0.0", "factory.ts": "^1.4.1", "globals": "^17.0.0", "happy-dom": "^20.0.0", @@ -105,11 +105,12 @@ "prettier-plugin-sort-json": "^4.1.1", "prettier-plugin-svelte": "^4.0.0", "rollup-plugin-visualizer": "^7.0.0", - "svelte": "5.56.3", + "svelte": "5.56.8", "svelte-check": "^4.4.6", "svelte-eslint-parser": "^1.3.3", "tailwindcss": "^4.2.4", - "typescript": "^6.0.0", + "@typescript/native": "npm:typescript@^7.0.2", + "typescript": "npm:@typescript/typescript6@^6.0.2", "typescript-eslint": "^8.45.0", "vite": "^8.0.0", "vitest": "^4.0.0" diff --git a/web/src/hooks.server.ts b/web/src/hooks.server.ts index 2fdae246e1..17b94eda1c 100644 --- a/web/src/hooks.server.ts +++ b/web/src/hooks.server.ts @@ -6,7 +6,7 @@ import GoogleSansCode from '$lib/assets/fonts/GoogleSansCode/GoogleSansCode.ttf? export const handle = (async ({ event, resolve }) => { return resolve(event, { transformPageChunk: ({ html }) => { - return html.replace('%app.font%', GoogleSans).replace('%app.monofont%', GoogleSansCode); + return html.replace('%app.font%', () => GoogleSans).replace('%app.monofont%', () => GoogleSansCode); }, }); }) satisfies Handle; diff --git a/web/src/lib/__mocks__/jsdom-url.mock.ts b/web/src/lib/__mocks__/jsdom-url.mock.ts deleted file mode 100644 index 5409cc6090..0000000000 --- a/web/src/lib/__mocks__/jsdom-url.mock.ts +++ /dev/null @@ -1,8 +0,0 @@ -const createObjectURLMock = vi.fn(); - -Object.defineProperty(URL, 'createObjectURL', { - writable: true, - value: createObjectURLMock, -}); - -export { createObjectURLMock }; diff --git a/web/src/lib/__mocks__/sdk.mock.ts b/web/src/lib/__mocks__/sdk.mock.ts index bd94fdf021..b8bac3fc39 100644 --- a/web/src/lib/__mocks__/sdk.mock.ts +++ b/web/src/lib/__mocks__/sdk.mock.ts @@ -1,6 +1,7 @@ import * as sdk from '@immich/sdk'; import type { Mock, MockedObject } from 'vitest'; +// eslint-disable-next-line unicorn/no-top-level-side-effects vi.mock('@immich/sdk', async (originalImport) => { const module = await originalImport(); diff --git a/web/src/lib/actions/click-outside.ts b/web/src/lib/actions/click-outside.ts index e1c95086dd..af4ec86956 100644 --- a/web/src/lib/actions/click-outside.ts +++ b/web/src/lib/actions/click-outside.ts @@ -35,8 +35,8 @@ export function clickOutside(node: HTMLElement, options: Options = {}): ActionRe } }; - document.addEventListener('mousedown', handleClick, false); - node.addEventListener('keydown', handleKey, false); + document.addEventListener('mousedown', handleClick, { capture: false }); + node.addEventListener('keydown', handleKey, { capture: false }); return { destroy() { diff --git a/web/src/lib/actions/drag-and-drop.ts b/web/src/lib/actions/drag-and-drop.ts deleted file mode 100644 index 04de6d9744..0000000000 --- a/web/src/lib/actions/drag-and-drop.ts +++ /dev/null @@ -1,118 +0,0 @@ -export interface DragAndDropOptions { - index: number; - onDragStart?: (index: number) => void; - onDragEnter?: (index: number) => void; - onDrop?: (e: DragEvent, index: number) => void; - onDragEnd?: () => void; - isDragging?: boolean; - isDragOver?: boolean; -} - -export function dragAndDrop(node: HTMLElement, options: DragAndDropOptions) { - let { index, onDragStart, onDragEnter, onDrop, onDragEnd, isDragging, isDragOver } = options; - - const isFormElement = (element: HTMLElement) => { - return element.tagName === 'INPUT' || element.tagName === 'TEXTAREA' || element.tagName === 'SELECT'; - }; - - const handleDragStart = (e: DragEvent) => { - // Prevent drag if it originated from an input, textarea, or select element - const target = e.target as HTMLElement; - if (isFormElement(target)) { - e.preventDefault(); - return; - } - onDragStart?.(index); - }; - - const handleDragEnter = () => { - onDragEnter?.(index); - }; - - const handleDragOver = (e: DragEvent) => { - e.preventDefault(); - }; - - const handleDrop = (e: DragEvent) => { - onDrop?.(e, index); - }; - - const handleDragEnd = () => { - onDragEnd?.(); - }; - - // Disable draggable when focusing on form elements (fixes Firefox input interaction) - const handleFocusIn = (e: FocusEvent) => { - const target = e.target as HTMLElement; - if (isFormElement(target)) { - node.setAttribute('draggable', 'false'); - } - }; - - const handleFocusOut = (e: FocusEvent) => { - const target = e.target as HTMLElement; - if (isFormElement(target)) { - node.setAttribute('draggable', 'true'); - } - }; - - node.setAttribute('draggable', 'true'); - node.setAttribute('role', 'button'); - node.setAttribute('tabindex', '0'); - - node.addEventListener('dragstart', handleDragStart); - node.addEventListener('dragenter', handleDragEnter); - node.addEventListener('dragover', handleDragOver); - node.addEventListener('drop', handleDrop); - node.addEventListener('dragend', handleDragEnd); - node.addEventListener('focusin', handleFocusIn); - node.addEventListener('focusout', handleFocusOut); - - // Update classes based on drag state - const updateClasses = (dragging: boolean, dragOver: boolean) => { - // Remove all drag-related classes first - node.classList.remove('opacity-50', 'border-gray-400', 'dark:border-gray-500', 'border-solid'); - - // Add back only the active ones - if (dragging) { - node.classList.add('opacity-50'); - } - - if (dragOver) { - node.classList.add('border-gray-400', 'dark:border-gray-500', 'border-solid'); - node.classList.remove('border-transparent'); - } else { - node.classList.add('border-transparent'); - } - }; - - updateClasses(isDragging || false, isDragOver || false); - - return { - update(newOptions: DragAndDropOptions) { - index = newOptions.index; - onDragStart = newOptions.onDragStart; - onDragEnter = newOptions.onDragEnter; - onDrop = newOptions.onDrop; - onDragEnd = newOptions.onDragEnd; - - const newIsDragging = newOptions.isDragging || false; - const newIsDragOver = newOptions.isDragOver || false; - - if (newIsDragging !== isDragging || newIsDragOver !== isDragOver) { - isDragging = newIsDragging; - isDragOver = newIsDragOver; - updateClasses(isDragging, isDragOver); - } - }, - destroy() { - node.removeEventListener('dragstart', handleDragStart); - node.removeEventListener('dragenter', handleDragEnter); - node.removeEventListener('dragover', handleDragOver); - node.removeEventListener('drop', handleDrop); - node.removeEventListener('dragend', handleDragEnd); - node.removeEventListener('focusin', handleFocusIn); - node.removeEventListener('focusout', handleFocusOut); - }, - }; -} diff --git a/web/src/lib/actions/focus-trap.ts b/web/src/lib/actions/focus-trap.ts index a1c3051b10..91c9f6a6dd 100644 --- a/web/src/lib/actions/focus-trap.ts +++ b/web/src/lib/actions/focus-trap.ts @@ -69,38 +69,44 @@ export function focusTrap(container: HTMLElement, options?: Options) { // Add focus event listeners to sentinel nodes const handleStartFocus = () => { - if (withDefaults(options).active) { - const [, lastElement] = getFocusableElements(); - // If no elements, stay on backup sentinel - if (lastElement) { - lastElement.focus(); - } else { - backupSentinel.focus(); - } + if (!withDefaults(options).active) { + return; + } + + const [, lastElement] = getFocusableElements(); + // If no elements, stay on backup sentinel + if (lastElement) { + lastElement.focus(); + } else { + backupSentinel.focus(); } }; const handleBackupFocus = () => { // Backup sentinel keeps focus when there are no other focusable elements - if (withDefaults(options).active) { - const [firstElement] = getFocusableElements(); - // Only move focus if there are actual focusable elements - if (firstElement) { - firstElement.focus(); - } - // Otherwise, focus stays on backup sentinel + if (!withDefaults(options).active) { + return; } + + const [firstElement] = getFocusableElements(); + // Only move focus if there are actual focusable elements + if (firstElement) { + firstElement.focus(); + } + // Otherwise, focus stays on backup sentinel }; const handleEndFocus = () => { - if (withDefaults(options).active) { - const [firstElement] = getFocusableElements(); - // If no elements, move to backup sentinel - if (firstElement) { - firstElement.focus(); - } else { - backupSentinel.focus(); - } + if (!withDefaults(options).active) { + return; + } + + const [firstElement] = getFocusableElements(); + // If no elements, move to backup sentinel + if (firstElement) { + firstElement.focus(); + } else { + backupSentinel.focus(); } }; diff --git a/web/src/lib/actions/scroll-memory.ts b/web/src/lib/actions/scroll-memory.ts index 9953bf00fb..9645e2d5d3 100644 --- a/web/src/lib/actions/scroll-memory.ts +++ b/web/src/lib/actions/scroll-memory.ts @@ -52,7 +52,7 @@ export function scrollMemory( const newScroll = sessionStorage.getItem(SessionStorageKey.SCROLL_POSITION); if (newScroll) { node.scroll({ - top: Number.parseFloat(newScroll), + top: Number(newScroll), behavior: 'instant', }); } @@ -71,10 +71,12 @@ export function scrollMemory( export function scrollMemoryClearer(_node: HTMLElement, { routeStartsWith, beforeClear }: Options) { const unsubscribeNavigating = navigating.subscribe((navigation) => { // Forget scroll position from main page if going somewhere else. - if (navigation?.to && !navigation?.to.url.pathname.startsWith(routeStartsWith)) { - beforeClear?.(); - sessionStorage.removeItem(SessionStorageKey.SCROLL_POSITION); + if (!navigation?.to || navigation?.to.url.pathname.startsWith(routeStartsWith)) { + return; } + + beforeClear?.(); + sessionStorage.removeItem(SessionStorageKey.SCROLL_POSITION); }); return { diff --git a/web/src/lib/actions/use-actions.ts b/web/src/lib/actions/use-actions.ts index 762cfdccf7..0b09549a03 100644 --- a/web/src/lib/actions/use-actions.ts +++ b/web/src/lib/actions/use-actions.ts @@ -3,10 +3,10 @@ * https://github.com/hperrin/svelte-material-ui/blob/master/packages/common/src/internal/useActions.ts */ -export type SvelteActionReturnType

= { +export type SvelteActionReturnType

= void | { update?: (newParams?: P) => void; destroy?: () => void; -} | void; +}; export type SvelteHTMLActionType

= (node: HTMLElement, params?: P) => SvelteActionReturnType

; @@ -40,19 +40,21 @@ export function useActions(node: HTMLElement | SVGElement, actions: ActionArray) return { update(actions: ActionArray) { - if ((actions?.length || 0) != actionReturns.length) { + if ((actions?.length || 0) !== actionReturns.length) { throw new Error('You must not change the length of an actions array.'); } if (actions) { for (const [i, returnEntry] of actionReturns.entries()) { - if (returnEntry && returnEntry.update) { - const actionEntry = actions[i]; - if (Array.isArray(actionEntry) && actionEntry.length > 1) { - returnEntry.update(actionEntry[1]); - } else { - returnEntry.update(); - } + if (!(returnEntry && returnEntry.update)) { + continue; + } + + const actionEntry = actions[i]; + if (Array.isArray(actionEntry) && actionEntry.length > 1) { + returnEntry.update(actionEntry[1]); + } else { + returnEntry.update(); } } } diff --git a/web/src/lib/attachments/drag-and-drop.svelte.ts b/web/src/lib/attachments/drag-and-drop.svelte.ts deleted file mode 100644 index 950e8e5b80..0000000000 --- a/web/src/lib/attachments/drag-and-drop.svelte.ts +++ /dev/null @@ -1,105 +0,0 @@ -import type { Attachment } from 'svelte/attachments'; - -export interface DragAndDropOptions { - index: number; - onDragStart?: (index: number) => void; - onDragEnter?: (index: number) => void; - onDrop?: (e: DragEvent, index: number) => void; - onDragEnd?: () => void; - isDragging?: boolean; - isDragOver?: boolean; -} - -export function dragAndDrop(options: DragAndDropOptions): Attachment { - return (node: Element) => { - const element = node as HTMLElement; - const { index, onDragStart, onDragEnter, onDrop, onDragEnd, isDragging, isDragOver } = options; - - const isFormElement = (el: HTMLElement) => { - return el.tagName === 'INPUT' || el.tagName === 'TEXTAREA' || el.tagName === 'SELECT'; - }; - - const handleDragStart = (e: DragEvent) => { - // Prevent drag if it originated from an input, textarea, or select element - const target = e.target as HTMLElement; - if (isFormElement(target)) { - e.preventDefault(); - return; - } - onDragStart?.(index); - }; - - const handleDragEnter = () => { - onDragEnter?.(index); - }; - - const handleDragOver = (e: DragEvent) => { - e.preventDefault(); - }; - - const handleDrop = (e: DragEvent) => { - onDrop?.(e, index); - }; - - const handleDragEnd = () => { - onDragEnd?.(); - }; - - // Disable draggable when focusing on form elements (fixes Firefox input interaction) - const handleFocusIn = (e: FocusEvent) => { - const target = e.target as HTMLElement; - if (isFormElement(target)) { - element.setAttribute('draggable', 'false'); - } - }; - - const handleFocusOut = (e: FocusEvent) => { - const target = e.target as HTMLElement; - if (isFormElement(target)) { - element.setAttribute('draggable', 'true'); - } - }; - - // Update classes based on drag state - const updateClasses = (dragging: boolean, dragOver: boolean) => { - // Remove all drag-related classes first - element.classList.remove('opacity-50', 'border-light-500', 'border-solid'); - - // Add back only the active ones - if (dragging) { - element.classList.add('opacity-50'); - } - - if (dragOver) { - element.classList.add('border-light-500', 'border-solid'); - element.classList.remove('border-transparent'); - } else { - element.classList.add('border-transparent'); - } - }; - - element.setAttribute('draggable', 'true'); - element.setAttribute('role', 'button'); - element.setAttribute('tabindex', '0'); - - element.addEventListener('dragstart', handleDragStart); - element.addEventListener('dragenter', handleDragEnter); - element.addEventListener('dragover', handleDragOver); - element.addEventListener('drop', handleDrop); - element.addEventListener('dragend', handleDragEnd); - element.addEventListener('focusin', handleFocusIn); - element.addEventListener('focusout', handleFocusOut); - - updateClasses(isDragging || false, isDragOver || false); - - return () => { - element.removeEventListener('dragstart', handleDragStart); - element.removeEventListener('dragenter', handleDragEnter); - element.removeEventListener('dragover', handleDragOver); - element.removeEventListener('drop', handleDrop); - element.removeEventListener('dragend', handleDragEnd); - element.removeEventListener('focusin', handleFocusIn); - element.removeEventListener('focusout', handleFocusOut); - }; - }; -} diff --git a/web/src/lib/commands.ts b/web/src/lib/commands.ts index 7498756ac0..0673285657 100644 --- a/web/src/lib/commands.ts +++ b/web/src/lib/commands.ts @@ -25,6 +25,7 @@ import { mdiThemeLightDark, mdiToolboxOutline, mdiTrashCanOutline, + mdiWrench, } from '@mdi/js'; import type { MessageFormatter } from 'svelte-i18n'; import { goto } from '$app/navigation'; @@ -66,6 +67,12 @@ export const getPagesProvider = ($t: MessageFormatter) => { icon: mdiServer, onAction: () => goto(Route.systemStatistics()), }, + { + title: $t('admin.maintenance_settings'), + description: $t('admin.maintenance_settings_description'), + icon: mdiWrench, + onAction: () => goto(Route.systemMaintenance()), + }, ].map((route) => ({ ...route, $if: () => authManager.authenticated && authManager.user.isAdmin })); const userPages: ActionItem[] = [ @@ -232,7 +239,7 @@ export const getSettingsProvider = ($t: MessageFormatter) => { { title: $t('my_immich_title'), description: $t('my_immich_description'), - onAction: () => copyToClipboard(getMyImmichLink().toString()), + onAction: () => copyToClipboard(getMyImmichLink().href), shortcuts: { ctrl: true, shift: true, key: 'm' }, }, ]; diff --git a/web/src/lib/components/AdaptiveImage.svelte b/web/src/lib/components/AdaptiveImage.svelte index 5596a47fdc..89b10b2d77 100644 --- a/web/src/lib/components/AdaptiveImage.svelte +++ b/web/src/lib/components/AdaptiveImage.svelte @@ -63,6 +63,7 @@ import { toTimelineAsset } from '$lib/utils/timeline-util'; import type { AssetResponseDto, SharedLinkResponseDto } from '@immich/sdk'; import { untrack, type Snippet } from 'svelte'; + import { languageManager } from '$lib/managers/language-manager.svelte'; type Props = { asset: AssetResponseDto; @@ -232,7 +233,7 @@ style:width={rasterWidth} style:height={rasterHeight} style:transform="scale({rasterScale})" - style:transform-origin="0 0" + style:transform-origin={languageManager.rtl ? 'right top' : 'left top'} style:will-change={maxRasterPixels > 0 ? 'transform' : undefined} > {#if show.alphaBackground} diff --git a/web/src/lib/components/ApiKeyPermissionsPicker.svelte b/web/src/lib/components/ApiKeyPermissionsPicker.svelte index 859c20da80..6eb2ca7cf1 100644 --- a/web/src/lib/components/ApiKeyPermissionsPicker.svelte +++ b/web/src/lib/components/ApiKeyPermissionsPicker.svelte @@ -17,8 +17,8 @@ continue; } - const [group] = permission.split('.'); - if (!permissions[group]) { + const [group] = permission.split('.', 1); + if (!Object.hasOwn(permissions, group)) { permissions[group] = []; } permissions[group].push(permission); diff --git a/web/src/lib/components/AssetViewerEvents.svelte b/web/src/lib/components/AssetViewerEvents.svelte index b636908b76..98a7a661fc 100644 --- a/web/src/lib/components/AssetViewerEvents.svelte +++ b/web/src/lib/components/AssetViewerEvents.svelte @@ -13,10 +13,12 @@ const events: EventMap = {}; for (const [name, listener] of Object.entries(props)) { - if (listener) { - const event = name.slice(2) as keyof Events; - events[event] = listener as EventCallback; + if (!listener) { + continue; } + + const event = name.slice(2) as keyof Events; + events[event] = listener as EventCallback; } return assetViewerManager.on(events); diff --git a/web/src/lib/components/CalendarHeatmap.svelte b/web/src/lib/components/CalendarHeatmap.svelte index 477e796243..f2882c63b7 100644 --- a/web/src/lib/components/CalendarHeatmap.svelte +++ b/web/src/lib/components/CalendarHeatmap.svelte @@ -55,34 +55,36 @@ {/each} --> -

-
- {#if Info.getStartOfWeek({ locale: $locale }) === 7} -
- {/if} -
{weekdays[0]}
-
{weekdays[1]}
-
{weekdays[2]}
- {#if Info.getStartOfWeek({ locale: $locale }) === 1} -
{weekdays[3]}
- {/if} -
+
+
+
+ {#if Info.getStartOfWeek({ locale: $locale }) === 7} +
+ {/if} +
{weekdays[0]}
+
{weekdays[1]}
+
{weekdays[2]}
+ {#if Info.getStartOfWeek({ locale: $locale }) === 1} +
{weekdays[3]}
+ {/if} +
- {#each data.series as day, idx (day.date)} - {@const date = DateTime.fromISO(day.date, { zone: 'utc' }).toLocaleString( - { month: 'short', day: 'numeric' }, - { locale: $locale }, - )} -
- {/each} + {#each data.series as day, idx (day.date)} + {@const date = DateTime.fromISO(day.date, { zone: 'utc' }).toLocaleString( + { month: 'short', day: 'numeric' }, + { locale: $locale }, + )} +
+ {/each} +
-
+
{$t('less')} diff --git a/web/src/lib/components/Image.svelte b/web/src/lib/components/Image.svelte index 7ad6dc3ab7..bec5908177 100644 --- a/web/src/lib/components/Image.svelte +++ b/web/src/lib/components/Image.svelte @@ -19,12 +19,14 @@ let destroyed = false; $effect(() => { - if (src !== undefined && capturedSource === undefined) { - capturedSource = src; - untrack(() => { - onStart?.(); - }); + if (src === undefined || capturedSource !== undefined) { + return; } + + capturedSource = src; + untrack(() => { + onStart?.(); + }); }); onDestroy(() => { @@ -48,7 +50,7 @@ } if (isFirefox && ref) { - ref.decode().then(completeLoad, completeLoad); + ref.decode().then(completeLoad).catch(completeLoad); return; } diff --git a/web/src/lib/components/OnEvents.svelte b/web/src/lib/components/OnEvents.svelte index fe8039cf38..122ef3c455 100644 --- a/web/src/lib/components/OnEvents.svelte +++ b/web/src/lib/components/OnEvents.svelte @@ -13,10 +13,12 @@ const events: EventMap = {}; for (const [name, listener] of Object.entries(props)) { - if (listener) { - const event = name.slice(2) as keyof Events; - events[event] = listener as EventCallback; + if (!listener) { + continue; } + + const event = name.slice(2) as keyof Events; + events[event] = listener as EventCallback; } return eventManager.on(events); diff --git a/web/src/lib/components/SchemaAlbumPicker.svelte b/web/src/lib/components/SchemaAlbumPicker.svelte index b7eb9dd7dd..e4eb271a3d 100644 --- a/web/src/lib/components/SchemaAlbumPicker.svelte +++ b/web/src/lib/components/SchemaAlbumPicker.svelte @@ -14,7 +14,7 @@ let { array, label, description, albumIds = $bindable([]) }: Props = $props(); const onAlbums = async () => { - const albums = await modalManager.show(AlbumPickerModal); + const albums = await modalManager.show(AlbumPickerModal, {}); if (!albums || albums.length === 0) { return; } diff --git a/web/src/lib/components/SchemaConfiguration.svelte b/web/src/lib/components/SchemaConfiguration.svelte index 1e85e6d945..c4e20081dd 100644 --- a/web/src/lib/components/SchemaConfiguration.svelte +++ b/web/src/lib/components/SchemaConfiguration.svelte @@ -1,6 +1,7 @@ + + { + if (option && !tagIds.includes(option.value)) { + tagIds.push(option.value); + } + }} + label={$t('tags')} + defaultFirstOption + options={tags.map((tag) => ({ label: tag.value, value: tag.id }))} + placeholder={$t('search_tags')} +/> + +
+ {#each tagIds as id, index (id)} + t.id === id)?.name ?? id} onRemove={() => tagIds.splice(index, 1)} /> + {/each} +
diff --git a/web/src/lib/components/SharedLinkFormFields.svelte b/web/src/lib/components/SharedLinkFormFields.svelte index cb371fd800..30067bcb9b 100644 --- a/web/src/lib/components/SharedLinkFormFields.svelte +++ b/web/src/lib/components/SharedLinkFormFields.svelte @@ -1,6 +1,6 @@ - + {/if} - {#if $slideshowState != SlideshowState.None} + {#if $slideshowState !== SlideshowState.None}
{/if} - {#if stack && withStacked && !assetViewerManager.isShowEditor} + {#if stack && withStacked && !assetViewerManager.isShowEditor && $slideshowState === SlideshowState.None} {@const stackedAssets = stack.assets}
diff --git a/web/src/lib/components/asset-viewer/AssetViewerNavBar.spec.ts b/web/src/lib/components/asset-viewer/AssetViewerNavBar.spec.ts index 3ba6be59b1..7c2c3a6bee 100644 --- a/web/src/lib/components/asset-viewer/AssetViewerNavBar.spec.ts +++ b/web/src/lib/components/asset-viewer/AssetViewerNavBar.spec.ts @@ -7,6 +7,16 @@ import { preferencesFactory } from '@test-data/factories/preferences-factory'; import { userAdminFactory } from '@test-data/factories/user-factory'; import AssetViewerNavBar from './AssetViewerNavBar.svelte'; +vi.mock(import('$lib/managers/feature-flags-manager.svelte'), function () { + return { + featureFlagsManager: { + init: vi.fn(), + loadFeatureFlags: vi.fn(), + value: { smartSearch: true, trash: true }, + } as never, + }; +}); + describe('AssetViewerNavBar component', () => { const additionalProps = { preAction: () => {}, @@ -24,15 +34,6 @@ describe('AssetViewerNavBar component', () => { }; }); vi.stubGlobal('ResizeObserver', getResizeObserverMock()); - vi.mock(import('$lib/managers/feature-flags-manager.svelte'), function () { - return { - featureFlagsManager: { - init: vi.fn(), - loadFeatureFlags: vi.fn(), - value: { smartSearch: true, trash: true }, - } as never, - }; - }); }); afterEach(() => { diff --git a/web/src/lib/components/asset-viewer/DetailPanel.svelte b/web/src/lib/components/asset-viewer/DetailPanel.svelte index 98b64d5aa0..c0c81f8f02 100644 --- a/web/src/lib/components/asset-viewer/DetailPanel.svelte +++ b/web/src/lib/components/asset-viewer/DetailPanel.svelte @@ -191,9 +191,9 @@

{/if} - {#if (asset.exifInfo?.exifImageHeight && asset.exifInfo?.exifImageWidth) || asset.exifInfo?.fileSizeInByte} + {#if (asset.exifInfo?.exifImageHeight && asset.exifInfo.exifImageWidth) || asset.exifInfo?.fileSizeInByte}
- {#if asset.exifInfo?.exifImageHeight && asset.exifInfo?.exifImageWidth} + {#if asset.exifInfo?.exifImageHeight && asset.exifInfo.exifImageWidth} {#if getMegapixel(asset.exifInfo.exifImageHeight, asset.exifInfo.exifImageWidth)}

{getMegapixel(asset.exifInfo.exifImageHeight, asset.exifInfo.exifImageWidth)} MP @@ -324,7 +324,7 @@

{/if} - {#if currentAlbum && currentAlbum.albumUsers.length > 0 && asset.owner} + {#if currentAlbum && currentAlbum.albumUsers.length > 1 && asset.owner}
{$t('shared_by')}
diff --git a/web/src/lib/components/asset-viewer/DetailPanelPeople.svelte b/web/src/lib/components/asset-viewer/DetailPanelPeople.svelte index 78265f9ea2..6290209e28 100644 --- a/web/src/lib/components/asset-viewer/DetailPanelPeople.svelte +++ b/web/src/lib/components/asset-viewer/DetailPanelPeople.svelte @@ -35,7 +35,8 @@ let formattedAge; if (ageInYears < 0) { return { formattedBirthDate: undefined, formattedAge: undefined, ...person }; - } else if (ageInMonths < 12) { + } + if (ageInMonths < 12) { formattedAge = $t('age_months', { values: { months: ageInMonths } }); } else if (ageInMonths > 12 && ageInMonths < 24) { formattedAge = $t('age_year_months', { values: { months: ageInMonths - 12 } }); diff --git a/web/src/lib/components/asset-viewer/OcrBoundingBox.svelte b/web/src/lib/components/asset-viewer/OcrBoundingBox.svelte index 34bde374e6..10470b43de 100644 --- a/web/src/lib/components/asset-viewer/OcrBoundingBox.svelte +++ b/web/src/lib/components/asset-viewer/OcrBoundingBox.svelte @@ -20,6 +20,7 @@ const handleSelectStart = (event: Event) => { const target = event.currentTarget as HTMLElement; requestAnimationFrame(() => { + // eslint-disable-next-line unicorn/no-unnecessary-global-this const selection = globalThis.getSelection(); if (selection) { selection.selectAllChildren(target); diff --git a/web/src/lib/components/asset-viewer/PhotoViewer.svelte b/web/src/lib/components/asset-viewer/PhotoViewer.svelte index 37844a5459..94da4bafc4 100644 --- a/web/src/lib/components/asset-viewer/PhotoViewer.svelte +++ b/web/src/lib/components/asset-viewer/PhotoViewer.svelte @@ -115,6 +115,7 @@ // TODO move to action + command palette const onCopyShortcut = (event: KeyboardEvent) => { + // eslint-disable-next-line unicorn/no-unnecessary-global-this if (globalThis.getSelection()?.type === 'Range') { return; } @@ -139,7 +140,7 @@ if (!url || !castManager.isCasting) { return; } - const fullUrl = new URL(url, globalThis.location.href); + const fullUrl = new URL(url, location.href); try { await castManager.loadMedia(fullUrl.href); @@ -272,7 +273,9 @@ diff --git a/web/src/lib/components/asset-viewer/SlideshowBar.svelte b/web/src/lib/components/asset-viewer/SlideshowBar.svelte index 8065b6b276..0ec5fe7dc0 100644 --- a/web/src/lib/components/asset-viewer/SlideshowBar.svelte +++ b/web/src/lib/components/asset-viewer/SlideshowBar.svelte @@ -61,10 +61,12 @@ const hideControlsAfterDelay = () => { timer = setTimeout(() => { - if (!isOverControls) { - showControls = false; - setCursorStyle('none'); + if (isOverControls) { + return; } + + showControls = false; + setCursorStyle('none'); }, 2500); }; @@ -77,10 +79,12 @@ }); unsubscribeStop = stopProgress.subscribe((value) => { - if (value) { - progressBar?.restart(); - stopControlsHideTimer(); + if (!value) { + return; } + + progressBar?.restart(); + stopControlsHideTimer(); }); }); @@ -172,7 +176,7 @@ {#if showControls}
(isOverControls = true)} onmouseleave={() => (isOverControls = false)} transition:fly={{ duration: 150 }} diff --git a/web/src/lib/components/asset-viewer/SlideshowMetadataOverlay.svelte b/web/src/lib/components/asset-viewer/SlideshowMetadataOverlay.svelte index e1865e2c14..a321573592 100644 --- a/web/src/lib/components/asset-viewer/SlideshowMetadataOverlay.svelte +++ b/web/src/lib/components/asset-viewer/SlideshowMetadataOverlay.svelte @@ -18,7 +18,7 @@ const description = $derived(asset.exifInfo?.description?.trim() || ''); const dateTime = $derived( - asset.exifInfo?.timeZone && asset.exifInfo?.dateTimeOriginal + asset.exifInfo?.timeZone && asset.exifInfo.dateTimeOriginal ? fromISODateTime(asset.exifInfo.dateTimeOriginal, asset.exifInfo.timeZone) : fromISODateTimeUTC(asset.localDateTime), ); diff --git a/web/src/lib/components/asset-viewer/VideoNativeViewer.svelte b/web/src/lib/components/asset-viewer/VideoNativeViewer.svelte index ca0b8d3ef7..2663be3f98 100644 --- a/web/src/lib/components/asset-viewer/VideoNativeViewer.svelte +++ b/web/src/lib/components/asset-viewer/VideoNativeViewer.svelte @@ -5,6 +5,7 @@ import { assetViewerManager } from '$lib/managers/asset-viewer-manager.svelte'; import { castManager } from '$lib/managers/cast-manager.svelte'; import { featureFlagsManager } from '$lib/managers/feature-flags-manager.svelte'; + import { authManager } from '$lib/managers/auth-manager.svelte'; import { mediaCapabilitiesManager } from '$lib/managers/media-capabilities-manager.svelte'; import { autoPlayVideo, lang, loopVideo as loopVideoPreference } from '$lib/stores/preferences.store'; import { getAssetHlsSessionUrl, getAssetHlsUrl, getAssetMediaUrl, getAssetPlaybackUrl } from '$lib/utils'; @@ -150,6 +151,15 @@ }, }, useMediaCapabilities: false, + xhrSetup: (xhr: XMLHttpRequest, url: string) => { + const authenticatedUrl = new URL(url, location.origin); + for (const [key, value] of Object.entries(authManager.params)) { + if (value) { + authenticatedUrl.searchParams.set(key, value as string); + } + } + xhr.open('GET', authenticatedUrl.href); + }, }; const releaseSession = () => { @@ -298,8 +308,7 @@ const onSwipe = (event: SwipeCustomEvent) => { if (event.detail.direction === 'left') { onNextAsset(); - } - if (event.detail.direction === 'right') { + } else if (event.detail.direction === 'right') { onPreviousAsset(); } }; @@ -379,10 +388,12 @@ onended={onVideoEnded} onseeking={onSeeking} onplaying={(e: Event) => { - if (!hasFocused) { - (e.currentTarget as HTMLElement).focus(); - hasFocused = true; + if (hasFocused) { + return; } + + (e.currentTarget as HTMLElement).focus(); + hasFocused = true; }} onclose={onClose} poster={getAssetMediaUrl({ id: asset.id, size: AssetMediaSize.Preview, cacheKey })} @@ -402,10 +413,12 @@ onended={onVideoEnded} onseeking={onSeeking} onplaying={(e) => { - if (!hasFocused) { - e.currentTarget.focus(); - hasFocused = true; + if (hasFocused) { + return; } + + e.currentTarget.focus(); + hasFocused = true; }} onclose={onClose} poster={getAssetMediaUrl({ id: asset.id, size: AssetMediaSize.Preview, cacheKey })} diff --git a/web/src/lib/components/asset-viewer/VideoRemoteViewer.svelte b/web/src/lib/components/asset-viewer/VideoRemoteViewer.svelte index 851cd05f78..040a22f04f 100644 --- a/web/src/lib/components/asset-viewer/VideoRemoteViewer.svelte +++ b/web/src/lib/components/asset-viewer/VideoRemoteViewer.svelte @@ -51,7 +51,7 @@ if (!url || !castManager.isCasting) { return; } - const fullUrl = new URL(url, globalThis.location.href); + const fullUrl = new URL(url, location.href); try { await castManager.loadMedia(fullUrl.href, force); @@ -63,7 +63,7 @@ }; function handleSeek(event: Event) { - const newTime = Number.parseFloat((event.target as HTMLInputElement).value); + const newTime = Number((event.target as HTMLInputElement).value); castManager.seekTo(newTime); } @@ -76,7 +76,7 @@ poster
- {#if castManager.castState == CastState.BUFFERING} + {#if castManager.castState === CastState.BUFFERING}
@@ -85,9 +85,9 @@ color="primary" shape="round" variant="ghost" - icon={castManager.castState == CastState.PLAYING ? mdiPause : mdiPlay} + icon={castManager.castState === CastState.PLAYING ? mdiPause : mdiPlay} onclick={() => handlePlayPauseButton()} - aria-label={castManager.castState == CastState.PLAYING ? 'Pause' : 'Play'} + aria-label={castManager.castState === CastState.PLAYING ? 'Pause' : 'Play'} /> {/if} diff --git a/web/src/lib/components/asset-viewer/actions/DeleteAction.spec.ts b/web/src/lib/components/asset-viewer/actions/DeleteAction.spec.ts index 6cd95ab02a..d715540d3d 100644 --- a/web/src/lib/components/asset-viewer/actions/DeleteAction.spec.ts +++ b/web/src/lib/components/asset-viewer/actions/DeleteAction.spec.ts @@ -4,16 +4,14 @@ import { renderWithTooltips } from '$tests/helpers'; import { assetFactory } from '@test-data/factories/asset-factory'; import DeleteAction from './DeleteAction.svelte'; +vi.mock(import('$lib/managers/feature-flags-manager.svelte'), () => { + // eslint-disable-next-line @typescript-eslint/no-explicit-any + return { featureFlagsManager: { init: vi.fn(), loadFeatureFlags: vi.fn(), value: { trash: true } } as any }; +}); + let asset: AssetResponseDto; describe('DeleteAction component', () => { - beforeEach(() => { - vi.mock(import('$lib/managers/feature-flags-manager.svelte'), () => { - // eslint-disable-next-line @typescript-eslint/no-explicit-any - return { featureFlagsManager: { init: vi.fn(), loadFeatureFlags: vi.fn(), value: { trash: true } } as any }; - }); - }); - describe('given an asset which is not trashed yet', () => { beforeEach(() => { asset = assetFactory.build({ isTrashed: false }); diff --git a/web/src/lib/components/asset-viewer/actions/NextAssetAction.svelte b/web/src/lib/components/asset-viewer/actions/NextAssetAction.svelte index 6389cf95e0..429c45cf52 100644 --- a/web/src/lib/components/asset-viewer/actions/NextAssetAction.svelte +++ b/web/src/lib/components/asset-viewer/actions/NextAssetAction.svelte @@ -1,9 +1,10 @@ - -
  • - -
  • diff --git a/web/src/lib/components/asset-viewer/editor/transform-tool/TransformTool.svelte b/web/src/lib/components/asset-viewer/editor/transform-tool/TransformTool.svelte index 29e4e09506..b86f5b7edf 100644 --- a/web/src/lib/components/asset-viewer/editor/transform-tool/TransformTool.svelte +++ b/web/src/lib/components/asset-viewer/editor/transform-tool/TransformTool.svelte @@ -35,11 +35,10 @@ } if (isRotated) { - let [width, height] = ratio.value.split(':'); + let [width, height] = ratio.value.split(':', 2); return `${height}:${width}`; - } else { - return ratio.value; } + return ratio.value; } function ratioSelected(ratio: AspectRatioOption): boolean { diff --git a/web/src/lib/components/asset-viewer/immich-time-range.ts b/web/src/lib/components/asset-viewer/immich-time-range.ts index a3de131e73..12d6200d51 100644 --- a/web/src/lib/components/asset-viewer/immich-time-range.ts +++ b/web/src/lib/components/asset-viewer/immich-time-range.ts @@ -49,6 +49,6 @@ class ImmichTimeRange extends MediaTimeRange { } } -if (!globalThis.customElements.get('immich-time-range')) { - globalThis.customElements.define('immich-time-range', ImmichTimeRange); +if (!customElements.get('immich-time-range')) { + customElements.define('immich-time-range', ImmichTimeRange); } diff --git a/web/src/lib/components/assets/thumbnail/Thumbnail.svelte b/web/src/lib/components/assets/thumbnail/Thumbnail.svelte index 8583b9f8ac..5764965bdc 100644 --- a/web/src/lib/components/assets/thumbnail/Thumbnail.svelte +++ b/web/src/lib/components/assets/thumbnail/Thumbnail.svelte @@ -167,7 +167,7 @@ e.preventDefault(); }; element.addEventListener('click', click); - element.addEventListener('pointerdown', start, true); + element.addEventListener('pointerdown', start, { capture: true }); element.addEventListener('pointerup', clearLongPressTimer, { capture: true, passive: true }); return { destroy: () => { @@ -215,8 +215,7 @@ onkeydown={(evt) => { if (evt.key === 'Enter') { callClickHandlers(); - } - if (evt.key === 'x') { + } else if (evt.key === 'x') { onSelect?.(asset); } if (document.activeElement === element && evt.key === 'Escape') { @@ -247,7 +246,7 @@ > { const remaining = currentTarget.duration - currentTarget.currentTime; - remainingSeconds = Math.min( - Math.ceil(Number.isNaN(remaining) ? Number.POSITIVE_INFINITY : remaining), - durationInSeconds, - ); + remainingSeconds = Math.min(Math.ceil(Number.isNaN(remaining) ? Infinity : remaining), durationInSeconds); }} > {/if} diff --git a/web/src/lib/components/assets/thumbnail/__test__/Thumbnail.spec.ts b/web/src/lib/components/assets/thumbnail/__test__/Thumbnail.spec.ts index 8b4e346ee3..c65f286ddf 100644 --- a/web/src/lib/components/assets/thumbnail/__test__/Thumbnail.spec.ts +++ b/web/src/lib/components/assets/thumbnail/__test__/Thumbnail.spec.ts @@ -4,6 +4,11 @@ import Thumbnail from '$lib/components/assets/thumbnail/Thumbnail.svelte'; import { getTabbable } from '$lib/utils/focus-util'; import { assetFactory } from '@test-data/factories/asset-factory'; +vi.mock('$lib/utils/navigation', () => ({ + currentUrlReplaceAssetId: vi.fn(), + isSharedLinkRoute: vi.fn().mockReturnValue(false), +})); + vi.hoisted(() => { Object.defineProperty(globalThis, 'matchMedia', { writable: true, @@ -26,10 +31,6 @@ vi.hoisted(() => { describe('Thumbnail component', () => { beforeAll(() => { vi.stubGlobal('IntersectionObserver', getIntersectionObserverMock()); - vi.mock('$lib/utils/navigation', () => ({ - currentUrlReplaceAssetId: vi.fn(), - isSharedLinkRoute: vi.fn().mockReturnValue(false), - })); }); it('should only contain a single tabbable element (the container)', () => { diff --git a/web/src/lib/components/faces-page/PersonSidePanel.svelte b/web/src/lib/components/faces-page/PersonSidePanel.svelte index eedd6766eb..759bd03bce 100644 --- a/web/src/lib/components/faces-page/PersonSidePanel.svelte +++ b/web/src/lib/components/faces-page/PersonSidePanel.svelte @@ -93,10 +93,10 @@ }; const handleReset = (id: string) => { - if (selectedPersonToReassign[id]) { + if (Object.hasOwn(selectedPersonToReassign, id)) { delete selectedPersonToReassign[id]; } - if (selectedPersonToCreate[id]) { + if (Object.hasOwn(selectedPersonToCreate, id)) { delete selectedPersonToCreate[id]; } }; @@ -115,7 +115,7 @@ id: personId, faceDto: { id: personWithFace.id }, }); - } else if (selectedPersonToCreate[personWithFace.id]) { + } else if (Object.hasOwn(selectedPersonToCreate, personWithFace.id)) { const data = await createPerson({ personCreateDto: {} }); peopleToCreate.push(data.id); await reassignFacesById({ @@ -314,7 +314,7 @@ {/if}
    - {#if !selectedPersonToCreate[face.id]} + {#if !Object.hasOwn(selectedPersonToCreate, face.id)}

    {#if selectedPersonToReassign[face.id]?.id} {selectedPersonToReassign[face.id]?.name} @@ -349,7 +349,7 @@ {/if}

    - {#if !selectedPersonToCreate[face.id] && !selectedPersonToReassign[face.id] && !face.person} + {#if !Object.hasOwn(selectedPersonToCreate, face.id) && !Object.hasOwn(selectedPersonToReassign, face.id) && !face.person}
    @@ -357,7 +357,7 @@
    {/if}
    - {#if face.person != null} + {#if face.person !== null}
    { + const sortedEntries = [...groups].sort((a, b) => { if (a[0] === unknownDateKey) { return -1; } @@ -115,7 +115,7 @@
    - {#each [...groupedBackups.entries()] as [dateGroup, groupBackups] (dateGroup)} + {#each [...groupedBackups] as [dateGroup, groupBackups] (dateGroup)}
    diff --git a/web/src/lib/components/server-statistics/ServerStatisticsCard.svelte b/web/src/lib/components/server-statistics/ServerStatisticsCard.svelte index 73b4f62dc0..a9fb831e82 100644 --- a/web/src/lib/components/server-statistics/ServerStatisticsCard.svelte +++ b/web/src/lib/components/server-statistics/ServerStatisticsCard.svelte @@ -21,7 +21,7 @@ let length = 13; if (data) { const valueLength = data.value.toString().length; - length = length - valueLength; + length -= valueLength; } return '0'.repeat(length); @@ -37,18 +37,18 @@
    {#await valuePromise} -
    +
    {zeros()}
    {:then data} -
    +
    {zeros(data)}{data.value} {#if data.unit} {data.unit} {/if}
    {:catch _} -
    +
    {zeros()}
    {/await} diff --git a/web/src/lib/components/share-page/IndividualSharedViewer.svelte b/web/src/lib/components/share-page/IndividualSharedViewer.svelte index a3cf76c78e..a119f4ffea 100644 --- a/web/src/lib/components/share-page/IndividualSharedViewer.svelte +++ b/web/src/lib/components/share-page/IndividualSharedViewer.svelte @@ -35,10 +35,12 @@ let assets = $derived(sharedLink.assets); dragAndDropFilesStore.subscribe((value) => { - if (value.isDragging && value.files.length > 0) { - handlePromiseError(handleUploadAssets(value.files)); - dragAndDropFilesStore.set({ isDragging: false, files: [] }); + if (!(value.isDragging && value.files.length > 0)) { + return; } + + handlePromiseError(handleUploadAssets(value.files)); + dragAndDropFilesStore.set({ isDragging: false, files: [] }); }); const downloadAssets = async () => { diff --git a/web/src/lib/components/shared-components/Combobox.svelte b/web/src/lib/components/shared-components/Combobox.svelte index 7b0e867343..388317a4ef 100644 --- a/web/src/lib/components/shared-components/Combobox.svelte +++ b/web/src/lib/components/shared-components/Combobox.svelte @@ -345,10 +345,12 @@ { shortcut: { key: 'Escape' }, onShortcut: (event) => { - if (isOpen) { - event.stopPropagation(); - closeDropdown(); + if (!isOpen) { + return; } + + event.stopPropagation(); + closeDropdown(); }, }, ]} @@ -399,7 +401,7 @@ aria-selected={selectedIndex === 0} aria-disabled={true} class="w-full cursor-default px-4 py-2 text-start hover:bg-gray-200 aria-selected:bg-gray-200 dark:hover:bg-gray-700 aria-selected:dark:bg-gray-700" - id={`${listboxId}-${0}`} + id={`${listboxId}-0`} onclick={closeDropdown} > {allowCreate ? searchQuery : $t('no_results')} diff --git a/web/src/lib/components/shared-components/CoordinatesInput.svelte b/web/src/lib/components/shared-components/CoordinatesInput.svelte index b4af1a33d1..64e30ee662 100644 --- a/web/src/lib/components/shared-components/CoordinatesInput.svelte +++ b/web/src/lib/components/shared-components/CoordinatesInput.svelte @@ -15,7 +15,7 @@ const id = generateId(); const onInput = () => { - if (lat != null && lng != null) { + if (lat !== undefined && lng !== undefined) { onUpdate(lat, lng); } }; diff --git a/web/src/lib/components/shared-components/SingleGridRow.svelte b/web/src/lib/components/shared-components/SingleGridRow.svelte index c4db34c152..1d94abfa68 100644 --- a/web/src/lib/components/shared-components/SingleGridRow.svelte +++ b/web/src/lib/components/shared-components/SingleGridRow.svelte @@ -10,16 +10,11 @@ let container: HTMLElement | undefined = $state(); let contentRect: DOMRectReadOnly | undefined = $state(); - const getGridGap = (element: Element) => { + const getColumnGap = (element: Element) => { const style = getComputedStyle(element); - - return { - columnGap: parsePixels(style.columnGap), - }; + return Number.parseInt(style.columnGap) || 0; }; - const parsePixels = (style: string) => Number.parseInt(style, 10) || 0; - const getItemCount = (container: HTMLElement, containerWidth: number) => { if (!container.firstElementChild) { return 1; @@ -27,7 +22,7 @@ const childContentRect = container.firstElementChild.getBoundingClientRect(); const childWidth = Math.floor(childContentRect.width || Infinity); - const { columnGap } = getGridGap(container); + const columnGap = getColumnGap(container); return Math.floor((containerWidth + columnGap) / (childWidth + columnGap)) || 1; }; diff --git a/web/src/lib/components/shared-components/album-selection/album-selection-utils.spec.ts b/web/src/lib/components/shared-components/album-selection/album-selection-utils.spec.ts index 669ce22f85..c7c3413b84 100644 --- a/web/src/lib/components/shared-components/album-selection/album-selection-utils.spec.ts +++ b/web/src/lib/components/shared-components/album-selection/album-selection-utils.spec.ts @@ -108,6 +108,19 @@ describe('Album Modal', () => { ]); }); + it('search matches on description as well as name', () => { + const converter = new AlbumModalRowConverter(AlbumSortBy.MostRecentPhoto, SortOrder.Desc); + const holidayAlbum = albumFactory.build({ albumName: 'Vacances 2019', description: 'Crete' }); + const constructionAlbum = albumFactory.build({ albumName: 'Construction' }); + const modalRows = converter.toModalRows('Crete', [], [holidayAlbum, constructionAlbum], -1, []); + + expect(modalRows).toStrictEqual([ + createNewAlbumRow(false), + createSectionRow('ALBUMS'), + createAlbumRow(holidayAlbum, false), + ]); + }); + it('selection can select new album row', () => { const converter = new AlbumModalRowConverter(AlbumSortBy.MostRecentPhoto, SortOrder.Desc); const holidayAlbum = albumFactory.build({ albumName: 'Holidays' }); diff --git a/web/src/lib/components/shared-components/album-selection/album-selection-utils.ts b/web/src/lib/components/shared-components/album-selection/album-selection-utils.ts index ad96b27c06..5d4e46a063 100644 --- a/web/src/lib/components/shared-components/album-selection/album-selection-utils.ts +++ b/web/src/lib/components/shared-components/album-selection/album-selection-utils.ts @@ -46,10 +46,14 @@ export class AlbumModalRowConverter { const recentAlbumsToShow = search.length === 0 ? recentAlbums : []; const rows: AlbumModalRow[] = [{ type: AlbumModalRowType.NEW_ALBUM, selected: selectedRowIndex === 0 }]; + const normalizedSearch = normalizeSearchString(search); const filteredAlbums = sortAlbums( search.length > 0 && albums.length > 0 ? albums.filter((album) => { - return normalizeSearchString(album.albumName).includes(normalizeSearchString(search)); + return ( + normalizeSearchString(album.albumName).includes(normalizedSearch) || + normalizeSearchString(album.description).includes(normalizedSearch) + ); }) : albums, { sortBy: this.sortBy, orderBy: this.orderBy }, diff --git a/web/src/lib/components/shared-components/context-menu/ContextMenu.svelte b/web/src/lib/components/shared-components/context-menu/ContextMenu.svelte index 729a4a4ea9..73f1406cc0 100644 --- a/web/src/lib/components/shared-components/context-menu/ContextMenu.svelte +++ b/web/src/lib/components/shared-components/context-menu/ContextMenu.svelte @@ -64,7 +64,7 @@
    { + // eslint-disable-next-line unicorn/no-optional-chaining-on-undeclared-variable $optionClickCallbackStore?.(); onClick(); }; diff --git a/web/src/lib/components/shared-components/context-menu/RightClickContextMenu.svelte b/web/src/lib/components/shared-components/context-menu/RightClickContextMenu.svelte index 6b685f6d2d..16b1df1716 100644 --- a/web/src/lib/components/shared-components/context-menu/RightClickContextMenu.svelte +++ b/web/src/lib/components/shared-components/context-menu/RightClickContextMenu.svelte @@ -57,11 +57,13 @@ onClose?.(); }; $effect(() => { - if (isOpen && menuContainer) { - triggerElement = document.activeElement as HTMLElement; - menuContainer.focus(); - $optionClickCallbackStore = closeContextMenu; + if (!(isOpen && menuContainer)) { + return; } + + triggerElement = document.activeElement as HTMLElement; + menuContainer.focus(); + $optionClickCallbackStore = closeContextMenu; }); const oncontextmenu = async (event: MouseEvent) => { diff --git a/web/src/lib/components/shared-components/gallery-viewer/GalleryViewer.svelte b/web/src/lib/components/shared-components/gallery-viewer/GalleryViewer.svelte index 29e7e6458c..5a4b25225f 100644 --- a/web/src/lib/components/shared-components/gallery-viewer/GalleryViewer.svelte +++ b/web/src/lib/components/shared-components/gallery-viewer/GalleryViewer.svelte @@ -109,12 +109,14 @@ let lastEndReachedHeight = 0; $effect(() => { - if (geometry.containerHeight - slidingWindow.bottom <= viewport.height) { - const contentHeight = geometry.containerHeight; - if (lastEndReachedHeight !== contentHeight) { - debouncedOnEndReached(); - lastEndReachedHeight = contentHeight; - } + if (geometry.containerHeight - slidingWindow.bottom > viewport.height) { + return; + } + + const contentHeight = geometry.containerHeight; + if (lastEndReachedHeight !== contentHeight) { + debouncedOnEndReached(); + lastEndReachedHeight = contentHeight; } }); diff --git a/web/src/lib/components/shared-components/map/Map.svelte b/web/src/lib/components/shared-components/map/Map.svelte index 9172b7bee4..9811a8a7be 100644 --- a/web/src/lib/components/shared-components/map/Map.svelte +++ b/web/src/lib/components/shared-components/map/Map.svelte @@ -109,14 +109,16 @@ ); export function addClipMapMarker(lng: number, lat: number) { - if (map) { - if (marker) { - marker.remove(); - } - - center = { lng, lat }; - marker = new Marker().setLngLat([lng, lat]).addTo(map); + if (!map) { + return; } + + if (marker) { + marker.remove(); + } + + center = { lng, lat }; + marker = new Marker().setLngLat([lng, lat]).addTo(map); } function handleAssetClick(assetId: string, map: Map | null) { @@ -159,17 +161,19 @@ } function handleMapClick(event: MapMouseEvent) { - if (clickable) { - const { lng, lat } = event.lngLat; - onClickPoint({ lng, lat }); + if (!clickable) { + return; + } - if (marker) { - marker.remove(); - } + const { lng, lat } = event.lngLat; + onClickPoint({ lng, lat }); - if (map) { - marker = new Marker().setLngLat([lng, lat]).addTo(map); - } + if (marker) { + marker.remove(); + } + + if (map) { + marker = new Marker().setLngLat([lng, lat]).addTo(map); } } @@ -254,13 +258,16 @@ }; afterNavigate(() => { - if (map) { - map.resize(); + if (!map) { + return; + } - if (globalThis.location.hash) { - const hashChangeEvent = new HashChangeEvent('hashchange'); - globalThis.dispatchEvent(hashChangeEvent); - } + map.resize(); + + if (location.hash) { + const hashChangeEvent = new HashChangeEvent('hashchange'); + // eslint-disable-next-line unicorn/no-unnecessary-global-this + globalThis.dispatchEvent(hashChangeEvent); } }); @@ -280,7 +287,7 @@ if (previousStyle) { // Preserves the custom map markers from the previous style when the theme is switched // Required until https://github.com/dimfeld/svelte-maplibre/issues/146 is fixed - const customLayers = previousStyle.layers.filter((l) => l.type == 'fill' && l.source == 'geojson'); + const customLayers = previousStyle.layers.filter((l) => l.type === 'fill' && l.source === 'geojson'); const layers = nextStyle.layers.concat(customLayers); const sources = nextStyle.sources; @@ -309,12 +316,12 @@ untrack(() => map?.jumpTo({ center, zoom })); }); - const onAssetsDelete = async () => { + const onAssetsChanged = async () => { mapMarkers = await loadMapMarkers(); }; - + { - if (selectedId) { - event.preventDefault(); - searchHistoryBox?.selectActiveOption(); + if (!selectedId) { + return; } + + event.preventDefault(); + searchHistoryBox?.selectActiveOption(); }; const onInput = () => { diff --git a/web/src/lib/components/shared-components/search-bar/SearchHistoryBox.svelte b/web/src/lib/components/shared-components/search-bar/SearchHistoryBox.svelte index 24ceaeb380..a1e3d9328f 100644 --- a/web/src/lib/components/shared-components/search-bar/SearchHistoryBox.svelte +++ b/web/src/lib/components/shared-components/search-bar/SearchHistoryBox.svelte @@ -44,7 +44,8 @@ export function moveSelection(increment: 1 | -1) { if (!isSearchSuggestions) { return; - } else if (selectedIndex === undefined) { + } + if (selectedIndex === undefined) { selectedIndex = increment === 1 ? 0 : suggestionCount - 1; } else if (selectedIndex + increment < 0 || selectedIndex + increment >= suggestionCount) { clearSelection(); diff --git a/web/src/lib/components/shared-components/settings/SettingInputField.svelte b/web/src/lib/components/shared-components/settings/SettingInputField.svelte index 8668d71d8b..40cd96f73c 100644 --- a/web/src/lib/components/shared-components/settings/SettingInputField.svelte +++ b/web/src/lib/components/shared-components/settings/SettingInputField.svelte @@ -101,7 +101,9 @@ {description}

    {:else} - {@render descriptionSnippet?.()} +
    + {@render descriptionSnippet?.()} +
    {/if} {#if inputType !== SettingInputFieldType.PASSWORD} diff --git a/web/src/lib/components/shared-components/settings/SettingsLanguageSelector.svelte b/web/src/lib/components/shared-components/settings/SettingsLanguageSelector.svelte index 146c37b7ec..ca1e3059c3 100644 --- a/web/src/lib/components/shared-components/settings/SettingsLanguageSelector.svelte +++ b/web/src/lib/components/shared-components/settings/SettingsLanguageSelector.svelte @@ -18,11 +18,13 @@ const defaultLangOption = { label: defaultLang.name, value: defaultLang.code }; const handleLanguageChange = async (newLang: string | undefined) => { - if (newLang) { - $lang = newLang; - await i18nLocale.set(convertBCP47(newLang)); - await invalidateAll(); + if (!newLang) { + return; } + + $lang = newLang; + await i18nLocale.set(convertBCP47(newLang)); + await invalidateAll(); }; let closestLanguage = $derived(getClosestAvailableLocale([$lang], langCodes)); diff --git a/web/src/lib/components/shared-components/side-bar/RecentAlbums.spec.ts b/web/src/lib/components/shared-components/side-bar/RecentAlbums.spec.ts index fef8d5b1f2..1745aa022c 100644 --- a/web/src/lib/components/shared-components/side-bar/RecentAlbums.spec.ts +++ b/web/src/lib/components/shared-components/side-bar/RecentAlbums.spec.ts @@ -16,7 +16,7 @@ describe('RecentAlbums component', () => { sdkMock.getAllAlbums.mockResolvedValueOnce([...albums]); render(RecentAlbums); - expect(sdkMock.getAllAlbums).toBeCalledTimes(1); + expect(sdkMock.getAllAlbums).toHaveBeenCalledOnce(); // wtf await tick(); diff --git a/web/src/lib/components/shared-components/side-bar/RecentAlbums.svelte b/web/src/lib/components/shared-components/side-bar/RecentAlbums.svelte index 2d4be43a00..10c772d8b8 100644 --- a/web/src/lib/components/shared-components/side-bar/RecentAlbums.svelte +++ b/web/src/lib/components/shared-components/side-bar/RecentAlbums.svelte @@ -11,7 +11,7 @@ const refreshAlbums = async () => { try { const allAlbums = await getAllAlbums({}); - albums = allAlbums.sort((a, b) => (a.updatedAt > b.updatedAt ? -1 : 1)).slice(0, 3); + albums = allAlbums.sort((a, b) => new Date(b.updatedAt).getTime() - new Date(a.updatedAt).getTime()).slice(0, 3); userInteraction.recentAlbums = albums; } catch (error) { handleError(error, $t('failed_to_load_assets')); diff --git a/web/src/lib/components/shared-components/side-bar/UserSidebar.svelte b/web/src/lib/components/shared-components/side-bar/UserSidebar.svelte index 8c142d68b1..a01b4533fc 100644 --- a/web/src/lib/components/shared-components/side-bar/UserSidebar.svelte +++ b/web/src/lib/components/shared-components/side-bar/UserSidebar.svelte @@ -31,6 +31,7 @@ mdiToolboxOutline, mdiTrashCan, mdiTrashCanOutline, + mdiUploadOutline, } from '@mdi/js'; import { t } from 'svelte-i18n'; import { fly } from 'svelte/transition'; @@ -83,6 +84,14 @@ {/if} + {#if authManager.preferences.recentlyAdded.sidebarWeb} + + {/if} + {#if authManager.preferences.folders.enabled && authManager.preferences.folders.sidebarWeb} {/if} diff --git a/web/src/lib/components/timeline/Month.svelte b/web/src/lib/components/timeline/Month.svelte index 7cbfd67ddf..423f0bec55 100644 --- a/web/src/lib/components/timeline/Month.svelte +++ b/web/src/lib/components/timeline/Month.svelte @@ -61,10 +61,8 @@ {@const isTimelineDaySelected = assetInteraction.selectedGroup.has(timelineDay.groupTitle)}
    { if (scrubberMonth === 'lead-in') { return relativeTopOffset * scrubberMonthPercent; - } else if (scrubberMonth === 'lead-out') { + } + if (scrubberMonth === 'lead-out') { let offset = relativeTopOffset; for (const segment of segments) { offset += segment.height; } return offset + relativeBottomOffset * scrubberMonthPercent; - } else if (scrubberMonth) { + } + if (scrubberMonth) { let offset = relativeTopOffset; let match = false; for (const segment of segments) { @@ -120,9 +122,8 @@ offset += scrubberMonthPercent * relativeBottomOffset; } return offset; - } else { - return scrubOverallPercent * (height - (PADDING_TOP + PADDING_BOTTOM)); } + return scrubOverallPercent * (height - (PADDING_TOP + PADDING_BOTTOM)); }; const scrollY = $derived( toScrollFromTimelineMonthPercentage(viewportTopMonth, viewportTopMonthScrollPercent, timelineScrollPercent), @@ -229,14 +230,14 @@ if (scrollY !== undefined) { if (scrollY < relativeTopOffset) { return segments.at(0)?.dateFormatted; - } else { - let offset = relativeTopOffset; - for (const segment of segments) { - offset += segment.height; - } - if (scrollY > offset) { - return segments.at(-1)?.dateFormatted; - } + } + + let offset = relativeTopOffset; + for (const segment of segments) { + offset += segment.height; + } + if (scrollY > offset) { + return segments.at(-1)?.dateFormatted; } } return scrollSegment?.dateFormatted || ''; @@ -338,7 +339,7 @@ overallScrollPercent: toTimelineY(hoverY), scrubberMonthScrollPercent: timelineMonthPercentY, }; - if (wasDragging === false && isDragging) { + if (!wasDragging && isDragging) { void startScrub?.(scrubData); void onScrub?.(scrubData); } diff --git a/web/src/lib/components/timeline/Timeline.svelte b/web/src/lib/components/timeline/Timeline.svelte index 7949e2ff1b..1fe6c7b097 100644 --- a/web/src/lib/components/timeline/Timeline.svelte +++ b/web/src/lib/components/timeline/Timeline.svelte @@ -201,7 +201,7 @@ export const scrollAfterNavigate = async () => { if (timelineManager.viewportHeight === 0 || timelineManager.viewportWidth === 0) { // this can happen if you do the following navigation order - // /photos?at=, /photos/, http://example.com, browser back, browser back + // /photos?at=, /photos/, https://example.com, browser back, browser back const rect = scrollableElement?.getBoundingClientRect(); if (rect) { timelineManager.viewportHeight = rect.height; @@ -209,10 +209,7 @@ } } const scrollTarget = assetViewerManager.gridScrollTarget?.at; - let scrolled = false; - if (scrollTarget) { - scrolled = await scrollAndLoadAsset(scrollTarget); - } + const scrolled = scrollTarget ? await scrollAndLoadAsset(scrollTarget) : false; if (!scrolled) { // if the asset is not found, scroll to the top timelineManager.scrollTo(0); @@ -503,10 +500,12 @@ }); $effect(() => { - if (assetViewerManager.asset && assetViewerManager.isViewing) { - const { localDateTime } = getTimes(assetViewerManager.asset.fileCreatedAt, DateTime.local().offset / 60); - void timelineManager.loadTimelineMonth({ year: localDateTime.year, month: localDateTime.month }); + if (!(assetViewerManager.asset && assetViewerManager.isViewing)) { + return; } + + const { localDateTime } = getTimes(assetViewerManager.asset.fileCreatedAt, DateTime.local().offset / 60); + void timelineManager.loadTimelineMonth({ year: localDateTime.year, month: localDateTime.month }); }); const assetSelectHandler = ( @@ -582,10 +581,7 @@ bind:scrubberWidth onScrubKeyDown={(evt) => { evt.preventDefault(); - let amount = 50; - if (keyboardManager.shift) { - amount = 500; - } + let amount = keyboardManager.shift ? 500 : 50; if (evt.key === 'ArrowUp') { amount = -amount; if (keyboardManager.shift) { diff --git a/web/src/lib/components/user-settings-page/DeviceCard.svelte b/web/src/lib/components/user-settings-page/DeviceCard.svelte index f3156b7e7d..49928ab383 100644 --- a/web/src/lib/components/user-settings-page/DeviceCard.svelte +++ b/web/src/lib/components/user-settings-page/DeviceCard.svelte @@ -58,7 +58,7 @@ {#if session.deviceType || session.deviceOS} {session.deviceOS || $t('unknown')} • {session.deviceType || $t('unknown')}{session.appVersion - ? `(v${session.appVersion})` + ? ` (v${session.appVersion})` : ''} {:else} diff --git a/web/src/lib/elements/FormatMessage.svelte b/web/src/lib/elements/FormatMessage.svelte index 3385ab3b56..cc097d783f 100644 --- a/web/src/lib/elements/FormatMessage.svelte +++ b/web/src/lib/elements/FormatMessage.svelte @@ -23,7 +23,7 @@ let { key, values = {}, children }: Props = $props(); const getLocale = (locale?: string | null) => { - if (locale == null) { + if (!locale) { throw new Error('Cannot format a message without first setting the initial locale.'); } @@ -41,10 +41,12 @@ for (const option of Object.values(element.options)) { for (const pluralElement of option.value) { - if (pluralElement.type === TYPE.tag) { - const tag = pluralElement.value; - replacements[tag] = (...parts) => `<${tag}>${parts}`; + if (pluralElement.type !== TYPE.tag) { + continue; } + + const tag = pluralElement.value; + replacements[tag] = (...parts) => `<${tag}>${parts}`; } } diff --git a/web/src/lib/elements/__test__/FormatMessage.spec.ts b/web/src/lib/elements/__test__/FormatMessage.spec.ts index 92db70a486..dc12680392 100644 --- a/web/src/lib/elements/__test__/FormatMessage.spec.ts +++ b/web/src/lib/elements/__test__/FormatMessage.spec.ts @@ -5,7 +5,7 @@ import { describe } from 'vitest'; import FormatMessage from '$lib/elements/FormatMessage.svelte'; import FormatTagB from '$lib/elements/__test__/FormatTagB.svelte'; -const getSanitizedHTML = (container: HTMLElement) => container.innerHTML.replaceAll('', ''); +const getSanitizedHTML = (container: HTMLElement) => container.getHTML().replaceAll('', ''); describe('FormatMessage component', () => { beforeAll(async () => { @@ -35,7 +35,7 @@ describe('FormatMessage component', () => { it('throws an error when locale is empty', async () => { await locale.set(undefined); - expect(() => render(FormatMessage, { key: '' as Translations })).toThrowError(); + expect(() => render(FormatMessage, { key: '' as Translations })).toThrow(); await locale.set('en'); }); diff --git a/web/src/lib/i18n.spec.ts b/web/src/lib/i18n.spec.ts index ccc60a835b..bac5dba4b7 100644 --- a/web/src/lib/i18n.spec.ts +++ b/web/src/lib/i18n.spec.ts @@ -6,7 +6,7 @@ describe('i18n', () => { const languageFiles = readdirSync('../i18n').sort(); for (const filename of languageFiles) { test(`${filename} should have a loader`, async () => { - if (!filename.endsWith('.json') || filename == 'package.json') { + if (!filename.endsWith('.json') || filename === 'package.json') { return; } @@ -58,5 +58,14 @@ describe('i18n', () => { expect(getClosestAvailableLocale(['sr_Cyrl'], allLocales)).toBe('sr_Cyrl'); expect(getClosestAvailableLocale(['zh_Hant'], allLocales)).toBe('zh_Hant'); }); + + it('should handle language aliases', () => { + const allLocales = ['zh-Hans', 'zh-Hant']; + expect(getClosestAvailableLocale(['zh-CN'], allLocales)).toBe('zh-Hans'); + expect(getClosestAvailableLocale(['zh-HK'], allLocales)).toBe('zh-Hant'); + expect(getClosestAvailableLocale(['zh-MO'], allLocales)).toBe('zh-Hant'); + expect(getClosestAvailableLocale(['zh-SG'], allLocales)).toBe('zh-Hans'); + expect(getClosestAvailableLocale(['zh-TW'], allLocales)).toBe('zh-Hant'); + }); }); }); diff --git a/web/src/lib/index.spec.ts b/web/src/lib/index.spec.ts index 20f1244d50..bac0f4cde4 100644 --- a/web/src/lib/index.spec.ts +++ b/web/src/lib/index.spec.ts @@ -12,6 +12,10 @@ describe('cleanClass', () => { it('should unnest arrays', () => { expect(cleanClass('class1', ['class2', 'class3'])).toBe('class1 class2 class3'); }); + + it('should unnest doubly nested arrays', () => { + expect(cleanClass('class1', [['class2a', 'class2b'], 'class3'])).toBe('class1 class2a class2b class3'); + }); }); describe('isDefined', () => { diff --git a/web/src/lib/index.ts b/web/src/lib/index.ts index 10f3deaadc..121087fdd3 100644 --- a/web/src/lib/index.ts +++ b/web/src/lib/index.ts @@ -3,8 +3,7 @@ import { twMerge } from 'tailwind-merge'; export const cleanClass = (...classNames: unknown[]) => { return twMerge( - classNames - .flatMap((className) => (Array.isArray(className) ? className : [className])) + flattenClass(classNames) .filter((className) => { if (!className || typeof className === 'boolean') { return false; @@ -16,6 +15,9 @@ export const cleanClass = (...classNames: unknown[]) => { ); }; +const flattenClass = (classNames: unknown[]): unknown[] => + classNames.flatMap((className) => (Array.isArray(className) ? flattenClass(className) : [className])); + export const isDefined = (value: T): value is NonNullable => value !== null && value !== undefined; export const getHeatmapRange = () => { diff --git a/web/src/lib/managers/VirtualScrollManager/VirtualScrollManager.svelte.ts b/web/src/lib/managers/VirtualScrollManager/VirtualScrollManager.svelte.ts index fdbc86a7db..e3e72aec82 100644 --- a/web/src/lib/managers/VirtualScrollManager/VirtualScrollManager.svelte.ts +++ b/web/src/lib/managers/VirtualScrollManager/VirtualScrollManager.svelte.ts @@ -55,7 +55,7 @@ export abstract class VirtualScrollManager { } #setHeaderHeight(value: number) { - if (this.#headerHeight == value) { + if (this.#headerHeight === value) { return false; } this.#headerHeight = value; @@ -67,7 +67,7 @@ export abstract class VirtualScrollManager { } #setGap(value: number) { - if (this.#gap == value) { + if (this.#gap === value) { return false; } this.#gap = value; @@ -79,7 +79,7 @@ export abstract class VirtualScrollManager { } #setRowHeight(value: number) { - if (this.#rowHeight == value) { + if (this.#rowHeight === value) { return false; } this.#rowHeight = value; diff --git a/web/src/lib/managers/asset-viewer-manager.svelte.ts b/web/src/lib/managers/asset-viewer-manager.svelte.ts index 551f50bc6d..94a6d00700 100644 --- a/web/src/lib/managers/asset-viewer-manager.svelte.ts +++ b/web/src/lib/managers/asset-viewer-manager.svelte.ts @@ -134,10 +134,12 @@ class AssetViewerManager extends BaseEventManager { } cancelZoomAnimation() { - if (this.#animationFrameId !== null) { - cancelAnimationFrame(this.#animationFrameId); - this.#animationFrameId = null; + if (this.#animationFrameId === null) { + return; } + + cancelAnimationFrame(this.#animationFrameId); + this.#animationFrameId = null; } animatedZoom(targetZoom: number, duration = 300) { diff --git a/web/src/lib/managers/auth-manager.svelte.ts b/web/src/lib/managers/auth-manager.svelte.ts index 38f71811ae..a34deb3b58 100644 --- a/web/src/lib/managers/auth-manager.svelte.ts +++ b/web/src/lib/managers/auth-manager.svelte.ts @@ -109,7 +109,7 @@ class AuthManager { await goto(redirectUri); } else { - globalThis.location.href = redirectUri; + location.assign(redirectUri); } } @@ -124,7 +124,7 @@ class AuthManager { } for (const cookie of document.cookie.split('; ')) { - const [name] = cookie.split('='); + const [name] = cookie.split('=', 1); if (name === 'immich_is_authenticated') { return true; } diff --git a/web/src/lib/managers/download-manager.svelte.ts b/web/src/lib/managers/download-manager.svelte.ts index 107f80b8dc..f08e5eb929 100644 --- a/web/src/lib/managers/download-manager.svelte.ts +++ b/web/src/lib/managers/download-manager.svelte.ts @@ -16,7 +16,7 @@ class DownloadManager { return; } - if (!this.assets[key]) { + if (!Object.hasOwn(this.assets, key)) { this.assets[key] = { progress: 0, total: 0, percentage: 0, abort: null }; } diff --git a/web/src/lib/managers/edit/transform-manager.svelte.ts b/web/src/lib/managers/edit/transform-manager.svelte.ts index dc9cf18bda..23ddc1f3ea 100644 --- a/web/src/lib/managers/edit/transform-manager.svelte.ts +++ b/web/src/lib/managers/edit/transform-manager.svelte.ts @@ -7,19 +7,6 @@ import { getDimensions } from '$lib/utils/asset-utils'; import { normalizeTransformEdits } from '$lib/utils/editor'; import { handleError } from '$lib/utils/handle-error'; -export type CropAspectRatio = - | '1:1' - | '16:9' - | '4:3' - | '3:2' - | '7:5' - | '9:16' - | '3:4' - | '2:3' - | '5:7' - | 'free' - | 'reset'; - type Region = { x: number; y: number; @@ -203,6 +190,7 @@ class TransformManager implements EditToolManager { passive: true, }); + // eslint-disable-next-line unicorn/no-unnecessary-global-this globalThis.addEventListener('mousemove', (e: MouseEvent) => transformManager.handleMouseMove(e), { passive: true }); const transformEdits = edits.filter((e) => e.action === 'rotate' || e.action === 'mirror'); @@ -220,6 +208,7 @@ class TransformManager implements EditToolManager { } onDeactivate() { + // eslint-disable-next-line unicorn/no-unnecessary-global-this globalThis.removeEventListener('mousemove', transformManager.handleMouseMove); this.reset(); @@ -563,6 +552,7 @@ class TransformManager implements EditToolManager { } document.body.style.userSelect = 'none'; + // eslint-disable-next-line unicorn/no-unnecessary-global-this globalThis.addEventListener('mouseup', () => this.handleMouseUp(), { passive: true }); } @@ -581,6 +571,7 @@ class TransformManager implements EditToolManager { } handleMouseUp() { + // eslint-disable-next-line unicorn/no-unnecessary-global-this globalThis.removeEventListener('mouseup', this.handleMouseUp); document.body.style.userSelect = ''; @@ -840,7 +831,7 @@ class TransformManager implements EditToolManager { return; } - const [widthRatio, heightRatio] = aspectRatio.split(':'); + const [widthRatio, heightRatio] = aspectRatio.split(':', 2); this.setAspectRatio(`${heightRatio}:${widthRatio}`); } diff --git a/web/src/lib/managers/event-manager.svelte.ts b/web/src/lib/managers/event-manager.svelte.ts index 15de65ca3f..e3264a7e22 100644 --- a/web/src/lib/managers/event-manager.svelte.ts +++ b/web/src/lib/managers/event-manager.svelte.ts @@ -16,6 +16,7 @@ import type { UserAdminResponseDto, WorkflowResponseDto, } from '@immich/sdk'; +import type { TimelineAsset } from '$lib/managers/timeline-manager/types'; import { BaseEventManager } from '$lib/utils/base-event-manager.svelte'; import type { TreeNode } from '$lib/utils/tree-utils'; @@ -35,6 +36,8 @@ export type Events = { AssetUpdate: [AssetResponseDto]; AssetsArchive: [string[]]; + AssetsUnarchive: [TimelineAsset[]]; + AssetsUndoArchive: [TimelineAsset[]]; AssetsDelete: [string[]]; AssetEditsApplied: [string]; AssetsTag: [string[]]; diff --git a/web/src/lib/managers/language-manager.svelte.ts b/web/src/lib/managers/language-manager.svelte.ts index 3e67160140..cf5352a8d2 100644 --- a/web/src/lib/managers/language-manager.svelte.ts +++ b/web/src/lib/managers/language-manager.svelte.ts @@ -5,12 +5,21 @@ import { langs } from '$lib/utils/i18n'; class LanguageManager { constructor() { eventManager.on({ - AppInit: () => lang.subscribe((lang) => this.setLanguage(lang)), + AppInit: () => this.init(), }); } + initialized = $state(false); rtl = $state(false); + init() { + if (this.initialized) { + return; + } + this.initialized = true; + lang.subscribe((lang) => this.setLanguage(lang)); + } + setLanguage(code: string) { const item = langs.find((item) => item.code === code); if (!item) { diff --git a/web/src/lib/managers/media-capabilities-manager.svelte.ts b/web/src/lib/managers/media-capabilities-manager.svelte.ts index ccabc6680d..96e2a783cc 100644 --- a/web/src/lib/managers/media-capabilities-manager.svelte.ts +++ b/web/src/lib/managers/media-capabilities-manager.svelte.ts @@ -89,4 +89,5 @@ class MediaCapabilitiesManager { } export const mediaCapabilitiesManager = new MediaCapabilitiesManager(); +// eslint-disable-next-line unicorn/no-top-level-side-effects mediaCapabilitiesManager.init(); diff --git a/web/src/lib/managers/memory-manager.svelte.ts b/web/src/lib/managers/memory-manager.svelte.ts index 25f998ec82..dc43510396 100644 --- a/web/src/lib/managers/memory-manager.svelte.ts +++ b/web/src/lib/managers/memory-manager.svelte.ts @@ -3,7 +3,6 @@ import { DateTime } from 'luxon'; import { authManager } from '$lib/managers/auth-manager.svelte'; import { eventManager } from '$lib/managers/event-manager.svelte'; import type { TimelineAsset } from '$lib/managers/timeline-manager/types'; -import { asLocalTimeISO } from '$lib/utils/date-time'; import { toTimelineAsset } from '$lib/utils/timeline-util'; type MemoryIndex = { @@ -131,7 +130,7 @@ class MemoryManager { } private async load() { - const memories = await searchMemories({ $for: asLocalTimeISO(DateTime.now()) }); + const memories = await searchMemories({ $for: DateTime.now().toFormat('yyyy-MM-dd') }); this.memories = memories.filter((memory) => memory.assets.length > 0); } diff --git a/web/src/lib/managers/timeline-manager/group-insertion-cache.svelte.ts b/web/src/lib/managers/timeline-manager/group-insertion-cache.svelte.ts index 5c373c0437..a363a05959 100644 --- a/web/src/lib/managers/timeline-manager/group-insertion-cache.svelte.ts +++ b/web/src/lib/managers/timeline-manager/group-insertion-cache.svelte.ts @@ -19,10 +19,10 @@ export class GroupInsertionCache { } setTimelineDay(timelineDay: TimelineDay, { year, month, day }: TimelineDate) { - if (!this.#lookupCache[year]) { + if (!Object.hasOwn(this.#lookupCache, year)) { this.#lookupCache[year] = {}; } - if (!this.#lookupCache[year][month]) { + if (!Object.hasOwn(this.#lookupCache[year], month)) { this.#lookupCache[year][month] = {}; } this.#lookupCache[year][month][day] = timelineDay; diff --git a/web/src/lib/managers/timeline-manager/internal/layout-support.svelte.ts b/web/src/lib/managers/timeline-manager/internal/layout-support.svelte.ts index fc2902bb63..3f9854161f 100644 --- a/web/src/lib/managers/timeline-manager/internal/layout-support.svelte.ts +++ b/web/src/lib/managers/timeline-manager/internal/layout-support.svelte.ts @@ -41,8 +41,6 @@ export function layoutTimelineMonth(timelineManager: TimelineManager, month: Tim timelineDay.col = timelineDayCol++; timelineDay.start = cumulativeWidth; timelineDay.top = cumulativeHeight; - - cumulativeWidth += timelineDay.width + timelineManager.gap; } else { // Move to next row cumulativeHeight += currentRowHeight; @@ -57,8 +55,8 @@ export function layoutTimelineMonth(timelineManager: TimelineManager, month: Tim timelineDay.top = cumulativeHeight; timelineDayCol++; - cumulativeWidth += timelineDay.width + timelineManager.gap; } + cumulativeWidth += timelineDay.width + timelineManager.gap; currentRowHeight = timelineDay.height + timelineManager.headerHeight; } diff --git a/web/src/lib/managers/timeline-manager/internal/search-support.svelte.ts b/web/src/lib/managers/timeline-manager/internal/search-support.svelte.ts index 8a73bcce7d..d6104f4051 100644 --- a/web/src/lib/managers/timeline-manager/internal/search-support.svelte.ts +++ b/web/src/lib/managers/timeline-manager/internal/search-support.svelte.ts @@ -1,6 +1,6 @@ -import { AssetOrder, type AssetResponseDto } from '@immich/sdk'; +import { AssetOrder, AssetOrderBy, type AssetResponseDto } from '@immich/sdk'; import { DateTime } from 'luxon'; -import { plainDateTimeCompare, type TimelineYearMonth } from '$lib/utils/timeline-util'; +import { getOrderingDate, plainDateTimeCompare, type TimelineYearMonth } from '$lib/utils/timeline-util'; import { TimelineManager } from '../timeline-manager.svelte'; import type { TimelineMonth } from '../timeline-month.svelte'; import type { AssetDescriptor, Direction, TimelineAsset } from '../types'; @@ -125,7 +125,14 @@ export async function retrieveRange(timelineManager: TimelineManager, start: Ass return []; } const assetOrder: AssetOrder = timelineManager.getAssetOrder(); - if (plainDateTimeCompare(assetOrder === AssetOrder.Desc, startAsset.localDateTime, endAsset.localDateTime) < 0) { + const orderBy: AssetOrderBy = timelineManager.getOrderBy(); + if ( + plainDateTimeCompare( + assetOrder === AssetOrder.Desc, + getOrderingDate(startAsset, orderBy), + getOrderingDate(endAsset, orderBy), + ) < 0 + ) { [startAsset, endAsset] = [endAsset, startAsset]; // eslint-disable-next-line no-useless-assignment [startTimelineMonth, endTimelineMonth] = [endTimelineMonth, startTimelineMonth]; diff --git a/web/src/lib/managers/timeline-manager/internal/utils.svelte.ts b/web/src/lib/managers/timeline-manager/internal/utils.svelte.ts index a1b580a966..0dcf7346f6 100644 --- a/web/src/lib/managers/timeline-manager/internal/utils.svelte.ts +++ b/web/src/lib/managers/timeline-manager/internal/utils.svelte.ts @@ -13,7 +13,7 @@ export function updateObject(target: any, source: any): boolean { } const isDate = target[key] instanceof Date; if (typeof target[key] === 'object' && !isDate) { - updated = updated || updateObject(target[key], source[key]); + updated ||= updateObject(target[key], source[key]); } else { if (target[key] !== source[key]) { target[key] = source[key]; diff --git a/web/src/lib/managers/timeline-manager/timeline-manager.svelte.spec.ts b/web/src/lib/managers/timeline-manager/timeline-manager.svelte.spec.ts index 193b0b07f5..f44f8a3046 100644 --- a/web/src/lib/managers/timeline-manager/timeline-manager.svelte.spec.ts +++ b/web/src/lib/managers/timeline-manager/timeline-manager.svelte.spec.ts @@ -1,4 +1,4 @@ -import { AssetVisibility, type AssetResponseDto, type TimeBucketAssetResponseDto } from '@immich/sdk'; +import { AssetOrderBy, AssetVisibility, type AssetResponseDto, type TimeBucketAssetResponseDto } from '@immich/sdk'; import { tick } from 'svelte'; import { sdkMock } from '$lib/__mocks__/sdk.mock'; import { eventManager } from '$lib/managers/event-manager.svelte'; @@ -70,7 +70,7 @@ describe('TimelineManager', () => { }); it('should load months in viewport', () => { - expect(sdkMock.getTimeBuckets).toBeCalledTimes(1); + expect(sdkMock.getTimeBuckets).toHaveBeenCalledOnce(); expect(sdkMock.getTimeBucket).toHaveBeenCalledTimes(2); }); @@ -133,13 +133,13 @@ describe('TimelineManager', () => { it('loads a month', async () => { expect(getTimelineMonthByDate(timelineManager, { year: 2024, month: 1 })?.getAssets().length).toEqual(0); await timelineManager.loadTimelineMonth({ year: 2024, month: 1 }); - expect(sdkMock.getTimeBucket).toBeCalledTimes(1); + expect(sdkMock.getTimeBucket).toHaveBeenCalledOnce(); expect(getTimelineMonthByDate(timelineManager, { year: 2024, month: 1 })?.getAssets().length).toEqual(3); }); it('ignores invalid months', async () => { await timelineManager.loadTimelineMonth({ year: 2023, month: 1 }); - expect(sdkMock.getTimeBucket).toBeCalledTimes(0); + expect(sdkMock.getTimeBucket).not.toHaveBeenCalled(); }); it('cancels month loading', async () => { @@ -147,7 +147,7 @@ describe('TimelineManager', () => { void timelineManager.loadTimelineMonth({ year: 2024, month: 1 }); const abortSpy = vi.spyOn(month!.loader!.cancelToken!, 'abort'); month?.cancel(); - expect(abortSpy).toBeCalledTimes(1); + expect(abortSpy).toHaveBeenCalledOnce(); await timelineManager.loadTimelineMonth({ year: 2024, month: 1 }); expect(getTimelineMonthByDate(timelineManager, { year: 2024, month: 1 })?.getAssets().length).toEqual(3); }); @@ -157,10 +157,10 @@ describe('TimelineManager', () => { timelineManager.loadTimelineMonth({ year: 2024, month: 1 }), timelineManager.loadTimelineMonth({ year: 2024, month: 1 }), ]); - expect(sdkMock.getTimeBucket).toBeCalledTimes(1); + expect(sdkMock.getTimeBucket).toHaveBeenCalledOnce(); await timelineManager.loadTimelineMonth({ year: 2024, month: 1 }); - expect(sdkMock.getTimeBucket).toBeCalledTimes(1); + expect(sdkMock.getTimeBucket).toHaveBeenCalledOnce(); }); it('allows loading a canceled month', async () => { @@ -283,7 +283,7 @@ describe('TimelineManager', () => { const asset = deriveLocalDateTimeFromFileCreatedAt(timelineAssetFactory.build()); timelineManager.upsertAssets([asset]); - expect(updateAssetsSpy).toBeCalledWith([asset]); + expect(updateAssetsSpy).toHaveBeenCalledWith([asset]); expect(timelineManager.assetCount).toEqual(1); }); @@ -642,8 +642,8 @@ describe('TimelineManager', () => { const previousMonthSpy = vi.spyOn(previousMonth!.loader!, 'execute'); const previous = await timelineManager.getLaterAsset(a); expect(previous).toEqual(b); - expect(loadTimelineMonthSpy).toBeCalledTimes(0); - expect(previousMonthSpy).toBeCalledTimes(0); + expect(loadTimelineMonthSpy).not.toHaveBeenCalled(); + expect(previousMonthSpy).not.toHaveBeenCalled(); }); it('skips removed assets', async () => { @@ -808,4 +808,44 @@ describe('TimelineManager', () => { expect(b.showAssetOwners).toBe(true); }); }); + + describe('retrieveRange', () => { + it('uses createdAt ordering in the Recently Added view (orderBy=CreatedAt)', async () => { + // Simulate the "Recently Added" bug: two assets whose localDateTime order is + // the reverse of their createdAt (upload) order. Before the fix, retrieveRange + // compared localDateTime and selected the wrong range direction. + const timelineManager = new TimelineManager(); + sdkMock.getTimeBuckets.mockResolvedValue([]); + await timelineManager.updateOptions({ orderBy: AssetOrderBy.CreatedAt }); + + // assetA was taken recently (2024) but uploaded first (2025-01) + const assetA = timelineAssetFactory.build({ + localDateTime: fromISODateTimeUTCToObject('2024-06-01T00:00:00.000Z'), + createdAt: fromISODateTimeUTCToObject('2025-01-20T00:00:00.000Z'), + fileCreatedAt: fromISODateTimeUTCToObject('2025-01-20T00:00:00.000Z'), + }); + // assetB was taken long ago (2018) but uploaded second (2025-02) + const assetB = timelineAssetFactory.build({ + localDateTime: fromISODateTimeUTCToObject('2018-03-15T00:00:00.000Z'), + createdAt: fromISODateTimeUTCToObject('2025-02-10T00:00:00.000Z'), + fileCreatedAt: fromISODateTimeUTCToObject('2025-02-10T00:00:00.000Z'), + }); + // assetC is an unrelated asset that should not appear in the selection + const assetC = timelineAssetFactory.build({ + localDateTime: fromISODateTimeUTCToObject('2022-01-01T00:00:00.000Z'), + createdAt: fromISODateTimeUTCToObject('2025-03-01T00:00:00.000Z'), + fileCreatedAt: fromISODateTimeUTCToObject('2025-03-01T00:00:00.000Z'), + }); + + timelineManager.upsertAssets([assetA, assetB, assetC]); + + // Shift-click from assetB (uploaded most recently) to assetA — the range + // between them in the "Recently Added" timeline should contain only those two. + const range = await timelineManager.retrieveRange({ id: assetB.id }, { id: assetA.id }); + const ids = range.map((a) => a.id); + expect(ids).toContain(assetA.id); + expect(ids).toContain(assetB.id); + expect(ids).not.toContain(assetC.id); + }); + }); }); diff --git a/web/src/lib/managers/timeline-manager/timeline-manager.svelte.ts b/web/src/lib/managers/timeline-manager/timeline-manager.svelte.ts index 5ac2deaa54..3f8277fbc4 100644 --- a/web/src/lib/managers/timeline-manager/timeline-manager.svelte.ts +++ b/web/src/lib/managers/timeline-manager/timeline-manager.svelte.ts @@ -1,4 +1,4 @@ -import { AssetOrder, getAssetInfo, getTimeBuckets, AssetOrderBy, type AssetResponseDto } from '@immich/sdk'; +import { AssetOrder, AssetOrderBy, getAssetInfo, getTimeBuckets, type AssetResponseDto } from '@immich/sdk'; import { clamp, isEqual } from 'lodash-es'; import { SvelteDate, SvelteSet } from 'svelte/reactivity'; import { VirtualScrollManager } from '$lib/managers/VirtualScrollManager/VirtualScrollManager.svelte'; @@ -114,7 +114,15 @@ export class TimelineManager extends VirtualScrollManager { this.#unsubscribes.push( eventManager.on({ - AssetUpdate: (asset: AssetResponseDto) => this.#updateAssets([toTimelineAsset(asset)]), + AssetUpdate: (asset: AssetResponseDto) => { + const timelineAsset = toTimelineAsset(asset); + if (this.#options.albumId || this.#options.personId) { + this.#updateAssets([timelineAsset]); + } else { + this.upsertAssets([timelineAsset]); + } + }, + AssetsUnarchive: (assets) => this.upsertAssets(assets), }), ); } @@ -349,10 +357,7 @@ export class TimelineManager extends VirtualScrollManager { } async loadTimelineMonth(yearMonth: TimelineYearMonth, options?: { cancelable: boolean }): Promise { - let cancelable = true; - if (options) { - cancelable = options.cancelable; - } + const cancelable = options?.cancelable ?? true; const timelineMonth = getTimelineMonthByDate(this, yearMonth); if (!timelineMonth) { return; @@ -509,10 +514,7 @@ export class TimelineManager extends VirtualScrollManager { // eslint-disable-next-line svelte/prefer-svelte-reactivity const idsToUpdate = new Set(cache.keys()); const result = this.#runAssetCallback(idsToUpdate, (asset) => void updateObject(asset, cache.get(asset.id))); - const notUpdated: TimelineAsset[] = []; - for (const assetId of result.notUpdated) { - notUpdated.push(cache.get(assetId)!); - } + const notUpdated: TimelineAsset[] = Array.from(result.notUpdated, (assetId) => cache.get(assetId)!); return notUpdated; } @@ -623,6 +625,10 @@ export class TimelineManager extends VirtualScrollManager { return this.#options.order ?? AssetOrder.Desc; } + getOrderBy() { + return this.#options.orderBy ?? AssetOrderBy.TakenAt; + } + protected postCreateSegments(): void { this.months.sort((a, b) => { return a.yearMonth.year === b.yearMonth.year diff --git a/web/src/lib/managers/timeline-manager/timeline-month.svelte.ts b/web/src/lib/managers/timeline-manager/timeline-month.svelte.ts index 49350ed257..58b36769b9 100644 --- a/web/src/lib/managers/timeline-manager/timeline-month.svelte.ts +++ b/web/src/lib/managers/timeline-manager/timeline-month.svelte.ts @@ -15,12 +15,12 @@ import { fromTimelinePlainDate, fromTimelinePlainDateTime, fromTimelinePlainYearMonth, - fromISODateTimeUTCToObject, getTimes, setDifference, type TimelineDateTime, type TimelineYearMonth, getOrderingDate, + fromISODateTimeUTC, } from '$lib/utils/timeline-util'; import { GroupInsertionCache } from './group-insertion-cache.svelte'; import { TimelineDay } from './timeline-day.svelte'; @@ -145,21 +145,23 @@ export class TimelineMonth { const combinedMoveAssets: MoveAsset[][] = []; let index = timelineDays.length; while (index--) { - if (idsToProcess.size > 0) { - const group = timelineDays[index]; - const { moveAssets, processedIds, changedGeometry } = group.runAssetCallback(ids, callback); - if (moveAssets.length > 0) { - combinedMoveAssets.push(moveAssets); - } - idsToProcess = setDifference(idsToProcess, processedIds); - for (const id of processedIds) { - idsProcessed.add(id); - } - combinedChangedGeometry = combinedChangedGeometry || changedGeometry; - if (group.viewerAssets.length === 0) { - timelineDays.splice(index, 1); - combinedChangedGeometry = true; - } + if (idsToProcess.size === 0) { + continue; + } + + const group = timelineDays[index]; + const { moveAssets, processedIds, changedGeometry } = group.runAssetCallback(ids, callback); + if (moveAssets.length > 0) { + combinedMoveAssets.push(moveAssets); + } + idsToProcess = setDifference(idsToProcess, processedIds); + for (const id of processedIds) { + idsProcessed.add(id); + } + combinedChangedGeometry ||= changedGeometry; + if (group.viewerAssets.length === 0) { + timelineDays.splice(index, 1); + combinedChangedGeometry = true; } } return { @@ -190,12 +192,12 @@ export class TimelineMonth { isVideo: !bucketAssets.isImage[i], livePhotoVideoId: bucketAssets.livePhotoVideoId[i], localDateTime, - createdAt: fromISODateTimeUTCToObject(bucketAssets.createdAt[i]), + createdAt: fromISODateTimeUTC(bucketAssets.createdAt[i]).toLocal().toObject(), fileCreatedAt, ownerId: bucketAssets.ownerId[i], projectionType: bucketAssets.projectionType[i], ratio: bucketAssets.ratio[i], - stack: bucketAssets.stack?.[i] + stack: bucketAssets.stack?.at(i) ? { id: bucketAssets.stack[i]![0], primaryAssetId: bucketAssets.id[i], @@ -206,7 +208,7 @@ export class TimelineMonth { people: null, // People are not included in the bucket assets }; - if (bucketAssets.latitude?.[i] && bucketAssets.longitude?.[i]) { + if (bucketAssets.latitude?.at(i) && bucketAssets.longitude?.at(i)) { timelineAsset.latitude = bucketAssets.latitude?.[i]; timelineAsset.longitude = bucketAssets.longitude?.[i]; } diff --git a/web/src/lib/managers/timeline-manager/types.ts b/web/src/lib/managers/timeline-manager/types.ts index 3bd921a657..70a53368fd 100644 --- a/web/src/lib/managers/timeline-manager/types.ts +++ b/web/src/lib/managers/timeline-manager/types.ts @@ -47,11 +47,6 @@ export interface Viewport { height: number; } -export type ViewportXY = Viewport & { - x: number; - y: number; -}; - export interface AddAsset { type: 'add'; values: TimelineAsset[]; @@ -82,12 +77,6 @@ export type ScrubberMonth = { title: string; }; -export type TimelineManagerLayoutOptions = { - rowHeight?: number; - headerHeight?: number; - gap?: number; -}; - export interface UpdateGeometryOptions { invalidateHeight: boolean; noDefer?: boolean; diff --git a/web/src/lib/managers/timeline-manager/utils.svelte.ts b/web/src/lib/managers/timeline-manager/utils.svelte.ts index efc94206ea..377f841f98 100644 --- a/web/src/lib/managers/timeline-manager/utils.svelte.ts +++ b/web/src/lib/managers/timeline-manager/utils.svelte.ts @@ -1,6 +1,5 @@ import type { TimelineAsset } from './types'; -export const assetSnapshot = (asset: TimelineAsset): TimelineAsset => $state.snapshot(asset); export const assetsSnapshot = (assets: TimelineAsset[]) => assets.map((asset) => $state.snapshot(asset)); export function filterIsInOrNearViewport(items: T[]) { diff --git a/web/src/lib/modals/AlbumEditModal.svelte b/web/src/lib/modals/AlbumEditModal.svelte index 7c4ee9b626..c5386a6a0d 100644 --- a/web/src/lib/modals/AlbumEditModal.svelte +++ b/web/src/lib/modals/AlbumEditModal.svelte @@ -17,7 +17,7 @@ let description = $state(album.description); const onSubmit = async () => { - const success = await handleUpdateAlbum(album, { albumName, description }); + const success = await handleUpdateAlbum(album, { albumName, description: description || null }); if (success) { onClose(); } diff --git a/web/src/lib/modals/AlbumOptionsModal.svelte b/web/src/lib/modals/AlbumOptionsModal.svelte index 93c95bbeaf..40d605daa2 100644 --- a/web/src/lib/modals/AlbumOptionsModal.svelte +++ b/web/src/lib/modals/AlbumOptionsModal.svelte @@ -122,7 +122,7 @@ options={[ { label: $t('role_editor'), value: AlbumUserRole.Editor }, { label: $t('role_viewer'), value: AlbumUserRole.Viewer }, - { label: $t('owner'), value: AlbumUserRole.Owner }, + { label: $t('owner'), value: AlbumUserRole.Owner, disabled: true }, { label: $t('remove_user'), value: 'none' }, ] as SelectOption[]} onChange={(value) => handleRoleSelect(user, value)} diff --git a/web/src/lib/modals/AlbumPickerModal.spec.ts b/web/src/lib/modals/AlbumPickerModal.spec.ts new file mode 100644 index 0000000000..4245f3e17f --- /dev/null +++ b/web/src/lib/modals/AlbumPickerModal.spec.ts @@ -0,0 +1,58 @@ +import { render, screen, waitFor } from '@testing-library/svelte'; +import { init, register, waitLocale } from 'svelte-i18n'; +import { getAnimateMock } from '$lib/__mocks__/animate.mock'; +import { getIntersectionObserverMock } from '$lib/__mocks__/intersection-observer.mock'; +import { sdkMock } from '$lib/__mocks__/sdk.mock'; +import { getVisualViewportMock } from '$lib/__mocks__/visual-viewport.mock'; +import AlbumPickerModal from './AlbumPickerModal.svelte'; + +describe('AlbumPickerModal component', () => { + const onClose = vi.fn(); + + beforeAll(async () => { + await init({ fallbackLocale: 'en-US' }); + register('en-US', () => import('$i18n/en.json')); + await waitLocale('en-US'); + }); + + beforeEach(() => { + vi.stubGlobal('IntersectionObserver', getIntersectionObserverMock()); + vi.stubGlobal('visualViewport', getVisualViewportMock()); + vi.resetAllMocks(); + Element.prototype.animate = getAnimateMock(); + }); + + afterAll(async () => { + await waitFor(() => { + expect(document.body.style.pointerEvents).not.toBe('none'); + }); + }); + + it('shows the singular selection count title when selectedItemsCount is 1', async () => { + // Called by onMount() + sdkMock.getAllAlbums.mockResolvedValueOnce([]); + + render(AlbumPickerModal, { props: { onClose, selectedItemsCount: 1 } }); + + expect(await screen.findByText('Add 1 item to album')).toBeInTheDocument(); + expect(screen.queryByText('Select albums')).not.toBeInTheDocument(); + }); + + it('shows the plural selection count title when selectedItemsCount is greater than 1', async () => { + sdkMock.getAllAlbums.mockResolvedValueOnce([]); + + render(AlbumPickerModal, { props: { onClose, selectedItemsCount: 3 } }); + + expect(await screen.findByText('Add 3 items to album')).toBeInTheDocument(); + expect(screen.queryByText('Select albums')).not.toBeInTheDocument(); + }); + + it('shows the generic title when selectedItemsCount is not provided', async () => { + sdkMock.getAllAlbums.mockResolvedValueOnce([]); + + render(AlbumPickerModal, { props: { onClose } }); + + expect(await screen.findByText('Select albums')).toBeInTheDocument(); + expect(screen.queryByText('Add 1 item to album')).not.toBeInTheDocument(); + }); +}); diff --git a/web/src/lib/modals/AlbumPickerModal.svelte b/web/src/lib/modals/AlbumPickerModal.svelte index 1d96a04eff..19430e271c 100644 --- a/web/src/lib/modals/AlbumPickerModal.svelte +++ b/web/src/lib/modals/AlbumPickerModal.svelte @@ -23,9 +23,10 @@ type Props = { onClose: (albums?: AlbumResponseDto[]) => void; + selectedItemsCount?: number; }; - let { onClose }: Props = $props(); + let { onClose, selectedItemsCount }: Props = $props(); onMount(async () => { albums = await getAllAlbums({}); @@ -137,6 +138,7 @@ break; } case 'Control': { + // eslint-disable-next-line unicorn/no-late-event-control e.preventDefault(); handleMultiSelect(); break; @@ -146,9 +148,15 @@ } } }; + + const title = $derived( + selectedItemsCount === undefined + ? $t('select_albums') + : $t('add_to_album_item_count', { values: { count: selectedItemsCount } }), + ); - +
    {#if loading} diff --git a/web/src/lib/modals/AppDownloadModal.svelte b/web/src/lib/modals/AppDownloadModal.svelte index 84d7630909..01a998bf5c 100644 --- a/web/src/lib/modals/AppDownloadModal.svelte +++ b/web/src/lib/modals/AppDownloadModal.svelte @@ -1,5 +1,5 @@ - + diff --git a/web/src/lib/modals/GeolocationPointPickerModal.svelte b/web/src/lib/modals/GeolocationPointPickerModal.svelte index 069f62d3ac..657f919433 100644 --- a/web/src/lib/modals/GeolocationPointPickerModal.svelte +++ b/web/src/lib/modals/GeolocationPointPickerModal.svelte @@ -85,8 +85,8 @@ // Try to parse coordinate pair from search input in the format `LATITUDE, LONGITUDE` as floats const coordinateParts = searchWord.split(',').map((part) => part.trim()); if (coordinateParts.length === 2) { - const coordinateLat = Number.parseFloat(coordinateParts[0]); - const coordinateLng = Number.parseFloat(coordinateParts[1]); + const coordinateLat = Number(coordinateParts[0]); + const coordinateLng = Number(coordinateParts[1]); if ( !Number.isNaN(coordinateLat) && @@ -106,18 +106,22 @@ searchPlaces({ name: searchWord }) .then((searchResult) => { // skip result when a newer search is happening - if (latestSearchTimeout === searchTimeout) { - places = searchResult; - showLoadingSpinner = false; + if (latestSearchTimeout !== searchTimeout) { + return; } + + places = searchResult; + showLoadingSpinner = false; }) .catch((error) => { // skip error when a newer search is happening - if (latestSearchTimeout === searchTimeout) { - places = []; - handleError(error, $t('errors.cant_search_places')); - showLoadingSpinner = false; + if (latestSearchTimeout !== searchTimeout) { + return; } + + places = []; + handleError(error, $t('errors.cant_search_places')); + showLoadingSpinner = false; }); }, timeDebounceOnSearch); latestSearchTimeout = searchTimeout; diff --git a/web/src/lib/modals/GeolocationUpdateConfirmModal.svelte b/web/src/lib/modals/GeolocationUpdateConfirmModal.svelte index 8230f62c73..a57dd1db6e 100644 --- a/web/src/lib/modals/GeolocationUpdateConfirmModal.svelte +++ b/web/src/lib/modals/GeolocationUpdateConfirmModal.svelte @@ -13,6 +13,7 @@ const { point, assetCount, onClose }: Props = $props(); const hasExistingLocations = $derived( + // eslint-disable-next-line eqeqeq assetMultiSelectManager.assets.some((asset) => asset.latitude != null || asset.longitude != null), ); diff --git a/web/src/lib/modals/PersonEditBirthDateModal.svelte b/web/src/lib/modals/PersonEditBirthDateModal.svelte index 4d6fa47ffc..6199c7b482 100644 --- a/web/src/lib/modals/PersonEditBirthDateModal.svelte +++ b/web/src/lib/modals/PersonEditBirthDateModal.svelte @@ -15,7 +15,7 @@ let birthDate = $derived(person.birthDate ? DateTime.fromISO(person.birthDate) : undefined); const onSubmit = async () => { - const success = await handleUpdatePersonBirthDate(person, birthDate?.toISODate() ?? ''); + const success = await handleUpdatePersonBirthDate(person, birthDate?.toISODate() ?? null); if (success) { onClose(); } diff --git a/web/src/lib/modals/PersonMergeSuggestionModal.svelte b/web/src/lib/modals/PersonMergeSuggestionModal.svelte index 1471bc4a51..94006ed5e7 100644 --- a/web/src/lib/modals/PersonMergeSuggestionModal.svelte +++ b/web/src/lib/modals/PersonMergeSuggestionModal.svelte @@ -28,6 +28,7 @@ const changePersonToMerge = (newPerson: PersonResponseDto) => { const index = potentialMergePeople.indexOf(newPerson); + // eslint-disable-next-line unicorn/no-unreadable-array-destructuring [potentialMergePeople[index], personToBeMergedInto] = [personToBeMergedInto, potentialMergePeople[index]]; choosePersonToMerge = false; }; @@ -62,13 +63,16 @@
    {#if !choosePersonToMerge}
    - + + {#key personToMerge.id} + + {/key}
    @@ -100,14 +104,16 @@ } }} > - 0} - circle - shadow - url={getPeopleThumbnailUrl(personToBeMergedInto)} - altText={personToBeMergedInto.name} - widthStyle="100%" - /> + {#key personToBeMergedInto.id} + 0} + circle + shadow + url={getPeopleThumbnailUrl(personToBeMergedInto)} + altText={personToBeMergedInto.name} + widthStyle="100%" + /> + {/key} {:else}
    @@ -115,6 +121,7 @@
    +
    {#each potentialMergePeople as person (person.id)}
    diff --git a/web/src/lib/modals/PluginMethodPicker.svelte b/web/src/lib/modals/PluginMethodPicker.svelte index 230f5a2257..c0b03f967d 100644 --- a/web/src/lib/modals/PluginMethodPicker.svelte +++ b/web/src/lib/modals/PluginMethodPicker.svelte @@ -12,7 +12,7 @@ const { trigger, selectedKey, onClose }: Props = $props(); - + onClose()} size="medium"> {#await searchPluginMethods({ trigger })}
    diff --git a/web/src/lib/modals/SearchFilterModal.svelte b/web/src/lib/modals/SearchFilterModal.svelte index 6766009af8..2acb885d4a 100644 --- a/web/src/lib/modals/SearchFilterModal.svelte +++ b/web/src/lib/modals/SearchFilterModal.svelte @@ -31,9 +31,9 @@ const formId = generateId(); // combobox and all the search components have terrible support for value | null so we use empty string instead. - function withNullAsUndefined(value: T | null) { - return value === null ? undefined : value; - } + const withNullAsEmptyString = (value: T | null) => (value === null ? '' : value); + + const emptyStringToNull = (value: string | undefined) => (value === '' ? null : value); function storeQueryType(type: SearchFilter['queryType']) { localStorage.setItem('searchQueryType', type); @@ -45,10 +45,8 @@ } const asFilter = (searchQuery: SmartSearchDto | MetadataSearchDto): SearchFilter => { - let query = ''; - if ('query' in searchQuery && searchQuery.query) { - query = searchQuery.query; - } + let query = 'query' in searchQuery && searchQuery.query ? searchQuery.query : ''; + if ('originalFileName' in searchQuery && searchQuery.originalFileName) { query = searchQuery.originalFileName; } @@ -70,14 +68,14 @@ : new SvelteSet(searchQuery.tagIds) : new SvelteSet(), location: { - country: withNullAsUndefined(searchQuery.country), - state: withNullAsUndefined(searchQuery.state), - city: withNullAsUndefined(searchQuery.city), + country: withNullAsEmptyString(searchQuery.country), + state: withNullAsEmptyString(searchQuery.state), + city: withNullAsEmptyString(searchQuery.city), }, camera: { - make: withNullAsUndefined(searchQuery.make), - model: withNullAsUndefined(searchQuery.model), - lensModel: withNullAsUndefined(searchQuery.lensModel), + make: withNullAsEmptyString(searchQuery.make), + model: withNullAsEmptyString(searchQuery.model), + lensModel: withNullAsEmptyString(searchQuery.lensModel), }, date: { takenAfter: searchQuery.takenAfter ? toStartOfDayDate(searchQuery.takenAfter) : undefined, @@ -137,12 +135,12 @@ originalFileName: filter.queryType === 'metadata' ? query : undefined, description: filter.queryType === 'description' ? query : undefined, originalPath: filter.queryType === 'fullPath' ? filter.query.trim() || undefined : undefined, - country: filter.location.country, - state: filter.location.state, - city: filter.location.city, - make: filter.camera.make, - model: filter.camera.model, - lensModel: filter.camera.lensModel, + country: emptyStringToNull(filter.location.country), + state: emptyStringToNull(filter.location.state), + city: emptyStringToNull(filter.location.city), + make: emptyStringToNull(filter.camera.make), + model: emptyStringToNull(filter.camera.model), + lensModel: emptyStringToNull(filter.camera.lensModel), takenAfter: filter.date.takenAfter ? asLocalTimeISO(filter.date.takenAfter.startOf('day') as DateTime) : undefined, diff --git a/web/src/lib/modals/ServerAboutModal.svelte b/web/src/lib/modals/ServerAboutModal.svelte index 412dbe4e20..6fc3ff99bc 100644 --- a/web/src/lib/modals/ServerAboutModal.svelte +++ b/web/src/lib/modals/ServerAboutModal.svelte @@ -61,7 +61,7 @@ {/if} - {#if info.buildImage && info.buildImage} + {#if info.buildImage && info.buildImageUrl} + import { type WorkflowLogEntryDto, type WorkflowResponseDto, WorkflowResult, getWorkflowLogs } from '@immich/sdk'; + import { + Modal, + ModalBody, + Table, + TableHeader, + TableHeading, + TableBody, + TableRow, + TableCell, + HStack, + Icon, + VStack, + Button, + Select, + type SelectOption, + } from '@immich/ui'; + import { mdiHistory, mdiOpenInNew } from '@mdi/js'; + import { t } from 'svelte-i18n'; + import { locale } from '$lib/stores/preferences.store'; + import { DateTime } from 'luxon'; + import { Route } from '$lib/route'; + import { handleUpdateWorkflow } from '$lib/services/workflow.service'; + + type Props = { + workflow: WorkflowResponseDto; + onClose: () => void; + }; + + let { workflow, onClose }: Props = $props(); + + let entries: WorkflowLogEntryDto[] = $state([]); + let placeholder = $state(); + let filter = $state(); + let before = $state(); + let hasNext = $state(true); + let loading = $state(false); + + const setLogging = async (logging: boolean) => { + const success = await handleUpdateWorkflow(workflow.id, { logging }); + if (!success) { + return; + } + workflow = { ...workflow, logging }; + reset(); + }; + + const reset = () => { + entries = []; + hasNext = true; + before = undefined; + }; + + const setFilter = (option: SelectOption) => { + reset(); + filter = option.value; + void getLogs(); + }; + + const getLogs = async () => { + if (!hasNext || loading) { + return; + } + + loading = true; + const limit = 50; + const results = await getWorkflowLogs({ id: workflow.id, result: filter, before, limit }); + entries.push(...results); + if (results.length < limit) { + hasNext = false; + } else { + before = results.at(-1)?.at; + } + loading = false; + }; + + const observer = new IntersectionObserver((entries) => { + const entry = entries.find((entry) => entry.target === placeholder); + if (entry?.isIntersecting) { + void getLogs(); + } + }); + + $effect(() => { + if (!placeholder) { + return; + } + observer.disconnect(); + observer.observe(placeholder); + }); + + + + + {#if workflow.logging} + + + {$t('date')} + {$t('result')} + + + {#each entries as entry (entry.id)} + + + +

    + {DateTime.fromISO(entry.at).toLocaleString(DateTime.DATETIME_MED, { + locale: $locale, + })} +

    + {#if entry.triggerDataId} + + + + {/if} +
    +
    + + + {#if entry.result === WorkflowResult.Completed} +

    + {$t('workflow_logging_completed')} +

    + {:else if entry.result === WorkflowResult.Halted} +

    + {#if entry.lastStep} + {$t('workflow_logging_halted_step', { values: { step: entry.lastStep.index + 1 } })} + {:else} + {$t('workflow_logging_halted')} + {/if} +

    + {:else} +

    + {#if entry.lastStep} + {$t('workflow_logging_error_step', { values: { step: entry.lastStep.index + 1 } })} + {:else} + {$t('error')} + {/if} +

    + {/if} +
    +
    +
    + {/each} + {#if hasNext} +
    ...
    + {/if} +
    +
    +
    +